Skip to content
Snippets Groups Projects
Verified Commit 9c90b69c authored by João Magalhães's avatar João Magalhães :rocket:
Browse files

feat: more debug info

parent 9d6cacb3
No related branches found
No related tags found
No related merge requests found
Pipeline #960 passed
......@@ -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),
......
......@@ -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),
}
},
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment