Commit Graph
35 Commits
Author SHA1 Message Date
SDD 031d30da67 reference: DUART datasheet verification of the two mc68681 edits (claim 1 refuted)
Download the SCN2681 (Philips 1995), SCC2681, SCN68681 and MC68HC681 UM
datasheets into reference/duart-datasheet/ with pdftotext extractions, and
audit each claimed justification against them:

  Claim 1 (TxRDY asserted in tra_complete, not tra_callback): REFUTED.
    The quoted p.7 sentence is real, but SCN2681 p.22 says explicitly
    'TxRDY sets at the end of the start bit time' -- which is exactly the
    removed upstream behaviour.  Upstream was right.

  Claim 2 (overrun latched on the start bit, not completion): CONFIRMED.
    'the overrun error status bit (SR[4]) will be set upon receipt of the
    start bit of the new (overrunning) character' (p.8, also SRA[4] p.14).
    Caveats: p.8 also says errors are 'strobed ... at the received
    character boundary' (internal tension); and a valid start bit is
    validated ~half a bit after the falling edge, not at it.

  Claim 3 (3-deep FIFO, 4th held, overrun on 5th; MAME faithful): CONFIRMED.
    'capacity of three characters' + 4th held in the shift register (p.8);
    MAME's SIZE+1 guard overruns exactly on the 5th.

Also snapshot the worker's uncommitted MAME diff and upstream 0.289 code.
2026-10-16 12:13:07 +03:00
SDD 9902722165 harness: wire DUART IRQ to the TMS34010 (host-port test transmit); fix two DUART timing deviations
Root cause of the missing THRA write (HOST PORT test): the level-1 host-port
test's transmit is ISR-driven, and the DUART interrupt was never wired to the
CPU.  The firmware installs RAM trampolines in the fixed vector table (INT1
vector 0xffffffc0 -> stub at bit 0x0f60 = JA 0x3FA92F40, which calls the DUART
ISR L3FA78D90 with (2, 0x270860, 0x6400000)).  Counters: INTENB reaches 0x0006
(INT1|INT2) at the test, so interrupts are enabled.

vt1200.cpp: wire m_duart1/m_duart2 irq_cb() to CPU external interrupt 1/2
(duart1_irq_w/duart2_irq_w), gated on VT1200_DUART.  Result: THRA writes go
from 0 to 20 per run; the test's SRA-overrun and RHRA-pattern checks now pass.

MAME tree (mc68681.cpp/.h), two datasheet-backed corrections with revert notes:
 1. TxRDY was asserted mid-character ("not until the end of start bit time");
    the datasheet asserts it at the THR->TSR transfer.  Corrected.
 2. The overrun error was latched when the overrunning character *completed*
    (rx_fifo_push); the datasheet latches it "upon receipt of the start bit of
    the new (overrunning) character".  Corrected via duart_channel::rx_w().
    This clears every check in the RXCHECK sub-test (flags 1 -> 0).

Acceptance is NOT met: cap.lua still prints 'LEVEL1/2 ERROR -> HOST PORT - 15'.
The next failure is the preceding L3FA71BC0 (DUART baud/timer) sub-test
returning 6; its flag-set sites were breakpointed and never fired.  Regression
holds (no VT1200_* env -> PC=3FDCE400 samples=199).  Details, numbers and the
datasheet audit: harness/mame/DUART_REPORT.md sections FINAL FINDINGS / UPDATE.
2026-10-16 12:07:27 +03:00
SDD 3fd1e13b2e docs: keyboard/mouse protocol spec — LK401 (LK201 protocol) + VSXXX-AA mouse, sources, MAME lk201 device
Distils public docs into reference/keyboard-mouse/PROTOCOL.md for the level-1
Keyboard (27) / Mouse (26) device tests:
- keyboard: 4800 8N1 RS-423, self-test via FD -> 01 00 00 00 (errors 3D/3E)
- mouse: 4800 8O1 RS-232, self-test via 'T' -> 4-byte report (errors 3D/3E, >=0x20 fatal)
- separate ports: DUART2 A=keyboard, B=mouse (NOT daisy-chained)
MAME already has an LK201 device (src/mame/dec/lk201.cpp/.h) but no DEC mouse.
2026-10-16 11:38:52 +03:00
SDD 23e508f075 docs: level-1 test sequence, port tests vs device tests (keyboard/mouse device models needed for tests 26/27) 2026-10-16 11:31:56 +03:00
SDD b38da304c3 docs: correct DUART report - host port test is local loopback (service guide), wiring verified sound, missing THRA write is the real bug 2026-10-16 11:27:11 +03:00
SDD 2fd9286c1a harness: wire MAME SCN2681 at the DUART windows (host-port investigation)
Adds SCN2681 devices at 0x0640000 (DUART1 = host/printer) and 0x0620000
(DUART2 = keyboard/mouse), gated on VT1200_DUART, with the remap
verified as duart_register = handler_off (duart_byte = off*2, value in
the low byte of the firmware's 16-bit move).  Optional external TX->RX
loopback (VT1200_DUART_LB1/2) models the loopback connectors; the
monitor switch is driven on IP4-IP6.  New VT1200_DUARTLOG gives a full
non-deduplicated DUART access log.

Result: the level-1 HOST PORT test is reached and executed against the
real DUART, but still reports 'LEVEL1/2 ERROR -> HOST PORT - 15'.  The
test reads SRA/RHRA and requires a 5-byte external pattern
(0xAA,0xFF,0xAA,0x55) plus SRA overrun, yet the firmware never writes
the transmit register (0 writes to reg 3/B on either DUART in 1400
frames), so no internal or external loopback can supply it.  See
harness/mame/DUART_REPORT.md.

Regression holds: no VT1200_* env -> PC=3FDCE400 samples=199.
2026-10-16 11:22:56 +03:00
SDD 1c0a9b2b64 docs: Ghidra decompiler unreliable for this ROM (~85% of sampled functions flagged); SLEIGH instruction coverage incomplete 2026-10-16 11:08:46 +03:00
SDD 77c918f15c docs: next level-1 gate is HOST PORT (window 0x6400000); evidence and approach recorded 2026-10-16 11:01:39 +03:00
SDD 49378827e8 fix(tms34010): drop addr32 &0xFFFFF, fix ADDI imm; rebuild .sla, repair program, validate 31691 sites 2026-10-16 10:59:40 +03:00
SDD 5000b8bc07 harness: level-1 VIDEO MEMORY test passes (video RAM mapped + REFCNT advances); next gate is HOST PORT 2026-10-16 10:57:06 +03:00
SDD 5ef8712960 harness: identify the level-1 video-memory test that raises code 0x100 (VIDEO MEMORY-22)
The dispatch status is 0x100 (printed as '22' in the message). A driver-side
transparent low-RAM write log (VT1200_LOWLOG) shows the slot at bit 0x16F0 is
written by the store at 3FDF9090 from a13(0x10), which L3FA7C050 sets to the
literal 0x100 when the memory test L3F2018B0 returns non-zero. L3F2018B0 is the
level-1 video-memory test (base bit 0x04000000, count 0x20000). Its failing
checks: the 16-bit walking-bit read-back at 0x04000000 (baseline, unmapped) and,
with video RAM mapped, the REFCNT (0xC00001F0) 'must change' check.
2026-10-16 10:55:44 +03:00
SDD f46b4a44a4 docs: root-cause Ghidra TMS34010 CALLA bug to addr32 & 0xFFFFF (empty call graph) 2026-10-16 10:48:02 +03:00
SDD 3a1d10e9bb docs: consolidate level-1 investigation state; stack walk reaches the framework not the test 2026-10-16 10:40:24 +03:00
SDD 8a00cef556 docs: Ghidra CALLA targets do not resolve (empty call graph); smart34010 is authoritative for call targets 2026-10-16 10:38:16 +03:00
SDD 9a2363a68f docs: level-1 errors are status-code dispatched; withdraw the unsound failing-address claim 2026-10-16 10:36:27 +03:00
SDD cca49dc27d harness: VRAM transparent logging proxy; video RAM test is a walking-bit test and still fails 2026-10-16 10:33:00 +03:00
SDD 07997022ad docs: the video RAM test draws characters then verifies; mapping alone cannot satisfy it 2026-10-16 10:30:52 +03:00
SDD 52744cbd03 harness: correct video memory to bit 0x04000000; log the failing address; level 1 still fails 2026-10-16 10:27:32 +03:00
SDD f49f9984bb harness: close the instrument disagreement -- catch-all trustworthy, off = bit>>4
Closed cross-check (single run): the catch-all and VT1200_CAL proxies are
directly comparable (both base 0) and resolve identically; last-wins holds
for same- and mismatched-width overlaps. The apparent conflict was a units
error: a .rw(FUNC(offs_t)) handler receives (bitaddr-base)>>4 (tms34010
Width=1, AddrShift=3), so the catch-all logs bitaddr>>4. Its 0x400000..0x40D7FF
is bit 0x04000000..0x040D7FF0 (bytes 0x800000..0x81AFFE), outside the declared
4 MiB RAM -- genuinely unmapped. The old 0x00400000 proxy was 16x too low.
Catch-all reproduces the committed log byte-for-byte and does not perturb
coverage (56 / PC=3F208950 with and without). Regression holds: PC=3FDCE400
samples=199. Report: harness/mame/XCROSS_REPORT.md
2026-10-16 10:25:17 +03:00
SDD 99ca146fe3 docs: address units resolved from MAME source (map is in BITS; bytes = bit>>3) + two corrections 2026-10-16 10:18:01 +03:00
SDD 93fb92d807 docs: record the instrument disagreement precisely; block video work on a closed cross-check 2026-10-16 10:11:59 +03:00
SDD b2e0448001 harness: map-precedence calibration (last-wins proven) + layered address probes 2026-10-16 10:11:47 +03:00
SDD 7030f2068d harness: record headless-watchpoint void + the unresolved address-unit blocker, with a calibration plan 2026-10-16 10:07:38 +03:00
SDD ccd03b8879 harness: capture the firmware console; it reports LEVEL1/2 VIDEO MEMORY error 22 and restarts 2026-10-16 10:03:51 +03:00
SDD fe978dee18 harness: locate video memory at 0x00400000 via an unmapped-access catch-all 2026-10-16 09:45:28 +03:00
SDD 170d07f0a2 docs: plan-1 outcome, rulings, and triaged findings (durable record before workspace cleanup) 2026-10-16 02:15:51 +03:00
SDD 66784de1aa docs: memory-space map from the spike; commit the plan amendment; ignore harness logs 2026-10-16 02:15:13 +03:00
SDD e23dadcfd4 harness: correct board-model docs (four windows, real callback trap, guessed DMA timing) 2026-10-16 02:15:05 +03:00
SDD 8e18d81cef harness: paste verbatim sweep/differential/INTENB evidence into BRINGUP_LOG 2026-10-16 02:07:05 +03:00
SDD 2d7747a20d harness: configurable board model busy timings + findings 2026-10-16 01:59:57 +03:00
SDD a2f19b2d29 harness: model the 0x5800000/0x5900000 DMA command/data pair 2026-10-16 01:54:37 +03:00
SDD 66fe15367b harness: per-window busy state machines for the big windows 2026-10-16 01:52:06 +03:00
SDD db2caa5558 harness: make board switch knob unambiguous and non-silent 2026-10-16 01:50:03 +03:00
SDD 43f69738f4 harness: extract VT1200 board register model, unit-tested 2026-10-16 01:45:01 +03:00
SDD acb92d3e44 checkpoint: VT1200 reverse-engineering workspace before board-model work 2026-10-16 01:37:50 +03:00