From f1a942a4415e4e100e59d8fe80f613fcbfc2f38a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dami=C3=A1n=20Parrino?= Date: Sun, 23 Jun 2024 09:55:36 -0300 Subject: [PATCH 1/2] Add new firmware support (#170) * Add offsets for 10.50 * Add offsets for 10.00 * Add offsets for 9.60 * Add offsets for 10.01 --------- Co-authored-by: BestPig --- include/orbis_patches.h | 81 +++++++++++++++++++++++++++++++++++++---- source/orbis_jbc.c | 30 ++++++++++++--- 2 files changed, 98 insertions(+), 13 deletions(-) diff --git a/include/orbis_patches.h b/include/orbis_patches.h index fb4618b..31e56e1 100644 --- a/include/orbis_patches.h +++ b/include/orbis_patches.h @@ -148,8 +148,8 @@ const orbis_patch_t scesavedata_patches_900[] = { const orbis_patch_t scesavedata_patches_1100[] = { {0x00355E8, "\x00", 1}, // 'sce_' patch // {0x0034679, "\x00", 1}, // patch commented out as idk WTF it does - {0x0033E49, "\x00", 1}, - {0x0035AA6, "\x00", 1}, + {0x0033E49, "\x00", 1}, + {0x0035AA6, "\x00", 1}, {0x0000FB8, "\x1F", 1}, // sb {0, NULL, 0}, }; @@ -166,7 +166,7 @@ const orbis_patch_t shellcore_patches_505[] = { {0x06A349, "\x90\x90", 2}, // ^ {0x0686AE, "\x90\x90\x90\x90\x90\x90", 6}, // something something patches... {0x067FCA, "\x90\x90\x90\x90\x90\x90", 6}, // don't even remember doing this - {0x067798, "\x90\x90", 2}, //nevah jump + {0x067798, "\x90\x90", 2}, //nevah jump {0x0679D5, "\x90\xE9", 2}, //always jump {0, NULL, 0} }; @@ -180,7 +180,7 @@ const orbis_patch_t shellcore_patches_672[] = { {0x0007379E, "\x90\x90", 2}, // ^ {0x00070C38, "\x90\x90\x90\x90\x90\x90", 6}, // something something patches... {0x00070855, "\x90\x90\x90\x90\x90\x90", 6}, // don't even remember doing this - {0x00070054, "\x90\x90", 2}, //nevah jump + {0x00070054, "\x90\x90", 2}, //nevah jump {0x00070260, "\x90\xE9", 2}, //always jump {0, NULL, 0} }; @@ -194,7 +194,7 @@ const orbis_patch_t shellcore_patches_702[] = { {0x0006FF5F, "\x90\x90", 2}, // ^ {0x0006D058, "\x90\x90\x90\x90\x90\x90", 6}, // something something patches... {0x0006C971, "\x90\x90\x90\x90\x90\x90", 6}, // don't even remember doing this - {0x0006C1A4, "\x90\x90", 2}, //nevah jump + {0x0006C1A4, "\x90\x90", 2}, //nevah jump {0x0006C40C, "\x90\xE9", 2}, //always jump {0, NULL, 0} }; @@ -208,7 +208,7 @@ const orbis_patch_t shellcore_patches_75x[] = { {0x0006D26D, "\x90\x90", 2}, // ^ {0x0006B338, "\x90\x90\x90\x90\x90\x90", 6}, // something something patches... {0x0006AC2D, "\x90\x90\x90\x90\x90\x90", 6}, // don't even remember doing this - {0x0006A494, "\x90\x90", 2}, //nevah jump + {0x0006A494, "\x90\x90", 2}, //nevah jump {0x0006A6F0, "\x90\xE9", 2}, //always jump {0, NULL, 0} }; @@ -225,11 +225,76 @@ const orbis_patch_t shellcore_patches_900[] = { {0x0006defe, "\x90\x90", 2}, // ^ (thanks to GRModSave_Username) {0x0006C0A8, "\x90\x90\x90\x90\x90\x90", 6}, // something something patches... {0x0006BA62, "\x90\x90\x90\x90\x90\x90", 6}, // don't even remember doing this - {0x0006B2C4, "\x90\x90", 2}, //nevah jump + {0x0006B2C4, "\x90\x90", 2}, //nevah jump {0x0006B51E, "\x90\xE9", 2}, //always jump {0, NULL, 0} }; +const orbis_patch_t shellcore_patches_960[] = { + {0x0E1BBE9, "\x00", 1}, // 'sce_sdmemory' patch 1 + {0x0E1BC28, "\x00", 1}, // 'sce_sdmemory1' patch + {0x0E1BC36, "\x00", 1}, // 'sce_sdmemory2' patch + {0x0E1BC44, "\x00", 1}, // 'sce_sdmemory3' patch + {0x08B0BC0, "\x48\x31\xC0\xC3", 4}, //verify keystone patch + {0x006B610, "\x31\xC0\xC3", 3}, //transfer mount permission patch eg mount foreign saves with write permission + {0x00C6F60, "\x31\xC0\xC3", 3}, //patch psn check to load saves saves foreign to current account + {0x006CF85, "\x90\x90", 2}, // ^ (thanks to GRModSave_Username) + {0x006B157, "\x90\x90\x90\x90\x90\x90", 6}, // something something patches... + {0x006AB12, "\x90\x90\x90\x90\x90\x90", 6}, // don't even remember doing this + {0x006A374, "\x90\x90", 2}, //nevah jump + {0x006A5CE, "\xE9\xC8\x00", 3}, //always jump + {0, NULL, 0} +}; + +const orbis_patch_t shellcore_patches_1000[] = { + {0x0E0FE39, "\x00", 1}, // 'sce_sdmemory' patch 1 + {0x0E0FE78, "\x00", 1}, // 'sce_sdmemory1' patch + {0x0E0FE86, "\x00", 1}, // 'sce_sdmemory2' patch + {0x0E0FE94, "\x00", 1}, // 'sce_sdmemory3' patch + {0x08A7510, "\x48\x31\xC0\xC3", 4}, //verify keystone patch + {0x006B6A0, "\x31\xC0\xC3", 3}, //transfer mount permission patch eg mount foreign saves with write permission + {0x00C70A0, "\x31\xC0\xC3", 3}, //patch psn check to load saves saves foreign to current account + {0x006D015, "\x90\x90", 2}, // ^ (thanks to GRModSave_Username) + {0x006B1E7, "\x90\x90\x90\x90\x90\x90", 6}, // something something patches... + {0x006AbA2, "\x90\x90\x90\x90\x90\x90", 6}, // don't even remember doing this + {0x006A404, "\x90\x90", 2}, //nevah jump + {0x006A65E, "\xE9\xC8\x00", 3}, //always jump + {0, NULL, 0} +}; + +const orbis_patch_t shellcore_patches_1001[] = { + {0x0E0FE59, "\x00", 1}, // 'sce_sdmemory' patch 1 + {0x0E0FE98, "\x00", 1}, // 'sce_sdmemory1' patch + {0x0E0FEA6, "\x00", 1}, // 'sce_sdmemory2' patch + {0x0E0FEB4, "\x00", 1}, // 'sce_sdmemory3' patch + {0x08A7520, "\x48\x31\xC0\xC3", 4}, //verify keystone patch + {0x006B6A0, "\x31\xC0\xC3", 3}, //transfer mount permission patch eg mount foreign saves with write permission + {0x00C70A0, "\x31\xC0\xC3", 3}, //patch psn check to load saves saves foreign to current account + {0x006D015, "\x90\x90", 2}, // ^ (thanks to GRModSave_Username) + {0x006B1E7, "\x90\x90\x90\x90\x90\x90", 6}, // something something patches... + {0x006ABA2, "\x90\x90\x90\x90\x90\x90", 6}, // don't even remember doing this + {0x006A404, "\x90\x90", 2}, //nevah jump + {0x006A65E, "\xE9\xC8\x00", 3}, //always jump + {0, NULL, 0} +}; + +const orbis_patch_t shellcore_patches_1050[] = { + {0x0E149B9, "\x00", 1}, // 'sce_sdmemory' patch 1 + {0x0E149F8, "\x00", 1}, // 'sce_sdmemory1' patch + {0x0E14A06, "\x00", 1}, // 'sce_sdmemory2' patch + {0x0E14A14, "\x00", 1}, // 'sce_sdmemory3' patch + {0x08AAC00, "\x48\x31\xC0\xC3", 4}, //verify keystone patch + {0x006B630, "\x31\xC0\xC3", 3}, //transfer mount permission patch eg mount foreign saves with write permission + {0x00C7060, "\x31\xC0\xC3", 3}, //patch psn check to load saves saves foreign to current account + {0x006CFA5, "\x90\x90", 2}, // ^ (thanks to GRModSave_Username) + {0x006B177, "\x90\x90\x90\x90\x90\x90", 6}, // something something patches... + {0x006AB32, "\x90\x90\x90\x90\x90\x90", 6}, // don't even remember doing this + {0x006a394, "\x90\x90", 2}, //nevah jump + {0x006A5EE, "\xE9\xC8\x00", 3}, //always jump + {0, NULL, 0} +}; + + /* 11.00 WIP patches by LM and SocraticBliss */ const orbis_patch_t shellcore_patches_1100[] = { {0x0E26439, "\x00", 1}, // 'sce_sdmemory' patch 1 @@ -242,7 +307,7 @@ const orbis_patch_t shellcore_patches_1100[] = { {0x006CFA5, "\x90\x90", 2}, // ^ (thanks to GRModSave_Username) {0x006B177, "\x90\x90\x90\x90\x90\x90", 6}, // something something patches... {0x006AB32, "\x90\x90\x90\x90\x90\x90", 6}, // don't even remember doing this - {0x006A394, "\x90\x90", 2}, //nevah jump + {0x006A394, "\x90\x90", 2}, //nevah jump {0x006A5EE, "\xE9\xC8\x00", 3}, //always jump {0, NULL, 0} }; diff --git a/source/orbis_jbc.c b/source/orbis_jbc.c index cb1b3b4..77d9416 100644 --- a/source/orbis_jbc.c +++ b/source/orbis_jbc.c @@ -164,7 +164,7 @@ int get_firmware_version(void) { int fw; - // upd_version >> 16 + // upd_version >> 16 // 0x505 0x672 0x702 0x755 etc if (sysKernelGetUpdVersion(&fw) && sysKernelGetLowerLimitUpdVersion(&fw)) { @@ -392,7 +392,7 @@ int patch_save_libraries(void) savedata_patch = scesavedata_patches_505; shellcore_patch = shellcore_patches_505; break; - + case 0x672: savedata_patch = scesavedata_patches_672; shellcore_patch = shellcore_patches_672; @@ -414,8 +414,28 @@ int patch_save_libraries(void) savedata_patch = scesavedata_patches_900; shellcore_patch = shellcore_patches_900; break; - - case 0x1100: + + case 0x960: + savedata_patch = scesavedata_patches_1100; // 960 have the same offsets as 1100 for libSceSaveData + shellcore_patch = shellcore_patches_960; + break; + + case 0x1000: + savedata_patch = scesavedata_patches_1100; // 1000 have the same offsets as 1100 for libSceSaveData + shellcore_patch = shellcore_patches_1000; + break; + + case 0x1001: + savedata_patch = scesavedata_patches_1100; // 1001 have the same offsets as 1100 for libSceSaveData + shellcore_patch = shellcore_patches_1001; + break; + + case 0x1050: + savedata_patch = scesavedata_patches_1100; // 1050 have the same offsets as 1100 for libSceSaveData + shellcore_patch = shellcore_patches_1050; + break; + + case 0x1100: savedata_patch = scesavedata_patches_1100; shellcore_patch = shellcore_patches_1100; break; @@ -566,7 +586,7 @@ restart:; *proc_pid = pid; break; } - + if (pid == 1) return 0; From 7e884493d79aadf6eb1cde982a5916e44a6fa76a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dami=C3=A1n=20Parrino?= Date: Sun, 23 Jun 2024 09:57:22 -0300 Subject: [PATCH 2/2] Update source/orbis_jbc.c --- source/orbis_jbc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/orbis_jbc.c b/source/orbis_jbc.c index 77d9416..e486c30 100644 --- a/source/orbis_jbc.c +++ b/source/orbis_jbc.c @@ -429,12 +429,12 @@ int patch_save_libraries(void) savedata_patch = scesavedata_patches_1100; // 1001 have the same offsets as 1100 for libSceSaveData shellcore_patch = shellcore_patches_1001; break; - +/* case 0x1050: savedata_patch = scesavedata_patches_1100; // 1050 have the same offsets as 1100 for libSceSaveData shellcore_patch = shellcore_patches_1050; break; - +*/ case 0x1100: savedata_patch = scesavedata_patches_1100; shellcore_patch = shellcore_patches_1100;