How can I make save editor?

Discussion in '3DS - ROM Hacking, Translations and Utilities' started by NeoSlyde, Apr 6, 2015.

  1. NeoSlyde
    OP

    NeoSlyde GBAtemp Advanced Fan

    Member
    588
    187
    Mar 6, 2015
    Macau
    Morocco
  2. FAST6191

    FAST6191 Techromancer

    pip Reporter
    23,517
    9,335
    Nov 21, 2005
    Figure out save data contents. You can do this in a variety of ways.
    1) Step one is play the game long enough to get a save and see some things about it. Does it have multiple save boxes, does it not save something (unlikely these days but common back in the 8-16 bit era)

    The classic method is similar to how people find basic cheats. Here you save the game, do one small action (buy something, sell something, use an item) and save again. Check the save and see what has changed. Repeat until you have narrowed down the location holding what you want to edit.
    The harder method is to pull apart the game and run through the game's code to see how it handles the save files proper. Most do not do this for the whole save and instead when they are trying to find attack vectors (if you suspect the name value to have an exploitable overflow then you can disassemble the code and make sure), a tricky section, the internal hashes (covered shortly) or something like that.
    You can go active as well (as in attach a debugger and make it so the save will be holding the exact values you want) and you can simply search a save if you think you have a unique value worth searching for.

    2) Figure out any internal hashes. The 3ds has system wide hashes but there might still be some internal hashes, checksums, check values (this value is the sum of all the previous values, if it does not match then call it a corrupt save sort of thing) and such like.

    3) Figure out any system wide hashes. The 3ds can variously sign and hash saves as the system level. You need to sort this for 3ds games, the DS and GBA had no such thing. Not sure what premade tools exist but http://3dbrew.org/wiki/Savegames has the technical info behind it all.


    After this you get to program it. Hopefully you managed to inject some values in by hand to the data formats you figured out in 1). You get to make a program to do this for all the other nice people that want it.
     
  3. NeoSlyde
    OP

    NeoSlyde GBAtemp Advanced Fan

    Member
    588
    187
    Mar 6, 2015
    Macau
    Morocco
    nice i see :D

    I do comparaison with hexeditor or other?
     
  4. FAST6191

    FAST6191 Techromancer

    pip Reporter
    23,517
    9,335
    Nov 21, 2005
    A hex editor with a compare function is usually what I use for a basic compare.

    I dare say if you are asking that kind of question though it will not be the easiest for you to make a save editor for a 3ds game -- the 3ds is by no means a great case study in system security but it is not as easy as things were on older systems.