Commit Graph
22 Commits
Author SHA1 Message Date
Cryan209andClaude Opus 5 04ac9689de Document the DSP load path, overlay map and mailbox protocol
Diffing the two board captures (7.3.14/DSP 3.0.13 against 7.4.16/DSP 3.1.2)
pins the supervisor's DSP loader, because the payload moved 0x29080 -> 0x29140
between them and every constant pointing at DSP code had to move with it.

Established:
- Segment 0x8000 maps linearly to physical 0x80000, i.e. file offset 0. This
  retracts the "does not map linearly" claim and the 64 KB RAM model built on
  it; 84% of far-call targets read as prologues at file == offset against a 41%
  noise floor, and the most-called are call/retf trampolines.
- The loader routines, the 9-entry overlay descriptor table, and the four-image
  overlay map: resident kernel plus three demand-loaded overlays that exactly
  partition the DSP payload in both images.
- Two transfer engines: out 0x18 strobes for cold boot, out 0x1e for runtime
  swaps.
- The command queue consumer and the 0x58-0x5e mailbox. The 0xff00 word is a
  frame marker, consumed by the staging logic at [0x289] and never sent; it
  selects a two-word drainer that emits command and destination as a pair.
- The DSP receive side: no port reads in the kernel, mailbox read from MMR 0x57,
  and a per-build tblr/bacc dispatch table (0x8401 in 3.0.13, 0x83e9 in 3.1.2).

Also corrects the DSP word order to little-endian, the part to C5x rather than
C25, the x86/DSP boundary to 0x29080, and the unused-region fill to 0xFF, each
with the evidence inline. The overlay map supersedes the "automation cannot pin
the DSP base" block.

Open: what consumes a 0xff00 frame on the DSP side, and the interrupt vector
table at program 0x0000, which no loaded overlay supplies.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-05 02:29:43 +12:00
Cryan209 7a9d1b05e9 dsp work 2026-09-05 02:13:27 +12:00
Cryan209 483e974d3b firmware analysis 2026-09-05 02:02:12 +12:00
Cryan209 aaa645cc0a modem work 2026-09-05 01:41:54 +12:00
Cryan209 3c4c27454b Build a downloadable C52 ROM mapping probe 2026-09-04 22:39:25 +12:00
Cryan209 b013186a88 Add DSP mapping probe and ROM DTE startup handling 2026-09-04 22:35:40 +12:00
Cryan209 1c11116568 Define the C52 mask-ROM readout decision 2026-09-04 22:32:45 +12:00
Cryan209 c91df2f6de Close false BLDP coefficient-loader lead 2026-09-04 22:23:28 +12:00
Cryan209andClaude Opus 4.8 b7d3d4154f Recover the host-message accessor; it is installed, not mask ROM
Finding another route to the DSP's unrecovered ROM, the search turned up that
part of what was called mask ROM is not. The dispatcher's host-message
accessor at program 23f0 - which the receive path reaches with `calld 23f0`,
and which had been treated as an unrecovered internal-ROM entry point - is
installed by the datapump itself.

In the linear reset flow at 80a0 the datapump sets BMAR to 23f0 and block-loads
three words from image offset 80f5 into program 23f0..23f2. They are
1080 0880 ef00, which decodes as `lacc * ; lamm * ; ret` - the whole accessor,
recovered from the downloaded image.

So program 1000..7fff is not a monolithic mask ROM: at least this accessor is
resident program memory the datapump writes and then calls, and the downloaded
code does not call into ROM entry points. The datapump's filters also read
eleven addresses in 2100..2593 through `mac` that are below the load base and
absent from flash; whether those are installed the same way or genuinely
resident is left open, but they are not part of the inaccessible ROM either.

Also records, against the captured image, that no command-mode dispatch handler
reaches a program read below 8000 - the filter mac loop is call-only - so the
mailbox cannot read that region at idle regardless.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-09-04 22:15:46 +12:00
Cryan209andClaude Opus 5 781993e134 Characterise the CPU/DSP mailbox and the 60/62 window on hardware
A first host-to-DSP write attempt wrote the four data registers and observed
nothing. The supervisor's own mailbox interrupt at 0fda9 explains why, and the
DSP's dispatcher at 839b explains it better still.

The wire format was never the problem. What was missing is the commit: bit 0
of port 1c is the board's standing request, and the interrupt answers it by
writing the status back with that bit still set, clearing it first only on the
path that had nothing to send. An idle unit reads 1c as fd forever because the
supervisor in command mode never has traffic.

With the commit supplied, a tag is repeatable and predictable. Tag 07's
handler is three instructions and reports 8031; tag 62 reports 8069; the tags
that reach the bare ret at 8222 are a null control. Every prediction was fixed
from the disassembly before the runs and held in both directions, and tag 62
even returned its own saturation constant.

That also refutes the shape the emulator models. A mailbox tag is a command
index into a 121-entry jump table bounded at 7f, not a destination address, so
writing an arbitrary DSP data cell through it was never possible. Only 27
handlers store the host's word at all, each at one fixed address, and none of
them is an index either program reader uses. host_write() is kept as a way to
seed modelled state, with a comment saying it is not the board's protocol.

The 60/62 window's producer is now identified as the DSP: 84b7 is out *, 0060
followed by a status bit 2 that the supervisor's interrupt answers by calling
its chain vector. Acknowledging that bit is what pumps it, and pumping tag 46's
streamer returned sixteen words whose first four are DSP program memory,
matching the flash image at addresses predicted beforehand and reproducing
across two runs. So a readback channel exists and works end to end.

What is missing is a reader whose address the host can choose. Both known ones
are shut: 032a's readers compute an unmasked program address but both writers
clamp it below the six-entry jump table it indexes, and 03db's only writer
stores ae12's return, which is a six-way priority encoder and so cannot exceed
five whatever feeds it - tested on hardware by unmasking its one host-writable
AND term, ffb1, which left the index at zero.

The hardware also corrected a reading: tblr *+ post-increments the auxiliary
register, not the accumulator, so tag 46's paired table reads fetch one address
twice rather than consecutive words.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-04 22:08:16 +12:00
Cryan209andClaude Opus 5 42ed5f9ded Verify the e732 reader, and withdraw the report half
Driving the chain recorded last commit establishes half of it. Entering the
loop at e732 with page 7 selected and an index in 03e6 puts the fixture word
at e870 + index into 03d0, across the bank and unscaled, so the address is
genuinely the cell's to choose.

The send half does not compose, and the end-to-end claim is withdrawn. The
resident enqueue takes the tag and advances its write pointer twice, but the
second push carries zero: after the first call the data page is not what the
nearest preceding ldp predicts, so lacl @50 does not read 03d0. Stepping
shows page 7 entering 83c8 and page 3 leaving its lst.

Whether that is a property of 83c8 - sst and lst address page zero
regardless of the current page, so its callers may be required to enter with
some other page - or a failure of the modelled core to round trip a status
word, is not determined. The second would be an emulator defect corrupting
the page for every firmware path through this queue, so it is worth finding
either way. What is settled is that a preceding ldp is not evidence for the
page in effect after an intervening call, which is what the withdrawn claim
rested on.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-04 20:27:14 +12:00
Cryan209andClaude Opus 5 fee0350f37 Record a resident read-and-report chain for DSP program space
Checking the four table reads whose destination cell some other site sends,
three do not work: a484 is not an instruction but the a665 immediate of the
splk before it, which the opcode scan matched by accident; bc12 takes its
address from control flow rather than a cell; e7dc masks its index to three
bits. The fourth closes the loop.

At e732 the datapump reads program address e870 + index, unscaled, with the
index in a data cell and the result in another, and both sit at data page 7
in ordinary RAM - absolute 03e6 and 03d0. The site at b4f2, also at page 7,
sends 03d0 to the host under tag 8021 through the sixteen-word queue at 0bd0
that the supervisor drains at CPU ports 58-5e. So a program word can be
selected and reported entirely through resident code, with both ends
addressable and no injection or DSP reset anywhere.

Also record the enqueue routine at 83c8 that fills that queue, the negative
that none of its 85 callers feeds it from the 8151 reader's cells, and a
second reader at 84d3 whose index is unscaled and whose cell at absolute
03db is in RAM rather than the memory-mapped register range - which answers
the data-page question for that site.

Reachability is the open half: the e732 loop rewrites its own index each
iteration and runs when the datapump reaches it, and the read and the send
are in different functions.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-04 20:21:20 +12:00
Cryan209andClaude Opus 5 0720f52a5b Document the datapump table reader and refute its output ports
Record the route the emulator test exercises: the reader at program word
8151, why an index reaches every program address, the one caller that takes
its index from a data cell, and the data-page constraint that a page-0 @5b
lands in the memory-mapped register range rather than RAM.

Also record a negative. The reader sends to DSP ports 68, 69, 6b and 6c, and
the CPU has an unexplained block of stable per-unit registers at 0x64-0x7e;
the numbers invited reading one as the other. A read-only sample of the
20.16 MHz unit shows port 0x68 returning 8d on twelve consecutive reads and
the whole block identical across eight rounds and identical to the earlier
sweep. Stale reader output does not explain the values either: no five
consecutive payload words match them in low or high bytes. And two of the
reader's four ports are odd, where the physical sweep established the CPU
bank decodes even addresses only, so a port-for-port mapping cannot hold.

That refutes where the words emerge, not the reader. The mailbox already
proves the ASIC bridges DSP I/O writes into CPU-readable registers at
non-matching numbers, which leaves the sender's queue at data 0bd0 as the
candidate worth following.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-04 20:17:27 +12:00
Cryan209andClaude Opus 5 e423b26913 Map the CPU port-space output latches from hardware
The ATGLK2 monitor's O selector writes I/O ports, so the three output
latches at 0x10, 0x12 and 0x14 are drivable from the AT interface. Record
what they do, established by strobing single bits on the 20.16 MHz unit
and watching the front panel.

Port 0x14 is the panel, active low: CD, CS, AA, ARQ, HS and SYN, with one
driven bit that shows nothing. Port 0x12 carries MR and a bit that reaches
the analog path audibly. Port 0x10 must not be written at all: its bits 3,
5 and 6 are the serial EEPROM's data, chip select and clock, driven by
direct out instructions that bypass the latch helpers, so a scan of helper
call sites does not see them.

Two things the mechanism forces on any user of O. The latches are
write-only and shadowed at 0x30e..0x311, so a single-bit poke has to be
composed from the shadow, and O is a bare out rather than a
read-modify-write. It also does not update the shadow, so the firmware
will not restore a bit left flipped.

Probing port 0x14 bit 2, the one bit on that latch with no located driver,
moved none of the 256 ports and left the bank byte-identical afterwards.
That is a null result about feedback, not about function: a bit routed to
a DSP pin or a lamp would not appear in the peripheral bank either.

This is the first write of any kind sent to a physical unit here, which
supersedes the standing claim that only reads had been issued.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-04 19:48:27 +12:00
Cryan209andClaude Opus 5 33c7b2f378 Pin the DSP load base and correct the DX-form claim
The supervisor does write to the DSP, and the DSP's program is not resident in
it: flash holds the datapump and the supervisor downloads it over the port bank
at every boot. That is how a feature like V.90 shipped as a firmware update.

Document the write path from the call site at 07507. e47b sets ES=a908
(flash 0x29080), sends four words through 40..4e and four through 50..5e with
strobes on 0x18, then submits the e447 checksum and polls for acceptance. What
the port map called bootstrap windows A and B is one 8-word write channel to the
DSP, handshaked on 0x18.

The call site pins the load base, which courier_firmware_analysis.md recorded as
an open hypothesis. Source flash 0x29080, length 0xd87c bytes (27,710 words),
entry requested at DSP word 0x8000, giving

    flash_offset = 0x29080 + 2 * (dsp_word - 0x8000)

Two independent checks agree: the DSP reset code already sits at 0x29080, and
the resident sender at words 83d6..83ff maps into the separately identified
[0x29080,0x29880) startup region. The older 0x29800 + 2*prog hypothesis is
discarded.

This narrows the dump goal. The datapump is already in hand as flash
0x29080..0x368fc; only the DSP's internal boot ROM below word 0x8000 remains
unrecovered.

Also correct an error. The claim that the DX form is never used for board ports
was wrong: the consensus boundary test rejects genuine instructions preceded by
short or irregular code, and discarded `mov dx, 0x40` at 0e3ad in the downloader
itself. Restore the four-vote threshold, record that absence from the scan is
not evidence of absence, and enumerate what the DX form actually reaches
(0x16, 0x18, 0x1c, 0x40). None lies in 0x64-0x7e, so that conclusion stands, but
it now rests on the raw-byte refutations and is qualified: DX is also loaded from
memory at 0e515, which static inspection cannot bound.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-04 00:37:03 +12:00
Cryan209andClaude Opus 5 cd66924125 Track capture artifacts as primary evidence
The hardware captures and transcripts are the primary record behind the
analysis in docs/dsp-rom-probe.md, and referencing them by path only worked in
the working tree that produced them. Track them.

Replace the blanket artifacts/ ignore with one that excludes just the per-page
intermediates: responses/ holds one raw serial reply per page request and
blocks/ holds the verified 256-byte pages, together ~32 MB across ~8,200 files,
all reconstructible from the assembled images and pages.jsonl.

What is now tracked is 57 files and 1.7 MB: the 512 KiB flash readout, the four
live RAM pass images and settings caches, every manifest, audit and pages.jsonl,
the ATGLK2 hardware transcripts from both units, the ATGLK2B port sweeps and
repeat-stability record, the static IN/OUT scan output, and the offline probe
and transport builds.

The tradeoff is that audit_capture.py cannot run from a fresh clone, since it
re-parses responses/ against blocks/. Record that in artifacts/README.md and
next to the audit command in the doc; the assembled images stay independently
verifiable through pages.jsonl and the manifest hashes.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-04 00:21:11 +12:00
Cryan209andClaude Opus 5 3ff494ff45 Map the Courier CPU I/O port space
The DSP dump path runs entirely through I/O space, which the ATG monitor's
memory dumps cannot reach, so document that space and the selectors that read
it.

Record all seven LK2 selectors recovered from the captured handler at 25ba9.
Only "=" and "R" were documented; "I", "O" and "B" reach I/O ports, and B's
routine at 26eec begins exactly at the end of the byte/word reader range that
the earlier reference comparison covered, which is why it was missed. B dumps
256 consecutive ports and takes a full 16-bit address.

Add tools/io_port_scan.py, which enumerates IN/OUT sites by consensus decoding
over the x86 code regions, since a linear sweep desynchronizes inside the
big-endian datapump. Ports loaded into DX are resolved only when an immediate
mov dx reaches the site without intervening control flow.

Physical ATGLK2B sweeps from two idle units establish the map's shape. An
unmapped read returns the address byte for its lane, so a sweep is a direct
decoder probe. Both units drive exactly the same 63 ports, 0x02-0x7e even, with
everything to 0x2ff unmapped.

Two claims are withdrawn. The bootstrap windows do not read back as the four
words the e47b downloader writes: the second unit reads a 00/ff alternation
there, and the units disagree on every port in both windows, so reads return
status rather than latch contents. The write-side structure is unaffected.

Nothing reads 0x64-0x7e. No validated mov dx with a board-range immediate exists
in the image, so the unresolved DX sites cannot address the bank and the
immediate-form scan is complete for it. Every apparent access above 0x62 in x86
code is a decoding artifact, each confirmed against its raw bytes; the dominant
class is a far pointer whose offset low byte is e4-e7.

A repeat experiment refutes the streaming reading of that block: five identical
single reads and six byte-identical sweeps. These are stable registers, not a
FIFO, which removes the block as a bulk inbound path for a DSP readback.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-04 00:17:39 +12:00
Cryan209 ac3d3234e5 courier modem work 2026-09-03 23:14:13 +12:00
Cryan209 7f2e18fbd6 Add SV25 recovery-run harness documentation 2026-09-03 22:58:00 +12:00
Cryan209 9b95dd2136 courier emu work 2026-09-01 10:48:05 +12:00
Cryan209 8623bea0bc Integrate C52 call overlay with codec line operation 2026-08-24 23:39:48 +12:00
Cryan209andClaude Opus 5 672ea433b1 Carry the datasheets the DAA model is derived from
courier_emu/codec.py and the analysis both cite these by filename: the Si3038
datasheet for the register map, AN16 for the ASIC-master topology the Courier
uses, and AN19 for the layout. Without them in the tree those citations do not
resolve for anyone reading the derivation. 3.2 MB for the three.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-05 22:05:49 +12:00