Wad2NAND-osx-gui


The Nintendo Wii was one hell of a video game console. Even so, I got bored of playing games on it, and started hacking, which turned out to be a good deal more fun.

To install homebrew (custom) software, you'd have to put WADs (Wii binaries), sign them with the mysterious common-key.bin, and stuff them into a virtual copy of the Wii's internal NAND memory. The native "Load from SD card" feature could then be exploited to transfer them to the console.

So, I needed a way to put the WADs into the NAND. As it turned out, the only tool that did this ran exclusively on Windows (an OS I don't use) and was written in C (a language I know).

I ported the code to Mac OS, wrote a GUI wrapper and some scripts, and released it here. That page contains the first software that I wrote and distributed to others. Several hundred users downloaded it during the month or so that I maintained the project, and I enjoyed the idea that I was crusading for freedom through hacking and open-source software. I knew the first paragraph of the GNU GPL preamble by heart.

"… the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users …"

I received some criticism from people in the hacking scene for my (admittedly questionable) code quality, but they were spending their free time arguing with an 11-year-old, so I think I won by default.

#!bin/bash
cd /Library/wad2nand/
echo "Initializing Wad2Nand" >> install.log
for file in *.wad;
do
mv "$file" "${file// /_}"
done
ls -R *.wad > contents.txt
ln=`wc -l "contents.txt" | awk '{print $1}'`
echo "Preparing to install $ln WAD file(s)..." >> install.log
x=1

for file in *.wad
do
a=`tail +$x contents.txt | head -n 1`
echo "Processing $a..." >> install.log
installer="#!/bin/bash
cd /Library/wad2nand/
./wad2nand ./$a
exit 0"
echo "$installer" >> runwad2nand.sh
sh ./runwad2nand.sh
rm -rf ./runwad2nand.sh
echo "$a installed successfully" >> install.log
x=`expr $x + 1`
done

awk '!x[$0]++' install.log > wad2nand-install.log
rm -rf /Library/wad2nand/install.log

sed '$d' < wad2nand-install.log > install.log
mv install.log wad2nand-install.log
rm -rf /Library/wad2nand/install.log

sed '$d' < wad2nand-install.log > install.log
mv install.log wad2nand-install.log

rm -rf /Library/wad2nand/*.wad
rm -rf /Library/wad2nand/contents.txt
rm -rf /Library/wad2nand/install.log

exit 0
Index