0x1d1 render-text-history
Opcode 0x1d1 (465), adv. Investigated by OME, with high confidence (from investigation).
(layout_slot)(record_index)(flags)(text_color)(effect_color) - render one retained ADV text group into a selected layout in the current text style, breaking rows only at retained line breaks.
Operands
| # | Role | Types seen | Access |
|---|---|---|---|
| 1 | layout slot (an index into layout, 10 entries, not bounds-checked) | l-int | read |
| 2 | history record index | l-int | read |
| 3 | render flags | imm | read |
| 4 | override text color (flag 2) | imm | read |
| 5 | override effect color (flag 2) | imm | read |
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 | 2 |
4.33G (SYS4433) | Kamidori Alchemy Meister | yes | — |
4.38D (SYS4438) | Soukoku no Arterial | no | — |
Evidence
- native-re on SYS4422, high confidence; Himegari SYS4422 Ghidra /v2 (
vm-map/opcodes.toml opcode 0x1d1): op_0x1d1_render_text_history@0x41f950 forwards all five operands plus the text manager at ctx+0x14508 to text_history_render_records@0x4526c0. The worker measures each record string with GetTextExtentPoint32A on the manager DC (current font) and draws with manager +0x54c/+0x550/+0x558; it never reads the record's retained +0x14..+0x24 style, unlike op 0x82's text_redraw_retained_group@0x451530. Flags-8 records reset x to layout+0x1c and add manager +0x560 - +0x4cc. - frida on SYS4422, high confidence; tools/drive.py native and port, tools/drive/scenarios/himegari-wheel-history.steps (
vm-map/opcodes.toml opcode 0x1d1): Native draws SC0000's 24 px rows at 22 px with the 0x333e52 effect and the ADV window's own row breaks; after the port adopted current-style rendering its History shots align pixel for pixel (2026-11-04).
Details
OME’s notes on it, as the registry keeps them.
Records supply only text and flags. Font, colors, effect and render mode are the text manager's current state, so HISTORY.BIN's 22 px style (set at 0xf78) applies, not the 24 px style the ADV window recorded. Rows flow from the target layout's cursor; a line-break record returns x to the layout's reset x and advances y by the current pixel height plus line spacing. There is no wrap or bounds check. Flag bit 0 crosses navigation-filtered records, bit 1 temporarily overrides both colors, bit 2 suppresses destination binding and bit 3 replays voice records. Metadata records are skipped.