Sunday, March 15, 2015

My Complete IBM Important Video Card Collection : The Bedrock of DOS Graphics

In the above photo you can see five graphics cards.   They are the five most important graphics cards ever made for the PC compatibles of the 1980s and early 1990s.  They are, from top left :

1.  IBM Color/Graphics Display Adapter (CGA)
2.  IBM Monochrome Display and Printer Adapter (MDA or sometimes MDPA)
3.  Hercules Graphics Card (Hercules or HGC)
4.  IBM Enhanced Graphics Adapter with Graphics Memory Expansion Card (EGA)
5.  IBM PS/2 Display Adapter (VGA)

These graphics cards defined the graphics standards which DOS programs, not limited to games, used.  They were the only graphics expansion cards that were generally available to any PC compatible with a standard expansion slot that had widespread support.  Other graphics adapters, like the PCjr. Graphics Adapter, the Tandy and Tandy Video II Graphics Adapters, the Multi-Color Graphics Array (MCGA), the Amstrad PC-1512 Graphics Adapter were never released as expansion cards.  Also, except for the original Tandy Graphics Adapter and MCGA, they did not gain widespread support in the market.  Other expansion video cards like the IBM Professional Graphics Adapter and the Hercules Graphics Card Plus and Hercules InColor Card, had some support but it was not nearly as widespread as the canonical five shown above.  There is virtually no support in games.

For the first 13 years of the IBM PC, there was scarcely a DOS program that would not run if you had one of these cards or clone.  They are all 8-bit cards, so they can work on any PC with an ISA slot.  Let me discuss them in order of release :

IBM Monochrome Display and Printer Adapter (MDA or sometimes MDPA)

The first full graphics standard IBM released was the MDA back in 1981 with the introduction of the IBM PC.  It only has 4KB of RAM, an 8KB character ROM (only 4KB used) and can only display 9x14 text in an 80-column mode.  It uses memory addresses B0000-B0FFF and I/O ports at 3B0-3BF

It connected to a special IBM Monitor, the 5151 IBM PC Display.  This was a green-phosphor monochrome monitor designed specifically for this card.  This is why I call it the first full graphics standard, since IBM fully standardized the display at the onset.  Jumpering J1 is not a good idea at all.  J2 will connect to a light pen, but IBM never released a light pen under its own branding.  

This card has an oversized black bracket that was intended for IBM PC Model 5150s with the wider spacing between ISA slots.  This makes it annoying to use in later systems because it can take up two slots.  The back of the board has several hand-soldered thin yellow wires glued down which are commonly seen in complex IBM PCBs to fix mistakes.  

The MDA and CGA cards can coexist in the same system, and this was very useful in older workstations to take advantage of each card's respective strengths.  IBM intentionally designed these cards so their resources do not conflict.  The MDA card must be designated as the primary display in the PC to prevent damage to the IBM 5151 Display.  This is accomplished in a PC or XT or Portable by setting SW1 block switches 5 and 6 to Off.  The On position on the dipswitch blocks for any of these motherboards is always toward the power connector, the Off position is toward the ISA slots.  

On an IBM AT, there is a single switch, SW1, which determines whether the MDA or CGA card is installed.  When set toward the rear of the system, the MDA card is the only adapter installed or the primary video adapter.  When set toward the front of the system, the CGA card is the only adapter installed or the primary video adapter.  The IBM XT/286 and generic AT-class motherboards autodetect the adapter.  

High quality photos of the IBM MDA, CGA and EGA cards are here :

IBM Color/Graphics Display Adapter (CGA)

This card was also available when the IBM PC was first released on August 19, 1981, but unlike the MDA, it did not have a monitor from IBM to go with it.  There were monitors available that could connect to the 9-pin monitor port, but typically did not implement the intensity bit or display color #6 as brown.  The IBM 5153 display was released in 1983, providing the defined standard for the display from an digital RGB input computer monitor.  IBM never released a composite color monitor for the card, so it was connected to both color composite monitors and TVs.  

This card has three headers, P1 is for connecting an RF switch box for the composite signal to display correctly on a TV.  IBM never released one for the CGA, but there may have been third party boxes like the Sup'r II Mod for the Apple II.  P2 is for a light pen.  P3 has a pair of solder pads but no pins.  I soldered pins onto my card.  When the pins are jumpered together, you will see the alternate thin-pixel text font. 

The default font in the CGA's 40 column and 80 column text modes use text characters drawn with double pixels.  This is also the font pattern contained for the first 128 ASCII characters in the PC BIOS for use by programs in graphics modes.  All IBM CGA cards also have a thin font available for text modes only that use text characters drawn with single-pixels, similar to Apple II text.

The IBM CGA card has 16KB of RAM and an 8KB Character ROM (only 4KB used).  In fact, the same exact ROM chip is used for the MDA and CGA cards.  4KB of the chip is used for the MDA font, and the other 2KB is used for the two CGA fonts.  It uses memory addresses B8000-BBFFF and I/O ports at 3D0-3DF

All 100% compatible CGA and MDA cards use an MC6845 CRT Controller.  I have an Epson CGA card that does not and is not quite 100% CGA compatible.  

The CGA card came in two varieties, old and new.  I have one of each, but the one shown in the picture was originally a new card which I converted into an old card.

On a PC or XT or Portable, the default text mode can be set to 40x25 by setting SW1 switch 5 to Off and 6 to On.  This is appopriate to connecting the card to a composite monitor.  For an RGB monitor, you should set the 80x25 text mode to the default by setting SW1 switch 5 to On and 6 to Off.  

Hercules Graphics Card (HGC)

This is the only non-IBM card in this collection, but the graphics mode provided by this card was widely supported in programs and games.  The MDA's text font could not be redefined without burning a replacement character ROM.  Moreover, the pinout for the socket is somewhat different than those for common EPROMs.  Replacing the text font with something appropriate for a non-Latin alphabet was not an easy task until the Hercules Graphics Card came around.  This provided a 720x348 graphics mode in addition to being fully compatible with IBM's MDA card.  The original Hercules card, found here, has a true 6845 CRTC :

J1 is the header for a light pen, but is strangely missing on my card.  My card does have the plated holes, so I may add it back at some point.  

It has 64KB of RAM and a font that is identical in appearance to IBM's MDA font.  It uses memory addresses B0000-BFFFF and I/O ports at 3B0-3BF.  It functions exactly like an MDA card unless the program uses Hercules features.  There may be programs that operate differently depending on whether they detect Hercules or pure MDA, so the MDA above is not wholly redundant.

Some Hercules clones have a jumper or dipswitch to disable the upper 32KB of RAM in hardware to make it more compatible with CGA in a dual monitor system, but true Hercules cards do not.  A true Hercules card can disable the upper 32KB in software.  

IBM Enhanced Graphics Adapter (EGA) with Graphics Memory Expansion Card

This is the only modular card in this set, and it is very, very complex when it comes to options.  The base card has a 16KB ROM and 64KB of RAM.  This allows it to display 350-line text modes and 320x200x16 and 640x200x16 graphics.  Some later programs, however, expect the full 256KB that the EGA can support.  640x350x16/64 graphics require at least 128KB of RAM.  

To install the extra 192KB of RAM onto this card requires the Graphics Memory Expansion Card, shown to the left of the EGA.  It requires twenty-four standard 16K x 4bit chips (150ns or better response time) to fully upgrade the EGA.  The EGA will autodetect the extra RAM, and some later BIOSes will generate beeps if it is not present but will eventually work.  Each row can be populated independently to add 64KB or 128KB or 192KB to the EGA.  The card should be populated with RAM at U18-U25, then U10-U17 and finally U1-U8.  Most third party EGA cards either came with 256KB or could be upgraded to 256KB without a daughterboard.  

It always uses memory addresses at A0000-AFFFF and C0000-C3FFF.  Other EGA cards may use C0000-C7FFF.  It will use B0000-B7FFF if connected to a 5151 Display or B8000-BFFFF to a 5153 or 5154 display.  It always uses I/O ports at 3C0-3CF and will also use 3B0-3BF if connected to a 5151 Display or 3D0-3DF if connected to a 5153 or 5154 Display.  It can use IRQ2 for a vertical retrace interrupt, but few programs used this functionality.  

This card has three jumpers.  P1 determines the type of monitor connected.  If a CGA 5153 monitor is connected, then P1 should be covering pins 2 and 3.  This grounds pin 2 on the DE-9 video connector.  If an EGA 5154 monitor is connected, then P1 should be covering pins 1 and 2.  This allows the secondary red signal to appear on pin 2 of the DE-9 video connector.  P1 is irrelevant when a 5151 MDA monitor is connected.  

P2 is the light pen header, and is wired just like it is on a MDA or CGA card.  P3 changes the default address range of the EGA card.  When connected to pins 1 & 2, the EGA card will be at I/O addresses 3xx, which is the default and required if the EGA is going to be the primary video card in the system.  If the EGA card is going to be the secondary card in the system, P2 must be jumpered to connect pins 2 and 3.  This sets the card to use the hex I/O addresses at 2xx.

J1 and J2 are RCA connectors that do nothing unless something is plugged into the 34-pin header at J4, the EGA feature connector.  IBM never released anything that used the EGA feature connector.  J5 is the connector for the Graphics Memory Expansion Card, the card is supported by the 64 pin header and two plastic stakes on the other end of the card.  

This card can be connected to a 5151 PC Monochrome Display, a 5153 PC Color Display or a 5154 PC Enhanced Color Display.  When connected to a 5151, it emulates the MDA text mode and also provides a 640x350 graphics mode.  When connected to a 5153, it emulates a CGA (not with 100% compatibility) and provides 320x200x16 and 640x200x16 graphics modes.  When connected to a 5154 Enhanced Color Display, 350-line color text modes can be displayed as can the 640x350x16/64 graphics mode.  

In addition to P1 and P2, there is a 4-pin dipswitch accessible from the card's bracket that control its configuration.  The EGA card can work alongside an MDA or CGA card.  It can be the primary or secondary card in the system.  

Here are the settings when the EGA card is set to be the primary card :

On Off Off On 40x25 Color Display Secondary None
Off Off Off On 80x25 Color Display Secondary None Best Option for 5153 Display
On On On Off Enhanced Display Emulation Mode Secondary None
Off On On Off Enhanced Display Hi-Res Mode Secondary None Best Option for 5154 Display
On Off On Off Monochrome Emulation None 40x25 Secondary
Off Off On Off Monochrome Emulation None 80x25 Secondary Best Option for 5151 Display

Here are the settings when the EGA card is set to be the secondary card :

On On On On 40x25 Color Display Primary None
Off On On On 80x25 Color Display Primary None Best Option for 5153 Display
On Off On On Enhanced Display Emulation Mode Primary None
Off Off On On Enhanced Display Hi-Res Mode Primary None Best Option for 5154 Display
On On Off On Monochrome Emulation None 40x25 Primary
Off On Off On Monochrome Emulation None 80x25 Primary Best Option for 5151 Display

The Notes give the best option when the EGA card is connected to the monitor.  For the IBM card, the On position is when the switch is closest to the PCB and the Off position is when the switch is furthest away from the PCB.  

On a PC, XT or Portable, you must set SW1 switches 5 and 6 to On with an EGA, VGA or any other graphics adapter with a BIOS expansion ROM (including IBM's Professional Graphics Adapter).  AT class machines do not need have or need any switches for these cards to function.

IBM PS/2 Feature Adapter (VGA)

This card, as its name implies, was released after the discontinuance of the PC line on April 2, 1987.  It was originally intended to upgrade the IBM PS/2 Model 30's MCGA graphics to VGA graphics.  However, it works fine in an IBM PC, XT, AT or XT/286.  Newer motherboards may throw a few beeps at you before deciding to work with the card.  

This VGA card is a card version of the integrated VGA adapter found in the PS/2 Models 50, 60 and 80. The original VGA was designed around an 8-bit bus and this is the last mainstream graphics card IBM designed for the ISA bus.  When IBM began releasing PC-like (non-MCA) systems again with the PS/1, the video would be integrated onto the motherboard or a third-party 16-bit or 32-bit (S)VGA card would be used.  The VGA card is 100% backwards compatible with MCGA and almost 100% backwards compatible with EGA and MDA.  With CGA backwards compatibility is pretty basic.  

IBM's VGA card has a HD-15 connector, but there is no hole for pin 9.  Your VGA monitor must have no pin 9.  The original IBM monitors which it could connect to are the 8512 (14"/13" viewable) and 8513 (13"/12" viewable) color monitors.  These only support VGA refresh rates and the maximum resolution is 640x480x256 (because of 8514/A, XGA and XGA-2).  It also supports monochrome VGA monitors like the IBM 8503 or 8504 (both 13"/12" viewable) and will autodetect the monitor type.

It has 256KB of RAM and a 32KB EPROM which only uses 24KB.  It has two sets of 44-pin headers at J1 and J2, I have no idea what they were meant for.  I can only suggest that it was intended to upgrade the video memory, similar to the IBM 8154/A Display Adapter's and IBM Image Adapter/A memory expansion boards.  The 26-pin card edge connector on the top of the board is for the VGA feature connector.  I do not believe IBM ever released anything for it.  

This card always uses memory addresses at A0000-AFFFF and C0000-C5FFF.  It also uses 6KB at C6800-C7FFF and 2KB at CA000-CA800.  Other VGA cards just use C0000-C7FFF.  It will use B0000-B7FFF if emulating an MDA or B8000-BFFFF if emulating a CGA.  It always uses I/O ports at 3C0-3CF and will also use 3B0-3BF if emulating an MDA card or 3D0-3DF if emulating a CGA adapter.  It can use IRQ2 for a vertical retrace interrupt, but few programs used this functionality.  CGA emulation is the default for text modes and the B0000-B7FFF address range can be reclaimed for an Upper Memory Block by an Expanded Memory Manager.  


  1. Can you tell whether the quality of displayed graphics by these cards is any good ? For instance when I compare a basic S3 to a 10bit color Matrox using a good monitor such as a 21" Trinitron, the difference is obvious even for a newbie.

  2. For all but the VGA card, the output is purely digital and wholly dependent on the monitor connected to it. If you connect a CGA or EGA card to a Tandy CM-5, the graphics will not be at their best because the CM-5 is a budget monitor.

    For the VGA card, the filtering quality does leave a little something to be desired when the graphics are closely examined. However, because the card is so slow for the software intended to be run on it, I keep it mainly because of its rarity and historical curiosity.

  3. That's indeed a great collection, thanks !

  4. Thanks your blog is awesome.
    thanks for sharing information.