Files
BFM-decomp/config/splat.resident.yaml
T
Drew T 5ff842dfd3 feat(phase-32): T3 (3) — resident: func_800D06E8 (344 ins) BANKED byte-identical 8e17e02f — THE RESIDENT IS 100% C (145/145)
- the Opus drafter recovered the closeness-0 body the journals (attempts 1-3) pointed at (.run/S71b_1/fable/) — the
  pack's inline 292-draft was the wrong one — and found the real blocker: the TU defines Struct80078E78 AFTER the
  slot with a layout lacking bytes 0x36/0x37; only a BLOCK-scoped typedef under a distinct tag (Blk80078E78) + a
  block-scoped extern compiles (decl-hoisting resolver variants recreate the S7x 'conflicting types'). Idioms:
  §162k1 QImode (u8)(c-3)<2; explicit flag temp t=(u32)(r-0x64)<0x1E, s1=t^1; switch decision trees for both
  currentLocationId dispatches. reloc_identity AGREE 50/50; rtu_match MATCH 344/344 (verified by the coordinator)
- jtbl_carve --func: jtbl_80113FA4 (5 words, the old tail2) joins the resident_jr_800D00E4 .rodata piece
  (0x450e0..0x451c0, JTBL_PADS 0,0,0,0, tables +0x0/+0x3c/+0xb4/+0xcc); carve set 5 -> 4 pieces, --pre kept
- make extract + make build BINARY=resident -j8 rc 0; sha 8e17e02ff8954d07c979449198f7e1645046b353 == check;
  pads_audit ok/ok; interleave_check ALIGNED n=4
2026-09-05 01:03:07 -06:00

94 lines
4.4 KiB
YAML

# splat config — Brave Fencer Musashi resident engine blob (MAIN.CD/FILE_010/1.1)
# Phase 10: rebuild the always-resident engine blob byte-for-byte from disassembly
# (100% INCLUDE_ASM), as the project's SECOND build binary (alias `resident`).
#
# Mirrors config/splat.us.exe.yaml's PSX options (compiler PSYQ, subalign 2,
# section_order rodata/text/data/bss, find_file_boundaries False) but for a FLAT
# decompressed blob:
# - NO header segment (not a PS-X EXE; first word is data 0x00000036, code at +0x04)
# - NO gp_value (-G0 like the EXE — verify zero ($gp) refs in the disasm, T2)
# - single code segment @ vram 0x800CEDF8 (load address RAM-proven, Phase 3 T6b)
# - output nested under asm/resident + src/resident + build/resident (per-binary, so
# the Makefile OBJS glob keeps it disjoint from main's asm/ + src/)
# - per-binary undefined_*_auto paths (under build/resident/) so main's stay verbatim
# - stacked symbols: config/symbols.us.txt (the 27 shared engine globals the blob
# references) + config/symbols.resident.txt (blob-local, R13/R15-tagged)
#
# Boundaries: 365,404 B (0x5935C) -> end vram 0x80128154 (4 B under the location-overlay
# slot 0x80128158). The text/data split is ITERATED against `make check BINARY=resident`
# in Phase-10 T2 (the Phase-5 precedent); this scaffold starts as one code subsegment.
name: resident
sha1: 8e17e02ff8954d07c979449198f7e1645046b353
options:
basename: resident
target_path: extracted/retail/MAIN.CD.dir/FILE_010.dir/1.1
elf_path: build/resident/resident.elf
# base_path is resolved relative to THIS yaml's dir (config/), so `..` = repo root
base_path: ..
platform: psx
compiler: PSYQ
asm_path: asm/resident
src_path: src/resident
# build_path = build (NOT build/resident): splat writes the .ld's object paths under
# $(build_path), and the Makefile's pattern rules build them at build/asm/** + build/src/**
# (same as main, whose build_path is also `build`). Only the elf/ld/output live in build/resident/.
build_path: build
ld_script_path: build/resident/resident.ld
ld_dependencies: True
# Per-binary undefined-symbol outputs (Phase 10): main keeps the repo-root files
# (verbatim, byte-exact no-op); resident writes under build/resident/ so `make clean`'s
# `rm -rf build` covers them and the two binaries never share a stale file.
undefined_syms_auto_path: build/resident/undefined_syms_auto.txt
undefined_funcs_auto_path: build/resident/undefined_funcs_auto.txt
find_file_boundaries: False
# NO gp_value: the blob is -G0 (same PsyQ 4.0 SDK/era as the EXE, ledger #8). Omitting
# it means splat emits no _gp. Verified in T2 by zero ($gp)/%gp_rel in the disasm.
o_as_suffix: True
use_legacy_include_asm: False
section_order: [".rodata", ".text", ".data", ".bss"]
symbol_addrs_path:
- config/symbols.us.txt
- config/symbols.resident.txt
subalign: 2
string_encoding: ASCII
data_string_encoding: ASCII
rodata_string_guesser_level: 2
data_string_guesser_level: 2
# Enable if maspsx reorders INCLUDE_ASM output in c-mode (commented for the EXE — unused there):
# include_asm_macro_style: maspsx_hack
segments:
- name: resident
type: code
start: 0x0
vram: 0x800CEDF8
# align 4 (not the code default 16): MIPS is word-aligned; mirrors the EXE's
# boundary-safe choice. Subsegment boundaries are refined in T2 vs the byte check.
align: 4
subsegments:
# Layout (empirically mapped vs the bytes, T2): a 1-word data header, then a clean
# code region (145 funcs, last jr $ra @file 0x4608+delay 0x460c -> ends 0x4610; zero
# embedded jump tables / trap-ops), then the data tail (pointer tables + packed data
# + a 78.5 KB zero run to EOF).
# The leading word sits BEFORE the code, but section_order puts .data after .text.
# Mark it .rodata (which section_order places FIRST) so it lands at 0x800CEDF8 ahead
# of the code — a 1-word analogue of main's rodata-island, with no ld_interleave needed.
- [0x0, rodata, hdr] # the leading data word 0x00000036 (vram 0x800CEDF8)
- [0x4, c, resident]
- [0x12ec, c, resident_jr_800D00E4]
- [0x2494, c, resident_jr_800D128C]
- [0x4610, data, tail]
- [0x450e0, .rodata, resident_jr_800D00E4] # Phase-26 §8 jtbl-rodata carve (jtbl_carve.py)
- [0x451c0, .rodata, resident_jr_800D128C] # Phase-26 §8 jtbl-rodata carve (jtbl_carve.py)
- [0x453c4, data, tail2]
- [0x5935C] # EOF (365,404 B) -> end vram 0x80128154