OSDN Git Service

41c10ca3312c5e34fd9c16bd4bb64f929ca665e1
[proj16/16.git] / 16 / PCGPE10 / TSENG.TXT
1 \r
2                   ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿\r
3                   ³ Programming the Tseng SVGA Chip ³\r
4                   ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ\r
5 \r
6                  Written for the PC-GPE by Mark Feldman\r
7             e-mail address : u914097@student.canberra.edu.au\r
8                              myndale@cairo.anu.edu.au\r
9 \r
10                   Please read the file SVGINTRO.TXT\r
11               (Graphics/SVGA/Intro PC-GPE menu option)\r
12 \r
13              ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿\r
14              ³      THIS FILE MAY NOT BE DISTRIBUTED     ³\r
15              ³ SEPARATE TO THE ENTIRE PC-GPE COLLECTION. ³\r
16              ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ\r
17 \r
18 \r
19 ÚÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ\r
20 ³ Disclaimer ³\r
21 ÀÄÄÄÄÄÄÄÄÄÄÄÄÙ\r
22 \r
23 I assume no responsibility whatsoever for any effect that this file, the\r
24 information contained therein or the use thereof has on you, your sanity,\r
25 computer, spouse, children, pets or anything else related to you or your\r
26 existance. No warranty is provided nor implied with this information.\r
27 \r
28 ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ\r
29 ³ Identifying the Tseng SVGA Card ³\r
30 ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ\r
31 \r
32 Tseng Labs have produced two SVGA Chips, the ET3000 and the ET4000.\r
33 \r
34 The Tseng SVGA chips can be identified by attempting to change the\r
35 Miscellaneous register as follows:\r
36 \r
37           Index : 06h at port 3C0h\r
38           Read/write data from port 3C1h\r
39           ÚÄÄÄÂÄÄÄÂÄÄÄÂÄÄÄÂÄÄÄÂÄÄÄÂÄÄÄÂÄÄÄ¿\r
40           ³ 7 ³ 6 ³ 5 ³ 4 ³ 3 ³ 2 ³ 1 ³ 0 ³\r
41           ÀÄÄÄÁÄÄÄÁÄÄÄÁÄÄÄÁÄÄÄÁÄÄÄÁÄÄÄÁÄÄÄÙ\r
42                     ÀÄÂÄÙ\r
43                      High\r
44 \r
45 Output the value 6 to port 3C0h and read a byte from port 3C1h. Modify\r
46 the high field in this byte (eg new byte = byte XOR 30h) and write this\r
47 new byte to port 3C1h. Read the byte from port 3C1h and see if the byte\r
48 was successfully modified, if it was then a Tseng chip is present. Having\r
49 done this, write the original byte back to port 3C1h to leave the graphics\r
50 adapter in it's original state.\r
51 \r
52 ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ\r
53 ³ Identifying which Tseng Card is Present ³\r
54 ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ\r
55 \r
56 The ET4000 can be distinguished from the ET3000 by attempting to change the\r
57 ET4000 Extended Start Address register as follows:\r
58 \r
59           Index : 33h at port 3D4h\r
60           Read/write data from port 3D5h\r
61           ÚÄÄÄÂÄÄÄÂÄÄÄÂÄÄÄÂÄÄÄÂÄÄÄÂÄÄÄÂÄÄÄ¿\r
62           ³ 7 ³ 6 ³ 5 ³ 4 ³ 3 ³ 2 ³ 1 ³ 0 ³\r
63           ÀÄÄÄÁÄÄÄÁÄÄÄÁÄÄÄÁÄÄÄÁÄÄÄÁÄÄÄÁÄÄÄÙ\r
64                             ÀÄÂÄÙ   ÀÄÂÄÙ\r
65                              CAD     DAD\r
66 \r
67 The same technique is used as was used to identify the presence of a\r
68 Tseng chip, both fields should be modified, written, tested for a successful\r
69 write and then restored to their original values. If the change was\r
70 successful an ET4000 chip is present, otherwise an ET3000 chip is.\r
71 \r
72 ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ\r
73 ³ Tseng Graphics Display Modes ³\r
74 ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ\r
75 \r
76             ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿\r
77             ³ Mode     Resolution       Colors    ³\r
78             ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´\r
79             ³ 25h      640x480          16        ³\r
80             ³ 29h      800x600          16        ³\r
81             ³ 2Dh      640x350          256       ³\r
82             ³ 2Eh      640x480          256       ³\r
83             ³ 2Fh      640x400          256       ³\r
84             ³ 30h      800x600          256       ³\r
85             ³ 37h      1024x768         16        ³\r
86             ³ 38h      1024x768         256       ³\r
87             ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ\r
88 \r
89 All graphics modes in the above table are supported by the ET4000. I am not\r
90 sure which modes are supported by the ET3000.\r
91 \r
92 ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ\r
93 ³ Tseng Display Memory ³\r
94 ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ\r
95 \r
96 In my opinion the Tseng memory mapping was designed to prevent graphics\r
97 programmers from suffering nervous breakdowns!\r
98 \r
99 Two banks can be mapped to the segment A000:0000-FFFFh, one for\r
100 reading and one for writing. The banks can be selected by writing to\r
101 the Segment Select Registers at port 3Cdh:\r
102 \r
103 ET3000 Segment Select Register:\r
104           Port 3CDh\r
105           ÚÄÄÄÂÄÄÄÂÄÄÄÂÄÄÄÂÄÄÄÂÄÄÄÂÄÄÄÂÄÄÄ¿\r
106           ³ 7 ³ 6 ³ 5 ³ 4 ³ 3 ³ 2 ³ 1 ³ 0 ³\r
107           ÀÄÄÄÁÄÄÄÁÄÄÄÁÄÄÄÁÄÄÄÁÄÄÄÁÄÄÄÁÄÄÄÙ\r
108                     ÀÄÄÄÂÄÄÄÙ   ÀÄÄÄÂÄÄÄÙ\r
109                       Read         Write\r
110                       Bank         Bank\r
111 \r
112 ET4000 Segment Select Register:\r
113           Port 3CDh\r
114           ÚÄÄÄÂÄÄÄÂÄÄÄÂÄÄÄÂÄÄÄÂÄÄÄÂÄÄÄÂÄÄÄ¿\r
115           ³ 7 ³ 6 ³ 5 ³ 4 ³ 3 ³ 2 ³ 1 ³ 0 ³\r
116           ÀÄÄÄÁÄÄÄÁÄÄÄÁÄÄÄÁÄÄÄÁÄÄÄÁÄÄÄÁÄÄÄÙ\r
117             ÀÄÄÄÄÄÂÄÄÄÄÄÙ   ÀÄÄÄÄÄÂÄÄÄÄÄÙ\r
118                  Read           Write\r
119                  Bank           Bank\r
120 \r
121 Both of these registers can be read from as well as written to.\r
122 \r
123 Each bank is 64K long, has a 64K granularity and is mapped to host\r
124 memory A000:0000-FFFFh.\r
125 \r
126 ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ\r
127 ³ DPMI and the ET4000 ³\r
128 ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ\r
129 \r
130 Apparently the ET4000 chip is capable of linear addressing in dos protect-\r
131 mode programs. To enable this feature write the value 36h to port 3D4h,\r
132 read the value from port 3D5h, set the lower nibble (bits 0 -> 3) to the\r
133 value 1 and rewrite the value to port 3D5h. Resetting these bits to the\r
134 value 0 puts the chip back in regular segmented addressing mode.\r
135 \r
136 I have no information where or how the entire ET4000 memory would then be\r
137 mapped to linear memory. If anyone has more information on this or has a\r
138 Tseng card they are willing to try it on let me know.\r
139 \r