From 58743416bbdeb01ef36838c555bfc5419dc32e7f Mon Sep 17 00:00:00 2001 From: JosJuice Date: Tue, 22 May 2018 22:39:52 +0200 Subject: Make the support for unencrypted Wii disc images less broken These disc images are only used on dev units and not retail units. There are two important differences compared to normal Wii disc images: - The data starts 0x8000 bytes into each partition instead of 0x20000 - The data of a partition is stored unencrypted and contains no hashes Our old implementation was just guesswork and doesn't work at all. According to testing by GerbilSoft, this commit's implementation is able to read and extract files in the filesystem correctly, but the tested game still isn't able to boot. (It's thanks to their info about unencrypted disc images that I was able to make this commit.) --- Source/Core/DiscIO/DiscExtractor.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'Source/Core/DiscIO/DiscExtractor.cpp') diff --git a/Source/Core/DiscIO/DiscExtractor.cpp b/Source/Core/DiscIO/DiscExtractor.cpp index 7494bd5ab7..eaba17b68a 100644 --- a/Source/Core/DiscIO/DiscExtractor.cpp +++ b/Source/Core/DiscIO/DiscExtractor.cpp @@ -361,7 +361,8 @@ bool ExportSystemData(const Volume& volume, const Partition& partition, success &= ExportTicket(volume, partition, export_folder + "/ticket.bin"); success &= ExportTMD(volume, partition, export_folder + "/tmd.bin"); success &= ExportCertificateChain(volume, partition, export_folder + "/cert.bin"); - success &= ExportH3Hashes(volume, partition, export_folder + "/h3.bin"); + if (volume.IsEncryptedAndHashed()) + success &= ExportH3Hashes(volume, partition, export_folder + "/h3.bin"); } return success; -- cgit v1.2.3