Frets on Fire with Guitar Hero World Tour (GhWt) on Ubuntu

10 02 2010

The last few days i decided to add another trick to my Media Center (running Ubuntu 9.10) : Play FoF with it.
The guitar that i had was the one from the Metallica Edition , which after reading up and down about it, turns out is of the World Tour (GhWt) breed.

Grabbed the bluetooth adapter, the guitar and the software of the cwiid package: libcwiid1, wminput, wmgui and the python cwiid module.

If you are reading this post you must know by now that the GHWT is not supported by the libcwiid1 found in the repositories.
This leaves as an only option compiling it from source.
The source of version 0.6 can either be picked up from
the old location of the project http://abstrakraft.org/cwiid/,
or from
the new location on GitHub http://abstrakraft.github.com/cwiid/.

At the end of this post i will post a script for each one of the options since the sources seem to differ.
The version from Github is meant to work as soon as compiled with GHWT. For me, no matter what guitar script i use it did not.
I will anyway present it as an option for the truth’s sake.

Installing Cwiid 0.6 From the old project page
*I suggest you go through this procedure and read it at least one to know what’s happening. Otherwise, you can jump at the end and either download the script or the .deb package.

We need to install necessary dependencies from this.
sudo apt-get install automake autoconf flex bison libbluetooth3 libtool checkinstall -y

Pick up the source from the site:
wget http://abstrakraft.org/cwiid/downloads/cwiid-0.6.00.tgz

Extract and move to the working dir:
tar zxvf ./cwiid-0.6.00.tgz
cd ./cwiid-0.6.00

This is the old version that does not support GHWT but it can be patched to do so.
It can be found here http://abstrakraft.org/cwiid/ticket/79.
*This patch is meant to be applied to the source from svn. So the path of the files is hardcoded id it with 'trunk/' preceeding.
Quick dirty trick:

mkdir trunk/
mv ./* trunk/

Afterwards there is a second patch that will need to be applied.
During the make process this error came up:
gcc -g -Wall -W -DHAVE_CONFIG_H -I/home/dreamer/src/cwiid/common/include -fpic -c -o bluetooth.o bluetooth.c bluetooth.c: In function ‘cwiid_get_bdinfo_array’: bluetooth.c:125: warning: implicit declaration of function ‘hci_remote_name’

In fact the name of the function needs to be hci_read_remote_name.
This patch can be found here : http://abstrakraft.org/cwiid/ticket/74.

Basically this is what just happened after creating and moving to the trunk folder:
wget http://abstrakraft.org/cwiid/raw-attachment/ticket/79/guitar.diff -O ./guitar.diff
patch -p0 < ./guitar.diff
cd trunk/
wget http://abstrakraft.org/cwiid/raw-attachment/ticket/74/hci_read.patch -O ./hci_read.patch
patch -p0 < ./hci_read.patch

We are ready to continue with the compiling process.
Run the automated procedures to create the configure script
aclocal
autoconf

then we make and install
make
sudo make install

Making the uinput module known to the system
sudo depmod -a

Loading the module
sudo modprobe uinput

Editing the modules to make uinput present after a restart
sudo echo "uinput" >> /etc/modules

That's it.

Script to automate this procedure :
http://www.mediafire.com/file/ytet0iydzqz/script_cwiid_0.6_patched_GHWT.tar.gz

64-bit Debian/ubuntu package :
http://www.mediafire.com/file/mqiaddzmmw4/cwiidghwt_0.1-1_amd64.deb

32-bit Debian/ubuntu package (from ubuntu forums since i am currently on a 64 it machine and could not package it) :
http://ubuntuforums.org/showpost.php?p=7741117&postcount=2

Installing the latest from GitHub

Installing the neccessary dependencies:
sudo apt-get install automake autoconf flex bison libbluetooth3 libtool checkinstall -y

Retrieving the latest Cwiid from github:
wget http://github.com/abstrakraft/cwiid/tarball/master

Extracting and Changing working dir
tar zxvf ./abstrakraft-cwiid-*
cd abstrakraft-cwiid-*

Run the automated procedures to create the configure script
aclocal
autoconf

then we make and install
make
sudo make install

Making the uinput module known to the system
sudo depmod -a

Loading the module
sudo modprobe uinput

Editing the modules to make uinput present after a restart
sudo echo "uinput" >> /etc/modules

Done.
Script to automate this procedure http://www.mediafire.com/file/ytet0iydzqz/script_cwiid_0.6_patched_GHWT.tar.gz

Testing the whole thing
sudo wminput
Put Wiimote in discoverable mode now (press 1+2)...

After you press 1+2 on the wiimote you should see righ under the above output:
Ready.

Now the configuration file that worked with my guitar is the following:
#buttons
Wiimote.A = BTN_LEFT
Wiimote.B = BTN_RIGHT
Wiimote.Up = KEY_UP
Wiimote.Down = KEY_DOWN
Wiimote.Left = KEY_LEFT
Wiimote.Right = KEY_RIGHT
Wiimote.Minus = KEY_BACK
Wiimote.Plus = KEY_FORWARD
Wiimote.Home = KEY_HOME
Wiimote.1 = KEY_PROG1
Wiimote.2 = KEY_PROG2
Plugin.led.Led4 = 1
# Profil wiiguitar
Classic.A = KEY_F1
Classic.B = KEY_F2
Classic.X = KEY_F3
Classic.Y = KEY_F4
Classic.ZL = KEY_F5
Classic.Down = KEY_ENTER
Classic.Up = KEY_ENTER
Classic.Minus = KEY_F6
#Classic.Dpad.X = ABS_X
#Classic.Dpad.Y = ABS_Y
#Classic.LStick.X = ABS_HAT0X
#Classic.LStick.Y = ABS_HAT0Y
#Classic.RStick.X = ABS_HAT1X
#Classic.RStick.Y = ABS_HAT1Y
#Classic.Plus = BTN_START
#Classic.Home = BTN_MODE
#Classic.L = BTN_TL
#Classic.R = BTN_TR
#Classic.ZR = BTN_TR2

Let's say i've saved it as guitar_wii in ~/Desktop.
On the command line you would execute:

sudo wminput -c ~/Desktop/guitar_wii
Put Wiimote in discoverable mode now (press 1+2)...

After you press 1+2 on the wiimote you should see righ under the above output:
Ready.

About these ads

Actions

Information

4 responses

10 02 2010
jr51970

Thanks for the info. I’ll have to try it.

10 02 2010
Sidrit Trandafili

no worries.
let me know how it goes.

14 07 2010
W

I know this blog is somewhat old, but is there any way to get the whammy bar working? Whammy key seems to share the same data as RT on the classic controller, but I cant assign a key to it, wminput wants a ABS value, and if I assign one, then fofix doesnt see any key presses when whammy is used.

wmgui shows the whammy bar as using “R11″ when not in use and “R18″ when fully used (and anything in between since its analog). Is there any way to assign a key to R11 and R18?

Hope this makes sense.

Otherwise everything works great. :)

1 08 2010
John

Hello there
Thanks a lot for all this huge and valuable info !
I love this game … Thanks !

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s




Follow

Get every new post delivered to your Inbox.

%d bloggers like this: