Monday, December 31, 2007

Guitar Hero III Buttons

A quick followup to my last post: My brother also got Guitar Hero III: Legends of Rock for Christmas (the Wii was his own money about a month ago), and I suspected that the guitar would be recognized as a classic controller, but didn't confirm it until this morning. So, here is the key setup for the Guitar Hero III controller (all under the Classic Controller extension) (I'm doing this right-handed, although it will remain the same for left-handed players, just that the reversible buttons get switched in software):
Green = A
Red = B
Yellow = X
Blue = Y
Orange = ZLeft (which is on top of the classic controller)
Whammy = Pressure Sensitive Left (which is on top of the classic controller), where neutral position = 0x10 (half way), and full whammy = 0x1A (at least on this controller, the game requires whammy calibration, so it may be that other controllers have slightly different values)
Strum Down = Digital Pad Down (software would have to reverse this for left-handed players)
Strum Up = D-Pad Up (again, reverse in software for lefties)
- Button = - Button on Classic Controller
+ Button = + Button
Analog Stick = Left Analog Stick, where moving right for right-handed players (away from guitar neck, towards inset WiiMote) = right, and moving down for right-handed players (towards guitar heel/neckjoint, away from players body) = down. This would be reversed in software for lefties.

Now I have to set up Frets on Fire to support this...

How To Get WiiMotes Working With Linux

So my brother recently got himself a Wii, and I decided it would be fun if I started trying to get the Wii Remote working with Linux. Apparently I'm not the first to do this, and the work of other people has made it quite easy to get working. So, here are my steps to getting the WiiMote working in Ubuntu Gutsy:
1 - Purchase an ASUS WL-BTD201M adapter from NCIX
2 - Get all the required packages from the repository by running
sudo apt-get install wmgui wminput
this will pull in all dependencies including bluez (the bluetooth api, and various libraries)
3 - Run wmgui (should be in Applications->Accessories menu, or run from command line)
4 - Go to File->Connect in wmgui
5 - Click the 1 and 2 buttons at the same time on your WiiMote to put it into discovery mode
6 - Click OK on the prompt that came up in wmgui
7 - watch as your WiiMote now works in Linux!

Getting your WiiMote to control your mouse in Linux and do other fun things requires some more steps:
3 - Do steps 1 and 2 above
4 - Run the command
sudo modprobe uinput
5 - Put your WiiMote into discovery mode by pressing 1+2
6 - Run the command
sudo wminput
7 - Observe as the tilt of your WiiMote controls the mouse position, and the buttons control mouse clicks!

There are different config files for wminput, each can be viewed/modified at /etc/cwiid/wminput/ and you can run different config files by either changing the "default" symbolic link, or passing the -c option to wminput, eg:
sudo wminput -c ir_ptr

See how easy that was! Have fun!