diff options
author | Astatin <[email protected]> | 2025-05-22 14:07:19 +0200 |
---|---|---|
committer | Astatin <[email protected]> | 2025-05-22 14:07:19 +0200 |
commit | 0c7f945407561f7c4531b2780e908bb2098551d8 (patch) | |
tree | 082b5cef5430a787ca524b0f846be999e5633334 /src/interrupts_timers.rs | |
parent | 4fce95c86e12f91e127605d440118e1b6a64208b (diff) |
Add load/save parameters to the CLI & remove errors
Diffstat (limited to 'src/interrupts_timers.rs')
-rw-r--r-- | src/interrupts_timers.rs | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/interrupts_timers.rs b/src/interrupts_timers.rs index b776777..f9ae84b 100644 --- a/src/interrupts_timers.rs +++ b/src/interrupts_timers.rs @@ -1,16 +1,16 @@ use crate::display::DisplayInterrupt; use crate::io::{Audio, Serial}; -use crate::state::{GBState, MemError}; +use crate::state::GBState; const TIMA_TIMER_SPEEDS: [u64; 4] = [1024, 16, 64, 256]; impl<S: Serial, A: Audio> GBState<S, A> { - pub fn check_interrupts(&mut self) -> Result<(), MemError> { + pub fn check_interrupts(&mut self) { if self.mem.ime { let interrupts = self.mem.io[0x0f] & self.mem.interrupts_register & 0b11111; for i in 0..5 { if interrupts & (1 << i) != 0 { - self.push(self.cpu.pc)?; + self.push(self.cpu.pc); self.mem.ime = false; self.cpu.pc = 0x40 + (i << 3); @@ -21,7 +21,6 @@ impl<S: Serial, A: Audio> GBState<S, A> { } } } - Ok(()) } pub fn tima_timer(&mut self, c: u64) { |