Skip to the content
PCBKitNew board
2 layers30 × 67.7 mmMCEBlaster, the printed circuit board in 3D

A Pi Pico based MDA/CGA/EGA to VGA adapter

Size
30 × 67.7 mm
Copper layers
2
Thickness
1.6 mm
Parts
19
Nets
45
Pads
129
Tracks, vias
398, 17
Pours
2
Routed
Yes
KiCad
KiCad 7 (file 20221018)
Created
24 Jun 2024
Updated
29 May 2026

Overview

MCEBlaster is an open-source printed circuit board by scrapcomputing, from the scrapcomputing/MCEBlaster repository on GitHub, published under the GPL-2.0 licence. It is a 2-layer board of 30 × 67.7 mm with 19 parts on 45 nets, routed with 398 tracks and 17 vias.

It is built around the 74FCT245APC. Its parts include 6 resistors, 4 connectors, 2 ICs, 1 capacitor and 1 diode. It belongs with the interfaces and adapters boards and the RP2040 boards of this library.

Main components

1

README

README.md

MCE Blaster

A versatile standalone MCA/CGA/EGA TTL to VGA adapter based on a raspberry pi Pico.

Videos

What it does

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.

Features

  • No need for a VGA up-scaler or a 15KHz VGA monitor. Works with standard VGA modes.
  • Pixel-perfect output:
    • VGA 640x400 for CGA/EGA 320x200,640x200 and 640x350 inputs
    • VGA 800x600 for MDA 720x350
    • VGA 640x480 for vertical resolutions between 200 and 240
  • Pixel clock tuning for each mode
  • Auto-adjustment functionality that centers the image on screen
  • EGA brown color correction
  • On-screen menu and messages
  • Through-Hole PCB

Installing the firmware to the Pico (Pico 1 or Pico 2)

  • Download firmware (MCEBlaster_pico1.uf2 or MCEBlaster_pico2.uf2): https://github.com/scrapcomputing/MCEBlaster/releases
  • Unplug the Pico
  • Press and hold the small "BOOTSEL" button on the Pico
  • While holding the BOOTSEL button, connect the Pico to your PC with a micro-USB cable
  • The Pico should show up as a mass-storage device
  • Copy the MCEBlaster_pico1.uf2 or MCEBlaster_pico2.uf2 firmware to the drive associated with the Pico
  • Safely eject the mass-storage device

Usage

NOTE: Controls have changed since version 0.2!

Adjusting the pixel clock

  • Push the PIXEL CLOCK button once, this will enter the pixel adjust mode. This should show text on screen displaying the current pixel clock.
  • Coarse adjustment:
    • Push PIXEL CLOCK to increment the pixel clock by 10KHz.
    • Push AUTO ADJUST to decrement the pixel clock by 10KHz.
  • Fine adjustment:
    • Long-push (push until the push registers) PIXEL CLOCK to increment the pixel clock by 1 KHz.
    • Long-push (push until the push registers) AUTO ADJUST to decrement the pixel clock by 1 KHz.
    • Medium-push (about half a second push and release) PIXEL CLOCK to increment the sampling offset and then increment the pixel clock by 1 KHz once we have tried all offsets.
    • Medium-push (about half a second push and release) AUTO ADJUST to decrement the sampling offset and then decrement the pixel clock by 1 KHz once we have tried all offsets.
  • Exit pixel clock adjust mode by not pushing any buttons for 12 seconds. This saves the settings to flash.

Sampling Offset (since rev 0.3)

The sampling offset is a fine-tuning knob added in rev 0.3 that shifts TTL sampling to try to avoid sampling the pixels during the transitions (shown as X). In this example, using a sampling offset of 1 will result in a very noisy image because sampling takes place during the pixel transitions.

text
                    _____ _____ _____ _____
TTL Pixels:        X_____X_____X_____X_____X
Sampling offset 0:      |     |     |     |
Sampling offset 1:       |     |     |     |
Sampling offset 2:        |     |     |     |
Sampling offset 3:         |     |     |     |

The reason why offsets are needed and a demonstration of how they work can be found in video part 3.

Centering the image

  • Push the AUTO ADJUST button. This works best when the image shown is full from border to border.

Print TTL Info (since v0.2)

Long-pressing the PIXEL CLOCK button will show a screen with information about the TTL signal. Note: this is not updated in real-time.

You can exit the screen by pushing any button.

Manually Setting TTL Options (since v0.2)

By default the MCE Blaster will automatically detect the TTL mode by checking the VSync frequency and the VSync Polarity. If these match the standard MDA/CGA/EGA modes used in PCs this will usually work fine.

But since Version 0.2 the MCE Blaster also supports manually setting:

  1. The mode (MDA/CGA/EGA),
  2. The horizontal and vertical resolution
  3. The horizontal and vertical screen offset (on the TTL side) with the help of an on-screen menu.

The operation is straight forward:

  • To enter the menu long-push both buttons for more than a second until the "MANUAL-TTL" menu shows up.
  • The single-line menu consists of 4 items that can be modified. The one that can be currently modified is enclosed in square brackets [<selected>]. For example:
text
          Currently
          Selected      Horiz Offset  Vertical Offset
            vvv               vvv      vvv
MANUAL-TTL [CGA] 640 x 200 X: AUTO  Y: AUTO
   ^         ^   ^     ^
On/Off  TTL-mode Horiz x Vertical Resolution

the currently selected option is CGA.

  • Change the value of the selected item with a short push of the buttons.
  • Cycle through the items by long-pushing the buttons: one will cycle in one direction and the other in the opposite.
  • The options are saved to flash when the user stops pushing buttons for 12 seconds.

Reset to Factory Defaults (since v0.2)

Occasionally the user may save to flash some configuration that makes the MCE Blaster unusable or inoperable. In this case you can reset to defaults by pressing both buttons while powering on the device. Upon a successful reset you will see the LED blinking fast for about 2 seconds. You can release the buttons after that and the MCE Blaster will start with the default settings.

Profiles (since v0.3 beta13)

The MCE Blaster supports a number of profiles, which helps when swapping video cards. The settings for one card can be at Profile 0, the settings for another card can be at Profile 1 etc. The default profile is Profile 0.

Changing profiles is as easy as long-pressing the AUTO ADJUST button and cycling through the profiles with either the AUTO ADJUST or the PIXEL CLOCK button.

Profiles are demonstrated briefly in video part 3.

How it works

Overview

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.

PIO state machines

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:

  • Detecting no input signal: This checks if the horizontal sync signal is active.
  • Detecting the image offset: This counts the black border pixel until a non-black pixel is found across all lines. This count is used for centering the image automatically.
  • The EGA PIO state machine also does the Brown pixel fix because the overhead of doing that in a CPU core was too high.

Sampling clock

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.

PCB

Schematic

MCE Blaster Schematic

Bill Of Materials

Download gerbers: https://github.com/scrapcomputing/MCEBlaster/releases

NOTE: You can still use the latest firmware with old revisions of the PCB, they are fully compatible.

ReferenceQuantityValueDescription
N/A31K Rm065 through-hole linear potentiometer (optional: can be replaced by a wire between 2 pins as shown on PCB and the photo belowAdjust R G B VGA signals
C110.1uF disk ceramic capacitorDecoupling capacitor for level-shifter IC
D11 (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)
J21 (optional)1x02 through-hole Male PinHeader 2.54mmFor alternative external power
J11DB9 Male HorizontalFor connecting to TTL video card
J31DB15 Female HighDensity Connector (e.g., Kycon K61X-E15S-NJ-VESA, thanks @wrljet)For connecting to VGA monitor
R3 R4 R63390 Ohm Through-hole resistor 1% (alternatively 470 Ohm)For VGA signal DAC
R2 R5 R73780 Ohm Through-hole resistor 1% (alternatively 1K Ohm)For VGA signal DAC
SW1,SW226mm Through-hole push buttonAuto-adjust and pixel-clock buttons
U1174LVC245A DIP-20 (e.g., SN74LVC245AN) (+ optional socket)Level-shifter IC (NOTE: in the video I am using an 74HCT245 which turns out operates out of spec)
U21RaspberryPi Pico (or Pico 2)Pi Pico (or Pico 2)
N/A (for Pico)21x20 female through-hole pin-header 2.54mm pitchPCB Pico headers
N/A (for Pico)21x20 male through-hole pin-header 2.54mm pitchHeaders for the Pico

Potentiometers are optional.

They can be replaced by a wire as shown in the photo:

Build instructions (for developers)

Requirements:

Build for Pico (rp2040) or Pico 2 (rp2350)

text
$ cd firmware && mkdir build && cd build
$ cmake -DPICO_BOARD=<pico|pico2> -DCMAKE_BUILD_TYPE=Release -DPICO_FREQ=270000 -DPICO_SDK_PATH=<path-to-pico-sdk> ../src/
$ make -j

Resources:

Similar Projects

Change Log

  • Rev 0.1: Initial release.
  • Rev 0.2: Major redesign. Manual TTL, menus show live background
  • Rev 0.3: Better adjustment of pixel clock with sampling offset, support for Pico 2, and fix colors in some monitors

License

The project is GPLv2.

Parts

19
QtyValueFootprintReferences
31KPotentiometer_THT:Potentiometer_Runtron_RM-065_VerticalBLU1, GRN1, RED1
3390Resistor_THT:R_Axial_DIN0207_L6.3mm_D2.5mm_P10.16mm_HorizontalR3, R4, R6
3780Resistor_THT:R_Axial_DIN0207_L6.3mm_D2.5mm_P10.16mm_HorizontalR2, R5, R7
10.1uFCapacitor_THT:C_Disc_D4.3mm_W1.9mm_P5.00mmC1
174FCT245Package_DIP:DIP-20_W7.62mm_SocketU1
1AUTO_ADJUSTButton_Switch_THT:SW_PUSH_6mmAUTO_ADJUST1
1Conn_01x02_MaleConnector_PinHeader_2.54mm:PinHeader_1x02_P2.54mm_VerticalJ2
1Conn_01x06_MaleConnector_PinHeader_2.54mm:PinHeader_1x06_P2.54mm_VerticalJ6
1DB15_Male_HighDensity_MountingHolesMCEBlaster:VGA_connector_both_short_and_longJ3
1DB9_Male_MountingHolesConnector_Dsub:DSUB-9_Male_Horizontal_P2.77x2.84mm_EdgePinOffset4.94mm_Housed_MountingHolesOffset7.48mmJ1
1D_SchottkyDiode_THT:D_A-405_P7.62mm_HorizontalD1
1PXL_CLKButton_Switch_THT:SW_PUSH_6mmPXL_CLK1
1RaspberryPi_PicoMCEBlaster:raspberry_pi_picoU2

Questions

How big is the MCEBlaster PCB?

It measures 30 × 67.7 mm and has 2 copper layers, 1.6 mm thick.

What parts does the MCEBlaster use?

19 parts, built around the 74FCT245APC. The full list of its parts is on this page, with links to each part's symbol and footprint where PCBKit's library has them.

Where can I download the MCEBlaster KiCad files?

From the scrapcomputing/MCEBlaster repository on GitHub, at the commit this page was made from: the board is kicad/MCEBlaster.kicad_pcb and its schematic kicad/MCEBlaster.kicad_sch. PCBKit opens the board in the browser, with nothing to install.

Can I use the MCEBlaster design in my own project?

Its repository publishes it under the GPL-2.0 licence: you may reuse it on that licence's terms (keep the author's notice, and for a copyleft licence share your changes alike).

Similar boards

  • 4 layers330.2 × 304.8 mmATX4000, the printed circuit board in 3D

    ATX4000

    elenachenchen/A4000-ATX

    816 parts5
  • 2 layers43.9 × 27.7 mmTcd1304-4v, the printed circuit board in 3D

    Tcd1304-4v

    OpnTec/open-spectrometer-hardware

    Open source VIS spectrometer

    19 parts1.5k
  • 2 layers50 × 60 mmDebate Device, the printed circuit board in 3D

    Debate Device

    hackclub/OnBoard

    💡 Join 1,000 teenagers and make your first PCB with a $100 grant!

    19 parts915
  • 2 layers102.9 × 96.7 mmISA adapter, the printed circuit board in 3D

    ISA adapter

    polpo/picogus

    Emulation of ISA sound cards and CD-ROM on Raspberry Pi Pico (GUS, SB/Adlib, MPU-401, Tandy, CMS, Panasonic CD-ROM) with USB mouse/joystick support

    19 parts805
  • 2 layers60 × 39 mmPs2usb, the printed circuit board in 3D

    Ps2usb

    rasteri/HIDman

    Adapting USB devices to work on old computers

    19 parts432
  • 2 layers70.1 × 43.2 mmIaq device, the printed circuit board in 3D

    Iaq device

    nkitanov/iaq_board

    IAQ Board is a DIY (Do-It-Yourself) device for measuring internal air quality

    19 parts396
  • 2 layers80 × 80 mmGB BRK CPU G1, the printed circuit board in 3D

    GB BRK CPU G1

    Gekkio/gb-hardware

    Game Boy -related custom hardware by gekkio

    19 parts379CC-BY-4.0
  • 2 layers25.4 × 25.4 mmIna169, the printed circuit board in 3D

    Ina169

    Ardumower/ardumower

    Develop an open source robotic lawn mower (HW+SW reference platform)

    19 parts282