mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2026-08-07 20:54:48 -05:00
Merge pull request #14553 from JosJuice/gbi-pi
Core: Raise PI interrupt when accessing unmapped memory
This commit is contained in:
commit
c4e99cef61
|
|
@ -302,12 +302,21 @@ T MMU::ReadFromHardware(u32 em_address)
|
|||
return bswap(value);
|
||||
}
|
||||
|
||||
PanicAlertFmt("Unable to resolve read address {:x} PC {:x}", em_address, m_ppc_state.pc);
|
||||
if (m_system.IsPauseOnPanicMode())
|
||||
// Memory access error. Game Boy Interface relies on this to confirm that MEM2 isn't present.
|
||||
// TODO: This interrupt is supposed to have associated cause and address registers.
|
||||
m_system.GetProcessorInterface().SetInterrupt(ProcessorInterface::INT_CAUSE_PI);
|
||||
|
||||
// Don't show a panic alert for the specific access Game Boy Interface does.
|
||||
if (em_address != 0x10000000 || (m_ppc_state.pc >> 28) != 0)
|
||||
{
|
||||
m_system.GetCPU().Break();
|
||||
m_ppc_state.Exceptions |= EXCEPTION_DSI | EXCEPTION_FAKE_MEMCHECK_HIT;
|
||||
PanicAlertFmt("Unable to resolve read address {:x} PC {:x}", em_address, m_ppc_state.pc);
|
||||
if (m_system.IsPauseOnPanicMode())
|
||||
{
|
||||
m_system.GetCPU().Break();
|
||||
m_ppc_state.Exceptions |= EXCEPTION_DSI | EXCEPTION_FAKE_MEMCHECK_HIT;
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
@ -492,6 +501,10 @@ void MMU::WriteToHardware(u32 em_address, const u32 data, const u32 size)
|
|||
return;
|
||||
}
|
||||
|
||||
// Memory access error.
|
||||
// TODO: This interrupt is supposed to have associated cause and address registers.
|
||||
m_system.GetProcessorInterface().SetInterrupt(ProcessorInterface::INT_CAUSE_PI);
|
||||
|
||||
PanicAlertFmt("Unable to resolve write address {:x} PC {:x}", em_address, m_ppc_state.pc);
|
||||
if (m_system.IsPauseOnPanicMode())
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user