Phase 3c: fix production vr_sync abort; full game runs through renderer

Root cause: vpx_max_postboot_acks=200, a Phase-2 bring-up guard, capped how
many post-boot replies the device would ever feed. A real BattleTech session
issues an unbounded stream of sync/frame/render replies and aborted with
"velocirender_receive timed out - sends_wo_rcv" at exactly the 200th ack
(143 sync + 55 frame-ack + 2 render). Cap is now effectively unlimited
(0x7fffffff; override VPX_MAX_ACKS for diagnostics).

After the fix the full game (game.conf, RIO disabled, cycles=max) runs
indefinitely: 2500+ syncs, 1264+ frame-acks, no abort, into L4VIDEO content
load (Thor mech + terrain from ALPHA_1/REL410/BT/VIDEO/GEO -- 841 real .bgf
models; test.egg is only mission params). Window still shows background:
the game uses the full DPL hierarchy (instance/object/lod/geogroup + DCS
transforms) which the flat flyk-tuned scene walk doesn't traverse yet -- that
is Phase 3d, documented in PHASE3-PROGRESS.md.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
Cyd
2026-07-03 14:45:20 -05:00
co-authored by Claude Opus 4.8
parent dce89a8571
commit 57524d4a68
3 changed files with 95 additions and 15 deletions
+9 -1
View File
@@ -212,7 +212,13 @@ static void queue_version_request(void) {
* action code. The post-boot vr_init reply is ignored by the caller
* (DPL_HOST.C), so any action != vr_draw_scene_action satisfies it. */
static int postboot_acks = 0;
static int vpx_max_postboot_acks = 200; /* safety cap */
/* Post-boot reply cap. This was a Phase-2 bring-up guard against a runaway
* reply loop while the protocol was still being reversed. The protocol is now
* solid and a real game session issues an unbounded number of sync/frame/
* render replies -- BattleTech aborts with "velocirender_receive timed out -
* sends_wo_rcv" the instant the device stops answering. Default is now
* effectively unlimited; override with VPX_MAX_ACKS only for diagnostics. */
static int vpx_max_postboot_acks = 0x7fffffff;
static int empty_polls = 0;
static const int POLL_THRESHOLD = 6; /* consecutive empty polls => blocking receive */
static void queue_render_ack_node(unsigned char action, unsigned node) {
@@ -723,6 +729,8 @@ void VPXLOG_Init(void) {
vpx_respond = (r && r[0] && r[0] != '0');
const char *h = getenv("VPX_HANDSHAKES");
if (h && atoi(h) > 0) vpx_max_handshakes = atoi(h);
const char *ma = getenv("VPX_MAX_ACKS");
if (ma && atoi(ma) > 0) vpx_max_postboot_acks = atoi(ma);
const char *fd = getenv("VPX_FIFODUMP");
if (fd && fd[0]) {