Dolphin, the GameCube and Wii emulator - Forums

Full Version: Fix a Corrupt RAW Memory Card Dump?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3 4
(02-23-2012, 07:47 AM)MountainDrew Wrote: [ -> ]How are you editing the save files? I do not know much about memory card data or hex editing, but if it is something I could learn to do, I'd like to try it on my F-Zero and Pokemon XD data. If it is easier to do than explain, could I send you my saves?

I am trying to write some code to read and write memory card data as a way of learning C++. It's still a CMD line app and it's a bit rough at the moment, and I have to modify the code for each different memory card file. The format of a memory card file can be found in YAGCD and in Dolphin source code, but the thing you need to remember if you are going to edit a file is that there are some simple checksums that need to be recalculated (all this can be found in the Dolphin source).

I am playing Pokémon XD now and if you upload a memory card dump (any format) I'll see what I can do tomorrow. I am playing the EUR version but I can probably switch to and from the US version without a problem. I could take a look at the F-Zero save too but I still haven't got the game to test it with.
(02-06-2012, 02:21 PM)LPFaint99 Wrote: [ -> ]Open dolphin/user/gc/sram.raw in a hex editor. Bytes 0x20-0x2C will be the flashid for slot A
bytes 0x2C-0x37 will be the flashid for slot B

I finally got Daco's version of ctr-gcs to work (yay!) and used it to make a dump of an official 59 block Memory Card (formatted on a PAL system). I renamed it for Dolphin slot A EUR and loaded a PAL game to get the SRAM but I get a strange result: bytes 20-2C are 'DOLPHINSLOTB' which I didn't use, but they should be the flashid for slot A, shouldn't they? Here's a hex view:

[attachment=7447]

(02-27-2012, 05:13 AM)HomelandReloaded Wrote: [ -> ]
(02-06-2012, 02:21 PM)LPFaint99 Wrote: [ -> ]Open dolphin/user/gc/sram.raw in a hex editor. Bytes 0x20-0x2C will be the flashid for slot A
bytes 0x2C-0x37 will be the flashid for slot B

I finally got Daco's version of ctr-gcs to work (yay!) and used it to make a dump of an official 59 block Memory Card (formatted on a PAL system). I renamed it for Dolphin slot A EUR and loaded a PAL game to get the SRAM but I get a strange result: bytes 20-2C are 'DOLPHINSLOTB' which I didn't use, but they should be the flashid for slot A, shouldn't they? Here's a hex view:

Sorry, decimal -> hex fail and/or having a card formatted by slot a "plugged into" slot b

slot A is a 20 (0x14) through 31 (0x1F)
slot b is 32 (0x20) through 43 (0x2B)
Thank you for the reply.
Hey, I know I took awhile to respond, but if you still have a moment and are willing to help me, I've uploaded my F-Zero GX and Pokemon XD Saves in RAW format. If it works for F-Zero GX the same way as it did for Pokemon XD than you'll have found the long sought-after solution to these copy protected saves.

Thanks for your time,

-MD
Here are the unlocked saves in GCI format. I'll let you try importing them onto the unofficial memory card file in Dolphin because I haven't got the US versions of the games (just PAL) so I will not be able to test them.
[attachment=7474][attachment=7473]

EDIT: I've just noticed that your unofficial memory card is quite full. It has 67 blocks free but Pokémon XD uses 43 blocks and I don't think there is room for the unfragmented save. If Dolphin can't handled fragmented saves then you'd better try importing them with the other MemoryCard Manager utility.
Hey, thanks for the quick reply. It seems like you have the Pokemon XD save figured out. It imports to new memory cards just fine. I'm going to use the Wii Menu in Dolphin to copy it to the unofficial card and then try the restore from there. F-Zero, on the other hand still knows it's on a different memory card and refuses to load without deleting the save, so there must be some other layer of protection on it.

Thanks again.

-MD

EDIT: As expected the Pokemon XD Save restored properly to the real unofficial card and can now be copied to its original official memory card. Thanks! (F-Zero will not work even when copied to its original card)
Thanks for the feedbacK. I'll have to take another look at F-Zero GX: maybe it is locked to its auxiliary files? (garage data etc), or maybe it stores the original card id in the game save.
Yeah, the F-Zero save must have a number of security features. I had heard that it might store the block that it starts on in the save, so I tried taking using a blank, freshly formatted dump of the card the save was originally on and adding saves in order to get the F-Zero to start on the same block as it does in the old RAW dump. (So the card ID should be the same and the starting block as reported by Dolphin's memory card manager are the same) However, still no luck. Perhaps the time the save was created is stored somewhere?

-MD

EDIT: I guess I should mention that the F-Zero save on the card by itself I uploaded does not have the garage, replay or emblem data and still works fine with Dolphin. All other kinds of data the F-Zero game makes is not copy protected either. (Garages containing machines or unlocked parts can even be copied to games that do not have these parts/machines unlocked.) Only the 'Game Data' save which contains the data for the excruciatingly hard Story Mode is copy protected. Which sucks, because the one game save I can no longer use on my Gamecube was, by far, the hardest one to complete.
I took another look at F-Zero today and found out the following, if I did not make a mistake somewhere:

It doesn't mind if the file permissions are changed;
It does mind being moved to another memory card (even if file permissions allow);
It doesn't mind if the file entry number (file order) on the card is changed;
It doesn't mind if the block positions are changed;
It does mind being restored to the original card if the card has been formatted since.

That gives me something to go on: I guess it's looking at the card ID (but not necessarily the physical card ID).

UPDATE: The game is checking something in the card header section; if this section is edited to match the original card header, then it is possible to restore the save to a card. Perhaps it is feasible to find out where the card header info is stored in the save file and change this instead.
Pages: 1 2 3 4