Mapping certain keys from Atari800 emu to the gamepad
-
@mediamogul Ok! so i finally managed to put these lines in the atari800 emulators.cfg, now do I have to enable the xboxdrv to make the changes count?
EDIT: I did enable the xboxdrv but now all of my buttons are the joystick trigger and I'm still moving with the analog stick and not the Dpad. Tried the LT+Start to see if I get the emulator menu but doesn't work. -
There might be something wrong with the mapping that isn't immediately visible. Try running the command by itself from a terminal window to see if it throws up any errors:
sudo /opt/retropie/supplementary/xboxdrv/bin/xboxdrv \ --evdev /dev/input/by-id/usb-SZMY-POWER_CO._LTD._GAMEPAD_3_TURBO-event-joystick \ --silent \ --axismap -Y1=Y1,-Y2=Y2 \ --buttonmap tl^toggle=tl \ --buttonmap tr^toggle=tr \ --detach-kernel-driver \ --force-feedback \ --deadzone-trigger 15% \ --deadzone 4000 \ --mimic-xpad \ --evdev-absmap ABS_X=x1,ABS_Y=y1,ABS_X=x2,ABS_Y=y2,ABS_*=lt,ABS_*=rt,ABS_HAT0X=dpad_x,ABS_HAT0Y=dpad_y \ --evdev-keymap BTN_EAST=a,BTN_C=b,BTN_SOUTH=x,BTN_NORTH=y,BTN_WEST=lb,BTN_Z=rb,BTN_TL=tl,BTN_TR=tr,BTN_MODE=guide,BTN_TL2=back,BTN_TR2=start \ --ui-axismap X1=KEY_KP4:KEY_KP6,Y1=KEY_KP8:KEY_KP5 \ --ui-axismap X2=KEY_1:KEY_2,Y2=KEY_3:KEY_4,lt+X2=KEY_5:KEY_6,lt+Y2=KEY_7:KEY_8,rt+X2=KEY_9:KEY_0,rt+Y2=KEY_KPASTERISK:KEY_EQUAL \ --ui-buttonmap a=KEY_RIGHTCTRL,b=KEY_F2,x=KEY_EQUAL,y=KEY_KPASTERISK,lb=KEY_F9,rb=KEY_F5,du=KEY_KP8,dd=KEY_KP5,dl=KEY_KP4,dr=KEY_KP6,start=KEY_F4,back=KEY_F3,lt=KEY_HOME,rt=KEY_HOME,tl=KEY_HOME,tr=KEY_HOME \ --ui-buttonmap lt+a=KEY_ENTER,lt+b=KEY_ESC,lt+du=KEY_UP,lt+dd=KEY_DOWN,lt+dl=KEY_LEFT,lt+dr=KEY_RIGHT,lt+start=KEY_F1 \ --ui-axismap lt+X1=KEY_LEFT:KEY_RIGHT,lt+Y1=KEY_UP:KEY_DOWN \ --ui-axismap tl+x1=REL_X:10,tl+y1=REL_Y:10 \ --ui-buttonmap tr+b=BTN_LEFT,tr+a=BTN_RIGHT \ --ui-buttonmap guide=void
-
@mediamogul just did it and it says:
-- [ ERROR ] ------------------------------------------------------
error: invalid argument '--evdev-absmap ABS_X=x1,ABS_Y=y1,ABS_X=x2,ABS_Y=y2,ABS_=lt,ABS_=rt,ABS_HAT0X=dpad_x,ABS_HAT0Y=dpad_y'
couldn't convert 'ABS_*' to enum, not a member of EV_ABS -
Ah, OK. Looks like you left in the place holder asterisks for 'lt' and 'rt' on the
--evdev-absmap
line. Just replace them with the event codes from your controller. After that, run the command again to see if any other errors pop up. -
@mediamogul pasted it correcting the *'s, and I got this:
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.Your Xbox/Xbox360 controller should now be available as:
/dev/input/js1
/dev/input/event4Press Ctrl-C to quit
Then I pasted & saved the same imput mapping in the atari800 emulators.cfg
atari800 = "sudo /opt/retropie/supplementary/xboxdrv/bin/xboxdrv
--evdev /dev/input/by-id/3
--silent
--axismap -Y1=Y1,-Y2=Y2
--buttonmap tl^toggle=tl
--buttonmap tr^toggle=tr
--detach-kernel-driver
--force-feedback
--deadzone-trigger 15%
--deadzone 4000
--mimic-xpad
--evdev-absmap ABS_X=x1,ABS_Y=y1,ABS_X=x2,ABS_Y=y2,ABS_HAT0X=dpad_x,ABS_HAT0Y=dpad_y
--evdev-keymap BTN_EAST=a,BTN_C=b,BTN_SOUTH=x,BTN_NORTH=y,BTN_WEST=lb,BTN_Z=rb,BTN_TL=tl,BTN_TR=tr,BTN_MODE=guide,BTN_TL2=back,BTN_TR2=start,BTN_SELECT=lt,BTN_START=rt
--ui-axismap X1=KEY_KP4:KEY_KP6,Y1=KEY_KP8:KEY_KP5
--ui-axismap X2=KEY_1:KEY_2,Y2=KEY_3:KEY_4,lt+X2=KEY_5:KEY_6,lt+Y2=KEY_7:KEY_8,rt+X2=KEY_9:KEY_0,rt+Y2=KEY_KPASTERISK:KEY_EQUAL
--ui-buttonmap a=KEY_RIGHTCTRL,b=KEY_F2,x=KEY_EQUAL,y=KEY_KPASTERISK,lb=KEY_F9,rb=KEY_F5,du=KEY_KP8,dd=KEY_KP5,dl=KEY_KP4,dr=KEY_KP6,start=KEY_F4,back=KEY_F3,lt =KEY_HOME,rt=KEY_HOME,tl=KEY_HOME,tr=KEY_HOME
--ui-buttonmap lt+a=KEY_ENTER,lt+b=KEY_ESC,lt+du=KEY_UP,lt+dd=KEY_DOWN,lt+dl=KEY_LEFT,lt+dr=KEY_RIGHT,lt+start=KEY_F1
--ui-axismap lt+X1=KEY_LEFT:KEY_RIGHT,lt+Y1=KEY_UP:KEY_DOWN
--ui-axismap tl+x1=REL_X:10,tl+y1=REL_Y:10
--ui-buttonmap tr+b=BTN_LEFT,tr+a=BTN_RIGHT
--ui-buttonmap guide=void
--
/opt/retropie/emulators/atari800/bin/atari800 %ROM%"
default="atari800"
atari800 = "/opt/retropie/emulators/atari800/bin/atari800 %ROM%"
default = "atari800"After this I enabled the xboxdrv, performed a reboot and tested the Atari800 emu, and i'm still moving my characters with the analog stick, what am I missing?
-
There looks to be a couple of issues here and there. Try this:
atari800 = "sudo /opt/retropie/supplementary/xboxdrv/bin/xboxdrv \ --evdev /dev/input/by-id/usb-SZMY-POWER_CO._LTD._GAMEPAD_3_TURBO-event-joystick \ --silent \ --axismap -Y1=Y1,-Y2=Y2 \ --buttonmap tl^toggle=tl \ --buttonmap tr^toggle=tr \ --detach-kernel-driver \ --force-feedback \ --deadzone-trigger 15% \ --deadzone 4000 \ --mimic-xpad \ --evdev-absmap ABS_X=x1,ABS_Y=y1,ABS_X=x2,ABS_Y=y2,ABS_HAT0X=dpad_x,ABS_HAT0Y=dpad_y \ --evdev-keymap BTN_EAST=a,BTN_C=b,BTN_SOUTH=x,BTN_NORTH=y,BTN_WEST=lb,BTN_Z=rb,BTN_TL=tl,BTN_TR=tr,BTN_MODE=guide,BTN_TL2=back,BTN_TR2=start \ --ui-axismap X1=KEY_KP4:KEY_KP6,Y1=KEY_KP8:KEY_KP5 \ --ui-axismap X2=KEY_1:KEY_2,Y2=KEY_3:KEY_4,lt+X2=KEY_5:KEY_6,lt+Y2=KEY_7:KEY_8,rt+X2=KEY_9:KEY_0,rt+Y2=KEY_KPASTERISK:KEY_EQUAL \ --ui-buttonmap a=KEY_RIGHTCTRL,b=KEY_F2,x=KEY_EQUAL,y=KEY_KPASTERISK,lb=KEY_F9,rb=KEY_F5,du=KEY_KP8,dd=KEY_KP5,dl=KEY_KP4,dr=KEY_KP6,start=KEY_F4,back=KEY_F3,lt=KEY_HOME,rt=KEY_HOME,tl=KEY_HOME,tr=KEY_HOME \ --ui-buttonmap lt+a=KEY_ENTER,lt+b=KEY_ESC,lt+du=KEY_UP,lt+dd=KEY_DOWN,lt+dl=KEY_LEFT,lt+dr=KEY_RIGHT,lt+start=KEY_F1 \ --ui-axismap lt+X1=KEY_LEFT:KEY_RIGHT,lt+Y1=KEY_UP:KEY_DOWN \ --ui-axismap tl+x1=REL_X:10,tl+y1=REL_Y:10 \ --ui-buttonmap tr+b=BTN_LEFT,tr+a=BTN_RIGHT \ --ui-buttonmap guide=void \ -- \ /opt/retropie/emulators/atari800/bin/atari800 %ROM%" default="atari800"
Edit: Also, when pasting code into the forum, surrounding it in three backticks ``` on both sides helps to keep things manageable.
-
Still doesn't work. Every single button works as the Atari Joystick trigger button, even start and select, dunno what to do :/
-
I suppose it could be in how the command is formatted. Below is the same command on one line, without any separation.
atari800 = "sudo /opt/retropie/supplementary/xboxdrv/bin/xboxdrv --evdev /dev/input/by-id/usb-SZMY-POWER_CO._LTD._GAMEPAD_3_TURBO-event-joystick --silent --axismap -Y1=Y1,-Y2=Y2 --buttonmap tl^toggle=tl --buttonmap tr^toggle=tr --detach-kernel-driver --force-feedback --deadzone-trigger 15% --deadzone 4000 --mimic-xpad --evdev-absmap ABS_X=x1,ABS_Y=y1,ABS_X=x2,ABS_Y=y2,ABS_HAT0X=dpad_x,ABS_HAT0Y=dpad_y --evdev-keymap BTN_EAST=a,BTN_C=b,BTN_SOUTH=x,BTN_NORTH=y,BTN_WEST=lb,BTN_Z=rb,BTN_TL=tl,BTN_TR=tr,BTN_MODE=guide,BTN_TL2=back,BTN_TR2=start --ui-axismap X1=KEY_KP4:KEY_KP6,Y1=KEY_KP8:KEY_KP5 --ui-axismap X2=KEY_1:KEY_2,Y2=KEY_3:KEY_4,lt+X2=KEY_5:KEY_6,lt+Y2=KEY_7:KEY_8,rt+X2=KEY_9:KEY_0,rt+Y2=KEY_KPASTERISK:KEY_EQUAL --ui-buttonmap a=KEY_RIGHTCTRL,b=KEY_F2,x=KEY_EQUAL,y=KEY_KPASTERISK,lb=KEY_F9,rb=KEY_F5,du=KEY_KP8,dd=KEY_KP5,dl=KEY_KP4,dr=KEY_KP6,start=KEY_F4,back=KEY_F3,lt=KEY_HOME,rt=KEY_HOME,tl=KEY_HOME,tr=KEY_HOME --ui-buttonmap lt+a=KEY_ENTER,lt+b=KEY_ESC,lt+du=KEY_UP,lt+dd=KEY_DOWN,lt+dl=KEY_LEFT,lt+dr=KEY_RIGHT,lt+start=KEY_F1 --ui-axismap lt+X1=KEY_LEFT:KEY_RIGHT,lt+Y1=KEY_UP:KEY_DOWN --ui-axismap tl+x1=REL_X:10,tl+y1=REL_Y:10 --ui-buttonmap tr+b=BTN_LEFT,tr+a=BTN_RIGHT --ui-buttonmap guide=void -- /opt/retropie/emulators/atari800/bin/atari800 %ROM%" default="atari800"
-
I managed to get your config to work, what a godsend! Thank you! The only problem I have is my Wii U Pro Controller maps the RThumb (R3) and LThumb (L3) as btn instead of abs. Is there anyway to use your setup for Super Breakout etc.? After toggling I get no response from the thumbsticks and I'm guessing it is due to them being buttons instead of axis.
-
That's tough to say. It's such a specialty situation that anything I say would be guesswork. Did the controller require a driver or did it just pair with Bluetooth?
-
It paired with bluetooth, I may just have to use a different controller. Not the end of the world. Odd how it maps though!
-
meant for another thread.
-
@mahcneto said in Mapping certain keys from Atari800 emu to the gamepad:
emus, is there any way to map certain keys to the gamepad since this console uses just 1 button for playing? These ones mostly:
This is a very old thread but I want to share somenthing that works well for me just in case someone else will find it useful.
I purchased a $16 3-Key USB keypad from amazon https://www.amazon.com/dp/B08P1GY3GN/ref=cm_sw_em_r_mt_dp_H610W0ZBZ6DNXZSZESYK
I easily (30 second effort) programed the keys to F2, F3, F4 and it works perfectly!
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.