1
|
1 /*
|
|
2 * 3dfx.h
|
|
3 *
|
|
4 * Copyright (C) Colin Cross Apr 2000
|
|
5 *
|
|
6 * mpeg2dec is free software; you can redistribute it and/or modify
|
|
7 * it under the terms of the GNU General Public License as published by
|
|
8 * the Free Software Foundation; either version 2, or (at your option)
|
|
9 * any later version.
|
|
10 *
|
|
11 * mpeg2dec is distributed in the hope that it will be useful,
|
|
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
14 * GNU General Public License for more details.
|
|
15 *
|
|
16 * You should have received a copy of the GNU General Public License
|
|
17 * along with GNU Make; see the file COPYING. If not, write to
|
|
18 * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
|
|
19 *
|
|
20 */
|
|
21
|
|
22
|
|
23 #define VOODOO_IO_REG_OFFSET ((unsigned long int)0x0000000)
|
|
24 #define VOODOO_YUV_REG_OFFSET ((unsigned long int)0x0080100)
|
|
25 #define VOODOO_AGP_REG_OFFSET ((unsigned long int)0x0080000)
|
|
26 #define VOODOO_2D_REG_OFFSET ((unsigned long int)0x0100000)
|
|
27 #define VOODOO_YUV_PLANE_OFFSET ((unsigned long int)0x0C00000)
|
|
28
|
|
29 #define VOODOO_BLT_FORMAT_YUYV (8<<16)
|
|
30 #define VOODOO_BLT_FORMAT_16 (3<<16)
|
|
31
|
|
32 #define VOODOO_YUV_STRIDE (1024>>2)
|
|
33
|
|
34 struct voodoo_yuv_fb_t {
|
|
35 uint32_t Y[0x0040000];
|
|
36 uint32_t U[0x0040000];
|
|
37 uint32_t V[0x0040000];
|
|
38 };
|
|
39
|
|
40 struct voodoo_yuv_reg_t {
|
|
41 uint32_t yuvBaseAddr;
|
|
42 uint32_t yuvStride;
|
|
43 };
|
|
44
|
|
45 struct voodoo_2d_reg_t {
|
|
46 uint32_t status;
|
|
47 uint32_t intCtrl;
|
|
48 uint32_t clip0Min;
|
|
49 uint32_t clip0Max;
|
|
50 uint32_t dstBaseAddr;
|
|
51 uint32_t dstFormat;
|
|
52 uint32_t srcColorkeyMin;
|
|
53 uint32_t srcColorkeyMax;
|
|
54 uint32_t dstColorkeyMin;
|
|
55 uint32_t dstColorkeyMax;
|
|
56 signed long bresError0;
|
|
57 signed long bresError1;
|
|
58 uint32_t rop;
|
|
59 uint32_t srcBaseAddr;
|
|
60 uint32_t commandExtra;
|
|
61 uint32_t lineStipple;
|
|
62 uint32_t lineStyle;
|
|
63 uint32_t pattern0Alias;
|
|
64 uint32_t pattern1Alias;;
|
|
65 uint32_t clip1Min;
|
|
66 uint32_t clip1Max;
|
|
67 uint32_t srcFormat;
|
|
68 uint32_t srcSize;
|
|
69 uint32_t srcXY;
|
|
70 uint32_t colorBack;
|
|
71 uint32_t colorFore;
|
|
72 uint32_t dstSize;
|
|
73 uint32_t dstXY;
|
|
74 uint32_t command;
|
|
75 uint32_t RESERVED1;
|
|
76 uint32_t RESERVED2;
|
|
77 uint32_t RESERVED3;
|
|
78 uint8_t launchArea[128];
|
|
79 };
|
|
80
|
|
81
|
|
82 struct voodoo_io_reg_t {
|
|
83 uint32_t status;
|
|
84 uint32_t pciInit0;
|
|
85 uint32_t sipMonitor;
|
|
86 uint32_t lfbMemoryConfig;
|
|
87 uint32_t miscInit0;
|
|
88 uint32_t miscInit1;
|
|
89 uint32_t dramInit0;
|
|
90 uint32_t dramInit1;
|
|
91 uint32_t agpInit;
|
|
92 uint32_t tmuGbeInit;
|
|
93 uint32_t vgaInit0;
|
|
94 uint32_t vgaInit1;
|
|
95 uint32_t dramCommand;
|
|
96 uint32_t dramData;
|
|
97 uint32_t RESERVED1;
|
|
98 uint32_t RESERVED2;
|
|
99
|
|
100 uint32_t pllCtrl0;
|
|
101 uint32_t pllCtrl1;
|
|
102 uint32_t pllCtrl2;
|
|
103 uint32_t dacMode;
|
|
104 uint32_t dacAddr;
|
|
105 uint32_t dacData;
|
|
106
|
|
107 uint32_t rgbMaxDelta;
|
|
108 uint32_t vidProcCfg;
|
|
109 uint32_t hwCurPatAddr;
|
|
110 uint32_t hwCurLoc;
|
|
111 uint32_t hwCurC0;
|
|
112 uint32_t hwCurC1;
|
|
113 uint32_t vidInFormat;
|
|
114 uint32_t vidInStatus;
|
|
115 uint32_t vidSerialParallelPort;
|
|
116 uint32_t vidInXDecimDeltas;
|
|
117 uint32_t vidInDecimInitErrs;
|
|
118 uint32_t vidInYDecimDeltas;
|
|
119 uint32_t vidPixelBufThold;
|
|
120 uint32_t vidChromaMin;
|
|
121 uint32_t vidChromaMax;
|
|
122 uint32_t vidCurrentLine;
|
|
123 uint32_t vidScreenSize;
|
|
124 uint32_t vidOverlayStartCoords;
|
|
125 uint32_t vidOverlayEndScreenCoord;
|
|
126 uint32_t vidOverlayDudx;
|
|
127 uint32_t vidOverlayDudxOffsetSrcWidth;
|
|
128 uint32_t vidOverlayDvdy;
|
|
129
|
|
130 uint32_t vga_registers_not_mem_mapped[12];
|
|
131 uint32_t vidOverlayDvdyOffset;
|
|
132 uint32_t vidDesktopStartAddr;
|
|
133 uint32_t vidDesktopOverlayStride;
|
|
134 uint32_t vidInAddr0;
|
|
135 uint32_t vidInAddr1;
|
|
136 uint32_t vidInAddr2;
|
|
137 uint32_t vidInStride;
|
|
138 uint32_t vidCurrOverlayStartAddr;
|
|
139 };
|
|
140
|
|
141
|
|
142 struct pioData_t {
|
|
143 short port;
|
|
144 short size;
|
|
145 int device;
|
|
146 void *value;
|
|
147 };
|
|
148
|
|
149 typedef struct pioData_t pioData;
|
|
150 typedef struct voodoo_2d_reg_t voodoo_2d_reg;
|
|
151 typedef struct voodoo_io_reg_t voodoo_io_reg;
|
|
152 typedef struct voodoo_yuv_reg_t voodoo_yuv_reg;
|
|
153 typedef struct voodoo_yuv_fb_t voodoo_yuv_fb;
|
|
154
|