Frame model: per-port coroutine for routines that wait for frames #37
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
Every heavy field/battle/menu routine waits for NMI or spans frames (docs/coverage.md, timing-census.md). Brief §5.1 and workdocs/execution-model.md describe the model (libco coroutines,
wait_frame()as a scheduling point) butcore/has noco_createyet.Scope: design and implement the frame model for ported code (a ported routine that waits for a frame yields to the host; the interpreter and the port interleave correctly), with one real port that waits for a frame as the proof, validated in shadow US+JP. Needed before
FieldMain/FieldNMIand any multi-frame loader.From the 2026-11-02 plan review.
Merged in PR #65 (
355a2d9). Frame model: tm_wait_frame + per-port libco coroutines; shadow compares a waiting call at its return (clone follows the original cycle by cycle). Ports: field/WaitVblank, btlgfx/WaitVblank. Shadow, chapter 1 routes US+JP once each: btlgfx 39108/39108 US, 37025/37025 JP; field 46586/46589 US, 42888/42891 JP (last call per route pending at movie end), 0 mismatch, 0 fallback. portcheck all PASS (136). debug ctest -LE slow 27/27. Side bug #64 (LakeSnes FastROM table after state load) fixed in core/hw.