Interfacing With a NES Gamepad

Описание к видео Interfacing With a NES Gamepad

I was intrigued by some comments about NES controller interfacing in the 8-Bit Guy's "Commander x16" project group. So I thought I would investigate.

I've always planned on adding some kind of gaming input to my processor/computer build but I had been thinking about classic microcomputer joysticks which are mostly just switches connected directly to specific pins on the port. This was a bit more interesting but I managed to get it working without too much difficulty. There are some great tutorials on doing this in software on platforms like the Arduino but I want my peripherals to be just as "from scratch" as my cpu.

In conclusion I'll probably use this circuit (or a revision on it) when I need some input, it's far more interesting and I'll get some extra buttons.

Notes and possible tweaks:
a) I believe the SNES uses the same system, but has 16bits to shift out.
b) I essentially built a 4 input AND gate using 3x 2 input gates. You could use a single 4 input gate or (as I have modified it to in the cover image) put the 4 inputs into 2 different gates and then combine them with the third. This configuration is 2 gates deep instead of 3.
c) You should be able to use the carry out line (via a NOT gate) as the latch signal, for 8 bits you would need to divide the clock by 2 (Use the least significant bit from the counter as the clock).
d) You could of course wire the outputs from the shift register directly to a bus and use "output enable" to assert the value, but then the circuit would have a depressing lack of status led's.

Комментарии

Информация по комментариям в разработке