Introduction
The addresses in a DOL are the virtual addresses the PowerPC uses. Main memory appears twice: at 0x80000000 through the cache, and at
0xC0000000 without it; the hardware registers sit at 0xCC000000 and above, and the Wii adds a second memory and the Hollywood registers. The
tables follow the Yet Another GameCube Documentation (YAGCD, chapter 4) and WiiBrew “Memory map”, read through page summaries (our words).
Address ranges
| From | To | Name | What it is |
|---|---|---|---|
0x80000000 | 0x817FFFFF | MEM1, cached | The GameCube’s 24 MiB of main memory (physical 0x00000000 to 0x017FFFFF) and the Wii’s MEM1. Where a DOL is loaded. |
0xC0000000 | 0xC17FFFFF | MEM1, uncached | The same memory, not cached. |
0x90000000 | 0x93FFFFFF | MEM2, cached | Wii only: 64 MiB (physical 0x10000000 to 0x13FFFFFF). |
0xD0000000 | 0xD3FFFFFF | MEM2, uncached | Wii only: the same 64 MiB, not cached. |
0xC8000000 | — | EFB | The embedded framebuffer of the graphics chip: YAGCD gives 2 MiB, WiiBrew 3 MiB (to 0xC8300000). |
0xCC000000 | 0xCC008003 | Hardware registers | The memory-mapped registers; see hardware registers. WiiBrew marks the end of the range as unchecked. |
0xCD000000 | 0xCD008000 | Hollywood registers | Wii only: shared with the Starlet processor. |
0xE0000000 | 0xE0003FFF | Locked cache | 16 KiB of the L2 cache, usable as memory (YAGCD: “L2 Cache”; the locked cache instruction is dcbz_l). |
0xFFF00000 | — | IPL | The boot ROM, mapped here at start-up (YAGCD: 1 MiB; WiiBrew also lists a 64-byte EXI boot code mirror at 0xFFF00100). |
The viewer accepts a DOL section in the first four rows. The uncached and cached addresses of one physical memory are treated as the same memory when it looks for overlaps.
Low memory: the OS globals
The first 256 bytes of main memory hold values the system and the disc fill in before a program runs. The table lists what YAGCD (section 4.2.1, “OS globals”) names
at these addresses. The names starting OS_ are labels this viewer uses; the page gives descriptions.
| Address | Size | Label | Meaning |
|---|---|---|---|
0x80000000 | 4 | OS_GAME_CODE | The game code, four characters. |
0x80000004 | 2 | OS_COMPANY | The company code. |
0x80000006 | 1 | OS_DISC_NUMBER | The disc number. |
0x80000007 | 1 | OS_VERSION | The game’s version. |
0x80000008 | 1 | OS_STREAMING | Audio streaming flag. |
0x80000009 | 1 | OS_STREAM_BUFFER_SIZE | Audio streaming buffer size. |
0x8000001C | 4 | OS_DVD_MAGIC | The DVD magic word, 0xC2339F3D. |
0x80000020 | 4 | OS_BOOT_MAGIC | The boot magic word: 0x0D15EA5E means a normal boot. |
0x80000024 | 4 | OS_BOOT_VERSION | Version, usually 1. |
0x80000028 | 4 | OS_MEMORY_SIZE | Physical memory size: 0x01800000 is 24 MiB. |
0x8000002C | 4 | OS_CONSOLE_TYPE | Console type. |
0x80000030 | 4 | OS_ARENA_LO | The low end of the memory arena. |
0x80000034 | 4 | OS_ARENA_HI | The high end of the memory arena. |
0x80000038 | 4 | OS_FST_LOCATION | Where the file system table is in memory. |
0x8000003C | 4 | OS_FST_MAX_LENGTH | The maximum length of the file system table. |
0x80000040 | 4 | OS_DEBUGGER_FLAG | The debugger flag. |
0x800000CC | 4 | OS_TV_MODE | The video mode. |
0x800000F8 | 4 | OS_BUS_CLOCK | The bus clock speed. |
0x800000FC | 4 | OS_CPU_CLOCK | The CPU clock speed. |
The rest of the 256 bytes is not listed here. In a DOL’s disassembly, a load or store whose address is built with lis r3, 0x8000 and lands on one of these is noted with the label;
the same offsets through the uncached window 0xC0000000 are named too.
Not described
Known, not yet covered
- Reference: the BATs and page tables that create the windows above, the rest of the OS globals (YAGCD lists more, and the fetch tool’s summary may not have given them all), the memory the IOS reserves on the Wii (the upper 12 to 16 MiB of MEM2 per WiiBrew) and the ARAM.
Unknown
- The end of the Broadway register range: WiiBrew marks
0xCC008003as unchecked.
Links
Reference
- YAGCD chapter 4 – the memory map and the OS globals
- WiiBrew: Memory map – MEM1, MEM2 and the register ranges