diff options
author | bunnei <ericbunnie@gmail.com> | 2014-04-13 03:55:36 +0200 |
---|---|---|
committer | bunnei <ericbunnie@gmail.com> | 2014-04-13 03:55:36 +0200 |
commit | 68e198476f17a026fed88f3c9a271aa768694354 (patch) | |
tree | c8b368e45afd8fd70c69ce7be7e28879eda8d8aa /src/core/mem_map_funcs.cpp | |
parent | hacked CPU interpreter to ignore branch on SVC instruction (as we are HLEing this...) (diff) | |
download | yuzu-68e198476f17a026fed88f3c9a271aa768694354.tar yuzu-68e198476f17a026fed88f3c9a271aa768694354.tar.gz yuzu-68e198476f17a026fed88f3c9a271aa768694354.tar.bz2 yuzu-68e198476f17a026fed88f3c9a271aa768694354.tar.lz yuzu-68e198476f17a026fed88f3c9a271aa768694354.tar.xz yuzu-68e198476f17a026fed88f3c9a271aa768694354.tar.zst yuzu-68e198476f17a026fed88f3c9a271aa768694354.zip |
Diffstat (limited to '')
-rw-r--r-- | src/core/mem_map_funcs.cpp | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/src/core/mem_map_funcs.cpp b/src/core/mem_map_funcs.cpp index 00719445f..f35e25caf 100644 --- a/src/core/mem_map_funcs.cpp +++ b/src/core/mem_map_funcs.cpp @@ -6,6 +6,7 @@ #include "core/mem_map.h" #include "core/hw/hw.h" +#include "hle/hle.h" namespace Memory { @@ -15,9 +16,16 @@ inline void _Read(T &var, const u32 addr) { // TODO: Make sure this represents the mirrors in a correct way. // Could just do a base-relative read, too.... TODO + + // Memory allocated for HLE use that can be addressed from the emulated application + // The primary use of this is sharing a commandbuffer between the HLE OS (syscore) and the LLE + // core running the user application (appcore) + if (addr >= MEM_OSHLE_VADDR && addr < MEM_OSHLE_VADDR_END) { + NOTICE_LOG(MEMMAP, "OSHLE read @ 0x%08X", addr); + // Hardware I/O register reads // 0x10XXXXXX- is physical address space, 0x1EXXXXXX is virtual address space - if ((addr & 0xFF000000) == 0x10000000 || (addr & 0xFF000000) == 0x1E000000) { + } else if ((addr & 0xFF000000) == 0x10000000 || (addr & 0xFF000000) == 0x1E000000) { HW::Read<T>(var, addr); // FCRAM virtual address reads @@ -47,9 +55,15 @@ inline void _Read(T &var, const u32 addr) { template <typename T> inline void _Write(u32 addr, const T data) { + // Memory allocated for HLE use that can be addressed from the emulated application + // The primary use of this is sharing a commandbuffer between the HLE OS (syscore) and the LLE + // core running the user application (appcore) + if (addr >= MEM_OSHLE_VADDR && addr < MEM_OSHLE_VADDR_END) { + NOTICE_LOG(MEMMAP, "OSHLE write @ 0x%08X", addr); + // Hardware I/O register writes // 0x10XXXXXX- is physical address space, 0x1EXXXXXX is virtual address space - if ((addr & 0xFF000000) == 0x10000000 || (addr & 0xFF000000) == 0x1E000000) { + } else if ((addr & 0xFF000000) == 0x10000000 || (addr & 0xFF000000) == 0x1E000000) { HW::Write<const T>(addr, data); // ExeFS:/.code is loaded here: |