Gamecon driver module for NES, SNES, and N64 controllers Added to RetroPie Setup Script

Drawn by http://www.home.unix-ag.org/simon/penguin/

If you want to use original NES or SNES controllers with your Raspberry Pi, you could use SNESDev, which I have written about some weeks ago. SNESDev makes use of the user-space input module and simulates a virtual keyboard. This means that button presses on the controllers are mapped to key presses on the Raspberry. Another approach for interfacing a controller with the Raspberry from the software side is to use a specific Linux input driver. Marqs has adapted such a driver to the Raspberry Pi hardware and made it available to the public.

Compared to SNESDev using that driver has the advantage that the whole device handling is done in kernel space. This decreases the performance overhead and allows for lower latencies. The SNES adapter board can be used in combination with this driver. I used this wiring:

These are images of the adapter board soldered to the connectors and the the ribbon cable connector ready for assembly:

Besides the source code Marqs provides a pre-compiled module for firmware 3.1.9+. He generously allows to provide a zipped archive for download at the Github site of the RetroPie Setup. You can either use the RetroPie setup script for installing the driver automatically or manually put everything in place. The README that is contained in the download explains the necessary steps for that. Note that root privileges are needed to follow these steps:

For future firmware version the module needs to be re-compiled (at least as long as it is not part of the official Raspbian kernel tree). This involves compiling the kernel sources on your own and takes some time. Marqs puts it like this: “Basically you have to download kernel sources and copy the driver and configs to the kernel tree. Then you’ll need to rebuild the kernel after selecting the module in menuconfig (see http://elinux.org/RPi_Kernel_Compilation). Once the kernel is built, the module can be rebuilt separately (kernel compile is needed just for creation of Module.symvers).”

So far, the driver is working without any problems for me.

Advertisements
This entry was posted in Linux fun, microelectronics fun, programming fun and tagged , , , , , , , , . Bookmark the permalink.

7 Responses to Gamecon driver module for NES, SNES, and N64 controllers Added to RetroPie Setup Script

  1. Pingback: Gamecon driver module for NES, SNES, and N64 controllers Added … | Game Life Abroad

  2. velourfog says:

    Would it be possible to get a diagram to connect the ribbon to the connectors directly (without the PCB)?

  3. Pingback: The RetroPie GPIO Adapter | petRockBlog

  4. Pingback: Video of RetroPie GPIO Adapter | petRockBlog

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s