I recently set up mupen64 plus with a couple of controllers I had. Here
is a configuration for the logitech wingman cordless:
[Logitech WingMan Cordless Gamepad]
plugged = True
plugin = 2
mouse = False
AnalogDeadzone = 4096,4096
AnalogPeak = 32768,32768
DPad R = hat(0 Right)
DPad L = hat(0 Left)
DPad D = hat(0 Down)
DPad U = hat(0 Up)
Start = button(8)
Z Trig = button(9)
B Button = button(3)
A Button = button(0)
C Button R = button(2)
C Button L = button(4)
C Button D = button(1)
C Button U = button(5)
R Trig = button(7)
L Trig = button(6)
#Mempak switch = button(6)
Rumblepak switch = button(10)
X Axis = axis(0-,0+)
Y Axis = axis(1-,1+)
It is this one:
http://www.amazon.com/Logitech-WingMan-Cordless-Rumblepad-2-4/dp/B00005USQA
It has six face buttons, so it is configured exactly as the n64 controller.
The top shoulder buttons R1 and L1 are the R and L triggers.
The Z button is the L2 shoulder button.
Rumble is working and is activated with the R2 shoulder button.
I also tried a wii remote with the classic controller. It is working after
some experimentation using wminput.
[Nintendo Wiimote]
plugged = True
plugin = 2
mouse = False
AnalogDeadzone = 4096,4096
AnalogPeak = 26000,26000
DPad R = hat(0 Right)
DPad L = hat(0 Left)
DPad D = hat(0 Down)
DPad U = hat(0 Up)
Start = button(9)
Z Trig = button(6)
B Button = button(3)
A Button = button(1)
C Button R = axis(2+)
C Button L = axis(2-)
C Button D = axis(3+)
C Button U = axis(3-)
R Trig = button(5)
L Trig = button(4)
#Mempak switch = button(6)
#Rumblepak switch = button(7)
X Axis = axis(0-,0+)
Y Axis = axis(1-,1+)
The analog joysticks don't make it to 32768, but the analog peak
specified covered it for me. It may require fine tuning.
The C buttons are mapped to the right analog stick.
The Z trigger is ZL.
+ is start.
b and y map to a and b, respectively.
Here is the wminput gamepad config I used:
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
Classic.A = BTN_A
Classic.B = BTN_B
Classic.X = BTN_X
Classic.Y = BTN_Y
Classic.Minus = BTN_SELECT
Classic.Plus = BTN_START
Classic.Home = BTN_MODE
Classic.L = BTN_TL
Classic.R = BTN_TR
Classic.ZL = BTN_TL2
Classic.ZR = BTN_TR2
For some reason, the Y axes seemed to be inverted compared to the other
controllers so the - flips them.
I made 4 other config files to include that base configuration and light
up the right led as well. They just look something like this:
include gamepad
Plugin.led.Led1 = 1
The event files created by wminput weren't useable by default, so I made
a udev configuration file like this:
KERNEL=="uinput", MODE="0660", GROUP="input"
KERNEL=="event*", MODE="0660", GROUP="input"
KERNEL=="js*", MODE="0664", GROUP="input"
I created and added my user to the input group.
It seems to be much better to specify the wii remote address for
wminput. It seems wminput also doesn't like being backgrounded. I made
this wrapper script:
#!/bin/sh
pkill wminput && sleep 2
xterm -e wminput -c /etc/cwiid/wminput/gamepad3 -d XX:XX:XX:XX:XX:XX &
xterm -e wminput -c /etc/cwiid/wminput/gamepad4 -d XX:XX:XX:XX:XX:XX &
# wii remotes are for players 3 and 4
for i in js2 js3; do
echo -n waiting for wii remote device $i
while [ ! -c /dev/input/$i ]; do
echo -n .
sleep 1
done
echo
done
./mupen64plus --fullscreen --resolution 1920x1080 "$@"
pkill wminput