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 6f25e20c6a 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).
This commit is contained in:
Tillmann Karras
2025-07-19 16:19:04 +01:00
parent 2da774b2f7
commit 6a55a1bf68

View File

@ -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<u32>(0xFFFFFFFF), MMIO::InvalidWrite<u32>());
mmio->Register(base | GPIOB_OUT, MMIO::DirectRead<u32>(&m_gpio_out.m_hex),
MMIO::ComplexWrite<u32>([](Core::System& system, u32, u32 val) {
auto& wii_ipc = system.GetWiiIPC();