From 6cb919c7aeb7b127fd72147b2efbcfb35ccd14c7 Mon Sep 17 00:00:00 2001 From: "fix94.1" Date: Mon, 23 Jul 2012 15:29:26 +0000 Subject: [PATCH] -writing priiloader magic word into new memory region as well now for priiloader 0.8 beta 4 --- source/loader/sys.c | 22 ++++++++++++++++------ source/memory/memory.h | 3 +++ 2 files changed, 19 insertions(+), 6 deletions(-) diff --git a/source/loader/sys.c b/source/loader/sys.c index 6c9984c3..b0c1b7f4 100644 --- a/source/loader/sys.c +++ b/source/loader/sys.c @@ -8,7 +8,8 @@ #include #include "wiiuse/wpad.h" -#include "mem2.hpp" +#include "memory/mem2.hpp" +#include "memory/memory.h" #include "sys.h" #include "gecko.h" #include "channel_launcher.h" @@ -30,7 +31,6 @@ static bool return_to_disable = false; static bool return_to_bootmii = false; extern void __exception_closeall(); -static vu16* const _dspReg = (u16*)0xCC005000; extern u32 __PADDisableRecalibration(s32 disable); void __Wpad_PowerCallback() @@ -89,12 +89,22 @@ void Sys_ExitTo(int option) //magic word to force wii menu in priiloader. if(return_to_menu) - *(vu32*)0x8132FFFB = 0x50756e65; + { + *Priiloader_CFG1 = 0x50756E65; + *Priiloader_CFG2 = 0x50756E65; + } else if(return_to_priiloader) - *(vu32*)0x8132FFFB = 0x4461636f; + { + *Priiloader_CFG1 = 0x4461636F; + *Priiloader_CFG2 = 0x4461636F; + } else - *(vu32*)0x8132FFFB = 0xffffffff; - DCFlushRange((void *)(0x8132FFFB), 4); + { + *Priiloader_CFG1 = 0xFFFFFFFF; + *Priiloader_CFG2 = 0xFFFFFFFF; + } + DCFlushRange((void*)Priiloader_CFG1, 4); + DCFlushRange((void*)Priiloader_CFG2, 4); } void Sys_Exit(void) diff --git a/source/memory/memory.h b/source/memory/memory.h index c692f5ea..7f6f4e75 100644 --- a/source/memory/memory.h +++ b/source/memory/memory.h @@ -27,6 +27,9 @@ extern "C" #define Online_Check ((vu32*)0x80003180) #define GameID_Address ((vu32*)0x80003184) +#define Priiloader_CFG1 ((vu32*)0x8132FFFB) +#define Priiloader_CFG2 ((vu32*)0x817FEFF0) + #ifdef __cplusplus } #endif