A couple of buddies and I wanted to see if we had what it takes to make a small video game console from a Nexys-2 FPGA board. We have some experience with C and assembly, but we're not really sure how to get started. Does anyone have any advice or links they'd recommend? Thanks in advance!
Moderators - Reputation: 12371
Posted 22 May 2014 - 01:03 PM
Why that particular board? There are a lot of options out there for very little money that integrate things like display controllers and GPUs which you will probably want...
Crossbones+ - Reputation: 13982
Posted 22 May 2014 - 01:11 PM
Start learning VHDL and be ready to think in ways that neither C nor Assembly have taught you. Be prepared to to diagnose and fix bugs that have to do with signal propagation latency. Be prepared to design a CPU, GPU, and to generate a proper video signal.
After that you get to program it in not assembly, but machine-code -- or you get to write an assembler. When there's a bug in your application, it might not actually be in your application code, it might be a flaw in the code that defines the system. And you won't have a debugger for any of this, so get really used to debugging from memory-dumps.
Its certainly doable -- people have done it. But to say you and your friends have "some C and assembly experience" is basically equivalent to saying you and your friends have a dream and some gumption. Realize that you've got a long, long road ahead of you. This project is on the scale of a thesis project for an Electrical Engineering degree, except without the benefit of 3+ years of said degree program to get you running.
throw table_exception("(ノ ゜Д゜)ノ ︵ ┻━┻");
Moderators - Reputation: 21216
Posted 22 May 2014 - 01:12 PM
Are you trying to learn to build electronics, or are you trying to learn to build a software OS/platform? Choose your hardware carefully based on what you want to actually be learning.
Members - Reputation: 1475
Posted 22 May 2014 - 03:16 PM
Take a look at the book called "The Black Art of Video Game Console Design" , I think its exactly what you need
Members - Reputation: 487
Posted 22 May 2014 - 03:32 PM
I actually have the exact same board and used it to partially recreate the original Gameboy hardware. It's definitely doable and not that hard if you plan things right. And of course before beginning, I'd recommend doing a few state machines and little cpu cores just to get to know VHDL and make sure you understand how to test, debug, etc. the board.
The single most important thing to plan ahead is timings and freq dividers. I'd go with a 25Mhz vga pixel clock, which gives the standard 640x480 resolution (there's really no other option that makes sense and is compatible with today's displays). 25Mhz is FAST - it's ok for the vga output module which is simple, but you're not gonna be able to drive a cpu or gpu at that frequency (because of fpga logic propagation times). I'd recommend dividing the gpu clock a few times off the main output clock and reducing the gpu resolution considerably (while vga module duplicates lines, etc).
The gpu is really just a state machine, that constantly fetches sprites from shared video memory and feeds lines to vga module. You can add extra bg layers or more sprites, but you will be severely limited by the sprite fetch time.
Ok, I'm gonna stop right here, not to go into too much detail and the cpu implementation etc. Don't wanna spoil your fun ;)
- there is some arduino shield with an fpga gpu - maybe you can find it and take a look at the sources
- the Gameboy docs can be an example of a full featured console that's still simple enough: http://nocash.emubase.de/pandocs.htm