OSDN Git Service

modified: Project 16.bfproject
[proj16/16.git] / 16 / PCGPE10 / PARADISE.TXT
1 \r
2                 ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿\r
3                 ³ Programming the Paradise 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 ³ Introduction ³\r
31 ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ\r
32 \r
33 Western Digital have made a series of Paradise chips, the PVGA1A, WD90C00\r
34 and WD90C11. Each chip is fully compatible with it's predecessors. There\r
35 is also a WD90C10 which is a stripped down version of the WD90C00 used for\r
36 motherboard VGA implementations and does not support 256 color modes higher\r
37 that 320x200; this chip will not be discussed here.\r
38 \r
39 ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ\r
40 ³ Paradise Extensions ³\r
41 ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ\r
42 \r
43 To modify any of the Paradise extended registers you must enable the\r
44 extensions. Disable them once you are done.\r
45 \r
46 To enable extensions:\r
47 \r
48 PortW[$3CE] := $050F; { Extensions on             }\r
49 PortW[$3D4] := $8529; { Unlock PR10-PR17          }\r
50 PortW[$3C4] := $4806; { Unlock extended sequencer }\r
51 \r
52 To disable extensions :\r
53 \r
54 PortW[$3CE] := $000F; { Extensions off          }\r
55 PortW[$3D4] := $0029; { Lock PR10-PR17          }\r
56 PortW[$3C4] := $0006; { Lock extended sequencer }\r
57 \r
58 ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ\r
59 ³ Identifying the Paradise SVGA Chip ³\r
60 ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ\r
61 \r
62 To identify if a Paradise SVGA chip is present read the 4 bytes at memory\r
63 address C000:007D. These bytes should be the string "VGA=".\r
64 \r
65                 ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿\r
66                 ³  Memory Address   Value      ³\r
67                 ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´\r
68                 ³  C000:007Dh        86d ('V') ³\r
69                 ³  C000:007Eh        71d ('G') ³\r
70                 ³  C000:007Fh        65d ('A') ³\r
71                 ³  C000:0080h        61d ('=') ³\r
72                 ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ\r
73 \r
74 ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ\r
75 ³ Identifying which Paradise Chip is Present ³\r
76 ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ\r
77 \r
78 The Paradise chip present can be determined by trying to access selected\r
79 registers. The following pseudo-code will determine the chip id:\r
80 \r
81 var old_value : byte;\r
82 \r
83 Enable Extensions\r
84 \r
85 { Test for a PVGA1A }\r
86 Port[$3D4] := $2B\r
87 old_value := Port[$3D5]\r
88 Port[$3D5] := $AA\r
89 if Port[$3D5] <> $AA then\r
90   begin\r
91     chip is a PVGA1A\r
92     Port[$3D5] := old_value\r
93     return\r
94   end\r
95 Port[$3D5] := old_value\r
96 \r
97 { Distinguish between WD90C00 and WD90C10 }\r
98 Port[$3C4] := $12\r
99 old_value := Port[$3C5]\r
100 Port[$3C5] := old_value and $BF\r
101 if (Port[$3C5] and $40) <> 0 then\r
102   begin\r
103     chip is a WD90C00\r
104     return\r
105   end\r
106 Port[$3C5] := old_value or $40\r
107 if (Port[$3C5] and $40) = 0 then\r
108   begin\r
109     chip is a WD90C00\r
110     Port[$3C5] := old_value\r
111     return\r
112   end\r
113 Port[$3C5] := old_value\r
114 \r
115 { Distinguish between WD90C10 and WD90C11 }\r
116 Port[$3C4] := $10\r
117 old_value := Port[$3C5]\r
118 Port[$3C5] := old_value and $FB\r
119 if (Port[$3C5] and $04) <> 0 then\r
120   begin\r
121     chip is a WD90C10\r
122     Port[$3C5] := old_value\r
123     return\r
124   end\r
125 Port[$3C5] := old_value or $04\r
126 if (Port[$3C5] and $04) = 0 then\r
127   begin\r
128     chip is a WD90C10\r
129     Port[$3C5] := old_value\r
130     return\r
131   end\r
132 \r
133 { We made it this far so it's a WD90C11 }\r
134 chip is a WD90C11\r
135 Port[$3C5] := old_value\r
136 \r
137 ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ\r
138 ³ Paradise Graphics Display Modes ³\r
139 ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ\r
140 \r
141         ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿\r
142         ³ Mode     Resolution       Colors    Chips               ³\r
143         ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´\r
144         ³ 58h      800x600          16        pVGA1, WDC90cxx     ³\r
145         ³ 59h      800x600          2         pVGA1, WDC90cxx     ³\r
146         ³ 5Eh      640x400          256       pVGA1, WDC90cxx     ³\r
147         ³ 5Fh      640x480          256       pVGA1, WD90cxx      ³\r
148         ³ 5Ah      1024x768         2         WD90cxx             ³\r
149         ³ 5Bh      1024x768         4         WD90cxx             ³\r
150         ³ 5Dh      1024x768         16        WD90cxx, c11 (512K) ³\r
151         ³ 5Ch      800x600          256       WD90c11 (512K)      ³\r
152         ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ\r
153 \r
154 ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ\r
155 ³ Paradise Display Memory ³\r
156 ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ\r
157 \r
158 Remember, extensions must be enabled before any of the following procedures\r
159 are called.\r
160 \r
161 The Paradise can work in either single-paging mode, duel-paging mode or\r
162 read/write mode. There are two registers used to select banks in each of\r
163 the Paradise bank selection modes:\r
164 \r
165           PR0A Address Offset A\r
166           Index : 09h at port 3CEh\r
167           Read/Write at port 3CFh\r
168           ÚÄÄÄÂÄÄÄÂÄÄÄÂÄÄÄÂÄÄÄÂÄÄÄÂÄÄÄÂÄÄÄ¿\r
169           ³ 7 ³ 6 ³ 5 ³ 4 ³ 3 ³ 2 ³ 1 ³ 0 ³\r
170           ÀÄÄÄÁÄÄÄÁÄÄÄÁÄÄÄÁÄÄÄÁÄÄÄÁÄÄÄÁÄÄÄÙ\r
171                 ÀÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÙ\r
172                            Bank\r
173 \r
174           PR0B Address Offset A\r
175           Index : 0Ah at port 3CEh\r
176           Read/Write at port 3CFh\r
177           ÚÄÄÄÂÄÄÄÂÄÄÄÂÄÄÄÂÄÄÄÂÄÄÄÂÄÄÄÂÄÄÄ¿\r
178           ³ 7 ³ 6 ³ 5 ³ 4 ³ 3 ³ 2 ³ 1 ³ 0 ³\r
179           ÀÄÄÄÁÄÄÄÁÄÄÄÁÄÄÄÁÄÄÄÁÄÄÄÁÄÄÄÁÄÄÄÙ\r
180                 ÀÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÙ\r
181                            Bank\r
182 \r
183 There are 128 banks and the bank granularity is 4k, so if you want a bank\r
184 granularity of 64k you must multiply the bank number by 16.\r
185 \r
186 \r
187 Single Paging Mode\r
188 ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ\r
189 \r
190 In single paging mode PR0A is set to map a bank to host memory at\r
191 A000:0000-FFFFh. The bank is used for both reading and writing operations.\r
192 To set up for single paging mode use the following procedure:\r
193 \r
194 Port[$3C4] := $11;                 { Disable read/write mode }\r
195 Port[$3C5] := Port[$3C5] and $7F;\r
196 Port[$3CE] := $0B;                 { Disable PR0B            }\r
197 Port[$3CF] := Port[$3CF] and $F7;\r
198 \r
199 To set a 64k bank number in single paging mode use the following procedure:\r
200 \r
201 PortW[$3CE] := bank_number Shl 12 + $09;\r
202 \r
203 \r
204 Duel Paging Mode\r
205 ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ\r
206 \r
207 In duel paging mode PR0A is set to map a bank to host memory at\r
208 A000:0000-7FFFh and PR0B is set to map a bank to host memory at\r
209 A000:8000-FFFFh. Each bank is used for both reading and writing operations.\r
210 \r
211 To set up for duel paging mode use the following procedure:\r
212 \r
213 Port[$3C4] := $11;                 { Disable read/write mode }\r
214 Port[$3C5] := Port[$3C5] and $7F;\r
215 Port[$3CE] := $0B;                 { Enable PR0B             }\r
216 Port[$3CF] := Port[$3CF] or $80;\r
217 \r
218 To set the lower bank use the same procedure as given for single-paging\r
219 mode. The upper bank can be set with the following procedure:\r
220 \r
221 PortW[$3CE] := bank_number Shl 12 + $0A;\r
222 \r
223 \r
224 Read/Write Paging Mode\r
225 ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ\r
226 \r
227 In read/write paging mode PR0A is used to map a bank at A000:0000-FFFFh for\r
228 read operations and PR0B is used to map a bank at A000:0000-FFFFh for write\r
229 operations. To set up for read/write paging mode use the following procedure:\r
230 \r
231 Port[$3C4] := $11;                 { Enable read/write mode }\r
232 Port[$3C5] := Port[$3C5] or $80;\r
233 Port[$3CE] := $0B;                 { Enable PR0B             }\r
234 Port[$3CF] := Port[$3CF] or $80;\r
235 \r
236 Setting PR0A and PR0B is the same as for duel paging mode.\r
237 \r