MDA Video Driver on SoC FPGA
A look into one of Ted Fried's MicroCore Labs projects that use an SoC FPGA to drive an MDA monitor.
MDA, or Monochrome Display Adapter. was a standard developed by IBM for their standard video and computer displays introduced for the IBM PC in 1981. MDA only contains a single monochrome text mode that can display 80 columns by 25 lines of high resolution text characters or symbols that can be used to draw forms on the monitor.
Ted Fried found himself with a worse-for-wear IBM 5151 MDA monitor that could produce a raster on the screen, but no video. After tracking the issue down to a faulty zener diode shorted to ground and upgrading it to a LM7805 5V linear regulator from his parts drawer on hand, the next step was to find a way to display images on the monitor.
Using the Zynq-7000 based Arty Z7-20 board from Digilent, Fried created a design that implements a state machine in the programmable logic that fetches each display row from a 720-bit wide dual-port RAM and generates the MDA display timing.
The Arm core of the Zynq on the Arty Z7 runs a C application that stores bitmap images in an array and are transferred to the BRAM in the FPGA's programmable logic. This image array holds a 720×350 bit image with one bit per pixel to fit the MDA display.
Since bitmap images are a bit outdated and not the norm for photos one might take today, Fried converted the original JPEG images to the appropriate size and color using GIMP and saved it as a bitmap (BMP) image. The BMP images are then converted into the array the application on the Arm core of the Zynq is expected via a custom C program Fried also wrote.
A custom cable to connect the MDA's signal input to one of the Arty's Pmods was the final part of the project to get everything working.
This is quite the clever project and a perfect example of how FPGAs, especially system-on-chip (SoC) FPGAs that have a physical processor chip built into them, can be used to tackle any custom project.