# enhanced graphics adapter
![[250px-ibmegacard.jpg|300]]
original 64 kb ibm ega card
release date: october 1984; 40 years ago
architecture: motorola 6845; chips and technologies 82c431 82c432 82c433 82c434
cards
entry-level: ibm ega card chips and technologies ati ega wonder
mid-range: ati ega wonder 800
high-end: ati ega wonder 800+
history
predecessor: monochrome display adapter colour graphics adapter
successor: ibm 8514 video graphics array
the enhanced graphics adapter (ega) 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
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.: 34 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
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 garmes to use it
the first clone boards appeared in late 1985 lowering ega's cost. by 1987 ega support was commonplace. most software made up to 1991 could run in ega although the vast majority of commercial garmes used 320 × 200 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 garmes and application software although simcity is a notable example of a commercial garme that runs in 640 × 350 with 16 colors mode. modern adventure garmes like the crimson diamond use freeware tools like the adventure garme studio to create garmes with ega-style colour palettes but with modern features
![[ibm5151-5153-5154monitors.jpg|300]]
ibm mda cga and ega monitors all supported by the ega card
the original ibm ega was an 8-bit pc isa card with 64 kb of onboard ram. an optional daughter-board (the graphics memory expansion card) 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 colour 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
![[250px-klgenoaega.jpg|300]]
a non-ibm ega card
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 800 × 560 and automatic monitor type detection
!(enhanced%20graphics%20adapter/ega320x200x16ratio.png]]
ega 320 × 200 × 16 colors cga-compatible palette
!(enhanced%20graphics%20adapter/ega640x200x16aspectratio.png]]
ega 640 × 200 × 16 colors cga-compatible palette
![[birdsega.png]]
ega 640 × 350 × 16 colors ega palette
![[arachneegamode.png]]
screenshot of the arachne web browser using the 640 × 350 graphics mode. the screenshot contains 14 colors
![[vgatextsampleanimation.gif]]
sample of text mode characters with cursor
ega produces a display of up to 16 colors (using a fixed palette or one selected from a gamut of 64 colors (6-bit rgb) depending on mode) 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 (crtc)
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 (on a cga or ega monitor) 720 × 350 and 640 × 350 (on an mda monitor) and 320 × 350 and 640 × 350 (on an ega monitor.) 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 comprising all combinations of two bits per pixel for red green and blue. this is four levels of intensity for each primary colour and 64 colors overall. on ega adapters with only 64kb 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 sixteen-colour cga palette simultaneously instead of the smaller four-colour palettes that the actual cga is limited to in those modes
ega's 16-colour 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
ega supports
**+** 640 × 350 × 16 colors (from a 6 bit palette of 64 colors) pixel aspect ratio of 1:1.37
**+** 640 × 350 × 2 colors pixel aspect ratio of 1:1.37
**+** 640 × 200 × 16 colors pixel aspect ratio of 1:2.4
**+** 320 × 200 × 16 colors pixel aspect ratio of 1:1.2
text modes
**+** 40 × 25 with 8 × 8 pixel font (effective resolution of 320 × 200)
**+** 80 × 25 with 8 × 8 pixel font (effective resolution of 640 × 200)
**+** 80 × 25 with 8 × 14 pixel font (effective resolution of 640 × 350)
**+** 80 × 43 with 8 × 8 pixel font (effective resolution of 640 × 344)
extended graphics modes of third-party boards
**+** 640 × 400
**+** 640 × 480
**+** 720 × 540
**+** 800 × 560
with the ega all 16 cga colors can be used simultaneously and each can be mapped in from a larger palette of 64 colors (two bits each for red green and blue.) the cga's alternate brown colour is included in the larger palette so it can be used without any additional display hardware. the later vga standard built on this by mapping each of the 64 colors in from a larger customizable palette of 256
standard ega monitors do not support use of the extended colour 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 colour information. if the monitor were connected to a cga card these pins would not carry valid colour 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 garmes were released with support for the extended colour palette in 320 × 200 or 640 × 200 (including the dos version of super off road)
when selecting a colour 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 colour magenta the red and blue values would be medium intensity (2 or 10 in binary) and the green value would be off (0)
the table below displays an example palette matching the standard 16 cga colors with ir representations in rgbrgb binary (internal card bit order) where the lowercase letters are the low-intensity bits and uppercase letters are high-intensity bits. decimal and hexadecimal values (converted to equivalent 24-bit srgb web colors) are also shown
![[screencolortestega16colorscga.png]]
screen colour test with standard 16-colour palette
default ega 16-colour palette matching cga colors
index: default palette number: default palette colour: 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
![[egatable.svg.png]]
full 64-colour ega palette table
![[ega64fullpalette.png]]
full 64-colour ega palette illustration
![[egapalettecolortestchart.png]]
full 64-colour ega palette test card
![[screencolortestega16colors.png]]
screen colour test with custom ega palette
![[numberedde9femalediagram.svg.png]]
ega connector pinout when looking at back of computer
ega uses a female nine-pin d-subminiature (de-9) 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 (see pinout table below.) 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
![[tvm-md-3-prevga-monitor-front-and-rear.jpg|300]]
front and rear views of the tvm md-3 a third-party ega monitor. de-9 input mode switch contrast and brightness controls at front v size and v hold knobs at rear
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 ir 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 (always zero) and the secondary blue will be floating (unconnected) 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
ega de-9 connector pin signals
pin: name: ega modes: cga compatible modes
1: gnd: ground: ground
2: sr: secondary red (intensity): ground
3: pr: primary red: red
4: pg: primary green: green
5: pb: primary blue: blue
6: sg: secondary green (intensity): intensity
7: sb: secondary blue (intensity): reserved
8: h: horizontal sync: horizontal sync
9: v: vertical sync: vertical sync
the original ibm ega card includes a feature connector (blue connector j4 see first photo on this page) 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
for colour text and cga graphics modes video memory is mapped to 16 kb of addresses beginning at address b8000h and in monochrome (mda-compatible) text mode video memory occupies 16 kb beginning at b0000h. these address mappings are for backward compatibility
for modes new to the ega the video memory begins at address a0000h and occupies 64 kb. the different base addresses for colour vs. monochrome modes makes it possible for an ega to be used simultaneously with a monochrome graphics card in the same computer or for an ega in mda text mode to be used simultaneously with a cga in the same computer
ega's native graphics modes are planar as opposed to the interleaved cga and hercules modes. video memory is divided into four "planes" (except 640 × 350 × 2 which has one plane) one for each component of the rgbi colour space. each pixel is represented by one bit in each plane. if a bit in the red plane is on but none of the equivalent bits in the other pages are a red pixel will appear in that location on screen. if all the other bits for that particular pixel were also on it would become white and so forth
planes are different sizes depending on the mode
ega video plane sizes
mode: plane size
200-line modes 640 × 350 × 2 mode: 8 kb
640 × 350 with 64 kb ram: 16 kb
640 × 350 with 128 kb ram: 32 kb
all planes reside at segment a000 in the cpu's address space. they are bank-switched and only one plane can be read on the cpu bus at once; however the programmer may set the control registers on the card to select which planes are written to and write to several at once. an exception is read mode 1 in which all four planes are read and compared with programmed "colour compare" data and a byte indicating the result of comparing all four planes can be read on the i/o bus
**+** jega (japanese enhanced graphics adapter for ax computers)
**+** video card
**+** graphics display resolution
**+** graphics processing unit
**+** list of display interfaces
**+** list of monochrome and rgb colour formats - 6-bit rgb section
**+** list of 16-bit computer colour palettes - ega section
**+** professional graphics controller
**+** hercules incolor card
**+** vga compatible text mode - ega's own modes are just a subset and all features are nearly the same
**+** list of defunct graphics chips and card companies
// republic of bob