From eff2931fd6f1b2043fae7e3aeacdc7c59b7d7c21 Mon Sep 17 00:00:00 2001 From: Backporter <29647778+Backporter@users.noreply.github.com> Date: Thu, 13 Oct 2022 01:33:04 -0400 Subject: [PATCH 01/19] Add Missing NpTrophy structure definitions. adds *OrbisNpTrophyScreenshotTarget, *OrbisNpTrophyGroupData, *OrbisNpTrophyGroupDetails, *OrbisNpTrophyGameData, *OrbisNpTrophyGameDetails --- include/orbis/GnmDriver.h | 2 +- include/orbis/_types/Np.h | 115 +++++++++++++++++++++++++++++--------- 2 files changed, 91 insertions(+), 26 deletions(-) diff --git a/include/orbis/GnmDriver.h b/include/orbis/GnmDriver.h index 18fb8c2d..33b1c800 100644 --- a/include/orbis/GnmDriver.h +++ b/include/orbis/GnmDriver.h @@ -190,7 +190,7 @@ void sceGnmSetVsShader(); // Empty Comment void sceGnmSetWaveLimitMultipliers(); // Empty Comment -void sceGnmSubmitAndFlipCommandBuffers(); +int32_t sceGnmSubmitAndFlipCommandBuffers(uint32_t count, void *dcbGpuAddrs[], uint32_t *dcbSizesInBytes, void *ccbGpuAddrs[], uint32_t *ccbSizesInBytes, uint32_t videoOutHandle, uint32_t displayBufferIndex, uint32_t flipMode, int64_t flipArg); // Empty Comment void sceGnmSubmitAndFlipCommandBuffersForWorkload(); // Empty Comment diff --git a/include/orbis/_types/Np.h b/include/orbis/_types/Np.h index 0f9ae9f5..eeae9399 100644 --- a/include/orbis/_types/Np.h +++ b/include/orbis/_types/Np.h @@ -1,34 +1,99 @@ #pragma once - #include -typedef struct OrbisNpTrophyDetails { - size_t size; // this needs to be set with sizeof(OrbisNpTrophyDetails) or any function that calls with this data will return a error - int32_t TRPID; // Trophy ID, 0-XXXX - int32_t Unk00; // Unkown data - int32_t Unk01; // Unkown data - bool HiddenFromView; // this determans if you can see the trophy before its unlocked - char Unk02[3]; // Unkown data - char TrophyName[128]; // Trophy Name, EX: "UNLOCK ME" - char TrophyDetails[1024]; // Description, EX: "This is what needs to be unlocked" +/* Np Trophy */ +typedef struct OrbisNpTrophyGameDetails +{ + size_t size; + uint32_t numGroups; + uint32_t numTrophies; + uint32_t numPlatinum; + uint32_t numGold; + uint32_t numSilver; + uint32_t numBronze; + char title[128]; + char description[1024]; +} OrbisNpTrophyGameDetails; + +typedef struct OrbisNpTrophyGameData +{ + size_t size; + uint32_t unlockedTrophies; + uint32_t unlockedPlatinum; + uint32_t unlockedGold; + uint32_t unlockedSilver; + uint32_t unlockedBronze; + uint32_t progressPercentage; +} OrbisNpTrophyGameData; + +typedef struct OrbisNpTrophyGroupDetails +{ + size_t size; + int32_t groupId; + uint32_t numTrophies; + uint32_t numPlatinum; + uint32_t numGold; + uint32_t numSilver; + uint32_t numBronze; + char title[128]; + char description[1024]; +} OrbisNpTrophyGroupDetails; + +typedef struct OrbisNpTrophyGroupData +{ + size_t size; + int32_t groupId; + uint32_t unlockedTrophies; + uint32_t unlockedPlatinum; + uint32_t unlockedGold; + uint32_t unlockedSilver; + uint32_t unlockedBronze; + uint32_t progressPercentage; + uint8_t UNK00[4]; +} OrbisNpTrophyGroupData; + +// +typedef struct OrbisNpTrophyDetails +{ + size_t size; + int32_t trophyId; + int32_t trophyGrade; + int32_t groupId; + bool hidden; + char Unk02[3]; + char name[128]; + char description[1024]; } OrbisNpTrophyDetails; -typedef struct OrbisNpTrophyData { - size_t size; // this needs to be set with sizeof(OrbisNpTrophyDetails) or any function that calls with this data will return a error - int32_t TRPID; // Trophy ID, 0-XX for loarge scope trophy sets - bool IsUnlocked; // flag that tells if the trophy is locked or unlocked - char Unk00[3]; // Unkown - OrbisRtcTick Timecode; // time when the Trophy was unlocked +// +typedef struct OrbisNpTrophyData +{ + size_t size; + int32_t trophyId; + bool unlocked; + char Unk00[3]; + OrbisRtcTick timestamp; } OrbisNpTrophyData; - -typedef struct OrbisNpOnlineId { - char data[16]; // account name, follows PSN schema, min 3/max 16 - char term; // terminator, always '\0'? - uint8_t UNK[3]; // Unkown, probably reserved? + +typedef struct OrbisNpTrophyScreenshotTarget +{ + int32_t context; + int32_t trophyId; +} OrbisNpTrophyScreenshotTarget; + +/* Np Online*/ +// +typedef struct OrbisNpOnlineId +{ + char data[16]; + char term; + uint8_t UNK[3]; } OrbisNpOnlineId; -typedef struct OrbisNpId { - OrbisNpOnlineId handle; // online info - uint8_t Unk20[8]; // could be uint64_t? - uint8_t Unk28[8]; // could be uint64_t? +// +typedef struct OrbisNpId +{ + OrbisNpOnlineId handle; + uint8_t Unk20[8]; + uint8_t Unk28[8]; } OrbisNpId; \ No newline at end of file From 00e7e5efc1d88e7a25dc12b02d39afc669f048f0 Mon Sep 17 00:00:00 2001 From: Backporter <29647778+Backporter@users.noreply.github.com> Date: Fri, 14 Oct 2022 20:10:39 -0400 Subject: [PATCH 02/19] Update Np.h add comments back. --- include/orbis/_types/Np.h | 44 +++++++++++++++++++-------------------- 1 file changed, 22 insertions(+), 22 deletions(-) diff --git a/include/orbis/_types/Np.h b/include/orbis/_types/Np.h index eeae9399..ea6d8b99 100644 --- a/include/orbis/_types/Np.h +++ b/include/orbis/_types/Np.h @@ -4,7 +4,7 @@ /* Np Trophy */ typedef struct OrbisNpTrophyGameDetails { - size_t size; + size_t size; // This needs to be set with sizeof(OrbisNpTrophyGameDetails) or any function that takes this structure as a parameter will return a error(0x80551604) uint32_t numGroups; uint32_t numTrophies; uint32_t numPlatinum; @@ -17,7 +17,7 @@ typedef struct OrbisNpTrophyGameDetails typedef struct OrbisNpTrophyGameData { - size_t size; + size_t size; // This needs to be set with sizeof(OrbisNpTrophyGameData) or any function that takes this structure as a parameter will return a error(0x80551604) uint32_t unlockedTrophies; uint32_t unlockedPlatinum; uint32_t unlockedGold; @@ -28,7 +28,7 @@ typedef struct OrbisNpTrophyGameData typedef struct OrbisNpTrophyGroupDetails { - size_t size; + size_t size; // This needs to be set with sizeof(OrbisNpTrophyGroupDetails) or any function that takes this structure as a parameter will return a error(0x80551604) int32_t groupId; uint32_t numTrophies; uint32_t numPlatinum; @@ -41,7 +41,7 @@ typedef struct OrbisNpTrophyGroupDetails typedef struct OrbisNpTrophyGroupData { - size_t size; + size_t size; // This needs to be set with sizeof(OrbisNpTrophyGroupData) or any function that takes this structure as a parameter will return a error(0x80551604) int32_t groupId; uint32_t unlockedTrophies; uint32_t unlockedPlatinum; @@ -55,39 +55,39 @@ typedef struct OrbisNpTrophyGroupData // typedef struct OrbisNpTrophyDetails { - size_t size; - int32_t trophyId; - int32_t trophyGrade; - int32_t groupId; - bool hidden; - char Unk02[3]; - char name[128]; - char description[1024]; + size_t size; // This needs to be set with sizeof(OrbisNpTrophyDetails) or any function that takes this structure as a parameter will return a error(0x80551604) + int32_t trophyId; // Trophy ID, 1-XXXX(0 should be the Platinum Trophy) + int32_t trophyGrade; // gold/silver/bronze/Platinum + int32_t groupId; // group where the trophy is located(normally 0 for single group trophy packs, depending on how many trophies exists and are split into groups inside the pack this could rage from 0 - xxxx) + bool hidden; // this determines if you can see the trophy before its unlocked(hidden flagged trophys will not allow you to see the description until you have unlcoked them) + char Unk02[3]; // Unkown data + char name[128]; // Trophy Name, EX: "UNLOCK ME" + char description[1024]; // Description, EX: "This is what needs to be unlocked" } OrbisNpTrophyDetails; // typedef struct OrbisNpTrophyData { - size_t size; - int32_t trophyId; - bool unlocked; - char Unk00[3]; - OrbisRtcTick timestamp; + size_t size; // this needs to be set with sizeof(OrbisNpTrophyData) or any function that takes this structure as a parameter will return a error(0x80551604) + int32_t trophyId; // Trophy ID, 1-XXXX(0 should be the Platinum Trophy) + bool unlocked; // flag that tells if the user has unlocked the Trophy) + char Unk00[3]; // likely padding, not sure why they didn't make unlocked a 32-bit value and swap a single bit for it, it would make it automaticlly alligned. + OrbisRtcTick timestamp; // RTC time stamp of when the trophy is unlocked(this isn't fully accurate due to the RTC drifting, it can be off anywhere from +1 second to a whole minute+ behind.) } OrbisNpTrophyData; typedef struct OrbisNpTrophyScreenshotTarget { - int32_t context; - int32_t trophyId; + int32_t context; // same context that comes form sceNpTrophyCreateContext once created. + int32_t trophyId; // Trophy ID, 1-XXXX(0 should be the Platinum Trophy) } OrbisNpTrophyScreenshotTarget; /* Np Online*/ // typedef struct OrbisNpOnlineId { - char data[16]; - char term; - uint8_t UNK[3]; + char data[16]; // account name, follows PSN schema, min 3/max 16 + char term; // terminator, always '\0'? + uint8_t UNK[3]; // Unkown, probably reserved/padding? } OrbisNpOnlineId; // From 4b44a3f1bdd423b5f4094b7c85dc7b16e959d140 Mon Sep 17 00:00:00 2001 From: Backporter <29647778+Backporter@users.noreply.github.com> Date: Sat, 12 Nov 2022 14:55:18 -0500 Subject: [PATCH 03/19] 0 savedata stuff **can** be removed if needed, through it should have a correct size now. --- include/orbis/NpTrophy.h | 63 ++++--------- include/orbis/_types/Np.h | 6 ++ include/orbis/_types/audio_out.h | 22 +++-- include/orbis/_types/kernel.h | 26 +++--- include/orbis/_types/rtc.h | 16 +++- include/orbis/_types/save_data.h | 31 ++++--- include/orbis/_types/video.h | 151 ++++++++++++++++++++++++++++++- 7 files changed, 229 insertions(+), 86 deletions(-) diff --git a/include/orbis/NpTrophy.h b/include/orbis/NpTrophy.h index 72aa8eed..94b6683c 100644 --- a/include/orbis/NpTrophy.h +++ b/include/orbis/NpTrophy.h @@ -8,61 +8,34 @@ extern "C" { #endif -// Empty Comment -void sceNpTrophyAbortHandle(); -// Empty Comment -void sceNpTrophyCaptureScreenshot(); -// Empty Comment -int sceNpTrophyCreateContext(int32_t *context, int32_t user, uint32_t unk, uint64_t unk2); -// Empty Comment -int sceNpTrophyCreateHandle(int32_t *handle); -// Empty Comment -int sceNpTrophyDestroyContext(int32_t context); -// Empty Comment -int sceNpTrophyDestroyHandle(int32_t handle); -// Empty Comment -void sceNpTrophyGetGameIcon(); -// Empty Comment -void sceNpTrophyGetGameInfo(); -// Empty Comment -void sceNpTrophyGetGroupIcon(); -// Empty Comment -void sceNpTrophyGetGroupInfo(); -// Empty Comment -void sceNpTrophyGetTrophyIcon(); -// Empty Comment -int32_t sceNpTrophyGetTrophyInfo(int32_t context, int32_t handle, int32_t TRPID, OrbisNpTrophyDetails* details, OrbisNpTrophyData* data); -// Empty Comment -void sceNpTrophyGetTrophyUnlockState(); -// Empty Comment +int32_t sceNpTrophyAbortHandle(int32_t a_handle); +int32_t sceNpTrophyCaptureScreenshot(int32_t a_handle, const OrbisNpTrophyScreenshotTarget* a_target, int32_t a_numTargets); +int32_t sceNpTrophyCreateContext(int32_t* a_context, int32_t a_userID, uint32_t a_serviceLabel, uint64_t a_options); +int32_t sceNpTrophyCreateHandle(int32_t* a_handle); +int32_t sceNpTrophyDestroyContext(int32_t a_context); +int32_t sceNpTrophyDestroyHandle(int32_t a_handle); +int32_t sceNpTrophyGetGameIcon(int32_t a_context, int32_t a_handle, void* a_buffer, size_t* a_size); +int32_t sceNpTrophyGetGameInfo(int32_t a_context, int32_t a_handle, OrbisNpTrophyGameDetails* a_details, OrbisNpTrophyGameData*); +int32_t sceNpTrophyGetGroupIcon(int32_t a_context, int32_t a_handle, int32_t a_groupID, void* a_buffer, size_t* a_size); +int32_t sceNpTrophyGetGroupInfo(int32_t a_context, int32_t a_handle, int32_t a_groupID, OrbisNpTrophyGroupDetails* a_details, OrbisNpTrophyGroupData* a_data); +int32_t sceNpTrophyGetTrophyIcon(int32_t a_context, int32_t a_handle, int32_t a_trophyID, void* a_buffer, size_t* a_size); +int32_t sceNpTrophyGetTrophyInfo(int32_t a_context, int32_t a_handle, int32_t a_trophyID, OrbisNpTrophyDetails* a_details, OrbisNpTrophyData* a_data); +int32_t sceNpTrophyGetTrophyUnlockState(int32_t a_context, int32_t a_handle, OrbisNpTrophyFlagArray* a_flags, uint32_t* a_count); +int32_t sceNpTrophyRegisterContext(int32_t a_context, int32_t a_handle, uint64_t a_options); +int32_t sceNpTrophyShowTrophyList(int32_t a_context, int32_t a_handle); +int32_t sceNpTrophyUnlockTrophy(int32_t a_context, int32_t a_handle, int32_t a_trophyID, int32_t *a_platinumId); + +void sceNpTrophySystemIsServerAvailable(); void sceNpTrophyIntAbortHandle(); -// Empty Comment void sceNpTrophyIntCheckNetSyncTitles(); -// Empty Comment void sceNpTrophyIntCreateHandle(); -// Empty Comment void sceNpTrophyIntDestroyHandle(); -// Empty Comment void sceNpTrophyIntGetLocalTrophySummary(); -// Empty Comment void sceNpTrophyIntGetProgress(); -// Empty Comment void sceNpTrophyIntGetRunningTitle(); -// Empty Comment void sceNpTrophyIntGetRunningTitles(); -// Empty Comment void sceNpTrophyIntGetTrpIconByUri(); -// Empty Comment void sceNpTrophyIntNetSyncTitles(); -// Empty Comment -int sceNpTrophyRegisterContext(int32_t context, int32_t handle, uint64_t unk); -// Empty Comment -int sceNpTrophyShowTrophyList(int32_t Context, int32_t hadle); -// Empty Comment -void sceNpTrophySystemIsServerAvailable(); -// Empty Comment -int sceNpTrophyUnlockTrophy(int32_t context, int32_t handle, int32_t TrophyID, int32_t *PLATID); - #endif #ifdef __cplusplus diff --git a/include/orbis/_types/Np.h b/include/orbis/_types/Np.h index ea6d8b99..fb25345b 100644 --- a/include/orbis/_types/Np.h +++ b/include/orbis/_types/Np.h @@ -2,6 +2,12 @@ #include /* Np Trophy */ + +typedef struct OrbisNpTrophyFlagArray +{ + uint32_t bits[128 >> 5]; +} OrbisNpTrophyFlagArray; + typedef struct OrbisNpTrophyGameDetails { size_t size; // This needs to be set with sizeof(OrbisNpTrophyGameDetails) or any function that takes this structure as a parameter will return a error(0x80551604) diff --git a/include/orbis/_types/audio_out.h b/include/orbis/_types/audio_out.h index c42f0dda..a737f46a 100644 --- a/include/orbis/_types/audio_out.h +++ b/include/orbis/_types/audio_out.h @@ -8,27 +8,31 @@ #define ORBIS_AUDIO_OUT_PARAM_FORMAT_FLOAT_MONO 3 #define ORBIS_AUDIO_OUT_PARAM_FORMAT_FLOAT_STEREO 4 -typedef struct OrbisAudioOutPostState { +typedef struct OrbisAudioOutPostState +{ uint16_t output; uint8_t channel; - uint8_t unk3[1]; + uint8_t reserved[1]; int16_t volume; - uint16_t unk5; + uint16_t rerouteCounter; uint64_t flag; - uint64_t unk7[2]; + uint64_t reserved2[2]; } OrbisAudioOutPostState; -typedef struct OrbisAudioOutSystemState { +typedef struct OrbisAudioOutSystemState +{ float loudness; - uint8_t unk2[4]; - uint64_t unk3[3]; + uint8_t reserved[4]; + uint64_t reserved2[3]; } OrbisAudioOutSystemState; -typedef struct OrbisAudioOutMasteringStatesHeader { +typedef struct OrbisAudioOutMasteringStatesHeader +{ uint32_t id; } OrbisAudioOutMasteringStatesHeader; -typedef struct OrbisAudioOutOutputParam { +typedef struct OrbisAudioOutOutputParam +{ int32_t handle; const void *pointer; } OrbisAudioOutOutputParam; \ No newline at end of file diff --git a/include/orbis/_types/kernel.h b/include/orbis/_types/kernel.h index 0f9e4755..210d9c16 100644 --- a/include/orbis/_types/kernel.h +++ b/include/orbis/_types/kernel.h @@ -59,11 +59,11 @@ struct kevent { uintptr_t ident; /* identifier for this event */ - short filter; /* filter for event */ - u_short flags; + short filter; /* filter for event */ + u_short flags; u_int fflags; intptr_t data; - void *udata; /* opaque user data identifier */ + void* udata; /* opaque user data identifier */ }; typedef struct OrbisKernelModuleSegmentInfo @@ -101,12 +101,12 @@ typedef struct _OrbisKernelSemaOptParam { typedef struct _OrbisKernelSema* OrbisKernelSema; typedef struct { - uint32_t unk01; - uint16_t unk02; - uint16_t unk03; - uint8_t unk04; - uint8_t unk05; - uint8_t unk06[6]; + uint32_t timeLow; + uint16_t timeLow; + uint16_t timeHiAndVersion; + uint8_t clockSeqHiAndReserved; + uint8_t clockSeqLow; + uint8_t node[6]; } OrbisKernelUuid; typedef mode_t OrbisKernelMode; @@ -120,11 +120,11 @@ typedef struct OrbisKernelIovec { } OrbisKernelIovec; typedef struct { - void* unk01; - void* unk02; + void* start; + void* end; off_t offset; - int unk04; - int unk05; + int protection; + int memoryType; unsigned isFlexibleMemory : 1; unsigned isDirectMemory : 1; unsigned isStack : 1; diff --git a/include/orbis/_types/rtc.h b/include/orbis/_types/rtc.h index 5530eca8..f89880a1 100644 --- a/include/orbis/_types/rtc.h +++ b/include/orbis/_types/rtc.h @@ -1,3 +1,17 @@ -typedef struct OrbisRtcTick { +#include + +typedef struct OrbisRtcTick +{ uint64_t Ticks; } OrbisRtcTick; + +typedef struct OrbisRtcDateTime +{ + uint16_t year; + uint16_t month; + uint16_t day; + uint16_t hour; + uint16_t minute; + uint16_t second; + uint32_t microsecond; +} OrbisRtcDateTime; \ No newline at end of file diff --git a/include/orbis/_types/save_data.h b/include/orbis/_types/save_data.h index dd0f9251..27aeaf8a 100644 --- a/include/orbis/_types/save_data.h +++ b/include/orbis/_types/save_data.h @@ -35,6 +35,9 @@ #define ORBIS_SAVE_DATA_SUBTITLE_MAXSIZE 128 //Maximum size for a save data subtitle name (NULL-terminated, UTF-8) #define ORBIS_SAVE_DATA_DETAIL_MAXSIZE 1024 //Maximum size for save data detailed information (NULL-terminated, UTF-8) +typedef struct OrbisSaveDataMountPoint { + char data[ORBIS_SAVE_DATA_MOUNT_POINT_DATA_MAXSIZE]; +} OrbisSaveDataMountPoint; typedef struct OrbisSaveDataFingerprint { char data[ORBIS_SAVE_DATA_FINGERPRINT_DATA_SIZE]; @@ -60,21 +63,21 @@ typedef struct OrbisSaveDataMountInfo { uint8_t reserved[32]; } OrbisSaveDataMountInfo; -typedef struct __attribute__((packed)) OrbisSaveDataMount +typedef struct OrbisSaveDataMount { int32_t userId; - int32_t unknown1; - const char *titleId; - const char *dirName; - const char *fingerprint; - uint64_t blocks; - uint32_t mountMode; - uint8_t reserved[36]; + int32_t pad04; + const OrbisSaveDataTitleId* titleId; + const OrbisSaveDataDirName* dirName; + const OrbisSaveDataFingerprint* fingerprint; + uint64_t blocks; + uint32_t mountMode; + uint8_t reserved[32]; } OrbisSaveDataMount; -typedef struct __attribute__((packed)) OrbisSaveDataMountResult +typedef struct OrbisSaveDataMountResult { - char mountPathName[ORBIS_SAVE_DATA_MOUNT_POINT_DATA_MAXSIZE]; + OrbisSaveDataMountPoint mountPoint; uint64_t requiredBlocks; uint32_t progress; uint8_t reserved[32]; @@ -91,15 +94,15 @@ typedef struct OrbisSaveDataDelete int32_t unknown2; } OrbisSaveDataDelete; -typedef struct __attribute__((packed)) OrbisSaveDataParam +typedef struct OrbisSaveDataParam { char title[ORBIS_SAVE_DATA_TITLE_MAXSIZE]; char subtitle[ORBIS_SAVE_DATA_SUBTITLE_MAXSIZE]; char details[ORBIS_SAVE_DATA_DETAIL_MAXSIZE]; uint32_t userParam; - uint32_t unknown1; + uint32_t pad504; time_t mtime; - char unknown2[0x20]; + char reserved[32]; } OrbisSaveDataParam; typedef struct OrbisSaveDataMount2 { @@ -113,7 +116,7 @@ typedef struct OrbisSaveDataMount2 { } OrbisSaveDataMount2; typedef struct OrbisSaveDataIcon { - void *buf; + void* buf; size_t bufSize; size_t dataSize; uint8_t reserved[32]; diff --git a/include/orbis/_types/video.h b/include/orbis/_types/video.h index 34ce96a0..90e48af9 100644 --- a/include/orbis/_types/video.h +++ b/include/orbis/_types/video.h @@ -12,8 +12,118 @@ #define ORBIS_VIDEO_OUT_PIXEL_FORMAT_A8B8G8R8_SRGB 0x80002200 +typedef enum +{ + ORBIS_VIDEO_OUT_DEVICE_CAPABILITY_YUV = 1 << 0, + ORBIS_VIDEO_OUT_DEVICE_CAPABILITY_XVYCC = 1 << 1, + ORBIS_VIDEO_OUT_DEVICE_CAPABILITY_S3D_FRAME_PACKING_59_94HZ = 1 << 2, + ORBIS_VIDEO_OUT_DEVICE_CAPABILITY_VR_VIEW_59_94HZ = 1 << 4, + ORBIS_VIDEO_OUT_DEVICE_CAPABILITY_VR_VIEW_119_88HZ = 1 << 5, + ORBIS_VIDEO_OUT_DEVICE_CAPABILITY_VR_VIEW_89_91HZ = 1 << 6, + ORBIS_VIDEO_OUT_DEVICE_CAPABILITY_BT2020_PQ = 1 << 7, +} OrbisVideoOutDeviceCapability; + +typedef enum +{ + ORBIS_VIDEO_OUT_SIGNAL_ENCODING_UNKNOWN = 0, + ORBIS_VIDEO_OUT_SIGNAL_ENCODING_RGB444 = 1, + ORBIS_VIDEO_OUT_SIGNAL_ENCODING_YUV444 = 2, + ORBIS_VIDEO_OUT_SIGNAL_ENCODING_YUV422 = 3, + ORBIS_VIDEO_OUT_SIGNAL_ENCODING_ANY = 0xFF, +} OrbisVideoOutSignalEncoding; + +typedef enum +{ + ORBIS_VIDEO_OUT_SIGNAL_RANGE_UNKNOWN = 0, + ORBIS_VIDEO_OUT_SIGNAL_RANGE_LIMITED = 1, + ORBIS_VIDEO_OUT_SIGNAL_RANGE_FULL = 2, + ORBIS_VIDEO_OUT_SIGNAL_RANGE_ANY = 0xFF, +} OrbisVideoOutSignalRange; + +typedef enum +{ + ORBIS_VIDEO_OUT_COLORIMETRY_UNKNOWN = 0, + ORBIS_VIDEO_OUT_COLORIMETRY_SRGB = 1, + ORBIS_VIDEO_OUT_COLORIMETRY_CERGB = 2, + ORBIS_VIDEO_OUT_COLORIMETRY_YCBCR = 3, + ORBIS_VIDEO_OUT_COLORIMETRY_YCBCR601 = 4, + ORBIS_VIDEO_OUT_COLORIMETRY_YCBCR709 = 5, + ORBIS_VIDEO_OUT_COLORIMETRY_XVYCC = 6, + ORBIS_VIDEO_OUT_COLORIMETRY_XVYCC601 = 7, + ORBIS_VIDEO_OUT_COLORIMETRY_XVYCC709 = 8, + ORBIS_VIDEO_OUT_COLORIMETRY_BT2020 = 9, + ORBIS_VIDEO_OUT_COLORIMETRY_RGB2020 = 10, + ORBIS_VIDEO_OUT_COLORIMETRY_YCBCR2020 = 11, + ORBIS_VIDEO_OUT_COLORIMETRY_BT2020_PQ = 12, + ORBIS_VIDEO_OUT_COLORIMETRY_RGB2020_PQ = 13, + ORBIS_VIDEO_OUT_COLORIMETRY_YCBCR2020_PQ = 14, + ORBIS_VIDEO_OUT_COLORIMETRY_ANY = 0xFF, +} OrbisVideoOutColorimetry; + +typedef enum +{ + ORBIS_VIDEO_OUT_COLOR_DEPTH_UNKNOWN = 0, + ORBIS_VIDEO_OUT_COLOR_DEPTH_24BPP = 24, + ORBIS_VIDEO_OUT_COLOR_DEPTH_30BPP = 30, + ORBIS_VIDEO_OUT_COLOR_DEPTH_36BPP = 36, + ORBIS_VIDEO_OUT_COLOR_DEPTH_ANY = 0xFF, +} OrbisVideoOutColorDepth; + +typedef enum +{ + ORBIS_VIDEO_OUT_RESOLUTION_UNKNOWN = 0, + ORBIS_VIDEO_OUT_RESOLUTION_480I = 1, + ORBIS_VIDEO_OUT_RESOLUTION_480I_WIDESCREEN = 2, + ORBIS_VIDEO_OUT_RESOLUTION_576I = 3, + ORBIS_VIDEO_OUT_RESOLUTION_576I_WIDESCREEN = 4, + ORBIS_VIDEO_OUT_RESOLUTION_480P = 5, + ORBIS_VIDEO_OUT_RESOLUTION_480P_WIDESCREEN = 6, + ORBIS_VIDEO_OUT_RESOLUTION_576P = 7, + ORBIS_VIDEO_OUT_RESOLUTION_576P_WIDESCREEN = 8, + ORBIS_VIDEO_OUT_RESOLUTION_720P = 9, + ORBIS_VIDEO_OUT_RESOLUTION_1080I = 10, + ORBIS_VIDEO_OUT_RESOLUTION_1080P = 11, + ORBIS_VIDEO_OUT_RESOLUTION_720P_S3D_FRAME_PACKING = 0xA0, + ORBIS_VIDEO_OUT_RESOLUTION_1080P_VR_VIEW = 0xE1, + ORBIS_VIDEO_OUT_RESOLUTION_ANY_S3D = 0xFFFFFFFF81FFFFFFull, + ORBIS_VIDEO_OUT_RESOLUTION_ANY_VR_VIEW = 0xFFFFFFFFC1FFFFFFull, + ORBIS_VIDEO_OUT_RESOLUTION_ANY = 0xFFFFFFFFFFFFFFFFull, +} OrbisVideoOutResolution; + +typedef enum +{ + ORBIS_VIDEO_OUT_REFRESH_RATE_UNKNOWN = 0, + ORBIS_VIDEO_OUT_REFRESH_RATE_23_98HZ = 1, + ORBIS_VIDEO_OUT_REFRESH_RATE_50HZ = 2, + ORBIS_VIDEO_OUT_REFRESH_RATE_59_94HZ = 3, + ORBIS_VIDEO_OUT_REFRESH_RATE_29_97HZ = 6, + + // VR + ORBIS_VIDEO_OUT_REFRESH_RATE_89_91HZ = 35, + ORBIS_VIDEO_OUT_REFRESH_RATE_119_88HZ = 13, + ORBIS_VIDEO_OUT_REFRESH_RATE_ANY = 0xFFFFFFFFFFFFFFFFull, +} OrbisVideoOutRefreshRate; + +typedef enum +{ + ORBIS_VIDEO_OUT_CONTENT_TYPE_UNKNOWN = 0, + ORBIS_VIDEO_OUT_CONTENT_TYPE_GRAPHICS = 1, + ORBIS_VIDEO_OUT_CONTENT_TYPE_PHOTO = 2, + ORBIS_VIDEO_OUT_CONTENT_TYPE_CINEMA = 3, + ORBIS_VIDEO_OUT_CONTENT_TYPE_GAME = 4, + ORBIS_VIDEO_OUT_CONTENT_TYPE_ANY = 0xFF, +} OrbisVideoOutContentType; + +typedef enum +{ + SCE_VIDEO_OUT_VR_VIEW_CROP_VERTICAL_OFFSET_MIN = 0, + SCE_VIDEO_OUT_VR_VIEW_CROP_VERTICAL_OFFSET_NEUTRAL = 0, + SCE_VIDEO_OUT_VR_VIEW_CROP_VERTICAL_OFFSET_MAX = 28, +} OrbisVideoOutVRVerticalOffset; + // Struct Credits - psxdev -typedef struct OrbisVideoOutBufferAttribute { +typedef struct OrbisVideoOutBufferAttribute +{ int32_t format; int32_t tmode; int32_t aspect; @@ -24,7 +134,8 @@ typedef struct OrbisVideoOutBufferAttribute { } OrbisVideoOutBufferAttribute; // Struct Credits - psxdev -typedef struct OrbisVideoOutFlipStatus { +typedef struct OrbisVideoOutFlipStatus +{ uint64_t num; uint64_t ptime; uint64_t stime; @@ -37,7 +148,8 @@ typedef struct OrbisVideoOutFlipStatus { } OrbisVideoOutFlipStatus; // Struct Credits - Inori -typedef struct OrbisVideoOutResolutionStatus { +typedef struct OrbisVideoOutResolutionStatus +{ uint32_t width; uint32_t height; uint32_t paneWidth; @@ -47,4 +159,35 @@ typedef struct OrbisVideoOutResolutionStatus { uint16_t flags; uint16_t reserved0; uint32_t reserved1[3]; -} OrbisVideoOutResolutionStatus; \ No newline at end of file +} OrbisVideoOutResolutionStatus; + +typedef struct OrbisVideoOutMode +{ + uint32_t size; // = sizeof(OrbisVideoOutMode); + uint8_t signalEncoding; // = OrbisVideoOutSignalEncoding + uint8_t signalRange; // = OrbisVideoOutSignalRange + uint8_t colorimetry; // = OrbisVideoOutColorimetry + uint8_t depth; // = OrbisVideoOutColorDepth + uint64_t refreshRate; // = OrbisVideoOutRefreshRate + uint64_t resolution; // = OrbisVideoOutResolution + uint8_t contentType; // = OrbisVideoOutContentType + uint8_t reserved[3]; + uint32_t reserved2[1]; +} OrbisVideoOutMode; + +typedef struct OrbisVideoOutDeviceCapabilityInfo +{ + uint64_t capability; // = OrbisVideoOutDeviceCapability +} OrbisVideoOutDeviceCapabilityInfo; + +typedef struct OrbisVideoOutVrViewCropAdjustment +{ + int16_t verticalOffset; + int16_t reserved; + int32_t reserved2[3]; +} OrbisVideoOutVrViewCropAdjustment; + +typedef struct OrbisVideoOutConfigureOptions +{ + OrbisVideoOutVrViewCropAdjustment vrViewCropAdjustment; +} OrbisVideoOutConfigureOptions; \ No newline at end of file From 0d2dc6c87750700f68365ebebdae49c3e77ad9f5 Mon Sep 17 00:00:00 2001 From: Backporter <29647778+Backporter@users.noreply.github.com> Date: Sat, 12 Nov 2022 14:58:53 -0500 Subject: [PATCH 04/19] Update kernel.h fix type. --- include/orbis/_types/kernel.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/orbis/_types/kernel.h b/include/orbis/_types/kernel.h index 210d9c16..57608e71 100644 --- a/include/orbis/_types/kernel.h +++ b/include/orbis/_types/kernel.h @@ -100,9 +100,9 @@ typedef struct _OrbisKernelSemaOptParam { typedef struct _OrbisKernelSema* OrbisKernelSema; -typedef struct { +typedef struct OrbisKernelUuid { uint32_t timeLow; - uint16_t timeLow; + uint16_t timeMid; uint16_t timeHiAndVersion; uint8_t clockSeqHiAndReserved; uint8_t clockSeqLow; From 4d2ed723110737bdbddbc29fd035d69fc601cc37 Mon Sep 17 00:00:00 2001 From: Backporter <29647778+Backporter@users.noreply.github.com> Date: Sat, 10 Dec 2022 21:30:22 -0500 Subject: [PATCH 05/19] add VideoDecX structures and fix function definitions added required structures and fixed existing function definitions, --- include/orbis/SystemService.h | 50 ++++---- include/orbis/Videodec.h | 24 ++-- include/orbis/Videodec2.h | 36 ++---- include/orbis/_types/Videodec.h | 134 ++++++++++++++++++++ include/orbis/_types/Videodec2.h | 93 ++++++++++++++ include/orbis/_types/sys_service.h | 190 ++++++++++++++++++++++------- 6 files changed, 420 insertions(+), 107 deletions(-) create mode 100644 include/orbis/_types/Videodec.h create mode 100644 include/orbis/_types/Videodec2.h diff --git a/include/orbis/SystemService.h b/include/orbis/SystemService.h index 0b180514..65a85340 100644 --- a/include/orbis/SystemService.h +++ b/include/orbis/SystemService.h @@ -3,15 +3,36 @@ #include #include -#include +#include "_types/sys_service.h" #ifdef __cplusplus extern "C" { #endif -int32_t sceSystemServiceHideSplashScreen(); +int32_t sceSystemServiceLoadExec(const char *path, const char *args[]); +int32_t sceSystemServiceShowControllerSettings(); int32_t sceSystemServiceParamGetInt(int32_t paramId, int32_t *value); int32_t sceSystemServiceParamGetString(int32_t paramId, char *buf, size_t bufSize); +int32_t sceSystemServiceHideSplashScreen(); +int32_t sceSystemServiceEnablePersonalEyeToEyeDistanceSetting(); +int32_t sceSystemServiceDisablePersonalEyeToEyeDistanceSetting(); +int32_t sceSystemServiceShowEyeToEyeDistanceSetting(); +int32_t sceSystemServiceIsEyeToEyeDistanceAdjusted(int32_t, bool*); +int32_t sceSystemServiceReportAbnormalTermination(void*); +int32_t sceSystemServiceDisableSuspendConfirmationDialog(); +int32_t sceSystemServiceEnableSuspendConfirmationDialog(); +int32_t sceSystemServicePowerTick(); +int32_t sceSystemServiceLaunchTournamentsTeamProfile(int32_t, const char*, const char*, const char*); +int32_t sceSystemServiceLaunchEventDetails(int32_t, const char*); +int32_t sceSystemServiceLaunchWebBrowser(const char*, OrbisSystemServiceLaunchWebBrowserParam*); +int32_t sceSystemServiceShowDisplaySafeAreaSettings(); +int32_t sceSystemServiceGetDisplaySafeAreaInfo(OrbisSystemServiceDisplaySafeAreaInfo*); +OrbisSystemServiceGpuLoadEmulationMode sceSystemServiceGetGpuLoadEmulationMode(); +int32_t sceSystemServiceSetGpuLoadEmulationMode(OrbisSystemServiceGpuLoadEmulationMode); +int32_t sceSystemServiceReenableMusicPlayer(); +int32_t sceSystemServiceDisableMusicPlayer(); +int32_t sceSystemServiceGetStatus(OrbisSystemServiceStatus*); +int32_t sceSystemServiceReceiveEvent(OrbisSystemServiceEvent*); void sceSystemServiceAcquireFb0(); void sceSystemServiceAddLocalProcess(); @@ -27,70 +48,47 @@ void sceSystemServiceChangeNumberOfGpuCu(); void sceSystemServiceChangeSamuClock(); void sceSystemServiceChangeUvdClock(); void sceSystemServiceChangeVceClock(); -void sceSystemServiceDisableMusicPlayer(); -void sceSystemServiceDisablePersonalEyeToEyeDistanceSetting(); -void sceSystemServiceDisableSuspendConfirmationDialog(); -void sceSystemServiceEnablePersonalEyeToEyeDistanceSetting(); -void sceSystemServiceEnableSuspendConfirmationDialog(); void sceSystemServiceGetAppFocusedAppStatus(); void sceSystemServiceGetAppIdOfBigApp(); void sceSystemServiceGetAppIdOfMiniApp(); void sceSystemServiceGetAppStatus(); void sceSystemServiceGetAppType(); -void sceSystemServiceGetDisplaySafeAreaInfo(); void sceSystemServiceGetEventForDaemon(); -void sceSystemServiceGetGpuLoadEmulationMode(); void sceSystemServiceGetLocalProcessStatusList(); void sceSystemServiceGetParentSocket(); void sceSystemServiceGetParentSocketForPsmKit(); void sceSystemServiceGetPSButtonEvent(); void sceSystemServiceGetRenderingMode(); -void sceSystemServiceGetStatus(); void sceSystemServiceGetTitleWorkaroundInfo(); void sceSystemServiceGetVersionNumberOfCameraCalibrationData(); void sceSystemServiceIsAppSuspended(); void sceSystemServiceIsBgmPlaying(); -void sceSystemServiceIsEyeToEyeDistanceAdjusted(); void sceSystemServiceIsScreenSaverOn(); void sceSystemServiceIsShellUiFgAndGameBgCpuMode(); void sceSystemServiceKillApp(); void sceSystemServiceKillLocalProcess(); void sceSystemServiceKillLocalProcessForPsmKit(); void sceSystemServiceLaunchApp(); -void sceSystemServiceLaunchEventDetails(); -void sceSystemServiceLaunchTournamentsTeamProfile(); -void sceSystemServiceLaunchWebBrowser(); -int sceSystemServiceLoadExec(const char *path, const char *args[]); void sceSystemServiceNavigateToAnotherApp(); void sceSystemServiceNavigateToGoBack(); void sceSystemServiceNavigateToGoBackWithValue(); void sceSystemServiceNavigateToGoHome(); -void sceSystemServicePowerTick(); void sceSystemServiceRaiseExceptionLocalProcess(); -void sceSystemServiceReceiveEvent(); -void sceSystemServiceReenableMusicPlayer(); void sceSystemServiceRegisterDaemon(); void sceSystemServiceReleaseFb0(); -void sceSystemServiceReportAbnormalTermination(); void sceSystemServiceRequestCameraCalibration(); void sceSystemServiceRequestToChangeRenderingMode(); void sceSystemServiceResumeLocalProcess(); void sceSystemServiceSetControllerFocusPermission(); -void sceSystemServiceSetGpuLoadEmulationMode(); void sceSystemServiceSetOutOfVrPlayAreaFlag(); void sceSystemServiceSetOutOfVrPlayZoneWarning(); -void sceSystemServiceShowControllerSettings(); -void sceSystemServiceShowDisplaySafeAreaSettings(); -void sceSystemServiceShowEyeToEyeDistanceSetting(); void sceSystemServiceSuspendBackgroundApp(); void sceSystemServiceSuspendLocalProcess(); void sceSystemServiceTickVideoPlayback(); void sceSystemServiceTurnOffScreenSaver(); - -#endif - #ifdef __cplusplus } #endif +#endif diff --git a/include/orbis/Videodec.h b/include/orbis/Videodec.h index 8b65c901..49436667 100644 --- a/include/orbis/Videodec.h +++ b/include/orbis/Videodec.h @@ -2,30 +2,22 @@ #define _SCE_VIDEO_DEC_H_ #include +#include "_types/videodec.h" #ifdef __cplusplus extern "C" { #endif +int32_t sceVideodecCreateDecoder(const OrbisVideodecConfigInfo*, const OrbisVideodecResourceInfo*, OrbisVideodecCtrl*); +int32_t sceVideodecDecode(OrbisVideodecCtrl*, const OrbisVideodecInputData*, OrbisVideodecFrameBuffer*, OrbisVideodecPictureInfo*); +int32_t sceVideodecFlush(OrbisVideodecCtrl*, OrbisVideodecFrameBuffer*, OrbisVideodecPictureInfo*); +int32_t sceVideodecQueryResourceInfo(const OrbisVideodecConfigInfo*, OrbisVideodecResourceInfo*); +int32_t sceVideodecReset(OrbisVideodecCtrl*); +int32_t sceVideodecDeleteDecoder(OrbisVideodecCtrl*); -// Empty Comment -void sceVideodecCreateDecoder(); -// Empty Comment -void sceVideodecDecode(); -// Empty Comment -void sceVideodecDeleteDecoder(); -// Empty Comment -void sceVideodecFlush(); -// Empty Comment void sceVideodecMapMemory(); -// Empty Comment -void sceVideodecQueryResourceInfo(); -// Empty Comment -void sceVideodecReset(); - - -#endif #ifdef __cplusplus } +#endif #endif \ No newline at end of file diff --git a/include/orbis/Videodec2.h b/include/orbis/Videodec2.h index ccab020f..c16ee3f6 100644 --- a/include/orbis/Videodec2.h +++ b/include/orbis/Videodec2.h @@ -2,38 +2,26 @@ #define _SCE_VIDEO_DEC_2_H_ #include +#include "_types/Videodec2.h" #ifdef __cplusplus extern "C" { #endif - - -// Empty Comment -void sceVideodec2AllocateComputeQueue(); -// Empty Comment -void sceVideodec2CreateDecoder(); -// Empty Comment void sceVideodec2CreateHevcDecoder(); -// Empty Comment -void sceVideodec2Decode(); -// Empty Comment -void sceVideodec2DeleteDecoder(); -// Empty Comment -void sceVideodec2Flush(); -// Empty Comment -void sceVideodec2GetPictureInfo(); -// Empty Comment -void sceVideodec2QueryComputeMemoryInfo(); -// Empty Comment -void sceVideodec2QueryDecoderMemoryInfo(); -// Empty Comment -void sceVideodec2ReleaseComputeQueue(); -// Empty Comment -void sceVideodec2Reset(); +int32_t sceVideodec2AllocateComputeQueue(const OrbisVideodec2ComputeConfigInfo*, const OrbisVideodec2ComputeMemoryInfo*, void**); +int32_t sceVideodec2CreateDecoder(const OrbisVideodec2DecoderConfigInfo*, const OrbisVideodec2DecoderMemoryInfo*, void**); +int32_t sceVideodec2Decode(void*, const OrbisVideodec2InputData*, OrbisVideodec2FrameBuffer* , OrbisVideodec2OutputInfo*); +int32_t sceVideodec2Flush(void* , OrbisVideodec2FrameBuffer* , OrbisVideodec2OutputInfo*); +int32_t sceVideodec2GetPictureInfo(const OrbisVideodec2OutputInfo* , void* , void*); +int32_t sceVideodec2QueryComputeMemoryInfo(OrbisVideodec2ComputeMemoryInfo*); +int32_t sceVideodec2QueryDecoderMemoryInfo(const OrbisVideodec2DecoderConfigInfo*, OrbisVideodec2DecoderMemoryInfo*); -#endif +int32_t sceVideodec2ReleaseComputeQueue(void*); +int32_t sceVideodec2Reset(void*); +int32_t sceVideodec2DeleteDecoder(void*); #ifdef __cplusplus } +#endif #endif \ No newline at end of file diff --git a/include/orbis/_types/Videodec.h b/include/orbis/_types/Videodec.h new file mode 100644 index 00000000..021c8217 --- /dev/null +++ b/include/orbis/_types/Videodec.h @@ -0,0 +1,134 @@ +#pragma once +#include + +#define ORBIS_VIDEODEC_ERROR_API_FAIL -2134835200 // = 0x80C10000 +#define ORBIS_VIDEODEC_ERROR_CODEC_TYPE -2134835199 // = 0x80C10001 +#define ORBIS_VIDEODEC_ERROR_STRUCT_SIZE -2134835198 // = 0x80C10002 +#define ORBIS_VIDEODEC_ERROR_HANDLE -2134835197 // = 0x80C10003 +#define ORBIS_VIDEODEC_ERROR_CPU_MEMORY_SIZE -2134835196 // = 0x80C10004 +#define ORBIS_VIDEODEC_ERROR_CPU_MEMORY_POINTER -2134835195 // = 0x80C10005 +#define ORBIS_VIDEODEC_ERROR_CPU_GPU_MEMORY_SIZE -2134835194 // = 0x80C10006 +#define ORBIS_VIDEODEC_ERROR_CPU_GPU_MEMORY_POINTER -2134835193 // = 0x80C10007 +#define ORBIS_VIDEODEC_ERROR_SHADER_CONTEXT_POINTER -2134835192 // = 0x80C10008 +#define ORBIS_VIDEODEC_ERROR_AU_SIZE -2134835191 // = 0x80C10009 +#define ORBIS_VIDEODEC_ERROR_AU_POINTER -2134835190 // = 0x80C1000A +#define ORBIS_VIDEODEC_ERROR_FRAME_BUFFER_SIZE -2134835189 // = 0x80C1000B +#define ORBIS_VIDEODEC_ERROR_FRAME_BUFFER_POINTER -2134835188 // = 0x80C1000C +#define ORBIS_VIDEODEC_ERROR_FRAME_BUFFER_ALIGNMENT -2134835187 // = 0x80C1000D +#define ORBIS_VIDEODEC_ERROR_CONFIG_INFO -2134835186 // = 0x80C1000E +#define ORBIS_VIDEODEC_ERROR_ARGUMENT_POINTER -2134835185 // = 0x80C1000F +#define ORBIS_VIDEODEC_ERROR_NEW_SEQUENCE -2134835184 // = 0x80C10010 +#define ORBIS_VIDEODEC_ERROR_DECODE_AU -2134835183 // = 0x80C10011 +#define ORBIS_VIDEODEC_ERROR_MISMATCH_SPEC -2134835182 // = 0x80C10012 +#define ORBIS_VIDEODEC_ERROR_INVALID_SEQUENCE -2134835181 // = 0x80C10013 +#define ORBIS_VIDEODEC_ERROR_FATAL_STREAM -2134835180 // = 0x80C10014 +#define ORBIS_VIDEODEC_ERROR_FATAL_STATE -2134835179 // = 0x80C10015 + +#define ORBIS_VIDEODEC_CODEC_TYPE_AVC (0) +#define ORBIS_VIDEODEC_TIMESTAMP_INVALID (0xffffffffffffffffULL) +#define ORBIS_VIDEODEC_FLAG_DEFAULT (0ULL) +#define ORBIS_VIDEODEC_FLAG_DISABLE_ONE_FRAME_DELAY (0x5A0000ULL) +#define ORBIS_VIDEODEC_AVC_PROFILE_BASELINE (66) +#define ORBIS_VIDEODEC_AVC_PROFILE_MAIN (77) +#define ORBIS_VIDEODEC_AVC_PROFILE_HIGH (100) +#define ORBIS_VIDEODEC_AVC_LEVEL_1 (10) +#define ORBIS_VIDEODEC_AVC_LEVEL_1_b (111) +#define ORBIS_VIDEODEC_AVC_LEVEL_1_1 (11) +#define ORBIS_VIDEODEC_AVC_LEVEL_1_2 (12) +#define ORBIS_VIDEODEC_AVC_LEVEL_1_3 (13) +#define ORBIS_VIDEODEC_AVC_LEVEL_2 (20) +#define ORBIS_VIDEODEC_AVC_LEVEL_2_1 (21) +#define ORBIS_VIDEODEC_AVC_LEVEL_2_2 (22) +#define ORBIS_VIDEODEC_AVC_LEVEL_3 (30) +#define ORBIS_VIDEODEC_AVC_LEVEL_3_1 (31) +#define ORBIS_VIDEODEC_AVC_LEVEL_3_2 (32) +#define ORBIS_VIDEODEC_AVC_LEVEL_4 (40) +#define ORBIS_VIDEODEC_AVC_LEVEL_4_1 (41) +#define ORBIS_VIDEODEC_AVC_LEVEL_4_2 (42) +#define ORBIS_VIDEODEC_AVC_LEVEL_5 (50) +#define ORBIS_VIDEODEC_AVC_LEVEL_5_1 (51) + +typedef struct OrbisVideodecCtrl +{ + size_t thisSize; // = sizeof(OrbisVideodecCtrl) + uintptr_t handle; + uint64_t version; +} OrbisVideodecCtrl; + +typedef struct OrbisVideodecConfigInfo +{ + size_t thisSize; // = sizeof(OrbisVideodecConfigInfo) + uint32_t codecType; + uint32_t profile; + uint32_t maxLevel; + int32_t maxFrameWidth; + int32_t maxFrameHeight; + int32_t maxDpbFrameCount; + uint64_t videodecFlags; +} OrbisVideodecConfigInfo; + +typedef struct OrbisVideodecResourceInfo +{ + size_t thisSize; // = sizeof(OrbisVideodecResourceInfo) + size_t cpuMemorySize; + void* pCpuMemory; + size_t cpuGpuMemorySize; + void* pCpuGpuMemory; + size_t maxFrameBufferSize; + uint32_t frameBufferAlignment; +} OrbisVideodecResourceInfo; + +typedef struct OrbisVideodecInputData +{ + size_t thisSize; // sizeof(OrbisVideodecInputData) + void* pAuData; + size_t auSize; + uint64_t ptsData; + uint64_t dtsData; + uint64_t attachedData; +} OrbisVideodecInputData; + +typedef struct OrbisVideodecAvcInfo +{ + uint32_t numUnitsInTick; + uint32_t timeScale; + uint8_t fixedFrameRateFlag; + uint8_t aspectRatioIdc; + uint16_t sarWidth; + uint16_t sarHeight; + uint8_t colourPrimaries; + uint8_t transferCharacteristics; + uint8_t matrixCoefficients; + uint8_t videoFullRangeFlag; + uint32_t frameCropLeftOffset; + uint32_t frameCropRightOffset; + uint32_t frameCropTopOffset; + uint32_t frameCropBottomOffset; +} OrbisVideodecAvcInfo; + +typedef union OrbisVideodecCodecInfo +{ + uint8_t reserved[64]; + OrbisVideodecAvcInfo avc; +} OrbisVideodecCodecInfo; + +typedef struct OrbisVideodecPictureInfo +{ + size_t thisSize; // = sizeof(OrbisVideodecPictureInfo) + uint32_t isValid; + uint32_t codecType; + uint32_t frameWidth; + uint32_t framePitch; + uint32_t frameHeight; + uint32_t isErrorPic; + uint64_t ptsData; + uint64_t attachedData; + OrbisVideodecCodecInfo codec; +} OrbisVideodecPictureInfo; + +typedef struct OrbisVideodecFrameBuffer +{ + size_t thisSize; // = sizeof(OrbisVideodecFrameBuffer) + void* pFrameBuffer; + size_t frameBufferSize; +} OrbisVideodecFrameBuffer; \ No newline at end of file diff --git a/include/orbis/_types/Videodec2.h b/include/orbis/_types/Videodec2.h new file mode 100644 index 00000000..f4382473 --- /dev/null +++ b/include/orbis/_types/Videodec2.h @@ -0,0 +1,93 @@ +#pragma once +#include + +#define ORBIS_VIDEODEC2_RESOURCE_TYPE_COMPUTE (1) +#define ORBIS_VIDEODEC2_TIMESTAMP_INVALID (0xffffffffffffffffULL) +#define ORBIS_VIDEODEC2_AUTO_FRAME_SETTING (-1) +#define ORBIS_VIDEODEC2_INHERIT_AFFINITY_MASK (0) +#define ORBIS_VIDEODEC2_INHERIT_THREAD_PRIORITY (-1) + +typedef struct OrbisVideodec2DecoderConfigInfo +{ + size_t thisSize; // = sizeof(OrbisVideodec2DecoderConfigInfo) + uint32_t resourceType; + uint32_t codecType; + uint32_t profile; + uint32_t maxLevel; + int32_t maxFrameWidth; + int32_t maxFrameHeight; + int32_t maxDpbFrameCount; + uint32_t decodePipelineDepth; + void* computeQueue; + uint64_t cpuAffinityMask; + int32_t cpuThreadPriority; + bool optimizeProgressiveVideo; + bool checkMemoryType; + uint8_t reserved0; + uint8_t reserved1; + void* extraConfigInfo; +} OrbisVideodec2DecoderConfigInfo; + +typedef struct OrbisVideodec2DecoderMemoryInfo +{ + size_t thisSize; // = sizeof(OrbisVideodec2DecoderMemoryInfo) + size_t cpuMemorySize; + void* pCpuMemory; + size_t gpuMemorySize; + void* pGpuMemory; + size_t cpuGpuMemorySize; + void* pCpuGpuMemory; + size_t maxFrameBufferSize; + uint32_t frameBufferAlignment; + uint32_t reserved0; +} OrbisVideodec2DecoderMemoryInfo; + + +typedef struct OrbisVideodec2InputData +{ + size_t thisSize; // = sizeof(OrbisVideodec2InputData) + void* pAuData; + size_t auSize; + uint64_t ptsData; + uint64_t dtsData; + uint64_t attachedData; +} OrbisVideodec2InputData; + +typedef struct OrbisVideodec2OutputInfo +{ + size_t thisSize; // = sizeof(OrbisVideodec2OutputInfo) + bool isValid; + bool isErrorFrame; + uint8_t pictureCount; + uint32_t codecType; + uint32_t frameWidth; + uint32_t framePitch; + uint32_t frameHeight; + void* pFrameBuffer; + size_t frameBufferSize; +} OrbisVideodec2OutputInfo; + +typedef struct OrbisVideodec2FrameBuffer +{ + size_t thisSize; // = sizeof(OrbisVideodec2FrameBuffer) + void* pFrameBuffer; + size_t frameBufferSize; + bool isAccepted; +} OrbisVideodec2FrameBuffer; + +typedef struct OrbisVideodec2ComputeMemoryInfo +{ + size_t thisSize; // = sizeof(OrbisVideodec2ComputeMemoryInfo) + size_t cpuGpuMemorySize; + void* pCpuGpuMemory; +} OrbisVideodec2ComputeMemoryInfo; + +typedef struct OrbisVideodec2ComputeConfigInfo +{ + size_t thisSize; // = sizeof(OrbisVideodec2ComputeConfigInfo) + uint16_t computePipeId; + uint16_t computeQueueId; + bool checkMemoryType; + uint8_t reserved0; + uint16_t reserved1; +} OrbisVideodec2ComputeConfigInfo; \ No newline at end of file diff --git a/include/orbis/_types/sys_service.h b/include/orbis/_types/sys_service.h index fb34410e..56425cd1 100644 --- a/include/orbis/_types/sys_service.h +++ b/include/orbis/_types/sys_service.h @@ -1,13 +1,13 @@ #pragma once -#define ORBIS_SYSTEM_SERVICE_PARAM_ID_LANG 1 //Language settings -#define ORBIS_SYSTEM_SERVICE_PARAM_ID_DATE_FORMAT 2 //Date display format -#define ORBIS_SYSTEM_SERVICE_PARAM_ID_TIME_FORMAT 3 //Time display format -#define ORBIS_SYSTEM_SERVICE_PARAM_ID_TIME_ZONE 4 //Time zone offset -#define ORBIS_SYSTEM_SERVICE_PARAM_ID_SUMMERTIME 5 //Daylight savings time -#define ORBIS_SYSTEM_SERVICE_PARAM_ID_SYSTEM_NAME 6 //System name -#define ORBIS_SYSTEM_SERVICE_PARAM_ID_GAME_PARENTAL_LEVEL 7 //Viewer age restriction level of the game -#define ORBIS_SYSTEM_SERVICE_PARAM_ID_ENTER_BUTTON_ASSIGN 1000 //Enter button assignment on the system software +#define ORBIS_SYSTEM_SERVICE_PARAM_ID_LANG 1 // Language settings +#define ORBIS_SYSTEM_SERVICE_PARAM_ID_DATE_FORMAT 2 // Date display format +#define ORBIS_SYSTEM_SERVICE_PARAM_ID_TIME_FORMAT 3 // Time display format +#define ORBIS_SYSTEM_SERVICE_PARAM_ID_TIME_ZONE 4 // Time zone offset +#define ORBIS_SYSTEM_SERVICE_PARAM_ID_SUMMERTIME 5 // Daylight savings time +#define ORBIS_SYSTEM_SERVICE_PARAM_ID_SYSTEM_NAME 6 // System name +#define ORBIS_SYSTEM_SERVICE_PARAM_ID_GAME_PARENTAL_LEVEL 7 // Viewer age restriction level of the game +#define ORBIS_SYSTEM_SERVICE_PARAM_ID_ENTER_BUTTON_ASSIGN 1000 // Enter button assignment on the system software #define ORBIS_SYSTEM_SERVICE_MAX_SYSTEM_NAME_LENGTH 65 //Maximum system name length @@ -31,36 +31,144 @@ #define ORBIS_SYSTEM_PARAM_GAME_PARENTAL_LEVEL10 10 #define ORBIS_SYSTEM_PARAM_GAME_PARENTAL_LEVEL11 11 -#define ORBIS_SYSTEM_PARAM_ENTER_BUTTON_ASSIGN_CIRCLE 0 //Circle button is the enter button -#define ORBIS_SYSTEM_PARAM_ENTER_BUTTON_ASSIGN_CROSS 1 //Cross button is the enter button - -#define ORBIS_SYSTEM_PARAM_LANG_JAPANESE 0 //Japanese -#define ORBIS_SYSTEM_PARAM_LANG_ENGLISH_US 1 //English (United States) -#define ORBIS_SYSTEM_PARAM_LANG_FRENCH 2 //French (France) -#define ORBIS_SYSTEM_PARAM_LANG_SPANISH 3 //Spanish (Spain) -#define ORBIS_SYSTEM_PARAM_LANG_GERMAN 4 //German -#define ORBIS_SYSTEM_PARAM_LANG_ITALIAN 5 //Italian -#define ORBIS_SYSTEM_PARAM_LANG_DUTCH 6 //Dutch -#define ORBIS_SYSTEM_PARAM_LANG_PORTUGUESE_PT 7 //Portuguese (Portugal) -#define ORBIS_SYSTEM_PARAM_LANG_RUSSIAN 8 //Russian -#define ORBIS_SYSTEM_PARAM_LANG_KOREAN 9 //Korean -#define ORBIS_SYSTEM_PARAM_LANG_CHINESE_T 10 //Chinese (traditional) -#define ORBIS_SYSTEM_PARAM_LANG_CHINESE_S 11 //Chinese (simplified) -#define ORBIS_SYSTEM_PARAM_LANG_FINNISH 12 //Finnish -#define ORBIS_SYSTEM_PARAM_LANG_SWEDISH 13 //Swedish -#define ORBIS_SYSTEM_PARAM_LANG_DANISH 14 //Danish -#define ORBIS_SYSTEM_PARAM_LANG_NORWEGIAN 15 //Norwegian -#define ORBIS_SYSTEM_PARAM_LANG_POLISH 16 //Polish -#define ORBIS_SYSTEM_PARAM_LANG_PORTUGUESE_BR 17 //Portuguese (Brazil) -#define ORBIS_SYSTEM_PARAM_LANG_ENGLISH_GB 18 //English (United Kingdom) -#define ORBIS_SYSTEM_PARAM_LANG_TURKISH 19 //Turkish -#define ORBIS_SYSTEM_PARAM_LANG_SPANISH_LA 20 //Spanish (Latin America) -#define ORBIS_SYSTEM_PARAM_LANG_ARABIC 21 //Arabic -#define ORBIS_SYSTEM_PARAM_LANG_FRENCH_CA 22 //French (Canada) -#define ORBIS_SYSTEM_PARAM_LANG_CZECH 23 //Czech -#define ORBIS_SYSTEM_PARAM_LANG_HUNGARIAN 24 //Hungarian -#define ORBIS_SYSTEM_PARAM_LANG_GREEK 25 //Greek -#define ORBIS_SYSTEM_PARAM_LANG_ROMANIAN 26 //Romanian -#define ORBIS_SYSTEM_PARAM_LANG_THAI 27 //Thai -#define ORBIS_SYSTEM_PARAM_LANG_VIETNAMESE 28 //Vietnamese -#define ORBIS_SYSTEM_PARAM_LANG_INDONESIAN 29 //Indonesian +#define ORBIS_SYSTEM_PARAM_ENTER_BUTTON_ASSIGN_CIRCLE 0 // Circle button is the enter button +#define ORBIS_SYSTEM_PARAM_ENTER_BUTTON_ASSIGN_CROSS 1 // Cross button is the enter button + +#define ORBIS_SYSTEM_PARAM_LANG_JAPANESE 0 // Japanese +#define ORBIS_SYSTEM_PARAM_LANG_ENGLISH_US 1 // English (United States) +#define ORBIS_SYSTEM_PARAM_LANG_FRENCH 2 // French (France) +#define ORBIS_SYSTEM_PARAM_LANG_SPANISH 3 // Spanish (Spain) +#define ORBIS_SYSTEM_PARAM_LANG_GERMAN 4 // German +#define ORBIS_SYSTEM_PARAM_LANG_ITALIAN 5 // Italian +#define ORBIS_SYSTEM_PARAM_LANG_DUTCH 6 // Dutch +#define ORBIS_SYSTEM_PARAM_LANG_PORTUGUESE_PT 7 // Portuguese (Portugal) +#define ORBIS_SYSTEM_PARAM_LANG_RUSSIAN 8 // Russian +#define ORBIS_SYSTEM_PARAM_LANG_KOREAN 9 // Korean +#define ORBIS_SYSTEM_PARAM_LANG_CHINESE_T 10 // Chinese (traditional) +#define ORBIS_SYSTEM_PARAM_LANG_CHINESE_S 11 // Chinese (simplified) +#define ORBIS_SYSTEM_PARAM_LANG_FINNISH 12 // Finnish +#define ORBIS_SYSTEM_PARAM_LANG_SWEDISH 13 // Swedish +#define ORBIS_SYSTEM_PARAM_LANG_DANISH 14 // Danish +#define ORBIS_SYSTEM_PARAM_LANG_NORWEGIAN 15 // Norwegian +#define ORBIS_SYSTEM_PARAM_LANG_POLISH 16 // Polish +#define ORBIS_SYSTEM_PARAM_LANG_PORTUGUESE_BR 17 // Portuguese (Brazil) +#define ORBIS_SYSTEM_PARAM_LANG_ENGLISH_GB 18 // English (United Kingdom) +#define ORBIS_SYSTEM_PARAM_LANG_TURKISH 19 // Turkish +#define ORBIS_SYSTEM_PARAM_LANG_SPANISH_LA 20 // Spanish (Latin America) +#define ORBIS_SYSTEM_PARAM_LANG_ARABIC 21 // Arabic +#define ORBIS_SYSTEM_PARAM_LANG_FRENCH_CA 22 // French (Canada) +#define ORBIS_SYSTEM_PARAM_LANG_CZECH 23 // Czech +#define ORBIS_SYSTEM_PARAM_LANG_HUNGARIAN 24 // Hungarian +#define ORBIS_SYSTEM_PARAM_LANG_GREEK 25 // Greek +#define ORBIS_SYSTEM_PARAM_LANG_ROMANIAN 26 // Romanian +#define ORBIS_SYSTEM_PARAM_LANG_THAI 27 // Thai +#define ORBIS_SYSTEM_PARAM_LANG_VIETNAMESE 28 // Vietnamese +#define ORBIS_SYSTEM_PARAM_LANG_INDONESIAN 29 // Indonesian + +typedef enum OrbisSystemServiceEventType +{ + ORBIS_SYSTEM_SERVICE_EVENT_INVALID = -1, + ORBIS_SYSTEM_SERVICE_EVENT_ON_RESUME = 0x10000000, + ORBIS_SYSTEM_SERVICE_EVENT_GAME_LIVE_STREAMING_STATUS_UPDATE = 0x10000001, + ORBIS_SYSTEM_SERVICE_EVENT_SESSION_INVITATION = 0x10000002, + ORBIS_SYSTEM_SERVICE_EVENT_ENTITLEMENT_UPDATE = 0x10000003, + ORBIS_SYSTEM_SERVICE_EVENT_GAME_CUSTOM_DATA = 0x10000004, + ORBIS_SYSTEM_SERVICE_EVENT_DISPLAY_SAFE_AREA_UPDATE = 0x10000005, + ORBIS_SYSTEM_SERVICE_EVENT_URL_OPEN = 0x10000006, + ORBIS_SYSTEM_SERVICE_EVENT_LAUNCH_APP = 0x10000007, + ORBIS_SYSTEM_SERVICE_EVENT_APP_LAUNCH_LINK = 0x10000008, + ORBIS_SYSTEM_SERVICE_EVENT_ADDCONTENT_INSTALL = 0x10000009, + ORBIS_SYSTEM_SERVICE_EVENT_RESET_VR_POSITION = 0x1000000a, + ORBIS_SYSTEM_SERVICE_EVENT_JOIN_EVENT = 0x1000000b, + ORBIS_SYSTEM_SERVICE_EVENT_PLAYGO_LOCUS_UPDATE = 0x1000000c, + ORBIS_SYSTEM_SERVICE_EVENT_PLAY_TOGETHER_HOST = 0x1000000d, + ORBIS_SYSTEM_SERVICE_EVENT_SERVICE_ENTITLEMENT_UPDATE = 0x1000000e, + ORBIS_SYSTEM_SERVICE_EVENT_EYE_TO_EYE_DISTANCE_UPDATE = 0x1000000f, + ORBIS_SYSTEM_SERVICE_EVENT_JOIN_MATCH_EVENT = 0x10000010, + ORBIS_SYSTEM_SERVICE_EVENT_PLAY_TOGETHER_HOST_A = 0x10000011, + ORBIS_SYSTEM_SERVICE_EVENT_WEBBROWSER_CLOSED = 0x10000012, + ORBIS_SYSTEM_SERVICE_EVENT_CONTROLLER_SETTINGS_CLOSED = 0x10000013, + ORBIS_SYSTEM_SERVICE_EVENT_JOIN_TEAM_ON_TEAM_MATCH_EVENT = 0x10000014, + ORBIS_SYSTEM_SERVICE_EVENT_OPEN_SHARE_MENU = 0x30000000, +} OrbisSystemServiceEventType; + +typedef enum OrbisSystemServiceGpuLoadEmulationMode +{ + ORBIS_SYSTEM_SERVICE_GPU_LOAD_EMULATION_MODE_OFF, + ORBIS_SYSTEM_SERVICE_GPU_LOAD_EMULATION_MODE_NORMAL, + ORBIS_SYSTEM_SERVICE_GPU_LOAD_EMULATION_MODE_HIGH, +} OrbisSystemServiceGpuLoadEmulationMode; + +typedef struct OrbisSystemServiceLaunchWebBrowserParam +{ + uint32_t size; + uint8_t reserved[128]; +} OrbisSystemServiceLaunchWebBrowserParam; + + +typedef struct OrbisSystemServiceDisplaySafeAreaInfo +{ + float ratio; + uint8_t reserved[128]; +} OrbisSystemServiceDisplaySafeAreaInfo; + + +typedef struct OrbisSystemServiceStatus +{ + int32_t eventNum; + bool isSystemUiOverlaid; + bool isInBackgroundExecution; + bool isCpuMode7CpuNormal; + bool isGameLiveStreamingOnAir; + bool isOutOfVrPlayArea; + uint8_t reserved[125]; +} OrbisSystemServiceStatus; + + +// why design a structure like this SCE? +typedef struct OrbisSystemServiceEvent +{ + OrbisSystemServiceEventType eventType; + union + { + char param[8192]; + + struct + { + char source[1024]; + union + { + char arg[4096]; + char url[4096]; + }; + } urlOpen; + + struct + { + uint32_t size; + uint8_t arg[8188]; + } launchApp; + + struct + { + uint32_t size; + uint8_t arg[2020]; + } appLaunchLink; + + struct + { + int32_t userId; + char eventId[37]; + char bootArgument[7169]; + } joinEvent; + + struct + { + int32_t userId; + uint32_t npServiceLabel; + uint8_t reserved[8184]; + } serviceEntitlementUpdate; + + uint8_t reserved[8192]; + } data; +} OrbisSystemServiceEvent; \ No newline at end of file From 8df6a34c7e18b61840343e8b9a9cc23427b799fe Mon Sep 17 00:00:00 2001 From: Backporter <29647778+Backporter@users.noreply.github.com> Date: Wed, 4 Jan 2023 16:33:15 -0500 Subject: [PATCH 06/19] Update Rtc.h - fixed all but five defs, - swapped over to OrbisRtcDateTime from TimeTable - swapped over to OrbisRtcTick from RealTick --- include/orbis/Rtc.h | 190 ++++++++++++-------------------------------- 1 file changed, 53 insertions(+), 137 deletions(-) diff --git a/include/orbis/Rtc.h b/include/orbis/Rtc.h index 8404b443..1aa7a52b 100644 --- a/include/orbis/Rtc.h +++ b/include/orbis/Rtc.h @@ -7,229 +7,145 @@ #ifndef _SCE_RTC_H_ #define _SCE_RTC_H_ +#include "_types/rtc.h" #include +#include #ifdef __cplusplus extern "C" { #endif -/*! \struct RealTick - \brief a tick to supply to orbis rtc functions. - RealTick is just an uint64_t value used to represent tick value. -*/ -typedef struct RealTick { - uint64_t mytick; -} RealTick; - -/*! \struct TimeTable - \brief TimeTable is an struct used to store time information. from year to microseconds. - The struct has entrys for (year, month, day, hour, minute, second, microsecond) -*/ -typedef struct TimeTable { - unsigned short year; - unsigned short month; - unsigned short day; - unsigned short hour; - unsigned short minute; - unsigned short second; - unsigned short microsecond; -} TimeTable; - /** * Standard method to verify timestamp is valid or not. * @param input is the time table you want to verify. * @return 0 = Valid and Negatives values are error codes. */ -int sceRtcCheckValid(TimeTable *input); +int sceRtcCheckValid(OrbisRtcDateTime *input); /** * Returns the current tick of the Real Time Clock. - * @param outTimeTable output a current time table. + * @param outOrbisRtcDateTime output a current time table. * @param outTick is the current tick of the rtc. * @return 0 = Valid and Negatives values are error codes. */ -int sceRtcGetTick(const TimeTable *outTimeTable, RealTick *outTick); +int sceRtcGetTick(const OrbisRtcDateTime *outOrbisRtcDateTime, OrbisRtcTick *outTick); /** * Set the Real Time Clock by given param inputTick - * @param inputTimeTable the table the tick is stored to. + * @param inputOrbisRtcDateTime the table the tick is stored to. * @param inputTick is the tick you wish to supply to SceRtcSetTick * @return 0 = Valid and Negatives values are error codes. */ -int sceRtcSetTick(TimeTable *inputTimeTable, RealTick *inputTick); +int sceRtcSetTick(OrbisRtcDateTime *inputOrbisRtcDateTime, OrbisRtcTick *inputTick); /** * Adds Days to RTC Clock - * @param inputTimeTable + * @param inputOrbisRtcDateTime * @param inputTick * @param days * @return 0 = Valid and Negatives values are error codes. */ -int sceRtcTickAddDays(TimeTable *inputTimeTable, RealTick *inputTick, int days); +int sceRtcTickAddDays(OrbisRtcDateTime *inputOrbisRtcDateTime, OrbisRtcTick *inputTick, int days); /** * Adds hours to RTC Clock - * @param inputTimeTable + * @param inputOrbisRtcDateTime * @param inputTick * @param hours * @return 0 = Valid and Negatives values are error codes. */ -int sceRtcTickAddHours(TimeTable *inputTimeTable, RealTick *inputTick, int hours); +int sceRtcTickAddHours(OrbisRtcDateTime *inputOrbisRtcDateTime, OrbisRtcTick *inputTick, int hours); /** * Add Micro Seconds to RTC Clock - * @param inputTimeTable + * @param inputOrbisRtcDateTime * @param inputTick * @param msecs * @return 0 = Valid and Negatives values are error codes. */ -int sceRtcTickAddMicroseconds(TimeTable *inputTimeTable, RealTick *inputTick, int64_t msecs); +int sceRtcTickAddMicroseconds(OrbisRtcDateTime *inputOrbisRtcDateTime, OrbisRtcTick *inputTick, int64_t msecs); /** * Add Minutes to RTC Clock - * @param inputTimeTable + * @param inputOrbisRtcDateTime * @param inputTick * @param mins * @return 0 = Valid and Negatives values are error codes. */ -int sceRtcTickAddMinutes(TimeTable *inputTimeTable, RealTick *inputTick, int mins); +int sceRtcTickAddMinutes(OrbisRtcDateTime *inputOrbisRtcDateTime, OrbisRtcTick *inputTick, int mins); /** * Add Months to RTC Clock - * @param inputTimeTable + * @param inputOrbisRtcDateTime * @param inputTick * @param months * @return 0 = Valid and Negatives values are error codes. */ -int sceRtcTickAddMonths(TimeTable *inputTimeTable, RealTick *inputTick, int months); +int sceRtcTickAddMonths(OrbisRtcDateTime *inputOrbisRtcDateTime, OrbisRtcTick *inputTick, int months); /** * Add seconds to RTC Clock - * @param inputTimeTable + * @param inputOrbisRtcDateTime * @param inputTick * @param seconds * @return 0 = Valid and Negatives values are error codes. */ -int sceRtcTickAddSeconds(TimeTable *inputTimeTable, RealTick *inputTick, int64_t seconds); +int sceRtcTickAddSeconds(OrbisRtcDateTime *inputOrbisRtcDateTime, OrbisRtcTick *inputTick, int64_t seconds); /** * Add ticks to RTC Clock - * @param inputTimeTable + * @param inputOrbisRtcDateTime * @param inputTick * @param ticks * @return 0 = Valid and Negatives values are error codes. */ -int sceRtcTickAddTicks(TimeTable *inputTimeTable, RealTick *inputTick, int64_t ticks); +int sceRtcTickAddTicks(OrbisRtcDateTime *inputOrbisRtcDateTime, OrbisRtcTick *inputTick, int64_t ticks); /** * Add weaks to RTC Clock - * @param inputTimeTable + * @param inputOrbisRtcDateTime * @param inputTick * @param weeks * @return 0 = Valid and Negatives values are error codes. */ -int sceRtcTickAddWeeks(TimeTable *inputTimeTable, RealTick *inputTick, int weeks); +int sceRtcTickAddWeeks(OrbisRtcDateTime *inputOrbisRtcDateTime, OrbisRtcTick *inputTick, int weeks); /** * Add years to RTC Clock - * @param inputTimeTable + * @param inputOrbisRtcDateTime * @param inputTick * @param years * @return 0 = Valid and Negatives values are error codes. */ -int sceRtcTickAddYears(TimeTable *inputTimeTable, RealTick *inputTick, int years); - -// These two functions are internal to the prx i think. -cv -// Unused Functions ? will remain commented for now! -//void sceRtcInit(); -// Unused Function? will remain commented for now -//void sceRtcEnd(); - -// All functions below need reversed and prototypes and comments filled in. -// As of right now these functions might react unexpected until reversed and documented - -// Undocumented Function... Need to reverse -void sceRtcCompareTick(); - -// Undocumented Function... Need to reverse -void sceRtcConvertLocalTimeToUtc(); - -// Undocumented Function... Need to reverse -void sceRtcConvertUtcToLocalTime(); - -// Undocumented Function... Need to reverse -void sceRtcFormatRFC2822(); - -// Undocumented Function... Need to reverse -void sceRtcFormatRFC2822LocalTime(); - -// Undocumented Function... Need to reverse -void sceRtcFormatRFC3339(); - -// Undocumented Function... Need to reverse -void sceRtcFormatRFC3339LocalTime(); - -// Undocumented Function... Need to reverse -void sceRtcGetCurrentAdNetworkTick(); - -// Undocumented Function... Need to reverse -void sceRtcGetCurrentClock(); - -// 0x0 = OK -// 0x80B50002 = pointer is invalid -// needs more RE to fully understand -int sceRtcGetCurrentClockLocalTime(TimeTable*); - -// Undocumented Function... Need to reverse -void sceRtcGetCurrentDebugNetworkTick(); - -// Undocumented Function... Need to reverse -void sceRtcGetCurrentNetworkTick(); - -// Undocumented Function... Need to reverse -void sceRtcGetCurrentTick(); - -// Undocumented Function... Need to reverse -void sceRtcGetDayOfWeek(); - -// Undocumented Function... Need to reverse -void sceRtcGetDaysInMonth(); - -// Undocumented Function... Need to reverse -void sceRtcGetDosTime(); - -// Undocumented Function... Need to reverse -void sceRtcGetTickResolution(); - -// Undocumented Function... Need to reverse -void sceRtcGetTime_t(); - -// Undocumented Function... Need to reverse -void sceRtcGetWin32FileTime(); - -// Undocumented Function... Need to reverse -void sceRtcIsLeapYear(); - -// Undocumented Function... Need to reverse -void sceRtcParseDateTime(); - -// Undocumented Function... Need to reverse -void sceRtcParseRFC3339(); - -// Undocumented Function... Need to reverse -void sceRtcSetConf(); - -// Undocumented Function... Need to reverse -void sceRtcSetCurrentTick(); - -// Undocumented Function... Need to reverse -void sceRtcSetDosTime(); - -// Undocumented Function... Need to reverse -void sceRtcSetTime_t(); - -// Undocumented Function... Need to reverse -void sceRtcSetWin32FileTime(); +int sceRtcTickAddYears(OrbisRtcDateTime *inputOrbisRtcDateTime, OrbisRtcTick *inputTick, int years); +int sceRtcConvertLocalTimeToUtc(OrbisRtcTick*, OrbisRtcTick*); +int sceRtcConvertUtcToLocalTime(OrbisRtcTick*, OrbisRtcTick*); +int sceRtcGetCurrentClock(OrbisRtcDateTime*); +int sceRtcGetCurrentClockLocalTime(OrbisRtcDateTime*); +int sceRtcGetCurrentNetworkTick(OrbisRtcTick*); +int sceRtcGetCurrentTick(OrbisRtcTick*); +int sceRtcGetDaysInMonth(int year, int month); +int sceRtcIsLeapYear(int year); +int sceRtcParseRFC3339(OrbisRtcTick*, const char*); +int sceRtcParseDateTime(OrbisRtcTick*, const char*); +int sceRtcFormatRFC3339LocalTime(char*, OrbisRtcTick*); +int sceRtcFormatRFC3339(char*, OrbisRtcTick*, int); +int sceRtcFormatRFC2822LocalTime(char*, OrbisRtcTick*); +int sceRtcFormatRFC2822(char*, OrbisRtcTick*, int); +int sceRtcGetDayOfWeek(int y, int m, int d); +int sceRtcGetTime_t(OrbisRtcDateTime*, time_t*); +int sceRtcSetTime_t(OrbisRtcDateTime*, time_t); +int sceRtcGetDosTime(OrbisRtcDateTime*, unsigned int*); +int sceRtcSetWin32FileTime(OrbisRtcDateTime*, uint64_t); +int sceRtcGetWin32FileTime(OrbisRtcDateTime*, uint64_t*); +int sceRtcSetDosTime(OrbisRtcDateTime*, unsigned int); + +unsigned int sceRtcGetTickResolution(); +int sceRtcGetCurrentDebugNetworkTick(); +int sceRtcGetCurrentAdNetworkTick(); +int sceRtcCompareTick(); +int sceRtcSetConf(); +int sceRtcSetCurrentTick(); #ifdef __cplusplus } From 0dff13cec27704bcb5ce67dec349edbe7f8acb0a Mon Sep 17 00:00:00 2001 From: Backporter <29647778+Backporter@users.noreply.github.com> Date: Fri, 6 Jan 2023 16:58:45 -0500 Subject: [PATCH 07/19] Update Rtc.h --- include/orbis/Rtc.h | 91 --------------------------------------------- 1 file changed, 91 deletions(-) diff --git a/include/orbis/Rtc.h b/include/orbis/Rtc.h index 1aa7a52b..8b357812 100644 --- a/include/orbis/Rtc.h +++ b/include/orbis/Rtc.h @@ -15,108 +15,17 @@ extern "C" { #endif -/** - * Standard method to verify timestamp is valid or not. - * @param input is the time table you want to verify. - * @return 0 = Valid and Negatives values are error codes. - */ int sceRtcCheckValid(OrbisRtcDateTime *input); - -/** - * Returns the current tick of the Real Time Clock. - * @param outOrbisRtcDateTime output a current time table. - * @param outTick is the current tick of the rtc. - * @return 0 = Valid and Negatives values are error codes. - */ int sceRtcGetTick(const OrbisRtcDateTime *outOrbisRtcDateTime, OrbisRtcTick *outTick); - -/** - * Set the Real Time Clock by given param inputTick - * @param inputOrbisRtcDateTime the table the tick is stored to. - * @param inputTick is the tick you wish to supply to SceRtcSetTick - * @return 0 = Valid and Negatives values are error codes. - */ int sceRtcSetTick(OrbisRtcDateTime *inputOrbisRtcDateTime, OrbisRtcTick *inputTick); - -/** - * Adds Days to RTC Clock - * @param inputOrbisRtcDateTime - * @param inputTick - * @param days - * @return 0 = Valid and Negatives values are error codes. - */ int sceRtcTickAddDays(OrbisRtcDateTime *inputOrbisRtcDateTime, OrbisRtcTick *inputTick, int days); - -/** - * Adds hours to RTC Clock - * @param inputOrbisRtcDateTime - * @param inputTick - * @param hours - * @return 0 = Valid and Negatives values are error codes. - */ int sceRtcTickAddHours(OrbisRtcDateTime *inputOrbisRtcDateTime, OrbisRtcTick *inputTick, int hours); - -/** - * Add Micro Seconds to RTC Clock - * @param inputOrbisRtcDateTime - * @param inputTick - * @param msecs - * @return 0 = Valid and Negatives values are error codes. - */ int sceRtcTickAddMicroseconds(OrbisRtcDateTime *inputOrbisRtcDateTime, OrbisRtcTick *inputTick, int64_t msecs); - -/** - * Add Minutes to RTC Clock - * @param inputOrbisRtcDateTime - * @param inputTick - * @param mins - * @return 0 = Valid and Negatives values are error codes. - */ int sceRtcTickAddMinutes(OrbisRtcDateTime *inputOrbisRtcDateTime, OrbisRtcTick *inputTick, int mins); - -/** - * Add Months to RTC Clock - * @param inputOrbisRtcDateTime - * @param inputTick - * @param months - * @return 0 = Valid and Negatives values are error codes. - */ int sceRtcTickAddMonths(OrbisRtcDateTime *inputOrbisRtcDateTime, OrbisRtcTick *inputTick, int months); - -/** - * Add seconds to RTC Clock - * @param inputOrbisRtcDateTime - * @param inputTick - * @param seconds - * @return 0 = Valid and Negatives values are error codes. - */ int sceRtcTickAddSeconds(OrbisRtcDateTime *inputOrbisRtcDateTime, OrbisRtcTick *inputTick, int64_t seconds); - -/** - * Add ticks to RTC Clock - * @param inputOrbisRtcDateTime - * @param inputTick - * @param ticks - * @return 0 = Valid and Negatives values are error codes. - */ int sceRtcTickAddTicks(OrbisRtcDateTime *inputOrbisRtcDateTime, OrbisRtcTick *inputTick, int64_t ticks); - -/** - * Add weaks to RTC Clock - * @param inputOrbisRtcDateTime - * @param inputTick - * @param weeks - * @return 0 = Valid and Negatives values are error codes. - */ int sceRtcTickAddWeeks(OrbisRtcDateTime *inputOrbisRtcDateTime, OrbisRtcTick *inputTick, int weeks); - -/** - * Add years to RTC Clock - * @param inputOrbisRtcDateTime - * @param inputTick - * @param years - * @return 0 = Valid and Negatives values are error codes. - */ int sceRtcTickAddYears(OrbisRtcDateTime *inputOrbisRtcDateTime, OrbisRtcTick *inputTick, int years); int sceRtcConvertLocalTimeToUtc(OrbisRtcTick*, OrbisRtcTick*); int sceRtcConvertUtcToLocalTime(OrbisRtcTick*, OrbisRtcTick*); From fb3f0881d99e154dc766da7f0caf4b4546065170 Mon Sep 17 00:00:00 2001 From: Backporter <29647778+Backporter@users.noreply.github.com> Date: Mon, 13 Feb 2023 13:03:38 -0500 Subject: [PATCH 08/19] move controller keycodes into a enum removes the default definitions and puts them inside a enum --- include/orbis/_types/pad.h | 59 +++++++++++++++++++++----------------- 1 file changed, 32 insertions(+), 27 deletions(-) diff --git a/include/orbis/_types/pad.h b/include/orbis/_types/pad.h index a980727c..0b6f611c 100644 --- a/include/orbis/_types/pad.h +++ b/include/orbis/_types/pad.h @@ -3,29 +3,29 @@ #include #define ORBIS_PAD_PORT_TYPE_STANDARD 0 +#define ORBIS_PAD_MAX_TOUCH_NUM 2 +#define ORBIS_PAD_MAX_DATA_NUM 0x40 -#define ORBIS_PAD_BUTTON_L3 0x0002 -#define ORBIS_PAD_BUTTON_R3 0x0004 -#define ORBIS_PAD_BUTTON_OPTIONS 0x0008 -#define ORBIS_PAD_BUTTON_UP 0x0010 -#define ORBIS_PAD_BUTTON_RIGHT 0x0020 -#define ORBIS_PAD_BUTTON_DOWN 0x0040 -#define ORBIS_PAD_BUTTON_LEFT 0x0080 - -#define ORBIS_PAD_BUTTON_L2 0x0100 -#define ORBIS_PAD_BUTTON_R2 0x0200 -#define ORBIS_PAD_BUTTON_L1 0x0400 -#define ORBIS_PAD_BUTTON_R1 0x0800 - -#define ORBIS_PAD_BUTTON_TRIANGLE 0x1000 -#define ORBIS_PAD_BUTTON_CIRCLE 0x2000 -#define ORBIS_PAD_BUTTON_CROSS 0x4000 -#define ORBIS_PAD_BUTTON_SQUARE 0x8000 - -#define ORBIS_PAD_BUTTON_TOUCH_PAD 0x100000 - -#define ORBIS_PAD_MAX_TOUCH_NUM 2 -#define ORBIS_PAD_MAX_DATA_NUM 0x40 +typedef enum OrbisPadButtonDataOffset : uint32_t +{ + ORBIS_PAD_BUTTON_L3 = 0x00000002, + ORBIS_PAD_BUTTON_R3 = 0x00000004, + ORBIS_PAD_BUTTON_OPTIONS = 0x00000008, + ORBIS_PAD_BUTTON_UP = 0x00000010, + ORBIS_PAD_BUTTON_RIGHT = 0x00000020, + ORBIS_PAD_BUTTON_DOWN = 0x00000040, + ORBIS_PAD_BUTTON_LEFT = 0x00000080, + ORBIS_PAD_BUTTON_L2 = 0x00000100, + ORBIS_PAD_BUTTON_R2 = 0x00000200, + ORBIS_PAD_BUTTON_L1 = 0x00000400, + ORBIS_PAD_BUTTON_R1 = 0x00000800, + ORBIS_PAD_BUTTON_TRIANGLE = 0x00001000, + ORBIS_PAD_BUTTON_CIRCLE = 0x00002000, + ORBIS_PAD_BUTTON_CROSS = 0x00004000, + ORBIS_PAD_BUTTON_SQUARE = 0x00008000, + ORBIS_PAD_BUTTON_TOUCH_PAD = 0x00100000, + ORBIS_PAD_BUTTON_INTERCEPTED = 0x80000000, +} OrbisPadButtonDataOffset; typedef struct vec_float3 { @@ -54,13 +54,15 @@ typedef struct analog uint8_t r2; } analog; -typedef struct OrbisPadTouch { +typedef struct OrbisPadTouch +{ uint16_t x, y; uint8_t finger; uint8_t pad[3]; } OrbisPadTouch; -typedef struct OrbisPadTouchData { +typedef struct OrbisPadTouchData +{ uint8_t fingers; uint8_t pad1[3]; uint32_t pad2; @@ -69,7 +71,8 @@ typedef struct OrbisPadTouchData { // The ScePadData Structure contains data polled from the DS4 controller. This includes button states, analogue // positional data, and touchpad related data. -typedef struct OrbisPadData { +typedef struct OrbisPadData +{ unsigned int buttons; stick leftStick; stick rightStick; @@ -87,14 +90,16 @@ typedef struct OrbisPadData { } OrbisPadData; // The PadColor structure contains RGBA for the DS4 controller lightbar. -typedef struct OrbisPadColor { +typedef struct OrbisPadColor +{ uint8_t r; uint8_t g; uint8_t b; uint8_t a; } OrbisPadColor; -typedef struct OrbisPadVibeParam { +typedef struct OrbisPadVibeParam +{ uint8_t lgMotor; uint8_t smMotor; } OrbisPadVibeParam; From 4424cd9d2fa32e108e4a932223be01106e24a6e9 Mon Sep 17 00:00:00 2001 From: Backporter <29647778+Backporter@users.noreply.github.com> Date: Wed, 2 Aug 2023 23:05:46 -0400 Subject: [PATCH 09/19] Update Rtc.h fix type.... --- include/orbis/Rtc.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/orbis/Rtc.h b/include/orbis/Rtc.h index 9b5b4953..495f1082 100644 --- a/include/orbis/Rtc.h +++ b/include/orbis/Rtc.h @@ -2,7 +2,7 @@ #define _SCE_RTC_H_ #include "_types/rtc.h" -#include +#include > #include #ifdef __cplusplus @@ -53,4 +53,4 @@ int32_t sceRtcSetCurrentTick(); #ifdef __cplusplus } #endif -#endif \ No newline at end of file +#endif From a70028fb86cf5ada16287890c927c29c9093e345 Mon Sep 17 00:00:00 2001 From: Backporter <29647778+Backporter@users.noreply.github.com> Date: Wed, 2 Aug 2023 23:10:46 -0400 Subject: [PATCH 10/19] Update Rtc.h .... --- include/orbis/Rtc.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/orbis/Rtc.h b/include/orbis/Rtc.h index 495f1082..4717955f 100644 --- a/include/orbis/Rtc.h +++ b/include/orbis/Rtc.h @@ -39,8 +39,8 @@ int32_t sceRtcGetDayOfWeek(int32_t y, int32_t m, int32_t d); int32_t sceRtcGetTime_t(OrbisRtcDateTime*, time_t*); int32_t sceRtcSetTime_t(OrbisRtcDateTime*, time_t); int32_t sceRtcGetDosTime(OrbisRtcDateTime*, uint32_t*); -int32_t sceRtcSetWin32FileTime(OrbisRtcDateTime*, uint32_t64_t); -int32_t sceRtcGetWin32FileTime(OrbisRtcDateTime*, uint32_t64_t*); +int32_t sceRtcSetWin32FileTime(OrbisRtcDateTime*, uint64_t); +int32_t sceRtcGetWin32FileTime(OrbisRtcDateTime*, uint64_t*); int32_t sceRtcSetDosTime(OrbisRtcDateTime*, uint32_t); uint32_t sceRtcGetTickResolution(); From 0b6555f23f019dc6e3b949b19919bb73972eb541 Mon Sep 17 00:00:00 2001 From: Backporter <29647778+Backporter@users.noreply.github.com> Date: Wed, 2 Aug 2023 23:18:47 -0400 Subject: [PATCH 11/19] Update Rtc.h --- include/orbis/Rtc.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/include/orbis/Rtc.h b/include/orbis/Rtc.h index 4717955f..0eeda3a9 100644 --- a/include/orbis/Rtc.h +++ b/include/orbis/Rtc.h @@ -2,7 +2,7 @@ #define _SCE_RTC_H_ #include "_types/rtc.h" -#include > +#include #include #ifdef __cplusplus @@ -14,11 +14,11 @@ int32_t sceRtcGetTick(const OrbisRtcDateTime *outOrbisRtcDateTime, OrbisRtcTick int32_t sceRtcSetTick(OrbisRtcDateTime *inputOrbisRtcDateTime, OrbisRtcTick *inputTick); int32_t sceRtcTickAddDays(OrbisRtcDateTime *inputOrbisRtcDateTime, OrbisRtcTick *inputTick, int32_t days); int32_t sceRtcTickAddHours(OrbisRtcDateTime *inputOrbisRtcDateTime, OrbisRtcTick *inputTick, int32_t hours); -int32_t sceRtcTickAddMicroseconds(OrbisRtcDateTime *inputOrbisRtcDateTime, OrbisRtcTick *inputTick, int32_t64_t msecs); +int32_t sceRtcTickAddMicroseconds(OrbisRtcDateTime *inputOrbisRtcDateTime, OrbisRtcTick *inputTick, int64_t msecs); int32_t sceRtcTickAddMinutes(OrbisRtcDateTime *inputOrbisRtcDateTime, OrbisRtcTick *inputTick, int32_t mins); int32_t sceRtcTickAddMonths(OrbisRtcDateTime *inputOrbisRtcDateTime, OrbisRtcTick *inputTick, int32_t months); -int32_t sceRtcTickAddSeconds(OrbisRtcDateTime *inputOrbisRtcDateTime, OrbisRtcTick *inputTick, int32_t64_t seconds); -int32_t sceRtcTickAddTicks(OrbisRtcDateTime *inputOrbisRtcDateTime, OrbisRtcTick *inputTick, int32_t64_t ticks); +int32_t sceRtcTickAddSeconds(OrbisRtcDateTime *inputOrbisRtcDateTime, OrbisRtcTick *inputTick, int64_t seconds); +int32_t sceRtcTickAddTicks(OrbisRtcDateTime *inputOrbisRtcDateTime, OrbisRtcTick *inputTick, int64_t ticks); int32_t sceRtcTickAddWeeks(OrbisRtcDateTime *inputOrbisRtcDateTime, OrbisRtcTick *inputTick, int32_t weeks); int32_t sceRtcTickAddYears(OrbisRtcDateTime *inputOrbisRtcDateTime, OrbisRtcTick *inputTick, int32_t years); int32_t sceRtcConvertLocalTimeToUtc(OrbisRtcTick*, OrbisRtcTick*); From 03b1d82c2b99409005f8a4ad2d8a85261ff9323f Mon Sep 17 00:00:00 2001 From: Backporter <29647778+Backporter@users.noreply.github.com> Date: Wed, 2 Aug 2023 23:41:48 -0400 Subject: [PATCH 12/19] Update sys_service.h add missing OrbisSystemServiceGpuLoadEmulationMode def --- include/orbis/_types/sys_service.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/include/orbis/_types/sys_service.h b/include/orbis/_types/sys_service.h index 080a7931..946360b7 100644 --- a/include/orbis/_types/sys_service.h +++ b/include/orbis/_types/sys_service.h @@ -27,6 +27,13 @@ typedef enum OrbisSystemParamTimeFormat : int32_t ORBIS_SYSTEM_PARAM_TIME_FORMAT_24HOUR = 1 } OrbisSystemParamTimeFormat; +typedef enum OrbisSystemServiceGpuLoadEmulationMode +{ + ORBIS_SYSTEM_SERVICE_GPU_LOAD_EMULATION_MODE_OFF, + ORBIS_SYSTEM_SERVICE_GPU_LOAD_EMULATION_MODE_NORMAL, + ORBIS_SYSTEM_SERVICE_GPU_LOAD_EMULATION_MODE_HIGH, +} OrbisSystemServiceGpuLoadEmulationMode; + typedef enum OrbisSystemParamGameParentalLevel : int32_t { ORBIS_SYSTEM_PARAM_GAME_PARENTAL_OFF = 0, From 3984d83e3cd89aa7882d1f9bc820a0d3713b925e Mon Sep 17 00:00:00 2001 From: Backporter <29647778+Backporter@users.noreply.github.com> Date: Thu, 3 Aug 2023 00:08:32 -0400 Subject: [PATCH 13/19] Update sys_service.h ... --- include/orbis/_types/sys_service.h | 59 ++++++++++++++++++++++++++++++ 1 file changed, 59 insertions(+) diff --git a/include/orbis/_types/sys_service.h b/include/orbis/_types/sys_service.h index 946360b7..d3d0a2ed 100644 --- a/include/orbis/_types/sys_service.h +++ b/include/orbis/_types/sys_service.h @@ -90,6 +90,65 @@ typedef enum OrbisSystemParamLanguage : int32_t ORBIS_SYSTEM_PARAM_LANG_INDONESIAN = 29 } OrbisSystemParamLanguage; +typedef enum OrbisSystemServiceEventType +{ + ORBIS_SYSTEM_SERVICE_EVENT_INVALID = -1, + ORBIS_SYSTEM_SERVICE_EVENT_ON_RESUME = 0x10000000, + ORBIS_SYSTEM_SERVICE_EVENT_GAME_LIVE_STREAMING_STATUS_UPDATE = 0x10000001, + ORBIS_SYSTEM_SERVICE_EVENT_SESSION_INVITATION = 0x10000002, + ORBIS_SYSTEM_SERVICE_EVENT_ENTITLEMENT_UPDATE = 0x10000003, + ORBIS_SYSTEM_SERVICE_EVENT_GAME_CUSTOM_DATA = 0x10000004, + ORBIS_SYSTEM_SERVICE_EVENT_DISPLAY_SAFE_AREA_UPDATE = 0x10000005, + ORBIS_SYSTEM_SERVICE_EVENT_URL_OPEN = 0x10000006, + ORBIS_SYSTEM_SERVICE_EVENT_LAUNCH_APP = 0x10000007, + ORBIS_SYSTEM_SERVICE_EVENT_APP_LAUNCH_LINK = 0x10000008, + ORBIS_SYSTEM_SERVICE_EVENT_ADDCONTENT_INSTALL = 0x10000009, + ORBIS_SYSTEM_SERVICE_EVENT_RESET_VR_POSITION = 0x1000000a, + ORBIS_SYSTEM_SERVICE_EVENT_JOIN_EVENT = 0x1000000b, + ORBIS_SYSTEM_SERVICE_EVENT_PLAYGO_LOCUS_UPDATE = 0x1000000c, + ORBIS_SYSTEM_SERVICE_EVENT_PLAY_TOGETHER_HOST = 0x1000000d, + ORBIS_SYSTEM_SERVICE_EVENT_SERVICE_ENTITLEMENT_UPDATE = 0x1000000e, + ORBIS_SYSTEM_SERVICE_EVENT_EYE_TO_EYE_DISTANCE_UPDATE = 0x1000000f, + ORBIS_SYSTEM_SERVICE_EVENT_JOIN_MATCH_EVENT = 0x10000010, + ORBIS_SYSTEM_SERVICE_EVENT_PLAY_TOGETHER_HOST_A = 0x10000011, + ORBIS_SYSTEM_SERVICE_EVENT_WEBBROWSER_CLOSED = 0x10000012, + ORBIS_SYSTEM_SERVICE_EVENT_CONTROLLER_SETTINGS_CLOSED = 0x10000013, + ORBIS_SYSTEM_SERVICE_EVENT_JOIN_TEAM_ON_TEAM_MATCH_EVENT = 0x10000014, + ORBIS_SYSTEM_SERVICE_EVENT_OPEN_SHARE_MENU = 0x30000000, +} OrbisSystemServiceEventType; + +typedef enum OrbisSystemServiceGpuLoadEmulationMode +{ + ORBIS_SYSTEM_SERVICE_GPU_LOAD_EMULATION_MODE_OFF, + ORBIS_SYSTEM_SERVICE_GPU_LOAD_EMULATION_MODE_NORMAL, + ORBIS_SYSTEM_SERVICE_GPU_LOAD_EMULATION_MODE_HIGH, +} OrbisSystemServiceGpuLoadEmulationMode; + +typedef struct OrbisSystemServiceLaunchWebBrowserParam +{ + uint32_t size; + uint8_t reserved[128]; +} OrbisSystemServiceLaunchWebBrowserParam; + + +typedef struct OrbisSystemServiceDisplaySafeAreaInfo +{ + float ratio; + uint8_t reserved[128]; +} OrbisSystemServiceDisplaySafeAreaInfo; + + +typedef struct OrbisSystemServiceStatus +{ + int32_t eventNum; + bool isSystemUiOverlaid; + bool isInBackgroundExecution; + bool isCpuMode7CpuNormal; + bool isGameLiveStreamingOnAir; + bool isOutOfVrPlayArea; + uint8_t reserved[125]; +} OrbisSystemServiceStatus; + typedef struct OrbisSystemServiceEvent { OrbisSystemServiceEventType eventType; From 5153a13afeb138706ab7345e9a3ceb3efc0637d3 Mon Sep 17 00:00:00 2001 From: Backporter <29647778+Backporter@users.noreply.github.com> Date: Thu, 3 Aug 2023 00:22:07 -0400 Subject: [PATCH 14/19] Update sys_service.h --- include/orbis/_types/sys_service.h | 7 ------- 1 file changed, 7 deletions(-) diff --git a/include/orbis/_types/sys_service.h b/include/orbis/_types/sys_service.h index d3d0a2ed..10d24398 100644 --- a/include/orbis/_types/sys_service.h +++ b/include/orbis/_types/sys_service.h @@ -27,13 +27,6 @@ typedef enum OrbisSystemParamTimeFormat : int32_t ORBIS_SYSTEM_PARAM_TIME_FORMAT_24HOUR = 1 } OrbisSystemParamTimeFormat; -typedef enum OrbisSystemServiceGpuLoadEmulationMode -{ - ORBIS_SYSTEM_SERVICE_GPU_LOAD_EMULATION_MODE_OFF, - ORBIS_SYSTEM_SERVICE_GPU_LOAD_EMULATION_MODE_NORMAL, - ORBIS_SYSTEM_SERVICE_GPU_LOAD_EMULATION_MODE_HIGH, -} OrbisSystemServiceGpuLoadEmulationMode; - typedef enum OrbisSystemParamGameParentalLevel : int32_t { ORBIS_SYSTEM_PARAM_GAME_PARENTAL_OFF = 0, From 366cc0f9023924890433d721c47081b2755e8d21 Mon Sep 17 00:00:00 2001 From: Backporter <29647778+Backporter@users.noreply.github.com> Date: Sun, 6 Aug 2023 01:48:22 -0400 Subject: [PATCH 15/19] fix formatting, add/fix param names --- include/orbis/NpTrophy.h | 32 +++++----- include/orbis/Rtc.h | 67 +++++++++++---------- include/orbis/SystemService.h | 30 +++++----- include/orbis/Videodec.h | 17 +++--- include/orbis/Videodec2.h | 20 +++---- include/orbis/_types/Np.h | 18 +++--- include/orbis/_types/Videodec.h | 96 +++++++++++++++++------------- include/orbis/_types/kernel.h | 18 +++--- include/orbis/_types/sys_service.h | 26 ++++---- 9 files changed, 166 insertions(+), 158 deletions(-) diff --git a/include/orbis/NpTrophy.h b/include/orbis/NpTrophy.h index db853cb7..507e62cb 100644 --- a/include/orbis/NpTrophy.h +++ b/include/orbis/NpTrophy.h @@ -8,22 +8,22 @@ extern "C" { #endif -int32_t sceNpTrophyAbortHandle(int32_t a_handle); -int32_t sceNpTrophyCaptureScreenshot(int32_t a_handle, const OrbisNpTrophyScreenshotTarget* a_target, int32_t a_numTargets); -int32_t sceNpTrophyCreateContext(int32_t* a_context, int32_t a_userID, uint32_t a_serviceLabel, uint64_t a_options); -int32_t sceNpTrophyCreateHandle(int32_t* a_handle); -int32_t sceNpTrophyDestroyContext(int32_t a_context); -int32_t sceNpTrophyDestroyHandle(int32_t a_handle); -int32_t sceNpTrophyGetGameIcon(int32_t a_context, int32_t a_handle, void* a_buffer, size_t* a_size); -int32_t sceNpTrophyGetGameInfo(int32_t a_context, int32_t a_handle, OrbisNpTrophyGameDetails* a_details, OrbisNpTrophyGameData*); -int32_t sceNpTrophyGetGroupIcon(int32_t a_context, int32_t a_handle, int32_t a_groupID, void* a_buffer, size_t* a_size); -int32_t sceNpTrophyGetGroupInfo(int32_t a_context, int32_t a_handle, int32_t a_groupID, OrbisNpTrophyGroupDetails* a_details, OrbisNpTrophyGroupData* a_data); -int32_t sceNpTrophyGetTrophyIcon(int32_t a_context, int32_t a_handle, int32_t a_trophyID, void* a_buffer, size_t* a_size); -int32_t sceNpTrophyGetTrophyInfo(int32_t a_context, int32_t a_handle, int32_t a_trophyID, OrbisNpTrophyDetails* a_details, OrbisNpTrophyData* a_data); -int32_t sceNpTrophyGetTrophyUnlockState(int32_t a_context, int32_t a_handle, OrbisNpTrophyFlagArray* a_flags, uint32_t* a_count); -int32_t sceNpTrophyRegisterContext(int32_t a_context, int32_t a_handle, uint64_t a_options); -int32_t sceNpTrophyShowTrophyList(int32_t a_context, int32_t a_handle); -int32_t sceNpTrophyUnlockTrophy(int32_t a_context, int32_t a_handle, int32_t a_trophyID, int32_t *a_platinumId); +int32_t sceNpTrophyAbortHandle(int32_t handle); +int32_t sceNpTrophyCaptureScreenshot(int32_t handle, const OrbisNpTrophyScreenshotTarget* target, int32_t numTargets); +int32_t sceNpTrophyCreateContext(int32_t* context, int32_t userID, uint32_t serviceLabel, uint64_t options); +int32_t sceNpTrophyCreateHandle(int32_t* handle); +int32_t sceNpTrophyDestroyContext(int32_t context); +int32_t sceNpTrophyDestroyHandle(int32_t handle); +int32_t sceNpTrophyGetGameIcon(int32_t context, int32_t handle, void* buffer, size_t* size); +int32_t sceNpTrophyGetGameInfo(int32_t context, int32_t handle, OrbisNpTrophyGameDetails* details, OrbisNpTrophyGameData* data); +int32_t sceNpTrophyGetGroupIcon(int32_t context, int32_t handle, int32_t groupID, void* buffer, size_t* size); +int32_t sceNpTrophyGetGroupInfo(int32_t context, int32_t handle, int32_t groupID, OrbisNpTrophyGroupDetails* details, OrbisNpTrophyGroupData* data); +int32_t sceNpTrophyGetTrophyIcon(int32_t context, int32_t handle, int32_t trophyID, void* buffer, size_t* size); +int32_t sceNpTrophyGetTrophyInfo(int32_t context, int32_t handle, int32_t trophyID, OrbisNpTrophyDetails* details, OrbisNpTrophyData* data); +int32_t sceNpTrophyGetTrophyUnlockState(int32_t context, int32_t handle, OrbisNpTrophyFlagArray* flags, uint32_t* count); +int32_t sceNpTrophyRegisterContext(int32_t context, int32_t handle, uint64_t options); +int32_t sceNpTrophyShowTrophyList(int32_t context, int32_t handle); +int32_t sceNpTrophyUnlockTrophy(int32_t context, int32_t handle, int32_t trophyID, int32_t *platinumId); void sceNpTrophySystemIsServerAvailable(); void sceNpTrophyIntAbortHandle(); diff --git a/include/orbis/Rtc.h b/include/orbis/Rtc.h index 0eeda3a9..3a14e949 100644 --- a/include/orbis/Rtc.h +++ b/include/orbis/Rtc.h @@ -6,44 +6,45 @@ #include #ifdef __cplusplus -extern "C" { +extern "C" +{ #endif -int32_t sceRtcCheckValid(OrbisRtcDateTime *input); -int32_t sceRtcGetTick(const OrbisRtcDateTime *outOrbisRtcDateTime, OrbisRtcTick *outTick); -int32_t sceRtcSetTick(OrbisRtcDateTime *inputOrbisRtcDateTime, OrbisRtcTick *inputTick); -int32_t sceRtcTickAddDays(OrbisRtcDateTime *inputOrbisRtcDateTime, OrbisRtcTick *inputTick, int32_t days); -int32_t sceRtcTickAddHours(OrbisRtcDateTime *inputOrbisRtcDateTime, OrbisRtcTick *inputTick, int32_t hours); -int32_t sceRtcTickAddMicroseconds(OrbisRtcDateTime *inputOrbisRtcDateTime, OrbisRtcTick *inputTick, int64_t msecs); -int32_t sceRtcTickAddMinutes(OrbisRtcDateTime *inputOrbisRtcDateTime, OrbisRtcTick *inputTick, int32_t mins); -int32_t sceRtcTickAddMonths(OrbisRtcDateTime *inputOrbisRtcDateTime, OrbisRtcTick *inputTick, int32_t months); -int32_t sceRtcTickAddSeconds(OrbisRtcDateTime *inputOrbisRtcDateTime, OrbisRtcTick *inputTick, int64_t seconds); -int32_t sceRtcTickAddTicks(OrbisRtcDateTime *inputOrbisRtcDateTime, OrbisRtcTick *inputTick, int64_t ticks); -int32_t sceRtcTickAddWeeks(OrbisRtcDateTime *inputOrbisRtcDateTime, OrbisRtcTick *inputTick, int32_t weeks); -int32_t sceRtcTickAddYears(OrbisRtcDateTime *inputOrbisRtcDateTime, OrbisRtcTick *inputTick, int32_t years); -int32_t sceRtcConvertLocalTimeToUtc(OrbisRtcTick*, OrbisRtcTick*); -int32_t sceRtcConvertUtcToLocalTime(OrbisRtcTick*, OrbisRtcTick*); -int32_t sceRtcGetCurrentClock(OrbisRtcDateTime*); -int32_t sceRtcGetCurrentClockLocalTime(OrbisRtcDateTime*); -int32_t sceRtcGetCurrentNetworkTick(OrbisRtcTick*); -int32_t sceRtcGetCurrentTick(OrbisRtcTick*); +int32_t sceRtcCheckValid(const OrbisRtcDateTime* time); +int32_t sceRtcGetTick(const OrbisRtcDateTime* time, OrbisRtcTick* tick); +int32_t sceRtcSetTick(OrbisRtcDateTime* time, const OrbisRtcTick* tick); +int32_t sceRtcTickAddDays(OrbisRtcDateTime* tick, const OrbisRtcTick* tick, int32_t add); +int32_t sceRtcTickAddHours(OrbisRtcDateTime* tick, const OrbisRtcTick* tick1, int32_t add); +int32_t sceRtcTickAddMicroseconds(OrbisRtcDateTime* tick, const OrbisRtcTick* tick1, int64_t add); +int32_t sceRtcTickAddMinutes(OrbisRtcDateTime* tick, const OrbisRtcTick* tick1, int32_t add); +int32_t sceRtcTickAddMonths(OrbisRtcDateTime* tick, const OrbisRtcTick* tick1, int32_t add); +int32_t sceRtcTickAddSeconds(OrbisRtcDateTime* tick, const OrbisRtcTick* tick1, int64_t add); +int32_t sceRtcTickAddTicks(OrbisRtcDateTime* tick, const OrbisRtcTick* tick1, int64_t add); +int32_t sceRtcTickAddWeeks(OrbisRtcDateTime* tick, const OrbisRtcTick* tick1, int32_t add); +int32_t sceRtcTickAddYears(OrbisRtcDateTime* tick, const OrbisRtcTick* tick1, int32_t add); +int32_t sceRtcConvertLocalTimeToUtc(const OrbisRtcTick* localtime, OrbisRtcTick* utc); +int32_t sceRtcConvertUtcToLocalTime(const OrbisRtcTick* utc, OrbisRtcTick* localtime); +int32_t sceRtcGetCurrentClock(OrbisRtcDateTime* time, int32_t timezone); +int32_t sceRtcGetCurrentClockLocalTime(OrbisRtcDateTime* time); +int32_t sceRtcGetCurrentNetworkTick(OrbisRtcTick* tick); +int32_t sceRtcGetCurrentTick(OrbisRtcTick* tick); int32_t sceRtcGetDaysInMonth(int32_t year, int32_t month); int32_t sceRtcIsLeapYear(int32_t year); -int32_t sceRtcParseRFC3339(OrbisRtcTick*, const char*); -int32_t sceRtcParseDateTime(OrbisRtcTick*, const char*); -int32_t sceRtcFormatRFC3339LocalTime(char*, OrbisRtcTick*); -int32_t sceRtcFormatRFC3339(char*, OrbisRtcTick*, int32_t); -int32_t sceRtcFormatRFC2822LocalTime(char*, OrbisRtcTick*); -int32_t sceRtcFormatRFC2822(char*, OrbisRtcTick*, int32_t); -int32_t sceRtcGetDayOfWeek(int32_t y, int32_t m, int32_t d); -int32_t sceRtcGetTime_t(OrbisRtcDateTime*, time_t*); -int32_t sceRtcSetTime_t(OrbisRtcDateTime*, time_t); -int32_t sceRtcGetDosTime(OrbisRtcDateTime*, uint32_t*); -int32_t sceRtcSetWin32FileTime(OrbisRtcDateTime*, uint64_t); -int32_t sceRtcGetWin32FileTime(OrbisRtcDateTime*, uint64_t*); -int32_t sceRtcSetDosTime(OrbisRtcDateTime*, uint32_t); - +int32_t sceRtcParseRFC3339(OrbisRtcTick* utc, const char* datetime); +int32_t sceRtcParseDateTime(OrbisRtcTick* utc, const char* datetime); +int32_t sceRtcFormatRFC3339LocalTime(char* datetime, const OrbisRtcTick* utc); +int32_t sceRtcFormatRFC3339(char* datetime, const OrbisRtcTick* utc, int32_t timezoneMinutes); +int32_t sceRtcFormatRFC2822LocalTime(char* datetime, const OrbisRtcTick* utc); +int32_t sceRtcFormatRFC2822(char* datetime, const OrbisRtcTick* utc, int32_t timezoneMinutes); +int32_t sceRtcGetDayOfWeek(int32_t year, int32_t month, int32_t day); +int32_t sceRtcGetTime_t(const OrbisRtcDateTime* time, time_t* time); +int32_t sceRtcSetTime_t(OrbisRtcDateTime* time, time_t time); +int32_t sceRtcGetDosTime(const OrbisRtcDateTime* time, uint32_t* dosTime); +int32_t sceRtcSetWin32FileTime(OrbisRtcDateTime* time, uint64_t win32Time); +int32_t sceRtcGetWin32FileTime(const OrbisRtcDateTime* time, uint64_t* win32Time); +int32_t sceRtcSetDosTime(OrbisRtcDateTime* Time, uint32_t dosTime); uint32_t sceRtcGetTickResolution(); + int32_t sceRtcGetCurrentDebugNetworkTick(); int32_t sceRtcGetCurrentAdNetworkTick(); int32_t sceRtcCompareTick(); diff --git a/include/orbis/SystemService.h b/include/orbis/SystemService.h index a268e386..1e938ffc 100644 --- a/include/orbis/SystemService.h +++ b/include/orbis/SystemService.h @@ -11,35 +11,33 @@ extern "C" #endif int32_t sceSystemServiceLoadExec(const char *path, const char *args[]); -int32_t sceSystemServiceShowControllerSettings(); int32_t sceSystemServiceParamGetInt(int32_t paramId, int32_t *value); int32_t sceSystemServiceParamGetString(int32_t paramId, char *buf, size_t bufSize); +int32_t sceSystemServiceIsEyeToEyeDistanceAdjusted(int32_t userId, bool* isAdjusted); +int32_t sceSystemServiceReportAbnormalTermination(const void* info); +int32_t sceSystemServiceLaunchTournamentsTeamProfile(int32_t userId, const char* teamId, const char* eventId, const char* teamPlatform); +int32_t sceSystemServiceLaunchEventDetails(int32_t userId, const char* eventId); +int32_t sceSystemServiceLaunchWebBrowser(const char* uri, const OrbisSystemServiceLaunchWebBrowserParam* param); +int32_t sceSystemServiceGetDisplaySafeAreaInfo(OrbisSystemServiceDisplaySafeAreaInfo* info); +int32_t sceSystemServiceSetGpuLoadEmulationMode(OrbisSystemServiceGpuLoadEmulationMode); +int32_t sceSystemServiceGetStatus(OrbisSystemServiceStatus* status); +int32_t sceSystemServiceReceiveEvent(OrbisSystemServiceEvent* event); +int32_t sceLncUtilLaunchApp(const char* titleId, const char* argv[], LncAppParam* param); +int32_t sceSystemServiceKillApp(uint32_t appid, int32_t opt, int32_t method, int32_t reason); +int32_t sceSystemServiceShowControllerSettings(); int32_t sceSystemServiceHideSplashScreen(); int32_t sceSystemServiceEnablePersonalEyeToEyeDistanceSetting(); int32_t sceSystemServiceDisablePersonalEyeToEyeDistanceSetting(); int32_t sceSystemServiceShowEyeToEyeDistanceSetting(); -int32_t sceSystemServiceIsEyeToEyeDistanceAdjusted(int32_t, bool*); -int32_t sceSystemServiceReportAbnormalTermination(void*); int32_t sceSystemServiceDisableSuspendConfirmationDialog(); int32_t sceSystemServiceEnableSuspendConfirmationDialog(); int32_t sceSystemServicePowerTick(); -int32_t sceSystemServiceLaunchTournamentsTeamProfile(int32_t, const char*, const char*, const char*); -int32_t sceSystemServiceLaunchEventDetails(int32_t, const char*); -int32_t sceSystemServiceLaunchWebBrowser(const char*, OrbisSystemServiceLaunchWebBrowserParam*); int32_t sceSystemServiceShowDisplaySafeAreaSettings(); -int32_t sceSystemServiceGetDisplaySafeAreaInfo(OrbisSystemServiceDisplaySafeAreaInfo*); OrbisSystemServiceGpuLoadEmulationMode sceSystemServiceGetGpuLoadEmulationMode(); -int32_t sceSystemServiceSetGpuLoadEmulationMode(OrbisSystemServiceGpuLoadEmulationMode); int32_t sceSystemServiceReenableMusicPlayer(); int32_t sceSystemServiceDisableMusicPlayer(); -int32_t sceSystemServiceGetStatus(OrbisSystemServiceStatus*); -int32_t sceSystemServiceReceiveEvent(OrbisSystemServiceEvent*); -int32_t sceSystemServiceHideSplashScreen(void); -int32_t sceSystemServiceParamGetInt(int32_t paramId, int32_t *value); -int32_t sceSystemServiceParamGetString(int32_t paramId, char *buf, size_t bufSize); -int32_t sceSystemServiceGetAppIdOfBigApp(void); -int32_t sceSystemServiceGetAppIdOfMiniApp(void); -int32_t sceSystemServiceKillApp(uint32_t appid, int opt, int method, int reason); +int32_t sceSystemServiceGetAppIdOfBigApp(); +int32_t sceSystemServiceGetAppIdOfMiniApp(); void sceSystemServiceAcquireFb0(); void sceSystemServiceAddLocalProcess(); diff --git a/include/orbis/Videodec.h b/include/orbis/Videodec.h index fd72d082..d94d145a 100644 --- a/include/orbis/Videodec.h +++ b/include/orbis/Videodec.h @@ -5,20 +5,19 @@ #include "_types/videodec.h" #ifdef __cplusplus -extern "C" { +extern "C" +{ #endif -int32_t sceVideodecCreateDecoder(const OrbisVideodecConfigInfo*, const OrbisVideodecResourceInfo*, OrbisVideodecCtrl*); -int32_t sceVideodecDecode(OrbisVideodecCtrl*, const OrbisVideodecInputData*, OrbisVideodecFrameBuffer*, OrbisVideodecPictureInfo*); -int32_t sceVideodecFlush(OrbisVideodecCtrl*, OrbisVideodecFrameBuffer*, OrbisVideodecPictureInfo*); -int32_t sceVideodecQueryResourceInfo(const OrbisVideodecConfigInfo*, OrbisVideodecResourceInfo*); -int32_t sceVideodecReset(OrbisVideodecCtrl*); -int32_t sceVideodecDeleteDecoder(OrbisVideodecCtrl*); +int32_t sceVideodecCreateDecoder(const OrbisVideodecConfigInfo* CfgInfoIn, const OrbisVideodecResourceInfo* RsrcInfoIn, OrbisVideodecCtrl* CtrlOut); +int32_t sceVideodecDecode(OrbisVideodecCtrl* CtrlIn, const OrbisVideodecInputData* InputDataIn, OrbisVideodecFrameBuffer* FrameBufferInOut, OrbisVideodecPictureInfo* PictureInfoOut); +int32_t sceVideodecFlush(OrbisVideodecCtrl* CtrlIn, OrbisVideodecFrameBuffer* FrameBufferInOut, OrbisVideodecPictureInfo* PictureInfoOut); +int32_t sceVideodecQueryResourceInfo(const OrbisVideodecConfigInfo* CfgInfoIn, OrbisVideodecResourceInfo* RsrcInfoOut); +int32_t sceVideodecReset(OrbisVideodecCtrl* CfgInfoIn); +int32_t sceVideodecDeleteDecoder(OrbisVideodecCtrl* CfgInfoIn); -// void sceVideodecMapMemory(); - #ifdef __cplusplus } #endif diff --git a/include/orbis/Videodec2.h b/include/orbis/Videodec2.h index b0541faa..64fab80f 100644 --- a/include/orbis/Videodec2.h +++ b/include/orbis/Videodec2.h @@ -9,16 +9,16 @@ extern "C" { #endif -int32_t sceVideodec2AllocateComputeQueue(const OrbisVideodec2ComputeConfigInfo*, const OrbisVideodec2ComputeMemoryInfo*, void**); -int32_t sceVideodec2CreateDecoder(const OrbisVideodec2DecoderConfigInfo*, const OrbisVideodec2DecoderMemoryInfo*, void**); -int32_t sceVideodec2Decode(void*, const OrbisVideodec2InputData*, OrbisVideodec2FrameBuffer* , OrbisVideodec2OutputInfo*); -int32_t sceVideodec2Flush(void* , OrbisVideodec2FrameBuffer* , OrbisVideodec2OutputInfo*); -int32_t sceVideodec2GetPictureInfo(const OrbisVideodec2OutputInfo* , void* , void*); -int32_t sceVideodec2QueryComputeMemoryInfo(OrbisVideodec2ComputeMemoryInfo*); -int32_t sceVideodec2QueryDecoderMemoryInfo(const OrbisVideodec2DecoderConfigInfo*, OrbisVideodec2DecoderMemoryInfo*); -int32_t sceVideodec2ReleaseComputeQueue(void*); -int32_t sceVideodec2Reset(void*); -int32_t sceVideodec2DeleteDecoder(void*); +int32_t sceVideodec2AllocateComputeQueue(const OrbisVideodec2ComputeConfigInfo* ComputeCfgInfoIn, const OrbisVideodec2ComputeMemoryInfo* ComputeMemInfoIn, void** ComputeQueueOut); +int32_t sceVideodec2CreateDecoder(const OrbisVideodec2DecoderConfigInfo* DecoderConfigInfoIn, const OrbisVideodec2DecoderMemoryInfo* DecoderMemoryInfoIn, void** DecoderInstanceOut); +int32_t sceVideodec2Decode(void* decoderInstanceIn, const OrbisVideodec2InputData* InputDataInOut, OrbisVideodec2FrameBuffer* FrameBufferInOut, OrbisVideodec2OutputInfo* OutputInfoOut); +int32_t sceVideodec2Flush(void* decoderInstanceIn, OrbisVideodec2FrameBuffer* FrameBufferInOut, OrbisVideodec2OutputInfo* OutputInfoOut); +int32_t sceVideodec2GetPictureInfo(const OrbisVideodec2OutputInfo* OutputInfoIn, void* p1stPictureInfoOut, void* p2ndPictureInfoOut); +int32_t sceVideodec2QueryComputeMemoryInfo(OrbisVideodec2ComputeMemoryInfo* ComputeMemInfoOut); +int32_t sceVideodec2QueryDecoderMemoryInfo(const OrbisVideodec2DecoderConfigInfo* DecoderConfigInfoIn, OrbisVideodec2DecoderMemoryInfo* DecoderMemoryInfoOut); +int32_t sceVideodec2ReleaseComputeQueue(void* computeQueueIn); +int32_t sceVideodec2Reset(void* decoderInstanceIn); +int32_t sceVideodec2DeleteDecoder(void* decoderInstanceIn); void sceVideodec2CreateHevcDecoder(); diff --git a/include/orbis/_types/Np.h b/include/orbis/_types/Np.h index fb25345b..169b12cd 100644 --- a/include/orbis/_types/Np.h +++ b/include/orbis/_types/Np.h @@ -55,7 +55,7 @@ typedef struct OrbisNpTrophyGroupData uint32_t unlockedSilver; uint32_t unlockedBronze; uint32_t progressPercentage; - uint8_t UNK00[4]; + uint8_t reserved[4]; } OrbisNpTrophyGroupData; // @@ -66,7 +66,7 @@ typedef struct OrbisNpTrophyDetails int32_t trophyGrade; // gold/silver/bronze/Platinum int32_t groupId; // group where the trophy is located(normally 0 for single group trophy packs, depending on how many trophies exists and are split into groups inside the pack this could rage from 0 - xxxx) bool hidden; // this determines if you can see the trophy before its unlocked(hidden flagged trophys will not allow you to see the description until you have unlcoked them) - char Unk02[3]; // Unkown data + char reserved[3]; // Unkown data char name[128]; // Trophy Name, EX: "UNLOCK ME" char description[1024]; // Description, EX: "This is what needs to be unlocked" } OrbisNpTrophyDetails; @@ -77,7 +77,7 @@ typedef struct OrbisNpTrophyData size_t size; // this needs to be set with sizeof(OrbisNpTrophyData) or any function that takes this structure as a parameter will return a error(0x80551604) int32_t trophyId; // Trophy ID, 1-XXXX(0 should be the Platinum Trophy) bool unlocked; // flag that tells if the user has unlocked the Trophy) - char Unk00[3]; // likely padding, not sure why they didn't make unlocked a 32-bit value and swap a single bit for it, it would make it automaticlly alligned. + char reserved[3]; // likely padding, not sure why they didn't make unlocked a 32-bit value and swap a single bit for it, it would make it automaticlly alligned. OrbisRtcTick timestamp; // RTC time stamp of when the trophy is unlocked(this isn't fully accurate due to the RTC drifting, it can be off anywhere from +1 second to a whole minute+ behind.) } OrbisNpTrophyData; @@ -88,18 +88,18 @@ typedef struct OrbisNpTrophyScreenshotTarget } OrbisNpTrophyScreenshotTarget; /* Np Online*/ -// +// is this meant to represent a c-string but wrapped in a structure? typedef struct OrbisNpOnlineId { - char data[16]; // account name, follows PSN schema, min 3/max 16 - char term; // terminator, always '\0'? - uint8_t UNK[3]; // Unkown, probably reserved/padding? + char data[16]; // account name, follows PSN schema, min 3/max 16 + char term; // terminator, always '\0'? + uint8_t pad11[3]; // Unkown, probably reserved/padding? } OrbisNpOnlineId; // typedef struct OrbisNpId { OrbisNpOnlineId handle; - uint8_t Unk20[8]; - uint8_t Unk28[8]; + uint8_t opt[8]; + uint8_t reserved[8]; } OrbisNpId; \ No newline at end of file diff --git a/include/orbis/_types/Videodec.h b/include/orbis/_types/Videodec.h index 021c8217..35d9824e 100644 --- a/include/orbis/_types/Videodec.h +++ b/include/orbis/_types/Videodec.h @@ -1,52 +1,64 @@ #pragma once -#include -#define ORBIS_VIDEODEC_ERROR_API_FAIL -2134835200 // = 0x80C10000 -#define ORBIS_VIDEODEC_ERROR_CODEC_TYPE -2134835199 // = 0x80C10001 -#define ORBIS_VIDEODEC_ERROR_STRUCT_SIZE -2134835198 // = 0x80C10002 -#define ORBIS_VIDEODEC_ERROR_HANDLE -2134835197 // = 0x80C10003 -#define ORBIS_VIDEODEC_ERROR_CPU_MEMORY_SIZE -2134835196 // = 0x80C10004 -#define ORBIS_VIDEODEC_ERROR_CPU_MEMORY_POINTER -2134835195 // = 0x80C10005 -#define ORBIS_VIDEODEC_ERROR_CPU_GPU_MEMORY_SIZE -2134835194 // = 0x80C10006 -#define ORBIS_VIDEODEC_ERROR_CPU_GPU_MEMORY_POINTER -2134835193 // = 0x80C10007 -#define ORBIS_VIDEODEC_ERROR_SHADER_CONTEXT_POINTER -2134835192 // = 0x80C10008 -#define ORBIS_VIDEODEC_ERROR_AU_SIZE -2134835191 // = 0x80C10009 -#define ORBIS_VIDEODEC_ERROR_AU_POINTER -2134835190 // = 0x80C1000A -#define ORBIS_VIDEODEC_ERROR_FRAME_BUFFER_SIZE -2134835189 // = 0x80C1000B -#define ORBIS_VIDEODEC_ERROR_FRAME_BUFFER_POINTER -2134835188 // = 0x80C1000C -#define ORBIS_VIDEODEC_ERROR_FRAME_BUFFER_ALIGNMENT -2134835187 // = 0x80C1000D -#define ORBIS_VIDEODEC_ERROR_CONFIG_INFO -2134835186 // = 0x80C1000E -#define ORBIS_VIDEODEC_ERROR_ARGUMENT_POINTER -2134835185 // = 0x80C1000F -#define ORBIS_VIDEODEC_ERROR_NEW_SEQUENCE -2134835184 // = 0x80C10010 -#define ORBIS_VIDEODEC_ERROR_DECODE_AU -2134835183 // = 0x80C10011 -#define ORBIS_VIDEODEC_ERROR_MISMATCH_SPEC -2134835182 // = 0x80C10012 -#define ORBIS_VIDEODEC_ERROR_INVALID_SEQUENCE -2134835181 // = 0x80C10013 -#define ORBIS_VIDEODEC_ERROR_FATAL_STREAM -2134835180 // = 0x80C10014 -#define ORBIS_VIDEODEC_ERROR_FATAL_STATE -2134835179 // = 0x80C10015 +#include #define ORBIS_VIDEODEC_CODEC_TYPE_AVC (0) #define ORBIS_VIDEODEC_TIMESTAMP_INVALID (0xffffffffffffffffULL) #define ORBIS_VIDEODEC_FLAG_DEFAULT (0ULL) #define ORBIS_VIDEODEC_FLAG_DISABLE_ONE_FRAME_DELAY (0x5A0000ULL) -#define ORBIS_VIDEODEC_AVC_PROFILE_BASELINE (66) -#define ORBIS_VIDEODEC_AVC_PROFILE_MAIN (77) -#define ORBIS_VIDEODEC_AVC_PROFILE_HIGH (100) -#define ORBIS_VIDEODEC_AVC_LEVEL_1 (10) -#define ORBIS_VIDEODEC_AVC_LEVEL_1_b (111) -#define ORBIS_VIDEODEC_AVC_LEVEL_1_1 (11) -#define ORBIS_VIDEODEC_AVC_LEVEL_1_2 (12) -#define ORBIS_VIDEODEC_AVC_LEVEL_1_3 (13) -#define ORBIS_VIDEODEC_AVC_LEVEL_2 (20) -#define ORBIS_VIDEODEC_AVC_LEVEL_2_1 (21) -#define ORBIS_VIDEODEC_AVC_LEVEL_2_2 (22) -#define ORBIS_VIDEODEC_AVC_LEVEL_3 (30) -#define ORBIS_VIDEODEC_AVC_LEVEL_3_1 (31) -#define ORBIS_VIDEODEC_AVC_LEVEL_3_2 (32) -#define ORBIS_VIDEODEC_AVC_LEVEL_4 (40) -#define ORBIS_VIDEODEC_AVC_LEVEL_4_1 (41) -#define ORBIS_VIDEODEC_AVC_LEVEL_4_2 (42) -#define ORBIS_VIDEODEC_AVC_LEVEL_5 (50) -#define ORBIS_VIDEODEC_AVC_LEVEL_5_1 (51) + +typedef enum OrbisVideoDecError : int32_t +{ + ORBIS_VIDEODEC_ERROR_API_FAIL = -2134835200, // = 0x80C10000 + ORBIS_VIDEODEC_ERROR_CODEC_TYPE = -2134835199, // = 0x80C10001 + ORBIS_VIDEODEC_ERROR_STRUCT_SIZE = -2134835198, // = 0x80C10002 + ORBIS_VIDEODEC_ERROR_HANDLE = -2134835197, // = 0x80C10003 + ORBIS_VIDEODEC_ERROR_CPU_MEMORY_SIZE = -2134835196, // = 0x80C10004 + ORBIS_VIDEODEC_ERROR_CPU_MEMORY_POINTER = -2134835195, // = 0x80C10005 + ORBIS_VIDEODEC_ERROR_CPU_GPU_MEMORY_SIZE = -2134835194, // = 0x80C10006 + ORBIS_VIDEODEC_ERROR_CPU_GPU_MEMORY_POINTER = -2134835193, // = 0x80C10007 + ORBIS_VIDEODEC_ERROR_SHADER_CONTEXT_POINTER = -2134835192, // = 0x80C10008 + ORBIS_VIDEODEC_ERROR_AU_SIZE = -2134835191, // = 0x80C10009 + ORBIS_VIDEODEC_ERROR_AU_POINTER = -2134835190, // = 0x80C1000A + ORBIS_VIDEODEC_ERROR_FRAME_BUFFER_SIZE = -2134835189, // = 0x80C1000B + ORBIS_VIDEODEC_ERROR_FRAME_BUFFER_POINTER = -2134835188, // = 0x80C1000C + ORBIS_VIDEODEC_ERROR_FRAME_BUFFER_ALIGNMENT = -2134835187, // = 0x80C1000D + ORBIS_VIDEODEC_ERROR_CONFIG_INFO = -2134835186, // = 0x80C1000E + ORBIS_VIDEODEC_ERROR_ARGUMENT_POINTER = -2134835185, // = 0x80C1000F + ORBIS_VIDEODEC_ERROR_NEW_SEQUENCE = -2134835184, // = 0x80C10010 + ORBIS_VIDEODEC_ERROR_DECODE_AU = -2134835183, // = 0x80C10011 + ORBIS_VIDEODEC_ERROR_MISMATCH_SPEC = -2134835182, // = 0x80C10012 + ORBIS_VIDEODEC_ERROR_INVALID_SEQUENCE = -2134835181, // = 0x80C10013 + ORBIS_VIDEODEC_ERROR_FATAL_STREAM = -2134835180, // = 0x80C10014 + ORBIS_VIDEODEC_ERROR_FATAL_STATE = -2134835179, // = 0x80C10015 +} OrbisVideoDecError; + +typedef enum OrbisVideoDecAVCProfile +{ + ORBIS_VIDEODEC_AVC_PROFILE_BASELINE = 66, + ORBIS_VIDEODEC_AVC_PROFILE_MAIN = 77, + ORBIS_VIDEODEC_AVC_PROFILE_HIGH = 100, +} OrbisVideoDecAVCProfile; + +typedef enum OrbisVideoDecAVC +{ + ORBIS_VIDEODEC_AVC_LEVEL_1 = 10, + ORBIS_VIDEODEC_AVC_LEVEL_1_b = 111, + ORBIS_VIDEODEC_AVC_LEVEL_1_1 = 11, + ORBIS_VIDEODEC_AVC_LEVEL_1_2 = 12, + ORBIS_VIDEODEC_AVC_LEVEL_1_3 = 13, + ORBIS_VIDEODEC_AVC_LEVEL_2 = 20, + ORBIS_VIDEODEC_AVC_LEVEL_2_1 = 21, + ORBIS_VIDEODEC_AVC_LEVEL_2_2 = 22, + ORBIS_VIDEODEC_AVC_LEVEL_3 = 30, + ORBIS_VIDEODEC_AVC_LEVEL_3_1 = 31, + ORBIS_VIDEODEC_AVC_LEVEL_3_2 = 32, + ORBIS_VIDEODEC_AVC_LEVEL_4 = 40, + ORBIS_VIDEODEC_AVC_LEVEL_4_1 = 41, + ORBIS_VIDEODEC_AVC_LEVEL_4_2 = 42, + ORBIS_VIDEODEC_AVC_LEVEL_5 = 50, + ORBIS_VIDEODEC_AVC_LEVEL_5_1 = 51, +} OrbisVideoDecAVC; typedef struct OrbisVideodecCtrl { diff --git a/include/orbis/_types/kernel.h b/include/orbis/_types/kernel.h index c577ec1e..8aa3965d 100644 --- a/include/orbis/_types/kernel.h +++ b/include/orbis/_types/kernel.h @@ -124,16 +124,16 @@ typedef unsigned char vm_prot_t; // freebsd protection codes struct kevent { uintptr_t ident; /* identifier for this event */ - short filter; /* filter for event */ + uint16_t filter; /* filter for event */ uint16_t flags; uint32_t fflags; intptr_t data; - void* udata; /* opaque user data identifier */ + void* udata; /* opaque user data identifier */ }; typedef struct OrbisKernelModuleSegmentInfo { - void *address; + void* address; uint32_t size; int32_t prot; } OrbisKernelModuleSegmentInfo; @@ -147,7 +147,8 @@ typedef struct OrbisKernelModuleInfo uint8_t fingerprint[20]; } OrbisKernelModuleInfo; -typedef struct _OrbisKernelEventFlagOptParam { +typedef struct _OrbisKernelEventFlagOptParam +{ size_t sz; } OrbisKernelEventFlagOptParam; @@ -165,7 +166,8 @@ typedef struct _OrbisKernelSemaOptParam { typedef struct _OrbisKernelSema* OrbisKernelSema; -typedef struct OrbisKernelUuid { +typedef struct OrbisKernelUuid +{ uint32_t timeLow; uint16_t timeMid; uint16_t timeHiAndVersion; @@ -179,12 +181,14 @@ typedef struct stat OrbisKernelStat; typedef struct timespec OrbisKernelTimespec; -typedef struct OrbisKernelIovec { +typedef struct OrbisKernelIovec +{ void* base; size_t len; } OrbisKernelIovec; -typedef struct { +typedef struct +{ void* start; void* end; off_t offset; diff --git a/include/orbis/_types/sys_service.h b/include/orbis/_types/sys_service.h index 10d24398..abb7a25e 100644 --- a/include/orbis/_types/sys_service.h +++ b/include/orbis/_types/sys_service.h @@ -144,47 +144,41 @@ typedef struct OrbisSystemServiceStatus typedef struct OrbisSystemServiceEvent { - OrbisSystemServiceEventType eventType; + OrbisSystemServiceEventType eventType; union - { - char param[8192]; - - struct { + char param[8192]; + struct + { char source[1024]; union - { - char arg[4096]; + { + char arg[4096]; char url[4096]; }; } urlOpen; - struct - { + { uint32_t size; uint8_t arg[8188]; } launchApp; - struct - { + { uint32_t size; uint8_t arg[2020]; } appLaunchLink; - struct - { + { int32_t userId; char eventId[37]; char bootArgument[7169]; } joinEvent; - struct - { + { int32_t userId; uint32_t npServiceLabel; uint8_t reserved[8184]; } serviceEntitlementUpdate; - uint8_t reserved[8192]; } data; } OrbisSystemServiceEvent; From f88be88c9d151250d32f96b200cb2e791065c517 Mon Sep 17 00:00:00 2001 From: Backporter <29647778+Backporter@users.noreply.github.com> Date: Sun, 6 Aug 2023 01:55:27 -0400 Subject: [PATCH 16/19] Update Rtc.h --- include/orbis/Rtc.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/orbis/Rtc.h b/include/orbis/Rtc.h index 3a14e949..343e45b0 100644 --- a/include/orbis/Rtc.h +++ b/include/orbis/Rtc.h @@ -37,8 +37,8 @@ int32_t sceRtcFormatRFC3339(char* datetime, const OrbisRtcTick* utc, int32_t tim int32_t sceRtcFormatRFC2822LocalTime(char* datetime, const OrbisRtcTick* utc); int32_t sceRtcFormatRFC2822(char* datetime, const OrbisRtcTick* utc, int32_t timezoneMinutes); int32_t sceRtcGetDayOfWeek(int32_t year, int32_t month, int32_t day); -int32_t sceRtcGetTime_t(const OrbisRtcDateTime* time, time_t* time); -int32_t sceRtcSetTime_t(OrbisRtcDateTime* time, time_t time); +int32_t sceRtcGetTime_t(const OrbisRtcDateTime* rtctime, time_t* time); +int32_t sceRtcSetTime_t(OrbisRtcDateTime* rtctime, time_t time); int32_t sceRtcGetDosTime(const OrbisRtcDateTime* time, uint32_t* dosTime); int32_t sceRtcSetWin32FileTime(OrbisRtcDateTime* time, uint64_t win32Time); int32_t sceRtcGetWin32FileTime(const OrbisRtcDateTime* time, uint64_t* win32Time); From edef45147eaab6a38142436e440ea779a0d63626 Mon Sep 17 00:00:00 2001 From: Backporter <29647778+Backporter@users.noreply.github.com> Date: Sun, 6 Aug 2023 03:33:44 -0400 Subject: [PATCH 17/19] Update Rtc.h --- include/orbis/Rtc.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/orbis/Rtc.h b/include/orbis/Rtc.h index 343e45b0..f80e23dd 100644 --- a/include/orbis/Rtc.h +++ b/include/orbis/Rtc.h @@ -13,7 +13,7 @@ extern "C" int32_t sceRtcCheckValid(const OrbisRtcDateTime* time); int32_t sceRtcGetTick(const OrbisRtcDateTime* time, OrbisRtcTick* tick); int32_t sceRtcSetTick(OrbisRtcDateTime* time, const OrbisRtcTick* tick); -int32_t sceRtcTickAddDays(OrbisRtcDateTime* tick, const OrbisRtcTick* tick, int32_t add); +int32_t sceRtcTickAddDays(OrbisRtcDateTime* tick, const OrbisRtcTick* tick1, int32_t add); int32_t sceRtcTickAddHours(OrbisRtcDateTime* tick, const OrbisRtcTick* tick1, int32_t add); int32_t sceRtcTickAddMicroseconds(OrbisRtcDateTime* tick, const OrbisRtcTick* tick1, int64_t add); int32_t sceRtcTickAddMinutes(OrbisRtcDateTime* tick, const OrbisRtcTick* tick1, int32_t add); From b9ffada6126ec16ab0784634fb14b9d00acbd054 Mon Sep 17 00:00:00 2001 From: Backporter <29647778+Backporter@users.noreply.github.com> Date: Fri, 25 Aug 2023 13:10:47 -0400 Subject: [PATCH 18/19] Create Mouse.h --- include/orbis/_types/Mouse.h | 37 ++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 include/orbis/_types/Mouse.h diff --git a/include/orbis/_types/Mouse.h b/include/orbis/_types/Mouse.h new file mode 100644 index 00000000..0a58d7e5 --- /dev/null +++ b/include/orbis/_types/Mouse.h @@ -0,0 +1,37 @@ +#pragma once + +#include + +#define ORBIS_MOUSE_PORT_TYPE_STANDARD 0 +#define ORBIS_MOUSE_MAX_STANDARD_PORT_INDEX 2 + +#define ORBIS_MOUSE_OPEN_PARAM_NORMAL 0x00 +#define ORBIS_MOUSE_OPEN_PARAM_MERGED 0x01 + +typedef enum OrbisMouseButtonDataOffset : uint32_t +{ + ORBIS_MOUSE_BUTTON_PRIMARY = 0x00000001, // Left button. + ORBIS_MOUSE_BUTTON_SECONDARY = 0x00000002, // Right button. + ORBIS_MOUSE_BUTTON_OPTIONAL = 0x00000004, // Wheel press. + ORBIS_MOUSE_BUTTON_OPTIONAL2 = 0x00000008, // Back button. + ORBIS_MOUSE_BUTTON_OPTIONAL3 = 0x00000010, // Forward button. + ORBIS_MOUSE_BUTTON_INTERCEPTED = 0x80000000, // Intercepted flag. +}; + +typedef struct OrbisMouseOpenParam +{ + uint8_t behaviorFlag; + uint8_t reserve[7]; +} OrbisMouseOpenParam; + +typedef struct OrbisMouseData +{ + uint64_t timestamp; // System timestamp (in micro seconds). + bool connected; // Connection status. + uint32_t buttons; // Mouse buttons. + int32_t xAxis; // Amount of movement in the x Axis. + int32_t yAxis; // Amount of movement in the y Axis. + int32_t wheel; // Amount of wheel movement. + int32_t tilt; // Amount of tilt movement. + uint8_t reserve[8]; +} OrbisMouseData; From cee9e9aaf00047ca95798f742dafb7b1427e9605 Mon Sep 17 00:00:00 2001 From: Backporter <29647778+Backporter@users.noreply.github.com> Date: Fri, 25 Aug 2023 13:12:15 -0400 Subject: [PATCH 19/19] Update Mouse.h --- include/orbis/Mouse.h | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) diff --git a/include/orbis/Mouse.h b/include/orbis/Mouse.h index 5f15f0f6..62700bbb 100644 --- a/include/orbis/Mouse.h +++ b/include/orbis/Mouse.h @@ -2,25 +2,21 @@ #define _SCE_MOUSE_H_ #include +#include "orbis/_types/mouse.h" #ifdef __cplusplus -extern "C" { +extern "C" +{ #endif +int32_t sceMouseInit(); +int32_t sceMouseOpen(int32_t userID, int32_t type, int32_t index, const OrbisMouseOpenParam*); +int32_t sceMouseClose(int32_t); +int32_t sceMouseRead(int32_t handle, OrbisMouseData*, int32_t num); -// Empty Comment -void sceMouseClose(); -// Empty Comment -void sceMouseInit(); -// Empty Comment -void sceMouseOpen(); -// Empty Comment -void sceMouseRead(); -// Empty Comment void sceMouseSetPointerSpeed(); #ifdef __cplusplus } #endif - -#endif +#endif \ No newline at end of file