dolphin-emu/dolphin — pull request #1776 by JosJuice (2014-12-27 15:26:07+00:00)
Title: Fix CleanRip reading Wii discs

Yep, it actually works now! I've been able to rip a Wii game and get an ISO that's bit-for-bit identical to the original.

Most of the disc code in Dolphin seemed to use Read most of the time, only using RAWRead if Read didn't work, which isn't really correct. Read is the function that decrypts data, while RAWRead performs no encryption at all... but Read was being used for reading GC discs, despite them not having any encryption.

The first commit changes the DI command 0xA8 so that RAWRead is used. Because Read and RAWRead do the same thing for GC discs, there's no change with those. (VolumeDirectory didn't support RAWRead for GC discs before, but I fixed that.) Wii games don't use command 0xA8, so there's no change with them either. Only CleanRip (or theoretically other homebrew) reading Wii discs is affected.

The second commit changes the code so that it's clearer whether decryption is being performed or not. I had to update most calls to Read in order to do this, so there might be a risk that something is negatively affected.