• Recent
  • Tags
  • Popular
  • Home
  • Docs
  • Register
  • Login
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.
  • M
    mitu Global Moderator
    last edited by 11 Apr 2019, 03:45

    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 11 Apr 2019, 10:19 Reply Quote 0
    • D
      dureq83 @mitu
      last edited by 11 Apr 2019, 10:19

      @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 11 Apr 2019, 10:39

        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?

        E 1 Reply Last reply 11 Apr 2019, 10:42 Reply Quote 0
        • E
          Efriim @dureq83
          last edited by 11 Apr 2019, 10:42

          @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
          • D
            dureq83
            last edited by 11 Apr 2019, 10:44

            Understood, Mame2003 is still installing at the moment, so I'll have to wait for it to finish. I did contact Andy with Ultimarc and bounced some ideas off his head.

            E 1 Reply Last reply 11 Apr 2019, 10:44 Reply Quote 0
            • E
              Efriim @dureq83
              last edited by Efriim 4 Nov 2019, 11:47 11 Apr 2019, 10:44

              ping

              1 Reply Last reply Reply Quote 0
              • D
                dureq83
                last edited by dureq83 4 Nov 2019, 11:48 11 Apr 2019, 10:47

                I did a light search last night for pre-programed retro pie images made by others, I didn't want to use one but I did want to check their setup and see if the lightgun was still having the same issue so I could compare settings/files. I didn't find anything hopeful. Also, I really want to get to the bottom of this rather than cop out and look at someone elses work. I really think this issue is going to come down to a simple line of code/text in a settings config

                E 1 Reply Last reply 11 Apr 2019, 10:54 Reply Quote 0
                • E
                  Efriim @dureq83
                  last edited by Efriim 4 Nov 2019, 12:01 11 Apr 2019, 10:54

                  @dureq83
                  Its good for experience, I don't think I've tried any other RetroPie distribution they are unsupported by the way, I imagine they use the same packages.

                  The non retropie:
                  Lakka is cool, it was the first I tried, and I think they are developing well it might be known as the official RetroArch emulation distribution as it only has lr-emulators.
                  Batocera was my second and I liked it a lot, it introduced EmulationStation and emulators outside the retroarch such as Reicast.

                  There is a lot less to do with Lakka and a lot less to configure but it is a solid retro platform. It may be overly difficult to get an aimtrak driver on it so maybe search for that first.

                  Batocera was based on recalbox, it has gone its own way, there is less to do than retropie because there is no raspbian underneath, so it is very streamlined, but I think it will have advmame.

                  1 Reply Last reply Reply Quote 0
                  • E
                    Efriim
                    last edited by Efriim 4 Nov 2019, 13:18 11 Apr 2019, 11:58

                    With your keyboard you know you can exit emulationstation to the CLI by pressing "F4"
                    to return to ES type "exit".

                    to edit this file
                    sudo nano /opt/retropie/configs/mame-advmame/advmame.rc
                    I wrote down the defaults in case we need to revert.

                    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

                    If this configuration doesnt work
                    mouse0 would be exchanged above to the corresponding event# of the mouse control.

                    I wish I knew of a better Mouse event test.
                    ls /dev/input/
                    I think the mice will have a corresponding event, so mouse0 = event0 to some degree.
                    There might be a lot listed here type this and then get your gun
                    evtest /dev/input/event0
                    Ctrl+C is a kill to exit.
                    and try the rest of the events to understand what they are and the number they are assigned.

                    if evtest is not installed
                    sudo apt install evtest

                    joystick can be tested like this
                    jstest /dev/input/js0

                    I know this is sort of redundant, while I don't want to rule it out completely yet.

                    1 Reply Last reply Reply Quote 0
                    • D
                      dureq83
                      last edited by 11 Apr 2019, 13:01

                      Thanks for the information, I'm on my way to work and will try this when I return home.

                      1 Reply Last reply Reply Quote 0
                      • D
                        dureq83
                        last edited by 11 Apr 2019, 18:59

                        I just got off work and am going to fiddle with the settings you suggested, I'll report my findings shortly.

                        1 Reply Last reply Reply Quote 0
                        • D
                          dureq83
                          last edited by 11 Apr 2019, 19:23

                          I changed my block of code from:
                          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

                          to

                          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
                          as a test and still am having the same problem with the drifting crosshair.
                          I ran Evtest/ dev/input/event0 and then tried using my gun and still am having the same issue.

                          1 Reply Last reply Reply Quote 0
                          • D
                            dureq83
                            last edited by 11 Apr 2019, 19:50

                            Update: Not sure if this will help.
                            I changed the action in GunConf from mouse to joystick emulation and am having the same drifting issue when I move off screen, this would tell me that it's not isolated to the mouse it's self.

                            E 1 Reply Last reply 11 Apr 2019, 21:21 Reply Quote 0
                            • E
                              Efriim @dureq83
                              last edited by 11 Apr 2019, 21:21

                              @dureq83
                              I had realized that I could use my USB mouse to test some things. I'm looking for something that allows the cursor to be brought off screen completely. Maybe this isn't the way it loses alignment, maybe I can I find something for relative mouse movements. I'll get started right away.

                              I don't know about the joystick mode.
                              Can you link me to the guncon driver that is installed on the raspberry pi?
                              When the setting were written were there game-specific overrides while testing it?

                              1 Reply Last reply Reply Quote 0
                              • D
                                dureq83
                                last edited by dureq83 4 Nov 2019, 22:51 11 Apr 2019, 21:49

                                I believe when I installed the gunconf that it showed something about auto configuring the mame 1.4.rc file.
                                I'm not sure what version of Gunconf I'm using, but included is a link to where I obtained the file.

                                https://github.com/gunpadawan/gunconf

                                Also, I went into a gunconf settings folder and it showed a readme about setting up gunconf for the pi. It told me to disable the mouse even though the light gun is supposed to mimic a mouse, I followed the instructions and it still didn't work. I ended up reflashing the SD card and re-installing everything. :(

                                Actually, to be exact. This is the link that I followed. (I'm not sure if were allowed to post links, if not, please delete this Mod team.
                                https://www.youtube.com/redirect?event=video_description&v=ZdRLX-Fhkv4&redir_token=T_Z7pLy4rjMmc_6ViL-8UnYrEiR8MTU1NTEwNTYzM0AxNTU1MDE5MjMz&q=http%3A%2F%2Feazyhax.com%2Fpitime%2FRetroPie%2520Toolkit.zip

                                1 Reply Last reply Reply Quote 0
                                • D
                                  dureq83
                                  last edited by 11 Apr 2019, 22:02

                                  Also, I just plugged in my Death Adder mouse and thought I'd try and test something.
                                  There almost seems like some kind of over reach setting in place where the pi thinks it's actually a mouse rather then something mimicking a mouse. What I mean is this, I placed the cursor in the middle and did 10 upwards strokes to the top of the machine and then moved the mouse back to the middle and took a note of where my wrist was initially and then where it was when I returned to the middle. I then did the same thing and over-extended my wrist and push the cursor past the top of the screen and brought it back down. My wrist was much further down then it was to start. either I'm on to something or I'm 100% in the opposite direction and am over-thinking the scenario.

                                  E 1 Reply Last reply 11 Apr 2019, 22:33 Reply Quote 0
                                  • E
                                    Efriim @dureq83
                                    last edited by 11 Apr 2019, 22:33

                                    @dureq83
                                    There's a lot to think about. Hmm, like a bad level sometimes you need to come back after a break.

                                    I think it is okay if you post this, there are other scripts and modules the people write, but they don't contribute to RetroPie directly so it is hard to accept them. This will be most useful in beginning to understand the libraries and scripts involved.

                                    I'm just waking up and setting some guncon games to explore some variables first hand.

                                    1 Reply Last reply Reply Quote 0
                                    • E
                                      Efriim
                                      last edited by Efriim 4 Dec 2019, 01:28 12 Apr 2019, 00:21

                                      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 12 Apr 2019, 01:17 Reply Quote 0
                                      • D
                                        dureq83 @Efriim
                                        last edited by 12 Apr 2019, 01:17

                                        @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 12 Apr 2019, 04:59

                                          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
                                          38 out of 91
                                          • First post
                                            38/91
                                            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.

                                            This community forum collects and processes your personal information.
                                            consent.not_received