Make developer features multi-choice, since modifying UNITINFO prevents accessing eShop on retail consoles (you can now choose "ErrDisp" for a less aggressive patch)

This commit is contained in:
TuxSH
2016-05-28 16:13:22 +02:00
parent 6a280723f8
commit 2424865fa1
4 changed files with 42 additions and 7 deletions

View File

@@ -514,6 +514,40 @@ void patchCode(u64 progId, u8 *code, u32 size)
break;
}
case 0x0004003000008A02LL: // ErrDisp
{
if(MULTICONFIG(2) == 1)
{
static const u8 unitinfoCheckPattern1[] = {
0x14, 0x00, 0xD0, 0xE5, 0xDB, 0x9A, 0x9F, 0xED
};
static const u8 unitinfoCheckPattern2[] = {
0x14, 0x00, 0xD0, 0xE5, 0x01, 0x00, 0x10, 0xE3
} ;
static const u8 unitinfoCheckPatch[] = {
0x00, 0x00, 0xA0, 0xE3
} ;
patchMemory(code, size,
unitinfoCheckPattern1,
sizeof(unitinfoCheckPattern1), 0,
unitinfoCheckPatch,
sizeof(unitinfoCheckPatch), 1
);
patchMemory(code, size,
unitinfoCheckPattern2,
sizeof(unitinfoCheckPattern2), 0,
unitinfoCheckPatch,
sizeof(unitinfoCheckPatch), 3
);
}
break;
}
default:
if(CONFIG(4))