Commit graph

16 commits

Author SHA1 Message Date
Seth Morabito
efea3f86a7 3b2: Fix for compilation warning
Fixes a compilation warning in 3b2_sysdev.c caused by a lack of an
explicit cast from 'void *' to 'struct timer_ctr *'
2019-06-09 14:12:02 -07:00
Seth Morabito
7455d28126 3b2: Soft-power shutdown via TIMER command
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.
2019-04-13 11:36:02 -07:00
Seth Morabito
ba9d8626e9 3b2: CIO PORTS and CTC devices
This change adds Common-IO implementations of the PORTS 4-port serial
line card and the CTC tape controller card.
2018-05-21 14:29:58 -07:00
Seth Morabito
3afc778dc4 3b2: Fix TOD clock DST and TZ issue 2018-05-07 08:20:14 -07:00
Seth Morabito
177be95e5d 3b2: Refactor DUART and DMA
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.
2018-04-11 14:24:48 -07:00
Seth Morabito
0f19a66d5b 3b2: Fix unterminated REG array 2018-03-04 17:59:29 -08:00
Seth Morabito
7bb02e7530 3b2: CONTTY line configuration
Adds modem control line speed configuration to prevent FIFO overflow.
2017-12-16 16:07:08 -08:00
Seth Morabito
395420b8b8 3b2: Remove unused variables 2017-11-30 17:43:36 -08:00
Seth Morabito
0a00d8066a 3b2: Coverity issue cleanup 2017-11-30 16:30:53 +00:00
Seth Morabito
9a7306a647 3b2: Use localtime instead of localtime_r 2017-11-30 00:14:24 +00:00
Seth Morabito
22b8e211c6 3b2: Improve TOD calculation 2017-11-29 21:44:40 +00:00
Seth Morabito
00f8bbcef1 3b2: Time of Day Clock
- 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.
2017-11-26 18:26:11 -08:00
Seth Morabito
df54c87bf7 3b2: Coverity issue cleanup 2017-11-25 01:38:05 -08:00
Seth Morabito
690c30b6f4 3b2: Gracefully handle clock reset
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.
2017-11-25 01:38:05 -08:00
Seth Morabito
b23ebbe312 3b2: Refactor IU into 5 devices 2017-11-25 01:38:05 -08:00
Seth Morabito
804ea8e322 3b2: Initial release of an AT&T 3B2 model 400 emulator.
For information on usage, please see the file 3B2/README.md
2017-11-20 18:21:49 -08:00