Introduction
A DOL is a program for the Nintendo GameCube and the Wii: the main executable of a game (main.dol or boot.dol on a disc or in
a channel), a homebrew program, or what a loader such as the Homebrew Channel starts. It is a header of 256 bytes that lists up to seven text (code)
sections and eleven data sections, where each goes in memory and how large it is, then a zero-filled area (the BSS) and the address to start at; the
sections follow. The processor is a PowerPC: the Gekko in the GameCube and the Broadway in the Wii, which decode the same instructions
(with the paired singles); the rest of the instruction set is on the PowerPC pages.
A DOL has no signature. The explorer takes a file named .dol and checks its structure: every section that has a size lies
inside the file and inside main memory, no two sections overlap, offsets are multiples of 32, there is a text section, and the entry point is inside
one and a multiple of 4. A file that fails is shown as not a valid DOL. A DOL that has lost its extension is not recognised.
Structure
0x00file offsets of Text0 to Text6, then Data0 to Data1018 × 4 bytes0x48load addresses of the same 18 sections18 × 4 bytes0x90sizes of the same 18 sections18 × 4 bytes0xD8BSS address, BSS size, entry point, then 28 bytes of paddingto 0xFF0x100the sections, each at the offset the header gives (multiples of 32)to the end
Every field is on the header page; how the sections are loaded is on sections; where they land and what else is in the address space is on memory map, and the registers a program reaches on hardware registers.
In the explorer
The viewer shows the header field by field, each section as a node of the file with its address and size, the sections and memory map as tables, and every
text section disassembled with the PowerPC decoder, the entry point marked. Where an address built with lis and ori, addi
or a load and store displacement lands on a hardware register, an OS global in low memory or a place in one of the file’s own sections, a note names it.
The options are the processor (Gekko by default, Broadway for the Wii: the file does not say which console it is for), the values of the small data
registers r13 and r2 (a DOL has no symbols, so nothing is assumed), register names and simplified mnemonics.
Not described
Known, not yet covered
- Reference: the way the disc’s apploader and the Wii’s IOS load a DOL (only the header rule WiiBrew states is given), the bit fields of every hardware register, the EXI and audio interface register lists, the DSP’s own instruction set, relocatable modules (REL) and the formats a game keeps beside its DOL (disc images, TPL textures, model and archive formats).
- Viewer: recognition by structure only (there is no signature); the header, the sections and the text sections disassembled from their load address; hardware, OS-global and own-section notes from
lissequences found by looking back at most 16 instructions (a guess about what the register holds at run time); no code and data separation, no symbols and no following of jumps; data sections are shown as bytes. It was checked only on built files, because no DOL exists on this machine, and has not been run in a browser by its author.
Links
Software
Reference
- WiiBrew: DOL – the header layout and the 32-byte rule
- WiiBrew: Memory map – MEM1, MEM2 and the register ranges
- Yet Another GameCube Documentation – the memory map, OS globals and hardware registers