From 6a55a1bf68981f4ca2545939bd8a59c624b5059e Mon Sep 17 00:00:00 2001 From: Tillmann Karras Date: Sat, 19 Jul 2025 16:19:04 +0100 Subject: [PATCH] WII_IPC: fix homebrew that uses the disc drive Dolphin never emulated the AHBPROT register before, but the default value when reading from unimplemented MMIO registers used to be -1, which happened to match what AHBPROT reads as when all restrictions are disabled. In 6f25e20c6a0c5b4027fffe2bea0116728018e7df I changed the default to 0 to match observed hardware behavior in the memory range of the command processor. This broke libogc's DI_Init() which checks AHBPROT for full hardware access (presumably to ensure that bypassing IPC for Video DVDs will work). --- Source/Core/Core/HW/WII_IPC.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Source/Core/Core/HW/WII_IPC.cpp b/Source/Core/Core/HW/WII_IPC.cpp index 8ce63d7c1f..c99c8afbf0 100644 --- a/Source/Core/Core/HW/WII_IPC.cpp +++ b/Source/Core/Core/HW/WII_IPC.cpp @@ -41,6 +41,8 @@ enum ARM_IRQFLAG = 0x38, ARM_IRQMASK = 0x3c, + AHBPROT = 0x64, + GPIOB_OUT = 0xc0, GPIOB_DIR = 0xc4, GPIOB_IN = 0xc8, @@ -169,6 +171,9 @@ void WiiIPC::RegisterMMIO(MMIO::Mapping* mmio, u32 base) 0); })); + // Dolphin currently does not emulate any hardware access restrictions. + mmio->Register(base | AHBPROT, MMIO::Constant(0xFFFFFFFF), MMIO::InvalidWrite()); + mmio->Register(base | GPIOB_OUT, MMIO::DirectRead(&m_gpio_out.m_hex), MMIO::ComplexWrite([](Core::System& system, u32, u32 val) { auto& wii_ipc = system.GetWiiIPC();