9083 appears nowhere in the image because nothing branches to it. 907f calls
901a, and the two-word "b 9099" that follows is either executed or stepped
over: 901a ends in pop / add #02 / bacc, returning past it to 9083, which is
where the scheduler yield that eventually opens the answer-tone gates lives.
Two conditions must both hold, and both were confirmed by running the call site
with the table and flag seeded rather than by reading:
highest non-zero word at ff2c or above (index >= 4), AND @1f bit 14 set
Either alone falls through to 9099 and the yield never runs.
Two cautions are recorded with it. The scan stops at the first non-zero from
the top, so the index measures how high the table is filled and not how many
entries it holds - populating more words below the top does not move it. And
the call site must be entered with DP already 6, as 9077 leaves it; entering at
907f with DP 0 sends "sar ar1, @5b" to the wrong cell and every case falls
through to 9099, which is indistinguishable from the gate being closed. The
first run of this experiment made exactly that mistake.
Still unshown: what fills the table, and what sets bit 14 of @1f.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
The path to 9f40 gates on bits 0 and 1 of 0x006f but stopped short of saying
what sets them. Three sites survive an honest filter, and each was confirmed by
executing it rather than by reading:
9090 lar ar1,#6f / opl *,#0003 sets both, preserving the rest
a372 ldp #000 / splk @6f,#0043 sets both, and bit 6, as a whole word
a337 ldp #000 / splk @6f,#0040 clears both
9090 is a scheduler resume: two instructions earlier "lacc #0508; call 8765"
yields for 1288 frames with the return address as the state, so the gates open
on a timer rather than on an event. a372 is reached from 9f98, inside the
answer sequence itself, so it re-asserts the bits rather than opening them.
The scan needed care in both directions. SPLK @6f is DP-relative, so most
apparent writers are 0x036f or 0x03ef at DP 6 or 7 and are unrelated; while the
sites that do reach this word go through "lar ar1,#6f" and an indirect *, which
a search for @6f never sees. An earlier pass of this scan also matched operand
words as if they were instructions.
One subtlety is worth recording because it is silent: 9091 only works because
ARP is 1 when it runs. LAR AR1 loads the register without selecting it, so with
ARP at 0 the OPL lands on 0x0000 and the cell does not change - which is what
the first attempt to confirm this site showed.
c583 and c58f toggle bits 0 and 1 of some cell, but their nearest LDP is 20 and
32 words back with a ret in between, so the DP is inherited from the caller and
they cannot be attributed to 0x006f by reading. Recorded as unresolved.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
docs/answer-tone.md has said since it was written that it could not show the
supervisor deciding to send the answer tone: "9f40 is reached from a state
machine this harness does not run." That machine is now traced.
Nothing branches to 9f40; it is fallen into. 875c is a one-shot scheduler
driven from the idle path, with a frame countdown at 0x006e and the address of
the next state at 0x006d; when the countdown expires it does BACC into that
address. Two sites write 9f3e there - 9e0a and 9e14 - each gated on a bit of
the flags word at 0x006f, reached from the conditional callers of afeb (b0e7,
b233, b5a1, b5ca) and from a320 (aaa2, ab7e). 9f3e falls through to 9f40.
Path B calls 8140 before arming, which corroborates codec-rate-312.md: the
sample rate is programmed immediately before the tone that assumes it.
The bit tests needed care. BIT takes a bit *code*, not a bit number - the C5x
tests bit 15 minus the code, which this repository's core implements as
(~op >> 8) & 0xf - while the disassembler prints the raw code. So the gates are
bits 0 and 1 of 0x006f, not 15 and 14.
The last two links are confirmed by running them rather than by reading:
seeding 0x006d with 9f3e and entering the scheduler at 875c executes 9f3e,
9f40 and 86d1 and leaves 0x3f2 = 4aab, 0x3f3 = 0898 and 0x39a = 874f. A full
boot was not needed, which matters because this image does not currently reach
one for unrelated reasons.
What remains unshown is the supervisor state that sets those two flag bits.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
docs/ata-answer-tone-302.md recorded what ATA puts on the line but attributed
neither burst to code, and called the 2250 Hz an identification against the
standard only. Both are now located, statically and at runtime.
3.0.13 relocates 3.1.2's oscillator family but keeps its data cells, which is
why the two images agree on the tones while sharing no addresses: arm routine
86dc (was 86d1), plain oscillator 875a (874f), pair 874e (8743), reversals
8744 (8739), ANSam 871d/8721/8723 (8712/8716/8718) - all writing increment
0x3f2, amplitude 0x3f3, phase 0x3c0 through the mixer's 0x39a callback slot.
ANSam is armed at 0x9f62 with the same constants 3.1.2 uses at 9f40: #4aab,
#0ca7, #06cf, and 8723's #0089 for the 15.05 Hz modulation.
The 2250 Hz tone is armed at 0xd354, reached from 0x9ffc in the answer state
machine: "lacc #5000; b 86dc". It is a *branch*, not a call, which is why
enumerating callers of the arm routine finds five literal frequencies and
misses this one; searching for every word equal to 86dc is what found it.
0x5000/65536*7200 is 2250.00 Hz exactly.
One earlier guess is corrected. A cell at 0x3ef advancing by 0x5555 was read
as a 2400 Hz carrier, suggesting V.22's carrier rotated 90 degrees per symbol.
0x3ee:0x3ef is a 32-bit accumulator advanced by 0x01555555; 0x5555 is only its
low half's delta. The tone is a plain oscillator generated directly - so the
signal is what V.22 unscrambled binary 1 looks like, while the implementation
is not a modulator.
Runtime confirms the static read: mid-burst 0x3f2 = 0x5000, 0x3f3 = 0x0898
(the arm routine's own literal) and 0x39a = 0x875a.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
docs/answer-tone.md rendered 3.1.2's answer-tone oscillator family at
component level and named what it could not show: "9f40 is reached from a
state machine this harness does not run." With the harness tone generator
deleted, the full emulator now shows the other half on the other image.
ATA on IDSDL302.ROM puts two tones on the line, from the C52 alone:
2.49s +3.29s 2100 Hz +/- 1.5, sidebands +/-15.05 Hz near 10% - V.8 ANSam
5.83s +1.49s 2250.00 Hz, no sidebands - see below
The ANSam identification is firm, and it agrees with the 3.1.2 component
render (sidebands 0.101/0.100) across two images that share no addresses
here - so it is not one routine measured twice.
The 2250 Hz burst is matched against the standard only. V.22's channel 2
carrier less 150 Hz is unscrambled binary 1, which is what was measured, but
the 3.0.13 code that arms it is unlocated and nothing here traces it. The
manifest says so.
The sequence is the ATA handler's, not a scenario artifact: it reproduces
under --exchange-hotline and --ring at the same onsets, durations and levels,
and the 2250 Hz burst is byte-identical between the two runs.
Also recorded: the CLI cannot ring the exchange. --ring drives the detector
bit at port 0x14 but never sets LineExchange to "ringing" - only ata.py's SIP
inbound path calls exchange.ring() - so set_line_hook labels every CLI seizure
"originate". The supervisor armed these tones regardless, but a true
answer-side run needs --line-link with a paired instance.
Per repository convention the captures themselves are not tracked; the
manifest carries their sha256 and the command that regenerates them.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
MAC, MACD, MADD and MADS walk a coefficient table in program memory beside a
data window. Two things were wrong, and together they zeroed every filter the
firmware runs. The coefficient address did not advance under RPT, because all
four relied on the outer repeat loop, which re-executes with the program
address reset - so `rpt #0e ; macd *-` convolved fifteen samples against one
constant. And MADD/MADS read BMAR's target from data memory rather than
program memory, which returns zero for every coefficient table here.
With that fixed the resident bank's FSK transmitter at d95f runs. Six setup
routines at d790-d7d7 hold four increment pairs that are, at 7200 Hz, exactly
V.21 channels 1 and 2 and Bell 103 originate and answer; four more set the
matching receive carriers. courier_emu.fsk calls the ROM's own setup, installs
d95f, and modulates a 511-bit maximal-length sequence at 300 baud with zero
bit errors in three of the four bands. The fourth is a limit of this tool's
non-coherent demodulator - Bell 103 originate's tones are 200 Hz apart at
300 baud - not of the modulator, which measures 1270.0 and 1070.0 Hz exactly.
Eight dispatch entries at d7d8-d812 pair a transmitter with a receiver, and
four put the receiver inside the transmitter's own band. A modem in a call
never listens to its own band, so those four are the analogue-loopback
self-test's configuration. No loopback has been run here; that needs the
demodulator and the supervisor state machine.
Two corrections to answer-tone.md follow. ANSam was not unrenderable, only
filtered to zero, and it now shows its 15 Hz sidebands. And "&T8 does not
engage" was read off hot_addresses, which only lists the busiest addresses;
recording every address shows &T8 reaching 548 the bare AT never does.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
The resident bank's callback slot drives a family of oscillators, not just
the DTMF pair. 86d1 arms one from an accumulator increment, and its caller at
9f40 passes #4aab with a reversal reload of 0x0ca7: at the dial path's
7200 Hz that is 2100.04 Hz reversing every 449.9 ms - the V.25 answer tone.
courier_emu.answer_tone arms the tone with the ROM's own instruction words and
runs the same mixer and serial ISR audio312 uses, measuring 2100.0 Hz and a
3200-3264 sample reversal spacing around the counter's 3239.
Entering the frame at 80d3, as audio312 does, is wrong for this callback: its
BANZ reads the ARP register, which the mixer sets at 80c9, so the counter is
never stored and XPL fires every sample. This harness enters at 80c7.
ANSam's 15.05 Hz modulation at 8718 is identified but not rendered; its
shaping filter wants delay-line state the idle-RAM fixture does not supply.
The &T1/&T8 loopback was tried first and does not engage in the emulator.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>