Specifications.
[pintos-anon] / specs / freevga / vga / seqreg.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--Sequencer Registers</TITLE>
8 </HEAD>
9 <BODY>
10
11 <CENTER><A HREF="../home.htm">Home</A> <A HREF="vga.htm#register">Back</A>&nbsp;
12 <HR WIDTH="100%"><B>Hardware Level VGA and SVGA Video Programming Information
13 Page</B></CENTER>
14
15 <CENTER>Sequencer Registers&nbsp;
16 <HR WIDTH="100%"></CENTER>
17
18
19 <P>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; The Sequencer Registers are
20 accessed via a pair of registers, the Sequencer Address Register and the
21 Sequencer Data Register. See the <A HREF="vgareg.htm">Accessing the VGA
22 Registers</A> section for more detals. The Address Register is located
23 at port 3C4h and the Data Register is located at port 3C5h.
24 <UL>
25 <LI>
26 Index 00h -- <I>Reset Register</I></LI>
27
28 <LI>
29 Index 01h -- <I>Clocking Mode Register</I></LI>
30
31 <LI>
32 Index 02h -- <I>Map Mask Register</I></LI>
33
34 <LI>
35 Index 03h -- Character Map Select Register</LI>
36
37 <LI>
38 Index 04h -- <I>Sequencer Memory Mode Register</I></LI>
39 </UL>
40 &nbsp;
41 <TABLE BORDER WIDTH="600" CELLPADING="2" >
42 <CAPTION ALIGN=TOP><A NAME="00"></A><B>Reset Register (Index 00h)</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"></TD>
64
65 <TD WIDTH="75"></TD>
66
67 <TD WIDTH="75"></TD>
68
69 <TD WIDTH="75"></TD>
70
71 <TD WIDTH="75"></TD>
72
73 <TD WIDTH="75"></TD>
74
75 <TD WIDTH="75">SR</TD>
76
77 <TD WIDTH="75">AR</TD>
78 </TR>
79 </TABLE>
80 &nbsp;
81 <UL><B>SR -- Sychnronous Reset</B>
82 <BR>"<I>When set to 0, this bit commands the sequencer to synchronously
83 clear and halt. Bits 1 and 0 must be 1 to allow the sequencer to operate.
84 To prevent the loss of data, bit 1 must be set to 0 during the active display
85 interval before changing the clock selection. The clock is changed through
86 the Clocking Mode register or the Miscellaneous Output register.</I>"
87 <BR><B>AR -- Asynchronous Reset</B>
88 <BR>"<I>When set to 0, this bit commands the sequencer to asynchronously
89 clear and halt. Resetting the sequencer with this bit can cause loss of
90 video data</I>"</UL>
91 &nbsp;
92 <TABLE BORDER WIDTH="600" CELLPADING="2" >
93 <CAPTION ALIGN=TOP><A NAME="01"></A><B>Clocking Mode Register (Index 01h)</B></CAPTION>
94
95 <TR ALIGN=CENTER VALIGN=CENTER>
96 <TD WIDTH="75">7</TD>
97
98 <TD WIDTH="75">6</TD>
99
100 <TD WIDTH="75">5</TD>
101
102 <TD WIDTH="75">4</TD>
103
104 <TD WIDTH="75">3</TD>
105
106 <TD WIDTH="75">2</TD>
107
108 <TD WIDTH="75">1</TD>
109
110 <TD WIDTH="75">0</TD>
111 </TR>
112
113 <TR ALIGN=CENTER VALIGN=CENTER>
114 <TD WIDTH="75"></TD>
115
116 <TD WIDTH="75"></TD>
117
118 <TD WIDTH="75">SD</TD>
119
120 <TD WIDTH="75">S4</TD>
121
122 <TD WIDTH="75">DCR</TD>
123
124 <TD WIDTH="75">SLR</TD>
125
126 <TD WIDTH="75"></TD>
127
128 <TD WIDTH="75">9/8DM</TD>
129 </TR>
130 </TABLE>
131 &nbsp;
132 <UL><B>SD -- Screen Disable</B>
133 <BR>"<I>When set to 1, this bit turns off the display and assigns maximum
134 memory bandwidth to the system. Although the display is blanked, the synchronization
135 pulses are maintained. This bit can be used for rapid full-screen updates.</I>"
136 <BR><B>S4 -- Shift Four Enable</B>
137 <BR>"<I>When the Shift 4 field and the Shift Load Field are set to 0, the
138 video serializers are loaded every character clock. When the Shift 4 field
139 is set to 1, the video serializers are loaded every forth character clock,
140 which is useful when 32 bits are fetched per cycle and chained together
141 in the shift registers.</I>"
142 <BR><B>DCR -- Dot Clock Rate</B>
143 <BR>"<I>When set to 0, this bit selects the normal dot clocks derived from
144 the sequencer master clock input. When this bit is set to 1, the master
145 clock will be divided by 2 to generate the dot clock. All other timings
146 are affected because they are derived from the dot clock. The dot clock
147 divided by 2 is used for 320 and 360 horizontal PEL modes.</I>"
148 <BR><B>SLR -- Shift/Load Rate</B>
149 <BR>"<I>When this bit and bit 4 are set to 0, the video serializers are
150 loaded every character clock. When this bit is set to 1, the video serializers
151 are loaded every other character clock, which is useful when 16 bits are
152 fetched per cycle and chained together in the shift registers. The Type
153 2 video behaves as if this bit is set to 0; therefore, programs should
154 set it to 0.</I>"
155 <LI>
156 <B>9/8DM -- 9/8 Dot Mode</B></LI>
157
158 <BR>This field is used to select whether a character is 8 or 9 dots wide.
159 This can be used to select between 720 and 640 pixel modes (or 360 and
160 320) and also is used to provide 9 bit wide character fonts in text mode.
161 The possible values for this field are:
162 <UL>
163 <LI>
164 0 - Selects 9 dots per character.</LI>
165
166 <LI>
167 1 - Selects 8 dots per character.</LI>
168 </UL>
169 </UL>
170 &nbsp;
171 <TABLE BORDER WIDTH="600" CELLPADING="2" >
172 <CAPTION ALIGN=TOP><A NAME="02"></A><B>Map Mask Register (Index 02h)</B></CAPTION>
173
174 <TR ALIGN=CENTER VALIGN=CENTER>
175 <TD WIDTH="75">7</TD>
176
177 <TD WIDTH="75">6</TD>
178
179 <TD WIDTH="75">5</TD>
180
181 <TD WIDTH="75">4</TD>
182
183 <TD WIDTH="75">3</TD>
184
185 <TD WIDTH="75">2</TD>
186
187 <TD WIDTH="75">1</TD>
188
189 <TD WIDTH="75">0</TD>
190 </TR>
191
192 <TR ALIGN=CENTER VALIGN=CENTER>
193 <TD WIDTH="75"></TD>
194
195 <TD WIDTH="75"></TD>
196
197 <TD WIDTH="75"></TD>
198
199 <TD WIDTH="75"></TD>
200
201 <TD COLSPAN="4" WIDTH="300">Memory Plane Write Enable</TD>
202 </TR>
203 </TABLE>
204 &nbsp;
205 <UL>
206 <LI>
207 <B>Memory Plane Write Enable</B></LI>
208
209 <BR>Bits 3-0 of this field correspond to planes 3-0 of the VGA display
210 memory. If a bit is set, then write operations will modify the respective
211 plane of display memory. If a bit is not set then write operations will
212 not affect the respective plane of display memory.</UL>
213 &nbsp;
214 <TABLE BORDER WIDTH="600" CELLPADING="2" >
215 <CAPTION ALIGN=TOP><A NAME="03"></A><B>Character Map Select Register (Index
216 03h)</B></CAPTION>
217
218 <TR ALIGN=CENTER VALIGN=CENTER>
219 <TD WIDTH="75">7</TD>
220
221 <TD WIDTH="75">6</TD>
222
223 <TD WIDTH="75">5</TD>
224
225 <TD WIDTH="75">4</TD>
226
227 <TD WIDTH="75">3</TD>
228
229 <TD WIDTH="75">2</TD>
230
231 <TD WIDTH="75">1</TD>
232
233 <TD WIDTH="75">0</TD>
234 </TR>
235
236 <TR ALIGN=CENTER VALIGN=CENTER>
237 <TD WIDTH="75"></TD>
238
239 <TD WIDTH="75"></TD>
240
241 <TD WIDTH="75">CSAS2</TD>
242
243 <TD WIDTH="75">CSBS2</TD>
244
245 <TD COLSPAN="2" WIDTH="150">Character Set A Select</TD>
246
247 <TD COLSPAN="2" WIDTH="150">Character Set B Select</TD>
248 </TR>
249 </TABLE>
250 &nbsp;
251 <UL>
252 <LI>
253 <B>CSAS2 -- Bit 2 of Character Set A Select</B></LI>
254
255 <BR>This is bit 2 of the Character Set A Select field. See <A HREF="#03">Character
256 Set A Select</A> below.
257 <LI>
258 <B>CSBS2 -- Bit 2 of Character Set B Select</B></LI>
259
260 <BR>This is bit 2 of the Character Set B field. See <A HREF="#03">Character
261 Set B Select</A> below.
262 <LI>
263 <B>Character Set A Select</B></LI>
264
265 <BR>This field is used to select the font that is used in text mode when
266 bit 3 of the attribute byte for a character is set to 1. Note that this
267 field is not contiguous in order to provide EGA compatibility. The font
268 selected resides in plane 2 of display memory at the address specified
269 by this field, as follows:
270 <UL>
271 <LI>
272 000b -- Select font residing at 0000h - 1FFFh</LI>
273 </UL>
274
275 <UL>
276 <LI>
277 001b -- Select font residing at 4000h - 5FFFh</LI>
278
279 <LI>
280 010b -- Select font residing at 8000h - 9FFFh</LI>
281
282 <LI>
283 011b -- Select font residing at C000h - DFFFh</LI>
284
285 <LI>
286 100b -- Select font residing at 2000h - 3FFFh</LI>
287
288 <LI>
289 101b -- Select font residing at 6000h - 7FFFh</LI>
290
291 <LI>
292 110b -- Select font residing at A000h - BFFFh</LI>
293
294 <LI>
295 111b -- Select font residing at E000h - FFFFh</LI>
296 </UL>
297
298 <LI>
299 <B>Character Set B Select</B></LI>
300
301 <BR>This field is used to select the font that is used in text mode when
302 bit 3 of the attribute byte for a character is set to 0. Note that this
303 field is not contiguous in order to provide EGA compatibility. The font
304 selected resides in plane 2 of display memory at the address specified
305 by this field, identical to the mapping used by <A HREF="#03">Character
306 Set A Select</A> above.</UL>
307 &nbsp;
308 <TABLE BORDER WIDTH="600" CELLPADING="2" >
309 <CAPTION ALIGN=TOP><A NAME="04"></A><B>Sequencer Memory Mode Register (Index
310 04h)</B></CAPTION>
311
312 <TR ALIGN=CENTER VALIGN=CENTER>
313 <TD WIDTH="75">7</TD>
314
315 <TD WIDTH="75">6</TD>
316
317 <TD WIDTH="75">5</TD>
318
319 <TD WIDTH="75">4</TD>
320
321 <TD WIDTH="75">3</TD>
322
323 <TD WIDTH="75">2</TD>
324
325 <TD WIDTH="75">1</TD>
326
327 <TD WIDTH="75">0</TD>
328 </TR>
329
330 <TR ALIGN=CENTER VALIGN=CENTER>
331 <TD WIDTH="75"></TD>
332
333 <TD WIDTH="75"></TD>
334
335 <TD WIDTH="75"></TD>
336
337 <TD WIDTH="75"></TD>
338
339 <TD WIDTH="75">Chain 4</TD>
340
341 <TD WIDTH="75">O/E Dis.</TD>
342
343 <TD WIDTH="75">Ext. Mem</TD>
344
345 <TD WIDTH="75"></TD>
346 </TR>
347 </TABLE>
348 &nbsp;
349 <UL><B>Chain 4 -- Chain 4 Enable</B>
350 <BR>"<I>This bit controls the map selected during system read operations.
351 When set to 0, this bit enables system addresses to sequentially access
352 data within a bit map by using the Map Mask register. When setto 1, this
353 bit causes the two low-order bits to select the map accessed as shown below.</I>
354 <BR><I>Address Bits</I>
355 <BR><I>&nbsp; A0 A1&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
356 Map Selected</I>
357 <BR><I>&nbsp;&nbsp; 0&nbsp;&nbsp; 0&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
358 0</I>
359 <BR><I>&nbsp;&nbsp; 0&nbsp;&nbsp; 1&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
360 1</I>
361 <BR><I>&nbsp;&nbsp; 1&nbsp;&nbsp; 0&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
362 2</I>
363 <BR><I>&nbsp;&nbsp; 1&nbsp;&nbsp; 1&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
364 3</I>"
365 <BR><B>O/E Dis. -- Odd/Even Host Memory Write Adressing Disable<BR>
366 </B>"<I>When this bit is set to 0, even system addresses access maps 0
367 and 2, while odd system addresses access maps 1 and 3. When this bit is
368 set to 1, system addresses sequentially access data within a bit map, and
369 the maps are accessed according to the value in the Map Mask register (index
370 0x02).</I>"
371 <BR><B>Ext. Mem -- Extended Memory<BR>
372 </B>"<I>When set to 1, this bit enables the video memory from 64KB to 256KB.
373 This bit must be set to 1 to enable the character map selection described
374 for the previous register.</I>"</UL>
375 Notice: All trademarks used or referred to on this page are the property
376 of their respective owners.
377 <BR>All pages are Copyright &copy; 1997, 1998, J. D. Neal, except where
378 noted. Permission for utilization and distribution is subject to the terms
379 of the <A HREF="license.htm">FreeVGA Project Copyright License</A>.
380 </BODY>
381 </HTML>