diff --git a/src/main.rs b/src/main.rs index 6cc5fcd..4e97d48 100644 --- a/src/main.rs +++ b/src/main.rs @@ -132,6 +132,7 @@ impl Memory { } fn set(&mut self, address: Address, data: u8) { + println!("write addr: {:#X}, data: {:#X}", address, data); match address { 0x0..0x100 => { if !self.bootrom_enabled { diff --git a/src/processor.rs b/src/processor.rs index f2d4e5a..54c8c9f 100644 --- a/src/processor.rs +++ b/src/processor.rs @@ -31,6 +31,10 @@ impl CPU { unsafe { self.last_instruction_addr = self.state.pc.as_u16 }; let opcode = self.next_opcode(); self.last_instruction = opcode; + println!( + "exec {:#4X} from pc: {:#X}", + opcode, self.last_instruction_addr + ); match opcode { 0x0 => {