Skip to content

coverage ​

Tool tools/triage/coverage.py (program, Triage). How much of the original's code does the reimplementation cite?

Run it with ./gameframe run coverage ARGS or python3 tools/triage/coverage.py. Source on GitHub.

Its own help ​

This is the help text in the tool itself, as ./gameframe tool coverage prints it.

text
How much of the original's code does the reimplementation cite?

Every reimplemented item names the original function it came from (the re-port skill:
``Original: `FUN_1400be680` ``). This tool reads those citations from the sources and compares
them with the functions in a Ghidra export, to show how much of the original is covered and
where the largest uncovered functions are.

Usage:
  coverage.py [--export DIR] [--binary NAME] [--top N] [--list-cited] SOURCE_DIR ...

  SOURCE_DIR    the reimplementation's folders to read
  --export      the Ghidra export (default: analysis/export)
  --binary      the binary in the export (default: the only one, or the first .exe)
  --top N       list the N largest functions nobody cites (default 20; 0 for none)
  --list-cited  also list every cited function

A function counts as cited when the sources contain its address as `FUN_<hex>` or `0x<hex>`
(16-bit: `FUN_1000_873a` or `1000:873a`), or its name in backticks after `Original:` (a Ghidra
name, or one of your labels from labels/names.tsv). Thunks are left out of the totals. The share
by size weighs each function by its bytes, which says more than the count: a thousand small
getters are less work than one large update.

What it does not do: decide whether a cited function is fully reimplemented. A citation means
somebody ported from it; the checklist (docs/CHECKLIST.md) says how far.

Named by ​

Skills: re-port, re-land.

Code: Apache 2.0. Content: CC0 1.0. No game material: bring your own copy.