Fix 11.2 FIRM support

This commit is contained in:
Aurora 2016-10-25 15:47:04 +02:00
parent 035751980d
commit 5d868284c6
2 changed files with 10 additions and 6 deletions

View File

@ -381,7 +381,7 @@ void patchCode(u64 progId, u8 *code, u32 size)
0xE0, 0x1E, 0xFF, 0x2F, 0xE1, 0x01, 0x01 0xE0, 0x1E, 0xFF, 0x2F, 0xE1, 0x01, 0x01
}; };
u8 mostRecentFpdVer = 7; u8 mostRecentFpdVer = 8;
u8 *fpdVer = memsearch(code, fpdVerPattern, size, sizeof(fpdVerPattern)); u8 *fpdVer = memsearch(code, fpdVerPattern, size, sizeof(fpdVerPattern));

View File

@ -285,16 +285,20 @@ u32 implementSvcGetCFWInfo(u8 *pos, u32 *arm11SvcTable, u32 baseK11VA, u8 **free
u32 patchTitleInstallMinVersionChecks(u8 *pos, u32 size, u32 firmVersion) u32 patchTitleInstallMinVersionChecks(u8 *pos, u32 size, u32 firmVersion)
{ {
const u8 pattern[] = {0x0A, 0x81, 0x42, 0x02}; const u8 pattern[] = {0xFF, 0x00, 0x00, 0x02};
u32 ret = 0; u32 ret;
u8 *off = memsearch(pos, pattern, size, sizeof(pattern)); u8 *off = memsearch(pos, pattern, size, sizeof(pattern));
if(off == NULL) if(off == NULL) ret = firmVersion == 0xFFFFFFFF ? 0 : 1;
else
{ {
if(firmVersion != 0xFFFFFFFF) ret = 1; off++;
memset32(off, 0, 8); //Zero out the first TitleID in the list
ret = 0;
} }
else off[4] = 0xE0;
return ret; return ret;
} }