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.

0x20d select-render-target

Opcode 0x20d (525), draw. Investigated by OME, with high confidence (from investigation).

Select an offscreen surface slot as Direct3D render target 0, or restore the device backbuffer when the operand is at least 1000.

Operands

#RoleTypes seenAccess
1surface slot; >=1000 selects the backbufferimm, l-intread

It works with 0x20c, 0x1c7, 0x1cc. Named by 0x21, 0x22, 0x23, 0x24, 0x25 as one it works with.

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 0x20d): Ghidra /v2: op_0x20d_select_render_target@0x422e10 passes operand 1 and retained-gfx owner ctx+0x46614 to retained_gfx_select_render_target@0x479660. Its D3D calls resolve texture level 0 or backbuffer 0, then invoke device vtable +0x94 SetRenderTarget and store selected slot at owner+0xb530. DATA1: 113 calls in 24 scripts.

Details

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

For slots below 1000 the native worker obtains that surface's level-0 D3D texture surface and calls IDirect3DDevice9::SetRenderTarget(0,...). The >=1000 path obtains backbuffer 0 and records current target -1. Himegari commonly follows a freshly created blank surface selection with 0x20e before drawing into it. The test is unsigned (/v2 retained_gfx_select_render_target@0x479660: CMP 0x3e7; JA), so slot -1, which both games' retail scripts pass, selects the backbuffer too, as in the port (2026-11-17; docs/engine-re.md, 'The 28 ops' native tests').