Color Graphics Adapter

from Wikipedia, the free encyclopedia
The 640 × 200 two-color mode with the default foreground color - Arachne Internet suite

CGA (Color Graphics Adapter, originally also Color / Graphics Adapter or IBM Color / Graphics Monitor Adapter) was the first color graphics card introduced by IBM in 1981 and the first color graphics card standard for IBM PCs. Until the introduction of EGA , it was the standard for applications in the graphic area. The video RAM was 16384  bytes . The basic screen resolution of the map was 640 × 200 dots. In contrast to all other PC graphics standards, but as with most home computers , the timing of the CGA card matched that of the television picture, which means that the card could be connected to a television or composite monitor relatively easily and without much loss of detail in the picture . Also in contrast to the other PC graphics standards, the picture on the monitor had a relatively wide outer frame, which could appear colored by specifying a so-called frame color.

Text modes

The CGA card knows two text modes

  • 40 × 25 characters and
  • 80 × 25 characters.

The character set is permanently stored in a ROM and comprises the 256 characters of the IBM character set .

Both modes have two variants each

  • The first has 16 foreground and background colors.
  • In the second there are only 8 background colors, but the symbol can blink.

The character set used an 8 × 8 grid, which had disadvantages compared to the monochrome standards MDA and HGC : The letters looked very grid-like, and the line spacing was so small that descenders (like the lowercase letters g, j , p, q, y) touched the capital letters on the next line. Legibility suffered as a result, which is why CGA was only rarely used for office applications.

Graphic modes

CGA-16 color palette
0 Black
# 000000
8th Black
# 000000
1 Blue
# 0000AA
9 Light blue
# 0000FF
2 Green
# 00AA00
10 Light green
# 00FF00
3 Cyan
# 00AAAA
11 Light cyan
# 00FFFF
4th Red
# AA0000
12 Light red
# FF0000
5 Magenta
# AA00AA
13 Light magenta
# FF00FF
6th Yellow
# AAAA00
14th Light yellow
# FFFF00
7th Light gray
#AAAAAA
15th White
#FFFFFF
CGA pallet 1
background 5 - magenta
3 - cyan 7 - light gray
CGA pallet 2
background 4 - red
2 - green 6 - yellow

Standard modes

The CGA card has two graphics modes:

  • 320 × 200 points with 4 colors (one freely selectable, three determined by one of two color palettes, which can also be selected in high or low intensity),
  • 640 × 200 points with 2 colors (one freely selectable, one fixed on black).

Display on an RGBI monitor

The image was transmitted via a 9-pin Sub-D connector.

Pin code Surname function
1 GND Dimensions
2 GND Dimensions
3 R. red
4th G green
5 B. blue
6th I. Intensive
7th RES unused
8th HSYNC Horizontal synchronization
9 VSYNC Vertical synchronization

TTL levels were used as the signal level.

The signals R, G and B controlled the colors red, green and blue directly. With simultaneous activity of the I signal, its intensity was increased from about 30 cd / m² to about 80 cd / m². In contrast to later graphics cards, R=G=B=0and I=1did not result in a dark gray, but just like R=G=B=0and I=0a deep black.

160 × 100 mode with all 16 colors

The 160 × 100 mode is a text mode and is not supported by the BIOS.

  • Resolution: text matrix 80 × 100, used memory 16000 of 16384 bytes.
  • Flashing deactivated
  • Height of the letters: 2 lines (instead of 8 lines)
  • used characters: Space , , and for every two pixels either in background and foreground color.
  • more characters usable for mixing colors: , and .

Application possible through:

  1. The CGA card was switched to text mode
  2. The video registers were programmed so that the number of lines of text was quadrupled. As a result, only the top two rows of pixels of each character appeared.
  3. The whole text screen was filled with the left bar or right bar sign .
  4. The blinking mode was switched off to get 16 colors instead of 8 non-blinking and 8 blinking colors.
  5. The actual display then only took place by changing the color values ​​of the bar symbols.
Screenshot of Paku Paku, a CGA game that uses the 160 × 100 × 16 mode. (Inner screen)

However, only very few games used this trick, since 160 × 100 pixels were not enough. One example, however, is the Pac-Man clone Paku Paku , which was published in 2011 and whose source code can be viewed as it is published under the public domain .

320 × 200 multicolor mode

With the CGA card, it is also possible to switch between the individual pallets when creating the image and thus use each pallet in an image line. Thanks to very precise timing, the palettes can be used simultaneously and individual pixels can be addressed with each CGA color on one side of the screen without palette restrictions. This mode was used, for example, by the California Games game when it was run on an original PC with a CGA adapter and an 8088 processor at 4.77 MHz. On other systems with CGA graphics, on the other hand, only four colors were displayed at the same time, since the functioning of the multicolor mode depends exactly on the clock frequency of the processor.

history

The CGA card was offered by IBM as an alternative to the MDA card in 1981 with the first original PC from IBM. At that time it was expensive around DM 1000 , but its performance was insufficient for a professional computer: the 2-color resolution was surpassed by the competing devices (Victor Sirius : 800 × 400 pixels), the 320 × 200 mode was with four colors not well suited for games, the 16-color mode had an insufficient resolution even for home computers. Access to the image memory generated image interference in the 80x25 in the form of snow. The IBM BIOS routines completely switched off the screen output while scrolling, which caused violent flickering. Alternatively, the BIOS was not used but the data was written to the image memory during the blanking intervals. Furthermore, at the beginning there were no suitable monitors even from IBM, at that time the television output usually took place as a composite signal or as an RF-modulated signal with poor image quality. Since, from the point of view of the computer purists of the time, color had nothing to do with professionalism (unless for exotic applications such as CAD ), the monochrome Hercules card HGC , offered a year later, prevailed and the CGA card played one for the time being Supporting role.

IBM PC replicas, which were both more powerful and cheaper than the original, almost always used non-IBM graphics cards (e.g. the ATI Graphics Solution). These graphics cards were also significantly more powerful and cheaper than the CGA and MDA cards, more flexible in controlling monitors, more compatible with the IBM CGA and IBM MDA than the IBM EGA cards. They needed less power and were significantly smaller because the replicas developed and used their own VLSI chips.

In 320 × 200 mode, the graphics card had two fixed palettes of four colors each. The first palette consisted of the colors magenta, turquoise, white and a freely selectable color (by default black), the second of yellow, light green, light red and (by default) black. Most games used the first palette, which creates the typical turquoise-magenta look of the CGA games.

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

Compaq used its own, later discarded resolution of 640 × 400 as a CGA further development for its Portable 386 and Portable III.

At the demo party Revision 2015 in the demo "8088 MPH" (by Hornet + CRTC + DESiRE) pictures with 1024 colors at 100 × 80 pixels were generated by clever control of the CGA card. However, for the output z. At the moment an NTSC monitor is absolutely necessary, since the generation of the image signal is involved in a hardware-related manner. As of May 2016, emulators cannot reflect this. Since there were two different CGA versions that differ in the way they generate the image signals, the colors vary depending on the version in question, and it is not possible to display arbitrary pixel combinations.

Web links

Individual evidence

  1. ^ Jason Knight: Paku Paku - A game for early PC / MS-DOS computers. deathshadow.com, accessed on January 16, 2013 (English): " Contents of DEATHSHADOW'S MADNESS © Jason M. Knight unless otherwise noted All code presented on this site is released to the Public Domain. There'll be none of that open source licensing malarkey in here - If you going to give something away, LANDS SAKE JUST GIVE IT AWAY !!! "
  2. https://www.retromaniek.pl/wp-content/uploads/2018/12/Commodore_PC10-PC20_Advanced_Graphics_Adapter.pdf