0x227 query-gfx-rotation-current
Opcode 0x227 (551), draw. Investigated by OME, with high confidence (from investigation).
(out failure)(handle)(out axis_x)(out axis_y)(out axis_z)(out angle_degrees) — query a retained object's current axis-angle rotation. Found writes failure=0 and the current values; missing writes failure=1 and preserves all four outputs.
Operands
| # | Role | Types seen | Access |
|---|---|---|---|
| 1 | out: failure flag (0 found, 1 missing) | g-int | write |
| 2 | retained gfx object handle | g-int | read |
| 3 | out: current rotation axis X | g-int | — (by build: SYS4422 write; SYS4433 write-float; SYS4438 write-float) |
| 4 | out: current rotation axis Y | g-int | — (by build: SYS4422 write; SYS4433 write-float; SYS4438 write-float) |
| 5 | out: current rotation axis Z | g-int | — (by build: SYS4422 write; SYS4433 write-float; SYS4438 write-float) |
| 6 | out: current rotation angle in degrees | g-int | — (by build: SYS4422 write; SYS4433 write-float; SYS4438 write-float) |
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 | 1 |
4.33G (SYS4433) | Kamidori Alchemy Meister | yes | 1 |
4.38D (SYS4438) | Soukoku no Arterial | no | — |
Evidence
- native-re on SYS4422, SYS4433, high confidence; Himegari SYS4422 Ghidra /v2 and Kamidori SYS4433 Ghidra /kamidori/SYS4433 (4.33F), addresses given for /kamidori/4.33G (
vm-map/opcodes.toml opcode 0x227): SYS4422 op_0x227_query_rotation_current@0x42a2e0 calls gfx_object_query_rotation_current@0x47cd20; SYS4433 equivalents are @0x42b1a0 and @0x484510. Both workers clone the retained object and return current axis X/Y/Z plus current angle from +0x1ec/+0x1f0/+0x1f4/+0x204, return false when the handle is absent, and never read the target fields. Missing handlers write only operand 1=1; success writes operands 3..6 then operand 1=0. SYS4422 uses __ftol2_sse before its integer writer; SYS4433 uses vm_operand_write_float@0x426c00. Kamidori has twelve all-global-int calls, six each in SC0600.BIN@0x566d..0x57d5 and SC2060.BIN@0x107a..0x1228.
Details
OME’s notes on it, as the registry keeps them.
The current values are the stored object fields at +0x1ec/+0x1f0/+0x1f4/+0x204, independently of delayed target axis +0x1f8..+0x200 and target angle +0x208. SYS4422 explicitly truncates the four floats toward zero before its integer operand writer. SYS4433 routes them through its float-aware destination writer, which performs the equivalent conversion for Kamidori's exclusively global-integer outputs. SC0600 and SC2060 each query six parallel presentation objects before constructing their next rotation target.