GCIR - Gamecube Controller Input Redirect 3DS

From GameBrew

GCIR - Gamecube Controller Input Redirect
Gcir3ds2.png
General
AuthorMissingNO123
Last Updated2017/10/03
TypeOther PC Utilities
Version0.2
LicenseMixed
Links
Download
Website
Source

GCIR - Gamecube Controller Input Redirect is a program that allows you to remap GameCube controller to Luma InputRedirect Client, using Python and TPPFLUSH. It also supports remappable keyboard inputs.

The program sends button inputs from a controller over the network to a 3DS running InputRedirect. Hence you will need a device that can run Python and can support controllers, as well as an active internet connection in order to use this.

Features

  • Supports any DInput device (anything your OS sees as a joystick).
  • Also supports Xinput (Xbox 360/One controller).
  • Supports using the keyboard.
  • Supports putting a picture over the touch screen window.
  • Fully re-mappable controls.

User guide

Requirements

  • Python 3.6 or higher, and the PyGame library.
    • PyGame can be installed with the following command pip install pygame.
    • Or, if you have multiple versions of Python installed python -m pip install pygame.
    • You may have to substitute python for either python3 or python3.6 depending on how you installed it.
    • If neither of those work you may have to type the full path to the python executable (i.e. C:\Python36\python.exe).

Configuration

  • Currently mapped for a Gamecube Controller via a USB adapter.
  • Though it technically supports any DInput device (e.g. Windows joystick) or any device that PyGame supports (e.g. XBox 360 Controller).
  • It also supports putting a picture over the touch screen to help with clicking on things. Put a picture named home.jpg in the images folder (or name your own by changing the source).

Gamepad and Joystick

To re-map buttons:

  • Edit the buttonMappings dict (for controllers) or KBDButtons class (for the keyboard) in gamepad.py (or two.py if using multiple systems).
  • The buttonMappings array is a list of every button on your controller in order from 0 mapped to a 3DS button.
  • Button IDs can be found in Windows Game Controller settings (Start> Run...> joy.cpl).

To add a button mapping to the buttonMappings dict:

  • Type the button ID followed by the 3DS button you want it to be mapped to.
  • For example, if you wanted button 0 to be mapped to HIDButtons.A, add this entry to buttonMappings 0: HIDButtons.A.
  • Likewise, if you want button 3 to be A, put 3: HIDButtons.A in the list instead.
  • If you want a high-numbered button (like the XBox 360 Guide button, 15 on some OSes) to be bound to a 3DS button, add empty list entries (zero) in between the last button map and the one you want.

To remap joystick axes (if your controller for some reason uses different ones):

  • Find pygame.JOYAXISMOTION with ctrl+f.
  • Change the joystick axis indices (event.axis == 0 etc).

Keyboard Buttons

  • Edit the KBDButtons class with the keyboard values you want to bind to 3DS buttons.
  • See this list of buttons PyGame uses.
  • This one is more straight forward as everything is named instead of being numbered, for instance to set 3DS button A to be keyboad button J type A = pygame.K_j.

Cloning

When cloning the repository, make sure to use --recursive to download the necessary submodule.

Changelog

v0.2 2017/10/03

  • Added bare-bones support for putting a photo on the touchscreen, wrote the code more neatly, and updated to the latest version of TPPFLUSH.

v0.1.1 2017/09/25

  • Now with Binaries:
    • The Python binaries require Python3 and PyGame installed.
    • The macOS binaries technically work (they run from the command line just fine) but need testing.

v0.1 2018/09/24

  • Releasing becasue it works.

External links