how to configure PS3 Compatible wireless controller? (Universal Controller xboxdrv)
-
While I don't have experience in configuring
xboxdrv
, here are some notes on the setup you've been working on:- you're starting the
xboxdrv
service both at system boot - through/etc/rc.local
- and also when stating a game - via theonstart
script. You should chose one of the methods, preferably the one via theonstart
script, since it will add the new controller only for themsx
system and not globally. This way the PS3 controller can be used as-is for other systems.
- the
udev
rule for creating a stable symlink can omit theENV{ID_MODEL}
part and still work, since it would still find your PS3 controller.
ATTRS{name}=="Sony PLAYSTATION(R)3 Controller", ENV{DEVNAME}=="/dev/input/event*", SYMLINK+="/dev/input/ps3controller"
You can then use
/dev/input/ps3controller
in the--evdev
argument toxboxdrv
.- the
onstop
script should stop thexboxdrv
, not start again another instance. So modify it to contain
sudo killall xboxdrv
- you need to start the joystick selection tool after you start
xboxdrv
, otherwise the new gamepad/device will not be available for selection. Modify theonstart
script and switch the order of the commands.
As an alternative emulator, you can try
lr-fmsx
which allows the re-binding of the gamepad buttons to keyboard keys, kind of whatxboxdrv
does, but you can do it from the Core option, so you can have per-game configurations without messing withxboxdrv
. - you're starting the
-
Hello,
Thank you for your valuable feedback. I have taken note and run more tests. Here is the outcome:
rc.local left as default:
pi@retropie:~ $ sudo cat /etc/rc.local #!/bin/sh -e # # rc.local # # This script is executed at the end of each multiuser runlevel. # Make sure that the script will "exit 0" on success or any other # value on error. # # In order to enable or disable this script just change the execution # bits. # # By default this script does nothing. # Print the IP address _IP=$(hostname -I) || true if [ "$_IP" ]; then printf "My IP address is %s\n" "$_IP" fi exit 0
85-jseventname.rules is edited:
pi@retropie:~ $ sudo cat /etc/udev/rules.d/85-jseventname.rules ATTRS{name}=="Sony PLAYSTATION(R)3 Controller", ENV{DEVNAME}=="/dev/input/event*", SYMLINK+="/dev/input/ps3controller"
In order to minimize conflict, I have removed joystick selection from runcommand-onstart.sh
pi@retropie:~ $ cat /opt/retropie/configs/all/runcommand-onstart.sh #!/bin/sh if [ "$1" = "msx" ] then sudo killall >> /dev/shm/runcommand.log 2>&1 xboxdrv sudo /opt/retropie/supplementary/xboxdrv/bin/xboxdrv \ --evdev /dev/input/ps3controller \ --silent \ --detach-kernel-driver \ --force-feedback \ --deadzone-trigger 15% \ --deadzone 4000 \ --device-name "VIRTUAL-XBOX360-CONTROLLER-FOR-PSX3" \ --dpad-as-button \ --evdev-keymap BTN_DPAD_UP=du,BTN_DPAD_DOWN=dd,BTN_DPAD_LEFT=dl,BTN_DPAD_RIGHT=dr \ --evdev-keymap BTN_EAST=a,BTN_SOUTH=b,BTN_NORTH=x,BTN_WEST=y \ --evdev-keymap BTN_SELECT=back,BTN_START=start \ --evdev-keymap BTN_TL=lb,BTN_TR=rb \ --evdev-keymap BTN_TL2=lt,BTN_TR2=rt \ --evdev-keymap BTN_THUMBL=tl,BTN_THUMBR=tr \ --evdev-keymap BTN_MODE=guide \ --evdev-absmap ABS_X=x1,ABS_Y=y1,ABS_RX=x2,ABS_RY=y2 \ --ui-buttonmap du=void,dd=void,dl=void,dr=void \ --ui-buttonmap back=KEY_0,start=KEY_SPACE \ --ui-buttonmap a=void,b=KEY_F,x=KEY_A,y=KEY_P \ --ui-buttonmap lb=KEY_1,rb=KEY_2,lt=void,rt=void \ --ui-buttonmap tl=void,tr=void \ --ui-buttonmap guide=void \ --ui-axismap x1=void,x2=void \ & fi
runcommand-onend.sh is edited as well:
pi@retropie:~ $ cat /opt/retropie/configs/all/runcommand-onend.sh sudo killall xboxdrv
sudo reboot
Once EmulationStation shows on the screen I press P3 button on PS3 Compatible Wireless Controller to start it, controller syncs and I can navigate EmulationStation with it.
RetroPie > RetroArch
shows
Sony PLAYSTATION(R)3 Controller configured in port #0
usb gamepad configured in port #1I can play Atari 2600 or Megadrive videogames with PS3 Compatible Wireless Controller, as expected.
When launching MSX videogame, the screen shows:
xboxdrv 0.8.8 [...] --- [ERROR] --- /dev/input/ps3controller: No such file or directory
Then the launching box opens but is irresponsive.
Then two text boxes show at the bottom left:
Sony PLAYSTATION(R)3 Controller configured in port #0
usb gamepad configured in port #1And finally the emulator (libretocore) starts, shows videogame but it is not playable (irresponsive to any button, dpad...). The good thing is that onend.sh script works and I can quit by pressing default Hotkey+Start.
pi@retropie:~ $ cat /proc/bus/input/devices I: Bus=0003 Vendor=0810 Product=e501 Version=0110 N: Name="usb gamepad " [...] I: Bus=0005 Vendor=054c Product=0268 Version=8000 N: Name="Sony PLAYSTATION(R)3 Controller Motion Sensors" [...] I: Bus=0005 Vendor=054c Product=0268 Version=8000 N: Name="Sony PLAYSTATION(R)3 Controller" [...]
Checking the content of runcommand.log shows...
pi@retropie:~ $ sudo cat /dev/shm/runcommand.log xboxdrv: no process found Parameters: Executing: /opt/retropie/emulators/retroarch/bin/retroarch -L /opt/retropie/libretrocores/lr-bluemsx/bluemsx_libretro.so --config /opt/retropie/configs/msx/retroarch.cfg "/home/pi/RetroPie/roms/msx/Navy Moves (1988)(Dinamic Software)(ES)(Side A)[t +2].rom" --appendconfig /dev/shm/retroarch.cfg [CDROM] No sg devices found and sg kernel module is not loaded.
So my understanding is, since onstart.sh does not succeed in running xboxdrv (ps3controller: No such file or directory error), runcommand.log displays xboxdrv: no process found
Rebooting and synching PS3 Compatible remote controller on system startup (4 raspberries show on the top left of the screen), results in synch as expected but the situation is the same as in previous test case.
As an additional test, running the xboxdrv command directly from the prompt results in:
pi@retropie:~ $ sudo /opt/retropie/supplementary/xboxdrv/bin/xboxdrv \ > --evdev /dev/input/ps3controller \ > --silent \ > --detach-kernel-driver \ > --force-feedback \ > --deadzone-trigger 15% \ > --deadzone 4000 \ > --device-name "VIRTUAL-XBOX360-CONTROLLER-FOR-PSX3" \ > --dpad-as-button \ > --evdev-keymap BTN_DPAD_UP=du,BTN_DPAD_DOWN=dd,BTN_DPAD_LEFT=dl,BTN_DPAD_RIGHT=dr \ > --evdev-keymap BTN_EAST=a,BTN_SOUTH=b,BTN_NORTH=x,BTN_WEST=y \ > --evdev-keymap BTN_SELECT=back,BTN_START=start \ > --evdev-keymap BTN_TL=lb,BTN_TR=rb \ > --evdev-keymap BTN_TL2=lt,BTN_TR2=rt \ > --evdev-keymap BTN_THUMBL=tl,BTN_THUMBR=tr \ > --evdev-keymap BTN_MODE=guide \ > --evdev-absmap ABS_X=x1,ABS_Y=y1,ABS_RX=x2,ABS_RY=y2 \ > --ui-buttonmap du=void,dd=void,dl=void,dr=void \ > --ui-buttonmap back=KEY_0,start=KEY_SPACE \ > --ui-buttonmap a=void,b=KEY_F,x=KEY_A,y=KEY_P \ > --ui-buttonmap lb=KEY_1,rb=KEY_2,lt=void,rt=void \ > --ui-buttonmap tl=void,tr=void \ > --ui-buttonmap guide=void \ > --ui-axismap x1=void,x2=void \ > & [1] 1277 pi@retropie:~ $ xboxdrv 0.8.8 - http://pingus.seul.org/~grumbel/xboxdrv/ Copyright © 2008-2011 Ingo Ruhnke <grumbel@gmail.com> Licensed under GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html> This program comes with ABSOLUTELY NO WARRANTY. This is free software, and you are welcome to redistribute it under certain conditions; see the file COPYING for details. -- [ ERROR ] ------------------------------------------------------ /dev/input/ps3controller: No such file or directory
That is, the command is run in the background (process 1277) but the same ps3controller: No such file or directory error is displayed.
Checking for the process in another terminal shows xboxdrv is not running:
pi@retropie:~ $ sudo ps aux | grep xboxdrv pi 1414 0.0 0.0 4368 568 pts/1 S+ 09:39 0:00 grep --color=auto xboxdrv pi@retropie:~
I appreciate about lr-fmsx but since I intend on running other computer systems (Atari ST, Amstrad CPC...) I think using this xboxdrv approach will be more beneficial.
Any advice on how to move on is welcome indeed and appreciated in advance.
-
Looks like the
udev
rule is not working as expected and the/dev/input/ps3controller
is not created correctly. You're using the PS3 controller via bluetooth, right ? -
@mitu Yes, via bluetooth. Thank you. And previously it's been correctly configured in EmulationStation (Menu > Configure Input). Here it is:
pi@retropie:/opt/retropie/configs/all/retroarch/autoconfig $ cat Sony\ PLAYSTATION\(R\)3\ Controller.cfg input_device = "Sony PLAYSTATION(R)3 Controller" input_driver = "udev" input_r_y_plus_axis = "+4" input_r_x_minus_axis = "-3" input_l_btn = "4" input_load_state_btn = "4" input_start_btn = "9" input_exit_emulator_btn = "9" input_r_y_minus_axis = "-4" input_down_btn = "14" input_l_x_plus_axis = "+0" input_r_btn = "5" input_save_state_btn = "5" input_right_btn = "16" input_state_slot_increase_btn = "16" input_select_btn = "8" input_left_btn = "15" input_state_slot_decrease_btn = "15" input_l3_btn = "11" input_l_y_minus_axis = "-1" input_up_btn = "13" input_a_btn = "1" input_b_btn = "0" input_reset_btn = "0" input_enable_hotkey_btn = "8" input_l_y_plus_axis = "+1" input_r3_btn = "12" input_x_btn = "2" input_menu_toggle_btn = "2" input_l_x_minus_axis = "-0" input_y_btn = "3" input_r_x_plus_axis = "+3"
-
@derebo I'll see about that
udev
rule and post an update later on. -
Just as additional feedback in case it may be of help as there is reference to --udev failing with exit code 1.
Upon synching PS3 Compatible wireless Controller:pi@retropie:~ $ sudo tail -f /var/log/syslog Apr 28 10:48:57 retropie kernel: [ 41.829806] Bluetooth: HIDP (Human Interface Emulation) ver 1.2 Apr 28 10:48:57 retropie kernel: [ 41.829839] Bluetooth: HIDP socket layer initialized Apr 28 10:48:57 retropie kernel: [ 41.852274] hid_sony: loading out-of-tree module taints kernel. Apr 28 10:48:57 retropie kernel: [ 41.855251] sony 0005:054C:0268.0002: unknown main item tag 0x0 Apr 28 10:48:57 retropie kernel: [ 41.863446] input: Sony PLAYSTATION(R)3 Controller Motion Sensors as /devices/platform/soc/3f201000.serial/tty/ttyAMA0/hci0/hci0:11/0005:054C:0268.0002/input/input2 Apr 28 10:48:57 retropie kernel: [ 41.864633] input: Sony PLAYSTATION(R)3 Controller as /devices/platform/soc/3f201000.serial/tty/ttyAMA0/hci0/hci0:11/0005:054C:0268.0002/input/input1 Apr 28 10:48:57 retropie kernel: [ 41.865267] sony 0005:054C:0268.0002: input,hidraw1: BLUETOOTH HID v80.00 Joystick [Sony PLAYSTATION(R)3 Controller] on b8:27:eb:91:6d:8e Apr 28 10:48:57 retropie systemd[1]: Created slice system-sixaxis.slice. Apr 28 10:48:57 retropie systemd[1]: Started sixaxis helper (sys/devices/platform/soc/3f201000.serial/tty/ttyAMA0/hci0/hci0:11/0005:054C:0268.0002/input/input1). Apr 28 10:48:57 retropie systemd-udevd[710]: Process '/usr/bin/jscal-restore /dev/input/js1' failed with exit code 1. Apr 28 10:48:57 retropie systemd-udevd[710]: Process '/usr/sbin/th-cmd --socket /var/run/thd.socket --passfd --udev' failed with exit code 1. Apr 28 10:48:57 retropie systemd-udevd[708]: Process '/usr/sbin/th-cmd --socket /var/run/thd.socket --passfd --udev' failed with exit code 1. Apr 28 10:48:57 retropie systemd-udevd[711]: Process '/usr/sbin/th-cmd --socket /var/run/thd.socket --passfd --udev' failed with exit code 1. Apr 28 10:48:57 retropie systemd[1]: Started sixaxis helper (/dev/input/event2). Apr 28 10:48:57 retropie sixaxis-helper.sh[728]: Calibrating: Sony PLAYSTATION(R)3 Controller (06:26:64:A1:63:25) Apr 28 10:48:58 retropie sixaxis-helper.sh[728]: Setting 600 second timeout on: Sony PLAYSTATION(R)3 Controller (06:26:64:A1:63:25) Apr 28 10:49:07 retropie kernel: [ 52.311582] sony 0005:054C:0268.0002: failed to send raw request, attempting fallback
I reiterate, that the controller works perfectly in EmulationStation and running Atari 2600 or Megadrive videogames, as is. No more posts from my side now. I await your update.
Thank you and regards,
-
Try this for your
udev
rule, replacing what you have right now.ACTION=="add", SUBSYSTEMS=="input", ATTRS{name}=="Sony PLAYSTATION(R)3 Controller", ENV{DEVNAME}=="/dev/input/event*", SYMLINK+="input/ps3controller"
NOTE: this works only if you have a single PS3 controller, if you attach a 2nd one, the symlink will move to the 2nd one.
-
Thank you once more, indeed. In short, /dev/input/ps3controller is now detected (great!) but I can't find a way to configure VIRTUAL-XBOX360-CONTROLLER-FOR-PSX3 as detailed below.
As per your comment, there are two controllers connected to RPi3:
- SNES Compatible USB controller, via USB
- PS3 Compatible Wireless controller, via bluetooth
File edited as per indication and
sudo reboot
pi@retropie:~ $ sudo cat /etc/udev/rules.d/85-jseventname.rules ACTION=="add", SUBSYSTEMS=="input", ATTRS{name}=="Sony PLAYSTATION(R)3 Controller", ENV{DEVNAME}=="/dev/input/event*", SYMLINK+="input/ps3controller" pi@retropie:~ $ cat /proc/bus/input/devices I: Bus=0003 Vendor=0810 Product=e501 Version=0110 N: Name="usb gamepad " P: Phys=usb-3f980000.usb-1.5/input0 S: Sysfs=/devices/platform/soc/3f980000.usb/usb1/1-1/1-1.5/1-1.5:1.0/0003:0810:E501.0001/input/input0 U: Uniq= H: Handlers=js0 event0 B: PROP=0 B: EV=1b B: KEY=3ff 0 0 0 0 0 0 0 0 0 B: ABS=3 B: MSC=10 pi@retropie:~ $ ls -alh /dev/input/ total 0 drwxr-xr-x 4 root root 140 Apr 28 19:44 . drwxr-xr-x 14 root root 3.3K Apr 28 19:44 .. drwxr-xr-x 2 root root 80 Apr 28 19:44 by-id drwxr-xr-x 2 root root 80 Apr 28 19:44 by-path crw-rw----+ 1 root input 13, 64 Apr 28 19:44 event0 crw-rw----+ 1 root input 13, 0 Apr 28 19:44 js0 crw-rw---- 1 root input 13, 63 Apr 28 19:44 mice pi@retropie:~ $ ls -alh /dev/input/by-id/ total 0 drwxr-xr-x 2 root root 80 Apr 28 19:44 . drwxr-xr-x 4 root root 140 Apr 28 19:44 .. lrwxrwxrwx 1 root root 9 Apr 28 19:44 usb-0810_usb_gamepad-event-joystick -> ../event0 lrwxrwxrwx 1 root root 6 Apr 28 19:44 usb-0810_usb_gamepad-joystick -> ../js0 pi@retropie:~ $ ls -alh /dev/input/by-path/ total 0 drwxr-xr-x 2 root root 80 Apr 28 19:44 . drwxr-xr-x 4 root root 140 Apr 28 19:44 .. lrwxrwxrwx 1 root root 9 Apr 28 19:44 platform-3f980000.usb-usb-0:1.5:1.0-event-joystick -> ../event0 lrwxrwxrwx 1 root root 6 Apr 28 19:44 platform-3f980000.usb-usb-0:1.5:1.0-joystick -> ../js0 pi@retropie:~ $
Now, I switch on my PS3 Compatible Wireless Controller and inmediately after synching /dev/input/ps3controller does show, good thing!
pi@retropie:~ $ sudo tail -f /var/log/syslog Apr 28 19:49:51 retropie kernel: [ 301.907884] Bluetooth: HIDP (Human Interface Emulation) ver 1.2 Apr 28 19:49:51 retropie kernel: [ 301.907928] Bluetooth: HIDP socket layer initialized Apr 28 19:49:51 retropie kernel: [ 301.933904] hid_sony: loading out-of-tree module taints kernel. Apr 28 19:49:51 retropie kernel: [ 301.936812] sony 0005:054C:0268.0002: unknown main item tag 0x0 Apr 28 19:49:51 retropie kernel: [ 301.944278] input: Sony PLAYSTATION(R)3 Controller Motion Sensors as /devices/platform/soc/3f201000.serial/tty/ttyAMA0/hci0/hci0:11/0005:054C:0268.0002/input/input2 Apr 28 19:49:51 retropie kernel: [ 301.945575] input: Sony PLAYSTATION(R)3 Controller as /devices/platform/soc/3f201000.serial/tty/ttyAMA0/hci0/hci0:11/0005:054C:0268.0002/input/input1 Apr 28 19:49:51 retropie kernel: [ 301.946305] sony 0005:054C:0268.0002: input,hidraw1: BLUETOOTH HID v80.00 Joystick [Sony PLAYSTATION(R)3 Controller] on b8:27:eb:91:6d:8e Apr 28 19:49:51 retropie systemd[1]: Created slice system-sixaxis.slice. Apr 28 19:49:51 retropie systemd[1]: Started sixaxis helper (sys/devices/platform/soc/3f201000.serial/tty/ttyAMA0/hci0/hci0:11/0005:054C:0268.0002/input/input1). Apr 28 19:49:51 retropie systemd-udevd[766]: Process '/usr/bin/jscal-restore /dev/input/js1' failed with exit code 1. Apr 28 19:49:51 retropie systemd-udevd[766]: Process '/usr/sbin/th-cmd --socket /var/run/thd.socket --passfd --udev' failed with exit code 1. Apr 28 19:49:51 retropie systemd-udevd[763]: Process '/usr/sbin/th-cmd --socket /var/run/thd.socket --passfd --udev' failed with exit code 1. Apr 28 19:49:51 retropie systemd-udevd[764]: Process '/usr/sbin/th-cmd --socket /var/run/thd.socket --passfd --udev' failed with exit code 1. Apr 28 19:49:51 retropie systemd[1]: Started sixaxis helper (/dev/input/event2). Apr 28 19:49:51 retropie sixaxis-helper.sh[781]: Calibrating: Sony PLAYSTATION(R)3 Controller (06:26:64:A1:63:25) Apr 28 19:49:52 retropie sixaxis-helper.sh[781]: Setting 600 second timeout on: Sony PLAYSTATION(R)3 Controller (06:26:64:A1:63:25) Apr 28 19:50:01 retropie kernel: [ 312.152865] sony 0005:054C:0268.0002: failed to send raw request, attempting fallback pi@retropie:~ $ cat /proc/bus/input/devices I: Bus=0003 Vendor=0810 Product=e501 Version=0110 N: Name="usb gamepad " P: Phys=usb-3f980000.usb-1.5/input0 S: Sysfs=/devices/platform/soc/3f980000.usb/usb1/1-1/1-1.5/1-1.5:1.0/0003:0810:E501.0001/input/input0 U: Uniq= H: Handlers=js0 event0 B: PROP=0 B: EV=1b B: KEY=3ff 0 0 0 0 0 0 0 0 0 B: ABS=3 B: MSC=10 I: Bus=0005 Vendor=054c Product=0268 Version=8000 N: Name="Sony PLAYSTATION(R)3 Controller Motion Sensors" P: Phys=b8:27:eb:91:6d:8e S: Sysfs=/devices/platform/soc/3f201000.serial/tty/ttyAMA0/hci0/hci0:11/0005:054C:0268.0002/input/input2 U: Uniq=06:26:64:a1:63:25 H: Handlers=event1 B: PROP=40 B: EV=9 B: ABS=7 I: Bus=0005 Vendor=054c Product=0268 Version=8000 N: Name="Sony PLAYSTATION(R)3 Controller" P: Phys=b8:27:eb:91:6d:8e S: Sysfs=/devices/platform/soc/3f201000.serial/tty/ttyAMA0/hci0/hci0:11/0005:054C:0268.0002/input/input1 U: Uniq=06:26:64:a1:63:25 H: Handlers=js1 event2 B: PROP=0 B: EV=20001b B: KEY=f 0 0 0 0 0 0 0 7fdb0000 0 0 0 0 0 0 0 0 0 B: ABS=3f B: MSC=10 B: FF=1 7030000 0 0 pi@retropie:~ $ ls -alh /dev/input/ total 0 drwxr-xr-x 4 root root 200 Apr 28 19:49 . drwxr-xr-x 14 root root 3.3K Apr 28 19:49 .. drwxr-xr-x 2 root root 80 Apr 28 19:44 by-id drwxr-xr-x 2 root root 80 Apr 28 19:44 by-path crw-rw----+ 1 root input 13, 64 Apr 28 19:44 event0 crw-rw----+ 1 root input 13, 66 Apr 28 19:49 event2 crw-rw----+ 1 root input 13, 0 Apr 28 19:44 js0 crw-rw----+ 1 root input 13, 1 Apr 28 19:49 js1 crw-rw---- 1 root input 13, 63 Apr 28 19:44 mice lrwxrwxrwx 1 root root 6 Apr 28 19:49 ps3controller -> event2 pi@retropie:~ $ ls -alh /dev/input/by-id/ total 0 drwxr-xr-x 2 root root 80 Apr 28 19:44 . drwxr-xr-x 4 root root 200 Apr 28 19:49 .. lrwxrwxrwx 1 root root 9 Apr 28 19:44 usb-0810_usb_gamepad-event-joystick -> ../event0 lrwxrwxrwx 1 root root 6 Apr 28 19:44 usb-0810_usb_gamepad-joystick -> ../js0 pi@retropie:~ $ ls -alh /dev/input/by-path/ total 0 drwxr-xr-x 2 root root 80 Apr 28 19:44 . drwxr-xr-x 4 root root 200 Apr 28 19:49 .. lrwxrwxrwx 1 root root 9 Apr 28 19:44 platform-3f980000.usb-usb-0:1.5:1.0-event-joystick -> ../event0 lrwxrwxrwx 1 root root 6 Apr 28 19:44 platform-3f980000.usb-usb-0:1.5:1.0-joystick -> ../js0 pi@retropie:~ $
At this stage, the PS3 controller cannot be used in EmulationStation yet as it must be configured. evtest does not even show yet VIRTUAL-XBOX360-CONTROLLER-FOR-PSX3...
pi@retropie:~ $ evtest No device specified, trying to scan all of /dev/input/event* Not running as root, no devices may be available. Available devices: /dev/input/event0: usb gamepad /dev/input/event2: Sony PLAYSTATION(R)3 Controller Select the device event number [0-2]:
RetroPie > RetroArch
shows
Sony PLAYSTATION(R)3 Controller configured in port #0
usb gamepad configured in port #1When launching MSX videogame (lr-bluemsx), the screen shows:
xboxdrv 0.8.8 [...] /dev/input/js2 /dev/input/event1
The launbox is displayed, next videogame welcome screen and at the same time at the bottom left of the screen:
Sony PLAYSTATION(R)3 Controller configured in port #0
usb gamepad configured in port #1
VIRTUAL-XBOX360-CONTROLLER-FOR-PSX3 (0/0) not configuredFrom that moment on, the PS3 Compatible Wireless Controller is irresponsive.
So if VIRTUAL-XBOX360-CONTROLLER-FOR-PSX3 is not configured, I will try to configure it. So...
sudo reboot
From EmulationStation > Start > Configure Input (2 gamepads detected)
which are- usb gamepad
- Sony PLAYSTATION(R)3 Controller
I understand VIRTUAL-XBOX360-CONTROLLER-FOR-PSX3 is not detected because xboxdrv has not been launched - it's run only when running an MSX videogame. So I don't know how to configure it from EmulationStation.
So, let's try from Retropie > Retroarch > Settings > Input >
Port 1 Binds > Device Index > Sony PLAYSTATION(R)3
Port 2 Binds > Device Index > usb gamepadDevice index does not show VIRTUAL-XBOX360-CONTROLLER-FOR-PSX3 so I can't see a way to configure VIRTUAL-XBOX360-CONTROLLER-FOR-PSX3. Advice is appreciated indeed.
As a workaround, I have run in terminal just for the sake of creating a .cfg that may be used in EmulationStation at least:
sudo /opt/retropie/supplementary/xboxdrv/bin/xboxdrv \ --evdev /dev/input/event2 \ --silent \ --detach-kernel-driver \ --force-feedback \ --deadzone-trigger 15% \ --deadzone 4000 \ --device-name "VIRTUAL-XBOX360-CONTROLLER-FOR-PSX3" \ --dpad-as-button \ --evdev-keymap BTN_DPAD_UP=du,BTN_DPAD_DOWN=dd,BTN_DPAD_LEFT=dl,BTN_DPAD_RIGHT=dr \ --evdev-keymap BTN_EAST=a,BTN_SOUTH=b,BTN_NORTH=x,BTN_WEST=y \ --evdev-keymap BTN_SELECT=back,BTN_START=start \ --evdev-keymap BTN_TL=lb,BTN_TR=rb \ --evdev-keymap BTN_TL2=lt,BTN_TR2=rt \ --evdev-keymap BTN_THUMBL=tl,BTN_THUMBR=tr \ --evdev-keymap BTN_MODE=guide \ --evdev-absmap ABS_X=x1,ABS_Y=y1,ABS_RX=x2,ABS_RY=y2 \ &
which has allowed configuring input for VIRTUAL-XBOX360-CONTROLLER-FOR-PSX3 in EmulationStation
/opt/retropie/configs/all/retroarch-joypads/VIRTUAL-XBOX360-CONTROLLER-FOR-PSX3.cfg
is automatically created after configuration.RetroPie > RetroArch
still shows
Sony PLAYSTATION(R)3 Controller configured in port #0
usb gamepad configured in port #1
which makes sense as xboxdrv is not run yetWhen launching MSX videogame (lr-bluemsx), the screen shows:
xboxdrv 0.8.8 [...] /dev/input/js2 /dev/input/event1
The launbox is displayed, next videogame welcome screen and at the same time at the bottom left of the screen:
Sony PLAYSTATION(R)3 Controller configured in port #0
usb gamepad configured in port #1
VIRTUAL-XBOX360-CONTROLLER-FOR-PSX3 configured in port #2So there it is in port #2. Good! So this part at leat is solved.
However, controller is irrensponsive. Pressing PS3 button = xboxdrv guide button should map to SPACE to start game. Eg. Thumb left should toggle F1 and Thumb Right toggle F2 for the trainer infinite lives and infinite time respectively. As said, not just PS3 button but every button is irresponsive at this time.
pi@retropie:~ $ cat /opt/retropie/configs/all/runcommand-onstart.sh #!/bin/sh if [ "$1" = "msx" ] then sudo killall >> /dev/shm/runcommand.log 2>&1 xboxdrv sudo /opt/retropie/supplementary/xboxdrv/bin/xboxdrv \ --evdev /dev/input/ps3controller \ --silent \ --detach-kernel-driver \ --force-feedback \ --deadzone-trigger 15% \ --deadzone 4000 \ --device-name "VIRTUAL-XBOX360-CONTROLLER-FOR-PSX3" \ --dpad-as-button \ --evdev-keymap BTN_DPAD_UP=du,BTN_DPAD_DOWN=dd,BTN_DPAD_LEFT=dl,BTN_DPAD_RIGHT=dr \ --evdev-keymap BTN_EAST=a,BTN_SOUTH=b,BTN_NORTH=x,BTN_WEST=y \ --evdev-keymap BTN_SELECT=back,BTN_START=start \ --evdev-keymap BTN_TL=lb,BTN_TR=rb \ --evdev-keymap BTN_TL2=lt,BTN_TR2=rt \ --evdev-keymap BTN_THUMBL=tl,BTN_THUMBR=tr \ --evdev-keymap BTN_MODE=guide \ --evdev-absmap ABS_X=x1,ABS_Y=y1,ABS_RX=x2,ABS_RY=y2 \ --ui-buttonmap lb=KEY_SPACE,rb=KEY_1,lt=KEY_2,rt=KEY_0 \ --ui-buttonmap tl=KEY_F1,tr=KEY_F2 \ --ui-buttonmap guide=KEY_SPACE \ & fi
I am under the impression that at this stage the full solution is so close. Thank you once more for your time and support.
-
The
VIRTUAL-XBOX360-CONTROLLER-FOR-PSX3
will not appear unless you startxboxdrv
, so yes, it must startxboxdrv
before you configure it in EmulationStation.RetroPie > RetroArch
still shows
Sony PLAYSTATION(R)3 Controller configured in port #0
usb gamepad configured in port #1This means your PS3 controller is still P1, so maybe the joystick re-ordering doesn't work. Since the PS3 controller is 'masked' by
xboxdrv
, its inputs might not be registering.As I said, I don't have experiene with
xboxdrv
so I don't know why it's not working in-game, but I say you fix the joystick ordering first - so thatVIRTUAL-XBOX360-CONTROLLER-FOR-PSX3
comes up as port #0 - and then re-test. -
Thank you, as always. How would you suggest fixing joystick reordering, please? Can it be achived by tweaking some config file? I had thought about using RetroPie-joystick-selection script but still, since xboxdrv is not loaded, Retropie > Configuration / Options > joystick-selection does not show VIRTUAL-XBOX360-CONTROLLER-FOR-PSX3 so maybe you could help with some advice?
Thank you & regards,
-
For joystick reordering, I recommend you disable/uninstall the joystick selection tool and try to do it with a simple configuration in
/opt/retropie/configs/msx/retroarch.cfg
. Add the following lines before the last line in the file (which has the#include
).input_player1_joypad_index = 2 input_player3_joypad_index=0
This should switch P1 and P3 gamepads so P1 = PS3, P3 = Xboxdrv should become P1 = XboxDrv and P3 = PS3. Give it a try.
EDIT: you can also use the joystick tool, but you'll have to start
xboxdrv
before and start the tool from the RetroPie-Setup, I think it should work. -
I have tried it with the simple configuration you suggest in /opt/retropie/configs/msx/retroarch.cfg and have not been successful. I have run different combinations and, after no luck, I have reintalled from scracth:
Latest RetroPie 4.6
Only SNES Compatible USB Controller
Installed only xboxdrv and lr-bluemsxto reach the same situation in previous message. Briefly:
pi@retropie:~ $ ls -alh /dev/input/by-id/ total 0 drwxr-xr-x 2 root root 80 Apr 29 21:26 . drwxr-xr-x 4 root root 200 Apr 29 21:26 .. lrwxrwxrwx 1 root root 9 Apr 29 21:26 usb-0810_usb_gamepad-event-joystick -> ../event0 lrwxrwxrwx 1 root root 6 Apr 29 21:26 usb-0810_usb_gamepad-joystick -> ../js0
pi@retropie:~ $ sudo cat /etc/rc.local if [ "$_IP" ]; then printf "My IP address is %s\n" "$_IP" fi sudo /opt/retropie/supplementary/xboxdrv/bin/xboxdrv \ --evdev /dev/input/by-id/usb-0810_usb_gamepad-event-joystick \ --silent \ --detach-kernel-driver \ --force-feedback \ --deadzone-trigger 15% \ --deadzone 4000 \ --device-name "VIRTUAL-SNES2XBOX-CONTROLLER" \ --evdev-absmap ABS_X=dpad_x,ABS_Y=dpad_y \ --evdev-keymap BTN_THUMB=a,BTN_THUMB2=b,BTN_TRIGGER=x,BTN_WEST=y \ --evdev-keymap BTN_BASE3=back,BTN_BASE4=start \ --evdev-keymap BTN_TOP2=lb,BTN_PINKIE=rb \ --dpad-only \ --ui-axismap lt=void,rt=void \ --ui-buttonmap y=KEY_SPACE \ --ui-buttonmap lb=void,rb=KEY_0 \ & exit 0
pi@retropie:~ $ sudo cat /opt/retropie/configs/all/retroarch-joypads/VIRTUAL-SNES2XBOX-CONTROLLER.cfg input_device = "VIRTUAL-SNES2XBOX-CONTROLLER" input_driver = "udev" input_enable_hotkey_btn = "4" input_up_axis = "-1" input_left_axis = "-0" input_state_slot_decrease_axis = "-0" input_select_btn = "4" input_right_axis = "+0" input_state_slot_increase_axis = "+0" input_y_btn = "3" input_x_btn = "2" input_menu_toggle_btn = "2" input_down_axis = "+1" input_start_btn = "5" input_exit_emulator_btn = "5" input_b_btn = "1" input_reset_btn = "1" input_a_btn = "0"
pi@retropie:~ $ cat /opt/retropie/configs/all/runcommand-onstart.sh pi@retropie:~ $ cat /opt/retropie/configs/all/runcommand-onend.sh cat: /opt/retropie/configs/all/runcommand-onend.sh: No such file or directory
runcommand-onstart.sh is an empty file and runcommand-onend.sh does not exist
pi@retropie:~ $ evtest No device specified, trying to scan all of /dev/input/event* Not running as root, no devices may be available. Available devices: /dev/input/event0: usb gamepad /dev/input/event1: VIRTUAL-SNES2XBOX-CONTROLLER - Keyboard Emulation /dev/input/event2: VIRTUAL-SNES2XBOX-CONTROLLER Select the device event number [0-2]: ^C
Mind it is event2 that responds to SNES Compatible USB Controller (not event1) and mind controller configuration is set to global (all).
pi@retropie:~ $ sudo cat /opt/retropie/configs/all/retroarch.cfg [...] input_player1_joypad_index = "1" input_player2_joypad_index = "0" input_player3_joypad_index = "2" input_player4_joypad_index = "3" [...]
With the configuration above SNES Compatible USB Controller is usable in EmulationStation. When entering RetroPie > Retroarch (usable as well)...
usb gampead configured in port #0
VIRTUAL-SNES2XBOX-CONTROLLER configured in port #1Retroarch > Settings > Input >
Port 1 Binds VIRTUAL-SNES2XBOX-CONTROLLER
Port 2 Binds usb gamepadSo the correlation between /opt/retropie/configs/all/retroarch.cfg and Port Binds is obvious.
Entering MSX videogame...
usb gampead configured in port #0
VIRTUAL-SNES2XBOX-CONTROLLER configured in port #1Controller is irresponsive. However, Select+Start (exit emulator) works at least and I can return to EmulationStation. At this stage, I don't know what else to test...
Many thanks in advance for your support all the way.
Contributions to the project are always appreciated, so if you would like to support us with a donation you can do so here.
Hosting provided by Mythic-Beasts. See the Hosting Information page for more information.