From 751fa05fcd52982579467d1c0cb4cf82f6abf7fe Mon Sep 17 00:00:00 2001 From: Adib Surani Date: Fri, 23 Dec 2016 03:51:17 +1100 Subject: [PATCH 1/2] DLP region patch --- injector/source/patcher.c | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/injector/source/patcher.c b/injector/source/patcher.c index d806cec..24e0061 100644 --- a/injector/source/patcher.c +++ b/injector/source/patcher.c @@ -731,6 +731,24 @@ void patchCode(u64 progId, u16 progVer, u8 *code, u32 size) ) != 3) goto error; } + else if(progId == 0x0004013000002802LL && progVer > 0) //DLP + { + static const u8 pattern[] = { + 0x0C, 0xAC, 0xC0, 0xD8 + }, + patch[] = { + 0x00, 0x00, 0x00, 0x00 + }; + + //Patch DLP region checks + if(!patchMemory(code, size, + pattern, + sizeof(pattern), 0, + patch, + sizeof(patch), 1 + )) goto error; + } + if(CONFIG(PATCHGAMES) && (u32)((progId >> 0x20) & 0xFFFFFFEDULL) == 0x00040000) { u8 regionId = 0xFF, @@ -758,4 +776,4 @@ void patchCode(u64 progId, u16 progVer, u8 *code, u32 size) error: svcBreak(USERBREAK_ASSERT); while(true); -} \ No newline at end of file +} From 028d0ec0d5bef524bd07e08c92f092615f559267 Mon Sep 17 00:00:00 2001 From: Adib Surani Date: Fri, 23 Dec 2016 03:53:31 +1100 Subject: [PATCH 2/2] Whitespace --- injector/source/patcher.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/injector/source/patcher.c b/injector/source/patcher.c index 24e0061..8ec7a3f 100644 --- a/injector/source/patcher.c +++ b/injector/source/patcher.c @@ -739,15 +739,15 @@ void patchCode(u64 progId, u16 progVer, u8 *code, u32 size) patch[] = { 0x00, 0x00, 0x00, 0x00 }; - - //Patch DLP region checks + + //Patch DLP region checks if(!patchMemory(code, size, pattern, sizeof(pattern), 0, patch, sizeof(patch), 1 )) goto error; - } + } if(CONFIG(PATCHGAMES) && (u32)((progId >> 0x20) & 0xFFFFFFEDULL) == 0x00040000) {