In the old days, there was the Hercules graphics cards (HGC). It had a whopping 64KB of memory - more than most - and was all but unsupported by game developers. Still, it was possible to make your CGA games run on your Hercules card by installing a memory-resident program. How did that work?

CGA Games on a Hercules card

My first PC, an 8088 XT, had a Hercules graphics card, said to be the cream of the crop. But not so for a kid wanting to play games, because it wouldn’t run any, except the ones running in text mode. All the cool stuff like Pango, Digger, Leisure Suit Larry and Space Quest would pass me by. If you ran a graphical game, your screen would go black and you would hear the game’s sound through the PC speaker only. Torture!

Then somebody passed me a disk containing a magical program, mg.com. “Run it before you start a game,” they said, “and it will work.” And it did! CGA graphics now appeared on my Hercules-powered monitor in black and white glory, and with horrible dithering. But it worked!

King's Quest II running on Hercules

But why did this work? What is the magic that mg.com performed behind the scenes? It was a terminate-and-stay-resident program (TSR). You ran it, and it remained active for the rest of your PC session.

How it works

The CGA card - which most games tended to support on the IBM PC - had 16 KB of memory. The Hercules card was way more powerful: it had a whopping 64KB of memory, which was because its designer had wanted it to support loadable character sets in order to support Thai characters. But it wasn’t compatible with CGA!

CGA games would put their pixels in graphics memory at address 0xb8000, while the Hercules’s base address was at 0xb0000. Not only would the Hercules not see the pixels at the CGA address, but they would also be in an incorrect format (Hercules is black and white, while CGA supported four colors). With its large amount of memory, the Hercules card did offer a full graphics mode of 720x348 pixels (!) in contrast to CGA’s 320x200.

Now what mg.com CGA emulator did, was look at whatever information programs wrote to the 0xb8000 memory area, and copy it (with some transformation) to 0xb0000 so the Hercules card would show it. While it worked, it was an operation that had to be done for every frame, sometimes noticeable slowing down the PC.

Limitations

When the emulator copies pixel information from the CGA memory area to the Hercules area, it must apply color and resolution conversions. This process takes time and must happen every frame, and thus there were disadvantages:

  • The computing cycles stolen from the main program slowed down the whole experience. You wouldn’t notice it much while playing Space Quest, but you might when running an action game. As a matter of fact, it would be necessary to drop a few frames here and there just to keep up with the speed of the game.
  • The resultion of the Hercules card is different from CGA, which is why conversion would always introduce blank (vertical lines) as can clearly be seen in the image below.
  • The conversion was so expensive the some implementations would only transfer part of the CGA pixels to Hercules, which resulted in even more missing pixels.

Maniac Mansion running on Hercules

I’ve not found mg.com on the web. Wherever it is now, I’d like to shout a big thank-you to its author. You gave a kid access to all the (adventure) games that shaped him.