[Development] Ocarina of Time 3D save editing

Discussion in '3DS - ROM Hacking, Translations and Utilities' started by daxtsu, Feb 2, 2015.

  1. daxtsu
    OP

    daxtsu GBAtemp Guru

    Member
    5,546
    3,956
    Jun 9, 2007
    Antarctica
    This is one of my favourite games on the 3DS, so I thought I'd take a peek inside the save file. I did find a good starting reference: http://cloudmodding.com/zelda/oot3dsave

    However, I can't figure out for the life of me how the save's checksum is generated. It seems to be made up of the last 4 bytes in the file (the last 2 are always 0, and the 2 before that vary, so it's likely a checksum; in addition, creating a new save file that differs only in the creation minute results in a differing checksum down there at the end, of course). I tried adding every byte together and seeing if the value generated by the game matched, and no dice. I tried adding every every two together (0x1234 + 0x5678 for example), as well as every four, but none of them match this blank save's value of 0x00002178. If anyone has any insight as to how the game might be figuring this value out, please let me know. I'd like to write an editor, but this is the last thing keeping me from generating "valid" saves.

    Attached is save00.bin, which was created 1 minute before save02.bin. Both are unedited and un-started USA saves.
     

    Attached Files:

    Margen67 likes this.
  2. gamesquest1

    gamesquest1 Nabnut

    Member
    GBAtemp Patron
    gamesquest1 is a Patron of GBAtemp and is helping us stay independent!

    Our Patreon
    14,161
    9,518
    Sep 23, 2013
    could ask them, this comment suggests they know how to calculate the checksum
     
  3. daxtsu
    OP

    daxtsu GBAtemp Guru

    Member
    5,546
    3,956
    Jun 9, 2007
    Antarctica
    I saw that, yeah. I'm just trying to figure out how to even match the valid checksum from either file in a short C program. I suppose I could ask over on ZSR, but I won't get my hopes up.
     
  4. NCDyson

    NCDyson Hello Boys...

    Member
    271
    113
    Nov 9, 2009
    United States
    it's a normal crc-16. You just zero out the last 4 bytes, then calculate.
     
    Margen67, cearp, daxtsu and 1 other person like this.
  5. daxtsu
    OP

    daxtsu GBAtemp Guru

    Member
    5,546
    3,956
    Jun 9, 2007
    Antarctica
    *Blink* That simple? Thanks, I'll give it a try.
     
  6. gamesquest1

    gamesquest1 Nabnut

    Member
    GBAtemp Patron
    gamesquest1 is a Patron of GBAtemp and is helping us stay independent!

    Our Patreon
    14,161
    9,518
    Sep 23, 2013
    yeah its all good.....amazing how simple stuff is when you know.......the question is how to know in the first place :P
     
    daxtsu likes this.
  7. daxtsu
    OP

    daxtsu GBAtemp Guru

    Member
    5,546
    3,956
    Jun 9, 2007
    Antarctica
    Thanks you two. I opened the save in HXD, zeroed out the last four bytes, then ran its CRC-16 checksum on it and voila, it matched save00's checksum. I'll definitely make a note of this once I start the editor.
     
    Margen67 likes this.
  8. NCDyson

    NCDyson Hello Boys...

    Member
    271
    113
    Nov 9, 2009
    United States
    that's exactly how I figured it out. sometimes the checksum doesn't include the empty space, sometimes it does.
     
    Margen67, daxtsu and gamesquest1 like this.
  9. AHP_person

    AHP_person GBAtemp Fan

    Member
    364
    390
    Nov 2, 2014
    United States
    -I'M BLIND-
     
  10. Dartz150

    Dartz150 GBATemp Official Lolicon Onii-chan™

    Member
    1,407
    845
    May 5, 2010
    Mexico
    On a Strange Journey
    Are people lazy enough for something like this? I mean, the point of every Zelda game in the first place, is to gather all the secrets and every item by your own means, that's what the experience is all about.

    But well, this is just me, some other ppople may find this interesting in order to have knowledge for another save editors, maybe not.
     
  11. Thirty3Three

    Thirty3Three Musician Member

    Member
    3,579
    1,967
    Mar 22, 2013
    United States
    Wherever you want me, baby.
    You're missing the point.
     
    Zidapi and cearp like this.
  12. daxtsu
    OP

    daxtsu GBAtemp Guru

    Member
    5,546
    3,956
    Jun 9, 2007
    Antarctica

    Knowledge, and once you've beaten the game a bunch of times, it's fun to give yourself items you're not supposed to have until later on, for example. Offline cheats can make a game feel entirely fresh.
     
    Margen67 likes this.
  13. Dartz150

    Dartz150 GBATemp Official Lolicon Onii-chan™

    Member
    1,407
    845
    May 5, 2010
    Mexico
    On a Strange Journey
    I only can think of using the hoover boots on the first dungeon or something like that, but you know, it also can be triggered by glitches, and is fun to do them as well.
    I will try cheats or modified saves in OoT 64 via emulator, this way I can understand your point better :D
     
  14. daxtsu
    OP

    daxtsu GBAtemp Guru

    Member
    5,546
    3,956
    Jun 9, 2007
    Antarctica
    I started working on an editor now that I have the CRC16 stuff figured out. The editor is pretty basic right now; it only lets you edit your current/max hearts, money, and name, but it does work and exports saves in SDF format (saveXX.bin). Once I have inventory editing done, I'll post more info and the actual editor.
     
  15. Apache Thunder

    Apache Thunder I have cameras in your head!

    Member
    4,116
    4,068
    Oct 7, 2007
    United States
    Levelland, Texas

    "Hoover" boots? I thought that company only made vacuums. They make boots now? I'm sure you meant "hover" boots though. :P
     
    Dartz150 likes this.
  16. NCDyson

    NCDyson Hello Boys...

    Member
    271
    113
    Nov 9, 2009
    United States
    that makes me want to do a rom hack with the item models changed slightly. Like the hover boots being little vacuum cleaners...
     
    Hashtastrophe likes this.
  17. gamerboy1995

    gamerboy1995 GBAtemp Regular

    Member
    215
    33
    Aug 20, 2011
    United States
    I would play it just for that.
     
  18. TidusWulf

    TidusWulf Real Aloha

    Member
    600
    233
    Jul 27, 2007
    United States
    Hawaii
    I wonder what would happen if you save edited Adult link to not be holding the Master Sword. I remember some wild glitches coming out of that back in N64 days.
     
  19. blinkzane

    blinkzane Panic at your moms house

    Member
    785
    239
    Jul 24, 2012
    United States
    Florida
    this can bring some awesome glitches out. hopefully do this for majoras mask soon
     
    Margen67 likes this.
  20. Apache Thunder

    Apache Thunder I have cameras in your head!

    Member
    4,116
    4,068
    Oct 7, 2007
    United States
    Levelland, Texas
    There's a menu bug where you can use Farore's wind anywhere you want (so long as there's at least one item in your inventory that can be used in the area you are in, so sorry, don't think you can do this trick while in places that disable all your items like the fishing pond. :( ).

    If you move the Farore's wind item to a different slot (usually on X or Y button) that a usuable item was in. (basically swapping them around), for a split second Farore's wind will be usuable. If you see it at full opacity and quickly gray out, then you know you can eventually use it if the timing is right. But if done in a area where you can't use any items at all (so that you can't swap it with an item that is usuable in that area), it will never flicker on after exiting the item screen. Thus why it won't work in places like the fishing pond.

    As soon as you hit B to exit back, you must hit the button that Farore's wind was moved to. If done soon enough you can activate it.

    Do this at some random place in the game to set your warp point. Then do the final boss battle with Gannon. When he knocks your Master Sword away, that's when you use the menu trick to warp away from the boss battle! Then you can see if the swordless link bug still exists in this game. I haven't finished the game yet (just beat the forest temple lolz), so I'm a far away from getting to the point where I can try this myself. :P

    Note that Adult Link and Child Link gets their own warp points, so no, you can't use this trick to warp Child link to a future adult link location if the warp point was set while as Adult link or if setting the warp with Child link and trying to warp to it as Adult Link.

    Unfortunately, they still remind independent of each other.

    EDIT: Apparently it is possible to warp out of the Fishing Pond. Turns out you can use Iron boots/Hover Boots there, and that's all you need, so it's possible to steal the fishing rod by warping out. ;)
     
    Margen67 likes this.