op_sath shifted ACC left by TREG1(3:0) and saturated. SPRU056D 6-229: it
shifts right 16 when TREG1 bit 4 is set and otherwise leaves ACC alone,
SXM picking the fill; SATL is the 0-15 half of the same 0-31 bit shift.
Overlay 6's V.34 phase-3 transmit sequencer (0xb0c5) takes its next state
as nibble[state] of 0x00102540 through samm @0d / sath / satl. From state
3 it must reach 2; the left shift saturated to 0x7fffffff and gave 15, so
the answerer's TRN never ended and its control code at 0x9d5d, waiting for
state 5, waited for the rest of the call. With the fix the answerer leaves
TRN after about 1.7 s; the caller still misses J, so training now retrains
instead of hanging.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Both were lossless, and each one alone stops a dialled 403 call in V.8.
The hybrid returned the modem's own transmit at unity whenever it was off
hook. The answerer heard its own 2100 Hz answer tone at full level, its
1800 Hz band (@2f bit 6, tested at 0x9f84 ahead of the CM band) tripped,
and 0x9fa3 dropped V.8 for the non-V.8 task at 0xb07c before any CM
arrived. Off hook now returns 26/256 (-20 dB); on hook keeps unity for
AT&T1 loopback.
The socket line delivered the far end at full scale. The caller's CM is
correct on the wire (c1 65 13 10 27 0a 0d), but at about -4 dBFS the
answerer's V.21 receiver assembles garbage (fec8/fec9 = 2d ae where e0 c1
belongs), and its energy path (bit 10 x5 -> 0xa36b) wins the race into
overlay 7, whose level gate at 0xa47e then times out, in a loop. The line
now keeps 0.1 (-20 dB) of the far end.
With both, the answerer decodes CM and sends JM on 1650/1850 Hz, the
caller decodes JM, and each end sends its own 0x47,6 and loads overlay 6
then overlay 8. Either loss alone still fails. Neither value is measured.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Two stand-ins in the bridge broke the dialled 403 call between them. The
bridge queued 0x47,6 the moment the far end went off hook, so the
supervisor downloaded overlay 6 over 0x9d00 while the call-progress task
(@1b = 0x9bf4, started by tag 0x15) was still running out of that range.
The loader returns every codec frame, so the task ran half-written code,
the FFT at 0x8bf0 took a garbage AR3 and the block ack timed out. And it
held host tag 0x17 until overlay 8, but 0x17 (0x9ba1) is what arms answer
tone qualification: without it the caller never started V.8.
With both gone the resident does it itself: 0x17 arms @6d = 0x9cf3, 65
passes of tone status bit 2 reach 0x9d2a, and the caller sends CM. The
only 0x47,6 in the resident is 0x8e3e, dispatched from the JM decoder at
0xd514, after the code overlay 6 replaces is finished with.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The metavar said NAME=ADDR, but both sides of the run are parsed by
worker._pc_watch, which reads ADDRESS[=NAME]. Following the help produced
`invalid --trace-pc address: 'txptr'` from the worker - an error naming a
flag the user had not passed, for a flag whose own help was wrong.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
The link parser declares the flag and its help promises hot_addresses on
both sides, but _link_side never put it on either subprocess command line,
so the profile came back as an empty list with no error. Anyone reading
that would conclude the run executed nothing worth counting.
Found while asking what the 403 pair does for the ten seconds before it
puts anything on the line. With the flag forwarded the answer is one loop:
0xca3ca, the supervisor's tick-wait, 1.05M iterations spinning on the
counter at data 0x12a.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
delay_slot() overwrites m_op, and GET_ADDRESS() reads its addressing mode
out of m_op, so taking the modify afterwards applied the last delay-slot
instruction's field instead of the branch's own. op_bd and op_calld already
order it correctly; op_banzd was the outlier.
MICA's datapump is what found it. Its cooperative yield ends in
`banzd 4f6e, *` (no modify) with `lar ar7, *+` (post-increment) in the delay
slot, so AR2 came out one word high and the task restore read its resume PC
out of the forward link rather than the task's stack. Every yield returned to
program 0x0000 and restarted the DSP.
Also implement sfrb, which the datapump reaches once it stays up: the mirror
of sflb, with ACC's LSB into ACCB's MSB, the bit leaving the bottom of ACCB
into the carry, and ACC shifting as SFR does under SXM.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
The on-chip timer was ticked once per instruction, so it ran slow by the
average cycles-per-instruction, roughly 2.5x. Firmware that measures a
hardware period against TIM read the wrong answer.
The MICA portware's frame-rate check is what exposed it. At program 0x80cd
it reloads TIM from PRD, waits one serial frame, averages 256 readings and
requires 0x137e +/- 0x2ca cycles per frame. With the frame period set to
5000 cycles TIM reported 2000, so the check rejected every clock rate and
the datapump never left that loop.
The core already tracks real cycles in m_cycles for the TDM frame clock, so
drive the timer from the same counter. TINT now fires at its true rate,
which is faster than before for any firmware that uses the timer - the
Courier residents leave it counting via splk @26, #0020.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Chasing what asserts INT1 answered a different question first. The bare `rete`
at 0x81ba that @60 holds sits one word ahead of 0x81bb, and 0x81bb is not
INT1's handler at all - it is INT2's. Three routines swap @61 between the two
meanings:
823d: splk @61, #819d ; wake-only
8245: splk @61, #81bb ; every edge is a polyphase DAC slot
824d: splk @61, #819d
0x81bb reads the ASIC's phase word at @52, masks it to two bits, indexes the
table at 0x81e0 and writes port 0x6a. Same idiom in every build: 302 swaps
between 81ae and 81cc at 0x824e, 2.1.1 between 8224 and 8228 at 0x8293. So the
previous commit's "INT2's handler is a bare rete on purpose" holds for the
cold start and the wake-only mode, and not for the part in general. The
doorbell helper now carries that as an open question rather than a settled
one: an extra edge is free in one mode and is a DAC slot in the other.
INT1 itself is dead at both ends in this firmware.
The DSP never enables it. IMR bit 0 is set by nothing - the only writes
certain to reach IMR are the `samm @04` at 0x809e (0x002a) in the 403 and 302,
and in the 2.x builds an `and #ffcf ; or #0010` that touches bits 4 and 5.
@60 is never written after the init table copy at 0x812d; every apparent
`splk @60` in the images is DP-relative and lands on ordinary data.
The CPU never asserts it. board-verified-403.md already had the wiring - DSP
pin 38 from CPU pin 50 - and CPU pin 50 is P1.7/GCS7, on the same P1LTCH at
0xff56 whose bit 1 is DSP RS and bit 3 is DSP NMI. Across the whole 403
supervisor that latch is only touched by AND/OR on bits 2, 5 and 6, by
`AND AX,00ff ; OR AX,0020` for the EEPROM, by `AND AX,fffd` at 0x8e3f1 for
reset and by `OR AX,0008` at 0x8e445 for NMI. Bit 7 is never driven low, and
the latch initialises to 0xdb with it high.
Which resolves the open note in board-verified-403.md: @60's `f7fe`, read off
the board at the end of a dial, is not a handler address. With the line masked
at both ends the cell is free, and an overlay reuses it as B2 scratch - the
same reuse that puts the codec handoff's counter and word in @6b and @6c,
which are the INTR 12 and INTR 13 cells.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
The third bit in IMR = 0x002a was unaccounted for, and it is the one that
matters for the transfer paths.
The mask ROM's whole vector table is `lamm @6x ; bacc`, and the resident fills
those cells from the table at 0x812d. Of the three enabled bits, XINT gets the
frame ISR at 0x8178 and TINT gets 0x81fb - and INT2 is enabled with @61
pointing at 0x819d, which is a bare `rete`. INT1 has the same shape at 0x81ba
and is masked: an armed second doorbell.
A handler that only returns is the point. The CPU-to-DSP path is polled, not
vectored: 0x80ea reads PA7 through the 0x80e8 gadget, tests bit 9, and sleeps
in the IDLE at 0x80fa when there is nothing; 0x80fc walks the ASIC's four-word
window from port 0x58, BLDPs each group into *program* memory at BMAR, acks
with 0x0300 into PA7 and raises INTR 17. That is the firmware download, and
the command path has the same shape. The pin's only job is to end that IDLE.
And the board has the pin: ASIC 109 to DSP 39, which is INT2, measured in
asic-pinout.md, which already named it "the mailbox's CPU-to-DSP direction".
Nothing in the emulator ever raised it. The ready flag in PA7 was set and the
DSP was left to notice on whatever next woke it - the codec frame or the timer
- so a transfer advanced at the frame rate rather than when the host had a
group ready.
Both sites that raise a PA7 ready bit now go through one helper that sets the
flag and asserts the pin, because on the board they are one event. Checked
against the 403 resident: parked in the host poll's IDLE, an INT2 edge ends
it, vectors to 0x0004, dispatches through @61 to 0x819d, and RETEs back into
the loop.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Every Courier-family C5x resident programs the primary port identically - 403
and 302 at 0x8090, 2.1.1 at 0x80bd, 2.3.31 at 0x109d - and the sequence says
what the model has to do. SPC goes 0x0008 then 0x40c8, so MCM = 0 and TXM = 0
and the frame edge is external; DXR is primed and the part spins on XRDY
waiting for that edge; IFR is write-1-cleared; and then IMR is written with
0x002a: INT2, TINT and XINT. RINT, bit 4, is not enabled, and `samm @04` - the
only write certain to reach IMR, since `splk @04` is DP-relative - appears
exactly once in each of the 403 and 302 residents.
A cold start confirms it. Parked at 0x813c the 403 has IMR = 002a, SPC = 40c8,
and the mask ROM's dispatch cells hold @65 = 8178 for XINT against @64 = 819d
for RINT, the same unused stub @6a holds for NMI. Only XINT has a handler.
So `serial_receive_interrupt` was raising the right IFR bit for the wrong
reason and gating it on SPC.RRST, the receiver's reset bit, which the 403
never consults. The 2.x residents then show why naming one bit is wrong at
all: they test data 0x012f and, if set, `lamm @04 ; and #ffcf ; or #0010 ;
samm @04` - same frame, service moved to RINT. One edge now latches both, each
behind its own half of the port's reset, and IMR and INTM decide recognition
where the part leaves them.
Three more things the residents reach that the core did not do:
- Recognition ran only from `interrupt()` and the INTM controls, so a flag
that became eligible without a fresh source edge waited for the next one.
The 2.x rewrite of IMR above happens with INTM already clear, and RETE
clears INTM on its way out of a handler. It is checked at every instruction
boundary now, and taking a vector is its own step.
- A repeated instruction was interruptible. RPTC and the repeat pointers are
not in the context shadow, so a vector out of the middle of a block lost the
rest of it; check_nmi has always refused for that reason.
- NMI vectored to a literal 0x0024. Its slot is offset 0x24 inside the same
IPTR-relocated table as every other vector; 0x0024 is only right because the
mask ROM runs with IPTR zero.
And the timer ignored TCR.TSS, so a stopped timer still raised TINT - which
matters here because TINT is the other thing 0x002a enables, and it is what
wakes the IDLE at 0x813b when no frame has arrived yet.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Same gap as --dsp-trace-range: the watch existed on `run` and could not reach
the originating end, which only exists inside a pair.
With it, "032f is never written" turns out to be false. It is written nine
times on the originating end, and correctly: the mask ROM's clear loop at
0625, the resident cold start at 801d, then the overlay's own state entries
installing real handlers - 88eb at 9e1f, b574 at a0d8, b59d at a164. The
vector machinery works.
What kills it is a later write of 0000 from ab8a, which is this clear loop in
the resident:
ab86 lar ar1, #012a
ab88 rptz #0013
ab8a sach *+ ; 20 words from 012a
That loop has no business at 032f. On the answering end it behaves - ab8a
writes 012a once, as one pass over a 20-word span should. On the originating
end ab8a never touches 012a at all and writes 032f instead, so the address
register `*+` indexes was not the 012a that the instruction two words earlier
loaded into AR1. The vector is zeroed as collateral, and the next
`lacl @2f ; cala` calls program 0000.
Also worth recording for whoever picks this up: RPT and RPTZ set m_rptc, but
only the fifteen block-transfer opcodes consume it. Nothing in step() repeats
an ordinary instruction, so `rptz #0013 / sach *+` stores once rather than
twenty times and leaves the count standing. Whether that is what puts the
wrong address in front of ab8a is not established here.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Two reporting defects in the same quantity, and the diagnostics needed to
tell where DP actually comes from.
m_st0.dp is held pre-shifted - LDP stores DP<<7 and GET_ADDRESS ORs it
straight into the offset - but two readers treated it as a raw DP:
- The V.8 dispatch capture computed `(m_st0.dp & 0x1ff) << 7`, which keeps
only (DP & 3) << 7 and then shifts that again, landing on a page the
dispatcher never runs on. v8_handler, v8_countdown and v8_flags came back
0 from every dispatch for that reason - 133,790 of them on the answering
end alone - which reads exactly like a state machine spinning on an unset
vector. With the page right, the handler is af12 on the answering end and
ae7d on the originating one.
- state() exported m_st0.dp raw, so every consumer printing `dp` was
printing DP<<7. The answering end's "dp=896" was DP 7.
Added alongside: shadow_dp, the DP an interrupt return is about to reinstate;
last_dp_pc/value/source, where DP was last written and by which instruction;
and stray_cala_pc/target/dp, latching the first CALA whose target leaves the
loaded images, with the DP and target it ran with.
That last one exists because DP cannot be read after the fact here. The
originating end's crash is a CALA to program 0000, and the mask ROM it lands
in rewrites DP itself - `LST #0` at 0676 - so a DP sampled at the end of the
run describes the ROM, not the call. Latched where it happens, the call is:
9f3a cala -> 0000, with DP = 6
so the vector it read is @2f on page 6, data 032f, which holds 0000 on both
ends. The answering end never reaches this call and never makes a stray one.
Why 032f is never written is not answered here.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
The originating end of a leased pair only exists inside `link`: run's
dedicated-line-originate strap on its own comes up idle and never seizes, so
it does not stand in for it. `link` forwarded --peek, --dsp-peek and
--trace-pc to each worker but not --dsp-trace-range, which left the one end
that was failing untraceable.
With it, the originating end's silence has a shape. It is not a negotiation
timeout - it is a crash, and the trace is 512 consecutive addresses of opcode
0000 walking forward through blank SARAM from 416e to 436d. Opcode 0000 is
`lar ar0, @00`, which does nothing but advance the PC.
Tracing 8000:ffff instead catches the last instruction in loaded memory:
9f33 lacc @4b
9f34 sub #01
9f35 sacl @4b ; a per-pass countdown
9f36 xc 2, lt
9f37 splk @4b, #0031 ; skipped - the counter had not run out
9f39 lacl @2f
9f3a cala ; call through @2f, every pass
DP is 0 there, so @2f is data 002f, and that cell holds 0000 - as does every
other page's @2f but two, neither of them a plausible target. So the call goes
to program 0000, which in microcomputer mode is the C51's mask ROM: the vector
table dispatches through @60-@6a, lands in unloaded SARAM, and the part runs
off through zeros with INTM set and its serial port left in reset. That is why
it stops answering the frame interrupt - 43,222 recognised against the
answering end's 428,475 - while its codec keeps being clocked.
Why @2f is zero, and whether DP should be 0 at that point, is not established
here.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Both ends of a leased pair transmitted pure silence, and had since well before
this branch - 0925e22 and f59a824 both record it. The cause is one initialiser.
Fifteen opcodes in the repeatable block-transfer family - TBLR, TBLW, the BLDD
and BLPD forms, MACD and the rest - share this idiom:
while (m_rptc > -1) { ...; m_rptc--; }
which executes RPTC+1 times. But `reset()` and the member default both set
RPTC to -1, and the loop leaves it at -1 when it finishes. So after a reset,
and after every repeat, RPTC was -1 and every one of those instructions was a
silent no-op: no transfer, no write, no fault. Only once some RPT had run and
step()'s block-repeat tail happened to leave RPTC at 0 did they start working.
On the part RPTC reads 0 whenever no RPT is in force, an unrepeated
instruction runs once, and a repeated one runs RPTC+1 times - both ending at
0. So the loops become do/while and reset to 0.
What this cost: the C51 resident's command dispatcher at 83b5 reads a command
byte from ff5e, bounds-checks it, and does `tblr @7c ; lacc @7c ; bacc` over a
table based at 8401. The resident had downloaded perfectly - 286 words sampled
across it, none differing, and 8402 holding its true entry 8003 - but the TBLR
transferred nothing, so @7c kept its initial 0 and the BACC branched to
program 0000. That is the C51's mask ROM: the part fell through the vector
table into the ROM's serial bootstrap spin at 06dc and waited there for a
word no one was ever going to send. No datapump overlay was ever requested,
because the DSP that would request one was gone.
It was path-dependent, which is why one harness path looked healthy: a run
that happened to execute an RPT before reaching the dispatcher left RPTC at 0
and dispatched correctly.
Measured on `--dip-preset dedicated-line --at 'AT&T1'`, the invocation
docs/datapump-dispatch-gate.md gives, before and after:
overlay_downloads 0 -> 2 (id 8, verified)
line_tx_nonzero 0 -> 6732
dxr_writes 36 -> 16715
dsp pc 06dc -> a2b7
and a leased pair over the socket line now carries audio both ways - each
end's transmit matches the other's receive, rms 2201, peak 16160, with tones
at 1801 and 2199 Hz. Cut-through moves from frame 518 to 93, because the DSP
now reaches the state that answers instead of dying at frame 0.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
The C51 ROM loader never ran. Every attempt ended parked at program 0x06dc,
which is the mask ROM's *serial* bootstrap spin:
06d8 xpl @22, #00c0 ; toggle SPC XRST and RRST
06db clrc tc
06dc bcndd 06dc, ntc ; spin until TC
06de bit 10, @22 ; TC = SPC RRDY
waiting on a serial word nothing was going to send.
The NMI slot at program 0x0024 is `lamm @6a ; bacc`: it dispatches through a
data cell, and the mask ROM's own startup is what puts the parallel loader's
entry 0x0610 there, three instructions after RS releases. On the board the DSP
has been executing since the reset edge and the 80186 reaches its NMI write
microseconds later, so the cell is always current when the pin moves. Here the
DSP is stepped in batches driven by the CPU, so at that write it may not have
executed since the reset at all. The NMI then dispatched through a cell that
held zero at cold start, or - at the mid-call reload, because RS does not clear
DARAM on the part or here - still held the previous generation's resident
handler at 0x81ae. Either way it branched somewhere that was not the loader,
fell out of the vector table, and landed in that spin.
`_start_rom_loader` had a guard against exactly this, and it was looking in the
wrong address space: `io(0x6a)` is an I/O port, unseeded, and answers 0xffff
whatever the part is doing, so the wait expired every time and the diagnostic
reported that same 0xffff. Data 0x50-0x5f is aliased to the I/O array and
0x6a is not, which is what made the two look interchangeable.
So wait for the startup rather than for a value, and only when the part has
actually been reset since the last pulse: with no reset in between the cell
belongs to whatever is running, and a pulse during a call has to dispatch to
the resident's own handler, not to the ROM's.
Three images now complete a run that previously raised before the DSP did
anything: IDSDL302.ROM, 3453Bv2.1.1.xmf and the captured 403 board ROM.
This also settles the RRST gate added in the previous commit, which could not
be exercised while this was broken. The mask ROM's `xpl @22, #00c0` at 0x06d8
is the receiver coming out of reset - an XOR read-modify-write, which is why
scanning for `samm`/`splk`/`smmr` to MMR 0x22 found nothing. On the 302 the
port ends at SPC 0xf8 with 3614 receive interrupts and 0 suppressed; on the
403 board ROM, 29349 raised and 39 suppressed, those being the reload windows
where the receiver really is held in reset.
A leased pair over the socket line now reaches `answered` on both ends at the
same frame, 518, which is the case the old per-end rule could not reach: the
answering side required received ring bursts and a leased line has none. The
line is still silent - both ends connect and neither transmits - which is the
datapump, not the loader.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Three corrections to the sound path.
The switched call now has a single state that both subscribers share. Each
end used to decide for itself whether the path was through, from a counter
only it could have: the calling end watched the rings it was sending, the
answering end watched the ring bursts it was receiving, and a leased pair
matched neither rule on the answering side, so B never cut through at all.
The two ends could therefore disagree, which is a half-connected call - one
end transmitting into a cut loop. `call_state` now crosses the line in every
frame; each end advertises the furthest point it knows of and adopts the later
of its own view and the peer's. Every transition has exactly one end that can
make it - only the calling end can seize and ring, only the called end can
answer - so this converges instead of oscillating, and `_cut_through` is now a
derived property rather than a per-end flag.
RS is shared with the AC01, and a reset pin cannot change the board. The
reset already returned the codec's registers to power-up but took the MCLK
back to the 2.88 MHz default with them, so every generation after the first
ran at a clock the board never presents; it also left the frame period at the
rate the previous generation had programmed, while the divider registers it
was supposedly derived from had gone back to A = B = 18. Carry the configured
MCLK across and restart the frame period with the registers.
IRQ5 is the serial port's receive interrupt, not the frame scheduler's.
SPRU056D 5.3: RINT is raised when RSR transfers into DRR, and a receiver held
in reset shifts nothing and raises nothing. The frame clock itself is
genuinely external - the ASIC is the frame master and keeps running while the
DSP is inside an overlay - but all four sites that load DRR now end at one
port-level entry point that applies the RRST gate. Suppressions are counted
and exported as `serial_rint_suppressed`, because a receiver left in reset is
otherwise indistinguishable from a frame clock that stopped. The gate has not
been exercised against a completed call: the C51 ROM loader does not reach its
ASIC poll on either the 302 or the 403 image, which is a fault ahead of it and
predates this change.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
0xa4f63 is the only site that indexes the handler table at cs:0x1865, and the
code above it tests for '&' before reading the letter and subtracting 'A'. So
those twenty-six entries are the AT& commands, which the table reads as: &A
a66b9, &D a674b, &H a688e, &S a6ac9, &Z a6ce0, with &E &O &Q &V on a shared
stub and a lowercase sibling table at cs:0x21ff.
Entry 19 is &T, and entry 19 is the dispatcher at a6afe. Its al is &T's
argument, so the whole chain is AT&T1 -> a6afe -> jump table entry 1 -> a6b88
-> 87626 -> 876fb -> or [0x57c],1 -> the gate at 8b88d passes -> 8bc06 writes
6 to [0xd28] -> the overlay loader runs.
Measured with AT&T1 in place of the dial: dispatcher 1, thunk 1, table entry
1, the flag write 1, the overlay loader 2, overlay_downloads 2 and overlay_id
8 - the sync datapump, downloaded.
So nothing in this chain is broken. The port 1e handshake, the destination
mailbox, the loader timeout and the transfer all work when the path is taken,
in the firmware and in the harness alike. They are not taken by ATDT, which
confirms from the other side what this document already recorded: a plain dial
does not reach the loader, and only the leased and &T1/&L1 configurations do.
A dialed call must load its datapump another way, and that way is still to be
found.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Followed the chain up from the one instruction that enables a datapump load.
87626 is entry 1 of four-byte call/retf thunks at 87622; a6b88 is entry 1 of
six-byte lcall thunks at a6b82; both are reached from a6b69,
jmp word ptr cs:[bx+0x1d50], with bx = al*2 over a table at a6b70 in CS a4e2
whose entries are 1d62, 1d68, 1d4e, ... So command 1 vectors to a6b88 and
command 2 to the stc/ret that means "not handled".
The dispatcher at a6afe screens the code first: [0xd93] bit 0 refuses command 1
specifically, then a range check, then three busy tests on [0x57c] & 7,
[0x98a] & 0xe and [0x49e] & 1. Measured at the end of a dial, every one of
those is open - d93 is 00 on the originator and 02 on the answerer, bit 0 clear
on both, and the three busy cells are 00.
So command 1 would vector if it arrived. Counting execution of a6afe, a6b64,
a6b6e, a6b14, a6b88 and 87626 over a full call: zero on both ends for all six.
Nothing calls the dispatcher.
The chain from the command code to the download is therefore intact and
unreached from the top. a6afe is itself entry 0x1cde in a table of handler
offsets in CS a4e2 around a66ab, and nothing in the image branches to a6afe or
holds a far pointer to it, so it is reached through that table. What drives
that table is the next thing.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
The reset bit was attributed to bit 3. The latch is the 186's P1LTCH and its
bits are CPU pins: this repository's own pinout table gives pin 56 as P1.3 and
pin 58 as P1.1, the board puts DSP RS (pin 127) on pin 58 and DSP NMI (pin 42)
on pin 56. So bit 1 is reset and bit 3 is the non-maskable interrupt, which is
what board.md, asic-pinout.md and c51-cpu-loader.md have said all along.
Reading the downloader with the pins right, it does both, in order:
8e3ee and ax, 0xfffd ; bit 1 low - reset asserted
8e3f1 mov [0xff56], ax
... ; port setup
8e42e or ax, 2 ; bit 1 high - reset released
8e43a mov [bx], cx ; bit 3 low - NMI asserted
8e43d or ax, 8 ; bit 3 high - NMI released
8e44a ... ; poll 18/1a/1c/1e for all-ones
So the part is reset, released, and then kicked into the mask ROM's bootstrap
loader by an NMI. The harness reset on bit 3, which is the NMI pulse - after
the real reset had already been released - and never delivered an NMI at all.
An NMI vectors; it does not clear. Now bit 1 drives set_reset and a falling
edge on bit 3 calls Bridge.pulse_nmi, which restarts only the loader's own
bookkeeping and leaves the program, the data, the registers and the codec
queue where they are.
No behavioural change to the audio: A still transmits only its digits and B
still answers with 1.10 s and 2.98 s of 2,102 Hz. The reset count is unchanged
because the reset was always really happening, just recognised from the wrong
edge. What changes is that the two nets are now the two nets.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Disassembled the 403 board ROM from the reset net back to the decision, and
measured the branch rather than assuming it.
The reset belongs to the downloader: every edge comes from the routine entered
at 8e3da, which holds ff56 bit 1 high and pulses bit 3, so ROM_DSP_RESET_BIT =
0x0008 is correct for this image whatever other images do. 8e4ab is the
transfer body and 87567 is its only caller, loading the resident - ax 0x8000,
cx 0xdd4e, the resident's exact 56,654 bytes.
Overlays use a different loader at 8e60c, driven by an index in [0xd28]: it
indexes six-byte rows at 0xe741, strobes out 1e,4, sends the destination
through the 8f46 mailbox, then waits on port 1e bit 2 under a 200-tick timeout
at [0xd27] before aborting to 8e73a.
Measured with --trace-pc on both ends: 8bbf6 and 8bc0e run once each, 8bc13
takes the jump over every overlay request, and 8bc06, 8bc8d, 8bc99, 8e61c and
8e73a all run zero times. So the loader never runs and never times out, and
nothing is waiting on the port 1e ready bit because nothing strobes for it.
The gate is 8b88d, which returns ZF from three tests - [0x98a]&2, [0x49e]&1,
[0x57c]&1 - and all three are clear. Of the three, [0x98a] bit 1 and [0x49e]
bit 0 are never set anywhere in the image; the sole setter is 8770f,
or [0x57c],1, reached only from 87626, which is entry 1 of a table of
four-byte call/retf thunks based at 87622.
So the originating end's silence reduces to one dispatch index never firing.
The table base is not a literal anywhere, so it is computed, and finding that
computation is the next step.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
CourierRom.dsp_program_segments returned the single download call site's
payload and said so: "One segment, unlike an XMF's three." That is true of the
call site and not of the images. The loader picks a row of the overlay table by
index, and dsp_overlays already recovers that table from the same ROM - on the
403 capture it finds the resident at 8000 plus overlay 6 at 9d00, 7 at b000 and
8 at dc00, which is what dsp-overlays.md describes. It now reports all four,
resident first, the way an XmfImage does.
Callers that index by position are unaffected because the resident stays first:
the frame-interrupt vector, the boot ROM's blank preload and expected_bootstrap
all take [0].
_v8_dispatch_addresses appended the overlays a second time out of dsp_overlays,
which double-listed every one of them for an XMF too, since that class's
dsp_program_segments has always included them. Removed.
**This does not unblock the originating end, and it is not why it was silent.**
The DSP's program content never came from these segments: _configure_boot_rom
deliberately preloads zeros - "The boot loader must write the resident, not
execute a preloaded copy" - and the words arrive from the emulated supervisor
reading flash and shipping them over the transfer ports. So an overlay was
always downloadable if the supervisor asked for one; it does not ask. A's
audio is unchanged, 5,176 nonzero samples in seven bursts, its dialed digits.
What the change does fix is the image layer telling the truth about what a
board ROM holds, which _find_call_overlay and the V.8 dispatcher scan both
read. The blocker remains the supervisor never entering its downloader at
8e43c a second time on an originating call.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Recording the interrupt wiring and what it says about two of the harness's
choices.
The mask ROM vectors dispatch through B2 scratch cells - 0002 lamm @60, 0004
lamm @61, 0006 lamm @62, 000c lamm @65 - so handlers are installed by writing
@60-@69. They are scratch RAM, not MMRs, which is why dsp_mmr_writes never
showed them. Read at the end of a dial: @61, @62, @64 and three others all
hold 819d, which disassembles to rete - the do-nothing stub. @65 holds 8178,
@68 81fb, @69 81a6, and @60 holds f7fe.
Two consequences. The firmware does not service the AC01's FS interrupt on
INT3, and the harness firing the codec frame as irq 5 lands on the XINT slot
and the real handler at 8178 - that choice is confirmed, not a guess. And INT1,
the CPU's own line into the DSP on pin 50 to pin 38, carries a handler distinct
from the stub while the harness never asserts it: core.nmi() in
_start_rom_loader is the only DSP interrupt the host side raises.
f7fe is outside anything downloaded. CourierRom.dsp_program_segments returns a
single segment, 0x8000 for 28,327 words ending at 0xeea7, and its own docstring
says the rest of the datapump region reaching the DSP is not established. The
flash overlay table - 6 at 9d00, 7 at b000, 8 at dc00 - is parsed only by
XmfImage.dsp_segments.
So a board-ROM run can only ever hold the resident. B raises its answer tone
from it. When the supervisor enters 8e43c for a second load nothing can be
served, which is what overlay_downloads: 0 has been reporting throughout. The
originating end never gets a datapump because the image layer has none to give,
not because of a reset, a cursor or the line.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Logged the CPU pc at every edge of the DSP reset net. Every one, on both ends,
is 8e43c asserting and 8e448 releasing - the ROM's DSP downloader. The reset
is the front half of a download pulsed twice per load, not a wipe applied for
its own sake, which is what board-verified-403 already recorded from the board.
Entries to that routine over one dial: the originator makes one, at 9.0 s,
before its first digit - the program it dials with. The answerer makes two, at
22.05 s and 24.03 s, and its datapump transmits from there. The originator
never asks for a second load, so it never receives a datapump. Nothing is
stopping it starting; nothing requests it.
Its DSP is not idle meanwhile: the detector bitmap it reports walks
0002 -> 0880 -> 0980 -> 0881 -> 0885 -> 08c5, setting and clearing the 0x0040
bit from the detector at cell 03be, and the supervisor takes 1,567 of those
messages without acting.
Retracted from the previous commit: "its ATD never returns" as a description
of the blocker. ATD is mid-call for the whole run and the absence of CONNECT
or NO CARRIER says nothing - the blocker is past the dial, in whatever
consumes the detector reports and decides to load a datapump.
Also noted: overlay_downloads reads 0 on both ends while this routine runs
three times between them, so it is not watching this path.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
The DSP reset is a CPU pin, and the register it is driven from is the 186's
Port 1 latch: the 80C186EB manual's control block map gives 50H P1DIR, 52H
P1PIN, 54H P1CON, 56H P1LTCH, so ff56 is the latch and P1.1 to DSP RS is what
board.md, asic-pinout.md and c51-cpu-loader.md already describe.
Measured over a full dial, the firmware writes ff56 36,494 times and reads it
36,482 - read-modify-write on a shared latch - and never touches ff50 or ff54
at all. Both reset to FFH, every pin peripheral-controlled and an input, and
the manual says the latch value "appears at the pin only if it is programmed
as a port". As modelled these writes would drive nothing on real silicon.
Port 2 by contrast is used properly, ff58 direction and ff5a pins and ff5e
latch. Written down because every signal attributed to this latch rests on it.
Per-bit edge counts identify the bank: bit 2 is the EEPROM clock (29,177
edges), bit 5 chip select (1,043), and bits 1 and 3 carry 12 edges on the
originator and 16 on the answerer. machine.py resets on bit 3 while four
documents name bit 1 - but the two bits carry the same edge count within about
a thousand instructions, so the attribution does not change which resets
happen and is not why an originator stays silent.
The schedule is what matters. The answerer pulses reset at 22.05 s and 24.03 s,
going into data mode, and transmits from there. The originator's last reset is
at 9.0 s, before its first digit, and there is never another: its ATD never
returns. Its whole serial output is the OK from ATX0 - no CONNECT, no NO
CARRIER, no BUSY, 50 s after dialing.
Also: the originating end now learns its call was answered. set_call_progress
had one caller, on the SIP path, so on the socket the operation stayed
"dialing" for the rest of the call; cut-through moves it to "connected", and a
connected or trying line qualifies the DAA's detector the way an answering or
dialing one does. It does not by itself start the datapump.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
A reset clears the core's transmit array and restarts the cursors into it, but
the converted audio downstream of those cursors was kept. So the line carried
the old program's output after the new one had started. On the answering end
that put a stale run of 157 ms tone bursts in front of the answer tone, which
is audible as the tone starting, breaking off and starting again. Clearing
_exchange_line_buffer with the cursors removes most of it: five stale bursts
become three.
With that out of the way the two ends read clearly, and neither is a transport
fault.
B is behaving. Its datapump produces 2,102 Hz for 1.100 s, stops for 8.1 s,
and produces 2.980 s more - the array's own burst structure, 7,919 and 21,455
codec samples at 7,200, mapping one to one onto the wire with a constant
pipeline delay. A 3 s answer tone, no response, a retry: that is what an
answering modem does when its ANSam goes unanswered.
A is not. Its array holds 360,003 codec samples, 50.0 s, of which 5,176 are
nonzero - seven bursts of 102 ms at 3.81 s to 5.10 s into the generation, the
seven dialed digits and nothing else. The datapump clocks for the remaining
45 s and writes silence. A's problem is not the wire, the cursors, the
conversion or the socket; it is that its transmitter never starts.
Remaining and not explained: 0.47 s of stale prefix still reaches the line on
the answering end after the buffer clear, so something else holds converted
audio across a reset.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
A subscriber dialing is talking to the exchange, not to the far end. The
called party is not on the path at all until it answers. The socket carried
the raw transmit frame across from seizure, so A's DTMF landed in B's receiver
while B was still on hook being rung - b-rx was byte-identical to a-tx,
digits and all, which is not something a called subscriber can hear.
The exchange now cuts through when the call is answered - both ends off hook -
and stays through for the rest of the call. What crosses is cut, not what the
loop carries: `samples` stays intact for the digit receiver, because the
switch is on this loop and collects the number from it. Cutting before that
read starved the receiver of its own digits, which took out the ring and the
answer with it, and left the pair silent in both directions.
A 403 pair with --answer-on-ring: the switch still collects 5551234, cut
through lands at frame 246 and 245 - 22.1 s, when B answers - b-rx is silent
where it held 5,758 samples of A's dialing, and B's 2.98 s answer tone still
reaches A intact at 24.84 s.
a-tx.wav is now a recording of the through path rather than of A's
transmitter, so the digits are no longer in it. They are still in the core's
transmit array and in dial_digits.
A transmits nothing after cut through, unchanged by any of this.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Retract the previous section's reading that A and B "are running different
programs" because their originated tags barely overlap.
Every originated message on both ends leaves from the same instruction, pc
83d4, inside a generic sender at 83bf that drains a 16-word ring at ff60,
writes the queued word masked to 15 bits to port 5e as the tag, and sends one
data word when bit 15 was set. The tag is whatever the caller queued and
carries no role of its own; the enqueue at 83b0 has 118 call sites.
The two sites are the same report: 9c93 and 9f02 differ only in the constant,
8008 against 8016, and both then send @2f & 0x8fff. What differs is the
detector bank above each - a09b is a threshold compare, and the two banks test
different cells against different constants, setting different bits of @2f.
A runs the bank at 9c78, B the one at 9ee8, which is what an originating and
an answering end should do.
So @2f is a detector bitmap and the tag says which bank filled it. The
histograms read as that: A's commonest payload is 0x0080, the bit 9c87 sets,
and B's is 0x0080 plus 0x0400 and 0x0008, the bits its own bank sets. The tag
difference is a consequence of the two roles, not a fault.
Kept: after reporting, B calls a0b3 unconditionally while A calls it only when
bit 10 of @2f is clear, and bit 10 is the bit B's energy test sets. Nothing
here establishes what a0b3 does or what the banks detect; the cells and
thresholds are written down so that can be asked directly.
Also verified, since it was in doubt: neither end is replayed audio. a-tx is
byte-identical to b-rx and b-tx to a-rx, at the same offsets, so each side
receives exactly what its peer sent and nothing from the start of the run.
save_tx_pcm does still read the array from zero, so after a DSP reset that
dump holds only the last generation - a dump-file limit, not the wire.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Two instrument faults on the way to the doc's "next question, singular".
_maybe_start_originate_engine returned unless daa.operation was "originate".
Its docstring says why - it was written for the leased line, where the
originating end never dials - and the socket path's new digit receiver moves
the operation to "dialing" on the first digit, so the originating end stopped
arming at all. That was a regression from the dial-tone commit. A dialing
seizure now qualifies once the called party has answered, which is when an
originating modem starts V.8 instead of putting CM under its own digits.
And the core read m_data[0x48] for @48. A direct operand resolves to
(DP << 7) | offset, so that asserted DP 0. Measured at the dispatch DP is
0x180, which puts @48 at 0xc048 and @4a/@4d at 0xc04a/0xc04d: every report of
a null handler was reading a cell the firmware does not use. v8_dispatch_dp is
now reported so the page is never assumed again.
The static question the doc asked is answered: the 403 resident segment has 57
sites storing to @48, 26 to @4a and 58 to @4d, and almost every @48 site is
splk @48, #<address two words on>, so @48 is a continuation vector resumed by
lacl @48 ; bacc - the same arrangement as 2.1/2.2. The signature match is not
a false friend for want of writers.
With both faults fixed @48 still reads zero at every dispatch on both ends,
including B, which emits a full 2.98 s answer tone through 62,759 dispatches
of that routine. A routine whose vector is null on the side that is
negotiating is not the one negotiating, so 0xba0b is not the live V.8 state
machine on 403 and none of these counters mean V.8 progress here.
What does separate the ends is the mailbox stream: A originates 0008:* and B
0016:*, overlapping only on three tags. The audio is unchanged by any of this.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Two faults, both in the order the call was set up rather than in the audio.
The ring was a level, not a cadence. _service_line_frame asserted ringing for
as long as the seizure was a dialing one, which is the rest of the call, and
machine.py drives the ring detect bit on port 0x14 straight from it. The
answer machine at 0x70fb4 waits on an edge in every state, so a bit that goes
high and stays high parks it exactly as a floating one does - the comment
there already said so. LineExchange models the real sequence, so the socket
path now follows its timings: collect until interdigit_ms, spend routing_ms
setting the call up, then ring with RingSource's cadence, measured from the
last digit the line carried. The far end going off hook trips the ring.
And B answered a call nobody had made. --b-at ATA is queued at instruction
zero, so B seized the line and sent answer tone at 14.93 s while A was still
dialing until 15.35 s, and never sent another. --answer-on-ring holds the
answering end's AT input until the ring detector reads high, which is the
only order an answering modem ever sees: the switch rings it, the host
answers.
Measured on a 403 pair with --answer-on-ring: A dials 5551234 by 15.35 s, the
switch rings at 24.8 s, B answers within 9 frames of ring and the ring trips.
B's transmit goes from 23,841 nonzero samples to 38,914, and its answer tone
from one clipped 1.06 s burst to 1.10 s at 29.6 s and a full 2.98 s ANSam at
38.8 s. A receives all of it sample for sample at peak 22,042 and the bridge
hands it to the codec.
ATS0=1 does not stand in for this. B polls the ring detector 123,099 times
over a run and emits no RING to the DTE and never goes off hook, so the
firmware's own auto-answer is not reached by this path - worth its own look.
A still transmits nothing after its last digit, with v8_io_events 0. It hears
the answer tone and does not arm. That is the next question and it is not
about ordering.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
_service_line_frame's DAA block says an originating seizure "hears dial tone
until the firmware starts dialing", but nothing on that path noticed that it
had. The supervisor-PC hook at 0x5dbe7 and the exchange's `dialed` both stand
in for a central office, and neither fires on the socket: `link` attaches no
exchange. So operation stayed "originate", which the same block reads back as
line_state "dial-tone", for the whole call.
The firmware dialed anyway. Decoding a-tx gives 5551234 at 102 ms on and
112 ms off - the number from ATDT5551234, on the wire, while its own DAA kept
350+440 Hz on top of it and on top of the far end's answer tone.
DtmfDecoder already exists to learn the number the way a central office does,
by listening rather than by reading it out of the firmware. Feeding it the
outgoing frame applies the same rule to this path: first digit takes dial
tone off the line, and collection continues after it the way the exchange's
"dial-tone" then "collecting" states do.
A now reports dial_digits 5551234 against a single "5" before the collection
fix and nothing before that, reaches operation "dialing" with line_state
"quiet", and offers ringing to B, which now sees line_state "ringing".
This does not make the call. A still transmits nothing after its last digit:
B's 1.06 s of 2100 Hz lands at 14.93 s while A is still dialing until 15.35 s,
and is never repeated. The ordering of the answer against the dial is the
next question, not the dial tone.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
MailboxTap._next_sample was both the absolute count of samples drained and the
index it read m_line_tx from. Those are the same number only while the array
is, and it is not: the supervisor resets the DSP two or three times a call and
each reset clears the array.
So the tap read an empty slice after every reset until the new generation grew
past a stale index, dropping the start of each generation from its own report
with no error. Same fault as the bridge's output cursors in dfc1c6e; the tap
cannot see set_reset, so it detects the new array itself - line_tx_writes
shorter than where it was reading is a reset, not a continuation.
_array_cursor now indexes the current array and _next_sample stays the
absolute total, which is what the report and the sample_index field want.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
set_reset drives the shared C51/codec reset net and calls core.reset(), which
clears m_line_tx. _exchange_tx_index, _line_tx_index and _sip_tx_index index
that array and were left where they were. The rebuild path at the bootstrap
window already resets them for exactly this reason; the reset net did not.
A 403 pair asserts the net two or three times per call as the supervisor
reloads the datapump - counted in the core: two clears on A, three on B, the
last discarding 72,426 and 15,865 samples. After each one _take_line_audio
reads an empty slice until the new generation grows past the stale cursor, so
the start of every generation is skipped. A's audio sits at index 27,412 of
its last generation, far below a cursor already at 216,003, so none of it was
ever read; B's ran past the cursor and was read in part.
That is the disagreement the previous commit could not place. Nothing was
overwriting the array: a cell read as zero at size 27,413 in one generation
and 18,036 at the same size in the next. Measured, not inferred - the core
counts its own clears, and no rebuild (core_rebuilt_at 0) and no out-of-range
read was involved.
Both ends now ship what their datapump produces. tx_peak_codec matches the
array peak exactly on both sides, 22,748 on A against 0 before and 28,040 on
B against 17,188. a-tx carries 5,759 nonzero samples at peak 22,688 where it
was 240,000 zeros, b-tx 124,952 against 23,841, and each side's receive is
its peer's transmit sample for sample.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
_final_line_tx_scan reads the core's whole m_line_tx at the end of a run and
agrees with the core's own counters exactly: A has 5,176 nonzero samples,
peak 22,748, starting at index 27,412 (3.81 s). The bridge consumed indices
0..216,002 of that same array - which includes 27,412 - and saw a peak of
zero.
The same disagreement is on the audible end: B's array peaks at 28,040 while
the bridge only ever saw 17,188, which is also b-tx.wav's peak. The bridge's
view matches the wire in both cases; the array carries values it never read.
Ruled out by measurement: no core rebuild (core_rebuilt_at 0, bootstraps 1),
no trimming (one clear(), no erase/resize/pop_front), not the resampler (the
peak is zero before the conversion), not an out-of-range read, and neither of
the two causes settled earlier.
A vector does not change an index it has already written, so one of the two
measurements is not measuring what it appears to. Not a datasheet question.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
--line-frames N on run and link stops each side once it has exchanged N line
frames. Bridge.line_frame_budget trips Machine.request_stop from
_service_line_frame, so both ends leave at the same point in call time and
--instructions is only a ceiling.
300 frames on a 403 pair: both ends reach exactly 30.00 s of codec time
against 22.82 s and 15.89 s before, both still connected at exit, two
samples left in each buffer. The divergence and the dead-socket drop are
gone.
It changed nothing about the audio. Over 30 s with the peer alive
throughout, a-tx is 240,000 zeros and line_tx_nonzero is 5,176 - the same
count as the truncated run. So the previous commit's conclusion, that A's
silence followed from producing its audio after B had exited, is refuted.
The truncation was real and worth fixing and was not the cause.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Instrumented every branch of _service_line. originate_return is 0 on both
ends, so the guard proposed in the previous commit is exonerated - that
inference was wrong.
What the counters show instead: A calls _service_line_frame 228 times and
only 158 reach the peer, with line.connected False and "the far end closed
the line". The missing 70 frames are exactly 7.00 s, the shortfall measured
before and misexplained as an unshipped tail. A's buffer ends with 126
samples in it, so nothing was stuck.
Both ends stop at 85M x86 instructions, which is 22.82 s of codec time on A
and 15.89 s on B - a 44% divergence in instruction-to-sample ratio. B exits
first and A talks to a closed socket. The answer tone lands at 12.03-15.01 s,
so every nonzero sample A produces is generated after B has gone, which is
why a-tx is silent end to end rather than merely late.
Harness fault, not firmware. A linked pair budgeted on instructions gives the
two ends different clocks on a shared wire.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
b-tx and a-rx are identical - 23,841 nonzero samples, peak 17,188, running
96,273 to 120,113 (12.03 s to 15.01 s), which is the answer tone. The line
transport is not the problem in that direction.
a-tx is 127,200 frames of zero. The core says side A's DSP wrote 5,176
nonzero samples into m_line_tx, so the samples exist and none reached the
wire.
The shortfall is the shipping rate, not the conversion: A's codec produced
182,531 line-equivalent samples and shipped 126,400 of them, 69.2%, leaving
a 7.02 s tail unsent, where B shipped 99.4% and left 0.09 s. A's nonzero
output is 3% of its stream and arrives late, so the whole of it is in the
tail that never went out.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
The core no longer hard-codes 2.1/2.2's c418: Bridge._v8_dispatch_addresses
finds every copy of the dispatcher by signature over the resident bank and
each declared overlay, and set_v8_dispatch_pcs hands them to the core, which
now also reports which one fired as v8_dispatch_pc.
_find_call_overlay requires the candidate to be pre-linked for the
destination - first branch target == 0xc418 + 0x0d. 2.1/2.2's stored copy
satisfies it; the self-linked resident copies on 302/403 do not, so nothing
is published there any more.
Measured on a 403 linked pair against the old behaviour as a control: every
V.8 number identical, only call_overlay_available moves, so the gate changed
nothing observable. The dispatcher does run, at 0xba0b, 22,471 times - but
@48, @4a and @4d are all zero, so every entry branches to program 0, and
v8_rx_peak and the audio rms are zero on both sides in the baseline too.
Artifacts in artifacts/v8-dispatcher-403-01/.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
_find_call_overlay accepts the resident dispatcher at 0xba2f (302) /
0xba0b (403) and copies 2,537 words of it to 0xc418. That block is not a
stored overlay: its branches are linked for its own address, so the copy
lands with every internal target pointing back into the original, and it
overwrites 0xc418-0xce00 of the resident bank.
The 2.1/2.2 layout it is modelled on is real - main211 does store the
overlay at b9c0 pre-linked for c418 - but 302 and 403 are flash ROMs with
the overlay table at 9d00/b000/dc00 and a different transfer protocol, as
the profile's own comment says.
Consequence for instrumentation: 0xc418 only becomes lacl @4a because the
misplacement put it there, so m_v8_dispatches counts the injected copy.
0xc7f7/0xc81a/0xc853 are 2.1/2.2 divide loops and are ordinary resident
routines here. The real dispatcher is at 0xba2f and 0xca41 on 302, 0xba0b
and 0xca1d on 403, plus a guarded copy in overlays 6 and 7.
This does not establish a cause for the V.8 stall - the counters are
write-only and never feed back - only that the instrument was aimed at the
wrong firmware.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Tag 0x17's two entries are not the same kind of address. 0x9cd4 sits below
every overlay entry and is a two-phase frame loop that never returns,
driving the resume primitive at 0x9cec. 0x9d17 is 23 words into overlay 6,
whose span is 0x9d00-0xc9f5 on 302.
Corrects the previous commit, which described 0x9d17 from the base image's
bytes. Overlay 6 shares only 52 of 11,510 words with the resident bank and
every word at 0x9d17 differs; with the overlay loaded it is V.34 setup.
Also records the xc polarity: bit 14 set selects 0x9cd4, clear leaves
0x9d17.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Read out of the DSP dispatch table on both images - 302 base 0x8401 gives
0x9bc5 and 0x9b9d, 403 base 0x83e9 gives 0x9ba1 and 0x9b79, and the same
read reproduces fsk-modulation.md's 9b34/9b38 for 0x10/0x11.
0x1e is six words: clear @6f bit 12, mask the data word to bit 12, or it
back. That is the bit 0x8613f computes from [0x4ed] & 4, and the supervisor
calls 0x8613f immediately before publishing the tag, so the MNP LR 0xC0
payload reaches DSP @6f unbroken.
0x17 writes @6f wholesale as (data & 0x3200) | 0x40 and selects between two
fixed entries, 0x9d17 and 0x9cd4, on bit 14 of the data word - not through
the nine-slot table. The shared 0x9b50 prologue reloads @27, the mode-flag
cell the slot selector tests.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Same LR parameter, same decode, same 0x1000 override, same dispatch idiom,
at [0xd0a3] on Ie030002.nac and [0x84fd] on the quad channel flash. The
override is byte-identical in all three images and so is the emitter.
The I-modem and quad dispatch sites also publish tags 0x17 and 0x1e
alongside 0x10/0x11, which the two 302 sites traced here do not.
Also corrects the attribution in the previous commit: main211.xmf is a
Courier 3453B v2.1.1, an analog image with no "ISDN" string anywhere, not
an iModem.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
[0x4ed] bit 2 gates the one bit of [0x0281] that is not built from local
configuration, and it is a received byte: the two-octet payload of the
proprietary parameter type 0xC0 in the far end's MNP Link Request, decoded
at 0x85932 and 0x8d370 out of the two receive rings.
The frame is identified by its own parameter set - type 3 valued 1..15,
type 4 length 2 with a dead compare against 260 beside it, type 9 rejected
at 3 or above - and by the transmitted template at 0x85bde, which is the
canonical LR header byte for byte. The modem emits its own word through
the same parameter at 0x85cd3, skipping it entirely when the local value
is zero.
403 is the same code at [0x3e5]/[0x3e6]: 30 test sites with matching masks
in matching order, the same two stores, four clears and two literal-1
writes, and no or/and/xor against the cell in either image.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>