Hallo Zusammen,
ich nutze auf meinem Ubuntu 13.10 (64bit) den Super Nintendo Emulator bsnes. Nun würde ich für die Steuerung gerne anstatt meiner Tastatur meinen Logitech F710 Controller benutzen.
Der Controller wird folgendermaßen erkannt:
I: Bus=0003 Vendor=046d Product=c219 Version=0111 N: Name="Logitech Logitech Cordless RumblePad 2" P: Phys=usb-0000:00:14.0-1/input0 S: Sysfs=/devices/pci0000:00/0000:00:14.0/usb3/3-1/3-1:1.0/input/input20 U: Uniq= H: Handlers=event4 js0 B: PROP=0 B: EV=1b B: KEY=fff000000000000 0 0 0 0 B: ABS=30027 B: MSC=10
Vor erstmaliger Benutzung habe ich den Controller mittels dem Programm "joystick" konfiguriert.
Um mit dem Controller ein Spiel via bsnes zu spielen habe ich mir testweise folgendes Profil angelegt:
COMMON -dev /dev/input/js0 -thresh -16383 16383 -16383 16383 -16383 16383 -16383 16383 -16383 16383 -16383 16383 START bsnesyoshi -X -axis Left Right Up Down -buttons a x START minecraft -X -axis a d w s -buttons e space
Das Profil rufe ich dann folgendermaßen auf:
jo@jo-Ubuntu-13:~$ joy2key -config bsnesyoshi joy2key - reads joystick status and dispatches keyboard events By Peter Amstutz (tetron@interreality.org) This is free software under the GNU General Public License (GPL v2) (see COPYING in the joy2key archive) You are welcome to use/modify this code, and please e-mail me if anything cool comes of it! Version: 1.6.3 Binary built on Dec 22 2009 at 13:45:44 argtokey:read key Left dblcheck Left argtokey:read key Right dblcheck Right argtokey:read key Up dblcheck Up argtokey:read key Down dblcheck Down argtokey:read key a dblcheck a arg2key fed with a a is a lower => 0 argtokey:read key x dblcheck x arg2key fed with x x is a lower => 0 Please select a window to send events to Initialization complete, entering main loop, ^C to exit...
Nach Aufruf des Profils und anschließendem Anklicken des aktiven bsnes Spiels reagiert Yoshi leider nicht auf die Eingaben meines Controllers ☹
Beim Benutzen des Steuerungskreuzes und den Knöpfen erscheint in der Konsole:
iscap is now 0 sendkey: button_upper: 0 keycode 0x000072 114 sendkey: keysym Right state hex 10 iscap is now 0 sendkey: button_upper: 0 keycode 0x000072 114 sendkey: keysym Right state hex 10 iscap is now 0 sendkey: button_upper: 0 keycode 0x000026 38 sendkey: keysym a state hex 10 iscap is now 0 sendkey: button_upper: 0 keycode 0x000026 38 sendkey: keysym a state hex 10 iscap is now 0 sendkey: button_upper: 0 keycode 0x000035 53 sendkey: keysym x state hex 10 iscap is now 0 sendkey: button_upper: 0 keycode 0x000035 53 sendkey: keysym x
Bei den Steuerungseinstellungen von bsnes steht unter "Settings –> Configurations... –> Input –> Super Famicom" bei "Right" beispielsweise "KB0::Right".
joy2key funktioniert an sich jedoch gut: der Aufruf von "joy2key -config minecraft" lässt mich im Spiel Minecraft die Spielfigur bewegen.
Wieso funktioniert die Verwendung meines Controllers via joy2key bei einem Spiel wie Minecraft, nicht aber bei den bsnes-Spielen? Es wird ja anscheinend "keysym Right" gesendet, was der Tastatureingabe der rechten Taste entspricht, oder? bsnes reagiert darauf jedoch nicht.
Ich habe außerdem SuperTux 2 installiert. Dort musste ich joy2key gar nicht verwenden. Der Controller wurde automatisch erkannt. Woran liegt das?