From 41deb1631c301a45d78c965ed6611f781c5f03fa Mon Sep 17 00:00:00 2001 From: Yonatan Goldschmidt Date: Thu, 28 Nov 2019 00:55:14 +0200 Subject: [PATCH] Print read/writes to unhandled sound registers Former-commit-id: f63a98b61866c872ef52dd972db3ef28054be432 --- src/core/iodev.rs | 25 +++++++++++++++---------- 1 file changed, 15 insertions(+), 10 deletions(-) diff --git a/src/core/iodev.rs b/src/core/iodev.rs index 1928c4f..af21a7a 100644 --- a/src/core/iodev.rs +++ b/src/core/iodev.rs @@ -105,12 +105,15 @@ impl Bus for IoDevices { REG_POSTFLG => io.post_boot_flag as u16, REG_HALTCNT => 0, REG_KEYINPUT => io.keyinput as u16, + REG_SOUND1CNT_L..=DMA_BASE => { + println!( + "Unimplemented read from {:x} {}", + io_addr, + io_reg_string(io_addr) + ); + 0 + } _ => { - // println!( - // "Unimplemented read from {:x} {}", - // io_addr, - // io_reg_string(io_addr) - // ); 0 } } @@ -253,12 +256,14 @@ impl Bus for IoDevices { io.haltcnt = HaltState::Halt; } } + REG_SOUND1CNT_L..=DMA_BASE => { + println!( + "Unimplemented write to {:x} {}", + io_addr, + io_reg_string(io_addr) + ); + } _ => { - // println!( - // "Unimplemented write to {:x} {}", - // io_addr, - // io_reg_string(io_addr) - // ); } } }