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 loses alignment when I aim off the screen. <tag> Aimtrak <Tag>

    Scheduled Pinned Locked Moved Help and Support
    aimtrak
    91 Posts 8 Posters 13.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.
    • EfriimE
      Efriim @dureq83
      last edited by Efriim

      @dureq83
      Yes which aimtrak driver? Knowing the source I may be able to investigate and find an answer for you.

      Your're right the video settings should match by default. In advanced mame menu (F2_key) there is basically only the resolution scaler in menu, but odds and ends like [Resize] [Vsync] and [SMP]? are worth a shot (Defaults: Resize=integer Vsync=no SMP=yes)(SMP stands for Symmetric Multi-processing so probably no resolution here).
      I didn't look into the input options, maybe there is a double-mapped button

      Opening the runcommand there is a setting for the linux framebuffer, it is only a wild guess that this is a solution to the problem. Anyways its worth a try, it is an easy configuration to add and remove, try a small framebuffer.

      Once none of that works and the advmame.rc with different options doesn't work either.
      Unless there was a configuration that was missed, I guess it is time to either explore the aimtrak driver or try a different emulator/romset.

      1 Reply Last reply Reply Quote 0
      • D
        dureq83
        last edited by

        I'm going to try to remember everything that I tested tonight. ::SPOILER:: I still had the same issue each time.
        Firstly, I checked the model number of the tv and found that it's resolution is 1.366 x 768 HD 720p, and I'm currently running in a 16:9 aspect ratio.
        I tried to run Aliens 3, and Lethal Enforcers 2 using Advmame 3.9 (which was default), 1.4, and 0.94. Each of the three emulators showed the same issue where if I went off the screen and came back that the crosshairs were off their original configuration.
        I manually went into the Raspberry pi config and set the native resolution of the pi to 1,366x 768 (Same as the tv) and tried each of the three emulators, still no change.
        I opened the Run Command and first changed the default video mode for Advmame, I tried numerous video modes with no change.
        I then opened the Run Command again and changed the default framebuffer for Advmame, I tried numerous framebuffer modes with no change.
        I tried to change the Vsync and SMP modes with no change.
        In the game options of each game I changed the resolution/magnification from 1,2,3,4x each time having no change in the
        My Firmware version for the Aimtrak guns is the latest (9.19)

        1 Reply Last reply Reply Quote 0
        • EfriimE
          Efriim
          last edited by Efriim

          Oh well, I should have researched more before proposing so many ideas.
          Leaves to remain these changes for advanced mame
          /opt/retropie/configs/mame-advmame/advmame.rc

          device_fb_fastset yes #  description from advmame doc: "Don't set the video mode if it's expected to be idential at the current one. This can be used to avoid a screen refresh when not required."
          device_mouse raw
          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
          
          #defaults
          device_fb_fastset no
          device_mouse auto
          device_raw_mousedev[0] auto
          device_raw_mousetype[0] pnp
          

          if you haven't already.

          It is likely these problems will not persist in lr-mame, but if they did then it would tell us that it is device interface/driver problem since all the screen/resolutions have been tried.

          1 Reply Last reply Reply Quote 0
          • D
            dureq83
            last edited by dureq83

            Just an update, I moved the rom from the Advmame folder to Arcade and ran it with LR-Mame2010 emulator, still having the same issue. So we know that using two different emulators that the problem is persisting.

            1 Reply Last reply Reply Quote 0
            • D
              dureq83
              last edited by

              This is what my advmame.rc looks like (doesn't look like yours)

              device_mouse auto
              device_raw_firstkeyhack no
              device_raw_mousedev[0] auto
              device_raw_mousedev[1] auto
              device_raw_mousedev[2] auto
              device_raw_mousedev[3] auto
              device_raw_mousetype[0] pnp
              device_raw_mousetype[1] pnp
              device_raw_mousetype[2] pnp
              device_raw_mousetype[3] pnp

              EfriimE 1 Reply Last reply Reply Quote 0
              • EfriimE
                Efriim @dureq83
                last edited by

                @dureq83
                Well at least it works and it is probably right, I'm probably wrong I think I scanned it here
                https://github.com/RetroPie/RetroPie-Setup/wiki/Spinners,-Trackballs,-Lightguns,-and-other-Mouse-Devices#advancemame
                but I read about it searching for aimtrak in two places.
                There is a firmware on the gun device itself? And the windows program allows it to have different configurations maybe these apply. Setting it to Mouse mode only.

                1 Reply Last reply Reply Quote 0
                • D
                  dureq83
                  last edited by

                  The firmware on Aimtrak guns are stored in the gun themselves. I updated the firmware while plugged into my windows machine. I currently have the aimtrak gun configured as a mouse.
                  This is what I don't get. I run gunconf on my raspberry pi and am able to calibrate it correctly. (while in the calibration screen, the crosshairs don't become misaligned after moving off the screen.) ((So we know that the sensor bar is reading the gun correctly)) I then load a game using two different emulators (not just different versions of the same emulator) and both emulators have the same problem (which tells us that it's not an emulator problem, or at least I don't think so.) So if it's not an emulator issue then where, Dear Watson, does the problem lie?

                  EfriimE 1 Reply Last reply Reply Quote 0
                  • EfriimE
                    Efriim @dureq83
                    last edited by Efriim

                    @dureq83
                    Quick question. When the aimtrak is pointed way off screen and the trigger is pulled; does the alignment over-compensate proportionately, only parabolic? Or rationally with condensed values?

                    D 1 Reply Last reply Reply Quote 0
                    • D
                      dureq83 @Efriim
                      last edited by

                      @Efriim I'm sorry, I dont understand the question.

                      EfriimE 1 Reply Last reply Reply Quote 0
                      • EfriimE
                        Efriim @dureq83
                        last edited by

                        @dureq83
                        When reloading and the alignment gets adjusted, is this adjustment equal to the distance off screen reloaded? If you were to shoot the lowerleft without going offscreen will it make any adjustment? And if you were to shoot the lower left off of the screen is the adjustment diagonal or will it show only x and y adjustments? Finally if reloading several times off screen does the misalignment compound itself limitlessly?

                        1 Reply Last reply Reply Quote 0
                        • D
                          dureq83
                          last edited by

                          Whether or not I go to reload the gun, when I aim off the screen it loses the alignment.

                          EfriimE 1 Reply Last reply Reply Quote 0
                          • EfriimE
                            Efriim @dureq83
                            last edited by Efriim

                            @dureq83
                            Could you try?
                            lr-mame2010
                            /home/pi/RetroPie/roms/arcade/mame2010/ini/mame.ini
                            line 80/115

                            offscreen_reload          1
                            

                            I could not find this setting for advmame.

                            1 Reply Last reply Reply Quote 0
                            • D
                              dureq83
                              last edited by

                              I changed the Offscreen_reload from 0 to 1 in LR_Mame2010, and ran Aliens.zip and still am having the same issue with the calibration being off when I aim off the screen. I tried to launch Lethal Enforcers 2 with Mame-2010 and it won't run, probably because of the rom family which is for Advmame.

                              EfriimE 2 Replies Last reply Reply Quote 0
                              • EfriimE
                                Efriim @dureq83
                                last edited by

                                @dureq83
                                Like a mouse it is trapped on the screen. Then it needs some sort of off-screen scroll. Or perhaps a way to disable the some of the mouse cursor functions yet not make inoperable the tracking.

                                1 Reply Last reply Reply Quote 0
                                • EfriimE
                                  Efriim @dureq83
                                  last edited by

                                  @dureq83
                                  While I thought the above configurations for advmame.rc were to enable the device functions maybe they are used to make separate the mouse events of the aimtrak. Can you confirm this function.
                                  advmame.rc post #16

                                  1 Reply Last reply Reply Quote 0
                                  • D
                                    dureq83
                                    last edited by

                                    I'll have to check this later when I'm in front of my game. Has no one else on this forum (300 views) ever had this problem? It would be great to have additional details or ideas from others.

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

                                      I don't have an Aimtrak, so I don't know how it can be configured, but I suppose that - like other lightguns - it emulates a mouse in Linux.
                                      The only idea that pops to mind for the behaviour you're seeing is that the emulator is reading the mouse movements as relative coordinates and once it's off screen it looses the correct position. I know that some Libretro cores have an option to use 'absolute pointer' (for instance mame2003-plus), but I don't know if Advmame has this kind of option - or maybe it's not only up to the emulator, but there's something that can be configured for the gun itself.

                                      D 1 Reply Last reply Reply Quote 0
                                      • D
                                        dureq83 @mitu
                                        last edited by

                                        @mitu thank you for the reply, I will explore this when I'm more awake.

                                        1 Reply Last reply Reply Quote 0
                                        • D
                                          dureq83
                                          last edited by

                                          I'm currently installing Mame 2003 Plus from source and am going to mess around with the settings for the emulator.
                                          I did have a question that might help troubleshoot the issue. I'm seeing the same issue in multiple emulators, is it possible that there might be a setting in Retroarch that is causing the issue seeing as how Retroarch is what handles the emulators? Or am I way off?

                                          EfriimE 1 Reply Last reply Reply Quote 0
                                          • EfriimE
                                            Efriim @dureq83
                                            last edited by

                                            @dureq83
                                            Nah retroarch only handles lr-emulators.

                                            mame2003plus had a build failure for me, I think it ran out of virtual memory somehow. I don;t know what to do about.

                                            The advmame.rc settings above are still worth trying. From what I read in aimtrak posts they worked but most of it was pretty bleak.

                                            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.