Jump to content
LaunchBox Community Forums

Guide: Cheap Arcade Light Guns with Touchemote


Recommended Posts

On 8/1/2021 at 10:08 AM, ThePolish said:

Joystick re-numeration - the constant struggle

As many of us know, once this is set up, after a reset, or at random, new controllers connected, disconnected, you'll have to rebind EVERYTHING to make gun one be gun one again, and all the different user defined options (Trigger, X axis, Y axis, coin, start, etc etc etc). I came across a post on another forum which went over this issue for the flight sim crowd. A application called JOYID seems to fit the bill for what causes this for us. Seems pretty easy to use. I'm using it now and will report if successful (hopefully). I've also archived the link to the download on archive.org  should it ever go down.

Here's some info I posted on Hyperspin 6 years ago.. My God, has it been that long?

There are several different ways in which emulators can decide the order of controllers. It is possible to change all of them if you know the trick. I keep meaning to write a tutorial about it, but never get around to it.

 

1st is the Windows built in Joystick ID number, which can be changed using JoyID.

2nd is the order in which they appear in Device Manager. This will be by type first, and then alphabetically. This can be changed in the registry, but is tricky and requires changing permissions. Also, they will be reset if you ever change the drivers or usb port.

3rd is also the order in which they appear in device manager, but this time when you select show devices by connection. This order is determined by which USB port they are attached to and also the order they are detected by Windows. This can be changed by changing USB ports, or connecting the controllers in a specific order. In order for the order to be reset, the drivers have to be reinstalled each time. (i.e, just unplugging it and plugging it in again will not change the order.

 

However, with MAME supporting fixed controller mappings, none of this should be necessary...

Edited by Tomkun
Formatting
  • Thanks 1
Link to comment
Share on other sites

Posted (edited)
4 hours ago, Tomkun said:

However, with MAME supporting fixed controller mappings, none of this should be necessary...

Good info and I think I actually came across that in years past (meaning wherever you had written that before!).

While for MAME, yes. But I think supermodel3 doesn't support this so we'd still have the same issue.

On a funny note I wrote all the update the other day and got everything set up, only to have my dolphin bar decide to die. Thinking it needs reballed as taking a heatgun to it fixed it temporarily.  I ended up ordering another as I really don't want to spend the time screwing around with it!

Next stop - working on multiple mice cursors instead of joystick for gun # 2!

Edited by ThePolish
Spelling
Link to comment
Share on other sites

Best way I've found is to forget about mouse emulation. Use joystick emulation instead. I have Supermodel working here, so let me figure out how I have it set up. 

 

Here's the relevant part of the config file for Supermodel:

; Light guns (Lost World)
InputGunLeft = "NONE"               ; digital, move gun left
InputGunRight = "NONE"             ; digital, move gun right
InputGunUp = "NONE"                   ; digital, move gun up
InputGunDown = "NONE"               ; digital, move gun down
InputGunX = "JOY1_XAXIS"    ; analog, full X axis
InputGunY = "JOY1_YAXIS"    ; analog, full Y axis
InputTrigger = "JOY_BUTTON2"
InputOffscreen = "JOY_BUTTON1"    ; point off-screen
InputAutoTrigger = 1                    ; automatic reload when off-screen
InputGunLeft2 = "NONE"
InputGunRight2 = "NONE"
InputGunUp2 = "NONE"
InputGunDown2 = "NONE"
InputGunX2 = "JOY2_XAXIS"
InputGunY2 = "JOY2_YAXIS"
InputTrigger2 = "JOY2_BUTTON2"
InputOffscreen2 = "JOY2_BUTTON1"
InputAutoTrigger2 = 1

; Analog guns (Ocean Hunter, LA Machineguns)
InputAnalogGunLeft = "NONE"               ; digital, move gun left
InputAnalogGunRight = "NONE"             ; digital, move gun right
InputAnalogGunUp = "NONE"                   ; digital, move gun up
InputAnalogGunDown = "NONE"               ; digital, move gun down
InputAnalogGunX = "JOY1_XAXIS"    ; analog, full X axis
InputAnalogGunY = "JOY1_YAXIS"    ; analog, full Y axis
InputAnalogTriggerLeft = "JOY1_BUTTON2"
InputAnalogTriggerRight = "JOY1_BUTTON1"
InputAnalogGunLeft2 = "NONE"
InputAnalogGunRight2 = "NONE"
InputAnalogGunUp2 = "NONE"
InputAnalogGunDown2 = "NONE"
InputAnalogGunX2 = "JOY2_XAXIS"
InputAnalogGunY2 = "JOY2_YAXIS"
InputAnalogTriggerLeft2 = "JOY2_BUTTON2"
InputAnalogTriggerRight2 = "JOY2_BUTTON1"

So yeah, use Touchmote to emulate 360 controllers and use this setup. Works great!

If you haven't done it yet, I highly recommend taking the time to set up the custom version of Touchmote posted earlier in this thread. Makes the Wiimotes near line of sight accurate.

Edited by Tomkun
Link to comment
Share on other sites

Posted (edited)
20 hours ago, Tomkun said:

If you haven't done it yet, I highly recommend taking the time to set up the custom version of Touchmote posted earlier in this thread. Makes the Wiimotes near line of sight accurate.

Thanks @Tomkun , I have not yet done the setup, however I saw @spacorn posted a compiled binary so I did download this and tried it but it doesn't seem to work for me on Windows 10. I will work though getting it compiled myself and then use the readme to set up the json. I totally forgot about this modification after I had requested a binary way early on (2017 lol) and life got in the way. I'll get this set up hopefully soon and look forward to the ease of just setting sticks!!

 

Edited by ThePolish
info on posted binary
Link to comment
Share on other sites

Strange...  It works fine here on my Windows 10 setup.  I remember there was some faff about drivers when I set it up, so I had to get them from somewhere else... don't remember where, sorry.

Let me know if you have trouble setting it up and I'll zip up my folder and send it to you along with the keymaps I use. I also use the Wiimotes as steering wheels for a lot of the simpler driving games.

  • Thanks 1
Link to comment
Share on other sites

41 minutes ago, Tomkun said:

Strange...  It works fine here on my Windows 10 setup.  I remember there was some faff about drivers when I set it up, so I had to get them from somewhere else... don't remember where, sorry.

Let me know if you have trouble setting it up and I'll zip up my folder and send it to you along with the keymaps I use. I also use the Wiimotes as steering wheels for a lot of the simpler driving games.

From reading, the drivers get installed from the actual touchmote release they had put on the main website, but i'm not sure. Once I get VS 2013 installed I'll see if that's the case. It apparently CAN'T be built using VS 2019.

 

 

 image.thumb.png.4695381624429cd6bafc12c2f9df74da.png

Link to comment
Share on other sites

For the life of me I can't get this to build without errors. Part of the problem is I'm not extremely well versed in coding/building, but still, it shouldn't be THAT crazy to fix.

I installed VS 2019 and upgraded the build folder, errors, touchmote will run, but it is missing "left stick" (only shows left stick x and left stick y") no idea why. It also won't let me reassign the pointer to your .json or any new ones I create, and it will only let me assing "mouse pointer" to pointer on default. Really strange behavior.

 

image.thumb.png.fe0d085018193c908ae91c223c29e938.png

I got VS 2013, tried again without upgrading to new build tools, same issues.

As cool as it sounds to use the modified method, I just don't have the patience to keep running myself in circles on this, but I'm really glad others have got it to work!

Link to comment
Share on other sites

On 8/4/2021 at 8:15 PM, Tomkun said:

Let me know if you have trouble setting it up and I'll zip up my folder and send it to you along with the keymaps I use. I also use the Wiimotes as steering wheels for a lot of the simpler driving games.

If you would be so kind, I'll definitely take you up on that zip. It's either my  build environment  that is causing issues or and the driver version I'm using (since I'm installing touchmote first using the latest release for the driver which is 15b I think). I'd like to see if yours will run out of the gate, if not I'm going to try to find the older installer and start fresh from that.

Link to comment
Share on other sites

14 minutes ago, Tomkun said:

Sure thing! 

 

 

Well, it works! Other than this weird thing that happens upon launch (which if I minimize and pull back up from the taskbar it becomes normal size). That tells me it is certainly something I'm doing wrong trying to build it and not the driver. Very odd indeed. 

I will say your build seems to work right out of the box for my setup (46" tv, roughly 6 feet away) using one controller, for P1, Its getting too late for me on a sunday night to keep messing with it but this puts me on the right track to get setup again, but better!

The one thing I'm noticing is binding in mame is finicky, but that's probably an issue on my end. I have quite a bit more to play with but you're NOT kidding when you say it's smooth using the stick.

 

Very much appreciated! 

image.png

Link to comment
Share on other sites

The problem with MAME is that it will default to Xinput and in Xinput there is no way to differentiate controllers except by order.

However, if you force MAME to use Dinput, we can work out controllers by their HWID. That way, you can use MAME's built in fixed controller mappings.

Take a look at this ctrlr file that I made (attached below). When I play a lightgun game, I force MAME to use Dinput and map the emulated Xbox 360 controllers to MAME Joysticks 11 and 12 (by making them high up, they are never accidentally bumped out of the way by other devices.)

I hope that makes sense!

mycontrols.cfg

  • Game On 1
Link to comment
Share on other sites

Hi!

Sure, I don't mind sharing it. Some caveats though...

First, it was written by me for my system. There are a lot of paths and things that are only relevant to me. I'll go through it and replace them with variables.

Second, it's due a rewrite. Since Launchbox now supports controller profiles, a lot of the script (detecting lightgun games) is irrelevant now.

Third, I'm sure there are parts of it that could be done more neatly or efficiently.

I'll get onto it once I have some time!

  • Game On 1
Link to comment
Share on other sites

Posted (edited)

@Tomkun oh. my. gosh. Once I dialed in the settings in the json - WOW 

I used the same for all wiimotes on my end, seems to work well on a 46" playing about 3 meters away, with the sensor on the bottom.

  "pointer_limit_top": 0.1,
  "pointer_limit_bottom": 0.5,
  "pointer_limit_left": 0.2,
  "pointer_limit_right": 0.7,

 

Now, I do have a question regarding the way you have the batch file set up for the settings - essentially it's not necessary to do that (from your folder, I DID find it interesting though) right? you can just modify the settings.json with the values and that is what auto loads. The batch file just replaces the settings.json's contents with the other named files? So for instance I modified the batch to make "3" go to "big buck hunter.json" "settings.json" and its just putting the values from my named file to the default file? I think that is what is going on anyway.

Either way THANK YOU again, you and everyone else who has tried your modified version aren't kidding when they say this is the way to go. I got a WII Cabela's Big Game Hunter 2012 box from the thrift store today with that nice pump shotgun (and they even were nice enough to leave the wiimote in it haha) and set everything up (using the mouse to get it dialed in like you said earlier in the thread) and this is AMAZING.

 

Now to learn how to use that whole MAMEdevice mapping! 

Side note, this thread is now 5 years old hahahahahaha LONG LIVE WIIMOTE LIGHTGUNS! ?

 

Edited by ThePolish
so bad at proof reading, very ashamed
Link to comment
Share on other sites

Which batch file are you talking about? The one that switches aspect ratio? The reason that exists is because some (most?) lightgun games are in a 4:3 aspect ratio, whereas others are in 16:9, so the accuracy can be off especially at the edges. This doesn't effect MAME, but it can effect DemulShooter if you use that.

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
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...