The hardware in use for the moment is not the perfect setup that I dreamed about. I really would like to have a couple of joystick inputs, a ps/2 keyboard interface and some kind of a speaker output. To be honest I already have this stuff (just not integrated), but I have been coding and for the moment I actually don't need it.
What I have so far is the Terasic DE10-Lite which I already mentioned beforeand that board have a lot of stuff I don't need. If I would select something else I would have a Papilio DUO, add a megashield to that and you have (almost) all interfaces that you need. For a C64 there are obviously a cartridge expansion, floppy and tape interface, user port etc which could be a problem to fit in to that, but in my fpga port I have similar problems. Since I'm not very good at hardware I will have to prepare myself before adding more functionality so I don't break anything.
In the FPGA board I implemented a UART and also a UART parser to handle some basic debug commands - read/write memory etc, but the main thing at the moment is to handle the keyboard. The FPGA UART is connected to an Arduino Mega for one simple reason: I'm not keen on windows programming. I mean, the FPGA could aswell be connected directly to my PC and I could make a simple program to send commands from there, and this is actually on the TODO-list. But instead I have this Arduino connected between the PC and the FPGA. In the PC I use TeraTerm to send commands to the FPGA.
The UART and UART parser are used by a debug interface in the FPGA which is alive all clock cycles the core and vic modules are sleeping, se picture.
In short, the VIC takes phase 0, the core takes (first cycle of) phase 1 and the debug interface takes the idle phase. If badline, the VIC takes both phase 0 and 1 but the idle phase is always dedicated to the debug interface. In this way the core is on 1 MHz and VIC is on 8MHz as I see it.
The Papilio DUO looks like an interesting choice when starting out with FPGA development. Any recommendations when it comes to literature or tutorials for persons with C backgrounds?
No recommendations really, but when it comes to Papilio they have a community, similar to the one for Arduino, which is nice. Also they have a lot of stuff to download and test for yourself. And since it is a Spartan on that, this document would probably help a lot - it helped me too even though it is an Altera (or Intel...) on my board:
https://github.com/hamsternz/IntroToSpartanFPGABook/blob/master/IntroToSpartanFPGABook.pdf
Another source for tutorials you can find on https://www.fpga4fun.com/
And there are a lot of tutorials on the Altera site, I would imagine it's the same on the Xilinx site.
Check out https://www.nandland.com/vhdl/tutorials/tutorial-introduction-to-vhdl-for-beginners.html
or https://course.ccs.neu.edu/cs3650/ssl/TEXT-CD/Content/Tutorials/VHDL/vhdl-tutorial.pdf
Last edit: Fredrik Beckman 2018-09-30