The six termtris test copies of dwt/loader/loader.lua still carry loader-only code paths that no termtris test reaches, plus one stale diagnostic. This is cleanup that should happen with (or before) the de-duplication in the sibling issue.
Dead or unreachable in the termtris tests (head 58f8f44)
Descriptor modes.LOADER_MODE, LOADER_A8_DESC, RETURN_STUB and RETURN_SP are declared in every copy but no tests/*.sh sets them. The w32(DESC + 0x60, MODE), if MODE == 1 then ... jauc/jruc and cpu.state['A8'].value = A8DESC and DESC or 0 branches are therefore dead for these six tests.
marker/xhello result branches. The if base:find("marker") ... elseif base:find("xhello") ... dump code is unreachable for termtris COFFs (the files are termtris.coff), as is the base_contains_marker counter polling.
Stale trace path. Every copy does dbg:command("trace /tmp/opencode/ld1.tr") but then prints LOADER: trace written to /tmp/opencode/ld.tr. Either fix the two paths or drop LOADER_TRACE.
Empty status block. All six contain an empty conditional whose body is only a comment:
ifst~=0xFFFFFFFFandnotdonethen-- The loader writes 0 on success...end
It does nothing; either implement the intended "nonzero is final" rule or remove it.
Unused key.play_keys.lua:43 declares key_p and never uses it (input.lua:158-159 is the one that does).
Diverged result format.play.lua:280 prints DIAG: tick=... quit=...; play_keys.lua prints the loops/events/last/focus/rev/quit line. A shared harness needs one format.
Acceptance
After removing the dead paths, apps/termtris/verify.sh --skip-mame still reports verify: PASS, and grep finds no unused MODE/A8DESC/RETURN_SP/xhello constants in apps/termtris/tests/.
This is a follow-up to PR #5, not a blocker for it.
The six termtris test copies of `dwt/loader/loader.lua` still carry loader-only code paths that no termtris test reaches, plus one stale diagnostic. This is cleanup that should happen with (or before) the de-duplication in the sibling issue.
## Dead or unreachable in the termtris tests (head `58f8f44`)
- **Descriptor modes.** `LOADER_MODE`, `LOADER_A8_DESC`, `RETURN_STUB` and `RETURN_SP` are declared in every copy but no `tests/*.sh` sets them. The `w32(DESC + 0x60, MODE)`, `if MODE == 1 then ... jauc/jruc` and `cpu.state['A8'].value = A8DESC and DESC or 0` branches are therefore dead for these six tests.
- **marker/xhello result branches.** The `if base:find("marker") ... elseif base:find("xhello") ...` dump code is unreachable for termtris COFFs (the files are `termtris.coff`), as is the `base_contains_marker` counter polling.
- **Stale trace path.** Every copy does `dbg:command("trace /tmp/opencode/ld1.tr")` but then prints `LOADER: trace written to /tmp/opencode/ld.tr`. Either fix the two paths or drop `LOADER_TRACE`.
- **Empty status block.** All six contain an empty conditional whose body is only a comment:
```lua
if st ~= 0xFFFFFFFF and not done then
-- The loader writes 0 on success...
end
```
It does nothing; either implement the intended "nonzero is final" rule or remove it.
- **Unused key.** `play_keys.lua:43` declares `key_p` and never uses it (`input.lua:158-159` is the one that does).
- **Diverged result format.** `play.lua:280` prints `DIAG: tick=... quit=...`; `play_keys.lua` prints the loops/events/last/focus/rev/quit line. A shared harness needs one format.
## Acceptance
After removing the dead paths, `apps/termtris/verify.sh --skip-mame` still reports `verify: PASS`, and `grep` finds no unused `MODE`/`A8DESC`/`RETURN_SP`/`xhello` constants in `apps/termtris/tests/`.
This is a follow-up to PR #5, not a blocker for it.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
The six termtris test copies of
dwt/loader/loader.luastill carry loader-only code paths that no termtris test reaches, plus one stale diagnostic. This is cleanup that should happen with (or before) the de-duplication in the sibling issue.Dead or unreachable in the termtris tests (head
58f8f44)LOADER_MODE,LOADER_A8_DESC,RETURN_STUBandRETURN_SPare declared in every copy but notests/*.shsets them. Thew32(DESC + 0x60, MODE),if MODE == 1 then ... jauc/jrucandcpu.state['A8'].value = A8DESC and DESC or 0branches are therefore dead for these six tests.if base:find("marker") ... elseif base:find("xhello") ...dump code is unreachable for termtris COFFs (the files aretermtris.coff), as is thebase_contains_markercounter polling.dbg:command("trace /tmp/opencode/ld1.tr")but then printsLOADER: trace written to /tmp/opencode/ld.tr. Either fix the two paths or dropLOADER_TRACE.play_keys.lua:43declareskey_pand never uses it (input.lua:158-159is the one that does).play.lua:280printsDIAG: tick=... quit=...;play_keys.luaprints the loops/events/last/focus/rev/quit line. A shared harness needs one format.Acceptance
After removing the dead paths,
apps/termtris/verify.sh --skip-mamestill reportsverify: PASS, andgrepfinds no unusedMODE/A8DESC/RETURN_SP/xhelloconstants inapps/termtris/tests/.This is a follow-up to PR #5, not a blocker for it.