From 28a57a874a495a6f18a7bb3b570cefa963100e34 Mon Sep 17 00:00:00 2001 From: Michel Heily Date: Fri, 6 Nov 2020 05:11:09 -0800 Subject: [PATCH] core: dma: Reduce logs Former-commit-id: 6db019b583e195fcb6aedb134cf54482a6c72428 Former-commit-id: 9294c305aafac1d55f18f1bd5d2fb5c62db509c5 --- core/src/dma.rs | 16 ++++++++-------- core/src/iodev.rs | 7 +++++++ 2 files changed, 15 insertions(+), 8 deletions(-) diff --git a/core/src/dma.rs b/core/src/dma.rs index e6e0dd6..c2d4c96 100644 --- a/core/src/dma.rs +++ b/core/src/dma.rs @@ -88,14 +88,14 @@ impl DmaChannel { let timing = ctrl.timing(); let mut start_immediately = false; if ctrl.is_enabled() && !self.ctrl.is_enabled() { - trace!( - "DMA{} enabled! timing={} src={:#x} dst={:#x} cnt={}", - self.id, - timing, - self.src, - self.dst, - self.wc - ); + // trace!( + // "DMA{} enabled! timing={} src={:#x} dst={:#x} cnt={}", + // self.id, + // timing, + // self.src, + // self.dst, + // self.wc + // ); self.running = true; start_immediately = timing == 0; self.internal.src_addr = self.src; diff --git a/core/src/iodev.rs b/core/src/iodev.rs index cc9d811..e482601 100644 --- a/core/src/iodev.rs +++ b/core/src/iodev.rs @@ -131,6 +131,13 @@ impl Bus for IoDevices { REG_DMA1CNT_H => io.dmac.channels[1].ctrl.0, REG_DMA2CNT_H => io.dmac.channels[2].ctrl.0, REG_DMA3CNT_H => io.dmac.channels[3].ctrl.0, + // Even though these registers are write only, + // some games may still try to read them. + // TODO: should this be treated as an open-bus read? + REG_DMA0CNT_L => 0, + REG_DMA1CNT_L => 0, + REG_DMA2CNT_L => 0, + REG_DMA3CNT_L => 0, REG_WAITCNT => io.waitcnt.0,