Skip to content
IanSB edited this page Feb 10, 2020 · 55 revisions

RGB to HDMI

Introduction

The RGBtoHDMI interface converts the "digital" RGB video signal from vintage computers like the BBC Micro or PC MDA/CGA/EGA to HDMI compatible with most modern TV/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 Beeb's video modes to give a pixel-perfect rendition. It also has low lag of around 3 milliseconds.

One unusual feature of the converter is optional integer scaling where one original pixel on the computer is scaled to an exact number of lcd pixels without using any interpolation filtering. This results in output from real hardware that looks as clean and sharp as an emulator although you can use filtering if you prefer.

Converter 'hat' fitted to Raspberry Pi zero:

RGBtoHDMI integer scaling output:

Typical output from other scalers that have interpolation filtering:

Purchasing

RGBtoHDMI is currently a DIY project although a small manufacturing run is being investigated.

Software

Current Documentation

Earlier Documentation

Support

For support, please use the Stardot Thread

Technical Challenge

The main challenge with this project was successfully sampling Mode 7 on the Beeb.

The difficulty here is that the pixel spacing is very uneven:

This is because of the way the Beeb generated the 6MHz clock from 2, 4 and 8MHz clocks:

The clock edges (both are used by the SAA5050) deviate from where they should be with a pure 6MHz clock, but crucially the differences repeat every 6 edges.

The CPLD on the RGBtoHDMI interface allows the pixel sampling points to varied in units of 10.4ns (1/96MHz) over a range of +/- half a pixel. In mode 7, six possible sampling points can be configured, to match the clock skew.

An automatic calibration process is used to set these sample points.

Clone this wiki locally