Pretty fascinating, I found the tip of the iceberg on XTerm's src [0] but it's kinda table driven so hard to tell what's going on :-). I just wanted to see exactly how much code was there in XTerm to support hardware that was popular between the 70s and early 80s.. [1]
0: https://github.com/joejulian/xterm/blob/defc6dd5684a12dc8e56...
1: https://en.wikipedia.org/wiki/Tektronix_4010