The line probe repeats every 64 samples - autocorrelation 0.874, with
the harmonics at 128, 192 and 256 behind it and nothing else close. One
64-point table played round and round, which is how a multitone probe
gets built.
That fixes the rate without touching the divider argument. V.34's probe
has a 150 Hz fundamental, so one pass of the table must last 1/150 s, so
the table must be clocked at 64 x 150 = 9600. At 8000 the same 64 points
last 1/125 s and the comb lands on a 125 Hz grid, which is what is
measured. 9600/8000 is the 6/5.
It also narrows the question usefully: the probe's fundamental is 150 Hz
whichever symbol rate is chosen, so this constrains the codec during
Phase 2 and says nothing about what index 4 should be for data. The
divider argument for 8000 stands; what needs explaining is what puts the
part at 9600 while it probes.
Also records the DAC accumulator as ruled out as a hidden 6:5 decimator.
Counting writes to 0xfffd and 0xffff with the call-TDM gate removed,
both take zero writes across a whole run.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Second correction to this section, and the measurement that forces it:
pacing the line on samples produced rather than on codec conversions
brings the steady-state emitted/produced ratio from 1.2030 to 0.9988,
keeps the link alive for a whole run instead of 2.6 s, stops the
answerer's spurious fallback - and leaves every frequency exactly where
it was. The originator's tone is 1000 Hz either way.
Zero padding at a frame boundary chops a waveform, it does not stretch
one, so it was never going to shift a pitch. The two 1.2s are the same
mismatch surfacing twice, not one causing the other, and the scale error
is upstream of the line: the datapump steps its oscillator once per
line-frame interrupt and gets 8000 a second where its increments imply
9600.
Also records the receive direction as ruled out. Differencing two run
lengths to cancel the on-hook prologue, the wire delivers every sample
to the codec 1:1 at a matched rate, and at 8000/7200 when the answerer
has fallen back. The two ends do hear each other.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
The DAC-averaging candidate is dead - the counters read zero writes and
zero frames, because that branch is gated on call-TDM and never runs
here. Replaced with what the same counters measured: the line emits
1.2030 samples for every one the core produces, against a probe scale
error of 1.2019.
The pacing advances on the codec's conversion count while a sample is
produced per line-frame interrupt, and the shortfall is zero-padded.
Pacing on samples produced brings the ratio to 1.06 and keeps the line
alive for a whole run instead of 2.6 s, without training any better, so
it is recorded as a measurement rather than a fix.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
The leased pair's two loud bursts are V.34 Phase 2 line probes, one from
each end in turn. The spectrum identifies itself by its holes: a comb on
a 124.8 Hz grid carrying k = 2..25 except 6, 8, 12 and 16, which scaled
to V.34's 150 Hz spacing are 900, 1200, 1800 and 2400 - exactly the four
tones the standard omits. Twenty of twenty-one, with the right gaps.
The omission pattern does not depend on playback rate, so the generator
intends 150 Hz and the stream renders 124.8: a factor of 1.2. The same
factor turns the steady tones either side of the probes into 2400, 1800
and 1200 Hz, which are the V.22bis and V.32 carriers.
Raising the master clock to 3.456 MHz puts the probe on the grid and is
still not the fix - it scales every row, moving index 0 to 8640 Hz where
none of the four frequencies that pin index 0 is standard any more. And
it does not make the link train either way.
Index 4's 8000 Hz is left standing. The divider ratio forces it once
index 0 is pinned, and the firmware's own `360 x baud / Fs` word reads
144 for row 4, which is 8000 exactly and would be 120 at 9600. So the
factor is downstream of the divider, and the DAC averaging path is the
candidate: the line sample is the mean of the datapump's writes across a
codec frame, so a datapump running three samples per symbol into an 8000
Hz frame clock lands every frequency 1.2x low. Noted as a hypothesis
with a measurement behind it and no code reading yet.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
It had grown by accretion - retractions layered mid-text, sections ordered by
discovery rather than argument, and an overlay table that still carried a claim
withdrawn later in the same file.
Same content, reorganised: mechanism, table, three independent reasons the
index is V.34's symbol rate, the absolute scale and what pins it, the two
variables at @5b and where each comes from, the INFO1 parser and builder, what
the ladder implies for V.90's symbol-rate constraint, the overlay split, the
V.PCM rate, and one list each of what is open and what was withdrawn.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Each 9-bit entry is 5 + 4: the builder packs A + (B << 5), the parser starts
5 bits lower and masks 4 bits. That is V.34 INFO1's per-symbol-rate block -
pre-emphasis plus a projected maximum data rate measured from the line probe -
which is why selection is min(ours, theirs) then argmax, and why a zeroed
entry withdraws a rate.
Widths are set by the caller's mask, so the frame layout falls out of the call
sites. The DP 7 index that programs the codec is a 3-bit field read from the
RECEIVED frame at bit 12; the DP 6 index is our own argmax and is what the
outgoing frame declares. Both halves of the tx/rx split are now located, but
which is which, and how one codec Fs serves both, is still open.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
The frame carries a six-entry capability block, one 9-bit field per V.34
symbol rate. 91a5 builds it into ff1a from our arrays at ff20/ff28, packing
A[i] + (B[i] << 5) and stepping down 9 bits from bit 63; 91c2 parses the far
end's out of ff08 from bit 58 into ff30.
A rate is disabled by zeroing its entry: 92d2 normalises only the non-zero
entries, and 9615 zeroes everything past the argmax. Selection at 91e1 takes
min(ours, theirs) per rate and the argmax over the six, so it is genuinely
two-directional - which narrows the earlier retraction to the codec index
alone.
Overlay 8 indexes our capability array by the DP 7 rate index at dc4a, the
same pairing the resident makes right after programming the codec.
The advertised values are computed at run time, so which rates this modem
offers is not readable from the ROM; the mechanism for offering only 3200 and
3429 is present.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@5b is data-page relative and this firmware keeps two variables there: DP 7
(0x3db) is the rate index that drives the carrier table, the symbol-rate table
and the codec divider table; DP 6 (0x35b) is unrelated. The argmax loop at
91e1, the forcing at 90ba and overlay 7's writes are all DP 6, so:
- the "index is a reduction over tx and rx symbol rates" argument is withdrawn,
and that question is reopened;
- "overlay 7 selects 7578.95 Hz" is withdrawn;
- the overlay 8 entry path is not shown to force the rate.
What survives is DP 7: overlay 6 forces index 5 at its entry, 9299 forces
index 4 and declares it in the outgoing frame, and five resident sites pass a
literal 4 to the rate routine. All are 8000 Hz.
Against V.90's symbol-rate constraint - 3200 mandatory, 3000 and 3429
optional, 2400/2743/2800 prohibited - the ladder predicts this modem can offer
only 3200 and 3429, because the optional 3000 maps to 7578.95 Hz and cannot
carry PCM.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Overlay 8 never touches the rate selector, so the rate had to come from its
entry paths - and both force it. Overlay 6 sets index 5 and programs the codec
as its eighth instruction; the resident path at 90ba sets index 4 and
tail-branches to dc24, overlay 8's entry. 9299 goes further and writes the
forced index into the outgoing frame, so the modem declares 3200 baud rather
than accepting a negotiated rate. Both indices give B = 18, 8000 Hz.
The Ja descriptor is in overlay 8 and in no other overlay, and overlay 8's
branch traffic goes to overlay-6-only space 8 times and to overlay-7-only
space never. So overlay 6 is the PCM core and overlay 8 the V.90 layer.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
V.34 negotiates tx and rx symbol rates separately and the AC01 has one Fs, so
the six-row index has to collapse two numbers into one. It does: 91e1 is an
argmax over six rates of the per-direction minimum, walking two six-entry
arrays at ff28 and ff30, and 971c takes the max of two 3-bit fields drawn from
the call-mode and answer-mode frame buffers.
So the codec rate is bounded by the wider direction. The asymmetric failure
case - one direction selecting 2400 while the other needs 3200 - cannot arise,
and V.PCM's downstream can pull the codec to 8000 on its own.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
The six rows are indexed by V.34's symbol rate and give a uniform 1.09-1.20
margin over each row's own Nyquist limit. So B = 18 is what 3200 and 3429
baud need, and 8000 Hz is a property of the 2.88 MHz MCLK rather than
provisioning for V.PCM - the earlier reading had that backwards.
Overlay 8, the V.PCM datapump, reads the rate index zero times and writes no
codec register, so it inherits whatever V.34 negotiated. That is 8000 Hz only
at symbol rates 3200 and 3429. The V.PCM sample rate is not established.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
The contradiction in codec-rate-312.md was one false premise. The AC01's
divider registers are not written only at reset: a table-driven selector
immediately after the control-word sender inlines the sender's handshake
instead of calling it, which is why every scan for calls to the sender
missed it. Six rows, indexed by V.34's 3-bit negotiated symbol rate, write
register 2 with B = 20, 19 or 18 - 7200, 7578.95 and 8000 Hz.
The mapping is arithmetic rather than suggestive: word 2 of each row is
360 x baud / Fs for all six symbol rates, and B = 18 lands exactly on the
8000 Hz that V.PCM needs.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>