Porting tools (b): liveness, don't-care declarations, poisoning (fixes #38) #52

Merged
Gatchan merged 3 commits from liveness into main 2026-11-04 10:18:14 +00:00
Owner

Liveness per routine (tools/liveness.py, US 4 031 / JP 4 092 routines, conservative), drafts drop dead computations and bridges store back live values only, tools/dontcare_check.py as test rom.dontcare, shadow skips declared don't-care values, --port poison=on. Reuses the user's CT liveness tool.

Evidence: 9 field drafts 1 744 -> 1 709 lines, flag assignments 230 -> 170; draft_check title_to_mines_save + field_menu_tour US+JP 291 836 calls, 0 mismatch, 0 fallback, also with poison on (end hashes match); 10 registry don't-care declarations, 0 refuted; false claim on GetObjMapPtr caught by poison. debug and clang -LE slow 27/27, 0 warnings. Known gap: routine addresses stored as numbers in data tables are not seen (documented).

Stacked on #49's branch. Fixes #38

🤖 Generated with Claude Code

Liveness per routine (`tools/liveness.py`, US 4 031 / JP 4 092 routines, conservative), drafts drop dead computations and bridges store back live values only, `tools/dontcare_check.py` as test `rom.dontcare`, shadow skips declared don't-care values, `--port poison=on`. Reuses the user's CT liveness tool. Evidence: 9 field drafts 1 744 -> 1 709 lines, flag assignments 230 -> 170; draft_check title_to_mines_save + field_menu_tour US+JP 291 836 calls, 0 mismatch, 0 fallback, also with poison on (end hashes match); 10 registry don't-care declarations, 0 refuted; false claim on GetObjMapPtr caught by poison. debug and clang `-LE slow` 27/27, 0 warnings. Known gap: routine addresses stored as numbers in data tables are not seen (documented). Stacked on #49's branch. Fixes #38 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Compilable C per routine with its bridge: values lifted per instruction from the ROM,
widths through SEP/REP and PHP/PLP, flag liveness, callees as functions, RAM-map and
hardware register names. Adapted from the user's chrono-trigger-reimplemented draft tool.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
9 field drafts: title_to_mines_save + field_menu_tour, US+JP, 291836 calls, 0 mismatch,
0 fallback. Usage in docs/drafts.md.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Drafts of the 9 field ports: title_to_mines_save + field_menu_tour US+JP, 291 836 calls,
0 mismatch, 0 fallback, also with poisoning (movies' end hashes match).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
Gatchan/FF6Portage!52
No description provided.