mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2024-11-14 21:37:52 -07:00
Merge pull request #5548 from JosJuice/volume-wii-unencrypted
Reimplement support for unencrypted Wii discs
This commit is contained in:
commit
1113b131f2
@ -96,13 +96,7 @@ std::unique_ptr<IVolume> CreateVolumeFromFilename(const std::string& filename)
|
|||||||
// Check for Wii
|
// Check for Wii
|
||||||
const std::optional<u32> wii_magic = reader->ReadSwapped<u32>(0x18);
|
const std::optional<u32> wii_magic = reader->ReadSwapped<u32>(0x18);
|
||||||
if (wii_magic == u32(0x5D1C9EA3))
|
if (wii_magic == u32(0x5D1C9EA3))
|
||||||
{
|
return std::make_unique<CVolumeWiiCrypted>(std::move(reader));
|
||||||
const std::optional<u32> wii_container_magic = reader->ReadSwapped<u32>(0x60);
|
|
||||||
if (wii_container_magic == u32(0))
|
|
||||||
return std::make_unique<CVolumeWiiCrypted>(std::move(reader));
|
|
||||||
|
|
||||||
return std::make_unique<CVolumeGC>(std::move(reader));
|
|
||||||
}
|
|
||||||
|
|
||||||
// Check for WAD
|
// Check for WAD
|
||||||
// 0x206962 for boot2 wads
|
// 0x206962 for boot2 wads
|
||||||
|
@ -36,6 +36,12 @@ CVolumeWiiCrypted::CVolumeWiiCrypted(std::unique_ptr<IBlobReader> reader)
|
|||||||
{
|
{
|
||||||
_assert_(m_pReader);
|
_assert_(m_pReader);
|
||||||
|
|
||||||
|
if (m_pReader->ReadSwapped<u32>(0x60) != u32(0))
|
||||||
|
{
|
||||||
|
// No partitions - just read unencrypted data like with a GC disc
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
// Get tickets, TMDs, and decryption keys for all partitions
|
// Get tickets, TMDs, and decryption keys for all partitions
|
||||||
for (u32 partition_group = 0; partition_group < 4; ++partition_group)
|
for (u32 partition_group = 0; partition_group < 4; ++partition_group)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user