Download Yet Another Gamecube Documentation (but one that`s - emu-docs

Transcript
18
APPENDIX
18.1.8
215
Building a Crosscompiler
configure options:
--target=powerpc-eabi-elf
--with-cpu=750
--disable-threads
--enable-languages=c
--disable-shared
--disable-nls
--with-newlib
18.1.9
Linker Script
to do
18.1.10
Startup Code
to do
18.2
Boot Process Details
The IPL (Initial Program Loader), or Bootrom, is located inside one Macronix chip (near Flipper, U10) and
connected to the EXI bus. When the Gamecube is powered on, bit 25 (IP) in the Machine State Register
is set, which means the system exception vector offset is 0xfff00000. Then a small (about 0x0700 bytes)
program called ’BS’ will be mapped to 0xfff00100 (the hardware reset vector) and control will be returned
to the Gamecube like after a normal reset, which means ’BS’ will be started.
18.2.1
BS - Bootstrap 1
copies the Bootstrap 2 code (BS2) from Bootrom to 0x81300000
disables the IPL decryption logic by clearing bit 17 of 0xcc006800
sets IP of Machine State Register so exception vectors are pointing to lower memory
jumps to BS2 code
18.2.2
BS2 - Bootstrap 2
BS2 is the Program that loads the game or shows the menus when the gamecube has been powered on without a game inserted. It was written in C, using official SDK libraries, probably earlier than 1.0. __start.c
seems to be same as usual, except that there is no OSInit() call (old versions must call OSInit() in main,
instead of __start).
note: this has been reversed from a PAL gamecube and looks different on a NTSC one.