Real Pixels?

One of the main limits with most Z80 based computers is their lack of any video output. Most video output comes in the form of ASCII text sent to a serial console. This is fine if you like text based software or are running an operating system like CP/M. It’s a bit limiting if you want to do more graphical things.

I found the Quazar Graphic OLED Display, a plug in board for the RC2014 with a small 128x32 pixel OLED display on it. By using a fairly straight forward set of assembly routines it’s possible to send image data to the screen.


I liked it so much I made two videos about it. Watch them here!

How the Quazar OLED Display works

The display has fairly simple electronics that interface the OLED to the Z80 bus, with it having an I/O port assigned to it by some jumpers. The board came pre-assembled so all I had to do was plug it into a spare slot on my RC2014 backplane.

The rest was done in software using a mixture of Z80 assembly language and C. For the C programming I used the popular cross-compiler for Z80 (Z88dk)[]

Grab the source code

You can get the source code for this from my (Github repo)[]. There’s not much to it and all the assembly code came straight from the excellent manual provided with the OLED display.

How To Program The Quazar Graphic OLED Display

Step 1 - Draw some pictures

I used a combination of (Paint.NET)[] and (Irfanview)[] to draw and convert the images. All I did was set the canvas size to be 128x32 pixels and draw in solid black and white. Irfanview was used to convert the image into PBM so that I could use a bit of C to convert that into source.

You can do anything you like to convert pixels into source code, but the screen expects its pixels in a specific and slightly weird format. Each byte of image data represents an 8 pixel column on the display, with the display being made up from four rows of these 8 columns, with 128 columns per row. There’s a diagram in the manual, stare at it for a while until it makes sense.

Step 2 - Write the code

In my github repo is a Z80 assembly file containing the rudimentary API based off the manual’s source. It takes a 512 byte array and sends it to the screen as image data. If you got all your bits in the correct order, an image appears. If not, a garbled mess does.