vitasdk
Documentation of the vitasdk

Detailed Description

Exports for Kernel.


Using this library in your project

Include the header file in your project:




Using this library in your project

Include the header file in your project:


Link the library to the executable:

SceDisplayForDriver_stub



Functions

 VITASDK_BUILD_ASSERT_EQ (4, SceDisplayErrorCode)
 
 VITASDK_BUILD_ASSERT_EQ (4, SceDisplayPixelFormat)
 
 VITASDK_BUILD_ASSERT_EQ (4, SceDisplaySetBufSync)
 
 VITASDK_BUILD_ASSERT_EQ (0x18, SceDisplayFrameBuf)
 
 VITASDK_BUILD_ASSERT_EQ (0x2C, SceDisplayFrameBufInfo)
 
int ksceDisplaySetFrameBuf (const SceDisplayFrameBuf *pParam, int sync)
 Set/Update framebuffer parameters. More...
 
int ksceDisplaySetFrameBufInternal (int head, int index, const SceDisplayFrameBuf *pParam, int sync)
 Set/Update framebuffer parameters for display. More...
 
int ksceDisplayGetFrameBuf (SceDisplayFrameBuf *pParam, int sync)
 Get current framebuffer parameters. More...
 
int ksceDisplayGetProcFrameBufInternal (SceUID pid, int head, int index, SceDisplayFrameBufInfo *info)
 Get the configured framebuffer information of a head and its framebuffer index for a PID. More...
 
int ksceDisplayGetMaximumFrameBufResolution (int *width, int *height)
 Get maximum framebuffer resolution. More...
 
int ksceDisplayGetPrimaryHead (void)
 Primary display index. More...
 
int ksceDisplayGetVcountInternal (int display)
 Number of vertical blank pulses up to now for a display. More...
 
int ksceDisplayWaitVblankStart (void)
 Wait for vertical blank start. More...
 
int ksceDisplayWaitVblankStartInternal (int display)
 Wait for vertical blank start for display. More...
 
int ksceDisplayWaitVblankStartCB (void)
 Wait for vertical blank start with callback. More...
 
int ksceDisplayWaitVblankStartCBInternal (int display)
 Wait for vertical blank start with callback for display. More...
 
int ksceDisplayWaitVblankStartMulti (unsigned int vcount)
 Wait for vertical blank start after specified number of vertical periods. More...
 
int ksceDisplayWaitVblankStartMultiInternal (int display, unsigned int vcount)
 Wait for vertical blank start after specified number of vertical periods for display. More...
 
int ksceDisplayWaitVblankStartMultiCB (unsigned int vcount)
 Wait for vertical blank start with callback after specified number of vertical periods. More...
 
int ksceDisplayWaitVblankStartMultiCBInternal (int display, unsigned int vcount)
 Wait for vertical blank start with callback after specified number of vertical periods for display. More...
 
int ksceDisplayWaitSetFrameBuf (void)
 Wait for vertical blank start since last update of framebuffer. More...
 
int ksceDisplayWaitSetFrameBufCB (void)
 Wait for vertical blank start with callback since last update of framebuffer. More...
 
int ksceDisplayWaitSetFrameBufMulti (unsigned int vcount)
 Wait for vertical blank start after specified number of vertical periods since last update of framebuffer. More...
 
int ksceDisplayWaitSetFrameBufMultiCB (unsigned int vcount)
 Wait for vertical blank start with callback after specified number of vertical periods since last update of framebuffer. More...
 
int ksceDisplayRegisterVblankStartCallback (SceUID uid)
 Register callback to be used at each vertical blank start. More...
 
int ksceDisplayRegisterVblankStartCallbackInternal (int display, SceUID uid)
 Register callback to be used at each vertical blank start for a display. More...
 
int ksceDisplayUnregisterVblankStartCallback (SceUID uid)
 Unregister callback used at each vertical blank start. More...
 
int ksceDisplayUnregisterVblankStartCallbackInternal (int display, SceUID uid)
 Unregister callback used at each vertical blank start for a display. More...
 
int ksceDisplayRegisterFrameBufCallback (SceUID uid)
 Register callback to be used when the framebuffer changes. More...
 
int ksceDisplayRegisterFrameBufCallbackInternal (int display, SceUID uid)
 Register callback to be used when the framebuffer changes for a display. More...
 
int ksceDisplaySetInvertColors (int display, int enable)
 Enable/disable color inversion for a display. More...
 
int ksceDisplaySetOwner (int head, int index, SceUID pid)
 Set display plane owner. More...
 

Data Structure Documentation

◆ SceDisplayFrameBuf

struct SceDisplayFrameBuf

Structure used with ksceDisplaySetFrameBuf to set/update framebuffer.

Original screen resolution is 960x544, but the following resolutions can also be supplied as width and height : 480x272, 640x368, 720x408

Note
- This structure is returned by ksceDisplayGetFrameBuf
Data Fields
SceSize size sizeof(SceDisplayFrameBuf)
void * base Pointer to framebuffer.
unsigned int pitch pitch pixels
unsigned int pixelformat pixel format (one of SceDisplayPixelFormat)
unsigned int width framebuffer width
unsigned int height framebuffer height

◆ SceDisplayFrameBufInfo

struct SceDisplayFrameBufInfo

Extended framebuffer information.

Data Fields
SceSize size sizeof(SceDisplayFrameBufInfo)
SceUID pid PID of the process owning this framebuffer.
unsigned int vblankcount Amount of VBlanks this framebuffer has been displayed.
uintptr_t paddr Physical address.
SceDisplayFrameBuf framebuf SceDisplayFrameBuf information.
unsigned int resolution Resolution.

Enumeration Type Documentation

◆ SceDisplayErrorCode

Enumerator
SCE_DISPLAY_ERROR_OK 
SCE_DISPLAY_ERROR_INVALID_HEAD 
SCE_DISPLAY_ERROR_INVALID_VALUE 
SCE_DISPLAY_ERROR_INVALID_ADDR 
SCE_DISPLAY_ERROR_INVALID_PIXELFORMAT 
SCE_DISPLAY_ERROR_INVALID_PITCH 
SCE_DISPLAY_ERROR_INVALID_RESOLUTION 
SCE_DISPLAY_ERROR_INVALID_UPDATETIMING 
SCE_DISPLAY_ERROR_NO_FRAME_BUFFER 
SCE_DISPLAY_ERROR_NO_PIXEL_DATA 
SCE_DISPLAY_ERROR_NO_OUTPUT_SIGNAL 

◆ SceDisplayPixelFormat

Enumerator
SCE_DISPLAY_PIXELFORMAT_A8B8G8R8 
SCE_DISPLAY_PIXELFORMAT_A2B10G10R10 

◆ SceDisplaySetBufSync

Enumerator
SCE_DISPLAY_SETBUF_IMMEDIATE 

Buffer change effective immediately.

SCE_DISPLAY_SETBUF_NEXTFRAME 

Buffer change effective next frame.

__SCE_DISPLAY_SETBUF 

Function Documentation

◆ VITASDK_BUILD_ASSERT_EQ() [1/5]

VITASDK_BUILD_ASSERT_EQ ( ,
SceDisplayErrorCode   
)

◆ VITASDK_BUILD_ASSERT_EQ() [2/5]

VITASDK_BUILD_ASSERT_EQ ( ,
SceDisplayPixelFormat   
)

◆ VITASDK_BUILD_ASSERT_EQ() [3/5]

VITASDK_BUILD_ASSERT_EQ ( ,
SceDisplaySetBufSync   
)

◆ VITASDK_BUILD_ASSERT_EQ() [4/5]

VITASDK_BUILD_ASSERT_EQ ( 0x18  ,
SceDisplayFrameBuf   
)

◆ VITASDK_BUILD_ASSERT_EQ() [5/5]

VITASDK_BUILD_ASSERT_EQ ( 0x2C  ,
SceDisplayFrameBufInfo   
)

◆ ksceDisplaySetFrameBuf()

int ksceDisplaySetFrameBuf ( const SceDisplayFrameBuf pParam,
int  sync 
)

Set/Update framebuffer parameters.

Parameters
[in]pParam- Pointer to a SceDisplayFrameBuf structure.
[in]sync- One of ::DisplaySetBufSync
Returns
0 on success, < 0 on error.
Note
- If NULL is provided as pParam pointer, output is blacked out.

◆ ksceDisplaySetFrameBufInternal()

int ksceDisplaySetFrameBufInternal ( int  head,
int  index,
const SceDisplayFrameBuf pParam,
int  sync 
)

Set/Update framebuffer parameters for display.

Parameters
[in]head- Use 0 for OLED/LCD and 1 for HDMI
[in]index- Can be 0 or 1
[in]pParam- Pointer to a SceDisplayFrameBuf structure.
[in]sync- One of ::DisplaySetBufSync
Returns
0 on success, < 0 on error.
Note
- If NULL is provided as pParam pointer, output is blacked out.

◆ ksceDisplayGetFrameBuf()

int ksceDisplayGetFrameBuf ( SceDisplayFrameBuf pParam,
int  sync 
)

Get current framebuffer parameters.

Parameters
[out]pParam- Pointer to a SceDisplayFrameBuf structure which will receive framebuffer parameters.
[in]sync- One of ::DisplaySetBufSync
Returns
0 on success, < 0 on error.

◆ ksceDisplayGetProcFrameBufInternal()

int ksceDisplayGetProcFrameBufInternal ( SceUID  pid,
int  head,
int  index,
SceDisplayFrameBufInfo info 
)

Get the configured framebuffer information of a head and its framebuffer index for a PID.

Parameters
[in]pid- PID of the process to get the framebuffer information from. It can either be a vallid PID, -1 to use the current configured framebuffer for the head and index, or 0 to use the PID of the caller.
[in]head- Use 0 for OLED/LCD and 1 for HDMI
[in]index- Can be 0 or 1
[out]info- Pointer to a SceDisplayFrameBufInfo structure which will receive the framebuffer information.
Returns
0 on success, < 0 on error.

◆ ksceDisplayGetMaximumFrameBufResolution()

int ksceDisplayGetMaximumFrameBufResolution ( int *  width,
int *  height 
)

Get maximum framebuffer resolution.

Parameters
[out]width- Maximum width
[out]height- Maximum height
Returns
0 on success, < 0 on error.

◆ ksceDisplayGetPrimaryHead()

int ksceDisplayGetPrimaryHead ( void  )

Primary display index.

◆ ksceDisplayGetVcountInternal()

int ksceDisplayGetVcountInternal ( int  display)

Number of vertical blank pulses up to now for a display.

Parameters
[in]display- Display index

◆ ksceDisplayWaitVblankStart()

int ksceDisplayWaitVblankStart ( void  )

Wait for vertical blank start.

◆ ksceDisplayWaitVblankStartInternal()

int ksceDisplayWaitVblankStartInternal ( int  display)

Wait for vertical blank start for display.

Parameters
[in]display- Display index

◆ ksceDisplayWaitVblankStartCB()

int ksceDisplayWaitVblankStartCB ( void  )

Wait for vertical blank start with callback.

◆ ksceDisplayWaitVblankStartCBInternal()

int ksceDisplayWaitVblankStartCBInternal ( int  display)

Wait for vertical blank start with callback for display.

Parameters
[in]display- Display index

◆ ksceDisplayWaitVblankStartMulti()

int ksceDisplayWaitVblankStartMulti ( unsigned int  vcount)

Wait for vertical blank start after specified number of vertical periods.

Parameters
[in]vcount- Number of vertical periods before waiting for vertical blank start

◆ ksceDisplayWaitVblankStartMultiInternal()

int ksceDisplayWaitVblankStartMultiInternal ( int  display,
unsigned int  vcount 
)

Wait for vertical blank start after specified number of vertical periods for display.

Parameters
[in]display- Display index
[in]vcount- Number of vertical periods before waiting for vertical blank start

◆ ksceDisplayWaitVblankStartMultiCB()

int ksceDisplayWaitVblankStartMultiCB ( unsigned int  vcount)

Wait for vertical blank start with callback after specified number of vertical periods.

Parameters
[in]vcount- Number of vertical periods before waiting for vertical blank start

◆ ksceDisplayWaitVblankStartMultiCBInternal()

int ksceDisplayWaitVblankStartMultiCBInternal ( int  display,
unsigned int  vcount 
)

Wait for vertical blank start with callback after specified number of vertical periods for display.

Parameters
[in]display- Display index
[in]vcount- Number of vertical periods before waiting for vertical blank start

◆ ksceDisplayWaitSetFrameBuf()

int ksceDisplayWaitSetFrameBuf ( void  )

Wait for vertical blank start since last update of framebuffer.

◆ ksceDisplayWaitSetFrameBufCB()

int ksceDisplayWaitSetFrameBufCB ( void  )

Wait for vertical blank start with callback since last update of framebuffer.

◆ ksceDisplayWaitSetFrameBufMulti()

int ksceDisplayWaitSetFrameBufMulti ( unsigned int  vcount)

Wait for vertical blank start after specified number of vertical periods since last update of framebuffer.

Parameters
[in]vcount- Number of vertical periods before waiting for vertical blank start

◆ ksceDisplayWaitSetFrameBufMultiCB()

int ksceDisplayWaitSetFrameBufMultiCB ( unsigned int  vcount)

Wait for vertical blank start with callback after specified number of vertical periods since last update of framebuffer.

Parameters
[in]vcount- Number of vertical periods before waiting for vertical blank start

◆ ksceDisplayRegisterVblankStartCallback()

int ksceDisplayRegisterVblankStartCallback ( SceUID  uid)

Register callback to be used at each vertical blank start.

Parameters
[in]uid- Callback UID

◆ ksceDisplayRegisterVblankStartCallbackInternal()

int ksceDisplayRegisterVblankStartCallbackInternal ( int  display,
SceUID  uid 
)

Register callback to be used at each vertical blank start for a display.

Parameters
[in]display- Display index
[in]uid- Callback UID

◆ ksceDisplayUnregisterVblankStartCallback()

int ksceDisplayUnregisterVblankStartCallback ( SceUID  uid)

Unregister callback used at each vertical blank start.

Parameters
[in]uid- Callback UID

◆ ksceDisplayUnregisterVblankStartCallbackInternal()

int ksceDisplayUnregisterVblankStartCallbackInternal ( int  display,
SceUID  uid 
)

Unregister callback used at each vertical blank start for a display.

Parameters
[in]display- Display index
[in]uid- Callback UID

◆ ksceDisplayRegisterFrameBufCallback()

int ksceDisplayRegisterFrameBufCallback ( SceUID  uid)

Register callback to be used when the framebuffer changes.

Parameters
[in]uid- Callback UID

◆ ksceDisplayRegisterFrameBufCallbackInternal()

int ksceDisplayRegisterFrameBufCallbackInternal ( int  display,
SceUID  uid 
)

Register callback to be used when the framebuffer changes for a display.

Parameters
[in]display- Display index
[in]uid- Callback UID

◆ ksceDisplaySetInvertColors()

int ksceDisplaySetInvertColors ( int  display,
int  enable 
)

Enable/disable color inversion for a display.

Parameters
[in]display- Display index
[in]enable- Enable/disable color inversion

◆ ksceDisplaySetOwner()

int ksceDisplaySetOwner ( int  head,
int  index,
SceUID  pid 
)

Set display plane owner.

Parameters
[in]head- Use 0 for OLED/LCD and 1 for HDMI
[in]index- Can be 0 or 1
[in]pid- PID of the new owner
Returns
0 on success, < 0 on error.