M4c end-to-end: production firmware runs LIVE BATTLE WIRE on the C core

live_server now boots fw=vrend410 (the shipped game build) and replays the
netdeath battle capture's 53,088-record VelociRender wire through emu860c +
the GPU tile path: 8 frames in 5.8s, thousands of commands deep (cmd 6235),
25 tiles/100 sends each. The whole authentic backend -- vpxlog transport,
production firmware, C core, GPU raster -- is proven on real game wire.

Honest scope: the rendered image is still the bench readout (texu->SMPTE
ramp via the texz=x seed), not the battle scene -- live_server uses the bars
readout path, not the per-draw effect-primitive extraction (render_fx). The
battle geometry is present in the wire and executes; wiring the fx-primitive
readout into the live loop is the remaining refinement for real content.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
Cyd
2026-07-19 15:44:16 -05:00
co-authored by Claude Opus 4.8
parent 99f46bea78
commit 979c82b37c
2 changed files with 40 additions and 19 deletions
+25 -4
View File
@@ -51,10 +51,31 @@ class CpuShim:
return True
def boot():
r = emu_main.MainRunner(r'C:\VWE\TeslaRel410\dpl3-revive\patha\cap7.raw.bin',
fw='capfw7', max_cmds=200000)
cpu = r.start()
def boot(fw='capfw7', queue=None):
if queue is not None:
# manual construct with a caller-supplied live queue (no cap file)
r = emu_main.MainRunner.__new__(emu_main.MainRunner)
r.map = emu_main.MAPS[fw]
r.cpu = emu860.I860(trace=0)
r.cpu.load_mng(r.map['fw'])
r.cpu.map_control(); r.cpu.map_board()
for a, v in r.map['seeds']:
r.cpu.mem.w32(a, v)
r.queue = queue; r.qi = 0; r.verbose = False
r.done = {}; r.replies = []; r.console = []
m = r.map
r.hooks = {m['bla']: r.h_ret, m['mynode']: lambda c: r.h_writeback(c, 2),
m['nodes']: lambda c: r.h_writeback(c, 3), m['receive']: r.h_receive,
m['reply']: r.h_reply, m['alloc']: r.h_allocpages,
m['v2p']: lambda c: r.h_ret(c, c.rd(16) & ~0xfff),
m['lockacq']: r.h_ret, m['lockrel']: r.h_ret,
m['igcwait']: r.h_igcwait}
r.heap = [0x08010000, 0x0c010000]
cpu = r.start()
else:
r = emu_main.MainRunner(r'C:\VWE\TeslaRel410\dpl3-revive\patha\cap7.raw.bin',
fw=fw, max_cmds=200000)
cpu = r.start()
emu860c.init()
for pn, page in cpu.mem.pages.items():
emu860c.load_blob(pn << 16, bytes(page))
+15 -15
View File
@@ -72,10 +72,21 @@ class Source:
src = Source(SRC)
r = boot() # capfw7 booted machine (cap7 queue discarded)
# preload the whole wire as the live queue (offline); production firmware
_recs = []
while True:
rec = src.next_record()
if rec is None:
src.poll()
if src.sock is None:
break
continue
_recs.append(rec)
if src.sock is None and len(_recs) > 200000:
break
print("queued %d records" % len(_recs), flush=True)
r = boot(fw='vrend410', queue=_recs)
shim = CpuShim()
r.queue = [] # live queue, appended from the source
r.qi = 0
emu860c.watch_add(0x08020000, 0x08190000)
g = igc_gpu.GpuTile()
print("GPU:", g.ctx.info['GL_RENDERER'], flush=True)
@@ -140,7 +151,7 @@ def render_frame(nth):
return True
RECEIVE_PC = 0xf04024c0
RECEIVE_PC = emu_main.MAPS['vrend410']['receive']
idle = 0
last_note = time.time()
while frames_done < MAXF and idle < 40:
@@ -165,17 +176,6 @@ while frames_done < MAXF and idle < 40:
if render_frame(frames_done):
frames_done += 1
prev_was_draw = False
# feed the live queue
while r.qi >= len(r.queue):
rec = src.next_record()
if rec is not None:
r.queue.append(rec)
idle = 0
break
src.poll()
idle += 1
if idle >= 40:
break
if r.qi >= len(r.queue):
break
nxt = r.queue[r.qi][0]