From 734d1a7ee179c510fe99d7d90c5bce30b310347f Mon Sep 17 00:00:00 2001 From: Connor McLaughlin Date: Mon, 23 Sep 2019 01:24:36 +1000 Subject: [PATCH] InterruptController: Masked interrupts are still set in the status register --- src/pse/interrupt_controller.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/pse/interrupt_controller.cpp b/src/pse/interrupt_controller.cpp index c40b721d4..f054aaeaf 100644 --- a/src/pse/interrupt_controller.cpp +++ b/src/pse/interrupt_controller.cpp @@ -31,7 +31,7 @@ bool InterruptController::DoState(StateWrapper& sw) void InterruptController::InterruptRequest(IRQ irq) { const u32 bit = (u32(1) << static_cast(irq)); - m_interrupt_status_register |= (bit & m_interrupt_mask_register); + m_interrupt_status_register |= bit; UpdateCPUInterruptRequest(); } @@ -81,7 +81,7 @@ void InterruptController::WriteRegister(u32 offset, u32 value) void InterruptController::UpdateCPUInterruptRequest() { // external interrupts set bit 10 only? - if (m_interrupt_status_register != 0) + if ((m_interrupt_status_register & m_interrupt_mask_register) != 0) m_cpu->SetExternalInterrupt(2); else m_cpu->ClearExternalInterrupt(2);