Files
vt1200/reference/keyboard-mouse/vt100net-lk201-keyboard.html
T
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

238 lines
25 KiB
HTML
Raw Blame History

This file contains invisible Unicode characters
This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<?xml version="1.0" encoding="UTF-8"?>
<html xmlns="http://www.w3.org/1999/xhtml" lang="en">
<head>
<meta charset="utf-8"/>
<title>LK201 Keyboard</title>
<meta name="viewport" content="width=device-width"/>
<link href="terminal.css" rel="stylesheet"/>
<link href="dark-support.css" rel="stylesheet"/>
<link rel="icon" href="cover-logo-096.png" sizes="96x96"/>
</head>
<body>
<header>
<nav class="breadcrumbs">
<ol>
<li><a href="./"><svg xmlns="http://www.w3.org/2000/svg" width="92" height="16" version="1.1" id="vt100-net-site-logo">
<title>VT100.net</title>
<style>
.blk { fill: #000000 }
.g25 { fill: #626262 }
.g50 { fill: #9b9b9b }
.g75 { fill: #cccccc }
.grd { fill: #006600 }
.grl { fill: #00ff00 }
.scanlines { fill: black; stroke: #5e5e5e; stroke-width: 0.4; paint-order:stroke fill markers }
.dotnet { fill: #404040 }
@media (prefers-color-scheme: dark) {
.blk { fill: #626262 }
.g25 { fill: #9b9b9b }
.g50 { fill: #cccccc }
.g75 { fill: #ffffff }
.scanlines { fill: #00ff00; stroke: #009900 }
.dotnet { fill: #909090 }
}
</style>
<g id="term">
<rect class="g50" x="05" y="02" width="9" height="1"/>
<rect class="blk" x="14" y="02" height="1" width="1"/>
<rect class="g50" x="04" y="03" width="11" height="8"/>
<rect class="g25" x="05" y="03" width="9" height="7"/>
<rect class="blk" x="15" y="03" height="8" width="1"/>
<rect class="blk" x="06" y="04" width="8" height="6"/>
<rect class="grd" x="07" y="05" width="6" height="4"/>
<rect class="grl" x="08" y="05" width="1" height="1"/>
<rect class="grl" x="10" y="05" width="1" height="1"/>
<rect class="grl" x="07" y="06" width="1" height="1"/>
<rect class="grl" x="09" y="06" width="1" height="1"/>
<rect class="grl" x="08" y="07" width="1" height="1"/>
<rect class="grl" x="10" y="07" width="1" height="1"/>
<rect class="blk" x="05" y="11" height="1" width="10"/>
<rect class="blk" x="07" y="12" width="1" height="1"/>
<rect class="g25" x="08" y="12" width="4" height="1"/>
<rect class="blk" x="12" y="12" width="1" height="1"/>
<rect class="g25" x="03" y="13" width="13" height="1"/>
<rect class="g75" x="04" y="13" width="1" height="1"/>
<rect class="g75" x="06" y="13" width="1" height="1"/>
<rect class="g75" x="08" y="13" width="1" height="1"/>
<rect class="g75" x="10" y="13" width="1" height="1"/>
<rect class="g75" x="12" y="13" width="1" height="1"/>
<rect class="g75" x="14" y="13" width="1" height="1"/>
<rect class="blk" x="16" y="13" width="1" height="1"/>
<rect class="g25" x="02" y="14" width="15" height="1"/>
<rect class="blk" x="17" y="14" width="1" height="1"/>
<rect class="blk" x="02" y="15" width="16" height="1"/>
</g>
<g id="g1754" style="display:inline">
<g class="scanlines">
<path d="m 21.632883,3.3333123 c 0,0.2613338 0.07467,0.4666675 0.186667,0.4666675 h 1.418669 c 0.112,0 0.186667,-0.2053337 0.186667,-0.4666675 c 0,-0.2613338 -0.07467,-0.4666675 -0.186667,-0.4666675 h -1.418669 c -0.112,0 -0.186667,0.2053337 -0.186667,0.4666675 z m 5.37601,0 c 0,0.2613338 0.07467,0.4666675 0.186667,0.4666675 h 1.418669 c 0.112,0 0.186667,-0.2053337 0.186667,-0.4666675 c 0,-0.2613338 -0.07467,-0.4666675 -0.186667,-0.4666675 h -1.418669 c -0.112001,0 -0.186667,0.2053337 -0.186667,0.4666675 z m -5.37601,1.86667 c 0,0.2613338 0.07467,0.4666675 0.186667,0.4666675 h 1.418669 c 0.112,0 0.186667,-0.2053337 0.186667,-0.4666675 c 0,-0.2613338 -0.07467,-0.4666675 -0.186667,-0.4666675 h -1.418669 c -0.112,0 -0.186667,0.2053337 -0.186667,0.4666675 z m 5.37601,0 c 0,0.2613338 0.07467,0.4666675 0.186667,0.4666675 h 1.418669 c 0.112,0 0.186667,-0.2053337 0.186667,-0.4666675 c 0,-0.2613338 -0.07467,-0.4666675 -0.186667,-0.4666675 h -1.418669 c -0.112001,0 -0.186667,0.2053337 -0.186667,0.4666675 z m -4.480009,1.86667 c 0,0.2613339 0.07467,0.4666676 0.186667,0.4666676 h 1.41867 c 0.112,0 0.186667,-0.2053337 0.186667,-0.4666676 c 0,-0.2613338 -0.07467,-0.4666675 -0.186667,-0.4666675 h -1.41867 c -0.112,0 -0.186667,0.2053337 -0.186667,0.4666675 z m 3.584007,0 c 0,0.2613339 0.07467,0.4666676 0.186667,0.4666676 h 1.418669 c 0.112,0 0.186667,-0.2053337 0.186667,-0.4666676 c 0,-0.2613338 -0.07467,-0.4666675 -0.186667,-0.4666675 h -1.418669 c -0.112,0 -0.186667,0.2053337 -0.186667,0.4666675 z m -3.584007,1.8666701 c 0,0.2613338 0.07467,0.4666675 0.186667,0.4666675 h 1.41867 c 0.112,0 0.186667,-0.2053337 0.186667,-0.4666675 c 0,-0.2613338 -0.07467,-0.4666675 -0.186667,-0.4666675 h -1.41867 c -0.112,0 -0.186667,0.2053337 -0.186667,0.4666675 z m 3.584007,0 c 0,0.2613338 0.07467,0.4666675 0.186667,0.4666675 h 1.418669 c 0.112,0 0.186667,-0.2053337 0.186667,-0.4666675 c 0,-0.2613338 -0.07467,-0.4666675 -0.186667,-0.4666675 h -1.418669 c -0.112,0 -0.186667,0.2053337 -0.186667,0.4666675 z m -2.688005,1.8666696 c 0,0.261334 0.07467,0.466668 0.186667,0.466668 h 3.210673 c 0.112,0 0.186667,-0.205334 0.186667,-0.466668 c 0,-0.261333 -0.07467,-0.466667 -0.186667,-0.466667 h -3.210673 c -0.112,0 -0.186667,0.205334 -0.186667,0.466667 z m 0,1.86667 c 0,0.261334 0.07467,0.466668 0.186667,0.466668 h 3.210673 c 0.112,0 0.186667,-0.205334 0.186667,-0.466668 c 0,-0.261333 -0.07467,-0.466667 -0.186667,-0.466667 h -3.210673 c -0.112,0 -0.186667,0.205334 -0.186667,0.466667 z m 0.896002,1.86667 c 0,0.261334 0.07467,0.466668 0.186667,0.466668 h 1.418669 c 0.112,0 0.186667,-0.205334 0.186667,-0.466668 c 0,-0.261333 -0.07467,-0.466667 -0.186667,-0.466667 h -1.418669 c -0.112,0 -0.186667,0.205334 -0.186667,0.466667 z" id="path1765"/>
<path d="m 30.342891,3.3333123 c 0,0.2613338 0.07467,0.4666675 0.186667,0.4666675 h 6.794678 c 0.112001,0 0.186667,-0.2053337 0.186667,-0.4666675 c 0,-0.2613338 -0.07467,-0.4666675 -0.186667,-0.4666675 h -6.794678 c -0.112001,0 -0.186667,0.2053337 -0.186667,0.4666675 z m 2.688004,1.86667 c 0,0.2613338 0.07467,0.4666675 0.186667,0.4666675 h 1.41867 c 0.112,0 0.186667,-0.2053337 0.186667,-0.4666675 c 0,-0.2613338 -0.07467,-0.4666675 -0.186667,-0.4666675 h -1.41867 c -0.112,0 -0.186667,0.2053337 -0.186667,0.4666675 z m 0,1.86667 c 0,0.2613339 0.07467,0.4666676 0.186667,0.4666676 h 1.41867 c 0.112,0 0.186667,-0.2053337 0.186667,-0.4666676 c 0,-0.2613338 -0.07467,-0.4666675 -0.186667,-0.4666675 h -1.41867 c -0.112,0 -0.186667,0.2053337 -0.186667,0.4666675 z m 0,1.8666701 c 0,0.2613338 0.07467,0.4666675 0.186667,0.4666675 h 1.41867 c 0.112,0 0.186667,-0.2053337 0.186667,-0.4666675 c 0,-0.2613338 -0.07467,-0.4666675 -0.186667,-0.4666675 h -1.41867 c -0.112,0 -0.186667,0.2053337 -0.186667,0.4666675 z m 0,1.8666696 c 0,0.261334 0.07467,0.466668 0.186667,0.466668 h 1.41867 c 0.112,0 0.186667,-0.205334 0.186667,-0.466668 c 0,-0.261333 -0.07467,-0.466667 -0.186667,-0.466667 h -1.41867 c -0.112,0 -0.186667,0.205334 -0.186667,0.466667 z m 0,1.86667 c 0,0.261334 0.07467,0.466668 0.186667,0.466668 h 1.41867 c 0.112,0 0.186667,-0.205334 0.186667,-0.466668 c 0,-0.261333 -0.07467,-0.466667 -0.186667,-0.466667 h -1.41867 c -0.112,0 -0.186667,0.205334 -0.186667,0.466667 z m 0,1.86667 c 0,0.261334 0.07467,0.466668 0.186667,0.466668 h 1.41867 c 0.112,0 0.186667,-0.205334 0.186667,-0.466668 c 0,-0.261333 -0.07467,-0.466667 -0.186667,-0.466667 h -1.41867 c -0.112,0 -0.186667,0.205334 -0.186667,0.466667 z" id="path1767"/>
<path d="m 40.490903,3.3333123 c 0,0.2613338 0.07467,0.4666675 0.186667,0.4666675 h 1.418669 c 0.112,0 0.186667,-0.2053337 0.186667,-0.4666675 c 0,-0.2613338 -0.07467,-0.4666675 -0.186667,-0.4666675 h -1.418669 c -0.112,0 -0.186667,0.2053337 -0.186667,0.4666675 z m -0.896002,1.86667 c 0,0.2613338 0.07467,0.4666675 0.186667,0.4666675 h 2.314671 c 0.112,0 0.186667,-0.2053337 0.186667,-0.4666675 c 0,-0.2613338 -0.07467,-0.4666675 -0.186667,-0.4666675 h -2.314671 c -0.112,0 -0.186667,0.2053337 -0.186667,0.4666675 z m -0.896001,1.86667 c 0,0.2613339 0.07467,0.4666676 0.186667,0.4666676 h 3.210672 c 0.112,0 0.186667,-0.2053337 0.186667,-0.4666676 c 0,-0.2613338 -0.07467,-0.4666675 -0.186667,-0.4666675 h -3.210672 c -0.112,0 -0.186667,0.2053337 -0.186667,0.4666675 z m 1.792003,1.8666701 c 0,0.2613338 0.07467,0.4666675 0.186667,0.4666675 h 1.418669 c 0.112,0 0.186667,-0.2053337 0.186667,-0.4666675 c 0,-0.2613338 -0.07467,-0.4666675 -0.186667,-0.4666675 h -1.418669 c -0.112,0 -0.186667,0.2053337 -0.186667,0.4666675 z m 0,1.8666696 c 0,0.261334 0.07467,0.466668 0.186667,0.466668 h 1.418669 c 0.112,0 0.186667,-0.205334 0.186667,-0.466668 c 0,-0.261333 -0.07467,-0.466667 -0.186667,-0.466667 h -1.418669 c -0.112,0 -0.186667,0.205334 -0.186667,0.466667 z m 0,1.86667 c 0,0.261334 0.07467,0.466668 0.186667,0.466668 h 1.418669 c 0.112,0 0.186667,-0.205334 0.186667,-0.466668 c 0,-0.261333 -0.07467,-0.466667 -0.186667,-0.466667 h -1.418669 c -0.112,0 -0.186667,0.205334 -0.186667,0.466667 z m -1.792003,1.86667 c 0,0.261334 0.07467,0.466668 0.186667,0.466668 h 5.002676 c 0.112,0 0.186667,-0.205334 0.186667,-0.466668 c 0,-0.261333 -0.07467,-0.466667 -0.186667,-0.466667 h -5.002676 c -0.112,0 -0.186667,0.205334 -0.186667,0.466667 z" id="path1769"/>
<path class="scanlines" d="m 47.80491,3.3333123 c 0,0.2613338 0.07467,0.4666675 0.186667,0.4666675 h 3.210673 c 0.112,0 0.186667,-0.2053337 0.186667,-0.4666675 c 0,-0.2613338 -0.07467,-0.4666675 -0.186667,-0.4666675 h -3.210673 c -0.112,0 -0.186667,0.2053337 -0.186667,0.4666675 z m -0.896002,1.86667 c 0,0.2613338 0.07467,0.4666675 0.186667,0.4666675 h 1.41867 c 0.112,0 0.186667,-0.2053337 0.186667,-0.4666675 c 0,-0.2613338 -0.07467,-0.4666675 -0.186667,-0.4666675 h -1.41867 c -0.112,0 -0.186667,0.2053337 -0.186667,0.4666675 z m 3.584007,0 c 0,0.2613338 0.07467,0.4666675 0.186667,0.4666675 h 1.418669 c 0.112,0 0.186667,-0.2053337 0.186667,-0.4666675 c 0,-0.2613338 -0.07467,-0.4666675 -0.186667,-0.4666675 h -1.418669 c -0.112,0 -0.186667,0.2053337 -0.186667,0.4666675 z m -4.480008,1.86667 c 0,0.2613339 0.07467,0.4666676 0.186667,0.4666676 h 1.418669 c 0.112,0 0.186667,-0.2053337 0.186667,-0.4666676 c 0,-0.2613338 -0.07467,-0.4666675 -0.186667,-0.4666675 h -1.418669 c -0.112,0 -0.186667,0.2053337 -0.186667,0.4666675 z m 5.37601,0 c 0,0.2613339 0.07467,0.4666676 0.186667,0.4666676 h 1.418669 c 0.112,0 0.186667,-0.2053337 0.186667,-0.4666676 c 0,-0.2613338 -0.07467,-0.4666675 -0.186667,-0.4666675 h -1.418669 c -0.112001,0 -0.186667,0.2053337 -0.186667,0.4666675 z m -5.37601,1.8666701 c 0,0.2613338 0.07467,0.4666675 0.186667,0.4666675 h 1.418669 c 0.112,0 0.186667,-0.2053337 0.186667,-0.4666675 c 0,-0.2613338 -0.07467,-0.4666675 -0.186667,-0.4666675 h -1.418669 c -0.112,0 -0.186667,0.2053337 -0.186667,0.4666675 z m 5.37601,0 c 0,0.2613338 0.07467,0.4666675 0.186667,0.4666675 h 1.418669 c 0.112,0 0.186667,-0.2053337 0.186667,-0.4666675 c 0,-0.2613338 -0.07467,-0.4666675 -0.186667,-0.4666675 h -1.418669 c -0.112001,0 -0.186667,0.2053337 -0.186667,0.4666675 z m -5.37601,1.8666696 c 0,0.261334 0.07467,0.466668 0.186667,0.466668 h 1.418669 c 0.112,0 0.186667,-0.205334 0.186667,-0.466668 c 0,-0.261333 -0.07467,-0.466667 -0.186667,-0.466667 h -1.418669 c -0.112,0 -0.186667,0.205334 -0.186667,0.466667 z m 5.37601,0 c 0,0.261334 0.07467,0.466668 0.186667,0.466668 h 1.418669 c 0.112,0 0.186667,-0.205334 0.186667,-0.466668 c 0,-0.261333 -0.07467,-0.466667 -0.186667,-0.466667 h -1.418669 c -0.112001,0 -0.186667,0.205334 -0.186667,0.466667 z m -4.480009,1.86667 c 0,0.261334 0.07467,0.466668 0.186667,0.466668 h 1.41867 c 0.112,0 0.186667,-0.205334 0.186667,-0.466668 c 0,-0.261333 -0.07467,-0.466667 -0.186667,-0.466667 h -1.41867 c -0.112,0 -0.186667,0.205334 -0.186667,0.466667 z m 3.584007,0 c 0,0.261334 0.07467,0.466668 0.186667,0.466668 h 1.418669 c 0.112,0 0.186667,-0.205334 0.186667,-0.466668 c 0,-0.261333 -0.07467,-0.466667 -0.186667,-0.466667 h -1.418669 c -0.112,0 -0.186667,0.205334 -0.186667,0.466667 z m -2.688005,1.86667 c 0,0.261334 0.07467,0.466668 0.186667,0.466668 h 3.210673 c 0.112,0 0.186667,-0.205334 0.186667,-0.466668 c 0,-0.261333 -0.07467,-0.466667 -0.186667,-0.466667 h -3.210673 c -0.112,0 -0.186667,0.205334 -0.186667,0.466667 z" id="path1771"/>
<path class="scanlines" d="m 56.514917,3.3333123 c 0,0.2613338 0.07467,0.4666675 0.186667,0.4666675 h 3.210672 c 0.112,0 0.186667,-0.2053337 0.186667,-0.4666675 c 0,-0.2613338 -0.07467,-0.4666675 -0.186667,-0.4666675 h -3.210672 c -0.112,0 -0.186667,0.2053337 -0.186667,0.4666675 z m -0.896002,1.86667 c 0,0.2613338 0.07467,0.4666675 0.186667,0.4666675 h 1.418669 c 0.112001,0 0.186667,-0.2053337 0.186667,-0.4666675 c 0,-0.2613338 -0.07467,-0.4666675 -0.186667,-0.4666675 h -1.418669 c -0.112,0 -0.186667,0.2053337 -0.186667,0.4666675 z m 3.584007,0 c 0,0.2613338 0.07467,0.4666675 0.186667,0.4666675 h 1.418669 c 0.112,0 0.186667,-0.2053337 0.186667,-0.4666675 c 0,-0.2613338 -0.07467,-0.4666675 -0.186667,-0.4666675 h -1.418669 c -0.112001,0 -0.186667,0.2053337 -0.186667,0.4666675 z m -4.480008,1.86667 c 0,0.2613339 0.07467,0.4666676 0.186667,0.4666676 h 1.418669 c 0.112,0 0.186667,-0.2053337 0.186667,-0.4666676 c 0,-0.2613338 -0.07467,-0.4666675 -0.186667,-0.4666675 h -1.418669 c -0.112001,0 -0.186667,0.2053337 -0.186667,0.4666675 z m 5.376009,0 c 0,0.2613339 0.07467,0.4666676 0.186667,0.4666676 h 1.418669 c 0.112001,0 0.186667,-0.2053337 0.186667,-0.4666676 c 0,-0.2613338 -0.07467,-0.4666675 -0.186667,-0.4666675 h -1.418669 c -0.112,0 -0.186667,0.2053337 -0.186667,0.4666675 z m -5.376009,1.8666701 c 0,0.2613338 0.07467,0.4666675 0.186667,0.4666675 h 1.418669 c 0.112,0 0.186667,-0.2053337 0.186667,-0.4666675 c 0,-0.2613338 -0.07467,-0.4666675 -0.186667,-0.4666675 h -1.418669 c -0.112001,0 -0.186667,0.2053337 -0.186667,0.4666675 z m 5.376009,0 c 0,0.2613338 0.07467,0.4666675 0.186667,0.4666675 h 1.418669 c 0.112001,0 0.186667,-0.2053337 0.186667,-0.4666675 c 0,-0.2613338 -0.07467,-0.4666675 -0.186667,-0.4666675 h -1.418669 c -0.112,0 -0.186667,0.2053337 -0.186667,0.4666675 z m -5.376009,1.8666696 c 0,0.261334 0.07467,0.466668 0.186667,0.466668 h 1.418669 c 0.112,0 0.186667,-0.205334 0.186667,-0.466668 c 0,-0.261333 -0.07467,-0.466667 -0.186667,-0.466667 h -1.418669 c -0.112001,0 -0.186667,0.205334 -0.186667,0.466667 z m 5.376009,0 c 0,0.261334 0.07467,0.466668 0.186667,0.466668 h 1.418669 c 0.112001,0 0.186667,-0.205334 0.186667,-0.466668 c 0,-0.261333 -0.07467,-0.466667 -0.186667,-0.466667 h -1.418669 c -0.112,0 -0.186667,0.205334 -0.186667,0.466667 z m -4.480008,1.86667 c 0,0.261334 0.07467,0.466668 0.186667,0.466668 h 1.418669 c 0.112001,0 0.186667,-0.205334 0.186667,-0.466668 c 0,-0.261333 -0.07467,-0.466667 -0.186667,-0.466667 h -1.418669 c -0.112,0 -0.186667,0.205334 -0.186667,0.466667 z m 3.584007,0 c 0,0.261334 0.07467,0.466668 0.186667,0.466668 h 1.418669 c 0.112,0 0.186667,-0.205334 0.186667,-0.466668 c 0,-0.261333 -0.07467,-0.466667 -0.186667,-0.466667 h -1.418669 c -0.112001,0 -0.186667,0.205334 -0.186667,0.466667 z m -2.688005,1.86667 c 0,0.261334 0.07467,0.466668 0.186667,0.466668 h 3.210672 c 0.112,0 0.186667,-0.205334 0.186667,-0.466668 c 0,-0.261333 -0.07467,-0.466667 -0.186667,-0.466667 h -3.210672 c -0.112,0 -0.186667,0.205334 -0.186667,0.466667 z" id="path1773"/>
</g>
<g class="dotnet">
<path d="m 65.076956,12.647997 q 0.466667,0 0.784001,0.336 q 0.336001,0.336001 0.336001,0.802669 q 0,0.504 -0.354668,0.858668 q -0.354667,0.354667 -0.858668,0.354667 q -0.448001,0 -0.802668,-0.298667 q -0.336001,-0.298667 -0.336001,-0.746668 q 0,-0.541335 0.354668,-0.914669 q 0.354667,-0.392 0.877335,-0.392 z" id="path1756"/>
<path d="m 68.362297,13.394665 l 1.661336,-4.6480086 q 0.112,-0.2240004 0.09333,-0.5040009 q -0.01867,-0.2800005 -0.224001,-0.2800005 q -0.410667,0 -0.933335,0.4293341 q -0.504001,0.4106674 -0.578668,0.4106674 q -0.205333,0 -0.205333,-0.3920007 q 0,-0.3920007 0.858668,-1.1013353 q 0.858668,-0.7093346 1.680003,-0.7093346 q 1.064002,0 0.634668,1.86667 q -0.01867,0.093333 0.056,0.1306669 q 0.07467,0.037333 0.149334,-0.018667 q 1.997336,-1.9786702 3.714673,-1.9786702 q 0.634668,0 0.765335,0.7840014 q 0.149333,0.7653347 -0.168001,1.6426696 l -1.437336,4.1253411 q -0.112,0.317334 0.149334,0.317334 q 0.392001,0 0.914668,-0.448001 q 0.522668,-0.448001 0.616001,-0.448001 q 0.130667,0 0.130667,0.242667 q 0,0.522668 -0.952001,1.306669 q -0.952002,0.765335 -1.75467,0.765335 q -0.821335,0 -0.821335,-0.765335 q 0,-0.28 0.112,-0.578668 l 1.493336,-4.2560073 q 0.597335,-1.6426696 -0.01867,-1.6426696 q -0.840001,0 -1.848003,1.1573354 q -1.008002,1.1573354 -1.773336,2.6133385 q -0.746668,1.437335 -1.269336,2.893338 q -0.186667,0.560001 -0.448001,0.578668 q -0.224,0.01867 -0.560001,-0.186667 q -0.317334,-0.186667 -0.317334,-0.280001 q 0,-0.224 0.280001,-1.026668 z" id="path1758"/>
<path d="m 79.487639,10.071992 q 0,0.130667 0.112,0.130667 q 1.026669,0 1.829337,-0.8026681 q 0.821335,-0.8213348 0.821335,-1.6053362 q 0,-0.4480008 -0.672001,-0.4480008 q -0.448001,0 -1.269336,1.0266685 q -0.821335,1.0080018 -0.821335,1.6986696 z m 2.370671,-3.4720061 q 1.792003,0 1.792003,1.4373359 q 0,1.0453352 -1.512002,1.9600035 q -1.493336,0.8960017 -2.725339,0.8960017 q -0.130667,0 -0.224,0.317334 q -0.09333,0.298667 -0.09333,0.616001 q 0,0.728001 0.280001,1.250669 q 0.28,0.522668 0.858668,0.522668 q 0.373334,0 0.802668,-0.205334 q 0.429334,-0.224001 0.728002,-0.448001 q 0.298667,-0.224 0.354667,-0.224 q 0.261334,0 0.261334,0.448 q 0,0.429335 -0.989335,1.064002 q -0.989336,0.616001 -1.978671,0.616001 q -0.914668,0 -1.437336,-0.821334 q -0.522667,-0.821335 -0.522667,-1.885337 q 0,-2.053337 1.400002,-3.7893403 q 1.400003,-1.7546698 3.005339,-1.7546698 z" id="path1760"/>
<path d="m 87.663666,4.9759829 q 0.317334,0 0.317334,0.4666675 q 0,0.4480009 -0.280001,1.5306695 h 1.885337 q 0.485334,0 0.485334,0.2800005 q 0,0.186667 -0.298667,0.4853342 q -0.280001,0.2800005 -0.560001,0.2800005 h -1.736003 l -1.362669,5.1333429 q -0.07467,0.317334 0.149333,0.317334 q 0.392001,0 0.914668,-0.448001 q 0.522668,-0.448001 0.616002,-0.448001 q 0.130666,0 0.130666,0.242667 q 0,0.522668 -0.914668,1.306669 q -0.896001,0.765335 -1.69867,0.765335 q -0.821334,0 -0.821334,-0.765335 q 0,-0.130667 0.112,-0.578668 l 1.456002,-5.5253429 h -0.877334 q -0.429335,0 -0.429335,-0.2613338 q 0,-0.2426671 0.242668,-0.5040009 q 0.261333,-0.2800005 0.541334,-0.2800005 h 0.746668 l 0.261334,-1.0453352 q 0.03733,-0.2240005 0.373334,-0.5786678 q 0.354667,-0.373334 0.746668,-0.373334 z" id="path1762"/>
</g>
</g>
</svg></a></li>
<li><a href="dec/">DEC</a></li>
</ol>
</nav>
</header>
<h1>LK201 Keyboard</h1>
<p>The VT320 came with an LK201 keyboard, although it works quite happily with
an LK401, which comes with the newer VT420. I haven't had much luck deciphering
the initial conversation that takes place between the VT320 and an LK201 just
by running the VT320 firmware on my emulator. All I know so far is that the
terminal expects to see four bytes when the keyboard powers up. (That last
sentence sounds odd, because the keyboard obviously powers up at the same time
as the terminal. What I mean is that the keyboard has its own microcontroller,
a Motorola MC68HC05 and it does some of its own tests before talking to the
terminal).</p>
<p>Dan McMahill has produced a great document which explains the
<a href="https://www.netbsd.org/docs/Hardware/Machines/DEC/lk201.html">LK201
Keyboard Interface</a>. That helped explain what the first four bytes should
be, as well as explaining the characteristics of the serial link between the
terminal and the keyboard.</p>
<h2>Startup without errors</h2>
<p>I've now hacked into the keyboard wire and tapped off the data connections
into a 25-way D-type connector, so I can watch the initial conversation on
my shiny ARC Protocol Analyser. The conversation below is between
a VT320 with Rev 1.2 firmware and an LK201 with Rev D01 firmware.
I don't have any timing information for this, so it is occasionally unclear
which byte came first when one from each end is shown vertically aligned.
I believe that where two bytes are vertically aligned, the keyboard one
was sent first. That makes more sense, though I haven't proved it.</p>
<pre style="overflow:scroll">
All bytes are shown in hex. VT = terminal, KB = keyboard.
VT 55 11 8F 13 82 11 8F 13 83 11 8F 13 84 11 8F 13 85 11 8F 13 84
KB 01 00 00 00 B6 BA
VT 11 8F 13 85 11 8F 13 84 11 8F 13 85 11 8F 13 88 11 8F 13 89 11 8F 13 90
KB
VT FD 0A 80 12 81 1A 80 3A 81 42 81 4A 82 5A 82 62 82 6A 82 72 82
KB 01 00 00 00 BA BA BA BA BA BA BA BA BA
VT A2 78 64 9E 7A 64 9E 7C 64 9E 99 E3 11 8F 13 80 11 8E 13 81 FD
KB BA BA 01 00 00
VT 0A 80 12 81 1A 80 3A 81 42 81 4A 82 5A 82 62 82 6A 82 72 82 A2 78 64
KB 00 BA BA BA BA BA BA BA BA BA BA BA
VT 9E 7A 64 9E 7C 64 9E 99 E3 11 8F 13 80 A7 11 8E 13 81 11 8F 13 80
KB
</pre>
<p>All of the above conversation takes place during the terminal's POST
(Power-on Self Test) before a single key has been pressed! However, it is
repetitive and I've decoded it with the help of Dan's document and
correspondence with him.</p>
<p>When the VT sends <code>13</code> or <code>11</code> followed by one byte,
it is turning one or
more of the keyboard LEDs on or off, respectively. Having disregarded these,
the next biggest chunk of commands and responses are to do with setting up
the modes of certain keyboard divisions, ie. whether the keyboard should
report key up and/or key down transitions and whether auto-repeat is enabled.</p>
<pre style="overflow:scroll">
div mm rr
0A 80 -&gt; 0 0001 01 0 100000 00 Set keyboard division 1 (letter keys)
to autodown mode and use autorepeat
register 0.
12 81 -&gt; 0 0010 01 0 100000 01 Div 2 (numeric keypad), autodown, reg 1
1A 80 -&gt; 0 0011 01 0 100000 00 Div 3 (Delete key), autodown, reg 0
3A 81 -&gt; 0 0111 01 0 100000 00 Div 7 (left/right arrows), autodown, reg 0
42 81 -&gt; 0 1000 01 0 100000 01 Div 8 (up/down arrows), autodown, reg 1
4A 82 -&gt; 0 1001 01 0 100000 10 Div 9 (E1-E6), autodown, reg 2
5A 82 -&gt; 0 1011 01 0 100000 10 Div 11 (F6-F10), autodown, reg 2
62 82 -&gt; 0 1100 01 0 100000 10 Div 12 (F11-F14), autodown, reg 2
6A 82 -&gt; 0 1101 01 0 100000 10 Div 13 (Help,Do), autodown, reg 2
72 82 -&gt; 0 1110 01 0 100000 10 Div 14 (F17-F20), autodown, reg 2
A2 -&gt; 1 0100 01 0 Div 4 (Tab key), autodown, default repeat</pre>
<p>The keyboard responds with <code>BA</code> to acknowledge these commands.
The autorepeat rate in the four available registers is programmed by the
next group of commands, which each have three bytes.</p>
<pre>
rr timeout rate
78 64 9E -&gt; 01111 00 0 0 1100100 1 0011110
7A 64 9E -&gt; 01111 01 0 0 1100100 1 0011110
7C 64 9E -&gt; 01111 10 0 0 1100100 1 0011110
</pre>
<p>Autorepeat registers 0, 1 and 2 are programmed to the same settings: timeout
of 500ms before starting to repeat (100 * 5ms) and 30 repeats per
second.</p>
<h2>Startup with errors</h2>
<p>I recorded the following conversation of the startup sequence while holding
down the left shift key. The keyboard changes its POST results string from
<code>01 00 00 00</code> to one that incorporates the keycode of the key that
is held down, in this case, <code>01 00 3D AE</code>. When the terminal sees this,
it resets the terminal several times in the hope that the key will be lifted.
If it isn't lifted, the terminal still performs the full setup on the keyboard,
but will repeat the setup when the keyboard reports that everything is OK again.</p>
<pre style="overflow:scroll">
All bytes are shown in hex. VT = terminal, KB = keyboard.
VT 55 11 8F 13 82 11 8F 13 83 11 8F 13 84 11 8F 13 85 11 8F 13 84
KB 01 00 3D AE
VT 11 8F 13 85 11 8F 13 84 11 8F 13 85 11 8F 13 88 11 8F 13 89 11 8F 13 90
KB
VT FD FD FD 0A 80 12 81 1A 80 3A 81 42 81 4A 82
KB 01 00 3D AE 01 00 3D AE 01 00 3D AE
VT 5A 82 62 82 6A 82 72 82 A2 78 64 9E 7A 64 9E 7C 64 9E 99 E3 11 8F 13 80
KB
VT 11 8E 13 81 FD 0A 80 12 81 1A 80 3A 81 42 81 4A 82 5A 82 62 82
KB
VT 6A 82 72 82 A2 78 64 9E 7A 64 9E 7C 64 9E 99 E3 11 8F 13 80 0A 80 12 81
KB
VT 1A 80 3A 81 42 81 4A 82 5A 82 62 82 6A 82 72 82 A2 78 64 9E 7A 64 9E 7C
KB
VT 64 9E 99 E3 11 8F 13 80 11 8E 13 81 11 8F 13 80
KB
</pre>
<p>While typing this in I notice that I've not recorded the keyboard's
acknowledgement of mode changes (the single byte <code>BA</code>) but you
can mentally insert them in the same positions as the first conversation.</p>
<p>When the stuck key is released, the keyboard immediately sends the POST
results to report everything is OK and the terminal reciprocates by performing
the autorepeat setups.</p>
<pre style="overflow:scroll">
All bytes are shown in hex. VT = terminal, KB = keyboard.
VT 0A 80 12 81 1A 80 3A 81 42 81 4A 82 5A 82 62 82 6A 82 72 82 A2
KB 01 00 00 00 BA BA BA BA BA BA BA BA BA
VT 78 64 9E 7A 64 9E 7C 64 9E 99 E3 11 8F 13 80
KB BA BA
</pre>
<footer>
Copyright 1998 <a href="https://hisdeedsaredust.com">Paul Flo Williams</a>.
</footer>
</body>
</html>