diff --git a/sdk/include/offsets/ps/eboot/1.01.hpp b/sdk/include/offsets/ps/eboot/1.01.hpp index 2531731..4703a62 100644 --- a/sdk/include/offsets/ps/eboot/1.01.hpp +++ b/sdk/include/offsets/ps/eboot/1.01.hpp @@ -7,6 +7,10 @@ #define IO_REGISTER_READ_HANDLER_ORIGINAL 0x005a9d60 #define INTERRUPT_WRITE_HANDLER_ORIGINAL 0x0047da10 + // Threads + #define EBOOT_THREAD_TROPHY_PUMP 0x00856348 + #define EBOOT_SEND_TROPHY_PUMP_COMMAND_FUNC 0x004e6c60 + // Game Pad Handles #define EBOOT_PADS 0x1d26890 diff --git a/sdk/include/ps/ps.hpp b/sdk/include/ps/ps.hpp index 3bb3daf..9712916 100644 --- a/sdk/include/ps/ps.hpp +++ b/sdk/include/ps/ps.hpp @@ -108,6 +108,8 @@ namespace PS int32_t PadSetLightBar(uint8_t red, uint8_t green, uint8_t blue, uint8_t alpha); + void SendTrophyPumpCommand(uint32_t command, uint64_t handle, uint64_t trophyId); + void MountDisc(uint64_t mountDiscOptions); char* GetMountedGameCode(); void SetMountOptionFilepath(const char* filepath); diff --git a/sdk/src/ps/breakout.cpp b/sdk/src/ps/breakout.cpp index 625cf5d..97b106a 100644 --- a/sdk/src/ps/breakout.cpp +++ b/sdk/src/ps/breakout.cpp @@ -5,6 +5,11 @@ #include #include +namespace PS +{ + void SendTrophyPumpCommand(uint32_t command, uint64_t handle, uint64_t trophyId); +} + PS::Breakout::Shared* PS::Breakout::shared = (PS::Breakout::Shared*)BREAKOUT_SHARED; uint32_t PS::Breakout::nStatusIndex = 0; @@ -43,6 +48,9 @@ void PS::Breakout::init() PS::Breakout::shared->gadgetRet = GADGET(RET); PS::Breakout::shared->gadgetPopRaxRet = GADGET(POP_RAX_RET); PS::Breakout::shared->gadgetPopRbxRet = GADGET(POP_RBX_RET); + + // Exit trophy thread + PS::SendTrophyPumpCommand(2002, 0, 0); } void PS::Breakout::restore() diff --git a/sdk/src/ps/ps.cpp b/sdk/src/ps/ps.cpp index eba2eb5..56bf239 100644 --- a/sdk/src/ps/ps.cpp +++ b/sdk/src/ps/ps.cpp @@ -171,6 +171,11 @@ int32_t PS::PadSetLightBar(uint8_t red, uint8_t green, uint8_t blue, uint8_t alp return PS::Sce::PadSetLightBar(handle, &colour); } +void PS::SendTrophyPumpCommand(uint32_t command, uint64_t handle, uint64_t trophyId) +{ + PS::Breakout::call(EBOOT(EBOOT_SEND_TROPHY_PUMP_COMMAND_FUNC), command, handle, trophyId); +} + void PS::MountDisc(uint64_t mountDiscOptions) { PS::Breakout::call(EBOOT(EBOOT_MOUNT_DISC_FUNC), mountDiscOptions);