[Arduino] Library for various Retro-Gamepads (V 1.0)

Started by GrayFox1985, July 28, 2016, 09:18:18 PM

Previous topic - Next topic

GrayFox1985

Hello :)

I hope this is not the wrong forum.  ???

I've made a little library for using various Gamepads with Arduino boards (Atmega untested). At the moment the following gamepads are supported:






| ATARI| SEGA| NINTENDO| MISC
| 7800 1 button Mode| Master System Control Pad| NES Gamepad| Generic 2 Button Gamepad
| 7800 2 button Mode| Genesis 3 button Controller| SNES Gamepad| -
| 7800 2 button Mode| Genesis 6 button Controller| SNES Mouse| -

The library can be found on GitHub. There you can also find a detailed readme and an API-description.

I also created some examples for it.

Example 1: SNES Gamepad as USB mouse

With this sketch you can use yor SNES Gamepad as an USB mouse. It uses the USB-HID functionality of an Arduino Leonardo or Micro to convert the recorded button states into mouse movements and mouse clicks.












| Button| Description
| START| Enable mouse
| D-Pad| Moving the cursor
| B| Left mouse mutton
| A| Right mouse button
| SELECT| Reset sensivitiy
| Y| Sensitivtiy - 1
| X| Sensitivtiy + 1
| R| Acceleration
| L| Middle mouse button

Example 2: Use the supported Gamepads as an USB Gamepad:

The procedure is easy. My library reads, accordingly to the chosen GamepadLayout, the button states of the connected Gamepads and submits those values to the JoyStickLibrary, which uses the USB-HID-functionalty of the Arduino Leonardo / Micro to emulate an USB-Gamepad.

In the sub-folder 'GamepadUsbControlPanel' you can find the 'Arduino Gamepad ControlPanel.exe', which can be used to switch between the GamepadLayouts without the need to alter and re-upload the code. The GUI looks like this.

The SNES Mouse is not fully implemented in this mode.

Maybe it's useful to some of you.