2 ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿
\r
3 ³ Programming the Trident SVGA Chip ³
\r
4 ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ
\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
10 Please read the file SVGINTRO.TXT
\r
11 (Graphics/SVGA/Intro PC-GPE menu option)
\r
13 ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿
\r
14 ³ THIS FILE MAY NOT BE DISTRIBUTED ³
\r
15 ³ SEPARATE TO THE ENTIRE PC-GPE COLLECTION. ³
\r
16 ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ
\r
19 ÚÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ
\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
29 ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ
\r
30 ³ Identifying the Trident SVGA Card ³
\r
31 ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ
\r
33 There are two Trident SVGA chips, the TVGA 8800 and 8900.
\r
35 The Trident SVGA chips can be identified by attempting to change the
\r
36 Mode Control #1 register as follows:
\r
38 Index : 0Eh at port 3C4h
\r
39 Read/write data from port 3C5h
\r
40 ÚÄÄÄÂÄÄÄÂÄÄÄÂÄÄÄÂÄÄÄÂÄÄÄÂÄÄÄÂÄÄÄ¿
\r
41 ³ 7 ³ 6 ³ 5 ³ 4 ³ 3 ³ 2 ³ 1 ³ 0 ³
\r
42 ÀÄÄÄÁÄÄÄÁÄÄÄÁÄÄÄÁÄÄÄÁÄÄÄÁÄÄÄÁÄÄÄÙ
\r
46 First write the value 0Eh to port 3C4h. Then read the value in from port
\r
47 3C5h and save it. for rest Next write the value 00h to port 3C5h and
\r
48 read the value back in from the port. If bit 1 in the value read is set
\r
49 (ie = 1) then a trident chip is present. Finally write the original value
\r
50 back to port 3C5h to leave the SVGA adapter in it's original state.
\r
52 ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ
\r
53 ³ Identifying which Trident Chip is Present ³
\r
54 ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ
\r
56 The Trident chip can be identified with the following psuedo code :
\r
60 hardware_version_number := Port[$3C5]
\r
61 if hardware_version_number >= 3 then
\r
66 This procedure leaves the chip in "New Mode". New Mode and Old mode are
\r
69 ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ
\r
70 ³ Trident Graphics Display Modes ³
\r
71 ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ
\r
73 ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿
\r
74 ³ Mode Resolution Colors Chip ³
\r
75 ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´
\r
76 ³ 5Bh 800x600 16 8800/8900 ³
\r
77 ³ 5Ch 640x400 256 8800/8900 ³
\r
78 ³ 5Dh 640x480 256 8800/8900 ³
\r
79 ³ 5Eh 800x600 256 8900 ³
\r
80 ³ 5Fh 1024x768 16 8800/8900 ³
\r
81 ³ 61h 768x1024 16 8800/8900 ³
\r
82 ³ 62h 1024x768 256 8900 ³
\r
83 ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ
\r
85 ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ
\r
86 ³ Trident Display Memory ³
\r
87 ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ
\r
89 Both Trident chips can map video memory in either 64K or 128K paging
\r
90 schemes. The 8800 defaults to the 128K paging scheme at power up. This
\r
91 scheme is known as the "Old Mode". The 8900 defaults to the 64K paging
\r
92 scheme, the "New Mode". This file will concentrate solely on the 64K new
\r
95 The new mode can be set with the following procedure:
\r
97 Port[$3C4] := $0B { Set the old mode 128K scheme }
\r
99 dummy_variable := Port[$3C5] { Toggle over to the new mode }
\r
101 Trident bank switching is weird, REALLY weird! In new mode, the New Mode
\r
102 Control Register # 1 is used to select the active bank:
\r
104 Index : 0Eh at port 3C4h
\r
105 Read/write data from port 3C5h
\r
106 ÚÄÄÄÂÄÄÄÂÄÄÄÂÄÄÄÂÄÄÄÂÄÄÄÂÄÄÄÂÄÄÄ¿
\r
107 ³ 7 ³ 6 ³ 5 ³ 4 ³ 3 ³ 2 ³ 1 ³ 0 ³
\r
108 ÀÄÄÄÁÄÄÄÁÄÄÄÁÄÄÄÁÄÄÄÁÄÄÄÁÄÄÄÁÄÄÄÙ
\r
112 Bits 3-0 can be considered as a single 4 bit bank number. However, when
\r
113 you write to video memory the Trident inverts the Page bit to determine
\r
114 which bank should actually be written to. So if you set these bits to the
\r
115 value 0 (0000) then bank 0 will be used for all read operations and bank 2
\r
116 (0010) will be used for all write operations.
\r
118 The following code will set the bank number for all read operations:
\r
120 PortW[$3C4] := bank_number shl 8 + $0E;
\r
122 The following code will set the bank number for all write operations:
\r
124 PortW[$3C4] := (bank_number xor 2) shl 8 + $0E;
\r
126 It is important to realise that setting the write bank number changes the
\r
127 read bank number, and visa-versa. How you are supposed to rapidly transfer
\r
128 blocks of data around on the Trident screen is beyond me.
\r