N64Recomp needs to know where the game's functions and data live.
Sections + functions for the base game, in N64Recomp's symbol-TOML format. Contains all
1763 functions across 4 sections (entry, main, ovl_a, ovl_b). Produced by
../tools/gen_symbols.py --overlays, which parses the splat disassembly (../disasm/asm/)
— we use symbol-TOML mode, not ELF mode, because this machine has no MIPS assembler.
wcw.toml points symbols_file_path at dump.toml. Regenerate any time the disassembly
or function boundaries change.
Notes:
- The
RENAMEmap ingen_symbols.pyis the libultra integration mechanism: mappingfunc_XXXX→ a known libultra name makes N64Recomp skip recompiling it, and the runtime (ultramodern/librecomp) provides the host implementation instead. ~40 functions are named this way (threads, messages, VI, AI, PI/EPI DMA, SP/DP tasks incl. osSpTaskYield/ Yielded, raw SI, clock, IDO softfloat) — this is what makes the port boot and run. Evidence for each name is inline ingen_symbols.pyand in../disasm/libultra.md. - The game's function literally named
mainis renamed togame_main(it collides with the C/C++ entry point). - Both overlays load to vram
0x80090000; the recompiler resolves the ambiguousjal 0x80090000via runtime function lookup (the overlay swap mechanism). - After editing
RENAME, regenerate + recompile + rebuild —../tools/cycle.ps1does the whole loop.
Data symbols for the base game: 3,952 symbols across 6 sections (main/ovl_a/ovl_b
× data/bss), parsed from the splat data disassembly (dlabels in
../disasm/asm/asm/data/*.s) by ../tools/gen_symbols.py --data. Consumed by the
patches build (patches.toml data_reference_syms_files) so patch C code can extern
game data by name (verified: D_8003CCF4 resolves to its exact vram).
Notes:
- Sections deliberately omit
rom, so N64Recomp treats every symbol as absolute — correct here because nothing in this game is relocatable (fixed-address overlays). - ovl_a bss overlaps ovl_b data in vram, so 4
D_*names exist in both; the later section's copy gets a_<section>suffix (e.g.D_800E5F90_ovl_b_data), same disambiguation rule as the function generator. - Regenerated by
tools/cycle.ps1/tools/recompile.ps1(both pass--data).
See ../CLAUDE.md → "The symbol TOML format". The [[section]] blocks carry
rom/vram/size and a functions = [{ name, vram, size }, …] array; data symbol files
carry symbols = [{ name, vram }, …].