The Color Graphics Adapter (CGA), originally also called the Color/Graphics Adapter or IBM Color/Graphics Monitor Adapter, introduced in 1981, was IBM's first color graphics card for the IBM PC. It established a de facto computer display standard.
Hardware design The original IBM CGA graphics card was built around the Motorola 6845 display controller, came with 16 kilobytes of video memory built in, and featured several graphics and text modes. The highest display resolution of any mode was 640 × 200, and the highest color depth supported was 4-bit (16 colors). The CGA card could be connected either to a direct-drive CRT monitor using a 4-bit digital (TTL) RGBI interface, such as the IBM 5153 color display, or to an NTSC-compatible television or composite video monitor via an RCA connector. The RCA connector provided only baseband video, so to connect the CGA card to a television set without a composite video input required a separate RF modulator. IBM produced the 5153 Personal Computer Color Display for use with the CGA, but this was not available at release and would not be released until March 1983. Although IBM's own color display was not available, customers could either use the composite output (with an RF modulator if needed), or the direct-drive output with available third-party monitors that supported the RGBI format and scan rate. Some third-party displays lacked the intensity input, reducing the number of available colors to eight, and many also lacked IBM's unique circuitry which rendered the dark-yellow color as brown, so any software that used brown would be displayed incorrectly.
Output capabilities CGA offered several video modes. Graphics modes:
160 × 100 using a 16-color palette, utilizing a specific configuration of the 80 × 25 text mode to make the screen 100 rows. This used 8 bits per pixel (4 bits foreground, 4 bits background), with a total memory use of (160 × 100 × 8) / 8 = 16 kilobytes. 320 × 200 in four colors, chosen from 3 fixed palettes, with high- and low-intensity variants, with color 1 chosen from a 16-color palette. This used 2 bits per pixel, with a total memory use of (320 × 200 × 2) / 8 = 16 kilobytes. 640 × 200 in two colors, one black, one chosen from a 16-color palette. This used one bit per pixel, with a total memory use of (640 × 200) / 8 = 16 kilobytes. Some software achieved greater color depth by utilizing artifact color when connected to a composite monitor. 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) IBM intended that CGA be compatible with a home television set. The 40 × 25 text and 320 × 200 graphics modes are usable with a television, and the 80 × 25 text and 640 × 200 graphics modes are intended for a monitor.
Color palette CGA uses a 4-bit RGBI 16-color gamut, but not all colors are available at all times, depending on which graphics mode is being used. In the medium- and high-resolution modes, colors are stored at a lower bit depth and selected by fixed palette indexes, not direct selection from the full 16-color palette. When four bits are used (for low-resolution mode, or for programming color registers) they are arranged according to the RGBI color model:
The lower three bits represent red, green, and blue color components The fourth "intensifier" bit, when set, increases the brightness of all three color components (red, green, and blue).
These four color bits are then interpreted internally by the monitor, or converted to NTSC colors (see below).
With an RGBI monitor When using a direct-drive monitor, the four color bits are output directly to the DE-9 connector at the back of the card. Within the monitor, the four signals are interpreted to drive the red, green and blue color guns. With respect to the RGBI color model described above, the monitor would translate the digital four-bit color number to some seven distinctive analog voltages in the range from 0.0 to 1.0 for each gun.
Color 6 is treated specially; normally, color 6 would become dark yellow, as seen to the right, but in order to achieve a more pleasing brown tone, special circuitry in most RGBI monitors, starting with the IBM 5153 color display, makes an exception for color 6 and changes its hue from dark yellow to brown by reducing the analogue green signal's amplitude. The exact amount of reduction differed between monitor models: the original IBM 5153 Personal Computer Color Display reduces the green signal's amplitude by about one third, while the IBM 5154 Enhanced Color Display internally converts all 4-bit RGBI color numbers to 6-bit ECD color numbers, which amounts to halving the green signal's amplitude. The Tandy CM-2, CM-4 and CM-11 monitors provide a potentiometer labelled "BROWN ADJ." to adjust the amount of green signal reduction. This "RGBI with tweaked brown" palette was retained as the default palette of later PC graphics standards such as EGA and VGA, which can select colors from much larger gamuts, but default to these until reprogrammed. Later video cards/monitors in CGA emulation modes would approximate the colors with the following formula:
red := 2/3×(colorNumber & 4)/4 + 1/3×(colorNumber & 8)/8 green := 2/3×(colorNumber & 2)/2 + 1/3×(colorNumber & 8)/8 blue := 2/3×(colorNumber & 1)/1 + 1/3×(colorNumber & 8)/8 if (color == 6) green := green * 2/3
which yields the canonical CGA palette:
Note: Color hex values shown are 8-bit RGB equivalents, internally CGA is 4-bit RGBI
With a composite color monitor/television set For the composite output, these four-bit color numbers are encoded by the CGA's onboard hardware into an NTSC-compatible signal fed to the card's RCA output jack. For cost reasons, this is not done using an RGB-to-YIQ converter as called for by the NTSC standard, but by a series of flip-flops and delay lines. Consequently, the hues seen are lacking in purity; notably, both cyan and yellow have a greenish tint, and color 6 again looks dark yellow instead of brown. The relative luminances of the colors produced by the composite color-generating circuit differ between CGA revisions: they are identical for colors 1-6 and 9–14 with early CGAs produced until 1983, and are different for later CGAs due to the addition of additional resistors.
Standard text modes
… excerpt ends here. Continue reading the full article.





