mirror of
https://git.k-space.ee/arti/vt1200.git
synced 2026-10-31 12:05:05 +02:00
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.
83 lines
3.0 KiB
Markdown
83 lines
3.0 KiB
Markdown
# Bluetooth to LK201 bridge for DEC video terminals
|
|
|
|
<img src="./images/vtbt.jpg" width="30%"/> <img src="./images/vtbt_with_devkit.jpg" width="30%"/>
|
|
|
|
This repository contains Zephyr RTOS firmware code and KiCad hardware files for
|
|
a device which interfaces a DEC VT to a Bluetooth keyboard via an emulated
|
|
LK201 interface.
|
|
|
|
The vtbt board has a socket for an ESP32-C3-DevKitM-1 which provides the
|
|
microcontroller and Bluetooth functionality (as well as 3.3V regulation). The
|
|
vtbt provides power from the keyboard interface's 12V supply, performs RS-423
|
|
level conversion for the serial interface and has the four LEDs and magnetic
|
|
buzzer found in a real LK201 because Bluetooth keyboards are unlikely to have
|
|
those.
|
|
|
|
I built this after I spent great effort to obtain a VT420 but then neglected to
|
|
use it due to frustrations with the infamous LK401 keyboard. Once I got the
|
|
vtbt capable of "self-hosting", I used it with my VT420 to finish developing
|
|
the firmware over a serial console. I found that the terminal actually provides
|
|
a very enjoyable and relaxing experience with a decent keyboard!
|
|
|
|
## What works
|
|
|
|
Everything documented in the VCB02 Video Subsystem Technical manual is
|
|
implemented including:
|
|
|
|
* Beeps, keyclicks, beep and keyclick volumes
|
|
* The four LK201 LED indicators
|
|
* Per-key-division auto-repeat, up-down, down-only modes
|
|
* All mode-setting operations for changing modes and auto-repeat timings
|
|
|
|
## What doesn't work
|
|
|
|
I've only tested the vtbt with DEC VT420 terminals.
|
|
|
|
The key mapping is set up for the VT420's default "<> Key Sends `~" and "`~ Key
|
|
Sends ESC" settings. It may need adjustment for other terminals or
|
|
configurations.
|
|
|
|
Similarly, Alt keys, which are disabled by default on the VT420, are not
|
|
supported, but support could be added.
|
|
|
|
Compose keys have not been tested.
|
|
|
|
## Usage
|
|
|
|
1. Build and flash the firmware to an ESP32-C3-DevKitM-1 connected over USB.
|
|
|
|
From a Zephyr environment:
|
|
|
|
```west flash```
|
|
|
|
2. Mount the ESP32-C3-DevKitM-1 on the vtbt with the USB port facing the vtbt's
|
|
modular connector and the ESP32-C3 and antenna on the side with the LEDs.
|
|
|
|
3. Connect the vtbt to a DEC terminal with a rollover-wired 4P4C module cable
|
|
(like a phone handset cable).
|
|
|
|
4. Turn on the DEC terminal. The vtbt will display the terminal's power-up
|
|
self-test sequence on its four LEDs followed by a beep.
|
|
|
|
5. Connect to a Bluetooth keyboard.
|
|
|
|
The firmware indicates Bluetooth status via the ESP32-C3-DevKitM-1's RGB
|
|
LED.
|
|
|
|
Blue means it is searching for a Bluetooth keyboard.
|
|
|
|
Green means it has found a keyboard and is awaiting authorization. To
|
|
authorize, type 123456<Enter> on the keyboard.
|
|
|
|
Orange means it is connected to a keyboard and processing keyboard events.
|
|
|
|
The firmware stores bonded devices and automatically reconnects to them.
|
|
|
|
## Development
|
|
|
|
The vtbt's modular connector blocks the ESP32-C3-DevKitM-1's USB port, but for
|
|
quicker iterations a pair of pin headers as spacers will make it taller.
|
|
|
|
vtemu.py in this repository can be used as a basic emulation of a DEC terminal
|
|
for testing.
|