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,754
Trophies
4
Age
45
Location
Engine room, learning
XP
15,644
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,754
Trophies
4
Age
45
Location
Engine room, learning
XP
15,644
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,754
Trophies
4
Age
45
Location
Engine room, learning
XP
15,644
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
575
Country
Switzerland
i use Qt Linguist to translate .qm file to chinese。

1402111711f9b1b288810c5e6e.jpg
 

Attachments

  • mcrecover_cn.rar
    4.9 KB · Views: 455

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
  • Xdqwerty @ Xdqwerty:
    also im gonna finally install the steam client
  • BigOnYa @ BigOnYa:
    Then uninstall it five minutes later, jk
    +1
  • Xdqwerty @ Xdqwerty:
    ok steam clint still works for some reason
  • Xdqwerty @ Xdqwerty:
    client*
  • Xdqwerty @ Xdqwerty:
    my steam friend id is 1625764420
  • Xdqwerty @ Xdqwerty:
    good night
  • BigOnYa @ BigOnYa:
    Nighty night
  • Sonic Angel Knight @ Sonic Angel Knight:
    Darkness is my friend, I become invisible in the night.
  • Sonic Angel Knight @ Sonic Angel Knight:
    Best camouflaged
  • Psionic Roshambo @ Psionic Roshambo:
    I fear not the dark... the darkness fears me... lol
  • BakerMan @ BakerMan:
    shoot, i'll send you a friend request ig
  • K3Nv2 @ K3Nv2:
    This Facebook?
    +1
  • BigOnYa @ BigOnYa:
    Playing pool alone is pretty boring...wifey out of town tonight. Prob over at K3nv2's house again.
  • K3Nv2 @ K3Nv2:
    She tried thank god for ring
    +1
  • BigOnYa @ BigOnYa:
    Did you know they made black chalk, i had no idea but luckily my man gave me some for free, cause my felt is black.
    2eb22a39-4fda-4594-8b11-da4942b24075_1500x1500.jpeg
  • K3Nv2 @ K3Nv2:
    Race
  • HiradeGirl @ HiradeGirl:
    Hiya
  • GameGenieLabs @ GameGenieLabs:
    oh dear. making codes for nes is kinda stressful. i'm trying to think of cool ideas that haven't been thought of before. it's hard to be original, and i don't wanna make codes that already exist!
  • GameGenieLabs @ GameGenieLabs:
    I may make a post asking for code ideas, and hopefully that would make others happy :)
  • GameGenieLabs @ GameGenieLabs:
    Also, my ADHD keeps me from sleeping, and It bothers me lol
  • GameGenieLabs @ GameGenieLabs:
    Anywho, I've been using my modded Wii to play a few games here and there, and finally installed a custom Wii theme thanks to Larsenv helping me in a call (I have a family edition, and I don't wanna brick the nand since I can't restore it) Went with the basic "Black" Theme, since I'm a huge fan of dark themes, and it's less of an eyesore at night
  • GameGenieLabs @ GameGenieLabs:
    Larsen also helped me with my Dazzle setup, since the drivers for my model weren't online. I also helped dump that DVD with it, since I had a DVD drive.
  • GameGenieLabs @ GameGenieLabs:
    And now pinnacle studio received a new update, and reset my my KEY, and he's trying to figure out why it did that.
    GameGenieLabs @ GameGenieLabs: And now pinnacle studio received a new update, and reset my my KEY, and he's trying to figure...