mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-04-23 13:04:56 +00:00
Merge pull request #5548 from JosJuice/volume-wii-unencrypted
Reimplement support for unencrypted Wii discs
This commit is contained in:
commit
1113b131f2
2 changed files with 7 additions and 7 deletions
|
@ -96,14 +96,8 @@ 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))
|
||||||
{
|
|
||||||
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<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
|
||||||
const std::optional<u32> wad_magic = reader->ReadSwapped<u32>(0x02);
|
const std::optional<u32> wad_magic = reader->ReadSwapped<u32>(0x02);
|
||||||
|
|
|
@ -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…
Add table
Reference in a new issue