remove const from TPL_OpenTPLFromMemory since the memory is altered
[libogc.git] / libogc / gx_regdef.h
blob82a0dd9852f687b1c582cc8470c3c3a97336545f
1 #ifndef __GX_REGDEF_H__
2 #define __GX_REGDEF_H__
4 #include <gctypes.h>
6 #define STRUCT_REGDEF_SIZE 1440
8 struct __gx_regdef
10 u16 cpSRreg;
11 u16 cpCRreg;
12 u16 cpCLreg;
13 u16 xfFlush;
14 u16 xfFlushExp;
15 u16 xfFlushSafe;
16 u32 gxFifoInited;
17 u32 vcdClear;
18 u32 VATTable;
19 u32 mtxIdxLo;
20 u32 mtxIdxHi;
21 u32 texCoordManually;
22 u32 vcdLo;
23 u32 vcdHi;
24 u32 vcdNrms;
25 u32 dirtyState;
26 u32 perf0Mode;
27 u32 perf1Mode;
28 u32 cpPerfMode;
29 u32 VAT0reg[8];
30 u32 VAT1reg[8];
31 u32 VAT2reg[8];
32 u32 texMapSize[8];
33 u32 texMapWrap[8];
34 u32 sciTLcorner;
35 u32 sciBRcorner;
36 u32 lpWidth;
37 u32 genMode;
38 u32 suSsize[8];
39 u32 suTsize[8];
40 u32 tevTexMap[16];
41 u32 tevColorEnv[16];
42 u32 tevAlphaEnv[16];
43 u32 tevSwapModeTable[8];
44 u32 tevRasOrder[11];
45 u32 tevTexCoordEnable;
46 u32 tevIndMask;
47 u32 texCoordGen[8];
48 u32 texCoordGen2[8];
49 u32 dispCopyCntrl;
50 u32 dispCopyDst;
51 u32 dispCopyTL;
52 u32 dispCopyWH;
53 u32 texCopyCntrl;
54 u32 texCopyDst;
55 u32 texCopyTL;
56 u32 texCopyWH;
57 u32 peZMode;
58 u32 peCMode0;
59 u32 peCMode1;
60 u32 peCntrl;
61 u32 chnAmbColor[2];
62 u32 chnMatColor[2];
63 u32 chnCntrl[4];
64 GXTexRegion texRegion[24];
65 GXTlutRegion tlutRegion[20];
66 u8 saveDLctx;
67 u8 gxFifoUnlinked;
68 u8 texCopyZTex;
69 u8 _pad;
70 } __attribute__((packed));
72 struct __gxfifo {
73 vu32 buf_start;
74 vu32 buf_end;
75 vu32 size;
76 vu32 hi_mark;
77 vu32 lo_mark;
78 vu32 rd_ptr;
79 vu32 wt_ptr;
80 vu32 rdwt_dst;
81 vu8 fifo_wrap;
82 vu8 cpufifo_ready;
83 vu8 gpfifo_ready;
84 u8 _pad[93];
85 } __attribute__((packed));
87 struct __gx_litobj
89 u32 _pad[3];
90 u32 col;
91 f32 a0;
92 f32 a1;
93 f32 a2;
94 f32 k0;
95 f32 k1;
96 f32 k2;
97 f32 px;
98 f32 py;
99 f32 pz;
100 f32 nx;
101 f32 ny;
102 f32 nz;
103 } __attribute__((packed));
105 struct __gx_texobj
107 u32 tex_filt;
108 u32 tex_lod;
109 u32 tex_size;
110 u32 tex_maddr;
111 u32 usr_data;
112 u32 tex_fmt;
113 u32 tex_tlut;
114 u16 tex_tile_cnt;
115 u8 tex_tile_type;
116 u8 tex_flag;
117 } __attribute__((packed));
119 struct __gx_tlutobj
121 u32 tlut_fmt;
122 u32 tlut_maddr;
123 u16 tlut_nentries;
124 u8 _pad[2];
125 } __attribute__((packed));
127 struct __gx_texregion
129 u32 tmem_even;
130 u32 tmem_odd;
131 u16 size_even;
132 u16 size_odd;
133 u8 ismipmap;
134 u8 iscached;
135 u8 _pad[2];
136 } __attribute__((packed));
138 struct __gx_tlutregion
140 u32 tmem_addr_conf;
141 u32 tmem_addr_base;
142 u32 tlut_maddr;
143 u16 tlut_nentries;
144 u8 _pad[2];
145 } __attribute__((packed));
147 #endif