Main Woodworking Reviews Software Monitor/Video Maximus Arcade
Audio/Jukebox/MP3 Project Announcements Artwork Consoles Buy/Sell/Trade Meet Up
Arcade Miscellaneous Everything Else Politics n Religion Forum Discussion Wiki Discussion GroovyMAME
DOS/WinCab Merit/JVL Touchscreen Automated Projects Driving & Racing Project Arcade Old Boards
Linux Restorations Pinball MaLa Frontend controls.dat Old Archives

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


  

Author Topic: Glovepie Scripts for MAME and other Emulators  (Read 5603 times)

0 Members and 1 Guest are viewing this topic.

Howard_Casto

  • Idiot Police
  • Trade Count: (+1)
  • Full Member
  • ***
  • Online Online
  • Posts: 11685
  • Your Post's Soul is MINE!!! .......Again??
    • The Dragon King
Glovepie Scripts for MAME and other Emulators
« on: September 01, 2012, 04:49:01 am »
This is the companion thread to the "Fun With Glovepie" tutorial thread.  Completed scripts and scripts that are ready for beta testing will be posted here.

Useful Utilities
=========
http://glovepie.org/glovepie_download.php - Glovepie (Latest Version):  Needed to run scripts.
http://bluetoothinstaller.com/bluetooth-command-line-tools/  - Bluetooth command line utilities:  Allows scripts to unpair wiimotes via code.
http://uploaded.net/file/fzhe96kn -PPJoy:  Necessary to emulate the gamepad, which is REQUIRED for MAME usage. 
http://www.ngohq.com/home.php?page=dseo -Driver Signature Enforcement Overrider:  Win7/Vista users may need this to properly install ppjoy.
=========

#1  Complete Wii Accessory Script 1.5  (CompleteWiimote1.5.zip)

It really annoys me that most of the scripts out there are hard-coded so specifically towards the game the authors wanted to use it with that they need re-written for anything else.  This is especially true if the script doesn't use motion controls as it can easily be made completely generic.  Thus this script.  It maps out all of a wiimote's functions to a ppjoy virtual gamepad.  All wiimote accessories are also supported and mapped out accordingly, and yes I said ALL accessories.  Nunchucks, Classics, Music Controllers, the Balance board ect...  All of the admin buttons (plus, minus and home) are universally mapped to the same gamepad buttons so you can hot-swap accessories on the fly.  I wrote it a while back and it's designed to "just work" aka if you want to use your guitar hero controller for frets on fire just plug it in and run the script.  If you want to switch to a arcade game, plug in your mad-catz stick, ect....   Pointer functions are not hooked up (intentionally so) nor is motion plus or standard motion controls.  This is a "regular" script.

The script is currently beta, but you guys can help me finish it.  I couldn't test the drum controller portion of the script because I don't have one.  Ditto for the Dj Hero controller.  So if you guys have those controllers and are willing to test, pm me and we'll get the script finished.  After those functions are finalized I'll modify the script to support the full 7 wiimotes and it will essentially be done.

Script #2 Quad Wiimote Lightguns for MAME 1.5 (mwg1.5.zip)  **UPDATE** Fixes calibration bug for players 2-4

Ok without further ado, I'll go ahead and post this one.  It could use more work, but it is perfectly servicable as a solution to run up to 4 wiimotes as lightguns in mame.  Features include a calibration routine, the ability to save settings... shake to reload and much more.  Extract the zip file to your glovepie folder.

NOTE:  This script is complex!  It includes two helper exes and has it's own document folder.  It is an entire system, not a mere script, so read all of the docs before using it.
« Last Edit: September 13, 2012, 11:11:20 am by Howard_Casto »

Howard_Casto

  • Idiot Police
  • Trade Count: (+1)
  • Full Member
  • ***
  • Online Online
  • Posts: 11685
  • Your Post's Soul is MINE!!! .......Again??
    • The Dragon King
Re: Glovepie Scripts for MAME and other Emulators
« Reply #1 on: September 07, 2012, 05:37:30 pm »
Updated Complete Wiimote Script to 1.5 (see above)

Howard_Casto

  • Idiot Police
  • Trade Count: (+1)
  • Full Member
  • ***
  • Online Online
  • Posts: 11685
  • Your Post's Soul is MINE!!! .......Again??
    • The Dragon King
Re: Glovepie Scripts for MAME and other Emulators
« Reply #2 on: September 10, 2012, 10:53:55 am »
Finally released the wii lightgun script.....  It might still need tweaking, but it needs to be out in the wild. 

Necro

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1007
  • Building a 'Classic' MAME Cab
Re: Glovepie Scripts for MAME and other Emulators
« Reply #3 on: September 10, 2012, 11:23:20 am »
HC: Does the 'lightgun' script work using the pointer function of the remote or the gyroscope/position functions?  (or both).  Just wondering if I'd need to setup the LED bar for functionality.

BadMouth

  • Trade Count: (+4)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 5149
  • Sometimes I build cabs from the neighbors trash.
Re: Glovepie Scripts for MAME and other Emulators
« Reply #4 on: September 10, 2012, 11:32:38 am »
I'll give it a try this evening.  I spent two evenings on Wii-Mouse and couldn't get it working with my 3rd party guns.
Hopefully I'll have better luck with glovepie.


Howard_Casto

  • Idiot Police
  • Trade Count: (+1)
  • Full Member
  • ***
  • Online Online
  • Posts: 11685
  • Your Post's Soul is MINE!!! .......Again??
    • The Dragon King
Re: Glovepie Scripts for MAME and other Emulators
« Reply #5 on: September 10, 2012, 12:39:58 pm »
HC: Does the 'lightgun' script work using the pointer function of the remote or the gyroscope/position functions?  (or both).  Just wondering if I'd need to setup the LED bar for functionality.

You need the led bar.  It's  a lightgun script, not a gyromouse script.  ;)

Le Chuck

  • I want a new quote!
  • Wiki Contributor
  • Trade Count: (+5)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 3892
  • 2012 UCA Awardee
Re: Glovepie Scripts for MAME and other Emulators
« Reply #6 on: September 10, 2012, 12:49:28 pm »
Good stuff, many thanks for all your hard work on this.  Look forward to trying it out!

nipsmg

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1118
  • ROONEY!! ERRGH!!
    • Arcadia
Re: Glovepie Scripts for MAME and other Emulators
« Reply #7 on: September 10, 2012, 12:57:02 pm »
This will be tested this week.  Got new computer in machine up and running, but am having problems programming my ipac :(  As soon as I figure that out I'll be testing this out.

RamjetR

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 137
    • My Youtube Channel
Re: Glovepie Scripts for MAME and other Emulators
« Reply #8 on: September 10, 2012, 07:20:55 pm »
Sweet! Charging 4 AA batteries now and shall have a go after lunch. Hopefully I can have a quiet day at work and find some time to set it up.
Gentlemen.... Start your engines!
My Youtube Channel http://www.youtube.com/user/ramjetr?feature=mhee
Try my RamjetM2Borderless V0.7 utility for your M2Emulator shooting games here https://docs.google.com/open?id=0B-P3wlCiYEm3RzhCZk1NcFR3blE
Try my Sega Model 2 Output Utility RamjetVR V1.4 https://docs.google.com/file/d/0B-P3wlCiYEm3VHhBMXNxZGVIQk0/edit

BadMouth

  • Trade Count: (+4)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 5149
  • Sometimes I build cabs from the neighbors trash.
Re: Glovepie Scripts for MAME and other Emulators
« Reply #9 on: September 10, 2012, 09:35:09 pm »
I jumped into the first script without reading that it didn't support the pointing functions.
Had a bit of trouble consistently connecting, but it worked fine for the POV hat and buttons.
I tried my 2nd gun(not both at the same time) before realizing that the script didn't support pointing.

So I moved onto the gun script.
I got the blue screen of death when the wiimote connected.
Tried it again same result.
Tried to connect outside of glovepie and it connected fine.
Tried the script and got the blue screen.
Tried to connect outside of glovepie and got the blue screen of death that time.  :'(
IRQL_NOT_LESS_OR_EQUAL

Any ideas?
Originally, I was running vista in test mode.  I don't remember at which point I restarted the pc and went into normal mode.
If the drivers were installed in test mode, wouldn't they continue to work in normal mode?

EDIT: I open the bluetooth connection window and scan for devices.  As soon as I press the buttons on the wii remote to connect, BSOD.
         Going to try the other gun now.

EDIT: Seems to be one particular gun making it crash.  Have the gun script working with the other gun now, but haven't messed around with it enough to know how well yet.  Nice touch with the voice calibration.  :lol
« Last Edit: September 10, 2012, 09:55:37 pm by BadMouth »

Howard_Casto

  • Idiot Police
  • Trade Count: (+1)
  • Full Member
  • ***
  • Online Online
  • Posts: 11685
  • Your Post's Soul is MINE!!! .......Again??
    • The Dragon King
Re: Glovepie Scripts for MAME and other Emulators
« Reply #10 on: September 11, 2012, 09:34:05 am »
That's your bluetooth connection giving you issues... the scripts have nothing to do with that.  You wouldn't have a wii nearby would you?  If a wii and your pc try to read the wiimote at the same time you'll get a bsod.

BadMouth

  • Trade Count: (+4)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 5149
  • Sometimes I build cabs from the neighbors trash.
Re: Glovepie Scripts for MAME and other Emulators
« Reply #11 on: September 11, 2012, 10:05:54 am »
That's your bluetooth connection giving you issues... the scripts have nothing to do with that.  You wouldn't have a wii nearby would you?  If a wii and your pc try to read the wiimote at the same time you'll get a bsod.

I don't own a wii.  I'll give it another try this evening.
The BSOD happens instantly as soon as I press the buttons on the one particular gun to make it discoverable (only when the pc is searching for it).
I pulled out the bluetooth dongle and plugged it back in and got the same results.
Are there any particular files that I can delete to "reset" things?

I did manage to get the other gun working and calibrated.
Played a couple games of T2. 
It doesn't track quite as good as an AIM-Trak, but seems like it could be acceptable (for IR guns) with careful tweaking.
It worked better than I expected for a wii remote, based on using one with a wii at someone elses house.

If I can get the automatic pairing stuff worked out, I'll include them in my new slim cab.
Definitely not giving up my old CRT light guns though.



Howard_Casto

  • Idiot Police
  • Trade Count: (+1)
  • Full Member
  • ***
  • Online Online
  • Posts: 11685
  • Your Post's Soul is MINE!!! .......Again??
    • The Dragon King
Re: Glovepie Scripts for MAME and other Emulators
« Reply #12 on: September 11, 2012, 11:21:39 am »
What model wiimote is it?

Certain wiimotes (espectially wiimote+) need a special exe from the glovepie site. 

That's about all I can think off otehr than your stack being odd.

Are you using the Microsoft stack?  Because that's the best one for glovepie... or at least it worked best for me.

Howard_Casto

  • Idiot Police
  • Trade Count: (+1)
  • Full Member
  • ***
  • Online Online
  • Posts: 11685
  • Your Post's Soul is MINE!!! .......Again??
    • The Dragon King
Re: Glovepie Scripts for MAME and other Emulators
« Reply #13 on: September 11, 2012, 11:33:13 am »
DOH! 

How come everytime I release something, no matter how long I debug it I find a bug?

The calibration part of the script has a bug in it... no matter the gun you try to calibrate, only player 1 trigger responds.

I'll fix that and re-release.

**UPDATE**

The modified script and only the script is attached to this post.  I'll update the complete packaged and change the revision accordingly later tonight.
« Last Edit: September 11, 2012, 11:48:29 am by Howard_Casto »

BadMouth

  • Trade Count: (+4)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 5149
  • Sometimes I build cabs from the neighbors trash.
Re: Glovepie Scripts for MAME and other Emulators
« Reply #14 on: September 11, 2012, 11:48:54 am »
What model wiimote is it?

Certain wiimotes (espectially wiimote+) need a special exe from the glovepie site. 

That's about all I can think off otehr than your stack being odd.

Are you using the Microsoft stack?  Because that's the best one for glovepie... or at least it worked best for me.

I have a pair of these thanks to Amazon Germany:  ;D

http://www.bigben.fr/produit/produit/id/2285

I know it's not the script, but when testing script #1 it paired and worked fine.
Somewhere between switching back and forth between the guns pairing it to test the gun script (#2), something got screwey with just the one gun.  ???

In my end-user thinking, there's gotta be a value stored somewhere in windows that got screwed up and can be cleared out.

Pretty sure I'm using the Microsoft stack.  Will check the names when I get home, but there were 2 drivers and they both started with MS.
« Last Edit: September 11, 2012, 11:50:26 am by BadMouth »

Howard_Casto

  • Idiot Police
  • Trade Count: (+1)
  • Full Member
  • ***
  • Online Online
  • Posts: 11685
  • Your Post's Soul is MINE!!! .......Again??
    • The Dragon King
Re: Glovepie Scripts for MAME and other Emulators
« Reply #15 on: September 11, 2012, 12:20:40 pm »
Hold up... you were trying wiimouse right? 

That thing royally screwed up one of my wiimotes.  The only way to fix it was to sync the thing back to a wii... once synced to the wii, the wii's internal syncing memory was reset and it fixed it. 

I dunno if that's your issue or not.

Also try syncing the wiimote outside of glovepie and see if that helps.  You can do this in your bluetooth control panel in windows.....  simply go through the add device wizard and hit 1+2 while you are going through the wizard.... don't add a pairing code. 
« Last Edit: September 11, 2012, 12:22:12 pm by Howard_Casto »

BadMouth

  • Trade Count: (+4)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 5149
  • Sometimes I build cabs from the neighbors trash.
Re: Glovepie Scripts for MAME and other Emulators
« Reply #16 on: September 11, 2012, 12:41:36 pm »
Also try syncing the wiimote outside of glovepie and see if that helps.  You can do this in your bluetooth control panel in windows.....  simply go through the add device wizard and hit 1+2 while you are going through the wizard.... don't add a pairing code.

Yeah, been doing that.  BSOD as soon as I hit 1+2.
Will have to find a wii to resync it with or find some other way to reset it.
I'll try syncing it with a different pc tonight and see what happens.

My whole process of trying to get them to pair was pretty haphazard with both the windows bluetooth and glovepie screens open and starting and stopping the script.
I was randomly doing stuff and not really understanding what was going on.  Every once in a while, I'd get lucky and it would pair up.
I plan to work on getting a better understanding and improving the process this evening.

Necro

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1007
  • Building a 'Classic' MAME Cab
Re: Glovepie Scripts for MAME and other Emulators
« Reply #17 on: September 11, 2012, 03:32:12 pm »
Howard - can you recommend any bluetooth adapters?  Definitely want to try this but don't want to get one that's just going to cause headaches.

Howard_Casto

  • Idiot Police
  • Trade Count: (+1)
  • Full Member
  • ***
  • Online Online
  • Posts: 11685
  • Your Post's Soul is MINE!!! .......Again??
    • The Dragon King
Re: Glovepie Scripts for MAME and other Emulators
« Reply #18 on: September 11, 2012, 04:00:54 pm »
Howard - can you recommend any bluetooth adapters?  Definitely want to try this but don't want to get one that's just going to cause headaches.

Not sure.  I'm using an el-cheapo 2$ adaptor from china.  It works pretty well but I almost always have to connect my wiimotes twice (it freezes after a sec, disconnects and I have to sync again).  I think the stack is more important.  The adaptor needs to be fully compatable with with the microsoft stack or bluesoli

Necro

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1007
  • Building a 'Classic' MAME Cab
Re: Glovepie Scripts for MAME and other Emulators
« Reply #19 on: September 11, 2012, 11:27:27 pm »
OK...I'll dig in more to try to find one that's reliable.  I'm at the point where I'd rather just spend a few bucks more and get something I know will work rather than deal with the hassle.

Howard_Casto

  • Idiot Police
  • Trade Count: (+1)
  • Full Member
  • ***
  • Online Online
  • Posts: 11685
  • Your Post's Soul is MINE!!! .......Again??
    • The Dragon King
Re: Glovepie Scripts for MAME and other Emulators
« Reply #20 on: September 13, 2012, 11:13:55 am »
Sorry I forget to update the lightgun zip file.... it's up now. 

felix pontifex

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 24
  • I want to build my own arcade controls!
Re: Glovepie Scripts for MAME and other Emulators
« Reply #21 on: September 19, 2012, 12:56:21 am »
Hey, it's been a while, I wanted to ask about cleanpie. I tried just starting the program (after putting it in the glovepie folder like the instructions told me) but nothing happened. I then tried putting it to admin approval to open, and while the confirm window came up for that, it didn't do anything afterward. I then tried putting in the command line, and I got a "runtime error 5" message.

In the mean time I will try using it through glovepie, if the damn thing will sync.

Warborg

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 357
  • Personal text? Nah...
Re: Glovepie Scripts for MAME and other Emulators
« Reply #22 on: February 14, 2014, 05:46:02 pm »
I apologize for the thread necro here, but I recently started messing with Dolphin and have a Tron edition Wiimote that I am going to sync up to my media PC for Dolphin and for playing ScummVM from bed, and in the various google searches I ran across this thread...  What was of particular interest was of using the Wiimote as a lightgun.  My GF loves lightgun games, especially some of the ones on the PS2.  So Howard, you seem to be the Wiimote/Glovepie guru here, I wanted to find out if you know if this can function with PCSX2 and (I guess this part is for anyone that's set this up previously) how accurate are the Wiimotes in terms of using them for this function?  Are they accurate enough to put them in a gun housing and actually aim down the sights or like most lightguns of this nature only accurate enough to move around a crosshair on the screen?

Howard_Casto

  • Idiot Police
  • Trade Count: (+1)
  • Full Member
  • ***
  • Online Online
  • Posts: 11685
  • Your Post's Soul is MINE!!! .......Again??
    • The Dragon King
Re: Glovepie Scripts for MAME and other Emulators
« Reply #23 on: February 14, 2014, 05:59:12 pm »
I don't have a clue if they work on pcsx2, sorry.  If it supports a joystick as the lightgun input then it should work for both players, otherwise you'll probably only get p1 support. 

It's not going to work super well in the context of an arcade cab, unless it's a podium cab.  In terms of just a tv, yeah it works pretty well.  I actually test most of my scripts via sitting on the bed (my tv is at the foot of the bed). 

With accuracy you mileage may vary.  I managed to get it almost dead accurate IF I calibrated upon the start of each game and IF I didn't move around a lot.  It also entirely depends upon the type of game you are playing.  The Sega shooters typically have a pretty wide birth in terms of shots, so pinpoint accuracy isn't needed.  With other games it might not be accurate enough.  I suggest leaving some sort of crosshair on the screen just in case your calibration goes off, but in general you can usually "shoot from the hip". 

liquid8

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 156
  • I working on it.. it'll be a while.
Re: Glovepie Scripts for MAME and other Emulators
« Reply #24 on: February 14, 2014, 10:19:16 pm »
I used Howard's script - it takes a bit of time to setup properly and glovepie and wiimote pairing can be finicky. It's important to pick a spot and calibrate. I do leave the crosshair on regardless. It's a cheap solution - if I could, I'd probably get something else but it works well enough.

I ordered this holder, which is really nice but quite heavy after a pretty short use:


I think I actually modified Howard's scripts to sort of combine the full wiimote and lightgun stuff together, to make use of additional buttons (and the builtin nunchuck). I haven't messed with it for a while, but I will be brushing it off again soon if you have any interest.

Warborg

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 357
  • Personal text? Nah...
Re: Glovepie Scripts for MAME and other Emulators
« Reply #25 on: February 15, 2014, 12:00:09 am »
I used Howard's script - it takes a bit of time to setup properly and glovepie and wiimote pairing can be finicky. It's important to pick a spot and calibrate. I do leave the crosshair on regardless. It's a cheap solution - if I could, I'd probably get something else but it works well enough.

I ordered this holder, which is really nice but quite heavy after a pretty short use:


I think I actually modified Howard's scripts to sort of combine the full wiimote and lightgun stuff together, to make use of additional buttons (and the builtin nunchuck). I haven't messed with it for a while, but I will be brushing it off again soon if you have any interest.

Yes, I do have interest in it...  I've tried a couple of solutions in the past that I didn't care for (including trying move on the PS3) and I'm already trying to set up the Wiimote for other functionality so I would love it if this would be a workable solution...

mike boss

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1984
Re: Glovepie Scripts for MAME and other Emulators
« Reply #26 on: February 15, 2014, 11:21:27 pm »
This is really cool Howard.
I have no idea how I missed the fact that you could use Wii-Motes in MAME as light guns.
I'll need to look into this.
Great work!

WindDrake

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 233
  • Electrical Engineer
Re: Glovepie Scripts for MAME and other Emulators
« Reply #27 on: April 23, 2014, 10:27:22 pm »
I'm actually bumping into a problem with this.

Whenever I put my Wiimote into it's gun shell (KMD Buckshot) GlovePIE starts freaking out with "Drums: Unexpected "Which" Value: *x**" which seems to follow the accelerometer in the built-in Nunchuck. The controller stops responding at that point until the Nunchuck lever is slid back to disconnect it.

Works fine on the Wii, so I know it's not the gunshell.

Any ideas?

WindDrake

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 233
  • Electrical Engineer
Re: Glovepie Scripts for MAME and other Emulators
« Reply #28 on: April 23, 2014, 11:27:26 pm »
Saw this. http://wiibrew.org/wiki/Wiimote/Extension_Controllers#Classic_Controller
Then looked at http://glovepie.org/forum/viewtopic.php?f=6&t=723

Seems like this damned thing is going to require some custom script (which I am terrible at).

Using that funky decode, I was able to find that .Exp2-5 return accelerometer data, Exp0 is Nunchuk Up/Down, Exp1 is Left/Right, and that the Z button decrements Exp5 by 1, while the C button decrements Exp6 by 2, both at the same time decrements by 3.

I can't get the Wiimote buttons to do anything, though. Makes me think Glovepie is not reading the "Nunchuk" properly.

estrika

  • Trade Count: (0)
  • Jr. Member
  • **
  • Offline Offline
  • Posts: 7
Re: Glovepie Scripts for MAME and other Emulators
« Reply #29 on: May 19, 2014, 08:28:26 pm »
howard_casto great script and addon tools, i already have one for lightgun but mine is very simple it works but only wiimote not nunchuk, i will test yours.

regarding btpair tools, i have a china made dongle cheap as hell, and it never worked with microsoft bluetooth stack, i found the solution using toshiba bluetooth stack, its paied but if anyone needs it i can upload it (80mg).

howard_casto i have 2 more scripts one motion sensor gyro i use it to play driving games like mario kart and another a simple mouse to demul and others (keep in mind that i am a noobie comparing to you with glovepie) do you think you can bring more interesting stuff to them?


i leave them here in case you want take a look, they work but are simple as hell.


  
 

Sitemap 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28