0x21c mark-frame-yield
Opcode 0x21c (540), control. Investigated by OME, with high confidence (from investigation).
Set native run-state bit 0x400; in normal ADV playback this is the retained-presentation render/wait/resume boundary.
Operands
It takes no operands.
It works with 0x223, 0x1c7, 0x1cc. Named by 0x223, 0x24f, 0x250, 0x251 as one it works with.
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 instruction
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 0x21c): Ghidra handler 0x417520 records the 1-dword instruction length and ORs ctx+0xa0ce4 with 0x400. engine_main_tick_with_exception_policy@0x411840 branch 0x4123d1 polls gfx_animation_service_poll; its active branch reads EffectSkipOnClick@0x570f60, rejects gfx_animation_service_flags bit 0, polls/consumes action-4 bit 0x10, clears run-state 0x400, calls gfx_request_force_complete_and_reset_anim_clock@0x4076c0, then gfx_render_frame. capture_presentation_trace.py: after 0x125a6 render, 0xcb8e/0xcb98 bind and 0xd5a/0xd63/0xd73/0xd8a mode+targets execute without render; repeated gfx_render_frame begins only at 0x21c. 2026-07-10, click lifecycle refined 2026-07-29. The wait ends when gfx_animation_service_poll returns 0 (op 0x238's anim-clock window over, then manager +0xb560: set by the one-shot channel setters, gfx_object_apply_transform_channels@0x473d80 and the surface-command composite while an effect runs, cleared by gfx_render_frame) and no movie surface holds it ([ebp-0x24] from surface_movie_is_playing@0x405150, which answers ((+0x424 ? +0x430 : +0x440) & 5) == 4 on the movie op's stored movie_flags for the movie object's lifetime, not on playback: only flags with bit 2 set and bit 0 clear hold the wait; Kamidori's movies all pass 0 and Himegari SC0000's 2, so neither holds it through the movie itself; port MovieSurfaceRegistry.HoldsServiceWait, 2026-11-07); each tick re-samples timeGetTime and calls Sleep(0), so the wait ends on the first tick past its last effect. Frida on SC0000's page 13->14: four 0x21c waits of 150, 890, 150 and 300 ms on frame time +0xb550 (2026-11-05; port: docs/engine-re.md 'Service waits end on the engine clock').
Details
OME’s notes on it, as the registry keeps them.
SC0000 label_1235a reaches this when 0x1c7/0x1cc are zero. Native run-state bit 0x400 parks the interpreter while gfx_render_frame repeatedly samples finite one-shot object channels and queued surface commands; op 0x224 follows after dirty state clears. When system:EffectSkipOnClick is enabled and animation-service flag bit 0 is clear, logical action 4 is consumed and run-state 0x400 is cleared before the engine requests the same forced completion as 0x243 and renders once. Under fast-forward the main tick forces every iteration (gfx_request_force_complete_and_reset_anim_clock, unless service-flags bit 1), so a wait entered then ends at its first poll; enabling fast-forward during a wait does not end it, because run-state 0x400 is serviced ahead of the fast-forward branch (docs/engine-re.md, "Effect waits under fast-forward"). Wait release is independent of endpoint completion: service-flags bit 1 can suppress the force worker, while op-0x242-detached channels, ambient cycles, and movie-backed presentation can continue asynchronously after interpreter resume. With ordinary flags, the request completes finite color/scale/rotation/translation channels and type-0 surface commands together. Native trace proves AE001D bind, mode-1 0x203, and 0x202 targets complete in one 5 ms batch with no render, then first compose here.