Mercurial > mplayer.hg
annotate vidix/drivers/savage_regs.h @ 22313:5a5c7529e8a3
Remove some #if 0 code
author | uau |
---|---|
date | Sat, 24 Feb 2007 07:28:07 +0000 |
parents | 8be9b0f1e4b6 |
children |
rev | line source |
---|---|
14203
8be9b0f1e4b6
experimental savage vidix driver by Reza Jelveh <reza.jelveh at tu-harburg.de>
faust3
parents:
diff
changeset
|
1 /* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/savage/savage_regs.h,v 1.10 2001/11/04 22:17:48 alanh Exp $ */ |
8be9b0f1e4b6
experimental savage vidix driver by Reza Jelveh <reza.jelveh at tu-harburg.de>
faust3
parents:
diff
changeset
|
2 |
8be9b0f1e4b6
experimental savage vidix driver by Reza Jelveh <reza.jelveh at tu-harburg.de>
faust3
parents:
diff
changeset
|
3 #ifndef _SAVAGE_REGS_H |
8be9b0f1e4b6
experimental savage vidix driver by Reza Jelveh <reza.jelveh at tu-harburg.de>
faust3
parents:
diff
changeset
|
4 #define _SAVAGE_REGS_H |
8be9b0f1e4b6
experimental savage vidix driver by Reza Jelveh <reza.jelveh at tu-harburg.de>
faust3
parents:
diff
changeset
|
5 |
8be9b0f1e4b6
experimental savage vidix driver by Reza Jelveh <reza.jelveh at tu-harburg.de>
faust3
parents:
diff
changeset
|
6 /* These are here until xf86PciInfo.h is updated. */ |
8be9b0f1e4b6
experimental savage vidix driver by Reza Jelveh <reza.jelveh at tu-harburg.de>
faust3
parents:
diff
changeset
|
7 |
8be9b0f1e4b6
experimental savage vidix driver by Reza Jelveh <reza.jelveh at tu-harburg.de>
faust3
parents:
diff
changeset
|
8 #ifndef PCI_CHIP_S3TWISTER_P |
8be9b0f1e4b6
experimental savage vidix driver by Reza Jelveh <reza.jelveh at tu-harburg.de>
faust3
parents:
diff
changeset
|
9 #define PCI_CHIP_S3TWISTER_P 0x8d01 |
8be9b0f1e4b6
experimental savage vidix driver by Reza Jelveh <reza.jelveh at tu-harburg.de>
faust3
parents:
diff
changeset
|
10 #endif |
8be9b0f1e4b6
experimental savage vidix driver by Reza Jelveh <reza.jelveh at tu-harburg.de>
faust3
parents:
diff
changeset
|
11 #ifndef PCI_CHIP_S3TWISTER_K |
8be9b0f1e4b6
experimental savage vidix driver by Reza Jelveh <reza.jelveh at tu-harburg.de>
faust3
parents:
diff
changeset
|
12 #define PCI_CHIP_S3TWISTER_K 0x8d02 |
8be9b0f1e4b6
experimental savage vidix driver by Reza Jelveh <reza.jelveh at tu-harburg.de>
faust3
parents:
diff
changeset
|
13 #endif |
8be9b0f1e4b6
experimental savage vidix driver by Reza Jelveh <reza.jelveh at tu-harburg.de>
faust3
parents:
diff
changeset
|
14 #ifndef PCI_CHIP_SUPSAV_MX128 |
8be9b0f1e4b6
experimental savage vidix driver by Reza Jelveh <reza.jelveh at tu-harburg.de>
faust3
parents:
diff
changeset
|
15 #define PCI_CHIP_SUPSAV_MX128 0x8c22 |
8be9b0f1e4b6
experimental savage vidix driver by Reza Jelveh <reza.jelveh at tu-harburg.de>
faust3
parents:
diff
changeset
|
16 #define PCI_CHIP_SUPSAV_MX64 0x8c24 |
8be9b0f1e4b6
experimental savage vidix driver by Reza Jelveh <reza.jelveh at tu-harburg.de>
faust3
parents:
diff
changeset
|
17 #define PCI_CHIP_SUPSAV_MX64C 0x8c26 |
8be9b0f1e4b6
experimental savage vidix driver by Reza Jelveh <reza.jelveh at tu-harburg.de>
faust3
parents:
diff
changeset
|
18 #define PCI_CHIP_SUPSAV_IX128SDR 0x8c2a |
8be9b0f1e4b6
experimental savage vidix driver by Reza Jelveh <reza.jelveh at tu-harburg.de>
faust3
parents:
diff
changeset
|
19 #define PCI_CHIP_SUPSAV_IX128DDR 0x8c2b |
8be9b0f1e4b6
experimental savage vidix driver by Reza Jelveh <reza.jelveh at tu-harburg.de>
faust3
parents:
diff
changeset
|
20 #define PCI_CHIP_SUPSAV_IX64SDR 0x8c2c |
8be9b0f1e4b6
experimental savage vidix driver by Reza Jelveh <reza.jelveh at tu-harburg.de>
faust3
parents:
diff
changeset
|
21 #define PCI_CHIP_SUPSAV_IX64DDR 0x8c2d |
8be9b0f1e4b6
experimental savage vidix driver by Reza Jelveh <reza.jelveh at tu-harburg.de>
faust3
parents:
diff
changeset
|
22 #define PCI_CHIP_SUPSAV_IXCSDR 0x8c2e |
8be9b0f1e4b6
experimental savage vidix driver by Reza Jelveh <reza.jelveh at tu-harburg.de>
faust3
parents:
diff
changeset
|
23 #define PCI_CHIP_SUPSAV_IXCDDR 0x8c2f |
8be9b0f1e4b6
experimental savage vidix driver by Reza Jelveh <reza.jelveh at tu-harburg.de>
faust3
parents:
diff
changeset
|
24 #endif |
8be9b0f1e4b6
experimental savage vidix driver by Reza Jelveh <reza.jelveh at tu-harburg.de>
faust3
parents:
diff
changeset
|
25 #ifndef PCI_CHIP_PROSAVAGE_DDR |
8be9b0f1e4b6
experimental savage vidix driver by Reza Jelveh <reza.jelveh at tu-harburg.de>
faust3
parents:
diff
changeset
|
26 #define PCI_CHIP_PROSAVAGE_DDR 0x8d03 |
8be9b0f1e4b6
experimental savage vidix driver by Reza Jelveh <reza.jelveh at tu-harburg.de>
faust3
parents:
diff
changeset
|
27 #define PCI_CHIP_PROSAVAGE_DDRK 0x8d04 |
8be9b0f1e4b6
experimental savage vidix driver by Reza Jelveh <reza.jelveh at tu-harburg.de>
faust3
parents:
diff
changeset
|
28 #endif |
8be9b0f1e4b6
experimental savage vidix driver by Reza Jelveh <reza.jelveh at tu-harburg.de>
faust3
parents:
diff
changeset
|
29 |
8be9b0f1e4b6
experimental savage vidix driver by Reza Jelveh <reza.jelveh at tu-harburg.de>
faust3
parents:
diff
changeset
|
30 #define S3_SAVAGE3D_SERIES(chip) ((chip>=S3_SAVAGE3D) && (chip<=S3_SAVAGE_MX)) |
8be9b0f1e4b6
experimental savage vidix driver by Reza Jelveh <reza.jelveh at tu-harburg.de>
faust3
parents:
diff
changeset
|
31 |
8be9b0f1e4b6
experimental savage vidix driver by Reza Jelveh <reza.jelveh at tu-harburg.de>
faust3
parents:
diff
changeset
|
32 #define S3_SAVAGE4_SERIES(chip) ((chip==S3_SAVAGE4) || (chip==S3_PROSAVAGE)) |
8be9b0f1e4b6
experimental savage vidix driver by Reza Jelveh <reza.jelveh at tu-harburg.de>
faust3
parents:
diff
changeset
|
33 |
8be9b0f1e4b6
experimental savage vidix driver by Reza Jelveh <reza.jelveh at tu-harburg.de>
faust3
parents:
diff
changeset
|
34 #define S3_SAVAGE_MOBILE_SERIES(chip) ((chip==S3_SAVAGE_MX) || (chip==S3_SUPERSAVAGE)) |
8be9b0f1e4b6
experimental savage vidix driver by Reza Jelveh <reza.jelveh at tu-harburg.de>
faust3
parents:
diff
changeset
|
35 |
8be9b0f1e4b6
experimental savage vidix driver by Reza Jelveh <reza.jelveh at tu-harburg.de>
faust3
parents:
diff
changeset
|
36 #define S3_SAVAGE_SERIES(chip) ((chip>=S3_SAVAGE3D) && (chip<=S3_SAVAGE2000)) |
8be9b0f1e4b6
experimental savage vidix driver by Reza Jelveh <reza.jelveh at tu-harburg.de>
faust3
parents:
diff
changeset
|
37 |
8be9b0f1e4b6
experimental savage vidix driver by Reza Jelveh <reza.jelveh at tu-harburg.de>
faust3
parents:
diff
changeset
|
38 |
8be9b0f1e4b6
experimental savage vidix driver by Reza Jelveh <reza.jelveh at tu-harburg.de>
faust3
parents:
diff
changeset
|
39 /* Chip tags. These are used to group the adapters into |
8be9b0f1e4b6
experimental savage vidix driver by Reza Jelveh <reza.jelveh at tu-harburg.de>
faust3
parents:
diff
changeset
|
40 * related families. |
8be9b0f1e4b6
experimental savage vidix driver by Reza Jelveh <reza.jelveh at tu-harburg.de>
faust3
parents:
diff
changeset
|
41 */ |
8be9b0f1e4b6
experimental savage vidix driver by Reza Jelveh <reza.jelveh at tu-harburg.de>
faust3
parents:
diff
changeset
|
42 |
8be9b0f1e4b6
experimental savage vidix driver by Reza Jelveh <reza.jelveh at tu-harburg.de>
faust3
parents:
diff
changeset
|
43 |
8be9b0f1e4b6
experimental savage vidix driver by Reza Jelveh <reza.jelveh at tu-harburg.de>
faust3
parents:
diff
changeset
|
44 enum S3CHIPTAGS { |
8be9b0f1e4b6
experimental savage vidix driver by Reza Jelveh <reza.jelveh at tu-harburg.de>
faust3
parents:
diff
changeset
|
45 S3_UNKNOWN = 0, |
8be9b0f1e4b6
experimental savage vidix driver by Reza Jelveh <reza.jelveh at tu-harburg.de>
faust3
parents:
diff
changeset
|
46 S3_SAVAGE3D, |
8be9b0f1e4b6
experimental savage vidix driver by Reza Jelveh <reza.jelveh at tu-harburg.de>
faust3
parents:
diff
changeset
|
47 S3_SAVAGE_MX, |
8be9b0f1e4b6
experimental savage vidix driver by Reza Jelveh <reza.jelveh at tu-harburg.de>
faust3
parents:
diff
changeset
|
48 S3_SAVAGE4, |
8be9b0f1e4b6
experimental savage vidix driver by Reza Jelveh <reza.jelveh at tu-harburg.de>
faust3
parents:
diff
changeset
|
49 S3_PROSAVAGE, |
8be9b0f1e4b6
experimental savage vidix driver by Reza Jelveh <reza.jelveh at tu-harburg.de>
faust3
parents:
diff
changeset
|
50 S3_SUPERSAVAGE, |
8be9b0f1e4b6
experimental savage vidix driver by Reza Jelveh <reza.jelveh at tu-harburg.de>
faust3
parents:
diff
changeset
|
51 S3_SAVAGE2000, |
8be9b0f1e4b6
experimental savage vidix driver by Reza Jelveh <reza.jelveh at tu-harburg.de>
faust3
parents:
diff
changeset
|
52 S3_LAST |
8be9b0f1e4b6
experimental savage vidix driver by Reza Jelveh <reza.jelveh at tu-harburg.de>
faust3
parents:
diff
changeset
|
53 }; |
8be9b0f1e4b6
experimental savage vidix driver by Reza Jelveh <reza.jelveh at tu-harburg.de>
faust3
parents:
diff
changeset
|
54 |
8be9b0f1e4b6
experimental savage vidix driver by Reza Jelveh <reza.jelveh at tu-harburg.de>
faust3
parents:
diff
changeset
|
55 typedef struct { |
8be9b0f1e4b6
experimental savage vidix driver by Reza Jelveh <reza.jelveh at tu-harburg.de>
faust3
parents:
diff
changeset
|
56 unsigned int mode, refresh; |
8be9b0f1e4b6
experimental savage vidix driver by Reza Jelveh <reza.jelveh at tu-harburg.de>
faust3
parents:
diff
changeset
|
57 unsigned char SR08, SR0E, SR0F; |
8be9b0f1e4b6
experimental savage vidix driver by Reza Jelveh <reza.jelveh at tu-harburg.de>
faust3
parents:
diff
changeset
|
58 unsigned char SR10, SR11, SR12, SR13, SR15, SR18, SR1B, SR29, SR30; |
8be9b0f1e4b6
experimental savage vidix driver by Reza Jelveh <reza.jelveh at tu-harburg.de>
faust3
parents:
diff
changeset
|
59 unsigned char SR54[8]; |
8be9b0f1e4b6
experimental savage vidix driver by Reza Jelveh <reza.jelveh at tu-harburg.de>
faust3
parents:
diff
changeset
|
60 unsigned char Clock; |
8be9b0f1e4b6
experimental savage vidix driver by Reza Jelveh <reza.jelveh at tu-harburg.de>
faust3
parents:
diff
changeset
|
61 unsigned char CR31, CR32, CR33, CR34, CR36, CR3A, CR3B, CR3C; |
8be9b0f1e4b6
experimental savage vidix driver by Reza Jelveh <reza.jelveh at tu-harburg.de>
faust3
parents:
diff
changeset
|
62 unsigned char CR40, CR41, CR42, CR43, CR45; |
8be9b0f1e4b6
experimental savage vidix driver by Reza Jelveh <reza.jelveh at tu-harburg.de>
faust3
parents:
diff
changeset
|
63 unsigned char CR50, CR51, CR53, CR55, CR58, CR5B, CR5D, CR5E; |
8be9b0f1e4b6
experimental savage vidix driver by Reza Jelveh <reza.jelveh at tu-harburg.de>
faust3
parents:
diff
changeset
|
64 unsigned char CR60, CR63, CR65, CR66, CR67, CR68, CR69, CR6D, CR6F; |
8be9b0f1e4b6
experimental savage vidix driver by Reza Jelveh <reza.jelveh at tu-harburg.de>
faust3
parents:
diff
changeset
|
65 unsigned char CR86, CR88; |
8be9b0f1e4b6
experimental savage vidix driver by Reza Jelveh <reza.jelveh at tu-harburg.de>
faust3
parents:
diff
changeset
|
66 unsigned char CR90, CR91, CRB0; |
8be9b0f1e4b6
experimental savage vidix driver by Reza Jelveh <reza.jelveh at tu-harburg.de>
faust3
parents:
diff
changeset
|
67 unsigned int STREAMS[22]; /* yuck, streams regs */ |
8be9b0f1e4b6
experimental savage vidix driver by Reza Jelveh <reza.jelveh at tu-harburg.de>
faust3
parents:
diff
changeset
|
68 unsigned int MMPR0, MMPR1, MMPR2, MMPR3; |
8be9b0f1e4b6
experimental savage vidix driver by Reza Jelveh <reza.jelveh at tu-harburg.de>
faust3
parents:
diff
changeset
|
69 } SavageRegRec, *SavageRegPtr; |
8be9b0f1e4b6
experimental savage vidix driver by Reza Jelveh <reza.jelveh at tu-harburg.de>
faust3
parents:
diff
changeset
|
70 |
8be9b0f1e4b6
experimental savage vidix driver by Reza Jelveh <reza.jelveh at tu-harburg.de>
faust3
parents:
diff
changeset
|
71 |
8be9b0f1e4b6
experimental savage vidix driver by Reza Jelveh <reza.jelveh at tu-harburg.de>
faust3
parents:
diff
changeset
|
72 |
8be9b0f1e4b6
experimental savage vidix driver by Reza Jelveh <reza.jelveh at tu-harburg.de>
faust3
parents:
diff
changeset
|
73 #define BIOS_BSIZE 1024 |
8be9b0f1e4b6
experimental savage vidix driver by Reza Jelveh <reza.jelveh at tu-harburg.de>
faust3
parents:
diff
changeset
|
74 #define BIOS_BASE 0xc0000 |
8be9b0f1e4b6
experimental savage vidix driver by Reza Jelveh <reza.jelveh at tu-harburg.de>
faust3
parents:
diff
changeset
|
75 |
8be9b0f1e4b6
experimental savage vidix driver by Reza Jelveh <reza.jelveh at tu-harburg.de>
faust3
parents:
diff
changeset
|
76 #define SAVAGE_NEWMMIO_REGBASE_S3 0x1000000 /* 16MB */ |
8be9b0f1e4b6
experimental savage vidix driver by Reza Jelveh <reza.jelveh at tu-harburg.de>
faust3
parents:
diff
changeset
|
77 #define SAVAGE_NEWMMIO_REGBASE_S4 0x0000000 |
8be9b0f1e4b6
experimental savage vidix driver by Reza Jelveh <reza.jelveh at tu-harburg.de>
faust3
parents:
diff
changeset
|
78 #define SAVAGE_NEWMMIO_REGSIZE 0x0080000 /* 512kb */ |
8be9b0f1e4b6
experimental savage vidix driver by Reza Jelveh <reza.jelveh at tu-harburg.de>
faust3
parents:
diff
changeset
|
79 #define SAVAGE_NEWMMIO_VGABASE 0x8000 |
8be9b0f1e4b6
experimental savage vidix driver by Reza Jelveh <reza.jelveh at tu-harburg.de>
faust3
parents:
diff
changeset
|
80 |
8be9b0f1e4b6
experimental savage vidix driver by Reza Jelveh <reza.jelveh at tu-harburg.de>
faust3
parents:
diff
changeset
|
81 #define BASE_FREQ 14.31818 |
8be9b0f1e4b6
experimental savage vidix driver by Reza Jelveh <reza.jelveh at tu-harburg.de>
faust3
parents:
diff
changeset
|
82 |
8be9b0f1e4b6
experimental savage vidix driver by Reza Jelveh <reza.jelveh at tu-harburg.de>
faust3
parents:
diff
changeset
|
83 #define FIFO_CONTROL_REG 0x8200 |
8be9b0f1e4b6
experimental savage vidix driver by Reza Jelveh <reza.jelveh at tu-harburg.de>
faust3
parents:
diff
changeset
|
84 #define MIU_CONTROL_REG 0x8204 |
8be9b0f1e4b6
experimental savage vidix driver by Reza Jelveh <reza.jelveh at tu-harburg.de>
faust3
parents:
diff
changeset
|
85 #define STREAMS_TIMEOUT_REG 0x8208 |
8be9b0f1e4b6
experimental savage vidix driver by Reza Jelveh <reza.jelveh at tu-harburg.de>
faust3
parents:
diff
changeset
|
86 #define MISC_TIMEOUT_REG 0x820c |
8be9b0f1e4b6
experimental savage vidix driver by Reza Jelveh <reza.jelveh at tu-harburg.de>
faust3
parents:
diff
changeset
|
87 |
8be9b0f1e4b6
experimental savage vidix driver by Reza Jelveh <reza.jelveh at tu-harburg.de>
faust3
parents:
diff
changeset
|
88 /* Stream Processor 1 */ |
8be9b0f1e4b6
experimental savage vidix driver by Reza Jelveh <reza.jelveh at tu-harburg.de>
faust3
parents:
diff
changeset
|
89 |
8be9b0f1e4b6
experimental savage vidix driver by Reza Jelveh <reza.jelveh at tu-harburg.de>
faust3
parents:
diff
changeset
|
90 /* Primary Stream 1 Frame Buffer Address 0 */ |
8be9b0f1e4b6
experimental savage vidix driver by Reza Jelveh <reza.jelveh at tu-harburg.de>
faust3
parents:
diff
changeset
|
91 #define PRI_STREAM_FBUF_ADDR0 0x81c0 |
8be9b0f1e4b6
experimental savage vidix driver by Reza Jelveh <reza.jelveh at tu-harburg.de>
faust3
parents:
diff
changeset
|
92 /* Primary Stream 1 Frame Buffer Address 0 */ |
8be9b0f1e4b6
experimental savage vidix driver by Reza Jelveh <reza.jelveh at tu-harburg.de>
faust3
parents:
diff
changeset
|
93 #define PRI_STREAM_FBUF_ADDR1 0x81c4 |
8be9b0f1e4b6
experimental savage vidix driver by Reza Jelveh <reza.jelveh at tu-harburg.de>
faust3
parents:
diff
changeset
|
94 /* Primary Stream 1 Stride */ |
8be9b0f1e4b6
experimental savage vidix driver by Reza Jelveh <reza.jelveh at tu-harburg.de>
faust3
parents:
diff
changeset
|
95 #define PRI_STREAM_STRIDE 0x81c8 |
8be9b0f1e4b6
experimental savage vidix driver by Reza Jelveh <reza.jelveh at tu-harburg.de>
faust3
parents:
diff
changeset
|
96 /* Primary Stream 1 Frame Buffer Size */ |
8be9b0f1e4b6
experimental savage vidix driver by Reza Jelveh <reza.jelveh at tu-harburg.de>
faust3
parents:
diff
changeset
|
97 #define PRI_STREAM_BUFFERSIZE 0x8214 |
8be9b0f1e4b6
experimental savage vidix driver by Reza Jelveh <reza.jelveh at tu-harburg.de>
faust3
parents:
diff
changeset
|
98 |
8be9b0f1e4b6
experimental savage vidix driver by Reza Jelveh <reza.jelveh at tu-harburg.de>
faust3
parents:
diff
changeset
|
99 /* Secondary stream 1 Color/Chroma Key Control */ |
8be9b0f1e4b6
experimental savage vidix driver by Reza Jelveh <reza.jelveh at tu-harburg.de>
faust3
parents:
diff
changeset
|
100 #define SEC_STREAM_CKEY_LOW 0x8184 |
8be9b0f1e4b6
experimental savage vidix driver by Reza Jelveh <reza.jelveh at tu-harburg.de>
faust3
parents:
diff
changeset
|
101 /* Secondary stream 1 Chroma Key Upper Bound */ |
8be9b0f1e4b6
experimental savage vidix driver by Reza Jelveh <reza.jelveh at tu-harburg.de>
faust3
parents:
diff
changeset
|
102 #define SEC_STREAM_CKEY_UPPER 0x8194 |
8be9b0f1e4b6
experimental savage vidix driver by Reza Jelveh <reza.jelveh at tu-harburg.de>
faust3
parents:
diff
changeset
|
103 /* Blend Control of Secondary Stream 1 & 2 */ |
8be9b0f1e4b6
experimental savage vidix driver by Reza Jelveh <reza.jelveh at tu-harburg.de>
faust3
parents:
diff
changeset
|
104 #define BLEND_CONTROL 0x8190 |
8be9b0f1e4b6
experimental savage vidix driver by Reza Jelveh <reza.jelveh at tu-harburg.de>
faust3
parents:
diff
changeset
|
105 /* Secondary Stream 1 Color conversion/Adjustment 1 */ |
8be9b0f1e4b6
experimental savage vidix driver by Reza Jelveh <reza.jelveh at tu-harburg.de>
faust3
parents:
diff
changeset
|
106 #define SEC_STREAM_COLOR_CONVERT1 0x8198 |
8be9b0f1e4b6
experimental savage vidix driver by Reza Jelveh <reza.jelveh at tu-harburg.de>
faust3
parents:
diff
changeset
|
107 /* Secondary Stream 1 Color conversion/Adjustment 2 */ |
8be9b0f1e4b6
experimental savage vidix driver by Reza Jelveh <reza.jelveh at tu-harburg.de>
faust3
parents:
diff
changeset
|
108 #define SEC_STREAM_COLOR_CONVERT2 0x819c |
8be9b0f1e4b6
experimental savage vidix driver by Reza Jelveh <reza.jelveh at tu-harburg.de>
faust3
parents:
diff
changeset
|
109 /* Secondary Stream 1 Color conversion/Adjustment 3 */ |
8be9b0f1e4b6
experimental savage vidix driver by Reza Jelveh <reza.jelveh at tu-harburg.de>
faust3
parents:
diff
changeset
|
110 #define SEC_STREAM_COLOR_CONVERT3 0x81e4 |
8be9b0f1e4b6
experimental savage vidix driver by Reza Jelveh <reza.jelveh at tu-harburg.de>
faust3
parents:
diff
changeset
|
111 /* Secondary Stream 1 Horizontal Scaling */ |
8be9b0f1e4b6
experimental savage vidix driver by Reza Jelveh <reza.jelveh at tu-harburg.de>
faust3
parents:
diff
changeset
|
112 #define SEC_STREAM_HSCALING 0x81a0 |
8be9b0f1e4b6
experimental savage vidix driver by Reza Jelveh <reza.jelveh at tu-harburg.de>
faust3
parents:
diff
changeset
|
113 /* Secondary Stream 1 Frame Buffer Size */ |
8be9b0f1e4b6
experimental savage vidix driver by Reza Jelveh <reza.jelveh at tu-harburg.de>
faust3
parents:
diff
changeset
|
114 #define SEC_STREAM_BUFFERSIZE 0x81a8 |
8be9b0f1e4b6
experimental savage vidix driver by Reza Jelveh <reza.jelveh at tu-harburg.de>
faust3
parents:
diff
changeset
|
115 /* Secondary Stream 1 Horizontal Scaling Normalization (2K only) */ |
8be9b0f1e4b6
experimental savage vidix driver by Reza Jelveh <reza.jelveh at tu-harburg.de>
faust3
parents:
diff
changeset
|
116 #define SEC_STREAM_HSCALE_NORMALIZE 0x81ac |
8be9b0f1e4b6
experimental savage vidix driver by Reza Jelveh <reza.jelveh at tu-harburg.de>
faust3
parents:
diff
changeset
|
117 /* Secondary Stream 1 Horizontal Scaling */ |
8be9b0f1e4b6
experimental savage vidix driver by Reza Jelveh <reza.jelveh at tu-harburg.de>
faust3
parents:
diff
changeset
|
118 #define SEC_STREAM_VSCALING 0x81e8 |
8be9b0f1e4b6
experimental savage vidix driver by Reza Jelveh <reza.jelveh at tu-harburg.de>
faust3
parents:
diff
changeset
|
119 /* Secondary Stream 1 Frame Buffer Address 0 */ |
8be9b0f1e4b6
experimental savage vidix driver by Reza Jelveh <reza.jelveh at tu-harburg.de>
faust3
parents:
diff
changeset
|
120 #define SEC_STREAM_FBUF_ADDR0 0x81d0 |
8be9b0f1e4b6
experimental savage vidix driver by Reza Jelveh <reza.jelveh at tu-harburg.de>
faust3
parents:
diff
changeset
|
121 /* Secondary Stream 1 Frame Buffer Address 1 */ |
8be9b0f1e4b6
experimental savage vidix driver by Reza Jelveh <reza.jelveh at tu-harburg.de>
faust3
parents:
diff
changeset
|
122 #define SEC_STREAM_FBUF_ADDR1 0x81d4 |
8be9b0f1e4b6
experimental savage vidix driver by Reza Jelveh <reza.jelveh at tu-harburg.de>
faust3
parents:
diff
changeset
|
123 /* Secondary Stream 1 Frame Buffer Address 2 */ |
8be9b0f1e4b6
experimental savage vidix driver by Reza Jelveh <reza.jelveh at tu-harburg.de>
faust3
parents:
diff
changeset
|
124 #define SEC_STREAM_FBUF_ADDR2 0x81ec |
8be9b0f1e4b6
experimental savage vidix driver by Reza Jelveh <reza.jelveh at tu-harburg.de>
faust3
parents:
diff
changeset
|
125 /* Secondary Stream 1 Stride */ |
8be9b0f1e4b6
experimental savage vidix driver by Reza Jelveh <reza.jelveh at tu-harburg.de>
faust3
parents:
diff
changeset
|
126 #define SEC_STREAM_STRIDE 0x81d8 |
8be9b0f1e4b6
experimental savage vidix driver by Reza Jelveh <reza.jelveh at tu-harburg.de>
faust3
parents:
diff
changeset
|
127 /* Secondary Stream 1 Window Start Coordinates */ |
8be9b0f1e4b6
experimental savage vidix driver by Reza Jelveh <reza.jelveh at tu-harburg.de>
faust3
parents:
diff
changeset
|
128 #define SEC_STREAM_WINDOW_START 0x81f8 |
8be9b0f1e4b6
experimental savage vidix driver by Reza Jelveh <reza.jelveh at tu-harburg.de>
faust3
parents:
diff
changeset
|
129 /* Secondary Stream 1 Window Size */ |
8be9b0f1e4b6
experimental savage vidix driver by Reza Jelveh <reza.jelveh at tu-harburg.de>
faust3
parents:
diff
changeset
|
130 #define SEC_STREAM_WINDOW_SZ 0x81fc |
8be9b0f1e4b6
experimental savage vidix driver by Reza Jelveh <reza.jelveh at tu-harburg.de>
faust3
parents:
diff
changeset
|
131 /* Secondary Streams Tile Offset */ |
8be9b0f1e4b6
experimental savage vidix driver by Reza Jelveh <reza.jelveh at tu-harburg.de>
faust3
parents:
diff
changeset
|
132 #define SEC_STREAM_TILE_OFF 0x821c |
8be9b0f1e4b6
experimental savage vidix driver by Reza Jelveh <reza.jelveh at tu-harburg.de>
faust3
parents:
diff
changeset
|
133 /* Secondary Stream 1 Opaque Overlay Control */ |
8be9b0f1e4b6
experimental savage vidix driver by Reza Jelveh <reza.jelveh at tu-harburg.de>
faust3
parents:
diff
changeset
|
134 #define SEC_STREAM_OPAQUE_OVERLAY 0x81dc |
8be9b0f1e4b6
experimental savage vidix driver by Reza Jelveh <reza.jelveh at tu-harburg.de>
faust3
parents:
diff
changeset
|
135 |
8be9b0f1e4b6
experimental savage vidix driver by Reza Jelveh <reza.jelveh at tu-harburg.de>
faust3
parents:
diff
changeset
|
136 |
8be9b0f1e4b6
experimental savage vidix driver by Reza Jelveh <reza.jelveh at tu-harburg.de>
faust3
parents:
diff
changeset
|
137 /* Stream Processor 2 */ |
8be9b0f1e4b6
experimental savage vidix driver by Reza Jelveh <reza.jelveh at tu-harburg.de>
faust3
parents:
diff
changeset
|
138 |
8be9b0f1e4b6
experimental savage vidix driver by Reza Jelveh <reza.jelveh at tu-harburg.de>
faust3
parents:
diff
changeset
|
139 /* Primary Stream 2 Frame Buffer Address 0 */ |
8be9b0f1e4b6
experimental savage vidix driver by Reza Jelveh <reza.jelveh at tu-harburg.de>
faust3
parents:
diff
changeset
|
140 #define PRI_STREAM2_FBUF_ADDR0 0x81b0 |
8be9b0f1e4b6
experimental savage vidix driver by Reza Jelveh <reza.jelveh at tu-harburg.de>
faust3
parents:
diff
changeset
|
141 /* Primary Stream 2 Frame Buffer Address 1 */ |
8be9b0f1e4b6
experimental savage vidix driver by Reza Jelveh <reza.jelveh at tu-harburg.de>
faust3
parents:
diff
changeset
|
142 #define PRI_STREAM2_FBUF_ADDR1 0x81b4 |
8be9b0f1e4b6
experimental savage vidix driver by Reza Jelveh <reza.jelveh at tu-harburg.de>
faust3
parents:
diff
changeset
|
143 /* Primary Stream 2 Stride */ |
8be9b0f1e4b6
experimental savage vidix driver by Reza Jelveh <reza.jelveh at tu-harburg.de>
faust3
parents:
diff
changeset
|
144 #define PRI_STREAM2_STRIDE 0x81b8 |
8be9b0f1e4b6
experimental savage vidix driver by Reza Jelveh <reza.jelveh at tu-harburg.de>
faust3
parents:
diff
changeset
|
145 /* Primary Stream 2 Frame Buffer Size */ |
8be9b0f1e4b6
experimental savage vidix driver by Reza Jelveh <reza.jelveh at tu-harburg.de>
faust3
parents:
diff
changeset
|
146 #define PRI_STREAM2_BUFFERSIZE 0x8218 |
8be9b0f1e4b6
experimental savage vidix driver by Reza Jelveh <reza.jelveh at tu-harburg.de>
faust3
parents:
diff
changeset
|
147 |
8be9b0f1e4b6
experimental savage vidix driver by Reza Jelveh <reza.jelveh at tu-harburg.de>
faust3
parents:
diff
changeset
|
148 /* Secondary Stream 2 Color/Chroma Key Control */ |
8be9b0f1e4b6
experimental savage vidix driver by Reza Jelveh <reza.jelveh at tu-harburg.de>
faust3
parents:
diff
changeset
|
149 #define SEC_STREAM2_CKEY_LOW 0x8188 |
8be9b0f1e4b6
experimental savage vidix driver by Reza Jelveh <reza.jelveh at tu-harburg.de>
faust3
parents:
diff
changeset
|
150 /* Secondary Stream 2 Chroma Key Upper Bound */ |
8be9b0f1e4b6
experimental savage vidix driver by Reza Jelveh <reza.jelveh at tu-harburg.de>
faust3
parents:
diff
changeset
|
151 #define SEC_STREAM2_CKEY_UPPER 0x818c |
8be9b0f1e4b6
experimental savage vidix driver by Reza Jelveh <reza.jelveh at tu-harburg.de>
faust3
parents:
diff
changeset
|
152 /* Secondary Stream 2 Horizontal Scaling */ |
8be9b0f1e4b6
experimental savage vidix driver by Reza Jelveh <reza.jelveh at tu-harburg.de>
faust3
parents:
diff
changeset
|
153 #define SEC_STREAM2_HSCALING 0x81a4 |
8be9b0f1e4b6
experimental savage vidix driver by Reza Jelveh <reza.jelveh at tu-harburg.de>
faust3
parents:
diff
changeset
|
154 /* Secondary Stream 2 Horizontal Scaling */ |
8be9b0f1e4b6
experimental savage vidix driver by Reza Jelveh <reza.jelveh at tu-harburg.de>
faust3
parents:
diff
changeset
|
155 #define SEC_STREAM2_VSCALING 0x8204 |
8be9b0f1e4b6
experimental savage vidix driver by Reza Jelveh <reza.jelveh at tu-harburg.de>
faust3
parents:
diff
changeset
|
156 /* Secondary Stream 2 Frame Buffer Size */ |
8be9b0f1e4b6
experimental savage vidix driver by Reza Jelveh <reza.jelveh at tu-harburg.de>
faust3
parents:
diff
changeset
|
157 #define SEC_STREAM2_BUFFERSIZE 0x81ac |
8be9b0f1e4b6
experimental savage vidix driver by Reza Jelveh <reza.jelveh at tu-harburg.de>
faust3
parents:
diff
changeset
|
158 /* Secondary Stream 2 Frame Buffer Address 0 */ |
8be9b0f1e4b6
experimental savage vidix driver by Reza Jelveh <reza.jelveh at tu-harburg.de>
faust3
parents:
diff
changeset
|
159 #define SEC_STREAM2_FBUF_ADDR0 0x81bc |
8be9b0f1e4b6
experimental savage vidix driver by Reza Jelveh <reza.jelveh at tu-harburg.de>
faust3
parents:
diff
changeset
|
160 /* Secondary Stream 2 Frame Buffer Address 1 */ |
8be9b0f1e4b6
experimental savage vidix driver by Reza Jelveh <reza.jelveh at tu-harburg.de>
faust3
parents:
diff
changeset
|
161 #define SEC_STREAM2_FBUF_ADDR1 0x81e0 |
8be9b0f1e4b6
experimental savage vidix driver by Reza Jelveh <reza.jelveh at tu-harburg.de>
faust3
parents:
diff
changeset
|
162 /* Secondary Stream 2 Frame Buffer Address 2 */ |
8be9b0f1e4b6
experimental savage vidix driver by Reza Jelveh <reza.jelveh at tu-harburg.de>
faust3
parents:
diff
changeset
|
163 #define SEC_STREAM2_FBUF_ADDR2 0x8208 |
8be9b0f1e4b6
experimental savage vidix driver by Reza Jelveh <reza.jelveh at tu-harburg.de>
faust3
parents:
diff
changeset
|
164 /* Multiple Buffer/LPB and Secondary Stream 2 Stride */ |
8be9b0f1e4b6
experimental savage vidix driver by Reza Jelveh <reza.jelveh at tu-harburg.de>
faust3
parents:
diff
changeset
|
165 #define SEC_STREAM2_STRIDE_LPB 0x81cc |
8be9b0f1e4b6
experimental savage vidix driver by Reza Jelveh <reza.jelveh at tu-harburg.de>
faust3
parents:
diff
changeset
|
166 /* Secondary Stream 2 Color conversion/Adjustment 1 */ |
8be9b0f1e4b6
experimental savage vidix driver by Reza Jelveh <reza.jelveh at tu-harburg.de>
faust3
parents:
diff
changeset
|
167 #define SEC_STREAM2_COLOR_CONVERT1 0x81f0 |
8be9b0f1e4b6
experimental savage vidix driver by Reza Jelveh <reza.jelveh at tu-harburg.de>
faust3
parents:
diff
changeset
|
168 /* Secondary Stream 2 Color conversion/Adjustment 2 */ |
8be9b0f1e4b6
experimental savage vidix driver by Reza Jelveh <reza.jelveh at tu-harburg.de>
faust3
parents:
diff
changeset
|
169 #define SEC_STREAM2_COLOR_CONVERT2 0x81f4 |
8be9b0f1e4b6
experimental savage vidix driver by Reza Jelveh <reza.jelveh at tu-harburg.de>
faust3
parents:
diff
changeset
|
170 /* Secondary Stream 2 Color conversion/Adjustment 3 */ |
8be9b0f1e4b6
experimental savage vidix driver by Reza Jelveh <reza.jelveh at tu-harburg.de>
faust3
parents:
diff
changeset
|
171 #define SEC_STREAM2_COLOR_CONVERT3 0x8200 |
8be9b0f1e4b6
experimental savage vidix driver by Reza Jelveh <reza.jelveh at tu-harburg.de>
faust3
parents:
diff
changeset
|
172 /* Secondary Stream 2 Window Start Coordinates */ |
8be9b0f1e4b6
experimental savage vidix driver by Reza Jelveh <reza.jelveh at tu-harburg.de>
faust3
parents:
diff
changeset
|
173 #define SEC_STREAM2_WINDOW_START 0x820c |
8be9b0f1e4b6
experimental savage vidix driver by Reza Jelveh <reza.jelveh at tu-harburg.de>
faust3
parents:
diff
changeset
|
174 /* Secondary Stream 2 Window Size */ |
8be9b0f1e4b6
experimental savage vidix driver by Reza Jelveh <reza.jelveh at tu-harburg.de>
faust3
parents:
diff
changeset
|
175 #define SEC_STREAM2_WINDOW_SZ 0x8210 |
8be9b0f1e4b6
experimental savage vidix driver by Reza Jelveh <reza.jelveh at tu-harburg.de>
faust3
parents:
diff
changeset
|
176 /* Secondary Stream 2 Opaque Overlay Control */ |
8be9b0f1e4b6
experimental savage vidix driver by Reza Jelveh <reza.jelveh at tu-harburg.de>
faust3
parents:
diff
changeset
|
177 #define SEC_STREAM2_OPAQUE_OVERLAY 0x8180 |
8be9b0f1e4b6
experimental savage vidix driver by Reza Jelveh <reza.jelveh at tu-harburg.de>
faust3
parents:
diff
changeset
|
178 |
8be9b0f1e4b6
experimental savage vidix driver by Reza Jelveh <reza.jelveh at tu-harburg.de>
faust3
parents:
diff
changeset
|
179 |
8be9b0f1e4b6
experimental savage vidix driver by Reza Jelveh <reza.jelveh at tu-harburg.de>
faust3
parents:
diff
changeset
|
180 /* savage 2000 */ |
8be9b0f1e4b6
experimental savage vidix driver by Reza Jelveh <reza.jelveh at tu-harburg.de>
faust3
parents:
diff
changeset
|
181 #define SEC_STREAM_COLOR_CONVERT0_2000 0x8198 |
8be9b0f1e4b6
experimental savage vidix driver by Reza Jelveh <reza.jelveh at tu-harburg.de>
faust3
parents:
diff
changeset
|
182 #define SEC_STREAM_COLOR_CONVERT1_2000 0x819c |
8be9b0f1e4b6
experimental savage vidix driver by Reza Jelveh <reza.jelveh at tu-harburg.de>
faust3
parents:
diff
changeset
|
183 #define SEC_STREAM_COLOR_CONVERT2_2000 0x81e0 |
8be9b0f1e4b6
experimental savage vidix driver by Reza Jelveh <reza.jelveh at tu-harburg.de>
faust3
parents:
diff
changeset
|
184 #define SEC_STREAM_COLOR_CONVERT3_2000 0x81e4 |
8be9b0f1e4b6
experimental savage vidix driver by Reza Jelveh <reza.jelveh at tu-harburg.de>
faust3
parents:
diff
changeset
|
185 |
8be9b0f1e4b6
experimental savage vidix driver by Reza Jelveh <reza.jelveh at tu-harburg.de>
faust3
parents:
diff
changeset
|
186 #define SUBSYS_STAT_REG 0x8504 |
8be9b0f1e4b6
experimental savage vidix driver by Reza Jelveh <reza.jelveh at tu-harburg.de>
faust3
parents:
diff
changeset
|
187 |
8be9b0f1e4b6
experimental savage vidix driver by Reza Jelveh <reza.jelveh at tu-harburg.de>
faust3
parents:
diff
changeset
|
188 #define SRC_BASE 0xa4d4 |
8be9b0f1e4b6
experimental savage vidix driver by Reza Jelveh <reza.jelveh at tu-harburg.de>
faust3
parents:
diff
changeset
|
189 #define DEST_BASE 0xa4d8 |
8be9b0f1e4b6
experimental savage vidix driver by Reza Jelveh <reza.jelveh at tu-harburg.de>
faust3
parents:
diff
changeset
|
190 #define CLIP_L_R 0xa4dc |
8be9b0f1e4b6
experimental savage vidix driver by Reza Jelveh <reza.jelveh at tu-harburg.de>
faust3
parents:
diff
changeset
|
191 #define CLIP_T_B 0xa4e0 |
8be9b0f1e4b6
experimental savage vidix driver by Reza Jelveh <reza.jelveh at tu-harburg.de>
faust3
parents:
diff
changeset
|
192 #define DEST_SRC_STR 0xa4e4 |
8be9b0f1e4b6
experimental savage vidix driver by Reza Jelveh <reza.jelveh at tu-harburg.de>
faust3
parents:
diff
changeset
|
193 #define MONO_PAT_0 0xa4e8 |
8be9b0f1e4b6
experimental savage vidix driver by Reza Jelveh <reza.jelveh at tu-harburg.de>
faust3
parents:
diff
changeset
|
194 #define MONO_PAT_1 0xa4ec |
8be9b0f1e4b6
experimental savage vidix driver by Reza Jelveh <reza.jelveh at tu-harburg.de>
faust3
parents:
diff
changeset
|
195 |
8be9b0f1e4b6
experimental savage vidix driver by Reza Jelveh <reza.jelveh at tu-harburg.de>
faust3
parents:
diff
changeset
|
196 /* Constants for CR69. */ |
8be9b0f1e4b6
experimental savage vidix driver by Reza Jelveh <reza.jelveh at tu-harburg.de>
faust3
parents:
diff
changeset
|
197 |
8be9b0f1e4b6
experimental savage vidix driver by Reza Jelveh <reza.jelveh at tu-harburg.de>
faust3
parents:
diff
changeset
|
198 #define CRT_ACTIVE 0x01 |
8be9b0f1e4b6
experimental savage vidix driver by Reza Jelveh <reza.jelveh at tu-harburg.de>
faust3
parents:
diff
changeset
|
199 #define LCD_ACTIVE 0x02 |
8be9b0f1e4b6
experimental savage vidix driver by Reza Jelveh <reza.jelveh at tu-harburg.de>
faust3
parents:
diff
changeset
|
200 #define TV_ACTIVE 0x04 |
8be9b0f1e4b6
experimental savage vidix driver by Reza Jelveh <reza.jelveh at tu-harburg.de>
faust3
parents:
diff
changeset
|
201 #define CRT_ATTACHED 0x10 |
8be9b0f1e4b6
experimental savage vidix driver by Reza Jelveh <reza.jelveh at tu-harburg.de>
faust3
parents:
diff
changeset
|
202 #define LCD_ATTACHED 0x20 |
8be9b0f1e4b6
experimental savage vidix driver by Reza Jelveh <reza.jelveh at tu-harburg.de>
faust3
parents:
diff
changeset
|
203 #define TV_ATTACHED 0x40 |
8be9b0f1e4b6
experimental savage vidix driver by Reza Jelveh <reza.jelveh at tu-harburg.de>
faust3
parents:
diff
changeset
|
204 |
8be9b0f1e4b6
experimental savage vidix driver by Reza Jelveh <reza.jelveh at tu-harburg.de>
faust3
parents:
diff
changeset
|
205 |
8be9b0f1e4b6
experimental savage vidix driver by Reza Jelveh <reza.jelveh at tu-harburg.de>
faust3
parents:
diff
changeset
|
206 /* |
8be9b0f1e4b6
experimental savage vidix driver by Reza Jelveh <reza.jelveh at tu-harburg.de>
faust3
parents:
diff
changeset
|
207 * reads from SUBSYS_STAT |
8be9b0f1e4b6
experimental savage vidix driver by Reza Jelveh <reza.jelveh at tu-harburg.de>
faust3
parents:
diff
changeset
|
208 */ |
8be9b0f1e4b6
experimental savage vidix driver by Reza Jelveh <reza.jelveh at tu-harburg.de>
faust3
parents:
diff
changeset
|
209 #define STATUS_WORD0 (INREG(0x48C00)) |
8be9b0f1e4b6
experimental savage vidix driver by Reza Jelveh <reza.jelveh at tu-harburg.de>
faust3
parents:
diff
changeset
|
210 #define ALT_STATUS_WORD0 (INREG(0x48C60)) |
8be9b0f1e4b6
experimental savage vidix driver by Reza Jelveh <reza.jelveh at tu-harburg.de>
faust3
parents:
diff
changeset
|
211 #define MAXLOOP 0xffffff |
8be9b0f1e4b6
experimental savage vidix driver by Reza Jelveh <reza.jelveh at tu-harburg.de>
faust3
parents:
diff
changeset
|
212 #define IN_SUBSYS_STAT() (INREG(SUBSYS_STAT_REG)) |
8be9b0f1e4b6
experimental savage vidix driver by Reza Jelveh <reza.jelveh at tu-harburg.de>
faust3
parents:
diff
changeset
|
213 |
8be9b0f1e4b6
experimental savage vidix driver by Reza Jelveh <reza.jelveh at tu-harburg.de>
faust3
parents:
diff
changeset
|
214 #define MAXFIFO 0x7f00 |
8be9b0f1e4b6
experimental savage vidix driver by Reza Jelveh <reza.jelveh at tu-harburg.de>
faust3
parents:
diff
changeset
|
215 |
8be9b0f1e4b6
experimental savage vidix driver by Reza Jelveh <reza.jelveh at tu-harburg.de>
faust3
parents:
diff
changeset
|
216 /* |
8be9b0f1e4b6
experimental savage vidix driver by Reza Jelveh <reza.jelveh at tu-harburg.de>
faust3
parents:
diff
changeset
|
217 * NOTE: don't remove 'VGAIN8(vgaCRIndex);'. |
8be9b0f1e4b6
experimental savage vidix driver by Reza Jelveh <reza.jelveh at tu-harburg.de>
faust3
parents:
diff
changeset
|
218 * If not present it will cause lockups on Savage4. |
8be9b0f1e4b6
experimental savage vidix driver by Reza Jelveh <reza.jelveh at tu-harburg.de>
faust3
parents:
diff
changeset
|
219 * Ask S3, why. |
8be9b0f1e4b6
experimental savage vidix driver by Reza Jelveh <reza.jelveh at tu-harburg.de>
faust3
parents:
diff
changeset
|
220 */ |
8be9b0f1e4b6
experimental savage vidix driver by Reza Jelveh <reza.jelveh at tu-harburg.de>
faust3
parents:
diff
changeset
|
221 /*#define VerticalRetraceWait() \ |
8be9b0f1e4b6
experimental savage vidix driver by Reza Jelveh <reza.jelveh at tu-harburg.de>
faust3
parents:
diff
changeset
|
222 { \ |
8be9b0f1e4b6
experimental savage vidix driver by Reza Jelveh <reza.jelveh at tu-harburg.de>
faust3
parents:
diff
changeset
|
223 VGAIN8(0x3d0+4); \ |
8be9b0f1e4b6
experimental savage vidix driver by Reza Jelveh <reza.jelveh at tu-harburg.de>
faust3
parents:
diff
changeset
|
224 VGAOUT8(0x3d0+4, 0x17); \ |
8be9b0f1e4b6
experimental savage vidix driver by Reza Jelveh <reza.jelveh at tu-harburg.de>
faust3
parents:
diff
changeset
|
225 if (VGAIN8(0x3d0+5) & 0x80) { \ |
8be9b0f1e4b6
experimental savage vidix driver by Reza Jelveh <reza.jelveh at tu-harburg.de>
faust3
parents:
diff
changeset
|
226 while ((VGAIN8(0x3d0 + 0x0a) & 0x08) == 0x08) ; \ |
8be9b0f1e4b6
experimental savage vidix driver by Reza Jelveh <reza.jelveh at tu-harburg.de>
faust3
parents:
diff
changeset
|
227 while ((VGAIN8(0x3d0 + 0x0a) & 0x08) == 0x00) ; \ |
8be9b0f1e4b6
experimental savage vidix driver by Reza Jelveh <reza.jelveh at tu-harburg.de>
faust3
parents:
diff
changeset
|
228 } \ |
8be9b0f1e4b6
experimental savage vidix driver by Reza Jelveh <reza.jelveh at tu-harburg.de>
faust3
parents:
diff
changeset
|
229 } |
8be9b0f1e4b6
experimental savage vidix driver by Reza Jelveh <reza.jelveh at tu-harburg.de>
faust3
parents:
diff
changeset
|
230 */ |
8be9b0f1e4b6
experimental savage vidix driver by Reza Jelveh <reza.jelveh at tu-harburg.de>
faust3
parents:
diff
changeset
|
231 |
8be9b0f1e4b6
experimental savage vidix driver by Reza Jelveh <reza.jelveh at tu-harburg.de>
faust3
parents:
diff
changeset
|
232 #define VerticalRetraceWait() \ |
8be9b0f1e4b6
experimental savage vidix driver by Reza Jelveh <reza.jelveh at tu-harburg.de>
faust3
parents:
diff
changeset
|
233 do { \ |
8be9b0f1e4b6
experimental savage vidix driver by Reza Jelveh <reza.jelveh at tu-harburg.de>
faust3
parents:
diff
changeset
|
234 VGAIN8(0x3d4); \ |
8be9b0f1e4b6
experimental savage vidix driver by Reza Jelveh <reza.jelveh at tu-harburg.de>
faust3
parents:
diff
changeset
|
235 VGAOUT8(0x3d4, 0x17); \ |
8be9b0f1e4b6
experimental savage vidix driver by Reza Jelveh <reza.jelveh at tu-harburg.de>
faust3
parents:
diff
changeset
|
236 if (VGAIN8(0x3d5) & 0x80) { \ |
8be9b0f1e4b6
experimental savage vidix driver by Reza Jelveh <reza.jelveh at tu-harburg.de>
faust3
parents:
diff
changeset
|
237 int i = 0x10000; \ |
8be9b0f1e4b6
experimental savage vidix driver by Reza Jelveh <reza.jelveh at tu-harburg.de>
faust3
parents:
diff
changeset
|
238 while ((VGAIN8(0x3da) & 0x08) == 0x08 && i--) ; \ |
8be9b0f1e4b6
experimental savage vidix driver by Reza Jelveh <reza.jelveh at tu-harburg.de>
faust3
parents:
diff
changeset
|
239 i = 0x10000; \ |
8be9b0f1e4b6
experimental savage vidix driver by Reza Jelveh <reza.jelveh at tu-harburg.de>
faust3
parents:
diff
changeset
|
240 while ((VGAIN8(0x3da) & 0x08) == 0x00 && i--) ; \ |
8be9b0f1e4b6
experimental savage vidix driver by Reza Jelveh <reza.jelveh at tu-harburg.de>
faust3
parents:
diff
changeset
|
241 } \ |
8be9b0f1e4b6
experimental savage vidix driver by Reza Jelveh <reza.jelveh at tu-harburg.de>
faust3
parents:
diff
changeset
|
242 } while (0) |
8be9b0f1e4b6
experimental savage vidix driver by Reza Jelveh <reza.jelveh at tu-harburg.de>
faust3
parents:
diff
changeset
|
243 |
8be9b0f1e4b6
experimental savage vidix driver by Reza Jelveh <reza.jelveh at tu-harburg.de>
faust3
parents:
diff
changeset
|
244 |
8be9b0f1e4b6
experimental savage vidix driver by Reza Jelveh <reza.jelveh at tu-harburg.de>
faust3
parents:
diff
changeset
|
245 #define I2C_REG 0xa0 |
8be9b0f1e4b6
experimental savage vidix driver by Reza Jelveh <reza.jelveh at tu-harburg.de>
faust3
parents:
diff
changeset
|
246 #define InI2CREG(a) \ |
8be9b0f1e4b6
experimental savage vidix driver by Reza Jelveh <reza.jelveh at tu-harburg.de>
faust3
parents:
diff
changeset
|
247 { \ |
8be9b0f1e4b6
experimental savage vidix driver by Reza Jelveh <reza.jelveh at tu-harburg.de>
faust3
parents:
diff
changeset
|
248 VGAOUT8(0x3d0 + 4, I2C_REG); \ |
8be9b0f1e4b6
experimental savage vidix driver by Reza Jelveh <reza.jelveh at tu-harburg.de>
faust3
parents:
diff
changeset
|
249 a = VGAIN8(0x3d0 + 5); \ |
8be9b0f1e4b6
experimental savage vidix driver by Reza Jelveh <reza.jelveh at tu-harburg.de>
faust3
parents:
diff
changeset
|
250 } |
8be9b0f1e4b6
experimental savage vidix driver by Reza Jelveh <reza.jelveh at tu-harburg.de>
faust3
parents:
diff
changeset
|
251 |
8be9b0f1e4b6
experimental savage vidix driver by Reza Jelveh <reza.jelveh at tu-harburg.de>
faust3
parents:
diff
changeset
|
252 #define OutI2CREG(a) \ |
8be9b0f1e4b6
experimental savage vidix driver by Reza Jelveh <reza.jelveh at tu-harburg.de>
faust3
parents:
diff
changeset
|
253 { \ |
8be9b0f1e4b6
experimental savage vidix driver by Reza Jelveh <reza.jelveh at tu-harburg.de>
faust3
parents:
diff
changeset
|
254 VGAOUT8(0x3d0 + 4, I2C_REG); \ |
8be9b0f1e4b6
experimental savage vidix driver by Reza Jelveh <reza.jelveh at tu-harburg.de>
faust3
parents:
diff
changeset
|
255 VGAOUT8(0x3d0 + 5, a); \ |
8be9b0f1e4b6
experimental savage vidix driver by Reza Jelveh <reza.jelveh at tu-harburg.de>
faust3
parents:
diff
changeset
|
256 } |
8be9b0f1e4b6
experimental savage vidix driver by Reza Jelveh <reza.jelveh at tu-harburg.de>
faust3
parents:
diff
changeset
|
257 |
8be9b0f1e4b6
experimental savage vidix driver by Reza Jelveh <reza.jelveh at tu-harburg.de>
faust3
parents:
diff
changeset
|
258 #define HZEXP_COMP_1 0x54 |
8be9b0f1e4b6
experimental savage vidix driver by Reza Jelveh <reza.jelveh at tu-harburg.de>
faust3
parents:
diff
changeset
|
259 #define HZEXP_BORDER 0x58 |
8be9b0f1e4b6
experimental savage vidix driver by Reza Jelveh <reza.jelveh at tu-harburg.de>
faust3
parents:
diff
changeset
|
260 #define HZEXP_FACTOR_IGA1 0x59 |
8be9b0f1e4b6
experimental savage vidix driver by Reza Jelveh <reza.jelveh at tu-harburg.de>
faust3
parents:
diff
changeset
|
261 |
8be9b0f1e4b6
experimental savage vidix driver by Reza Jelveh <reza.jelveh at tu-harburg.de>
faust3
parents:
diff
changeset
|
262 #define VTEXP_COMP_1 0x56 |
8be9b0f1e4b6
experimental savage vidix driver by Reza Jelveh <reza.jelveh at tu-harburg.de>
faust3
parents:
diff
changeset
|
263 #define VTEXP_BORDER 0x5a |
8be9b0f1e4b6
experimental savage vidix driver by Reza Jelveh <reza.jelveh at tu-harburg.de>
faust3
parents:
diff
changeset
|
264 #define VTEXP_FACTOR_IGA1 0x5b |
8be9b0f1e4b6
experimental savage vidix driver by Reza Jelveh <reza.jelveh at tu-harburg.de>
faust3
parents:
diff
changeset
|
265 |
8be9b0f1e4b6
experimental savage vidix driver by Reza Jelveh <reza.jelveh at tu-harburg.de>
faust3
parents:
diff
changeset
|
266 #define EC1_CENTER_ON 0x10 |
8be9b0f1e4b6
experimental savage vidix driver by Reza Jelveh <reza.jelveh at tu-harburg.de>
faust3
parents:
diff
changeset
|
267 #define EC1_EXPAND_ON 0x0c |
8be9b0f1e4b6
experimental savage vidix driver by Reza Jelveh <reza.jelveh at tu-harburg.de>
faust3
parents:
diff
changeset
|
268 |
8be9b0f1e4b6
experimental savage vidix driver by Reza Jelveh <reza.jelveh at tu-harburg.de>
faust3
parents:
diff
changeset
|
269 #define MODE_24 24 |
8be9b0f1e4b6
experimental savage vidix driver by Reza Jelveh <reza.jelveh at tu-harburg.de>
faust3
parents:
diff
changeset
|
270 |
8be9b0f1e4b6
experimental savage vidix driver by Reza Jelveh <reza.jelveh at tu-harburg.de>
faust3
parents:
diff
changeset
|
271 #if (MODE_24 == 32) |
8be9b0f1e4b6
experimental savage vidix driver by Reza Jelveh <reza.jelveh at tu-harburg.de>
faust3
parents:
diff
changeset
|
272 # define BYTES_PP24 4 |
8be9b0f1e4b6
experimental savage vidix driver by Reza Jelveh <reza.jelveh at tu-harburg.de>
faust3
parents:
diff
changeset
|
273 #else |
8be9b0f1e4b6
experimental savage vidix driver by Reza Jelveh <reza.jelveh at tu-harburg.de>
faust3
parents:
diff
changeset
|
274 # define BYTES_PP24 3 |
8be9b0f1e4b6
experimental savage vidix driver by Reza Jelveh <reza.jelveh at tu-harburg.de>
faust3
parents:
diff
changeset
|
275 #endif |
8be9b0f1e4b6
experimental savage vidix driver by Reza Jelveh <reza.jelveh at tu-harburg.de>
faust3
parents:
diff
changeset
|
276 |
8be9b0f1e4b6
experimental savage vidix driver by Reza Jelveh <reza.jelveh at tu-harburg.de>
faust3
parents:
diff
changeset
|
277 #define OVERLAY_DEPTH 16 |
8be9b0f1e4b6
experimental savage vidix driver by Reza Jelveh <reza.jelveh at tu-harburg.de>
faust3
parents:
diff
changeset
|
278 |
8be9b0f1e4b6
experimental savage vidix driver by Reza Jelveh <reza.jelveh at tu-harburg.de>
faust3
parents:
diff
changeset
|
279 #define STREAMS_MODE32 0x7 |
8be9b0f1e4b6
experimental savage vidix driver by Reza Jelveh <reza.jelveh at tu-harburg.de>
faust3
parents:
diff
changeset
|
280 #define STREAMS_MODE24 0x6 |
8be9b0f1e4b6
experimental savage vidix driver by Reza Jelveh <reza.jelveh at tu-harburg.de>
faust3
parents:
diff
changeset
|
281 #define STREAMS_MODE16 0x5 /* @@@ */ |
8be9b0f1e4b6
experimental savage vidix driver by Reza Jelveh <reza.jelveh at tu-harburg.de>
faust3
parents:
diff
changeset
|
282 |
8be9b0f1e4b6
experimental savage vidix driver by Reza Jelveh <reza.jelveh at tu-harburg.de>
faust3
parents:
diff
changeset
|
283 |
8be9b0f1e4b6
experimental savage vidix driver by Reza Jelveh <reza.jelveh at tu-harburg.de>
faust3
parents:
diff
changeset
|
284 #define DEPTH_BPP(depth) (depth == 24 ? (BYTES_PP24 << 3) : (depth + 7) & ~0x7) |
8be9b0f1e4b6
experimental savage vidix driver by Reza Jelveh <reza.jelveh at tu-harburg.de>
faust3
parents:
diff
changeset
|
285 #define DEPTH_2ND(depth) (depth > 8 ? depth\ |
8be9b0f1e4b6
experimental savage vidix driver by Reza Jelveh <reza.jelveh at tu-harburg.de>
faust3
parents:
diff
changeset
|
286 : OVERLAY_DEPTH) |
8be9b0f1e4b6
experimental savage vidix driver by Reza Jelveh <reza.jelveh at tu-harburg.de>
faust3
parents:
diff
changeset
|
287 #define SSTREAMS_MODE(bpp) (bpp > 16 ? (bpp > 24 ? STREAMS_MODE32 :\ |
8be9b0f1e4b6
experimental savage vidix driver by Reza Jelveh <reza.jelveh at tu-harburg.de>
faust3
parents:
diff
changeset
|
288 STREAMS_MODE24) : STREAMS_MODE16) |
8be9b0f1e4b6
experimental savage vidix driver by Reza Jelveh <reza.jelveh at tu-harburg.de>
faust3
parents:
diff
changeset
|
289 |
8be9b0f1e4b6
experimental savage vidix driver by Reza Jelveh <reza.jelveh at tu-harburg.de>
faust3
parents:
diff
changeset
|
290 #define HSCALING_Shift 0 |
8be9b0f1e4b6
experimental savage vidix driver by Reza Jelveh <reza.jelveh at tu-harburg.de>
faust3
parents:
diff
changeset
|
291 #define HSCALING_Mask (((1L << 16)-1) << HSCALING_Shift) |
8be9b0f1e4b6
experimental savage vidix driver by Reza Jelveh <reza.jelveh at tu-harburg.de>
faust3
parents:
diff
changeset
|
292 #define HSCALING(w0,w1) ((((unsigned int)(((double)w0/(double)w1) * (1 << 15))) \ |
8be9b0f1e4b6
experimental savage vidix driver by Reza Jelveh <reza.jelveh at tu-harburg.de>
faust3
parents:
diff
changeset
|
293 << HSCALING_Shift) \ |
8be9b0f1e4b6
experimental savage vidix driver by Reza Jelveh <reza.jelveh at tu-harburg.de>
faust3
parents:
diff
changeset
|
294 & HSCALING_Mask) |
8be9b0f1e4b6
experimental savage vidix driver by Reza Jelveh <reza.jelveh at tu-harburg.de>
faust3
parents:
diff
changeset
|
295 |
8be9b0f1e4b6
experimental savage vidix driver by Reza Jelveh <reza.jelveh at tu-harburg.de>
faust3
parents:
diff
changeset
|
296 #define VSCALING_Shift 0 |
8be9b0f1e4b6
experimental savage vidix driver by Reza Jelveh <reza.jelveh at tu-harburg.de>
faust3
parents:
diff
changeset
|
297 #define VSCALING_Mask (((1L << 20)-1) << VSCALING_Shift) |
8be9b0f1e4b6
experimental savage vidix driver by Reza Jelveh <reza.jelveh at tu-harburg.de>
faust3
parents:
diff
changeset
|
298 #define VSCALING(h0,h1) ((((unsigned int) (((double)h0/(double)h1) * (1 << 15))) \ |
8be9b0f1e4b6
experimental savage vidix driver by Reza Jelveh <reza.jelveh at tu-harburg.de>
faust3
parents:
diff
changeset
|
299 << VSCALING_Shift) \ |
8be9b0f1e4b6
experimental savage vidix driver by Reza Jelveh <reza.jelveh at tu-harburg.de>
faust3
parents:
diff
changeset
|
300 & VSCALING_Mask) |
8be9b0f1e4b6
experimental savage vidix driver by Reza Jelveh <reza.jelveh at tu-harburg.de>
faust3
parents:
diff
changeset
|
301 |
8be9b0f1e4b6
experimental savage vidix driver by Reza Jelveh <reza.jelveh at tu-harburg.de>
faust3
parents:
diff
changeset
|
302 |
8be9b0f1e4b6
experimental savage vidix driver by Reza Jelveh <reza.jelveh at tu-harburg.de>
faust3
parents:
diff
changeset
|
303 #endif /* _SAVAGE_REGS_H */ |