Not really support request, a question, or anything per say...but I didn't know where else to post this.
I wrote the mappings for the xboxdrv using Helder's AIO 2.2 - this way the AIOs controls can be used as a spoofed XBOX Controller.
Why you ask? Well if you want to play non-lr cores outside retroarch then you are going to run into problems with the D-pad not being detected (analog HAT). I found this in pcsx-rearmed, mame4all, wolf4sdl, etc.
Obviously one thing to do would be to reprogram the controller to use buttons (BTN_?) rather than analog (ABS_?) for everything - however this requires a lot of messing about, possible disassembly to get to the headers, etc - plus if everything else works perfectly it seems a shame to change it...
...So - rather than that I though to use the xboxdrv, via:
/opt/retropie/configs/all/runcommand-onstart.sh
Code: Select all
#!/bin/sh
# emu name to /dev/shm/runcommand.log
echo "on-start: $2" >&2
if [ "$2" = "pcsx-rearmed" ] || [ "$2" = "mame-mame4all " ] || [ "$2" = "wolf4sdl" ] || [ "$2" = "wolf4sdl-spear" ]
then
sudo killall > /dev/null 2>&1 xboxdrv
sudo /opt/retropie/supplementary/xboxdrv/bin/xboxdrv > /dev/null 2>&1 \
--evdev /dev/input/by-id/usb-Arduino_LLC_Arduino_Leonardo_HIDAF-if02-event-joystick \
--silent \
--detach-kernel-driver \
--force-feedback \
--deadzone-trigger 15% \
--deadzone 4000 \
--mimic-xpad \
--device-name "XBOX 360 Controller (xboxdrv)" \
--evdev-absmap ABS_HAT0X=dpad_x,ABS_HAT0Y=dpad_y \
--evdev-keymap BTN_TOP=a,BTN_BASE6=b,BTN_PINKIE=x,BTN_BASE2=y,BTN_BASE5=lb,BTN_BASE3=rb,KEY_#300=back,BTN_TOP2=start \
--dpad-only \
--ui-axismap lt=void,rt=void \
--ui-buttonmap tl=void,tr=void,guide=void \
&
fi
Then, to kill the pad on emu exit, in:
/opt/retropie/configs/all/runcommand-onend.sh
Code: Select all
#!/bin/sh
sudo killall > /dev/null 2>&1 xboxdrv
That way one can use the stock AIO 2.2 in emulators that don't support the analog hats, really useful as most of the cores that run best on the PIzero are not lr.
Anyhow - thought it might be useful to other who have this excellent board