IBM PC-Compatible CGA Video Reference

[Copyright 2001,2002,2003 Frank Durda IV, All Rights Reserved.
Mirroring of any material on this site in any form is expressly prohibited.
The official web site for this material is:  http://nemesis.lonestar.org
Contact this address for use clearances: clearance at nemesis.lonestar.org
Comments and queries to this address: web_reference at nemesis.lonestar.org]

In 1981, IBM introduced the IBM Personal Computer, later simply referred to as the IBM PC. The default IBM PC came with a monochrome video system. An upgrade using the IBM Computer Graphics Adapter (CGA) allowed the use of 16 fixed colors for text and four colors (white, black, purple and cyan) for 320x200 color graphics.

The 16 text colors consisted of 8 colors generated from all possible combinations of enabling or disabling the red, green and blue guns of a color Cathode Ray Tube (CRT). In addition to those eight combinations, an additional signal was used to select a low and high intensity display of whatever red-green-blue combination was being displayed. This provides a fixed set of "16" different colors, although one "color" combination is a high-intensity version of black, which in many CGA systems appears identical to a low-intensity black.

As was common with external monitors for other computers on the market at that time (such as the Tandy Radio Shack Model I), the horizontal and vertical sync information was kept separate and provided to the monitor on their own conductors.

In 1984, following improvements in graphics resolution and color depth made by other vendors, IBM introduced the Enhanced Graphics Adapter (EGA), which provided all the capabilities of CGA, but allowed more colors while displaying graphics, and a higher number of pixels (dots) for the graphical displays. EGA continued to use the same connector that was used for CGA, but the signals that are sent to the monitor are different and not compatible with CGA-only monitors. Some monitors can accept both CGA and EGA signals. These usually determine the mode of operation by examining the Vertical sync signal, which has negative polarity in EGA video modes.

EGA/CGA monitors and adapters are not compatible with VGA hardware, introduced in 1986. VGA systems have no separate intensity signal like CGA, nor do they have multiple digital brightness signals like EGA. In VGA, each of the gun color signals (Red, Green and Blue), is variable, or Analog. The stronger the signal sent by the video controller for a given color, the brighter that color is displayed, allowing for a wide range of colors to be allowed by the monitor, even if the early VGA cards did not have sufficient RAM or other components to allow all possible colors to be displayed as one might desire.

CGA and EGA use a D-Subminature 9-pin connector, commonly known as a DB-9. The computer typically has a female socket.

CGA Cabling Pin Assignments

Pin Name Notation Description Level Direction
1
Ground
GND
    Bi-directional
2
Ground
GND
    Bi-directional
3
Red
R
Red Component of a RBG-encoded video signal TTL* (TTL OFF Level for Red gun OFF or TTL ON Level for Red gun ON) To Monitor
4
Green
G
Green Component of a RBG-encoded video signal TTL* (TTL OFF Level for Green gun OFF or TTL ON Level for Green gun ON) To Monitor
5
Blue
B
Blue Component of a RBG-encoded video signal TTL* (TTL OFF Level for Blue gun OFF or TTL ON Level for Blue gun ON) To Monitor
6
Intensity
I
Intensity signal, giving each color an off, medium and high brightness level. The Intensity control affects all guns that are currently on. TTL* (TTL OFF Level for all guns OFF or MEDIUM, TTL ON Level for all guns OFF OR BRIGHT) To Monitor
7
+12 VDC
+
Most monitors do not utilize this supplied power and some computer makers do not provide it. Systems that can generate EGA video modes via the same connector do not provide this voltage. Monitors capable of accepting CGA and EGA can be damaged if this voltage is present.   To Monitor
8
Horizontal Sync
H
Horizontal Sync clock TTL* Positive Polarity To Monitor
9
Vertical Sync
V
Vertical Sync clock TTL* Positive Polarity To Monitor
(Information on printing color tables on color printers can be found here.)

*TTL signals operate in the range 0.0VDC to 5.0VDC. Levels from 0.0VDC to 0.8VDC are considered to be an "OFF" or "0" state. Levels from 2.0VDC and 5.0VDC are considered to be an "ON" or "1" state. Levels between 0.8VDC and 2.0VDC are not defined and their use is not predictable. (Some vendors state that the TTL "ON" state begins at 2.4VDC.)


RGBI Monitor Color Table

Color(s)* Intensity (I) Red (R) Green (G) Blue (B)
Black OFF OFF OFF OFF
Blue OFF OFF OFF ON
Green OFF OFF ON OFF
Cyan (Blue/Green) OFF OFF ON ON
Red OFF ON OFF OFF
Magenta/Purple (Red/Blue) OFF ON OFF ON
Brown/Orange/Yellow (Red/Green) OFF ON ON OFF
White/Gray (Red/Green/Blue) OFF ON ON ON
Black/Gray (Intensity) ON OFF OFF OFF
Bright Blue (Blue/Intensity) ON OFF OFF ON
Bright Green (Green/Intensity) ON OFF ON OFF
Bright Cyan (Blue/Green/Intensity) ON OFF ON ON
Bright Red (Red/Intensity) ON ON OFF OFF
Bright Magenta/Pink/Bright Purple (Red/Blue/Intensity) ON ON OFF ON
Bright Brown/Bright Orange/ Bright Yellow (Red/Green/Intensity) ON ON ON OFF
Bright White (Red/Green/Blue/Intensity) ON ON ON ON
* Various vendors described the color generated by the same combination of signals with different names, largely dependent on the quality of monitor used.

The chrominance and luminance of the low-intensity colors shown in this table may deviate slightly from what a given monitor and CGA adapter produce. In particular, the high intensity black may appear as black, or may appear as a half-intensity white (gray) shade, depending on the equipment.


Clocking differences between CGA and EGA

Mode Dot Clocking Frequency Dot Data Polarity Horizontal Clocking Frequency Horizontal Polarity Vertical Clocking/Refresh Frequency Vertical Polarity Active Dots Active Lines
CGA   Postive 15.75kHz Positive 50Hz Positive 640 200
EGA   Postive 21.8kHz Positive 60Hz Negative 640 350



Related Topics

IBM PC-Compatible EGA Video Reference (HTML)

[Copyright 2001,2002,2003 Frank Durda IV, All Rights Reserved.
Mirroring of any material on this site in any form is expressly prohibited.
The official web site for this material is:  http://nemesis.lonestar.org
Contact this address for use clearances: clearance at nemesis.lonestar.org
Comments and queries to this address: web_reference at nemesis.lonestar.org]


Visit the nemesis.lonestar.org home page and index

Valid HTML 4.01!