ASIC pin 75 goes to flash pin 13, GND - not to flash pin 12, CE#. The
flash's chip select is on CPU pin 61, UCS.
Three lines agree:
* A 2805 ISA board, same 1-016-905 ASIC and same PA28F400, meters 75 to
flash 13, flash 13 to ground, and flash 12 to CPU 61. The rest of that
edge transfers exactly - 70 to flash 11 and RAM 10, 73 to flash 3, 74
to flash 34, 76 to flash 35. Four agreeing and one not is a slip.
* The reset stub programs UCS_START (0xffa4) to 0x8000, a window of
0x80000-0xffc00: 512 KiB, the flash exactly. Both images do it. That is
pointless unless UCS selects the flash.
* asic-pinout.md contradicted itself, recording both LCS and UCS on the
SRAM pair's common CE# net. UCS on the flash closes that open probe and
leaves LCS on the SRAM, where its 0x0-0x20000 window says it belongs.
Second off-by-one in this region; the "74 is pin 3 or pin 34" conflict
was the first.
The paging inference goes with it. Four address lines in and three out is
what a flat map needs: UCS decodes A19, so inside the window A19 is
constant and the flash never needs it, while the ASIC emits system
A16-A18 as the part's A15-A17. That is a pass-through with A19 consumed
by the decode, not a fold. Paging is not disproven - the reason for
believing in it is gone, and the harness's flat 512 KiB image already
matched both boards.
What survives: the ASIC is the board's address latch, low byte for both
memories and the flash's top three lines. The select is not its.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Tools first: tools/x86_disasm.py wraps capstone over CourierRom.at so an
80186 routine can be read at the same physical addresses the traces
print, and tools/executed_addresses.py dumps the whole track_executed set
and diffs two runs as contiguous spans. hot_addresses is a top-20 profile
and cannot say whether a branch ran at all; the diff can, and it is what
found everything below. AT&T0 executed 2,885 addresses, AT&T1 3,745, and
&T1 against &T8 differs by 10.
The &T dispatch is a table of far-call thunks at 875d8, four bytes apart.
Slot 0 -> 875f8 and slot 1 -> 876b1 are confirmed executed by AT&T0 and
AT&T1, slot 7 -> 87738 by AT&T8. The middle slots are not named here
because nothing ran them.
[0x685] is the test-mode flag byte. Every access to it in the image - 51
sites - agrees on the bits:
0x01 analogue loopback 876c5 (&T1), 87752 (&T8)
0x02 a second loopback 876eb
0x04 a third 8770e, 8825c
0x08 self test 87752 as |9, 8772c as |0c
0x40 already-online form 876bd, 8774b
0x80 test armed 87764
0x07 any loopback, a gate 833bb, 88236, a4fea, a6abd
So the modes differ by bit, and the test pattern is bit 3, not bit 0.
[0x686] is the self-test error counter: &T8 zeroes it, and &T0's handler
does `test [0x685],8 / jz / call 8776f`, which reads [0x686] and prints
it. &T1 sets bit 0 alone - no internal pattern and no counter.
The part that corrects earlier work here: the gate at 8b863 that
datapump-dispatch-gate.md documents returns carry *clear* under &T1.
8bbc2, the carry-clear target, is in the &T1-only set and 8bbaa's carry
branch is not taken. The datapump comes in through 8b84f instead:
8bbc2 call 8b84f
8bbc5 jne 8bbca taken
8b84f test [0xa96],2 jnz ret
8b856 test [0x5a5],1 jnz ret
8b85d test [0x685],1 the loopback bit leaves ZF clear
8b85d is in the &T1-only set. The test flag is what routes to 8bbca and
the 344-address block at 8bbe9..8bd40 that selects the datapump, loads
overlay 6 and publishes 0010:5001. &T0 confirms the shape by absence: it
runs slot 0 and 875fb and never reaches 87438, 8b85d or 8bbc2.
Two sites ran under &T1 that gate against the test rather than for it,
and are where to look next for why the DTE data path never opens:
a4d4c test [0x685],0x80 / and [0x685],0x7f / stc / ret
the armed bit is consumed and cleared on first pass, one shot
a6abd test [0x685],7 / jnz -> stc; ret
refuses the jump through cs:[bx+0x1dbe] while any loopback is up
No behaviour changes in this commit; both tools are smoke-tested against
the runs above and reproduce them.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Idle on the same 7.4.16 end, ATG still answers ERROR, so the earlier
commit's conclusion - that an active call was what refused it - is wrong.
Bare ATG is refused too: these two V.Everything supervisors have no G
command at all, and the eight-hex form belongs to the 403 board the
original measurement used. The mailbox holding registers do read live
state: 0058 went 20 to 44 and 005C 0E to 00 when the call dropped.
The tool caused the second finding. These units autobaud, so walking a
rate list left one end at 9600, and an unconditional +++ makes a modem
already in command mode swallow the line after it. It now sends a bare CR
first, escapes only when that draws nothing, asserts DTR and RTS, and can
drop RTS/CTS flow control - both ends hold CTS low while off hook, which
stalls every flow-controlled write.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
The two Couriers are wired back to back and connected; read their own
account of the link rather than inferring it. The tool escapes with +++,
runs the ATI query set, and hands the modem back to data mode with ATO,
so the capture costs the link nothing.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
AC03 pin 14 is MCLK, so the ASIC's one line to the codec is its master clock -
the guess made from "a single line cannot be an interface" is confirmed, and
the ASIC now generates both timebases in the audio path. MCLK is what the
conversion rate divides from, and 10.08 MHz - the oscillator over four -
divides to exactly 8 kHz, 3200 Hz and 2400 Hz, so that is the value to expect
on a scope.
The three DSP links are named: DOUT, DIN and FS, each landing one pin from its
TDM counterpart on the C5x, which checks all three at once.
And MON OUT reverses the speaker reasoning. It is the output the part provides
for monitoring the analog input, which is exactly what call progress is - but
it is high-impedance, so something amplifies it, and it has no mute register,
so the DSP cannot gate it in software. If the speaker is there the gate is
hardware, and since the port sweep did not find it on the CPU it should be an
ASIC pin. Codec pins 1, 3 and 4 decide between that and the DAC output path.
The AC01 terminal table is carried in the repo now, as Table 7 is.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
The pin tables answer "what is on ASIC pin N". They cannot answer "what talks
to what", because each of them only sees one package, and that question is now
the more useful one - the reset chain, the flash's memory controller, the
codec being the DSP's and not the ASIC's are all statements about the graph
rather than about any pin.
Same terms as the pinout tool: the map is data in tools/draw_board_map.py,
drawn rather than parsed from the prose, and every net on it is a continuity
reading.
Also records that TXD1 is not connected, which kills the serial-selector
reading of the unpopulated switch footprint. A UART with no transmit pin is
not a port, so there is no second channel for a switch to select between - and
it finishes the SD group, whose remaining pin was RXD1 on that same dead
channel.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
ASIC 29 goes to header pin 12. That settles an argument this file made from
inference: a header with twelve positions is a DAA module interface, not a
line connection, because nothing about tip and ring needs twelve pins.
It also spreads the telco side across two edges - 37 and 38 on the right, 29
and the two optocouplers here - so the right edge's "telco at the bottom"
description was a description of what had been read, not of the board. Five
line-side pins now, which leaves the old 37/38 pairing with no arithmetic
behind it at all.
And it costs last commit's competing explanation its fit: the bottom edge has
three free pins now, not the four that matched the unpopulated switch
footprint so neatly.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
U18's 1Y goes to CPU RXD0 and 2Y to CPU CTS0. So the DTE's data arrives on
serial channel 0 and uart.py's EbSerial has been on the right channel all
along. The SD group reading, which put it on RXD1, has now had two of its
three pins fail; it is retired rather than retaken, and where the SD lamp is
driven from is unknown again. CTS0 being a real pin fed from the DTE's RTS
gives uart.py's fabricated clear_to_send a known-correct target.
Receive reaches the CPU directly while transmit goes out through the ASIC -
asymmetric, and a part placed on one direction only is there to do something
to it.
The codec's serial interface goes straight to the DSP (its 10, 11, 12 to DSP
106, 43, 104, among the C5x serial-port pins). That contradicts the claim that
the ASIC fronts the codec and hides the AC01/AC03 difference from the DSP - it
cannot, they talk directly. The ASIC has one line to it, AC03 pin 14 on ASIC
112, which is a control or a clock rather than an interface; a master clock
would fit the part that already makes the DSP's.
Both SRAMs have CE# common and OE# common, so the pair is one 16-bit bank,
confirmed at the pins. Which select drives it is now a conflict between two
adjacent CPU pins with one reading each.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
CPU 68 (RESIN) goes through R1, a 1k marked 102, to ASIC pin 52. That was
proposed as the only candidate left, which is weaker reasoning than a reading;
it is now a reading, and it landed in the predicted group of unread right-edge
pins.
So the chain is rails -> ASIC -> CPU -> DSP, each part held until the part it
depends on is ready. The ASIC being first out of reset is required rather than
incidental: it holds the flash's CE#, so it decides whether the CPU's first
instruction fetch can succeed at all. The two findings explain each other.
Two things the resistor raises. 1k in series makes the node overridable - a
button, header or pull-down at the CPU end wins without contention - so what
else is on CPU 68 decides whether this is damping or a second reset path. And
nothing establishes what level ASIC 52 takes while the ASIC is itself in
reset; if it floats high the CPU is released immediately and the sequencing
describes the steady state rather than power-on.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
63 is CPU pin 29, A16 - not CPU 28, AD15. That withdraws the single exception
to the width-converter claim, which is clean again, and it supplies the input
the flash's address fold was missing. The prediction that A16 would turn up
was right; the guess that it would be on pin 72 was wrong. CPU A16-A19 land on
63, 62, 59, 58 - four consecutive CPU pins stepping over the corner supplies,
a third check on the numbering. Four in, three out, no shift.
UCS goes to a RAM's pin 20, so neither of the CPU's memory selects is on the
flash. At reset the 186 fetches from FFFF0 with UCS active, which on this
board can only work if the ASIC is already asserting the flash's CE# - so the
ASIC must come up defined before the first instruction fetch.
ADM707 pin 6 is not connected, so the supervisor resets the ASIC and nothing
else. The ASIC is the only candidate left for the CPU's reset, and the boot
order falls out as a chain: rails release the ASIC, the ASIC releases the CPU,
the CPU releases the DSP. The confirming reading is CPU RES# traced to an ASIC
pin, and the right edge's twelve unread pins are where it would be.
DSP RS is on CPU pin 58 and reaches the AC03, confirming both the port-pin
arithmetic and the shared codec reset from the other end.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Flash pin 12 is CE#, so the ASIC selects the boot device and the UCS
prediction in the chip-select table is wrong. Pin 35 is A15, system A16, so
the ASIC drives the flash's bottom eight address lines, its top three, and its
chip select; the '573 supplies the middle. Between them the flash's whole
address bus is accounted for and only one of them also decides when the device
is selected.
Top address lines in are CPU A17-A19 and out are system A16-A18 - three and
three but offset by one, which is the wrong shape. Pin 72, the last unread pin
on that edge and sitting beside the other four flash pins, is predicted to be
CPU A16; that makes it four in and three out, one bit consumed by the
decision. If it is not, the offset is real and the firmware's view of its own
address space needs re-deriving.
Either way the shape is paging, and courier_emu hands the supervisor a flat
512 KiB image with no register behind it.
Also adds a reset-tree table answering what resets what: the ADM707 resets the
ASIC and presumably the CPU, and the DSP and codec are reset only by the CPU
in software - so the boot order is wiring, not choice, and the ASIC can halt
the DSP by its clock without asserting any reset.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
73 goes to flash pin 3 and 74 to flash pin 34. Both readings were right; they
had been written against the same ASIC pin. So the ASIC drives both of the
flash's top address lines, and with CPU A17-A19 arriving on 62/59/58 that is
three address lines in and two out - a fold, not a buffer, and the shift the
remapping section could not decide is decided by the arithmetic.
75 and 76 go to flash pins 12 and 35, unnamed here. If either is CE# the UCS
prediction is wrong and the ASIC selects the flash; if either is OE#/WE# the
part is in the boot device's control path. Four top-edge pins now go to the
flash.
The ADM707 is a power-good reset only, with no WDI source to find. That
retires the mechanism ram-probe-delivery.md used for the ~1.5 s bound on probe
runs. The observations and the reboot path stand; the trigger does not, and a
software failsafe is the leading candidate. The 1.6 s datasheet match is why
nobody looked further.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
113 is DSP TOUT, so the clock relationship runs both ways: the ASIC clocks
the DSP and the DSP's timer reports back. That is a periodic edge arriving at
the part that makes the CPU's interrupts, and machine.py has been standing in
for exactly such an edge - "the board's frame edge", with nothing on the CPU
side to produce it. Recorded as a candidate, not a conclusion, because INT0
reads as not connected; TOUT's period would settle it and wants a scope, not
a meter.
111 is ADM707 pin 7, the active-high reset. It does not identify the WDI
source that ram-probe-delivery.md gave up on, but it puts the ASIC in the
reset tree, which makes its latches a live candidate rather than a guess -
and WDI is pin 8, next door. Every probe run on this board ends in that
watchdog, and the harness models none of it.
110 is GND and 109's DSP pin number is filled in. The left edge is down to
two unread pins.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
The prediction from one pin holds. Pin 48 is on 4Y, a receiver output, which
is the direction an ASIC input needs, and the marking is the 1489 half of the
1488/1489 pair this file guessed at when it first found the transceiver. The
DTE interface is complete as parts: two 75188s out, one 1489A in, the ASIC on
both sides.
Its other three outputs are the next reading, and one of them decides the
serial-channel question - whichever CPU pin the DTE's TXD arrives at. That is
a better instrument than re-probing the SD group, which is the reading that
went wrong to begin with.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
45-51 fill the gap: three of U22's driver inputs, U18 pin 11, and the CPU's
TXD0. U22 pin 2 is the RD net, so RD is on the ASIC - which is what the CD
correction predicted last time, in those words. The not-on-the-ASIC list is
down to SD and OH, and the pattern behind both failures is now named: a trace
that stops at a part's input pin has found one end of a net, not the whole.
TXD0 arriving at the ASIC unsettles which UART channel the DTE runs on. The
channel-1 conclusion rests on CPU pin 7 from the SD group reading, and that
group also put SD on CPU 63 - which pin 47 now confirms as INT1 from both
ends. With one member known wrong the group wants retaking, and if pin 7 goes
with it the DTE is on channel 0, which is what uart.py models.
U18 appears nowhere else in the repository. Pin 11 on a 75189 is 4Y, a
receiver output, which is the direction an ASIC input needs and the part this
file has been looking for. Read its marking.
Pin 58 is CPU A19, so A17/A18/A19 land on 62/59/58 - consecutive but for the
corner supplies, which checks the numbering and the pad ring at once.
Pin 15 changes when the button is pressed, so it is Talk/Data after all and
the ground reading was the artifact. Second pin this board has disguised as a
ground; the rule is sharpened in place.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Pins 19 and 22 go to H11B2 optocouplers U14 and U16, pin 5 of each. That is
the isolation barrier the right-edge section predicted without being able to
name it, and pin 5 is on the transistor side, so the ASIC receives both. Two
isolated inputs from the line is the shape of ring detect plus loop-current
sense, and ring sense already has a port. It weakens the 37/38 pairing: there
are four line-side pins now, and an opto is a better home for ring sense than
a header pin.
Flipping switch 3 settles pin 118: it reads grounded closed and open open, so
it is the switch. The predicted failure mode was a grounded switch common
making ground pins look like switches - it ran the other way. Switch 3 was
closed when the earlier pass was taken, so 118 read to ground and was written
down as a supply. That is the more dangerous direction, because a supply
reading on a switch pin agrees with the pad-ring convention and gets believed,
and it sat in the left-edge table unchallenged.
The bank is complete: switch 1 on CPU 80, 2 and 4-10 on the bottom edge, 3 on
118. The commons are grounded, so continuity to a switch terminal proves
nothing until the switch is flipped - which is why pin 15 is ground and
Talk/Data goes back to unlocated. 24 is ground too.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Pins 9, 11 and 12 land on U23's 2A, 3B and 1A. Pin 9 is the other end of the
net CD was traced on, so CD is an ASIC output and the earlier "not on the
ASIC" was a statement about which end the probe stopped at. RD is now alone
in that list and deserves the same suspicion.
Pin 100 is GND, which is what the bus shape predicted - two descending data
runs with one pin between them. 31 and 91 are GND, so all eight corner pins
are read and all eight are supplies; the convention this file leans on for
its inferred runs is now checked at every corner rather than assumed at three.
Pin 15 is reported as Talk/Data.
DIP switch 3 reads to pin 118, which is already a supply. Recorded with the
conflict intact and the likely explanation beside it: a grounded common on
the switch bank would make every ground pin read through a closed contact.
Two tests separate that from real wiring, and until one of them is run,
switch 3's pin is unestablished.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Pins 2-8 and 20 carry switches 2, 5, 4, 10, 9, 8, 7 and 6, interleaved with
the lamps and colliding with none of them. Switch 3 is the one still to find;
switch 1 stays on CPU 80, so nine of the bank's ten positions have a home.
That retires the scanned matrix this file had the switches on. Four drive
lines exist to save pins and this part spent the pins instead. The matrix is
still real, but panel.py names it id-strap-* and it reads the board-ID straps
- a separate thing the file had folded into the DIP bank because both were
unread. The arithmetic closes once they are counted apart, and the meter
advice loses its excuse: individually wired pins should probe cleanly, and if
they do not it is the bank's common terminal that wants tracing.
Pins 1 and 30 are VCC, so all four corners now sit between supply pins - the
pad-ring convention holding, and a quiet check on the numbering.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
CPU pin 31 is A18 on the EB QFP, so the ASIC takes system A17 on pin 62
and A18 on pin 59 and drives one high flash address line out on 74.
Two in and one out is the argument that settles buffering versus
remapping. A buffer takes a bit in and puts the same bit out and has no
use for a second; a part that takes two and emits one is deciding, with
one line passed or substituted and the other the condition. The
buffering reading this file has carried since pin 74 appeared can be set
aside.
Which line is which still hangs on the unresolved flash pin, but the
probe is now a negative result and does not need pin 74 re-read: if the
ASIC is in series on A18, flash pin 3 must not connect to CPU pin 31.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
CPU pin 59 is P1.0/GCS0 on the EB QFP - a generic chip select, active
whenever a bus cycle falls inside limits the user programs. The file had
pin 54 as the prime suspect for the ASIC's select on position alone, and
it is.
The answer is better than the question. This file expected a decode in
the ASIC's metal and called the window's top at 0x7f "a decode somebody
chose". Nobody chose it in hardware: GCS0's limits live at PCB offsets
80H and 82H, which is 0xff80 and 0xff82 here, so the window is two
register writes the supervisor makes at boot. Nothing in courier_emu
reads them, and they would confirm 0x00-0x7f from the CPU side rather
than from the port sweep alone.
It also takes a job off the ASIC. AD15 on pin 63 was read as possibly
the start of a comparator for the part's own window; the part does not
decode its own window. AD15 more likely belongs with A17 and the flash
remap, which is the only address range this part has business with.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
37 and 38 go to the phone-line header, pins 5 and 6. The CPU control
group is at locals 4-14 and these are at 23 and 24, so that edge is two
groups with eight unread pins between them rather than the one group it
was recorded as.
First pins on this package to reach the line interface, and two line
signals were already waiting for them in the ASIC's ports with no
physical evidence: ring sense on 0x14 bit 1, which the cadence machine
in daa-line-interface-2016mhz.md polls from a 5 ms ticker, and the hook
relay on 0x10 bit 0. An input and an output, matching two pins - but
which is which is not established and the pairing itself is a guess.
The header is unlikely to be bare tip and ring; a gate array cannot sit
on a line. It is far likelier a DAA module interface at logic level, and
that module is outside the photograph board-parts.md was compiled from -
the same kind of gap as the unidentified EIA-232 receiver.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Pin 119 is DSP pin 96, X2/CLKIN, not the 97 first read - so the DSP's
clock comes out of this part. The 40.320 MHz can feeds the CPU; the DSP
gets whatever the ASIC makes of it. Nothing in this repository has
considered that the DSP's machine cycle might not be a board constant,
and the timebase note and every DSP-side analysis assume it is. A fixed
divide is still the likeliest thing, but it was assumed rather than
known, and the rate is now a property of a part with registers in it.
Only a scope at pin 96 answers it.
115 is DSP R/W and 116 is DSP STRB. With IS on 114 and the sixteen data
lines, the ASIC holds the DSP's complete external bus control group -
space select, strobe and direction. That answers what the mailbox
section left standing: the part can tell a read from a write, so the
polling loop the READY finding requires has a physical read path.
118 is a supply, decoupled against the DSP's VSSC/VDDI.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
SPRU056D Table A-4 puts X1 at DSP pin 97, with X2/CLKIN next door at 96,
and X1 only carries anything when a crystal is fitted across the two.
The board has a can oscillator, so a wire from X1 to the ASIC is a
circuit that should not exist - which makes the adjacent pin 96 the
cheaper explanation, and that would mean the ASIC drives the DSP's
clock.
Recorded as read, with the three readings that fit and the measurement
that separates them: CLKMD1 on DSP pin 71 and CLKMD2 on pin 103 say
whether the internal oscillator is enabled at all. 0/0 means no crystal,
X1 is dead, and the reading has to be pin 96.
It matters beyond a pin. The DSP-side analysis has taken the machine
cycle as a board constant; if the ASIC is in the clock path it can gate
or divide it, and the constant becomes this part's to set.
120 is GND - a third corner supply, the convention holding everywhere it
has been checked.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Pin 64 on RAM pin 4 lands exactly where the run predicted: 71 down to 64
is system A0-A7, A0 to the byte-lane gate and A1-A7 to the memories as
their A0-A6. Eight consecutive pins for the eight bits latched off
AD0-AD7, five of them inferred between measured ends. The reading called
RAM pin 4 A8; that pin is A6 on the JEDEC pinout, which is system A7,
which is what the run wanted - the pin number fits and the label is the
shift applied twice.
Pin 62 is CPU A17, a high address line going in. Pin 74 drives a high
flash address line out. A part with an address bit on each side is not
buffering, so the remapping reading has both ends now, and the flash pin
3 / pin 34 conflict decides something larger than which bit: whether
there is a shift.
Pin 63 is AD15, which the width-converter section said appeared nowhere
on the part. Seven of the high byte are still absent so the conclusion
holds, but it was written from an unread edge and is qualified in place.
One high AD line is not a data path; with A17 and the low byte it is the
start of an address comparator.
61 VCC and 60 GND are the top-right corner pair. Corner supplies still
cannot settle the numbering direction, but both ends of the top edge
being known confirms the 30-a-side count from a second place.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
The picture has been redrawn by hand each time a reading lands, and got
out of step once already - a patch script greyed pin 71 back out after
setting it. tools/draw_asic_pinout.py holds the map as data and emits
docs/asic-pinout.svg, so a correction is one edit and one run.
The map is data in the tool rather than parsed from the document,
because the document carries the reasoning and the caveats and its table
is only part of what it says. The two have to be edited together, which
the document now states where it embeds the picture.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
The +1 was applied to all three top-edge absolute readings on the
assumption the miscount covered the session. It covered one reading. 74
stands for the flash address pin; 71 and 70 go back as given.
Flash DQ11 on CPU AD11 closes the data side: flash pin 22 to CPU pin 20,
a data line straight onto the multiplexed bus with nothing in between.
Every finding so far had been about address, and none of them said how
data reaches the memories - it does not go anywhere, the parts hang
directly on AD0-AD15 and separate address from data with the strobes.
Which also bounds the ASIC: it has AD0-AD7 as an input for latching
while the memories have all sixteen as data, so its own 8-bit I/O window
shares the bus with the memory system rather than fronting it.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
A B channel carries 8000 octets a second of G.711 and RTP's PCMU payload is
8000 octets a second of G.711, so --bri-sip puts a SIP call at the far end of
the bearer with nothing in between: no resampling, both sides being 8 kHz, and
no companding conversion.
The second one earns its place. SipSession's linear path decodes each codeword
and re-encodes it, which is identity for 255 of the 256 codewords and not for
7f. One in 256 is inaudible in speech and a defect here - V.90 and x2 are built
on exact codewords, the digital end of the call places them on the wire itself,
and this board is that end. send_pcmu/receive_pcmu sit beside send_audio and
the analogue path is untouched.
BearerSipLine satisfies the same start/stop/exchange contract V120Link does,
so BriNetwork carries either without knowing which. It does not pretend to
solve pacing: the emulator runs on an instruction budget and RTP on a clock,
so it returns as many octets as it was handed, fills the rest with mu-law
silence, and counts every octet of the fill.
Run end to end against tools/sip_answer_sink.py, the modem's ANSam arrives as
94,080 octets of RTP at 2100 Hz - the B channel's own octets, unchanged.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
The two sealers were the same check. imodem_config.crc16 stores a reflected
CRC-16-CCITT at 0xffe; the loader's validator at c53fd runs its own pass over
the whole page and wants the residue 0xf0b8. Sealing with either satisfies the
other, trailer byte for trailer byte, so the tool now uses the module's rather
than carrying a second implementation.
That also joins the two records up: one 0x1000-byte page carries both the
capability bytes at offsets 0..4 and the ISDN settings block at 0x1b0, which is
why d2c6 + 0x1b0 lands on the d476 the config-sector page already found.
And records what is missing, in blocking order: a real configuration record,
which we can seal but not fill; layer 2, which never starts - the D channel
reports frames_transmitted 0 in every configuration tried, including L1 at F7
with a SPID set, so the modem never asks for a TEI; the network side of Q.921,
which cannot be specified until it does; and the AT epilogue routing, which is
plausibly a symptom of the first two rather than its own fault. Settings set
over the AT interface do not survive ATZ, so they cannot bootstrap the record.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
[d2c5] has one computed write, at a449b, inside a routine that unpacks a block
of capability bytes at d2c6..d2ca: [d2c9] becomes [d2c5] unless [d2c6] bit 2
says the field is absent. And d2c6 onwards is not computed - it is a 4 KiB
record copied out of flash. The loader at c532b walks four 0x1000-byte pages
from segment f800, validates each at c53fd with a CRC-16 seeded ffff whose
residue must be f0b8, prefers the highest version word at 0xffc, and copies the
winner verbatim to 2600:d2c6. When none validates, c5312 fills that 4 KiB with
ff instead - which is what happens here.
So the chain is: no record -> shadow blanked to ff -> d2c6 bit 2 set -> d2c5
stays 0 -> c83d0 gated off so [e770] bit 2 is never set -> adc63 falls through
to the call-termination epilogue -> cause 0 -> result code 3 for every command.
tools/imodem_capability_record.py builds a record and the firmware accepts it:
it validates, wins on version, stops the blank path running, and lands its
bytes with d2c9 copied on to d2c5. That is what verifies the CRC transcription
and the layout, and the test checks it against the firmware rather than against
our own arithmetic.
The field values are not recovered and are not guessed at. Setting d2c9 bit 0
leaves the firmware masking IRQ3 and silent, and an all-zero record silences it
too, so those bytes mean something specific. Nothing in this repository holds a
page the loader accepts.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Vector 0x2e is slave IRQ14, and the routine behind it reads the Am79C30's
IR at 0300 and dispatches line-state, transmit, receive and error paths off
its bits. That names the three ports left unaccounted for -- 0302, 0303 and
0307 are DSR1, DER and DSR2, with 0304 the D-channel byte -- and settles the
part a second time over.
So the model gains the direct registers: an I.430 F-state reported through
LSR in the biased encoding the firmware decodes at 70eb3, a receive path that
hands frames over byte by byte with their boundaries and lengths intact, and
a transmit path that closes a frame when DTCR is written and counts a length
that disagrees with the bytes pushed.
Layer 1 will not take a shortcut: the firmware's state machine at 6296f
dispatches on the state it is already in, so an interface handed F7 out of F1
drops the event. Walked through F2 and F6 it reaches F7, and the firmware's
own ATI12 changes from Physical Interface: Inactive to Active.
Layer 2 stays down, and not for want of a D channel -- every ISDN setting
reads back invalid or empty, which is what an unmodelled settings store looks
like on an update payload. That is where this stops.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
The NO CARRIER is not a mis-indexed result table: ATI2 answers a plain OK,
so index 0 is reachable and the firmware asks for index 3 on purpose. The
chain, with every step named by the firmware's own text:
a8067 the go-idle epilogue answers OK only when the recorded
disconnect cause [d08b] is 1 and [d2a1] & 47 is set; otherwise
a8096 loads 3
ab329 records that cause from an inline byte after the call, first
writer wins
a4e1e is the site that records 0x17 - and it sits inside a400:0e0d,
which a4de5 and a4dfb install in [c922], the callback the serial
ISR's received-data handler calls for every character
So typing is what records the cause. ATI6 names 0x17 itself - "Disconnect
Reason is Keypress Abort" - and the reason table at 0xc1abb puts Keypress
Abort at index 23, with "DTR dropped" at the index 1 that OK requires.
Which leaves the real cause, and it is ours. ATI12 prints "Physical
Interface: Inactive / Data Link Layer: Inactive", because am79c30.py's
DEFAULT_READS is empty and LIU_LSR reads 0. The S/T line never activates,
so the modem is never idle-with-a-line. Answering LIU_LSR with an
activated value would change the result code without modelling anything,
so it is not done: this belongs to the ISDN front end, which is already on
the missing list.
tools/imodem_at_probe.py reproduces the chain, watching a8067 and ab33b
alongside the transcript.
The ATI sweep is in artifacts/imodem-at/ati-sweep.json and tabulated in the
doc. ATI4 and ATI5 dump the settings and NVRAM including S00-S83, ATI6 the
link diagnostics, ATI10 dial security, ATI11 the physical layer, ATI12 the
ISDN switch settings, ATI15 party numbers, ATI16 Turbo PPP, ATI17 a
diagnostics page. ATI7 is the firmware describing its own board and it
agrees with what this repository has read off the hardware: 20.16 MHz,
768 KiB EPROM, 256 KiB RAM, options V32bis,x2,V.90.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
All four live in image 6 of the 3.00.02 overlay set, which is why joining only
5/11/10 finds five of thirty-five references. Bit 5 is set when 039f bit 7 -
the digital-server role - is set, and its reader self-clears it after latching
a five-bit field; bit 6 is cleared when a convergence counter reaches 4, so it
marks a phase rather than a mode; bits 4 and 7 steer message assembly and one
extra per-frame call, and have no bitwise writer.
Tag 72's payload goes to ffdf with only its top bit reaching ffd9, as bit 14.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Adds tools/imodem_help.py: the help screens are tokenized against a 96-word
dictionary that ends flush against ff, which fixes the first token at a0 and
yields bd=Disable, ee=Enable directly.
Across eight images by archive date: x2 arrives whole in March 1997 as five
S58 bits; V.90 adds exactly one more bit to the same register in April 1998.
On the DSP side V.90 brings one new command, tag 72, absent from every x2-only
build. In IE020706 its payload is S70, named 'Power Level for V.90', range
6..21. In the later builds S70 reads Reserved but is still used, capped at 16
and min'd against a per-country ceiling, with a changed encoding.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
The tag-70 payload builder is a single sender in IM020104. Reading all of it,
plus the S-register base anchored on S2/S7/S9, names every producer of the DSP
mode word: bit 13 is S56's V.34+ enable, bits 14 and 15 have none. So a
symmetric call takes e172's first arm, e822 is unreachable, and e5e7 always
selects eight-bit operation - 64000 bit/s from the datapump side.
Adds tools/imodem_x2_map.py so both address spaces are reproducible.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Measurement said turn-taking, not lock-step: the only targeted write the
controller makes into a selected channel is a slot identity at offset
0xbae1, which the card reads at 0xf64ec and reports back as parameter
0x00f3. That is a request/response exchange over shared channel memory,
not two processors needing to run at the same instant.
QuadChassis runs one side, moves the channel memory, runs the other, and
moves it back. The controller reaches that memory through the aperture
QuadBoard maps at 0x40000; the modem sees the same bytes at 0x00000.
Resuming needed a small addition to CourierMachine rather than a refactor.
run() builds a fresh Uc every call, but `begin` is already reassigned from
current_pc() inside its loop, so only the entry point and the processor
state had to be carried: snapshot() takes the general, segment and flags
registers plus the instruction count, and resume_from() writes them into
the next Uc and continues from the saved PC. Interrupt delivery and the
modem's STI/HLT scheduler therefore keep working across a turn, which
driving emu_start directly would have broken.
Verified: both sides resume where they stopped - controller 8,000,003 then
8,500,008 instructions, modem 1,000,012 then 1,500,016 - and the
controller's stamp is visible in the shared channel, 0xbae1 = 0x11.
Not yet demonstrated: the 0x00f3 round trip. The modem's boot clears
0xbae1, so with the controller stamping before the modem boots the card
has nothing to report. Ordering the turns so the stamp lands after the
card is up is the next step, and it is what this harness exists to make
possible.
Arbitration is not modelled. Nothing here decides who may touch the
channel when; the schedule is the caller's. On the board both parts
address that memory freely and the chip selects at 0xff88/0xff94 resolve
it, so this cannot be used to argue about races.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
9470dbc committed a machine.py that imports .quad_board and
.quad_terminal while both were untracked, so HEAD could not import
courier_emu.machine at all. This lands them, with quad_image, the tests
and the probes that go with them.
quad_board models the controller's channel-selected memory aperture and
its port and chip-select registers. quad_image gives execution views of
the Quad NAC controller and of the modem code it loads. quad_terminal is
the opt-in CPU byte-terminal adapter, whose boundary docs/quad-at-terminal.md
documents: it substitutes the fixed-baud byte front end rather than
completing the physical autobaud, and says so.
I did not write these; the message says what they do, not why they are
shaped that way.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
docs/board-parts.md identifies this board's DSP as a TMS320C50 or LC50, not
the 'C52 the code was named after, and docs/firmware-lineage.md lists the
Quad as 80186 + TMS320C50. The identification is inference from the
firmware's memory use against the C5x guide's tables rather than from the
part marking, which is a custom USR number, and the module note says so.
Renames the nine C52_ constants, _c52_word and the prose, with the
importers in tools/analyze_v8.py and the test name in tests/test_rom.py
following.
Two occurrences keep the old name deliberately, because both are
quotations of superseded claims that editing would falsify: the
"20 MHz 80186 / 25 MHz C52" comment quoted at the clock ratio, and the
attributed split at _advance_dsp. The note at the top of the module
records that this is on purpose so neither reads as a missed rename.
The misnomer was not harmless. It invites treating the Quad's DSP as a
different device needing its own boot model, when it is the same part and
the boot path in this module already applies - which is exactly the wrong
turn taken in docs/quad-bringup-blockers.md's C50 endpoint section.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Running the captured resident with no CPU attached settles the request and
acknowledge protocol that quad-c50-overlay-loader.md left open.
The steady state is one cycle repeated 1,768 times in 200,000 steps: write
0x57 = 0x0300 at pc 0x8313, then read 0x57, 0x58, 0x59, 0x5a and 0x5b. Every
one of those reads is at pc 0x23f1 - the fetch stub's lamm * with ar1
auto-incrementing - so it is one instruction walking a five-word window from
0x57, not five instructions polling five registers: a status word and four
data words.
That is why seeding 0x57 alone never advanced the loop. The stub always
reads all five words, so the issue was the width of the window rather than
an extra handshake bit.
Four data words per request is the CPU's burst size, so the lanes map one
for one: 0xc0 to 0x58, 0xc4 to 0x59, 0xc8 to 0x5a, 0xcc to 0x5b. Ports
0x5c..0x5f are never touched, so the CPU's second lane group at 0xd0
addresses a second device rather than a second window in this one.
This also explains the previous commit's zero pulls: that endpoint presented
one word at 0x58 and counted single reads, against a DSP that takes four
words at four addresses per request.
Which bit of the status word means "fresh burst" is still open - standalone,
0x57 reads back whatever the DSP last wrote, so this run cannot separate the
two directions.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Adds QuadC50Endpoint: the CPU's lanes feed a C5x core that is stepped on
an instruction budget alongside the 80186, carrying the fractional
remainder between service calls the way bridge.py does. The ratio is
bridge.py's DSP_STEPS_PER_X86 rather than a new constant, because both
Quad processors run from the same 20.16 MHz clock the card reports.
NativeC5x.from_program builds a core from a raw image and origin, since
what the Quad has is a streamed image rather than an XMF container.
The C50's own boot loader is not modelled, so the first stream is taken
at wire speed and the core is built from exactly the words the CPU sent -
31,272 of them at origin 0x8000, the resident. Nothing here supplies the
image. Once the core exists the strobed ready bit on 0x98 is raised only
when the DSP has pulled the queued words through its fetch port, so the
CPU waits on the DSP rather than on a floating bus.
That model is wrong, and this records why. Over six million instructions
the core takes 28,034,834 steps and the CPU issues 7,843 bursts, but the
resident pulls **zero** words from 0x58: the queue stays stuck at four,
every load times out, and 0xced12 returns carry-set nine times against
zero successes where the floating bus had produced 23 successes out of
24. The resident drives MMR 0x57 to 0x1 here against 0x0300 when run in
isolation. So the running resident does not pull a re-sent resident, and
the acknowledge is not simply "the words were taken" - which is the same
wall quad-c50-overlay-loader.md already names, that bit 9 of 0x57 alone
does not advance the loop.
Parameter 0x1f2 has not arrived and the card still does not reach its
message interpreter. The endpoint is opt-in, so nothing that does not
pass quad_c50= changes behaviour.
The CourierMachine wiring this needs - the read, write and service hooks -
is left uncommitted, because its hunks interleave with unrelated
in-progress work in machine.py.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
The card spends its whole run streaming DSP code. This decodes that
transport from QF060003 and captures what it sends.
Eight 16-bit lanes at ports 0xc0, 0xc4 ... 0xdc, low byte at the port and
high byte at the port + 2. [0x9d38] picks the lane group - 0xc0 for the
path at 0xced05, 0xd0 for the one at 0xced12 - and [0x9d37] is that
group's strobe, 1 or 2, written to 0x98 after each four-word burst and
waited on at 0xced9e. The final word comes from [0x9d3a], strobed with 4
and acknowledged on bit 2. 0xcec72 writes 0xffff to 0x98/0x9a and
0x9c/0x9e and polls both pairs back as a reset presence check.
Captured over four million instructions the stream is five complete
copies of the resident, byte for byte, each preceded by the eight
0x0083 lane-init words: 62,544 bytes at a 62,560-byte stride, matching
row one of the load table in docs/quad-c50-overlay-loader.md - source
paragraph 0x2000, length 0xf450, destination 0x8000.
It repeats because nothing answers. The transfer is not failing: across
a twelve million instruction run 0xced12 returns carry-clear on 23 of 24
loads, with no timeout and no give-up, because the unmodelled 0x98 floats
high and every readiness poll passes. A supervisor at 0xede01/0xeddb1
then drives the load again. The missing direction is DSP to CPU.
This is the tap, not the endpoint. It is fed from a run's recorded port
writes rather than wired into the machine's port handlers, so it cannot
change timing, and it neither executes the captured image nor answers on
the DSP's behalf. Making the link answer means running the resident on
the C5x core, and the 0x57/0x58 request and acknowledge protocol that
needs is still open in quad-c50-overlay-loader.md.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Sweeps each of the six settings-EEPROM records one at a time against an
otherwise-zeroed part and records the ATI7 profile the firmware renders,
so the mapping is measured rather than read off the disassembly.
Setting 1 is a country index, not a bit field: a plain index into the
118-byte-per-entry table at 0xe6560, populated for 0..22 (US/Canada
through Malaysia) and rendering garbage from 23 up. Setting 2 is the
feature mask, and bit 5 is the x2/V90 bit - x2,V90 is one combined list
entry at 0xdf47a, so this firmware cannot report either alone. Bit 6
switches the ISDN line to the PIAFS variant. Setting 3 bit 0 is the only
observable fax bit, selecting Class 1/Class 2.0; the standalone Class 1
and Class 2.0 strings are unreachable, as all three tests at 0xdf4c8,
0xdf4d4 and 0xdf4e0 test the same bit. Setting 4 bit 0 adds the MSK
product suffix and bits 5 and 6 are the two cellular entries. Settings 5
and 6 change nothing in the profile; the boot decode at 0xc0940 never
reads them.
The options printer walks one null-terminated string list, so each set
mask bit emits the next string rather than a fixed one. The doc gives the
measured mask-to-list pairs rather than a bit-per-feature table, because
the list is positional and a bit table would misrepresent it.
Also records the transport (Microwire on the 186EB PIO lines, frame
builders at 0xc16f7 and 0xc15e4, addressing as (di - 0x8632) >> 1), the
absent-part failure mode that made ATI7 report the XOR constant 0x1d as a
feature set, that ATY14 prints settings 6,5,4,3,2,1, and the second
writer at 0xf88fc that can raise the same bits at runtime over the
EEPROM baseline.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>