GameCube autoboot into Swiss

The GameCube's Main Menu, known as the GameCube BIOS, is the Initial Program Loader (IPL). Modchips allows the use of alternative IPL, featuring limited extra capabilities. In contrast Swiss, the "all-in-one homebrew utility for the Nintendo GameCube", gives plethora of useful and handy features. Usually running Swiss requires several trivial steps, but recently a minimal alternative IPL, iplboot, has been developed that allows to run any application from a SD card at boot time. So combined with a modchip like the Qoob Pro, which firmware can be replaced, and a prepared SD card, it's possible to boot directly into Swiss.

GQoobPro
GQoobPro is collection of GPL and LGPL tools to Nintendo Gamecube Qoob Pro mod chip. git clone https://github.com/jvaltane/gqoobpro.git cd gqoobpro/libqoob ./autogen.sh sudo apt install libusb-dev ./configure sudo make install sudo cp data/86-qoobpro.rules /etc/udev/rules.d/ sudo cp data/qoobpro.conf /etc/modprobe.d sudo service udev restart sudo rmmod usbhid && sudo modprobe usbhid cd gqoobpro/qoob-flasher ./autogen.sh ./configure make sudo make install
 * Clone repos
 * build and install libqoob (this is based on a Debian install, adapt if needed, also check GQoobPro on FreeBSD if needed)
 * Make sure the Qoob Pro is not incorrectly claimed (Debian instructions, adapt if needed, FreeBSD does not need any of this)
 * build and install qoob-flasher

devkitPPC
Part of devkitPro, a collection of homebrew toolchains for wii, gamecube, ds, gba, gp32 and psp. We need it to compile the IDL firmware.

Option 1: get the binaries
wget https://raw.githubusercontent.com/devkitPro/installer/master/perl/devkitPPCupdate.pl chmod +x devkitPPCupdate.pl ./devkitPPCupdate.pl export DEVKITPRO=/opt/devkitpro export DEVKITPPC=$DEVKITPRO/devkitPPC
 * use automated install script
 * Adjust your shell rc with the following environment variables:
 * 1) devkitPro

Option 2: compile yourself
tar xvf buildscripts-20XXXXXX.tar.bz2 cd buildscripts ./build-devkit.sh export DEVKITPRO=/opt/devkitpro export DEVKITPPC=$DEVKITPRO/devkitPPC
 * Download latest stable buildscript from https://github.com/devkitPro/buildscripts/releases
 * Untar and run script
 * Choose to compile devkitPPC and point the installer to /opt/devkitpro
 * Watch some animu (depending how fast is your super mainframe computer)
 * Adjust your shell rc with the following environment variables:
 * 1) devkitPro

Dollz3
d0lLZ 3.0 is a GameCube Executable compressor. It creates compressed dols for the GameCube which can in turn be run as a normal DOL. It is required during the creation of the IPL. wget http://wiibrew.org/w/images/e/ef/Dollz3.zip unzip Dollz3.zip chmod dollz3/dollz3 sudo mv dollz3/dollz3 /usr/local/bin

git clone https://github.com/FIX94/dolxz.git cd dolxz chmod +x bin2h/bin2h cd loader/cube PATH=${PATH}:/opt/devkitpro/devkitPPC/bin make cd ../wii PATH=${PATH}:/opt/devkitpro/devkitPPC/bin make cd .. PATH=${PATH}:/opt/devkitpro/devkitPPC/bin make -f Makefile.cube PATH=${PATH}:/opt/devkitpro/devkitPPC/bin make -f Makefile.cube high=1 PATH=${PATH}:/opt/devkitpro/devkitPPC/bin make -f Makefile.wii PATH=${PATH}:/opt/devkitpro/devkitPPC/bin make -f Makefile.wii high=1 cd .. diff --git a/bin2h/bin2h b/bin2h/bin2h old mode 100644 new mode 100755 diff --git a/main.c b/main.c index 5108d1b..875a3b9 100644 --- a/main.c +++ b/main.c @@ -8,6 +8,7 @@ +#include  gcc -Wall -static -O2 -s main.c -llzma -o dolxz chmod +x dolxz sudo cp dolxz /usr/local/bin
 * Change main.c slightly:
 * 1) include 
 * 2) include 
 * 3) include 
 * 1) include "loader/loader_cube.h"
 * 2) include "loader/loader_cube_high.h"
 * Resume compiling

git clone https://github.com/cylgom/doltool.git cd doltool make sudo cp doltool /usr/local/bin

iplboot
FINALLY, we build iplboot, the alternative minimal GC IPL. git clone https://github.com/Streetwalrus/iplboot.git diff --git a/Makefile b/Makefile index 210fd07..4e19b04 100644 --- a/Makefile +++ b/Makefile @@ -9,7 +9,7 @@ endif include $(DEVKITPPC)/gamecube_rules -export CC := powerpc-eabi-clang +export CC := powerpc-eabi-gcc-6.3.0 MACHDEP = -DGEKKO -mcpu=750 \ -D__gamecube__ -DHW_DOL -ffunction-sections -fdata-sections @@ -74,10 +74,10 @@ BINFILES   :=      $(foreach dir,$(DATA),$(notdir $(wildcard $(dir)/*.*))) #- ifeq ($(strip $(CPPFILES)),) export LD      :=      $(CC) -Wl,--gc-sections -nostartfiles \ -              $(DEVKITPPC)/lib/gcc/powerpc-eabi/*/crtend.o \ -              $(DEVKITPPC)/lib/gcc/powerpc-eabi/*/ecrtn.o \ -              $(DEVKITPPC)/lib/gcc/powerpc-eabi/*/ecrti.o \ -              $(DEVKITPPC)/lib/gcc/powerpc-eabi/*/crtbegin.o \ +              $(DEVKITPPC)/lib/gcc/powerpc-eabi/6.3.0/crtend.o \ +              $(DEVKITPPC)/lib/gcc/powerpc-eabi/6.3.0/ecrtn.o \ +              $(DEVKITPPC)/lib/gcc/powerpc-eabi/6.3.0/ecrti.o \ +              $(DEVKITPPC)/lib/gcc/powerpc-eabi/6.3.0/crtbegin.o \ $(DEVKITPPC)/powerpc-eabi/lib/crtmain.o else export LD      :=      $(CXX) make
 * Clone repos
 * Modify the Makefile in such way (assuming the current devkitPPC is based on gcc 6.3.0:
 * Find an original GC IPL image that matches your console region (EU, US, JP) (hint)
 * make sure you rename the original IPL image to ipl.rom and place it in the iplboot folder
 * build iplboot
 * if all goes well you should now have an iplboot.gcm file in the iplboot directory.

Swiss
git clone https://github.com/emukidid/swiss-gc.git cd swiss-gc make dev  # we just need swiss.dol
 * Get Swiss source code:
 * Compile Swiss:
 * If all goes well swiss is compiled as cube/swiss/swiss.dol

Flash iplboot on Qoob Pro
qoob-flasher -r0 qoob-bios.gcb qoob-flasher -e0 qoob-flasher -q -w0 iplboot.gcb
 * backup original Qoob Pro IPL
 * erase Qoob Pro IPL and flash iplboot

Prepare SD card
cd swiss-gc sudo mount /dev/sdX /media/sd sudo cp cube/swiss/swiss.dol /media/sd/ipl.dol sudo umount /media/sd
 * Buy/find one these GC sdcard adapter, or build your own
 * copy Swiss as ipl.dol

Test
If everything went well, next time you boot your GC you will be welcome with Swiss!