04/18/2019 at 01:47 •
I bought this chip off of Ebay. It seems that Zilog created a uPD7220 clone - and it works! These chips seem to be rather rare and information on them is scarce. I did manage to deduce that there were two variants of chips: one operating at 6Mhz, and one at 8Mhz. I got the 8Mhz one and tried doubling my pixel clock to 16Mhz (the GDC uses a halved clock). That worked too, and that allowed me to make a more stable video signal. I had a problem with the 8Mhz pixel clock where there was not time to output a valid video signal. Now I can output more pixels than I have VRAM for.
The chip is also a super pretty Zilog gem <3
04/05/2019 at 19:41 •
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.
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).
04/04/2019 at 06:29 •
Over a year ago I wanted a graphics card for my Z80 computer. I made a prototype with the uPD7220, but I never got it working. Until...
As it turned out, I made TONS on mistakes in the original design. There are issues with the new design too, but it works well enough (after a hack, more on that later). Anyway, after playing with the first prototype and trying various hacks, I ended up with a valid VGA signal!
I don't think the uPD7220 was ever supposed to output VGA, considering VGA was introduced about four years after the uPD was, so it's awesome that it can output a VGA signal.
After studying the uPD datasheet and my schematic in depth, I eventually found most of the problems and ended up with my second prototype (which I am using now). I've managed to get it to do the basic things I need it to do. Getting from basic initialization to drawing pixels was very difficult, especially with such a complex device and no example code/libraries, but it was definately worth it. I now want to share what I've learned about it so that more people can use this GDC (GDC = Graphic Display Controller).
I plan on adding more and more information to this project so others can use my work as a reference. I also am going to create a Z80 driver, which I will post here as well.