Color Graphics Adapter - Standard Graphics Modes

Standard Graphics Modes

CGA offers two commonly-used BIOS graphics modes (sometimes called All-Points Addressable by IBM):

  • 320×200 pixels, as with the 40×25 text mode. In the graphics mode, however, each pixel can be addressed independently. The tradeoff is that only four colors can be displayed at a time. Also, only one of the four colors can be freely chosen from the 16 CGA colors—there are only two official palettes for this mode, differing in the presence or absence of the blue color component:
# Palette 1 Palette 1 in
high intensity
0 default default
1 3 — cyan 11 — light cyan
2 5 — magenta 13 — light magenta
3 7 — white 15 — white (high intensity)
# Palette 0 Palette 0 in
high intensity
0 default default
1 2 — green 10 — light green
2 4 — red 12 — light red
3 6 — brown 14 — yellow
  1. Magenta, cyan, white and background color (any of the 16 colors, black by default).
  2. Red, green, brown/yellow and background color (any of the 16 colors, black by default).
By setting the high-intensity bit, brighter versions of these modes can be accessed.
The 1:1.2 pixel aspect ratio needs to be taken into account when drawing large geometrical shapes on the screen.

BIOS Modes 4 & 5 set up the 320×200 graphics modes. Similar to the text modes, Mode 4 enables the composite color burst bit, Mode 5 disables it. Unlike the text modes, disabling the composite color burst bit (which setting Mode 5 does) in 320×200 affects the colors displayed on an RGB monitor with the IBM CGA card and true compatibles (see below.)

  • 640×200 pixels, as with the 80×25 text mode. All pixels can be addressed independently. This mode is monochrome with a pixel aspect ratio of 1:2.4. By default the colors are black and bright white, but the foreground color can be changed to any other color of the CGA palette. This can be done at runtime without refreshing the screen. The background color cannot be changed from black on a true 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.

In text mode, font bitmap data comes from the character ROM on the card, which is only available to the card itself. In graphics modes, text output by the BIOS uses two separate tables. The first half of the character set (characters numbered 0 through 127, corresponding to 7-bit ASCII with some added graphical symbols) is supplied by a table in the BIOS ROM chip on the computer's mainboard at the fixed address F000:FA6E (the table is still present at this location even in modern PC BIOSes; unlike the font ROM on the CGA card itself that is used for the text modes, this table provides only the "thick" font shapes, not the "thin" ones). The second half of the set (characters numbered 128 through 255, corresponding to the international, block-graphics and mathematics characters) is supplied by the location pointed to by interrupt vector 1F (the vector itself is found at memory address 0000:007C; this is not in fact a real interrupt vector, since the vector does not point to executable machine code, as real interrupt vectors on the PC's Intel 8086 CPU do). The second half of the character set is ordinarily absent (the vector 1F does not point to actual font data), and trying to display it will result in garbage or blank characters. The character data may be placed into memory manually by the user, or by a utility such as GRAFTABL.

Read more about this topic:  Color Graphics Adapter

Famous quotes containing the words standard and/or modes:

    A disposition to preserve, and an ability to improve, taken together, would be my standard of a statesman.
    Edmund Burke (1729–1797)

    In the final analysis, “style” is art. And art is nothing more or less than various modes of stylized, dehumanized representation.
    Susan Sontag (b. 1933)