Corrupted Cartridge Fixer Release

Bluebook

New Member
Newbie
Joined
Jan 20, 2024
Messages
4
Trophies
0
XP
8
Country
United States
Sounds like the exefs is bad, maybe? The exefs hash is just a single giant chunk, so it takes a lot of time refresh, because it has to read back a lot of data each time.

I have an idea though, try the attached version.
This will try to run the refresh command 100 times per cycle, hopefully speeding this process up?

Do not use the SELECT mode while running this.
Yes it stays in "Verifying EXEFS" for hours, 70M+ refreshes before I cancelled. Thanks, I will try your test version and let you know what happens. I really appreciate it!
 

ghjfdtg

Well-Known Member
Member
Joined
Jul 13, 2014
Messages
1,366
Trophies
1
XP
3,302
Country
Idea: Split up the ExeFS into chunks and read + refresh them individually. I don't know the block size of the NAND flash inside but if you refresh blocks that size or bigger it might work better than 1 refresh for the entire ExeFS/each file inside it.
 

skawo

Well-Known Member
OP
Member
Joined
Aug 18, 2015
Messages
543
Trophies
0
Age
34
XP
2,731
Country
Well, it is already doing that. It walks through every file in the exefs 0x200 bytes at a time, refreshing each chunk it reads, and then verifies the whole file. I don't think there's a way to verify just a chunk of a file in the exefs - which is why it has to go through the whole file each time, since there's no way to know which part of the file is wrong.

I suppose one way would be to make a version that takes a clean filesystem or file and compares it to the one on the cartridge and attacks only the affected spots. Might try to do that in the future.
 

Bluebook

New Member
Newbie
Joined
Jan 20, 2024
Messages
4
Trophies
0
XP
8
Country
United States
Hi, in the morning it's still on the same expected hash (AAF3C2...), the current hash is changing every 2-3 seconds. The Refresh count has overflowed is is now -95B, still Verifying EXEFS and status bar at 0%.

Interestingly pressing Y to skip doesn't seem to do anything, maybe it needs to get all the way through something before that flag is checked to skip?
 

skawo

Well-Known Member
OP
Member
Joined
Aug 18, 2015
Messages
543
Trophies
0
Age
34
XP
2,731
Country
You have to hold Y until the code loop gets back to the point where that input is checked, the whole thing isn't asynchronous unfortunately :v

Sadly, I think if it's been stuck that long then the cart might be too far gone. Could be a physical fault of some kind, like shown in one of Voultar's videos, or the data is just too corrupted to restore :c
 

Bluebook

New Member
Newbie
Joined
Jan 20, 2024
Messages
4
Trophies
0
XP
8
Country
United States
I was afraid of that. But, theoretically, what could cause a read of the same block to give a different hash repeatedly? If a pin connection was open due to a bad solder joint I wouldn't think that would cause changing data? It's hard to know "how different" the data are from the expected because all we see is the hash. Maybe that's what you were talking about to the other poster - a per-file database and content compare? Not sure if we could do anything with that information for repair though.

Semi-off-topic, do we know how these memory chips are programmed at the factory? They're not mask ROM so I assume they're programmable... at least one-time programmable? I haven't looked at the datasheet.

Thanks again. Do you have a buymeacoffee or donation method or something?
 

ghjfdtg

Well-Known Member
Member
Joined
Jul 13, 2014
Messages
1,366
Trophies
1
XP
3,302
Country
When NAND flash cells age the charge that is trapped in them will become increasingly difficult to read/measure. This can also lead to false readings and therefore corrupted data. I think this is what we are seeing here. The flash cells don't hold enough of a charge to get a correct reading. This can cause random bits to flip every now and then leading to changed hashes. ECC can fix this to some degree but only if there is not too much corrupted data.

Also no, you can't reprogram them. They are programmed once in factory and then locked forever.
 

tepattaja

New Member
Newbie
Joined
Jan 30, 2024
Messages
1
Trophies
0
Age
23
XP
8
Country
Finland
Tried this on my Alpha sapphire that i bough on launch. Had like 4 sessions when it came out and then, i just left it sit. Like two years ago i tried to play it, but only got to the intro scene where it just crashed. Then tried it couple of more times and every time it crashed even earlier. Nowadays it crashes after the 3DS logo.

I put this fix to use. It got stuck to the very first ExeFS check, sat there for an hour and it went through to the ROMFS part, but it kept getting stuck to the "Hash stuck" -parts for hundreds of different blocks, at least that's how it felt. Some went through after 500 tries, some didn't.
Then i got an idea that i would let it sit all night... The refresh count was at 12 million (might have been 1,2 million as well lmao) and it was still at the same hash number... stuck.

I don't know if i should try this more than this. It might be fixable, but it feels like it's too far gone. Thanks Nintendo... i got to have 4 game sessions...
 

SylverReZ

The planet is fine. The people are crazy.
Member
GBAtemp Patron
Joined
Sep 13, 2022
Messages
7,276
Trophies
3
Location
The Wired
Website
m4x1mumrez87.neocities.org
XP
22,332
Country
United Kingdom
Tried this on my Alpha sapphire that i bough on launch. Had like 4 sessions when it came out and then, i just left it sit. Like two years ago i tried to play it, but only got to the intro scene where it just crashed. Then tried it couple of more times and every time it crashed even earlier. Nowadays it crashes after the 3DS logo.

I put this fix to use. It got stuck to the very first ExeFS check, sat there for an hour and it went through to the ROMFS part, but it kept getting stuck to the "Hash stuck" -parts for hundreds of different blocks, at least that's how it felt. Some went through after 500 tries, some didn't.
Then i got an idea that i would let it sit all night... The refresh count was at 12 million (might have been 1,2 million as well lmao) and it was still at the same hash number... stuck.

I don't know if i should try this more than this. It might be fixable, but it feels like it's too far gone. Thanks Nintendo... i got to have 4 game sessions...
This isn't a permanent solution. It could be that the ROM chip has cold joints and needs reflowing.
 

skawo

Well-Known Member
OP
Member
Joined
Aug 18, 2015
Messages
543
Trophies
0
Age
34
XP
2,731
Country
After looking at many of these dead carts by now, I think cold solder joints would typically just result in the cart not reading at all.

If it does get read, and this doesn't fix it, chances are it's just too corrupted for the memory chip controller to restore and reflowing the chip will do nothing - although at that point it doesn't hurt to try, I suppose.

That said, if it does get fixed, it doesn't seem to get bad again - it's as permanent a solution as buying a new cartridge would be, i.e as long as the cart is refreshed periodically it should keep its data corruption-free.
 
  • Like
Reactions: SylverReZ

ghjfdtg

Well-Known Member
Member
Joined
Jul 13, 2014
Messages
1,366
Trophies
1
XP
3,302
Country
Also not sure if the game Voultar fixed was really cracked solder joints. Due to how flash memory works the heat he introduced could make the relevant parts of the ROM more readable. I have seen this trick from data recovery specialists. If they can't get all the data out corruption free they will try to read the chip out with higher and lower temperatures until they get a near perfect dump.
 

skawo

Well-Known Member
OP
Member
Joined
Aug 18, 2015
Messages
543
Trophies
0
Age
34
XP
2,731
Country
That would certainly be an interesting thing to test.

That said, when I was fixing my Paper Jam cart, I initially tried the "reflow" method as well - and it definitely didn't seem to improve it any. Maybe more heat would actually help, though. Like, blasting the chip with hot air for 5-10 seconds?
 
  • Like
Reactions: SylverReZ

ghjfdtg

Well-Known Member
Member
Joined
Jul 13, 2014
Messages
1,366
Trophies
1
XP
3,302
Country
Something along the lines of heating up the chip to 50°C. You can try the opposite as well turning canned air upside down so it becomes freeze spray. It's not guaranteed to work but worth a try.
 

Peyvol

New Member
Newbie
Joined
Feb 4, 2024
Messages
3
Trophies
0
Age
27
XP
16
Country
Spain
First of all, thank you SO much for your work skawo, I really appreciate the effort you are making trying to solve this problem. In my case, I have a "FE Echoes" that was unable to start. After several attempts using your script, it went on to show the main menu and the cinematic (crashing after that), and after more attempts, to be able to load the game fully and become playable.

However, the verification keeps failing (there are some chunks at the beginning and end that seem very difficult if not impossible to fix). I've tried more than 15 times (using both 20 and 100 refresh scripts), but I can't seem to fix them. Do you recommend I keep trying, and with what script/way? (I haven't tried using the manual skip method yet, when I use SELECT it keeps doing the automatic 20 refresh skips).

Thank you again and I guess you can consider mine as partially fixed for now :)
 

skawo

Well-Known Member
OP
Member
Joined
Aug 18, 2015
Messages
543
Trophies
0
Age
34
XP
2,731
Country
Does the amount of the unfixed blocks decrease as you keep running the thing (use the logging to check), or does it stay constant?
 

Peyvol

New Member
Newbie
Joined
Feb 4, 2024
Messages
3
Trophies
0
Age
27
XP
16
Country
Spain
It decreased significantly the first time I run the fix + SELECT, but last attempts didn't reduce the amount of unfixed ones (in some trys, the number even increased a little, which seems weird to me).
 

skawo

Well-Known Member
OP
Member
Joined
Aug 18, 2015
Messages
543
Trophies
0
Age
34
XP
2,731
Country
I had this comment on the YT video
1707180879148.png
 
  • Like
  • Love
Reactions: impeeza and SMNFXCN

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
    Psionic Roshambo @ Psionic Roshambo: I can put like 90 songs on a CD lol