Light Gun (Sega Master System) on lr-genesis-plus-gx for RetroPie
-
I'm running lr-genesis-plus-gx for my 3D games like Maze Hunter 3D, Missile Defense 3D, and Zaxxon 3D instead of lr-picodrive because it shows up on one frame (like Meka) instead of flickering between the left and right frames like it would on a CRT without the Segascope glasses.
On Missile Defense 3D I can't get anything out of the light gun, except being able to shoot with the mouse, but it shoots at the middle of the screen with no cursor displayed. I haven't tried Safari Hunt or other light gun games on the SMS yet. Has anyone ever gotten it working?
My mouse seems to work fine on the Minecraft Pi Edition port, just not on this emulator.
-
-
@InsecureSpike said in Light Gun (Sega Master System) on lr-genesis-plus-gx for RetroPie:
these may be helpful
https://wiki.libretro.com/index.php?title=Genesis_Plus_GX
then
https://github.com/ekeeke/Genesis-Plus-GX/issues?q=is%3Aissue+is%3Aclosed
i found a few posts
https://github.com/ekeeke/Genesis-Plus-GX/issues/87
Thanks for the links InsecureSpike. I read through them and it would lead me to believe that the issue has been fixed, but updating lr-genesis-plus-gx from source didn't seem to do the trick. :(
After a while of messing with RetroArch configs I got the cursor to display by using gun_cursor = "yes", but it goes to the middle of the screen. If I move my mouse cursor around a lot very fast I will see it trying to move in the upper left of the screen but quickly go back to center. Should I open this up as a new ticket on their github?
-
this is your problem: https://github.com/libretro/RetroArch/issues/2192
udev mice devices are relative, but need to be absolute devices for genesis to understand them. i thought of a way that might solve it but i haven't attempted it yet: https://github.com/libretro/Genesis-Plus-GX/issues/31#issuecomment-242426869
-
@dankcushions said in Light Gun (Sega Master System) on lr-genesis-plus-gx for RetroPie:
this is your problem: https://github.com/libretro/RetroArch/issues/2192
udev mice devices are relative, but need to be absolute devices for genesis to understand them. i thought of a way that might solve it but i haven't attempted it yet: https://github.com/libretro/Genesis-Plus-GX/issues/31#issuecomment-242426869
Could I resolve this in the meantime by using an absolute positioned device? I'm not sure what device I would use or what could be used, I'm opened to suggestions as long as it could be kept cost-effective.
-
@johne79 said in Light Gun (Sega Master System) on lr-genesis-plus-gx for RetroPie:
Could I solve this by using an absolute positioned device? I'm not sure what device I would use or what could be used, I'm opened to suggestions as long as it could be kept cost-effective.
Is it possible to use a small Android tablet as a "virtual" input device over a connection (Wifi or BT)? I ventured looking into this about a year ago and found some kind of hacky solutions, maybe the landscape has changed since then.it's possible if you can get something that linux and udev understand to be a pointer, but i'm not entirely clear on the criteria of that. a wii mote should work as a mouse, but i'm not sure if it updates the pointer in linux. see https://github.com/libretro/RetroArch/issues/4333#issuecomment-270173083
(i would have thought it should, as surely it is an absolute device, not a relative one)
(Off-topic): I'm a local volunteer and want to help make gaming more accessible for lower income families, so far this has turned out to be a really cost-effective solution overall with RetroPie + RPI3. Also later as I get acclimated I want to help make games and edutainment software for the platform as Ports, eventually I'll get going down that road once I start getting my VirtualUI framework ported from C#/Unity to C++/SDL2 (http://virtualui.codeplex.com/).
sounds great :D
-
@dankcushions said in Light Gun (Sega Master System) on lr-genesis-plus-gx for RetroPie:
a wii mote should work as a mouse, but i'm not sure if it updates the pointer in linux.
It does if used in conjunction with the Mayflash DolphinBar. When used this way, the Wiimote will actually pair with the DolphinBar rather that the computer. The DolphinBar will in-turn translate the readings to absolute mouse coordinates that are read by the computer no differently than a standard pointer device. In a landscape of limited options for computer light guns, it not only works very well, but is quite affordable and when combined with a gun casing like the one below, it looks and feels great in use.
-
@mediamogul said in Light Gun (Sega Master System) on lr-genesis-plus-gx for RetroPie:
@dankcushions said in Light Gun (Sega Master System) on lr-genesis-plus-gx for RetroPie:
a wii mote should work as a mouse, but i'm not sure if it updates the pointer in linux.
It does if used in conjunction with the Mayflash DolphinBar. When used this way, the Wiimote will actually pair with the DolphinBar rather that the computer. The DolphinBar will in-turn translate the readings to absolute mouse coordinates that are read by the computer no differently than a standard pointer device. In a landscape of limited options for computer light guns, it not only works very well, but is quite affordable and when combined with a gun casing like the one below, it looks and feels great in use.
That's slick!
Keep in mind though my goal for this challenge is to keep this as low-tech / low-cost as possible for others who can't afford something like a Perfect Shot or even a Wiimote Plus (they're usually around $40'ish at Walmart, which is a little pricey for a low income family).
For me personally though, it would be awesome if there were a way to connect that up somehow to a recoil mechanism for kickback, maybe I should look into one of those Guncon 2 guns and see if they can somehow sync up if I made some middleman tech like an Arduino -> USB HID controller setup (which I have somewhat working but I wanted to change over to an mbed controlled STM32 NUCLEO and that's when I ran into problems trying to find a good HID implementation library without rolling my own as I'm still learning about HID Report Descriptors).
-
It'll be tough to find a computer light gun solution for under $50. Outside of the Wiimote option, every gun setup I've ever seen hovers in the neighborhood of $150-200 a gun. I did a quick search through Amazon for the lowest cost with free Prime shipping and came up with:
For a total of $50.83
Edit: Of course if the DolphinBar could be removed from the equation by way of a linux driver, that price comes down to $36.43.
-
For the sake of testing I wondered if I could possibly use my STM32 NUCLEO F103RB with a thumbstick (pictured), and emulate a USB HID game controller that reports absolute positioning. It will just start out at "center" and go out to some arbitrary coordinates on each axis controlled by software. All of that I got at a local surplus electronics store for <$20.
Also I have a 4.3" Sainsmart LCD screen I couldn't find much use for before because it used a different pinout than the Arduino Mega2560 (even though it claims to be compatible it has 4 more pins and needs an adapter from Sainsmart...), maybe could be used through the Nucleo as an absolute positioning device. Although I think it was about $35 when I bought it, but this was just for custom proof of concept hardware testing.
EDIT: Picture won't link from Imgur, is that a forum rule?
-
@mediamogul said in Light Gun (Sega Master System) on lr-genesis-plus-gx for RetroPie:
@dankcushions said in Light Gun (Sega Master System) on lr-genesis-plus-gx for RetroPie:
a wii mote should work as a mouse, but i'm not sure if it updates the pointer in linux.
It does if used in conjunction with the Mayflash DolphinBar. When used this way, the Wiimote will actually pair with the DolphinBar rather that the computer. The DolphinBar will in-turn translate the readings to absolute mouse coordinates that are read by the computer no differently than a standard pointer device. In a landscape of limited options for computer light guns, it not only works very well, but is quite affordable and when combined with a gun casing like the one below, it looks and feels great in use.
are you sure this works with linux + retroarch + as a pointer, though? if you check out my link, we can see it updates Mouse0, but we didn't get as far to see if it's updating RETRO_DEVICE_POINTER. it SHOULD, but i don't want to promise anything. if it only updates RETRO_DEVICE_MOUSE, then that won't help in genesis-plus-gx :(
-
@dankcushions said in Light Gun (Sega Master System) on lr-genesis-plus-gx for RetroPie:
it SHOULD, but i don't want to promise anything.
I'll do some testing with it this evening to see. Also, I just read through both your links and the idea to spoof coordinate types is inspired. Here's hoping it pays off.
-
I don't know enough about udev/RetroArch yet to weigh in on the conversation about spoofing absolute coordinates, where's a good place to start? Is the problem actually in udev itself or is it in RetroArch or is it in lr-genesis-plus-gx?
As for me this seems like a great motivation for me to pick back up on building hardware devices that respect USB HID compliancy. Maybe I can make some support for the mbed crowd.
-
OK, so color me surprised. I tried out the Wiimote and DolphinBar combination with all the applicable RetroArch cores and came up empty every time. Altogether, I tried lr-picodrive, lr-genesis-plus-gx, lr-snes9x-next, lr-nestopia and lr-mame2003. With each core I tested with both the udev and sdl input drivers and with lr-mame2003 specifically, I tested both 'mouse' and 'pointer' mouse types.
While I was there I tested out a high-end PC light gun that I recently picked up for my arcade cabinet. Sadly, it suffered the same impotence in every test. For one last go, I tested an air mouse I use for Kodi and other than the inability to see cross hairs in a few cores, it seemed to work everywhere.
Normally I have the high-end guns attached to my cabinet and the DolphinBar attached to an older Mac, so I guess I've just been taking for granted that these would work in some capacity with RetroPie as well, given the wide array of input options. So, while I have no doubt that gun support will come over time, I guess there's just no current pathway to gun gaming at the moment.
-
@mediamogul said in Light Gun (Sega Master System) on lr-genesis-plus-gx for RetroPie:
OK, so color me surprised. I tried out the Wiimote and DolphinBar combination with all the applicable RetroArch cores and came up empty every time. Altogether, I tried lr-picodrive, lr-genesis-plus-gx, lr-snes9x-next, lr-nestopia and lr-mame2003. With each core I tested with both the udev and sdl input drivers and with lr-mame2003 specifically, I tested both 'mouse' and 'pointer' mouse types.
While I was there I tested out a high-end PC light gun that I recently picked up for my arcade cabinet. Sadly, it suffered the same impotence in every test. For one last go, I tested an air mouse I use for Kodi and other than the inability to see cross hairs in a few cores, it seemed to work everywhere.
Normally I have the high-end guns attached to my cabinet and the DolphinBar attached to an older Mac, so I guess I've just been taking for granted that these would work in some capacity with RetroPie as well, given the wide array of input options. So, while I have no doubt that gun support will come over time, I guess there's just no current pathway to gun gaming at the moment.
For the time being just in testing, an air mouse may be the way to go. What model and brand is it, and does it work specifically in lr-genesis-plus-gx on RPI3? (Preferably on Missile Defense 3-D is what I'm wanting to play, and I need it to run in that emulator because it knows to only show one side of the SegaScope 3D frames otherwise it will be unplayable.)
-
@johne79 said in Light Gun (Sega Master System) on lr-genesis-plus-gx for RetroPie:
does it work specifically in lr-genesis-plus-gx on RPI3?
It is recognized and will fire, but just like your initial experience, it doesn't track past the center of the screen.
-
@mediamogul said in Light Gun (Sega Master System) on lr-genesis-plus-gx for RetroPie:
OK, so color me surprised. I tried out the Wiimote and DolphinBar combination with all the applicable RetroArch cores and came up empty every time. Altogether, I tried lr-picodrive, lr-genesis-plus-gx, lr-snes9x-next, lr-nestopia and lr-mame2003. With each core I tested with both the udev and sdl input drivers and with lr-mame2003 specifically, I tested both 'mouse' and 'pointer' mouse types.
did you try it in a non-retroarch application? the best test is maybe a simple mouse script i mention here: https://github.com/libretro/RetroArch/issues/4333#issuecomment-269702220
if it updates the system mouse, we should be able to get something from it.
it might be that the kernel in retropie/raspian doesn't support the dolphinbar yet :(
-
@johne79 said in Light Gun (Sega Master System) on lr-genesis-plus-gx for RetroPie:
For the sake of testing I wondered if I could possibly use my STM32 NUCLEO F103RB with a thumbstick (pictured), and emulate a USB HID game controller that reports absolute positioning. It will just start out at "center" and go out to some arbitrary coordinates on each axis controlled by software. All of that I got at a local surplus electronics store for <$20.
an analog joystick (like an xbox 360 controller, etc) should be usable in any retroarch core that wants an absolute mouse coordinate (like a lightgun game), but it has to be coded in. mame2003 supports it, and i think genesis-plus-gx (i should test this later!)
however, if you're creating your own analog stick it would have to appear as a valid HID game controller in linux.
-
@johne79 said in Light Gun (Sega Master System) on lr-genesis-plus-gx for RetroPie:
I don't know enough about udev/RetroArch yet to weigh in on the conversation about spoofing absolute coordinates, where's a good place to start? Is the problem actually in udev itself or is it in RetroArch or is it in lr-genesis-plus-gx?
the problem is potentially fixable in either retroarch's UDEV driver, or lr-genesis-plus-gx, but the former makes it something all cores can use.
the basic flow (as i understand it is)
- linux has access to your hardware (eg, pointer device) via UDEV
- retroarch's UDEV input driver provides access to the UDEV information (eg, a UDEV pointer device)
- the core (emulator) asks retroarch for status of a generic RETRO_DEVICE_POINTER, which the UDEV input driver provides
here is where the UDEV input driver updates the RETRO_DEVICE_POINTER's state (coordinates): https://github.com/libretro/RetroArch/blob/master/input/drivers/udev_input.c#L460
it's at this point i'd have to start debugging to work out what's going on!note, you can might see some references to RETRO_DEVICE_LIGHTGUN, but as far as i can tell this is just another way of looking at the mouse: https://github.com/libretro/RetroArch/blob/master/input/drivers/udev_input.c#L420
i guess UDEV/linux doesn't see lightgun's as anything other than mice. also, i don't know of many (any?) cores that actually use RETRO_DEVICE_LIGHTGUN - they normally ask for a POINTER or maybe a MOUSE. -
@dankcushions said in Light Gun (Sega Master System) on lr-genesis-plus-gx for RetroPie:
it might be that the kernel in retropie/raspian doesn't support the dolphinbar yet :(
That could be the case, and seeing as how I've also tested the high-end offerings from AimTrak previously and those from ArcadeGuns last night, the issue most likely extends further to whatever this particular class of pointer device is classified as, making any kind PC light gun an impossibility.
I have three different emulation gaming rigs for when I want to play light gun games, so this isn't really a big issue for me, but I realize there are many people who would like to play these games on the Pi. If you should ever need someone to help test gun peripherals against any changes made to RetroArch or RetroPie, just give me a shout.
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.