I've been owning a Nintendo Wii for quite a while now, but so far only played an occasional game of tennis or the like. Over the holidays I got The Legend of Zelda: Twilight Princess, which is a really nice game in itself. What is even more interesting though, is that this game allows you to run homebrew software on your Wii.
What you usually want to do, is to use the so-called Twilight Hack to install the Homebrew Channel on your Wii (you'll need an SD card and the Twilight Princess game for this). Once the process has finished you won't need the game anymore though.
An SD card max. 2GB in size (not an SDHC card!), an SD card reader in your PC or laptop, and the Twilight Princess game (which you must play at least once).
First, you'll want to backup your Twilight Princess save games (if any). For that, we format the SD card (it needs a FAT16/FAT32) filesystem.
$ mkfs.vfat /dev/mmcblk0p1 (you may need to change "mmcblk0p1" to whatever fits your setup)
Now insert the SD card into the Wii, start the Wii, go to Wii Options --> Data Management --> Save Data --> Wii and copy your Twilight Princess save games onto the SD card. Then, poweroff, remove the SD card, insert it into your laptop/PC and copy the save games to a safe place.
$ mount -t vfat /dev/mmcblk0p1 /mnt $ mv /mnt/private ~/zelda_savegames
Next up: download the Twilight Hack and Homebrew Channel, and put the files on the SD card:
$ wget http://hbc.hackmii.com/dist/twilight-hack-v0.1-beta1.zip $ unzip twilight-hack-v0.1-beta1.zip $ cp -r private /mnt $ wget http://hbc.hackmii.com/dist/the_homebrew_channel-1.0.1.tar.gz $ tar xfvz the_homebrew_channel-1.0.1.tar.gz $ cp the_homebrew_channel-1.0.1/boot.dol /mnt $ umount /mnt
Now remove the SD card, insert it into the Wii and power-up the Wii. Go to Wii Options --> Data Management --> Save Data --> Wii, delete the Wii Twilight Princess save games, then copy the "Twilight Hack" save game from the SD card onto the Wii (you need to select the correct one for your region).
Quit the menu, start Twilight Princess, load the "Twilight Hack" savegame and finally talk to the person in front of you (do not perform any other actions, or the Wii may crash!). Follow the remaining instructions on the screen and you're done. You now have an additional channel named Homebrew Channel where all your homebrew programs/games (and your own Free Software programs you may write/port) will appear.
So far, there are no real applications in the Homebrew Channel, you need to put all the homebrew software you want on the SD card. There's a huuuge list of applications and games to choose from, many of them Free Software with source code, some however are binary-only.
Basically, you put each application in a sub-directory of apps/ on the SD card, the most important file in every sub-directory is always boot.dol. If you have a boot.elf file instead, you'll probably need to convert it using the ELF to DOL converter.
You may now want to restore your Twilight Princess save games onto the Wii, you no longer need the "Twilight Hack" save game. Put your ~/zelda_savegames directory on the SD card and name it private/ again. Insert the SD card into the Wii and copy the save games on the Wii (similar procedure as above).
Have fun with homebrew software on your Wii, or even better write your own software or port existing Linux applications/games!
Yes, it's that time of the year again... it's almost Christmas, which means that I once again updated my 10 + 100 Creative Commons Christmas Songs blog article I originally wrote in 2005. That's a collection of a lot of freely downloadable, Creative Commons licensed Christmas music.
Some of the older entries in the list are no longer available unfortunately, some only needed a URL update, and I also added more than 30 new songs this year.
This currently makes a total of 256 CC Christmas songs (more will probably be added over the next few days), so head over to the full song list and get those downloads started...
Just FYI, I've updated my Playing Starcraft on Linux using Wine article from a few days ago, adding some more info about:
Please read the updated article for details.
Here's a quick intro to what I'm hacking on at university. This is a new omnidirectional robot platform we got in the lab. It's controlled via CanOpen-over-EtherCAT (which is a realtime Ethernet protocol "extension", more or less). As we don't want to deal with any of the Windows software that's usually used for such stuff, we're employing the IGH EtherCAT Master (r1549) implementation (GPL/LGPL) on Linux and it works quite nicely.
I hacked together a few shell scripts that invoke the ethercat command line tool with certain parameters to control the motor velocities "by hand", which then soon turned into a "dancing" demo of the robot ;-)
See http://www.youtube.com/watch?v=n_vF4NK26fM for the YouTube video of the dancing bot. It's just a quick (hardcoded) hack for now, there's lots of room for improvements, of course (e.g. detect baselines of random music you throw at it). The demo in the background is the fantastic Masagin by Farbrausch.
I've also hacked up a small Python script to control the robot with a Wiimote (using cwiid on Linux), which also works quite nicely. I further plan to make a small program for controlling it via a 3D mouse or the like in the future...
The longer-term plan for the robot platform is that it'll get a "backbone" and two very nice robot arms for grabbing stuff etc.
$ apt-get install wine (as root) $ winecfg
The winecfg (graphical) utility will setup some config file defaults in your ~/.wine directory. Click on Graphics and activate Allow DirectX apps to stop the mouse leaving their window. Also, click on Audio (a dialog will pop up, just click OK). This will autodect your soundcard and setup Wine to use it. Under Drives click Add (this will add D:) and change the path to /media/cdrom, so that Wine knows about your CD-ROM drive. Finally click OK to close winecfg and save the settings.
The next step is to insert the Starcraft CD-ROM into the drive and start the installer using Wine:
$ mount /media/cdrom (as root) $ wine /media/cdrom/setup.exe
Follow the instructions in the installer until the Starcraft install is finished (you'll need your CD key number), then exit the installer (don't start playing Starcraft right away).
The next step is to get the latest patch and get rid of the need to insert the CD-ROM every time.
$ wget http://ftp.blizzard.com/pub/starcraft/patches/PC/SC-1161.exe $ wine SC-1161.exe
After the patch is installed click OK and Starcraft will be started (very annoying). Leave the game again. We'll get rid of the CD-ROM requirement now:
$ cp /media/cdrom/install.exe ~/.wine/drive_c/Programme/Starcraft/StarCraft.mpq
That's a pretty big file, it may take a while. You might have to change "Programme" in the path (I have the German Starcraft version). That's it. You can now play Starcraft (without needing the CD-ROM) using:
$ wine ~/.wine/drive_c/Programme/Starcraft/StarCraft.exe
A good thing is, it even works nice and fast with the open-source nv NVIDIA driver (no need to install the proprietary driver).
I noticed one very annoying "bug" with the mouse behaviour at first. The mouse would sometimes just get stuck during the game (which is a total disaster of course, if you're in the middle of a fast-paced game). Left-clicking somewhere would "unstuck" the mouse, but it's still very bad. After many, many hours of reading bugreports and trying various patches I finally found out the root cause for the problem.
It's somehow related to my window manager (IceWM); whenever you move the mouse to the bottom of the Starcraft screen (where the IceWM status bar is, even though it's not on top or even visible, and even though Wine/Starcraft runs in full-screen mode!), something funny happens with X11/IceWM and the mouse gets stuck. I haven't yet found out if/which IceWM option could fix this behavior, but I have a small work-around. Just start Wine directly on a second X11 server with Starcraft (without any window manager being involved):
$ xinit -e '/usr/bin/wine ~/.wine/drive_c/Programme/Starcraft/StarCraft.exe' -- :1
No patches needed (stock Wine from Debian unstable works fine, that's version 1.0.1 right now). I hope this saves other people some debugging time...
In order to play the Brood War expansion you can follow a similar procedure. Insert the Brood War CD-ROM, then:
$ mount /media/cdrom (as root) $ wine /media/cdrom/setup.exe $ cp /media/cdrom/install.exe ~/.wine/drive_c/Programme/Starcraft/BroodWar.mpq $ wget http://ftp.blizzard.com/pub/broodwar/patches/PC/BW-1161.exe $ wine BW-1161.exe
After you've done that, you can start both Starcraft (classic) and Brood War via:
$ wine ~/.wine/drive_c/Programme/Starcraft/StarCraft.exe
You will be asked in the game whether you want to actually play the Starcraft or Brood War variant.
As of version 1161 for the Starcraft / Brood War patch, there's a new game option which can drastically lower the CPU load while playing Starcraft. First fire up Starcraft and start any game. Then, press F10, select Options / Game speed, and check the "Enable CPU Throttling box". You'll probably need to restart Starcraft afterwards.
Multiplayer LAN games work just fine (didn't try BattleNet that much yet), but if you use a strict firewall rule set as I do (which blocks most ingress as well as egress traffic) you have to open a number of different ports. Here's what I added to my firewall script:
$IPTABLES -A OUTPUT -m state --state NEW -p udp --dport 6111 -j ACCEPT $IPTABLES -A INPUT -m state --state NEW -p udp --dport 6111 -j ACCEPT $IPTABLES -A OUTPUT -m state --state NEW -p udp --dport 6112 -j ACCEPT $IPTABLES -A OUTPUT -m state --state NEW -p tcp --dport 6112 -j ACCEPT # BattleNet
Starcraft works just fine on various netbooks; for instance, I tested it on my One A110 netbook (VIA VX800) with 256 MB of RAM, and the whole .wine directory being on a USB thumb drive (thus slow; but my internal SSD was already full). I bet it'll also work fine on the
Audio works fine, and game speed is quite OK, the only minor "problem" is that you should use an external USB mouse, the touchpad is just too small (and too slow to use) for such a fast-paced game.
The full Wine package (and all dependencies) consume quite a lot of space on the (usually very small) hard drive or SSD of a netbook, but luckily you can get away with only a minimal Wine install for playing Starcraft:
$ apt-get install wine-bin libwine-alsa (as root)
That's sufficient, and a lot smaller than installing the full wine package.
Update 2010-06-23: There's a contributed Hungarian translation now (thanks!)
Update 2009-03-04: Added info about patch 1161 and CPU load reduction.
Update 2008-12-19: Added Starcraft-on-netbooks section.
Update 2008-12-13: Added BroodWar and multiplayer info.