0x7c coroutine-resume
Opcode 0x7c (124), control. Investigated by OME, with high confidence (from investigation).
() — scene-coroutine RESUME point (native name EndHWL). Native requires run-state bit 0x2000000 (ctx[0x6dbc8]) set — THROWS (__CxxThrowException) if unset, so it is only ever reached on a scheduler-driven re-entry, NEVER on a cold first pass (cold flow jmps over it). A resume saved by another script raises the Depth error first. Restores PC=ctx[0x53d28]+ctx[0x6dbcc]*4, clears the run-bit (ctx+0xa0ce4 &= ~0x2000000), resets input/line state. SC0000 0x443 (falls into the main loop label_444). See engine-re.md §Scene-coroutine framework.
Operands
It takes no operands.
In the port
OME’s port implements it. It may wait: a wait parks the engine until input, a sleep, a transition, a dialog or a movie ends. What it can do with control besides waiting:
falls: it returns to the next instructionjumps: it continues at another instruction of its frameends: it ends its frame, the scene or the run, itself or because a frame it ran did
OME derives these facts from the port’s handler (its tools/opcode_flow.py), and they over-approximate: a fact some path can reach is given.
By build
Whether each build’s scripts use it, as OME’s survey of the game’s scripts saw them, and how many evidence items name the build.
| Build | Game | Used by its scripts | Evidence |
|---|---|---|---|
4.24J (SYS4422) | Himegari Dungeon Meister | yes | 1 |
4.33G (SYS4433) | Kamidori Alchemy Meister | yes | — |
4.38D (SYS4438) | Soukoku no Arterial | yes | — |
Evidence
- native-re on SYS4422, high confidence; Himegari AGE.EXE Ghidra /v2 and decoded script corpus (
vm-map/opcodes.toml opcode 0x7c): Ghidra /v2: op_0x7c_handler@0x417cb0 (dispatch ctx[0x26c93+0x7c]). Guards on (ctx[0x6dbc8] & 0x2000000)==0 → throw flags 0x10005 with 0x571498 「不正な位置でEndHWLが呼び出されました.」; compares frame_script_resource_id with ctx+0x5f6bc and throws the 0x570424 Depth message on a mismatch; else restores PC = ctx[0x53d2c-slot] = ctx[0x53d28]+ctx[0x6dbcc]*4, ctx[0xa0ce4]=ctx[0x6dbc8]&0xfdffffff, clears input state: the hotspot hits ctx+0xc6f8 and ctx+0x13bdc = -1 and their pending enters ctx+0xc6f0 and ctx+0x13bd4 = 0. Frida 2026-11-05 (SC0000 page 3 hide): the registry hit went 4 -> -1 at the op 0x7c that enters the hidden-window wait, with no WM_MOUSEMOVE, and hovered stayed 4.
Details
OME’s notes on it, as the registry keeps them.
The yield state is engine-wide: coroutine_runstate (+0x6dbc8), coroutine_resume_off (+0x6dbcc) and coroutine_yield_owner_script_id (+0x5f6bc), the script that op 0x199 (or an engine-armed yield) saved it from. When the running frame's script is not that owner, the handler throws flags 0x10007 "Depth が不正です <running> != <owner>" before changing anything, so 再試行 raises it again. It records no instruction length before either throw, so 無視 skips by the previous handler's length. The port keeps the yield on the VM and skips the 0x7c itself on 無視 (engine-re.md, "The other guards"). The restored run state is coroutine_runstate & ~0x2000000, so a yield still entered (bit 0x4000000: handler A ended here without a second op 0x199) leaves the frame in the hidden-window wait: engine_main_tick_with_exception_policy@0x411ec8 polls input_poll_triggered_action_mask each tick and, on the first trigger, enters handler B with a fresh yield (run state | 0x2000000, resume = the frame pc, owner = the running script). A yield entered from a text wait (adv_input_service_poll's action-5 entry) restores the wait's 0x80000000 and returns to the parked wait. Port: VirtualMachine.WaitInHiddenWindow (2026-11-05; engine-re.md, "ADV hide window: the engine's hidden-window wait"). The input state it resets is the hotspot hit: ctx+0xc6f8 (registry +0x74b0) and ctx+0x13bdc (op-0x95 choice table) become -1 and their pending enters (ctx+0xc6f0, ctx+0x13bd4) 0, while the hovered record stays. The wait's next poll then runs the hovered record's leave, and a click hits nothing until a WM_MOUSEMOVE at a new point re-tests: after a Space hide-and-restore under a resting pointer, the control loses its tooltip and a click on it advances the page (native-driven 2026-11-05). Port: HotspotRegistry.InvalidateHit (engine-re.md, "The hit and the hovered record").