Author Topic: split topic : lightgun issues  (Read 10442 times)

Offline barbudreadmon

  • Administrator
  • *****
  • Posts: 1091
  • Karma: +59/-1
  • Helper
Re: split topic : lightgun issues
« Reply #15 on: January 04, 2022, 07:10:37 AM »
i made a new topic out of the nes zapper issues

Offline StormedBubbles

  • Newbies
  • *
  • Posts: 29
  • Karma: +1/-0
Re: split topic : lightgun issues
« Reply #16 on: January 04, 2022, 10:44:25 AM »
Thanks!

Going back to Super Russian Roulette briefly, I noticed that the entire border of the screen, including all parts surrounding the desk, does indeed register as "off screen" when using a mouse (full) or controller to control the cursor. It is only when the control type is set to lightgun that the bottom of the screen + the right side of the desk register as a shot on screen. The left side of the desk seems okay. It is hard for me to eyeball it, but perhaps the cursor isn't allowed to go as far into the border when in lightgun mode? The issue is similar to what happens with some of the arcade games in lightgun mode. It seems that the thresholds for what is and isn't an off-screen shot are different among the various control modes.
« Last Edit: January 04, 2022, 11:09:13 AM by StormedBubbles »

Offline barbudreadmon

  • Administrator
  • *****
  • Posts: 1091
  • Karma: +59/-1
  • Helper
Re: split topic : lightgun issues
« Reply #17 on: January 04, 2022, 12:17:08 PM »
Are you using the latest version of the core ?
Yesterday i noticed the libretro api specify a value for offscreen (https://github.com/libretro/FBNeo/blob/master/src/burner/libretro/libretro-common/include/libretro.h#L132) and made a change to correctly account for this (i don't have a mean to properly test this since i have no lightgun, and the mouse can't trigger that value for some reason). Where goes the crosshair when you go offscreen ? If RetroArch is correctly returning me -0x8000, i set the position at (0,0), so the crosshair should always appear exactly in the very top left corner, if not then you might have found a RetroArch bug, since it would mean RetroArch isn't sending me the correct value.

Edit : i pushed another attempt at fixing this to github, as it seems there might be a second method to detect if a lightgun is offscreen (https://github.com/libretro/FBNeo/blob/master/src/burner/libretro/libretro-common/include/libretro.h#L230)
« Last Edit: January 04, 2022, 01:09:49 PM by barbudreadmon »

Offline StormedBubbles

  • Newbies
  • *
  • Posts: 29
  • Karma: +1/-0
Re: split topic : lightgun issues
« Reply #18 on: January 04, 2022, 08:16:46 PM »
Hey, thanks for all of your help. I really appreciate it! Using a device emulating a lightgun like this is a pretty niche thing right now, but hopefully the numbers grow and more people can experience how fun it is  :smilie:

I was on commit f4bf5ef in the libretro version, which is the commit right before the one you mentioned in your message. The method you used is very clever. With the commit you just recently added, I do get the cursor jumping to the top left when I hit the edge of the screen. It returns to where it was before that when I move away. That fixed the issue with Super Russian Roulette, Lord of Gun, and Lethal Enforcers! Thanks!

Zero Point 2 is still a little strange, but I don't think it is because of the same issue. The cursor definitely does go to the top left, but I have to pull the trigger a handful of times to get reload to work. Does that one have off-screen reload accounted for in the code? The first Zero Point game didn't need any reloading, and there's a dipswitch for the second one to disable the need for reloading, so I'm wondering if maybe it was just overlooked. If that one is weird/annoying to update, then I can just play with the reload disabled. It otherwise works great.  :biggrin:

When testing this stuff, it's possible to use a regular mouse when in lightgun mode. The Sinden gun is really just a fancy mouse that uses a camera to place the cursor in a calibrated position. The camera looks for a white border around the game screen, and then, through some software "magic," it places the cursor on screen right where you calibrated your line of sight. To the gun, "off screen" means "can't see a border," and that translates in mouse talk to "cursor on edge of screen." It's amazingly consistent. You can go off screen in one direction and maintain the alignment when you come back from another side of the screen. It allows me to turn off any emulator-generated crosshairs.

Thanks again! I wonder if the mystery of the hidden Famiclone dual gun will be figured out. 🤞

Offline barbudreadmon

  • Administrator
  • *****
  • Posts: 1091
  • Karma: +59/-1
  • Helper
Re: split topic : lightgun issues
« Reply #19 on: January 05, 2022, 02:37:07 AM »
I'm glad the libretro offscreen weird behavior was sorted out !
I'll look at Zero Point 2 when i have some time, the obscure nes zapper games might be a bit beyond me.

Offline dink

  • Administrator
  • *****
  • Posts: 5014
  • Karma: +449/-1
  • pie? I nearly bought one!
Re: split topic : lightgun issues
« Reply #20 on: January 05, 2022, 10:01:31 AM »
Zero Point 2 is fixed now :)

best regards,
- dink

Offline StormedBubbles

  • Newbies
  • *
  • Posts: 29
  • Karma: +1/-0
Re: split topic : lightgun issues
« Reply #21 on: January 05, 2022, 11:28:10 AM »
Awesome! Thanks! It works well for me.

Is there a different way to turn off the crosshairs for NES games? After finishing testing, I'm now realizing that the core option for the crosshair/cursor toggle doesn't seem to affect NES like it does for arcade games. The cursor is always there.

Offline barbudreadmon

  • Administrator
  • *****
  • Posts: 1091
  • Karma: +59/-1
  • Helper
Re: split topic : lightgun issues
« Reply #22 on: January 05, 2022, 12:06:18 PM »
Thanks for the report ! It should be ok now.

Offline Voljega

  • Newbies
  • *
  • Posts: 32
  • Karma: +1/-0
Re: split topic : lightgun issues
« Reply #23 on: January 05, 2022, 03:47:48 PM »
sorry for the little hijack but which kind of gun are you using @StormedBubbles ?
and does it work with two players and are you happy with it ?

Offline StormedBubbles

  • Newbies
  • *
  • Posts: 29
  • Karma: +1/-0
Re: split topic : lightgun issues
« Reply #24 on: January 05, 2022, 04:41:46 PM »
Thanks! I will check that update out later.

@Voljega: I am using two Sinden lightguns. Two definitely work together in RetroArch on a Raspberry Pi. I haven't tried them in any Windows emulators, but they do function on my Windows laptop too. I don't think that there is any software limitation on the Sinden side with how many guns you can use. For example, you should be able to use 3 of them together in Revolution X as long as the emulator supports multiple mice. You just currently need one instance of the software per gun.

I am very happy with them, but they are a little annoying to initially set up. I find that the vast majority of information floating around out there on these is very outdated. The Discord community has the most up-to-date information. Software and firmware improvements have eliminated almost all of the issues I have seen in various videos.

Offline dink

  • Administrator
  • *****
  • Posts: 5014
  • Karma: +449/-1
  • pie? I nearly bought one!
Re: split topic : lightgun issues
« Reply #25 on: January 05, 2022, 05:43:00 PM »
Awesome! Thanks! It works well for me.

Is there a different way to turn off the crosshairs for NES games? After finishing testing, I'm now realizing that the core option for the crosshair/cursor toggle doesn't seem to affect NES like it does for arcade games. The cursor is always there.

Great! :)  I tested disabling of the crosshair in a few nes games, and it worked fine, maybe barbudreadmon has an idea?

best regards,
- dink

Offline StormedBubbles

  • Newbies
  • *
  • Posts: 29
  • Karma: +1/-0
Re: split topic : lightgun issues
« Reply #26 on: January 06, 2022, 02:01:44 AM »
The update related to the NES cursor mentioned earlier did the trick! I think it is all good now.

Offline StormedBubbles

  • Newbies
  • *
  • Posts: 29
  • Karma: +1/-0
Re: split topic : lightgun issues
« Reply #27 on: January 14, 2022, 10:32:44 PM »
Hi again,

I am tinkering with Lucky & Wild and am having some trouble getting a handle on the controls when adding lightguns to the mix. In the libretro version of fbneo, when port 1 is set to "RetroPad," I can steer with the left stick and aim with the right. L2 brakes, R2 accelerates, and one of the face buttons shoots.

The game seems to handle the gun inputs fine for both players if I set port 1 and port 2 to "llightgun," and I can still use the shoulder buttons of controller 1 for braking and accelerating. However, I can't seem to steer in this configuration.

Is it possible to steer with a separate controller while both player 1 and player 2 are configured to use a lightgun?

Offline barbudreadmon

  • Administrator
  • *****
  • Posts: 1091
  • Karma: +59/-1
  • Helper
Re: split topic : lightgun issues
« Reply #28 on: January 14, 2022, 11:40:07 PM »
This game has such a weird layout, i'll try to think of a way to make things work with lightguns, note that if i end up moving steering to another player (i would prefer not because the game should be fully playable with 1 gamepad at the moment) i'll also move brake and accelerate.

Offline StormedBubbles

  • Newbies
  • *
  • Posts: 29
  • Karma: +1/-0
Re: split topic : lightgun issues
« Reply #29 on: January 14, 2022, 11:55:13 PM »
Thanks! The steering/shooting combo for player 1 does work really well if using a dual-stick controller with shoulder buttons. I wouldn't want to disrupt that for other players. After seeing this cabinet's bizarre control setup and before trying it in fbneo, I imagined port 1 as controller for driving and ports 2 and 3 as the guns would be a good setup.