Files
courier-emu/tests
Cryan209andClaude Opus 5 498f0fc7c1 Gate ROM-loader strobes on the C51 actually being in its download loop
AT&N1&T1 on 302 crashed with "C51 ROM loader did not acknowledge strobe 1":
_commit_rom_group wrote @56 and stepped 4096 instructions waiting for the
acknowledgement, and nothing answered.

Port 0x18 is not the loader's alone. A supervisor routine at 0x95a54-0x95a6c
walks a single bit along it and mirrors it to 0x1a - ..0x20, 0, 1, 0, 2, 0,
4, 8, 0x10, 0x20.. - so three of its six values collide with the transfer
strobes. Every collision was being taken for a reload request.

The recovered mask ROM says exactly when the C51 is listening. Its download
loop is 0638-0652: bit 2/@56 for the finish strobe, bit 0/@56 then rpt #3 /
bldp *+ / lacl #01 / samm @56 for group 1, bit 1/@56 and the same for group
2, then bd 0638. Outside that span - resident code at 810a, a mask-ROM
vector at 0008 after a restart, the 0653 exit that branches into the
downloaded program - nothing polls @56 and no acknowledgement can come.

So arm a strobe only when the DSP pc is inside that loop, or when the loader
has not been started at all, which is the case the first commit synchronizes.
Real downloads acknowledge from 0642 and 064c, both inside it.

The crashing run now completes and reports CONNECT. Checked inert elsewhere:
a linked 302 pair with the DSP on both sides produces a byte-identical report
with the gate forced open, and the standalone AT&T1 run makes the same 13874
commit decisions as before.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-16 18:31:28 +12:00
..