larsbrinkhoff / terminal-simulator

Simulation of VT52 and VT100 terminal hardware.
GNU General Public License v3.0
113 stars 17 forks source link

Incoming characters sometimes dropped #13

Open larsbrinkhoff opened 3 years ago

larsbrinkhoff commented 3 years ago

Incoming characters are sometimes dropped. Smooth scrolling exacerbates this problem. Also receiving at 19200 baud. Is this a hardware or firmware limitation, or is the simulation in error?

CC @kidmirage

larsbrinkhoff commented 3 years ago

This is interesting: https://www.raspberrypi.org/forums/viewtopic.php?t=268901

I run the VT100 at 19200 baud, 7S

During the boot sequence, many of the characters are displayed as white blocks. Telnet to "telnet towel.blinkenlights.nl" does not work properly and occasionally, editing in vi results in the screen reversing.

One of the answers:

The VT100 is a relatively slow device and is therefore rate limited - possibly to less than the selected baud rate can support - and particularly if you have smooth scrolling engaged. DEC typically used Xon/Xoff flow control rather than the hardware flow control lines

Later experimentation suggest the poster found the terminal fully stable only at 4800 baud.

larsbrinkhoff commented 3 years ago

Appendix C - Fill Character Requirements says that the VT100 needs hefty delays when scrolling, even jump scrolling.

larsbrinkhoff commented 3 years ago

Tested with flow control: switchpack 2 last bit set to 1, and stty ixon. Confirmed problem still remains when scrolling is needed.

Logging the debug output I can see UART | OUT tx data 13 which is the XOFF sent by the terminal. However, the host keeps sending data in spite of this. Maybe flow control isn't implemented in pseudo-ttys? I will also try a real serial port later.