SceCtrl

From Vita Development Wiki
Jump to navigation Jump to search

Module

Version World Privilege
1.69-3.65 Non-secure Kernel

Libraries

Known NIDs

Version Name World Visibility NID
1.69 SceCtrlForDriver Non-secure Kernel 0x7823A5D1
1.69 SceCtrl Non-secure User 0xD197E3C7

SceCtrlForDriver

sceCtrlRegisterVirtualControllerDriverForDriver

Version NID
3.60 0x18823EEA
typedef struct SceCtrlVirtualControllerDriver {
	int (*readButtons)(int port, SceCtrlData *pad_data, int count);
	int (*setActuator)(int port, const SceCtrlActuator* pState);
	int (*getBatteryInfo)(int port, SceUInt8 *batt);
	int (*disconnect)(int port);
	int (*setTurnOffInterval)(int port);
	int (*getActiveControllerPort)(void);
	int (*changePortAssign)(int port1, int port2);
	int (*unk0)(void); // SceCtrlForDriver_69E45836 equivalent
	int (*getControllerPortInfo)(SceCtrlPortInfo *info);
	int (*setLightBar)(int port, SceUInt8 r, SceUInt8 g, SceUInt8 b);
	int (*resetLightBar)(int port);
	int (*unk1)(int pid); // sceCtrlSetActiveProcessForDriver equivalent
	int (*singleControllerMode)(int port);
} SceCtrlVirtualControllerDriver; /* size 0x34 */
int sceCtrlRegisterVirtualControllerDriverForDriver(SceCtrlVirtualControllerDriver *driver);

On the PSTV, the SceDS3 module calls this function to register the DS3/DS4 USB/Bluetooth driver. Only one virtual controller driver can be registered (the new one replaces the previous one).

sceCtrlSetActiveProcessForDriver

Version NID
0.990-3.60 0xB26C2231
int sceCtrlSetActiveProcessForDriver(SceUID pid);

sceCtrlUpdateMaskForNonShellForDriver

Version NID
3.60 0x03777131
int sceCtrlUpdateMaskForNonShellForDriver(int clear_mask, int set_mask);

sceCtrlUpdateMaskForAllForDriver

Version NID
3.60 0x12C13A72
int sceCtrlUpdateMaskForAllForDriver(int clear_mask, int set_mask);

sceCtrlGetMaskForNonShellForDriver

Version NID
3.60 0xB25BD8FD
int sceCtrlGetMaskForNonShellForDriver(uint32_t *mask);

sceCtrlGetMaskForAllForDriver

Version NID
3.60 0x46ABDDE8
int sceCtrlGetMaskForAllForDriver(uint32_t *mask);

SceCtrlForDriver_FF9D4DD4

Version NID
3.60 0xFF9D4DD4

Register some callback and get current hold button

Using by ScePower

/*
 * param[in]  some_button - The SceCtrlButtons type value
 * param[in]  cb          - The callback function pointer
 * param[in]  a2          - Unknown, set zero
 * param[out] button      - The current hold button
 */

int SceCtrlForDriver_FF9D4DD4(int some_button, const void *cb, int a2, uint32_t *button)

sceCtrlGetCurrentProcessidForDriver

Version NID
3.60 0xDA07E970
int sceCtrlGetCurrentProcessidForDriver(SceUID *pid);

Unknown functions

         SceCtrlForDriver_02081494: 0x02081494
         SceCtrlForDriver_4CCB2153: 0x4CCB2153
         SceCtrlForDriver_5B708A15: 0x5B708A15
         SceCtrlForDriver_69E45836: 0x69E45836
         SceCtrlForDriver_C8CE3E43: 0xC8CE3E43

SceCtrl

sceCtrlPeekBufferNegative

Version NID
1.69 0x104ED1A7

sceCtrlReadBufferNegative

Version NID
1.69 0x15F96FB0

sceCtrlSetButtonIntercept

Version NID
1.69 0x433D71F4

sceCtrlReadBufferPositive

Version NID
1.69 0x67E7AB83

sceCtrlGetButtonIntercept

Version NID
1.69 0x6FAFAD05

sceCtrlSetSamplingMode

Version NID
1.69 0xA497B150

sceCtrlPeekBufferPositiveExt

Version NID
1.69 0xA59454D3

sceCtrlPeekBufferPositive

Version NID
1.69 0xA9C3CED6

sceCtrlSetSamplingModeExt

Version NID
1.69 0xB1DC4378

sceCtrlGetSamplingModeExt

Version NID
1.69 0xBD27F830

sceCtrlClearRapidFire

Version NID
1.69 0xD8294C9C

sceCtrlReadBufferPositiveExt

Version NID
1.69 0xE2D99296

sceCtrlSetRapidFire

Version NID
1.69 0xE9CB69C8

sceCtrlGetSamplingMode

Version NID
1.69 0xEC752AAF