-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
What is the save file format? #20
Comments
It's somewhat of a cut-down version of a full savestate format from a fork of 1.2, thus why it starts so far into the address space. This is the portion used in 2.0:
I've attached some example saves from an ED64. |
Thank you for this! Looking at the example saves you provided (and the one I made myself, also on an ED64), it looks like that signature you mentioned of Then when converting to the Neon format, it looks like I can just pad with Thanks again for your help and I'm looking forward to adding this to the site! |
Yes that should be the same for any method of running Neon64 2.0. The AA is just what the ED64 initially fills SRAM with, 2.0 doesn't look at the memory outside of 0x10000-0x1200F at all so it shouldn't matter what it is. I might want to change this format, though, since it doesn't make a lot of sense. I looked back over the "with savestates" fork (the SRAM save stuff is in 64drive.inc), it looks like I screwed up my intended backwards compatibility with that. It expects the header at 0x0 and the footer at 0x2010 for a normal battery save from 0x8-0x2007; for a complete save state it instead puts the footer at 0x8000+0x7E60. I was thrown off because there's a different in-memory layout, but I thought I'd tested it... might have been fooled because they don't write to the same regions so there might have been old data at that location. |
Re: SRAM size, Neon64 doesn't support any size other than 8KB, so I wouldn't recommend searching for the footer. If I eventually support different sizes, I'll change the header so the size is stored explicitly. It is pretty rare to have a different size, usually it's because there's an EEPROM instead of battery-backed RAM, the most common examples are the Bandai FCG boards, none of which are supported in Neon64. These are only specifiable with a field in the the NES 2.0 header. |
Okay awesome, this all makes sense -- thank you! I'll just hardcode the SRAM size, and throw a "file is not in the correct format" error if the header/footer aren't found. And I'll pad with If you do decide to change the format, please keep me in the loop! I'm happy to add logic to detect and convert from both an "old" and "new" format, and then maybe just convert to the "new" format. I did that for files from the Mega SD Genesis flash cart, since they changed their save format somewhere along the line with a firmware update. And, thank you for the info about EEPROM saves -- I didn't know they had those on NES. I should go and do some tests with those games on different flash carts/emulators. |
For my own notes here's the non-8K sizes I've found for licensed games, searching through the Nesdev wiki, a no-intro romset, and NesCartDB: Serial EEPROM
Battery-backed RAM
This doesn't include other ways of saving, for instance battery backed CHR-RAM and Namco 163 wavetable. |
Awesome, thank you! That's super valuable and I'll add that to my notes for new tests to add -- especially Startropics 1 & 2! |
I've added support for this to the site! Implementation: https://savefileconverter.com/#/flash-carts Thank you again for your help! |
Hello, I'm the author of savefileconverter.com (https://github.com/euan-forrester/save-file-converter) and I was hoping to add support for Neon64 save files.
I'm not very familiar with assembly, so I wasn't able to get too much information from looking at the code other than that there appears to be a header and footer attached to each file?
Would it be possible to please explain the format so that I could add support for converting to/from these files?
Thanks very much!
The text was updated successfully, but these errors were encountered: