Main > Main Forum
Guide: Use your Wiimote on your MAME Machine!
ViciousXUSMC:
Hey guys, I just thought since I have gotten so much data and resources from this forum so far its time to give something back.
I have some in depth guides on computer forums on how to use the wiimote on your PC, and in that case that also means use the wiimote on your MAME PC ^^
I cant not even tell you how incredibly versatile, fun, and powerful this is. You can use everything from the tilt functions, to the accelerometer, to even the IR pointer (meaning point your wiimote at the screen and use it like a mouse or light gun)
I have written many scripts for general PC use and PC games, but now I want to start making some stuff specially for us here at the BYOAC forums that is targeted for things you want.
Off the top of my head a few things:
1.) A general script to do admin tasks that may be hard to do on your CP like volume up/down, start/end Mame, Windows Shut Down.
2.) See how good of a script I can make to use the wiimote as a light gun in Mame
3.) Fast and easy additional player (2 player machine add another player using the wiimote)
4.) Game Specific Scripts in case you want to try something different than Arcade controls for a day. (like say tilt the wiimote left/right for the right joystick on Robotron and use the Analog stick on the nunchuk for the left joystick)
So first of all, the important parts. How to set this up and get it working. For that I am just going to cut & paste my old guide here, from there I will be looking for questions/comments/requests and see what I can do for you guys.
The sky is the limit here, the nunchuck & classic controller add-ons (and even balance board & guitar) work also but I have no experience with the guitar or balance board since I do not own them.
A Short Video showing off my Winamp Script to show you what I mean:
I get "camera shy" so my voice sucks since I recorded on the spot and I was on break at work but still its a good visual idea of what you can do.
Notes
1.) Glovepie can do much more than just the wiimote stuff, its a more than capable replacement to Xpadder, and also its a good way around limitations on key bindings or a easy way to assign a macro to a key. The reason this guide just poped in my head is because I helped a forum member that was trying to get a gamepad to work as a keyboard and xpadder was not working.
2.) Below was the guide for how to get this working on The EEE 1000H and it required hacking the bluetooth drivers, on PC you can just buy a dongle that uses Bluesoleil or the Toshiba Drivers and avoid that part totally, here is a list of known working bluetooth adapters - http://www.wiili.org/index.php/Compatible_Bluetooth_Devices
Cut & Paste
_________________________________________________
*** Guide Start*****
This may or may not work on other EEE units. I have only tested it with the 1000H. Its a two part guide.
See it in Action!
**Edit its posted above so I cut this out really fast****
Bear with me my first video in a long time so I always do that um.. what to say next camera shy thing, but it gets better half way thru. Also I was at work so I was paying more attention to my security camera than to the video :P (no time to do this stuff at home)
Guide Start
First how to get bluesoleil to work and then how to actually get the wiimote up and going is second.
Ok lets get started!
Bluesoleil is just a bluetooth driver/software. It seems to be one of the best in my opinion and its the only one except Toshiba's bluetooth stack that has worked for me to use the wiimote.
The EEE 1000H comes with the Broadcom BT-253 card, so the drivers stock are broadcom, I also did a inf hack and forced the Microsoft drivers and those did not work ether.
A strange behavior and the first obstacle I had to pass is the fact that Bluesoleil did not support the EEE's card. My G50V has the exact same card (BT-253) and it said it supports it and installed just fine. The EEE however it said it did not support it.
Its something in the bios or maybe the software level that causes this. If you uninstall the broadcom software your bluetooth hardware completely vanishes! I mean *poof* gone, it wont even show up as an unknown device in the device manager. So I dont know how/why its like this but thats probably why it said its not supported, and when I uninstalled the broadcom stuff why it said it cant find any bluetooth hardware.
So how to get around that? Well most of the credit goes to who ever wrote this little guide: http://www.wiili.org/forum/bluesoleil-solution-for-not-supported-adapters-t794.html
Thats what I used, but I had to change a few things to get it to work as the first time I followed his directions exactly it did not work for me.
So STEP BY STEP I am going to walk you thru how to do this on the EEE 1000H using Windows XP.
1.) First you need to find the vid & pid of your bluetooth card. Its probably going to be the same for all of them if they use the same card but just in case this is what you do:
start --> settings --> control panel --> system --> hardware --> device manager --> bluetooth --> right click -->
properties --> details --> drop down to hardware id's --> USB\Vid_0b05&Pid_b700 (or something different if yours is different)
2.) With those numbers now your ready to start. Go ahead and install bluesoleil. You can get the latest version trial right off there site http://www.bluesoleil.com/ . It can install even tho you wont be installing the drivers it will put the software and driver files on your computer.
3.) So if you try to open the bluesoleil interface it will say no hardware found, and if you use the compatibility tool it will say your hardware is not supported. So this is where we force the computer to lie to bluesoleil and say it does work (and it does)
So onto the file hacking/editing
The first file is C:\Program Files\IVT Corporation\BlueSoleil\driver\usb\btcusb.inf
Just open it with notepad or something (right click open with...)
There are two changes to make on this file.
Near the top just a few lines down is the "Control Flags" section
Make it look like this:
Basically just delete the * and add the pid/vid codes.
Next closer to half way down that file you want to find the IVT section with the list of all the cards & manufactures.
I just edited the very first broadcom card to have my codes so it should look like this:
This file is done so save it.
4.) The next and final file to edit is under the main bluesoleil directory. C:\Program Files\IVT Corporation\bttl.inf
This one will have tons of entries that say [HWXXX] (the X is a number) and then it has the cards vid/pid and information.
I just scrolled down to the very first entry that was broadcom and changed the values accordingly (and deleted that one line that was under the manufacturer name.
So it should look like this:
It was HW5 that I edited.
5.) Save the file your done!
6.) Last thing to do is just change the drivers from broadcom to bluesoleil:
Go back to the device manager and to your bluetooth card and this time when you right click instead of selecting properties like you did when you looked up the pid&vid select Update Drivers.
7.) This is the order of what you select to change the drivers:
update driver --> no not this time --> install from specific location --> dont search I will choose --> have disk --> btcusb.inf file in bluesoleil driver/usb folder
8.) Done! You should now have bluesoleil as your driver for the card. These drivers are so much better than broadcom & microsoft just that this is a trial with limited data transfer before you have to restart (bluetooth will turn off, and you have to turn it back on) However for the wiimote the 2mb data limit is quite enough actually you can play for well over an hour before the limit hits and if it does just restart your bluetooth.
If you really like the drivers, you can buy them or seek alternate ways to make it work.
So now making the wiimote work part 2 of the guide!
Well first of all I think I have most of this explained here: http://forum.notebookreview.com/showthread.php?t=255085
Ok What you Need:
GlovePie - Here: This is the main program you need it tells the computer what to do with the wiimote commands.
It works on its own script/code that is pretty easy to learn (at least the basics) an easy example would be wiimote1.A = Key.Space, that would tell the computer if you press A on the wiimote #1 to press space on the computer.
Winremote - Here: I would load this program up first thing after pairing your wiimote just to see if its working. If it is you will see all the sensors sending data as you move the wiimote and can press the buttons and things. Its actually a program to use the wiimote as a mouse too.
Bluesoleil - Here: The bluetoth software/drivers
PPJoy - Here: You actually do not need this for most things like snes/sega emulation or controlling winamp. This creates a virtual joystick so that windows can have a registered controller. The main thing this is good for is if you need analog support. So good for nintendo 64/playstation emulation and for computer games. It only works in 32bit operating systems tho. Pinnicle Game Profiler will at some point be an alternative since it works in x64.
Patience! - It takes time to get everything together like your scrpts and learn the code to make your own but its worth it. No other controller offers so much freedom and capabilities. I suggest this site to learn scripting and to just use pre-created ones wiili.org. Also I will share the two scripts that I use the most to get you started:
My Winamp Script (You have to enable global hotkeys)
--- Code: ---//Really Cool Winamp Script for global keys
//Created by ViciousXUSMC some original script from Spence 2008
//The settings are pretty straight forward,
// Track Changes using a 'Flicking' Technique. (LEFT/RIGHT Flick) make value higher for a harder flick or less for a soft one.
Key.Ctrl + Key.Alt + Key.PageUp = (Wiimote1.RelAccX < -40) in m per s per s
Key.Ctrl + Key.Alt + Key.PageUp = (Wiimote1.RelAccX > 40) in m per s per s
// *************The Technique Below Requires You To Press & Hold The B button whilst tilting**************
// Skip Forward Slow (Tilt the wiimote more than 20 degreees to the right, but not more than 60 degrees to achive a slow
// seeking speed)
if wiimote.b = true then
Key.Ctrl + Key.Alt + Key.Right = (Wiimote1.Roll > 20 but < 60) deg
wait 400 ms
key.ctrl + key.alt + Key.Right = false
endif
// Skip Forward Fast (Tilt the wiimote more than 80 degrees to the right to do a super seek....It does skip VERY fast
// so you can simply hold the wiimote at 90 degrees and 'flick' the B button to do 10 second incriments)
if wiimote.b = true then
Key.Ctrl + Key.Alt + key.right = (Wiimote1.Roll > 80) deg
wait 50 ms
key.ctrl + key.alt + Key.Right = false
endif
// Tilt wiimote up or down while holding B to change volume you will feel vibration while changing volume.
if wiimote.b = true and wiimote1.pitch < -25 then
volumedown = true
wiimote1.Rumble = true
wait 40 ms
volumedown = false
wiimote1.rumble = false
endif
if wiimote1.pitch > 30 and wiimote.b = true then
wiimote1.rumble = true
volumeup = true
wait 40 ms
wiimote1.rumble = false
volumeup = false
endif
// Skip Back Fast (Tilt the wiimote more than 80 degrees to the left to do a super seek....It does skip VERY fast
// so you can simply hold the wiimote at 90 degrees and 'flick' the B button to do 10 second incriments)
if wiimote.b = true then
Key.Ctrl + Key.Alt + key.Left = (Wiimote1.Roll < -80) deg
wait 50 ms
key.ctrl + key.alt + Key.Left = false
endif
// Skip Back Slow (Tilt the wiimote more than 20 degreees to the left, but not more than 60 degrees to achive a slow
// seeking speed)
if wiimote.b = true then
Key.Ctrl+ Key.Alt+ Key.Left = (Wiimote1.Roll < -20 but > -60) deg
wait 400 ms
key.ctrl + key.alt + Key.Left = false
endif
// Toggle Visual Effects: Press A to turn on and off
// this is not a default global key and must be added manaually ctrl + alt + v
if Wiimote.A = true then
Key.Ctrl + Key.Alt + Key.V = true
wait 400 ms
Key.Ctrl+ Key.Alt+ Key.V= false
endif
//***********************************************************************************************************************
//Play/Pause use the home button on the wiimote
Key.PlayPause = Wiimote.Home
endif
//Code taken from the Original 'Wiimouse_IR' Script. I have made a slight change to the delay to suit my taste.
//Thanks due once again.
//D-Pad
if wiimote.Up
Up = true
Wait 90 ms
Up = false
endif
if wiimote.Down
Down = true
Wait 90 ms
Down = false
endif
if wiimote.Left
key.ctrl + key.alt + key.pageup = true
Wait 90 ms
key.ctrl + key.alt + key.PageUp = false
endif
if wiimote.Right
key.ctrl + key.alt + key.pagedown = true
Wait 90 ms
key.ctrl + key.alt + key.pagedown = false
endif
//Wianamp Volume From same script as D-Pad Functions
if wiimote.plus then
key.ctrl + key.alt+ key.Up = true
wait 60 ms
key.ctrl + key.alt+ key.Up = false
endif
if wiimote.minus then
key.ctrl + key.alt+ key.down = true
wait 60 ms
key.ctrl + key.alt+ key.down = false
endif
--- End code ---
ZSNES w/ Nunchuk script
--- Code: ---Left = -2 < Wiimote1.Nunchuk.JoyX < -0.4
Right = 2 > Wiimote1.Nunchuk.JoyX > 0.4
Up = -2 < Wiimote1.Nunchuk.JoyY < -0.4
Down = 2 > Wiimote1.Nunchuk.JoyY > 0.4
Key.Y = Wiimote1.Left
Key.A = Wiimote1.Right
Key.B = Wiimote1.Down
Key.R = Wiimote1.B
Key.L = Wiimote1.Nunchuk.ZButton
Key.Comma = Wiimote1.Minus
Key.Dot = Wiimote1.Plus
Key.X = Wiimote1.Up
--- End code ---
****Guide End****
____________________________________
End Copy & Paste
ViciousXUSMC:
Copy & Paste Guide 2
_________________________________
***Guide Start*****
My quest to find a good wireless bluetooth controller has lead me to one I already had. My Wiimote!
Some very bright people have been working on programs to integrate the wiimote as a pc controller and I have been messing with it for awhile now and it works GREAT!
This should appeal to anybody with a Home Theater PC, Tech Geeks, Wii Owners, somebody who seeks a bluetooth controller, and more.
Applications for use are very large, I have used it as a SNES controller for emulation, a mouse for web browsing, a media controller for WMP & Winamp , and I still plan to try a lot more things.
It would be good as a pc gamepad too, or you could be creative and do say a power point presentation with it.
So.....
What you Need
________________________
> A Wiimote - Your Wii Controller
> A compatible bluetooth connection - More on this later
- I use AZiO BTD603-132 USB 2.0 Bluetooth Adapter - Probably one of the best you can buy and it works perfectly!
> Glovepie - http://carl.kenner.googlepages.com/glovepie - The very core of how it all works, a program that interprets all the wiimote signals and turns them into pc commands.
What you may Want
_________________________
> The nunchuck or classic controller connections for the wiimote - to give you more buttons and options
> A Wii sensor bar or some form of sensor bar - So you can use the pointing feature of the Wiimote (you can build one yourself I will have a guide on this later)
> PPjoy - http://www.geocities.com/deonvdw/Docs/PPJoyMain.htm - Allows you to emulate a computer joystick/gamepad would be good for PC game use or certain emulators.
> BlueSoleil - http://www.bluesoleil.com/download/ - A free trial 3rd party bluetooth stack that seems to work much better than the stock microsoft one.
> Widdcom - http://www.broadcom.com/products/bluetooth_update.php - Another bluetooth stack that many have said works perfectly, a good alternative to MS drivers and made to work with broadcom hardware.
> Pinnacle Game Profiler - http://www.pinnaclegameprofiler.com/ - A program that adds gamepad support to any game, via letting you give keyboard commands to any gamepad, but recently they caught onto the wiimote craze and started to implement the wiimote. v4.40 now supports everything except IR and thats supposed to come next version. Its a work in process and I didnt get it to work for me yet but this may very well be the future alternative to PPJoy if you use a x64 based OS.
How it works & Pairing your Wiimote
_________________________
So if you did not already know, the Wiimote communicates with the Wii via bluetooth, the same technology many of us have in our laptops and pc's so the first hurdle to do this is already done by Nintendo. You can actually pair a Wiimote to your computer very easy with no mods or special software.
It works perfect for me on my Asus C90S with its internal BT card & the Toshiba BT stack.
To pair the Wiimote you hold the 1 & 2 buttons down and the LEDS with flash letting you know its in pairing mode, hold them down the entire pairing process and search for BT devices on your computer. A Wiimote will show up as Nintendo RVL - CNT -01 I believe the 01 will change one digit for each additional Wiimote you pair, so yes its totally possible to use 2 controllers at once for 2 player games.
This is what it looks like for me using the Toshiba BT stack since I have already added the device in the past and saved it:
When you have actually connected to the device and are currently paired with it, it will look like this:
Now the BT Stack is the software side of things, this is the Toshiba stack. Lucky for you guys I think most laptops come with this so your steps will be the same, however if you do use a different one (mostly the Microsoft Stack is the other main one) then your interface will be totally different.
Well, Congratulations your Wiimote is now tied to your computer! However its totally useless at this point and wont do anything.
Thats because the Wiimote has no PC drivers or any kind of communication that the PC understands, so thats where Glovepie comes in. So still this is the Pairing section and there is still a lot to know about this step because for many this may be the first problem you run into.
-NOT EVERY BLUETOOTH DEVICE IS COMPATIBLE WITH THE WIIMOTE-
Just like many other things bluetooth, wireless headphones ect, some older adapters wont work, and in the case of the wiimote it seems to be even more sensitive to what it wants to work with.
Here is the best resource I can offer you for now: http://wiibrew.org/index.php?title=List_of_Working_Bluetooth_Devices also try http://www.wiili.org/index.php/Compatible_Bluetooth_Devices
A list of devices confirmed to have worked for others, 99% of these people are doing this on there PC with a USB Bluetooth adapter, maybe you will all be lucky and have it work with your laptops internal card.
My personal observation is that its the BT Stack that is causing the most problems, the MS stack doesn't work for a lot of people so they are manually using a free trial of a BT Stack called BlueSoleil (http://www.bluesoleil.com/download/). Its working for most people it seems, but a few have problems with it. However I have not seen any failed reports for the Toshiba Stack, the one I use. Thing is for those PC guys that stack cost 60$, but for me it was part of my software for my laptop so you may have it too.
(Vicious Notes: I just purchased this off newegg for my home pc: http://www.newegg.com/Product/Product.aspx?Item=N82E16833340002 Its very highly rated, comes with the Toshiba Stack, and I have read a review or 2 inside newegg where somebody said it works with the wiimote, but its not in that confirmed list above. After I get it if it works I will let you guys know)
So if you got past this first step and have your Wiimote paired we can move to step 2.
Using Glovepie
________________________________________
Download it from the above link and extract it. This is an ingenious program that allows custom script to be written to give the wiimote input a secific pc command. Version 3.0 at the time of writing this has full support for the nunchuck & classic controller, full support for everything the Wiimote does, pointing, tilt, accelerometer, leds, speaker, vibrate, buttons ect. What you can do with the script is only a limit of your skills and imagination.
I cant teach you much in this area because I am not a script witter or programmer but I am learning. So the resources I use I shall share with you.
Wiili.org - has a wiki type setup with some scripts there and a great forum (http://www.wiili.org/forum/) you can learn a lot there or just use existing scripts from other users.
Google - use some common sense with your search like "wiimote scripts pc" or "glovepie scripts" and you can find many more pages, a good example of one I just found that did me good was..
Square Pheonix - http://www.squarephoenix.com/?v=glovepie_scripts he only has a few scripts on there but man are they good! He had exactly what I needed to know to use my nunchuck analog stick like a d-pad for my snes emulator. So I actually just made my first script that I will share with you guys somewhere below. Also he has a perfect PPjoy script to use with PPjoy to have a fully functional windows gamepad.
Explore and learn here guys, share your scripts with the rest of the forum if you make any good discoveries. I did not think at first the Wiimote could be a good controller because the lack of buttons, but you can easily do things like assign a roll or shake of the controller to a button, or even do combo buttons say press A on the wiimote to use the keyboard X key, but hold B and press A on the Wiimote to press the enter key, A combo key setup like that can easily double your button count, and you could even do a triple button combo, its all script so its fully programmable.
So here is an example my first script -
--- Code: ---Left = -2 < Wiimote1.Nunchuk.JoyX < -0.4
Right = 2 > Wiimote1.Nunchuk.JoyX > 0.4
Up = -2 < Wiimote1.Nunchuk.JoyY < -0.4
Down = 2 > Wiimote1.Nunchuk.JoyY > 0.4
Key.Y = Wiimote1.Left
Key.A = Wiimote1.Right
Key.B = Wiimote1.Down
Key.R = Wiimote1.B
Key.L = Wiimote1.Nunchuk.ZButton
Key.Comma = Wiimote1.Minus
Key.Dot = Wiimote1.Plus
Key.X = Wiimote1.Up
--- End code ---
Just copy & paste it into a new script window in glovepie I call it VicousXUSMC-SNES-Nunchuck as the file name but I just gave the script rather than a .pie file (the format glovepie uses)
Its designed to be a SNES controller inside my emulator Zsnes, holding the nunchuck & wiimote the analog stick is the d-pad, the dpad on the wimote is the 4 face buttons of the snes controller, the z button on the back of the chuck is the L button, and the B button on the back of the wiimote for the R, then I use +/- for start and select. Its very close to using an actual SNES controller so thats why I did it this way. You have to map my keyboard settings in Zsnes but I just matched keyboard keys to snes key names for ease of setup. It works great and I was just playing secret of mana abit ago with it. I will make a video of it in action when I get the time.
This is just the initial post of the guide to get it on the map, I will add more detail, answer questions, try to make some videos, post good scripts, ect on a continual basis over time as long as I find anybody interested in the information.
There are NO bluetooth controllers for the PC out there, I searched and the only one I could find was 70$ for a d-pad and 8 dinky buttons plus it was not for PC it was for mobile devices like a blackberry. The wiimote puts it to shame and cost less, for me as a cordless guy this was a major breakthrough for gaming on the go.
Edit: Done with my 2nd script! Its a cool winamp script that uses all of the neat features of the wiimote. Here is a video I made to showcase it in action. Just a quicky, no retakes, no editing, no camera man so dont worry about video quality.
http://www.youtube.com/v/viUYjt5so10&hl=en
Edit2: PPJOY does not work with 64bit (atleast not for me) I wanted to do some of that cool FPS game stuff where I need to create a virtual joystick in windows with ppjoy and it wont install on my vista ultimate x64 on my desktop. However it did install in Vista x86 on my laptop. So x64 is not always the best thing and this is yet another big reason why I would stick with x86 for now.
Glovepie does work for both so dont be worried about that.
Edit3: Pinnacle Game Profiler had added the wiimote (and nunchuck/classic controller) to its list of controllers it can use. This program works in x64 OS's so this is probably the future alternative to PPjoy for a x64 based OS. Its buggy right now I suppose but they are still working on it so given good time it should mature into a great program, also it could completely bypass the need for glovepie by letting just bind the wiimote directly to a PC pad with keyboard functions, so this will be good for the novices or those who do not wish to get too advanced as it matures.
***Guide End****
________________________________
End Copy & Paste
So guys yeah its a mess right now, I just wanted to get my rough draft up there for you and will consolodate the information and tweak it into a better guide later. Im about to crash for the day.
I hope somebody finds this idea and information useful and that I can come up with some really great scripts for us to use.
Ginsu Victim:
Just a quick question. I haven't read through this completely, so I apologize if this is covered.
In the section about being able to use two Wiimotes, is that two Wiimotes using one bluetooth, or do you need a bluetooth for each?
ViciousXUSMC:
Just one bluetooth dongle can support more than 1 device.
The one I have works great and it was only like $20 shipped.
Hoopz:
If anyone needs a cheap Bluetooth dongle, I got this one a few weeks ago from Amazon. Including shipping, it was less than $10 total.
http://www.amazon.com/gp/product/B0019SI266
I haven't had any issues with it. It recognized by Windows, BlueSoleil, etc and seems to work well. I bought it thinking that if it didn't work for $8 or whatever, it was a decent gamble.
And this is one intense writeup. Thanks for putting it together. :o
:cheers: