SDL DMD 5620 Emulator
Find a file
2025-01-27 15:30:56 -08:00
assets Supply desktop file and icons 2025-01-27 15:30:56 -08:00
dmd_core@ee222b68db Fix timing issues and use v0.7.2 of dmd_core 2025-01-24 10:38:25 -08:00
src Supply desktop file and icons 2025-01-27 15:30:56 -08:00
.clang-format Run at target rate, better keyboard handling 2025-01-23 04:37:28 -08:00
.gitignore Initial Checkin 2025-01-21 12:34:59 -08:00
.gitmodules Initial Checkin 2025-01-21 12:34:59 -08:00
dmd5620.man Remove unused assets and prepare release 0.1.0 2025-01-27 09:26:47 -08:00
LICENSE.md Initial Checkin 2025-01-21 12:34:59 -08:00
Makefile Supply desktop file and icons 2025-01-27 15:30:56 -08:00
README.md Remove unused assets and prepare release 0.1.0 2025-01-27 09:26:47 -08:00

SDL DMD 5620 Emulator

This is an SDL2 implementation of an AT&T / Teletype DMD 5620 emulator.

For additional information and documentation beyond this README file, please visit https://loomcom.com/3b2/dmd5620-emulator/.

Status

Version: 0.1.0

This is an actively developed project. Bug reports and feature enhancements are welcome.

Dependencies

The executable has the following dependencies:

  • SDL2 (libSDL2)

For building, a C99 compiler and the Rust toolchain (version 1.50 or later) are also required.

Building

  • Clone with git clone --recursive to make sure submodules are up to date, or run git submodule init; git submodule update.
  • Ensure that the Rust toolchain is installed. This is most easily done using the rustup installation script. For more information, see https://rustlang.org/ and https://rustup.rs/
  • Type make

Usage

Running the Terminal

Usage: dmd5620 [-h] [-v] [-i] [-d DEV|-s SHELL] [-f VER] [-n FILE]
AT&T DMD 5620 Terminal emulator.

-h, --help              display help and exit
-v, --version           display version and exit
-i, --inherit           inherit parent environment
-f, --firmware VER      Firmware version ("8;7;3" or "8;7;5")
-d, --device DEV        serial port name (e.g. "/dev/ttyUSB0")
-s, --shell SHELL       execute SHELL instead of default user shell
-n, --nvram FILE        store nvram state in FILE
  • --help displays the help shown above, and exits.
  • --version displays the executable version number, and exits.
  • --inherit inherit parent shell environment.
  • --firmware VER selects the firmware version to use. Older DMD terminals used firmware version "8;7;3". Newer terminals used firmware version "8;7;5". The version must be specified as a string, and is "8;7;5" by default.
  • --device DEV will attach the terminal to the specified physical or virtual serial device (e.g. "/dev/ttyS0")
  • --shell SHELL will execute the specified shell (e.g. "/bin/sh")
  • --nvram FILE causes terminal parameters stored in non-volatile memory to be persisted to FILE.

Example usage:

$ dmd5620 --nvram ~/.dmd5620_nvram --shell /bin/sh
$ dmd5620 --firmware "8;7;3" --nvram ~/.dmd5620_nvram --device /dev/ttyS0

Using the Terminal with socat

A major goal of this terminal emulator is to provide a way to interact with the OpenSIMH 3B2 Emulator. An excellent way to accomplish this, if running BSD or Linux, is to use the socat program to forward a virtual serial port on the 3B2 simulator to a pty running on the host computer.

First, you will need to configure the 3B2 emulator to use raw TCP instead of the Telnet protocol for its virtual serial connection by adding the notelnet option to the serial port configuration in OpenSIMH. For example, changing from:

ATTACH CONTTY 9100

to:

ATTACH CONTTY 9100;notelnet

Next, run socat and redirect TCP traffic from this port to a PTY:

sudo socat TCP:localhost:9100 pty,raw,echo=0,mode=660,link=/dev/ttyDMD

This creates a pty at /dev/ttyDMD that the DMD5620 can use.

dmd5620 -d /dev/ttyDMD [additional options ...]

Note that there may be permission issues accessing the device. Depending on the operating system you're using, you may need to add the user running dmd5620 to a specific group with permission to read and write the pty device you've used with socat.

Configuration

All configuration of the terminal is done by pressing the F9 key, which shows a series of menu buttons at the bottom of the screen. These buttons reveal menus that allow you to set the baud rate, reverse the video colors, turn on and off the bell, and so forth.

In firmware version "8;7;3", these buttons are navigated by pressing TAB or BACKSPACE to move around, and pressing SPACE to change the values.

In firmware version "8;7;5", the function keys or the mouse select and change the values.

Full documentation is available here: https://archives.loomcom.com/3b2/documents/DMD_Terminal/

Key Map

Certain keys are mapped to special DMD5620 function keys.

  • F1-F8 are mapped directly to terminal F1-F8
  • F9 is mapped to the DMD5620's SETUP key.
  • Shift+F9 is mapped to the terminal's RESET functionality.

Changelog

Version 0.1.0 (27 January, 2025)

  • Initial release, suitable for testing. This has been tested on Linux, but not yet on any other operating system.

To Do

  • Local serial line support is not yet implemented.

See Also

  • dmd_gtk: An implementation of the emulator in GTK+ 3.0.
  • dmd_core: DMD 5620 core implementation library, used by this project.

License

MIT license. See the file LICENSE.md

Copyright (c) 2025, Seth Morabito <web@loomcom.com>