PiDP-8/I SoftwareCheck-in [07be964914]
Not logged in

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:scanswitch was returning -1 on no GPIO, which is 255 on macOS at least, which means the test for "no GPIO" in bin/pid8pi wouldn't get hit properly. Returning 127 as that script expects rather than change the script, since the script has established a kind of contract.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256:07be964914218628888255adb3ef9cfef354b817537bd3be0b55b5adf345fee3
User & Date: tangent 2019-04-16 08:24:43
Context
2019-04-16
11:51
"make run" now uses scanswitch to detect lack of GPIO, so it runs the simulator as "pdp8" not "pidp8i-sim" when there is no PiDP-8/I panel. check-in: cd3145ad2d user: tangent tags: trunk
08:24
scanswitch was returning -1 on no GPIO, which is 255 on macOS at least, which means the test for "no GPIO" in bin/pid8pi wouldn't get hit properly. Returning 127 as that script expects rather than change the script, since the script has established a kind of contract. check-in: 07be964914 user: tangent tags: trunk
2019-04-15
07:25
Updated SIMH to latest upstream. No functional change relative to prior source base as far as I can tell from the commit history since the last update. check-in: fc1b9bc0e9 user: tangent tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to src/misc/scanswitch.c.

40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
int main()
{
	int i,j,k,switchscan[2], tmp;

	extern struct bcm2835_peripheral gpio;
    if (map_gpio_for_pidp8i (1) != 0)
	{	printf("Failed to map the GPIO SoC peripheral into our VM space.\n");
		return -1;
	}
    init_pidp8i_gpio();

	// Read the switches
	for (uint8_t row=1;row<=2;row++)		// do rows 2 (for IF switches) and 3 (for STOP switch)
	{		
		INP_GPIO(rows[row]);







|







40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
int main()
{
	int i,j,k,switchscan[2], tmp;

	extern struct bcm2835_peripheral gpio;
    if (map_gpio_for_pidp8i (1) != 0)
	{	printf("Failed to map the GPIO SoC peripheral into our VM space.\n");
		return 127;
	}
    init_pidp8i_gpio();

	// Read the switches
	for (uint8_t row=1;row<=2;row++)		// do rows 2 (for IF switches) and 3 (for STOP switch)
	{		
		INP_GPIO(rows[row]);