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.

0x60 random-modulo

Opcode 0x60 (96), compute. Investigated by OME, with high confidence (from investigation).

(destination)(bound) — write CRT rand() % bound. A bound of zero first writes zero and then raises the engine's script error.

Operands

#RoleTypes seenAccess
1random remainder destinationl-int, l-ptrwrite
2exclusive modulus boundimm, l-int, l-ptrread

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 Meisteryes1
4.33G (SYS4433)Kamidori Alchemy Meisteryes—
4.38D (SYS4438)Soukoku no Arterialyes—

Evidence

  • native-re on SYS4422, high confidence; Himegari AGE.EXE Ghidra /v2 and decoded script corpus (vm-map/opcodes.toml opcode 0x60): Ghidra /v2: op_0x60_handler@0x426970 calls imported CRT rand(), fetches operand 2, takes signed remainder, and writes operand 1. The zero-bound branch writes zero then throws error 0x10005. ROOM@0x5 calls (local 0x110,4), and its following branches select one of four character surface sets; variants 0..2 also select voice-id sextets. /v2 annotated and saved 2026-07-21.

Details

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

Native draws are not reproducible: _rand@0x550fe4 is the MSVC LCG (seed * 0x343fd + 0x269ec3), seeded from the tick count by _srand@0x550fd7 (0x413b7f, 0x413c8d, 0x44e5d4), and the main tick, screen transitions, the save encoder and the catalog parse draw from the same generator, as AGE 4.38D's leaf effect does. The port draws from its model of that generator (Ome.Engine/Hosting/CrtRandom.cs), seeded from the tick count and shared with the leaf effect and Lua's math.random; the main tick, transitions, save encoder and catalog parse are not modelled, so the sequences still differ. Kamidori's enemy movement, spawns and battle rolls therefore differ between native and the port from the first enemy phase on. The drive step rand-seed gives both targets the same per-call-site streams (Ome.Engine/Natives/ScriptMemory.Random.cs; native: a Frida probe after the rand() call, SYS4422 0x4269af, SYS4433 0x42768f), and a seeded Kamidori enemy turn and battle end alike on both (docs/engine-re.md, 'Op 0x60 randomness', 2026-11-07).