27 #ifndef ICB_DEANPOLY_H 28 #define ICB_DEANPOLY_H 32 #define GPUCODE_MODE_SHADE_TEX (1 << 0) 33 #define GPUCODE_MODE_SEMI_TRANS (1 << 1) 36 #define GPUCODE_POLY_F3 (0x20) 37 #define GPUCODE_POLY_FT3 (0x24) 38 #define GPUCODE_POLY_G3 (0x30) 39 #define GPUCODE_POLY_GT3 (0x34) 40 #define GPUCODE_POLY_F4 (0x28) 41 #define GPUCODE_POLY_FT4 (0x2c) 42 #define GPUCODE_POLY_G4 (0x38) 43 #define GPUCODE_POLY_GT4 (0x3c) 45 #define GPUCODE_SPRT (0x64) 46 #define GPUCODE_SPRT_8 (0x74) 47 #define GPUCODE_SPRT_16 (0x7c) 49 #define GPUCODE_TILE (0x60) 50 #define GPUCODE_TILE_1 (0x68) 51 #define GPUCODE_TILE_8 (0x70) 52 #define GPUCODE_TILE_16 (0x78) 54 #define GPUCODE_LINE_F2 (0x40) 55 #define GPUCODE_LINE_G2 (0x50) 56 #define GPUCODE_LINE_F3 (0x48) 57 #define GPUCODE_LINE_G3 (0x58) 58 #define GPUCODE_LINE_F4 (0x4c) 59 #define GPUCODE_LINE_G4 (0x5c) 61 #define GPUSIZE_POLY_F3 (4 + 3) 62 #define GPUSIZE_POLY_FT3 (7 + 3) 63 #define GPUSIZE_POLY_G3 (6 + 3) 64 #define GPUSIZE_POLY_GT3 (9 + 3) 65 #define GPUSIZE_POLY_F4 (5 + 4) 66 #define GPUSIZE_POLY_FT4 (9 + 4) 67 #define GPUSIZE_POLY_G4 (8 + 4) 68 #define GPUSIZE_POLY_GT4 (12 + 4) 70 #define GPUSIZE_SPRT (4 + 1) 71 #define GPUSIZE_SPRT_8 (3 + 1) 72 #define GPUSIZE_SPRT_16 (3 + 1) 74 #define GPUSIZE_TILE (3 + 1) 75 #define GPUSIZE_TILE_1 (2 + 1) 76 #define GPUSIZE_TILE_8 (2 + 1) 77 #define GPUSIZE_TILE_16 (2 + 1) 79 #define GPUSIZE_LINE_F2 (3 + 2) 80 #define GPUSIZE_LINE_G2 (4 + 2) 81 #define GPUSIZE_LINE_F3 (5 + 3) 82 #define GPUSIZE_LINE_G3 (7 + 3) 83 #define GPUSIZE_LINE_F4 (6 + 4) 84 #define GPUSIZE_LINE_G4 (9 + 4) 86 #define GPUSIZE_DR_TPAGE (1) 87 #define GPUSIZE_TAG (4) 89 #define GPUSIZE_TPOLY_F3 (GPUSIZE_DR_TPAGE + GPUSIZE_POLY_F3 + GPUSIZE_TAG) 90 #define GPUSIZE_TPOLY_F4 (GPUSIZE_DR_TPAGE + GPUSIZE_POLY_F4 + GPUSIZE_TAG) 91 #define GPUSIZE_TPOLY_G3 (GPUSIZE_DR_TPAGE + GPUSIZE_POLY_G3 + GPUSIZE_TAG) 92 #define GPUSIZE_TPOLY_G4 (GPUSIZE_DR_TPAGE + GPUSIZE_POLY_G4 + GPUSIZE_TAG) 94 #define GPUSIZE_TLINE_F2 (GPUSIZE_DR_TPAGE + GPUSIZE_LINE_F3 + GPUSIZE_TAG) 95 #define GPUSIZE_TLINE_G2 (GPUSIZE_DR_TPAGE + GPUSIZE_LINE_G2 + GPUSIZE_TAG) 96 #define GPUSIZE_TLINE_F3 (GPUSIZE_DR_TPAGE + GPUSIZE_LINE_F3 + GPUSIZE_TAG) 97 #define GPUSIZE_TLINE_G3 (GPUSIZE_DR_TPAGE + GPUSIZE_LINE_G3 + GPUSIZE_TAG) 98 #define GPUSIZE_TLINE_F4 (GPUSIZE_DR_TPAGE + GPUSIZE_LINE_F4 + GPUSIZE_TAG) 99 #define GPUSIZE_TLINE_G4 (GPUSIZE_DR_TPAGE + GPUSIZE_LINE_G4 + GPUSIZE_TAG) 101 #define GPUSIZE_TSPRT (GPUSIZE_DR_TPAGE + GPUSIZE_SPRT + GPUSIZE_TAG) 102 #define GPUSIZE_TSPRT_8 (GPUSIZE_DR_TPAGE + GPUSIZE_SPRT_8 + GPUSIZE_TAG) 103 #define GPUSIZE_TSPRT_16 (GPUSIZE_DR_TPAGE + GPUSIZE_SPRT_16 + GPUSIZE_TAG) 105 #define GPUSIZE_TTILE (GPUSIZE_DR_TPAGE + GPUSIZE_TILE + GPUSIZE_TAG) 106 #define GPUSIZE_TTILE_1 (GPUSIZE_DR_TPAGE + GPUSIZE_TILE_1 + GPUSIZE_TAG) 107 #define GPUSIZE_TTILE_8 (GPUSIZE_DR_TPAGE + GPUSIZE_TILE_8 + GPUSIZE_TAG) 108 #define GPUSIZE_TTILE_16 (GPUSIZE_DR_TPAGE + GPUSIZE_TILE_16 + GPUSIZE_TAG) 110 #define setTcode(p, tc) (*(uint32 *)&(((P_TAG *)(p))->r0) = (uint32)(tc)) 112 #define zeroTagPoly(p) (setaddr((&(p)->tag_poly), 0), setlen((&(p)->tag_poly), 0) = 0) 114 #define setlen(p, _len) (((P_TAG *)(p))->len = (uint8)(_len)) 116 #define setTDrawTPageSize(p, s) setlen((p), (s)), setTcode((p), _get_mode(0, 1, 0)) 118 #define setTDrawTPage(p) setTDrawTPageSize((p), 1) 120 #define setTPolyF3(p) setTDrawTPageSize((p), GPUSIZE_TPOLY_F3), setcode(&((p)->tag_poly), GPUCODE_POLY_F3), zeroTagPoly((p)) 121 #define setTPolyF4(p) setTDrawTPageSize((p), GPUSIZE_TPOLY_F4), setcode(&((p)->tag_poly), GPUCODE_POLY_F4), zeroTagPoly((p)) 123 #define setTPolyG3(p) setTDrawTPageSize((p), GPUSIZE_TPOLY_G3), setcode(&((p)->tag_poly), GPUCODE_POLY_G3), zeroTagPoly((p)) 124 #define setTPolyG4(p) setTDrawTPageSize((p), GPUSIZE_TPOLY_G4), setcode(&((p)->tag_poly), GPUCODE_POLY_G4), zeroTagPoly((p)) 126 #define setTLineF2(p) setTDrawTPageSize((p), GPUSIZE_TLINE_F2), setcode(&((p)->tag_poly), GPUCODE_LINE_F2), zeroTagPoly((p)) 127 #define setTLineG2(p) setTDrawTPageSize((p), GPUSIZE_TLINE_G2), setcode(&((p)->tag_poly), GPUCODE_LINE_G2), zeroTagPoly((p)) 128 #define setTLineF3(p) setTDrawTPageSize((p), GPUSIZE_TLINE_F3), setcode(&((p)->tag_poly), GPUCODE_LINE_F3), zeroTagPoly((p)), ((p)->pad) = 0x55555555 129 #define setTLineG3(p) setTDrawTPageSize((p), GPUSIZE_TLINE_G3), setcode(&((p)->tag_poly), GPUCODE_LINE_G3), zeroTagPoly((p)), ((p)->pad) = 0x55555555 130 #define setTLineF4(p) setTDrawTPageSize((p), GPUSIZE_TLINE_F4), setcode(&((p)->tag_poly), GPUCODE_LINE_F4), zeroTagPoly((p)), ((p)->pad) = 0x55555555 131 #define setTLineG4(p) setTDrawTPageSize((p), GPUSIZE_TLINE_G4), setcode(&((p)->tag_poly), GPUCODE_LINE_G4), zeroTagPoly((p)), ((p)->pad) = 0x55555555 133 #define setTSprt(p) setTDrawTPageSize((p), GPUSIZE_TSPRT), setcode(&((p)->tag_poly), GPUCODE_SPRT), zeroTagPoly((p)) 134 #define setTSprt8(p) setTDrawTPageSize((p), GPUSIZE_TSPRT_8), setcode(&((p)->tag_poly), GPUCODE_SPRT_8), zeroTagPoly((p)) 135 #define setTSprt16(p) setTDrawTPageSize((p), GPUSIZE_TSPRT_16), setcode(&((p)->tag_poly), GPUCODE_SPRT_16), zeroTagPoly((p)) 137 #define setTTile(p) setTDrawTPageSize((p), GPUSIZE_TTILE), setcode(&((p)->tag_poly), GPUCODE_TILE), zeroTagPoly((p)) 138 #define setTTile1(p) setTDrawTPageSize((p), GPUSIZE_TTILE_1), setcode(&((p)->tag_poly), GPUCODE_TILE_1), zeroTagPoly((p)) 139 #define setTTile8(p) setTDrawTPageSize((p), GPUSIZE_TTILE_8), setcode(&((p)->tag_poly), GPUCODE_TILE_8), zeroTagPoly((p)) 140 #define setTTile16(p) setTDrawTPageSize((p), GPUSIZE_TTILE_16), setcode(&((p)->tag_poly), GPUCODE_TILE_16), zeroTagPoly((p)) 142 #define setTSemiTrans(p, abe) setSemiTrans(&((p)->tag_poly), (abe)) 143 #define setTABRMode(p, abr) setTcode((p), _get_mode(0, 1, (abr << 5))) 144 #define setTSprtTPage(p, tp) setTcode((p), _get_mode(0, 1, (tp))) 145 #define setTSprtTPageABR(p, t, a) setTcode((p), _get_mode(0, 1, (((t)&0x19f) | ((a) << 5)))) 147 #define addPrimSize(ot, p, size) (p)->tag = ((*(ot)) | ((size) << 24)), *((ot)) = (((uint32)(p) << 8) >> 8) 152 uint8 r0, g0, b0, code;
161 uint8 r0, g0, b0, code;
171 uint8 r0, g0, b0, code;
173 uint8 r1, g1, b1, pad1;
175 uint8 r2, g2, b2, pad2;
182 uint8 r0, g0, b0, code;
184 uint8 r1, g1, b1, pad1;
186 uint8 r2, g2, b2, pad2;
188 uint8 r3, g3, b3, pad3;
195 uint8 r0, g0, b0, code;
203 uint8 r0, g0, b0, code;
205 uint8 r1, g1, b1, p1;
212 uint8 r0, g0, b0, code;
222 uint8 r0, g0, b0, code;
224 uint8 r1, g1, b1, p1;
226 uint8 r2, g2, b2, p2;
234 uint8 r0, g0, b0, code;
245 uint8 r0, g0, b0, code;
247 uint8 r1, g1, b1, p1;
249 uint8 r2, g2, b2, p2;
251 uint8 r3, g3, b3, p3;
260 uint8 r0, g0, b0, code;
270 uint8 r0, g0, b0, code;
279 uint8 r0, g0, b0, code;
288 uint8 r0, g0, b0, code;
296 uint8 r0, g0, b0, code;
303 uint8 r0, g0, b0, code;
310 uint8 r0, g0, b0, code;
316 #endif // __DEANPOLY_H Definition: psx_poly.h:276
Definition: psx_poly.h:158
Definition: psx_poly.h:257
Definition: psx_poly.h:242
Definition: psx_poly.h:149
Definition: psx_poly.h:307
Definition: psx_poly.h:200
Definition: psx_poly.h:219
Definition: psx_poly.h:179
Definition: psx_poly.h:285
Definition: psx_poly.h:293
Definition: psx_poly.h:231
Definition: psx_poly.h:168
Definition: psx_pcgpu.h:270
Definition: psx_pcgpu.h:280
Definition: psx_poly.h:300
Definition: psx_poly.h:192
Definition: psx_poly.h:267
Definition: psx_poly.h:209