summaryrefslogtreecommitdiff
path: root/src/core/mem_map_funcs.cpp
diff options
context:
space:
mode:
authorGravatar bunnei2014-04-12 21:55:36 -0400
committerGravatar bunnei2014-04-12 21:55:36 -0400
commit68e198476f17a026fed88f3c9a271aa768694354 (patch)
treec8b368e45afd8fd70c69ce7be7e28879eda8d8aa /src/core/mem_map_funcs.cpp
parenthacked CPU interpreter to ignore branch on SVC instruction (as we are HLEing ... (diff)
downloadyuzu-68e198476f17a026fed88f3c9a271aa768694354.tar.gz
yuzu-68e198476f17a026fed88f3c9a271aa768694354.tar.xz
yuzu-68e198476f17a026fed88f3c9a271aa768694354.zip
- added HLE to connect to "srv:" service
- added a manager for keeping track of services/ports - added a memory mapped region for memory accessed by HLE - added HLE for GetThreadCommandBuffer function
Diffstat (limited to 'src/core/mem_map_funcs.cpp')
-rw-r--r--src/core/mem_map_funcs.cpp18
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 @@
6 6
7#include "core/mem_map.h" 7#include "core/mem_map.h"
8#include "core/hw/hw.h" 8#include "core/hw/hw.h"
9#include "hle/hle.h"
9 10
10namespace Memory { 11namespace Memory {
11 12
@@ -15,9 +16,16 @@ inline void _Read(T &var, const u32 addr) {
15 // TODO: Make sure this represents the mirrors in a correct way. 16 // TODO: Make sure this represents the mirrors in a correct way.
16 // Could just do a base-relative read, too.... TODO 17 // Could just do a base-relative read, too.... TODO
17 18
19
20 // Memory allocated for HLE use that can be addressed from the emulated application
21 // The primary use of this is sharing a commandbuffer between the HLE OS (syscore) and the LLE
22 // core running the user application (appcore)
23 if (addr >= MEM_OSHLE_VADDR && addr < MEM_OSHLE_VADDR_END) {
24 NOTICE_LOG(MEMMAP, "OSHLE read @ 0x%08X", addr);
25
18 // Hardware I/O register reads 26 // Hardware I/O register reads
19 // 0x10XXXXXX- is physical address space, 0x1EXXXXXX is virtual address space 27 // 0x10XXXXXX- is physical address space, 0x1EXXXXXX is virtual address space
20 if ((addr & 0xFF000000) == 0x10000000 || (addr & 0xFF000000) == 0x1E000000) { 28 } else if ((addr & 0xFF000000) == 0x10000000 || (addr & 0xFF000000) == 0x1E000000) {
21 HW::Read<T>(var, addr); 29 HW::Read<T>(var, addr);
22 30
23 // FCRAM virtual address reads 31 // FCRAM virtual address reads
@@ -47,9 +55,15 @@ inline void _Read(T &var, const u32 addr) {
47template <typename T> 55template <typename T>
48inline void _Write(u32 addr, const T data) { 56inline void _Write(u32 addr, const T data) {
49 57
58 // Memory allocated for HLE use that can be addressed from the emulated application
59 // The primary use of this is sharing a commandbuffer between the HLE OS (syscore) and the LLE
60 // core running the user application (appcore)
61 if (addr >= MEM_OSHLE_VADDR && addr < MEM_OSHLE_VADDR_END) {
62 NOTICE_LOG(MEMMAP, "OSHLE write @ 0x%08X", addr);
63
50 // Hardware I/O register writes 64 // Hardware I/O register writes
51 // 0x10XXXXXX- is physical address space, 0x1EXXXXXX is virtual address space 65 // 0x10XXXXXX- is physical address space, 0x1EXXXXXX is virtual address space
52 if ((addr & 0xFF000000) == 0x10000000 || (addr & 0xFF000000) == 0x1E000000) { 66 } else if ((addr & 0xFF000000) == 0x10000000 || (addr & 0xFF000000) == 0x1E000000) {
53 HW::Write<const T>(addr, data); 67 HW::Write<const T>(addr, data);
54 68
55 // ExeFS:/.code is loaded here: 69 // ExeFS:/.code is loaded here: