|
enum | SceGeDisplayListState {
SCE_GE_DL_STATE_NONE = 0
, SCE_GE_DL_STATE_QUEUED
, SCE_GE_DL_STATE_RUNNING
, SCE_GE_DL_STATE_COMPLETED
,
SCE_GE_DL_STATE_PAUSED
} |
|
enum | SceGeDisplayListSignal { SCE_GE_DL_SIGNAL_NONE = 0
, SCE_GE_DL_SIGNAL_BREAK
, SCE_GE_DL_SIGNAL_PAUSE
, SCE_GE_DL_SIGNAL_SYNC
} |
|
enum | SceGeReg |
|
enum | SceGeLogType {
SCE_GE_LOG_DL_ENQUEUED = 0
, SCE_GE_LOG_DL_DEQUEUED = 1
, SCE_GE_LOG_DL_SADR_UPDATE = 2
, SCE_GE_LOG_DL_BREAK = 3
,
SCE_GE_LOG_DL_CONTINUE = 4
, SCE_GE_LOG_DL_RUNNING = 5
, SCE_GE_LOG_DL_END = 6
, SCE_GE_LOG_DL_SIGNAL = 7
} |
|
enum | SceGeListState {
SCE_GE_LIST_COMPLETED
, SCE_GE_LIST_QUEUED
, SCE_GE_LIST_DRAWING
, SCE_GE_LIST_STALLING
,
SCE_GE_LIST_PAUSED
} |
|
|
int | sceGeInit () |
|
int | sceGeEnd () |
|
int | sceGeGetReg (SceGeReg regId) |
|
int | sceGeSetReg (SceGeReg regId, u32 value) |
|
int | sceGeSetCmd (u32 cmdOff, u32 cmd) |
|
int | sceGeSetMtx (int id, int *mtx) |
|
int | sceGeRegisterLogHandler (SceGeLogHandler handler) |
|
int | sceGeSetGeometryClock (int opt) |
|
int | sceGeEdramInit () |
|
int | sceGeEdramSetRefreshParam (int arg0, int arg1, int arg2, int arg3) |
|
int | sceGeEdramSetSize (int size) |
|
int | sceGeEdramGetHwSize () |
|
int | sceGePutBreakpoint (SceGeBreakpoint *bp, int size) |
|
int | sceGeGetBreakpoint (SceGeBreakpoint *bp, int size, int *arg2) |
|
int | sceGeGetListIdList (int *outPtr, int size, int *totalCountPtr) |
|
int | sceGeGetList (int dlId, SceGeDisplayList *outDl, int *outFlag) |
|
int | sceGeListUpdateStallAddr (int dlId, void *stall) |
|
int | sceGeGetCmd (u32 cmdOff) |
|
int | sceGeGetMtx (int id, int *mtx) |
|
int | sceGeSaveContext (SceGeContext *ctx) |
|
int | sceGeRestoreContext (SceGeContext *ctx) |
|
int | sceGeEdramGetAddr () |
|
int | sceGeEdramSetAddrTranslation (int arg) |
|
int | sceGeEdramGetSize () |
|
int | sceGeListDeQueue (int dlId) |
|
SceGeListState | sceGeListSync (int dlId, int mode) |
|
SceGeListState | sceGeDrawSync (int syncType) |
|
int | sceGeBreak (u32 resetQueue, void *arg1) |
|
int | sceGeContinue () |
|
int | sceGeSetCallback (SceGeCallbackData *cb) |
|
int | sceGeGetStack (int stackId, SceGeStack *stack) |
|
int | sceGeListEnQueue (void *list, void *stall, int cbid, SceGeListArgs *arg) |
|
int | sceGeListEnQueueHead (void *list, void *stall, int cbid, SceGeListArgs *arg) |
|
int | sceGeUnsetCallback (int cbId) |
|
- Author
- artart78
- Version
- 6.60
The ge.prx module RE'ing.
◆ SCE_GE_SIGNAL_HANDLER_SUSPEND
#define SCE_GE_SIGNAL_HANDLER_SUSPEND 0x01 |
In SDK versions <= 0x02000010, pause the display list, call the callback with the SIGNAL argument, and restart the display list in the state specified in the END instruction. Otherwise, just call the callback. Resume GE execution afterwards.
◆ SCE_GE_SIGNAL_HANDLER_CONTINUE
#define SCE_GE_SIGNAL_HANDLER_CONTINUE 0x02 |
Resume GE execution, then call the signal callback with the SIGNAL argument.
◆ SCE_GE_SIGNAL_HANDLER_PAUSE
#define SCE_GE_SIGNAL_HANDLER_PAUSE 0x03 |
Set the current display list's status to PAUSE, its signal to the END argument and its signal data to the SIGNAL command, then resume GE execution.
◆ SCE_GE_SIGNAL_SYNC
#define SCE_GE_SIGNAL_SYNC 0x08 |
Set the current display list's signal to SYNC, then resume GE execution.
◆ SCE_GE_SIGNAL_JUMP
#define SCE_GE_SIGNAL_JUMP 0x10 |
Jump to the (s << 16) | (e & 0xFFFF) address, where s is SIGNAL's argument and e is END's
◆ SCE_GE_SIGNAL_CALL
#define SCE_GE_SIGNAL_CALL 0x11 |
Same as SCE_GE_SIGNAL_JUMP, but saving the status so we can use SCE_GE_SIGNAL_RET to return to the caller.
◆ SCE_GE_SIGNAL_RET
#define SCE_GE_SIGNAL_RET 0x12 |
Return after using a SCE_GE_SIGNAL_*CALL signal.
◆ SCE_GE_SIGNAL_RJUMP
#define SCE_GE_SIGNAL_RJUMP 0x13 |
Same as SCE_GE_SIGNAL_JUMP, but where the address is relative to the current one.
◆ SCE_GE_SIGNAL_RCALL
#define SCE_GE_SIGNAL_RCALL 0x14 |
Same as SCE_GE_SIGNAL_CALL, but where the address is relative to the current one.
◆ SCE_GE_SIGNAL_OJUMP
#define SCE_GE_SIGNAL_OJUMP 0x15 |
Same as SCE_GE_SIGNAL_JUMP, but where the address is relative to ORIGIN.
◆ SCE_GE_SIGNAL_OCALL
#define SCE_GE_SIGNAL_OCALL 0x16 |
Same as SCE_GE_SIGNAL_CALL, but where the address is relative to ORIGIN.
◆ SCE_GE_SIGNAL_RTBP0
#define SCE_GE_SIGNAL_RTBP0 0x20 |
Run a TBP0/TBW0 pair with the same address as for SCE_GE_SIGNAL_RJUMP, taking ((e >> 16) & 0xFF) for the size.
◆ SCE_GE_SIGNAL_OTBP0
#define SCE_GE_SIGNAL_OTBP0 0x28 |
Run a TBP0/TBW0 pair with the same address as for SCE_GE_SIGNAL_OJUMP, taking ((e >> 16) & 0xFF) for the size.
◆ SCE_GE_SIGNAL_RCBP
#define SCE_GE_SIGNAL_RCBP 0x30 |
Same as SCE_GE_SIGNAL_RTBP0, for a CBP/CBW pair.
◆ SCE_GE_SIGNAL_OCBP
#define SCE_GE_SIGNAL_OCBP 0x38 |
Same as SCE_GE_SIGNAL_OTBP0, for a CBP/CBW pair.
◆ SCE_GE_SIGNAL_BREAK1
#define SCE_GE_SIGNAL_BREAK1 0xF0 |
If deci2p operations are defined, break here and run the SCE_DECI2OP_GE_BREAK operation until it resumes operation.
◆ SCE_GE_SIGNAL_BREAK2
#define SCE_GE_SIGNAL_BREAK2 0xFF |
Same as SCE_GE_SIGNAL_BREAK1, but break only if the breakpoint counter is -1 or equal to the defined value (ie, we reached the breakpoint the number of times specified when the breakpoint was created).
◆ SceGeDisplayList
Structure holding a display list
◆ SceGeReg
Identifiers for the GE hardware (DMA) registers which can be read and written by sceGeGetReg() and sceGeSetReg(). See the hardware documentation for more details.
◆ SceGeLogType
The value of the first argument passed to the log handler registered by sceGeRegisterLogHandler(). The following arguments passed to the log handler depend on this.
◆ SceGeLogHandler
A GE logging handler function. Takes a variable number of arguments depending on the logging type.
◆ SceGeBreakpoint
◆ SceGeCallback
typedef void(* SceGeCallback) (int id, void *arg) |
Typedef for a GE callback
◆ SceGeDisplayListState
Internal state of a display list
Enumerator |
---|
SCE_GE_DL_STATE_NONE | No state assigned, the list is empty
|
SCE_GE_DL_STATE_QUEUED | The list has been queued
|
SCE_GE_DL_STATE_RUNNING | The list is being executed
|
SCE_GE_DL_STATE_COMPLETED | The list was completed and will be removed
|
SCE_GE_DL_STATE_PAUSED | The list has been paused by a signal
|
◆ SceGeDisplayListSignal
Internal signal state of a display list
Enumerator |
---|
SCE_GE_DL_SIGNAL_NONE | No signal received
|
SCE_GE_DL_SIGNAL_BREAK | The break signal was received
|
SCE_GE_DL_SIGNAL_PAUSE | The pause signal was received
|
SCE_GE_DL_SIGNAL_SYNC | The sync signal was received
|
◆ SceGeReg
Identifiers for the GE hardware (DMA) registers which can be read and written by sceGeGetReg() and sceGeSetReg(). See the hardware documentation for more details.
◆ SceGeLogType
The value of the first argument passed to the log handler registered by sceGeRegisterLogHandler(). The following arguments passed to the log handler depend on this.
Enumerator |
---|
SCE_GE_LOG_DL_ENQUEUED | Display list was enqueued. Four arguments: display list ID, was enqueued as head, pointer to the command list, pointer to the stall address.
|
SCE_GE_LOG_DL_DEQUEUED | Display list was dequeued. One argument: the display list ID.
|
SCE_GE_LOG_DL_SADR_UPDATE | Display list's stall address was updated. Two arguments: the display list ID, and the new stall address.
|
SCE_GE_LOG_DL_BREAK | sceGeBreak() was triggered. One argument: whether the flag to reset the display list queue was set.
|
SCE_GE_LOG_DL_CONTINUE | sceGeContinue() was triggered. One argument, always zero.
|
SCE_GE_LOG_DL_RUNNING | Display list is now running (when enqueued, when another display list finished, or when doing a sceGeContinue()). Three arguments: the display list ID, the pointer to its command list, the pointer to its stall address.
|
SCE_GE_LOG_DL_END | Display list reached the ending FINISH/END sequence. Four arguments: display list ID, current pointer to the command list, and the two commands before it (in their running order).
|
SCE_GE_LOG_DL_SIGNAL | Display list caught a signal. Four arguments: display list ID, current pointer to the command list, and the two commands before it (in their running order).
|
◆ SceGeListState
State of a display list, returned by sceGeListSync() and sceGeDrawSync()
Enumerator |
---|
SCE_GE_LIST_COMPLETED | The list has been completed
|
SCE_GE_LIST_QUEUED | The list is queued but not executed yet
|
SCE_GE_LIST_DRAWING | The list is currently being executed
|
SCE_GE_LIST_STALLING | The list was stopped because it encountered stall address
|
SCE_GE_LIST_PAUSED | The list is paused because of a signal
|
◆ sceGeInit()
Inits the GE subsystem.
- Returns
- Zero.
◆ sceGeEnd()
Ends the GE subsystem.
- Returns
- Zero.
◆ sceGeGetReg()
Gets the value of a GE hardware register.
- Parameters
-
- Returns
- The content of the register on success, otherwise less than zero.
◆ sceGeSetReg()
int sceGeSetReg |
( |
SceGeReg |
regId, |
|
|
u32 |
value |
|
) |
| |
Sets a GE hardware register.
- Parameters
-
regId | The register ID. |
value | The value to set the register to. |
- Returns
- Zero on success, otherwise less than zero.
◆ sceGeSetCmd()
int sceGeSetCmd |
( |
u32 |
cmdOff, |
|
|
u32 |
cmd |
|
) |
| |
Sets the value of a command register, as if the command was executed.
- Parameters
-
cmdOff | The command ID. |
cmd | The value to set the command to. (Only the least significant 24 bits are used.) |
- Returns
- Zero on success, otherwise less than zero.
◆ sceGeSetMtx()
int sceGeSetMtx |
( |
int |
id, |
|
|
int * |
mtx |
|
) |
| |
Sets a matrix.
- Parameters
-
id | The matrix ID, one of SCE_GE_MTX_*. |
mtx | The buffer storing the matrix. |
- Returns
- Zero on success, otherwise less than zero.
◆ sceGeRegisterLogHandler()
Registers a logging handler.
- Parameters
-
handler | The handler function. |
- Returns
- Zero.
◆ sceGeSetGeometryClock()
int sceGeSetGeometryClock |
( |
int |
opt | ) |
|
Sets or unsets the geometry clock.
- Parameters
-
opt | The value whose first bit enables or disables the geometry clock. |
- Returns
- The old state.
◆ sceGeEdramInit()
Inits the EDRAM memory.
- Returns
- Zero.
◆ sceGeEdramSetRefreshParam()
int sceGeEdramSetRefreshParam |
( |
int |
arg0, |
|
|
int |
arg1, |
|
|
int |
arg2, |
|
|
int |
arg3 |
|
) |
| |
Sets the EDRAM refresh parameters.
- Parameters
-
arg0 | Unknown (0 or 1). |
arg1 | Unknown (0 to 0x7FFFFF). |
arg2 | Unknown (0 to 0x3FF). |
arg3 | Unknown (0 to 0xF). |
- Returns
- Zero on success, otherwise less than zero.
◆ sceGeEdramSetSize()
int sceGeEdramSetSize |
( |
int |
size | ) |
|
Sets the EDRAM size to be enabled.
- Parameters
-
size | The size (0x200000 or 0x400000). Will return an error if 0x400000 is specified for the PSP FAT. |
- Returns
- Zero on success, otherwise less than zero.
◆ sceGeEdramGetHwSize()
int sceGeEdramGetHwSize |
( |
| ) |
|
Gets the EDRAM physical size.
- Returns
- The EDRAM physical size.
◆ sceGePutBreakpoint()
Put breakpoints in the display list execution.
- Parameters
-
inPtr | A list of breakpoints to set. |
size | The number of breakpoints to set. |
- Returns
- Zero on success, otherwise less than zero.
◆ sceGeGetBreakpoint()
Gets a breakpoint.
- Parameters
-
outPtr | The list of breakpoints (check sceGePutBreakpoint()). |
size | The number of breakpoints to read. |
arg2 | A pointer where will be stored the total number of breakpoints. |
- Returns
- The number of stored breakpoints on success, otherwise less than zero.
◆ sceGeGetListIdList()
int sceGeGetListIdList |
( |
int * |
outPtr, |
|
|
int |
size, |
|
|
int * |
totalCountPtr |
|
) |
| |
Gets a list of the IDs of the display lists currently being in the queue.
- Parameters
-
outPtr | A buffer that will store the display lists' ID. |
size | The number of IDs to store. |
totalCountPtr | A point where will be stored the total number of display lists. |
- Returns
- The number of stored list IDs on success, otherwise less than zero.
◆ sceGeGetList()
Gets a display list from its ID.
- Parameters
-
dlId | The display list ID. |
outDl | A pointer where the display list will be stored. |
outFlag | A pointer where will be stored (outDl->state << 2) | outDl->signal. |
- Returns
- Zero on success, otherwise less than zero.
◆ sceGeListUpdateStallAddr()
int sceGeListUpdateStallAddr |
( |
int |
dlId, |
|
|
void * |
stall |
|
) |
| |
Updates the stall address.
- Parameters
-
dlId | The ID of the display list whose stall address will be modified |
- Returns
- Zero on success, otherwise less than zero.
◆ sceGeGetCmd()
int sceGeGetCmd |
( |
u32 |
cmdOff | ) |
|
Gets a command (?).
- Parameters
-
- Returns
- The command on success, otherwise less than zero.
◆ sceGeGetMtx()
int sceGeGetMtx |
( |
int |
id, |
|
|
int * |
mtx |
|
) |
| |
Gets a matrix.
- Parameters
-
id | The matrix ID (0 - 11) |
mtx | A buffer to store the matrix. |
- Returns
- Zero on success, otherwise less than zero.
◆ sceGeSaveContext()
Saves the GE context of the current display list into a structure.
- Parameters
-
ctx | The structure to save the GE context in. |
- Returns
- Zero on success, otherwise less than zero.
◆ sceGeRestoreContext()
Restores a context from a structure.
- Parameters
-
ctx | The structure to load the GE context from. |
- Returns
- Zero on success, otherwise less than zero.
◆ sceGeEdramGetAddr()
int sceGeEdramGetAddr |
( |
| ) |
|
Gets the EDRAM address.
- Returns
- 0x04000000.
◆ sceGeEdramSetAddrTranslation()
int sceGeEdramSetAddrTranslation |
( |
int |
arg | ) |
|
Sets the EDRAM address translation.
- Parameters
-
arg | The memory width (0, 0x200, 0x400, 0x800 or 0x1000). |
- Returns
- The previous memory width.
◆ sceGeEdramGetSize()
int sceGeEdramGetSize |
( |
| ) |
|
◆ sceGeListDeQueue()
int sceGeListDeQueue |
( |
int |
dlId | ) |
|
Dequeues a list.
- Parameters
-
dlId | The ID of the display list to dequeue. |
- Returns
- Zero on success, otherwise less than zero.
◆ sceGeListSync()
Peeks a list state, or waits for it to be completed.
- Parameters
-
dlId | The ID of the display list to check. |
mode | 0 to wait for the display list to be completed, or 1 to check its current state. |
- Returns
- On success, SCE_GE_LIST_COMPLETED if mode is 0, one of the values of SceGeListState if mode is 1, and otherwise, less than zero.
◆ sceGeDrawSync()
Peeks a drawing state, or waits for the drawing to be completed.
- Parameters
-
syncType | 0 to wait for the drawing to be completed, or to check its current state. |
- Returns
- On success, SCE_GE_LIST_COMPLETED if mode is 0, SCE_GE_LIST_STALLING, SCE_GE_LIST_DRAWING or SCE_GE_LIST_COMPLETED if mode is 1, and otherwise, less than zero.
◆ sceGeBreak()
int sceGeBreak |
( |
u32 |
resetQueue, |
|
|
void * |
arg1 |
|
) |
| |
Stop the GE drawing.
- Parameters
-
resetQueue | If not set to 0, the display list queue will be emptied. |
arg1 | Unused pointer. |
- Returns
- The stopped display list ID on success, otherwise less than zero.
◆ sceGeContinue()
Continues the queue execution after a sceGeBreak().
- Returns
- Zero on success, otherwise less than zero.
◆ sceGeSetCallback()
Sets GE finish/signal callbacks.
- Parameters
-
cb | The GE callbacks parameters. |
- Returns
- The callbacks id on success, otherwise less than zero.
◆ sceGeGetStack()
int sceGeGetStack |
( |
int |
stackId, |
|
|
SceGeStack * |
stack |
|
) |
| |
Gets a stack from the current display list, using its ID.
- Parameters
-
stackId | The stack ID. |
stack | A pointer where the stack will be stored. |
- Returns
- The current stack of the display list on success, otherwise less than zero.
◆ sceGeListEnQueue()
int sceGeListEnQueue |
( |
void * |
list, |
|
|
void * |
stall, |
|
|
int |
cbid, |
|
|
SceGeListArgs * |
arg |
|
) |
| |
Enqueues a display list at the end of the queue.
- Parameters
-
list | A pointer to the list of commands. |
stall | The address where the display list will stall. |
cbid | The callback ID, returned by sceGeSetCallback(), of the callbacks to be used. |
arg | A structure storing arguments about the list. |
- Returns
- The display list ID on success, otherwise less than zero.
◆ sceGeListEnQueueHead()
int sceGeListEnQueueHead |
( |
void * |
list, |
|
|
void * |
stall, |
|
|
int |
cbid, |
|
|
SceGeListArgs * |
arg |
|
) |
| |
Enqueues a display list as the next display list that will be executed.
- Parameters
-
list | A pointer to the list of commands. |
stall | The address where the display list will stall. |
cbid | The callback ID, returned by sceGeSetCallback(), of the callbacks to be used. |
arg | A structure storing arguments about the list. |
- Returns
- The display list ID on success, otherwise less than zero.
◆ sceGeUnsetCallback()
int sceGeUnsetCallback |
( |
int |
cbId | ) |
|
Unsets GE callbacks.
- Parameters
-
cbId | The ID of the callbacks to unset. |
- Returns
- Zero on success, otherwise less than zero.