Restoring Saves

Discussion in 'NDS - Flashcarts and Accessories' started by AlexMoron, Feb 17, 2008.

Feb 17, 2008

Restoring Saves by AlexMoron at 7:50 AM (1,010 Views / 0 Likes) 9 replies

  1. AlexMoron
    OP

    Newcomer AlexMoron Advanced Member

    Joined:
    Jul 31, 2007
    Messages:
    58
    Country:
    United States
    Alright, so I started using Rudolph's amazing backup tool. I was able to successfully rip a save from a game of mine and play the ROM with it (after some conversion). But right now, I'm trying to test out restoring of saves. Here's what I've done so far.

    I've started a new game on the R4 using a ROM. I played around a little, then left. I then took the .sav out, converted it using http://www.shunyweb.info/convert.php from R4 to RAW. This left me with an 8KB file. The actual save from the real game was 64KB. I tried restoring the ROM one to my actual game and it said it couldn't due to the size of the .sav being smaller than the game allowed.

    I want to know what I'm doing wrong. Is it impossible to restore an actual game with a .sav made from the R4? If not, how do I convert it correctly?
     
  2. kazumi213

    Member kazumi213 GBAtemp Regular

    Joined:
    Oct 16, 2006
    Messages:
    293
    Country:
    Spain
    You should indicate the specific ROM to get a more accurate answer. Anyway, if your R4 save is being trimmed to 8 kbytes when converted to RAW format, but you are sure the original card uses 64 kbytes saves, then just trim your R4 save manually. To do so:

    1. Open your R4 save in a hex editor.
    2. Use the "Go to" function in your hexeditor to jump to offset "0x10000" (maybe it just accepts 10000)
    3. Press CTRL+SHIFT+END to select all data from that point to the end of the file.
    4. Press CTRL+X to remove it.
    5. Check in the statuts bar of your hexeditor that the file size is "65536 bytes" (64 kbytes)
    6. Save the changes and try this save on Rudolph's
     
  3. AlexMoron
    OP

    Newcomer AlexMoron Advanced Member

    Joined:
    Jul 31, 2007
    Messages:
    58
    Country:
    United States
    Thanks much for your help so far. I've never used a hex editor. I just downloaded one and it didn't seem to work with the method you laid out here, so I'd like to know what hex editor you use or suggest I use so I can test this out.
     
  4. kazumi213

    Member kazumi213 GBAtemp Regular

    Joined:
    Oct 16, 2006
    Messages:
    293
    Country:
    Spain
    I use Hex Workshop v4.23. I also recommend UltraEdit. A free and usually recommended one is XVI32. The latter should allow to perform the indicated basic operations, but I haven't tested it.
     
  5. AlexMoron
    OP

    Newcomer AlexMoron Advanced Member

    Joined:
    Jul 31, 2007
    Messages:
    58
    Country:
    United States
    I'll check those out as alternatives to XVI32; I used that and wasn't able to select from one point to another to trim to 64KB.
     
  6. coolbho3000

    Member coolbho3000 GBATemp Kikkoman Naturally Brewed SoySauce Fanatic

    Joined:
    Apr 29, 2007
    Messages:
    2,095
    Location:
    Kikkoman Factory
    Country:
  7. AlexMoron
    OP

    Newcomer AlexMoron Advanced Member

    Joined:
    Jul 31, 2007
    Messages:
    58
    Country:
    United States
    Alright, so I trimmed the .sav, it loaded back on the original cart, but it seemed to just be initialized. Like, instead of working, it just gave up and erased everything. I then loaded my original save I ripped from it back on and it worked.

    I don't what I'm doing wrong. Looking at each .sav in the hex editor, they don't look too much different apart from the original .sav having stuff sporadically in random places while the R4 .sav had only what seemed like a header.

    EDIT: Huh. Well, I decided to try a different game this time. I backed up the game's save, started a game with the ROM (having the R4 create a save) played one level, made sure there was some progress on it, and quit. Opened both up in the hex editor to compare and cut where I needed to. Didn't think it was going to work but I tried anyway. Sure enough, it worked.

    Again, I have no idea what I was doing wrong. Maybe the old save didn't have the progress I remembered it to have. Maybe the R4 writes the saves of some games wrong. I haven't tested any bigger games in fear of totally screwing them up, but I will sometime in the future.

    Either way, thank you, Kazumi, for all your help.
     
  8. kazumi213

    Member kazumi213 GBAtemp Regular

    Joined:
    Oct 16, 2006
    Messages:
    293
    Country:
    Spain
    I doubt your R4 is creating corrupted saves, but it can happen. I've been dealing with a corrupted Megaman Pegasus save from a R4 with no luck so far, due to data being fragmented and spreaded beyond the original card save proper size (on your case it would be beyond the 64 kbytes mark). Maybe you could check whether your R4 non-working save has data other than FFs beyond offset 0x10000.

    Anyway, if you want I could check that non-working R4 save. Upload it somewhere and PM me the link.
     
  9. Shuny

    Member Shuny I'm in yr forum, reading yr postz

    Joined:
    Nov 15, 2006
    Messages:
    1,019
    Location:
    Somewhere in the world
    Country:
    France
    Savegames converter engine do an automatic detection for the RAW size.If the data of the savegames is stored in less than 8192 bytes it will detect it as a 8kb file. Maybe the detection is faulty ill check that later, Otherwise have a look at the main page for more information [​IMG]
     
  10. kazumi213

    Member kazumi213 GBAtemp Regular

    Joined:
    Oct 16, 2006
    Messages:
    293
    Country:
    Spain
    If you can fix that Shuny, it would be nice, but maybe it's just the used save limits (end of data offset) for some games increase as you progress in the game (with a max limit which is the original card actual save size). Hence correct RAW size could not be properly detected for all possible progress status by your converter based just on "used size" detection.
     

Share This Page