RetroPie forum home
    • Recent
    • Tags
    • Popular
    • Home
    • Docs
    • Register
    • Login

    Can I suggest an improvement to the documentation?

    Scheduled Pinned Locked Moved Ideas and Development
    advmamedocsmousespinnertrackball
    2 Posts 2 Posters 333 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.
    • A
      agent4125
      last edited by

      I was playing around with advancemame, trying to get both a trackball and 2 spinners working on the same control panel on my retropie bartop.

      I followed this guide here from the official docs: https://retropie.org.uk/docs/Spinners,-Trackballs,-Lightguns,-and-other-Mouse-Devices/

      This worked, but on reboots there was no consistency that the mouse indexes stayed the same, so sometimes my spinner and trackballs would work, sometimes they wouldn't. Especially if I plugged in a keyboard for configuration, or other USB devices (extra game pads, etc).

      This bit in particular in advmame.rc (or the 1.4 version of the file): -

      device_raw_mousedev[0] /dev/input/mouse0
      device_raw_mousedev[1] /dev/input/mouse1
      device_raw_mousedev[2] /dev/input/mouse2
      device_raw_mousedev[3] /dev/input/mouse3
      

      ...some boots, /dev/input/mouse0 was trackball, and /dev/input/mouse2 was spinner.
      ...some boots, /dev/input/mouse2 was trackball, and /dev/input/mouse1 was spinner.
      etc.
      etc.

      I fixed this by using the IDs of the trackball and spinner devices instead of the indexes.

      For example, you can find the ids by typing: -

      ls -l /dev/input/by-id
      
      lrwxrwxrwx 1 root root 9 Apr 23 15:30 usb-1241_1111-event-mouse -> ../event4
      lrwxrwxrwx 1 root root 9 Apr 23 15:30 usb-1241_1111-mouse -> ../mouse2
      lrwxrwxrwx 1 root root 9 Apr 23 15:30 usb-GGG_TurboTwist_Spinner-event-mouse -> ../event0
      lrwxrwxrwx 1 root root 9 Apr 23 15:30 usb-GGG_TurboTwist_Spinner-mouse -> ../mouse0
      lrwxrwxrwx 1 root root 9 Apr 23 15:30 usb-Ultimarc_IPAC_2_Ultimarc_IPAC_2_9-event-if02 -> ../event3
      lrwxrwxrwx 1 root root 9 Apr 23 15:30 usb-Ultimarc_IPAC_2_Ultimarc_IPAC_2_9-event-kbd -> ../event1
      lrwxrwxrwx 1 root root 9 Apr 23 15:30 usb-Ultimarc_IPAC_2_Ultimarc_IPAC_2_9-if01-event-mouse -> ../event2
      lrwxrwxrwx 1 root root 9 Apr 23 15:30 usb-Ultimarc_IPAC_2_Ultimarc_IPAC_2_9-if01-mouse -> ../mouse1
      

      For me, the lines I was interested in were the following two: -

      lrwxrwxrwx 1 root root 9 Apr 23 15:30 usb-1241_1111-mouse -> ../mouse2
      lrwxrwxrwx 1 root root 9 Apr 23 15:30 usb-GGG_TurboTwist_Spinner-mouse -> ../mouse0
      

      The first is my trackball, the second my spinner (2 spinners share 1 mouse port on different axes).

      So I solved this by updating the advmame.rc file as follows: -

      device_raw_mousedev[0] /dev/input/by-id/usb-GGG_TurboTwist_Spinner-mouse
      device_raw_mousedev[1] /dev/input/mouse1
      device_raw_mousedev[2] /dev/input/by_id/usb-1241_1111-mouse
      device_raw_mousedev[3] /dev/input/mouse3
      

      Then when setting up dials/paddles/sticks/trackballs in the input section of the .rc file I can consistently use the indexes 0 and 2.

      Just in case others might find this helpful (it would have saved me a LOT of time and frustration if it was on the page). Perhaps the docs could be updated with this information to help others?

      Cheers

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

        That's a good suggestion. I added some notes on persistent device paths.

        1 Reply Last reply Reply Quote 1
        • 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.