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

    Help With Dosbox "xboxdrv" Driver

    Scheduled Pinned Locked Moved Help and Support
    dosboxgamepadmouse mapping
    13 Posts 3 Posters 1.4k 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.
    • E
      escc1986
      last edited by escc1986

      This Question is for anyone who can help me ... but maby @ExarKunIv could help if he is not busy

      Hi ExarKunIv ... remember this

      https://retropie.org.uk/forum/topic/24836/scummvm-controlller-issues/101

      You Told me to put this in putty to test the gamepad while the game was running

      sudo /opt/retropie/supplementary/xboxdrv/bin/xboxdrv \
      	--evdev /dev/input/event0 \
      	--silent \
      	--detach-kernel-driver \
      	--force-feedback \
      	--mimic-xpad \
      	--trigger-as-button \
      	--evdev-absmap ABS_HAT0X=dpad_x,ABS_HAT0Y=dpad_y \
          --evdev-keymap KEY_#305=a,KEY_#304=b,KEY_#307=x,KEY_#308=y,KEY_#310=tl,KEY_#311=tr,KEY_#314=back,KEY_#315=start \
      	--ui-axismap dpad_x=REL_X:10,dpad_y=REL_Y:10 \
      	--ui-buttonmap a=BTN_LEFT,b=BTN_RIGHT,start=KEY_F5,back=KEY_ESC \
      	--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
      

      to try to get the gamepad acting like a mouse for scummvm

      well i was wondering if i could do the same but with the Dosbox Emulation .... The Original Dosbox Emulator on pi (not ir-Dosbox)

      my main purpose as some games i have loaded dont run on Ir-dosbox

      and i want to use my nes gamepad as a mouse

      all the settings of the keys & buttons are still the same ... may i ask .. could anyone help

      Thank you in advance

      1 Reply Last reply Reply Quote 0
      • mituM
        mitu Global Moderator
        last edited by

        There's a section in the Docs dealing with xboxdrv, which describes how to automatically start (and stop) it, based on system/game.

        E 1 Reply Last reply Reply Quote 0
        • E
          escc1986 @mitu
          last edited by

          @mitu

          thank you

          i could honestly say i have looked through it too many times and i dont seem to undestand it ... i truly need alot of help with it , if someone is willing to help , i would appreciate it

          E 1 Reply Last reply Reply Quote 0
          • E
            escc1986 @escc1986
            last edited by

            @ExarKunIv

            i also made an
            xdrive folder

            and made a pc.cfg

            inside that xdrive folder

            with this located inside the pc.cfg

            [xboxdrv]
            silent=true
            deadzone=4000
            deadzone-trigger=15%
            dpad-as-button=false
            trigger-as-button=true
            detach-kernel-driver=true
            #force-feedback=true
            mimic-xpad=true
            
            [evdev-absmap]
            ABS_X=x1
            ABS_Y=y1
            ABS_Z=x2
            ABS_RZ=y2
            ABS_HAT0X=dpad_x
            ABS_HAT0Y=dpad_y
            
            [evdev-keymap]
            BTN_SOUTH=a
            BTN_EAST=b
            BTN_NORTH=x
            BTN_WEST=y
            BTN_TL=lb
            BTN_TL2=lt
            BTN_TR=rb
            BTN_TR2=rt
            BTN_SELECT=back
            BTN_START=start
            BTN_THUMBL=tl
            BTN_THUMBR=tr
            
            [ui-axismap]
            x1=KEY_LEFT:KEY_RIGHT
            y1=KEY_DOWN:KEY_UP
            dpad_x=REL_X:10
            dpad_y=REL_Y:10
            
            [ui-buttonmap]
            a=BTN_LEFT
            b=KEY_LEFTCTRL
            x=KEY_ENTER
            y=KEY_R
            lb=KEY_C
            lt=KEY_A
            rb=KEY_SPACE
            rt=KEY_D
            back=KEY_F5
            start=KEY_ESC
            tr=KEY_K
            tl=KEY_Y
            
            # EOF #
            
            E 1 Reply Last reply Reply Quote 0
            • E
              escc1986 @escc1986
              last edited by

              @ExarKunIv

              the left button works like a left click

              the right button works as well

              the

              d pad does not worki as a mouse (pointer does not move)

              any help ?

              E 1 Reply Last reply Reply Quote 0
              • E
                escc1986 @escc1986
                last edited by escc1986

                @ExarKunIv

                i also placed this in the +Start DOSBox.sh

                sudo /opt/retropie/supplementary/xboxdrv/bin/xboxdrv >> /dev/shm/runcommand.log 2>&1 --evdev /dev/input/event0 --config /opt/retropie/configs/all//xdrive/pc.cfg &
                
                ExarKunIvE 1 Reply Last reply Reply Quote 0
                • ExarKunIvE
                  ExarKunIv @escc1986
                  last edited by

                  @escc1986 everything looks good and as far as i know it should work as is.

                  i was going to be messing with a few dos game myself today with my xboxdrv.
                  so ill let you know what i find

                  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 .

                  E 1 Reply Last reply Reply Quote 0
                  • E
                    escc1986 @ExarKunIv
                    last edited by

                    @ExarKunIv

                    Thank You

                    yeah the controller dpad doest work , weird ...

                    please let me know your results , Thank you

                    1 Reply Last reply Reply Quote 0
                    • E
                      escc1986
                      last edited by

                      "dpad does not work " sorry for the misspell

                      1 Reply Last reply Reply Quote 0
                      • E
                        escc1986
                        last edited by

                        i got it to work in dosbox here is what i did

                        place this in roms/pc/+Start DOSBox.sh

                        after: #!/bin/bash

                        sudo /opt/retropie/supplementary/xboxdrv/bin/xboxdrv >> /dev/shm/runcommand.log 2>&1 --evdev /dev/input/event0 --config /opt/retropie/configs/all//xdrive/pc.cfg & 
                        

                        place this in pc.cfg

                        
                        [xboxdrv]
                        silent=true
                        deadzone=4000
                        deadzone-trigger=15%
                        dpad-as-button=false
                        trigger-as-button=true
                        detach-kernel-driver=true
                        #force-feedback=true
                        mimic-xpad=true
                        
                        
                        [evdev-absmap]
                        ABS_X=x1
                        ABS_Y=y1
                        
                        [ui-axismap]
                        x1=REL_X:5
                        y1=REL_Y:-5
                        
                        [evdev-keymap]
                        BTN_SOUTH=b
                        BTN_EAST=a
                        
                        [ui-buttonmap]
                        a=BTN_LEFT
                        b=BTN_RIGHT
                        
                        # EOF #
                        
                        
                        1 Reply Last reply Reply Quote 0
                        • E
                          escc1986
                          last edited by

                          @ExarKunIv

                          Thanks for all your help before when you were helping me with the Scummvm mouse pointer ...

                          with all that info i put the use toward this

                          your great !!!

                          Appreciate it

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

                            @escc1986 glad you got it all squared away.
                            i just my dosbox working again and was about to start messing with it.

                            im still going to but now its no rush. lol

                            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 .

                            E 1 Reply Last reply Reply Quote 0
                            • E
                              escc1986 @ExarKunIv
                              last edited by

                              @ExarKunIv

                              lol no problem

                              You helped me get my set up for my controller and helped me with the keys ... i have struggled with this for 4 days lol ... glad it works and i hope others can see this and get the idea how it works :)

                              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.