Compare commits
5 Commits
Author | SHA1 | Date | |
---|---|---|---|
ea9b4bd3ba | |||
4cfa336786 | |||
a2e0b4095f | |||
d6c9a31ad4 | |||
4ac34037a8 |
@ -26,9 +26,7 @@ add_executable(${PROJECT_NAME}
|
|||||||
target_link_libraries(${PROJECT_NAME}
|
target_link_libraries(${PROJECT_NAME}
|
||||||
SceLibKernel_stub
|
SceLibKernel_stub
|
||||||
SceThreadmgr_stub
|
SceThreadmgr_stub
|
||||||
SceScreenShot_stub_weak
|
|
||||||
SceModulemgr_stub
|
SceModulemgr_stub
|
||||||
SceSysmodule_stub
|
|
||||||
taihenModuleUtils_stub
|
taihenModuleUtils_stub
|
||||||
taihen_stub
|
taihen_stub
|
||||||
)
|
)
|
||||||
|
@ -6,7 +6,7 @@ Best used with reScreeny: https://forum.devchroma.nl/index.php/topic,51.0.html
|
|||||||
|
|
||||||
# How do I install it?
|
# How do I install it?
|
||||||
|
|
||||||
Get it from here: https://github.com/FMudanyali/TrophyShot/releases
|
Get it from here: https://git.homd.xyz/FMudanyali/TrophyShot/releases
|
||||||
|
|
||||||
In config.txt inside tai folder,
|
In config.txt inside tai folder,
|
||||||
|
|
||||||
|
65
main.c
65
main.c
@ -2,12 +2,13 @@
|
|||||||
#include <psp2/kernel/modulemgr.h>
|
#include <psp2/kernel/modulemgr.h>
|
||||||
#include <psp2/kernel/threadmgr.h>
|
#include <psp2/kernel/threadmgr.h>
|
||||||
#include <psp2/kernel/clib.h>
|
#include <psp2/kernel/clib.h>
|
||||||
#include <psp2/sysmodule.h>
|
#include <psp2/kernel/iofilemgr.h>
|
||||||
|
|
||||||
#define printf sceClibPrintf
|
#define printf sceClibPrintf
|
||||||
|
|
||||||
int hook[1];
|
int hook[1];
|
||||||
static tai_hook_ref_t shell_hook;
|
static tai_hook_ref_t shell_hook;
|
||||||
|
static uint8_t platinum_only = 1;
|
||||||
|
|
||||||
int (*shellShot)(void);
|
int (*shellShot)(void);
|
||||||
|
|
||||||
@ -29,23 +30,79 @@ int module_get_offset(SceUID modid, int segidx, uint32_t offset, void *stub_out)
|
|||||||
|
|
||||||
int sub_81229FAC_patched(int arg1, int arg2){
|
int sub_81229FAC_patched(int arg1, int arg2){
|
||||||
int ret = TAI_CONTINUE(int, shell_hook, arg1, arg2);
|
int ret = TAI_CONTINUE(int, shell_hook, arg1, arg2);
|
||||||
|
switch(arg2 - arg1){
|
||||||
|
case 0xDC4:
|
||||||
|
printf("Regular trophy unlocked.\n");
|
||||||
|
|
||||||
|
if(platinum_only){
|
||||||
|
sceKernelDelayThread(3200000);
|
||||||
|
}else{
|
||||||
sceKernelDelayThread(1800000);
|
sceKernelDelayThread(1800000);
|
||||||
printf("INFO TrophyShot: Trophy unlocked.\n");
|
|
||||||
shellShot();
|
shellShot();
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 0x930:
|
||||||
|
printf("Platinum trophy unlocked.\n");
|
||||||
|
|
||||||
|
sceKernelDelayThread(1800000);
|
||||||
|
shellShot();
|
||||||
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
void _start() __attribute__((weak, alias("module_start")));
|
void _start() __attribute__((weak, alias("module_start")));
|
||||||
int module_start(SceSize args, void *argp) {
|
int module_start(SceSize args, void *argp) {
|
||||||
|
SceUID fd = sceIoOpen("ux0:/data/TrophyShot/platinum.txt", SCE_O_RDONLY, 0777);
|
||||||
|
if(fd < 0){
|
||||||
|
platinum_only = 0;
|
||||||
|
}
|
||||||
|
sceIoClose(fd);
|
||||||
|
|
||||||
tai_module_info_t tai_info;
|
tai_module_info_t tai_info;
|
||||||
|
int offset_shellshot, offset_dialog;
|
||||||
tai_info.size = sizeof(tai_module_info_t);
|
tai_info.size = sizeof(tai_module_info_t);
|
||||||
int ret = taiGetModuleInfo("SceShell", &tai_info);
|
int ret = taiGetModuleInfo("SceShell", &tai_info);
|
||||||
if (ret < 0) return SCE_KERNEL_START_SUCCESS;
|
if (ret < 0) return SCE_KERNEL_START_SUCCESS;
|
||||||
|
|
||||||
|
switch(tai_info.module_nid){
|
||||||
|
case 0x0552F692: // 3.60 retail
|
||||||
|
offset_shellshot = 0x14a928;
|
||||||
|
offset_dialog = 0x229fac;
|
||||||
|
break;
|
||||||
|
case 0x6CB01295: // 3.60 PDEL
|
||||||
|
case 0xEAB89D5C: // 3.60 PTEL
|
||||||
|
offset_shellshot = 0x142d5c;
|
||||||
|
offset_dialog = 0x2223e0;
|
||||||
|
break;
|
||||||
|
case 0x5549BF1F: // 3.65 retail
|
||||||
|
offset_shellshot = 0x14a980;
|
||||||
|
offset_dialog = 0x22a048;
|
||||||
|
break;
|
||||||
|
case 0x34B4D82E: // 3.67 retail
|
||||||
|
case 0x12DAC0F3: // 3.68 retail
|
||||||
|
case 0x0703C828: // 3.69 retail
|
||||||
|
case 0x2053B5A5: // 3.70 retail
|
||||||
|
case 0xF476E785: // 3.71 retail
|
||||||
|
case 0x939FFBE9: // 3.72 retail
|
||||||
|
case 0x734D476A: // 3.73 retail
|
||||||
|
case 0xE6A02F2B: // 3.65 PDEL
|
||||||
|
case 0x587F9CED: // 3.65 PTEL
|
||||||
|
offset_shellshot = 0x142db4;
|
||||||
|
offset_dialog = 0x22247c;
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
return SCE_KERNEL_START_SUCCESS;
|
||||||
|
}
|
||||||
//function found by teakhanirons
|
//function found by teakhanirons
|
||||||
module_get_offset(
|
module_get_offset(
|
||||||
tai_info.modid,
|
tai_info.modid,
|
||||||
0,
|
0,
|
||||||
0x14a928 | 1,
|
offset_shellshot | 1,
|
||||||
&shellShot
|
&shellShot
|
||||||
);
|
);
|
||||||
//function found by Graphene
|
//function found by Graphene
|
||||||
@ -53,7 +110,7 @@ int module_start(SceSize args, void *argp) {
|
|||||||
&shell_hook,
|
&shell_hook,
|
||||||
tai_info.modid,
|
tai_info.modid,
|
||||||
0,
|
0,
|
||||||
0x229fac,
|
offset_dialog,
|
||||||
1,
|
1,
|
||||||
sub_81229FAC_patched
|
sub_81229FAC_patched
|
||||||
);
|
);
|
||||||
|
Reference in New Issue
Block a user