Homebrew Corrupted (sort of) save file from Pokemon Emerald on 3DS VC

BarrelRoll34

Member
OP
Newcomer
Joined
Jul 23, 2018
Messages
10
Trophies
0
Age
25
XP
129
Country
France
Hello,

So a while ago I downloaded this CIA of a french version of Pokemon Emerald on my 3DS, I didn't make it myself with any kind of cia creation tool kit, whatever.
I played the game for some time now, perfectly working, just some minor bugs that seem to be known, like the "save file is corrupted" message before loading the game, or the hall of fame that doesn't want to show up on the pc.
Well the thing is that I wanted to edit the save so I can add some events on it, and afterwards be able to transfer my Pokemons to Diamond version thanks to some PC emulator. But when I export the save file with GodMode, no emulators want to load the save, and tools like PkHEX say that the save file is corrupted or is not compatible. It is a 64 kb file, I uploaded it if anyone wants to try things...

Can I fix this issue or is my save is unexportable because of the shitty emulated game I have on my 3DS ? Thanks in advance.

Update: I read somwhere i could just add 00 to make the save file 128kb and readable, so I did and I made progress, PkHEX does recognize some parts of my save (only the boxes) but still gives me errors and won't load anything else, but the save still doesn't work on emulators.
 

Attachments

  • 0004000000777400.gbavc.rar
    4.5 KB · Views: 218
Last edited by BarrelRoll34,
Joined
Jan 1, 2018
Messages
7,292
Trophies
2
XP
5,946
Country
United States
You need to extract the *.gba rom from the Virtual Console. Saves only work for the exact rom they're tied to.

What you want to do is dump your game in *.cia format with GodMode9, mount it as an image, and extract the code.bin file. Rename the code.bin as a *.gba format and run it on desktop mGBA emulator with your save.

It may or may not work as VC injection changes the original source rom.

As for instructions on how to do this, familiarize yourself with GM9 usage.
 

BarrelRoll34

Member
OP
Newcomer
Joined
Jul 23, 2018
Messages
10
Trophies
0
Age
25
XP
129
Country
France
I extracted my .cia thanks to HackingToolkit9DS and got a file about the size of the rom called DecryptedExeFS.bin which i changed the format to .gba, but emulators won't load it. I got other .bin files that are less than 10 kb, but no code.bin .

Edit: Same thing when I try to mount it directly in GodMode9, no code.bin
 
Last edited by BarrelRoll34,

Sir Tortoise

Well-Known Member
Member
Joined
Jan 5, 2016
Messages
149
Trophies
0
XP
1,313
Country
The problem here is that you're loading a 64kb save into a rom that is programmed to use 128kb saves. This can be fixed, but it'll be easier just to swap to using 128kb saves. GBA VC games used to have a max of 64kb, but we've since found ways to use 128KB, so we'll want to get a new .cia that uses 128kb saves, and convert your 64kb save file.

Get the Universal Injector here. It's fairly easy to use, select your French .gba rom file, and fill in the information, ensuring that 128kb saves are selected. It should create a new .cia file that you can install.

Now you need to convert your 64kb save to inject into the new .cia game. I've already properly converted your save file, but the way I did for future reference was to hexedit the rom to support 64kb saves, load it into an emulator, and change the emulators save type mid-game, before saving twice ingame and exporting the save file. Replacing all values in the rom between the sequences D0888D8342 and 2410491068 with 00 makes it support 64kb saves. You won't need to do that if the save files I've linked work.

Make sure the NEW .cia game is the last one you ran and inject the 128kb save as normal. Confirm it worked by loading and saving on the 3DS, then delete the old .cia installed.

I also made an attempt to fix the RTC, but my knowledge of that is shakier so I've linked another save file you can try. Both are identical, but the second one *might* have the RTC working. Inject that one if RTC wasn't already working with the first. A-Save is a gen3 editor that supports the RTC, so fiddle with that if my way doesn't work.
 

Attachments

  • Saves.zip
    17.4 KB · Views: 233
Last edited by Sir Tortoise,

BarrelRoll34

Member
OP
Newcomer
Joined
Jul 23, 2018
Messages
10
Trophies
0
Age
25
XP
129
Country
France
Jesus christ you truly are someone competent thank you very much.
So I had already made a CIA with my working french rom with the injector tool you posted, so now I injected your save, and it worked.
Juste one change, I don't have the "save corrupted" message anymore, but now I have a message which indicates that the battery is dead, so I think RTC wasn't fixed, but that's ok I'll maybe give it a try myself.
Thanks again

EDIT: My bad, I didn't make the CIA well, so I made another one and made sure I checked the RTC support, I now have no messages before loading the save. That's it thank you
 
Last edited by BarrelRoll34,
Joined
Jan 1, 2018
Messages
7,292
Trophies
2
XP
5,946
Country
United States
I extracted my .cia thanks to HackingToolkit9DS and got a file about the size of the rom called DecryptedExeFS.bin which i changed the format to .gba, but emulators won't load it. I got other .bin files that are less than 10 kb, but no code.bin .

Edit: Same thing when I try to mount it directly in GodMode9, no code.bin

Small mistake. The file is called .code in GodMode9. Also, HackingToolkit9DS requires your *.cia to be encrypted first or else it won't dump your code file.

This method is employed if you don't have the original source *.gba since you mentioned downloading it pre-inject as a cia.
 

bigtukker

Member
Newcomer
Joined
Feb 7, 2010
Messages
24
Trophies
0
XP
59
Country
Netherlands
The problem here is that you're loading a 64kb save into a rom that is programmed to use 128kb saves. This can be fixed, but it'll be easier just to swap to using 128kb saves. GBA VC games used to have a max of 64kb, but we've since found ways to use 128KB, so we'll want to get a new .cia that uses 128kb saves, and convert your 64kb save file.

Get the Universal Injector here. It's fairly easy to use, select your French .gba rom file, and fill in the information, ensuring that 128kb saves are selected. It should create a new .cia file that you can install.

Now you need to convert your 64kb save to inject into the new .cia game. I've already properly converted your save file, but the way I did for future reference was to hexedit the rom to support 64kb saves, load it into an emulator, and change the emulators save type mid-game, before saving twice ingame and exporting the save file. Replacing all values in the rom between the sequences D0888D8342 and 2410491068 with 00 makes it support 64kb saves. You won't need to do that if the save files I've linked work.

Make sure the NEW .cia game is the last one you ran and inject the 128kb save as normal. Confirm it worked by loading and saving on the 3DS, then delete the old .cia installed.

I also made an attempt to fix the RTC, but my knowledge of that is shakier so I've linked another save file you can try. Both are identical, but the second one *might* have the RTC working. Inject that one if RTC wasn't already working with the first. A-Save is a gen3 editor that supports the RTC, so fiddle with that if my way doesn't work.

Hey, I've seen this fix everywhere, but I can't for the life of me find these strings. Am I using the wrong rom?
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
    Xdqwerty @ Xdqwerty: