From ecd7191b5a111a06b45694515169845b874775ec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9o=20Lam?= Date: Wed, 6 Dec 2017 20:08:24 +0100 Subject: [PATCH] Boot: Fix BAT setup in Wii mode HID4.SBE must be set before calling PowerPC::Update{D,I}BAT, otherwise extended BATs will not be enabled. --- Source/Core/Core/Boot/Boot.cpp | 1 - Source/Core/Core/Boot/Boot_BS2Emu.cpp | 1 + 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/Core/Core/Boot/Boot.cpp b/Source/Core/Core/Boot/Boot.cpp index a3083308ef..0c8f12c045 100644 --- a/Source/Core/Core/Boot/Boot.cpp +++ b/Source/Core/Core/Boot/Boot.cpp @@ -335,7 +335,6 @@ bool CBoot::BootUp(std::unique_ptr boot) if (config.bWii) { - HID4.SBE = 1; // Because there is no TMD to get the requested system (IOS) version from, // we default to IOS58, which is the version used by the Homebrew Channel. SetupWiiMemory(); diff --git a/Source/Core/Core/Boot/Boot_BS2Emu.cpp b/Source/Core/Core/Boot/Boot_BS2Emu.cpp index 7bc1799878..68af02b4c4 100644 --- a/Source/Core/Core/Boot/Boot_BS2Emu.cpp +++ b/Source/Core/Core/Boot/Boot_BS2Emu.cpp @@ -78,6 +78,7 @@ void CBoot::SetupBAT(bool is_wii) PowerPC::ppcState.spr[SPR_DBAT4L] = 0x10000002; PowerPC::ppcState.spr[SPR_DBAT5U] = 0xd0001fff; PowerPC::ppcState.spr[SPR_DBAT5L] = 0x1000002a; + HID4.SBE = 1; } PowerPC::DBATUpdated(); PowerPC::IBATUpdated();