From 6cab178a851a60cf0f0999e1bb4909d597697eea Mon Sep 17 00:00:00 2001 From: gamer147 Date: Thu, 9 Jul 2026 00:04:40 -0400 Subject: [PATCH] docs(re): scene-coroutine framework RE head-start (0x7b/0x7c/0x140 + gate) + magic-circle-stuck note Head-start for the next slice: the fix for the slot-0 collapse is running label_125bd via the scene-coroutine framework. 0x7b=yield-save, 0x7c=resume, 0x140=LABEL (target TBD), G[0xaba5c] gate. Plus the revealed magic-circle-persists-across-transition issue. Co-Authored-By: Claude Opus 4.8 --- docs/engine-re.md | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/docs/engine-re.md b/docs/engine-re.md index 819175d..305bc48 100644 --- a/docs/engine-re.md +++ b/docs/engine-re.md @@ -217,6 +217,28 @@ at a time, so sharing slot 0 is harmless and the fresh-branch geometry is correc with several simultaneous distinct-slot objects would need the setup to run. Tracked as the scene-coroutine work, separate from this fix. +**⇒ Scene-coroutine framework — the fix for the slot-0 collapse (2026-07-09, RE head-start).** To run +`label_125bd` (and every scene's slot-table setup) generally, the scene-coroutine framework must work. Ops +(handlers via dispatch table `ctx[0x26c93+op]`): +- **`0x7b` (`FUN_0041ebf0`)** — **yield-state save**: writes op1→`ctx[0x6da88 + ctxidx*4]`, op2→ + `ctx[0x6db28 + ctxidx*4]` (ctxidx = `ctx[0x53d14]`, the coroutine/script-context index). +- **`0x7c` (`FUN_00417cb0`)** — **yield/resume**: requires run-state bit `0x2000000` set (`ctx[0x6dbc8]`); + restores PC = `ctx[0x53d28] + ctx[0x6dbcc]*4`, clears the run-state (`ctx+0xa0ce4 &= ~0x2000000`), resets + input/line state. This is the coroutine RESUME. +- **`0x140` (`LAB_004299c0`)** — the LABEL/yield op (`u0041F9C0`, `"LABEL" "J"` in SC0000 `0x46d`); a LAB not + a FUN, so decompile the actual target next. Central to the re-entry. +- **Gate:** `G[0xaba5c]` (`==1` re-entry gate at SC0000 `0x450`); the scene runs as a coroutine that yields + and re-enters, and `label_125bd` (slot setup) is reached only on the correct pass. `G[0xaba5c]` writers = + DEBUGADV/SC0000/SC0010; compared against [0,1]. +Context records are the 0x78-byte coroutine records at `ctx+0x53d14`/`0x53d88` (see §"Frame cadence"). NEXT: +finish RE (`0x140` target, the gate branch semantics), then implement so cold single-scene runs execute the +scene's setup — removing the need for the manual `--seed` slot-table unblock. + +**Revealed issue (2026-07-08, post slot-fix): a magic-circle effect persists across the scene transition** +(screenshot: opening ritual circle still overlaid on the arena BG). A retained object not released at the +phase change — plausibly the same coroutine/lifecycle gap (scene-phase cleanup), or a separate release/clear +op. Verify once the coroutine framework runs. + #### gfx command-buffer — op contract table (2026-07-07, full family reversed) Every gfx op shares one shape: **write a `cmd-type` into the current object record** (`*(ctx + 0x53d88 +