Files
courier-emu/artifacts/tick-probe-01
Cryan209andClaude Opus 5 ef03253f67 Settle the tick, the audio path and the DSP's low memory on the board
Three assumptions the harness was carrying, each now answered from more than
one independent source.

The tick is 5.000 ms. The board says a firmware second is a true second:
tick_probe timed four S18 settings three times each through &T1 local analogue
loopback and fitted 1.000031 seconds per S18 unit, worst residual 3.0 ms over
twelve points. Both builds convert S-register seconds to ticks by multiplying
by 200. And both program 80186 Timer 0 - which counts at CLKOUT/4 - for exactly
5 ms on their own crystal: 0x6270 = 25,200 at 20.16 MHz on the board, written
at 0x008ce and checked by the firmware itself at 0x4a83b, and 0x7e00 = 32,256
at 25.8048 MHz in main211. That last one also identifies main211 as the
25.8048 MHz build, which the pairing-trap note had left open.

So daa.py's INSTRUCTIONS_PER_MS = 1,111 is refuted, and its derivation was
circular as well as wrong: machine.py synthesizes the tick at tick_ms x
INSTRUCTIONS_PER_MS, so "2,000,000 instructions reaches 180 ticks" is
arithmetic on the two constants. At 5 ms, 180 ticks is 900 ms - an ordinary
minimum ring-burst qualification. The codec's 4,348 is the only figure left
standing, and at 20.16 MHz it is 4.64 cycles per instruction where 1,111 would
be 18.1. The constants are not changed here; the reason to doubt them is.

Audio reaches the DSP on the C5x serial port. &T8 runs analogue loopback with
self-test and, unlike &T1, leaves the DTE in command mode, so ATGLK2 answers
while audio flows - it returned 000 errors, so the path ran. Sweeping ports
00..7f idle against active, only 18, 1a, 1c and 1e move, and all four are
mailbox handshake registers: no CPU port carries samples. On the firmware side
the only peripheral registers the DSP image touches are DRR and DXR; the TDM
registers 30..35 are never referenced. SPC is loaded with 40c8, so MCM = 0 and
the codec is the clock master - what pacing the modeled line on the codec
assumed, now read out of the firmware. The frame handlers are a four-phase
chain, 01a8 -> 01de -> 01f4 -> 020d -> 01a3, one DRR read and one DXR write
each, which is the framing measured before as ten writes per codec sample.

The C52's mask ROM is not what the modem executes. The DSP payload has a
segment at origin 0000 covering words 0000..75d9, spanning the whole 4K
mask-ROM window, and the origin is confirmed by the code rather than by a
harness constant - bcnd 80c3 at 01cc targets 00c3, and the handler chain stores
81de/81f4/820d/81a3 for code at 01de/01f4/020d/01a3. Program 0000 is not a
vector table either: it is straight-line reset code running through the INT3
and TXNT slots behind setc intm, and it programs PDWSR and IOWSR, which only
matter for external memory. So the part runs in microprocessor mode with its
reset vector included, the mask ROM is never mapped, and the download is the
80186 writing external DSP program RAM under reset - the alternative
dsp-rom-probe.md raised and could not choose between.

That is an argument from the image's internal consistency, not a readout, and
it says nothing about what is physically on the die. What it does retire is the
worry behind the probe work: none of the running DSP code is missing.

Nothing here wrote NVRAM or took the loop off hook. S18 was read first and
restored, and the board was left responsive with S18 at its original 0.

The two test errors are the pre-existing ram_dump/nvram import breakage from
229ef5b, not these changes.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-05 18:24:29 +12:00
..