Video Graphics Array

From TheAlmightyGuru
Revision as of 13:17, 31 October 2019 by TheAlmightyGuru (talk | contribs) (Display Modes)
Jump to: navigation, search
The VGA chip, RAMDAC, and timing crystals integrated onto a motherboard.

The Video Graphics Array (VGA) is a video graphics standard created by IBM, initially for their IBM PS/2 line of personal computers first released in 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 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 an adapter card, however, 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 modes was 640x480 at 16 colors and 320x200 at 256 colors.

In modern parlance, the term "VGA" is used to refer to a DE-15 video connector regardless of the signal format rather than the IBM hardware.

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, and, by the time IBM got around to developing their official VGA replacement, the Extended Graphics Array (XGA) in 1990, they were no longer leading the thechnology, and software developers didn't adopt it as readily.

My family's first computer, which they bought in 1991, had a VGA which was already obsolete when we bought it. I was stuck with its inferior graphics until we got a new computer some time after 1995, long after SVGA had taken over. Most MS-DOS games maxed out at 320x200 with 256 colors and I ran Windows 3 at 640x480 with 16 colors. This wasn't too bad however, since there was no agreed upon VGA+ standard between 1987 and 1995, developers were hesitant to use better graphics cards since only a handful of people actually had them, so most software continued to support the obsolete VGA standard. It wasn't until Windows 95 came out that increasing standards became universal.


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.

Although this is the default color set, the entire palette could be customized. Each index can be made up of red, green, and blue intensities ranging from 0-63 (6-bit). It was common for games developed for the VGA platform to have palette files among their resources which would be exactly 768 bytes in size, enough bytes to define an RGB intensity for each index. 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.


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 720x400 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

Though they weren't officially supported, VGA could also be programmed to accept all sorts of variation within its text modes. For example, changing the character size from 9x16 to 8x10 would result in a character resolution of 90x40.

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.