Main Restorations Software Audio/Jukebox/MP3 Everything Else Buy/Sell/Trade
Project Announcements Monitor/Video GroovyMAME Merit/JVL Touchscreen Meet Up Retail Vendors
Driving & Racing Woodworking Software Support Forums Consoles Project Arcade Reviews
Automated Projects Artwork Frontend Support Forums Pinball Forum Discussion Old Boards
Raspberry Pi & Dev Board controls.dat Linux Miscellaneous Arcade Wiki Discussion Old Archives
Lightguns Arcade1Up Try the site in https mode Site News

Unread posts | New Replies | Recent posts | Rules | Chatroom | Wiki | File Repository | RSS | Submit news

  

Author Topic: DemulShooter (Dual light gun on DEMUL, Model2, Dolphin, Silent Hill, etc...)  (Read 1244769 times)

0 Members and 4 Guests are viewing this topic.

argonlefou

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1060
  • Last login:Today at 02:03:31 pm
I've been testing Ultimate Trophy with Demulshooter and found two problems, maybe generated by my rare config:
If I press trigger at the beggining, in the "press any button" first screen, keyboard and mouse wont work, so I can't proceed to the game.
In Classic and Bonus modes, which are turn based if two players, player 1 works, but player 2 uses gun 2 coordinates but gun 1 buttons

I can't say about the "press any button" screen as I'm not interfering with menu/GUI controls....DS only acts on the hunting scenes

As for classic/bonus mode, I just fixed it in a new update.
As I explained to someone else regarding that issue :

Indeed, there was a mixup for turn-by-turn controls.

This is fixed in last v15.3 update.

Using DemulShooter will work that way :

    When playing simultaneous multiplayer mode, both P1 and P2 devices will be used for each player to have it's own gun
    When playing turn-by-turn multiplayer mode, only P1 device will be used for both player

I'm aware some would rather have separate devices for turn-by-turn, but this would prevent users having only 1 gun from playing turn-by-turn as DemulShooter cannot use the same device for different players

purbeast

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 159
  • Last login:Today at 06:07:24 pm
Is there any option with DemulShooter or any of it's supporting tools (like the GUI to set game specific controls) that will hide the mouse cursor when DemulShooter is hooked to the game?

I recently setup Friction and Silent Hill and both of those games when they load up, have the spinning cursor in front of the game and then it eventually turns into the arrow pointer, and it won't go away. 

I am trying to just hide it so it doesn't show up since this will be in a light gun cabinet where a mouse won't be easily available.

Thanks.

Unfortunately no, as those mouse cursor are not handled by the game window but system wide.
There's a tool for that purpose, it's called "nomousy" and you can find it here and there on the internet
It will show/hide cursos system wide in windows

Unity game are a specific case, where unity engine has embedded code to hide/show those cursor,so it is possible to use it to force/hook/mod cursor visibility

Okay thanks I will check this out later.  I'm running both of those games via a bat file too so I think I can just add the hide/show commmands in there.

DMB77

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 79
  • Last login:April 21, 2025, 05:26:50 pm
I have an issue with Big Buck Hunter - Ultimate Trophy the crosshairs are aligned fine in all the menus, but once I'm in the game, it's off to left, messing up my aim.  Anyone else experienced this or know how to fix it?

Edit:  Updating to 15.3 fixed it.  Thanks Argon!
« Last Edit: April 21, 2025, 05:27:39 pm by DMB77 »
Fate flies in fear of the moment

purbeast

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 159
  • Last login:Today at 06:07:24 pm
Okay great that nomousy.exe worked for me.

Now I'm running into another issue with Silent Hill: The Arcade, and I don't think this really is demulshooter specific but thought I'd ask here since I'm using that to set the exit keys.

I have a custom exit key set in HyperSpin so that I hold down P2 start button on my cabinet for 2 seconds to go back to HyperSpin from a game in an emulator.

I have 2 PC game I'm launching through Hyperspin - Friction and SH - and I have Friction quit key set to F12.

When I hold P2 start for 2 seconds, Friction quits no problem and goes back to HyperSpin back to the wheel,.

Now with Silent Hill, when I hold P2 for 2 seconds, it goes back to HyperSpin, however the SH executable freezes up and the "game over" image screen just hangs in the view of the SH window, and this is overtop of HyperSpin at this point.

I have tried setting Silent Hill exit key to both ESCAPE and then I set it to F12 to have it match Friction, and this behavior happens no matter which key I have set for escape.

I'm just curious if anyone has any idea how this can be solved for Silent Hill in tandem with HyperSpin/RocketLauncher.

EDIT:

I tried turning fade out off, and that solves the issue but it doesn't look super clean.  I may play around with it a bit more.
« Last Edit: April 21, 2025, 06:14:03 pm by purbeast »

argonlefou

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1060
  • Last login:Today at 02:03:31 pm
I'll pass on that one, not using any of these frontends

purbeast

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 159
  • Last login:Today at 06:07:24 pm
I am not sure why but with Virtua Cop 2 on the m2 emulator, it is like the buttons or tracking or something gets messed up for me.

I went into the gun calibrations and I can see it tracking perfectly there.

It seems to stem when I'm playing when I go to shoot offscreen to reload sometimes, and it doesn't actually reload.  Instead the revolver clip just kinda spins around with the bullets still in there.

And it stays in this weird state until I can get a real reload or something like that, and then the tracking works perfect when I'm shooting on screen again until I am out of bullets.

I have noticed that sometimes if I do a quick double trigger pull to reload offscreen that reload works but I can still get into this weird state.

Has anyone experienced this before?  I don't have this issue on either Virtua Cop 1 or House of the Dead.

purbeast

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 159
  • Last login:Today at 06:07:24 pm
Speaking of Virtua Cop, I got Virtua Cop 3 working on chihiro and everything is working great with demulshooter.

I was wondering though if anyone knows what the bullet time button the controller is. 

My gun only has button 1 and button 2 - shoot on screen and off screen - so I don't have the 3rd mouse wheel button on my controller.  I do however have a pedal and wanted to map my pedal to whatever button controls the bullet time if it's possible.  I tried figuring it out but so far no luck.  I have my p1 start button on my cab mapping to the start button on the controller and that works fine.  My pedal is mapped to the V button via a JPAC interface if that matters.

Thanks.

argonlefou

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1060
  • Last login:Today at 02:03:31 pm
Speaking of Virtua Cop, I got Virtua Cop 3 working on chihiro and everything is working great with demulshooter.

I was wondering though if anyone knows what the bullet time button the controller is. 

My gun only has button 1 and button 2 - shoot on screen and off screen - so I don't have the 3rd mouse wheel button on my controller.  I do however have a pedal and wanted to map my pedal to whatever button controls the bullet time if it's possible.  I tried figuring it out but so far no luck.  I have my p1 start button on my cab mapping to the start button on the controller and that works fine.  My pedal is mapped to the V button via a JPAC interface if that matters.

Thanks.
I don't have all the details by memory but as DemulShooter is handling the Bullet Time command with the middle click button, chances are high that it's been disabled (orverwritten) from the native buttons procedure.

If that's the case, the easiest thing you can do is enabling Virtual Buttons in DemulShooter GUI for your Lightgun, then mapping the middle click button to [V] (your pedal keyboard key)
That way your pedal should trigger DemulShooter's middle click event (even if you don't have a 3rd button on your lightgun)
« Last Edit: April 27, 2025, 03:46:35 am by argonlefou »

purbeast

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 159
  • Last login:Today at 06:07:24 pm
Speaking of Virtua Cop, I got Virtua Cop 3 working on chihiro and everything is working great with demulshooter.

I was wondering though if anyone knows what the bullet time button the controller is. 

My gun only has button 1 and button 2 - shoot on screen and off screen - so I don't have the 3rd mouse wheel button on my controller.  I do however have a pedal and wanted to map my pedal to whatever button controls the bullet time if it's possible.  I tried figuring it out but so far no luck.  I have my p1 start button on my cab mapping to the start button on the controller and that works fine.  My pedal is mapped to the V button via a JPAC interface if that matters.

Thanks.
I don't have all the details by memory but as DemulShooter is handling the Bullet Time command with the middle click button, chances are high that it's been disabled (orverwritten) from the native buttons procedure.

If that's the case, the easiest thing you can do is enabling Virtual Buttons in DemulShooter GUI for your Lightgun, then mapping the middle click button to [V] (your pedal keyboard key)
That way your pedal should trigger DemulShooter's middle click event (even if you don't have a 3rd button on your lightgun)

Awesome thanks I will give that a go later on.

And yeah you are correct that the middle mouse button is mapped to it.

When I was messing with mapping the controller to other keys, the Y button on the controller reloads, which is mapped to the right click button on the mouse.  So I thought that you could use both bindings on the controller as well as the default mouse button.

purbeast

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 159
  • Last login:Today at 06:07:24 pm
Okay I am a bit confused as to how to set the virtual button to the keyboard but also have my joystick set for my lightgun for P1 device.

It seems like from the GUI if I pick the Keyboard device, and set virtual mouse middle button to V, then I have to save it with the keyboard set as the device.  In that case, my guns don't work since I don't have the joystick set for the P1 device. 

I tested it out with the keyboard set as the device and the pedal does in fact do the bullet time as expected, but my guns aren't working since the joystick is not set to the device.

The I tried switching back to my joystick for the gun while having the virtual key set in the keyboard config, but then just the guns/tracking works fine and the pedal doesn't.

Am I missing something as to how you can mix these configs?

argonlefou

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1060
  • Last login:Today at 02:03:31 pm
Oh....sorry this is my fault, I (wrongly) assumed that your gun was an IR-based gun

It looks like you have an analog-based mounted gun, if you have to choose a joystick like Device

Unfortunately, virtual buttons were not added for that kind of device....only for mouse-alike guns😞

purbeast

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 159
  • Last login:Today at 06:07:24 pm
Yeah I have a pretty unique setup with my happ 45 guns running on a USB2GUN board which makes Windows see actual light guns as analog sticks.

Thanks though I will see if I can find some kind of "key2mouse" type of thing to map my V key to the middle mouse button for this.

purbeast

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 159
  • Last login:Today at 06:07:24 pm
I came across this application called NeatMouse which maps keys to mouse buttons, and I am able to map my pedal (V) to the middle click. 

It works fine and dandy when I test it out in the desktop and in the browser and stuff, but for some reason when I try to use it in Virtua Cop 3 it doesn't work as intended.  It is acting as though I am not pressing the middle click button and just nothing happens.  I've tried it with not just the pedal V key but also other keys, and it is the same behavior.   And when I exit the game, NeatMouse is still running and the key acts as if the middle mouse button is being pressed on the desktop and everything.

I tried making NeatMouse open both before and after DemulShooter and it's the same behavior.

Do you think there is some sort of conflict between Demulshooter and the NeatMouse application?

purbeast

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 159
  • Last login:Today at 06:07:24 pm
argonlefou do you know if demulshooter will hook into vcop3_t.xbe?  Or does it only hook if you load up vcop3.xbe?

The reason I am asking is because in the cxbx input config, I set all of the ABXY buttons.

A = shoot
B = reload
X = change weapon
Y = pedal

I verified this by loading up vcop3_t.xbe and going into the input test option.  I set Y = V in my config, and when I press my pedal, the pedal switch turns to "ON".

However when I try to actually play the game via vcop_t.xbe, it crashes as soon as the level starts.

So after having all of that setup, I then tried loading vcop3.xbe and seeing if the pedal would actually do what it should do - the bullet time.

However, when launching with vcop3.xbe, pressing the pedal instead is reloading for me.

When I load both of these, I am running DS prior to it.

So when I am in vcop3_t.xbe and testing the input, with Y on the controller set to V, pressing V makes the pedal switch get pressed.  But when I have Y on the controller set to V when playing the actual game with DS hooked in, pressing V reloads.

I took some videos showing this however that was before I remembered it's a completely different xbe file being loaded, so maybe DS isn't being hooked into the test menu one.

EDIT:

So I did confirm that it does in fact hook into vcop3_t.xbe because I tried it on my higher res monitor so I can see the desktop, and I see it green in the bottom right when it's running.

Below are my 2 videos showing that in vcop3_t.xbe it appears that the Y mapping in CXBR to key V actually pushes the pedal button, but as you will see in the actual vcop3.xbe in the game, the Y mapping in CXBR to the V key is reloading.

vcop3 test menu - https://www.youtube.com/shorts/Sn4DvEzG2dA

vcop3 game play - https://www.youtube.com/shorts/3Th14WfIRS0

EDIT 2:

Just to clarify, NeatMouse is not running in reference to this post.  It's not running at all when those videos were take and when I'm seeing this behavior.
« Last Edit: April 28, 2025, 10:08:06 pm by purbeast »

argonlefou

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1060
  • Last login:Today at 02:03:31 pm
I came across this application called NeatMouse which maps keys to mouse buttons, and I am able to map my pedal (V) to the middle click. 

It works fine and dandy when I test it out in the desktop and in the browser and stuff, but for some reason when I try to use it in Virtua Cop 3 it doesn't work as intended.  It is acting as though I am not pressing the middle click button and just nothing happens.  I've tried it with not just the pedal V key but also other keys, and it is the same behavior.   And when I exit the game, NeatMouse is still running and the key acts as if the middle mouse button is being pressed on the desktop and everything.

I tried making NeatMouse open both before and after DemulShooter and it's the same behavior.

Do you think there is some sort of conflict between Demulshooter and the NeatMouse application?
No conflict, simply expected behavior

The whole point of DemulShooter and RawInput is to read input directly from the controller (thus beeing able to separate them, which is something Windows is not doing for mice).
So using Autohotkey, or any other mouse-simulating program (NeatMouse seems to be that kind, although I don't really know it) will never trigger anything if DemulShooter has some kind of "Mouse" device selected because those simulated inputs are not comming from the real device.

The virtual keys options were made for that purpose, as 10+ years ago Lightgun options were very, very limited (mostly EMS TOP GUN, and some Aimtrak.) and some only had a trigger and no extra button.
Listening to Keyboard events (even virtual, coming from AHK or IPAC devices) helped binding necessary buttons when Lightgun only had a trigger.

But, again, as your Lightguns are detected as HID controllers (Joystick) in DemulShooter_GUI, all of this stuff do not apply because .....well it was not designed to : Joypad support was added mostly for WiiMotes/Joypads having a whole lot of buttons so adding virtual keys was not needed.
Aliens Arcade analog mounted gun are nowadays also very popular but they also have extra buttons.
So selecting a HID device in DemulShooter_GUI will make DemulShooter listen to this device and use the mapped buttons for Shoot/Reload/Action
Mouse is not used at all in that case

Going back to Cxbx-Reloaded, I had a short time to test on my computer and :
- Native button in emulator input is Triggers - LEFT (just tried with MS controller Duke) to activate Bullet Time in Vcop3
- And yes, using DemulShooter will override Trigger/Reload/Bullet Time original inputs so that it can inject custom values, so these 3 buttons will not work anymore once DemulShooter is hooked

So, unfortunatelly, you have a very specific setup which - in the current state - will not allow you to map a keyboard/pedal/virtual button to that specific action....


purbeast

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 159
  • Last login:Today at 06:07:24 pm
No conflict, simply expected behavior

The whole point of DemulShooter and RawInput is to read input directly from the controller (thus beeing able to separate them, which is something Windows is not doing for mice).
So using Autohotkey, or any other mouse-simulating program (NeatMouse seems to be that kind, although I don't really know it) will never trigger anything if DemulShooter has some kind of "Mouse" device selected because those simulated inputs are not comming from the real device.

The virtual keys options were made for that purpose, as 10+ years ago Lightgun options were very, very limited (mostly EMS TOP GUN, and some Aimtrak.) and some only had a trigger and no extra button.
Listening to Keyboard events (even virtual, coming from AHK or IPAC devices) helped binding necessary buttons when Lightgun only had a trigger.

But, again, as your Lightguns are detected as HID controllers (Joystick) in DemulShooter_GUI, all of this stuff do not apply because .....well it was not designed to : Joypad support was added mostly for WiiMotes/Joypads having a whole lot of buttons so adding virtual keys was not needed.
Aliens Arcade analog mounted gun are nowadays also very popular but they also have extra buttons.
So selecting a HID device in DemulShooter_GUI will make DemulShooter listen to this device and use the mapped buttons for Shoot/Reload/Action
Mouse is not used at all in that case

Going back to Cxbx-Reloaded, I had a short time to test on my computer and :
- Native button in emulator input is Triggers - LEFT (just tried with MS controller Duke) to activate Bullet Time in Vcop3
- And yes, using DemulShooter will override Trigger/Reload/Bullet Time original inputs so that it can inject custom values, so these 3 buttons will not work anymore once DemulShooter is hooked

So, unfortunatelly, you have a very specific setup which - in the current state - will not allow you to map a keyboard/pedal/virtual button to that specific action....

Thanks for the detailed explanation.

Do you know why the Y button would act differently for me in vcop3 versus the vcop3_t option, with demulshooter hooked in?  As in, vcop3 the Y mapping reloads for me whereas in vcop3_t it actives the pedal?

You also mention that the 3 buttons will not work anymore, however the reload button mapping seems to be the only one of the 3 that still works for some reason.  Is THAT actually a bug and it shouldn't be happening?

You do mention using a Duke controller.  I do remember I did pick the Microsoft S controller when I was testing it.  I wouldn't think that the controller type, since they are both Xbox, would have different mappings for bullet time.

Initially I was using v10.15.1 I believe but then I also tried the most recent version and had the same behavior.

EDIT:

The thing that stinks too is it seems cxbx has native joystick controller as well with my device, however it doesn't appear there is a way I can have a mixed input config where I use my gun AND keyboard.  When I was messing with this however, it did seem like the accuracy was better with DS being hooked in rather than using the cxbx joystick support.  I don't know if it was actually different accuracy wise or if it was because I had the cursor still showing when I first did that and it was just messing with me.
« Last Edit: Yesterday at 07:38:48 am by purbeast »

purbeast

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 159
  • Last login:Today at 06:07:24 pm
Well thanks to DemulShooter being open source, I took a look at the code for vcop3 and figured out where things had to be changed to de-hook the bullet time button, and my buddy who knows ASM looked at it and figured out the line of code I could change to make it not look for bullet time in DS.

So now I got a custom build of it where I can use my pedal for bullet time and it is working perfectly!

Thanks again for all the hard work.  Looking at that code I am like damn.  I am a web developer so that stuff is pretty foreign to me.