diff --git a/src/ppu.rs b/src/ppu.rs index 0aca8d03c66004153edd14fad580e308d7fbed79..1ef9ec0e45cdbb6bd288744a0ebedc9eae954a29 100644 --- a/src/ppu.rs +++ b/src/ppu.rs @@ -4,6 +4,8 @@ use std::{ fmt::{Display, Formatter}, }; +use crate::debugln; + #[cfg(feature = "wasm")] use wasm_bindgen::prelude::*; @@ -473,10 +475,10 @@ impl Ppu { } } 0x004a => { - println!("Writing to $FF4A - WY (Window Y Position) (R/W)") + debugln!("Writing to $FF4A - WY (Window Y Position) (R/W)") } 0x004b => { - println!("Writing to $FF4B - WX (Window X Position + 7) (R/W)") + debugln!("Writing to $FF4B - WX (Window X Position + 7) (R/W)") } 0x007f => (), addr => panic!("Writing in unknown PPU location 0x{:04x}", addr), diff --git a/src/rom.rs b/src/rom.rs index 11c2d452ad7fa2c9e72e040630a77f956dccf8be..a44dccd9eaf057925bab98479daa742a865686b2 100644 --- a/src/rom.rs +++ b/src/rom.rs @@ -298,7 +298,8 @@ pub static MBC1: Mbc = Mbc { write_rom: |rom: &mut Cartridge, addr: u16, value: u8| { match addr & 0xf000 { 0x0000 | 0x1000 => { - // @todo RAM enable + println!("RAM ENABLE {}", value); + //@todo RAM ENABLE } 0x2000 | 0x3000 => { // @todo this is slow and must be pre-computed in cartridge @@ -308,7 +309,12 @@ pub static MBC1: Mbc = Mbc { } rom.set_rom_bank(rom_bank); } - 0x6000 | 0x7000 => {} + 0x4000 | 0x5000 => { + println!("SETTING UPPER BITS {}", value); + } + 0x6000 | 0x7000 => { + println!("SETTING MODE {}", value); + } _ => panic!("Writing to unknown Cartridge ROM location 0x{:04x}", addr), } },