]> 4ch.mooo.com Git - 16.git/blob - 16/PCGPE10/CAT.TXT
separated out row and column rendering into functions
[16.git] / 16 / PCGPE10 / CAT.TXT
1 \r
2           ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿\r
3           ³ Programming the Chips And 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 ³ Setup mode ³\r
30 ÀÄÄÄÄÄÄÄÄÄÄÄÄÙ\r
31 \r
32 To modify some of the CAT's internal SVGA registers the card must be placed\r
33 into setup mode. This is done by writing the value 1Eh to port 46E8h. To\r
34 exit setup mode write the value 0Eh to port 46E8h.\r
35 \r
36 ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ\r
37 ³ Enabling Extensions ³\r
38 ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ\r
39 \r
40 The CAT's extended registers are normally locked and must be enabled before\r
41 you attempt to modify them. To enable them, you must enter setup mode,\r
42 write the value 80h to port 103h and exit setup mode. To disable them\r
43 you must enter setup mode, write the value 00h to port 103h and exit\r
44 setup mode.\r
45 \r
46 ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ\r
47 ³ Identifying the CAT Chip ³\r
48 ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ\r
49 \r
50 Detecting the presence of a CAT chip can be done by entering setup mode,\r
51 checking that the value returned from reading port 104h is A5h and then\r
52 exiting setup mode.\r
53 \r
54 ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ\r
55 ³ Identifying which CAT Chip and Revision Number ³\r
56 ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ\r
57 \r
58 The CAT chip type and revision number can be determined by enabling\r
59 extensions, reading the value of register 0 and disabling extensions.\r
60 The top 4 bits (4-7) are the chip id and the lower 4 are the version\r
61 number.\r
62 \r
63                      ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿\r
64                      ³ Chip ID      Chip             ³\r
65                      ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´\r
66                      ³    1         82c451 or 82c452 ³\r
67                      ³    2         82c455           ³\r
68                      ³    3         82c453           ³\r
69                      ³    5         82c456           ³\r
70                      ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ\r
71 \r
72 \r
73 The 82c451 and 82c452 can be distinguished by attempting to modify\r
74 register 3Ah (Graphics Cursor Color 1, make sure you set it back to what it\r
75 was). If the register exists the chip is an 82c452.\r
76 \r
77 Alternatively the chip ID can be determined using the Get Controller\r
78 Information BIOS call (see below).\r
79 \r
80 ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ\r
81 ³ CAT Graphics Display Modes ³\r
82 ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ\r
83 \r
84         ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿\r
85         ³ Mode    Resolution   Colors          Chip         ³\r
86         ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´\r
87         ³ 25h     640x480      16              451/452/453  ³\r
88         ³ 6Ah     800x600      16              451/452/453  ³\r
89         ³ 70h     800x600      16              451/452/453  ³\r
90         ³ 71h     960x720      16              452          ³\r
91         ³ 72h     1024x768     16              452/453      ³\r
92         ³ 78h     640x400      256             451/452/453  ³\r
93         ³ 79h     640x480      256             452/453      ³\r
94         ³ 7Ah     768x576      256             452          ³\r
95         ³ 7Ch     800x600      256             453          ³\r
96         ³ 7Eh     1024x768     256             453          ³\r
97         ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ\r
98 \r
99 ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ\r
100 ³ The CAT Display Memory ³\r
101 ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ\r
102 \r
103 The following registers can only be modified while the extended registers\r
104 are enabled (See Enabling Extensions above).\r
105 \r
106 The 451, 455 and 456 are always in single-paging mode and have 4 64K\r
107 banks. To switch to a bank you must first enable access to extended memory\r
108 with the following procedure:\r
109 \r
110 Port[$3D6] := $0B;\r
111 Port[$3D6] := Port[$3D6] and $FD;\r
112 \r
113 Selecting a bank can be done with the following procedure:\r
114 \r
115 Port[$3D6] := $0B;\r
116 Port[$3D7] := bank_number;\r
117 \r
118 where bank_number = 0 - 3. Each bank is 64K long and has a 86K granularity.\r
119 \r
120 The 452 and 453 banks have a 16K granularity, so if you want 64K granularity\r
121 you must multiply the bank number by 4 before writing it to the registers :\r
122 \r
123 Port[$3D6] := $10;\r
124 Port[$3D7] := bank_number Shl 2;  { = bank_numer * 4 }\r
125 \r
126 The 452 and 453 allow duel paging. The 64K host address space is split in\r
127 two, one low area A000:0000-7FFFh and a high area A000:8000-FFFFh. This\r
128 mode can be enabled with the following procedure:\r
129 \r
130 Port[$3D6] := $10;\r
131 Port[$3D6] := Port[$3D6] or 2;\r
132 \r
133 In this mode each bank also has a granularity of 16K. The lower bank is\r
134 selected with the same procedure for setting the bank in single-paging\r
135 mode. The upper bank is selected with the following call:\r
136 \r
137 Port[$3D6] := $11;\r
138 Port[$3D7] := bank_number Shl 2;  { = bank_numer * 4 }\r
139 \r
140 None of the CAT chips allow you to select one bank for reading and\r
141 another for writing.\r
142 \r
143 ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ\r
144 ³ CAT Get Controller Information BIOS Call ³\r
145 ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ\r
146 \r
147 Int 10h\r
148 Inputs :\r
149     AH = 5Fh            Extended VGA Control\r
150     AL = 00h            Get Controller Information\r
151 \r
152 Returns:\r
153 AL = 5Fh                Extended VGA control function supported\r
154 BL = Chip type          bits 7-4 contain the chip type number\r
155                             0 = 82c451\r
156                             1 = 82c452\r
157                             2 = 82c455\r
158                             ? = 82c453\r
159                         bits 3-0 contain the revision number\r
160 BH = Memory Size        Video memory size\r
161                           0 = 256k\r
162                           1 = 512k\r
163                           2 = 1M\r