uOFW
Reverse engineered PSP kernel 6.60.
ge_kernel.h
1 /* Copyright (C) 2011, 2012 The uOFW team
2  See the file COPYING for copying permission.
3 */
4 
12 #include "common_header.h"
13 #include "ge_user.h"
14 
21 typedef enum
22 {
34 
36 typedef enum
37 {
47 
49 typedef struct SceGeDisplayList
50 {
52  struct SceGeDisplayList *next; // 0
54  struct SceGeDisplayList *prev; // 4
56  u8 state; // SceGeDisplayListState / 8
58  u8 signal; // SceGeDisplayListSignal / 9
60  u8 isBusy;
61  /* (padding) */
62  char unused11;
64  SceGeContext *ctx; // 12
66  int execState;
68  void *list; // 20
70  void *stall; // 24
72  int radr1; // 28
74  int radr2; // 32
76  int oadr; // 36
78  int oadr1; // 40
80  int oadr2; // 44
82  int base; // 48
84  short cbId; // 52
88  short numStacks; // 56
90  u16 stackOff; // 58
92  SceGeStack *stack; // 60
93 } SceGeDisplayList; // size: 64
94 
96 typedef struct
97 {
98  u32 exec; // 0
99  u32 ladr; // 4
100  u32 sadr; // 8
101  u32 radr1; // 12
102  u32 radr2; // 16
103  u32 vadr; // 20
104  u32 iadr; // 24
105  u32 oadr; // 28
106  u32 oadr1; // 32
107  u32 oadr2; // 36
108  u32 edramTransDisable; // 40
109  u32 edramTransVal; // 44
110  u32 edramRefresh1; // 48
111  u32 edramRefresh2; // 52
112  u32 edramRefresh3; // 56
113  u32 edramUnk40; // 60
114  u32 geometryClock; // 64
115  u32 dl[495]; // 68
116 } _SceGeContext;
117 
123 int sceGeInit();
124 
130 int sceGeEnd();
131 
135 typedef enum SceGeReg {
136  SCE_GE_REG_RESET = 0,
137  SCE_GE_REG_UNK004 = 1,
138  SCE_GE_REG_EDRAM_HW_SIZE = 2,
139  SCE_GE_REG_EXEC = 3,
140  SCE_GE_REG_UNK104 = 4,
141  SCE_GE_REG_LISTADDR = 5,
142  SCE_GE_REG_STALLADDR = 6,
143  SCE_GE_REG_RADR1 = 7,
144  SCE_GE_REG_RADR2 = 8,
145  SCE_GE_REG_VADR = 9,
146  SCE_GE_REG_IADR = 10,
147  SCE_GE_REG_OADR = 11,
148  SCE_GE_REG_OADR1 = 12,
149  SCE_GE_REG_OADR2 = 13,
150  SCE_GE_REG_UNK300 = 14,
151  SCE_GE_REG_INTERRUPT_TYPE1 = 15,
152  SCE_GE_REG_INTERRUPT_TYPE2 = 16,
153  SCE_GE_REG_INTERRUPT_TYPE3 = 17,
154  SCE_GE_REG_INTERRUPT_TYPE4 = 18,
155  SCE_GE_REG_EDRAM_ENABLED_SIZE = 19,
156  SCE_GE_REG_GEOMETRY_CLOCK = 20,
157  SCE_GE_REG_EDRAM_REFRESH_UNK1 = 21,
158  SCE_GE_REG_EDRAM_UNK10 = 22,
159  SCE_GE_REG_EDRAM_REFRESH_UNK2 = 23,
160  SCE_GE_REG_EDRAM_REFRESH_UNK3 = 24,
161  SCE_GE_REG_EDRAM_UNK40 = 25,
162  SCE_GE_REG_EDRAM_UNK50 = 26,
163  SCE_GE_REG_EDRAM_UNK60 = 27,
164  SCE_GE_REG_EDRAM_ADDR_TRANS_DISABLE = 28,
165  SCE_GE_REG_EDRAM_ADDR_TRANS_VALUE = 29,
166  SCE_GE_REG_EDRAM_UNK90 = 30,
167  SCE_GE_REG_EDRAM_UNKA0 = 31
169 
178 
187 int sceGeSetReg(SceGeReg regId, u32 value);
188 
197 int sceGeSetCmd(u32 cmdOff, u32 cmd);
198 
207 int sceGeSetMtx(int id, int *mtx);
208 
213 typedef enum SceGeLogType {
243 
248 typedef void (*SceGeLogHandler)(SceGeLogType logType, ...);
249 
258 
267 
274 
285 int sceGeEdramSetRefreshParam(int arg0, int arg1, int arg2, int arg3);
286 
294 int sceGeEdramSetSize(int size);
295 
302 
306 typedef struct SceGeBreakpoint {
308  u32 bpAddr;
310  int bpCount;
312 
322 
332 int sceGeGetBreakpoint(SceGeBreakpoint *bp, int size, int *arg2);
333 
343 int sceGeGetListIdList(int *outPtr, int size, int *totalCountPtr);
344 
354 int sceGeGetList(int dlId, SceGeDisplayList *outDl, int *outFlag);
355 
int sceGeEdramSetSize(int size)
int sceGeGetList(int dlId, SceGeDisplayList *outDl, int *outFlag)
int sceGeGetBreakpoint(SceGeBreakpoint *bp, int size, int *arg2)
int sceGeRegisterLogHandler(SceGeLogHandler handler)
int sceGeGetListIdList(int *outPtr, int size, int *totalCountPtr)
int sceGeSetCmd(u32 cmdOff, u32 cmd)
int sceGeGetReg(SceGeReg regId)
int sceGeInit()
struct SceGeBreakpoint SceGeBreakpoint
SceGeReg
Definition: ge_kernel.h:135
SceGeDisplayListSignal
Definition: ge_kernel.h:37
SceGeDisplayListState
Definition: ge_kernel.h:22
int sceGeSetMtx(int id, int *mtx)
int sceGeEdramSetRefreshParam(int arg0, int arg1, int arg2, int arg3)
int sceGePutBreakpoint(SceGeBreakpoint *bp, int size)
int sceGeEdramInit()
int sceGeEnd()
int sceGeSetReg(SceGeReg regId, u32 value)
int sceGeEdramGetHwSize()
void(* SceGeLogHandler)(SceGeLogType logType,...)
Definition: ge_kernel.h:248
SceGeLogType
Definition: ge_kernel.h:213
struct SceGeDisplayList SceGeDisplayList
int sceGeSetGeometryClock(int opt)
@ SCE_GE_DL_SIGNAL_SYNC
Definition: ge_kernel.h:45
@ SCE_GE_DL_SIGNAL_NONE
Definition: ge_kernel.h:39
@ SCE_GE_DL_SIGNAL_BREAK
Definition: ge_kernel.h:41
@ SCE_GE_DL_SIGNAL_PAUSE
Definition: ge_kernel.h:43
@ SCE_GE_DL_STATE_PAUSED
Definition: ge_kernel.h:32
@ SCE_GE_DL_STATE_NONE
Definition: ge_kernel.h:24
@ SCE_GE_DL_STATE_COMPLETED
Definition: ge_kernel.h:30
@ SCE_GE_DL_STATE_QUEUED
Definition: ge_kernel.h:26
@ SCE_GE_DL_STATE_RUNNING
Definition: ge_kernel.h:28
@ SCE_GE_LOG_DL_END
Definition: ge_kernel.h:237
@ SCE_GE_LOG_DL_SIGNAL
Definition: ge_kernel.h:241
@ SCE_GE_LOG_DL_CONTINUE
Definition: ge_kernel.h:229
@ SCE_GE_LOG_DL_ENQUEUED
Definition: ge_kernel.h:217
@ SCE_GE_LOG_DL_RUNNING
Definition: ge_kernel.h:233
@ SCE_GE_LOG_DL_SADR_UPDATE
Definition: ge_kernel.h:223
@ SCE_GE_LOG_DL_DEQUEUED
Definition: ge_kernel.h:220
@ SCE_GE_LOG_DL_BREAK
Definition: ge_kernel.h:226
Definition: ge_kernel.h:306
u32 bpAddr
Definition: ge_kernel.h:308
int bpCount
Definition: ge_kernel.h:310
Definition: ge_user.h:374
Definition: ge_kernel.h:50
struct SceGeDisplayList * prev
Definition: ge_kernel.h:54
u16 stackOff
Definition: ge_kernel.h:90
int oadr2
Definition: ge_kernel.h:80
int oadr1
Definition: ge_kernel.h:78
u16 signalData
Definition: ge_kernel.h:86
int oadr
Definition: ge_kernel.h:76
int execState
Definition: ge_kernel.h:66
int base
Definition: ge_kernel.h:82
u8 isBusy
Definition: ge_kernel.h:60
void * list
Definition: ge_kernel.h:68
SceGeStack * stack
Definition: ge_kernel.h:92
short cbId
Definition: ge_kernel.h:84
struct SceGeDisplayList * next
Definition: ge_kernel.h:52
u8 state
Definition: ge_kernel.h:56
SceGeContext * ctx
Definition: ge_kernel.h:64
void * stall
Definition: ge_kernel.h:70
int radr2
Definition: ge_kernel.h:74
int radr1
Definition: ge_kernel.h:72
short numStacks
Definition: ge_kernel.h:88
u8 signal
Definition: ge_kernel.h:58
Definition: ge_user.h:367
Definition: ge_kernel.h:97