1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
-
+
-
+
-
+
|
# The Situation
In February 2016, Norman Davie released a program he called [Deeper Thought](https://groups.google.com/forum/#!msg/pidp-8/tbciVNoZJbw/AMjywRKLAwAJ) after an earlier program by Steve Gibson called [Deep Thought](https://www.grc.com/pdp-8/deepthought-sbc.htm). 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](https://github.com/timdawg/Deeper-Tought-2/network), but this mode of operation remains in all of the versions I've tried.
When Ian Schofield created the [incandescent lamp simulator](/wiki?name=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.
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 our new ILS.
# 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` subdirectory:
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
$ cp /path/to/deeper/thought/deeper.c src/misc
Use your favorite Linux text editor to make a few adjustments to `src/deeper.c` to get it to build:
Use your favorite Linux text editor to make a few adjustments to `src/misc/deeper.c` to get it to build:
1. Add the following line between the big block comment at the top of the file and the `#include` lines following it, at line 156 or so:
#include "gpio-common.h"
2. Remove these lines, found up among the `#include` lines:
|
75
76
77
78
79
80
81
82
83
84
|
75
76
77
78
79
80
81
82
83
84
|
-
+
|
# 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 by Warren Young. This document is licensed under the terms of [the SIMH license][sl].
Copyright © 2017-2018 by Warren Young. This document is licensed under the terms of [the SIMH license][sl].
[sl]: https://tangentsoft.com/pidp8i/doc/trunk/SIMH-LICENSE.md
|