Keyboards and gamepads and ports, oh my!
With Veronica’s input systems working in prototype form, it’s time to get it all installed in the case. The first step in that process is to build a PCB for the keyboard/gamepad circuit, which I’m calling the Input Board. It’s a stunningly inspired bit of nomenclature, I know. Mr. Pulitzer, please email me for where to send the award.
I’ll spare you the gory details of building the board, since I’ve documented that ad nauseum already on this project.
After etching this board, I immediately spotted a face-palm-worthy problem.
Luckily, that was easy to spot. I broke the traces with a sharp knife, and ran jumpers in their place. It looks like I did a Group Move in Eagle on that chip, and didn’t successfully select all the relevant trace nodes. The ERC and DRC checks in Eagle both would have caught this, but as you can guess, I didn’t run them this time. Whoops!
That fixed, I started testing the board under power. My initial tests turned up one tiny niggling problem. When the board was plugged in, Veronica wouldn’t boot. At all. Somehow the presence of this board broke the whole computer. That’s a pretty odd problem, to say the least. There were no dead shorts or anything, but the boot ROM code simply refused to execute. With a mysterious problem like this, my first step is to start pulling chips off the new board to see if the problem goes away. It’s a primitive debugging method, but a quick way to eliminate variables. Well, I ended up pulling every single chip off the board, and the problem persisted. If the bare PCB was on Veronica’s backplane, the ROM wouldn’t boot. Clearly there had to be an error on the board itself.
A visual inspection of the board didn’t reveal any issues. The only clue I had was that Veronica’s power consumption went up about 150mA with the new board plugged in. There isn’t enough hardware on the new board to account for that, but the increase is too small for a dead short. Furthermore, the increase in current persisted even with all the chips removed from the new board. The evidence was pointing to a weak short of some kind, so I started testing all the signal traces for continuity to the ground plane. Sure enough, here’s what I found:
The pad shown is an address line. So, the ROM wasn’t booting because an address line on the bus was being held low, foiling all attempts to decode addresses or fetch code from memory. No wonder it wouldn’t boot! The error is a result of me pushing my etching clearances a little bit too far, as I detailed in a previous post.
With the board complete, I needed to install ports to plug in the peripherals.
I decided to repurpose the knob mounting holes. I needed two gamepad ports and a keyboard port, and the sizes were already pretty close to what I needed. It also saves me measuring to get things spaced out nicely. Thanks, Philco!
The keyboard goes in the middle. The hole was already very close to fitting a USB plug. I just needed to square out the middle with a sharp chisel.
The connector is designed to be mounted in a sheet-metal PC case, so it has some captive nuts in the plastic housing, and it came with small machine screws. These weren’t long enough to go through Veronica’s much classier wood casing. Besides, I didn’t want screw heads showing on the front. Instead, I just drilled out the captive nuts, and ran wood screws through the plastic from behind.
The D-Cannon connectors for the NES gamepads were a little tricker. They have no obvious method of mounting them at all. There are little tabs on the sides, so perhaps those were held captive in some sort of plastic moulded bracket on the original NES case. That wasn’t going to work here.
Instead, I opted to break off those tabs, and simply press-fit the connectors into the wood case. The wood is thick, so there’s lot of friction area to hold them. If they work loose, I can always add some glue later. So far though, they are holding very well.
To get a precise press-fit, I traced the outline of the connectors around the hole.
Note that the corners of the hole need to be rounded. I chose a drill bit that has the same radius as those rounded corners, and drilled them out very carefully. Then, I used a sharp chisel to “connect the dots” as it were. If you take your time, and your chisel is sharp, this is easier to get right than it sounds. If in doubt, make the hole a hair too small, then test fit and file as needed until the connector is a tight fit.
Then it was just a matter of tapping the connectors into place with a block of wood and a hammer.
Repeat that process for the other side, and that’s all there is to it!
So, software next, I suppose? We shall see.