CPU: Make interrupts actually edge-triggered

This commit is contained in:
Stenzek
2024-03-16 23:28:53 +10:00
parent 3702a533f2
commit fa6850902a
13 changed files with 145 additions and 98 deletions

View File

@ -639,6 +639,7 @@ void Pad::WriteRegister(u32 offset, u32 value)
{
// reset stat bits
s_JOY_STAT.INTR = false;
InterruptController::SetLineState(InterruptController::IRQ::PAD, false);
}
if (!s_JOY_CTRL.SELECT)
@ -883,7 +884,7 @@ void Pad::DoACK()
{
Log_DebugPrintf("Triggering ACK interrupt");
s_JOY_STAT.INTR = true;
InterruptController::InterruptRequest(InterruptController::IRQ::IRQ7);
InterruptController::SetLineState(InterruptController::IRQ::PAD, true);
}
EndTransfer();