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

Offline barbudreadmon

  • Administrator
  • *****
  • Posts: 985
  • Karma: +56/-1
  • Helper
Re: split topic : lightgun issues
« Reply #30 on: January 15, 2022, 07:12:10 AM »
The fix is in, supposedly if you have a dpad on your lightgun (iirc that's a thing with recent lightguns ?) you should be able to use it for steering.

Offline StormedBubbles

  • Newbies
  • *
  • Posts: 29
  • Karma: +1/-0
Re: split topic : lightgun issues
« Reply #31 on: January 15, 2022, 09:19:17 AM »
Thank you! RetroArch does have a general "Gun D-pad" set of inputs. I can indeed assign the D-pad on my gun to that and steer the car now. I noticed that the controller can also now steer in lightgun mode, which is good if someone just wants driving duty while 1 or 2 other players shoot. 😃

The standalone controller mode seems unaffected by these changes, so all seems good now.

Offline StormedBubbles

  • Newbies
  • *
  • Posts: 29
  • Karma: +1/-0
Re: split topic : lightgun issues
« Reply #32 on: February 19, 2022, 07:47:42 AM »
Hi again,

Is there a way to invert the Y axis in Wild Pilot (wildplt) in the libretro port? I didn't see the option in the dipswitch or the test/service menu.

Offline barbudreadmon

  • Administrator
  • *****
  • Posts: 985
  • Karma: +56/-1
  • Helper
Re: split topic : lightgun issues
« Reply #33 on: February 19, 2022, 09:53:26 AM »
Hmmm, it seems we are hardcoding a reversed y axis when using standard control method (analog stick), which translates poorly when directly injecting coordinates. See https://github.com/finalburnneo/FBNeo/blob/9bcc30c42c696f69eb1cc15e29b21f422b438565/src/burn/drv/pst90s/d_cischeat.cpp#L2730-L2733

I'll try to find a better way around this in the next few days.

Offline barbudreadmon

  • Administrator
  • *****
  • Posts: 985
  • Karma: +56/-1
  • Helper
Re: split topic : lightgun issues
« Reply #34 on: February 20, 2022, 10:23:31 AM »
it should be fine now

Offline StormedBubbles

  • Newbies
  • *
  • Posts: 29
  • Karma: +1/-0
Re: split topic : lightgun issues
« Reply #35 on: February 20, 2022, 08:05:06 PM »
It is. Thanks again  :smilie:

Offline StormedBubbles

  • Newbies
  • *
  • Posts: 29
  • Karma: +1/-0
Re: split topic : lightgun issues
« Reply #36 on: June 12, 2022, 12:23:58 PM »
Hi again,

I came across the game Cyber Tank (cybertnk). In that game, player 1 steers and fires missiles while player 2 has more freedom to aim around with a cursor and fire a machine gun. It's...kind of...like Lucky & Wild. The RetroArch gun buttons do work for that game (select, start, trigger), but player 2's cursor is always stuck "offscreen" (top left) when the lightgun input is selected. Would it be possible to add lightgun tracking for player 2 in that one?

Offline barbudreadmon

  • Administrator
  • *****
  • Posts: 985
  • Karma: +56/-1
  • Helper
Re: split topic : lightgun issues
« Reply #37 on: June 12, 2022, 03:34:48 PM »
Hi again,

I came across the game Cyber Tank (cybertnk). In that game, player 1 steers and fires missiles while player 2 has more freedom to aim around with a cursor and fire a machine gun. It's...kind of...like Lucky & Wild. The RetroArch gun buttons do work for that game (select, start, trigger), but player 2's cursor is always stuck "offscreen" (top left) when the lightgun input is selected. Would it be possible to add lightgun tracking for player 2 in that one?

This issue was similar to the nes zapper issue, where second controller was queried for the 1st emulated gun device. It should be ok now.

Edit: It turns out i overlooked something, the crosshair can't reach the whole screen so its range apparently needed to be scaled. It should be better now.
« Last Edit: June 13, 2022, 06:52:59 AM by barbudreadmon »

Offline StormedBubbles

  • Newbies
  • *
  • Posts: 29
  • Karma: +1/-0
Re: split topic : lightgun issues
« Reply #38 on: June 14, 2022, 02:41:42 AM »
Thank you!

I tested the most recent changes. The cursor lines up very well on the X axis. The Y axis is showing a ratio issue where the cursor alignment gets worse the further away from the axis center you get. The cursor ends up below the aim at the top of the game's visible area and above the aim at the bottom of the game's screen.

I don't have another game with this aspect ratio to compare to. Maybe I have something configured wrong with the Sinden gun's border. I am using RetroArch 1.10.0, which has the newer coordinate scaling. Other games in FBNeo have been good. It appears that this game allows the system mouse cursor to travel into the letterbox area on my TV above and below the game and is scaling the in-game cursor accordingly (so, for example, I have to aim into the blank letterbox area above the game in order to get the cursor to reach its highest position in the game).
« Last Edit: June 14, 2022, 02:43:43 AM by StormedBubbles »

Offline barbudreadmon

  • Administrator
  • *****
  • Posts: 985
  • Karma: +56/-1
  • Helper
Re: split topic : lightgun issues
« Reply #39 on: June 15, 2022, 01:19:15 AM »
Well, that's not a core issue, the crosshair is properly following the coordinates provided by the libretro api.
Maybe your gun is simply not compatible with 8:3 games.

Offline dink

  • Administrator
  • *****
  • Posts: 4644
  • Karma: +407/-1
  • pie? I nearly bought one!
Re: split topic : lightgun issues
« Reply #40 on: June 15, 2022, 09:21:27 AM »
StormedBubbles, I made a little modification to the gun handling for cybertnk, please give it a try when a new libretro core is available.

best regards,
- dink

Offline StormedBubbles

  • Newbies
  • *
  • Posts: 29
  • Karma: +1/-0
Re: split topic : lightgun issues
« Reply #41 on: June 15, 2022, 09:37:40 PM »
Thank you both! I will test it out when it's ready.

This is a bizarre case, but it has made my friends and me notice some odd behavior in how RetroArch handles Y lightgun coordinates in certain circumstances. It definitely could just be something with the Sinden guns, but I will try to see if someone with an alternate device such as Gun4IR can lend a hand.

The commit that recently changed some lightgun behavior in RetroArch is this one: https://github.com/libretro/RetroArch/pull/13258. I believe that commit was supposed to make the lightgun coordinates scale appropriately regardless of the resolution RetroArch was outputting. It appears to work just like that for X coordinates. On a 16:9 TV, I can have RA output all sorts of weird aspect ratios in lr-FBNeo and get the guns to track perfectly on the X axis with the lightgun games. The problem arises with the Y axis when I end up with a letterbox view on my TV. The Y axis will no longer track correctly. The resolution has to be set so that the screen is filled vertically.

Offline StormedBubbles

  • Newbies
  • *
  • Posts: 29
  • Karma: +1/-0
Re: split topic : lightgun issues
« Reply #42 on: June 16, 2022, 10:08:56 AM »
There is a typo in the Y-axis code in the commit I linked above, but I haven't tested the fix yet to see if that was the culprit.

On a quick, unrelated note, I can't seem to get the trackball controls to work with a mouse in irrmaze. Are those controls hooked up in the Libretro version?
EDIT: never mind. It works.
« Last Edit: June 16, 2022, 10:10:23 AM by StormedBubbles »

Offline StormedBubbles

  • Newbies
  • *
  • Posts: 29
  • Karma: +1/-0
Re: split topic : lightgun issues
« Reply #43 on: June 16, 2022, 12:22:44 PM »
Sorry for the multiple posts, but it is a bug in the Libretro code. I fixed the typo in my build of RetroArch and am able to track on the Y axis correctly in Cyber Tank with barbudreadmon's coordinates.

Offline barbudreadmon

  • Administrator
  • *****
  • Posts: 985
  • Karma: +56/-1
  • Helper
Re: split topic : lightgun issues
« Reply #44 on: June 19, 2022, 08:15:10 AM »
Sorry for the multiple posts, but it is a bug in the Libretro code. I fixed the typo in my build of RetroArch and am able to track on the Y axis correctly in Cyber Tank with barbudreadmon's coordinates.

Thanks for the heads-up.
FWIW, i'm not happy with our current driver code and will revisit it soon, but for now it should be fine with your usage.