Coverage of the interpreter per route, field porting order #31
Loading…
Reference in a new issue
No description provided.
Delete branch "coverage"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Fixes #30
Interpreter coverage per route, and the field porting order it gives.
What
core/port/coverage.c,ff6_debug.h): routine entries (JSR/JSL targets, interrupts incl. reset, tail jumps: JML, JMP (abs)/(abs,X), RTS/RTL to a pushed address, JMP/BRA/BRL below the current entry), each instruction attributed to the innermost entry of a shadow call stack (frames popped by stack pointer, so dropped return addresses and stack switches are handled; a call replaced by a port in modeonpushes nothing), call/jump edges,spans(activations that cross a frame boundary), executed-address bitmap (2 MiB, one bit per 24-bit address). Same hook dispatcher as the port registry and the RAM trace; state in the core context; one flag test when off; about 2% slower when on.ff6cli --coverage <file>(text format, version 1, documented), drive servercoverage start|stop|write <path>.tools/coverage_report.py: aggregates any number of files of one version (the version comes from the files; a different--versionis refused), known routines from the.dbg(ff6sym.routines: top-level code labels that start an instruction, in code segments), per module reached/known, instructions, top routines by instructions and by activations,--never,--field-order N.docs/coverage.md(method, format, how to run, numbers, porting order),docs/build.md. Reports for the route library committed underre/coverage/(names and addresses only); the coverage files stay inothers/.rom.coverage.{US,JP}_V10(label rom): a 600-frame run gives the same file twice, and the same file from ff6cli and from the drive server; the run hashes are unchanged with--coverage. Synthetic checks offf6sym.routinesandcoverage_report.pyintools.disasm.Numbers (three routes, release)
Field porting order top 15 (US, JP the same set): InitMaskHDMAData, TfrObjGfxSub, UpdateObjFrame, MoveObjs, _c0714a, UpdateScrollHDMA, DrawOverlaySprites, CalcScrollPos, CheckTimer, UpdateFixedColor, DrawLetter, TfrBGAnimGfx, DecTimersMenuBattle, _c0249a, SetTopSpriteMSB. Details in
docs/coverage.mdand on the issue.Validation
release --fastanddebug --fast: 24/24 passed (includesrom.coverage.*);rom.coverage.US_V10also passes under wine (mingw).--coverage:movie: match(picture, WRAM, SRAM) on US and JP; no stack overflow, nothing dropped.🤖 Generated with Claude Code