mirror of
https://github.com/gopher64/gopher64.git
synced 2026-11-16 10:53:34 +01:00
fix compare interrupt (#210)
This commit is contained in:
1 parent
5c98a08fe4
commit
7d63a694cc
1 file changed
+10
-6
@@ -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) {
|
||||
|
||||
Reference in new issue
Block a user