Hardware GCN MemCard Recover

GerbilSoft

Well-Known Member
OP
Member
Joined
Mar 8, 2012
Messages
2,395
Trophies
2
Age
34
XP
4,249
Country
United States
UPDATE: GCN MemCard Recover 0.2.1 is out! (after a 6-month delay... :V)
Download:

v0.2.1 is a bugfix release that fixes a few crashes and improves performance. There's also a new Russian translation (contributed by Egor305) and some more file definitions. There's also a fix for the database files being incorrect in the Windows build due to cmake stripping out variable names.

Save file database entries:
  • USA: 105 files
  • PAL: 59 files
  • JPN: 7 files
  • KOR: 0 files :(
  • Unlicensed: 1 file
  • Homebrew: 1 file

--- original post follows ---

In January 2012, I was expanding my GCN collection by getting some games I had on my backlog. One of the games I decided to get was Mario Party 4. So I get Mario Party 4 in the mail, put it in my Wii, and was greeted with the following screen:

GMPE01.format-memory-card.png


"Oh no!," I thought to myself. "All of my save files are gone!"

I went back to the Wii system menu and checked the Wii save file manager, and got the same error.

wii-system-menu.format-memory-card.png


I ended up reformatting the card in order to play Mario Party 4. :(

Now, I've done work with repairing and refurbishing PCs, and one thing that you learn while doing this is formatting a hard drive doesn't actually erase the data. It only erases the filesystem. I spent the next day looking for a utility to dump the raw data from a GCN memory card, and eventually found Ctr-Gcs-DacoTaco-Edition. I did a full raw dump and then opened it in a hex editor. On a hunch, I searched for the string "Sonic", since I had several save files from the various GCN Sonic games on the card.

okteta.gcn.card_dump.2012-01-13.png


There it is! The description matches what's displayed on the GCN and Wii memory card manager. It turns out that this description is actually part of the file data, and not the filesystem tables that are erased during formatting. All I had to do was reconstruct the directory entry by copying the 64-byte GCI header from another SADX save file and then copy the GCI file back to the memory card using ctr-gcs. I managed to recover all of my save files by doing this. (The blocks overwritten by the Mario Party 4 save were actually used by a file that was previously deleted, so I didn't lose anything there.)

While manual file recovery using a hex editor might be relatively easy to do for someone who's technically inclined, it still takes a long time, especially with larger memory cards. I started writing a utility to recover files from GCN memory cards automatically shortly after I recovered my files, but the project was put on hold for a while. I continued working on it around 2 weeks ago, and it mostly works now!

mcrecover.mcrecover-v0.1.png


Download links are at the top of the post.

NOTE: GCN MemCard Recover only supports recovering files from a corrupted filesystem. It is *not* capable of fixing individual save files - that is, if the files on the card are viewable normally but one game complains that its save file is corrupted, GCN MemCard Recover cannot fix it.

NOTE 2: Only files known to GCN MemCard Recover can be recovered. Currently, the database contains entries for 61 files (all NTSC-U). If you have files that aren't present in the database, I would appreciate it if you sent them to me so I could add them to the database.

I'd appreciate any comments or suggestions regarding the GCN MemCard Recover program in order to further improve the software.
 

_acid_

Well-Known Member
Member
Joined
Jul 18, 2010
Messages
197
Trophies
0
XP
278
Country
United States
can i suggest you tell people that it's only for the filesystem and not an individual file?
since, if u recall i made the mistake of skimming through and assuming it recovers individual saves
 

GerbilSoft

Well-Known Member
OP
Member
Joined
Mar 8, 2012
Messages
2,395
Trophies
2
Age
34
XP
4,249
Country
United States
so i can restore save files i lost due to formating? if so can you make a toturial?
That's exactly what this program does. (Note that if you've created new save files on the card since the reformat, some files may have been overwritten.) There's a quick tutorial in the included README file.

Also note that GCN MemCard Recover can only recover files that it knows about in its database (located in data/GcnMcFileDb.xml). If you have save files that aren't detected by GCN MemCard Recover, you can send me a dump of your memory card (or the individual files if the card wasn't reformatted), and I'll take a look at it.
 
  • Like
Reactions: jonthedit

Cyan

GBATemp's lurking knight
Former Staff
Joined
Oct 27, 2002
Messages
23,749
Trophies
4
Age
45
Location
Engine room, learning
XP
15,646
Country
France
I see your readme says it should work but might have unexpected result in Windows XP if not using SP3, so I tested it.
It works fine on XP SP2.

I don't have a corrupted MC, but I could detect deleted saves on my backup.
Too bad it can't fix individual game's saves, I have Luigi's mansion saying my save data is corrupted and don't know how to fix it (maybe edit the header? but there's probably a checksum to fix somewhere)
 

GerbilSoft

Well-Known Member
OP
Member
Joined
Mar 8, 2012
Messages
2,395
Trophies
2
Age
34
XP
4,249
Country
United States
Thanks for testing it on XP SP2 - I marked SP3 as the minimum because Qt 4.8 doesn't officially support anything earlier. I'll update the README in the next version.

Regarding Luigi's Mansion - the save file has a checksum using the "AddInvDual16" algorithm at 0x3FFC and 0x5FFC. This is the same checksum used by the memory card headers. If you replace the checksums in the file with the "Expected Checksums" listed in MemCard Recover, the files should be detected properly by the game, but they might do 'weird' things depending on what parts of the file were corrupted.
 

Cyan

GBATemp's lurking knight
Former Staff
Joined
Oct 27, 2002
Messages
23,749
Trophies
4
Age
45
Location
Engine room, learning
XP
15,646
Country
France
It didn't detect any checksum for luigi's mansion.
in fact all my savegames are marked as "unknown checksum algorithm" except for one recovered game.
Maybe it's because I'm on SP2, or because it's a rebuilt MC importing .gci?

I already completed the game, so it's not very bad if I can't recover it.
 

GerbilSoft

Well-Known Member
OP
Member
Joined
Mar 8, 2012
Messages
2,395
Trophies
2
Age
34
XP
4,249
Country
United States
Oh right, that's a known issue. Checksums are not detected for "regular" files on the memory card (that is, they're visible to the memory card manager normally).

You can try enabling the "Search Used Blocks" option and then rescan. This should pick up the file as long as it isn't fragmented (and since you just imported it into a new memory card image, it shouldn't be fragmented).
 

Cyan

GBATemp's lurking knight
Former Staff
Joined
Oct 27, 2002
Messages
23,749
Trophies
4
Age
45
Location
Engine room, learning
XP
15,646
Country
France
It found the checksum this time. It reports it as good.
Maybe it's an issue with the memcard ID, but I have only one Real & official card. I've backup'd/restored the save to the same card and the game says it's corrupted. I tried injecting it to a raw empty image and use nintendont but it was the same.

I was just curious to understand why, but don't worry I already completed the game so it's not a problem if I can't use my save anymore.
Thanks for your help.
 

GerbilSoft

Well-Known Member
OP
Member
Joined
Mar 8, 2012
Messages
2,395
Trophies
2
Age
34
XP
4,249
Country
United States
The easiest way to write a translation is to get a copy of the source code (either the .tar.gz or git: http://www.dusers.drexel.edu/gitweb/gitweb.cgi/~korth/mcrecover.git ), and use Qt Linguist (as part of the Qt 4.8.5 SDK or standalone, http://qt-apps.org/content/show.php/Qt+Linguist+Download?content=89360 ) to create a new TS file.

I created a blank TS file for zh_CN here: http://gerbilsoft.soniccenter.org/gc-tools/mcrecover/v0.2/ts/mcrecover_zh_CN.ts

Note that zh_CN is typically used for Simplified Chinese; if you're writing a Traditional Chinese translation, it should be changed to zh_TW.
 

kavid

Well-Known Member
Member
Joined
Sep 28, 2008
Messages
566
Trophies
1
XP
601
Country
Switzerland
i use Qt Linguist to translate .qm file to chinese。

1402111711f9b1b288810c5e6e.jpg
 

Attachments

  • mcrecover_cn.rar
    4.9 KB · Views: 457

GerbilSoft

Well-Known Member
OP
Member
Joined
Mar 8, 2012
Messages
2,395
Trophies
2
Age
34
XP
4,249
Country
United States
v0.2.1 is out (after being delayed for 6 months because of reasons). It's a bugfix release that fixes some crashes and improves performance, and there's a new Russian translation (contributed by Egor305). There's also a fix for the database files being incorrect in the Windows build due to cmake stripping out variable names.

For v0.3, I'm planning on turning GCN MemCard Recover into a full-fledged card manager. You will be able to format new card images and import GCIs, as well as drag and drop files from one card to another. By default, cards will still be read-only, due to its recovery functionality, but you will be able to change the mode to read/write. (Card images with corrupted headers or tables will not be switchable to read/write; you should extract the GCIs and create a new card image.)
 

jonthedit

Well-Known Member
Member
Joined
May 30, 2011
Messages
1,682
Trophies
0
XP
1,009
Country
Bangladesh
v0.2.1 is out (after being delayed for 6 months because of reasons). It's a bugfix release that fixes some crashes and improves performance, and there's a new Russian translation (contributed by Egor305). There's also a fix for the database files being incorrect in the Windows build due to cmake stripping out variable names.

For v0.3, I'm planning on turning GCN MemCard Recover into a full-fledged card manager. You will be able to format new card images and import GCIs, as well as drag and drop files from one card to another. By default, cards will still be read-only, due to its recovery functionality, but you will be able to change the mode to read/write. (Card images with corrupted headers or tables will not be switchable to read/write; you should extract the GCIs and create a new card image.)

Can't wait!
Let us know if it works out; I'll add that is a better alternative in my ARGC guide! :yaywii:
 

Leo Alves

Well-Known Member
Member
Joined
Dec 16, 2012
Messages
136
Trophies
1
Age
29
XP
360
Country
Brazil
I Played a japanese GC game and accidentally saved on my real memory card, and the Card was corrupted, i formatted it, lucky, the only save i lost is from Tomb Raider: Legend, others saves i already had a backup, but the program can't find Tomb Raider Legend save when i search for lost files, is this game on database?
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • Veho @ Veho:
    I only wish it was actually playable.
  • Veho @ Veho:
    There's a guy on the Tube of You that makes playable mechanical arcade games out of Lego. This could work on the same principle.
  • Veho @ Veho:
    Just a couple of guys taking their manatee out for some fresh air, why you have to molest them?
  • Veho @ Veho:
    Stupid Chinese shop switched their shipping company and this one is slooooooow.
  • LeoTCK @ LeoTCK:
    STOP BUYING CHINESE CRAP THEN
  • LeoTCK @ LeoTCK:
    SUPPORT LOCAL PRODUCTS, MAKE REVOLUTION
  • LeoTCK @ LeoTCK:
    THEY KEEP REMOVING LOCAL SHIt AND REPLACING WItH INFERIOR CHINESE CRAP
  • LeoTCK @ LeoTCK:
    THATS WHY MY PARTNER CANT GET A GOOTWEAR HIS SIZE ANYMORE
  • LeoTCK @ LeoTCK:
    HE HAS BIG FOOT AND BIG DUCK
  • LeoTCK @ LeoTCK:
    d*ck i mean*
  • LeoTCK @ LeoTCK:
    lol
  • Veho @ Veho:
    Mkay.
  • Veho @ Veho:
    I just ordered another package from China just to spite you.
  • SylverReZ @ SylverReZ:
    Communism lol
  • SylverReZ @ SylverReZ:
    OUR products
  • The Real Jdbye @ The Real Jdbye:
    @LeoTCK actually good quality products are dying out because they can't compete with dropshipped chinese crap
    +2
  • BakerMan @ BakerMan:
    @LeoTCK is your partner the sascrotch or smth?
  • Xdqwerty @ Xdqwerty:
    Good morning
  • Xdqwerty @ Xdqwerty:
    Out of nowhere I got several scars on my forearm and part of my arm and it really itches.
  • AdRoz78 @ AdRoz78:
    Hey, I bought a modchip today and it says "New 2040plus" in the top left corner. Is this a legit chip or was I scammed?
  • Veho @ Veho:
    @AdRoz78 start a thread and post a photo of the chip.
    +2
    Veho @ Veho: @AdRoz78 start a thread and post a photo of the chip. +2