remove link_prefixes

This commit is contained in:
2024-05-13 16:04:23 +02:00
parent 8a5e2870f6
commit 205e9a4c64
78 changed files with 1447 additions and 1568 deletions
+7 -8
View File
@@ -10,7 +10,6 @@ SceAVConfigColorSpaceMode :: enum c.int {
HIGH_CONTRAST = 1 //!< High Contrast Mode HIGH_CONTRAST = 1 //!< High Contrast Mode
} }
@(link_prefix = "sceAVConfig")
foreign avconfig { foreign avconfig {
/** /**
* Get the maximum brightness. * Get the maximum brightness.
@@ -19,7 +18,7 @@ foreign avconfig {
* *
* @return 0 on success, < 0 on error. * @return 0 on success, < 0 on error.
*/ */
GetDisplayMaxBrightness :: proc(maxBrightness: ^c.int) -> c.int --- sceAVConfigGetDisplayMaxBrightness :: proc(maxBrightness: ^c.int) -> c.int ---
/** /**
* Set the screen brightness. * Set the screen brightness.
@@ -28,7 +27,7 @@ foreign avconfig {
* *
* @return 0 on success, < 0 on error. * @return 0 on success, < 0 on error.
*/ */
SetDisplayBrightness :: proc(brightness: c.int) -> c.int --- sceAVConfigSetDisplayBrightness :: proc(brightness: c.int) -> c.int ---
/** /**
* Get the shutter volume. * Get the shutter volume.
@@ -37,7 +36,7 @@ foreign avconfig {
* *
* @return 0 on success, < 0 on error. * @return 0 on success, < 0 on error.
*/ */
GetShutterVol :: proc(volume: ^c.int) -> c.int --- sceAVConfigGetShutterVol :: proc(volume: ^c.int) -> c.int ---
/** /**
* Get the system volume. * Get the system volume.
@@ -46,7 +45,7 @@ foreign avconfig {
* *
* @return 0 on success, < 0 on error. * @return 0 on success, < 0 on error.
*/ */
GetSystemVol :: proc(volume: ^c.int) -> c.int --- sceAVConfigGetSystemVol :: proc(volume: ^c.int) -> c.int ---
/** /**
* Set the system volume. * Set the system volume.
@@ -55,7 +54,7 @@ foreign avconfig {
* *
* @return 0 on success, < 0 on error. * @return 0 on success, < 0 on error.
*/ */
SetSystemVol :: proc(volume: c.int) -> c.int --- sceAVConfigSetSystemVol :: proc(volume: c.int) -> c.int ---
/** /**
* Turns on mute. * Turns on mute.
@@ -63,7 +62,7 @@ foreign avconfig {
* @return 0 on success, < 0 on error. * @return 0 on success, < 0 on error.
* *
*/ */
MuteOn :: proc() -> c.int --- sceAVConfigMuteOn :: proc() -> c.int ---
/** /**
* Sets the color space mode on runtime. * Sets the color space mode on runtime.
@@ -73,5 +72,5 @@ foreign avconfig {
* @return 0 on success, < 0 on error. * @return 0 on success, < 0 on error.
* @note - This does not change color_space_mode in the registry. * @note - This does not change color_space_mode in the registry.
*/ */
SetDisplayColorSpaceMode :: proc(csm: c.int) -> c.int --- sceAVConfigSetDisplayColorSpaceMode :: proc(csm: c.int) -> c.int ---
} }
+2 -3
View File
@@ -439,14 +439,13 @@ foreign appmgr {
sceSharedFbGetInfo :: proc(fb_id: sce.UID, info: ^SceSharedFbInfo) -> c.int --- sceSharedFbGetInfo :: proc(fb_id: sce.UID, info: ^SceSharedFbInfo) -> c.int ---
} }
@(link_prefix = "ksceAppMgr")
foreign appmgrkern { foreign appmgrkern {
/** /**
* @brief Kill a process. * @brief Kill a process.
* @param[in] pid The process to kill. * @param[in] pid The process to kill.
* @return Zero on success, else < 0. * @return Zero on success, else < 0.
*/ */
KillProcess :: proc(pid: sce.UID) -> c.int --- ksceAppMgrKillProcess :: proc(pid: sce.UID) -> c.int ---
/** /**
* @brief Launch an application for debugging * @brief Launch an application for debugging
@@ -460,5 +459,5 @@ foreign appmgrkern {
* *
* @return pid on success, else < 0. * @return pid on success, else < 0.
*/ */
LaunchAppByPath :: proc(path: cstring, args: cstring, arg_size: sce.Size, type: c.uint, #by_ptr param: SceAppMgrLaunchParam, unk: rawptr) -> c.int --- ksceAppMgrLaunchAppByPath :: proc(path: cstring, args: cstring, arg_size: sce.Size, type: c.uint, #by_ptr param: SceAppMgrLaunchParam, unk: rawptr) -> c.int ---
} }
+24 -25
View File
@@ -5,7 +5,6 @@ import sce "../common"
foreign import apputil "system:SceAppUtil_stub" foreign import apputil "system:SceAppUtil_stub"
@(link_prefix = "sceAppUtil")
foreign apputil { foreign apputil {
/** /**
* Initializes the AppUtil library. Call this before any of the other functions. * Initializes the AppUtil library. Call this before any of the other functions.
@@ -15,75 +14,75 @@ foreign apputil {
* *
* @return 0 on success, < 0 on error. * @return 0 on success, < 0 on error.
*/ */
Init :: proc(initParam: ^SceAppUtilInitParam, bootParam: ^SceAppUtilBootParam) -> c.int --- sceAppUtilInit :: proc(initParam: ^SceAppUtilInitParam, bootParam: ^SceAppUtilBootParam) -> c.int ---
//! Shutdown AppUtil library //! Shutdown AppUtil library
Shutdown :: proc() -> c.int --- sceAppUtilShutdown :: proc() -> c.int ---
//! Receive app event //! Receive app event
ReceiveAppEvent :: proc(eventParam: ^SceAppUtilAppEventParam) -> c.int --- sceAppUtilReceiveAppEvent :: proc(eventParam: ^SceAppUtilAppEventParam) -> c.int ---
//! Parse received app event from LiveArea //! Parse received app event from LiveArea
AppEventParseLiveArea :: proc(eventParam: ^SceAppUtilAppEventParam, buffer: [^]c.char) -> c.int --- sceAppUtilAppEventParseLiveArea :: proc(eventParam: ^SceAppUtilAppEventParam, buffer: [^]c.char) -> c.int ---
//! Create savedata slot //! Create savedata slot
SaveDataSlotCreate :: proc(slotId: c.uint, param: ^SceAppUtilSaveDataSlotParam, mountPoint: ^SceAppUtilSaveDataMountPoint) -> c.int --- sceAppUtilSaveDataSlotCreate :: proc(slotId: c.uint, param: ^SceAppUtilSaveDataSlotParam, mountPoint: ^SceAppUtilSaveDataMountPoint) -> c.int ---
//! Delete savedata slot //! Delete savedata slot
SaveDataSlotDelete :: proc(slotId: c.uint, mountPoint: ^SceAppUtilSaveDataMountPoint) -> c.int --- sceAppUtilSaveDataSlotDelete :: proc(slotId: c.uint, mountPoint: ^SceAppUtilSaveDataMountPoint) -> c.int ---
//! Set savedata slot param //! Set savedata slot param
SaveDataSlotSetParam :: proc(slotId: c.uint, param: ^SceAppUtilSaveDataSlotParam, mountPoint: ^SceAppUtilSaveDataMountPoint) -> c.int --- sceAppUtilSaveDataSlotSetParam :: proc(slotId: c.uint, param: ^SceAppUtilSaveDataSlotParam, mountPoint: ^SceAppUtilSaveDataMountPoint) -> c.int ---
//! Get savedata slot param //! Get savedata slot param
SaveDataSlotGetParam :: proc(slotId: c.uint, param: ^SceAppUtilSaveDataSlotParam, mountPoint: ^SceAppUtilSaveDataMountPoint) -> c.int --- sceAppUtilSaveDataSlotGetParam :: proc(slotId: c.uint, param: ^SceAppUtilSaveDataSlotParam, mountPoint: ^SceAppUtilSaveDataMountPoint) -> c.int ---
//!< Write savedata files and directories //!< Write savedata files and directories
SaveDataDataSave :: proc(slot: ^SceAppUtilSaveDataFileSlot, files: ^SceAppUtilSaveDataFile, fileNum: c.uint, mountPoint: ^SceAppUtilSaveDataMountPoint, requiredSizeKB: ^sce.Size) -> c.int --- sceAppUtilSaveDataDataSave :: proc(slot: ^SceAppUtilSaveDataFileSlot, files: ^SceAppUtilSaveDataFile, fileNum: c.uint, mountPoint: ^SceAppUtilSaveDataMountPoint, requiredSizeKB: ^sce.Size) -> c.int ---
//!< Delete savedata files //!< Delete savedata files
SaveDataDataRemove :: proc(slot: ^SceAppUtilSaveDataFileSlot, files: ^SceAppUtilSaveDataRemoveItem, fileNum: c.uint, mountPoint: ^SceAppUtilSaveDataMountPoint) -> c.int --- sceAppUtilSaveDataDataRemove :: proc(slot: ^SceAppUtilSaveDataFileSlot, files: ^SceAppUtilSaveDataRemoveItem, fileNum: c.uint, mountPoint: ^SceAppUtilSaveDataMountPoint) -> c.int ---
//! Mount music data //! Mount music data
MusicMount :: proc() -> c.int --- sceAppUtilMusicMount :: proc() -> c.int ---
//! Unmount music data //! Unmount music data
MusicUmount :: proc() -> c.int --- sceAppUtilMusicUmount :: proc() -> c.int ---
//! Mount photo data //! Mount photo data
PhotoMount :: proc() -> c.int --- sceAppUtilPhotoMount :: proc() -> c.int ---
//! Unmount photo data //! Unmount photo data
PhotoUmount :: proc() -> c.int --- sceAppUtilPhotoUmount :: proc() -> c.int ---
//! Mount cache data //! Mount cache data
CacheMount :: proc() -> c.int --- sceAppUtilCacheMount :: proc() -> c.int ---
//! Unmount cache data //! Unmount cache data
CacheUmount :: proc() -> c.int --- sceAppUtilCacheUmount :: proc() -> c.int ---
//! Get system parameters for int type //! Get system parameters for int type
SystemParamGetInt :: proc(paramId: c.uint, value: ^c.int) -> c.int --- sceAppUtilSystemParamGetInt :: proc(paramId: c.uint, value: ^c.int) -> c.int ---
//! Get application parameters for string type //! Get application parameters for string type
SystemParamGetString :: proc(paramId: c.uint, buf: [^]sce.Char8, bufSize: sce.Size) -> c.int --- sceAppUtilSystemParamGetString :: proc(paramId: c.uint, buf: [^]sce.Char8, bufSize: sce.Size) -> c.int ---
//! Get application parameters for int type //! Get application parameters for int type
AppParamGetInt :: proc(paramId: SceAppUtilAppParamId, value: ^c.int) -> c.int --- sceAppUtilAppParamGetInt :: proc(paramId: SceAppUtilAppParamId, value: ^c.int) -> c.int ---
//! Save safe memory //! Save safe memory
SaveSafeMemory :: proc(buf: rawptr, bufSize: sce.Size, offset: sce.Off) -> c.int --- sceAppUtilSaveSafeMemory :: proc(buf: rawptr, bufSize: sce.Size, offset: sce.Off) -> c.int ---
//! Load safe memory //! Load safe memory
LoadSafeMemory :: proc(buf: rawptr, bufSize: sce.Size, offset: sce.Off) -> c.int --- sceAppUtilLoadSafeMemory :: proc(buf: rawptr, bufSize: sce.Size, offset: sce.Off) -> c.int ---
//! Launch PSN Store //! Launch PSN Store
StoreBrowse :: proc(param: ^SceAppUtilStoreBrowseParam) -> c.int --- sceAppUtilStoreBrowse :: proc(param: ^SceAppUtilStoreBrowseParam) -> c.int ---
//! Get background download status //! Get background download status
BgdlGetStatus :: proc(stat: ^SceAppUtilBgdlStatus) -> c.int --- sceAppUtilBgdlGetStatus :: proc(stat: ^SceAppUtilBgdlStatus) -> c.int ---
//! Launch web browser app //! Launch web browser app
LaunchWebBrowser :: proc(param: ^SceAppUtilWebBrowserParam) -> c.int --- sceAppUtilLaunchWebBrowser :: proc(param: ^SceAppUtilWebBrowserParam) -> c.int ---
} }
+24 -25
View File
@@ -5,30 +5,29 @@ import sce "../common"
foreign import atrac "system:SceAtrac_stub" foreign import atrac "system:SceAtrac_stub"
@(link_prefix = "sceAtrac")
foreign atrac { foreign atrac {
QueryDecoderGroupMemSize :: proc(atracType: sce.UInt32, pDecoderGroup: ^SceAtracDecoderGroup) -> c.int --- sceAtracQueryDecoderGroupMemSize :: proc(atracType: sce.UInt32, pDecoderGroup: ^SceAtracDecoderGroup) -> c.int ---
CreateDecoderGroup :: proc(atracType: sce.UInt32, pDecoderGroup: ^SceAtracDecoderGroup, pvWorkMem: rawptr, initAudiodecFlag: c.int) -> c.int --- sceAtracCreateDecoderGroup :: proc(atracType: sce.UInt32, pDecoderGroup: ^SceAtracDecoderGroup, pvWorkMem: rawptr, initAudiodecFlag: c.int) -> c.int ---
DeleteDecoderGroup :: proc(atracType: sce.UInt32, termAudiodecFlag: c.int) -> c.int --- sceAtracDeleteDecoderGroup :: proc(atracType: sce.UInt32, termAudiodecFlag: c.int) -> c.int ---
GetDecoderGroupInfo :: proc(atracType: sce.UInt32, pCreatedDecoder: ^SceAtracDecoderGroup, pAvailableDecoder: ^SceAtracDecoderGroup) -> c.int --- sceAtracGetDecoderGroupInfo :: proc(atracType: sce.UInt32, pCreatedDecoder: ^SceAtracDecoderGroup, pAvailableDecoder: ^SceAtracDecoderGroup) -> c.int ---
SetDataAndAcquireHandle :: proc(pucBuffer: [^]sce.UChar8, uiReadSize: sce.UInt32, uiBufferSize: sce.UInt32) -> c.int --- sceAtracSetDataAndAcquireHandle :: proc(pucBuffer: [^]sce.UChar8, uiReadSize: sce.UInt32, uiBufferSize: sce.UInt32) -> c.int ---
ReleaseHandle :: proc(atracHandle: c.int) -> c.int --- sceAtracReleaseHandle :: proc(atracHandle: c.int) -> c.int ---
Decode :: proc(atracHandle: c.int, pOutputBuffer: rawptr, pOutputSamples: ^sce.UInt32, pDecoderStatus: ^sce.UInt32) -> c.int --- sceAtracDecode :: proc(atracHandle: c.int, pOutputBuffer: rawptr, pOutputSamples: ^sce.UInt32, pDecoderStatus: ^sce.UInt32) -> c.int ---
GetStreamInfo :: proc(atracHandle: c.int, pStreamInfo: ^SceAtracStreamInfo) -> c.int --- sceAtracGetStreamInfo :: proc(atracHandle: c.int, pStreamInfo: ^SceAtracStreamInfo) -> c.int ---
AddStreamData :: proc(atracHandle: c.int, addSize: sce.UInt32) -> c.int --- sceAtracAddStreamData :: proc(atracHandle: c.int, addSize: sce.UInt32) -> c.int ---
IsSubBufferNeeded :: proc(atracHandle: c.int) -> c.int --- sceAtracIsSubBufferNeeded :: proc(atracHandle: c.int) -> c.int ---
GetSubBufferInfo :: proc(atracHandle: c.int, pReadPosition: ^sce.UInt32, pMinSubBufferSize: ^sce.UInt32, pDataSize: ^sce.UInt32) -> c.int --- sceAtracGetSubBufferInfo :: proc(atracHandle: c.int, pReadPosition: ^sce.UInt32, pMinSubBufferSize: ^sce.UInt32, pDataSize: ^sce.UInt32) -> c.int ---
SetSubBuffer :: proc(atracHandle: c.int, pSubBuffer: [^]sce.UChar8, subBufferSize: sce.UInt32) -> c.int --- sceAtracSetSubBuffer :: proc(atracHandle: c.int, pSubBuffer: [^]sce.UChar8, subBufferSize: sce.UInt32) -> c.int ---
SetLoopNum :: proc(atracHandle: c.int, loopNum: c.int) -> c.int --- sceAtracSetLoopNum :: proc(atracHandle: c.int, loopNum: c.int) -> c.int ---
SetOutputSamples :: proc(atracHandle: c.int, outputSamples: sce.UInt32) -> c.int --- sceAtracSetOutputSamples :: proc(atracHandle: c.int, outputSamples: sce.UInt32) -> c.int ---
ResetNextOutputPosition :: proc(atracHandle: c.int, resetSample: sce.UInt32) -> c.int --- sceAtracResetNextOutputPosition :: proc(atracHandle: c.int, resetSample: sce.UInt32) -> c.int ---
GetContentInfo :: proc(atracHandle: c.int, pContentInfo: ^SceAtracContentInfo) -> c.int --- sceAtracGetContentInfo :: proc(atracHandle: c.int, pContentInfo: ^SceAtracContentInfo) -> c.int ---
GetLoopInfo :: proc(atracHandle: c.int, pLoopNum: ^c.int, pLoopStatus: ^sce.UInt32) -> c.int --- sceAtracGetLoopInfo :: proc(atracHandle: c.int, pLoopNum: ^c.int, pLoopStatus: ^sce.UInt32) -> c.int ---
GetOutputSamples :: proc(atracHandle: c.int, pOutputSamples: ^sce.UInt32) -> c.int --- sceAtracGetOutputSamples :: proc(atracHandle: c.int, pOutputSamples: ^sce.UInt32) -> c.int ---
GetNextOutputPosition :: proc(atracHandle: c.int, pNextOutputSample: ^sce.UInt32) -> c.int --- sceAtracGetNextOutputPosition :: proc(atracHandle: c.int, pNextOutputSample: ^sce.UInt32) -> c.int ---
GetRemainSamples :: proc(atracHandle: c.int, pRemainSamples: ^sce.Long64) -> c.int --- sceAtracGetRemainSamples :: proc(atracHandle: c.int, pRemainSamples: ^sce.Long64) -> c.int ---
GetOutputableSamples :: proc(atracHandle: c.int, pOutputableSamples: ^sce.Long64) -> c.int --- sceAtracGetOutputableSamples :: proc(atracHandle: c.int, pOutputableSamples: ^sce.Long64) -> c.int ---
GetDecoderStatus :: proc(atracHandle: c.int, pDecoderStatus: ^sce.UInt32) -> c.int --- sceAtracGetDecoderStatus :: proc(atracHandle: c.int, pDecoderStatus: ^sce.UInt32) -> c.int ---
GetVacantSize :: proc(atracHandle: c.int, pVacantSize: ^sce.UInt32) -> c.int --- sceAtracGetVacantSize :: proc(atracHandle: c.int, pVacantSize: ^sce.UInt32) -> c.int ---
GetInternalError :: proc(atracHandle: c.int, pInternalError: ^c.int) -> c.int --- sceAtracGetInternalError :: proc(atracHandle: c.int, pInternalError: ^c.int) -> c.int ---
} }
+5 -6
View File
@@ -4,17 +4,16 @@ import "core:c"
foreign import audioin "system:SceAudioIn_stub" foreign import audioin "system:SceAudioIn_stub"
@(link_prefix = "sceAudioIn")
foreign audioin { foreign audioin {
//! Open port //! Open port
OpenPort :: proc(portType: SceAudioInPortType, grain: c.int, freq: c.int, param: SceAudioInParam) -> c.int --- sceAudioInOpenPort :: proc(portType: SceAudioInPortType, grain: c.int, freq: c.int, param: SceAudioInParam) -> c.int ---
//! Close port //! Close port
ReleasePort :: proc(port: c.int) -> c.int --- sceAudioInReleasePort :: proc(port: c.int) -> c.int ---
Input :: proc(port: c.int, destPtr: rawptr) -> c.int --- sceAudioInInput :: proc(port: c.int, destPtr: rawptr) -> c.int ---
/* get status */ /* get status */
GetAdopt :: proc(portType: SceAudioInPortType) -> c.int --- sceAudioInGetAdopt :: proc(portType: SceAudioInPortType) -> c.int ---
GetStatus :: proc(select: c.int) -> c.int --- sceAudioInGetStatus :: proc(select: c.int) -> c.int ---
} }
+9 -10
View File
@@ -5,7 +5,6 @@ import sce "../common"
foreign import audioout "system:SceAudio_stub" foreign import audioout "system:SceAudio_stub"
@(link_prefix = "sceAudioOut")
foreign audioout { foreign audioout {
/** /**
* Initialize audio port * Initialize audio port
@@ -19,7 +18,7 @@ foreign audioout {
* @return port number, < 0 on error. * @return port number, < 0 on error.
* @note - The volume is initially set to its max value (::SCE_AUDIO_OUT_MAX_VOL) * @note - The volume is initially set to its max value (::SCE_AUDIO_OUT_MAX_VOL)
*/ */
OpenPort :: proc(type: SceAudioOutPortType, len: c.int, freq: c.int, mode: SceAudioOutMode) -> c.int --- sceAudioOutOpenPort :: proc(type: SceAudioOutPortType, len: c.int, freq: c.int, mode: SceAudioOutMode) -> c.int ---
/** /**
* Release an audio port * Release an audio port
@@ -28,7 +27,7 @@ foreign audioout {
* *
* @return 0 on success, < 0 on error. * @return 0 on success, < 0 on error.
*/ */
ReleasePort :: proc(port: c.int) -> c.int --- sceAudioOutReleasePort :: proc(port: c.int) -> c.int ---
/** /**
* Output audio (blocking function) * Output audio (blocking function)
@@ -40,7 +39,7 @@ foreign audioout {
* @note - if NULL is specified for *buf, the function will not return until the last * @note - if NULL is specified for *buf, the function will not return until the last
* output audio data has been output. * output audio data has been output.
*/ */
Output :: proc(port: c.int, buf: rawptr) -> c.int --- sceAudioOutOutput :: proc(port: c.int, buf: rawptr) -> c.int ---
/** /**
* Set volume of specified output audio port * Set volume of specified output audio port
@@ -51,7 +50,7 @@ foreign audioout {
* *
* @return 0 on success, < 0 on error. * @return 0 on success, < 0 on error.
*/ */
SetVolume :: proc(port: c.int, ch: SceAudioOutChannelFlag, vol: ^c.int) -> c.int --- sceAudioOutSetVolume :: proc(port: c.int, ch: SceAudioOutChannelFlag, vol: ^c.int) -> c.int ---
/** /**
* Change configuration of specified output port * Change configuration of specified output port
@@ -64,7 +63,7 @@ foreign audioout {
* @return 0 on success, < 0 on error. * @return 0 on success, < 0 on error.
* @note - If (-1) is specified for any argument (excepted for port), current configuration is used instead. * @note - If (-1) is specified for any argument (excepted for port), current configuration is used instead.
*/ */
SetConfig :: proc(port: c.int, len: sce.Size, freq: c.int, mode: SceAudioOutMode) -> c.int --- sceAudioOutSetConfig :: proc(port: c.int, len: sce.Size, freq: c.int, mode: SceAudioOutMode) -> c.int ---
/** /**
* Get a parameter value of specified output port * Get a parameter value of specified output port
@@ -74,7 +73,7 @@ foreign audioout {
* *
* @return 0 on success, < 0 on error. * @return 0 on success, < 0 on error.
*/ */
GetConfig :: proc(port: c.int, type: SceAudioOutConfigType) -> c.int --- sceAudioOutGetConfig :: proc(port: c.int, type: SceAudioOutConfigType) -> c.int ---
/** /**
* Set 'Automatic Level Control' mode on the BGM port * Set 'Automatic Level Control' mode on the BGM port
@@ -84,7 +83,7 @@ foreign audioout {
* *
* @return 0 on success, < 0 on error. * @return 0 on success, < 0 on error.
*/ */
SetAlcMode :: proc(mode: SceAudioOutAlcMode) -> c.int --- sceAudioOutSetAlcMode :: proc(mode: SceAudioOutAlcMode) -> c.int ---
/** /**
* Get the number of remaining samples to be output on the specified port * Get the number of remaining samples to be output on the specified port
@@ -93,7 +92,7 @@ foreign audioout {
* *
* @return Number of samples on success, < 0 on error. * @return Number of samples on success, < 0 on error.
*/ */
GetRestSample :: proc(port: c.int) -> c.int --- sceAudioOutGetRestSample :: proc(port: c.int) -> c.int ---
/** /**
* Get status of port type * Get status of port type
@@ -103,5 +102,5 @@ foreign audioout {
* *
* @return (1) if port is in use, (0) otherwise. < 0 on error. * @return (1) if port is in use, (0) otherwise. < 0 on error.
*/ */
GetAdopt :: proc(type: SceAudioOutPortType) -> c.int --- sceAudioOutGetAdopt :: proc(type: SceAudioOutPortType) -> c.int ---
} }
+12 -13
View File
@@ -5,19 +5,18 @@ import sce "../common"
foreign import audiodec "system:SceAudiodec_stub" foreign import audiodec "system:SceAudiodec_stub"
@(link_prefix = "sceAudiodec")
foreign audiodec { foreign audiodec {
InitLibrary :: proc(codecType: sce.UInt32, pInitParam: ^SceAudiodecInitParam) -> sce.Int32 --- sceAudiodecInitLibrary :: proc(codecType: sce.UInt32, pInitParam: ^SceAudiodecInitParam) -> sce.Int32 ---
TermLibrary :: proc(codecType: sce.UInt32) -> sce.Int32 --- sceAudiodecTermLibrary :: proc(codecType: sce.UInt32) -> sce.Int32 ---
CreateDecoder :: proc(pCtrl: ^SceAudiodecCtrl, codecType: sce.UInt32) -> sce.Int32 --- sceAudiodecCreateDecoder :: proc(pCtrl: ^SceAudiodecCtrl, codecType: sce.UInt32) -> sce.Int32 ---
DeleteDecoder :: proc(pCtrl: ^SceAudiodecCtrl) -> sce.Int32 --- sceAudiodecDeleteDecoder :: proc(pCtrl: ^SceAudiodecCtrl) -> sce.Int32 ---
Decode :: proc(pCtrl: ^SceAudiodecCtrl) -> sce.Int32 --- sceAudiodecDecode :: proc(pCtrl: ^SceAudiodecCtrl) -> sce.Int32 ---
DecodeNFrames :: proc(pCtrl: ^SceAudiodecCtrl, nFrames: sce.UInt32) -> sce.Int32 --- sceAudiodecDecodeNFrames :: proc(pCtrl: ^SceAudiodecCtrl, nFrames: sce.UInt32) -> sce.Int32 ---
DecodeNStreams :: proc(pCtrls: []^SceAudiodecCtrl, nStreams: sce.UInt32) -> sce.Int32 --- sceAudiodecDecodeNStreams :: proc(pCtrls: []^SceAudiodecCtrl, nStreams: sce.UInt32) -> sce.Int32 ---
ClearContext :: proc(pCtrl: ^SceAudiodecCtrl) -> sce.Int32 --- sceAudiodecClearContext :: proc(pCtrl: ^SceAudiodecCtrl) -> sce.Int32 ---
GetInternalError :: proc(pCtrl: ^SceAudiodecCtrl, pInternalError: ^sce.Int32) -> sce.Int32 --- sceAudiodecGetInternalError :: proc(pCtrl: ^SceAudiodecCtrl, pInternalError: ^sce.Int32) -> sce.Int32 ---
GetContextSize :: proc(pCtrl: ^SceAudiodecCtrl, codecType: sce.UInt32) -> sce.Int32 --- sceAudiodecGetContextSize :: proc(pCtrl: ^SceAudiodecCtrl, codecType: sce.UInt32) -> sce.Int32 ---
CreateDecoderExternal :: proc(pCtrl: ^SceAudiodecCtrl, codecType: sce.UInt32, vaContext: sce.UIntVAddr, contextSize: sce.UInt32) -> sce.Int32 --- sceAudiodecCreateDecoderExternal :: proc(pCtrl: ^SceAudiodecCtrl, codecType: sce.UInt32, vaContext: sce.UIntVAddr, contextSize: sce.UInt32) -> sce.Int32 ---
DeleteDecoderExternal :: proc(pCtrl: ^SceAudiodecCtrl, pvaContext: ^sce.UIntVAddr) -> sce.Int32 --- sceAudiodecDeleteDecoderExternal :: proc(pCtrl: ^SceAudiodecCtrl, pvaContext: ^sce.UIntVAddr) -> sce.Int32 ---
} }
+8 -9
View File
@@ -5,14 +5,13 @@ import sce "../common"
foreign import audioenc "system:SceAudioenc_stub" foreign import audioenc "system:SceAudioenc_stub"
@(link_prefix = "sceAudioenc")
foreign audioenc { foreign audioenc {
InitLibrary :: proc(codecType: c.int, pInitParam: ^SceAudioencInitParam) -> c.int --- sceAudioencInitLibrary :: proc(codecType: c.int, pInitParam: ^SceAudioencInitParam) -> c.int ---
TermLibrary :: proc(codecType: c.uint) -> c.int --- sceAudioencTermLibrary :: proc(codecType: c.uint) -> c.int ---
CreateEncoder :: proc(pCtrl: ^SceAudioencCtrl, codecType: c.int) -> c.int --- sceAudioencCreateEncoder :: proc(pCtrl: ^SceAudioencCtrl, codecType: c.int) -> c.int ---
DeleteEncoder :: proc(pCtrl: ^SceAudioencCtrl) -> c.int --- sceAudioencDeleteEncoder :: proc(pCtrl: ^SceAudioencCtrl) -> c.int ---
Encode :: proc(pCtrl: ^SceAudioencCtrl) -> c.int --- sceAudioencEncode :: proc(pCtrl: ^SceAudioencCtrl) -> c.int ---
ClearContext :: proc(pCtrl: ^SceAudioencCtrl) -> c.int --- sceAudioencClearContext :: proc(pCtrl: ^SceAudioencCtrl) -> c.int ---
GetOptInfo :: proc(pCtrl: ^SceAudioencCtrl) -> c.int --- sceAudioencGetOptInfo :: proc(pCtrl: ^SceAudioencCtrl) -> c.int ---
GetInternalError :: proc(pCtrl: ^SceAudioencCtrl, pInternalError: ^c.int) -> c.int --- sceAudioencGetInternalError :: proc(pCtrl: ^SceAudioencCtrl, pInternalError: ^c.int) -> c.int ---
} }
+15 -16
View File
@@ -5,42 +5,41 @@ import sce "../common"
foreign import avplayer "system:SceAvPlayer_stub" foreign import avplayer "system:SceAvPlayer_stub"
@(link_prefix = "sceAvPlayer")
foreign avplayer { foreign avplayer {
/** /**
* @param[in] data - Init data for the video player * @param[in] data - Init data for the video player
* *
* @return The video player handle on success, < 0 on error. * @return The video player handle on success, < 0 on error.
*/ */
Init :: proc(data: ^SceAvPlayerInitData) -> SceAvPlayerHandle --- sceAvPlayerInit :: proc(data: ^SceAvPlayerInitData) -> SceAvPlayerHandle ---
/** /**
* @param[in] handle - A player handle created with ::sceAvPlayerInit * @param[in] handle - A player handle created with ::sceAvPlayerInit
* *
* @return 0 on success, < 0 on error. * @return 0 on success, < 0 on error.
*/ */
Pause :: proc(handle: SceAvPlayerHandle) -> c.int --- sceAvPlayerPause :: proc(handle: SceAvPlayerHandle) -> c.int ---
/** /**
* @param[in] handle - A player handle created with ::sceAvPlayerInit * @param[in] handle - A player handle created with ::sceAvPlayerInit
* *
* @return 0 on success, < 0 on error. * @return 0 on success, < 0 on error.
*/ */
Resume :: proc(handle: SceAvPlayerHandle) -> c.int --- sceAvPlayerResume :: proc(handle: SceAvPlayerHandle) -> c.int ---
/** /**
* @param[in] handle - A player handle created with ::sceAvPlayerInit * @param[in] handle - A player handle created with ::sceAvPlayerInit
* *
* @return 0 on success, < 0 on error. * @return 0 on success, < 0 on error.
*/ */
Start :: proc(handle: SceAvPlayerHandle) -> c.int --- sceAvPlayerStart :: proc(handle: SceAvPlayerHandle) -> c.int ---
/** /**
* @param[in] handle - A player handle created with ::sceAvPlayerInit * @param[in] handle - A player handle created with ::sceAvPlayerInit
* *
* @return 0 on success, < 0 on error. * @return 0 on success, < 0 on error.
*/ */
Stop :: proc(handle: SceAvPlayerHandle) -> c.int --- sceAvPlayerStop :: proc(handle: SceAvPlayerHandle) -> c.int ---
/** /**
* @param[in] handle - A player handle created with ::sceAvPlayerInit * @param[in] handle - A player handle created with ::sceAvPlayerInit
@@ -48,14 +47,14 @@ foreign avplayer {
* *
* @return 0 on success, < 0 on error. * @return 0 on success, < 0 on error.
*/ */
SetLooping :: proc(handle: SceAvPlayerHandle, looping: sce.Bool) -> c.int --- sceAvPlayerSetLooping :: proc(handle: SceAvPlayerHandle, looping: sce.Bool) -> c.int ---
/** /**
* @param[in] handle - A player handle created with ::sceAvPlayerInit * @param[in] handle - A player handle created with ::sceAvPlayerInit
* *
* @return SCE_TRUE if the video playback is active, SCE_FALSE otherwise. * @return SCE_TRUE if the video playback is active, SCE_FALSE otherwise.
*/ */
IsActive :: proc(handle: SceAvPlayerHandle) -> sce.Bool --- sceAvPlayerIsActive :: proc(handle: SceAvPlayerHandle) -> sce.Bool ---
/** /**
* @param[in] handle - A player handle created with ::sceAvPlayerInit * @param[in] handle - A player handle created with ::sceAvPlayerInit
@@ -63,14 +62,14 @@ foreign avplayer {
* *
* @return 0 on success, < 0 on error. * @return 0 on success, < 0 on error.
*/ */
AddSource :: proc(handle: SceAvPlayerHandle, filename: cstring) -> c.int --- sceAvPlayerAddSource :: proc(handle: SceAvPlayerHandle, filename: cstring) -> c.int ---
/** /**
* @param[in] handle - A player handle created with ::sceAvPlayerInit * @param[in] handle - A player handle created with ::sceAvPlayerInit
* *
* @return 0 on success, < 0 on error. * @return 0 on success, < 0 on error.
*/ */
Close :: proc(handle: SceAvPlayerHandle) -> c.int --- sceAvPlayerClose :: proc(handle: SceAvPlayerHandle) -> c.int ---
/** /**
* @param[in] handle - A player handle created with ::sceAvPlayerInit * @param[in] handle - A player handle created with ::sceAvPlayerInit
@@ -78,7 +77,7 @@ foreign avplayer {
* *
* @return SCE_TRUE if new data is available, SCE_FALSE otherwise. * @return SCE_TRUE if new data is available, SCE_FALSE otherwise.
*/ */
GetAudioData :: proc(handle: SceAvPlayerHandle, info: ^SceAvPlayerFrameInfo) -> sce.Bool --- sceAvPlayerGetAudioData :: proc(handle: SceAvPlayerHandle, info: ^SceAvPlayerFrameInfo) -> sce.Bool ---
/** /**
* @param[in] handle - A player handle created with ::sceAvPlayerInit * @param[in] handle - A player handle created with ::sceAvPlayerInit
@@ -86,14 +85,14 @@ foreign avplayer {
* *
* @return SCE_TRUE if new data is available, SCE_FALSE otherwise. * @return SCE_TRUE if new data is available, SCE_FALSE otherwise.
*/ */
GetVideoData :: proc(handle: SceAvPlayerHandle, info: ^SceAvPlayerFrameInfo) -> sce.Bool --- sceAvPlayerGetVideoData :: proc(handle: SceAvPlayerHandle, info: ^SceAvPlayerFrameInfo) -> sce.Bool ---
/** /**
* @param[in] handle - A player handle created with ::sceAvPlayerInit * @param[in] handle - A player handle created with ::sceAvPlayerInit
* *
* @return Current time on the video playback in milliseconds. * @return Current time on the video playback in milliseconds.
*/ */
CurrentTime :: proc(handle: SceAvPlayerHandle) -> c.uint64_t --- sceAvPlayerCurrentTime :: proc(handle: SceAvPlayerHandle) -> c.uint64_t ---
/** /**
* @param[in] handle - A player handle created with ::sceAvPlayerInit * @param[in] handle - A player handle created with ::sceAvPlayerInit
@@ -101,7 +100,7 @@ foreign avplayer {
* *
* @return 0 on success, < 0 on error. * @return 0 on success, < 0 on error.
*/ */
JumpToTime :: proc(handle: SceAvPlayerHandle, offset: c.uint64_t) -> c.int --- sceAvPlayerJumpToTime :: proc(handle: SceAvPlayerHandle, offset: c.uint64_t) -> c.int ---
/** /**
* @param[in] handle - A player handle created with ::sceAvPlayerInit * @param[in] handle - A player handle created with ::sceAvPlayerInit
@@ -109,7 +108,7 @@ foreign avplayer {
* *
* @return 0 on success, < 0 on error. * @return 0 on success, < 0 on error.
*/ */
SetTrickSpeed :: proc(handle: SceAvPlayerHandle, speed: c.int) -> c.int --- sceAvPlayerSetTrickSpeed :: proc(handle: SceAvPlayerHandle, speed: c.int) -> c.int ---
/** /**
* @param[in] handle - A player handle created with ::sceAvPlayerInit * @param[in] handle - A player handle created with ::sceAvPlayerInit
@@ -118,5 +117,5 @@ foreign avplayer {
* *
* @return 0 on success, < 0 on error. * @return 0 on success, < 0 on error.
*/ */
GetStreamInfo :: proc(handle: SceAvPlayerHandle, id: c.uint32_t, info: ^SceAvPlayerStreamInfo) -> c.int --- sceAvPlayerGetStreamInfo :: proc(handle: SceAvPlayerHandle, id: c.uint32_t, info: ^SceAvPlayerStreamInfo) -> c.int ---
} }
+3 -4
View File
@@ -7,11 +7,10 @@ foreign import bgapputil "system:SceBgAppUtil_stub"
/** /**
* Error Codes * Error Codes
*/ */
SceBgAppUtilErrorCode :: enum c.int { SceBgAppUtilErrorCode :: enum c.uint {
SCE_BGAPP_UTIL_ERROR_INVALID_ARG = −2146409214 //0x80106502 SCE_BGAPP_UTIL_ERROR_INVALID_ARG = 0x80106502,
} }
@(link_prefix = "sceBgAppUtil")
foreign bgapputil { foreign bgapputil {
/** /**
* Start BG application (eboot2.bin) * Start BG application (eboot2.bin)
@@ -20,5 +19,5 @@ foreign bgapputil {
* *
* @return 0 on success, <0 otherwise. * @return 0 on success, <0 otherwise.
*/ */
StartBgApp :: proc(mode: c.int) -> c.int --- sceBgAppUtilStartBgApp :: proc(mode: c.int) -> c.int ---
} }
+45 -46
View File
@@ -5,52 +5,51 @@ import sce "../common"
foreign import bt "system:SceBtForDriver_stub" foreign import bt "system:SceBtForDriver_stub"
@(link_prefix = "ksceBt")
foreign bt { foreign bt {
AvrcpReadVolume :: proc(r0: c.int, r1: c.int, r2: c.int, r3: c.int) -> c.int --- ksceBtAvrcpReadVolume :: proc(r0: c.int, r1: c.int, r2: c.int, r3: c.int) -> c.int ---
AvrcpSendButton :: proc(r0: c.int, r1: c.int, r2: c.int, r3: c.int) -> c.int --- ksceBtAvrcpSendButton :: proc(r0: c.int, r1: c.int, r2: c.int, r3: c.int) -> c.int ---
AvrcpSendVolume :: proc(r0: c.int, r1: c.int, r2: c.int, r3: c.int) -> c.int --- ksceBtAvrcpSendVolume :: proc(r0: c.int, r1: c.int, r2: c.int, r3: c.int) -> c.int ---
AvrcpSetPlayStatus :: proc(r0: c.int, r1: c.int, r2: c.int, r3: c.int) -> c.int --- ksceBtAvrcpSetPlayStatus :: proc(r0: c.int, r1: c.int, r2: c.int, r3: c.int) -> c.int ---
AvrcpSetTitle :: proc(r0: c.int, r1: c.int, r2: c.int, r3: c.int) -> c.int --- ksceBtAvrcpSetTitle :: proc(r0: c.int, r1: c.int, r2: c.int, r3: c.int) -> c.int ---
DeleteRegisteredInfo :: proc(mac0: c.uint, mac1: c.uint) -> c.int --- ksceBtDeleteRegisteredInfo :: proc(mac0: c.uint, mac1: c.uint) -> c.int ---
FreqAudio :: proc(r0: c.int, r1: c.int, r2: c.int, r3: c.int) -> c.int --- ksceBtFreqAudio :: proc(r0: c.int, r1: c.int, r2: c.int, r3: c.int) -> c.int ---
GetConfiguration :: proc() -> c.int --- // returns 0x0 BT disabled, 0x9 if enabled ksceBtGetConfiguration :: proc() -> c.int --- // returns 0x0 BT disabled, 0x9 if enabled
GetConnectingInfo :: proc(mac0: c.uint, mac1: c.uint) -> c.int --- // 1 = disconnected?, 2 = connecting?, 5 = connected? ksceBtGetConnectingInfo :: proc(mac0: c.uint, mac1: c.uint) -> c.int --- // 1 = disconnected?, 2 = connecting?, 5 = connected?
GetDeviceName :: proc(mac0: c.uint, mac1: c.uint, name: [0x79]c.char) -> c.int --- ksceBtGetDeviceName :: proc(mac0: c.uint, mac1: c.uint, name: [0x79]c.char) -> c.int ---
GetInfoForTest :: proc(r0: c.int, r1: c.int, r2: c.int, r3: c.int) -> c.int --- ksceBtGetInfoForTest :: proc(r0: c.int, r1: c.int, r2: c.int, r3: c.int) -> c.int ---
GetLastError :: proc() -> c.int --- ksceBtGetLastError :: proc() -> c.int ---
GetRegisteredInfo :: proc(device: c.int, unk: c.int, info: ^SceBtRegisteredInfo, info_size: sce.Size) -> c.int --- ksceBtGetRegisteredInfo :: proc(device: c.int, unk: c.int, info: ^SceBtRegisteredInfo, info_size: sce.Size) -> c.int ---
GetStatusForTest :: proc(r0: c.int, r1: c.int, r2: c.int, r3: c.int) -> c.int --- ksceBtGetStatusForTest :: proc(r0: c.int, r1: c.int, r2: c.int, r3: c.int) -> c.int ---
GetVidPid :: proc(mac0: c.uint, mac1: c.uint, vid_pid: [2]c.ushort) -> c.int --- ksceBtGetVidPid :: proc(mac0: c.uint, mac1: c.uint, vid_pid: [2]c.ushort) -> c.int ---
HfpGetCurrentPhoneNumber :: proc(r0: c.int, r1: c.int, r2: c.int, r3: c.int) -> c.int --- ksceBtHfpGetCurrentPhoneNumber :: proc(r0: c.int, r1: c.int, r2: c.int, r3: c.int) -> c.int ---
HfpRequest :: proc(r0: c.int, r1: c.int, r2: c.int, r3: c.int) -> c.int --- ksceBtHfpRequest :: proc(r0: c.int, r1: c.int, r2: c.int, r3: c.int) -> c.int ---
HidGetReportDescriptor :: proc(mac0: c.uint, mac1: c.uint, buffer: rawptr, size: sce.Size) -> c.int --- ksceBtHidGetReportDescriptor :: proc(mac0: c.uint, mac1: c.uint, buffer: rawptr, size: sce.Size) -> c.int ---
HidTransfer :: proc(mac0: c.uint, mac1: c.uint, request: ^SceBtHidRequest) -> c.int --- ksceBtHidTransfer :: proc(mac0: c.uint, mac1: c.uint, request: ^SceBtHidRequest) -> c.int ---
PushBip :: proc(r0: c.int, r1: c.int, r2: c.int, r3: c.int) -> c.int --- ksceBtPushBip :: proc(r0: c.int, r1: c.int, r2: c.int, r3: c.int) -> c.int ---
PushOpp :: proc(r0: c.int, r1: c.int, r2: c.int, r3: c.int) -> c.int --- ksceBtPushOpp :: proc(r0: c.int, r1: c.int, r2: c.int, r3: c.int) -> c.int ---
ReadEvent :: proc(events: [^]SceBtEvent, num_events: c.int) -> c.int --- ksceBtReadEvent :: proc(events: [^]SceBtEvent, num_events: c.int) -> c.int ---
RecvAudio :: proc(r0: c.int, r1: c.int, r2: c.int, r3: c.int) -> c.int --- ksceBtRecvAudio :: proc(r0: c.int, r1: c.int, r2: c.int, r3: c.int) -> c.int ---
RecvBip :: proc(r0: c.int, r1: c.int, r2: c.int, r3: c.int) -> c.int --- ksceBtRecvBip :: proc(r0: c.int, r1: c.int, r2: c.int, r3: c.int) -> c.int ---
RecvOpp :: proc(r0: c.int, r1: c.int, r2: c.int, r3: c.int) -> c.int --- ksceBtRecvOpp :: proc(r0: c.int, r1: c.int, r2: c.int, r3: c.int) -> c.int ---
RecvSpp :: proc(r0: c.int, r1: c.int, r2: c.int, r3: c.int) -> c.int --- ksceBtRecvSpp :: proc(r0: c.int, r1: c.int, r2: c.int, r3: c.int) -> c.int ---
RegisterCallback :: proc(cb: sce.UID, unused: c.int, flags1: c.int, flags2: c.int) -> c.int --- // looks like flags1 is a mask for permitted MACs ksceBtRegisterCallback :: proc(cb: sce.UID, unused: c.int, flags1: c.int, flags2: c.int) -> c.int --- // looks like flags1 is a mask for permitted MACs
ReplyPinCode :: proc(mac0: c.uint, mac1: c.uint, code: ^c.uchar, length: sce.Size) -> c.int --- ksceBtReplyPinCode :: proc(mac0: c.uint, mac1: c.uint, code: ^c.uchar, length: sce.Size) -> c.int ---
ReplyUserConfirmation :: proc(mac0: c.uint, mac1: c.uint, unk: c.int) -> c.int --- ksceBtReplyUserConfirmation :: proc(mac0: c.uint, mac1: c.uint, unk: c.int) -> c.int ---
SendAudio :: proc(r0: c.int, r1: c.int, r2: c.int, r3: c.int) -> c.int --- ksceBtSendAudio :: proc(r0: c.int, r1: c.int, r2: c.int, r3: c.int) -> c.int ---
SendL2capEchoRequestForTest :: proc(r0: c.int, r1: c.int, r2: c.int, r3: c.int) -> c.int --- ksceBtSendL2capEchoRequestForTest :: proc(r0: c.int, r1: c.int, r2: c.int, r3: c.int) -> c.int ---
SendSpp :: proc(r0: c.int, r1: c.int, r2: c.int, r3: c.int) -> c.int --- ksceBtSendSpp :: proc(r0: c.int, r1: c.int, r2: c.int, r3: c.int) -> c.int ---
SetConfiguration :: proc(r0: c.int) -> c.int --- //0 = disable bt, 1 = enabling, 2 = enabled 3 = disabling? ksceBtSetConfiguration :: proc(r0: c.int) -> c.int --- //0 = disable bt, 1 = enabling, 2 = enabled 3 = disabling?
SetContentProtection :: proc(r0: c.int) -> c.int --- ksceBtSetContentProtection :: proc(r0: c.int) -> c.int ---
SetInquiryResultForTest :: proc(_: ^c.uchar) -> c.int --- ksceBtSetInquiryResultForTest :: proc(_: ^c.uchar) -> c.int ---
SetInquiryScan :: proc(r0: c.int) -> c.int --- ksceBtSetInquiryScan :: proc(r0: c.int) -> c.int ---
SetL2capEchoResponseBufferForTest :: proc(r0: c.int, r1: c.int, r2: c.int, r3: c.int) -> c.int --- ksceBtSetL2capEchoResponseBufferForTest :: proc(r0: c.int, r1: c.int, r2: c.int, r3: c.int) -> c.int ---
SetStatusForTest :: proc(r0: c.int, r1: c.int, r2: c.int, r3: c.int) -> c.int --- ksceBtSetStatusForTest :: proc(r0: c.int, r1: c.int, r2: c.int, r3: c.int) -> c.int ---
StartAudio :: proc(r0: c.int, r1: c.int, r2: c.int, r3: c.int) -> c.int --- ksceBtStartAudio :: proc(r0: c.int, r1: c.int, r2: c.int, r3: c.int) -> c.int ---
StartConnect :: proc(mac0: c.uint, mac1: c.uint) -> c.int --- // mac0 can be used as a device index (already paired devices)? ksceBtStartConnect :: proc(mac0: c.uint, mac1: c.uint) -> c.int --- // mac0 can be used as a device index (already paired devices)?
StartDisconnect :: proc(mac0: c.uint, mac1: c.uint) -> c.int --- ksceBtStartDisconnect :: proc(mac0: c.uint, mac1: c.uint) -> c.int ---
StartInquiry :: proc() -> c.int --- ksceBtStartInquiry :: proc() -> c.int ---
StopAudio :: proc(r0: c.int, r1: c.int, r2: c.int, r3: c.int) -> c.int --- ksceBtStopAudio :: proc(r0: c.int, r1: c.int, r2: c.int, r3: c.int) -> c.int ---
StopInquiry :: proc() -> c.int --- ksceBtStopInquiry :: proc() -> c.int ---
UnregisterCallback :: proc(cb: sce.UID) -> c.int --- ksceBtUnregisterCallback :: proc(cb: sce.UID) -> c.int ---
} }
+45 -46
View File
@@ -5,7 +5,6 @@ import sce "../common"
foreign import camera "SceCamera_stub" foreign import camera "SceCamera_stub"
@(link_prefix = "sceCamera")
foreign camera { foreign camera {
/** /**
* Open a camera device. * Open a camera device.
@@ -15,7 +14,7 @@ foreign camera {
* *
* @return SCE_OK, <0 on error. * @return SCE_OK, <0 on error.
*/ */
Open :: proc(devnum: c.int, pInfo: ^SceCameraInfo) -> c.int --- sceCameraOpen :: proc(devnum: c.int, pInfo: ^SceCameraInfo) -> c.int ---
/** /**
* Close a camera device. * Close a camera device.
@@ -24,7 +23,7 @@ foreign camera {
* *
* @return SCE_OK, <0 on error. * @return SCE_OK, <0 on error.
*/ */
CameraClose :: proc(devnum: c.int) -> c.int --- sceCameraClose :: proc(devnum: c.int) -> c.int ---
/** /**
* Start camera streaming. * Start camera streaming.
@@ -33,7 +32,7 @@ foreign camera {
* *
* @return SCE_OK, <0 on error. * @return SCE_OK, <0 on error.
*/ */
Start :: proc(devnum: c.int) -> c.int --- sceCameraStart :: proc(devnum: c.int) -> c.int ---
/** /**
* Stop camera streaming. * Stop camera streaming.
@@ -42,7 +41,7 @@ foreign camera {
* *
* @return SCE_OK, <0 on error. * @return SCE_OK, <0 on error.
*/ */
Stop :: proc(devnum: c.int) -> c.int --- sceCameraStop :: proc(devnum: c.int) -> c.int ---
/** /**
* Read image data from current streaming. * Read image data from current streaming.
@@ -52,7 +51,7 @@ foreign camera {
* *
* @return SCE_OK, <0 on error. * @return SCE_OK, <0 on error.
*/ */
Read :: proc(devnum: c.int, pRead: ^SceCameraRead) -> c.int --- sceCameraRead :: proc(devnum: c.int, pRead: ^SceCameraRead) -> c.int ---
/** /**
* Check if camera device is active. * Check if camera device is active.
@@ -61,7 +60,7 @@ foreign camera {
* *
* @return 1 if camera is active, 0 if inactive , <0 on error. * @return 1 if camera is active, 0 if inactive , <0 on error.
*/ */
IsActive :: proc(devnum: c.int) -> c.int --- sceCameraIsActive :: proc(devnum: c.int) -> c.int ---
/** /**
* Get camera saturation value. * Get camera saturation value.
@@ -71,7 +70,7 @@ foreign camera {
* *
* @return SCE_OK , <0 on error. * @return SCE_OK , <0 on error.
*/ */
GetSaturation :: proc(devnum: c.int, pLevel: ^c.int) -> c.int --- sceCameraGetSaturation :: proc(devnum: c.int, pLevel: ^c.int) -> c.int ---
/** /**
* Set camera saturation value. * Set camera saturation value.
@@ -81,7 +80,7 @@ foreign camera {
* *
* @return SCE_OK , <0 on error. * @return SCE_OK , <0 on error.
*/ */
SetSaturation :: proc(devnum: c.int, level: c.int) -> c.int --- sceCameraSetSaturation :: proc(devnum: c.int, level: c.int) -> c.int ---
/** /**
* Get camera brightness value. * Get camera brightness value.
@@ -91,7 +90,7 @@ foreign camera {
* *
* @return SCE_OK , <0 on error. * @return SCE_OK , <0 on error.
*/ */
GetBrightness :: proc(devnum: c.int, pLevel: ^c.int) -> c.int --- sceCameraGetBrightness :: proc(devnum: c.int, pLevel: ^c.int) -> c.int ---
/** /**
* Set camera brightness value. * Set camera brightness value.
@@ -103,7 +102,7 @@ foreign camera {
* *
* @note Brightness value must be between 0 and 255. * @note Brightness value must be between 0 and 255.
*/ */
SetBrightness :: proc(devnum: c.int, level: c.int) -> c.int --- sceCameraSetBrightness :: proc(devnum: c.int, level: c.int) -> c.int ---
/** /**
* Get camera contrast value. * Get camera contrast value.
@@ -113,7 +112,7 @@ foreign camera {
* *
* @return SCE_OK , <0 on error. * @return SCE_OK , <0 on error.
*/ */
GetContrast :: proc(devnum: c.int, pLevel: ^c.int) -> c.int --- sceCameraGetContrast :: proc(devnum: c.int, pLevel: ^c.int) -> c.int ---
/** /**
* Set camera contrast value. * Set camera contrast value.
@@ -125,7 +124,7 @@ foreign camera {
* *
* @note Contrast value must be between 0 and 255. * @note Contrast value must be between 0 and 255.
*/ */
SetContrast :: proc(devnum: c.int, level: c.int) -> c.int --- sceCameraSetContrast :: proc(devnum: c.int, level: c.int) -> c.int ---
/** /**
* Get camera sharpness value. * Get camera sharpness value.
@@ -135,7 +134,7 @@ foreign camera {
* *
* @return SCE_OK , <0 on error. * @return SCE_OK , <0 on error.
*/ */
GetSharpness :: proc(devnum: c.int, pLevel: ^c.int) -> c.int --- sceCameraGetSharpness :: proc(devnum: c.int, pLevel: ^c.int) -> c.int ---
/** /**
* Set camera sharpness value. * Set camera sharpness value.
@@ -145,7 +144,7 @@ foreign camera {
* *
* @return SCE_OK , <0 on error. * @return SCE_OK , <0 on error.
*/ */
SetSharpness :: proc(devnum: c.int, level: c.int) -> c.int --- sceCameraSetSharpness :: proc(devnum: c.int, level: c.int) -> c.int ---
/** /**
* Get camera reverse mode. * Get camera reverse mode.
@@ -155,7 +154,7 @@ foreign camera {
* *
* @return SCE_OK , <0 on error. * @return SCE_OK , <0 on error.
*/ */
GetReverse :: proc(devnum: c.int, pMode: ^c.int) -> c.int --- sceCameraGetReverse :: proc(devnum: c.int, pMode: ^c.int) -> c.int ---
/** /**
* Set camera reverse mode. * Set camera reverse mode.
@@ -165,7 +164,7 @@ foreign camera {
* *
* @return SCE_OK , <0 on error. * @return SCE_OK , <0 on error.
*/ */
SetReverse :: proc(devnum: c.int, mode: c.int) -> c.int --- sceCameraSetReverse :: proc(devnum: c.int, mode: c.int) -> c.int ---
/** /**
* Get active camera effects. * Get active camera effects.
@@ -175,7 +174,7 @@ foreign camera {
* *
* @return SCE_OK , <0 on error. * @return SCE_OK , <0 on error.
*/ */
GetEffect :: proc(devnum: c.int, pMode: ^c.int) -> c.int --- sceCameraGetEffect :: proc(devnum: c.int, pMode: ^c.int) -> c.int ---
/** /**
* Active a camera effect. * Active a camera effect.
@@ -185,7 +184,7 @@ foreign camera {
* *
* @return SCE_OK , <0 on error. * @return SCE_OK , <0 on error.
*/ */
SetEffect :: proc(devnum: c.int, mode: c.int) -> c.int --- sceCameraSetEffect :: proc(devnum: c.int, mode: c.int) -> c.int ---
/** /**
* Get camera exposure compensation value. * Get camera exposure compensation value.
@@ -195,7 +194,7 @@ foreign camera {
* *
* @return SCE_OK , <0 on error. * @return SCE_OK , <0 on error.
*/ */
GetEV :: proc(devnum: c.int, pLevel: ^c.int) -> c.int --- sceCameraGetEV :: proc(devnum: c.int, pLevel: ^c.int) -> c.int ---
/** /**
* Set camera exposure compensation value. * Set camera exposure compensation value.
@@ -205,7 +204,7 @@ foreign camera {
* *
* @return SCE_OK , <0 on error. * @return SCE_OK , <0 on error.
*/ */
SetEV :: proc(devnum: c.int, level: c.int) -> c.int --- sceCameraSetEV :: proc(devnum: c.int, level: c.int) -> c.int ---
/** /**
* Get camera zoom value. * Get camera zoom value.
@@ -215,7 +214,7 @@ foreign camera {
* *
* @return SCE_OK , <0 on error. * @return SCE_OK , <0 on error.
*/ */
GetZoom :: proc(devnum: c.int, pLevel: ^c.int) -> c.int --- sceCameraGetZoom :: proc(devnum: c.int, pLevel: ^c.int) -> c.int ---
/** /**
* Set camera zoom value. * Set camera zoom value.
@@ -225,7 +224,7 @@ foreign camera {
* *
* @return SCE_OK , <0 on error. * @return SCE_OK , <0 on error.
*/ */
SetZoom :: proc(devnum: c.int, level: c.int) -> c.int --- sceCameraSetZoom :: proc(devnum: c.int, level: c.int) -> c.int ---
/** /**
* Get camera anti-flickering mode. * Get camera anti-flickering mode.
@@ -235,7 +234,7 @@ foreign camera {
* *
* @return SCE_OK , <0 on error. * @return SCE_OK , <0 on error.
*/ */
GetAntiFlicker :: proc(devnum: c.int, pMode: ^c.int) -> c.int --- sceCameraGetAntiFlicker :: proc(devnum: c.int, pMode: ^c.int) -> c.int ---
/** /**
* Set camera exposure anti-flickering mode. * Set camera exposure anti-flickering mode.
@@ -245,7 +244,7 @@ foreign camera {
* *
* @return SCE_OK , <0 on error. * @return SCE_OK , <0 on error.
*/ */
SetAntiFlicker :: proc(devnum: c.int, mode: c.int) -> c.int --- sceCameraSetAntiFlicker :: proc(devnum: c.int, mode: c.int) -> c.int ---
/** /**
* Get camera ISO speed mode. * Get camera ISO speed mode.
@@ -255,7 +254,7 @@ foreign camera {
* *
* @return SCE_OK , <0 on error. * @return SCE_OK , <0 on error.
*/ */
GetISO :: proc(devnum: c.int, pMode: ^c.int) -> c.int --- sceCameraGetISO :: proc(devnum: c.int, pMode: ^c.int) -> c.int ---
/** /**
* Set camera ISO speed mode. * Set camera ISO speed mode.
@@ -265,7 +264,7 @@ foreign camera {
* *
* @return SCE_OK , <0 on error. * @return SCE_OK , <0 on error.
*/ */
SetISO :: proc(devnum: c.int, mode: c.int) -> c.int --- sceCameraSetISO :: proc(devnum: c.int, mode: c.int) -> c.int ---
/** /**
* Get camera gain mode. * Get camera gain mode.
@@ -275,7 +274,7 @@ foreign camera {
* *
* @return SCE_OK , <0 on error. * @return SCE_OK , <0 on error.
*/ */
GetGain :: proc(devnum: c.int, pMode: ^c.int) -> c.int --- sceCameraGetGain :: proc(devnum: c.int, pMode: ^c.int) -> c.int ---
/** /**
* Set camera gain mode. * Set camera gain mode.
@@ -285,7 +284,7 @@ foreign camera {
* *
* @return SCE_OK , <0 on error. * @return SCE_OK , <0 on error.
*/ */
SetGain :: proc(devnum: c.int, mode: c.int) -> c.int --- sceCameraSetGain :: proc(devnum: c.int, mode: c.int) -> c.int ---
/** /**
* Get camera white balance mode. * Get camera white balance mode.
@@ -295,7 +294,7 @@ foreign camera {
* *
* @return SCE_OK , <0 on error. * @return SCE_OK , <0 on error.
*/ */
GetWhiteBalance :: proc(devnum: c.int, pMode: ^c.int) -> c.int --- sceCameraGetWhiteBalance :: proc(devnum: c.int, pMode: ^c.int) -> c.int ---
/** /**
* Set camera white balance mode. * Set camera white balance mode.
@@ -305,7 +304,7 @@ foreign camera {
* *
* @return SCE_OK , <0 on error. * @return SCE_OK , <0 on error.
*/ */
SetWhiteBalance :: proc(devnum: c.int, mode: c.int) -> c.int --- sceCameraSetWhiteBalance :: proc(devnum: c.int, mode: c.int) -> c.int ---
/** /**
* Get camera backlight compensation mode. * Get camera backlight compensation mode.
@@ -315,7 +314,7 @@ foreign camera {
* *
* @return SCE_OK , <0 on error. * @return SCE_OK , <0 on error.
*/ */
GetBacklight :: proc(devnum: c.int, pMode: ^c.int) -> c.int --- sceCameraGetBacklight :: proc(devnum: c.int, pMode: ^c.int) -> c.int ---
/** /**
* Set camera backlight mode. * Set camera backlight mode.
@@ -325,7 +324,7 @@ foreign camera {
* *
* @return SCE_OK , <0 on error. * @return SCE_OK , <0 on error.
*/ */
SetBacklight :: proc(devnum: c.int, mode: c.int) -> c.int --- sceCameraSetBacklight :: proc(devnum: c.int, mode: c.int) -> c.int ---
/** /**
* Get nightmode mode. * Get nightmode mode.
@@ -335,7 +334,7 @@ foreign camera {
* *
* @return SCE_OK , <0 on error. * @return SCE_OK , <0 on error.
*/ */
GetNightmode :: proc(devnum: c.int, pMode: ^c.int) -> c.int --- sceCameraGetNightmode :: proc(devnum: c.int, pMode: ^c.int) -> c.int ---
/** /**
* Set camera nightmoge mode. * Set camera nightmoge mode.
@@ -345,7 +344,7 @@ foreign camera {
* *
* @return SCE_OK , <0 on error. * @return SCE_OK , <0 on error.
*/ */
SetNightmode :: proc(devnum: c.int, mode: c.int) -> c.int --- sceCameraSetNightmode :: proc(devnum: c.int, mode: c.int) -> c.int ---
/** /**
* Get exposure ceiling mode. (?) * Get exposure ceiling mode. (?)
@@ -355,7 +354,7 @@ foreign camera {
* *
* @return SCE_OK , <0 on error. * @return SCE_OK , <0 on error.
*/ */
GetExposureCeiling :: proc(devnum: c.int, pMode: ^c.int) -> c.int --- sceCameraGetExposureCeiling :: proc(devnum: c.int, pMode: ^c.int) -> c.int ---
/** /**
* Set exposure ceiling mode. (?) * Set exposure ceiling mode. (?)
@@ -365,7 +364,7 @@ foreign camera {
* *
* @return SCE_OK , <0 on error. * @return SCE_OK , <0 on error.
*/ */
SetExposureCeiling :: proc(devnum: c.int, mode: c.int) -> c.int --- sceCameraSetExposureCeiling :: proc(devnum: c.int, mode: c.int) -> c.int ---
/** /**
* Get auto control hold mode. (?) * Get auto control hold mode. (?)
@@ -375,7 +374,7 @@ foreign camera {
* *
* @return SCE_OK , <0 on error. * @return SCE_OK , <0 on error.
*/ */
GetAutoControlHold :: proc(devnum: c.int, pMode: ^c.int) -> c.int --- sceCameraGetAutoControlHold :: proc(devnum: c.int, pMode: ^c.int) -> c.int ---
/** /**
* Set auto control hold mode. (?) * Set auto control hold mode. (?)
@@ -385,7 +384,7 @@ foreign camera {
* *
* @return SCE_OK , <0 on error. * @return SCE_OK , <0 on error.
*/ */
SetAutoControlHold :: proc(devnum: c.int, mode: c.int) -> c.int --- sceCameraSetAutoControlHold :: proc(devnum: c.int, mode: c.int) -> c.int ---
/** /**
* Get camera device location. (?) * Get camera device location. (?)
@@ -396,12 +395,12 @@ foreign camera {
* @return SCE_OK , <0 on error. * @return SCE_OK , <0 on error.
*/ */
GetDeviceLocation :: proc(devnum: c.int, pLocation: ^sce.FVector3) -> c.int --- sceCameraGetDeviceLocation :: proc(devnum: c.int, pLocation: ^sce.FVector3) -> c.int ---
GetImageQuality :: proc(devnum: c.int, pLevel: ^c.int) -> c.int --- sceCameraGetImageQuality :: proc(devnum: c.int, pLevel: ^c.int) -> c.int ---
SetImageQuality :: proc(devnum: c.int, level: c.int) -> c.int --- sceCameraSetImageQuality :: proc(devnum: c.int, level: c.int) -> c.int ---
GetNoiseReduction :: proc(devnum: c.int, pLevel: ^c.int) -> c.int --- sceCameraGetNoiseReduction :: proc(devnum: c.int, pLevel: ^c.int) -> c.int ---
SetNoiseReduction :: proc(devnum: c.int, level: c.int) -> c.int --- sceCameraSetNoiseReduction :: proc(devnum: c.int, level: c.int) -> c.int ---
GetSharpnessOff :: proc(devnum: c.int, pLevel: ^c.int) -> c.int --- sceCameraGetSharpnessOff :: proc(devnum: c.int, pLevel: ^c.int) -> c.int ---
SetSharpnessOff :: proc(devnum: c.int, level: c.int) -> c.int --- sceCameraSetSharpnessOff :: proc(devnum: c.int, level: c.int) -> c.int ---
} }
+35 -36
View File
@@ -15,56 +15,55 @@ SceClibMspaceStats :: struct {
} }
#assert(size_of(SceClibMspaceStats) == 0x10) #assert(size_of(SceClibMspaceStats) == 0x10)
@(link_prefix = "sceClib")
foreign libkernel { foreign libkernel {
Abort :: proc() --- sceClibAbort :: proc() ---
LookCtypeTable :: proc(ch: c.char) -> c.char --- sceClibLookCtypeTable :: proc(ch: c.char) -> c.char ---
Tolower :: proc(ch: c.char) -> c.int --- sceClibTolower :: proc(ch: c.char) -> c.int ---
Toupper :: proc(ch: c.char) -> c.int --- sceClibToupper :: proc(ch: c.char) -> c.int ---
Printf :: proc(fmt: cstring, #c_vararg args: ..any) -> c.int --- sceClibPrintf :: proc(fmt: cstring, #c_vararg args: ..any) -> c.int ---
Dprintf :: proc(fd: sce.UID, fmt: cstring, #c_vararg args: ..any) -> c.int --- sceClibDprintf :: proc(fd: sce.UID, fmt: cstring, #c_vararg args: ..any) -> c.int ---
Snprintf :: proc(dst: cstring, dst_max_size: sce.Size, fmt: cstring, #c_vararg args: ..any) -> c.int --- sceClibSnprintf :: proc(dst: cstring, dst_max_size: sce.Size, fmt: cstring, #c_vararg args: ..any) -> c.int ---
Vsnprintf :: proc(dst: cstring, dst_max_size: sce.Size, fmt: cstring, args: c.va_list) -> c.int --- sceClibVsnprintf :: proc(dst: cstring, dst_max_size: sce.Size, fmt: cstring, args: c.va_list) -> c.int ---
Strncpy :: proc(dst: cstring, src: cstring, len: sce.Size) -> cstring --- sceClibStrncpy :: proc(dst: cstring, src: cstring, len: sce.Size) -> cstring ---
Strncat :: proc(dst: cstring, src: cstring, len: sce.Size) -> cstring --- sceClibStrncat :: proc(dst: cstring, src: cstring, len: sce.Size) -> cstring ---
Strchr :: proc(s: cstring, ch: c.int) -> cstring --- sceClibStrchr :: proc(s: cstring, ch: c.int) -> cstring ---
Strrchr :: proc(src: cstring, ch: c.int) -> cstring --- sceClibStrrchr :: proc(src: cstring, ch: c.int) -> cstring ---
Strstr :: proc(s1, s2: cstring) -> cstring --- sceClibStrstr :: proc(s1, s2: cstring) -> cstring ---
Strcmp :: proc(s1, s2: cstring) -> c.int --- sceClibStrcmp :: proc(s1, s2: cstring) -> c.int ---
Strncmp :: proc(s1, s2: cstring, len: sce.Size) -> c.int --- sceClibStrncmp :: proc(s1, s2: cstring, len: sce.Size) -> c.int ---
Strncasecmp :: proc(s1, s2: cstring, len: sce.Size) -> c.int --- sceClibStrncasecmp :: proc(s1, s2: cstring, len: sce.Size) -> c.int ---
Strnlen :: proc(s1: cstring, max_len: sce.Size) -> sce.Size --- sceClibStrnlen :: proc(s1: cstring, max_len: sce.Size) -> sce.Size ---
Memset :: proc(dst: rawptr, ch: c.int, len: sce.Size) -> rawptr --- sceClibMemset :: proc(dst: rawptr, ch: c.int, len: sce.Size) -> rawptr ---
Memcpy :: proc(dst: rawptr, src: rawptr, len: sce.Size) -> rawptr --- sceClibMemcpy :: proc(dst: rawptr, src: rawptr, len: sce.Size) -> rawptr ---
Memcpy_safe :: proc(dst: rawptr, src: rawptr, len: sce.Size) -> rawptr --- sceClibMemcpy_safe :: proc(dst: rawptr, src: rawptr, len: sce.Size) -> rawptr ---
Memmove :: proc(dst: rawptr, src: rawptr, len: sce.Size) -> rawptr --- sceClibMemmove :: proc(dst: rawptr, src: rawptr, len: sce.Size) -> rawptr ---
Memcmp :: proc(s1: rawptr, s2: rawptr, len: sce.Size) -> c.int --- sceClibMemcmp :: proc(s1: rawptr, s2: rawptr, len: sce.Size) -> c.int ---
Memchr :: proc(src: rawptr, ch: c.int, len: sce.Size) -> rawptr --- sceClibMemchr :: proc(src: rawptr, ch: c.int, len: sce.Size) -> rawptr ---
MspaceCreate :: proc(memblock: rawptr, size: sce.Size) -> SceClibMspace --- sceClibMspaceCreate :: proc(memblock: rawptr, size: sce.Size) -> SceClibMspace ---
MspaceDestroy :: proc(mspace: SceClibMspace) --- sceClibMspaceDestroy :: proc(mspace: SceClibMspace) ---
MspaceMallocUsableSize :: proc(ptr: rawptr) -> sce.Size --- sceClibMspaceMallocUsableSize :: proc(ptr: rawptr) -> sce.Size ---
MspaceIsHeapEmpty :: proc(mspace: SceClibMspace) -> sce.Bool --- sceClibMspaceIsHeapEmpty :: proc(mspace: SceClibMspace) -> sce.Bool ---
MspaceMallocStats :: proc(mspace: SceClibMspace, stats: ^SceClibMspaceStats) --- sceClibMspaceMallocStats :: proc(mspace: SceClibMspace, stats: ^SceClibMspaceStats) ---
MspaceMallocStatsFast :: proc(mspace: SceClibMspace, stats: ^SceClibMspaceStats) --- sceClibMspaceMallocStatsFast :: proc(mspace: SceClibMspace, stats: ^SceClibMspaceStats) ---
MspaceMalloc :: proc(mspace: SceClibMspace, size: sce.Size) -> rawptr --- sceClibMspaceMalloc :: proc(mspace: SceClibMspace, size: sce.Size) -> rawptr ---
MspaceCalloc :: proc(mspace: SceClibMspace, num: sce.Size , size: sce.Size) -> rawptr --- sceClibMspaceCalloc :: proc(mspace: SceClibMspace, num: sce.Size , size: sce.Size) -> rawptr ---
MspaceRealloc :: proc(mspace: SceClibMspace, ptr: rawptr, size: sce.Size) -> rawptr --- sceClibMspaceRealloc :: proc(mspace: SceClibMspace, ptr: rawptr, size: sce.Size) -> rawptr ---
MspaceReallocalign :: proc(mspace: SceClibMspace, ptr: rawptr, size: sce.Size, alignment: sce.Size) -> rawptr --- sceClibMspaceReallocalign :: proc(mspace: SceClibMspace, ptr: rawptr, size: sce.Size, alignment: sce.Size) -> rawptr ---
MspaceMemalign :: proc(mspace: SceClibMspace, alignment: sce.Size, size: sce.Size) -> rawptr --- sceClibMspaceMemalign :: proc(mspace: SceClibMspace, alignment: sce.Size, size: sce.Size) -> rawptr ---
MspaceFree :: proc(mspace: SceClibMspace, ptr: rawptr) --- sceClibMspaceFree :: proc(mspace: SceClibMspace, ptr: rawptr) ---
} }
+30 -32
View File
@@ -38,8 +38,6 @@ SceCtrlDataPsp :: struct {
} }
#assert(size_of(SceCtrlDataPsp) == 0x10) #assert(size_of(SceCtrlDataPsp) == 0x10)
@(link_prefix = "sceCompat")
foreign compat { foreign compat {
/** /**
* Init compat * Init compat
@@ -48,28 +46,28 @@ foreign compat {
* *
* @return 0 on success, < 0 on error. * @return 0 on success, < 0 on error.
*/ */
InitEx :: proc(unk: c.int) -> c.int --- sceCompatInitEx :: proc(unk: c.int) -> c.int ---
/** /**
* Uninit compat * Uninit compat
* *
* @return 0 on success, < 0 on error. * @return 0 on success, < 0 on error.
*/ */
Uninit :: proc() -> c.int --- sceCompatUninit :: proc() -> c.int ---
/** /**
* Start compat * Start compat
* *
* @return 0 on success, < 0 on error. * @return 0 on success, < 0 on error.
*/ */
Start :: proc() -> c.int --- sceCompatStart :: proc() -> c.int ---
/** /**
* Stop compat * Stop compat
* *
* @return 0 on success, < 0 on error. * @return 0 on success, < 0 on error.
*/ */
Stop :: proc() -> c.int --- sceCompatStop :: proc() -> c.int ---
/** /**
* Allocate cdram with hole * Allocate cdram with hole
@@ -78,7 +76,7 @@ foreign compat {
* *
* @return 0 on success, < 0 on error. * @return 0 on success, < 0 on error.
*/ */
AllocCdramWithHole :: proc(cdram: ^SceCompatCdram) -> c.int --- sceCompatAllocCdramWithHole :: proc(cdram: ^SceCompatCdram) -> c.int ---
/** /**
* Framebuffer init * Framebuffer init
@@ -87,7 +85,7 @@ foreign compat {
* *
* @return 0 on success, < 0 on error. * @return 0 on success, < 0 on error.
*/ */
FrameBufferInit :: proc(framebuffer: rawptr) -> c.int --- sceCompatFrameBufferInit :: proc(framebuffer: rawptr) -> c.int ---
/** /**
* Set suspend semaphores * Set suspend semaphores
@@ -97,7 +95,7 @@ foreign compat {
* *
* @return 0 on success, < 0 on error. * @return 0 on success, < 0 on error.
*/ */
SetSuspendSema :: proc(semaid1: sce.UID, semaid2: sce.UID) -> c.int --- sceCompatSetSuspendSema :: proc(semaid1: sce.UID, semaid2: sce.UID) -> c.int ---
/** /**
* Suspend/resume compat * Suspend/resume compat
@@ -106,7 +104,7 @@ foreign compat {
* *
* @return 0 on success, < 0 on error. * @return 0 on success, < 0 on error.
*/ */
SuspendResume :: proc(unk: c.int) -> c.int --- sceCompatSuspendResume :: proc(unk: c.int) -> c.int ---
/** /**
* Cache operation * Cache operation
@@ -117,7 +115,7 @@ foreign compat {
* *
* @return 0 on success, < 0 on error. * @return 0 on success, < 0 on error.
*/ */
Cache :: proc(mode: SceCompatCacheMode, addr: rawptr, size: sce.Size) -> c.int --- sceCompatCache :: proc(mode: SceCompatCacheMode, addr: rawptr, size: sce.Size) -> c.int ---
/** /**
* Wait for special request * Wait for special request
@@ -126,7 +124,7 @@ foreign compat {
* *
* @return 0 on success, < 0 on error. * @return 0 on success, < 0 on error.
*/ */
WaitSpecialRequest :: proc(unk: c.int) -> c.int --- sceCompatWaitSpecialRequest :: proc(unk: c.int) -> c.int ---
/** /**
* Interrupt code * Interrupt code
@@ -135,21 +133,21 @@ foreign compat {
* *
* @return 0 on success, < 0 on error. * @return 0 on success, < 0 on error.
*/ */
Interrupt :: proc(intr_code: c.int) -> c.int --- sceCompatInterrupt :: proc(intr_code: c.int) -> c.int ---
/** /**
* LCDC sync * LCDC sync
* *
* @return 0 on success, < 0 on error. * @return 0 on success, < 0 on error.
*/ */
LCDCSync :: proc() -> c.int --- sceCompatLCDCSync :: proc() -> c.int ---
/** /**
* Get primary head * Get primary head
* *
* @return 0 on success, < 0 on error. * @return 0 on success, < 0 on error.
*/ */
GetPrimaryHead :: proc() -> c.int --- sceCompatGetPrimaryHead :: proc() -> c.int ---
/** /**
* Get peripheral state * Get peripheral state
@@ -158,21 +156,21 @@ foreign compat {
* *
* @return state on success, < 0 on error. * @return state on success, < 0 on error.
*/ */
GetPeripheralState :: proc(mode: SceCompatPeripheralMode) -> c.int --- sceCompatGetPeripheralState :: proc(mode: SceCompatPeripheralMode) -> c.int ---
/** /**
* Get compat status * Get compat status
* *
* @return status on success, < 0 on error. * @return status on success, < 0 on error.
*/ */
GetStatus :: proc() -> c.int --- sceCompatGetStatus :: proc() -> c.int ---
/** /**
* Get update state * Get update state
* *
* @return state on success, < 0 on error. * @return state on success, < 0 on error.
*/ */
GetUpdateState :: proc() -> c.int --- sceCompatGetUpdateState :: proc() -> c.int ---
/** /**
* Set update state * Set update state
@@ -181,7 +179,7 @@ foreign compat {
* *
* @return 0 on success, < 0 on error. * @return 0 on success, < 0 on error.
*/ */
SetUpdateState :: proc(state: c.int) -> c.int --- sceCompatSetUpdateState :: proc(state: c.int) -> c.int ---
/** /**
* Set display config * Set display config
@@ -191,7 +189,7 @@ foreign compat {
* *
* @return 0 on success, < 0 on error. * @return 0 on success, < 0 on error.
*/ */
SetDisplayConfig :: proc(unk0: c.int, unk1: c.int) -> c.int --- sceCompatSetDisplayConfig :: proc(unk0: c.int, unk1: c.int) -> c.int ---
/** /**
* Set RIF name * Set RIF name
@@ -200,35 +198,35 @@ foreign compat {
* *
* @return 0 on success, < 0 on error. * @return 0 on success, < 0 on error.
*/ */
SetRif :: proc(rif: cstring) -> c.int --- sceCompatSetRif :: proc(rif: cstring) -> c.int ---
/** /**
* Get PSP system software version * Get PSP system software version
* *
* @return version on success, < 0 on error. * @return version on success, < 0 on error.
*/ */
GetPspSystemSoftwareVersion :: proc() -> c.int --- sceCompatGetPspSystemSoftwareVersion :: proc() -> c.int ---
/** /**
* Get color space setting availability * Get color space setting availability
* *
* @return 1 if true, 0 if false, < 0 on error. * @return 1 if true, 0 if false, < 0 on error.
*/ */
AvailableColorSpaceSetting :: proc() -> c.int --- sceCompatAvailableColorSpaceSetting :: proc() -> c.int ---
/** /**
* Check if pocket station application is available * Check if pocket station application is available
* *
* @return 1 if true, 0 if false, < 0 on error. * @return 1 if true, 0 if false, < 0 on error.
*/ */
CheckPocketStation :: proc() -> c.int --- sceCompatCheckPocketStation :: proc() -> c.int ---
/** /**
* Check if current title is a pocket station game * Check if current title is a pocket station game
* *
* @return 1 if true, 0 if false, < 0 on error. * @return 1 if true, 0 if false, < 0 on error.
*/ */
IsPocketStationTitle :: proc() -> c.int --- sceCompatIsPocketStationTitle :: proc() -> c.int ---
/** /**
* Wait for command and get request * Wait for command and get request
@@ -238,7 +236,7 @@ foreign compat {
* *
* @return pointer to request in PspEmu RAM on success, < 0 on error. * @return pointer to request in PspEmu RAM on success, < 0 on error.
*/ */
WaitAndGetRequest :: proc(mode: c.int, id: c.int) -> c.int --- sceCompatWaitAndGetRequest :: proc(mode: c.int, id: c.int) -> c.int ---
/** /**
* Read from shared sram * Read from shared sram
@@ -248,7 +246,7 @@ foreign compat {
* *
* @return 0 on success, < 0 on error. * @return 0 on success, < 0 on error.
*/ */
ReadShared32 :: proc(location: c.int, value: ^c.int) -> c.int --- sceCompatReadShared32 :: proc(location: c.int, value: ^c.int) -> c.int ---
/** /**
* Write to shared sram * Write to shared sram
@@ -258,7 +256,7 @@ foreign compat {
* *
* @return 0 on success, < 0 on error. * @return 0 on success, < 0 on error.
*/ */
WriteShared32 :: proc(location: c.int, value: c.int) -> c.int --- sceCompatWriteShared32 :: proc(location: c.int, value: c.int) -> c.int ---
/** /**
* Write shared control * Write shared control
@@ -267,7 +265,7 @@ foreign compat {
* *
* @return 0 on success, < 0 on error. * @return 0 on success, < 0 on error.
*/ */
WriteSharedCtrl :: proc(pad_data: ^SceCtrlDataPsp) -> c.int --- sceCompatWriteSharedCtrl :: proc(pad_data: ^SceCtrlDataPsp) -> c.int ---
/** /**
* Get title list * Get title list
@@ -277,7 +275,7 @@ foreign compat {
* *
* @return 0 on success, < 0 on error. * @return 0 on success, < 0 on error.
*/ */
GetTitleList :: proc(buf: rawptr, length: sce.Size) -> c.int --- sceCompatGetTitleList :: proc(buf: rawptr, length: sce.Size) -> c.int ---
/** /**
* Get Memory Card device information * Get Memory Card device information
@@ -286,7 +284,7 @@ foreign compat {
* *
* @return 0 on success, < 0 on error. * @return 0 on success, < 0 on error.
*/ */
GetDevInf :: proc(info: ^sceIo.SceIoDevInfo) -> c.int --- sceCompatGetDevInf :: proc(info: ^sceIo.SceIoDevInfo) -> c.int ---
/** /**
* Get current secure tick * Get current secure tick
@@ -295,5 +293,5 @@ foreign compat {
* *
* @return 0 on success, < 0 on error. * @return 0 on success, < 0 on error.
*/ */
GetCurrentSecureTick :: proc(tick: ^sce.RtcTick) -> c.int --- sceCompatGetCurrentSecureTick :: proc(tick: ^sce.RtcTick) -> c.int ---
} }
+18 -20
View File
@@ -6,7 +6,6 @@ import sce "../common"
foreign import ctrl "system:SceCtrl_stub" foreign import ctrl "system:SceCtrl_stub"
foreign import ctrlkern "system:SceCtrlForDriver_stub" foreign import ctrlkern "system:SceCtrlForDriver_stub"
@(link_prefix = "sceCtrl")
foreign ctrl { foreign ctrl {
/** /**
* Set the controller mode. * Set the controller mode.
@@ -275,7 +274,6 @@ foreign ctrl {
sceCtrlIsMultiControllerSupported :: proc() -> c.int --- sceCtrlIsMultiControllerSupported :: proc() -> c.int ---
} }
@(link_prefix = "ksceCtrl")
foreign ctrlkern { foreign ctrlkern {
/** /**
* Set the controller mode. * Set the controller mode.
@@ -284,7 +282,7 @@ foreign ctrlkern {
* *
* @return The previous mode, <0 on error. * @return The previous mode, <0 on error.
*/ */
SetSamplingMode :: proc(mode: c.int) -> c.int --- ksceCtrlSetSamplingMode :: proc(mode: c.int) -> c.int ---
/** /**
* Get the current controller mode. * Get the current controller mode.
@@ -293,7 +291,7 @@ foreign ctrlkern {
* *
* @return The current mode, <0 on error. * @return The current mode, <0 on error.
*/ */
GetSamplingMode :: proc(pMode: ^c.int) -> c.int --- ksceCtrlGetSamplingMode :: proc(pMode: ^c.int) -> c.int ---
/** /**
* Get the controller state information (polling, positive logic). * Get the controller state information (polling, positive logic).
@@ -304,7 +302,7 @@ foreign ctrlkern {
* *
* @return Buffers count, between 1 and 'count'. <0 on error. * @return Buffers count, between 1 and 'count'. <0 on error.
*/ */
PeekBufferPositive :: proc(port: c.int, pad_data: ^SceCtrlData, count: c.int) -> c.int --- ksceCtrlPeekBufferPositive :: proc(port: c.int, pad_data: ^SceCtrlData, count: c.int) -> c.int ---
/** /**
* Get the controller state information (polling, negative logic). * Get the controller state information (polling, negative logic).
@@ -315,7 +313,7 @@ foreign ctrlkern {
* *
* @return Buffers count, between 1 and 'count'. <0 on error. * @return Buffers count, between 1 and 'count'. <0 on error.
*/ */
PeekBufferNegative :: proc(port: c.int, pad_data: ^SceCtrlData, count: c.int) -> c.int --- ksceCtrlPeekBufferNegative :: proc(port: c.int, pad_data: ^SceCtrlData, count: c.int) -> c.int ---
/** /**
* Get the controller state information (blocking, positive logic). * Get the controller state information (blocking, positive logic).
@@ -326,7 +324,7 @@ foreign ctrlkern {
* *
* @return Buffers count, between 1 and 'count'. <0 on error. * @return Buffers count, between 1 and 'count'. <0 on error.
*/ */
ReadBufferPositive :: proc(port: c.int, pad_data: ^SceCtrlData, count: c.int) -> c.int --- ksceCtrlReadBufferPositive :: proc(port: c.int, pad_data: ^SceCtrlData, count: c.int) -> c.int ---
/** /**
* Get the controller state information (blocking, negative logic). * Get the controller state information (blocking, negative logic).
@@ -337,7 +335,7 @@ foreign ctrlkern {
* *
* @return Buffers count, between 1 and 'count'. <0 on error. * @return Buffers count, between 1 and 'count'. <0 on error.
*/ */
ReadBufferNegative :: proc(port: c.int, pad_data: ^SceCtrlData, count: c.int) -> c.int --- ksceCtrlReadBufferNegative :: proc(port: c.int, pad_data: ^SceCtrlData, count: c.int) -> c.int ---
/** /**
* Set rules for button rapid fire * Set rules for button rapid fire
@@ -348,7 +346,7 @@ foreign ctrlkern {
* *
* @return 0, <0 on error. * @return 0, <0 on error.
*/ */
SetRapidFire :: proc(port: c.int, idx: c.int, #by_ptr pRule: SceCtrlRapidFireRule) -> c.int --- ksceCtrlSetRapidFire :: proc(port: c.int, idx: c.int, #by_ptr pRule: SceCtrlRapidFireRule) -> c.int ---
/** /**
* Clear rules for button rapid fire * Clear rules for button rapid fire
@@ -358,7 +356,7 @@ foreign ctrlkern {
* *
* @return 0, <0 on error. * @return 0, <0 on error.
*/ */
ClearRapidFire :: proc(port: c.int, idx: c.int) -> c.int --- ksceCtrlClearRapidFire :: proc(port: c.int, idx: c.int) -> c.int ---
/** /**
* Get controller port information. * Get controller port information.
@@ -366,7 +364,7 @@ foreign ctrlkern {
* @param[out] info - see ::SceCtrlPortInfo * @param[out] info - see ::SceCtrlPortInfo
* @return 0, <0 on error * @return 0, <0 on error
*/ */
GetControllerPortInfo :: proc(info: ^SceCtrlPortInfo) -> c.int --- ksceCtrlGetControllerPortInfo :: proc(info: ^SceCtrlPortInfo) -> c.int ---
/** /**
* Sets intercept * Sets intercept
@@ -378,7 +376,7 @@ foreign ctrlkern {
* *
* @return 0, < 0 on error * @return 0, < 0 on error
*/ */
SetButtonIntercept :: proc(intercept: c.int) -> c.int --- ksceCtrlSetButtonIntercept :: proc(intercept: c.int) -> c.int ---
/** /**
* Gets intercept * Gets intercept
@@ -387,7 +385,7 @@ foreign ctrlkern {
* *
* @return 0, < 0 on error * @return 0, < 0 on error
*/ */
GetButtonIntercept :: proc(intercept: ^c.int) -> c.int --- ksceCtrlGetButtonIntercept :: proc(intercept: ^c.int) -> c.int ---
/** /**
* Emulate buttons for the digital pad. * Emulate buttons for the digital pad.
@@ -404,7 +402,7 @@ foreign ctrlkern {
* *
* @return 0 on success. * @return 0 on success.
*/ */
SetButtonEmulation :: proc(port: c.uint, slot: c.uchar, userButtons: c.uint, kernelButtons: c.uint, uiMake: c.uint) -> c.int --- ksceCtrlSetButtonEmulation :: proc(port: c.uint, slot: c.uchar, userButtons: c.uint, kernelButtons: c.uint, uiMake: c.uint) -> c.int ---
/** /**
* Emulate values for the analog pad's X- and Y-axis. * Emulate values for the analog pad's X- and Y-axis.
@@ -424,7 +422,7 @@ foreign ctrlkern {
* *
* @return 0 on success. * @return 0 on success.
*/ */
SetAnalogEmulation :: proc(port: c.uint, slot: c.uchar, user_lX: c.uchar, user_lY: c.uchar, user_rX: c.uchar, user_rY: c.uchar, kernel_lX: c.uchar, kernel_lY: c.uchar, kernel_rX: c.uchar, kernel_rY: c.uchar, uiMake: c.uint) -> c.int --- ksceCtrlSetAnalogEmulation :: proc(port: c.uint, slot: c.uchar, user_lX: c.uchar, user_lY: c.uchar, user_rX: c.uchar, user_rY: c.uchar, kernel_lX: c.uchar, kernel_lY: c.uchar, kernel_rX: c.uchar, kernel_rY: c.uchar, uiMake: c.uint) -> c.int ---
/** /**
* Register virtual controller driver. * Register virtual controller driver.
@@ -435,7 +433,7 @@ foreign ctrlkern {
* *
* @return 0 on success. <0 on error * @return 0 on success. <0 on error
*/ */
RegisterVirtualControllerDriver :: proc(driver: ^SceCtrlVirtualControllerDriver) -> c.int --- ksceCtrlRegisterVirtualControllerDriver :: proc(driver: ^SceCtrlVirtualControllerDriver) -> c.int ---
/** /**
* Update ctrl mask for non shell process * Update ctrl mask for non shell process
@@ -447,7 +445,7 @@ foreign ctrlkern {
* *
* note - Some values cannot be clear/set. * note - Some values cannot be clear/set.
*/ */
UpdateMaskForNonShell :: proc(clear_mask: c.int, set_mask: c.int) -> c.int --- ksceCtrlUpdateMaskForNonShell :: proc(clear_mask: c.int, set_mask: c.int) -> c.int ---
/** /**
* Update ctrl mask for all process * Update ctrl mask for all process
@@ -459,7 +457,7 @@ foreign ctrlkern {
* *
* note - Some values cannot be clear/set. * note - Some values cannot be clear/set.
*/ */
UpdateMaskForAll :: proc(clear_mask: c.int, set_mask: c.int) -> c.int --- ksceCtrlUpdateMaskForAll :: proc(clear_mask: c.int, set_mask: c.int) -> c.int ---
/** /**
* Get ctrl mask for non shell process * Get ctrl mask for non shell process
@@ -468,7 +466,7 @@ foreign ctrlkern {
* *
* @return 0 on success. < 0 on error. * @return 0 on success. < 0 on error.
*/ */
GetMaskForNonShell :: proc(mask: ^c.uint32_t) -> c.int --- ksceCtrlGetMaskForNonShell :: proc(mask: ^c.uint32_t) -> c.int ---
/** /**
* Get ctrl mask for all process * Get ctrl mask for all process
@@ -477,5 +475,5 @@ foreign ctrlkern {
* *
* @return 0 on success. < 0 on error. * @return 0 on success. < 0 on error.
*/ */
GetMaskForAll :: proc(mask: ^c.uint32_t) -> c.int --- ksceCtrlGetMaskForAll :: proc(mask: ^c.uint32_t) -> c.int ---
} }
+8 -9
View File
@@ -4,14 +4,13 @@ import sce "../common"
foreign import deci4p "system:SceDeci4pUserp_stub" foreign import deci4p "system:SceDeci4pUserp_stub"
@(link_prefix="sceKernelDeci4p")
foreign deci4p { foreign deci4p {
Open :: proc(protoname: cstring, protonum: sce.UInt32, bufsize: sce.Size) -> sce.UID --- sceKernelDeci4pOpen :: proc(protoname: cstring, protonum: sce.UInt32, bufsize: sce.Size) -> sce.UID ---
Close :: proc(socketid: sce.UID) -> sce.Int32 --- sceKernelDeci4pClose :: proc(socketid: sce.UID) -> sce.Int32 ---
DisableWatchpoint :: proc() -> sce.Int32 --- sceKernelDeci4pDisableWatchpoint :: proc() -> sce.Int32 ---
EnableWatchpoint :: proc() -> sce.Int32 --- sceKernelDeci4pEnableWatchpoint :: proc() -> sce.Int32 ---
IsProcessAttached :: proc() -> sce.Int32 --- sceKernelDeci4pIsProcessAttached :: proc() -> sce.Int32 ---
Read :: proc(socketid: sce.UID, buffer: rawptr, size: sce.Size, reserved: sce.UInt32) -> sce.Int32 --- sceKernelDeci4pRead :: proc(socketid: sce.UID, buffer: rawptr, size: sce.Size, reserved: sce.UInt32) -> sce.Int32 ---
RegisterCallback :: proc(socketid: sce.UID, cbid: sce.UID) -> sce.Int32 --- sceKernelDeci4pRegisterCallback :: proc(socketid: sce.UID, cbid: sce.UID) -> sce.Int32 ---
Write :: proc(socketid: sce.UID, buffer: rawptr, size: sce.Size, reserved: sce.UInt32) -> sce.Int32 --- sceKernelDeci4pWrite :: proc(socketid: sce.UID, buffer: rawptr, size: sce.Size, reserved: sce.UInt32) -> sce.Int32 ---
} }
+17 -18
View File
@@ -6,7 +6,6 @@ import sce "../common"
foreign import _display "system:SceDisplay_stub" foreign import _display "system:SceDisplay_stub"
foreign import displaykern "system:SceDisplayForDriver_stub" foreign import displaykern "system:SceDisplayForDriver_stub"
@(link_prefix = "sceDisplay")
foreign _display { foreign _display {
/** /**
* Set/Update framebuffer parameters * Set/Update framebuffer parameters
@@ -17,7 +16,7 @@ foreign _display {
* @return 0 on success, < 0 on error. * @return 0 on success, < 0 on error.
* @note - If NULL is provided as pParam pointer, output is blacked out. * @note - If NULL is provided as pParam pointer, output is blacked out.
*/ */
SetFrameBuf :: proc(pParam: ^SceDisplayFrameBuf, sync: SceDisplaySetBufSync) -> c.int --- sceDisplaySetFrameBuf :: proc(pParam: ^SceDisplayFrameBuf, sync: SceDisplaySetBufSync) -> c.int ---
/** /**
* Get current framebuffer parameters * Get current framebuffer parameters
@@ -29,12 +28,12 @@ foreign _display {
* *
* @return 0 on success, < 0 on error. * @return 0 on success, < 0 on error.
*/ */
GetFrameBuf :: proc(pParam: ^SceDisplayFrameBuf, sync: SceDisplaySetBufSync) -> c.int --- sceDisplayGetFrameBuf :: proc(pParam: ^SceDisplayFrameBuf, sync: SceDisplaySetBufSync) -> c.int ---
/** /**
* Primary display index * Primary display index
*/ */
GetPrimaryHead :: proc() -> c.int --- sceDisplayGetPrimaryHead :: proc() -> c.int ---
/** /**
* Get current number of fps for the current screen mode. * Get current number of fps for the current screen mode.
@@ -44,7 +43,7 @@ foreign _display {
* @return 0 on success, < 0 on error. * @return 0 on success, < 0 on error.
* @note - This function returns a theoretical value, this might not be the exact frame rate. * @note - This function returns a theoretical value, this might not be the exact frame rate.
*/ */
GetRefreshRate :: proc(pFps: ^c.float) -> c.int --- sceDisplayGetRefreshRate :: proc(pFps: ^c.float) -> c.int ---
/** /**
* Get maximum framebuffer resolution * Get maximum framebuffer resolution
@@ -54,53 +53,53 @@ foreign _display {
* *
* @return 0 on success, < 0 on error. * @return 0 on success, < 0 on error.
*/ */
GetMaximumFrameBufResolution :: proc(width: ^c.int, height: ^c.int) -> c.int --- sceDisplayGetMaximumFrameBufResolution :: proc(width: ^c.int, height: ^c.int) -> c.int ---
/** /**
* Number of vertical blank pulses up to now * Number of vertical blank pulses up to now
*/ */
GetVcount :: proc() -> c.int --- sceDisplayGetVcount :: proc() -> c.int ---
/** /**
* Number of vertical blank pulses up to now for a display * Number of vertical blank pulses up to now for a display
* *
* @param[in] display - Display index * @param[in] display - Display index
*/ */
GetVcountInternal :: proc(display: c.int) -> c.int --- sceDisplayGetVcountInternal :: proc(display: c.int) -> c.int ---
/** /**
* Wait for vertical blank start * Wait for vertical blank start
*/ */
WaitVblankStart :: proc() -> c.int --- sceDisplayWaitVblankStart :: proc() -> c.int ---
/** /**
* Wait for vertical blank start with callback * Wait for vertical blank start with callback
*/ */
WaitVblankStartCB :: proc() -> c.int --- sceDisplayWaitVblankStartCB :: proc() -> c.int ---
/** /**
* Wait for vertical blank start after specified number of vertical periods * Wait for vertical blank start after specified number of vertical periods
* *
* @param[in] vcount - Number of vertical periods before waiting for vertical blank start * @param[in] vcount - Number of vertical periods before waiting for vertical blank start
*/ */
WaitVblankStartMulti :: proc(vcount: c.uint) -> c.int --- sceDisplayWaitVblankStartMulti :: proc(vcount: c.uint) -> c.int ---
/** /**
* Wait for vertical blank start with callback after specified number of vertical periods * Wait for vertical blank start with callback after specified number of vertical periods
* *
* @param[in] vcount - Number of vertical periods before waiting for vertical blank start * @param[in] vcount - Number of vertical periods before waiting for vertical blank start
*/ */
WaitVblankStartMultiCB :: proc(vcount: c.uint) -> c.int --- sceDisplayWaitVblankStartMultiCB :: proc(vcount: c.uint) -> c.int ---
/** /**
* Wait for vertical blank start since last update of framebuffer * Wait for vertical blank start since last update of framebuffer
*/ */
WaitSetFrameBuf :: proc() -> c.int --- sceDisplayWaitSetFrameBuf :: proc() -> c.int ---
/** /**
* Wait for vertical blank start with callback since last update of framebuffer * Wait for vertical blank start with callback since last update of framebuffer
*/ */
WaitSetFrameBufCB :: proc() -> c.int --- sceDisplayWaitSetFrameBufCB :: proc() -> c.int ---
/** /**
* Wait for vertical blank start after specified number of vertical periods * Wait for vertical blank start after specified number of vertical periods
@@ -108,7 +107,7 @@ foreign _display {
* *
* @param[in] vcount - Number of vertical periods before waiting for vertical blank start * @param[in] vcount - Number of vertical periods before waiting for vertical blank start
*/ */
WaitSetFrameBufMulti :: proc(vcount: c.uint) -> c.int --- sceDisplayWaitSetFrameBufMulti :: proc(vcount: c.uint) -> c.int ---
/** /**
* Wait for vertical blank start with callback after specified number of vertical periods * Wait for vertical blank start with callback after specified number of vertical periods
@@ -116,21 +115,21 @@ foreign _display {
* *
* @param[in] vcount - Number of vertical periods before waiting for vertical blank start * @param[in] vcount - Number of vertical periods before waiting for vertical blank start
*/ */
WaitSetFrameBufMultiCB :: proc(vcount: c.uint) -> c.int --- sceDisplayWaitSetFrameBufMultiCB :: proc(vcount: c.uint) -> c.int ---
/** /**
* Register callback to be used at each vertical blank start * Register callback to be used at each vertical blank start
* *
* @param[in] uid - Callback UID * @param[in] uid - Callback UID
*/ */
RegisterVblankStartCallback :: proc(uid: sce.UID) -> c.int --- sceDisplayRegisterVblankStartCallback :: proc(uid: sce.UID) -> c.int ---
/** /**
* Unregister callback used at each vertical blank start * Unregister callback used at each vertical blank start
* *
* @param[in] uid - Callback UID * @param[in] uid - Callback UID
*/ */
UnregisterVblankStartCallback :: proc(uid: sce.UID) -> c.int --- sceDisplayUnregisterVblankStartCallback :: proc(uid: sce.UID) -> c.int ---
} }
foreign displaykern { foreign displaykern {
+9 -11
View File
@@ -7,7 +7,6 @@ import "base:intrinsics"
foreign import dmac "system:SceKernelDmacMgr_stub" foreign import dmac "system:SceKernelDmacMgr_stub"
foreign import dmac5 "system:SceSblSsMgr_stub" foreign import dmac5 "system:SceSblSsMgr_stub"
@(link_prefix = "sceDmac")
foreign dmac { foreign dmac {
/** /**
* DMA memcpy * DMA memcpy
@@ -18,7 +17,7 @@ foreign dmac {
* *
* @return < 0 on error. * @return < 0 on error.
*/ */
Memcpy :: proc(dst: rawptr, src: rawptr, size: sce.Size) -> c.int --- sceDmacMemcpy :: proc(dst: rawptr, src: rawptr, size: sce.Size) -> c.int ---
/** /**
* DMA memset * DMA memset
@@ -29,13 +28,13 @@ foreign dmac {
* *
* @return < 0 on error. * @return < 0 on error.
*/ */
Memset :: proc(dst: rawptr, ch: c.int, size: sce.Size) -> c.int --- sceDmacMemset :: proc(dst: rawptr, ch: c.int, size: sce.Size) -> c.int ---
} }
AesCbcEnc :: #force_inline proc(src: rawptr, dst: rawptr, length: sce.Size, key: rawptr, keysize: sce.Size, iv: rawptr) -> c.int { AesCbcEnc :: #force_inline proc(src: rawptr, dst: rawptr, length: sce.Size, key: rawptr, keysize: sce.Size, iv: rawptr) -> c.int {
param := SceSblDmac5EncDecParam{src = src, dst = dst, length = length, key = key, keysize = keysize, iv = iv} param := SceSblDmac5EncDecParam{src = src, dst = dst, length = length, key = key, keysize = keysize, iv = iv}
return EncDec( return sceSblDmac5EncDec(
&param, &param,
1 | 8 | (((auto_cast keysize << 2) - 0x100) & 0x300) 1 | 8 | (((auto_cast keysize << 2) - 0x100) & 0x300)
) )
@@ -44,7 +43,7 @@ AesCbcEnc :: #force_inline proc(src: rawptr, dst: rawptr, length: sce.Size, key:
AesCbcDec :: #force_inline proc(src: rawptr, dst: rawptr, length: sce.Size, key: rawptr, keysize: sce.Size, iv: rawptr) -> c.int { AesCbcDec :: #force_inline proc(src: rawptr, dst: rawptr, length: sce.Size, key: rawptr, keysize: sce.Size, iv: rawptr) -> c.int {
param := SceSblDmac5EncDecParam{src = src, dst = dst, length = length, key = key, keysize = keysize, iv = iv} param := SceSblDmac5EncDecParam{src = src, dst = dst, length = length, key = key, keysize = keysize, iv = iv}
return EncDec( return sceSblDmac5EncDec(
&param, &param,
2 | 8 | (((auto_cast keysize << 2) - 0x100) & 0x300) 2 | 8 | (((auto_cast keysize << 2) - 0x100) & 0x300)
) )
@@ -53,7 +52,7 @@ AesCbcDec :: #force_inline proc(src: rawptr, dst: rawptr, length: sce.Size, key:
AesCtrEnc :: #force_inline proc(src: rawptr, dst: rawptr, length: sce.Size, key: rawptr, keysize: sce.Size, iv: rawptr) -> c.int { AesCtrEnc :: #force_inline proc(src: rawptr, dst: rawptr, length: sce.Size, key: rawptr, keysize: sce.Size, iv: rawptr) -> c.int {
param := SceSblDmac5EncDecParam{src = src, dst = dst, length = length, key = key, keysize = keysize, iv = iv} param := SceSblDmac5EncDecParam{src = src, dst = dst, length = length, key = key, keysize = keysize, iv = iv}
return EncDec( return sceSblDmac5EncDec(
&param, &param,
1 | 0x20 | (((auto_cast keysize << 2) - 0x100) & 0x300) 1 | 0x20 | (((auto_cast keysize << 2) - 0x100) & 0x300)
) )
@@ -62,7 +61,7 @@ AesCtrEnc :: #force_inline proc(src: rawptr, dst: rawptr, length: sce.Size, key:
AesCtrDec :: #force_inline proc(src: rawptr, dst: rawptr, length: sce.Size, key: rawptr, keysize: sce.Size, iv: rawptr) -> c.int { AesCtrDec :: #force_inline proc(src: rawptr, dst: rawptr, length: sce.Size, key: rawptr, keysize: sce.Size, iv: rawptr) -> c.int {
param := SceSblDmac5EncDecParam{src = src, dst = dst, length = length, key = key, keysize = keysize, iv = iv} param := SceSblDmac5EncDecParam{src = src, dst = dst, length = length, key = key, keysize = keysize, iv = iv}
return EncDec( return sceSblDmac5EncDec(
&param, &param,
2 | 0x20 | (((auto_cast keysize << 2) - 0x100) & 0x300) 2 | 0x20 | (((auto_cast keysize << 2) - 0x100) & 0x300)
) )
@@ -82,13 +81,12 @@ Sha256Digest :: #force_inline proc(src: rawptr, dst: rawptr, length: sce.Size) -
ctx.state[7] = auto_cast intrinsics.byte_swap(u32(0x5be0cd19)) ctx.state[7] = auto_cast intrinsics.byte_swap(u32(0x5be0cd19))
ctx.length = 0 ctx.length = 0
return HashTransform( return sceSblDmac5HashTransform(
&param, &param,
3 | 0x10, 0x800 3 | 0x10, 0x800
) )
} }
@(link_prefix = "sceSblDmac5")
foreign dmac5 { foreign dmac5 {
/** /**
* @brief Execute DMAC5 encdec command * @brief Execute DMAC5 encdec command
@@ -98,7 +96,7 @@ foreign dmac5 {
* *
* @return 0 on success, else < 0. * @return 0 on success, else < 0.
*/ */
EncDec :: proc(param: ^SceSblDmac5EncDecParam, command: sce.UInt32) -> c.int --- sceSblDmac5EncDec :: proc(param: ^SceSblDmac5EncDecParam, command: sce.UInt32) -> c.int ---
/** /**
@@ -110,5 +108,5 @@ foreign dmac5 {
* *
* @return 0 on success, else < 0. * @return 0 on success, else < 0.
*/ */
HashTransform :: proc(param: ^SceSblDmac5HashTransformParam, command: sce.UInt32, extra: sce.UInt32) -> c.int --- sceSblDmac5HashTransform :: proc(param: ^SceSblDmac5HashTransformParam, command: sce.UInt32, extra: sce.UInt32) -> c.int ---
} }
+11 -12
View File
@@ -16,17 +16,16 @@ SceDsiHead :: enum c.int {
HDMI = 1, HDMI = 1,
} }
@(link_prefix = "ksceDsi")
foreign dsi { foreign dsi {
EnableHead :: proc(head: c.int) -> c.int --- ksceDsiEnableHead :: proc(head: c.int) -> c.int ---
DisableHead :: proc(head: c.int) -> c.int --- ksceDsiDisableHead :: proc(head: c.int) -> c.int ---
SendBlankingPacket :: proc(head: c.int) -> c.int --- ksceDsiSendBlankingPacket :: proc(head: c.int) -> c.int ---
SetLanesAndPixelSize :: proc(head: c.int, lanes: c.int, pixelsize: c.int) -> c.int --- ksceDsiSetLanesAndPixelSize :: proc(head: c.int, lanes: c.int, pixelsize: c.int) -> c.int ---
SetVic :: proc(head: c.int, vic: c.int) -> c.int --- ksceDsiSetVic :: proc(head: c.int, vic: c.int) -> c.int ---
GetVicResolution :: proc(vic: c.int, width: ^c.int, height: ^c.int) -> c.int --- ksceDsiGetVicResolution :: proc(vic: c.int, width: ^c.int, height: ^c.int) -> c.int ---
GetPixelClock :: proc(head: c.int) -> c.int --- ksceDsiGetPixelClock :: proc(head: c.int) -> c.int ---
GenericShortWrite :: proc(head: c.int, param0: c.int, param1: c.int, param2: c.int) -> c.int --- ksceDsiGenericShortWrite :: proc(head: c.int, param0: c.int, param1: c.int, param2: c.int) -> c.int ---
GenericReadRequest :: proc(head: c.int, param: c.int, buff: rawptr, size: c.uint) -> c.int --- ksceDsiGenericReadRequest :: proc(head: c.int, param: c.int, buff: rawptr, size: c.uint) -> c.int ---
DcsShortWrite :: proc(head: c.int, param0: c.ushort, param1: c.int) -> c.int --- ksceDsiDcsShortWrite :: proc(head: c.int, param0: c.ushort, param1: c.int) -> c.int ---
DcsRead :: proc(head: c.int, param: c.ushort, buff: rawptr, size: c.uint) -> c.int --- ksceDsiDcsRead :: proc(head: c.int, param: c.ushort, buff: rawptr, size: c.uint) -> c.int ---
} }
+8 -10
View File
@@ -5,10 +5,8 @@ import sce "../common"
foreign import _fiber "system:SceFiber_stub" foreign import _fiber "system:SceFiber_stub"
@(link_prefix = "sceFiber")
foreign _fiber { foreign _fiber {
@(link_name = "_sceFiberInitializeImpl") _sceFiberInitializeImpl :: proc(
InitializeImpl :: proc(
fiber: ^SceFiber, fiber: ^SceFiber,
name: cstring, name: cstring,
entry: ^SceFiberEntry, entry: ^SceFiberEntry,
@@ -16,12 +14,12 @@ foreign _fiber {
addrContext: rawptr, addrContext: rawptr,
sizeContext: sce.Size, sizeContext: sce.Size,
params: ^SceFiberOptParam) -> sce.Int32 --- params: ^SceFiberOptParam) -> sce.Int32 ---
OptParamInitialize :: proc(optParam: ^SceFiberOptParam) -> sce.Int32 --- sceFiberOptParamInitialize :: proc(optParam: ^SceFiberOptParam) -> sce.Int32 ---
Finalize :: proc(fiber: ^SceFiber) -> sce.Int32 --- sceFiberFinalize :: proc(fiber: ^SceFiber) -> sce.Int32 ---
Run :: proc(fiber: ^SceFiber, argOnRunTo: sce.UInt32, argOnRun: ^sce.UInt32) -> sce.Int32 --- sceFiberRun :: proc(fiber: ^SceFiber, argOnRunTo: sce.UInt32, argOnRun: ^sce.UInt32) -> sce.Int32 ---
Switch :: proc(fiber: ^SceFiber, argOnRunTo: sce.UInt32, argOnRun: ^sce.UInt32) -> sce.Int32 --- sceFiberSwitch :: proc(fiber: ^SceFiber, argOnRunTo: sce.UInt32, argOnRun: ^sce.UInt32) -> sce.Int32 ---
GetSelf :: proc(fiber: SceFiber) -> sce.Int32 --- sceFiberGetSelf :: proc(fiber: SceFiber) -> sce.Int32 ---
ReturnToThread :: proc(argOnReturn: sce.UInt32, argOnRun: ^sce.UInt32) -> sce.Int32 --- sceFiberReturnToThread :: proc(argOnReturn: sce.UInt32, argOnRun: ^sce.UInt32) -> sce.Int32 ---
GetInfo :: proc(fiber: ^SceFiber, fiberInfo: ^SceFiberInfo) -> sce.Int32 --- sceFiberGetInfo :: proc(fiber: ^SceFiber, fiberInfo: ^SceFiberInfo) -> sce.Int32 ---
} }
+21 -23
View File
@@ -6,35 +6,33 @@ import sce "../common"
foreign import fios2 "system:SceFios2Kernel_stub" foreign import fios2 "system:SceFios2Kernel_stub"
foreign import fios2kern "system:SceFios2KernelForDriver_stub" foreign import fios2kern "system:SceFios2KernelForDriver_stub"
@(link_prefix = "_sceFiosKernelOverlay")
foreign fios2 { foreign fios2 {
Add :: proc(overlay: ^SceFiosKernelOverlay, out_id: ^SceFiosKernelOverlayID) -> c.int --- _sceFiosKernelOverlayAdd :: proc(overlay: ^SceFiosKernelOverlay, out_id: ^SceFiosKernelOverlayID) -> c.int ---
AddForProcess :: proc(target_process: sce.UID, overlay: ^SceFiosKernelOverlay, out_id: ^SceFiosKernelOverlayID) -> c.int --- _sceFiosKernelOverlayAddForProcess :: proc(target_process: sce.UID, overlay: ^SceFiosKernelOverlay, out_id: ^SceFiosKernelOverlayID) -> c.int ---
DHChstatSync :: proc(dh: SceFiosKernelOverlayDH, new_stat: ^SceFiosNativeStat, cbit: c.uint) -> c.int --- _sceFiosKernelOverlayDHChstatSync :: proc(dh: SceFiosKernelOverlayDH, new_stat: ^SceFiosNativeStat, cbit: c.uint) -> c.int ---
DHCloseSync :: proc(dh: SceFiosKernelOverlayDH) -> c.int --- _sceFiosKernelOverlayDHCloseSync :: proc(dh: SceFiosKernelOverlayDH) -> c.int ---
DHOpenSync :: proc(out_dh: ^SceFiosKernelOverlayDH, path: cstring, from_order: sce.UInt8, args: ^SceFiosDHOpenSyncSyscallArgs) -> c.int --- _sceFiosKernelOverlayDHOpenSync :: proc(out_dh: ^SceFiosKernelOverlayDH, path: cstring, from_order: sce.UInt8, args: ^SceFiosDHOpenSyncSyscallArgs) -> c.int ---
DHReadSync :: proc(dh: SceFiosKernelOverlayDH, out_entry: ^SceFiosNativeDirEntry) -> c.int --- _sceFiosKernelOverlayDHReadSync :: proc(dh: SceFiosKernelOverlayDH, out_entry: ^SceFiosNativeDirEntry) -> c.int ---
DHStatSync :: proc(dh: SceFiosKernelOverlayDH, out_stat: ^SceFiosNativeStat) -> c.int --- _sceFiosKernelOverlayDHStatSync :: proc(dh: SceFiosKernelOverlayDH, out_stat: ^SceFiosNativeStat) -> c.int ---
DHSyncSync :: proc(dh: SceFiosKernelOverlayDH, flag: c.int) -> c.int --- _sceFiosKernelOverlayDHSyncSync :: proc(dh: SceFiosKernelOverlayDH, flag: c.int) -> c.int ---
GetInfo :: proc(id: SceFiosKernelOverlayID, out_overlay: ^SceFiosKernelOverlay) -> c.int --- _sceFiosKernelOverlayGetInfo :: proc(id: SceFiosKernelOverlayID, out_overlay: ^SceFiosKernelOverlay) -> c.int ---
GetInfoForProcess :: proc(target_process: sce.UID, id: SceFiosKernelOverlayID, out_overlay: ^SceFiosKernelOverlay) -> c.int --- _sceFiosKernelOverlayGetInfoForProcess :: proc(target_process: sce.UID, id: SceFiosKernelOverlayID, out_overlay: ^SceFiosKernelOverlay) -> c.int ---
GetList :: proc(pid: sce.UID, min_order: sce.UInt8, max_order: sce.UInt8, args: ^SceFiosGetListSyscallArgs) -> c.int --- _sceFiosKernelOverlayGetList :: proc(pid: sce.UID, min_order: sce.UInt8, max_order: sce.UInt8, args: ^SceFiosGetListSyscallArgs) -> c.int ---
GetRecommendedScheduler :: proc(avail: c.int, partially_resolved_path: cstring, a3: ^sce.UInt64) -> c.int --- _sceFiosKernelOverlayGetRecommendedScheduler :: proc(avail: c.int, partially_resolved_path: cstring, a3: ^sce.UInt64) -> c.int ---
Modify :: proc(id: SceFiosKernelOverlayID, new_value: ^SceFiosKernelOverlay) -> c.int --- _sceFiosKernelOverlayModify :: proc(id: SceFiosKernelOverlayID, new_value: ^SceFiosKernelOverlay) -> c.int ---
ModifyForProcess :: proc(target_process: sce.UID, id: SceFiosKernelOverlayID, new_value: ^SceFiosKernelOverlay) -> c.int --- _sceFiosKernelOverlayModifyForProcess :: proc(target_process: sce.UID, id: SceFiosKernelOverlayID, new_value: ^SceFiosKernelOverlay) -> c.int ---
Remove :: proc(id: SceFiosKernelOverlayID) -> c.int --- _sceFiosKernelOverlayRemove :: proc(id: SceFiosKernelOverlayID) -> c.int ---
RemoveForProcess :: proc(target_process: sce.UID, id: SceFiosKernelOverlayID) -> c.int --- _sceFiosKernelOverlayRemoveForProcess :: proc(target_process: sce.UID, id: SceFiosKernelOverlayID) -> c.int ---
ResolveSync :: proc(pid: sce.UID, resolve_flag: c.int, in_path: cstring, args: ^SceFiosResolveSyncSyscallArgs) -> c.int --- _sceFiosKernelOverlayResolveSync :: proc(pid: sce.UID, resolve_flag: c.int, in_path: cstring, args: ^SceFiosResolveSyncSyscallArgs) -> c.int ---
ResolveWithRangeSync :: proc(pid: sce.UID, resolve_flag: c.int, in_path: cstring, args: ^SceFiosResolveWithRangeSyncSyscallArgs) -> c.int --- _sceFiosKernelOverlayResolveWithRangeSync :: proc(pid: sce.UID, resolve_flag: c.int, in_path: cstring, args: ^SceFiosResolveWithRangeSyncSyscallArgs) -> c.int ---
ThreadIsDisabled :: proc() -> c.int --- _sceFiosKernelOverlayThreadIsDisabled :: proc() -> c.int ---
ThreadSetDisabled :: proc(disabled: sce.Int32) -> c.int --- _sceFiosKernelOverlayThreadSetDisabled :: proc(disabled: sce.Int32) -> c.int ---
@(link_name = "sceFiosKernelOverlayAddForProcess02") sceFiosKernelOverlayAddForProcess02 :: proc(pid: sce.UID, overlay: ^SceFiosOverlay, outID: ^SceFiosOverlayID) -> c.int ---
AddForProcess02 :: proc(pid: sce.UID, overlay: ^SceFiosOverlay, outID: ^SceFiosOverlayID) -> c.int ---
} }
foreign fios2kern { foreign fios2kern {
+10 -11
View File
@@ -20,16 +20,15 @@ SceGpioPortMode :: enum c.int {
INPUT = 1, INPUT = 1,
} }
@(link_prefix = "ksceGpio")
foreign gpio { foreign gpio {
PortRead :: proc(bus: c.int, port: c.int) -> c.int --- ksceGpioPortRead :: proc(bus: c.int, port: c.int) -> c.int ---
PortSet :: proc(bus: c.int, port: c.int) -> c.int --- ksceGpioPortSet :: proc(bus: c.int, port: c.int) -> c.int ---
PortClear :: proc(bus: c.int, port: c.int) -> c.int --- ksceGpioPortClear :: proc(bus: c.int, port: c.int) -> c.int ---
PortReset :: proc(bus: c.int, port: c.int) -> c.int --- ksceGpioPortReset :: proc(bus: c.int, port: c.int) -> c.int ---
SetPortMode :: proc(bus: c.int, port: c.int, mode: c.int) -> c.int --- ksceGpioSetPortMode :: proc(bus: c.int, port: c.int, mode: c.int) -> c.int ---
GetPortMode :: proc(bus: c.int, port: c.int) -> c.int --- ksceGpioGetPortMode :: proc(bus: c.int, port: c.int) -> c.int ---
SetIntrMode :: proc(bus: c.int, port: c.int, intr_mode: c.int) -> c.int --- ksceGpioSetIntrMode :: proc(bus: c.int, port: c.int, intr_mode: c.int) -> c.int ---
GetIntrMode :: proc(bus: c.int, port: c.int) -> c.int --- ksceGpioGetIntrMode :: proc(bus: c.int, port: c.int) -> c.int ---
AcquireIntr :: proc(bus: c.int, port: c.int) -> c.int --- ksceGpioAcquireIntr :: proc(bus: c.int, port: c.int) -> c.int ---
QueryIntr :: proc(bus: c.int, port: c.int) -> c.int --- ksceGpioQueryIntr :: proc(bus: c.int, port: c.int) -> c.int ---
} }
+11 -12
View File
@@ -11,17 +11,16 @@ SceGpsSatelliteData :: struct{}
SceGpsPositionData :: struct{} SceGpsPositionData :: struct{}
SceGpsStatus :: struct{} SceGpsStatus :: struct{}
@(link_prefix = "_sceGps")
foreign gps { foreign gps {
Close :: proc() -> c.int --- _sceGpsClose :: proc() -> c.int ---
GetData :: proc(pos: ^SceGpsPositionData, sat: ^SceGpsSatelliteData) -> c.int --- _sceGpsGetData :: proc(pos: ^SceGpsPositionData, sat: ^SceGpsSatelliteData) -> c.int ---
GetDeviceInfo :: proc(dev_info: ^SceGpsDeviceInfo) -> c.int --- _sceGpsGetDeviceInfo :: proc(dev_info: ^SceGpsDeviceInfo) -> c.int ---
GetState :: proc(state: ^SceGpsStatus) -> c.int --- _sceGpsGetState :: proc(state: ^SceGpsStatus) -> c.int ---
Ioctl :: proc(ioctl_command: sce.UInt32, arg: rawptr, arg_size: sce.Size, a4: ^sce.Size) -> c.int --- _sceGpsIoctl :: proc(ioctl_command: sce.UInt32, arg: rawptr, arg_size: sce.Size, a4: ^sce.Size) -> c.int ---
IsDevice :: proc() -> c.int --- _sceGpsIsDevice :: proc() -> c.int ---
Open :: proc(cbid: sce.UID) -> c.int --- _sceGpsOpen :: proc(cbid: sce.UID) -> c.int ---
ResumeCallback :: proc() -> c.int --- _sceGpsResumeCallback :: proc() -> c.int ---
SelectDevice :: proc(device_type: sce.UInt32) -> c.int --- _sceGpsSelectDevice :: proc(device_type: sce.UInt32) -> c.int ---
Start :: proc(mode: c.uint) -> c.int --- _sceGpsStart :: proc(mode: c.uint) -> c.int ---
Stop :: proc() -> c.int --- _sceGpsStop :: proc() -> c.int ---
} }
+229 -231
View File
@@ -17,290 +17,288 @@ sceGxtGetDataAddress :: proc(gxt: rawptr) -> rawptr {
return cast(rawptr)((cast(uintptr)gxt) + auto_cast header.dataOffset) return cast(rawptr)((cast(uintptr)gxt) + auto_cast header.dataOffset)
} }
@(link_prefix = "sceGxm")
foreign gxm { foreign gxm {
Initialize :: proc(params: ^SceGxmInitializeParams) -> c.int --- sceGxmInitialize :: proc(params: ^SceGxmInitializeParams) -> c.int ---
VshInitialize :: proc(params: ^SceGxmInitializeParams) -> c.int --- sceGxmVshInitialize :: proc(params: ^SceGxmInitializeParams) -> c.int ---
Terminate :: proc() -> c.int --- sceGxmTerminate :: proc() -> c.int ---
GetNotificationRegion :: proc() -> ^c.uint --- sceGxmGetNotificationRegion :: proc() -> ^c.uint ---
NotificationWait :: proc(notification: ^SceGxmNotification) -> c.int --- sceGxmNotificationWait :: proc(notification: ^SceGxmNotification) -> c.int ---
MapMemory :: proc(base: rawptr, size: sce.Size, attr: SceGxmMemoryAttribFlags) -> c.int --- sceGxmMapMemory :: proc(base: rawptr, size: sce.Size, attr: SceGxmMemoryAttribFlags) -> c.int ---
UnmapMemory :: proc(base: rawptr) -> c.int --- sceGxmUnmapMemory :: proc(base: rawptr) -> c.int ---
MapVertexUsseMemory :: proc(base: rawptr, size: sce.Size, offset: ^c.uint) -> c.int --- sceGxmMapVertexUsseMemory :: proc(base: rawptr, size: sce.Size, offset: ^c.uint) -> c.int ---
UnmapVertexUsseMemory :: proc(base: rawptr) -> c.int --- sceGxmUnmapVertexUsseMemory :: proc(base: rawptr) -> c.int ---
MapFragmentUsseMemory :: proc(base: rawptr, size: sce.Size, offset: ^c.uint) -> c.int --- sceGxmMapFragmentUsseMemory :: proc(base: rawptr, size: sce.Size, offset: ^c.uint) -> c.int ---
UnmapFragmentUsseMemory :: proc(base: rawptr) -> c.int --- sceGxmUnmapFragmentUsseMemory :: proc(base: rawptr) -> c.int ---
DisplayQueueAddEntry :: proc(oldBuffer: ^SceGxmSyncObject, newBuffer: ^SceGxmSyncObject, callbackData: rawptr) -> c.int --- sceGxmDisplayQueueAddEntry :: proc(oldBuffer: ^SceGxmSyncObject, newBuffer: ^SceGxmSyncObject, callbackData: rawptr) -> c.int ---
DisplayQueueFinish :: proc() -> c.int --- sceGxmDisplayQueueFinish :: proc() -> c.int ---
SyncObjectCreate :: proc(syncObject: ^^SceGxmSyncObject) -> c.int --- sceGxmSyncObjectCreate :: proc(syncObject: ^^SceGxmSyncObject) -> c.int ---
SyncObjectDestroy :: proc(syncObject: ^SceGxmSyncObject) -> c.int --- sceGxmSyncObjectDestroy :: proc(syncObject: ^SceGxmSyncObject) -> c.int ---
CreateContext :: proc(params: ^SceGxmContextParams, _context: ^^SceGxmContext) -> c.int --- sceGxmCreateContext :: proc(params: ^SceGxmContextParams, _context: ^^SceGxmContext) -> c.int ---
DestroyContext :: proc(_context: ^SceGxmContext) -> c.int --- sceGxmDestroyContext :: proc(_context: ^SceGxmContext) -> c.int ---
CreateDeferredContext :: proc(params: ^SceGxmDeferredContextParams, _context: ^^SceGxmContext) -> c.int --- sceGxmCreateDeferredContext :: proc(params: ^SceGxmDeferredContextParams, _context: ^^SceGxmContext) -> c.int ---
DestroyDeferredContext :: proc(_context: ^SceGxmContext) -> c.int --- sceGxmDestroyDeferredContext :: proc(_context: ^SceGxmContext) -> c.int ---
SetValidationEnable :: proc(_context: ^SceGxmContext, enable: sce.Bool) --- sceGxmSetValidationEnable :: proc(_context: ^SceGxmContext, enable: sce.Bool) ---
SetVertexProgram :: proc(_context: ^SceGxmContext, vertexProgram: ^SceGxmVertexProgram) --- sceGxmSetVertexProgram :: proc(_context: ^SceGxmContext, vertexProgram: ^SceGxmVertexProgram) ---
SetFragmentProgram :: proc(_context: ^SceGxmContext, fragmentProgram: ^SceGxmFragmentProgram) --- sceGxmSetFragmentProgram :: proc(_context: ^SceGxmContext, fragmentProgram: ^SceGxmFragmentProgram) ---
ReserveVertexDefaultUniformBuffer :: proc(_context: ^SceGxmContext, uniformBuffer: ^rawptr) -> c.int --- sceGxmReserveVertexDefaultUniformBuffer :: proc(_context: ^SceGxmContext, uniformBuffer: ^rawptr) -> c.int ---
ReserveFragmentDefaultUniformBuffer :: proc(_context: ^SceGxmContext, uniformBuffer: ^rawptr) -> c.int --- sceGxmReserveFragmentDefaultUniformBuffer :: proc(_context: ^SceGxmContext, uniformBuffer: ^rawptr) -> c.int ---
SetVertexDefaultUniformBuffer :: proc(_context: ^SceGxmContext, uniformBuffer: rawptr) -> c.int --- sceGxmSetVertexDefaultUniformBuffer :: proc(_context: ^SceGxmContext, uniformBuffer: rawptr) -> c.int ---
SetFragmentDefaultUniformBuffer :: proc(_context: ^SceGxmContext, uniformBuffer: rawptr) -> c.int --- sceGxmSetFragmentDefaultUniformBuffer :: proc(_context: ^SceGxmContext, uniformBuffer: rawptr) -> c.int ---
SetVertexStream :: proc(_context: ^SceGxmContext, streamIndex: c.uint, streamData: rawptr) -> c.int --- sceGxmSetVertexStream :: proc(_context: ^SceGxmContext, streamIndex: c.uint, streamData: rawptr) -> c.int ---
SetVertexTexture :: proc(_context: ^SceGxmContext, textureIndex: c.uint, texture: ^SceGxmTexture) -> c.int --- sceGxmSetVertexTexture :: proc(_context: ^SceGxmContext, textureIndex: c.uint, texture: ^SceGxmTexture) -> c.int ---
SetFragmentTexture :: proc(_context: ^SceGxmContext, textureIndex: c.uint, texture: ^SceGxmTexture) -> c.int --- sceGxmSetFragmentTexture :: proc(_context: ^SceGxmContext, textureIndex: c.uint, texture: ^SceGxmTexture) -> c.int ---
SetVertexUniformBuffer :: proc(_context: ^SceGxmContext, bufferIndex: c.uint, bufferData: rawptr) -> c.int --- sceGxmSetVertexUniformBuffer :: proc(_context: ^SceGxmContext, bufferIndex: c.uint, bufferData: rawptr) -> c.int ---
SetFragmentUniformBuffer :: proc(_context: ^SceGxmContext, bufferIndex: c.uint, bufferData: rawptr) -> c.int --- sceGxmSetFragmentUniformBuffer :: proc(_context: ^SceGxmContext, bufferIndex: c.uint, bufferData: rawptr) -> c.int ---
SetAuxiliarySurface :: proc(_context: ^SceGxmContext, surfaceIndex: c.uint, surface: ^SceGxmAuxiliarySurface) -> c.int --- sceGxmSetAuxiliarySurface :: proc(_context: ^SceGxmContext, surfaceIndex: c.uint, surface: ^SceGxmAuxiliarySurface) -> c.int ---
SetPrecomputedFragmentState :: proc(_context: ^SceGxmContext, precomputedState: ^SceGxmPrecomputedFragmentState) --- sceGxmSetPrecomputedFragmentState :: proc(_context: ^SceGxmContext, precomputedState: ^SceGxmPrecomputedFragmentState) ---
SetPrecomputedVertexState :: proc(_context: ^SceGxmContext, precomputedState: ^SceGxmPrecomputedVertexState) --- sceGxmSetPrecomputedVertexState :: proc(_context: ^SceGxmContext, precomputedState: ^SceGxmPrecomputedVertexState) ---
DrawPrecomputed :: proc(_context: ^SceGxmContext, precomputedDraw: ^SceGxmPrecomputedDraw) -> c.int --- sceGxmDrawPrecomputed :: proc(_context: ^SceGxmContext, precomputedDraw: ^SceGxmPrecomputedDraw) -> c.int ---
Draw :: proc(_context: ^SceGxmContext, primType: SceGxmPrimitiveType, indexType: SceGxmIndexFormat, indexData: rawptr, indexCount: c.uint) -> c.int --- sceGxmDraw :: proc(_context: ^SceGxmContext, primType: SceGxmPrimitiveType, indexType: SceGxmIndexFormat, indexData: rawptr, indexCount: c.uint) -> c.int ---
DrawInstanced :: proc(_context: ^SceGxmContext, primType: SceGxmPrimitiveType, indexType: SceGxmIndexFormat, indexData: rawptr, indexCount: c.uint, indexWrap: c.uint) -> c.int --- sceGxmDrawInstanced :: proc(_context: ^SceGxmContext, primType: SceGxmPrimitiveType, indexType: SceGxmIndexFormat, indexData: rawptr, indexCount: c.uint, indexWrap: c.uint) -> c.int ---
SetVisibilityBuffer :: proc(_context: ^SceGxmContext, bufferBase: rawptr, stridePerCore: c.uint) -> c.int --- sceGxmSetVisibilityBuffer :: proc(_context: ^SceGxmContext, bufferBase: rawptr, stridePerCore: c.uint) -> c.int ---
BeginScene :: proc(_context: ^SceGxmContext, flags: c.uint, renderTarget: ^SceGxmRenderTarget, validRegion: ^SceGxmValidRegion, vertexSyncObject: ^SceGxmSyncObject, fragmentSyncObject: ^SceGxmSyncObject, colorSurface: ^SceGxmColorSurface, depthStencil: ^SceGxmDepthStencilSurface) -> c.int --- sceGxmBeginScene :: proc(_context: ^SceGxmContext, flags: c.uint, renderTarget: ^SceGxmRenderTarget, validRegion: ^SceGxmValidRegion, vertexSyncObject: ^SceGxmSyncObject, fragmentSyncObject: ^SceGxmSyncObject, colorSurface: ^SceGxmColorSurface, depthStencil: ^SceGxmDepthStencilSurface) -> c.int ---
MidSceneFlush :: proc(_context: ^SceGxmContext, flags: c.uint, vertexSyncObject: ^SceGxmSyncObject, vertexNotification: ^SceGxmNotification) -> c.int --- sceGxmMidSceneFlush :: proc(_context: ^SceGxmContext, flags: c.uint, vertexSyncObject: ^SceGxmSyncObject, vertexNotification: ^SceGxmNotification) -> c.int ---
EndScene :: proc(_context: ^SceGxmContext, vertexNotification: ^SceGxmNotification, fragmentNotification: ^SceGxmNotification) -> c.int --- sceGxmEndScene :: proc(_context: ^SceGxmContext, vertexNotification: ^SceGxmNotification, fragmentNotification: ^SceGxmNotification) -> c.int ---
BeginCommandList :: proc(_context: ^SceGxmContext) -> c.int --- sceGxmBeginCommandList :: proc(_context: ^SceGxmContext) -> c.int ---
ExecuteCommandList :: proc(_context: ^SceGxmContext, list: ^SceGxmCommandList) -> c.int --- sceGxmExecuteCommandList :: proc(_context: ^SceGxmContext, list: ^SceGxmCommandList) -> c.int ---
EndCommandList :: proc(_context: ^SceGxmContext, list: ^SceGxmCommandList) -> c.int --- sceGxmEndCommandList :: proc(_context: ^SceGxmContext, list: ^SceGxmCommandList) -> c.int ---
SetFrontDepthFunc :: proc(_context: ^SceGxmContext, depthFunc: SceGxmDepthFunc) --- sceGxmSetFrontDepthFunc :: proc(_context: ^SceGxmContext, depthFunc: SceGxmDepthFunc) ---
SetBackDepthFunc :: proc(_context: ^SceGxmContext, depthFunc: SceGxmDepthFunc) --- sceGxmSetBackDepthFunc :: proc(_context: ^SceGxmContext, depthFunc: SceGxmDepthFunc) ---
SetFrontFragmentProgramEnable :: proc(_context: ^SceGxmContext, enable: SceGxmFragmentProgramMode) --- sceGxmSetFrontFragmentProgramEnable :: proc(_context: ^SceGxmContext, enable: SceGxmFragmentProgramMode) ---
SetBackFragmentProgramEnable :: proc(_context: ^SceGxmContext, enable: SceGxmFragmentProgramMode) --- sceGxmSetBackFragmentProgramEnable :: proc(_context: ^SceGxmContext, enable: SceGxmFragmentProgramMode) ---
SetFrontDepthWriteEnable :: proc(_context: ^SceGxmContext, enable: SceGxmDepthWriteMode) --- sceGxmSetFrontDepthWriteEnable :: proc(_context: ^SceGxmContext, enable: SceGxmDepthWriteMode) ---
SetBackDepthWriteEnable :: proc(_context: ^SceGxmContext, enable: SceGxmDepthWriteMode) --- sceGxmSetBackDepthWriteEnable :: proc(_context: ^SceGxmContext, enable: SceGxmDepthWriteMode) ---
SetFrontLineFillLastPixelEnable :: proc(_context: ^SceGxmContext, enable: SceGxmLineFillLastPixelMode) --- sceGxmSetFrontLineFillLastPixelEnable :: proc(_context: ^SceGxmContext, enable: SceGxmLineFillLastPixelMode) ---
SetBackLineFillLastPixelEnable :: proc(_context: ^SceGxmContext, enable: SceGxmLineFillLastPixelMode) --- sceGxmSetBackLineFillLastPixelEnable :: proc(_context: ^SceGxmContext, enable: SceGxmLineFillLastPixelMode) ---
SetFrontStencilRef :: proc(_context: ^SceGxmContext, sref: c.uint) --- sceGxmSetFrontStencilRef :: proc(_context: ^SceGxmContext, sref: c.uint) ---
SetBackStencilRef :: proc(_context: ^SceGxmContext, sref: c.uint) --- sceGxmSetBackStencilRef :: proc(_context: ^SceGxmContext, sref: c.uint) ---
SetFrontPointLineWidth :: proc(_context: ^SceGxmContext, width: c.uint) --- sceGxmSetFrontPointLineWidth :: proc(_context: ^SceGxmContext, width: c.uint) ---
SetBackPointLineWidth :: proc(_context: ^SceGxmContext, width: c.uint) --- sceGxmSetBackPointLineWidth :: proc(_context: ^SceGxmContext, width: c.uint) ---
SetFrontPolygonMode :: proc(_context: ^SceGxmContext, mode: SceGxmPolygonMode) --- sceGxmSetFrontPolygonMode :: proc(_context: ^SceGxmContext, mode: SceGxmPolygonMode) ---
SetBackPolygonMode :: proc(_context: ^SceGxmContext, mode: SceGxmPolygonMode) --- sceGxmSetBackPolygonMode :: proc(_context: ^SceGxmContext, mode: SceGxmPolygonMode) ---
SetFrontStencilFunc :: proc(_context: ^SceGxmContext, func: SceGxmStencilFunc, stencilFail: SceGxmStencilOp, depthFail: SceGxmStencilOp, depthPass: SceGxmStencilOp, compareMask: c.uchar, writeMask: c.uchar) --- sceGxmSetFrontStencilFunc :: proc(_context: ^SceGxmContext, func: SceGxmStencilFunc, stencilFail: SceGxmStencilOp, depthFail: SceGxmStencilOp, depthPass: SceGxmStencilOp, compareMask: c.uchar, writeMask: c.uchar) ---
SetBackStencilFunc :: proc(_context: ^SceGxmContext, func: SceGxmStencilFunc, stencilFail: SceGxmStencilOp, depthFail: SceGxmStencilOp, depthPass: SceGxmStencilOp, compareMask: c.uchar, writeMask: c.uchar) --- sceGxmSetBackStencilFunc :: proc(_context: ^SceGxmContext, func: SceGxmStencilFunc, stencilFail: SceGxmStencilOp, depthFail: SceGxmStencilOp, depthPass: SceGxmStencilOp, compareMask: c.uchar, writeMask: c.uchar) ---
SetFrontDepthBias :: proc(_context: ^SceGxmContext, factor: c.int, units: c.int) --- sceGxmSetFrontDepthBias :: proc(_context: ^SceGxmContext, factor: c.int, units: c.int) ---
SetBackDepthBias :: proc(_context: ^SceGxmContext, factor: c.int, units: c.int) --- sceGxmSetBackDepthBias :: proc(_context: ^SceGxmContext, factor: c.int, units: c.int) ---
SetTwoSidedEnable :: proc(_context: ^SceGxmContext, enable: SceGxmTwoSidedMode) --- sceGxmSetTwoSidedEnable :: proc(_context: ^SceGxmContext, enable: SceGxmTwoSidedMode) ---
SetViewport :: proc(_context: ^SceGxmContext, xOffset: c.float, xScale: c.float, yOffset: c.float, yScale: c.float, zOffset: c.float, zScale: c.float) --- sceGxmSetViewport :: proc(_context: ^SceGxmContext, xOffset: c.float, xScale: c.float, yOffset: c.float, yScale: c.float, zOffset: c.float, zScale: c.float) ---
SetWClampValue :: proc(_context: ^SceGxmContext, clampValue: c.float) --- sceGxmSetWClampValue :: proc(_context: ^SceGxmContext, clampValue: c.float) ---
SetWClampEnable :: proc(_context: ^SceGxmContext, enable: SceGxmWClampMode) --- sceGxmSetWClampEnable :: proc(_context: ^SceGxmContext, enable: SceGxmWClampMode) ---
SetRegionClip :: proc(_context: ^SceGxmContext, mode: SceGxmRegionClipMode, xMin: c.uint, yMin: c.uint, xMax: c.uint, yMax: c.uint) --- sceGxmSetRegionClip :: proc(_context: ^SceGxmContext, mode: SceGxmRegionClipMode, xMin: c.uint, yMin: c.uint, xMax: c.uint, yMax: c.uint) ---
SetDefaultRegionClipAndViewport :: proc(_context: ^SceGxmContext, xMax: c.uint, yMax: c.uint) --- sceGxmSetDefaultRegionClipAndViewport :: proc(_context: ^SceGxmContext, xMax: c.uint, yMax: c.uint) ---
SetCullMode :: proc(_context: ^SceGxmContext, mode: SceGxmCullMode) --- sceGxmSetCullMode :: proc(_context: ^SceGxmContext, mode: SceGxmCullMode) ---
SetViewportEnable :: proc(_context: ^SceGxmContext, enable: SceGxmViewportMode) --- sceGxmSetViewportEnable :: proc(_context: ^SceGxmContext, enable: SceGxmViewportMode) ---
SetWBufferEnable :: proc(_context: ^SceGxmContext, enable: SceGxmWBufferMode) --- sceGxmSetWBufferEnable :: proc(_context: ^SceGxmContext, enable: SceGxmWBufferMode) ---
SetFrontVisibilityTestIndex :: proc(_context: ^SceGxmContext, index: c.uint) --- sceGxmSetFrontVisibilityTestIndex :: proc(_context: ^SceGxmContext, index: c.uint) ---
SetBackVisibilityTestIndex :: proc(_context: ^SceGxmContext, index: c.uint) --- sceGxmSetBackVisibilityTestIndex :: proc(_context: ^SceGxmContext, index: c.uint) ---
SetFrontVisibilityTestOp :: proc(_context: ^SceGxmContext, op: SceGxmVisibilityTestOp) --- sceGxmSetFrontVisibilityTestOp :: proc(_context: ^SceGxmContext, op: SceGxmVisibilityTestOp) ---
SetBackVisibilityTestOp :: proc(_context: ^SceGxmContext, op: SceGxmVisibilityTestOp) --- sceGxmSetBackVisibilityTestOp :: proc(_context: ^SceGxmContext, op: SceGxmVisibilityTestOp) ---
SetFrontVisibilityTestEnable :: proc(_context: ^SceGxmContext, enable: SceGxmVisibilityTestMode) --- sceGxmSetFrontVisibilityTestEnable :: proc(_context: ^SceGxmContext, enable: SceGxmVisibilityTestMode) ---
SetBackVisibilityTestEnable :: proc(_context: ^SceGxmContext, enable: SceGxmVisibilityTestMode) --- sceGxmSetBackVisibilityTestEnable :: proc(_context: ^SceGxmContext, enable: SceGxmVisibilityTestMode) ---
SetYuvProfile :: proc(_context: ^SceGxmContext, index: c.uint, profile: SceGxmYuvProfile ) -> c.int --- sceGxmSetYuvProfile :: proc(_context: ^SceGxmContext, index: c.uint, profile: SceGxmYuvProfile ) -> c.int ---
Finish :: proc(_context: ^SceGxmContext) --- sceGxmFinish :: proc(_context: ^SceGxmContext) ---
PushUserMarker :: proc(_context: ^SceGxmContext, tag: cstring) -> c.int --- sceGxmPushUserMarker :: proc(_context: ^SceGxmContext, tag: cstring) -> c.int ---
PopUserMarker :: proc(_context: ^SceGxmContext) -> c.int --- sceGxmPopUserMarker :: proc(_context: ^SceGxmContext) -> c.int ---
SetUserMarker :: proc(_context: ^SceGxmContext, tag: cstring) -> c.int --- sceGxmSetUserMarker :: proc(_context: ^SceGxmContext, tag: cstring) -> c.int ---
PadHeartbeat :: proc(displaySurface: ^SceGxmColorSurface, displaySyncObject: ^SceGxmSyncObject) -> c.int --- sceGxmPadHeartbeat :: proc(displaySurface: ^SceGxmColorSurface, displaySyncObject: ^SceGxmSyncObject) -> c.int ---
PadTriggerGpuPaTrace :: proc() -> c.int --- sceGxmPadTriggerGpuPaTrace :: proc() -> c.int ---
ColorSurfaceInit :: proc(surface: ^SceGxmColorSurface, colorFormat: SceGxmColorFormat, surfaceType: SceGxmColorSurfaceType, scaleMode: SceGxmColorSurfaceScaleMode, outputRegisterSize: SceGxmOutputRegisterSize, width: c.uint, height: c.uint, strideInPixels: c.uint, data: rawptr) -> c.int --- sceGxmColorSurfaceInit :: proc(surface: ^SceGxmColorSurface, colorFormat: SceGxmColorFormat, surfaceType: SceGxmColorSurfaceType, scaleMode: SceGxmColorSurfaceScaleMode, outputRegisterSize: SceGxmOutputRegisterSize, width: c.uint, height: c.uint, strideInPixels: c.uint, data: rawptr) -> c.int ---
ColorSurfaceInitDisabled :: proc(surface: ^SceGxmColorSurface) -> c.int --- sceGxmColorSurfaceInitDisabled :: proc(surface: ^SceGxmColorSurface) -> c.int ---
ColorSurfaceIsEnabled :: proc(surface: ^SceGxmColorSurface) -> sce.Bool --- sceGxmColorSurfaceIsEnabled :: proc(surface: ^SceGxmColorSurface) -> sce.Bool ---
ColorSurfaceGetClip :: proc(surface: ^SceGxmColorSurface, xMin: ^c.uint, yMin: ^c.uint, xMax: ^c.uint, yMax: ^c.uint) --- sceGxmColorSurfaceGetClip :: proc(surface: ^SceGxmColorSurface, xMin: ^c.uint, yMin: ^c.uint, xMax: ^c.uint, yMax: ^c.uint) ---
ColorSurfaceSetClip :: proc(surface: ^SceGxmColorSurface, xMin: c.uint, yMin: c.uint, xMax: c.uint, yMax: c.uint) --- sceGxmColorSurfaceSetClip :: proc(surface: ^SceGxmColorSurface, xMin: c.uint, yMin: c.uint, xMax: c.uint, yMax: c.uint) ---
ColorSurfaceGetScaleMode :: proc(surface: ^SceGxmColorSurface) -> SceGxmColorSurfaceScaleMode --- sceGxmColorSurfaceGetScaleMode :: proc(surface: ^SceGxmColorSurface) -> SceGxmColorSurfaceScaleMode ---
ColorSurfaceSetScaleMode :: proc(surface: ^SceGxmColorSurface, scaleMode: SceGxmColorSurfaceScaleMode) --- sceGxmColorSurfaceSetScaleMode :: proc(surface: ^SceGxmColorSurface, scaleMode: SceGxmColorSurfaceScaleMode) ---
ColorSurfaceGetData :: proc(surface: ^SceGxmColorSurface) -> rawptr --- sceGxmColorSurfaceGetData :: proc(surface: ^SceGxmColorSurface) -> rawptr ---
ColorSurfaceSetData :: proc(surface: ^SceGxmColorSurface, data: rawptr) -> c.int --- sceGxmColorSurfaceSetData :: proc(surface: ^SceGxmColorSurface, data: rawptr) -> c.int ---
ColorSurfaceGetFormat :: proc(surface: ^SceGxmColorSurface) -> SceGxmColorFormat --- sceGxmColorSurfaceGetFormat :: proc(surface: ^SceGxmColorSurface) -> SceGxmColorFormat ---
ColorSurfaceSetFormat :: proc(surface: ^SceGxmColorSurface, format: SceGxmColorFormat) -> c.int --- sceGxmColorSurfaceSetFormat :: proc(surface: ^SceGxmColorSurface, format: SceGxmColorFormat) -> c.int ---
ColorSurfaceGetType :: proc(surface: ^SceGxmColorSurface) -> SceGxmColorSurfaceType --- sceGxmColorSurfaceGetType :: proc(surface: ^SceGxmColorSurface) -> SceGxmColorSurfaceType ---
ColorSurfaceGetStrideInPixels :: proc(surface: ^SceGxmColorSurface) -> c.uint --- sceGxmColorSurfaceGetStrideInPixels :: proc(surface: ^SceGxmColorSurface) -> c.uint ---
DepthStencilSurfaceInit :: proc(surface: ^SceGxmDepthStencilSurface, depthStencilFormat: SceGxmDepthStencilFormat, surfaceType: SceGxmDepthStencilSurfaceType, strideInSamples: c.uint, depthData: rawptr, stencilData: rawptr) -> c.int --- sceGxmDepthStencilSurfaceInit :: proc(surface: ^SceGxmDepthStencilSurface, depthStencilFormat: SceGxmDepthStencilFormat, surfaceType: SceGxmDepthStencilSurfaceType, strideInSamples: c.uint, depthData: rawptr, stencilData: rawptr) -> c.int ---
DepthStencilSurfaceInitDisabled :: proc(surface: ^SceGxmDepthStencilSurface) -> c.int --- sceGxmDepthStencilSurfaceInitDisabled :: proc(surface: ^SceGxmDepthStencilSurface) -> c.int ---
DepthStencilSurfaceGetBackgroundDepth :: proc(surface: ^SceGxmDepthStencilSurface) -> c.float --- sceGxmDepthStencilSurfaceGetBackgroundDepth :: proc(surface: ^SceGxmDepthStencilSurface) -> c.float ---
DepthStencilSurfaceSetBackgroundDepth :: proc(surface: ^SceGxmDepthStencilSurface, backgroundDepth: c.float) --- sceGxmDepthStencilSurfaceSetBackgroundDepth :: proc(surface: ^SceGxmDepthStencilSurface, backgroundDepth: c.float) ---
DepthStencilSurfaceGetBackgroundStencil :: proc(surface: ^SceGxmDepthStencilSurface) -> c.uchar --- sceGxmDepthStencilSurfaceGetBackgroundStencil :: proc(surface: ^SceGxmDepthStencilSurface) -> c.uchar ---
DepthStencilSurfaceSetBackgroundStencil :: proc(surface: ^SceGxmDepthStencilSurface, backgroundStencil: c.uchar) --- sceGxmDepthStencilSurfaceSetBackgroundStencil :: proc(surface: ^SceGxmDepthStencilSurface, backgroundStencil: c.uchar) ---
DepthStencilSurfaceIsEnabled :: proc(surface: ^SceGxmDepthStencilSurface) -> sce.Bool --- sceGxmDepthStencilSurfaceIsEnabled :: proc(surface: ^SceGxmDepthStencilSurface) -> sce.Bool ---
DepthStencilSurfaceSetForceLoadMode :: proc(surface: ^SceGxmDepthStencilSurface, forceLoad: SceGxmDepthStencilForceLoadMode) --- sceGxmDepthStencilSurfaceSetForceLoadMode :: proc(surface: ^SceGxmDepthStencilSurface, forceLoad: SceGxmDepthStencilForceLoadMode) ---
DepthStencilSurfaceGetForceLoadMode :: proc(surface: ^SceGxmDepthStencilSurface) -> SceGxmDepthStencilForceLoadMode --- sceGxmDepthStencilSurfaceGetForceLoadMode :: proc(surface: ^SceGxmDepthStencilSurface) -> SceGxmDepthStencilForceLoadMode ---
DepthStencilSurfaceSetForceStoreMode :: proc(surface: ^SceGxmDepthStencilSurface, forceStore: SceGxmDepthStencilForceStoreMode ) --- sceGxmDepthStencilSurfaceSetForceStoreMode :: proc(surface: ^SceGxmDepthStencilSurface, forceStore: SceGxmDepthStencilForceStoreMode ) ---
DepthStencilSurfaceGetForceStoreMode :: proc(surface: ^SceGxmDepthStencilSurface) -> SceGxmDepthStencilForceStoreMode --- sceGxmDepthStencilSurfaceGetForceStoreMode :: proc(surface: ^SceGxmDepthStencilSurface) -> SceGxmDepthStencilForceStoreMode ---
ColorSurfaceGetGammaMode :: proc(surface: ^SceGxmColorSurface) -> SceGxmColorSurfaceGammaMode --- sceGxmColorSurfaceGetGammaMode :: proc(surface: ^SceGxmColorSurface) -> SceGxmColorSurfaceGammaMode ---
ColorSurfaceSetGammaMode :: proc(surface: ^SceGxmColorSurface, gammaMode: SceGxmColorSurfaceGammaMode) -> c.int --- sceGxmColorSurfaceSetGammaMode :: proc(surface: ^SceGxmColorSurface, gammaMode: SceGxmColorSurfaceGammaMode) -> c.int ---
ColorSurfaceGetDitherMode :: proc(surface: ^SceGxmColorSurface) -> SceGxmColorSurfaceDitherMode --- sceGxmColorSurfaceGetDitherMode :: proc(surface: ^SceGxmColorSurface) -> SceGxmColorSurfaceDitherMode ---
ColorSurfaceSetDitherMode :: proc(surface: ^SceGxmColorSurface, ditherMode: SceGxmColorSurfaceDitherMode) -> c.int --- sceGxmColorSurfaceSetDitherMode :: proc(surface: ^SceGxmColorSurface, ditherMode: SceGxmColorSurfaceDitherMode) -> c.int ---
DepthStencilSurfaceGetFormat :: proc(surface: ^SceGxmDepthStencilSurface) -> SceGxmDepthStencilFormat --- sceGxmDepthStencilSurfaceGetFormat :: proc(surface: ^SceGxmDepthStencilSurface) -> SceGxmDepthStencilFormat ---
DepthStencilSurfaceGetStrideInSamples :: proc(surface: ^SceGxmDepthStencilSurface) -> c.uint --- sceGxmDepthStencilSurfaceGetStrideInSamples :: proc(surface: ^SceGxmDepthStencilSurface) -> c.uint ---
ProgramCheck :: proc(program: ^SceGxmProgram) -> c.int --- sceGxmProgramCheck :: proc(program: ^SceGxmProgram) -> c.int ---
ProgramGetSize :: proc(program: ^SceGxmProgram) -> c.uint --- sceGxmProgramGetSize :: proc(program: ^SceGxmProgram) -> c.uint ---
ProgramGetType :: proc(program: ^SceGxmProgram) -> SceGxmProgramType --- sceGxmProgramGetType :: proc(program: ^SceGxmProgram) -> SceGxmProgramType ---
ProgramIsDiscardUsed :: proc(program: ^SceGxmProgram) -> sce.Bool --- sceGxmProgramIsDiscardUsed :: proc(program: ^SceGxmProgram) -> sce.Bool ---
ProgramIsDepthReplaceUsed :: proc(program: ^SceGxmProgram) -> sce.Bool --- sceGxmProgramIsDepthReplaceUsed :: proc(program: ^SceGxmProgram) -> sce.Bool ---
ProgramIsSpriteCoordUsed :: proc(program: ^SceGxmProgram) -> sce.Bool --- sceGxmProgramIsSpriteCoordUsed :: proc(program: ^SceGxmProgram) -> sce.Bool ---
ProgramGetDefaultUniformBufferSize :: proc(program: ^SceGxmProgram) -> c.uint --- sceGxmProgramGetDefaultUniformBufferSize :: proc(program: ^SceGxmProgram) -> c.uint ---
ProgramGetParameterCount :: proc(program: ^SceGxmProgram) -> c.uint --- sceGxmProgramGetParameterCount :: proc(program: ^SceGxmProgram) -> c.uint ---
ProgramGetParameter :: proc(program: ^SceGxmProgram, index: c.uint) -> ^SceGxmProgramParameter --- sceGxmProgramGetParameter :: proc(program: ^SceGxmProgram, index: c.uint) -> ^SceGxmProgramParameter ---
ProgramFindParameterByName :: proc(program: ^SceGxmProgram, name: cstring) -> ^SceGxmProgramParameter --- sceGxmProgramFindParameterByName :: proc(program: ^SceGxmProgram, name: cstring) -> ^SceGxmProgramParameter ---
ProgramFindParameterBySemantic :: proc(program: ^SceGxmProgram, semantic: SceGxmParameterSemantic, index: c.uint) -> ^SceGxmProgramParameter --- sceGxmProgramFindParameterBySemantic :: proc(program: ^SceGxmProgram, semantic: SceGxmParameterSemantic, index: c.uint) -> ^SceGxmProgramParameter ---
ProgramParameterGetIndex :: proc(program: ^SceGxmProgram, parameter: ^SceGxmProgramParameter) -> c.uint --- sceGxmProgramParameterGetIndex :: proc(program: ^SceGxmProgram, parameter: ^SceGxmProgramParameter) -> c.uint ---
ProgramParameterGetCategory :: proc(parameter: ^SceGxmProgramParameter) -> SceGxmParameterCategory --- sceGxmProgramParameterGetCategory :: proc(parameter: ^SceGxmProgramParameter) -> SceGxmParameterCategory ---
ProgramParameterGetName :: proc(parameter: ^SceGxmProgramParameter) -> cstring --- sceGxmProgramParameterGetName :: proc(parameter: ^SceGxmProgramParameter) -> cstring ---
ProgramParameterGetSemantic :: proc(parameter: ^SceGxmProgramParameter) -> SceGxmParameterSemantic --- sceGxmProgramParameterGetSemantic :: proc(parameter: ^SceGxmProgramParameter) -> SceGxmParameterSemantic ---
ProgramParameterGetSemanticIndex :: proc(parameter: ^SceGxmProgramParameter) -> c.uint --- sceGxmProgramParameterGetSemanticIndex :: proc(parameter: ^SceGxmProgramParameter) -> c.uint ---
ProgramParameterGetType :: proc(parameter: ^SceGxmProgramParameter) -> SceGxmParameterType --- sceGxmProgramParameterGetType :: proc(parameter: ^SceGxmProgramParameter) -> SceGxmParameterType ---
ProgramParameterGetComponentCount :: proc(parameter: ^SceGxmProgramParameter) -> c.uint --- sceGxmProgramParameterGetComponentCount :: proc(parameter: ^SceGxmProgramParameter) -> c.uint ---
ProgramParameterGetArraySize :: proc(parameter: ^SceGxmProgramParameter) -> c.uint --- sceGxmProgramParameterGetArraySize :: proc(parameter: ^SceGxmProgramParameter) -> c.uint ---
ProgramParameterGetResourceIndex :: proc(parameter: ^SceGxmProgramParameter) -> c.uint --- sceGxmProgramParameterGetResourceIndex :: proc(parameter: ^SceGxmProgramParameter) -> c.uint ---
ProgramParameterGetContainerIndex :: proc( parameter: ^SceGxmProgramParameter) -> c.uint --- sceGxmProgramParameterGetContainerIndex :: proc( parameter: ^SceGxmProgramParameter) -> c.uint ---
ProgramParameterIsSamplerCube :: proc(parameter: ^SceGxmProgramParameter) -> sce.Bool --- sceGxmProgramParameterIsSamplerCube :: proc(parameter: ^SceGxmProgramParameter) -> sce.Bool ---
FragmentProgramGetProgram :: proc(fragmentProgram: ^SceGxmFragmentProgram) -> ^SceGxmProgram --- sceGxmFragmentProgramGetProgram :: proc(fragmentProgram: ^SceGxmFragmentProgram) -> ^SceGxmProgram ---
VertexProgramGetProgram :: proc(vertexProgram: ^SceGxmVertexProgram) -> ^SceGxmProgram --- sceGxmVertexProgramGetProgram :: proc(vertexProgram: ^SceGxmVertexProgram) -> ^SceGxmProgram ---
ShaderPatcherCreate :: proc(params: ^SceGxmShaderPatcherParams, shaderPatcher: ^^SceGxmShaderPatcher) -> c.int --- sceGxmShaderPatcherCreate :: proc(params: ^SceGxmShaderPatcherParams, shaderPatcher: ^^SceGxmShaderPatcher) -> c.int ---
ShaderPatcherSetUserData :: proc(shaderPatcher: ^SceGxmShaderPatcher, userData: rawptr) -> c.int --- sceGxmShaderPatcherSetUserData :: proc(shaderPatcher: ^SceGxmShaderPatcher, userData: rawptr) -> c.int ---
ShaderPatcherGetUserData :: proc(shaderPatcher: ^SceGxmShaderPatcher) -> rawptr --- sceGxmShaderPatcherGetUserData :: proc(shaderPatcher: ^SceGxmShaderPatcher) -> rawptr ---
ShaderPatcherDestroy :: proc(shaderPatcher: ^SceGxmShaderPatcher) -> c.int --- sceGxmShaderPatcherDestroy :: proc(shaderPatcher: ^SceGxmShaderPatcher) -> c.int ---
ShaderPatcherRegisterProgram :: proc(shaderPatcher: ^SceGxmShaderPatcher, programHeader: ^SceGxmProgram, programId: ^SceGxmShaderPatcherId) -> c.int --- sceGxmShaderPatcherRegisterProgram :: proc(shaderPatcher: ^SceGxmShaderPatcher, programHeader: ^SceGxmProgram, programId: ^SceGxmShaderPatcherId) -> c.int ---
ShaderPatcherUnregisterProgram :: proc(shaderPatcher: ^SceGxmShaderPatcher, programId: SceGxmShaderPatcherId) -> c.int --- sceGxmShaderPatcherUnregisterProgram :: proc(shaderPatcher: ^SceGxmShaderPatcher, programId: SceGxmShaderPatcherId) -> c.int ---
ShaderPatcherForceUnregisterProgram :: proc(shaderPatcher: ^SceGxmShaderPatcher, programId: SceGxmShaderPatcherId) -> c.int --- sceGxmShaderPatcherForceUnregisterProgram :: proc(shaderPatcher: ^SceGxmShaderPatcher, programId: SceGxmShaderPatcherId) -> c.int ---
ShaderPatcherGetProgramFromId :: proc(programId: SceGxmShaderPatcherId) -> ^SceGxmProgram --- sceGxmShaderPatcherGetProgramFromId :: proc(programId: SceGxmShaderPatcherId) -> ^SceGxmProgram ---
ShaderPatcherSetAuxiliarySurface :: proc(shaderPatcher: ^SceGxmShaderPatcher, auxSurfaceIndex: c.uint, auxSurface: ^SceGxmAuxiliarySurface) -> c.int --- sceGxmShaderPatcherSetAuxiliarySurface :: proc(shaderPatcher: ^SceGxmShaderPatcher, auxSurfaceIndex: c.uint, auxSurface: ^SceGxmAuxiliarySurface) -> c.int ---
ShaderPatcherCreateVertexProgram :: proc(shaderPatcher: ^SceGxmShaderPatcher, programId: SceGxmShaderPatcherId, attributes: ^SceGxmVertexAttribute, attributeCount: c.uint, streams: ^SceGxmVertexStream, streamCount: c.uint, vertexProgram: ^^SceGxmVertexProgram) -> c.int --- sceGxmShaderPatcherCreateVertexProgram :: proc(shaderPatcher: ^SceGxmShaderPatcher, programId: SceGxmShaderPatcherId, attributes: ^SceGxmVertexAttribute, attributeCount: c.uint, streams: ^SceGxmVertexStream, streamCount: c.uint, vertexProgram: ^^SceGxmVertexProgram) -> c.int ---
ShaderPatcherCreateFragmentProgram :: proc(shaderPatcher: ^SceGxmShaderPatcher, programId: SceGxmShaderPatcherId, outputFormat: SceGxmOutputRegisterFormat, multisampleMode: SceGxmMultisampleMode, blendInfo: ^SceGxmBlendInfo, vertexProgram: ^SceGxmProgram, fragmentProgram: ^^SceGxmFragmentProgram) -> c.int --- sceGxmShaderPatcherCreateFragmentProgram :: proc(shaderPatcher: ^SceGxmShaderPatcher, programId: SceGxmShaderPatcherId, outputFormat: SceGxmOutputRegisterFormat, multisampleMode: SceGxmMultisampleMode, blendInfo: ^SceGxmBlendInfo, vertexProgram: ^SceGxmProgram, fragmentProgram: ^^SceGxmFragmentProgram) -> c.int ---
ShaderPatcherCreateMaskUpdateFragmentProgram :: proc(shaderPatcher: ^SceGxmShaderPatcher, fragmentProgram: ^^SceGxmFragmentProgram) -> c.int --- sceGxmShaderPatcherCreateMaskUpdateFragmentProgram :: proc(shaderPatcher: ^SceGxmShaderPatcher, fragmentProgram: ^^SceGxmFragmentProgram) -> c.int ---
ShaderPatcherAddRefVertexProgram :: proc(shaderPatcher: ^SceGxmShaderPatcher, vertexProgram: ^SceGxmVertexProgram) -> c.int --- sceGxmShaderPatcherAddRefVertexProgram :: proc(shaderPatcher: ^SceGxmShaderPatcher, vertexProgram: ^SceGxmVertexProgram) -> c.int ---
ShaderPatcherAddRefFragmentProgram :: proc(shaderPatcher: ^SceGxmShaderPatcher, fragmentProgram: ^SceGxmFragmentProgram) -> c.int --- sceGxmShaderPatcherAddRefFragmentProgram :: proc(shaderPatcher: ^SceGxmShaderPatcher, fragmentProgram: ^SceGxmFragmentProgram) -> c.int ---
ShaderPatcherGetVertexProgramRefCount :: proc(shaderPatcher: ^SceGxmShaderPatcher, fragmentProgram: ^SceGxmVertexProgram, count: ^c.uint) -> c.int --- sceGxmShaderPatcherGetVertexProgramRefCount :: proc(shaderPatcher: ^SceGxmShaderPatcher, fragmentProgram: ^SceGxmVertexProgram, count: ^c.uint) -> c.int ---
ShaderPatcherGetFragmentProgramRefCount :: proc(shaderPatcher: ^SceGxmShaderPatcher, fragmentProgram: ^SceGxmFragmentProgram, count: ^c.uint) -> c.int --- sceGxmShaderPatcherGetFragmentProgramRefCount :: proc(shaderPatcher: ^SceGxmShaderPatcher, fragmentProgram: ^SceGxmFragmentProgram, count: ^c.uint) -> c.int ---
ShaderPatcherReleaseVertexProgram :: proc(shaderPatcher: ^SceGxmShaderPatcher, vertexProgram: ^SceGxmVertexProgram) -> c.int --- sceGxmShaderPatcherReleaseVertexProgram :: proc(shaderPatcher: ^SceGxmShaderPatcher, vertexProgram: ^SceGxmVertexProgram) -> c.int ---
ShaderPatcherReleaseFragmentProgram :: proc(shaderPatcher: ^SceGxmShaderPatcher, fragmentProgram: ^SceGxmFragmentProgram) -> c.int --- sceGxmShaderPatcherReleaseFragmentProgram :: proc(shaderPatcher: ^SceGxmShaderPatcher, fragmentProgram: ^SceGxmFragmentProgram) -> c.int ---
ShaderPatcherGetHostMemAllocated :: proc(shaderPatcher: ^SceGxmShaderPatcher) -> c.uint --- sceGxmShaderPatcherGetHostMemAllocated :: proc(shaderPatcher: ^SceGxmShaderPatcher) -> c.uint ---
ShaderPatcherGetBufferMemAllocated :: proc(shaderPatcher: ^SceGxmShaderPatcher) -> c.uint --- sceGxmShaderPatcherGetBufferMemAllocated :: proc(shaderPatcher: ^SceGxmShaderPatcher) -> c.uint ---
ShaderPatcherGetVertexUsseMemAllocated :: proc(shaderPatcher: ^SceGxmShaderPatcher) -> c.uint --- sceGxmShaderPatcherGetVertexUsseMemAllocated :: proc(shaderPatcher: ^SceGxmShaderPatcher) -> c.uint ---
ShaderPatcherGetFragmentUsseMemAllocated :: proc(shaderPatcher: ^SceGxmShaderPatcher) -> c.uint --- sceGxmShaderPatcherGetFragmentUsseMemAllocated :: proc(shaderPatcher: ^SceGxmShaderPatcher) -> c.uint ---
TextureInitSwizzled :: proc(texture: ^SceGxmTexture, data: rawptr, texFormat: SceGxmTextureFormat, width: c.uint, height: c.uint, mipCount: c.uint) -> c.int --- sceGxmTextureInitSwizzled :: proc(texture: ^SceGxmTexture, data: rawptr, texFormat: SceGxmTextureFormat, width: c.uint, height: c.uint, mipCount: c.uint) -> c.int ---
TextureInitSwizzledArbitrary :: proc(texture: ^SceGxmTexture, data: rawptr, texFormat: SceGxmTextureFormat, width: c.uint, height: c.uint, mipCount: c.uint) -> c.int --- sceGxmTextureInitSwizzledArbitrary :: proc(texture: ^SceGxmTexture, data: rawptr, texFormat: SceGxmTextureFormat, width: c.uint, height: c.uint, mipCount: c.uint) -> c.int ---
TextureInitLinear :: proc(texture: ^SceGxmTexture, data: rawptr, texFormat: SceGxmTextureFormat, width: c.uint, height: c.uint, mipCount: c.uint) -> c.int --- sceGxmTextureInitLinear :: proc(texture: ^SceGxmTexture, data: rawptr, texFormat: SceGxmTextureFormat, width: c.uint, height: c.uint, mipCount: c.uint) -> c.int ---
TextureInitLinearStrided :: proc(texture: ^SceGxmTexture, data: rawptr, texFormat: SceGxmTextureFormat, width: c.uint, height: c.uint, byteStride: c.uint) -> c.int --- sceGxmTextureInitLinearStrided :: proc(texture: ^SceGxmTexture, data: rawptr, texFormat: SceGxmTextureFormat, width: c.uint, height: c.uint, byteStride: c.uint) -> c.int ---
TextureInitTiled :: proc(texture: ^SceGxmTexture, data: rawptr, texFormat: SceGxmTextureFormat, width: c.uint, height: c.uint, mipCount: c.uint) -> c.int --- sceGxmTextureInitTiled :: proc(texture: ^SceGxmTexture, data: rawptr, texFormat: SceGxmTextureFormat, width: c.uint, height: c.uint, mipCount: c.uint) -> c.int ---
TextureInitCube :: proc(texture: ^SceGxmTexture, data: rawptr, texFormat: SceGxmTextureFormat, width: c.uint, height: c.uint, mipCount: c.uint) -> c.int --- sceGxmTextureInitCube :: proc(texture: ^SceGxmTexture, data: rawptr, texFormat: SceGxmTextureFormat, width: c.uint, height: c.uint, mipCount: c.uint) -> c.int ---
TextureGetType :: proc(texture: ^SceGxmTexture) -> SceGxmTextureType --- sceGxmTextureGetType :: proc(texture: ^SceGxmTexture) -> SceGxmTextureType ---
TextureValidate :: proc(texture: ^SceGxmTexture) -> c.int --- sceGxmTextureValidate :: proc(texture: ^SceGxmTexture) -> c.int ---
TextureSetMinFilter :: proc(texture: ^SceGxmTexture, minFilter: SceGxmTextureFilter) -> c.int --- sceGxmTextureSetMinFilter :: proc(texture: ^SceGxmTexture, minFilter: SceGxmTextureFilter) -> c.int ---
TextureGetMinFilter :: proc(texture: ^SceGxmTexture) -> SceGxmTextureFilter --- sceGxmTextureGetMinFilter :: proc(texture: ^SceGxmTexture) -> SceGxmTextureFilter ---
TextureSetMagFilter :: proc(texture: ^SceGxmTexture, magFilter: SceGxmTextureFilter) -> c.int --- sceGxmTextureSetMagFilter :: proc(texture: ^SceGxmTexture, magFilter: SceGxmTextureFilter) -> c.int ---
TextureGetMagFilter :: proc(texture: ^SceGxmTexture) -> SceGxmTextureFilter --- sceGxmTextureGetMagFilter :: proc(texture: ^SceGxmTexture) -> SceGxmTextureFilter ---
TextureSetMipFilter :: proc(texture: ^SceGxmTexture, mipFilter: SceGxmTextureMipFilter) -> c.int --- sceGxmTextureSetMipFilter :: proc(texture: ^SceGxmTexture, mipFilter: SceGxmTextureMipFilter) -> c.int ---
TextureGetMipFilter :: proc(texture: ^SceGxmTexture) -> SceGxmTextureMipFilter --- sceGxmTextureGetMipFilter :: proc(texture: ^SceGxmTexture) -> SceGxmTextureMipFilter ---
TextureSetUAddrMode :: proc(texture: ^SceGxmTexture, addrMode: SceGxmTextureAddrMode) -> c.int --- sceGxmTextureSetUAddrMode :: proc(texture: ^SceGxmTexture, addrMode: SceGxmTextureAddrMode) -> c.int ---
TextureGetUAddrMode :: proc(texture: ^SceGxmTexture) -> SceGxmTextureAddrMode --- sceGxmTextureGetUAddrMode :: proc(texture: ^SceGxmTexture) -> SceGxmTextureAddrMode ---
TextureSetVAddrMode :: proc(texture: ^SceGxmTexture, addrMode: SceGxmTextureAddrMode) -> c.int --- sceGxmTextureSetVAddrMode :: proc(texture: ^SceGxmTexture, addrMode: SceGxmTextureAddrMode) -> c.int ---
TextureGetVAddrMode :: proc(texture: ^SceGxmTexture) -> SceGxmTextureAddrMode --- sceGxmTextureGetVAddrMode :: proc(texture: ^SceGxmTexture) -> SceGxmTextureAddrMode ---
TextureSetFormat :: proc(texture: ^SceGxmTexture, texFormat: SceGxmTextureFormat ) -> c.int --- sceGxmTextureSetFormat :: proc(texture: ^SceGxmTexture, texFormat: SceGxmTextureFormat ) -> c.int ---
TextureGetFormat :: proc( texture: ^SceGxmTexture) -> SceGxmTextureFormat --- sceGxmTextureGetFormat :: proc( texture: ^SceGxmTexture) -> SceGxmTextureFormat ---
TextureSetLodBias :: proc(texture: ^SceGxmTexture, bias: c.uint) -> c.int --- sceGxmTextureSetLodBias :: proc(texture: ^SceGxmTexture, bias: c.uint) -> c.int ---
TextureGetLodBias :: proc( texture: ^SceGxmTexture) -> c.uint --- sceGxmTextureGetLodBias :: proc( texture: ^SceGxmTexture) -> c.uint ---
TextureSetStride :: proc(texture: ^SceGxmTexture, byteStride: c.uint) -> c.int --- sceGxmTextureSetStride :: proc(texture: ^SceGxmTexture, byteStride: c.uint) -> c.int ---
TextureGetStride :: proc( texture: ^SceGxmTexture) -> c.uint --- sceGxmTextureGetStride :: proc( texture: ^SceGxmTexture) -> c.uint ---
TextureSetWidth :: proc(texture: ^SceGxmTexture, width: c.uint) -> c.int --- sceGxmTextureSetWidth :: proc(texture: ^SceGxmTexture, width: c.uint) -> c.int ---
TextureGetWidth :: proc( texture: ^SceGxmTexture) -> c.uint --- sceGxmTextureGetWidth :: proc( texture: ^SceGxmTexture) -> c.uint ---
TextureSetHeight :: proc(texture: ^SceGxmTexture, height: c.uint) -> c.int --- sceGxmTextureSetHeight :: proc(texture: ^SceGxmTexture, height: c.uint) -> c.int ---
TextureGetHeight :: proc( texture: ^SceGxmTexture) -> c.uint --- sceGxmTextureGetHeight :: proc( texture: ^SceGxmTexture) -> c.uint ---
TextureSetData :: proc(texture: ^SceGxmTexture, data: rawptr) -> c.int --- sceGxmTextureSetData :: proc(texture: ^SceGxmTexture, data: rawptr) -> c.int ---
TextureGetData :: proc( texture: ^SceGxmTexture) -> rawptr --- sceGxmTextureGetData :: proc( texture: ^SceGxmTexture) -> rawptr ---
TextureSetMipmapCount :: proc(texture: ^SceGxmTexture, mipCount: c.uint) -> c.int --- sceGxmTextureSetMipmapCount :: proc(texture: ^SceGxmTexture, mipCount: c.uint) -> c.int ---
TextureGetMipmapCount :: proc( texture: ^SceGxmTexture) -> c.uint --- sceGxmTextureGetMipmapCount :: proc( texture: ^SceGxmTexture) -> c.uint ---
TextureSetPalette :: proc(texture: ^SceGxmTexture, paletteData: rawptr) -> c.int --- sceGxmTextureSetPalette :: proc(texture: ^SceGxmTexture, paletteData: rawptr) -> c.int ---
TextureGetPalette :: proc( texture: ^SceGxmTexture) -> rawptr --- sceGxmTextureGetPalette :: proc( texture: ^SceGxmTexture) -> rawptr ---
TextureGetGammaMode :: proc( texture: ^SceGxmTexture) -> SceGxmTextureGammaMode --- sceGxmTextureGetGammaMode :: proc( texture: ^SceGxmTexture) -> SceGxmTextureGammaMode ---
TextureSetGammaMode :: proc(texture: ^SceGxmTexture, gammaMode: SceGxmTextureGammaMode) -> c.int --- sceGxmTextureSetGammaMode :: proc(texture: ^SceGxmTexture, gammaMode: SceGxmTextureGammaMode) -> c.int ---
GetPrecomputedVertexStateSize :: proc( vertexProgram: ^SceGxmVertexProgram) -> c.uint --- sceGxmGetPrecomputedVertexStateSize :: proc( vertexProgram: ^SceGxmVertexProgram) -> c.uint ---
PrecomputedVertexStateInit :: proc(precomputedState: ^SceGxmPrecomputedVertexState, vertexProgram: ^SceGxmVertexProgram, memBlock: rawptr) -> c.int --- sceGxmPrecomputedVertexStateInit :: proc(precomputedState: ^SceGxmPrecomputedVertexState, vertexProgram: ^SceGxmVertexProgram, memBlock: rawptr) -> c.int ---
PrecomputedVertexStateSetDefaultUniformBuffer :: proc(precomputedState: ^SceGxmPrecomputedVertexState, defaultBuffer: rawptr) --- sceGxmPrecomputedVertexStateSetDefaultUniformBuffer :: proc(precomputedState: ^SceGxmPrecomputedVertexState, defaultBuffer: rawptr) ---
PrecomputedVertexStateGetDefaultUniformBuffer :: proc( precomputedState: ^SceGxmPrecomputedVertexState) -> rawptr --- sceGxmPrecomputedVertexStateGetDefaultUniformBuffer :: proc( precomputedState: ^SceGxmPrecomputedVertexState) -> rawptr ---
PrecomputedVertexStateSetAllTextures :: proc(precomputedState: ^SceGxmPrecomputedVertexState, textures: ^SceGxmTexture) -> c.int --- sceGxmPrecomputedVertexStateSetAllTextures :: proc(precomputedState: ^SceGxmPrecomputedVertexState, textures: ^SceGxmTexture) -> c.int ---
PrecomputedVertexStateSetTexture :: proc(precomputedState: ^SceGxmPrecomputedVertexState, textureIndex: c.uint, texture: ^SceGxmTexture) -> c.int --- sceGxmPrecomputedVertexStateSetTexture :: proc(precomputedState: ^SceGxmPrecomputedVertexState, textureIndex: c.uint, texture: ^SceGxmTexture) -> c.int ---
PrecomputedVertexStateSetAllUniformBuffers :: proc(precomputedState: ^SceGxmPrecomputedVertexState, bufferDataArray: ^rawptr) -> c.int --- sceGxmPrecomputedVertexStateSetAllUniformBuffers :: proc(precomputedState: ^SceGxmPrecomputedVertexState, bufferDataArray: ^rawptr) -> c.int ---
PrecomputedVertexStateSetUniformBuffer :: proc(precomputedState: ^SceGxmPrecomputedVertexState, bufferIndex: c.uint, bufferData: rawptr) -> c.int --- sceGxmPrecomputedVertexStateSetUniformBuffer :: proc(precomputedState: ^SceGxmPrecomputedVertexState, bufferIndex: c.uint, bufferData: rawptr) -> c.int ---
GetPrecomputedFragmentStateSize :: proc(fragmentProgram: ^SceGxmFragmentProgram) -> c.uint --- sceGxmGetPrecomputedFragmentStateSize :: proc(fragmentProgram: ^SceGxmFragmentProgram) -> c.uint ---
PrecomputedFragmentStateInit :: proc(precomputedState: ^SceGxmPrecomputedFragmentState, fragmentProgram: ^SceGxmFragmentProgram, memBlock: rawptr) -> c.int --- sceGxmPrecomputedFragmentStateInit :: proc(precomputedState: ^SceGxmPrecomputedFragmentState, fragmentProgram: ^SceGxmFragmentProgram, memBlock: rawptr) -> c.int ---
PrecomputedFragmentStateSetDefaultUniformBuffer :: proc(precomputedState: ^SceGxmPrecomputedFragmentState, defaultBuffer: rawptr) --- sceGxmPrecomputedFragmentStateSetDefaultUniformBuffer :: proc(precomputedState: ^SceGxmPrecomputedFragmentState, defaultBuffer: rawptr) ---
PrecomputedFragmentStateGetDefaultUniformBuffer :: proc(precomputedState: ^SceGxmPrecomputedFragmentState) -> rawptr --- sceGxmPrecomputedFragmentStateGetDefaultUniformBuffer :: proc(precomputedState: ^SceGxmPrecomputedFragmentState) -> rawptr ---
PrecomputedFragmentStateSetAllTextures :: proc(precomputedState: ^SceGxmPrecomputedFragmentState, textureArray: [^]SceGxmTexture) -> c.int --- sceGxmPrecomputedFragmentStateSetAllTextures :: proc(precomputedState: ^SceGxmPrecomputedFragmentState, textureArray: [^]SceGxmTexture) -> c.int ---
PrecomputedFragmentStateSetTexture :: proc(precomputedState: ^SceGxmPrecomputedFragmentState, textureIndex: c.uint, texture: ^SceGxmTexture) -> c.int --- sceGxmPrecomputedFragmentStateSetTexture :: proc(precomputedState: ^SceGxmPrecomputedFragmentState, textureIndex: c.uint, texture: ^SceGxmTexture) -> c.int ---
PrecomputedFragmentStateSetAllUniformBuffers :: proc(precomputedState: ^SceGxmPrecomputedFragmentState, bufferDataArray: ^rawptr) -> c.int --- sceGxmPrecomputedFragmentStateSetAllUniformBuffers :: proc(precomputedState: ^SceGxmPrecomputedFragmentState, bufferDataArray: ^rawptr) -> c.int ---
PrecomputedFragmentStateSetUniformBuffer :: proc(precomputedState: ^SceGxmPrecomputedFragmentState, bufferIndex: c.uint, bufferData: rawptr) -> c.int --- sceGxmPrecomputedFragmentStateSetUniformBuffer :: proc(precomputedState: ^SceGxmPrecomputedFragmentState, bufferIndex: c.uint, bufferData: rawptr) -> c.int ---
PrecomputedFragmentStateSetAllAuxiliarySurfaces :: proc(precomputedState: ^SceGxmPrecomputedFragmentState, auxSurfaceArray: ^SceGxmAuxiliarySurface) -> c.int --- sceGxmPrecomputedFragmentStateSetAllAuxiliarySurfaces :: proc(precomputedState: ^SceGxmPrecomputedFragmentState, auxSurfaceArray: ^SceGxmAuxiliarySurface) -> c.int ---
GetPrecomputedDrawSize :: proc( vertexProgram: ^SceGxmVertexProgram) -> c.uint --- sceGxmGetPrecomputedDrawSize :: proc( vertexProgram: ^SceGxmVertexProgram) -> c.uint ---
PrecomputedDrawInit :: proc(precomputedDraw: ^SceGxmPrecomputedDraw, vertexProgram: ^SceGxmVertexProgram, memBlock: rawptr) -> c.int --- sceGxmPrecomputedDrawInit :: proc(precomputedDraw: ^SceGxmPrecomputedDraw, vertexProgram: ^SceGxmVertexProgram, memBlock: rawptr) -> c.int ---
PrecomputedDrawSetAllVertexStreams :: proc(precomputedDraw: ^SceGxmPrecomputedDraw, streamDataArray: ^rawptr) -> c.int --- sceGxmPrecomputedDrawSetAllVertexStreams :: proc(precomputedDraw: ^SceGxmPrecomputedDraw, streamDataArray: ^rawptr) -> c.int ---
PrecomputedDrawSetVertexStream :: proc(precomputedDraw: ^SceGxmPrecomputedDraw, streamIndex: c.uint, streamData: rawptr) -> c.int --- sceGxmPrecomputedDrawSetVertexStream :: proc(precomputedDraw: ^SceGxmPrecomputedDraw, streamIndex: c.uint, streamData: rawptr) -> c.int ---
PrecomputedDrawSetParams :: proc(precomputedDraw: ^SceGxmPrecomputedDraw, primType: SceGxmPrimitiveType, indexType: SceGxmIndexFormat, indexData: rawptr, indexCount: c.uint) --- sceGxmPrecomputedDrawSetParams :: proc(precomputedDraw: ^SceGxmPrecomputedDraw, primType: SceGxmPrimitiveType, indexType: SceGxmIndexFormat, indexData: rawptr, indexCount: c.uint) ---
PrecomputedDrawSetParamsInstanced :: proc(precomputedDraw: ^SceGxmPrecomputedDraw, primType: SceGxmPrimitiveType, indexType: SceGxmIndexFormat, indexData: rawptr, indexCount: c.uint, indexWrap: c.uint) --- sceGxmPrecomputedDrawSetParamsInstanced :: proc(precomputedDraw: ^SceGxmPrecomputedDraw, primType: SceGxmPrimitiveType, indexType: SceGxmIndexFormat, indexData: rawptr, indexCount: c.uint, indexWrap: c.uint) ---
GetRenderTargetMemSize :: proc(params: ^SceGxmRenderTargetParams, driverMemSize: ^c.uint) -> c.int --- sceGxmGetRenderTargetMemSize :: proc(params: ^SceGxmRenderTargetParams, driverMemSize: ^c.uint) -> c.int ---
CreateRenderTarget :: proc(params: ^SceGxmRenderTargetParams, renderTarget: ^^SceGxmRenderTarget) -> c.int --- sceGxmCreateRenderTarget :: proc(params: ^SceGxmRenderTargetParams, renderTarget: ^^SceGxmRenderTarget) -> c.int ---
RenderTargetGetHostMem :: proc(renderTarget: ^SceGxmRenderTarget, hostMem: ^rawptr) -> c.int --- sceGxmRenderTargetGetHostMem :: proc(renderTarget: ^SceGxmRenderTarget, hostMem: ^rawptr) -> c.int ---
RenderTargetGetDriverMemBlock :: proc(renderTarget: ^SceGxmRenderTarget, driverMemBlock: ^sce.UID) -> c.int --- sceGxmRenderTargetGetDriverMemBlock :: proc(renderTarget: ^SceGxmRenderTarget, driverMemBlock: ^sce.UID) -> c.int ---
DestroyRenderTarget :: proc(renderTarget: ^SceGxmRenderTarget) -> c.int --- sceGxmDestroyRenderTarget :: proc(renderTarget: ^SceGxmRenderTarget) -> c.int ---
SetUniformDataF :: proc(uniformBuffer: rawptr, parameter: ^SceGxmProgramParameter, componentOffset: c.uint, componentCount: c.uint, sourceData: ^c.float) -> c.int --- sceGxmSetUniformDataF :: proc(uniformBuffer: rawptr, parameter: ^SceGxmProgramParameter, componentOffset: c.uint, componentCount: c.uint, sourceData: ^c.float) -> c.int ---
TransferCopy :: proc(width: c.uint32_t, height: c.uint32_t, colorKeyValue: c.uint32_t, colorKeyMask: c.uint32_t, colorKeyMode: SceGxmTransferColorKeyMode, srcFormat: SceGxmTransferFormat, srcType: SceGxmTransferType, srcAddress: rawptr, srcX: c.uint32_t, srcY: c.uint32_t, srcStride: c.int32_t, destFormat: SceGxmTransferFormat, destType: SceGxmTransferType, destAddress: rawptr, destX: c.uint32_t, destY: c.uint32_t, destStride: c.int32_t, syncObject: ^SceGxmSyncObject, syncFlags: c.uint32_t, notification: ^SceGxmNotification) -> c.int --- sceGxmTransferCopy :: proc(width: c.uint32_t, height: c.uint32_t, colorKeyValue: c.uint32_t, colorKeyMask: c.uint32_t, colorKeyMode: SceGxmTransferColorKeyMode, srcFormat: SceGxmTransferFormat, srcType: SceGxmTransferType, srcAddress: rawptr, srcX: c.uint32_t, srcY: c.uint32_t, srcStride: c.int32_t, destFormat: SceGxmTransferFormat, destType: SceGxmTransferType, destAddress: rawptr, destX: c.uint32_t, destY: c.uint32_t, destStride: c.int32_t, syncObject: ^SceGxmSyncObject, syncFlags: c.uint32_t, notification: ^SceGxmNotification) -> c.int ---
TransferDownscale :: proc(srcFormat: SceGxmTransferFormat, srcAddress: rawptr, srcX: c.uint, srcY: c.uint, srcWidth: c.uint, srcHeight: c.uint, srcStride: c.int, destFormat: SceGxmTransferFormat, destAddress: rawptr, destX: c.uint, destY: c.uint, destStride: c.int, syncObject: ^SceGxmSyncObject, syncFlags: c.uint, notification: ^SceGxmNotification) -> c.int --- sceGxmTransferDownscale :: proc(srcFormat: SceGxmTransferFormat, srcAddress: rawptr, srcX: c.uint, srcY: c.uint, srcWidth: c.uint, srcHeight: c.uint, srcStride: c.int, destFormat: SceGxmTransferFormat, destAddress: rawptr, destX: c.uint, destY: c.uint, destStride: c.int, syncObject: ^SceGxmSyncObject, syncFlags: c.uint, notification: ^SceGxmNotification) -> c.int ---
TransferFill :: proc(color: c.uint32_t, destFormat: SceGxmTransferFormat, destAddress: rawptr, destX: c.uint32_t, destY: c.uint32_t, destWidth: c.uint32_t, destHeight: c.uint32_t, destStride: c.int32_t, syncObject: ^SceGxmSyncObject, syncFlags: c.uint32_t, notification: ^SceGxmNotification) -> c.int --- sceGxmTransferFill :: proc(color: c.uint32_t, destFormat: SceGxmTransferFormat, destAddress: rawptr, destX: c.uint32_t, destY: c.uint32_t, destWidth: c.uint32_t, destHeight: c.uint32_t, destStride: c.int32_t, syncObject: ^SceGxmSyncObject, syncFlags: c.uint32_t, notification: ^SceGxmNotification) -> c.int ---
TransferFinish :: proc() -> c.int --- sceGxmTransferFinish :: proc() -> c.int ---
} }
+5 -7
View File
@@ -5,7 +5,6 @@ import sce "../common"
foreign import hid "system:SceHid_stub" foreign import hid "system:SceHid_stub"
@(link_prefix = "sceHid")
foreign hid { foreign hid {
/** /**
* Enumerate hid keyboards. * Enumerate hid keyboards.
@@ -13,8 +12,7 @@ foreign hid {
* @param[out] handle Buffer to receive keyboard hid handles. * @param[out] handle Buffer to receive keyboard hid handles.
* @param[int] count Number of keyboards to enumerate * @param[int] count Number of keyboards to enumerate
*/ */
KeyboardEnumerate :: proc(handle: [^]c.int, count: c.int) -> c.int --- sceHidKeyboardEnumerate :: proc(handle: [^]c.int, count: c.int) -> c.int ---
/** /**
* Get hid keyboard reports (blocking). * Get hid keyboard reports (blocking).
@@ -23,7 +21,7 @@ foreign hid {
* @param[in] reports Buffer to receive reports. * @param[in] reports Buffer to receive reports.
* @param[in] nReports Number of reports to receive. * @param[in] nReports Number of reports to receive.
*/ */
KeyboardRead :: proc(handle: sce.UInt32, reports: []^SceHidKeyboardReport, nReports: c.int) -> c.int --- sceHidKeyboardRead :: proc(handle: sce.UInt32, reports: []^SceHidKeyboardReport, nReports: c.int) -> c.int ---
/** /**
* Get hid keyboard reports (non-blocking). * Get hid keyboard reports (non-blocking).
@@ -32,7 +30,7 @@ foreign hid {
* @param[in] reports Buffer to receive reports. * @param[in] reports Buffer to receive reports.
* @param[in] nReports Number of reports to receive. * @param[in] nReports Number of reports to receive.
*/ */
KeyboardPeek :: proc(handle: sce.UInt32, reports: [^]SceHidKeyboardReport, nReports: c.int) -> c.int --- sceHidKeyboardPeek :: proc(handle: sce.UInt32, reports: [^]SceHidKeyboardReport, nReports: c.int) -> c.int ---
/** /**
* Enumerate hid mice. * Enumerate hid mice.
@@ -40,7 +38,7 @@ foreign hid {
* @param[out] handle Buffer to receive mouse hid handles. * @param[out] handle Buffer to receive mouse hid handles.
* @param[int] count Number of mice to enumerate * @param[int] count Number of mice to enumerate
*/ */
MouseEnumerate :: proc(handle: [^]c.int, count: c.int) -> c.int --- sceHidMouseEnumerate :: proc(handle: [^]c.int, count: c.int) -> c.int ---
/** /**
@@ -50,5 +48,5 @@ foreign hid {
* @param[in] reports Buffer to receive reports. * @param[in] reports Buffer to receive reports.
* @param[in] nReports Number of reports to receive. * @param[in] nReports Number of reports to receive.
*/ */
MouseRead :: proc(handle: sce.UInt32, reports: []^SceHidMouseReport, nReports: c.int) -> c.int --- sceHidMouseRead :: proc(handle: sce.UInt32, reports: []^SceHidMouseReport, nReports: c.int) -> c.int ---
} }
+6 -7
View File
@@ -21,13 +21,12 @@ SceI2cDebugHandlers :: struct {
write_read_end: #type ^proc "c" (bus: c.int, error: c.int, result: c.int), write_read_end: #type ^proc "c" (bus: c.int, error: c.int, result: c.int),
} }
@(link_prefix = "ksceI2c")
foreign i2c { foreign i2c {
Init :: proc(bus: c.int) -> c.int --- ksceI2cInit :: proc(bus: c.int) -> c.int ---
Reset :: proc(bus: c.int) -> c.int --- ksceI2cReset :: proc(bus: c.int) -> c.int ---
TransferRead :: proc(bus: c.int, addr: c.uint, buffer: [^]c.uchar, size: c.int) -> c.int --- ksceI2cTransferRead :: proc(bus: c.int, addr: c.uint, buffer: [^]c.uchar, size: c.int) -> c.int ---
TransferWrite :: proc(bus: c.int, addr: c.uint, buffer: [^]c.uchar, size: c.int) -> c.int --- ksceI2cTransferWrite :: proc(bus: c.int, addr: c.uint, buffer: [^]c.uchar, size: c.int) -> c.int ---
TransferWriteRead :: proc(bus: c.int, write_addr: c.uint, write_buffer: [^]c.uchar, write_size: c.int, read_addr: c.uint, read_buffer: [^]c.uchar, read_size: c.int) -> c.int --- ksceI2cTransferWriteRead :: proc(bus: c.int, write_addr: c.uint, write_buffer: [^]c.uchar, write_size: c.int, read_addr: c.uint, read_buffer: [^]c.uchar, read_size: c.int) -> c.int ---
SetDebugHandlers :: proc(bus: c.int, debug_handlers: ^SceI2cDebugHandlers) -> c.int --- ksceI2cSetDebugHandlers :: proc(bus: c.int, debug_handlers: ^SceI2cDebugHandlers) -> c.int ---
} }
+2 -3
View File
@@ -5,7 +5,6 @@ import sce "../common"
foreign import idstorage "system:SceIdStorageForDriver_stub" foreign import idstorage "system:SceIdStorageForDriver_stub"
@(link_prefix = "ksceIdStorage")
foreign idstorage { foreign idstorage {
/** /**
* @param[in] leafnum - The read target leaf number * @param[in] leafnum - The read target leaf number
@@ -13,7 +12,7 @@ foreign idstorage {
* *
* @return 0 on success, < 0 on error. * @return 0 on success, < 0 on error.
*/ */
ReadLeaf :: proc(leafnum: sce.Size, buf: rawptr) -> c.int --- ksceIdStorageReadLeaf :: proc(leafnum: sce.Size, buf: rawptr) -> c.int ---
/** /**
* @param[in] leafnum - The write target leaf number * @param[in] leafnum - The write target leaf number
@@ -23,5 +22,5 @@ foreign idstorage {
* *
* note - Writing to leaf requires manufacturing mode. * note - Writing to leaf requires manufacturing mode.
*/ */
WriteLeaf :: proc(leafnum: sce.Size, buf: rawptr) -> c.int --- ksceIdStorageWriteLeaf :: proc(leafnum: sce.Size, buf: rawptr) -> c.int ---
} }
+1 -2
View File
@@ -4,8 +4,7 @@ import "core:c"
foreign import iftu "system:SceIftuForDriver_stub" foreign import iftu "system:SceIftuForDriver_stub"
@(link_prefix = "ksceIftu")
foreign iftu { foreign iftu {
Csc :: proc(dst: ^SceIftuFrameBuf, src: ^SceIftuPlaneState, params: ^SceIftuConvParams) -> c.int --- ksceIftuCsc :: proc(dst: ^SceIftuFrameBuf, src: ^SceIftuPlaneState, params: ^SceIftuConvParams) -> c.int ---
} }
-2
View File
@@ -18,8 +18,6 @@ sceImeParamInit :: #force_inline proc(param: ^SceImeParam) {
param.sdkVersion = sce.PSP2_SDK_VERSION param.sdkVersion = sce.PSP2_SDK_VERSION
} }
@(link_prefix = "sceIme")
foreign ime { foreign ime {
sceImeDialogInit :: proc(param: ^SceImeDialogParam) -> sce.Int32 --- sceImeDialogInit :: proc(param: ^SceImeDialogParam) -> sce.Int32 ---
sceImeDialogGetStatus :: proc() -> sceCommonDialog.SceCommonDialogStatus --- sceImeDialogGetStatus :: proc() -> sceCommonDialog.SceCommonDialogStatus ---
+6 -7
View File
@@ -11,35 +11,34 @@ sceIncomingDialogParamInit :: #force_inline proc(dialogParam: ^SceIncomingDialog
dialogParam.sdkVersion = sce.PSP2_SDK_VERSION dialogParam.sdkVersion = sce.PSP2_SDK_VERSION
} }
@(link_prefix = "sceIncomingDialog")
foreign incomingdialog { foreign incomingdialog {
/** /**
* Initialize incoming dialog library, init_type must be 1. * Initialize incoming dialog library, init_type must be 1.
*/ */
Initialize :: proc(init_type: c.int) -> sce.Int32 --- sceIncomingDialogInitialize :: proc(init_type: c.int) -> sce.Int32 ---
/** /**
* Open incoming dialog. * Open incoming dialog.
*/ */
Open :: proc(dialogParam: ^SceIncomingDialogParam) -> sce.Int32 --- sceIncomingDialogOpen :: proc(dialogParam: ^SceIncomingDialogParam) -> sce.Int32 ---
/** /**
* Returns current status of incoming dialog. * Returns current status of incoming dialog.
*/ */
GetStatus :: proc() -> sce.Int32 --- sceIncomingDialogGetStatus :: proc() -> sce.Int32 ---
/** /**
* Force exit to LiveArea and show dialog window * Force exit to LiveArea and show dialog window
*/ */
SwitchToDialog :: proc() -> sce.Int32 --- sceIncomingDialogSwitchToDialog :: proc() -> sce.Int32 ---
/** /**
* Close incoming dialog. * Close incoming dialog.
*/ */
Close :: proc() -> sce.Int32 --- sceIncomingDialogClose :: proc() -> sce.Int32 ---
/** /**
* Finish incoming dialog library * Finish incoming dialog library
*/ */
Finish :: proc() -> sce.Int32 --- sceIncomingDialogFinish :: proc() -> sce.Int32 ---
} }
+31 -33
View File
@@ -7,7 +7,6 @@ foreign import libkernel "system:SceLibKernel_stub"
foreign import iofilemgr "system:SceIofilemgr_stub" foreign import iofilemgr "system:SceIofilemgr_stub"
foreign import iofilemgrkern "system:SceIofilemgrForDriver_stub" foreign import iofilemgrkern "system:SceIofilemgrForDriver_stub"
@(link_prefix = "sceIo")
foreign libkernel { foreign libkernel {
/** /**
* Send a devctl command to a device. * Send a devctl command to a device.
@@ -26,7 +25,7 @@ foreign libkernel {
* @param outlen - Length of outdata, if 0 receives no data * @param outlen - Length of outdata, if 0 receives no data
* @return 0 on success, < 0 on error * @return 0 on success, < 0 on error
*/ */
Devctl :: proc(dev: cstring, cmd: c.uint, indata: rawptr, inlen: c.int, outdata: rawptr, outlen: c.int) -> c.int --- sceIoDevctl :: proc(dev: cstring, cmd: c.uint, indata: rawptr, inlen: c.int, outdata: rawptr, outlen: c.int) -> c.int ---
/** /**
* Perform an ioctl on a device. * Perform an ioctl on a device.
@@ -39,7 +38,7 @@ foreign libkernel {
* @param outlen - Length of outdata, if 0 receives no data * @param outlen - Length of outdata, if 0 receives no data
* @return 0 on success, < 0 on error * @return 0 on success, < 0 on error
*/ */
Ioctl :: proc(fd: sce.UID, cmd: c.uint, indata: rawptr, inlen: c.int, outdata: rawptr, outlen: c.int) -> c.int --- sceIoIoctl :: proc(fd: sce.UID, cmd: c.uint, indata: rawptr, inlen: c.int, outdata: rawptr, outlen: c.int) -> c.int ---
/** /**
* Perform an ioctl :: proc a device: c.in. asynchronous: ^) * Perform an ioctl :: proc a device: c.in. asynchronous: ^)
@@ -52,7 +51,7 @@ foreign libkernel {
* @param outlen - Length of outdata, if 0 receives no data * @param outlen - Length of outdata, if 0 receives no data
* @return 0 on success, < 0 on error * @return 0 on success, < 0 on error
*/ */
IoctlAsync :: proc(fd: sce.UID, cmd: c.uint, indata: rawptr, inlen: c.int, outdata: rawptr, outlen: c.int) -> c.int --- sceIoIoctlAsync :: proc(fd: sce.UID, cmd: c.uint, indata: rawptr, inlen: c.int, outdata: rawptr, outlen: c.int) -> c.int ---
/** /**
* Open a directory * Open a directory
@@ -67,7 +66,7 @@ foreign libkernel {
* @param dirname - The directory to open for reading. * @param dirname - The directory to open for reading.
* @return If >= 0 then a valid file descriptor, otherwise a Sony error code. * @return If >= 0 then a valid file descriptor, otherwise a Sony error code.
*/ */
Dopen :: proc(dirname: cstring) -> sce.UID --- sceIoDopen :: proc(dirname: cstring) -> sce.UID ---
/** /**
* Reads an entry from an opened file descriptor. * Reads an entry from an opened file descriptor.
@@ -80,7 +79,7 @@ foreign libkernel {
* - > 0 - More directory entries to go * - > 0 - More directory entries to go
* - < 0 - Error * - < 0 - Error
*/ */
Dread :: proc(fd: sce.UID, dir: ^SceIoDirent) -> c.int --- sceIoDread :: proc(fd: sce.UID, dir: ^SceIoDirent) -> c.int ---
/** /**
* Close an opened directory file descriptor * Close an opened directory file descriptor
@@ -88,7 +87,7 @@ foreign libkernel {
* @param fd - Already opened file descriptor (using ::sceIoDopen) * @param fd - Already opened file descriptor (using ::sceIoDopen)
* @return < 0 on error * @return < 0 on error
*/ */
Dclose :: proc(fd: sce.UID) -> c.int --- sceIoDclose :: proc(fd: sce.UID) -> c.int ---
/** /**
* Make a directory file * Make a directory file
@@ -97,7 +96,7 @@ foreign libkernel {
* @param mode - Access mode (One or more ::SceIoAccessMode). * @param mode - Access mode (One or more ::SceIoAccessMode).
* @return Returns the value 0 if it's successful, otherwise -1 * @return Returns the value 0 if it's successful, otherwise -1
*/ */
Mkdir :: proc(dir: cstring, mode: SceIoAccessMode) -> c.int --- sceIoMkdir :: proc(dir: cstring, mode: SceIoAccessMode) -> c.int ---
/** /**
* Remove a directory file * Remove a directory file
@@ -105,7 +104,7 @@ foreign libkernel {
* @param path - Removes a directory file pointed by the string path * @param path - Removes a directory file pointed by the string path
* @return Returns the value 0 if it's successful, otherwise -1 * @return Returns the value 0 if it's successful, otherwise -1
*/ */
Rmdir :: proc(path: cstring) -> c.int --- sceIoRmdir :: proc(path: cstring) -> c.int ---
/** /**
* Get the status of a file. * Get the status of a file.
@@ -115,7 +114,7 @@ foreign libkernel {
* *
* @return < 0 on error. * @return < 0 on error.
*/ */
Getstat :: proc(file: cstring, stat: ^SceIoStat) -> c.int --- sceIoGetstat :: proc(file: cstring, stat: ^SceIoStat) -> c.int ---
/** /**
* Get the status of a file descriptor. * Get the status of a file descriptor.
@@ -125,7 +124,7 @@ foreign libkernel {
* *
* @return < 0 on error. * @return < 0 on error.
*/ */
GetstatByFd :: proc(fd: sce.UID, stat: ^SceIoStat) -> c.int --- sceIoGetstatByFd :: proc(fd: sce.UID, stat: ^SceIoStat) -> c.int ---
/** /**
* Change the status of a file. * Change the status of a file.
@@ -136,7 +135,7 @@ foreign libkernel {
* *
* @return < 0 on error. * @return < 0 on error.
*/ */
Chstat :: proc(file: cstring, stat: ^SceIoStat, bits: c.int) -> c.int --- sceIoChstat :: proc(file: cstring, stat: ^SceIoStat, bits: c.int) -> c.int ---
/** /**
* Change the status of a file descriptor. * Change the status of a file descriptor.
@@ -147,10 +146,9 @@ foreign libkernel {
* *
* @return < 0 on error. * @return < 0 on error.
*/ */
ChstatByFd :: proc(fd: sce.UID, buf: ^SceIoStat, cbit: c.uint) -> c.int --- sceIoChstatByFd :: proc(fd: sce.UID, buf: ^SceIoStat, cbit: c.uint) -> c.int ---
} }
@(link_prefix = "sceIo")
foreign iofilemgr { foreign iofilemgr {
/** /**
* Open or create a file for reading or writing * Open or create a file for reading or writing
@@ -173,7 +171,7 @@ foreign iofilemgr {
* @param mode - One or more ::SceIoAccessMode flags or'ed together. Can also use Unix absolute permissions. * @param mode - One or more ::SceIoAccessMode flags or'ed together. Can also use Unix absolute permissions.
* @return > 0 is a valid file handle, < 0 on error. * @return > 0 is a valid file handle, < 0 on error.
*/ */
Open :: proc(file: cstring, flags: SceIoMode, mode: sce.Mode) -> sce.UID --- sceIoOpen :: proc(file: cstring, flags: SceIoMode, mode: sce.Mode) -> sce.UID ---
/** /**
* Delete a descriptor * Delete a descriptor
@@ -185,7 +183,7 @@ foreign iofilemgr {
* @param fd - File descriptor to close * @param fd - File descriptor to close
* @return < 0 on error * @return < 0 on error
*/ */
Close :: proc(fd: sce.UID) -> c.int --- sceIoClose :: proc(fd: sce.UID) -> c.int ---
/** /**
* Read input * Read input
@@ -201,7 +199,7 @@ foreign iofilemgr {
* *
* @return The number of bytes read * @return The number of bytes read
*/ */
Read :: proc(fd: sce.UID, buf: rawptr, nbyte: sce.Size) -> sce.SSize --- sceIoRead :: proc(fd: sce.UID, buf: rawptr, nbyte: sce.Size) -> sce.SSize ---
/** /**
* Read input at offset * Read input at offset
@@ -218,7 +216,7 @@ foreign iofilemgr {
* *
* @return < 0 on error. * @return < 0 on error.
*/ */
Pread :: proc(fd: sce.UID, data: rawptr, size: sce.Size, offset: sce.Off) -> c.int --- sceIoPread :: proc(fd: sce.UID, data: rawptr, size: sce.Size, offset: sce.Off) -> c.int ---
/** /**
* Write output * Write output
@@ -234,7 +232,7 @@ foreign iofilemgr {
* *
* @return The number of bytes written * @return The number of bytes written
*/ */
Write :: proc(fd: sce.UID, buf: rawptr, nbyte: sce.Size) -> sce.SSize --- sceIoWrite :: proc(fd: sce.UID, buf: rawptr, nbyte: sce.Size) -> sce.SSize ---
/** /**
* Write output at offset * Write output at offset
@@ -251,7 +249,7 @@ foreign iofilemgr {
* *
* @return The number of bytes written * @return The number of bytes written
*/ */
Pwrite :: proc(fd: sce.UID, data: rawptr, size: sce.Size, offset: sce.Off) -> c.int --- sceIoPwrite :: proc(fd: sce.UID, data: rawptr, size: sce.Size, offset: sce.Off) -> c.int ---
/** /**
* Reposition read/write file descriptor offset * Reposition read/write file descriptor offset
@@ -267,7 +265,7 @@ foreign iofilemgr {
* *
* @return The position in the file after the seek. * @return The position in the file after the seek.
*/ */
Lseek :: proc(fd: sce.UID, offset: sce.Off, whence: SceIoSeekMode) -> sce.Off --- sceIoLseek :: proc(fd: sce.UID, offset: sce.Off, whence: SceIoSeekMode) -> sce.Off ---
/** /**
* Reposition read/write file descriptor offset (32bit mode) * Reposition read/write file descriptor offset (32bit mode)
@@ -283,7 +281,7 @@ foreign iofilemgr {
* *
* @return The position in the file after the seek. * @return The position in the file after the seek.
*/ */
Lseek32 :: proc(fd: sce.UID, offset: c.long, whence: SceIoSeekMode) -> c.long --- sceIoLseek32 :: proc(fd: sce.UID, offset: c.long, whence: SceIoSeekMode) -> c.long ---
/** /**
* Remove directory entry * Remove directory entry
@@ -291,7 +289,7 @@ foreign iofilemgr {
* @param file - Path to the file to remove * @param file - Path to the file to remove
* @return < 0 on error * @return < 0 on error
*/ */
Remove :: proc(file: cstring) -> c.int --- sceIoRemove :: proc(file: cstring) -> c.int ---
/** /**
* Change the name of a file * Change the name of a file
@@ -300,7 +298,7 @@ foreign iofilemgr {
* @param newname - The new filename * @param newname - The new filename
* @return < 0 on error. * @return < 0 on error.
*/ */
Rename :: proc(oldname: cstring, newname: cstring) -> c.int --- sceIoRename :: proc(oldname: cstring, newname: cstring) -> c.int ---
/** /**
* Synchronize the file data on the device. * Synchronize the file data on the device.
@@ -308,7 +306,7 @@ foreign iofilemgr {
* @param device - The device to synchronize (e.g. msfat0:) * @param device - The device to synchronize (e.g. msfat0:)
* @param unk - Unknown * @param unk - Unknown
*/ */
Sync :: proc(device: cstring, flag: c.int) -> c.int --- sceIoSync :: proc(device: cstring, flag: c.int) -> c.int ---
/** /**
* Synchronize the file data for one file * Synchronize the file data for one file
@@ -318,7 +316,7 @@ foreign iofilemgr {
* *
* @return < 0 on error. * @return < 0 on error.
*/ */
SyncByFd :: proc(fd: sce.UID, flag: c.int) -> c.int --- sceIoSyncByFd :: proc(fd: sce.UID, flag: c.int) -> c.int ---
/** /**
* Cancel an asynchronous operation on a file descriptor. * Cancel an asynchronous operation on a file descriptor.
@@ -327,14 +325,14 @@ foreign iofilemgr {
* *
* @return < 0 on error. * @return < 0 on error.
*/ */
Cancel :: proc(fd: sce.UID) -> c.int --- sceIoCancel :: proc(fd: sce.UID) -> c.int ---
GetPriority :: proc(fd: sce.UID) -> c.int --- sceIoGetPriority :: proc(fd: sce.UID) -> c.int ---
GetProcessDefaultPriority :: proc() -> c.int --- sceIoGetProcessDefaultPriority :: proc() -> c.int ---
GetThreadDefaultPriority :: proc() -> c.int --- sceIoGetThreadDefaultPriority :: proc() -> c.int ---
SetPriority :: proc(fd: sce.UID, priority: c.int) -> c.int --- sceIoSetPriority :: proc(fd: sce.UID, priority: c.int) -> c.int ---
SetProcessDefaultPriority :: proc(priority: c.int) -> c.int --- sceIoSetProcessDefaultPriority :: proc(priority: c.int) -> c.int ---
SetThreadDefaultPriority :: proc(priority: c.int) -> c.int --- sceIoSetThreadDefaultPriority :: proc(priority: c.int) -> c.int ---
} }
foreign iofilemgrkern { foreign iofilemgrkern {
+16 -18
View File
@@ -9,21 +9,20 @@ foreign import jpegenc "system:SceJpegEnc_stub"
foreign import jpegencarm "system:SceJpegEncArm_stub" foreign import jpegencarm "system:SceJpegEncArm_stub"
foreign import jpegkern "system:SceAvcodecForDriver_stub" foreign import jpegkern "system:SceAvcodecForDriver_stub"
@(link_prefix = "sceJpeg")
foreign jpeg { foreign jpeg {
InitMJpeg :: proc(decoderCount: sce.Int32) -> c.int --- sceJpegInitMJpeg :: proc(decoderCount: sce.Int32) -> c.int ---
InitMJpegWithParam :: proc(params: ^SceJpegMJpegInitParam) -> c.int --- sceJpegInitMJpegWithParam :: proc(params: ^SceJpegMJpegInitParam) -> c.int ---
FinishMJpeg :: proc() -> c.int --- sceJpegFinishMJpeg :: proc() -> c.int ---
GetOutputInfo :: proc(jpegData: [^]sce.UInt8, sceJpegGetOutputInfo :: proc(jpegData: [^]sce.UInt8,
jpegSize: sce.Size, jpegSize: sce.Size,
format: sce.Int32, format: sce.Int32,
mode: sce.Int32, mode: sce.Int32,
output: ^SceJpegOutputInfo) -> c.int --- output: ^SceJpegOutputInfo) -> c.int ---
DecodeMJpegYCbCr :: proc(jpegData: [^]sce.UInt8, sceJpegDecodeMJpegYCbCr :: proc(jpegData: [^]sce.UInt8,
jpegSize: sce.Size, jpegSize: sce.Size,
mode: sce.Int32, mode: sce.Int32,
output: [^]sce.UInt8, output: [^]sce.UInt8,
@@ -31,7 +30,7 @@ foreign jpeg {
buffer: rawptr, buffer: rawptr,
bufferSize: sce.Size) -> c.int --- bufferSize: sce.Size) -> c.int ---
MJpegCsc :: proc(rgba: [^]sce.UInt8, sceJpegMJpegCsc :: proc(rgba: [^]sce.UInt8,
yuv: [^]sce.UInt8, yuv: [^]sce.UInt8,
yuvSize: sce.Size, yuvSize: sce.Size,
imageWidth: sce.Int32, imageWidth: sce.Int32,
@@ -63,7 +62,6 @@ foreign jpegarm {
pOutputInfo: ^SceJpegOutputInfo) -> c.int --- pOutputInfo: ^SceJpegOutputInfo) -> c.int ---
} }
@(link_prefix = "sceJpegEncoder")
foreign jpegenc { foreign jpegenc {
/** /**
* Initialize a jpeg encoder * Initialize a jpeg encoder
@@ -77,7 +75,7 @@ foreign jpegenc {
* *
* @return 0 on success, < 0 on error. * @return 0 on success, < 0 on error.
*/ */
Init :: proc(_context: SceJpegEncoderContext, inWidth: c.int, inHeight: c.int, pixelformat: SceJpegEncoderPixelFormat, outBuffer: rawptr, outSize: sce.Size) -> c.int --- sceJpegEncoderInit :: proc(_context: SceJpegEncoderContext, inWidth: c.int, inHeight: c.int, pixelformat: SceJpegEncoderPixelFormat, outBuffer: rawptr, outSize: sce.Size) -> c.int ---
/** /**
* Initialize a jpeg encoder with param * Initialize a jpeg encoder with param
@@ -86,7 +84,7 @@ foreign jpegenc {
* *
* @return 0 on success, < 0 on error. * @return 0 on success, < 0 on error.
*/ */
InitWithParam :: proc(_context: SceJpegEncoderContext, initParam: ^SceJpegEncoderInitParam) -> c.int --- sceJpegEncoderInitWithParam :: proc(_context: SceJpegEncoderContext, initParam: ^SceJpegEncoderInitParam) -> c.int ---
/** /**
* Terminate a jpeg encoder * Terminate a jpeg encoder
@@ -95,7 +93,7 @@ foreign jpegenc {
* *
* @return 0 on success, < 0 on error. * @return 0 on success, < 0 on error.
*/ */
End :: proc(_context: SceJpegEncoderContext) -> c.int --- sceJpegEncoderEnd :: proc(_context: SceJpegEncoderContext) -> c.int ---
/** /**
* Execute a jpeg encode * Execute a jpeg encode
@@ -105,7 +103,7 @@ foreign jpegenc {
* *
* @return encoded jpeg size on success, < 0 on error. * @return encoded jpeg size on success, < 0 on error.
*/ */
Encode :: proc(_context: SceJpegEncoderContext, inBuffer: rawptr) -> c.int --- sceJpegEncoderEncode :: proc(_context: SceJpegEncoderContext, inBuffer: rawptr) -> c.int ---
/** /**
* Set encoder compression ratio * Set encoder compression ratio
@@ -115,7 +113,7 @@ foreign jpegenc {
* *
* @return 0 on success, < 0 on error. * @return 0 on success, < 0 on error.
*/ */
SetCompressionRatio :: proc(_context: SceJpegEncoderContext, ratio: c.int) -> c.int --- sceJpegEncoderSetCompressionRatio :: proc(_context: SceJpegEncoderContext, ratio: c.int) -> c.int ---
/** /**
@@ -127,7 +125,7 @@ foreign jpegenc {
* *
* @return 0 on success, < 0 on error. * @return 0 on success, < 0 on error.
*/ */
SetOutputAddr :: proc(_context: SceJpegEncoderContext, outBuffer: rawptr, outSize: sce.Size) -> c.int --- sceJpegEncoderSetOutputAddr :: proc(_context: SceJpegEncoderContext, outBuffer: rawptr, outSize: sce.Size) -> c.int ---
/** /**
* Execute a color conversion from ARGB to YCbCr * Execute a color conversion from ARGB to YCbCr
@@ -140,14 +138,14 @@ foreign jpegenc {
* *
* @return 0 on success, < 0 on error. * @return 0 on success, < 0 on error.
*/ */
Csc :: proc(_context: SceJpegEncoderContext, outBuffer: rawptr, inBuffer: rawptr, inPitch: c.int, inPixelFormat: SceJpegEncoderPixelFormat) -> c.int --- sceJpegEncoderCsc :: proc(_context: SceJpegEncoderContext, outBuffer: rawptr, inBuffer: rawptr, inPitch: c.int, inPixelFormat: SceJpegEncoderPixelFormat) -> c.int ---
/** /**
* Return required free size to allocate a jpeg encoder * Return required free size to allocate a jpeg encoder
* *
* @return Required free memory size in bytes, < 0 on error. * @return Required free memory size in bytes, < 0 on error.
*/ */
GetContextSize :: proc() -> c.int --- sceJpegEncoderGetContextSize :: proc() -> c.int ---
/** /**
* Set encoder valid region (?) * Set encoder valid region (?)
@@ -158,7 +156,7 @@ foreign jpegenc {
* *
* @return 0 on success, < 0 on error. * @return 0 on success, < 0 on error.
*/ */
SetValidRegion :: proc(_context: SceJpegEncoderContext, inWidth: c.int, inHeight: c.int) -> c.int --- sceJpegEncoderSetValidRegion :: proc(_context: SceJpegEncoderContext, inWidth: c.int, inHeight: c.int) -> c.int ---
/** /**
* Set header used for output file * Set header used for output file
@@ -168,7 +166,7 @@ foreign jpegenc {
* *
* @return 0 on success, < 0 on error. * @return 0 on success, < 0 on error.
*/ */
SetHeaderMode :: proc(_context: SceJpegEncoderContext, mode: c.int) -> c.int --- sceJpegEncoderSetHeaderMode :: proc(_context: SceJpegEncoderContext, mode: c.int) -> c.int ---
} }
foreign jpegencarm { foreign jpegencarm {
+143 -146
View File
@@ -60,7 +60,6 @@ SceKernelSystemInfo :: struct {
} }
#assert(size_of(SceKernelSystemInfo) == 0x48) #assert(size_of(SceKernelSystemInfo) == 0x48)
@(link_prefix = "sceKernel")
foreign libkernel { foreign libkernel {
/** /**
* Fills the output buffer with random data. * Fills the output buffer with random data.
@@ -70,7 +69,7 @@ foreign libkernel {
* *
* @return 0 on success, < 0 on error. * @return 0 on success, < 0 on error.
*/ */
GetRandomNumber :: proc(output: rawptr, size: sce.Size) -> c.int --- sceKernelGetRandomNumber :: proc(output: rawptr, size: sce.Size) -> c.int ---
/** /**
* Gets the status of a specified callback. * Gets the status of a specified callback.
@@ -81,7 +80,7 @@ foreign libkernel {
* *
* @return < 0 on error. * @return < 0 on error.
*/ */
GetCallbackInfo :: proc(cb: sce.UID, infop: ^SceKernelCallbackInfo) -> c.int --- sceKernelGetCallbackInfo :: proc(cb: sce.UID, infop: ^SceKernelCallbackInfo) -> c.int ---
/** /**
* Creates a new condition variable * Creates a new condition variable
@@ -98,7 +97,7 @@ foreign libkernel {
* @param option - Condition variable options (normally set to 0) * @param option - Condition variable options (normally set to 0)
* @return A condition variable id * @return A condition variable id
*/ */
CreateCond :: proc(name: cstring, attr: sce.UInt, mutexId: sce.UID, option: ^SceKernelCondOptParam) -> sce.UID --- sceKernelCreateCond :: proc(name: cstring, attr: sce.UInt, mutexId: sce.UID, option: ^SceKernelCondOptParam) -> sce.UID ---
/** /**
* Waits for a signal of a condition variable * Waits for a signal of a condition variable
@@ -107,7 +106,7 @@ foreign libkernel {
* @param timeout - Timeout in microseconds (assumed) * @param timeout - Timeout in microseconds (assumed)
* @return < 0 On error. * @return < 0 On error.
*/ */
WaitCond :: proc(condId: sce.UID, timeout: ^c.uint) -> c.int --- sceKernelWaitCond :: proc(condId: sce.UID, timeout: ^c.uint) -> c.int ---
/** /**
* Waits for a signal of a condition variable (with callbacks) * Waits for a signal of a condition variable (with callbacks)
@@ -116,7 +115,7 @@ foreign libkernel {
* @param timeout - Timeout in microseconds (assumed) * @param timeout - Timeout in microseconds (assumed)
* @return < 0 On error. * @return < 0 On error.
*/ */
WaitCondCB :: proc(condId: sce.UID, timeout: ^c.uint) -> c.int --- sceKernelWaitCondCB :: proc(condId: sce.UID, timeout: ^c.uint) -> c.int ---
/** /**
* Create an event flag. * Create an event flag.
@@ -133,7 +132,7 @@ foreign libkernel {
* evid = sceKernelCreateEventFlag("wait_event", 0, 0, NULL) * evid = sceKernelCreateEventFlag("wait_event", 0, 0, NULL)
* @endcode * @endcode
*/ */
CreateEventFlag :: proc(name: cstring, attr: c.int, bits: c.int, opt: ^SceKernelEventFlagOptParam) -> sce.UID --- sceKernelCreateEventFlag :: proc(name: cstring, attr: c.int, bits: c.int, opt: ^SceKernelEventFlagOptParam) -> sce.UID ---
/** /**
* Poll an event flag for a given bit pattern. * Poll an event flag for a given bit pattern.
@@ -144,7 +143,7 @@ foreign libkernel {
* @param outBits - The bit pattern that was matched. * @param outBits - The bit pattern that was matched.
* @return < 0 On error * @return < 0 On error
*/ */
PollEventFlag :: proc(evid: c.int, bits: c.uint, wait: c.uint, outBits: ^c.uint) -> c.int --- sceKernelPollEventFlag :: proc(evid: c.int, bits: c.uint, wait: c.uint, outBits: ^c.uint) -> c.int ---
/** /**
* Wait for an event flag for a given bit pattern. * Wait for an event flag for a given bit pattern.
@@ -156,7 +155,7 @@ foreign libkernel {
* @param timeout - Timeout in microseconds * @param timeout - Timeout in microseconds
* @return < 0 On error * @return < 0 On error
*/ */
WaitEventFlag :: proc(evid: c.int, bits: c.uint, wait: c.uint, outBits: ^c.uint, timeout: ^sce.UInt) -> c.int --- sceKernelWaitEventFlag :: proc(evid: c.int, bits: c.uint, wait: c.uint, outBits: ^c.uint, timeout: ^sce.UInt) -> c.int ---
/** /**
* Wait for an event flag for a given bit pattern with callback. * Wait for an event flag for a given bit pattern with callback.
@@ -168,7 +167,7 @@ foreign libkernel {
* @param timeout - Timeout in microseconds * @param timeout - Timeout in microseconds
* @return < 0 On error * @return < 0 On error
*/ */
WaitEventFlagCB :: proc(evid: c.int, bits: c.uint, wait: c.uint, outBits: ^c.uint, timeout: ^sce.UInt) -> c.int --- sceKernelWaitEventFlagCB :: proc(evid: c.int, bits: c.uint, wait: c.uint, outBits: ^c.uint, timeout: ^sce.UInt) -> c.int ---
/** /**
* Get the status of an event flag. * Get the status of an event flag.
@@ -178,20 +177,20 @@ foreign libkernel {
* *
* @return < 0 on error. * @return < 0 on error.
*/ */
GetEventFlagInfo :: proc(event: sce.UID, info: ^SceKernelEventFlagInfo) -> c.int --- sceKernelGetEventFlagInfo :: proc(event: sce.UID, info: ^SceKernelEventFlagInfo) -> c.int ---
CreateLwCond :: proc(pWork: ^SceKernelLwCondWork, pName: cstring, attr: c.uint, pLwMutex: ^SceKernelLwMutexWork, pOptParam: ^SceKernelLwCondOptParam) -> c.int --- sceKernelCreateLwCond :: proc(pWork: ^SceKernelLwCondWork, pName: cstring, attr: c.uint, pLwMutex: ^SceKernelLwMutexWork, pOptParam: ^SceKernelLwCondOptParam) -> c.int ---
DeleteLwCond :: proc(pWork: ^SceKernelLwCondWork) -> c.int --- sceKernelDeleteLwCond :: proc(pWork: ^SceKernelLwCondWork) -> c.int ---
SignalLwCond :: proc(pWork: ^SceKernelLwCondWork) -> c.int --- sceKernelSignalLwCond :: proc(pWork: ^SceKernelLwCondWork) -> c.int ---
SignalLwCondAll :: proc(pWork: ^SceKernelLwCondWork) -> c.int --- sceKernelSignalLwCondAll :: proc(pWork: ^SceKernelLwCondWork) -> c.int ---
SignalLwCondTo :: proc(pWork: ^SceKernelLwCondWork, threadId: sce.UID) -> c.int --- sceKernelSignalLwCondTo :: proc(pWork: ^SceKernelLwCondWork, threadId: sce.UID) -> c.int ---
WaitLwCond :: proc(pWork: ^SceKernelLwCondWork, pTimeout: ^c.uint) -> c.int --- sceKernelWaitLwCond :: proc(pWork: ^SceKernelLwCondWork, pTimeout: ^c.uint) -> c.int ---
CreateLwMutex :: proc(pWork: ^SceKernelLwMutexWork, pName: cstring, attr: c.uint, initCount: c.int, pOptParam: ^SceKernelLwMutexOptParam) -> c.int --- sceKernelCreateLwMutex :: proc(pWork: ^SceKernelLwMutexWork, pName: cstring, attr: c.uint, initCount: c.int, pOptParam: ^SceKernelLwMutexOptParam) -> c.int ---
DeleteLwMutex :: proc(pWork: ^SceKernelLwMutexWork) -> c.int --- sceKernelDeleteLwMutex :: proc(pWork: ^SceKernelLwMutexWork) -> c.int ---
LockLwMutex :: proc(pWork: ^SceKernelLwMutexWork, lockCount: c.int, pTimeout: ^c.uint) -> c.int --- sceKernelLockLwMutex :: proc(pWork: ^SceKernelLwMutexWork, lockCount: c.int, pTimeout: ^c.uint) -> c.int ---
TryLockLwMutex :: proc(pWork: ^SceKernelLwMutexWork, lockCount: c.int) -> c.int --- sceKernelTryLockLwMutex :: proc(pWork: ^SceKernelLwMutexWork, lockCount: c.int) -> c.int ---
UnlockLwMutex :: proc(pWork: ^SceKernelLwMutexWork, unlockCount: c.int) -> c.int --- sceKernelUnlockLwMutex :: proc(pWork: ^SceKernelLwMutexWork, unlockCount: c.int) -> c.int ---
/** /**
* Create a message pipe * Create a message pipe
@@ -204,7 +203,7 @@ foreign libkernel {
* *
* @return The UID of the created pipe, < 0 on error * @return The UID of the created pipe, < 0 on error
*/ */
CreateMsgPipe :: proc(name: cstring, type: c.int, attr: c.int, bufSize: c.uint, opt: rawptr) -> sce.UID --- sceKernelCreateMsgPipe :: proc(name: cstring, type: c.int, attr: c.int, bufSize: c.uint, opt: rawptr) -> sce.UID ---
/** /**
* Send a message to a pipe * Send a message to a pipe
@@ -218,7 +217,7 @@ foreign libkernel {
* *
* @return 0 on success, < 0 on error * @return 0 on success, < 0 on error
*/ */
SendMsgPipe :: proc(uid: sce.UID , message: rawptr, size: c.uint, unk1: c.int, unk2: rawptr, timeout: ^c.uint) -> c.int --- sceKernelSendMsgPipe :: proc(uid: sce.UID , message: rawptr, size: c.uint, unk1: c.int, unk2: rawptr, timeout: ^c.uint) -> c.int ---
/** /**
* Send a message to a pipe (with callback) * Send a message to a pipe (with callback)
@@ -232,7 +231,7 @@ foreign libkernel {
* *
* @return 0 on success, < 0 on error * @return 0 on success, < 0 on error
*/ */
SendMsgPipeCB :: proc(uid: sce.UID, message: rawptr, size: c.uint, unk1: c.int, unk2: rawptr, timeout: ^c.uint) -> c.int --- sceKernelSendMsgPipeCB :: proc(uid: sce.UID, message: rawptr, size: c.uint, unk1: c.int, unk2: rawptr, timeout: ^c.uint) -> c.int ---
/** /**
* Try to send a message to a pipe * Try to send a message to a pipe
@@ -245,7 +244,7 @@ foreign libkernel {
* *
* @return 0 on success, < 0 on error * @return 0 on success, < 0 on error
*/ */
TrySendMsgPipe :: proc(uid: sce.UID, message: rawptr, size: sce.Size, unk1: c.int, unk2: rawptr) -> c.int --- sceKernelTrySendMsgPipe :: proc(uid: sce.UID, message: rawptr, size: sce.Size, unk1: c.int, unk2: rawptr) -> c.int ---
/** /**
* Receive a message from a pipe * Receive a message from a pipe
@@ -259,7 +258,7 @@ foreign libkernel {
* *
* @return 0 on success, < 0 on error * @return 0 on success, < 0 on error
*/ */
ReceiveMsgPipe :: proc(uid: sce.UID, message: rawptr, size: sce.Size, unk1: c.int, unk2: rawptr, timeout: ^c.uint) -> c.int --- sceKernelReceiveMsgPipe :: proc(uid: sce.UID, message: rawptr, size: sce.Size, unk1: c.int, unk2: rawptr, timeout: ^c.uint) -> c.int ---
/** /**
* Receive a message from a pipe (with callback) * Receive a message from a pipe (with callback)
@@ -273,7 +272,7 @@ foreign libkernel {
* *
* @return 0 on success, < 0 on error * @return 0 on success, < 0 on error
*/ */
ReceiveMsgPipeCB :: proc(uid: sce.UID, message: rawptr, size: sce.Size, unk1: c.int, unk2: rawptr, timeout: ^c.uint) -> c.int --- sceKernelReceiveMsgPipeCB :: proc(uid: sce.UID, message: rawptr, size: sce.Size, unk1: c.int, unk2: rawptr, timeout: ^c.uint) -> c.int ---
/** /**
* Receive a message from a pipe * Receive a message from a pipe
@@ -286,7 +285,7 @@ foreign libkernel {
* *
* @return 0 on success, < 0 on error * @return 0 on success, < 0 on error
*/ */
TryReceiveMsgPipe :: proc(uid: sce.UID, message: rawptr, size: sce.Size, unk1: c.int, unk2: rawptr) -> c.int --- sceKernelTryReceiveMsgPipe :: proc(uid: sce.UID, message: rawptr, size: sce.Size, unk1: c.int, unk2: rawptr) -> c.int ---
/** /**
@@ -298,7 +297,7 @@ foreign libkernel {
* *
* @return 0 on success, < 0 on error * @return 0 on success, < 0 on error
*/ */
CancelMsgPipe :: proc(uid: sce.UID, psend: ^c.int, precv: ^c.int) -> c.int --- sceKernelCancelMsgPipe :: proc(uid: sce.UID, psend: ^c.int, precv: ^c.int) -> c.int ---
/** /**
* Get the status of a Message Pipe * Get the status of a Message Pipe
@@ -308,7 +307,7 @@ foreign libkernel {
* *
* @return 0 on success, < 0 on error * @return 0 on success, < 0 on error
*/ */
GetMsgPipeInfo :: proc(uid: sce.UID, info: ^SceKernelMppInfo) -> c.int --- sceKernelGetMsgPipeInfo :: proc(uid: sce.UID, info: ^SceKernelMppInfo) -> c.int ---
/** /**
* Creates a new mutex * Creates a new mutex
@@ -325,7 +324,7 @@ foreign libkernel {
* @param option - Mutex options (normally set to 0) * @param option - Mutex options (normally set to 0)
* @return A mutex id * @return A mutex id
*/ */
CreateMutex :: proc(name: cstring, attr: sce.UInt, initCount: c.int, option: ^SceKernelMutexOptParam) -> sce.UID --- sceKernelCreateMutex :: proc(name: cstring, attr: sce.UInt, initCount: c.int, option: ^SceKernelMutexOptParam) -> sce.UID ---
/** /**
* Lock a mutex * Lock a mutex
@@ -335,7 +334,7 @@ foreign libkernel {
* @param timeout - Timeout in microseconds (assumed) * @param timeout - Timeout in microseconds (assumed)
* @return < 0 On error. * @return < 0 On error.
*/ */
LockMutex :: proc(mutexid: sce.UID, lockCount: c.int, timeout: ^c.uint) -> c.int --- sceKernelLockMutex :: proc(mutexid: sce.UID, lockCount: c.int, timeout: ^c.uint) -> c.int ---
/** /**
* Lock a mutex and handle callbacks if necessary. * Lock a mutex and handle callbacks if necessary.
@@ -345,7 +344,7 @@ foreign libkernel {
* @param timeout - Timeout in microseconds (assumed) * @param timeout - Timeout in microseconds (assumed)
* @return < 0 On error. * @return < 0 On error.
*/ */
LockMutexCB :: proc(mutexid: sce.UID, lockCount: c.int, timeout: ^c.uint) -> c.int --- sceKernelLockMutexCB :: proc(mutexid: sce.UID, lockCount: c.int, timeout: ^c.uint) -> c.int ---
/** /**
* Cancels a mutex * Cancels a mutex
@@ -355,7 +354,7 @@ foreign libkernel {
* @param numWaitThreads - Number of threads waiting for the mutex * @param numWaitThreads - Number of threads waiting for the mutex
* @return < 0 On error. * @return < 0 On error.
*/ */
CancelMutex :: proc(mutexid: sce.UID, newCount: c.int, numWaitThreads: ^c.int) -> c.int --- sceKernelCancelMutex :: proc(mutexid: sce.UID, newCount: c.int, numWaitThreads: ^c.int) -> c.int ---
/** /**
* Retrieve information about a mutex. * Retrieve information about a mutex.
@@ -365,7 +364,7 @@ foreign libkernel {
* *
* @return < 0 on error. * @return < 0 on error.
*/ */
GetMutexInfo :: proc(mutexid: sce.UID, info: ^SceKernelMutexInfo) -> c.int --- sceKernelGetMutexInfo :: proc(mutexid: sce.UID, info: ^SceKernelMutexInfo) -> c.int ---
/** /**
* Creates a new rwlock * Creates a new rwlock
@@ -381,7 +380,7 @@ foreign libkernel {
* @param option - RWLock options (normally set to NULL) * @param option - RWLock options (normally set to NULL)
* @return RWLock id on success, < 0 on error * @return RWLock id on success, < 0 on error
*/ */
CreateRWLock :: proc(name: cstring, attr: sce.UInt32, opt_param: ^SceKernelRWLockOptParam) -> sce.UID --- sceKernelCreateRWLock :: proc(name: cstring, attr: sce.UInt32, opt_param: ^SceKernelRWLockOptParam) -> sce.UID ---
/** /**
* Lock a rwlock with read access * Lock a rwlock with read access
@@ -390,7 +389,7 @@ foreign libkernel {
* @param timeout - Timeout in microseconds, use NULL to disable it * @param timeout - Timeout in microseconds, use NULL to disable it
* @return 0 on success, < 0 on error * @return 0 on success, < 0 on error
*/ */
LockReadRWLock :: proc(rwlock_id: sce.UID, timeout: ^c.uint) -> c.int --- sceKernelLockReadRWLock :: proc(rwlock_id: sce.UID, timeout: ^c.uint) -> c.int ---
/** /**
* Lock a rwlock with write access * Lock a rwlock with write access
@@ -399,7 +398,7 @@ foreign libkernel {
* @param timeout - Timeout in microseconds, use NULL to disable it * @param timeout - Timeout in microseconds, use NULL to disable it
* @return 0 on success, < 0 on error * @return 0 on success, < 0 on error
*/ */
LockWriteRWLock :: proc(rwlock_id: sce.UID, timeout: ^c.uint) -> c.int --- sceKernelLockWriteRWLock :: proc(rwlock_id: sce.UID, timeout: ^c.uint) -> c.int ---
/** /**
* Lock a rwlock with read access and handle callbacks * Lock a rwlock with read access and handle callbacks
@@ -408,7 +407,7 @@ foreign libkernel {
* @param timeout - Timeout in microseconds, use NULL to disable it * @param timeout - Timeout in microseconds, use NULL to disable it
* @return 0 on success, < 0 on error * @return 0 on success, < 0 on error
*/ */
LockReadRWLockCB :: proc(rwlock_id: sce.UID, timeout: ^c.uint) -> c.int --- sceKernelLockReadRWLockCB :: proc(rwlock_id: sce.UID, timeout: ^c.uint) -> c.int ---
/** /**
* Lock a rwlock with write access and handle callbacks * Lock a rwlock with write access and handle callbacks
@@ -417,7 +416,7 @@ foreign libkernel {
* @param timeout - Timeout in microseconds, use NULL to disable it * @param timeout - Timeout in microseconds, use NULL to disable it
* @return 0 on success, < 0 on error * @return 0 on success, < 0 on error
*/ */
LockWriteRWLockCB :: proc(rwlock_id: sce.UID, timeout: ^c.uint) -> c.int --- sceKernelLockWriteRWLockCB :: proc(rwlock_id: sce.UID, timeout: ^c.uint) -> c.int ---
/** /**
* Retrieve information about a rwlock. * Retrieve information about a rwlock.
@@ -427,7 +426,7 @@ foreign libkernel {
* *
* @return 0 on success, < 0 on error * @return 0 on success, < 0 on error
*/ */
GetRWLockInfo :: proc(rwlock_id: sce.UID, info: ^SceKernelRWLockInfo) -> c.int --- sceKernelGetRWLockInfo :: proc(rwlock_id: sce.UID, info: ^SceKernelRWLockInfo) -> c.int ---
/** /**
* Creates a new semaphore * Creates a new semaphore
@@ -445,7 +444,7 @@ foreign libkernel {
* @param option - Sema options (normally set to 0) * @param option - Sema options (normally set to 0)
* @return A semaphore id * @return A semaphore id
*/ */
CreateSema :: proc(name: cstring, attr: sce.UInt, initVal: c.int, maxVal: c.int, option: ^SceKernelSemaOptParam) -> sce.UID --- sceKernelCreateSema :: proc(name: cstring, attr: sce.UInt, initVal: c.int, maxVal: c.int, option: ^SceKernelSemaOptParam) -> sce.UID ---
/** /**
@@ -462,7 +461,7 @@ foreign libkernel {
* *
* @return < 0 on error. * @return < 0 on error.
*/ */
WaitSema :: proc(semaid: sce.UID, signal: c.int, timeout: ^sce.UInt) -> c.int --- sceKernelWaitSema :: proc(semaid: sce.UID, signal: c.int, timeout: ^sce.UInt) -> c.int ---
/** /**
* Lock a semaphore and handle callbacks if necessary. * Lock a semaphore and handle callbacks if necessary.
@@ -478,7 +477,7 @@ foreign libkernel {
* *
* @return < 0 on error. * @return < 0 on error.
*/ */
WaitSemaCB :: proc(semaid: sce.UID, signal: c.int, timeout: ^sce.UInt) -> c.int --- sceKernelWaitSemaCB :: proc(semaid: sce.UID, signal: c.int, timeout: ^sce.UInt) -> c.int ---
/** /**
* Cancels a semaphore * Cancels a semaphore
@@ -488,7 +487,7 @@ foreign libkernel {
* @param numWaitThreads - Number of threads waiting for the semaphore * @param numWaitThreads - Number of threads waiting for the semaphore
* @return < 0 On error. * @return < 0 On error.
*/ */
CancelSema :: proc(semaid: sce.UID, setCount: c.int, numWaitThreads: ^c.int) -> c.int --- sceKernelCancelSema :: proc(semaid: sce.UID, setCount: c.int, numWaitThreads: ^c.int) -> c.int ---
/** /**
* Retrieve information about a semaphore. * Retrieve information about a semaphore.
@@ -498,7 +497,7 @@ foreign libkernel {
* *
* @return < 0 on error. * @return < 0 on error.
*/ */
GetSemaInfo :: proc(semaid: sce.UID, info: ^SceKernelSemaInfo) -> c.int --- sceKernelGetSemaInfo :: proc(semaid: sce.UID, info: ^SceKernelSemaInfo) -> c.int ---
/** /**
* @brief Sleep current thread and wait for a signal. After it receives a signal, the thread wakes up. * @brief Sleep current thread and wait for a signal. After it receives a signal, the thread wakes up.
@@ -510,7 +509,7 @@ foreign libkernel {
* @param timeout the timeout if it's null, it waits indefinitely. * @param timeout the timeout if it's null, it waits indefinitely.
* @return 0 on success * @return 0 on success
*/ */
WaitSignal :: proc(unk0: sce.UInt32, delay: sce.UInt32, timeout: ^sce.UInt32) -> c.int --- sceKernelWaitSignal :: proc(unk0: sce.UInt32, delay: sce.UInt32, timeout: ^sce.UInt32) -> c.int ---
/** /**
* Create a thread * Create a thread
@@ -541,7 +540,7 @@ foreign libkernel {
* @return UID of the created thread, or an error code. * @return UID of the created thread, or an error code.
*/ */
CreateThread :: proc(name: cstring, entry: SceKernelThreadEntry, initPriority: c.int, stackSize: sce.Size, attr: sce.UInt, cpuAffinityMask: c.int, option: ^SceKernelThreadOptParam) -> sce.UID --- sceKernelCreateThread :: proc(name: cstring, entry: SceKernelThreadEntry, initPriority: c.int, stackSize: sce.Size, attr: sce.UInt, cpuAffinityMask: c.int, option: ^SceKernelThreadOptParam) -> sce.UID ---
/** /**
@@ -551,7 +550,7 @@ foreign libkernel {
* @param arglen - Length of the data pointed to by argp, in bytes * @param arglen - Length of the data pointed to by argp, in bytes
* @param argp - Pointer to the arguments. * @param argp - Pointer to the arguments.
*/ */
StartThread :: proc(thid: sce.UID, arglen: sce.Size, argp: rawptr) -> c.int --- sceKernelStartThread :: proc(thid: sce.UID, arglen: sce.Size, argp: rawptr) -> c.int ---
/** /**
@@ -563,7 +562,7 @@ foreign libkernel {
* *
* @return < 0 on error. * @return < 0 on error.
*/ */
WaitThreadEnd :: proc(thid: sce.UID, stat: ^c.int, timeout: ^sce.UInt) -> c.int --- sceKernelWaitThreadEnd :: proc(thid: sce.UID, stat: ^c.int, timeout: ^sce.UInt) -> c.int ---
/** /**
* Wait until a thread has ended and handle callbacks if necessary. * Wait until a thread has ended and handle callbacks if necessary.
@@ -574,7 +573,7 @@ foreign libkernel {
* *
* @return < 0 on error. * @return < 0 on error.
*/ */
WaitThreadEndCB :: proc(thid: sce.UID, stat: ^c.int, timeout: ^sce.UInt) -> c.int --- sceKernelWaitThreadEndCB :: proc(thid: sce.UID, stat: ^c.int, timeout: ^sce.UInt) -> c.int ---
/** /**
* Modify the attributes of the current thread. * Modify the attributes of the current thread.
@@ -584,7 +583,7 @@ foreign libkernel {
* *
* @return < 0 on error. * @return < 0 on error.
*/ */
ChangeCurrentThreadAttr :: proc(clearAttr: sce.UInt, setAttr: sce.UInt) -> c.int --- sceKernelChangeCurrentThreadAttr :: proc(clearAttr: sce.UInt, setAttr: sce.UInt) -> c.int ---
/** /**
@@ -592,7 +591,7 @@ foreign libkernel {
* *
* @return The current thread priority * @return The current thread priority
*/ */
GetThreadCurrentPriority :: proc() -> c.int --- sceKernelGetThreadCurrentPriority :: proc() -> c.int ---
/** /**
* Get the exit status of a thread. * Get the exit status of a thread.
@@ -601,14 +600,14 @@ foreign libkernel {
* @param[out] status - Status out pointer * @param[out] status - Status out pointer
* @return The exit status * @return The exit status
*/ */
GetThreadExitStatus :: proc(thid: sce.UID, status: ^c.int) -> c.int --- sceKernelGetThreadExitStatus :: proc(thid: sce.UID, status: ^c.int) -> c.int ---
/** /**
* Check the thread stack? * Check the thread stack?
* *
* @return Unknown. * @return Unknown.
*/ */
CheckThreadStack :: proc() -> c.int --- sceKernelCheckThreadStack :: proc() -> c.int ---
/** /**
@@ -628,7 +627,7 @@ foreign libkernel {
* @endcode * @endcode
* @return 0 if successful, otherwise the error code. * @return 0 if successful, otherwise the error code.
*/ */
GetThreadInfo :: proc(thid: sce.UID, info: ^SceKernelThreadInfo) -> c.int --- sceKernelGetThreadInfo :: proc(thid: sce.UID, info: ^SceKernelThreadInfo) -> c.int ---
/** /**
* Retrive the runtime status of a thread. * Retrive the runtime status of a thread.
@@ -638,14 +637,14 @@ foreign libkernel {
* *
* @return 0 if successful, otherwise the error code. * @return 0 if successful, otherwise the error code.
*/ */
GetThreadRunStatus :: proc(thid: sce.UID, status: ^SceKernelThreadRunStatus) -> c.int --- sceKernelGetThreadRunStatus :: proc(thid: sce.UID, status: ^SceKernelThreadRunStatus) -> c.int ---
/** /**
* Get the current thread Id * Get the current thread Id
* *
* @return The thread id of the calling thread. * @return The thread id of the calling thread.
*/ */
GetThreadId :: proc() -> c.int --- sceKernelGetThreadId :: proc() -> c.int ---
/** /**
* Get the system information * Get the system information
@@ -654,117 +653,117 @@ foreign libkernel {
* *
* @return 0 on success, < 0 on error * @return 0 on success, < 0 on error
*/ */
GetSystemInfo :: proc(info: ^SceKernelSystemInfo) -> c.int --- sceKernelGetSystemInfo :: proc(info: ^SceKernelSystemInfo) -> c.int ---
/** /**
* @brief sceKernelGetTLSAddr get pointer to TLS key area for current thread * @brief sceKernelGetTLSAddr get pointer to TLS key area for current thread
* @param key - the TLS keyslot index * @param key - the TLS keyslot index
* @return pointer to TLS key value * @return pointer to TLS key value
*/ */
GetTLSAddr :: proc(key: c.int) -> rawptr --- sceKernelGetTLSAddr :: proc(key: c.int) -> rawptr ---
AtomicSet8 :: proc(store: ^sce.Int8, value: sce.Int8) --- sceKernelAtomicSet8 :: proc(store: ^sce.Int8, value: sce.Int8) ---
AtomicSet16 :: proc(store: sce.Int16, value: sce.Int16) --- sceKernelAtomicSet16 :: proc(store: sce.Int16, value: sce.Int16) ---
AtomicSet32 :: proc(store: sce.Int32, value: sce.Int32) --- sceKernelAtomicSet32 :: proc(store: sce.Int32, value: sce.Int32) ---
AtomicSet64 :: proc(store: sce.Int64, value: sce.Int64) --- sceKernelAtomicSet64 :: proc(store: sce.Int64, value: sce.Int64) ---
AtomicCompareAndSet8 :: proc(store: sce.Int8, value, SceInt8, new_value: sce.Int8) -> sce.Int8 --- sceKernelAtomicCompareAndSet8 :: proc(store: sce.Int8, value, SceInt8, new_value: sce.Int8) -> sce.Int8 ---
AtomicCompareAndSet16 :: proc(store: sce.Int16, value, SceInt16, new_value: sce.Int16) -> sce.Int16 --- sceKernelAtomicCompareAndSet16 :: proc(store: sce.Int16, value, SceInt16, new_value: sce.Int16) -> sce.Int16 ---
AtomicCompareAndSet32 :: proc(store: sce.Int32, value, SceInt32, new_value: sce.Int32) -> sce.Int32 --- sceKernelAtomicCompareAndSet32 :: proc(store: sce.Int32, value, SceInt32, new_value: sce.Int32) -> sce.Int32 ---
AtomicCompareAndSet64 :: proc(store: sce.Int64, value, SceInt64, new_value: sce.Int64) -> sce.Int64 --- sceKernelAtomicCompareAndSet64 :: proc(store: sce.Int64, value, SceInt64, new_value: sce.Int64) -> sce.Int64 ---
AtomicAddAndGet8 :: proc(store: sce.Int8, value: sce.Int8) -> sce.Int8 --- sceKernelAtomicAddAndGet8 :: proc(store: sce.Int8, value: sce.Int8) -> sce.Int8 ---
AtomicAddAndGet16 :: proc(store: sce.Int16, value: sce.Int16) -> sce.Int16 --- sceKernelAtomicAddAndGet16 :: proc(store: sce.Int16, value: sce.Int16) -> sce.Int16 ---
AtomicAddAndGet32 :: proc(store: sce.Int32, value: sce.Int32) -> sce.Int32 --- sceKernelAtomicAddAndGet32 :: proc(store: sce.Int32, value: sce.Int32) -> sce.Int32 ---
AtomicAddAndGet64 :: proc(store: sce.Int64, value: sce.Int64) -> sce.Int64 --- sceKernelAtomicAddAndGet64 :: proc(store: sce.Int64, value: sce.Int64) -> sce.Int64 ---
AtomicAddUnless8 :: proc(store: sce.Int8, value: sce.Int8, cmpv: sce.Int8) -> sce.Bool --- sceKernelAtomicAddUnless8 :: proc(store: sce.Int8, value: sce.Int8, cmpv: sce.Int8) -> sce.Bool ---
AtomicAddUnless16 :: proc(store: sce.Int16, value: sce.Int16, cmpv: sce.Int16) -> sce.Bool --- sceKernelAtomicAddUnless16 :: proc(store: sce.Int16, value: sce.Int16, cmpv: sce.Int16) -> sce.Bool ---
AtomicAddUnless32 :: proc(store: sce.Int32, value: sce.Int32, cmpv: sce.Int32) -> sce.Bool --- sceKernelAtomicAddUnless32 :: proc(store: sce.Int32, value: sce.Int32, cmpv: sce.Int32) -> sce.Bool ---
AtomicAddUnless64 :: proc(store: sce.Int64, value: sce.Int64, cmpv: sce.Int64) -> sce.Bool --- sceKernelAtomicAddUnless64 :: proc(store: sce.Int64, value: sce.Int64, cmpv: sce.Int64) -> sce.Bool ---
AtomicSubAndGet8 :: proc(store: sce.Int8, value: sce.Int8) -> sce.Int8 --- sceKernelAtomicSubAndGet8 :: proc(store: sce.Int8, value: sce.Int8) -> sce.Int8 ---
AtomicSubAndGet16 :: proc(store: sce.Int16, value: sce.Int16) -> sce.Int16 --- sceKernelAtomicSubAndGet16 :: proc(store: sce.Int16, value: sce.Int16) -> sce.Int16 ---
AtomicSubAndGet32 :: proc(store: sce.Int32, value: sce.Int32) -> sce.Int32 --- sceKernelAtomicSubAndGet32 :: proc(store: sce.Int32, value: sce.Int32) -> sce.Int32 ---
AtomicSubAndGet64 :: proc(store: sce.Int64, value: sce.Int64) -> sce.Int64 --- sceKernelAtomicSubAndGet64 :: proc(store: sce.Int64, value: sce.Int64) -> sce.Int64 ---
AtomicAndAndGet8 :: proc(store: sce.Int8, value: sce.Int8) -> sce.Int8 --- sceKernelAtomicAndAndGet8 :: proc(store: sce.Int8, value: sce.Int8) -> sce.Int8 ---
AtomicAndAndGet16 :: proc(store: sce.Int16, value: sce.Int16) -> sce.Int16 --- sceKernelAtomicAndAndGet16 :: proc(store: sce.Int16, value: sce.Int16) -> sce.Int16 ---
AtomicAndAndGet32 :: proc(store: sce.Int32, value: sce.Int32) -> sce.Int32 --- sceKernelAtomicAndAndGet32 :: proc(store: sce.Int32, value: sce.Int32) -> sce.Int32 ---
AtomicAndAndGet64 :: proc(store: sce.Int64, value: sce.Int64) -> sce.Int64 --- sceKernelAtomicAndAndGet64 :: proc(store: sce.Int64, value: sce.Int64) -> sce.Int64 ---
AtomicOrAndGet8 :: proc(store: sce.Int8, value: sce.Int8) -> sce.Int8 --- sceKernelAtomicOrAndGet8 :: proc(store: sce.Int8, value: sce.Int8) -> sce.Int8 ---
AtomicOrAndGet16 :: proc(store: sce.Int16, value: sce.Int16) -> sce.Int16 --- sceKernelAtomicOrAndGet16 :: proc(store: sce.Int16, value: sce.Int16) -> sce.Int16 ---
AtomicOrAndGet32 :: proc(store: sce.Int32, value: sce.Int32) -> sce.Int32 --- sceKernelAtomicOrAndGet32 :: proc(store: sce.Int32, value: sce.Int32) -> sce.Int32 ---
AtomicOrAndGet64 :: proc(store: sce.Int64, value: sce.Int64) -> sce.Int64 --- sceKernelAtomicOrAndGet64 :: proc(store: sce.Int64, value: sce.Int64) -> sce.Int64 ---
AtomicXorAndGet8 :: proc(store: sce.Int8, value: sce.Int8) -> sce.Int8 --- sceKernelAtomicXorAndGet8 :: proc(store: sce.Int8, value: sce.Int8) -> sce.Int8 ---
AtomicXorAndGet16 :: proc(store: sce.Int16, value: sce.Int16) -> sce.Int16 --- sceKernelAtomicXorAndGet16 :: proc(store: sce.Int16, value: sce.Int16) -> sce.Int16 ---
AtomicXorAndGet32 :: proc(store: sce.Int32, value: sce.Int32) -> sce.Int32 --- sceKernelAtomicXorAndGet32 :: proc(store: sce.Int32, value: sce.Int32) -> sce.Int32 ---
AtomicXorAndGet64 :: proc(store: sce.Int64, value: sce.Int64) -> sce.Int64 --- sceKernelAtomicXorAndGet64 :: proc(store: sce.Int64, value: sce.Int64) -> sce.Int64 ---
AtomicClearAndGet8 :: proc(store: sce.Int8, value: sce.Int8) -> sce.Int8 --- sceKernelAtomicClearAndGet8 :: proc(store: sce.Int8, value: sce.Int8) -> sce.Int8 ---
AtomicClearAndGet16 :: proc(store: sce.Int16, value: sce.Int16) -> sce.Int16 --- sceKernelAtomicClearAndGet16 :: proc(store: sce.Int16, value: sce.Int16) -> sce.Int16 ---
AtomicClearAndGet32 :: proc(store: sce.Int32, value: sce.Int32) -> sce.Int32 --- sceKernelAtomicClearAndGet32 :: proc(store: sce.Int32, value: sce.Int32) -> sce.Int32 ---
AtomicClearAndGet64 :: proc(store: sce.Int64, value: sce.Int64) -> sce.Int64 --- sceKernelAtomicClearAndGet64 :: proc(store: sce.Int64, value: sce.Int64) -> sce.Int64 ---
AtomicGetAndSet8 :: proc(store: sce.Int8, value: sce.Int8) -> sce.Int8 --- sceKernelAtomicGetAndSet8 :: proc(store: sce.Int8, value: sce.Int8) -> sce.Int8 ---
AtomicGetAndSet16 :: proc(store: sce.Int16, value: sce.Int16) -> sce.Int16 --- sceKernelAtomicGetAndSet16 :: proc(store: sce.Int16, value: sce.Int16) -> sce.Int16 ---
AtomicGetAndSet32 :: proc(store: sce.Int32, value: sce.Int32) -> sce.Int32 --- sceKernelAtomicGetAndSet32 :: proc(store: sce.Int32, value: sce.Int32) -> sce.Int32 ---
AtomicGetAndSet64 :: proc(store: sce.Int64, value: sce.Int64) -> sce.Int64 --- sceKernelAtomicGetAndSet64 :: proc(store: sce.Int64, value: sce.Int64) -> sce.Int64 ---
AtomicGetAndAdd8 :: proc(store: sce.Int8, value: sce.Int8) -> sce.Int8 --- sceKernelAtomicGetAndAdd8 :: proc(store: sce.Int8, value: sce.Int8) -> sce.Int8 ---
AtomicGetAndAdd16 :: proc(store: sce.Int16, value: sce.Int16) -> sce.Int16 --- sceKernelAtomicGetAndAdd16 :: proc(store: sce.Int16, value: sce.Int16) -> sce.Int16 ---
AtomicGetAndAdd32 :: proc(store: sce.Int32, value: sce.Int32) -> sce.Int32 --- sceKernelAtomicGetAndAdd32 :: proc(store: sce.Int32, value: sce.Int32) -> sce.Int32 ---
AtomicGetAndAdd64 :: proc(store: sce.Int64, value: sce.Int64) -> sce.Int64 --- sceKernelAtomicGetAndAdd64 :: proc(store: sce.Int64, value: sce.Int64) -> sce.Int64 ---
AtomicGetAndSub8 :: proc(store: sce.Int8, value: sce.Int8) -> sce.Int8 --- sceKernelAtomicGetAndSub8 :: proc(store: sce.Int8, value: sce.Int8) -> sce.Int8 ---
AtomicGetAndSub16 :: proc(store: sce.Int16, value: sce.Int16) -> sce.Int16 --- sceKernelAtomicGetAndSub16 :: proc(store: sce.Int16, value: sce.Int16) -> sce.Int16 ---
AtomicGetAndSub32 :: proc(store: sce.Int32, value: sce.Int32) -> sce.Int32 --- sceKernelAtomicGetAndSub32 :: proc(store: sce.Int32, value: sce.Int32) -> sce.Int32 ---
AtomicGetAndSub64 :: proc(store: sce.Int64, value: sce.Int64) -> sce.Int64 --- sceKernelAtomicGetAndSub64 :: proc(store: sce.Int64, value: sce.Int64) -> sce.Int64 ---
AtomicGetAndAnd8 :: proc(store: sce.Int8, value: sce.Int8) -> sce.Int8 --- sceKernelAtomicGetAndAnd8 :: proc(store: sce.Int8, value: sce.Int8) -> sce.Int8 ---
AtomicGetAndAnd16 :: proc(store: sce.Int16, value: sce.Int16) -> sce.Int16 --- sceKernelAtomicGetAndAnd16 :: proc(store: sce.Int16, value: sce.Int16) -> sce.Int16 ---
AtomicGetAndAnd32 :: proc(store: sce.Int32, value: sce.Int32) -> sce.Int32 --- sceKernelAtomicGetAndAnd32 :: proc(store: sce.Int32, value: sce.Int32) -> sce.Int32 ---
AtomicGetAndAnd64 :: proc(store: sce.Int64, value: sce.Int64) -> sce.Int64 --- sceKernelAtomicGetAndAnd64 :: proc(store: sce.Int64, value: sce.Int64) -> sce.Int64 ---
AtomicGetAndOr8 :: proc(store: sce.Int8, value: sce.Int8) -> sce.Int8 --- sceKernelAtomicGetAndOr8 :: proc(store: sce.Int8, value: sce.Int8) -> sce.Int8 ---
AtomicGetAndOr16 :: proc(store: sce.Int16, value: sce.Int16) -> sce.Int16 --- sceKernelAtomicGetAndOr16 :: proc(store: sce.Int16, value: sce.Int16) -> sce.Int16 ---
AtomicGetAndOr32 :: proc(store: sce.Int32, value: sce.Int32) -> sce.Int32 --- sceKernelAtomicGetAndOr32 :: proc(store: sce.Int32, value: sce.Int32) -> sce.Int32 ---
AtomicGetAndOr64 :: proc(store: sce.Int64, value: sce.Int64) -> sce.Int64 --- sceKernelAtomicGetAndOr64 :: proc(store: sce.Int64, value: sce.Int64) -> sce.Int64 ---
AtomicGetAndXor8 :: proc(store: sce.Int8, value: sce.Int8) -> sce.Int8 --- sceKernelAtomicGetAndXor8 :: proc(store: sce.Int8, value: sce.Int8) -> sce.Int8 ---
AtomicGetAndXor16 :: proc(store: sce.Int16, value: sce.Int16) -> sce.Int16 --- sceKernelAtomicGetAndXor16 :: proc(store: sce.Int16, value: sce.Int16) -> sce.Int16 ---
AtomicGetAndXor32 :: proc(store: sce.Int32, value: sce.Int32) -> sce.Int32 --- sceKernelAtomicGetAndXor32 :: proc(store: sce.Int32, value: sce.Int32) -> sce.Int32 ---
AtomicGetAndXor64 :: proc(store: sce.Int64, value: sce.Int64) -> sce.Int64 --- sceKernelAtomicGetAndXor64 :: proc(store: sce.Int64, value: sce.Int64) -> sce.Int64 ---
AtomicGetAndClear8 :: proc(store: sce.Int8, value: sce.Int8) -> sce.Int8 --- sceKernelAtomicGetAndClear8 :: proc(store: sce.Int8, value: sce.Int8) -> sce.Int8 ---
AtomicGetAndClear16 :: proc(store: sce.Int16, value: sce.Int16) -> sce.Int16 --- sceKernelAtomicGetAndClear16 :: proc(store: sce.Int16, value: sce.Int16) -> sce.Int16 ---
AtomicGetAndClear32 :: proc(store: sce.Int32, value: sce.Int32) -> sce.Int32 --- sceKernelAtomicGetAndClear32 :: proc(store: sce.Int32, value: sce.Int32) -> sce.Int32 ---
AtomicGetAndClear64 :: proc(store: sce.Int64, value: sce.Int64) -> sce.Int64 --- sceKernelAtomicGetAndClear64 :: proc(store: sce.Int64, value: sce.Int64) -> sce.Int64 ---
AtomicClearMask8 :: proc(store: sce.Int8, value: sce.Int8) --- sceKernelAtomicClearMask8 :: proc(store: sce.Int8, value: sce.Int8) ---
AtomicClearMask16 :: proc(store: sce.Int16, value: sce.Int16) --- sceKernelAtomicClearMask16 :: proc(store: sce.Int16, value: sce.Int16) ---
AtomicClearMask32 :: proc(store: sce.Int32, value: sce.Int32) --- sceKernelAtomicClearMask32 :: proc(store: sce.Int32, value: sce.Int32) ---
AtomicClearMask64 :: proc(store: sce.Int64, value: sce.Int64) --- sceKernelAtomicClearMask64 :: proc(store: sce.Int64, value: sce.Int64) ---
AtomicDecIfPositive8 :: proc(store: ^sce.Int8) -> sce.Int8 --- sceKernelAtomicDecIfPositive8 :: proc(store: ^sce.Int8) -> sce.Int8 ---
AtomicDecIfPositive16 :: proc(store: ^sce.Int16) -> sce.Int16 --- sceKernelAtomicDecIfPositive16 :: proc(store: ^sce.Int16) -> sce.Int16 ---
AtomicDecIfPositive32 :: proc(store: ^sce.Int32) -> sce.Int32 --- sceKernelAtomicDecIfPositive32 :: proc(store: ^sce.Int32) -> sce.Int32 ---
AtomicDecIfPositive64 :: proc(store: ^sce.Int64) -> sce.Int64 --- sceKernelAtomicDecIfPositive64 :: proc(store: ^sce.Int64) -> sce.Int64 ---
LoadModule :: proc(path: cstring, flags: c.int, option: ^SceKernelLMOption) -> sce.UID --- sceKernelLoadModule :: proc(path: cstring, flags: c.int, option: ^SceKernelLMOption) -> sce.UID ---
UnloadModule :: proc(modid: sce.UID, flags: c.int, option: ^SceKernelULMOption) -> c.int --- sceKernelUnloadModule :: proc(modid: sce.UID, flags: c.int, option: ^SceKernelULMOption) -> c.int ---
StartModule :: proc(modid: sce.UID, args: sce.Size, argp: rawptr, flags: c.int, option: rawptr, status: ^c.int) -> c.int --- sceKernelStartModule :: proc(modid: sce.UID, args: sce.Size, argp: rawptr, flags: c.int, option: rawptr, status: ^c.int) -> c.int ---
StopModule :: proc(modid: sce.UID, args: sce.Size, argp: rawptr, flags: c.int, option: rawptr, status: ^c.int) -> c.int --- sceKernelStopModule :: proc(modid: sce.UID, args: sce.Size, argp: rawptr, flags: c.int, option: rawptr, status: ^c.int) -> c.int ---
LoadStartModule :: proc(path: cstring, args: sce.Size, argp: rawptr, flags: c.int, option: ^SceKernelLMOption, status: ^c.int) -> sce.UID --- sceKernelLoadStartModule :: proc(path: cstring, args: sce.Size, argp: rawptr, flags: c.int, option: ^SceKernelLMOption, status: ^c.int) -> sce.UID ---
StopUnloadModule :: proc(modid: sce.UID, args: sce.Size, argp: rawptr, flags: c.int, option: ^SceKernelULMOption, status: ^c.int) -> c.int --- sceKernelStopUnloadModule :: proc(modid: sce.UID, args: sce.Size, argp: rawptr, flags: c.int, option: ^SceKernelULMOption, status: ^c.int) -> c.int ---
/** /**
* Exit current Process with specified return code * Exit current Process with specified return code
@@ -773,7 +772,7 @@ foreign libkernel {
* *
* @return 0 on success, < 0 on error. * @return 0 on success, < 0 on error.
*/ */
ExitProcess :: proc(res: c.int) -> c.int --- sceKernelExitProcess :: proc(res: c.int) -> c.int ---
/** /**
* Get the process time of the current process. * Get the process time of the current process.
@@ -782,23 +781,21 @@ foreign libkernel {
* *
* @return 0 on success, < 0 on error. * @return 0 on success, < 0 on error.
*/ */
GetProcessTime :: proc(pSysClock: ^sce.KernelSysClock) -> c.int --- sceKernelGetProcessTime :: proc(pSysClock: ^sce.KernelSysClock) -> c.int ---
/** /**
* Get the lower 32 bits part of process time of the current process. * Get the lower 32 bits part of process time of the current process.
* *
* @return process time of the current process * @return process time of the current process
*/ */
GetProcessTimeLow :: proc() -> sce.UInt32 --- sceKernelGetProcessTimeLow :: proc() -> sce.UInt32 ---
/** /**
* Get the process time of the current process. * Get the process time of the current process.
* *
* @return process time of the current process * @return process time of the current process
*/ */
GetProcessTimeWide :: proc() -> sce.UInt64 --- sceKernelGetProcessTimeWide :: proc() -> sce.UInt64 ---
sceKernelGetOpenPsId :: proc(id: ^SceKernelOpenPsId) -> c.int ---
GetOpenPsId :: proc(id: ^SceKernelOpenPsId) -> c.int ---
} }
+14 -22
View File
@@ -10,10 +10,9 @@ SceKernelLoadModuleOption :: struct {}
SceKernelUnloadModuleOption :: struct {} SceKernelUnloadModuleOption :: struct {}
SceKernelLibraryInfo :: struct {} SceKernelLibraryInfo :: struct {}
@(link_prefix = "sceKernel")
foreign modulemgr { foreign modulemgr {
GetModuleInfo :: proc(uid: sce.UID, info: ^SceKernelModuleInfo) -> c.int --- sceKernelGetModuleInfo :: proc(uid: sce.UID, info: ^SceKernelModuleInfo) -> c.int ---
GetModuleList :: proc(type: sce.UInt8, uids: [^]sce.UID, num: ^sce.Size) -> c.int --- sceKernelGetModuleList :: proc(type: sce.UInt8, uids: [^]sce.UID, num: ^sce.Size) -> c.int ---
/** /**
* Gets system firmware information. * Gets system firmware information.
@@ -22,27 +21,20 @@ foreign modulemgr {
* *
* @note - If you spoofed the firmware version it will return the spoofed firmware. * @note - If you spoofed the firmware version it will return the spoofed firmware.
*/ */
GetSystemSwVersion :: proc(version: ^SceKernelSystemSwVersion) -> c.int --- sceKernelGetSystemSwVersion :: proc(version: ^SceKernelSystemSwVersion) -> c.int ---
@(link_name = "_sceKernelLoadModule") _sceKernelLoadModule :: proc(module_filename: cstring, flags: sce.UInt32, option: ^SceKernelLoadModuleOption) -> sce.UID ---
_LoadModule :: proc(module_filename: cstring, flags: sce.UInt32, option: ^SceKernelLoadModuleOption) -> sce.UID --- _sceKernelLoadStartModule :: proc(module_filename: cstring, args: sce.Size, argp: rawptr, flags: sce.UInt32) -> sce.UID ---
@(link_name = "_sceKernelLoadStartModule") _sceKernelUnloadModule :: proc(uid: sce.UID, flags: sce.UInt32, option: ^SceKernelUnloadModuleOption) -> c.int ---
_LoadStartModule :: proc(module_filename: cstring, args: sce.Size, argp: rawptr, flags: sce.UInt32) -> sce.UID --- _sceKernelStopModule :: proc(uid: sce.UID, args: sce.Size, argp: rawptr, flags: sce.UInt32) -> c.int ---
@(link_name = "_sceKernelUnloadModule") _sceKernelStopUnloadModule :: proc(uid: sce.UID, args: sce.Size, argp: rawptr, flags: sce.UInt32) -> c.int ---
_UnloadModule :: proc(uid: sce.UID, flags: sce.UInt32, option: ^SceKernelUnloadModuleOption) -> c.int ---
@(link_name = "_sceKernelStopModule")
_StopModule :: proc(uid: sce.UID, args: sce.Size, argp: rawptr, flags: sce.UInt32) -> c.int ---
@(link_name = "_sceKernelStopUnloadModule")
_StopUnloadModule :: proc(uid: sce.UID, args: sce.Size, argp: rawptr, flags: sce.UInt32) -> c.int ---
@(link_name = "_sceKernelOpenModule") _sceKernelOpenModule :: proc(module_filename: cstring, args: sce.Size, argp: rawptr, flags: sce.UInt32) -> sce.UID ---
_OpenModule :: proc(module_filename: cstring, args: sce.Size, argp: rawptr, flags: sce.UInt32) -> sce.UID --- _sceKernelCloseModule :: proc(modid: sce.UID, args: sce.Size, argp: rawptr, flags: sce.UInt32) -> sce.UID ---
@(link_name = "_sceKernelCloseModule")
_CloseModule :: proc(modid: sce.UID, args: sce.Size, argp: rawptr, flags: sce.UInt32) -> sce.UID ---
GetLibraryInfoByNID :: proc(modid: sce.UID, libnid: sce.NID, info: ^SceKernelLibraryInfo) -> c.int --- sceKernelGetLibraryInfoByNID :: proc(modid: sce.UID, libnid: sce.NID, info: ^SceKernelLibraryInfo) -> c.int ---
IsCalledFromSysModule :: proc(lr: rawptr) -> c.int --- sceKernelIsCalledFromSysModule :: proc(lr: rawptr) -> c.int ---
GetModuleIdByAddr :: proc(addr: rawptr) -> sce.UID --- sceKernelGetModuleIdByAddr :: proc(addr: rawptr) -> sce.UID ---
GetAllowedSdkVersionOnSystem :: proc() -> sce.UInt32 --- sceKernelGetAllowedSdkVersionOnSystem :: proc() -> sce.UInt32 ---
} }
+12 -13
View File
@@ -5,7 +5,6 @@ import sce "../common"
foreign import processmgr "system:SceProcessmgr_stub" foreign import processmgr "system:SceProcessmgr_stub"
@(link_prefix = "sceKernel")
foreign processmgr { foreign processmgr {
/** /**
* Cancel specified idle timers to prevent entering in power save processing. * Cancel specified idle timers to prevent entering in power save processing.
@@ -14,7 +13,7 @@ foreign processmgr {
* *
* @return 0 * @return 0
*/ */
PowerTick :: proc(type: SceKernelPowerTickType) -> c.int --- sceKernelPowerTick :: proc(type: SceKernelPowerTickType) -> c.int ---
/** /**
* Locks certain timers from triggering. * Locks certain timers from triggering.
@@ -23,7 +22,7 @@ foreign processmgr {
* *
* @return 0 * @return 0
*/ */
PowerLock :: proc(type: SceKernelPowerTickType) -> c.int --- sceKernelPowerLock :: proc(type: SceKernelPowerTickType) -> c.int ---
/** /**
* Unlocks certain timers. * Unlocks certain timers.
@@ -32,19 +31,19 @@ foreign processmgr {
* *
* @return 0 * @return 0
*/ */
PowerUnlock :: proc(type: SceKernelPowerTickType) -> c.int --- sceKernelPowerUnlock :: proc(type: SceKernelPowerTickType) -> c.int ---
GetCurrentProcess :: proc() -> sce.UID --- sceKernelGetCurrentProcess :: proc() -> sce.UID ---
GetRemoteProcessTime :: proc(processId: sce.UID, pClock: ^sce.KernelSysClock) -> sce.Int32 --- sceKernelGetRemoteProcessTime :: proc(processId: sce.UID, pClock: ^sce.KernelSysClock) -> sce.Int32 ---
GetStderr :: proc() -> sce.UID --- sceKernelGetStderr :: proc() -> sce.UID ---
GetStdin :: proc() -> sce.UID --- sceKernelGetStdin :: proc() -> sce.UID ---
GetStdout :: proc() -> sce.UID --- sceKernelGetStdout :: proc() -> sce.UID ---
GetProcessParam :: proc() -> rawptr --- sceKernelGetProcessParam :: proc() -> rawptr ---
LibcClock :: proc() -> SceKernelClock --- sceKernelLibcClock :: proc() -> SceKernelClock ---
LibcTime :: proc(tloc: ^SceKernelTime) -> SceKernelTime --- sceKernelLibcTime :: proc(tloc: ^SceKernelTime) -> SceKernelTime ---
LibcGettimeofday :: proc(tv: ^SceKernelTimeval, tz: ^SceKernelTimezone) -> c.int --- sceKernelLibcGettimeofday :: proc(tv: ^SceKernelTimeval, tz: ^SceKernelTimezone) -> c.int ---
} }
+17 -18
View File
@@ -5,9 +5,8 @@ import sce "../common"
foreign import sysmem "system:SceSysmem_stub" foreign import sysmem "system:SceSysmem_stub"
@(link_prefix = "sceKernel")
foreign sysmem { foreign sysmem {
GetCpuId :: proc() -> c.int --- sceKernelGetCpuId :: proc() -> c.int ---
/** /**
* Allocates a new memory block * Allocates a new memory block
@@ -19,7 +18,7 @@ foreign sysmem {
* *
* @return SceUID of the memory block on success, < 0 on error. * @return SceUID of the memory block on success, < 0 on error.
*/ */
AllocMemBlock :: proc(name: cstring, type: SceKernelMemBlockType, size: sce.Size, opt: ^SceKernelAllocMemBlockOpt) -> sce.UID --- sceKernelAllocMemBlock :: proc(name: cstring, type: SceKernelMemBlockType, size: sce.Size, opt: ^SceKernelAllocMemBlockOpt) -> sce.UID ---
/** /**
* Frees new memory block * Frees new memory block
@@ -28,7 +27,7 @@ foreign sysmem {
* *
* @return 0 on success, < 0 on error. * @return 0 on success, < 0 on error.
*/ */
FreeMemBlock :: proc(uid: sce.UID) -> c.int --- sceKernelFreeMemBlock :: proc(uid: sce.UID) -> c.int ---
/** /**
* Gets the base address of a memory block * Gets the base address of a memory block
@@ -38,34 +37,34 @@ foreign sysmem {
* *
* @return 0 on success, < 0 on error. * @return 0 on success, < 0 on error.
*/ */
GetMemBlockBase :: proc(uid: sce.UID, base: ^rawptr) -> c.int --- sceKernelGetMemBlockBase :: proc(uid: sce.UID, base: ^rawptr) -> c.int ---
FindMemBlockByAddr :: proc(addr: rawptr, size: sce.Size) -> sce.UID --- sceKernelFindMemBlockByAddr :: proc(addr: rawptr, size: sce.Size) -> sce.UID ---
GetMemBlockInfoByAddr :: proc(base: rawptr, info: ^SceKernelMemBlockInfo) -> c.int --- sceKernelGetMemBlockInfoByAddr :: proc(base: rawptr, info: ^SceKernelMemBlockInfo) -> c.int ---
GetMemBlockInfoByRange :: proc(base: rawptr, size: sce.Size, info: ^SceKernelMemBlockInfo) -> c.int --- sceKernelGetMemBlockInfoByRange :: proc(base: rawptr, size: sce.Size, info: ^SceKernelMemBlockInfo) -> c.int ---
AllocMemBlockForVM :: proc(name: cstring, size: sce.Size) -> sce.UID --- sceKernelAllocMemBlockForVM :: proc(name: cstring, size: sce.Size) -> sce.UID ---
SyncVMDomain :: proc(uid: sce.UID, data: rawptr, size: sce.Size) -> c.int --- sceKernelSyncVMDomain :: proc(uid: sce.UID, data: rawptr, size: sce.Size) -> c.int ---
OpenVMDomain :: proc() -> c.int --- sceKernelOpenVMDomain :: proc() -> c.int ---
CloseVMDomain :: proc() -> c.int --- sceKernelCloseVMDomain :: proc() -> c.int ---
OpenMemBlock :: proc(name: cstring, flags: c.int) -> c.int --- sceKernelOpenMemBlock :: proc(name: cstring, flags: c.int) -> c.int ---
CloseMemBlock :: proc(uid: sce.UID) -> c.int --- sceKernelCloseMemBlock :: proc(uid: sce.UID) -> c.int ---
/** /**
* Get the model number of the device * Get the model number of the device
* *
* @return A value from SCE_KERNEL_MODEL * @return A value from SCE_KERNEL_MODEL
*/ */
GetModelForCDialog :: proc() -> c.int --- sceKernelGetModelForCDialog :: proc() -> c.int ---
/** /**
* Get the model number of the device * Get the model number of the device
* *
* @return A value from SCE_KERNEL_MODEL * @return A value from SCE_KERNEL_MODEL
*/ */
GetModel :: proc() -> c.int --- sceKernelGetModel :: proc() -> c.int ---
/** /**
* Get free memory size in bytes * Get free memory size in bytes
@@ -73,7 +72,7 @@ foreign sysmem {
* @param[out] info - Returned free memory size for different kind of memory block types * @param[out] info - Returned free memory size for different kind of memory block types
* @return 0 on success, < 0 on error. * @return 0 on success, < 0 on error.
*/ */
GetFreeMemorySize :: proc(info: ^SceKernelFreeMemorySizeInfo) -> c.int --- sceKernelGetFreeMemorySize :: proc(info: ^SceKernelFreeMemorySizeInfo) -> c.int ---
IsPSVitaTV :: proc() -> c.int --- sceKernelIsPSVitaTV :: proc() -> c.int ---
} }
+47 -49
View File
@@ -5,7 +5,6 @@ import sce "../common"
foreign import threadmgr "system:SceKernelThreadMgr_stub" foreign import threadmgr "system:SceKernelThreadMgr_stub"
@(link_prefix = "sceKernel")
foreign threadmgr { foreign threadmgr {
/** /**
* Create callback * Create callback
@@ -23,7 +22,7 @@ foreign threadmgr {
* *
* @return >= 0 A callback id which can be used in subsequent functions, < 0 an error. * @return >= 0 A callback id which can be used in subsequent functions, < 0 an error.
*/ */
CreateCallback :: proc(name: cstring, attr: c.uint, func: SceKernelCallbackFunction, userData: rawptr) -> c.int --- sceKernelCreateCallback :: proc(name: cstring, attr: c.uint, func: SceKernelCallbackFunction, userData: rawptr) -> c.int ---
/** /**
* Delete a callback * Delete a callback
@@ -32,7 +31,7 @@ foreign threadmgr {
* *
* @return 0 on success, < 0 on error * @return 0 on success, < 0 on error
*/ */
DeleteCallback :: proc(cb: sce.UID) -> c.int --- sceKernelDeleteCallback :: proc(cb: sce.UID) -> c.int ---
/** /**
* Notify a callback * Notify a callback
@@ -42,7 +41,7 @@ foreign threadmgr {
* *
* @return 0 on success, < 0 on error * @return 0 on success, < 0 on error
*/ */
NotifyCallback :: proc(cb: sce.UID, arg2: c.int) -> c.int --- sceKernelNotifyCallback :: proc(cb: sce.UID, arg2: c.int) -> c.int ---
/** /**
* Cancel a callback ? * Cancel a callback ?
@@ -51,7 +50,7 @@ foreign threadmgr {
* *
* @return 0 on success, < 0 on error * @return 0 on success, < 0 on error
*/ */
CancelCallback :: proc(cb: sce.UID) -> c.int --- sceKernelCancelCallback :: proc(cb: sce.UID) -> c.int ---
/** /**
* Get the callback count * Get the callback count
@@ -60,14 +59,14 @@ foreign threadmgr {
* *
* @return The callback count, < 0 on error * @return The callback count, < 0 on error
*/ */
GetCallbackCount :: proc(cb: sce.UID) -> c.int --- sceKernelGetCallbackCount :: proc(cb: sce.UID) -> c.int ---
/** /**
* Check callback ? * Check callback ?
* *
* @return Something or another * @return Something or another
*/ */
CheckCallback :: proc() -> c.int --- sceKernelCheckCallback :: proc() -> c.int ---
/** /**
* Destroy a condition variable * Destroy a condition variable
@@ -75,7 +74,7 @@ foreign threadmgr {
* @param condition variableid - The condition variable id returned from ::sceKernelCreateCond * @param condition variableid - The condition variable id returned from ::sceKernelCreateCond
* @return Returns the value 0 if it's successful, otherwise -1 * @return Returns the value 0 if it's successful, otherwise -1
*/ */
DeleteCond :: proc(condId: sce.UID) -> c.int --- sceKernelDeleteCond :: proc(condId: sce.UID) -> c.int ---
/** /**
* Open a condition variable * Open a condition variable
@@ -83,7 +82,7 @@ foreign threadmgr {
* @param name - The name of the condition variable to open * @param name - The name of the condition variable to open
* @return Returns the value 0 if it's successful, otherwise -1 * @return Returns the value 0 if it's successful, otherwise -1
*/ */
OpenCond :: proc(name: cstring) -> c.int --- sceKernelOpenCond :: proc(name: cstring) -> c.int ---
/** /**
* Close a condition variable * Close a condition variable
@@ -91,7 +90,7 @@ foreign threadmgr {
* @param condition variableid - The condition variable id returned from ::sceKernelCreateCond * @param condition variableid - The condition variable id returned from ::sceKernelCreateCond
* @return Returns the value 0 if it's successful, otherwise -1 * @return Returns the value 0 if it's successful, otherwise -1
*/ */
CloseCond :: proc(condId: sce.UID) -> c.int --- sceKernelCloseCond :: proc(condId: sce.UID) -> c.int ---
/** /**
* Signals a condition variable * Signals a condition variable
@@ -99,7 +98,7 @@ foreign threadmgr {
* @param condId - The condition variable id returned from ::sceKernelCreateCond * @param condId - The condition variable id returned from ::sceKernelCreateCond
* @return < 0 On error. * @return < 0 On error.
*/ */
SignalCond :: proc(condId: sce.UID) -> c.int --- sceKernelSignalCond :: proc(condId: sce.UID) -> c.int ---
/** /**
* Signals a condition variable to all threads waiting for it * Signals a condition variable to all threads waiting for it
@@ -107,7 +106,7 @@ foreign threadmgr {
* @param condId - The condition variable id returned from ::sceKernelCreateCond * @param condId - The condition variable id returned from ::sceKernelCreateCond
* @return < 0 On error. * @return < 0 On error.
*/ */
SignalCondAll :: proc(condId: sce.UID) -> c.int --- sceKernelSignalCondAll :: proc(condId: sce.UID) -> c.int ---
/** /**
* Signals a condition variable to a specific thread waiting for it * Signals a condition variable to a specific thread waiting for it
@@ -116,7 +115,7 @@ foreign threadmgr {
* @param threadId - The thread id returned from ::sceKernelCreateThread * @param threadId - The thread id returned from ::sceKernelCreateThread
* @return < 0 On error. * @return < 0 On error.
*/ */
SignalCondTo :: proc(condId: sce.UID, threadId: sce.UID) -> c.int --- sceKernelSignalCondTo :: proc(condId: sce.UID, threadId: sce.UID) -> c.int ---
/** /**
* Set an event flag bit pattern. * Set an event flag bit pattern.
@@ -126,7 +125,7 @@ foreign threadmgr {
* *
* @return < 0 On error * @return < 0 On error
*/ */
SetEventFlag :: proc(evid: sce.UID, bits: c.uint) -> c.int --- sceKernelSetEventFlag :: proc(evid: sce.UID, bits: c.uint) -> c.int ---
/** /**
* Clear a event flag bit pattern * Clear a event flag bit pattern
@@ -136,7 +135,7 @@ foreign threadmgr {
* *
* @return < 0 on Error * @return < 0 on Error
*/ */
ClearEventFlag :: proc(evid: sce.UID, bits: c.uint) -> c.int --- sceKernelClearEventFlag :: proc(evid: sce.UID, bits: c.uint) -> c.int ---
/** /**
* Delete an event flag * Delete an event flag
@@ -145,7 +144,7 @@ foreign threadmgr {
* *
* @return < 0 On error * @return < 0 On error
*/ */
DeleteEventFlag :: proc(evid: c.int) -> c.int --- sceKernelDeleteEventFlag :: proc(evid: c.int) -> c.int ---
/** /**
* Delete a message pipe * Delete a message pipe
@@ -154,7 +153,7 @@ foreign threadmgr {
* *
* @return 0 on success, < 0 on error * @return 0 on success, < 0 on error
*/ */
DeleteMsgPipe :: proc(uid: sce.UID) -> c.int --- sceKernelDeleteMsgPipe :: proc(uid: sce.UID) -> c.int ---
/** /**
* Destroy a mutex * Destroy a mutex
@@ -162,7 +161,7 @@ foreign threadmgr {
* @param mutexid - The mutex id returned from ::sceKernelCreateMutex * @param mutexid - The mutex id returned from ::sceKernelCreateMutex
* @return Returns the value 0 if it's successful, otherwise -1 * @return Returns the value 0 if it's successful, otherwise -1
*/ */
DeleteMutex :: proc(mutexid: sce.UID) -> c.int --- sceKernelDeleteMutex :: proc(mutexid: sce.UID) -> c.int ---
/** /**
@@ -171,7 +170,7 @@ foreign threadmgr {
* @param name - The name of the mutex to open * @param name - The name of the mutex to open
* @return Returns the value 0 if it's successful, otherwise -1 * @return Returns the value 0 if it's successful, otherwise -1
*/ */
OpenMutex :: proc(name: cstring) -> c.int --- sceKernelOpenMutex :: proc(name: cstring) -> c.int ---
/** /**
* Close a mutex * Close a mutex
@@ -179,7 +178,7 @@ foreign threadmgr {
* @param mutexid - The mutex id returned from ::sceKernelCreateMutex * @param mutexid - The mutex id returned from ::sceKernelCreateMutex
* @return Returns the value 0 if it's successful, otherwise -1 * @return Returns the value 0 if it's successful, otherwise -1
*/ */
CloseMutex :: proc(mutexid: sce.UID) -> c.int --- sceKernelCloseMutex :: proc(mutexid: sce.UID) -> c.int ---
/** /**
@@ -189,7 +188,7 @@ foreign threadmgr {
* @param lockCount - The value to increment to the lock count of the mutex * @param lockCount - The value to increment to the lock count of the mutex
* @return < 0 On error. * @return < 0 On error.
*/ */
TryLockMutex :: proc(mutexid: sce.UID, lockCount: c.int) -> c.int --- sceKernelTryLockMutex :: proc(mutexid: sce.UID, lockCount: c.int) -> c.int ---
/** /**
* Try to unlock a mutex (non-blocking) * Try to unlock a mutex (non-blocking)
@@ -198,7 +197,7 @@ foreign threadmgr {
* @param unlockCount - The value to decrement to the lock count of the mutex * @param unlockCount - The value to decrement to the lock count of the mutex
* @return < 0 On error. * @return < 0 On error.
*/ */
UnlockMutex :: proc(mutexid: sce.UID, unlockCount: c.int) -> c.int --- sceKernelUnlockMutex :: proc(mutexid: sce.UID, unlockCount: c.int) -> c.int ---
/** /**
* Destroy a rwlock * Destroy a rwlock
@@ -206,7 +205,7 @@ foreign threadmgr {
* @param rwlock_id - The rwlock id returned from ::sceKernelCreateRWLock * @param rwlock_id - The rwlock id returned from ::sceKernelCreateRWLock
* @return 0 on success, < 0 on error * @return 0 on success, < 0 on error
*/ */
DeleteRWLock :: proc(rwlock_id: sce.UID) -> c.int --- sceKernelDeleteRWLock :: proc(rwlock_id: sce.UID) -> c.int ---
/** /**
* Open a rwlock * Open a rwlock
@@ -214,7 +213,7 @@ foreign threadmgr {
* @param name - The name of the rwlock to open * @param name - The name of the rwlock to open
* @return RWLock id on success, < 0 on error * @return RWLock id on success, < 0 on error
*/ */
OpenRWLock :: proc(name: cstring) -> sce.UID --- sceKernelOpenRWLock :: proc(name: cstring) -> sce.UID ---
/** /**
* Close a rwlock * Close a rwlock
@@ -222,14 +221,14 @@ foreign threadmgr {
* @param rwlock_id - The rwlock id returned from ::sceKernelCreateRWLock * @param rwlock_id - The rwlock id returned from ::sceKernelCreateRWLock
* @return 0 on success, < 0 on error * @return 0 on success, < 0 on error
*/ */
CloseRWLock :: proc(rwlock_id: sce.UID) -> c.int --- sceKernelCloseRWLock :: proc(rwlock_id: sce.UID) -> c.int ---
/** /**
* Try to lock a rwlock with read access (non-blocking) * Try to lock a rwlock with read access (non-blocking)
* *
* @param rwlock_id - The rwlock id returned from ::sceKernelCreateRWLock * @param rwlock_id - The rwlock id returned from ::sceKernelCreateRWLock
* @return 0 on success, < 0 on error * @return 0 on success, < 0 on error
*/ */
TryLockReadRWLock :: proc(rwlock_id: sce.UID) -> c.int --- sceKernelTryLockReadRWLock :: proc(rwlock_id: sce.UID) -> c.int ---
/** /**
* Try to lock a rwlock with write access (non-blocking) * Try to lock a rwlock with write access (non-blocking)
@@ -237,7 +236,7 @@ foreign threadmgr {
* @param rwlock_id - The rwlock id returned from ::sceKernelCreateRWLock * @param rwlock_id - The rwlock id returned from ::sceKernelCreateRWLock
* @return 0 on success, < 0 on error * @return 0 on success, < 0 on error
*/ */
TryLockWriteRWLock :: proc(rwlock_id: sce.UID) -> c.int --- sceKernelTryLockWriteRWLock :: proc(rwlock_id: sce.UID) -> c.int ---
/** /**
* Try to unlock a rwlock with read access (non-blocking) * Try to unlock a rwlock with read access (non-blocking)
@@ -245,7 +244,7 @@ foreign threadmgr {
* @param rwlock_id - The rwlock id returned from ::sceKernelCreateRWLock * @param rwlock_id - The rwlock id returned from ::sceKernelCreateRWLock
* @return 0 on success, < 0 on error * @return 0 on success, < 0 on error
*/ */
UnlockReadRWLock :: proc(rwlock_id: sce.UID) -> c.int --- sceKernelUnlockReadRWLock :: proc(rwlock_id: sce.UID) -> c.int ---
/** /**
* Try to unlock a rwlock with write access (non-blocking) * Try to unlock a rwlock with write access (non-blocking)
@@ -253,7 +252,7 @@ foreign threadmgr {
* @param rwlock_id - The rwlock id returned from ::sceKernelCreateRWLock * @param rwlock_id - The rwlock id returned from ::sceKernelCreateRWLock
* @return 0 on success, < 0 on error * @return 0 on success, < 0 on error
*/ */
UnlockWriteRWLock :: proc(rwlock_id: sce.UID) -> c.int --- sceKernelUnlockWriteRWLock :: proc(rwlock_id: sce.UID) -> c.int ---
/** /**
* Destroy a semaphore * Destroy a semaphore
@@ -261,7 +260,7 @@ foreign threadmgr {
* @param semaid - The semaid returned from a previous create call. * @param semaid - The semaid returned from a previous create call.
* @return Returns the value 0 if it's successful, otherwise -1 * @return Returns the value 0 if it's successful, otherwise -1
*/ */
DeleteSema :: proc(semaid: sce.UID) -> c.int --- sceKernelDeleteSema :: proc(semaid: sce.UID) -> c.int ---
/** /**
* Send a signal to a semaphore * Send a signal to a semaphore
@@ -277,7 +276,7 @@ foreign threadmgr {
* *
* @return < 0 On error. * @return < 0 On error.
*/ */
SignalSema :: proc(semaid: sce.UID, signal: c.int) -> c.int --- sceKernelSignalSema :: proc(semaid: sce.UID, signal: c.int) -> c.int ---
/** /**
* Poll a semaphore. * Poll a semaphore.
@@ -287,11 +286,11 @@ foreign threadmgr {
* *
* @return < 0 on error. * @return < 0 on error.
*/ */
PollSema :: proc(semaid: sce.UID, signal: c.int) -> c.int --- sceKernelPollSema :: proc(semaid: sce.UID, signal: c.int) -> c.int ---
OpenSema :: proc(name: cstring) -> sce.UID --- sceKernelOpenSema :: proc(name: cstring) -> sce.UID ---
CloseSema :: proc(semaid: sce.UID) -> c.int --- sceKernelCloseSema :: proc(semaid: sce.UID) -> c.int ---
/** /**
* @brief Send a signal to the thread specified by thid. Note that it can send a signal to the current thread as well. * @brief Send a signal to the thread specified by thid. Note that it can send a signal to the current thread as well.
@@ -300,7 +299,7 @@ foreign threadmgr {
* @return 0 on success * @return 0 on success
* @return SCE_KERNEL_ERROR_ALREADY_SENT if the last signal was not consumed by sceKernelWaitSignal * @return SCE_KERNEL_ERROR_ALREADY_SENT if the last signal was not consumed by sceKernelWaitSignal
*/ */
SendSignal :: proc(thid: sce.UID) -> c.int --- sceKernelSendSignal :: proc(thid: sce.UID) -> c.int ---
/** /**
* Delate a thread * Delate a thread
@@ -309,7 +308,7 @@ foreign threadmgr {
* *
* @return < 0 on error. * @return < 0 on error.
*/ */
DeleteThread :: proc(thid: sce.UID) -> c.int --- sceKernelDeleteThread :: proc(thid: sce.UID) -> c.int ---
/** /**
@@ -317,7 +316,7 @@ foreign threadmgr {
* *
* @param status - Exit status. * @param status - Exit status.
*/ */
ExitThread :: proc(status: c.int) -> c.int --- sceKernelExitThread :: proc(status: c.int) -> c.int ---
/** /**
@@ -325,7 +324,7 @@ foreign threadmgr {
* *
* @param status - Exit status * @param status - Exit status
*/ */
ExitDeleteThread :: proc(status: c.int) -> c.int --- sceKernelExitDeleteThread :: proc(status: c.int) -> c.int ---
/** /**
* Delay the current thread by a specified number of microseconds * Delay the current thread by a specified number of microseconds
@@ -337,7 +336,7 @@ foreign threadmgr {
* sceKernelDelayThread(1000000) // Delay for a second * sceKernelDelayThread(1000000) // Delay for a second
* @endcode * @endcode
*/ */
DelayThread :: proc(delay: sce.UInt) -> c.int --- sceKernelDelayThread :: proc(delay: sce.UInt) -> c.int ---
/** /**
* Delay the current thread by a specified number of microseconds and handle any callbacks. * Delay the current thread by a specified number of microseconds and handle any callbacks.
@@ -349,7 +348,7 @@ foreign threadmgr {
* sceKernelDelayThread(1000000) // Delay for a second * sceKernelDelayThread(1000000) // Delay for a second
* @endcode * @endcode
*/ */
DelayThreadCB :: proc(delay: sce.UInt) -> c.int --- sceKernelDelayThreadCB :: proc(delay: sce.UInt) -> c.int ---
/** /**
* Change the threads current priority. * Change the threads current priority.
@@ -366,7 +365,7 @@ foreign threadmgr {
* *
* @return 0 if successful, otherwise the error code. * @return 0 if successful, otherwise the error code.
*/ */
ChangeThreadPriority :: proc(thid: sce.UID, priority: c.int) -> c.int --- sceKernelChangeThreadPriority :: proc(thid: sce.UID, priority: c.int) -> c.int ---
/** /**
@@ -376,7 +375,7 @@ foreign threadmgr {
* *
* @return The free size. * @return The free size.
*/ */
GetThreadStackFreeSize :: proc(thid: sce.UID) -> c.int --- sceKernelGetThreadStackFreeSize :: proc(thid: sce.UID) -> c.int ---
/** /**
* Retrive the cpu affinity mask of a thread. * Retrive the cpu affinity mask of a thread.
@@ -385,7 +384,7 @@ foreign threadmgr {
* *
* @return current affinity mask if >= 0, otherwise the error code. * @return current affinity mask if >= 0, otherwise the error code.
*/ */
GetThreadCpuAffinityMask :: proc(thid: sce.UID) -> c.int --- sceKernelGetThreadCpuAffinityMask :: proc(thid: sce.UID) -> c.int ---
/** /**
* Set the cpu affinity mask of a thread. * Set the cpu affinity mask of a thread.
@@ -395,14 +394,14 @@ foreign threadmgr {
* *
* @return 0 if successful, otherwise the error code. * @return 0 if successful, otherwise the error code.
*/ */
ChangeThreadCpuAffinityMask :: proc(thid: sce.UID, mask: c.int) -> c.int --- sceKernelChangeThreadCpuAffinityMask :: proc(thid: sce.UID, mask: c.int) -> c.int ---
/** /**
* Get the process ID of in the running thread. * Get the process ID of in the running thread.
* *
* @return process ID of in the running thread * @return process ID of in the running thread
*/ */
GetProcessId :: proc() -> sce.UID --- sceKernelGetProcessId :: proc() -> sce.UID ---
/** /**
* Get the type of a Threadmgr uid * Get the type of a Threadmgr uid
@@ -411,7 +410,7 @@ foreign threadmgr {
* *
* @return The type, < 0 on error * @return The type, < 0 on error
*/ */
GetThreadmgrUIDClass :: proc(uid: sce.UID) -> SceKernelIdListType --- sceKernelGetThreadmgrUIDClass :: proc(uid: sce.UID) -> SceKernelIdListType ---
/** /**
@@ -420,7 +419,7 @@ foreign threadmgr {
* @param key - the TLS keyslot index * @param key - the TLS keyslot index
* @return pointer to TLS memory * @return pointer to TLS memory
*/ */
GetThreadTLSAddr :: proc(thid: sce.UID, key: c.int) -> rawptr --- sceKernelGetThreadTLSAddr :: proc(thid: sce.UID, key: c.int) -> rawptr ---
/** /**
@@ -428,6 +427,5 @@ foreign threadmgr {
* *
* @return The system time * @return The system time
*/ */
GetSystemTimeWide :: proc() -> sce.Int64 --- sceKernelGetSystemTimeWide :: proc() -> sce.Int64 ---
} }
+17 -18
View File
@@ -5,56 +5,55 @@ import sce "../common"
foreign import location "system:SceLibLocation_stub" foreign import location "system:SceLibLocation_stub"
@(link_prefix = "sceLocation")
foreign location { foreign location {
/** Library start */ /** Library start */
Open :: proc(handle: ^SceLocationHandle, locateMethod: SceLocationLocationMethod, headingMethod: SceLocationHeadingMethod) -> sce.Int32 --- sceLocationOpen :: proc(handle: ^SceLocationHandle, locateMethod: SceLocationLocationMethod, headingMethod: SceLocationHeadingMethod) -> sce.Int32 ---
/** Close library */ /** Close library */
Close :: proc(handle: SceLocationHandle) -> sce.Int32 --- sceLocationClose :: proc(handle: SceLocationHandle) -> sce.Int32 ---
/** Reopen library */ /** Reopen library */
Reopen :: proc(handle: SceLocationHandle, locateMethod: SceLocationLocationMethod, headingMethod: SceLocationHeadingMethod) -> sce.Int32 --- sceLocationReopen :: proc(handle: SceLocationHandle, locateMethod: SceLocationLocationMethod, headingMethod: SceLocationHeadingMethod) -> sce.Int32 ---
/** Get location measurement method */ /** Get location measurement method */
GetMethod :: proc(handle: SceLocationHandle, locateMethod: ^SceLocationLocationMethod, headingMethod: ^SceLocationHeadingMethod) -> sce.Int32 --- sceLocationGetMethod :: proc(handle: SceLocationHandle, locateMethod: ^SceLocationLocationMethod, headingMethod: ^SceLocationHeadingMethod) -> sce.Int32 ---
/** Get location information */ /** Get location information */
GetLocation :: proc(handle: SceLocationHandle, locationInfo: ^SceLocationLocationInfo) -> sce.Int32 --- sceLocationGetLocation :: proc(handle: SceLocationHandle, locationInfo: ^SceLocationLocationInfo) -> sce.Int32 ---
/** Cancel location information acquisition operation */ /** Cancel location information acquisition operation */
CancelGetLocation :: proc(handle: SceLocationHandle) -> sce.Int32 --- sceLocationCancelGetLocation :: proc(handle: SceLocationHandle) -> sce.Int32 ---
/** Start continuous acquisition of location information */ /** Start continuous acquisition of location information */
StartLocationCallback :: proc(handle: SceLocationHandle, distance: sce.UInt32, callback: SceLocationLocationInfoCallback, userdata: rawptr) -> sce.Int32 --- sceLocationStartLocationCallback :: proc(handle: SceLocationHandle, distance: sce.UInt32, callback: SceLocationLocationInfoCallback, userdata: rawptr) -> sce.Int32 ---
/** Stop continuous acquisition of location information */ /** Stop continuous acquisition of location information */
StopLocationCallback :: proc(handle: SceLocationHandle) -> sce.Int32 --- sceLocationStopLocationCallback :: proc(handle: SceLocationHandle) -> sce.Int32 ---
/** Get direction information */ /** Get direction information */
GetHeading :: proc(handle: SceLocationHandle, headingInfo: ^SceLocationHeadingInfo) -> sce.Int32 --- sceLocationGetHeading :: proc(handle: SceLocationHandle, headingInfo: ^SceLocationHeadingInfo) -> sce.Int32 ---
/** Start continuous acquisition of direction information */ /** Start continuous acquisition of direction information */
StartHeadingCallback :: proc(handle: SceLocationHandle, difference: sce.UInt32, callback: SceLocationHeadingInfoCallback, userdata: rawptr) -> sce.Int32 --- sceLocationStartHeadingCallback :: proc(handle: SceLocationHandle, difference: sce.UInt32, callback: SceLocationHeadingInfoCallback, userdata: rawptr) -> sce.Int32 ---
/** Stop continuous acquisition of direction information */ /** Stop continuous acquisition of direction information */
StopHeadingCallback :: proc(handle: SceLocationHandle) -> sce.Int32 --- sceLocationStopHeadingCallback :: proc(handle: SceLocationHandle) -> sce.Int32 ---
/** Allow acquisition of location information */ /** Allow acquisition of location information */
Confirm :: proc(handle: SceLocationHandle) -> sce.Int32 --- sceLocationConfirm :: proc(handle: SceLocationHandle) -> sce.Int32 ---
/** Get status of location information acquisition permission dialog */ /** Get status of location information acquisition permission dialog */
ConfirmGetStatus :: proc(handle: SceLocationHandle, status: ^SceLocationDialogStatus) -> sce.Int32 --- sceLocationConfirmGetStatus :: proc(handle: SceLocationHandle, status: ^SceLocationDialogStatus) -> sce.Int32 ---
/** Get result of location information acquisition permission dialog */ /** Get result of location information acquisition permission dialog */
ConfirmGetResult :: proc(handle: SceLocationHandle, result: ^SceLocationDialogResult) -> sce.Int32 --- sceLocationConfirmGetResult :: proc(handle: SceLocationHandle, result: ^SceLocationDialogResult) -> sce.Int32 ---
/** Abort location information acquisition permission dialog */ /** Abort location information acquisition permission dialog */
ConfirmAbort :: proc(handle: SceLocationHandle) -> sce.Int32 --- sceLocationConfirmAbort :: proc(handle: SceLocationHandle) -> sce.Int32 ---
/** Get location information acquisition permission/refusal information */ /** Get location information acquisition permission/refusal information */
GetPermission :: proc(handle: SceLocationHandle, info: ^SceLocationPermissionInfo) -> sce.Int32 --- sceLocationGetPermission :: proc(handle: SceLocationHandle, info: ^SceLocationPermissionInfo) -> sce.Int32 ---
/** Get location information acquisition permission information */ /** Get location information acquisition permission information */
SetGpsEmulationFile :: proc(filename: cstring) -> sce.Int32 --- sceLocationSetGpsEmulationFile :: proc(filename: cstring) -> sce.Int32 ---
} }
+7 -8
View File
@@ -13,13 +13,12 @@ ScePssCryptoHandle :: struct {
} }
#assert(size_of(ScePssCryptoHandle) == 0x10) #assert(size_of(ScePssCryptoHandle) == 0x10)
@(link_prefix = "pss_")
foreign monobridge { foreign monobridge {
crypto_open :: proc(handle: ^ScePssCryptoHandle, path: cstring) -> c.int --- pss_crypto_open :: proc(handle: ^ScePssCryptoHandle, path: cstring) -> c.int ---
crypto_read :: proc(handle: ^ScePssCryptoHandle, mode: ^c.int) -> [^]c.char --- pss_crypto_read :: proc(handle: ^ScePssCryptoHandle, mode: ^c.int) -> [^]c.char ---
crypto_close :: proc(handle: ^ScePssCryptoHandle) -> c.int --- pss_crypto_close :: proc(handle: ^ScePssCryptoHandle) -> c.int ---
code_mem_alloc :: proc(_: ^sce.Size) -> rawptr --- pss_code_mem_alloc :: proc(_: ^sce.Size) -> rawptr ---
code_mem_flush_icache :: proc(_: rawptr, __: sce.Size) --- pss_code_mem_flush_icache :: proc(_: rawptr, __: sce.Size) ---
code_mem_lock :: proc() --- pss_code_mem_lock :: proc() ---
code_mem_unlock :: proc() --- pss_code_mem_unlock :: proc() ---
} }
+19 -20
View File
@@ -5,7 +5,6 @@ import sce "../common"
foreign import motion "system:SceMotion_stub" foreign import motion "system:SceMotion_stub"
@(link_prefix = "sceMotion")
foreign motion { foreign motion {
/** /**
* Gets the current motion state. * Gets the current motion state.
@@ -14,7 +13,7 @@ foreign motion {
* *
* @return 0, <0 on error. * @return 0, <0 on error.
*/ */
GetState :: proc(motionState: ^SceMotionState) -> c.int --- sceMotionGetState :: proc(motionState: ^SceMotionState) -> c.int ---
/** /**
* Gets the current motion sensor state * Gets the current motion sensor state
@@ -24,7 +23,7 @@ foreign motion {
* *
* @return 0, <0 on error * @return 0, <0 on error
*/ */
GetSensorState :: proc(sensorState: ^SceMotionSensorState, numRecords: c.int) -> c.int --- sceMotionGetSensorState :: proc(sensorState: ^SceMotionSensorState, numRecords: c.int) -> c.int ---
/** /**
* Gets the location of the device's sensors in relation to its center point (in mm). * Gets the location of the device's sensors in relation to its center point (in mm).
@@ -33,7 +32,7 @@ foreign motion {
* *
* @return 0, <0 on error * @return 0, <0 on error
*/ */
GetDeviceLocation :: proc(deviceLocation: ^SceMotionDeviceLocation) -> c.int --- sceMotionGetDeviceLocation :: proc(deviceLocation: ^SceMotionDeviceLocation) -> c.int ---
/** /**
* Gets the basic orientation of the device in relation to gravity * Gets the basic orientation of the device in relation to gravity
@@ -48,7 +47,7 @@ foreign motion {
* *
* @return 0, <0 on error * @return 0, <0 on error
*/ */
GetBasicOrientation :: proc(basicOrientation: ^sce.FVector3) -> c.int --- sceMotionGetBasicOrientation :: proc(basicOrientation: ^sce.FVector3) -> c.int ---
/** /**
* Rotate the yaw axis * Rotate the yaw axis
@@ -57,7 +56,7 @@ foreign motion {
* *
* @return 0 * @return 0
*/ */
RotateYaw :: proc(radians: c.float) -> c.int --- sceMotionRotateYaw :: proc(radians: c.float) -> c.int ---
/** /**
* Get Status of tilt correction * Get Status of tilt correction
@@ -65,7 +64,7 @@ foreign motion {
* @note - Enabled by default * @note - Enabled by default
* @return 1 if enabled, 0 if disabled * @return 1 if enabled, 0 if disabled
*/ */
GetTiltCorrection :: proc() -> c.int --- sceMotionGetTiltCorrection :: proc() -> c.int ---
/** /**
* Activate/deactivate tilt correction * Activate/deactivate tilt correction
@@ -74,7 +73,7 @@ foreign motion {
* *
* @return 0 * @return 0
*/ */
SetTiltCorrection :: proc(setValue: c.int) -> c.int --- sceMotionSetTiltCorrection :: proc(setValue: c.int) -> c.int ---
/** /**
* Get status of deadbanding * Get status of deadbanding
@@ -83,7 +82,7 @@ foreign motion {
* @note - Enabled by default * @note - Enabled by default
* @return 1 if enabled, 0 if disabled * @return 1 if enabled, 0 if disabled
*/ */
GetDeadband :: proc() -> c.int --- sceMotionGetDeadband :: proc() -> c.int ---
/** /**
* Activate/deactivate deadbanding * Activate/deactivate deadbanding
@@ -92,7 +91,7 @@ foreign motion {
* *
* @return 0 * @return 0
*/ */
SetDeadband :: proc(setValue: c.int) -> c.int --- sceMotionSetDeadband :: proc(setValue: c.int) -> c.int ---
/** /**
* Get status of gyroscope bias correction * Get status of gyroscope bias correction
@@ -100,7 +99,7 @@ foreign motion {
* @note - Enabled by default * @note - Enabled by default
* @return 1 if enabled, 0 if disabled * @return 1 if enabled, 0 if disabled
*/ */
GetGyroBiasCorrection :: proc() -> c.int --- sceMotionGetGyroBiasCorrection :: proc() -> c.int ---
/** /**
* Activate/deactivate gyroscope bias correction * Activate/deactivate gyroscope bias correction
@@ -109,7 +108,7 @@ foreign motion {
* *
* @return 0 * @return 0
*/ */
SetGyroBiasCorrection :: proc(setValue: c.int) -> c.int --- sceMotionSetGyroBiasCorrection :: proc(setValue: c.int) -> c.int ---
/** /**
* Define the angle threshold for basic orientation * Define the angle threshold for basic orientation
@@ -118,54 +117,54 @@ foreign motion {
* *
* @return 0 * @return 0
*/ */
SetAngleThreshold :: proc(angle: c.float) -> c.int --- sceMotionSetAngleThreshold :: proc(angle: c.float) -> c.int ---
/** /**
* Get the angle threshold for basic orientation * Get the angle threshold for basic orientation
* *
* @return angle in degrees * @return angle in degrees
*/ */
GetAngleThreshold :: proc() -> c.float --- sceMotionGetAngleThreshold :: proc() -> c.float ---
/** /**
* Set current orientation as origin * Set current orientation as origin
* *
* @return 0, <0 on error * @return 0, <0 on error
*/ */
Reset :: proc() -> c.int --- sceMotionReset :: proc() -> c.int ---
/** /**
* Start magnetometer sampling * Start magnetometer sampling
* *
* @return 0, <0 on error * @return 0, <0 on error
*/ */
MagnetometerOn :: proc() -> c.int --- sceMotionMagnetometerOn :: proc() -> c.int ---
/** /**
* Stop magnetometer sampling * Stop magnetometer sampling
* *
* @return 0, <0 on error * @return 0, <0 on error
*/ */
MagnetometerOff :: proc() -> c.int --- sceMotionMagnetometerOff :: proc() -> c.int ---
/** /**
* Get status of magnetometer sampling * Get status of magnetometer sampling
* *
* @return 1 if enabled, 0 if disabled * @return 1 if enabled, 0 if disabled
*/ */
GetMagnetometerState :: proc() -> c.int --- sceMotionGetMagnetometerState :: proc() -> c.int ---
/** /**
* Start sampling * Start sampling
* *
* @return 0, <0 on error * @return 0, <0 on error
*/ */
StartSampling :: proc() -> c.int --- sceMotionStartSampling :: proc() -> c.int ---
/** /**
* Stop sampling * Stop sampling
* *
* @return 0, <0 on error * @return 0, <0 on error
*/ */
StopSampling :: proc() -> c.int --- sceMotionStopSampling :: proc() -> c.int ---
} }
+27 -28
View File
@@ -17,33 +17,32 @@ SceMotionDevGyroCalibData :: struct{}
SceMotionDevModeInfo :: struct{} SceMotionDevModeInfo :: struct{}
SceMotionDevData :: struct{} SceMotionDevData :: struct{}
@(link_prefix = "sceMotionDev")
foreign motiondev { foreign motiondev {
GetAccCalibData :: proc(data: ^SceMotionDevAccCalibData) -> c.int --- sceMotionDevGetAccCalibData :: proc(data: ^SceMotionDevAccCalibData) -> c.int ---
GetAccCalibData2 :: proc(port: c.int, data: ^SceMotionDevAccCalibData) -> c.int --- sceMotionDevGetAccCalibData2 :: proc(port: c.int, data: ^SceMotionDevAccCalibData) -> c.int ---
GetCalibrationData :: proc(block_id: sce.UInt32, data: ^SceMotionDevCalibrationData, data_num: sce.UInt32) -> c.int --- sceMotionDevGetCalibrationData :: proc(block_id: sce.UInt32, data: ^SceMotionDevCalibrationData, data_num: sce.UInt32) -> c.int ---
GetCalibrationHeader :: proc(block_id: sce.UInt32, calib_header: ^SceMotionDevCalibrationHeader) -> c.int --- sceMotionDevGetCalibrationHeader :: proc(block_id: sce.UInt32, calib_header: ^SceMotionDevCalibrationHeader) -> c.int ---
GetCurrentMagnCalibData :: proc(data: ^SceMotionDevMagnCalibData) -> c.int --- sceMotionDevGetCurrentMagnCalibData :: proc(data: ^SceMotionDevMagnCalibData) -> c.int ---
GetCurrentMagnStabilityLevel :: proc(level: ^sce.UInt32) -> c.int --- sceMotionDevGetCurrentMagnStabilityLevel :: proc(level: ^sce.UInt32) -> c.int ---
GetDeviceInfo :: proc(device_info: ^SceMotionDevDeviceInfo) -> c.int --- sceMotionDevGetDeviceInfo :: proc(device_info: ^SceMotionDevDeviceInfo) -> c.int ---
GetDeviceLocation :: proc(location: ^SceMotionDevDeviceLocation) -> c.int --- sceMotionDevGetDeviceLocation :: proc(location: ^SceMotionDevDeviceLocation) -> c.int ---
GetFactoryMagnCalibData :: proc(data: ^SceMotionDevMagnCalibData) -> c.int --- sceMotionDevGetFactoryMagnCalibData :: proc(data: ^SceMotionDevMagnCalibData) -> c.int ---
GetGyroBias :: proc(bias: ^SceMotionDevGyroBiasData) -> c.int --- sceMotionDevGetGyroBias :: proc(bias: ^SceMotionDevGyroBiasData) -> c.int ---
GetGyroBias2 :: proc(port: c.int, bias: ^SceMotionDevGyroBiasData) -> c.int --- sceMotionDevGetGyroBias2 :: proc(port: c.int, bias: ^SceMotionDevGyroBiasData) -> c.int ---
GetGyroCalibData :: proc(data: ^SceMotionDevGyroCalibData) -> c.int --- sceMotionDevGetGyroCalibData :: proc(data: ^SceMotionDevGyroCalibData) -> c.int ---
GetGyroCalibData2 :: proc(port: c.int, data: ^SceMotionDevGyroCalibData) -> c.int --- sceMotionDevGetGyroCalibData2 :: proc(port: c.int, data: ^SceMotionDevGyroCalibData) -> c.int ---
GetMeasMode :: proc(mode_info: ^SceMotionDevModeInfo) -> c.int --- sceMotionDevGetMeasMode :: proc(mode_info: ^SceMotionDevModeInfo) -> c.int ---
IsReady :: proc() -> c.int --- sceMotionDevIsReady :: proc() -> c.int ---
MagnSamplingStart :: proc() -> c.int --- sceMotionDevMagnSamplingStart :: proc() -> c.int ---
MagnSamplingStop :: proc() -> c.int --- sceMotionDevMagnSamplingStop :: proc() -> c.int ---
Read :: proc(data: ^SceMotionDevData, data_num: c.int, info: ^sce.UInt32) -> c.int --- sceMotionDevRead :: proc(data: ^SceMotionDevData, data_num: c.int, info: ^sce.UInt32) -> c.int ---
Read2 :: proc(port: c.int, data: ^SceMotionDevData, data_num: c.int, info: ^sce.UInt32) -> c.int --- sceMotionDevRead2 :: proc(port: c.int, data: ^SceMotionDevData, data_num: c.int, info: ^sce.UInt32) -> c.int ---
ReadForMagnCalib :: proc(data: ^SceMotionDevData, data_num: c.int) -> c.int --- sceMotionDevReadForMagnCalib :: proc(data: ^SceMotionDevData, data_num: c.int) -> c.int ---
SamplingStart :: proc() -> c.int --- sceMotionDevSamplingStart :: proc() -> c.int ---
SamplingStart2 :: proc(port: c.int) -> c.int --- sceMotionDevSamplingStart2 :: proc(port: c.int) -> c.int ---
SamplingStop :: proc() -> c.int --- sceMotionDevSamplingStop :: proc() -> c.int ---
SamplingStop2 :: proc(port: c.int) -> c.int --- sceMotionDevSamplingStop2 :: proc(port: c.int) -> c.int ---
SetSamplingMode :: proc(mode: sce.UInt32) -> c.int --- sceMotionDevSetSamplingMode :: proc(mode: sce.UInt32) -> c.int ---
UpdateMagnCalibData :: proc(#by_ptr data: SceMotionDevMagnCalibData, tag: ^sce.UInt32) -> c.int --- sceMotionDevUpdateMagnCalibData :: proc(#by_ptr data: SceMotionDevMagnCalibData, tag: ^sce.UInt32) -> c.int ---
UpdateMagnStabilityLevel :: proc(level: sce.UInt32) -> c.int --- sceMotionDevUpdateMagnStabilityLevel :: proc(level: sce.UInt32) -> c.int ---
} }
+2 -3
View File
@@ -4,7 +4,6 @@ import "core:c"
foreign import mtp "system:SceMtpIfDriver_stub" foreign import mtp "system:SceMtpIfDriver_stub"
@(link_prefix = "sceMtpIf")
foreign mtp { foreign mtp {
/** /**
* Start MTP driver * Start MTP driver
@@ -13,7 +12,7 @@ foreign mtp {
* *
* @return 0 on success, < 0 on error. * @return 0 on success, < 0 on error.
*/ */
StartDriver :: proc(flags: c.int) -> c.int --- sceMtpIfStartDriver :: proc(flags: c.int) -> c.int ---
/** /**
* Stop MTP driver * Stop MTP driver
@@ -22,5 +21,5 @@ foreign mtp {
* *
* @return 0 on success, < 0 on error. * @return 0 on success, < 0 on error.
*/ */
StopDriver :: proc(flags: c.int) -> c.int --- sceMtpIfStopDriver :: proc(flags: c.int) -> c.int ---
} }
+1 -2
View File
@@ -10,9 +10,8 @@ MusicExportParam :: struct {
} }
#assert(size_of(MusicExportParam) == 0x80) #assert(size_of(MusicExportParam) == 0x80)
@(link_prefix = "sceMusicExport")
foreign musicexport { foreign musicexport {
FromFile :: proc( sceMusicExportFromFile :: proc(
path: cstring, path: cstring,
#by_ptr param: MusicExportParam, #by_ptr param: MusicExportParam,
workingMemory: rawptr, workingMemory: rawptr,
+58 -59
View File
@@ -4,90 +4,89 @@ import "core:c"
foreign import net "system:SceNet_stub" foreign import net "system:SceNet_stub"
foreign import netps "system:SceNetPsForDriver_stub" foreign import netps "system:SceNetPsForDriver_stub"
@(link_prefix = "sceNet")
foreign net { foreign net {
Init :: proc(param: ^SceNetInitParam) -> c.int --- sceNetInit :: proc(param: ^SceNetInitParam) -> c.int ---
Term :: proc() -> c.int --- sceNetTerm :: proc() -> c.int ---
ShowIfconfig :: proc(p: rawptr, b: c.int) -> c.int --- sceNetShowIfconfig :: proc(p: rawptr, b: c.int) -> c.int ---
ShowRoute :: proc() -> c.int --- sceNetShowRoute :: proc() -> c.int ---
ShowNetstat :: proc() -> c.int --- sceNetShowNetstat :: proc() -> c.int ---
EmulationSet :: proc(param: ^SceNetEmulationParam, flags: SceNetEmulationFlag) -> c.int --- sceNetEmulationSet :: proc(param: ^SceNetEmulationParam, flags: SceNetEmulationFlag) -> c.int ---
EmulationGet :: proc(param: ^SceNetEmulationParam, flags: SceNetEmulationFlag) -> c.int --- sceNetEmulationGet :: proc(param: ^SceNetEmulationParam, flags: SceNetEmulationFlag) -> c.int ---
// flags is always 0 // flags is always 0
ResolverCreate :: proc(name: cstring, param: ^SceNetResolverParam, flags: c.int) -> c.int --- sceNetResolverCreate :: proc(name: cstring, param: ^SceNetResolverParam, flags: c.int) -> c.int ---
ResolverStartNtoa :: proc(rid: c.int, hostname: cstring, addr: ^SceNetInAddr, timeout: c.int, retry: c.int, flags: SceNetResolverFlag) -> c.int --- sceNetResolverStartNtoa :: proc(rid: c.int, hostname: cstring, addr: ^SceNetInAddr, timeout: c.int, retry: c.int, flags: SceNetResolverFlag) -> c.int ---
ResolverStartAton :: proc(rid: c.int, addr: ^SceNetInAddr, hostname: cstring, len: c.int, timeout: c.int, retry: c.int, flags: SceNetResolverFlag) -> c.int --- sceNetResolverStartAton :: proc(rid: c.int, addr: ^SceNetInAddr, hostname: cstring, len: c.int, timeout: c.int, retry: c.int, flags: SceNetResolverFlag) -> c.int ---
ResolverGetError :: proc(rid: c.int, result: ^c.int) -> SceNetResolverErrorCode --- sceNetResolverGetError :: proc(rid: c.int, result: ^c.int) -> SceNetResolverErrorCode ---
ResolverDestroy :: proc(rid: c.int) -> c.int --- sceNetResolverDestroy :: proc(rid: c.int) -> c.int ---
ResolverAbort :: proc(rid: c.int, flags: SceNetResolverAbortFlag) -> c.int --- sceNetResolverAbort :: proc(rid: c.int, flags: SceNetResolverAbortFlag) -> c.int ---
// flags is always 0 // flags is always 0
DumpCreate :: proc(name: cstring, len: c.int, flags: c.int) -> c.int --- sceNetDumpCreate :: proc(name: cstring, len: c.int, flags: c.int) -> c.int ---
DumpRead :: proc(id: c.int, buf: rawptr, len: c.int, pflags: ^SceNetDumpReadFlag) -> c.int --- sceNetDumpRead :: proc(id: c.int, buf: rawptr, len: c.int, pflags: ^SceNetDumpReadFlag) -> c.int ---
DumpDestroy :: proc(id: c.int) -> c.int --- sceNetDumpDestroy :: proc(id: c.int) -> c.int ---
DumpAbort :: proc(id: c.int, flags: SceNetDumpAbortFlag) -> c.int --- sceNetDumpAbort :: proc(id: c.int, flags: SceNetDumpAbortFlag) -> c.int ---
// flags is always 0 // flags is always 0
EpollCreate :: proc(name: cstring, flags: c.int) -> c.int --- sceNetEpollCreate :: proc(name: cstring, flags: c.int) -> c.int ---
EpollControl :: proc(eid: c.int, op: SceNetEpollControlFlag, id: c.int, event: ^SceNetEpollEvent) -> c.int --- sceNetEpollControl :: proc(eid: c.int, op: SceNetEpollControlFlag, id: c.int, event: ^SceNetEpollEvent) -> c.int ---
EpollWait :: proc(eid: c.int, events: ^SceNetEpollEvent, maxevents: c.int, timeout: c.int) -> c.int --- sceNetEpollWait :: proc(eid: c.int, events: ^SceNetEpollEvent, maxevents: c.int, timeout: c.int) -> c.int ---
EpollWaitCB :: proc(eid: c.int, events: ^SceNetEpollEvent, maxevents: c.int, timeout: c.int) -> c.int --- sceNetEpollWaitCB :: proc(eid: c.int, events: ^SceNetEpollEvent, maxevents: c.int, timeout: c.int) -> c.int ---
EpollDestroy :: proc(eid: c.int) -> c.int --- sceNetEpollDestroy :: proc(eid: c.int) -> c.int ---
EpollAbort :: proc(eid: c.int, flags: SceNetEpollAbortFlag) -> c.int --- sceNetEpollAbort :: proc(eid: c.int, flags: SceNetEpollAbortFlag) -> c.int ---
EtherStrton :: proc(str: cstring, n: ^SceNetEtherAddr) -> c.int --- sceNetEtherStrton :: proc(str: cstring, n: ^SceNetEtherAddr) -> c.int ---
EtherNtostr :: proc(n: ^SceNetEtherAddr, str: cstring, len: c.uint) -> c.int --- sceNetEtherNtostr :: proc(n: ^SceNetEtherAddr, str: cstring, len: c.uint) -> c.int ---
// flags is always 0 // flags is always 0
GetMacAddress :: proc(addr: ^SceNetEtherAddr, flags: ^c.int) -> c.int --- sceNetGetMacAddress :: proc(addr: ^SceNetEtherAddr, flags: ^c.int) -> c.int ---
Socket :: proc(name: cstring, domain: c.int, type: SceNetSocketType, protocol: c.int) -> c.int --- sceNetSocket :: proc(name: cstring, domain: c.int, type: SceNetSocketType, protocol: c.int) -> c.int ---
Accept :: proc(s: c.int, addr: ^SceNetSockaddr, addrlen: ^c.uint) -> c.int --- sceNetAccept :: proc(s: c.int, addr: ^SceNetSockaddr, addrlen: ^c.uint) -> c.int ---
Bind :: proc(s: c.int, addr: ^SceNetSockaddr, addrlen: c.uint) -> c.int --- sceNetBind :: proc(s: c.int, addr: ^SceNetSockaddr, addrlen: c.uint) -> c.int ---
Connect :: proc(s: c.int, name: ^SceNetSockaddr, namelen: c.uint) -> c.int --- sceNetConnect :: proc(s: c.int, name: ^SceNetSockaddr, namelen: c.uint) -> c.int ---
Getpeername :: proc(s: c.int, name: ^SceNetSockaddr, namelen: ^c.uint) -> c.int --- sceNetGetpeername :: proc(s: c.int, name: ^SceNetSockaddr, namelen: ^c.uint) -> c.int ---
Getsockname :: proc(s: c.int, name: ^SceNetSockaddr, namelen: ^c.uint) -> c.int --- sceNetGetsockname :: proc(s: c.int, name: ^SceNetSockaddr, namelen: ^c.uint) -> c.int ---
Getsockopt :: proc(s: c.int, level: c.int, optname: c.int, optval: rawptr, optlen: ^c.uint) -> c.int --- sceNetGetsockopt :: proc(s: c.int, level: c.int, optname: c.int, optval: rawptr, optlen: ^c.uint) -> c.int ---
Listen :: proc(s: c.int, backlog: c.int) -> c.int --- sceNetListen :: proc(s: c.int, backlog: c.int) -> c.int ---
Recv :: proc(s: c.int, buf: rawptr, len: c.uint, flags: SceNetMsgFlag) -> c.int --- sceNetRecv :: proc(s: c.int, buf: rawptr, len: c.uint, flags: SceNetMsgFlag) -> c.int ---
Recvfrom :: proc(s: c.int, buf: rawptr, len: c.uint, flags: SceNetMsgFlag, from: ^SceNetSockaddr, fromlen: ^c.uint) -> c.int --- sceNetRecvfrom :: proc(s: c.int, buf: rawptr, len: c.uint, flags: SceNetMsgFlag, from: ^SceNetSockaddr, fromlen: ^c.uint) -> c.int ---
Recvmsg :: proc(s: c.int, msg: ^SceNetMsghdr, flags: SceNetMsgFlag) -> c.int --- sceNetRecvmsg :: proc(s: c.int, msg: ^SceNetMsghdr, flags: SceNetMsgFlag) -> c.int ---
Send :: proc(s: c.int, msg: rawptr, len: c.uint, flags: SceNetMsgFlag) -> c.int --- sceNetSend :: proc(s: c.int, msg: rawptr, len: c.uint, flags: SceNetMsgFlag) -> c.int ---
Sendto :: proc(s: c.int, msg: rawptr, len: c.uint, flags: SceNetMsgFlag, to: ^SceNetSockaddr, tolen: c.uint) -> c.int --- sceNetSendto :: proc(s: c.int, msg: rawptr, len: c.uint, flags: SceNetMsgFlag, to: ^SceNetSockaddr, tolen: c.uint) -> c.int ---
Sendmsg :: proc(s: c.int, msg: ^SceNetMsghdr, flags: SceNetMsgFlag) -> c.int --- sceNetSendmsg :: proc(s: c.int, msg: ^SceNetMsghdr, flags: SceNetMsgFlag) -> c.int ---
Setsockopt :: proc(s: c.int, level: c.int, optname: c.int, optval: rawptr, optlen: c.uint) -> c.int --- sceNetSetsockopt :: proc(s: c.int, level: c.int, optname: c.int, optval: rawptr, optlen: c.uint) -> c.int ---
Shutdown :: proc(s: c.int, how: SceNetShutdownFlag) -> c.int --- sceNetShutdown :: proc(s: c.int, how: SceNetShutdownFlag) -> c.int ---
SocketClose :: proc(s: c.int) -> c.int --- sceNetSocketClose :: proc(s: c.int) -> c.int ---
SocketAbort :: proc(s: c.int, flags: SceNetSocketAbortFlag) -> c.int --- sceNetSocketAbort :: proc(s: c.int, flags: SceNetSocketAbortFlag) -> c.int ---
// flags is always 0 // flags is always 0
GetSockInfo :: proc(s: c.int, info: ^SceNetSockInfo, n: c.int, flags: c.int) -> c.int --- sceNetGetSockInfo :: proc(s: c.int, info: ^SceNetSockInfo, n: c.int, flags: c.int) -> c.int ---
// flags is always 0 // flags is always 0
GetSockIdInfo :: proc(fds: ^SceNetFdSet, sockinfoflags: c.int, flags: c.int) -> c.int --- sceNetGetSockIdInfo :: proc(fds: ^SceNetFdSet, sockinfoflags: c.int, flags: c.int) -> c.int ---
// flags is always 0 // flags is always 0
GetStatisticsInfo :: proc(info: ^SceNetStatisticsInfo, flags: c.int) -> c.int --- sceNetGetStatisticsInfo :: proc(info: ^SceNetStatisticsInfo, flags: c.int) -> c.int ---
// flags is always 0 // flags is always 0
SetDnsInfo :: proc(info: ^SceNetDnsInfo, flags: c.int) -> c.int --- sceNetSetDnsInfo :: proc(info: ^SceNetDnsInfo, flags: c.int) -> c.int ---
// flags is always 0 // flags is always 0
ClearDnsCache :: proc(flags: c.int) -> c.int --- sceNetClearDnsCache :: proc(flags: c.int) -> c.int ---
InetNtop :: proc(af: c.int, src: rawptr, dst: cstring, size: c.uint) -> cstring --- sceNetInetNtop :: proc(af: c.int, src: rawptr, dst: cstring, size: c.uint) -> cstring ---
InetPton :: proc(af: c.int, src: cstring, dst: rawptr) -> c.int --- sceNetInetPton :: proc(af: c.int, src: cstring, dst: rawptr) -> c.int ---
Htonll :: proc(host64: c.ulonglong) -> c.ulonglong --- sceNetHtonll :: proc(host64: c.ulonglong) -> c.ulonglong ---
Htonl :: proc(host32: c.uint) -> c.uint --- sceNetHtonl :: proc(host32: c.uint) -> c.uint ---
Htons :: proc(host16: c.ushort) -> c.ushort --- sceNetHtons :: proc(host16: c.ushort) -> c.ushort ---
Ntohll :: proc(net64: c.ulonglong) -> c.ulonglong --- sceNetNtohll :: proc(net64: c.ulonglong) -> c.ulonglong ---
Ntohl :: proc(net32: c.uint) -> c.uint --- sceNetNtohl :: proc(net32: c.uint) -> c.uint ---
Ntohs :: proc(net16: c.ushort) -> c.ushort --- sceNetNtohs :: proc(net16: c.ushort) -> c.ushort ---
/** /**
* Get pointer to last network errno. * Get pointer to last network errno.
* *
* @return pointer to int. * @return pointer to int.
*/ */
ErrnoLoc :: proc() -> ^c.int --- sceNetErrnoLoc :: proc() -> ^c.int ---
} }
foreign netps { foreign netps {
+16 -17
View File
@@ -4,27 +4,26 @@ import "core:c"
foreign import netctl "system:SceNetCtl_stub" foreign import netctl "system:SceNetCtl_stub"
@(link_prefix = "SceNetCtl")
foreign netctl { foreign netctl {
Init :: proc() -> c.int --- sceNetCtlInit :: proc() -> c.int ---
Term :: proc() --- sceNetCtlTerm :: proc() ---
CheckCallback :: proc() -> c.int --- sceNetCtlCheckCallback :: proc() -> c.int ---
InetGetResult :: proc(eventType: c.int, errorCode: ^c.int) -> c.int --- sceNetCtlInetGetResult :: proc(eventType: c.int, errorCode: ^c.int) -> c.int ---
AdhocGetResult :: proc(eventType: c.int, errorCode: ^c.int) -> c.int --- sceNetCtlAdhocGetResult :: proc(eventType: c.int, errorCode: ^c.int) -> c.int ---
InetGetInfo :: proc(code: c.int, info: ^SceNetCtlInfo) -> c.int --- sceNetCtlInetGetInfo :: proc(code: c.int, info: ^SceNetCtlInfo) -> c.int ---
InetGetState :: proc(state: ^c.int) -> c.int --- sceNetCtlInetGetState :: proc(state: ^c.int) -> c.int ---
GetNatInfo :: proc(natinfo: ^SceNetCtlNatInfo) -> c.int --- sceNetCtlGetNatInfo :: proc(natinfo: ^SceNetCtlNatInfo) -> c.int ---
InetRegisterCallback :: proc(func: SceNetCtlCallback, arg: rawptr, cid: ^c.int) -> c.int --- sceNetCtlInetRegisterCallback :: proc(func: SceNetCtlCallback, arg: rawptr, cid: ^c.int) -> c.int ---
InetUnregisterCallback :: proc(cid: c.int) -> c.int --- sceNetCtlInetUnregisterCallback :: proc(cid: c.int) -> c.int ---
AdhocRegisterCallback :: proc(func: SceNetCtlCallback, arg: rawptr, cid: ^c.int) -> c.int --- sceNetCtlAdhocRegisterCallback :: proc(func: SceNetCtlCallback, arg: rawptr, cid: ^c.int) -> c.int ---
AdhocUnregisterCallback :: proc(cid: c.int) -> c.int --- sceNetCtlAdhocUnregisterCallback :: proc(cid: c.int) -> c.int ---
AdhocGetState :: proc(state: ^c.int) -> c.int --- sceNetCtlAdhocGetState :: proc(state: ^c.int) -> c.int ---
AdhocDisconnect :: proc() -> c.int --- sceNetCtlAdhocDisconnect :: proc() -> c.int ---
AdhocGetPeerList :: proc(buflen: ^c.uint, buf: rawptr) -> c.int --- sceNetCtlAdhocGetPeerList :: proc(buflen: ^c.uint, buf: rawptr) -> c.int ---
AdhocGetInAddr :: proc(inaddr: ^SceNetInAddr) -> c.int --- sceNetCtlAdhocGetInAddr :: proc(inaddr: ^SceNetInAddr) -> c.int ---
} }
+34 -35
View File
@@ -6,25 +6,24 @@ foreign import net_syscalls "system:SceNetPsForSyscalls_stub"
SceNetSyscallParameter :: struct{} // missing struct SceNetSyscallParameter :: struct{} // missing struct
@(link_prefix = "sceNetSyscall")
foreign net_syscalls { foreign net_syscalls {
Accept :: proc(s: c.int, addr: rawptr, addrlen: rawptr) -> c.int --- sceNetSyscallAccept :: proc(s: c.int, addr: rawptr, addrlen: rawptr) -> c.int ---
Bind :: proc(s: c.int, addr: rawptr, addrlen: c.int) -> c.int --- sceNetSyscallBind :: proc(s: c.int, addr: rawptr, addrlen: c.int) -> c.int ---
Close :: proc(s: c.int) -> c.int --- sceNetSyscallClose :: proc(s: c.int) -> c.int ---
Connect :: proc(s: c.int, name: rawptr, namelen: c.int) -> c.int --- sceNetSyscallConnect :: proc(s: c.int, name: rawptr, namelen: c.int) -> c.int ---
Control :: proc(if_index: c.int, code: c.int, ptr: rawptr, len: c.int) -> c.int --- sceNetSyscallControl :: proc(if_index: c.int, code: c.int, ptr: rawptr, len: c.int) -> c.int ---
DescriptorClose :: proc(id: c.int) -> c.int --- sceNetSyscallDescriptorClose :: proc(id: c.int) -> c.int ---
DescriptorCreate :: proc(name: cstring, flags: c.int) -> c.int --- sceNetSyscallDescriptorCreate :: proc(name: cstring, flags: c.int) -> c.int ---
DescriptorCtl :: proc(id: c.int, op: c.int, s: c.int, info: rawptr) -> c.int --- sceNetSyscallDescriptorCtl :: proc(id: c.int, op: c.int, s: c.int, info: rawptr) -> c.int ---
DumpAbort :: proc(id: c.int, flags: c.int) -> c.int --- sceNetSyscallDumpAbort :: proc(id: c.int, flags: c.int) -> c.int ---
DumpClose :: proc(id: c.int) -> c.int --- sceNetSyscallDumpClose :: proc(id: c.int) -> c.int ---
DumpCreate :: proc(name: cstring, len: c.int, flags: c.int) -> c.int --- sceNetSyscallDumpCreate :: proc(name: cstring, len: c.int, flags: c.int) -> c.int ---
DumpRead :: proc(id: c.int, buf: rawptr, len: c.int, pflags: rawptr) -> c.int --- sceNetSyscallDumpRead :: proc(id: c.int, buf: rawptr, len: c.int, pflags: rawptr) -> c.int ---
EpollAbort :: proc(eid: c.int, flags: c.int) -> c.int --- sceNetSyscallEpollAbort :: proc(eid: c.int, flags: c.int) -> c.int ---
EpollClose :: proc(eid: c.int) -> c.int --- sceNetSyscallEpollClose :: proc(eid: c.int) -> c.int ---
EpollCreate :: proc(name: cstring, flags: c.int) -> c.int --- sceNetSyscallEpollCreate :: proc(name: cstring, flags: c.int) -> c.int ---
EpollCtl :: proc(eid: c.int, op: c.int, id: c.int, event: rawptr) -> c.int --- sceNetSyscallEpollCtl :: proc(eid: c.int, op: c.int, id: c.int, event: rawptr) -> c.int ---
EpollWait :: proc(param: ^SceNetSyscallParameter) -> c.int --- sceNetSyscallEpollWait :: proc(param: ^SceNetSyscallParameter) -> c.int ---
/** /**
* @brief Get net if list * @brief Get net if list
@@ -34,22 +33,22 @@ foreign net_syscalls {
* *
* @return 0 on success, < 0 on error. * @return 0 on success, < 0 on error.
*/ */
GetIfList :: proc(list: rawptr, n: c.int) -> c.int --- sceNetSyscallGetIfList :: proc(list: rawptr, n: c.int) -> c.int ---
GetSockinfo :: proc(s: c.int, ptr: rawptr, n: c.int, flags: c.int) -> c.int --- sceNetSyscallGetSockinfo :: proc(s: c.int, ptr: rawptr, n: c.int, flags: c.int) -> c.int ---
Getpeername :: proc(s: c.int, name: rawptr, namelen: rawptr) -> c.int --- sceNetSyscallGetpeername :: proc(s: c.int, name: rawptr, namelen: rawptr) -> c.int ---
Getsockname :: proc(s: c.int, name: rawptr, namelen: rawptr) -> c.int --- sceNetSyscallGetsockname :: proc(s: c.int, name: rawptr, namelen: rawptr) -> c.int ---
Getsockopt :: proc(param: ^SceNetSyscallParameter) -> c.int --- sceNetSyscallGetsockopt :: proc(param: ^SceNetSyscallParameter) -> c.int ---
IcmConnect :: proc(s: c.int, flags: c.int) -> c.int --- sceNetSyscallIcmConnect :: proc(s: c.int, flags: c.int) -> c.int ---
Ioctl :: proc(s: c.int, com: c.uint, data: rawptr) -> c.int --- sceNetSyscallIoctl :: proc(s: c.int, com: c.uint, data: rawptr) -> c.int ---
Listen :: proc(s: c.int, backlog: c.int) -> c.int --- sceNetSyscallListen :: proc(s: c.int, backlog: c.int) -> c.int ---
Recvfrom :: proc(param: ^SceNetSyscallParameter) -> c.int --- sceNetSyscallRecvfrom :: proc(param: ^SceNetSyscallParameter) -> c.int ---
Recvmsg :: proc(s: c.int, msg: rawptr, flags: c.int) -> c.int --- sceNetSyscallRecvmsg :: proc(s: c.int, msg: rawptr, flags: c.int) -> c.int ---
Sendmsg :: proc(s: c.int, msg: rawptr, flags: c.int) -> c.int --- sceNetSyscallSendmsg :: proc(s: c.int, msg: rawptr, flags: c.int) -> c.int ---
Sendto :: proc(param: ^SceNetSyscallParameter) -> c.int --- sceNetSyscallSendto :: proc(param: ^SceNetSyscallParameter) -> c.int ---
Setsockopt :: proc(param: ^SceNetSyscallParameter) -> c.int --- sceNetSyscallSetsockopt :: proc(param: ^SceNetSyscallParameter) -> c.int ---
Shutdown :: proc(s: c.int, how: c.int) -> c.int --- sceNetSyscallShutdown :: proc(s: c.int, how: c.int) -> c.int ---
Socket :: proc(name: cstring, domain: c.int, type: c.int, protocol: c.int) -> c.int --- sceNetSyscallSocket :: proc(name: cstring, domain: c.int, type: c.int, protocol: c.int) -> c.int ---
SocketAbort :: proc(s: c.int, flags: c.int) -> c.int --- sceNetSyscallSocketAbort :: proc(s: c.int, flags: c.int) -> c.int ---
Sysctl :: proc(param: ^SceNetSyscallParameter) -> c.int --- sceNetSyscallSysctl :: proc(param: ^SceNetSyscallParameter) -> c.int ---
} }
+60 -61
View File
@@ -5,67 +5,66 @@ import sce "../common"
foreign import ngs "sceNgs_stub" foreign import ngs "sceNgs_stub"
@(link_prefix = "sceNgs")
foreign ngs { foreign ngs {
ModuleCheckParamsInRangeInternal :: proc(handle: SceNgsHVoice, module_id: SceNgsModuleID, #by_ptr descriptor: SceNgsParamsDescriptor, size: sce.UInt32) -> sce.Int32 --- sceNgsModuleCheckParamsInRangeInternal :: proc(handle: SceNgsHVoice, module_id: SceNgsModuleID, #by_ptr descriptor: SceNgsParamsDescriptor, size: sce.UInt32) -> sce.Int32 ---
ModuleGetNumPresetsInternal :: proc(handle: SceNgsHSynSystem, module_id: SceNgsModuleID, num_presets: ^sce.UInt32) -> sce.Int32 --- sceNgsModuleGetNumPresetsInternal :: proc(handle: SceNgsHSynSystem, module_id: SceNgsModuleID, num_presets: ^sce.UInt32) -> sce.Int32 ---
ModuleGetPresetInternal :: proc(handle: SceNgsHSynSystem, module_id: SceNgsModuleID, preset_index: sce.UInt32, info: ^SceNgsBufferInfo) -> sce.Int32 --- sceNgsModuleGetPresetInternal :: proc(handle: SceNgsHSynSystem, module_id: SceNgsModuleID, preset_index: sce.UInt32, info: ^SceNgsBufferInfo) -> sce.Int32 ---
PatchCreateRoutingInternal :: proc(#by_ptr info: SceNgsPatchSetupInfo, handle: ^SceNgsHPatch) -> sce.Int32 --- sceNgsPatchCreateRoutingInternal :: proc(#by_ptr info: SceNgsPatchSetupInfo, handle: ^SceNgsHPatch) -> sce.Int32 ---
PatchRemoveRoutingInternal :: proc(handle: SceNgsHPatch) -> sce.Int32 --- sceNgsPatchRemoveRoutingInternal :: proc(handle: SceNgsHPatch) -> sce.Int32 ---
RackGetRequiredMemorySizeInternal :: proc(handle: SceNgsHSynSystem, #by_ptr rack_description: SceNgsRackDescription, user_size: ^sce.UInt32) -> sce.Int32 --- sceNgsRackGetRequiredMemorySizeInternal :: proc(handle: SceNgsHSynSystem, #by_ptr rack_description: SceNgsRackDescription, user_size: ^sce.UInt32) -> sce.Int32 ---
RackGetVoiceHandleInternal :: proc(rack_handle: SceNgsHRack, index: sce.UInt32, voice_handle: ^SceNgsHVoice) -> sce.Int32 --- sceNgsRackGetVoiceHandleInternal :: proc(rack_handle: SceNgsHRack, index: sce.UInt32, voice_handle: ^SceNgsHVoice) -> sce.Int32 ---
RackInitInternal :: proc(system_handle: SceNgsHSynSystem, rack_buffer: ^SceNgsBufferInfo, #by_ptr rack_description: SceNgsRackDescription, rack_handle: ^SceNgsHRack) -> sce.Int32 --- sceNgsRackInitInternal :: proc(system_handle: SceNgsHSynSystem, rack_buffer: ^SceNgsBufferInfo, #by_ptr rack_description: SceNgsRackDescription, rack_handle: ^SceNgsHRack) -> sce.Int32 ---
RackReleaseInternal :: proc(handle: SceNgsHRack, callback: SceNgsRackReleaseCallbackFunc) -> sce.Int32 --- sceNgsRackReleaseInternal :: proc(handle: SceNgsHRack, callback: SceNgsRackReleaseCallbackFunc) -> sce.Int32 ---
RackSetParamErrorCallbackInternal :: proc(rack_handle: SceNgsHRack, callback: SceNgsParamsErrorCallbackFunc) -> sce.Int32 --- sceNgsRackSetParamErrorCallbackInternal :: proc(rack_handle: SceNgsHRack, callback: SceNgsParamsErrorCallbackFunc) -> sce.Int32 ---
SulphaGetInfoInternal :: proc(#by_ptr obj_reg: SulphaNgsRegistration, info: ^SceNgsBufferInfo) -> sce.Int32 --- sceNgsSulphaGetInfoInternal :: proc(#by_ptr obj_reg: SulphaNgsRegistration, info: ^SceNgsBufferInfo) -> sce.Int32 ---
SulphaGetModuleListInternal :: proc(module_ids: ^sce.UInt32, in_array_count: sce.UInt32, count: ^sce.UInt32) -> sce.Int32 --- sceNgsSulphaGetModuleListInternal :: proc(module_ids: ^sce.UInt32, in_array_count: sce.UInt32, count: ^sce.UInt32) -> sce.Int32 ---
SulphaGetSynthUpdateCallbackInternal :: proc(handle: SceNgsHSynSystem, update_callback: ^SceNgsSulphaUpdateCallback, info: ^SceNgsBufferInfo) -> sce.Int32 --- sceNgsSulphaGetSynthUpdateCallbackInternal :: proc(handle: SceNgsHSynSystem, update_callback: ^SceNgsSulphaUpdateCallback, info: ^SceNgsBufferInfo) -> sce.Int32 ---
SulphaQueryModuleInternal :: proc(type: SulphaNgsModuleQueryType, debug: ^SulphaNgsModuleQuery) -> sce.Int32 --- sceNgsSulphaQueryModuleInternal :: proc(type: SulphaNgsModuleQueryType, debug: ^SulphaNgsModuleQuery) -> sce.Int32 ---
SulphaSetSynthUpdateCallbackInternal :: proc(handle: SceNgsHSynSystem, update_callback: SceNgsSulphaUpdateCallback, info: ^SceNgsBufferInfo) -> sce.Int32 --- sceNgsSulphaSetSynthUpdateCallbackInternal :: proc(handle: SceNgsHSynSystem, update_callback: SceNgsSulphaUpdateCallback, info: ^SceNgsBufferInfo) -> sce.Int32 ---
SystemGetCallbackListInternal :: proc(handle: SceNgsHSynSystem, array: ^[^]SceNgsCallbackListInfo, array_size: ^sce.UInt32) -> sce.Int32 --- sceNgsSystemGetCallbackListInternal :: proc(handle: SceNgsHSynSystem, array: ^[^]SceNgsCallbackListInfo, array_size: ^sce.UInt32) -> sce.Int32 ---
SystemGetRequiredMemorySizeInternal :: proc(#by_ptr params: SceNgsSystemInitParams, size: ^sce.UInt32) -> sce.Int32 --- sceNgsSystemGetRequiredMemorySizeInternal :: proc(#by_ptr params: SceNgsSystemInitParams, size: ^sce.UInt32) -> sce.Int32 ---
SystemInitInternal :: proc(buffer_info: ^SceNgsBufferInfo, compiled_sdk_version: sce.UInt32, #by_ptr params: SceNgsSystemInitParams, handle: ^SceNgsHSynSystem) -> sce.Int32 --- sceNgsSystemInitInternal :: proc(buffer_info: ^SceNgsBufferInfo, compiled_sdk_version: sce.UInt32, #by_ptr params: SceNgsSystemInitParams, handle: ^SceNgsHSynSystem) -> sce.Int32 ---
SystemLockInternal :: proc(handle: SceNgsHSynSystem) -> sce.Int32 --- sceNgsSystemLockInternal :: proc(handle: SceNgsHSynSystem) -> sce.Int32 ---
SystemPullDataInternal :: proc(handle: SceNgsHSynSystem, dirty_flags_a: sce.UInt32, dirty_flags_b: sce.UInt32) -> sce.Int32 --- sceNgsSystemPullDataInternal :: proc(handle: SceNgsHSynSystem, dirty_flags_a: sce.UInt32, dirty_flags_b: sce.UInt32) -> sce.Int32 ---
SystemPushDataInternal :: proc(handle: SceNgsHSynSystem) -> sce.Int32 --- sceNgsSystemPushDataInternal :: proc(handle: SceNgsHSynSystem) -> sce.Int32 ---
SystemReleaseInternal :: proc(handle: SceNgsHSynSystem) -> sce.Int32 --- sceNgsSystemReleaseInternal :: proc(handle: SceNgsHSynSystem) -> sce.Int32 ---
SystemSetFlagsInternal :: proc(handle: SceNgsHSynSystem, system_flags: sce.UInt32) -> sce.Int32 --- sceNgsSystemSetFlagsInternal :: proc(handle: SceNgsHSynSystem, system_flags: sce.UInt32) -> sce.Int32 ---
SystemSetParamErrorCallbackInternal :: proc(handle: SceNgsHSynSystem, callback_id: SceNgsParamsErrorCallbackFunc) -> sce.Int32 --- sceNgsSystemSetParamErrorCallbackInternal :: proc(handle: SceNgsHSynSystem, callback_id: SceNgsParamsErrorCallbackFunc) -> sce.Int32 ---
SystemUnlockInternal :: proc(handle: SceNgsHSynSystem) -> sce.Int32 --- sceNgsSystemUnlockInternal :: proc(handle: SceNgsHSynSystem) -> sce.Int32 ---
SystemUpdateInternal :: proc(handle: SceNgsHSynSystem) -> sce.Int32 --- sceNgsSystemUpdateInternal :: proc(handle: SceNgsHSynSystem) -> sce.Int32 ---
VoiceBypassModuleInternal :: proc(handle: SceNgsHVoice, module: sce.UInt32, flag: sce.UInt32) -> sce.Int32 --- sceNgsVoiceBypassModuleInternal :: proc(handle: SceNgsHVoice, module: sce.UInt32, flag: sce.UInt32) -> sce.Int32 ---
VoiceClearDirtyFlagInternal :: proc(handle: SceNgsHVoice, param_bit_flag: sce.UInt32) -> sce.Int32 --- sceNgsVoiceClearDirtyFlagInternal :: proc(handle: SceNgsHVoice, param_bit_flag: sce.UInt32) -> sce.Int32 ---
VoiceDefinitionGetPresetInternal :: proc(#by_ptr definition: SceNgsVoiceDefinition, index: sce.UInt32, presets: ^^SceNgsVoicePreset) -> sce.Int32 --- sceNgsVoiceDefinitionGetPresetInternal :: proc(#by_ptr definition: SceNgsVoiceDefinition, index: sce.UInt32, presets: ^^SceNgsVoicePreset) -> sce.Int32 ---
VoiceGetModuleBypassInternal :: proc(handle: SceNgsHVoice, module: sce.UInt32, flag: ^sce.UInt32) -> sce.Int32 --- sceNgsVoiceGetModuleBypassInternal :: proc(handle: SceNgsHVoice, module: sce.UInt32, flag: ^sce.UInt32) -> sce.Int32 ---
VoiceGetOutputPatchInternal :: proc(handle: SceNgsHVoice, nOutputIndex: sce.Int32, nSubIndex: sce.Int32, pPatchHandle: ^SceNgsHPatch) -> sce.Int32 --- sceNgsVoiceGetOutputPatchInternal :: proc(handle: SceNgsHVoice, nOutputIndex: sce.Int32, nSubIndex: sce.Int32, pPatchHandle: ^SceNgsHPatch) -> sce.Int32 ---
VoiceGetParamsOutOfRangeBufferedInternal :: proc(handle: SceNgsHVoice, module: sce.UInt32, message_buffer: [^]c.char) -> sce.Int32 --- sceNgsVoiceGetParamsOutOfRangeBufferedInternal :: proc(handle: SceNgsHVoice, module: sce.UInt32, message_buffer: [^]c.char) -> sce.Int32 ---
VoiceInitInternal :: proc(handle: SceNgsHVoice, #by_ptr preset: SceNgsVoicePreset, flags: sce.UInt32) -> sce.Int32 --- sceNgsVoiceInitInternal :: proc(handle: SceNgsHVoice, #by_ptr preset: SceNgsVoicePreset, flags: sce.UInt32) -> sce.Int32 ---
VoiceKeyOffInternal :: proc(handle: SceNgsHVoice) -> sce.Int32 --- sceNgsVoiceKeyOffInternal :: proc(handle: SceNgsHVoice) -> sce.Int32 ---
VoiceKillInternal :: proc(handle: SceNgsHVoice) -> sce.Int32 --- sceNgsVoiceKillInternal :: proc(handle: SceNgsHVoice) -> sce.Int32 ---
VoicePauseInternal :: proc(handle: SceNgsHVoice) -> sce.Int32 --- sceNgsVoicePauseInternal :: proc(handle: SceNgsHVoice) -> sce.Int32 ---
VoicePlayInternal :: proc(handle: SceNgsHVoice) -> sce.Int32 --- sceNgsVoicePlayInternal :: proc(handle: SceNgsHVoice) -> sce.Int32 ---
VoiceResumeInternal :: proc(handle: SceNgsHVoice) -> sce.Int32 --- sceNgsVoiceResumeInternal :: proc(handle: SceNgsHVoice) -> sce.Int32 ---
VoiceSetAllBypassesInternal :: proc(handle: SceNgsHVoice, bitflag: sce.UInt32) -> sce.Int32 --- sceNgsVoiceSetAllBypassesInternal :: proc(handle: SceNgsHVoice, bitflag: sce.UInt32) -> sce.Int32 ---
VoiceSetFinishedCallbackInternal :: proc(handle: SceNgsHVoice, callback: SceNgsCallbackFunc, userdata: rawptr) -> sce.Int32 --- sceNgsVoiceSetFinishedCallbackInternal :: proc(handle: SceNgsHVoice, callback: SceNgsCallbackFunc, userdata: rawptr) -> sce.Int32 ---
VoiceSetModuleCallbackInternal :: proc(handle: SceNgsHVoice, module: sce.UInt32, callback: SceNgsModuleCallbackFunc, callback_userdata: rawptr) -> sce.Int32 --- sceNgsVoiceSetModuleCallbackInternal :: proc(handle: SceNgsHVoice, module: sce.UInt32, callback: SceNgsModuleCallbackFunc, callback_userdata: rawptr) -> sce.Int32 ---
VoiceSetPresetInternal :: proc(handle: SceNgsHVoice, #by_ptr preset: SceNgsVoicePreset) -> sce.Int32 --- sceNgsVoiceSetPresetInternal :: proc(handle: SceNgsHVoice, #by_ptr preset: SceNgsVoicePreset) -> sce.Int32 ---
VoiceDefGetAtrac9VoiceInternal :: proc() -> ^SceNgsVoiceDefinition --- sceNgsVoiceDefGetAtrac9VoiceInternal :: proc() -> ^SceNgsVoiceDefinition ---
VoiceDefGetCompressorBussInternal :: proc() -> ^SceNgsVoiceDefinition --- sceNgsVoiceDefGetCompressorBussInternal :: proc() -> ^SceNgsVoiceDefinition ---
VoiceDefGetCompressorSideChainBussInternal :: proc() -> ^SceNgsVoiceDefinition --- sceNgsVoiceDefGetCompressorSideChainBussInternal :: proc() -> ^SceNgsVoiceDefinition ---
VoiceDefGetDelayBussInternal :: proc() -> ^SceNgsVoiceDefinition --- sceNgsVoiceDefGetDelayBussInternal :: proc() -> ^SceNgsVoiceDefinition ---
VoiceDefGetDistortionBussInternal :: proc() -> ^SceNgsVoiceDefinition --- sceNgsVoiceDefGetDistortionBussInternal :: proc() -> ^SceNgsVoiceDefinition ---
VoiceDefGetEnvelopeBussInternal :: proc() -> ^SceNgsVoiceDefinition --- sceNgsVoiceDefGetEnvelopeBussInternal :: proc() -> ^SceNgsVoiceDefinition ---
VoiceDefGetEqBussInternal :: proc() -> ^SceNgsVoiceDefinition --- sceNgsVoiceDefGetEqBussInternal :: proc() -> ^SceNgsVoiceDefinition ---
VoiceDefGetMasterBussInternal :: proc() -> ^SceNgsVoiceDefinition --- sceNgsVoiceDefGetMasterBussInternal :: proc() -> ^SceNgsVoiceDefinition ---
VoiceDefGetMixerBussInternal :: proc() -> ^SceNgsVoiceDefinition --- sceNgsVoiceDefGetMixerBussInternal :: proc() -> ^SceNgsVoiceDefinition ---
VoiceDefGetPauserBussInternal :: proc() -> ^SceNgsVoiceDefinition --- sceNgsVoiceDefGetPauserBussInternal :: proc() -> ^SceNgsVoiceDefinition ---
VoiceDefGetPitchshiftBussInternal :: proc() -> ^SceNgsVoiceDefinition --- sceNgsVoiceDefGetPitchshiftBussInternal :: proc() -> ^SceNgsVoiceDefinition ---
VoiceDefGetReverbBussInternal :: proc() -> ^SceNgsVoiceDefinition --- sceNgsVoiceDefGetReverbBussInternal :: proc() -> ^SceNgsVoiceDefinition ---
VoiceDefGetSasEmuVoiceInternal :: proc() -> ^SceNgsVoiceDefinition --- sceNgsVoiceDefGetSasEmuVoiceInternal :: proc() -> ^SceNgsVoiceDefinition ---
VoiceDefGetScreamVoiceAT9Internal :: proc() -> ^SceNgsVoiceDefinition --- sceNgsVoiceDefGetScreamVoiceAT9Internal :: proc() -> ^SceNgsVoiceDefinition ---
VoiceDefGetScreamVoiceInternal :: proc() -> ^SceNgsVoiceDefinition --- sceNgsVoiceDefGetScreamVoiceInternal :: proc() -> ^SceNgsVoiceDefinition ---
VoiceDefGetSimpleAtrac9VoiceInternal :: proc() -> ^SceNgsVoiceDefinition --- sceNgsVoiceDefGetSimpleAtrac9VoiceInternal :: proc() -> ^SceNgsVoiceDefinition ---
VoiceDefGetSimpleVoiceInternal :: proc() -> ^SceNgsVoiceDefinition --- sceNgsVoiceDefGetSimpleVoiceInternal :: proc() -> ^SceNgsVoiceDefinition ---
VoiceDefGetTemplate1Internal :: proc() -> ^SceNgsVoiceDefinition --- sceNgsVoiceDefGetTemplate1Internal :: proc() -> ^SceNgsVoiceDefinition ---
} }
+6 -7
View File
@@ -5,39 +5,38 @@ import sce "../common"
foreign import notificationutil "system:SceNotificationUtil_stub" foreign import notificationutil "system:SceNotificationUtil_stub"
@(link_prefix = "sceNotificationUtil")
foreign notificationutil { foreign notificationutil {
/** /**
* Initialize notification util for use with BG application. * Initialize notification util for use with BG application.
* *
* Does not need to be called for normal applications. * Does not need to be called for normal applications.
*/ */
BgAppInitialize :: proc() -> sce.Int32 --- sceNotificationUtilBgAppInitialize :: proc() -> sce.Int32 ---
/** /**
* Send notification. * Send notification.
* *
* Text buffer size must be 0x410. * Text buffer size must be 0x410.
*/ */
SendNotification :: proc(text: [^]sce.WChar16) -> sce.Int32 --- sceNotificationUtilSendNotification :: proc(text: [^]sce.WChar16) -> sce.Int32 ---
/** /**
* Clean notifications for calling app from notification history. * Clean notifications for calling app from notification history.
*/ */
CleanHistory :: proc() -> sce.Int32 --- sceNotificationUtilCleanHistory :: proc() -> sce.Int32 ---
/** /**
* Start BGDL-type notification. * Start BGDL-type notification.
*/ */
ProgressBegin :: proc(initParams: ^SceNotificationUtilProgressInitParam) -> sce.Int32 --- sceNotificationUtilProgressBegin :: proc(initParams: ^SceNotificationUtilProgressInitParam) -> sce.Int32 ---
/** /**
* Update BGDL-type notification. * Update BGDL-type notification.
*/ */
ProgressUpdate :: proc(updateParams: ^SceNotificationUtilProgressUpdateParam) -> sce.Int32 --- sceNotificationUtilProgressUpdate :: proc(updateParams: ^SceNotificationUtilProgressUpdateParam) -> sce.Int32 ---
/** /**
* Finish BGDL-type notification. * Finish BGDL-type notification.
*/ */
ProgressFinish :: proc(finishParams: ^SceNotificationUtilProgressFinishParam) -> sce.Int32 --- sceNotificationUtilProgressFinish :: proc(finishParams: ^SceNotificationUtilProgressFinishParam) -> sce.Int32 ---
} }
+2 -3
View File
@@ -72,7 +72,6 @@ foreign npdrm {
scePsmDrmGetRifKey :: proc(#by_ptr license_buf: ScePsmDrmLicense, keydata: [^]c.char, flags: c.int) -> c.int --- scePsmDrmGetRifKey :: proc(#by_ptr license_buf: ScePsmDrmLicense, keydata: [^]c.char, flags: c.int) -> c.int ---
} }
@(link_prefix = "_sceNpDrmPackage")
foreign npdrmpackage { foreign npdrmpackage {
/** /**
* Read the header of the PKG and initialize the context * Read the header of the PKG and initialize the context
@@ -86,7 +85,7 @@ foreign npdrmpackage {
* *
* @return 0 on success, != 0 on error * @return 0 on success, != 0 on error
*/ */
Check :: proc(buffer: rawptr, size: sce.Size, zero: c.int, identifier: c.uint) -> c.int --- _sceNpDrmPackageCheck :: proc(buffer: rawptr, size: sce.Size, zero: c.int, identifier: c.uint) -> c.int ---
/** /**
* Decrypt a PKG * Decrypt a PKG
@@ -97,7 +96,7 @@ foreign npdrmpackage {
* *
* @return 0 on success, != 0 on error * @return 0 on success, != 0 on error
*/ */
Decrypt :: proc(#no_alias buffer: rawptr, size: sce.Size, #no_alias opt: ^_sceNpDrmPackageDecrypt_opt) -> c.int --- _sceNpDrmPackageDecrypt :: proc(#no_alias buffer: rawptr, size: sce.Size, #no_alias opt: ^_sceNpDrmPackageDecrypt_opt) -> c.int ---
} }
foreign npdrmkern { foreign npdrmkern {
+33 -56
View File
@@ -5,7 +5,6 @@ import "core:c"
foreign import paf "system:ScePaf_stub" foreign import paf "system:ScePaf_stub"
@(link_prefix = "scePaf")
foreign paf { foreign paf {
/** /**
@@ -16,27 +15,25 @@ foreign paf {
* *
* @return 0 on success, <0 otherwise. * @return 0 on success, <0 otherwise.
*/ */
GraphicsUpdateCurrentWave :: proc(index: sce.UInt32, update_interval: sce.Float32) -> c.int --- scePafGraphicsUpdateCurrentWave :: proc(index: sce.UInt32, update_interval: sce.Float32) -> c.int ---
GetCurrentClockLocalTime :: proc(data: ^ScePafDateTime) -> c.int --- scePafGetCurrentClockLocalTime :: proc(data: ^ScePafDateTime) -> c.int ---
Sha1Init :: proc(_context: ^ScePafSha1Context) -> c.int --- scePafSha1Init :: proc(_context: ^ScePafSha1Context) -> c.int ---
Sha1Update :: proc(_context: ^ScePafSha1Context, data: rawptr, length: sce.Size) -> c.int --- scePafSha1Update :: proc(_context: ^ScePafSha1Context, data: rawptr, length: sce.Size) -> c.int ---
Sha1Result :: proc(_context: ^ScePafSha1Context, dst: rawptr) -> c.int --- scePafSha1Result :: proc(_context: ^ScePafSha1Context, dst: rawptr) -> c.int ---
CreateHeap :: proc(_context: ^ScePafHeapContext, membase: rawptr, size: sce.Size, name: cstring, opt: ^ScePafHeapOpt) --- scePafCreateHeap :: proc(_context: ^ScePafHeapContext, membase: rawptr, size: sce.Size, name: cstring, opt: ^ScePafHeapOpt) ---
DeleteHeap :: proc(_context: ^ScePafHeapContext) --- scePafDeleteHeap :: proc(_context: ^ScePafHeapContext) ---
MallocWithContext :: proc(_context: ^ScePafHeapContext, len: sce.Size) -> rawptr --- scePafMallocWithContext :: proc(_context: ^ScePafHeapContext, len: sce.Size) -> rawptr ---
FreeWithContext :: proc(_context: ^ScePafHeapContext, ptr: rawptr) --- scePafFreeWithContext :: proc(_context: ^ScePafHeapContext, ptr: rawptr) ---
MallocAlignWithContext :: proc(_context: ^ScePafHeapContext, align: sce.UInt32, len: sce.Size) -> rawptr --- scePafMallocAlignWithContext :: proc(_context: ^ScePafHeapContext, align: sce.UInt32, len: sce.Size) -> rawptr ---
ReallocWithContext :: proc(_context: ^ScePafHeapContext, ptr: rawptr, len: sce.Size) -> rawptr --- scePafReallocWithContext :: proc(_context: ^ScePafHeapContext, ptr: rawptr, len: sce.Size) -> rawptr ---
@(link_name = "sce_paf_malloc") sce_paf_malloc :: proc(size: sce.Size) -> rawptr ---
malloc :: proc(size: sce.Size) -> rawptr --- sce_paf_free :: proc(ptr: rawptr) ---
@(link_name = "sce_paf_free")
free :: proc(ptr: rawptr) ---
/** /**
* @brief Alloc memory with align * @brief Alloc memory with align
@@ -46,49 +43,30 @@ foreign paf {
* *
* @return memory pointer or NULL * @return memory pointer or NULL
*/ */
@(link_name = "sce_paf_memalign") sce_paf_memalign :: proc(align: sce.Size, length: sce.Size) -> rawptr ---
memalign :: proc(align: sce.Size, length: sce.Size) -> rawptr ---
@(link_name = "sce_paf_memchr") sce_paf_memchr :: proc(src: rawptr, ch: c.int, length: sce.Size) -> rawptr ---
memchr :: proc(src: rawptr, ch: c.int, length: sce.Size) -> rawptr --- sce_paf_memcmp :: proc(s1: rawptr, s2: rawptr, n: sce.Size) -> c.int ---
@(link_name = "sce_paf_memcmp")
memcmp :: proc(s1: rawptr, s2: rawptr, n: sce.Size) -> c.int ---
@(link_name = "sce_paf_memcpy") sce_paf_memcpy :: proc(dst: rawptr, src: rawptr, len: sce.Size) -> rawptr ---
memcpy :: proc(dst: rawptr, src: rawptr, len: sce.Size) -> rawptr --- sce_paf_memset :: proc(dst: rawptr, ch: c.int, len: sce.Size) -> rawptr ---
@(link_name = "sce_paf_memset") sce_paf_memmove :: proc(dst: rawptr, src: rawptr, len: sce.Size) -> rawptr ---
memset :: proc(dst: rawptr, ch: c.int, len: sce.Size) -> rawptr ---
@(link_name = "sce_paf_memmove")
memmove :: proc(dst: rawptr, src: rawptr, len: sce.Size) -> rawptr ---
@(link_name = "sce_paf_snprintf") sce_paf_snprintf :: proc(dst: cstring, max: c.uint, fmt: cstring, #c_vararg args: ..any) -> c.int ---
snprintf :: proc(dst: cstring, max: c.uint, fmt: cstring, #c_vararg args: ..any) -> c.int --- sce_paf_vsnprintf :: proc(dst: cstring, max: c.uint, fmt: cstring, arg: c.va_list) -> c.int ---
@(link_name = "sce_paf_vsnprintf")
vsnprintf :: proc(dst: cstring, max: c.uint, fmt: cstring, arg: c.va_list) -> c.int ---
@(link_name = "sce_paf_bcmp") sce_paf_bcmp :: proc(ptr1: rawptr, ptr2: rawptr, num: sce.Size) -> c.int ---
bcmp :: proc(ptr1: rawptr, ptr2: rawptr, num: sce.Size) -> c.int --- sce_paf_bcopy :: proc(dst: rawptr, src: rawptr, n: sce.Size) -> rawptr ---
@(link_name = "sce_paf_bcopy") sce_paf_bzero :: proc(dst: rawptr, n: sce.Size) -> rawptr ---
bcopy :: proc(dst: rawptr, src: rawptr, n: sce.Size) -> rawptr ---
@(link_name = "sce_paf_bzero")
bzero :: proc(dst: rawptr, n: sce.Size) -> rawptr ---
@(link_name = "sce_paf_strchr") sce_paf_strchr :: proc(s: cstring, ch: c.int) -> ^c.char ---
strchr :: proc(s: cstring, ch: c.int) -> ^c.char --- sce_paf_strcmp :: proc(s1: cstring, s2: cstring) -> c.int ---
@(link_name = "sce_paf_strcmp") sce_paf_strlen :: proc(s: cstring) -> c.size_t ---
strcmp :: proc(s1: cstring, s2: cstring) -> c.int --- sce_paf_strcasecmp :: proc(s1: cstring, s2: cstring) -> c.int ---
@(link_name = "sce_paf_strlen") sce_paf_strncasecmp :: proc(s1: cstring, s2: cstring, len: sce.Size) -> c.int ---
strlen :: proc(s: cstring) -> c.size_t --- sce_paf_strncmp :: proc(s1: cstring, s2: cstring, len: sce.Size) -> c.int ---
@(link_name = "sce_paf_strcasecmp") sce_paf_strncpy :: proc(dst: cstring, src: cstring, len: sce.Size) -> cstring ---
strcasecmp :: proc(s1: cstring, s2: cstring) -> c.int --- sce_paf_strrchr :: proc(s: cstring, ch: c.int) -> ^c.char ---
@(link_name = "sce_paf_strncasecmp")
strncasecmp :: proc(s1: cstring, s2: cstring, len: sce.Size) -> c.int ---
@(link_name = "sce_paf_strncmp")
strncmp :: proc(s1: cstring, s2: cstring, len: sce.Size) -> c.int ---
@(link_name = "sce_paf_strncpy")
strncpy :: proc(dst: cstring, src: cstring, len: sce.Size) -> cstring ---
@(link_name = "sce_paf_strrchr")
strrchr :: proc(s: cstring, ch: c.int) -> ^c.char ---
/** /**
* @brief string to double * @brief string to double
@@ -98,6 +76,5 @@ foreign paf {
* *
* @return parsed value * @return parsed value
*/ */
@(link_name = "sce_paf_strtod") sce_paf_strtod :: proc(nptr: cstring, endptr: ^^c.char) -> c.double ---
strtod :: proc(nptr: cstring, endptr: ^^c.char) -> c.double ---
} }
+9 -10
View File
@@ -63,16 +63,15 @@ _ScePerfArmPmonEventCode :: enum c.int {
PLE_REQ_PROGRAMMED = 0xA5 PLE_REQ_PROGRAMMED = 0xA5
} }
@(link_prefix = "scePerf")
foreign perf { foreign perf {
ArmPmonReset :: proc(thid: sce.UID) -> c.int --- scePerfArmPmonReset :: proc(thid: sce.UID) -> c.int ---
ArmPmonSelectEvent :: proc(thid: sce.UID, counter: sce.UInt32, event_code: sce.UInt8) -> c.int --- scePerfArmPmonSelectEvent :: proc(thid: sce.UID, counter: sce.UInt32, event_code: sce.UInt8) -> c.int ---
ArmPmonStart :: proc(thid: sce.UID) -> c.int --- scePerfArmPmonStart :: proc(thid: sce.UID) -> c.int ---
ArmPmonStop :: proc(thid: sce.UID) -> c.int --- scePerfArmPmonStop :: proc(thid: sce.UID) -> c.int ---
ArmPmonGetCounterValue :: proc(thid: sce.UID, counter: sce.UInt32, value: ^sce.UInt32) -> c.int --- scePerfArmPmonGetCounterValue :: proc(thid: sce.UID, counter: sce.UInt32, value: ^sce.UInt32) -> c.int ---
ArmPmonSetCounterValue :: proc(thid: sce.UID, counter: sce.UInt32, value: sce.UInt32) -> c.int --- scePerfArmPmonSetCounterValue :: proc(thid: sce.UID, counter: sce.UInt32, value: sce.UInt32) -> c.int ---
ArmPmonSoftwareIncrement :: proc(mask: sce.UInt32) -> c.int --- scePerfArmPmonSoftwareIncrement :: proc(mask: sce.UInt32) -> c.int ---
GetTimebaseValue :: proc() -> sce.UInt64 --- scePerfGetTimebaseValue :: proc() -> sce.UInt64 ---
GetTimebaseFrequency :: proc() -> sce.UInt32 --- scePerfGetTimebaseFrequency :: proc() -> sce.UInt32 ---
} }
+5 -6
View File
@@ -10,7 +10,6 @@ ScePfsRndDriveId :: struct {
} }
#assert(size_of(ScePfsRndDriveId) == 0x10) #assert(size_of(ScePfsRndDriveId) == 0x10)
@(link_prefix = "kscePfs")
foreign pfsmgr { foreign pfsmgr {
/** /**
* Mount pfs directory * Mount pfs directory
@@ -23,7 +22,7 @@ foreign pfsmgr {
* *
* @return 0 on success, < 0 on error. * @return 0 on success, < 0 on error.
*/ */
Mount :: proc(path: cstring, #by_ptr rnd_drive_id: ScePfsRndDriveId, program_authority_id: sce.UInt64, klicensee: rawptr, mode_index: c.uint16_t) -> c.int --- kscePfsMount :: proc(path: cstring, #by_ptr rnd_drive_id: ScePfsRndDriveId, program_authority_id: sce.UInt64, klicensee: rawptr, mode_index: c.uint16_t) -> c.int ---
/** /**
* Mount pfs directory without authid * Mount pfs directory without authid
@@ -35,7 +34,7 @@ foreign pfsmgr {
* *
* @return 0 on success, < 0 on error. * @return 0 on success, < 0 on error.
*/ */
Mount2 :: proc(path: cstring, #by_ptr rnd_drive_id: ScePfsRndDriveId, klicensee: rawptr, mode_index: c.uint16_t) -> c.int --- kscePfsMount2 :: proc(path: cstring, #by_ptr rnd_drive_id: ScePfsRndDriveId, klicensee: rawptr, mode_index: c.uint16_t) -> c.int ---
/** /**
* Unmount pfs directory * Unmount pfs directory
@@ -44,8 +43,8 @@ foreign pfsmgr {
* *
* @return 0 on success, < 0 on error. * @return 0 on success, < 0 on error.
*/ */
Unmount :: proc(#by_ptr rnd_drive_id: ScePfsRndDriveId) -> c.int --- kscePfsUnmount :: proc(#by_ptr rnd_drive_id: ScePfsRndDriveId) -> c.int ---
Approve :: proc(#by_ptr rnd_drive_id: ScePfsRndDriveId, program_authority_id: sce.UInt64) -> c.int --- kscePfsApprove :: proc(#by_ptr rnd_drive_id: ScePfsRndDriveId, program_authority_id: sce.UInt64) -> c.int ---
Disapprove :: proc(#by_ptr rnd_drive_id: ScePfsRndDriveId, program_authority_id: sce.UInt64) -> c.int --- kscePfsDisapprove :: proc(#by_ptr rnd_drive_id: ScePfsRndDriveId, program_authority_id: sce.UInt64) -> c.int ---
} }
+23 -24
View File
@@ -5,29 +5,28 @@ import sce "../common"
foreign import pgf "system:ScePgf_stub" foreign import pgf "system:ScePgf_stub"
@(link_prefix = "sceFont")
foreign pgf { foreign pgf {
NewLib :: proc(params: ^SceFontNewLibParams, errorCode: ^c.uint) -> SceFontLibHandle --- sceFontNewLib :: proc(params: ^SceFontNewLibParams, errorCode: ^c.uint) -> SceFontLibHandle ---
DoneLib :: proc(libHandle: SceFontLibHandle) -> c.int --- sceFontDoneLib :: proc(libHandle: SceFontLibHandle) -> c.int ---
Open :: proc(libHandle: SceFontLibHandle, index: c.int, mode: c.int, errorCode: ^c.uint) -> SceFontHandle --- sceFontOpen :: proc(libHandle: SceFontLibHandle, index: c.int, mode: c.int, errorCode: ^c.uint) -> SceFontHandle ---
OpenUserMemory :: proc(libHandle: SceFontLibHandle, pMemoryFont: rawptr, pMemoryFontSize: sce.Size, errorCode: ^c.uint) -> SceFontHandle --- sceFontOpenUserMemory :: proc(libHandle: SceFontLibHandle, pMemoryFont: rawptr, pMemoryFontSize: sce.Size, errorCode: ^c.uint) -> SceFontHandle ---
OpenUserFile :: proc(libHandle: SceFontLibHandle, file: cstring, mode: c.int, errorCode: ^c.uint) -> SceFontHandle --- sceFontOpenUserFile :: proc(libHandle: SceFontLibHandle, file: cstring, mode: c.int, errorCode: ^c.uint) -> SceFontHandle ---
Close :: proc(fontHandle: SceFontHandle) -> c.int --- sceFontClose :: proc(fontHandle: SceFontHandle) -> c.int ---
GetNumFontList :: proc(libHandle: SceFontLibHandle, errorCode: ^c.uint) -> c.int --- sceFontGetNumFontList :: proc(libHandle: SceFontLibHandle, errorCode: ^c.uint) -> c.int ---
FindOptimumFont :: proc(libHandle: SceFontLibHandle, fontStyle: ^SceFontStyle, errorCode: ^c.uint) -> c.int --- sceFontFindOptimumFont :: proc(libHandle: SceFontLibHandle, fontStyle: ^SceFontStyle, errorCode: ^c.uint) -> c.int ---
FindFont :: proc(libHandle: SceFontLibHandle, fontStyle: ^SceFontStyle, errorCode: ^c.uint) -> c.int --- sceFontFindFont :: proc(libHandle: SceFontLibHandle, fontStyle: ^SceFontStyle, errorCode: ^c.uint) -> c.int ---
GetFontInfo :: proc(fontHandle: SceFontHandle, fontInfo: ^SceFontInfo) -> c.int --- sceFontGetFontInfo :: proc(fontHandle: SceFontHandle, fontInfo: ^SceFontInfo) -> c.int ---
GetFontInfoByIndexNumber :: proc(libHandle: SceFontLibHandle, fontStyle: ^SceFontStyle, unknown: c.int, fontIndex: c.int) -> c.int --- sceFontGetFontInfoByIndexNumber :: proc(libHandle: SceFontLibHandle, fontStyle: ^SceFontStyle, unknown: c.int, fontIndex: c.int) -> c.int ---
SetResolution :: proc(libHandle: SceFontLibHandle, hRes: c.float, vRes: c.float) -> c.int --- sceFontSetResolution :: proc(libHandle: SceFontLibHandle, hRes: c.float, vRes: c.float) -> c.int ---
GetFontList :: proc(libHandle: SceFontLibHandle, fontStyle: ^SceFontStyle, numFonts: c.int) -> c.int --- sceFontGetFontList :: proc(libHandle: SceFontLibHandle, fontStyle: ^SceFontStyle, numFonts: c.int) -> c.int ---
GetCharInfo :: proc(fontHandle: SceFontHandle, charCode: c.uint, charInfo: ^SceFontCharInfo) -> c.int --- sceFontGetCharInfo :: proc(fontHandle: SceFontHandle, charCode: c.uint, charInfo: ^SceFontCharInfo) -> c.int ---
GetCharImageRect :: proc(fontHandle: SceFontHandle, charCode: c.uint, charRect: ^SceFontImageRect) -> c.int --- sceFontGetCharImageRect :: proc(fontHandle: SceFontHandle, charCode: c.uint, charRect: ^SceFontImageRect) -> c.int ---
GetCharGlyphImage :: proc(fontHandle: SceFontHandle, charCode: c.uint, glyphImage: ^SceFontGlyphImage) -> c.int --- sceFontGetCharGlyphImage :: proc(fontHandle: SceFontHandle, charCode: c.uint, glyphImage: ^SceFontGlyphImage) -> c.int ---
GetCharGlyphImage_Clip :: proc(fontHandle: SceFontHandle, charCode: c.uint, glyphImage: ^SceFontGlyphImage, clipXPos: c.int, clipYPos: c.int, clipWidth: c.int, clipHeight: c.int) -> c.int --- sceFontGetCharGlyphImage_Clip :: proc(fontHandle: SceFontHandle, charCode: c.uint, glyphImage: ^SceFontGlyphImage, clipXPos: c.int, clipYPos: c.int, clipWidth: c.int, clipHeight: c.int) -> c.int ---
PixelToPointH :: proc(libHandle: SceFontLibHandle, fontPixelsH: c.float, errorCode: ^c.uint) -> c.float --- sceFontPixelToPointH :: proc(libHandle: SceFontLibHandle, fontPixelsH: c.float, errorCode: ^c.uint) -> c.float ---
PixelToPointV :: proc(libHandle: SceFontLibHandle, fontPixelsV: c.float, errorCode: ^c.uint) -> c.float --- sceFontPixelToPointV :: proc(libHandle: SceFontLibHandle, fontPixelsV: c.float, errorCode: ^c.uint) -> c.float ---
PointToPixelH :: proc(libHandle: SceFontLibHandle, fontPointsH: c.float, errorCode: ^c.uint) -> c.float --- sceFontPointToPixelH :: proc(libHandle: SceFontLibHandle, fontPointsH: c.float, errorCode: ^c.uint) -> c.float ---
PointToPixelV :: proc(libHandle: SceFontLibHandle, fontPointsV: c.float, errorCode: ^c.uint) -> c.float --- sceFontPointToPixelV :: proc(libHandle: SceFontLibHandle, fontPointsV: c.float, errorCode: ^c.uint) -> c.float ---
SetAltCharacterCode :: proc(libHandle: SceFontLibHandle, charCode: c.uint) -> c.int --- sceFontSetAltCharacterCode :: proc(libHandle: SceFontLibHandle, charCode: c.uint) -> c.int ---
Flush :: proc(fontHandle: SceFontHandle) -> c.int --- sceFontFlush :: proc(fontHandle: SceFontHandle) -> c.int ---
} }
+2 -3
View File
@@ -13,8 +13,7 @@ PhotoExportParam :: struct {
foreign import photoexport "system:ScePhotoExport_stub" foreign import photoexport "system:ScePhotoExport_stub"
@(link_prefix = "scePhotoExport")
foreign photoexport { foreign photoexport {
FromData :: proc(data: rawptr, size: sce.Size, #by_ptr param: PhotoExportParam, workingMemory: rawptr, cancelCb: rawptr, user: rawptr, outPath: cstring, outPathSize: sce.Size) -> c.int --- scePhotoExportFromData :: proc(data: rawptr, size: sce.Size, #by_ptr param: PhotoExportParam, workingMemory: rawptr, cancelCb: rawptr, user: rawptr, outPath: cstring, outPathSize: sce.Size) -> c.int ---
FromFile :: proc(path: cstring, #by_ptr param: PhotoExportParam, workingMemory: rawptr, cancelCb: rawptr, user: rawptr, outPath: cstring, outPathSize: sce.Size) -> c.int --- scePhotoExportFromFile :: proc(path: cstring, #by_ptr param: PhotoExportParam, workingMemory: rawptr, cancelCb: rawptr, user: rawptr, outPath: cstring, outPathSize: sce.Size) -> c.int ---
} }
+2 -3
View File
@@ -4,7 +4,6 @@ import "core:c"
foreign import postssmgr "system:SceSblSsMgrForDriver_stub" foreign import postssmgr "system:SceSblSsMgrForDriver_stub"
@(link_prefix = "ksceSbl")
foreign postssmgr { foreign postssmgr {
/** /**
* Create the new RSA signature * Create the new RSA signature
@@ -16,7 +15,7 @@ foreign postssmgr {
* *
* @return SCE_OK on success, < 0 on error * @return SCE_OK on success, < 0 on error
*/ */
RSA2048CreateSignature :: proc(rsa_signature: ^SceSblRsaDataParam, hash: ^SceSblRsaDataParam, private_key: SceSblRsaPrivateKeyParam, type: c.int) -> c.int --- ksceSblRSA2048CreateSignature :: proc(rsa_signature: ^SceSblRsaDataParam, hash: ^SceSblRsaDataParam, private_key: SceSblRsaPrivateKeyParam, type: c.int) -> c.int ---
/** /**
* Verufy the new RSA signature * Verufy the new RSA signature
@@ -28,5 +27,5 @@ foreign postssmgr {
* *
* @return SCE_OK on success, < 0 on error * @return SCE_OK on success, < 0 on error
*/ */
RSA2048VerifySignature :: proc(rsa_signature: ^SceSblRsaDataParam, hash: ^SceSblRsaDataParam, public_key: ^SceSblRsaPublicKeyParam, type: c.int) -> c.int --- ksceSblRSA2048VerifySignature :: proc(rsa_signature: ^SceSblRsaDataParam, hash: ^SceSblRsaDataParam, public_key: ^SceSblRsaPublicKeyParam, type: c.int) -> c.int ---
} }
+30 -31
View File
@@ -6,7 +6,6 @@ import sce "../common"
foreign import power "system:ScePower_stub" foreign import power "system:ScePower_stub"
foreign import powerkern "system:ScePowerForDriver_stub" foreign import powerkern "system:ScePowerForDriver_stub"
@(link_prefix = "scePower")
foreign power { foreign power {
/** /**
* Registers a ScePower Callback * Registers a ScePower Callback
@@ -15,7 +14,7 @@ foreign power {
* *
* @return 0 on success, < 0 on error * @return 0 on success, < 0 on error
*/ */
RegisterCallback :: proc(cbid: sce.UID) -> c.int --- scePowerRegisterCallback :: proc(cbid: sce.UID) -> c.int ---
/** /**
* Unregister a callback * Unregister a callback
@@ -24,21 +23,21 @@ foreign power {
* *
* @return 0 on success, < 0 on error * @return 0 on success, < 0 on error
*/ */
UnregisterCallback :: proc(cbid: sce.UID) -> c.int --- scePowerUnregisterCallback :: proc(cbid: sce.UID) -> c.int ---
/** /**
* Returns battery charging status * Returns battery charging status
* *
* @return SCE_TRUE if under charge, SCE_FALSE otherwise * @return SCE_TRUE if under charge, SCE_FALSE otherwise
*/ */
IsBatteryCharging :: proc() -> sce.Bool --- scePowerIsBatteryCharging :: proc() -> sce.Bool ---
/** /**
* Returns battery life percentage * Returns battery life percentage
* *
* @return Battery life percentage * @return Battery life percentage
*/ */
GetBatteryLifePercent :: proc() -> c.int --- scePowerGetBatteryLifePercent :: proc() -> c.int ---
/** /**
* Set power configuration mode between: * Set power configuration mode between:
@@ -51,140 +50,140 @@ foreign power {
* *
* @return 0 on success * @return 0 on success
*/ */
SetConfigurationMode :: proc(conf: c.int) -> c.int --- scePowerSetConfigurationMode :: proc(conf: c.int) -> c.int ---
/** /**
* Check if a suspend is required * Check if a suspend is required
* *
* @return SCE_TRUE if suspend is required, SCE_FALSE otherwise * @return SCE_TRUE if suspend is required, SCE_FALSE otherwise
*/ */
IsSuspendRequired :: proc() -> sce.Bool --- scePowerIsSuspendRequired :: proc() -> sce.Bool ---
/** /**
* Check if AC is plugged in * Check if AC is plugged in
* *
* @return SCE_TRUE if plugged in, SCE_FALSE otherwise * @return SCE_TRUE if plugged in, SCE_FALSE otherwise
*/ */
IsPowerOnline :: proc() -> sce.Bool --- scePowerIsPowerOnline :: proc() -> sce.Bool ---
/** /**
* Returns battery life time * Returns battery life time
* *
* @return Battery life time in minutes * @return Battery life time in minutes
*/ */
GetBatteryLifeTime :: proc() -> c.int --- scePowerGetBatteryLifeTime :: proc() -> c.int ---
/** /**
* Returns battery remaining capacity * Returns battery remaining capacity
* *
* @return battery remaining capacity in mAh (milliampere hour) * @return battery remaining capacity in mAh (milliampere hour)
*/ */
GetBatteryRemainCapacity :: proc() -> c.int --- scePowerGetBatteryRemainCapacity :: proc() -> c.int ---
/** /**
* Returns battery state * Returns battery state
* *
* @return SCE_TRUE if battery is low, SCE_FALSE otherwise * @return SCE_TRUE if battery is low, SCE_FALSE otherwise
*/ */
IsLowBattery :: proc() -> sce.Bool --- scePowerIsLowBattery :: proc() -> sce.Bool ---
/** /**
* Returns battery full capacity * Returns battery full capacity
* *
* @return battery full capacity in mAh (milliampere hour) * @return battery full capacity in mAh (milliampere hour)
*/ */
GetBatteryFullCapacity :: proc() -> c.int --- scePowerGetBatteryFullCapacity :: proc() -> c.int ---
/** /**
* Returns battery temperature * Returns battery temperature
* *
* @return temperature in degrees celcius * 100 * @return temperature in degrees celcius * 100
*/ */
GetBatteryTemp :: proc() -> c.int --- scePowerGetBatteryTemp :: proc() -> c.int ---
/** /**
* Returns battery voltage * Returns battery voltage
* *
* @return battery voltage in mV (millivolts) * @return battery voltage in mV (millivolts)
*/ */
GetBatteryVolt :: proc() -> c.int --- scePowerGetBatteryVolt :: proc() -> c.int ---
/** /**
* Returns battery state of health * Returns battery state of health
* *
* @return battery state of health percent * @return battery state of health percent
*/ */
GetBatterySOH :: proc() -> c.int --- scePowerGetBatterySOH :: proc() -> c.int ---
/** /**
* Returns battery cycle count * Returns battery cycle count
* *
* @return battery cycle count * @return battery cycle count
*/ */
GetBatteryCycleCount :: proc() -> c.int --- scePowerGetBatteryCycleCount :: proc() -> c.int ---
/** /**
* Returns CPU clock frequency * Returns CPU clock frequency
* *
* @return CPU clock frequency in Mhz * @return CPU clock frequency in Mhz
*/ */
GetArmClockFrequency :: proc() -> c.int --- scePowerGetArmClockFrequency :: proc() -> c.int ---
/** /**
* Returns BUS clock frequency * Returns BUS clock frequency
* *
* @return BUS clock frequency in Mhz * @return BUS clock frequency in Mhz
*/ */
GetBusClockFrequency :: proc() -> c.int --- scePowerGetBusClockFrequency :: proc() -> c.int ---
/** /**
* Returns GPU clock frequency * Returns GPU clock frequency
* *
* @return GPU clock frequency in Mhz * @return GPU clock frequency in Mhz
*/ */
GetGpuClockFrequency :: proc() -> c.int --- scePowerGetGpuClockFrequency :: proc() -> c.int ---
/** /**
* Returns GPU crossbar clock frequency * Returns GPU crossbar clock frequency
* *
* @return GPU crossbar clock frequency in Mhz * @return GPU crossbar clock frequency in Mhz
*/ */
GetGpuXbarClockFrequency :: proc() -> c.int --- scePowerGetGpuXbarClockFrequency :: proc() -> c.int ---
/** /**
* Requests PS Vita to do a cold reset * Requests PS Vita to do a cold reset
* *
* @return always 0 * @return always 0
*/ */
RequestColdReset :: proc() -> c.int --- scePowerRequestColdReset :: proc() -> c.int ---
/** /**
* Requests PS Vita to go into standby * Requests PS Vita to go into standby
* *
* @return always 0 * @return always 0
*/ */
RequestStandby :: proc() -> c.int --- scePowerRequestStandby :: proc() -> c.int ---
/** /**
* Requests PS Vita to suspend * Requests PS Vita to suspend
* *
* @return always 0 * @return always 0
*/ */
RequestSuspend :: proc() -> c.int --- scePowerRequestSuspend :: proc() -> c.int ---
/** /**
* Request display on * Request display on
* *
* @return always 0 * @return always 0
*/ */
RequestDisplayOn :: proc() -> c.int --- scePowerRequestDisplayOn :: proc() -> c.int ---
/** /**
* Request display off * Request display off
* *
* @return always 0 * @return always 0
*/ */
RequestDisplayOff :: proc() -> c.int --- scePowerRequestDisplayOff :: proc() -> c.int ---
/** /**
* Sets CPU clock frequency * Sets CPU clock frequency
@@ -193,7 +192,7 @@ foreign power {
* *
* @return 0 on success, < 0 on error * @return 0 on success, < 0 on error
*/ */
SetArmClockFrequency :: proc(freq: c.int) -> c.int --- scePowerSetArmClockFrequency :: proc(freq: c.int) -> c.int ---
/** /**
* Sets BUS clock frequency * Sets BUS clock frequency
@@ -202,7 +201,7 @@ foreign power {
* *
* @return 0 on success, < 0 on error * @return 0 on success, < 0 on error
*/ */
SetBusClockFrequency :: proc(freq: c.int) -> c.int --- scePowerSetBusClockFrequency :: proc(freq: c.int) -> c.int ---
/** /**
* Sets GPU clock frequency * Sets GPU clock frequency
@@ -211,7 +210,7 @@ foreign power {
* *
* @return 0 on success, < 0 on error * @return 0 on success, < 0 on error
*/ */
SetGpuClockFrequency :: proc(freq: c.int) -> c.int --- scePowerSetGpuClockFrequency :: proc(freq: c.int) -> c.int ---
/** /**
* Sets GPU crossbar clock frequency * Sets GPU crossbar clock frequency
@@ -220,7 +219,7 @@ foreign power {
* *
* @return 0 on success, < 0 on error * @return 0 on success, < 0 on error
*/ */
SetGpuXbarClockFrequency :: proc(freq: c.int) -> c.int --- scePowerSetGpuXbarClockFrequency :: proc(freq: c.int) -> c.int ---
/** /**
* Sets wireless features usage * Sets wireless features usage
@@ -229,14 +228,14 @@ foreign power {
* *
* @return 0 on success, < 0 on error * @return 0 on success, < 0 on error
*/ */
SetUsingWireless :: proc(enabled: sce.Bool) -> c.int --- scePowerSetUsingWireless :: proc(enabled: sce.Bool) -> c.int ---
/** /**
* Gets wireless features usage * Gets wireless features usage
* *
* @return SCE_TRUE if enabled, SCE_FALSE otherwise * @return SCE_TRUE if enabled, SCE_FALSE otherwise
*/ */
GetUsingWireless :: proc() -> c.int --- scePowerGetUsingWireless :: proc() -> c.int ---
} }
foreign powerkern { foreign powerkern {
+10 -11
View File
@@ -5,7 +5,6 @@ import sce "../common"
foreign import promoterutil "system:ScePromoterUtil_stub" foreign import promoterutil "system:ScePromoterUtil_stub"
@(link_prefix = "scePromoterUtility")
foreign promoterutil { foreign promoterutil {
/** /**
* Init the promoter utility. * Init the promoter utility.
@@ -13,14 +12,14 @@ foreign promoterutil {
* *
* @return 0 on success. * @return 0 on success.
*/ */
Init :: proc() -> c.int --- scePromoterUtilityInit :: proc() -> c.int ---
/** /**
* Deinit the promoter utility. * Deinit the promoter utility.
* *
* @return 0 on success. * @return 0 on success.
*/ */
Exit :: proc() -> c.int --- scePromoterUtilityExit :: proc() -> c.int ---
/** /**
* Delete a package from the LiveArea. * Delete a package from the LiveArea.
@@ -29,7 +28,7 @@ foreign promoterutil {
* *
* @return 0 on success. * @return 0 on success.
*/ */
DeletePkg :: proc(titleid: cstring) -> c.int --- scePromoterUtilityDeletePkg :: proc(titleid: cstring) -> c.int ---
/** /**
* Update the LiveArea resources of an app * Update the LiveArea resources of an app
@@ -38,7 +37,7 @@ foreign promoterutil {
* *
* @return 0 on success. * @return 0 on success.
*/ */
UpdateLiveArea :: proc(args: ^ScePromoterUtilityLAUpdate) -> c.int --- scePromoterUtilityUpdateLiveArea :: proc(args: ^ScePromoterUtilityLAUpdate) -> c.int ---
/** /**
* Install Content Manager import contents and create bubbles without checking license files. * Install Content Manager import contents and create bubbles without checking license files.
@@ -47,7 +46,7 @@ foreign promoterutil {
* *
* @return 0 on success. * @return 0 on success.
*/ */
PromoteImport :: proc(params: ^ScePromoterUtilityImportParams) -> c.int --- scePromoterUtilityPromoteImport :: proc(params: ^ScePromoterUtilityImportParams) -> c.int ---
/** /**
* Install a package from a directory, and add an icon on the LiveArea. * Install a package from a directory, and add an icon on the LiveArea.
@@ -57,7 +56,7 @@ foreign promoterutil {
* *
* @return 0 on success. * @return 0 on success.
*/ */
PromotePkg :: proc(path: cstring, sync: c.int) -> c.int --- scePromoterUtilityPromotePkg :: proc(path: cstring, sync: c.int) -> c.int ---
/** /**
* Install a package from a directory and generate a rif. * Install a package from a directory and generate a rif.
@@ -67,7 +66,7 @@ foreign promoterutil {
* *
* @return 0 on success. * @return 0 on success.
*/ */
PromotePkgWithRif :: proc(path: cstring, sync: c.int) -> c.int --- scePromoterUtilityPromotePkgWithRif :: proc(path: cstring, sync: c.int) -> c.int ---
/** /**
* Returns the state of an operation. * Returns the state of an operation.
@@ -76,7 +75,7 @@ foreign promoterutil {
* *
* @return < 0 if failed. * @return < 0 if failed.
*/ */
GetState :: proc(state: ^c.int) -> c.int --- scePromoterUtilityGetState :: proc(state: ^c.int) -> c.int ---
/** /**
* Returns the result of a finished operation * Returns the result of a finished operation
@@ -85,7 +84,7 @@ foreign promoterutil {
* *
* @return < 0 if failed. * @return < 0 if failed.
*/ */
GetResult :: proc(res: ^c.int) -> c.int --- scePromoterUtilityGetResult :: proc(res: ^c.int) -> c.int ---
/** /**
* Check if titleid exists * Check if titleid exists
@@ -94,5 +93,5 @@ foreign promoterutil {
* *
* @return 0 if exists, < 0 otherwise. * @return 0 if exists, < 0 otherwise.
*/ */
CheckExist :: proc(titleid: cstring, res: ^c.int) -> c.int --- scePromoterUtilityCheckExist :: proc(titleid: cstring, res: ^c.int) -> c.int ---
} }
+28 -29
View File
@@ -6,38 +6,37 @@ import sceNet "../Net"
foreign import pspnetadhoc "system:ScePspnetAdhoc_stub" foreign import pspnetadhoc "system:ScePspnetAdhoc_stub"
@(link_prefix = "sceNetAdhoc")
foreign pspnetadhoc { foreign pspnetadhoc {
Init :: proc() -> c.int --- sceNetAdhocInit :: proc() -> c.int ---
Term :: proc() -> c.int --- sceNetAdhocTerm :: proc() -> c.int ---
PollSocket :: proc(sds: ^SceNetAdhocPollSd, nsds: c.int, timeout: c.uint, flag: c.int) -> c.int --- sceNetAdhocPollSocket :: proc(sds: ^SceNetAdhocPollSd, nsds: c.int, timeout: c.uint, flag: c.int) -> c.int ---
SetSocketAlert :: proc(id: c.int, flag: c.int) -> c.int --- sceNetAdhocSetSocketAlert :: proc(id: c.int, flag: c.int) -> c.int ---
GetSocketAlert :: proc(id: c.int, flag: ^c.int) -> c.int --- sceNetAdhocGetSocketAlert :: proc(id: c.int, flag: ^c.int) -> c.int ---
PdpCreate :: proc(#by_ptr saddr: sceNet.SceNetEtherAddr, sport: sce.UShort16, bufsize: c.uint, flag: c.int) -> c.int --- sceNetAdhocPdpCreate :: proc(#by_ptr saddr: sceNet.SceNetEtherAddr, sport: sce.UShort16, bufsize: c.uint, flag: c.int) -> c.int ---
PdpSend :: proc(id: c.int, #by_ptr daddr: sceNet.SceNetEtherAddr, dport: sce.UShort16, data: rawptr, len: c.int, timeout: c.uint, flag: c.int) -> c.int --- sceNetAdhocPdpSend :: proc(id: c.int, #by_ptr daddr: sceNet.SceNetEtherAddr, dport: sce.UShort16, data: rawptr, len: c.int, timeout: c.uint, flag: c.int) -> c.int ---
PdpRecv :: proc(id: c.int, saddr: ^sceNet.SceNetEtherAddr, sport: ^sce.UShort16, buf: rawptr, len: ^c.int, timeout: c.uint, flag: c.int) -> c.int --- sceNetAdhocPdpRecv :: proc(id: c.int, saddr: ^sceNet.SceNetEtherAddr, sport: ^sce.UShort16, buf: rawptr, len: ^c.int, timeout: c.uint, flag: c.int) -> c.int ---
PdpDelete :: proc(id: c.int, flag: c.int) -> c.int --- sceNetAdhocPdpDelete :: proc(id: c.int, flag: c.int) -> c.int ---
GetPdpStat :: proc(buflen: ^c.int, buf: rawptr) -> c.int --- sceNetAdhocGetPdpStat :: proc(buflen: ^c.int, buf: rawptr) -> c.int ---
PtpOpen :: proc(#by_ptr saddr: sceNet.SceNetEtherAddr, sport: sce.UShort16, #by_ptr daddr: sceNet.SceNetEtherAddr, dport: sce.UShort16, bufsize: c.uint, rexmt_int: c.uint, rexmt_cnt: c.int, flag: c.int) -> c.int --- sceNetAdhocPtpOpen :: proc(#by_ptr saddr: sceNet.SceNetEtherAddr, sport: sce.UShort16, #by_ptr daddr: sceNet.SceNetEtherAddr, dport: sce.UShort16, bufsize: c.uint, rexmt_int: c.uint, rexmt_cnt: c.int, flag: c.int) -> c.int ---
PtpConnect :: proc(id: c.int, timeout: c.uint, flag: c.int) -> c.int --- sceNetAdhocPtpConnect :: proc(id: c.int, timeout: c.uint, flag: c.int) -> c.int ---
PtpListen :: proc(#by_ptr saddr: sceNet.SceNetEtherAddr, sport: sce.UShort16, bufsize: c.uint, rexmt_int: c.uint, rexmt_cnt: c.int, backlog: c.int, flag: c.int) -> c.int --- sceNetAdhocPtpListen :: proc(#by_ptr saddr: sceNet.SceNetEtherAddr, sport: sce.UShort16, bufsize: c.uint, rexmt_int: c.uint, rexmt_cnt: c.int, backlog: c.int, flag: c.int) -> c.int ---
PtpAccept :: proc(id: c.int, addr: ^sceNet.SceNetEtherAddr, port: ^sce.UShort16, timeout: c.uint, flag: c.int) -> c.int --- sceNetAdhocPtpAccept :: proc(id: c.int, addr: ^sceNet.SceNetEtherAddr, port: ^sce.UShort16, timeout: c.uint, flag: c.int) -> c.int ---
PtpSend :: proc(id: c.int, data: rawptr, len: ^c.int, timeout: c.uint, flag: c.int) -> c.int --- sceNetAdhocPtpSend :: proc(id: c.int, data: rawptr, len: ^c.int, timeout: c.uint, flag: c.int) -> c.int ---
PtpRecv :: proc(id: c.int, buf: rawptr, len: ^c.int, timeout: c.uint, flag: c.int) -> c.int --- sceNetAdhocPtpRecv :: proc(id: c.int, buf: rawptr, len: ^c.int, timeout: c.uint, flag: c.int) -> c.int ---
PtpFlush :: proc(id: c.int, timeout: c.uint, flag: c.int) -> c.int --- sceNetAdhocPtpFlush :: proc(id: c.int, timeout: c.uint, flag: c.int) -> c.int ---
PtpClose :: proc(id: c.int, flag: c.int) -> c.int --- sceNetAdhocPtpClose :: proc(id: c.int, flag: c.int) -> c.int ---
GetPtpStat :: proc(buflen: ^c.int, buf: rawptr) -> c.int --- sceNetAdhocGetPtpStat :: proc(buflen: ^c.int, buf: rawptr) -> c.int ---
ctlInit :: proc(#by_ptr adhocId: SceNetAdhocctlAdhocId) -> c.int --- sceNetAdhocctlInit :: proc(#by_ptr adhocId: SceNetAdhocctlAdhocId) -> c.int ---
ctlTerm :: proc() -> c.int --- sceNetAdhocctlTerm :: proc() -> c.int ---
ctlGetAdhocId :: proc(adhocId: ^SceNetAdhocctlAdhocId) -> c.int --- sceNetAdhocctlGetAdhocId :: proc(adhocId: ^SceNetAdhocctlAdhocId) -> c.int ---
ctlGetPeerList :: proc(buflen: ^c.int, buf: rawptr) -> c.int --- sceNetAdhocctlGetPeerList :: proc(buflen: ^c.int, buf: rawptr) -> c.int ---
ctlGetPeerInfo :: proc(#by_ptr addr: sceNet.SceNetEtherAddr, size: c.int, peerInfo: ^SceNetAdhocctlPeerInfo) -> c.int --- sceNetAdhocctlGetPeerInfo :: proc(#by_ptr addr: sceNet.SceNetEtherAddr, size: c.int, peerInfo: ^SceNetAdhocctlPeerInfo) -> c.int ---
ctlGetAddrByName :: proc(#by_ptr nickname: SceNetAdhocctlNickname, buflen: ^c.int, buf: rawptr) -> c.int --- sceNetAdhocctlGetAddrByName :: proc(#by_ptr nickname: SceNetAdhocctlNickname, buflen: ^c.int, buf: rawptr) -> c.int ---
ctlGetNameByAddr :: proc(#by_ptr addr: sceNet.SceNetEtherAddr, nickname: ^SceNetAdhocctlNickname) -> c.int --- sceNetAdhocctlGetNameByAddr :: proc(#by_ptr addr: sceNet.SceNetEtherAddr, nickname: ^SceNetAdhocctlNickname) -> c.int ---
ctlGetParameter :: proc(parameter: ^SceNetAdhocctlParameter) -> c.int --- sceNetAdhocctlGetParameter :: proc(parameter: ^SceNetAdhocctlParameter) -> c.int ---
ctlGetEtherAddr :: proc(addr: ^sceNet.SceNetEtherAddr) -> c.int --- sceNetAdhocctlGetEtherAddr :: proc(addr: ^sceNet.SceNetEtherAddr) -> c.int ---
} }
+34 -35
View File
@@ -5,41 +5,40 @@ import sce "../common"
foreign import pvf "system:ScePvf_stub" foreign import pvf "system:ScePvf_stub"
GetCharGlyphImageClip :: GetCharGlyphImage_Clip scePvfGetCharGlyphImageClip :: scePvfGetCharGlyphImage_Clip
@(link_prefix = "scePvf")
foreign pvf { foreign pvf {
NewLib :: proc(initParam: ^ScePvfInitRec, errorCode: ScePvfError) -> ScePvfLibId --- scePvfNewLib :: proc(initParam: ^ScePvfInitRec, errorCode: ScePvfError) -> ScePvfLibId ---
DoneLib :: proc(libID: ScePvfLibId) -> ScePvfError --- scePvfDoneLib :: proc(libID: ScePvfLibId) -> ScePvfError ---
SetEM :: proc(libID: ScePvfLibId, emValue: ScePvfFloat32) -> ScePvfError --- scePvfSetEM :: proc(libID: ScePvfLibId, emValue: ScePvfFloat32) -> ScePvfError ---
SetResolution :: proc(libID: ScePvfLibId, hResolution: ScePvfFloat32, vResolution: ScePvfFloat32) -> ScePvfError --- scePvfSetResolution :: proc(libID: ScePvfLibId, hResolution: ScePvfFloat32, vResolution: ScePvfFloat32) -> ScePvfError ---
GetNumFontList :: proc(libID: ScePvfLibId, errorCode: ScePvfError) -> ScePvfInt --- scePvfGetNumFontList :: proc(libID: ScePvfLibId, errorCode: ScePvfError) -> ScePvfInt ---
GetFontList :: proc(libID: ScePvfLibId, fontStyleInfo: ^ScePvfFontStyleInfo, arraySize: ScePvfInt) -> ScePvfError --- scePvfGetFontList :: proc(libID: ScePvfLibId, fontStyleInfo: ^ScePvfFontStyleInfo, arraySize: ScePvfInt) -> ScePvfError ---
FindOptimumFont :: proc(libID: ScePvfLibId, fontStyleInfo: ^ScePvfFontStyleInfo, errorCode: ScePvfError) -> ScePvfFontIndex --- scePvfFindOptimumFont :: proc(libID: ScePvfLibId, fontStyleInfo: ^ScePvfFontStyleInfo, errorCode: ScePvfError) -> ScePvfFontIndex ---
FindFont :: proc(libID: ScePvfLibId, fontStyleInfo: ^ScePvfFontStyleInfo, errorCode: ScePvfError) -> ScePvfFontIndex --- scePvfFindFont :: proc(libID: ScePvfLibId, fontStyleInfo: ^ScePvfFontStyleInfo, errorCode: ScePvfError) -> ScePvfFontIndex ---
GetFontInfoByIndexNumber :: proc(libID: ScePvfLibId, fontStyleInfo: ^ScePvfFontStyleInfo, fontIndex: ScePvfFontIndex) -> ScePvfError --- scePvfGetFontInfoByIndexNumber :: proc(libID: ScePvfLibId, fontStyleInfo: ^ScePvfFontStyleInfo, fontIndex: ScePvfFontIndex) -> ScePvfError ---
Open :: proc(libID: ScePvfLibId, fontIndex: ScePvfFontIndex, mode: ScePvfU32, errorCode: ScePvfError) -> ScePvfFontId --- scePvfOpen :: proc(libID: ScePvfLibId, fontIndex: ScePvfFontIndex, mode: ScePvfU32, errorCode: ScePvfError) -> ScePvfFontId ---
OpenUserFile :: proc(libID: ScePvfLibId, filename: ScePvfPointer, mode: ScePvfU32, errorCode: ScePvfError) -> ScePvfFontId --- scePvfOpenUserFile :: proc(libID: ScePvfLibId, filename: ScePvfPointer, mode: ScePvfU32, errorCode: ScePvfError) -> ScePvfFontId ---
OpenUserFileWithSubfontIndex :: proc(libID: ScePvfLibId, filename: ScePvfPointer, mode: ScePvfU32, subFontIndex: ScePvfU32, errorCode: ScePvfError) -> ScePvfFontId --- scePvfOpenUserFileWithSubfontIndex :: proc(libID: ScePvfLibId, filename: ScePvfPointer, mode: ScePvfU32, subFontIndex: ScePvfU32, errorCode: ScePvfError) -> ScePvfFontId ---
OpenUserMemory :: proc(libID: ScePvfLibId, addr: ScePvfPointer, size: ScePvfU32, errorCode: ScePvfError) -> ScePvfFontId --- scePvfOpenUserMemory :: proc(libID: ScePvfLibId, addr: ScePvfPointer, size: ScePvfU32, errorCode: ScePvfError) -> ScePvfFontId ---
OpenUserMemoryWithSubfontIndex :: proc(libID: ScePvfLibId, addr: ScePvfPointer, size: ScePvfU32, subFontIndex: ScePvfU32, errorCode: ScePvfError) -> ScePvfFontId --- scePvfOpenUserMemoryWithSubfontIndex :: proc(libID: ScePvfLibId, addr: ScePvfPointer, size: ScePvfU32, subFontIndex: ScePvfU32, errorCode: ScePvfError) -> ScePvfFontId ---
OpenDefaultJapaneseFontOnSharedMemory :: proc(libID: ScePvfLibId, errorCode: ScePvfError) -> ScePvfFontId --- scePvfOpenDefaultJapaneseFontOnSharedMemory :: proc(libID: ScePvfLibId, errorCode: ScePvfError) -> ScePvfFontId ---
OpenDefaultLatinFontOnSharedMemory :: proc(libID: ScePvfLibId, errorCode: ScePvfError) -> ScePvfFontId --- scePvfOpenDefaultLatinFontOnSharedMemory :: proc(libID: ScePvfLibId, errorCode: ScePvfError) -> ScePvfFontId ---
Close :: proc(fontID: ScePvfFontId) -> ScePvfError --- scePvfClose :: proc(fontID: ScePvfFontId) -> ScePvfError ---
Flush :: proc(fontID: ScePvfFontId) -> ScePvfError --- scePvfFlush :: proc(fontID: ScePvfFontId) -> ScePvfError ---
SetCharSize :: proc(fontID: ScePvfFontId, hSize: ScePvfFloat32, vSize: ScePvfFloat32) -> ScePvfError --- scePvfSetCharSize :: proc(fontID: ScePvfFontId, hSize: ScePvfFloat32, vSize: ScePvfFloat32) -> ScePvfError ---
SetEmboldenRate :: proc(fontID: ScePvfFontId, emboldenRate: ScePvfFloat32) -> ScePvfError --- scePvfSetEmboldenRate :: proc(fontID: ScePvfFontId, emboldenRate: ScePvfFloat32) -> ScePvfError ---
SetSkewValue :: proc(fontID: ScePvfFontId, angleX: ScePvfFloat32, angleY: ScePvfFloat32) -> ScePvfError --- scePvfSetSkewValue :: proc(fontID: ScePvfFontId, angleX: ScePvfFloat32, angleY: ScePvfFloat32) -> ScePvfError ---
IsElement :: proc(fontID: ScePvfFontId, charCode: ScePvfCharCode) -> ScePvfBool --- scePvfIsElement :: proc(fontID: ScePvfFontId, charCode: ScePvfCharCode) -> ScePvfBool ---
GetFontInfo :: proc(fontID: ScePvfFontId, fontInfo: ^ScePvfFontInfo) -> ScePvfError --- scePvfGetFontInfo :: proc(fontID: ScePvfFontId, fontInfo: ^ScePvfFontInfo) -> ScePvfError ---
GetCharInfo :: proc(fontID: ScePvfFontId, charCode: ScePvfCharCode, charInfo: ^ScePvfCharInfo) -> ScePvfError --- scePvfGetCharInfo :: proc(fontID: ScePvfFontId, charCode: ScePvfCharCode, charInfo: ^ScePvfCharInfo) -> ScePvfError ---
GetKerningInfo :: proc(fontID: ScePvfFontId, leftCharCode: ScePvfCharCode, rightCharCode: ScePvfCharCode, pKerningInfo: ^ScePvfKerningInfo) -> ScePvfError --- scePvfGetKerningInfo :: proc(fontID: ScePvfFontId, leftCharCode: ScePvfCharCode, rightCharCode: ScePvfCharCode, pKerningInfo: ^ScePvfKerningInfo) -> ScePvfError ---
GetCharImageRect :: proc(fontID: ScePvfFontId, charCode: ScePvfCharCode, rect: ^ScePvfIrect) -> ScePvfError --- scePvfGetCharImageRect :: proc(fontID: ScePvfFontId, charCode: ScePvfCharCode, rect: ^ScePvfIrect) -> ScePvfError ---
GetCharGlyphImage :: proc(fontID: ScePvfFontId, charCode: ScePvfCharCode, imageBuffer: ^ScePvfUserImageBufferRec) -> ScePvfError --- scePvfGetCharGlyphImage :: proc(fontID: ScePvfFontId, charCode: ScePvfCharCode, imageBuffer: ^ScePvfUserImageBufferRec) -> ScePvfError ---
GetCharGlyphImage_Clip :: proc(fontID: ScePvfFontId, charCode: ScePvfCharCode, imageBuffer: ^ScePvfUserImageBufferRec, clipX: ScePvfS32, clipY: ScePvfS32, clipWidth: ScePvfU32, clipHeight: ScePvfU32) -> ScePvfError --- scePvfGetCharGlyphImage_Clip :: proc(fontID: ScePvfFontId, charCode: ScePvfCharCode, imageBuffer: ^ScePvfUserImageBufferRec, clipX: ScePvfS32, clipY: ScePvfS32, clipWidth: ScePvfU32, clipHeight: ScePvfU32) -> ScePvfError ---
PixelToPointH :: proc(libID: ScePvfLibId, pixel: ScePvfFloat32, errorCode: ScePvfError) -> ScePvfFloat32 --- scePvfPixelToPointH :: proc(libID: ScePvfLibId, pixel: ScePvfFloat32, errorCode: ScePvfError) -> ScePvfFloat32 ---
PixelToPointV :: proc(libID: ScePvfLibId, pixel: ScePvfFloat32, errorCode: ScePvfError) -> ScePvfFloat32 --- scePvfPixelToPointV :: proc(libID: ScePvfLibId, pixel: ScePvfFloat32, errorCode: ScePvfError) -> ScePvfFloat32 ---
PointToPixelH :: proc(libID: ScePvfLibId, point: ScePvfFloat32, errorCode: ScePvfError) -> ScePvfFloat32 --- scePvfPointToPixelH :: proc(libID: ScePvfLibId, point: ScePvfFloat32, errorCode: ScePvfError) -> ScePvfFloat32 ---
PointToPixelV :: proc(libID: ScePvfLibId, point: ScePvfFloat32, errorCode: ScePvfError) -> ScePvfFloat32 --- scePvfPointToPixelV :: proc(libID: ScePvfLibId, point: ScePvfFloat32, errorCode: ScePvfError) -> ScePvfFloat32 ---
SetAltCharacterCode :: proc(libID: ScePvfLibId, charCode: ScePvfCharCode) -> ScePvfError --- scePvfSetAltCharacterCode :: proc(libID: ScePvfLibId, charCode: ScePvfCharCode) -> ScePvfError ---
} }
+2 -3
View File
@@ -4,19 +4,18 @@ import "core:c"
foreign import razorcapture "system:SceRazorCapture_stub" foreign import razorcapture "system:SceRazorCapture_stub"
@(link_prefix = "sceRazorGpuCapture")
foreign razorcapture { foreign razorcapture {
/** /**
* Sets a trigger for a gpu capture in next frame from Razor debugger * Sets a trigger for a gpu capture in next frame from Razor debugger
* *
* @param[in] filename - Filename of the file where to save capture results * @param[in] filename - Filename of the file where to save capture results
*/ */
SetTriggerNextFrame :: proc(filename: cstring) --- sceRazorGpuCaptureSetTriggerNextFrame :: proc(filename: cstring) ---
/** /**
* Enables collecting of GPU captures when a gpucrash happens * Enables collecting of GPU captures when a gpucrash happens
* *
* @param[in] filename - Filename of the file where to save capture results * @param[in] filename - Filename of the file where to save capture results
*/ */
EnableSalvage :: proc(filename: cstring) --- sceRazorGpuCaptureEnableSalvage :: proc(filename: cstring) ---
} }
+4 -5
View File
@@ -5,7 +5,6 @@ import sce "../common"
foreign import razorhud "system:SceRazorHud_stub" foreign import razorhud "system:SceRazorHud_stub"
@(link_prefix = "sceRazorGpuLive")
foreign razorhud { foreign razorhud {
/** /**
* Sets a metrics group to use for gpu live debugging * Sets a metrics group to use for gpu live debugging
@@ -14,7 +13,7 @@ foreign razorhud {
* *
* @return 0, <0 on error. * @return 0, <0 on error.
*/ */
SetMetricsGroup :: proc(metrics: c.uint32_t) -> c.int --- sceRazorGpuLiveSetMetricsGroup :: proc(metrics: c.uint32_t) -> c.int ---
/** /**
* Sets the buffer in which to store gpu live debugging results for the current frame * Sets the buffer in which to store gpu live debugging results for the current frame
@@ -25,19 +24,19 @@ foreign razorhud {
* *
* @return 0, <0 on error. * @return 0, <0 on error.
*/ */
SetBuffer :: proc(buffer: rawptr, buf_size: sce.Size, results: ^SceRazorGpuLiveResultInfo) -> c.int --- sceRazorGpuLiveSetBuffer :: proc(buffer: rawptr, buf_size: sce.Size, results: ^SceRazorGpuLiveResultInfo) -> c.int ---
/** /**
* Starts gpu live debugging * Starts gpu live debugging
* *
* @return 0, <0 on error. * @return 0, <0 on error.
*/ */
Start :: proc() -> c.int --- sceRazorGpuLiveStart :: proc() -> c.int ---
/** /**
* Stops gpu live debugging * Stops gpu live debugging
* *
* @return 0, <0 on error. * @return 0, <0 on error.
*/ */
Stop :: proc() -> c.int --- sceRazorGpuLiveStop :: proc() -> c.int ---
} }
+12 -13
View File
@@ -6,7 +6,6 @@ import sce "../common"
foreign import registrymgr "system:SceRegistryMgr_stub" foreign import registrymgr "system:SceRegistryMgr_stub"
foreign import registrymgrkern "system:SceRegMgrForDriver_stub" foreign import registrymgrkern "system:SceRegMgrForDriver_stub"
@(link_prefix = "sceRegMgr")
foreign registrymgr { foreign registrymgr {
/** /**
* Get a key's information by category and name * Get a key's information by category and name
@@ -18,7 +17,7 @@ foreign registrymgr {
* *
* @return 0 on success, < 0 on error * @return 0 on success, < 0 on error
*/ */
GetKeyBin :: proc(category: cstring, name: cstring, buf: rawptr, size: c.int) -> c.int --- sceRegMgrGetKeyBin :: proc(category: cstring, name: cstring, buf: rawptr, size: c.int) -> c.int ---
/** /**
* Get a key's information by category and name * Get a key's information by category and name
@@ -29,7 +28,7 @@ foreign registrymgr {
* *
* @return 0 on success, < 0 on error * @return 0 on success, < 0 on error
*/ */
GetKeyInt :: proc(category: cstring, name: cstring, buf: ^c.int) -> c.int --- sceRegMgrGetKeyInt :: proc(category: cstring, name: cstring, buf: ^c.int) -> c.int ---
/** /**
* Get a key's information by category and name * Get a key's information by category and name
@@ -41,7 +40,7 @@ foreign registrymgr {
* *
* @return 0 on success, < 0 on error * @return 0 on success, < 0 on error
*/ */
GetKeyStr :: proc(category: cstring, name: cstring, buf: [^]c.char, size: c.int) -> c.int --- sceRegMgrGetKeyStr :: proc(category: cstring, name: cstring, buf: [^]c.char, size: c.int) -> c.int ---
/** /**
* Set a key's information by category and name * Set a key's information by category and name
@@ -53,7 +52,7 @@ foreign registrymgr {
* *
* @return 0 on success, < 0 on error * @return 0 on success, < 0 on error
*/ */
SetKeyBin :: proc(category: cstring, name: cstring, buf: rawptr, size: c.int) -> c.int --- sceRegMgrSetKeyBin :: proc(category: cstring, name: cstring, buf: rawptr, size: c.int) -> c.int ---
/** /**
* Set a key's information by category and name * Set a key's information by category and name
@@ -64,7 +63,7 @@ foreign registrymgr {
* *
* @return 0 on success, < 0 on error * @return 0 on success, < 0 on error
*/ */
SetKeyInt :: proc(category: cstring, name: cstring, buf: c.int) -> c.int --- sceRegMgrSetKeyInt :: proc(category: cstring, name: cstring, buf: c.int) -> c.int ---
/** /**
* Set a key's information by category and name * Set a key's information by category and name
@@ -76,7 +75,7 @@ foreign registrymgr {
* *
* @return 0 on success, < 0 on error * @return 0 on success, < 0 on error
*/ */
SetKeyStr :: proc(category: cstring, name: cstring, buf: [^]c.char, size: c.int) -> c.int --- sceRegMgrSetKeyStr :: proc(category: cstring, name: cstring, buf: [^]c.char, size: c.int) -> c.int ---
/** /**
* Get all keys' initial information by category (from os0:kd/registry.db0) * Get all keys' initial information by category (from os0:kd/registry.db0)
@@ -87,7 +86,7 @@ foreign registrymgr {
* *
* @return 0 on success, < 0 on error * @return 0 on success, < 0 on error
*/ */
GetInitVals :: proc(category: cstring, buf: [^]c.char, elements_number: c.int) -> c.int --- sceRegMgrGetInitVals :: proc(category: cstring, buf: [^]c.char, elements_number: c.int) -> c.int ---
/** /**
* Get all keys' information by category * Get all keys' information by category
@@ -98,7 +97,7 @@ foreign registrymgr {
* *
* @return 0 on success, < 0 on error * @return 0 on success, < 0 on error
*/ */
GetKeys :: proc(category: cstring, buf: [^]c.char, elements_number: c.int) -> c.int --- sceRegMgrGetKeys :: proc(category: cstring, buf: [^]c.char, elements_number: c.int) -> c.int ---
/** /**
* Set all keys' information by category * Set all keys' information by category
@@ -109,7 +108,7 @@ foreign registrymgr {
* *
* @return 0 on success, < 0 on error * @return 0 on success, < 0 on error
*/ */
SetKeys :: proc(category: cstring, buf: [^]c.char, elements_number: c.int) -> c.int --- sceRegMgrSetKeys :: proc(category: cstring, buf: [^]c.char, elements_number: c.int) -> c.int ---
/** /**
* Get a system param key's information by id * Get a system param key's information by id
@@ -119,7 +118,7 @@ foreign registrymgr {
* *
* @return 0 on success, < 0 on error * @return 0 on success, < 0 on error
*/ */
SystemParamGetInt :: proc(id: c.int, buf: ^c.int) -> c.int --- sceRegMgrSystemParamGetInt :: proc(id: c.int, buf: ^c.int) -> c.int ---
/** /**
* Get a system param key's information by id * Get a system param key's information by id
@@ -130,7 +129,7 @@ foreign registrymgr {
* *
* @return 0 on success, < 0 on error * @return 0 on success, < 0 on error
*/ */
SystemParamGetStr :: proc(id: c.int, buf: [^]c.char, size: c.int) -> c.int --- sceRegMgrSystemParamGetStr :: proc(id: c.int, buf: [^]c.char, size: c.int) -> c.int ---
/** /**
@@ -141,7 +140,7 @@ foreign registrymgr {
* *
* @return 0 on success, < 0 on error * @return 0 on success, < 0 on error
*/ */
GetRegVersion :: proc(version: c.int, buf: [^]c.char) -> c.int --- sceRegMgrGetRegVersion :: proc(version: c.int, buf: [^]c.char) -> c.int ---
} }
foreign registrymgrkern { foreign registrymgrkern {
+1 -2
View File
@@ -4,7 +4,6 @@ import sce "../common"
foreign import sblacmgr "system:SceSblACMgr_stub" foreign import sblacmgr "system:SceSblACMgr_stub"
@(link_prefix = "sceSblACMgr")
foreign sblacmgr { foreign sblacmgr {
IsGameProgram :: proc(result: ^sce.Bool) -> sce.Int32 --- sceSblACMgrIsGameProgram :: proc(result: ^sce.Bool) -> sce.Int32 ---
} }
+5 -6
View File
@@ -9,10 +9,9 @@ SCE_UPDATE_MODE_SWU_CUI :: 0x30
SceUpdateMode :: c.char SceUpdateMode :: c.char
GetBootMode :: GetUpdateMode sceSblSsUpdateMgrGetBootMode :: sceSblUsGetUpdateMode
SetBootMode :: SetUpdateMode sceSblSsUpdateMgrSetBootMode :: sceSblUsSetUpdateMode
@(link_prefix = "sceSblUs")
foreign sblupdatemgr { foreign sblupdatemgr {
/** /**
* Getting system update mode on boot * Getting system update mode on boot
@@ -21,7 +20,7 @@ foreign sblupdatemgr {
* *
* @return 0 on success, < 0 on error. * @return 0 on success, < 0 on error.
*/ */
GetUpdateMode :: proc(mode: ^SceUpdateMode) -> c.int --- sceSblUsGetUpdateMode :: proc(mode: ^SceUpdateMode) -> c.int ---
/** /**
@@ -31,7 +30,7 @@ foreign sblupdatemgr {
* *
* @return 0 on success, < 0 on error. * @return 0 on success, < 0 on error.
*/ */
SetUpdateMode :: proc(mode: SceUpdateMode) -> c.int --- sceSblUsSetUpdateMode :: proc(mode: SceUpdateMode) -> c.int ---
/** /**
@@ -43,5 +42,5 @@ foreign sblupdatemgr {
* *
* note - If verify CEX PUP on Devkit system, got error. * note - If verify CEX PUP on Devkit system, got error.
*/ */
VerifyPup :: proc(path: cstring) -> c.int --- sceSblUsVerifyPup :: proc(path: cstring) -> c.int ---
} }
+7 -8
View File
@@ -5,19 +5,18 @@ import sce "../common"
foreign import shacccg "system:SceShaccCg_stub" foreign import shacccg "system:SceShaccCg_stub"
@(link_prefix = "sceShaccCg")
foreign shacccg { foreign shacccg {
InitializeCompileOptions :: proc(options: ^SceShaccCgCompileOptions) -> c.int --- sceShaccCgInitializeCompileOptions :: proc(options: ^SceShaccCgCompileOptions) -> c.int ---
CompileProgram :: proc(#by_ptr options: SceShaccCgCompileOptions, #by_ptr callbacks: SceShaccCgCallbackList, unk: c.int) -> ^SceShaccCgCompileOutput --- sceShaccCgCompileProgram :: proc(#by_ptr options: SceShaccCgCompileOptions, #by_ptr callbacks: SceShaccCgCallbackList, unk: c.int) -> ^SceShaccCgCompileOutput ---
SetDefaultAllocator :: proc(malloc_cb: #type ^proc "c" (_: c.uint) -> rawptr, free_cb: #type ^proc "c" (_: rawptr)) -> c.int --- sceShaccCgSetDefaultAllocator :: proc(malloc_cb: #type ^proc "c" (_: c.uint) -> rawptr, free_cb: #type ^proc "c" (_: rawptr)) -> c.int ---
InitializeCallbackList :: proc(callbacks: ^SceShaccCgCallbackList, defaults: SceShaccCgCallbackDefaults) --- sceShaccCgInitializeCallbackList :: proc(callbacks: ^SceShaccCgCallbackList, defaults: SceShaccCgCallbackDefaults) ---
DestroyCompileOutput :: proc(output: ^SceShaccCgCompileOutput) --- sceShaccCgDestroyCompileOutput :: proc(output: ^SceShaccCgCompileOutput) ---
ReleaseCompiler :: proc() --- sceShaccCgReleaseCompiler :: proc() ---
GetVersionString :: proc() -> cstring --- sceShaccCgGetVersionString :: proc() -> cstring ---
} }
+6 -7
View File
@@ -4,7 +4,6 @@ import "core:c"
foreign import shellsvc "system:SceShellSvc_stub" foreign import shellsvc "system:SceShellSvc_stub"
@(link_prefix = "sceShellUtil")
foreign shellsvc { foreign shellsvc {
/** /**
* Init events * Init events
@@ -13,7 +12,7 @@ foreign shellsvc {
* *
* @return 0 on success, < 0 on error. * @return 0 on success, < 0 on error.
*/ */
InitEvents :: proc(unk: c.int) -> c.int --- sceShellUtilInitEvents :: proc(unk: c.int) -> c.int ---
/** /**
* Register event handler * Register event handler
@@ -24,7 +23,7 @@ foreign shellsvc {
* *
* @return 0 on success, < 0 on error. * @return 0 on success, < 0 on error.
*/ */
RegisterEventHandler :: proc(handler: ^SceShellUtilEventHandler, userData: rawptr) -> c.int --- sceShellUtilRegisterEventHandler :: proc(handler: ^SceShellUtilEventHandler, userData: rawptr) -> c.int ---
/** /**
* Lock event * Lock event
@@ -33,7 +32,7 @@ foreign shellsvc {
* *
* @return 0 on success, < 0 on error. * @return 0 on success, < 0 on error.
*/ */
Lock :: proc(type: SceShellUtilLockType) -> c.int --- sceShellUtilLock :: proc(type: SceShellUtilLockType) -> c.int ---
/** /**
* Unlock event * Unlock event
@@ -42,9 +41,9 @@ foreign shellsvc {
* *
* @return 0 on success, < 0 on error. * @return 0 on success, < 0 on error.
*/ */
Unlock :: proc(type: SceShellUtilLockType) -> c.int --- sceShellUtilUnlock :: proc(type: SceShellUtilLockType) -> c.int ---
RequestLaunchApp :: proc(param: ^SceShellUtilLaunchAppParam) -> c.int --- sceShellUtilRequestLaunchApp :: proc(param: ^SceShellUtilLaunchAppParam) -> c.int ---
LaunchAppRequestLaunchApp :: proc(param: ^SceShellUtilLaunchAppParam) -> c.int --- sceShellUtilLaunchAppRequestLaunchApp :: proc(param: ^SceShellUtilLaunchAppParam) -> c.int ---
} }
+1 -3
View File
@@ -16,8 +16,6 @@ SceShutterSoundType :: enum c.uint {
SAVE_VIDEO_END = 2, SAVE_VIDEO_END = 2,
} }
@(link_prefix = "sceShutterSound")
foreign shuttersound { foreign shuttersound {
/** /**
* Plays a shutter sound * Plays a shutter sound
@@ -26,5 +24,5 @@ foreign shuttersound {
* *
* @return 0 on success, < 0 on error. * @return 0 on success, < 0 on error.
*/ */
Play :: proc(type: SceShutterSoundType) -> c.int --- sceShutterSoundPlay :: proc(type: SceShutterSoundType) -> c.int ---
} }
+1 -2
View File
@@ -10,7 +10,6 @@ SceSqliteMallocMethods :: struct {
xFree: #type ^proc "c" (_: rawptr), xFree: #type ^proc "c" (_: rawptr),
} }
@(link_prefix = "sceSqlite")
foreign sqlite { foreign sqlite {
/** /**
* Wrapper for sqlite3_config(SQLITE_CONFIG_MALLOC) * Wrapper for sqlite3_config(SQLITE_CONFIG_MALLOC)
@@ -19,5 +18,5 @@ foreign sqlite {
* *
* @return 0 on success, < 0 on error. * @return 0 on success, < 0 on error.
*/ */
ConfigMallocMethods :: proc(methods: ^SceSqliteMallocMethods) -> c.int --- sceSqliteConfigMallocMethods :: proc(methods: ^SceSqliteMallocMethods) -> c.int ---
} }
+8 -9
View File
@@ -5,7 +5,6 @@ import sce "../common"
foreign import sysmodule "system:SceSysmodule_stub" foreign import sysmodule "system:SceSysmodule_stub"
@(link_prefix = "sceSysmodule")
foreign sysmodule { foreign sysmodule {
/** /**
* Load a module. * Load a module.
@@ -14,7 +13,7 @@ foreign sysmodule {
* *
* @return 0 on success, <0 on error. * @return 0 on success, <0 on error.
*/ */
LoadModule :: proc(id: SceSysmoduleModuleId) -> c.int --- sceSysmoduleLoadModule :: proc(id: SceSysmoduleModuleId) -> c.int ---
/** /**
* Unload a module. * Unload a module.
@@ -23,7 +22,7 @@ foreign sysmodule {
* *
* @return 0 on success, <0 on error. * @return 0 on success, <0 on error.
*/ */
UnloadModule :: proc(id: SceSysmoduleModuleId) -> c.int --- sceSysmoduleUnloadModule :: proc(id: SceSysmoduleModuleId) -> c.int ---
/** /**
* Check if a module is loaded. * Check if a module is loaded.
@@ -32,7 +31,7 @@ foreign sysmodule {
* *
* @return 0 if loaded, <0 otherwise. * @return 0 if loaded, <0 otherwise.
*/ */
IsLoaded :: proc(id: SceSysmoduleModuleId) -> c.int --- sceSysmoduleIsLoaded :: proc(id: SceSysmoduleModuleId) -> c.int ---
/** /**
* Load an internal module. * Load an internal module.
@@ -41,7 +40,7 @@ foreign sysmodule {
* *
* @return 0 on success, <0 on error. * @return 0 on success, <0 on error.
*/ */
LoadModuleInternal :: proc(id: SceSysmoduleInternalModuleId) -> c.int --- sceSysmoduleLoadModuleInternal :: proc(id: SceSysmoduleInternalModuleId) -> c.int ---
/** /**
* Unload an internal module. * Unload an internal module.
@@ -50,7 +49,7 @@ foreign sysmodule {
* *
* @return 0 on success, <0 on error. * @return 0 on success, <0 on error.
*/ */
UnloadModuleInternal :: proc(id: SceSysmoduleInternalModuleId) -> c.int --- sceSysmoduleUnloadModuleInternal :: proc(id: SceSysmoduleInternalModuleId) -> c.int ---
/** /**
* Check if an internal module is loaded. * Check if an internal module is loaded.
@@ -59,7 +58,7 @@ foreign sysmodule {
* *
* @return 0 if loaded, <0 otherwise. * @return 0 if loaded, <0 otherwise.
*/ */
IsLoadedInternal :: proc(id: SceSysmoduleInternalModuleId) -> c.int --- sceSysmoduleIsLoadedInternal :: proc(id: SceSysmoduleInternalModuleId) -> c.int ---
/** /**
* Load an internal module with custom arguments. * Load an internal module with custom arguments.
@@ -71,7 +70,7 @@ foreign sysmodule {
* *
* @return 0 on success, <0 otherwise. * @return 0 on success, <0 otherwise.
*/ */
LoadModuleInternalWithArg :: proc(id: SceSysmoduleInternalModuleId, args: sce.Size, argp: rawptr, #by_ptr option: SceSysmoduleOpt) -> c.int --- sceSysmoduleLoadModuleInternalWithArg :: proc(id: SceSysmoduleInternalModuleId, args: sce.Size, argp: rawptr, #by_ptr option: SceSysmoduleOpt) -> c.int ---
/** /**
* Unload an internal module with custom arguments. * Unload an internal module with custom arguments.
@@ -83,5 +82,5 @@ foreign sysmodule {
* *
* @return 0 on success, <0 otherwise. * @return 0 on success, <0 otherwise.
*/ */
UnloadModuleInternalWithArg :: proc(id: SceSysmoduleInternalModuleId, args: sce.Size, argp: rawptr, #by_ptr option: SceSysmoduleOpt) -> c.int --- sceSysmoduleUnloadModuleInternalWithArg :: proc(id: SceSysmoduleInternalModuleId, args: sce.Size, argp: rawptr, #by_ptr option: SceSysmoduleOpt) -> c.int ---
} }
+7 -8
View File
@@ -6,7 +6,6 @@ import sce "../common"
foreign import touch "system:SceTouch_stub" foreign import touch "system:SceTouch_stub"
foreign import touchkern "system:SceTouchForDriver_stub" foreign import touchkern "system:SceTouchForDriver_stub"
@(link_prefix = "sceTouch")
foreign touch { foreign touch {
/** /**
* Get Touch Panel information * Get Touch Panel information
@@ -14,7 +13,7 @@ foreign touch {
* @param[in] port Port number. * @param[in] port Port number.
* @param[out] pPanelInfo The buffer to get the Touch Panel information. * @param[out] pPanelInfo The buffer to get the Touch Panel information.
*/ */
GetPanelInfo :: proc(port: sce.UInt32, pPanelInfo: ^SceTouchPanelInfo) -> c.int --- sceTouchGetPanelInfo :: proc(port: sce.UInt32, pPanelInfo: ^SceTouchPanelInfo) -> c.int ---
/** /**
* Get touch data (Blocking) * Get touch data (Blocking)
@@ -25,7 +24,7 @@ foreign touch {
* *
* @return Buffers count, between 1 and 'nBufs'. <0 on error. * @return Buffers count, between 1 and 'nBufs'. <0 on error.
*/ */
Read :: proc(port: sce.UInt32, pData: ^SceTouchData, nBufs: sce.UInt32) -> c.int --- sceTouchRead :: proc(port: sce.UInt32, pData: ^SceTouchData, nBufs: sce.UInt32) -> c.int ---
/** /**
* Get touch data (Polling) * Get touch data (Polling)
@@ -36,7 +35,7 @@ foreign touch {
* *
* @return Buffers count, between 1 and 'nBufs'. <0 on error. * @return Buffers count, between 1 and 'nBufs'. <0 on error.
*/ */
Peek :: proc(port: sce.UInt32, pData: ^SceTouchData, nBufs: sce.UInt32) -> c.int --- sceTouchPeek :: proc(port: sce.UInt32, pData: ^SceTouchData, nBufs: sce.UInt32) -> c.int ---
/** /**
* Set sampling state of touch panel. * Set sampling state of touch panel.
@@ -44,7 +43,7 @@ foreign touch {
* @param[in] port Port number. * @param[in] port Port number.
* @param[in] state Sampling state. * @param[in] state Sampling state.
*/ */
SetSamplingState :: proc(port: sce.UInt32, state: SceTouchSamplingState) -> c.int --- sceTouchSetSamplingState :: proc(port: sce.UInt32, state: SceTouchSamplingState) -> c.int ---
/** /**
* Get sampling state of touch panel. * Get sampling state of touch panel.
@@ -52,21 +51,21 @@ foreign touch {
* @param[in] port Port number. * @param[in] port Port number.
* @param[out] pState The buffer to receive sampling state. * @param[out] pState The buffer to receive sampling state.
*/ */
GetSamplingState :: proc(port: sce.UInt32, pState: ^SceTouchSamplingState) -> c.int --- sceTouchGetSamplingState :: proc(port: sce.UInt32, pState: ^SceTouchSamplingState) -> c.int ---
/** /**
* Enable touch force output. * Enable touch force output.
* *
* @param[in] port Port number. * @param[in] port Port number.
*/ */
EnableTouchForce :: proc(port: sce.UInt32) -> c.int --- sceTouchEnableTouchForce :: proc(port: sce.UInt32) -> c.int ---
/** /**
* Disable touch force output. * Disable touch force output.
* *
* @param[in] port Port number. * @param[in] port Port number.
*/ */
DisableTouchForce :: proc(port: sce.UInt32) -> c.int --- sceTouchDisableTouchForce :: proc(port: sce.UInt32) -> c.int ---
} }
foreign touchkern { foreign touchkern {
+11 -12
View File
@@ -14,7 +14,6 @@ import sce "../common"
foreign import triggerutil "system:SceTriggerUtil_stub" foreign import triggerutil "system:SceTriggerUtil_stub"
@(link_prefix = "sceTriggerUtil")
foreign triggerutil { foreign triggerutil {
/** /**
* Register application start event that will be repeated on certain days * Register application start event that will be repeated on certain days
@@ -27,7 +26,7 @@ foreign triggerutil {
* *
* @return 0 on success, <0 otherwise. * @return 0 on success, <0 otherwise.
*/ */
RegisterDailyEvent :: proc(titleid: cstring, #by_ptr param: SceTriggerUtilEventParamDaily, eventId: c.int, a4: c.int, a5: c.int) -> c.int --- sceTriggerUtilRegisterDailyEvent :: proc(titleid: cstring, #by_ptr param: SceTriggerUtilEventParamDaily, eventId: c.int, a4: c.int, a5: c.int) -> c.int ---
/** /**
* Register one time application start event * Register one time application start event
@@ -40,7 +39,7 @@ foreign triggerutil {
* *
* @return 0 on success, <0 otherwise. * @return 0 on success, <0 otherwise.
*/ */
RegisterOneTimeEvent :: proc(titleid: cstring, #by_ptr param: SceTriggerUtilEventParamOneTime, eventId: c.int, a4: c.int, a5: c.int) -> c.int --- sceTriggerUtilRegisterOneTimeEvent :: proc(titleid: cstring, #by_ptr param: SceTriggerUtilEventParamOneTime, eventId: c.int, a4: c.int, a5: c.int) -> c.int ---
/** /**
* Unregister daily event for caller application * Unregister daily event for caller application
@@ -51,7 +50,7 @@ foreign triggerutil {
* *
* @return 0 on success, <0 otherwise. * @return 0 on success, <0 otherwise.
*/ */
UnregisterDailyEvent :: proc(eventId: c.int, a2: c.int, a3: c.int) -> c.int --- sceTriggerUtilUnregisterDailyEvent :: proc(eventId: c.int, a2: c.int, a3: c.int) -> c.int ---
/** /**
* Unregister one time event for caller application * Unregister one time event for caller application
@@ -62,7 +61,7 @@ foreign triggerutil {
* *
* @return 0 on success, <0 otherwise. * @return 0 on success, <0 otherwise.
*/ */
UnregisterOneTimeEvent :: proc(eventId: c.int, a2: c.int, a3: c.int) -> c.int --- sceTriggerUtilUnregisterOneTimeEvent :: proc(eventId: c.int, a2: c.int, a3: c.int) -> c.int ---
/** /**
* Get value from "Settings->System->Auto-Start Settings" for caller application. Required to be 1 to use * Get value from "Settings->System->Auto-Start Settings" for caller application. Required to be 1 to use
@@ -73,7 +72,7 @@ foreign triggerutil {
* *
* @return 0 on success, <0 otherwise. * @return 0 on success, <0 otherwise.
*/ */
GetAutoStartStatus :: proc(status: ^c.int, a2: c.int, a3: c.int) -> c.int --- sceTriggerUtilGetAutoStartStatus :: proc(status: ^c.int, a2: c.int, a3: c.int) -> c.int ---
/** /**
* Get one time event info for caller application * Get one time event info for caller application
@@ -85,7 +84,7 @@ foreign triggerutil {
* *
* @return 0 on success, <0 otherwise. * @return 0 on success, <0 otherwise.
*/ */
GetOneTimeEventInfo :: proc(eventId: c.int, triggerTime: ^sce.RtcTick, a4: c.int, a5: c.int) -> c.int --- sceTriggerUtilGetOneTimeEventInfo :: proc(eventId: c.int, triggerTime: ^sce.RtcTick, a4: c.int, a5: c.int) -> c.int ---
/** /**
* Get daily event info for caller application * Get daily event info for caller application
@@ -97,7 +96,7 @@ foreign triggerutil {
* *
* @return 0 on success, <0 otherwise. * @return 0 on success, <0 otherwise.
*/ */
GetDailyEventInfo :: proc(eventId: c.int, param: ^SceTriggerUtilEventParamDaily, a5: c.int, a6: c.int) -> c.int --- sceTriggerUtilGetDailyEventInfo :: proc(eventId: c.int, param: ^SceTriggerUtilEventParamDaily, a5: c.int, a6: c.int) -> c.int ---
/** /**
* Get info for user application that has registered events * Get info for user application that has registered events
@@ -109,7 +108,7 @@ foreign triggerutil {
* *
* @return 0 on success, <0 otherwise. * @return 0 on success, <0 otherwise.
*/ */
GetUserAppInfo :: proc(titleid: cstring, appInfo: ^SceTriggerUtilUserAppInfo, a4: c.int, a5: c.int) -> c.int --- sceTriggerUtilGetUserAppInfo :: proc(titleid: cstring, appInfo: ^SceTriggerUtilUserAppInfo, a4: c.int, a5: c.int) -> c.int ---
/** /**
* Get list of user applications that has registered events. List contains null-separated title IDs * Get list of user applications that has registered events. List contains null-separated title IDs
@@ -119,7 +118,7 @@ foreign triggerutil {
* *
* @return 0 on success, <0 otherwise. * @return 0 on success, <0 otherwise.
*/ */
GetRegisteredUserTitleIdList :: proc(titleIdBuffer: [^]c.char, numOfIds: c.int) -> c.int --- sceTriggerUtilGetRegisteredUserTitleIdList :: proc(titleIdBuffer: [^]c.char, numOfIds: c.int) -> c.int ---
/** /**
* Get info for system application that has registered events * Get info for system application that has registered events
@@ -131,7 +130,7 @@ foreign triggerutil {
* *
* @return 0 on success, <0 otherwise. * @return 0 on success, <0 otherwise.
*/ */
GetSystemAppInfo :: proc(titleid: cstring, appInfo: ^SceTriggerUtilSystemAppInfo, a4: c.int, a5: c.int) -> c.int --- sceTriggerUtilGetSystemAppInfo :: proc(titleid: cstring, appInfo: ^SceTriggerUtilSystemAppInfo, a4: c.int, a5: c.int) -> c.int ---
/** /**
* Get list of system applications that has registered events. List contains null-separated fake title IDs * Get list of system applications that has registered events. List contains null-separated fake title IDs
@@ -141,5 +140,5 @@ foreign triggerutil {
* *
* @return 0 on success, <0 otherwise. * @return 0 on success, <0 otherwise.
*/ */
GetRegisteredSystemTitleIdList :: proc(buffer: [^]c.char, numOfIds: c.int) -> c.int --- sceTriggerUtilGetRegisteredSystemTitleIdList :: proc(buffer: [^]c.char, numOfIds: c.int) -> c.int ---
} }
+6 -7
View File
@@ -6,7 +6,6 @@ import sce "../common"
foreign import udcd "system:SceUdcd_stub" foreign import udcd "system:SceUdcd_stub"
foreign import udcdkern "system:SceUdcdForDriver_stub" foreign import udcdkern "system:SceUdcdForDriver_stub"
@(link_prefix = "sceUdcd")
foreign udcd { foreign udcd {
/** /**
* Get device state * Get device state
@@ -15,7 +14,7 @@ foreign udcd {
* *
* @return 0 on success, < 0 on error. * @return 0 on success, < 0 on error.
*/ */
GetDeviceState :: proc(state: ^SceUdcdDeviceState) -> c.int --- sceUdcdGetDeviceState :: proc(state: ^SceUdcdDeviceState) -> c.int ---
/** /**
* Get device information * Get device information
@@ -24,7 +23,7 @@ foreign udcd {
* *
* @return 0 on success, < 0 on error. * @return 0 on success, < 0 on error.
*/ */
GetDeviceInfo :: proc(devInfo: ^SceUdcdDeviceInfo) -> c.int --- sceUdcdGetDeviceInfo :: proc(devInfo: ^SceUdcdDeviceInfo) -> c.int ---
/** /**
* Get state of a specific USB driver * Get state of a specific USB driver
@@ -33,7 +32,7 @@ foreign udcd {
* *
* @return SCE_UDCD_STATUS_DRIVER_STARTED if the driver has been started, SCE_UDCD_STATUS_DRIVER_REGISTERED if it is stopped * @return SCE_UDCD_STATUS_DRIVER_STARTED if the driver has been started, SCE_UDCD_STATUS_DRIVER_REGISTERED if it is stopped
*/ */
GetDrvState :: proc(driverName: cstring) -> c.int --- sceUdcdGetDrvState :: proc(driverName: cstring) -> c.int ---
/** /**
* Register callback * Register callback
@@ -43,7 +42,7 @@ foreign udcd {
* *
* @return 0 on success, < 0 on error. * @return 0 on success, < 0 on error.
*/ */
RegisterCallback :: proc(cbid: sce.UID, state: c.int) -> c.int --- sceUdcdRegisterCallback :: proc(cbid: sce.UID, state: c.int) -> c.int ---
/** /**
* Unregister callback * Unregister callback
@@ -52,7 +51,7 @@ foreign udcd {
* *
* @return 0 on success, < 0 on error. * @return 0 on success, < 0 on error.
*/ */
UnregisterCallback :: proc(cbid: sce.UID) -> c.int --- sceUdcdUnregisterCallback :: proc(cbid: sce.UID) -> c.int ---
/** /**
* Wait for state * Wait for state
@@ -62,7 +61,7 @@ foreign udcd {
* *
* @return 0 on success, < 0 on error. * @return 0 on success, < 0 on error.
*/ */
WaitState :: proc(waitParam: ^SceUdcdWaitParam, timeout: c.uint) -> c.int --- sceUdcdWaitState :: proc(waitParam: ^SceUdcdWaitParam, timeout: c.uint) -> c.int ---
} }
foreign udcdkern { foreign udcdkern {
+8 -9
View File
@@ -5,7 +5,6 @@ import sce "../common"
foreign import usbaudioin "system:SceUsbAudioIn_stub" foreign import usbaudioin "system:SceUsbAudioIn_stub"
@(link_prefix = "sceUsbAudioIn")
foreign usbaudioin { foreign usbaudioin {
/** /**
* Open usb audio device * Open usb audio device
@@ -16,7 +15,7 @@ foreign usbaudioin {
* @param[in] bits - Bits per sample. Only 16 allowed * @param[in] bits - Bits per sample. Only 16 allowed
* @param[in] rate - Bitrate in Hz. Only 48000 allowed * @param[in] rate - Bitrate in Hz. Only 48000 allowed
*/ */
OpenDevice :: proc(device_id: sce.UInt32, bits: c.int, rate: c.int) -> sce.Int32 --- sceUsbAudioInOpenDevice :: proc(device_id: sce.UInt32, bits: c.int, rate: c.int) -> sce.Int32 ---
/** /**
* Close usb audio device * Close usb audio device
@@ -25,7 +24,7 @@ foreign usbaudioin {
* *
* @param[in] device_id - Device id * @param[in] device_id - Device id
*/ */
CloseDevice :: proc(device_id: sce.UInt32) -> sce.Int32 --- sceUsbAudioInCloseDevice :: proc(device_id: sce.UInt32) -> sce.Int32 ---
/** /**
* Get available audio usb devices * Get available audio usb devices
@@ -38,7 +37,7 @@ foreign usbaudioin {
* *
* @note While function accepts up to 127 as list_size it can only return maximum 7 devices * @note While function accepts up to 127 as list_size it can only return maximum 7 devices
*/ */
GetDeviceIdList :: proc(list: ^SceUsbAudioInDeviceListItem, device_count: ^sce.UInt32, list_size: sce.UInt32) -> sce.Int32 --- sceUsbAudioInGetDeviceIdList :: proc(list: ^SceUsbAudioInDeviceListItem, device_count: ^sce.UInt32, list_size: sce.UInt32) -> sce.Int32 ---
/** /**
* Get usb audio device info * Get usb audio device info
@@ -48,7 +47,7 @@ foreign usbaudioin {
* @param[in] device_id - Device id * @param[in] device_id - Device id
* @param[out] info - pointer to SceUsbAudioInDeviceInfo * @param[out] info - pointer to SceUsbAudioInDeviceInfo
*/ */
GetDeviceInformation :: proc(device_id: sce.UInt32, info: ^SceUsbAudioInDeviceInfo) -> sce.Int32 --- sceUsbAudioInGetDeviceInformation :: proc(device_id: sce.UInt32, info: ^SceUsbAudioInDeviceInfo) -> sce.Int32 ---
/** /**
* Get usb audio device max volume * Get usb audio device max volume
@@ -60,7 +59,7 @@ foreign usbaudioin {
* *
* @note You should OpenDevice first to use this function * @note You should OpenDevice first to use this function
*/ */
GetMaxValueOfVolume :: proc(device_id: sce.UInt32, volume: ^sce.UInt32) -> sce.Int32 --- sceUsbAudioInGetMaxValueOfVolume :: proc(device_id: sce.UInt32, volume: ^sce.UInt32) -> sce.Int32 ---
/** /**
* Get usb audio device min volume * Get usb audio device min volume
@@ -72,7 +71,7 @@ foreign usbaudioin {
* *
* @note You should OpenDevice first to use this function * @note You should OpenDevice first to use this function
*/ */
GetMinValueOfVolume :: proc(device_id: sce.UInt32, volume: ^sce.UInt32) -> sce.Int32 --- sceUsbAudioInGetMinValueOfVolume :: proc(device_id: sce.UInt32, volume: ^sce.UInt32) -> sce.Int32 ---
/** /**
* Set usb audio device volume * Set usb audio device volume
@@ -84,7 +83,7 @@ foreign usbaudioin {
* *
* @note You should OpenDevice first to use this function * @note You should OpenDevice first to use this function
*/ */
SetCurrentValueOfVolume :: proc(device_id: sce.UInt32, volume: sce.UInt32) -> sce.Int32 --- sceUsbAudioInSetCurrentValueOfVolume :: proc(device_id: sce.UInt32, volume: sce.UInt32) -> sce.Int32 ---
/** /**
* Receive sound data from usb device * Receive sound data from usb device
@@ -97,5 +96,5 @@ foreign usbaudioin {
* @note You should call OpenDevice first to use this function * @note You should call OpenDevice first to use this function
* @note Data is in S16_MONO format. Granularity is 768 (thus buffer is 768*2) * @note Data is in S16_MONO format. Granularity is 768 (thus buffer is 768*2)
*/ */
Input :: proc(device_id: sce.UInt32, buffer: rawptr) -> sce.Int32 --- sceUsbAudioInInput :: proc(device_id: sce.UInt32, buffer: rawptr) -> sce.Int32 ---
} }
+7 -8
View File
@@ -6,7 +6,6 @@ import sce "../common"
foreign import usbserial "system:SceUsbSerial_stub" foreign import usbserial "system:SceUsbSerial_stub"
foreign import usbserialkern "system:SceUsbSerialForDriver_stub" foreign import usbserialkern "system:SceUsbSerialForDriver_stub"
@(link_prefix = "sceUsbSerial")
foreign usbserial { foreign usbserial {
/** /**
* Activate USB serial device * Activate USB serial device
@@ -17,7 +16,7 @@ foreign usbserial {
* *
* @note Wrapper for kernel function StartForDriver() * @note Wrapper for kernel function StartForDriver()
*/ */
Start :: proc() -> c.int --- sceUsbSerialStart :: proc() -> c.int ---
/** /**
* Setup USB serial device * Setup USB serial device
@@ -28,14 +27,14 @@ foreign usbserial {
* *
* @note Wrapper for kernel function SetupForDriver() * @note Wrapper for kernel function SetupForDriver()
*/ */
Setup :: proc(unk: c.int) -> c.int --- sceUsbSerialSetup :: proc(unk: c.int) -> c.int ---
/** /**
* Close USB serial device * Close USB serial device
* *
* @note Wrapper for kernel function CloseForDriver() * @note Wrapper for kernel function CloseForDriver()
*/ */
Close :: proc() -> c.int --- sceUsbSerialClose :: proc() -> c.int ---
/** /**
* Close USB serial device * Close USB serial device
@@ -44,7 +43,7 @@ foreign usbserial {
* *
* @note Wrapper for kernel function StatusForDriver() * @note Wrapper for kernel function StatusForDriver()
*/ */
Status :: proc() -> c.int --- sceUsbSerialStatus :: proc() -> c.int ---
/** /**
* Get receive buffer length * Get receive buffer length
@@ -53,7 +52,7 @@ foreign usbserial {
* *
* @note Wrapper for kernel function GetLenForDriver() * @note Wrapper for kernel function GetLenForDriver()
*/ */
GetRecvBufferSize :: proc() -> c.uint --- sceUsbSerialGetRecvBufferSize :: proc() -> c.uint ---
/** /**
* Send data * Send data
@@ -64,7 +63,7 @@ foreign usbserial {
* @note max send length is 0x10000 * @note max send length is 0x10000
* @note Wrapper for kernel function SendForDriver() * @note Wrapper for kernel function SendForDriver()
*/ */
Send :: proc(buffer: rawptr, len: c.uint, unk1: c.int, unk2: c.int) -> c.uint --- sceUsbSerialSend :: proc(buffer: rawptr, len: c.uint, unk1: c.int, unk2: c.int) -> c.uint ---
/** /**
* Receive Data * Receive Data
@@ -76,7 +75,7 @@ foreign usbserial {
* @note max recv length is 0x10000 * @note max recv length is 0x10000
* @note Wrapper for kernel function RecvForDriver() * @note Wrapper for kernel function RecvForDriver()
*/ */
Recv :: proc(buffer: rawptr, max_len: c.uint, unk1: c.int, unk2: c.int) -> c.uint --- sceUsbSerialRecv :: proc(buffer: rawptr, max_len: c.uint, unk1: c.int, unk2: c.int) -> c.uint ---
} }
foreign usbserialkern { foreign usbserialkern {
+2 -3
View File
@@ -13,7 +13,6 @@ SceUsbservErrorCode :: enum c.uint {
FATAL = 0x802480FF FATAL = 0x802480FF
} }
@(link_prefix = "sceUsbServ")
foreign usbserv { foreign usbserv {
/** /**
* Enable accessory port * Enable accessory port
@@ -21,7 +20,7 @@ foreign usbserv {
* @return 0 on success, < 0 on error * @return 0 on success, < 0 on error
* *
*/ */
AccessoryActivate :: proc() -> c.int --- sceUsbServAccessoryActivate :: proc() -> c.int ---
/** /**
* Disable accessory port * Disable accessory port
@@ -29,7 +28,7 @@ foreign usbserv {
* @return 0 on success, < 0 on error * @return 0 on success, < 0 on error
* *
*/ */
AccessoryDeactivate :: proc() -> c.int --- sceUsbServAccessoryDeactivate :: proc() -> c.int ---
} }
foreign usbservkern { foreign usbservkern {
+4 -5
View File
@@ -9,7 +9,6 @@ SceUsbstorVstorType :: enum c.int {
CDROM = 5 CDROM = 5
} }
@(link_prefix = "sceUsbstorVStor")
foreign usbstor { foreign usbstor {
/** /**
* Set image file path * Set image file path
@@ -18,7 +17,7 @@ foreign usbstor {
* *
* @return 0 on success, < 0 on error. * @return 0 on success, < 0 on error.
*/ */
SetImgFilePath :: proc(path: cstring) -> c.int --- sceUsbstorVStorSetImgFilePath :: proc(path: cstring) -> c.int ---
/** /**
* Set USB descriptor device information * Set USB descriptor device information
@@ -28,7 +27,7 @@ foreign usbstor {
* *
* @return 0 on success, < 0 on error. * @return 0 on success, < 0 on error.
*/ */
SetDeviceInfo :: proc(name: cstring, version: cstring) -> c.int --- sceUsbstorVStorSetDeviceInfo :: proc(name: cstring, version: cstring) -> c.int ---
/** /**
* Start USB virtual storage * Start USB virtual storage
@@ -37,12 +36,12 @@ foreign usbstor {
* *
* @return 0 on success, < 0 on error. * @return 0 on success, < 0 on error.
*/ */
Start :: proc(type: SceUsbstorVstorType) -> c.int --- sceUsbstorVStorStart :: proc(type: SceUsbstorVstorType) -> c.int ---
/** /**
* Stop USB virtual storage * Stop USB virtual storage
* *
* @return 0 on success, < 0 on error. * @return 0 on success, < 0 on error.
*/ */
Stop :: proc() -> c.int --- sceUsbstorVStorStop :: proc() -> c.int ---
} }
+23 -24
View File
@@ -6,7 +6,6 @@ import sce "../common"
foreign import usbd "system:SceUsbd_stub" foreign import usbd "system:SceUsbd_stub"
foreign import usbdkern "system:SceUsbdForDriver_stub" foreign import usbdkern "system:SceUsbdForDriver_stub"
@(link_prefix = "sceUsbd")
foreign usbd { foreign usbd {
/** /**
* Init usb subsystem * Init usb subsystem
@@ -16,7 +15,7 @@ foreign usbd {
* @param[out] uid Pointer to uid * @param[out] uid Pointer to uid
* *
*/ */
Init :: proc(uid: ^sce.UID) -> c.int --- sceUsbdInit :: proc(uid: ^sce.UID) -> c.int ---
/** /**
* Stop usb subsystem * Stop usb subsystem
@@ -26,7 +25,7 @@ foreign usbd {
* @param uid uid * @param uid uid
* *
*/ */
End :: proc(uid: sce.UID) -> c.int --- sceUsbdEnd :: proc(uid: sce.UID) -> c.int ---
/** /**
* Get usb devices list * Get usb devices list
@@ -38,7 +37,7 @@ foreign usbd {
* @param[out] info pointer to receive device info * @param[out] info pointer to receive device info
* *
*/ */
GetDeviceList :: proc(uid: sce.UID, num: sce.Size, info: ^SceUsbdDeviceInfo) -> c.int --- // 8 devices max sceUsbdGetDeviceList :: proc(uid: sce.UID, num: sce.Size, info: ^SceUsbdDeviceInfo) -> c.int --- // 8 devices max
/** /**
@@ -50,7 +49,7 @@ foreign usbd {
* @param device_id device id * @param device_id device id
* *
*/ */
GetDescriptorSize :: proc(uid: sce.UID, device_id: c.uint) -> c.int --- sceUsbdGetDescriptorSize :: proc(uid: sce.UID, device_id: c.uint) -> c.int ---
/** /**
* Get usb device descriptors (all) * Get usb device descriptors (all)
@@ -63,7 +62,7 @@ foreign usbd {
* @param[in] size buffer size * @param[in] size buffer size
* *
*/ */
GetDescriptor :: proc(uid: sce.UID, device_id: sce.UID, descriptor: ^c.uint, size: sce.Size) -> c.int --- sceUsbdGetDescriptor :: proc(uid: sce.UID, device_id: sce.UID, descriptor: ^c.uint, size: sce.Size) -> c.int ---
/** /**
@@ -76,7 +75,7 @@ foreign usbd {
* @param[out] speed device speed * @param[out] speed device speed
* *
*/ */
GetDeviceSpeed :: proc(uid: sce.UID, device_id: sce.UID, speed: ^c.uint) -> c.int --- sceUsbdGetDeviceSpeed :: proc(uid: sce.UID, device_id: sce.UID, speed: ^c.uint) -> c.int ---
/** /**
* Register callback to usb event * Register callback to usb event
@@ -90,7 +89,7 @@ foreign usbd {
* And it's currently taken up by shell. * And it's currently taken up by shell.
* *
*/ */
RegisterCallback :: proc(cbid: sce.UID, flag: c.int) -> c.int --- sceUsbdRegisterCallback :: proc(cbid: sce.UID, flag: c.int) -> c.int ---
/** /**
* Remove callback to usb event * Remove callback to usb event
@@ -102,7 +101,7 @@ foreign usbd {
* @note this checks process id * @note this checks process id
* *
*/ */
UnregisterCallback :: proc(cbid: sce.UID) -> c.int --- sceUsbdUnregisterCallback :: proc(cbid: sce.UID) -> c.int ---
/** /**
* Reset usb device * Reset usb device
@@ -113,7 +112,7 @@ foreign usbd {
* @param[in] device_id device id * @param[in] device_id device id
* *
*/ */
ResetDevice :: proc(uid: sce.UID, device_id: sce.UID) -> c.int --- sceUsbdResetDevice :: proc(uid: sce.UID, device_id: sce.UID) -> c.int ---
/** /**
* Attach specified driver to device * Attach specified driver to device
@@ -127,7 +126,7 @@ foreign usbd {
* *
* @note device_id = (bus << 16) + device * @note device_id = (bus << 16) + device
*/ */
Attach :: proc(uid: sce.UID, driver_id: sce.UID, bus: sce.UInt, device: sce.UInt) -> c.int --- sceUsbdAttach :: proc(uid: sce.UID, driver_id: sce.UID, bus: sce.UInt, device: sce.UInt) -> c.int ---
/** /**
* Get device address * Get device address
@@ -140,7 +139,7 @@ foreign usbd {
* *
* @note it is unknown what that function actually returns in addr, observed only 0 * @note it is unknown what that function actually returns in addr, observed only 0
*/ */
GetDeviceAddress :: proc(uid: sce.UID, device_id: sce.UID, addr: ^SceUsbdDeviceAddress) -> c.int --- sceUsbdGetDeviceAddress :: proc(uid: sce.UID, device_id: sce.UID, addr: ^SceUsbdDeviceAddress) -> c.int ---
/** /**
* Get transfer status * Get transfer status
@@ -152,7 +151,7 @@ foreign usbd {
* *
* @note it is unknown what that function actually returns in addr, observed only 0 * @note it is unknown what that function actually returns in addr, observed only 0
*/ */
GetTransferStatus :: proc(transfer_id: sce.UID, status: ^SceUsbdTransferStatus) -> c.int --- sceUsbdGetTransferStatus :: proc(transfer_id: sce.UID, status: ^SceUsbdTransferStatus) -> c.int ---
/** /**
* Get isochronous transfer status * Get isochronous transfer status
@@ -164,7 +163,7 @@ foreign usbd {
* *
* @note it is unknown what that function actually returns in addr, observed only 0 * @note it is unknown what that function actually returns in addr, observed only 0
*/ */
GetIsochTransferStatus :: proc(transfer_id: sce.UID, status: ^SceUsbdIsochTransferStatus) -> c.int --- sceUsbdGetIsochTransferStatus :: proc(transfer_id: sce.UID, status: ^SceUsbdIsochTransferStatus) -> c.int ---
/** /**
@@ -176,7 +175,7 @@ foreign usbd {
* @param[in] pipe endpoint to open * @param[in] pipe endpoint to open
* *
*/ */
OpenPipe :: proc(uid: sce.UID, pipe: ^SceUsbdDevicePipe) -> sce.UID --- sceUsbdOpenPipe :: proc(uid: sce.UID, pipe: ^SceUsbdDevicePipe) -> sce.UID ---
/** /**
* Open endpoint communication pipe for default config endpoint * Open endpoint communication pipe for default config endpoint
@@ -187,7 +186,7 @@ foreign usbd {
* @param[in] device_id device id * @param[in] device_id device id
* *
*/ */
OpenDefaultPipe :: proc(uid: sce.UID, device_id: sce.UID) -> sce.UID --- sceUsbdOpenDefaultPipe :: proc(uid: sce.UID, device_id: sce.UID) -> sce.UID ---
/** /**
* Close endpoint communication pipe * Close endpoint communication pipe
@@ -198,7 +197,7 @@ foreign usbd {
* @param[in] pipe_id pipe uid * @param[in] pipe_id pipe uid
* *
*/ */
ClosePipe :: proc(uid: sce.UID, pipe_id: sce.UID) -> c.int --- sceUsbdClosePipe :: proc(uid: sce.UID, pipe_id: sce.UID) -> c.int ---
/** /**
* Transfer data to/from endpoint * Transfer data to/from endpoint
@@ -209,7 +208,7 @@ foreign usbd {
* @param[in] data data to transfer * @param[in] data data to transfer
* *
*/ */
TransferData :: proc(uid: sce.UID, data: ^SceUsbdTransferData) -> sce.UID --- sceUsbdTransferData :: proc(uid: sce.UID, data: ^SceUsbdTransferData) -> sce.UID ---
/** /**
* Transfer data to/from endpoint isochronously * Transfer data to/from endpoint isochronously
@@ -221,7 +220,7 @@ foreign usbd {
* @param[in] transfer data to transfer * @param[in] transfer data to transfer
* *
*/ */
IsochTransferData :: proc(uid: sce.UID, pipe_id: sce.UID, transfer: ^SceUsbdIsochTransfer) -> c.int --- sceUsbdIsochTransferData :: proc(uid: sce.UID, pipe_id: sce.UID, transfer: ^SceUsbdIsochTransfer) -> c.int ---
/** /**
* Receive usb event * Receive usb event
@@ -232,7 +231,7 @@ foreign usbd {
* @param[out] event * @param[out] event
* *
*/ */
ReceiveEvent :: proc(uid: sce.UID, event: ^SceUsbdReceiveEvent) -> c.int --- sceUsbdReceiveEvent :: proc(uid: sce.UID, event: ^SceUsbdReceiveEvent) -> c.int ---
/** /**
* Register logical device driver * Register logical device driver
@@ -243,7 +242,7 @@ foreign usbd {
* @param[in] name driver name, 255 max * @param[in] name driver name, 255 max
* *
*/ */
RegisterLdd :: proc(uid: sce.UID, name: cstring) -> sce.UID --- sceUsbdRegisterLdd :: proc(uid: sce.UID, name: cstring) -> sce.UID ---
/** /**
* Register logical device driver for composite devices * Register logical device driver for composite devices
@@ -254,7 +253,7 @@ foreign usbd {
* @param[in] name driver name, 255 max * @param[in] name driver name, 255 max
* *
*/ */
RegisterCompositeLdd :: proc(uid: sce.UID, name: cstring) -> sce.UID --- sceUsbdRegisterCompositeLdd :: proc(uid: sce.UID, name: cstring) -> sce.UID ---
/** /**
* De-register logical device driver * De-register logical device driver
@@ -265,7 +264,7 @@ foreign usbd {
* @param[in] name driver name, 255 max * @param[in] name driver name, 255 max
* *
*/ */
UnregisterLdd :: proc(uid: sce.UID, name: cstring) -> c.int --- sceUsbdUnregisterLdd :: proc(uid: sce.UID, name: cstring) -> c.int ---
/** /**
* Attach composite driver to device * Attach composite driver to device
@@ -276,7 +275,7 @@ foreign usbd {
* @param[in] param parameters * @param[in] param parameters
* *
*/ */
AttachCompositeLdd :: proc(uid: sce.UID, param: ^SceUsbdAttachCompositeParam) -> c.int --- sceUsbdAttachCompositeLdd :: proc(uid: sce.UID, param: ^SceUsbdAttachCompositeParam) -> c.int ---
} }
foreign usbdkern { foreign usbdkern {
+1 -2
View File
@@ -16,7 +16,6 @@ VideoExportOutputParam :: struct {
} }
#assert(size_of(VideoExportOutputParam) == 0x408) #assert(size_of(VideoExportOutputParam) == 0x408)
@(link_prefix = "sceVideoExport")
foreign videoexport { foreign videoexport {
/** /**
* Export video file * Export video file
@@ -32,7 +31,7 @@ foreign videoexport {
* *
* @return 0 on success, < 0 on error. * @return 0 on success, < 0 on error.
*/ */
FromFile :: proc( sceVideoExportFromFile :: proc(
#by_ptr in_param: VideoExportInputParam, #by_ptr in_param: VideoExportInputParam,
unk: c.int, unk: c.int,
workingMemory: rawptr, workingMemory: rawptr,