PiDP-8/I Software

Changes To Incandescent Thought
Log In

Changes to "Incandescent Thought" between 2017-03-19 08:19:00 and 2017-03-19 08:29:04

15
16
17
18
19
20
21
22

23
24
25
26
27
28
29
30
31
32
33

34
35
36
37

38
39
40
41
42
43
44
45
15
16
17
18
19
20
21

22





23
24
25
26
27

28
29

30

31

32
33
34
35
36
37
38







-
+
-
-
-
-
-





-
+

-

-
+
-








You need to make a few adjustments to `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 the these lines below the `#include` lines:
2. Remove the these lines, found up among the `#include` lines:

        typedef unsigned int    uint32;
        typedef signed int      int32;
        typedef unsigned short  uint16;
        typedef unsigned char   uint8;

        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 switches

3. Add these two lines above the call to `pthread_create()`:
3. Replace the block of code beginning with the `pthread_create()` call and ending with `sleep(2)`, inclusive, with the following:

        extern int pidp8i_simple_gpio_mode;
        pidp8i_simple_gpio_mode = 1;

        if (start_pidp8i_gpio_thread ("test program") != 0) exit (EXIT_FAILURE);
4. Replace the word `blink` in the `pthread_create()` line with `gpio_thread`.

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 reconfigure it on a multi-core Pi such as the Pi 2 or Pi 3, it will build against the ILS; otherwise, it will build against the NLS, which may look slightly different from the appearance you get from the old `gpio.c` module, but it probably isn't worth continuing unless you're simply curious.

Now you can try saying `make`. If the software builds, you can now run it as `sudo bin/deeper`.

If you want to install it, I recommend that you build and install Deeper Thought in the normal way, then copy the `bin/deeper` executable you built above over the top of the normal one. This lets you leverage the rest of the installation process shipped with Deeper Thought, such as installing the `deeper` system service.