0x2da register-extended-numeric-glyph-style
Opcode 0x2da (730), draw. Investigated by OME, with high confidence (from investigation).
Register a SYS4433 decimal-glyph atlas style with independent source-cell and destination-cell spacing.
Operands
| # | Role | Types seen | Access |
|---|---|---|---|
| 1 | style_index (an index into glyph style, 10 entries, not bounds-checked) | imm | read |
| 2 | surface_slot | imm | read |
| 3 | atlas_x | imm | read |
| 4 | atlas_y | imm, l-int | read |
| 5 | digit_width | imm | read |
| 6 | digit_height | imm | read |
| 7 | source_cell_spacing | imm | read |
| 8 | destination_cell_spacing | imm, l-int | read |
It works with 0x23b.
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 | no | — |
4.33G (SYS4433) | Kamidori Alchemy Meister | yes | 1 |
4.38D (SYS4438) | Soukoku no Arterial | yes | — |
Evidence
- native-re on SYS4433, high confidence; Kamidori SYS4433 Ghidra /kamidori/SYS4433 (4.33F), addresses given for /kamidori/4.33G (
vm-map/opcodes.toml opcode 0x2da): op_0x2da_register_extended_numeric_glyph_style@0x423510 writes all seven fields after enforcing index<11; op_0x23b_draw_decimal_glyphs@0x422030 adds fields 6/7 to digit width for source/destination stride. DRAWCHP.BIN@0x626 is the first reached dungeon site; SYS4422 has no handler in slot 0x2da.
Details
OME’s notes on it, as the registry keeps them.
Operand 1 selects one of the ten style records (the handler admits 0..10; see op 0x13a). Operands 2..6 match opcode 0x13a: source surface slot, atlas x/y, and digit width/height. Operand 7 is added to digit width when stepping between source atlas cells; operand 8 is added to digit width when placing destination glyph objects. Opcode 0x23b consumes all seven fields. Invalid style indices are traced as CGNumber's argument error. The complete Kamidori catalog has 66 calls; the first reached dungeon site is DRAWCHP.BIN@0x626 with (0, 0x40, 0x39f, 0x2fe, 0x15, 0x1d, 1, 1). SYS4422 does not install dispatch slot 0x2da.