From 43b487959bb8e1a9d78c5a9422e2f4174b8d3815 Mon Sep 17 00:00:00 2001 From: Simon Stapleton Date: Sun, 22 Mar 2020 13:24:34 +0100 Subject: Fix value for SCE_EVENT_WAITMULTIPLE, add other missing event flags --- include/user/kernel/threadmgr.h | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'include/user') diff --git a/include/user/kernel/threadmgr.h b/include/user/kernel/threadmgr.h index c5d93b7..ffb8fd6 100644 --- a/include/user/kernel/threadmgr.h +++ b/include/user/kernel/threadmgr.h @@ -585,8 +585,16 @@ 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 + /* Waiting threads queued on a FIFO basis */ + SCE_EVENT_THREAD_FIFO = 0, + /* Waiting threads queued on priority basis */ + SCE_EVENT_THREAD_PRIO = 0x00002000, + /* Event flag can only be waited upon by one thread */ + SCE_EVENT_WAITSINGLE = 0, + /* Event flag can be waited upon by multiple threads */ + SCE_EVENT_WAITMULTIPLE = 0x00001000, + /* Event flag can be accessed by sceKernelOpenEventFlag / sceKernelCloseEventFlag */ + SCE_EVENT_OPENABLE = 0x00000080 } SceEventFlagAttributes; /** Event flag wait types */ -- cgit v1.2.3 From 2c750c7fbe68b0cbf35d0edf2009de9d08a0daac Mon Sep 17 00:00:00 2001 From: Simon Stapleton Date: Sun, 22 Mar 2020 15:15:21 +0100 Subject: tabification. --- include/user/kernel/threadmgr.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include/user') diff --git a/include/user/kernel/threadmgr.h b/include/user/kernel/threadmgr.h index ffb8fd6..a73562f 100644 --- a/include/user/kernel/threadmgr.h +++ b/include/user/kernel/threadmgr.h @@ -588,7 +588,7 @@ typedef enum SceEventFlagAttributes { /* Waiting threads queued on a FIFO basis */ SCE_EVENT_THREAD_FIFO = 0, /* Waiting threads queued on priority basis */ - SCE_EVENT_THREAD_PRIO = 0x00002000, + SCE_EVENT_THREAD_PRIO = 0x00002000, /* Event flag can only be waited upon by one thread */ SCE_EVENT_WAITSINGLE = 0, /* Event flag can be waited upon by multiple threads */ -- cgit v1.2.3 From 487c7f0a2ef2050d96999c512f5ee14df6abea2a Mon Sep 17 00:00:00 2001 From: Rinnegatamante Date: Thu, 11 Jun 2020 14:00:31 +0200 Subject: Added sceSharedFb prototypes. --- include/user/sharedfb.h | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 include/user/sharedfb.h (limited to 'include/user') diff --git a/include/user/sharedfb.h b/include/user/sharedfb.h new file mode 100644 index 0000000..a8266c4 --- /dev/null +++ b/include/user/sharedfb.h @@ -0,0 +1,41 @@ +#ifndef _PSP2_SHAREDFB_H_ +#define _PSP2_SHAREDFB_H_ + +#include + +#ifdef __cplusplus +extern "C" { +#endif + +typedef struct SceSharedFbInfo { + void *fb_base; + int fb_size; + void *fb_base2; + int unk0[6]; + int stride; + int width; + int height; + int unk1; + int index; + int unk2[4]; + int vsync; + int unk3[3]; +} SceSharedFbInfo; + +SceUID _sceSharedFbOpen(int index, int sysver); +int sceSharedFbClose(SceUID fb_id); +int sceSharedFbBegin(SceUID fb_id, SceSharedFbInfo *info); +int sceSharedFbEnd(SceUID fb_id); +int sceSharedFbGetInfo(SceUID fb_id, SceSharedFbInfo *info); + +static inline +SceUID sceSharedFbOpen(int index) +{ + return _sceSharedFbOpen(index, 0x03570011); +}; + +#ifdef __cplusplus +} +#endif + +#endif /* _PSP2_SHAREDFB_H_ */ -- cgit v1.2.3 From 4b0e53cee8deef3e0e1b2bcec65708a709fa0098 Mon Sep 17 00:00:00 2001 From: Itai Levin Date: Tue, 16 Jun 2020 22:22:20 +0300 Subject: Added sceAVConfigSetDisplayColorSpaceMode prototype (#444) * Added sceAVConfigSetDisplayColorSpaceMode to header * Fixed typo * Added SceColorSpaceMode enum * Typo * Update avconfig.h * Update avconfig.h * Update avconfig.h--- include/user/avconfig.h | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'include/user') diff --git a/include/user/avconfig.h b/include/user/avconfig.h index d171647..bef9ba4 100644 --- a/include/user/avconfig.h +++ b/include/user/avconfig.h @@ -7,6 +7,12 @@ extern "C" { #endif +/** Color Space Mode values to specify to ::sceAVConfigSetDisplayColorSpaceMode */ +typedef enum SceAVConfigColorSpaceMode { + SCE_AVCONFIG_COLOR_SPACE_MODE_DEFAULT = 0, //!< Default + SCE_AVCONFIG_COLOR_SPACE_MODE_HIGH_CONTRAST = 1 //!< High Contrast Mode +} SceAVConfigColorSpaceMode; + /** * Get the maximum brightness. * @@ -59,6 +65,16 @@ int sceAVConfigSetSystemVol(int volume); * */ int sceAVConfigMuteOn(void); + +/** + * Sets the color space mode on runtime. + * + * @param[in] csm - see ::SceAVConfigColorSpaceMode() + * + * @return 0 on success, < 0 on error. + * @note - This does not change color_space_mode in the registry. + */ +int sceAVConfigSetDisplayColorSpaceMode(int csm); #ifdef __cplusplus -- cgit v1.2.3 From e7e98d4f7ada766542eae05a7925ba9d270f4eac Mon Sep 17 00:00:00 2001 From: Rinnegatamante Date: Thu, 18 Jun 2020 10:14:48 +0200 Subject: Added a note about different mappings for L/R Triggers. (#445) --- include/user/ctrl.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include/user') diff --git a/include/user/ctrl.h b/include/user/ctrl.h index ab6bc7e..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. -- cgit v1.2.3 From 166584c57f1f4111f11d2cdfa5ac3e66c4d5a7d2 Mon Sep 17 00:00:00 2001 From: Princess of Sleeping Date: Thu, 18 Jun 2020 23:21:13 +0900 Subject: Update modulemgr (#434) * update SceKernelModuleInfo and SceKernelSegmentInfo * update SceKernelModuleInfo and SceKernelSegmentInfo * fix wrong name of modulemgr nid * fix SceKernelModuleName * fix wrong function and wrong struct * fix sort * update SceKernelModuleInfo * update SceKernelModuleInfo--- include/user/kernel/modulemgr.h | 49 +++++++++++++++++++++-------------------- 1 file changed, 25 insertions(+), 24 deletions(-) (limited to 'include/user') diff --git a/include/user/kernel/modulemgr.h b/include/user/kernel/modulemgr.h index a8d44f6..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; - void *module_stop; - void *module_exit; - 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 { -- cgit v1.2.3 From ed4325f95a2b8a833837ab8c0b740844d4bb37de Mon Sep 17 00:00:00 2001 From: Rinnegatamante Date: Fri, 19 Jun 2020 14:52:26 +0200 Subject: Added sceAppMgrGetBudgetInfo prototype. --- include/user/appmgr.h | 38 +++++++++++++++++++++++++++++++++++++- 1 file changed, 37 insertions(+), 1 deletion(-) (limited to 'include/user') diff --git a/include/user/appmgr.h b/include/user/appmgr.h index ae0f6c9..16fd815 100644 --- a/include/user/appmgr.h +++ b/include/user/appmgr.h @@ -40,6 +40,12 @@ typedef enum SceAppMgrInfoBarTransparency { SCE_APPMGR_INFOBAR_TRANSPARENCY_TRANSLUCENT = 1 } SceAppMgrInfoBarTransparency; +typedef enum SceAppMgrApplicationMode { + SCE_APPMGR_APPLICATION_MODE_A = 2, //!< Application without physically contiguous memory access + SCE_APPMGR_APPLICATION_MODE_B = 3, //!< Application with physically contiguous memory access + SCE_APPMGR_APPLICATION_MODE_C = 4 //!< Application with physically contiguous memory and extra memory access +} SceAppMgrApplicationMode; + typedef struct SceAppMgrSystemEvent { int systemEvent; //!< One of ::SceAppMgrSystemEventType uint8_t reserved[60]; //!< Reserved data @@ -87,6 +93,25 @@ typedef struct SceAppMgrAppState { SceUInt8 reserved[116]; } SceAppMgrAppState; +typedef struct SceAppMgrBudgetInfo { + int size; //!< Must be 0x88 + int app_mode; //!< One of ::SceAppMgrApplicationMode + int unk0; //!< Unknown Data + unsigned int total_user_rw_mem; //!< Total amount of accessible USER_RW memory + unsigned int free_user_rw; //!< Free amount of accessible USER_RW memory + SceBool extra_mem_allowed; //!< Flag for extra memory accessibility + int unk1; //!< Unknown Data + unsigned int total_extra_mem; //!< Total amount of accessible extra memory + unsigned int free_extra_mem; //!< Free amount of accessible extra memory + int unk2[2]; //!< Unknown Data + unsigned int total_phycont_mem; //!< Total amount of accessible physically contiguous memory + unsigned int free_phycont_mem; //!< Free amount of accessible physically contiguous memory + int unk3[10]; //!< Unknown Data + unsigned int total_cdram_mem; //!< Total amount of accessible CDRAM memory + unsigned int free_cdram_mem; //!< Free amount of accessible CDRAM memory + int reserved[9]; //!< Reserved data +} SceAppMgrBudgetInfo; + typedef struct SceAppMgrExecOptParam SceAppMgrExecOptParam; // Missing struct typedef struct SceAppMgrLaunchAppOptParam SceAppMgrLaunchAppOptParam; // Missing struct @@ -487,7 +512,18 @@ int _sceAppMgrGetRawPath(char *path, char *resolved_path, int resolved_path_size * @return 0 on success. */ int _sceAppMgrGetRawPathOfApp0ByAppIdForShell(int appId, char resolved_path[292]); - + +/** + * Get memory budget info for a running system application + * + * @param[out] info - Info related to the memory budget of the running application. + * + * @return 0 on success, < 0 on error. + * + * @note This function will always return an error if used in a normal application. + */ +int sceAppMgrGetBudgetInfo(SceAppMgrBudgetInfo *info); + #ifdef __cplusplus } #endif -- cgit v1.2.3 From 5b790219e34cb71abaebde7b8b933cca83298918 Mon Sep 17 00:00:00 2001 From: Reiko Asakura Date: Tue, 23 Jun 2020 17:15:05 -0400 Subject: Revert vitasdk commits Revert "Added sceAppMgrGetBudgetInfo prototype." This reverts commit 8fa5c1fd177b7f921ee809cea04099d3c7e25933. Revert "Added sceSharedFB group in doxygen doc." This reverts commit 70876044c82f8320eaa8c2da6b8af61b48625b18. Revert "Fix for incorrect sceGxmGetRenderTargetMemSize prototype." This reverts commit 361b2153c3ffee8aa4a022a41541391b6465d9fd. Revert "Added sceAVConfigSetDisplayColorSpaceMode prototype (#444)" This reverts commit 3a130e9ab8a981316dbd3d03abccf0a651baabe1. Revert "Added sceSharedFb prototypes." This reverts commit fe1adba231c35f60c0c54ed63bc52d9c25520bc5. Revert "tabification." This reverts commit 537864dfd836390810a0fc5b91256507f3459398. Revert "Fix value for SCE_EVENT_WAITMULTIPLE, add other missing event flags" This reverts commit eaeaa78e3890aa5ebf12ff88c2f57a08cfda9a51. Revert "Added sceGxmVshInitialize reference." This reverts commit dafa6f1c3a58a2ea9af8008edef4d4c6168c2f90. --- include/user/appmgr.h | 38 +------------------------------------- include/user/avconfig.h | 16 ---------------- include/user/kernel/threadmgr.h | 12 ++---------- include/user/sharedfb.h | 41 ----------------------------------------- 4 files changed, 3 insertions(+), 104 deletions(-) delete mode 100644 include/user/sharedfb.h (limited to 'include/user') diff --git a/include/user/appmgr.h b/include/user/appmgr.h index 16fd815..ae0f6c9 100644 --- a/include/user/appmgr.h +++ b/include/user/appmgr.h @@ -40,12 +40,6 @@ typedef enum SceAppMgrInfoBarTransparency { SCE_APPMGR_INFOBAR_TRANSPARENCY_TRANSLUCENT = 1 } SceAppMgrInfoBarTransparency; -typedef enum SceAppMgrApplicationMode { - SCE_APPMGR_APPLICATION_MODE_A = 2, //!< Application without physically contiguous memory access - SCE_APPMGR_APPLICATION_MODE_B = 3, //!< Application with physically contiguous memory access - SCE_APPMGR_APPLICATION_MODE_C = 4 //!< Application with physically contiguous memory and extra memory access -} SceAppMgrApplicationMode; - typedef struct SceAppMgrSystemEvent { int systemEvent; //!< One of ::SceAppMgrSystemEventType uint8_t reserved[60]; //!< Reserved data @@ -93,25 +87,6 @@ typedef struct SceAppMgrAppState { SceUInt8 reserved[116]; } SceAppMgrAppState; -typedef struct SceAppMgrBudgetInfo { - int size; //!< Must be 0x88 - int app_mode; //!< One of ::SceAppMgrApplicationMode - int unk0; //!< Unknown Data - unsigned int total_user_rw_mem; //!< Total amount of accessible USER_RW memory - unsigned int free_user_rw; //!< Free amount of accessible USER_RW memory - SceBool extra_mem_allowed; //!< Flag for extra memory accessibility - int unk1; //!< Unknown Data - unsigned int total_extra_mem; //!< Total amount of accessible extra memory - unsigned int free_extra_mem; //!< Free amount of accessible extra memory - int unk2[2]; //!< Unknown Data - unsigned int total_phycont_mem; //!< Total amount of accessible physically contiguous memory - unsigned int free_phycont_mem; //!< Free amount of accessible physically contiguous memory - int unk3[10]; //!< Unknown Data - unsigned int total_cdram_mem; //!< Total amount of accessible CDRAM memory - unsigned int free_cdram_mem; //!< Free amount of accessible CDRAM memory - int reserved[9]; //!< Reserved data -} SceAppMgrBudgetInfo; - typedef struct SceAppMgrExecOptParam SceAppMgrExecOptParam; // Missing struct typedef struct SceAppMgrLaunchAppOptParam SceAppMgrLaunchAppOptParam; // Missing struct @@ -512,18 +487,7 @@ int _sceAppMgrGetRawPath(char *path, char *resolved_path, int resolved_path_size * @return 0 on success. */ int _sceAppMgrGetRawPathOfApp0ByAppIdForShell(int appId, char resolved_path[292]); - -/** - * Get memory budget info for a running system application - * - * @param[out] info - Info related to the memory budget of the running application. - * - * @return 0 on success, < 0 on error. - * - * @note This function will always return an error if used in a normal application. - */ -int sceAppMgrGetBudgetInfo(SceAppMgrBudgetInfo *info); - + #ifdef __cplusplus } #endif diff --git a/include/user/avconfig.h b/include/user/avconfig.h index bef9ba4..d171647 100644 --- a/include/user/avconfig.h +++ b/include/user/avconfig.h @@ -7,12 +7,6 @@ extern "C" { #endif -/** Color Space Mode values to specify to ::sceAVConfigSetDisplayColorSpaceMode */ -typedef enum SceAVConfigColorSpaceMode { - SCE_AVCONFIG_COLOR_SPACE_MODE_DEFAULT = 0, //!< Default - SCE_AVCONFIG_COLOR_SPACE_MODE_HIGH_CONTRAST = 1 //!< High Contrast Mode -} SceAVConfigColorSpaceMode; - /** * Get the maximum brightness. * @@ -65,16 +59,6 @@ int sceAVConfigSetSystemVol(int volume); * */ int sceAVConfigMuteOn(void); - -/** - * Sets the color space mode on runtime. - * - * @param[in] csm - see ::SceAVConfigColorSpaceMode() - * - * @return 0 on success, < 0 on error. - * @note - This does not change color_space_mode in the registry. - */ -int sceAVConfigSetDisplayColorSpaceMode(int csm); #ifdef __cplusplus diff --git a/include/user/kernel/threadmgr.h b/include/user/kernel/threadmgr.h index a73562f..c5d93b7 100644 --- a/include/user/kernel/threadmgr.h +++ b/include/user/kernel/threadmgr.h @@ -585,16 +585,8 @@ typedef struct SceKernelEventFlagOptParam SceKernelEventFlagOptParam; /** Event flag creation attributes */ typedef enum SceEventFlagAttributes { - /* Waiting threads queued on a FIFO basis */ - SCE_EVENT_THREAD_FIFO = 0, - /* Waiting threads queued on priority basis */ - SCE_EVENT_THREAD_PRIO = 0x00002000, - /* Event flag can only be waited upon by one thread */ - SCE_EVENT_WAITSINGLE = 0, - /* Event flag can be waited upon by multiple threads */ - SCE_EVENT_WAITMULTIPLE = 0x00001000, - /* Event flag can be accessed by sceKernelOpenEventFlag / sceKernelCloseEventFlag */ - SCE_EVENT_OPENABLE = 0x00000080 + /** Allow the event flag to be waited upon by multiple threads */ + SCE_EVENT_WAITMULTIPLE = 0x200 } SceEventFlagAttributes; /** Event flag wait types */ diff --git a/include/user/sharedfb.h b/include/user/sharedfb.h deleted file mode 100644 index a8266c4..0000000 --- a/include/user/sharedfb.h +++ /dev/null @@ -1,41 +0,0 @@ -#ifndef _PSP2_SHAREDFB_H_ -#define _PSP2_SHAREDFB_H_ - -#include - -#ifdef __cplusplus -extern "C" { -#endif - -typedef struct SceSharedFbInfo { - void *fb_base; - int fb_size; - void *fb_base2; - int unk0[6]; - int stride; - int width; - int height; - int unk1; - int index; - int unk2[4]; - int vsync; - int unk3[3]; -} SceSharedFbInfo; - -SceUID _sceSharedFbOpen(int index, int sysver); -int sceSharedFbClose(SceUID fb_id); -int sceSharedFbBegin(SceUID fb_id, SceSharedFbInfo *info); -int sceSharedFbEnd(SceUID fb_id); -int sceSharedFbGetInfo(SceUID fb_id, SceSharedFbInfo *info); - -static inline -SceUID sceSharedFbOpen(int index) -{ - return _sceSharedFbOpen(index, 0x03570011); -}; - -#ifdef __cplusplus -} -#endif - -#endif /* _PSP2_SHAREDFB_H_ */ -- cgit v1.2.3