0x2d3 div-float
Opcode 0x2d3 (723), compute. Investigated by OME, with high confidence (from investigation).
(destination)(a)(b) — destination = a / b, in floats. A zero divisor is not tested: the quotient is the IEEE infinity or NaN.
Operands
| # | Role | Types seen | Access |
|---|---|---|---|
| 1 | destination | l-float | write-float |
| 2 | dividend | l-float | read-float |
| 3 | divisor | imm, float, l-float | read-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 | no | 1 |
4.38D (SYS4438) | Soukoku no Arterial | yes | 3 |
Evidence
- native-re on SYS4438, high confidence; Arterial SYS4438 Ghidra /arterial/4.38D and the complete Arterial catalog (
vm-map/opcodes.toml opcode 0x2d3): op_0x2d3_div_float@0x42dde0 stores the instruction length (7 dwords), fetches operand 2, then operand 3, and writes operand 2 divided by operand 3 to operand 1, with no test of the divisor. 創刻のアテリアル has 22 sites. - native-re on SYS4438, SYS4422, SYS4433, high confidence; Ghidra /arterial/4.38D, /v2 and /kamidori/4.33G (
vm-map/opcodes.toml opcode 0x2d3): gfx_create_d3d9_device (4.38D 0x484690, 4.22 0x470960, 4.33G 0x476e80) creates the device with D3DCREATE_MULTITHREADED and without D3DCREATE_FPU_PRESERVE, so Direct3D sets the creating thread, which also runs the script VM, to single precision. - frida on SYS4438, high confidence; tools/drive.py native and port with a scratch patch at DEBUG.BIN's polygon test (
vm-map/opcodes.toml opcode 0x2d3): The patch (2026-11-20) had native compute 33554434 + 2^-40 - 33554436 and (2130706814 / 2130706433 - 1) * 8388608 and colour two polygons by the results: native gave 0 and 1, the values one rounding to a float gives (two roundings give -4 and 2), and the port with SinglePrecision gave the same.
Details
OME’s notes on it, as the registry keeps them.
Both operands come through the float accessor (vm_operand_fetch_float), which leaves an integer operand exact on the x87 stack. The operation itself rounds the exact result to a float: Direct3D runs that thread's x87 at single precision (docs/engine-re.md, "The x87 runs at single precision"), and vm_operand_write_float stores the value unchanged. The port rounds the exact result once as well (SinglePrecision); computing in double and storing a float would round twice, which differs only when an integer operand has more than 24 significant bits. A float-pointer operand (type 0xd) is a local float reference (docs/engine-re.md, "Float cells as arrays, and float references").