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

    Scummvm controller help

    Scheduled Pinned Locked Moved Help and Support
    scummvmcontroller help
    76 Posts 8 Posters 13.3k 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.
    • B
      bassman6805
      last edited by

      Input driver version is 1.0.1
      Input device ID: bus 0x3 vendor 0x1 product 0x1 version 0x1
      Input device name: "retrogame"
      Supported events:
      Event type 0 (EV_SYN)
      Event type 1 (EV_KEY)
      Event code 1 (KEY_ESC)
      Event code 16 (KEY_Q)
      Event code 17 (KEY_W)
      Event code 28 (KEY_ENTER)
      Event code 30 (KEY_A)
      Event code 31 (KEY_S)
      Event code 44 (KEY_Z)
      Event code 45 (KEY_X)
      Event code 103 (KEY_UP)
      Event code 105 (KEY_LEFT)
      Event code 106 (KEY_RIGHT)
      Event code 108 (KEY_DOWN)
      Properties:
      Testing ... (interrupt to exit)
      Event: time 1508808873.707404, type 1 (EV_KEY), code 108 (KEY_DOWN), value 1
      Event: time 1508808873.707404, -------------- EV_SYN ------------
      Event: time 1508808873.984816, type 1 (EV_KEY), code 108 (KEY_DOWN), value 0
      Event: time 1508808873.984816, -------------- EV_SYN ------------
      Event: time 1508808878.052055, type 1 (EV_KEY), code 103 (KEY_UP), value 1
      Event: time 1508808878.052055, -------------- EV_SYN ------------
      Event: time 1508808878.303562, type 1 (EV_KEY), code 103 (KEY_UP), value 0
      Event: time 1508808878.303562, -------------- EV_SYN ------------
      Event: time 1508808880.872279, type 1 (EV_KEY), code 105 (KEY_LEFT), value 1
      Event: time 1508808880.872279, -------------- EV_SYN ------------
      Event: time 1508808881.057428, type 1 (EV_KEY), code 105 (KEY_LEFT), value 0
      Event: time 1508808881.057428, -------------- EV_SYN ------------
      Event: time 1508808881.748917, type 1 (EV_KEY), code 106 (KEY_RIGHT), value 1
      Event: time 1508808881.748917, -------------- EV_SYN ------------
      Event: time 1508808881.916709, type 1 (EV_KEY), code 106 (KEY_RIGHT), value 0
      Event: time 1508808881.916709, -------------- EV_SYN ------------
      Event: time 1508808883.058113, type 1 (EV_KEY), code 1 (KEY_ESC), value 1
      Event: time 1508808883.058113, -------------- EV_SYN ------------
      Event: time 1508808883.261601, type 1 (EV_KEY), code 1 (KEY_ESC), value 0
      Event: time 1508808883.261601, -------------- EV_SYN ------------
      Event: time 1508808884.043804, type 1 (EV_KEY), code 28 (KEY_ENTER), value 1
      Event: time 1508808884.043804, -------------- EV_SYN ------------
      Event: time 1508808884.194038, type 1 (EV_KEY), code 28 (KEY_ENTER), value 0
      Event: time 1508808884.194038, -------------- EV_SYN ------------
      Event: time 1508808886.715256, type 1 (EV_KEY), code 30 (KEY_A), value 1
      Event: time 1508808886.715256, -------------- EV_SYN ------------
      Event: time 1508808886.910315, type 1 (EV_KEY), code 30 (KEY_A), value 0
      Event: time 1508808886.910315, -------------- EV_SYN ------------
      Event: time 1508808887.382060, type 1 (EV_KEY), code 45 (KEY_X), value 1
      Event: time 1508808887.382060, -------------- EV_SYN ------------
      Event: time 1508808887.557515, type 1 (EV_KEY), code 45 (KEY_X), value 0
      Event: time 1508808887.557515, -------------- EV_SYN ------------
      Event: time 1508808889.027526, type 1 (EV_KEY), code 44 (KEY_Z), value 1
      Event: time 1508808889.027526, -------------- EV_SYN ------------
      Event: time 1508808889.185223, type 1 (EV_KEY), code 44 (KEY_Z), value 0
      Event: time 1508808889.185223, -------------- EV_SYN ------------
      Event: time 1508808889.755801, type 1 (EV_KEY), code 31 (KEY_S), value 1
      Event: time 1508808889.755801, -------------- EV_SYN ------------
      Event: time 1508808889.923615, type 1 (EV_KEY), code 31 (KEY_S), value 0
      Event: time 1508808889.923615, -------------- EV_SYN ------------
      Event: time 1508808891.277758, type 1 (EV_KEY), code 17 (KEY_W), value 1
      Event: time 1508808891.277758, -------------- EV_SYN ------------
      Event: time 1508808891.467049, type 1 (EV_KEY), code 17 (KEY_W), value 0
      Event: time 1508808891.467049, -------------- EV_SYN ------------
      Event: time 1508808892.993258, type 1 (EV_KEY), code 16 (KEY_Q), value 1
      Event: time 1508808892.993258, -------------- EV_SYN ------------
      Event: time 1508808893.232212, type 1 (EV_KEY), code 16 (KEY_Q), value 0
      Event: time 1508808893.232212, -------------- EV_SYN ------------

      ExarKunIvE 1 Reply Last reply Reply Quote 0
      • ExarKunIvE
        ExarKunIv @bassman6805
        last edited by

        @bassman6805

        ok good the second one is not a big deal. so no worries

        the next thing we need to do is start the mapping.

        as you read in the guide you will need to make a runcommand-onstart.sh and runcommand-onend.sh

        for runcommand-onend.sh you just need to follow what is in the guide, that will never change.

        the runcommand-onstart.sh is the one that will change, i will help you out with the start, once you play with it a little then i can point out what needs to be done to get it going

        [•] is where you will enter the keycode from your post above.
        --evdev-keymap KEY_#304=a is how you will need to enter it.

        #!/bin/sh
        sudo killall > /dev/null 2>&1 xboxdrv
        /opt/retropie/supplementary/xboxdrv/bin/xboxdrv > /dev/null 2>&1 \
             --evdev /dev/input/event0 \
            --silent \
            --detach-kernel-driver \
            --force-feedback \
            --deadzone-trigger 15% \
            --deadzone 4000 \
            --mimic-xpad \
            --evdev-absmap ABS_[•]=x1,ABS_[•]=y1,ABS_[•]=x2,ABS_[•]=y2,ABS_[•]=lt,ABS_[•]=rt,ABS_[•]=dpad_x,ABS_[•]=dpad_y \
            --evdev-keymap BTN_[•]=a,BTN_[•]=b,BTN_[•]=x,BTN_[•]=y,BTN_[•]=lb,BTN_[•]=rb,BTN_[•]=tl,BTN_[•]=tr,BTN_[•]=guide,BTN_[•]=back,BTN_[•]=start \
            &
        

        so you have a anlog joystick on your controller? or is it just buttons

        RPi3B+ / 200GB/ RetroPie v4.5.14, RPi4 Model B 4gb / 256gb / RetroPie 4.8.2
        RPi5 4gb / 512gb / RetroPie 4.8.9 -Basic
        Maintainer of RetroPie-Extra .

        1 Reply Last reply Reply Quote 0
        • B
          bassman6805
          last edited by bassman6805

          Thanks. I will work on it this evening when I get home. The controller is in the picture. It has an analog joystick and buttons. The buttons are from a super nintendo controller board I cut up and the analog joystick is from the raspberry pi store. Here is the guide to what I made.

          https://learn.adafruit.com/super-game-pi

          I don't think the joystick is an actual analog movement joystick. Looks like it's just up, down, left, right.

          ExarKunIvE 1 Reply Last reply Reply Quote 0
          • ExarKunIvE
            ExarKunIv @bassman6805
            last edited by

            @bassman6805

            ok cool

            the only think that might be a hang up will be the fact is that you do no have any ABS or anglog movement which is used for the mouse movement.

            but i think it still should work with just buttons, we will cross that when the time comes. if need be we can ask the god of keymapping.

            RPi3B+ / 200GB/ RetroPie v4.5.14, RPi4 Model B 4gb / 256gb / RetroPie 4.8.2
            RPi5 4gb / 512gb / RetroPie 4.8.9 -Basic
            Maintainer of RetroPie-Extra .

            1 Reply Last reply Reply Quote 0
            • B
              bassman6805
              last edited by bassman6805

              I completed both steps of creating the runcommand-onend.sh and runcommand-onstart.sh. Based on what I posted above for my controller layout does this look correct for the keys?

              --evdev-keymap KEY_#44=a,KEY_#45=b,KEY_#31=x,KEY_#30=y,KEY_#16=lb,KEY_#17=rb,BTN_[•]=tl,BTN_[•]=tr,BTN_[•]=guide,KEY_#1=back,KEY_#28=start
              &

              If so, where do I assign the keys for direction? According tho the results I got they would be keys 108, 103, 105, 106.

              Thanks for your help.

              ExarKunIvE 1 Reply Last reply Reply Quote 0
              • ExarKunIvE
                ExarKunIv @bassman6805
                last edited by

                @bassman6805
                so far it is looking good
                you can remove BTN_[•]=tl,BTN_[•]=tr,BTN_[•]=guide

                for your d pad it will look like this BTN_TOP2=du,BTN_PINKIE=dr,BTN_BASE=dd,BTN_BASE2=dl
                replace the BTN with your key number

                as for getting it to work with the mouse im still looking it to

                RPi3B+ / 200GB/ RetroPie v4.5.14, RPi4 Model B 4gb / 256gb / RetroPie 4.8.2
                RPi5 4gb / 512gb / RetroPie 4.8.9 -Basic
                Maintainer of RetroPie-Extra .

                1 Reply Last reply Reply Quote 0
                • B
                  bassman6805
                  last edited by

                  When I add the directions do they go in the same line as the others?

                  ExarKunIvE 1 Reply Last reply Reply Quote 0
                  • ExarKunIvE
                    ExarKunIv @bassman6805
                    last edited by

                    @bassman6805

                    yes.

                    you keep everything that goes with the first part in the same line.
                    --evdev-keymap is for keys and buttons.

                    RPi3B+ / 200GB/ RetroPie v4.5.14, RPi4 Model B 4gb / 256gb / RetroPie 4.8.2
                    RPi5 4gb / 512gb / RetroPie 4.8.9 -Basic
                    Maintainer of RetroPie-Extra .

                    1 Reply Last reply Reply Quote 0
                    • B
                      bassman6805
                      last edited by

                      Here is what I have for the onstart.sh

                      #!/bin/sh
                      if [ "$1" = "scummvm" ]
                      then
                      sudo killall > /dev/null 2>&1 xboxdrv
                      sudo /opt/retropie/supplementary/xboxdrv/bin/xboxdrv > /dev/null 2>&1
                      --evdev /dev/input/by-id/[•]
                      --silent
                      --detach-kernel-driver
                      --force-feedback
                      --deadzone-trigger 15%
                      --deadzone 4000
                      --mimic-xpad
                      --evdev-absmap ABS_[•]=x1,ABS_[•]=y1,ABS_[•]=x2,ABS_[•]=y2,ABS_[•]=lt,ABS_[•]=rt,ABS_[•]=dpad_x,ABS_[•]=dpad_y
                      --evdev-keymap KEY_#44=a,KEY_#45=b,KEY_#31=x,KEY_#30=y,KEY_#16=lb,KEY_#17=rb,KEY_#1=back,KEY_#28=start,KEY_108=du,KEY_106=dr,KEY_103=dd,KEY_105=dl
                      --axismap -Y1=Y1,-Y2=Y2
                      --ui-axismap x1=REL_X:10,y1=REL_Y:10
                      --ui-buttonmap b=BTN_LEFT,a=BTN_RIGHT,start=KEY_F5
                      --ui-buttonmap guide=void,x=void,y=void,lb=void,rb=void,tl=void,tr=void,lt=void,rt=void,back=void
                      --ui-axismap x2=void
                      &
                      fi

                      1 Reply Last reply Reply Quote 0
                      • B
                        bassman6805
                        last edited by bassman6805

                        I'm still not getting anything to work. I am using scummvm sdl1 if that matters.

                        I also tried regular scummvm.

                        ExarKunIvE 1 Reply Last reply Reply Quote 0
                        • ExarKunIvE
                          ExarKunIv @bassman6805
                          last edited by

                          @bassman6805
                          you have most of it right but there are a few things that were needed
                          try this

                          #!/bin/sh
                          if [ "$1" = "scummvm" ]
                          then
                          sudo killall > /dev/null 2>&1 xboxdrv
                          sudo /opt/retropie/supplementary/xboxdrv/bin/xboxdrv > /dev/null 2>&1   \
                          --evdev /dev/input/event0 \
                          --silent \
                          --detach-kernel-driver \
                          --force-feedback \
                          --deadzone-trigger 15% \
                          --deadzone 4000 \
                          --mimic-xpad \
                          --evdev-keymap KEY_#44=a,KEY_#45=b,KEY_#31=x,KEY_#30=y,KEY_#16=lb,KEY_#17=rb,KEY_#1=back,KEY_#28=start,KEY_#108=du,KEY_#106=dr,KEY_#103=dd,KEY_#105=dl \
                          --ui-buttonmap b=BTN_LEFT,a=BTN_RIGHT,start=KEY_F5,dr=REL_X:25,dl=REL_X:-25,dd=REL_Y:25,du=REL_Y:-25 \
                          --ui-buttonmap guide=void,x=void,y=void,lb=void,rb=void,tl=void,tr=void,lt=void,rt=void,back=void \
                          
                          &
                          fi
                          

                          RPi3B+ / 200GB/ RetroPie v4.5.14, RPi4 Model B 4gb / 256gb / RetroPie 4.8.2
                          RPi5 4gb / 512gb / RetroPie 4.8.9 -Basic
                          Maintainer of RetroPie-Extra .

                          1 Reply Last reply Reply Quote 0
                          • B
                            bassman6805
                            last edited by

                            I'll give it a shot this evening. On a side note, how do you get the code to show up in the black box on here?

                            ExarKunIvE 1 Reply Last reply Reply Quote 0
                            • ExarKunIvE
                              ExarKunIv @bassman6805
                              last edited by

                              @bassman6805

                              before what you want in the box you put ```

                              and if you want red you put `

                              RPi3B+ / 200GB/ RetroPie v4.5.14, RPi4 Model B 4gb / 256gb / RetroPie 4.8.2
                              RPi5 4gb / 512gb / RetroPie 4.8.9 -Basic
                              Maintainer of RetroPie-Extra .

                              1 Reply Last reply Reply Quote 0
                              • B
                                bassman6805
                                last edited by

                                I pasted the code word for word but I still don't get any movement when I launch scummvm and the buttons do not seem to do anything either. Is there something else I can check? Would it help if I posted some settings or something?

                                1 Reply Last reply Reply Quote 0
                                • B
                                  bassman6805
                                  last edited by

                                  I did find out that the xboxdrv was not installed. The original directions I found were old and the menus had changed. I figured out the location and installed it but still no controller response.

                                  1 Reply Last reply Reply Quote 0
                                  • ExarKunIvE
                                    ExarKunIv
                                    last edited by

                                    when you are running the game you can put this on the command line.

                                    then
                                    sudo killall > /dev/null 2>&1 xboxdrv
                                    sudo /opt/retropie/supplementary/xboxdrv/bin/xboxdrv    \
                                    --evdev /dev/input/event0 \
                                    --silent \
                                    --detach-kernel-driver \
                                    --force-feedback \
                                    --deadzone-trigger 15% \
                                    --deadzone 4000 \
                                    --mimic-xpad \
                                    --evdev-keymap KEY_#44=a,KEY_#45=b,KEY_#31=x,KEY_#30=y,KEY_#16=lb,KEY_#17=rb,KEY_#1=back,KEY_#28=start,KEY_#108=du,KEY_#106=dr,KEY_#103=dd,KEY_#105=dl \
                                    --ui-buttonmap b=BTN_LEFT,a=BTN_RIGHT,start=KEY_F5,dr=REL_X:25,dl=REL_X:-25,dd=REL_Y:25,du=REL_Y:-25 \
                                    --ui-buttonmap guide=void,x=void,y=void,lb=void,rb=void,tl=void,tr=void,lt=void,rt=void,back=void \
                                    
                                    &
                                    

                                    this will force it to start and if there is any errors it will come up.

                                    if it is working it will pop up something like 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/js2
                                      /dev/input/event4
                                    
                                    Press Ctrl-C to quit
                                    

                                    if nothing comes up then there is something else not working. i did try the mapping i gave you so i know there are no errors on it for my system at least

                                    RPi3B+ / 200GB/ RetroPie v4.5.14, RPi4 Model B 4gb / 256gb / RetroPie 4.8.2
                                    RPi5 4gb / 512gb / RetroPie 4.8.9 -Basic
                                    Maintainer of RetroPie-Extra .

                                    1 Reply Last reply Reply Quote 0
                                    • B
                                      bassman6805
                                      last edited by

                                      Please excuse my ignorance. I'm not sure how to get a command line after I select scummvm from the retropie menu. Do I start scummvm on the retropie menu then ssh into the unit and run the command?

                                      ExarKunIvE 1 Reply Last reply Reply Quote 0
                                      • ExarKunIvE
                                        ExarKunIv @bassman6805
                                        last edited by

                                        @bassman6805

                                        yes that is correct

                                        sorry for not being clearer. getting over a stomach bug

                                        RPi3B+ / 200GB/ RetroPie v4.5.14, RPi4 Model B 4gb / 256gb / RetroPie 4.8.2
                                        RPi5 4gb / 512gb / RetroPie 4.8.9 -Basic
                                        Maintainer of RetroPie-Extra .

                                        1 Reply Last reply Reply Quote 0
                                        • B
                                          bassman6805
                                          last edited by

                                          Sorry about that. Will this still work at the opening scummvm screen? That's as far as I can get. I don't have any games loaded because I can't move the cursor to load them. This is all I get.

                                          0_1509461629710_c418ea8f-b360-4d8d-914d-bb74eeb6a2b4-image.png

                                          ExarKunIvE 1 Reply Last reply Reply Quote 0
                                          • ExarKunIvE
                                            ExarKunIv @bassman6805
                                            last edited by

                                            @bassman6805

                                            yes if you put this in the ssh it will come up with something

                                            then
                                            sudo killall > /dev/null 2>&1 xboxdrv
                                            sudo /opt/retropie/supplementary/xboxdrv/bin/xboxdrv    \
                                            --evdev /dev/input/event0 \
                                            --silent \
                                            --detach-kernel-driver \
                                            --force-feedback \
                                            --deadzone-trigger 15% \
                                            --deadzone 4000 \
                                            --mimic-xpad \
                                            --evdev-keymap KEY_#44=a,KEY_#45=b,KEY_#31=x,KEY_#30=y,KEY_#16=lb,KEY_#17=rb,KEY_#1=back,KEY_#28=start,KEY_#108=du,KEY_#106=dr,KEY_#103=dd,KEY_#105=dl \
                                            --ui-buttonmap b=BTN_LEFT,a=BTN_RIGHT,start=KEY_F5,dr=REL_X:25,dl=REL_X:-25,dd=REL_Y:25,du=REL_Y:-25 \
                                            --ui-buttonmap guide=void,x=void,y=void,lb=void,rb=void,tl=void,tr=void,lt=void,rt=void,back=void \
                                            
                                            &
                                            
                                            

                                            if all works then this will come up as soon as you hit enter

                                            
                                            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/event2
                                            
                                            Press Ctrl-C to quit
                                            

                                            RPi3B+ / 200GB/ RetroPie v4.5.14, RPi4 Model B 4gb / 256gb / RetroPie 4.8.2
                                            RPi5 4gb / 512gb / RetroPie 4.8.9 -Basic
                                            Maintainer of RetroPie-Extra .

                                            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.