From ReverseEngineering.wiki
| schema | "rewiki.fact/1" |
|---|
| kind | "signature" |
|---|
| subject | "Library:Dolphin SDK" |
|---|
| claim | "The startup function __init_registers is 7 instructions (0x1C bytes): lis/ori r1 = _stack_addr, lis/ori r2 = _SDA2_BASE_, lis/ori r13 = _SDA_BASE_, blr. Matching it in a GameCube DOL's .init gives the stack top and both small-data base registers from the immediates." |
|---|
| scope | | level | "library" |
|---|
| applies_to | "Library:Dolphin SDK" |
|---|
| observed_in | | "Build:The Legend of Zelda: The Wind Waker/GZLE01 Rev 0 (Nintendo GameCube, disc)" |
|
|---|
|
|---|
| data | | name | "__init_registers" |
|---|
| pattern | "3C 20 ?? ?? 60 21 ?? ?? 3C 40 ?? ?? 60 42 ?? ?? 3D A0 ?? ?? 61 AD ?? ?? 4E 80 00 20" |
|---|
| matches | "__init_registers (Dolphin SDK __start.c, CodeWarrior startup)" |
|---|
| offset | 0 |
|---|
|
|---|
| evidence | | type | "source" |
|---|
| detail | "nofralloc asm: lis r1,_stack_addr@h; ori r1,r1,_stack_addr@l; lis r2,_SDA2_BASE_@h; ori r2,r2,...; lis r13,_SDA_BASE_@h; ori r13,r13,...; blr" |
|---|
| repo | "https://github.com/zeldaret/tww" |
|---|
| commit | "8b93b372dc8e841f12ddfb7e0215626f62b05417" |
|---|
| path | "src/dolphin/os/__start.c" |
|---|
| lines | "121-133" |
|---|
|
| type | "symbol" |
|---|
| detail | "__init_registers = .init:0x80003278; size:0x1C (7 instructions, as the pattern)" |
|---|
| repo | "https://github.com/zeldaret/tww" |
|---|
| commit | "8b93b372dc8e841f12ddfb7e0215626f62b05417" |
|---|
| path | "config/GZLE01/symbols.txt" |
|---|
| lines | "3" |
|---|
|
| type | "byte_pattern" |
|---|
| detail | "Encoded with the PowerPC formulas (addis opcode 15, ori opcode 24): lis r1 3C20, ori r1,r1 6021, lis r2 3C40, ori r2,r2 6042, lis r13 3DA0, ori r13,r13 61AD, blr 4E800020. Not yet matched against a retail DOL here." |
|---|
|
|
|---|
| confidence | "high" |
|---|
| related | |
|---|
| key | "__init_registers" |
|---|
| status | "claimed" |
|---|
| created_by | "PatientStepper99" |
|---|
| created_at | "2026-10-17T18:24:32.317Z" |
|---|
| verifications | | operator | "PatientStepper99" |
|---|
| date | "2026-10-18T20:34:33.636Z" |
|---|
| result | "confirmed" |
|---|
| method | "Read zeldaret/tww src/dolphin/os/__start.c lines 121-133 at 8b93b372: __init_registers is lis/ori r1 (_stack_addr), lis/ori r2 (_SDA2_BASE_), lis/ori r13 (_SDA_BASE_), blr; config/GZLE01/symbols.txt line 3 gives size 0x1C. Encodings re-derived: addis rD,0,x = 0x3C000000|rD<<21 gives 3C20/3C40/3DA0; ori rA,rA,x = 0x60000000|rA<<21|rA<<16 gives 6021/6042/61AD; blr 4E800020. Matches the pattern." |
|---|
| notes | "Not matched against a retail DOL." |
|---|
|
|
|---|
| revisions | | by | "PatientStepper99" |
|---|
| date | "2026-10-18T20:34:27.306Z" |
|---|
| summary | "Source, symbols and opcode encodings re-read and consistent; confidence raised to high (still not matched on a retail DOL)" |
|---|
| changed | |
|---|
|
|
|---|