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

    Dosbox mouse support

    Scheduled Pinned Locked Moved Help and Support
    helpdosboxsupportmouse
    14 Posts 7 Posters 3.8k 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
      MindController
      last edited by

      I was able to install dosbox and get an older FMV game to work (harvester), but without mouse control, you literally cannot do anything.

      I tried following this discussion:
      https://retropie.org.uk/forum/topic/2032/dosbox-mapping-mouse-to-ps3-analog-stick

      This didnt work. The mouse appeared on screen, but I was not able to successfully get it under control, instead it just jumped from one corner to the next.

      I then tried following this discussion:
      https://retropie.org.uk/forum/topic/8847/ps4-analog-stick-as-mouse-for-dosbox-need-help

      And again, mouse will not work.

      I did notice through this discussion: https://retropie.org.uk/forum/topic/12244/can-we-expect-an-lr-package-for-dosbox-some-day

      that aside from slightly less than stellar performance, the libretro version of dosbox seems to have much easier and better mouse support.

      Can someone guide me on how to pull and compile the lr-dosbox core from the retropie github so I can use it? I tried updating the retropie setup script hoping it would be located under experimental there on the retropie, but it isn't.

      Thanks!

      D 1 Reply Last reply Reply Quote 0
      • D
        dudleydes @MindController
        last edited by dudleydes

        @mindcontroller Regarding the Linux Joystick Mapper program, all I can suggest is to build a binary using a different version of the source code. For my PS3 controller, version 0.3.1 seems to work best for me whereas I seem to have problems with 0.4.1. You can download the different versions here.

        Alternatively, you can try using xboxdrv to map the mouse to an analog stick. I believe the documentation includes an example for ScummVM that you could adapt.

        Edit: there does seem to be a scriptmodule for lr-dosbox. It's not in the master branch so I don't know if it's a working version or not. Probably best for one of the devs to confirm.

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

          @dudleydes In regards to using Xboxdrv, I already followed that guide per my original post - https://retropie.org.uk/forum/topic/8847/ps4-analog-stick-as-mouse-for-dosbox-need-help/2 - third reply down

          Using the Xboxdrv system did not work at all.

          I did try using an older version of the Linux Joystick Mapper Program, as you suggested, 0.3.1 and it also had similar issues to the newest version, i.e. it did not work with my controller. I'm not willing to use another controller, as also per my original post, https://retropie.org.uk/forum/topic/12244/can-we-expect-an-lr-package-for-dosbox-some-day - contains a reply from a global moderator who confirms that lr-dosbox has working mouse support without the need for all these additional steps

          Further to the point, I own an NES classic, which is also uses Linux and there is an hmod available for it that uses lr-dosbox, and mapping the mouse movements to the analog stick works flawlessly through the retroarch in game menu.

          I understand the nes classic and retropie do not have the same processor architecture, but I should be able to decide for myself if I want to use lr-retropie, especially since the posts I've seen state it should be under experimental packages, which it is not.

          Perhaps @psyke83 can chime in here and advise me how to proceed since it worked for him.

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

            @mindcontroller said in Dosbox mouse support:

            Using the Xboxdrv system did not work at all.

            From those posts, it looks like xboxdrv was eliminated as an option because the PS4 controller was constantly streaming out erroneous information during evtest due to the controller's g-sensor being active. Two possible suggestions that were not mentioned are first, it may be possible to google the event IDs for a controller as prevalent as the PS4 and second, running evtest with the controller sitting still on a flat, level table might simply be enough to eliminate the constant chatter from the g-sensor.

            As far as compiling libretro cores, I've successfully done it before by using a script module as a crib sheet and I don't remember it being too difficult. However, I suspect DosBox might require some special consideration, so you're better off waiting for someone more familiar with that process to advise you.

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

            1 Reply Last reply Reply Quote 0
            • P
              psyke83 Global Moderator
              last edited by psyke83

              I haven't had much free time to test DOSbox (or anything on RetroPie) lately. But I do intend to re-test the mouse support soon, as I've recently purchased a new Logitech keyboard with integrated touchpad, and I want to see if it works or exhibits any problems.

              buzz had a PR to add lr-dosbox to experimental recently, but he accidentally closed it without merging; last night I asked him to redo it when he has time, so you should be able to try that soon. If you already know the basics on how to use git or general patching, you can try it yourself: https://github.com/RetroPie/RetroPie-Setup/pull/2089

              edmaul69E 1 Reply Last reply Reply Quote 0
              • edmaul69E
                edmaul69 @psyke83
                last edited by

                @psyke83 standard mice work without any issues in dosbox. I use a real mouse or touchpad mouse all the time. Never had to do any kind of setup. As for lr-dosbox i couldnt tell you as standalone dosbox works great for me.

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

                  i just use a keyboard mapping that i made to have my controller act like a mouse, takes a little getting use to, but it works for me fine

                  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 .

                  D 1 Reply Last reply Reply Quote 0
                  • D
                    dudleydes @ExarKunIv
                    last edited by

                    @MindController A scriptmodule for lr-dosbox is now available in the experimental section of the RetroPie setup script with this commit.

                    @edmaul69 The OP's issue was with using a controller as a mouse in DOSBox rather than a physical mouse.

                    @exarkuniv I am curious. Could you provide an example?

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

                      @dudleydes

                      sure, here is the how to guide that i followed with a lot of help from @mediamogul

                      if [ "$3" = "/home/pi/RetroPie/roms/pc/Shadow Warrior.sh" ]
                      then
                      sudo killall > /dev/null 2>&1 xboxdrv
                      sudo /opt/retropie/supplementary/xboxdrv/bin/xboxdrv > /dev/null 2>&1 \
                          --evdev /dev/input/event4 \
                      	--silent \
                      	--detach-kernel-driver \
                      	--force-feedback \
                      	--mimic-xpad \
                      	--dpad-as-button \
                      	--deadzone 4000 \
                      	--trigger-as-button \
                      	--evdev-no-grab \
                      	--evdev-absmap ABS_X=x1,ABS_Y=y1,ABS_Z=x2,ABS_RZ=y2,ABS_HAT0X=dpad_x,ABS_HAT0Y=dpad_y \
                      	--evdev-keymap KEY_#304=a,KEY_#305=b,KEY_#307=x,KEY_#308=y,KEY_#312=lt,KEY_#313=rt,KEY_#310=lb,KEY_#311=rb,KEY_#317=tl,KEY_#318=tr,KEY_#314=back,KEY_#315=start \
                      	--axismap -Y1=Y1,-Y2=Y2 \
                      	--ui-axismap x2=REL_X:09,y2=REL_Y:09 \
                      	--ui-axismap x1=REL_X:07,y1=REL_Y:07 \
                      	--ui-buttonmap rt=BTN_LEFT,lt=BTN_RIGHT,start=KEY_ENTER,back=KEY_ESC,tl=KEY_SPACE,lb=KEY_E,a=KEY_SEMICOLON,b=KEY_APOSTROPHE,x=KEY_LEFTBRACE,y=KEY_RIGHTBRACE,tr=KEY_LEFTCTRL \
                      	--ui-buttonmap guide=void \
                      	--ui-axismap x1=KEY_A:KEY_D,Y1=KEY_W:KEY_S \
                      &
                      fi
                      

                      it does look confusing, but once you know what to do, it works really well. im useing it for a lot of stuff, even though a few packages have been updated to use hardcoded controllers. i still like my mapping better

                      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 .

                      D D 2 Replies Last reply Reply Quote 0
                      • D
                        dudleydes @ExarKunIv
                        last edited by

                        @exarkuniv Thanks. I see you are using xboxdrv. I thought you meant you had mapped your controller to act as a mouse in DOSBox.

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

                          @dudleydes

                          that what it does. i move my right stick and the mouse moves. that is how i play warcraft 2

                          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
                          • D
                            dudleydes
                            last edited by

                            I have built and installed lr-dosbox from source and can confirm that the mouse is indeed mapped to my PS3 controller by default. Mouse movement is mapped to the right analog stick. The left mouse button is mapped to the right trigger (R2) and the right button to the left trigger (L2).

                            It appears that the key mapper doesn't work so games such as Abuse will require a keyboard.

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

                              @dudleydes

                              well that sucks, guess i will just stick to the stock version of DOSbox,
                              xboxdrv mapping works great with it

                              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
                              • D
                                daanv98 @ExarKunIv
                                last edited by

                                @ExarKunIv I know this was some time ago, but I am trying to make my joystick act like a mouse in DOSbox. Do you remember where that file you made is stored?

                                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.