diff options
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 875821adb..d0bec31c6 100644 --- a/src/core/mem_map_funcs.cpp +++ b/src/core/mem_map_funcs.cpp | |||
| @@ -21,8 +21,16 @@ u32 _AddressPhysicalToVirtual(const u32 addr) { | |||
| 21 | // Our memory interface read/write functions assume virtual addresses. Put any physical address | 21 | // Our memory interface read/write functions assume virtual addresses. Put any physical address |
| 22 | // to virtual address translations here. This is obviously quite hacky... But we're not doing | 22 | // to virtual address translations here. This is obviously quite hacky... But we're not doing |
| 23 | // any MMU emulation yet or anything | 23 | // any MMU emulation yet or anything |
| 24 | if ((addr >= FCRAM_PADDR) && (addr < (FCRAM_PADDR_END))) { | 24 | if ((addr >= FCRAM_PADDR) && (addr < FCRAM_PADDR_END)) { |
| 25 | return (addr & FCRAM_MASK) | FCRAM_VADDR; | 25 | return (addr & FCRAM_MASK) | FCRAM_VADDR; |
| 26 | |||
| 27 | // Hardware IO | ||
| 28 | // TODO(bunnei): FixMe | ||
| 29 | // This isn't going to work... The physical address of HARDWARE_IO conflicts with the virtual | ||
| 30 | // address of shared memory. | ||
| 31 | //} else if ((addr >= HARDWARE_IO_PADDR) && (addr < HARDWARE_IO_PADDR_END)) { | ||
| 32 | // return (addr + 0x0EB00000); | ||
| 33 | |||
| 26 | } | 34 | } |
| 27 | return addr; | 35 | return addr; |
| 28 | } | 36 | } |
| @@ -132,7 +140,7 @@ u8 *GetPointer(const u32 addr) { | |||
| 132 | return g_vram + (vaddr & VRAM_MASK); | 140 | return g_vram + (vaddr & VRAM_MASK); |
| 133 | 141 | ||
| 134 | } else { | 142 | } else { |
| 135 | ERROR_LOG(MEMMAP, "Unknown GetPointer @ 0x%08x", vaddr); | 143 | ERROR_LOG(MEMMAP, "unknown GetPointer @ 0x%08x", vaddr); |
| 136 | return 0; | 144 | return 0; |
| 137 | } | 145 | } |
| 138 | } | 146 | } |