Make a USB NES Controller by x2Jiggy
Featured

Step 3: Determine Controller Configuration

A NES controller has eight inputs (up, right, down, left, select, start, b, a) therefore we need to prepare the keyboard controller to accomodate eight inputs. After looking at the key matrix for my keyboard controller, I can see that the top sheet connects to the first 8 contacts (group A) and the bottom sheet connects to the remaining contacts (group B). Yours may not be the same therefore you should examine which contacts each sheet connects to. This shows that key presses are registered when a connection is made between one of the first 8 contacts and the remaining contacts.

We need to figure out which key presses are registered by connecting the different contacts. You can examine the traces on the key matrix, however considering a NES controller only has 8 buttons. I found it just as easy to connect the controller to a computer, fire up notepad and connect the different contacts with a paperclip. You want to find pin combinations that produce key presses that aren't usually assigned to hot keys or other configuration options. This makes the most ideal inputs the 26 alphabet characters, directional inputs, enter, space etc. Inputs such as the function keys or numbers are usually assigned to hot keys in most emulators and will require additional configuration to make everything play nice. Some of the less common inputs like ~ are not recognised by some emulators also therefore it's best to find all safe inputs for smooth results.

Test each contact by holding one end of a paperclip or wire on a contact in group A and touching the other end on the contacts in group B. When a combination provides a useful input, note down which contacts you connected and continue. Ideally you want to have one button per eight of group A's inputs (to prevent key ghosting) however you will likely find that two or three of the contacts won't produce any useful inputs. To remedy this I used a single contact for two switches (see green and orange wires in images) and will connect them to switches that would never be pressed simultaneously such as up/down and left/right.
 
Remove these adsRemove these ads by Signing Up
ralphulous says: Apr 22, 2012. 9:29 AM
can you elaborate more on the ghosting? why would you use a single contact for two stitches? i don't quite understand.

thanks in advance!
x2Jiggy (author) says: Apr 22, 2012. 11:16 PM
Ideally you will have all 8 inputs using separate pins (8 from either group of pins) to eliminate the problem of key ghosting all together however that's usually not possible. Most likely you will have to use a couple of the pins for two inputs.

If you look at the image where the coloured wires are soldered to the pins of the keyboard controller, you'll notice I was able to use 8 pins of the first group of pins but only 6 pins from the second group because these were the only pins that provided a useful key stroke (The area within the comment box is the second group).

To prevent any potential issues with ghosting, when I had to use a pin for two inputs, I used inputs that would never be pressed simultaneously such as up/down and left/right. Hope this helps! Thanks for reading.
Pro

Get More Out of Instructables

Already have an Account?

close

PDF Downloads
As a Pro member, you will gain access to download any Instructable in the PDF format. You also have the ability to customize your PDF download.

Upgrade to Pro today!