vga output for arduino boards using sinclair zx spectrum video model
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.


vga output for arduino boards using sinclair zx spectrum video model

This can output 16 color vga with 128x96px resolution from an arduino with an atmega328p at 16MHz (using ~1.5KB of sram).

With an atmega1284 at ~>26MHz you can obtain at least 256x192px with 16 colors as in the unforgettable ZX Spectrum from Sinclair Research Ltd.

Two different colors in every 8x8 pixel square, as used to be in the ZXSpectrum. (Yes, you can recreate the attribute clash!!!!).

The pixels are driven out by the serial port (USART) in MSPI mode (thanks to Nick Gammon).

The Vsync and Hsync signals are timed using Timer2 and dejittered using the sleep trick from Nick Gammon/Michael Rosen.

The pixel output is used as the S input to a 74xx298 multiplexer to select the four bits of the paper/ink color. (Inspired in the Harlequin ZX Clone).

The flash bit of the ZX attribute byte format is not used, instead i use one bright bit for paper and other bright bit for ink.

A 6 resistor DAC is used to recreate the 1bit per channel RGB+BRIGHT color pallete of the ZX.(in the Harlequin clone transistors are used for a more ZX-accurate output of 15 colors).

Other modes can easily be achieved (8x4, 8x2 and 8x1 attribute modes).

This is a personal project, the code is ugly and incomplete and bad commented.

There are tested schematics for uno and nano boards based on atmega328p in the schematics folder.