Main > Lightguns

New Lightgun forum

<< < (2/3) > >>

lightgungamer:
This is awesome. There is loads of movement right now in this space and I really think we are going to see a revival of the light gun genre this year.

There are 2 projects that I am aware of that could give us accurate light guns on all tvs finally -the sinden light gun project and PDP's Mars light gun. I can't wait for them to be released so we can play all the old games on huge tvs and then start on the new ones!

Zebra:
Finally! Thank you!

I love light gun games and they certainly make up enough of the popular arcade games to deserve their own sub-forum.

saint:
:)

thegweet:
My question is has anyone been able to get the Aimtrak lightgun to work on a raspberry Pi 4 yet? I have the roms I put them into mame libreto 2003. The roms work but the gun just wont configure. But if I use the add on tool for the Legends arcade I can get it to work for duck hunt. I would like to see the Ultimarc configuration work on the pi4. When I run it it said the gun is there and to pull the trigger to configure. When you pull the trigger nothing happens. Very frustrating. Anyone know how to configure the gun on the Pi4 or any setting changes in the cfg files?

MacGyver:

--- Quote from: thegweet on May 10, 2020, 09:53:45 pm ---My question is has anyone been able to get the Aimtrak lightgun to work on a raspberry Pi 4 yet? I have the roms I put them into mame libreto 2003. The roms work but the gun just wont configure. But if I use the add on tool for the Legends arcade I can get it to work for duck hunt. I would like to see the Ultimarc configuration work on the pi4. When I run it it said the gun is there and to pull the trigger to configure. When you pull the trigger nothing happens. Very frustrating. Anyone know how to configure the gun on the Pi4 or any setting changes in the cfg files?

--- End quote ---

I tried it last week and can confirm that lightguns on the newest RPI 4 don't configure correctly.
It seems like Retroarch and the various emulators are still working to implement changes that were made a bit ago. (see attached picture)

I have managed to manually make NES, SNES and Genesis work, here are the steps:

SSH into your pi with Putty or some other terminal program.

Open up the NES emulators.cfg and add "--verbose " to the run line for the lr-fceumm emulator, and make sure to set the default to "lr-fceumm" so that it looks like below.

$ nano /opt/retropie/configs/nes/emulators.cfg

--- Code: ---lr-fceumm = "/opt/retropie/emulators/retroarch/bin/retroarch -L /opt/retropie/libretrocores/lr-fceumm/fceumm_libretro.so --verbose --config /opt/retropie/configs/nes/retroarch.cfg %ROM%"
default = "lr-fceumm"

--- End code ---

*use Crtl+o to write the changes, and then Crtl+x to close Nano.

Now you add the needed retroarch core settings with:

$ nano /opt/retropie/configs/all/retroarch-core-options.cfg

--- Code: ---fceumm_show_crosshair = "enabled"
fceumm_zapper_mode = "lightgun"
snes9x_show_lightgun_settings = "enabled"
snes9x_lightgun_mode = "Lightgun"
genesis_plus_gx_gun_cursor = "enabled"
genesis_plus_gx_gun_input = "lightgun"

--- End code ---
Save and exit.

Now run a NES game, like Duck Hunt, and when it opens, hit escape on your keyboard and return back to EmulationStation.

You SSH back into our Pi.
Now look at the verbose log from when you ran the NES game and filter it for the relevant information.

$ cat /dev/shm/runcommand.log | grep "Mouse" | grep "/dev/input/event"

It will output like this. (if it doesn't, you screwed up the adding of the --verbose portion above). You may have less results then me.

--- Code: ---[INFO] [udev]: Mouse #0 (/dev/input/event2).
[INFO] [udev]: Mouse #2 (/dev/input/event6).
[INFO] [udev]: Mouse #3 (/dev/input/event9).
[INFO] [udev]: Mouse #5 (/dev/input/event10).
[INFO] [udev]: Mouse #7 (/dev/input/event11).
[INFO] [udev]: Mouse #8 (/dev/input/event14).
[INFO] [udev]: Mouse #9 (/dev/input/event17).
[INFO] [udev]: Mouse #11 (/dev/input/event18).
[INFO] [udev]: Mouse #12 (/dev/input/event20).
[INFO] [udev]: Mouse #15 (/dev/input/event21).
[INFO] [udev]: Mouse #16 (/dev/input/event23).
[INFO] [udev]: Mouse #19 (/dev/input/event0).

--- End code ---
Now you need to find which one of these is your Aimtrak gun #1, so you run:

$ udevadm info /dev/input/event* | egrep  -w 'N: input.event.*|E: ID_MODEL=ATRAK_Device.|E: ID_USB_INTERFACE_NUM=02'

It will output something like this and most likely smaller.

--- Code: ---N: input/event0
E: ID_USB_INTERFACE_NUM=02
N: input/event1
N: input/event10
N: input/event11
N: input/event12
N: input/event13
N: input/event14
N: input/event15
N: input/event16
E: ID_USB_INTERFACE_NUM=02
N: input/event17
N: input/event18
E: ID_MODEL=ATRAK_Device_#1
N: input/event19
E: ID_MODEL=ATRAK_Device_#1
N: input/event2
N: input/event20                     <----------what you are looking for----------
E: ID_MODEL=ATRAK_Device_#1          <----------what you are looking for----------
E: ID_USB_INTERFACE_NUM=02           <----------what you are looking for----------
N: input/event21
E: ID_MODEL=ATRAK_Device_#2
N: input/event22
E: ID_MODEL=ATRAK_Device_#2
N: input/event23
E: ID_MODEL=ATRAK_Device_#2
E: ID_USB_INTERFACE_NUM=02
N: input/event3
E: ID_USB_INTERFACE_NUM=02
N: input/event4
N: input/event5
E: ID_USB_INTERFACE_NUM=02
N: input/event6
E: ID_USB_INTERFACE_NUM=02
N: input/event7
E: ID_USB_INTERFACE_NUM=02
N: input/event8
N: input/event9

--- End code ---

You are looking for where these two line are together:


--- Code: ---E: ID_MODEL=ATRAK_Device_#1
E: ID_USB_INTERFACE_NUM=02

--- End code ---

and you use the line above them "N: input/event20" to figure out what Retroarch thinks your lightgun is. So in this example it will be event 20 (yours will be something else), you compare that to output you got from your emulator (Mouse #12 (/dev/input/event20).)

--- Code: ---N: input/event20
E: ID_MODEL=ATRAK_Device_#1
E: ID_USB_INTERFACE_NUM=02

--- End code ---

Now take your fake Mouse # you found your Aimtrak #1 on using the udevadm command and use it when you modify the NES's Retroarch config file below to set the "mouse_index". From the above: "[INFO] [udev]: Mouse #12 (/dev/input/event20))."
You also are setting the first device to 99 so that it doesn't conflict with anything else.

$ nano /opt/retropie/configs/nes/retroarch.cfg

--- Code: ---input_driver = "udev"
input_libretro_device_p2 = "258"
input_max_users = "2"
input_player1_mouse_index = "99"
input_player2_mouse_index = "12"
input_player2_gun_trigger_mbtn = "1"
input_player2_gun_offscreen_shot_mbtn = "2"

--- End code ---

Add the above to the existing file.
Now you can launch your NES game again, and it should work, any other controls will need to be configured as needed, this only makes the Aimtrak work.

To do SNES you use:

$ nano /opt/retropie/configs/snes/retroarch.cfg

--- Code: ---input_driver = "udev"
input_libretro_device_p2 = "516"
input_max_users = "3"
input_player1_mouse_index = "99"
input_player2_mouse_index = "12"
input_player2_gun_trigger_mbtn = "1"
input_player2_gun_offscreen_shot_mbtn = "2"

--- End code ---

And for Genesis/Megadrive you use:

$ nano /opt/retropie/configs/megadrive/retroarch.cfg

--- Code: ---input_driver = "udev"
input_libretro_device_p2 = "772"
input_max_users = "2"
input_player1_mouse_index = "99"
input_player2_mouse_index = "12"
input_player2_gun_trigger_mbtn = "1"
input_player2_gun_offscreen_shot_mbtn = "2"

--- End code ---

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version