Make MMU debug output show the address being translated

This commit is contained in:
pjht 2023-03-27 15:30:36 -05:00
parent 9be3153a7b
commit ebcd0cc493
Signed by: pjht
GPG Key ID: 7B5F6AFBEC7EE78E

View File

@ -182,6 +182,9 @@ impl Mmu for MmuCard {
) -> NullableResult<u32, BusError> { ) -> NullableResult<u32, BusError> {
let print_debug = self.print_debug; let print_debug = self.print_debug;
if self.enabled { if self.enabled {
if print_debug {
println!("Translating {:#x}", address);
}
let page = address >> 12; let page = address >> 12;
let offset = address & 0xFFF; let offset = address & 0xFFF;
let entry = if let Some(entry) = self.cache[page as usize] { let entry = if let Some(entry) = self.cache[page as usize] {