diff options
Diffstat (limited to 'include/user')
-rw-r--r-- | include/user/ctrl.h | 1 | ||||
-rw-r--r-- | include/user/incoming_dialog.h | 8 | ||||
-rw-r--r-- | include/user/jpegarm.h | 103 | ||||
-rw-r--r-- | include/user/kernel/modulemgr.h | 49 | ||||
-rw-r--r-- | include/user/notification_util.h | 2 |
5 files changed, 134 insertions, 29 deletions
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. diff --git a/include/user/incoming_dialog.h b/include/user/incoming_dialog.h index c110cf0..616b89e 100644 --- a/include/user/incoming_dialog.h +++ b/include/user/incoming_dialog.h @@ -25,7 +25,7 @@ typedef enum SceIncomingDialogStatus { /** * Errors */ -#define SCE_INCOMINGDIALOG_ERROR_INVALID_ARG 0x80106202; +#define SCE_INCOMING_DIALOG_ERROR_INVALID_ARG 0x80106202; typedef struct SceIncomingDialogParam { SceInt32 sdkVersion; @@ -42,7 +42,7 @@ typedef struct SceIncomingDialogParam { /** * Initialize incoming dialog library, initType must be 0. */ -SceInt32 sceIncomingDialogInitialize(int initType); +SceInt32 sceIncomingDialogInit(int initType); /** * Open incoming dialog. @@ -65,9 +65,9 @@ SceInt32 sceIncomingDialogSwitchToDialog(void); SceInt32 sceIncomingDialogClose(void); /** - * Finalize incoming dialog library + * Terminate incoming dialog library */ -SceInt32 sceIncomingDialogFinalize(void); +SceInt32 sceIncomingDialogTerm(void); static inline void sceIncomingDialogParamInit(SceIncomingDialogParam* dialogParam) 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/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 { diff --git a/include/user/notification_util.h b/include/user/notification_util.h index e9a5298..4aa362a 100644 --- a/include/user/notification_util.h +++ b/include/user/notification_util.h @@ -10,7 +10,7 @@ extern "C" { /** * Errors */ -#define SCE_NOTIFICATIONUTIL_ERROR_INTERNAL 0x80106301 +#define SCE_NOTIFICATION_UTIL_ERROR_INTERNAL 0x80106301 /** * BGDL-type notification event handler function |