This change enables the simulator to be shut down cleanly via a
soft-power shutdown command. This is implemented in the real 3B2/400
through the sanity timer, which, if it reaches zero, sets a bus timeout
flag in the CSR and issues an interrupt at IPL 15. The operating
system (System V UNIX) treats this as a shutdown request and enters
runlevel 0.
To use this change in a SIMH startup script, for example to implement a
3B2 simulator as a service, one could add these commands:
# [... simulator setup ...]
BOOT
SET TIMER SHUTDOWN
CONTINUE
EXIT
On catching a SIGTERM, SIGINT, or SIGHUP, the simulator would return to
SCP control, set the soft power shutdown flag, and then continue
simulator execution. After the system is cleanly shut down, the
simulator would then exit back to the operating system.
This change is a major refactor of how DMA and the DUART interact.
DMA implementation can now be overridden by individual devices that
require DMA. Disk and Floppy both continue to use a generic DMA
implementation, but the DUART code replaces the generic DMA with its
own implementation that correctly rate-limits TX. Among other things,
this allows the simulator to work correctly with real serial
terminals. This functionality has been tested on an AT&T 5620 "Blit"
terminal, which can run the 'layers' windowing software from the
simulator.
- This change adds support for storing time between boots in the Time
of Day clock. An effort has been made to keep the Time of Day clock
in sync with the wall clock between boots, so that user-set time
advances properly between boots.
- Added a couple of custom help routines for TOD and NVRAM.
I will be filling in more help routines as time permits.
Clock reset was not being handled gracefully at all, leading some
diagnostic tests not to pass, or not to pass consistently.
This change will "kick" the system clock whenever the timer divider is
reset, so the new divider is picked up immediately.