Enhanced Graphics Adapter
The Enhanced Graphics Adapter is an IBM PC graphics adapter and de facto computer display standard from 1984 that superseded the CGA standard introduced with the original IBM PC, and was itself superseded by the VGA standard in 1987. In addition to the original EGA card manufactured by IBM, many compatible third-party cards were manufactured, and EGA graphics modes continued to be supported by VGA and later standards.
History
EGA was introduced in October 1984 by IBM, shortly after its new PC/AT. The EGA could be installed in previously released IBM PCs, but required a ROM upgrade on the mainboard.Chips and Technologies' first product, announced in September 1985, was a four-chip EGA chipset that handled the functions of 19 of IBM's proprietary chips on the original Enhanced Graphics Adapter. By that November's COMDEX, more than a half dozen companies had announced EGA-compatible boards based on C&T's chipset. The first EGA-compatible board was Vega in December 1985, released by Video Seven and using C&T's chipset. The Vega was half the length of the original IBM EGA board.
Between 1984 and 1987, several third-party manufacturers produced compatible cards, such as the Autoswitch EGA or Genoa Systems' Super EGA chipset. Later cards supporting an extended version of the VGA were similarly named Super VGA.
The EGA standard was made obsolete in 1987 by the introduction of MCGA and VGA with the PS/2 computer line.
Adoption
By 1985 InfoWorld described EGA as the "next graphics standard", but with "sluggish sales" because of high cost and lack of software support. The magazine said that "market reaction... although positive, has not been overwhelming, in part because the EGA's complexity has slowed software vendors' efforts to support it". Commercial software began supporting EGA soon after its introduction, with The Ancient Art of War, released in 1984. Microsoft Flight Simulator v2.12, ''Jet, Silent Service, and Cyrus, all released in 1985, offered EGA support, along with Windows 1.0. Sierra's King's Quest III, released in 1986, was one of the earliest mainstream PC games to use it.The first clone boards appeared in late 1985, lowering EGA's cost. By 1987, EGA support was commonplace. Most software through the early 1990s could run in EGA, although the vast majority of commercial games used with 16 colors for backward compatibility with CGA and Tandy, and to support users who did not own an enhanced EGA monitor. 350-line modes were mostly used by freeware/shareware games and application software, although SimCity is a notable example of a commercial game that runs in with 16 colors mode. Modern adventure games, like The Crimson Diamond'', use freeware tools like the Adventure Game Studio to create games with EGA-style color palettes but with modern features.
Hardware design
The original IBM EGA was an 8-bit PC ISA card with 64 KB of onboard RAM. An optional daughter-board provided a minimum of 64 KB additional RAM, and up to 192 KB if fully populated with the Graphics Memory Module Kit. Without these upgrades, the card would be limited to four colors in 640 × 350 mode.Output was via direct-drive RGB, as with the CGA, but no composite video output was included. MDA and CGA monitors could be driven, as well as newly released enhanced color monitors for use specifically with EGA.
EGA-specific monitors used a dual-sync design which could switch from the 15.7 kHz of 200-line modes to 21.8 kHz for 350-line modes.
Many EGA cards have DIP switches on the back of the card to select the monitor type. If CGA is selected, the card will operate in 200-line mode and use 8×8 characters in text mode. If EGA is selected, the card will operate in 350-line mode and use 8×14 text.
Some third-party cards using the EGA specification were sold with the full 128 KB of RAM from the factory, while others included as much as 256 KB to enable multiple graphics pages, multiple text-mode character sets, and large scrolling displays. A few third-party cards, such as the ATI Technologies EGA Wonder, built on the EGA standard to additionally offer features such as extended graphics modes as high as and automatic monitor type detection.
Capabilities
EGA produces a display of up to 16 colors at several resolutions up to 640 × 350 pixels, as well as two monochrome modes at higher resolutions. EGA cards include a ROM to extend the system BIOS for additional graphics functions, and a custom CRT controller.The IBM EGA CRTC supports all of the modes of the IBM MDA and CGA adapters through specific mode options, but it is not fully register-compatible with the Motorola MC6845 used in those cards, so software that directly programs the registers to select modes may produce different results on the EGA.
Supported resolutions are 320 × 200 and 640 × 200, 720 × 350 and 640 × 350 and 320 × 350 and 640 × 350. EGA scans at 21.8 kHz when 350-line modes are used and 15.7 kHz when 200-line modes are used. For both horizontal scan rates, the vertical scan rate is 60 Hz.
In the 640 × 350 high-resolution mode, which requires an enhanced EGA monitor, 16 colors can be selected from a palette of 64, comprising all combinations of two bits per pixel for red, green and blue. On EGA adapters with only 64 KB of video RAM, only 4 colors can be selected per pixel. The 640 × 200 and 320 × 200 graphics modes provide backward compatibility with CGA software and monitors, but they can use the entire 16-color CGA palette simultaneously, instead of the smaller 4-color palettes that CGA is limited to in those modes.
EGA's 16-color graphic modes use bit planes and mask registers together with CPU bitwise operations for accelerated graphics. The same techniques went on to be used in the VGA.
Modes
EGA supports:- × 16 colors, pixel aspect ratio of 1:1.37.
- × 2 colors, pixel aspect ratio of 1:1.37.
- × 16 colors, pixel aspect ratio of 1:2.4.
- × 16 colors, pixel aspect ratio of 1:1.2.
- with pixel font
- with pixel font
- with pixel font
- with pixel font
Color palette
Standard EGA monitors do not support use of the extended color palette in 200-line modes, because the monitor cannot distinguish between being connected to a CGA card or being connected to an EGA card outputting a 200-line mode. EGA redefines some pins of the connector to carry the extended color information. If the monitor were connected to a CGA card, these pins would not carry valid color information, and the screen might be garbled if the monitor were to interpret them as such. For this reason, standard EGA monitors will use the CGA pin assignment in 200-line modes, so the monitor can also be used with a CGA card.
Some EGA monitors are switchable, meaning that they can be set up to use the full palette even in 200-line modes, often through a mechanical switch. Only a few commercial games were released with support for the extended color palette in or .
When selecting a color from the EGA palette, two bits are used for the red, green and blue channels to signal values of 0, 1, 2 or 3. For instance, to select the color magenta, the red and blue values would be medium intensity and the green value would be off.
The table below displays an example palette matching the standard 16 CGA colors, with their representations in rgbRGB binary, where the lowercase letters are the low-intensity bits, and uppercase letters are high-intensity bits. Decimal and hexadecimal values are also shown.
| Index | Default palette number | Default palette color | rgbRGB | Hexadecimal |
| 0 | 0 | Black | 000000 | #000000 |
| 1 | 1 | Blue | 000001 | #0000AA |
| 2 | 2 | Green | 000010 | #00AA00 |
| 3 | 3 | Cyan | 000011 | #00AAAA |
| 4 | 4 | Red | 000100 | #AA0000 |
| 5 | 5 | Magenta | 000101 | #AA00AA |
| 20 | 6 | Brown | 010100 | #AA5500 |
| 7 | 7 | White / light gray | 000111 | #AAAAAA |
| 56 | 8 | Dark gray / bright black | 111000 | #555555 |
| 57 | 9 | Bright Blue | 111001 | #5555FF |
| 58 | 10 | Bright green | 111010 | #55FF55 |
| 59 | 11 | Bright cyan | 111011 | #55FFFF |
| 60 | 12 | Bright red | 111100 | #FF5555 |
| 61 | 13 | Bright magenta | 111101 | #FF55FF |
| 62 | 14 | Bright yellow | 111110 | #FFFF55 |
| 63 | 15 | Bright white | 111111 | #FFFFFF |
The following images illustrate the full EGA palette in detail.
Specifications
EGA uses a female nine-pin D-subminiature connector for output, identical to the CGA connector. The signal standard and pinout is backward-compatible with CGA, allowing EGA monitors to be used on CGA cards and conversely.When operating in EGA modes, pins 2, 6 and 7 are repurposed for EGA's secondary RGB signals. When operating in 200-line CGA modes, the EGA card is fully backward compatible with a standard IBM CGA monitor; however, third-party monitors had varying compatibility.
Third-party monitors sometimes connected pin two to ground internally. When connected to an EGA card, this shorts the EGA's secondary red output to ground and can damage the card. Also, some monitors were wired with pin two as their sole ground, and these will not work with the EGA.
Conversely, an EGA monitor should work with a CGA adapter, but if it is not set to CGA mode, the secondary red signal will be grounded, and the secondary blue will be floating, causing all high-intensity colors except brown to display incorrectly, and all colors to potentially have a variable blue tint due to the indeterminate state of the unconnected secondary blue.
The IBM 5154 EGA monitor has a special IBM 5153 CGA compatibility mode when operating with CGA sync signals and automatically changes to the CGA pinout to avoid all of the mentioned problems when operating in this mode.
| Pin | Name | EGA modes | CGA compatible modes |
| 1 | GND | Ground | Ground |
| 2 | SR | Secondary Red | Ground |
| 3 | PR | Primary Red | Red |
| 4 | PG | Primary Green | Green |
| 5 | PB | Primary Blue | Blue |
| 6 | SG | Secondary Green | Intensity |
| 7 | SB | Secondary Blue | Reserved |
| 8 | H | Horizontal sync | Horizontal sync |
| 9 | V | Vertical sync | Vertical sync |
The original IBM EGA card includes a feature connector, providing access to two RCA connectors at the back of card, in addition to several analog and digital signals that the EGA adaptor can be configured to use.
A light pen interface was also present on the original card.