Robert Keck
unread,Jul 2, 2025, 8:40:42 AM7/2/25Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to [PiDP-11]
A recent discussion on the simh version turned into a discussion on how to keep simh and the PiDP-11 code in sync. One proposal was to use the simh API to do this. I said I'd look into it. The bottom line is, without modifications to the PDP-11 simulator code, it will not work. There are multiple reasons for this. Below, console means the console with the blinking lights.
1) Most commonly the console will be displaying "Cons Physical" and "Datapath". This means it is displaying every address generated by the processor, whether it is instruction fetch or read or write memory. The API allows you to get the value of any register or any memory address, but it has no way to display every address generated by the processor, since this is not available from an unmodified simh PDP-11. If you look at the REALCONS modifications to the PDP-11 simulator code, basically it adds hooks to everywhere where the simulator reads or writes memory so it can pass that address on to the console.
2) The "Datapath" display should display the output of the 11/70 SHFR or shifter, which is effectively the output of the ALU. However, almost all data, and this means data and addresses, flow through this path in one way or another. Because simh simulates PDP-11 instruction execution, not microcode execution, of the 11/70, it is actually not possible to accurately simulate the behavior of the console datapath lights with simh. The REALCONS modifications contains a hack, whereby it captures the output data of certain instructions so that the idle pattern of several of the PDP11 operating systems is reproduced. It is not however going to be a truly accurate representation of a real 11/70.
So, to approximately drive console blinking lights, PDP-11 simh has to be modified. I believe it is possible to do this in a somewhat less hacky fashion than REALCONS. It is probable that it could be done in a manner compatible with the simh API, by introducing some pseudo registers that capture each generated address and something that approximates the SHFR which the API could expose. This could avoid making changes to the simh scp that REALCONS makes in addition to its changes to the PDP-11 simulator code.
A comment on the API. It is not as hard to use as it initially might look. The only example of its use is "frontpaneltest", which as its name indicates, is a test of the API, not really a demonstration of its use in a "practical" application. As such, it contains far more code than what would normally be necessary to use it.