Specifications.
[pintos-anon] / specs / freevga / freevga.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 otherlow-level stuff.)">
6    <META NAME="KeyWords" CONTENT="VGA SVGA hardware video programming">
7    <TITLE>FreeVGA--About the FreeVGA Project</TITLE>
8 </HEAD>
9 <BODY>
10
11 <CENTER><A HREF="home.htm">Home</A> <A HREF="#intro">Intro</A> <A HREF="#completeness">Completeness</A>
12 <A HREF="#contrib">Contribution</A> <A HREF="#membership">Membership</A>
13 <A HREF="#questions">Questions</A> <A HREF="home.htm">Back</A>&nbsp;
14 <HR WIDTH="100%"><B>Hardware Level VGA and SVGA Video Programming Information
15 Page</B></CENTER>
16
17 <CENTER>About the FreeVGA Project&nbsp;
18 <HR WIDTH="100%"></CENTER>
19
20
21 <P><A NAME="intro"></A><B>Introduction</B>
22 <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; As a software programmer
23 for the PC architecture I have noticed that there is plenty of free information
24 existing on the Internet for programming PC hardware, with the notable
25 exception of video adapters, MPEG cards and the like. When the VGA was
26 the standard adapter card in PC's, programming was relatively straightforward.
27 However, when SVGA adapters appeared on the market, there was little standardization
28 between separate vendor's products. For this reason, applications and graphical
29 user interface systems required specialized drivers to utilize the extended
30 capabilities of the SVGA adapters. Either these specialized drivers were
31 written by the video card vendor or they had to be written by the application
32 vendor. Unfortunately due to the cost of specifications and complexity
33 of hardware, most free or shareware programs supported only the standard
34 VGA. The goal of this project, under my direction, is to explore the area
35 of low-level video programming and provide information for programmers
36 of free software throughout the world.
37 <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; With the growing popularity
38 of the free software concept, more and more specialized applications are
39 written every day. Many of these applications could take advantage of the
40 specialized features of the video hardware but often the information required
41 is not available. This projects goal is to make that information available
42 By gaining the cooperation of both programmers and hardware manufacturers
43 an excellent reference can be developed. Internet technology makes it possible
44 to provide a free resource updated in a timely fashion as opposed to printed
45 matter which takes time to print and deliver.
46
47 <P><A NAME="completeness"></A><B>Completeness</B>
48 <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Why would a low-level programmer
49 need this reference rather than simply use datasheets and chipset specifications
50 from the manufacturers themselves? First, the manufacturers may no longer
51 provide literature on "obsolete" chipsets. Second, such datasheets are
52 often aimed at hardware designers rather than programmers. Programmers
53 are trying to implement software on existing hardware rather design hardware.
54 Many of the details needed to program the hardware are dependent on the
55 implementation of the video adapter. Datasheets typically only provide
56 information on one particular component of the video hardware. It is necessary
57 to understand how the components in the adapter are "wired" together to
58 be able to program the adapter. This information is rarely found in datasheets
59 or manufacturer's documentation. Third, as demonstrated on the VGA and
60 some specific SVGA hardware, there are always programmers who can find
61 ways to cleverly program the hardware to provide capabilities unimagined
62 by the manufacturer. To do this, it requires the programmer to have intimate
63 knowledge of the hardware, as BIOS services provide a "lowest common denominator"
64 of capability.
65
66 <P><A NAME="contrib"></A><B>Contribution</B>
67 <BR><B>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </B>This section is for
68 those interested in contributing to the FreeVGA Project. The primary objective
69 of this project is to gather information about video hardware, to verify
70 this information as best as possible, then to organize the information
71 in a form usable for any application, and finally to make this information
72 freely available to all programmers. Because of the non-profit nature of
73 this project, all information provided is the result of generous contribution
74 by myself or others. The primary resources required by this project are:
75 chipset datasheets/documentation, developer kits for video boards, video
76 adapter boards used for testing and verifying information, and finally
77 "postcards from the bleeding edge" i.e. information about the real world
78 problems and their workarounds from video programmers. If you can provide
79 any of these resources to the project or any other related assistance myself
80 and other programmers who benefit give thanks to your generosity. Your
81 name will be forever enshrined on the list of contributors, along with
82 a link to your homepage if you so desire.
83 <BR>&nbsp;&nbsp;&nbsp;&nbsp; I can be reached via the <A HREF="feedback.htm">feedback
84 form</A>. If you wish to donate hardware or documentation, please send
85 it, along with your name and the link you wish to include in the list of
86 contributors to:
87
88 <P>Joshua Neal
89 <BR>FreeVGA Project
90 <BR>925 N. Coronado Dr.
91 <BR>Gilbert, AZ 85234
92
93 <P><A NAME="membership"></A><B>Membership</B>
94 <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Because of the nature of
95 this project, any contributor can consider themselves a member if they
96 wish to do so. As the founder of this project I am willing to donate my
97 time and resources to ensuring the continuing organization, accuracy, and
98 usability of the FreeVGA Project's documentation. I will continue to do
99 this indefinitely, although if the task becomes overwhelming I will solicit
100 volunteers to assist with the project. There may at some point in the future
101 be special considerations for vendors that choose to support the projects
102 goals.
103
104 <P><A NAME="questions"></A><B>Open-Ended Questions</B>
105 <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; The problem of documenting
106 video card operation and behavior is difficult because of the large amount
107 of information available, and because video hardware is constantly evolving,
108 making documentation a problem of hitting a moving target. Another problem
109 is that because video cards are projects of human endeavor and due to their
110 complexity, their implementation often differs from published specifications.
111 Even two manufacturer's products based upon the same chipset can contain
112 enough variation to make them separate cases from a programmer's viewpoint.
113 The FreeVGA Project attempts to provide answers to the following questions:
114 <UL>
115 <LI>
116 <B>How does one detect what VGA/SVGA adapter is present even when no access
117 to BIOS is available?</B></LI>
118 </UL>
119 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Because video hardware was developed
120 by many independent vendors along separate evolutionary paths, there is
121 very little knowledge about how to identify the particular model of video
122 card present in a machine. Because identifying the particular model is
123 crucial to utilizing the advanced features of a specific model, this is
124 an important task that nearly all software written for the SVGA needs to
125 perform. In many cases, such as when writing programs under an operating
126 system other than MS-DOS/Windows, it may not be possible nor is it good
127 practice to access BIOS for determining the specific model. Furthermore,
128 the more recent PCI bus design is being incorporated into many systems
129 with non-80x86 chips, such as the PowerPC, Alpha, and even high end workstations.
130 However, the manufacturers of the hardware may only support Mac and PC
131 versions of their cards, considering other platforms too much of a niche
132 market to support. Since their inception in the PC market, most video cards
133 have had the capability to work with another card (albeit different) in
134 the same machine. Some newer PCI cards allow multiple cards to be used
135 in one machine. Until recently this capability has been unsupported by
136 operating systems and programs. For debugging video routines there is no
137 equal to having a second monitor attached--one monitor can display the
138 program's output while the other provides the debugging interface. Note
139 that the need for a second monitor could be reduced somewhat if better
140 virtualization of the display hardware was implemented. This project aims
141 to give programmers the skills and knowledge to better utilize the video
142 hardware.
143 <UL>
144 <LI>
145 <B>How does one perform standard video operations on a particular card
146 without utilizing the video BIOS interface?</B></LI>
147 </UL>
148 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; BIOS was designed to support
149 MS-DOS programs on the 8086. Computers have progressed far beyond that
150 point but BIOS has remained basically the same (with the exception of VESA
151 BIOS.) Even then, most facilities provided by the video BIOS are not particularly
152 useful. An example is the BIOS Read and Write Pixel commands. These are
153 the only BIOS provided method of accessing video memory other than text
154 functions. Anyone like myself who started learning 8086 assembler to speed
155 up their graphics discovered this function, and said "Cool. This is going
156 to be easy." I then ran my first program and discovered that I had just
157 lost a few orders of magnitude of performance. Thus I started to learn
158 to interact with the video card hardware directly. VESA BIOS is better,
159 although I have seen very few on-board implementations that work properly
160 (if present), usually resulting in the user having to run a TSR program
161 that provides VESA services in RAM. While VESA BIOS does provide some facilities
162 for non-real mode problems it still does place a function call penalty
163 on video code. My biggest complaint is that with VESA BIOS you are restricted
164 to programming to the lowest common denominator of all video hardware,
165 and thus to utilize any special features of a chipset, you still have to
166 learn to program the card directly. Many video cards are now considered
167 "obsolete" by their manufacturer (or the manufacturer has joined the great
168 corporation in the sky...) and developer support is no longer available.
169 The unfortunate problem is that these "obsolete" cards are the same cards
170 being used by non-profit organizations and schools who could otherwise
171 reap the benefits of a wide variety of free software.
172 <UL>
173 <LI>
174 <B>What are the specialized hardware features (2D/3D acceleration, hardware
175 cursor, video acceleration, etc.) does a particular card have and how does
176 one utilize these features?</B></LI>
177 </UL>
178 <B>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </B>This is probably the area where
179 the documentation is most important. These features are programmed differently
180 on each vendor's video hardware, but can improve the performance of a particular
181 application by several orders of magnitude. Programmers such as video game
182 programmers and assembly demo programmers have demonstrated that by pushing
183 hardware to its limits, previously inconceivable animation and special
184 effects are possible. Recent advances in 3D acceleration have made virtual
185 reality on the desktop a possibility. It is crucial to developers that
186 they be able to thoroughly understand the hardware's operation to maximize
187 its performance.
188 <UL>
189 <LI>
190 <B>What are the differences between specific implementations of particular
191 chipsets, and if so how does one write software that works with these differences?</B></LI>
192 </UL>
193 <B>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </B>Even programmers programming for
194 the relatively standard VGA hardware can run into problems in this area.
195 This is the reason so many packages state support for IBM VGA or 100% compatible.
196 Frequently programmers encounter slight differences in hardware that, under
197 specific circumstances can cause their programs to fail to operate properly.
198 If programmers had detailed documentation of the hardware differences of
199 specific implementations, programmers could, and are generally willing
200 to, write workarounds in their code in order to provide support for this
201 hardware. Occasionally subtle hardware problems arise in a particular version
202 of a board and is corrected in a later revision (possibly by simply revising
203 the BIOS.) It is important to recognize the earlier version and be able
204 to write software that can deal with its particular problem. In addition,
205 many chipsets are designed in such a way that they can work with a variety
206 of support devices such as clock generators and Video DACs. It is important
207 to know how to detect and control these support devices, which may (and
208 usually is) be different in every implementation. Some of these devices
209 could be interchanged with pin-compatible devices which could provide additional
210 functionality. However, this would require special programming to utilize
211 the device's features.
212 <UL>
213 <LI>
214 <B>How does one perform diagnostics on a particular video card in order
215 to identify inoperative, semi-inoperative, and improperly configured hardware?</B></LI>
216 </UL>
217 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; While testing and verifying the operation
218 of various video boards. I discovered some cards that did not respond properly
219 to my programming. My initial thought was that I was doing something wrong
220 and tried to figure out what was wrong. However, further testing on another
221 identical card demonstrated that the first board had simply failed. There
222 is little diagnostic software for the VGA and SVGA adapters particularly
223 when dealing with some of the more esoteric features. This is primarily
224 because little has been identified about the correct behavior of video
225 cards. Many manufacturers fail to include a thorough diagnostics utility
226 with their hardware, and the diagnostics that are provided are usually
227 specific to one operating system.
228 <UL>
229 <LI>
230 <B>How does one properly emulate a particular VGA/SVGA adapter in order
231 to properly implement compatibility for legacy full-screen applications?</B></LI>
232 </UL>
233 <B>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </B>This is a particular
234 are of interest to myself and others. This knowledge can be used to create
235 a virtual machine capable of multitasking legacy applications. Particular
236 features that could be provided are the ability to execute a full-screen
237 program in the background, execute a full-screen program in a virtual window
238 on a desktop, emulate a particular video adapter and translate its output
239 to a form compatible with the hardware on the machine, provide the ability
240 to remotely view an applications screen across a network, provide the ability
241 to debug a full-screen application without having to use a dual monitor
242 system or attached text terminal. Huge benefits can be reaped, but all
243 of the details of a particular hardware configuration must be known for
244 proper emulation/virtualization. For example, programs that attempt to
245 autodetect the hardware often rely on undocumented behaviors of video adapters.
246 These undocumented behaviors must be emulated properly for the application
247 to work properly.
248
249 <P>Notice: All trademarks used or referred to on this page are the property
250 of their respective owners.
251 <BR>All pages are Copyright &copy; 1997, 1998, J. D. Neal, except where
252 noted. Permission for utilization and distribution is subject to the terms
253 of the <A HREF="license.htm">FreeVGA Project Copyright License</A>.&nbsp;<IMG SRC="http://www.goodnet.com/~tinara/cgi-bin/imgserv.cgi?logo2.gif" >
254 </BODY>
255 </HTML>