/[pcsx2_0.9.7]/branch/debug/0.X/0.9.X/0.9.7/ramdump-lateset/plugins/zzogl-pg/opengl/Regs.cpp
ViewVC logotype

Contents of /branch/debug/0.X/0.9.X/0.9.7/ramdump-lateset/plugins/zzogl-pg/opengl/Regs.cpp

Parent Directory Parent Directory | Revision Log Revision Log


Revision 330 - (show annotations) (download)
Tue Dec 28 04:24:23 2010 UTC (9 years, 9 months ago) by william
File size: 28943 byte(s)
merged upstream r4154-r4160
1 /* ZZ Open GL graphics plugin
2 * Copyright (c)2009-2010 zeydlitz@gmail.com, arcum42@gmail.com
3 * Based on Zerofrog's ZeroGS KOSMOS (c)2005-2008
4 *
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2 of the License, or
8 * (at your option) any later version.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
18 */
19
20 #include "GS.h"
21 #include "Mem.h"
22 #include "Regs.h"
23 #include "PS2Etypes.h"
24
25 #include "targets.h"
26 #include "ZZoglVB.h"
27 #include "ZZoglDrawing.h"
28
29 #ifdef USE_OLD_REGS
30
31 #ifdef _MSC_VER
32 #pragma warning(disable:4244)
33 #endif
34
35 GIFRegHandler g_GIFPackedRegHandlers[16];
36 GIFRegHandler g_GIFRegHandlers[256];
37 GIFRegHandler g_GIFTempRegHandlers[16] = {0};
38
39 // values for keeping track of changes
40 u32 s_uTex1Data[2][2] = {{0, }};
41 u32 s_uClampData[2] = {0, };
42
43 //u32 results[65535] = {0, };
44
45 // Note that not all the registers are currently handled, even if they write values out.
46 // For reference, I'm starting a list of unhandled flags here. I'm sure I missed some,
47 // so feel free to add to this, or remove ones that are handled that I missed.
48 // Cases where these values are set would be useful, too.
49 //
50 // In GIFRegHandlerFOG, I don't see gs.vertexregs.f being used anywhere afterwards.
51 // GIFRegHandlerTEX1 doesn't look like anything other then mmag and mmin are handled.
52 // This includes:
53 // lcm - the lod (level of detail) calculation method. If 0, it's (log2(1/|Q|)<<L)+K), whereas if it is one, it's just K.
54 // mxl - This is what MIPMAP level we use. The default is 0, and any other level uses miptbp0 & 1 to get the texture width.
55 // mtba - this is the base address specification for MIPMAP level 1+.
56 // l - Yeah, this is for the LOD calculation.
57 // k - This too.
58 // This largely sums up as that we don't support MIPMAP level 1+ (much like GSdx), and LOD.
59 //
60 // In GIFRegHandlerSCANMSK, it doesn't look like gs.smask is used, though it may have been in the old resolve code.
61 // Lets see: 00 is normal drawing, 01 is reserved, 10 prohibits drawing to even y coords, and 11 prohibits drawing to odd y coords.
62 //
63 // In GIFRegHandlerMIPTBP1 & 2, both miptbp0 & miptbp1 look unused, which isn't suprising, given mxl not being checked.
64 //
65 // GIFRegHandlerDIMX doesn't even have any code in it!
66 // This is supposed to read in the matrix for dithering.
67 //
68 // In GIFRegHandlerDTHE, nothing is done with gs.dthe.
69 // This goes right with the last one, because dthe is set to 1 when dithering with the dthe matrix.
70
71 // In GIFRegHandlerCOLCLAMP, gs.colclamp is not used.
72 // This is color clamping on the RGB value. If it's 0, it is set to mask, the lower 8 bits are enabled, and it wraps around. At 1, it is clamped from 0-255.
73
74 //#define SPAM_UNUSED_REGISTERS
75 #ifdef SPAM_UNUSED_REGISTERS
76 #define REG_LOG ZZLog::Error_Log
77 #else
78 #define REG_LOG 0 &&
79 #endif
80
81 void __gifCall GIFPackedRegHandlerNull(const u32* data)
82 {
83 FUNCLOG
84 ZZLog::Debug_Log("Unexpected packed reg handler %8.8lx_%8.8lx %x.", data[0], data[1], data[2]);
85 }
86
87 // All these just call their non-packed equivalent.
88 void __gifCall GIFPackedRegHandlerPRIM(const u32* data) { GIFRegHandlerPRIM(data); }
89
90 template <u32 ctxt>
91 void __gifCall GIFPackedRegHandlerTEX0(const u32* data) { GIFRegHandlerTEX0<ctxt>(data); }
92
93 template <u32 ctxt>
94 void __gifCall GIFPackedRegHandlerCLAMP(const u32* data) { GIFRegHandlerCLAMP<ctxt>(data); }
95
96 void __gifCall GIFPackedRegHandlerXYZF3(const u32* data) { GIFRegHandlerXYZF3(data); }
97 void __gifCall GIFPackedRegHandlerXYZ3(const u32* data) { GIFRegHandlerXYZ3(data); }
98
99 void __gifCall GIFPackedRegHandlerRGBA(const u32* data)
100 {
101 FUNCLOG
102 GIFPackedRGBA* r = (GIFPackedRGBA*)(data);
103 gs.rgba = (r->R | (r->G << 8) | (r->B << 16) | (r->A << 24));
104 gs.vertexregs.rgba = gs.rgba;
105 gs.vertexregs.q = gs.q;
106 }
107
108 void __gifCall GIFPackedRegHandlerSTQ(const u32* data)
109 {
110 FUNCLOG
111 // GIFPackedSTQ* r = (GIFPackedSTQ*)(data);
112 // gs.vertexregs.s = r->S;
113 // gs.vertexregs.t = r->T;
114 // gs.q = r->Q;
115 // Despite this code generating a warning, it's correct. float -> float reduction. S and Y are missed mantissas.
116 *(u32*)&gs.vertexregs.s = data[0] & 0xffffff00;
117 *(u32*)&gs.vertexregs.t = data[1] & 0xffffff00;
118 *(u32*)&gs.q = data[2];
119 }
120
121 void __gifCall GIFPackedRegHandlerUV(const u32* data)
122 {
123 FUNCLOG
124 GIFPackedUV* r = (GIFPackedUV*)(data);
125
126 gs.vertexregs.u = r->U;
127 gs.vertexregs.v = r->V;
128 }
129
130 void __gifCall GIFPackedRegHandlerXYZF2(const u32* data)
131 {
132 FUNCLOG
133 GIFPackedXYZF2* r = (GIFPackedXYZF2*)(data);
134 gs.add_vertex(r->X, r->Y,r->Z, r->F);
135
136 ZZKick->KickVertex(!!(r->ADC));
137 }
138
139 void __gifCall GIFPackedRegHandlerXYZ2(const u32* data)
140 {
141 FUNCLOG
142 GIFPackedXYZ2* r = (GIFPackedXYZ2*)(data);
143 gs.add_vertex(r->X, r->Y,r->Z);
144
145 ZZKick->KickVertex(!!(r->ADC));
146 }
147
148 void __gifCall GIFPackedRegHandlerFOG(const u32* data)
149 {
150 FUNCLOG
151 GIFPackedFOG* r = (GIFPackedFOG*)(data);
152 gs.vertexregs.f = r->F;
153 // gs.vertexregs.f = (data[3] & 0xff0) >> 4;
154 if (gs.vertexregs.f != 0) REG_LOG("GIFPackedRegHandlerFOG == %d", gs.vertexregs.f);
155 }
156
157 void __gifCall GIFPackedRegHandlerA_D(const u32* data)
158 {
159 FUNCLOG
160
161 if ((data[2] & 0xff) < 100)
162 g_GIFRegHandlers[data[2] & 0xff](data);
163 else
164 GIFRegHandlerNull(data);
165 }
166
167 void __gifCall GIFPackedRegHandlerNOP(const u32* data)
168 {
169 FUNCLOG
170 }
171
172 void __gifCall GIFRegHandlerNull(const u32* data)
173 {
174 FUNCLOG
175 #ifdef _DEBUG
176
177 if ((((uptr)&data[2])&0xffff) == 0) return;
178
179 // 0x7f happens on a lot of games
180 if (data[2] != 0x7f && (data[0] || data[1]))
181 {
182 ZZLog::Debug_Log("Unexpected reg handler %x %x %x.", data[0], data[1], data[2]);
183 }
184
185 #endif
186 }
187
188 void __gifCall GIFRegHandlerPRIM(const u32 *data)
189 {
190 FUNCLOG
191
192 //if (data[0] & ~0x3ff)
193 //{
194 //ZZLog::Warn_Log("Warning: unknown bits in prim %8.8lx_%8.8lx", data[1], data[0]);
195 //}
196
197
198 gs.primC = 0;
199 u16 prim_type = (data[0]) & 0x7;
200 prim->prim = prim_type;
201 gs._prim[0].prim = prim_type;
202 gs._prim[1].prim = prim_type;
203 gs._prim[1]._val = (data[0] >> 3) & 0xff;
204
205 gs.new_tri_fan = !(prim_type ^ PRIM_TRIANGLE_FAN);
206 ZZKick->DirtyValidPrevPrim();
207
208 Prim();
209 }
210
211 void __gifCall GIFRegHandlerRGBAQ(const u32* data)
212 {
213 FUNCLOG
214 gs.rgba = data[0];
215 gs.vertexregs.rgba = data[0];
216 *(u32*)&gs.vertexregs.q = data[1];
217 }
218
219 void __gifCall GIFRegHandlerST(const u32* data)
220 {
221 FUNCLOG
222 *(u32*)&gs.vertexregs.s = data[0] & 0xffffff00;
223 *(u32*)&gs.vertexregs.t = data[1] & 0xffffff00;
224 //*(u32*)&gs.q = data[2];
225 }
226
227 void __gifCall GIFRegHandlerUV(const u32* data)
228 {
229 // Baroque breaks if u&v are 16 bits instead of 14.
230 FUNCLOG
231 // gs.vertexregs.u = (data[0]) & 0x3fff;
232 // gs.vertexregs.v = (data[0] >> 16) & 0x3fff;
233 GIFRegUV* r = (GIFRegUV*)(data);
234 gs.vertexregs.u = r->U;
235 gs.vertexregs.v = r->V;
236 }
237
238 void __gifCall GIFRegHandlerXYZF2(const u32* data)
239 {
240 FUNCLOG
241 GIFRegXYZF* r = (GIFRegXYZF*)(data);
242 gs.add_vertex(r->X, r->Y,r->Z, r->F);
243
244 ZZKick->KickVertex(false);
245 }
246
247 void __gifCall GIFRegHandlerXYZ2(const u32* data)
248 {
249 FUNCLOG
250 GIFRegXYZ* r = (GIFRegXYZ*)(data);
251 gs.add_vertex(r->X, r->Y,r->Z);
252
253 ZZKick->KickVertex(false);
254 }
255
256 template <u32 ctxt>
257 void __gifCall GIFRegHandlerTEX0(const u32* data)
258 {
259 FUNCLOG
260
261 if (!NoHighlights(ctxt)) return;
262
263 u32 psm = ZZOglGet_psm_TexBitsFix(data[0]);
264
265 if (m_Blocks[psm].bpp == 0)
266 {
267 // kh and others
268 return;
269 }
270
271 vb[ctxt].uNextTex0Data[0] = data[0];
272 vb[ctxt].uNextTex0Data[1] = data[1];
273 vb[ctxt].bNeedTexCheck = 1;
274
275 // don't update unless necessary
276
277 if (PSMT_ISCLUT(psm))
278 {
279 if (CheckChangeInClut(data[1], psm))
280 {
281 // loading clut, so flush whole texture
282 vb[ctxt].FlushTexData();
283 }
284
285 // check if csa is the same!! (ffx bisaid island, grass)
286 else if ((data[1] & CPSM_CSA_BITMASK) != (vb[ctxt].uCurTex0Data[1] & CPSM_CSA_BITMASK))
287 {
288 Flush(ctxt); // flush any previous entries
289 }
290 }
291 }
292
293 template <u32 ctxt>
294 void __gifCall GIFRegHandlerCLAMP(const u32* data)
295 {
296 FUNCLOG
297
298 if (!NoHighlights(ctxt)) return;
299
300 clampInfo& clamp = vb[ctxt].clamp;
301 GIFRegCLAMP* r = (GIFRegCLAMP*)(data);
302
303 if ((s_uClampData[ctxt] != data[0]) || (((clamp.minv >> 8) | (clamp.maxv << 2)) != (data[1]&0x0fff)))
304 {
305 Flush(ctxt);
306 s_uClampData[ctxt] = data[0];
307
308 clamp.wms = r->WMS;
309 clamp.wmt = r->WMT;
310 clamp.minu = r->MINU;
311 clamp.maxu = r->MAXU;
312 clamp.minv = r->MINV;
313 clamp.maxv = r->MAXV;
314
315 vb[ctxt].bTexConstsSync = false;
316 }
317 }
318
319 void __gifCall GIFRegHandlerFOG(const u32* data)
320 {
321 FUNCLOG
322 //gs.gsvertex[gs.primIndex].f = (data[1] >> 24); // shift to upper bits
323 GIFRegFOG* r = (GIFRegFOG*)(data);
324 gs.vertexregs.f = r->F;
325 if (gs.vertexregs.f != 0) REG_LOG("GIFPackedRegHandlerFOG == %d", gs.vertexregs.f);
326
327 }
328
329 void __gifCall GIFRegHandlerXYZF3(const u32* data)
330 {
331 FUNCLOG
332 GIFRegXYZF* r = (GIFRegXYZF*)(data);
333 gs.add_vertex(r->X, r->Y,r->Z, r->F);
334
335 ZZKick->KickVertex(true);
336 }
337
338 void __gifCall GIFRegHandlerXYZ3(const u32* data)
339 {
340 FUNCLOG
341 GIFRegXYZ* r = (GIFRegXYZ*)(data);
342 gs.add_vertex(r->X, r->Y,r->Z);
343
344 ZZKick->KickVertex(true);
345 }
346
347 void __gifCall GIFRegHandlerNOP(const u32* data)
348 {
349 FUNCLOG
350 }
351
352 template <u32 ctxt>
353 void __gifCall GIFRegHandlerTEX1(const u32* data)
354 {
355 FUNCLOG
356
357 if (!NoHighlights(ctxt)) return;
358
359 GIFRegTEX1* r = (GIFRegTEX1*)(data);
360 tex1Info& tex1 = vb[ctxt].tex1;
361
362 if (conf.bilinear == 1 && (tex1.mmag != ((data[0] >> 5) & 0x1) || tex1.mmin != ((data[0] >> 6) & 0x7)))
363 {
364 Flush(ctxt);
365 vb[ctxt].bVarsTexSync = false;
366 }
367
368 tex1.lcm = r->LCM;
369
370 tex1.mxl = r->MXL;
371 tex1.mmag = r->MMAG;
372 tex1.mmin = r->MMIN;
373 tex1.mtba = r->MTBA;
374 tex1.l = r->L;
375 tex1.k = r->K;
376
377 #ifdef SPAM_UNUSED_REGISTERS
378 REG_LOG("Lcm = %d, l = %d, k = %d", tex1.lcm, tex1.l, tex1.k);
379 if (tex1.mxl != 0) REG_LOG("MIPMAP level set to %d, which is unsupported.");
380 #endif
381 }
382
383 template <u32 ctxt>
384 void __gifCall GIFRegHandlerTEX2(const u32* data)
385 {
386 FUNCLOG
387
388 tex0Info& tex0 = vb[ctxt].tex0;
389
390 vb[ctxt].FlushTexData();
391
392 u32 psm = ZZOglGet_psm_TexBitsFix(data[0]);
393
394 u32* s_uTex0Data = vb[ctxt].uCurTex0Data;
395
396 // don't update unless necessary
397 // if( ZZOglGet_psm_TexBitsFix(*s_uTex0Data) == ZZOglGet_psm_TexBitsFix(data[0]) ) { // psm is the same
398 if (ZZOglAllExceptClutIsSame(s_uTex0Data, data))
399 {
400 if (!PSMT_ISCLUT(psm)) return;
401
402 // have to write the CLUT again if changed
403 if (ZZOglClutMinusCLDunchanged(s_uTex0Data, data))
404 {
405 tex0.cld = ZZOglGet_cld_TexBits(data[1]);
406
407 if (tex0.cld != 0)
408 {
409 texClutWrite(ctxt);
410 // invalidate to make sure target didn't change!
411 vb[ctxt].bVarsTexSync = false;
412 }
413
414 return;
415 }
416 }
417
418 Flush(ctxt);
419
420 vb[ctxt].bVarsTexSync = false;
421 vb[ctxt].bTexConstsSync = false;
422
423 s_uTex0Data[0] = (s_uTex0Data[0] & ~0x03f00000) | (psm << 20);
424 s_uTex0Data[1] = (s_uTex0Data[1] & 0x1f) | (data[1] & ~0x1f);
425
426 tex0.psm = ZZOglGet_psm_TexBitsFix(data[0]);
427
428 if (PSMT_ISCLUT(tex0.psm)) CluttingForFlushedTex(&tex0, data[1], ctxt);
429 }
430
431 template <u32 ctxt>
432 void __gifCall GIFRegHandlerXYOFFSET(const u32* data)
433 {
434 FUNCLOG
435 GIFRegXYOFFSET* r = (GIFRegXYOFFSET*)(data);
436 vb[ctxt].offset.x = r->OFX;
437 vb[ctxt].offset.y = r->OFY;
438
439 // if( !conf.interlace ) {
440 // vb[1].offset.x &= ~15;
441 // vb[1].offset.y &= ~15;
442 // }
443 }
444
445 void __gifCall GIFRegHandlerPRMODECONT(const u32* data)
446 {
447 FUNCLOG
448 gs.prac = data[0] & 0x1;
449 prim = &gs._prim[gs.prac];
450
451 Prim();
452 }
453
454 void __gifCall GIFRegHandlerPRMODE(const u32* data)
455 {
456 FUNCLOG
457 gs._prim[0]._val = (data[0] >> 3) & 0xff;
458
459 if (gs.prac == 0) Prim();
460 }
461
462 void __gifCall GIFRegHandlerTEXCLUT(const u32* data)
463 {
464 FUNCLOG
465 // Affects background coloration of initial Mana Khemia dialog.
466 GIFRegTEXCLUT* r = (GIFRegTEXCLUT*)(data);
467
468 vb[0].FlushTexData();
469 vb[1].FlushTexData();
470
471 gs.clut.cbw = r->CBW << 6;
472 gs.clut.cou = r->COU << 4;
473 gs.clut.cov = r->COV;
474 }
475
476 void __gifCall GIFRegHandlerSCANMSK(const u32* data)
477 {
478 FUNCLOG
479 GIFRegSCANMSK* r = (GIFRegSCANMSK*)(data);
480 // FlushBoth();
481 // ResolveC(&vb[0]);
482 // ResolveZ(&vb[0]);
483
484 gs.smask = r->MSK;
485 REG_LOG("Scanmsk == %d", gs.smask);
486 }
487
488 template <u32 ctxt>
489 void __gifCall GIFRegHandlerMIPTBP1(const u32* data)
490 {
491 FUNCLOG
492 GIFRegMIPTBP1* r = (GIFRegMIPTBP1*)(data);
493
494 miptbpInfo& miptbp0 = vb[ctxt].miptbp0;
495 miptbp0.tbp[0] = r->TBP1;
496 miptbp0.tbw[0] = r->TBW1;
497 miptbp0.tbp[1] = r->TBP2;
498 miptbp0.tbw[1] = r->TBW2;
499 miptbp0.tbp[2] = r->TBP3;
500 miptbp0.tbw[2] = r->TBW3;
501
502 #ifdef SPAM_UNUSED_REGISTERS
503 if ((miptbp0.tbp[0] != 0) || (miptbp0.tbp[1] != 0) || (miptbp0.tbp[2] != 0))
504 {
505 REG_LOG("MIPTBP1: 0:%d(%d) 1:%d(%d) 2:%d(%d).", \
506 miptbp0.tbp[0], miptbp0.tbw[0], miptbp0.tbp[1], miptbp0.tbw[1], miptbp0.tbp[2], miptbp0.tbw[2]);
507 }
508 #endif
509 }
510
511 template <u32 ctxt>
512 void __gifCall GIFRegHandlerMIPTBP2(const u32* data)
513 {
514 FUNCLOG
515 GIFRegMIPTBP2* r = (GIFRegMIPTBP2*)(data);
516
517 miptbpInfo& miptbp1 = vb[ctxt].miptbp1;
518 miptbp1.tbp[0] = r->TBP4;
519 miptbp1.tbw[0] = r->TBW4;
520 miptbp1.tbp[1] = r->TBP5;
521 miptbp1.tbw[1] = r->TBW5;
522 miptbp1.tbp[2] = r->TBP6;
523 miptbp1.tbw[2] = r->TBW6;
524
525 #ifdef SPAM_UNUSED_REGISTERS
526 if ((miptbp1.tbp[0] != 0) || (miptbp1.tbp[1] != 0) || (miptbp1.tbp[2] != 0))
527 {
528 REG_LOG("MIPTBP2: 0:%d(%d) 1:%d(%d) 2:%d(%d).", \
529 miptbp1.tbp[0], miptbp1.tbw[0], miptbp1.tbp[1], miptbp1.tbw[1], miptbp1.tbp[2], miptbp1.tbw[2]);
530 }
531 #endif
532 }
533
534 void __gifCall GIFRegHandlerTEXA(const u32* data)
535 {
536 FUNCLOG
537 texaInfo newinfo;
538 newinfo.aem = (data[0] >> 15) & 0x1;
539 newinfo.ta[0] = data[0] & 0xff;
540 newinfo.ta[1] = data[1] & 0xff;
541
542 if (*(u32*)&newinfo != *(u32*)&gs.texa)
543 {
544 FlushBoth();
545
546 *(u32*)&gs.texa = *(u32*) & newinfo;
547
548 gs.texa.fta[0] = newinfo.ta[0] / 255.0f;
549 gs.texa.fta[1] = newinfo.ta[1] / 255.0f;
550
551 vb[0].bTexConstsSync = false;
552 vb[1].bTexConstsSync = false;
553 }
554 }
555
556 void __gifCall GIFRegHandlerFOGCOL(const u32* data)
557 {
558 FUNCLOG
559 GIFRegFOGCOL* r = (GIFRegFOGCOL*)(data);
560 SetFogColor(r);
561 gs.fogcol = r->ai32[0];
562 }
563
564 void __gifCall GIFRegHandlerTEXFLUSH(const u32* data)
565 {
566 FUNCLOG
567 SetTexFlush();
568 }
569
570 template <u32 ctxt>
571 void __gifCall GIFRegHandlerSCISSOR(const u32* data)
572 {
573 FUNCLOG
574 GIFRegSCISSOR* r = (GIFRegSCISSOR*)(data);
575
576 Rect2& scissor = vb[ctxt].scissor;
577 Rect2 newscissor;
578
579 newscissor.x0 = r->SCAX0 << 3;
580 newscissor.x1 = r->SCAX1 << 3;
581 newscissor.y0 = r->SCAY0 << 3;
582 newscissor.y1 = r->SCAY1 << 3;
583
584 if (newscissor.x1 != scissor.x1 || newscissor.y1 != scissor.y1 ||
585 newscissor.x0 != scissor.x0 || newscissor.y0 != scissor.y0)
586 {
587 Flush(ctxt);
588 scissor = newscissor;
589
590 // flush everything
591 vb[ctxt].bNeedFrameCheck = 1;
592 }
593 }
594
595 template <u32 ctxt>
596 void __gifCall GIFRegHandlerALPHA(const u32* data)
597 {
598 FUNCLOG
599 alphaInfo newalpha;
600 newalpha.abcd = *(u8*)data;
601 newalpha.fix = *(u8*)(data + 1);
602
603 if (*(u16*)&newalpha != *(u16*)&vb[ctxt].alpha)
604 {
605 Flush(ctxt);
606
607 if (newalpha.a == 3) newalpha.a = 0;
608 if (newalpha.b == 3) newalpha.b = 0;
609 if (newalpha.c == 3) newalpha.c = 0;
610 if (newalpha.d == 3) newalpha.d = 0;
611
612 *(u16*)&vb[ctxt].alpha = *(u16*) & newalpha;
613 }
614 }
615
616 void __gifCall GIFRegHandlerDIMX(const u32* data)
617 {
618 FUNCLOG
619 GIFRegDIMX* r = (GIFRegDIMX*)(data);
620
621 gs.dimx.i64 = r->i64;
622 }
623
624 void __gifCall GIFRegHandlerDTHE(const u32* data)
625 {
626 FUNCLOG
627 GIFRegDTHE* r = (GIFRegDTHE*)(data);
628
629 gs.dthe = r->DTHE;
630 if (gs.dthe != 0) REG_LOG("Dithering set. (but not implemented.)");
631 }
632
633 void __gifCall GIFRegHandlerCOLCLAMP(const u32* data)
634 {
635 FUNCLOG
636 GIFRegCOLCLAMP* r = (GIFRegCOLCLAMP*)(data);
637
638 gs.colclamp = r->CLAMP;
639
640 if (gs.colclamp == 0)
641 REG_LOG("COLCLAMP == MASK");
642 else
643 REG_LOG("COLCLAMP == CLAMP");
644 }
645
646 template <u32 ctxt>
647 void __gifCall GIFRegHandlerTEST(const u32* data)
648 {
649 FUNCLOG
650
651 pixTest* test = &vb[ctxt].test;
652
653 if ((*(u32*)test & 0x0007ffff) == (data[0] & 0x0007ffff)) return;
654
655 Flush(ctxt);
656
657 *(u32*)test = data[0];
658
659 // test.ate = (data[0] ) & 0x1;
660 // test.atst = (data[0] >> 1) & 0x7;
661 // test.aref = (data[0] >> 4) & 0xff;
662 // test.afail = (data[0] >> 12) & 0x3;
663 // test.date = (data[0] >> 14) & 0x1;
664 // test.datm = (data[0] >> 15) & 0x1;
665 // test.zte = (data[0] >> 16) & 0x1;
666 // test.ztst = (data[0] >> 17) & 0x3;
667 }
668
669 void __gifCall GIFRegHandlerPABE(const u32* data)
670 {
671 FUNCLOG
672 GIFRegPABE* r = (GIFRegPABE*)(data);
673 //SetAlphaChanged(0, GPUREG_PABE);
674 //SetAlphaChanged(1, GPUREG_PABE);
675 FlushBoth();
676
677 gs.pabe = r->PABE;
678 }
679
680 template <u32 ctxt>
681 void __gifCall GIFRegHandlerFBA(const u32* data)
682 {
683 FUNCLOG
684 GIFRegFBA* r = (GIFRegFBA*)(data);
685
686 FlushBoth();
687
688 vb[ctxt].fba.fba = r->FBA;
689 }
690
691 template <u32 ctxt>
692 void __gifCall GIFRegHandlerFRAME(const u32* data)
693 {
694 FUNCLOG
695
696 frameInfo& gsfb = vb[ctxt].gsfb;
697
698 if ((gsfb.fbp == ZZOglGet_fbp_FrameBitsMult(data[0])) &&
699 (gsfb.fbw == ZZOglGet_fbw_FrameBitsMult(data[0])) &&
700 (gsfb.psm == ZZOglGet_psm_FrameBits(data[0])) &&
701 (gsfb.fbm == ZZOglGet_fbm_FrameBits(data[0])))
702 {
703 return;
704 }
705
706 FlushBoth();
707
708 gsfb.fbp = ZZOglGet_fbp_FrameBitsMult(data[0]);
709 gsfb.fbw = ZZOglGet_fbw_FrameBitsMult(data[0]);
710 gsfb.psm = ZZOglGet_psm_FrameBits(data[0]);
711 gsfb.fbm = ZZOglGet_fbm_FrameBitsFix(data[0], data[1]);
712 gsfb.fbh = ZZOglGet_fbh_FrameBitsCalc(data[0]);
713 // gsfb.fbhCalc = gsfb.fbh;
714
715 vb[ctxt].bNeedFrameCheck = 1;
716 }
717
718 template <u32 ctxt>
719 void __gifCall GIFRegHandlerZBUF(const u32* data)
720 {
721 FUNCLOG
722 zbufInfo& zbuf = vb[ctxt].zbuf;
723
724 int psm = (0x30 | ((data[0] >> 24) & 0xf));
725
726 if (zbuf.zbp == (data[0] & 0x1ff) * 32 &&
727 zbuf.psm == psm &&
728 zbuf.zmsk == (data[1] & 0x1))
729 {
730 return;
731 }
732
733 // error detection
734 if (m_Blocks[psm].bpp == 0) return;
735
736 FlushBoth();
737
738 zbuf.zbp = (data[0] & 0x1ff) * 32;
739 zbuf.psm = 0x30 | ((data[0] >> 24) & 0xf);
740 zbuf.zmsk = data[1] & 0x1;
741
742 vb[ctxt].bNeedZCheck = 1;
743 vb[ctxt].zprimmask = 0xffffffff;
744
745 if (zbuf.psm > 0x31) vb[ctxt].zprimmask = 0xffff;
746 }
747
748 void __gifCall GIFRegHandlerBITBLTBUF(const u32* data)
749 {
750 FUNCLOG
751 GIFRegBITBLTBUF* r = (GIFRegBITBLTBUF*)(data);
752
753 gs.srcbufnew.bp = r->SBP;
754 gs.srcbufnew.bw = r->SBW << 6;
755 gs.srcbufnew.psm = r->SPSM;
756 gs.dstbufnew.bp = r->DBP;
757 gs.dstbufnew.bw = r->DBW << 6;
758 gs.dstbufnew.psm = r->DPSM;
759
760 if (gs.dstbufnew.bw == 0) gs.dstbufnew.bw = 64;
761 }
762
763 void __gifCall GIFRegHandlerTRXPOS(const u32* data)
764 {
765 FUNCLOG
766 GIFRegTRXPOS* r = (GIFRegTRXPOS*)(data);
767
768 gs.trxposnew.sx = r->SSAX;
769 gs.trxposnew.sy = r->SSAY;
770 gs.trxposnew.dx = r->DSAX;
771 gs.trxposnew.dy = r->DSAY;
772 gs.trxposnew.dirx = r->DIRX;
773 gs.trxposnew.diry = r->DIRY;
774 }
775
776 void __gifCall GIFRegHandlerTRXREG(const u32* data)
777 {
778 FUNCLOG
779 GIFRegTRXREG* r = (GIFRegTRXREG*)(data);
780 gs.imageWtemp = r->RRW;
781 gs.imageHtemp = r->RRH;
782 }
783
784 void __gifCall GIFRegHandlerTRXDIR(const u32* data)
785 {
786 FUNCLOG
787 // terminate any previous transfers
788
789 switch (gs.imageTransfer)
790 {
791
792 case 0: // host->loc
793 TerminateHostLocal();
794 break;
795
796 case 1: // loc->host
797 TerminateLocalHost();
798 break;
799 }
800
801 gs.srcbuf = gs.srcbufnew;
802
803 gs.dstbuf = gs.dstbufnew;
804 gs.trxpos = gs.trxposnew;
805 gs.imageTransfer = data[0] & 0x3;
806 gs.imageWnew = gs.imageWtemp;
807 gs.imageHnew = gs.imageHtemp;
808
809 if (gs.imageWnew > 0 && gs.imageHnew > 0)
810 {
811 switch (gs.imageTransfer)
812 {
813 case 0: // host->loc
814 InitTransferHostLocal();
815 break;
816
817 case 1: // loc->host
818 InitTransferLocalHost();
819 break;
820
821 case 2:
822 TransferLocalLocal();
823 break;
824
825 case 3:
826 gs.imageTransfer = -1;
827 break;
828
829 default:
830 assert(0);
831 }
832 }
833 else
834 {
835 #if defined(ZEROGS_DEVBUILD)
836 ZZLog::Warn_Log("Dummy transfer.");
837 #endif
838 gs.imageTransfer = -1;
839 }
840 }
841
842 void __gifCall GIFRegHandlerHWREG(const u32* data)
843 {
844 FUNCLOG
845
846 if (gs.imageTransfer == 0)
847 {
848 TransferHostLocal(data, 2);
849 }
850 else
851 {
852 #if defined(ZEROGS_DEVBUILD)
853 ZZLog::Error_Log("ZeroGS: HWREG!? %8.8x_%8.8x", data[0], data[1]);
854 //assert(0);
855 #endif
856 }
857 }
858
859 extern int g_GSMultiThreaded;
860
861 void __gifCall GIFRegHandlerSIGNAL(const u32* data)
862 {
863 FUNCLOG
864
865 if (!g_GSMultiThreaded)
866 {
867 SIGLBLID->SIGID = (SIGLBLID->SIGID & ~data[1]) | (data[0] & data[1]);
868
869 // if (gs.CSRw & 0x1) CSR->SIGNAL = 1;
870 // if (!IMR->SIGMSK && GSirq)
871 // GSirq();
872
873 if (gs.CSRw & 0x1)
874 {
875 CSR->SIGNAL = 1;
876 //gs.CSRw &= ~1;
877 }
878
879 if (!IMR->SIGMSK && GSirq) GSirq();
880 }
881 }
882
883 void __gifCall GIFRegHandlerFINISH(const u32* data)
884 {
885 FUNCLOG
886
887 if (!g_GSMultiThreaded)
888 {
889 if (gs.CSRw & 0x2) CSR->FINISH = 1;
890
891 if (!IMR->FINISHMSK && GSirq) GSirq();
892
893 // if( gs.CSRw & 2 ) {
894 // //gs.CSRw &= ~2;
895 // //CSR->FINISH = 0;
896 //
897 //
898 // }
899 // CSR->FINISH = 1;
900 //
901 // if( !IMR->FINISHMSK && GSirq )
902 // GSirq();
903 }
904 }
905
906 void __gifCall GIFRegHandlerLABEL(const u32* data)
907 {
908 FUNCLOG
909
910 if (!g_GSMultiThreaded)
911 {
912 SIGLBLID->LBLID = (SIGLBLID->LBLID & ~data[1]) | (data[0] & data[1]);
913 }
914 }
915
916
917 void SetMultithreaded()
918 {
919 // Some older versions of PCSX2 didn't properly set the irq callback to NULL
920 // in multithreaded mode (possibly because ZeroGS itself would assert in such
921 // cases), and didn't bind them to a dummy callback either. PCSX2 handles all
922 // IRQs internally when multithreaded anyway -- so let's ignore them here:
923
924 if (g_GSMultiThreaded)
925 {
926 g_GIFRegHandlers[GIF_A_D_REG_SIGNAL] = &GIFRegHandlerNull;
927 g_GIFRegHandlers[GIF_A_D_REG_FINISH] = &GIFRegHandlerNull;
928 g_GIFRegHandlers[GIF_A_D_REG_LABEL] = &GIFRegHandlerNull;
929 }
930 else
931 {
932 g_GIFRegHandlers[GIF_A_D_REG_SIGNAL] = &GIFRegHandlerSIGNAL;
933 g_GIFRegHandlers[GIF_A_D_REG_FINISH] = &GIFRegHandlerFINISH;
934 g_GIFRegHandlers[GIF_A_D_REG_LABEL] = &GIFRegHandlerLABEL;
935 }
936 }
937
938 void ResetRegs()
939 {
940 for (int i = 0; i < 16; i++)
941 {
942 g_GIFPackedRegHandlers[i] = &GIFPackedRegHandlerNull;
943 }
944
945 g_GIFPackedRegHandlers[GIF_REG_PRIM] = &GIFPackedRegHandlerPRIM;
946 g_GIFPackedRegHandlers[GIF_REG_RGBA] = &GIFPackedRegHandlerRGBA;
947 g_GIFPackedRegHandlers[GIF_REG_STQ] = &GIFPackedRegHandlerSTQ;
948 g_GIFPackedRegHandlers[GIF_REG_UV] = &GIFPackedRegHandlerUV;
949 g_GIFPackedRegHandlers[GIF_REG_XYZF2] = &GIFPackedRegHandlerXYZF2;
950 g_GIFPackedRegHandlers[GIF_REG_XYZ2] = &GIFPackedRegHandlerXYZ2;
951 g_GIFPackedRegHandlers[GIF_REG_TEX0_1] = &GIFPackedRegHandlerTEX0<0>;
952 g_GIFPackedRegHandlers[GIF_REG_TEX0_2] = &GIFPackedRegHandlerTEX0<1>;
953 g_GIFPackedRegHandlers[GIF_REG_CLAMP_1] = &GIFPackedRegHandlerCLAMP<0>;
954 g_GIFPackedRegHandlers[GIF_REG_CLAMP_2] = &GIFPackedRegHandlerCLAMP<1>;
955 g_GIFPackedRegHandlers[GIF_REG_FOG] = &GIFPackedRegHandlerFOG;
956 g_GIFPackedRegHandlers[GIF_REG_XYZF3] = &GIFPackedRegHandlerXYZF3;
957 g_GIFPackedRegHandlers[GIF_REG_XYZ3] = &GIFPackedRegHandlerXYZ3;
958 g_GIFPackedRegHandlers[GIF_REG_A_D] = &GIFPackedRegHandlerA_D;
959 g_GIFPackedRegHandlers[GIF_REG_NOP] = &GIFPackedRegHandlerNOP;
960
961 for (int i = 0; i < 256; i++)
962 {
963 g_GIFRegHandlers[i] = &GIFPackedRegHandlerNull;
964 }
965
966 g_GIFRegHandlers[GIF_A_D_REG_PRIM] = &GIFRegHandlerPRIM;
967 g_GIFRegHandlers[GIF_A_D_REG_RGBAQ] = &GIFRegHandlerRGBAQ;
968 g_GIFRegHandlers[GIF_A_D_REG_ST] = &GIFRegHandlerST;
969 g_GIFRegHandlers[GIF_A_D_REG_UV] = &GIFRegHandlerUV;
970 g_GIFRegHandlers[GIF_A_D_REG_XYZF2] = &GIFRegHandlerXYZF2;
971 g_GIFRegHandlers[GIF_A_D_REG_XYZ2] = &GIFRegHandlerXYZ2;
972 g_GIFRegHandlers[GIF_A_D_REG_TEX0_1] = &GIFRegHandlerTEX0<0>;
973 g_GIFRegHandlers[GIF_A_D_REG_TEX0_2] = &GIFRegHandlerTEX0<1>;
974 g_GIFRegHandlers[GIF_A_D_REG_CLAMP_1] = &GIFRegHandlerCLAMP<0>;
975 g_GIFRegHandlers[GIF_A_D_REG_CLAMP_2] = &GIFRegHandlerCLAMP<1>;
976 g_GIFRegHandlers[GIF_A_D_REG_FOG] = &GIFRegHandlerFOG;
977 g_GIFRegHandlers[GIF_A_D_REG_XYZF3] = &GIFRegHandlerXYZF3;
978 g_GIFRegHandlers[GIF_A_D_REG_XYZ3] = &GIFRegHandlerXYZ3;
979 g_GIFRegHandlers[GIF_A_D_REG_NOP] = &GIFRegHandlerNOP;
980 g_GIFRegHandlers[GIF_A_D_REG_TEX1_1] = &GIFRegHandlerTEX1<0>;
981 g_GIFRegHandlers[GIF_A_D_REG_TEX1_2] = &GIFRegHandlerTEX1<1>;
982 g_GIFRegHandlers[GIF_A_D_REG_TEX2_1] = &GIFRegHandlerTEX2<0>;
983 g_GIFRegHandlers[GIF_A_D_REG_TEX2_2] = &GIFRegHandlerTEX2<1>;
984 g_GIFRegHandlers[GIF_A_D_REG_XYOFFSET_1] = &GIFRegHandlerXYOFFSET<0>;
985 g_GIFRegHandlers[GIF_A_D_REG_XYOFFSET_2] = &GIFRegHandlerXYOFFSET<1>;
986 g_GIFRegHandlers[GIF_A_D_REG_PRMODECONT] = &GIFRegHandlerPRMODECONT;
987 g_GIFRegHandlers[GIF_A_D_REG_PRMODE] = &GIFRegHandlerPRMODE;
988 g_GIFRegHandlers[GIF_A_D_REG_TEXCLUT] = &GIFRegHandlerTEXCLUT;
989 g_GIFRegHandlers[GIF_A_D_REG_SCANMSK] = &GIFRegHandlerSCANMSK;
990 g_GIFRegHandlers[GIF_A_D_REG_MIPTBP1_1] = &GIFRegHandlerMIPTBP1<0>;
991 g_GIFRegHandlers[GIF_A_D_REG_MIPTBP1_2] = &GIFRegHandlerMIPTBP1<1>;
992 g_GIFRegHandlers[GIF_A_D_REG_MIPTBP2_1] = &GIFRegHandlerMIPTBP2<0>;
993 g_GIFRegHandlers[GIF_A_D_REG_MIPTBP2_2] = &GIFRegHandlerMIPTBP2<1>;
994 g_GIFRegHandlers[GIF_A_D_REG_TEXA] = &GIFRegHandlerTEXA;
995 g_GIFRegHandlers[GIF_A_D_REG_FOGCOL] = &GIFRegHandlerFOGCOL;
996 g_GIFRegHandlers[GIF_A_D_REG_TEXFLUSH] = &GIFRegHandlerTEXFLUSH;
997 g_GIFRegHandlers[GIF_A_D_REG_SCISSOR_1] = &GIFRegHandlerSCISSOR<0>;
998 g_GIFRegHandlers[GIF_A_D_REG_SCISSOR_2] = &GIFRegHandlerSCISSOR<1>;
999 g_GIFRegHandlers[GIF_A_D_REG_ALPHA_1] = &GIFRegHandlerALPHA<0>;
1000 g_GIFRegHandlers[GIF_A_D_REG_ALPHA_2] = &GIFRegHandlerALPHA<1>;
1001 g_GIFRegHandlers[GIF_A_D_REG_DIMX] = &GIFRegHandlerDIMX;
1002 g_GIFRegHandlers[GIF_A_D_REG_DTHE] = &GIFRegHandlerDTHE;
1003 g_GIFRegHandlers[GIF_A_D_REG_COLCLAMP] = &GIFRegHandlerCOLCLAMP;
1004 g_GIFRegHandlers[GIF_A_D_REG_TEST_1] = &GIFRegHandlerTEST<0>;
1005 g_GIFRegHandlers[GIF_A_D_REG_TEST_2] = &GIFRegHandlerTEST<1>;
1006 g_GIFRegHandlers[GIF_A_D_REG_PABE] = &GIFRegHandlerPABE;
1007 g_GIFRegHandlers[GIF_A_D_REG_FBA_1] = &GIFRegHandlerFBA<0>;
1008 g_GIFRegHandlers[GIF_A_D_REG_FBA_2] = &GIFRegHandlerFBA<1>;
1009 g_GIFRegHandlers[GIF_A_D_REG_FRAME_1] = &GIFRegHandlerFRAME<0>;
1010 g_GIFRegHandlers[GIF_A_D_REG_FRAME_2] = &GIFRegHandlerFRAME<1>;
1011 g_GIFRegHandlers[GIF_A_D_REG_ZBUF_1] = &GIFRegHandlerZBUF<0>;
1012 g_GIFRegHandlers[GIF_A_D_REG_ZBUF_2] = &GIFRegHandlerZBUF<1>;
1013 g_GIFRegHandlers[GIF_A_D_REG_BITBLTBUF] = &GIFRegHandlerBITBLTBUF;
1014 g_GIFRegHandlers[GIF_A_D_REG_TRXPOS] = &GIFRegHandlerTRXPOS;
1015 g_GIFRegHandlers[GIF_A_D_REG_TRXREG] = &GIFRegHandlerTRXREG;
1016 g_GIFRegHandlers[GIF_A_D_REG_TRXDIR] = &GIFRegHandlerTRXDIR;
1017 g_GIFRegHandlers[GIF_A_D_REG_HWREG] = &GIFRegHandlerHWREG;
1018 SetMultithreaded();
1019 }
1020
1021 void WriteTempRegs()
1022 {
1023 memcpy(g_GIFTempRegHandlers, g_GIFPackedRegHandlers, sizeof(g_GIFTempRegHandlers));
1024 }
1025
1026 void SetFrameSkip(bool skip)
1027 {
1028 if (skip)
1029 {
1030 g_GIFPackedRegHandlers[GIF_REG_PRIM] = &GIFPackedRegHandlerNOP;
1031 g_GIFPackedRegHandlers[GIF_REG_RGBA] = &GIFPackedRegHandlerNOP;
1032 g_GIFPackedRegHandlers[GIF_REG_STQ] = &GIFPackedRegHandlerNOP;
1033 g_GIFPackedRegHandlers[GIF_REG_UV] = &GIFPackedRegHandlerNOP;
1034 g_GIFPackedRegHandlers[GIF_REG_XYZF2] = &GIFPackedRegHandlerNOP;
1035 g_GIFPackedRegHandlers[GIF_REG_XYZ2] = &GIFPackedRegHandlerNOP;
1036 g_GIFPackedRegHandlers[GIF_REG_CLAMP_1] = &GIFPackedRegHandlerNOP;
1037 g_GIFPackedRegHandlers[GIF_REG_CLAMP_2] = &GIFPackedRegHandlerNOP;
1038 g_GIFPackedRegHandlers[GIF_REG_FOG] = &GIFPackedRegHandlerNOP;
1039 g_GIFPackedRegHandlers[GIF_REG_XYZF3] = &GIFPackedRegHandlerNOP;
1040 g_GIFPackedRegHandlers[GIF_REG_XYZ3] = &GIFPackedRegHandlerNOP;
1041
1042 g_GIFRegHandlers[GIF_A_D_REG_PRIM] = &GIFRegHandlerNOP;
1043 g_GIFRegHandlers[GIF_A_D_REG_RGBAQ] = &GIFRegHandlerNOP;
1044 g_GIFRegHandlers[GIF_A_D_REG_ST] = &GIFRegHandlerNOP;
1045 g_GIFRegHandlers[GIF_A_D_REG_UV] = &GIFRegHandlerNOP;
1046 g_GIFRegHandlers[GIF_A_D_REG_XYZF2] = &GIFRegHandlerNOP;
1047 g_GIFRegHandlers[GIF_A_D_REG_XYZ2] = &GIFRegHandlerNOP;
1048 g_GIFRegHandlers[GIF_A_D_REG_XYZF3] = &GIFRegHandlerNOP;
1049 g_GIFRegHandlers[GIF_A_D_REG_XYZ3] = &GIFRegHandlerNOP;
1050 g_GIFRegHandlers[GIF_A_D_REG_PRMODECONT] = &GIFRegHandlerNOP;
1051 g_GIFRegHandlers[GIF_A_D_REG_PRMODE] = &GIFRegHandlerNOP;
1052 }
1053 else
1054 {
1055 g_GIFPackedRegHandlers[GIF_REG_PRIM] = &GIFPackedRegHandlerPRIM;
1056 g_GIFPackedRegHandlers[GIF_REG_RGBA] = &GIFPackedRegHandlerRGBA;
1057 g_GIFPackedRegHandlers[GIF_REG_STQ] = &GIFPackedRegHandlerSTQ;
1058 g_GIFPackedRegHandlers[GIF_REG_UV] = &GIFPackedRegHandlerUV;
1059 g_GIFPackedRegHandlers[GIF_REG_XYZF2] = &GIFPackedRegHandlerXYZF2;
1060 g_GIFPackedRegHandlers[GIF_REG_XYZ2] = &GIFPackedRegHandlerXYZ2;
1061 g_GIFPackedRegHandlers[GIF_REG_CLAMP_1] = &GIFPackedRegHandlerCLAMP<0>;
1062 g_GIFPackedRegHandlers[GIF_REG_CLAMP_2] = &GIFPackedRegHandlerCLAMP<1>;
1063 g_GIFPackedRegHandlers[GIF_REG_FOG] = &GIFPackedRegHandlerFOG;
1064 g_GIFPackedRegHandlers[GIF_REG_XYZF3] = &GIFPackedRegHandlerXYZF3;
1065 g_GIFPackedRegHandlers[GIF_REG_XYZ3] = &GIFPackedRegHandlerXYZ3;
1066
1067 g_GIFRegHandlers[GIF_A_D_REG_PRIM] = &GIFRegHandlerPRIM;
1068 g_GIFRegHandlers[GIF_A_D_REG_RGBAQ] = &GIFRegHandlerRGBAQ;
1069 g_GIFRegHandlers[GIF_A_D_REG_ST] = &GIFRegHandlerST;
1070 g_GIFRegHandlers[GIF_A_D_REG_UV] = &GIFRegHandlerUV;
1071 g_GIFRegHandlers[GIF_A_D_REG_XYZF2] = &GIFRegHandlerXYZF2;
1072 g_GIFRegHandlers[GIF_A_D_REG_XYZ2] = &GIFRegHandlerXYZ2;
1073 g_GIFRegHandlers[GIF_A_D_REG_XYZF3] = &GIFRegHandlerXYZF3;
1074 g_GIFRegHandlers[GIF_A_D_REG_XYZ3] = &GIFRegHandlerXYZ3;
1075 g_GIFRegHandlers[GIF_A_D_REG_PRMODECONT] = &GIFRegHandlerPRMODECONT;
1076 g_GIFRegHandlers[GIF_A_D_REG_PRMODE] = &GIFRegHandlerPRMODE;
1077 }
1078 }
1079
1080 #endif

  ViewVC Help
Powered by ViewVC 1.1.22