Commit graph

28 commits

Author SHA1 Message Date
Seth Morabito
9d849283a4 3B2: Interrupt Refactor and DEMON ROM
- This change introduces a full refactor of the interrupt subsystem
  for the system board (SBD) and the I/O bus (CIO). Interrupt decode
  should now be significantly faster, and not require an expensive
  calculation on every step.

- The TIMER device has been split into Rev 2 and Rev 3
  implementations.

- The optional 3B2/400 Debug Monitor ROMs can now be booted by passing
  the "DEMON" argument to the 3B2/400 simulator BOOT command. Any
  of the following will cause the Debug Monitor ROM to be booted
  instead of the standard 3B2/400 ROM:

     sim> BOOT DEMON
     sim> BOOT CPU DEMON
     sim> BOOT DEMON CPU
2021-08-24 06:35:49 -07:00
Seth Morabito
c02491f733 3B2: Header refactoring and cleanup
This change signficantly improves header hygiene in the 3B2 project by
moving global symbols out of 3b2_defs.h and into the appropriate
individual module header files.

Each compilation unit now includes:

  - its appropriate matching .h file
  - any other .h files necessary for linting and compilation

Each header file in turn includes 3b2_defs.h, which contains truly
global symbols, and which pulls in sim_defs.h and exports global
devices.
2021-08-11 19:43:51 -07:00
Seth Morabito
1a3e5af755 3b2: Refactoring in preparation for Rev 3
Refactor in preparation for the addition of a Rev 3 simulator for the
3B2/1000 system.

This change also includes a full cleanup of the rat's-nest of includes
and externs that plagued the 3B2 simulator and made it difficult to
understand and maintain. Headers are now required in the following
order:

  compilation unit -> "3b2_defs.h" -> {... dependencies ...}

Finally, HELP has been added to the CPU device.
2020-03-26 15:12:08 -07:00
Seth Morabito
3f7e473b79 3b2: Fix for erratic CONTTY behavior 2018-08-22 17:13:48 -07:00
Seth Morabito
71ee25be1a 3B2: Remove unused code, move static declarations
This change cleans up warnings issued when compiled with
-Wall.

- Removed unused functions and variables.
- Moved static declarations out of headers and into source files
- Added braces around initialization where suggested.
2018-08-19 12:37:31 -07:00
Seth Morabito
5ae2e4c49d 3b2: Fix for overwriting kernel memory 2018-08-19 12:37:18 -07:00
Mark Pizzolato
0a7c9de1e1 TMXR: Change rx and tx delta values to be usecs including the speed factor 2018-06-13 04:51:34 -07:00
Seth Morabito
0fa5807e1d 3b2: Fix coverity scan issues 2018-05-28 11:58:42 -07:00
Seth Morabito
75b1a2f317 3b2: Fix line endings, enforce CONST
- Correct line endings on 3b2_ctc.c/.h and on 3b2_ports.c/.h.
- Ensured CONST on const char* arrays.
2018-05-21 17:50:26 -07:00
Seth Morabito
d76bd81491 3b2: Code cleanup
This commit fixes several issues with code hygine and eliminates
warnings in the Windows build.
2018-05-21 15:30:27 -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
bd621f50bf 3b2: Call tmxr routines in IU reset
Previously, tmxr_set_line_unit() and tmxr_set_line_output_unit()
were being called in the attach routine. These probably belong
in the reset routine instead.
2018-04-11 18:38:59 -07:00
Seth Morabito
05ba8c4d2c 3b2: Silence warning on Windows 2018-04-11 14:42:56 -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
c05190780b 3b2: Fix windows build 2018-02-15 07:10:44 -08:00
Seth Morabito
7ba70ac35b 3b2: Allow OS to set baud rate and parity
The CONTTY emulation now honors parity, baud rate, and character bit
size as set by the operating system.
2017-12-28 12:12:06 -08:00
Seth Morabito
651faa78ae 3b2: Allow handling of TRACE and BREAKPOINT traps
The 3B2 emulator did not have support for traps, rendering debugging
under the simulator fairly useless. This change adds support for
trap handling. The 'sdb' UNIX debugger under SVR3 should now work
correctly.
2017-12-27 15:13:58 -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
634a92f8bf 3b2: Fix for critical MMU caching bugs
Two critical issues are fixed with this commit:

1. The MMU cache was being corrupted by writing the 'Last Used'
   bit into the wrong half of the PD cache (low word vs. high word)

2. The MMU cache was being too aggressively flushed on SRAMA
   write, because the wrong length was being used. In addition,
   the code was walking off the end of the cache array when
   flushing any section other than section 0, potentially causing
   memory corruption.
2017-12-15 13:32:17 -08:00
Seth Morabito
6b8d8b048e 3b2: Support software power-off 2017-12-15 13:32:11 -08:00
Seth Morabito
5a19a6b12c 3b2: Support for multiple integrated disks
This commit improves the integrated disk (ID) controller's behavior,
enabling full support for up to two 72MB (emulated WREN II)
integrated winchester disks.
2017-12-13 14:15:56 -08:00
Seth Morabito
d5f8a84493 3b2: Initial CONTTY support 2017-12-09 21:30:25 -08:00
Seth Morabito
0a00d8066a 3b2: Coverity issue cleanup 2017-11-30 16:30:53 +00:00
Seth Morabito
3147c30b80 3B2: Fix critical UART bug 2017-11-25 11:04:04 -08:00
Seth Morabito
c2c248a1f2 3b2: Clean up compiler warnings 2017-11-25 10:36:28 -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