Gunconf is an utility to configure Aimtrak guns on linux systems
It is tested on ubuntu desktop and retropie.
Written in python on top of pygame, it does not require an x server.
sudo apt install apt-transport-https python-dev python-pygame python-setuptools
Get the source
git clone https://github.com/gunpadawan/gunconf
Install python module
sudo python setup.py install
Application requires access to the aimtrak usb device. It is usually necessary to configure udev to let your specific user access that device.
To let any user access the device, do:
sudo cp utils/aimtrak.rules /etc/udev/rules.d/99-aimtrak.rules
sudo udevadm control --reload-rules
To launch application, you can execute
For retropie users, you can add the app to the retropie menu by simply copying that file:
sudo cp utils/gunconf.sh /home/pi/RetroPie/retropiemenu/
So far advancemame is the only emulator that has been successfully tested.
download advmame >=3.4 (does not work for sure with prior versions)
set the following:
device_mouse none to disable the support for mouse even if the gun is configured to report as a mouse
device joystick event to ask advmame to use linux event interface
Next you need to configure the gun itself, especially the different axes.
For player 1 you need to find the right value for
Assuming you have configured the gun to use device ID 0x1601, the configuration is:
- d209 is the usb vendorId of the gun (fixed value)
- 1601 is the usb productId
- 2 is the usb device interface (fixed value)
Then configure the trigger.
for more details you can read the advmame doc
From there you should be able to start the emulator and test.
Assuming you own a rom called duckhunt
make sure you have
the crosshair should now move on the screen.
Start calibration with the button you have configured for that purpose in gunconf
In the menu, you can configure a key or button to toggle crosshair display
Since my best shooting games run only on daphne, I have added (initial) aimtrak support to that emulator. It's not that straightforward for now but if you want to give it a try on retropie:
connect to your pi through ssh:
mv daphne.sh daphne.sh.bak
launch Retropie-Setup from the retropie menu and install daphne emulator from source
then you need to add a game in
To be recognized by emulation station, your game needs to be in a directory ending with ".daphne"
at start, daphne.sh will read the content of a file in that directory named <game>.commands.
As an example, let's assume we have a game called Last_Bounty_Hunter:
1/ Add your game files in the
2/ Edit the file named
and add parameters like this:
singe vldp -framefile ./frame-lbh-cdrom.txt -script ./cdrom-lbh.singe
refer to daphne doc for further information on parameters
- does not support firmware update (you need a windows host for that...)