Aug 9

Evening hack: NES controller

Tonight I made an adapter for my old NES control pads, so they would show up as USB devices on my computer.

I used a MinimusAVR USB v1 and a NES adapter from Parallax.

The code uses the LUFA USB stack on the Minimus to emulate a keyboard. Here are the key mappings, easy to find in the source code:

ButtonKey (Pad 1)Key (Pad 2)
UpUp arrowi
DownDown arrowk
LeftLeft arrowj
RightRight arrowl

Here's how the adapter looks:

Source code is on Github: To use, run make dfu in the normal way.

Connect CLOCK to PORTD.3, LATCH to PORTD.2, DATA2 to PORTD.1, and DATA1 to PORTD.0.

As usual, please email me with suggestions or questions.