Quazar Graphic OLED Display – Real Pixels for your RC2014

Real Pixels?

One of the main limits with most Z80 based computers is their lack of any video output. Most video output comesin the form of ASCII text sent to a serial console. This is fine if you like text based software or are runningan 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 128×32 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.

Video

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 assignedto it by some jumpers. The board came pre-assembled so all I had to do was plug it into a spare slot on my RC2014backplane.

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

Grab the source code

You can get the source code for this from my Github repo. There’snot 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 drawand convert the images. All I did was set the canvas size to be 128×32 pixels and draw in solid black and white. Irfanviewwas 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 andslightly weird format. Each byte of image data represents an 8 pixel column on the display, with the display being made upfrom four rows of these 8 columns, with 128 columns per row. There’s a diagram in the manual, stare at it for a whileuntil 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 a512 byte array and sends it to the screen as image data. If you got all your bits in the correct order, an imageappears. If not, a garbled mess does.