summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/core/mem_map.h5
-rw-r--r--src/core/mem_map_funcs.cpp19
2 files changed, 17 insertions, 7 deletions
diff --git a/src/core/mem_map.h b/src/core/mem_map.h
index 62a8b82a8..83c251ac9 100644
--- a/src/core/mem_map.h
+++ b/src/core/mem_map.h
@@ -32,6 +32,11 @@ enum {
SHARED_MEMORY_VADDR_END = (SHARED_MEMORY_VADDR + SHARED_MEMORY_SIZE),
SHARED_MEMORY_MASK = (SHARED_MEMORY_SIZE - 1),
+ CONFIG_MEMORY_SIZE = 0x00001000, ///< Configuration memory size
+ CONFIG_MEMORY_VADDR = 0x1FF80000, ///< Configuration memory virtual address
+ CONFIG_MEMORY_VADDR_END = (CONFIG_MEMORY_VADDR + CONFIG_MEMORY_SIZE),
+ CONFIG_MEMORY_MASK = (CONFIG_MEMORY_SIZE - 1),
+
EXEFS_CODE_SIZE = 0x03F00000,
EXEFS_CODE_VADDR = 0x00100000, ///< ExeFS:/.code is loaded here
EXEFS_CODE_VADDR_END = (EXEFS_CODE_VADDR + EXEFS_CODE_SIZE),
diff --git a/src/core/mem_map_funcs.cpp b/src/core/mem_map_funcs.cpp
index 2284b535c..4812a8d22 100644
--- a/src/core/mem_map_funcs.cpp
+++ b/src/core/mem_map_funcs.cpp
@@ -9,6 +9,7 @@
#include "core/mem_map.h"
#include "core/hw/hw.h"
#include "hle/hle.h"
+#include "hle/config_mem.h"
namespace Memory {
@@ -46,7 +47,7 @@ inline void _Read(T &var, const u32 addr) {
// Could just do a base-relative read, too.... TODO
const u32 vaddr = _VirtualAddress(addr);
-
+
// 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)
@@ -74,6 +75,10 @@ inline void _Read(T &var, const u32 addr) {
} else if ((vaddr >= SHARED_MEMORY_VADDR) && (vaddr < SHARED_MEMORY_VADDR_END)) {
var = *((const T*)&g_shared_mem[vaddr & SHARED_MEMORY_MASK]);
+ // Config memory
+ } else if ((vaddr >= CONFIG_MEMORY_VADDR) && (vaddr < CONFIG_MEMORY_VADDR_END)) {
+ ConfigMem::Read<T>(var, vaddr);
+
// VRAM
} else if ((vaddr >= VRAM_VADDR) && (vaddr < VRAM_VADDR_END)) {
var = *((const T*)&g_vram[vaddr & VRAM_MASK]);
@@ -118,12 +123,12 @@ inline void _Write(u32 addr, const T data) {
} else if ((vaddr >= VRAM_VADDR) && (vaddr < VRAM_VADDR_END)) {
*(T*)&g_vram[vaddr & VRAM_MASK] = data;
- } else if ((vaddr & 0xFFF00000) == 0x1FF00000) {
- _assert_msg_(MEMMAP, false, "umimplemented write to DSP memory");
- } else if ((vaddr & 0xFFFF0000) == 0x1FF80000) {
- _assert_msg_(MEMMAP, false, "umimplemented write to Configuration Memory");
- } else if ((vaddr & 0xFFFFF000) == 0x1FF81000) {
- _assert_msg_(MEMMAP, false, "umimplemented write to shared page");
+ //} else if ((vaddr & 0xFFF00000) == 0x1FF00000) {
+ // _assert_msg_(MEMMAP, false, "umimplemented write to DSP memory");
+ //} else if ((vaddr & 0xFFFF0000) == 0x1FF80000) {
+ // _assert_msg_(MEMMAP, false, "umimplemented write to Configuration Memory");
+ //} else if ((vaddr & 0xFFFFF000) == 0x1FF81000) {
+ // _assert_msg_(MEMMAP, false, "umimplemented write to shared page");
// Error out...
} else {