0x13a register-numeric-glyph-style
Opcode 0x13a (314), draw. Investigated by OME, with high confidence (from investigation).
Register a decimal-glyph atlas style as (surface slot, source x/y, digit width/height); the handler admits style indices 0..10.
Operands
| # | Role | Types seen | Access |
|---|---|---|---|
| 1 | style_index (an index into glyph style, 10 entries, not bounds-checked) | imm | read |
| 2 | surface_slot | imm, l-int | read |
| 3 | atlas_x | imm | read |
| 4 | atlas_y | imm | read |
| 5 | digit_width | imm | read |
| 6 | digit_height | imm | read |
Named by 0x23b 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 | no | — |
Evidence
- native-re on SYS4422, high confidence; Himegari AGE.EXE Ghidra /v2 and decoded script corpus (
vm-map/opcodes.toml opcode 0x13a): Ghidra /v2: op_0x13a_register_numeric_glyph_style@0x421ab0 writes operands 2..6 to EngineCtx+0x55180+style_index*0x14 after enforcing style_index<11. scene_context_init_reset@0x40b560 clears 200 bytes at +0x55180, exactly ten records; record 10 therefore overlaps ret_stack_a at +0x55248. Corpus: 74 sites in 24 scripts; all literal style registrations are 0..9.
Details
OME’s notes on it, as the registry keeps them.
SYS4422 stores the five-dword definition at EngineCtx+0x55180+style_index*0x14. SYS4433 stores the same five fields in a seven-dword record at EngineCtx+0x5940c+style_index*0x1c and clears the two cell-spacing fields to zero; opcode 0x2da is its extended writer for all seven fields. Opcode 0x23b consumes the selected revision's record to turn an integer into retained draw objects, one atlas cell per decimal digit. SYS4422 scene reset clears only ten physical records (200 bytes, indices 0..9); the admitted index 10 begins at EngineCtx+0x55248 and aliases the return-stack table. Himegari's literal registrations use only 0..9. The port keeps the ten records: style 10 halts the run, and a larger style is traced as CGNumberの引数が不正です. and skipped (2026-11-17). The same reset first zeroes the return-stack table (+0x55248, 0xa0 bytes), so after a reset all eleven records are zero; SYS4433 likewise zeroes 0x118 bytes at +0x5940c and 0xa0 bytes at +0x59524 (scene_context_init_reset_sys4433@0x40c2b0). The port clears its ten at op 0x9 (2026-11-13).