pidpdemo is a compact demonstration menu for a PiDP-11 or other
PDP-11 style 2.11BSD installation (specifically https://github.com/chasecovello/211bsd-pidp11)
It is intended for:
- museum or exhibition use
- desk-side historical demonstrations
- telnet or serial terminal sessions
- development on a modern host against an old remote target
Repository: github.com/fergusleen/pidpdemo
Video: https://www.youtube.com/watch?v=FBJSq19VJRU
The project aims to provide a restrained front end for a live historical Unix system.
The menu should:
- present short historical information pages
- launch a few safe demonstrations
- return cleanly to the menu
- avoid assumptions about modern libraries or terminals
- remain small enough to fit comfortably on the target
This is not a modern application framework. It is a thin wrapper around plain text files, small built-in demos, and a few external commands.
The current menu includes:
- Welcome / Introduction
- About the PDP-11
- About UNIX
- About 2.11BSD
- PiDP-11 Front Panel Notes
- Games On This System
- Show system information
- Prime number / CPU timing demo
- Process or memory demo A. Directory listing / filesystem demo B. Adventure (if installed) C. Trek (if installed) Q. Quit
The page entries read wrapped text files from pages/.
The demonstration entries either call built-in code or launch commands.
pidpdemo/
README.md
Makefile
src/
pages/
scripts/
logs/
The important files are:
src/main.c: menu table and command-line handlingsrc/menu.c: plain and optional curses menu logicsrc/pager.c: screen-at-a-time text pagersrc/actions.c: built-in actions and command launch pathsscripts/sysinfo.sh: helper used by the system summary page
Default build:
makeOptional curses build:
make clean
make CPPFLAGS='-DUSE_CURSES=1' LDLIBS='-lcurses -ltermcap'The project does not try to detect curses automatically. If your system uses different library names, edit the command line explicitly.
Useful make targets:
makemake cleanmake runmake smokemake install
make run starts the plain menu locally with pages/.
Typical usage:
./pidpdemo -p -d pagesUseful options:
-pforce plain mode-crequest curses mode if it was compiled in-d DIRchoose an alternate page directory-hshow usage
Built-in helper modes:
./pidpdemo --sysinfo./pidpdemo --cpu-demo./pidpdemo --proc-demo
The plain text path is the main target. It is the most trustworthy mode for telnet and museum use.
The current plain interface:
- clears the screen before drawing the menu
- clears between pager pages
- clears after
Press RETURN to continue
If compiled with USE_CURSES, the program can use a full-screen menu.
If curses setup fails or the terminal is unsuitable, the code falls back
to plain mode.
The system summary is generated by scripts/sysinfo.sh rather than by a
large in-process C implementation. This was a practical compromise:
the richer C version pushed the target binary over the PDP-11 linker
size limit.
The prime/pi entry is a visible demonstration, not a strict benchmark. It performs terminal output while running, so the reported elapsed time includes terminal I/O effects as well as computation.
The project assumes a very old remote environment.
Do not assume:
- SSH
- SCP
- FTP
- Python
- Git on the target
- modern shell features
The provided scripts are built around telnet and expect.
Typical host-side workflow:
- build locally
- push changed files
- build on the target
- run on the target
The host-side scripts read configuration from environment variables.
If scripts/local-config.sh exists, the shell wrappers will source it
before using defaults.
Tracked example:
scripts/local-config.sh.example
Untracked local override:
scripts/local-config.sh
The main variables are:
TARGET_HOSTTARGET_PORTTARGET_USERTARGET_DIRTARGET_PROJECTTARGET_PROMPTTARGET_SH_PROMPTTELNET_CMD
The repository defaults are intentionally placeholders so the public tree does not point at any specific live system.
Uploads one file at a time over telnet. This is the preferred update path for day-to-day work on fragile targets.
Recommended pattern:
- upload to
something.new - rename it into place on the target
- rebuild
Logs in and runs make clean all on the target.
Logs in, changes to the project directory, and starts the menu.
Bootstraps the whole tree via telnet paste. It is useful when first setting up a target, but it is less robust than the single-file uploader for repeated iteration.
This repository is intended to be publishable as source.
To keep the public tree clean:
- live target details are not stored in script defaults
- local site settings belong in
scripts/local-config.sh - build outputs and local wrapper state are ignored by
.gitignore
If you adapt the scripts to your own machine, keep those changes in the local override file rather than hard-coding them back into the tracked wrappers.
This code is written for old systems first.
Practical lessons from target testing:
- keep the binary small
- prefer simple C over abstraction
- assume very old
/bin/sh - assume very old userland tools
- prefer deterministic shell scripts over manual terminal sequences
- avoid depending on modern
awk,ifconfig, or advanced shell syntax
This project is licensed under the GNU General Public License v3.0.
github.com/fergusleen March 2026.