mirror of
https://gitee.com/anod/open_agb_firm.git
synced 2025-05-06 05:44:11 +08:00
解决引入libn3ds后,关机失败的问题……
This commit is contained in:
parent
f27422d884
commit
febea9de73
@ -36,6 +36,7 @@ NOINLINE noreturn void panic(void)
|
||||
{
|
||||
enterCriticalSection();
|
||||
|
||||
GFX_setFramebufFmt(GFX_BGR8, GFX_RGB565);
|
||||
consoleInit(SCREEN_BOT, NULL);
|
||||
ee_printf("\x1b[41m\x1b[0J\x1b[15C****PANIC!!!****\n");
|
||||
|
||||
@ -44,7 +45,7 @@ NOINLINE noreturn void panic(void)
|
||||
// Wait for A/B/X or Y
|
||||
while(!(REG_HID_PAD & (KEY_A | KEY_B | KEY_X | KEY_Y)));
|
||||
|
||||
MCU_powerOffSys();
|
||||
MCU_sysPowerOff();
|
||||
while(1) __wfi();
|
||||
}
|
||||
|
||||
@ -52,6 +53,7 @@ NOINLINE noreturn void panicMsg(const char *msg)
|
||||
{
|
||||
enterCriticalSection();
|
||||
|
||||
GFX_setFramebufFmt(GFX_BGR8, GFX_RGB565);
|
||||
consoleInit(SCREEN_BOT, NULL);
|
||||
ee_printf("\x1b[41m\x1b[0J\x1b[15C****PANIC!!!****\n\n");
|
||||
ee_printf("\nERROR MESSAGE:\n%s\n", msg);
|
||||
@ -61,7 +63,7 @@ NOINLINE noreturn void panicMsg(const char *msg)
|
||||
// Wait for A/B/X or Y
|
||||
while(!(REG_HID_PAD & (KEY_A | KEY_B | KEY_X | KEY_Y)));
|
||||
|
||||
MCU_powerOffSys();
|
||||
MCU_sysPowerOff();
|
||||
while(1) __wfi();
|
||||
}
|
||||
|
||||
@ -72,6 +74,7 @@ NOINLINE noreturn void guruMeditation(u8 type, const u32 *excStack)
|
||||
const char *const typeStr[3] = {"Undefined instruction", "Prefetch abort", "Data abort"};
|
||||
u32 realPc, instSize = 4;
|
||||
|
||||
GFX_setFramebufFmt(GFX_BGR8, GFX_RGB565);
|
||||
consoleInit(SCREEN_BOT, NULL);
|
||||
|
||||
if(excStack[16] & 0x20) instSize = 2; // Processor was in Thumb mode?
|
||||
@ -96,9 +99,9 @@ NOINLINE noreturn void guruMeditation(u8 type, const u32 *excStack)
|
||||
|
||||
ee_puts("Stack dump:");
|
||||
u32 sp = excStack[13];
|
||||
if(sp >= AXIWRAM_BASE && sp < AXIWRAM_BASE + AXIWRAM_SIZE && !(sp & 3u))
|
||||
if(sp >= AXI_RAM_BASE && sp < AXI_RAM_BASE + AXI_RAM_SIZE && !(sp & 3u))
|
||||
{
|
||||
u32 stackWords = ((AXIWRAM_BASE + AXIWRAM_SIZE - sp) / 4 > 48 ? 48 : (AXIWRAM_BASE + AXIWRAM_SIZE - sp) / 4);
|
||||
u32 stackWords = ((AXI_RAM_BASE + AXI_RAM_SIZE - sp) / 4 > 48 ? 48 : (AXI_RAM_BASE + AXI_RAM_SIZE - sp) / 4);
|
||||
|
||||
u32 newlineCounter = 0;
|
||||
for(u32 i = 0; i < stackWords; i++)
|
||||
@ -114,7 +117,7 @@ NOINLINE noreturn void guruMeditation(u8 type, const u32 *excStack)
|
||||
// Wait for A/B/X or Y
|
||||
while(!(REG_HID_PAD & (KEY_A | KEY_B | KEY_X | KEY_Y)));
|
||||
|
||||
MCU_powerOffSys();
|
||||
MCU_sysPowerOff();
|
||||
while(1) __wfi();
|
||||
}
|
||||
|
||||
|
@ -1045,12 +1045,12 @@ void oafUpdate(void)
|
||||
void oafFinish(void)
|
||||
{
|
||||
LGYFB_deinit();
|
||||
if(g_frameReadyEvent != 0)
|
||||
{
|
||||
deleteEvent(g_frameReadyEvent); // gbaGfxHandler() will automatically terminate.
|
||||
g_frameReadyEvent = 0;
|
||||
}
|
||||
// @MERGE 231006 START
|
||||
// if(g_frameReadyEvent != 0)
|
||||
// {
|
||||
// deleteEvent(g_frameReadyEvent); // gbaGfxHandler() will automatically terminate.
|
||||
// }
|
||||
g_frameReadyEvent = 0;
|
||||
LGY11_deinit();
|
||||
// @MERGE 231006 END
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user