From 5d868284c69a86413e3f1f019578130ca9d14d3a Mon Sep 17 00:00:00 2001 From: Aurora Date: Tue, 25 Oct 2016 15:47:04 +0200 Subject: [PATCH] Fix 11.2 FIRM support --- injector/source/patcher.c | 2 +- source/patches.c | 14 +++++++++----- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/injector/source/patcher.c b/injector/source/patcher.c index 342eaf8..8fa2b66 100644 --- a/injector/source/patcher.c +++ b/injector/source/patcher.c @@ -381,7 +381,7 @@ void patchCode(u64 progId, u8 *code, u32 size) 0xE0, 0x1E, 0xFF, 0x2F, 0xE1, 0x01, 0x01 }; - u8 mostRecentFpdVer = 7; + u8 mostRecentFpdVer = 8; u8 *fpdVer = memsearch(code, fpdVerPattern, size, sizeof(fpdVerPattern)); diff --git a/source/patches.c b/source/patches.c index 2c8d8b3..7df6f5b 100644 --- a/source/patches.c +++ b/source/patches.c @@ -285,16 +285,20 @@ u32 implementSvcGetCFWInfo(u8 *pos, u32 *arm11SvcTable, u32 baseK11VA, u8 **free u32 patchTitleInstallMinVersionChecks(u8 *pos, u32 size, u32 firmVersion) { - const u8 pattern[] = {0x0A, 0x81, 0x42, 0x02}; - u32 ret = 0; + const u8 pattern[] = {0xFF, 0x00, 0x00, 0x02}; + u32 ret; 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; }