diff options
| author | Léo Lam <leo@innovatetechnologi.es> | 2017-08-06 23:29:43 +0800 |
|---|---|---|
| committer | Léo Lam <leo@innovatetechnologi.es> | 2017-08-07 00:36:35 +0800 |
| commit | d612416ce83d41b87e1d22835caf9c8cfc7e64a8 (patch) | |
| tree | ffd4e03c2872ffd07bd5a2db854904c58bd0f91f /Source/Core | |
| parent | 0bdcabdfa966660a9c1a19cda9468e2683748d9b (diff) | |
Boot/BS2: Write to 0x3194 and 0x3198
Diffstat (limited to 'Source/Core')
| -rw-r--r-- | Source/Core/Core/Boot/Boot_BS2Emu.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/Source/Core/Core/Boot/Boot_BS2Emu.cpp b/Source/Core/Core/Boot/Boot_BS2Emu.cpp index 9723622715..a2a5ff0173 100644 --- a/Source/Core/Core/Boot/Boot_BS2Emu.cpp +++ b/Source/Core/Core/Boot/Boot_BS2Emu.cpp @@ -360,6 +360,14 @@ bool CBoot::EmulatedBS2_Wii(const DiscIO::Volume& volume) state->discstate = 0x01; }); + // While reading a disc, the system menu reads the first partition table + // (0x20 bytes from 0x00040020) and stores a pointer to the data partition entry. + // When launching the disc game, it copies the partition type and offset to 0x3194 + // and 0x3198 respectively. + const DiscIO::Partition data_partition = volume.GetGamePartition(); + Memory::Write_U32(0, 0x3194); + Memory::Write_U32(static_cast<u32>(data_partition.offset >> 2), 0x3198); + if (!SetupWiiMemory(tmd.GetIOSId())) return false; |
