From 14d4ab0b5cf691b038d6237c945b520f93746a8c Mon Sep 17 00:00:00 2001 From: Maschell Date: Fri, 8 Feb 2019 16:40:37 +0100 Subject: [PATCH] Do memory mapping on default, remove some debug output and tests. --- src/main.cpp | 11 +++++------ src/mymemory/memory_mapping.cpp | 6 +++--- 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/src/main.cpp b/src/main.cpp index 0913a9c..922a8ad 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -95,6 +95,10 @@ extern "C" int32_t Menu_Main(int32_t argc, char **argv) { init_kernel_syscalls(); wups_init_kernel_syscalls(); + if(!MemoryMapping::isMemoryMapped()) { + MemoryMapping::setupMemoryMapping(); + } + gGameTitleID = OSGetTitleID(); int32_t result = 0; @@ -129,12 +133,7 @@ extern "C" int32_t Menu_Main(int32_t argc, char **argv) { memoryRelease(); CSettings::destroyInstance(); PluginLoader::destroyInstance(); - } - if(result == APPLICATION_CLOSE_APPLY_MEMORY) { - if(!MemoryMapping::isMemoryMapped()) { - MemoryMapping::setupMemoryMapping(); - } } DEBUG_FUNCTION_LINE("Do relocations\n"); @@ -153,7 +152,7 @@ extern "C" int32_t Menu_Main(int32_t argc, char **argv) { if(MemoryMapping::isMemoryMapped()) { DEBUG_FUNCTION_LINE("Mapping was already done. Running %016llX\n",gGameTitleID); readAndPrintSegmentRegister(NULL,NULL); - MemoryMapping::readTestValuesFromMemory(); + //MemoryMapping::readTestValuesFromMemory(); } else { DEBUG_FUNCTION_LINE("<-----------------------------------------------------> \n"); DEBUG_FUNCTION_LINE("<---------------- COPY PASTE ME START-----------------> \n"); diff --git a/src/mymemory/memory_mapping.cpp b/src/mymemory/memory_mapping.cpp index a11700f..43512a4 100644 --- a/src/mymemory/memory_mapping.cpp +++ b/src/mymemory/memory_mapping.cpp @@ -349,10 +349,10 @@ void MemoryMapping::setupMemoryMapping() { runOnAllCores(readAndPrintSegmentRegister,NULL,0,16,0x80000); - searchEmptyMemoryRegions(); + //searchEmptyMemoryRegions(); - writeTestValuesToMemory(); - readTestValuesFromMemory(); + //writeTestValuesToMemory(); + //readTestValuesFromMemory(); }