From 7bb799b02c550edf132f3aa5a46c0349416cc137 Mon Sep 17 00:00:00 2001 From: Erik Date: Thu, 21 May 2026 18:41:29 +0200 Subject: [PATCH] =?UTF-8?q?feat(cdb):=20A6.P1=20=E2=80=94=207-BP=20probe?= =?UTF-8?q?=20script=20for=20retail=20BSP=20collision=20response?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sets non-blocking breakpoints on transitional_insert, step_up, set_collide, find_collisions, adjust_sphere_to_plane, validate_walkable, set_contact_plane. Each BP increments a counter and emits a single printf line. Auto-detach via qd at 50K total hits to avoid retail lag (CLAUDE.md gotcha — high BP rates trigger ACE timeout). Also adds !tools/cdb/*.cdb negation to .gitignore so committed reference scripts in tools/cdb/ are tracked despite the blanket *.cdb scratch-file rule. Co-Authored-By: Claude Opus 4.7 (1M context) --- .gitignore | 2 ++ tools/cdb/a6-probe.cdb | 53 ++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 55 insertions(+) create mode 100644 tools/cdb/a6-probe.cdb diff --git a/.gitignore b/.gitignore index 755511f..b6004f5 100644 --- a/.gitignore +++ b/.gitignore @@ -51,6 +51,8 @@ tmp/ # The committed reference workflow lives in CLAUDE.md "Retail debugger toolchain"; # session-specific traces should not pollute the repo. *.cdb +# tools/cdb/ holds committed reference scripts — exempt them from the blanket rule above. +!tools/cdb/*.cdb launch_*.log launch_*.err launch_*.ps1 diff --git a/tools/cdb/a6-probe.cdb b/tools/cdb/a6-probe.cdb new file mode 100644 index 0000000..1f84682 --- /dev/null +++ b/tools/cdb/a6-probe.cdb @@ -0,0 +1,53 @@ +$$ +$$ Phase A6.P1 cdb probe spike — 2026-05-21 +$$ +$$ 7 breakpoints on retail's BSP collision response sites. Each BP fires +$$ a non-blocking action (printf + gc), incrementing a per-BP counter. +$$ Auto-detaches via 'qd' after 50,000 total hits to avoid retail lag. +$$ +$$ Symbol lookup convention per CLAUDE.md "Retail debugger toolchain": +$$ - snake_case for BSPTREE, CTransition, OBJECTINFO, COLLISIONINFO, SPHEREPATH +$$ - PascalCase for CPhysicsObj +$$ - Always 'x' first to confirm the actual name +$$ + +.logopen /t a6-probe-${ARG_LOG_TAG}.log +.sympath C:\Users\erikn\source\repos\acdream\refs +.symopt+ 0x40 +.reload /f acclient.exe + +$$ Counters: $t0 = total hits, $t1..$t7 = per-BP hits +r $t0 = 0 +r $t1 = 0 +r $t2 = 0 +r $t3 = 0 +r $t4 = 0 +r $t5 = 0 +r $t6 = 0 +r $t7 = 0 + +$$ BP1: CTransition::transitional_insert +bp acclient!CTransition::transitional_insert "r $t1 = @$t1 + 1; r $t0 = @$t0 + 1; .printf /D \"[BP1] transitional_insert hit#%d eax_2=%d insertType=%d\\n\", @$t1, poi(@ecx+0x18), poi(@ecx+0x1c); .if (@$t0 >= 50000) { qd } .else { gc }" + +$$ BP2: CTransition::step_up +bp acclient!CTransition::step_up "r $t2 = @$t2 + 1; r $t0 = @$t0 + 1; .printf /D \"[BP2] step_up hit#%d walkable_allowance=%f\\n\", @$t2, poi(@ecx+0x60); .if (@$t0 >= 50000) { qd } .else { gc }" + +$$ BP3: SPHEREPATH::set_collide +bp acclient!SPHEREPATH::set_collide "r $t3 = @$t3 + 1; r $t0 = @$t0 + 1; .printf /D \"[BP3] set_collide hit#%d normalZ=%f\\n\", @$t3, dwo(@edx+0x8); .if (@$t0 >= 50000) { qd } .else { gc }" + +$$ BP4: BSPTREE::find_collisions +bp acclient!BSPTREE::find_collisions "r $t4 = @$t4 + 1; r $t0 = @$t0 + 1; .printf /D \"[BP4] find_collisions hit#%d collide=%d insertType=%d\\n\", @$t4, poi(@ecx+0x40), poi(@ecx+0x1c); .if (@$t0 >= 50000) { qd } .else { gc }" + +$$ BP5: CPolygon::adjust_sphere_to_plane (the over-correction suspect) +bp acclient!CPolygon::adjust_sphere_to_plane "r $t5 = @$t5 + 1; r $t0 = @$t0 + 1; .printf /D \"[BP5] adjust_sphere hit#%d Nx=%f Ny=%f Nz=%f d=%f cx=%f cy=%f cz=%f r=%f winterp=%f\\n\", @$t5, dwo(@ecx+0x0), dwo(@ecx+0x4), dwo(@ecx+0x8), dwo(@ecx+0xc), dwo(@edx+0x0), dwo(@edx+0x4), dwo(@edx+0x8), dwo(@edx+0xc), dwo(@edi+0x40); .if (@$t0 >= 50000) { qd } .else { gc }" + +$$ BP6: CTransition::validate_walkable +bp acclient!CTransition::validate_walkable "r $t6 = @$t6 + 1; r $t0 = @$t0 + 1; .printf /D \"[BP6] validate_walkable hit#%d arg2=%f\\n\", @$t6, dwo(@esp+0x4); .if (@$t0 >= 50000) { qd } .else { gc }" + +$$ BP7: COLLISIONINFO::set_contact_plane +bp acclient!COLLISIONINFO::set_contact_plane "r $t7 = @$t7 + 1; r $t0 = @$t0 + 1; .printf /D \"[BP7] set_contact_plane hit#%d isWater=%d\\n\", @$t7, dwo(@esp+0x8); .if (@$t0 >= 50000) { qd } .else { gc }" + +.printf "a6-probe armed: BPs 1-7 set, threshold=50000 total hits, qd on threshold\n" + +$$ Continue execution +g