diff --git a/emulator/NET-NOTES.md b/emulator/NET-NOTES.md index 758adc1..8923006 100644 --- a/emulator/NET-NOTES.md +++ b/emulator/NET-NOTES.md @@ -619,14 +619,28 @@ full lamp sweep off, floor last, game exits. **Egress window = the gap between mission end and the console's StopMission send** -- it is NOT a game-side timer and does not appear to depend on the exit code. MEASURED BOTH CONSOLES: TeslaConsole = 3.4s AND Console 4.10 = 3.4s -(with its printer spooling to a file). The remembered longer venue -window is best explained by PERIOD PRINT TIME: Console 4.10 spools the -score sheet at mission end, and a 9600-baud serial print of a multi-KB -sheet = tens of seconds before the close follows -- the floor lights -stayed on for exactly the score-print duration. (No egress-delay key -exists in Console.ini / venue INIs -- checked.) The hold is genuinely -console-gated: when the console doesn't close, the pod holds -indefinitely (observed minutes). Lamp +(lamp-ON to full-sweep-off). No egress-delay key exists in +Console.ini / venue INIs (checked). + +**EGRESS DELAY FOUND IN THE BINARY (2026-07-10 disasm):** it is a +HARDCODED ~30s constant in BTL4OPT.EXE's `StopMissionMessageHandler` +@ 0x47b864 -- NOT an INI/env value. The handler: (1) calls +mission-shutdown/EndMission (0x44eeb4); (2) calls the lamp routine +(0x47bba8, named by the "LightsOut" string @0x4fd5ac) with flag=1 -> +egress lamps 0x16/0x17/0x1e ON; (3) schedules a delayed state block +(0xc,0xc,1) for `now + 30.0*timebase + 0.5` (30.0f @0x47b8e4, 0.5f +@0x47b8e8, timebase global @0x52140c read across the whole sim) -- at +which the lamps go off and the game exits into GO.BAT. Matches the +operator's memory exactly: StopMission -> floor lights on -> ~30s hold +-> lights off -> exit -> BAT restart. The LightsOut lamp-off helper +(0x47bb34, flag=0 branch) sweeps 0x16/0x17/0x1e off. RECONCILE: this +30s vs the measured 3.4s -- the 154.9s full-lamp SWEEP we tapped was +likely the teardown GeneralReset (a different event), with the true 30s +timer firing past our tap window; timebase multiplier is runtime-set so +wall-time can't be proven statically. TEST TO SETTLE: one mission with +a 90s+ RIO tap window past mission end. Disasm tool: scratchpad +btdis2.py (pefile+capstone, py -3.13). This is the authentic egress +window; the earlier "print time" theory is superseded. Lamp state byte: flash bits0-1 (solid/slow/med/fast), ch1 bits2-3 (off/dim/bright), ch2 bits4-5. Extraction tool: scratchpad lamp_read.py pattern (tap lines are one byte each).