GCIR - Gamecube Controller Input Redirect 3DS: Difference between revisions

From GameBrew
No edit summary
No edit summary
 
(18 intermediate revisions by the same user not shown)
Line 1: Line 1:
{{Infobox 3DS homebrew
{{Infobox 3DS Homebrews
| title = GCIR - Gamecube Controller Input Redirect
|title=GCIR - Gamecube Controller Input Redirect
| type = Utilities
|image=Gcir3ds2.png
| version = v0.2
|description=Gamepad to Luma InputRedirect, in Python.
| licence = Mixed
|author=MissingNO123
| author = MissingNO123
|lastupdated=2017/10/03
| website = https://github.com/MissingNO123/GCIR
|type=PC Utilities
| download = https://dlhb.gamebrew.org/3dshomebrew/GCIR---Gamecube-Controller-Input-Redirect-3DS.rar
|version=0.2
| source = https://dlhb.gamebrew.org/3dshomebrew/GCIR---Gamecube-Controller-Input-Redirect-3DS.rar
|license=Mixed
|download=https://dlhb.gamebrew.org/3dshomebrews/gcir3ds.7z?k33p0fil35
|website=https://github.com/MissingNO123/GCIR
|source=https://github.com/MissingNO123/GCIR
}}
}}
<youtube>mWdZq0hufvo</youtube>
GCIR - Gamecube Controller Input Redirect is a program that allows you to remap GameCube controller to [[Luma3DS|Luma]] InputRedirect Client, using Python and [https://github.com/hlixed/TPPFLUSH TPPFLUSH]. It also supports remappable keyboard inputs.


= GCIR - Gamecube Controller Input Redirect =
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.
Fully re-mappable GCN controller to Luma InputRedirect. Also supports remappable keyboard inputs.
 
== Features ==
==Features==
* Supports any DInput device (anything your OS sees as a joystick)
* Supports any DInput device (anything your OS sees as a joystick).
* Also supports Xinput (Xbox 360/One controller)
* Also supports Xinput (Xbox 360/One controller).
* Supports using the keyboard
* Supports using the keyboard.
* Supports putting a picture over the touch screen window
* Supports putting a picture over the touch screen window.
* Fully re-mappable controls
* Fully re-mappable controls.
== Configuration ==
 
=== Gamepad Buttons ===
==User guide==
To re-map buttons, edit the buttonMappings dict (for controllers) or KBDButtons class (for the keyboard) in gamepad.py. 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 <code>0</code> to be mapped to <code>HIDButtons.A</code>, add an entry to <code>buttonMappings</code> like so:
===Requirements===
<pre>0: HIDButtons.A
* [https://python.org Python 3.6] or higher, and the PyGame library.
</pre>
** PyGame can be installed with the following command <code>pip install pygame</code>.
Likewise, if you want button 3 to be A, put <code>3: HIDButtons.A</code> in the list instead. Button IDs can be found in Windows Game Controller settings (Start &gt; Run... &gt; joy.cpl)
** Or, if you have multiple versions of Python installed <code>python -m pip install pygame</code>.
=== Joystick Axes ===
** You may have to substitute <code>python</code> for either <code>python3</code> or <code>python3.6</code> depending on how you installed it.
To remap joystick axes (if your controller for some reason uses different ones) find <code>pygame.JOYAXISMOTION</code> with ctrl+f and change the joystick axis indices (<code>event.axis == 0</code> etc). <s>(I will fix that later)</s>
** If neither of those work you may have to type the full path to the python executable (i.e. <code>C:\Python36\python.exe</code>).
=== Keyboard Buttons ===
 
Edit the KBDButtons class with the keyboard values you want to bind to 3DS buttons. [https://www.pygame.org/docs/ref/key.html Here is a list of buttons PyGame uses.] This one is a lot easier since everything is named instead of being numbered, so if you wanted to set 3DS button A to be keyboad button J you would type:
===Configuration===
<pre>A = pygame.K_j
* Currently mapped for a Gamecube Controller via a USB adapter.
</pre>
* Though it technically supports any DInput device (e.g. Windows joystick) or any device that PyGame supports (e.g. XBox 360 Controller).
== Requirements ==
* It also supports putting a picture over the touch screen to help with clicking on things. Put a picture named <code>home.jpg</code> in the images folder (or name your own by changing the source).
Requires Python 3.6 or higher, and the PyGame library. Python can be downloaded from [https://python.org its website] PyGame can be installed with the following command:
 
<pre>pip install pygame
===Gamepad and Joystick===
</pre>
To re-map buttons:
or, if you have multiple versions of Python installed:
* Edit the buttonMappings dict (for controllers) or KBDButtons class (for the keyboard) in gamepad.py (or two.py if using multiple systems).
<pre>python -m pip install pygame
* The buttonMappings array is a list of every button on your controller in order from <code>0</code> mapped to a 3DS button.
</pre>
* Button IDs can be found in Windows Game Controller settings (Start> Run...> joy.cpl).
You may have to substitute <code>python</code> for either <code>python3</code> or <code>python3.6</code> 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. <code>C:\Python36\python.exe</code>)
 
== Cloning ==
To add a button mapping to the buttonMappings dict:
When cloning this repository, make sure to use <code>--recursive</code> to download the necessary submodule.
* Type the button ID followed by the 3DS button you want it to be mapped to.  
* For example, if you wanted button <code>0</code> to be mapped to <code>HIDButtons.A</code>, add this entry to buttonMappings <code>0: HIDButtons.A</code>.
* Likewise, if you want button <code>3</code> to be <code>A</code>, put <code>3: HIDButtons.A</code> 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 <code>pygame.JOYAXISMOTION</code> with ctrl+f.
* Change the joystick axis indices (<code>event.axis == 0</code> etc).
 
===Keyboard Buttons===
* Edit the KBDButtons class with the keyboard values you want to bind to 3DS buttons.  
* See this [https://www.pygame.org/docs/ref/key.html 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 <code>A</code> to be keyboad button <code>J</code> type <code>A = pygame.K_j</code>.
 
===Cloning===
When cloning the repository, make sure to use <code>--recursive</code> 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 [https://github.com/hlixed/TPPFLUSH 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==
* GitHub - https://github.com/MissingNO123/GCIR
* GBAtemp - https://gbatemp.net/threads/release-gcir-fully-re-mappable-controller-to-luma-inputredirect-using-python-and-tppflush.485731
 
[[Category:3DS homebrew applications]]
[[Category:PC utilities for 3DS homebrew]]

Latest revision as of 03:21, 1 February 2024

GCIR - Gamecube Controller Input Redirect
Gcir3ds2.png
General
AuthorMissingNO123
TypePC Utilities
Version0.2
LicenseMixed
Last Updated2017/10/03
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

Advertising: