Color Graphics Adapter

CGA ( Color Graphics Adapter, originally also Color / Graphics Adapter or IBM Color / Graphics Monitor Adapter ) was the first, introduced in 1981 by IBM, color-capable graphics card, and the first color graphics card standard for IBM PCs. Until the introduction of EGA he was standard for use in the graphic area. The video RAM had 16,384 bytes. The basic screen resolution of the map was 640 × 200 points. Unlike all other PC graphics standards, but as with most home computers, corresponded to the timing of the CGA card to the TV picture, so that the card could be connected relatively easily and without much loss of detail of the image to a TV or composite monitor. Also in contrast to the other PC graphics standards had the picture on the monitor a relatively wide outer frame that could appear in color by defining a so-called frame color.

Text modes

The CGA card has two reading modes:

  • 40 × 25 characters,
  • 80 × 25 characters.

Both modes have two variants:

  • Foreground and background color can be selected freely for each character individually from a palette of 16 colors,
  • All color codes are converted to shades of gray.

Regardless of the chosen text mode had all characters are represented in an 8 × 8 grid, which disadvantages compared to the monochrome standards MDA and HGC had to be taken into account: the letters looked very grid-like, and the line spacing were so low that descenders ( as with the lower case letters g, j, p, q, y) of the upper case letters of the next line in contact. Among them, of course, suffered the readability, which is why CGA was also rarely used for office applications.

Graphics modes

Standard modes

The CGA card has three video modes:

With a RGBI monitor

Despite the varying color depths in CGA modes, the color information is represented with 4 bits in CGA, which up to 16 different colors. The lower three bits representing red, green, blue, and the last bit of the intensity.

In a RGBI monitor these 4 bits are transmitted unchanged in the DE- 9 connector to the monitor. The monitor used the following formula to the digital values ​​to analog voltages to convert ( 0.0 to 1.0 ):

Red: = 2/3 × ( Number Color & 4) / 4 1/3 × ( Number Color & 8 ) / 8 green: = 2/3 × ( color number & 2) / 2 1/3 × (color number & 8 ) / 8 Blue: = 2/3 × ( Number Color & 1) / 1 1/3 × ( Number Color & 8 ) / 8 Dark yellow 6 # AAAA00 CGA - color 6 is treated differently; with the above formula would lead to a dark yellow. In order to achieve a more pleasing shade of brown, however, there was a special circuit in most RGBI monitors, including the IBM 5153 color display, which bisects the Grunt share:

When color number = 6 then Green: Green = / 2 This " RGBI with custom brown ' palette was also provided by all later standards such as EGA and VGA as the power-up default of the Internal Palettes register and / or DAC registers.

160 × 100 mode with all 16 colors

This mode dominated the responsible CGA cards for the timing Motorola 6845 not official, but he could only be achieved through tricks. This kind of tricks was typical of the early days of game programming:

However, this trick used very few games since 160 × 100 pixels were too little yet. However, an example is the in 2011 released Pac Man clone Paku Paku whose source code is published under Public Domain because of cost.

320 × 200 multi- color mode

In the CGA card, it is also possible to switch the screen structure between the individual pallets and so to seize every range in an image line. Through highly accurate timing can be used simultaneously as the pallets and individual pixels with each CGA color on a screen without range restrictions appeal. This mode is used, for example from the game California Games, if it was done on a great PC with CGA adapters, and 4.77 MHz 8088 processor. On other systems with CGA graphics, however, only four colors were presented simultaneously, since the operation of the multicolor mode here is exactly dependent on the clock frequency of the processor.


The CGA card was offered as an alternative to IBM MDA card in 1981 with the first original IBM PC. She was around 1000 DM expensive of their performance-wise for a professional computer but insufficient: The 2-color resolution was offered by the competing models (Victor Sirius: 800 × 400 pixels ), the 320 × 200 mode was equipped with four colors not well suited for playing games, the 16-color mode could only be controlled with a so-called composite monitor - but that could also be a normal color TV. In addition, since nothing to do from the perspective of that computer purists color with professionalism had (unless for exotic applications such as CAD ), the one year later offered monochrome Hercules card HGC prevailed, and the CGA card played once a supporting role.

This changed in 1984 when the IBM PC AT and the EGA card brought out. In the same train the CGA card was much cheaper and was in the following years as a cheap solution. For emerging in these years "cheap " PCs, which many bought because as a home PC and should be where played, the CGA card was the only alternative. That is the reason why the mid-1980s a lot of PC games - exclusively or optional - appeared for the CGA mode.

In the 320 × 200 mode, the graphics card had two solid pallets of four colors. The first range was ( black by default ), the second from yellow, light green, light red, and (by default) from the colors magenta, turquoise, white and a freely selectable color black. Most games used the first pallet, whereby the typical turquoise magenta look of CGA games is established.

The 160 × 200 mode is not supported by the PC BIOS. Here it was, the graphics processor of the CGA card, the Motorola 6845, be programmed directly. Furthermore, only a few graphics cards support this mode, including the original card from IBM, the card for the IBM PCjr and the Tandy 1000 graphics card, but which in any case did not meet the CGA standard.

Compaq Portable 386 and used in his own Portable III, later discarded resolution of 640x400 as CGA - development.