]> 4ch.mooo.com Git - 16.git/blob - 16/PCGPE10/ATI.TXT
modified: 16/modex16/pcxtest.exe
[16.git] / 16 / PCGPE10 / ATI.TXT
1 \r
2              ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿\r
3              ³ Programming the ATI Technologies 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 ³ Locating the Extended Register Set ³\r
30 ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ\r
31 \r
32 The ATI extended register set is based on the vga's index register scheme,\r
33 ie you write the value of the register you want to modify to Index Register\r
34 Port and write the actual data to the Data Port (the Data Port is one port\r
35 number higher than the Index Register Port). The value of the Index Register\r
36 for the ATI extended register set is stored in a word in BIOS ROM at\r
37 C000:0010. Apparently ATI want to change the value of this register in\r
38 future so they recommend you obtain it by reading the value at this memory\r
39 address.\r
40 \r
41 ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ\r
42 ³ Identifying the ATI Chip ³\r
43 ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ\r
44 \r
45 The ATI chip can be identified by checking the string in memory locations\r
46 C000:0031-003A for the following characters : 761295520\r
47 \r
48 ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ\r
49 ³ Identifying which ATI Chip ³\r
50 ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ\r
51 \r
52 The first version of the ATI chip is the 18800. The second version is the\r
53 28800, which from a programming perspective is identical to the 18800-2.\r
54 The 18800 can be identified by it's lack of support for display mode\r
55 55h.\r
56 \r
57 ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ\r
58 ³ Determining the ATI Chip Revision Number ³\r
59 ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ\r
60 \r
61 The ATI chip revision number is stored at BIOS location C000:0043.\r
62 \r
63 ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ\r
64 ³ ATI Graphics Display Modes ³\r
65 ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ\r
66 \r
67              ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿\r
68              ³ Mode    Resolution   Colors          Chip     ³\r
69              ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´\r
70              ³  53h     800x600      16              18800   ³\r
71              ³  54h     800x600      16              18800   ³\r
72              ³  55h     1024x768     16 (planar)     18800-1 ³\r
73              ³  61h     640x400      256             18800   ³\r
74              ³  62h     640x480      256             18800   ³\r
75              ³  63h     800x600      256             18800   ³\r
76              ³  65h     1024x768     256 (packed)    18800   ³\r
77              ³  67h     1024x768     4               ?       ³\r
78              ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ\r
79 \r
80 ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ\r
81 ³ ATI Display Memory ³\r
82 ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ\r
83 \r
84 In the following examples the EXT variable is the extended register index\r
85 value obtained from reading the word at C000:0010.\r
86 \r
87 The ATI supports both single and duel bank memory mapping. It supports 64K\r
88 byte pages, each of these can be mapped into the host address space.\r
89 \r
90 \r
91 \r
92 Single or duel bank mode is selected by the E2B bit in register BE\r
93 \r
94           Index : BEh at port EXT\r
95           Read/Write at port EXT + 1\r
96           ÚÄÄÄÂÄÄÄÂÄÄÄÂÄÄÄÂÄÄÄÂÄÄÄÂÄÄÄÂÄÄÄ¿\r
97           ³ 7 ³ 6 ³ 5 ³ 4 ³ 3 ³ 2 ³ 1 ³ 0 ³\r
98           ÀÄÄÄÁÄÄÄÁÄÄÄÁÄÄÄÁÄÄÄÁÄÄÄÁÄÄÄÁÄÄÄÙ\r
99                             ³\r
100                             ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄ E2B 0 = Single Bank Mode\r
101                                                 1 = Duel Bank Mode\r
102 \r
103 Selecting a bank to write to in single bank mode is done by writing the bank\r
104 number to the Bank Select Register :\r
105 \r
106           Index : B2h\r
107           ÚÄÄÄÂÄÄÄÂÄÄÄÂÄÄÄÂÄÄÄÂÄÄÄÂÄÄÄÂÄÄÄ¿\r
108           ³ 7 ³ 6 ³ 5 ³ 4 ³ 3 ³ 2 ³ 1 ³ 0 ³\r
109           ÀÄÄÄÁÄÄÄÁÄÄÄÁÄÄÄÁÄÄÄÁÄÄÄÁÄÄÄÁÄÄÄÙ\r
110                         ÀÄÄÄÄÄÂÄÄÄÄÄÙ\r
111                          Bank number\r
112 \r
113 The following procedure will select a bank in single bank mode :\r
114 \r
115 Port[EXT] := $B2;\r
116 Port[EXT + 1] := (Port[EXT + 1] And $E1) Or (bank_number shl 1);\r
117 \r
118 where bank_number = 0 - 15. Each bank is 64K long and has a 64K\r
119 granularity.\r
120 \r
121 Duel Bank Mode is only supported on the 18800-1 and 28800 chips. You can\r
122 map one bank to A000:0000-FFFF for read operations and another to the\r
123 same address space for write operations.\r
124 \r
125           Index : B2h\r
126           ÚÄÄÄÂÄÄÄÂÄÄÄÂÄÄÄÂÄÄÄÂÄÄÄÂÄÄÄÂÄÄÄ¿\r
127           ³ 7 ³ 6 ³ 5 ³ 4 ³ 3 ³ 2 ³ 1 ³ 0 ³\r
128           ÀÄÄÄÁÄÄÄÁÄÄÄÁÄÄÄÁÄÄÄÁÄÄÄÁÄÄÄÁÄÄÄÙ\r
129             ÀÄÄÄÂÄÄÄÙ       ÀÄÄÄÂÄÄÄÙ\r
130               Read            Write\r
131               Bank            Bank\r
132               Number          Number\r
133 \r
134 The following code will set the write bank number:\r
135 \r
136 Port[EXT] := $B2;\r
137 Port[EXT + 1] := (Port[EXT + 1] And $F0) Or (write_bank_number shl 1);\r
138 \r
139 The following code will set the read bank number:\r
140 \r
141 Port[EXT] := $B2;\r
142 Port[EXT + 1] := (Port[EXT + 1] And $0F) Or (read_bank_number shl 5);\r
143 \r
144 ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ\r
145 ³ ATI IsModeAvailable BIOS Call ³\r
146 ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ\r
147 \r
148 Int 10h\r
149 Inputs :\r
150     AH = 12h            Extended VGA Control\r
151     BX = 5506h          Get Mode Information\r
152     BP = FFFF           Set up for Return Argument\r
153     AL = Mode Number    Mode number you want to test\r
154 \r
155 Returns:\r
156 BP = FFFFh Mode not supported\r
157      Anything else : mode is supported, BP = offset into CRTC table for mode\r
158 \r