diff options
Diffstat (limited to 'include/user')
-rw-r--r-- | include/user/appmgr.h | 1 | ||||
-rw-r--r-- | include/user/ctrl.h | 34 | ||||
-rw-r--r-- | include/user/display.h | 1 | ||||
-rw-r--r-- | include/user/io/devctl.h | 1 | ||||
-rw-r--r-- | include/user/kernel/clib.h | 12 | ||||
-rw-r--r-- | include/user/kernel/modulemgr.h | 1 | ||||
-rw-r--r-- | include/user/kernel/processmgr.h | 1 | ||||
-rw-r--r-- | include/user/kernel/rng.h | 1 | ||||
-rw-r--r-- | include/user/kernel/sysmem.h | 1 | ||||
-rw-r--r-- | include/user/kernel/threadmgr.h | 1 | ||||
-rw-r--r-- | include/user/npdrmpackage.h | 51 | ||||
-rw-r--r-- | include/user/power.h | 2 | ||||
-rw-r--r-- | include/user/promoterutil.h | 93 | ||||
-rw-r--r-- | include/user/pss.h | 1 | ||||
-rw-r--r-- | include/user/shellutil.h | 1 | ||||
-rw-r--r-- | include/user/sysmodule.h | 11 |
16 files changed, 196 insertions, 17 deletions
diff --git a/include/user/appmgr.h b/include/user/appmgr.h index e6fffaa..f93e608 100644 --- a/include/user/appmgr.h +++ b/include/user/appmgr.h @@ -140,3 +140,4 @@ int sceAppMgrUmount(const char *mount_point); #endif #endif /* _PSP2_APPMGR_H_ */ + diff --git a/include/user/ctrl.h b/include/user/ctrl.h index 5567b8a..dbd18cc 100644 --- a/include/user/ctrl.h +++ b/include/user/ctrl.h @@ -17,23 +17,23 @@ enum { /** Enumeration for the digital controller buttons. * L1/R1/L3/R3 only can bind using sceCtrlReadBufferPositiveExt2 */ enum { - SCE_CTRL_SELECT = 0x000001, //!< Select button. - SCE_CTRL_L3 = 0x000002, //!< L3 button. - SCE_CTRL_R3 = 0x000004, //!< R3 button. - SCE_CTRL_START = 0x000008, //!< Start button. - SCE_CTRL_UP = 0x000010, //!< Up D-Pad button. - SCE_CTRL_RIGHT = 0x000020, //!< Right D-Pad button. - SCE_CTRL_DOWN = 0x000040, //!< Down D-Pad button. - SCE_CTRL_LEFT = 0x000080, //!< Left D-Pad button. - SCE_CTRL_LTRIGGER = 0x000100, //!< Left trigger. - SCE_CTRL_RTRIGGER = 0x000200, //!< Right trigger. - SCE_CTRL_L1 = 0x000400, //!< L1 button. - SCE_CTRL_R1 = 0x000800, //!< R1 button. - SCE_CTRL_TRIANGLE = 0x001000, //!< Triangle button. - SCE_CTRL_CIRCLE = 0x002000, //!< Circle button. - SCE_CTRL_CROSS = 0x004000, //!< Cross button. - SCE_CTRL_SQUARE = 0x008000, //!< Square button. - SCE_CTRL_ANY = 0x010000 //!< Any input intercepted. + SCE_CTRL_SELECT = 0x000001, //!< Select button. + SCE_CTRL_L3 = 0x000002, //!< L3 button. + SCE_CTRL_R3 = 0x000004, //!< R3 button. + SCE_CTRL_START = 0x000008, //!< Start button. + SCE_CTRL_UP = 0x000010, //!< Up D-Pad button. + SCE_CTRL_RIGHT = 0x000020, //!< Right D-Pad button. + SCE_CTRL_DOWN = 0x000040, //!< Down D-Pad button. + SCE_CTRL_LEFT = 0x000080, //!< Left D-Pad button. + SCE_CTRL_LTRIGGER = 0x000100, //!< Left trigger. + SCE_CTRL_RTRIGGER = 0x000200, //!< Right trigger. + SCE_CTRL_L1 = 0x000400, //!< L1 button. + SCE_CTRL_R1 = 0x000800, //!< R1 button. + SCE_CTRL_TRIANGLE = 0x001000, //!< Triangle button. + SCE_CTRL_CIRCLE = 0x002000, //!< Circle button. + SCE_CTRL_CROSS = 0x004000, //!< Cross button. + SCE_CTRL_SQUARE = 0x008000, //!< Square button. + SCE_CTRL_INTERCEPTED = 0x010000 //!< Input not available because intercepted by another application }; /** Enumeration for the controller types. */ diff --git a/include/user/display.h b/include/user/display.h index 8a5a4f4..84d1887 100644 --- a/include/user/display.h +++ b/include/user/display.h @@ -153,3 +153,4 @@ int sceDisplayUnregisterVblankStartCallback(SceUID uid); #endif #endif /* _PSP2_DISPLAY_H_ */ + diff --git a/include/user/io/devctl.h b/include/user/io/devctl.h index 5237ac9..e551abe 100644 --- a/include/user/io/devctl.h +++ b/include/user/io/devctl.h @@ -84,3 +84,4 @@ int sceIoIoctlAsync(SceUID fd, unsigned int cmd, void *indata, int inlen, void * #endif #endif /* _PSP2_IO_DEVCTRL_H_ */ + diff --git a/include/user/kernel/clib.h b/include/user/kernel/clib.h index bb8ba0d..6db799d 100644 --- a/include/user/kernel/clib.h +++ b/include/user/kernel/clib.h @@ -9,12 +9,24 @@ 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); + #ifdef __cplusplus } #endif #endif /* _PSP2_KERNEL_CLIB_H_ */ + diff --git a/include/user/kernel/modulemgr.h b/include/user/kernel/modulemgr.h index abdf387..d7ad72c 100644 --- a/include/user/kernel/modulemgr.h +++ b/include/user/kernel/modulemgr.h @@ -88,3 +88,4 @@ int sceKernelGetSystemSwVersion(SceKernelFwInfo *data); #endif #endif /* _PSP2_KERNEL_MODULEMGR_H_ */ + diff --git a/include/user/kernel/processmgr.h b/include/user/kernel/processmgr.h index cef7251..c256157 100644 --- a/include/user/kernel/processmgr.h +++ b/include/user/kernel/processmgr.h @@ -85,3 +85,4 @@ SceUID sceKernelGetProcessId(void); #endif #endif /* _PSP2_KERNEL_PROCESSMGR_H_ */ + diff --git a/include/user/kernel/rng.h b/include/user/kernel/rng.h index 108362f..88e0267 100644 --- a/include/user/kernel/rng.h +++ b/include/user/kernel/rng.h @@ -20,3 +20,4 @@ int sceKernelGetRandomNumber(void *output, unsigned size); #endif #endif /* _PSP2_KERNEL_RNG_H_ */ + diff --git a/include/user/kernel/sysmem.h b/include/user/kernel/sysmem.h index 8d21ecb..4dd4884 100644 --- a/include/user/kernel/sysmem.h +++ b/include/user/kernel/sysmem.h @@ -111,3 +111,4 @@ int sceKernelGetModel(); #endif #endif + diff --git a/include/user/kernel/threadmgr.h b/include/user/kernel/threadmgr.h index 0718003..9225fb1 100644 --- a/include/user/kernel/threadmgr.h +++ b/include/user/kernel/threadmgr.h @@ -1046,3 +1046,4 @@ void *sceKernelGetTLSAddr(int key); #endif #endif /* _PSP2_KERNEL_THREADMGR_H_ */ + diff --git a/include/user/npdrmpackage.h b/include/user/npdrmpackage.h new file mode 100644 index 0000000..5a41475 --- /dev/null +++ b/include/user/npdrmpackage.h @@ -0,0 +1,51 @@ +#ifndef _PSP2_NPDRMPACKAGE_H_ +#define _PSP2_NPDRMPACKAGE_H_ + +#include <psp2/types.h> + +#ifdef __cplusplus +extern "C" { +#endif + +/** Options for _sceNpDrmPackageDecrypt */ +typedef struct { + /** The offset in the encrypted data */ + SceOff offset; + + /** + * The identifier specified for _sceNpDrmPackageCheck but NOT ORed + * with (1 << 8) + */ + unsigned int identifier; +} _sceNpDrmPackageDecrypt_opt; + +/** + * Read the header of the PKG and initialize the context + * + * @param buffer - The buffer containing the header of PKG. + * @param size - The size of buffer. The minimum confirmed value is 0x8000. + * @param zero - Unknown. Supposed to be set to 0. + * @param identifier - arbitrary value [0, 6) ORed with (1 << 8) or 0. + * If it is set to 0, the function just checks the header + * and doesn't create the context. + * + * @return 0 on success, != 0 on error + */ +int _sceNpDrmPackageCheck(const void *buffer, SceSize size, int zero, unsigned int identifier); + +/** + * Decrypt a PKG + * + * @param buffer - The buffer containing the content of the PKG. + * @param size - The size of the buffer. The minimum confirmed value is 0x20. + * @param opt - The options. + * + * @return 0 on success, != 0 on error + */ +int _sceNpDrmPackageDecrypt(void * restrict buffer, SceSize size, _sceNpDrmPackageDecrypt_opt * restrict opt); + +#ifdef __cplusplus +} +#endif + +#endif /* _PSP2_NPDRMPACKAGE_H_ */ diff --git a/include/user/power.h b/include/user/power.h index 23b4470..7f9dd04 100644 --- a/include/user/power.h +++ b/include/user/power.h @@ -3,6 +3,7 @@ #include <psp2/types.h> + #ifdef __cplusplus extern "C" { #endif @@ -166,3 +167,4 @@ int scePowerSetGpuXbarClockFrequency(int freq); #endif #endif /* _PSP2_POWER_H_ */ + diff --git a/include/user/promoterutil.h b/include/user/promoterutil.h new file mode 100644 index 0000000..117b4c3 --- /dev/null +++ b/include/user/promoterutil.h @@ -0,0 +1,93 @@ +#ifndef _PSP2_PROMOTERUTIL_H_ +#define _PSP2_PROMOTERUTIL_H_ + +#include <psp2/types.h> + +#ifdef __cplusplus +extern "C" { +#endif + +/** Parameters for scePromoterUtilityUpdateLiveArea() */ +typedef struct ScePromoterUtilityLAUpdate { + char titleid[12]; //!< Target app. + char path[128]; //!< Directory of extracted LA update data. +} ScePromoterUtilityLAUpdate; + +/** + * Init the promoter utility. + * \note Needs to be called before using the other functions. + * + * @return 0 on success. + */ +int scePromoterUtilityInit(void); + +/** + * Deinit the promoter utility. + * + * @return 0 on success. + */ +int scePromoterUtilityExit(void); + +/** + * Delete a package from the LiveArea. + * + * @param[in] *titleid + * + * @return 0 on success. + */ +int scePromoterUtilityDeletePkg(const char *titleid); + +/** + * Update the LiveArea ressources of an app + * + * @param[in] *args - see ::ScePromoterUtilityLAUpdate + * + * @return 0 on success. + */ +int scePromoterUtilityUpdateLiveArea(ScePromoterUtilityLAUpdate *args); + +/** + * Install a package from a directory, and add an icon on the LiveArea. + * \note It is an asynchronous function. + * + * @param[in] *path - the path of the directory where the extracted content of the package is + * @param unk - unknown, pass 0 + * + * @return 0 on success. + */ +int scePromoterUtilityPromotePkg(const char *path, int unk); + +/** + * Install a package from a directory and generate a rif. + * \note It is an asynchronous function. + * + * @param[in] *path - the path of the directory where the extracted content of the package is + * @param unk - unknown, pass 0 + * + * @return 0 on success. + */ +int scePromoterUtilityPromotePkgWithRif(const char *path, int unk); + +/** + * Returns the state of an operation. + * + * @param[out] *state - the current status, 0 when finished + * + * @return <0 if failed. + */ +int scePromoterUtilityGetState(int *state); + +/** + * Returns the result of a finished operation + * + * @param[out] *res - the result, 0 on success + * + * @return <0 if failed. + */ +int scePromoterUtilityGetResult(int *res); + +#ifdef __cplusplus +} +#endif + +#endif /* _PSP2_PROMOTERUTIL_H_ */ diff --git a/include/user/pss.h b/include/user/pss.h index d79a868..586f644 100644 --- a/include/user/pss.h +++ b/include/user/pss.h @@ -17,3 +17,4 @@ void pss_code_mem_unlock(void); #endif #endif /* _PSP2_PSS_H_ */ + diff --git a/include/user/shellutil.h b/include/user/shellutil.h index ceb413d..1f77727 100644 --- a/include/user/shellutil.h +++ b/include/user/shellutil.h @@ -70,3 +70,4 @@ int sceShellUtilUnlock(int type); #endif #endif /* _PSP2_SHELLUTIL_H_ */ + diff --git a/include/user/sysmodule.h b/include/user/sysmodule.h index 1ef7d2c..8cc2a37 100644 --- a/include/user/sysmodule.h +++ b/include/user/sysmodule.h @@ -74,12 +74,23 @@ enum { SCE_SYSMODULE_AVPLAYER = 0x004c }; +/* internal module IDs */ +enum { + SCE_SYSMODULE_PAF = 0x80000008, + SCE_SYSMODULE_PROMOTER_UTIL = 0x80000024 +}; + int sceSysmoduleLoadModule(SceUInt16 id); int sceSysmoduleUnloadModule(SceUInt16 id); int sceSysmoduleIsLoaded(SceUInt16 id); +int sceSysmoduleLoadModuleInternal(SceUInt32 id); +int sceSysmoduleUnloadModuleInternal(SceUInt32 id); +int sceSysmoduleIsLoadedInternal(SceUInt32 id); +int sceSysmoduleLoadModuleInternalWithArg(SceUInt32 id, SceSize args, void *argp, void *unk); #ifdef __cplusplus } #endif #endif /* _PSP2_SYSMODULE_H_ */ + |