pspsdk-1.0+beta2
pspge.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  PspGeContext
 Stores the state of the GE. More...
struct  PspGeCallbackData
 Structure to hold the callback data. More...
struct  PspGeListArgs

Typedefs

typedef struct PspGeContext PspGeContext
 Stores the state of the GE.
typedef void(* PspGeCallback )(int id, void *arg)
 Typedef for a GE callback.
typedef struct PspGeCallbackData PspGeCallbackData
 Structure to hold the callback data.
typedef struct PspGeListArgs PspGeListArgs
typedef enum PspGeMatrixTypes PspGeMatrixTypes
 GE matrix types.
typedef enum PspGeSyncType PspGeSyncType
 Wait condition for sceGeListSync() and sceGeDrawSync().

Enumerations

enum  PspGeMatrixTypes {
  PSP_GE_MATRIX_BONE0 = 0, PSP_GE_MATRIX_BONE1, PSP_GE_MATRIX_BONE2, PSP_GE_MATRIX_BONE3,
  PSP_GE_MATRIX_BONE4, PSP_GE_MATRIX_BONE5, PSP_GE_MATRIX_BONE6, PSP_GE_MATRIX_BONE7,
  PSP_GE_MATRIX_WORLD, PSP_GE_MATRIX_VIEW, PSP_GE_MATRIX_PROJECTION, PSP_GE_MATRIX_TEXGEN
}
 GE matrix types. More...
enum  PspGeSyncType {
  PSP_GE_LIST_DONE = 0, PSP_GE_LIST_QUEUED, PSP_GE_LIST_DRAWING_DONE, PSP_GE_LIST_STALL_REACHED,
  PSP_GE_LIST_CANCEL_DONE
}
 Wait condition for sceGeListSync() and sceGeDrawSync(). More...

Functions

unsigned int sceGeEdramGetSize (void)
 Get the size of VRAM.
void * sceGeEdramGetAddr (void)
 Get the address of VRAM.
unsigned int sceGeGetCmd (int cmd)
 Retrive the current value of a GE command.
int sceGeGetMtx (int type, void *matrix)
 Retrieve a matrix of the given type.
int sceGeSaveContext (PspGeContext *context)
 Save the GE's current state.
int sceGeRestoreContext (const PspGeContext *context)
 Restore a previously saved GE context.
int sceGeListEnQueue (const void *list, void *stall, int cbid, PspGeListArgs *arg)
 Enqueue a display list at the tail of the GE display list queue.
int sceGeListEnQueueHead (const void *list, void *stall, int cbid, PspGeListArgs *arg)
 Enqueue a display list at the head of the GE display list queue.
int sceGeListDeQueue (int qid)
 Cancel a queued or running list.
int sceGeListUpdateStallAddr (int qid, void *stall)
 Update the stall address for the specified queue.
int sceGeListSync (int qid, int syncType)
 Wait for syncronisation of a list.
int sceGeDrawSync (int syncType)
 Wait for drawing to complete.
int sceGeSetCallback (PspGeCallbackData *cb)
 Register callback handlers for the the Ge.
int sceGeUnsetCallback (int cbid)
 Unregister the callback handlers.

Typedef Documentation

typedef void(* PspGeCallback)(int id, void *arg)

Typedef for a GE callback.

Structure to hold the callback data.

typedef struct PspGeContext PspGeContext

Stores the state of the GE.

typedef struct PspGeListArgs PspGeListArgs

GE matrix types.

Wait condition for sceGeListSync() and sceGeDrawSync().

Enumeration Type Documentation

GE matrix types.

Enumerator:
PSP_GE_MATRIX_BONE0 

Bone matrices.

PSP_GE_MATRIX_BONE1 
PSP_GE_MATRIX_BONE2 
PSP_GE_MATRIX_BONE3 
PSP_GE_MATRIX_BONE4 
PSP_GE_MATRIX_BONE5 
PSP_GE_MATRIX_BONE6 
PSP_GE_MATRIX_BONE7 
PSP_GE_MATRIX_WORLD 

World matrix.

PSP_GE_MATRIX_VIEW 

View matrix.

PSP_GE_MATRIX_PROJECTION 

Projection matrix.

PSP_GE_MATRIX_TEXGEN 

Wait condition for sceGeListSync() and sceGeDrawSync().

Enumerator:
PSP_GE_LIST_DONE 
PSP_GE_LIST_QUEUED 
PSP_GE_LIST_DRAWING_DONE 
PSP_GE_LIST_STALL_REACHED 
PSP_GE_LIST_CANCEL_DONE 

Function Documentation

int sceGeDrawSync ( int  syncType)

Wait for drawing to complete.

Parameters
syncType- Specifies the condition to wait on. One of PspGeSyncType.
Returns
???

Referenced by sceGuSync().

void* sceGeEdramGetAddr ( void  )

Get the address of VRAM.

Returns
A pointer to the base of VRAM.

Referenced by sceGuInit().

unsigned int sceGeEdramGetSize ( void  )

Get the size of VRAM.

Returns
The size of VRAM (in bytes).
unsigned int sceGeGetCmd ( int  cmd)

Retrive the current value of a GE command.

Parameters
cmd- The GE command register to retrieve.
Returns
The value of the GE command.
int sceGeGetMtx ( int  type,
void *  matrix 
)

Retrieve a matrix of the given type.

Parameters
type- One of PspGeMatrixTypes.
matrix- Pointer to a variable to store the matrix.
Returns
???
int sceGeListDeQueue ( int  qid)

Cancel a queued or running list.

Parameters
qid- The ID of the queue.
Returns
???
int sceGeListEnQueue ( const void *  list,
void *  stall,
int  cbid,
PspGeListArgs arg 
)

Enqueue a display list at the tail of the GE display list queue.

Parameters
list- The head of the list to queue.
stall- The stall address. If NULL then no stall address set and the list is transferred immediately.
cbid- ID of the callback set by calling sceGeSetCallback
arg- Structure containing GE context buffer address
Returns
The ID of the queue.

Referenced by sceGuInit(), sceGuSendList(), and sceGuStart().

int sceGeListEnQueueHead ( const void *  list,
void *  stall,
int  cbid,
PspGeListArgs arg 
)

Enqueue a display list at the head of the GE display list queue.

Parameters
list- The head of the list to queue.
stall- The stall address. If NULL then no stall address set and the list is transferred immediately.
cbid- ID of the callback set by calling sceGeSetCallback
arg- Structure containing GE context buffer address
Returns
The ID of the queue.

Referenced by sceGuSendList().

int sceGeListSync ( int  qid,
int  syncType 
)

Wait for syncronisation of a list.

Parameters
qid- The queue ID of the list to sync.
syncType- Specifies the condition to wait on. One of PspGeSyncType.
Returns
???

Referenced by sceGuInit(), and sceGuSync().

int sceGeListUpdateStallAddr ( int  qid,
void *  stall 
)

Update the stall address for the specified queue.

Parameters
qid- The ID of the queue.
stall- The stall address to update
Returns
Unknown. Probably 0 if successful.

Referenced by sceGuGetMemory(), and sendCommandiStall().

int sceGeRestoreContext ( const PspGeContext context)

Restore a previously saved GE context.

Parameters
context- Pointer to a PspGeContext.
Returns
???
int sceGeSaveContext ( PspGeContext context)

Save the GE's current state.

Parameters
context- Pointer to a PspGeContext.
Returns
???
int sceGeSetCallback ( PspGeCallbackData cb)

Register callback handlers for the the Ge.

Parameters
cb- Configured callback data structure
Returns
The callback ID, < 0 on error

Referenced by sceGuInit().

int sceGeUnsetCallback ( int  cbid)

Unregister the callback handlers.

Parameters
cbid- The ID of the callbacks from sceGeSetCallback
Returns
< 0 on error

Referenced by sceGuTerm().