From 2014f298b31bfb2dd6a3c0498ea25bd523a8a934 Mon Sep 17 00:00:00 2001 From: SilicaAndPina Date: Mon, 11 Nov 2019 01:34:59 +1300 Subject: [PATCH] Try fix 1/1/2015 --- app/main.c | 9 ++++++--- kern/kern_clockset.c | 17 ++++++++++++++++- 2 files changed, 22 insertions(+), 4 deletions(-) diff --git a/app/main.c b/app/main.c index 5553dfc..402dd7f 100644 --- a/app/main.c +++ b/app/main.c @@ -267,11 +267,14 @@ void main() { printf("Split2: %llx\n",split2); printf("Updating SecureTick.. "); - ret = silRtcSetCurrentSecureTick(split2,split1); - sceRegMgrSetKeyInt("/CONFIG/DATE", "set_automatically", 0); - printf("has ret 0x%x\n",ret); + + printf("Updating NetworkTick.. "); + ret = silRtcSetCurrentNetworkTick(split2,split1); + printf("has ret 0x%x\n",ret); + + sceRegMgrSetKeyInt("/CONFIG/DATE", "set_automatically", 0); } diff --git a/kern/kern_clockset.c b/kern/kern_clockset.c index 02ced24..47971f0 100644 --- a/kern/kern_clockset.c +++ b/kern/kern_clockset.c @@ -53,7 +53,22 @@ int ksilSblPostSsMgrSetCpRtc(unsigned int timestamp) void _start() __attribute__ ((weak, alias ("module_start"))); int module_start(SceSize argc, const void *args) { - return SCE_KERNEL_START_SUCCESS; + /* + * 1/1/2015 check BTFO'd + */ + + tai_module_info_t info; + info.size = sizeof(tai_module_info_t); + if (taiGetModuleInfoForKernel(KERNEL_PID, "SceRtc", &info) < 0) + { + return SCE_KERNEL_START_SUCCESS; + } + + uint32_t patched_instruction = 0xBF00BF00; //NOP + taiInjectDataForKernel(KERNEL_PID, info.modid, 0, 0x93C, &patched_instruction, 0x4); //bcs.w LAB_81000a64 -> NOP (SetCurrentSecureTick) + taiInjectDataForKernel(KERNEL_PID, info.modid, 0, 0xA94, &patched_instruction, 0x4); //bcs.w LAB_81000bbc -> NOP (SetCurrentNetworkTick) + + return SCE_KERNEL_START_SUCCESS; } int module_stop(SceSize argc, const void *args)