Real VT102 Emulation with MAME
19 days ago
- #vt102-emulation
- #mame
- #terminal-emulators
- Terminal emulators like iTerm2, PuTTY, GNOME Terminal, and xterm emulate the VT102 terminal, originally from DEC.
- xterm and modern terminal emulators implement VT102 features by following documentation, but lack comprehensive test suites for compatibility.
- Terminal emulators are tested by running applications to check for visual inconsistencies, leading to some feature loss over generations.
- MAME, originally for arcade games, can emulate a VT102 terminal using original firmware, providing a near-authentic experience.
- Setting up a MAME-emulated VT102 involves installing MAME, configuring it with specific command-line options, and adjusting terminal settings.
- The emulated VT102 requires configuration via a setup screen, including switching to 'ON LINE' mode for proper operation.
- MAME creates a PTY (pseudo-terminal) for the VT102, which needs manual configuration using `stty` for correct behavior.
- Running a shell in the emulated VT102 involves setting environment variables like `TERM=vt102` and configuring the PTY for input/output.
- The VT102's 128-character input buffer and flow control (XON/XOFF) can cause issues with fast output, leading to garbled text.
- Controlling terminal setup is missing in MAME's emulation, affecting job management and application behavior in the shell.
- Using `getty` with `setsid` can partially solve the controlling terminal issue but requires root access and additional configuration.
- MAME's VT102 emulation is a novelty but has limitations like flow control problems and lack of proper terminal setup tools.