0x106 get-joystick-button-count
Opcode 0x106 (262), input. Investigated by OME, with high confidence (from investigation).
(out_count) — return the active joystick device's physical button capability count; zero when no device/capability is exposed.
Operands
| # | Role | Types seen | Access |
|---|---|---|---|
| 1 | physical joystick button count output | g-int | write |
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 0x106): SYS4422 op_0x106_get_joystick_button_count@0x428b30 writes EngineCtx.joystick_physical_button_count (+0x898) to operand 1; SYS4433 @0x4299a0 writes its matching +0x898 field. Kamidori has one global-int output call at CONFIG@0x12; Himegari installs the equivalent handler without a decoded corpus call.
Details
OME’s notes on it, as the registry keeps them.
Both native handlers directly return the input manager field populated from the active joystick device capabilities. The portable VM reads the equivalent optional input-host capability and defaults to zero for headless or hosts without controller enumeration. Kamidori's sole CONFIG@0x12 call stores the result in global 0xfd49b for its controller-configuration path.