[Simh] Adding second copy of device to PDP-8

Mark Pizzolato Mark at infocomm.com
Tue Dec 29 15:03:39 EST 2015


On Wednesday, December 23, 2015 at 5:17 PM, David Gesswein wrote:
>    I was looking at adding a second TD controller to the PDP-8. It did
> not appear that simh has an easy way of adding another copy of a device it
> already knows about with a new device code etc.
> 
> My guess is I would need to modify the existing driver to duplicate
> DEVICE td_dev and all structures referred to by it. It also looks like the
> code directly references some of file global data so all direct references
> would need to be changed. Is this the general approach?

HI David,

Adding an additional device instance to the code which implements a simulated device after the fact can be messy.

Depending on how the device is connected to (and addressed by) the CPU there are several different approaches to supporting multiple instances of the same device.  This is best considered when the initial simulator for that particular device type is implemented.

Numerous examples exist in the current PDP11 codebase.  The pdp11_xq and pdp11_rq devices create separate DEVICE instances for each of the independent device controllers that are simulated.  These are handled this way since Qbus/Unibus devices are memory mapped and the DEC address conventions for device addresses have each controller with independent device addresses.  Meanwhile, the pdp11_td, pdp11_dz, pdp11_dl, pdp11_dc and pdp11_vh devices each support simulating multiple controllers while they only have a single simh DEVICE structure.  For these devices this is possible since the memory mapped buss addressing conventions say that multiple independent controllers will occupy adjacent memory addresses in the I/O page, therefore increasing the number of supported controllers merely expands the size of the I/O page address window for successive controllers.   Depending on the needs of the device in question different relationships between the DEVICE and its related UNIT structures are possible.  You may want to look closely at pdp11_td.c for some ideas since it is a cartridge tape simulator and supports from 1 to 16 controllers with up to 32 drives.

- Mark



More information about the Simh mailing list