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.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.
    • EfriimE
      Efriim
      last edited by Efriim

      I think this section is of import.
      As I was just concluding that the relative values of the mouse and the absolute values of the light gun should be as seperated.

      https://github.com/gunpadawan/gunconf#configuration
      ~/.advance/advmame.rc (this folder is linked directly to the one in /opt/retropie/configs/...)

      device_mouse none
      device_joystick event
      input_map[p1_lightgunx] joystick[d209_1601_2,0,0]
      input_map[p1_lightguny] joystick[d209_1601_2,0,1]
      

      [d209_1601_ is the device Id and it should not need to changed.
      _2,0,1] the first number(2) might need to be changed to the usb device interface number since you are using a powered usb hub.

      I'll update if I find a way to read the usb interfaces, ID & and numbers

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

        @Efriim those are the settings I was messing around with earlier. The readme in the gunconf folder mentioned editing those lines but have mouse_none. I'll play with it again in the morning.

        1 Reply Last reply Reply Quote 0
        • G
          grant2258 Banned
          last edited by

          mame2010 2003 and + only has a mouse/pointer added no guns unless they do decide to add them. You are better off using advanced mame to get this working.

          I think this is something thats lacking all all ra mame cores i would need to look at current to see if it maps them at all. It could be done no doubting that but as i dont have the devices i cant test or fix.

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

            I have a similar issue using the Wiimote with the Dolphin Bar. Works really well until I go off screen... then it's slightly off center until I move around enough to get it back. I have an aimtrak but haven't tried it with retropie yet.

            RetroPie v4.2 • RPi3 Model B • 5.1V 2.5A PSU • 8GB SanDisk class 10 microSD • 16GB External USB Thumb Drive
            Roms, images and configs stored in USB and symlinked from normal microsd location
            Xarcade Keyboard encoder + Zero Delay Joystick encoder

            1 Reply Last reply Reply Quote 0
            • G
              grant2258 Banned
              last edited by

              Well not having this device it looks to me like you can use it as a controller (axis) or mouse device (this is goodif it is) this would be trivial to add to mame2010 in retroarch if that is the case. Looking into it a little more The Dolphin bar has the same modes supported as well so that all good.

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

                Just an update, I installed the pixel desktop and reverted back to the original advmame.rc files. (I know that advmame.rc doesn't effect the pixel desktop but I wanted everything as default for my test.) and the lightgun never lost calibration, (or didn't drift as I've been calling it.) So the gun works correctly in the pixel desktop. I don't know if this will help or mean anything but it seems like it would help troubleshoot the issue or narrow it down.

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

                  @dureq83
                  That is a good test and it is a good sign. I'm fairly certain now that advmame.rc will have the solution. Have you got any results by using the configuration earlier, the one from the gunconf website?

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

                    I changed device_mouse none, device_joystick_event and changed the two lines for lightgunx and lightguny. I then loaded up the game using advancmame and bound the up, down, left, and right keys with the light gun.

                    With these current settings the crosshairs dont start moving until I've moved the light gun quite a distance. Its not like a lag but rather as if the emulator/rom doesnt acknowledge the movement until you've moved by a few inches.

                    Also, I unplugged the lightgun from the powered USB hub and plugged it into the #1 USB port on the pi. I kept the keyboard and sensor bar attached to the USB hub. (The sensor eye is the reason for the powered USB hub due to its energy drain, or that it needs more power then then pi's USB ports supply.)

                    I do agree that the issue is probably just a line of code in a conf/.rc file. I will mess with the advancmame.rc file here in a few minutes before I head to work.

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

                      There is something that has been concerning me this whole time. When you load up the screen there is a cross hair in the shape of + and then there is also a x rotated crosshair type thing. They both move with the light gun pointer but the cross hair is accurate (until I aim off screen of course) but the X crosshair thing, lags behind. Does anyone know what the X is for?

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

                        The X is for the second player in light gun games that support a second player.

                        Also, I have the same issue as you where the aimtrak is being used for both players, rather than just player one.

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

                          That makes sense, I just unbound all the player two inputs and no-longer have the 2nd crosshair trying to follow the 1st.

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

                            Also, I've found that even if I mess with the Device_Mouse raw, event, lightgun, auto... etc every time I go to bind the gun's movement in the game's settings, it always shows as a joystick input not mouse. Just food for thought?

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

                              @dureq83

                              Hi dureq,

                              Which file did you edit to unbind player 2 inputs?

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

                                @tuki_cat I loaded the game, hit TAB, and go to controls, I then went to player 2 and cleared the inputs for player2.

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

                                  @tuki_cat
                                  ~/.advance/advmame.rc
                                  input_map{p2}
                                  most of them are set to auto.

                                  the in-game config works too just hit the "TAB" key on a keyboard. I think it is press "Delete" key to clear entry.

                                  @dureq83
                                  using this
                                  /opt/retropie/emulators/advmame/bin/advm
                                  do you notice any absolute values, or is it always 0 and + - 1-9 and nothing like -255 in the far corner?

                                  I'm thinking.

                                  I need some sleep.

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

                                    I opened the file you suggested which is mostly in anscii characters and not readable, there were a few spots here in there with words but nothing relating to what you mentioned. It's Friday and I'll be off for the weekend, would you be interested in joining me in a Discord call and maybe bouncing some ideas back and forth?

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

                                      Also, I have an idea that I want to try in a minute. I'm not sure if this will help or not but it's worth a try. The lightgun is supposed to represent a mouse. What if I plug in a mouse, start the game, and then bind up, down, left, and right to the lightgun X + , X -, Y +, Y -. I'll then save the settings, turn off the pi and replace the mouse with the lightgun. The lightgun works as a mouse in the Pixel Desktop so I know it counts as a mouse. When I try to bind the lightgun in the game it shows as a joystick. Maybe if I purposely bind the X and Y axis with a real mouse and then connect the lightgun after that maybe the game will read the X and Y axis as it should?

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

                                        @Efriim I just tried to test my mouse in the game. I found this interesting and might actually be of a lot of help? When I hit tab and try to bring up the controls, I move my mouse up, down, left, and right but it doesn't detect it as movement so I can't bind the keys this way. Interesting twist though, I'm playing the game with the mouse and it goes up, down, left, and right without being bound. I decided to go into the controls for player 1 up, down, left, and right, and then unbind each. In addition I unbound player 1's lightgun Y -, Y +, X -, and X +, and yet the mouse still controls the cross hairs.

                                        1 Reply Last reply Reply Quote 0
                                        • quicksilverQ
                                          quicksilver
                                          last edited by quicksilver

                                          @dureq83 Just out of curiosity, when you calibrated your aimtrak, what option did you select for Tilt/Z correction? And what options did you select for enable buttons for off screen calibration?

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

                                            @quicksilver For the Tilt/Z corrections I have it set to None, I believe I tried all three early on but will check each again. My off screen calibration is set for my right side button which I don't use in the games I've tested.

                                            quicksilverQ 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.