Skip to content

Instantly share code, notes, and snippets.

@TheRouletteBoi
TheRouletteBoi / Examples.cpp
Last active December 21, 2022 18:15 — forked from jordywastaken/HookManager.cpp
PlayStation 3 hooking class
uint32_t GetCurrentToc()
{
uint32_t* entry_point = *reinterpret_cast<uint32_t**>(0x1001C); // ElfHeader->e_entry
return entry_point[1];
}
template <typename R, typename... TArgs>
inline R GameCall(std::uint32_t addr, TArgs... args)
{
volatile opd_s opd = { addr, GetCurrentToc() };