Skip to content

Adult titles

The games this site covers are adult titles. Their data, pictures and text include sexual content.

Continue only if you are an adult where you live.

0x2d7 float-to-int

Opcode 0x2d7 (727), compute. Investigated by OME, with high confidence (from investigation).

(destination)(source) — destination = source truncated toward zero, as an integer.

Operands

#RoleTypes seenAccess
1destination integerl-intwrite
2sourcel-float-ptrread-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.

BuildGameUsed by its scriptsEvidence
4.24J (SYS4422)Himegari Dungeon Meisterno—
4.33G (SYS4433)Kamidori Alchemy Meisterno—
4.38D (SYS4438)Soukoku no Arterialyes1

Evidence

  • native-re on SYS4438, high confidence; Arterial SYS4438 Ghidra /arterial/4.38D and the complete Arterial catalog (vm-map/opcodes.toml opcode 0x2d7): op_0x2d7_float_to_int@0x42df20 stores the instruction length (5 dwords), fetches operand 2 as a float, converts it with the runtime's __ftol2_sse (0x585180, byte for byte Kamidori's crt_ftol2_sse_truncate but for one global's address: toward zero, 0x80000000 for NaN or a value outside int32) and writes the integer to operand 1 through vm_operand_write. 創刻のアテリアル has 4 sites.

Details

OME’s notes on it, as the registry keeps them.

The operand comes through the float accessor (vm_operand_fetch_float), which leaves an integer exact on the x87 stack; the truncation does no arithmetic, so the x87's single precision does not reach it. A float-pointer operand (type 0xd) is a local float reference (docs/engine-re.md, "Float cells as arrays, and float references").