1 | #ifndef __CVGREGS_H__
|
---|
2 | #define __CVGREGS_H__
|
---|
3 |
|
---|
4 | /*
|
---|
5 | ** THIS SOFTWARE IS SUBJECT TO COPYRIGHT PROTECTION AND IS OFFERED ONLY
|
---|
6 | ** PURSUANT TO THE 3DFX GLIDE GENERAL PUBLIC LICENSE. THERE IS NO RIGHT
|
---|
7 | ** TO USE THE GLIDE TRADEMARK WITHOUT PRIOR WRITTEN PERMISSION OF 3DFX
|
---|
8 | ** INTERACTIVE, INC. A COPY OF THIS LICENSE MAY BE OBTAINED FROM THE
|
---|
9 | ** DISTRIBUTOR OR BY CONTACTING 3DFX INTERACTIVE INC(info@3dfx.com).
|
---|
10 | ** THIS PROGRAM IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER
|
---|
11 | ** EXPRESSED OR IMPLIED. SEE THE 3DFX GLIDE GENERAL PUBLIC LICENSE FOR A
|
---|
12 | ** FULL TEXT OF THE NON-WARRANTY PROVISIONS.
|
---|
13 | **
|
---|
14 | ** USE, DUPLICATION OR DISCLOSURE BY THE GOVERNMENT IS SUBJECT TO
|
---|
15 | ** RESTRICTIONS AS SET FORTH IN SUBDIVISION (C)(1)(II) OF THE RIGHTS IN
|
---|
16 | ** TECHNICAL DATA AND COMPUTER SOFTWARE CLAUSE AT DFARS 252.227-7013,
|
---|
17 | ** AND/OR IN SIMILAR OR SUCCESSOR CLAUSES IN THE FAR, DOD OR NASA FAR
|
---|
18 | ** SUPPLEMENT. UNPUBLISHED RIGHTS RESERVED UNDER THE COPYRIGHT LAWS OF
|
---|
19 | ** THE UNITED STATES.
|
---|
20 | **
|
---|
21 | ** COPYRIGHT 3DFX INTERACTIVE, INC. 1999, ALL RIGHTS RESERVED
|
---|
22 | **
|
---|
23 | ** $Revision: 1.1 $
|
---|
24 | ** $Date: 2000-02-25 00:37:49 $
|
---|
25 | */
|
---|
26 |
|
---|
27 |
|
---|
28 | //----------------- SST chip 3D layout -------------------------
|
---|
29 | // registers are in groups of 8 for easy decode
|
---|
30 | typedef struct vertex_Rec {
|
---|
31 | unsigned long x; // 12.4 format
|
---|
32 | unsigned long y; // 12.4
|
---|
33 | } vtxRec;
|
---|
34 |
|
---|
35 | typedef volatile struct sstregs { // THE 3D CHIP
|
---|
36 | // EXTERNAL registers
|
---|
37 | FxU32 status; // chip status, Read Only
|
---|
38 | FxU32 intrCtrl; // interrupt control
|
---|
39 | vtxRec vA; // Vertex A,B,C
|
---|
40 | vtxRec vB;
|
---|
41 | vtxRec vC;
|
---|
42 |
|
---|
43 | long r; // 12.12 Parameters
|
---|
44 | long g; // 12.12
|
---|
45 | long b; // 12.12
|
---|
46 | long z; // 20.12
|
---|
47 | long a; // 12.12
|
---|
48 | long s; // 14.18
|
---|
49 | long t; // 14.18
|
---|
50 | long w; // 2.30
|
---|
51 |
|
---|
52 | long drdx; // X Gradients
|
---|
53 | long dgdx;
|
---|
54 | long dbdx;
|
---|
55 | long dzdx;
|
---|
56 | long dadx;
|
---|
57 | long dsdx;
|
---|
58 | long dtdx;
|
---|
59 | long dwdx;
|
---|
60 |
|
---|
61 | long drdy; // Y Gradients
|
---|
62 | long dgdy;
|
---|
63 | long dbdy;
|
---|
64 | long dzdy;
|
---|
65 | long dady;
|
---|
66 | long dsdy;
|
---|
67 | long dtdy;
|
---|
68 | long dwdy;
|
---|
69 |
|
---|
70 | unsigned long triangleCMD; // execute a triangle command (float)
|
---|
71 | unsigned long reservedA;
|
---|
72 | vtxRec FvA; // floating point version
|
---|
73 | vtxRec FvB;
|
---|
74 | vtxRec FvC;
|
---|
75 |
|
---|
76 | long Fr; // floating point version
|
---|
77 | long Fg;
|
---|
78 | long Fb;
|
---|
79 | long Fz;
|
---|
80 | long Fa;
|
---|
81 | long Fs;
|
---|
82 | long Ft;
|
---|
83 | long Fw;
|
---|
84 |
|
---|
85 | long Fdrdx;
|
---|
86 | long Fdgdx;
|
---|
87 | long Fdbdx;
|
---|
88 | long Fdzdx;
|
---|
89 | long Fdadx;
|
---|
90 | long Fdsdx;
|
---|
91 | long Fdtdx;
|
---|
92 | long Fdwdx;
|
---|
93 |
|
---|
94 | long Fdrdy;
|
---|
95 | long Fdgdy;
|
---|
96 | long Fdbdy;
|
---|
97 | long Fdzdy;
|
---|
98 | long Fdady;
|
---|
99 | long Fdsdy;
|
---|
100 | long Fdtdy;
|
---|
101 | long Fdwdy;
|
---|
102 |
|
---|
103 | unsigned long FtriangleCMD; // execute a triangle command
|
---|
104 | unsigned long fbzColorPath; // color select and combine
|
---|
105 | unsigned long fogMode; // fog Mode
|
---|
106 | unsigned long alphaMode; // alpha Mode
|
---|
107 | unsigned long fbzMode; // framebuffer and Z mode
|
---|
108 | unsigned long lfbMode; // linear framebuffer Mode
|
---|
109 | unsigned long clipLeftRight; // (6)10(6)10
|
---|
110 | unsigned long clipBottomTop; // (6)10(6)10
|
---|
111 |
|
---|
112 | unsigned long nopCMD; // execute a nop command
|
---|
113 | unsigned long fastfillCMD; // execute a fast fill command
|
---|
114 | unsigned long swapbufferCMD;// execute a swapbuffer command
|
---|
115 | unsigned long fogColor; // (8)888
|
---|
116 | unsigned long zaColor; // 8(8)16
|
---|
117 | unsigned long chromaKey; // (8)888
|
---|
118 | unsigned long chromaRange;
|
---|
119 | unsigned long reservedB;
|
---|
120 |
|
---|
121 | unsigned long stipple; // 32 bits, MSB masks pixels
|
---|
122 | unsigned long c0; // 8.8.8.8 (ARGB)
|
---|
123 | unsigned long c1; // 8.8.8.8 (ARGB)
|
---|
124 | struct { // statistic gathering variables
|
---|
125 | unsigned int fbiPixelsIn;
|
---|
126 | unsigned int fbiChromaFail;
|
---|
127 | unsigned int fbiZfuncFail;
|
---|
128 | unsigned int fbiAfuncFail;
|
---|
129 | unsigned int fbiPixelsOut;
|
---|
130 | } stats;
|
---|
131 |
|
---|
132 | unsigned long fogTable[32]; // 64 entries, 2 per word, 2 bytes each
|
---|
133 |
|
---|
134 | FxU32 cmdFifoBase; // beginning of CMDFIFO area
|
---|
135 | FxU32 cmdFifoBump; // number of words to bump (write only)
|
---|
136 | FxU32 cmdFifoReadPtr; // the read (execute) pointer
|
---|
137 | FxU32 cmdFifoAmin; // points to first hole
|
---|
138 | FxU32 cmdFifoAmax; // highest address written (not visible)
|
---|
139 | FxU32 cmdFifoDepth; // number of valid sequential words
|
---|
140 | FxU32 cmdFifoHoles; // number of current holes
|
---|
141 | unsigned long reservedC;
|
---|
142 |
|
---|
143 | unsigned long fbiInit4;
|
---|
144 | unsigned long vRetrace;
|
---|
145 | unsigned long backPorch;
|
---|
146 | unsigned long videoDimensions;
|
---|
147 | unsigned long fbiInit0;
|
---|
148 | unsigned long fbiInit1;
|
---|
149 | unsigned long fbiInit2;
|
---|
150 | unsigned long fbiInit3;
|
---|
151 |
|
---|
152 | unsigned long hSync;
|
---|
153 | unsigned long vSync;
|
---|
154 | unsigned long clutData;
|
---|
155 | unsigned long dacData;
|
---|
156 | unsigned long videoFilterRgbThreshold;
|
---|
157 | FxU32 hBorder;
|
---|
158 | FxU32 vBorder;
|
---|
159 | FxU32 borderColor;
|
---|
160 |
|
---|
161 | FxU32 hvRetrace;
|
---|
162 | FxU32 fbiInit5;
|
---|
163 | FxU32 fbiInit6;
|
---|
164 | FxU32 fbiInit7;
|
---|
165 | unsigned long reservedD[2];
|
---|
166 | FxU32 fbiSwapHistory;
|
---|
167 | FxU32 fbiTrianglesOut; // triangles out counter
|
---|
168 |
|
---|
169 | FxU32 sSetupMode;
|
---|
170 | FxU32 sVx;
|
---|
171 | FxU32 sVy;
|
---|
172 | FxU32 sARGB;
|
---|
173 | FxU32 sRed;
|
---|
174 | FxU32 sGreen;
|
---|
175 | FxU32 sBlue;
|
---|
176 | FxU32 sAlpha;
|
---|
177 |
|
---|
178 | FxU32 sVz;
|
---|
179 | FxU32 sOowfbi;
|
---|
180 | FxU32 sOow0;
|
---|
181 | FxU32 sSow0;
|
---|
182 | FxU32 sTow0;
|
---|
183 | FxU32 sOow1;
|
---|
184 | FxU32 sSow1;
|
---|
185 | FxU32 sTow1;
|
---|
186 |
|
---|
187 | FxU32 sDrawTriCMD;
|
---|
188 | FxU32 sBeginTriCMD;
|
---|
189 | unsigned long reservedE[6];
|
---|
190 |
|
---|
191 | FxU32 bltSrcBaseAddr;
|
---|
192 | FxU32 bltDstBaseAddr;
|
---|
193 | FxU32 bltXYstrides;
|
---|
194 | FxU32 bltSrcChromaRange;
|
---|
195 | FxU32 bltDstChromaRange;
|
---|
196 | FxU32 bltClipX;
|
---|
197 | FxU32 bltClipY;
|
---|
198 | FxU32 reservedF;
|
---|
199 |
|
---|
200 | FxU32 bltSrcXY;
|
---|
201 | FxU32 bltDstXY;
|
---|
202 | FxU32 bltSize;
|
---|
203 | FxU32 bltRop;
|
---|
204 | FxU32 bltColor;
|
---|
205 | FxU32 reservedG;
|
---|
206 | FxU32 bltCommand;
|
---|
207 | FxU32 bltData;
|
---|
208 |
|
---|
209 | unsigned long textureMode; // texture Mode
|
---|
210 | unsigned long tLOD; // texture LOD settings
|
---|
211 | unsigned long tDetail; // texture detail settings
|
---|
212 | unsigned long texBaseAddr; // current texture base address
|
---|
213 | unsigned long texBaseAddr1;
|
---|
214 | unsigned long texBaseAddr2;
|
---|
215 | unsigned long texBaseAddr38;
|
---|
216 | unsigned long trexInit0; // hardware init bits
|
---|
217 |
|
---|
218 | unsigned long trexInit1; // hardware init bits
|
---|
219 | unsigned long nccTable0[12]; // NCC decode tables, bits are packed
|
---|
220 | unsigned long nccTable1[12]; // 4 words Y, 4 words I, 4 words Q
|
---|
221 | FxU32 tchromaKey; // texture chromakey
|
---|
222 | FxU32 tchromaRange; // texture chromarange
|
---|
223 | FxU32 reservedH[5];
|
---|
224 | FxU32 reservedI[8];
|
---|
225 | FxU32 reservedJ[8];
|
---|
226 | FxU32 reservedK[8];
|
---|
227 | } SstRegs;
|
---|
228 |
|
---|
229 | #endif /* !__CVGREGS_H__ */
|
---|