summaryrefslogtreecommitdiffstats
path: root/src/core/mem_map_funcs.cpp
diff options
context:
space:
mode:
authorbunnei <ericbunnie@gmail.com>2014-04-26 20:21:40 +0200
committerbunnei <ericbunnie@gmail.com>2014-04-26 20:21:40 +0200
commitf78794961e2bdcb0314516a3c2409afbfcd6d470 (patch)
treec1dffc4ea73a3adf530dcde922c8d83229345599 /src/core/mem_map_funcs.cpp
parentadded simple GSP GPU ReadHWRegs function to support returning the framebuffer address (diff)
downloadyuzu-f78794961e2bdcb0314516a3c2409afbfcd6d470.tar
yuzu-f78794961e2bdcb0314516a3c2409afbfcd6d470.tar.gz
yuzu-f78794961e2bdcb0314516a3c2409afbfcd6d470.tar.bz2
yuzu-f78794961e2bdcb0314516a3c2409afbfcd6d470.tar.lz
yuzu-f78794961e2bdcb0314516a3c2409afbfcd6d470.tar.xz
yuzu-f78794961e2bdcb0314516a3c2409afbfcd6d470.tar.zst
yuzu-f78794961e2bdcb0314516a3c2409afbfcd6d470.zip
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 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) {
// 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;
}
}