Commit Graph
8 Commits
Author SHA1 Message Date
Cryan209andClaude Opus 5 23b72eb633 All four bands score alike; the 22-in-169 was a bad alignment
The table committed an hour ago put bell103-originate at 22 symbol errors
in 169 and called the band unsettled. Re-measured through one analysis path
for all four, it is 1 in 169 - the earlier figure came from a per-band
script whose offset search locked onto the wrong alignment.

Which is the result to expect. The four bands run the same DSP code and
differ only in @72/@73, @6b, @69 and @0b, so a wide spread would have been
evidence of something band-dependent in the model rather than in the signal.
Getting one to two errors in ~167 symbols across all four is the check that
the emulation is modelling the part rather than being fitted to one path.

The bands do split in two by alignment and polarity - {bell103-answer,
v21-originate} at offset 323 direct, {v21-answer, bell103-originate} at 130
inverted - and that pairing does not follow mark-above-centre versus
mark-below. Recorded, not explained.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-16 23:16:28 +12:00
Cryan209andClaude Opus 5 8eb34cd503 Correct the loopback section: that harness has not run for some time
docs/fsk-modulation.md carried a table of zero bit errors for all four
bands from `courier_emu.fsk --loopback`. Every mode of it now raises
`loopback did not reach 80c3`, and does so at 32faa8e as well, so the table
was already unreproducible - exactly the cost a stale doc is supposed to
save.

Replaced with what fsk_loopback measures, and with the three things the old
harness had wrong, since answer_tone, audio312 and v34 all enter the mixer
the same way: no mask ROM so no vector table, the frame ISR entered by
forcing the PC, and the consumer side of the output buffer pinned.

bell103-originate is left explicitly unsettled at 22 errors in 169 symbols.
It is the weak band on both harnesses and has the lowest separation
measured, d' = 1.95, but whether the residual is the band or the alignment
is not established.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-16 23:05:57 +12:00
Cryan209andClaude Opus 5 38abdfa95f Read the e-family's rate change, and fix the bit numbering throughout
The e-family's phase hook is the only path that reaches 8140, and the index it
passes comes from adee: adc4 ANDs the four capability words at ffb0..ffb3 into
ffb4, and adee scans that intersection from bit 5 down to bit 1, returning the
codec row 5..1 and 0 for none. The supervisor builds ffb1 from three
S-registers, and S54's bits 0..5 are the six V.34 symbol rates, so the rate
change selects the codec sample rate for the fastest symbol rate every party
allows: 3429 or 3200 -> 8000 Hz, 3000, 2800 or 2743 -> 7578.95 Hz, none ->
7200 Hz.

Finding that forced a correction that runs back through several claims. The
C5x BIT instruction takes a bit *code*, and the core shifts by ~code & 0xf
(op_bit in native/c5x_ops.ipp), so the bit tested is 15 - the code. Every bit
number this repo reported from a `bit n` instruction was the code. The nine
slot flags, the receiver fork, and the fff4 bits are renumbered here; the fit of
six symbol rates onto six codec rows in order is an independent check that the
numbering is now right.

One conclusion does not survive it. &X2 sets @1f bit 8 (opl @1f, #0100) while
overlay 8's fork tests bit 7, so they are different bits and &X does not select
the receiver family. &X's bit is read at 81e4, in the same ISR region as the
two sample paths it also chooses, which is where it belongs. What sets bit 7 is
b402 and c91a, inside the datapump phase code. What the two families are for is
open again.

Also corrected: the four-candidate search sets fff4 bit 13, read at c5e7, while
the parameter selectors written `bit 13` in overlay 6 read bit 2. They are not
the same flag.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-06 10:58:02 +12:00
Cryan209andClaude Opus 5 cda3f5cd87 Name all nine datapump slots, and find the fax modulations
The firmware carries its own answer in plain text. AT*C's help text enumerates
every carrier the modem can transmit - 76 of them - and the families are Bell
103, V.21, V.22, V.22bis, V.23, V.32, HST, V.FC and V.34. Nine families, and
the nine-slot datapump table is the same nine in reverse, fastest first, which
is what a fallback ladder looks like.

Six slots are held up by more than that ordering. V.34 is the only slot that
selects codec rate index 5, the 8000 Hz / 3429 baud row. V.22bis and V.22 share
one 600-baud datapump and differ only in a parameter table; its 12-entry
carrier table is stepped by 2 on the originate entries and 4 on the answer
ones, which is 1200 and 2400 Hz. V.23 runs different transmitters per side - a
13:15 tone pair that is 390/450, and an increment built from the 2100 Hz answer
tone constant - so the caller sends the backward channel and the answerer the
forward one, which also proves table 9b48 is the originate side. V.21 and Bell
103 were already measured. V.32 and HST rest on one constant and on structure,
and say so.

Two things are not in that table, and both are accounted for. Overlay 8 is
never requested on its own: the loader appends it whenever overlay 6 is asked
for, and its range collides with neither, so the image sets are {6,8} or {7}.
That is the PCM downstream layer beside the V.34 core, carrying x2 and V.90 -
the supervisor holds both rate ladders, 16 rates from 33333 and 28 from 28000.
What separates the two receivers inside overlay 8 is not established.

Fax is resident. Three mailbox tags index a five-slot table by their argument's
high nibble: V.21 channel 2, then two 1800 Hz datapumps and one at 1700 Hz,
which is V.29's carrier and nothing else's here. The dispatch and those
datapumps sit inside overlay 8's load range, so a V.90 or x2 connection and
Class 1 fax cannot be resident at the same time.

courier_emu.datapumps reads the carrier menu, the overlay chaining and the fax
tables out of the image; the tests assert them there rather than here.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-06 09:53:09 +12:00
Cryan209andClaude Opus 5 f609e0619f Measure which band the receiver hears, and find who dispatches the loopback
The claim that four dispatch entries put the receiver in the transmitter's own
band was an argument about constants. This measures it: the firmware's own
modulator produces a V.21 answer signal, the transmitter is gated off, and the
signal is handed to the receiver with each of the four receive setups
installed. Only d7a4, the answer band's own centre, recovers it - 0 errors
against 56, 64 and 64. So the receive setup selects the band, and the same-band
entries really are the modem hearing itself.

Following the entries upwards: mailbox commands 10 and 11 each load one of two
nine-slot datapump tables at 9b48 and 9b51, indexed by mode flags in @26/@27
through the selector at 9b5a. Slots 7 and 8 are the four own-band FSK entries.
Slots 0 and 1 are overlay 6's and overlay 7's own entry addresses. A second
dispatcher on the same flag bits branches to the cross-band FSK entries
instead, so these modulations have two entry points that differ by which band
the receiver is put on.

The overlays carry no loopback entries of their own: no overlay sets up an FSK
band at all - overlay 8's splk @72/@73 hits are loop counters on another data
page - and none tests the @6f bit 14 that path sets, nor calls any resident
routine that does. What that bit means is left open; the 8d6f reading is as
consistent with an answer-side flag as with a self-test flag.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-06 09:24:49 +12:00
Cryan209andClaude Opus 5 309db09b9b Close the loopback: the firmware demodulates its own transmitter
All four 300 bps bands recover a 511-bit maximal-length sequence with zero
errors, through the ROM's own modulator at d95f and its own receiver at d8aa,
with every transmitted word fed back as the next received word.

The bring-up is the ROM's own, in the order d829 performs it - transmit setup,
receive setup, then d94e, d895, d879 - so nothing is installed by hand.

The previous commit reported this as not working and blamed the receiver. The
receiver was fine; three harness faults were not. The loop has to be fed
through the codec receive queue, because DRR is served from there and the line
queue never reaches it. The buffer pointer and PC have to be restored each
frame, as audio312 already does, or the ISR walks off the two-word window and
DXR reads zero from the second sample. And the receiver raises INTR 17 every
sample, which needs a vector at program 0022 that the resident bank does not
carry.

Two properties of the receiver are measured rather than assumed. The sampling
offset is its group delay: stable per mode at 41 to 44, and the tests assert
that band rather than taking whatever scores best. And the decision polarity
belongs to the modulation, since @6a's sign says whether the tone is above or
below the band centre: V.21 puts mark below it and Bell 103 above, so the two
decode with opposite sign. Getting that wrong made V.21 look like a lock
failure while Bell 103 passed on an identical run.

Still open, and stated as such: 48 samples a bit is the scanned error minimum,
not a derivation, and it does not reconcile with the transmit shift register's
one bit per invocation. Neither the baud rate nor the callback rate is settled.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-06 03:14:13 +12:00
Cryan209andClaude Opus 5 b97d03b355 Withdraw the 300 baud claim, and record the loopback that does not close
Two corrections to the previous commit, both against myself.

The "exactly 300 baud" figure was this harness's, not the firmware's. It was
arithmetic on a number I chose - 7200/24 - presented as a property of the ROM.
The firmware has its own transmit bit clock and it disagrees: @50 is a shift
register that d978-d983 advances once per modulator invocation, reloading when
the marker bit falls out, so it presents one bit per call. Against the 7200 Hz
the carrier increments require, that is 7200 bps, not 300. How often this
datapump's callback actually runs is therefore unaccounted for, and no baud
figure here is the ROM's. The four frequency pairs are still exact and still
identify the modulation; only the bit rate is withdrawn. The renamed
harness_keying_rate field and a new test pin the shift register's real period.

And the loopback was attempted rather than left as an argument. Replaying
entry d7fc's own bring-up - d7b4, d7a4, d94e, d895, d879 - installs the
firmware's transmitter and receiver correctly, and with a RETE supplied at
program 0022 for the receiver's INTR 17 strobe the path runs 1152 samples with
each DXR fed back as the next DRR. It recovers nothing: DXR reads zero from
the second sample because the circular buffer advances differently once the
receiver is installed, and @6a never changes sign. The attempt is kept in
artifacts/fsk-01/ as the point the work stopped.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-06 02:57:07 +12:00
Cryan209andClaude Opus 5 fb377ecf6b Fix the C5x FIR opcodes, and run the firmware's own 300 bps FSK modulator
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>
2026-09-06 02:49:16 +12:00