Aimtrak gun loses alignment when I aim off the screen. <tag> Aimtrak <Tag>
-
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] ps2If 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.
-
Thanks for the information, I'm on my way to work and will try this when I return home.
-
I just got off work and am going to fiddle with the settings you suggested, I'll report my findings shortly.
-
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] pnpto
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. -
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. -
@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? -
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 -
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. -
@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.
-
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
-
@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.
-
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.
-
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.
-
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.
-
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.
-
@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? -
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.
-
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?
-
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.
-
That makes sense, I just unbound all the player two inputs and no-longer have the 2nd crosshair trying to follow the 1st.
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.