summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGravatar bunnei2014-04-06 22:56:08 -0400
committerGravatar bunnei2014-04-06 22:56:08 -0400
commitaae52e3f8fbf3538c20ca4ab4a5f182ef4c9ac93 (patch)
tree055f456ef785262329954e4206b74959498bb6fe /src
parentadded "citra" instead of "emu" to title bar (diff)
downloadyuzu-aae52e3f8fbf3538c20ca4ab4a5f182ef4c9ac93.tar.gz
yuzu-aae52e3f8fbf3538c20ca4ab4a5f182ef4c9ac93.tar.xz
yuzu-aae52e3f8fbf3538c20ca4ab4a5f182ef4c9ac93.zip
added hack physical memory reads with Memory::GetPointer
Diffstat (limited to 'src')
-rw-r--r--src/core/src/mem_map_funcs.cpp11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/core/src/mem_map_funcs.cpp b/src/core/src/mem_map_funcs.cpp
index dc4c2381d..ee2f79278 100644
--- a/src/core/src/mem_map_funcs.cpp
+++ b/src/core/src/mem_map_funcs.cpp
@@ -137,14 +137,21 @@ u8 *GetPointer(const u32 addr) {
137 // TODO(bunnei): Just a stub for now... ImplementMe! 137 // TODO(bunnei): Just a stub for now... ImplementMe!
138 if ((addr & 0x3E000000) == 0x08000000) { 138 if ((addr & 0x3E000000) == 0x08000000) {
139 return g_fcram + (addr & MEM_FCRAM_MASK); 139 return g_fcram + (addr & MEM_FCRAM_MASK);
140 } 140
141 // HACK(bunnei): There is no layer yet to translate virtual addresses to physical addresses.
142 // Until we progress far enough along, we'll accept all physical address reads here. I think
143 // that this is typically a corner-case from usermode software unless they are trying to do
144 // bare-metal things (e.g. early 3DS homebrew writes directly to the FB @ 0x20184E60, etc.
145 } else if (((addr & 0xF0000000) == MEM_FCRAM_PADDR) && (addr < (MEM_FCRAM_PADDR_END))) {
146 return g_fcram + (addr & MEM_FCRAM_MASK);
147
141 //else if ((addr & 0x3F800000) == 0x04000000) { 148 //else if ((addr & 0x3F800000) == 0x04000000) {
142 // return g_vram + (addr & MEM_VRAM_MASK); 149 // return g_vram + (addr & MEM_VRAM_MASK);
143 //} 150 //}
144 //else if ((addr & 0x3F000000) >= 0x08000000 && (addr & 0x3F000000) < 0x08000000 + g_MemorySize) { 151 //else if ((addr & 0x3F000000) >= 0x08000000 && (addr & 0x3F000000) < 0x08000000 + g_MemorySize) {
145 // return m_pRAM + (addr & g_MemoryMask); 152 // return m_pRAM + (addr & g_MemoryMask);
146 //} 153 //}
147 else { 154 } else {
148 //ERROR_LOG(MEMMAP, "Unknown GetPointer %08x PC %08x LR %08x", addr, currentMIPS->pc, currentMIPS->r[MIPS_REG_RA]); 155 //ERROR_LOG(MEMMAP, "Unknown GetPointer %08x PC %08x LR %08x", addr, currentMIPS->pc, currentMIPS->r[MIPS_REG_RA]);
149 ERROR_LOG(MEMMAP, "Unknown GetPointer %08x", addr); 156 ERROR_LOG(MEMMAP, "Unknown GetPointer %08x", addr);
150 static bool reported = false; 157 static bool reported = false;