I have totally re-designed the game to work on a VGA gaming table so it is closer to what you see in a casino. Bets are now entered on the Digilent PMOD KYPD, a 16 key keypad. I am pretty happy with the way it plays. This was a great learning project and I am on to the next one.
My Nexys 4 has arrived and it has much more capacity than the GoBoard. I have updated the game to include a splash screen when starting(first state of FSM), larger dice on the display, and a full betting system with scorekeeping.
I was recently hired as an FPGA Engineer, so my goal is to bring my FPGA skills up to the professional level. I chose to start with the Nandland GoBoard due to it's low cost(65 $), built in peripherals, and very nice website/tutorials. It was easy to get started and I recommend it as an entry level board. I am now maxing out it's possibilities and just ordered a Digilent Nexys 4. Nandland taught me about constraints, using switches and LED's, UART, 7 segment displays, SRAM, and the VGA port. I did one digital design course in University(during the corona semester...so no labs), but I have learned much more by having my own board.
For me, the most useful way to learn is with hands on projects. So, here I am with my first project beyond just using basic peripherals. First, I built a small FPGA 6 sided dice module to work with the 7 segment display. You can find it here on hackster, as well. After that, I thought a fun project would be to build a Casino Craps game using the dice and integrating everything that I have learned thus far from the GoBoard. So, this is a fun little learning project that builds upon my FPGA dice idea.
Step 1 is to place a bet. Currently, this can be any integer 0 to 9 and is communicated via UART to the FPGA.
Step 2 is to roll the dice! Press Switch 4 on the Board to roll the dice. This command could also come from UART, but I wanted to integrate as many peripherals as possible.
If you roll 7 or 11, you immediately win this round. If you roll 2, 3, or 12, then you immediately lose this round. If you roll 4, 5, 6, 7, 8, 9, or 10 then this is your point number. You must roll the point number again before rolling a 7 in order to win. If 7 comes before the point number then you lose!
The flow of the game is controlled by a Finite State Machine. The state machine moves to the next state only when certain conditions are met. When you win or lose you go back to the first state to place a new bet. If you hit a point number you go back to the roll state and keep rolling until you hit your point number or 7. It is pretty simple, but a good demonstration of an FSM.
You can find all required modules on my Github page. Everything is public. Have fun!
Leave a comment if you have any thoughts or ideas on how else I could expand it.