blinkenlightsd

66 views
Skip to first unread message

Folkert van Heusden

unread,
Apr 29, 2026, 1:29:11 AMApr 29
to pid...@googlegroups.com

Hello,

I'm trying to interface my own emulator to the blinkenlights panel of the PiDP11.

Sofar I can talk to portmap (to find the udp-port of the process) and can request a list of panels and controls. Unfortunately setting the state of the lamps fails.

When I send a blinkenlight_api_setpanel_controlvalues of all the outputs I found, I get:

[5:20:23.976] blinkenlight_api_setpanel_controlvalues(i_panel=0)
[5:20:23.976] Error in blinkenlight_api_setpanel_controlvalues():
[5:20:23.976] Sum (Panel[11/70].outputcontrols.value_bytelen) is 19, but 16 values were transmitted.

This is a bit strange because I only get 16 outputs when I invoke blinkenlight_api_getpanelinfo:

SR (1|1, radix: 8, bytes: 3, bits: 22)
LAMPTEST (1|1, radix: 8, bytes: 1, bits: 1)
LOAD_ADRS (1|1, radix: 8, bytes: 1, bits: 1)
EXAM (1|1, radix: 8, bytes: 1, bits: 1)
DEPOSIT (1|1, radix: 8, bytes: 1, bits: 1)
CONT (1|1, radix: 8, bytes: 1, bits: 1)
HALT (1|1, radix: 8, bytes: 1, bits: 1)
S_BUS_CYCLE (1|1, radix: 8, bytes: 1, bits: 1)
START (1|1, radix: 8, bytes: 1, bits: 1)
ADDRESS (2|0, radix: 8, bytes: 3, bits: 22)  <--
DATA (2|0, radix: 8, bytes: 2, bits: 16)  <--
PARITY_HIGH (2|0, radix: 8, bytes: 1, bits: 1)  <--
PARITY_LOW (2|0, radix: 8, bytes: 1, bits: 1)  <--
PAR_ERR (2|0, radix: 8, bytes: 1, bits: 1)  <--
ADRS_ERR (2|0, radix: 8, bytes: 1, bits: 1)  <--
RUN (2|0, radix: 8, bytes: 1, bits: 1)  <--
PAUSE (2|0, radix: 8, bytes: 1, bits: 1)  <--
MASTER (2|0, radix: 8, bytes: 1, bits: 1)  <--
MMR0_MODE (2|0, radix: 8, bytes: 1, bits: 3)  <--
DATA_SPACE (2|0, radix: 8, bytes: 1, bits: 1)  <--
ADDRESSING_16 (2|0, radix: 8, bytes: 1, bits: 1)  <--
ADDRESSING_18 (2|0, radix: 8, bytes: 1, bits: 1)  <--
ADDRESSING_22 (2|0, radix: 8, bytes: 1, bits: 1)  <--
ADDR_SELECT (1|1, radix: 8, bytes: 1, bits: 3)
DATA_SELECT (1|1, radix: 8, bytes: 1, bits: 2)
ADDR_SELECT_FEEDBACK (2|0, radix: 8, bytes: 1, bits: 8)  <--
DATA_SELECT_FEEDBACK (2|0, radix: 8, bytes: 1, bits: 4)  <--
PANEL_LOCK (1|1, radix: 8, bytes: 1, bits: 1)
POWER (1|1, radix: 8, bytes: 1, bits: 1)

Anyone got an idea what might  be going wrong here?


oscarv

unread,
Apr 29, 2026, 9:34:53 PMApr 29
to [PiDP-11]
Hallo Folkert,


On Wednesday, April 29, 2026 at 7:29:11 AM UTC+2 Folkert van Heusden wrote:

Sofar I can talk to portmap (to find the udp-port of the process) and can request a list of panels and controls. Unfortunately setting the state of the lamps fails.


Ouch, this is 8 years ago, I have to dig in to my memory (volatile, not core alas) for this!
You'll have seen that the front panel driver ('the server') code is in /opt/pidp11/src/11_pidp_server/pidp11
...but the simh 'client' side is in /opt/pidp11/src/02.3_simh/4.x+realcons/src/REALCONS . That might provide the template for sending front panel data.

I would, however, propose a totally different approach. Rather than using the RCP interface to connect to the existing 'front panel server' with the 'simh client', just add the front panel driver code straight into your simulator. The PiDP-8 and -10 do this. Just start a separate thread in your program that drives the front panel straight from the simh CPU variables. The PiDP-10 might be the easiest example to look at.

So - I would recommend not to bother with the RCP client/server interface, but copy the code from /opt/pidp11/src/11_pidp_server/pidp11 into a thread within your own simulator. Easier, less hassle. You do have to give the simulator permissions to access the GPIO. The install script of the PiDP-10 shows how.

 

When I send a blinkenlight_api_setpanel_controlvalues of all the outputs I found, I get:

[5:20:23.976] Sum (Panel[11/70].outputcontrols.value_bytelen) is 19, but 16 values were transmitted.

This is a bit strange because I only get 16 outputs when I invoke blinkenlight_api_getpanelinfo:


I think that is because the front panel server program handles the actions of the two rotary knobs and the power key switch (if set up as a software switch, which was an optional mod only) itself, without sharing them back with the simulator. But I'd need to dig back into the code - I only adapted Joerg Hoppe's BlinkenBone software to drive the hardware panel. 

Before going into the more complex front panel server, look at /opt/pidp11/src/11_pidp_server/scanswitch. It is a tiny program that just reads the switch positions before the client/server combination is started up. But its simplified gpio.c is the gentle entry into driving the panel!

Kind regards,

Oscar.

Folkert van Heusden

unread,
May 1, 2026, 5:18:51 AM (13 days ago) May 1
to pid...@googlegroups.com

Fwiw: got it to work!

Apparently every byte for the setcontrols message is encoded in a seperate word (32 bit). And some other stuff.

Am now integrating it in the main code of my emulator. Stay tuned! :-D 

Reply all
Reply to author
Forward
0 new messages