summaryrefslogtreecommitdiff
path: root/include/user
diff options
context:
space:
mode:
authorReiko Asakura2020-07-24 19:22:28 -0400
committerReiko Asakura2020-07-24 19:22:28 -0400
commitd18ab7b9fc6f59c2319bcdce00bede7e84acdf75 (patch)
tree64bea01fffe15976d94cfbff0b0040a6e606c330 /include/user
parentAdd functions in SceAVConfig (diff)
parentRevert vitasdk commits (diff)
downloadvds-libraries-d18ab7b9fc6f59c2319bcdce00bede7e84acdf75.tar.gz
Merge Vitasdk
Diffstat (limited to 'include/user')
-rw-r--r--include/user/appmgr.h4
-rw-r--r--include/user/compat.h2
-rw-r--r--include/user/kernel/dmac.h6
-rw-r--r--include/user/kernel/modulemgr.h17
-rw-r--r--include/user/kernel/rng.h4
-rw-r--r--include/user/kernel/sysmem.h10
-rw-r--r--include/user/kernel/threadmgr.h6
-rw-r--r--include/user/paf.h29
-rw-r--r--include/user/vshbridge.h20
9 files changed, 62 insertions, 36 deletions
diff --git a/include/user/appmgr.h b/include/user/appmgr.h
index 093b350..e912ce5 100644
--- a/include/user/appmgr.h
+++ b/include/user/appmgr.h
@@ -258,7 +258,7 @@ int sceAppMgrGetRunningAppIdListForShell(SceUID *appIds, int count);
* @return 0 on success, < 0 on error.
*/
-int _sceAppMgrGetAppState(SceAppMgrAppState *appState, uint32_t len, uint32_t version);
+int _sceAppMgrGetAppState(SceAppMgrAppState *appState, SceSize len, uint32_t version);
/**
* Receive system event
@@ -406,7 +406,7 @@ int sceAppMgrAppDataMountById(int id, const char *titleid, const char *mount_poi
*
* @note param: 6 (contentid) 8 (category), 9 (stitle/title?), 10 (title/stitle?), 12 (titleid)
*/
-int sceAppMgrAppParamGetString(int pid, int param, char *string, int length);
+int sceAppMgrAppParamGetString(int pid, int param, char *string, SceSize length);
/**
* Get device info
diff --git a/include/user/compat.h b/include/user/compat.h
index 9868df9..8112c46 100644
--- a/include/user/compat.h
+++ b/include/user/compat.h
@@ -274,7 +274,7 @@ int sceCompatWriteSharedCtrl(SceCtrlDataPsp *pad_data);
*
* @return 0 on success, < 0 on error.
*/
-int sceCompatGetTitleList(void *buf, int length);
+int sceCompatGetTitleList(void *buf, SceSize length);
/**
* Get Memory Card device information
diff --git a/include/user/kernel/dmac.h b/include/user/kernel/dmac.h
index 0047d6f..a6e0e42 100644
--- a/include/user/kernel/dmac.h
+++ b/include/user/kernel/dmac.h
@@ -1,7 +1,7 @@
#ifndef _PSP2_DMAC_H_
#define _PSP2_DMAC_H_
-#include <stddef.h>
+#include <psp2/types.h>
#ifdef __cplusplus
extern "C" {
@@ -16,7 +16,7 @@ extern "C" {
*
* @return dst.
*/
-void *sceDmacMemcpy(void *dst, const void *src, size_t size);
+void *sceDmacMemcpy(void *dst, const void *src, SceSize size);
/**
* DMA memset
@@ -27,7 +27,7 @@ void *sceDmacMemcpy(void *dst, const void *src, size_t size);
*
* @return dst.
*/
-void *sceDmacMemset(void *dst, int c, size_t size);
+void *sceDmacMemset(void *dst, int c, SceSize size);
#ifdef __cplusplus
}
diff --git a/include/user/kernel/modulemgr.h b/include/user/kernel/modulemgr.h
index 3aa6f30..b1be55d 100644
--- a/include/user/kernel/modulemgr.h
+++ b/include/user/kernel/modulemgr.h
@@ -21,6 +21,12 @@ extern "C" {
#define SCE_KERNEL_STOP_CANCEL SCE_KERNEL_STOP_FAIL
/** @} */
+typedef enum SceKernelModuleState {
+ SCE_KERNEL_MODULE_STATE_READY = 0x00000002,
+ SCE_KERNEL_MODULE_STATE_STARTED = 0x00000006,
+ SCE_KERNEL_MODULE_STATE_ENDED = 0x00000009
+} SceKernelModuleState;
+
typedef struct SceKernelSegmentInfo {
SceSize size; //!< this structure size (0x18)
SceUInt perms; //!< probably rwx in low bits
@@ -49,7 +55,7 @@ typedef struct SceKernelModuleInfo {
SceSize tlsAreaSize;
char path[256];
SceKernelSegmentInfo segments[4];
- SceUInt type; //!< 6 = user-mode PRX?
+ SceUInt state; //!< see:SceKernelModuleState
} SceKernelModuleInfo;
typedef struct SceKernelLMOption {
@@ -60,7 +66,7 @@ typedef struct SceKernelULMOption {
SceSize size;
} SceKernelULMOption;
-int sceKernelGetModuleList(int flags, SceUID *modids, int *num);
+int sceKernelGetModuleList(int flags, SceUID *modids, SceSize *num);
int sceKernelGetModuleInfo(SceUID modid, SceKernelModuleInfo *info);
SceUID sceKernelLoadModule(const char *path, int flags, SceKernelLMOption *option);
@@ -79,6 +85,13 @@ typedef struct SceKernelFwInfo {
SceUInt unk_24;
} SceKernelFwInfo;
+/**
+ * Gets system firmware information.
+ *
+ * @param[out] data - firmware information.
+ *
+ * @note - If you spoofed the firmware version it will return the spoofed firmware.
+ */
int sceKernelGetSystemSwVersion(SceKernelFwInfo *data);
#ifdef __cplusplus
diff --git a/include/user/kernel/rng.h b/include/user/kernel/rng.h
index 177e662..af302f1 100644
--- a/include/user/kernel/rng.h
+++ b/include/user/kernel/rng.h
@@ -1,6 +1,8 @@
#ifndef _PSP2_KERNEL_RNG_H_
#define _PSP2_KERNEL_RNG_H_
+#include <psp2/types.h>
+
#ifdef __cplusplus
extern "C" {
#endif
@@ -13,7 +15,7 @@ extern "C" {
*
* @return 0 on success, < 0 on error.
*/
-int sceKernelGetRandomNumber(void *output, unsigned size);
+int sceKernelGetRandomNumber(void *output, SceSize size);
#ifdef __cplusplus
}
diff --git a/include/user/kernel/sysmem.h b/include/user/kernel/sysmem.h
index 404e810..6a55a46 100644
--- a/include/user/kernel/sysmem.h
+++ b/include/user/kernel/sysmem.h
@@ -64,11 +64,11 @@ typedef enum SceKernelMemoryType {
* @param[in] name - Name for the memory block
* @param[in] type - Type of the memory to allocate
* @param[in] size - Size of the memory to allocate
- * @param[in] optp - Memory block options?
+ * @param[in] opt - Memory block options?
*
* @return SceUID of the memory block on success, < 0 on error.
*/
-SceUID sceKernelAllocMemBlock(const char *name, SceKernelMemBlockType type, int size, SceKernelAllocMemBlockOpt *optp);
+SceUID sceKernelAllocMemBlock(const char *name, SceKernelMemBlockType type, SceSize size, SceKernelAllocMemBlockOpt *opt);
/**
* Frees new memory block
@@ -82,12 +82,12 @@ int sceKernelFreeMemBlock(SceUID uid);
/**
* Gets the base address of a memory block
*
- * @param[in] uid - SceUID of the memory block to free
- * @param[out] basep - Base address of the memory block identified by SceUID
+ * @param[in] uid - SceUID of the memory block to free
+ * @param[out] base - Base address of the memory block identified by SceUID
*
* @return 0 on success, < 0 on error.
*/
-int sceKernelGetMemBlockBase(SceUID uid, void **basep);
+int sceKernelGetMemBlockBase(SceUID uid, void **base);
SceUID sceKernelFindMemBlockByAddr(const void *addr, SceSize size);
diff --git a/include/user/kernel/threadmgr.h b/include/user/kernel/threadmgr.h
index a1201d8..a1fa266 100644
--- a/include/user/kernel/threadmgr.h
+++ b/include/user/kernel/threadmgr.h
@@ -337,7 +337,7 @@ typedef struct SceKernelSemaInfo {
* @par Example:
* @code
* int semaid;
- * semaid = sceKernelCreateSema("MyMutex", 0, 1, 1, 0);
+ * semaid = sceKernelCreateSema("MySema", 0, 1, 1, NULL);
* @endcode
*
* @param name - Specifies the name of the sema
@@ -483,7 +483,7 @@ typedef struct SceKernelMutexInfo {
* @par Example:
* @code
* int mutexid;
- * mutexid = sceKernelCreateMutex("MyMutex", 0, 1, 1, 0);
+ * mutexid = sceKernelCreateMutex("MyMutex", 0, 1, NULL);
* @endcode
*
* @param pName - Specifies the name of the mutex
@@ -610,7 +610,7 @@ typedef struct SceKernelEventFlagOptParam {
* @par Example:
* @code
* int evid;
- * evid = sceKernelCreateEventFlag("wait_event", 0, 0, 0);
+ * evid = sceKernelCreateEventFlag("wait_event", 0, 0, NULL);
* @endcode
*/
SceUID sceKernelCreateEventFlag(
diff --git a/include/user/paf.h b/include/user/paf.h
index 1d81d3b..f01190e 100644
--- a/include/user/paf.h
+++ b/include/user/paf.h
@@ -2,31 +2,30 @@
#define _PSP2_PAF_H_
#include <psp2/types.h>
-#include <stdint.h>
#ifdef __cplusplus
extern "C" {
#endif
void sce_paf_private_free(void *ptr);
-void *sce_paf_private_malloc(size_t size);
-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_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_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, ...);
+void *sce_paf_private_malloc(SceSize size);
+void *sce_paf_private_bzero(void *ptr, SceSize num);
+void *sce_paf_private_memchr(const void *ptr, int value, SceSize num);
+int sce_paf_private_memcmp(const void *ptr1, const void *ptr2, SceSize num);
+int sce_paf_private_bcmp(const void *ptr1, const void *ptr2, SceSize num);
+void *sce_paf_private_memcpy(void *destination, const void *source, SceSize num);
+void *sce_paf_private_memcpy2(void *destination, const void *source, SceSize num);
+void *sce_paf_private_memmove(void *destination, const void *source, SceSize num);
+void *sce_paf_private_bcopy(void *destination, const void *source, SceSize num);
+void *sce_paf_private_memset(void *ptr, int value, SceSize num);
+int sce_paf_private_snprintf(char *s, SceSize n, const char *format, ...);
int sce_paf_private_strcasecmp(const char *str1, const char *str2);
char *sce_paf_private_strchr(const char *str, int character);
int sce_paf_private_strcmp(const char *str1, const char *str2);
size_t sce_paf_private_strlen(const char *str);
-int sce_paf_private_strncasecmp(const char *str1, const char *str2, size_t num);
-int sce_paf_private_strncmp(const char *str1, const char *str2, size_t num);
-char *sce_paf_private_strncpy(char *destination, const char *source, size_t num);
+int sce_paf_private_strncasecmp(const char *str1, const char *str2, SceSize num);
+int sce_paf_private_strncmp(const char *str1, const char *str2, SceSize num);
+char *sce_paf_private_strncpy(char *destination, const char *source, SceSize num);
char *sce_paf_private_strrchr(const char *str, int character);
#ifdef __cplusplus
diff --git a/include/user/vshbridge.h b/include/user/vshbridge.h
index a525c04..e2771f3 100644
--- a/include/user/vshbridge.h
+++ b/include/user/vshbridge.h
@@ -8,7 +8,19 @@
extern "C" {
#endif
-int _vshSblGetSystemSwVersion(SceKernelFwInfo * data);
+/**
+ * Gets real system firmware information.
+ *
+ * @param[out] data - firmware information.
+ */
+int _vshSblGetSystemSwVersion(SceKernelFwInfo *data);
+
+/**
+ * Gets factory (minimum) firmware version.
+ *
+ * @param[out] minver - factory firmware version.
+ */
+int _vshSblAimgrGetSMI(int *minver);
int _vshSblAimgrGetConsoleId(char CID[32]);
@@ -20,7 +32,7 @@ int _vshSblAimgrGetConsoleId(char CID[32]);
*
* @return 0 >= on success, < 0 on error.
*/
-int _vshIoMount(int id, const char *path, int permission, void* buf);
+int _vshIoMount(int id, const char *path, int permission, void *buf);
/**
* @param[in] id - mount id
@@ -42,7 +54,7 @@ int vshIdStorageIsReadOnly(void);
*
* @return 0 on success, < 0 on error.
*/
-int vshIdStorageReadLeaf(int leafnum, void *buf);
+int vshIdStorageReadLeaf(SceSize leafnum, void *buf);
/**
* @param[in] leafnum - 0x0 ~ 0x80 / leafnum > 0x80 = error
@@ -50,7 +62,7 @@ int vshIdStorageReadLeaf(int leafnum, void *buf);
*
* @return 0 on success, < 0 on error.
*/
-int vshIdStorageWriteLeaf(int leafnum, const void *buf);
+int vshIdStorageWriteLeaf(SceSize leafnum, const void *buf);
int vshSblAimgrIsCEX(void);
int vshSblAimgrIsDEX(void);