SRAM not always saving.

General area for talk about ZSNES. The best place to ask for related questions as well as troubleshooting.

Moderator: ZSNES Mods

Post Reply
shentino
Rookie
Posts: 19
Joined: Mon Mar 03, 2008 8:55 pm

SRAM not always saving.

Post by shentino »

Game: Super Mario RPG

In an effort to get snes9x and zsnes to cooperate through SRAM sharing, I've been enjoying the superior quality of snes9x's sound emulation while switching to the superior emulation management of zsnes when I come across a particularly difficult part of the game.

And here lies the problem.

I recently loaded zsnes up with an SRAM left by 9x, and it loads just fine, but nothing carries back to 9x after I'm done with the SRAM in zs.

Further inspection reveals that for some reason zsnes isn't saving the SRAM. I went to a save point, saved, and waited 8 seconds or so, but timestamp of the SRAM file indicates no change. It's like the SRAM isn't being written to disk.

I do have the 5-second live save enabled.

Since this was an experimental procedure, I also used Super Mario World purely under zs. Nothing weird happened there, and it saved 5 seconds after writing as expected.

I really want to be able to port state back and forth between the two.

What's going on here? Did 9x somehow booger up the SRAM to where zs can't handle it? sram from 9x to zs works as expected.

I'm not sure if it's a bug or not but SRAM saving for one game and not for another is just weird.
badinsults
"Your thread will be crushed."
Posts: 1236
Joined: Wed Jul 28, 2004 1:49 am
Location: Not in Winnipeg
Contact:

Re: SRAM not always saving.

Post by badinsults »

Are you sure that zsnes is set up to read/write the SRAM file where you have the SNES9x saves set up?
<pagefault> i'd break up with my wife if she said FF8 was awesome
shentino
Rookie
Posts: 19
Joined: Mon Mar 03, 2008 8:55 pm

Re: SRAM not always saving.

Post by shentino »

Sorta.

I actually have 9x configured to save to zs's folder. Same results as your method I presume.

Also, both srm's are in zs's folder.

The SMRPG one doesn't save on change, but the SMW one does. They're both in the same folder, the only difference between them is that the SMRPG one was originally created by 9x.

I'm going to update once I see if virgin zs SRAM from SMRPG shows the same behavior.

EDIT:

Ok, I just did the virgin zs test with SMRPG. Even without 9x in the picture it still failed to write SRAM to disk.

So 9x probably isn't messing anything up.

EDIT 2:

Just ran another experiment, and I was able to do a out and back from 9x to zs and back to 9x with an SRAM for SMW. The common factor seems to be zs's handling of SMRPG's SRAM.

I've checked the config in both cases, they are the same. At least zs can READ SRAM from 9x.
paulguy
Zealot
Posts: 1076
Joined: Sat Jul 02, 2005 2:01 am
Contact:

Re: SRAM not always saving.

Post by paulguy »

Dumb question, but are they both running at the same time?

Also, doesn't zsnes have known problems with super mario RPG? Also, by management, do you mean the existence of rewinds? Does snes9x not have rewinds?
Maybe these people were born without that part of their brain that lets you try different things to see if they work better. --Retsupurae
odditude
Official tech support dood
Posts: 2118
Joined: Wed Jan 25, 2006 7:57 am

Re: SRAM not always saving.

Post by odditude »

what os/version? what are the fully qualified paths to both ZSNES and the save directory?
Why yes, my shift key *IS* broken.
shentino
Rookie
Posts: 19
Joined: Mon Mar 03, 2008 8:55 pm

Re: SRAM not always saving.

Post by shentino »

I'm unaware of any SRAM specific problems with SMRPG. There was some SA-1 something or other that's on the dead horse list, but SRAM failing to write to disk doesn't ring a bell as a known bug.

I was indeed running them both at the same time just for shits and giggles, but the problem persisted when I ran them serially.

As an aside, a way to explicitly write SRAM on command would come in handy.

Linux Mint 9
/usr/bin/zsnes
/home/shentino/.zsnes

I have also confirmed that the saved games are indeed being written to SRAM, as deleting the SRAM causes the saves to go poof. Still at a loss for why the modified SRAM isn't being written to disk as directed.
Deathlike2
ZSNES Developer
ZSNES Developer
Posts: 6747
Joined: Tue Dec 28, 2004 6:47 am

Re: SRAM not always saving.

Post by Deathlike2 »

Make sure that ZSNES points to the correct directory by editing ~/.zsnes/zsnesl.cfg

Case sensitivity can screw things up.
Continuing [url=http://slickproductions.org/forum/index.php?board=13.0]FF4[/url] Research...
shentino
Rookie
Posts: 19
Joined: Mon Mar 03, 2008 8:55 pm

Re: SRAM not always saving.

Post by shentino »

I double checked and it's the correct folder. Currently the paths are all empty so I'm assuming it's defaulting to .zsnes.

I should note that it's still READING the SRAM file just fine. It's writing it back to disk that seems to be troublesome for SMRPG.

I should mention that SRAM for SMW is being handled just fine, so it's most likely not a path related problem
shentino
Rookie
Posts: 19
Joined: Mon Mar 03, 2008 8:55 pm

Re: SRAM not always saving.

Post by shentino »

Oh, to answer an earlier question.

By management I do indeed mean zs's features of rewinding and changing speed. Timing those superjumps enough to get the Super Suit is a lot easier in slow mo.

Anyway, I double and triple checked everything. All the paths are correct and everything is working as expected with Super Mario World. Loading SRAM works for SMRPG, but for some reason it isn't getting saved to disk when it changes. And I have confirmed that Snes9x isn't interfering, since it behaves this way even if I start everything with a virgin cold boot without any state at all.

If this isn't a known issue should it be moved to the bug board?
grinvader
ZSNES Shake Shake Prinny
Posts: 5632
Joined: Wed Jul 28, 2004 4:15 pm
Location: PAL50, dood !

Re: SRAM not always saving.

Post by grinvader »

shentino wrote:I'm unaware of any SRAM specific problems with SMRPG. There was some SA-1 something or other that's on the dead horse list, but SRAM failing to write to disk doesn't ring a bell as a known bug.
Maybe you shouldn't bother, you know

because it is.
皆黙って俺について来い!!

Code: Select all

<jmr> bsnes has the most accurate wiki page but it takes forever to load (or something)
Pantheon: Gideon Zhi | CaitSith2 | Nach | kode54
shentino
Rookie
Posts: 19
Joined: Mon Mar 03, 2008 8:55 pm

Re: SRAM not always saving.

Post by shentino »

So does playing an SA-1 game count as a breach of warranty for ALL bugs? It didn't seem like something that would specifically affect SRAM.

I'll give 1.42 a try. If that fixes the SRAM save failure then I'll consider it a dead horse bug I never should have posted in the first place.

Unfortunately I'm having problems compiling 1.42.

File permissions have also been triple-checked.
paulguy
Zealot
Posts: 1076
Joined: Sat Jul 02, 2005 2:01 am
Contact:

Re: SRAM not always saving.

Post by paulguy »

Do you really need to rewind that badly? Snes9x has the rest of the functionality you need. If the game has known problems with this particular emulator, then why would you want to bother with the risk of glitches or hangs or losing your saves/progress? A turn based game like Super Mario RPG would be better with specific saved states anyway.
Maybe these people were born without that part of their brain that lets you try different things to see if they work better. --Retsupurae
kode54
Zealot
Posts: 1140
Joined: Wed Jul 28, 2004 3:31 am
Contact:

Re: SRAM not always saving.

Post by kode54 »

He reported in #zsnes that for some reason, the speed control keys do nothing for him. Just as I told him to try resetting the keys, or setting them to something else, he peered out and never came back.
shentino
Rookie
Posts: 19
Joined: Mon Mar 03, 2008 8:55 pm

Re: SRAM not always saving.

Post by shentino »

I X'ed out of IRC because I got very sleepy.

Anyway I've been over every menu item back and forth and the only things related to speed do nothing to the emulation.

I've also tried raw compilation of 1.42 and 1.51, neither of which I can get to compile on my system for some reason.

I've decided to forgo all solutions except waiting for the SRAM saving bug to get picked up during the sa-1 rewrite for 2.0.
grinvader
ZSNES Shake Shake Prinny
Posts: 5632
Joined: Wed Jul 28, 2004 4:15 pm
Location: PAL50, dood !

Re: SRAM not always saving.

Post by grinvader »

... don't hold your breath.
皆黙って俺について来い!!

Code: Select all

<jmr> bsnes has the most accurate wiki page but it takes forever to load (or something)
Pantheon: Gideon Zhi | CaitSith2 | Nach | kode54
shentino
Rookie
Posts: 19
Joined: Mon Mar 03, 2008 8:55 pm

Re: SRAM not always saving.

Post by shentino »

I just thought of a potential workaround.

Can I do a bit of file surgery to extract an srm file from a zst file?

If so, does anyone know the appropriate file offset in the zst where the embedded srm is?
Rashidi
Trooper
Posts: 515
Joined: Fri Aug 18, 2006 2:45 pm

Re: SRAM not always saving.

Post by Rashidi »

shentino wrote:I just thought of a potential workaround.

Can I do a bit of file surgery to extract an srm file from a zst file?

If so, does anyone know the appropriate file offset in the zst where the embedded srm is?
iirc, the 1.42 zst doesn't contain the srm,
which cause trouble for games like Treasure Hunter G,
but you can abuse it for games like E.V.O

Edit:
i'm curious about chmod result from .srm made by snes9x vs .srm made by zsnes ...
Post Reply