0x228 query-gfx-translation-current
Opcode 0x228 (552), draw. Investigated by OME, with high confidence (from investigation).
0x228 query current translation (succ)(handle)(outX)(outY)(outZ): clone the retained object, decompose its current translation matrix at obj+0x16c, and return its x/y/z translation. Returns succ=0 when found; when absent, writes succ=1 and leaves outputs untouched. This is independent of both delayed target obj+0x1ac and base draw position V24. See docs/engine-re.md §SC0000 anim cluster.
Operands
| # | Role | Types seen | Access |
|---|---|---|---|
| 1 | — | g-int, l-int | write |
| 2 | — | imm, g-int, l-ptr | read |
| 3 | — | g-int, l-int | — (by build: SYS4422 write; SYS4433 write-float; SYS4438 write-float) |
| 4 | — | g-int, l-int | — (by build: SYS4422 write; SYS4433 write-float; SYS4438 write-float) |
| 5 | — | g-int, l-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 | 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 0x228): Ghidra /v2 handler gfx_op_0x228_query_translation_current@0x42a3a0 calls gfx_object_query_translation_current@0x47cdd0. The worker copies the complete 0xb5-dword object record to stack local -0x2e0, then passes local_174, exactly +0x16c within that copy, to matrix4_decompose_affine@0x48d7c8. Thus it decomposes the current matrix obj+0x16c, not target obj+0x1ac. SYSTEM4 P102 supplies the runtime proof: SC0000@0x84e8 resets BG001A current translation to zero, 0x228@0x84fa must return zero, and 0x220@0x8521 then targets +600. The port's target query returned the preceding CG endpoint +600, producing +1200 and leaving BG001A below the viewport. Missing-object output preservation remains valid. Functions renamed, commented, and /v2 saved 2026-08-16.
Details
OME’s notes on it, as the registry keeps them.
Implemented by querying TranslationCurrent while preserving the missing-object output contract. The focused regression seeds a reused handle with current/target +600, rebinds it, applies SC0000's 0x1ff current-zero reset, verifies 0x228 returns zero, and confirms the following 0x220 target is +600 rather than +1200. An exact GPU SYSTEM4 P102 capture at wait SC0000@0x85de shows BG001A visible at its intended endpoint.