Commit graph

8 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
e4e7071b6a 3b2: Improve NI performance
This change implements asynchronous (non-polling) mode for NI Ethernet
packet receive.
2019-08-25 20:39:48 -07:00
Seth Morabito
9736cc3116 3b2: STRCPY fix, CTC and NI cleanup
- The previous fix for STRCPY introduced a new bug. STRCPY must always
  copy the final NULL terminator of the string, but must NOT increment
  the source or destination pointers for the NULL terminator.

- The CTC simulation did not correctly support streaming mode, which
  can in some cases request reads that are not on 512-byte block
  boundaries.

- To begin to support System V Release 4 UNIX, the NI card (called EMD
  under SVR4) needed to support several more CRC codes for pump code.
2019-08-15 08:07:49 -07:00
Seth Morabito
8832511204 3b2: Correct behavior for NI attach and detach
Previously, the NI ethernet device expected to do all
autoconfiguration at attach time. Furthermore, if attaching failed for
some reason (e.g., permission issues on a tap device, etc.) the card
would be left autoconfigured, but in a broken state that could lead to
reading uninitialized memory.

This change fixes those bugs, and allows the device to be attached and
detached more freely. The card is now autoconfigured when it is
enabled.  Attaching and detaching are analogous to connecting or
disconnecting an ethernet transceiver from the physical device.
2019-04-29 08:21:52 -07:00
Seth Morabito
726a07b547 3b2: Fix Coverity identified issues
This change also addresses some unused function parameter warnings
issued by GNU Flycheck (not generally used by the build process, but
useful when editing files with Flycheck enabled)
2019-03-20 10:13:30 -07:00
Seth Morabito
b0a4fb443c 3b2: NI 10Base5 Ethernet Device
- Implements an Ethernet device ("NI", for "Network Interface")
    for the 3B2 simulator.
2019-03-09 14:32:21 -08:00