I want to help my friend recover Nintendo DS/3DS save files that were stored on a MicroSD used within an R4i. When unplugging the card from his PC, he was unlucky enough that Windows decided to start flushing changes to the FAT as it had already turned off the display, thus having him think it was already shut down (and thus save to remove).
Now he has a broken FAT on his microSD. Using ddrescue
, I already created an image of the card and used photorec
to recover most of the files. Now, Nintendo DS ROMs were recognized, but not their corresponding savefiles, which is an issue because that is what we are actually after, since redumping the ROMs is the smaller issue and probably saver than relying on a recovery tool to properly retain the ROMs (though I haven't verified them yet, actually).
Is there a method by which I can recover specific files by either their magic number or geometry? For instance: a Pokémon Platin save file shows these characteristics:
$ file Pokemon\ -\ Platin-Edition\ \[EU\ GER\].sav
Pokemon - Platin-Edition [EU GER].sav: data
$ wc Pokemon\ -\ Platin-Edition\ \[EU\ GER\].sav
64 270 524288 Pokemon - Platin-Edition [EU GER].sav
Since the stored data of a regular Nintendo DS is actually just it's SRAM, thus it does not have the same "header" all the time, all saves from the same game have a pattern. I wager the belief that the same applies to 3DS. Here is another save from a 3DS:
$ file Pokemon\ -\ Sacret\ Heart\ \[USA\].dsv
Pokemon - Sacret Heart [USA].dsv: data
$ wc Pokemon\ -\ Sacret\ Heart\ \[USA\].dsv
0 15 524410 Pokemon - Sacret Heart [USA].dsv
(I only booted the game once, there is nothing more in this save yet.)
Is there a tool that I can feed patterns to, that goes through an image dump of the microSD and finds matching files and extracts them? Since they are "unique", I am sure most generic file recovery software won't do.
Thank you in advance and have a great day!
TestDisk
is one of the best file recovery applications;PhotoRec
could also be used to search for a specific file type.