Specifications.
[pintos-anon] / specs / freevga / vga / extreg.htm
1 <HTML>
2 <HEAD>
3    <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
4    <META NAME="Author" CONTENT="Joshua Neal">
5    <META NAME="Description" CONTENT="Pure VGA/SVGA hardware programming (registers, identification, and other low-level stuff.)">
6    <META NAME="KeyWords" CONTENT="VGA SVGA hardware video programming">
7    <TITLE>VGA/SVGA Video Programming--External Regsters</TITLE>
8 </HEAD>
9 <BODY>
10
11 <UL>
12 <CENTER><A HREF="../home.htm">Home</A> <A HREF="vga.htm#register">Back</A>&nbsp;
13 <HR WIDTH="100%"><B>Hardware Level VGA and SVGA Video Programming Information
14 Page</B></CENTER>
15
16 <CENTER>External Regsters</CENTER>
17
18 <CENTER>
19 <HR WIDTH="100%"></CENTER>
20 </UL>
21 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; The External Registers (sometimes
22 called the General Registers) each have their own unique I/O location in
23 the VGA, although sometimes the Read Port differs from the Write port,
24 and some are Read-only.. See the <A HREF="vgareg.htm">Accessing the VGA
25 Registers</A> section for more detals.
26 <UL>
27 <LI>
28 Port 3CCh/3C2h -- <I>Miscellaneous Output Register</I></LI>
29
30 <LI>
31 Port 3CAh/3xAh -- <I>Feature Control Register</I></LI>
32
33 <LI>
34 Port 3C2h -- <I>Input Status #0 Register</I></LI>
35
36 <LI>
37 Port 3xAh -- <I>Input Status #1 Register</I></LI>
38 </UL>
39 &nbsp;
40 <TABLE BORDER WIDTH="600" CELLPADING="2" >
41 <CAPTION ALIGN=TOP><A NAME="3CCR3C2W"></A><B>Miscellaneous Output Register
42 (Read at 3CCh, Write at 3C2h)</B></CAPTION>
43
44 <TR ALIGN=CENTER VALIGN=CENTER>
45 <TD WIDTH="75">7</TD>
46
47 <TD WIDTH="75">6</TD>
48
49 <TD WIDTH="75">5</TD>
50
51 <TD WIDTH="75">4</TD>
52
53 <TD WIDTH="75">3</TD>
54
55 <TD WIDTH="75">2</TD>
56
57 <TD WIDTH="75">1</TD>
58
59 <TD WIDTH="75">0</TD>
60 </TR>
61
62 <TR ALIGN=CENTER VALIGN=CENTER>
63 <TD WIDTH="75">VSYNCP</TD>
64
65 <TD WIDTH="75">HSYNCP</TD>
66
67 <TD WIDTH="75">O/E Page</TD>
68
69 <TD WIDTH="75"></TD>
70
71 <TD COLSPAN="2" WIDTH="150">Clock Select</TD>
72
73 <TD WIDTH="75">RAM En.</TD>
74
75 <TD WIDTH="75">I/OAS</TD>
76 </TR>
77 </TABLE>
78 &nbsp;
79 <UL><B>VSYNCP -- Vertical Sync Polarity<BR>
80 </B>"<I>Determines the polarity of the vertical sync pulse and can be used
81 (with HSP) to control the vertical size of the display by utilizing the
82 autosynchronization feature of VGA displays.</I>
83 <BR><I>&nbsp; = 0 selects a positive vertical retrace sync pulse.</I>"
84 <BR><B>HSYNCP -- Horizontal Sync Polarity<BR>
85 </B>"<I>Determines the polarity of the horizontal sync pulse.</I>
86 <BR><I>&nbsp; = 0 selects a positive horizontal retrace sync pulse.</I>"
87 <BR><B>O/E Page -- Odd/Even Page Select<BR>
88 </B>"<I>Selects the upper/lower 64K page of memory when the system is in
89 an eve/odd mode (modes 0,1,2,3,7).</I>
90 <BR><I>&nbsp; = 0 selects the low page</I>
91 <BR><I>&nbsp; = 1 selects the high page</I>"
92 <LI>
93 <B>Clock Select</B></LI>
94
95 <BR>This field controls the selection of the dot clocks used in driving
96 the display timing.&nbsp; The standard hardware has 2 clocks available
97 to it, nominally 25 Mhz and 28 Mhz.&nbsp; It is possible that there may
98 be other "external" clocks that can be selected by programming this register
99 with the undefined values.&nbsp; The possible valuse of this register are:
100 <UL>
101 <LI>
102 00 -- select 25 Mhz clock (used for 320/640 pixel wide modes)</LI>
103
104 <LI>
105 01 -- select 28 Mhz clock (used for 360/720 pixel wide modes)</LI>
106
107 <LI>
108 10 -- undefined (possible external clock)</LI>
109
110 <LI>
111 11 -- undefined (possible external clock)</LI>
112 </UL>
113 <B>RAM En. -- RAM Enable<BR>
114 </B>"<I>Controls system access to the display buffer.</I>
115 <BR><I>&nbsp; = 0 disables address decode for the display buffer from the
116 system</I>
117 <BR><I>&nbsp; = 1 enables address decode for the display buffer from the
118 system</I>"
119 <BR><B>I/OAS -- Input/Output Address Select<BR>
120 </B>"<I>This bit selects the CRT controller addresses. When set to 0, this
121 bit sets the CRT controller addresses to 0x03Bx and the address for the
122 Input Status Register 1 to 0x03BA for compatibility withthe monochrome
123 adapter.&nbsp; When set to 1, this bit sets CRT controller addresses to
124 0x03Dx and the Input Status Register 1 address to 0x03DA for compatibility
125 with the color/graphics adapter. The Write addresses to the Feature Control
126 register are affected in the same manner.</I>"</UL>
127 &nbsp;
128 <TABLE BORDER WIDTH="600" CELLPADING="2" >
129 <CAPTION ALIGN=TOP><A NAME="3CAR3xAW"></A><B>Feature Control Register (Read
130 at 3CAh, Write at 3BAh (mono) or 3DAh (color))</B></CAPTION>
131
132 <TR ALIGN=CENTER VALIGN=CENTER>
133 <TD WIDTH="75">7</TD>
134
135 <TD WIDTH="75">6</TD>
136
137 <TD WIDTH="75">5</TD>
138
139 <TD WIDTH="75">4</TD>
140
141 <TD WIDTH="75">3</TD>
142
143 <TD WIDTH="75">2</TD>
144
145 <TD WIDTH="75">1</TD>
146
147 <TD WIDTH="75">0</TD>
148 </TR>
149
150 <TR ALIGN=CENTER VALIGN=CENTER>
151 <TD WIDTH="75"></TD>
152
153 <TD WIDTH="75"></TD>
154
155 <TD WIDTH="75"></TD>
156
157 <TD WIDTH="75"></TD>
158
159 <TD WIDTH="75"></TD>
160
161 <TD WIDTH="75"></TD>
162
163 <TD WIDTH="75">FC1</TD>
164
165 <TD WIDTH="75">FC0</TD>
166 </TR>
167 </TABLE>
168 &nbsp;
169 <UL>
170 <LI>
171 <B>FC1 -- Feature Control bit 1<BR>
172 </B>"<I>All bits are reserved.</I>"</LI>
173
174 <LI>
175 <B>FC2 -- Feature Control bit 0<BR>
176 </B>"<I>All bits are reserved.</I>"</LI>
177 </UL>
178 &nbsp;
179 <TABLE BORDER WIDTH="600" CELLPADING="2" >
180 <CAPTION ALIGN=TOP><A NAME="3C2R"></A><B>Input Status #0 Register (Read-only
181 at 3C2h)</B></CAPTION>
182
183 <TR ALIGN=CENTER VALIGN=CENTER>
184 <TD WIDTH="75">7</TD>
185
186 <TD WIDTH="75">6</TD>
187
188 <TD WIDTH="75">5</TD>
189
190 <TD WIDTH="75">4</TD>
191
192 <TD WIDTH="75">3</TD>
193
194 <TD WIDTH="75">2</TD>
195
196 <TD WIDTH="75">1</TD>
197
198 <TD WIDTH="75">0</TD>
199 </TR>
200
201 <TR ALIGN=CENTER VALIGN=CENTER>
202 <TD WIDTH="75"></TD>
203
204 <TD WIDTH="75"></TD>
205
206 <TD WIDTH="75"></TD>
207
208 <TD WIDTH="75">SS</TD>
209
210 <TD WIDTH="75"></TD>
211
212 <TD WIDTH="75"></TD>
213
214 <TD WIDTH="75"></TD>
215
216 <TD WIDTH="75"></TD>
217 </TR>
218 </TABLE>
219 &nbsp;
220 <UL><B>SS - Switch Sense<BR>
221 </B>"<I>Returns the status of the four sense switches as selected by the
222 CS field of the Miscellaneous Output Register.</I>"</UL>
223 &nbsp;
224 <TABLE BORDER WIDTH="600" CELLPADING="2" >
225 <CAPTION ALIGN=TOP><A NAME="3xAR"></A><B>Input Status #1 Register (Read
226 at 3BAh (mono) or 3DAh (color))</B></CAPTION>
227
228 <TR ALIGN=CENTER VALIGN=CENTER>
229 <TD WIDTH="75">7</TD>
230
231 <TD WIDTH="75">6</TD>
232
233 <TD WIDTH="75">5</TD>
234
235 <TD WIDTH="75">4</TD>
236
237 <TD WIDTH="75">3</TD>
238
239 <TD WIDTH="75">2</TD>
240
241 <TD WIDTH="75">1</TD>
242
243 <TD WIDTH="75">0</TD>
244 </TR>
245
246 <TR ALIGN=CENTER VALIGN=CENTER>
247 <TD WIDTH="75"></TD>
248
249 <TD WIDTH="75"></TD>
250
251 <TD WIDTH="75"></TD>
252
253 <TD WIDTH="75"></TD>
254
255 <TD WIDTH="75">VRetrace</TD>
256
257 <TD WIDTH="75"></TD>
258
259 <TD WIDTH="75"></TD>
260
261 <TD WIDTH="75">DD</TD>
262 </TR>
263 </TABLE>
264 &nbsp;
265 <UL><B>VRetrace -- Vertical Retrace<BR>
266 </B>"<I>When set to 1, this bit indicates that the display is in a vertical
267 retrace interval.This bit can be programmed, through the Vertical Retrace
268 End register, to generate an interrupt at the start of the vertical retrace.</I>"
269 <BR><B>DD -- Display Disabled<BR>
270 </B>"<I>When set to 1, this bit indicates a horizontal or vertical retrace
271 interval. This bit is the real-time status of the inverted 'display enable'
272 signal. Programs have used this status bit to restrict screen updates to
273 the inactive display intervals in order to reduce screen flicker. The video
274 subsystem is designed to eliminate this software requirement; screen updates
275 may be made at any time without screen degradation.</I>"</UL>
276 Notice: All trademarks used or referred to on this page are the property
277 of their respective owners.
278 <BR>All pages are Copyright &copy; 1997, 1998, J. D. Neal, except where
279 noted. Permission for utilization and distribution is subject to the terms
280 of the <A HREF="license.htm">FreeVGA Project Copyright License</A>.
281 </BODY>
282 </HTML>