xboxscene.org forums

Pages: 1 [2] 3

Author Topic: Atari7800x V3  (Read 423 times)

XPort

  • Archived User
  • Hero Member
  • *
  • Posts: 941
Atari7800x V3
« Reply #15 on: May 10, 2008, 09:23:00 PM »

Those command line parameters are generated by the conglomeration of all the options you can select under "compiler" (c/c++) options.  Anything you change there manually can be changed by checking/unchecking a box or changing a value somewhere else on the compiler c/c++ property pages.
Logged

XPort

  • Archived User
  • Hero Member
  • *
  • Posts: 941
Atari7800x V3
« Reply #16 on: May 11, 2008, 08:40:00 AM »

Yup - I'm pretty sure it was GBA.  There is a hook function in the main xbox emulator cpp file (e.g. atarixlbox.cpp, a7800x.cpp, etc) that calls the commonfuncs.cpp function.  The frame-skipping is in there.

I'm glad you mentioned the commonfuncs.cpp though - I've been meaning to ask if you have been keeping it free of emulator-specific code.  Ideally, anything that is applicable to every other emulator will be in there and anything that is not applicable to every other emulator will not.  You're of course free to do as you wish, but it would make it slightly more maintainable for you and anyone else who picks up after you're done with your changes.

Logged

madmab

  • Archived User
  • Hero Member
  • *
  • Posts: 1049
Atari7800x V3
« Reply #17 on: May 12, 2008, 11:46:00 PM »

Well I think I'm gonna dump the prosystem palette.  Seems the "new stella palette" is the best of them.

I'll have to mess (pun intended) around a little more but seems the sound issues in "release mode" only crop up when I use a combination of rewind after using fast forward so I'm not sure if anything can be done.  Going into the menu and then back into the game clears it up.

Logged

Antiriad

  • Archived User
  • Jr. Member
  • *
  • Posts: 64
Atari7800x V3
« Reply #18 on: May 13, 2008, 01:00:00 PM »

Dearest MadMab, as this is you updating Atari7800x which I believe is based on the MESS sourcecode, please consider in the future coming back to this and creating a Acorn/BBC emulator from it... I'd be happy to do the artwork for it if that was a problem.
Logged

madmab

  • Archived User
  • Hero Member
  • *
  • Posts: 1049
Atari7800x V3
« Reply #19 on: May 19, 2008, 07:51:00 AM »

I'm not having much luck (yet) finding the rewind frame skip stuff.  But I do see where the GBA emu skips rendering every 4 frames when in fast forward mode...  Plus a 60 frame delay when a save state is loaded.

I'll have to keep looking...   unsure.gif
Logged

XPort

  • Archived User
  • Hero Member
  • *
  • Posts: 941
Atari7800x V3
« Reply #20 on: May 20, 2008, 08:11:00 AM »

It might be easiest to set a breakpoint in the function in commonfuncs.cpp that does the actual saving of memory during storage of rewind data and look at the call stack.
Logged

sotu

  • Archived User
  • Sr. Member
  • *
  • Posts: 267
Atari7800x V3
« Reply #21 on: May 21, 2008, 03:18:00 AM »

Please forgive me if this is the wrong spot to ask this question but I'm really wanting to play Ms Pacman with the joystick not the directional pad.  Problem is that the 5200 version plays using the joystick but Ms. Pacman is a bit slower and the game just isn't as polished as the 7800 ver for obvious reasons.  

So I'm asking is there a way to get the joystick function working on 7800x like it does on 5200 atarixlbox?  

thanks
Logged

XPort

  • Archived User
  • Hero Member
  • *
  • Posts: 941
Atari7800x V3
« Reply #22 on: May 21, 2008, 06:20:00 AM »

QUOTE(madmab @ May 20 2008, 04:26 PM) View Post

I found it.  I just misunderstood your previous comment about the "hook" into commonfuncs.cpp.  The code is located in xbox_savestatemem() which is in the gba.cpp file.  happy.gif  Sometimes I just get into duh, huh mode.

On afterthought I suppose I coulda just made up something myself.  I just usually try to make everything as similar as possible to other emu's for consistency.  Thanks.

I take it that this...

CODE
xbox_mfwrite( "aaadefggggglmnopqrstuuuuyz222221-597278659", 1, 42, sm );


Serves as nothing but a placeholder (aka dummy/blank/empty state) right?  It looks like the xbox_loadstatemem() skips over anything less than 50 bytes in size.


Ya - something needed to be saved so that the load state would not crash.  The rewind stuff in general is somewhat kludgey - I think the lz compression algorithm is screwed up in some manner because it seems to leak under various circumstances.  I think the whole "compress-into-memory" section needs an overhaul.  It's why rewind fails to work on the ones noted in the docs that save states are supported but rewind is not.
Logged

madmab

  • Archived User
  • Hero Member
  • *
  • Posts: 1049
Atari7800x V3
« Reply #23 on: May 21, 2008, 07:58:00 AM »

Sotu - You can already map the digital stick to the pad if you want.  Just go into the joystick configuration screen and remap the joy_up/down/left/right to the analog stick.

On a side note I'm gonna add Joy 2 up/down/left/right options to the mapping screen so those who wish to map robotron for dual stick can do so.  biggrin.gif
Logged

sotu

  • Archived User
  • Sr. Member
  • *
  • Posts: 267
Atari7800x V3
« Reply #24 on: May 21, 2008, 08:49:00 PM »

Thanks for the info everythings running great!
Logged

madmab

  • Archived User
  • Hero Member
  • *
  • Posts: 1049
Atari7800x V3
« Reply #25 on: May 31, 2008, 02:05:00 AM »

Just a small little update.  I've spending a good amount of time figuring out the header format of ROMS (and how prosystem "classifies" rom_types)..  The purpose being to allow the user to run .BIN files.  Primary purpose, run homebrews and new prototype releases.  So here it is..

What was throwing me off was the lack of correlation between the cart_type as defined in prosystem.dat and the cart_type defined in the header of A7800 ROMS.  So once I got that straightened out things began to make more sense.  laugh.gif

Prosystem uses the following cart types...

CODE
prosystem type 0 -> 0    Normal Cart
prosystem type 1 -> 2    Supercart
prosystem type 2 -> 10    Supercart with additional ROM at $4000 (Large)
prosystem type 3 -> 6    Supercart with additional RAM at $4000
prosystem type 4 -> 02    Supercart no additional RAM/ROM
prosystem type 5 -> 512     F18 Hornet
prosystem type 6 -> 256     Activision Cart

add 1 if pokey=true


The number on the left is the prosystem internally defined number.  The number after the -> is the actual header value of the ROM.  The text on the right is the actual description.  That being said I should be able to narrow the user configuration for headerless ROMS down to two options..

Cart Type (as defined by prosystem)
Pokey Supported (yes/no).

That being said.  I noticed all homebrews (that I've tried so far) are cart type 0.  With pokey either being true or false.
The two prototypes (Sirius and Plutos) that came out recently are type 2 (I believe, going from memory here).

So in 99% of the cases the user can just pick cart_type 0 with pokey on/off and let her fly.  For future newly released prototypes it would be just a matter of trying each cart_type until it works.  laugh.gif  Or just manually adding it to the prosystem.dat file.

Other things that threw me off.  laugh.gif

1.  My Commando ROM has the wrong header, so no pokey sound.
2.  My Sentinel had a bad header and didn't work as a result.  (wrong cart_type and PAL)
3.  My Summer Games has a wrong header thus the graphics were scrambled.
4.  My Winter Games had the same issues as Summer Games.
5.  The two Frogger ROMS with headers have invalid header.  Hence impromper music (no pokey).

None the less I have it all figured out now.  laugh.gif

Oh and the emulator now displays a message when you change the difficulty level on switch A or B.

I'm debating on whether to display a message when the "Pause" button has been pressed and still "active".
Logged

madmab

  • Archived User
  • Hero Member
  • *
  • Posts: 1049
Atari7800x V3
« Reply #26 on: June 03, 2008, 10:09:00 AM »

IPB Image

IPB Image

biggrin.gif
Logged

XTecuterX73

  • Archived User
  • Sr. Member
  • *
  • Posts: 297
Atari7800x V3
« Reply #27 on: June 03, 2008, 10:23:00 AM »

QUOTE(madmab @ Jun 3 2008, 12:45 PM) View Post

IPB Image

IPB Image

biggrin.gif


lookin good madmab!  biggrin.gif  You have really put some work into this. I can't wait to try it out! Damn you just keep on going and going!!  pop.gif

XT-
Logged

madmab

  • Archived User
  • Hero Member
  • *
  • Posts: 1049
Atari7800x V3
« Reply #28 on: June 09, 2008, 05:28:00 PM »

Ran into a little situation that has got me slightly baffled.  While adding in cheat database support (aka gameshark_db) the emu would load but appear to hang on trying to load "main()".  After a bit of fooling around I found that defining the gameshark database array was causing the issue.  The struct is as follows..

CODE
    typedef struct _cheatdbentry
    {
        char gamename[100];
        char CRC32[9];
        unsigned int numcodes;
        char *filepos;
    } CHEATDBENTRY;

    CHEATDBENTRY m_cheatDB[5000];


Lowering the  size of m_cheatDB seemed to do the trick but then it started creating conflicts with the rewind code so I had to lower it even more.  Oddly enough putting the same entry in Z26 created the same issues except it seemed even pickier than a7800x about the final size allowed.  

Now granted 5000 probably is way more than I need but that number did not seem to pose any issue with Atarixlbox, or Pcsxbox (which I would think would take up far more memory than either z26 or a7800x).  But it still strikes me as odd, especially with Z26 which I would think should be smaller.  But then it does quadruple buffer the screen (or is that triple?).

Anyways, regardless when I do get a7800x running it seems to report having plenty of memory available.  Is the xbox_get_freemem function lying to me or something?  I know the xbox does not have a whole lot of memory, but freemem seems to report plenty ( 37064704 bytes).

Any info would be greatly appreciated.  I'm kinda new to dealing with memory issues.

Thanks!!
Logged

madmab

  • Archived User
  • Hero Member
  • *
  • Posts: 1049
Atari7800x V3
« Reply #29 on: June 09, 2008, 09:23:00 PM »

I got another issue where the xbox locks when exiting the "search gameshark DB" screen.  Thing is, it does not do it on Atarixlbox.  It does not do it in Debug mode.  It only does it in release mode.   grr.gif

Pretty frustrating since I don't have a clue where to start.
Logged
Pages: 1 [2] 3