Array REGister definitions have been made consistent by passing the
name of the array object. This allows proper sizing assessment
to occur in the register validation logic.
Some previously described array REGister initializers were not really
arrays. Some were structures and others were merely pointers to
someplace in memory that it was desirable to view as a scalar array.
Structures or other blob data should now use SAVEDATA. Virtual
arrays intended to be interpret some part of memory as scalar data
now use VBRDATA initializers.
These changes facilitate more robust parameter type checking and helps
to identify unexpected coding errors.
Most simulators can now also be compiled with a C++ compiler without
warnings.
Additionally, these changes have also been configured to facilitate easier
backporting of simulator and device simulation modules to run under the
simh v3.9+ SCP framework.
265. PROBLEM: Compiling the HP simulator for 64-bit addressing produces many
conversion warnings.
OBSERVATION: Compiling the simulator and defining USE_INT64 and USE_ADDR64
with implicit conversion warnings enabled reveals a number of places where
assumptions were made that addresses would always be 32 bits. This is a
reasonable assumption, as there are no devices (CPU or peripherals) that
can handle gigabyte addressing. Still, many of these assumptions are not
necessary, and some future peripheral simulator may exceed this limit.
CAUSE: Future expansion to 64-bit addressing was not envisioned.
RESOLUTION: Modify source files to ensure that "t_addr" and "t_value"
types are used instead of "uint32" and "int32" types where addressing and
data values may be 64 bits. Also ensure that valid conversions to smaller
sizes use explicit casts.
266. PROBLEM: BOOT devices require a duplicate S-register declaration.
OBSERVATION: All of the peripheral devices that support the BOOT command
set the select code and other parameters into the S register during the
boot process. This direct register access requires an external declaration
that duplicates the one in the full CPU declarations file (hp2100_cpu.h).
A better method that avoids the duplicate declaration would be for the
"ibl_copy" routine to modify the S register on behalf of the caller.
CAUSE: Poor original implementation.
RESOLUTION: Modify "ibl_copy" (hp2100_cpu.c) to take two additional
parameters that clear and set bits, respectively, in the S register on
behalf of the caller. Modify the boot routines for the CPU, DA, DP, DQ,
DR, DS, IPL, MS, and PTR devices to use the new parameters instead of
modifying the S register directly.