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: WiimoteS and MAME questions / help...  (Read 5131 times)

0 Members and 1 Guest are viewing this topic.

akcrash

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 27
  • Last login:September 09, 2008, 06:05:58 am
WiimoteS and MAME questions / help...
« on: April 28, 2008, 02:59:14 am »
Greetings,

First off, this is my first post, just want to say hi and thanks for the great info. I tried searching here and found lots of people saying that they were going to try this and they never seemed to come back with any info.

Ok, now that thats out of the way, time for my question. I recently spent too much money on two LCD topgun's and was horribly disappointed with that product. Then I switched over to trying to get wiimotes to work. I have tried MAME versions 0.122 and 0.124A, both have pretty much the same results. I have gotten one wiimote to work with area51 using it as a mouse for cursor control and assigning the buttons as joystick buttons in PPJoy. The problems come with getting two of them to work. If i use GlovePie and make the wiimotes into joysticks they work in MAME but are very jumpy when aiming anywhere except in exactly the X and Y axis of the screen, if you aim anywhere off center the cursor jumps really bad.

So, has anyone else tried using these in MAME and gotten them to work as 'lightguns'? Which GlovePie script did you use? What version of MAME? How did you configure your MAME ini file?

Thanks for any help.

PS - Is there any talk of an actual driver being written for these remotes, or is GlovePie still the only way to interface them to Windows?

wbassett

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 424
  • Last login:October 05, 2024, 02:18:42 am
Re: WiimoteS and MAME questions / help...
« Reply #1 on: April 28, 2008, 10:23:01 am »
I don't know if anyone has gotten them to fully work with MAME, and you're the first person I've heard say they got two to work, albient choppily.

You can talk to the folks at Mame and maybe they can work on incorporating something that works better with the converted Wii motes.  I think there is a lot of interest in this area so they will probably be receptive to it.

jerryjanis

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 821
  • Last login:February 02, 2023, 01:56:44 am
  • Skate or Die!!!
    • Jake's Joystick
Re: WiimoteS and MAME questions / help...
« Reply #2 on: April 28, 2008, 03:06:46 pm »
Is there a way to make the device act like a mouse?  That might be much more effective than using it like a joystick.

Games001

  • Trade Count: (+2)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 370
  • Last login:January 13, 2024, 12:44:04 am
Re: WiimoteS and MAME questions / help...
« Reply #3 on: April 28, 2008, 03:31:04 pm »
Search these forums.. we have been talking about this ALOT in the last month.

None of us, to my knowledge, have gotten a WiiMote to work 100% on a MAME system.  I had my WiiMote seen by my BlueTooth, but it never worked on screen as a mouse.

akcrash

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 27
  • Last login:September 09, 2008, 06:05:58 am
Re: WiimoteS and MAME questions / help...
« Reply #4 on: April 28, 2008, 09:14:58 pm »
Search these forums.. we have been talking about this ALOT in the last month.

None of us, to my knowledge, have gotten a WiiMote to work 100% on a MAME system.  I had my WiiMote seen by my BlueTooth, but it never worked on screen as a mouse.

Which GlovePie script were you using? Just getting the remote hooked up with BlueTooth will not enable it to function as a mouse.


I have attached the two scripts that I have been working with. The IRmouse one works in MAME, just make sure you have PPjoy installed and setup correctly. I played Area51 with that script through the office building stage, it will occasionally freak out (the cross hairs will start tracking WAY off, just wave the remote around the screen and it will come back) I can not figure out how to get a two player setup working with this yet. I need to figure out how to mod that script for two mice.
The other script emulates two remotes as two joysticks, I had decent success with this on my laptop but it did not work on my cab, for some yet unknown reason.  I take no credit for these scripts as I found them online and just tweaked them a bit.

If anyone uses these please post back your results, if you get a successful setup with two remotes please let us know. I am off to figure out who to contact about implementing support in MAME...

EDIT - Delete the '.txt' off the attached files to use them...

pulsar5271

  • Trade Count: (0)
  • Newbie
  • *
  • Offline Offline
  • Posts: 1
  • Last login:April 29, 2008, 11:11:54 pm
Re: WiimoteS and MAME questions / help...
« Reply #5 on: April 29, 2008, 11:12:40 pm »
posting itt because i am akcrash's assistant with this arcade cabinet project

even though the remotes recognize as mice, they always do weird things.  in windows, when you have the glovepie script for 2 wiimotes running, it will try to marquee the area between mouse cursors 1 and 2 when either mouse tries to click.  i don't know if this is just a ppjoy problem or something, or if this could be pointing to a bigger problem.

also we need a way to automate bluetooth pairing and initialization.  ideally, we want the wii remotes in holsters on the side of the cabinet, and though the cabinet is open right now, we're gonna finish it up eventually and don't want to have people mess with computer crap when we want to shoot aliens in the face.

p.s. OP is a  :tool:   :cheers:

mhermann

  • Trade Count: (+3)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 182
  • Last login:October 04, 2019, 07:10:08 pm
  • We ain't found.........
Re: WiimoteS and MAME questions / help...
« Reply #6 on: May 01, 2008, 12:08:15 pm »
I started playing around with this as well. I got my two Wii remotes working in Windows. I don't think GlovePie is the answer. From a logical standpoint without any mame changes we need the 2 wii remotes to be recoginized (or be controlling) 2 different mouse devices in windows.

Correct me if I am wrong but the problem with 2 lightguns working in mame is that they have to be setup as joysticks correct? I have not used the Top Guns or the Guncon guns, but my understanding is that if we could get the wii remotes to work just like a trackball and spinner do and have mame recognize them the same way we would be in business, correct?

If that is the case GlovePie will not work as for some reason it just moves the mouse and it will not work in mame. What I think is needed is the creation of a virtual mouse in Windows XP. A driver would be written that takes the input from the Wii controlls and actually controls the virtual mouse. Then mame would just treat the virtual mouse as a regular mouse. This would be similar to PPJoy which treats input devices as joy sticks.

Sorry if this was a ramble I am still trying to get my head around the problem. I am not sure why GlovePie just does not work. If it sends mouse commands to a mouse you would think it would work in mame. Unless the way it is implemented he is not doing API calls which I think is needed.

akcrash

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 27
  • Last login:September 09, 2008, 06:05:58 am
Re: WiimoteS and MAME questions / help...
« Reply #7 on: May 01, 2008, 02:49:25 pm »

If that is the case GlovePie will not work as for some reason it just moves the mouse and it will not work in mame. What I think is needed is the creation of a virtual mouse in Windows XP. A driver would be written that takes the input from the Wii controlls and actually controls the virtual mouse. Then mame would just treat the virtual mouse as a regular mouse. This would be similar to PPJoy which treats input devices as joy sticks.

I am not sure why GlovePie just does not work. If it sends mouse commands to a mouse you would think it would work in mame. Unless the way it is implemented he is not doing API calls which I think is needed.

I found this tidbit in the comments of one of the scripts, "Setting it to the mouse does not work as GlovePIE cannot modify RawImput yet." This is apparently NOT true. Could someone else verify this by trying the script i have attached? With this script i have been playing several gun games, Area 51, T2 and Alien3 The Gun. They all worked great with one wiimote. The only thing that did not work is if the wiimote is set to emulate the mouse buttons, the button presses never show up. Which is why i made the buttons show up as joystick buttons. You can either play with the nunchuck attached or not.

Correct me if I am wrong but the problem with 2 lightguns working in mame is that they have to be setup as joysticks correct? I have not used the Top Guns or the Guncon guns, but my understanding is that if we could get the wii remotes to work just like a trackball and spinner do and have mame recognize them the same way we would be in business, correct?
I think that is correct.

I believe that this whole thing is possible, it just needs some fine tuning, of course an actual driver would be the best solution, glovepie is good but I think it may be drawing CPU power in the background to. I think it can be made to work until some one with the know how to create an actual driver steps in....

Please post your results with this script...

On a side note has anyone played the original alien3 game? Wondering if the gun cursor should stick a little bit when you are pulling the trigger, or if it is something with the scripting or the way the game runs on my machine, cause the cursor moves flawlessly except when the trigger gets pulled.

TheShanMan

  • Trade Count: (+2)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1912
  • Last login:October 22, 2024, 11:51:12 am
    • My Arcade (updated 1/30/13)
Re: WiimoteS and MAME questions / help...
« Reply #8 on: May 01, 2008, 03:34:37 pm »
I think there is a lot of interest in this area so they will probably be receptive to it.

I agree - whoever figures out how to make these work reliably as a pair will have a lot of people doing this: :notworthy:

I applaud anyone who tries to make this a reality! :applaud:
My Collection: Mame cab, 38 dedicated vids, pin, skeeball, coin op air hockey table, Ice Cold Beer, Megatouch, 2 token machines, and payphone (VAPS, pics at Arcade Crusade)

Add Ambience to your mame cab setup

mhermann

  • Trade Count: (+3)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 182
  • Last login:October 04, 2019, 07:10:08 pm
  • We ain't found.........
Re: WiimoteS and MAME questions / help...
« Reply #9 on: May 01, 2008, 04:55:56 pm »
Please post your results with this script...

I tried it with VS Duck Hunt. It does work . Note Light Gun must be set to 1 in the mame.ini file. But it was jumpy and the fire buttons were weird. As soon as the first duck was released it would file with out me touching the trigger. Then when I wanted to fire it was delayed.

But I think with a real driver this will work. I am looking into it but it is a bit out of my area of expertise.

akcrash

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 27
  • Last login:September 09, 2008, 06:05:58 am
Re: WiimoteS and MAME questions / help...
« Reply #10 on: May 02, 2008, 05:53:21 am »
Please post your results with this script...

I tried it with VS Duck Hunt. It does work . Note Light Gun must be set to 1 in the mame.ini file. But it was jumpy and the fire buttons were weird. As soon as the first duck was released it would file with out me touching the trigger. Then when I wanted to fire it was delayed.

But I think with a real driver this will work. I am looking into it but it is a bit out of my area of expertise.

First, thank you for posting your results, I have not tried VS duck hunt, will try that in the morning. I have a few questions if i may.
1. In your mame.ini do you have lightgun set to mouse? Do you have mouse set to 1? Because if i understand this right the script just moves the mouse position around, so just enabling the mouse should work. However now that i think about it, when I remapped inputs for alien3 mine showed up as gun1. But I think area51 showed it as mouse... hmm I will look into that in the morning.
2. What were you using for an IR source? With the last posted script mine hasn't jumped around except for when the batteries in my wireless sensor bar were running low, then it jumped like crazy.
3. The weird firing symptoms I dont really have many ideas for, except: Try shutting down glovepie and reopening and running the script again, I have had it flake out a few times, but it was always the tracking that did not work at all, the buttons were always rock steady. The delayed shots could be the computer not being able to handle the game and glovepie at the same time. 4. What system specs and OS are you running?
5. When you remapped your fire button which joystick did it show up as? Just idle curiosity because mine will show up as different joysticks from time to time.

Thanks for any feedback!

mhermann

  • Trade Count: (+3)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 182
  • Last login:October 04, 2019, 07:10:08 pm
  • We ain't found.........
Re: WiimoteS and MAME questions / help...
« Reply #11 on: May 02, 2008, 10:04:49 am »
First, thank you for posting your results, I have not tried VS duck hunt, will try that in the morning. I have a few questions if i may.
1. In your mame.ini do you have lightgun set to mouse? Do you have mouse set to 1? Because if i understand this right the script just moves the mouse position around, so just enabling the mouse should work. However now that i think about it, when I remapped inputs for alien3 mine showed up as gun1. But I think area51 showed it as mouse... hmm I will look into that in the morning.

I got duck hunt to work. I set mouse to 1, lightgun to 1, and joystick to 1. Just having the mouse set to one does not work. If it did we would be in business. That is what we want. Mine shows up as gun1 as well.

Quote
2. What were you using for an IR source? With the last posted script mine hasn't jumped around except for when the batteries in my wireless sensor bar were running low, then it jumped like crazy.

This is resolved. My IR source for the record is the Nyko wireless one. Not sure why it wa jumping before but it works now.

Quote
3. The weird firing symptoms I dont really have many ideas for, except: Try shutting down glovepie and reopening and running the script again, I have had it flake out a few times, but it was always the tracking that did not work at all, the buttons were always rock steady. The delayed shots could be the computer not being able to handle the game and glovepie at the same time.

This was resolved. Stupid mistake by me. I did not have the joystick set to 1 and I actually mapped the fire button to gun movement.  :banghead:

Quote
4. What system specs and OS are you running?

Athlon 64 X2 Duo 2.21 ghz, 2gigs of RAM, Windows XP SP2. I should be good for duck hunt :)

Quote
5. When you remapped your fire button which joystick did it show up as? Just idle curiosity because mine will show up as different joysticks from time to time.

Joy1 I will check and see if it moves around.


So I also noticed a few other things. I read through the Glovepie documents. It says to control more then 1 mouse use "mouse1", "mouse2", instead of just mouse. My thought process is if we connected 2 mice (ie trackball and regular) we could control movement of each and therefore we could map them seperatly in mame.  Still looking into it.  But until we can get Mame to recognize it as a mouse we are out of luck.

Also, I could not get the buttons to work without PPjoy either.

And one last thing, I went to the midnight showing of Ironman last night and I highly recomend it. ;D
« Last Edit: May 02, 2008, 10:10:11 am by mhermann »

akcrash

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 27
  • Last login:September 09, 2008, 06:05:58 am
Re: WiimoteS and MAME questions / help...
« Reply #12 on: May 02, 2008, 12:16:48 pm »

Athlon 64 X2 Duo 2.21 ghz, 2gigs of RAM, Windows XP SP2. I should be good for duck hunt :)

just a little bit. ;)

Quote
So I also noticed a few other things. I read through the Glovepie documents. It says to control more then 1 mouse use "mouse1", "mouse2", instead of just mouse. My thought process is if we connected 2 mice (ie trackball and regular) we could control movement of each and therefore we could map them seperatly in mame.  Still looking into it.  But until we can get Mame to recognize it as a mouse we are out of luck.
I agree also, I think some work is going to be needed to either the inner coding of GlovePie or MAME inorder to get this work 100% unfortunately, both of those might be a bit out of my ball park. I need to look into MAME and how it works a little bit deeper. But in a way MAME can see the thing anyway, at least I think so, because I have my MAME setup as Lightgun = Mouse. And i have Mouse, joystick and lightgun all set to 1. But if I remember right just setting mouse to 1 did not work. It seems odd to me that setting lightgun = mouse would work then?

Thanks again for all the input!

Quote
And one last thing, I went to the midnight showing of Ironman last night and I highly recomend it. ;D

Funny you should mention that, I went and saw it last night also. I would have to say the best movie I have seen in easily a year! :D

mhermann

  • Trade Count: (+3)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 182
  • Last login:October 04, 2019, 07:10:08 pm
  • We ain't found.........
Re: WiimoteS and MAME questions / help...
« Reply #13 on: May 04, 2008, 12:21:26 am »
Started a new thread. I am going to attempt it myself.

http://forum.arcadecontrols.com/index.php?topic=79779.0