From 157b327a0b3bdf5b8f8bccc36e9dc03e11d38614 Mon Sep 17 00:00:00 2001 From: Erik Date: Thu, 3 Sep 2026 12:39:14 +0200 Subject: [PATCH] tools(walk-oracle): block_check capture template for #458 (one block's corner intervals, z slab and verdict) Co-Authored-By: Claude Fable 5.1 --- .../oh/oh-capture-blockcheck.cdb.template | 41 +++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 tools/walk-oracle/oh/oh-capture-blockcheck.cdb.template diff --git a/tools/walk-oracle/oh/oh-capture-blockcheck.cdb.template b/tools/walk-oracle/oh/oh-capture-blockcheck.cdb.template new file mode 100644 index 00000000..6f29e11d --- /dev/null +++ b/tools/walk-oracle/oh/oh-capture-blockcheck.cdb.template @@ -0,0 +1,41 @@ +* OH walk-oracle capture: BLOCK CHECK (2026-09-03, for docs/ISSUES.md #458). +* Prints, for ONE land block (default 0xA9C9FFFF = block a9c9, the doorway +* divergence), every Render::block_check @0x0054dc50 call LScape::draw_check_blocks +* @0x00505f80 makes for it: the four corner interval vectors (32 dwords each, +* raw IEEE-754 — bounds[0] = the CY plane, bounds[1..n] = the active view's +* edge planes; see WalkVisibilityMath.FillClipHeights), the block's z slab +* (max_zval, min_zval — raw dwords), the grid indices (caller's ebx = x, +* ebp = y), and the returned BoundingType at the call's return site +* 0x005061e9 (0 OUTSIDE, 1 PARTIALLY_INSIDE, 2 ENTIRELY_INSIDE). +* +* Register facts (VERIFY IN RECON with `dt acclient!CLandBlock` and by `u +* 005061df`): Render::block_check is a static __cdecl (args on the stack at +* entry: esp+4 west_y, esp+8 west_y+1, esp+0xc east_y, esp+0x10 east_y+1, +* esp+0x14 max_zval, esp+0x18 min_zval); at entry esi/ebx/ebp still hold the +* caller's esi_3 (CLandBlock*), ebx_3 (grid x) and ebp_8 (grid y) — +* callee-saved registers untouched at the first instruction. CLandBlock's +* m_DID sits at +0x28 (DBObj first base, same as CEnvCell — FW0-proven). +* +* LINE FORMATS: +* F -- frame marker (SmartBox::RenderNormalMode) +* P -- viewer pose, raw dwords +* BC did= gx= gy= max= min= +* W0 <32 dwords> / W1 <32 dwords> / E0 <32 dwords> / E1 <32 dwords> +* BR ret= -- the BoundingType returned for that call +* +* AUTO-DETACH: same fall-through + top-level qd recipe as the walk template. +* BEFORE USE: replace and ; change 0xa9c9ffff for another block. + +.logopen +.sympath C:\Users\erikn\source\repos\acdream\refs +.symopt+ 0x40 +.reload /f acclient.exe +r $t0 = 0 +r $t8 = 0 +bp 00453aa0 "r $t0 = @$t0 + 1; .printf \"F %d\\n\", @$t0; .printf \"P %08x %08x %08x %08x %08x %08x %08x %08x\\n\", poi(0081ef00+4), poi(0081ef00+0x3c), poi(0081ef00+0x40), poi(0081ef00+0x44), poi(0081ef00+8), poi(0081ef00+0xc), poi(0081ef00+0x10), poi(0081ef00+0x14); .if (@$t0 < 0n) { gc }" +bp 0054dc50 ".if (poi(@esi+0x28) == 0xa9c9ffff) { r $t8 = 1; .printf \"BC did=%08x gx=%d gy=%d max=%08x min=%08x\\n\", poi(@esi+0x28), @ebx, @ebp, poi(@esp+0x14), poi(@esp+0x18); .printf \"W0\"; dd poi(@esp+4) L20; .printf \"W1\"; dd poi(@esp+8) L20; .printf \"E0\"; dd poi(@esp+0xc) L20; .printf \"E1\"; dd poi(@esp+0x10) L20 }; gc" +bp 005061e9 ".if (@$t8 == 1) { .printf \"BR ret=%d\\n\", @eax; r $t8 = 0 }; gc" +g +.echo ===DETACHING=== +qd +.logclose