IBM's CGA and the Commodore 128's RGB video output both use a DE-9 connector. How do I adapt the CGA video output from an IBM XT 5160 or Commodore 128 to a modern monitor?

6 Answers 6


The MCE2VGA, based on Luis Antoniosi’s design, can convert CGA, EGA, MDA and Hercules signals to VGA: connect a TTL output to it, and it will produce a VGA-compatible signal. It can even emulate composite CGA! The first link includes video reviews so you can see it in action.

The successor to the MCE2VGA, the MCE2HDMI, can also produce VGA, using the optional HDMI-to-VGA dongle.


One strategy is to convert the digital to analog, then the analog to VGA.

CGA consists of digital red, green, blue, and intensity (RGBI) 5V signals, plus horizontal (15.75 kHz) and vertical (59.92 Hz) sync. VGA consists of analog red, green and blue signals (0.7V peak to peak), plus horizontal (31.46875 kHz) and vertical (59.94 Hz) sync (RGBHV).

The first step is to convert digital RGBI to analog RGB. This can be done with a simple resistor ladder. The GGLabs CGA2RGB does this conversion, fixes the impedence, and adds composite sync (CSync) to the output.

The GBS-8200 claims to support CGA as input (which implies digital RGBI), but in reality it only supports analog RGB, and it only supports RGBS (using CSync, not HVSync) on signals below VGA frequencies.

The next and final step is to convert HSync from 15.75 kHz to 31+ kHz. A small list of LCD monitors support 15 kHz analog RGB signals directly, but most require something like a GBS-8200, OSSC, or Framemeister XRGB-Mini to do the HSync conversion.

Edit 2018-12-14: See Stephen Kitt's answer above for a new all-in-one solution called the MCE2VGA.

  • 2
    Theoretically, a digital RGBI signal would make a semi-valid analog RGBI signal if the signal source has a very low "0" level and the destination monitor can handle being overdriven. Commented Feb 5, 2018 at 10:36

The easiest approach is probably to convert to a component video signal. If you pass the R, G, B, and I signals through a couple inverting buffers (so you have buffered versions of complemented and non-complemented signals) and formulated a composite sync signal, you could then use resistor dividers to generate Y, U, and V signals which could be fed into a component video input. Component video is allowed to operate down to 15.75Khz, though some monitors may not be totally happy with a non-interlaced signal at that frequency. Producing the composite sync might be as simple as passing the vertical and horizontal sync signals through an XOR gate, or perhaps just using the horizontal sync signal alone (some devices might output a composite sync signal on the horizontal sync pin). Alternatively, some devices that use the 9-pin connector output a composite video signal on pin 7. This is apt to be of very poor quality, but should have an acceptable sync signal.

  • "The easiest approach is probably to convert to a component video signal [because] Component video is allowed to operate down to 15.75Khz" <-- that's a good point. Commented Feb 1, 2018 at 21:43
  • So this Y/U/V you're talking about is the Y/Pb/Pr of a standard consumer component input on a monitor, if it has such?
    – cjs
    Commented Aug 31, 2019 at 2:53
  • And is it normally the case that a monitor that will sync to 15.75 KHz on composite/S-Video/component inputs will not sync to 15.75 KHz on the VGA input?
    – cjs
    Commented Aug 31, 2019 at 3:09
  • @cjs: By YUV., I mean means Y/Pb/Pr. I've seen the Pb and Pr signals referred to as U and V, and at least from a pronunciation standpoint the three-syllable "Y U V" seems easier. As for what VGA inputs will support, monitors shouldn't need to be picky about such things, but at least historically I wouldn't expect monitors to up-scale enough to avoid a scrunched picture at such low scan rates even if they would sync to them. I can't offer any advice about newer monitors because I haven't tested any made within the last 15 years or so with such low-speed signals.
    – supercat
    Commented Feb 8, 2021 at 16:36
  • Both in the past and present many VGA monitors will not accept 15.75 kHz signals, sadly. (I was researching old monitors for just this, a while back.) And I see now that YUV is a standard term.
    – cjs
    Commented Feb 9, 2021 at 6:18

In case you aim for a single box to convert digital RGB video to HDMI, there's boxes around like this that converts from SCART (which is RGB) to HDMI. I use one somilar to the one in the link to connect most of my old comuters (Sinclair Spectrum and QL) to a modern HDMI monitor. If your monitor has USB connectors, you can also conveniently power the converter from there. This gives a nice sharp picture.


If you have a genuine CGA card, it should have a composite video output. I would recommend simply using that. For one, lots of devices still have a composite input, and the cables are very common. One thing that's often forgotten is that, for graphics, CGA composite video looks much better than CGA's notoriously horrible digital graphics. Games written when CGA was common actually look about as good as contemporary Apple and Commodore computers did. Of course, the digital output produced much sharper text.

There are a number of composite-to-HDMI adapters on the market (example, not an endorsement, just the first one I found) which will hopefully produce much nicer looking graphics than converting the digital output. You might even get lucky and get legible text out of your HDMI converter.

I suspect that if you plug the CGA composite output into a monochrome composite monitor you'll get nice sharp text as well.

  • 1
    The composite output of a CGA card can be used to produce artifact colors (where the CGA is programmed to show certain black and white patterns, but composite monitors will turn those into colors) but I've never seen a CGA card whose composite output wasn't absolutely terrible at displaying the colors used by an RGBI monitor.
    – supercat
    Commented Dec 14, 2018 at 22:54
  • Indeed it really depends on whether the game was written for an RGB or an NTSC monitor. (Though perhaps the argument here is that game developers tended towards NTSC because the colours on that display are more pleasing.) As well, of course, 80-column text will look significantly worse (perhaps to the point of being almost unusable) on an NTSC display.
    – cjs
    Commented Aug 31, 2019 at 3:11

The RGBtoHDMI interface converts the "digital" RGB video signal from vintage computers like the BBC Micro or PC MDA/CGA/EGA to HDMI or DVI compatible with most modern TVs/Monitors. The interface comprises a Raspberry Pi Zero and a specially designed Hat containing a small CPLD. Custom firmware on the Raspberry Pi, in conjunction with the CPLD, is able to correctly sample each of the supported video modes to give a pixel-perfect rendition. The HDMI output is locked to the input so there are no frame drops, repeats or tears and it also has low lag of around 4 milliseconds (less than a quarter of a frame).

More information on the project can be found at https://github.com/hoglet67/RGBtoHDMI

You must log in to answer this question.

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