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

    Aimtrak Gun (Mouse Issues) and Mame UPDATED

    Scheduled Pinned Locked Moved Help and Support
    mame-libretroadvmame 1.4aimtrak
    9 Posts 2 Posters 3.2k 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.
    • T
      tuki_cat
      last edited by tuki_cat

      Pi Model: 3b
      Power Supply used: Official Raspberry Pi 5.1V 2.5A
      RetroPie Version Used: 4.4
      Built From: Pre made SD Image on RetroPie website
      USB Devices connected: IPAC 2 & Aimtrak gun

      Hi,

      I have searched this forum and have found some info on Aimtraks, but nothing that as helped with the issue I am having.

      I first tried to connect it to my Retropie cabinet but had real trouble calibrating the gun. I know that getting the IR sensor in the right place is crucial so I played around with that. I eventially got it to a semi-satisfactory state and tried it in game using lr-mame 2003 (Operation Wolf), but the calibration was off. I tried adjusting the sensor position, my position, closing the curtains, turning the lights off, etc but I could not get the gun to calibrate properly. Sometimes I could not shoot at half of the screen. The gun was moving the crosshair, but the movement is not smooth, so I knwo somehting is being registered.

      I next tried to test using the ADVM in advance mame 1.4 to see if the gun was registering, but this did not work. It appeared that the gun was registering as a joystick (the button presses and movement were not registering as a mouse, even though I had it set a mouse.

      I used the windows software to update the firmware (it was already up to date, but I refreshed it anyway) and to check that the gun was set to mouse, it was.

      I then tried it on a PC setup to eliminate the possibility it was my retropie setup, but I found the same issues persisted. I had trouble calibrating the gun and in game (Operatiion Wolf) the calibration settings were off.

      I have also tried using the tools in the aimtrak configiuration software, both the official version and the version for linux, but have had issues, and in either case I cannot get the gun to calibrate properly, or work properly in game.

      Thanks!

      T 1 Reply Last reply Reply Quote 0
      • T
        tuki_cat @tuki_cat
        last edited by

        I have done some additional testing and I have managed to get the gun calibrated. However, I am still having issues with lr-mame 2003 and advance mame 1.4.

        I ran lr-mame 2003 wiht verbose logging and I have attached the log here.

        https://pastebin.com/GcmmXfHP

        I am finding the entries for the mice (five of them!?) a little confusing, the entries are: -

        [INFO] [udev]: Mouse #0 (/dev/input/event7).
        [INFO] [udev]: Mouse #1 (/dev/input/mouse1).
        [INFO] [udev]: Mouse #2 (/dev/input/event2).
        [INFO] [udev]: Mouse #3 (/dev/input/js1).
        [INFO] [udev]: Mouse #4 (/dev/input/mouse0).

        I actually only have the Aimtrak connected at the moment (so I could make sure that a standard mouse was not causing the issue), so I am not sure why five mice are showing.

        When I use lr-mame 2003 I have to set the input_player1_mouse_index = "2"

        This allows me to use the light gun in lr-mame 2003, but it is not perfect and the crosshair still wanders little.

        However, when I run advance mames advm file it says I only have two mice 0 and 1. When i move the Aimtrak it should register some mouse inputs but if doesn't, what I actually get are symbols and letters. These are actually the same symbols that I get if i move the joystick on my cabinet. which is why I think that the Aimtrak is behaving like a joystick.

        Is anyone able to help me make sense of log? I feel like I making some progress, but I need a little help intrepreting the log.

        Thanks!

        1 Reply Last reply Reply Quote 0
        • markwkiddM
          markwkidd
          last edited by

          @tuki_cat said in Aimtrak Gun (Mouse Issues) and Mame UPDATED:

          I am finding the entries for the mice (five of them!?) a little confusing, the entries are: -
          [INFO] [udev]: Mouse #0 (/dev/input/event7).
          [INFO] [udev]: Mouse #1 (/dev/input/mouse1).
          [INFO] [udev]: Mouse #2 (/dev/input/event2).
          [INFO] [udev]: Mouse #3 (/dev/input/js1).
          [INFO] [udev]: Mouse #4 (/dev/input/mouse0).
          I actually only have the Aimtrak connected at the moment (so I could make sure that a standard mouse was not causing the issue), so I am not sure why five mice are showing.

          Take a look here: https://github.com/RetroPie/RetroPie-Setup/wiki/Spinners,-Trackballs,-Lightguns,-and-other-Mouse-Devices#configuring-retroarch-emulators-for-mouse-like-device-use

          T 1 Reply Last reply Reply Quote 0
          • T
            tuki_cat @markwkidd
            last edited by

            @markwkidd Hi, thanks for the reply, I have taken a look at that, but I just can't seem to figure it out.

            For instance, in advance mame, based on my log do you know how I would set up the mice?

            Would I use the following in advmame-1.4.rc

            device_mouse raw
            device_raw_mousedev[0] /dev/input/event7
            device_raw_mousedev[2] /dev/input/event2
            device_raw_mousetype[0] ps2
            device_raw_mousetype[2] ps2

            markwkiddM 1 Reply Last reply Reply Quote 0
            • markwkiddM
              markwkidd @tuki_cat
              last edited by

              @tuki_cat said in Aimtrak Gun (Mouse Issues) and Mame UPDATED:

              For instance, in advance mame, based on my log do you know how I would set up the mice?

              That is just a little bit lower on the same page. Have you tried what is described here? https://github.com/RetroPie/RetroPie-Setup/wiki/Spinners,-Trackballs,-Lightguns,-and-other-Mouse-Devices#advancemame-mouse-input-testing

              What happened?

              T 1 Reply Last reply Reply Quote 0
              • T
                tuki_cat @markwkidd
                last edited by

                @markwkidd

                When I run advm it say it has detects one mouse, I believe this mouse is the Aimtrak (there are no other mice plugged in).

                Here is a picture. However, when I move the Aimtrak I get a load of text, appear as shown in the picture, rather than mouse inputs. If I move my joystick on my control panel, I get the same text.

                0_1528406782793_IMAG0151.jpg

                I would have thought that moving the Aimtrak would give me mouse inputs, as part of advm test?

                T 1 Reply Last reply Reply Quote 0
                • T
                  tuki_cat @tuki_cat
                  last edited by tuki_cat

                  @tuki_cat said in Aimtrak Gun (Mouse Issues) and Mame UPDATED:

                  @markwkidd

                  When I run advm it say it has detects one mouse, I believe this mouse is the Aimtrak (there are no other mice plugged in).

                  Here is a picture. However, when I move the Aimtrak I get a load of text, appear as shown in the picture, rather than mouse inputs. If I move my joystick on my control panel, I get the same text.

                  0_1528406782793_IMAG0151.jpg

                  I would have thought that moving the Aimtrak would give me mouse inputs, as part of advm test?

                  Looking at the Advance Mame documentation, it says the following about ADVM

                  "The `advm' utility tests the mouse.

                  Check the advdev.txt' file for the description of the device_mouse' and related options.

                  In Linux you need to kill GPM before running `advm'. Otherwise the mouse may not respond correctly. "

                  I am not able to access my Pi until later today, but has anyone else run kill GPM before using the ADVM to test their mouse?

                  1 Reply Last reply Reply Quote 0
                  • T
                    tuki_cat
                    last edited by

                    Hi,

                    I have managed to solve this so thought it might be worth posting my experience on here in case it helps others.

                    After a few days of frustration I decided to take break from trying to get the Aimtrak working - this helped no end!

                    I went back to advance mame 1.4 and added the following to .rc file: -
                    device_mouse raw
                    device_raw_firstkeyhack no
                    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
                    device_raw_mousetype[0] ps2
                    device_raw_mousetype[1] ps2
                    device_raw_mousetype[2] ps2
                    device_raw_mousetype[3] ps2

                    One this was done I ran the ./advm -device_mouse raw and could test the mouse correctly.

                    This section of the docs was the most useful - https://retropie.org.uk/docs/Spinners,-Trackballs,-Lightguns,-and-other-Mouse-Devices/

                    @markwkidd - I know you had already pointed me in the direction of some of the stuff above, so thanks.

                    markwkiddM 1 Reply Last reply Reply Quote 1
                    • markwkiddM
                      markwkidd @tuki_cat
                      last edited by markwkidd

                      @tuki_cat very glad it's working! Setting up varying types input devices is not a trivial thing. Thanks for reporting what worked for you.

                      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.