Vintage PC pages
Home -> Vintage PCs -> Hercules Graphics Card Plus notes

Hercules Graphics Card Plus: Notes

The Hercules Graphics Card Plus is an extension to the original Hercules Graphics Card, allowing redefinable fonts in text mode.

Hardware requirements

The card is an 8-bit ISA card containing the display controller and a printer port. When present in a computer, it requires the following system resources:

The hardware

Output is from a DE9 socket. The pinout of this socket is:

  1. Ground
  2. Ground
  3. Not used
  4. Not used
  5. Not used
  6. Intensity
  7. Video
  8. Horizontal sync
  9. -Vertical sync

The font rom is marked AMI C15994 FONTROM (the same ROM is used on the Hercules InColor card). As on the original IBM MDA, this is a 9264 rather than a 2764, so it can't be read in a standard EPROM programmer. The memory layout isn't the same as on the MDA, so you can't swap the chip with one from an MDA and expect it to make sense. Both ROMs are divided into four 2k blocks; on the MDA, the font is in blocks 0 and 1, but here it is in blocks 1 and 3.

The card uses the 14-pixel font in the ROM:

[14-pixel Hercules Plus font]

The ROM also contains two 8-pixel fonts (in blocks 0 and 2) which do not appear to be used.

[8-pixel Hercules Plus fonts]

Memory Map

On power-up, the HGC+ behaves like an MDA, producing an 80×25 text screen in white on black. Each character is 9 pixels wide and 14 high, giving a 720×350 pixel resolution. Although the characters are 9 pixels wide, the bitmaps in the ROM (or the RAM) only cover the first 8. For characters 0C0h-0DFh, the ninth pixel column is a duplicate of the eighth; for others, it's blank.

In text mode, the usual MDA-esque scheme is used, with two bytes of RAM for each character. The first byte is the character code, and the second gives the attribute.

The HGC+ outputs four possible combinations of video signal:

VideoIntensityResulting 'colour'
00Black
01Dim
10Normal
11Bright

(Depending on the monitor, dim may display the same as black. On the monitor I used for testing, a dim background looked the same as black, but normal characters on it appeared slightly brighter. I've tried to replicate that on the illustrations below).

On startup, the character attribute scheme behaves like an MDA:

with eight exceptions:

Blink enabledBlink disabled

Register I/O

03B4h: CRTC address register.

Write a CRTC register number (0 to 1Ch) to this port to select the CRTC register that will appear at port 03B5h. Registers 0-11h are standard 6845 registers and are described on the 6845 datasheet.

Registers 14h-16h are used to control the HGC+'s additional features, and are described below.

On the MDA, the CRTC address and data register are partially decoded, so that any even-numbered address between 03B0h and 03B7h will get you the CRTC address register, and any odd-numbered address gets you the data register. I don't know whether this holds for the HGC+.

This is a write-only register.

03B5h: CRTC register read/write.

This gives access to the selected CRTC data register. Most CRTC registers are write only; some are read/write or read-only.

03B8h: Mode Control Register

This is a write-only register. The following bits are used:

Bit 7: Graphics page to display

If bit 7 is 1, the graphics page at 0B8000h is displayed. Otherwise, the page at 0B0000h is displayed.

Bit 5: 1 to enable blinking, 0 to disable it.

If bit 5 is 1, characters with attribute bit 7 set will blink. If not, they will have high intensity background.

Bit 3: 1 to enable video output, 0 to disable it.

If bit 3 is 0, screen output will not be shown. The usual use of this is if you're reprogramming the CRTC registers; disable video output beforehand and re-enable it after.

Bit 1: 1 for graphics mode, 0 for text.

When the card is switched between text and graphics modes, the 6845 must be reprogrammed with suitable parameters for the new mode.

03B9h: Set light pen flip-flop

Any write to this port sets the flip-flop.

03BAh: Status Register

This is a read-only register.

03BBh: Reset light pen flip-flop

Any write to this port resets the flip-flop.

03BFh: Graphics mode enable

This is a write-only register.

Additional CRTC registers

The additional CRTC registers are:

Register 14h: xMode

This is a write-only register, initialised to 0 on reset. The following bits are used:

Bit 0: 0 to use ROM font, 1 to use RAM font.

If the RAM font is selected, character bitmaps are read from 0B4000h. Each bitmap holds 16 bytes per character; the top 14 (normally) are drawn.

Bit 1: 0 for 80-column mode, 1 for 90-column mode.

If this bit is changed, the first four CRTC registers need to be reprogrammed. For 80-column mode, they should be set to 61 50 52 0F, and for 90-column mode they should be set to 6D 5A 5C 0F.

In 90-column mode characters are 8 bits wide, and so there is no special treatment of characters 0C0h-0DFh.

Bit 2: 0 for 4k RAMfont, 1 for 48k RAMfont

In 48k RAMfont mode, the low 4 bits of the attribute byte become a font selector, 0-11 (Values 12-15 render as vertical stripes). This selects the font used for drawing: font 0 is at B4000h, font 1 is at B5000h and so on.

Register 15h: Underline

This is a write-only register, initialised to 0Dh on reset. It only applies in 48k RAMfont mode; it sets the position of the underline for underlined characters. Bits 3-0 give the row (0-15).

Register 16h: Strikethrough

This is a write-only register, initialised to 0Dh on reset. It behaves as underline, for characters with the 'strikethrough' attribute.

Character Attributes

There are two ways the card can interpret character attributes. In normal text mode or in the 4k RAMfont mode, they behave like an MDA (as described above). In the 48k RAMfont mode, the semantics are different. The low 4 bits become a font number, 0-11 (with 12-15 giving characters composed of random vertical stripes) and the high 4 bits give the attribute:

Blink onBit 7=High intensity
Bit 6=Blink
Bit 5=Strikethrough
Bit 4=Underline
Blink offBit 7=Boldface
Bit 6=Reverse video
Bit 5=Strikethrough
Bit 4=Underline

Recommended CRTC values

Hercules graphics cards do not include any form of BIOS extension, and the standard IBM BIOS treats them as an MDA. Consequently, to switch between text and graphics modes (or 80- and 90- column modes), the CRT controller has to be reprogrammed manually. These values should be set at the same time as the text/graphics bit in the Mode Control register, or the 80/90 column bit in the xMode register.

In the tables below, all values are in hexadecimal.

Register80-column text90-column textGraphics
00 Horizontal total616D35
01 Horizontal displayed505A2D
02 Horizontal blanking525C2E
03 Sync width0F0F07
04 Vertical total19195B
05 Vertical adjust060602
06 Vertical displayed191957
07 Vertical sync position191957
08 Interlace and skew020202
09 Max raster0D0D03
0A Cursor start0B0B00
0B Cursor end0C0C00

The manual also provides timing values for different character heights, allowing (for example) a 43-line display with 8-pixel characters. In this situation, a suitable font of the correct height should be loaded into RAM.

RegisterCharacter height
45678 9101112 13141516
04 Vertical total5C4A3D34 2D2824201D1B 191716
05 Vertical adjust02000406 020100070A06 060A02
06 Vertical displayed58463A32 2B26231F1D1A 191715
07 Vertical sync position59463B 332C2723201D 1B191716

The printer port

According to the manual, the printer port can be disabled (if it conflicts with another piece of hardware) by removing the chip marked HCT LP112 adjacent to the port.

The printer port behaves like the one on an MDA:


John Elliott 9 August 2012