A simple standalone MCA/CGA/EGA to VGA adapter based on a raspberry pi Pico.
The Pico reads the TTL input video signal, writes the pixels to a buffer and then generates the VGA signal using the pixels from the buffer.
MCEBlaster.uf2
firmware to the drive associated with the PicoPIXEL CLOCK
button once, this will enter the pixel adjust mode.PIXEL CLOCK
again will increment the pixel clock by 10KHz.PIXEL CLOCK
will increment by 1KHzAUTO ADJUST
will decrement by 10KHz.AUTO ADJUST
will decrement by 1KHz.PIXEL CLOCK
.AUTO ADJUST
button. This works best when the image shown is full from border to border.AUTO ADJUST
button turns on continuous auto-centering mode. This may be useful occasionally, but won't work well if the image is mostly blank as it may keep re-adjusting the image.The first core reads the TTL video data (through the level-shifter) from a PIO state-machine and places the pixels onto a buffer in memory. The second core works completely independently from the first core and reads the pixel from the buffer and feeds them, along with the necessary Horizontal and Vertical Sync signals to a PIO state machine that writes to GPIO outputs. The output is converted to analogue with the help of a simple R-2R DAC consisting of two resistors. Feel free to check out the video part 1 for a visual overview.
The PIO state machines are used not only receiving the TTL video data and writing the VGA video data, but also for other helper functions including:
The TTL video input is read by a PIO state-machine (one version for each video mode). But getting it to sample the pixels at the right time requires us adjust the sampling period in a precise way to match the TTL video card's internal pixel clock. Using the PIO clock divider does not give us a good-enough precision, because the fractional part of the divider is an 8-bit number, meaning that we get precision of ~0.004ns, but what we really need is about 0.001ns. So what we do is that we have multiple implementations of the state-machine code, each with a different sampling period and we look for the one that has the lowest division error using the PIO's 8-bit divider. This process is explained in more detail in the video part 2.
There are two versions of the PCB available:
_THT
file suffix)So please select the parts according to the PCB version you are planning to build.
Download gerbers: https://github.com/scrapcomputing/MCEBlaster/releases
Reference | Quantity | Value | Description |
---|---|---|---|
C1 | 1 | Capacitor SMD 0.1uF 1206 (or disk ceramic for Through-Hole) | Decoupling capacitor for level-shifter IC |
D1 | 1 (optional) | Diode Through-hole (e.g., Schottky 1N5817 or silicon 1N4001) | For powering the MCE Blaster from the PC (instead of the Pico's micro-USB) |
J2 | 1 (optional) | 1x02 through-hole Male PinHeader 2.54mm | For alternative external power |
J1 | 1 | DB9 Male Horizontal | For connecting to TTL video card |
J3 | 1 | DB15 Female HighDensity Connector | For connectint to VGA monitor |
R3 R4 R6 | 3 | 422 Ohm 1206 SMD (or Through-hole) resistor 1% (alternatively 470 Ohm) | For VGA signal DAC |
R2 R5 R7 | 3 | 845 Ohm 1206 SMD (or Through-hole) resistor 1% (alternatively 1K Ohm) | For VGA signal DAC |
SW1,SW2 | 1 | 6mm Through-hole push button | Auto-adjust and pixel-clock buttons |
U1 | 1 | 74LVC245 SO-20 SMD 12.8x7.5mm aka SOIC (or DIP-20 + optional socket for Through-hole) | Level-shifter IC |
U2 | 1 | RaspberryPi Pico | Pi Pico |
N/A (for Pico) | 2 | 1x20 female through-hole pin-header 2.54mm pitch | PCB Pico headers |
N/A (for Pico) | 2 | 1x20 male through-hole pin-header 2.54mm pitch | Headers for the Pico |
The project is GPLv2.