fix compare interrupt (#210)

This commit is contained in:
Logan McNaughton 2025-02-01 20:47:26 +01:00 committed by GitHub
parent 5c98a08fe4
commit 7d63a694cc
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -30,12 +30,16 @@ pub fn check_pending_interrupts(device: &mut device::Device) {
return;
}
device::events::create_event(
device,
device::events::EventType::Interrupt,
device.cpu.cop0.regs[device::cop0::COP0_COUNT_REG as usize],
interrupt_exception,
);
if device.cpu.cop0.regs[device::cop0::COP0_CAUSE_REG as usize] == device::cop0::COP0_CAUSE_IP7 {
interrupt_exception(device);
} else {
device::events::create_event(
device,
device::events::EventType::Interrupt,
device.cpu.cop0.regs[device::cop0::COP0_COUNT_REG as usize],
interrupt_exception,
);
}
}
pub fn interrupt_exception(device: &mut device::Device) {