From 7101d14f3bcc0af29b8d51b1f5d58689fee1a571 Mon Sep 17 00:00:00 2001 From: Astatin Date: Sat, 14 Sep 2024 23:49:32 +0900 Subject: Add keyboard support & start supporting serial communication (but tetris doesn't work in 2p) --- src/interrupts_timers.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/interrupts_timers.rs') 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); -- cgit v1.2.3-70-g09d2