mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-23 22:29:39 -06:00
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:
@ -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();
|
||||
|
Reference in New Issue
Block a user