Line 15:
Line 15:
}}
}}
−
'''SRB2Wii''' is an unofficial port of the 3D platformer fangame [http://www.srb2.org Sonic Robo Blast 2] to the Wii. The PowerPC Linux version of SRB2 runs under a tiny Linux distribution loaded from an image. SRB2Wii is under ongoing development.
+
'''SRB2Wii''' is an unofficial port of the 3D platformer fangame [http://www.srb2.org Sonic Robo Blast 2] to the Wii. The PowerPC Linux version of SRB2 runs under a tiny [[Wii Linux]] distribution loaded from an image. SRB2Wii is under ongoing development.
As of 24 August, 2009, there are two versions that can be downloaded:
As of 24 August, 2009, there are two versions that can be downloaded:
Line 21:
Line 21:
[http://repos.srb2.org/srb2wii/srb2wii-ios.tar.bz2 An IOS version] for people loading SRB2Wii through [[IOS]]/[[Homebrew Channel]].
[http://repos.srb2.org/srb2wii/srb2wii-ios.tar.bz2 An IOS version] for people loading SRB2Wii through [[IOS]]/[[Homebrew Channel]].
−
[http://repos.srb2.org/srb2wii/srb2wii-mini.tar.bz2 A mini version] for people loading SRB2Wii through the [[BootMii]] loader and [[mini]].
+
[http://repos.srb2.org/srb2wii/srb2wii-mini.tar.bz2 A mini version] for people loading SRB2Wii through [[BootMii]], using [[mini]], an open source replacement for IOS.
−
[http://repos.srb2.org/srb2wii/swap.tar.bz2 Extended swap file] (less than 1KB compressed, 128MB extracted) for people who can spare the space on their SD cards to have the ability to load much larger levels. Just extract onto your SD card and SRB2Wii will pick it up and load it automatically.
+
[http://repos.srb2.org/srb2wii/swap.tar.bz2 Extended swap file] (less than 1KB compressed, 128MB extracted) for people who can spare the space on their SD cards to have the ability to load much larger levels. Just extract onto your SD card root and SRB2Wii will pick it up and load it automatically.
+
+
== How it works ==
+
+
Sonic Robo Blast 2 is almost completely written in [http://en.wikipedia.org/wiki/ANSI_C ANSI C]. This allows it to be compiled and run on different architectures, given the appropriate modifications necessary to make it work on another operating system and architecture. SRB2 is known to work (with varying degrees of compatibility) on at least the x86, x86-64 (hasn't been tested thoroughly, just one test compile), PowerPC, ARM, MIPS, SuperH and SPARC architectures, working best on the x86, PowerPC and ARM architectures. It can also compiled for the DOS, Windows, Linux, Mac OS X, FreeBSD (and possibly other Unix-like operating systems) and Solaris operating systems.
+
+
The Wii's Broadway CPU is a standard PowerPC architecture chip developed by IBM. As a result, standard PowerPC code can run on it (once homebrew has been enabled). The team at GC-Linux.org have taken this opportunity to expand their GC-Linux operating system to support the Wii as well. Almost all the hardware on the Wii is now well supported under Linux with the latest kernel patches, with only the Wii's optical drive not working at all and the internal Wi-Fi only working when the Wii Linux kernel is run under mini, an IOS replacement by Team Twiizers. The currrent status of Wii Linux has allowed programs that that under Linux but cannot easily be natively compiled for the Wii to run on the Wii through compiling for the powerpc-linux target and then running it on Wii Linux.
+
+
SRB2Wii follows this approach. It always uses the latest Wii Linux kernels for the most advanced features. SRB2Wii was forked from the Kobo Deluxe for Wii 0.5.1 sources. In its current stage, though, it looks nothing like the original source on which it was based. SRB2Wii is a heavily simplified and modified version of GC-Linux.org's whiite-linux operating system, although they otherwise now have no similarities whatsoever. It only includes and loads the programs, libaries and services necessary to run SRB2 and related programs, and exploits Busybox to consolidate most of the required programs into one executable for simplicity.
+
+
SRB2Wii's boot process is relatively simple (compared to other Linux distributions):
+
+
1. Kernel is loaded into memory and executed on the Broadway.
+
+
2. Kernel probes the hardware, and then mounts the initramfs filesystem compiled into the kernel image.
+
+
3. Kernel executes the "init" shell script on the initramfs.
+
+
4. The script mounts sysfs and procfs, then mounts the first partition on the front SD card and looks for the main filesystem image.
+
+
5.
+
+
1) If found, it will mount that filesystem and pass control to the /sbin/init program under the main filesystem, which continues the SRB2Wii boot.
+
+
2) If it finds a tarball of the filesystem image generated by a Cygwin build of SRB2Wii, it will convert the tarball into the main filesystem image and continue booting as in 1).
+
+
3) If no image or tarball is found, it will report to the user that it cannot find the filesystem image and reboot.
+
+
6. The /sbin/init program follows the commands laid out in the /etc/inittab file, which sets up virtual terminals, and executes the /etc/init.d/rcS shell script.
+
+
7. /etc/init.d/rcS initialises the udev and networking services (if enabled, disabled by default in SRB2Wii's config), starts the swap file and the extended swap file if found, and then executes the /launch-srb2wii script.
+
+
8. /launch-srb2wii starts the Wii Remote, sets some necessary environment variables and then finally starts the SRB2Wii launcher.
== Changelog ==
== Changelog ==