292f9317 |
1 | /* |
2 | Copyright (C) 2003 Rice1964 |
3 | |
4 | This program is free software; you can redistribute it and/or |
5 | modify it under the terms of the GNU General Public License |
6 | as published by the Free Software Foundation; either version 2 |
7 | of the License, or (at your option) any later version. |
8 | |
9 | This program is distributed in the hope that it will be useful, |
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
12 | GNU General Public License for more details. |
13 | |
14 | You should have received a copy of the GNU General Public License |
15 | along with this program; if not, write to the Free Software |
16 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
17 | |
18 | */ |
19 | |
20 | #include "UcodeDefs.h" |
21 | |
22 | #ifndef _UCODE_H_ |
23 | #define _UCODE_H_ |
24 | |
25 | //typedef void (*RDPInstruction)(Gfx *gfx); |
26 | typedef void (*RDPInstruction)(Gfx*); |
27 | extern RDPInstruction *currentUcodeMap; |
28 | |
29 | typedef RDPInstruction UcodeMap[256] ; |
30 | |
31 | |
32 | //#define UcodeFunc(name) void name(uint32, uint32) |
33 | #define UcodeFunc(name) void name(Gfx*) |
34 | |
35 | UcodeFunc(RSP_RDP_Nothing); |
36 | |
37 | UcodeFunc(RSP_GBI0_Mtx); |
38 | UcodeFunc(RSP_Mtx_DKR); |
39 | UcodeFunc(RSP_GBI0_DL); |
40 | UcodeFunc(RSP_DL_In_MEM_DKR); |
41 | |
42 | UcodeFunc(RSP_GBI0_Vtx); |
43 | UcodeFunc(RSP_Vtx_DKR); |
44 | UcodeFunc(RSP_Vtx_WRUS); |
45 | UcodeFunc(RSP_Vtx_ShadowOfEmpire); |
46 | |
47 | UcodeFunc(RSP_GBI0_Tri4); |
48 | UcodeFunc(RSP_DMA_Tri_DKR); |
49 | UcodeFunc(DLParser_Set_Addr_Ucode6); |
50 | UcodeFunc(RSP_MoveWord_DKR); |
51 | |
52 | UcodeFunc(RSP_Vtx_PD); |
53 | UcodeFunc(RSP_Set_Vtx_CI_PD); |
54 | UcodeFunc(RSP_Tri4_PD); |
55 | |
56 | UcodeFunc(RSP_GBI0_Sprite2DBase); |
57 | UcodeFunc(RSP_GBI0_Sprite2DDraw); |
58 | UcodeFunc(RSP_GBI1_Sprite2DBase); |
59 | UcodeFunc(RSP_GBI1_Sprite2DScaleFlip); |
60 | UcodeFunc(RSP_GBI1_Sprite2DDraw); |
61 | UcodeFunc(RSP_GBI_Sprite2DBase); |
62 | UcodeFunc(RSP_GBI_Sprite2D_PuzzleMaster64); |
63 | |
64 | UcodeFunc(RSP_GBI1_SpNoop); |
65 | UcodeFunc(RSP_GBI1_Reserved); |
66 | UcodeFunc(RSP_GBI1_Vtx); |
67 | UcodeFunc(RSP_GBI1_MoveMem); |
68 | UcodeFunc(RSP_GBI1_RDPHalf_Cont); |
69 | UcodeFunc(RSP_GBI1_RDPHalf_2); |
70 | UcodeFunc(RSP_GBI1_RDPHalf_1); |
71 | UcodeFunc(RSP_GBI1_Line3D); |
72 | UcodeFunc(RSP_GBI1_ClearGeometryMode); |
73 | UcodeFunc(RSP_GBI1_SetGeometryMode); |
74 | UcodeFunc(RSP_GBI1_EndDL); |
75 | UcodeFunc(RSP_GBI1_SetOtherModeL); |
76 | UcodeFunc(RSP_GBI1_SetOtherModeH); |
77 | UcodeFunc(RSP_GBI1_Texture); |
78 | UcodeFunc(RSP_GBI1_MoveWord); |
79 | UcodeFunc(RSP_GBI1_PopMtx); |
80 | UcodeFunc(RSP_GBI1_CullDL); |
81 | UcodeFunc(RSP_GBI1_Tri1); |
82 | UcodeFunc(RSP_GBI1_Tri2); |
83 | UcodeFunc(RSP_GBI1_Noop); |
84 | UcodeFunc(RSP_GBI1_ModifyVtx); |
85 | UcodeFunc(RSP_GBI1_BranchZ); |
86 | UcodeFunc(RSP_GBI1_LoadUCode); |
87 | |
88 | UcodeFunc(DLParser_TexRect); |
89 | UcodeFunc(DLParser_TexRectFlip); |
90 | UcodeFunc(DLParser_RDPLoadSync); |
91 | UcodeFunc(DLParser_RDPPipeSync); |
92 | UcodeFunc(DLParser_RDPTileSync); |
93 | UcodeFunc(DLParser_RDPFullSync); |
94 | UcodeFunc(DLParser_SetKeyGB); |
95 | UcodeFunc(DLParser_SetKeyR); |
96 | UcodeFunc(DLParser_SetConvert); |
97 | UcodeFunc(DLParser_SetScissor); |
98 | UcodeFunc(DLParser_SetPrimDepth); |
99 | UcodeFunc(DLParser_RDPSetOtherMode); |
100 | UcodeFunc(DLParser_LoadTLut); |
101 | UcodeFunc(DLParser_SetTileSize); |
102 | UcodeFunc(DLParser_LoadBlock); |
103 | UcodeFunc(DLParser_LoadTile); |
104 | UcodeFunc(DLParser_SetTile); |
105 | UcodeFunc(DLParser_FillRect); |
106 | UcodeFunc(DLParser_SetFillColor); |
107 | UcodeFunc(DLParser_SetFogColor); |
108 | UcodeFunc(DLParser_SetBlendColor); |
109 | UcodeFunc(DLParser_SetPrimColor); |
110 | UcodeFunc(DLParser_SetEnvColor); |
111 | UcodeFunc(DLParser_SetCombine); |
112 | UcodeFunc(DLParser_SetTImg); |
113 | UcodeFunc(DLParser_SetZImg); |
114 | UcodeFunc(DLParser_SetCImg); |
115 | |
116 | UcodeFunc(RSP_GBI2_DL); |
117 | UcodeFunc(RSP_GBI2_CullDL); |
118 | UcodeFunc(RSP_GBI2_EndDL); |
119 | UcodeFunc(RSP_GBI2_MoveWord); |
120 | UcodeFunc(RSP_GBI2_Texture); |
121 | UcodeFunc(RSP_GBI2_GeometryMode); |
122 | UcodeFunc(RSP_GBI2_SetOtherModeL); |
123 | UcodeFunc(RSP_GBI2_SetOtherModeH); |
124 | UcodeFunc(RSP_GBI2_MoveMem); |
125 | UcodeFunc(RSP_GBI2_Mtx); |
126 | UcodeFunc(RSP_GBI2_PopMtx); |
127 | UcodeFunc(RSP_GBI2_Vtx); |
128 | UcodeFunc(RSP_GBI2_Tri1); |
129 | UcodeFunc(RSP_GBI2_Tri2); |
130 | UcodeFunc(RSP_GBI2_Line3D); |
131 | |
132 | UcodeFunc(RSP_GBI2_DL_Count); |
133 | UcodeFunc(RSP_GBI2_SubModule); |
134 | UcodeFunc(RSP_GBI2_0x8); |
135 | UcodeFunc(DLParser_Bomberman2TextRect); |
136 | |
137 | UcodeFunc(RSP_S2DEX_BG_1CYC_2); |
138 | UcodeFunc(RSP_S2DEX_OBJ_RENDERMODE_2); |
139 | |
140 | UcodeFunc(RSP_S2DEX_SPObjLoadTxtr_Ucode1); |
141 | |
142 | UcodeFunc( RSP_S2DEX_BG_1CYC); |
143 | UcodeFunc( RSP_S2DEX_BG_COPY); |
144 | UcodeFunc( RSP_S2DEX_OBJ_RECTANGLE); |
145 | UcodeFunc( RSP_S2DEX_OBJ_SPRITE); |
146 | UcodeFunc( RSP_S2DEX_OBJ_MOVEMEM); |
147 | UcodeFunc( RSP_S2DEX_SELECT_DL); |
148 | UcodeFunc( RSP_S2DEX_OBJ_RENDERMODE); |
149 | UcodeFunc( RSP_S2DEX_OBJ_RECTANGLE_R); |
150 | UcodeFunc( RSP_S2DEX_SPObjLoadTxtr); |
151 | UcodeFunc( RSP_S2DEX_SPObjLoadTxSprite); |
152 | UcodeFunc( RSP_S2DEX_SPObjLoadTxRect); |
153 | UcodeFunc( RSP_S2DEX_SPObjLoadTxRectR); |
154 | UcodeFunc( RSP_S2DEX_RDPHALF_0); |
155 | UcodeFunc( RSP_S2DEX_Yoshi_Unknown); |
156 | |
157 | UcodeFunc( RSP_RDP_InsertMatrix ); |
158 | UcodeFunc( RSP_S2DEX_SPObjLoadTxtr ); |
159 | |
160 | |
161 | |
162 | UcodeFunc(RDP_TriFill); |
163 | UcodeFunc(RDP_TriFillZ); |
164 | UcodeFunc(RDP_TriTxtr); |
165 | UcodeFunc(RDP_TriTxtrZ); |
166 | UcodeFunc(RDP_TriShade); |
167 | UcodeFunc(RDP_TriShadeZ); |
168 | UcodeFunc(RDP_TriShadeTxtr); |
169 | UcodeFunc(RDP_TriShadeTxtrZ); |
170 | |
171 | #ifdef DEBUGGER |
172 | const char* ucodeNames_GBI1[256] = |
173 | { |
174 | "RSP_SPNOOP", "RSP_MTX", "Reserved0", "RSP_MOVEMEM", |
175 | "RSP_VTX", "Reserved1", "RSP_DL", "Reserved2", |
176 | "RSP_RESERVED3", "RSP_SPRITE2D", "G_NOTHING", "G_NOTHING", |
177 | "G_NOTHING", "G_NOTHING", "G_NOTHING", "G_NOTHING", |
178 | //10 |
179 | "G_NOTHING", "G_NOTHING", "G_NOTHING", "G_NOTHING", |
180 | "G_NOTHING", "G_NOTHING", "G_NOTHING", "G_NOTHING", |
181 | "G_NOTHING", "G_NOTHING", "G_NOTHING", "G_NOTHING", |
182 | "G_NOTHING", "G_NOTHING", "G_NOTHING", "G_NOTHING", |
183 | //20 |
184 | "G_NOTHING", "G_NOTHING", "G_NOTHING", "G_NOTHING", |
185 | "G_NOTHING", "G_NOTHING", "G_NOTHING", "G_NOTHING", |
186 | "G_NOTHING", "G_NOTHING", "G_NOTHING", "G_NOTHING", |
187 | "G_NOTHING", "G_NOTHING", "G_NOTHING", "G_NOTHING", |
188 | //30 |
189 | "G_NOTHING", "G_NOTHING", "G_NOTHING", "G_NOTHING", |
190 | "G_NOTHING", "G_NOTHING", "G_NOTHING", "G_NOTHING", |
191 | "G_NOTHING", "G_NOTHING", "G_NOTHING", "G_NOTHING", |
192 | "G_NOTHING", "G_NOTHING", "G_NOTHING", "G_NOTHING", |
193 | //40 |
194 | "G_NOTHING", "G_NOTHING", "G_NOTHING", "G_NOTHING", |
195 | "G_NOTHING", "G_NOTHING", "G_NOTHING", "G_NOTHING", |
196 | "G_NOTHING", "G_NOTHING", "G_NOTHING", "G_NOTHING", |
197 | "G_NOTHING", "G_NOTHING", "G_NOTHING", "G_NOTHING", |
198 | //50 |
199 | "G_NOTHING", "G_NOTHING", "G_NOTHING", "G_NOTHING", |
200 | "G_NOTHING", "G_NOTHING", "G_NOTHING", "G_NOTHING", |
201 | "G_NOTHING", "G_NOTHING", "G_NOTHING", "G_NOTHING", |
202 | "G_NOTHING", "G_NOTHING", "G_NOTHING", "G_NOTHING", |
203 | //60 |
204 | "G_NOTHING", "G_NOTHING", "G_NOTHING", "G_NOTHING", |
205 | "G_NOTHING", "G_NOTHING", "G_NOTHING", "G_NOTHING", |
206 | "G_NOTHING", "G_NOTHING", "G_NOTHING", "G_NOTHING", |
207 | "G_NOTHING", "G_NOTHING", "G_NOTHING", "G_NOTHING", |
208 | //70 |
209 | "G_NOTHING", "G_NOTHING", "G_NOTHING", "G_NOTHING", |
210 | "G_NOTHING", "G_NOTHING", "G_NOTHING", "G_NOTHING", |
211 | "G_NOTHING", "G_NOTHING", "G_NOTHING", "G_NOTHING", |
212 | "G_NOTHING", "G_NOTHING", "G_NOTHING", "G_NOTHING", |
213 | |
214 | //80 |
215 | "G_NOTHING", "G_NOTHING", "G_NOTHING", "G_NOTHING", |
216 | "G_NOTHING", "G_NOTHING", "G_NOTHING", "G_NOTHING", |
217 | "G_NOTHING", "G_NOTHING", "G_NOTHING", "G_NOTHING", |
218 | "G_NOTHING", "G_NOTHING", "G_NOTHING", "G_NOTHING", |
219 | //90 |
220 | "G_NOTHING", "G_NOTHING", "G_NOTHING", "G_NOTHING", |
221 | "G_NOTHING", "G_NOTHING", "G_NOTHING", "G_NOTHING", |
222 | "G_NOTHING", "G_NOTHING", "G_NOTHING", "G_NOTHING", |
223 | "G_NOTHING", "G_NOTHING", "G_NOTHING", "G_NOTHING", |
224 | //A0 |
225 | "G_NOTHING", "G_NOTHING", "G_NOTHING", "G_NOTHING", |
226 | "G_NOTHING", "G_NOTHING", "G_NOTHING", "G_NOTHING", |
227 | "G_NOTHING", "G_NOTHING", "G_NOTHING", "G_NOTHING", |
228 | "G_NOTHING", "G_NOTHING", "G_NOTHING", "RSP_LOAD_UCODE", |
229 | //B0 |
230 | "RSP_BRANCH_Z", "RSP_TRI2", "G_MODIFY_VERTEX", "RSP_RDPHALF_2", |
231 | "RSP_RDPHALF_1", "RSP_LINE3D", "RSP_CLEARGEOMETRYMODE", "RSP_SETGEOMETRYMODE", |
232 | "RSP_ENDDL", "RSP_SETOTHERMODE_L", "RSP_SETOTHERMODE_H", "RSP_TEXTURE", |
233 | "RSP_MOVEWORD", "RSP_POPMTX", "RSP_CULLDL", "RSP_TRI1", |
234 | |
235 | //C0 |
236 | "RDP_NOOP", "G_NOTHING", "G_YS_UNK1", "G_NOTHING", |
237 | "G_NOTHING", "G_NOTHING", "G_NOTHING", "G_NOTHING", |
238 | "RDP_TriFill", "RDP_TriFillZ", "RDP_TriTxtr", "RDP_TriTxtrZ", |
239 | "RDP_TriShade", "RDP_TriShadeZ", "RDP_TriShadeTxtr", "RDP_TriShadeTxtrZ", |
240 | //D0 |
241 | "G_NOTHING", "G_NOTHING", "G_NOTHING", "G_NOTHING", |
242 | "G_NOTHING", "G_NOTHING", "G_NOTHING", "G_NOTHING", |
243 | "G_NOTHING", "G_NOTHING", "G_NOTHING", "G_NOTHING", |
244 | "G_NOTHING", "G_NOTHING", "G_NOTHING", "G_NOTHING", |
245 | //E0 |
246 | "G_NOTHING", "G_NOTHING", "G_NOTHING", "G_NOTHING", |
247 | "RDP_TEXRECT", "RDP_TEXRECT_FLIP", "RDP_LOADSYNC", "RDP_PIPESYNC", |
248 | "RDP_TILESYNC", "RDP_FULLSYNC", "RDP_SETKEYGB", "RDP_SETKEYR", |
249 | "RDP_SETCONVERT", "RDP_SETSCISSOR", "RDP_SETPRIMDEPTH", "RDP_RDPSETOTHERMODE", |
250 | //F0 |
251 | "RDP_LOADTLUT", "G_NOTHING", "RDP_SETTILESIZE", "RDP_LOADBLOCK", |
252 | "RDP_LOADTILE", "RDP_SETTILE", "RDP_FILLRECT", "RDP_SETFILLCOLOR", |
253 | "RDP_SETFOGCOLOR", "RDP_SETBLENDCOLOR", "RDP_SETPRIMCOLOR", "RDP_SETENVCOLOR", |
254 | "RDP_SETCOMBINE", "RDP_SETTIMG", "RDP_SETZIMG", "RDP_SETCIMG" |
255 | |
256 | |
257 | }; |
258 | |
259 | |
260 | const char* ucodeNames_GBI2[256] = |
261 | { |
262 | "NOOP", "GBI2_Vtx", "ModifyVtx", "GBI2_CullDL", |
263 | "BranchZ", "GBI2_Tri1", "GBI2_Tri2","GBI2_Line3D", |
264 | "Nothing", "ObjBG1CYC", "ObjBGCopy", "OBJ_RenderMode", |
265 | "Nothing", "Nothing", "Nothing", "Nothing", |
266 | //10 |
267 | "Nothing", "Nothing", "Nothing", "Nothing", |
268 | "Nothing", "Nothing", "Nothing", "Nothing", |
269 | "Nothing", "Nothing", "Nothing", "Nothing", |
270 | "Nothing", "Nothing", "Nothing", "Nothing", |
271 | //20 |
272 | "Nothing", "Nothing", "Nothing", "Nothing", |
273 | "Nothing", "Nothing", "Nothing", "Nothing", |
274 | "Nothing", "Nothing", "Nothing", "Nothing", |
275 | "Nothing", "Nothing", "Nothing", "Nothing", |
276 | //30 |
277 | "Nothing", "Nothing", "Nothing", "Nothing", |
278 | "Nothing", "Nothing", "Nothing", "Nothing", |
279 | "Nothing", "Nothing", "Nothing", "Nothing", |
280 | "Nothing", "Nothing", "Nothing", "Nothing", |
281 | //40 |
282 | "Nothing", "Nothing", "Nothing", "Nothing", |
283 | "Nothing", "Nothing", "Nothing", "Nothing", |
284 | "Nothing", "Nothing", "Nothing", "Nothing", |
285 | "Nothing", "Nothing", "Nothing", "Nothing", |
286 | //50 |
287 | "Nothing", "Nothing", "Nothing", "Nothing", |
288 | "Nothing", "Nothing", "Nothing", "Nothing", |
289 | "Nothing", "Nothing", "Nothing", "Nothing", |
290 | "Nothing", "Nothing", "Nothing", "Nothing", |
291 | //60 |
292 | "Nothing", "Nothing", "Nothing", "Nothing", |
293 | "Nothing", "Nothing", "Nothing", "Nothing", |
294 | "Nothing", "Nothing", "Nothing", "Nothing", |
295 | "Nothing", "Nothing", "Nothing", "Nothing", |
296 | //70 |
297 | "Nothing", "Nothing", "Nothing", "Nothing", |
298 | "Nothing", "Nothing", "Nothing", "Nothing", |
299 | "Nothing", "Nothing", "Nothing", "Nothing", |
300 | "Nothing", "Nothing", "Nothing", "Nothing", |
301 | |
302 | //80 |
303 | "Nothing", "Nothing", "Nothing", "Nothing", |
304 | "Nothing", "Nothing", "Nothing", "Nothing", |
305 | "Nothing", "Nothing", "Nothing", "Nothing", |
306 | "Nothing", "Nothing", "Nothing", "Nothing", |
307 | //90 |
308 | "Nothing", "Nothing", "Nothing", "Nothing", |
309 | "Nothing", "Nothing", "Nothing", "Nothing", |
310 | "Nothing", "Nothing", "Nothing", "Nothing", |
311 | "Nothing", "Nothing", "Nothing", "Nothing", |
312 | //a0 |
313 | "Nothing", "Nothing", "Nothing", "Nothing", |
314 | "Nothing", "Nothing", "Nothing", "Nothing", |
315 | "Nothing", "Nothing", "Nothing", "Nothing", |
316 | "Nothing", "Nothing", "Nothing", "Load_Ucode", |
317 | //b0 |
318 | "BranchZ", "Tri2_Goldeneye", "ModifyVtx", "RDPHalf_2", |
319 | "RDPHalf_1", "Line3D", "ClearGeometryMode", "SetGeometryMode", |
320 | "EndDL", "SetOtherMode_L", "SetOtherMode_H", "Texture", |
321 | "MoveWord", "PopMtx", "CullDL", "Tri1", |
322 | |
323 | //c0 |
324 | "Nothing", "Nothing", "Nothing", "Nothing", |
325 | "Nothing", "Nothing", "Nothing", "Nothing", |
326 | "RDP_TriFill", "RDP_TriFillZ", "RDP_TriTxtr", "RDP_TriTxtrZ", |
327 | "RDP_TriShade", "RDP_TriShadeZ", "RDP_TriShadeTxtr", "RDP_TriShadeTxtrZ", |
328 | //d0 |
329 | "Nothing", "Nothing", "Nothing", "Nothing", |
330 | "Nothing", "GBI2_DL_N", "GBI2_SubModule", "GBI2_Texture", |
331 | "GBI2_PopMtx", "GBI2_SetGeometryMode", "GBI2_Mtx", "GBI2_MoveWord", |
332 | "GBI2_MoveMem", "Load_Ucode", "GBI2_DL", "GBI2_EndDL", |
333 | //e0 |
334 | "SPNOOP", "RDPHalf_1", "GBI2_SetOtherMode_L", "GBI2_SetOtherMode_H", |
335 | "TexRect", "TexRectFlip", "RDPLoadSync", "RDPPipeSync", |
336 | "RDPTileSync", "RDPFullSync", "SetKeyGB", "SetKeyR", |
337 | "SetConvert", "SetScissor", "SetPrimDepth", "RDPSetOtherMode", |
338 | //f0 |
339 | "LoadTLut", "Nothing", "SetTileSize", "LoadBlock", |
340 | "LoadTile", "SetTile", "FillRect", "SetFillColor", |
341 | "SetFogColor", "SetBlendColor", "SetPrimColor", "SetEnvColor", |
342 | "SetCombine", "SetTImg", "SetZImg", "SetCImg", |
343 | }; |
344 | #endif |
345 | |
346 | |
347 | typedef RDPInstruction UcodeMap[256] ; |
348 | |
349 | // Ucode: F3DEX, for most games |
350 | UcodeMap ucodeMap1 = |
351 | { |
352 | RSP_GBI1_SpNoop, RSP_GBI0_Mtx, RSP_GBI1_Reserved, RSP_GBI1_MoveMem, |
353 | RSP_GBI1_Vtx, RSP_GBI1_Reserved, RSP_GBI0_DL, RSP_GBI1_Reserved, |
354 | RSP_GBI1_Reserved, RSP_GBI1_Sprite2DBase, RSP_RDP_Nothing, RSP_RDP_Nothing, |
355 | RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, |
356 | //10 |
357 | RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, |
358 | RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, |
359 | RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, |
360 | RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, |
361 | //20 |
362 | RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, |
363 | RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, |
364 | RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, |
365 | RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, |
366 | //30 |
367 | RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, |
368 | RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, |
369 | RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, |
370 | RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, |
371 | //40 |
372 | RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, |
373 | RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, |
374 | RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, |
375 | RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, |
376 | //50 |
377 | RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, |
378 | RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, |
379 | RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, |
380 | RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, |
381 | //60 |
382 | RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, |
383 | RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, |
384 | RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, |
385 | RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, |
386 | //70 |
387 | RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, |
388 | RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, |
389 | RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, |
390 | RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, |
391 | |
392 | //80 |
393 | RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, |
394 | RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, |
395 | RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, |
396 | RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, |
397 | //90 |
398 | RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, |
399 | RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, |
400 | RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, |
401 | RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, |
402 | //a0 |
403 | RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, |
404 | RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, |
405 | RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, |
406 | RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_GBI1_LoadUCode, |
407 | //b0 |
408 | RSP_GBI1_BranchZ, RSP_GBI1_Tri2, RSP_GBI1_ModifyVtx, RSP_GBI1_RDPHalf_2, |
409 | RSP_GBI1_RDPHalf_1, RSP_GBI1_Line3D, RSP_GBI1_ClearGeometryMode, RSP_GBI1_SetGeometryMode, |
410 | RSP_GBI1_EndDL, RSP_GBI1_SetOtherModeL, RSP_GBI1_SetOtherModeH, RSP_GBI1_Texture, |
411 | RSP_GBI1_MoveWord, RSP_GBI1_PopMtx, RSP_GBI1_CullDL, RSP_GBI1_Tri1, |
412 | |
413 | //c0 |
414 | RSP_GBI1_Noop, RSP_S2DEX_SPObjLoadTxtr_Ucode1, RSP_RDP_Nothing, RSP_RDP_Nothing, |
415 | RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, |
416 | RDP_TriFill, RDP_TriFillZ, RDP_TriTxtr, RDP_TriTxtrZ, |
417 | RDP_TriShade, RDP_TriShadeZ, RDP_TriShadeTxtr, RDP_TriShadeTxtrZ, |
418 | //d0 |
419 | RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, |
420 | RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, |
421 | RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, |
422 | RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, |
423 | //e0 |
424 | RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, |
425 | DLParser_TexRect, DLParser_TexRectFlip, DLParser_RDPLoadSync, DLParser_RDPPipeSync, |
426 | DLParser_RDPTileSync, DLParser_RDPFullSync, DLParser_SetKeyGB, DLParser_SetKeyR, |
427 | DLParser_SetConvert, DLParser_SetScissor, DLParser_SetPrimDepth, DLParser_RDPSetOtherMode, |
428 | //f0 |
429 | DLParser_LoadTLut, RSP_RDP_Nothing, DLParser_SetTileSize, DLParser_LoadBlock, |
430 | DLParser_LoadTile, DLParser_SetTile, DLParser_FillRect, DLParser_SetFillColor, |
431 | DLParser_SetFogColor, DLParser_SetBlendColor, DLParser_SetPrimColor, DLParser_SetEnvColor, |
432 | DLParser_SetCombine, DLParser_SetTImg, DLParser_SetZImg, DLParser_SetCImg |
433 | }; |
434 | |
435 | |
436 | UcodeMap ucodeMap0= |
437 | { |
438 | RSP_GBI1_SpNoop, RSP_GBI0_Mtx, RSP_GBI1_Reserved, RSP_GBI1_MoveMem, |
439 | RSP_GBI0_Vtx, RSP_GBI1_Reserved, RSP_GBI0_DL, RSP_GBI1_Reserved, |
440 | RSP_GBI1_Reserved, RSP_GBI0_Sprite2DBase, RSP_RDP_Nothing, RSP_RDP_Nothing, |
441 | RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, |
442 | //10 |
443 | RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, |
444 | RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, |
445 | RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, |
446 | RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, |
447 | //20 |
448 | RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, |
449 | RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, |
450 | RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, |
451 | RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, |
452 | //30 |
453 | RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, |
454 | RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, |
455 | RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, |
456 | RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, |
457 | //40 |
458 | RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, |
459 | RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, |
460 | RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, |
461 | RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, |
462 | //50 |
463 | RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, |
464 | RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, |
465 | RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, |
466 | RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, |
467 | //60 |
468 | RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, |
469 | RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, |
470 | RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, |
471 | RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, |
472 | //70 |
473 | RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, |
474 | RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, |
475 | RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, |
476 | RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, |
477 | |
478 | //80 |
479 | RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, |
480 | RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, |
481 | RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, |
482 | RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, |
483 | //90 |
484 | RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, |
485 | RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, |
486 | RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, |
487 | RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, |
488 | //a0 |
489 | RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, |
490 | RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, |
491 | RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, |
492 | RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, |
493 | //b0 |
494 | RSP_RDP_Nothing, RSP_GBI0_Tri4, RSP_GBI1_RDPHalf_Cont, RSP_GBI1_RDPHalf_2, |
495 | RSP_GBI1_RDPHalf_1, RSP_GBI1_Line3D, RSP_GBI1_ClearGeometryMode, RSP_GBI1_SetGeometryMode, |
496 | RSP_GBI1_EndDL, RSP_GBI1_SetOtherModeL, RSP_GBI1_SetOtherModeH, RSP_GBI1_Texture, |
497 | RSP_GBI1_MoveWord, RSP_GBI1_PopMtx, RSP_GBI1_CullDL, RSP_GBI1_Tri1, |
498 | |
499 | //c0 |
500 | RSP_GBI1_Noop, RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, |
501 | RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, |
502 | RDP_TriFill, RDP_TriFillZ, RDP_TriTxtr, RDP_TriTxtrZ, |
503 | RDP_TriShade, RDP_TriShadeZ, RDP_TriShadeTxtr, RDP_TriShadeTxtrZ, |
504 | //d0 |
505 | RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, |
506 | RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, |
507 | RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, |
508 | RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, |
509 | //e0 |
510 | RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, |
511 | DLParser_TexRect, DLParser_TexRectFlip, DLParser_RDPLoadSync, DLParser_RDPPipeSync, |
512 | DLParser_RDPTileSync, DLParser_RDPFullSync, DLParser_SetKeyGB, DLParser_SetKeyR, |
513 | DLParser_SetConvert, DLParser_SetScissor, DLParser_SetPrimDepth, DLParser_RDPSetOtherMode, |
514 | //f0 |
515 | DLParser_LoadTLut, RSP_RDP_Nothing, DLParser_SetTileSize, DLParser_LoadBlock, |
516 | DLParser_LoadTile, DLParser_SetTile, DLParser_FillRect, DLParser_SetFillColor, |
517 | DLParser_SetFogColor, DLParser_SetBlendColor, DLParser_SetPrimColor, DLParser_SetEnvColor, |
518 | DLParser_SetCombine, DLParser_SetTImg, DLParser_SetZImg, DLParser_SetCImg |
519 | }; |
520 | |
521 | // Zelda and new games, F3DEX_GBI_2 |
522 | UcodeMap ucodeMap5= |
523 | { |
524 | RSP_GBI1_Noop, RSP_GBI2_Vtx, RSP_GBI1_ModifyVtx, RSP_GBI2_CullDL, |
525 | RSP_GBI1_BranchZ, RSP_GBI2_Tri1, RSP_GBI2_Tri2, RSP_GBI2_Line3D, |
526 | RSP_GBI2_0x8, RSP_S2DEX_BG_1CYC, RSP_S2DEX_BG_COPY, RSP_S2DEX_OBJ_RENDERMODE, |
527 | RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, |
528 | //10 |
529 | RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, |
530 | RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, |
531 | RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, |
532 | RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, |
533 | //20 |
534 | RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, |
535 | RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, |
536 | RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, |
537 | RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, |
538 | //30 |
539 | RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, |
540 | RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, |
541 | RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, |
542 | RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, |
543 | //40 |
544 | RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, |
545 | RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, |
546 | RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, |
547 | RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, |
548 | //50 |
549 | RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, |
550 | RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, |
551 | RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, |
552 | RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, |
553 | //60 |
554 | RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, |
555 | RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, |
556 | RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, |
557 | RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, |
558 | //70 |
559 | RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, |
560 | RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, |
561 | RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, |
562 | RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, |
563 | |
564 | //80 |
565 | RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, |
566 | RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, |
567 | RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, |
568 | RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, |
569 | //90 |
570 | RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, |
571 | RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, |
572 | RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, |
573 | RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, |
574 | //a0 |
575 | RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, |
576 | RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, |
577 | RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, |
578 | RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_GBI1_LoadUCode, |
579 | //b0 |
580 | RSP_GBI1_BranchZ, RSP_GBI0_Tri4, RSP_GBI1_ModifyVtx, RSP_GBI1_RDPHalf_2, |
581 | RSP_GBI1_RDPHalf_1, RSP_GBI1_Line3D, RSP_GBI1_ClearGeometryMode, RSP_GBI1_SetGeometryMode, |
582 | RSP_GBI1_EndDL, RSP_GBI1_SetOtherModeL, RSP_GBI1_SetOtherModeH, RSP_GBI1_Texture, |
583 | RSP_GBI1_MoveWord, RSP_GBI1_PopMtx, RSP_GBI1_CullDL, RSP_GBI1_Tri1, |
584 | |
585 | //c0 |
586 | RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, |
587 | RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, |
588 | RDP_TriFill, RDP_TriFillZ, RDP_TriTxtr, RDP_TriTxtrZ, |
589 | RDP_TriShade, RDP_TriShadeZ, RDP_TriShadeTxtr, RDP_TriShadeTxtrZ, |
590 | //d0 |
591 | RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, |
592 | RSP_RDP_Nothing, RSP_GBI2_DL_Count, RSP_GBI2_SubModule, RSP_GBI2_Texture, |
593 | RSP_GBI2_PopMtx, RSP_GBI2_GeometryMode, RSP_GBI2_Mtx, RSP_GBI2_MoveWord, |
594 | RSP_GBI2_MoveMem, RSP_GBI1_LoadUCode, RSP_GBI2_DL, RSP_GBI2_EndDL, |
595 | //e0 |
596 | RSP_GBI1_SpNoop, RSP_GBI1_RDPHalf_1, RSP_GBI2_SetOtherModeL, RSP_GBI2_SetOtherModeH, |
597 | DLParser_TexRect, DLParser_TexRectFlip, DLParser_RDPLoadSync, DLParser_RDPPipeSync, |
598 | DLParser_RDPTileSync, DLParser_RDPFullSync, DLParser_SetKeyGB, DLParser_SetKeyR, |
599 | DLParser_SetConvert, DLParser_SetScissor, DLParser_SetPrimDepth, DLParser_RDPSetOtherMode, |
600 | //f0 |
601 | DLParser_LoadTLut, RSP_RDP_Nothing, DLParser_SetTileSize, DLParser_LoadBlock, |
602 | DLParser_LoadTile, DLParser_SetTile, DLParser_FillRect, DLParser_SetFillColor, |
603 | DLParser_SetFogColor, DLParser_SetBlendColor, DLParser_SetPrimColor, DLParser_SetEnvColor, |
604 | DLParser_SetCombine, DLParser_SetTImg, DLParser_SetZImg, DLParser_SetCImg |
605 | }; |
606 | |
607 | |
608 | // S2DEX 1.-- |
609 | UcodeMap ucodeMap7= |
610 | { |
611 | RSP_GBI1_SpNoop, RSP_S2DEX_BG_1CYC_2, RSP_S2DEX_BG_COPY, RSP_S2DEX_OBJ_RECTANGLE, |
612 | RSP_S2DEX_OBJ_SPRITE, RSP_S2DEX_OBJ_MOVEMEM, RSP_GBI0_DL, RSP_GBI1_Reserved, |
613 | RSP_GBI1_Reserved, RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, |
614 | RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, |
615 | |
616 | //10 |
617 | RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, |
618 | RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, |
619 | RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, |
620 | RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, |
621 | //20 |
622 | RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, |
623 | RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, |
624 | RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, |
625 | RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, |
626 | //30 |
627 | RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, |
628 | RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, |
629 | RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, |
630 | RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, |
631 | //40 |
632 | RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, |
633 | RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, |
634 | RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, |
635 | RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, |
636 | //50 |
637 | RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, |
638 | RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, |
639 | RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, |
640 | RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, |
641 | //60 |
642 | RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, |
643 | RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, |
644 | RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, |
645 | RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, |
646 | //70 |
647 | RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, |
648 | RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, |
649 | RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, |
650 | RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, |
651 | |
652 | //80 |
653 | RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, |
654 | RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, |
655 | RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, |
656 | RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, |
657 | //90 |
658 | RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, |
659 | RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, |
660 | RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, |
661 | RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, |
662 | //a0 |
663 | RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, |
664 | RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, |
665 | RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, |
666 | RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_GBI1_LoadUCode, |
667 | //b0 |
668 | RSP_S2DEX_SELECT_DL, RSP_S2DEX_OBJ_RENDERMODE_2, RSP_S2DEX_OBJ_RECTANGLE_R, RSP_GBI1_RDPHalf_2, |
669 | RSP_GBI1_RDPHalf_1, RSP_GBI1_Line3D, RSP_GBI1_ClearGeometryMode, RSP_GBI1_SetGeometryMode, |
670 | RSP_GBI1_EndDL, RSP_GBI1_SetOtherModeL, RSP_GBI1_SetOtherModeH, RSP_GBI1_Texture, |
671 | RSP_GBI1_MoveWord, RSP_GBI1_PopMtx, RSP_GBI1_CullDL, RSP_GBI1_Tri1, |
672 | |
673 | //c0 |
674 | RSP_GBI1_Noop, RSP_S2DEX_SPObjLoadTxtr, RSP_S2DEX_SPObjLoadTxSprite, RSP_S2DEX_SPObjLoadTxRect, |
675 | RSP_S2DEX_SPObjLoadTxRectR, RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, |
676 | RDP_TriFill, RDP_TriFillZ, RDP_TriTxtr, RDP_TriTxtrZ, |
677 | RDP_TriShade, RDP_TriShadeZ, RDP_TriShadeTxtr, RDP_TriShadeTxtrZ, |
678 | //d0 |
679 | RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, |
680 | RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, |
681 | RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, |
682 | RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, |
683 | //e0 |
684 | RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, |
685 | RSP_S2DEX_RDPHALF_0, DLParser_TexRectFlip, DLParser_RDPLoadSync, DLParser_RDPPipeSync, |
686 | DLParser_RDPTileSync, DLParser_RDPFullSync, DLParser_SetKeyGB, DLParser_SetKeyR, |
687 | DLParser_SetConvert, DLParser_SetScissor, DLParser_SetPrimDepth, DLParser_RDPSetOtherMode, |
688 | //f0 |
689 | DLParser_LoadTLut, RSP_RDP_Nothing, DLParser_SetTileSize, DLParser_LoadBlock, |
690 | DLParser_LoadTile, DLParser_SetTile, DLParser_FillRect, DLParser_SetFillColor, |
691 | DLParser_SetFogColor, DLParser_SetBlendColor, DLParser_SetPrimColor, DLParser_SetEnvColor, |
692 | DLParser_SetCombine, DLParser_SetTImg, DLParser_SetZImg, DLParser_SetCImg |
693 | }; |
694 | |
695 | // Ucode 3 - S2DEX GBI2 |
696 | UcodeMap ucodeMap3= |
697 | { |
698 | RSP_GBI1_Noop, RSP_S2DEX_OBJ_RECTANGLE, RSP_S2DEX_OBJ_SPRITE, RSP_GBI2_CullDL, |
699 | RSP_S2DEX_SELECT_DL, RSP_S2DEX_SPObjLoadTxtr, RSP_S2DEX_SPObjLoadTxSprite, RSP_S2DEX_SPObjLoadTxRect, |
700 | RSP_S2DEX_SPObjLoadTxRectR, RSP_S2DEX_BG_1CYC, RSP_S2DEX_BG_COPY, RSP_S2DEX_OBJ_RENDERMODE, |
701 | RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, |
702 | //10 |
703 | RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, |
704 | RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, |
705 | RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, |
706 | RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, |
707 | //20 |
708 | RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, |
709 | RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, |
710 | RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, |
711 | RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, |
712 | //30 |
713 | RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, |
714 | RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, |
715 | RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, |
716 | RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, |
717 | //40 |
718 | RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, |
719 | RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, |
720 | RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, |
721 | RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, |
722 | //50 |
723 | RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, |
724 | RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, |
725 | RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, |
726 | RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, |
727 | //60 |
728 | RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, |
729 | RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, |
730 | RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, |
731 | RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, |
732 | //70 |
733 | RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, |
734 | RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, |
735 | RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, |
736 | RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, |
737 | |
738 | //80 |
739 | RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, |
740 | RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, |
741 | RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, |
742 | RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, |
743 | //90 |
744 | RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, |
745 | RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, |
746 | RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, |
747 | RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, |
748 | //a0 |
749 | RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, |
750 | RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, |
751 | RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, |
752 | RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_GBI1_LoadUCode, |
753 | //b0 |
754 | RSP_GBI1_BranchZ, RSP_GBI0_Tri4, RSP_GBI1_ModifyVtx, RSP_GBI1_RDPHalf_2, |
755 | RSP_GBI1_RDPHalf_1, RSP_GBI1_Line3D, RSP_GBI1_ClearGeometryMode, RSP_GBI1_SetGeometryMode, |
756 | RSP_GBI1_EndDL, RSP_GBI1_SetOtherModeL, RSP_GBI1_SetOtherModeH, RSP_GBI1_Texture, |
757 | RSP_GBI1_MoveWord, RSP_GBI1_PopMtx, RSP_GBI1_CullDL, RSP_GBI1_Tri1, |
758 | |
759 | //c0 |
760 | RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, |
761 | RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, |
762 | RDP_TriFill, RDP_TriFillZ, RDP_TriTxtr, RDP_TriTxtrZ, |
763 | RDP_TriShade, RDP_TriShadeZ, RDP_TriShadeTxtr, RDP_TriShadeTxtrZ, |
764 | //d0 |
765 | RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, RSP_RDP_Nothing, |
766 | RSP_RDP_Nothing, RSP_GBI2_DL_Count, RSP_GBI2_SubModule, RSP_GBI2_Texture, |
767 | RSP_GBI2_PopMtx, RSP_GBI2_GeometryMode, RSP_GBI2_Mtx, RSP_GBI2_MoveWord, |
768 | RSP_GBI2_MoveMem, RSP_GBI1_LoadUCode, RSP_GBI2_DL, RSP_GBI2_EndDL, |
769 | //e0 |
770 | RSP_GBI1_SpNoop, RSP_GBI1_RDPHalf_1, RSP_GBI2_SetOtherModeL, RSP_GBI2_SetOtherModeH, |
771 | DLParser_TexRect, DLParser_TexRectFlip, DLParser_RDPLoadSync, DLParser_RDPPipeSync, |
772 | DLParser_RDPTileSync, DLParser_RDPFullSync, DLParser_SetKeyGB, DLParser_SetKeyR, |
773 | DLParser_SetConvert, DLParser_SetScissor, DLParser_SetPrimDepth, DLParser_RDPSetOtherMode, |
774 | //f0 |
775 | DLParser_LoadTLut, RSP_RDP_Nothing, DLParser_SetTileSize, DLParser_LoadBlock, |
776 | DLParser_LoadTile, DLParser_SetTile, DLParser_FillRect, DLParser_SetFillColor, |
777 | DLParser_SetFogColor, DLParser_SetBlendColor, DLParser_SetPrimColor, DLParser_SetEnvColor, |
778 | DLParser_SetCombine, DLParser_SetTImg, DLParser_SetZImg, DLParser_SetCImg |
779 | }; |
780 | |
781 | RDPInstruction *currentUcodeMap = ucodeMap1; |
782 | |
783 | #endif |
784 | |