Thursday, June 21, 2012

I should also mention that this book is really great so far. Jeri Ellsworth recommended it.  It shows schematics, VHDL, and Verilog side-by-side.  This book has convinced me that as a C/C++ programmer, I'd probably rather be using Verilog instead of VHDL.


HLD_Chip_Design

Back to FPGA! Starting on FPGA Berzerk.

berzerk
I managed to get my Berzerk board set back up and running just in time for the 2012 Northwest Pinball and Arcade Show.  Berzerk is a particularly flaky board set due to a number of issues:
  1. Battery at the top of the whole board set that has a tendency to leak and cause acid damage.
  2. Tons of small boards with flaky interconnects.
  3. Bad power supply design.
This is what a Berzerk board set looks like:

berzerkboardset

Now that my Berzerk machine is working properly, I figure it's a good time to make some progress on learning about FPGA development.  Berzerk is a good test case for this since I can implement a small board that is less complicated than a typical arcade board and test it in circuit with the real hardware.  After all of the individual boards are implemented and tested in circuit with the real hardware, they can all be linked together inside of a single FPGA chip on a simple and much more reliable board.

From what I've heard, Berzerk started off development as a black and white raster game.  Close to the end of development, the team saw Galaxian, which is the first color arcade game made.  They decided that in order to be competitive, they'd need to add color support to Berzerk.  They did this by tacking on a dedicated board for dealing with color, which is the "Buffer System Color" board.  In the pictures above, this is the wide/short board in the middle of the set.  Here's the schematic for the BSC board:

bsc_schematic

You can see the full resolution Berzerk schematics here: http://arcarc.xmission.com/PDF_Arcade_Manuals_and_Schematics/Berzerk.pdf

Now that I'm working in the same room as Jeri Ellsworth, it's really hard not to pick this stuff back up.  She is super helpful when I can't figure stuff out.  My friends Rick and Tanio plan on helping out with this too.

Since the BSC board is the simplest board in the set, I'm starting with it.  Here's what the BSC board looks like:

BSC

The plan is to make a board that has all of the resistors that are near the boundary of the circuit.
  1. J1, J2, J7, and J8 data bus connectors as on the original BSC board.
  2. J3 and J4 expansion bus connectors for connecting to the original frame buffer board as on the original BSC board.
  3. 6-pin molex head for video output.
  4. Resistors on the right side of the schematic that make a simple 6-bit digital-to-analog (DAC) converter for video output.  There are two bits for each of red, green, and blue.
  5. Resistors on the left side of the schematic on the data lines that are there to avoid reflections.  (Jeri had to clue me on as to why these are there.)
  6. Something to convert from the 3.3V logic that is internal to the FPGA to the 5V logic on the original board set.  Here's a discussion on how to do this with resistors: http://dbaspot.com/arch/381380-spartan-3e-intefacing-dummies.html.  Via email, Jrok says "You can always buffer the 5v bus with something like a voltage level converter, the IDT quickswitch IDTQS3245 is a good example. Then you can run any 3.3v part and not have to worry about 5v tolerance on the FPGA side and use something like the Xilinx spartan 6 parts." I may go ahead and order some of those to be safe.
  7. Connectors to interface to the FX2 board and the LCD connector on the dev board.
The resistors in the middle of the schematic are just there as pull-ups.  Will implement those internally in Verilog logic.  I'll hard code the dipswitches to what is appropriate for the monitor that I'm using with my Berzerk for prototyping just the BSC board.

So far I have all the parts together to make an interface board.  I've gone through a couple of tutorials to interface from Verilog and schematic capture to the I/O pins on the FPGA: Xilinx Verilog Tutorial and Xilinx Schematic Capture Tutorial.