vitasdk
Documentation of the vitasdk

Detailed Description

Exports for User.


Using this library in your project

Include the header file in your project:


Link the library to the executable:

SceCompat_stub



Functions

 VITASDK_BUILD_ASSERT_EQ (8, SceCompatCdram)
 
 VITASDK_BUILD_ASSERT_EQ (0x10, SceCtrlDataPsp)
 
int sceCompatInitEx (int unk)
 Init compat. More...
 
int sceCompatUninit (void)
 Uninit compat. More...
 
int sceCompatStart (void)
 Start compat. More...
 
int sceCompatStop (void)
 Stop compat. More...
 
int sceCompatAllocCdramWithHole (SceCompatCdram *cdram)
 Allocate cdram with hole. More...
 
int sceCompatFrameBufferInit (void *framebuffer)
 Framebuffer init. More...
 
int sceCompatSetSuspendSema (SceUID semaid1, SceUID semaid2)
 Set suspend semaphores. More...
 
int sceCompatSuspendResume (int unk)
 Suspend/resume compat. More...
 
int sceCompatCache (int mode, void *addr, SceSize size)
 Cache operation. More...
 
int sceCompatWaitSpecialRequest (int unk)
 Wait for special request. More...
 
int sceCompatInterrupt (int intr_code)
 Interrupt code. More...
 
int sceCompatLCDCSync (void)
 LCDC sync. More...
 
int sceCompatGetPrimaryHead (void)
 Get primary head. More...
 
int sceCompatGetPeripheralState (int mode)
 Get peripheral state. More...
 
int sceCompatGetStatus (void)
 Get compat status. More...
 
int sceCompatGetUpdateState (void)
 Get update state. More...
 
int sceCompatSetUpdateState (int state)
 Set update state. More...
 
int sceCompatSetDisplayConfig (int unk0, int unk1)
 Set display config. More...
 
int sceCompatSetRif (const char *rif)
 Set RIF name. More...
 
int sceCompatGetPspSystemSoftwareVersion (void)
 Get PSP system software version. More...
 
int sceCompatAvailableColorSpaceSetting (void)
 Get color space setting availability. More...
 
int sceCompatCheckPocketStation (void)
 Check if pocket station application is available. More...
 
int sceCompatIsPocketStationTitle (void)
 Check if current title is a pocket station game. More...
 
int sceCompatWaitAndGetRequest (int mode, int id)
 Wait for command and get request. More...
 
int sceCompatReadShared32 (int location, int *value)
 Read from shared sram. More...
 
int sceCompatWriteShared32 (int location, int value)
 Write to shared sram. More...
 
int sceCompatWriteSharedCtrl (SceCtrlDataPsp *pad_data)
 Write shared control. More...
 
int sceCompatGetTitleList (void *buf, SceSize length)
 Get title list. More...
 
int sceCompatGetDevInf (SceIoDevInfo *info)
 Get Memory Card device information. More...
 
int sceCompatGetCurrentSecureTick (SceRtcTick *tick)
 Get current secure tick. More...
 

Data Structure Documentation

◆ SceCompatCdram

struct SceCompatCdram
Data Fields
void * cached_cdram
void * uncached_cdram

◆ SceCtrlDataPsp

struct SceCtrlDataPsp
Data Fields
unsigned int TimeStamp
unsigned int Buttons
unsigned char Lx
unsigned char Ly
unsigned char Rx
unsigned char Ry
unsigned char Rsrv[4]

Enumeration Type Documentation

◆ SceCompatCacheMode

Enumerator
SCE_COMPAT_CACHE_NONE 
SCE_COMPAT_CACHE_INVALIDATE 
SCE_COMPAT_CACHE_WRITEBACK 

◆ SceCompatPeripheralMode

Enumerator
SCE_COMPAT_PERIPHERAL_POWER_IS_SUSPEND_REQUIRED 
SCE_COMPAT_PERIPHERAL_POWER_GET_BATTERY_LIFETIME 
SCE_COMPAT_PERIPHERAL_POWER_GET_BATTERY_PERCENT 
SCE_COMPAT_PERIPHERAL_HPREMOTE_IS_HEADPHONE_EXIST 

Function Documentation

◆ VITASDK_BUILD_ASSERT_EQ() [1/2]

VITASDK_BUILD_ASSERT_EQ ( ,
SceCompatCdram   
)

◆ VITASDK_BUILD_ASSERT_EQ() [2/2]

VITASDK_BUILD_ASSERT_EQ ( 0x10  ,
SceCtrlDataPsp   
)

◆ sceCompatInitEx()

int sceCompatInitEx ( int  unk)

Init compat.

Parameters
[in]unk- Unknown, pass 0
Returns
0 on success, < 0 on error.

◆ sceCompatUninit()

int sceCompatUninit ( void  )

Uninit compat.

Returns
0 on success, < 0 on error.

◆ sceCompatStart()

int sceCompatStart ( void  )

Start compat.

Returns
0 on success, < 0 on error.

◆ sceCompatStop()

int sceCompatStop ( void  )

Stop compat.

Returns
0 on success, < 0 on error.

◆ sceCompatAllocCdramWithHole()

int sceCompatAllocCdramWithHole ( SceCompatCdram cdram)

Allocate cdram with hole.

Parameters
[out]cdram- A pointer to a SceCompatCdram structure.
Returns
0 on success, < 0 on error.

◆ sceCompatFrameBufferInit()

int sceCompatFrameBufferInit ( void *  framebuffer)

Framebuffer init.

Parameters
[in]framebuffer- Pointer to framebuffer
Returns
0 on success, < 0 on error.

◆ sceCompatSetSuspendSema()

int sceCompatSetSuspendSema ( SceUID  semaid1,
SceUID  semaid2 
)

Set suspend semaphores.

Parameters
[in]semaid1- Semaphore id 1
[in]semaid2- Semaphore id 2
Returns
0 on success, < 0 on error.

◆ sceCompatSuspendResume()

int sceCompatSuspendResume ( int  unk)

Suspend/resume compat.

Parameters
[in]unk- Unknown, pass 1
Returns
0 on success, < 0 on error.

◆ sceCompatCache()

int sceCompatCache ( int  mode,
void *  addr,
SceSize  size 
)

Cache operation.

Parameters
[in]mode- One of SceCompatCacheMode
[in]addr- Address
[in]size- Size
Returns
0 on success, < 0 on error.

◆ sceCompatWaitSpecialRequest()

int sceCompatWaitSpecialRequest ( int  unk)

Wait for special request.

Parameters
[in]unk- Unknown, pass 1
Returns
0 on success, < 0 on error.

◆ sceCompatInterrupt()

int sceCompatInterrupt ( int  intr_code)

Interrupt code.

Parameters
[in]intr_code- Interrupt code
Returns
0 on success, < 0 on error.

◆ sceCompatLCDCSync()

int sceCompatLCDCSync ( void  )

LCDC sync.

Returns
0 on success, < 0 on error.

◆ sceCompatGetPrimaryHead()

int sceCompatGetPrimaryHead ( void  )

Get primary head.

Returns
0 on success, < 0 on error.

◆ sceCompatGetPeripheralState()

int sceCompatGetPeripheralState ( int  mode)

Get peripheral state.

Parameters
[in]mode- One of SceCompatPeripheralMode
Returns
state on success, < 0 on error.

◆ sceCompatGetStatus()

int sceCompatGetStatus ( void  )

Get compat status.

Returns
status on success, < 0 on error.

◆ sceCompatGetUpdateState()

int sceCompatGetUpdateState ( void  )

Get update state.

Returns
state on success, < 0 on error.

◆ sceCompatSetUpdateState()

int sceCompatSetUpdateState ( int  state)

Set update state.

Parameters
[in]state- State
Returns
0 on success, < 0 on error.

◆ sceCompatSetDisplayConfig()

int sceCompatSetDisplayConfig ( int  unk0,
int  unk1 
)

Set display config.

Parameters
[in]unk0- Unknown
[in]unk1- Unknown
Returns
0 on success, < 0 on error.

◆ sceCompatSetRif()

int sceCompatSetRif ( const char *  rif)

Set RIF name.

Parameters
[in]rif- RIF name (max. 36 chars)
Returns
0 on success, < 0 on error.

◆ sceCompatGetPspSystemSoftwareVersion()

int sceCompatGetPspSystemSoftwareVersion ( void  )

Get PSP system software version.

Returns
version on success, < 0 on error.

◆ sceCompatAvailableColorSpaceSetting()

int sceCompatAvailableColorSpaceSetting ( void  )

Get color space setting availability.

Returns
1 if true, 0 if false, < 0 on error.

◆ sceCompatCheckPocketStation()

int sceCompatCheckPocketStation ( void  )

Check if pocket station application is available.

Returns
1 if true, 0 if false, < 0 on error.

◆ sceCompatIsPocketStationTitle()

int sceCompatIsPocketStationTitle ( void  )

Check if current title is a pocket station game.

Returns
1 if true, 0 if false, < 0 on error.

◆ sceCompatWaitAndGetRequest()

int sceCompatWaitAndGetRequest ( int  mode,
int  id 
)

Wait for command and get request.

Parameters
[in]mode- Mode
[in]id- ID
Returns
pointer to request in PspEmu RAM on success, < 0 on error.

◆ sceCompatReadShared32()

int sceCompatReadShared32 ( int  location,
int *  value 
)

Read from shared sram.

Parameters
[in]location- Location
[out]value- Pointer to a int buffer to hold the value
Returns
0 on success, < 0 on error.

◆ sceCompatWriteShared32()

int sceCompatWriteShared32 ( int  location,
int  value 
)

Write to shared sram.

Parameters
[in]location- Location
[in]value- Value
Returns
0 on success, < 0 on error.

◆ sceCompatWriteSharedCtrl()

int sceCompatWriteSharedCtrl ( SceCtrlDataPsp pad_data)

Write shared control.

Parameters
[in]info- A pointer to a SceCtrlDataPsp structure.
Returns
0 on success, < 0 on error.

◆ sceCompatGetTitleList()

int sceCompatGetTitleList ( void *  buf,
SceSize  length 
)

Get title list.

Parameters
[out]buf- A 100 bytes buffer for the title list
[in]length- Must be 100
Returns
0 on success, < 0 on error.

◆ sceCompatGetDevInf()

int sceCompatGetDevInf ( SceIoDevInfo info)

Get Memory Card device information.

Parameters
[out]info- A pointer to a SceIoDevInfo structure.
Returns
0 on success, < 0 on error.

◆ sceCompatGetCurrentSecureTick()

int sceCompatGetCurrentSecureTick ( SceRtcTick tick)

Get current secure tick.

Parameters
[out]tick- A pointer to a SceRtcTick structure.
Returns
0 on success, < 0 on error.