Dolphin, the GameCube and Wii emulator - Forums

Full Version: Corrupted GameCube memory card saves when restoring... And I know why...
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I was playing Japanese Zelda Twilight Princess and, when I tried to run the game in dolphin with my dumped save (from GC with GCMM) by restoring it, Dolphin restored it corrupted.

I've done some research with other saves of other games that I managed to successfully restore and noticed that game saves gets corrupted when they have the "Description Strings Offset Value at 0x3C" with a value different than 00 00 00 00. (Thanks to "Yet another Gamecube documentation book, I've learned the GCI header structure there."). The corrupted restores happens in both Dolphin and GCMM when that value is different to 0.

I can only run homebrew on Gamecube or Wii in GC mode. I don't have a modded Wii.

Could this discovery allow a fix to properly restore those game saves in Dolphin Memory cards?
If you hex edit the GCI before importing it into Dolphin, does the save work?
I've tried to edit the 0x3C by setting it to zero, I wonder why I didn't tried this before. However there are two kinds of errors that Dolphin does. One which is the one I still get is that the game doesn't recognize the file exists. The other error which I am trying to get is when the game recognizes the game file but says it's corrupted.

I think is this 0x3C data because I made a backup of the game with GCMM, then restored it to a MC, it was corrupted, I made a backup of the corrupted one and, hex edited both by taking off the header and leaving only game data. 7-zipped both and when I opened the 7z file, both files had the same CRC, which means the header is the only one who got corrupted and the 0x3c was corrupted, by pointing to FF FF FF FF. I know this doesn't have nothing to do with Dolphin but I made the same process with Dolphin and not everything I made was necessary. The save file got corrupted when Dolphin erased everything by putting 00 from offset 0x2040. In the Zelda TP JP save the 0x3c value is 00 00 20 00, so the descriptions strings are in offset 0x2440. Isn't those numbers by some way related?

Now I will try editing and restoring with GCMM, to see if it succssefully now restores data and, I will have to try hard to get Dolphin do the corruption error which may lead to successfull game save restore.
Update: Noticed Dolphin does restore well the game save when the "there's no game file" error happens (because I made the "remove headers to see CRC process"), which means there may be some error that may not be related to the memory card manager at all, but related to emulation itself.

This doesn't only happens with GCMM dumped saves. If I try it with Dolphin emulator made saves and try to export, then import again they aren't loaded by the game (Unless you have deleted the same game file before restoring, restoring on a MC that didn't had it will not work).

By the way, current revision 7128 and some others before this one can't run Zelda TP JP, emulator crashes when attempting to run.
does the game recognize the save with a full raw dump of the memcard? (in dolphin)

just to verify, you are restoring to a sjis formatted memory card for testing with dolphin?
I don't have a GC application that can dump full raw memory card. The only one that have worked for me was GCMM. I've tried one named "sdmc" but didn't work. I only got totally corrupted saves and full raw backups of 1kb in size.

And, how can I format a MC in SJIS. I attempted to restore the save on a MemoryCardA.JAP.raw MC. Isn't that one SJIS formatted. I've tried activating an option that said it will use the JP rom font, but didn't worked.
I will upload my memory saves for Zelda TP JP.
unfortunately i dont own ztp (j) Sad
ctr-gcs will do full memcard backups using bba+pso on gamecube
as long as that memory card was formatted by a ntsc-j game and not a renamed memorycardA.USA / EUR file it should be sjis
to verify you can check the BE16 at 0x24-0x25
sjis = 1 ascii = 0

if you want a new formatted sjis card give the memcard manager the name that you want the memcard to have (it must not exist)
it will ask to create and ask format asci/sjis
This is crazy.

First I let the game create a new MC, by formatting it.
Second I restored the save and the text was unreadable (ASCII formatted?).
Third I created a new MC and restored save. Japanese characters can be read (SJIS).
Four. Game told me MC was corrupted, formatted, and made new game data.
Finally I opened the MC in MC manager and found it was ASCII formatted!

Reason: The emulated console wasn't being emulated as NTSC-J.

I checked the "Set console as NTSC-J (I think it says something like this)" and attempted restore again, MC was SJIS formatted now.

The game can't find the file and creates one new.

I don't think I may be able to get bba+pso for using ctr-gcs. I'm going to wait for "Swiss" when it comes with the Memory Card Manager feature.

I'm going to try hex-edit the 0x3c value to see if GCMM can restore it without corruption. I'm afraid the game is designed to know if the file was copied by unofficial methods.
If the game where the problem maybe a fix would be to restore the save without changing anything in the header.