Specifications.
[pintos-anon] / specs / freevga / vga / vga.htm
diff --git a/specs/freevga/vga/vga.htm b/specs/freevga/vga/vga.htm
new file mode 100644 (file)
index 0000000..39f95a9
--- /dev/null
@@ -0,0 +1,226 @@
+<HTML>
+<HEAD>
+   <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
+   <META NAME="Author" CONTENT="Joshua Neal">
+   <META NAME="Description" CONTENT="Pure VGA/SVGA hardware programming (registers, identification, and otherlow-level stuff.)">
+   <META NAME="KeyWords" CONTENT="VGA SVGA hardware video programming">
+   <TITLE>VGA/SVGA Video Programming--Standard VGA Chipset Reference</TITLE>
+</HEAD>
+<BODY>
+
+<CENTER><A HREF="../home.htm">Home</A> <A HREF="#intro">Intro</A> <A HREF="#general">General</A>
+<A HREF="#register">Registers</A> <A HREF="#index">Index</A> <A HREF="../home.htm#vga">Back</A>&nbsp;
+<HR WIDTH="100%"><B>Hardware Level VGA and SVGA Video Programming Information
+Page</B></CENTER>
+
+<CENTER>VGA Chipset Reference&nbsp;
+<HR WIDTH="100%"></CENTER>
+
+<UL>
+<LI>
+<A HREF="#intro">Introduction</A> -- introduction to the VGA reference</LI>
+
+<LI>
+<A HREF="#general">General Programming Information</A> -- details of the
+functional operation of the VGA hardware.</LI>
+
+<LI>
+<A HREF="#register">Input/Output Register Information</A> -- details on
+the VGA registers themselves</LI>
+
+<LI>
+<A HREF="#index">Indices</A> -- convenient listings of fields and their
+locations alphabetically and by function</LI>
+</UL>
+<A NAME="intro"></A><B>Introduction</B>
+<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; This section is intended
+to be a reference to the common functionality of the original IBM VGA and
+compatible adapters. If you are writing directly to hardware then this
+is the lowest common denominator of nearly all video cards in use today.
+Nearly all programs requiring the performance of low-level hardware access
+resort to this baseline capacity, so this information is still valuable
+to programmers. In addition most of the VGA functions apply to SVGA cards
+when operating in SVGA modes, so it is best to know how to use them even
+when programming more advanced hardware.
+<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Most VGA references I have
+seen document the VGA by describing its operation in the various BIOS modes.
+However, because BIOS was designed for use in MS-DOS real mode applications,
+its functionality is limited in other environments. This document is structured
+in a way that explains the VGA hardware and its operation independent of
+the VGA BIOS modes, which will allow for better understanding of the capabilities
+of the VGA hardware.
+<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; This reference has grown
+out of my own notes and experimentation while learning to program the VGA
+hardware. During this process I have identified errors in various references
+that I have used and have attempted to document the VGA hardware's actual
+behavior as best as possible. If in your experience you find any of this
+information to be inaccurate, or even if you find this information to be
+misleading or inaccurate, please let me know!
+<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; One of the reasons I started
+this reference was that I was using existing references and found myself
+wishing for a hypertext reference as almost every register is affected
+by the operation of another, and was constantly flipping pages. Here I
+simply use links for the register references, such as <A HREF="crtcreg.htm#13">Offset
+Register</A>, rather than stating something like: Offset Register (CRTC:
+Offset = 13h, bits 7-0). While the second method is more informative, using
+them for every reference to the register makes the text somewhat bogged
+down. HTML allows simply clicking on the register name and all of the details
+are provided. Another is that no single reference had all of the information
+I was looking for, and that I had penciled many corrections and clarifications
+into the references themselves. This makes it difficult to switch to a
+newer version of a book when another edition comes out -- I still use my
+heavily annotated second edition of Ferarro's book, rather than the more
+up-to-date third edition.
+
+<P><A NAME="general"></A><B>General Programming Information</B>
+<BR><B>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </B>This section is intended
+to provide functional information on various aspects of the VGA. If you
+are looking simply for VGA register descriptions look in the next section.
+The VGA hardware is complex and can be confusing to program. Rather than
+attempt to document the VGA better than existing references by using more
+words to describe the registers, this section breaks down the functionality
+of the VGA into specific categories of similar functions or by detailing
+procedures for performing certain operations.
+<UL>
+<LI>
+<A HREF="vgamem.htm">Accessing the VGA Display Memory</A> -- details on
+the memory interface between the CPU and VGA frame buffer.</LI>
+
+<LI>
+<A HREF="vgaseq.htm">Sequencer Operation</A> -- details on how the VGA
+hardware rasterizes the display buffer</LI>
+
+<UL>
+<LI>
+Text-mode</LI>
+
+<UL>
+<LI>
+<A HREF="vgatext.htm">VGA Text Mode Operation</A> -- details concerning
+text mode operation, including attributes and fonts.</LI>
+
+<LI>
+<A HREF="textcur.htm">Manipulating the Text-mode Cursor</A> -- details
+controlling the appearance and location of the cursor.</LI>
+</UL>
+</UL>
+
+<UL>
+<LI>
+<A HREF="vgafx.htm">Special Effects Hardware</A> -- details on hardware
+support for windowing, paging, smooth scrolling and panning, and split-screen
+operation.</LI>
+</UL>
+
+<LI>
+<A HREF="vgaattr.htm">Attribute Controller Operation</A> -- details on
+the conversion of sequenced display data into DAC input. <B>(WIP)</B></LI>
+
+<LI>
+<A HREF="vgadac.htm">DAC Operation</A> -- details controlling the conversion
+of palette data into analog signals.</LI>
+
+<LI>
+<A HREF="vgacrtc.htm">Display Generation</A> -- details on formatting of
+the produced video signal for output to the display.</LI>
+</UL>
+<A NAME="register"></A><B>Input/Output Register Information</B>
+<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; This section is intended
+to provide a detailed reference of the VGA's internal registers. It attempts
+to combine information from a variety of sources, including the references
+listed in the reference section of the home page; however, rather than
+attempting to condense this information into one reference, leaving out
+significant detail, I have attempted to expand upon the information available
+and provide an accurate, detailed reference that should be useful to any
+programmer of the VGA and SVGA. Only those registers that are present and
+functional on the VGA are given, so if you are seeking information specific
+to the CGA, EGA, MCGA, or MGA adapters try the Other References section
+on the home page.
+<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; In some cases I have changed
+the name of the register, not to protect the innocent but simply to make
+it clearer to understand. One clarification is the use of "Enable" and
+"Disable". A the function of a field with the name ending with "Enable"
+is enabled when it is 1, and likewise a field with a name ending in Disable
+is disabled when it is 1. Another case is when two fields have similar
+or identical names, I have added more description to the name to differentiate
+them.
+<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; It can be difficult to understand
+how to manipulate the VGA registers as many registers have been packed
+into a small number of I/O ports and accessing them can be non-intuituve,
+especially the Attribute Controller Registers, so I have provided a tutorial
+for doing this.
+<UL>
+<LI>
+&nbsp;<A HREF="vgareg.htm">Accessing the VGA Registers</A> -- methods of
+manipulating the VGA registers</LI>
+</UL>
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; In order to facilitate understanding
+of the registers, one should view them as groups of similar registers,
+based upon how they are accessed, as the VGA uses indexed registers to
+access most parameters. This also roughly places them in groups of similar
+functionality; however, in many cases the fields do not fit neatly into
+their category. In certain cases I have utilized quotes from the IBM VGA
+Programmer's Reference, this information is given in "<I>italic.</I>"&nbsp;
+This is meant to be a temporary placeholder until a better description
+can be written, it may not be applicable to a standard VGA implementation.&nbsp;
+Presented to roughly based upon their place in the graphics pipeline between
+the CPU and the video outputs are the:
+<UL>
+<LI>
+<A HREF="graphreg.htm">Graphics Registers</A> -- control the way the CPU
+accesses video RAM.</LI>
+
+<LI>
+<A HREF="seqreg.htm">Sequencer Registers</A> -- control how video data
+is sent to the DAC.</LI>
+
+<LI>
+<A HREF="attrreg.htm">Attribute Controller Registers</A> -- selects the
+16 color and 64 color palettes used for EGA/CGA compatibility.</LI>
+
+<LI>
+<A HREF="crtcreg.htm">CRT Controller Registers</A> -- control how the video
+is output to the display.</LI>
+
+<LI>
+<A HREF="colorreg.htm">Color Registers</A> -- selects the 256 color palette
+from the maximum possible colors.</LI>
+
+<LI>
+<A HREF="extreg.htm">External Registers</A> -- miscellaneous registers
+used to control video operation.</LI>
+</UL>
+<A NAME="index"></A><B>Indices</B>
+<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; In order to locate a particular
+register quickly, the following indexes are provided. The first is a listing
+of all of the register fields of the VGA hardware. This is especially useful
+for fields that are split among multiple registers, or for finding the
+location of a field that are packed in with other fields in one register.
+The second is indexed by function groups each pertaining to a particular
+part of the VGA hardware. This makes understanding and programming the
+VGA hardware easier by listing the fields by subsystem, as the VGA's fields
+are grouped in a somewhat haphazard fashion. The third is intended for
+matching a read or write to a particular I/O port address to the section
+where it is described.
+<UL>
+<LI>
+<A HREF="vgargidx.htm">VGA Field Index</A> -- An alphabetical listing of
+all fields and links to their location.</LI>
+
+<LI>
+<A HREF="vgafunc.htm">VGA Functional Index</A> -- A listing of all fields
+and links to their location grouped by function.</LI>
+
+<LI>
+<A HREF="portidx.htm">VGA I/O Port Index</A> -- A listing of VGA I/O ports
+in numerical order.</LI>
+</UL>
+Notice: All trademarks used or referred to on this page are the property
+of their respective owners.
+<BR>All pages are Copyright &copy; 1997, 1998, J. D. Neal, except where
+noted. Permission for utilization and distribution is subject to the terms
+of the <A HREF="license.htm">FreeVGA Project Copyright License</A>.
+
+<P>&nbsp;
+</BODY>
+</HTML>