Color Graphics Adapter
   HOME

TheInfoList



OR:

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 A graphics card (also called a video card, display card, graphics adapter, VGA card/VGA, video adapter, display adapter, or mistakenly GPU) is an expansion card which generates a feed of output images to a display device, such as a computer mo ...
for the
IBM PC The IBM Personal Computer (model 5150, commonly known as the IBM PC) is the first microcomputer released in the IBM PC model line and the basis for the IBM PC compatible de facto standard. Released on August 12, 1981, it was created by a team ...
and established a
de facto ''De facto'' ( ; , "in fact") describes practices that exist in reality, whether or not they are officially recognized by laws or other formal norms. It is commonly used to refer to what happens in practice, in contrast with '' de jure'' ("by l ...
computer display standard Computer display standards are a combination of aspect ratio, display size, display resolution, color depth, and refresh rate. They are associated with specific expansion cards, video connectors and monitors. History Various computer displa ...
.


Hardware design

The original IBM CGA graphics card was built around the
Motorola 6845 The Motorola 6845, or MC6845, is a display controller that was widely used in 8-bit computers during the 1980s. Originally intended for designs based on the Motorola 6800 CPU and given a related part number, it was more widely used alongsid ...
display controller, came with 16 
kilobyte The kilobyte is a multiple of the unit byte for digital information. The International System of Units (SI) defines the prefix '' kilo'' as 1000 (103); per this definition, one kilobyte is 1000 bytes.International Standard IEC 80000-13 Quant ...
s of
video memory Dynamic random-access memory (dynamic RAM or DRAM) is a type of random-access semiconductor memory that stores each bit of data in a memory cell, usually consisting of a tiny capacitor and a transistor, both typically based on metal-oxid ...
built in, and featured several graphics and
text mode Text mode is a computer display mode in which content is internally represented on a computer screen in terms of characters rather than individual pixels. Typically, the screen consists of a uniform rectangular grid of ''character cells'', each ...
s. The highest
display resolution The display resolution or display modes of a digital television, computer monitor or display device is the number of distinct pixels in each dimension that can be displayed. It can be an ambiguous term especially as the displayed resolution ...
of any mode was 640×200, and the highest
color depth Color depth or colour depth (see spelling differences), also known as bit depth, is either the number of bits used to indicate the color of a single pixel, or the number of bits used for each color component of a single pixel. When referring ...
supported was 4-bit (16 colors). The CGA card could be connected either to a direct-drive CRT monitor using a
4-bit In computer architecture, 4-bit integers, or other data units are those that are 4 bits wide. Also, 4-bit central processing unit (CPU) and arithmetic logic unit (ALU) architectures are those that are based on registers, or data buses of that si ...
digital ( TTL) RGBI interface, such as the IBM 5153 color display, or to an
NTSC The first American standard for analog television broadcast was developed by National Television System Committee (NTSC)National Television System Committee (1951–1953), Report and Reports of Panel No. 11, 11-A, 12–19, with Some supplement ...
-compatible television or
composite video Composite video is an analog video signal format that carries standard-definition video (typically at 525 lines or 625 lines) as a single channel. Video information is encoded on one channel, unlike the higher-quality S-Video (two channe ...
monitor Monitor or monitor may refer to: Places * Monitor, Alberta * Monitor, Indiana, town in the United States * Monitor, Kentucky * Monitor, Oregon, unincorporated community in the United States * Monitor, Washington * Monitor, Logan County, West ...
via an
RCA connector The RCA connector is a type of electrical connector commonly used to carry audio and video signals. The name ''RCA'' derives from the company Radio Corporation of America, which introduced the design in the 1930s. The connectors male plug a ...
. 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 An RF modulator (or radio frequency modulator) is an electronic device whose input is a baseband signal which is used to modulate a radio frequency source. RF modulators are used to convert signals from devices such as media players, VCRs a ...
. 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 which used brown would be displayed incorrectly.


Output capabilities

CGA offered several video modes. Graphics modes: * 160×100 in 16 colors, chosen from a 16-color palette, utilizing a specific configuration of the 80x25 text mode. * 320×200 in 4 colors, chosen from 3 fixed palettes, with high- and low-intensity variants, with color 1 chosen from a 16-color palette. * 640×200 in 2 colors, one black, one chosen from a 16-color palette. 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. File:Cga p0.png, CGA 320×200 in 4 colors palette 0 (red, yellow, green, black background) File:Cga p1.png, CGA 320×200 in 4 colors palette 1 (cyan, magenta, white, black background) File:Cga p3.png, CGA 320×200 in 4 colors 3rd palette (tweaked), (cyan, red, white, black background) File:Cga 640x200.png, CGA 640×200 in 2 colors(1-bit) File:Cga 150x100.png, CGA 160×100 16 color mode(4-bit) File:CGA Partial Mandelbrot Set.png, A partial
Mandelbrot set The Mandelbrot set () is the set of complex numbers c for which the function f_c(z)=z^2+c does not diverge to infinity when iterated from z=0, i.e., for which the sequence f_c(0), f_c(f_c(0)), etc., remains bounded in absolute value. This ...
rendered in CGA palette 1 File:Arachne CGA Mode.svg, Screenshot of
Arachne Arachne (; from , cognate with Latin ) is the protagonist of a tale in Greek mythology known primarily from the version told by the Roman poet Ovid (43 BCE–17 CE), which is the earliest extant source for the story. In Book Six of his ...
displaying its embedded frames and tables test pages in CGA 640×200 mode File:Paku-paku5-dos.png, '' PakuPaku'' in 160×100 16 color mode File:CGA program interface.png,
PCPaint PCPaint was the first IBM PC-based mouse-driven GUI paint program. It was developed by John Bridges and Doug Wolfgram. It was later developed into Pictor Paint. The hardware manufacturer Mouse Systems bundled PCPaint with millions of computer ...
in 320×200 3rd palette low intensity, showing a typical low resolution interface. Note the use of dithering to overcome the CGA palette limitations. File:CGA 640x200 game.png, ''
SimCity ''SimCity'' is an open-ended city-building video game series originally designed by Will Wright. The first game in the series, ''SimCity'', was published by Maxis in 1989 and were followed by several sequels and many other spin-off "''Sim ...
'' in 640×200 monochrome. Note the use of dithering to simulate gray tones and non-square pixel ratio that deforms the fonts.


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).


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 use approximately the following formula to process the digital four-bit color number to analog voltages ranging from 0.0 to 1.0: ''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 Color 6 is treated differently; when using the formula above, color 6 would become ''dark yellow'', as seen to the left, 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 potentiomenter 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 Video Graphics Array (VGA) is a video display controller and accompanying de facto graphics standard, first introduced with the IBM PS/2 line of computers in 1987, which became ubiquitous in the PC industry within three years. The term can now ...
, which can select colors from much larger gamuts, but default to these until reprogrammed.


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

CGA offers four BIOS
text mode Text mode is a computer display mode in which content is internally represented on a computer screen in terms of characters rather than individual pixels. Typically, the screen consists of a uniform rectangular grid of ''character cells'', each ...
s (called alphanumeric or A/N modes in IBM's documentation). In these modes, individual pixels on the screen cannot be addressed directly. Instead, the screen is divided into a grid of character cells, each displaying a character defined in one of two bitmap fonts, "normal" and "thin," included in the card's ROM. The fonts are fixed and cannot be modified or selected from software, only by a jumper on the board itself. Fonts are stored as bitmaps at a color depth of 1-bit, with a "1" representing the character and a "0" representing the background. These colors can be chosen independently, for each character on the screen, from the full 16-color CGA palette. The character set is defined by
hardware code page In computing, a hardware code page (HWCP) refers to a code page supported natively by a hardware device such as a display adapter or printer. The glyphs to present the characters are stored in the alphanumeric character generator's resident read ...
437 __NOTOC__ Year 437 ( CDXXXVII) was a common year starting on Friday (link will display the full calendar) of the Julian calendar. At the time, it was known as the Year of the Consulship of Aetius and Sigisvultus (or, less frequently, year 1190 ...
. The font bitmap data is only available to the card itself, it cannot be read by the CPU. In graphics modes, text output by the BIOS operates by copying text from the font ROM bit-by-bit to video memory.


40×25 mode

40 columns by 25 rows, with each character a pattern of 8×8 dots. The effective screen resolution in this mode is 320×200 pixels (a pixel aspect ratio of 1:1.2.) The card has sufficient video RAM for eight different text pages in this mode. BIOS Modes 0 & 1 are both 40 column text modes. The difference between these two modes can only be seen on a composite monitor, where mode 0 disables the color burst, making all text appear in grayscale. Mode 1 enables the color burst, allowing for color. Mode 0 and Mode 1 are functionally identical on RGB monitors and on later adapters that emulate CGA without supporting composite color output.


80x25 mode

80 columns by 25 rows, with each character still an 8×8 dot pattern, but displayed at a higher scan rate. The effective screen resolution of this mode is 640×200 pixels. In this mode, the card has enough video RAM for four different text pages. BIOS Modes 2 & 3 select 80 column text modes. As with the 40-column text modes, Mode 2 disables the color burst in the composite signal and Mode 3 enables it.


Textmode color

Each character cell stored four bits for foreground and background color. However, in the cards default configuration, the fourth bit of the background color does not set intensity, but sets the blink attribute for the cell. All characters on the screen with this bit set will periodically blink, meaning their foreground color will be changed to their background color so the character becomes invisible. All characters blink in unison. By setting a hardware register, the blink feature can be disabled, restoring access to high-intensity background colors. All blinking characters on the screen blink in sync. The blinking attribute effect is enabled by default and the high-intensity background effect is disabled; disabling blinking is the only way to freely choose the latter eight-color indexes (8-15) for the background color. Notably, the
GW-BASIC GW-BASIC is a dialect of the BASIC programming language developed by Microsoft from IBM BASICA. Functionally identical to BASICA, its BASIC interpreter is a fully self-contained executable and does not need the Cassette BASIC ROM found in the ...
and Microsoft QBASIC programming languages included with MS-DOS supported all the text modes of the CGA with full color control, but did not provide a normal means through the BASIC language to switch the CGA from blink mode to 16-background-color mode. This was still possible however by directly programming the hardware registers using the OUT statement of the BASIC language.


Standard graphics modes

CGA offers graphics modes at three resolutions: 160×100, 320×200 and 640×200. In all modes every pixel on the screen can be set directly, but the color depth for the higher modes does not permit selecting freely from the full 16-color palette.


160x100

The low-resolution 160×100 mode is in fact 80×25 character mode. Because the built-in character ROM contains "graphics" elements, such as a character that has a foreground-colored upper half and a background-colored lower half, and because foreground and background colors can be chosen freely in textmode, a low-resolution but full-color graphical display can be achieved.


320×200

In the medium-resolution 320×200 mode, each pixel is two bits, which select colors from a four-color palette. In mode 4, there are two palettes, and in mode 5 there is a single palette. Several choices can be made by programming hardware registers. First, the selected palette. Second, the intensity – which is defined for the entire screen, not on a per-pixel basis. Third, color 0 (the "background" color) can be set to any of the 16 colors. The specific BIOS graphics mode influences which palettes are available. BIOS Mode 4 offers two palettes: green/red/brown and cyan/magenta/white. As with the text modes 0 and 2, Mode 5 disables the color burst to allow colors to appear in grayscale on composite monitor. However, unlike the text modes, this also affects the colors displayed on an RGBI monitor, altering them to the cyan/red/white palette seen above. This palette is not documented by IBM, but was used in some software.


640×200

In the high-resolution 640×200 mode, each pixel is one bit, providing two colors which can be chosen from the 16-color palette by programming hardware registers. In this mode, the video picture is stored as a simple bitmap, with one bit per pixel setting the color to "foreground" or "background". By default the colors are black and bright white, but the foreground color can be changed to any entry in the 16-color CGA palette. The background color cannot be changed from black on an original IBM CGA card. BIOS Mode 6 sets up the 640×200 graphics mode. This mode disables the composite color burst signal by default. The BIOS does not provide an option to turn the color burst on in 640×200 mode, and the user must write directly to the mode control register to enable it.


Further graphics modes and tweaks

A number of official and unofficial features exist that can be exploited to achieve special effects. * In 320×200 graphics mode, the background color (which also affects the border color), which defaults to black on mode initialization, can be changed to any of the other 15 colors of the CGA palette. This allows for some variation, as well as flashing effects, as the background color can be changed without having to redraw the screen (i.e. without changing the contents of the video RAM). * In text mode, the border color (displayed outside the regular display area and including the
overscan Overscan is a behaviour in certain television sets, in which part of the input picture is shown outside of the visible bounds of the screen. It exists because cathode-ray tube (CRT) television sets from the 1930s through to the early 2000s were ...
area) can be changed from the default black to any of the other 15 colors. * Through precision timing, it is possible to switch to another palette while the video is being output, allowing the use of any one of the six palettes per scanline. An example of this is ''
California Games ''California Games'' is a 1987 sports video game originally released by Epyx for the Apple II and Commodore 64, and ported to other home computers and video game consoles. Branching from their '' Summer Games'' and '' Winter Games'' series, thi ...
'', when run on a stock 4.77 MHz 8088. Running on a faster computer does not produce the effect, as the method the programmers used to switch palettes at predetermined locations is extremely sensitive to machine speed. The same can be done with the background color, as is used to create the river and road in ''
Frogger is a 1981 arcade action game developed by Konami and manufactured by Sega. In North America, it was released by Sega/Gremlin. The object of the game is to direct a series of frogs to their homes by crossing a busy road and a hazardous rive ...
''. Another documented example of the technique is in
Atarisoft Atarisoft was a brand name used by Atari, Inc. in 1983 and 1984 to market video games the company published for home systems made by competitors. Each platform had a specific color attributed by Atarisoft for its game packages. For example, video ...
's port of '' Jungle Hunt'' to the PC. * Additional colors can be approximated using
dithering Dither is an intentionally applied form of noise used to randomize quantization error, preventing large-scale patterns such as color banding in images. Dither is routinely used in processing of both digital audio and video data, and is often ...
. * Using palette 0 at low intensity and dark blue as the background color provides the three primary
RGB The RGB color model is an additive color model in which the red, green and blue primary colors of light are added together in various ways to reproduce a broad array of colors. The name of the model comes from the initials of the three addi ...
colors, as well as brown. Some of these above tweaks can be combined. Examples can be found in several games.


160×100 16 color mode

Technically, this mode is not a graphics mode, but a tweak of the 80×25 text mode. The character cell height register is changed to display only two lines per character cell instead of the normal eight lines. This quadruples the number of text rows displayed from 25 to 100. These "tightly squeezed" text characters are not full characters. The system only displays their top two lines of pixels (eight each) before moving on to the next row. Character 221 of the CGA character set consists of a box occupying the entire left half of the character matrix. (Character 222 consists of a box occupying the entire right half.) Because each character can be assigned different foreground and background colors, it can be colored (for example) blue on the left (foreground color) and bright red on the right (background color). This can be reversed by swapping the foreground and background colors. Using either character 221 or 222, each half of each truncated character cell can thus be treated as an individual pixel—making 160 horizontal pixels available per line. Thus, 160×100 pixels at 16 colors, with an aspect ratio of 1:1.2, are possible. Although a roundabout way of achieving a 16-color graphics display, this works quite well and the mode is even mentioned (although not explained) in IBM's official hardware documentation. More detail can be achieved in this mode by using other characters, combining
ASCII art ASCII art is a graphic design technique that uses computers for presentation and consists of pictures pieced together from the 95 printable (from a total of 128) characters defined by the ASCII Standard from 1963 and ASCII compliant char ...
with the aforesaid technique. The same text cell height reduction technique can also be used with the 40×25 text mode, yielding a resolution of 80×100.


Composite output

Using the composite output instead of an RGBI monitor produced lower-quality video, due to NTSC's inferior separation between luminance and chrominance. This is especially a problem with 80-column text: For this reason, each of the text and graphics modes has a duplicate mode which disables the composite
colorburst Colorburst is an analog video, composite video signal generated by a video-signal generator used to keep the chrominance subcarrier synchronized in a color television signal. By synchronizing an oscillator with the colorburst at the back p ...
, resulting in a black-and-white picture, but also eliminating color bleeding to produce a sharper picture. On RGBI monitors, the two versions of each mode are usually identical, with the exception of the 320×200 graphics mode, where the "monochrome" version produces a third palette.


Extended artifact colors

Programmers discovered that this flaw could be turned into an asset, as distinct patterns of high-resolution dots would turn into consistent areas of solid colors, thus allowing the display of completely new
artifact colors Composite artifact colors is a designation commonly used to address several graphic modes of some 1970s and 1980s home computers. With some machines, when connected to an NTSC TV or monitor over composite video outputs, the video signal enc ...
. Both the standard 320×200 four-color and the 640×200 color-on-black graphics modes could be used with this technique.


Internal operation

''Direct colors'' are the normal 16 colors as described above under "The CGA color palette". ''Artifact colors'' are seen because the composite monitor's NTSC chroma decoder misinterprets some of the luminance information as color. By carefully placing pixels in appropriate patterns, a programmer can produce specific cross-color artifacts yielding a desired new color; either from purely black-and-white pixels in 640×200 mode, or resulting from a ''combination'' of ''direct'' and ''artifact'' colors in 320×200 mode, as seen in these pictures. Image:CGA_CompVsRGB_320p0.png, 320×200 palette 0 Image:CGA_CompVsRGB_320p1.png, 320×200 palette 1 Image:CGA CompVsRGB 640.png, 640×200 Thus, with the choice between 320×200 vs. 640×200 mode, the choice between the two palettes, and one freely-selectable color (the background in 320×200 modes and the foreground in 640×200 mode), it is possible to use many different sets of artifact colors, making for a total
gamut In color reproduction, including computer graphics and photography, the gamut, or color gamut , is a certain ''complete subset'' of colors. The most common usage refers to the subset of colors which can be accurately represented in a given circ ...
of over 100 colors. Later
demonstrations Demonstration may refer to: * Demonstration (acting), part of the Brechtian approach to acting * Demonstration (military), an attack or show of force on a front where a decision is not sought * Demonstration (political), a political rally or prote ...
by enthusiasts have increased the maximum number of colors the CGA can display at the same time to 1024. This technique involves a text mode tweak which quadruples the number of text rows. Certain ASCII characters such as U and ‼ are then used to produce the necessary patterns, which result in non-dithered images with an effective resolution of 80×100 on a composite monitor. A blog entry by the creators of the demo "8088 MPH" explaining this technique.


Availability and caveats

The 320×200 variant of this technique (see above) is how the standard BIOS-supported graphics mode looks on a composite color monitor. The 640×200 variant, however, requires modifying a bit (color burst disable) directly in the CGA's hardware registers. As a result, it is usually referred to as a separate "mode." Being completely dependent on the NTSC encoding/decoding process, composite color artifacting is not available on an RGBI monitor, nor is it emulated by EGA, VGA or contemporary graphics adapters. The modern, games-centric PC emulator
DOSBox DOSBox is a free and open-source emulator which runs software for MS-DOS compatible disk operating systems—primarily video games. It was first released in 2002, when DOS technology was becoming obsolete. Its adoption for running DOS games i ...
supports a CGA mode, which can emulate a composite monitor's color artifacting. Both 640×200 composite mode and the more complex 320×200 variant are supported.


Resolution and usage

Composite artifacting, whether used intentionally or as an unwanted artifact, reduces the effective horizontal resolution to a maximum of 160 pixels, more for black-on-white or white-on-black text, without changing the vertical resolution. The resulting composite video display with "artifacted" colors is sometimes described as a 160×200/16-color "mode", though technically it was a technique using a standard mode. The low resolution of this composite color artifacting method led to it being used almost exclusively in games. Many high-profile titles offered graphics optimized for composite color monitors. '' Ultima II'', the first game in the game series to be ported to IBM PC, used CGA composite graphics. ''
King's Quest I ''King's Quest'' is an adventure game developed by Sierra On-Line and published originally for the IBM PCjr in 1984 and later for several other systems between 1984 and 1989. The game was originally titled ''King's Quest''; the subtitle ''Que ...
'' also offered 16-color graphics on the PC, PCjr and Tandy 1000, but provided a '
RGB The RGB color model is an additive color model in which the red, green and blue primary colors of light are added together in various ways to reproduce a broad array of colors. The name of the model comes from the initials of the three addi ...
mode' at the title screen which would utilize only the ordinary CGA graphics mode, limited to 4 colors. In this mode,
dithering Dither is an intentionally applied form of noise used to randomize quantization error, preventing large-scale patterns such as color banding in images. Dither is routinely used in processing of both digital audio and video data, and is often ...
was employed to simulate extra colors. Image:Microsoft_Decathlon_RGBvsComposite.png, ''Microsoft Decathlon'' - Top: Game in composite mode, Bottom: Game in RGB mode, Left: with RGB monitor, Right: with composite monitor Image:KQ CompVsRGB.png, ''King's Quest'' -Top: Game in composite mode, Bottom: Game in RGB mode, Left: with RGB monitor, Right: with composite monitor Image:Ultima2 CompVsRGB.png, ''Ultima II'' - Left: with RGB monitor, Right: with composite monitor


High color depth

By taking advantage of the artifact colors, the NTSC color clock, and a method similar to that used in the 16-color 160×100 pseudo-graphics mode, it is possible to display over 16 colors in composite monitors. 160 cycles of the NTSC color clock occur during each line's output, so in 40 column mode each pixel occupies half a cycle and in 80 column mode each pixel uses a quarter of a cycle. Limiting the character display to the upper one or two scanlines, and taking advantage of the pixel arrangement in certain characters of the codepage 437, it is possible to display up to 1024 colors. This technique was used in the demo 8088 MPH.


Limitations, bugs and errata

Video timing on the CGA is provided by the
Motorola 6845 The Motorola 6845, or MC6845, is a display controller that was widely used in 8-bit computers during the 1980s. Originally intended for designs based on the Motorola 6800 CPU and given a related part number, it was more widely used alongsid ...
video controller. This integrated circuit was originally designed only for character-based alphanumeric (text) displays and can address a maximum of 128 character rows. To realize graphics modes with 200 scanlines on the CGA, the MC6845 is programmed with 100 character rows per picture and two scanlines per character row. Because the video memory address output by the MC6845 is identical for each scanline within a character row, the CGA must use the MC6845's "row address" output (i.e. the scanline within the character row) as an additional address bit to fetch raster data from video memory. This implies that unless the size of a single scanline's raster data is a power of two, raster data cannot be laid out continuously in video memory. Instead, graphics modes on the CGA store the even-numbered scanlines contiguously in memory, followed by a second block of odd-numbered scanlines starting at video memory position 8,192. This arrangement results in additional overhead in graphics modes for software that manipulates video memory. Even though the MC6845 video controller can provide the timing for
interlaced video Interlaced video (also known as interlaced scan) is a technique for doubling the perceived frame rate of a video display without consuming extra bandwidth. The interlaced signal contains two fields of a video frame captured consecutively. Th ...
, the CGA's circuitry aligns the synchronization signals in such a way that scanning is always progressive. Consequently, it is impossible to double the vertical resolution to 400 scanlines using a standard 15 kHz monitor. The higher bandwidth used by 80-column text mode results in random short horizontal lines appearing onscreen (known as "snow") if a program writes directly to video memory during screen drawing. The BIOS avoids the problem by only accessing the memory during horizontal retrace, or by temporarily turning off the output during scrolling. While this causes the display to flicker, IBM decided that doing so was better than snow. The "snow" problem does not occur on any other video adapter, or on most CGA clones. In the 80-column text mode, the pixel clock frequency is doubled, and all synchronization signals are output for twice the number of clock cycles in order to last for their proper duration. The composite output's color burst signal circuit is an exception: because it still outputs the same number of cycles, now at the doubled clock rate, the color burst signal produced is too short for most monitors, yielding no or unstable color. Hence, IBM documentation lists the 80-column text mode as a "feature" only for RGBI and black-and-white composite monitors. Stable color can still be achieved by setting the border color to brown, which happens to produce a phase identical to the correct color burst signal and serves as a substitute for it.


Dual-head support

The CGA was released alongside the IBM MDA, and in fact could be installed alongside the MDA in the same computer. A command included with PC DOS permitted switching the display output between the CGA and MDA cards. Some programs like the early
MS-DOS MS-DOS ( ; acronym for Microsoft Disk Operating System, also known as Microsoft DOS) is an operating system for x86-based personal computers mostly developed by Microsoft. Collectively, MS-DOS, its rebranding as IBM PC DOS, and a few o ...
versions of
AutoCAD AutoCAD is a commercial computer-aided design (CAD) and drafting software application. Developed and marketed by Autodesk, AutoCAD was first released in December 1982 as a desktop app running on microcomputers with internal graphics controllers. ...
supported using both displays concurrently.


Software support

CGA was widely supported in PC software up until the 1990s. Some of the software that supported the board was: * Visi On (an early GUI, used the 640x200 monochrome mode) *
Windows 3.0 Windows 3.0 is the third major release of Microsoft Windows, launched in 1990. It features a new graphical user interface (GUI) where applications are represented as clickable icons, as opposed to the list of file names seen in its predeces ...
(and earlier versions, supported the 640x200 monochrome mode ) * OS/2 1.1 (and earlier versions) * Graphics Environment Manager (GEM)


Competing adapters

''
BYTE The byte is a unit of digital information that most commonly consists of eight bits. Historically, the byte was the number of bits used to encode a single character of text in a computer and for this reason it is the smallest addressable uni ...
'' in January 1982 described the output from CGA as "very good—slightly better than color graphics on existing microcomputers". ''
PC Magazine ''PC Magazine'' (shortened as ''PCMag'') is an American computer magazine published by Ziff Davis. A print edition was published from 1982 to January 2009. Publication of online editions started in late 1994 and have continued to the presen ...
'' disagreed, reporting in June 1983 that "the IBM monochrome display is absolutely beautiful for text and wonderfully easy on the eyes, but is limited to simple character graphics. Text quality on displays connected to the color/graphics adapter ... is at best of medium quality and is conducive to eyestrain over the long haul". In a retrospective commentary, '' Next Generation'' also took a negative view on the CGA, stating, "Even for the time (early 1980s), these graphics were terrible, paling in comparison to other color machines available on the market." CGA had several competitors: * For business and word processing use, IBM provided the Monochrome Display Adapter (MDA) at the same time as CGA. MDA was much more popular than CGA at first. Since a great many PCs were sold to businesses, the sharp, high-resolution monochrome text was more desirable for running applications. * In 1982, the non-IBM
Hercules Graphics Card The Hercules Graphics Card (HGC) is a computer graphics controller made by Hercules Computer Technology, Inc. that combines IBM's text-only MDA display standard with a bitmapped graphics mode. This allows the HGC to offer both high-quality text a ...
(HGC) was introduced, the first third-party video card for the PC. In addition to an MDA-compatible text mode, it offered a monochrome graphics mode with a resolution of 720×348 pixels, higher than the CGA. * Also in 1982 the Plantronics Colorplus board was introduced, with twice the memory of a standard CGA board (32k, compared to 16k). The additional memory can be used in graphics modes to double the color depth, giving two additional graphics modes—16 colors at 320×200 resolution, or 4 colors at 640×200 resolution. * The
IBM PCjr The IBM PCjr (pronounced "PC junior") was a home computer produced and marketed by IBM from March 1984 to May 1985, intended as a lower-cost variant of the IBM PC with hardware capabilities better suited for video games, in order to compete mor ...
(1984) and compatible
Tandy 1000 The Tandy 1000 is the first in a line of IBM PC workalike home computer systems produced by the Tandy Corporation for sale in its Radio Shack and Radio Shack Computer Center chains of stores. Overview In December 1983, an executive with Tandy ...
(1985) featured onboard "extended CGA" video hardware that extended video RAM beyond 16 kB, allowing 16 colors at 320×200 resolution and four colors at 640×200 resolution. Because the Tandy 1000 long outlived the PCjr, the video modes became known as " Tandy Graphics Adapter" or "TGA", and were very popular for games during the 1980s. Similar but less widely used was the Plantronics Colorplus. * In 1984, IBM also introduced the Professional Graphics Controller, a high-end graphics solution intended for e.g.
CAD Computer-aided design (CAD) is the use of computers (or ) to aid in the creation, modification, analysis, or optimization of a design. This software is used to increase the productivity of the designer, improve the quality of design, improve c ...
applications. It was mostly backwards compatible with CGA. The PGC did not see widespread adoption due to its $4,000 price tag, and was discontinued in 1987. Other alternatives: * Paradise Systems introduced in 1984 the first successful CGA-compatible card for MDA monitors. It displayed CGA's 16 colors in shades of monochrome. Because it was hardware-compatible with CGA, the Paradise card did not need special software support or additional drivers. * Another extension in some CGA-compatible chipsets (including those in the
Olivetti M24 The Olivetti M24 is a computer that was sold by Olivetti in 1983 using the Intel 8086 CPU. The system was sold in the United States under its original name by Docutel/Olivetti of Dallas. AT&T and Xerox bought rights to rebadge the system as ...
/ AT&T 6300, the DEC VAXmate, and some
Compaq Compaq Computer Corporation (sometimes abbreviated to CQ prior to a 2007 rebranding) was an American information technology company founded in 1982 that developed, sold, and supported computers and related products and services. Compaq produced ...
and
Toshiba , commonly known as Toshiba and stylized as TOSHIBA, is a Japanese multinational conglomerate corporation headquartered in Minato, Tokyo, Japan. Its diversified products and services include power, industrial and social infrastructure systems, ...
portables) is a doubled vertical resolution. This gives a higher quality 8×16 text display and an additional 640×400 graphics mode. The CGA card was succeeded in the consumer space by IBM's
Enhanced Graphics Adapter 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 ...
(EGA) card, which supports most of CGA's modes and adds an additional resolution (640×350) as well as a software-selectable palette of 16 colors out of 64 in both text and graphics modes.


Specifications


Connector

The Color Graphics Adapter uses a standard DE-9 connector for direct-drive video (to an RGBI monitor). The connector on the card is female and the one on the monitor cable is male.


Signal


See also

*
RGB color model The RGB color model is an additive color model in which the red, green and blue primary colors of light are added together in various ways to reproduce a broad array of colors. The name of the model comes from the initials of the three ad ...
*
Graphics card A graphics card (also called a video card, display card, graphics adapter, VGA card/VGA, video adapter, display adapter, or mistakenly GPU) is an expansion card which generates a feed of output images to a display device, such as a computer mo ...
*
Graphic display resolutions The graphics display resolution is the width and height dimension of an electronic visual display device, measured in pixels. This information is used for electronic devices such as a computer monitor. Certain combinations of width and height ar ...
*
Graphics processing unit A graphics processing unit (GPU) is a specialized electronic circuit designed to manipulate and alter memory to accelerate the creation of images in a frame buffer intended for output to a display device. GPUs are used in embedded systems, m ...
* List of display interfaces *
List of 8-bit computer hardware palettes This is a list of notable 8-bit computer color palettes, and graphics, which were primarily manufactured from 1975 to 1985. Although some of them use RGB palettes, more commonly they have 4, 16 or more color palettes that are not bit nor level c ...
CGA section *
Code page 437 Code page 437 ( CCSID 437) is the character set of the original IBM PC (personal computer). It is also known as CP437, OEM-US, OEM 437, PC-8, or DOS Latin US. The set includes all printable ASCII characters as well as some accented letters ( d ...
* List of defunct graphics chips and card companies


References

;Notes
IBM PC-Compatible CGA Video Reference
– includes technical details
CGA monitor calibration
– Technical information on the IBM 5153 monitor's color decoding and calibration * IBM Personal Computer Hardware Library: Technical Reference (Revised edition, 1983) * This article was originally based on material from the Free On-line Dictionary of Computing.


External links


Colour Graphics Adapter Notes



Representative screenshots of CGA games

User Friendly thread on the use of CGA
{{Computer display standard Computer display standards Graphics cards IBM video hardware Computer-related introductions in 1981