Color Graphics Adapter and the Brown color in IBM 5153 Color Display

Color Graphics Adapter (CGA) and the Brown color in IBM 5153 Color Display

Color Graphics Adapter (CGA) is the first computer display standard. Introduced in 1981 by IBM, CGA was the first color graphic card and the first color display adapter for the IBM PC. In this article we will see how the CGA manage the colors and in particularly the brown and the gray colors.

 

From the CGA graphic card to the CGA compatible monitor (e.g. IBM 5153 Color Display), the color information is carried with 4 signals (4 wires):

  1. RED signal: TTL (0-5V) signal. If GND (0 bit) the RED component is absent, if 5V (1 bit) the RED component is present;
  2. BLUE signal: TTL (0-5V) signal. If GND (0 bit) the BLUE component is absent, if 5V (1 bit) the BLUE component is present;
  3. GREEN signal: TTL (0-5V) signal. If GND (0 bit) the GREEN component is absent, if 5V (1 bit) the GREEN component is present;
  4. INTENSITY signal: TTL (0-5V) signal. If GND (0 bit) the RGB colors are in LOW intensity, if 5V (1 bit) the RGB colors are in HIGH intensity, i.e., they are brighter;

Because the CGA uses 3 TTL signals to carry the RGB (RED, GREEN, BLUE) components, then the number of different possible colors is 2^3 = 8 colors. This 8 colors can be in LOW or in HIGH intensity, then the number of different possible colors doubles, obtaining 16 colors (2^4 = 16).

The CGA supports 16 colors but it’s unable to use the entire palette of 16 colors at the same time. For example, at the resolution of 320×200 pixel only 4 colors can be used. Even worst, at the resolution of 640×200 pixel only 2 colors can be used.

Indeed, the CGA supports three different operating mode each of which supports different resolutions and colors:

  1. Graphics Mode
    1. resolution of 320×200 pixel and 4 colors max.
    2. resolution of 640×200 pixel and 2 colors max.
  2. Text Mode
    1. 40×25 characters with 8×8 pixel font (resolution of 320×200).
    2. 80×25 characters with 8×8 pixel font (resolution of 640×200).
  3. Extended Graphics Mode
    1. resolution of 160×100 pixel and 16 colors max.
    2. artifact colors when using NTSC monitor.

The first graphic mode (resolution of 320×200 pixel and 4 colors) was the most used in games. For example, “Indiana Jones and the Temple of Doom” (1989) or “The Secret of Monkey Island” (1990) looked so in CGA:

The Secret of Monkey Island in CGA

The Secret of Monkey Island in CGA

Indiana Jones and the Temple of Doom in CGA

Indiana Jones and the Temple of Doom in CGA

 

The 4 colors in 320×200, can be chosen from 2 palettes, i.e., the 4 colors can’t be chosen freely from the 16 colors. The 2 palettes are the following:

 

# Palette 0
Palette 0 in High Intensity
(INTENSITY signal is HIGH)
1 Black (#000000) Black (#000000)
2 Green (#00AA00) Light green (#55FF55)
3 Red (#AA0000) Light red (#FF5555)
4 Brown (#AA5500) Yellow (#FFFF55)

 

# Palette 1 Palette 1 in High Intensity
(INTENSITY signal is HIGH)
1 Black (#000000) Black (#000000)
2 Cyan (#00AAAA) Light cyan (#55FFFF)
3 Magenta (#AA00AA) Light magenta (#FF55FF)
4 Light gray (#AAAAAA) White (#FFFFFF)

 

Palette 1 was the most used in software.

In 1981 the IBM’s engineers had to figure how to translate the 4 digital TTL signals (RGBI) in 3 analog signals (RGB) to drive the monitor, i.e., how to interface the digital signals of the CGA graphic card to the monitor. In march 1983 IBM released the IBM 5153 Color Display that was able to display the entire palette of CGA (16 colors) with two colors, the brown and the dark gray, that, until that moment, no other third parties monitor were able to display. Indeed, until the IBM 5153 Color Display was released, the compatible monitors translated the 4 TTL signals RGBI in the 3 analog RGB signals as the following (Hypothesis: RGB analog signal are between 0V and 1V):

 

# I R G B Vred Vgreen
Vblue
Color
0 0 0 0 0 0 0 0 Black (#000000)
1 0 0 0 1 0 0 0.66 Blue (#0000AA)
2 0 0 1 0 0 0.66 0 Green (#00AA00)
3 0 0 1 1 0 0.66 0.66 Cyan (#00AAAA)
4 0 1 0 0 0.66 0 0 Red (#AA0000)
5 0 1 0 1 0.66 0 0.66 Magenta (#AA00AA)
6 0 1 1 0 0.66 0.66 0 Dark Yellow (#AAAA00)
7 0 1 1 1 0.66 0.66 0.66 Light Gray (#AAAAAA)
8 1 0 0 0 0 0 0 Black (#000000)
9 1 0 0 1 0.33 0.33 1 Light Blue (#5555FF)
10 1 0 1 0 0.33 1 0.33 Light Green (#55FF55)
11 1 0 1 1 0.33 1 1 Light Cyan (#55FFFF)
12 1 1 0 0 1 0.33 0.33 Light Red (#FF5555)
13 1 1 0 1 1 0.33 1 Light Magenta (#FF55FF)
14 1 1 1 0 1 1 0.33 Yellow (#FFFF55)
15 1 1 1 1 1 1 1 White (#FFFFFF)

 

 

Issues: there are 2 black colors while an important color, the brown, is absent. IBM’s engineers, in the IBM 5153 color display, changed the type of conversion so that the black color #8 became gray and the dark yellow color #6 became brown. They inserted an analog circuit inside the monitor to halve the green voltage component when the sequence I=0, R=1, G=1, B=0 was in input. Moreover, the circuit yielded an output different from 0V when RGB=0 and I=1 was in input.

The circuit that makes tha magic is visible in the “IBM Color Display – Hardware Reference” at page 6 (below only the part of the circuit that makes the conversion).

 

IBM 5153 conversion circuit

IBM 5153 conversion circuit

 

The REAL palette of the CGA with brown and grey is the following:

 

# I R G B Vred
Vgreen
Vblue
Color
0 0 0 0 0 0 0 0 Black (#000000)
1 0 0 0 1 0 0 0.66 Blue (#0000AA)
2 0 0 1 0 0 0.66 0 Green (#00AA00)
3 0 0 1 1 0 0.66 0.66 Cyan (#00AAAA)
4 0 1 0 0 0.66 0 0 Red (#AA0000)
5 0 1 0 1 0.66 0 0.66 Magenta (#AA00AA)
6 0 1 1 0 0.66 0.33 0 Brown (#AA5500)
7 0 1 1 1 0.66 0.66 0.66 Light Gray (#AAAAAA)
8 1 0 0 0 0.33 0.33 0.33 Dark Gray (#555555)
9 1 0 0 1 0.33 0.33 1 Light Blue (#5555FF)
10 1 0 1 0 0.33 1 0.33 Light Green (#55FF55)
11 1 0 1 1 0.33 1 1 Light Cyan (#55FFFF)
12 1 1 0 0 1 0.33 0.33 Light Red (#FF5555)
13 1 1 0 1 1 0.33 1 Light Magenta (#FF55FF)
14 1 1 1 0 1 1 0.33 Yellow (#FFFF55)
15 1 1 1 1 1 1 1 White (#FFFFFF)

 

If you have got a monitor or a conversion card and you aren’t able to see the brown and the dark grey, your monitor or your conversion card aren’t fully compatible with CGA and you lose two important colors. For a graphic software, like a game, this loss is unacceptable.

Even worst if you are trying to play an EGA (Enhanced Graphics Adapter) game or software…we’ll see why in a future article.

 

See you soon!!!


Lascia un commento

Il tuo indirizzo email non sarà pubblicato. I campi obbligatori sono contrassegnati *