devkitPPC, Asus Eee, Wii homebrew, howto

Got something cool to help make the toolchains better? Post it here.
Post Reply
BlueChip
Posts: 2
Joined: Mon May 05, 2008 9:10 pm

devkitPPC, Asus Eee, Wii homebrew, howto

Post by BlueChip » Mon May 05, 2008 9:37 pm

I'm not convinced this is the right place to post this guide, but it is whre I have been advised to post. Thanks to WinterMute & others for their help:

Code: Select all

Installing a Homebrew Wii DevKit on Linux
=========================================

I'd normally start by thankking thoe who helped me put this together, but
my new IM client didn't make any logs, and I can't remember the many names
I should list.  But thanks to the guys at #wiidev who helped me :)

This guide was written using an Asus Eee running the standard Linux/Xandros
install.  Xandros is based on Debian, but this guide should work for any
version of Linux running on an x86.

The Wii is simply a Gamecube on steroids, so do not be phased by refereces
to it.

1.  Purchase a copy of Zelda, Twilight Princess.
    At present this is the only was to run homebrew Wii code.
    It /is/ possible to do this with a pirated copy of Zelda,
    but that is beyond the scope of this document.

    You will also need a spare SD card (really, ANY size will do)

2.  Obtain a copy of the devkit and decompress it:

2a. Make a directory into which you will download the files you need:
    # cd /home/user
    # mkdir -p wii/devkitPro
    # cd wii/devkitPro

2b. Download the main PPC devkit.  Go here:
    http://sf.net/project/showfiles.php?group_id=114505&package_id=124208
    ...and download the latest linux binaries ...For me, this was:
    devkitPPC_r14-i686-linux.tar.bz2

2c. You will also need 'libogc'.  Go here:
    http://sf.net/project/showfiles.php?group_id=114505&package_id=126925
    ...and, again, download the latest binaries ...For me, this was:
    libogc-20080228.tar.bz2

2d. Decompress the archives:
    # cd /home/user/wii/devkitPro
    # tar -xvjf devkitPPC_r14-i686-linux.tar.bz2
    # mkdir lobogc
    # cd libogc
    # tar -xvjf ../libogc-20080228.tar.bz2

    *DO NOT* decompress the devkit with another method!  You're warned!

3.  Configure the environment.

3a, Edit .bashrc (You'll need a text editor to do this, I use 'mcedit')
    # cd /home/user
    # mcedit .bashrc
      At the bottom of the file add the following lines:
        export DEVKITPRO=/home/user/wii/devkitPro
        export DEVKITPPC=$DEVKITPRO/devkitPPC

3b. Log out and log back in again, so the new startup commands get exeuted

3c. Check that the new variables are set properly.
    # set | grep DEVKIT

4.  You will need 'make' installed:
    # apt-get install make

5.  Download some sample source code and compile it.

5a. Make a directory which will be used for our source code.
    # cd /home/user/wii
    # mkdir src
    # cd /src

5b. Go here:
    http://sf.net/project/showfiles.php?group_id=114505&package_id=273886
    ...and download the latest Wii examples ...For me, this was:
    wii-examples-20080228.tar.bz2

5c. Decompress the source:
    # cd /home/user/wii/src
    # mkdir examples
    # cd examples
    # tar -xvjf wii-examples-20080228.tar.bz2

5d. Build the test program
    # cd /home/user/wii/src/examples/template
    # make
      template.c
      linking ... template.elf
      output ... template.dol
    # ls -al
      ...If all is well, template.elf will be in the listing

6.  Donload and Install the Twilight hack.

6a. Ensure your new SD card has a single partition formatted as FAT16
    and mount it.  On an Asus Eee the SD is auto-mounted when you insert it;
    My SD is labelled 'wiidev.org' and so is mounted to:
    /media/MMC-SD/wiidev.org

6b. Make a directory to save the hack into:
    # cd /media/MMC-SD/wiidev.org
    # mkdir t-hack
    # cd t-hack

6b. Go here:
    http://wiibrew.org/index.php?title=Twilight_Hack
    ...and download the latest Twilight hack ...For me, this was:
    twilight-hack-v0.1-alpha3a.zip
    ...actually, the latest was alpha3b, but the link advised not
       to use it unless you had problems with alpha3a

6b. Decompress the hack
    # cd /media/MMC-SD/wiidev.org/t-hack
    # unzip -j twilight-hack-v0.1-alpha3a.zip
    This will extract FOUR files.  You will need only ONE,
    depending on which version of Zelda you have.

6c. Read the serial number off the Zelda DVD, it is printed on the inner cirle
    of the data side of the DVD.  This will tell you which of the four files
    you need:

    RVL-RZDP-0A-0 JPN  ->  rzdp0.bin   (Europe/Australia)
    RVL-RZDJ-0A-0 JPN  ->  rzdj0.bin   (Asia)
    RVL-RZDE-0A-2 USA  ->  rzde2.bin   (America)

    RVL-RZDE-0A-0 JPN  ->  rzde0.bin   (America)
    RVL-RZDE-0A-0 USA  ->  rzde0.bin   (America)

    When you see 'rz???.bin' below, substitute the right name.

6d. Put the right hack in the right place on the SD card
    # cd /media/MMC-SD/wiibrew.org/t-hack
    # mkdir -p ../private/wii/title/RZDP
    # cp rz???.bin ../private/wii/title/RZDP/data.bin

6d. Put your example program on the SD card
    # cd /media/MMC-SD/wiibrew.org
    # cp /home/user/wii/src/examples/template/template.elf boot.elf
    The hack will only run code called 'boot.elf' in the root directory,
    a menu system is being developed.  See wiibrew.org or wiinewz.com
    for details.

6e. If you have not yet done so, put the Zelda disk in your Wii and start a new
    game.  I am assured you need a Zelda save-game on the Wii before the hack
    can be installed.

    If you actually play Zelda, then BACK UP YOUR SAVED GAME(S) NOW
    This proces WILL erase your save-game from Wii internal memory!

6f. Put your new SD card and your copy of Zelda in your Wii and power it up.
    Wii Menu -> Data Management -> Save Data -> Wii
      Zelda -> Erase -> Yes
      SD Card -> Twilight Hack -> Copy -> Yes
    Back out to the Channel Menu and start Zelda
    Load the Twilight Hack and click Start
    The Wiimote pointer may slump to the bottom of the screen and stop working,
    but Don't Panic, you do not need it to start the hack running, and it
    will return to normal when you restart the Wii.
    When the game starts, approach the man and talk (try to) talk to him.

    There is a video demonstration of this last process here:
    http://wiibrew.org/index.php?title=Twilight_Hack
    ...Although this demonstration does not suffer the Wiimote problem.

Finally.  There is, in development, a WiiHomeBrew channel.  This is
installed by using the (above) Twillight Hack.  But once instlled, you
will be able to run Homebrew code on your Wii from the normal Channel
Menu.

Post Reply

Who is online

Users browsing this forum: No registered users and 25 guests