Snes9X savestate support
Moderator: ZSNES Mods
-
- Locksmith of Hyrule
- Posts: 3634
- Joined: Sun Aug 08, 2004 7:49 am
- Location: 255.255.255.255
- Contact:
Snes9X savestate support
I had someone ask me in PM on the Snes9X boards about Snes9X savestate support in ZSnes. AFAIK ZSnes states are supported in Snes9X, but I know that Snes9X states aren't compatable in ZSnes. Could this be a feature in the next release of ZSnes?
<Nach> so why don't the two of you get your own room and leave us alone with this stupidity of yours?
NSRT here.
NSRT here.
-
- Locksmith of Hyrule
- Posts: 3634
- Joined: Sun Aug 08, 2004 7:49 am
- Location: 255.255.255.255
- Contact:
Okay.
<Nach> so why don't the two of you get your own room and leave us alone with this stupidity of yours?
NSRT here.
NSRT here.
-
- Romhacking God
- Posts: 922
- Joined: Wed Jul 28, 2004 11:27 pm
- Contact:
Thanks for the instructive reply I was wondering too.IceFox wrote:I asked this in the old forum (with the same exact thread title, in fact), and it looks like pagefault is going to make (or has made) so many changes in the savestate code that Snes9x savestates will simply not be compatible with ZSNES.
-
- Romhacking God
- Posts: 922
- Joined: Wed Jul 28, 2004 11:27 pm
- Contact:
What's that got to do with it? Changing the savestate format now should have no bearing on loading SNES9x savestates. They have been much different than ZSNES savestates for quite a long time.IceFox wrote:I asked this in the old forum (with the same exact thread title, in fact), and it looks like pagefault is going to make (or has made) so many changes in the savestate code that Snes9x savestates will simply not be compatible with ZSNES.
[url=http://transcorp.romhacking.net]TransCorp[/url] - Home of the Dual Orb 2, Cho Mahou Tairyku Wozz, and Emerald Dragon SFC/SNES translations.
[url=http://www.romhacking.net]ROMhacking.net[/url] - The central hub of the ROM hacking community.
[url=http://www.romhacking.net]ROMhacking.net[/url] - The central hub of the ROM hacking community.
-
- Romhacking God
- Posts: 922
- Joined: Wed Jul 28, 2004 11:27 pm
- Contact:
Well, there is a good reason why I would like to load Snes9x savestates in Zsnes:Aerdan wrote:According to memory, pf said that ZSNES savestates would contain far more detail than SNES9x's states, so there'd be very little reason for implementing SNES9x states.
Zsnes has always been my favorite emulator. But the last upgrading of my Linux distro, a few months ago, had a bug in SDL sound that affected Zsnes. So I tried Snes9x, which wasn't affected, and used it to play for some time. By the way, Snes9x for Linux can't handle cheating codes.
Now I have corrected the bug and I'm back to Zsnes. But I have played some nice games with Snes9x (without cheating!), and it would be great to continue them in Zsnes. That's it!
-
- ZSNES Shake Shake Prinny
- Posts: 5632
- Joined: Wed Jul 28, 2004 4:15 pm
- Location: PAL50, dood !
With the latest changes made to ZSNES states, I don't think snes9x is compatible anymore.
Use SRMs. They will always be compatible.
Use SRMs. They will always be compatible.
皆黙って俺について来い!!
Pantheon: Gideon Zhi | CaitSith2 | Nach | kode54
Code: Select all
<jmr> bsnes has the most accurate wiki page but it takes forever to load (or something)
-
- Regular
- Posts: 317
- Joined: Tue Sep 14, 2004 12:48 am
- Location: In a small padded white room
- Contact:
Snes9x 1.43 wouldn't load some savestates I made with the Apr 04 ZSNES WIP. I'm using Geiger's debugger version though, although since it's based on the 1.43 base, this doesn't seem like it would be affected.grinvader wrote:With the latest changes made to ZSNES states, I don't think snes9x is compatible anymore.
Use SRMs. They will always be compatible.
http://jdrrant.blogspot.com/ - CODEpendent Blog
http://games.technoplaza.net/ - Emulation Goodies
http://games.technoplaza.net/ - Emulation Goodies
-
- ZSNES Shake Shake Prinny
- Posts: 5632
- Joined: Wed Jul 28, 2004 4:15 pm
- Location: PAL50, dood !
If they didn't change their ZST loading routines, snes9x won't be able to load most recent states.
We save more stuff than in the old ones, and this new stuff is in the middle of the rest, so it would badly screw if you loaded one as if it was an old state.
We save more stuff than in the old ones, and this new stuff is in the middle of the rest, so it would badly screw if you loaded one as if it was an old state.
皆黙って俺について来い!!
Pantheon: Gideon Zhi | CaitSith2 | Nach | kode54
Code: Select all
<jmr> bsnes has the most accurate wiki page but it takes forever to load (or something)
-
- Romhacking God
- Posts: 922
- Joined: Wed Jul 28, 2004 11:27 pm
- Contact:
Why wasn't additional information added to the end to keep backwards compatibility? I'm going to assume this would promote disorganization.
[url=http://transcorp.romhacking.net]TransCorp[/url] - Home of the Dual Orb 2, Cho Mahou Tairyku Wozz, and Emerald Dragon SFC/SNES translations.
[url=http://www.romhacking.net]ROMhacking.net[/url] - The central hub of the ROM hacking community.
[url=http://www.romhacking.net]ROMhacking.net[/url] - The central hub of the ROM hacking community.
-
- ZSNES Shake Shake Prinny
- Posts: 5632
- Joined: Wed Jul 28, 2004 4:15 pm
- Location: PAL50, dood !
You assume correctly.Nightcrawler wrote:Why wasn't additional information added to the end to keep backwards compatibility? I'm going to assume this would promote disorganization.
States are saved using chip-dependant code. If you're playing a SA1 game, you save:
5A22 stuff, WRAM, VRAM, SPC700 stuff, SA-1 old stuff + SA-1 new stuff, new emulation vars, SRAM if enabled
As you can see, the new emulation vars/SRAM are added at the end. But the SA-1 stuff is saved when the SA-1 test is done.
We're not gonna add new chip tests at the end and write bad code just so that snes9x can still load our states.
皆黙って俺について来い!!
Pantheon: Gideon Zhi | CaitSith2 | Nach | kode54
Code: Select all
<jmr> bsnes has the most accurate wiki page but it takes forever to load (or something)
And we wouldn't want you to, if i may speak for snes9x.grinvader wrote:We're not gonna add new chip tests at the end and write bad code just so that snes9x can still load our states.
snes9x's savestates need a major overhaul too, BTW. The annoying part is keeping the ability to load old snes9x savestates in overhauled versions of '9x.
-
- ZSNES Developer
- Posts: 3904
- Joined: Tue Jul 27, 2004 10:54 pm
- Location: Solar powered park bench
- Contact:
I'll help you overhaul if you want. It was tricky overhauling ZSNES save states, we did it in a way that old save states work in current ZSNES, and current states still load in older ZSNESs.anomie wrote:And we wouldn't want you to, if i may speak for snes9x.grinvader wrote:We're not gonna add new chip tests at the end and write bad code just so that snes9x can still load our states.
snes9x's savestates need a major overhaul too, BTW. The annoying part is keeping the ability to load old snes9x savestates in overhauled versions of '9x.
Some of the tricks I used to do that was arranging the new data in such a way that older ZSNESs would ignore it or think it's part of the thumbnail.
For loading old states in current, I did some function pointer magic to calculate various offsets in advance based on a version # and other factors to get everything in the right area. The technique I used also made it that saving and loading save states, rewind states, and other types of state related things all use the same function for copying data around.
May 9 2007 - NSRT 3.4, now with lots of hashing and even more accurate information! Go download it.
_____________
Insane Coding
_____________
Insane Coding
My problem is just that with all the newly emulated features requiring new variables, I have to find some way to pull those out of old savestates and guess/recalculate what value they should have. Major pain.
I can't say I care about trying to write things so old versions can use new states though, it's more cruft than it's worth. And '9x savestates make it very easy to add things to the end of a block, each block has a tag and a length.
I can't say I care about trying to write things so old versions can use new states though, it's more cruft than it's worth. And '9x savestates make it very easy to add things to the end of a block, each block has a tag and a length.
As a matter of programming philosopy, I'd have to agree there. Backwards compatibility is one thing, and it's well and good for a while (until there comes a time when you need to be truly innovative). However, promising forward compatibility with future versions is simply too limiting and too hard to maintain, I feel.I can't say I care about trying to write things so old versions can use new states though, it's more cruft than it's worth.
There are a number of structures for data out there, in numerous applications, where the original format was designed to be highly extensible. Generally, the overall structure of the data becomes a sort of expandable "container" for the internal content. This makes it much easier to dynamically change what's actually stored inside that structure. Call it foresight on part of the developer(s).
-
- ZSNES Developer
- Posts: 3904
- Joined: Tue Jul 27, 2004 10:54 pm
- Location: Solar powered park bench
- Contact:
The reason why we strive to contain insane compatibility in ZSNES, is that if we see a bug in a new version of ZSNES, we can load the save state in and old one and see if it's a new bug or not. Otherwise we may have to do a lot more game playing than we'd want to.
May 9 2007 - NSRT 3.4, now with lots of hashing and even more accurate information! Go download it.
_____________
Insane Coding
_____________
Insane Coding
Hmm...
I'm sure that if enough people really want a snes9x to zsnes savestate conversion tool(and vice-versa) that somebody will probably just make a tool to do so.
If I knew enough about both types of savestates, and had a lot more time on my hands than I do now, I would prolly attempt it
.
If I knew enough about both types of savestates, and had a lot more time on my hands than I do now, I would prolly attempt it

Qb_Master