0x71 reset-adv-text-layout
Opcode 0x71 (113), adv. Investigated by OME, with high confidence (from investigation).
(layout_slot) - clear/reset an ADV text layout, append a retained-history boundary when recording is enabled, snapshot the current code/text position, and commit pending ReadTextDB records. T1 entries target these structural reset sites.
Operands
| # | Role | Types seen | Access |
|---|---|---|---|
| 1 | layout slot (0 = current) (an index into layout, 10 entries, not bounds-checked) | imm, l-int | read |
Named by 0x79, 0x1c1 as one it works with.
In the port
OME’s port implements it. It never waits: 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 0x71): Corpus: T1 targets op-0x71 records, but the operand is a layout slot (SC0000 uses 1; HISTORY computes 2..6), not an anchor id. Ghidra /v2: op_0x71_handler@0x41e540 calls adv_text_layout_reset@0x455210 with ctx+0x55110; adv_text_layout_reset_cursor_and_bounds_record@0x455070 reconstructs the initial five-dword record, then reset zeroes the complete layout surface and calls gfx_object_erase_range(first,capacity). It appends {slot,current_record_count}/arms group-start unless suppressed. The handler also snapshots (frame_pc-frame_codebase)/4 and text state and calls read_text_db_commit_pending@0x46ae20. It also snapshots the surface records: memcpy of the live table ctx+0x46d14 to the page snapshot ctx+0x4bb34 (1000 x 0x14), which numbered saves write, plus resource records ctx+0x3cac to ctx+0x415c (2026-11-03).
Details
OME’s notes on it, as the registry keeps them.
The reset recreates the initial {0,reset_x,reset_y,right,bottom} layout record, clears every pixel of source surface layout_slot+0x14, and erases the complete configured glyph-object range. Port status (2026-07-24): also commits the profile-owned ReadTextDB queue and records the current T1 coordinate. After the commit it runs the read-skip block shared with ops 0x6e and 0x72 (0x41e63a), so a reset outside ADV (after op 0x19b; Kamidori FIELD@0x30a) does not restart fast-forward from persistent Skip (docs/engine-re.md, 'Read skip and ctx+0x13dc'). Port: VirtualMachine.ApplyReadTextSkip (2026-11-07).