Close

Rendering characters!

A project log for uPD7220 Retro Graphics Card (and VGA hack)

Making an 80s GDC run for the first time in decades, and my first real hack on hackaday.io

Dylan BrophyDylan Brophy 04/05/2019 at 19:410 Comments

I've managed to make my card render characters!  I used the Z80 computer this project was originally intended for this time, instead of the Arduino testbench.

There is not a font yet, so I just rendered a bunch of smiley faces and tested that the program could keep track of the cursor position.

Smiley faces are a good way to do testing.

It's working very well, but I would like to render things a bit faster.  I think the Z80 math routines run slow however, for calculating cursor positions and colors.

It doesn't help that my card has 16 colors - it appears that the uPD7220 was designed to just do black and white.  This means that I have to send a few more commands to the uPD7220 to select a group of bits for a pixel (multiple colors) instead of just one bit (black and white).  The uPD7220 automatically selects a single bit when a command is sent to set the VRAM address, but my program must select multiple.

Here is my graphics driver for the Z80: https://github.com/NuclearManD/z80-code/blob/master/G00nOS/upd7220.z80

You may need to look at some of the other files, but all graphics functions are there (er, rather, the ones I've written thus far).

Discussions