Video Graphics Array

From TheAlmightyGuru
Jump to: navigation, search
The VGA chip, RAMDAC, and timing crystals integrated onto a motherboard.

The Video Graphics Array (VGA) is a graphics card created by IBM, initially for their IBM PS/2 line of personal computers first released on 1987-04-02, and was then adopted by IBM clones and later IBM personal computers. Expanding upon their earlier Color Graphics Adapter and Enhanced Graphics Adapter, VGA includes a higher maximum resolution, greater color depth, and backward compatibility with the previous two standards. The device is called an "array" rather than an "adapter" because it was directly integrated into the computer's motherboard rather than be a expansion card, and this has caused people to misidentify the name. Too add to the confusion, third party manufacturers did make VGA adapter cards which could be used to give VGA capabilities to computers that didn't have a built-in VGA. The two most popular VGA display modes was 640x480 at 16 colors and 320x200 at 256 colors, although the device also supports all CGA and EGA modes, and several other less-popular new ones.

VGA was the last IBM graphics standard to see widespread adoption as third party competitors were developing competing Super VGA systems as early as 1988. Over a dozen manufacturers vied for the next "standard," between 1988 and 1995, and, by the time IBM finally got around to releasing their official VGA replacement in 1990, the Extended Graphics Array (XGA), it was seen as underwhelming. This long period of lack of standards caused a lot of developers to remain focused on VGA, despite its inferiority. Those companies that tried supporting higher resolutions had to spend a lot of time and money to writing custom drivers which were often plagued with issues. It wasn't until Windows 95 came out when a standard was essentially enforced that a universal display platform was achieved, but, even then, many game developers stuck to DOS for a few years longer.

Though VGA is no longer relevant to modern hardware, the term "VGA" is now used to generically describe any display which uses a DE-15 video connector regardless of the resolution, color depth, or signal encoding, including VGA, Super VGA, and Extended Graphics Array.

Personal

My family's first computer from 1991 had VGA graphics. I adored the gorgeous visuals of 256 colors and 640x480 high res mode. Whenever I booted up an older EGA or CGA game, I cringed at how inferior they looked. Also, because VGA didn't restrict colors by tiles the way most video game consoles of the day did, it could display more impressive graphics (provided the artist could deliver). Because of this, I still have a fondness for VGA art from this era of computer video gaming.

Unfortunately, the computer my parent's bought was already obsolete when they got it, and they weren't too keen on upgrading, so I was stuck with inferior VGA graphics until we got a new computer around 1996. Thankfully, due to the conflicting SVGA formats, a lot of developers stayed focused on VGA, so I didn't miss much.

Colors

The default VGA 256 color palette.

In 320x200 graphics mode, VGA supports 256 color indexes with the default palette displayed to the right. It was designed to be backward-compatible with both the CGA and EGA palettes, so the first 16 colors match the CGA/EGA standard. After that, there are 16 shades of gray, and then a 24-index color spectrum beginning with blue and rotating toward red, yellow, green, and back to blue. The spectrum is repeated two more times with each subsequent copy having a lower saturation than the previous. Those 72 colors are repeated two more times with each subsequent copy having a lower intensity. There are also 8 indexes at the end left black, I'm presuming because it would take nine indexes to accommodate another color using this scheme, though I don't know why they didn't just pad out the gray scale with the unused values or provide eight more unique colors.

The complete VGA color space. Each color used in a VGA palette must come from this list.

Although this is the default color set, all 256 colors could be customized. Each index can be made up of red, green, and blue intensities ranging from 0-63 (6-bit) which is a total color space of 262,143 possible options. The vast majority of games developed with VGA in mind used a custom palette. These color definitions were stored in files among the resources of the game and would often be exactly 768 bytes in size, enough bytes to define an RGB intensity for each of the 256 indexes. Because of this, it's common for game editors to assume a 768-byte file is a palette lookup.

In the 640x480 graphics mode and 720x400 text mode, VGA uses the first 16 color indexes by default, although they are also user-definable. All other modes are for backward compatibility and use the same colors as their older counterparts.

Examples

Display Modes

Text Modes

Default VGA 9x16 character set.
Character Resolution Character Size Pixel Resolution Colors Palette Mode
80x25 9x16 720x400 16 6-bit RGB definable VGA
80x25 9x16 720x400 2 Black & white MDA
80x25 8x16 640x400 16 6-bit RGB definable MCGA
40x25 9x16 360x400 16 6-bit RGB definable VGA
80x50 8x8 640x400 16 definable from 64 colors EGA
80x43 8x8 640x344 16 definable from 64 colors EGA
80x25 8x8 640x200 16 fixed CGA
40x25 8x8 320x200 16 fixed CGA

VGA text mode allowed for a fair amount of customization. You could redefine all of the characters in the font and you could even set the height and width of the text to a custom size. For example, changing the character size from 9x16 to 8x10 would increase each character resolution to 90x40 pixels.

Very few programs took advantage of these features. Word Perfect and FoxPro for MS-DOS with VGA support allowed the user to put the text display into 50-row mode, which would display more text by sacrificing readability. An example of a program which allowed for the VGA font to be modified is MegaZeux.

Graphics Modes

Pixel Resolution Colors Palette Mode
640x480 16 6-bit RGB definable VGA
640x480 2 Black & white MDA
640x350 16 definable from 64 colors EGA
640x200 16 definable from 64 colors EGA
640x200 2 definable from 16 colors CGA
320x240 256 planar 6-bit RGB definable VGA (Mode X)
320x200 256 linear 6-bit RGB definable VGA (Mode 13h)
320x200 256 planar 6-bit RGB definable VGA (Mode Y)
320x200 16 definable from 64 colors EGA
320x200 4 definable from 4 possible options CGA

A lot of unofficial display resolutions can also be accomplished by coding directly to the display controller. You could get up to 800 pixels wide (while sacrificing height) and 600 pixels tall (while sacrificing width). You can also get larger than spec resolutions by decreasing the refresh rate. However, since these abnormal resolutions required a monitor that supported them, they were rarely used.

Media

Documentation

Videos

How VGA works.

Links

Link-Wikipedia.png  Link-ModdingWiki.png