diff options
author | Astatin <[email protected]> | 2024-09-14 23:49:32 +0900 |
---|---|---|
committer | Astatin <astatin@redacted> | 2024-09-14 23:49:32 +0900 |
commit | 7101d14f3bcc0af29b8d51b1f5d58689fee1a571 (patch) | |
tree | f0d24574e6ec3153a3f4a5969233946be43719a6 /src/interrupts_timers.rs | |
parent | 249921a2094d172e94543446e2af11dcba5075e8 (diff) |
Add keyboard support & start supporting serial communication (but tetris doesn't work in 2p)
Diffstat (limited to 'src/interrupts_timers.rs')
-rw-r--r-- | src/interrupts_timers.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/interrupts_timers.rs b/src/interrupts_timers.rs index c339ce8..4ba07be 100644 --- a/src/interrupts_timers.rs +++ b/src/interrupts_timers.rs @@ -1,5 +1,5 @@ use crate::display::DisplayInterrupt; -use crate::opcodes; +use crate::serial::Serial; use crate::state::{GBState, MemError}; const TIMA_TIMER_SPEEDS: [u64; 4] = [1024, 16, 64, 256]; @@ -10,7 +10,7 @@ impl GBState { let interrupts = self.mem.io[0x0f] & self.mem.interrupts_register & 0b11111; for i in 0..5 { if interrupts & (1 << i) != 0 { - opcodes::push(self, self.cpu.pc)?; + self.push(self.cpu.pc)?; self.mem.ime = false; self.cpu.pc = 0x40 + (i << 3); |