0xc8 sleep
Opcode 0xc8 (200), control. Investigated by OME, with high confidence (from investigation).
Pause the current script for <duration> milliseconds while retained presentation continues.
Operands
| # | Role | Types seen | Access |
|---|---|---|---|
| 1 | duration_ms | imm | read |
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 0xc8): Ghidra: dispatch ctx[0x26c93+0xc8]=0x420ec0; sleep_op_0xc8 + sleep_timer_arm decoded/annotated 2026-07-08. docs/engine-re.md sleep section. 2026-11-07: the under-10 branch calls kernel32 Sleep inline; AGE imports and calls timeBeginPeriod; Kamidori FIELD's 100-call idle overlay (label_c4c6) appears in the same 0.5 s sample on both targets after the port change.
Details
OME’s notes on it, as the registry keeps them.
Native handler sleep_op_0xc8 @0x420ec0 is NON-BLOCKING: it arms a timer (sleep_timer_arm @0x44cff0 at ctx+0x5f304 = active flag + start tick + duration) that the engine main loop polls, resuming the script when elapsed. Operand UNIT = MILLISECONDS (start = ms tick source DAT_0056f3d4, timeGetTime/GetTickCount class), and the native arm helper clamps duration to a minimum of 1 ms. An operand under 10 skips the timer: the handler calls kernel32 Sleep(operand) and returns, and the main loop renders a dirty frame at its next iteration without waiting for the display; ROOM's input loop's sleep(0) gives up the time slice. The handler also records its generic 3-dword instruction length and runs anti-tamper checks, neither needed host-side. Port equivalent: the Godot host parks the VM thread for max(1, scaled duration) ms while the presentation compositor continues. Under 10 ms it requests presentation without waiting for the compositor, so a sleep-1 poll loop wakes about once a millisecond and a 50 ms mouse callback keeps its period (docs/engine-re.md, 'Short sleeps do not wait for the display', 2026-11-07). Sleep is one proven presentation-capable service boundary; ordinary AE setup runs burst-fast to 0x21c and is not paced per opcode. Headless hosts no-op it (parity). While ADV fast-forward (run-state 0x08000000) is active the handler arms nothing, and the main loop dispatches ops ahead of an already-armed sleep timer; the port returns immediately and ends an in-progress host sleep when fast-forward starts.