From ebcd0cc4934d54d72f49a4446716ff74dec25f18 Mon Sep 17 00:00:00 2001 From: pjht Date: Mon, 27 Mar 2023 15:30:36 -0500 Subject: [PATCH] Make MMU debug output show the address being translated --- src/mmu.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/mmu.rs b/src/mmu.rs index 1cb4e30..481e5ea 100644 --- a/src/mmu.rs +++ b/src/mmu.rs @@ -182,6 +182,9 @@ impl Mmu for MmuCard { ) -> NullableResult { let print_debug = self.print_debug; if self.enabled { + if print_debug { + println!("Translating {:#x}", address); + } let page = address >> 12; let offset = address & 0xFFF; let entry = if let Some(entry) = self.cache[page as usize] {