From fced7af144c652f81ab423b492316cd6be17d2ee Mon Sep 17 00:00:00 2001 From: Alex Janka Date: Wed, 26 Apr 2023 11:14:58 +1000 Subject: [PATCH] remove prints --- lib/src/processor/memory.rs | 6 ++---- lib/src/processor/memory/mmio/cgb/double_speed.rs | 2 -- lib/src/processor/mod.rs | 3 --- 3 files changed, 2 insertions(+), 9 deletions(-) diff --git a/lib/src/processor/memory.rs b/lib/src/processor/memory.rs index ed04761..7eab1cb 100644 --- a/lib/src/processor/memory.rs +++ b/lib/src/processor/memory.rs @@ -375,8 +375,7 @@ where CgbIoAddress::Pcm12 => self.apu.get_pcm_1_2(), CgbIoAddress::Pcm34 => self.apu.get_pcm_3_4(), CgbIoAddress::Unused(v) => { - println!("attempt to get 0x{v:0>4X}"); - todo!() + todo!("attempt to get 0x{v:0>4X}") } } } else { @@ -388,7 +387,6 @@ where } fn set_io(&mut self, address: IoAddress, data: u8) { - // println!("set 0x{:0>4X} to 0x{:0>2X}", address.inner(), data); match address { IoAddress::Joypad => self.joypad.mmio_write(data), IoAddress::Serial(address) => match address.inner() { @@ -435,7 +433,7 @@ where CgbIoAddress::Pcm12 => {}, CgbIoAddress::Pcm34 => {}, CgbIoAddress::Unused(v) => { - println!("attempt to set 0x{v:0>4X} to 0x{data:0>2X}") + todo!("attempt to set 0x{v:0>4X} to 0x{data:0>2X}") } } } diff --git a/lib/src/processor/memory/mmio/cgb/double_speed.rs b/lib/src/processor/memory/mmio/cgb/double_speed.rs index 79d103c..44607e3 100644 --- a/lib/src/processor/memory/mmio/cgb/double_speed.rs +++ b/lib/src/processor/memory/mmio/cgb/double_speed.rs @@ -35,13 +35,11 @@ where pub(crate) fn try_switch_speed(&mut self) -> bool { if let Some(cgb_peripherals) = &mut self.cgb_peripherals { if cgb_peripherals.double_speed.prepared && !cgb_peripherals.double_speed.current { - println!("switching to double speed"); cgb_peripherals.double_speed.current = true; cgb_peripherals.double_speed.prepared = false; return true; } else if cgb_peripherals.double_speed.prepared && cgb_peripherals.double_speed.current { - println!("switching to normal speed"); cgb_peripherals.double_speed.current = false; cgb_peripherals.double_speed.prepared = false; return true; diff --git a/lib/src/processor/mod.rs b/lib/src/processor/mod.rs index 2a0e6d0..00dacc2 100644 --- a/lib/src/processor/mod.rs +++ b/lib/src/processor/mod.rs @@ -149,9 +149,6 @@ where fn handle_interrupts(&mut self) -> usize { if self.memory.ime { if let Some(interrupt) = self.memory.interrupts.get_next_interrupt() { - // if interrupt != Interrupt::Vblank { - // println!("interrupt: {interrupt:?}"); - // } let interrupt_addr = match interrupt { Interrupt::Vblank => 0x40, Interrupt::LcdStat => 0x48,