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

    MAME Trackball not working

    Scheduled Pinned Locked Moved Help and Support
    15 Posts 3 Posters 6.3k 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.
    • W
      wepoo
      last edited by

      Hi all!
      I am building a RetroPi bartop cabinet with 3" Happ Trackball (to Optiwiz), 2 Happ Rotary Sticks (sticks and buttons to an iPac, rotary function to a rotary encoder).

      I cannot get the Trackball working for Marble Madness in MAMA4ALL or AdvMAME. The Trackball input just isn't recognised when in the MAME config menus.
      The Trackball works fine with the AMIGA emulator.

      I've tried direct mapping it through the AdvMame.rc file as in this thread but it doesn't seem to work:

      Any ideas what to try next?
      Cheers

      1 Reply Last reply Reply Quote 0
      • caver01C
        caver01
        last edited by caver01

        Try a test at the command line to see if Linux is detects it.

        To test within Linux try this: cat /dev/input/mice
        Spining the trackball will show characters and move cursor from side to side on the line.

        Now test directly to the device with: cat /dev/input/mouse0 or /dev/input/mouse1 or /dev/input/mouse2.
        It should show the same results as before with characters and move cursor from side to side on the line.

        If you are getting input to Linux this way, we should be able to see that with advanceMAME. Post your .rc so we can take a look at the config.

        My 4-player cocktail style cabinet built as a custom "roadcase"

        W 1 Reply Last reply Reply Quote 1
        • W
          wepoo @caver01
          last edited by wepoo

          @caver01 Thanks. The Trackball is at /dev/input/mouse0

          My RC file for "/opt/retropie/configs/mame-advmame/advmame-1.4.rc".
          The advmame-0.94.0.rc is there but I assume retropie is using 1-4?

          I changed the RC file:
          ..From:
          input_map[p1_trackballx] mouse[0,x] mouse[1,x] mouse[2,x]
          input_map[p1_trackbally] mouse[0,y] mouse[1,y] mouse[2,y]
          .....To:
          input_map[p1_trackballx] mouse[0,x]
          input_map[p1_trackbally] mouse[0,y]

          Stil not working. I wonder if there is some setup to do in game in the (TAB) menu..?
          Or if MAME won't allow a Trackball is Joysticks are already plugged in?

          BuZzB caver01C 2 Replies Last reply Reply Quote 0
          • BuZzB
            BuZz administrators @wepoo
            last edited by

            @wepoo https://retropie.org.uk/forum/topic/3/read-this-first - use markdown to format your post

            To help us help you - please make sure you read the sticky topics before posting - https://retropie.org.uk/forum/topic/3/read-this-first

            1 Reply Last reply Reply Quote 1
            • caver01C
              caver01 @wepoo
              last edited by

              @wepoo your fie looks ok. RetroPie is using whatever version of Advancemame you specify in runcommand. If you haven't specified the default, it's probably launching with .94.

              Another thing to check is the MAME GUI inputs for "this game" analog, to see if it wants a trackball, dial, etc. if dial, you need to specify the device for that input.

              I am wondering if you are simply editing the 1.4 config but launching with .94.

              My 4-player cocktail style cabinet built as a custom "roadcase"

              caver01C 1 Reply Last reply Reply Quote 0
              • caver01C
                caver01 @caver01
                last edited by caver01

                @caver01 another thing to check is to try using the AdvanceMAME mouse testing utility. I don't remember if it gets compiled or not, so you'll have to navigate to the bin directory where the emulator executable lives (I am away from my Pi, but I am thinking somewhere beneath /opt/retropie/emulators/mame-advance. )When you get to the bin directory look for advm. If it's there, type ./advm -device_mouse raw and move the trackball. You should see values change. That proves that advancemame can see the raw input.

                My 4-player cocktail style cabinet built as a custom "roadcase"

                1 Reply Last reply Reply Quote 0
                • W
                  wepoo
                  last edited by

                  @caver01 Thanks so much for all your help. Lots of things to try that I wouldn't have known.

                  I've tried a few things (some of which you suggested).

                  Turns out the IPAC2 has Joystick maps. So long as it's plugged in the Joystick will dismiss any mouse input while a game is running. I unplugged the IPAC2 and am getting some okay control (still sorting it all out but I can play games).
                  Waiting on a firmware update form Ultimarc.com for the IPAC2 that will remove any Joystick mapping on the IPAC2.

                  When I'm playing Sonic.zip my Logitech K440r wireless keyboard and trackpad registers Player 1 Trackball input and the Happ Track ball (through OptiWizz controller) is Player 2.

                  1 Reply Last reply Reply Quote 0
                  • caver01C
                    caver01
                    last edited by

                    Interesting that the ipac is blocking like that. I have an early model ipac4 that works as a keyboard not a joystick. I expect that's what your firmware update will do.

                    My 4-player cocktail style cabinet built as a custom "roadcase"

                    W 1 Reply Last reply Reply Quote 0
                    • W
                      wepoo @caver01
                      last edited by wepoo

                      @caver01 Yeh I remember once having an IPAC from around 2001 it was just a keyboard map. These new ones are fancy-pants!

                      Looks like I just have to change the polling and check some games that do multiplayer, just little stuff. But I've played some Marble Madness tonight on my half build Bartop Cabinet which is pretty exciting.

                      Turns out with advmame I was booting ADVMAME 0.94 so I had to edit:
                      /opt/retropie/configs/mame-advmame/emulators.cfg
                      to change the "default" to 1.4
                      I'm hoping this change will fix the issues with Joysticks dismissing mouse input. I tested it earlier but am away form the Retropie now to confirm what devices were plugged in.

                      1 Reply Last reply Reply Quote 0
                      • W
                        wepoo
                        last edited by

                        Now I have to spend a little time to find out what version of MAME might support Rotary Sticks and the appropriate sensitivity settings.

                        caver01C 1 Reply Last reply Reply Quote 0
                        • caver01C
                          caver01 @wepoo
                          last edited by

                          @wepoo I am very curious about the rotary sticks. What hardware are you using? Do they snap into positions, or are they free spinning?

                          My 4-player cocktail style cabinet built as a custom "roadcase"

                          W 1 Reply Last reply Reply Quote 0
                          • W
                            wepoo @caver01
                            last edited by

                            @caver01
                            https://na.suzohapp.com/products/joysticks/50-5618-00
                            http://www.ultimarc.com/rotary.html

                            Yup very clicky. I think they have 12 positions and lock into each one. So playing Midnight Resistance, Heavy Barrel etc they feel just perfect as you aim. The stick spring is a bit heavy, plus you can feel the weight of the rotary mechanism underneath but they are very good overall. I just prefer a JLF balltop.

                            I'm trying to find / install a version of MAME that has the Positional Analogue option under Input [This Game] in Midnight Resistance. Otherwise the rotary control is only 80% good (skips or ignores 20% of rotary clicks). Sadly stuck for time but also stuck installing ir-mame2010 just boots into a RetroArch menu seemingly missing any Cores..?

                            caver01C 1 Reply Last reply Reply Quote 0
                            • caver01C
                              caver01 @wepoo
                              last edited by

                              @wepoo said in MAME Trackball not working:

                              I'm trying to find / install a version of MAME that has the Positional Analogue option under Input [This Game] in Midnight Resistance. Otherwise the rotary control is only 80% good (skips or ignores 20% of rotary clicks). Sadly stuck for time but also stuck installing ir-mame2010 just boots into a RetroArch menu seemingly missing any Cores..?

                              That's interesting. The interface simply sends "[" or "]" for rotation, right? Or is it also responsible for some kind of analog signal?

                              My 4-player cocktail style cabinet built as a custom "roadcase"

                              W 1 Reply Last reply Reply Quote 0
                              • W
                                wepoo @caver01
                                last edited by wepoo

                                @caver01 Yes the rotary encoder sends P1: [] P2: /\. This works fine in windows notepad and cmdline. In MAME some of those inputs get ignored. I guess it uses an analogue mapping for rotary input.

                                Having a MAME version with:
                                TAB > Input(This Game) > Positional Analogue: NONE, Positional Analogue Dec: [, Positional Analogue Inc: ]
                                AND
                                TAB > Analogue Controls > Digital Speed: 0. Sensitivity: 100

                                Gives perfect or near perfect response. So on MAME OS X on my macbook I get great rotary response. and gosh it's a fun reminisce.

                                Note for anyone later: Retropie has a UK keyboard and the P2 Right rotation mapping goes to a special key (£ or something MAME does't recognise). Rotary controls need the Linux keyboard changed to US standard 105 key (it's in the retropie Setup Script).

                                1 Reply Last reply Reply Quote 0
                                • W
                                  wepoo
                                  last edited by wepoo

                                  Looks like adv-mame 1.4 has rudimentary rotary control support. It's playable but not perfect. The Analogue Controls section needs tuning.

                                  Around 10-12 Digital speed and about 100% Sensitivity.
                                  Dunno what auto centre does.

                                  My Trackball was having issues with mouse polling. When I spun it too fast it would register the spin in the opposite way. I had to add "usbhid.mousepoll=1" to "/boot/cmdline.txt". To increase the poll rate.
                                  Most people recommend mousepoll=2 but I was still getting backspin. As yet I haven't noticed a performance reduction at mousepoll=1. The back spin seems to be all gone.
                                  I also had to plug the Trackball directly into the RetroPie USB. It was in a little USB hub but the USB hub speed wasn't enough

                                  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.