The Situation
In February 2016, Norman Davie released a program he called Deeper Thought after an earlier program by Steve Gibson called Deep Thought. The most important difference between these two programs for our purposes here is that instead of running as PDP-8 code within the simulator, as Gibson’s program does, Davie’s Deeper Thought runs as a native program on the Raspberry Pi, using a version of Oscar Vermeulen’s original gpio.c module to manipulate the LEDs on the PiDP-8/I’s front panel and read its switches.
Davie’s program has been forked several times, but this mode of operation remains in all of the versions I’ve tried.
When Ian Schofield created the incandescent lamp simulator (ILS) for the PiDP-8/I, he changed the external interface in a couple of ways which prevented it from being used with any of these versions of Deeper Thought. It has since been changed again for the “ILS2” improvements.
When I rewrote the ILS, one of the things I did was add a compatibility interface for programs like Deeper Thought which remain dependent on the old gpio.c module interface. This article describes the steps you must take to build a version of Deeper Thought against that.
If you are running a single-core Pi (e.g. Zero, original A+, original B+...) there is little point to following this guide. Just stop the PiDP-8/I simulator and run your chosen version of Deeper Thought directly, as its GPIO method will work the same as our single-core GPIO method, which we call NLS to distinguish it from ILS mode.
Modifying deeper.c
The first thing you have to do to build any version of Deeper Thought against the current version of the PiDP-8/I software is copy its deeper.c file into the PiDP-8/I software’s src/misc subdirectory:
$ cd ~/pidp8i ⇠ or wherever the PiDP-8/I source code is
$ cp /path/to/deeper/thought/deeper.c src/misc
Use your favorite Linux text editor to make a few adjustments to src/misc/deeper.c to get it to build:
Add the following between the big block comment at the top of the file and the other
#includelines:#define _DEFAULT_SOURCE #include "gpio-common.h"Remove these lines, found a short way below that:
extern void *blink(void *ptr); // the real-time multiplexing process to start up extern uint32 ledstatus[8]; // bitfields: 8 ledrows of up to 12 LEDs extern uint32 switchstatus[3]; // bitfields: 3 rows of up to 12 switchesReplace the block of code beginning with the
pthread_create()call and ending withsleep( 2 )— inclusive — with the following:pidp8i_simple_gpio_mode = 1; if (start_pidp8i_gpio_thread (1) != 0) { fprintf( stderr, "Failed to start GPIO thread. PiDP-8/I panel attached?\n" ); exit (EXIT_FAILURE); }
With that done, you must reconfigure the software to get it to recognize that deeper.c has been added to the src subdirectory. If you’re happy with your current PiDP-8/I software configuration, this will do the trick:
$ make reconfig
Otherwise, re-read README.md and run configure manually:
$ ./configure --with-your-new-option-set
Either way, among the lines in the configure script output should be this one:
Found Deeper Thought; building it against ILS GPIO module
Now you can try saying make. (To skip rebuilding anything else, say make bin/deeper instead.) If the software builds, you can now run it as bin/deeper. If that works, Ctrl-C out of it, then say:
$ pidp8i stop
$ sudo make install
$ systemctl --user disable pidp8i
$ systemctl --user enable --now deeper
That will start it and ensure it starts on boot.
Reverting to Boot with the PiDP-8/I Simulator
To return to running the PiDP-8/I simiulator:
$ systemctl --user stop deeper
$ systemctl --user disable deeper
$ systemctl --user enable --now pidp8i
Why Not Make This Easy?
You might be wondering why I describe how to modify deeper.c to build against the PiDP-8/I software instead of just integrating it and shipping it along with it. It’s because this software is not licensed under any open source license, and attempts to get the authors to so license it have been ignored. Therefore, I cannot re-distribute this software, even though it is freely-available on the Internet.
License
Copyright © 2017-2026 by Warren Young. This document is licensed under the terms of the SIMH license.