Integration
The first controller is completely finished and functional! Here’s a video with a simple hardware testbench:
https://drive.google.com/open?id=1-t26AU67HpFWBi-JgGNCc6vKCYnEx1PV
Soldering the pullup resistors in was a bit more of a pain than anticipated. I should have left more room between the connector and the side of the box for perfboard real estate. I could have also soldered in wires and had the resistors somewhere else, but that would have been a hassle as well so I just opted for cramming everything in right next to the connector.
VGA cables came in today, so I was finally able to try playing the game with the controller. Up until now all of our gameplay testing has been Deanyone using the switches and keys on the FPGA board. We discovered some issues with crosstalk and edge detection on button presses: when pressing or releasing a button, the signals for other buttons will randomly go high for a short period. I wrote a hardware testbench to try and see how long these bursts appeared for so we could filter them out. In my testing I found that waiting for a signal to remain high for at least 10 cycles of the 50 MHz clock filtered out all crosstalk. Since this is a completely imperceptible amount of time for a human (1/5 of a microsecond) and still allows us to achieve our goal of frame-perfect inputs, we’re going to set the threshold even higher at 100 cycles (2 microseconds) just to be safe.