haxchi/cfw_booter/arm_user/source/main.c
FIX94 791b2944a7 -fixed screen corruption when loading homebrew launcher by properly clearing the screen
-modified IOSU exploit to load from high MEM1 to not run into existing memory and crash
-updated homebrew launcher loader to follow dimoks latest commit and be ready for 1.4 .rpx loading
2016-11-12 22:16:06 +01:00

31 lines
575 B
C

#include "types.h"
#include "utils.h"
void _main()
{
void(*ios_shutdown)(int) = (void(*)(int))0x1012EE4C;
int(*reply)(int, int) = (int(*)(int, int))0x1012ED04;
int saved_handle = *(volatile u32*)0x01E10000;
int myret = reply(saved_handle, 0);
if (myret != 0)
ios_shutdown(1);
// stack pointer will be 0x1016AE30
// link register will be 0x1012EACC
asm("LDR SP, newsp\n"
"LDR R0, newr0\n"
"LDR LR, newlr\n"
"LDR PC, newpc\n"
"newsp: .word 0x1016AE30\n"
"newlr: .word 0x1012EACC\n"
"newr0: .word 0x10146080\n"
"newpc: .word 0x10111164\n");
}