Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 

Repository files navigation

amdek-310a

My setup for driving and Amdek Video-310A MDA monitor with a Raspberry Pi. Visit https://narlotl.github.io/amdek-310a or the demo branch to see it in action.

Setting up

(Required)

  • Clone the repository to your home directory. I used YADM to make this easier.
  • Move boot_config.txt to /boot/firmware/config.txt. This is what tells the Pi to generate MDA output on the GPIO.
  • Connect the GPIO pins to the MDA cable. See Wiring for details.

(Not required but makes seeing the terminal much easier)

  • Move console-setup to /etc/default/console-setup to make the TTY clearly readable.
  • Run setvtrgb ~/.config/tty_colors.conf at startup to make all the terminal colors show up. This sets all colors except white to (255, 0, 0) (red), which shows up as mid brightness on the screen. Without this, some colors like green won't be visible as they don't produce red or blue output (see Notes).

Wiring

This uses the Raspberry Pi's DPI mode to output video signals on the GPIO.

Connect these GPIO pins to the pins on the monitor cable:

GPIO Pin MDA Pin
Ground 1, 2 (Ground)
3 (V-Sync) 9 (V-Sync)
5 (H-Sync) 8 (H-Sync)
21 (Blue) 6 (Intensity)
22 (Red) 7 (Video)

GPIO Diagram

GPIO diagram

MDA Diagram

MDA pins image

Software

  • i3 for the desktop.
  • picom to put a shader over the desktop (see Shaders).
  • kitty for the terminal.
  • DOSBox for DOS applications. There is a config at ~/.config/dosbox/dosbox.conf that sets DOSBox to run at the correct resolution. Run dosbox -conf ~/.config/dosbox/dosbox.conf to use it.

Shaders

I have two picom shaders: dither.glsl and simple.glsl. The dither shader uses ordered dithering to work around the limited amount of brightness levels. The simple shader just converts the pixel to grayscale and outputs the corresponding red and blue values (see Notes). You can change the thresholds for video and intensity by adjusting the numbers in the r and b variables in each shader. Lowering the number raises how bright a pixel has to be to meet the threshold while raising it lowers that threshold.

The dither shader is better suited for media and modern games where a lot of color is expected and pixel-level detail is less important. Dithering does take some detail, so the simple shader is better for old applications and games that are designed for limited colors or text where dithering is unnecessary because there is only a light and dark color.

Notes

I use the red color channel for the MDA video pin (pin 7), which corresponds to 2/3 brightness on the 310A. I use the blue channel for the intensity pin (pin 6), which is 1/3 brightness. Although some monitors have 4, the 310A only has 3 brightness levels: off, mid, and bright. If the video pin is off, no pixel will show.

Intensity Video Display
0 0 Off
1 0 Off
0 1 Mid
1 1 Bright

References

Amdek Video-310A

Monochrome display adapter

DPI

Dithering

About

My setup for driving and Amdek Video-310A MDA monitor with a Raspberry Pi.

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Contributors

Languages