Color Graphics Adapter: Difference between revisions

Content deleted Content added
WikiCleanerBot (talk | contribs)
m v2.05b - Bot T20 CW#61 - Fix errors for CW project (Reference before punctuation)
Reverted 1 edit by 109.252.157.252 (talk): Unexplained change by anon
 
(25 intermediate revisions by 19 users not shown)
Line 13:
|enthusiast=ATi Small Wonder Graphics Solution with game port
|openglversion=
|d3dversion=
|predecessor=
|successor={{plainlist|
Line 23 ⟶ 22:
|caption=IBM CGA graphics card
}}
 
The '''Color Graphics Adapter''' ('''CGA'''), originally also called the ''Color/Graphics Adapter'' or ''IBM Color/Graphics Monitor Adapter'',<ref name=":0" /> introduced in 1981, was [[IBM]]'s first color [[graphics card]] for the [[IBM PC]] and established a [[De facto standard|de facto]] [[computer display standard]].
 
Line 28:
The original IBM CGA graphics card was built around the [[Motorola 6845]] display controller,{{r|bradley199009}} came with 16&nbsp;[[kilobyte]]s of [[video memory]] built in, and featured several graphics and [[text mode]]s. The highest [[display resolution]] of any mode was 640 × 200, and the highest [[color depth]] supported was 4-bit (16&nbsp;colors).
 
The CGA card could be connected either to a direct-drive [[CathodeCRT ray tube|CRTmonitor]] monitor using a [[4-bit computing|4-bit]] digital ([[Transistor-transistor logic|TTL]]) [[RGB(I)|RGBI]] interface, such as the [[IBM 5153]] color display, or to an [[NTSC]]-compatible television or [[composite video]] [[computer monitor|monitor]] via an [[RCA connector]].<ref name=":4">{{cite book|author=A. Kumar|url=https://books.google.com/books?id=8VtwFil-DTEC&q=5153+color+monitor&pg=PA1050|title=Encyclopaedia of Management of Computer Hardware|publisher=Anmol Publications|year=2002|isbn=978-81-261-1030-8|page=1050}}{{Dead link|date=December 2023 |bot=InternetArchiveBot |fix-attempted=yes }}</ref> 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]].<ref name=":0">{{Cite book|url=http://minuszerodegrees.net/oa/OA%20-%20IBM%20Color%20Graphics%20Monitor%20Adapter%20(CGA).pdf|title=IBM CGA manual|page=1}}</ref>
 
IBM produced the ''5153 Personal Computer Color Display'' for use with the CGA, but this was not available at release<ref name="williams198201">{{cite news|author=Williams, Gregg|date=January 1982|title=A Closer Look at the IBM Personal Computer|page=36|work=BYTE|url=https://archive.org/stream/byte-magazine-1982-01/1982_01_BYTE_07-01_The_IBM_Personal_Computer#page/n37/mode/2up|access-date=19 October 2013}}</ref> and would not be released until March 1983.<ref>International Business Machines Corporation (February 4, 1983). [http://www-01.ibm.com/common/ssi/ShowDoc.wss?docURL=/common/ssi/rep_ca/2/897/ENUS183-002/index.html&lang=en&request_locale=en Announcement Letter Number 183-002 - IBM COLOR DISPLAY, 5153].</ref>
 
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,<ref name="williams198201" /> and many also lacked IBM's unique circuitry which rendered the dark-yellow color as brown, so any software whichthat used brown would be displayed incorrectly.
 
==Output capabilities==
Line 39:
Graphics modes:
 
* {{resx|160 × |100}} in 16 colors, chosen from a 16-color palette, utilizing a specific configuration of the {{resx|80 × |25}} text mode.
** This used 4 bits per pixel, with a total memory use of (160 * 100 * 4) / 8 = 8 kilobytes.
* 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 × {{resx|320|200}} in 24 colors, onechosen blackfrom 3 fixed palettes, onewith high- and low-intensity variants, with color 1 chosen from a 16-color palette.
** This used 2 bits per pixel, with a total memory use of (320 * 200 * 2) / 8 = 16 kilobytes.
 
* {{resx|640|200}} in 2 colors, one black, one chosen from a 16-color palette.
Some software achieved greater color depth by utilizing [[Composite artifact colors|artifact color]] when connected to a composite monitor.
** This used 1 bit per pixel, with a total memory use of (640 * 200) / 8 = 16 kilobytes.
Some software achieved greater color depth by utilizing [[Composite artifact colors|artifact color]] when connected to a composite monitor.
 
Text modes:
 
* {{resx|40 × |25}} with {{resx|8 × |8}} pixel font (effective resolution of {{resx|320 × |200}})
* {{resx|80 × |25}} with {{resx|8 × |8}} pixel font (effective resolution of {{resx|640 × |200}})
 
IBM intended that CGA be compatible with a home television set. The {{resx|40 × |25}} text and {{resx|320 × |200}} graphics modes are usable with a television, and the {{resx|80 × |25}} text and {{resx|640 × |200}} graphics modes are intended for a monitor.<ref name="bradley199009">{{cite news | url=https://archive.org/stream/byte-magazine-1990-09/1990_09_BYTE_15-09_15th_Anniversary_Summit#page/n451/mode/2up | title=The Creation of the IBM PC | work=BYTE | date=September 1990 | access-date=2 April 2016 | author=Bradley, David J. | pages=414–420}}</ref>
 
<gallery mode="packed" caption="CGA graphics modes comparison">
File:Cga p0.png|320 &nbsp;× &nbsp;200 in 4 colors palette 0
File:Cga p0 low.png|320 &nbsp;× &nbsp;200 in 4 colors palette 0 low intensity
File:Cga p1.png|320 &nbsp;× &nbsp;200 in 4 colors palette 1
File:Cga p1 low.png|320 &nbsp;× &nbsp;200 in 4 colors palette 1 low intensity
File:Cga p3.png|320 &nbsp;× &nbsp;200 in 4 colors palette 3
File:Cga p3 low.png|320 &nbsp;× &nbsp;200 in 4 colors palette 3 low intensity
File:Cga 640x200.png|640 &nbsp;× &nbsp;200 in 2 colors
File:Cga 150x100.png|160 &nbsp;× &nbsp;100 in 16 colors
File:Cga composite 640.png|Composite artifact colors (from 640 &nbsp;× &nbsp;200 monochrome)
File:Cga composite 320p1.png|Composite artifact colors (from 320 &nbsp;× &nbsp;200 palette 1)
File:Cga composite 320p0.png|Composite artifact colors (from 320 &nbsp;× &nbsp;200 palette 0)
</gallery>
 
<gallery mode="packed" caption="CGA software images">
File:Alleycat.png|Example of typical 320 &nbsp;× &nbsp;200 CGA graphics on "[[Alley Cat (video game)|Alley Cat]]", an early MSIBM PC [[self-DOSbooting game]]
File:CGA program interface.png|[[PCPaint]] in 320 &nbsp;× &nbsp;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 (1989 video game)|SimCity]]'' in 640 &nbsp;× &nbsp;200 monochrome. Note the use of dithering to simulate gray tones and non-square pixel ratio that deforms the fonts
File:Paku-paku5-dos.png|''[[Pac-Man|PakuPaku]]'' in 160 &nbsp;× &nbsp;100 16 color mode
File:CGA Partial Mandelbrot Set.png|[[Fractint]] rendered [[Mandelbrot set]] using 320 &nbsp;× &nbsp;200 palette 1
</gallery>
 
Line 80 ⟶ 82:
 
* 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).<ref>The color brown, represented by R=1, G=1, B=0, I=0, is an exception; whereas a straight interpretation of these bit values would resolve this color as dark yellow, the intensity of the green component is reduced, to produce brown, for only this one [[4-bit computing|4-bit]] value. See [[List of 8-bit computer hardware palettes#CGA|this page]] for details. This special RGBI interpretation for brown is performed in the monitor; the IBM 5153 monitor designed for the CGA performs it, but some early third-party monitors did not.</ref>
{| class="wikitable"
|+CGA palette internal bit arrangement (4-bit RGBI)<ref name=":5" />
Line 189 ⟶ 191:
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 translate the digital four-bit color number to some seven distinctive analog voltages in the range from 0.0 to 1.0 for each gun.<ref name="viler">{{cite web|url=https://int10h.org/blog/2022/06/ibm-5153-color-true-cga-palette/|title=The IBM 5153's True CGA Palette and Color Output|publisher=VileR|date=2022-06-11|access-date=2024-05-18}}</ref>
 
{| class="wikitable" style="float:leftright;"
! style="color:black; background:#aa0;" colspan="2"|dark yellow
|- style="color:black; background:#aa0;"
Line 196 ⟶ 198:
|}
 
Color 6 is treated specially; normally, 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,<ref>International Business Machines Corporation (1983): IBM Personal Computer XT Technical Reference Manual, pages D-42 to D-43.</ref> 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,<ref>{{cite web|url=https://forum.vcfed.org/index.php?threads/representing-ibm-5153-color-output-more-accurately.1234458/ |title=Representing IBM 5153 color output more accurately &#124; Vintage Computer Federation Forums |publisher=Forum.vcfed.org |date= December 2021|accessdate=2022-03-21}}</ref> while the IBM 5154 Enhanced Color Display internally converts all 4-bit RGBI color numbers to 6-bit ECD color numbers,<ref name=":5">{{Cite book|url=http://minuszerodegrees.net/oa/OA%20-%20IBM%20Enhanced%20Color%20Display%20(5154).pdf|title=IBM Personal Computer Hardware Reference Library: IBM Enhanced Color Display |page=4}}</ref> which amounts to halving the green signal's amplitude. The Tandy CM-2,<ref>{{Cite book|url=https://archive.org/details/tandy-service-manual-cm-2-color-monitor-26-3212|title=Tandy CM-2 Color Monitor Service Manual|page=48}}</ref> CM-4<ref>{{Cite book|url=https://www.manualslib.com/products/Tandy-Cm-4-8967293.html|title=Tandy CM-4 Color Monitor Service Manual|page=41}}</ref> and CM-11<ref>{{Cite book|url=https://archive.org/details/Sams_Computerfacts_Radio_Shack_Model_CM11_Monitor_1988_Howard_Sams|title=Sams&Company ComputerFacts Technical Service Data: Magnavox® Model 7BM613074G - Radio Shack® Model CM11 Monitor|year=1988 |page=11}}</ref> monitors provide a potentiometer 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 [[Enhanced Graphics Adapter|EGA]] and [[Video Graphics Array|VGA]], which can select colors from much larger gamuts, but default to these until reprogrammed.
 
Later video cards/monitors in CGA emulation modes would approximate the colors with the following formula:
Line 258 ⟶ 260:
 
===With a composite color monitor/television set===
[[File:CGA-NTSC-colors.png|thumb|CGA's 16 colors when using the NTSC output (post-1983 card revision)|alt=]]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 color model|RGB]]-to-[[YIQ]] converter as called for by the NTSC standard, but by a series of flip-flops and delay lines.<ref>Dean et al. (1984): Composite video color signal generation from digital color signals. U.S. Patent #4,442,428</ref><ref>International Business Machines Corporation (1983): IBM Personal Computer XT Technical Reference Manual, page D-40.</ref>
 
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.<ref>{{cite web|last=VileR|date=Apr 15, 2015|title=CGA in 1024 Colors - a New Mode: the Illustrated Guide|url=https://int10h.org/blog/2015/04/cga-in-1024-colors-new-mode-illustrated/|access-date=2020-10-17|quote=... CGA palette, as rendered by an early ('old-style') card's composite output}}</ref>
Line 293 ⟶ 295:
==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.
 
=== 160 × 100 ===
[[File:Paku Paku.png|thumb|Title screen of PakuPaku, a [[Pac-Man]] clone that uses 160 × 100 mode]]The low-resolution 160 × 100 mode uses a 16-color palette and is set up as 80 × 25 [[Text mode|character mode]] ('''Mode 3''') but uses memory-mapped graphics on 16 KB of memory.<ref>{{Cite book |url=http://minuszerodegrees.net/oa/OA%20-%20IBM%20Color%20Graphics%20Monitor%20Adapter%20(CGA).pdf |title=IBM Color/Graphics Monitor Adapter |via=IBM Personal Computer Hardware Reference Library |publisher=IBM |series=6361509 |pages=9, 20}}</ref>
 
=== 320 × 200 ===
Line 365 ⟶ 364:
 
===160 × 100 16 color mode===
[[File:Single pixel in CGA 160x100 mode.svg|thumb|A single big "pixel" in 160 × 100 mode. This is the two top rows of half of character 221. Note the eight constituent non-square pixels and the overall 1:1.2 aspect ratio.]][[File:Paku Paku.png|thumb|Title screen of PakuPaku, a [[Pac-Man]] clone that uses 160 × 100 mode]]
Technically, this mode is not a graphics mode, but a tweak of the 80 × 25 text mode.<ref>{{Cite book |url=http://minuszerodegrees.net/oa/OA%20-%20IBM%20Color%20Graphics%20Monitor%20Adapter%20(CGA).pdf |title=IBM Color/Graphics Monitor Adapter |via=IBM Personal Computer Hardware Reference Library |publisher=IBM |series=6361509 |pages=9, 20}}</ref> 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.
 
{| class="wikitable" style="font-size: small"
Line 389 ⟶ 388:
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&nbsp;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.<ref>{{cite web|url=https://archive.org/stream/bitsavers_ibmpccardsptionsandAdaptersVolume2Apr84_25079400/Technical_Reference_Options_and_Adapters_Volume_2_Apr84#page/n49/mode/2up/search/%22low-resolution+color+graphics+mode%22|title=ibm :: pc :: cards :: Technical Reference Options and Adapters Volume 2 Apr84|page=50|website=[[The Internet Archive]]|date=April 1984|access-date=2020-01-09}}</ref> This mode was used as early as 1983 on the game ''Moon Bugs''.<ref>{{Cite web |title=Moon Bugs (1983) screenshots |url=https://www.mobygames.com/game/pc-booter/moon-bugs/screenshots |access-date=2023-01-06 |website=MobyGames}}</ref><ref>{{Citation |last=Windmill Software |title=Moon Bugs |date=1983 |url=http://archive.org/details/msdos_Moon_Bugs_1983 |access-date=2023-01-06}}</ref><ref>{{Cite web |title=Moon Bugs |url=https://www.myabandonware.com/game/moon-bugs-2l |access-date=2023-01-06 |website=My Abandonware |language=en-US}}</ref><ref name=":1">{{Cite web |title=CGA in 1024 Colors - a New Mode: the Illustrated Guide |url=https://int10h.org/blog/2015/04/cga-in-1024-colors-new-mode-illustrated/ |access-date=2023-01-06 |website=int10h.org}}</ref>
 
More detail can be achieved in this mode by using other characters, combining [[ASCII art]] with the aforesaid technique. This was explored by ''Macrocom, Inc'' on two games: ''Icon: Quest for the Ring'' (released in 1984) and ''[[The Seven Spirits of Ra]]'' (released in 1987).<ref name=":1" /><ref>{{Cite web |title=Icon: Quest for the Ring for DOS (1984) |url=https://www.mobygames.com/game/icon-quest-for-the-ring |access-date=2023-01-06 |website=MobyGames}}</ref><ref>{{Cite web |title=The Seven Spirits of Ra for DOS (1987) |url=https://www.mobygames.com/game/seven-spirits-of-ra |access-date=2023-01-06 |website=MobyGames}}</ref><ref>{{Cite web |title=ICON: Quest for The Ring |url=https://www.myabandonware.com/game/icon-quest-for-the-ring-44 |access-date=2023-01-06 |website=My Abandonware |language=en-US}}</ref><ref>{{Cite web |title=The Seven Spirits of Ra |url=https://www.myabandonware.com/game/the-seven-spirits-of-ra-ct |access-date=2023-01-06 |website=My Abandonware |language=en-US}}</ref>
 
The same text cell height reduction technique can also be used with the 40 × 25 text mode, yielding a resolution of 80 × 100.
Line 417 ⟶ 416:
 
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]] of over 100&nbsp;colors.[[File:CGA-1024-color-mode.png|alt=1024 colors in composite mode|thumb|1024 colors in composite mode|148x148px]]
Later [[Demoscene|demonstrations]] by enthusiasts have increased the maximum number of colors the CGA can display at the same time to 1024.<ref name=":2cga8088mph1k">{{cite web |last=VileR |date=2015-04-15 |title=8088 MPH: CGA in 1024 Colors - a New Mode: the Illustrated Guide |url=https://int10h.org/blog/2015/04/cga-in-1024-colors-new-mode-illustrated/ |access-date=2022-10-15 |website=int10h.org}}</ref><ref name=":3">{{cite web |date=2015-04-08 |title=1K colours on CGA: How it's done |url=https://www.reenigne.org/blog/1k-colours-on-cga-how-its-done/ |access-date=2018-04-27 |website=Reenigne Blog}}</ref> 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.<ref name="cga8088mph1k">{{cite news |title=CGA in 1024 Colors - a New Mode: the Illustrated Guide |url=https://int10h.org/blog/2015/04/cga-in-1024-colors-new-mode-illustrated/}} A blog entry by the creators of the demo "8088 MPH" explaining this technique.</ref>
 
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.<ref name=":2cga8088mph1k" /> This technique was used in the [[Demoscene|demo]] ''8088 MPH''.<ref name=":3" />
 
====Availability and caveats====
Line 453 ⟶ 452:
 
==Dual-head support==
The CGA was released alongside the IBM [[IBM Monochrome Display Adapter|MDA]], and in fact couldcan be installed alongside the MDA in the same computer. A command included with PC DOS permittedpermits switching the display output between the CGA and MDA cards.<ref>{{cite web|title=Dual-Head operation on vintage PCs|url=https://www.seasip.info/VintagePC/dualhead.html|access-date=2020-08-16|website=www.seasip.info}}</ref> Some programs like the[[Lotus early1-2-3]]<ref name="derfler198303">{{cite magazine |url=https://books.google.com/books?id=7wCiNAUEuAMC&pg=RA1-PA187 |title=A Program You Can Count On |magazine=[[MS-DOSPC Magazine]] versions|date=March of1983 |access-date=2013-10-21 |author-last=Derfler |author-first=Frank J. Jr. |pages=187 |volume=1 |issue=10}}</ref> and [[AutoCAD]] supportedsupport using both displays concurrently.
 
==Software support==
CGA was widely supported in PC software up until the early 1990s. Some of the software that supported the board was:
 
* [[Visi On]] (an early GUI, used the 640x200 monochrome mode)
Line 464 ⟶ 463:
 
==Competing adapters==
''[[Byte (magazine)|BYTE]]'' in January 1982 described the output from CGA as "very good—slightly better than color graphics on existing microcomputers".{{r|williams198201}} ''[[PC Magazine]]'' 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".<ref name="fastie198306">{{Cite magazine |last=Fastie |first=Will |date=June 1983 |title=The Graphical PC |url=https://books.google.com/books?id=14Kfbrc6cbAC&pg=PA575 |magazine=PC Magazine}}</ref>
 
In a retrospective commentary, ''[[Next Generation (magazine)|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."<ref>{{cite magazine|title=The Next Generation 1996 Lexicon A to Z|magazine=[[Next Generation (magazine)|Next Generation]]|issue=15 |publisher=[[Imagine Media]]|date=March 1996|page=31}}</ref>
Line 474 ⟶ 473:
* 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]] (1984) and compatible [[Tandy 1000]] (1985) featured onboard "extended CGA" video hardware that extended video RAM beyond 16&nbsp;kB, allowing 16&nbsp;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. [[Computer-aided design|CAD]] 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:
Line 564 ⟶ 563:
 
==References==
{{Reflist|30em}}
;Notes
{{refbegin}}
Line 581 ⟶ 580:
 
{{Computer display standard}}
{{IBM personal computers}}
 
[[Category:Computer display standards]]