0x215 query-gfx-object?
Opcode 0x215 (533), draw. Investigated by OME, with high confidence (from investigation).
0x215 (out_slot)(handle) — query the retained gfx-object map. Handler gfx_op_0x215_query_source_slot@0x42a0b0 calls gfx_object_query_source_slot@0x47f280 with owner ctx+0x46614. The worker searches owner+0x408, the same map populated by geometry/draw workers, and returns obj+4: the live source-surface slot written by draw-texture, or -1 if absent. gfx_object_init_default zeroes obj+4, so a geometry/animation-created but draw-unbound object returns slot 0, not -1. SC0000 uses a successful result for query-guarded teardown: op 0x1f7 erases the object group and op 0x1fa releases this slot. Matching the zero default prevents stale transforms from surviving into the EV050EA CG at SC0000 page 58. SYS4433 differs: its handler (Kamidori 0x42af40) calls worker 0x486120 with owner ctx+0x4a884, which returns obj+4 only when flag bit 0, set by draw-texture, is set, and -1 otherwise. A draw-unbound object therefore reads -1 on Kamidori, so SC1250's layer routine label_f63f fades a CG in fresh instead of measuring surface 0 for the crossfade.
Operands
| # | Role | Types seen | Access |
|---|---|---|---|
| 1 | out_slot_status | g-int, l-int | write |
| 2 | handle_id | imm, g-int, l-int, l-ptr | 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 | 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 0x215): Ghidra: handler 0x42a0b0 passes ECX=ctx+0x46614 to 0x47f280, which searches ECX+0x408 and returns object+4. gfx_object_bind_draw@0x47e870 writes the bound slot there; gfx_object_init_default@0x472810 explicitly writes zero to dword index 1. SC0000 page-58 trace: the old -1 default skipped cleanup of transform-created handle 0xcb2a, then EV050EA inherited translation (-100,0), rotation -90, and alpha 0; the native zero default makes the guard succeed and the reused object is identity/opaque. SYS4433 (4.33G and 4.33F 0x486120, 2026-11-09): after the map lookup it tests the record's first dword bit 0 before returning +4. Kamidori sweep: SC1250 label_fcb3 erases layer 1's object 0xcb2a, 0x98aa's op 0x202 get-or-creates it unbound (0x485740 -> 0x484b40), and the CG call at 0x9b03 queried it. Returning slot 0 sent label_f63f to the crossfade branch, where op 0x208 on released surface 0 gave 0x0 and EV021AA was drawn at (-512,-576); native showed it at (0,0). With the bit-0 test, positions and shots match native through SC1250's end.