-writing priiloader magic word into new memory region as well now

for priiloader 0.8 beta 4
This commit is contained in:
fix94.1 2012-07-23 15:29:26 +00:00
parent c0e84d0783
commit 6cb919c7ae
2 changed files with 19 additions and 6 deletions

View File

@ -8,7 +8,8 @@
#include <string.h> #include <string.h>
#include "wiiuse/wpad.h" #include "wiiuse/wpad.h"
#include "mem2.hpp" #include "memory/mem2.hpp"
#include "memory/memory.h"
#include "sys.h" #include "sys.h"
#include "gecko.h" #include "gecko.h"
#include "channel_launcher.h" #include "channel_launcher.h"
@ -30,7 +31,6 @@ static bool return_to_disable = false;
static bool return_to_bootmii = false; static bool return_to_bootmii = false;
extern void __exception_closeall(); extern void __exception_closeall();
static vu16* const _dspReg = (u16*)0xCC005000;
extern u32 __PADDisableRecalibration(s32 disable); extern u32 __PADDisableRecalibration(s32 disable);
void __Wpad_PowerCallback() void __Wpad_PowerCallback()
@ -89,12 +89,22 @@ void Sys_ExitTo(int option)
//magic word to force wii menu in priiloader. //magic word to force wii menu in priiloader.
if(return_to_menu) if(return_to_menu)
*(vu32*)0x8132FFFB = 0x50756e65; {
*Priiloader_CFG1 = 0x50756E65;
*Priiloader_CFG2 = 0x50756E65;
}
else if(return_to_priiloader) else if(return_to_priiloader)
*(vu32*)0x8132FFFB = 0x4461636f; {
*Priiloader_CFG1 = 0x4461636F;
*Priiloader_CFG2 = 0x4461636F;
}
else 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) void Sys_Exit(void)

View File

@ -27,6 +27,9 @@ extern "C"
#define Online_Check ((vu32*)0x80003180) #define Online_Check ((vu32*)0x80003180)
#define GameID_Address ((vu32*)0x80003184) #define GameID_Address ((vu32*)0x80003184)
#define Priiloader_CFG1 ((vu32*)0x8132FFFB)
#define Priiloader_CFG2 ((vu32*)0x817FEFF0)
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif