Lightgun support added to PCSX-Rearmed
-
@allahandro hi also did you configure the wiimote as a controller in emulation station? I can’t remmeber exactly but I think I configured the wiimote trigger as button a and the wiimote a button as button b or vice versa. If you didn’t that could be why the cursor is moving but not registering a button press.
The other thing I have found in general (not necessarily specific to this issue) with the pi and my dolphin bar/wiimote is that it seems to screw up way more when I have an additional controller in instead of just the “lightgun” setup. I think it has to do with how the pi seems to randomly assign controller ids at startup. So if you have any sort of static settings assigned to what mouse index the lightgun is at they can get all screwy when you have other controllers (or even a keyboard with a built in mouse/trackball) attached at the same time as the “lightgun” setup.
@MrLightgun yeah sorry about the confusion I don’t think you can configure the wiimote/dolphinbar to be line of sight. Aimtrak you can in theory but from vociferously reading this forum over time I see a lot of people saying it is hard or it loses calibration easily. That being said at least in time crisis you see your bullet hole so you can kind of calibrate yourself from that. Anyhow I am helping with testing not really so the wiimote works as much but so this can be all set when I get my sinden :)
-
@MrLightgun Option 1.
-
@BJRetro I tried assigning buttons in emulation station but the a and b buttons wouldn't register. The wilmote also showed up as a keyboard.
-
@allahandro do you also have lights 1 and 4 lit up on the wiimote? If not try that mode and see if it works.
-
No just 1 and 2. I'll try this tonight. Thanks guys.
-
@BJRetro I have mode 1 on the light bar and can only get 1 and 2 lights on the wiimote and 1 and 3. Can't get 1 and 4. Tried to set it up with both combination of lights and wouldn't register the A And B buttons on the wiimote. I tried changing the mode on the dolphin bar but only had emulation station crash when configuring the controller.
-
@allahandro try pressing the home button on the wiimote and the left directional and see if that lights up led 1 and 4 on the wiimote. https://drive.google.com/file/d/1whlKx0I716VFFrYCUJZX_7EHYg7cbJ54/view
-
@BJRetro thank you. I have led lights 1 and 4 on the wiimote. I tried configuring the wiimote in the GUI but A and B are still not recognized.
-
@allahandro ok did you try duck hunt again anyhow and see if that works? I have a controller in one usb and the wiimote /dolphin bar in another usb
EDIT- come to think of it, I think I could have had the same issue in emulation station because as I think harder, I have the plus key configured as start, minus key as select, button 1 as “a” and button 2 as “b” so it is possible I couldn’t configure the “a” button or “trigger” in emulation station either and yet I am able to use the gun to shoot. So maybe try that.
-
Hi Chaps
Quick update, I have good news and bad news. The recent retroarch/libretro touchscreen improvements have added snes, master system and genesis/megadrive lightgun functionality which is super awesome, however they have also introduced a few issues to the lightgun api. I need to separate what is a bug and what is a feature I don't understand. It seems like the emulators work but you can't use the functionality because the lightgun api is broken. This may of course be my setup.
I can't just fix it for the Sinden Lighgun but break it for every other lightgun device. I can complete my work for lr-PCSX-Rearmed first and make it support all 3 lightgun options of mouse, pointer and lightgun. So if it works in lr-fceumm it should work in pcsx-rearmed. Hopefully I can get that merged into main. I've also spotted one code issue I'm 99% certain is a bug in the retroarch lightgun api which I can raise which will hopefully get fixed quickly to improve things a little bit.
I then have a bigger change to the lightgun api if my analysis is correct but that's the one that will take a bit more testing to make sure I'm not breaking anything else. I'll have the version of lr-pcsx-rearmed on my git updated hopefully within the next week. I don't want to leave it too long in case the branch gets out of date. So I'll post here when I've done that.
Thanks for all your testing and support
Mr Lightgun
-
@MrLightgun awesome let us know when you update and I will update on my end and test PSX again. Hopefully at that point we can get more testers too to make sure it’s not just something unique to my setup that makes it work. The awesome and bad thing about retropie is how much customization there is - awesome because it seems with a little work you can do almost anything (can’t imagine having anything close to my near-professional looking barcade setup without it) but bad because extremely hard to know if any fix will be “universal” or “near universal” given how many different setups and updates/lack of updates, custom configuration settings people have on their machines.
-
@BJRetro said in Lightgun support added to PCSX-Rearmed:
EDIT- come to think of it, I think I could have had the same issue in emulation station because as I think harder, I have the plus key configured as start, minus key as select, button 1 as “a” and button 2 as “b” so it is possible I couldn’t configure the “a” button or “trigger” in emulation station either and yet I am able to use the gun to shoot. So maybe try that.
In a game, are you saying you mapped the buttons A and B in Retroarch (hotkey+x)?
-
@allahandro hi I will look. Unsure if I had to do that.
-
@MrLightgun I’ve given your release a go with a set of Aimtrak’s. I can get as far as the Emulator registering trigger fire, as the screen flashes and responds with the in-game gun fire. In terms of any response on screen, nothing is detected, the Guncon setup screen doesn’t register any events within the designated ‘center’ crosshair. I’ve tested across Time Crisis and Point Blank.
Player 1 and 2 input types have been set to ‘guncon’, and I’ve left mouse index to 0 on both players. If I change the index to any other number other than 0, both players fail to register gun fire.
I’ve given lr-fceumm another go, and it is still hyper sensitive with my Aimtrak movement. With the version I have, it only provides me the option for input type as ‘mouse’ or ‘lightgun’. Mouse is the only one that registers movement and trigger fire from my Aimtrak’s, ‘lightgun’ provides no response at all, and the onscreen crosshair disappears.
Before I installed your release, I upgraded all packages including core and EmulationStation.
Versions are:
FCEUMM 1.7.6 (SVN) 5e1d648
PCSX-ReArmed 1.7.6 r22 03fc8e9
EmulationStation v2.8.4RP
Core 4.14.98-v7+Both Aimtrak’s work fine for MAME shooters.
Let me know if there are any logs that I can supply that may assist.
-
Apologies for the dumb question: Can I use one of those regular Wii IR bars that connect to the TV through USB? Or the Bluetooth on the Dolphinbar is actually required?
-
@RetroNerdman I am not sure but from posts I have read I think the difficulty there is whether you can get your wiimotes to connect and configure properly connected to bluetooth.
-
@MrLightgun Hi there - no rush but just wanted to see if you made the changes and if so I will test.
-
Fantastic that lightgun support has been added! I use the Dolphin bar and Wiimote myself. In order to get Time Crisis almost playable I had to use these settings:
Guncon Adjust - 15
Guncon Adjust Y - 15
Guncon Adjust Ratio X - 1.25
Guncon Adjust Ratio Y - 1.25It's like around 80% there for me. The issue I have is the Ratio X; it's not enough to be able to reach the far left or right of the screen. If it was possible to raise it to say 1.5 or 1.75 I think it would be pretty much perfect as at the maximum 1.25 setting the gun cursor won't reach the far left or right of the screen by about an inch or two. Also the initial calibration at the start of the game can take a fair few shots just to kinda get it centered so the game is playable.
But still, it's fab that the feature is in there now!
-
Hi Everyone
Sorry for the slow updates and appreciate the testing. It was actually difficult to get my head round the lightgun support as so much has changed in RetroArch due to the touchscreen lightgun support.
I found what appears to be a recent bug that would break lightgun and touchscreen support which I've managed to merge:
https://github.com/libretro/RetroArch/pull/9540Then it looks like the lightgun api only works in X11, so I've added some non-X11 code for devices like the Raspberry Pi:
https://github.com/libretro/RetroArch/pull/9599
That has not been accepted yet.These changes when tested on my branch then fixed the lightgun api which hadn't previously been working on the Raspberry Pi from my analysis. For lightguns we were using "pointer" or "mouse" libretro interfaces. However pointer is now being used for touchscreen in the more recent versions so our lightgun support for Aimtrak and Sinden Lightgun would be broken.
The great news is that by fixing the lightgun API assuming the merge gets accepted it has also fixed several other emulators that had lightgun support but were not working on the Raspberry Pi.
So I've managed to get working SNES, Master System, Genesis/Megadrive, MegaCD/SegaCD AND Dreamcast. A big win!
Dreamcast especially is going to be awesome on the Pi 4 when RetroPie is ready so this is great timing if I can get it all sorted.
Now with lr-pcsx-rearmed I uploaded the work I had done and it is still waiting for a merge. I felt as I had done the hard bit of adding the lightgun support to the emulator, tidying up where it got the data from was not as important. I was using the pointer/touchscreen api which works with absolute coordinate devices and doing the trigger, aux A & aux B with the 3 mouse buttons using the mouse interface. So it was a bit of a hybrid. When I get the chance I can now tidy it to support the 3 standard lightgun interfaces mouse, touchscreen and pointer. This should enable the touchscreen support and the lightgun support in the right way. Mouse still won't be great because I don't have a mouse cursor option but someone with that skillset can add it in the future.
At that point I can then work out what is going on with the Dolphin bar. Ideally I don't want to add in additional Guncon adjustments because that is not supposed to be required. So I'm going to try and fix it properly and if that fails then I can always increase the available numbers.
Just to confirm is anyone successfully using Dolphin bar in a calibrated line of sight mode on their Pi? If so what setting do you have the bar on and what lightgun setting do you have in lr-fceumm options assuming it works on that emulator.? It might be broken due to the bugs I described at the start.
Thanks
Mr Lightgun
-
@MrLightgun wow Andy awesome that you got all of those systems working! Hope your changes get accepted; that would be a big feat to suddenly get to play lightgun games on all of those systems.
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.