aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/mem_map_funcs.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/mem_map_funcs.cpp')
-rw-r--r--src/core/mem_map_funcs.cpp12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/core/mem_map_funcs.cpp b/src/core/mem_map_funcs.cpp
index 875821ad..d0bec31c 100644
--- a/src/core/mem_map_funcs.cpp
+++ b/src/core/mem_map_funcs.cpp
@@ -21,8 +21,16 @@ u32 _AddressPhysicalToVirtual(const u32 addr) {
// Our memory interface read/write functions assume virtual addresses. Put any physical address
// to virtual address translations here. This is obviously quite hacky... But we're not doing
// any MMU emulation yet or anything
- if ((addr >= FCRAM_PADDR) && (addr < (FCRAM_PADDR_END))) {
+ if ((addr >= FCRAM_PADDR) && (addr < FCRAM_PADDR_END)) {
return (addr & FCRAM_MASK) | FCRAM_VADDR;
+
+ // Hardware IO
+ // TODO(bunnei): FixMe
+ // This isn't going to work... The physical address of HARDWARE_IO conflicts with the virtual
+ // address of shared memory.
+ //} else if ((addr >= HARDWARE_IO_PADDR) && (addr < HARDWARE_IO_PADDR_END)) {
+ // return (addr + 0x0EB00000);
+
}
return addr;
}
@@ -132,7 +140,7 @@ u8 *GetPointer(const u32 addr) {
return g_vram + (vaddr & VRAM_MASK);
} else {
- ERROR_LOG(MEMMAP, "Unknown GetPointer @ 0x%08x", vaddr);
+ ERROR_LOG(MEMMAP, "unknown GetPointer @ 0x%08x", vaddr);
return 0;
}
}