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

    Issue when using both a trackball and a spinner in advmame

    Scheduled Pinned Locked Moved Help and Support
    advmame
    4 Posts 2 Posters 542 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.
    • P
      Pfredd
      last edited by Pfredd

      I have a USB trackball and a USB spinner.

      When playing Major Havoc, if I connect EITHER the trackball or the spinner, the game will work correctly with the connected device.

      However, if I connect BOTH the trackball and the spinner, only the trackball works to move the player. I want the spinner to be the control when I play this game (mhavoc).

      Here are my advmame configuration changes:

      device_raw_mousedev[0] /dev/input/by-id/usb-Baolian_industry_Co.__Ltd.BL_button_spinner#_1_206230584252-mouse
      device_raw_mousedev[1] /dev/input/by-id/usb-CHESEN_PS2_to_USB_Converter-if01-mouse
      device_raw_mousedev[2] auto
      device_raw_mousedev[3] auto
      device_raw_mousetype[0] ps2
      device_raw_mousetype[1] ps2
      device_raw_mousetype[2] pnp
      device_raw_mousetype[3] pnp
      input_map[p1_dialx] mouse[0,x]
      input_map[p1_paddlex] mouse[0,x]
      input_map[p1_trackballx] mouse[1,x]
      input_map[p1_trackbally] mouse[1,y]

      How can I specify that the trackball should be ignored and only the spinner is to be used for this game?

      P 1 Reply Last reply Reply Quote 0
      • P
        Pfredd @Pfredd
        last edited by

        I managed to fix it using lr-mame.

        I needed to set the mouse index to 2. I did this by creating a ROM-specific config file (mhavoc.zip.cfg), which was located in the same directory as the ROM, with the following lines:

        input_player1_mouse_index = "2"
        config_save_on_exit = false

        I found this information here: https://retropie.org.uk/forum/topic/23850/trackball-and-spinner-conflict?_=1608083465648

        I still have several questions regarding this.

        First of all, why is it index 2? The device itself is mouse 0 in Linux.

        Second, the log is saying I have four mice, why is that?

        [INFO] [udev]: Mouse #0 (/dev/input/event6).
        [INFO] [udev]: Mouse #1 (/dev/input/mouse1).
        [INFO] [udev]: Mouse #2 (/dev/input/event3).
        [INFO] [udev]: Mouse #3 (/dev/input/mouse0).

        My third question is how do I implement this with advmame? The ROM-specific config file apparently does not work with advmame.

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

          In Advmame, rom specific options are prefixed with the rom name. For instance

          input_map[p1_dialx] mouse[0,x]
          input_map[p1_paddlex] mouse[0,x]
          input_map[p1_trackballx] mouse[1,x]
          input_map[p1_trackbally] mouse[1,y]
          

          applies to all games.

          For a specific game (mhavoc), configuration can be changed with

          mhavoc/input_map[p1_dialx] mouse[1,x]
          mhavoc/input_map[p1_paddlex] mouse[1,x]
          mhavoc/input_map[p1_trackballx] mouse[0,x]
          mhavoc/input_map[p1_trackbally] mouse[0,y]
          
          P 1 Reply Last reply Reply Quote 0
          • P
            Pfredd @mitu
            last edited by Pfredd

            @mitu
            Thanks. That did the trick!

            I hadn't thought of configuring the trackball to actually be the spinner.

            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.