From 322099c826aae600938d60fae10bff2e93f58823 Mon Sep 17 00:00:00 2001 From: "fix94.1" Date: Fri, 18 May 2012 20:13:26 +0000 Subject: [PATCH] -moved mem2 init to the beginning of wiiflow booting -allocating dml config in mem1 since we write it to mem1 anyways, no need to unneeded move stuff from one mem to the other --- source/gc/gc.c | 6 +++--- source/main.cpp | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/source/gc/gc.c b/source/gc/gc.c index 0a044f3d..40b2a6d8 100644 --- a/source/gc/gc.c +++ b/source/gc/gc.c @@ -150,7 +150,7 @@ void DML_New_SetOptions(char *GamePath, char *CheatPath, char *NewCheatPath, boo { gprintf("Wiiflow DML: Launch game 'sd:/games/%s/game.iso' through memory (new method)\n", GamePath); - DMLCfg = (DML_CFG*)MEM2_alloc(sizeof(DML_CFG)); + DMLCfg = (DML_CFG*)MEM1_alloc(sizeof(DML_CFG)); if(DMLCfg == NULL) return; memset(DMLCfg, 0, sizeof(DML_CFG)); @@ -223,7 +223,7 @@ void DML_New_SetBootDiscOption() { gprintf("Booting GC game\n"); - DMLCfg = (DML_CFG*)MEM2_alloc(sizeof(DML_CFG)); + DMLCfg = (DML_CFG*)MEM1_alloc(sizeof(DML_CFG)); if(DMLCfg == NULL) return; memset(DMLCfg, 0, sizeof(DML_CFG)); @@ -247,5 +247,5 @@ void DML_New_WriteOptions() memcpy((void *)0x81200000, DMLCfg, sizeof(DML_CFG)); DCFlushRange((void *)(0x81200000), sizeof(DML_CFG)); - MEM2_free(DMLCfg); + MEM1_free(DMLCfg); } diff --git a/source/main.cpp b/source/main.cpp index b234e60c..41c958df 100644 --- a/source/main.cpp +++ b/source/main.cpp @@ -37,12 +37,12 @@ int main(int argc, char **argv) { __exception_setreload(5); MEM1_init((void*)0x80003f00, (void*)0x80b00000); + MEM2_init(52); // Init video CVideo vid; vid.init(); - MEM2_init(52); geckoinit = InitGecko(); gprintf(" \nWelcome to %s (%s-r%s)!\nThis is the debug output.\n", APP_NAME, APP_VERSION, SVN_REV); vid.waitMessage(0.2f);