This commit is contained in:
Aurora 2016-10-10 02:19:15 +02:00
parent 5b4712644a
commit fa13b8fbd0

View File

@ -47,19 +47,17 @@ void installArm9Handlers(void)
u32 installArm11Handlers(u32 *exceptionsPage, u32 stackAddress, u32 codeSetOffset)
{
u32 ret = 0;
u32 *initFPU;
for(initFPU = exceptionsPage; initFPU < exceptionsPage + 0x400 && (initFPU[0] != 0xE59F0008 || initFPU[1] != 0xE5900000); initFPU++);
if(initFPU == exceptionsPage + 0x400) ret = 1;
u32 *freeSpace;
for(freeSpace = initFPU; freeSpace < exceptionsPage + 0x400 && (freeSpace[0] != 0xFFFFFFFF || freeSpace[1] != 0xFFFFFFFF); freeSpace++);
if(initFPU == exceptionsPage + 0x400) ret = 1;
u32 *mcuReboot;
for(mcuReboot = exceptionsPage; mcuReboot < exceptionsPage + 0x400 && (mcuReboot[0] != 0xE59F4104 || mcuReboot[1] != 0xE3A0A0C2); mcuReboot++);
if(initFPU == exceptionsPage + 0x400) ret = 1;
u32 ret = (initFPU == exceptionsPage + 0x400 || freeSpace == exceptionsPage + 0x400 || mcuReboot == exceptionsPage + 0x400) ? 1 : 0;
mcuReboot--;
memcpy(freeSpace, arm11_exceptions_bin + 32, arm11_exceptions_bin_size - 32);