]> 4ch.mooo.com Git - 16.git/blob - 16/PCGPE10/TRIDENT.TXT
modified: 16/modex16/scroll.c
[16.git] / 16 / PCGPE10 / TRIDENT.TXT
1 \r
2                  ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿\r
3                  ³ Programming the Trident 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 ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ\r
30 ³ Identifying the Trident SVGA Card ³\r
31 ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ\r
32 \r
33 There are two Trident SVGA chips, the TVGA 8800 and 8900.\r
34 \r
35 The Trident SVGA chips can be identified by attempting to change the\r
36 Mode Control #1 register as follows:\r
37 \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
43                                     ³\r
44                                    PAGE\r
45 \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
51 \r
52 ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ\r
53 ³ Identifying which Trident Chip is Present ³\r
54 ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ\r
55 \r
56 The Trident chip can be identified with the following psuedo code :\r
57 \r
58 Port[$3C4] := $0B\r
59 Port[$3C5] := $00\r
60 hardware_version_number := Port[$3C5]\r
61 if hardware_version_number >= 3 then\r
62   chip is an 8900\r
63 else\r
64   chip is an 8800\r
65 \r
66 This procedure leaves the chip in "New Mode". New Mode and Old mode are\r
67 discussed below.\r
68 \r
69 ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ\r
70 ³ Trident Graphics Display Modes ³\r
71 ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ\r
72 \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
84 \r
85 ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ\r
86 ³ Trident Display Memory ³\r
87 ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ\r
88 \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
93 mode operation.\r
94 \r
95 The new mode can be set with the following procedure:\r
96 \r
97 Port[$3C4] := $0B               { Set the old mode 128K scheme }\r
98 Port[$3C5] := $00\r
99 dummy_variable := Port[$3C5]    { Toggle over to the new mode }\r
100 \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
103 \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
109                             ÀÄÂÄÙ   ³   ³\r
110                             Bank  Page Seg\r
111 \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
117 \r
118 The following code will set the bank number for all read operations:\r
119 \r
120 PortW[$3C4] := bank_number shl 8 + $0E;\r
121 \r
122 The following code will set the bank number for all write operations:\r
123 \r
124 PortW[$3C4] := (bank_number xor 2) shl 8 + $0E;\r
125 \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
129 \r