0xBFC00000, which is the beginning of the PIF ROM address space. This ROM is baked into the [[PIF-NUS]] chip.
When reading disassemblies, always remember that branch instructions have delay slots (which some branches may discard under certain circumstances). The operations performed in delay slots, may not be related to the branch itself.
Each line is formatted like so: [address][opcode][assembly instruction] # comments.
= IPL1 =
This stage spans only the first 0xD4 bytes (0xBFC00000 - 0xBFC000D3) as executing instructions directly out of the PIF is relatively slow. Only what is absolutely necessary, is executed here. IPL1 resets the console to a consistent reset state, and moves the remaining bytes of the PIF ROM, that is IPL2, into the RSP's IMEM (0xA4001000).
The goal of IPL1 is basically to move out execution context from the PIF as soon as possible for two reasons: first, running code directly from PIF requires a very slow serial transfer for each transferred word, and given that CPU cache doesn't work in this context, execution is '''very''' slow. Second, as soon as the CPU is out of this context, the PIF ROM can be locked again, for security reasons, hoping to minimize the window in which PIF returns the ROM on the bus and can thus be easily dumped.
0x04001000 to start this second stage.
IPL2 has just a very simple task: it loads IPL3 from the ROM (offsets 0x40-0x1000) and verifies its checksum. To do so, it actually sends the checksum to the PIF, which verifies if it's correct by separately fetching the expected one from the CIC. If the checksum doesn't match, PIF halts execution of the CPU (by asserting the NMI pin). IPL2 instead just proceeds to calling IPL3, hoping for the best.
To access the ROM and be able to read the IPL3, IPL2 needs to configure the PI bus access timings. To do first, first it configures PI to its minimum speed, and reads the [[ROM Header|first 4 bytes of the header]]. Byte 1-3 in fact are expected to contain the (fastest) PI timings that the ROM supports. It then configures those timings, and proceeds reading the IPL3 into DMEM, one word at a time (notice that DMA wouldn't be possible here, because PI DMA only reads/writes to RDRAM, not DMEM).
== IPL3 ==
This stage is executed out of RSP DMEM, which was loaded with the first 0x1000 bytes of the game cartridge (or alternatively, whatever may be inserted in the cartridge or expansion slot on the bottom of the console). IPL2 will jump to 0x04000040 (0x40 bytes after the start of DMEM, to account for the ROM header).
The goal of IPL3 is to initialize RDRAM, which requires a complex [[RDRAM#Initialization Sequence|initialization process]] that includes current calibration. During this stage, IPL3 also discovers whether there is an Expansion Pak installed and thus whether the additional 4 MiB of RDRAM are available. After RDRAM is initialized, it proceeds to booting the game.
=== Nintendo proprietary IPL3 ===
Over the course of the commercial life of the console, Nintendo released six known variants of the IPL3 stage, each one with its own matching CIC chip. In fact, as discussed previously for IPL2, each IPL3 bootcode has its checksum verified against the hardcoded value written in the CIC chip. This basically means that you can't easily change a physical CIC chip on the cartridge, without also replacing the IPL3 code.
A seventh variant can be seen when analyzing the dumps of the GameBooster 64, Action Replay Pro 64, and GameShark Pro (v3.3): where the 0x0FC0 bytes after the header, are all zeros, and are dynamically loaded by the cartridge.
For each of the six variants, there is a matching CIC chip found in each cartridge. There are 10 official CIC chips:
{| class="wikitable"
! NTSC !! PAL !! % of ROMs (Qty)
|-
| CIC-NUS-6102 || CIC-NUS-7101 || 87.6% (826)
|-
| CIC-NUS-6103 || CIC-NUS-7103 || 6.5% (61)
|-
| CIC-NUS-6105 || CIC-NUS-7105 || 4.5% (43)
|-
| CIC-NUS-6106 || CIC-NUS-7106 || 0.09% (8)
|-
| CIC-NUS-6101 || CIC-NUS-7102 || 0.05% (5)
|}
Each of these NTSC/PAL pairs share an IPL3 variant, except '''6101''' and '''7102'''.
After Nintendo IPL3 has initialized the RDRAM, it proceeds loading 1 MiB of game code i(ROM addresses 0x10001000 - 0x10101000), into RDRAM starting from the boot address specified in the [[ROM Header|ROM header]] (offset 0x8), and the jumping to it. This actually finishes the boot sequence and hands off the execution to the actual game.
The amount of code being loaded (1 MiB) is hardcoded and cannot be changed. Games are expected to cope with it. In most cases, this is more than needed, and extra loaded data is basically ignored (and maybe reloaded as part of the game asset loading code, to different addresses). If the game requires more than 1 MiB of code, it is expected to load it manually (eg: via dynamically loadable code segments, sometimes called "overlays").
Details to be added here...|-| CIC 6103 / 7103 =
Details to be added here...|-| CIC 6105 / 7105 =
Details to be added here...|-| CIC 6106 / 7106 =
Details to be added here...|-| CIC 6101 =
Details to be added here...|-| CIC 7102 =
Details to be added here...