diff --git a/Loader/Kernel/source/kproc.cpp b/Loader/Kernel/source/kproc.cpp index 61ca82a..3d55c2e 100644 --- a/Loader/Kernel/source/kproc.cpp +++ b/Loader/Kernel/source/kproc.cpp @@ -130,10 +130,9 @@ void test2_thread(void* arg) #endif klog("Registering Events..."); - //Register Events - SystemSuspendEvent = EVENTHANDLER_REGISTER(system_suspend_phase1, (void*)OnSystemSuspend, nullptr, EVENTHANDLER_PRI_FIRST); - SystemResumeEvent = EVENTHANDLER_REGISTER(system_resume_phase1, (void*)OnSystemResume, nullptr, EVENTHANDLER_PRI_FIRST); - ProcessStartEvent = EVENTHANDLER_REGISTER(process_exec_end, (void*)OnProcessStart, nullptr, EVENTHANDLER_PRI_LAST); + //SystemSuspendEvent = EVENTHANDLER_REGISTER(system_suspend_phase1, (void*)OnSystemSuspend, nullptr, EVENTHANDLER_PRI_FIRST); + //SystemResumeEvent = EVENTHANDLER_REGISTER(system_resume_phase1, (void*)OnSystemResume, nullptr, EVENTHANDLER_PRI_FIRST); + ProcessStartEvent = EVENTHANDLER_REGISTER(process_exec_end, (void*)OnProcessStart, nullptr, EVENTHANDLER_PRI_ANY); ProcessExitEvent = EVENTHANDLER_REGISTER(process_exit, (void*)OnProcessExit, nullptr, EVENTHANDLER_PRI_ANY); klog("Events Registered Sucessfully."); @@ -152,6 +151,7 @@ void test2_thread(void* arg) void kproc_Init() { klog("kproc_Init()"); + proc* kernel = proc_find_by_name("kernel"); if(kernel) { diff --git a/Loader/Userland/source/Resolver/Patches-505.c b/Loader/Userland/source/Resolver/Patches-505.c index eb18369..0592d40 100644 --- a/Loader/Userland/source/Resolver/Patches-505.c +++ b/Loader/Userland/source/Resolver/Patches-505.c @@ -5,10 +5,6 @@ void Install_505() { uint8_t *kmem; - // Enable UART - kmem = (uint8_t *)&gKernelBase[0x019ECEB0]; - kmem[0] = 0x00; - // Verbose Panics kmem = (uint8_t *)&gKernelBase[0x00171627]; kmem[0] = 0x90; @@ -19,37 +15,6 @@ void Install_505() kmem[5] = 0x65; kmem[6] = 0x8B; kmem[7] = 0x34; - - // sceSblACMgrIsAllowedSystemLevelDebugging - kmem = (uint8_t *)&gKernelBase[0x00010FC0]; - kmem[0] = 0xB8; - kmem[1] = 0x01; - kmem[2] = 0x00; - kmem[3] = 0x00; - kmem[4] = 0x00; - kmem[5] = 0xC3; - kmem[6] = 0x90; - kmem[7] = 0x90; - - kmem = (uint8_t *)&gKernelBase[0x00011730]; - kmem[0] = 0xB8; - kmem[1] = 0x01; - kmem[2] = 0x00; - kmem[3] = 0x00; - kmem[4] = 0x00; - kmem[5] = 0xC3; - kmem[6] = 0x90; - kmem[7] = 0x90; - - kmem = (uint8_t *)&gKernelBase[0x00011750]; - kmem[0] = 0xB8; - kmem[1] = 0x01; - kmem[2] = 0x00; - kmem[3] = 0x00; - kmem[4] = 0x00; - kmem[5] = 0xC3; - kmem[6] = 0x90; - kmem[7] = 0x90; // Enable rwx mapping kmem = (uint8_t *)&gKernelBase[0x000FCD48]; @@ -67,30 +32,6 @@ void Install_505() kmem[0] = 0x90; kmem[1] = 0x90; - // Enable MAP_SELF - kmem = (uint8_t*)&gKernelBase[0x000117b0]; - kmem[0] = 0xB8; - kmem[1] = 0x01; - kmem[2] = 0x00; - kmem[3] = 0x00; - kmem[4] = 0x00; - kmem[5] = 0xC3; - - kmem = (uint8_t *)&gKernelBase[0x000117c0]; - kmem[0] = 0xB8; - kmem[1] = 0x01; - kmem[2] = 0x00; - kmem[3] = 0x00; - kmem[4] = 0x00; - kmem[5] = 0xC3; - - kmem = (uint8_t *)&gKernelBase[0x0013F03F]; - kmem[0] = 0x31; - kmem[1] = 0xC0; - kmem[2] = 0x90; - kmem[3] = 0x90; - kmem[4] = 0x90; - // Patch copyinstr kmem = (uint8_t *)&gKernelBase[0x001EAB93]; kmem[0] = 0x90; @@ -103,21 +44,4 @@ void Install_505() // Patch memcpy stack kmem = (uint8_t *)&gKernelBase[0x001EA53D]; kmem[0] = 0xEB; - - // ptrace patches - kmem = (uint8_t *)&gKernelBase[0x0030D9C3]; - kmem[0] = 0x90; - kmem[1] = 0x90; - kmem[2] = 0x90; - kmem[3] = 0x90; - kmem[4] = 0x90; - kmem[5] = 0x90; - - // setlogin patch (for autolaunch check) - kmem = (uint8_t *)&gKernelBase[0x0005775C]; - kmem[0] = 0x48; - kmem[1] = 0x31; - kmem[2] = 0xC0; - kmem[3] = 0x90; - kmem[4] = 0x90; } \ No newline at end of file diff --git a/Orbis Toolbox/Menu.h b/Orbis Toolbox/Menu.h index bb66a8a..28d3fff 100644 --- a/Orbis Toolbox/Menu.h +++ b/Orbis Toolbox/Menu.h @@ -39,7 +39,7 @@ class Menu template static MenuOption* Add_Option(const char* Option_Id, Value* Data, Data_Type Type, std::function OnPress = nullptr, std::function OnPreCreate = nullptr, std::function OnPageActivating = nullptr) { - klog("Add_Option(): %s\n", Option_Id); + //klog("Add_Option(): %s\n", Option_Id); MenuOption* Temp = new MenuOption(); strcpy(Temp->Id, Option_Id); Temp->Data = (uint64_t*)Data; @@ -56,7 +56,7 @@ class Menu static MenuOption* Add_Option(const char* Option_Id, std::function OnPress = nullptr, std::function OnPreCreate = nullptr, std::function OnPageActivating = nullptr) { - klog("Add_Option(): %s\n", Option_Id); + //klog("Add_Option(): %s\n", Option_Id); MenuOption* Temp = new MenuOption(); strcpy(Temp->Id, Option_Id); Temp->Type = Type_None; diff --git a/Orbis Toolbox/Settings_Menu.cpp b/Orbis Toolbox/Settings_Menu.cpp index 8867651..d5e8e66 100644 --- a/Orbis Toolbox/Settings_Menu.cpp +++ b/Orbis Toolbox/Settings_Menu.cpp @@ -250,7 +250,7 @@ void Settings_Menu::Init() Log("Install Patches"); Patch_IsDevkit->Install_Method_Patch(Mono::KernelSysWrapper, "Sce.Vsh", "KernelSysWrapper", "IsDevKit", 0, 0, "\x48\xc7\xc0\x01\x00\x00\x00\xC3", 8); - //Patch_IsDebugMenuEnable->Install_Method_Patch(Mono::App_exe, "Sce.Vsh.ShellUI.DebugSystem", "KeyMonitorTask", "IsDebugMenuEnable", 0, 0, "\x48\xc7\xc0\x01\x00\x00\x00\xC3", 8); + Patch_IsDebugMenuEnable->Install_Method_Patch(Mono::App_exe, "Sce.Vsh.ShellUI.DebugSystem", "KeyMonitorTask", "IsDebugMenuEnable", 0, 0, "\x48\xc7\xc0\x01\x00\x00\x00\xC3", 8); Patch_AllowDebugMenu->Install_Method_Patch(Mono::platform_dll, "Sce.Vsh.ShellUI.Settings.Sbl", "SblWrapper", "SblRcMgrIsAllowDebugMenuForSettings", 0, 0, "\x48\xc7\xc0\x01\x00\x00\x00\xC3", 8); Patch_MainThreadCheck->Install_Method_Patch(Mono::PlayStation_Core, "Sce.PlayStation.Core.Runtime", "Diagnostics", "CheckRunningOnMainThread", 0, 0, "\xC3", 1); @@ -261,7 +261,6 @@ void Settings_Menu::Init() Log("Init Menu"); Menu::Init(); - //Detours Log("Init Detours"); Detour_GetManifestResourceStream = new Detour(); Detour_OnCheckVisible = new Detour(); diff --git a/Orbis Toolbox/Version.h b/Orbis Toolbox/Version.h index 52c84d4..c9a4b9b 100644 --- a/Orbis Toolbox/Version.h +++ b/Orbis Toolbox/Version.h @@ -1,11 +1,11 @@ -#pragma once -#define ORBIS_TOOLBOX_MAJOR 1 -#define ORBIS_TOOLBOX_MINOR 0 -#define ORBIS_TOOLBOX_BUILDVERSION 1152 -#define stringify(a) stringify_(a) -#define stringify_(a) #a -#if defined(ORBIS_TOOLBOX_DEBUG) -#define ORBIS_TOOLBOX_BUILDSTRING ("[Orbis Toolbox Alpha Version " stringify(ORBIS_TOOLBOX_MAJOR) "." stringify(ORBIS_TOOLBOX_MINOR) "] Dev Build " stringify(ORBIS_TOOLBOX_BUILDVERSION) " " __DATE__ " " __TIME__) -#else -#define ORBIS_TOOLBOX_BUILDSTRING ("[Orbis Toolbox Alpha Version " stringify(ORBIS_TOOLBOX_MAJOR) "." stringify(ORBIS_TOOLBOX_MINOR) "] Build " stringify(ORBIS_TOOLBOX_BUILDVERSION) " " __DATE__ " " __TIME__) -#endif +#pragma once +#define ORBIS_TOOLBOX_MAJOR 1 +#define ORBIS_TOOLBOX_MINOR 0 +#define ORBIS_TOOLBOX_BUILDVERSION 1167 +#define stringify(a) stringify_(a) +#define stringify_(a) #a +#if defined(ORBIS_TOOLBOX_DEBUG) +#define ORBIS_TOOLBOX_BUILDSTRING ("[Orbis Toolbox Alpha Version " stringify(ORBIS_TOOLBOX_MAJOR) "." stringify(ORBIS_TOOLBOX_MINOR) "] Dev Build " stringify(ORBIS_TOOLBOX_BUILDVERSION) " " __DATE__ " " __TIME__) +#else +#define ORBIS_TOOLBOX_BUILDSTRING ("[Orbis Toolbox Alpha Version " stringify(ORBIS_TOOLBOX_MAJOR) "." stringify(ORBIS_TOOLBOX_MINOR) "] Build " stringify(ORBIS_TOOLBOX_BUILDVERSION) " " __DATE__ " " __TIME__) +#endif