[Simh] Making "Stripped Down" Simulator Builds + Other Queries

J. David Bryan jdbryan at acm.org
Sat Jul 6 18:49:59 EDT 2013


On Saturday, July 6, 2013 at 16:38, Christian Gauger-Cosgrove wrote:

> Is it possible to create a build of a specific emulator that has been
> stripped or pared down to a specific configuration? 

More or less.  Generally, you can remove specific peripherals, typically by 
removing the corresponding DEVICE references in the "nnn_sys.c" file.  But 
subset configurations within a specific device (e.g., CPU submodels) are 
usually handled by runtime "if" statements within the code.  So you 
couldn't remove, say, one CPU model from the others without major surgery.

Would disabling (at run time, perhaps via a startup script) the devices you 
aren't using work as well?  A "fully laden" PDP11 simulation executable is 
only a few hundred KB.  The code for disabled devices is still present, but 
the simulator treats them as non-existent.  By disabling unwanted devices, 
you can present the simulator user with a view of a specific configuration.


> The only other question I was wondering, is would it be possible to,
> subsume a simulator into another program/application? 

Yes, with some work.  Each device simulator is essentially a set of 
functions called by the simulator control program (SCP).  You could arrange 
to call them from a different program, although you'd need to supply the 
support functions present in SCP that are called by the device simulators.


> A third question, somewhat applicable to the above, but is there a
> place where one can find some documentation/information on adding a
> device to one of the simulators? 

Go here:

  http://simh.trailing-edge.com/papers.html

...and download these documents:

  - Writing a Simulator for the SIMH System
  - Adding an I/O Device to a SIMH Virtual Machine

...which should get you started.  In-development versions of the documents 
are here:

  https://github.com/simh/simh/tree/master/doc

                                      -- Dave




More information about the Simh mailing list