PSPSDK 1.0+beta2
Loading...
Searching...
No Matches
pspge.h
Go to the documentation of this file.
1/*
2 * PSP Software Development Kit - https://github.com/pspdev
3 * -----------------------------------------------------------------------
4 * Licensed under the BSD license, see LICENSE in PSPSDK root for details.
5 *
6 * pspge.h - Prototypes for the sceGe library.
7 *
8 * Copyright (c) 2005 Marcus R. Brown <mrbrown@ocgnet.org>
9 * Copyright (c) 2005 James Forshaw <tyranid@gmail.com>
10 * Copyright (c) 2005 John Kelley <ps2dev@kelley.ca>
11 *
12 */
13#ifndef __GE_H__
14#define __GE_H__
15
16#include <psptypes.h>
17
18#ifdef __cplusplus
19extern "C" {
20#endif
21
23typedef struct PspGeContext {
24 unsigned int context[512];
26
28typedef struct
29{
31 unsigned int stack[8];
33
35typedef void (*PspGeCallback)(int id, void *arg);
36
49
61
65typedef struct PspGeBreakParam {
66 unsigned int buf[4];
68
74unsigned int sceGeEdramGetSize(void);
75
84
90void * sceGeEdramGetAddr(void);
91
99unsigned int sceGeGetCmd(int cmd);
100
120
129int sceGeGetMtx(int type, void *matrix);
130
132typedef struct
133{
135 unsigned int stack[8];
136} PspGeStack;
137
147
156
165
177int sceGeListEnQueue(const void *list, void *stall, int cbid, PspGeListArgs *arg);
178
190int sceGeListEnQueueHead(const void *list, void *stall, int cbid, PspGeListArgs *arg);
191
200
210
211
220
230
239
248
257
267
274
283
284
285#ifdef __cplusplus
286}
287#endif
288
289#endif /* __GE_H__ */
int sceGeEdramSetSize(int size)
Sets the EDRAM size to be enabled.
int sceGeSetCallback(PspGeCallbackData *cb)
Register callback handlers for the the GE.
int sceGeListUpdateStallAddr(int qid, void *stall)
Update the stall address for the specified queue.
int sceGeBreak(int mode, PspGeBreakParam *pParam)
Interrupt drawing queue.
int sceGeGetMtx(int type, void *matrix)
Retrieve a matrix of the given type.
int sceGeRestoreContext(const PspGeContext *context)
Restore a previously saved GE context.
int sceGeListDeQueue(int qid)
Cancel a queued or running list.
PspGeMatrixTypes
GE matrix types.
Definition pspge.h:102
@ PSP_GE_MATRIX_BONE4
Definition pspge.h:108
@ PSP_GE_MATRIX_BONE1
Definition pspge.h:105
@ PSP_GE_MATRIX_BONE3
Definition pspge.h:107
@ PSP_GE_MATRIX_PROJECTION
Projection matrix.
Definition pspge.h:117
@ PSP_GE_MATRIX_BONE0
Bone matrices.
Definition pspge.h:104
@ PSP_GE_MATRIX_TEXGEN
Definition pspge.h:118
@ PSP_GE_MATRIX_BONE7
Definition pspge.h:111
@ PSP_GE_MATRIX_VIEW
View matrix.
Definition pspge.h:115
@ PSP_GE_MATRIX_BONE5
Definition pspge.h:109
@ PSP_GE_MATRIX_BONE6
Definition pspge.h:110
@ PSP_GE_MATRIX_WORLD
World matrix.
Definition pspge.h:113
@ PSP_GE_MATRIX_BONE2
Definition pspge.h:106
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 sceGeUnsetCallback(int cbid)
Unregister the callback handlers.
int sceGeSaveContext(PspGeContext *context)
Save the GE's current state.
void(* PspGeCallback)(int id, void *arg)
Typedef for a GE callback.
Definition pspge.h:35
unsigned int sceGeGetCmd(int cmd)
Retrieve the current value of a GE command.
int sceGeGetStack(int stackId, PspGeStack *stack)
Retrieve the stack of the display list currently being executed.
PspGeListState
List status for sceGeListSync() and sceGeDrawSync().
Definition pspge.h:213
@ PSP_GE_LIST_CANCEL_DONE
Definition pspge.h:218
@ PSP_GE_LIST_STALL_REACHED
Definition pspge.h:217
@ PSP_GE_LIST_DONE
Definition pspge.h:214
@ PSP_GE_LIST_DRAWING_DONE
Definition pspge.h:216
@ PSP_GE_LIST_QUEUED
Definition pspge.h:215
int sceGeDrawSync(int syncType)
Wait for drawing to complete.
unsigned int sceGeEdramGetSize(void)
Get the size of VRAM.
void * sceGeEdramGetAddr(void)
Get the eDRAM address.
int sceGeContinue(void)
Restart drawing queue.
int sceGeEdramSetAddrTranslation(int width)
Set the eDRAM address translation mode.
int sceGeListSync(int qid, int syncType)
Wait for syncronisation of a list.
int sceGeListEnQueueHead(const void *list, void *stall, int cbid, PspGeListArgs *arg)
Enqueue a display list at the head of the GE display list queue.
unsigned char size
Definition pspsysmem_kernel.h:6
struct _uidControlBlock * type
Definition pspsysmem_kernel.h:2
float x
Definition psptypes.h:0
uint32_t u32
Definition psptypes.h:41
Drawing queue interruption parameter.
Definition pspge.h:65
unsigned int buf[4]
Definition pspge.h:66
Structure to hold the callback data.
Definition pspge.h:39
void * finish_arg
GE callback argument for finish interrupt.
Definition pspge.h:47
PspGeCallback finish_func
GE callback for the finish interrupt.
Definition pspge.h:45
PspGeCallback signal_func
GE callback for the signal interrupt.
Definition pspge.h:41
void * signal_arg
GE callback argument for signal interrupt.
Definition pspge.h:43
Stores the state of the GE.
Definition pspge.h:23
unsigned int context[512]
Definition pspge.h:24
Definition pspge.h:51
unsigned int size
Size of the structure (16)
Definition pspge.h:53
PspGeContext * context
Pointer to a context.
Definition pspge.h:55
SceGeStack * stacks
Pointer to the stacks (unused)
Definition pspge.h:59
u32 numStacks
Number of stacks to use.
Definition pspge.h:57
Structure storing a stack (for CALL/RET).
Definition pspge.h:133
Structure storing a stack (for CALL/RET)
Definition pspge.h:29