Translate exception address.

This commit is contained in:
Jean-Philip Desjardins 2022-10-26 11:31:45 -04:00
parent 532c38ab6a
commit a7d0cedddf

View file

@ -434,7 +434,7 @@ void CPsxBios::HandleInterrupt()
void CPsxBios::HandleException() void CPsxBios::HandleException()
{ {
assert(m_cpu.m_State.nHasException); assert(m_cpu.m_State.nHasException);
uint32 searchAddress = m_cpu.m_State.nCOP0[CCOP_SCU::EPC]; uint32 searchAddress = m_cpu.m_pAddrTranslator(&m_cpu, m_cpu.m_State.nCOP0[CCOP_SCU::EPC]);
uint32 callInstruction = m_cpu.m_pMemoryMap->GetWord(searchAddress); uint32 callInstruction = m_cpu.m_pMemoryMap->GetWord(searchAddress);
if(callInstruction != 0x0000000C) if(callInstruction != 0x0000000C)
{ {