Auto-save SRAM (game saves in general)

If you're having problems with Snes9x, or think you've found a bug, this is the place to be.
Post Reply
TheMadjai
Snes9x White Belt
Posts: 4
Joined: Wed Apr 13, 2016 3:38 pm

Auto-save SRAM (game saves in general)

Post by TheMadjai »

Ok, this question is fairly complicated, but boils down to this: I'm having trouble with game saves in SNES9x. I am running this with the Maximus arcade frontend, which I think may be getting in the way of something, but the problem exists without it. Here goes.

When I boot up a game with a built-in save feature (Let's say, FFIII), when I arrive at a save point, I save my game, and I close the ROM and also shut down SNES9x. When I bring it back up, there is no save game for the ROM to see. My first thought is that something isn't configured correctly, so I head over to Emulation -> Settings, and there's a field there for "Auto-save S-RAM." It wants "seconds after last change." I'm not sure what this field does, and I can't find any documentation on it. So, I set it to 5 (thinking maybe there's a delay built in between when I save in-game and when SNES9x builds an .sram file. Why would there be a delay here? Who knows? I might be wrong), and make sure that the SRAM and Saves directory are both pointed at "Saves." (they already were) It's at this point that I notice there is an existing .sram file called "Final Fantasy III.sram" in the roms folder of my SNES9x directory. I think this is odd, so I copy it, and go to paste it into my SAVES folder, and notice that there is an .sram file in there called FINALF~1.sram. Curious. I paste the file in there anyway, and fire up SNES9x again. There is no save data in the game. So, I walk Terra and the Star Wars boys through Narshe, get to a save point, save the game, count to five slowly, and then exit SNES9x again. Fire it up one more time, and THIS TIME it recognizes the save. I can pick up my game. So, I change the fullscreen setting back to on, Alt+F4 out of the program and fire up my Frontend (Maximus Arcade 2.10).

I choose SNES, Final Fantasy III, and now there's no save game. WTH. Terra and the boys kill a few more Narshe guards, save at the sparkle, count 5, and exit. Choose FFIII again. Now it works. I can re-join that game. Close everything, restart MA, start up again, and the save is still there.

Ok, now with all that, it's question time: What the hell is going on here? What does that Auto-save S-RAM setting do, and is Maximus dumping saves into a different directory than SNES9X, even though MA is just calling that emulator and should be using those settings?

If anyone has any ideas, I'd love to hear 'em. Please note: this question does not pertain to save STATES, I'm not there yet.

PERTINENT INFO:
I am running this system in a Windows 7 PC, using Maximus Arcade 2.10 as a frontend. SNES9x is v1.53, and I am controlling all of this with a control panel that's joysticks and buttons, mapped using a Xin-mo controller. Let me know if you need anything else.
User avatar
OV2
Official Win32 Porter/Dev
Posts: 679
Joined: Thu Aug 30, 2007 10:15 pm

Re: Auto-save SRAM (game saves in general)

Post by OV2 »

"Auto-save S-RAM" controls the delay between changes to the SRAM and when s9x automatically saves the sram file. This prevents writing to disk after every single byte change. You should however not need to change this to a smaller value, since s9x automatically saves the SRAM file when you close it or load a different ROM. The additional auto save is simply to prevent loss if s9x or your pc crashes.
I don't really know why it does not work in your case. If you delete the .srm file, start the game, and immediately close s9x, does it create the srm file?
TheMadjai
Snes9x White Belt
Posts: 4
Joined: Wed Apr 13, 2016 3:38 pm

Re: Auto-save SRAM (game saves in general)

Post by TheMadjai »

From inside Maximus Arcade: Opening FFIII, waiting until the title screen appears, exiting out of the ROM, no .srm file is created.
From SNes9x directly: Opening FFIII, waiting until the title screen appears, exiting out of the ROM, a .srm file is created inside the Saves directory.

If I delete that .srm file, re-open FFIII using SNes9x directly, go to a save point, save and immediately File -> Exit, open SNes9x and then open FFIII, a save file is available to me to load from. Looks like this is an issue when Maximus gets involved, though I'm not sure why this wasn't working exactly like this before.

So... anyone know why Maximus is flaking out on it's job?
TheMadjai
Snes9x White Belt
Posts: 4
Joined: Wed Apr 13, 2016 3:38 pm

Re: Auto-save SRAM (game saves in general)

Post by TheMadjai »

After narrowing this down to a MA issue, I googled it and came up with the source problem: Maximus isn't properly shutting down Snes9x when it calls the "quit executable" routine. I completely disregarded my computer science training and did two things to attempt to resolve this issue.

1) I added the Snes9x executable (process) to Maximus' Configuration -> Exit -> "Close specific processes started during launch" option. This should hopefully kill the Snes9x process during the exit, causing the .srm file to be recognized properly.

2) I set the Snes9x "reset game" button to be the same as the button I have told Maximus is the "quit executable" button. Ideally, this would cause SNes9x to recognize a reset as Maximus is killing it, causing a save of the .srm.

I blew away the .srm file in the Saves folder, started up FFIII again, saved my game, and quit Maximus. Brought FFIII back up, and it did not work.
TheMadjai
Snes9x White Belt
Posts: 4
Joined: Wed Apr 13, 2016 3:38 pm

Re: Auto-save SRAM (game saves in general)

Post by TheMadjai »

So, changing the Auto-save SRAM setting to a very low number (NOT 0, as that apparently turns it off, I have it set to 5) is a valid workaround until such time as a proper solution can be found. I'm afraid with Maximus being a more or less dead project, that means that either I deal with waiting 5 seconds to quit after I save or get a new frontend.
Luhkoh
Snes9x White Belt
Posts: 2
Joined: Sun May 15, 2016 8:59 pm

Re: Auto-save SRAM (game saves in general)

Post by Luhkoh »

Currently having the same issue with launchbox.
Post Reply