mirror of
https://git.k-space.ee/arti/vt1200.git
synced 2026-10-30 12:03:54 +02:00
The real VT1200 board has a DUART2 (SCN2681) at 0x0620000 for the keyboard (ch A) and mouse (ch B) with INT2 wired. Map it unconditionally instead of opting in via VT1200_DUART2; the OS's DUART interrupt dispatcher needs a real read-only ISR distinct from the write-only IMR. Verified with frame dumps: with ONLY VT1200_SKIP_LEVEL1=1 the Terminal Manager V2.2 dialog now appears (frame 3000; VRAM md5 73c3c9a1..., identical to the old skip+DUART2 run). This does NOT keep the faithful no-env path: level 0's I/O data path test (L3FDCE470) transmits 0xE1 to DUART2-A and drains the receiver until it has read 10 bytes (SRA RxRDY). The board write-back latch used to alias CSRA/RHRA and faked that (baseline first divergence: R 06200001 pc=3FDCE670 = 0x0099 vs the real chip's 0x000C), so the firmware dropped into the interactive diagnostics menu. No faithful device we have (LK401 sends at most 4 bytes) supplies the 10 bytes; an external TX->RX loopback does not change the transmit count. See OS_BRINGUP_REPORT.md section 8 (DONE_WITH_CONCERNS). The OS keyboard/mouse driver does initialise: skip-phase OS code programs DUART2 (MR1A=0x13, CSRA=0x99, IMR=0x33, ...) and sends FD to the keyboard plus the documented LED/click/bell/auto-repeat commands, and 'T' to the mouse.