Light Gun

Hello everyone,

is it possible to use a light gun, or a mouse, in retroarch? I bought a light gun from http://www.arcadeguns.com/ and was wondering if it might work with retroarch as well. I am using Arch Linux, the gun works fine, it is just like a mouse in my setup, but I don’t know how I can set up the light gun in retroarch.cfg

Any advice?

regards!

It depends on the core, but it’s generally either a core option or you can set it up via the input settings. The mouse usually handles it, but in this case, I guess the light gun acts like the mouse, which then acts like the light gun :stuck_out_tongue:

I believe the zapper or whatever is generally enabled on the second controller port, which isn’t obvious. So, for SNES, you would set it to Player #2, device type superscope.

Where? Input device type seems to only have retro pad or retro keyboard for device options. It doesn’t say Superscope anywhere?

Here’s how it should look:

Still no, there is no supercope option. I noticed you are on 1.00.2.

I’ve been using builds from the buildbot, 1.0.0.3. Is this only implemented in older versions of retroarch? That wouldn’t make any sense.

It is there in 1.0.0.3

Neither works on my Arch Linux 64 bit. I have an AimTrak von Ultimarc, I tried the following values for “input_libretro_device_p2” in retroarch.cfg with the fba/nestopia/picodrive/snes9x-next cores:

2: Mouse
4: Generic Lightgun
6: Retro device pointer

furthermore for the snes9x-next I tried

260: SuperScope (??)
516: Justifier (??)

All used cores report those listed device types as either invalid or unknown, however with the SuperScope on the snes9x-next the buttons on my lightgun seem to work, but I can’t move the cursor.

I cannot set the listed input devices with rgui either, it only gives me “Retropad” and “Retropad/analog”

I am using the retroarch-git package from AUR [1], maybe a compile flag is missing? I am using “udev” as my input and joypad driver, and I am not sure what the option “input_device_pX” means, since no matter what I choose, it always sets it back to “0”. And I am using the “gl” driver for video, as I understand it, if I’d use the SDL driver, input handling would be different?!

Any ideas?

Thank you very much for your time, and kind regards, ufopaper

If the light gun is acting like a mouse, try to get the superscope/justifer/whatever working with your regular mouse first. It’s working here, so if you can’t get it going there, something must be up. There’s no compile flag or anything for it; it should work even with a minimal compile.

For trying SDL, you’d need to switch your input driver over to it. Your display driver shouldn’t matter.

Outside of retroarch it’s working fine, I can move the cursor and “shoot” (click) on things.

Are you on Arch Linux 64 bit as well? Did you use the AUR git packages? The thing is, that every core I tried doesn’t even recognize a mouse/lightgun/whatever device, it’s always “invalid device”. Why is it an invalid device? And why can I only choose “Retropad” and “Retropad w/ Analog” in rgui, and nothing else? (Marcello seems to have a similar/same problem) Evidently there is something up.

I tried all input drivers I have: sdl2/x/udev/linuxraw, and it’s always the same: “invalid device” (the gamepads work fine though, with all but linuxraw)

I am on X, so maybe I need to change something in my config for X? Right now, I don’t have a config file at all.

Make sure you load the core and a game before trying to set it up. Things have indeed changed a bit since I took my screenshots, but I just verified that it works on Win64 using a nightly and I’ll verify it on my Lin64 installation this evening.

EDIT: yep, verified working on lin64, as well. Just make sure you have an updated RetroArch and and updated core. If either is too old, it won’t work properly.

Can you tell me please which game you tested it on?

I did the following:

[ol][li]I de-installed the old packages[/:m:jx9n4jlk][/li][li] I removed the retroarch configuration folder[/:m:jx9n4jlk][/li][li] I compiled and installed the git packages from Arch’s AUR[/:m:jx9n4jlk][/li][li] I loaded a game with the snes9x-next core[/:m:jx9n4jlk][/li][li] I started rgui, it tells me “retroarch 1.0.0.3” (git 14897.78053a6) and “SNES9x NEXT 1.52.4” (git 693.e3ac4fd)[/:m:jx9n4jlk][/li][li] I tried to change the device type and I still couldn’t choose anything but “Retropad” and “Retropad w/ Analog”, I can’t even choose “mouse”[/:m:jx9n4jlk][/ol][/li] I am really grateful for your time, I am at a loss, what could that be? I have another computer with Ubuntu installed, I ll try it there.

[EDIT] Ok, so I used ppa:hunter-kaller/ppa and installed retroarch 1.0.0.2 and snes9x-next 1.52.4. I have never had retroarch on this PC before, so I loaded a game with the snes9x-next core, and started rgui after that … and still, I can only choose “Joypad” and “Joypad w/ Analog”.

Not being able to select a certain option is one thing, but if I simply modify retroarch.cfg it still doesn’t work, it throws “invalid device”, which is different to “unknown device” (which then falls back to Retropad), so I guess something must be wrong with my options?!

I pasted my retroarch.cfg here: http://pastebin.com/XYWmB19G If I change “input_libretro_device_p1” to anything else than 0,1,5 it throws “invalid device” the next time I load a game

It’s tricky, for sure, and when it doesn’t work, there’s no real indication why not, so I understand your difficulty.

Using the compiles from AUR, load up RA, then load up snes9x-next, then go load up a game. Once the game is up and running (i.e., wait for the Nintendo logo or whatever to ensure that everything is initialized), if you go back into ‘input settings’ it should have changed ‘retropad’ to ‘snes joypad’ and you’ll be able to change the player 2 (device index #1) from snes joypad to ‘superscope’ or whatever.

Don’t mean to hijack the thread but can a wii mote be used as a lightgun/mouse pointer??

I think so, via glovepie (and possibly others). Once it’s functioning as a mouse, it should work with RA via the process described above.

EDIT: looks like cwiid will do it in linux.

On a light gun related note, is it possible to play any of the two player light gun games using two pointing devices? Normally if you have two mice attached to a system for example they both control the same pointer.

1 Like

Thanks again for your response, while I didn’t manage to get it working in snes9x-next, it was pretty easy with the mame core (way better than with an actual mame emulator like sdlmame), I just enabled the mouse, and it worked right out of the box :slight_smile: It would be cool if it worked in picodrive core, so I can play Snatcher with a lightgun, but I am happy now.

Thank you for all your help, I’ll keep trying.