RetroPie forum home
    • Recent
    • Tags
    • Popular
    • Home
    • Docs
    • Register
    • Login
    Please do not post a support request without first reading and following the advice in https://retropie.org.uk/forum/topic/3/read-this-first

    Mapping certain keys from Atari800 emu to the gamepad

    Scheduled Pinned Locked Moved Help and Support
    mappingsatari800config
    31 Posts 7 Posters 12.0k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • M
      mahcneto
      last edited by mahcneto

      @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

      mediamogulM 1 Reply Last reply Reply Quote 0
      • mediamogulM
        mediamogul Global Moderator @mahcneto
        last edited by mediamogul

        @mahcneto

        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.

        RetroPie v4.5 • RPi3 Model B • 5.1V 2.5A PSU • 16GB SanDisk microSD • 512GB External Drive

        1 Reply Last reply Reply Quote 0
        • M
          mahcneto
          last edited by mahcneto

          @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/event4

          Press 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?

          mediamogulM 1 Reply Last reply Reply Quote 0
          • mediamogulM
            mediamogul Global Moderator @mahcneto
            last edited by mediamogul

            @mahcneto

            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.

            RetroPie v4.5 • RPi3 Model B • 5.1V 2.5A PSU • 16GB SanDisk microSD • 512GB External Drive

            1 Reply Last reply Reply Quote 0
            • M
              mahcneto
              last edited by

              Still doesn't work. Every single button works as the Atari Joystick trigger button, even start and select, dunno what to do :/

              mediamogulM 1 Reply Last reply Reply Quote 0
              • mediamogulM
                mediamogul Global Moderator @mahcneto
                last edited by

                @mahcneto

                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"
                

                RetroPie v4.5 • RPi3 Model B • 5.1V 2.5A PSU • 16GB SanDisk microSD • 512GB External Drive

                1 Reply Last reply Reply Quote 0
                • H
                  Hubz
                  last edited by

                  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.

                  mediamogulM 1 Reply Last reply Reply Quote 0
                  • mediamogulM
                    mediamogul Global Moderator @Hubz
                    last edited by

                    @Hubz

                    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?

                    RetroPie v4.5 • RPi3 Model B • 5.1V 2.5A PSU • 16GB SanDisk microSD • 512GB External Drive

                    1 Reply Last reply Reply Quote 0
                    • H
                      Hubz
                      last edited by

                      It paired with bluetooth, I may just have to use a different controller. Not the end of the world. Odd how it maps though!

                      1 Reply Last reply Reply Quote 1
                      • D
                        dunnieboy
                        last edited by dunnieboy

                        meant for another thread.

                        1 Reply Last reply Reply Quote 0
                        • G
                          gmorker
                          last edited by

                          @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!

                          WhatsApp Image 2021-04-21 at 6.32.52 PM (Large).jpeg
                          buttonmapCapture.PNG

                          1 Reply Last reply Reply Quote 0
                          • First post
                            Last post

                          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.