Identifying save files

Discussion in 'NDS - ROM Hacking and Translations' started by Dirtie, Oct 13, 2012.

Oct 13, 2012

Identifying save files by Dirtie at 12:45 AM (1,019 Views / 0 Likes) 4 replies

  1. Dirtie
    OP

    Former Staff Dirtie :'D

    Joined:
    Sep 9, 2003
    Messages:
    3,705
    Location:
    Zealer
    Country:
    New Zealand
    I was wondering if anyone knows if there's a relatively easy way of identifying which game a NDS save file belongs to. My micro SD became corrupted, not really sure how, but I managed to recover most of the files. The problem is that they don't have their original filenames anymore so I can't just restore them directly without renaming them with the correct game name.

    What I've done for a few games is run the game again to create a new save, then compare it in a hex editor against the recovered files with the same size. It's very tedious though, especially because while there may be some similarities there are a lot of different bytes. I could also go by trial and error but I think that would be even slower (plugging and unplugging my micro SD constantly to rename). I have something like 25 files 512KB in size which I'm assuming are all saves (I managed to identify the few 1MB ones). The save files between games don't seem to share any common structure.

    Anyway I wasn't sure if this was technically possible or not, but I thought I'd ask. I'm using a CycloDS Evolution if that's relevant at all. Lesson learnt = back up saves.
     
  2. Rydian

    Member Rydian Resident Furvertâ„¢

    Joined:
    Feb 4, 2010
    Messages:
    27,883
    Location:
    Cave Entrance, Watching Cyan Write Letters
    Country:
    United States
    There's no standard for including an ID, since the save format was never meant to be physically removed from the cart it's paired with, sorry.
     
  3. Dirtie
    OP

    Former Staff Dirtie :'D

    Joined:
    Sep 9, 2003
    Messages:
    3,705
    Location:
    Zealer
    Country:
    New Zealand
    Yeah that was my assumption. Oh well, back to it then I guess.

    Edit: I was just thinking, I could use an emulator to do it by trial and error right? Sorry I'm not really up to date on this stuff anymore, but is there an emulator that supports the same save format where I could quickly rename the save file and reset the game I'm testing (and speed up the intros if possible)?
     
  4. Kyuubi

    Newcomer Kyuubi Member

    Joined:
    Jun 24, 2007
    Messages:
    22
    Country:
    United States
    You might be able to figure some of them out by the file size, or by modification date. Though the recovery program probably overwrites the modification date...
    Well, there are 15511210043330985984000000 possible combinations, so you can't guess which are which either randomly... you can always use an emulator to test the saves - that way you don't have to constantly go back to the microSD card to try the saves. Just be sure to convert all of them to something the emulator can read.

    EDIT: There are actually (25+24+23+22...) = 325 trials. 325 renames followed by a confirmation through the emulator. You should have them all in 10 hours, 2 minutes per trial. If you spent 100 hours on those save files, it might be worth it... But this is the worst case, if you're lucky you can get games right the first time. I hope I'm not frustrating you XD


    Yes, exactly. I'm almost sure NO$GBA needs a conversion from your .sav files to its special .sav format. But you can just convert all your saves at once, and work with those. I think that if you set the emulator to have no sound, it can reach 200% speed, which would ease your work too.
     
  5. Dirtie
    OP

    Former Staff Dirtie :'D

    Joined:
    Sep 9, 2003
    Messages:
    3,705
    Location:
    Zealer
    Country:
    New Zealand
    File size doesn't really help me because they're almost all 512KB. Modification date might be slightly useful.

    I managed to modify the ini file for NO$GBA so it supports the same save format, and it easily runs at 200% which is good. Unfortunately it doesn't read the new save file if I replace it then reset, and commits changes/overwrites it if I open the game again using the file menu. So gotta close emulator->replace->open->run->check->etc.

    Might give Desmume a try.

    Edit: DeSmuME's "Import Backup Memory" function proved useful, managed to identify all but 7, and definitely got all the ones I care about, cheers dudes :yay:
     

Share This Page