suloku / gcmm

A gamecube/wii memory card manager
GNU General Public License v3.0
251 stars 24 forks source link

Large Memory Card Raw Restore Fails #27

Closed xperia64 closed 2 years ago

xperia64 commented 8 years ago

I have a large 2043 block 128Mb card that I raw backed up. I tried to restore it recently and it failed at block 1024 which seems a little suspicious. To restore my saves I had to format the card, extract all of the GCI's with dolphin and batch import them back with GCMM.

suloku commented 8 years ago

This is strange, last time I checked with my 2043 block card it worked fine. Unfortunately, my current occupations won't allow me to look into this matter. But what I can do is test your raw image with my 2043 block card if you upload it to confirm the issue. Also, were you using latest 1.4e release?

xperia64 commented 8 years ago

I'm using 1.4d since that's the only compiled version I could easily find.

suloku commented 8 years ago

Then using 1.4d or 1.4e shouldn't make a difference for your problem (btw the releases are all here at github releases page)

elchhome commented 5 years ago

I have the same problem and tested two different brands of 128mb cards (eaxus/bigben). Restoring the raw image stops at 1210. The old release 1.3 does work while the new one 1.4f does not.

suloku commented 3 years ago

Just tested raw backup and restore on a 2048 block memory card on version 1.5. I had no problems. Is this still an issue for someone?

rayfoster14 commented 3 years ago

Hi, I am also expecting this problem. On v1.5 a raw import will fail to write at Block 0, and on V1.4f it will fail to write at block 1024 consistently. Is there a version with a higher compatibility for 2043 block cards?

suloku commented 3 years ago

Can you test on 1.3? I'll retest my 2024 and 2043 block cards anyways, see if I can reproduce the problem

rayfoster14 commented 3 years ago

Hi, so I gave 1.3 a go. It did manage to write 2043 blocks to my memory card, however on closer inspection all of the save data was corrupted. I purchased a new 128MB card to test this out on in case my memory card was faulty but all of the same results from before on v1.4f and v1.5 applied.

suloku commented 2 years ago

Hello, sorry for late delay, might you please upload the mc image that isn't correctly restoring?

rayfoster14 commented 2 years ago

Sure no problem, can I send it over via email?

suloku commented 2 years ago

A little progress here:

About writing: I'm pretty sure there's a bug in libogc's card.c which makes writing to block #1024 actually go back to writing to block 0, thus corrupting the memory card. I think raw restore never propperly worked for 1024 block cards...

I'm trying to figure this out, but if this is the problem is a very low level code bug. Maybe dolphin has it right. I should test if this affects gci restoring too, I think it should, but maybe no one really uses more than 1024 blocks...and that's why no one noticed.

EDIT: Seems I fixed the bug in libogc, at least I could properly restore a 2048 block card without uses, and the whole 2048 blocks had data in it (I created a test raw image with several savegames and an edited gci that filled the remaining of the card with random data to check if restore properly worked).

Please test this build (backup your MC and SD contents just in case!) gcmm_151beta1.zip

suloku commented 2 years ago

https://github.com/devkitPro/libogc/issues/120