Difference between revisions of "Controllers"

From Pandora Wiki
Jump to: navigation, search
(Update Compatibility List)
(added link to x360 program on repo)
 
(3 intermediate revisions by one other user not shown)
Line 119: Line 119:
  
 
== MS Xbox360 controller ==
 
== MS Xbox360 controller ==
[http://boards.openpandora.org/index.php?/topic/430-xboxdrv-support-for-xbox-and-xbox-360-wired-and-wireless-controllers/ link]
+
[http://repo.openpandora.org/?page=detail&app=xboxdriver repo link]
 +
[http://boards.openpandora.org/index.php?/topic/430-xboxdrv-support-for-xbox-and-xbox-360-wired-and-wireless-controllers/ forum link]
 +
 
  
 
== Sony PS3 controller ==
 
== Sony PS3 controller ==
Line 157: Line 159:
 
! Program
 
! Program
 
! Link
 
! Link
! Custom Mapping
+
! Button Mapping
 
! [http://repo.openpandora.org/?page=detail&app=qjoypad-001 QJoyPad] Compatible
 
! [http://repo.openpandora.org/?page=detail&app=qjoypad-001 QJoyPad] Compatible
 
! Additional comments
 
! Additional comments
Line 177: Line 179:
 
| {{Yes}}
 
| {{Yes}}
 
| n/a
 
| n/a
| Custom key maps work great. Make sure to use the linked version of the PND. Other versions in the Repo suffer from crashes when external controllers are set up.
+
| Custom key maps work great. Bluetooth controller input does not currently prevent the Pandora from going to low poer mode, and the emulator will begin to freeze after the Pandora thinks that it is idle and turns on power saving. Suggest turning off idling power save while you play with a controller.
 
|-
 
|-
 
| Not Tetris
 
| Not Tetris
Line 189: Line 191:
 
| {{No}}
 
| {{No}}
 
| {{Yes}}
 
| {{Yes}}
| QJoyPad works fine. Map Start to help you begin a new round.
+
| QJoyPad works fine. Map Start in order to help you begin a new round.
 
|-
 
|-
 
| Mini Slug Project
 
| Mini Slug Project
Line 202: Line 204:
 
| n/a
 
| n/a
 
| If your controller is not already supported, it can be mapped by editing InputAutoConfig.ini - OUYA controllers and Mayflash GameCube-to-USB can be mapped and auto-detected using the following [https://drive.google.com/file/d/0B7nHCkhKNgw3cXhNVlc0WldGSUk/view?usp=sharing InputAutoCfg.ini]
 
| If your controller is not already supported, it can be mapped by editing InputAutoConfig.ini - OUYA controllers and Mayflash GameCube-to-USB can be mapped and auto-detected using the following [https://drive.google.com/file/d/0B7nHCkhKNgw3cXhNVlc0WldGSUk/view?usp=sharing InputAutoCfg.ini]
|-
 
| Jedi Knight II: Jedi Outcast
 
| [http://repo.openpandora.org/?page=detail&app=jedioutcast_ptitseb repo]
 
| {{Maybe | Works With Issues}}
 
| {{No}}
 
| Can map buttons easily in-game, but have not found a way to map mouse look to the Right Analog Stick. Using QJoyPad to mimic mouse movement crashes the game. Playable with the OUYA Controller if you use the trackpad instead to control mouse look.
 
 
|-
 
|-
 
| Jedi Knight II: Jedi Outcast
 
| Jedi Knight II: Jedi Outcast

Latest revision as of 21:51, 19 March 2015

Nintendo Wiimote

This includes instructions on installing software and configuration to pair Nintendo Wii Wiimotes using Bluetooth to the Pandora, and using them as joystick controllers. This was done under the base install of Angstrom Linux provided on the Pandora, using Hotfix 4. This does not include setting up a sensor bar type setup, but should allow you to use classic controllers that plug into the Wiimote.

Installing the Drivers

Open a Terminal, and run the command

sudo opkg update

It will give you a warning about responsibility, and asks for your user password. This will update the Angstrom packages stored on NAND.

Then install the Wiimote drivers and software, cwiid, using the command

sudo opkg install cwiid

Pairing the Wiimote

Make sure Bluetooth is enabled. In Hotfix 4, there's a script to "Toggle Bluetooth Status" in the Pandora menu under the "System" category. A light will turn on on the left hand side of the Pandora if Bluetooth is on, next to the network light.

Open a Terminal, and run the command and follow the directions.

wminput

It will tell you to press 1+2 on the Wiimote to connect. On my Wiimotes, the lights flash and the fourth light on the Wiimote lights solid once paired. If you then quit the wminput application (for instance, by hitting CTRL-C), your Wiimote will un-pair and turn off. I usually just hide the Terminal in the background by minimizing the window while I run game emulators.

You can pair multiple Wiimotes, just run wminput a second time and follow the instructions to pair it. I only have two, and both lit the fourth light.

In PicoDrive, the Sega Genesis emulator, in the controller settings, if you push left or right it will display different joysticks configured. You can set up the buttons for different players there. The Wiimotes appeared as joysticks 1 and 2, in the order in which I paired them.

Changing the Wiimote Configuration

You can edit /etc/cwiid/wminput/default and /etc/cwiid/wminput/buttons to map the buttons of the Wiimote. You should quit wminput and restart them for these changes to take effect. They are plain text files. I edited them using vim from the command line, which is not the most user friendly thing to describe. Because they're system files, I needed to use sudo again, so I ran

sudo vim /etc/cwiid/wminput/default

By default, the Wiimote is set up to control the mouse with the accelerometer. This means, as you tilt the Wiimote left and right, your mouse will shift around. I found it a bit distracting, and so I commented out two lines in /etc/cwiid/wminput/default so they look like this:

#Plugin.acc.X   = REL_X
#Plugin.acc.Y   = REL_Y

Also, I use the Wiimote "sideways", like a traditional Nintendo controller. I changed the direction pad to reflect this. Though you can do that within emulator configurations, it seemed handier to just have that set up by default. To do this, make these changes in /etc/cwiid/wminput/buttons

Wiimote.Up      = KEY_LEFT
Wiimote.Down    = KEY_RIGHT
Wiimote.Left    = KEY_DOWN
Wiimote.Right   = KEY_UP

It is also possible to map the Wiimote or extension buttons to a virtual gamepad. See below for instructions.

Nintendo Wii Classic Controller

There are two ways to use a Wiimote or Classic Controller with the Pandora:

  • As a virtual gamepad. This means you can use it in games that support gamepads, and allows multiplayer in games that support it, but won't work in games that don't support gamepads.
  • As a clone of the Pandora's gaming controls, by mapping it to the same keys. This theoretically means it would work in games that don't have gamepad support, or allow you to change the controls at all, as long as they are using the Pandora controls. However, currently, not all games will register the input with this method. SuperTux, OpenTyrian, PandoraPanic and Snes9X4D4P will. Giana's Return, Sqrxz and psx4pandora won't. Additionally, Mupen64Plus with the default PPSP Input Plugin won't - but the Blight Input Plugin will.

As a virtual gamepad

The default profile doesn't have classic controller buttons defined, but cwiid comes with a gamepad profile which does. You can load it in wminput like this using a terminal:

wminput -c gamepad

Then connect your Wiimote and Classic Controller. You do not have to connect the Classic Controller before you connect the Wiimote.

However the analog sticks/dpad seemed to be set up wrong in the gamepad profile (/etc/cwiid/wminput/gamepad):

Classic.Dpad.X = ABS_X
Classic.Dpad.Y = ABS_Y
Classic.LStick.X = ABS_HAT0X
Classic.LStick.Y = ABS_HAT0Y
Classic.RStick.X = ABS_HAT1X
Classic.RStick.Y = ABS_HAT1Y

should be replaced with:

Classic.Dpad.X = ABS_HAT0X
Classic.Dpad.Y = ABS_HAT0Y
Classic.LStick.X = ABS_X
Classic.LStick.Y = ABS_Y
Classic.RStick.X = ABS_RX
Classic.RStick.Y = ABS_RY

Otherwise, you won't get proper analog input from the sticks, since PoV hats aren't analog.

As a clone of the Pandora's gaming controls

This method works well where it does, you get a clone of the Pandora's gaming controls (minus the nubs), that should theoretically work in all games that support the Pandora's gaming controls. However, because of differences in how the games receive input, not all will detect the "fake" input.

Here is the profile for the Pandora gaming controls:

# D-Pad
Classic.Up	= KEY_UP
Classic.Down	= KEY_DOWN
Classic.Left	= KEY_LEFT
Classic.Right	= KEY_RIGHT

# Select, Start and Space
Classic.Minus	= KEY_LEFTCTRL
Classic.Plus	= KEY_LEFTALT
Classic.Home	= KEY_SPACE

# BXYA on Pandora
Classic.A		= KEY_END
Classic.B		= KEY_PAGEDOWN
Classic.X		= KEY_PAGEUP
Classic.Y		= KEY_HOME
Classic.ZL		= KEY_Q
Classic.ZR		= KEY_P
Classic.L		= KEY_RIGHTSHIFT
Classic.R		= KEY_RIGHTCTRL

Save that in /etc/cwiid/wminput - you can name it whatever you want, as long as you load it in wminput using "wminput -c filename" - and make sure to save it using UNIX line endings (LF).

Once the profile is loaded and your Wiimote/Classic Controller is connected, it will automatically work in some games, but not in others. This might be possible to change to work in all games by modifying the wminput source code.

Extra Information

MS Xbox360 controller

repo link forum link


Sony PS3 controller

link

OUYA Controller

The OUYA controller plays extremely well with the Pandora. As with the Wii controller above, many games that support joystick input will work automatically or by using in game mappers. For most other games, QJoyPad allows the OUYA controller to mimic the Pandora controls. The controller has enough excess buttons to map keys that are helpful in navigation, such as Enter, Escape, Start, Select, and Right Click.

The touch pad on the OUYA controller can control mouse movement and perform Left Click/Drag.

How to Connect

1. Turn on Bluetooth Hardware.

2. Hold down the OUYA button on the gamepad(s) until two lights are flashing.

3. Enter the following into a terminal:

hcitool scan

Output should look like:

AD:DR:ES:SO:UY:A1           Broadcom Keyboard
AD:DR:ES:SO:UY:A2           Broadcom Keyboard1

4. Then, for each of the controllers you would like to pair, use the hidd command with the address output from your terminal. For example, the first controller listed above:

sudo hidd --connect AD:DR:ES:SO:UY:A1

If all goes well, there should be no output, and the first light on the controller should be lit.

Mayflash GameCube to USB Adaptor

These adapters must be plugged in through a USB 2.0 hub, but are plug n' play after that. As with other controllers, QJoyPad is necessary for some programs in order to mimic the Pandora Controls.

Program Specific Compatibility

After a controller is paired and found to be working with the Pandora, the following compatibility list can be used as a guide:

Program Link Button Mapping QJoyPad Compatible Additional comments
DraStic repo No No No method found yet for using external controllers
PanMAME repo Yes n/a
SNES9x EX+ repo Yes n/a Custom key maps work great. Bluetooth controller input does not currently prevent the Pandora from going to low poer mode, and the emulator will begin to freeze after the Pandora thinks that it is idle and turns on power saving. Suggest turning off idling power save while you play with a controller.
Not Tetris repo No Yes QJoyPad works fine. Map Escape and Enter to help with pausing and selections.
Flying Snake repo No Yes QJoyPad works fine. Map Start in order to help you begin a new round.
Mini Slug Project repo Works with issues No Game auto maps the OUYA controller fine, but maps the directional to the left stick. Have not found a way to use the D-Pad. QJoyPad is ignored.
Mupen64plus v2.1 repo Yes n/a If your controller is not already supported, it can be mapped by editing InputAutoConfig.ini - OUYA controllers and Mayflash GameCube-to-USB can be mapped and auto-detected using the following InputAutoCfg.ini
Jedi Knight II: Jedi Outcast repo Works With Issues No Can map buttons easily in-game, but have not found a way to map mouse look to the Right Analog Stick. Using QJoyPad to mimic mouse movement crashes the game. Playable with the OUYA Controller if you use the trackpad instead to control mouse look.
Duck Marines repo Automap Is Not Playable No Game detects external controllers and automaps, but the mapped controls are not usable for some controllers, and I have not yet found a way to correctly remap them.
PCSX ReARMed repo Yes n/a Custom control maps work wonderfully.