This commit introduces dozens of changes to make the 3B2-700 simulator
fully functional and ready for wider use. In addition to 3B2-700
availability, this commit includes a tremendous amount of refactoring
of the 3B2-400 and common code to make the project structure easier to
maintain and reason about.
One final important change: ROM files are no longer included in the
source code. 3B2 ROM images must be obtained separately and loaded
into the simulator before boot.
Changes:
- The 3b2 target has been aliased to 3b2-400
- The formerly named 3b2-600 project has become 3b2-700
- SCSI QIC tape support has been added to sim_scsi.c
- Header files have been reworked to reduce complexity of includes
- Common code has been consolidated
- Timer code has been unified
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.
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.
- 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.
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.