Jump to content
LaunchBox Community Forums

Guide: Cheap Arcade Light Guns with Touchemote


Recommended Posts

On 11/5/2018 at 1:20 AM, Tomkun said:

Which emulator(s) are you having trouble with IDs?

When I started using my wiimotes as lightguns, there were a few issues that I needed to overcome. In order of severity, they were:

1. The LEDs on the Dolphinbar could easily burn out if left on.

2. The IDs were not predicatable and therefore couldn't be reliably configured.

3. Different aspect ratios require different configurations in Touchmote.

To overcome these issues I used EventGhost. I wrote a script which would:

1. Use Devcon to turn off the Dolphinbar when not in use to save the LEDs.

2. Again, use Devcon to ensure that the controllers were all installed in the correct order and therefore have predictable IDs.

3. Detect the aspect ratio of a game and switch the Touchmote configuration to match.

Since creating the script, I have had zero issues. In fact, since MAME added stable controller IDs, I have removed the 2nd part of the script as it's no longer necessary. I've also improved it so that it will now also launch Demulshooter with the correct parameters if required. Over time, the script has become more and more complicated as I've added extra functions, but it serves me well. Now when I launch a game it will:

1. Detect which game has been launched. Whether or not it requires Demulshooter and what the Aspect ratio is.

2. Copy the correct aspect ratio configuration to Touchmote.

3. Switch on the Dolphinbar.

4. Launch Touchmote.

5. Pop up an OSD telling me to connect the Wiimotes.

6. When it detects the Wiimote(s), check if any other controllers are enabled and if so quickly disable/enable them so that the Wiimote(s) always take ID 1 and 2.

7. Launch Demulshooter with the correct parameters (if required).

8. Launch the game.

If anyone's interested in it, I'll gladly post it.

This looks really interesting. I am not well known in scripting. But I would like to have a go at this. Are you still willing to post it for me?

Link to comment
Share on other sites

1 hour ago, Tomkun said:

I am very happy to post it. Are you familiar with EventGhost?

I am also looking at writing an AHK/Plugin for Launchbox. If I can get that working it'll be even easier.

I installed EventGhost a few days ago and played around with it a bit, but I am not getting very far. I tried to make touchmote start and close when Mame started and closed but was not very successful. I have not written any scripts before but I would like to start. I interests me a lot.

 

I think A plug-in for Launchbox would always be a welcome addition. This topic is great, it takes a bit of fiddling but once setup it works really well for lightgun games. Anything that makes this process smoother would be more than welcome!

Link to comment
Share on other sites

Hi again. I have been trying Autohotkey  the last few days. Getting close but I just cannot get it to automate Touchmote to open and close every time Mame opens and closes.

The Script works if I replace Touchmote with say, Notepad.exe or a different app which needs admin rights but never when using Touchmote. It just sends endless message boxes that say touchmote is already running. I have been going through tutorials and looking for examples online.

I am completely new at this and could use a push in the right direction.

 

Also, any ideas on dealing with the UAC prompt when opening Touchmote whilst in Launchbox/Bigbox?

 

I hope it is ok for me to ask advice in this thread , if not let me know and i will ask for advice else where.

 

#NoEnv  ; Recommended for performance and compatibility with future AutoHotkey releases.
; #Warn  ; Enable warnings to assist with detecting common errors.
SendMode Input  ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir%  ; Ensures a consistent starting directory.


if not A_IsAdmin
{
   Run *RunAs "%A_ScriptFullPath%"  ; Requires v1.0.92.01+
   ExitApp
}

#Persistent
#NoEnv
SetTimer, CheckProcesses, 1000 ; check for process status change every second
Return

CheckProcesses:

	;-------------------
	; Mame / Touchemote
	; ------------------
	
	Process, Exist, mameuifx64.exe ; change this to be whatever your process name is
	mameuifx64PID := Errorlevel
	
	Process, Exist, D:\Emulators+\Lightguns\Touchmote\Touchmote.exe ; change this to be whatever your process name is
	TouchmotePID := ErrorLevel

	if ( mameuifx64PID )
	{
		If ( !TouchmotePID )
			Run, D:\Emulators+\Lightguns\Touchmote\Touchmote.exe
	}
	else
		Process, Close, %TouchmotePID%

Return

^x::ExitApp

 

Link to comment
Share on other sites

On 5/27/2018 at 5:47 PM, elements604 said:

Thanks for the reply. Overall Touchmote works, however I ran into a couple of other issues. Anyone else experiencing the same?

I setup lauchhbox to load the touchmote app before entering a light gun game and then kill it after exit a game (the reason why is because I need 4 xinput devices available for other systems when not playing light guns) . 

1) when touchmote loads before the mame game, it causes mame 0.174 to lose focus  causing me to pick up the mouse to click on mame, and when I go back into mame I cant see anything(black screen) without restarting the game, same happens if I hold the home button on the wii mote software to switch profiles , mame needs to be restarted. 

2) After 5 to 10 min of inactivity Touchmote seems to lose the profile on the wiimote and it needs to be reset.

 

3) I had trouble with games like lethal enforcers for player 2(xbox 360 joystick) shooting off the screen as when it gets to the edge of the screen it kind of loses focus some how. I think this can be solved though with a reload button I have to look as I didn't see one in the menu. ( I set off screen reload button 2 in the main options. otherwise its surprising how well the joystick works as a cursor.

 

Other than those 2 issues I am really impressed, I played time crisis with my wiimote gun and disabled the cursor which made it feel a lot better. I just wish I could get it to load up a little smoother. 

 

 

Hi Elements604, have you ever found a fix for your first (1) problem?

After asking some help I finally found a few different solutions to use AHK to open and close Touchmote automatically when Mame starts and ends. It works perfect outside of Launchbox but I run into your exact problem when launching from launchbox. It seems to lose focus and goes to either a black game screen or a complete crash.

 

 

Link to comment
Share on other sites

  • 4 weeks later...
On 1/3/2019 at 8:27 AM, mssngr said:

Hi Elements604, have you ever found a fix for your first (1) problem?

After asking some help I finally found a few different solutions to use AHK to open and close Touchmote automatically when Mame starts and ends. It works perfect outside of Launchbox but I run into your exact problem when launching from launchbox. It seems to lose focus and goes to either a black game screen or a complete crash.

 

 

Hey I believe i did fix the problem. I am using mame 0.197 (not sure if newer or older versions work (likely do) with d3d. Im not sure what the exact problem is but I believe trying different version of mame fixed it for me. 

Link to comment
Share on other sites

  • 2 months later...

Hi for anyone who wants to launch and exit touchmote in launchbox, I just use a simple batch file and use pskill to exit touchmote.

 

One thing I did have to do was create a shortcut to Touchmote and run the lnk from the batch file, works fine for me.

Link to comment
Share on other sites

So I've read all the posts here and seen at least one person have the same problem as me, but didn't see a solution. I have the latest Mayflash Dolphinbar with genuine Wii motes and Touchmote 1.0 beta 15 loaded in Windows 10. I'm trying to get some MAME .205 lightgun games to work. I find that the X-Y control of the cross-hairs works in Mode 2, but A and B buttons return the same code so cannot be mapped separately in MAME. This is a shame as my gun case has two triggers, one for A, the other for B. In mode 4, re-mapping the wii mote buttons works in Touchmote and I can assign A and B buttons separately in MAME, but the X-Y control is not picked up at all by MAME. This seems strange, as I can see the Windows cursor moving around just fine with the Wii mote in mode 4 when in Mame mapping dialogue but it is not recognized by Mame. 

Any ideas what I can do to get X-Y analogs to work in mode 4, as I assume I need to be in mode 4 for supporting two guns, which I want to try and do next?

Link to comment
Share on other sites

  • 1 month later...
On 7/24/2017 at 12:44 AM, Swrd said:

I am sooo close hahaha!

 

Got to build and boot the modified touchmote bin, thanks again for pointing me in the right direction.

 

Sadly, another problem! :'(

 

I can connect the wiimote to my modified touchmote, buttons respond but no way to get the cursor to move in either mouse mode or touch cursor.  When i try with regular touchmote, the cursor and mouse mode both work,

 

Maybe pertinent to mention, iam not using a mayflash dolphin bar but a real wii bar powered by a wii.

 

Sorry to bother you again with this, i am about to give up myself, but i wanted to check if you had any idea.

 

Thank you!

 

 

I had the same problem. "no way to get the cursor to move in either mouse mode or touch cursor."

 

Did you find way to resolve this?

Link to comment
Share on other sites

On 12/22/2017 at 10:40 PM, dcdispose-2010 said:

Hi, I was wondering if you managed to get any further with this?

I finally got it to compile without any errors.  It loads up and connects correctly but same as you, buttons work but no IR functions\cursor.

Anybody any ideas\fix\updates?

Many Thanks!

Hi, I have the exact same issue, no cursor.  Did you find any reason or solution for this?

Link to comment
Share on other sites

8 hours ago, zgxlogic said:

I had the same problem. "no way to get the cursor to move in either mouse mode or touch cursor."

 

Did you find way to resolve this?

Spend a whole day and finally find the answer: the fault value (all 0.5) is somehow invalid, change that to the value metioned above 0.58, 0.96, 0.3, 0.8. Then the modified version should start to work.

Link to comment
Share on other sites

8 hours ago, zgxlogic said:

Hi, I have the exact same issue, no cursor.  Did you find any reason or solution for this?

Spend a whole day and finally find the answer: the fault value (all 0.5) is somehow invalid, change that to the value metioned above 0.58, 0.96, 0.3, 0.8. Then the modified version should start to work.

Link to comment
Share on other sites

  • 4 weeks later...

My issue with the original Post is Vanilla Touchmote.  I have the Mayflash Dolphin Bar and my Wiimotes sync just fine, but when I open Touchmote and attempt to sync the Wiimotes connect to Touchmote for a second and then deactivate.  It's only Touchmote I'm struggling with.  They connect just fine in Dolphin.  

From one of the methods on the first page, Visual Studio 2013 Express was required but I'm unable to download that from Microsoft's website.  Is this piece required and if so, where are you downloading it?  There's a download link on Microsoft, but it then says there's nothing to download.

Link to comment
Share on other sites

  • 3 weeks later...

Hello everyone, what an excellent thread this is, I've been following along getting my own setup going with mostly success. So far have both Wiimotes working in MAME lovely. Here's a few things I learnt on the way:

Map cursor to right-stick on both wiimotes, this makes life easier in LB and MAME menus where you have enabled gamepad control with left stick

If using the wonderful SteamLauncher plugin by @Lahma you'll have to disable it as Steam configures your wiimote as a 360 pad and no amount of fiddling will remove the deadzone, even with a mame.ini edit.

My goal however is to use this all in BigBox with no fiddling about in Windows. This means if I have touchmote on by default it will interfere with Dolphin when I go to play a Wii game. Has anyone had any luck with making an AutoHotKey script or batch file to get Touchmote to close and stay closed, then relaunch on exit Dolphin?

I have tried doing it the other way around by enabling it for my install of MAME that I use specifically for the gun games, but no  luck with that, and the fact MAME loves to forget your settings if the controller isn't detected on launch makes me think it's probably easier to leave Touchmote on at all times except when Dolphin is running.

I've tried writing a few ahk scripts but nothing seems to get the bugger to close down at all. Any help would be much much appreciated :)

  • Thanks 1
Link to comment
Share on other sites

If anyone cares I'm very close to what I consider a SEAMLESS Wiimote experience...

 - Control everything with Wii Remote

- Full use of BigBox frontend with Wii Remote. Launch your games and shutdown your system with the remote 

- Switch between MAME Lightgun games and Dolphin seamlessly

- Touchmote closes down for use in Dolphin then restarts to use LaunchBox again

and most excitingly in my opinion....

- Close Dolphin with Wii Remote from the Wii Home Menu. No need to grab Keyboard to hit ESC or a controller with a HotKey

 

What's holding the whole thing up is... I  cannot get the Wii Remotes to reliably behave when launching Touchmote on startup. 4/5 times they'll be grand. But the fifth time even though I have IR mapped to analog stick, it'll control the mouse, on turning off the Wii Remote the cursor will pull to one side. If anyone knows how to fix this please please let me know.  I have tried WiinUSoft but it has it's only particular issues on startup and with retaining the analog stick settings in my experience.

Regardless I'll release what I have some point soon. FYI I have no idea what i'm doing and it's gonna be messy and hacky, but it should work. If someone wants to help me tidying it up that'd be great. Just please don't be a tosser about my implementation :P

Link to comment
Share on other sites

I have just started with this, I have the Wii Remote working as a mouse pointer which works fine in MAME. Even though I set the buttons in the profile as keyboard for example B-left ctrl for fire, 1-6 to enter coins, 2-1 to start game these will not work. The only button on the remote I can get to work with MAME is the fire button but only if I set as left mouse. I do not seem to be able to get the keyboard mapping to work. I must be missing something simple but I can not work it out. I am using MAMEUIFX64 0.175. Also when I go to the TAB menu to set button pressing the Wii Remote buttons does nothing. Any help would be appreciated.

I should also add I am using mayflash dolphin bar and Windows 7 64 bit.

Update 1: Okay I have now worked out how to map buttons by hooking MAME so can do more than just use the mouse buttons.

Update 2: I have installed the 360 controller emulator, if I go into control panel and check the Wii Remote it is showing up as an xbox controller and works in windows. I can not get it to work in MAME when I select left/right stick I get no response. Even if set controller one as XBOX rather than mouse I get no control. Is this a limitation or can I use xbox controller or two light guns in MAME?

Thanks

Carl

Edited by Carl_71
Link to comment
Share on other sites

  • 2 weeks later...

Hi all, 

I'm recently started with touchmote and got it up and running, but.... got it working perfectly for 1 game: Point Blank. Moving the crosshair and shots works perfect with the Wii mote. 

When I open up another game, like Point Blank II, Operation Wolf 3 etc, Moving the crosshair is far from perfect. Don't moves full to right, moves mostly in x and y axis. Far from smooth...

Any idea what I'm doing wrong ?

Regards,

Machello

Link to comment
Share on other sites

1 hour ago, Machello said:

Hi all, 

I'm recently started with touchmote and got it up and running, but.... got it working perfectly for 1 game: Point Blank. Moving the crosshair and shots works perfect with the Wii mote. 

When I open up another game, like Point Blank II, Operation Wolf 3 etc, Moving the crosshair is far from perfect. Don't moves full to right, moves mostly in x and y axis. Far from smooth...

Any idea what I'm doing wrong ?

Regards,

Machello

Make sure that your joypad deadzone is set to 0 in mame.ini, any other value can have the effect you're describing. If you've already done that, not sure what it could be.

Link to comment
Share on other sites

On 7/16/2019 at 6:15 PM, Carl_71 said:

I have just started with this, I have the Wii Remote working as a mouse pointer which works fine in MAME. Even though I set the buttons in the profile as keyboard for example B-left ctrl for fire, 1-6 to enter coins, 2-1 to start game these will not work. The only button on the remote I can get to work with MAME is the fire button but only if I set as left mouse. I do not seem to be able to get the keyboard mapping to work. I must be missing something simple but I can not work it out. I am using MAMEUIFX64 0.175. Also when I go to the TAB menu to set button pressing the Wii Remote buttons does nothing. Any help would be appreciated.

I should also add I am using mayflash dolphin bar and Windows 7 64 bit.

Update 1: Okay I have now worked out how to map buttons by hooking MAME so can do more than just use the mouse buttons.

Update 2: I have installed the 360 controller emulator, if I go into control panel and check the Wii Remote it is showing up as an xbox controller and works in windows. I can not get it to work in MAME when I select left/right stick I get no response. Even if set controller one as XBOX rather than mouse I get no control. Is this a limitation or can I use xbox controller or two light guns in MAME?

Thanks

Carl

When you say 360 Controller Emulator, what do you mean? You should only need Touchmote.

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