Help to Import .SAV Pokémon GSC from VBA to VC 3ds

Discussion in '3DS - ROM Hacking, Translations and Utilities' started by llvictorll, Mar 5, 2016.

  1. llvictorll
    OP

    llvictorll Member

    Newcomer
    23
    4
    Jan 31, 2015
    Brazil
    Hello guys.

    I need some help.

    I've been exporting saves from emulator VBA (PC) and importing them at the Virtual Console on my o3ds XL.

    First, I export an inicial save from my game at Virtual Console (3ds) with SaveDataFiler. Then I have a sav.dat, usually 32.768 bytes.

    Then i export a save from Visual Boy Advanced in File-> Export Battery file. I always get a file with 32.768 bytes. Replacing this file in the SaveDataFiler folder and importing at the 3ds worked fine until now.

    Iit worked for Pokemon Red, Blue, Yellow. But for Pokemon Gold, Silver and Cristal it never worked!
    The problem is that SaveDataFiler exports a sav.dat bigger then 32.768 bytes. It has 32.784 bytes.

    When i replace this sav.dat [32.784 bytes] for my battery on PC [32.768 bytes] and import on SaveDataFiler, it shows that the save is corrupted when I lunch the game.

    OBS: The automatic restore points is disable on Virtual Console.

    Is there anyone who could actually import a Pokemon GSC to VC? If yes, i'm gonna keep trying. Maybe looking for other CIAs versions.

    Thanks in advance
     


  2. SANNIC789

    SANNIC789 GBAtemp Advanced Fan

    Member
    704
    91
    Oct 3, 2015
    United States
    hi
     
    Last edited by SANNIC789, Mar 5, 2016
  3. llvictorll
    OP

    llvictorll Member

    Newcomer
    23
    4
    Jan 31, 2015
    Brazil
    Sorry, I dont get it. Can you help me?
     
  4. hug0-a7x

    hug0-a7x GBAtemp Fan

    Member
    384
    101
    Jan 19, 2013
    Brazil
    Use the option on visualboy advance "batery file" (File >> Export >> Batery File) and rename to file same used in virtual console.
     
  5. llvictorll
    OP

    llvictorll Member

    Newcomer
    23
    4
    Jan 31, 2015
    Brazil
    I did that. And it worked for Pokemon Red, Blue and Yellow because the sav.dat generated by SaveDataFiler has 32.768 bytes, same size that a file from VisualBoy Advance [Export->Batterry File]

    But for Gold, Silver and Cristal, the sav.dat generated by SaveDataFiler has 32.784 bytes. When I rename my save exported from VBA the 3ds says its corrupted. I think is because of the different size.
     
  6. rainparadesamurai

    rainparadesamurai GBAtemp Regular

    Member
    149
    66
    Feb 28, 2014
    United States

    You've tried deleting the secure value for the game before importing, right??
     
  7. ItsMetaKnight

    ItsMetaKnight GBAtemp Advanced Fan

    Member
    779
    153
    Mar 4, 2008
    Maybe the RTC value is being saved as well for GSC?
     
  8. Fishaman P

    Fishaman P Speedrunner

    Member
    3,241
    507
    Jan 2, 2010
    United States
    Wisconsin
    I wouldn't doubt it's extra RTC data in the save file. Ruby, Sapphire and Emerald appended RTC data to the save file.
    Just delete the last 16 bytes in a hex editor and try it.
     
    llvictorll likes this.
  9. llvictorll
    OP

    llvictorll Member

    Newcomer
    23
    4
    Jan 31, 2015
    Brazil
    Yes. I've also tried to use this cia: https://gbatemp.net/threads/release-jks-savemanager-homebrew-cia-save-manager.413143/

    And got the same result.

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

    And how can I delete this? Notepad? Please, can you help me?
     
  10. Fishaman P

    Fishaman P Speedrunner

    Member
    3,241
    507
    Jan 2, 2010
    United States
    Wisconsin
    Any hex editor. If you don't know what that is, find it on Google.
     
  11. llvictorll
    OP

    llvictorll Member

    Newcomer
    23
    4
    Jan 31, 2015
    Brazil
    I dont know if RTC means the game clock is being synchronize with 3ds, but it is. Just confirmed now. My clock in game is adjusted with 3ds clock.

    How this impact in my save import? Should i delete 16 bytes from the save I imported from visualboy advanced and them import in 3ds?
     
    Last edited by llvictorll, Mar 5, 2016
  12. Fishaman P

    Fishaman P Speedrunner

    Member
    3,241
    507
    Jan 2, 2010
    United States
    Wisconsin
    Exactly.
     
    llvictorll likes this.
  13. Traiver

    Traiver GBAtemp Maniac

    Member
    1,143
    1,203
    Aug 1, 2014
    Germany
    Pew! *Out of the bag*
    If you downloaded a normal version of a custom Pokemon GSC VC, the savefiler will not work for them. I already tested it. Just download one of the official eshop releases of blue red or yellow and decrypt plus extract the game. Then inject a GSC rom into it and rebuild the game. The safefiler will work with this then. I tried it with an GSC save editor and with an VBA savefile. Oh and you need to delete the secure data first.
     
    llvictorll likes this.
  14. llvictorll
    OP

    llvictorll Member

    Newcomer
    23
    4
    Jan 31, 2015
    Brazil
    I FINALLY GOT THIS WORKING

    Here is what i did:

    -> Used VisualBoyAdvance-M-2.0.0-beta2 to export a pokemon.sav -> Size: [32.816 bytes]

    -> Export a sav.dat with SaveDataFiler -> Size: [32.768 bytes]

    -> Open both files with a Hex Editor.

    -> Copied from the pokemon.sav file the hex BE0 to 8000 [File with 32.816 bytes]

    -> Pasted in the sav.dat in BE0 to 8000 [File with 32.768 bytes]

    -> Delete secure value

    -> Imported new save

    I had to adjust the clock in game after doing this.

    Thank you guys.

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

    But does your clock works? I mean, in game linked with 3ds.

    Mine is working fine now.
     
    xJoelituh likes this.
  15. Traiver

    Traiver GBAtemp Maniac

    Member
    1,143
    1,203
    Aug 1, 2014
    Germany
    Pew! *Out of the bag*
    Yes my ingame clock is working too.
     
  16. vree

    vree GBAtemp Regular

    Member
    163
    4
    Sep 12, 2005
    Belgium

    Could you make a guide for this?

    Got hex editor but can't find BE0. Maybe I'm using a horrible hex editor.

    And what is the secure value???
     

    Attached Files:

    Last edited by vree, Mar 6, 2016
  17. llvictorll
    OP

    llvictorll Member

    Newcomer
    23
    4
    Jan 31, 2015
    Brazil
    Actually, the iformation posted by Fishaman P is correct. Just delete the last 2 lines (16 bytes) from the save exported with VisualBoyAdvance-M-2.0.0-beta2-> Size: [32.816 bytes]

    The new save file should have exacly the same size of sav.dat from SaveDataFiler.

    Then replace that file, use SaveDataFiler to delete the security value R+X and import again.
     
  18. vree

    vree GBAtemp Regular

    Member
    163
    4
    Sep 12, 2005
    Belgium
    Yeah ok maybe if you used a hex editor before but when I search for those values I can't find anything. (See screenshot above).

    And screenshot of exported file in attachment
    And the exported file itself is smaler (unchanged)
     

    Attached Files:

    Last edited by vree, Mar 7, 2016
  19. llvictorll
    OP

    llvictorll Member

    Newcomer
    23
    4
    Jan 31, 2015
    Brazil
    The problem is that your exported save [ON PC] doest have 32.816 bytes, but 32.768 bytes.

    My guess is that you arent using the last version of VisualBoyAdvance-M-2.0.0-beta2, but old emulators, like I was when a wrote the first reply of this thread. The Old VisualBoyAdvance exported an save file of 32.768 bytes [wrong size for gold, silver and cristal, but ok for red, blue, yellow because the sav.dat of those games has 32.768 bytes as well].

    The exported save on pc [GOLD, SILVER, CRISTAL] should have 32.816 bytes. When you delete the last 2 lines, it should have 32.784 bytes, exacly the same size of sav.dat exported by SaveDataFiler on 3ds.

    The lines that you should delete:
     

    Attached Files:

    Last edited by llvictorll, Mar 8, 2016
  20. PedroKeitawa

    PedroKeitawa GBAtemp Advanced Fan

    Member
    845
    238
    Aug 15, 2015
    Italy
    Ok maybe i miss somthing, and sorry for introduce me in the discussion, but...is possibile import your save file from Pokèmon Red (emulator on pc) to the VC version? °_°