diff options
author | bunnei <ericbunnie@gmail.com> | 2014-04-26 14:21:40 -0400 |
---|---|---|
committer | bunnei <ericbunnie@gmail.com> | 2014-04-26 14:21:40 -0400 |
commit | f78794961e2bdcb0314516a3c2409afbfcd6d470 (patch) | |
tree | c1dffc4ea73a3adf530dcde922c8d83229345599 /src/core/mem_map_funcs.cpp | |
parent | 9e047e32d4973cb01f96116027e80639aa9f4280 (diff) |
- changed HW IO map to use virtual addresses
- added hooks to catch LCD IO read/writes
Diffstat (limited to 'src/core/mem_map_funcs.cpp')
-rw-r--r-- | src/core/mem_map_funcs.cpp | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/src/core/mem_map_funcs.cpp b/src/core/mem_map_funcs.cpp index 875821adb6..d0bec31c6f 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; } } |