PSP2SDK  dirty-f9e4f2d
The free SDK for PSP2
Data Structures | Defines | Typedefs | Enumerations | Functions
include/psp2/display.h File Reference

Header file which defines display related variables and functions. More...

#include <psp2/types.h>
Include dependency graph for display.h:

Go to the source code of this file.

Data Structures

struct  SceDisplayFrameBuf

Defines

#define PSP2_DISPLAY_PIXELFORMAT_A8B8G8R8   0x00000000U

Typedefs

typedef struct SceDisplayFrameBuf SceDisplayFrameBuf

Enumerations

enum  {
  SCE_DISPLAY_ERROR_OK = 0, SCE_DISPLAY_ERROR_INVALID_HEAD = 0x80290000, SCE_DISPLAY_ERROR_INVALID_VALUE = 0x80290001, SCE_DISPLAY_ERROR_INVALID_ADDR = 0x80290002,
  SCE_DISPLAY_ERROR_INVALID_PIXELFORMAT = 0x80290003, SCE_DISPLAY_ERROR_INVALID_PITCH = 0x80290004, SCE_DISPLAY_ERROR_INVALID_RESOLUTION = 0x80290005, SCE_DISPLAY_ERROR_INVALID_UPDATETIMING = 0x80290006,
  SCE_DISPLAY_ERROR_NO_FRAME_BUFFER = 0x80290007, SCE_DISPLAY_ERROR_NO_PIXEL_DATA = 0x80290008
}
enum  { PSP2_DISPLAY_SETBUF_IMMEDIATE = 0, PSP2_DISPLAY_SETBUF_NEXTFRAME = 1 }

Functions

int sceDisplaySetFrameBuf (const SceDisplayFrameBuf *pParam, int sync)
int sceDisplayGetFrameBuf (SceDisplayFrameBuf *pParam, int sync)
int sceDisplayGetRefreshRate (float *pFps)
int sceDisplayGetVcount (void)
int sceDisplayWaitVblankStart (void)
int sceDisplayWaitVblankStartCB (void)
int sceDisplayWaitVblankStartMulti (unsigned int vcount)
int sceDisplayWaitVblankStartMultiCB (unsigned int vcount)
int sceDisplayWaitSetFrameBuf (void)
int sceDisplayWaitSetFrameBufCB (void)
int sceDisplayWaitSetFrameBufMulti (unsigned int vcount)
int sceDisplayWaitSetFrameBufMultiCB (unsigned int vcount)
int sceDisplayRegisterVblankStartCallback (SceUID uid)
int sceDisplayUnregisterVblankStartCallback (SceUID uid)

Detailed Description

Header file which defines display related variables and functions.

Copyright (C) 2015 PSP2SDK Project

This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/.


Typedef Documentation

Structure used with sceDisplaySetFrameBuf 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 sceDisplayGetFrameBuf

Enumeration Type Documentation

anonymous enum
Enumerator:
PSP2_DISPLAY_SETBUF_IMMEDIATE 

Buffer change effective immediately

PSP2_DISPLAY_SETBUF_NEXTFRAME 

Buffer change effective next frame


Function Documentation

int sceDisplayGetFrameBuf ( 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.
int sceDisplayGetRefreshRate ( float *  pFps)

Get current number of fps for the current screen mode.

Parameters:
[out]pFps- Pointer to a float variable to store current number of fps.
Returns:
0 on success, < 0 on error.
Note:
- This function returns a theoretical value, this might not be the exact frame rate.
int sceDisplayGetVcount ( void  )

Number of vertical blank pulses up to now

Register callback to be used at each vertical blank start

Parameters:
[in]uid- Callback UID
int sceDisplaySetFrameBuf ( 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.

Unregister callback used at each vertical blank start

Parameters:
[in]uid- Callback UID
int sceDisplayWaitSetFrameBuf ( void  )

Wait for vertical blank start since last update of framebuffer

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

int sceDisplayWaitSetFrameBufMulti ( 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
int sceDisplayWaitSetFrameBufMultiCB ( 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
int sceDisplayWaitVblankStart ( void  )

Wait for vertical blank start

Wait for vertical blank start with callback

int sceDisplayWaitVblankStartMulti ( 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
int sceDisplayWaitVblankStartMultiCB ( 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
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines