Page 1 of 1

Console Roms and Save States

Posted: Fri Jan 11, 2019 6:49 pm
by Graham
Hi All

Having save states enabled for console roms (i.e Atari 2600) doesn't seem to work properly when switching between different games (games don't load). Am I missing a setting somewhere or is this a bug? The only way I can get each 2600 game to load is by disabling save states. If this is how it is, is it then possible to maybe map a button (on a joypad) to switch this feature on and off without having to go through the menus.

:)

Re: Console Roms and Save States

Posted: Thu Jan 24, 2019 10:17 pm
by Graham
In addition to the above post, is there any references on the web as to which consoles are able to use save states successfully. Also, which consoles requiring additional files (lynx, gameboy, etc) and others that don't (atari 2600, etc).

:)

Re: Console Roms and Save States

Posted: Sun Jan 27, 2019 1:07 am
by Klez
In case of doubt you can use the source:

Code: Select all

./mame64 lynx -ls
lynx             lynx.cpp

Now check the driver "lynx.cpp"

Code: Select all

https://github.com/mamedev/mame/blob/master/src/mame/drivers/lynx.cpp

Scroll down to the end and you will see the driver flags (line 205):
CONS( 1989, lynx, 0, 0, lynx, lynx, lynx_state, empty_init, "Atari", "Lynx", MACHINE_SUPPORTS_SAVE )

There are more flags to describe the current state of a driver, all of them have self-explanatory names like MACHINE_NOT_WORKING or MACHINE_IMPERFECT_SOUND among others.

Re: Console Roms and Save States

Posted: Sun Jan 27, 2019 7:30 am
by Graham
Hi Klez

Thank you for the detailed yet easy to understand explaination :). The console in question (that I can remember) was the Atari 2600. The driver states that save states are enabled and the gui displays this, yet it doesn't fully restore the state.

For example, if you load Berzek, play for a little and then quit out. Load Chopper Command, do the same and then return to Berzerk, it is as if you are starting from scratch each time (position not saved). Oddly though, it is loading each game now (well, the 3 that I tested, the other being Combat) and I'm not seeing a blank screen now. This may be because I was using 0.202 previously (I'll need to do some more testing with 0.205).

:)

Re: Console Roms and Save States

Posted: Sun Jan 27, 2019 10:00 pm
by Klez
i think you are overwriting the same slot for save states using different games.

Savestates have a "slot position", so when you load game (A), and then hit shift-F7 theres a menu that says "Select position to save to" for example type "1". Now savestate from game (A) is on slot = #1 for that specific machine, a2600. Now a new savestate file is being created as STA\a2600\1.sta

Now you are playing game (B) and choose to save again with shift-F7 in the slot number 1, you are overwriting the data from game A with game B. That means that if you play again game (A) and try to load savestate #1 the emulation will be corrupted. This is the same STA\a2600\1.sta file with game (A) save data.

My suggestion is saving different savestates in different number slots, so do not get mixed and overwritten. Say slot #1 for game A and #2 for game B.

Sometimes savestates from older MAME versions are not compatible with the actual version.

Re: Console Roms and Save States

Posted: Sun Jan 27, 2019 10:59 pm
by Graham
Hi Klez

From your explaination, I think I may have misunderstood how save states work with consoles. Within the Mame GUI (for arcade games), I had enabled "Automatic save/restore" under State/Playback Options (Advanced Options). I assumed that each Atari 2600 game saved it's own state too. I will change my gaming habits and put this down to user error :oops:.

:)