Aimtrak gun loses alignment when I aim off the screen. <tag> Aimtrak <Tag>
-
Hello, I'm currently working on programming my shooting game setup in my office. I'm able to calibrate the lightgun in the Gunconf program and am even able to play a game with it. My problem is when I aim off the screen it will act as if the gun is trying to follow the cross hairs past the screen. (For instance if I start shooting and kill the bad guys, I then move off the screen to the right by one inch and shoot to reload. As soon as I aim back in the middle my cross hairs are too far to the right by 1 inch (or however far I aimed off the screen to reload) I've had the same problem with three games that I've tried. Also, I'm currently playing on a 32 inch LG tv at a 16:9 aspect ratio.
Has anyone ran into a similar problem, were you able to find a way to fix it?
Any help would be appreciated, thanks!
Raspberry Pi 3 Model B V 1.2
GPIO Input 5v Power Input
Retropie Version 4.4
Retropie Image from Retropie website
USB devices, 1 keyboard, 1 Aimtrak Lightgun, 1 Aimtrak Sensor bar
AdvMame 3?
Controller is keyboard
I'm using an externally powered USB Hub -
@dureq83
I found this setting for mame#CORE INPUT OPTIONS
joystick 1
lightgun 1
offscreen_reload 1#advmame.rc~ device_mouse raw device_raw_mousedev[0] /dev/input/mouse0 device_raw_mousetype[0] ps2
Try setting a framebuffer using runcommand.
Maybe the the gunconf.py~ when started was still in a calibration loop and needed to be exited before starting the game. How does the driver initialize, do you use autostart.sh~?
And, can you link me to the gunconf driver? -
Efrllm, thank you very much for taking the time to respond. I just got off work and am going to unwind before I start crunching code. I'll take a look at my pi setup a bit later tonight and link what I have. Thanks again for responding rather than just looking and leaving.
-
@dureq83
Don't want to leave anyone behind just because I've never used a guncon. I learn new stuff all the time trying to help. I wonder if I can do anything with my PS3 motion control and camera, or the Wii bar I got lying around. -
Efrllm, I have my Raspberry PI loaded up and am currently connected via Putty/FileZilla. I'm still trying to locate the file for which I can locate the #Core input options. After some google searches I've been told that I'm looking for Mame.ini though I'm still unable to locate said file.
-
I just installed advmame to get some stuff going
/opt/retropie/configs/mame-advmame/advmame.rc
#these are some options default settings I'm going to highlight I dont know what they do # yet device_fb_fastset no # possibly yes device_mouse auto # raw device_raw_mousedev[0] auto # /dev/input/mouse0 device_raw_mousetype[0] pnp # ps2
/opt/retropie/configs/mame-mame4all/mame.cfg
# nothing looks relevant in this cfg list of [directory] inputs for [frontend]
-
Alright I got mame working.
it looks like these are the configs for different mame emulators.lr-mame2010 (libretro mame2010)
/home/$USER/RetroPie/roms/arcade/mame2010/ini/mame.ini
I think this is the one with the Core input options. It may also be in the mame2003 folder.mame4all
/opt/retropie/configs/mame-mame4all/mame.cfgadvmame
/opt/retropie/configs/mame-advmame/advmame.rc -
That would make sense, I've located both Mame.cfg for Mame4all and advmame.rc for Advmame. Aimtrak works best (or only works, not sure) with Advmame if I'm correct. I think I'll take a break for the night because my patience has warn thin for the evening. (I have about a two hour limit per day of head aches with configs before I stop for the night.) I'll have to take a look tomorrow when my brain isn't mush from work. I'll record a video, place it on youtube, and provide the link tomorrow to the issue I'm having.
I did find something though, I was trying to use Lethal Enforcers 2 as a test for the offscreen reload, after further reading I'm learning that with the advance in MAME Emulators that Lethal Enforcers 2 has an issue and can't reload in the current game/mame state.
I'll have to install another game that uses offscreen reloads and troubleshoot from there.
Have a good night, thanks again for your input.
-
@dureq83
No problem, mame is a jungle of configs. Have a good night. -
I've included a link to a video I created today. I'm hoping this will be more clear as to what my problem is.
P.S. The offscreen reload seems to be working fine, as stated earlier, I found out that it's actually the Lethal Enforcers II rom that was the issue. -
@dureq83
Were you able to set a framebuffer?
There are some keyboard controls for Advmame, it doesn't look like the options here will be helpfulF2 for the ROM menu
1 & 2 for player 1 & 2 start
I had to use a combination of controller and keyboard to navigate.TAB for the Advmame menu
there are only a few video settings.Have you tried any other emulators. lr-mame2010 or even FBA.
There are a lot of incompatibilities with romsets and emulator versions. Advmame may very well be the only one that is compatible with that romset, one would need a different romset for the other versions.
The versions are only slightly confusing as they increment integer decimals and they may cover a range of romsets.Advmame 0.94 MAME 0.94 Advmame 1.4 MAME 0.106 Advmame [3.9] MAME 0.106 - ??? MAME4ALL MAME 0.37b5 - ??? lr-mame2000 MAME 0.37b5 lr-mame2003 MAME 0.78 lr-mame2010 MAME 0.139 (under experimental packages) [build failure - ran out of memory] lr-mame2003plus MAME 0.78 - MAME 0.188 lr-mame2015 MAME 0.160 lr-mame2016 MAME 0.174 lr-mame MAME 0.208
And what is the driver that you are using?
-
I think I'll mess with the video settings a bit later after I finish my game stream for the evening. Maybe I need to make sure that the rom's video resolution is matched with the televisions resolution (which I thought they already were). I'll also check the mame versions and post them. Also, when you ask was driver I'm using, are you referring to which Aimtrak gun driver?
-
@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 buttonOpening 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. -
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) -
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.
-
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.
-
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 -
@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. -
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? -
@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?
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.