diff --git a/source/os_functions.c b/source/os_functions.c index 83b7dcb..3d0c03d 100644 --- a/source/os_functions.c +++ b/source/os_functions.c @@ -31,6 +31,8 @@ u32 coreinit_handle __attribute__((section(".data"))) = 0; EXPORT_DECL(s32, OSDynLoad_Acquire, const char* rpl, u32 *handle); EXPORT_DECL(s32, OSDynLoad_FindExport, u32 handle, s32 isdata, const char *symbol, void *address); +EXPORT_DECL(void, OSDynLoad_Release, u32 handle); + //!---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- //! Security functions //!---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- @@ -67,6 +69,7 @@ EXPORT_DECL(s32, OSGetCoreId, void); EXPORT_DECL(void, OSSleepTicks, u64 ticks); EXPORT_DECL(u64, OSGetTick, void); EXPORT_DECL(u64, OSGetTime, void); +EXPORT_DECL(u64, OSGetSystemTime, void); EXPORT_DECL(void, OSTicksToCalendarTime, u64 time, OSCalendarTime * calendarTime); //!---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- @@ -116,6 +119,7 @@ EXPORT_DECL(u32, OSScreenPutPixelEx, u32 bufferNum, u32 posX, u32 posY, u32 colo EXPORT_DECL(void, DisassemblePPCRange, void *, void *, DisasmReport, DisasmGetSym, u32); EXPORT_DECL(bool, DisassemblePPCOpcode, u32 *, char *, u32, DisasmGetSym, u32); EXPORT_DECL(void*, OSGetSymbolName, u32, u8 *, u32); +EXPORT_DECL(void*, OSGetSymbolNameEx, u32, u8 *, u32); EXPORT_DECL(int, OSIsDebuggerInitialized, void); EXPORT_DECL(bool, OSGetSharedData, u32 type, u32 unk_r4, u8 *addr, u32 *size); @@ -178,6 +182,7 @@ EXPORT_DECL(void, addr_PrepareTitle_hook, void); EXPORT_DECL(void, DCInvalidateRange, void *buffer, u32 length); EXPORT_DECL(s32, OSDynLoad_GetModuleName, s32 handle, char *name_buffer, s32 *name_buffer_size); EXPORT_DECL(s32, OSIsHomeButtonMenuEnabled, void); +EXPORT_DECL(void, OSEnableHomeButtonMenu, s32); EXPORT_DECL(s32, OSSetScreenCapturePermissionEx, s32 tvEnabled, s32 drcEnabled); @@ -249,10 +254,13 @@ void InitOSFunctionPointers(void) { u32 *funcPointer = 0; InitAcquireOS(); + + OS_FIND_EXPORT(coreinit_handle, OSDynLoad_Release); //!---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- //! Security functions //!---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + OS_FIND_EXPORT(coreinit_handle, OSGetSecurityLevel); OS_FIND_EXPORT(coreinit_handle, OSForceFullRelaunch); //!---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- @@ -288,6 +296,7 @@ void InitOSFunctionPointers(void) { OS_FIND_EXPORT(coreinit_handle, DisassemblePPCRange); OS_FIND_EXPORT(coreinit_handle, DisassemblePPCOpcode); OS_FIND_EXPORT(coreinit_handle, OSGetSymbolName); + OS_FIND_EXPORT(coreinit_handle, OSGetSymbolNameEx); OS_FIND_EXPORT(coreinit_handle, OSIsDebuggerInitialized); OS_FIND_EXPORT(coreinit_handle, OSGetSharedData); @@ -321,6 +330,7 @@ void InitOSFunctionPointers(void) { OS_FIND_EXPORT(coreinit_handle, OSSleepTicks); OS_FIND_EXPORT(coreinit_handle, OSGetTick); OS_FIND_EXPORT(coreinit_handle, OSGetTime); + OS_FIND_EXPORT(coreinit_handle, OSGetSystemTime); OS_FIND_EXPORT(coreinit_handle, OSTicksToCalendarTime); //!---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- @@ -379,6 +389,7 @@ void InitOSFunctionPointers(void) { OS_FIND_EXPORT(coreinit_handle, DCInvalidateRange); OS_FIND_EXPORT(coreinit_handle, OSDynLoad_GetModuleName); OS_FIND_EXPORT(coreinit_handle, OSIsHomeButtonMenuEnabled); + OS_FIND_EXPORT(coreinit_handle, OSEnableHomeButtonMenu); OS_FIND_EXPORT(coreinit_handle, OSSetScreenCapturePermissionEx); //!---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- diff --git a/source/os_functions.h b/source/os_functions.h index 0b63174..ab280a1 100644 --- a/source/os_functions.h +++ b/source/os_functions.h @@ -108,6 +108,7 @@ extern void InitOSFunctionPointers(void); //!---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- extern s32 (* OSDynLoad_Acquire)(const char* rpl, u32 *handle); extern s32 (* OSDynLoad_FindExport)(u32 handle, s32 isdata, const char *symbol, void *address); +extern void (* OSDynLoad_Release)(u32 handle); //!---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- //! Security functions @@ -148,6 +149,7 @@ extern s32 (* OSGetCoreId)(void); extern void (* OSSleepTicks)(u64 ticks); extern u64 (* OSGetTick)(void); extern u64 (* OSGetTime)(void); +extern u64 (* OSGetSystemTime)(void); extern void (*OSTicksToCalendarTime)(u64 time, OSCalendarTime *calendarTime); //!---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- @@ -199,6 +201,7 @@ extern void (* OSLoadContext)(OSContext * context); extern void (*DisassemblePPCRange)(void *rangeStart, void *rangeEnd, DisasmReport disasmReport, DisasmGetSym disasmGetSym, u32 disasmOptions); extern bool (*DisassemblePPCOpcode)(u32 *opcode, char *outputBuffer, u32 bufferSize, DisasmGetSym disasmGetSym, u32 disasmOptions); extern void *(*OSGetSymbolName)(u32 addr, u8 *symbolName, u32 nameBufSize); +extern void *(*OSGetSymbolNameEx)(u32 addr, u8 *symbolName, u32 nameBufSize); extern int (*OSIsDebuggerInitialized)(void); extern bool (*OSGetSharedData)(u32 type, u32 unk_r4, u8 *addr, u32 *size); @@ -259,6 +262,7 @@ extern void (* addr_PrepareTitle_hook)(void); extern void (*DCInvalidateRange)(void *buffer, u32 length); extern s32 (*OSDynLoad_GetModuleName)(s32 handle, char *name_buffer, s32 *name_buffer_size); extern s32 (*OSIsHomeButtonMenuEnabled) (void); +extern void (*OSEnableHomeButtonMenu) (s32); extern s32 (*OSSetScreenCapturePermissionEx) (s32 tvEnabled, s32 drcEnabled); //!---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- diff --git a/source/vpad_functions.c b/source/vpad_functions.c index ffe5339..ef066c1 100644 --- a/source/vpad_functions.c +++ b/source/vpad_functions.c @@ -89,6 +89,7 @@ EXPORT_DECL(s32, VPADBASESetMotorOnRemainingCount, s32 lcdmode, s32 counter); EXPORT_DECL(void, VPADBASESetSensorBarSetting, s32 chan, s8 setting); EXPORT_DECL(void, VPADBASEGetSensorBarSetting, s32 chan, s8 *setting); EXPORT_DECL(s32, VPADSetSensorBar, s32 chan, bool on); +EXPORT_DECL(samplingCallback, VPADSetSamplingCallback, s32 chan, samplingCallback callbackn); void InitAcquireVPad(void) { if(coreinit_handle == 0) { @@ -161,6 +162,7 @@ void InitVPadFunctionPointers(void) { OS_FIND_EXPORT(vpad_handle, VPADSetLcdMode); OS_FIND_EXPORT(vpad_handle, VPADGetLcdMode); OS_FIND_EXPORT(vpad_handle, VPADSetSensorBar); + OS_FIND_EXPORT(vpad_handle, VPADSetSamplingCallback); OS_FIND_EXPORT(vpadbase_handle, VPADBASEGetMotorOnRemainingCount); OS_FIND_EXPORT(vpadbase_handle, VPADBASESetMotorOnRemainingCount); OS_FIND_EXPORT(vpadbase_handle, VPADBASESetSensorBarSetting); diff --git a/source/vpad_functions.h b/source/vpad_functions.h index 63dbd7d..9af8b3f 100644 --- a/source/vpad_functions.h +++ b/source/vpad_functions.h @@ -196,6 +196,10 @@ extern void (* VPADBASESetSensorBarSetting)(s32 chan, s8 setting); extern void (* VPADBASEGetSensorBarSetting)(s32 chan, s8 *setting); extern s32 (*VPADSetSensorBar)(s32 chan, bool on); +typedef void(*samplingCallback)(s32 chan); +extern samplingCallback ( *VPADSetSamplingCallback)(s32 chan, samplingCallback callback); + + #ifdef __cplusplus } #endif