diff options
114 files changed, 5260 insertions, 702 deletions
diff --git a/include/common/kernel/cpu.h b/include/common/kernel/cpu.h new file mode 100644 index 0000000..4b42321 --- /dev/null +++ b/include/common/kernel/cpu.h @@ -0,0 +1,19 @@ +#ifndef _DOLCESDK_PSP2COMMON_KERNEL_CPU_H_ +#define _DOLCESDK_PSP2COMMON_KERNEL_CPU_H_ + +#define SCE_KERNEL_MAX_CPU 4 +#define SCE_KERNEL_CPU_MASK_SHIFT 16 +#define SCE_KERNEL_CPU_MASK_USER_0 (0x01 << SCE_KERNEL_CPU_MASK_SHIFT) +#define SCE_KERNEL_CPU_MASK_USER_1 (0x02 << SCE_KERNEL_CPU_MASK_SHIFT) +#define SCE_KERNEL_CPU_MASK_USER_2 (0x04 << SCE_KERNEL_CPU_MASK_SHIFT) +#define SCE_KERNEL_CPU_MASK_USER_3 (0x08 << SCE_KERNEL_CPU_MASK_SHIFT) + +#define SCE_KERNEL_CPU_MASK_USER_ALL \ + (SCE_KERNEL_CPU_MASK_USER_0 | SCE_KERNEL_CPU_MASK_USER_1 \ + | SCE_KERNEL_CPU_MASK_USER_2) + +#define SCE_KERNEL_CPU_MASK_USER_QUAD \ + (SCE_KERNEL_CPU_MASK_USER_0 | SCE_KERNEL_CPU_MASK_USER_1 \ + | SCE_KERNEL_CPU_MASK_USER_2 | SCE_KERNEL_CPU_MASK_USER_3) + +#endif // _DOLCESDK_PSP2COMMON_KERNEL_CPU_H_ diff --git a/include/common/kernel/threadmgr.h b/include/common/kernel/threadmgr.h new file mode 100644 index 0000000..0dc8b31 --- /dev/null +++ b/include/common/kernel/threadmgr.h @@ -0,0 +1,273 @@ +#ifndef _DOLCESDK_PSP2COMMON_KERNEL_THREADMGR_H_ +#define _DOLCESDK_PSP2COMMON_KERNEL_THREADMGR_H_ + +#include <psp2common/kernel/constants.h> +#include <psp2common/kernel/cpu.h> +#include <psp2common/kernel/types.h> + +#if defined(_LANGUAGE_C_PLUS_PLUS)||defined(__cplusplus)||defined(c_plusplus) +extern "C" { +#endif + +// Thread priority + +#define SCE_KERNEL_HIGHEST_PRIORITY_USER (64) +#define SCE_KERNEL_LOWEST_PRIORITY_USER (191) + +#define SCE_KERNEL_INDIVIDUAL_QUEUE_HIGHEST_PRIORITY (64) +#define SCE_KERNEL_INDIVIDUAL_QUEUE_LOWEST_PRIORITY (127) +#define SCE_KERNEL_COMMON_QUEUE_HIGHEST_PRIORITY (128) +#define SCE_KERNEL_COMMON_QUEUE_LOWEST_PRIORITY (191) + +#if defined(_LANGUAGE_C_PLUS_PLUS)||defined(__cplusplus)||defined(c_plusplus) +#define SCE_KERNEL_DEFAULT_PRIORITY (static_cast<SceInt32>(0x10000100)) +#else +#define SCE_KERNEL_DEFAULT_PRIORITY ((SceInt32)0x10000100) +#endif + +#define SCE_KERNEL_DEFAULT_PRIORITY_USER SCE_KERNEL_DEFAULT_PRIORITY + +#define SCE_KERNEL_CURRENT_THREAD_PRIORITY (0) + +// Thread stack size + +#define SCE_KERNEL_THREAD_STACK_SIZE_MAX SCE_KERNEL_32MiB +#define SCE_KERNEL_THREAD_STACK_SIZE_MIN SCE_KERNEL_4KiB + +#define SCE_KERNEL_THREAD_STACK_SIZE_DEFAULT SCE_KERNEL_THREAD_STACK_SIZE_MIN +#define SCE_KERNEL_THREAD_STACK_SIZE_DEFAULT_USER_MAIN SCE_KERNEL_256KiB + +#define SCE_KERNEL_STACK_SIZE_MAX SCE_KERNEL_1MiB +#define SCE_KERNEL_STACK_SIZE_MIN SCE_KERNEL_4KiB +#define SCE_KERNEL_STACK_SIZE_DEFAULT SCE_KERNEL_STACK_SIZE_MIN +#define SCE_KERNEL_STACK_SIZE_DEFAULT_USER_MAIN (0x00040000U) + +// Thread status + +#define SCE_KERNEL_THREAD_STATUS_RUNNING (0x00000001U) +#define SCE_KERNEL_THREAD_STATUS_READY (0x00000002U) +#define SCE_KERNEL_THREAD_STATUS_STANDBY (0x00000004U) +#define SCE_KERNEL_THREAD_STATUS_WAITING (0x00000008U) +#define SCE_KERNEL_THREAD_STATUS_DORMANT (0x00000010U) +#define SCE_KERNEL_THREAD_STATUS_DELETED (0x00000020U) +#define SCE_KERNEL_THREAD_STATUS_DEAD (0x00000040U) +#define SCE_KERNEL_THREAD_STATUS_STAGNANT (0x00000080U) +#define SCE_KERNEL_THREAD_STATUS_SUSPENDED (0x00000100U) + +#define SCE_KERNEL_THREAD_STATUS_MASK (0x0000ffffU) + +// Thread wait type + +#define SCE_KERNEL_WAITTYPE_DELAY (0x00000001U) +#define SCE_KERNEL_WAITTYPE_WAITTHEND (0x00000002U) +#define SCE_KERNEL_WAITTYPE_SIGNAL (0x00000004U) +#define SCE_KERNEL_WAITTYPE_WAITTHSUSPEND (0x00000008U) +#define SCE_KERNEL_WAITTYPE_EVENTFLAG (0x00000010U) +#define SCE_KERNEL_WAITTYPE_SEMAPHORE (0x00000020U) +#define SCE_KERNEL_WAITTYPE_MUTEX (0x00000040U) +#define SCE_KERNEL_WAITTYPE_RW_LOCK (0x00000080U) +#define SCE_KERNEL_WAITTYPE_COND_SIGNAL (0x00000100U) +#define SCE_KERNEL_WAITTYPE_COND_MUTEX (0x00000200U) +#define SCE_KERNEL_WAITTYPE_FAST_MUTEX (0x00001000U) +#define SCE_KERNEL_WAITTYPE_FAST_MUTEX_SPIN (0x00002000U) +#define SCE_KERNEL_WAITTYPE_EVENT (0x00010000U) +#define SCE_KERNEL_WAITTYPE_MP_EVENTS (0x00020000U) +#define SCE_KERNEL_WAITTYPE_MSG_PIPE (0x00040000U) +#define SCE_KERNEL_WAITTYPE_LW_MUTEX (0x00100000U) +#define SCE_KERNEL_WAITTYPE_LW_COND_SIGNAL (0x00200000U) +#define SCE_KERNEL_WAITTYPE_LW_COND_LW_MUTEX (0x00400000U) + +#define SCE_KERNEL_WAITTYPE_DELAY_CB (0x80000001U) +#define SCE_KERNEL_WAITTYPE_WAITTHEND_CB (0x80000002U) +#define SCE_KERNEL_WAITTYPE_SIGNAL_CB (0x80000004U) +#define SCE_KERNEL_WAITTYPE_WAITTHSUSPEND_CB (0x80000008U) +#define SCE_KERNEL_WAITTYPE_EVENTFLAG_CB (0x80000010U) +#define SCE_KERNEL_WAITTYPE_SEMAPHORE_CB (0x80000020U) +#define SCE_KERNEL_WAITTYPE_MUTEX_CB (0x80000040U) +#define SCE_KERNEL_WAITTYPE_RW_LOCK_CB (0x80000080U) +#define SCE_KERNEL_WAITTYPE_COND_SIGNAL_CB (0x80000100U) +#define SCE_KERNEL_WAITTYPE_COND_MUTEX_CB (0x80000200U) +#define SCE_KERNEL_WAITTYPE_FAST_MUTEX_CB (0x80001000U) +#define SCE_KERNEL_WAITTYPE_FAST_MUTEX_SPIN_CB (0x80002000U) +#define SCE_KERNEL_WAITTYPE_EVENT_CB (0x80010000U) +#define SCE_KERNEL_WAITTYPE_MP_EVENTS_CB (0x80020000U) +#define SCE_KERNEL_WAITTYPE_MSG_PIPE_CB (0x80040000U) +#define SCE_KERNEL_WAITTYPE_LW_MUTEX_CB (0x80100000U) +#define SCE_KERNEL_WAITTYPE_LW_COND_SIGNAL_CB (0x80200000U) +#define SCE_KERNEL_WAITTYPE_LW_COND_LW_MUTEX_CB (0x80400000U) + +// Thread UID + +#define SCE_KERNEL_THREAD_ID_SELF (0) + +#if defined(_LANGUAGE_C_PLUS_PLUS)||defined(__cplusplus)||defined(c_plusplus) +#define SCE_KERNEL_THREAD_ID_USER (static_cast<SceUID>(0xfffffff0)) +#else +#define SCE_KERNEL_THREAD_ID_USER ((SceUID)0xfffffff0) +#endif + +// Thread synchronisation object UID class + +#define SCE_KERNEL_THREADMGR_UID_CLASS_THREAD (1) +#define SCE_KERNEL_THREADMGR_UID_CLASS_SEMA (2) +#define SCE_KERNEL_THREADMGR_UID_CLASS_EVENT_FLAG (3) +#define SCE_KERNEL_THREADMGR_UID_CLASS_MUTEX (4) +#define SCE_KERNEL_THREADMGR_UID_CLASS_COND (5) +#define SCE_KERNEL_THREADMGR_UID_CLASS_TIMER (6) +#define SCE_KERNEL_THREADMGR_UID_CLASS_MSG_PIPE (7) +#define SCE_KERNEL_THREADMGR_UID_CLASS_CALLBACK (8) +#define SCE_KERNEL_THREADMGR_UID_CLASS_THREAD_EVENT (9) +#define SCE_KERNEL_THREADMGR_UID_CLASS_LW_MUTEX (10) +#define SCE_KERNEL_THREADMGR_UID_CLASS_LW_COND (11) +#define SCE_KERNEL_THREADMGR_UID_CLASS_RW_LOCK (12) +#define SCE_KERNEL_THREADMGR_UID_CLASS_SIMPLE_EVENT (13) + +// Thread CPU affinity + +#define SCE_KERNEL_THREAD_CPU_AFFINITY_MASK_DEFAULT (0) + +// Thread function type + +typedef SceInt32 (*SceKernelThreadEntry)(SceSize argSize, void *pArgBlock); + +// Thread VFP exception mask + +#define SCE_KERNEL_VFP_EXCEPTION_MASK_QCE (0x08000000U) +#define SCE_KERNEL_VFP_EXCEPTION_MASK_IDE (0x00000080U) +#define SCE_KERNEL_VFP_EXCEPTION_MASK_IXE (0x00000010U) +#define SCE_KERNEL_VFP_EXCEPTION_MASK_UFE (0x00000008U) +#define SCE_KERNEL_VFP_EXCEPTION_MASK_OFE (0x00000004U) +#define SCE_KERNEL_VFP_EXCEPTION_MASK_DZE (0x00000002U) +#define SCE_KERNEL_VFP_EXCEPTION_MASK_IOE (0x00000001U) + +#define SCE_KERNEL_VFP_EXCEPTION_MASK_ALL \ + (SCE_KERNEL_VFP_EXCEPTION_MASK_QCE | SCE_KERNEL_VFP_EXCEPTION_MASK_IDE | \ + SCE_KERNEL_VFP_EXCEPTION_MASK_IXE | SCE_KERNEL_VFP_EXCEPTION_MASK_UFE | \ + SCE_KERNEL_VFP_EXCEPTION_MASK_OFE | SCE_KERNEL_VFP_EXCEPTION_MASK_DZE | \ + SCE_KERNEL_VFP_EXCEPTION_MASK_IOE) + +// Thread synchronisation object attribute + +#define SCE_KERNEL_ATTR_SINGLE (0x00000000U) +#define SCE_KERNEL_ATTR_MULTI (0x00001000U) +#define SCE_KERNEL_ATTR_TH_FIFO (0x00000000U) +#define SCE_KERNEL_ATTR_TH_PRIO (0x00002000U) +#define SCE_KERNEL_ATTR_MS_FIFO (0x00000000U) +#define SCE_KERNEL_ATTR_MS_PRIO (0x00000000U) +#define SCE_KERNEL_ATTR_OPENABLE (0x00000080U) + +#define SCE_KERNEL_OPEN_LIMIT_MAX (127) + +// Thread event + +#define SCE_KERNEL_THREAD_EVENT_TYPE_START (0x04) +#define SCE_KERNEL_THREAD_EVENT_TYPE_EXIT (0x08) + +#define SCE_KERNEL_THREAD_EVENT_TYPE_ALL \ + (SCE_KERNEL_THREAD_EVENT_TYPE_START | SCE_KERNEL_THREAD_EVENT_TYPE_EXIT) + +#define SCE_KERNEL_EVENT_ATTR_MANUAL_RESET (0x00000000U) +#define SCE_KERNEL_EVENT_ATTR_AUTO_RESET (0x00000100U) + +#define SCE_KERNEL_ATTR_NOTIFY_CB_ALL (0x00000000U) +#define SCE_KERNEL_ATTR_NOTIFY_CB_WAKEUP_ONLY (0x00000800U) + +#define SCE_KERNEL_EVENT_IN (0x00000001U) +#define SCE_KERNEL_EVENT_OUT (0x00000002U) +#define SCE_KERNEL_EVENT_CREATE (0x00000004U) +#define SCE_KERNEL_EVENT_DELETE (0x00000008U) +#define SCE_KERNEL_EVENT_ERROR (0x00000010U) +#define SCE_KERNEL_EVENT_OPEN (0x00000100U) +#define SCE_KERNEL_EVENT_CLOSE (0x00000200U) +#define SCE_KERNEL_EVENT_TIMER (0x00008000U) +#define SCE_KERNEL_EVENT_DATA_EXIST (0x00010000U) + +#define SCE_KERNEL_EVENT_USER_DEFINED_MASK (0xff000000U) + +#define SCE_KERNEL_EVENT_WAIT_MODE_OR (0x00000001U) +#define SCE_KERNEL_EVENT_WAIT_MODE_AND (0x00000002U) + +// Thread timer + +#define SCE_KERNEL_TIMER_TYPE_SET_EVENT (0) +#define SCE_KERNEL_TIMER_TYPE_PULSE_EVENT (1) + +// Thread message pipe + +#define SCE_KERNEL_MSG_PIPE_ATTR_TH_PRIO_S (0x00000001U) +#define SCE_KERNEL_MSG_PIPE_ATTR_TH_PRIO_R (0x00000002U) +#define SCE_KERNEL_MSG_PIPE_ATTR_TH_PRIO \ + (SCE_KERNEL_MSG_PIPE_ATTR_TH_PRIO_S | SCE_KERNEL_MSG_PIPE_ATTR_TH_PRIO_R) + +#define SCE_KERNEL_MSG_PIPE_ATTR_TH_FIFO_S (0x00000004U) +#define SCE_KERNEL_MSG_PIPE_ATTR_TH_FIFO_R (0x00000008U) +#define SCE_KERNEL_MSG_PIPE_ATTR_TH_FIFO \ + (SCE_KERNEL_MSG_PIPE_ATTR_TH_FIFO_S | SCE_KERNEL_MSG_PIPE_ATTR_TH_FIFO_R) + +#define SCE_KERNEL_MSG_PIPE_MODE_ASAP (0x00000000U) +#define SCE_KERNEL_MSG_PIPE_MODE_FULL (0x00000001U) + +#define SCE_KERNEL_MSG_PIPE_MODE_WAIT (0x00000000U) +#define SCE_KERNEL_MSG_PIPE_MODE_DONT_WAIT (0x00000010U) + +#define SCE_KERNEL_MSG_PIPE_MODE_DONT_REMOVE (0x00000100U) + +#define SCE_KERNEL_MSG_PIPE_TYPE_USER_MAIN (64) +#define SCE_KERNEL_MSG_PIPE_TYPE_USER_CDRAM (66) + +#define SCE_KERNEL_MSG_PIPE_OPT_ATTR_OPEN_LIMITATION (0x00000100U) + +// Thread event flag + +#define SCE_KERNEL_EVF_ATTR_TH_FIFO SCE_KERNEL_ATTR_TH_FIFO +#define SCE_KERNEL_EVF_ATTR_TH_PRIO SCE_KERNEL_ATTR_TH_PRIO +#define SCE_KERNEL_EVF_ATTR_SINGLE SCE_KERNEL_ATTR_SINGLE +#define SCE_KERNEL_EVF_ATTR_MULTI SCE_KERNEL_ATTR_MULTI + +#define SCE_KERNEL_EVF_WAITMODE_AND (0x00000000U) +#define SCE_KERNEL_EVF_WAITMODE_OR (0x00000001U) +#define SCE_KERNEL_EVF_WAITMODE_CLEAR_ALL (0x00000002U) +#define SCE_KERNEL_EVF_WAITMODE_CLEAR_PAT (0x00000004U) + +// Thread semaphore + +#define SCE_KERNEL_SEMA_ATTR_TH_FIFO SCE_KERNEL_ATTR_TH_FIFO +#define SCE_KERNEL_SEMA_ATTR_TH_PRIO SCE_KERNEL_ATTR_TH_PRIO + +// Thread mutex + +#define SCE_KERNEL_MUTEX_ATTR_TH_FIFO SCE_KERNEL_ATTR_TH_FIFO +#define SCE_KERNEL_MUTEX_ATTR_TH_PRIO SCE_KERNEL_ATTR_TH_PRIO +#define SCE_KERNEL_MUTEX_ATTR_RECURSIVE (0x00000002U) +#define SCE_KERNEL_MUTEX_ATTR_CEILING (0x00000004U) + +// Thread condition + +#define SCE_KERNEL_COND_ATTR_TH_FIFO SCE_KERNEL_ATTR_TH_FIFO +#define SCE_KERNEL_COND_ATTR_TH_PRIO SCE_KERNEL_ATTR_TH_PRIO + +// Thread lightweight mutex + +#define SCE_KERNEL_LW_MUTEX_ATTR_TH_FIFO SCE_KERNEL_ATTR_TH_FIFO +#define SCE_KERNEL_LW_MUTEX_ATTR_TH_PRIO SCE_KERNEL_ATTR_TH_PRIO +#define SCE_KERNEL_LW_MUTEX_ATTR_RECURSIVE (0x00000002U) + +// Thread lightweight condition + +#define SCE_KERNEL_LW_COND_ATTR_TH_FIFO SCE_KERNEL_ATTR_TH_FIFO +#define SCE_KERNEL_LW_COND_ATTR_TH_PRIO SCE_KERNEL_ATTR_TH_PRIO + +// Thread reader/writer lock + +#define SCE_KERNEL_RW_LOCK_ATTR_TH_FIFO SCE_KERNEL_ATTR_TH_FIFO +#define SCE_KERNEL_RW_LOCK_ATTR_TH_PRIO SCE_KERNEL_ATTR_TH_PRIO +#define SCE_KERNEL_RW_LOCK_ATTR_RECURSIVE (0x00000002U) +#define SCE_KERNEL_RW_LOCK_ATTR_CEILING (0x00000004U) + +#define SCE_KERNEL_RW_LOCK_CANCEL_WITH_WRITE_LOCK (1) + +#if defined(_LANGUAGE_C_PLUS_PLUS)||defined(__cplusplus)||defined(c_plusplus) +} +#endif + +#endif diff --git a/include/kernel/appmgr.h b/include/kernel/appmgr.h new file mode 100644 index 0000000..758c339 --- /dev/null +++ b/include/kernel/appmgr.h @@ -0,0 +1,52 @@ +#ifndef _PSP2_KERNEL_APPMGR_H_ +#define _PSP2_KERNEL_APPMGR_H_ + +#include <psp2kern/types.h> + +#ifdef __cplusplus +extern "C" { +#endif + +/** + * @brief Kill a process. + * @param[in] pid The process to kill. + * @return Zero on success, else < 0. + */ +int sceAppMgrKillProcess(SceUID pid); + +typedef struct +{ + size_t size; + unsigned int unk_4; //<! set to 0x80000000 to break on launch + unsigned int unk_8; + unsigned int unk_C; + unsigned int unk_10; + unsigned int unk_14; + unsigned int unk_18; + unsigned int unk_1C; + unsigned int unk_20; + unsigned int unk_24; + unsigned int unk_28; + unsigned int unk_2C; + unsigned int unk_30; +} SceAppMgrLaunchParam; + +/** + * @brief Launch an application for debugging + * + * @param[in] path Path to the executable to load + * @param[in] args Arguments to pass to the executable and to configure appmgr + * @param[in] arg_size The size of the args passed in + * @param[in] type Set to 0x80000000 for debugging launch + * @param[in] param pointer to launch params + * @param unk unknown, set to nullptr + * + * @return pid on success, else < 0. + */ +int sceAppMgrLaunchAppByPath(const char *path, const char *args, unsigned arg_size, unsigned int type, const SceAppMgrLaunchParam *param, void *unk); + +#ifdef __cplusplus +} +#endif + +#endif /* _PSP2_KERNEL_APPMGR_H_ */ diff --git a/include/kernel/audioout.h b/include/kernel/audioout.h new file mode 100644 index 0000000..c1381ee --- /dev/null +++ b/include/kernel/audioout.h @@ -0,0 +1,21 @@ +#ifndef _PSP2_KERNEL_AUDIOOUT_H_ +#define _PSP2_KERNEL_AUDIOOUT_H_ + +#ifdef __cplusplus +extern "C" { +#endif + +typedef enum SceAudioOutPortType { + //! Used for main audio output, freq must be set to 48000 Hz + SCE_AUDIO_OUT_PORT_TYPE_MAIN = 0, + //! Used for Background Music port + SCE_AUDIO_OUT_PORT_TYPE_BGM = 1, + //! Used for voice chat port + SCE_AUDIO_OUT_PORT_TYPE_VOICE = 2 +} SceAudioOutPortType; + +#ifdef __cplusplus +} +#endif + +#endif /* _PSP2_KERNEL_AUDIOOUT_H_ */ diff --git a/include/kernel/display.h b/include/kernel/display.h index 7c6cea4..5cfdc9a 100644 --- a/include/kernel/display.h +++ b/include/kernel/display.h @@ -109,7 +109,7 @@ int sceDisplayGetFrameBuf(SceDisplayFrameBuf *pParam, int sync); * * @return 0 on success, < 0 on error. */ -int sceDisplayGetFrameBufInfoForPid(SceUID pid, int head, int index, SceDisplayFrameBufInfo *info); +int sceDisplayGetProcFrameBufInternal(SceUID pid, int head, int index, SceDisplayFrameBufInfo *info); /** * Get maximum framebuffer resolution @@ -266,6 +266,29 @@ int sceDisplayRegisterFrameBufCallbackInternal(int display, SceUID uid); */ int sceDisplaySetInvertColors(int display, int enable); +/** + * Set display plane owner + * + * @param[in] head - Use 0 for OLED/LCD and 1 for HDMI + * @param[in] index - Can be 0 or 1 + * @param[in] pid - PID of the new owner + * + * @return 0 on success, < 0 on error. +*/ +int sceDisplaySetOwner(int head, int index, SceUID pid); + +/** + * Set display scaling configuration + * + * @param[in] scale - Scaling factor between 0.80000001 and 1.20000005 + * @param[in] head - Use 0 for OLED/LCD and 1 for HDMI + * @param[in] index - Can be 0 or 1 + * @param[in] flags - Returns error if ((flags & 1) && (flags & 0xC0)) + * + * @return 0 on success, < 0 on error. +*/ +int sceDisplaySetScaleConf(float scale, int head, int index, int flags); + #ifdef __cplusplus } #endif diff --git a/include/kernel/idstorage.h b/include/kernel/idstorage.h new file mode 100644 index 0000000..a28e310 --- /dev/null +++ b/include/kernel/idstorage.h @@ -0,0 +1,30 @@ +#ifndef _PSP2_KERNEL_IDSTORAGE_H_ +#define _PSP2_KERNEL_IDSTORAGE_H_ + +#include <psp2kern/types.h> + +#ifdef __cplusplus +extern "C" { +#endif + +/** + * @param[in] leafnum - 0x0 ~ 0x80 / leafnum > 0x80 = error + * @param[out] buf - Leaf data, size is 512 byte + * + * @return 0 on success, < 0 on error. + */ +int sceIdStorageReadLeaf(int leafnum, void *buf); + +/** + * @param[in] leafnum - 0x0 ~ 0x80 / leafnum > 0x80 = error + * @param[in] buf - Leaf data, size is 512 byte + * + * @return 0 on success, < 0 on error. + */ +int sceIdStorageWriteLeaf(int leafnum, const void *buf); + +#ifdef __cplusplus +} +#endif + +#endif /* _PSP2_KERNEL_IDSTORAGE_H_ */ diff --git a/include/kernel/kernel/cpu.h b/include/kernel/kernel/cpu.h index d79d416..4765d52 100644 --- a/include/kernel/kernel/cpu.h +++ b/include/kernel/kernel/cpu.h @@ -1,6 +1,7 @@ #ifndef _PSP2_KERNEL_CPU_H_ #define _PSP2_KERNEL_CPU_H_ +#include <psp2common/kernel/cpu.h> #include <psp2kern/types.h> #ifdef __cplusplus @@ -19,7 +20,7 @@ extern "C" { } while(0) /** - * @brief Call this when existing a syscall + * @brief Call this when exiting a syscall * * @param state The state */ @@ -28,6 +29,18 @@ extern "C" { asm volatile ("mcr p15, 0, %0, c13, c0, 3" :: "r" (state) : "memory"); \ } while (0) + +/** + * @brief Writeback a range of L1 dcache (without L2) + * + * @param ptr The pointer + * @param[in] len The length + * + * @return Zero on success + */ +int sceKernelCpuDcacheWritebackRange(const void *ptr, size_t len); + + /** * @brief Save process context * @@ -82,8 +95,10 @@ static inline int sceKernelCpuUnrestrictedMemcpy(void *dst, const void *src, siz asm ("mrc p15, 0, %0, c3, c0, 0" : "=r" (prev_dacr)); asm ("mcr p15, 0, %0, c3, c0, 0" :: "r" (0xFFFF0000)); - memcpy(dst, src, len); - sceKernelCpuDcacheWritebackRange((uintptr_t)dst & ~0x1F, (len + 0x1F) & ~0x1F); + for (size_t i=0; i < len; i++) { + ((char *) dst)[i] = ((char *) src)[i]; + } + sceKernelCpuDcacheWritebackRange((void *)((uintptr_t)dst & ~0x1F), (len + 0x1F) & ~0x1F); asm ("mcr p15, 0, %0, c3, c0, 0" :: "r" (prev_dacr)); return 0; @@ -113,16 +128,6 @@ int sceKernelCpuDisableInterrupts(void); int sceKernelCpuEnableInterrupts(int flags); /** - * @brief Writeback a range of L1 dcache (without L2) - * - * @param ptr The pointer - * @param[in] len The length - * - * @return Zero on success - */ -int sceKernelCpuDcacheWritebackRange(const void *ptr, size_t len); - -/** * @brief Invalidate a range of L1 dcache (without L2) * * @param ptr The pointer diff --git a/include/kernel/kernel/dmac.h b/include/kernel/kernel/dmac.h index 60718be..669257e 100644 --- a/include/kernel/kernel/dmac.h +++ b/include/kernel/kernel/dmac.h @@ -1,11 +1,13 @@ #ifndef _PSP2_KERNEL_DMAC_H_ #define _PSP2_KERNEL_DMAC_H_ +#include <stddef.h> + #ifdef __cplusplus extern "C" { #endif -/*** +/** * DMA memcpy * * @param[in] dst - Destination @@ -16,7 +18,7 @@ extern "C" { */ void *sceDmacMemcpy(void *dst, const void *src, size_t size); -/*** +/** * DMA memset * * @param[in] dst - Destination diff --git a/include/kernel/kernel/excpmgr.h b/include/kernel/kernel/excpmgr.h index d9c83ed..c852da6 100644 --- a/include/kernel/kernel/excpmgr.h +++ b/include/kernel/kernel/excpmgr.h @@ -16,7 +16,7 @@ typedef enum SceExcpKind { SCE_EXCP_FIQ = 7 } SceExcpKind; -/*** +/** * Get a pointer to SceExcpmgr's internal data * * This is only used by exception handlers. diff --git a/include/kernel/kernel/modulemgr.h b/include/kernel/kernel/modulemgr.h index 804eb63..c8e115c 100644 --- a/include/kernel/kernel/modulemgr.h +++ b/include/kernel/kernel/modulemgr.h @@ -21,36 +21,39 @@ extern "C" { #define SCE_KERNEL_STOP_CANCEL SCE_KERNEL_STOP_FAIL /** @} */ -typedef struct -{ - SceUInt size; //!< this structure size (0x18) +typedef struct SceKernelModuleName { + char s[0x1C]; +} SceKernelModuleName; + +typedef struct SceKernelSegmentInfo { + SceSize size; //!< this structure size (0x18) SceUInt perms; //!< probably rwx in low bits void *vaddr; //!< address in memory - SceUInt memsz; //!< size in memory - SceUInt flags; //!< meaning unknown - SceUInt res; //!< unused? + SceSize memsz; //!< size in memory + SceSize filesz; //!< original size of memsz + SceUInt res; //!< unused } SceKernelSegmentInfo; -typedef struct -{ - SceUInt size; //!< 0x1B8 for Vita 1.x - SceUInt handle; //!< kernel module handle? - SceUInt flags; //!< some bits. could be priority or whatnot +typedef struct SceKernelModuleInfo { + SceSize size; //!< 0x1B8 for Vita 1.x + SceUID modid; + uint16_t modattr; + uint8_t modver[2]; char module_name[28]; SceUInt unk28; - void *module_start; - SceUInt unk30; - void *module_stop; - void *exidxTop; - void *exidxBtm; - SceUInt unk40; - SceUInt unk44; + void *start_entry; + void *stop_entry; + void *exit_entry; + void *exidx_top; + void *exidx_btm; + void *extab_top; + void *extab_btm; void *tlsInit; SceSize tlsInitSize; SceSize tlsAreaSize; char path[256]; SceKernelSegmentInfo segments[4]; - SceUInt type; //!< 6 = user-mode PRX? + SceUInt type; //!< 6 = user-mode PRX? } SceKernelModuleInfo; typedef struct { @@ -64,41 +67,452 @@ typedef struct { typedef struct { SceSize size; - char versionString[16]; - SceUInt unk_14; - SceUInt unk_18; - SceUInt unk_1C; + char versionString[0x1C]; SceUInt version; SceUInt unk_24; } SceKernelFwInfo; +typedef struct { + SceSize size; //!< sizeof(SceKernelSegmentInfo2) (0x14) + int perm; + void *vaddr; + uint32_t memsz; + int unk_10; +} SceKernelSegmentInfo2; + +typedef struct { + SceSize size; + SceUID modid; + uint32_t version; + uint32_t module_version; + uint32_t unk10; + void *unk14; + uint32_t unk18; + void *unk1C; + void *unk20; + char module_name[28]; + uint32_t unk40; + uint32_t unk44; + uint32_t nid; + int segments_num; + union { + struct { + SceKernelSegmentInfo2 SegmentInfo[1]; + uint32_t addr[4]; + } seg1; + struct { + SceKernelSegmentInfo2 SegmentInfo[2]; + uint32_t addr[4]; + } seg2; + struct { + SceKernelSegmentInfo2 SegmentInfo[3]; + uint32_t addr[4]; + } seg3; + struct { + SceKernelSegmentInfo2 SegmentInfo[4]; + uint32_t addr[4]; + } seg4; + }; +} SceKernelModuleListInfo; + +typedef struct SceKernelModuleLibraryInfo { + SceSize size; //!< sizeof(SceKernelModuleLibraryInfo) : 0x120 + SceUID libid; + uint32_t libnid; + uint16_t libver[2]; + uint16_t entry_num_function; + uint16_t entry_num_variable; + uint16_t unk_0x14; + uint16_t unk_0x16; + char library_name[0x100]; // offset : 0x18 + uint32_t unk_0x118; + SceUID modid2; +} SceKernelModuleLibraryInfo; + +/** + * @brief Register syscall function + * + * @param[in] syscall_id - register syscall id (Must be less than 0x1000) + * @param[in] func - syscall function + * + * @return none + */ +void sceKernelRegisterSyscall(int syscall_id, const void *func); + +/** + * @brief Setup kernel for modulemgr + * + * @note - allocate and initialize syscall table + * + * @return none + */ +void sceKernelSetupForModulemgr(void); + +/** + * @brief Get module id list + * + * @param[in] pid - target pid + * @param[in] flags1 - unknown, use 0x7FFFFFFF + * @param[in] flags2 - unknown, use 1 + * @param[out] modids - info output pointer + * @param[inout] num - in:list max num, out:get modid num + * + * @return 0 on success, < 0 on error. + */ int sceKernelGetModuleList(SceUID pid, int flags1, int flags2, SceUID *modids, size_t *num); + +/** + * @par Example1: Get max to 10 kernel module info + * @code + * SceKernelModuleListInfo infolists[10]; + * size_t num = 10;// Get max + * uint32_t offset = 0; + * SceKernelModuleListInfo *info = &infolists[0]; + * + * sceKernelGetModuleList2(0x10005, infolists, &num); + * + * for(int i=0;i<num;i++){ + * printf("name : %s\n", info->module_name); + * + * if(info->segments_num == 1){ + * printf("vaddr:0x%08X\n", info->seg1.SegmentInfo[0].vaddr); + * }else if(info->segments_num == 2){ + * printf("vaddr:0x%08X\n", info->seg2.SegmentInfo[0].vaddr); + * } + * info = ((char *)info) + info->size; + * } + * @endcode + * + * @param[in] pid - target pid + * @param[out] infolists - infolists output + * @param[inout] num - Specify the maximum number of modinfolist to retrieve. If the function returns 0, it returns the number of modules loaded in the target pid in num + * + * @return 0 on success, < 0 on error. + */ +int sceKernelGetModuleList2(SceUID pid, SceKernelModuleListInfo *infolists, size_t *num); + +/** + * @brief Get module info + * + * @param[in] pid - target pid + * @param[in] modid - target module id + * @param[out] info - info output pointer + * + * @return 0 on success, < 0 on error. + */ int sceKernelGetModuleInfo(SceUID pid, SceUID modid, SceKernelModuleInfo *info); -int sceKernelGetModuleInternal(SceUID modid, void **module); +/** + * @brief Get module info mini by module address + * + * @param[in] pid - target pid + * @param[in] module_addr - target module address, Also possible with data segment address + * @param[out] module_nid - can also set NULL, module nid output + * @param[out] program_text_addr - can also set NULL, program text addr output + * @param[out] module_name - can also set NULL, module name output + * + * @return 0 on success, < 0 on error. + */ +int sceKernelGetModuleInfoMinByAddr(SceUID pid, const void *module_addr, uint32_t *module_nid, const void **program_text_addr, SceKernelModuleName *module_name); + +/** + * @brief Get module info (internal) + * + * @param[in] modid - target module id + * @param[out] module_info - module_info output pointer + * + * @return 0 on success, < 0 on error. + */ +int sceKernelGetModuleInternal(SceUID modid, void **module_info); + +/** + * @brief Get module id by module address + * + * @param[in] pid - target pid + * @param[in] module_addr - target module address + * + * @return modid on success, < 0 on error. + */ +SceUID sceKernelGetModuleIdByAddr(SceUID pid, const void *module_addr); + +/** + * @brief search kernel module by module name + * + * @param[in] module_name - target module name + * + * @return modid on success, < 0 on error. + */ +SceUID sceKernelSearchModuleByName(const char *module_name); + +/** + * @brief Get fw info + * + * @param[out] data - fw info output pointer + * + * @return 0 on success, < 0 on error. + */ int sceKernelGetSystemSwVersion(SceKernelFwInfo *data); -int sceKernelLoadStartModule(const char *path, SceSize args, void *argp, int flags, SceKernelLMOption *option, int *status); +/** + * @brief load module (kernel only) + * + * @param[in] path - module path + * @param[in] flags - unknown, set zero + * @param[in] option - unknown + * + * @return modid on success, < 0 on error. + */ SceUID sceKernelLoadModule(const char *path, int flags, SceKernelLMOption *option); + +/** + * @brief start module (kernel only) + * + * @param[in] modid - target module id + * @param[in] args - module start args + * @param[in] argp - module start argp + * @param[in] flags - unknown, set zero + * @param[in] option - unknown + * @param[out] status - module_start res, SCE_KERNEL_START_SUCCESS etc... + * + * @return 0 on success, < 0 on error. + */ int sceKernelStartModule(SceUID modid, SceSize args, void *argp, int flags, SceKernelLMOption *option, int *status); -int sceKernelUnloadModule(SceUID modid, int flags, SceKernelULMOption *option); + +/** + * @brief load and start module (kernel only) + * + * @param[in] path - module path + * @param[in] args - module start args + * @param[in] argp - module start argp + * @param[in] flags - unknown, set zero + * @param[in] option - unknown + * @param[out] status - module_start res, SCE_KERNEL_START_SUCCESS etc... + * + * @return modid on success, < 0 on error. + */ +SceUID sceKernelLoadStartModule(const char *path, SceSize args, void *argp, int flags, SceKernelLMOption *option, int *status); + +/** + * @brief stop module (kernel only) + * + * @param[in] modid - target module id + * @param[in] args - module stop args + * @param[in] argp - module stop argp + * @param[in] flags - unknown, set zero + * @param[in] option - unknown + * @param[out] status - module_stop res, SCE_KERNEL_STOP_SUCCESS etc... + * + * @return 0 on success, < 0 on error. + */ int sceKernelStopModule(SceUID modid, SceSize args, void *argp, int flags, SceKernelULMOption *option, int *status); + +/** + * @brief unload module (kernel only) + * + * @param[in] modid - target module id + * @param[in] flags - unknown, set zero + * @param[in] option - unknown + * + * @return 0 on success, < 0 on error. + */ +int sceKernelUnloadModule(SceUID modid, int flags, SceKernelULMOption *option); + +/** + * @brief stop and unload module (kernel only) + * + * @param[in] modid - target module id + * @param[in] args - module stop args + * @param[in] argp - module stop argp + * @param[in] flags - unknown, set zero + * @param[in] option - unknown + * @param[out] status - module_stop res, SCE_KERNEL_STOP_SUCCESS etc... + * + * @return 0 on success, < 0 on error. + */ int sceKernelStopUnloadModule(SceUID modid, SceSize args, void *argp, int flags, SceKernelULMOption *option, int *status); -SceUID sceKernelLoadStartSharedModuleForPid(SceUID pid, const char *path, SceSize args, void *argp, int flags, SceKernelLMOption *option, int *status); -SceUID sceKernelLoadStartModuleForPid(SceUID pid, const char *path, SceSize args, void *argp, int flags, SceKernelLMOption *option, int *status); -int sceKernelStartModuleForPid(SceUID pid, SceUID modid, SceSize args, void *argp, int flags, SceKernelLMOption *option, int *status); +/** + * @brief load module + * + * @param[in] pid - target pid + * @param[in] path - module path + * @param[in] flags - unknown, set zero + * @param[in] option - unknown + * + * @return modid on success, < 0 on error. + */ SceUID sceKernelLoadModuleForPid(SceUID pid, const char *path, int flags, SceKernelLMOption *option); -SceUID sceKernelUnloadModuleForPid(SceUID pid, SceUID modid, int flags, SceKernelULMOption *option); + +/** + * @brief start module + * + * @param[in] pid - target pid + * @param[in] modid - target module id + * @param[in] args - module start args + * @param[in] argp - module start argp + * @param[in] flags - unknown, set zero + * @param[in] option - unknown + * @param[out] status - module_start res, SCE_KERNEL_START_SUCCESS etc... + * + * @return 0 on success, < 0 on error. + */ +int sceKernelStartModuleForPid(SceUID pid, SceUID modid, SceSize args, void *argp, int flags, SceKernelLMOption *option, int *status); + +/** + * @brief load and start module + * + * @param[in] pid - target pid + * @param[in] path - module path + * @param[in] args - module start args + * @param[in] argp - module start argp + * @param[in] flags - unknown, set zero + * @param[in] option - unknown + * @param[out] status - module_start res, SCE_KERNEL_START_SUCCESS etc... + * + * @return modid on success, < 0 on error. + */ +SceUID sceKernelLoadStartModuleForPid(SceUID pid, const char *path, SceSize args, void *argp, int flags, SceKernelLMOption *option, int *status); + +/** + * @brief stop module + * + * @param[in] pid - target pid + * @param[in] modid - target module id + * @param[in] args - module stop args + * @param[in] argp - module stop argp + * @param[in] flags - unknown, set zero + * @param[in] option - unknown + * @param[out] status - module_stop res, SCE_KERNEL_STOP_SUCCESS etc... + * + * @return 0 on success, < 0 on error. + */ int sceKernelStopModuleForPid(SceUID pid, SceUID modid, SceSize args, void *argp, int flags, SceKernelULMOption *option, int *status); + +/** + * @brief unload module + * + * @param[in] pid - target pid + * @param[in] modid - target module id + * @param[in] flags - unknown, set zero + * @param[in] option - unknown + * + * @return 0 on success, < 0 on error. + */ +int sceKernelUnloadModuleForPid(SceUID pid, SceUID modid, int flags, SceKernelULMOption *option); + +/** + * @brief stop and unload module + * + * @param[in] pid - target pid + * @param[in] modid - target module id + * @param[in] args - module stop args + * @param[in] argp - module stop argp + * @param[in] flags - unknown, set zero + * @param[in] option - unknown + * @param[out] status - module_stop res, SCE_KERNEL_STOP_SUCCESS etc... + * + * @return 0 on success, < 0 on error. + */ int sceKernelStopUnloadModuleForPid(SceUID pid, SceUID modid, SceSize args, void *argp, int flags, SceKernelULMOption *option, int *status); +/** + * @brief load and start module as shared module + * + * @param[in] pid - target pid + * @param[in] path - module path + * @param[in] args - module start args + * @param[in] argp - module start argp + * @param[in] flags - unknown, set zero + * @param[in] option - unknown + * @param[out] status - module_start res, SCE_KERNEL_START_SUCCESS etc... + * + * @return modid on success, < 0 on error. + */ +SceUID sceKernelLoadStartSharedModuleForPid(SceUID pid, const char *path, SceSize args, void *argp, int flags, SceKernelLMOption *option, int *status); + +/** + * @brief stop and unload module as shared module + * + * @param[in] pid - target pid + * @param[in] modid - target module id + * @param[in] args - module stop args + * @param[in] argp - module stop argp + * @param[in] flags - unknown, set zero + * @param[in] option - unknown + * @param[out] status - module_stop res, SCE_KERNEL_STOP_SUCCESS etc... + * + * @return 0 on success, < 0 on error. + */ +int sceKernelStopUnloadSharedModuleForPid(SceUID pid, SceUID modid, SceSize args, void *argp, int flags, SceKernelULMOption *option, int *status); + +/** + * @brief mount bootfs (load bootfs module) + * + * @param[in] bootImagePath - bootfs module path + * + * @return 0 on success, < 0 on error. + */ int sceKernelMountBootfs(const char *bootImagePath); + +/** + * @brief unmount bootfs (unload bootfs module) + * + * @return 0 on success, < 0 on error. + */ int sceKernelUmountBootfs(void); +/** + * @brief Get the main module for a given process. + * @param pid The process to query. + * @return the UID of the module else < 0 for an error. + */ +SceUID sceKernelGetProcessMainModule(SceUID pid); + +/** + * @brief Get the module path + * + * @param[in] pid - target pid + * @param[out] path - module path output + * @param[in] pathlen - path output max len + * + * @return 0 on success, < 0 on error. + */ +int sceKernelGetModulePath(SceUID modid, char *path, int pathlen); + +/** + * @brief Get library info + * + * @param[in] pid - target pid + * @param[in] modid - target library id + * @param[out] info - info output + * + * @return 0 on success, < 0 on error. + */ +int sceKernelGetModuleLibraryInfo(SceUID pid, SceUID libid, SceKernelModuleLibraryInfo *info); + +typedef struct SceKernelModuleExportEntry { + uint32_t libnid; + const void *entry; // function ptr. or vars? +} SceKernelModuleExportEntry; + +/** + * @brief Get module export entry + * + * @param[in] pid - target pid + * @param[in] libid - target library uid + * @param[out] list - data output + * @param[inout] num - in:list max num, out:get entry num + * @param[in] cpy_skip_num - The index at which to start copying + * + * @return 0 on success, < 0 on error. + */ +int sceKernelGetModuleLibExportList(SceUID pid, SceUID libid, SceKernelModuleExportEntry *list, SceSize *num, SceSize cpy_skip_num); + +int sceKernelGetModuleUid(SceUID pid, SceUID modid, SceUID *modid_out, const void *unk1, int unk2); +int sceKernelGetModuleUidList(SceUID pid, SceUID *modids, size_t *num); + #ifdef __cplusplus } #endif #endif /* _PSP2_KERNEL_MODULEMGR_H_ */ - diff --git a/include/kernel/kernel/processmgr.h b/include/kernel/kernel/processmgr.h index f203eed..819129b 100644 --- a/include/kernel/kernel/processmgr.h +++ b/include/kernel/kernel/processmgr.h @@ -7,6 +7,9 @@ extern "C" { #endif +/** UID of the kernel process */ +#define SCE_KERNEL_PROCESS_ID_KERNEL 0x10005 + typedef struct SceKernelProcessInfo { SceSize size; //!< size of this struct, make sure it's 0xE8 SceUID pid; //!< our process ID @@ -25,6 +28,39 @@ int sceKernelCreateProcessLocalStorage(const char *name, SceSize size); void *sceKernelGetProcessLocalStorageAddr(int key); int sceKernelGetProcessLocalStorageAddrForPid(SceUID pid, int key, void **out_addr, int create_if_doesnt_exist); +/** + * @brief Launch an application + * @param[in] titleid The TitleId of the app to open. + * @param[in] flags Some unknown flags. + * @param[in] path Path of the eboot.bin to launch. + * @param[in] unk Unknown. + * @return PID of the launched app on success, < 0 on error. + */ +SceUID sceKernelLaunchApp(char* titleid, uint32_t flags, char *path, uint32_t unk); + +/** + * @brief Resume a suspended process. + * @param[in] pid The process to resume. + * @return Zero on success, < 0 on error. + */ +int sceKernelResumeProcess(SceUID pid); + +/** + * @brief Suspend a running process. + * @param[in] pid The process to suspend. + * @param[in] status The new status for the process. + * @return Zero on success, < 0 on error. + */ +int sceKernelSuspendProcess(SceUID pid, int status); + +/** + * @brief Get the status of a given process. + * @param[in] pid The process ID to query. + * @param[out] status The bit field status of the process. + * @return Zero on success, < 0 on error. + */ +int sceKernelGetProcessStatus(SceUID pid, int *status); + #ifdef __cplusplus } #endif diff --git a/include/kernel/kernel/suspend.h b/include/kernel/kernel/suspend.h index 712e9b3..a1429c9 100644 --- a/include/kernel/kernel/suspend.h +++ b/include/kernel/kernel/suspend.h @@ -7,6 +7,8 @@ extern "C" { #endif +typedef int (* SceSysEventHandler)(int resume, int eventid, void *args, void *opt); + typedef enum SceKernelPowerTickType { /** Cancel all timers */ SCE_KERNEL_POWER_TICK_DEFAULT = 0, @@ -19,7 +21,7 @@ typedef enum SceKernelPowerTickType { } SceKernelPowerTickType; -/*** +/** * Cancel specified idle timers to prevent entering in power save processing. * * @param[in] type - One of ::SceKernelPowerTickType @@ -28,6 +30,17 @@ typedef enum SceKernelPowerTickType { */ int sceKernelPowerTick(int type); +/** + * Register system event handler + * + * @param[in] name - Name of handler + * @param[in] handler - The handler + * @param[in] args - Handler arguments + * + * @return 0 on success, < 0 on error. +*/ +int sceKernelRegisterSysEventHandler(const char *name, SceSysEventHandler handler, void *args); + #ifdef __cplusplus } #endif diff --git a/include/kernel/kernel/sysmem.h b/include/kernel/kernel/sysmem.h index 72d6c06..aa882e3 100644 --- a/include/kernel/kernel/sysmem.h +++ b/include/kernel/kernel/sysmem.h @@ -1,13 +1,14 @@ #ifndef _PSP2_KERNEL_SYSMEM_H_ #define _PSP2_KERNEL_SYSMEM_H_ -#include <psp2kern/types.h> +#include <stdarg.h> +#include <psp2kern/kernel/types.h> #ifdef __cplusplus extern "C" { #endif -typedef enum SceKernelMemBlockType { +typedef enum _SceKernelMemBlockType { SCE_KERNEL_MEMBLOCK_TYPE_SHARED_RX = 0x0390D050, SCE_KERNEL_MEMBLOCK_TYPE_USER_CDRAM_RW = 0x09408060, SCE_KERNEL_MEMBLOCK_TYPE_USER_RW_UNCACHE = 0x0C208060, @@ -18,7 +19,7 @@ typedef enum SceKernelMemBlockType { SCE_KERNEL_MEMBLOCK_TYPE_KERNEL_RX = 0x1020D005, SCE_KERNEL_MEMBLOCK_TYPE_KERNEL_RW = 0x1020D006, SCE_KERNEL_MEMBLOCK_TYPE_RW_UNK0 = 0x6020D006 -} SceKernelMemBlockType; +} _SceKernelMemBlockType; typedef enum SceKernelAllocMemBlockAttr { SCE_KERNEL_ALLOC_MEMBLOCK_ATTR_HAS_PADDR = 0x00000002U, @@ -132,7 +133,19 @@ typedef struct SceKernelProcessContext { SceUInt32 CONTEXTIDR; } SceKernelProcessContext; -/*** +typedef enum SceKernelSysrootSelfIndex { + SCE_KERNEL_SYSROOT_SELF_INDEX_GCAUTHMGR_SM = 0, + SCE_KERNEL_SYSROOT_SELF_INDEX_RMAUTH_SM = 1, + SCE_KERNEL_SYSROOT_SELF_INDEX_ENCDEC_W_PORTABILITY_SM = 2 +} SceKernelSysrootSelfIndex; + +typedef struct SceKernelSysrootSelfInfo { + uint32_t size; + void *self_data; + uint32_t self_size; +} SceKernelSysrootSelfInfo; + +/** * Allocates a new memory block * * @param[in] name - Name for the memory block @@ -144,7 +157,7 @@ typedef struct SceKernelProcessContext { */ SceUID sceKernelAllocMemBlock(const char *name, SceKernelMemBlockType type, int size, SceKernelAllocMemBlockKernelOpt *optp); -/*** +/** * Frees new memory block * * @param[in] uid - SceUID of the memory block to free @@ -153,7 +166,7 @@ SceUID sceKernelAllocMemBlock(const char *name, SceKernelMemBlockType type, int */ int sceKernelFreeMemBlock(SceUID uid); -/*** +/** * Gets the base address of a memory block * * @param[in] uid - SceUID of the memory block @@ -163,7 +176,7 @@ int sceKernelFreeMemBlock(SceUID uid); */ int sceKernelGetMemBlockBase(SceUID uid, void **basep); -/*** +/** * Gets the memory block type of a memory block * * @param[in] uid - SceUID of the memory block @@ -173,7 +186,7 @@ int sceKernelGetMemBlockBase(SceUID uid, void **basep); */ int sceKernelGetMemBlockType(SceUID uid, unsigned int *type); -/*** +/** * Find the SceUID of a memory block * * @param[in] addr - Base address of the memory block @@ -183,7 +196,7 @@ int sceKernelGetMemBlockType(SceUID uid, unsigned int *type); */ SceUID sceKernelFindMemBlockByAddr(const void *addr, SceSize size); -/*** +/** * Find the SceUID of a memory block for a PID * * @param[in] pid - PID of the process @@ -259,10 +272,13 @@ int sceKernelUidRetain(SceUID uid); int sceKernelUidRelease(SceUID uid); SceClass *sceKernelGetUidClass(void); +SceClass *sceKernelGetUidDLinkClass(void); +SceClass *sceKernelGetUidHeapClass(void); +SceClass *sceKernelGetUidMemBlockClass(void); int sceKernelCreateClass(SceClass *cls, const char *name, void *uidclass, size_t itemsize, SceClassCallback create, SceClassCallback destroy); int sceKernelDeleteUserUid(SceUID pid, SceUID user_uid); int sceKernelDeleteUid(SceUID uid); -int sceKernelFindClassByName(const char name, SceClass **cls); +int sceKernelFindClassByName(const char *name, SceClass **cls); int sceKernelSwitchVmaForPid(SceUID pid); @@ -272,6 +288,17 @@ int sceKernelGetPidContext(SceUID pid, SceKernelProcessContext **ctx); int sceKernelGetProcessTitleId(SceUID pid, char *titleid, size_t len); int sceKernelMapBlockUserVisible(SceUID uid); +int sceKernelMapUserBlock(const char *name, int permission, int type, + const void *user_buf, unsigned int size, void **kernel_page, + unsigned int *kernel_size, unsigned int *kernel_offset); +int sceKernelMapUserBlockDefaultType(const char *name, int permission, const void *user_buf, + unsigned int size, void **kernel_page, + unsigned int *kernel_size, unsigned int *kernel_offset); +int sceKernelMapUserBlockDefaultTypeForPid(int pid, const char *name, int permission, + const void *user_buf, unsigned int size, void **kernel_page, + unsigned int *kernel_size, unsigned int *kernel_offset); + +int sceSysrootGetSelfInfo(SceKernelSysrootSelfIndex index, SceKernelSysrootSelfInfo *info); /** * Get the physical address of a given virtual address @@ -281,7 +308,7 @@ int sceKernelMapBlockUserVisible(SceUID uid); * * @return 0 on success, < 0 on error. */ -int sceKernelGetPaddr(void *addr, uintptr_t *paddr); +int sceKernelGetPaddr(const void *addr, uintptr_t *paddr); /** * Get the physical address list of a given virtual address range @@ -392,11 +419,37 @@ int sceKernelMemRangeReleaseForPid(SceUID pid, void *addr, unsigned int size); */ int sceKernelMemRangeReleaseWithPerm(SceKernelMemoryRefPerm perm, void *addr, unsigned int size); -int sceSysrootIsManufacturingMode(void); +int sceSysrootUseExternalStorage(void); + +#define sceSysrootIsManufacturingMode() sceSysrootUseExternalStorage() + +int sceSysrootUseInternalStorage(void); int sceDebugPrintf(const char *fmt, ...); -int sceDebugPrintf2(int unk0, int unk1, const char *fmt, ...); +typedef struct kernel_message_ctx +{ + int hex_value0_hi; + int hex_value0_lo; + int hex_value1; + char* msg0; + int num; + char* msg1; +} kernel_message_ctx; + +// msg_type_flag : 0 or 0xB + +int sceDebugPrintf2(int msg_type_flag, kernel_message_ctx *msg_ctx, const char *fmt, ...); + +int sceDebugVprintf(const char *fmt, va_list args); + +int sceDebugPrintKernelPanic(kernel_message_ctx *msg_ctx, void *some_address); + +int sceDebugPrintfKernelPanic(kernel_message_ctx *msg_ctx, void *some_address, char* format, ...); + +int sceDebugPrintKernelAssertion(int condition, kernel_message_ctx *msg_ctx, void *some_address); + +int sceDebugPrintfKernelAssertion(int unk, int condition, kernel_message_ctx *msg_ctx, int some_address, const char *fmt, ...); int sceDebugSetHandlers(int (*func)(void *args, char c), void *args); @@ -406,9 +459,36 @@ void *sceDebugGetPutcharHandler(void); int sceDebugPutchar(int character); +int sceDebugDisableInfoDump(int flag); + +typedef struct +{ + size_t size; //!< sizeof(SceSysrootProcessHandler) + int (* unk_4)(void); + int (* unk_8)(void); + int (* unk_C)(void); + int (* unk_10)(void); + int (* unk_14)(void); + int (* unk_18)(void); + int (* on_process_created)(void); //!< called when process is created + int (* unk_20)(void); + int (* unk_24)(void); +} SceSysrootProcessHandler; + +/** + * Set handlers for the process lifecycle. + * + * This internal function allows a developer to introspect and receive events based + * on the process lifecycle. + * + * @param[in] handlers Pointer to struct containing the handlers. This function does not copy the handlers, so this pointer must remain valid after a successful call. + * + * @return 0 on success, < 0 on error. + */ +int sceKernelSysrootSetProcessHandler(const SceSysrootProcessHandler *handlers); + #ifdef __cplusplus } #endif #endif - diff --git a/include/kernel/kernel/threadmgr.h b/include/kernel/kernel/threadmgr.h index 8990a7b..76e2b4c 100644 --- a/include/kernel/kernel/threadmgr.h +++ b/include/kernel/kernel/threadmgr.h @@ -1,21 +1,14 @@ #ifndef _PSP2_KERNEL_THREADMGR_H_ #define _PSP2_KERNEL_THREADMGR_H_ -#include <psp2kern/types.h> +#include <psp2common/kernel/threadmgr.h> #ifdef __cplusplus extern "C" { #endif -#define SCE_KERNEL_MUTEX_ATTR_RECURSIVE 2 - -/** 64-bit system clock type. */ -typedef SceUInt64 SceKernelSysClock; - /* Threads. */ -typedef int (*SceKernelThreadEntry)(SceSize args, void *argp); - /** Additional options used when creating threads. */ typedef struct SceKernelThreadOptParam { /** Size of the ::SceKernelThreadOptParam structure. */ @@ -439,18 +432,71 @@ int sceKernelUnlockMutex(SceUID mutexid, int unlockCount); */ int sceKernelCancelMutex(SceUID mutexid, int newCount, int *numWaitThreads); -typedef struct SceKernelLwMutexWork { - SceInt64 data[4]; -} SceKernelLwMutexWork; +/** + * Retrieve information about a mutex. + * + * @param mutexid - UID of the mutex to retrieve info for. + * @param info - Pointer to a ::SceKernelMutexInfo struct to receive the info. + * + * @return < 0 on error. + */ +int sceKernelGetMutexInfo(SceUID mutexid, SceKernelMutexInfo *info); + +/* Fast mutex */ + +typedef struct SceKernelFastMutexWork { + SceInt64 data[8]; +} SceKernelFastMutexWork; -typedef struct SceKernelLwMutexOptParam { +typedef enum SceKernelFastMutexAttr { + SCE_KERNEL_FAST_MUTEX_ATTR_RECURSIVE = 0x00000002, + SCE_KERNEL_FAST_MUTEX_ATTR_CEILING = 0x00000004, + SCE_KERNEL_FAST_MUTEX_ATTR_UNK_3 = 0x00000008, + SCE_KERNEL_FAST_MUTEX_ATTR_TH_FIFO = 0x00000000, + SCE_KERNEL_FAST_MUTEX_ATTR_TH_PRIO = 0x00002000, + SCE_KERNEL_FAST_MUTEX_ATTR_UNK_15 = 0x00008000, + // All other flags are invalid +} SceKernelFastMutexAttr; + +typedef struct SceKernelFastMutexOptParam { SceSize size; -} SceKernelLwMutexOptParam; + SceInt32 ceilingPriority; +} SceKernelFastMutexOptParam; + +SceInt32 sceKernelInitializeFastMutex( + SceKernelFastMutexWork *pWork, + const char *pName, + SceKernelFastMutexAttr attr, + const SceKernelFastMutexOptParam *pOptParam); + +SceInt32 sceKernelLockFastMutex(SceKernelFastMutexWork *pWork); -int sceKernelInitializeFastMutex(void *mutex, const char *name, int unk0, int unk1); -int sceKernelLockFastMutex(void *mutex); -int sceKernelUnlockFastMutex(void *mutex); -int sceKernelDeleteFastMutex(void *mutex); +SceInt32 sceKernelTryLockFastMutex(SceKernelFastMutexWork *pWork); + +SceInt32 sceKernelUnlockFastMutex(SceKernelFastMutexWork *pWork); + +SceInt32 sceKernelFinalizeFastMutex(SceKernelFastMutexWork *pWork); + +typedef struct SceKernelFastMutexInfo { +// 0x00 + SceSize size; + SceUID uid; + char name[SCE_UID_NAMELEN + 1]; + SceKernelFastMutexAttr attr; + SceKernelFastMutexWork *pWork; +// 0x30 + SceInt32 currentCount; + SceUID currentOwnerId; + SceInt32 ceilingPriority; + SceInt32 unk3C; +// 0x40 + SceUInt32 numWaitThreads; +// 0x44 +} SceKernelFastMutexInfo; + +SceInt32 sceKernelGetFastMutexInfo(SceKernelFastMutexWork *pWork, SceKernelFastMutexInfo *pInfo); + +SceInt32 sceKernelGetFastMutexInfoById(SceUID uid, SceKernelFastMutexInfo *pInfo); /* Event flags. */ @@ -829,6 +875,200 @@ int sceKernelRunWithStack(int stack_size, int (*to_call)(void *), void *args); */ int sceKernelGetFaultingProcess(SceKernelFaultingProcessInfo *info); +/* Workqueues */ + +typedef int (*SceKernelWorkQueueWorkFunction)(void *args); + +/** + * @brief Enqueue work to a workqueue + * + * @param[in] uid UID of the workqueue (0x10023 for the SceKernelGlobalWorkQueue) + * @param[in] name Name of the work to enqueue + * @param[in] work Work function to enqueue + * @param[in] args Argument to pass to the work function + * + * @return Zero on success + */ +int sceKernelEnqueueWorkQueue(SceUID uid, const char *name, SceKernelWorkQueueWorkFunction work, void *args); + +/** + * @brief Get the main thread for a given process. + * @param[in] pid The process id to query for. + * @return The thread UID on success, else < 0 on error. + */ +SceUID sceKernelGetProcessMainThread(SceUID pid); + +/** + * @brief Retrieve a list of all threads belonging to a process. + * @param[in] pid The process to query. + * @param[out] ids The list of thread ids. Can be NULL if output is not required. + * @param[in] n The max number of thread ids to copy out. + * @param[out] copy_count The number of thread ids copied. + * @return The number of threads within the process, else < 0 on error. + */ +int sceKernelGetThreadIdList(SceUID pid, SceUID *ids, int n, int *copy_count); + +/** Structure representing all ARM registers */ +typedef struct ArmCpuRegisters +{ + uint32_t r0; + uint32_t r1; + uint32_t r2; + uint32_t r3; + uint32_t r4; + uint32_t r5; + uint32_t r6; + uint32_t r7; + uint32_t r8; + uint32_t r9; + uint32_t r10; + uint32_t r11; + uint32_t r12; + uint32_t sp; + uint32_t lr; + uint32_t pc; + uint32_t cpsr; + uint32_t unk; +} ArmCpuRegisters; + +/** Structure containing a threads register states. */ +typedef struct ThreadCpuRegisters +{ + /** Set of registers used for user mode. */ + ArmCpuRegisters user; + + /** Set of registers used for kernel mode. */ + ArmCpuRegisters kernel; +} ThreadCpuRegisters; + +/** + * @brief Query the state of the registers for a suspended thread. + * + * The registers returned are the user/kernel set for the requested thread. + * It's not certain that user/kernel is correct representation, instead it could be current/exception. + * The thread provided must be suspended for this function to succeed. + * + * @param[in] thid The thread to query. + * @param[out] registers The set of registers belonging to the thread. + * @return Zero on success, else < 0 on error. + */ +int sceKernelGetThreadCpuRegisters(SceUID thid, ThreadCpuRegisters *registers); + + +/** + * @brief Change the thread suspension status to another value. + * + * More research needs to be done to find out exactly what each status actually means. Some examples of useful scenarios: + * When handling an exception changing the status to 0x1002 (on a newly suspended thread) will stop the kernel rethrowing the same exception. + * When resuming a suspended thread changing the status to 2 will allow it to resume. + * + * @param[in] thid The thread to change. + * @param[in] status The new status for suspension. + * @return Zero on success, else < 0 on error. + */ +int sceKernelChangeThreadSuspendStatus(SceUID thid, int status); + +/* Message pipes */ + +/** + * Create a message pipe + * + * @param name - Name of the pipe + * @param type - The type of memory attribute to use internally (set to 0x40) + * @param attr - Set to 12 + * @param bufSize - The size of the internal buffer in multiples of 0x1000 (4KB) + * @param opt - Message pipe options (set to NULL) + * + * @return The UID of the created pipe, < 0 on error + */ +SceUID sceKernelCreateMsgPipe(const char *name, int type, int attr, unsigned int bufSize, void *opt); + +/** + * Delete a message pipe + * + * @param uid - The UID of the pipe + * + * @return 0 on success, < 0 on error + */ +int sceKernelDeleteMsgPipe(SceUID uid); + +typedef struct +{ + const void *message; + unsigned int size; +} MsgPipeSendData; + +/** + * Send a message to a pipe + * + * @param uid - The UID of the pipe + * @param message - Pointer to the message + * @param size - Size of the message + * @param unk1 - Unknown - async vs sync? use 0 for sync + * @param unk2 - Unknown - use NULL + * @param timeout - Timeout for send in us. use NULL to wait indefinitely + * + * @return 0 on success, < 0 on error + */ +int sceKernelSendMsgPipeVector(SceUID uid, const MsgPipeSendData *v, unsigned int n, int unk1, void *unk2, unsigned int *timeout); + +/** + * Try to send a message to a pipe + * + * @param uid - The UID of the pipe + * @param message - Pointer to the message + * @param size - Size of the message + * @param unk1 - Unknown - use 0 + * @param unk2 - Unknown - use NULL + * + * @return 0 on success, < 0 on error + */ +int sceKernelTrySendMsgPipeVector(SceUID uid, const MsgPipeSendData *v, unsigned int size, int unk1, void *unk2); + +typedef struct +{ + void *message; + unsigned int size; +} MsgPipeRecvData; + +/** + * Receive a message from a pipe + * + * @param uid - The UID of the pipe + * @param message - Pointer to the message + * @param size - Size of the message + * @param unk1 - Unknown - async vs sync? use 0 for sync + * @param unk2 - Unknown - use NULL + * @param timeout - Timeout for receive in us. use NULL to wait indefinitely + * + * @return 0 on success, < 0 on error + */ +int sceKernelReceiveMsgPipeVector(SceUID uid, const MsgPipeRecvData *v, unsigned int n, int unk1, void *unk2, unsigned int *timeout); + +/** + * Receive a message from a pipe + * + * @param uid - The UID of the pipe + * @param message - Pointer to the message + * @param size - Size of the message + * @param unk1 - Unknown - use 0 + * @param unk2 - Unknown - use NULL + * + * @return 0 on success, < 0 on error + */ +int sceKernelTryReceiveMsgPipeVector(SceUID uid, const MsgPipeRecvData *v, unsigned int size, int unk1, void *unk2); + +/** + * Cancel a message pipe + * + * @param uid - UID of the pipe to cancel + * @param psend - Receive number of sending threads, NULL is valid + * @param precv - Receive number of receiving threads, NULL is valid + * + * @return 0 on success, < 0 on error + */ +int sceKernelCancelMsgPipe(SceUID uid, int *psend, int *precv); + #ifdef __cplusplus } #endif diff --git a/include/kernel/kernel/utils.h b/include/kernel/kernel/utils.h new file mode 100644 index 0000000..c7f1c92 --- /dev/null +++ b/include/kernel/kernel/utils.h @@ -0,0 +1,205 @@ +#ifndef _PSP2_KERNEL_UTILS_H_ +#define _PSP2_KERNEL_UTILS_H_ + +#include <psp2kern/types.h> + +#ifdef __cplusplus +extern "C" { +#endif + +#define SCE_SHA1_BLOCK_SIZE 64 +#define SCE_SHA1_DIGEST_SIZE 20 +#define SCE_SHA224_BLOCK_SIZE 64 +#define SCE_SHA224_DIGEST_SIZE 28 +#define SCE_SHA256_BLOCK_SIZE 64 +#define SCE_SHA256_DIGEST_SIZE 32 + +typedef struct SceSha1Context { + uint32_t h[5]; + uint16_t usRemains; + uint16_t usComputed; + uint64_t ullTotalLen; + char buf[SCE_SHA1_BLOCK_SIZE]; + char result[SCE_SHA1_DIGEST_SIZE]; + uint32_t pad; +} SceSha1Context; + +typedef struct SceSha224Context { + uint32_t h[8]; + uint32_t pad; + uint16_t usRemains; + uint16_t usComputed; + uint64_t ullTotalLen; + char buf[SCE_SHA224_BLOCK_SIZE]; + char result[SCE_SHA224_DIGEST_SIZE]; + uint32_t pad2; +} SceSha224Context; + +typedef struct SceSha256Context { + uint32_t h[8]; + uint32_t pad; + uint16_t usRemains; + uint16_t usComputed; + uint64_t ullTotalLen; + char buf[SCE_SHA256_BLOCK_SIZE]; + char result[SCE_SHA256_DIGEST_SIZE]; +} SceSha256Context; + +struct SceDeflatePartialInputParam; + +typedef struct SceDeflatePartialInputParam { + uint32_t size; + const void *pBufEnd; + void *cookie; + const void *(* SceDeflateDecompressPartialInputCallback)(struct SceDeflatePartialInputParam* param, uint32_t outputsize); +} SceDeflatePartialInputParam; + +typedef struct { + uint8_t data[976]; +} SceAesContext; + +int sceSha1BlockInit(SceSha1Context *pContext); +int sceSha1BlockUpdate(SceSha1Context *pContext, const void *plain, uint32_t len); +int sceSha1BlockResult(SceSha1Context *pContext, char *digest); +int sceSha1Digest(const void *plain, uint32_t len, char *result); + +int sceSha224BlockInit(SceSha224Context *pContext); +int sceSha224BlockUpdate(SceSha224Context *pContext, const void *plain, uint32_t len); +int sceSha224BlockResult(SceSha224Context *pContext, char *digest); +int sceSha224Digest(const void *plain, uint32_t len, char *result); + +int sceSha256BlockInit(SceSha256Context *pContext); +int sceSha256BlockUpdate(SceSha256Context *pContext, const void *plain, uint32_t len); +int sceSha256BlockResult(SceSha256Context *pContext, char *digest); +int sceSha256Digest(const void *plain, uint32_t len, char *result); + +int sceHmacSha1Digest(const unsigned char *key, uint32_t key_len, const void *plain, uint32_t len, char *result); +int sceHmacSha224Digest(const unsigned char *key, uint32_t key_len, const void *plain, uint32_t len, char *result); +int sceHmacSha256Digest(const unsigned char *key, uint32_t key_len, const void *plain, uint32_t len, char *result); + +/** + * @param[out] dst - dst buf + * @param[in] dst_size - dst buf size + * @param[in] src - Gzip compressed data + * @param[out] crc32 - crc32 when decompressed + * + * @return decompressed size on success, < 0 on error. + */ +int sceGzipDecompress(void *dst, uint32_t dst_size, const void *src, uint32_t *crc32); + +/** + * @brief Check magic of Gzip header + * + * @param[in] src - Gzip compressed data + * + * @return 1 on success, 0 is not Gzip data. + */ +int sceGzipIsValid(const void *src); + +/** + * @brief Get filename etc. in Gzip data + * + * @param[in] src - Gzip compressed data + * @param[out] extra - Get information on extra-field + * @param[out] name - Get filename information + * @param[out] comment - Get comment information + * @param[out] crc - Get CRC16 information + * @param[out] data - Get compressed data start address + * + * @return 0 on success, < 0 on error. + */ +int sceGzipGetInfo(const void *src, const void **extra, const char **name, const char **comment, unsigned short *crc, const void **data); + +/** + * @brief Get filename string address + * + * @param[in] src - Gzip compressed data + * + * @return string address on success, NULL on error. + */ +const char *sceGzipGetName(const void *src); + +/** + * @brief Get comment string address + * + * @param[in] src - Gzip compressed data + * + * @return string address on success, NULL on error. + */ +const char *sceGzipGetComment(const void *src); + +/** + * @brief Get compressed data start address + * + * @param[in] src - Gzip compressed data + * + * @return compressed data address on success, NULL on error. + */ +const void *sceGzipGetCompressedData(const void *src); + +/** + * @brief Get filename etc. in Zlib data + * + * @param[in] src - Zlib compressed data + * @param[out] cmf - Get CMF (Compression Method and flags) + * @param[out] flg - Get FLG (FLaGs) + * @param[out] dictid - Get DictId + * @param[out] data - Get compressed data start address + * + * @return 0 on success, < 0 on error. + */ +int sceZlibGetInfo(const void *src, unsigned char *cmf, unsigned char *flg, unsigned int *dictid, const void **data); + +/** + * @brief Get compressed data start address + * + * @param[in] src - Gzip compressed data + * + * @return compressed data address on success, NULL on error. + */ +const void *sceZlibGetCompressedData(const void *src); + +/** + * @param[out] dst - dst buf + * @param[in] dst_size - dst buf size + * @param[in] src - Zlib compressed data + * @param[out] adler32 - adler32 when decompressed + * + * @return decompressed size on success, < 0 on error. + */ +int sceZlibDecompress(void *dst, uint32_t dst_size, const void *src, uint32_t *adler32); + +/** + * @param[out] dst - dst buf + * @param[in] dst_size - dst buf size + * @param[in] src - Deflate compressed data + * @param[out] next - next data + * + * @return decompressed size on success, < 0 on error. + */ +int sceDeflateDecompress(void *dst, uint32_t dst_size, const void *src, const void **next); +int sceDeflateDecompressPartial(void *dst, unsigned int dst_size, const void *src, const void **next, SceDeflatePartialInputParam *cbInfo); + +/** + * @param[out] ctx - out key data, etc... + * @param[in] blocksize - 128 or 192 or 256 + * @param[in] keysize - 128 or 192 or 256 + * @param[in] key - key data + * + * @return 0 on success, < 0 on error. + */ +int sceAesInit1(SceAesContext *ctx, int blocksize, int keysize, const void *key); +int sceAesInit2(SceAesContext *ctx, int blocksize, int keysize, const void *key); +int sceAesInit3(SceAesContext *ctx, int blocksize, int keysize, const void *key); + +int sceAesDecrypt1(SceAesContext *ctx, const void *src, void *dst); +int sceAesDecrypt2(SceAesContext *ctx, const void *src, void *dst); + +int sceAesEncrypt1(SceAesContext *ctx, const void *src, void *dst); +int sceAesEncrypt2(SceAesContext *ctx, const void *src, void *dst); + +#ifdef __cplusplus +} +#endif + +#endif /* _PSP2_KERNEL_UTILS_H_ */ diff --git a/include/kernel/lowio/iftu.h b/include/kernel/lowio/iftu.h new file mode 100644 index 0000000..a03d221 --- /dev/null +++ b/include/kernel/lowio/iftu.h @@ -0,0 +1,94 @@ +#ifndef _PSP2_KERN_LOWIO_IFTU_H_ +#define _PSP2_KERN_LOWIO_IFTU_H_ + +#include <psp2kern/types.h> + +#ifdef __cplusplus +extern "C" { +#endif + +typedef enum SceIftuErrorCode { + SCE_IFTU_ERROR_INVALID_PLANE = 0x803F0700, + SCE_IFTU_ERROR_INVALID_PARAM = 0x803F0701, + SCE_IFTU_ERROR_INVALID_PIXELFORMAT = 0x803F0703, + SCE_IFTU_ERROR_PLANE_BUSY = 0x803F0704, +} SceIftuErrorCode; + +typedef enum SceIftuPixelformat { + SCE_IFTU_PIXELFORMAT_BGR565 = 0x01, + SCE_IFTU_PIXELFORMAT_RGB565 = 0x02, + SCE_IFTU_PIXELFORMAT_BGRA5551 = 0x04, + SCE_IFTU_PIXELFORMAT_RGBA5551 = 0x08, + SCE_IFTU_PIXELFORMAT_BGRX8888 = 0x10, + SCE_IFTU_PIXELFORMAT_RGBX8888 = 0x20, + SCE_IFTU_PIXELFORMAT_BGRA1010102 = 0x40, + SCE_IFTU_PIXELFORMAT_RGBA1010102 = 0x80, + SCE_IFTU_PIXELFORMAT_BGRP = 0x100, /* 3 planes - R, G, B */ + SCE_IFTU_PIXELFORMAT_RGBX8888_MULT = 0x1000, + SCE_IFTU_PIXELFORMAT_BGRX8888_MULT = 0x2000, + SCE_IFTU_PIXELFORMAT_RGBA1010102_MULT = 0x4000, + SCE_IFTU_PIXELFORMAT_BGRA1010102_MULT = 0x8000, + SCE_IFTU_PIXELFORMAT_NV12 = 0x10000, /* 2 planes - Y, Cb + Cr interleaved */ + SCE_IFTU_PIXELFORMAT_YUV420 = 0x20000, /* 3 planes - Y, Cb, Cr */ + SCE_IFTU_PIXELFORMAT_YUV422 = 0x200000, /* 3 planes - Y, Cb, Cr */ +} SceIftuPixelformat; + +typedef struct SceIftuCscParams { + unsigned int post_add_0; /* 10-bit integer */ + unsigned int post_add_1_2; /* 10-bit integer */ + unsigned int post_clamp_max_0; /* 10-bit integer */ + unsigned int post_clamp_min_0; /* 10-bit integer */ + unsigned int post_clamp_max_1_2; /* 10-bit integer */ + unsigned int post_clamp_min_1_2; /* 10-bit integer */ + unsigned int ctm[3][3]; /* S3.9 fixed point format */ +} SceIftuCscParams; + +typedef struct SceIftuConvParams { + unsigned int size; + unsigned int unk04; + SceIftuCscParams *csc_params1; + SceIftuCscParams *csc_params2; + unsigned int csc_control; + unsigned int unk14; + unsigned int unk18; + unsigned int unk1C; + unsigned int alpha; + unsigned int unk24; +} SceIftuConvParams; + +typedef struct SceIftuFrameBuf { + unsigned int pixelformat; + unsigned int width; /* Aligned to 16 */ + unsigned int height; /* Aligned to 8 */ + unsigned int leftover_stride; /* (pitch - aligned_w) * bpp */ + unsigned int leftover_align; /* if YCbCr: (width >> 1) & 0xF [chroma align?] */ + unsigned int paddr0; /* Physical address of the first plane */ + unsigned int paddr1; /* Physical address of the second plane */ + unsigned int paddr2; /* Physical address of the third plane */ +} SceIftuFrameBuf; + +typedef struct SceIftuPlaneState { + SceIftuFrameBuf fb; + unsigned int unk20; /* not observed to be non-zero */ + unsigned int unk24; /* not observed to be non-zero */ + unsigned int unk28; /* not observed to be non-zero */ + unsigned int src_w; /* inverse scaling factor in 16.16 fixed point, greater than or equal to 0.25 */ + unsigned int src_h; /* inverse scaling factor in 16.16 fixed point, greater than or equal to 0.25 */ + unsigned int dst_x; /* offset into the destination buffer */ + unsigned int dst_y; /* offset into the destination buffer */ + unsigned int src_x; /* offset into the source buffer in 8.8 fixed point, strictly less than 4.0 */ + unsigned int src_y; /* offset into the source buffer in 8.8 fixed point, strictly less than 4.0 */ + unsigned int crop_top; + unsigned int crop_bot; + unsigned int crop_left; + unsigned int crop_right; +} SceIftuPlaneState; + +int sceIftuCsc(SceIftuFrameBuf *dst, SceIftuPlaneState *src, SceIftuConvParams *params); + +#ifdef __cplusplus +} +#endif + +#endif /* _PSP2_KERN_LOWIO_IFTU_H_ */ + diff --git a/include/kernel/lowio/pervasive.h b/include/kernel/lowio/pervasive.h index ef91404..51bb72b 100644 --- a/include/kernel/lowio/pervasive.h +++ b/include/kernel/lowio/pervasive.h @@ -4,7 +4,7 @@ #include <psp2kern/types.h> #ifdef __cplusplus -"C" { +extern "C" { #endif int scePervasiveUartClockDisable(int port); diff --git a/include/kernel/net/net.h b/include/kernel/net/net.h index 5670c96..4ec7e56 100644 --- a/include/kernel/net/net.h +++ b/include/kernel/net/net.h @@ -539,15 +539,16 @@ typedef struct SceNetIcmpHeader { int sceNetSocket(const char *name, int domain, int type, int protocol); int sceNetAccept(int s, SceNetSockaddr *addr, unsigned int *addrlen); int sceNetBind(int s, const SceNetSockaddr *addr, unsigned int addrlen); +int sceNetConnect(int s, const SceNetSockaddr *name, unsigned int namelen); int sceNetListen(int s, int backlog); int sceNetRecvfrom(int s, void *buf, unsigned int len, int flags, SceNetSockaddr *from, unsigned int *fromlen); int sceNetSendto(int s, const void *msg, unsigned int len, int flags, const SceNetSockaddr *to, unsigned int tolen); +int sceNetSetsockopt(int s, int level, int optname, const void *optval, unsigned int optlen); +int sceNetClose(int s); #define sceNetRecv(s, buf, len, flags) sceNetRecvfrom(s, buf, len, flags, NULL, 0) #define sceNetSend(s, msg, len, flags) sceNetSendto(s, msg, len, flags, NULL, 0) - -int sceNetSetsockopt(int s, int level, int optname, const void *optval, unsigned int optlen); -int sceNetSocketClose(int s); +#define sceNetSocketClose sceNetClose /* fixme ? */ #define sceNetHtons __builtin_bswap16 diff --git a/include/kernel/power.h b/include/kernel/power.h index ed797be..b56731b 100644 --- a/include/kernel/power.h +++ b/include/kernel/power.h @@ -8,12 +8,24 @@ extern "C" { #endif typedef enum ScePowerCallbackType { - /** indicates the unit is suspending, seems to occur due to inactivity */ - SCE_POWER_CB_SUSPENDING = 0x00010000, + /** indicates the power button was pushed, putting the unit into suspend mode */ + SCE_POWER_CB_POWER_SWITCH = 0x80000000, + /** ? screen on after off ? **/ + SCE_POWER_CB_UNK_1 = 0x00600000, + /** ? screen off ? **/ + SCE_POWER_CB_UNK_2 = 0x00400000, + /** indicates the unit has finish resuming from suspend mode */ + SCE_POWER_CB_RESUME_COMPLETE = 0x00040000, /** indicates the unit is resuming from suspend mode */ SCE_POWER_CB_RESUMING = 0x00020000, - /** indicates the unit has finish resuming from suspend mode */ - SCE_POWER_CB_RESUME_COMPLETE = 0x00040000 + /** indicates the unit is suspending, seems to occur due to inactivity */ + SCE_POWER_CB_SUSPENDING = 0x00010000, + /** indicates the unit is plugged into an AC outlet */ + SCE_POWER_CB_AC_POWER = 0x00001000, + /** indicates the battery is in low state **/ + SCE_POWER_CB_LOWBATTERY = 0x00000100, + /** indicates there is a battery present in the unit **/ + SCE_POWER_CB_BATTERY_EXIST = 0x00000080 } ScePowerCallbackType; /* Callbacks */ @@ -154,6 +166,13 @@ int scePowerGetGpuClockFrequency(void); int scePowerGetGpuXbarClockFrequency(void); /** + * Requests PS Vita to do a soft reset + * + * @return always 0 + */ +int scePowerRequestSoftReset(void); + +/** * Requests PS Vita to do a cold reset * * @return always 0 @@ -182,6 +201,16 @@ int scePowerRequestSuspend(void); int scePowerRequestDisplayOff(void); /** + * Set the screen brightness. + * @see ::sceAVConfigSetDisplayBrightness for userland counterpart. + * + * @param brightness Brightness that the screen will be set to (range 21-65536, 0 turns off the screen). + * + * @return ? + */ +int scePowerSetDisplayBrightness(int brightness); + +/** * Sets CPU clock frequency * * @param freq - Frequency to set in Mhz @@ -217,6 +246,25 @@ int scePowerSetGpuClockFrequency(int freq); */ int scePowerSetGpuXbarClockFrequency(int freq); +/** + * Sets the time before idle callback is notified. + * + * @param callback_slot - Callback slot from 0 to 7. + * @param time - Time in microseconds. + * + * @return 0 on success, < 0 on error + */ +int scePowerSetIdleTimer(int callback_slot, SceUInt64 time); + +/** + * Sets the PS button hold time for showing the quick menu. + * + * @param time - Time in microseconds. + * + * @return 0 always + */ +int scePowerSetPsButtonPushTime(int time); + #ifdef __cplusplus } #endif diff --git a/include/kernel/sblacmgr.h b/include/kernel/sblacmgr.h index 99621dc..04a182c 100644 --- a/include/kernel/sblacmgr.h +++ b/include/kernel/sblacmgr.h @@ -8,6 +8,7 @@ extern "C" { #endif int sceSblACMgrIsShell(SceUID pid); +int sceSblACMgrIsPspEmu(SceUID pid); int sceSblACMgrIsGameProgram(SceUID pid); int sceSblACMgrIsNonGameProgram(SceUID pid); int sceSblACMgrIsDevelopmentMode(void); diff --git a/include/kernel/sblaimgr.h b/include/kernel/sblaimgr.h index d809f51..36939ee 100644 --- a/include/kernel/sblaimgr.h +++ b/include/kernel/sblaimgr.h @@ -8,6 +8,7 @@ extern "C" { #endif int sceSblAimgrGetSMI(void); +int sceSblAimgrGetTargetId(void); int sceSblAimgrIsTest(void); int sceSblAimgrIsTool(void); int sceSblAimgrIsDEX(void); diff --git a/include/kernel/syscon.h b/include/kernel/syscon.h index 225f798..c5bae25 100644 --- a/include/kernel/syscon.h +++ b/include/kernel/syscon.h @@ -104,7 +104,7 @@ int sceSysconCmdSync(SceSysconPacket *packet, int noWait); * * @return 0 on success. */ -int sceSysconResetDevice(int type, int mode); +int sceSysconSetPowerMode(int type, int mode); int sceSysconReadCommand(unsigned short cmd, void *buffer, unsigned int size); int sceSysconSendCommand(unsigned short cmd, const void *buffer, unsigned int size); @@ -133,7 +133,7 @@ int sceSysconCtrlLED(int led, int enable); * * @return 0 on success. */ -int sceSysconCtrlMsPower(int power); +int sceSysconCtrlRMRPower(int power); /** * Set the SD power. @@ -200,6 +200,16 @@ int sceSysconLoadConfigstorageScript(unsigned short, const void *buff, unsigned int sceSysconVerifyConfigstorageScript(unsigned short, const void *buff, unsigned int size); /** + * Set the alarm callback, that will be ran when the alarm timer is passed. + * + * @param callback The callback function. + * @param argp The second argument that will be passed to the callback. + * + * @return 0. + */ +int sceSysconSetAlarmCallback(SceSysconCallback callback, void *argp); + +/** * Set the low battery callback, that will be ran when the battery is low. * * @param callback The callback function. diff --git a/include/kernel/udcd.h b/include/kernel/udcd.h index 4490559..25d1e2a 100644 --- a/include/kernel/udcd.h +++ b/include/kernel/udcd.h @@ -2,6 +2,7 @@ #define _PSP2_KERNEL_UDCD_H_ #include <psp2kern/types.h> +#include <dolcesdk/align.h> #ifdef __cplusplus extern "C" { @@ -19,6 +20,7 @@ typedef enum SceUdcdUsbClass { USB_CLASS_MASS_STORAGE = 0x08, USB_CLASS_HUB = 0x09, USB_CLASS_DATA = 0x0A, + USB_CLASS_VIDEO = 0x0E, USB_CLASS_VENDOR_SPEC = 0xFF } SceUdcdUsbClass; @@ -193,6 +195,12 @@ typedef enum SceUdcdErrorCode { SCE_UDCD_ERROR_USBDRIVER_INVALID_FUNCS = 0x80243202 } SceUdcdErrorCode; +/** SceUdcdDeviceRequest Flags + */ +typedef enum SceUdcdDeviceRequestAttr { + SCE_UDCD_DEVICE_REQUEST_ATTR_PHYCONT = 0x00000001 +} SceUdcdDeviceRequestAttr; + /** USB string descriptor */ typedef struct SceUdcdStringDescriptor { @@ -203,7 +211,7 @@ typedef struct SceUdcdStringDescriptor { /** USB device descriptor */ -typedef struct SceUdcdDeviceDescriptor { +typedef struct SCE_ALIGN(4) SceUdcdDeviceDescriptor { unsigned char bLength; unsigned char bDescriptorType; unsigned short bcdUSB; @@ -218,11 +226,11 @@ typedef struct SceUdcdDeviceDescriptor { unsigned char iProduct; unsigned char iSerialNumber; unsigned char bNumConfigurations; -} __attribute__ ((aligned(4))) SceUdcdDeviceDescriptor; +} SceUdcdDeviceDescriptor; /** USB device qualifier descriptor */ -typedef struct SceUdcdDeviceQualifierDescriptor { +typedef struct SCE_ALIGN(4) SceUdcdDeviceQualifierDescriptor { unsigned char bLength; unsigned char bDescriptorType; unsigned short bcdUSB; @@ -232,7 +240,7 @@ typedef struct SceUdcdDeviceQualifierDescriptor { unsigned char bMaxPacketSize0; unsigned char bNumConfigurations; unsigned char bReserved; -} __attribute__ ((aligned(4))) SceUdcdDeviceQualifierDescriptor; +} SceUdcdDeviceQualifierDescriptor; /** USB configuration descriptor */ @@ -355,7 +363,7 @@ typedef struct SceUdcdDriver { typedef struct SceUdcdDeviceRequest { SceUdcdEndpoint *endpoint; //!< Pointer to the endpoint to queue request on void *data; //!< Pointer to the data buffer to use in the request - unsigned int unk; //!< Unknown data + unsigned int attributes; //!< Request attributes (See ::SceUdcdDeviceRequestAttr) int size; //!< Size of the data buffer int isControlRequest; //!< Is a control request? void (*onComplete)(struct SceUdcdDeviceRequest *req); //!< Pointer to the function to call on completion @@ -368,11 +376,11 @@ typedef struct SceUdcdDeviceRequest { /** USB driver name */ -typedef struct SceUdcdDriverName { +typedef struct SCE_ALIGN(16) SceUdcdDriverName { int size; char name[32]; int flags; -} __attribute__ ((aligned(16))) SceUdcdDriverName; +} SceUdcdDriverName; /** USB device information */ @@ -380,9 +388,9 @@ typedef struct SceUdcdDeviceInfo { unsigned char info[64]; } SceUdcdDeviceInfo; -typedef struct { +typedef struct SceUdcdWaitParam { int unk_00; - int unk_04; + int status; int unk_08; int unk_0C; int unk_10; @@ -411,6 +419,28 @@ int sceUdcdWaitBusInitialized(unsigned int timeout, int bus); int sceUdcdStart(const char *driverName, int size, void *args); /** + * Start a USB driver for an UDCD bus. + * + * @param driverName - Name of the USB driver to start + * @param size - Size of arguments to pass to USB driver start + * @param args - Arguments to pass to USB driver start + * @param[in] bus - UDCD bus (default is 2) + * + * @return 0 on success, < 0 on error. + */ +int sceUdcdStartInternal(const char *driverName, int size, void *args, int bus); + +/** + * Starts the current USB driver for an UDCD bus. + * + * @param[in] unused - Unused + * @param[in] bus - UDCD bus (default is 2) + * + * @return 0 on success, < 0 on error. + */ +int sceUdcdStartCurrentInternal(int unused, int bus); + +/** * Stop a USB driver. * * @param driverName - Name of the USB driver to stop @@ -422,6 +452,27 @@ int sceUdcdStart(const char *driverName, int size, void *args); int sceUdcdStop(const char *driverName, int size, void *args); /** + * Stop a USB driver for an UDCD bus. + * + * @param driverName - Name of the USB driver to stop + * @param size - Size of arguments to pass to USB driver start + * @param args - Arguments to pass to USB driver start + * @param[in] bus - UDCD bus (default is 2) + * + * @return 0 on success, < 0 on error. + */ +int sceUdcdStopInternal(const char *driverName, int size, void *args, int bus); + +/** + * Stops the current USB driver for an UDCD bus. + * + * @param[in] bus - UDCD bus (default is 2) + * + * @return 0 on success, < 0 on error. + */ +int sceUdcdStopCurrentInternal(int bus); + +/** * Activate a USB driver. * * @param pid - Product ID for the default USB Driver @@ -431,6 +482,17 @@ int sceUdcdStop(const char *driverName, int size, void *args); int sceUdcdActivate(unsigned int productId); /** + * Activate a USB driver for an UDCD bus. + * + * @param pid - Product ID for the default USB Driver + * @param[in] bus_powered - Enable USB bus power + * @param[in] bus - UDCD bus (default is 2) + * + * @return 0 on success, < 0 on error. + */ +int sceUdcdActivateInternal(unsigned int productId, unsigned int bus_powered, int bus); + +/** * Deactivate USB driver. * * @return 0 on success, < 0 on error. @@ -438,6 +500,15 @@ int sceUdcdActivate(unsigned int productId); int sceUdcdDeactivate(void); /** + * Deactivate USB driver for an UDCD bus. + * + * @param[in] bus - UDCD bus (default is 2) + * + * @return 0 on success, < 0 on error. + */ +int sceUdcdDeactivateInternal(int bus); + +/** * Get USB state * * @return One or more ::SceUdcdStatus. @@ -445,6 +516,15 @@ int sceUdcdDeactivate(void); int sceUdcdGetDeviceState(void); /** + * Get USB state for an UDCD bus + * + * @param[in] bus - UDCD bus (default is 2) + * + * @return One or more ::SceUdcdStatus. + */ +int sceUdcdGetDeviceStateInternal(int bus); + +/** * Get device information * * @param[out] devInfo - Device information @@ -454,6 +534,16 @@ int sceUdcdGetDeviceState(void); int sceUdcdGetDeviceInfo(SceUdcdDeviceInfo *devInfo); /** + * Get device information for an UDCD bus + * + * @param[out] devInfo - Device information + * @param[in] bus - UDCD bus (default is 2) + * + * @return 0 on success, < 0 on error. +*/ +int sceUdcdGetDeviceInfoInternal(SceUdcdDeviceInfo *devInfo, int bus); + +/** * Get state of a specific USB driver * * @param driverName - name of USB driver to get status from @@ -510,7 +600,7 @@ int sceUdcdRegister(SceUdcdDriver *drv); * * @return 0 on success, < 0 on error */ -int sceUdcdRegisterToBus(SceUdcdDriver *drv, int bus); +int sceUdcdRegisterInternal(SceUdcdDriver *drv, int bus); /** * Unregister a USB driver @@ -522,6 +612,16 @@ int sceUdcdRegisterToBus(SceUdcdDriver *drv, int bus); int sceUdcdUnregister(SceUdcdDriver *drv); /** + * Unregister a USB driver for an UDCD bus + * + * @param drv - Pointer to a filled out USB driver + * @param[in] bus - UDCD bus (default is 2) + * + * @return 0 on success, < 0 on error + */ +int sceUdcdUnregisterInternal(SceUdcdDriver *drv, int bus); + +/** * Clear the FIFO on an endpoint * * @param endp - The endpoint to clear @@ -531,6 +631,16 @@ int sceUdcdUnregister(SceUdcdDriver *drv); int sceUdcdClearFIFO(SceUdcdEndpoint *endp); /** + * Clear the FIFO on an endpoint for an UDCD bus + * + * @param endp - The endpoint to clear + * @param[in] bus - UDCD bus (default is 2) + * + * @return 0 on success, < 0 on error + */ +int sceUdcdClearFIFOInternal(SceUdcdEndpoint *endp, int bus); + +/** * Cancel any pending requests on an endpoint. * * @param endp - The endpoint to cancel @@ -549,7 +659,17 @@ int sceUdcdReqCancelAll(SceUdcdEndpoint *endp); int sceUdcdStall(SceUdcdEndpoint *endp); /** - * Queue a send request(IN from host pov) + * Stall an endpoint for an UDCD bus + * + * @param endp - The endpoint to stall + * @param[in] bus - UDCD bus (default is 2) + * + * @return 0 on success, < 0 on error + */ +int sceUdcdStallInternal(SceUdcdEndpoint *endp, int bus); + +/** + * Queue a send request (IN from host pov) * * @param req - Pointer to a filled out ::SceUdcdDeviceRequest structure. * @@ -558,7 +678,17 @@ int sceUdcdStall(SceUdcdEndpoint *endp); int sceUdcdReqSend(SceUdcdDeviceRequest *req); /** - * Queue a receive request(OUT from host pov) + * Queue a send request (IN from host pov) for an UDCD bus + * + * @param req - Pointer to a filled out ::SceUdcdDeviceRequest structure. + * @param[in] bus - UDCD bus (default is 2) + * + * @return 0 on success, < 0 on error + */ +int sceUdcdReqSendInternal(SceUdcdDeviceRequest *req, int bus); + +/** + * Queue a receive request (OUT from host pov) * * @param req - Pointer to a filled out ::SceUdcdDeviceRequest structure * @@ -566,6 +696,16 @@ int sceUdcdReqSend(SceUdcdDeviceRequest *req); */ int sceUdcdReqRecv(SceUdcdDeviceRequest *req); +/** + * Queue a receive request (OUT from host pov) for an UDCD bus + * + * @param req - Pointer to a filled out ::SceUdcdDeviceRequest structure + * @param[in] bus - UDCD bus (default is 2) + * + * @return 0 on success, < 0 on error + */ +int sceUdcdReqRecvInternal(SceUdcdDeviceRequest *req, int bus); + #ifdef __cplusplus } #endif diff --git a/include/user/appmgr.h b/include/user/appmgr.h index a6e09c6..b55859a 100644 --- a/include/user/appmgr.h +++ b/include/user/appmgr.h @@ -13,8 +13,9 @@ typedef enum SceAppMgrErrorCode { SCE_APPMGR_ERROR_STATE = 0x80802013, //!< Invalid state SCE_APPMGR_ERROR_NULL_POINTER = 0x80802016, //!< NULL pointer SCE_APPMGR_ERROR_INVALID = 0x8080201A, //!< Invalid param + SCE_APPMGR_ERROR_TOO_LONG_ARGV = 0x8080201D, //!< argv is too long SCE_APPMGR_ERROR_INVALID_SELF_PATH = 0x8080201E, //!< Invalid SELF path - SCE_APPMGR_ERROR_TOO_LONG_ARGV = 0x8080201D //!< argv is too long + SCE_APPMGR_ERROR_BGM_PORT_BUSY = 0x80803000 //!< BGM port was occupied and could not be secured } SceAppMgrErrorCode; typedef enum SceAppMgrSystemEventType { @@ -79,7 +80,13 @@ typedef struct SceAppMgrSaveDataSlotDelete { SceAppUtilSaveDataMountPoint mountPoint; //!< Savedata mountpoint } SceAppMgrSaveDataSlotDelete; -typedef struct SceAppMgrAppState SceAppMgrAppState; // Missing struct +typedef struct SceAppMgrAppState { + SceUInt32 systemEventNum; + SceUInt32 appEventNum; + SceBool isSystemUiOverlaid; + SceUInt8 reserved[116]; +} SceAppMgrAppState; + typedef struct SceAppMgrExecOptParam SceAppMgrExecOptParam; // Missing struct typedef struct SceAppMgrLaunchAppOptParam SceAppMgrLaunchAppOptParam; // Missing struct @@ -89,6 +96,34 @@ typedef struct sceAppMgrLoadExecOptParam { #define SCE_APPMGR_MAX_APP_NAME_LENGTH (31) +typedef struct SceAppMgrBudgetInfo { +// 0x00 + SceSize size; + SceUInt32 mode; + SceUInt32 unk_8; + SceUInt32 budgetLPDDR2; +// 0x10 + SceUInt32 freeLPDDR2; + SceUInt32 allow0x0E208060; + SceUInt32 unk_14; + SceUInt32 budget0x0E208060; +// 0x20 + SceUInt32 free0x0E208060; + SceUInt32 unk_24; + SceUInt32 unk_28; + SceUInt32 budgetPHYCONT; +// 0x30 + SceUInt32 freePHYCONT; + SceUInt32 allow; + SceUChar8 unk_38[0x20]; + SceUInt32 unk_58; + SceUInt32 budgetCDRAM; +// 0x60 + SceUInt32 freeCDRAM; + SceUChar8 reserved_64[0x24]; +// 0x88 +} SceAppMgrBudgetInfo; + /** * Save data on savedata0: partition * @@ -177,7 +212,7 @@ int sceAppMgrDestroyOtherApp(void); * * @return 0 on success, < 0 on error. */ -int sceAppMgrDestroyAppByName(char *name); +int sceAppMgrDestroyAppByName(const char *name); /** * Destroy an application by Application ID @@ -230,7 +265,7 @@ int sceAppMgrReceiveSystemEvent(SceAppMgrSystemEvent *systemEvent); /** * Copies app param to an array * - * @param[in] param - pointer to a 1024 byte location to store the app param + * @param[out] param - pointer to a 1024 byte location to store the app param * * @return 0 on success, < 0 on error. * @@ -290,7 +325,7 @@ int sceAppMgrLoadExec(const char *appPath, char * const argv[], * * @note If flags != 0x20000, Livearea is opened. */ -int sceAppMgrLaunchAppByUri(int flags, char *uri); +int sceAppMgrLaunchAppByUri(int flags, const char *uri); /** * Start an application by Title ID @@ -325,7 +360,7 @@ SceUID sceAppMgrLaunchAppByName2ForShell(const char *name, const char *param, Sc * @return 0 on success, < 0 on error. * */ -int sceAppMgrGameDataMount(const char *path, int unk1, int unk2, char *mount_point); +int sceAppMgrGameDataMount(const char *path, int unk1, int unk2, const char *mount_point); /** * Mount application data @@ -337,7 +372,7 @@ int sceAppMgrGameDataMount(const char *path, int unk1, int unk2, char *mount_poi * * @note id: 100 (photo0), 101 (friends), 102 (messages), 103 (near), 105 (music), 108 (calendar) */ -int sceAppMgrAppDataMount(int id, char *mount_point); +int sceAppMgrAppDataMount(int id, const char *mount_point); /** * Mount application data by Title ID @@ -350,7 +385,7 @@ int sceAppMgrAppDataMount(int id, char *mount_point); * * @note id: 106 (ad), 107 (ad) */ -int sceAppMgrAppDataMountById(int id, char *titleid, char *mount_point); +int sceAppMgrAppDataMountById(int id, const char *titleid, const char *mount_point); /** * Get application params from SFO descriptor @@ -362,7 +397,7 @@ int sceAppMgrAppDataMountById(int id, char *titleid, char *mount_point); * * @return 0 on success, < 0 on error. * - * @note param: 8 (category), 9 (stitle/title?), 10 (title/stitle?), 12 (titleid) + * @note param: 6 (contentid) 8 (category), 9 (stitle/title?), 10 (title/stitle?), 12 (titleid) */ int sceAppMgrAppParamGetString(int pid, int param, char *string, int length); @@ -377,7 +412,7 @@ int sceAppMgrAppParamGetString(int pid, int param, char *string, int length); * * @note dev: ux0: */ -int sceAppMgrGetDevInfo(char *dev, uint64_t *max_size, uint64_t *free_size); +int sceAppMgrGetDevInfo(const char *dev, uint64_t *max_size, uint64_t *free_size); /** * Mount application data (PSPEmu) @@ -389,7 +424,7 @@ int sceAppMgrGetDevInfo(char *dev, uint64_t *max_size, uint64_t *free_size); * * @note id: 400 (ad), 401 (ad), 402 (ad) */ -int sceAppMgrMmsMount(int id, char *mount_point); +int sceAppMgrMmsMount(int id, const char *mount_point); /** * Mount PSPEmu virtual memory stick @@ -400,7 +435,7 @@ int sceAppMgrMmsMount(int id, char *mount_point); * * @note mount_point: ms */ -int sceAppMgrPspSaveDataRootMount(char *mount_point); +int sceAppMgrPspSaveDataRootMount(const char *mount_point); /** * Mount working directory @@ -412,7 +447,7 @@ int sceAppMgrPspSaveDataRootMount(char *mount_point); * * @note id: 200 (td), 201 (td), 203 (td), 204 (td), 206 (td) */ -int sceAppMgrWorkDirMount(int id, char *mount_point); +int sceAppMgrWorkDirMount(int id, const char *mount_point); /** * Mount working directory by Title ID @@ -425,7 +460,7 @@ int sceAppMgrWorkDirMount(int id, char *mount_point); * * @note id: 205 (cache0), 207 (td) */ -int sceAppMgrWorkDirMountById(int id, char *titleid, char *mount_point); +int sceAppMgrWorkDirMountById(int id, const char *titleid, const char *mount_point); /** * Unmount a mountpoint @@ -460,6 +495,35 @@ int sceAppMgrConvertVs0UserDrivePath(char *path, char *mount_point, int unk); */ int sceAppMgrGetRawPath(char *path, char *mount_point, char *unk); +/** + * Resolve a path to the corresponding true path (uses ::sceFiosKernelOverlayResolveSync underneath). + * + * @param[in] path - Path to convert (e.g. app0:) + * @param[out] resolved_path - True resolved path + * @param[in] unk - Unknown, provide an empty buffer + * + * @return 0 on success, < 0 on error. + */ +int _sceAppMgrGetRawPath(char *path, char *resolved_path, int resolved_path_size, char unk[16]); + +/** + * Get the real/resolved path of app0: (where it's actually mounted) + * + * @param[in] appId - Use -2 for the current application + * @param[out] resolved_path - Buffer that will hold the resolved path. It should have enough room to hold 292 characters or it will buffer overflow (noname120). + * + * @return 0 on success. + */ +int _sceAppMgrGetRawPathOfApp0ByAppIdForShell(int appId, char resolved_path[292]); + +/** + * Get application memory budget info. + * + * @return 0 on success, < 0 on error. + * + */ +int sceAppMgrGetBudgetInfo(SceAppMgrBudgetInfo *info); + #ifdef __cplusplus } #endif diff --git a/include/user/avconfig.h b/include/user/avconfig.h index 947af3c..d171647 100644 --- a/include/user/avconfig.h +++ b/include/user/avconfig.h @@ -7,7 +7,7 @@ extern "C" { #endif -/*** +/** * Get the maximum brightness. * * @param[out] maxBrightness - Maximum brightness. @@ -16,7 +16,7 @@ extern "C" { */ int sceAVConfigGetDisplayMaxBrightness(int *maxBrightness); -/*** +/** * Set the screen brightness. * * @param brightness - Brightness that the screen will be set to (range 21-65536, 0 turns off the screen). @@ -25,7 +25,7 @@ int sceAVConfigGetDisplayMaxBrightness(int *maxBrightness); */ int sceAVConfigSetDisplayBrightness(int brightness); -/*** +/** * Get the shutter volume. * * @param[out] volume - shutter volume. @@ -34,7 +34,7 @@ int sceAVConfigSetDisplayBrightness(int brightness); */ int sceAVConfigGetShutterVol(int *volume); -/*** +/** * Get the system volume. * * @param[out] volume - System volume. @@ -43,7 +43,7 @@ int sceAVConfigGetShutterVol(int *volume); */ int sceAVConfigGetSystemVol(int *volume); -/*** +/** * Set the system volume. * * @param volume - volume that the device will be set to (range 0-30). diff --git a/include/user/compat.h b/include/user/compat.h index a7e2283..9a4786e 100644 --- a/include/user/compat.h +++ b/include/user/compat.h @@ -11,8 +11,9 @@ extern "C" { #endif typedef enum SceCompatCacheMode { - SCE_COMPAT_CACHE_NONE = 1, - SCE_COMPAT_CACHE_INVALIDATE = 2 + SCE_COMPAT_CACHE_NONE = 0, + SCE_COMPAT_CACHE_INVALIDATE = 1, + SCE_COMPAT_CACHE_WRITEBACK = 2 } SceCompatCacheMode; typedef enum SceCompatPeripheralMode { @@ -105,7 +106,7 @@ int sceCompatSetSuspendSema(SceUID semaid1, SceUID semaid2); int sceCompatSuspendResume(int unk); /** - * Cache invalidate + * Cache operation * * @param[in] mode - One of ::SceCompatCacheMode * @param[in] addr - Address diff --git a/include/user/ctrl.h b/include/user/ctrl.h index 0d1b02c..4758f6c 100644 --- a/include/user/ctrl.h +++ b/include/user/ctrl.h @@ -20,6 +20,7 @@ typedef enum SceCtrlErrorCode { /** Enumeration for the digital controller buttons. * @note - L1/R1/L3/R3 only can bind using ::sceCtrlPeekBufferPositiveExt2 and ::sceCtrlReadBufferPositiveExt2 * @note - Values bigger than 0x00010000 can be intercepted only with shell privileges + * @note - Vita's L Trigger and R Trigger are mapped to L1 and R1 when using ::sceCtrlPeekBufferPositiveExt2 and ::sceCtrlReadBufferPositiveExt2 */ typedef enum SceCtrlButtons { SCE_CTRL_SELECT = 0x00000001, //!< Select button. @@ -298,7 +299,7 @@ int sceCtrlGetBatteryInfo(int port, SceUInt8 *batt); * having the input sent to the game thread. * @param[in] intercept Boolean value * - * @return 0, < 0 on error + * @return 0, < 0 on error */ int sceCtrlSetButtonIntercept(int intercept); @@ -307,9 +308,17 @@ int sceCtrlSetButtonIntercept(int intercept); * * @param[out] intercept Boolean value * - * @return 0, < 0 on error + * @return 0, < 0 on error */ int sceCtrlGetButtonIntercept(int *intercept); + +/** + * Check if multi controller is supported + * + * @return 1 if yes, 0 if no + */ +int sceCtrlIsMultiControllerSupported(void); + #ifdef __cplusplus } #endif diff --git a/include/user/incoming_dialog.h b/include/user/incoming_dialog.h new file mode 100644 index 0000000..616b89e --- /dev/null +++ b/include/user/incoming_dialog.h @@ -0,0 +1,83 @@ +#ifndef _DOLCESDK_PSP2_INCOMING_DIALOG_H_ +#define _DOLCESDK_PSP2_INCOMING_DIALOG_H_ + +#include <psp2/kernel/clib.h> +#include <psp2/scebase.h> +#include <psp2/types.h> + +#ifdef __cplusplus +extern "C" { +#endif + +/** + * Dialog status + */ +typedef enum SceIncomingDialogStatus { + SCE_INCOMING_DIALOG_NOT_RUNNING, + SCE_INCOMING_DIALOG_BUSY, + SCE_INCOMING_DIALOG_RUNNING, + SCE_INCOMING_DIALOG_ACCEPTED, + SCE_INCOMING_DIALOG_REJECTED, + SCE_INCOMING_DIALOG_CLOSED, + SCE_INCOMING_DIALOG_TIMEOUT, +} SceIncomingDialogStatus; + +/** + * Errors + */ +#define SCE_INCOMING_DIALOG_ERROR_INVALID_ARG 0x80106202; + +typedef struct SceIncomingDialogParam { + SceInt32 sdkVersion; + SceChar8 titleid[0x10]; // TitleId of the application to open when "accept" button has been pressed. Can be all zero. + SceChar8 audioPath[0x80]; // Path to audio file that will be played during dialog, .mp3, .at9, m4a. Can be all zero. + SceUInt32 dialogTimer; // Time to show dialog in seconds + SceInt32 unk_BC; // Can be set to 0 + SceChar8 reserved1[0x3E]; + SceWChar16 buttonRightText[0x20]; // Text for "accept" button. Must be null-terminated. + SceWChar16 buttonLeftText[0x20]; // Text for "reject" button. Must be null-terminated. If all zero, only "accept" button will be created. + SceWChar16 dialogText[0x81]; // Text for dialog window, also shared with notification. Must be null-terminated. +} SceIncomingDialogParam; + +/** + * Initialize incoming dialog library, initType must be 0. + */ +SceInt32 sceIncomingDialogInit(int initType); + +/** + * Open incoming dialog. + */ +SceInt32 sceIncomingDialogOpen(SceIncomingDialogParam* dialogParam); + +/** + * Returns current status of incoming dialog. + */ +SceInt32 sceIncomingDialogGetStatus(void); + +/** + * Force exit to LiveArea and show dialog window + */ +SceInt32 sceIncomingDialogSwitchToDialog(void); + +/** + * Close incoming dialog. + */ +SceInt32 sceIncomingDialogClose(void); + +/** + * Terminate incoming dialog library + */ +SceInt32 sceIncomingDialogTerm(void); + +static inline +void sceIncomingDialogParamInit(SceIncomingDialogParam* dialogParam) +{ + sceClibMemset(dialogParam, 0x0, sizeof(SceIncomingDialogParam)); + dialogParam->sdkVersion = SCE_PSP2_SDK_VERSION; +} + +#ifdef __cplusplus +} +#endif /* __cplusplus */ + +#endif /* _DOLCESDK_PSP2_INCOMING_DIALOG_H_ */ diff --git a/include/user/jpegarm.h b/include/user/jpegarm.h new file mode 100644 index 0000000..6a5f5c7 --- /dev/null +++ b/include/user/jpegarm.h @@ -0,0 +1,103 @@ +#ifndef _DOLCESDK_PSP2_JPEGARM_H_ +#define _DOLCESDK_PSP2_JPEGARM_H_ + +#include <psp2/types.h> +#include <psp2/jpeg.h> + +#if defined(_LANGUAGE_C_PLUS_PLUS)||defined(__cplusplus)||defined(c_plusplus) +extern "C" { +#endif + +/* Error codes */ +#define SCE_JPEG_ARM_OK (SCE_JPEG_OK) + +#define SCE_JPEG_ARM_ERROR_IMAGE_EMPTY (SCE_JPEG_ERROR_IMAGE_EMPTY | 0x100) +#define SCE_JPEG_ARM_ERROR_BAD_MARKER_LENGTH (SCE_JPEG_ERROR_BAD_MARKER_LENGTH | 0x100) +#define SCE_JPEG_ARM_ERROR_BAD_DHT_COUNTS (SCE_JPEG_ERROR_BAD_DHT_COUNTS | 0x100) +#define SCE_JPEG_ARM_ERROR_BAD_DHT_INDEX (SCE_JPEG_ERROR_BAD_DHT_INDEX | 0x100) +#define SCE_JPEG_ARM_ERROR_BAD_DQT_INDEX (SCE_JPEG_ERROR_BAD_DQT_INDEX | 0x100) +#define SCE_JPEG_ARM_ERROR_DECODE_ERROR (SCE_JPEG_ERROR_DECODE_ERROR | 0x100) +#define SCE_JPEG_ARM_ERROR_INVALID_POINTER (SCE_JPEG_ERROR_INVALID_POINTER | 0x100) +#define SCE_JPEG_ARM_ERROR_BAD_COMPONENT_ID (SCE_JPEG_ERROR_BAD_COMPONENT_ID | 0x100) +#define SCE_JPEG_ARM_ERROR_UNSUPPORT_COLORSPACE (SCE_JPEG_ERROR_UNSUPPORT_COLORSPACE | 0x100) +#define SCE_JPEG_ARM_ERROR_BAD_MCU_SIZE (SCE_JPEG_ERROR_BAD_MCU_SIZE | 0x100) +#define SCE_JPEG_ARM_ERROR_BAD_PRECISION (SCE_JPEG_ERROR_BAD_PRECISION | 0x100) +#define SCE_JPEG_ARM_ERROR_UNSUPPORT_SAMPLING (SCE_JPEG_ERROR_UNSUPPORT_SAMPLING | 0x100) +#define SCE_JPEG_ARM_ERROR_COMPONENT_COUNT (SCE_JPEG_ERROR_COMPONENT_COUNT | 0x100) +#define SCE_JPEG_ARM_ERROR_EOI_EXPECTED (SCE_JPEG_ERROR_EOI_EXPECTED | 0x100) +#define SCE_JPEG_ARM_ERROR_UNSUPPORT_IMAGE_SIZE (SCE_JPEG_ERROR_UNSUPPORT_IMAGE_SIZE | 0x100) +#define SCE_JPEG_ARM_ERROR_NO_HUFF_TABLE (SCE_JPEG_ERROR_NO_HUFF_TABLE | 0x100) +#define SCE_JPEG_ARM_ERROR_NO_QUANT_TABLE (SCE_JPEG_ERROR_NO_QUANT_TABLE | 0x100) +#define SCE_JPEG_ARM_ERROR_NO_SOI (SCE_JPEG_ERROR_NO_SOI | 0x100) +#define SCE_JPEG_ARM_ERROR_BAD_DHT_MARKER (SCE_JPEG_ERROR_BAD_DHT_MARKER | 0x100) +#define SCE_JPEG_ARM_ERROR_BAD_DRI_MARKER (SCE_JPEG_ERROR_BAD_DRI_MARKER | 0x100) +#define SCE_JPEG_ARM_ERROR_BAD_SOF_MARKER (SCE_JPEG_ERROR_BAD_SOF_MARKER | 0x100) +#define SCE_JPEG_ARM_ERROR_BAD_SOS_MARKER (SCE_JPEG_ERROR_BAD_SOS_MARKER | 0x100) +#define SCE_JPEG_ARM_ERROR_SOF_DUPLICATE (SCE_JPEG_ERROR_SOF_DUPLICATE | 0x100) +#define SCE_JPEG_ARM_ERROR_NO_LOSSLESS_SUPPORT (SCE_JPEG_ERROR_NO_LOSSLESS_SUPPORT | 0x100) +#define SCE_JPEG_ARM_ERROR_NO_ARITH_SUPPORT (SCE_JPEG_ERROR_NO_ARITH_SUPPORT | 0x100) +#define SCE_JPEG_ARM_ERROR_UNKNOWN_MARKER (SCE_JPEG_ERROR_UNKNOWN_MARKER | 0x100) +#define SCE_JPEG_ARM_ERROR_BAD_RESTART_MARKER (SCE_JPEG_ERROR_BAD_RESTART_MARKER | 0x100) +#define SCE_JPEG_ARM_ERROR_UNEXPECTED_MARKER (SCE_JPEG_ERROR_UNEXPECTED_MARKER | 0x100) +#define SCE_JPEG_ARM_ERROR_INVALID_REGION (SCE_JPEG_ERROR_INVALID_REGION | 0x100) +#define SCE_JPEG_ARM_ERROR_INVALID_STATE (SCE_JPEG_ERROR_INVALID_STATE | 0x100) +#define SCE_JPEG_ARM_ERROR_CANNOT_CONTINUE (SCE_JPEG_ERROR_CANNOT_CONTINUE | 0x100) +#define SCE_JPEG_ARM_ERROR_MEMORY_SIZE (SCE_JPEG_ERROR_MEMORY_SIZE | 0x100) +#define SCE_JPEG_ARM_ERROR_INVALID_COLOR_FORMAT (SCE_JPEG_ERROR_INVALID_COLOR_FORMAT | 0x100) +#define SCE_JPEG_ARM_ERROR_INVALID_DECODE_MODE (SCE_JPEG_ERROR_INVALID_DECODE_MODE | 0x100) +#define SCE_JPEG_ARM_ERROR_BAD_PROGRESSIVE_PARAM (SCE_JPEG_ERROR_BAD_PROGRESSIVE_PARAM | 0x100) +#define SCE_JPEG_ARM_ERROR_INIT_DONE (SCE_JPEG_ERROR_INIT_DONE | 0x100) +#define SCE_JPEG_ARM_ERROR_INPUT_SUSPENDED (SCE_JPEG_ERROR_INPUT_SUSPENDED | 0x100) +#define SCE_JPEG_ARM_ERROR_INPUT_DATA_TOO_BIG (SCE_JPEG_ERROR_INPUT_DATA_TOO_BIG | 0x100) +#define SCE_JPEG_ARM_ERROR_INVALID_DATA_SIZE (SCE_JPEG_ERROR_INVALID_DATA_SIZE | 0x100) + +/* for backward compatibility */ +#define SCE_JPEG_ARM_ERROR_UNSUPPORT_DOWNSCALE (SCE_JPEG_ARM_ERROR_INVALID_DECODE_MODE) +#define SCE_JPEG_ARM_ERROR_OUT_OF_MEMORY (SCE_JPEG_ARM_ERROR_MEMORY_SIZE) + +/* Decode JPEG data to RGBA format */ +int sceJpegArmDecodeMJpeg( + const unsigned char *pJpeg, + SceSize isize, + void *pRGBA, + SceSize osize, + int decodeMode, + void *pCoefBuffer, + SceSize coefBufferSize); + +/* Decode JPEG data (no color conversion) */ +int sceJpegArmDecodeMJpegYCbCr( + const unsigned char *pJpeg, + SceSize isize, + unsigned char *pYCbCr, + SceSize osize, + int decodeMode, + void *pCoefBuffer, + SceSize coefBufferSize); + +/* tempBufferSize is always 0, even when using colour space conversion */ +typedef SceJpegOutputInfo SceJpegArmOutputInfo; + +/* Return color space and each buffer sizes required when decoding a JPEG image */ +int sceJpegArmGetOutputInfo( + const unsigned char *pJpeg, + SceSize isize, + int outputFormat, + int decodeMode, + SceJpegArmOutputInfo *pOutputInfo); + +/* Split decoder (control struct is different from sceJpeg, no reference anywhere in the apps) + * These functions cannot be used at the moment. + */ + +int sceJpegArmCreateSplitDecoder(void *pCtrl); +int sceJpegArmDeleteSplitDecoder(void *pCtrl); + +int sceJpegArmSplitDecodeMJpeg(void *pCtrl); + +#if defined(_LANGUAGE_C_PLUS_PLUS)||defined(__cplusplus)||defined(c_plusplus) +} +#endif + +#endif /* _DOLCESDK_PSP2_JPEGARM_H_ */ + diff --git a/include/user/kernel/clib.h b/include/user/kernel/clib.h index 6db799d..b22eb3f 100644 --- a/include/user/kernel/clib.h +++ b/include/user/kernel/clib.h @@ -8,21 +8,47 @@ extern "C" { #endif -int sceClibStrcmp(const char *, const char *); -void *sceClibStrncmp(const char *, const char *, SceSize); -int sceClibStrncasecmp(const char *, const char *, SceSize); -char *sceClibStrncpy(char *, const char *, SceSize); -char *sceClibStrncat(char *, const char *, SceSize); -SceSize sceClibStrnlen(const char *, SceSize); -char *sceClibStrrchr(const char *, int); - -int sceClibPrintf(const char *, ...); -int sceClibSnprintf(char *, SceSize, const char *, ...); -int sceClibVsnprintf(char *, SceSize, const char *, va_list); - -void *sceClibMemset(void *, int, SceSize); -void *sceClibMemcpy(void *, const void *, SceSize); -void *sceClibMemmove(void *, const void *, SceSize); +/** + * Run bkpt #0x88 and end the process in state -1 + * + * @return none + */ +void sceClibAbort(void); + +char sceClibLookCtypeTable(char ch); + +int sceClibTolower(char ch); +int sceClibToupper(char ch); + +int sceClibPrintf(const char *fmt, ...); +int sceClibVprintf(const char *fmt, va_list args); +int sceClibSnprintf(char *dst, SceSize dst_max_size, const char *fmt, ...); +int sceClibVsnprintf(char *dst, SceSize dst_max_size, const char *fmt, va_list args); + +char *sceClibStrncpy(char *dst, const char *src, SceSize len); +char *sceClibStrncat(char *dst, const char *src, SceSize len); + +char *sceClibStrrchr(const char *src, int ch); +char *sceClibStrstr(const char *s1, const char *s2); + +int sceClibStrcmp(const char *s1, const char *s2); +int sceClibStrncmp(const char *s1, const char *s2, SceSize len); +int sceClibStrncasecmp(const char *s1, const char *s2, SceSize len); + +SceSize sceClibStrnlen(const char *s1, SceSize max_len); + +void *sceClibMemset(void *dst, int ch, SceSize len); +void *sceClibMemcpy(void *dst, const void *src, SceSize len); +void *sceClibMemcpy_safe(void *dst, const void *src, SceSize len); +void *sceClibMemmove(void *dst, const void *src, SceSize len); + +int sceClibMemcmp(const void *s1, const void *s2, SceSize len); + +void *sceClibMemchr(const void *src, int ch, SceSize len); + +void *sceClibMspaceCreate(void *base, SceSize size); +void *sceClibMspaceMalloc(void *space, SceSize size); +void sceClibMspaceFree(void *space, void *ptr); #ifdef __cplusplus } diff --git a/include/user/kernel/dmac.h b/include/user/kernel/dmac.h index b0fbd2b..0047d6f 100644 --- a/include/user/kernel/dmac.h +++ b/include/user/kernel/dmac.h @@ -1,11 +1,13 @@ #ifndef _PSP2_DMAC_H_ #define _PSP2_DMAC_H_ +#include <stddef.h> + #ifdef __cplusplus extern "C" { #endif -/*** +/** * DMA memcpy * * @param[in] dst - Destination @@ -16,7 +18,7 @@ extern "C" { */ void *sceDmacMemcpy(void *dst, const void *src, size_t size); -/*** +/** * DMA memset * * @param[in] dst - Destination diff --git a/include/user/kernel/modulemgr.h b/include/user/kernel/modulemgr.h index 4ea55d3..3aa6f30 100644 --- a/include/user/kernel/modulemgr.h +++ b/include/user/kernel/modulemgr.h @@ -22,33 +22,34 @@ extern "C" { /** @} */ typedef struct SceKernelSegmentInfo { - SceUInt size; //!< sizeof(SceKernelSegmentInfo) - SceUInt perms; //!< probably rwx in low bits - void *vaddr; //!< address in memory - SceUInt memsz; //!< size in memory - SceUInt flags; //!< meaning unknown - SceUInt res; //!< unused? + SceSize size; //!< this structure size (0x18) + SceUInt perms; //!< probably rwx in low bits + void *vaddr; //!< address in memory + SceSize memsz; //!< size in memory + SceSize filesz; //!< original size of memsz + SceUInt res; //!< unused } SceKernelSegmentInfo; typedef struct SceKernelModuleInfo { - SceUInt size; //!< 0x1B8 for Vita 1.x - SceUInt handle; //!< kernel module handle? - SceUInt flags; //!< some bits. could be priority or whatnot - char module_name[28]; - SceUInt unk28; - void *module_start; - SceUInt unk30; - void *module_stop; - void *exidxTop; - void *exidxBtm; - SceUInt unk40; - SceUInt unk44; - void *tlsInit; - SceSize tlsInitSize; - SceSize tlsAreaSize; - char path[256]; - SceKernelSegmentInfo segments[4]; - SceUInt type; //!< 6 = user-mode PRX? + SceSize size; //!< 0x1B8 for Vita 1.x + SceUID modid; + uint16_t modattr; + uint8_t modver[2]; + char module_name[28]; + SceUInt unk28; + void *start_entry; + void *stop_entry; + void *exit_entry; + void *exidx_top; + void *exidx_btm; + void *extab_top; + void *extab_btm; + void *tlsInit; + SceSize tlsInitSize; + SceSize tlsAreaSize; + char path[256]; + SceKernelSegmentInfo segments[4]; + SceUInt type; //!< 6 = user-mode PRX? } SceKernelModuleInfo; typedef struct SceKernelLMOption { @@ -62,21 +63,18 @@ typedef struct SceKernelULMOption { int sceKernelGetModuleList(int flags, SceUID *modids, int *num); int sceKernelGetModuleInfo(SceUID modid, SceKernelModuleInfo *info); -SceUID sceKernelLoadModule(char *path, int flags, SceKernelLMOption *option); +SceUID sceKernelLoadModule(const char *path, int flags, SceKernelLMOption *option); int sceKernelUnloadModule(SceUID modid, int flags, SceKernelULMOption *option); int sceKernelStartModule(SceUID modid, SceSize args, void *argp, int flags, void *option, int *status); int sceKernelStopModule(SceUID modid, SceSize args, void *argp, int flags, void *option, int *status); -SceUID sceKernelLoadStartModule(char *path, SceSize args, void *argp, int flags, SceKernelLMOption *option, int *status); +SceUID sceKernelLoadStartModule(const char *path, SceSize args, void *argp, int flags, SceKernelLMOption *option, int *status); int sceKernelStopUnloadModule(SceUID modid, SceSize args, void *argp, int flags, SceKernelULMOption *option, int *status); typedef struct SceKernelFwInfo { SceSize size; - char versionString[16]; - SceUInt unk_14; - SceUInt unk_18; - SceUInt unk_1C; + char versionString[0x1C]; SceUInt version; SceUInt unk_24; } SceKernelFwInfo; diff --git a/include/user/kernel/processmgr.h b/include/user/kernel/processmgr.h index cbce339..e515f60 100644 --- a/include/user/kernel/processmgr.h +++ b/include/user/kernel/processmgr.h @@ -31,7 +31,7 @@ typedef enum SceKernelPowerTickType { SCE_KERNEL_POWER_TICK_DISABLE_OLED_DIMMING = 6 } SceKernelPowerTickType; -/*** +/** * Exit current Process with specified return code * * @param[in] res - Exit code to return @@ -40,7 +40,7 @@ typedef enum SceKernelPowerTickType { */ int sceKernelExitProcess(int res); -/*** +/** * Cancel specified idle timers to prevent entering in power save processing. * * @param[in] type - One of ::SceKernelPowerTickType @@ -49,7 +49,7 @@ int sceKernelExitProcess(int res); */ int sceKernelPowerTick(SceKernelPowerTickType type); -/*** +/** * Locks certain timers from triggering. * * @param[in] type - One of ::SceKernelPowerTickType @@ -58,7 +58,7 @@ int sceKernelPowerTick(SceKernelPowerTickType type); */ int sceKernelPowerLock(SceKernelPowerTickType type); -/*** +/** * Unlocks certain timers. * * @param[in] type - One of ::SceKernelPowerTickType @@ -67,7 +67,7 @@ int sceKernelPowerLock(SceKernelPowerTickType type); */ int sceKernelPowerUnlock(SceKernelPowerTickType type); -/*** +/** * Get the process time of the current process. * * @param[out] type - Pointer to a ::SceKernelSysClock structure which will receive the process time. @@ -76,27 +76,20 @@ int sceKernelPowerUnlock(SceKernelPowerTickType type); */ int sceKernelGetProcessTime(SceKernelSysClock *pSysClock); -/*** +/** * Get the lower 32 bits part of process time of the current process. * * @return process time of the current process */ SceUInt32 sceKernelGetProcessTimeLow(void); -/*** +/** * Get the process time of the current process. * * @return process time of the current process */ SceUInt64 sceKernelGetProcessTimeWide(void); -/*** - * Get the process ID of the current process. - * - * @return process ID of the current process - */ -SceUID sceKernelGetProcessId(void); - #ifdef __cplusplus } #endif diff --git a/include/user/kernel/rng.h b/include/user/kernel/rng.h index 88e0267..177e662 100644 --- a/include/user/kernel/rng.h +++ b/include/user/kernel/rng.h @@ -5,7 +5,7 @@ extern "C" { #endif -/*** +/** * Fills the output buffer with random data. * * @param[out] output - Output buffer diff --git a/include/user/kernel/sysmem.h b/include/user/kernel/sysmem.h index 1930012..404e810 100644 --- a/include/user/kernel/sysmem.h +++ b/include/user/kernel/sysmem.h @@ -1,19 +1,20 @@ #ifndef _PSP2_KERNEL_SYSMEM_H_ #define _PSP2_KERNEL_SYSMEM_H_ -#include <psp2/types.h> +#include <psp2/kernel/types.h> #ifdef __cplusplus extern "C" { #endif -typedef enum SceKernelMemBlockType { +typedef enum _SceKernelMemBlockType { SCE_KERNEL_MEMBLOCK_TYPE_USER_RW_UNCACHE = 0x0C208060, + SCE_KERNEL_MEMBLOCK_TYPE_USER_RX = 0x0C20D050, SCE_KERNEL_MEMBLOCK_TYPE_USER_RW = 0x0C20D060, SCE_KERNEL_MEMBLOCK_TYPE_USER_MAIN_PHYCONT_RW = 0x0C80D060, SCE_KERNEL_MEMBLOCK_TYPE_USER_MAIN_PHYCONT_NC_RW = 0x0D808060, SCE_KERNEL_MEMBLOCK_TYPE_USER_CDRAM_RW = 0x09408060 -} SceKernelMemBlockType; +} _SceKernelMemBlockType; typedef struct SceKernelAllocMemBlockOpt { SceSize size; @@ -25,6 +26,13 @@ typedef struct SceKernelAllocMemBlockOpt { int reserved[10]; } SceKernelAllocMemBlockOpt; +typedef struct SceKernelFreeMemorySizeInfo { + int size; //!< sizeof(SceKernelFreeMemorySizeInfo) + int size_user; //!< Free memory size for *_USER_RW memory + int size_cdram; //!< Free memory size for USER_CDRAM_RW memory + int size_phycont; //!< Free memory size for USER_MAIN_PHYCONT_*_RW memory +} SceKernelFreeMemorySizeInfo; + typedef enum SceKernelModel { SCE_KERNEL_MODEL_VITA = 0x10000, SCE_KERNEL_MODEL_VITATV = 0x20000 @@ -50,7 +58,7 @@ typedef enum SceKernelMemoryType { SCE_KERNEL_MEMORY_TYPE_NORMAL = 0xD0 } SceKernelMemoryType; -/*** +/** * Allocates a new memory block * * @param[in] name - Name for the memory block @@ -62,7 +70,7 @@ typedef enum SceKernelMemoryType { */ SceUID sceKernelAllocMemBlock(const char *name, SceKernelMemBlockType type, int size, SceKernelAllocMemBlockOpt *optp); -/*** +/** * Frees new memory block * * @param[in] uid - SceUID of the memory block to free @@ -71,7 +79,7 @@ SceUID sceKernelAllocMemBlock(const char *name, SceKernelMemBlockType type, int */ int sceKernelFreeMemBlock(SceUID uid); -/*** +/** * Gets the base address of a memory block * * @param[in] uid - SceUID of the memory block to free @@ -94,19 +102,29 @@ int sceKernelCloseVMDomain(void); int sceKernelOpenMemBlock(const char *name, int flags); int sceKernelCloseMemBlock(SceUID uid); -/*** +/** * Get the model number of the device * * @return A value from SCE_KERNEL_MODEL */ -int sceKernelGetModelForCDialog(); +int sceKernelGetModelForCDialog(void); -/*** +/** * Get the model number of the device * * @return A value from SCE_KERNEL_MODEL */ -int sceKernelGetModel(); +int sceKernelGetModel(void); + +/** + * Get free memory size in bytes + * + * @param[out] info - Returned free memory size for different kind of memory block types + * @return 0 on success, < 0 on error. +*/ +int sceKernelGetFreeMemorySize(SceKernelFreeMemorySizeInfo *info); + +int sceKernelIsPSVitaTV(void); #ifdef __cplusplus } diff --git a/include/user/kernel/threadmgr.h b/include/user/kernel/threadmgr.h index 6535d85..361ec71 100644 --- a/include/user/kernel/threadmgr.h +++ b/include/user/kernel/threadmgr.h @@ -1,77 +1,51 @@ #ifndef _PSP2_KERNEL_THREADMGR_H_ #define _PSP2_KERNEL_THREADMGR_H_ -#include <psp2/types.h> +#include <psp2common/kernel/threadmgr.h> #ifdef __cplusplus extern "C" { #endif -/** 64-bit system clock type. */ -typedef SceUInt64 SceKernelSysClock; - /* Threads. */ -typedef int (*SceKernelThreadEntry)(SceSize args, void *argp); - /** Additional options used when creating threads. */ -typedef struct SceKernelThreadOptParam { +typedef struct _SceKernelThreadOptParam { /** Size of the ::SceKernelThreadOptParam structure. */ - SceSize size; - /** Attributes */ - SceUInt32 attr; + SceSize size; + SceUInt32 attr; } SceKernelThreadOptParam; /** Structure to hold the status information for a thread * @see sceKernelGetThreadInfo */ -typedef struct SceKernelThreadInfo { +typedef struct _SceKernelThreadInfo { /** Size of the structure */ SceSize size; - /** The UID of the process where the thread belongs */ - SceUID processId; //Needs confirmation - /** Nul terminated name of the thread */ - char name[32]; - /** Thread attributes */ - SceUInt attr; - /** Thread status */ - int status; - /** Thread entry point */ + SceUID processId; + char name[SCE_UID_NAMELEN+1]; + SceUInt32 attr; + SceUInt32 status; SceKernelThreadEntry entry; - /** Thread stack pointer */ - void *stack; - /** Thread stack size */ - int stackSize; - /** Initial priority */ - int initPriority; - /** Current priority */ - int currentPriority; - /** Initial CPU affinity mask */ - int initCpuAffinityMask; - /** Current CPU affinity mask */ - int currentCpuAffinityMask; - /** Current CPU ID */ - int currentCpuId; - /** Last executed CPU ID */ - int lastExecutedCpuId; - /** Wait type */ - int waitType; - /** Wait id */ + void *pStack; + SceSize stackSize; + SceInt32 initPriority; + SceInt32 currentPriority; + SceInt32 initCpuAffinityMask; + SceInt32 currentCpuAffinityMask; + SceInt32 currentCpuId; + SceInt32 lastExecutedCpuId; + SceUInt32 waitType; SceUID waitId; - /** Exit status of the thread */ - int exitStatus; - /** Number of clock cycles run */ + SceInt32 exitStatus; SceKernelSysClock runClocks; - /** Interrupt preemption count */ - SceUInt intrPreemptCount; - /** Thread preemption count */ - SceUInt threadPreemptCount; - /** Thread release count */ - SceUInt threadReleaseCount; + SceUInt32 intrPreemptCount; + SceUInt32 threadPreemptCount; + SceUInt32 threadReleaseCount; + SceInt32 changeCpuCount; /** Function notify callback UID */ - SceUID fNotifyCallback; - /** Reserved */ - int reserved; + SceInt32 fNotifyCallback; + SceInt32 reserved; } SceKernelThreadInfo; /** Statistics about a running thread. @@ -83,7 +57,7 @@ typedef struct SceKernelThreadRunStatus { SceUID processId; SceUID threadId; int priority; - } cpuInfo[4]; + } cpuInfo[SCE_KERNEL_MAX_CPU]; } SceKernelThreadRunStatus; /* Sure there must be more than this, but haven't seen them */ @@ -99,176 +73,185 @@ typedef enum SceThreadStatus { /** * Create a thread * - * @par Example: - * @code - * SceUID thid; - * thid = sceKernelCreateThread("my_thread", threadFunc, 0x10000100, 0x10000, 0, 0, NULL); - * @endcode - * - * @param name - An arbitrary thread name. + * @param pName - An arbitrary thread name. * @param entry - The thread function to run when started. * @param initPriority - The initial priority of the thread. Less if higher priority. * @param stackSize - The size of the initial stack. * @param attr - The thread attributes, zero or more of ::SceThreadAttributes. * @param cpuAffinityMask - The CPU affinity mask - * @param option - Additional options specified by ::SceKernelThreadOptParam. + * @param pOptParam - Additional options specified by ::SceKernelThreadOptParam. * @return UID of the created thread, or an error code. */ -SceUID sceKernelCreateThread(const char *name, SceKernelThreadEntry entry, int initPriority, - int stackSize, SceUInt attr, int cpuAffinityMask, - const SceKernelThreadOptParam *option); +SceUID sceKernelCreateThread( + const char *pName, + SceKernelThreadEntry entry, + SceInt32 initPriority, + SceSize stackSize, + SceUInt32 attr, + SceInt32 cpuAffinityMask, + const SceKernelThreadOptParam *pOptParam); /** * Delate a thread * - * @param thid - UID of the thread to be deleted. + * @param threadId - UID of the thread to be deleted. * * @return < 0 on error. */ -int sceKernelDeleteThread(SceUID thid); +SceInt32 sceKernelDeleteThread(SceUID threadId); /** * Start a created thread * - * @param thid - Thread id from ::sceKernelCreateThread - * @param arglen - Length of the data pointed to by argp, in bytes - * @param argp - Pointer to the arguments. + * @param threadId - Thread id from ::sceKernelCreateThread + * @param argSize - Length of the data pointed to by argp, in bytes + * @param pArgBlock - Pointer to the arguments. */ -int sceKernelStartThread(SceUID thid, SceSize arglen, void *argp); +SceInt32 sceKernelStartThread(SceUID threadId, SceSize argSize, const void *pArgBlock); /** * Exit a thread * - * @param status - Exit status. + * @param exitStatus - Exit status. */ -int sceKernelExitThread(int status); +SceInt32 sceKernelExitThread(SceInt32 exitStatus); /** * Exit a thread and delete itself. * - * @param status - Exit status + * @param exitStatus - Exit status */ -int sceKernelExitDeleteThread(int status); +SceInt32 sceKernelExitDeleteThread(SceInt32 exitStatus); /** * Wait until a thread has ended. * - * @param thid - Id of the thread to wait for. - * @param stat - Exit status. - * @param timeout - Timeout in microseconds (assumed). + * @param threadId - Id of the thread to wait for. + * @param pExitStatus - Exit status. + * @param pTimeout - Timeout in microseconds. * * @return < 0 on error. */ -int sceKernelWaitThreadEnd(SceUID thid, int *stat, SceUInt *timeout); +SceInt32 sceKernelWaitThreadEnd(SceUID threadId, SceInt32 *pExitStatus, SceUInt32 *pTimeout); /** * Wait until a thread has ended and handle callbacks if necessary. * - * @param thid - Id of the thread to wait for. - * @param stat - Exit status. - * @param timeout - Timeout in microseconds (assumed). + * @param threadId - Id of the thread to wait for. + * @param pExitStatus - Exit status. + * @param pTimeout - Timeout in microseconds. * * @return < 0 on error. */ -int sceKernelWaitThreadEndCB(SceUID thid, int *stat, SceUInt *timeout); +SceInt32 sceKernelWaitThreadEndCB(SceUID threadId, SceInt32 *pExitStatus, SceUInt32 *pTimeout); /** * Delay the current thread by a specified number of microseconds * - * @param delay - Delay in microseconds. + * @param usec - Delay in microseconds. * * @par Example: * @code * sceKernelDelayThread(1000000); // Delay for a second * @endcode */ -int sceKernelDelayThread(SceUInt delay); +SceInt32 sceKernelDelayThread(SceUInt32 usec); /** * Delay the current thread by a specified number of microseconds and handle any callbacks. * - * @param delay - Delay in microseconds. + * @param usec - Delay in microseconds. * * @par Example: * @code * sceKernelDelayThread(1000000); // Delay for a second * @endcode */ -int sceKernelDelayThreadCB(SceUInt delay); +SceInt32 sceKernelDelayThreadCB(SceUInt32 usec); /** * Modify the attributes of the current thread. * - * @param unknown - Set to 0. - * @param attr - The thread attributes to modify. One of ::SceThreadAttributes. + * @param clearAttr - Bits to clear + * @param setAttr - Bits to set * * @return < 0 on error. */ -int sceKernelChangeCurrentThreadAttr(int unknown, SceUInt attr); +SceInt32 sceKernelChangeCurrentThreadAttr(SceUInt32 clearAttr, SceUInt32 setAttr); /** * Change the threads current priority. * - * @param thid - The ID of the thread (from ::sceKernelCreateThread or ::sceKernelGetThreadId) + * @param threadId - The ID of the thread (from ::sceKernelCreateThread or ::sceKernelGetThreadId) * @param priority - The new priority (the lower the number the higher the priority) * * @par Example: * @code - * int thid = sceKernelGetThreadId(); + * int threadId = sceKernelGetThreadId(); * // Change priority of current thread to 16 * sceKernelChangeThreadPriority(thid, 16); * @endcode * * @return 0 if successful, otherwise the error code. */ -int sceKernelChangeThreadPriority(SceUID thid, int priority); +SceInt32 sceKernelChangeThreadPriority(SceUID threadId, SceInt32 priority); + +/** + * Change the threads current priority. + * + * @param threadId - The ID of the thread (from ::sceKernelCreateThread or ::sceKernelGetThreadId) + * @param priority - The new priority (the lower the number the higher the priority) + * + * @return old priority or error code + */ +SceInt32 sceKernelChangeThreadPriority2(SceUID threadId, SceInt32 priority); /** * Get the current thread Id * * @return The thread id of the calling thread. */ -int sceKernelGetThreadId(void); +SceUID sceKernelGetThreadId(void); /** * Get the current priority of the thread you are in. * * @return The current thread priority */ -int sceKernelGetThreadCurrentPriority(void); +SceInt32 sceKernelGetThreadCurrentPriority(void); /** * Get the exit status of a thread. * - * @param thid - The UID of the thread to check. + * @param threadId - The UID of the thread to check. + * @param pExitStatus - pointer to area to store result * - * @return The exit status + * @return 0 or <0 on error */ -int sceKernelGetThreadExitStatus(SceUID thid); +SceInt32 sceKernelGetThreadExitStatus(SceUID threadId, SceInt32 *pExitStatus); /** - * Check the thread stack? + * Check remaining thread stack size * - * @return Unknown. + * @return Stack size at the time of function call */ -int sceKernelCheckThreadStack(void); +SceSize sceKernelCheckThreadStack(void); /** * Get the free stack size for a thread. * - * @param thid - The thread ID. Seem to take current thread - * if set to 0. + * @param threadId - The thread ID * * @return The free size. */ -int sceKernelGetThreadStackFreeSize(SceUID thid); +SceSize sceKernelGetThreadStackFreeSize(SceUID threadId); /** * Get the status information for the specified thread. * - * @param thid - Id of the thread to get status - * @param info - Pointer to the info structure to receive the data. + * @param threadId - Id of the thread to get status + * @param pInfo - Pointer to the info structure to receive the data. * Note: The structures size field should be set to * sizeof(SceKernelThreadInfo) before calling this function. * @@ -281,17 +264,41 @@ int sceKernelGetThreadStackFreeSize(SceUID thid); * @endcode * @return 0 if successful, otherwise the error code. */ -int sceKernelGetThreadInfo(SceUID thid, SceKernelThreadInfo *info); +SceInt32 sceKernelGetThreadInfo(SceUID threadId, SceKernelThreadInfo *pInfo); /** * Retrive the runtime status of a thread. * - * @param thid - UID of the thread to retrieve status. - * @param status - Pointer to a ::SceKernelThreadRunStatus struct to receive the runtime status. + * @param pStatus - Pointer to a ::SceKernelThreadRunStatus struct to receive the runtime status. * * @return 0 if successful, otherwise the error code. */ -int sceKernelGetThreadRunStatus(SceUID thid, SceKernelThreadRunStatus *status); +SceInt32 sceKernelGetThreadRunStatus(SceKernelThreadRunStatus *pStatus); + +typedef SceInt32 (*SceKernelChangeStackFunction)(void *pArg); + +SceInt32 sceKernelCallWithChangeStack( + void *pBase, + SceSize size, + SceKernelChangeStackFunction changeStackFunc, + void *pCommon); + +SceInt32 sceKernelChangeThreadCpuAffinityMask(SceUID threadId, SceInt32 cpuAffinityMask); + +SceInt32 sceKernelGetThreadCpuAffinityMask(SceUID threadId); + +/** + * Get the process ID of the current thread. + * + * @return process ID of the current thread + */ +SceUID sceKernelGetProcessId(void); + +SceInt32 sceKernelCheckWaitableStatus(void); + +SceInt32 sceKernelChangeThreadVfpException(SceInt32 clearMask, SceInt32 setMask); + +SceInt32 sceKernelGetCurrentThreadVfpException(void); /* Semaphores. */ @@ -311,7 +318,7 @@ typedef struct SceKernelSemaInfo { /** The UID of the semaphore */ SceUID semaId; /** NUL-terminated name of the semaphore. */ - char name[32]; + char name[SCE_UID_NAMELEN + 1]; /** Attributes. */ SceUInt attr; /** The initial count the semaphore was created with. */ @@ -335,20 +342,25 @@ typedef struct SceKernelSemaInfo { * * @param name - Specifies the name of the sema * @param attr - Sema attribute flags (normally set to 0) - * @param initVal - Sema initial value - * @param maxVal - Sema maximum value - * @param option - Sema options (normally set to 0) + * @param initCount - Sema initial value + * @param maxCount - Sema maximum value + * @param pOptParam - Sema options (normally set to 0) * @return A semaphore id */ -SceUID sceKernelCreateSema(const char *name, SceUInt attr, int initVal, int maxVal, SceKernelSemaOptParam *option); +SceUID sceKernelCreateSema( + const char *name, + SceUInt32 attr, + SceInt32 initCount, + SceInt32 maxCount, + SceKernelSemaOptParam *pOptParam); /** * Destroy a semaphore * - * @param semaid - The semaid returned from a previous create call. - * @return Returns the value 0 if it's successful, otherwise -1 + * @param semaId - The semaid returned from a previous create call. + * @return Returns the value 0 if it's successful, otherwise negative */ -int sceKernelDeleteSema(SceUID semaid); +SceInt32 sceKernelDeleteSema(SceUID semaId); /** * Send a signal to a semaphore @@ -356,77 +368,81 @@ int sceKernelDeleteSema(SceUID semaid); * @par Example: * @code * // Signal the sema - * sceKernelSignalSema(semaid, 1); + * sceKernelSignalSema(semaId, 1); * @endcode * - * @param semaid - The sema id returned from ::sceKernelCreateSema - * @param signal - The amount to signal the sema (i.e. if 2 then increment the sema by 2) + * @param semaId - The sema ID returned from ::sceKernelCreateSema + * @param signalCount - The amount to signal the sema (i.e. if 2 then increment the sema by 2) * * @return < 0 On error. */ -int sceKernelSignalSema(SceUID semaid, int signal); +SceInt32 sceKernelSignalSema(SceUID semaId, SceInt32 signalCount); /** * Lock a semaphore * * @par Example: * @code - * sceKernelWaitSema(semaid, 1, 0); + * sceKernelWaitSema(semaId, 1, 0); * @endcode * - * @param semaid - The sema id returned from ::sceKernelCreateSema - * @param signal - The value to wait for (i.e. if 1 then wait till reaches a signal state of 1) - * @param timeout - Timeout in microseconds (assumed). + * @param semaId - The sema id returned from ::sceKernelCreateSema + * @param needCount - The value to wait for (i.e. if 1 then wait till reaches a signal state of 1) + * @param pTimeout - Timeout in microseconds. * * @return < 0 on error. */ -int sceKernelWaitSema(SceUID semaid, int signal, SceUInt *timeout); +SceInt32 sceKernelWaitSema(SceUID semaId, SceInt32 needCount, SceUInt32 *pTimeout); /** * Lock a semaphore and handle callbacks if necessary. * * @par Example: * @code - * sceKernelWaitSemaCB(semaid, 1, 0); + * sceKernelWaitSemaCB(semaId, 1, 0); * @endcode * - * @param semaid - The sema id returned from ::sceKernelCreateSema - * @param signal - The value to wait for (i.e. if 1 then wait till reaches a signal state of 1) - * @param timeout - Timeout in microseconds (assumed). + * @param semaId - The sema id returned from ::sceKernelCreateSema + * @param needCount - The value to wait for (i.e. if 1 then wait till reaches a signal state of 1) + * @param pTimeout - Timeout in microseconds. * * @return < 0 on error. */ -int sceKernelWaitSemaCB(SceUID semaid, int signal, SceUInt *timeout); +SceInt32 sceKernelWaitSemaCB(SceUID semaId, SceInt32 needCount, SceUInt32 *pTimeout); /** * Poll a semaphore. * - * @param semaid - UID of the semaphore to poll. - * @param signal - The value to test for. + * @param semaId - UID of the semaphore to poll. + * @param needCount - The value to test for. * * @return < 0 on error. */ -int sceKernelPollSema(SceUID semaid, int signal); +SceInt32 sceKernelPollSema(SceUID semaId, SceInt32 needCount); /** * Cancels a semaphore * - * @param semaid - The sema id returned from ::sceKernelCreateSema + * @param semaId - The sema id returned from ::sceKernelCreateSema * @param setCount - The new lock count of the semaphore - * @param numWaitThreads - Number of threads waiting for the semaphore + * @param pNumWaitThreads - Number of threads waiting for the semaphore * @return < 0 On error. */ -int sceKernelCancelSema(SceUID semaid, int setCount, int *numWaitThreads); +SceInt32 sceKernelCancelSema(SceUID semaId, SceInt32 setCount, SceUInt32 *pNumWaitThreads); /** * Retrieve information about a semaphore. * - * @param semaid - UID of the semaphore to retrieve info for. - * @param info - Pointer to a ::SceKernelSemaInfo struct to receive the info. + * @param semaId - UID of the semaphore to retrieve info for. + * @param pInfo - Pointer to a ::SceKernelSemaInfo struct to receive the info. * * @return < 0 on error. */ -int sceKernelGetSemaInfo(SceUID semaid, SceKernelSemaInfo *info); +SceInt32 sceKernelGetSemaInfo(SceUID semaId, SceKernelSemaInfo *pInfo); + +SceUID sceKernelOpenSema(const char *pName); + +SceInt32 sceKernelCloseSema(SceUID semaId); /* Mutexes. */ @@ -435,7 +451,7 @@ int sceKernelGetSemaInfo(SceUID semaid, SceKernelSemaInfo *info); typedef struct SceKernelMutexOptParam { /** Size of the ::SceKernelMutexOptParam structure. */ SceSize size; - int ceilingPriority; + SceInt32 ceilingPriority; } SceKernelMutexOptParam; /** Current state of a mutex. @@ -447,17 +463,18 @@ typedef struct SceKernelMutexInfo { /** The UID of the mutex. */ SceUID mutexId; /** NUL-terminated name of the mutex. */ - char name[32]; + char name[SCE_UID_NAMELEN + 1]; /** Attributes. */ - SceUInt attr; + SceUInt32 attr; /** The initial count the mutex was created with. */ - int initCount; + SceInt32 initCount; /** The current count. */ - int currentCount; + SceInt32 currentCount; /** The UID of the current owner of the mutex. */ SceUID currentOwnerId; /** The number of threads waiting on the mutex. */ - int numWaitThreads; + SceUInt32 numWaitThreads; + SceInt32 ceilingPriority; } SceKernelMutexInfo; /** @@ -469,141 +486,125 @@ typedef struct SceKernelMutexInfo { * mutexid = sceKernelCreateMutex("MyMutex", 0, 1, 1, 0); * @endcode * - * @param name - Specifies the name of the mutex + * @param pName - Specifies the name of the mutex * @param attr - Mutex attribute flags (normally set to 0) * @param initCount - Mutex initial value - * @param option - Mutex options (normally set to 0) + * @param pOptParam - Mutex options (normally set to 0) * @return A mutex id */ -SceUID sceKernelCreateMutex(const char *name, SceUInt attr, int initCount, SceKernelMutexOptParam *option); +SceUID sceKernelCreateMutex( + const char *pName, + SceUInt32 attr, + SceInt32 initCount, + const SceKernelMutexOptParam *pOptParam); /** * Destroy a mutex * - * @param mutexid - The mutex id returned from ::sceKernelCreateMutex - * @return Returns the value 0 if it's successful, otherwise -1 + * @param mutexId - The mutex id returned from ::sceKernelCreateMutex + * @return Returns the value 0 if it's successful, otherwise < 0 */ -int sceKernelDeleteMutex(SceUID mutexid); +SceInt32 sceKernelDeleteMutex(SceUID mutexId); /** * Open a mutex * - * @param name - The name of the mutex to open - * @return Returns the value 0 if it's successful, otherwise -1 + * @param pName - The name of the mutex to open + * @return Returns an UID if successful, otherwise < 0 */ -int sceKernelOpenMutex(const char *name); +SceUID sceKernelOpenMutex(const char *pName); /** * Close a mutex * - * @param mutexid - The mutex id returned from ::sceKernelCreateMutex - * @return Returns the value 0 if it's successful, otherwise -1 + * @param mutexId - The mutex id returned from ::sceKernelCreateMutex + * @return Returns the value 0 if it's successful, otherwise < 0 */ -int sceKernelCloseMutex(SceUID mutexid); +SceInt32 sceKernelCloseMutex(SceUID mutexId); /** * Lock a mutex * - * @param mutexid - The mutex id returned from ::sceKernelCreateMutex + * @param mutexId - The mutex id returned from ::sceKernelCreateMutex * @param lockCount - The value to increment to the lock count of the mutex - * @param timeout - Timeout in microseconds (assumed) + * @param pTimeout - Timeout in microseconds * @return < 0 On error. */ -int sceKernelLockMutex(SceUID mutexid, int lockCount, unsigned int *timeout); +SceInt32 sceKernelLockMutex(SceUID mutexId, SceInt32 lockCount, SceUInt32 *pTimeout); /** * Lock a mutex and handle callbacks if necessary. * - * @param mutexid - The mutex id returned from ::sceKernelCreateMutex + * @param mutexId - The mutex id returned from ::sceKernelCreateMutex * @param lockCount - The value to increment to the lock count of the mutex - * @param timeout - Timeout in microseconds (assumed) + * @param pTimeout - Timeout in microseconds * @return < 0 On error. */ -int sceKernelLockMutexCB(SceUID mutexid, int lockCount, unsigned int *timeout); +SceInt32 sceKernelLockMutexCB(SceUID mutexId, SceInt32 lockCount, SceUInt32 *pTimeout); /** * Try to lock a mutex (non-blocking) * - * @param mutexid - The mutex id returned from ::sceKernelCreateMutex + * @param mutexId - The mutex id returned from ::sceKernelCreateMutex * @param lockCount - The value to increment to the lock count of the mutex * @return < 0 On error. */ -int sceKernelTryLockMutex(SceUID mutexid, int lockCount); +SceInt32 sceKernelTryLockMutex(SceUID mutexId, SceInt32 lockCount); /** * Try to unlock a mutex (non-blocking) * - * @param mutexid - The mutex id returned from ::sceKernelCreateMutex + * @param mutexId - The mutex id returned from ::sceKernelCreateMutex * @param unlockCount - The value to decrement to the lock count of the mutex * @return < 0 On error. */ -int sceKernelUnlockMutex(SceUID mutexid, int unlockCount); +SceInt32 sceKernelUnlockMutex(SceUID mutexId, SceInt32 unlockCount); /** * Cancels a mutex * - * @param mutexid - The mutex id returned from ::sceKernelCreateMutex + * @param mutexId - The mutex id returned from ::sceKernelCreateMutex * @param newCount - The new lock count of the mutex - * @param numWaitThreads - Number of threads waiting for the mutex + * @param pNumWaitThreads - Number of threads waiting for the mutex * @return < 0 On error. */ -int sceKernelCancelMutex(SceUID mutexid, int newCount, int *numWaitThreads); +SceInt32 sceKernelCancelMutex(SceUID mutexId, SceInt32 newCount, SceUInt32 *pNumWaitThreads); /** * Retrieve information about a mutex. * - * @param mutexid - UID of the mutex to retrieve info for. - * @param info - Pointer to a ::SceKernelMutexInfo struct to receive the info. + * @param mutexId - UID of the mutex to retrieve info for. + * @param pInfo - Pointer to a ::SceKernelMutexInfo struct to receive the info. * * @return < 0 on error. */ -int sceKernelGetMutexInfo(SceUID mutexid, SceKernelMutexInfo *info); +SceInt32 sceKernelGetMutexInfo(SceUID mutexId, SceKernelMutexInfo *pInfo); /* Event flags. */ /** Structure to hold the event flag information */ typedef struct SceKernelEventFlagInfo { - SceSize size; - SceUID evfId; // Needs confirmation - char name[32]; - SceUInt attr; - SceUInt initPattern; - SceUInt currentPattern; - int numWaitThreads; + SceSize size; + SceUID evfId; + char name[SCE_UID_NAMELEN + 1]; + SceUInt32 attr; + SceUInt32 initPattern; + SceUInt32 currentPattern; + SceUInt32 numWaitThreads; } SceKernelEventFlagInfo; typedef struct SceKernelEventFlagOptParam { SceSize size; } SceKernelEventFlagOptParam; -typedef struct SceKernelEventFlagOptParam SceKernelEventFlagOptParam; - -/** Event flag creation attributes */ -typedef enum SceEventFlagAttributes { - /** Allow the event flag to be waited upon by multiple threads */ - SCE_EVENT_WAITMULTIPLE = 0x200 -} SceEventFlagAttributes; - -/** Event flag wait types */ -typedef enum SceEventFlagWaitTypes { - /** Wait for all bits in the pattern to be set */ - SCE_EVENT_WAITAND = 0, - /** Wait for one or more bits in the pattern to be set */ - SCE_EVENT_WAITOR = 1, - /** Clear all the bits when it matches */ - SCE_EVENT_WAITCLEAR = 2, - /** Clear the wait pattern when it matches */ - SCE_EVENT_WAITCLEAR_PAT = 4 -} SceEventFlagWaitTypes; - /** * Create an event flag. * - * @param name - The name of the event flag. + * @param pName - The name of the event flag. * @param attr - Attributes from ::SceEventFlagAttributes - * @param bits - Initial bit pattern. - * @param opt - Options, set to NULL + * @param initPattern - Initial bit pattern. + * @param pOptParam - Options, set to NULL * @return < 0 on error. >= 0 event flag id. * * @par Example: @@ -612,81 +613,101 @@ typedef enum SceEventFlagWaitTypes { * evid = sceKernelCreateEventFlag("wait_event", 0, 0, 0); * @endcode */ -SceUID sceKernelCreateEventFlag(const char *name, int attr, int bits, SceKernelEventFlagOptParam *opt); +SceUID sceKernelCreateEventFlag( + const char *pName, + SceUInt32 attr, + SceUInt32 initPattern, + const SceKernelEventFlagOptParam *pOptParam); /** * Set an event flag bit pattern. * - * @param evid - The event id returned by ::sceKernelCreateEventFlag. - * @param bits - The bit pattern to set. + * @param evfId - The event id returned by ::sceKernelCreateEventFlag. + * @param bitPattern - The bit pattern to set. * * @return < 0 On error */ -int sceKernelSetEventFlag(SceUID evid, unsigned int bits); +SceInt32 sceKernelSetEventFlag(SceUID evfId, SceUInt32 bitPattern); /** * Clear a event flag bit pattern * - * @param evid - The event id returned by ::sceKernelCreateEventFlag - * @param bits - The bits to clean + * @param evfId - The event id returned by ::sceKernelCreateEventFlag + * @param bitPattern - The bits to unset * * @return < 0 on Error */ -int sceKernelClearEventFlag(SceUID evid, unsigned int bits); +SceInt32 sceKernelClearEventFlag(SceUID evfId, SceUInt32 bitPattern); /** * Poll an event flag for a given bit pattern. * - * @param evid - The event id returned by ::sceKernelCreateEventFlag. - * @param bits - The bit pattern to poll for. - * @param wait - Wait type, one or more of ::SceEventFlagWaitTypes or'ed together - * @param outBits - The bit pattern that was matched. + * @param evfId - The event id returned by ::sceKernelCreateEventFlag. + * @param bitPattern - The bit pattern to poll for. + * @param waitMode - Wait type, one or more of ::SceEventFlagWaitTypes or'ed together + * @param pResultPat - The bit pattern that was matched. * @return < 0 On error */ -int sceKernelPollEventFlag(int evid, unsigned int bits, unsigned int wait, unsigned int *outBits); +SceInt32 sceKernelPollEventFlag(SceUID evfId, SceUInt32 bitPattern, SceUInt32 waitMode, SceUInt32 *pResultPat); /** * Wait for an event flag for a given bit pattern. * - * @param evid - The event id returned by ::sceKernelCreateEventFlag. - * @param bits - The bit pattern to poll for. - * @param wait - Wait type, one or more of ::SceEventFlagWaitTypes or'ed together - * @param outBits - The bit pattern that was matched. - * @param timeout - Timeout in microseconds + * @param evfId - The event id returned by ::sceKernelCreateEventFlag. + * @param bitPattern - The bit pattern to poll for. + * @param waitMode - Wait type, one or more of ::SceEventFlagWaitTypes or'ed together + * @param pResultPat - The bit pattern that was matched. + * @param pTimeout - Timeout in microseconds * @return < 0 On error */ -int sceKernelWaitEventFlag(int evid, unsigned int bits, unsigned int wait, unsigned int *outBits, SceUInt *timeout); +SceInt32 sceKernelWaitEventFlag( + SceUID evfId, + SceUInt32 bitPattern, + SceUInt32 waitMode, + SceUInt32 *pResultPat, + SceUInt32 *pTimeout); /** * Wait for an event flag for a given bit pattern with callback. * - * @param evid - The event id returned by ::sceKernelCreateEventFlag. - * @param bits - The bit pattern to poll for. - * @param wait - Wait type, one or more of ::SceEventFlagWaitTypes or'ed together - * @param outBits - The bit pattern that was matched. - * @param timeout - Timeout in microseconds + * @param evfId - The event id returned by ::sceKernelCreateEventFlag. + * @param bitPattern - The bit pattern to poll for. + * @param waitMode - Wait type, one or more of ::SceEventFlagWaitTypes or'ed together + * @param pResultPat - The bit pattern that was matched. + * @param pTimeout - Timeout in microseconds * @return < 0 On error */ -int sceKernelWaitEventFlagCB(int evid, unsigned int bits, unsigned int wait, unsigned int *outBits, SceUInt *timeout); +SceInt32 sceKernelWaitEventFlagCB( + SceUID evfId, + SceUInt32 bitPattern, + SceUInt32 waitMode, + SceUInt32 *pResultPat, + SceUInt32 *pTimeout); /** * Delete an event flag * - * @param evid - The event id returned by ::sceKernelCreateEventFlag. + * @param evfId - The event id returned by ::sceKernelCreateEventFlag. * * @return < 0 On error */ -int sceKernelDeleteEventFlag(int evid); +SceInt32 sceKernelDeleteEventFlag(SceUID evfId); /** * Get the status of an event flag. * - * @param event - The UID of the event. - * @param status - A pointer to a ::SceKernelEventFlagInfo structure. + * @param evfId - The UID of the event. + * @param pInfo - A pointer to a ::SceKernelEventFlagInfo structure. * * @return < 0 on error. */ -int sceKernelGetEventFlagInfo(SceUID event, SceKernelEventFlagInfo *info); +SceInt32 sceKernelGetEventFlagInfo(SceUID evfId, SceKernelEventFlagInfo *pInfo); + +SceUID sceKernelOpenEventFlag(const char *pName); + +SceInt32 sceKernelCloseEventFlag(SceUID evfId); + +SceInt32 sceKernelCancelEventFlag(SceUID evfId, SceUInt32 setPattern, SceUInt32 *pNumWaitThreads); /* Condition variables */ @@ -705,7 +726,7 @@ typedef struct SceKernelCondInfo { /** The UID of the condition variable. */ SceUID condId; /** NUL-terminated name of the condition variable. */ - char name[32]; + char name[SCE_UID_NAMELEN + 1]; /** Attributes. */ SceUInt attr; /** Mutex associated with the condition variable. */ @@ -723,55 +744,59 @@ typedef struct SceKernelCondInfo { * condId = sceKernelCreateCond("MyCond", 0, mutexId, NULL); * @endcode * - * @param name - Specifies the name of the condition variable + * @param pName - Specifies the name of the condition variable * @param attr - Condition variable attribute flags (normally set to 0) * @param mutexId - Mutex to be related to the condition variable - * @param option - Condition variable options (normally set to 0) + * @param pOptParam - Condition variable options (normally set to 0) * @return A condition variable id */ -SceUID sceKernelCreateCond(const char *name, SceUInt attr, SceUID mutexId, const SceKernelCondOptParam *option); +SceUID sceKernelCreateCond( + const char *pName, + SceUInt32 attr, + SceUID mutexId, + const SceKernelCondOptParam *pOptParam); /** * Destroy a condition variable * * @param condition variableid - The condition variable id returned from ::sceKernelCreateCond - * @return Returns the value 0 if it's successful, otherwise -1 + * @return Returns the value 0 if it's successful, otherwise < 0 */ -int sceKernelDeleteCond(SceUID condId); +SceInt32 sceKernelDeleteCond(SceUID condId); /** * Open a condition variable * - * @param name - The name of the condition variable to open - * @return Returns the value 0 if it's successful, otherwise -1 + * @param pName - The name of the condition variable to open + * @return Returns an UID if successful, otherwise < 0 */ -int sceKernelOpenCond(const char *name); +SceUID sceKernelOpenCond(const char *pName); /** * Close a condition variable * * @param condition variableid - The condition variable id returned from ::sceKernelCreateCond - * @return Returns the value 0 if it's successful, otherwise -1 + * @return Returns the value 0 if it's successful, otherwise < 0 */ -int sceKernelCloseCond(SceUID condId); +SceInt32 sceKernelCloseCond(SceUID condId); /** * Waits for a signal of a condition variable * * @param condId - The condition variable id returned from ::sceKernelCreateCond - * @param timeout - Timeout in microseconds (assumed) + * @param pTimeout - Timeout in microseconds * @return < 0 On error. */ -int sceKernelWaitCond(SceUID condId, unsigned int *timeout); +SceInt32 sceKernelWaitCond(SceUID condId, SceUInt32 *pTimeout); /** * Waits for a signal of a condition variable (with callbacks) * * @param condId - The condition variable id returned from ::sceKernelCreateCond - * @param timeout - Timeout in microseconds (assumed) + * @param pTimeout - Timeout in microseconds * @return < 0 On error. */ -int sceKernelWaitCondCB(SceUID condId, unsigned int *timeout); +SceInt32 sceKernelWaitCondCB(SceUID condId, SceUInt32 *pTimeout); /** * Signals a condition variable @@ -779,7 +804,7 @@ int sceKernelWaitCondCB(SceUID condId, unsigned int *timeout); * @param condId - The condition variable id returned from ::sceKernelCreateCond * @return < 0 On error. */ -int sceKernelSignalCond(SceUID condId); +SceInt32 sceKernelSignalCond(SceUID condId); /** * Signals a condition variable to all threads waiting for it @@ -787,7 +812,7 @@ int sceKernelSignalCond(SceUID condId); * @param condId - The condition variable id returned from ::sceKernelCreateCond * @return < 0 On error. */ -int sceKernelSignalCondAll(SceUID condId); +SceInt32 sceKernelSignalCondAll(SceUID condId); /** * Signals a condition variable to a specific thread waiting for it @@ -796,31 +821,37 @@ int sceKernelSignalCondAll(SceUID condId); * @param threadId - The thread id returned from ::sceKernelCreateThread * @return < 0 On error. */ -int sceKernelSignalCondTo(SceUID condId, SceUID threadId); +SceInt32 sceKernelSignalCondTo(SceUID condId, SceUID threadId); + +SceInt32 sceKernelGetCondInfo(SceUID condId, SceKernelCondInfo *pInfo); /* Callbacks. */ /** Callback function prototype */ -typedef int (*SceKernelCallbackFunction)(int notifyId, int notifyCount, int notifyArg, void *common); +typedef SceInt32 (*SceKernelCallbackFunction)( + SceUID notifyId, + SceInt32 notifyCount, + SceInt32 notifyArg, + void *pCommon); /** Structure to hold the status information for a callback */ typedef struct SceKernelCallbackInfo { /** Size of the structure (i.e. sizeof(SceKernelCallbackInfo)) */ - SceSize size; + SceSize size; /** The UID of the callback. */ - SceUID callbackId; // Needs confirmation + SceUID callbackId; /** The name given to the callback */ - char name[32]; + char name[SCE_UID_NAMELEN + 1]; + SceUInt32 attr; /** The thread id associated with the callback */ - SceUID threadId; + SceUID threadId; /** Pointer to the callback function */ - SceKernelCallbackFunction callback; + SceKernelCallbackFunction callbackFunc; + SceUID notifyId; + SceInt32 notifyCount; + SceInt32 notifyArg; /** User supplied argument for the callback */ - void *common; - /** Unknown */ - int notifyCount; - /** Unknown */ - int notifyArg; + void *pCommon; } SceKernelCallbackInfo; /** @@ -829,212 +860,569 @@ typedef struct SceKernelCallbackInfo { * @par Example: * @code * int cbid; - * cbid = sceKernelCreateCallback("Exit Callback", exit_cb, NULL); + * cbid = sceKernelCreateCallback("Exit Callback", 0, exit_cb, NULL); * @endcode * * @param name - A textual name for the callback - * @param func - A pointer to a function that will be called as the callback - * @param arg - Argument for the callback ? + * @param attr - Set to 0. There are no attributes. + * @param callbackFunc - A pointer to a function that will be called as the callback + * @param pCommon - Common data for the callback * * @return >= 0 A callback id which can be used in subsequent functions, < 0 an error. */ -int sceKernelCreateCallback(const char *name, unsigned int attr, SceKernelCallbackFunction func, void *arg); +SceUID sceKernelCreateCallback( + const char *name, + SceUInt32 attr, + SceKernelCallbackFunction callbackFunc, + void *pCommon); /** * Gets the status of a specified callback. * - * @param cb - The UID of the callback to retrieve info for. - * @param status - Pointer to a status structure. The size parameter should be + * @param callbackId - The UID of the callback to retrieve info for. + * @param pInfo - Pointer to a status structure. The size parameter should be * initialised before calling. * * @return < 0 on error. */ -int sceKernelGetCallbackInfo(SceUID cb, SceKernelCallbackInfo *infop); +SceInt32 sceKernelGetCallbackInfo(SceUID callbackId, SceKernelCallbackInfo *pInfo); /** * Delete a callback * - * @param cb - The UID of the specified callback + * @param callbackId - The UID of the specified callback * * @return 0 on success, < 0 on error */ -int sceKernelDeleteCallback(SceUID cb); +SceInt32 sceKernelDeleteCallback(SceUID callbackId); /** * Notify a callback * - * @param cb - The UID of the specified callback - * @param arg2 - Passed as arg2 into the callback function + * @param callbackId - The UID of the specified callback + * @param notifyArg - Passed as arg2 into the callback function * * @return 0 on success, < 0 on error */ -int sceKernelNotifyCallback(SceUID cb, int arg2); +SceInt32 sceKernelNotifyCallback(SceUID callbackId, SceInt32 notifyArg); /** * Cancel a callback ? * - * @param cb - The UID of the specified callback + * @param callbackId - The UID of the specified callback * * @return 0 on success, < 0 on error */ -int sceKernelCancelCallback(SceUID cb); +SceInt32 sceKernelCancelCallback(SceUID callbackId); /** * Get the callback count * - * @param cb - The UID of the specified callback + * @param callbackId - The UID of the specified callback * * @return The callback count, < 0 on error */ -int sceKernelGetCallbackCount(SceUID cb); +SceInt32 sceKernelGetCallbackCount(SceUID callbackId); /** - * Check callback ? + * Check callback notification * - * @return Something or another + * @return Callback notification count or < 0 on error */ -int sceKernelCheckCallback(void); +SceInt32 sceKernelCheckCallback(void); /* Message pipes */ +typedef struct _SceKernelMsgPipeOptParam { + SceSize size; + SceUInt32 attr; + SceInt32 reserved[2]; + SceUInt32 openLimit; +} SceKernelMsgPipeOptParam; + /** * Create a message pipe * - * @param name - Name of the pipe - * @param type - The type of memory attribute to use internally (set to 0x40) - * @param attr - Set to 12 - * @param bufSize - The size of the internal buffer in multiples of 0x1000 (4KB) - * @param opt - Message pipe options (set to NULL) + * @param pName - Name of the pipe + * @param type - Message pipe memory type + * @param attr - Message pipe attribute + * @param bufSize - The size of the internal buffer in multiples of 0x1000 (4KiB) up to 32MiB + * @param pOptParam - Message pipe options * * @return The UID of the created pipe, < 0 on error */ -SceUID sceKernelCreateMsgPipe(const char *name, int type, int attr, unsigned int bufSize, void *opt); +SceUID sceKernelCreateMsgPipe( + const char *pName, + SceUInt32 type, + SceUInt32 attr, + SceSize bufSize, + const SceKernelMsgPipeOptParam *pOptParam); /** * Delete a message pipe * - * @param uid - The UID of the pipe + * @param msgPipeId - The UID of the pipe * * @return 0 on success, < 0 on error */ -int sceKernelDeleteMsgPipe(SceUID uid); +SceInt32 sceKernelDeleteMsgPipe(SceUID msgPipeId); /** * Send a message to a pipe * - * @param uid - The UID of the pipe - * @param message - Pointer to the message - * @param size - Size of the message - * @param unk1 - Unknown - async vs sync? use 0 for sync - * @param unk2 - Unknown - use NULL - * @param timeout - Timeout for send in us. use NULL to wait indefinitely + * @param msgPipeId - The UID of the pipe + * @param pSendBuf - Pointer to the message + * @param sendSize - Size of the message + * @param waitMode - Wait mode when sending + * @param pResult - Pointer to area to store sent size + * @param pTimeout - Timeout in microseconds * * @return 0 on success, < 0 on error */ -int sceKernelSendMsgPipe(SceUID uid, void *message, unsigned int size, int unk1, void *unk2, unsigned int *timeout); +SceInt32 sceKernelSendMsgPipe( + SceUID msgPipeId, + const void *pSendBuf, + SceSize sendSize, + SceUInt32 waitMode, + SceSize *pResult, + SceUInt32 *pTimeout); /** * Send a message to a pipe (with callback) * - * @param uid - The UID of the pipe - * @param message - Pointer to the message - * @param size - Size of the message - * @param unk1 - Unknown - async vs sync? use 0 for sync - * @param unk2 - Unknown - use NULL - * @param timeout - Timeout for send in us. use NULL to wait indefinitely + * @param msgPipeId - The UID of the pipe + * @param pSendBuf - Pointer to the message + * @param sendSize - Size of the message + * @param waitMode - Wait mode when sending + * @param pResult - Pointer to area to store sent size + * @param pTimeout - Timeout in microseconds * * @return 0 on success, < 0 on error */ -int sceKernelSendMsgPipeCB(SceUID uid, void *message, unsigned int size, int unk1, void *unk2, unsigned int *timeout); +SceInt32 sceKernelSendMsgPipeCB( + SceUID msgPipeId, + const void *pSendBuf, + SceSize sendSize, + SceUInt32 waitMode, + SceSize *pResult, + SceUInt32 *pTimeout); /** - * Try to send a message to a pipe + * Send a message to a pipe (non blocking) * - * @param uid - The UID of the pipe - * @param message - Pointer to the message - * @param size - Size of the message - * @param unk1 - Unknown - use 0 - * @param unk2 - Unknown - use NULL + * @param msgPipeId - The UID of the pipe + * @param pSendBuf - Pointer to the message + * @param sendSize - Size of the message + * @param waitMode - Wait mode when sending + * @param pResult - Pointer to area to store sent size * * @return 0 on success, < 0 on error */ -int sceKernelTrySendMsgPipe(SceUID uid, void *message, unsigned int size, int unk1, void *unk2); +SceInt32 sceKernelTrySendMsgPipe( + SceUID msgPipeId, + const void *pSendBuf, + SceSize sendSize, + SceUInt32 waitMode, + SceSize *pResult); /** * Receive a message from a pipe * - * @param uid - The UID of the pipe - * @param message - Pointer to the message - * @param size - Size of the message - * @param unk1 - Unknown - async vs sync? use 0 for sync - * @param unk2 - Unknown - use NULL - * @param timeout - Timeout for receive in us. use NULL to wait indefinitely + * @param msgPipeId - The UID of the pipe + * @param pRecvBuf - Pointer to the message + * @param recvSize - Size of the message + * @param waitMode - Wait mode when receiving + * @param pResult - Pointer to area to store received size + * @param pTimeout - Timeout in microseconds * * @return 0 on success, < 0 on error */ -int sceKernelReceiveMsgPipe(SceUID uid, void *message, unsigned int size, int unk1, void *unk2, unsigned int *timeout); +SceInt32 sceKernelReceiveMsgPipe( + SceUID msgPipeId, + const void *pRecvBuf, + SceSize recvSize, + SceUInt32 waitMode, + SceSize *pResult, + SceUInt32 *pTimeout); /** * Receive a message from a pipe (with callback) * - * @param uid - The UID of the pipe - * @param message - Pointer to the message - * @param size - Size of the message - * @param unk1 - Unknown - async vs sync? use 0 for sync - * @param unk2 - Unknown - use NULL - * @param timeout - Timeout for receive in us. use NULL to wait indefinitely + * @param msgPipeId - The UID of the pipe + * @param pRecvBuf - Pointer to the message + * @param recvSize - Size of the message + * @param waitMode - Wait mode when receiving + * @param pResult - Pointer to area to store received size + * @param pTimeout - Timeout in microseconds * * @return 0 on success, < 0 on error */ -int sceKernelReceiveMsgPipeCB(SceUID uid, void *message, unsigned int size, int unk1, void *unk2, unsigned int *timeout); +SceInt32 sceKernelReceiveMsgPipeCB( + SceUID msgPipeId, + const void *pRecvBuf, + SceSize recvSize, + SceUInt32 waitMode, + SceSize *pResult, + SceUInt32 *pTimeout); /** - * Receive a message from a pipe + * Receive a message from a pipe (non blocking) * - * @param uid - The UID of the pipe - * @param message - Pointer to the message - * @param size - Size of the message - * @param unk1 - Unknown - use 0 - * @param unk2 - Unknown - use NULL + * @param msgPipeId - The UID of the pipe + * @param pRecvBuf - Pointer to the message + * @param recvSize - Size of the message + * @param waitMode - Wait mode when receiving + * @param pResult - Pointer to area to store received size * * @return 0 on success, < 0 on error */ -int sceKernelTryReceiveMsgPipe(SceUID uid, void *message, unsigned int size, int unk1, void *unk2); +SceInt32 sceKernelTryReceiveMsgPipe( + SceUID msgPipeId, + void *pRecvBuf, + SceSize recvSize, + SceUInt32 waitMode, + SceSize *pResult); /** * Cancel a message pipe * - * @param uid - UID of the pipe to cancel - * @param psend - Receive number of sending threads, NULL is valid - * @param precv - Receive number of receiving threads, NULL is valid + * @param msgPipeId - UID of the pipe to cancel + * @param pNumSendWaitThreads - Receive number of sending threads, NULL is valid + * @param pNumReceiveWaitThreads - Receive number of receiving threads, NULL is valid * * @return 0 on success, < 0 on error */ -int sceKernelCancelMsgPipe(SceUID uid, int *psend, int *precv); +SceInt32 sceKernelCancelMsgPipe( + SceUID msgPipeId, + SceUInt32 *pNumSendWaitThreads, + SceUInt32 *pNumReceiveWaitThreads); /** Message Pipe status info */ typedef struct SceKernelMppInfo { - SceSize size; - SceUID mppId; // Needs confirmation - char name[32]; - SceUInt attr; - int bufSize; - int freeSize; - int numSendWaitThreads; - int numReceiveWaitThreads; + SceSize size; + SceUID msgPipeId; + char name[SCE_UID_NAMELEN + 1]; + SceUInt32 attr; + SceSize bufSize; + SceSize freeSize; + SceUInt32 numSendWaitThreads; + SceUInt32 numReceiveWaitThreads; } SceKernelMppInfo; /** * Get the status of a Message Pipe * - * @param uid - The uid of the Message Pipe - * @param info - Pointer to a ::SceKernelMppInfo structure + * @param msgPipeId - The uid of the Message Pipe + * @param pInfo - Pointer to a ::SceKernelMppInfo structure * * @return 0 on success, < 0 on error */ -int sceKernelGetMsgPipeInfo(SceUID uid, SceKernelMppInfo *info); +SceInt32 sceKernelGetMsgPipeInfo(SceUID msgPipeId, SceKernelMppInfo *pInfo); + +SceUID sceKernelOpenMsgPipe(const char *pName); + +SceInt32 sceKernelCloseMsgPipe(SceUID msgPipeId); + +typedef struct _SceKernelMsgPipeVector { + void *pBase; + SceSize bufSize; +} SceKernelMsgPipeVector; + +SceInt32 sceKernelSendMsgPipeVector( + SceUID msgPipeId, + const SceKernelMsgPipeVector *pVector, + SceUInt32 numVector, + SceUInt32 waitMode, + SceSize *pResult, + SceUInt32 *pTimeout +); + +SceInt32 sceKernelSendMsgPipeVectorCB( + SceUID msgPipeId, + const SceKernelMsgPipeVector *pVector, + SceUInt32 numVector, + SceUInt32 waitMode, + SceSize *pResult, + SceUInt32 *pTimeout); + +SceInt32 sceKernelTrySendMsgPipeVector( + SceUID msgPipeId, + const SceKernelMsgPipeVector *pVector, + SceUInt32 numVector, + SceUInt32 waitMode, + SceSize *pResult); + +SceInt32 sceKernelReceiveMsgPipeVector( + SceUID msgPipeId, + const SceKernelMsgPipeVector *pVector, + SceUInt32 numVector, + SceUInt32 waitMode, + SceSize *pResult, + SceUInt32 *pTimeout); + +SceInt32 sceKernelReceiveMsgPipeVectorCB( + SceUID msgPipeId, + const SceKernelMsgPipeVector *pVector, + SceUInt32 numVector, + SceUInt32 waitMode, + SceSize *pResult, + SceUInt32 *pTimeout); + +SceInt32 sceKernelTryReceiveMsgPipeVector( + SceUID msgPipeId, + const SceKernelMsgPipeVector *pVector, + SceUInt32 numVector, + SceUInt32 waitMode, + SceSize *pResult); + +/* Thread event */ + +SceInt32 sceKernelRegisterCallbackToEvent(SceUID eventId, SceUID callbackId); + +SceInt32 sceKernelUnregisterCallbackFromEvent(SceUID eventId, SceUID callbackId); + +SceInt32 sceKernelUnregisterCallbackFromEventAll(SceUID eventId); + +typedef SceInt32 (*SceKernelThreadEventHandler)(SceInt32 type, SceUID threadId, SceInt32 arg, void *pCommon); + +typedef struct _SceKernelEventInfo { + SceSize size; + SceUID eventId; + char name[SCE_UID_NAMELEN + 1]; + SceUInt32 attr; + SceUInt32 eventPattern; + SceUInt64 userData; + SceUInt32 numWaitThreads; + SceInt32 reserved[1]; +} SceKernelEventInfo; + +SceInt32 sceKernelWaitEvent( + SceUID eventId, + SceUInt32 waitPattern, + SceUInt32 *pResultPattern, + SceUInt64 *pUserData, + SceUInt32 *pTimeout +); + +SceInt32 sceKernelWaitEventCB( + SceUID eventId, + SceUInt32 waitPattern, + SceUInt32 *pResultPattern, + SceUInt64 *pUserData, + SceUInt32 *pTimeout +); + +SceInt32 sceKernelPollEvent( + SceUID eventId, + SceUInt32 bitPattern, + SceUInt32 *pResultPattern, + SceUInt64 *pUserData +); + +typedef struct _SceKernelWaitEvent { + SceUID eventId; + SceUInt32 eventPattern; +} SceKernelWaitEvent; + +typedef struct _SceKernelResultEvent { + SceUID eventId; + SceInt32 result; + SceUInt32 resultPattern; + SceInt32 reserved[1]; + SceUInt64 userData; +} SceKernelResultEvent; + +SceInt32 sceKernelWaitMultipleEvents( + SceKernelWaitEvent *pWaitEventList, + SceUInt32 numEvents, + SceUInt32 waitMode, + SceKernelResultEvent *pResultEventList, + SceUInt32 *pTimeout); + +SceInt32 sceKernelWaitMultipleEventsCB( + SceKernelWaitEvent *pWaitEventList, + SceUInt32 numEvents, + SceUInt32 waitMode, + SceKernelResultEvent *pResultEventList, + SceUInt32 *pTimeout); + +SceInt32 sceKernelSetEvent( + SceUID eventId, + SceUInt32 setPattern, + SceUInt64 userData); + +SceInt32 sceKernelSetEventWithNotifyCallback( + SceUID eventId, + SceUInt32 setPattern, + SceUInt64 userData, + SceInt32 notifyArg); + +SceInt32 sceKernelPulseEvent( + SceUID eventId, + SceUInt32 pulsePattern, + SceUInt64 userData); + +SceInt32 sceKernelPulseEventWithNotifyCallback( + SceUID eventId, + SceUInt32 pulsePattern, + SceUInt64 userData, + SceInt32 notifyArg); + +SceInt32 sceKernelClearEvent( + SceUID eventId, + SceUInt32 clearPattern); + + +SceInt32 sceKernelCancelEventWithSetPattern( + SceUID eventId, + SceUInt32 setPattern, + SceUInt64 userData, + SceUInt32 *pNumWaitThreads); + + +SceInt32 sceKernelGetEventPattern( + SceUID eventId, + SceUInt32 *pPattern); + +SceInt32 sceKernelCancelEvent( + SceUID eventId, + SceUInt32 *pNumWaitThreads); + +SceInt32 sceKernelGetEventInfo( + SceUID eventId, + SceKernelEventInfo *pInfo); + +/* Reader/writer lock */ + +typedef struct _SceKernelRWLockOptParam { + SceSize size; +} SceKernelRWLockOptParam; + +typedef struct _SceKernelRWLockInfo { + SceSize size; + SceUID rwLockId; + char name[SCE_UID_NAMELEN + 1]; + SceUInt32 attr; + SceInt32 lockCount; + SceUID writeOwnerId; + SceUInt32 numReadWaitThreads; + SceUInt32 numWriteWaitThreads; +} SceKernelRWLockInfo; + +SceUID sceKernelCreateRWLock( + const char *pName, + SceUInt32 attr, + const SceKernelRWLockOptParam*pOptParam); + +SceInt32 sceKernelDeleteRWLock(SceUID rwLockId); + +SceUID sceKernelOpenRWLock(const char pName); + +SceInt32 sceKernelCloseRWLock(SceUID rwLockId); + +SceInt32 sceKernelLockReadRWLock(SceUID rwLockId, SceUInt32 *pTimeout); +SceInt32 sceKernelLockReadRWLockCB(SceUID rwLockId, SceUInt32 *pTimeout); + +SceInt32 sceKernelTryLockReadRWLock(SceUID rwLockId); + +SceInt32 sceKernelUnlockReadRWLock(SceUID rwLockId); + +SceInt32 sceKernelLockWriteRWLock(SceUID rwLockId, SceUInt32 *pTimeout); + +SceInt32 sceKernelLockWriteRWLockCB(SceUID rwLockId, SceUInt32 *pTimeout); + +SceInt32 sceKernelTryLockWriteRWLock(SceUID rwLockId); + +SceInt32 sceKernelUnlockWriteRWLock(SceUID rwLockId); + +SceInt32 sceKernelCancelRWLock( + SceUID rwLockId, + SceUInt32 *pNumReadWaitThreads, + SceUInt32 *pNumWriteWaitThreads, + SceInt32 flag); + +SceInt32 sceKernelGetRWLockInfo(SceUID rwLockId, SceKernelRWLockInfo *pInfo); + +/* Thread timer */ + +typedef struct _SceKernelTimerOptParam { + SceSize size; +} SceKernelTimerOptParam; + +typedef struct _SceKernelTimerInfo { + SceSize size; + SceUID timerId; + char name[SCE_UID_NAMELEN + 1]; + SceUInt32 attr; + SceInt32 fActive; + SceKernelSysClock baseTime; + SceKernelSysClock currentTime; + SceKernelSysClock schedule; + SceKernelSysClock interval; + SceInt32 type; + SceInt32 fRepeat; + SceUInt32 numWaitThreads; + SceInt32 reserved[1]; +} SceKernelTimerInfo; + +SceUID sceKernelCreateTimer( + const char *pName, + SceUInt32 attr, + const SceKernelTimerOptParam *pOptParam); + +SceInt32 sceKernelDeleteTimer(SceUID timerId); + +SceUID sceKernelOpenTimer(const char *pName); + +SceInt32 sceKernelCloseTimer(SceUID timerId); + +SceInt32 sceKernelStartTimer(SceUID timerId); + +SceInt32 sceKernelStopTimer(SceUID timerId); + +SceInt32 sceKernelGetTimerBase(SceUID timerId, SceKernelSysClock *pBase); + +SceUInt64 sceKernelGetTimerBaseWide(SceUID timerId); + +SceInt32 sceKernelGetTimerTime(SceUID timerId, SceKernelSysClock *pClock); + +SceUInt64 sceKernelGetTimerTimeWide(SceUID timerId); + +SceInt32 sceKernelSetTimerTime(SceUID timerId, SceKernelSysClock *pClock); + +SceUInt64 sceKernelSetTimerTimeWide(SceUID timerId, SceUInt64 clock); + +SceInt32 sceKernelSetTimerEvent( + SceUID timerId, + SceInt32 type, + SceKernelSysClock *pInterval, + SceInt32 fRepeat); + +SceInt32 sceKernelCancelTimer(SceUID timerId, SceUInt32 *pNumWaitThreads); + +SceInt32 sceKernelGetTimerInfo(SceUID timerId, SceKernelTimerInfo *pInfo); + +SceInt32 sceKernelGetTimerEventRemainingTime(SceUID timerId, SceKernelSysClock *pClock); + +/* Simple event */ + +typedef struct _SceKernelSimpleEventOptParam { + SceSize size; +} SceKernelSimpleEventOptParam; + +SceUID sceKernelCreateSimpleEvent( + const char *pName, + SceUInt32 attr, + SceUInt32 initPattern, + const SceKernelSimpleEventOptParam *pOptParam); + +SceInt32 sceKernelDeleteSimpleEvent(SceUID simpleEventId); + +SceUID sceKernelOpenSimpleEvent(const char *pName); + +SceInt32 sceKernelCloseSimpleEvent(SceUID simpleEventId); /* Misc. */ @@ -1046,17 +1434,17 @@ typedef struct SceKernelSystemInfo { SceKernelSysClock idleClock; SceUInt32 comesOutOfIdleCount; SceUInt32 threadSwitchCount; - } cpuInfo[4]; + } cpuInfo[SCE_KERNEL_MAX_CPU]; } SceKernelSystemInfo; /** * Get the system information * - * @param info - Pointer to a ::SceKernelSystemInfo structure + * @param pInfo - Pointer to a ::SceKernelSystemInfo structure * * @return 0 on success, < 0 on error */ -int sceKernelGetSystemInfo(SceKernelSystemInfo *info); +SceInt32 sceKernelGetSystemInfo(SceKernelSystemInfo *pInfo); /* Misc. */ @@ -1088,22 +1476,52 @@ typedef enum SceKernelIdListType { */ SceKernelIdListType sceKernelGetThreadmgrUIDClass(SceUID uid); +/* Lightweight mutex */ -typedef struct SceKernelLwMutexWork { +typedef struct SceKernelLwMutexWork { SceInt64 data[4]; } SceKernelLwMutexWork; typedef struct SceKernelLwMutexOptParam { - SceSize size; + SceSize size; } SceKernelLwMutexOptParam; -int sceKernelCreateLwMutex(SceKernelLwMutexWork *pWork,const char *pName, unsigned int attr, int initCount, const SceKernelLwMutexOptParam *pOptParam); -int sceKernelDeleteLwMutex(SceKernelLwMutexWork *pWork); -int sceKernelLockLwMutex(SceKernelLwMutexWork *pWork, int lockCount, unsigned int *pTimeout); -int sceKernelTryLockLwMutex(SceKernelLwMutexWork *pWork, int lockCount); -int sceKernelUnlockLwMutex(SceKernelLwMutexWork *pWork, int unlockCount); +typedef struct _SceKernelLwMutexInfo { + SceSize size; + SceUID uid; + char name[SCE_UID_NAMELEN + 1]; + SceUInt32 attr; + SceKernelLwMutexWork *pWork; + SceInt32 initCount; + SceInt32 currentCount; + SceUID currentOwnerId; + SceUInt32 numWaitThreads; +} SceKernelLwMutexInfo; + +SceInt32 sceKernelCreateLwMutex( + SceKernelLwMutexWork *pWork, + const char *pName, + SceUInt32 attr, + SceInt32 initCount, + const SceKernelLwMutexOptParam *pOptParam); + +SceInt32 sceKernelDeleteLwMutex(SceKernelLwMutexWork *pWork); + +SceInt32 sceKernelLockLwMutex(SceKernelLwMutexWork *pWork, SceInt32 lockCount, SceUInt32 *pTimeout); + +SceInt32 sceKernelLockLwMutexCB(SceKernelLwMutexWork *pWork, SceInt32 lockCount, SceUInt32 *pTimeout); -typedef struct SceKernelLwCondWork { +SceInt32 sceKernelTryLockLwMutex(SceKernelLwMutexWork *pWork, SceInt32 lockCount); + +SceInt32 sceKernelUnlockLwMutex(SceKernelLwMutexWork *pWork, SceInt32 unlockCount); + +SceInt32 sceKernelGetLwMutexInfo(SceKernelLwMutexWork *pWork, SceKernelLwMutexInfo *pInfo); + +SceInt32 sceKernelGetLwMutexInfoById(SceUID lwMutexId, SceKernelLwMutexInfo *pInfo); + +/* Lightweight condition */ + +typedef struct SceKernelLwCondWork { SceInt64 data[4]; } SceKernelLwCondWork; @@ -1111,10 +1529,37 @@ typedef struct SceKernelLwCondOptParam { SceSize size; } SceKernelLwCondOptParam; -int sceKernelCreateLwCond(SceKernelLwCondWork *pWork, const char *pName, unsigned int attr, SceKernelLwMutexWork *pLwMutex, const SceKernelLwCondOptParam *pOptParam); -int sceKernelDeleteLwCond(SceKernelLwCondWork *pWork); -int sceKernelSignalLwCond(SceKernelLwCondWork *pWork); -int sceKernelWaitLwCond(SceKernelLwCondWork *pWork, unsigned int *pTimeout); +typedef struct _SceKernelLwCondInfo { + SceSize size; + SceUID uid; + char name[SCE_UID_NAMELEN + 1]; + SceUInt32 attr; + SceKernelLwCondWork *pWork; + SceKernelLwMutexWork *pLwMutex; + SceUInt32 numWaitThreads; +} SceKernelLwCondInfo; + +SceInt32 sceKernelCreateLwCond( + SceKernelLwCondWork *pWork, + const char *pName, + SceUInt32 attr, + SceKernelLwMutexWork *pLwMutex, + const SceKernelLwCondOptParam *pOptParam +); + +SceInt32 sceKernelDeleteLwCond(SceKernelLwCondWork *pWork); + +SceInt32 sceKernelSignalLwCond(SceKernelLwCondWork *pWork); + +SceInt32 sceKernelWaitLwCond(SceKernelLwCondWork *pWork, SceUInt32 *pTimeout); + +SceInt32 sceKernelSignalLwCondAll(SceKernelLwCondWork *pWork); + +SceInt32 sceKernelSignalLwCondTo(SceKernelLwCondWork *pWork, SceUID threadId); + +SceInt32 sceKernelGetLwCondInfo (SceKernelLwCondWork *pWork, SceKernelLwCondInfo *pInfo); + +SceInt32 sceKernelGetLwCondInfoById(SceUID lwCondId, SceKernelLwCondInfo *pInfo); /** diff --git a/include/user/net/net_syscalls.h b/include/user/net/net_syscalls.h new file mode 100644 index 0000000..9752be9 --- /dev/null +++ b/include/user/net/net_syscalls.h @@ -0,0 +1,16 @@ +#ifndef _PSP2_NET_NET_SYSCALLS_H_ +#define _PSP2_NET_NET_SYSCALLS_H_ + +#include <psp2/net/net.h> + +#ifdef __cplusplus +extern "C" { +#endif + +int sceNetSyscallConnect(int s, const SceNetSockaddr *name, unsigned int namelen); + +#ifdef __cplusplus +} +#endif + +#endif /* _PSP2_NET_NET_SYSCALLS_H_ */ diff --git a/include/user/notification_util.h b/include/user/notification_util.h new file mode 100644 index 0000000..4aa362a --- /dev/null +++ b/include/user/notification_util.h @@ -0,0 +1,80 @@ +#ifndef _DOLCESDK_PSP2_NOTIFICATION_UTIL_H_ +#define _DOLCESDK_PSP2_NOTIFICATION_UTIL_H_ + +#include <psp2/types.h> + +#ifdef __cplusplus +extern "C" { +#endif + +/** + * Errors + */ +#define SCE_NOTIFICATION_UTIL_ERROR_INTERNAL 0x80106301 + +/** + * BGDL-type notification event handler function + */ +typedef void (*SceNotificationUtilProgressEventHandler)(SceUInt32 eventId); + +typedef struct SceNotificationUtilProgressInitParam { + SceWChar16 notificationText[0x40]; // must be null-terminated + SceWChar16 notificationSubText[0x40]; // must be null-terminated + SceChar8 unk[0x3E6]; + SceNotificationUtilProgressEventHandler eventHandler; + SceInt32 unk_4EC; // can be set to 0 + SceWChar16 cancelDialogText[0x40]; // must be null-terminated +} SceNotificationUtilProgressInitParam; + +typedef struct SceNotificationUtilProgressUpdateParam { + SceWChar16 notificationText[0x40]; // must be null-terminated + SceWChar16 notificationSubText[0x40]; // must be null-terminated + SceFloat targetProgress; + SceChar8 reserved[0x38]; +} SceNotificationUtilProgressUpdateParam; + +typedef struct SceNotificationUtilProgressFinishParam { + SceWChar16 notificationText[0x40]; // must be null-terminated + SceWChar16 notificationSubText[0x40]; // must be null-terminated + SceChar8 path[0x3E8]; +} SceNotificationUtilProgressFinishParam; + +/** + * Initialize notification util for use with BG application. + * + * Does not need to be called for normal applications. + */ +SceInt32 sceNotificationUtilBgAppInitialize(void); + +/** + * Send notification. + * + * Text buffer size must be 0x470. + */ +SceInt32 sceNotificationUtilSendNotification(const SceWChar16* text); + +/** + * Clean notifications for calling app from notification history. + */ +SceInt32 sceNotificationUtilCleanHistory(void); + +/** + * Start BGDL-type notification. + */ +SceInt32 sceNotificationUtilProgressBegin(SceNotificationUtilProgressInitParam* initParam); + +/** + * Update BGDL-type notification. + */ +SceInt32 sceNotificationUtilProgressUpdate(SceNotificationUtilProgressUpdateParam* updateParam); + +/** + * Finish BGDL-type notification. + */ +SceInt32 sceNotificationUtilProgressFinish(SceNotificationUtilProgressFinishParam* finishParam); + +#ifdef __cplusplus +} +#endif /* __cplusplus */ + +#endif /* _DOLCESDK_PSP2_NOTIFICATION_UTIL_H_ */ diff --git a/include/user/paf.h b/include/user/paf.h index 9e8a979..1d81d3b 100644 --- a/include/user/paf.h +++ b/include/user/paf.h @@ -10,14 +10,14 @@ extern "C" { void sce_paf_private_free(void *ptr); void *sce_paf_private_malloc(size_t size); -void *sce_paf_private_memclr(void *ptr, size_t num); //!< Set memory block to 0 +void *sce_paf_private_bzero(void *ptr, size_t num); void *sce_paf_private_memchr(const void *ptr, int value, size_t num); int sce_paf_private_memcmp(const void *ptr1, const void *ptr2, size_t num); -int sce_paf_private_memcmp2(const void *ptr1, const void *ptr2, size_t num); +int sce_paf_private_bcmp(const void *ptr1, const void *ptr2, size_t num); void *sce_paf_private_memcpy(void *destination, const void *source, size_t num); void *sce_paf_private_memcpy2(void *destination, const void *source, size_t num); void *sce_paf_private_memmove(void *destination, const void *source, size_t num); -void *sce_paf_private_memmove2(void *destination, const void *source, size_t num); +void *sce_paf_private_bcopy(void *destination, const void *source, size_t num); void *sce_paf_private_memset(void *ptr, int value, size_t num); int sce_paf_private_snprintf(char *s, size_t n, const char *format, ...); int sce_paf_private_strcasecmp(const char *str1, const char *str2); diff --git a/include/user/power.h b/include/user/power.h index e42259e..8148139 100644 --- a/include/user/power.h +++ b/include/user/power.h @@ -18,21 +18,36 @@ typedef enum ScePowerErrorCode { } ScePowerErrorCode; typedef enum ScePowerCallbackType { - /** indicates the unit is suspending, seems to occur due to inactivity */ - SCE_POWER_CB_SUSPENDING = 0x00010000, + /** indicates the power button was pushed, putting the unit into suspend mode */ + SCE_POWER_CB_POWER_SWITCH = 0x80000000, + /** ? screen on after off ? **/ + SCE_POWER_CB_UNK_1 = 0x00600000, + /** ? screen off ? **/ + SCE_POWER_CB_UNK_2 = 0x00400000, + /** indicates the unit has finish resuming from suspend mode */ + SCE_POWER_CB_RESUME_COMPLETE = 0x00040000, /** indicates the unit is resuming from suspend mode */ SCE_POWER_CB_RESUMING = 0x00020000, - /** indicates the unit has finish resuming from suspend mode */ - SCE_POWER_CB_RESUME_COMPLETE = 0x00040000 + /** indicates the unit is suspending, seems to occur due to inactivity */ + SCE_POWER_CB_SUSPENDING = 0x00010000, + /** indicates the unit is plugged into an AC outlet */ + SCE_POWER_CB_AC_POWER = 0x00001000, + /** indicates the battery is in low state */ + SCE_POWER_CB_LOWBATTERY = 0x00000100, + /** indicates there is a battery present in the unit */ + SCE_POWER_CB_BATTERY_EXIST = 0x00000080 } ScePowerCallbackType; -/* Callbacks */ +/* GPU, WLAN/COM configuration setting */ +typedef enum ScePowerConfigurationMode { + SCE_POWER_CONFIGURATION_MODE_A = 0x00000080U, /* GPU clock normal, WLAN/COM enabled */ + SCE_POWER_CONFIGURATION_MODE_B = 0x00000800U, /* GPU clock high, WLAN/COM disabled */ + SCE_POWER_CONFIGURATION_MODE_C = 0x00010880U, /* GPU clock high, WLAN/COM enabled (drains battery faster) */ +} ScePowerConfigurationMode; /** Callback function prototype */ typedef void (*ScePowerCallback)(int notifyId, int notifyCount, int powerInfo); -/* Prototypes */ - /** * Registers a ScePower Callback * @@ -66,13 +81,17 @@ SceBool scePowerIsBatteryCharging(void); int scePowerGetBatteryLifePercent(void); /** - * Set configuration mode ? + * Set power configuration mode between: * - * @param mode - The mode to set + * Mode A - This is the normal mode at process start-up. The clock frequency of the GPU core is the "normal" clock frequency. The WLAN/COM can be used. + * Mode B - This mode accelerates the GPU clock frequency. The clock frequency of the GPU core is the "high" clock frequency. The WLAN/COM cannot be used. + * Mode C - This mode accelerates the GPU clock frequency, and also uses the WLAN/COM. The clock frequency of the GPU core is the "high" clock frequency, and use of the WLAN/COM is possible. The screen (touchscreen) brightness, however, is limited. Also, camera cannot be used. * - * @return ? + * @param conf One of ::ScePowerConfigurationMode + * + * @return 0 on success */ -int scePowerSetConfigurationMode(int mode); +int scePowerSetConfigurationMode(int conf); /** * Check if a suspend is required @@ -194,6 +213,13 @@ int scePowerRequestStandby(void); int scePowerRequestSuspend(void); /** + * Request display on + * + * @return always 0 + */ +int scePowerRequestDisplayOn(void); + +/** * Request display off * * @return always 0 diff --git a/include/user/promoterutil.h b/include/user/promoterutil.h index 283706c..62de9cd 100644 --- a/include/user/promoterutil.h +++ b/include/user/promoterutil.h @@ -7,12 +7,27 @@ extern "C" { #endif +/** Avalible types for ::ScePromoterUtilityImportParams **/ +typedef enum ScePromoterUtilityPackageType { + SCE_PKG_TYPE_VITA = 0x0001, //!< PSVita Apps + SCE_PKG_TYPE_PSM = 0x0003, //!< PlayStation Mobile +} ScePromoterUtilityPackageType; + /** Parameters for scePromoterUtilityUpdateLiveArea() */ typedef struct ScePromoterUtilityLAUpdate { char titleid[12]; //!< Target app. char path[128]; //!< Directory of extracted LA update data. } ScePromoterUtilityLAUpdate; - + +/** Parameters for scePromoterUtilityPromoteImport() */ +typedef struct ScePromoterUtilityImportParams { + char path[0x80]; //!< Install path usually (ux0:/temp/game) + char titleid[0xC]; //!< Game titleid + ScePromoterUtilityPackageType type; //!< Package type + uint32_t attribute; //!< Additional Attributes (Appears to be 0x1 on PSM content but 0x00 on Vita contents) + char reserved[0x1C]; +} ScePromoterUtilityImportParams; + /** * Init the promoter utility. * \note Needs to be called before using the other functions. @@ -47,13 +62,13 @@ int scePromoterUtilityDeletePkg(const char *titleid); int scePromoterUtilityUpdateLiveArea(ScePromoterUtilityLAUpdate *args); /** - * Install a backup from a directory, and add an icon on the LiveArea. + * Install Content Manager import contents and create bubbles without checking license files. * - * @param[in] *path - the path of the directory where the extracted content of the backup is + * @param[in] *params - see ::ScePromoterUtilImportParams * * @return 0 on success. */ -int scePromoterUtilityPromoteBackup(const char *path); +int scePromoterUtilityPromoteImport(ScePromoterUtilityImportParams *params); /** * Install a package from a directory, and add an icon on the LiveArea. diff --git a/include/user/pss.h b/include/user/pss.h index 586f644..1330a6d 100644 --- a/include/user/pss.h +++ b/include/user/pss.h @@ -6,7 +6,17 @@ #ifdef __cplusplus extern "C" { #endif + +typedef struct ScePssCryptoHandle { + SceUID fd; + uint32_t unk1; + SceSize size; + uint32_t unk3; +} ScePssCryptoHandle; +int pss_crypto_open(ScePssCryptoHandle *handle, char *path); +char *pss_crypto_read(ScePssCryptoHandle *handle, int *mode); +int pss_crypto_close(ScePssCryptoHandle *handle); void *pss_code_mem_alloc(SceSize *); void pss_code_mem_flush_icache(const void *, SceSize); void pss_code_mem_lock(void); diff --git a/include/user/registrymgr.h b/include/user/registrymgr.h index cc363b5..dbf4946 100644 --- a/include/user/registrymgr.h +++ b/include/user/registrymgr.h @@ -59,11 +59,11 @@ int sceRegMgrSetKeyBin(const char *category, const char *name, void *buf, int si * * @param category - The path to the directory to be opened (e.g. /CONFIG/SYSTEM) * @param name - Name of the key - * @param buf - Pointer to an int buffer to hold the value + * @param value - Value to set to * * @return 0 on success, < 0 on error */ -int sceRegMgrSetKeyInt(const char* category, const char* name, int buf); +int sceRegMgrSetKeyInt(const char* category, const char* name, int value); /** * Set a key's information by category and name diff --git a/include/user/sblacmgr.h b/include/user/sblacmgr.h new file mode 100644 index 0000000..17a14f5 --- /dev/null +++ b/include/user/sblacmgr.h @@ -0,0 +1,16 @@ +#ifndef _PSP2_SBLACMGR_H_ +#define _PSP2_SBLACMGR_H_ + +#include <psp2/types.h> + +#ifdef __cplusplus +extern "C" { +#endif + +int _sceSblACMgrIsGameProgram(void); + +#ifdef __cplusplus +} +#endif + +#endif /* _PSP2_SBLACMGR_H_ */ diff --git a/include/user/shellutil.h b/include/user/shellutil.h index 61d602b..0d84ff6 100644 --- a/include/user/shellutil.h +++ b/include/user/shellutil.h @@ -1,6 +1,8 @@ #ifndef _PSP2_SHELLUTIL_H_ #define _PSP2_SHELLUTIL_H_ +#include <psp2/types.h> + #ifdef __cplusplus extern "C" { #endif @@ -65,6 +67,97 @@ int sceShellUtilLock(SceShellUtilLockType type); */ int sceShellUtilUnlock(SceShellUtilLockType type); +/** + * Reboot the device + * + * @param[in] unk - pass 0 + */ +void sceShellUtilRequestColdReset(int unk); + +/** + * Poweroff the device + * + * @param[in] unk - pass 0 + */ +void sceShellUtilRequestStandby(int unk); + +/** + * Show "A serious error has occured" message and reboot + * + * @param[in] safeModeType - sets type of safemode to reboot into, 0 to reboot normally + * @param[in] errorCode - error code to display in the message + * @param[in] errorMessageType - ex. 0 "Contact technical support" + */ +void sceShellUtilRequestColdResetWithError(int safeModeType, int errorCode, int errorMessageType); + +/** + * SceTextClipboardStorage is cached memory block with usable size of 0x1FFD bytes + * allocated by SceShellSvc on startup. Normally you would access this storage with + * clipboard sysmodule, however it can also be accessed directly with SceShellSvc + * functions. This memory can be accesed from any part of the system and is managed + * by SceShell. For example, you can write to it in one application and access + * written data from the other. Or you can write to it in application and access + * written data from the plugin. + * + * @param[in] data - pointer to the data to write + * @param[in] size - size of data to write. Must not exceed 0x1FFD. + */ + +SceInt32 sceShellUtilTextClipboardWrite(const void* data, SceSize size); + +/** + * Read from text clipboard + * + * @param[in] data - pointer to the buffer where the read data will be placed + * @param[in] size - size of data to read + * @param[out] textlen - length actually read + */ + +SceInt32 sceShellUtilTextClipboardRead(void* data, SceSize size, SceSize *textlen); + +/** + * Returns size of the data that was written to clipboard with + * sceShellUtilTextClipboardWrite + */ + +SceUInt32 sceShellUtilTextClipboardGetUsedSize(void); + +/** + * Sets text in time display, UTF-16 (remains until reboot?) + */ + +SceInt32 sceShellUtilSetTimeText(SceWChar16* unk, SceWChar16* text); + +/** + * Set airplane icon visibility + * + * @param[in] mode - 0 to hide, 1 to show + */ + +SceInt32 sceShellUtilSetAirplaneIconMode(SceUInt32 mode); + +/** + * Set Bluetooth icon visibility + * + * @param[in] mode - 0 to hide, 1 to show + */ + +SceInt32 sceShellUtilSetBtIconMode(SceUInt32 mode); + +/** + * Set BGM mode + * + * @param[in] mode - 0 to disable, 1 to enable + */ + +SceInt32 sceShellUtilSetBGMMode(SceUInt32 mode); + +/** + * Set system language. Takes about 5 sec to apply. + */ + +SceInt32 sceShellUtilSetSystemLanguage(SceUInt32 languageId); + #ifdef __cplusplus } #endif diff --git a/include/user/sysmodule.h b/include/user/sysmodule.h index 858b0a7..8f01169 100644 --- a/include/user/sysmodule.h +++ b/include/user/sysmodule.h @@ -89,6 +89,7 @@ typedef enum SceSysmoduleModuleId { SCE_SYSMODULE_NEAR_DIALOG_UTIL = 0x004A, //!< NearDialogUtil module SCE_SYSMODULE_LOCATION_EXTENSION = 0x004B, //!< LocationExt module SCE_SYSMODULE_AVPLAYER = 0x004C, //!< AVPlayer module + SCE_SYSMODULE_GAME_UPDATE = 0x004D, //!< Game Update module SCE_SYSMODULE_MAIL_API = 0x004E, //!< Mail Api module SCE_SYSMODULE_TELEPORT_CLIENT = 0x004F, //!< Teleport Client module SCE_SYSMODULE_TELEPORT_SERVER = 0x0050, //!< Teleport Server module @@ -130,9 +131,10 @@ typedef enum SceSysmoduleInternalModuleId { SCE_SYSMODULE_INTERNAL_NP_COMMERCE2 = 0x8000001D, //!< NpCommerce2 module SCE_SYSMODULE_INTERNAL_NP_KDC = 0x8000001E, //!< NpKdc module SCE_SYSMODULE_INTERNAL_MUSIC_EXPORT = 0x8000001F, //!< Music Export module - SCE_SYSMODULE_INTERNAL_NP_MESSAGE_DLG_IMPL = 0x80000021, //!< NpMessageDlg module + SCE_SYSMODULE_INTERNAL_VIDEO_EXPORT = 0x80000020, //!< Video Export module + SCE_SYSMODULE_INTERNAL_NP_MESSAGE_DIALOG_IMPL = 0x80000021, //!< NpMessageDlg module SCE_SYSMODULE_INTERNAL_NP_MESSAGE_CONTACTS = 0x80000022, //!< NpMessageContacts module - SCE_SYSMODULE_INTERNAL_DBRECOVERY_UTILITY = 0x80000023, //!< DBRecoveryUtil module + SCE_SYSMODULE_INTERNAL_DB_RECOVERY_UTILITY = 0x80000023, //!< DBRecoveryUtil module SCE_SYSMODULE_INTERNAL_PROMOTER_UTIL = 0x80000024, //!< scePromoterUtil module SCE_SYSMODULE_INTERNAL_PARTY_MEMBER_LIST = 0x80000026, //!< Party Member List module SCE_SYSMODULE_INTERNAL_ULT = 0x80000025, //!< Ult module diff --git a/include/user/udcd.h b/include/user/udcd.h index fefb048..eec370f 100644 --- a/include/user/udcd.h +++ b/include/user/udcd.h @@ -1,6 +1,8 @@ #ifndef _PSP2_UDCD_H_ #define _PSP2_UDCD_H_ +#include <psp2/types.h> + #ifdef __cplusplus extern "C" { #endif @@ -31,16 +33,16 @@ typedef struct { uint8_t info[64]; } SceUdcdDeviceInfo; -typedef struct { +typedef struct SceUdcdWaitParam { int unk_00; - int unk_04; + int status; int unk_08; int unk_0C; int unk_10; const char *driverName; } SceUdcdWaitParam; -typedef struct { +typedef struct SceUdcdDeviceState { int unk_00; int state; int cable; diff --git a/include/user/vshbridge.h b/include/user/vshbridge.h index 46cb4a0..a525c04 100644 --- a/include/user/vshbridge.h +++ b/include/user/vshbridge.h @@ -9,29 +9,72 @@ extern "C" { #endif int _vshSblGetSystemSwVersion(SceKernelFwInfo * data); - + int _vshSblAimgrGetConsoleId(char CID[32]); - + +/** + * @param[in] id - mount id + * @param[in] path - mount path + * @param[in] permission - 1/RO 2/RW + * @param[in] buf - work buffer + * + * @return 0 >= on success, < 0 on error. + */ +int _vshIoMount(int id, const char *path, int permission, void* buf); + +/** + * @param[in] id - mount id + * @param[in] force - Set to 1 to force umount + * @param[in] unk2 - Unknown, set 0 + * @param[in] unk3 - Unknown, set 0 + * + * @return 0 >= on success, < 0 on error. + */ +int vshIoUmount(int id, int force, int unk2, int unk3); + int vshIdStorageIsDirty(void); int vshIdStorageIsFormatted(void); int vshIdStorageIsReadOnly(void); - + +/** + * @param[in] leafnum - 0x0 ~ 0x80 / leafnum > 0x80 = error + * @param[out] buf - Leaf data, size is 512 byte + * + * @return 0 on success, < 0 on error. + */ +int vshIdStorageReadLeaf(int leafnum, void *buf); + +/** + * @param[in] leafnum - 0x0 ~ 0x80 / leafnum > 0x80 = error + * @param[in] buf - Leaf data, size is 512 byte + * + * @return 0 on success, < 0 on error. + */ +int vshIdStorageWriteLeaf(int leafnum, const void *buf); + int vshSblAimgrIsCEX(void); int vshSblAimgrIsDEX(void); +int vshSblAimgrIsVITA(void); int vshSblAimgrIsGenuineVITA(void); +int vshSblAimgrIsDolce(void); int vshSblAimgrIsGenuineDolce(void); int vshSblAimgrIsTest(void); int vshSblAimgrIsTool(void); int vshSblSsIsDevelopmentMode(void); -int sceKernelIsPSVitaTV(void); - + int vshSysconHasWWAN(void); - + int vshSysconIsDownLoaderMode(void); int vshSysconIsIduMode(void); int vshSysconIsMCEmuCapable(void); int vshSysconIsShowMode(void); - + +int vshSysconIduModeSet(void); +int vshSysconIduModeClear(void); + +int vshSysconShowModeSet(void); +int vshSysconShowModeClear(void); + int vshMemoryCardGetCardInsertState(void); int vshRemovableMemoryGetCardInsertState(void); diff --git a/nids/360/SceAppMgr.yml b/nids/360/SceAppMgr.yml index 19b0bcd..9abb455 100644 --- a/nids/360/SceAppMgr.yml +++ b/nids/360/SceAppMgr.yml @@ -200,6 +200,11 @@ modules: nid: 0xDCE180F8 functions: sceAppMgrAcInstGetAcdirParam: 0x474AABDF + sceAppMgrAppDataMount: 0xB1D3C287 + sceAppMgrAppDataMountById: 0x5E311F71 + sceAppMgrAppMount: 0xEF0C9533 + sceAppMgrAppParamGetInt: 0x12CE29F7 + sceAppMgrAppUmount: 0x1DE3B7C4 sceAppMgrBgdlSetQueueStatus: 0x5B1BE482 sceAppMgrCheckContentInstallPeriod: 0x193784A9 sceAppMgrCheckPfsMounted: 0x0B1BEEE0 @@ -212,23 +217,42 @@ modules: sceAppMgrCloudDataSrcMount: 0x6D4D6FFE sceAppMgrCloudDataVerifyHeader: 0x55D48190 sceAppMgrDebugSettingNotifyUpdate: 0x7554330F + sceAppMgrDestroyOtherAppByPid: 0xFC89D33D + sceAppMgrDrmClose: 0x088670A6 + sceAppMgrDrmOpen: 0xEA75D157 sceAppMgrFakeSaveDataCreateMount: 0x12FC3FA8 sceAppMgrGameDataMount: 0xCE356B2D + sceAppMgrGetBootParam: 0xD2541B4A sceAppMgrGetPfsProcessStatus: 0xE72D2A4A sceAppMgrGetSystemDataFile: 0xAEC49533 sceAppMgrIsExclusiveProcessRunning: 0xA888C2DC + sceAppMgrKillProcess: 0xD80566DB sceAppMgrLaunchAppByPath: 0xB0A37065 sceAppMgrLoadSafeMemory: 0xFAF3DAAA sceAppMgrLocalBackupGetOfflineId: 0x61B13981 sceAppMgrLocalBackupVerifyOfflineHeader: 0x62E98C42 + sceAppMgrMmsMount: 0x13D54107 + sceAppMgrPhotoMount: 0x43A35729 sceAppMgrRegisterPath: 0xB53FB98E + sceAppMgrSaveDataGetQuota: 0xE104C37E sceAppMgrSaveDataLocalBackupTargetGetList: 0x9B3F7D66 sceAppMgrSaveDataLocalBackupTargetRemoveItem: 0xC4EF95BB + sceAppMgrSaveDataMount: 0xE73C9516 sceAppMgrSaveDataNotifyBackupFinished: 0x6989B258 + sceAppMgrSaveDataSlotCreate: 0xE6F389B8 + sceAppMgrSaveDataSlotDelete: 0xB544F2A0 + sceAppMgrSaveDataSlotGetParam: 0xD137D486 + sceAppMgrSaveDataSlotGetStatus: 0xEC9D5A35 + sceAppMgrSaveDataSlotInit: 0x2277F736 + sceAppMgrSaveDataSlotSetParam: 0x7E247E47 + sceAppMgrSaveDataSlotSetStatus: 0x9ADB00FA + sceAppMgrSaveDataUmount: 0x2B080268 sceAppMgrSaveSafeMemory: 0xD366AA44 sceAppMgrSystemParamDateTimeSetConf: 0xA9AA3A68 + sceAppMgrTrophyMount: 0xE977A833 sceAppMgrUmount: 0xA714BB35 sceAppMgrUpdateRifInfo: 0x894BDCB8 + sceAppMgrWorkDirMount: 0x3A0A9B82 SceAppMgrUser: nid: 0xA6605D6F functions: @@ -287,6 +311,7 @@ modules: sceAppMgrGetStatusByName: 0x656E0ABD sceAppMgrGetSystemDataFilePlayReady: 0x1E1E97EE sceAppMgrGetUserDirPath: 0x5253338C + sceAppMgrGetUserDirPathById: 0x63E51420 sceAppMgrGetVs0UserDataDrive: 0xC0631748 sceAppMgrGetVs0UserModuleDrive: 0x906154DE sceAppMgrInitSafeMemoryById: 0x3E53681A @@ -302,6 +327,7 @@ modules: sceAppMgrLaunchAppByUri2: 0x0ED6AF54 sceAppMgrLaunchVideoStreamingApp: 0x4C02B889 sceAppMgrLoadExec: 0xE6774ABC + sceAppMgrLoadSaveDataSystemFile: 0x660B57BE sceAppMgrLoopBackFormat: 0xCE8CE150 sceAppMgrLoopBackMount: 0x33CD76DD sceAppMgrMmsMount: 0xF4730BA8 @@ -319,7 +345,9 @@ modules: sceAppMgrReceiveSystemEvent: 0x10B5765F sceAppMgrSaveDataAddMount: 0x8B224917 sceAppMgrSaveDataDataRemove: 0x4544FCC5 + sceAppMgrSaveDataDataRemove2: 0x36040E1D sceAppMgrSaveDataDataSave: 0x84DE76C7 + sceAppMgrSaveDataDataSave2: 0xD5CA4F56 sceAppMgrSaveDataGetQuota: 0x0717E2AE sceAppMgrSaveDataMount: 0x31F3CC59 sceAppMgrSaveDataSlotCreate: 0x5181D7B3 @@ -348,6 +376,7 @@ modules: sceAppMgrSystemParamDateTimeGetConf: 0xE39FC7D5 sceAppMgrSystemParamGetInt: 0x5B75180C sceAppMgrSystemParamGetString: 0x09899A08 + sceAppMgrThemeDataMount: 0x633A7594 sceAppMgrTrophyMount: 0x84FE08EE sceAppMgrTrophyMountById: 0x316207F3 sceAppMgrUmount: 0x5E375921 diff --git a/nids/360/SceAppUtil.yml b/nids/360/SceAppUtil.yml index 95ed132..ce1786d 100644 --- a/nids/360/SceAppUtil.yml +++ b/nids/360/SceAppUtil.yml @@ -51,10 +51,21 @@ modules: sceAppUtilStoreBrowse: 0x85FA94EE sceAppUtilSystemParamGetInt: 0x5DFB9CA0 sceAppUtilSystemParamGetString: 0x6E6AA267 + SceAppUtilAddcontForce: + nid: 0x9D061921 + functions: + sceAppUtilAddcontForceAddcontMount: 0x6087E5F7 + SceAppUtilBook: + nid: 0xDA27A9D3 + functions: + sceAppUtilBookMount: 0xFDAAF091 + sceAppUtilBookUmount: 0x9C1794C2 SceAppUtilCache: nid: 0xE96B941B functions: + sceAppUtilCacheGetDevInfo: 0x1171B736 sceAppUtilCacheMount: 0x0AA56143 + sceAppUtilCacheUmount: 0x72D26BF4 SceAppUtilExt: nid: 0x76D1A509 functions: diff --git a/nids/360/SceAudio.yml b/nids/360/SceAudio.yml index 0462320..d595fee 100644 --- a/nids/360/SceAudio.yml +++ b/nids/360/SceAudio.yml @@ -7,10 +7,17 @@ modules: functions: sceAudioOutGetAdopt: 0x12FB1767 sceAudioOutGetConfig: 0x9C8EDAEA + sceAudioOutGetPortVolume_forUser: 0xFF635DA5 sceAudioOutGetRestSample: 0x9A5370C4 + sceAudioOutOpenExtPort: 0x6184B939 sceAudioOutOpenPort: 0x5BC341E4 sceAudioOutOutput: 0x02DB3F5F sceAudioOutReleasePort: 0x69E2E6B5 + sceAudioOutSetAdoptMode: 0xDCC90EDB + sceAudioOutSetAdopt_forUser: 0x26C82AF2 sceAudioOutSetAlcMode: 0x940CE469 + sceAudioOutSetCompress: 0x3601D375 sceAudioOutSetConfig: 0xB8BA0D07 + sceAudioOutSetEffectType: 0xB41FACCE + sceAudioOutSetPortVolume_forUser: 0x65840F3D sceAudioOutSetVolume: 0x64167F11 diff --git a/nids/360/SceAudioIn.yml b/nids/360/SceAudioIn.yml index dd50caf..bf06754 100644 --- a/nids/360/SceAudioIn.yml +++ b/nids/360/SceAudioIn.yml @@ -6,7 +6,14 @@ modules: nid: 0xF8DC61A3 functions: sceAudioInGetAdopt: 0x566AC433 + sceAudioInGetInput: 0x08105392 + sceAudioInGetMicGain: 0x86118097 sceAudioInGetStatus: 0x2F940377 sceAudioInInput: 0x638ADD2D + sceAudioInInputWithInputDeviceState: 0x343E8251 sceAudioInOpenPort: 0x39B50DC1 + sceAudioInOpenPortForDiag: 0xC6962E84 sceAudioInReleasePort: 0x3A61B8C4 + sceAudioInSelectInput: 0xA0EB852F + sceAudioInSetMicGain: 0x0F34DD73 + sceAudioInSetMute: 0x1DFE7698 diff --git a/nids/360/SceBbmc.yml b/nids/360/SceBbmc.yml new file mode 100644 index 0000000..c92395e --- /dev/null +++ b/nids/360/SceBbmc.yml @@ -0,0 +1,84 @@ +modules: + SceBbmc: + nid: 0x858FDE3E + libraries: + SceBbmc: + nid: 0xEB0B15B7 + functions: + sceBbmcClearEvent: 0x8A586895 + sceBbmcDLGetSwdlError: 0xCF5593A1 + sceBbmcDLQAbort: 0xFD1B5B45 + sceBbmcDLQBackupEFSNV: 0x73E76F56 + sceBbmcDLQConfirmChangePartition: 0x1D381E0E + sceBbmcDLQDownloadSafeImage: 0x8E1E5AAF + sceBbmcDLQDownloadSlotImage: 0xB323A5C4 + sceBbmcDLQGetCurrentFwDone: 0x118CDC1C + sceBbmcDLQGetCurrentFwStart: 0x3BB8A8DE + sceBbmcDLQGetFwListDone: 0xBD2A2EA8 + sceBbmcDLQGetFwListStart: 0x55DE9889 + sceBbmcDLQRestoreEFSNV: 0x5A3CBF5D + sceBbmcDLUpdaterCheckComVersion: 0x5711AE28 + sceBbmcDLUpdaterContinue: 0xC10A5913 + sceBbmcDLUpdaterFin: 0x7CC2E683 + sceBbmcDLUpdaterGetArchiveVersion: 0xEE284EBE + sceBbmcDLUpdaterGetLatestArchiveVersion: 0x4564777A + sceBbmcDLUpdaterGetPkgId: 0xDCD146FD + sceBbmcDLUpdaterGetSequence: 0xBDD26F9D + sceBbmcDLUpdaterStart: 0xAF066666 + sceBbmcDebugOutString: 0x80E029FE + sceBbmcDebugSelectOutMedia: 0x72FADFFD + sceBbmcDepersonalizeCK: 0x63318445 + sceBbmcEnvelopeCmd: 0x768A8471 + sceBbmcFileRefreshResponse: 0x9537AAAE + sceBbmcGetCKStatus: 0xFFB454D9 + sceBbmcGetComFirmVersion: 0x4F76ACC2 + sceBbmcGetDriverInfo: 0xB888B51C + sceBbmcGetFailureInfo: 0x9831C17B + sceBbmcGetFileRefreshDetail: 0x8DE4A529 + sceBbmcGetIdStorageFrom3GModule: 0x924FD942 + sceBbmcGetNetworkInfo: 0x4BF09F40 + sceBbmcGetPinStatus: 0xE8CB543C + sceBbmcGetProactiveCmd: 0xC3910F00 + sceBbmcGpsCellGetLocationInfoDone: 0x98718027 + sceBbmcGpsCellGetLocationInfoStart: 0x5D5096F2 + sceBbmcIsAbleToRunUnderCurrentTemp: 0x1BC93FE5 + sceBbmcIsAbleToRunUnderCurrentVoltage: 0x197B5917 + sceBbmcIsPowerConfigForbiddenMode: 0xD31680C9 + sceBbmcNetGetRejectCause: 0xE794FCE6 + sceBbmcNetworkAttach: 0x7AC350C7 + sceBbmcNetworkScanAbort: 0xE9548598 + sceBbmcNetworkScanDone: 0xC4639A16 + sceBbmcNetworkScanStart: 0x061AFC8C + sceBbmcPacketGetCurrentBearerTech: 0xEAAEC538 + sceBbmcPacketGetLastCallEndReason: 0x794F5690 + sceBbmcPacketIfClearControlFlag: 0xBE889D60 + sceBbmcPacketIfGetControlFlag: 0xBF18905C + sceBbmcPacketIfSetControlFlag: 0xB9C53628 + sceBbmcPacketReleasePDPContext: 0xB63E07B2 + sceBbmcReadSimContentDone: 0xE8471E88 + sceBbmcReadSimContentStart: 0x4734B7EB + sceBbmcReserveOperationMode: 0x8DEDBFE9 + sceBbmcResumeSubscriberCallback: 0x53D836E6 + sceBbmcSMSGetListDone: 0x0A67866B + sceBbmcSMSGetListStart: 0x6669D937 + sceBbmcSMSReadAck: 0x3D366DF3 + sceBbmcSMSReadDone: 0x86A4ADE4 + sceBbmcSMSReadStart: 0x74172AD5 + sceBbmcSMSSend: 0xB2B9BE63 + sceBbmcSetLPMMode: 0xBCA35FC0 + sceBbmcSetupGetValueDone: 0x3776D173 + sceBbmcSetupGetValueStart: 0xC946287D + sceBbmcSetupSetValue: 0x265332ED + sceBbmcSimGetPLMNModeBit: 0x1F2BECDC + sceBbmcSubscribeFeatureId: 0xE13ACE9A + sceBbmcTerminalResponseCmd: 0xD878F761 + sceBbmcTurnOff: 0xEE731598 + sceBbmcTurnOn: 0xF1B7B34C + sceBbmcUnblockCK: 0xC70DF0B8 + sceBbmcUnblockPin: 0x1B1015D0 + sceBbmcUnsubscribeFeature: 0xD4C16C0A + sceBbmcUsbExtIfRead: 0x91EE6FAB + sceBbmcUsbExtIfStart: 0x4ACC9A83 + sceBbmcUsbExtIfStop: 0xF82F293A + sceBbmcUsbExtIfWrite: 0x4034E750 + sceBbmcVerifyPin: 0x057B2157 diff --git a/nids/360/SceCamera.yml b/nids/360/SceCamera.yml index 6b392f7..d409145 100644 --- a/nids/360/SceCamera.yml +++ b/nids/360/SceCamera.yml @@ -17,10 +17,13 @@ modules: sceCameraGetExposureCeiling: 0x5FA5B1BB sceCameraGetGain: 0x2C36D6F3 sceCameraGetISO: 0x4EBD5C68 + sceCameraGetImageQuality: 0xE2AC7BCE sceCameraGetNightmode: 0x12B6FF26 + sceCameraGetNoiseReduction: 0xFEB99ACC sceCameraGetReverse: 0x44F6043F sceCameraGetSaturation: 0x624F7653 sceCameraGetSharpness: 0xAA72C3DC + sceCameraGetSharpnessOff: 0x34CCAF85 sceCameraGetWhiteBalance: 0xDBFFA1DA sceCameraGetZoom: 0x06D3816C sceCameraIsActive: 0x103A75B8 @@ -36,11 +39,18 @@ modules: sceCameraSetExposureCeiling: 0x04F34BEE sceCameraSetGain: 0xE65CFE86 sceCameraSetISO: 0x3CF630A1 + sceCameraSetImageQuality: 0x75C4300B sceCameraSetNightmode: 0x3F26233E + sceCameraSetNoiseReduction: 0xF9B79556 sceCameraSetReverse: 0x1175F477 sceCameraSetSaturation: 0xF9F7CA3D sceCameraSetSharpness: 0xD1A5BB0B + sceCameraSetSharpnessOff: 0x4B5405C8 sceCameraSetWhiteBalance: 0x4D4514AC sceCameraSetZoom: 0xF7464216 sceCameraStart: 0xA8FEAE35 sceCameraStop: 0x1DD9C9CE + SceCameraForDriver: + nid: 0xBCBC1F4A + functions: + sceCameraIsActive: 0xEB1CC2CA diff --git a/nids/360/SceClockgen.yml b/nids/360/SceClockgen.yml new file mode 100644 index 0000000..5cee1c7 --- /dev/null +++ b/nids/360/SceClockgen.yml @@ -0,0 +1,8 @@ +modules: + SceClockgen: + nid: 0x1247DEBB + libraries: + SceClockgenForDriver: + nid: 0xFF160234 + functions: + sceClockgenWlanBtClkDisable: 0xB6F0A532 diff --git a/nids/360/SceCodecEngineWrapper.yml b/nids/360/SceCodecEngineWrapper.yml index 371e3d9..9b92d10 100644 --- a/nids/360/SceCodecEngineWrapper.yml +++ b/nids/360/SceCodecEngineWrapper.yml @@ -6,6 +6,18 @@ modules: nid: 0x5C9EE5B9 functions: _sceCodecEngineAllocMemoryFromUnmapMemBlock: 0x03DCBDCA + _sceCodecEngineChangeNumWorkerCores: 0x7E5E1F38 + _sceCodecEngineChangeNumWorkerCoresDefault: 0x362E9415 + _sceCodecEngineChangeNumWorkerCoresMax: 0x04BA9415 _sceCodecEngineCloseUnmapMemBlock: 0xAD30912D _sceCodecEngineFreeMemoryFromUnmapMemBlock: 0x489FF965 + _sceCodecEngineGetMemoryState: 0x1E9E5A79 + _sceCodecEngineGetNumRpcCalled: 0x9B157692 + _sceCodecEngineGetProcessorLoad: 0x241B194B _sceCodecEngineOpenUnmapMemBlock: 0xB0E654EE + _sceCodecEnginePmonGetProcessorLoad: 0x3EBA4982 + _sceCodecEnginePmonReset: 0xCA79BFC4 + _sceCodecEnginePmonStart: 0x6AF71F08 + _sceCodecEnginePmonStop: 0x04D5F36B + _sceCodecEngineResetNumRpcCalled: 0x8EFF2DAA + _sceCodecEngineSetClockFrequency: 0xDE5EF6CC diff --git a/nids/360/SceCoredump.yml b/nids/360/SceCoredump.yml index e4ad176..aa17b9c 100644 --- a/nids/360/SceCoredump.yml +++ b/nids/360/SceCoredump.yml @@ -7,6 +7,22 @@ modules: functions: sceCoredumpRegisterCoredumpHandler: 0x031DC61E sceCoredumpUnregisterCoredumpHandler: 0x6037A2C3 + SceCoredumpForDriver: + nid: 0xA351714A + functions: + sceCoredumpCafContextCreate: 0x2964AD0A + sceCoredumpCafContextDestroy: 0x95402BF3 + sceCoredumpCafCreateIv: 0xE1BCBE8F + sceCoredumpCafFinal: 0xC90F61AF + sceCoredumpCafHeaderFinal: 0x65AA4991 + sceCoredumpCafHeaderInit: 0x7C8120C5 + sceCoredumpCafHeaderTransform: 0xAE2C2793 + sceCoredumpCafInit: 0x9336009B + sceCoredumpCafSegmentFinal: 0xDF17420A + sceCoredumpCafSegmentInit: 0x07185515 + sceCoredumpCafSegmentTransform: 0xFB7AEBFE + sceCoredumpCreateDump: 0x0C10313F + sceCoredumpDeleteCrashReportCaf: 0xAD070837 SceCoredumpNounlink: nid: 0x2646E9D8 functions: diff --git a/nids/360/SceCtrl.yml b/nids/360/SceCtrl.yml index 0eab598..226366a 100644 --- a/nids/360/SceCtrl.yml +++ b/nids/360/SceCtrl.yml @@ -65,6 +65,7 @@ modules: sceCtrlSetBdRemoconConnected: 0xAA36F578 sceCtrlSetButtonEmulation: 0x1E750326 sceCtrlSetButtonIntercept: 0x06AA5E1A + sceCtrlSetCtrlpCallback: 0x7AD9467E sceCtrlSetIdleCancelKey: 0x0A679512 sceCtrlSetIdleCancelThreshold: 0x345E74FD sceCtrlSetRapidFire: 0xA248CDAE diff --git a/nids/360/SceDisplay.yml b/nids/360/SceDisplay.yml index c711c3d..7b00661 100644 --- a/nids/360/SceDisplay.yml +++ b/nids/360/SceDisplay.yml @@ -30,17 +30,19 @@ modules: nid: 0x9FED47AC functions: sceDisplayCaptureFrameBufDMAC: 0xF116D0B4 + sceDisplayCaptureFrameBufDMACInternal: 0x707EEE2E sceDisplayCaptureFrameBufIFTU: 0xB0CED8BC + sceDisplayCaptureFrameBufIFTUInternal: 0xD4C812E5 sceDisplayDisableHead: 0x43347565 sceDisplayEnableHead: 0x496032D6 sceDisplayGetActualViewportConf: 0x40ACFE51 sceDisplayGetDeviceType: 0x8D9A1CCE sceDisplayGetFrameBuf: 0xEEDA2E54 - sceDisplayGetFrameBufInfoForPid: 0x3BC165EF sceDisplayGetFrameBufInternal: 0x19F94C63 sceDisplayGetMaximumFrameBufResolution: 0x5AFE6CD3 sceDisplayGetOutputMode: 0xD2CED235 sceDisplayGetPrimaryHead: 0xC8E554C5 + sceDisplayGetProcFrameBufInternal: 0x3BC165EF sceDisplayGetRefreshRateInternal: 0x7911958E sceDisplayGetResolutionInfoInternal: 0xB3C6D647 sceDisplayGetVcountInternal: 0x8B5DA27B @@ -55,6 +57,7 @@ modules: sceDisplaySetInvertColors: 0x19140ACD sceDisplaySetMergeConf: 0x6B198052 sceDisplaySetOutputMode: 0xAF5EE5BE + sceDisplaySetOwner: 0xB54962A1 sceDisplaySetScaleConf: 0xEB390A76 sceDisplaySetViewportConf: 0xEE5EB52D sceDisplayUnregisterVblankStartCallback: 0x4B27191F diff --git a/nids/360/SceDriverUser.yml b/nids/360/SceDriverUser.yml new file mode 100644 index 0000000..1d95a43 --- /dev/null +++ b/nids/360/SceDriverUser.yml @@ -0,0 +1,20 @@ +modules: + SceDriverUser: + nid: 0xAD0AEA9A + libraries: + SceDrmBridgeUser: + nid: 0x91AFEB43 + functions: + _sceDrmBridgeGetCurrentSecureTick: 0x7C994327 + _sceDrmBridgeIsAllowRemotePlayDebug: 0x1F82FF68 + _sceDrmBridgeMlnpsnlAuth1: 0x7D0DB83F + _sceDrmBridgeMlnpsnlAuth2: 0x6471937D + SceErrorUser: + nid: 0xD401318D + functions: + sceErrorGetExternalString: 0xA4DE5B69 + sceErrorHistoryClearError: 0x7DF547D1 + sceErrorHistoryGetError: 0xB908B17F + sceErrorHistoryPostError: 0xBC416CFA + sceErrorHistorySetDefaultFormat: 0x395240A1 + sceErrorHistoryUpdateSequenceInfo: 0x1AA2E39E diff --git a/nids/360/SceError.yml b/nids/360/SceError.yml new file mode 100644 index 0000000..857711b --- /dev/null +++ b/nids/360/SceError.yml @@ -0,0 +1,13 @@ +modules: + SceError: + nid: 0x8713337B + libraries: + SceError: + nid: 0x5CD2CAD1 + functions: + _sceErrorGetExternalString: 0x85747003 + _sceErrorHistoryClearError: 0xC88F479E + _sceErrorHistoryGetError: 0xF16DF981 + _sceErrorHistoryPostError: 0x70F9D872 + _sceErrorHistorySetDefaultFormat: 0xB94DAA2F + _sceErrorHistoryUpdateSequenceInfo: 0x6FBE4BDC diff --git a/nids/360/SceFios2.yml b/nids/360/SceFios2.yml index 579e695..539c461 100644 --- a/nids/360/SceFios2.yml +++ b/nids/360/SceFios2.yml @@ -173,3 +173,16 @@ modules: sceFiosTimeIntervalToNanoseconds: 0x397BF626 sceFiosUpdateParameters: 0x1915052A sceFiosVprintf: 0x5BA4BD6D + SceFios2User: + nid: 0xC2ED82D7 + functions: + sceFiosOverlayAddForProcess02: 0x6C4BE9CD + sceFiosOverlayGetInfoForProcess02: 0xAB7B4213 + sceFiosOverlayGetList02: 0x1DD808D1 + sceFiosOverlayGetRecommendedScheduler02: 0xF5C1F928 + sceFiosOverlayModifyForProcess02: 0xCA388053 + sceFiosOverlayRemoveForProcess02: 0xE5D1B6F5 + sceFiosOverlayResolveSync02: 0x9C3AAAF0 + sceFiosOverlayResolveWithRangeSync02: 0x61C4AAC4 + sceFiosOverlayThreadIsDisabled02: 0x23B8DB1D + sceFiosOverlayThreadSetDisabled02: 0x70321220 diff --git a/nids/360/SceFios2Kernel.yml b/nids/360/SceFios2Kernel.yml new file mode 100644 index 0000000..5e36fce --- /dev/null +++ b/nids/360/SceFios2Kernel.yml @@ -0,0 +1,57 @@ +modules: + SceFios2Kernel: + nid: 0x10ECF2D0 + libraries: + SceFios2Kernel: + nid: 0x8757B742 + functions: + _sceFiosKernelOverlayAdd: 0x6DBCF0B2 + _sceFiosKernelOverlayAddForProcess: 0x2A381357 + _sceFiosKernelOverlayDHChstatSync: 0xF6A3E335 + _sceFiosKernelOverlayDHCloseSync: 0x021B4AF7 + _sceFiosKernelOverlayDHOpenSync: 0x5D6A1CCE + _sceFiosKernelOverlayDHReadSync: 0x2F06ADC6 + _sceFiosKernelOverlayDHStatSync: 0x759EBEE6 + _sceFiosKernelOverlayDHSyncSync: 0x2A9724C9 + _sceFiosKernelOverlayGetInfo: 0xF44F3505 + _sceFiosKernelOverlayGetInfoForProcess: 0xBC6B3CC5 + _sceFiosKernelOverlayGetList: 0x9379E2D5 + _sceFiosKernelOverlayGetRecommendedScheduler: 0xB02E0B26 + _sceFiosKernelOverlayModify: 0x6D6CDE05 + _sceFiosKernelOverlayModifyForProcess: 0x6DF2FC05 + _sceFiosKernelOverlayRemove: 0xB4927173 + _sceFiosKernelOverlayRemoveForProcess: 0xF8277E07 + _sceFiosKernelOverlayResolveSync: 0xE9AE60FB + _sceFiosKernelOverlayResolveWithRangeSync: 0x8CCA471A + _sceFiosKernelOverlayThreadIsDisabled: 0x629F4FE4 + _sceFiosKernelOverlayThreadSetDisabled: 0x3E9172EA + SceFios2Kernel02: + nid: 0xE83E40A6 + functions: + sceFiosKernelOverlayAddForProcess02: 0xB77C366D + sceFiosKernelOverlayGetInfoForProcess02: 0x111DCCFA + sceFiosKernelOverlayGetList02: 0xD90FC293 + sceFiosKernelOverlayGetRecommendedScheduler02: 0x26B9D08A + sceFiosKernelOverlayModifyForProcess02: 0x6A976528 + sceFiosKernelOverlayRemoveForProcess02: 0x50A7167C + sceFiosKernelOverlayResolveSync02: 0xD76F046A + sceFiosKernelOverlayResolveWithRangeSync02: 0x8DAD1FED + sceFiosKernelOverlayThreadIsDisabled02: 0xD6A4FDD6 + sceFiosKernelOverlayThreadSetDisabled02: 0x7F26D4DD + SceFios2KernelForDriver: + nid: 0x54D6B9EB + functions: + sceFiosKernelOverlayAdd: 0x2607EE4C + sceFiosKernelOverlayAddForProcess: 0x17E65A1C + sceFiosKernelOverlayGetInfo: 0x725E6817 + sceFiosKernelOverlayGetInfoForProcess: 0xF1762BC2 + sceFiosKernelOverlayGetList: 0xFF42AAF0 + sceFiosKernelOverlayGetRecommendedScheduler: 0x241BF0D6 + sceFiosKernelOverlayModify: 0x7F8B960C + sceFiosKernelOverlayModifyForProcess: 0x853EA82A + sceFiosKernelOverlayRemove: 0x2368FEB5 + sceFiosKernelOverlayRemoveForProcess: 0x23247EFB + sceFiosKernelOverlayResolveSync: 0x0F456345 + sceFiosKernelOverlayResolveWithRangeSync: 0xD3D968FC + sceFiosKernelOverlayThreadIsDisabled: 0xE71192C5 + sceFiosKernelOverlayThreadSetDisabled: 0x03727E5E diff --git a/nids/360/SceGps.yml b/nids/360/SceGps.yml new file mode 100644 index 0000000..a7d9629 --- /dev/null +++ b/nids/360/SceGps.yml @@ -0,0 +1,18 @@ +modules: + SceGps: + nid: 0x7ECD5642 + libraries: + SceGps: + nid: 0x0B6F33FE + functions: + _sceGpsClose: 0x73EE0ED1 + _sceGpsGetData: 0x9BAF9579 + _sceGpsGetDeviceInfo: 0x7F1DFADB + _sceGpsGetState: 0xB8001499 + _sceGpsIoctl: 0xB11E674D + _sceGpsIsDevice: 0x0EE1BC7B + _sceGpsOpen: 0x6EAC2C6D + _sceGpsResumeCallback: 0x0A4882B3 + _sceGpsSelectDevice: 0x2D4D8788 + _sceGpsStart: 0x2914F243 + _sceGpsStop: 0xE1ABB52D diff --git a/nids/360/SceGxm.yml b/nids/360/SceGxm.yml index bf74112..830a96c 100644 --- a/nids/360/SceGxm.yml +++ b/nids/360/SceGxm.yml @@ -68,7 +68,7 @@ modules: sceGxmGetPrecomputedDrawSize: 0x41BBD792 sceGxmGetPrecomputedFragmentStateSize: 0x85DE8506 sceGxmGetPrecomputedVertexStateSize: 0x9D83CA3B - sceGxmGetRenderTargetMemSizes: 0xB291C959 + sceGxmGetRenderTargetMemSize: 0xB291C959 sceGxmInitialize: 0xB0F1E4EC sceGxmIsDebugVersion: 0x873B07C0 sceGxmMapFragmentUsseMemory: 0x008402C6 @@ -213,7 +213,6 @@ modules: sceGxmSyncObjectCreate: 0x6A6013E1 sceGxmSyncObjectDestroy: 0x889AE88C sceGxmTerminate: 0xB627DE66 - sceGxmTextureGetAnisoMode: 0xDE9D5911 sceGxmTextureGetData: 0x5341BD46 sceGxmTextureGetFormat: 0xE868D2B3 sceGxmTextureGetGammaMode: 0xF23FCE81 @@ -224,12 +223,15 @@ modules: sceGxmTextureGetMinFilter: 0x920666C6 sceGxmTextureGetMipFilter: 0xCE94CA15 sceGxmTextureGetMipmapCount: 0xF7B7B1E4 + sceGxmTextureGetMipmapCountUnsafe: 0x4CC42929 sceGxmTextureGetNormalizeMode: 0x512BB86C sceGxmTextureGetPalette: 0x0D189C30 sceGxmTextureGetStride: 0xB0BD52F3 sceGxmTextureGetType: 0xF65D4917 sceGxmTextureGetUAddrMode: 0x2AE22788 + sceGxmTextureGetUAddrModeSafe: 0xC037DA83 sceGxmTextureGetVAddrMode: 0x46136CA9 + sceGxmTextureGetVAddrModeSafe: 0xD2F0D9C1 sceGxmTextureGetWidth: 0x126A3EB3 sceGxmTextureInitCube: 0x11DC8DC9 sceGxmTextureInitCubeArbitrary: 0xE3DF5E3B @@ -238,7 +240,6 @@ modules: sceGxmTextureInitSwizzled: 0xD572D547 sceGxmTextureInitSwizzledArbitrary: 0x5DBFBA2C sceGxmTextureInitTiled: 0xE6F0DB27 - sceGxmTextureSetAnisoMode: 0xE719CBD4 sceGxmTextureSetData: 0x855814C4 sceGxmTextureSetFormat: 0xFC943596 sceGxmTextureSetGammaMode: 0xA6D9F4DA @@ -253,7 +254,9 @@ modules: sceGxmTextureSetPalette: 0xDD6AABFA sceGxmTextureSetStride: 0x58D0EB0A sceGxmTextureSetUAddrMode: 0x4281763E + sceGxmTextureSetUAddrModeSafe: 0x8699ECF4 sceGxmTextureSetVAddrMode: 0x126CDAA3 + sceGxmTextureSetVAddrModeSafe: 0xFA22F6CC sceGxmTextureSetWidth: 0x2EA178BE sceGxmTextureValidate: 0x5331BED3 sceGxmTransferCopy: 0x62312BF8 @@ -266,3 +269,7 @@ modules: sceGxmVertexFence: 0xE05277D6 sceGxmVertexProgramGetProgram: 0xBC52320E sceGxmWaitEvent: 0x8BD94593 + SceGxmInternalForVsh: + nid: 0xC98AEB79 + functions: + sceGxmVshInitialize: 0xA04F5FAC diff --git a/nids/360/SceHid.yml b/nids/360/SceHid.yml index 5346e0f..7352cc9 100644 --- a/nids/360/SceHid.yml +++ b/nids/360/SceHid.yml @@ -5,7 +5,31 @@ modules: SceHid: nid: 0xE23FAD62 functions: + sceHidConsumerControlEnumerate: 0x160B334A + sceHidConsumerControlRead: 0x55F64676 + sceHidConsumerControlRegisterEnumHintCallback: 0xC54BDDB1 + sceHidConsumerControlRegisterReadHintCallback: 0x0D964502 + sceHidConsumerControlUnregisterEnumHintCallback: 0x5D836BC5 + sceHidConsumerControlUnregisterReadHintCallback: 0xB9E89914 + sceHidControllerEnumerate: 0x983AF9E8 + sceHidControllerRead: 0x792C1505 + sceHidControllerRegisterEnumHintCallback: 0x1E9B25E0 + sceHidControllerRegisterReadHintCallback: 0xBE5992CA + sceHidControllerUnregisterEnumHintCallback: 0x7E52ACF1 + sceHidControllerUnregisterReadHintCallback: 0x83B7B1D5 + sceHidKeyboardClear: 0x67C01C34 sceHidKeyboardEnumerate: 0x34BDFACE + sceHidKeyboardGetIntercept: 0xCDA9D24C + sceHidKeyboardPeek: 0x91F5D4BE sceHidKeyboardRead: 0x224A8AD8 + sceHidKeyboardRegisterEnumHintCallback: 0x743A066F + sceHidKeyboardRegisterReadHintCallback: 0x1C740A7A + sceHidKeyboardSetIntercept: 0x5D727742 + sceHidKeyboardUnregisterEnumHintCallback: 0x8068D61E + sceHidKeyboardUnregisterReadHintCallback: 0xF73C5FBA sceHidMouseEnumerate: 0x2A0D2F54 sceHidMouseRead: 0xBDECBDC0 + sceHidMouseRegisterEnumHintCallback: 0xC9E35B47 + sceHidMouseRegisterReadHintCallback: 0x90C5CB0A + sceHidMouseUnregisterEnumHintCallback: 0x3E005E5B + sceHidMouseUnregisterReadHintCallback: 0xAC591B15 diff --git a/nids/360/SceIdStorage.yml b/nids/360/SceIdStorage.yml index ade425d..627cc5c 100644 --- a/nids/360/SceIdStorage.yml +++ b/nids/360/SceIdStorage.yml @@ -8,6 +8,7 @@ modules: sceIdStorageCreateAtomicLeaves: 0x99ACCB71 sceIdStorageCreateLeaf: 0x08A471A6 sceIdStorageDeleteLeaf: 0x2C97AB36 + sceIdStorageEnumId: 0x31E08AFB sceIdStorageFlush: 0x3AD32523 sceIdStorageFormat: 0x958089DB sceIdStorageGetFreeLeaves: 0x37833CB8 diff --git a/nids/360/SceIncomingDialog.yml b/nids/360/SceIncomingDialog.yml new file mode 100644 index 0000000..7b50553 --- /dev/null +++ b/nids/360/SceIncomingDialog.yml @@ -0,0 +1,13 @@ +modules: + SceIncomingDialog: + nid: 0xC3E0DAF2 + libraries: + SceIncomingDialog: + nid: 0x5058F4AB + functions: + sceIncomingDialogClose: 0x126BD15E + sceIncomingDialogGetStatus: 0x839DE14C + sceIncomingDialogInit: 0x18AF99EB + sceIncomingDialogOpen: 0x2BEDC1A0 + sceIncomingDialogSwitchToDialog: 0x0123B83A + sceIncomingDialogTerm: 0x860B1885 diff --git a/nids/360/SceIofilemgr.yml b/nids/360/SceIofilemgr.yml index 7e29031..590706e 100644 --- a/nids/360/SceIofilemgr.yml +++ b/nids/360/SceIofilemgr.yml @@ -5,15 +5,53 @@ modules: SceIofilemgr: nid: 0xF2FF276E functions: + _sceIoChstat: 0xD2EE455F + _sceIoChstatAsync: 0xB4B021D9 + _sceIoChstatByFd: 0xE0BE2A30 + _sceIoCompleteMultiple: 0x9111D004 + _sceIoDevctl: 0x515AC017 + _sceIoDevctlAsync: 0x3EE3F66E + _sceIoDopen: 0xE6E614B5 + _sceIoDread: 0x8713D662 + _sceIoGetstat: 0x8E7E11F2 + _sceIoGetstatAsync: 0xD414C89F + _sceIoGetstatByFd: 0xE6C53567 + _sceIoIoctl: 0x1D2988F1 + _sceIoIoctlAsync: 0xE00DC256 + _sceIoLseek: 0xA604764A + _sceIoLseekAsync: 0x2300858E + _sceIoMkdir: 0x8F1ACC32 + _sceIoMkdirAsync: 0xF5C58B21 + _sceIoOpen: 0xCC67B6FD + _sceIoOpenAsync: 0x09CD0FC8 + _sceIoPread: 0x539FD5C4 + _sceIoPreadAsync: 0xBCF5684D + _sceIoPwrite: 0x9654094B + _sceIoPwriteAsync: 0xB2D0B2F4 + _sceIoRemove: 0x78955C65 + _sceIoRemoveAsync: 0x5FFA47E2 + _sceIoRename: 0x4912F748 + _sceIoRenameAsync: 0x81794921 + _sceIoRmdir: 0xFFFB4D76 + _sceIoRmdirAsync: 0x13DC3244 + _sceIoSync: 0x5DD867F7 + _sceIoSyncAsync: 0x86DB0C0E sceIoCancel: 0xCEF48835 + sceIoChstatByFdAsync: 0xA9F89275 sceIoClose: 0xC70B8886 sceIoCloseAsync: 0x8EA3616A sceIoComplete: 0xD1C49D2F sceIoDclose: 0x422A221A + sceIoDcloseAsync: 0xDC2D7D38 + sceIoDopenAsync: 0xC49C312F + sceIoDreadAsync: 0xF59F37B0 sceIoFlockForSystem: 0x3E98E422 sceIoGetPriority: 0xF2A472A1 + sceIoGetPriorityForSystem: 0xEF5432ED sceIoGetProcessDefaultPriority: 0x0DC4F1BB sceIoGetThreadDefaultPriority: 0xA176CD03 + sceIoGetThreadDefaultPriorityForSystem: 0xFCBCEAED + sceIoGetstatByFdAsync: 0x5167AC1E sceIoLseek32: 0x49252B9B sceIoRead: 0xFDB32293 sceIoReadAsync: 0x773EBD45 @@ -31,39 +69,96 @@ modules: functions: sceIoCancel: 0x6D59658D sceIoChstat: 0x7D42B8DC + sceIoChstat2: 0x1F98BD50 + sceIoChstatAsync: 0x7EC442BF sceIoChstatByFd: 0xDF57A75F + sceIoChstatByFdAsync: 0xEC974400 sceIoClearErrorEvent: 0x40B933C7 sceIoClose: 0xF99DD8A3 sceIoCloseAsync: 0x11C57CC6 sceIoCreateErrorEvent: 0x3C0343DB sceIoCreateMountEvent: 0x2DFA192F sceIoDclose: 0x19C81DD6 + sceIoDcloseAsync: 0xC08F199F sceIoDeleteErrorEvent: 0xC6158F8D sceIoDeleteMountEvent: 0x43DB0AE4 sceIoDevctl: 0x16882FC4 + sceIoDevctlAsync: 0xA9302946 sceIoDopen: 0x463B25CC + sceIoDopenAsync: 0x72F06BDE sceIoDread: 0x20CF5FC7 + sceIoDread2: 0x03051B02 + sceIoDreadAsync: 0x5982B0E3 sceIoFlock: 0x16336A0D + sceIoGetMediaType: 0x9C220246 sceIoGetProcessDefaultPriorityForSystem: 0xCE397158 sceIoGetstat: 0x75C96D25 + sceIoGetstat2: 0xD6503624 + sceIoGetstatAsync: 0x94A5304A sceIoGetstatByFd: 0x462F059B + sceIoGetstatByFdAsync: 0x0FEE1238 + sceIoIoctl: 0x161CD33F + sceIoIoctlAsync: 0xB761E91B sceIoLseek: 0x62090481 sceIoLseekAsync: 0x541BAABD sceIoMkdir: 0x7F710B25 + sceIoMkdirAsync: 0x27003443 sceIoMount: 0xD070BC48 sceIoOpen: 0x75192972 sceIoOpenAsync: 0x451001DE + sceIoOpenForPid: 0xC3D34965 sceIoPread: 0x2A17515D + sceIoPreadAsync: 0x64A46A2C sceIoPwrite: 0x5F1512C8 + sceIoPwriteAsync: 0x202CDDE3 sceIoRead: 0xE17EFC03 sceIoReadAsync: 0x69047C81 sceIoRemove: 0x0D7BB3E1 + sceIoRemoveAsync: 0xF9D6507D sceIoRename: 0xDC0C4997 + sceIoRenameAsync: 0xAACBC47A sceIoRmdir: 0x1CC9C634 + sceIoRmdirAsync: 0xF5B0B36C + sceIoSetPathMappingFunction: 0xCFAECF18 sceIoSetProcessDefaultPriorityForSystem: 0xABE65071 sceIoSync: 0xDDF78594 + sceIoSyncAsync: 0x4F9EA8B0 sceIoSyncByFd: 0x338DCD68 + sceIoSyncByFd2: 0x43170575 sceIoSyncByFdAsync: 0x041209CF sceIoUmount: 0x20574100 sceIoWrite: 0x21EE91F0 sceIoWriteAsync: 0xA1BD13D0 + scePfsMgrVfsMount: 0xFEEE44A9 + scePfsMgrVfsUmount: 0xD220539D + sceVfsAddVfs: 0x673D2FCD + sceVfsDeleteVfs: 0x9CBFA725 + sceVfsFreeVnode: 0x21D57633 + sceVfsGetNewNode: 0xD60B5C63 + sceVfsMount: 0xB62DE9A6 + sceVfsNodeSetEventFlag: 0x6048F245 + sceVfsNodeWaitEventFlag: 0xAA45010B + sceVfsOpDecodePathElem: 0xF7DAC0F5 + sceVfsOpDevctl: 0xB07B307D + sceVfsUnmount: 0x9C7E7B76 + sceVopChstat: 0x1974FA92 + sceVopClose: 0x40944C2E + sceVopCreate: 0x9E347C7D + sceVopDclose: 0x1350F5C7 + sceVopDopen: 0x00C9C2DD + sceVopDread: 0x77584C8F + sceVopGetstat: 0x50A63ACF + sceVopInactive: 0x8FB94521 + sceVopIoctl: 0x333C904D + sceVopLseek: 0xB2B13818 + sceVopMkdir: 0x2F3F8C70 + sceVopOpen: 0x76B79BEC + sceVopPread: 0xABBC80E3 + sceVopPwrite: 0xA53C040D + sceVopRead: 0x570388A5 + sceVopRename: 0x36A794C7 + sceVopRmdir: 0x1D551105 + sceVopSync: 0x9CD96406 + sceVopWrite: 0x9A68378D + vfsLockMnt: 0x6B3CA9F7 + vfsUnlockMnt: 0xDC2D8BCE diff --git a/nids/360/SceJpegArm.yml b/nids/360/SceJpegArm.yml new file mode 100644 index 0000000..235f5c4 --- /dev/null +++ b/nids/360/SceJpegArm.yml @@ -0,0 +1,13 @@ +modules: + SceJpegArm: + nid: 0xC3ACF942 + libraries: + SceJpegArm: + nid: 0x19F04693 + functions: + sceJpegArmCreateSplitDecoder: 0x9DA48DB6 + sceJpegArmDecodeMJpeg: 0xA4ABFCE3 + sceJpegArmDecodeMJpegYCbCr: 0xE9B1B86F + sceJpegArmDeleteSplitDecoder: 0xE9CB3DFD + sceJpegArmGetOutputInfo: 0x23AE3BEA + sceJpegArmSplitDecodeMJpeg: 0x5D83C606 diff --git a/nids/360/SceKernelDmacMgr.yml b/nids/360/SceKernelDmacMgr.yml index 904f303..ee8e307 100644 --- a/nids/360/SceKernelDmacMgr.yml +++ b/nids/360/SceKernelDmacMgr.yml @@ -12,3 +12,14 @@ modules: functions: sceDmacMemcpy: 0x00896B11 sceDmacMemset: 0x4BAC049B + sceKernelDmaOpAlloc: 0x7CD5088A + sceKernelDmaOpAssign: 0xFCE4171A + sceKernelDmaOpConcatenate: 0xA4454DEA + sceKernelDmaOpDeQueue: 0x7433F70F + sceKernelDmaOpEnQueue: 0x543F54CF + sceKernelDmaOpFree: 0xADFF1186 + sceKernelDmaOpQuit: 0x03052D0D + sceKernelDmaOpSetCallback: 0xCF627CFD + sceKernelDmaOpSetupChain: 0x167079FC + sceKernelDmaOpSetupDirect: 0x01A599E0 + sceKernelDmaOpSync: 0x397A917C diff --git a/nids/360/SceKernelIntrMgr.yml b/nids/360/SceKernelIntrMgr.yml index 61fe5fe..1762514 100644 --- a/nids/360/SceKernelIntrMgr.yml +++ b/nids/360/SceKernelIntrMgr.yml @@ -13,14 +13,24 @@ modules: sceKernelGetIntrTarget: 0x353CFAAE sceKernelIsIntrAllowedInCurrentContext: 0x182EE3E3 sceKernelIsIntrPending: 0xA269003D + sceKernelIsSubInterruptOccurred: 0x950B864B sceKernelMaskIntr: 0x180435EC sceKernelRegisterIntrHandler: 0x5C1FEB29 + sceKernelRegisterIntrHookHandler: 0x99048AEC sceKernelRegisterSubIntrHandler: 0x96576C18 sceKernelReleaseIntrHandler: 0xD6009B98 + sceKernelReleaseIntrHookHandler: 0xA0B7F44E sceKernelReleaseSubIntrHandler: 0x7B9657B3 + sceKernelResumeIntr: 0xA4C772AF + sceKernelResumeSubIntr: 0x957023D0 sceKernelSetIntrMasked: 0x7117E827 sceKernelSetIntrPriority: 0x71020E29 sceKernelSetIntrTarget: 0x973BACCC + sceKernelSuspendSubIntr: 0x3A9EA7D1 sceKernelTriggerSGI: 0x29F62500 sceKernelTriggerSubIntr: 0xCC94B294 sceKernelUnmaskIntr: 0x7117E827 + SceIntrmgrForKernel: + nid: 0x07AC5E3A + functions: + sceKernelQueryIntrHandlerInfo: 0xB5AFAE49 diff --git a/nids/360/SceKernelModulemgr.yml b/nids/360/SceKernelModulemgr.yml index 94d24e6..058cd5e 100644 --- a/nids/360/SceKernelModulemgr.yml +++ b/nids/360/SceKernelModulemgr.yml @@ -2,9 +2,25 @@ modules: SceKernelModulemgr: nid: 0x726C6635 libraries: + SceBacktrace: + nid: 0xB07B6A3F + functions: + _sceKernelBacktrace: 0xBF371A98 + SceBacktraceForDriver: + nid: 0x77CB3DD6 + functions: + sceKernelBacktrace: 0x166B9C8C SceModulemgr: nid: 0xEAED1616 functions: + _sceKernelCloseModule: 0x849E78BE + _sceKernelLoadModule: 0xB4C5EF9E + _sceKernelLoadStartModule: 0x60647592 + _sceKernelOpenModule: 0x9D674F45 + _sceKernelStartModule: 0x72CD301F + _sceKernelStopModule: 0x086867A8 + _sceKernelStopUnloadModule: 0x86EAEA0A + _sceKernelUnloadModule: 0x8E4A7716 sceKernelGetAllowedSdkVersionOnSystem: 0x4397FC4E sceKernelGetLibraryInfoByNID: 0xEAEB1312 sceKernelGetModuleIdByAddr: 0xF5798C7C @@ -16,26 +32,48 @@ modules: SceModulemgrForDriver: nid: 0xD4A60A52 functions: + sceKernelGetModuleInfoByAddr: 0x1D9E0F7E sceKernelGetSystemSwVersion: 0x5182E212 sceKernelLoadModule: 0x86D8D634 sceKernelLoadStartModule: 0x189BFBBB sceKernelLoadStartModuleForPid: 0x9D953C22 sceKernelLoadStartSharedModuleForPid: 0xE2ADEF8D + sceKernelRegisterLibary: 0x861638AD + sceKernelReleaseLibary: 0x0975B104 sceKernelSearchModuleByName: 0xBBE1771C sceKernelStartModule: 0x0675B682 sceKernelStopModule: 0x100DAEB9 sceKernelStopUnloadModule: 0x03B30B7E sceKernelStopUnloadModuleForPid: 0x49A3EDC7 + sceKernelStopUnloadSharedModuleForPid: 0x02D3D0C1 sceKernelUnloadModule: 0x728E72A6 SceModulemgrForKernel: nid: 0xC445FA63 functions: + sceKernelFinalizeKbl: 0xFDD7F646 + sceKernelGetModuleIdByAddr: 0x0053BA4A sceKernelGetModuleInfo: 0xD269F915 + sceKernelGetModuleInfoMinByAddr: 0x8309E043 sceKernelGetModuleInternal: 0xFE303863 + sceKernelGetModuleLibExportList: 0xD4BF409C + sceKernelGetModuleLibraryInfo: 0x6A655255 sceKernelGetModuleList: 0x97CF7B4E + sceKernelGetModuleList2: 0x410E1D2E + sceKernelGetModulePath: 0x779A1025 + sceKernelGetModuleUid: 0x3B93CF88 + sceKernelGetModuleUidList: 0x1FDEAE16 + sceKernelGetProcessMainModule: 0x20A27FA9 sceKernelLoadModuleForPid: 0xFA21D8CB + sceKernelLoadPreloadingModules: 0x3AD26B43 + sceKernelLoadProcessImage: 0xAC4EABDB + sceKernelLoadPtLoadSegForFwloader: 0x448810D5 + sceKernelModuleUnloadMySelf: 0x2A69385E sceKernelMountBootfs: 0x01360661 + sceKernelRegisterSyscall: 0xB427025E + sceKernelSetupForModulemgr: 0x3382952B sceKernelStartModuleForPid: 0x6DF745D5 + sceKernelStartPreloadingModules: 0x432DCC7A sceKernelStopModuleForPid: 0x7BB4CE54 sceKernelUmountBootfs: 0x9C838A6B sceKernelUnloadModuleForPid: 0x5972E2CC + sceKernelUnloadProcessModules: 0x0E33258E diff --git a/nids/360/SceKernelThreadMgr.yml b/nids/360/SceKernelThreadMgr.yml index 0bb6be1..e33c75a 100644 --- a/nids/360/SceKernelThreadMgr.yml +++ b/nids/360/SceKernelThreadMgr.yml @@ -2,28 +2,100 @@ modules: SceKernelThreadMgr: nid: 0xF46ED7B2 libraries: - SceCpu: - nid: 0x45265161 - SceDebugLed: - nid: 0xAE004C0A - functions: - sceKernelGetGPI: 0x14F582CF - sceKernelSetGPO: 0x78E702D3 - SceDipsw: - nid: 0xB36D5922 - functions: - sceKernelCheckDipsw: 0x1C783FB2 - sceKernelClearDipsw: 0x800EDCC1 - sceKernelSetDipsw: 0x817053D4 - SceDipswForDriver: - nid: 0xC9E26388 - functions: - sceKernelCheckDipsw: 0xA98FC2FD - sceKernelClearDipsw: 0xF1F3E9FE - sceKernelSetDipsw: 0x82E45FBF SceThreadmgr: nid: 0x859A24B1 functions: + __sceKernelCreateLwMutex: 0x4BB3154A + _sceKernelCancelEvent: 0x29483405 + _sceKernelCancelEventFlag: 0xF76F3056 + _sceKernelCancelEventWithSetPattern: 0x8E68E870 + _sceKernelCancelMsgPipe: 0xCE769C83 + _sceKernelCancelMutex: 0x1B74CB89 + _sceKernelCancelRWLock: 0xD004EA15 + _sceKernelCancelSema: 0x1CAF805D + _sceKernelCancelTimer: 0x13117B21 + _sceKernelCreateCond: 0xCC14FA59 + _sceKernelCreateEventFlag: 0x38AA5E8E + _sceKernelCreateLwCond: 0x940B9EBE + _sceKernelCreateMsgPipeWithLR: 0x2AAC8BFD + _sceKernelCreateMutex: 0x92667AE5 + _sceKernelCreateRWLock: 0xB1877F5E + _sceKernelCreateSema: 0x0D76458E + _sceKernelCreateSema_16XX: 0xBD06F27C + _sceKernelCreateSimpleEvent: 0x9C187FAD + _sceKernelCreateTimer: 0x79BA0A6D + _sceKernelDeleteLwCond: 0x75FCF058 + _sceKernelDeleteLwMutex: 0x91262C5F + _sceKernelExitCallback: 0x2682E6ED + _sceKernelGetCallbackInfo: 0x86761234 + _sceKernelGetCondInfo: 0x05C51CE1 + _sceKernelGetEventFlagInfo: 0x106C216F + _sceKernelGetEventInfo: 0xB395BBF1 + _sceKernelGetEventPattern: 0x70358258 + _sceKernelGetLwCondInfo: 0x6C79F2F2 + _sceKernelGetLwCondInfoById: 0xD9E78D30 + _sceKernelGetLwMutexInfoById: 0xFEC9E946 + _sceKernelGetMsgPipeInfo: 0x7AE31060 + _sceKernelGetMutexInfo: 0xE8CC3DF0 + _sceKernelGetRWLockInfo: 0x8CE3AFC7 + _sceKernelGetSemaInfo: 0x0402C633 + _sceKernelGetSystemInfo: 0x80544E0C + _sceKernelGetSystemTime: 0xB70EBAE9 + _sceKernelGetThreadContextForVM: 0x377094D5 + _sceKernelGetThreadCpuAffinityMask: 0x212E6C35 + _sceKernelGetThreadEventInfo: 0x5DE0B7E9 + _sceKernelGetThreadExitStatus: 0xD3210C08 + _sceKernelGetThreadInfo: 0xB373D8A1 + _sceKernelGetThreadRunStatus: 0xC7FB5497 + _sceKernelGetTimerBase: 0x865DA482 + _sceKernelGetTimerEventRemainingTime: 0x215FD24D + _sceKernelGetTimerInfo: 0xAC7FE4F3 + _sceKernelGetTimerTime: 0x6F2C41BA + _sceKernelLockLwMutex: 0x9C572180 + _sceKernelLockMutex: 0x7FA945AD + _sceKernelLockMutexCB: 0xDB9F5333 + _sceKernelLockReadRWLock: 0x7EB9E8B5 + _sceKernelLockReadRWLockCB: 0x5D86D763 + _sceKernelLockWriteRWLock: 0x80191FAA + _sceKernelLockWriteRWLockCB: 0xDBD09B09 + _sceKernelPMonThreadGetCounter: 0x6B9711AC + _sceKernelPollEvent: 0x21C7913E + _sceKernelPollEventFlag: 0xDAB1B1C8 + _sceKernelPulseEventWithNotifyCallback: 0x3E49D3F1 + _sceKernelReceiveMsgPipeVector: 0x3DD9E4AB + _sceKernelReceiveMsgPipeVectorCB: 0x4DBF648E + _sceKernelRegisterThreadEventHandler: 0xCE6B49D8 + _sceKernelSendMsgPipeVector: 0x5E65E454 + _sceKernelSendMsgPipeVectorCB: 0xF6D515DC + _sceKernelSetEventWithNotifyCallback: 0x118F646E + _sceKernelSetThreadContextForVM: 0xD4785C41 + _sceKernelSetTimerEvent: 0xE2C0BFEF + _sceKernelSetTimerTime: 0xFF738CD9 + _sceKernelSignalLwCond: 0xC37F6983 + _sceKernelSignalLwCondAll: 0x07D2584A + _sceKernelSignalLwCondTo: 0x6F1A4A2E + _sceKernelStartThread: 0xC30B1745 + _sceKernelTryReceiveMsgPipeVector: 0x03CFCF00 + _sceKernelTrySendMsgPipeVector: 0xB3D600AB + _sceKernelUnlockLwMutex: 0x2ABC41DF + _sceKernelWaitCond: 0x040795C7 + _sceKernelWaitCondCB: 0x452B0AB3 + _sceKernelWaitEvent: 0x4E0EA70D + _sceKernelWaitEventCB: 0x7D483C33 + _sceKernelWaitEventFlag: 0xFCE2F728 + _sceKernelWaitEventFlagCB: 0x401E0C68 + _sceKernelWaitException: 0x6F7C4DE6 + _sceKernelWaitExceptionCB: 0x5E7876F2 + _sceKernelWaitLwCond: 0x18C65756 + _sceKernelWaitLwCondCB: 0x72DBB96B + _sceKernelWaitMultipleEvents: 0x200CC503 + _sceKernelWaitMultipleEventsCB: 0x0558B7C1 + _sceKernelWaitSema: 0x45389B6B + _sceKernelWaitSemaCB: 0xF8E06784 + _sceKernelWaitSignal: 0x50407BF4 + _sceKernelWaitSignalCB: 0xCEA3FC52 + _sceKernelWaitThreadEnd: 0xEA5C52F5 + _sceKernelWaitThreadEndCB: 0xFA3D4491 sceKernelCancelCallback: 0x30741EF2 sceKernelChangeActiveCpuMask: 0x001173F8 sceKernelChangeThreadCpuAffinityMask: 0x15129174 @@ -38,6 +110,7 @@ modules: sceKernelCloseEventFlag: 0x9A68F547 sceKernelCloseMsgPipe: 0x1305A065 sceKernelCloseMutex: 0x03E23AF6 + sceKernelCloseMutex_089: 0xA35427EE sceKernelCloseRWLock: 0xFD5BD5C1 sceKernelCloseSema: 0xA2D81F9E sceKernelCloseSimpleEvent: 0xFEF4CA53 @@ -63,6 +136,7 @@ modules: sceKernelGetMsgPipeCreatorId: 0x70E2A6D2 sceKernelGetProcessId: 0x9DCB4B7A sceKernelGetSystemTimeWide: 0xF4EE4FA9 + sceKernelGetThreadCpuAffinityMask: 0xF1AE5654 sceKernelGetThreadStackFreeSize: 0x4F8A3DA0 sceKernelGetThreadTLSAddr: 0xBACA6891 sceKernelGetThreadmgrUIDClass: 0xC9678F7F @@ -73,6 +147,7 @@ modules: sceKernelOpenEventFlag: 0xBC19F8A1 sceKernelOpenMsgPipe: 0x0E1CB9F6 sceKernelOpenMutex: 0x52E17182 + sceKernelOpenMutex_089: 0x2928D2EC sceKernelOpenRWLock: 0xCE510196 sceKernelOpenSema: 0xCBE235C7 sceKernelOpenSimpleEvent: 0x4E1E4DF8 @@ -80,6 +155,7 @@ modules: sceKernelPollSema: 0x866EF048 sceKernelPulseEvent: 0x8D27BAD6 sceKernelRegisterCallbackToEvent: 0x76FB37E9 + sceKernelResumeThreadForVM: 0x7EB55DAC sceKernelSendSignal: 0xD4C367B2 sceKernelSetEvent: 0x324218CD sceKernelSetEventFlag: 0xEC94DFF7 @@ -90,6 +166,7 @@ modules: sceKernelSignalSema: 0xE6B761D1 sceKernelStartTimer: 0x48091E0C sceKernelStopTimer: 0x869E9F20 + sceKernelSuspendThreadForVM: 0x1FF5960D sceKernelTryLockMutex: 0x72FC1F54 sceKernelTryLockReadRWLock: 0xEFDDA456 sceKernelTryLockWriteRWLock: 0x206CBB66 @@ -98,6 +175,9 @@ modules: sceKernelUnlockWriteRWLock: 0xB4151397 sceKernelUnregisterCallbackFromEvent: 0x18462B11 sceKernelUnregisterCallbackFromEventAll: 0x888A7361 + sceKernelUnregisterThreadEventHandler: 0x2C8ED6F0 + sceKernelWaitThreadEndCB_089: 0x0373C5E3 + sceKernelWaitThreadEnd_089: 0xF3489EF4 SceThreadmgrCoredumpTime: nid: 0x5E8D0E22 functions: @@ -106,8 +186,12 @@ modules: nid: 0xE2C40624 functions: sceKernelCancelCallback: 0xC040EC1C + sceKernelCancelMsgPipe: 0x9D6A2311 sceKernelCancelMutex: 0x7204B846 + sceKernelChangeCurrentThreadAttr: 0x751C9B7A + sceKernelChangeThreadCpuAffinityMask: 0x6D0733A8 sceKernelChangeThreadPriority: 0x63DAB420 + sceKernelChangeThreadSuspendStatus: 0x04C6764B sceKernelCheckCallback: 0xE53E41F6 sceKernelCheckWaitableStatus: 0xD9BD74EB sceKernelClearEvent: 0x9C335818 @@ -115,6 +199,7 @@ modules: sceKernelCreateCallback: 0x1C41614C sceKernelCreateCond: 0xDB6CD34A sceKernelCreateEventFlag: 0x4336BAA4 + sceKernelCreateMsgPipe: 0xBF631145 sceKernelCreateMutex: 0xFBAA026E sceKernelCreateSema: 0x30E93C31 sceKernelCreateSimpleEvent: 0x357A8177 @@ -124,19 +209,28 @@ modules: sceKernelDeleteCallback: 0x3A7E17F6 sceKernelDeleteCond: 0xAEE0D27C sceKernelDeleteEventFlag: 0x71ECB352 - sceKernelDeleteFastMutex: 0x11FE84A1 + sceKernelDeleteMsgPipe: 0xB3453F88 sceKernelDeleteMutex: 0x0A912340 sceKernelDeleteSema: 0x16A35E58 sceKernelDeleteThread: 0xAC834F3F + sceKernelEnqueueWorkQueue: 0xE50E1185 sceKernelExitDeleteThread: 0x1D17DECF sceKernelExitThread: 0x0C8A38E1 + sceKernelFinalizeFastMutex: 0x11FE84A1 sceKernelGetCallbackCount: 0x0892D8DF + sceKernelGetFastMutexInfo: 0xD7AF2E58 + sceKernelGetFastMutexInfoById: 0xAF302193 + sceKernelGetMutexInfo: 0x69B78A12 sceKernelGetProcessId: 0x9DCB4B7A + sceKernelGetProcessIdFromTLS: 0xFA54D49A sceKernelGetSystemTimeLow: 0x47F6DE49 sceKernelGetSystemTimeWide: 0xF4EE4FA9 sceKernelGetThreadCpuAffinityMask: 0x83DC703D + sceKernelGetThreadCpuRegisters: 0x5022689D sceKernelGetThreadCurrentPriority: 0x01414F0B sceKernelGetThreadId: 0x59D06540 + sceKernelGetThreadIdList: 0xEA7B8AEF + sceKernelGetThreadInfo: 0x283807E2 sceKernelGetThreadStackFreeSize: 0x7B278A0B sceKernelGetThreadTLSAddr: 0x66EEA46A sceKernelGetThreadmgrUIDClass: 0x0A20775A @@ -145,13 +239,18 @@ modules: sceKernelInitializeFastMutex: 0xAF8E1266 sceKernelLockFastMutex: 0x70627F3A sceKernelLockMutex: 0x16AC80C5 + sceKernelLockMutexCB_089: 0xD06F2886 sceKernelNotifyCallback: 0xC3E00919 sceKernelPollEventFlag: 0x76C6555B sceKernelPollSema: 0x4FDDFE24 sceKernelPulseEvent: 0x2427C81B sceKernelPulseEventWithNotifyCallback: 0x714A107A + sceKernelReceiveMsgPipeVector: 0xDA1F256B + sceKernelReceiveMsgPipeVectorCB: 0xDA5C9AC6 sceKernelRegisterCallbackToEvent: 0x832A7E0C + sceKernelRegisterTimer: 0xC58DF384 sceKernelRunWithStack: 0xE54FD746 + sceKernelSendMsgPipeVector: 0x67DD3BAD sceKernelSetEvent: 0x9EA3A45C sceKernelSetEventFlag: 0xD4780C3E sceKernelSetPermission: 0x02EEDF17 @@ -164,9 +263,12 @@ modules: sceKernelStartThread: 0x21F5419B sceKernelStartTimer: 0x84C4CE4D sceKernelStopTimer: 0x474F214B + sceKernelTryLockFastMutex: 0x741F4707 sceKernelTryLockMutex: 0x270993A6 sceKernelTryLockReadRWLock: 0xFC2B5A50 sceKernelTryLockWriteRWLock: 0xA96F2E5A + sceKernelTryReceiveMsgPipeVector: 0xCE09221A + sceKernelTrySendMsgPipeVector: 0x4CF1BE58 sceKernelUnlockFastMutex: 0xDB395782 sceKernelUnlockMutex: 0x1E82E5D0 sceKernelUnlockReadRWLock: 0xDE1B9EEE diff --git a/nids/360/SceLcd.yml b/nids/360/SceLcd.yml new file mode 100644 index 0000000..1d45550 --- /dev/null +++ b/nids/360/SceLcd.yml @@ -0,0 +1,15 @@ +modules: + SceLcd: + nid: 0x32FDD1BB + libraries: + SceLcdForDriver: + nid: 0xFA916D71 + functions: + sceLcdDisplayOff: 0x1A0A7519 + sceLcdDisplayOn: 0x5F4124AB + sceLcdGetBrightness: 0x3A6D6AC3 + sceLcdGetDDB: 0xE03E120B + sceLcdGetDisplayColorSpaceMode: 0x17F66722 + sceLcdSetBrightness: 0x581D3A87 + sceLcdSetDisplayColorSpaceMode: 0xD40968FB + sceLcdWaitReady: 0x0C7E03D8 diff --git a/nids/360/SceLibKernel.yml b/nids/360/SceLibKernel.yml index 6298d20..37074d2 100644 --- a/nids/360/SceLibKernel.yml +++ b/nids/360/SceLibKernel.yml @@ -5,11 +5,9 @@ modules: SceLibKernel: nid: 0xCAE9ACE6 functions: - SceKernelStackChkGuard: 0x4458BCF3 __sce_aeabi_idiv0: 0x4373B548 __sce_aeabi_ldiv0: 0xFB235848 __stack_chk_fail: 0x37691BF8 - __stack_chk_guard: 0x93B8AA67 _sceKernelCreateLwMutex: 0xB84EF718 sceClibAbort: 0x2F2C6046 sceClibDprintf: 0x4340EF77 @@ -64,25 +62,39 @@ modules: sceClibVsnprintf: 0xFA6BE467 sceClibVsnprintfChk: 0xB628786B sceIoChstat: 0x29482F7F + sceIoChstatAsync: 0x9739A5E2 sceIoChstatByFd: 0x6E903AB2 + sceIoClose2: 0xF5C6F098 + sceIoCompleteMultiple: 0xA792C404 sceIoDevctl: 0x04B30CB2 + sceIoDevctlAsync: 0x950F78EB sceIoDopen: 0xA9283DD0 sceIoDread: 0x9C8B6624 sceIoGetstat: 0xBCA5B623 + sceIoGetstatAsync: 0x82B20B41 sceIoGetstatByFd: 0x57F8CD25 sceIoIoctl: 0x54ABACFA sceIoIoctlAsync: 0x099C54B9 sceIoLseek: 0x99BA173E sceIoLseekAsync: 0xCAC5D672 sceIoMkdir: 0x9670D39F + sceIoMkdirAsync: 0x8E5FCBB1 sceIoOpen: 0x6C60AC61 sceIoOpenAsync: 0x6A7EA9FD sceIoPread: 0x52315AD7 + sceIoPreadAsync: 0xA010141E sceIoPwrite: 0x8FFFF5A8 + sceIoPwriteAsync: 0xED25BEEF + sceIoRead2: 0x713523E1 sceIoRemove: 0xE20ED0F3 + sceIoRemoveAsync: 0x446A60AC sceIoRename: 0xF737E369 + sceIoRenameAsync: 0xEE9857CD sceIoRmdir: 0xE9F91EC8 + sceIoRmdirAsync: 0x9694D00F sceIoSync: 0x98ACED6D + sceIoSyncAsync: 0xF7C7FBFE + sceIoWrite2: 0x11FED231 sceKernelAtomicAddAndGet16: 0x495C52EC sceKernelAtomicAddAndGet32: 0x2E84A93B sceKernelAtomicAddAndGet64: 0xB6CE9B9A @@ -175,9 +187,11 @@ modules: sceKernelCreateLwCond: 0x48C7EAE6 sceKernelCreateLwMutex: 0xDA6EC8EF sceKernelCreateMsgPipe: 0x0A10C1C8 + sceKernelCreateMsgPipeWithLR: 0xD7E10BB1 sceKernelCreateMutex: 0xED53334A sceKernelCreateRWLock: 0x8667951D sceKernelCreateSema: 0x1BD67366 + sceKernelCreateSema_16XX: 0x297AA2AE sceKernelCreateSimpleEvent: 0xE6DB2494 sceKernelCreateThread: 0xC5C11EE7 sceKernelCreateTimer: 0x2255B2A5 @@ -205,9 +219,12 @@ modules: sceKernelGetRWLockInfo: 0x079A573B sceKernelGetSemaInfo: 0x595D3FA6 sceKernelGetSystemInfo: 0xE0241FAA + sceKernelGetSystemTime: 0x8AF15B5F sceKernelGetTLSAddr: 0xB295EB61 - sceKernelGetThreadCpuAffinityMask: 0x8C57AC2A + sceKernelGetThreadContextForVM: 0x22C9595E + sceKernelGetThreadCpuAffinityMask2: 0x8C57AC2A sceKernelGetThreadCurrentPriority: 0xC53A9848 + sceKernelGetThreadEventInfo: 0xE48476FE sceKernelGetThreadExitStatus: 0xD5DC26C4 sceKernelGetThreadId: 0x0FB972F9 sceKernelGetThreadInfo: 0x8D9C5461 @@ -236,11 +253,13 @@ modules: sceKernelReceiveMsgPipeCB: 0x33AF829B sceKernelReceiveMsgPipeVector: 0x9F899087 sceKernelReceiveMsgPipeVectorCB: 0xBE5B3E27 + sceKernelRegisterThreadEventHandler: 0x6D8C0F13 sceKernelSendMsgPipe: 0x0CA71EA2 sceKernelSendMsgPipeCB: 0xA5CA74AC sceKernelSendMsgPipeVector: 0x94D506F7 sceKernelSendMsgPipeVectorCB: 0x9C6F7F79 sceKernelSetEventWithNotifyCallback: 0x5FF3EE92 + sceKernelSetThreadContextForVM: 0x27E6DEDE sceKernelSetTimerEvent: 0x621D293B sceKernelSetTimerTime: 0xFFAD717F sceKernelSignalLwCond: 0x3AC63B9A @@ -258,12 +277,15 @@ modules: sceKernelTrySendMsgPipeVector: 0x60DB346F sceKernelUnloadModule: 0x1987920E sceKernelUnlockLwMutex: 0x91FA6614 + sceKernelUnlockLwMutex2: 0x120AFC8C sceKernelWaitCond: 0xC88D44AD sceKernelWaitCondCB: 0x4CE42CE2 sceKernelWaitEvent: 0x120F03AF sceKernelWaitEventCB: 0xA0490795 sceKernelWaitEventFlag: 0x83C0E2AF sceKernelWaitEventFlagCB: 0xE737B1DF + sceKernelWaitException: 0x11E263A5 + sceKernelWaitExceptionCB: 0xAB4B5485 sceKernelWaitLwCond: 0xE1878282 sceKernelWaitLwCondCB: 0x8FA54B07 sceKernelWaitMultipleEvents: 0x10586418 @@ -275,6 +297,14 @@ modules: sceKernelWaitThreadEnd: 0xDDB395A9 sceKernelWaitThreadEndCB: 0xC54941ED sceSblACMgrIsGameProgram: 0x963F4A99 + sceSblGcAuthMgrAdhocBB160Shutdown: 0x5F9F0D61 + sceSblGcAuthMgrAdhocBB224Shutdown: 0xE633BAD1 + sceSblGcAuthMgrMsSaveBBCipherFinal: 0xEB02F15D + sceSblGcAuthMgrMsSaveBBMacUpdate: 0xEE2D40F7 + sceSblGcAuthMgrPcactActivation: 0x17C0CEF4 + variables: + SceKernelStackChkGuard: 0x4458BCF3 + __stack_chk_guard: 0x93B8AA67 SceLibRng: nid: 0xF9AC7CF8 functions: diff --git a/nids/360/SceLibMtp.yml b/nids/360/SceLibMtp.yml new file mode 100644 index 0000000..48d17ed --- /dev/null +++ b/nids/360/SceLibMtp.yml @@ -0,0 +1,54 @@ +modules: + SceLibMtp: + nid: 0xB18148CA + libraries: + SceLibMtp: + nid: 0xA51D3D18 + functions: + sceMtpBeginCheckSameObjectExist: 0x331DDF07 + sceMtpBeginCreateHostDir: 0x7A16D2CF + sceMtpBeginCreateHostFile: 0x9D5EC9F2 + sceMtpBeginDeleteHostDir: 0x849AF30D + sceMtpBeginDeleteObject: 0xAC538B75 + sceMtpBeginExportObjectWithCheck: 0xCF7D70A6 + sceMtpBeginGetHostStorageSize: 0xF038BA83 + sceMtpBeginGetNpAccountInfo: 0xE1B267DC + sceMtpBeginGetNumOfObject: 0xC92F9BD3 + sceMtpBeginGetObjectMetadata: 0xBD82BC51 + sceMtpBeginGetObjectStatus2: 0x2747749A + sceMtpBeginGetObjectThumbnail: 0xEA291CFC + sceMtpBeginGetSystemSetting: 0xE3727775 + sceMtpBeginGetTotalObjectSize: 0x46CCEAEC + sceMtpBeginHandover: 0xCFCED21A + sceMtpBeginHttpGetDataWithUrl: 0x6B7800B7 + sceMtpBeginHttpGetPropertyWithUrl: 0xE3727775 + sceMtpBeginImportObject: 0xA19ECC66 + sceMtpBeginMoveHostDir: 0x77D6FB78 + sceMtpBeginNpDrmActivate: 0x2DDD1CAB + sceMtpBeginNpDrmDeactivate: 0x13FD6153 + sceMtpBeginNpDrmGetLicense: 0x439C5B59 + sceMtpBeginNpDrmGetRtc: 0xCEAED3C0 + sceMtpBeginReadObjectWithOffset: 0x94B68669 + sceMtpBeginResumeExportObject: 0x85954990 + sceMtpBeginResumeImportObject: 0xD52DCC7C + sceMtpBeginRpcNetOperationRecv: 0x32985803 + sceMtpBeginRpcNetOperationSend: 0x8E7F11CB + sceMtpBeginSearchObject: 0x7E078352 + sceMtpBeginSetSystemSetting: 0x231FB847 + sceMtpBeginSpecifiedObjectMetadata: 0xB26C8078 + sceMtpBeginWriteObjectWithOffset: 0xFFCB2181 + sceMtpCheckContextValid: 0x24130489 + sceMtpEnd: 0xF134A48F + sceMtpEndImportObject: 0xCF92F4CC + sceMtpGetBgTaskInfo: 0x7C5DDDD6 + sceMtpGetCurrentInterface: 0xD4E9D95E + sceMtpGetHostInfo: 0xB6B6C7C0 + sceMtpInit: 0xF481FE11 + sceMtpPauseExportObject: 0xF4CAB5A5 + sceMtpReset: 0x97C128BD + sceMtpResume: 0x7430E5A5 + sceMtpSetFinishCallback: 0xEBB48255 + sceMtpStart: 0x128D0D05 + sceMtpStop: 0xC7AC05E8 + sceMtpSuspend: 0x8B9F4CC5 + sceMtpTerminateExecution: 0x392B8D5E diff --git a/nids/360/SceLowio.yml b/nids/360/SceLowio.yml index 2c91a98..c90c727 100644 --- a/nids/360/SceLowio.yml +++ b/nids/360/SceLowio.yml @@ -16,6 +16,7 @@ modules: sceDsiSendBlankingPacket: 0x7640F607 sceDsiSetLanesAndPixelSize: 0x78E6E3CF sceDsiSetVic: 0x97BFEA76 + sceDsiStartDisplay: 0xC2E85919 SceGpioForDriver: nid: 0xF0EF5743 functions: @@ -38,6 +39,15 @@ modules: sceI2cTransferRead: 0xD1D0A9A4 sceI2cTransferWrite: 0xCA94A759 sceI2cTransferWriteRead: 0x0A40B7BF + SceIftuForDriver: + nid: 0xCAFCFE50 + functions: + sceIftuCsc: 0x67E37EFC + sceIftuDisable: 0xC11F30B3 + sceIftuEnable: 0x0D7C02F7 + sceIftuSetInputFrameBuffer: 0x7CE0C4DA + sceIftuSetMergeSetting: 0xAF19FD85 + sceIftuSetOutputFormat: 0xE6EE2C6B ScePervasiveForDriver: nid: 0xE692C727 functions: diff --git a/nids/360/SceMotionDev.yml b/nids/360/SceMotionDev.yml index adc8e35..6a608fe 100644 --- a/nids/360/SceMotionDev.yml +++ b/nids/360/SceMotionDev.yml @@ -15,6 +15,7 @@ modules: sceMotionDevGetDeviceInfo: 0x1F1EFEFB sceMotionDevGetDeviceLocation: 0x5EDEA879 sceMotionDevGetDs3CalibData: 0x1FD76B5E + sceMotionDevGetEvaInfo: 0xE6955280 sceMotionDevGetFactoryMagnCalibData: 0x777D57D2 sceMotionDevGetGyroBias: 0x6D033072 sceMotionDevGetGyroBias2: 0x12B9F05E @@ -39,7 +40,10 @@ modules: SceMotionDevForDriver: nid: 0xA501409A functions: + sceMotionDevGetCalibrationData: 0xF0251700 + sceMotionDevGetCalibrationHeader: 0x3B23DF55 sceMotionDevGetDeviceInfo: 0x3E4BCBC0 + sceMotionDevGetEvaInfo: 0x5B53AC26 sceMotionDevIsReady: 0x10AAC8EA sceMotionDevNoiseFilterIsAvailable: 0x11A17A96 sceMotionDevRead: 0x3A3407B5 diff --git a/nids/360/SceMsif.yml b/nids/360/SceMsif.yml new file mode 100644 index 0000000..789dbfb --- /dev/null +++ b/nids/360/SceMsif.yml @@ -0,0 +1,13 @@ +modules: + SceMsif: + nid: 0x3305A0FE + libraries: + SceMsifForDriver: + nid: 0xB706084A + functions: + sceMsifDisableSlowMode: 0x75848756 + sceMsifEnableSlowMode: 0x4B751CE6 + sceMsifGetMsInfo: 0xD0307849 + sceMsifGetSlowModeState: 0x491E25B5 + sceMsifReadSector: 0x58654AA3 + sceMsifWriteSector: 0x329035EF diff --git a/nids/360/SceNetPs.yml b/nids/360/SceNetPs.yml index dd4ab8d..403dac0 100644 --- a/nids/360/SceNetPs.yml +++ b/nids/360/SceNetPs.yml @@ -7,9 +7,51 @@ modules: functions: sceNetAccept: 0x880A5423 sceNetBind: 0x84AB650F + sceNetClose: 0x21F4428D + sceNetConnect: 0x13491DA1 + sceNetGetpeername: 0xB949AFD5 + sceNetGetsockname: 0x8F1BB0E7 + sceNetGetsockopt: 0x92EE24A6 sceNetListen: 0x080C7992 sceNetRecvfrom: 0x49B1669C sceNetSendto: 0xAB746734 sceNetSetsockopt: 0x4BF5FAB4 + sceNetShutdown: 0xEEB19FB6 sceNetSocket: 0xEB95B024 - sceNetSocketClose: 0x21F4428D + SceNetPsForSyscalls: + nid: 0x2CBED2C6 + functions: + sceNetSyscallAccept: 0x45EAAD89 + sceNetSyscallBind: 0x267F1EF9 + sceNetSyscallClose: 0x1EBC2E28 + sceNetSyscallConnect: 0x14A4DE52 + sceNetSyscallControl: 0xEA0C1B71 + sceNetSyscallDescriptorClose: 0x854AFB6F + sceNetSyscallDescriptorCreate: 0xB518A2DE + sceNetSyscallDescriptorCtl: 0xA7064C2C + sceNetSyscallDumpAbort: 0x5CD20B54 + sceNetSyscallDumpClose: 0x263E52FD + sceNetSyscallDumpCreate: 0x3FC34171 + sceNetSyscallDumpRead: 0x3CBE7071 + sceNetSyscallEpollAbort: 0x94C3AE47 + sceNetSyscallEpollClose: 0x75E82300 + sceNetSyscallEpollCreate: 0xA98AEF04 + sceNetSyscallEpollCtl: 0xDF30BE68 + sceNetSyscallEpollWait: 0xF933D6FC + sceNetSyscallGetIfList: 0x878274CE + sceNetSyscallGetSockinfo: 0xF7748E56 + sceNetSyscallGetpeername: 0xBD7B0213 + sceNetSyscallGetsockname: 0x6AA945D9 + sceNetSyscallGetsockopt: 0xBC472DC5 + sceNetSyscallIcmConnect: 0x8C3FBC87 + sceNetSyscallIoctl: 0x310F0725 + sceNetSyscallListen: 0xAEEB7CA0 + sceNetSyscallRecvfrom: 0x144C9758 + sceNetSyscallRecvmsg: 0x32C1AE45 + sceNetSyscallSendmsg: 0xAEC6BE5D + sceNetSyscallSendto: 0x39796C01 + sceNetSyscallSetsockopt: 0x10DE34EA + sceNetSyscallShutdown: 0xA4014519 + sceNetSyscallSocket: 0x81A120BE + sceNetSyscallSocketAbort: 0xF9203B48 + sceNetSyscallSysctl: 0x3D7495B0 diff --git a/nids/360/SceNgs.yml b/nids/360/SceNgs.yml index 1e2cccb..305f3a9 100644 --- a/nids/360/SceNgs.yml +++ b/nids/360/SceNgs.yml @@ -2,74 +2,68 @@ modules: SceNgs: nid: 0x90671548 libraries: - SceNgs: - nid: 0xB01598D9 + SceNgsInternal: + nid: 0xE1825F41 functions: - sceNgsAT9GetSectionDetails: 0x2A9FA501 - sceNgsModuleGetNumPresets: 0x5C71FE09 - sceNgsModuleGetPreset: 0xC58298A7 - sceNgsPatchCreateRouting: 0xD668B49C - sceNgsPatchGetInfo: 0x98703DBC - sceNgsPatchRemoveRouting: 0xD0C9AE5A - sceNgsRackGetRequiredMemorySize: 0x477318C0 - sceNgsRackGetVoiceHandle: 0xFE1A98E9 - sceNgsRackInit: 0x0A92E4EC - sceNgsRackRelease: 0xDD5CA10B - sceNgsRackSetParamErrorCallback: 0x534B6E3F - sceNgsSystemGetRequiredMemorySize: 0x6CE8B36F - sceNgsSystemInit: 0xED14CF4A - sceNgsSystemLock: 0xB9D971F2 - sceNgsSystemRelease: 0x4A25BEBC - sceNgsSystemSetFlags: 0x64D80013 - sceNgsSystemSetParamErrorCallback: 0x5ADD22DC - sceNgsSystemUnlock: 0x0A93EA96 - sceNgsSystemUpdate: 0x684F080C - sceNgsVoiceBypassModule: 0x9AB87E71 - sceNgsVoiceDefGetAtrac9Voice: 0x14EF65A0 - sceNgsVoiceDefGetCompressorBuss: 0x0E0ACB68 - sceNgsVoiceDefGetCompressorSideChainBuss: 0x1AF83512 - sceNgsVoiceDefGetDelayBuss: 0x4D705E3E - sceNgsVoiceDefGetDistortionBuss: 0xAAD90DEB - sceNgsVoiceDefGetEnvelopeBuss: 0xF6B68C31 - sceNgsVoiceDefGetEqBuss: 0xF964120E - sceNgsVoiceDefGetMasterBuss: 0x79A121D1 - sceNgsVoiceDefGetMixerBuss: 0xE0AC8776 - sceNgsVoiceDefGetPauserBuss: 0x214485D6 - sceNgsVoiceDefGetPitchShiftBuss: 0xFBE515D4 - sceNgsVoiceDefGetReverbBuss: 0x9DCF50F5 - sceNgsVoiceDefGetSasEmuVoice: 0x1F51C2BA - sceNgsVoiceDefGetScreamAtrac9Voice: 0xCD63A2BF - sceNgsVoiceDefGetScreamVoice: 0xCE53BC33 - sceNgsVoiceDefGetSimpleAtrac9Voice: 0x45CF2A73 - sceNgsVoiceDefGetSimpleVoice: 0x0D5399CF - sceNgsVoiceDefGetTemplate1: 0xE9B572B7 - sceNgsVoiceGetInfo: 0x5551410D - sceNgsVoiceGetModuleBypass: 0x431BF3AB - sceNgsVoiceGetModuleType: 0xB307185E - sceNgsVoiceGetOutputPatch: 0x01A52E3A - sceNgsVoiceGetParamsOutOfRange: 0x4CBE08F3 - sceNgsVoiceGetStateData: 0xC9B8C0B4 - sceNgsVoiceInit: 0x1DDBEBEB - sceNgsVoiceKeyOff: 0xBB13373D - sceNgsVoiceKill: 0x0E291AAD - sceNgsVoiceLockParams: 0xAB6BEF8F - sceNgsVoicePatchSetVolume: 0xA3C807BC - sceNgsVoicePatchSetVolumes: 0xBD6F57F0 - sceNgsVoicePatchSetVolumesMatrix: 0xA0F5402D - sceNgsVoicePause: 0xD7786E99 - sceNgsVoicePlay: 0xFA0A0F34 - sceNgsVoiceResume: 0x54CFB981 - sceNgsVoiceSetFinishedCallback: 0x17A6F564 - sceNgsVoiceSetModuleCallback: 0x24E909A8 - sceNgsVoiceSetParamsBlock: 0xFB8174B1 - sceNgsVoiceSetPreset: 0x8A88E665 - sceNgsVoiceUnlockParams: 0x3D46D8A7 - sceSulphaNgsGetDefaultConfig: 0x5FD8AEDB - sceSulphaNgsGetNeededMemory: 0x793E3E8C - sceSulphaNgsInit: 0xAFCD824F - sceSulphaNgsSetRackName: 0x251AF6A9 - sceSulphaNgsSetSampleName: 0x54EC5B8D - sceSulphaNgsSetSynthName: 0x2F3F7515 - sceSulphaNgsSetVoiceName: 0x508975BD - sceSulphaNgsShutdown: 0xD124BFB1 - sceSulphaNgsTrace: 0xDC7C0F05 + sceNgsModuleCheckParamsInRangeInternal: 0x3AFBAD5C + sceNgsModuleGetNumPresetsInternal: 0x9EEDE7B9 + sceNgsModuleGetPresetInternal: 0x548AC8DF + sceNgsPatchCreateRoutingInternal: 0x550E9413 + sceNgsPatchRemoveRoutingInternal: 0x749E9779 + sceNgsRackGetRequiredMemorySizeInternal: 0x47F13846 + sceNgsRackGetVoiceHandleInternal6: 0x8DA78916 + sceNgsRackInitInternal: 0x0B1A2AF8 + sceNgsRackReleaseInternal: 0x7C434055 + sceNgsRackSetParamErrorCallbackInternal: 0xA7454973 + sceNgsSulphaGetInfoInternal: 0x0DE53F9A + sceNgsSulphaGetModuleListInternal: 0x5B889852 + sceNgsSulphaGetSynthUpdateCallbackInternal: 0xB9027A52 + sceNgsSulphaQueryModuleInternal: 0xEBC5957D + sceNgsSulphaSetSynthUpdateCallbackInternal: 0x9B4B54AF + sceNgsSystemGetCallbackListInternal: 0x00993680 + sceNgsSystemGetRequiredMemorySizeInternal: 0x19FF8A35 + sceNgsSystemGetSysHandleFromRack: 0x6F31AD08 + sceNgsSystemInitInternal: 0x68031121 + sceNgsSystemIsFixForBugzilla89940: 0xC7F24F21 + sceNgsSystemLockInternal: 0x0115E271 + sceNgsSystemPullDataInternal: 0xF021CF1E + sceNgsSystemPushDataInternal: 0x66B43B6F + sceNgsSystemReleaseInternal: 0x74CB5DAB + sceNgsSystemSetFlagsInternal: 0xE32A0DD3 + sceNgsSystemSetParamErrorCallbackInternal: 0x02E45DA3 + sceNgsSystemUnlockInternal: 0xB3235BA7 + sceNgsSystemUpdateInternal: 0xA98F9D60 + sceNgsVoiceBypassModuleInternal: 0xAAFB8669 + sceNgsVoiceClearDirtyFlagInternal: 0x9485F0C8 + sceNgsVoiceDefGetAtrac9VoiceInternal: 0xA907D598 + sceNgsVoiceDefGetCompressorBussInternal: 0x61DD58F9 + sceNgsVoiceDefGetCompressorSideChainBussInternal: 0xE962F447 + sceNgsVoiceDefGetDelayBussInternal: 0xAF8277C3 + sceNgsVoiceDefGetDistortionBussInternal: 0x8D014678 + sceNgsVoiceDefGetEnvelopeBussInternal: 0xE063536C + sceNgsVoiceDefGetEqBussInternal: 0x251F58F5 + sceNgsVoiceDefGetMasterBussInternal: 0xE204946B + sceNgsVoiceDefGetMixerBussInternal: 0xB8636646 + sceNgsVoiceDefGetPauserBussInternal: 0x96FE3B3C + sceNgsVoiceDefGetPitchshiftBussInternal: 0x1876116F + sceNgsVoiceDefGetReverbBussInternal: 0x6A637E1C + sceNgsVoiceDefGetSasEmuVoiceInternal: 0x3051D319 + sceNgsVoiceDefGetScreamVoiceAT9Internal: 0x10457017 + sceNgsVoiceDefGetScreamVoiceInternal: 0x5E4ADC7F + sceNgsVoiceDefGetSimpleAtrac9VoiceInternal: 0x6A768149 + sceNgsVoiceDefGetSimpleVoiceInternal: 0x41C1D637 + sceNgsVoiceDefGetTemplate1Internal: 0x1224105B + sceNgsVoiceDefinitionGetPresetInternal: 0x9EC976F9 + sceNgsVoiceGetModuleBypassInternal: 0x7B41F321 + sceNgsVoiceGetOutputPatchInternal: 0x8B8D43CF + sceNgsVoiceGetParamsOutOfRangeBufferedInternal: 0xD68C312F + sceNgsVoiceInitInternal: 0x11E14BB3 + sceNgsVoiceKeyOffInternal: 0x467EFA9D + sceNgsVoiceKillInternal: 0x756B12A6 + sceNgsVoicePauseInternal: 0x05D2487D + sceNgsVoicePlayInternal: 0xAEC9D124 + sceNgsVoiceResumeInternal: 0x144F0D33 + sceNgsVoiceSetAllBypassesInternal: 0x39E58E87 + sceNgsVoiceSetFinishedCallbackInternal: 0x79BAC4B6 + sceNgsVoiceSetModuleCallbackInternal: 0xD4E8F83C + sceNgsVoiceSetPresetInternal: 0x6FA9CAA5 diff --git a/nids/360/SceNgsUser.yml b/nids/360/SceNgsUser.yml new file mode 100644 index 0000000..b0ce2d9 --- /dev/null +++ b/nids/360/SceNgsUser.yml @@ -0,0 +1,75 @@ +modules: + SceNgsUser: + nid: 0x640BDA36 + libraries: + SceNgs: + nid: 0xB01598D9 + functions: + sceNgsAT9GetSectionDetails: 0x2A9FA501 + sceNgsModuleGetNumPresets: 0x5C71FE09 + sceNgsModuleGetPreset: 0xC58298A7 + sceNgsPatchCreateRouting: 0xD668B49C + sceNgsPatchGetInfo: 0x98703DBC + sceNgsPatchRemoveRouting: 0xD0C9AE5A + sceNgsRackGetRequiredMemorySize: 0x477318C0 + sceNgsRackGetVoiceHandle: 0xFE1A98E9 + sceNgsRackInit: 0x0A92E4EC + sceNgsRackRelease: 0xDD5CA10B + sceNgsRackSetParamErrorCallback: 0x534B6E3F + sceNgsSystemGetRequiredMemorySize: 0x6CE8B36F + sceNgsSystemInit: 0xED14CF4A + sceNgsSystemLock: 0xB9D971F2 + sceNgsSystemRelease: 0x4A25BEBC + sceNgsSystemSetFlags: 0x64D80013 + sceNgsSystemSetParamErrorCallback: 0x5ADD22DC + sceNgsSystemUnlock: 0x0A93EA96 + sceNgsSystemUpdate: 0x684F080C + sceNgsVoiceBypassModule: 0x9AB87E71 + sceNgsVoiceDefGetAtrac9Voice: 0x14EF65A0 + sceNgsVoiceDefGetCompressorBuss: 0x0E0ACB68 + sceNgsVoiceDefGetCompressorSideChainBuss: 0x1AF83512 + sceNgsVoiceDefGetDelayBuss: 0x4D705E3E + sceNgsVoiceDefGetDistortionBuss: 0xAAD90DEB + sceNgsVoiceDefGetEnvelopeBuss: 0xF6B68C31 + sceNgsVoiceDefGetEqBuss: 0xF964120E + sceNgsVoiceDefGetMasterBuss: 0x79A121D1 + sceNgsVoiceDefGetMixerBuss: 0xE0AC8776 + sceNgsVoiceDefGetPauserBuss: 0x214485D6 + sceNgsVoiceDefGetPitchShiftBuss: 0xFBE515D4 + sceNgsVoiceDefGetReverbBuss: 0x9DCF50F5 + sceNgsVoiceDefGetSasEmuVoice: 0x1F51C2BA + sceNgsVoiceDefGetScreamAtrac9Voice: 0xCD63A2BF + sceNgsVoiceDefGetScreamVoice: 0xCE53BC33 + sceNgsVoiceDefGetSimpleAtrac9Voice: 0x45CF2A73 + sceNgsVoiceDefGetSimpleVoice: 0x0D5399CF + sceNgsVoiceDefGetTemplate1: 0xE9B572B7 + sceNgsVoiceGetInfo: 0x5551410D + sceNgsVoiceGetModuleBypass: 0x431BF3AB + sceNgsVoiceGetModuleType: 0xB307185E + sceNgsVoiceGetOutputPatch: 0x01A52E3A + sceNgsVoiceGetParamsOutOfRange: 0x4CBE08F3 + sceNgsVoiceGetStateData: 0xC9B8C0B4 + sceNgsVoiceInit: 0x1DDBEBEB + sceNgsVoiceKeyOff: 0xBB13373D + sceNgsVoiceKill: 0x0E291AAD + sceNgsVoiceLockParams: 0xAB6BEF8F + sceNgsVoicePatchSetVolume: 0xA3C807BC + sceNgsVoicePatchSetVolumes: 0xBD6F57F0 + sceNgsVoicePatchSetVolumesMatrix: 0xA0F5402D + sceNgsVoicePause: 0xD7786E99 + sceNgsVoicePlay: 0xFA0A0F34 + sceNgsVoiceResume: 0x54CFB981 + sceNgsVoiceSetFinishedCallback: 0x17A6F564 + sceNgsVoiceSetModuleCallback: 0x24E909A8 + sceNgsVoiceSetParamsBlock: 0xFB8174B1 + sceNgsVoiceSetPreset: 0x8A88E665 + sceNgsVoiceUnlockParams: 0x3D46D8A7 + sceSulphaNgsGetDefaultConfig: 0x5FD8AEDB + sceSulphaNgsGetNeededMemory: 0x793E3E8C + sceSulphaNgsInit: 0xAFCD824F + sceSulphaNgsSetRackName: 0x251AF6A9 + sceSulphaNgsSetSampleName: 0x54EC5B8D + sceSulphaNgsSetSynthName: 0x2F3F7515 + sceSulphaNgsSetVoiceName: 0x508975BD + sceSulphaNgsShutdown: 0xD124BFB1 + sceSulphaNgsTrace: 0xDC7C0F05 diff --git a/nids/360/SceNotificationUtil.yml b/nids/360/SceNotificationUtil.yml new file mode 100644 index 0000000..375bc93 --- /dev/null +++ b/nids/360/SceNotificationUtil.yml @@ -0,0 +1,19 @@ +modules: + SceNotificationUtil: + nid: 0x355BAF61 + libraries: + SceNotificationUtil: + nid: 0xE19097C3 + functions: + sceNotificationUtilCleanHistory: 0xB0FFFB7B + sceNotificationUtilSendNotification: 0xDE6F33F4 + SceNotificationUtilBgApp: + nid: 0xA8AEF7DB + functions: + sceNotificationUtilBgAppInitialize: 0xCBE814C1 + SceNotificationUtilProgress: + nid: 0x75602769 + functions: + sceNotificationUtilProgressBegin: 0xFD0769B0 + sceNotificationUtilProgressFinish: 0x8CD688A1 + sceNotificationUtilProgressUpdate: 0xD9890A65 diff --git a/nids/360/SceNpDrm.yml b/nids/360/SceNpDrm.yml index 0e68d6e..930993e 100644 --- a/nids/360/SceNpDrm.yml +++ b/nids/360/SceNpDrm.yml @@ -30,6 +30,7 @@ modules: sceNpDrmGetRifPspKey: 0xDACB71F4 sceNpDrmGetRifVitaKey: 0x723322B5 sceNpDrmIsLooseAccountBind: 0xFC84CA1A + sceNpDrmPackageSetGameExist: 0x3BFD2850 sceNpDrmPresetRifProvisionalFlag: 0xC070FE89 sceNpDrmPspEbootSigGen: 0xEF387FC4 sceNpDrmPspEbootVerify: 0xB6CA3A2C @@ -55,3 +56,12 @@ modules: sceNpDrmPackageUninstallOngoing: 0xF1FF6193 sceNpDrmSaveDataFormatOngoing: 0x200D2DE4 sceNpDrmSaveDataInstallOngoing: 0xA5E0F38C + ScePsmDrm: + nid: 0x3F2B0888 + functions: + scePsmDrmGetRifInfo: 0xE31A6220 + scePsmDrmGetRifKey: 0x207A2C53 + ScePsmDrmForDriver: + nid: 0x9F4924F2 + functions: + scePsmDrmGetRifInfo: 0x984F9017 diff --git a/nids/360/SceOled.yml b/nids/360/SceOled.yml new file mode 100644 index 0000000..91d4a2c --- /dev/null +++ b/nids/360/SceOled.yml @@ -0,0 +1,15 @@ +modules: + SceOled: + nid: 0x5410837A + libraries: + SceOledForDriver: + nid: 0x60C7478A + functions: + sceOledDisplayOff: 0xBC84602E + sceOledDisplayOn: 0x4C7836C7 + sceOledGetBrightness: 0x43EF811A + sceOledGetDDB: 0xC9D5987C + sceOledGetDisplayColorSpaceMode: 0x4F8A1D4A + sceOledSetBrightness: 0xF9624C47 + sceOledSetDisplayColorSpaceMode: 0xDABBD9D3 + sceOledWaitReady: 0x0CC6BCB4 diff --git a/nids/360/ScePaf.yml b/nids/360/ScePaf.yml index 31f36a0..7743835 100644 --- a/nids/360/ScePaf.yml +++ b/nids/360/ScePaf.yml @@ -2,25 +2,130 @@ modules: ScePaf: nid: 0xCD679177 libraries: + ScePafMisc: + nid: 0x3D643CE8 + functions: + sce_paf_misc_does_file_exist: 0x95F14046 + ScePafResource: + nid: 0x2836DC9B + functions: + scePafResourceGetAttribute: 0xAD8678FB + scePafResourceGetAttributeChar: 0x1546336D + scePafResourceGetAttributeData: 0x37720983 + scePafResourceGetAttributeFloat: 0xBE772869 + scePafResourceGetAttributeFloatArray: 0x7B360965 + scePafResourceGetAttributeIdInt: 0xABFA169F + scePafResourceGetAttributeIdIntLpb: 0xABFA169F + scePafResourceGetAttributeIdStr: 0xBD3A6015 + scePafResourceGetAttributeIdStrLpb: 0x445BCAAB + scePafResourceGetAttributeInteger: 0xE59C9265 + scePafResourceGetAttributeIntegerArray: 0xD09CE709 + scePafResourceGetAttributeString: 0xD2438FA7 + scePafResourceGetAttributeStyleId: 0x15ADAAB4 + scePafResourceGetChar: 0x0AD6B520 + scePafResourceGetData: 0x86C66229 + scePafResourceGetFloat: 0xDE684F4B + scePafResourceGetFloatArray: 0x3EBC0341 + scePafResourceGetIdInt: 0xB43C8D9F + scePafResourceGetIdIntLpb: 0xB744416E + scePafResourceGetIdStr: 0x5DE85A41 + scePafResourceGetIdStrLpb: 0x346E532C + scePafResourceGetInteger: 0x8A684E61 + scePafResourceGetIntegerArray: 0xFDF977B9 + scePafResourceGetString: 0xE2801CFE + scePafResourceGetStyleId: 0xBCD70379 ScePafStdc: nid: 0xA7D28DAE functions: + sce_paf_private_abs: 0x0F297A5E + sce_paf_private_atexit: 0x9A1D1ED1 + sce_paf_private_atof: 0x9C251354 + sce_paf_private_atoi: 0x5930D99A + sce_paf_private_atol: 0x086AD1FA + sce_paf_private_atoll: 0x47B19A87 + sce_paf_private_bcmp: 0x1076722F + sce_paf_private_bcopy: 0x44C0825D + sce_paf_private_bsearch: 0x78AE1C51 + sce_paf_private_bzero: 0xD21442B4 + sce_paf_private_exit: 0x92BF63C9 + sce_paf_private_fclose: 0xA005E879 + sce_paf_private_fflush: 0x26A0A5F6 + sce_paf_private_fgetc: 0xDEB581B4 + sce_paf_private_fopen: 0x1BCCD0B9 + sce_paf_private_fputc: 0xAF1831DC + sce_paf_private_fread: 0x43A53623 sce_paf_private_free: 0x1B77082E + sce_paf_private_free2: 0x5C468294 + sce_paf_private_fseek: 0xFC10F9E9 + sce_paf_private_ftell: 0x77CB5E21 + sce_paf_private_fwrite: 0x4D5BB0F8 + sce_paf_private_longjmp: 0x001BFAC2 + sce_paf_private_look_ctype_table: 0x247C19A8 sce_paf_private_malloc: 0xFC5CD359 + sce_paf_private_malloc2: 0xD8CC1AFE sce_paf_private_memchr: 0x1D286681 - sce_paf_private_memclr: 0xD21442B4 - sce_paf_private_memcmp: 0x1076722F - sce_paf_private_memcmp2: 0x79DFA2A2 + sce_paf_private_memcmp: 0x79DFA2A2 sce_paf_private_memcpy: 0x2C5B6F9C sce_paf_private_memcpy2: 0x5883A6E3 sce_paf_private_memmove: 0x01566828 - sce_paf_private_memmove2: 0x44C0825D sce_paf_private_memset: 0xE148AF94 + sce_paf_private_memset2: 0x75ECC54E + sce_paf_private_qsort: 0xF7A11753 + sce_paf_private_rand: 0xC9DACD41 + sce_paf_private_setjmp: 0x2105FFAD sce_paf_private_snprintf: 0x4E0D907E + sce_paf_private_sprintf: 0x19182BDA + sce_paf_private_srand: 0x772DF5A0 sce_paf_private_strcasecmp: 0x70A459B2 + sce_paf_private_strcat: 0x2344E6F2 sce_paf_private_strchr: 0x1A22784C sce_paf_private_strcmp: 0x5CD08A47 + sce_paf_private_strcpy: 0xA523672C + sce_paf_private_strcspn: 0xB429DD2A + sce_paf_private_strlcat: 0x52A68C8D + sce_paf_private_strlcpy: 0x3D1AAC3A sce_paf_private_strlen: 0xF5A2AA0C sce_paf_private_strncasecmp: 0xA6014289 + sce_paf_private_strncat: 0xD259BEAF sce_paf_private_strncmp: 0x1E1EA818 + sce_paf_private_strncpy: 0xE29DA0BF + sce_paf_private_strpbrk: 0xA14AB14F sce_paf_private_strrchr: 0xFA2C892F + sce_paf_private_strspn: 0xE3F8F3D6 + sce_paf_private_strtof: 0x945EA5EA + sce_paf_private_strtok: 0x15C4B5A4 + sce_paf_private_strtok_r: 0x0D305F0E + sce_paf_private_strtol: 0xDB814C12 + sce_paf_private_strtoll: 0x2F6B94FF + sce_paf_private_strtoul: 0x04FDF238 + sce_paf_private_strtoull: 0xC05A18CA + sce_paf_private_swprintf: 0xF67F76D0 + sce_paf_private_tolower: 0xDAC2EE4D + sce_paf_private_toupper: 0x761184A5 + sce_paf_private_towlower: 0xC8C2CDAC + sce_paf_private_vsnprintf: 0x51C66C6E + sce_paf_private_vsprintf: 0x3079B56B + sce_paf_private_wcscasecmp: 0x92A125F6 + sce_paf_private_wcscat: 0xDDDDD6E0 + sce_paf_private_wcschr: 0x13833CAE + sce_paf_private_wcscmp: 0x822897E3 + sce_paf_private_wcscpy: 0xE9B40477 + sce_paf_private_wcscspn: 0xDE8B2091 + sce_paf_private_wcslen: 0xBED4F3D0 + sce_paf_private_wcsncasecmp: 0x8D65035E + sce_paf_private_wcsncat: 0x49023581 + sce_paf_private_wcsncmp: 0xA41CD38D + sce_paf_private_wcsncpy: 0x21B784DD + sce_paf_private_wcsnlen: 0xDCE80ABB + sce_paf_private_wcspbrk: 0xD7A2DF29 + sce_paf_private_wcsrchr: 0x439EB9D4 + sce_paf_private_wcsspn: 0x85DB686E + sce_paf_private_wmemchr: 0x8236A020 + sce_paf_private_wmemcmp: 0x381B6216 + sce_paf_private_wmemcpy: 0x19B5B91D + sce_paf_private_wmemmove: 0x468A09B1 + sce_paf_private_wmemset: 0x36890967 + ScePafWidget: + nid: 0x073F8C68 + functions: + scePafWidgetSetFontSize: 0x39B15B98 diff --git a/nids/360/ScePfsMgr.yml b/nids/360/ScePfsMgr.yml new file mode 100644 index 0000000..13fb4dd --- /dev/null +++ b/nids/360/ScePfsMgr.yml @@ -0,0 +1,16 @@ +modules: + ScePfsMgr: + nid: 0x538BA86B + libraries: + ScePfsMgrForKernel: + nid: 0xA067B56F + functions: + scePfsAcidDirApprove: 0x8CDA249A + scePfsAcidDirMount: 0x4A4A8243 + scePfsAcidDirSet: 0xB0CC0A1A + scePfsAcidDirUnmount: 0x00C8AF80 + scePfsApprove: 0xD8D0FEE5 + scePfsDisapprove: 0x2D67D8CA + scePfsMount: 0xA772209C + scePfsMount2: 0x2D48AEA2 + scePfsUnmount: 0x680BC384 diff --git a/nids/360/ScePower.yml b/nids/360/ScePower.yml index 6a38a0a..6de764b 100644 --- a/nids/360/ScePower.yml +++ b/nids/360/ScePower.yml @@ -86,6 +86,7 @@ modules: scePowerGetIdleTimer: 0xEDC13FE5 scePowerGetPowerSwMode: 0x165CE085 scePowerGetResumeCount: 0x0074EF9B + scePowerGetVenezia: 0x0E58FCDF scePowerGetWakeupFactor: 0x9F26222A scePowerIsBatteryCharging: 0x1E490401 scePowerIsBatteryExist: 0x0AFD0D8B @@ -99,22 +100,28 @@ modules: scePowerRequestDisplayOn: 0x3EA75C88 scePowerRequestHibernate: 0x08951418 scePowerRequestResume: 0x02DB1035 + scePowerRequestShutdown: 0x8921A7A0 scePowerRequestSoftReset: 0x2875994B scePowerRequestStandby: 0x2B7C7CF4 scePowerRequestSuspend: 0xAC32C9CC scePowerSetArmClockFrequency: 0x74DB5AE5 scePowerSetBatteryFakeStatus: 0x0C6973B8 scePowerSetBusClockFrequency: 0xB8D7B3FB + scePowerSetCallbackState: 0xA6FF5997 scePowerSetCompatClockFrequency: 0xFFC84E69 + scePowerSetDisplayBrightness: 0x43D5CE1D scePowerSetDisplayMaxBrightness: 0x77027B6B - scePowerSetGpuClockFrequency: 0x264C24FC + scePowerSetGpuClockFrequency: 0x621BD8FD + scePowerSetGpuEs4ClockFrequency: 0x264C24FC scePowerSetGpuXbarClockFrequency: 0xA7739DBE scePowerSetIdleCallback: 0x1BA2FCAE scePowerSetIdleTimer: 0x6BC26FC7 scePowerSetPowerSwMode: 0xC1853BA7 + scePowerSetPowerSwMode2: 0x0CD21B1F scePowerSetProcessIdleCallback: 0x0856FD0A scePowerSetPsButtonPushTime: 0xCF8F0529 scePowerSetStandbyButtonPushTime: 0x675A84ED + scePowerSetVenezia: 0xE5573571 scePowerTick: 0xEFD3C963 scePowerUnregisterCallback: 0xDFA8BAF8 scePowerWlanActivate: 0x6D2CA84B diff --git a/nids/360/SceProcessmgr.yml b/nids/360/SceProcessmgr.yml index bb76f9b..f4fa838 100644 --- a/nids/360/SceProcessmgr.yml +++ b/nids/360/SceProcessmgr.yml @@ -5,6 +5,21 @@ modules: SceProcessmgr: nid: 0x2DD91812 functions: + _sceKernelExitProcessForUser: 0xC053DC6B + _sceKernelGetTimer5Reg: 0x2F73D72F + _sceKernelRegisterLibkernelAddresses: 0x56C2E8FF + sceKernelCDialogSessionClose: 0xDB4CC1D0 + sceKernelCDialogSetLeaseLimit: 0xEC8DDAAD + sceKernelCallAbortHandler: 0xEB6E50BB + sceKernelGetCurrentProcess: 0xCD248267 + sceKernelGetExtraTty: 0x2D635A00 + sceKernelGetProcessName: 0x10C52C95 + sceKernelGetProcessParam: 0x2BE3E066 + sceKernelGetProcessTimeCore: 0xD37A8437 + sceKernelGetProcessTimeLowCore: 0xF5D0D4C6 + sceKernelGetProcessTimeWideCore: 0x89DA0967 + sceKernelGetProcessTitleId: 0x03A48771 + sceKernelGetRemoteProcessTime: 0xE6E9FCA3 sceKernelGetStderr: 0xFA5E3ADA sceKernelGetStdin: 0xC1727F59 sceKernelGetStdout: 0xE5AA625C @@ -28,6 +43,7 @@ modules: sceKernelGetProcessInfo: 0x0AFF3EAE sceKernelGetProcessLocalStorageAddr: 0xEE694840 sceKernelGetProcessLocalStorageAddrForPid: 0xAF80F39C + sceKernelGetProcessStatus: 0x65B120B8 sceKernelGetProcessTimeCore: 0xEC283166 sceKernelGetProcessTimeLowCore: 0x02179E12 sceKernelGetProcessTimeWideCore: 0x82D94BE9 @@ -38,6 +54,12 @@ modules: nid: 0x7A69DE86 functions: sceKernelExitProcess: 0x4CA7DC42 + sceKernelGetClassForUid2: 0xC6820972 sceKernelGetProcessAuthid: 0xE4C83B0D sceKernelGetProcessKernelBuf: 0xB9E68092 + sceKernelGetProcessMainThread: 0x95F9ED94 sceKernelLaunchApp: 0x71CF71FD + sceKernelLibcGettimeofday: 0xDE8B8B5E + sceKernelLibcTime: 0x9E38C556 + sceKernelResumeProcess: 0x080CDC59 + sceKernelSuspendProcess: 0x6AECE4CD diff --git a/nids/360/ScePromoterUtil.yml b/nids/360/ScePromoterUtil.yml index 6c0fdbb..e13f78d 100644 --- a/nids/360/ScePromoterUtil.yml +++ b/nids/360/ScePromoterUtil.yml @@ -9,9 +9,12 @@ modules: scePromoterUtilityDeletePkg: 0x7D46752F scePromoterUtilityExit: 0xC95D24A6 scePromoterUtilityGetResult: 0x49B473F0 + scePromoterUtilityGetSize: 0x1F5EA997 scePromoterUtilityGetState: 0xABEC74D2 scePromoterUtilityInit: 0x93451536 - scePromoterUtilityPromoteBackup: 0x4B37808F + scePromoterUtilityPromoteImport: 0x4B37808F scePromoterUtilityPromotePkg: 0x716C81F4 scePromoterUtilityPromotePkgWithRif: 0x86641BC6 + scePromoterUtilityRemoveSavedata: 0xCB0A59B0 scePromoterUtilityUpdateLiveArea: 0x17D73ECA + scePromoterUtilityUpdateUpgradableStatus: 0x82E69783 diff --git a/nids/360/SceRegistryMgr.yml b/nids/360/SceRegistryMgr.yml index acd93c3..50a3711 100644 --- a/nids/360/SceRegistryMgr.yml +++ b/nids/360/SceRegistryMgr.yml @@ -58,6 +58,7 @@ modules: SceRegMgrForGame: nid: 0x0B351269 functions: + sceRegMgrSystemIsBlueScreen: 0x169A0D1D sceRegMgrSystemParamGetBin: 0x7FFE2CDF sceRegMgrSystemParamGetInt: 0x347C1BDB sceRegMgrSystemParamGetStr: 0x877ADB3F diff --git a/nids/360/SceRtc.yml b/nids/360/SceRtc.yml index 7337e5c..c5dc088 100644 --- a/nids/360/SceRtc.yml +++ b/nids/360/SceRtc.yml @@ -5,12 +5,45 @@ modules: SceRtc: nid: 0x3503487E functions: + _sceRtcConvertLocalTimeToUtc: 0x0FC8AC41 + _sceRtcConvertUtcToLocalTime: 0x1E61DDA4 + _sceRtcFormatRFC2822: 0x2CD6AC86 + _sceRtcFormatRFC2822LocalTime: 0x4C7ED349 + _sceRtcFormatRFC3339: 0x7EE2CBEF + _sceRtcFormatRFC3339LocalTime: 0x4836474D + _sceRtcGetCurrentAdNetworkTick: 0x76EFA8FE + _sceRtcGetCurrentClock: 0x24947354 + _sceRtcGetCurrentClockLocalTime: 0x41A6C861 + _sceRtcGetCurrentDebugNetworkTick: 0xBF639B21 + _sceRtcGetCurrentGpsTick: 0x3BA820E5 + _sceRtcGetCurrentNetworkTick: 0x06F734FE + _sceRtcGetCurrentRetainedNetworkTick: 0xC17EA809 + _sceRtcGetCurrentTick: 0x247EE33B + _sceRtcGetLastAdjustedTick: 0xEA157EC5 + _sceRtcGetLastReincarnatedTick: 0xE13D0FE5 sceRtcGetAccumulativeTime: 0x258BE8EC SceRtcForDriver: nid: 0x0351D827 functions: + sceRtcConvertLocalTimeToUtc: 0xAD2F3544 + sceRtcConvertUtcToLocal: 0xC6E03DD4 + sceRtcFormatRFC2822: 0xBA3415F8 + sceRtcFormatRFC2822LocalTime: 0x1F7FC209 + sceRtcFormatRFC3339: 0xD32AC698 + sceRtcFormatRFC3339LocalTime: 0x35925318 + sceRtcGetAccumulativeTime: 0x0A86FB04 sceRtcGetAlarmTick: 0xC838275A + sceRtcGetCurrentAdNetworkTick: 0x3E3C09A0 + sceRtcGetCurrentClock: 0xA930CD1A + sceRtcGetCurrentClockLocalTime: 0x7DC0DF93 + sceRtcGetCurrentDebugNetworkTick: 0xC141632A + sceRtcGetCurrentGpsTick: 0xF69B610F + sceRtcGetCurrentNetworkTick: 0xF1517B38 + sceRtcGetCurrentRetainedNetworkTick: 0x40B4BCFF sceRtcGetCurrentSecureTick: 0x401C0954 + sceRtcGetCurrentTick: 0xDEC408D4 + sceRtcGetLastAdjustedTick: 0x8A987573 + sceRtcGetLastReincarnatedTick: 0x3D614A9A sceRtcGetSecureAlarmTick: 0xBD53731C sceRtcIsAlarmed: 0xCD295F0C sceRtcIsSecureAlarmed: 0xE39F2ABE @@ -36,9 +69,13 @@ modules: sceRtcFormatRFC2822LocalTime: 0x42CA8EB5 sceRtcFormatRFC3339: 0xCCEA2B54 sceRtcFormatRFC3339LocalTime: 0x742250A9 + sceRtcGetCurrentAdNetworkTick: 0x5612AF12 sceRtcGetCurrentClock: 0x70FDE8F1 sceRtcGetCurrentClockLocalTime: 0x0572EDDC + sceRtcGetCurrentDebugNetworkTick: 0x4ED6BA6C + sceRtcGetCurrentGpsTick: 0xBB92534F sceRtcGetCurrentNetworkTick: 0xCDDD25FE + sceRtcGetCurrentRetainedNetworkTick: 0xA086AE18 sceRtcGetCurrentTick: 0x23F79274 sceRtcGetDayOfWeek: 0x2F3531EB sceRtcGetDayOfYear: 0xB5C4E95F diff --git a/nids/360/SceSblACMgr.yml b/nids/360/SceSblACMgr.yml index bd69dcc..d7b9fd4 100644 --- a/nids/360/SceSblACMgr.yml +++ b/nids/360/SceSblACMgr.yml @@ -2,13 +2,57 @@ modules: SceSblACMgr: nid: 0x7474D6F9 libraries: + SceSblACMgr: + nid: 0xF069F219 + functions: + _sceSblACMgrIsGameProgram: 0x3C17A7F7 SceSblACMgrForDriver: nid: 0x9AD8E213 functions: + sceSblACMgrGetPathId: 0x4322F188 + sceSblACMgrGetSelfAuthInfo: 0x96AF69BD sceSblACMgrHasCapability: 0xC2D1F2FC + sceSblACMgrIsAllowedExtendedMemory: 0x4DB7F512 + sceSblACMgrIsAllowedUsbSerial: 0x062CAEB2 + sceSblACMgrIsAllowedVirtualMachine: 0x2A29453C sceSblACMgrIsDevelopmentMode: 0xE87D1777 + sceSblACMgrIsFself: 0x426A4E8C sceSblACMgrIsGameProgram: 0x1298C647 + sceSblACMgrIsMiniSettingsForQA: 0xD0E11C89 + sceSblACMgrIsNonGameOrGameProgram: 0x8A54DF3A sceSblACMgrIsNonGameProgram: 0x6C5AB07F + sceSblACMgrIsNotSandboxed: 0x0B6E6CD7 + sceSblACMgrIsPSMDevAssistant: 0xC98D82EE + sceSblACMgrIsPSMRuntime: 0x091F7247 sceSblACMgrIsPspEmu: 0xFD00C72A + sceSblACMgrIsSIEApp: 0xA67E8E5B + sceSblACMgrIsSceShell: 0x991FDC15 sceSblACMgrIsShell: 0x8612B243 sceSblACMgrIsSystem: 0x0948F41C + sceSblACMgrIsUpdaterUISetupperOrPkgInstallerSpawn: 0x962CD237 + sceSblACMgrIsWebCoreOrWebKitProcess: 0x0139FC20 + SceSblACMgrForKernel: + nid: 0x11F9B314 + functions: + scePfsACSetFSAttrByMode: 0x2AE6CF27 + sceSblACIsSystemProgram: 0x930CD037 + sceSblACMgrGetMediaType: 0xD442962E + sceSblACMgrGetSelfAuthInfo2: 0x7C2AF978 + sceSblACMgrHasCapability2: 0x9EDAF856 + sceSblACMgrIsAllowedExtendedMemory2: 0x384D20FD + sceSblACMgrIsAllowedVirtualMachine2: 0x96403142 + sceSblACMgrIsDevelopmentMode2: 0xBBA13D9C + sceSblACMgrIsFself2: 0x5AC59172 + sceSblACMgrIsGameProgram2: 0x05FDC646 + sceSblACMgrIsMiniSettingsForQA2: 0xAF6F208E + sceSblACMgrIsNonGameOrGameProgram2: 0x570D6AD3 + sceSblACMgrIsNonGameProgram2: 0x3F99279F + sceSblACMgrIsNotSandboxed2: 0xF5AD56E4 + sceSblACMgrIsPSMDevAssistant2: 0xC90A9216 + sceSblACMgrIsPSMRuntime2: 0x966B3738 + sceSblACMgrIsPspEmu2: 0x47B67F72 + sceSblACMgrIsSIEApp2: 0x3388F595 + sceSblACMgrIsSceShell2: 0xF9FEF5F0 + sceSblACMgrIsSystem2: 0x31C23B66 + sceSblACMgrIsUpdaterUISetupperOrPkgInstallerSpawn2: 0x98B28671 + sceSblACMgrIsWebCoreOrWebKitProcess2: 0xA7C3001D diff --git a/nids/360/SceSblAuthMgr.yml b/nids/360/SceSblAuthMgr.yml index f996cd4..0202eec 100644 --- a/nids/360/SceSblAuthMgr.yml +++ b/nids/360/SceSblAuthMgr.yml @@ -4,8 +4,18 @@ modules: libraries: SceSblAuthMgrForDriver: nid: 0x4EB2B1BB + functions: + sceSblAuthMgrDecBindData: 0x41DAEA12 + sceSblAuthMgrGetEKc: 0x868B9E9A + sceSblAuthMgrVerifySpfsoCtx: 0x24C4CE64 SceSblAuthMgrForKernel: nid: 0x7ABF5135 functions: + sceSblAuthMgrAuthHeader: 0xF3411881 sceSblAuthMgrClearDmac5Key: 0xF2BB723E + sceSblAuthMgrClose: 0x026ACBAD + sceSblAuthMgrCompareSwVersion: 0xABAB8466 + sceSblAuthMgrLoadBlock: 0xBC422443 + sceSblAuthMgrOpen: 0xA9CD2A09 sceSblAuthMgrSetDmac5Key: 0x122ACDEA + sceSblAuthMgrSetupAuthSegment: 0x89CCDA2C diff --git a/nids/360/SceSblGcAuthMgr.yml b/nids/360/SceSblGcAuthMgr.yml new file mode 100644 index 0000000..27f2470 --- /dev/null +++ b/nids/360/SceSblGcAuthMgr.yml @@ -0,0 +1,41 @@ +modules: + SceSblGcAuthMgr: + nid: 0xDB1A9016 + libraries: + SceSblGcAuthMgr: + nid: 0x7B13BCF7 + functions: + _sceSblGcAuthMgrAdhocBB160Auth1: 0x5E56F845 + _sceSblGcAuthMgrAdhocBB160Auth2: 0xD2218A6E + _sceSblGcAuthMgrAdhocBB160Auth3: 0xD1777A14 + _sceSblGcAuthMgrAdhocBB160Auth4: 0x7F33DE86 + _sceSblGcAuthMgrAdhocBB160Auth5: 0xD84C2E0C + _sceSblGcAuthMgrAdhocBB160BroadCastDecrypt: 0x2193A7CB + _sceSblGcAuthMgrAdhocBB160BroadCastEncrypt: 0x6125C3D9 + _sceSblGcAuthMgrAdhocBB160GetKeys: 0x09E1E270 + _sceSblGcAuthMgrAdhocBB160Init: 0xE4AA1BB2 + _sceSblGcAuthMgrAdhocBB160Shutdown: 0x076ADAB3 + _sceSblGcAuthMgrAdhocBB160UniCastDecrypt: 0xD79A1B31 + _sceSblGcAuthMgrAdhocBB160UniCastEncrypt: 0x08C4EE5F + _sceSblGcAuthMgrAdhocBB224Auth1: 0x307FD67C + _sceSblGcAuthMgrAdhocBB224Auth2: 0x788C0517 + _sceSblGcAuthMgrAdhocBB224Auth3: 0xD3F95259 + _sceSblGcAuthMgrAdhocBB224Auth4: 0x5CCC216C + _sceSblGcAuthMgrAdhocBB224Auth5: 0x459F5503 + _sceSblGcAuthMgrAdhocBB224GetKeys: 0xC236FB28 + _sceSblGcAuthMgrAdhocBB224Init: 0x5AB126A7 + _sceSblGcAuthMgrAdhocBB224Shutdown: 0x8ECEACF9 + _sceSblGcAuthMgrGetMediaIdType01: 0x0AC64154 + _sceSblGcAuthMgrMsSaveBBCipherFinal: 0x18EAAD73 + _sceSblGcAuthMgrMsSaveBBCipherInit: 0x064BA38A + _sceSblGcAuthMgrMsSaveBBCipherUpdate: 0xF6FECCE0 + _sceSblGcAuthMgrMsSaveBBMacFinal: 0xFDDDD1D4 + _sceSblGcAuthMgrMsSaveBBMacInit: 0x3A92780D + _sceSblGcAuthMgrMsSaveBBMacUpdate: 0x716C0C3B + _sceSblGcAuthMgrPcactActivation: 0x032E7CEA + _sceSblGcAuthMgrPcactGetChallenge: 0x98153286 + _sceSblGcAuthMgrPkgVry: 0x3E168BC4 + _sceSblGcAuthMgrPsmactCreateC1: 0x3BD8B007 + _sceSblGcAuthMgrPsmactVerifyR1: 0x2B604356 + _sceSblGcAuthMgrSclkGetData1: 0x8A3AF1E8 + _sceSblGcAuthMgrSclkSetData2: 0x837D0FB6 diff --git a/nids/360/SceSblPostSsMgr.yml b/nids/360/SceSblPostSsMgr.yml new file mode 100644 index 0000000..0abff32 --- /dev/null +++ b/nids/360/SceSblPostSsMgr.yml @@ -0,0 +1,70 @@ +modules: + SceSblPostSsMgr: + nid: 0xB6C941F2 + libraries: + SceSblLicMgr: + nid: 0x62083C72 + functions: + sceSblLicMgrActivateDevkit: 0xEB21DD39 + sceSblLicMgrActivateFromFs: 0x6E56EA0A + sceSblLicMgrClearActivationData: 0x9B749D1D + sceSblLicMgrGetActivationKey: 0x2A437187 + sceSblLicMgrGetExpireDate: 0xE9FA0FE5 + sceSblLicMgrGetIssueNo: 0x0E0691A1 + sceSblLicMgrGetLicenseStatus: 0x0EA6A30C + sceSblLicMgrGetUsageTimeLimit: 0x774EBBA2 + SceSblPmMgr: + nid: 0xA9CE5795 + functions: + sceSblPmMgrAuthEtoI: 0xBD38B141 + sceSblPmMgrGetCurrentMode: 0xDA4EDEBF + sceSblPmMgrGetProductModeForUser: 0x46EA9FDB + sceSblPmMgrGetProductModeFromNVS: 0x49CE0DDF + sceSblPmMgrSetProductModeOffForUser: 0x41FE8A37 + SceSblPostSsMgrForDriver: + nid: 0x2254E1B2 + functions: + _sceSblPostSsMgrExecutePmSmF00dCommand: 0xFE92A318 + sceSblLicMgrGetActivationKey: 0xF7F1015B + sceSblLicMgrGetLicenseStatus: 0x15F37282 + sceSblPostSsMgrActivate: 0x0298382B + sceSblPostSsMgrDebugDecryptKeystone: 0xCC5AA5A5 + sceSblPostSsMgrDebugEncryptKeystone: 0x42474C8B + sceSblPostSsMgrDecryptSealedkey: 0x33275F95 + sceSblPostSsMgrEncryptSealedkey: 0x08525D8D + sceSblPostSsMgrExecutePmSmF00dCommand: 0xADF92824 + sceSblPostSsMgrExecutePmSmF00dCommand8: 0x4663C195 + sceSblPostSsMgrExecutePmSmSdF00dCommand: 0x19B63D65 + sceSblPostSsMgrGetExpireDate: 0x4FF2682F + sceSblPostSsMgrInitializeSpfsoCtx: 0xBDF18922 + sceSblPostSsMgrReleaseSpfsoCtx: 0xAD3B0078 + sceSblPostSsMgrSetCpRtc: 0x3F9BDEDF + sceSblPostSsMgrVerifyKeystone: 0xDDA6FA6D + sceSblPostSsMgrVerifyKeystoneWithPasscode: 0xF86F1452 + sceSblPostSsMgrVerifySpfsoCtx: 0x686B9461 + sceSblRtcMgrGetCpRtcLogical: 0xDE5150FE + sceSblRtcMgrGetCpRtcPhysical: 0x942010A0 + sceSblUtMgrExecuteUtokenSmCommand1: 0xC2E58CE3 + sceSblUtMgrGetTrilithiumBuffer: 0xABDD68CD + sceSblUtMgrHasComTestFlag: 0x7ACCAA50 + sceSblUtMgrHasNpTestFlag: 0x9FD835B0 + sceSblUtMgrHasStoreFlag: 0x9D2E2D39 + sceSblUtMgrResetUtokenFile: 0x1FF699DD + SceSblRtcMgr: + nid: 0x44C5F209 + functions: + sceSblRtcMgrGetCpRtcLogical: 0xDD44D726 + sceSblRtcMgrGetCpRtcPhysicalForUser: 0x1614302B + sceSblRtcMgrGetCpSerialId: 0xE162A827 + sceSblRtcMgrSetCpActivationKey: 0x298AE544 + sceSblRtcMgrSetCpRtcLogical: 0x9DFB118B + sceSblRtcMgrSetCpRtcPhysicalAndKey: 0x3C0EEC69 + sceSblRtcMgrSetCpRtcPhysicalForUser: 0xA990BC44 + SceSblUtMgr: + nid: 0x000DF81A + functions: + sceSblUtMgrGetCurrentSecureTick: 0xCFCB1355 + sceSblUtMgrIsTrilithiumFlagEnabled: 0x04CA1311 + sceSblUtMgrReadUtoken: 0xD2836E0D + sceSblUtMgrResetUtokenFile: 0x1CD57182 + sceSblUtMgrUpdateUtoken: 0xBDE74645 diff --git a/nids/360/SceSblSmschedProxy.yml b/nids/360/SceSblSmschedProxy.yml new file mode 100644 index 0000000..e1bbe18 --- /dev/null +++ b/nids/360/SceSblSmschedProxy.yml @@ -0,0 +1,20 @@ +modules: + SceSblSmschedProxy: + nid: 0x254B02B3 + libraries: + SceSblSmSchedProxyForKernel: + nid: 0x15F25C84 + functions: + sceSblSmSchedCallFunc: 0x723B382F + sceSblSmSchedProxyChangeF00DStatus: 0xDE4EAC3C + sceSblSmSchedProxyDisableCry2ArmInterrupt: 0x85EDA5FC + sceSblSmSchedProxyEnableCry2ArmInterrupt: 0x8B84AC2A + sceSblSmSchedProxyExecuteF00DCommand: 0x7894B6F0 + sceSblSmSchedProxyGetCommandF00DRegister: 0xF70C04EC + sceSblSmSchedProxyGetStatus: 0x27EB92F1 + sceSblSmSchedProxyInitialize: 0xA488D604 + sceSblSmSchedProxyInvoke: 0x1916509B + sceSblSmSchedProxyReadCry2Arm: 0x973A4A7D + sceSblSmSchedProxyUninitialize: 0x33A3A1E2 + sceSblSmSchedProxyWait: 0xF35EFC1A + sceSblSmSchedProxyWriteCry2Arm: 0x15B0E4DF diff --git a/nids/360/SceSblSsMgr.yml b/nids/360/SceSblSsMgr.yml index 1e58256..dd6e6f9 100644 --- a/nids/360/SceSblSsMgr.yml +++ b/nids/360/SceSblSsMgr.yml @@ -2,16 +2,86 @@ modules: SceSblSsMgr: nid: 0x4E913538 libraries: + SceSblAimgr: + nid: 0xD473F968 + functions: + _sceKernelGetOpenPsId: 0x6E283E2E + SceSblDmac5Mgr: + nid: 0x437366A2 + functions: + sceSblDmac5EncDec: 0xD0B1F759 + sceSblDmac5EncDecKeyGen: 0x5BF4F924 + sceSblDmac5HashTransform: 0x09EBC6EF + sceSblDmac5HmacKeyGen: 0xCCE57D33 + SceSblQafMgr: + nid: 0x756B7E89 + functions: + sceSblQafManagerDeleteQafTokenForUser: 0xD542583F + sceSblQafManagerGetQafNameForUser: 0x0F7EA8C2 + sceSblQafManagerIsAllowKernelDebugForUser: 0x11D30766 + sceSblQafManagerSetQafTokenForUser: 0x56A16392 + sceSblQafMgrDeleteQafToken2: 0x62E30BF4 + sceSblQafMgrGetQafName: 0xF0CA8766 + sceSblQafMgrGetQafToken: 0xB6BAE81D + sceSblQafMgrGetQafToken2: 0xDFBA8569 + sceSblQafMgrIsAllowAllDebugMenuDisplay: 0x66843305 + sceSblQafMgrIsAllowForceUpdate: 0x63F29BA0 + sceSblQafMgrIsAllowLimitedDebugMenuDisplay: 0xC456212D + sceSblQafMgrIsAllowMinimumDebugMenuDisplay: 0xA156BBD2 + sceSblQafMgrIsAllowNonQAPup: 0xB5621615 + sceSblQafMgrIsAllowNpFullTest: 0x72168C6E + sceSblQafMgrIsAllowNpTest: 0xA9EBCBAC + sceSblQafMgrIsAllowRemoteSysmoduleLoad: 0xF45AA706 + sceSblQafMgrIsAllowScreenShotAlways: 0xD22A8731 + sceSblQafMgrSetQafToken2: 0xF4B5C8A5 + SceSblRng: + nid: 0x1843F124 + functions: + _sceKernelGetRandomNumber: 0xC37E818C SceSblSsMgrForDriver: nid: 0x61E9428D functions: sceKernelGetRandomNumber: 0x4F9BFBE5 sceSblAimgrGetConsoleId: 0xFC6CDD68 + sceSblAimgrGetOpenPsId: 0xA5B5D269 sceSblAimgrGetPscode: 0xE0DC2587 sceSblAimgrGetPscode2: 0x9A9676D0 sceSblAimgrGetVisibleId: 0x04843835 + sceSblDmac5AesCbcDec: 0x121FA69F + sceSblDmac5AesCbcDecNP: 0x1901CB5E + sceSblDmac5AesCbcEnc: 0xE6E1AD15 + sceSblDmac5AesCbcEncNP: 0x711C057A + sceSblDmac5AesEcbDec: 0x7C978BE7 + sceSblDmac5AesEcbDecNP: 0x197ACF6F + sceSblDmac5AesEcbEnc: 0xC517770D + sceSblDmac5AesEcbEncNP: 0x0F7D28AF + sceSblDmac5Rnd: 0x4DD1B2E5 + sceSblDmac5Sha1HmacTransform: 0x6704D985 sceSblSsCreatePassPhrase: 0xB8B298FD sceSblSsDecryptWithPortability: 0x934DB6B5 sceSblSsEncryptWithPortability: 0x21EC51F6 sceSblSsGetNvsData: 0xFDD6D5DE + sceSblSsMgrAesCmac: 0xEA6ACB6D + sceSblSsMgrAesCmacNP: 0x83B058F5 + sceSblSsMgrAesCtrDecrypt: 0x7D46768C + sceSblSsMgrAesCtrEncrypt: 0x82B5DCEF + sceSblSsMgrAesEcbDecrypt: 0x8B4700CB + sceSblSsMgrAesEcbEncrypt: 0x01BE0374 + sceSblSsMgrDes64CbcDecrypt: 0x926BCCF0 + sceSblSsMgrDes64CbcEncrypt: 0x05B38698 + sceSblSsMgrDes64EcbDecrypt: 0x8EAFB18A + sceSblSsMgrDes64EcbEncrypt: 0x37DD5CBF + sceSblSsMgrExecuteDmac5HashCommand: 0x9641374E + sceSblSsMgrGetRandomData: 0xAC57F4F0 + sceSblSsMgrHmacSha1NP: 0x92E37656 + sceSblSsMgrHmacSha256: 0x79F38554 + sceSblSsMgrMemset: 0xCD98CC92 + sceSblSsMgrSha1: 0xEB3AF9B5 sceSblSsSetNvsData: 0x249ADB07 + SceSblSsMgrForKernel: + nid: 0x74580D9F + functions: + sceSblNvsReadData: 0xC2EC8F5A + sceSblNvsWriteData: 0xE29E161C + sceSblQafManagerGetQAFlags: 0x83D254FF + sceSblQafManagerGetQafName: 0xE2DD0378 diff --git a/nids/360/SceSblSsSmComm.yml b/nids/360/SceSblSsSmComm.yml new file mode 100644 index 0000000..4da82d9 --- /dev/null +++ b/nids/360/SceSblSsSmComm.yml @@ -0,0 +1,11 @@ +modules: + SceSblSsSmComm: + nid: 0xBB4B5D92 + libraries: + SceSblSmCommForKernel: + nid: 0xCD3C89B6 + functions: + sceSblSmCommCallFunc: 0xDB9FC204 + sceSblSmCommStartSmFromData: 0x039C73B1 + sceSblSmCommStartSmFromFile: 0x7863A0CC + sceSblSmCommStopSm: 0x0631F8ED diff --git a/nids/360/SceSblUpdateMgr.yml b/nids/360/SceSblUpdateMgr.yml index 01eeba8..eb778ea 100644 --- a/nids/360/SceSblUpdateMgr.yml +++ b/nids/360/SceSblUpdateMgr.yml @@ -5,4 +5,12 @@ modules: SceSblSsUpdateMgr: nid: 0x31406C49 functions: + sceSblSsUpdateMgrGetBootMode: 0x8E834565 + sceSblSsUpdateMgrGetSpkgInfo: 0x8E3EC2E1 + sceSblSsUpdateMgrSendCommand: 0x1825D954 sceSblSsUpdateMgrSetBootMode: 0xC725E3F0 + sceSblSsUpdateMgrVerifyPup: 0x6F5EDBF4 + sceSblSsUpdateMgrVerifyPupAdditionalSign: 0xB19366CB + sceSblSsUpdateMgrVerifyPupHeader: 0x9BE17A06 + sceSblSsUpdateMgrVerifyPupSegment: 0xD47FD33E + sceSblSsUpdateMgrVerifyPupWatermark: 0xC6CDEB8D diff --git a/nids/360/SceSdif.yml b/nids/360/SceSdif.yml new file mode 100644 index 0000000..985759c --- /dev/null +++ b/nids/360/SceSdif.yml @@ -0,0 +1,20 @@ +modules: + SceSdif: + nid: 0x2E7C52F7 + libraries: + SceSdifForDriver: + nid: 0x96D306FA + functions: + sceSdifGetCID: 0x23A4EF01 + sceSdifGetCardInsertState1: 0x36A2B01B + sceSdifGetCardInsertState2: 0xFD9E5CFA + sceSdifGetSdContextGlobal: 0xDC8F52F8 + sceSdifGetSdContextPartValidateMmc: 0x6A71987F + sceSdifGetSdContextPartValidateSd: 0xB9EA5B1E + sceSdifGetSdContextPartValidateSdio: 0x6A8235FC + sceSdifInitializeMmcDevice: 0x22C82E79 + sceSdifInitializeSdDevice: 0xC1271539 + sceSdifReadSectorMmc: 0x6F8D529B + sceSdifReadSectorSd: 0xB9593652 + sceSdifWriteSectorMmc: 0x175543D2 + sceSdifWriteSectorSd: 0xE0781171 diff --git a/nids/360/SceShellSvc.yml b/nids/360/SceShellSvc.yml index 53047a2..77c7d17 100644 --- a/nids/360/SceShellSvc.yml +++ b/nids/360/SceShellSvc.yml @@ -8,4 +8,15 @@ modules: sceShellUtilInitEvents: 0xE8AD11EC sceShellUtilLock: 0xA9537233 sceShellUtilRegisterEventHandler: 0x7B5EDFE7 + sceShellUtilRequestColdReset: 0x636544FB + sceShellUtilRequestColdResetWithError: 0xBB54D049 + sceShellUtilRequestStandby: 0x8F2F143D + sceShellUtilSetAirplaneIconMode: 0x96BBF91B + sceShellUtilSetBGMMode: 0xB65B60CA + sceShellUtilSetBtIconMode: 0x8B69AD27 + sceShellUtilSetSystemLanguage: 0x040997D6 + sceShellUtilSetTimeText: 0x40DFAC6B + sceShellUtilTextClipboardGetUsedSize: 0xD0DDEDBC + sceShellUtilTextClipboardRead: 0x1B186905 + sceShellUtilTextClipboardWrite: 0xC4810C56 sceShellUtilUnlock: 0x21A6CF54 diff --git a/nids/360/SceSyscon.yml b/nids/360/SceSyscon.yml index b0f64d6..747a1c8 100644 --- a/nids/360/SceSyscon.yml +++ b/nids/360/SceSyscon.yml @@ -5,43 +5,72 @@ modules: SceSysconForDriver: nid: 0x60A35F64 functions: + sceSysconBatteryExecBLCommand: 0x74B2AB55 + sceSysconBatteryReadBLCommand: 0x448DAFF1 + sceSysconBatterySWReset: 0x87DA378D + sceSysconBatterySetBLCommand: 0xE4F29744 + sceSysconBatteryStartBLMode: 0x2CEF078E + sceSysconBatteryStopBLMode: 0xE4AE7852 sceSysconBeginConfigstorageTransaction: 0xA4968B8C sceSysconClearTemperatureLog: 0x3843D657 sceSysconCmdExec: 0x9ADDCA4A sceSysconCmdExecAsync: 0xC2224E82 sceSysconCmdSync: 0x6E517D22 sceSysconCommitConfigstorageTransaction: 0x7B9B3617 + sceSysconCtrlAccPower: 0x8D1D97E8 + sceSysconCtrlDeviceReset: 0x40FF3898 sceSysconCtrlHdmiCecPower: 0x62155962 + sceSysconCtrlHostOutputViaDongle: 0xDECCB2B4 sceSysconCtrlLED: 0x04EC7579 sceSysconCtrlManualChargeMode: 0xC6A2C9EF - sceSysconCtrlMsPower: 0x710A7CF0 + sceSysconCtrlRMRPower: 0x710A7CF0 sceSysconCtrlSdPower: 0xBE1ADE4F + sceSysconCtrlWirelessPower: 0x4FBDA504 + sceSysconCtrlWirelessPowerDown: 0xDF8C6D2D sceSysconEnableHibernateIO: 0x4946538A sceSysconEndConfigstorageTransaction: 0xFCC3E8EE sceSysconGetBaryonTimestamp: 0x4D588A0A sceSysconGetBaryonVersion: 0xFF86F4C5 sceSysconGetBatteryCalibData: 0x9ADC9936 + sceSysconGetBatteryVersion: 0x68E0031E sceSysconGetHardwareInfo: 0xCBD6D8BC sceSysconGetHardwareInfo2: 0x965C68C3 sceSysconGetLogInfo: 0x701535FC sceSysconGetManualChargeMode: 0x4FEC564C sceSysconGetManufacturesStatus: 0x3E09A1F4 + sceSysconGetMultiCnInfo: 0x1503D6A0 sceSysconGetTemperatureLog: 0x3B354824 + sceSysconGetTouchpanelDeviceInfo: 0xF492E69E sceSysconGetUsbDetStatus: 0xEF810687 sceSysconIduModeClear: 0x34574496 sceSysconIduModeSet: 0x956D07CB sceSysconIsDownLoaderMode: 0x9ADD60D2 + sceSysconIsLowBatteryInhibitUpdateDownload: 0x1E3130EE + sceSysconIsLowBatteryInhibitUpdateReboot: 0x1A0C140F + sceSysconJigClosePort: 0x483FAE05 + sceSysconJigOpenPort: 0x44A173F5 + sceSysconJigSetConfig: 0xD24BF916 sceSysconLoadConfigstorageScript: 0x89C5CFD6 sceSysconLogReadData: 0x487D97F3 sceSysconLogStart: 0x4E55CF5E sceSysconLogStartWaiting: 0x9C0B1E61 + sceSysconNvsReadData: 0xACAFA2B8 + sceSysconNvsSetRunMode: 0x81A6060D + sceSysconNvsWriteData: 0x10C9657A sceSysconReadCommand: 0x299B1CE7 - sceSysconResetDevice: 0x8A95D35C sceSysconSendCommand: 0xE26488B9 + sceSysconSetAlarmCallback: 0x32418370 sceSysconSetDebugHandlers: 0xF245CD6F sceSysconSetLowBatteryCallback: 0x3F0DB7C0 + sceSysconSetMultiCnPort: 0x8AAB6308 + sceSysconSetPowerMode: 0x8A95D35C sceSysconSetThermalAlertCallback: 0x773B8126 sceSysconShowModeClear: 0x8D7724C0 sceSysconShowModeSet: 0x6D65B70F + sceSysconUpdaterCalcChecksum: 0xD27C3D80 + sceSysconUpdaterExecFinalize: 0xC7747A63 + sceSysconUpdaterExecProgramming: 0x69AD76E4 + sceSysconUpdaterSetRunMode: 0xB487C2FB + sceSysconUpdaterSetSegment: 0x9B00BC7F sceSysconVerifyConfigstorageScript: 0xCC6F90A8 sceSysconWaitInitialized: 0x55DF1C9B diff --git a/nids/360/SceSysmem.yml b/nids/360/SceSysmem.yml index f79b80c..8361858 100644 --- a/nids/360/SceSysmem.yml +++ b/nids/360/SceSysmem.yml @@ -2,9 +2,89 @@ modules: SceSysmem: nid: 0x3380B323 libraries: + SceCpu: + nid: 0x45265161 + functions: + sceKernelCpuGetCpuId: 0x2704CFEE SceCpuForDriver: nid: 0x40ECDB0E functions: + sceKernelCpuAtomicAddAndGet16: 0x59F74E94 + sceKernelCpuAtomicAddAndGet32: 0x5F6A8743 + sceKernelCpuAtomicAddAndGet64: 0x4E459A03 + sceKernelCpuAtomicAddAndGet8: 0x1E850481 + sceKernelCpuAtomicAddUnless16: 0x0F84AFE9 + sceKernelCpuAtomicAddUnless32: 0x1F157DC3 + sceKernelCpuAtomicAddUnless64: 0x06CCFA4B + sceKernelCpuAtomicAddUnless8: 0x5CC62CEC + sceKernelCpuAtomicAndAndGet16: 0xB281D52A + sceKernelCpuAtomicAndAndGet32: 0xDF899E4B + sceKernelCpuAtomicAndAndGet64: 0xD18E7B54 + sceKernelCpuAtomicAndAndGet8: 0x32B62B1A + sceKernelCpuAtomicClearAndGet16: 0x6B050D7C + sceKernelCpuAtomicClearAndGet32: 0x78C1F148 + sceKernelCpuAtomicClearAndGet64: 0x2149CD4C + sceKernelCpuAtomicClearAndGet8: 0x8E538AB5 + sceKernelCpuAtomicClearMask16: 0x1BE58599 + sceKernelCpuAtomicClearMask32: 0x4AE1BCC0 + sceKernelCpuAtomicClearMask64: 0x55760309 + sceKernelCpuAtomicClearMask8: 0x1B3336B0 + sceKernelCpuAtomicCompareAndSet16: 0x6F63F56D + sceKernelCpuAtomicCompareAndSet32: 0xCDA96E81 + sceKernelCpuAtomicCompareAndSet64: 0x4B527009 + sceKernelCpuAtomicCompareAndSet8: 0x3627F4E0 + sceKernelCpuAtomicDecIfPositive16: 0x9A693F5B + sceKernelCpuAtomicDecIfPositive32: 0x2A71B03C + sceKernelCpuAtomicDecIfPositive64: 0x267D0B33 + sceKernelCpuAtomicDecIfPositive8: 0x45153D4E + sceKernelCpuAtomicGetAndAdd16: 0x225DF91A + sceKernelCpuAtomicGetAndAdd32: 0x341B6E81 + sceKernelCpuAtomicGetAndAdd64: 0x043FD446 + sceKernelCpuAtomicGetAndAdd8: 0xFCDCD4DE + sceKernelCpuAtomicGetAndAnd16: 0x4A820BC5 + sceKernelCpuAtomicGetAndAnd32: 0x10EB35EB + sceKernelCpuAtomicGetAndAnd64: 0x18A17E07 + sceKernelCpuAtomicGetAndAnd8: 0xD8E675C0 + sceKernelCpuAtomicGetAndClear16: 0x8E9C086D + sceKernelCpuAtomicGetAndClear32: 0xE36F3A46 + sceKernelCpuAtomicGetAndClear64: 0x88BA6002 + sceKernelCpuAtomicGetAndClear8: 0x382D1466 + sceKernelCpuAtomicGetAndOr16: 0x004F09D1 + sceKernelCpuAtomicGetAndOr32: 0x2A40BB93 + sceKernelCpuAtomicGetAndOr64: 0xCB73D6D5 + sceKernelCpuAtomicGetAndOr8: 0xBDF6F8E4 + sceKernelCpuAtomicGetAndSet16: 0x085532C8 + sceKernelCpuAtomicGetAndSet32: 0x0EE04C03 + sceKernelCpuAtomicGetAndSet64: 0xD2DEE625 + sceKernelCpuAtomicGetAndSet8: 0x29599FC8 + sceKernelCpuAtomicGetAndSub16: 0x3EE9B5B8 + sceKernelCpuAtomicGetAndSub32: 0xF891CF2A + sceKernelCpuAtomicGetAndSub64: 0xA7585370 + sceKernelCpuAtomicGetAndSub8: 0x7B43D0D7 + sceKernelCpuAtomicGetAndXor16: 0x711801E6 + sceKernelCpuAtomicGetAndXor32: 0x77E34309 + sceKernelCpuAtomicGetAndXor64: 0xE212ECAD + sceKernelCpuAtomicGetAndXor8: 0xBAF47F7B + sceKernelCpuAtomicOrAndGet16: 0xADD39B84 + sceKernelCpuAtomicOrAndGet32: 0xBC248C30 + sceKernelCpuAtomicOrAndGet64: 0x3E218AF7 + sceKernelCpuAtomicOrAndGet8: 0x5D515F1B + sceKernelCpuAtomicSet16: 0x532CA3E8 + sceKernelCpuAtomicSet32: 0x3168BC57 + sceKernelCpuAtomicSet64: 0xC381CE8C + sceKernelCpuAtomicSet8: 0x0836537E + sceKernelCpuAtomicSetIfGreaterGet16: 0x875B094D + sceKernelCpuAtomicSetIfGreaterGet32: 0x26F71995 + sceKernelCpuAtomicSetIfGreaterGet8: 0xC3868071 + sceKernelCpuAtomicSubAndGet16: 0x515682C9 + sceKernelCpuAtomicSubAndGet32: 0xA4884C4E + sceKernelCpuAtomicSubAndGet64: 0xB5F8919C + sceKernelCpuAtomicSubAndGet8: 0xEB085370 + sceKernelCpuAtomicXorAndGet16: 0x646003D6 + sceKernelCpuAtomicXorAndGet32: 0x4244BE65 + sceKernelCpuAtomicXorAndGet64: 0x692C51B3 + sceKernelCpuAtomicXorAndGet8: 0x03887992 + sceKernelCpuDcacheAndL2CleanInvalidateMVACRange_20: 0xE551F99B sceKernelCpuDcacheAndL2InvalidateRange: 0x02796361 sceKernelCpuDcacheAndL2WritebackInvalidateRange: 0x364E68A4 sceKernelCpuDcacheAndL2WritebackRange: 0x103872A5 @@ -13,28 +93,61 @@ modules: sceKernelCpuDisableInterrupts: 0x821FC0EE sceKernelCpuEnableInterrupts: 0xF5BAD43B sceKernelCpuGetCpuId: 0x5E4D5DE1 + sceKernelCpuIsVaddrMapped: 0x337CBDF3 + sceKernelCpuLockStoreFlag: 0x3F42B434 + sceKernelCpuLockStoreLR: 0xBF82DEB2 + sceKernelCpuLockSuspendIntrStoreFlag: 0x4C38CE4D sceKernelCpuResumeIntr: 0x7BB9D5DF sceKernelCpuSpinLockIrqRestore: 0x740A0750 sceKernelCpuSpinLockIrqSave: 0xEC53D007 + sceKernelCpuSpinLockStoreLR: 0xCAC9AE80 + sceKernelCpuSpinUnlockStoreLR: 0xF5FD5676 sceKernelCpuSuspendIntr: 0xD32ACE9E + sceKernelCpuTryLockStoreFlag: 0x4F7790B4 + sceKernelCpuTryLockStoreLR: 0x5AC9D394 + sceKernelCpuTryLockSuspendIntrStoreFlag: 0xDE6482C6 + sceKernelCpuTryLockSuspendIntrStoreLR: 0x27C0B340 + sceKernelCpuTrySpinLockStoreLR: 0x093925BD + sceKernelCpuTrySpinLockSuspendIntrStoreLR: 0xF02467D1 + sceKernelCpuUnlockResumeIntrStoreFlag: 0x9EC91017 + sceKernelCpuUnlockStoreFlag: 0xCB8ABDF0 + sceKernelCpuUnlockStoreLR: 0xD6ED0C46 SceCpuForKernel: nid: 0x54BF2BAB functions: + sceKernelCpuBranchPredictorInvalidateAll: 0x4C4C7D6B + sceKernelCpuBranchPredictorInvalidateAllIS: 0x1BB2BB8D + sceKernelCpuDcacheCleanInvalidateMVAC: 0xC8E8C9E9 + sceKernelCpuDcacheCleanMVAC: 0xF7159B55 + sceKernelCpuDcacheCleanMVACRange: 0xC5C1EE4E sceKernelCpuDcacheInvalidateAll: 0x2F3BF020 + sceKernelCpuDcacheInvalidateMVAC: 0x470EAE1E + sceKernelCpuDcacheInvalidateMVACRange: 0x583F30D1 sceKernelCpuDcacheWritebackAll: 0x73A30DB2 sceKernelCpuDcacheWritebackInvalidateAll: 0x76DAB4D0 sceKernelCpuDcacheWritebackInvalidateRange: 0x6BA2E51C + sceKernelCpuGetCONTEXTIDR: 0x5B6B3274 + sceKernelCpuGetPaddr: 0x2A46E800 sceKernelCpuIcacheAndL2WritebackInvalidateRange: 0x19F17BD0 sceKernelCpuIcacheInvalidateAll: 0x264DA250 + sceKernelCpuIcacheInvalidateAllU: 0xAEE0B489 sceKernelCpuIcacheInvalidateRange: 0xF4C7F578 + sceKernelCpuPreloadEngineKill: 0xD0D85FF8 sceKernelCpuRestoreContext: 0x0A4F0FB9 sceKernelCpuSaveContext: 0x211B89DA sceKernelCpuUnrestrictedMemcpy: 0x8C683DEC + sceKernelCpuUpdateSCTLR: 0x04008CF7 + sceKernelMMUVAtoPAWithMode: 0x67343A07 SceDebugForDriver: nid: 0x88758561 functions: + sceDebugPrintKernelAssertion: 0x35A35322 + sceDebugPrintKernelPanic: 0x391B5B74 sceDebugPrintf: 0x391B74B7 sceDebugPrintf2: 0x02B04343 + sceDebugPrintfKernelAssertion: 0x821A2D59 + sceDebugPrintfKernelPanic: 0x00CCE39C + sceDebugVprintf: 0x411C0733 SceDebugForKernel: nid: 0x88C17370 functions: @@ -43,6 +156,30 @@ modules: sceDebugPutchar: 0x82D2EDCE sceDebugRegisterPutcharHandler: 0xE6115A72 sceDebugSetHandlers: 0x10067B7B + SceDebugLed: + nid: 0xAE004C0A + functions: + sceKernelGetGPI: 0x14F582CF + sceKernelSetGPO: 0x78E702D3 + SceDebugLedForDriver: + nid: 0x7BC05EAD + functions: + sceKernelGetGPO: 0x3BB289F7 + sceKernelSetGPI: 0x51C5325A + sceKernelSetGPOMask: 0x098473B0 + SceDipsw: + nid: 0xB36D5922 + functions: + sceKernelCheckDipsw: 0x1C783FB2 + sceKernelClearDipsw: 0x800EDCC1 + sceKernelSetDipsw: 0x817053D4 + SceDipswForDriver: + nid: 0xC9E26388 + functions: + sceKernelCheckDipsw: 0xA98FC2FD + sceKernelClearDipsw: 0xF1F3E9FE + sceKernelGetDipswInfo: 0xB2AD48BE + sceKernelSetDipsw: 0x82E45FBF SceKernelSuspendForDriver: nid: 0x7290B21C functions: @@ -53,6 +190,13 @@ modules: SceKernelUtilsForDriver: nid: 0x496AD8B4 functions: + sceAesDecrypt1: 0xD8678061 + sceAesDecrypt2: 0xE39CD272 + sceAesEncrypt1: 0xC2A61770 + sceAesEncrypt2: 0x302947B6 + sceAesInit1: 0xF12B6451 + sceAesInit2: 0xEDA97D6D + sceAesInit3: 0x72408E29 sceDeflateDecompress: 0x8AF1FAD4 sceDeflateDecompressPartial: 0x3D74CCDF sceGzipDecompress: 0x367EE3DF @@ -61,6 +205,11 @@ modules: sceGzipGetInfo: 0xFFC6A10F sceGzipGetName: 0xF901FD3E sceGzipIsValid: 0xD8FAEFD4 + sceHmacSha1Digest: 0x29A28957 + sceHmacSha224Digest: 0x7F2A7B99 + sceHmacSha256Digest: 0x83EFA1CC + sceMt19937GlobalInit: 0xD428CC2A + sceMt19937GlobalUninit: 0x875B2A1C sceMt19937Init: 0x4C9A5730 sceMt19937UInt: 0x92AEDFBC sceSfmt19937FillArray32: 0x2B30548B @@ -84,11 +233,24 @@ modules: sceZlibDecompress: 0x900148DB sceZlibGetCompressedData: 0x01EB6C45 sceZlibGetInfo: 0x5B9BCD75 + ScePmMgrForDriver: + nid: 0xF13F32F9 + functions: + scePmMgrGetProductMode: 0x2AC815A2 + scePmMgrIsExternalBootMode: 0xBD1F193B + SceProcEventForDriver: + nid: 0x887F19D0 + functions: + sceKernelInvokeProcEventHandler: 0x414CC813 + sceKernelRegisterProcEventHandler: 0x2A43912D + sceKernelUnregisterProcEventHandler: 0x3DED57CC SceQafMgrForDriver: nid: 0x4E29D3B6 functions: sceSblQafMgrIsAllowControlIduAutoUpdate: 0xF8BFEE48 + sceSblQafMgrIsAllowDecryptedBootConfigLoad: 0x883E9465 sceSblQafMgrIsAllowDtcpIpReset: 0xE8B8F31F + sceSblQafMgrIsAllowHost0Access: 0x082A4FC2 sceSblQafMgrIsAllowKeepCoreFile: 0xC1EA75C8 sceSblQafMgrIsAllowLoadMagicGate: 0x36E5312E sceSblQafMgrIsAllowMarlinTest: 0x10283EB8 @@ -99,24 +261,43 @@ modules: SceSblAIMgrForDriver: nid: 0xFD00C69A functions: + sceSblAimgrGetProductSubCode: 0xB33CEC8F sceSblAimgrGetSMI: 0x47D9CF13 + sceSblAimgrGetTargetId: 0x14345161 sceSblAimgrIsCEX: 0xD78B04A2 sceSblAimgrIsDEX: 0xF4B98F66 sceSblAimgrIsDolce: 0x71608CA3 sceSblAimgrIsGenuineDolce: 0xC6E83F34 sceSblAimgrIsGenuineVITA: 0x963CA644 + sceSblAimgrIsJapaneseFat: 0x6D5A3FC9 + sceSblAimgrIsPrototypeRev2: 0xFF5784B9 + sceSblAimgrIsPrototypeRev7: 0x05F79D4A sceSblAimgrIsTest: 0x3B638885 sceSblAimgrIsTool: 0x274663A0 + sceSblAimgrIsToolRev3: 0xBB9D146B + sceSblAimgrIsToolRev4: 0x37A79140 + sceSblAimgrIsToolRev5: 0xE5E47FF7 sceSblAimgrIsVITA: 0x4273B97B SceSysclibForDriver: nid: 0x7EE45391 functions: + __aeabi_idiv: 0x2518CD9E + __aeabi_lcmp: 0x709077A1 + __aeabi_lmul: 0xFEE5E751 + __aeabi_uidiv: 0xA9FF1205 + __aeabi_uidivmod: 0xA46CB7DE + __aeabi_ulcmp: 0xFE900DE8 __memcpy_chk: 0x8A0B0815 __memmove_chk: 0x35DBB110 __memset_chk: 0x1A30BB28 + __snprintf_chk: 0x7DBE7007 __stack_chk_fail: 0xB997493D + __strlcat_chk: 0x224BE33F + __strlcpy_chk: 0xCF86EA38 __strncat_chk: 0x33EE298B __strncpy_chk: 0x96268C53 + __vsnprintf_chk: 0xCBF64DF6 + __vsnprintf_internal: 0xE38E7605 look_ctype_table: 0xCDF7F155 memchr: 0x60DAEA30 memcmp: 0xF939E83D @@ -139,6 +320,7 @@ modules: strtol: 0xAB77C5AA strtoll: 0x87AAAFA2 strtoul: 0x4E5042DA + timingsafe_memcmp: 0xB5A4D745 tolower: 0x0021DAF9 toupper: 0xA685DCB1 vsnprintf: 0x3DDBE2E1 @@ -168,29 +350,79 @@ modules: SceSysmemForDriver: nid: 0x6F25E18A functions: + sceGUIDReferObjectWithClassLevel: 0x77066FD1 + sceKernelAddressSpaceVAtoPABySW: 0x65419BD3 sceKernelAllocHeapMemory: 0x7B4CB60A + sceKernelAllocHeapMemoryFromGlobalHeap: 0x7750CEA7 + sceKernelAllocHeapMemoryFromGlobalHeapWithOpt: 0x0B4ED16A + sceKernelAllocHeapMemoryWithOpt1: 0xB415B5A8 + sceKernelAllocHeapMemoryWithOption: 0x49D4DD9B sceKernelAllocMemBlock: 0xC94850C9 + sceKernelAllocMemBlockWithInfo: 0xD44F464D sceKernelCreateClass: 0x61317102 sceKernelCreateHeap: 0x9328E0E8 + sceKernelCreateUidObj2: 0x56A13E90 + sceKernelCreateUidObjForUid: 0x89A44858 sceKernelCreateUserUid: 0xBF209859 + sceKernelCreateUserUidForClass: 0xCED1547B + sceKernelCreateUserUidForName: 0x513B9DDD + sceKernelCreateUserUidForNameWithClass: 0x8DA0BCA5 sceKernelDeleteHeap: 0xD6437637 sceKernelDeleteUid: 0x047D32F2 sceKernelDeleteUserUid: 0x84A4AF5E + sceKernelFindMemBlock: 0x9C78064C sceKernelFindMemBlockByAddr: 0x8A1742F6 + sceKernelFindMemBlockByAddrForDefaultSize: 0xF3BBE2E1 sceKernelFindMemBlockByAddrForPid: 0x857F1D5A + sceKernelFindMemBlockForPid: 0x9F6E45E3 + sceKernelFirstDifferentBlock32User: 0xBDA6E42B + sceKernelFirstDifferentBlock64User: 0xBB3B02C2 + sceKernelFirstDifferentBlock64UserForPid: 0xE83855FD sceKernelFirstDifferentIntUserForPid: 0x8334454F sceKernelFreeHeapMemory: 0x3EBCE343 + sceKernelFreeHeapMemoryFromGlobalHeap: 0xFB817A59 sceKernelFreeMemBlock: 0x009E1C61 + sceKernelGUIDGetObject: 0x0FC24464 + sceKernelGetClassForPidForUid: 0xE9728A12 + sceKernelGetClassForUid: 0xC74B0152 sceKernelGetMemBlockBase: 0xA841EDDA + sceKernelGetMemBlockMappedBase: 0x0B1FD5C3 + sceKernelGetMemBlockPARange: 0x98C15666 + sceKernelGetMemBlockPaddrListForUid: 0x19A51AC7 + sceKernelGetMemBlockVBase: 0xB81CF0A3 + sceKernelGetNameForPidByUid: 0x09896EB7 + sceKernelGetNameForUid: 0xA78755EB + sceKernelGetNameForUid2: 0xE655852F sceKernelGetObjForUid: 0x00ED6C14 + sceKernelGetObjectForPidForUid: 0xFE6D7FAE + sceKernelGetObjectForUidForAttr: 0xF6DB54BA + sceKernelGetObjectForUidForClassTree: 0x72A98D17 sceKernelGetPaddr: 0x8D160E65 sceKernelGetPaddrList: 0xE68BEEBD + sceKernelGetPaddrListForLargePage: 0x08A8A7E8 + sceKernelGetPaddrListForSmallPage: 0x16844CE6 + sceKernelGetPaddrPair: 0xAE36C775 + sceKernelGetPaddrPairForLargePage: 0x32257A24 + sceKernelGetPaddrPairForSmallPage: 0xB3575090 + sceKernelGetPhysicalMemoryType: 0x0AAA4FDD sceKernelGetPidContext: 0x2ECF7944 sceKernelGetUidClass: 0x85336A1C + sceKernelIsPaddrWithinSameSectionForUid: 0xF4AD89D8 sceKernelKernelUidForUserUid: 0x45D22597 + sceKernelKernelUidForUserUidForClass: 0x184172B1 sceKernelMapBlockUserVisible: 0x58D21746 + sceKernelMapBlockUserVisibleWithFlag: 0x04059C4B sceKernelMapUserBlock: 0x7D4F8B5F + sceKernelMapUserBlockDefaultType: 0x278BC201 + sceKernelMapUserBlockDefaultTypeForPid: 0x0091D74D + sceKernelMemBlockDecRefCounterAndReleaseUid: 0xF50BDC0C + sceKernelMemBlockGetInfoEx: 0x24A99FFF + sceKernelMemBlockGetInfoExForVisibilityLevel: 0xA73CFFEF + sceKernelMemBlockGetSomeSize: 0x78337B62 + sceKernelMemBlockIncRefCounterAndReleaseUid: 0xEAF3849B sceKernelMemBlockRelease: 0x00575B00 + sceKernelMemBlockType2Memtype: 0x20C811FA + sceKernelMemBlockTypeGetPrivileges: 0x6A0792A3 sceKernelMemRangeRelease: 0x75C70DE0 sceKernelMemRangeReleaseForPid: 0xA8525B06 sceKernelMemRangeReleaseWithPerm: 0x22CBE925 @@ -202,14 +434,20 @@ modules: sceKernelMemcpyKernelToUserForPidUnchecked: 0xFED82F2D sceKernelMemcpyUserToKernel: 0xBC996A7A sceKernelMemcpyUserToKernelForPid: 0x605275F8 + sceKernelMemcpyUserToUser: 0x1BD44DD5 sceKernelMemcpyUserToUserForPid: 0x8E086C33 + sceKernelOpenUidForName: 0xD76E7452 + sceKernelProcModeVAtoPA: 0x61A67D32 sceKernelRemapBlock: 0xDFE2C8CB sceKernelRoMemcpyKernelToUserForPid: 0x571D2739 + sceKernelSetNameForPidForUid: 0x12624884 + sceKernelSetObjectForUid: 0x4CFA4100 sceKernelStrncpyKernelToUser: 0x80BD6FEB sceKernelStrncpyUserForPid: 0x75AAF178 sceKernelStrncpyUserToKernel: 0xDB3EC244 sceKernelStrnlenUser: 0xB429D419 sceKernelStrnlenUserForPid: 0x9929EB07 + sceKernelSwitchPidContext: 0x2D711589 sceKernelSwitchVmaForPid: 0x6F2ACDAE sceKernelUidRelease: 0x149885C4 sceKernelUidRetain: 0x0F5C84B7 @@ -217,23 +455,83 @@ modules: SceSysmemForKernel: nid: 0x63A519E5 functions: + sceGUIDGetObjectWithClass: 0x7ABFA9A7 + sceGUIDGetUIDVectorByClass: 0xEC7D36EF + sceGUIDKernelCreateWithAttr: 0x53E1FFDE + sceGUIDOpenByGUID: 0xCF53EEE4 + sceKernelAddressSpaceFreeAllMemBlock: 0x89CE1F31 + sceKernelAddressSpaceSetPhyMemPart: 0x67955EE9 + sceKernelAddressSpaceUnmap: 0xCE72839E + sceKernelAddressSpaceVAtoPA: 0xF2179820 + sceKernelAllocSystemCallTable: 0x5FFE4B79 + sceKernelCreateAddressSpace: 0x4A3737F0 sceKernelCreateUidObj: 0xDF0288D7 + sceKernelDeleteAddressSpace: 0xF2D7FE3A sceKernelFindClassByName: 0x62989905 + sceKernelFreeSimpleMemBlock: 0xA1FFA2C9 + sceKernelGetFixedHeapInfoByPointer: 0x219E90FD + sceKernelGetHeapInfo: 0x91733EF4 + sceKernelGetHeapInfoByPtr: 0x68451777 sceKernelGetMemBlockType: 0x289BE3EC + sceKernelGetUidDLinkClass: 0xC105604E + sceKernelGetUidHeapClass: 0x4CCA935D + sceKernelGetUidMemBlockClass: 0xAF729575 + sceKernelNameHeapGetInfo: 0xE443253B sceKernelRxMemcpyKernelToUserForPid: 0x30931572 + sceKernelSysrootAlloc: 0xC0A4D2F3 + sceKernelUIDEntryHeapGetInfo: 0x686AA15C + SceSysrootForDriver: + nid: 0x2ED7F97A + functions: + sceKernelInvokeInitCallback: 0x93CD44CD + sceKernelSysrootCheckModelCapability: 0x8AA268D6 + sceKernelSysrootCoredumpTrigger: 0xCD8CD242 + sceKernelSysrootGetShellPid: 0x05093E7B + sceKernelSysrootGetSystemSwVersion: 0x67AAB627 + sceKernelSysrootSetProcessHandler: 0x0F07C3FC + sceKernelSysrootSetSystemSwVersion: 0x3276086B + sceSysrootGetHardwareInfo: 0x930B1342 + sceSysrootUtMgrHasNpTestFlag: 0xA43599E9 + sceSysrootUtMgrSetNpTestFlag: 0xEE5D6CE9 SceSysrootForKernel: nid: 0x3691DA45 functions: + sceKernelAllocHeapMemory2: 0xD351EBC8 sceKernelGetProcessTitleId: 0xEC3124A3 sceKernelGetSysbase: 0x3E455842 sceKernelGetSysrootBuffer: 0x9DB56D1F + sceKernelIsColdBoot: 0xD7198963 + sceKernelIsSomeBootMode: 0x7B7F8171 + sceKernelSysrootAppMgrSpawnProcess: 0x3ACACD22 + sceKernelSysrootCheckRemapCodeForUser: 0xF8769E86 + sceKernelSysrootDbgpSuspendProcessAndWaitResume: 0x256B2394 + sceKernelSysrootGetCurrentAddressSpaceCB: 0x63EBB05B + sceKernelSysrootGetCurrentUIDEntryHeapCB: 0xB4C24588 + sceKernelSysrootGetModulePrivate: 0x37EC12BB + sceKernelSysrootGetPUIDEntryHeap: 0x88DE85EF + sceKernelSysrootGetSharedMemory: 0xC8C8C321 + sceKernelSysrootGetStatus: 0x5C426B19 + sceKernelSysrootGetThreadAccessLevel: 0x20009397 + sceKernelSysrootGetVbaseResetVector: 0xCC85905B + sceKernelSysrootIofilemgrStart: 0xF6A6D205 + sceKernelSysrootIsUserModeThread: 0x7FC7A163 + sceKernelSysrootProcessmgrStart2: 0x62E8F511 + sceKernelSysrootSetSysroot: 0x36916C30 + sceSysrootGetFactorySystemSwVersion: 0xD3872270 + sceSysrootGetModuleInfoForPid: 0xFF9F80FF + sceSysrootGetNidName: 0x0B79E220 + sceSysrootGetSelfAuthInfo: 0x4F0A4066 + sceSysrootGetSelfInfo: 0xF10AB792 + sceSysrootGetSessionId: 0x84783B71 + sceSysrootGetWakeupFactor: 0x2F97041A sceSysrootIsAuCodecIcConexant: 0x46E72428 sceSysrootIsBsodReboot: 0x4373AC96 sceSysrootIsExternalBootMode: 0x89D19090 - sceSysrootIsManufacturingMode: 0x55392965 sceSysrootIsSafeMode: 0x834439A7 sceSysrootIsUpdateMode: 0xB0E1FC67 sceSysrootIsUsbEnumWakeup: 0x79C9AE10 + sceSysrootRegisterLicMgrGetLicenseStatus: 0x71DB83A2 + sceSysrootUseExternalStorage: 0x55392965 sceSysrootUseInternalStorage: 0x50FE3B4D SceUartForKernel: nid: 0xC03DBE40 diff --git a/nids/360/SceSystimer.yml b/nids/360/SceSystimer.yml new file mode 100644 index 0000000..97d9182 --- /dev/null +++ b/nids/360/SceSystimer.yml @@ -0,0 +1,8 @@ +modules: + SceSystimer: + nid: 0x9A1E946B + libraries: + SceSystimerForDriver: + nid: 0xA47EB09A + functions: + sceKernelSysTimerAlloc: 0xE2B9D8E9 diff --git a/nids/360/SceTouch.yml b/nids/360/SceTouch.yml index 993ed07..6955c63 100644 --- a/nids/360/SceTouch.yml +++ b/nids/360/SceTouch.yml @@ -15,6 +15,7 @@ modules: sceTouchGetDeviceInfo: 0xD7889B91 sceTouchGetPanelInfo: 0x10A2CA25 sceTouchGetPixelDensity: 0xF0704CF3 + sceTouchGetPixelDensity2: 0xE0C1DB92 sceTouchGetProcessInfo: 0xAB364C23 sceTouchGetSamplingState: 0x26531526 sceTouchGetSamplingStateExt: 0xDC8671EA @@ -47,6 +48,7 @@ modules: sceTouchRead: 0x70C8AACE sceTouchReadRegion: 0x9A91F624 sceTouchRegisterVirtualTouchDriver: 0x03C3AC7C + sceTouchSetCtrlpCallback: 0x628D9324 sceTouchSetRegion: 0x7985B164 sceTouchSetRegionAttr: 0x10A998DE sceTouchSetSamplingState: 0x1247257A diff --git a/nids/360/SceUdcd.yml b/nids/360/SceUdcd.yml index 36cc553..c5647e4 100644 --- a/nids/360/SceUdcd.yml +++ b/nids/360/SceUdcd.yml @@ -15,21 +15,34 @@ modules: nid: 0xBC05A8FB functions: sceUdcdActivate: 0x4FDEA423 + sceUdcdActivateInternal: 0x9119247B sceUdcdClearFIFO: 0x9F53D64D + sceUdcdClearFIFOInternal: 0xA35F3BAF sceUdcdDeactivate: 0x8AE87657 + sceUdcdDeactivateInternal: 0xFDC10F93 sceUdcdGetDeviceInfo: 0xFBEA3703 + sceUdcdGetDeviceInfoInternal: 0x45EB0177 sceUdcdGetDeviceState: 0xE054B5E4 + sceUdcdGetDeviceStateInternal: 0x409DD196 sceUdcdGetDrvState: 0xC0CA5DDB sceUdcdGetDrvStateInternal: 0x512F77BC sceUdcdRegister: 0x4E55244D - sceUdcdRegisterToBus: 0x64675918 + sceUdcdRegisterInternal: 0x64675918 sceUdcdReqCancelAll: 0x38787672 sceUdcdReqRecv: 0xC60A74B2 + sceUdcdReqRecvInternal: 0x175E6179 sceUdcdReqSend: 0x1ED0E89E + sceUdcdReqSendInternal: 0x2E3E622A sceUdcdStall: 0x34079250 + sceUdcdStallInternal: 0x9B44DF29 sceUdcdStart: 0x9FD733EA + sceUdcdStartCurrentInternal: 0x360E95B9 + sceUdcdStartInternal: 0x90F8BCAE sceUdcdStop: 0x1494293B + sceUdcdStopCurrentInternal: 0x0F3595AE + sceUdcdStopInternal: 0x150FD3BB sceUdcdUnregister: 0x0DECE532 + sceUdcdUnregisterInternal: 0x6CCD152E sceUdcdWaitBusInitialized: 0x1C684884 sceUdcdWaitState: 0xD03017C0 sceUdcdWaitStateInternal: 0x7AD0C8D1 diff --git a/nids/360/SceUlobjMgr.yml b/nids/360/SceUlobjMgr.yml new file mode 100644 index 0000000..165ce21 --- /dev/null +++ b/nids/360/SceUlobjMgr.yml @@ -0,0 +1,10 @@ +modules: + SceUlobjMgr: + nid: 0xAC99A848 + libraries: + SceUlobjMgr: + nid: 0xDB18BB68 + functions: + _sceUlobjMgrRegisterLibultProtocolRevision: 0x50F2F2AA + _sceUlobjMgrStartSupportingUserlevelObject: 0x08769991 + _sceUlobjMgrStopSupportingUserlevelObject: 0xEF09284B diff --git a/nids/360/SceUsbServ.yml b/nids/360/SceUsbServ.yml new file mode 100644 index 0000000..f20aa15 --- /dev/null +++ b/nids/360/SceUsbServ.yml @@ -0,0 +1,9 @@ +modules: + SceUsbServ: + nid: 0xAE54F579 + libraries: + SceUsbServ: + nid: 0xDA3C0EF0 + functions: + sceUsbServAccessoryActivate: 0xB33AA2EB + sceUsbServAccessoryDeactivate: 0x154246A9 diff --git a/nids/360/SceVshBridge.yml b/nids/360/SceVshBridge.yml index 4f85b9c..6ed654e 100644 --- a/nids/360/SceVshBridge.yml +++ b/nids/360/SceVshBridge.yml @@ -2,6 +2,13 @@ modules: SceVshBridge: nid: 0xA2BE1892 libraries: + SceDrmBridge: + nid: 0xFF4CD67F + functions: + sceDrmBridgeGetCurrentSecureTick: 0xFFB164E2 + sceDrmBridgeIsAllowRemotePlayDebug: 0x1BBB62E9 + sceDrmBridgeMlnpsnlAuth1: 0xE04F767B + sceDrmBridgeMlnpsnlAuth2: 0x6D483DFC SceVshBridge: nid: 0x35C5ACD4 functions: diff --git a/nids/360/SceWlanBt.yml b/nids/360/SceWlanBt.yml new file mode 100644 index 0000000..48808db --- /dev/null +++ b/nids/360/SceWlanBt.yml @@ -0,0 +1,19 @@ +modules: + SceWlanBt: + nid: 0x99052D93 + libraries: + SceWlan: + nid: 0x22821EA3 + functions: + sceWlanGetConfiguration: 0x70AF9BD6 + sceWlanGetWakeOnTargetProcess: 0x18E6AFB2 + sceWlanRegisterCallback: 0xAA2E46F6 + sceWlanSetConfiguration: 0xDBE8AEF2 + sceWlanUnregisterCallback: 0x826DC04F + SceWlanBtForDriver: + nid: 0xFD94FCE9 + functions: + sceWlanBtAttachMonitor: 0xC5AA6F43 + sceWlanBtDetachMonitor: 0xA7FDE9DC + sceWlanBtGetConfiguration: 0x0FC89113 + sceWlanBtSetConfiguration: 0x4C96C3B7 diff --git a/nids/SceLibMono.yml b/nids/SceLibMono.yml new file mode 100644 index 0000000..bc134de --- /dev/null +++ b/nids/SceLibMono.yml @@ -0,0 +1,8 @@ +modules: + SceLibMono: + nid: 0x25CB8DCB + libraries: + SceLibMono: + nid: 0x7344135B + functions: + mono_security_enable_core_clr: 0x02A867BC diff --git a/nids/SceLibMonoBridge.yml b/nids/SceLibMonoBridge.yml index 81d1bc6..e479dae 100644 --- a/nids/SceLibMonoBridge.yml +++ b/nids/SceLibMonoBridge.yml @@ -1,9 +1,9 @@ modules: SceLibMonoBridge: - nid: 0x00000053 + nid: 0x4F1547C9 libraries: SceLibMonoBridge: - nid: 0x00000054 + nid: 0xD46680E4 functions: __aeabi_unwind_cpp_pr0: 0xD172A1F6 __aeabi_unwind_cpp_pr1: 0x6B008191 @@ -13,8 +13,8 @@ modules: __lshrdi3: 0x69B23762 __moddi3: 0x9A2906FE __modsi3: 0x3F8F26A3 - __sce_aeabi_idiv0: 0x1EBF97CC - __sce_aeabi_ldiv0: 0x2AB3B87C + __sce_aeabi_idiv1: 0x1EBF97CC + __sce_aeabi_ldiv1: 0x2AB3B87C __udivdi3: 0xD7F019CF __udivsi3: 0xFF10AAE9 __umoddi3: 0x66FCF225 @@ -181,6 +181,7 @@ modules: monoeg_try_realloc: 0xB1006CCC pss_alloc_mem: 0x1A2E441F pss_alloc_raw: 0x599AEA5E + pss_app_exit_liveboard: 0x58ABAD62 pss_code_mem_alloc: 0xF466ABEC pss_code_mem_flush_icache: 0x110F567B pss_code_mem_free: 0xB468C313 @@ -196,6 +197,7 @@ modules: pss_delay_thread: 0x018524DD pss_delete_semaphore: 0x6148DE4D pss_disable_ftz: 0x2E9C2A4B + pss_errno_loc: 0x58ABAD62 pss_free_mem: 0x1C59A84B pss_free_prng_provider: 0xBBCF4B04 pss_free_raw: 0xB9EFB986 |