Jump to content
LaunchBox Community Forums

Has anyone gotten dual gun4ir guns working with supermodel 3?


Hamburglin

Recommended Posts

I'm hoping someone here has gotten this to work. No matter what I do, I can't get my second gun read by the emulator.

I've set input mode to raw inputs and remapped my mouse controls to mouse3 and mouse 4 (which I checked are what my guns are via -input-config mapping).

Anyone know what I could be missing?

Link to comment
Share on other sites

What do you mean when you say it's not registering? (You said using -config-input it was recognized)

My Gun4IR guns didn't work until in game calibration was done. (Can't remember if I had to do it with every gun game though) 

Symptoms were the scaling/sensitivity  was way off and only one controller worked. Also specifically in Lost World, in your supermodel.ini are you using analog_gun or just gun?

Edited by Headrush69
Fix
Link to comment
Share on other sites

This is my supermodel 3 controls config for lost world controls:

; Light guns (Lost World)
InputGunLeft = "KEY_LEFT"               ; digital, move gun left
InputGunRight = "KEY_RIGHT"             ; digital, move gun right
InputGunUp = "KEY_UP"                   ; digital, move gun up
InputGunDown = "KEY_DOWN"               ; digital, move gun down
InputGunX = "MOUSE3_XAXIS,JOY2_XAXIS"    ; analog, full X axis
InputGunY = "MOUSE3_YAXIS,JOY2_YAXIS"    ; analog, full Y axis
InputTrigger = "KEY_A,JOY2_BUTTON1,MOUSE3_LEFT_BUTTON"
InputOffscreen = "KEY_S,JOY2_BUTTON2,MOUSE3_RIGHT_BUTTON"    ; point off-screen
InputAutoTrigger = 1                    ; automatic reload when off-screen
InputGunLeft2 = "NONE"
InputGunRight2 = "NONE"
InputGunUp2 = "NONE"
InputGunDown2 = "NONE"
InputGunX2 = "MOUSE4_XAXIS,JOY3_XAXIS"    ; analog, full X axis
InputGunY2 = "MOUSE4_YAXIS,JOY3_YAXIS"    ; analog, full Y axis
InputTrigger2 = "JOY3_BUTTON1,MOUSE4_LEFT_BUTTON"
InputOffscreen2 = "JOY3_BUTTON2,MOUSE4_RIGHT_BUTTON"    ; point off-screen
InputAutoTrigger2 = 1

...

InputSystem =rawinput

I'm also launching the game like this:

Supermodel.exe -input-system=rawinput "...\lostwsga.zip"

...................

My god. The issue was that lost world uses controls for for "; Analog guns (Ocean Hunter, LA Machineguns)" too. You need to set the analog guns there. WTF!!

Link to comment
Share on other sites

Now the problems are:

  • When I aim at the center of the screen, the red cursor is far down to the bottom right. The red cursor + in game cursor are perfectly aligned. The X and Y control is just WAY off
  • My damn gamepads won't register ANYTHING when trying to configure their controls with raw input mode. I have no way to add coins or hit start now

Damn, this is really frustrating.

Edited by Hamburglin
Link to comment
Share on other sites

6 hours ago, Hamburglin said:

My god. The issue was that lost world uses controls for for "; Analog guns (Ocean Hunter, LA Machineguns)" too. You need to set the analog guns there. WTF!!

Lost World uses both analog_gun and gun and there is a difference between how they work. I would stick to analog_gun,

Have you switched to 4:3 mode in Gun4IR software or using your set hot key? You haven't said whether you did in game calibration. It matters, whether the crosshairs move initially or not.

Edited by Headrush69
fixed mistake
Link to comment
Share on other sites

21 minutes ago, Headrush69 said:

Lost World uses both analog_gun and gun and there is a difference between how they work. I would stick to gun,

Have you switched to 4:3 mode in Gun4IR software or using your set hot key? You haven't said whether you did in game calibration. It matters, whether the crosshairs move initially or not.

First of all, thank you for trying to help me.

The calibration just made it worse. I pointed the red crosshair at the squares perfectly, and now the game's crosshair is way off to the side somewhere when my red crosshair is in the middle of the screen. And of course the initial problem remains: when I look down the sights of the gun, it doesn't align with the red crosshair OR the newly tuned in-game crosshair. Every step is offset.

My gun4ir aspect ratio is set to content/133. This works perfectly in mame and sm2 with demulshooter. I also turned fullscreen off in supermodel3 ini to ensure that it's 4:3 aspect ratio and at 1024x768 resolution.

As for the gun vs analog_gun, I don't understand. Gun does not work at all when in rawinput mode. Only analog_gun settings do anything.

This does nothing at all: InputGunX = MOUSE4_XAXIS

This works: InputAnalogGunX = MOUSE4_XAXIS

Here is my gun configs. Again, InputGuns do NOTHING. The moment I remove InputAnalogGun stuff in rawinput mode, the guns cease to function. They don't control the crosshairs and don't react in gun tuning:

; Light guns (Lost World)
InputGunLeft = "KEY_LEFT"               ; digital, move gun left
InputGunRight = "KEY_RIGHT"             ; digital, move gun right
InputGunUp = "KEY_UP"                   ; digital, move gun up
InputGunDown = "KEY_DOWN"               ; digital, move gun down
InputGunX = "MOUSE4_XAXIS,JOY2_XAXIS"    ; analog, full X axis
InputGunY = "MOUSE4_YAXIS,JOY2_YAXIS"    ; analog, full Y axis
InputTrigger = "KEY_A,JOY2_BUTTON1,MOUSE4_LEFT_BUTTON"
InputOffscreen = "KEY_S,JOY2_BUTTON2,MOUSE4_RIGHT_BUTTON"    ; point off-screen
InputAutoTrigger = 1                    ; automatic reload when off-screen
InputGunLeft2 = "NONE"
InputGunRight2 = "NONE"
InputGunUp2 = "NONE"
InputGunDown2 = "NONE"
InputGunX2 = "KEY_T,MOUSE3_XAXIS,JOY3_XAXIS"    ; analog, full X axis
InputGunY2 = "MOUSE3_YAXIS,JOY3_YAXIS"    ; analog, full Y axis
InputTrigger2 = "JOY3_BUTTON1,MOUSE3_LEFT_BUTTON"
InputOffscreen2 = "JOY3_BUTTON2,MOUSE3_RIGHT_BUTTON"    ; point off-screen
InputAutoTrigger2 = 1

; Analog guns (Ocean Hunter, LA Machineguns)
InputAnalogGunLeft = "KEY_LEFT"               ; digital, move gun left
InputAnalogGunRight = "KEY_RIGHT"             ; digital, move gun right
InputAnalogGunUp = "KEY_UP"                   ; digital, move gun up
InputAnalogGunDown = "KEY_DOWN"               ; digital, move gun down
InputAnalogGunX = "MOUSE4_XAXIS,JOY1_XAXIS"    ; analog, full X axis
InputAnalogGunY = "MOUSE4_YAXIS,JOY1_YAXIS"    ; analog, full Y axis
InputAnalogTriggerLeft = "KEY_A,JOY1_BUTTON1,MOUSE4_LEFT_BUTTON"
InputAnalogTriggerRight = "KEY_S,JOY1_BUTTON2,MOUSE4_RIGHT_BUTTON"
InputAnalogGunLeft2 = "NONE"
InputAnalogGunRight2 = "NONE"
InputAnalogGunUp2 = "NONE"
InputAnalogGunDown2 = "NONE"
InputAnalogGunX2 = "MOUSE3_XAXIS,JOY1_XAXIS"    ; analog, full X axis
InputAnalogGunY2 = "MOUSE3_YAXIS,JOY1_YAXIS"    ; analog, full Y axis
InputAnalogTriggerLeft2 = "KEY_A,JOY1_BUTTON1,MOUSE3_LEFT_BUTTON"
InputAnalogTriggerRight2 = "KEY_S,JOY1_BUTTON2,MOUSE3_RIGHT_BUTTON"

Gun3 and 4 are my gunri4 guns.

Edited by Hamburglin
Link to comment
Share on other sites

5 hours ago, Hamburglin said:

The calibration just made it worse. I pointed the red crosshair at the squares perfectly, and now the game's crosshair is way off to the side somewhere when my red crosshair is in the middle of the screen. And of course the initial problem remains: when I look down the sights of the gun, it doesn't align with the red crosshair OR the newly tuned in-game crosshair. Every step is offset.

When doing the in game calibration you do NOT use the crosshairs to aim. You have to use the sights on the gun to aim at the squares and once complete aim should be better and the crosshairs should follow the sights now. (Assuming no other issues like screen ratio setting)

5 hours ago, Hamburglin said:

This does nothing at all: InputGunX = MOUSE4_XAXIS

This works: InputAnalogGunX = MOUSE4_XAXIS

Which probably means your Games.xml file has the wrong settings.

You need an entry like the following to use light gun mode and not analog gun mode:

Quote

 <input type="common" />
     <input type="gun1" />
     <input type="gun2" />
 </inputs>

Edit: Some additional info: difference between gun and analog_gun

Edited by Headrush69
Add more info.
Link to comment
Share on other sites

I switched the gun mode over but it's still having the same exact issue. I'm at a loss. There must be something super obvious I'm missing, or something unique with gun4ir I missed. 

Here are all of my settings:

https://ibb.co/ZHZns39
https://ibb.co/p1L9167
https://ibb.co/hC0jqYK
https://ibb.co/fG81973
https://ibb.co/gz9Y9VK

And this is what it looks like in game when I try to calibrate:

https://ibb.co/cgCjN5V

Where red cursor and blue in game dot is WAY OFF from where my gun is pointing, but aligned with each other.

Something else I just noticed is that the blue dot for the in-game coordinates will not go anywhere but the top left quadrant after calibrating to the middle of the screen:

https://ibb.co/PM8MwSM
https://ibb.co/xJPVJtw

Even stranger, if I point my gun to the top left corner, my gun's physical sights and the red cursor align, and if I calibrate that point as if it was center, then the blue square is actually centered! So yeah, any of the lightgun guns work perfect if I'm only aiming at the top left corner. By the time I aim down-right towards center, the actual crosshair is already at the bottom right of the screen. It's like the coordinates are getting multiple somehow. This problem exists in dinput too when using MOUSE. HOWEVER, if I use my real mouse, it does not have the weird acceleration/offset issue that my gun4ir guns do.......

https://ibb.co/zP8RzmZ

And just to prove that my gun4ir is setup correctly, here is the test screen with the aspect ratio set to fullscreen:

https://ibb.co/m9Jnw2c

And demulshooter's dsdiag:

https://ibb.co/wLbwCKN

Notice the physical sights aligns with the drawn crosshairs.

Edited by Hamburglin
Link to comment
Share on other sites

Went back to my notes and double checked and I had some parts backwards. In the process of checking for you I screwed up my settings, but the good news is starting fresh I was able to configure both guns again in both gun and analog_gun mode.

It's too late for me to go into details, but a few tips:

  • Doesn't matter whether you use analog_gun or gun in Games.xml, but there are differences. (not in configuration. I would go with analog_gun as that removes the onscreen flash needed for original CRT guns)
  • You don't need a separate Supermodel Lightgun emulator. You can have per game settings in Supermodel.ini. Just add a section 
    Quote

    [ lostwsga ]
    InputSystem = rawinput

    and rawinput will just be used for that game.

  • Start with a fresh configuration and delete lostwsga.nv in the Supermodel NVRAM folder and lostwsga.st* files in Saves folder.

  • Start the game from a command prompt and follow the instructions for configuring.

    Quote

    .\supermodel.exe -input-system=rawinput -config-inputs 'E:\Sega Model 3\lostwsga.zip'

  • Once the game starts, enter the in game service menu and calibrate the guns. Do not worry about the crosshair alignment in here., it can be wrong until all 5 points for each gun are done.

Generally WIndows has been stable with my mouse device ordering (They are always attached), but on the rare occasion that they stop working in game it usually means Windows changed the index and I need to adjust the index in Supermodel.ini.

Here is what my lostwsga section looks like in Supermodel.ini

Quote

[ lostwsga ]

SoundVolume = 125
Balance = 20
WideScreen = 0
Stretch = 0
WideBackground = 0
Crosshairs = 1
InputStart1 = KEY1_1,KEY3_1
InputStart2 = KEY1_2,KEY4_2
InputCoin1 = KEY1_5,KEY3_5
InputCoin2 = KEY1_6,KEY4_6
InputServiceA = KEY1_F5
InputTestA = KEY1_F7
InputAnalogGunLeft = NONE
InputAnalogGunRight = NONE
InputAnalogGunUp = NONE
InputAnalogGunDown = NONE
InputAnalogGunX = MOUSE4_XAXIS
InputAnalogGunY = MOUSE4_YAXIS
InputAnalogTriggerLeft = MOUSE4_LEFT_BUTTON
InputAnalogTriggerRight = MOUSE4_RIGHT_BUTTON,MOUSE4_MIDDLE_BUTTON,KEY3_DOWN
InputAutoTrigger = 1
InputAnalogGunLeft2 = NONE
InputAnalogGunRight2 = NONE
InputAnalogGunUp2 = NONE
InputAnalogGunDown2 = NONE
InputAnalogGunX2 = MOUSE5_XAXIS
InputAnalogGunY2 = MOUSE5_YAXIS
InputAnalogTriggerLeft2 = MOUSE5_LEFT_BUTTON
InputAnalogTriggerRight2 = MOUSE5_RIGHT_BUTTON,MOUSE5_MIDDLE_BUTTON,KEY4_F
InputAutoTrigger2 = 1

 

Link to comment
Share on other sites

10 minutes ago, Headrush69 said:

Went back to my notes and double checked and I had some parts backwards. In the process of checking for you I screwed up my settings, but the good news is starting fresh I was able to configure both guns again in both gun and analog_gun mode.

It's too late for me to go into details, but a few tips:

  • Doesn't matter whether you use analog_gun or gun in Games.xml, but there are differences. (not in configuration. I would go with analog_gun as that removes the onscreen flash needed for original CRT guns)
  • You don't need a separate Supermodel Lightgun emulator. You can have per game settings in Supermodel.ini. Just add a section 

    and rawinput will just be used for that game.

  • Start with a fresh configuration and delete lostwsga.nv in the Supermodel NVRAM folder and lostwsga.st* files in Saves folder.

  • Start the game from a command prompt and follow the instructions for configuring.

  • Once the game starts, enter the in game service menu and calibrate the guns. Do not worry about the crosshair alignment in here., it can be wrong until all 5 points for each gun are done.

Generally WIndows has been stable with my mouse device ordering (They are always attached), but on the rare occasion that they stop working in game it usually means Windows changed the index and I need to adjust the index in Supermodel.ini.

Here is what my lostwsga section looks like in Supermodel.ini

 

Thanks. Need to get some rest but will try this tomorrow.

Link to comment
Share on other sites

Man, I finally figured it out... I needed to:

  • Set the resolution to match my monitor: 2560x1440
  • Right click supermodel, go to properties, compatibility and check "Disable fullscreen optimizations"
  • "Change High DPI Settings" -> "High DPI Scaling Override" set to Application

Wow, that was frustrating!

Secondly, I can't figure out how to get gun4ir to work in 4:3 content aspect ratio of 133 with this, just like flycast. It's like they don't report or send 4:3 coordinates even if the game is always in 4:3. They send 16:9 coordinates which warps the aim the closer to the edges of the screen you are. But both emulators does work when the aspect ratio is set to fullscreen in gun4ir (which I don't want because I don't stretch the 4:3 games to 16:9).

Edited by Hamburglin
Link to comment
Share on other sites

6 hours ago, Hamburglin said:
  • Right click supermodel, go to properties, compatibility and check "Disable fullscreen optimizations"
  • "Change High DPI Settings" -> "High DPI Scaling Override" set to Application

Wow, that was frustrating!

Those will cause issues for sure.

6 hours ago, Hamburglin said:

Secondly, I can't figure out how to get gun4ir to work in 4:3 content aspect ratio of 133 with this, just like flycast. It's like they don't report or send 4:3 coordinates even if the game is always in 4:3. They send 16:9 coordinates which warps the aim the closer to the edges of the screen you are. 

This will need to be set on a per emulator basis. Some will require a switch to Content Aspect Ratio, others don't. You can do it with the Gun4IR app (remember to upload to gun), or using a designated button on your gun, or using a tool like SendSerial.exe to send the command to the gun to switch modes or a running script in LB. (This is easy using LB's Additional Applications to run before game and after to reset mode.)

6 hours ago, Hamburglin said:

But both emulators does work when the aspect ratio is set to fullscreen in gun4ir (which I don't want because I don't stretch the 4:3 games to 16:9).

I'm confused by what you mean here. Which emulators? It works with Full Screen Aspect ratio, but you actually stretching the image to 4:3?

The display size isn't necessarily what determines whether you need Content Aspect or not, it's based on specific emulators.  

For example MAME restrictions the mouse to the 4:3 aspect ratio so Content Aspect ratio is needed, where as Flycast standalone doesn't. Even though it's displaying in 4:3 aspect ratio (widescreen cheats off), it works perfectly fine left in Fullscreen Aspect ratio. Of course any in game calibration needs to be done once the correct aspect ratio is set.

Hope that helps.

Edited by Headrush69
Link to comment
Share on other sites

Yeah that's exactly what I'm saying. Mame and sm2 does the 4:3  aspect ratio mouse restriction well but flycast and super model 3 don't. They let the mouse go to the widescreen edges even when the game screen is only in 4:3 which means um forces to used fullscreen aspect ratio for thise emulators.

I'll look into using LB to set those with additional apps. I guess the problem with that approach is that the mouse devices and com ports might change order at some point.

Edited by Hamburglin
Link to comment
Share on other sites

13 minutes ago, Hamburglin said:

Yeah that's exactly what I'm saying. Mame and sm2 does the 4:3  aspect ratio mouse restriction well but flycast and super model 3 don't. They let the mouse go to the widescreen edges even when the game screen is only in 4:3 which means um forces to used fullscreen aspect ratio for thise emulators.

Ah. So you just don't want the crosshairs to go into the black borders or bezel area, even if it doesn't affect the game? I leave mine in Fullscreen mode and only change when needed. Not sure if it possible to restrict to Content aspect ratio when specific emulators are expecting full screen co-ordinates and adjusting themselves. I'll leave that to you to figure out. ☺️

20 minutes ago, Hamburglin said:

I'll look into using LB to set those with additional apps. I guess the problem with that approach is that the mouse devices and com ports might change order at some point.

You can set the COM ports to specific values in Device Manager. Even when the USB order may change, the COM port likely won't if set this way.

My Gun4IRs COM ports are set to COM5 and COM6 and have not changed ever. (>1 year)

I use a running script like this for MAME to switch to Content Aspect ratio and back to Fullscreen aspect ratio after the game is done:

Quote

Run, %COMSPEC% /C echo M3.1 > COM5
Run, %COMSPEC% /C echo M3.1 > COM6

Escape::
    Run, %COMSPEC% /C echo M3.0 > COM5
    Run, %COMSPEC% /C echo M3.0 > COM6
    ExitApp
return

 

Link to comment
Share on other sites

The crosshairs don't go into the bezel area. That part's fine.

The problem is that having gun4ir set to content aspect ratio of 133 (4:3) for those games makes the crosshair offset from your actual line of sight the closer you get to the edges. The crosshair is in the wrong position.

It's the same effect when you have gun4ir on 133 but go to the test screen and aim towards the sides of the screen, and there's no way to fix this in supermodel and flycast.

You're forced to use fullscreen aspect ratio in gun4ir which is a pain because mame and sm2 in their regular aspect ratios (and getting the cool bezels!) uses content aspect ratio of 133.

Anyways, I'll look into switching with additional apps!

Link to comment
Share on other sites

4 minutes ago, Hamburglin said:

The problem is that having gun4ir set to content aspect ratio of 133 (4:3) for those games makes the crosshair offset from your actual line of sight the closer you get to the edges. The crosshair is in the wrong position.

It's the same effect when you have gun4ir on 133 but go to the test screen and aim towards the sides of the screen, and there's no way to fix this in supermodel and flycast.

I think we are saying the same thing but in different ways.

Those emulators are expecting the gun co-ordinates in the ratio matching your display ratio. even when the actual game is only outputting 4:3. By forcing Content aspect ratio on, you are introducing those offset problems.

There is no way around the fact you have to switch. I find it's easier to stay in Full and switch to Content when needed, but to each his own.

I'm assuming you are using Demulshooter with SM2? I ask because I run at 4:3 and after in game calibration it works in Full screen aspect. (no need to switch)

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...