Integrating a VT220 into my life
drewdevault.com
drewdevault.com
I've always wanted an ultra-low-power dumb terminal using eInk paper displays - something you could hit days of runtime with using a small battery pack. eInk uses no power when they're not updating - so idling or long-running operations would hardly use any power.
So far the easiest approach I've found is using a hacked Kindle with an attached keyboard. You can run a terminal client on it and ssh into another system, which I think is a sensible access mode.
Ideally, something like the AVR PicoPower microcontrollers would be fantastic - they run on ultra-low-voltage, eat 1 mA/MIPS, and idle down to basically nothing (<1ma active and a few dozen microamps during sleep). ssh is probably out of the question but I could toss a VT100 stack on it. Unfortunately the eInk display is the hard part there - most eInk parts have very poor documentation.
Can't speak for the other guy (who wants a portable monitor+keyboard system), but what I'm mostly looking for is a terminal that I could carry around/outside the house (i.e. potentially high-glare conditions) and program while connected to wifi, while not recharging for as long as possible, so this is perfect.
Maybe I can embed some stuff like vim or emacs on the device itself to help reduce utilization of the wifi. Is there any sort of "smart" protocol that could handle buffering files while editing on a remote host? I can probably do it, but I'd rather not reinvent the wheel, caching can be non-trivial.
Secondary use-case: RTTY or PSK31 or other amateur-radio textmode terminal, that could idle for as long as possible on a portable (QRP) battery pack. When you're schlepping the gear around, every ounce counts. Something that can talk serial is probably good enough, wifi is redundant there.
If I can find a paper-ink display that I can drive somehow with a UART, I'd be quite happy to wire it up and hack up a MagicShifter app that turns it into a dumb terminal. Know of such a thing?
They have a horrible bit of forcing the user to connect an account online during first power-up. This can be avoided with a bit of SQL. This site talks about "activating" without the desktop app (and other bits of tinkering):http://uscoffings.net/clc/tech/embedded/kobo-touch/
>Connect the Kobo via USB, and mount its onboard storage on your desktop machine.
> Ensure you have an SQLite3 database browser installed, or some way to execute SQL. For example, sudo apt-get install sqlitebrowser
> Open /mnt/onboard/.kobo/KoboReader.sqlite.
> Execute this SQL: insert into USER values("foo", "foo", "foo", "foo", "foo");
> Save, unmount, and disconnect.
Here's a bit about enabling Telnet (and cross compiling for Arm7): https://github.com/drj11/kobonotes
Here's someone who turned their Kobo into a GPS for their glider. http://hackaday.com/2014/05/28/e-reader-becomes-sailplane-an...
The appeal, at least to me, is that they can display information with little energy cost. For example you could have it monitor the system's health and have it update every half an hour, showing graphs and such, and it would be able to do that for a very long time with a smallish battery.
When Steve Jobs left Apple and started NeXT, he pitched Adobe on the idea of using PS as the display system for his new workstation computers. The result was Display PostScript, or DPS. DPS added basic functionality to improve performance by changing many string lookups into 32 bit integers, adding support for direct output with every command, and adding functions to allow the GUI to inspect the diagram. Additionally, a set of "bindings" was provided to allow PS code to be called directly from the C programming language. NeXT used these bindings in their NeXTStep system to provide an object oriented graphics system. Although DPS was written in conjunction with NeXT, Adobe sold it commercially and it was a common feature of most Unix workstations in the 1990s.
http://www.codersnotes.com/notes/a-constructive-look-at-temp...
Terry himself is schizophrenic but it's a fascinating piece of outsider art in many respects. He's even posted on HN under several accounts, but he's aggressive and disruptive and inevitably ends up banned.
I read some of your post history - can you explain how what you were doing with Ticketmaster was systems programming? It sounds like what would now be considered application programming, but I have no idea how intensive your work was at the time. High-performance code can often cross the line.
TempleOS is simply fascinating. I'm sure you know that I can't agree on the 'divine' part but it's certainly a fascinating OS. Writing an OS is a tough task by any means, let alone a reasonably fast one with a novel presentation. That's a lot of work, even for a productive OS programmer.
Have you taken a look at MenuetOS, Plan9, Oberon, or other non-traditional OSs? I'm curious what you have to think of their own unique features.
I applaud your goal of taking it back to basics. I think you're largely right about the number of abstractions between you and the hardware. Really really fast code needs to be written close to the metal.
I worked in VAX assembly language.
I did firmware for a bar code reader networking device with keypad and display. I worked on image processing for an actual bar code reader itself.
I worked there 1990-1996. About half was user space. The other half was kernel or firmware on bare metal.
-----
Pat and I started at the same time. He was in school with me, in fact in my differential equations class. He dropped out of school. I stayed in and got my master's in electrical engineering while working part time at Ticketmaster. I graduated with master's in 1994 and stayed with Ticketmaster for a year.
I returned to Ticketmaster for 3 weeks in 2002. Pat was a boss.
It seems quite odd that old VT terminal hardware is still in use, while it would be almost impossible to resurrect something like NeWS. A case of complexity I guess, but also the worrying volatility of storage media.
There are also some e-ink Android tablets, but I forgot if I found any that seemed good.
I also have a strong desire to ssh by e-ink, latency be damned.
https://www.youtube.com/watch?v=ymei7UwBgX4
Looks like it's running a pretend-terminal website which probably explains the latency (the Kindle does not have a fast processor).
Way on the other end - here's a Dasung 13.3" eInk monitor (i.e. you feed it DVI and it handles all the display driving for you). It can be yours for a cool $1000. I'll pass, but it's looking pretty good even for GUI usage. Probably uses more power than a purely embedded solution could, though.
My method was extremely rudimentary - inotify -> long-polling JS (being fed entire new file) -> innerHTML rewriting, with the Kindle connected over 802.11g - but hitting Save in my editor produced updates on the Kindle's display in around around 20-40ms.
I would put a moderate amount of money on the possibility that the latency is coming from the fact that the terminal app in the video is being run on a non-local server, and that keystrokes have to go up to the cloud-hosted app and then come back down to get onto the Kindle's display.
If the whole thing were local (with the terminal app hosted on target system, ideally) I expect updates could happen in <100ms.
Also, the CPU is a 1GHz i.MX6 (@ 996MHz), next to 400MHz LPDDR2 (@ 396MHz). It performs quite well in my experience; it's the OS that's terrible. :P
(The best OS I've yet seen was the one on my Ericsson MC218, which let me drag windows around the display faster than the LCD crystals could physically keep up. Solid windows, not outlines. On an ARM7TDMI running at 36MHz.)
Actually, depending on what you are doing, the nostalgia-induced slowness might even be intended.
That'd still be painful for interactive use, though.
An article on here a little while back goes into detail about how even very small latencies affect the typing process: https://news.ycombinator.com/item?id=10787812
[1] Yes, I know it takes longer on an e-ink display to refresh the entire screen than to update a single character. My point is that page turning speed is thought by most to be unimportant, but being used to PC interfaces with fast response times made it unbearable to me, especially when I was skipping through pages trying to find something.
I've recently had to understand exactly which control characters are sent between the app and the terminal (emulator) for delete and backspace.
Guess which ASCII control characters is sent by the Backspace key on your PC keyboard? ASCII DEL (0x7F/^?)! All modern terminal emulators on Linux and OS X (including the Linux console, xterm and libvte-based terminals, OS X Terminal.app and iTerm2) now default to sending DEL [1] when you press the Backspace key... now it makes much more sense that on a Mac keyboard, that key is labeled "Delete" and used to have the same symbol as on the VT220!
Oh, and what character is sent when you press the (forward) Delete key? Why, the escape sequence 1B 5B 33 7E (ESC [ 3 ~), of course :) Because the terminals we emulate didn't have a key for forward delete ;)
For bonus credit, lookup the historical usage of the Linefeed (LF/0xA/^J) and CarriageReturn (CR/0xD/^M) characters [2]. There was much more than just the Unix/Mac/Windows divide in text files...
[1] yes, you can swap for ASCII BS (8/^H), but if your app needs that, consider updating it.
Its not to be sneezed at for doing serious programming work. The green on black, text only CRT was super high contrast (especially compared to any modern LCD), and the complete lack of distractions that come with a multitasking desktop environment (email notifications, chat, web browsers, Facebook, etc) mean that it's productive for serious work, and pretty much only serious work. I'd happily do this again if I could get them for free, but paying shipping seems a bit much.
My Linux workstation's monitor was mainly in text-mode too. I used the Wyse to tail some logs and used vim and a shell for 'real' work on 2 VTs, with IRC and mutt on a couple more.
All this talk about how expensive serial terminals are now makes me think I should have kept some of the hundreds I threw away over the years, but then I think about the storage required!
But it's only 80x25! I may have read megabytes of email and Usenet on such things, but I always lusted over the big displays of the Suns that could fit 40 rows down, and change character size to match my desires.
So I'm all for adding more screen real estate, but a VT220 isn't my pick for best way to do that. I prefer a second large monitor in portrait mode.
- another large monitor
- my MTG cards collection back
- at least four magic cubes
- a nerf gun
and ... a VT220. At least I got that very same keyboard already.
Seriously, that looks like a really nice working space, completely ignoring the fact that I just learned about sway (I'm on i3 here) in the process.
http://www.computerhistory.org/revolution/mainframe-computer...
Generally though when using them on older machines I am amazed at how frustrating 80 columns of 24 (or 25) lines can be! Sure you can do "wide" mode and get 132 columns but still, the desire to see more screen real estate is a constant issue.
Although my idea was not necessarily integration in to my work flow, more a dashboard of network/server stats etc.
The business model for the $200 Wyse-60 is OMG our CNC milling machine's terminal is down and every day of production we miss on the missile contract costs us $50K, so I don't care how much it costs, ship one here by tomorrow morning, etc etc. Or you can haul away a Wyse-60 for free because the previous owner won't have to pay electronic recycling fee. That's the model I have. Its pretty nice for a dumb terminal.
Aside from plugging into a linux box and having another cheap screen for scrolling logs or whatever, I mostly use it for exotic hardware. Software terminals are generally not as compatible as hardware terminals (despite hardware terminals mostly being SBCs with exotic firmware) and if a hardware fault puts 220V on a connector and vaporizes my "free" terminal I'll be much less unhappy than if it vaporized my expensive main computer or even a rasp-pi. Also they boot very quickly, 3 seconds from flip the power to work, whereas a "modern advanced" computer takes maybe 5-10 minutes. So from a stopped condition, "I just wanna know if this PLC is alive or dead" can be answered in 6 seconds instead of 6 minutes.
Given that you can haul them away for free, depending how many dumb mistakes I make, I have roughly a lifetime supply.
Restoration of old hardware can be entertaining as a hobby in itself, I have to rip out the (inevitably leaking) dead nicads and replace them with a diode and dual AA battery holder, at least on my Wyse-60's.
The VT220 supports Sixels: https://en.wikipedia.org/wiki/Sixel
I wonder if PySixel would work on real hardware: https://github.com/saitoha/PySixel
HN thread about libsixel: https://news.ycombinator.com/item?id=11340367
I'm reading the source code of z80e (tui.c). Your idea of using unicode to display pixels is very interesting. I imagine a fallback mode for libsixel for terminals not sixel-compatible (or the opposite).
I try ton compile but it fails (first because scas was missing and now I have an "a2x: not found" in scas).
I appreciate a lot the "multitarget rendering" (emscripten, tui, sdl...).
I'd merge a pull request adding libsexl support!
Yes, thank you (I'm on Debian). I know a bit more after reading the wiki. I will follow the instructions for the sdk.
> I'd merge a pull request adding libsexl support!
Cool! I'm discovering the new world of custom tools for TI (KnightOS, Axe Parser, OS2...).
I will look at the SDL UI to see what I can do.
BTW z80 is good target for superoptimization and I'm very impressed by your toolchain and its history :)
Even now, I still use a variation on that - a tall terminal window, ssh, and screen - for the majority of my work.
I would kill to have a modern-day equivalent of the native UNIX desktop I had on a 4/110 after we ditched the 3/50's: the system had two frame buffers and you could switch between desktops by crossing the desktop boundary in any direction. Probably easier to just use two screens these days but at the time that meant putting two extremely large and deep CRTs on your desk.
Here we are 25 years later and xterm+ssh is still the easiest way to get my UNIX work done even if everything else (e-mail, productivity apps) is in Windows. Where's my modern-day NCD X terminal equivalent and unix desktop?
Although, I have switched to yellow text / red background for production and blue background for test environments. Keeps one from doing really stupid things.
I remember when I was a kid with access to a local university's systems, and the only way to do anything was with dumb terminals. I telnetted to MUDs, FTPed software, read Usenet — in a lot of ways those dumb terminals were smarter than my current computer. Sure, I can still do all that, but the magic is gone.
No one would let us near the hyper-expensive VAX with huge (21"?) vector monitor and light pen terminals.
We'd have tried to make asteroids of course :)
For fun at home I have an ADDS Regent 25 with a raspberry pi inside. Turn it on, it boots to Debian and binds to the network. I force the kids to play 'snake' on it when I'm sick of them using iPads.
In my home "office" I've got my VT102 tied to a PDP/8 simulator on a pi, with one of these kit front panels:
http://obsolescence.wix.com/obsolescence#!pidp-8/cbie
(Those were before my time, although I remember playing ADVENT on one (or a DEC 10?)I don't really use it for editing code, I just needed to put something on the screen that wasn't email or irc (which would reveal semi-sensitive information.)
Anybody come up with a version for iOS or Android yet? Seeing it on a tablet would be a real juxtaposition.
I recall finding the rendering impressive when playing around with the Mac version.
Phone switches, network devices, control panels, etc.
There were so many of them leftover from the switch to PC's and they always seemed to work (once you got the parity right). Usually in some closet somewhere, balanced on top of a box with the keyboard leaning against the wall. Need a power cable? Grab one from a PC, use it to power up, change some settings, turn it off and put the cable back.
Thank you Ken Olsen.
I do have an old French Minitel terminal, though - anyone know what the protocol for those is like?
I owned one for a while before selling it off (along with a 19" gas plasma flat panel for a MicroVAX that I got at Goodwill for $25 - now THAT was a steal that I turned into a nice profit!).
Planar ELT320
http://www.sunhelp.org/pipermail/sunhelp/2004-January/019825...
I wonder if I could get a keyboard and enclosure someplace and bolt on an LCD panel from a netbook (if only for the sake of power consumption).
+1 for good tmux'ing your output.