The NEW Build Your Own Arcade Controls

Main => Lightguns => Topic started by: BadMouth on November 13, 2022, 09:38:16 am

Title: How are people handling 4:3 vs widescreen input using vJoy?
Post by: BadMouth on November 13, 2022, 09:38:16 am
Before I delve into a problem that may already be solved, how are people handling 4:3 vs widescreen input when guns show up as virtual joysticks?

The problem: The virtual joystick is calibrated to the corners of the widescreen monitor.  When a 4:3 game is launched, the gun has to be moved all the way to the side of the widecreen monitor for the crosshairs to reach the side of the 4:3 image, meaning the aim is off.  The guns can be re-calibrated in the service menu of most games, but some older games like the Exidy ones do not have a service button or DIP switch that I can find.

With what I know now, I could:
1.  Play everything in widescreen which would suck.
2.  Initially calibrate them for the 4:3 screen, then re-calibrate them in widescreen games...all of which will be newer and have calibration options.
3.  Ignore the old games that don't provide for calibration or play them in widescreen.

I was thinking if there was a way to change joystick saturation for only the x axis in MAME or vjoy, that might work.

What are most people doing?
Are there other ways of handling it?


Title: Re: How are people handling 4:3 vs widescreen input using vJoy?
Post by: JayBee on November 14, 2022, 09:34:18 am
Before I delve into a problem that may already be solved, how are people handling 4:3 vs widescreen input when guns show up as virtual joysticks?

The problem: The virtual joystick is calibrated to the corners of the widescreen monitor.  When a 4:3 game is launched, the gun has to be moved all the way to the side of the widecreen monitor for the crosshairs to reach the side of the 4:3 image, meaning the aim is off.  The guns can be re-calibrated in the service menu of most games, but some older games like the Exidy ones do not have a service button or DIP switch that I can find.

With what I know now, I could:
1.  Play everything in widescreen which would suck.
2.  Initially calibrate them for the 4:3 screen, then re-calibrate them in widescreen games...all of which will be newer and have calibration options.
3.  Ignore the old games that don't provide for calibration or play them in widescreen.

I was thinking if there was a way to change joystick saturation for only the x axis in MAME or vjoy, that might work.

What are most people doing?
Are there other ways of handling it?
On my gun4ir system I handled that natively on the hardware side.
It can be changed anytime with the push of a button or with a simple commands.
I think it's the best solution as it's universal, and doesn't rely on any software hack.
I also have both mouse and joystick input so no need for vjoy
Title: Re: How are people handling 4:3 vs widescreen input using vJoy?
Post by: RandyT on November 14, 2022, 03:35:46 pm
With what I know now, I could:
1.  Play everything in widescreen which would suck.
2.  Initially calibrate them for the 4:3 screen, then re-calibrate them in widescreen games...all of which will be newer and have calibration options.
3.  Ignore the old games that don't provide for calibration or play them in widescreen.

I was thinking if there was a way to change joystick saturation for only the x axis in MAME or vjoy, that might work.

What are most people doing?
Are there other ways of handling it?

I haven't messed around with this yet, but I ASSUME the lightgun becomes an analog stick under vJoy.  As such, is it not possible to map the individual game controls to analog, set deadzone to "0" and use the analog sensitivity (which works as a percentage) of the X-axis for 4:3 games?  If it does, I would think this would only need to be figured out once and the same values applied to all games with that aspect ratio so it just pops up working properly when you pick that game.  I don't do a lot with analog in MAME, so it may not be that simple and maybe you've attempted that path already  :dunno

On the other hand, it would be a fairly simple addition to the software to programatically take a peek at the active game and use different set of screen offsets.  This same method is used by front-ends which automatically set joystick restriction and display active-marquee images, so there's no reason to believe it wouldn't work swimmingly here.  The only thing preventing a third party from making such a switching app is getting the Lichtknarre software to use it on-the-fly, as it only references the .ini files at startup.

Fusselkroete has some interesting stuff in the pipeline.  Some of which I believe will tear down some current inconveniences when he's done with them.  :)
Title: Re: How are people handling 4:3 vs widescreen input using vJoy?
Post by: BadMouth on November 14, 2022, 09:18:00 pm
On my gun4ir system I handled that natively on the hardware side.
It can be changed anytime with the push of a button or with a simple commands.
I think it's the best solution as it's universal, and doesn't rely on any software hack.
I also have both mouse and joystick input so no need for vjoy

Yeah, showing up as the genuine hardware does make it the most universal solution.
I'd have probably hacked your setup into these Wii guns in the past if the cameras weren't out of stock the couple times I got serious about it.
 :cheers:

I haven't messed around with this yet, but I ASSUME the lightgun becomes an analog stick under vJoy.  As such, is it not possible to map the individual game controls to analog, set deadzone to "0" and use the analog sensitivity (which works as a percentage) of the X-axis for 4:3 games?

Yes, the virtual joystick shows up as an analog joystick in MAME.  This is used because MAME allows virtual joysticks, but not virtual mice.  The setting I think would need adjusted is "saturation".  It basically adjusts how far the controller needs to be moved before MAME sees it as being 100% moved in that direction.  Pretty sure it would work if one were able to set it only for the x axis, but in MAME it applies to both x and y.  I planned to play around with it and make sure the x axis would perform as expected before looking into compiling MAME to not apply the change to the Y axis. 

I didn't think about sensitivity because I am used to messing with it when a device is seen as a mouse.  For those increasing it makes the crosshairs not lag as much, but the end aiming point is the same.  Just gave it a try.  Doubling it from 50 to 100 didn't seem to have any effect.

I hate that I don't have the proper time to devote to this.
Title: Re: How are people handling 4:3 vs widescreen input using vJoy?
Post by: RandyT on November 15, 2022, 12:32:48 am
I just started to actually play around with this, so yeah, I clearly didn't have much of a clue  :lol    The saturation does seem to be the one of interest, but as you stated, it only needs to be on the X axis.  I'm also not sure if this is a global setting or configured by game, but I think it may be the former.  It's somewhat surprising that MAME doesn't have something which can do this, given how comprehensively the control tweaking has been implemented.

But I think a solution to this isn't too far off.  Judging from the test version I am looking at, it looks like some of the groundwork has been done by Fusselkroete already which could help deal with this.