aakoskin/junkterm
Folders and files
| Name | Name | Last commit date | ||
|---|---|---|---|---|
Repository files navigation
JunkTerm ======== JunkTerm provides a monochrome Linux text terminal on a cheap e-paper. This is an experimental and unorthodox way of using e-paper, and may/will shorten its lifespan, and/or damage it easily, so CAVEAT EMPTOR. Software dependencies --------------------- External dependencies are minimal. Build-time: Just some basic Linux development environment (with modern binutils, GCC, sh and GNU Make). The software was originally developed natively on Raspberry Pi OS. Run-time: Besides the Linux kernel (with SPI and GPIO support), the software assumes /bin/sh and glibc. Supported hardware ------------------ Currently only a single fixed hardware setup is supported. The software is unable to probe the hardware, so if you run it in a random system with a wrong e-paper panel or cabling, then some permanent damage may occur. E-PAPER PANEL DRIVER BOARD HOST COMPUTER WFT0583CZ61 (5.83", 648x480) Waveshare E-Paper Driver Hat Raspberry Pi Usage and operation ------------------- Build with "make". Run with "junkterm". The only supported option is -d which enables debug prints (currently shows only e-paper wait/refresh times to help with optimizations). On startup the program clears the e-paper, then prints a banner message and launches the shell with output directed to the e-paper. The input is taken from the launching terminal. The main loop waits for user input, passes it to the shell and then prints the session output on the e-paper. The display is powered only during the refresh. Refresh is done once the input and output has settled. Any input will switch to fast refresh (1 second) interval, then next refresh is after 5 seconds. When there is only output from shell, the refresh interval is 30 seconds. Refresh is by default done in partial/fast mode (1 <= second). Once an hour there is a full slow refresh (several seconds, depends on the e-paper). Full refresh can be triggered also by Ctrl-L. The program terminates once the shell exists. Abnormal exit can also occur after a system call failure etc. On exit the program attempts to clear the display, put it in deep sleep and turn the power off. Since this is just an userspace program, it cannot be guaranteed that the exit sequence is successful or complete. So better not to run this program unattended without an user visually observing that everything went OK. Terminal emulation ------------------ The terminal declares itself as "vt102". It supports 80x24 and 132x24 modes and emulates a subset of VT102 sequences. The font is CP437 8x16 VGA font. Currently the terminal dimension is fixed and the screen is then squeezed or strectched to fill the e-paper. This is a crude way and for optimal picture the e-paper needs to be near 640x480 and 4:3. Currently the emulation is sufficient to run basic terminal programs (e.g. GNU Screen or VIM). The following vttest tests are passing: 1. Test of cursor movements License ------- This is free software released under the 0BSD license. See included LICENSE.