Hercules Graphics Card

Hercules Graphics Card
Release date 1982 (1982)
Architecture Motorola 6845
Cards
Entry-level Hercules Graphics Card
Mid-range Hercules Graphics Card Plus
High-end Hercules InColor Card
History
Predecessor MDA, CGA
Successor Enhanced Graphics Adapter
Original Hercules Graphics Card (1984) with an additional LPT (printer) connector.
ATI Technologies compatible Hercules card from 1986.
HGC-compatible video card.

The Hercules Graphics Card (HGC) is a computer graphics controller made by Hercules Computer Technology, Inc. that combines IBM's text-only MDA display standard with a bitmapped graphics mode. This allows the HGC to offer both high quality text and graphics from a single card. The HGC was very popular, and became a widely supported de facto display standard on IBM PC compatibles connected to a monochrome monitor. The HGC standard was used long after more technically capable systems had entered the market, especially on dual-monitor setups.

History

Background

The IBM Personal Computer was launched in 1981 with the Color Graphics Adapter (CGA) expansion card and the Monochrome Display And Printer Adapter. The CGA offered two basic operating modes: 320×200 pixel (or 40x25 character) low resolution or a 640x200 (or 80×25 characters) pixels high resolution mode. While the low-resolution mode was very comparable to 8-bit home computers of the era, the higher-resolution mode offered a fair advance, used with a suitable RGBI (or RGB) monitor (such as the IBM 5153 Personal Computer Color Display). Still, since by design CGA was able to be connected to cheap composite monitors and even to home TVs (via RF modulator), CGA was limited in resolution; its text modes has a character box size of 8x8 pixels, which made text fairly rough-looking, especially in the vertical direction, which had only one pixel row for descenders.

Simultaneously announced, The Monochrome Display and Printer Adapter (MDPA), often shortened to Monochrome Display Adapter (MDA), which did not support pixel-addressable graphics of any sort, offered a high-quality 80x25 character mode, having a relatively high pixel-resolution of 720x350 (character box size 9x14), that could be used on a monochrome monitor (originally, specifically the IBM 5151 Personal Computer Display).

Due to a continuous single-color phosphor, a digital connection with separate video and sync, and a signal format making no compromises for compatibility with lower resolution (e.g. composite NTSC) displays, monochrome monitors were sharper than CGA color. The MDPA also included a Centronics compatible parallel port for printers, which the CGA did not. Furthermore, a similar printer port was not originally available from IBM on any other card for the IBM PC.

Many imitations were available, but many of them did not include the parallel port, so the video standard became known as "MDA", for "Monochrome Display Adapter", since MDPA was not applicable.

The two video standards were mostly incompatible. Their only compatibility was software compatibility in their text modes when programmed through the BIOS or by direct writing to the video memory after text mode setup through the BIOS. There existed a very rare few text-based programs that did not have capability of running on both , so to be able to run those rare few pieces of software, an IBM PC might have to have both video cards and two separate monitors.[1] Most games only supported CGA, while a few extremely rare business applications only supported MDA. Since business software at the time was text based, most of it could run on either. Most software that used any specific capabilities of either would simply check the system settings for monitor type (via Int 11h), or check the current video mode (via Int 10h), to configure itself appropriately.

Hercules

The Hercules Graphics Card was developed in 1982 by Van Suwannukul, founder of Hercules Computer Technology. The system was created by Suwannukul initially so that he could work on his doctoral thesis on an IBM PC using the Thai alphabet, as Thai was his native language. In 1984, its list price was US$499, although it was often sold for less than the manufacturer's suggested price.[2]

The Graphics Card (HGC) was essentially an MDA-compatible monochrome card with an added all-points-addressable graphics mode. The card connected to IBM's monochrome 5151 monitor or a third-party monitor compatible with the 5151, and it displayed text and graphics in the same 720x350 pixel resolution format, in the same raster format, and at the same horizontal and vertical scan frequencies as the MDA. In the text mode, which the Hercules card reverted to when the PC was reset, it was almost exactly like the IBM MDA and could be treated by software as if it was an MDA. For full MDA compatibility, thr HGC used a 6845 CRT controller (CRTC) chip like the one found on the MDA.[3] The HGC was so compatible with the MDA in this regard that it did not provide its own BIOS ROM and was recognized and operated by the standard PC system board BIOS as an MDA.

The graphics mode of the Hercules card used the same raster format and timing as the MDA text mode, as stated above, but unlike the text mode, it made all pixels addressable. To support this mode, the MDA had a full 64 KB of video RAM16 times the RAM of an MDA (4 KB) and four times the RAM of a CGA card (16 KB). The Hercules graphics mode had a lot in common with the CGA high-resolution (640x200) two-color mode: the video buffer contained a packed-pixel bitmap (eight pixels per byte, one bit per pixel) with the same byte format, including the pixel-to-bit mapping and byte order, as the CGA two-color graphics mode, and the video buffer was split into interleaved banks, each 8 KB in size, as in the CGA graphics modes. However, because in the Hercules graphics mode there were more than 256 scanlines and the display buffer size was nearly 32 KB (instead of 16,000 bytes as in all CGA graphics modes), four interleaved banks were used in the Hercules mode instead of two as in the CGA modes.[4] Also, to represent 720 pixels per line instead of 640 as on the CGA, each scanline had 90 bytes of pixel data instead of 80.

The 64 KB RAM of the HGC could hold two graphics display pages. Either page could be selected for display by setting or resetting a single bit in the Mode Control Register. Another bit, in a configuration register exclusive to the HGC, determined whether the second 32 KB of RAM on the HGC was accessible to the CPU at the base address B8000h. This bit was reset at system reset (e.g. power-on) so that the card would not conflict with a CGA or other color card at address B8000h.

Programming for the Hercules card's native graphics mode was somewhat hindered by a lack of BIOS support and standardization from IBMafter all, the HGC was a competing technology. As stated, the Hercules card was supported as an MDA by the IBM PC BIOS and did not provide its own BIOS ROM (unlike most other video adapters after the MDA and CGA). Therefore, there was no BIOS support for the Hercules graphics mode, unlike all standard CGA, EGA, and VGA graphics modes.[5] At least by December 1983, Hercules cards came with a "GRAPH X" installable program which enhanced the BIOS by adding Hercules graphics-mode support and even geometric drawing primitives.[6] Popular IBM PC programs at the time (such as Lotus 1-2-3 spreadsheet, AutoCAD computer-aided drafting, Pagemaker and Xerox Ventura desktop publishing, and Microsoft Flight Simulator) came with their own drivers to use the Hercules graphics mode.

Though the graphics mode of the Hercules card was not CGA-compatible, it was technically similar enough to the two CGA graphics modes that eventually through the use of third-party drivers (TSRs) it could also work (inoptimally) with most programs written for the CGA card's standard graphics modes. As the Hercules card did not actually have color-generating circuitry, nor could it connect to a color monitor, color appeared as simulated greyscale in varying patterns (in essence, a primitive form of half-toning or dithering.)

Very large numbers of imitations of the Hercules appeared, including generic clones at very low prices, usually without the printer port. Hercules briefly ran ads implying that use of generic clones of the Hercules card could damage the computer.

Long after its prime, the Hercules card continued to be popular for dual-monitor setups alongside another (color) graphics adapter. Certain software detected the presence of both video systems, and used the monochrome display for extra data display, while running the application on the other screenfor example, a CAD work area would be displayed on the main (non-Hercules driven) screen, and a list of drawing commands would be shown on the HGC-driven monochrome screen. Some software debuggers could take advantage of an HGC to run the main program on the color monitor and the debugger on the HGC. Later on, the multi-monitor trick became obsolete with OS-related improvements such as the introduction of GUIs for debug commands as a software analogy for debug command modules.

The dual-monitor capability of the original Hercules card and its imitations (and some successors) came from its emulation of an MDA rather than a CGA. When IBM designed the original two cards for the PC, the MDA and the CGA, it assigned them different I/O and memory address ranges. This made it possible for both cards to be installed and operated in the same computer at the same time. Subsequent video hardware standards from IBMthe EGA and VGAused the same I/O and memory address ranges as the CGA (optionally emulating an MDA in its address ranges or using an additional I/O and memory addresses not used by earlier cards). Therefore, an EGA or a VGA[7] could replace a CGA and operate in color modes, but either could only replace an MDA, and operate alongside another color graphics card, if it was put into MDA-compatible mode, which gave no more display capability than the Hercules graphics card. Two color cards could not operate in color modes at the same time in a PC, PC XT, or PC AT. Therefore, the Hercules card (or, later, a much more expensive EGA operating in a configuration to essentially emulate the Hercules card) was the only way to produce two graphics displays on two monitors at the same time.

Connector

DE9F connector. Using 5V TTL electrical signaling.[8][9]

Horizontal frequency 18.425 ±0.500 kHz, Vertical frequency 50 Hz.[10]

Technical specifications

Original Hercules Graphics Card

Like the IBM Monochrome Display Adapter it improved on, the Hercules Graphics Card had both a parallel printer port and a video output port.[11]

Its text mode could display 80×25 text characters and was MDA-compatible. As such, it rendered characters in a box of 9×14 pixels, of which 7×11 made out the character itself (the other pixels being used for space between character columns and lines). This amounted to markedly clearer text display than the competing CGA adapter could offer. The total theoretical resolution of this text mode was 720×350 pixels. This number is arrived at through multiplying the character width of 9 pixels by the number of text columns possible on screen (80) as well as multiplying the character height of 14 pixels by the number of text lines (25). In the MDA-compatible text mode, however, these pixels were not individually addressable.

The graphics mode simply made all pixels directly addressable. This translated to a resolution of not 720×350, but only 720×348 pixels (at 1 bit per pixel) because, for technical reasons (see below), the screen height had to be a multiple of four. Pixel aspect ratio of 1:1.55.

The Hercules card supported two graphic pages, one at address B0000h and one at address B8000h. The second page could be enabled or disabled by software. When it was disabled, the addresses used by the card did not overlap with those used by color adapters such as CGA or VGA. This made dual-screen operation possible simply through installation of a Hercules card next to, for instance, a VGA adapter.

Later cards

The HGC standard was extended by two later cards.

Hercules also sold the Hercules Color Card (not to be confused with the InColor Card), a CGA-compatible video board. This board could coexist with the HGC and still allow both graphics pages to be used. It would detect when the second graphics page was selected and disable access to its own memory, which would otherwise have been at the same addresses.

Clone boards[12]

Tseng ET-1000 board

Other boards offered Hercules compatibility.

Programming

As part of its commercial packaging, the Hercules Graphics Card included a diskette with HBASIC, an interpreted version of the BASIC computer language that enabled programming graphics on a monochrome monitor.[11] An integrated development environment with the same name (HBasic) has appeared.

In text modes, the memory appears just like an MDA card.[11] The screen has 80×25 chars, so there are 80 ASCII code/attribute pairs per line (160 bytes per line, 2 bytes per symbol). The address of a given screen location in memory is given by the formula:

address = (0xb0000) + ( row * 160 ) + (column * 2)

Video timing on the HGC is provided by the Motorola 6845 video controller. This integrated circuit was originally designed only for character-based alphanumeric (text) displays and can only address a maximum of 128 character rows. To realize a graphics mode with 348 scanlines on the HGC, the MC6845 is programmed with 87 character rows per picture and four scanlines per character row. Because the video memory address output by the MC6845 is identical for each scanline within a character row, the HGC must use the MC6845's "row address" output (i.e. the scanline within the character row) as additional address bits to fetch raster data from video memory. This implies that unless the size of a single scanline's raster data is a power of two, raster data cannot be laid out continuously in video memory. Instead, the lines are interleaved and thus addressing is slightly more complicated. There are 8 pixels per byte, 90 bytes per line. Consecutive lines on the screen are interleaved by 4 lines in memory, so in memory it looks like this:

Screen Line #0 starts at B000:0000

Screen Line #1 starts at B000:2000

Screen Line #2 starts at B000:4000

Screen Line #3 starts at B000:6000

Screen Line #4 starts at B000:005A ...

The memory address that contains a given pixel is given by:

mem = (0xb8000) + ((y&3)<<13)+(y>>2)*90+(x>>3)

This code would set the correct pixel in that byte:

bitwise or contents with (128 >> (x & 7))

CGA Emulation

CGA emulation on a Hercules card could be done almost entirely via hardware, or through software (such as "SIMCGA" PC program) via "brute force" copying of data on a regular interrupt. Hardware emulation was normally something done by programmers of an application, such as a game, as a "quick and dirty" way to add Hercules support. Software emulation was performed by third-party utilities as a way to get graphics programs with only CGA support working on a Hercules.

Hardware emulation was achieved by enabling the second Hercules video page, which would appear at segment B800h just like CGA, and then making it the visible page. The HGC onboard Motorola 6845 would then be reprogrammed to display 80 "columns" of data (640 pixels - each character is an 8×8 dot pattern) instead of the usual 80 (720 - each character is a 9×14 dot pattern). Data was then written just as it would on a real CGA (i.e. the video display was updated by writing to segment B800h) with only minor changes due to the different memory interlacing structure. The advantage of this method was no loss of speed during the emulation: Data did not need to be significantly reformatted from the original CGA data while written, only interlaced differently. The disadvantage was that the image appeared vertically "squashed", as CGA data only used 200 lines of the 350 available.

Software emulation would copy from the CGA video memory location to the Hercules memory location. It would reformat the CGA data (320 or 640 × 200 pixels) to the higher resolution (720 × 348) Hercules. Because of the reformatting of data while copying to completely fill the 720×348 graphics space, and the speed penalty introduced via that method, this introduced an interlacing type of display artifact since the copying could not complete before the beginning of the next display cycle.

Reception

Although it cited flaws in the hardware and software, BYTE called the Hercules Graphics Card "a fine product" that gave owners of monochrome monitors graphics capability.[11] PC Magazine reported successfully running CGA-compatible games on a monochrome display, and using the card with a Columbia MPC.[13]

See also

Notes

  1. Dievendorff, Dick (1981). IBM Personal Computer Questions and Answers. IBM. pp. 9–10.
  2. PC Magazine March 6, 1984 page 5 advertisement
  3. The CGA also uses a 6845 CRTC; EGA and VGA do not.
  4. This foreshadowed the four-bank structure of the two PCjr enhanced graphics modes with a 32 KB display buffer size, which use exactly the same four-way interleaved bank scheme as Hercules graphics.
  5. The CGA 160x100 16-color mode, hinted at by IBM but not fully described or BIOS-supported by them, might be considered an exception. On the other hand, it might not be considered a standard mode, especially since it is implemented with the text/graphics mode bit, in the mode select register of the CGA or compatible card, set for text mode.
  6. Wadlow, Tom "The Hercules Graphics Card", BYTE, Volume 8, Number 12, December 1983. Retrieved on 14 July 2017.
  7. The VGA was orignally a chip on PS/2 motherboards, but later, VGA hardware became available on IBM and third-party ISA cards.
  8. "IBM PC-Compatible EGA Video Reference". 070822 nemesis.lonestar.org
  9. "Monitor Ports". 071105 whitefiles.org
  10. "Industrial monochrome monitors 7" - 14"" (PDF). Archived from the original (PDF) on 2007-02-02. 070822 adm-electronic.de
  11. 1 2 3 4 Wadlow, Tom (December 1983). "The Hercules Graphics Card". BYTE. p. 343. Retrieved 20 October 2013.
  12. VGA Legacy
  13. Machrone, Bill (July 1983). "Three Alternative Graphics Boards". PC Magazine. p. 435. Retrieved 21 October 2013.

References

This article is issued from Wikipedia. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.