From 99f46bea78ed1e4e5e41ec85eca1a26e5ac6397b Mon Sep 17 00:00:00 2001 From: Cyd Date: Sun, 19 Jul 2026 15:42:49 -0500 Subject: [PATCH] emu_main: vrend410 map -- the production firmware (game BT/RP VREND.MNG) Hook addrs re-derived by masked-immediate signature match vs capfw7 (12/13 exact; reply via unique opcode-only signature). vrend410.mng = the shipped 385KB build with its 7-word Division header rewritten to the loader's 3-word form. Result: the production build boots and dispatches init + create from the live netdeath battle wire -- where capfw7 died instantly on the newer action 0x2d. Stalls at cmd 2 in a bla+fst.d memclear (~1.1M iters / ~9MB) that pure Python can't chew but the C core (emu860c, 90M steps/s) will -- next: live_server on the C core with fw=vrend410. Co-Authored-By: Claude Opus 4.8 --- emulator/firmware-decomp/emu_main.py | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/emulator/firmware-decomp/emu_main.py b/emulator/firmware-decomp/emu_main.py index 531e590b..9ae0236e 100644 --- a/emulator/firmware-decomp/emu_main.py +++ b/emulator/firmware-decomp/emu_main.py @@ -65,6 +65,27 @@ MAPS = { (0x1000, 0), # _processorId ], ), + # The PRODUCTION build shipped in the game files -- ALPHA_1/REL410/{BT,RP}/ + # VREND.MNG (identical). Speaks the newer protocol (action 0x2d etc.) the + # battle captures use. Hook addrs re-derived 2026-07-19 by masked-immediate + # signature match vs capfw7 (12/13) + opcode-only for reply (unique). Build + # via: strip the 7-word Division header -> 3-word loader header (the + # vrend410.mng converter in this dir's history / scratch). + 'vrend410': dict( + fw=os.path.join(_HERE, 'vrend410.mng'), + main=0xf0403f00, bla=0xf04293a0, + mynode=0xf0402560, nodes=0xf0402600, receive=0xf0402440, + vinit=0xf040ee80, doinit=0xf040bb60, + reply=0xf040ba40, sendprim=None, putchar=None, + alloc=0xf0435e68, v2p=0xf0435b40, + lockacq=0xf042cba0, lockrel=0xf042cbf8, + chain=None, chain_tbl=None, chain_tail=None, + intdiv=None, + igcwait=0xf042a070, + seeds=[ + (0x1000, 0), # _processorId + ], + ), } ANAME = {int(a): a.name for a in A}