-
V2 Board Design
05/12/2024 at 01:12 • 0 commentsKiCad 3D render of my board design:I tried to make the parts of the circuit clearly visible on the board. I also added LEDs, which I typically forget when designing a board. Every board needs blinking lights. Well, I think this board has turned out nicely, at least in the 3D render; it has the clean look I wanted.
-
V2 Schematic Ready
05/11/2024 at 20:14 • 0 commentsI have the schematic finished now. I checked the major critical paths to the VRAM, fining one that was too slow. The VRAM takes up to 55ns from address input to data output, and I have only 62.5ns, so really it is super close. Since the uPD7220 uses an address latching mechanism, I managed to move my address-modifying critical path to before this latching is done. The timing there is much more forgiving. Other than that, I added some pretty LEDs and checked/fixed some of the logic done in the circuit.I may add more decoupling capacitors still, but that isn't a real design change. The capacitors are the only SMD components I'm using.
-
New Schematic is Nearly Complete
05/10/2024 at 18:55 • 0 commentsMy schematic so far:
This schematic is way better organized, and hopefully it will still make sense to me 5 years from now. I've added a ton of features since the last board revision, namely:
- The CPU can now directly access the VRAM
- I doubled the maximum pixel clock by allowing for uPD7220's wide mode (see last log)
- Added support for double buffering
- I octupled the maximum VRAM to 512KiB from 32KiB. Now we can have larger resolutions with enough RAM left over to double-buffer
Doing all this added a TON of extra logic, so if you compare the above schematic with the schematic of the previous board, this one has at least twice the components, and is far denser.
I had to add a lot of buffers so that the VRAM bus could be shared. This concerns me because it adds a few tens of nanoseconds to certain datapaths, meanwhile I've doubled the maximum VRAM clock speed to 16Mhz. The VRAM uses 55ns alone, and that doesn't count any of the hardware for uPD7220 memory cycle detection, bus sharing logic, etc. So the next step will include checking my datapaths to make sure all the components process fast enough for my clocks.
-
"Wide display mode"
05/09/2024 at 16:20 • 0 comments -
We can certainly make this better.
05/09/2024 at 15:39 • 0 commentsI hadn't looked at this project in a long time, and the other day I was browsing it and noticed several comments asking for the schematics. But hadn't I uploaded schematics? So I double checked the files, found the attached schematic zip, and decided to open it up. Oh geez, what a mess! It had been created with a very old KiCad version compared to today, and I don't think I uploaded the symbol libraries, so the schematics were useless. I can see now why people asked for the schematics!
Very useful indeed. (not) I spent some time the other day cleaning this up, as well as fixing a few hardware bugs related to the color DAC and oscillator. I modified the schematic to match the modifications on my board at home, which works quite well. Here's the schematic now, which I uploaded: -
Zilog Made a Clone!
04/18/2019 at 01:47 • 0 commentsI 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
-
Rendering characters!
04/05/2019 at 19:41 • 0 commentsI'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).
-
Finally on HaD after more than a year! And finally working!
04/04/2019 at 06:29 • 0 commentsOver 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.