Fix (work around) Nintendo own HM bug, GG Ninty
This commit is contained in:
parent
dda11206db
commit
26dd61e4e6
@ -28,10 +28,9 @@
|
||||
|
||||
#include "types.h"
|
||||
|
||||
bool isExceptionFatal(u32 spsr);
|
||||
bool isExceptionFatal(u32 spsr, u32 *regs, u32 index);
|
||||
bool isDataAbortExceptionRangeControlled(u32 spsr, u32 addr);
|
||||
|
||||
|
||||
void FIQHandler(void);
|
||||
void undefinedInstructionHandler(void);
|
||||
void prefetchAbortHandler(void);
|
||||
|
@ -47,6 +47,8 @@
|
||||
|
||||
push {r0-r12, lr}
|
||||
mrs r0, spsr
|
||||
mov r1, sp
|
||||
mov r2, #\index
|
||||
bl isExceptionFatal
|
||||
cmp r0, #0
|
||||
pop {r0-r12, lr}
|
||||
|
@ -33,7 +33,7 @@
|
||||
#define REG_DUMP_SIZE 4 * 23
|
||||
#define CODE_DUMP_SIZE 48
|
||||
|
||||
bool isExceptionFatal(u32 spsr)
|
||||
bool isExceptionFatal(u32 spsr, u32 *regs, u32 index)
|
||||
{
|
||||
if((spsr & 0x1f) != 0x10) return true;
|
||||
|
||||
@ -51,6 +51,10 @@ bool isExceptionFatal(u32 spsr)
|
||||
thread = KPROCESS_GET_RVALUE(currentProcess, mainThread);
|
||||
if(thread != NULL && thread->threadLocalStorage != NULL && *((vu32 *)thread->threadLocalStorage + 0x10) != 0)
|
||||
return false;
|
||||
|
||||
if(index == 3 && strcmp(codeSetOfProcess(currentProcess)->processName, "menu") == 0 && // workaround a Home Menu bug leading to a dabort
|
||||
regs[0] == 0x3FFF && regs[2] == 0 && regs[5] == 2 && regs[7] == 1)
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
|
Reference in New Issue
Block a user