DOSBox-X
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Defines
src/hardware/voodoo_def.h
00001 /***************************************************************************/
00002 /*        Portion of this software comes with the following license:       */
00003 /***************************************************************************/
00004 /*
00005 
00006     Copyright Aaron Giles
00007     All rights reserved.
00008 
00009     Redistribution and use in source and binary forms, with or without
00010     modification, are permitted provided that the following conditions are
00011     met:
00012 
00013         * Redistributions of source code must retain the above copyright
00014           notice, this list of conditions and the following disclaimer.
00015         * Redistributions in binary form must reproduce the above copyright
00016           notice, this list of conditions and the following disclaimer in
00017           the documentation and/or other materials provided with the
00018           distribution.
00019         * Neither the name 'MAME' nor the names of its contributors may be
00020           used to endorse or promote products derived from this software
00021           without specific prior written permission.
00022 
00023     THIS SOFTWARE IS PROVIDED BY AARON GILES ''AS IS'' AND ANY EXPRESS OR
00024     IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
00025     WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
00026     DISCLAIMED. IN NO EVENT SHALL AARON GILES BE LIABLE FOR ANY DIRECT,
00027     INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
00028     (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
00029     SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
00030     HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
00031     STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
00032     IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
00033     POSSIBILITY OF SUCH DAMAGE.
00034 
00035 ***************************************************************************/
00036 
00037 /*************************************************************************
00038 
00039     3dfx Voodoo Graphics SST-1/2 emulator
00040 
00041     emulator by Aaron Giles
00042 
00043 **************************************************************************/
00044 
00045 
00046 #ifndef DOSBOX_VOODOO_DEF_H
00047 #define DOSBOX_VOODOO_DEF_H
00048 
00049 
00050 /*************************************
00051  *
00052  *  Register constants
00053  *
00054  *************************************/
00055 
00056 /* Codes to the right:
00057     R = readable
00058     W = writeable
00059     P = pipelined
00060     F = goes to FIFO
00061 */
00062 
00063 /* 0x000 */
00064 #define status                  (0x000/4)       /* R  P  */
00065 #define intrCtrl                (0x004/4)       /* RW P   -- Voodoo2/Banshee only */
00066 #define vertexAx                (0x008/4)       /*  W PF */
00067 #define vertexAy                (0x00c/4)       /*  W PF */
00068 #define vertexBx                (0x010/4)       /*  W PF */
00069 #define vertexBy                (0x014/4)       /*  W PF */
00070 #define vertexCx                (0x018/4)       /*  W PF */
00071 #define vertexCy                (0x01c/4)       /*  W PF */
00072 #define startR                  (0x020/4)       /*  W PF */
00073 #define startG                  (0x024/4)       /*  W PF */
00074 #define startB                  (0x028/4)       /*  W PF */
00075 #define startZ                  (0x02c/4)       /*  W PF */
00076 #define startA                  (0x030/4)       /*  W PF */
00077 #define startS                  (0x034/4)       /*  W PF */
00078 #define startT                  (0x038/4)       /*  W PF */
00079 #define startW                  (0x03c/4)       /*  W PF */
00080 
00081 /* 0x040 */
00082 #define dRdX                    (0x040/4)       /*  W PF */
00083 #define dGdX                    (0x044/4)       /*  W PF */
00084 #define dBdX                    (0x048/4)       /*  W PF */
00085 #define dZdX                    (0x04c/4)       /*  W PF */
00086 #define dAdX                    (0x050/4)       /*  W PF */
00087 #define dSdX                    (0x054/4)       /*  W PF */
00088 #define dTdX                    (0x058/4)       /*  W PF */
00089 #define dWdX                    (0x05c/4)       /*  W PF */
00090 #define dRdY                    (0x060/4)       /*  W PF */
00091 #define dGdY                    (0x064/4)       /*  W PF */
00092 #define dBdY                    (0x068/4)       /*  W PF */
00093 #define dZdY                    (0x06c/4)       /*  W PF */
00094 #define dAdY                    (0x070/4)       /*  W PF */
00095 #define dSdY                    (0x074/4)       /*  W PF */
00096 #define dTdY                    (0x078/4)       /*  W PF */
00097 #define dWdY                    (0x07c/4)       /*  W PF */
00098 
00099 /* 0x080 */
00100 #define triangleCMD             (0x080/4)       /*  W PF */
00101 #define fvertexAx               (0x088/4)       /*  W PF */
00102 #define fvertexAy               (0x08c/4)       /*  W PF */
00103 #define fvertexBx               (0x090/4)       /*  W PF */
00104 #define fvertexBy               (0x094/4)       /*  W PF */
00105 #define fvertexCx               (0x098/4)       /*  W PF */
00106 #define fvertexCy               (0x09c/4)       /*  W PF */
00107 #define fstartR                 (0x0a0/4)       /*  W PF */
00108 #define fstartG                 (0x0a4/4)       /*  W PF */
00109 #define fstartB                 (0x0a8/4)       /*  W PF */
00110 #define fstartZ                 (0x0ac/4)       /*  W PF */
00111 #define fstartA                 (0x0b0/4)       /*  W PF */
00112 #define fstartS                 (0x0b4/4)       /*  W PF */
00113 #define fstartT                 (0x0b8/4)       /*  W PF */
00114 #define fstartW                 (0x0bc/4)       /*  W PF */
00115 
00116 /* 0x0c0 */
00117 #define fdRdX                   (0x0c0/4)       /*  W PF */
00118 #define fdGdX                   (0x0c4/4)       /*  W PF */
00119 #define fdBdX                   (0x0c8/4)       /*  W PF */
00120 #define fdZdX                   (0x0cc/4)       /*  W PF */
00121 #define fdAdX                   (0x0d0/4)       /*  W PF */
00122 #define fdSdX                   (0x0d4/4)       /*  W PF */
00123 #define fdTdX                   (0x0d8/4)       /*  W PF */
00124 #define fdWdX                   (0x0dc/4)       /*  W PF */
00125 #define fdRdY                   (0x0e0/4)       /*  W PF */
00126 #define fdGdY                   (0x0e4/4)       /*  W PF */
00127 #define fdBdY                   (0x0e8/4)       /*  W PF */
00128 #define fdZdY                   (0x0ec/4)       /*  W PF */
00129 #define fdAdY                   (0x0f0/4)       /*  W PF */
00130 #define fdSdY                   (0x0f4/4)       /*  W PF */
00131 #define fdTdY                   (0x0f8/4)       /*  W PF */
00132 #define fdWdY                   (0x0fc/4)       /*  W PF */
00133 
00134 /* 0x100 */
00135 #define ftriangleCMD    (0x100/4)       /*  W PF */
00136 #define fbzColorPath    (0x104/4)       /* RW PF */
00137 #define fogMode                 (0x108/4)       /* RW PF */
00138 #define alphaMode               (0x10c/4)       /* RW PF */
00139 #define fbzMode                 (0x110/4)       /* RW  F */
00140 #define lfbMode                 (0x114/4)       /* RW  F */
00141 #define clipLeftRight   (0x118/4)       /* RW  F */
00142 #define clipLowYHighY   (0x11c/4)       /* RW  F */
00143 #define nopCMD                  (0x120/4)       /*  W  F */
00144 #define fastfillCMD             (0x124/4)       /*  W  F */
00145 #define swapbufferCMD   (0x128/4)       /*  W  F */
00146 #define fogColor                (0x12c/4)       /*  W  F */
00147 #define zaColor                 (0x130/4)       /*  W  F */
00148 #define chromaKey               (0x134/4)       /*  W  F */
00149 #define chromaRange             (0x138/4)       /*  W  F  -- Voodoo2/Banshee only */
00150 #define userIntrCMD             (0x13c/4)       /*  W  F  -- Voodoo2/Banshee only */
00151 
00152 /* 0x140 */
00153 #define stipple                 (0x140/4)       /* RW  F */
00154 #define color0                  (0x144/4)       /* RW  F */
00155 #define color1                  (0x148/4)       /* RW  F */
00156 #define fbiPixelsIn             (0x14c/4)       /* R     */
00157 #define fbiChromaFail   (0x150/4)       /* R     */
00158 #define fbiZfuncFail    (0x154/4)       /* R     */
00159 #define fbiAfuncFail    (0x158/4)       /* R     */
00160 #define fbiPixelsOut    (0x15c/4)       /* R     */
00161 #define fogTable                (0x160/4)       /*  W  F */
00162 
00163 /* 0x1c0 */
00164 #define cmdFifoBaseAddr (0x1e0/4)       /* RW     -- Voodoo2 only */
00165 #define cmdFifoBump             (0x1e4/4)       /* RW     -- Voodoo2 only */
00166 #define cmdFifoRdPtr    (0x1e8/4)       /* RW     -- Voodoo2 only */
00167 #define cmdFifoAMin             (0x1ec/4)       /* RW     -- Voodoo2 only */
00168 #define colBufferAddr   (0x1ec/4)       /* RW     -- Banshee only */
00169 #define cmdFifoAMax             (0x1f0/4)       /* RW     -- Voodoo2 only */
00170 #define colBufferStride (0x1f0/4)       /* RW     -- Banshee only */
00171 #define cmdFifoDepth    (0x1f4/4)       /* RW     -- Voodoo2 only */
00172 #define auxBufferAddr   (0x1f4/4)       /* RW     -- Banshee only */
00173 #define cmdFifoHoles    (0x1f8/4)       /* RW     -- Voodoo2 only */
00174 #define auxBufferStride (0x1f8/4)       /* RW     -- Banshee only */
00175 
00176 /* 0x200 */
00177 #define fbiInit4                (0x200/4)       /* RW     -- Voodoo/Voodoo2 only */
00178 #define clipLeftRight1  (0x200/4)       /* RW     -- Banshee only */
00179 #define vRetrace                (0x204/4)       /* R      -- Voodoo/Voodoo2 only */
00180 #define clipTopBottom1  (0x204/4)       /* RW     -- Banshee only */
00181 #define backPorch               (0x208/4)       /* RW     -- Voodoo/Voodoo2 only */
00182 #define videoDimensions (0x20c/4)       /* RW     -- Voodoo/Voodoo2 only */
00183 #define fbiInit0                (0x210/4)       /* RW     -- Voodoo/Voodoo2 only */
00184 #define fbiInit1                (0x214/4)       /* RW     -- Voodoo/Voodoo2 only */
00185 #define fbiInit2                (0x218/4)       /* RW     -- Voodoo/Voodoo2 only */
00186 #define fbiInit3                (0x21c/4)       /* RW     -- Voodoo/Voodoo2 only */
00187 #define hSync                   (0x220/4)       /*  W     -- Voodoo/Voodoo2 only */
00188 #define vSync                   (0x224/4)       /*  W     -- Voodoo/Voodoo2 only */
00189 #define clutData                (0x228/4)       /*  W  F  -- Voodoo/Voodoo2 only */
00190 #define dacData                 (0x22c/4)       /*  W     -- Voodoo/Voodoo2 only */
00191 #define maxRgbDelta             (0x230/4)       /*  W     -- Voodoo/Voodoo2 only */
00192 #define hBorder                 (0x234/4)       /*  W     -- Voodoo2 only */
00193 #define vBorder                 (0x238/4)       /*  W     -- Voodoo2 only */
00194 #define borderColor             (0x23c/4)       /*  W     -- Voodoo2 only */
00195 
00196 /* 0x240 */
00197 #define hvRetrace               (0x240/4)       /* R      -- Voodoo2 only */
00198 #define fbiInit5                (0x244/4)       /* RW     -- Voodoo2 only */
00199 #define fbiInit6                (0x248/4)       /* RW     -- Voodoo2 only */
00200 #define fbiInit7                (0x24c/4)       /* RW     -- Voodoo2 only */
00201 #define swapPending             (0x24c/4)       /*  W     -- Banshee only */
00202 #define leftOverlayBuf  (0x250/4)       /*  W     -- Banshee only */
00203 #define rightOverlayBuf (0x254/4)       /*  W     -- Banshee only */
00204 #define fbiSwapHistory  (0x258/4)       /* R      -- Voodoo2/Banshee only */
00205 #define fbiTrianglesOut (0x25c/4)       /* R      -- Voodoo2/Banshee only */
00206 #define sSetupMode              (0x260/4)       /*  W PF  -- Voodoo2/Banshee only */
00207 #define sVx                             (0x264/4)       /*  W PF  -- Voodoo2/Banshee only */
00208 #define sVy                             (0x268/4)       /*  W PF  -- Voodoo2/Banshee only */
00209 #define sARGB                   (0x26c/4)       /*  W PF  -- Voodoo2/Banshee only */
00210 #define sRed                    (0x270/4)       /*  W PF  -- Voodoo2/Banshee only */
00211 #define sGreen                  (0x274/4)       /*  W PF  -- Voodoo2/Banshee only */
00212 #define sBlue                   (0x278/4)       /*  W PF  -- Voodoo2/Banshee only */
00213 #define sAlpha                  (0x27c/4)       /*  W PF  -- Voodoo2/Banshee only */
00214 
00215 /* 0x280 */
00216 #define sVz                             (0x280/4)       /*  W PF  -- Voodoo2/Banshee only */
00217 #define sWb                             (0x284/4)       /*  W PF  -- Voodoo2/Banshee only */
00218 #define sWtmu0                  (0x288/4)       /*  W PF  -- Voodoo2/Banshee only */
00219 #define sS_W0                   (0x28c/4)       /*  W PF  -- Voodoo2/Banshee only */
00220 #define sT_W0                   (0x290/4)       /*  W PF  -- Voodoo2/Banshee only */
00221 #define sWtmu1                  (0x294/4)       /*  W PF  -- Voodoo2/Banshee only */
00222 #define sS_Wtmu1                (0x298/4)       /*  W PF  -- Voodoo2/Banshee only */
00223 #define sT_Wtmu1                (0x29c/4)       /*  W PF  -- Voodoo2/Banshee only */
00224 #define sDrawTriCMD             (0x2a0/4)       /*  W PF  -- Voodoo2/Banshee only */
00225 #define sBeginTriCMD    (0x2a4/4)       /*  W PF  -- Voodoo2/Banshee only */
00226 
00227 /* 0x2c0 */
00228 #define bltSrcBaseAddr  (0x2c0/4)       /* RW PF  -- Voodoo2 only */
00229 #define bltDstBaseAddr  (0x2c4/4)       /* RW PF  -- Voodoo2 only */
00230 #define bltXYStrides    (0x2c8/4)       /* RW PF  -- Voodoo2 only */
00231 #define bltSrcChromaRange (0x2cc/4)     /* RW PF  -- Voodoo2 only */
00232 #define bltDstChromaRange (0x2d0/4)     /* RW PF  -- Voodoo2 only */
00233 #define bltClipX                (0x2d4/4)       /* RW PF  -- Voodoo2 only */
00234 #define bltClipY                (0x2d8/4)       /* RW PF  -- Voodoo2 only */
00235 #define bltSrcXY                (0x2e0/4)       /* RW PF  -- Voodoo2 only */
00236 #define bltDstXY                (0x2e4/4)       /* RW PF  -- Voodoo2 only */
00237 #define bltSize                 (0x2e8/4)       /* RW PF  -- Voodoo2 only */
00238 #define bltRop                  (0x2ec/4)       /* RW PF  -- Voodoo2 only */
00239 #define bltColor                (0x2f0/4)       /* RW PF  -- Voodoo2 only */
00240 #define bltCommand              (0x2f8/4)       /* RW PF  -- Voodoo2 only */
00241 #define bltData                 (0x2fc/4)       /*  W PF  -- Voodoo2 only */
00242 
00243 /* 0x300 */
00244 #define textureMode             (0x300/4)       /*  W PF */
00245 #define tLOD                    (0x304/4)       /*  W PF */
00246 #define tDetail                 (0x308/4)       /*  W PF */
00247 #define texBaseAddr             (0x30c/4)       /*  W PF */
00248 #define texBaseAddr_1   (0x310/4)       /*  W PF */
00249 #define texBaseAddr_2   (0x314/4)       /*  W PF */
00250 #define texBaseAddr_3_8 (0x318/4)       /*  W PF */
00251 #define trexInit0               (0x31c/4)       /*  W  F  -- Voodoo/Voodoo2 only */
00252 #define trexInit1               (0x320/4)       /*  W  F */
00253 #define nccTable                (0x324/4)       /*  W  F */
00254 
00255 
00256 
00257 /*************************************
00258  *
00259  *  Alias map of the first 64
00260  *  registers when remapped
00261  *
00262  *************************************/
00263 
00264 static const UINT8 register_alias_map[0x40] =
00265 {
00266         status,         0x004/4,        vertexAx,       vertexAy,
00267         vertexBx,       vertexBy,       vertexCx,       vertexCy,
00268         startR,         dRdX,           dRdY,           startG,
00269         dGdX,           dGdY,           startB,         dBdX,
00270         dBdY,           startZ,         dZdX,           dZdY,
00271         startA,         dAdX,           dAdY,           startS,
00272         dSdX,           dSdY,           startT,         dTdX,
00273         dTdY,           startW,         dWdX,           dWdY,
00274 
00275         triangleCMD,0x084/4,    fvertexAx,      fvertexAy,
00276         fvertexBx,      fvertexBy,      fvertexCx,      fvertexCy,
00277         fstartR,        fdRdX,          fdRdY,          fstartG,
00278         fdGdX,          fdGdY,          fstartB,        fdBdX,
00279         fdBdY,          fstartZ,        fdZdX,          fdZdY,
00280         fstartA,        fdAdX,          fdAdY,          fstartS,
00281         fdSdX,          fdSdY,          fstartT,        fdTdX,
00282         fdTdY,          fstartW,        fdWdX,          fdWdY
00283 };
00284 
00285 
00286 
00287 /*************************************
00288  *
00289  *  Table of per-register access rights
00290  *
00291  *************************************/
00292 
00293 static const UINT8 voodoo_register_access[0x100] =
00294 {
00295         /* 0x000 */
00296         REG_RP,         0,                      REG_WPF,        REG_WPF,
00297         REG_WPF,        REG_WPF,        REG_WPF,        REG_WPF,
00298         REG_WPF,        REG_WPF,        REG_WPF,        REG_WPF,
00299         REG_WPF,        REG_WPF,        REG_WPF,        REG_WPF,
00300 
00301         /* 0x040 */
00302         REG_WPF,        REG_WPF,        REG_WPF,        REG_WPF,
00303         REG_WPF,        REG_WPF,        REG_WPF,        REG_WPF,
00304         REG_WPF,        REG_WPF,        REG_WPF,        REG_WPF,
00305         REG_WPF,        REG_WPF,        REG_WPF,        REG_WPF,
00306 
00307         /* 0x080 */
00308         REG_WPF,        0,                      REG_WPF,        REG_WPF,
00309         REG_WPF,        REG_WPF,        REG_WPF,        REG_WPF,
00310         REG_WPF,        REG_WPF,        REG_WPF,        REG_WPF,
00311         REG_WPF,        REG_WPF,        REG_WPF,        REG_WPF,
00312 
00313         /* 0x0c0 */
00314         REG_WPF,        REG_WPF,        REG_WPF,        REG_WPF,
00315         REG_WPF,        REG_WPF,        REG_WPF,        REG_WPF,
00316         REG_WPF,        REG_WPF,        REG_WPF,        REG_WPF,
00317         REG_WPF,        REG_WPF,        REG_WPF,        REG_WPF,
00318 
00319         /* 0x100 */
00320         REG_WPF,        REG_RWPF,       REG_RWPF,       REG_RWPF,
00321         REG_RWF,        REG_RWF,        REG_RWF,        REG_RWF,
00322         REG_WF,         REG_WF,         REG_WF,         REG_WF,
00323         REG_WF,         REG_WF,         0,                      0,
00324 
00325         /* 0x140 */
00326         REG_RWF,        REG_RWF,        REG_RWF,        REG_R,
00327         REG_R,          REG_R,          REG_R,          REG_R,
00328         REG_WF,         REG_WF,         REG_WF,         REG_WF,
00329         REG_WF,         REG_WF,         REG_WF,         REG_WF,
00330 
00331         /* 0x180 */
00332         REG_WF,         REG_WF,         REG_WF,         REG_WF,
00333         REG_WF,         REG_WF,         REG_WF,         REG_WF,
00334         REG_WF,         REG_WF,         REG_WF,         REG_WF,
00335         REG_WF,         REG_WF,         REG_WF,         REG_WF,
00336 
00337         /* 0x1c0 */
00338         REG_WF,         REG_WF,         REG_WF,         REG_WF,
00339         REG_WF,         REG_WF,         REG_WF,         REG_WF,
00340         0,                      0,                      0,                      0,
00341         0,                      0,                      0,                      0,
00342 
00343         /* 0x200 */
00344         REG_RW,         REG_R,          REG_RW,         REG_RW,
00345         REG_RW,         REG_RW,         REG_RW,         REG_RW,
00346         REG_W,          REG_W,          REG_W,          REG_W,
00347         REG_W,          0,                      0,                      0,
00348 
00349         /* 0x240 */
00350         0,                      0,                      0,                      0,
00351         0,                      0,                      0,                      0,
00352         0,                      0,                      0,                      0,
00353         0,                      0,                      0,                      0,
00354 
00355         /* 0x280 */
00356         0,                      0,                      0,                      0,
00357         0,                      0,                      0,                      0,
00358         0,                      0,                      0,                      0,
00359         0,                      0,                      0,                      0,
00360 
00361         /* 0x2c0 */
00362         0,                      0,                      0,                      0,
00363         0,                      0,                      0,                      0,
00364         0,                      0,                      0,                      0,
00365         0,                      0,                      0,                      0,
00366 
00367         /* 0x300 */
00368         REG_WPF,        REG_WPF,        REG_WPF,        REG_WPF,
00369         REG_WPF,        REG_WPF,        REG_WPF,        REG_WF,
00370         REG_WF,         REG_WF,         REG_WF,         REG_WF,
00371         REG_WF,         REG_WF,         REG_WF,         REG_WF,
00372 
00373         /* 0x340 */
00374         REG_WF,         REG_WF,         REG_WF,         REG_WF,
00375         REG_WF,         REG_WF,         REG_WF,         REG_WF,
00376         REG_WF,         REG_WF,         REG_WF,         REG_WF,
00377         REG_WF,         REG_WF,         REG_WF,         REG_WF,
00378 
00379         /* 0x380 */
00380         REG_WF
00381 };
00382 
00383 
00384 static const UINT8 voodoo2_register_access[0x100] =
00385 {
00386         /* 0x000 */
00387         REG_RP,         REG_RWPT,       REG_WPF,        REG_WPF,
00388         REG_WPF,        REG_WPF,        REG_WPF,        REG_WPF,
00389         REG_WPF,        REG_WPF,        REG_WPF,        REG_WPF,
00390         REG_WPF,        REG_WPF,        REG_WPF,        REG_WPF,
00391 
00392         /* 0x040 */
00393         REG_WPF,        REG_WPF,        REG_WPF,        REG_WPF,
00394         REG_WPF,        REG_WPF,        REG_WPF,        REG_WPF,
00395         REG_WPF,        REG_WPF,        REG_WPF,        REG_WPF,
00396         REG_WPF,        REG_WPF,        REG_WPF,        REG_WPF,
00397 
00398         /* 0x080 */
00399         REG_WPF,        REG_WPF,        REG_WPF,        REG_WPF,
00400         REG_WPF,        REG_WPF,        REG_WPF,        REG_WPF,
00401         REG_WPF,        REG_WPF,        REG_WPF,        REG_WPF,
00402         REG_WPF,        REG_WPF,        REG_WPF,        REG_WPF,
00403 
00404         /* 0x0c0 */
00405         REG_WPF,        REG_WPF,        REG_WPF,        REG_WPF,
00406         REG_WPF,        REG_WPF,        REG_WPF,        REG_WPF,
00407         REG_WPF,        REG_WPF,        REG_WPF,        REG_WPF,
00408         REG_WPF,        REG_WPF,        REG_WPF,        REG_WPF,
00409 
00410         /* 0x100 */
00411         REG_WPF,        REG_RWPF,       REG_RWPF,       REG_RWPF,
00412         REG_RWF,        REG_RWF,        REG_RWF,        REG_RWF,
00413         REG_WF,         REG_WF,         REG_WF,         REG_WF,
00414         REG_WF,         REG_WF,         REG_WF,         REG_WF,
00415 
00416         /* 0x140 */
00417         REG_RWF,        REG_RWF,        REG_RWF,        REG_R,
00418         REG_R,          REG_R,          REG_R,          REG_R,
00419         REG_WF,         REG_WF,         REG_WF,         REG_WF,
00420         REG_WF,         REG_WF,         REG_WF,         REG_WF,
00421 
00422         /* 0x180 */
00423         REG_WF,         REG_WF,         REG_WF,         REG_WF,
00424         REG_WF,         REG_WF,         REG_WF,         REG_WF,
00425         REG_WF,         REG_WF,         REG_WF,         REG_WF,
00426         REG_WF,         REG_WF,         REG_WF,         REG_WF,
00427 
00428         /* 0x1c0 */
00429         REG_WF,         REG_WF,         REG_WF,         REG_WF,
00430         REG_WF,         REG_WF,         REG_WF,         REG_WF,
00431         REG_RWT,        REG_RWT,        REG_RWT,        REG_RWT,
00432         REG_RWT,        REG_RWT,        REG_RWT,        REG_RW,
00433 
00434         /* 0x200 */
00435         REG_RWT,        REG_R,          REG_RWT,        REG_RWT,
00436         REG_RWT,        REG_RWT,        REG_RWT,        REG_RWT,
00437         REG_WT,         REG_WT,         REG_WF,         REG_WT,
00438         REG_WT,         REG_WT,         REG_WT,         REG_WT,
00439 
00440         /* 0x240 */
00441         REG_R,          REG_RWT,        REG_RWT,        REG_RWT,
00442         0,                      0,                      REG_R,          REG_R,
00443         REG_WPF,        REG_WPF,        REG_WPF,        REG_WPF,
00444         REG_WPF,        REG_WPF,        REG_WPF,        REG_WPF,
00445 
00446         /* 0x280 */
00447         REG_WPF,        REG_WPF,        REG_WPF,        REG_WPF,
00448         REG_WPF,        REG_WPF,        REG_WPF,        REG_WPF,
00449         REG_WPF,        REG_WPF,        0,                      0,
00450         0,                      0,                      0,                      0,
00451 
00452         /* 0x2c0 */
00453         REG_RWPF,       REG_RWPF,       REG_RWPF,       REG_RWPF,
00454         REG_RWPF,       REG_RWPF,       REG_RWPF,       REG_RWPF,
00455         REG_RWPF,       REG_RWPF,       REG_RWPF,       REG_RWPF,
00456         REG_RWPF,       REG_RWPF,       REG_RWPF,       REG_WPF,
00457 
00458         /* 0x300 */
00459         REG_WPF,        REG_WPF,        REG_WPF,        REG_WPF,
00460         REG_WPF,        REG_WPF,        REG_WPF,        REG_WF,
00461         REG_WF,         REG_WF,         REG_WF,         REG_WF,
00462         REG_WF,         REG_WF,         REG_WF,         REG_WF,
00463 
00464         /* 0x340 */
00465         REG_WF,         REG_WF,         REG_WF,         REG_WF,
00466         REG_WF,         REG_WF,         REG_WF,         REG_WF,
00467         REG_WF,         REG_WF,         REG_WF,         REG_WF,
00468         REG_WF,         REG_WF,         REG_WF,         REG_WF,
00469 
00470         /* 0x380 */
00471         REG_WF
00472 };
00473 
00474 
00475 
00476 /*************************************
00477  *
00478  *  Register string table for debug
00479  *
00480  *************************************/
00481 
00482 static const char *const voodoo_reg_name[] =
00483 {
00484         /* 0x000 */
00485         "status",               "{intrCtrl}",   "vertexAx",             "vertexAy",
00486         "vertexBx",             "vertexBy",             "vertexCx",             "vertexCy",
00487         "startR",               "startG",               "startB",               "startZ",
00488         "startA",               "startS",               "startT",               "startW",
00489         /* 0x040 */
00490         "dRdX",                 "dGdX",                 "dBdX",                 "dZdX",
00491         "dAdX",                 "dSdX",                 "dTdX",                 "dWdX",
00492         "dRdY",                 "dGdY",                 "dBdY",                 "dZdY",
00493         "dAdY",                 "dSdY",                 "dTdY",                 "dWdY",
00494         /* 0x080 */
00495         "triangleCMD",  "reserved084",  "fvertexAx",    "fvertexAy",
00496         "fvertexBx",    "fvertexBy",    "fvertexCx",    "fvertexCy",
00497         "fstartR",              "fstartG",              "fstartB",              "fstartZ",
00498         "fstartA",              "fstartS",              "fstartT",              "fstartW",
00499         /* 0x0c0 */
00500         "fdRdX",                "fdGdX",                "fdBdX",                "fdZdX",
00501         "fdAdX",                "fdSdX",                "fdTdX",                "fdWdX",
00502         "fdRdY",                "fdGdY",                "fdBdY",                "fdZdY",
00503         "fdAdY",                "fdSdY",                "fdTdY",                "fdWdY",
00504         /* 0x100 */
00505         "ftriangleCMD", "fbzColorPath", "fogMode",              "alphaMode",
00506         "fbzMode",              "lfbMode",              "clipLeftRight","clipLowYHighY",
00507         "nopCMD",               "fastfillCMD",  "swapbufferCMD","fogColor",
00508         "zaColor",              "chromaKey",    "{chromaRange}","{userIntrCMD}",
00509         /* 0x140 */
00510         "stipple",              "color0",               "color1",               "fbiPixelsIn",
00511         "fbiChromaFail","fbiZfuncFail", "fbiAfuncFail", "fbiPixelsOut",
00512         "fogTable160",  "fogTable164",  "fogTable168",  "fogTable16c",
00513         "fogTable170",  "fogTable174",  "fogTable178",  "fogTable17c",
00514         /* 0x180 */
00515         "fogTable180",  "fogTable184",  "fogTable188",  "fogTable18c",
00516         "fogTable190",  "fogTable194",  "fogTable198",  "fogTable19c",
00517         "fogTable1a0",  "fogTable1a4",  "fogTable1a8",  "fogTable1ac",
00518         "fogTable1b0",  "fogTable1b4",  "fogTable1b8",  "fogTable1bc",
00519         /* 0x1c0 */
00520         "fogTable1c0",  "fogTable1c4",  "fogTable1c8",  "fogTable1cc",
00521         "fogTable1d0",  "fogTable1d4",  "fogTable1d8",  "fogTable1dc",
00522         "{cmdFifoBaseAddr}","{cmdFifoBump}","{cmdFifoRdPtr}","{cmdFifoAMin}",
00523         "{cmdFifoAMax}","{cmdFifoDepth}","{cmdFifoHoles}","reserved1fc",
00524         /* 0x200 */
00525         "fbiInit4",             "vRetrace",             "backPorch",    "videoDimensions",
00526         "fbiInit0",             "fbiInit1",             "fbiInit2",             "fbiInit3",
00527         "hSync",                "vSync",                "clutData",             "dacData",
00528         "maxRgbDelta",  "{hBorder}",    "{vBorder}",    "{borderColor}",
00529         /* 0x240 */
00530         "{hvRetrace}",  "{fbiInit5}",   "{fbiInit6}",   "{fbiInit7}",
00531         "reserved250",  "reserved254",  "{fbiSwapHistory}","{fbiTrianglesOut}",
00532         "{sSetupMode}", "{sVx}",                "{sVy}",                "{sARGB}",
00533         "{sRed}",               "{sGreen}",             "{sBlue}",              "{sAlpha}",
00534         /* 0x280 */
00535         "{sVz}",                "{sWb}",                "{sWtmu0}",             "{sS/Wtmu0}",
00536         "{sT/Wtmu0}",   "{sWtmu1}",             "{sS/Wtmu1}",   "{sT/Wtmu1}",
00537         "{sDrawTriCMD}","{sBeginTriCMD}","reserved2a8", "reserved2ac",
00538         "reserved2b0",  "reserved2b4",  "reserved2b8",  "reserved2bc",
00539         /* 0x2c0 */
00540         "{bltSrcBaseAddr}","{bltDstBaseAddr}","{bltXYStrides}","{bltSrcChromaRange}",
00541         "{bltDstChromaRange}","{bltClipX}","{bltClipY}","reserved2dc",
00542         "{bltSrcXY}",   "{bltDstXY}",   "{bltSize}",    "{bltRop}",
00543         "{bltColor}",   "reserved2f4",  "{bltCommand}", "{bltData}",
00544         /* 0x300 */
00545         "textureMode",  "tLOD",                 "tDetail",              "texBaseAddr",
00546         "texBaseAddr_1","texBaseAddr_2","texBaseAddr_3_8","trexInit0",
00547         "trexInit1",    "nccTable0.0",  "nccTable0.1",  "nccTable0.2",
00548         "nccTable0.3",  "nccTable0.4",  "nccTable0.5",  "nccTable0.6",
00549         /* 0x340 */
00550         "nccTable0.7",  "nccTable0.8",  "nccTable0.9",  "nccTable0.A",
00551         "nccTable0.B",  "nccTable1.0",  "nccTable1.1",  "nccTable1.2",
00552         "nccTable1.3",  "nccTable1.4",  "nccTable1.5",  "nccTable1.6",
00553         "nccTable1.7",  "nccTable1.8",  "nccTable1.9",  "nccTable1.A",
00554         /* 0x380 */
00555         "nccTable1.B"
00556 };
00557 
00558 
00559 #endif