Systems
One page per game system: a summary written by hand from the matched code's headers, then, on
the pages that have one, the routines that belong to it, generated from functions.csv in the
code repo. A routine's group is the subsystem column there, taken from its name's prefix;
"Engine (unnamed)" holds matched engine routines that still carry Sub_ labels. The table below
counts every group.
| Page | Covers |
|---|---|
| Boot | Vectors, reset, MainInit, the cold init |
| Frame cycle and NMI | One field frame, the frame wait, NmiHandler, the field IRQ, the other modes' frames |
| Engine core | The field: game loop, location loading, the map, scene changes, objects |
| Field event scripts | The objects' byte-code scripts and their opcodes |
| Sprites & objects | Animation, frame builds, the OAM shadow |
| Scene engine | Bank $C2's scene mode: tasks, scripts, sprite list, scene loading, the map view and the dial |
| Text windows | Bank $C2's text decoder |
| Menu | Bank $C2's menu: entry, thread scheduler, interrupts, shared helpers |
| Battle engine | BattleSys_Main, turn lists, enemy behaviour scripts, PC commands, effects and damage, hit records, bank $FD helpers |
| Battle actions | Service 4, the action scripts and the enemy movers |
| Battle menu | The command menu, its lists and input |
| Battle targeting | Target modes and area shapes |
| Status bar & text | The battle status bar and number formatting |
Field event scripts, frame cycle, scene engine, text windows, the menu and battle actions are parts of the larger "Engine" and "Battle engine" groups, so their routines are listed on the Engine core and Battle engine pages.
To add a system: give its routines a subsystem in the code repo (a name prefix in
tools/progress.py), add a page here (copy any existing one and change its wk:system marker),
add it to the nav in mkdocs.yml, and run tools/sync_progress.py.
| System | Banks | Matched fns | Matched code bytes | Readable | Verified |
|---|---|---|---|---|---|
| Engine | $C0, $C1, $C2, $C3, $C6, $C7, $CF, $D1, $FD, $FF | 2,360 | 135,452 | 2,360 | 2,360 |
| Battle engine | $C1, $CC, $CD, $CE, $CF, $D1, $FD | 990 | 74,225 | 990 | 990 |
| Battle system | $C1, $CD | 192 | 20,803 | 192 | 192 |
| Sprites & objects | $C0 | 53 | 9,088 | 53 | 53 |
| Battle menu | $C1 | 63 | 5,046 | 63 | 63 |
| ROM header | $C0 | 19 | 0 | 19 | 19 |
| Battle targeting | $C1 | 34 | 2,064 | 34 | 34 |
| Battle status bar | $C1 | 9 | 1,443 | 9 | 9 |
| Engine (unnamed) | $C0 | 2 | 506 | 2 | 2 |
| Battle text & numbers | $C1, $CD, $CF | 9 | 377 | 9 | 9 |
| Boot | $C0, $FD | 5 | 247 | 5 | 5 |