diff --git a/chainloader/source/start.s b/chainloader/source/start.s index f1c9d52..5ea443e 100644 --- a/chainloader/source/start.s +++ b/chainloader/source/start.s @@ -56,5 +56,5 @@ disableMpuAndJumpToEntrypoints: @ Jump to the ARM9 entrypoint mov r0, r4 mov r1, r5 - ldr r2, =0x2BEEF + ldr r2, =0x3BEEF bx r6 diff --git a/exceptions/arm9/source/mainHandler.c b/exceptions/arm9/source/mainHandler.c index 5fa178b..f1e5ca0 100644 --- a/exceptions/arm9/source/mainHandler.c +++ b/exceptions/arm9/source/mainHandler.c @@ -116,7 +116,7 @@ void __attribute__((noreturn)) mainHandler(u32 *regs, u32 type) //Copy header (actually optimized by the compiler) *(ExceptionDumpHeader *)FINAL_BUFFER = dumpHeader; - i2cWriteRegister(I2C_DEV_MCU, 0x22, 1 << 0); //Shutdown LCD + if(ARESCREENSINITIALIZED) i2cWriteRegister(I2C_DEV_MCU, 0x22, 1 << 0); //Shutdown LCD ((void (*)())0xFFFF0830)(); //Ensure that all memory transfers have completed and that the data cache has been flushed diff --git a/exceptions/arm9/source/types.h b/exceptions/arm9/source/types.h index fe5067c..d05cfa6 100644 --- a/exceptions/arm9/source/types.h +++ b/exceptions/arm9/source/types.h @@ -39,3 +39,7 @@ typedef volatile u8 vu8; typedef volatile u16 vu16; typedef volatile u32 vu32; typedef volatile u64 vu64; + +#define PDN_GPU_CNT (*(vu8 *)0x10141200) + +#define ARESCREENSINITIALIZED (PDN_GPU_CNT != 1) diff --git a/source/config.c b/source/config.c index 90708f0..af19ca3 100644 --- a/source/config.c +++ b/source/config.c @@ -240,7 +240,7 @@ void configMenu(bool oldPinStatus, u32 oldPinMode) initScreens(); static const char *bootTypes[] = { "B9S", - "B9S (ntrboothax)", + "B9S (ntrboot)", "FIRM0", "FIRM1" }; diff --git a/source/utils.c b/source/utils.c index d3c8642..9dff18f 100644 --- a/source/utils.c +++ b/source/utils.c @@ -107,7 +107,7 @@ void mcuPowerOff(void) if(bootType != FIRMLAUNCH && ARESCREENSINITIALIZED) clearScreens(false); //Shutdown LCD - i2cWriteRegister(I2C_DEV_MCU, 0x22, 1 << 0); + if(ARESCREENSINITIALIZED) i2cWriteRegister(I2C_DEV_MCU, 0x22, 1 << 0); //Ensure that all memory transfers have completed and that the data cache has been flushed flushEntireDCache();