Electronics > FPGA

FPGA VGA Controller for 8-bit computer

(1/607) > >>

nockieboy:
Hi all,

Don't know if anyone has noticed, but Grant Searle's website (http://searle.hostei.com/grant/z80/) seems to have blinked out of existence.

This poses a problem for me as I didn't download the code or related material for his FPGA Multicomp design.  I'm now thinking about my first foray into FPGAs by creating a VGA driver for my DIY computer, but it seems a big 'leg up' has now disappeared from the interweb.  |O

Does anyone have the code for the Multicomp?  I was hoping to sift through it and either adapt or just learn from Grant's implementation of the graphics driver in VHDL.

For clarity, I've got an Altera Cyclone II EP2C5 which I was hoping to use to make a VGA controller, either with enough on-board RAM (or a discrete SRAM memory chip) for a frame buffer in the region of 128 KB, to allow a resolution of (up to) 640x480 with two colours, or down to 160x120 with 256 colours and double-buffering.

I've since ordered a Xilinx Spartan 6 as well, thinking it might be even more overpowered for the job.  ;D

I've seen designs where the controller outputs an RGB signal directly to the VGA connector via resistors, and others where the controller passes data from the frame buffer to a video DAC.  Bearing in mind I'm using 8-bit data (so a maximum of 256 colours unless I start doubling-up on bytes-per-pixel in the frame buffer), the DACs I've seen seem to expect a lot more bits on their inputs...

I'm also wondering about how best to interface to the Z80 computer, too.  Would it be best to send data to the VGA controller via IO calls and let the VGA controller handle the frame buffer?  I'm not a fan of restricting the Z80's access to memory for 75% of its runtime whilst the VGA controller reads from a frame buffer in the Z80's memory space, and dual-port RAM is too expensive for my needs.

Any thoughts, comments etc. appreciated!  I'm not very experienced at this stuff having spent the last two years learning electronics by building a DIY Z80-based computer...

 :-+

EDIT:

For anyone interested, this topic evolved into a fully developed video card using the EP4CE10 FPGA from Altera.  The github for this project is here: https://github.com/nockieboy/gpu

SiliconWizard:
Does this contain what you need? https://github.com/wsoltys/multicomp

nockieboy:

--- Quote from: SiliconWizard on October 16, 2019, 01:54:57 pm ---Does this contain what you need? https://github.com/wsoltys/multicomp

--- End quote ---

Ah yes, thanks SiliconWizard!  :-+  That gives me a fair starting point to work from, I think.  As I'm only going to be building the video driver circuit, hopefully I'll be able to make use of some more RAM space.  Will have to go start on some VHDL/FPGA tutorials as I'm starting from scratch with them.

dferyance:
Just a few thoughts / ideas.

The resistor ladder dacs are popular and mostly work fine. However I have run into their limitations in my own work. I've been doing VGA with 256 color, but a palette system out of 24-bit color. I often see obvious color differences due to the limited number of bits in the resistor ladder. If you can live with this, they work great and are simple. It sounds like you are doing 256 bit color without a palette so you should be fine, but if you extend it latter this is a limitation you will run into.

For interfacing the two, do you need framebuffer-level access? For example, the original gameduino outputs VGA but takes in different drawing commands (over SPI). This way you aren't having read and transmit entire framebuffers over a slow bus.

NorthGuy:
Why VGA? It would be more natural to go digital.

Navigation

[0] Message Index

[#] Next page

There was an error while thanking
Thanking...
Go to full version