Can I suggest an improvement to the documentation?
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 /dev/input/mouse0 device_raw_mousedev /dev/input/mouse1 device_raw_mousedev /dev/input/mouse2 device_raw_mousedev /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.
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 /dev/input/by-id/usb-GGG_TurboTwist_Spinner-mouse device_raw_mousedev /dev/input/mouse1 device_raw_mousedev /dev/input/by_id/usb-1241_1111-mouse device_raw_mousedev /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?
That's a good suggestion. I added some notes on persistent device paths.