I'm intending to write a dat file for the Nintendo FDS system.
Unfortunately most FDS known dumps have an altered SRAM
Is there an utility to cleanse the SRAM (or better yet, to restore the original data before any save was done)
Thanks
Floppy disks don't contain SRAM, the saves are data written to the disks, so no you cannot cleanse the disk. The only way to get clean dumps is to redump untouched games (hard to detect without buying new games)
As expected I'll have to hack every single rom with hexed. and remove saved data. I'm halfway done thro it. The set will be a bit cleaner but it won't replace dump of sealed carts. Several bytes will probably be wrong but that's the best I can do for now.
Btw when possible I tried to use Nestopia to delete the saves but i'm even more confused now:
I loaded a saveless ROM of Hikari Shinwa - Palatina no Kagami (v1.1) in Nestopia and browsed a bit in the saving screen (just browsed, didn't even created a save), and Nestopia generated an IPS file and I don't understand the meaning of the altered bytes
screenshots of altered bytes can be found here
http://x.or.internet.free.fr/misc/hikari.zip
I'd be very grateful to anyone who could enlighten me
Ehrm, FDS games don't all save in the same place (if they had, you still wouldn't have the data to restore), a hex editor will get you nowhere unless you're just trying to put together a hack of a clean collection. Like I said, there is no way to determine a clean dump without dumping a brand new disk without saves. That may even mean dumping a brand new disk before it's played because the game can alter the disk at any time unless you write-protect it.
You get an IPS file whenever anything is written to on disk, whether it's save data or otherwise. According to BT's doc, some games have a copy protect feature where the number of files on disk is larger than the file count (that is, the byte on disk that says how many files are present is less than the actual number). These games would write to disk to change the file count, then reload the disk in order to get the extra data, then change the file count back to the smaller value. This is a form of copy protection because some copiers use the file count presented on disk and assume that's all there is without scanning the disk for more files.
There are probably other reasons why a game might write to disk that don't have to do with saving, but that's the one I know of personally.
As for cleaning out a disk, you may be able to find where saved data is located on disk by monitoring what the game does at runtime, seeing where in RAM it looks when checking for saved game data, and then looking at the FDS image for a file that loads to that location. Be careful though, as there may be several files involved here instead of just one. As for cleaning it out, that's a whole different issue - simply setting all data to zeroes (for example) will robably not work, as some games expect very specific values in certain areas in order to work properly. If one were to reverse-engineer the game in full and analyze how everything is used, it might be possible to determine possible default values for each byte in the save game data, but that's the best one can do - you cannot restore the true starting condition of the game.
Having said all that, I would imagine that if you were to (within the game itself) erase every file and verify that there are no lingering effects (such as unlockables that appear after a game is beaten), that would be sufficiently close enough to the original condition (although certainly not in the true original state, as often erased games aren't really erased - they are just removed from the list of available saved games).
I should point out that some games don't let you erase the save "files" such as Doki Doki Panic and IIRC Metroid.
Firstly thanks for the replies
I am aware that by cleaning the saves, I probably won't get a ROM which match a sealed cart data. But as mentionned before that's the best we could get.
I was just looking for help to figure out the meaning of the altered bytes in order to understand a bit better (hopefully) how the system alter a sealed cart. But oddly, even mcfly80 (nestopia author) doesn't seem to have a clue.
I suppose it varies from a program rom to another and there is no general behavior of the system when it writes the saves.
bump
no one can help here?
There is no way to automagically restore games to their clean state, period.