9

I used to use a CGA emulator (don't remember which one it was), that could show some gfx even in EGA/VGA-only games (when I selected EGA mode). I remember my frustration seeing some garbled graphics and wanting to fix the emulator, but I had no source code then. Obviously some level of emulation is/was possible.

1 Answer 1

17

There can not be an EGA emulator for many reasons.

Emulating CGA works, because in graphics mode, Hercules has a 64k frame buffer at address B0000h - BFFFFh, and for a single page, only 32k from address B0000h is displayed. The CGA has a 16k frame buffer at B8000h - BBFFFh, which fits inside the frame buffer provided by the Hercules card.

Therefore what the CGA emulator TSR has to do is to read the CGA area, and do it's best to convert large 4-bit color pixels into small 1-bit pixels by dithering, and write to the active Hercules area.

The EGA has it's graphics mode frame buffer in the A0000h-AFFFFh area, for which the Hercules card does not provide the memory, so that alone makes it impossible to emulate EGA with Hercules. And because Hercules card by default is in monochrome text mode and has no way of mapping to EGA/VGA addresses, it can actually co-exist in a system with a EGA or VGA card.

12
  • 2
    That exact combination was my setup for development those days. And for clearer graphics I used a monochrome VGA monitor; no games, just professional work. Commented May 4, 2020 at 8:19
  • But I remember clearly the CGA emulator showing something remotely recognizable. I wanted an EGA, but didn't have the $$$. Commented May 4, 2020 at 8:52
  • Are you saying the TSR would "follow behind" the application writes to CGA memory buffer, and clean up those writes to look like a dithered monochrome representation of the intended image? Is that the only way it could work?
    – Brian H
    Commented May 4, 2020 at 17:24
  • 2
    A 386 protected mode driver operating like QEMM could do the emulation bypassing the memory range objection, couldn't it? Bit late for relevance, granted.
    – hobbs
    Commented May 5, 2020 at 1:59
  • 1
    @user1095108 Like hobbs said, the EGA could be virtualized in protected mode and then displayed on Hercules. But protected mode would require at least a 386 CPU. And you can of course run an emulator on DOS and Hercules, that emulates a DOS machine with EGA, same way you can run a DOS emulator on Raspberry Pi, but it was not possible back in the day. Back in the day, most likely if you had only the Hercules adapter, you most likely did not have a 386 either to assist in the emulation, but you still could run CGA games via the TSR.
    – Justme
    Commented May 11, 2020 at 21:57

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .