Antisavegame Restore / Secure Value Updater (PS, ACNL, PRW, SSB, XY, ORAS...)

Discussion in '3DS - ROM Hacking, Translations and Utilities' started by suloku, Sep 5, 2015.

  1. suloku
    OP

    suloku GBAtemp Advanced Fan

    Member
    863
    491
    Apr 28, 2008
    NOTE: svdt now suports antisavegame restore patching, so you should probably be using that instead of a windows tool: https://gbatemp.net/threads/svdt-save-data-explorer-manager.396562/

    UPDATE 13 september 2015: added information for Monster Hunter 4 Ultimate thanks to TamDanny.

    UPDATE 17 september 2015: project on github https://github.com/suloku/secure-value-patcher

    UPDATES and changelog: added version v2b
    Warning: Spoilers inside!


    IMPORTANT NOTE: PHYSICAL (CARTRIDGE) GAMES CAN BE BACKED UP AND RESTORED REGARDLESS OF THE SECURE VALUE. ANTISAVEGAME RESTORE IS ONLY USED IN DIGITAL VERSION OF THE GAMES (AKA ESHOP GAMES).


    What is the Antisavegame restore?
    Warning: Spoilers inside!

    I decided to make a new thread to centralize this particular matter that is updating the secure value to be able to restore old savegames.

    From the sources of DaBlackDeath's Pokemon Shuffle Secure value updater I've made a "universal" application that can work with any game, given we know where the secure value is stored.

    The secure value file is a plain txt file containing the offset where the secure value of the given game is stored. I've included the ones we already know for sure: Pokemon Shuffle and Animal Crossing New Leaf, and will include the rest when we find them.
    value2.png

    List of games known to use anti savegame restore and its location (Red = unconfirmed/unknown):
    • Pokemon Shuffle (savedata.bin): 0x2C
    • Animal Crossing New Leaf (garden.dat): 0x00
    • Super Smash Bros. 3DS (/save_data/account_data.bin, /save_data/system_data.bin): 0x10
      • Important: both files (/save_data/account_data.bin, /save_data/system_data.bin) have to be updated, as both hold the secure value at 0x10.
      • Note: the Demo uses the exact same files and offsets.
    • Pokemon X/Y (main): 0x65400
    • Pokemon ORAS (main): 0x75E00
    • Pokemon ORAS Demo (main): 0x5800
    Especial games that use anti savegame restore:
    • Pokemon Rumble World (00slot00 folder with 149 files): secure value is stored in 00main.dat, but since the file is compressed and needs to be decompressed for editing, the offset varies from file to file, also CRC32 in the header has to be updated after recompressing the edited file. It is always (or so it seems) at the end minus 10 bytes of the decompressed file: View attachment 24543
      • Compression: zlib level 9 compression.
    • Monster Hunter 4 Ultimate (user1, user2, user3): secure value is at each user file (unconfirmed) at position 0x112.
      • Each userX file probably needs patching for correct loading (untested).
      • Each userX file is encrypted using blowfish encription. A decripter/encripter is available here.
      • Currently looking for testers to confirm the information and create a patcher like rumble world's, also to add it to svdt.

    Since Pokemon Rumble world uses compression, I had to made a separate tool just for Rumble World that will take care of decompressing, updating secure value, recompressing, and updating CRC32 checksum:

    IMPORTANT NOTE ABOUT RUMBLE WORLD AND FTP TRANSFER: if you transfer your save trough ftbrony or similar, make sure your savegames are complete. Use the Rumblechecker included in RWSecureValue.zip, ftbrony tends to fail when transferring the rumble world savefiles, so you might end with incomplete files. Make sure everythings OK before atempting to update the secure value/edit your savegame with SciresM editor. Or just transfer trough SD card or the built in transfer tool in N3DS.

    Here are the manual instructions to edit Rumble World's secure value by using SciresM save editor:
    Warning: Spoilers inside!
     

    Attached Files:

    Last edited by suloku, Sep 23, 2015


  2. yodamerlin

    yodamerlin Bok bok.

    Member
    309
    162
    Apr 1, 2014
    Wow. Good job! I can see this being incredibly useful for loads of people! Looks really easy to use as well.
     
    Margen67 likes this.
  3. Jwiz33

    Jwiz33

    Banned
    2,654
    1,523
    Jun 5, 2014
    United States
    in the illuminati headquar—I have said too much!
    Great! Now I can get my Rumble World save back.
     
    Margen67 likes this.
  4. Asia81

    Asia81 In my Ecchi World <3

    Member
    4,972
    2,456
    Nov 15, 2014
    France
    Albi
    Secure Vale file

    Value, no?
     
  5. suloku
    OP

    suloku GBAtemp Advanced Fan

    Member
    863
    491
    Apr 28, 2008
    Whoops, will change that when we know the location of other secure values
     
  6. hug0a7x

    hug0a7x Member

    Newcomer
    38
    7
    Aug 23, 2015
    Brazil
    I use Offset(h) value 00065400 In Pokemon X e Y and works
     
    suloku likes this.
  7. suloku
    OP

    suloku GBAtemp Advanced Fan

    Member
    863
    491
    Apr 28, 2008
    Just sent you a pm to try to use that offset, well, good to know it works.
     
  8. EridiumMiner

    EridiumMiner GBAtemp Regular

    Member
    145
    25
    Aug 18, 2015
    Italy
    With this tool we can simply delete the secure value e and save, right ?
     
  9. suloku
    OP

    suloku GBAtemp Advanced Fan

    Member
    863
    491
    Apr 28, 2008
    Updated first post with confirmed Pokemon XY and ORAS secure value locations, also updated securevaluefixer.zip to fix a typo and include the files for XY and ORAS.

    No, this tool updates the savegame's secure value to the latest one using the latest savegame. There's no known way to delete the secure value (as with savefatafiler) in 9.5-9.9 firmware yet.
     
    Last edited by suloku, Sep 5, 2015
  10. EridiumMiner

    EridiumMiner GBAtemp Regular

    Member
    145
    25
    Aug 18, 2015
    Italy
    Oh, ok.
     
  11. hug0a7x

    hug0a7x Member

    Newcomer
    38
    7
    Aug 23, 2015
    Brazil
    Great Work
     
  12. Gocario

    Gocario GBAFail'd

    Member
    640
    560
    Sep 5, 2015
    France
    Bourg Palette
    I was wondering:
    If I have a Pokemon X game cartridge, I am playing it on my N3DS and I save.
    Then a secure value will be "synchronize" between my N3DS and Pkmn X, right?
    So, If I want to play Pokemon X on my other O3DS.
    The secure value won't correspond between my O3DS and Pkmn X.
    Will I be able to play?
     
  13. suloku
    OP

    suloku GBAtemp Advanced Fan

    Member
    863
    491
    Apr 28, 2008
    You just described the reason why the secure value isn't used for cartridge games. Yes, you will be able to, and that's what the "but it isn't used" phrase makes reference to.

    Also, another way to update the secure value is to transfer the digital copy savegame to a physical game cartridge, save in the physical game, then dump and transfer the save to the digital copy. All in the same 3ds, only problem: it needs both the physical and digital copies of the same game.
     
  14. Gocario

    Gocario GBAFail'd

    Member
    640
    560
    Sep 5, 2015
    France
    Bourg Palette
    I just noticed the "digital game".. Erm.. I'm blind...
    So, I don't have to worry about secure value with cartridge games, do I?
     
  15. suloku
    OP

    suloku GBAtemp Advanced Fan

    Member
    863
    491
    Apr 28, 2008
    No, you don't.
     
  16. ihaveamac
    This message by ihaveamac has been removed from public view by tj_cool, Sep 6, 2015, Reason: Requested.
    Sep 5, 2015
  17. MattPad

    MattPad Newbie

    Newcomer
    2
    0
    Sep 5, 2015
    Hello, I have a problem, when I try to use it, a message pops up saying: "The program can't start because Zlib1.dll is missing from your computer. Try reinstalling the program to fix this problem." Thanks in advance.
     
  18. suloku
    OP

    suloku GBAtemp Advanced Fan

    Member
    863
    491
    Apr 28, 2008
    What program, RWSecurevalue.exe?
    Here's the dll, put it in the same folder as the .exe file , I'll update the file in the first post to include it later: http://zlib.net/zlib128-dll.zip

    edit: I've updated the file
     
  19. MattPad

    MattPad Newbie

    Newcomer
    2
    0
    Sep 5, 2015
    Thank you so much, this worked perfectly.
     
  20. Ryuzaki_MrL

    Ryuzaki_MrL Furry Addict

    Member
    744
    719
    Jun 23, 2015
    Brazil
    I have a question: My brother wants to play Pokémon X and I only have one gamecard. I was planning on backuping my savefile and let him start a new one. Then, once he has finished the main game, I was going to backup his save and restore mine.
    The question is: Will this work or do I need to edit the secure value? (It's a physical european version of Pokémon X)
     
  21. suloku
    OP

    suloku GBAtemp Advanced Fan

    Member
    863
    491
    Apr 28, 2008
    Physical cards don't use secure value, you can backup and restore as much as you want.

    — Posts automatically merged - Please don't double post! —

    Super Smash Bros. 3DS secure value found thanks to ihaveamac:

    offset: 0x10
    files to update: account_data.bin, system_data.bin

    As you can see, this game has 2 savegame files, and both hold the secure value, so both files have to be updated.