Emulator Issues #8206
closedDecompressing a GameCube .gcz file yields different hashes than the original image
0%
Description
When you compress a GameCube image and then decompress it again, the resulting decompressed image is different than the original image.
Hashes for James Bond 007: Nightfire, before compression and after decompression (by HdkR):
3971f7e05cf87c6288c740caa299a000
7de7b11341754f519dca2a289ab089da
Updated by karasuhebi almost 10 years ago
[21:56:22] GC stuff doesn't roundtrip because our uncompress routine is kinda stupid, but the compression is lossless
Updated by degasus almost 10 years ago
- Status changed from New to Accepted
This should never happen...
Updated by benthomas82 almost 10 years ago
Gamecube discs have garbage data in them just like Wii discs. Doesn't the compression routine wipe this data in order to achieve this compression? In which case, this would be expected behavior.
Updated by Sonicadvance1 almost 10 years ago
No. Gamecube compression is lossless, we don't scrub Gamecube discs at all.
Scrubbing Gamecube discs is dangerous and we refuse to do it.
Updated by benthomas82 almost 10 years ago
I see, I didn't know that. Why is it more dangerous than Wii discs, can you elaborate on the dangerous part? I scrubbed all my GC discs with a separate tool when I ripped them so I could compress them with 7zip, so they always compressed well in Dolphin without me realizing.
I did some investigating of my own for this issue, I reripped four of my games, compressed and decompressed them and examined the differences. On all four, the last 360448 bytes (exactly 352k) was zeroed out where there used to be data. This starts at address 0x57000000 in the image.
If I have some time later, I may try to figure out what build this started in.
Updated by benthomas82 almost 10 years ago
I did have time, and managed to track it down to build 4.0-4402.
https://dolphin-emu.org/download/dev/6df67bf38f52151ee5efb64edb4bc60ecce601ef/
Updated by skidau almost 10 years ago
What is the file size of the iso/gcm in bytes before compression and after decompression?
Updated by karasuhebi almost 10 years ago
I don't have a copy of Nightfire, would it be OK if I give you the sizes for another iso?
Updated by skidau almost 10 years ago
Yes, any iso where you have seen this problem.
Updated by karasuhebi almost 10 years ago
The Legend of Zelda - The Wind Waker:
Before compression - 1,459,978,240 bytes
After decompression - 1,459,978,240 bytes
Updated by benthomas82 almost 10 years ago
Sorry if I wasn't clear on that. The decompressed images are the correct size (1,459,978,240 bytes), but the problem is they are zero-filled (0x00) for the last 352k instead of the data that should be there.
Updated by skidau almost 10 years ago
Could you try compressing with the latest dolphin and decompressing the gcz with an old version? And vice versa and let us know the results?
Updated by karasuhebi almost 10 years ago
Original image:
SHA-1 = eed83fea6eccb3ba4092b998fcdf4cc57f5ba6b4
Compressed by -4199, decompressed by -5168:
SHA-1 = abe18704d79021d41aff17c4d2285d515d6fbb71
Compressed by -5168, decompressed by -4199:
SHA-1 = eed83fea6eccb3ba4092b998fcdf4cc57f5ba6b4
Updated by unknownbrackets almost 10 years ago
You can try this, which should have it resolved:
http://dl.dolphin-emu.org/prs/pr-2042-dolphin-latest-x64.7z
-[Unknown]
Updated by benthomas82 almost 10 years ago
I quick check shows PR 2042 does indeed fix the issue, I get the same MD5 after decompressing as before.
Updated by skidau almost 10 years ago
- Status changed from Accepted to Fixed