diff --git a/source/screen.c b/source/screen.c index fabf59b..391e449 100644 --- a/source/screen.c +++ b/source/screen.c @@ -49,17 +49,17 @@ void __attribute__((naked)) arm11Stub(void) { //Disable interrupts __asm(".word 0xF10C01C0"); - + WAIT_FOR_ARM9(); } - + static void invokeArm11Function(void (*func)()) { static bool hasCopiedStub = false; if(!hasCopiedStub) { - memcpy((void *)ARM11_STUB_ADDRESS, arm11Stub, 0x30); + memcpy((void *)ARM11_STUB_ADDRESS, arm11Stub, 0x2C); hasCopiedStub = true; } @@ -83,7 +83,7 @@ void deinitScreens(void) WAIT_FOR_ARM9(); } - if(ARESCREENSINITED) invokeArm11Function(ARM11); + if(ARESCREENSINITIALIZED) invokeArm11Function(ARM11); } void updateBrightness(u32 brightnessIndex) @@ -277,7 +277,7 @@ void initScreens(void) if(needToSetup) { - if(!ARESCREENSINITED) + if(!ARESCREENSINITIALIZED) { flushDCacheRange(&configData, sizeof(CfgData)); invokeArm11Function(initSequence); diff --git a/source/screen.h b/source/screen.h index 22ccce2..d7f6a5f 100644 --- a/source/screen.h +++ b/source/screen.h @@ -31,9 +31,9 @@ #define PDN_GPU_CNT (*(vu8 *)0x10141200) -#define ARESCREENSINITED (PDN_GPU_CNT != 1) +#define ARESCREENSINITIALIZED (PDN_GPU_CNT != 1) -#define ARM11_STUB_ADDRESS 0x1FFFFFC8 +#define ARM11_STUB_ADDRESS 0x1FFFFC00 #define WAIT_FOR_ARM9() *arm11Entry = 0; while(!*arm11Entry); ((void (*)())*arm11Entry)(); #define SCREEN_TOP_WIDTH 400 @@ -54,4 +54,4 @@ void deinitScreens(void); void swapFramebuffers(bool isAlternate); void updateBrightness(u32 brightnessIndex); void clearScreens(bool isAlternate); -void initScreens(void); \ No newline at end of file +void initScreens(void); diff --git a/source/utils.c b/source/utils.c index 466295c..24afc2a 100644 --- a/source/utils.c +++ b/source/utils.c @@ -89,7 +89,7 @@ u32 waitInput(bool isMenu) void mcuPowerOff(void) { - if(!ISFIRMLAUNCH && ARESCREENSINITED) clearScreens(false); + if(!ISFIRMLAUNCH && ARESCREENSINITIALIZED) clearScreens(false); //Ensure that all memory transfers have completed and that the data cache has been flushed flushEntireDCache(); @@ -118,4 +118,4 @@ void error(const char *message) } mcuPowerOff(); -} \ No newline at end of file +}