PiDP-11, simh and the API

131 views
Skip to first unread message

Robert Keck

unread,
Jul 2, 2025, 8:40:42 AM7/2/25
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.

Mark Pizzolato - Info Comm

unread,
Jul 3, 2025, 2:12:27 AM7/3/25
to Robert Keck, [PiDP-11]

Hi Robert,

 

I’m very glad that you’ve taken the time to look at this project.

 

Your analysis about some changes needed in the pdp11 code to make the various aspects of the panel data (and potentially control) is right on.  Saving the data in locations described by additional simh REG structures will get you to the right place!

 

Your observations about the frontpaneltest applications are also spot on.  I only chose the VAX simulator as test platform since it has a build in ROM which can run without any other external setup.

 

I’m traveling for the for the next few weeks so, I won’t be able to focus on this very much, but I’ll be available for questions with a couple of days for simple answers.

 

  • Mark

 

--
You received this message because you are subscribed to the Google Groups "[PiDP-11]" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pidp-11+u...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/pidp-11/ac6616d5-e0da-4bb3-ad31-fbfd6f5269a3n%40googlegroups.com.

Reply all
Reply to author
Forward
0 new messages