Touchscreen input?

Heya guys,

Firstly - not sure this is a “linux” thing, but I’m using Linux so I have put it here in case. So I’ve looked over the internet + retroarch/libretro webpages and the limits of my findings are: *) Not much at all about touchscreens, although the occasional “doesn’t like absolute values” is given and “mouse” appears once or twice. *) Android is mentioned a few times - but I’m not using retroarch on Android. *) Some things just don’t get responded to

I wish to use my touchscreen as a lightgun input. Seems fairly straight forward, a lot of laptops + some PC screens come with touchscreen nowadays, seems logical to use instead of a controller for lightgun purposes… After all, it’s just “another mouse” (sort of) device.

But my questions are:

  1. Is this possible (I don’t want an overlay… I want a ‘press fire button when touching the screen + move pointer to X + Y relative to screen’ functionality)
  2. How do I get my retroarch to pick up the touchscreen / trackpad / mouse? None of the drivers seem to show any differences, and the “mouse index” is always “N/A” on all ports.
  3. Not knowing much about the old light-guns, did they used to do the timing calculations internally and somehow feed that through the cable to the games - or did the games somehow do the calculations on the games consoles (or possibly both depending on the hardware?)?

– old486whizz

1 Like

Touchscreens can work but they don’t always. My nephew used to use a wacom tablet on DS games with RetroArch in Linux, so that much is possible, at least. In the core options, there’s a pointer setting where you can choose touchscreen as an input method. It’s more common on mobile, obviously, but it still works.

Basically, if there’s a game that uses a light gun, try it out and it may work.

Re: how light guns work, there’s a ton of variety, actually. Zappers are just a photodiode that works with the screen-flash and a square around the sprites to determine what got hit/missed. But some light guns, like the super scope 6 and guncon 2 use really complex tricks involving sync with the console’s PPU or the composite video signal, respectively, to have pixel-exact locations. It’s a cool topic, but a bit of a rabbit-hole.

1 Like

Thanks for the response Hunterk.

So you’re saying that the touchscreen inputs will be entirely in the core I’m using, and not in the input/controller “drivers” section, or the input/port[1-5] of the main retroarch section?

… I would have thought I’d need to link an input device through to the core, but happy to go exploring through various cores and games to give it a test.

My main experience with lightguns were from the arcades / PSX… Not zappers, deffo the sync with the CRT refresh rate.

– old486whizz

Well, as long as your touchscreen is functioning as a mouse in the RetroArch menus, the rest is up to the core. If it’s not working in the menu and doesn’t show up in the mouse device index, we have a bigger problem.

Note: for a lot of light guns, you go into quick menu > controls > port 2 controls and set the emulated “device type” to whichever gun flavor you’re wanting to use. Some cores do it automagically via internal database (e.g., Nestopia).

I’m a Newbie here looking for touch screen as light gun using Retroid Pocket 2+. I’m using PCSX Rearmed as core when I change input settings into Guncon, it only can fire in the middle and not other places.Care to give some advice?

Sorry but I couldn’t get the touchscreen recognised at all by retroarch. Doesn’t seem to be possible, and expects either a dedicated controller or /maybe/ an extra mouse device.

Fairly disappointing really, as I’ve mentioned - touchscreen + keyboard is the modern day equivalent of a lightgun…

– Old486whizz