Updated HP2100 from Dave Bryan

This commit is contained in:
Mark Pizzolato 2012-03-21 06:14:01 -07:00
parent 663b25818b
commit 45246a3339
32 changed files with 9699 additions and 1694 deletions

View file

@ -1,6 +1,6 @@
/* hp2100_baci.c: HP 12966A buffered asynchronous communications interface simulator
Copyright (c) 2007-2011, J. David Bryan
Copyright (c) 2007-2012, J. David Bryan
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"),
@ -25,6 +25,7 @@
BACI 12966A BACI card
10-Feb-12 JDB Deprecated DEVNO in favor of SC
28-Mar-11 JDB Tidied up signal handling
26-Oct-10 JDB Changed I/O signal handler for revised signal model
25-Nov-08 JDB Revised for new multiplexer library SHOW routines
@ -358,12 +359,6 @@ t_bool baci_enq_seen = FALSE; /* ENQ seen flag */
uint32 baci_enq_cntr = 0; /* ENQ seen counter */
/* Terminal multiplexer library interface */
TMLN baci_ldsc = { 0 }; /* line descriptor */
TMXR baci_desc = { 1, 0, 0, &baci_ldsc }; /* device descriptor */
/* BACI local routines */
static int32 service_time (uint32 control_word);
@ -387,12 +382,14 @@ t_stat baci_detach (UNIT *uptr);
/* BACI data structures
baci_ldsc BACI terminal multiplexer line descriptor
baci_desc BACI terminal multiplexer device descriptor
baci_dib BACI device information block
baci_dev BACI device descriptor
baci_unit BACI unit list
baci_reg BACI register list
baci_mod BACI modifier list
baci_deb BACI debug list
baci_dev BACI device descriptor
Two units are used: one to handle character I/O via the Telnet library, and
another to poll for connections and input. The character I/O service routine
@ -405,10 +402,13 @@ t_stat baci_detach (UNIT *uptr);
ten millisecond period.
*/
DIB baci_dib = { &baci_io, BACI, 0 };
DEVICE baci_dev;
TMLN baci_ldsc = { 0 }; /* line descriptor */
TMXR baci_desc = { 1, 0, 0, &baci_ldsc }; /* device descriptor */
DIB baci_dib = { &baci_io, BACI, 0 };
UNIT baci_unit[] = {
{ UDATA (&baci_term_svc, UNIT_ATTABLE | UNIT_FASTTIME, 0) }, /* terminal I/O unit */
{ UDATA (&baci_poll_svc, UNIT_DIS, POLL_FIRST) } /* Telnet poll unit */
@ -444,11 +444,12 @@ REG baci_reg[] = {
{ FLDATA (ENQFLAG, baci_enq_seen, 0), REG_HRO },
{ DRDATA (ENQCNTR, baci_enq_cntr, 16), REG_HRO },
{ FLDATA (LKO, baci.lockout, 0) },
{ FLDATA (CTL, baci.control, 0) },
{ FLDATA (FLG, baci.flag, 0) },
{ FLDATA (FBF, baci.flagbuf, 0) },
{ FLDATA (SRQ, baci.srq, 0) },
{ FLDATA (LKO, baci.lockout, 0) },
{ FLDATA (CTL, baci.control, 0) },
{ FLDATA (FLG, baci.flag, 0) },
{ FLDATA (FBF, baci.flagbuf, 0) },
{ FLDATA (SRQ, baci.srq, 0) },
{ ORDATA (SC, baci_dib.select_code, 6), REG_HRO },
{ ORDATA (DEVNO, baci_dib.select_code, 6), REG_HRO },
{ NULL }
};
@ -470,7 +471,8 @@ MTAB baci_mod[] = {
{ MTAB_XTD | MTAB_VDV | MTAB_NMO, 0, "STATISTICS", NULL, NULL, &tmxr_show_cstat, &baci_desc },
{ MTAB_XTD | MTAB_VDV, 0, NULL, "DISCONNECT", &tmxr_dscln, NULL, &baci_desc },
{ MTAB_XTD | MTAB_VDV, 0, "DEVNO", "DEVNO", &hp_setdev, &hp_showdev, &baci_dev },
{ MTAB_XTD | MTAB_VDV, 0, "SC", "SC", &hp_setsc, &hp_showsc, &baci_dev },
{ MTAB_XTD | MTAB_VDV | MTAB_NMO, 0, "DEVNO", "DEVNO", &hp_setdev, &hp_showdev, &baci_dev },
{ 0 }
};
@ -500,7 +502,7 @@ DEVICE baci_dev = {
&baci_attach, /* attach routine */
&baci_detach, /* detach routine */
&baci_dib, /* device information block */
DEV_NET | DEV_DEBUG | DEV_DISABLE, /* device flags */
DEV_DEBUG | DEV_DISABLE, /* device flags */
0, /* debug control flags */
baci_deb, /* debug flag name table */
NULL, /* memory size change routine */
@ -786,8 +788,8 @@ return stat_data;
transmit mode enables the output of the FIFO to be unloaded into the
transmitter holding register (THR). Characters received or transmitted pass
through the receiver register (RR) or transmitter register (TR),
respectively. They are not strictly necessary in terminal (Telnet)
transactions but are critical to diagnostic operations.
respectively. They are not strictly necessary in terminal transactions but
are critical to diagnostic operations.
The UART signals an overrun if a complete character is received while the RHR
still contains the previous character. The BACI does not use this signal,
@ -854,7 +856,7 @@ while (xmit_loop && (baci_uart_thr & IN_VALID)) { /* valid character in UA
"ENQ count = %d\n", baci_enq_cntr);
}
else { /* character is not an ENQ */
else { /* character is not ENQ or not fast timing */
baci_enq_cntr = 0; /* reset ENQ counter */
if (is_attached) { /* attached to network? */
@ -980,12 +982,16 @@ return status;
characters. If characters are available, the terminal I/O service routine is
scheduled. It starts when the socket is attached and stops when the socket
is detached.
As there is only one line, we only poll for a new connection when the line is
disconnected.
*/
t_stat baci_poll_svc (UNIT *uptr)
{
if (baci_term.flags & UNIT_ATT) { /* attached to network? */
if (tmxr_poll_conn (&baci_desc) >= 0) /* new connection established? */
if (baci_term.flags & UNIT_ATT) { /* attached to line? */
if ((baci_ldsc.conn == 0) && /* line not connected? */
(tmxr_poll_conn (&baci_desc) >= 0)) /* and new connection established? */
baci_ldsc.rcve = 1; /* enable line to receive */
tmxr_poll_rx (&baci_desc); /* poll for input */
@ -1205,9 +1211,9 @@ return;
/* Calculate service time from baud rate.
Service times are based on 1580 instructions per second, which is the 1000
E-Series execution speed. The "external clock" rate uses the 9600 baud rate,
as most real terminals were set to their maximum rate.
Service times are based on 1580 instructions per millisecond, which is the
1000 E-Series execution speed. The "external clock" rate uses the 9600 baud
rate, as most real terminals were set to their maximum rate.
Note that the RTE driver has a race condition that will trip if the service
time is less than 1500 instructions. Therefore, these times cannot be
@ -1216,6 +1222,8 @@ return;
static int32 service_time (uint32 control_word)
{
/* Baud Rates 0- 7 : ext., 50, 75, 110, 134.5, 150, 300, 600, */
/* Baud Rates 8-15 : 900, 1200, 1800, 2400, 3600, 4800, 7200, 9600 */
static const int32 ticks [] = { 1646, 316000, 210667, 143636, 117472, 105333, 52667, 26333,
17556, 13667, 8778, 6583, 4389, 3292, 2194, 1646 };

View file

@ -1,6 +1,6 @@
HP 2100 SIMULATOR BUG FIX WRITEUPS
==================================
Last update: 2011-06-21
Last update: 2012-03-17
1. PROBLEM: Booting from magnetic tape reports "HALT instruction, P: 77756
@ -4433,7 +4433,7 @@
(except for binary mode). A correct negotiation mechanism must be
implemented to handle the variety of Telnet clients properly.
WORKAROUND: Modify the TNS_SKIP case in "tmxr_poll_rx" (sim_txmxr.c) to
RESOLUTION: Modify the TNS_SKIP case in "tmxr_poll_rx" (sim_txmxr.c) to
skip only LF or NUL following CR. Any other character is processed as is.
STATUS: Fixed in version 3.8-0.
@ -5379,7 +5379,7 @@
RESOLUTION: Modify "do_arg" (scp.c) to test "do_arg[0]" for NULL and to
return SCPE_2FARG if so.
STATUS: Fixed in version 3.8-2.
STATUS: Fixed in version 3.9-0.
@ -5412,7 +5412,7 @@
pending, skip instruction execution. This allows consecutive DMA cycles
without intervening instruction executions if SRQ is asserted continuously.
STATUS: Fixed in version 3.8-2.
STATUS: Fixed in version 3.9-0.
@ -5438,7 +5438,7 @@
inhibit DMA channel 2 if a channel 1 request is still pending after a
channel 1 cycle.
STATUS: Fixed in version 3.8-2.
STATUS: Fixed in version 3.9-0.
@ -5454,7 +5454,7 @@
RESOLUTION: Modify the device names (hp2100_cpu.c, hp2100_defs.h, and
hp2100_sys.c) from 0 and 1 to 1 and 2 to align with HP usage.
STATUS: Fixed in version 3.8-2.
STATUS: Fixed in version 3.9-0.
@ -5470,7 +5470,7 @@
RESOLUTION: Removed obsolete comments.
STATUS: Fixed in version 3.8-2.
STATUS: Fixed in version 3.9-0.
@ -5487,7 +5487,7 @@
RESOLUTION: Modify hp2100_cpu.c to remove the latency counter.
STATUS: Fixed in version 3.8-2.
STATUS: Fixed in version 3.9-0.
@ -5522,7 +5522,7 @@
modify all I/O device handlers to allow processing of multiple concurrent
signals.
STATUS: Fixed in version 3.8-2.
STATUS: Fixed in version 3.9-0.
@ -5542,7 +5542,7 @@
and modify all signal handlers accordingly. Modify all device DIBs to add
card numbers to allow for multiple-device handlers.
STATUS: Fixed in version 3.8-2.
STATUS: Fixed in version 3.9-0.
@ -5577,7 +5577,7 @@
DIAG mode in three instructions if the CPU is a 2114, 2115, or 2116 and in
two instructions otherwise.
STATUS: Fixed in version 3.8-2.
STATUS: Fixed in version 3.9-0.
@ -5608,7 +5608,7 @@
RESOLUTION: Modify "mtcio" (hp2100_mt.c) to use the count of command table
entries as the loop count.
STATUS: Fixed in version 3.8-2.
STATUS: Fixed in version 3.9-0.
@ -5625,7 +5625,7 @@
RESOLUTION: Modify "iplio" (hp2100_ipl.c) to add a CRS invocation counter
and to report a single debug line for consecutive CRS calls.
STATUS: Fixed in version 3.8-2.
STATUS: Fixed in version 3.9-0.
@ -5647,7 +5647,7 @@
the device signal handler, and modify "sim_instr" to stop instruction
execution if the returned status is not SCPE_OK.
STATUS: Fixed in version 3.8-2.
STATUS: Fixed in version 3.9-0.
@ -5678,7 +5678,7 @@
if the I/O cycle completes successfully, and modify "iplio" (hp2100_ipl.c)
to allow for restarting of a failed I/O cycle.
STATUS: Fixed in version 3.8-2.
STATUS: Fixed in version 3.9-0.
@ -5697,7 +5697,7 @@
RESOLUTION: Expanded and completed the comments in the "divide" function
(hp2100_fp1.c).
STATUS: Fixed in version 3.8-2.
STATUS: Fixed in version 3.9-0.
@ -5719,7 +5719,7 @@
unloaded" condition as Not Ready and Busy, and a "disabled" condition as
Not Ready only.
STATUS: Fixed in version 3.8-2.
STATUS: Fixed in version 3.9-0.
@ -5767,7 +5767,7 @@
Head-Sector Compare Error (Head-Sector and Cylinder Compare Errors can only
occur during sparing operations which are not supported in simulation).
STATUS: Fixed in version 3.8-2.
STATUS: Fixed in version 3.9-0.
@ -5828,7 +5828,7 @@
RESOLUTION: Modify the Read Without Verify command handler in "ds_svc_u"
(hp2100_ds.c) to begin verifying if a track boundary is crossed.
STATUS: Fixed in version 3.8-2.
STATUS: Fixed in version 3.9-0.
@ -5884,7 +5884,7 @@
Unavailable if so. Modify "ds_svc_u" to check that the heads are loaded on
the target unit and report Status-2 if not.
STATUS: Fixed in version 3.8-2.
STATUS: Fixed in version 3.9-0.
@ -5902,4 +5902,351 @@
the status-1 field and to check for invalid units and report Unit
Unavailable if so.
STATUS: Fixed in version 3.8-2.
STATUS: Fixed in version 3.9-0.
232. PROBLEM: SHOW <dev> doesn't show the unit number when all but one unit are
disabled.
VERSION: 3.8-1
OBSERVATION: For multi-unit devices, the SHOW <dev> command prints device
information on the first line and then prints each unit's information on
succeeding lines. For single-unit devices, the device and unit information
are combined on one line, as the device name is allowed as a synonym for
unit 0. However, if a multi-unit device has all but one unit disabled, the
SHOW <dev> command reports the remaining unit as though the device had only
one unit, implying that the enabled unit is unit 0.
For example, HP device DQC has two units. Attaching a file to unit 1 and
disabling unit 0 produces this output for the SHOW DQC command:
DQC, devno=24/25, 11MW, attached to file.tmp, heads loaded, write enabled
There is no indication that the file is attached to unit 1, and indeed if
the attachment and disabled units are reversed, the command output is the
same as above.
CAUSE: Routine "show_device" (scp.c) combines the device and unit display
when a device has only one enabled unit. This is intended to hide the
implementation detail of single-unit devices, e.g., paper tape readers,
while allowing additional permanently-disabled units to be used by the
device for scheduling. However, it should not combine the device and units
when user-disabled units exist.
RESOLUTION: Modify "show_device" (scp.c) to count units that have been
disabled by the user instead of units that may be disabled by the user, and
to report the unit number if user-disabled units are present. Also change
the count of reported units from the number of enabled units to the sum of
the enabled and user-disabled units.
STATUS: Fixed in version 3.9-0.
233. ENHANCEMENT: Add a simulation of the ICD series of disc drives and the
12821A Disc Interface.
VERSION: 3.8-1
OBSERVATION: The ICD drives were lower-cost versions of the earlier MAC
drives that incorporated single-drive controllers in the drive chassis.
This obviated the requirement for the separate 13037 disc controller. They
were interfaced via the 12821A HP-IB Disc Interface card; this card was
also used to interface CS/80 disc and Amigo tape drives, such as the 7912
and 7974A.
The addition of an ICD simulation allows preparation and direct exchange of
image files with the "HPDrive" disc emulator to enable hardware CPUs to run
with emulated drives.
RESOLUTION: Add a simulation of the 12821A Disc Interface (hp2100_di.c
and hp2100_di.h). Add the DA device to simulate the ICD disc drives and
the ICD disc loader ROM (hp2100_di_da.c). Generalize the controller code
in the DS simulation into a common disc simulation library (hp_disclib.c
and hp_disclib.h). Alter "hp2100_sys.c" and "hp2100_defs.h" to add the
device structure and default select code assignment.
STATUS: Fixed in version 3.9-0.
234. ENHANCEMENT: Revise the simulator and documentation to use the term
"select code" instead of "device number."
VERSION: 3.8-1
OBSERVATION: The HP2100 simulator and documentation use the terms "device
number," "device address," and "DEVNO" to refer to the I/O addresses of the
CPU interface cards. These terms are alien to HP users; all of the CPU and
interface documentation, from the 2116 through the 1000, use the term
"select code" for this property.
With the addition of the 12821A disc interface and associated HP-IB drives,
the terms in use are now confusing as well. The switches on the drives
that set the bus addresses are labelled, "HP-IB DEVICE ADDRESS." Other HP
disc and tape drive manuals refer to "unit addresses" or "unit numbers" to
indicate the addresses that differentiate multiple drives on a given
interface.
It would be clearer, especially to new users, if the existing terms were
deprecated in preference to "select code" in the simulator and
documentation.
RESOLUTION: Modify all I/O device simulators to add "SC" as an alias for
"DEVNO" in the register and modifier tables, retaining "DEVNO" to preserve
backward compatibility with existing procedures and command files. Add
MTAB_NMO to the DEVNO modifier entry so that it does not appear in EXAMINE
or SHOW lists but can still be displayed or modified if requested
explicitly. Add hp_setsc and hp_showsc functions (hp2100_sys.c) to set and
show the select code, and modify hp_setdev and hp_showdev to call hp_setsc
and hp_showsc, respectively, and to work aroung newline suppression for
MTAB_NMO entries. Modify the documentation to change device number
references to select code references.
STATUS: Fixed in version 3.9-0.
235. ENHANCEMENT: Deprecate the device name CLK in favor of TBG.
VERSION: 3.8-1
OBSERVATION: The CLK device provides a simulation of the 12539C Time Base
Generator interface. This interface is universally known to HP users as
the TBG. It would be clearer for these users if the device were named TBG.
RESOLUTION: Modify clk_dev (hp_stddev.c) to add "TBG" as the logical name.
This still allows use of the CLK name for existing command files.
STATUS: Fixed in version 3.9-0.
236. PROBLEM: The 13037 disc controller indicates a data under/overrun
incorrectly.
VERSION: 3.8-1
OBSERVATION: The 13037 disc simulator monitors the data transfer during a
read or write operation. A data overrun is indicated if SRQ is still set
when a data transfer is ready, indicating that the previous transfer has
not been handled yet by DCPC. However, the interface contains a 16-word
FIFO, so an overrun should be indicated only if the FIFO is full when a
read transfer is ready or empty when a write transfer is ready.
A read transfer writes a word to the FIFO and sets SRQ. Currently, DCPC
must remove the word and clear SRQ before the next read transfer occurs,
even though 15 empty slots still remain in the FIFO. Similarly, a write
transfer reads a word from the FIFO and sets SRQ. DCPC must supply the
next word and clear SRQ before the next write transfer occurs, even though
available words may remain in the FIFO. Effectively, the FIFO doesn't
exist, as the simulator treats it as a single-word register.
Moreover, the SRQ generation logic does not attempt to keep the FIFO full
for a write or empty for a read. If DCPC activity on the other channel
delays the DS channel, even by one word, an overrun is indicated, even
though available space remains in the FIFO.
CAUSE: Incomplete FIFO implementation.
RESOLUTION: Modify the read and write data transfer logic (hp2100_ds.c) to
indicate a data overrun when the FIFO is full or empty, respectively, and
extend the SRQ logic to continue requesting DCPC transfers until the FIFO
is empty (read) or has five words present (write), as in the hardware.
STATUS: Fixed in version 3.9-0.
237. PROBLEM: The 13037 disc controller Clear command clears too much.
VERSION: 3.8-1
OBSERVATION: In hardware, the Clear command issues a Controller Preset
(CPS) tag to all connected disc drives. The description of CPS says that
it clears drive faults, the drive head and sector registers, the drive
illegal head and sector address flip-flops, and the seek check, first
status, drive fault, and attention status bits. In simulation, the
"ds_clear" routine clears the drive current cylinder register and all
status bits.
CAUSE: Incorrect implementation.
RESOLUTION: Modify "ds_clear" (hp_disclib.c) to clear just the indicted
drive status.
STATUS: Fixed in version 3.9-0.
238. PROBLEM: The 13037 Recalibrate command clears the End-of-Cylinder flag.
VERSION: 3.8-1
OBSERVATION: The 13037 disc controller provides the Recalibrate command to
recover from Cylinder Compare errors. Recalibrate does not alter the
cylinder, head, or sector address in the controller. This allows a Read to
follow the Recalibrate directly without requiring an intervening Seek.
However, the DS simulator clears the EOC flag. This flag indicates that
the controller cylinder address must be incremented before it is used by
the read or write routines. Therefore, a Read following a Recalibrate will
begin at the wrong address if the last successful read ended after the
last sector on a track.
CAUSE: Oversight.
RESOLUTION: Modify the "ds_opflags" table (hp2100_ds.c) to remove the
CMF_CLREC flag from the Recalibrate entry.
STATUS: Fixed in version 3.9-0.
239. PROBLEM: The 13037 Request Status command reports Normal Completion for an
invalid unit.
VERSION: 3.8-1
OBSERVATION: The Request Status command includes a unit number field to
specify the disc drive whose status is returned in the second word. The
unit number is checked for validity, and a "unit not present" status is
returned if the number is invalid. However, if the unit number is illegal
(i.e., > 10), the command sets Normal Completion status instead of Unit
Unavailable status.
CAUSE: The status is set without checking for unit number legality.
RESOLUTION: Modify "ds_svc_c" (hp2100_ds.c) to set Unit Unavailable status
if the supplied unit number is greater than 10.
STATUS: Fixed in version 3.9-0.
240. PROBLEM: The 13037 Cold Load Read and Seek commands do not set Seek Check
if issued while a seek is in progress.
VERSION: 3.8-1
OBSERVATION: In hardware, the read, write, and recalibrate commands wait
for seek completion if they are issued while the heads are positioning.
The Cold Load Read and Seek commands do not; they issue a seek to the drive
without checking. The drive rejects a seek while the heads are in motion
and sets Seek Check status. In simulation, however, the Cold Load Read and
Seek commands wait for seek completion before seeking.
CAUSE: Oversight.
RESOLUTION: Modify the "ds_opflags" table (hp2100_ds.c) to remove the
CMF_UIDLE flag from the Cold Load Read and Seek entries, and modify
"ds_docmd" to check for a seek in progress when processing the Cold Load
Read and Seek commands.
STATUS: Fixed in version 3.9-0.
241. PROBLEM: A 13037 Seek command followed by Read does not set the busy flag.
VERSION: 3.8-1
OBSERVATION: In hardware, a Read command (e.g.) may be issued while a seek
is in progress. The controller firmware sets the busy flag to indicate
that the command was accepted. In simulation, however, the Read command is
not started until the seek is complete, so the busy flag is clear. A
program checking the busy flag will conclude that the Read was rejected.
CAUSE: The busy flag is set after the check for a seek in progress, and
the firmware wait is modeled by leaving the command pending on the
interface until the seek completes.
RESOLUTION: Modify "ds_docmd" (hp2100_ds.c) to eliminate the command
holdoff and instead model the wait for seek completion by changing the unit
function from "seek completion" to "read initiation" (e.g.).
STATUS: Fixed in version 3.9-0.
242. PROBLEM: The DO -E command continues to execute commands after a VM error.
VERSION: 3.8-1
OBSERVATION: According to the manual, when invoking a DO command file and
specifying the -E switch, "command processing (including nested command
invocations) will be aborted if any error is encountered." Errors that
occur as a result of commands, e.g., an invalid unit name supplied to the
ATTACH command, correctly terminate the DO command. However, errors that
occur when running the simulated CPU (e.g., a host I/O error) do not; the
error is printed on the console, but the command file continues to execute.
CAUSE: When the -E switch is specified, the DO command processor checks
the return status from each command invoked and aborts execution of the
command file if the return is not SCPE_OK. When a RUN, GO, STEP, CONT, or
BOOT command is invoked, the run command processor calls the VM-provided
instruction execution function to start the simulation.
When simulation is stopped, the instruction executor returns a status code
to indicate why execution has stopped. The reason might be a VM-defined
condition (e.g., execution of a "halt" instruction) or a system condition
(e.g., a host file system I/O error). The run command processor uses this
code to print an error message, but then returns SCPE_OK to the caller. As
the DO command processor never sees the error message, it continues to
execute commands.
RESOLUTION: Modify "run_cmd" (scp.c) to return the correct status instead
of SCPE_OK. Consolidate the error printing code from "run_cmd", "main",
and "do_cmd" into a new "fprint_error" function that combines both VM stop
and command error messages. Modify the error checkers in "main" and
"do_cmd" to call "fprint_error" to avoid printing messages from "run_cmd"
twice.
STATUS: Fixed in version 3.9-0.
243. ENHANCEMENT: Modify the 13037 disc simulator to use the common disc
controller library.
VERSION: 3.8-1
OBSERVATION: The 13037 (MAC) and 13365 (ICD) disc controllers are almost
identical. Altering the DS simulator to use the controller library
introduced with the DA simulator would reduce code size, ease maintenance,
and ensure that controller bug fixes propagate to both simulators.
RESOLUTION: Modify the 13037 simulator (hp2100_ds.c) to call routines in
the common disc controller library (hp_disclib.c).
STATUS: Fixed in version 3.9-0.
244. ENHANCEMENT: Add debug printout support to the 13037 disc simulator.
VERSION: 3.8-1
OBSERVATION: Debugging the disc controller behavior would be easier if the
internal state of the simulator was observable and recordable.
RESOLUTION: Modify "hp2100_ds.c" to add debug-mode printouts.
STATUS: Fixed in version 3.9-0.
245. ENHANCEMENT: Eliminate the poll for parameters to 13037 disc commands.
VERSION: 3.8-1
OBSERVATION: The DS simulator repeatedly polls the CPU interface for the
parameters to certain disc commands, such as Seek. It would be more
efficient to wait for a parameter to be output by the CPU.
RESOLUTION: Modify "ds_io" (hp2100_ds.c) to activate the controller
service only when a parameter word has been received with an ioIOO signal.
STATUS: Fixed in version 3.9-0.

View file

@ -1,6 +1,6 @@
/* hp2100_cpu.c: HP 21xx/1000 CPU simulator
Copyright (c) 1993-2011, Robert M. Supnik
Copyright (c) 1993-2012, Robert M. Supnik
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"),
@ -29,6 +29,8 @@
DMA1,DMA2 12607B/12578A/12895A direct memory access controller
DCPC1,DCPC2 12897B dual channel port controller
13-Jan-12 JDB Minor speedup in "is_mapped"
Added casts to cpu_mod, dmasio, dmapio, cpu_reset, dma_reset
07-Apr-11 JDB Fixed I/O return status bug for DMA cycles
Failed I/O cycles now stop on failing instruction
28-Mar-11 JDB Tidied up signal handling
@ -729,17 +731,17 @@ REG cpu_reg[] = {
Reference Handbook. */
MTAB cpu_mod[] = {
{ UNIT_MODEL_MASK, UNIT_2116, "", "2116", &cpu_set_model, &cpu_show_model, "2116" },
{ UNIT_MODEL_MASK, UNIT_2115, "", "2115", &cpu_set_model, &cpu_show_model, "2115" },
{ UNIT_MODEL_MASK, UNIT_2114, "", "2114", &cpu_set_model, &cpu_show_model, "2114" },
{ UNIT_MODEL_MASK, UNIT_2100, "", "2100", &cpu_set_model, &cpu_show_model, "2100" },
{ UNIT_MODEL_MASK, UNIT_1000_E, "", "1000-E", &cpu_set_model, &cpu_show_model, "1000-E" },
{ UNIT_MODEL_MASK, UNIT_1000_E, NULL, "21MX-E", &cpu_set_model, &cpu_show_model, "1000-E" },
{ UNIT_MODEL_MASK, UNIT_1000_M, "", "1000-M", &cpu_set_model, &cpu_show_model, "1000-M" },
{ UNIT_MODEL_MASK, UNIT_1000_M, NULL, "21MX-M", &cpu_set_model, &cpu_show_model, "1000-M" },
{ UNIT_MODEL_MASK, UNIT_2116, "", "2116", &cpu_set_model, &cpu_show_model, (void *) "2116" },
{ UNIT_MODEL_MASK, UNIT_2115, "", "2115", &cpu_set_model, &cpu_show_model, (void *) "2115" },
{ UNIT_MODEL_MASK, UNIT_2114, "", "2114", &cpu_set_model, &cpu_show_model, (void *) "2114" },
{ UNIT_MODEL_MASK, UNIT_2100, "", "2100", &cpu_set_model, &cpu_show_model, (void *) "2100" },
{ UNIT_MODEL_MASK, UNIT_1000_E, "", "1000-E", &cpu_set_model, &cpu_show_model, (void *) "1000-E" },
{ UNIT_MODEL_MASK, UNIT_1000_E, NULL, "21MX-E", &cpu_set_model, &cpu_show_model, (void *) "1000-E" },
{ UNIT_MODEL_MASK, UNIT_1000_M, "", "1000-M", &cpu_set_model, &cpu_show_model, (void *) "1000-M" },
{ UNIT_MODEL_MASK, UNIT_1000_M, NULL, "21MX-M", &cpu_set_model, &cpu_show_model, (void *) "1000-M" },
#if defined (HAVE_INT64)
{ UNIT_MODEL_MASK, UNIT_1000_F, "", "1000-F", &cpu_set_model, &cpu_show_model, "1000-F" },
{ UNIT_MODEL_MASK, UNIT_1000_F, "", "1000-F", &cpu_set_model, &cpu_show_model, (void *) "1000-F" },
#endif
{ MTAB_XTD | MTAB_VDV, 1, "IDLE", "IDLE", &cpu_set_idle, &cpu_show_idle, NULL },
@ -2442,13 +2444,15 @@ return;
static t_bool is_mapped (uint32 va)
{
uint32 dms_fence = dms_sr & MST_FENCE; /* get BP fence value */
uint32 dms_fence;
if (va >= 02000) /* above the base bage? */
return TRUE; /* always mapped */
else
else {
dms_fence = dms_sr & MST_FENCE; /* get BP fence value */
return (dms_sr & MST_FLT) ? (va < dms_fence) : /* below BP fence and lower portion mapped? */
(va >= dms_fence); /* or above BP fence and upper portion mapped? */
}
}
@ -3073,7 +3077,7 @@ return stat_data;
uint32 dmasio (DIB *dibptr, IOCYCLE signal_set, uint32 stat_data)
{
const CHANNEL ch = dibptr->card_index; /* DMA channel number */
const CHANNEL ch = (CHANNEL) dibptr->card_index; /* DMA channel number */
uint16 data;
IOSIGNAL signal;
IOCYCLE working_set = signal_set; /* no SIR handler needed */
@ -3155,7 +3159,7 @@ return stat_data;
uint32 dmapio (DIB *dibptr, IOCYCLE signal_set, uint32 stat_data)
{
const CHANNEL ch = dibptr->card_index; /* DMA channel number */
const CHANNEL ch = (CHANNEL) dibptr->card_index; /* DMA channel number */
uint16 data;
IOSIGNAL signal;
IOCYCLE working_set = IOADDSIR (signal_set); /* add ioSIR if needed */
@ -3459,7 +3463,7 @@ if (M == NULL) { /* initial call after st
else /* not defined */
return SCPE_IERR; /* internal error */
M = calloc (PASIZE, sizeof (uint16)); /* alloc mem */
M = (uint16 *) calloc (PASIZE, sizeof (uint16)); /* alloc mem */
if (M == NULL) /* alloc fail? */
return SCPE_MEM;
@ -3504,7 +3508,7 @@ return SCPE_OK;
t_stat dma_reset (DEVICE *dptr)
{
DIB *dibptr = (DIB *) dptr->ctxt; /* DIB pointer */
const CHANNEL ch = dibptr->card_index; /* DMA channel number */
const CHANNEL ch = (CHANNEL) dibptr->card_index; /* DMA channel number */
if (UNIT_CPU_MODEL != UNIT_2114) /* 2114 has only one channel */
hp_enbdis_pair (dma_dptrs [ch], /* make specified channel */
@ -3980,7 +3984,7 @@ switch (sel) {
break;
case 3: /* DS boot */
ibl_copy (ds_rom,dev);
ibl_copy (ds_rom, dev);
break;
}

View file

@ -98,6 +98,7 @@
105521 105301 "Closed loop" (trap cell handler)
105522 105302 [unknown]
[test] 105524 105304 [self test]
-- 105310 7974 boot loader ROM extension
Notes:

View file

@ -1,6 +1,6 @@
/* hp2100_cpu4.c: HP 1000 FPP/SIS
Copyright (c) 2006-2008, J. David Bryan
Copyright (c) 2006-2012, J. David Bryan
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"),
@ -25,6 +25,7 @@
CPU4 Floating Point Processor and Scientific Instruction Set
06-Feb-12 JDB Added OPSIZE casts to fp_accum calls in .FPWR/.TPWR
11-Sep-08 JDB Moved microcode function prototypes to hp2100_cpu1.h
05-Sep-08 JDB Removed option-present tests (now in UIG dispatchers)
18-Mar-08 JDB Fixed B register return bug in /CMRT
@ -1074,7 +1075,7 @@ switch (entry) { /* decode IR<3:0> */
exponent = exponent - 1;
O = 0; /* clear overflow */
fp_accum (&op[2], (fp_f + p)); /* acc = arg */
fp_accum (&op[2], (OPSIZE) (fp_f + p)); /* acc = arg */
while (exponent-- > 0) {
O = O | fp_exec ((uint16) (0054 | p), /* square acc */
@ -1086,7 +1087,7 @@ switch (entry) { /* decode IR<3:0> */
i = i << 1;
}
op[2] = fp_accum (NULL, (fp_f + p)); /* get accum */
op[2] = fp_accum (NULL, (OPSIZE) (fp_f + p)); /* get accum */
if (op[2].fpk[0] == 0) /* result zero? */
O = 1; /* underflow */

View file

@ -1,7 +1,7 @@
/* hp2100_cpu5.c: HP 1000 RTE-6/VM VMA and RTE-IV EMA instructions
Copyright (c) 2007-2008, Holger Veit
Copyright (c) 2006-2008, J. David Bryan
Copyright (c) 2006-2011, J. David Bryan
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"),
@ -26,6 +26,7 @@
CPU5 RTE-6/VM and RTE-IV firmware option instructions
28-Dec-11 JDB Eliminated unused variable in "cpu_ema_vset"
11-Sep-08 JDB Moved microcode function prototypes to hp2100_cpu1.h
05-Sep-08 JDB Removed option-present tests (now in UIG dispatchers)
30-Jul-08 JDB Redefined ABORT to pass address, moved def to hp2100_cpu.h
@ -970,7 +971,7 @@ uint32 scalars = op[3].word; /* S4 */
uint32 vectors = op[4].word; /* S5 */
uint32 k = op[5].word; /* S6 */
uint32 imax = 0; /* imax S11*/
uint32 xidex,idext1,mseg,phys, addr, i, MA;
uint32 xidex, idext1, mseg, addr, i, MA;
t_bool negflag = FALSE;
for (i=0; i<scalars; i++) { /* copy scalars */
@ -981,7 +982,6 @@ xidex = ReadIO(idx,UMAP); /* get ID extension */
if (xidex==0) goto vi22; /* NO EMA? error */
idext1 = ReadWA(xidex+1);
mseg = (idext1 >> 1) & MSEGMASK; /* S9 get logical start MSEG */
phys = idext1 & 01777; /* phys start of EMA */
for (i=0; i<vectors; i++) { /* copy vector addresses */
MA = ReadW(vin++);

View file

@ -1,7 +1,7 @@
/* hp2100_cpu7.c: HP 1000 VIS and SIGNAL/1000 microcode
Copyright (c) 2008, Holger Veit
Copyright (c) 2006-2008, J. David Bryan
Copyright (c) 2006-2012, J. David Bryan
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"),
@ -26,6 +26,7 @@
CPU7 Vector Instruction Set and SIGNAL firmware
06-Feb-12 JDB Corrected "opsize" parameter type in vis_abs
11-Sep-08 JDB Moved microcode function prototypes to hp2100_cpu1.h
05-Sep-08 JDB Removed option-present tests (now in UIG dispatchers)
30-Apr-08 JDB Updated SIGNAL code from Holger
@ -192,7 +193,7 @@ for (i=0; i<n; i++) {
#define GET_MSIGN(op) ((op)->fpk[0] & 0100000)
static void vis_abs(OP* in, uint32 opsize)
static void vis_abs(OP* in, OPSIZE opsize)
{
uint32 sign = GET_MSIGN(in); /* get sign */
if (sign) (void)fp_pcom(in, opsize); /* if negative, make positive */

View file

@ -1,6 +1,6 @@
/* hp2100_defs.h: HP 2100 simulator definitions
Copyright (c) 1993-2011, Robert M. Supnik
Copyright (c) 1993-2012, Robert M. Supnik
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"),
@ -23,10 +23,12 @@
be used in advertising or otherwise to promote the sale, use or other dealings
in this Software without prior written authorization from Robert M Supnik.
10-Feb-12 JDB Added hp_setsc, hp_showsc functions to support SC modifier
28-Mar-11 JDB Tidied up signal handling
29-Oct-10 JDB DMA channels renamed from 0,1 to 1,2 to match documentation
27-Oct-10 JDB Revised I/O signal enum values for concurrent signals
Revised I/O macros for new signal handling
09-Oct-10 JDB Added DA and DC device select code assignments
07-Sep-08 JDB Added POLL_FIRST to indicate immediate connection attempt
15-Jul-08 JDB Rearranged declarations with hp2100_cpu.h
26-Jun-08 JDB Rewrote device I/O to model backplane signals
@ -170,6 +172,8 @@ typedef enum { INITIAL, SERVICE } POLLMODE; /* poll synchronization
#define MUXL 040 /* 12920A lower data */
#define MUXU 041 /* 12920A upper data */
#define MUXC 042 /* 12920A control */
#define DI_DA 043 /* 12821A Disc Interface with Amigo disc devices */
#define DI_DC 044 /* 12821A Disc Interface with CS/80 disc and tape devices */
#define OPTDEV 002 /* start of optional devices */
#define CRSDEV 006 /* start of devices that receive CRS */
@ -178,19 +182,19 @@ typedef enum { INITIAL, SERVICE } POLLMODE; /* poll synchronization
/* IBL assignments */
#define IBL_V_SEL 14 /* ROM select */
#define IBL_V_SEL 14 /* ROM select <15:14> */
#define IBL_M_SEL 03
#define IBL_PTR 0000000 /* PTR */
#define IBL_DP 0040000 /* disk: DP */
#define IBL_DQ 0060000 /* disk: DQ */
#define IBL_MS 0100000 /* option 0: MS */
#define IBL_DS 0140000 /* option 1: DS */
#define IBL_MAN 0010000 /* RPL/man boot */
#define IBL_V_DEV 6 /* dev in <11:6> */
#define IBL_PTR 0000000 /* ROM 0: 12992K paper tape reader (PTR) */
#define IBL_DP 0040000 /* ROM 1: 12992A 7900 disc (DP) */
#define IBL_DQ 0060000 /* ROM 1: 12992A 2883 disc (DQ) */
#define IBL_MS 0100000 /* ROM 2: 12992D 7970 tape (MS) */
#define IBL_DS 0140000 /* ROM 3: 12992B 7905/06/20/25 disc (DS) */
#define IBL_MAN 0010000 /* RPL/manual boot <13:12> */
#define IBL_V_DEV 6 /* select code <11:6> */
#define IBL_OPT 0000070 /* options in <5:3> */
#define IBL_DP_REM 0000001 /* DP removable */
#define IBL_DS_HEAD 0000003 /* DS head number */
#define IBL_LNT 64 /* boot ROM length */
#define IBL_DP_REM 0000001 /* DP removable <0:0> */
#define IBL_DS_HEAD 0000003 /* DS head number <1:0> */
#define IBL_LNT 64 /* boot ROM length in words */
#define IBL_MASK (IBL_LNT - 1) /* boot length mask */
#define IBL_DPC (IBL_LNT - 2) /* DMA ctrl word */
#define IBL_END (IBL_LNT - 1) /* last location */
@ -453,10 +457,12 @@ extern void hp_enbdis_pair (DEVICE *ccp, DEVICE *dcp);
extern t_stat fprint_sym (FILE *ofile, t_addr addr, t_value *val, UNIT *uptr, int32 sw);
extern const char *fmt_char (uint8 ch);
extern t_stat hp_setsc (UNIT *uptr, int32 val, char *cptr, void *desc);
extern t_stat hp_showsc (FILE *st, UNIT *uptr, int32 val, void *desc);
extern t_stat hp_setdev (UNIT *uptr, int32 val, char *cptr, void *desc);
extern t_stat hp_showdev (FILE *st, UNIT *uptr, int32 val, void *desc);
/* Standard device functions */
/* Device-specific functions */
extern int32 sync_poll (POLLMODE poll_mode);

1927
HP2100/hp2100_di.c Normal file

File diff suppressed because it is too large Load diff

296
HP2100/hp2100_di.h Normal file
View file

@ -0,0 +1,296 @@
/* hp2100_di.h: HP 12821A HP-IB Disc Interface simulator common definitions
Copyright (c) 2010-2012, J. David Bryan
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"),
to deal in the Software without restriction, including without limitation
the rights to use, copy, modify, merge, publish, distribute, sublicense,
and/or sell copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Except as contained in this notice, the name of the author shall not be
used in advertising or otherwise to promote the sale, use or other dealings
in this Software without prior written authorization from the author.
DI 12821A Disc Interface
14-Feb-12 JDB First release
16-Nov-10 JDB Created DI common definitions file
This file defines the interface between HP-IB device simulators and the
12821A Disc Interface simulator. It must be included by the device-specific
modules (hp2100_di_da.c, etc.).
Implementation notes:
1. Three CARD_ID values are defined, corresponding to the Amigo disc (DA),
CS/80 disc (DC), and Amigo mag tape (MA) simulators. At first release,
only the DA device is implemented. However, as the 12821A diagnostic
requires two cards to test I/O fully, a dummy DC device is provided by
the DA simulator. It is enabled only when the DA card is configured for
diagnostic mode. This dummy device may be removed when either the DC or
MA device is implemented.
*/
/* Program constants */
#define FIFO_SIZE 16 /* FIFO depth */
typedef enum { da, dc, ma, /* card IDs */
first_card = da, /* first card ID */
last_card = ma, /* last card ID */
card_count } CARD_ID; /* count of card IDs */
/* Device flags and accessors (leaves space for disc/tape flags) */
#define DEV_V_BUSADR (DEV_V_UF + 8) /* bits 10-8: HP-IB address */
#define DEV_V_DIAG (DEV_V_UF + 11) /* bit 11: diagnostic mode */
#define DEV_V_W1 (DEV_V_UF + 12) /* bit 12: DCPC pacing jumper */
#define DEV_M_BUSADR 7 /* bus address mask */
#define DEV_BUSADR (DEV_M_BUSADR << DEV_V_BUSADR)
#define DEV_DIAG (1 << DEV_V_DIAG)
#define DEV_W1 (1 << DEV_V_W1)
#define GET_DIADR(f) (((f) >> DEV_V_BUSADR) & DEV_M_BUSADR)
#define SET_DIADR(f) (((f) & DEV_M_BUSADR) << DEV_V_BUSADR)
/* Unit flags and accessors (leaves space for disc/tape flags) */
#define UNIT_V_BUSADR (UNIT_V_UF + 8) /* bits 10-8: HP-IB address */
#define UNIT_M_BUSADR 7 /* bus address mask */
#define UNIT_BUSADR (UNIT_M_BUSADR << UNIT_V_BUSADR)
#define GET_BUSADR(f) (((f) >> UNIT_V_BUSADR) & UNIT_M_BUSADR)
#define SET_BUSADR(f) (((f) & UNIT_M_BUSADR) << UNIT_V_BUSADR)
/* Debug flags */
#define DEB_CPU (1 << 0) /* words received from and sent to the CPU */
#define DEB_CMDS (1 << 1) /* interface commands received from the CPU */
#define DEB_BUF (1 << 2) /* data read from and written to the card FIFO */
#define DEB_XFER (1 << 3) /* data received and transmitted via HP-IB */
#define DEB_RWSC (1 << 4) /* device read/write/status/control commands */
#define DEB_SERV (1 << 5) /* unit service scheduling calls */
/* HP-IB control state bit flags.
NOTE that these flags align with the corresponding flags in the DI status
register, so don't change the order!
*/
#define BUS_ATN 0001 /* attention */
#define BUS_EOI 0002 /* end or identify */
#define BUS_DAV 0004 /* data available */
#define BUS_NRFD 0010 /* not ready for data */
#define BUS_NDAC 0020 /* not data accepted */
#define BUS_REN 0040 /* remote enable */
#define BUS_IFC 0100 /* interface clear */
#define BUS_SRQ 0200 /* service request */
#define BUS_PPOLL (BUS_ATN | BUS_EOI) /* parallel poll */
/* HP-IB data */
#define BUS_ADDRESS 0037 /* bus address mask */
#define BUS_GROUP 0140 /* bus group mask */
#define BUS_COMMAND 0160 /* bus command type mask */
#define BUS_DATA 0177 /* bus data mask */
#define BUS_PARITY 0200 /* bus parity mask */
#define BUS_PCG 0000 /* primary command group */
#define BUS_LAG 0040 /* listen address group */
#define BUS_TAG 0100 /* talk address group */
#define BUS_SCG 0140 /* secondary command group */
#define BUS_UCG 0020 /* universal command group */
#define BUS_ACG 0000 /* addressed command group */
#define BUS_UNADDRESS 0037 /* unlisten and untalk */
#define PPR(a) (uint8) (1 << (7 - (a))) /* parallel poll response */
/* Byte accessors */
#define BYTE_SHIFT 8 /* byte shift count */
#define UPPER_BYTE 0177400 /* high-order byte mask */
#define LOWER_BYTE 0000377 /* low-order byte mask */
#define GET_UPPER(w) (uint8) (((w) & UPPER_BYTE) >> BYTE_SHIFT)
#define GET_LOWER(w) (uint8) ((w) & LOWER_BYTE)
#define SET_UPPER(b) ((b) << BYTE_SHIFT)
#define SET_LOWER(b) (b)
#define SET_BOTH(b) (SET_UPPER (b) | SET_LOWER (b))
typedef enum { upper, /* byte selector */
lower } SELECTOR;
/* Per-card state variables */
typedef struct {
FLIP_FLOP control; /* control flip-flop */
FLIP_FLOP flag; /* flag flip-flop */
FLIP_FLOP flagbuf; /* flag buffer flip-flop */
FLIP_FLOP srq; /* SRQ flip-flop */
FLIP_FLOP edt; /* EDT flip-flop */
FLIP_FLOP eor; /* EOR flip-flop */
SELECTOR ibp; /* input byte pointer selector */
SELECTOR obp; /* output byte pointer selector */
uint16 cntl_register; /* control word register */
uint16 status_register; /* status word register */
uint16 input_data_register; /* input data register */
uint32 fifo [FIFO_SIZE]; /* FIFO buffer */
uint32 fifo_count; /* FIFO occupancy counter */
REG *fifo_reg; /* FIFO register pointer */
uint32 acceptors; /* unit bitmap of bus acceptors */
uint32 listeners; /* unit bitmap of bus listeners */
uint32 talker; /* unit bitmap of bus talker */
uint8 bus_cntl; /* HP-IB bus control state (ATN, EOI, etc.) */
uint8 poll_response; /* address bitmap of parallel poll responses */
double ifc_timer; /* 100 microsecond IFC timer */
} DI_STATE;
/* Disc interface VM global register definitions.
Include these definitions before any device-specific registers.
Implementation notes:
1. The TMR register is included to ensure that the IFC timer is saved by a
SAVE command. It is declared as a hidden, read-only byte array of a size
compatible with a double-precision floating-point value, as there is no
appropriate macro for the double type.
*/
#define DI_REGS(dev) \
{ ORDATA (CWR, di [dev].cntl_register, 16), REG_FIT }, \
{ ORDATA (SWR, di [dev].status_register, 16), REG_FIT }, \
{ ORDATA (IDR, di [dev].input_data_register, 16), REG_FIT }, \
\
{ DRDATA (FCNT, di [dev].fifo_count, 5) }, \
{ BRDATA (FIFO, di [dev].fifo, 8, 20, FIFO_SIZE), REG_CIRC }, \
\
{ GRDATA (ACPT, di [dev].acceptors, 2, 4, 0) }, \
{ GRDATA (LSTN, di [dev].listeners, 2, 4, 0) }, \
{ GRDATA (TALK, di [dev].talker, 2, 4, 0) }, \
{ GRDATA (PPR, di [dev].poll_response, 2, 8, 0), REG_FIT }, \
{ GRDATA (BUSCTL, di [dev].bus_cntl, 2, 8, 0), REG_FIT }, \
\
{ FLDATA (CTL, di [dev].control, 0) }, \
{ FLDATA (FLG, di [dev].flag, 0) }, \
{ FLDATA (FBF, di [dev].flagbuf, 0) }, \
{ FLDATA (SRQ, di [dev].srq, 0) }, \
{ FLDATA (EDT, di [dev].edt, 0) }, \
{ FLDATA (EOR, di [dev].eor, 0) }, \
\
{ BRDATA (TMR, &di [dev].ifc_timer, 10, CHAR_BIT, sizeof (double)), REG_HRO }, \
\
{ ORDATA (SC, dev##_dib.select_code, 6), REG_HRO }
/* Disc interface VM global modifier definitions.
Include these definitions before any device-specific modifiers.
*/
#define DI_MODS(dev) \
{ MTAB_XTD | MTAB_VDV, 1, "ADDRESS", "ADDRESS", &di_set_address, &di_show_address, &dev }, \
\
{ MTAB_XTD | MTAB_VDV, 1, NULL, "DIAG", &di_set_cable, NULL, &dev }, \
{ MTAB_XTD | MTAB_VDV, 0, NULL, "HPIB", &di_set_cable, NULL, &dev }, \
{ MTAB_XTD | MTAB_VDV, 0, "CABLE", NULL, NULL, &di_show_cable, &dev }, \
\
{ MTAB_XTD | MTAB_VDV, 0, "SC", "SC", &hp_setsc, &hp_showsc, &dev }, \
{ MTAB_XTD | MTAB_VDV | MTAB_NMO, 0, "DEVNO", "DEVNO", &hp_setdev, &hp_showdev, &dev }, \
\
{ MTAB_XTD | MTAB_VUN, 0, "BUS", "BUS", &di_set_address, &di_show_address, &dev }
/* Disc interface global bus routine definitions */
typedef t_bool ACCEPTOR (uint32 unit, uint8 data);
typedef void RESPONDER (CARD_ID card, uint32 unit, uint8 new_cntl);
/* Disc interface global variables */
extern DI_STATE di [];
extern DEBTAB di_deb [];
/* Disc interface global VM routines */
extern IOHANDLER di_io;
extern t_stat di_reset (DEVICE *dptr);
/* Disc interface global SCP routines */
extern t_stat di_set_address (UNIT *uptr, int32 value, char *cptr, void *desc);
extern t_stat di_show_address (FILE *st, UNIT *uptr, int32 value, void *desc);
extern t_stat di_set_cable (UNIT *uptr, int32 value, char *cptr, void *desc);
extern t_stat di_show_cable (FILE *st, UNIT *uptr, int32 value, void *desc);
/* Disc interface global bus routines */
extern t_bool di_bus_source (CARD_ID card, uint8 data);
extern void di_bus_control (CARD_ID card, uint32 unit, uint8 assert, uint8 deny);
extern void di_poll_response (CARD_ID card, uint32 unit, FLIP_FLOP response);
/* Amigo disc global VM routines */
extern t_stat da_service (UNIT *uptr);
extern t_stat da_boot (int32 unitno, DEVICE *dptr);
/* Amigo disc global bus routines */
extern ACCEPTOR da_bus_accept;
extern RESPONDER da_bus_respond;
/* Amigo mag tape global VM routines */
extern t_stat ma_service (UNIT *uptr);
extern t_stat ma_boot (int32 unitno, DEVICE *dptr);
/* Amigo mag tape global SCP routines */
extern t_stat ma_set_timing (UNIT *uptr, int32 val, char *cptr, void *desc);
extern t_stat ma_show_timing (FILE *st, UNIT *uptr, int32 val, void *desc);
/* Amigo mag tape global bus routines */
extern ACCEPTOR ma_bus_accept;
extern RESPONDER ma_bus_respond;

2127
HP2100/hp2100_di_da.c Normal file

File diff suppressed because it is too large Load diff

View file

@ -1,6 +1,6 @@
SIMH/HP 21XX DIAGNOSTICS PERFORMANCE
====================================
Last update: 2008-08-07
Last update: 2012-02-13
The HP 24396 diagnostic suite has been run against the SIMH HP 21xx simulation.
@ -70,7 +70,7 @@ The results of the diagnostic runs are summarized below:
103116 12967 Synchronous Interface 1438 - No simulation
103017 12966 Asynchronous Data Set 1519 3.8-0 Passed
103121 12968 Asynchronous Comm. Interface 1602 - No simulation
103024 12821 ICD Disc Interface 1928 - No simulation
103024 12821 ICD Disc Interface 1928 3.8-2 Passed
104000 2600 Keyboard Display Terminal 1615 - No simulation
104003 Teleprinter 1509 3.2-3 Partial
@ -132,6 +132,7 @@ Part Number Diagnostic Name Code Op. Sys. Code Vers. Resul
12824-16002 Vector Instruction Set Firmware 2026 RTE-IVB 5010 3.8-0 Passed
12829-16006 Vector Instruction Set Firmware 2226 RTE-6/VM 6200 3.8-0 Passed
92835-16006 SIGNAL/1000 Firmware Diagnostic 2040 RTE-6/VM 6200 3.8-0 Passed
91711-12032 ICD/MAC Disc Diagnostic 2201 RTE-IVB 5010 3.8-2 Partial
The "SIMH Version" is the version number of the earliest SIMH system that was
@ -1237,6 +1238,105 @@ TEST RESULT: Passed.
-------------------------------------
DSN 103024 - 12821 ICD Disc Interface
-------------------------------------
TESTED DEVICE: DA, DC (hp2100_di.c, hp2100_di_da.c)
CONFIGURATION: sim> set DA DIAG
sim> set DA ADDRESS=5
sim> deposit S 000000
sim> reset
sim> go 100
TEST REPORT: *** HPIB 12821A DIAGNOSTIC ***
INSTRUCTIONS:
1. ENTER ? WHEN YOU NEED MORE INFORMATION.
2. INDICATE OCTAL VALUES BY A FINAL B (E.G. 13B).
3. SET SR BIT 15 ON TO LOOP ON DIAGNOSTIC,
TOGGLE ON,OFF TO BREAK OUT OF A SINGLE TEST
LOOP (CONVERSATIONAL-MODE).
4. SET SR BIT 14 TO SUPPRESS PRESET TEST
5. SET SR BIT 13 T0 PRINT ONLY ERROR MESSAGES
(EXCEPT CONFIGURATION MESSAGES).
6. SET SR BIT 12 TO DELAY 1 SECOND BETWEEN TESTS
IS THE FIRST CARD IN SELECT CODE 43B?
IF YES, INPUT CARRIAGE RETURN
OTHERWISE, INPUT THE CORRECT SELECT CODE.. [CR entered]
INPUT THE LAST OCTAL DIGIT OF THE BUS
ADDRESS (0-7 DERIVED FROM S1-S3) ... 5
IS THE SECOND CARD IN SELECT CODE 44B?
IF YES, INPUT CARRIAGE RETURN
IF NO SECOND CARD, INPUT 77B
IF DIAGNOSTIC GUESSED INCORRECTLY AND THERE IS
A SECOND CARD, ENTER CORRECT SELECT CODE... [CR entered]
INPUT THE LAST OCTAL DIGIT OF THE BUS
ADDRESS (0-7 DERIVED FROM S1-S3) ... 0
PROGRAM OPTIONS:
CR - CARRIAGE RETURN- (DEFAULT) EXECUTE DIAG.
FROM TEST 0.
N - BEGIN EXECUTION FROM TEST N
LN - LOOP ON TEST N
(TOGGLE SW BIT 15 TO REGAIN CONTROL)
E - EXIT PROGRAM WITH HLT77
(PRESS RUN TO RE-ENTER PROGRAM)
F - FORCE TESTING TO SECOND BOARD
G - GO BACK AND RETEST BOARD ONE
R - GO BACK TO RECONFIGURATION SECTION
? [CR entered]
PRESS HALT,PRESET,RUN WITHIN 10 SECONDS !
[CTRL+E]
Simulation stopped
sim> reset
sim> go
TESTING COMPLETED ON SELECT CODE 43B
PRESS HALT,PRESET,RUN WITHIN 10 SECONDS !
[CTRL+E]
Simulation stopped
sim> reset
sim> go
TESTING COMPLETED ON SELECT CODE 44B
(T15)..DI TO HP-IB TO DI TEST PASSES !
? E
HALT instruction 102077
TEST RESULT: Passed.
------------------------
DSN 104003 - Teleprinter
------------------------
@ -3505,3 +3605,520 @@ TEST REPORT: SIGNAL/1000 FIRMWARE DIAGNOSTIC
SIGNAL/1000 FIRMWARE DIAGNOSTIC SUCCESSFUL COMPLETION
TEST RESULT: Passed.
------------------------------
DIAG - ICD/MAC Disc Diagnostic
------------------------------
TESTED DEVICE: DA (hp2100_di.c, hp2100_di_da.c)
BINARY FILE: 91711-12032 Rev. 2201
HOST SYSTEM: RTE-IVB Rev. 5010
CONFIGURATION: sim> go
TEST REPORT: DIAG : HP-IB DISC DIAGNOSTIC
DIAG : CAUTION: DATA COULD BE DESTROYED ON THE DISC TESTED.
DIAG : REMOVABLE MEDIA SHOULD BE REPLACED.
DIAG : List LU (0 for none) ? 0
DIAG : Do you want to trace disc operations ? YES
DIAG : Start trace at what step ? 0
DIAG : Trace operations which are not part of the test steps ? NO
DIAG : Stop after first failure ? NO
DIAG : Disc LU ? 41
DIAG : Disc address ? 0
DIAG : Drive model number ? 06
DIAG : Do you want to run the interactive part of the test ? YES
DIAG : LU 41 address 0 select code 25 7906 drive
DIAG : CHECK THAT ALL SWITCHES ARE SET CORRECTLY.
DIAG : THE RUN/STOP SWITCH SHOULD BE IN THE RUN POSITION.
DIAG : THE FORMAT SWITCH SHOULD BE ON.
DIAG : THE PROTECT/READ ONLY SWITCH SHOULD BE OFF.
DIAG : Type <space>,<return>
DIAG : Beginning part 1 of diagnostic.
DIAG : operation parameters/results spd cs ds DSJ
DIAG : WRITE LOOPBACK REC length 10
DIAG : READ LOOPBACK REC length 8
DIAG : test data read test passed
DIAG : STEP 0 PASSED
DIAG : operation parameters/results spd cs ds DSJ
DIAG : INITIATE SELF TEST
DIAG : RETURN DSJ 2
DIAG : RTN SELF-TEST RES result 0
DIAG : RETURN DSJ 2
DIAG : STEP 1 PASSED
DIAG : operation parameters/results spd cs ds DSJ
DIAG : REQUEST STATUS drive type 0 0 0 50 0
DIAG : IDENTIFY result 3 0 0 40 0
DIAG : STEP 3 PASSED
DIAG : Part 1 of diagnostic completed.
DIAG : Information for test track selection.
DIAG : Drive address limits:
DIAG : cylinders: 0 - 410 heads: 0 - 3 sectors: 0 - 47
DIAG : First and last tracks on LU:
DIAG : cylinder 0 head 0 (track 0)
DIAG : cylinder 199 head 1 (track 399)
DIAG : First and last spares on LU:
DIAG : cylinder 200 head 0 (track 400)
DIAG : cylinder 202 head 1 (track 405)
DIAG : Heads on LU (first - last): 0 - 1
DIAG : Searching entire LU for file directory:
DIAG : NO DIRECTORY OR UNABLE TO READ DIRECTORY ON TEST LU
DIAG : First and last tracks available for testing:
DIAG : cylinder 0 head 0 (track 0)
DIAG : cylinder 199 head 1 (track 399)
DIAG : Default test tracks:
DIAG : cylinder 199 head 0 (track 398)
DIAG : cylinder 199 head 1 (track 399)
DIAG : Use default test tracks ? YES
DIAG : Checking test track preambles.
DIAG : Test track preambles are OK.
DIAG : Beginning part 2 of diagnostic.
DIAG : operation parameters/results spd cs ds DSJ
DIAG : SEEK cy 199 hd 0 sec 0 0 37 40 0
DIAG : STEP 4 PASSED
DIAG : operation parameters/results spd cs ds DSJ
DIAG : REQUEST DISC ADDR cy 199 hd 0 sec 0 0 0 40 0
DIAG : STEP 5 PASSED
DIAG : operation parameters/results spd cs ds DSJ
DIAG : RECALIBRATE 0
DIAG : REQUEST STATUS drive type 0 0 37 40 0
DIAG : STEP 6 PASSED
DIAG : operation parameters/results spd cs ds DSJ
DIAG : SEEK cy 199 hd 1 sec 0 0 37 40 0
DIAG : REQUEST SECTOR ADDR sec 2 0 0 40 0
DIAG : STEP 7 PASSED
DIAG : operation parameters/results spd cs ds DSJ
DIAG : CLEAR (OPCODE)
DIAG : RETURN DSJ 2
DIAG : RETURN DSJ 2
DIAG : REQUEST STATUS drive type 0 0 0 40 0
DIAG : STEP 8 PASSED
DIAG : operation parameters/results spd cs ds DSJ
DIAG : SEEK cy 199 hd 0 sec 0 0 37 40 0
DIAG : READ FULL SECTOR length 138 0 0 40 0
DIAG : decode preamble cy 199 hd 0 sec 0 spd 0
DIAG : STEP 9 PASSED
DIAG : operation parameters/results spd cs ds DSJ
DIAG : SEEK cy 199 hd 0 sec 0 0 37 40 0
DIAG : WRITE FULL SECTOR length 138 0 0 40 0
DIAG : STEP 10 PASSED
DIAG : operation parameters/results spd cs ds DSJ
DIAG : SEEK cy 199 hd 0 sec 0 0 37 40 0
DIAG : VERIFY sector count 1 0 0 40 0
DIAG : STEP 11 FAILED
DIAG : operation parameters/results spd cs ds DSJ
DIAG : SEEK cy 199 hd 0 sec 0 0 37 40 0
DIAG : READ length 128 0 0 40 0
DIAG : STEP 12 FAILED
DIAG : operation parameters/results spd cs ds DSJ
DIAG : SEEK cy 199 hd 0 sec 0 0 37 40 0
DIAG : READ WITH OFFSET length 128 offset 55 0 0 40 0
DIAG : STEP 13 FAILED
DIAG : operation parameters/results spd cs ds DSJ
DIAG : SEEK cy 199 hd 0 sec 0 0 37 40 0
DIAG : READ WITHOUT VERIFY length 128 0 0 40 0
DIAG : STEP 14 FAILED
DIAG : operation parameters/results spd cs ds DSJ
DIAG : SET FILE MASK mask 0 0 0 40 0
DIAG : SEEK cy 199 hd 0 sec 47 0 37 40 0
DIAG : READ FULL SECTOR length 140 0 14 40 1
DIAG : STEP 16 PASSED
DIAG : operation parameters/results spd cs ds DSJ
DIAG : SET FILE MASK mask 2 0 0 40 0
DIAG : SEEK cy 199 hd 0 sec 47 0 37 40 0
DIAG : READ FULL SECTOR length 140 0 0 40 0
DIAG : STEP 17 PASSED
DIAG : operation parameters/results spd cs ds DSJ
DIAG : SET FILE MASK mask 2 0 0 40 0
DIAG : SEEK cy 199 hd 3 sec 47 0 37 40 0
DIAG : READ FULL SECTOR length 140 0 14 40 1
DIAG : STEP 18 PASSED
DIAG : operation parameters/results spd cs ds DSJ
DIAG : SET FILE MASK mask 3 0 0 40 0
DIAG : SEEK cy 199 hd 3 sec 47 0 37 40 0
DIAG : READ FULL SECTOR length 140 0 0 40 0
DIAG : REQUEST DISC ADDR cy 200 hd 0 sec 1 0 0 40 0
DIAG : STEP 19 PASSED
DIAG : operation parameters/results spd cs ds DSJ
DIAG : SET FILE MASK mask 11 0 0 40 0
DIAG : SEEK cy 199 hd 0 sec 47 0 37 40 0
DIAG : READ FULL SECTOR length 140 0 0 40 0
DIAG : REQUEST DISC ADDR cy 198 hd 0 sec 1 0 0 40 0
DIAG : STEP 20 PASSED
DIAG : operation parameters/results spd cs ds DSJ
DIAG : SEEK cy 199 hd 0 sec 0 0 37 40 0
DIAG : ADDRESS RECORD cy 199 hd 1 sec 0 0 0 40 0
DIAG : INITIALIZE length 6144 spd 1 1 0 40 0
DIAG : SEEK cy 199 hd 0 sec 0 0 37 40 0
DIAG : READ FULL SECTOR length 3 0 0 40 0
DIAG : decode preamble cy 199 hd 0 sec 0 spd 0
DIAG : STEP 21 FAILED
DIAG : operation parameters/results spd cs ds DSJ
DIAG : SEEK cy 199 hd 1 sec 0 0 37 40 0
DIAG : ADDRESS RECORD cy 199 hd 0 sec 0 0 0 40 0
DIAG : INITIALIZE length 6144 spd 4 4 0 40 0
DIAG : SEEK cy 199 hd 1 sec 0 0 37 40 0
DIAG : READ FULL SECTOR length 3 0 0 40 0
DIAG : decode preamble cy 199 hd 1 sec 0 spd 0
DIAG : STEP 22 FAILED
DIAG : operation parameters/results spd cs ds DSJ
DIAG : SEEK cy 199 hd 1 sec 0 0 37 40 0
DIAG : ADDRESS RECORD cy 199 hd 1 sec 0 0 0 40 0
DIAG : INITIALIZE length 6144 spd 2 2 0 40 0
DIAG : SEEK cy 199 hd 1 sec 0 0 37 40 0
DIAG : READ FULL SECTOR length 3 0 0 40 0
DIAG : decode preamble cy 199 hd 1 sec 0 spd 0
DIAG : STEP 25 FAILED
DIAG : operation parameters/results spd cs ds DSJ
DIAG : SEEK cy 199 hd 1 sec 0 0 37 40 0
DIAG : ADDRESS RECORD cy 199 hd 0 sec 0 0 0 40 0
DIAG : INITIALIZE length 6144 spd 6 6 0 40 0
DIAG : SEEK cy 199 hd 1 sec 0 0 37 40 0
DIAG : READ FULL SECTOR length 3 0 0 40 0
DIAG : decode preamble cy 199 hd 1 sec 0 spd 0
DIAG : STEP 26 FAILED
DIAG : operation parameters/results spd cs ds DSJ
DIAG : SEEK cy 199 hd 1 sec 0 0 37 40 0
DIAG : ADDRESS RECORD cy 199 hd 1 sec 0 0 0 40 0
DIAG : INITIALIZE length 6144 spd 3 3 0 40 0
DIAG : SEEK cy 199 hd 1 sec 0 0 37 40 0
DIAG : READ FULL SECTOR length 3 0 0 40 0
DIAG : decode preamble cy 199 hd 1 sec 0 spd 0
DIAG : STEP 28 FAILED
DIAG : operation parameters/results spd cs ds DSJ
DIAG : SEEK cy 199 hd 1 sec 0 0 37 40 0
DIAG : ADDRESS RECORD cy 199 hd 0 sec 0 0 0 40 0
DIAG : INITIALIZE length 6144 spd 4 4 0 40 0
DIAG : SEEK cy 199 hd 1 sec 0 0 37 40 0
DIAG : READ FULL SECTOR length 3 0 0 40 0
DIAG : decode preamble cy 199 hd 1 sec 0 spd 0
DIAG : STEP 30 FAILED
DIAG : operation parameters/results spd cs ds DSJ
DIAG : SEEK cy 199 hd 0 sec 0 0 37 40 0
DIAG : ADDRESS RECORD cy 199 hd 0 sec 0 0 0 40 0
DIAG : INITIALIZE length 6144 spd 0 0 0 40 0
DIAG : SEEK cy 199 hd 0 sec 0 0 37 40 0
DIAG : READ FULL SECTOR length 3 0 0 40 0
DIAG : decode preamble cy 199 hd 0 sec 0 spd 0
DIAG : SET FILE MASK mask 0 0 0 40 0
DIAG : SEEK cy 199 hd 0 sec 0 0 37 40 0
DIAG : READ length 128 0 0 40 0
DIAG : STEP 31 PASSED
DIAG : operation parameters/results spd cs ds DSJ
DIAG : SEEK cy 199 hd 1 sec 0 0 37 40 0
DIAG : ADDRESS RECORD cy 199 hd 1 sec 0 0 0 40 0
DIAG : INITIALIZE length 6144 spd 0 0 0 40 0
DIAG : SEEK cy 199 hd 1 sec 0 0 37 40 0
DIAG : READ FULL SECTOR length 3 0 0 40 0
DIAG : decode preamble cy 199 hd 1 sec 0 spd 0
DIAG : SET FILE MASK mask 0 0 0 40 0
DIAG : SEEK cy 199 hd 1 sec 0 0 37 40 0
DIAG : READ length 128 0 0 40 0
DIAG : STEP 32 PASSED
DIAG : operation parameters/results spd cs ds DSJ
DIAG : SEEK cy 199 hd 0 sec 0 0 37 40 0
DIAG : WRITE length 128 0 0 40 0
DIAG : STEP 35 PASSED
DIAG : operation parameters/results spd cs ds DSJ
DIAG : SEEK cy 199 hd 0 sec 0 0 37 40 0
DIAG : READ length 128 0 0 40 0
DIAG : test data read test passed
DIAG : STEP 36 PASSED
DIAG : operation parameters/results spd cs ds DSJ
DIAG : SEEK cy 1 hd 0 sec 0 0 37 40 0
DIAG : REQUEST DISC ADDR cy 1 hd 0 sec 0 0 0 40 0
DIAG : SEEK cy 2 hd 0 sec 0 0 37 40 0
DIAG : REQUEST DISC ADDR cy 2 hd 0 sec 0 0 0 40 0
DIAG : SEEK cy 4 hd 0 sec 0 0 37 40 0
DIAG : REQUEST DISC ADDR cy 4 hd 0 sec 0 0 0 40 0
DIAG : SEEK cy 8 hd 0 sec 0 0 37 40 0
DIAG : REQUEST DISC ADDR cy 8 hd 0 sec 0 0 0 40 0
DIAG : SEEK cy 16 hd 0 sec 0 0 37 40 0
DIAG : REQUEST DISC ADDR cy 16 hd 0 sec 0 0 0 40 0
DIAG : SEEK cy 32 hd 0 sec 0 0 37 40 0
DIAG : REQUEST DISC ADDR cy 32 hd 0 sec 0 0 0 40 0
DIAG : SEEK cy 64 hd 0 sec 0 0 37 40 0
DIAG : REQUEST DISC ADDR cy 64 hd 0 sec 0 0 0 40 0
DIAG : SEEK cy 128 hd 0 sec 0 0 37 40 0
DIAG : REQUEST DISC ADDR cy 128 hd 0 sec 0 0 0 40 0
DIAG : SEEK cy 256 hd 0 sec 0 0 37 40 0
DIAG : REQUEST DISC ADDR cy 256 hd 0 sec 0 0 0 40 0
DIAG : SEEK cy 410 hd 0 sec 0 0 37 40 0
DIAG : REQUEST DISC ADDR cy 410 hd 0 sec 0 0 0 40 0
DIAG : STEP 40 PASSED
DIAG : operation parameters/results spd cs ds DSJ
DIAG : SEEK cy 199 hd 0 sec 0 0 37 40 0
DIAG : VERIFY sector count 1 0 0 40 0
DIAG : SEEK cy 199 hd 0 sec 0 0 37 40 0
DIAG : VERIFY sector count 2 0 0 40 0
DIAG : SEEK cy 199 hd 0 sec 0 0 37 40 0
DIAG : VERIFY sector count 4 0 0 40 0
DIAG : SEEK cy 199 hd 0 sec 0 0 37 40 0
DIAG : VERIFY sector count 8 0 0 40 0
DIAG : SEEK cy 199 hd 0 sec 0 0 37 40 0
DIAG : VERIFY sector count 16 0 0 40 0
DIAG : SEEK cy 199 hd 0 sec 0 0 37 40 0
DIAG : VERIFY sector count 32 0 0 40 0
DIAG : SEEK cy 199 hd 0 sec 0 0 37 40 0
DIAG : VERIFY sector count 48 0 0 40 0
DIAG : STEP 45 PASSED
DIAG : operation parameters/results spd cs ds DSJ
DIAG : secondary HP-IB value 162
DIAG : REQUEST STATUS drive type 0 0 12 40 0
DIAG : secondary HP-IB value 163
DIAG : REQUEST STATUS drive type 0 0 12 40 0
DIAG : secondary HP-IB value 164
DIAG : REQUEST STATUS drive type 0 0 12 40 0
DIAG : secondary HP-IB value 165
DIAG : REQUEST STATUS drive type 0 0 12 40 0
DIAG : secondary HP-IB value 166
DIAG : REQUEST STATUS drive type 0 0 12 40 0
DIAG : secondary HP-IB value 167
DIAG : REQUEST STATUS drive type 0 0 12 40 0
DIAG : secondary HP-IB value 170
DIAG : REQUEST STATUS drive type 0 0 12 40 0
DIAG : secondary HP-IB value 171
DIAG : REQUEST STATUS drive type 0 0 12 40 0
DIAG : secondary HP-IB value 172
DIAG : REQUEST STATUS drive type 0 0 12 40 0
DIAG : secondary HP-IB value 173
DIAG : REQUEST STATUS drive type 0 0 12 40 0
DIAG : secondary HP-IB value 174
DIAG : REQUEST STATUS drive type 0 0 12 40 0
DIAG : secondary HP-IB value 175
DIAG : REQUEST STATUS drive type 0 0 12 40 0
DIAG : STEP 49 PASSED
DIAG : operation parameters/results spd cs ds DSJ
DIAG : opcode HP-IB value 1
DIAG : REQUEST STATUS drive type 0 0 37 40 0
DIAG : opcode HP-IB value 15
DIAG : REQUEST STATUS drive type 0 0 1 40 0
DIAG : opcode HP-IB value 26
DIAG : REQUEST STATUS drive type 0 0 1 40 0
DIAG : STEP 50 PASSED
DIAG : operation parameters/results spd cs ds DSJ
DIAG : SEEK cy 199 hd 1 sec 0 0 37 40 0
DIAG : ADDRESS RECORD cy 198 hd 1 sec 0 0 0 40 0
DIAG : INITIALIZE length 6144 spd 0 0 0 40 0
DIAG : SEEK cy 199 hd 1 sec 0 0 37 40 0
DIAG : READ FULL SECTOR length 3 0 0 40 0
DIAG : decode preamble cy 199 hd 1 sec 0 spd 0
DIAG : STEP 52 FAILED
DIAG : operation parameters/results spd cs ds DSJ
DIAG : SEEK cy 199 hd 1 sec 0 0 37 40 0
DIAG : ADDRESS RECORD cy 199 hd 0 sec 0 0 0 40 0
DIAG : INITIALIZE length 6144 spd 0 0 0 40 0
DIAG : SEEK cy 199 hd 1 sec 0 0 37 40 0
DIAG : READ FULL SECTOR length 3 0 0 40 0
DIAG : decode preamble cy 199 hd 1 sec 0 spd 0
DIAG : STEP 54 FAILED
DIAG : operation parameters/results spd cs ds DSJ
DIAG : SEEK cy 199 hd 1 sec 0 0 37 40 0
DIAG : ADDRESS RECORD cy 199 hd 1 sec 0 0 0 40 0
DIAG : INITIALIZE length 6144 spd 0 0 0 40 0
DIAG : SEEK cy 199 hd 1 sec 0 0 37 40 0
DIAG : READ FULL SECTOR length 3 0 0 40 0
DIAG : decode preamble cy 199 hd 1 sec 0 spd 0
DIAG : SET FILE MASK mask 0 0 0 40 0
DIAG : SEEK cy 199 hd 1 sec 0 0 37 40 0
DIAG : READ length 128 0 0 40 0
DIAG : SEEK cy 199 hd 1 sec 5 0 37 40 0
DIAG : READ FULL SECTOR length 138 0 0 40 0
DIAG : SEEK cy 199 hd 1 sec 0 0 37 40 0
DIAG : WRITE FULL SECTOR length 138 0 0 40 0
DIAG : SEEK cy 199 hd 1 sec 1 0 37 40 0
DIAG : READ length 128 0 0 40 0
DIAG : STEP 55 FAILED
DIAG : operation parameters/results spd cs ds DSJ
DIAG : read without SRD
DIAG : REQUEST STATUS drive type 0 0 12 40 0
DIAG : STEP 56 PASSED
DIAG : operation parameters/results spd cs ds DSJ
DIAG : SWD without write
DIAG : REQUEST STATUS drive type 0 0 12 40 0
DIAG : STEP 57 PASSED
DIAG : operation parameters/results spd cs ds DSJ
DIAG : SET FILE MASK mask 3 0 0 40 0
DIAG : SEEK cy 410 hd 3 sec 47 0 37 40 0
DIAG : READ FULL SECTOR length 140 0 14 44 1
DIAG : STEP 59 PASSED
DIAG : operation parameters/results spd cs ds DSJ
DIAG : SET FILE MASK mask 11 0 0 44 0
DIAG : SEEK cy 0 hd 3 sec 47 0 37 40 0
DIAG : READ FULL SECTOR length 140 0 14 44 1
DIAG : STEP 60 PASSED
DIAG : operation parameters/results spd cs ds DSJ
DIAG : SEEK cy 199 hd 4 sec 0 0 23 44 1
DIAG : SEEK cy 0 hd 0 sec 0 0 37 40 0
DIAG : STEP 72 PASSED
DIAG : operation parameters/results spd cs ds DSJ
DIAG : SEEK cy 411 hd 1 sec 0 0 23 44 1
DIAG : SEEK cy 0 hd 0 sec 0 0 37 40 0
DIAG : STEP 73 PASSED
DIAG : operation parameters/results spd cs ds DSJ
DIAG : SEEK cy 199 hd 1 sec 49 0 23 44 1
DIAG : SEEK cy 0 hd 0 sec 0 0 37 40 0
DIAG : STEP 74 PASSED
DIAG : Part 2 of diagnostic completed.
DIAG : Beginning part 3 of diagnostic (interactive).
DIAG : PUT RUN/STOP SWITCH IN STOP POSITION
DIAG : Type <space>,<return>
DIAG : operation parameters/results spd cs ds DSJ
DIAG : REQUEST STATUS drive type 0 0 37 243 0
DIAG : STEP 80 PASSED
DIAG : PUT RUN/STOP SWITCH IN RUN POSITION
DIAG : Type <space>,<return>
DIAG : WAITING FOR THE DRIVE TO BE READY
DIAG : operation parameters/results spd cs ds DSJ
DIAG : RETURN DSJ 0
DIAG : REQUEST STATUS drive type 0 0 0 50 0
DIAG : STEP 81 PASSED
DIAG : operation parameters/results spd cs ds DSJ
DIAG : SEEK cy 199 hd 1 sec 0 0 37 40 0
DIAG : ADDRESS RECORD cy 199 hd 1 sec 0 0 0 40 0
DIAG : INITIALIZE length 6144 spd 2 2 0 40 0
DIAG : SEEK cy 199 hd 1 sec 0 0 37 40 0
DIAG : READ FULL SECTOR length 3 0 0 40 0
DIAG : decode preamble cy 199 hd 1 sec 0 spd 0
DIAG : STEP 82 FAILED
DIAG : TURN OFF FORMAT SWITCH
DIAG : Type <space>,<return>
DIAG : operation parameters/results spd cs ds DSJ
DIAG : REQUEST STATUS drive type 0 0 0 0 0
DIAG : STEP 83 PASSED
DIAG : operation parameters/results spd cs ds DSJ
DIAG : SEEK cy 199 hd 1 sec 0 0 37 0 0
DIAG : WRITE length 1 0 0 0 0
DIAG : STEP 84 FAILED
DIAG : operation parameters/results spd cs ds DSJ
DIAG : SEEK cy 199 hd 1 sec 0 0 37 0 0
DIAG : WRITE FULL SECTOR length 1 0 23 0 1
DIAG : STEP 85 PASSED
DIAG : operation parameters/results spd cs ds DSJ
DIAG : SEEK cy 199 hd 1 sec 0 0 37 0 0
DIAG : INITIALIZE length 1 spd 0 0 23 0 1
DIAG : STEP 86 PASSED
DIAG : TURN ON FORMAT SWITCH
DIAG : Type <space>,<return>
DIAG : operation parameters/results spd cs ds DSJ
DIAG : REQUEST STATUS drive type 0 0 0 40 0
DIAG : STEP 87 PASSED
DIAG : TURN ON UPPER PLATTER PROTECT SWITCH
DIAG : Type <space>,<return>
DIAG : operation parameters/results spd cs ds DSJ
DIAG : SEEK cy 199 hd 0 sec 0 0 37 140 0
DIAG : STEP 89 PASSED
DIAG : operation parameters/results spd cs ds DSJ
DIAG : SEEK cy 199 hd 0 sec 0 0 37 140 0
DIAG : WRITE length 1 0 23 140 1
DIAG : STEP 90 PASSED
DIAG : operation parameters/results spd cs ds DSJ
DIAG : SEEK cy 199 hd 0 sec 0 0 37 140 0
DIAG : WRITE FULL SECTOR length 1 0 23 140 1
DIAG : STEP 91 PASSED
DIAG : operation parameters/results spd cs ds DSJ
DIAG : SEEK cy 199 hd 0 sec 0 0 37 140 0
DIAG : INITIALIZE length 1 spd 0 0 23 140 1
DIAG : STEP 92 PASSED
DIAG : TURN OFF PROTECT READ ONLY SWITCH
DIAG : Type <space>,<return>
DIAG : operation parameters/results spd cs ds DSJ
DIAG : SEEK cy 199 hd 0 sec 0 0 37 40 0
DIAG : STEP 97 PASSED
DIAG : Part 3 of diagnostic completed.
DIAG : Cleaning up.
DIAG : DIAGNOSTIC TERMINATED. 15 FAILURES DETECTED.
TEST RESULT: Partially passed.
TEST NOTES: Steps 11-14 test CRC generation and checking. Steps 21 and 28
test the defective cylinder bit. Steps 22 and 26 test the spare
cylinder bit. Steps 25, 82, and 84 test the protected cylinder
bit. Step 30 tests track sparing. Steps 52, 54, and 55 test
cylinder, head, and sector miscompares by writing incorrect
preambles. These features are not simulated.

View file

@ -1,6 +1,6 @@
/* hp2100_dp.c: HP 2100 12557A/13210A disk simulator
Copyright (c) 1993-2011, Robert M. Supnik
Copyright (c) 1993-2012, Robert M. Supnik
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"),
@ -26,6 +26,8 @@
DP 12557A 2871 disk subsystem
13210A 7900 disk subsystem
10-Feb-12 JDB Deprecated DEVNO in favor of SC
Added CNTLR_TYPE cast to dp_settype
28-Mar-11 JDB Tidied up signal handling
26-Oct-10 JDB Changed I/O signal handler for revised signal model
10-Aug-08 JDB Added REG_FIT to register variables < 32-bit size
@ -131,7 +133,7 @@
#define DP_NUMWD (1 << DP_N_NUMWD) /* words/sector */
#define DP_NUMSC2 12 /* sectors/srf 12557 */
#define DP_NUMSC3 24 /* sectors/srf 13210 */
#define DP_NUMSC (dp_ctype? DP_NUMSC3: DP_NUMSC2)
#define DP_NUMSC (dp_ctype ? DP_NUMSC3 : DP_NUMSC2)
#define DP_NUMSF 4 /* surfaces/cylinder */
#define DP_NUMCY 203 /* cylinders/disk */
#define DP_SIZE2 (DP_NUMSF * DP_NUMCY * DP_NUMSC2 * DP_NUMWD)
@ -171,11 +173,11 @@
#define DA_V_SC 0 /* sector */
#define DA_M_SC2 017
#define DA_M_SC3 037
#define DA_M_SC (dp_ctype? DA_M_SC3: DA_M_SC2)
#define DA_M_SC (dp_ctype ? DA_M_SC3 : DA_M_SC2)
#define DA_GETSC(x) (((x) >> DA_V_SC) & DA_M_SC)
#define DA_CKMASK2 037 /* check mask */
#define DA_CKMASK3 077
#define DA_CKMASK (dp_ctype? DA_CKMASK3: DA_CKMASK2)
#define DA_CKMASK (dp_ctype ? DA_CKMASK3 : DA_CKMASK2)
/* Status in dpc_sta[drv], (u) = unused in 13210, (d) = dynamic */
@ -215,7 +217,14 @@ struct {
FLIP_FLOP flagbuf; /* cch flag buffer flip-flop */
} dpc = { CLEAR, CLEAR, CLEAR, CLEAR };
enum { A12557, A13210 } dp_ctype = A13210; /* ctrl type */
/* Controller types */
typedef enum {
A12557,
A13210
} CNTLR_TYPE;
CNTLR_TYPE dp_ctype = A13210; /* ctrl type */
int32 dpc_busy = 0; /* cch unit */
int32 dpc_poll = 0; /* cch poll enable */
int32 dpc_cnt = 0; /* check count */
@ -289,13 +298,14 @@ REG dpd_reg[] = {
{ FLDATA (FBF, dpd.flagbuf, 0) },
{ FLDATA (XFER, dpd_xfer, 0) },
{ FLDATA (WVAL, dpd_wval, 0) },
{ ORDATA (SC, dpd_dib.select_code, 6), REG_HRO },
{ ORDATA (DEVNO, dpd_dib.select_code, 6), REG_HRO },
{ NULL }
};
MTAB dpd_mod[] = {
{ MTAB_XTD | MTAB_VDV, 1, "DEVNO", "DEVNO",
&hp_setdev, &hp_showdev, &dpd_dev },
{ MTAB_XTD | MTAB_VDV, 1, "SC", "SC", &hp_setsc, &hp_showsc, &dpd_dev },
{ MTAB_XTD | MTAB_VDV | MTAB_NMO, 1, "DEVNO", "DEVNO", &hp_setdev, &hp_showdev, &dpd_dev },
{ 0 }
};
@ -350,6 +360,7 @@ REG dpc_reg[] = {
DP_NUMDRV, REG_HRO) },
{ URDATA (CAPAC, dpc_unit[0].capac, 10, T_ADDR_W, 0,
DP_NUMDRV, PV_LEFT | REG_HRO) },
{ ORDATA (SC, dpc_dib.select_code, 6), REG_HRO },
{ ORDATA (DEVNO, dpc_dib.select_code, 6), REG_HRO },
{ NULL }
};
@ -365,8 +376,8 @@ MTAB dpc_mod[] = {
&dp_settype, NULL, NULL },
{ MTAB_XTD | MTAB_VDV, 0, "TYPE", NULL,
NULL, &dp_showtype, NULL },
{ MTAB_XTD | MTAB_VDV, 1, "DEVNO", "DEVNO",
&hp_setdev, &hp_showdev, &dpd_dev },
{ MTAB_XTD | MTAB_VDV, 1, "SC", "SC", &hp_setsc, &hp_showsc, &dpd_dev },
{ MTAB_XTD | MTAB_VDV | MTAB_NMO, 1, "DEVNO", "DEVNO", &hp_setdev, &hp_showdev, &dpd_dev },
{ 0 }
};
@ -1064,13 +1075,18 @@ t_stat dp_settype (UNIT *uptr, int32 val, char *cptr, void *desc)
{
int32 i;
if ((val < 0) || (val > 1) || (cptr != NULL)) return SCPE_ARG;
if ((val < 0) || (val > 1) || (cptr != NULL))
return SCPE_ARG;
for (i = 0; i < DP_NUMDRV; i++) {
if (dpc_unit[i].flags & UNIT_ATT) return SCPE_ALATT;
if (dpc_unit[i].flags & UNIT_ATT)
return SCPE_ALATT;
}
for (i = 0; i < DP_NUMDRV; i++)
dpc_unit[i].capac = (val? DP_SIZE3: DP_SIZE2);
dp_ctype = val;
dp_ctype = (CNTLR_TYPE) val;
return SCPE_OK;
}
@ -1079,8 +1095,11 @@ return SCPE_OK;
t_stat dp_showtype (FILE *st, UNIT *uptr, int32 val, void *desc)
{
if (dp_ctype == A13210) fprintf (st, "13210A");
else fprintf (st, "12557A");
if (dp_ctype == A13210)
fprintf (st, "13210A");
else
fprintf (st, "12557A");
return SCPE_OK;
}

View file

@ -1,7 +1,7 @@
/* hp2100_dq.c: HP 2100 12565A disk simulator
Copyright (c) 1993-2006, Bill McDermith
Copyright (c) 2004-2011 J. David Bryan
Copyright (c) 2004-2012 J. David Bryan
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"),
@ -26,6 +26,7 @@
DQ 12565A 2883 disk system
10-Feb-12 JDB Deprecated DEVNO in favor of SC
28-Mar-11 JDB Tidied up signal handling
26-Oct-10 JDB Changed I/O signal handler for revised signal model
10-Aug-08 JDB Added REG_FIT to register variables < 32-bit size
@ -223,13 +224,14 @@ REG dqd_reg[] = {
{ FLDATA (FBF, dqd.flagbuf, 0) },
{ FLDATA (XFER, dqd_xfer, 0) },
{ FLDATA (WVAL, dqd_wval, 0) },
{ ORDATA (SC, dqd_dib.select_code, 6), REG_HRO },
{ ORDATA (DEVNO, dqd_dib.select_code, 6), REG_HRO },
{ NULL }
};
MTAB dqd_mod[] = {
{ MTAB_XTD | MTAB_VDV, 1, "DEVNO", "DEVNO",
&hp_setdev, &hp_showdev, &dqd_dev },
{ MTAB_XTD | MTAB_VDV, 1, "SC", "SC", &hp_setsc, &hp_showsc, &dqd_dev },
{ MTAB_XTD | MTAB_VDV | MTAB_NMO, 1, "DEVNO", "DEVNO", &hp_setdev, &hp_showdev, &dqd_dev },
{ 0 }
};
@ -276,6 +278,7 @@ REG dqc_reg[] = {
{ DRDATA (XTIME, dqc_xtime, 24), REG_NZ + PV_LEFT },
{ URDATA (UFNC, dqc_unit[0].FNC, 8, 8, 0,
DQ_NUMDRV, REG_HRO) },
{ ORDATA (SC, dqc_dib.select_code, 6), REG_HRO },
{ ORDATA (DEVNO, dqc_dib.select_code, 6), REG_HRO },
{ NULL }
};
@ -285,8 +288,8 @@ MTAB dqc_mod[] = {
{ UNIT_UNLOAD, 0, "heads loaded", "LOADED", dqc_load_unload },
{ UNIT_WLK, 0, "write enabled", "WRITEENABLED", NULL },
{ UNIT_WLK, UNIT_WLK, "write locked", "LOCKED", NULL },
{ MTAB_XTD | MTAB_VDV, 1, "DEVNO", "DEVNO",
&hp_setdev, &hp_showdev, &dqd_dev },
{ MTAB_XTD | MTAB_VDV, 1, "SC", "SC", &hp_setsc, &hp_showsc, &dqd_dev },
{ MTAB_XTD | MTAB_VDV | MTAB_NMO, 1, "DEVNO", "DEVNO", &hp_setdev, &hp_showdev, &dqd_dev },
{ 0 }
};

View file

@ -1,6 +1,6 @@
/* hp2100_dr.c: HP 2100 12606B/12610B fixed head disk/drum simulator
Copyright (c) 1993-2011, Robert M. Supnik
Copyright (c) 1993-2012, Robert M. Supnik
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"),
@ -26,6 +26,7 @@
DR 12606B 2770/2771 fixed head disk
12610B 2773/2774/2775 drum
10-Feb-12 JDB Deprecated DEVNO in favor of SC
28-Mar-11 JDB Tidied up signal handling
26-Oct-10 JDB Changed I/O signal handler for revised signal model
09-Jul-08 JDB Revised drc_boot to use ibl_copy
@ -240,13 +241,14 @@ REG drd_reg[] = {
{ FLDATA (CTL, drd.control, 0) },
{ FLDATA (FLG, drd.flag, 0) },
{ ORDATA (BPTR, drd_ptr, 6) },
{ ORDATA (SC, drd_dib.select_code, 6), REG_HRO },
{ ORDATA (DEVNO, drd_dib.select_code, 6), REG_HRO },
{ NULL }
};
MTAB drd_mod[] = {
{ MTAB_XTD | MTAB_VDV, 1, "DEVNO", "DEVNO",
&hp_setdev, &hp_showdev, &drd_dev },
{ MTAB_XTD | MTAB_VDV, 1, "SC", "SC", &hp_setsc, &hp_showsc, &drd_dev },
{ MTAB_XTD | MTAB_VDV | MTAB_NMO, 1, "DEVNO", "DEVNO", &hp_setdev, &hp_showdev, &drd_dev },
{ 0 }
};
@ -278,6 +280,7 @@ REG drc_reg[] = {
{ FLDATA (RUN, drc_run, 0) },
{ DRDATA (TIME, dr_time, 24), REG_NZ + PV_LEFT },
{ FLDATA (STOP_IOE, dr_stopioe, 0) },
{ ORDATA (SC, drc_dib.select_code, 6), REG_HRO },
{ ORDATA (DEVNO, drc_dib.select_code, 6), REG_HRO },
{ DRDATA (CAPAC, drc_unit.capac, 24), REG_HRO },
{ NULL }
@ -300,8 +303,8 @@ MTAB drc_mod[] = {
{ UNIT_PROT, 0, "unprotected", "UNPROTECTED", NULL },
{ MTAB_XTD | MTAB_VDV, 0, "TRACKPROT", "TRACKPROT",
&dr_set_prot, &dr_show_prot, NULL },
{ MTAB_XTD | MTAB_VDV, 1, "DEVNO", "DEVNO",
&hp_setdev, &hp_showdev, &drd_dev },
{ MTAB_XTD | MTAB_VDV, 1, "SC", "SC", &hp_setsc, &hp_showsc, &drd_dev },
{ MTAB_XTD | MTAB_VDV | MTAB_NMO, 1, "DEVNO", "DEVNO", &hp_setdev, &hp_showdev, &drd_dev },
{ 0 }
};

File diff suppressed because it is too large Load diff

View file

@ -1,6 +1,6 @@
/* hp2100_fp1.c: HP 1000 multiple-precision floating point routines
Copyright (c) 2005-2011, J. David Bryan
Copyright (c) 2005-2012, J. David Bryan
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"),
@ -23,6 +23,7 @@
in advertising or otherwise to promote the sale, use or other dealings in
this Software without prior written authorization from the author.
06-Feb-12 JDB Added missing precision on constant "one" in fp_trun
21-Jun-11 JDB Completed the comments for divide; no code changes
08-Jun-08 JDB Quieted bogus gcc warning in fp_exec
10-May-08 JDB Fixed uninitialized return in fp_accum when setting
@ -1421,7 +1422,7 @@ uint32 fp_trun (OP *result, OP source, OPSIZE precision)
{
t_bool bits_lost;
FPU unpacked;
FPU one = { FP_ONEHALF, 1, 0 }; /* 0.5 * 2 ** 1 = 1.0 */
FPU one = { FP_ONEHALF, 1, fp_t }; /* 0.5 * 2 ** 1 = 1.0 */
OP zero = { { 0, 0, 0, 0, 0 } }; /* 0.0 */
t_uint64 mask = mant_mask[precision] & ~FP_MSIGN;

View file

@ -1,6 +1,6 @@
/* hp2100_ipl.c: HP 2000 interprocessor link simulator
Copyright (c) 2002-2011, Robert M Supnik
Copyright (c) 2002-2012, Robert M Supnik
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"),
@ -25,6 +25,8 @@
IPLI, IPLO 12875A interprocessor link
10-Feb-12 JDB Deprecated DEVNO in favor of SC
Added CARD_INDEX casts to dib.card_index
07-Apr-11 JDB A failed STC may now be retried
28-Mar-11 JDB Tidied up signal handling
27-Mar-11 JDB Consolidated reporting of consecutive CRS signals
@ -165,6 +167,7 @@ REG ipli_reg [] = {
{ ORDATA (HOLD, ipl [ipli].hold, 8) },
{ DRDATA (TIME, ipl_ptime, 24), PV_LEFT },
{ FLDATA (STOP_IOE, ipl_stopioe, 0) },
{ ORDATA (SC, ipli_dib.select_code, 6), REG_HRO },
{ ORDATA (DEVNO, ipli_dib.select_code, 6), REG_HRO },
{ NULL }
};
@ -174,8 +177,8 @@ MTAB ipl_mod [] = {
{ UNIT_DIAG, 0, "link mode", "LINK", &ipl_setdiag },
{ MTAB_XTD | MTAB_VDV, 0, NULL, "DISCONNECT",
&ipl_dscln, NULL, NULL },
{ MTAB_XTD | MTAB_VDV, 1, "DEVNO", "DEVNO",
&hp_setdev, &hp_showdev, &ipli_dev },
{ MTAB_XTD | MTAB_VDV, 1, "SC", "SC", &hp_setsc, &hp_showsc, &ipli_dev },
{ MTAB_XTD | MTAB_VDV | MTAB_NMO, 1, "DEVNO", "DEVNO", &hp_setdev, &hp_showdev, &ipli_dev },
{ 0 }
};
@ -203,6 +206,7 @@ REG iplo_reg [] = {
{ FLDATA (FBF, ipl [iplo].flagbuf, 0) },
{ ORDATA (HOLD, ipl [iplo].hold, 8) },
{ DRDATA (TIME, ipl_ptime, 24), PV_LEFT },
{ ORDATA (SC, iplo_dib.select_code, 6), REG_HRO },
{ ORDATA (DEVNO, iplo_dib.select_code, 6), REG_HRO },
{ NULL }
};
@ -291,7 +295,7 @@ DEVICE iplo_dev = {
uint32 iplio (DIB *dibptr, IOCYCLE signal_set, uint32 stat_data)
{
const CARD_INDEX card = dibptr->card_index; /* set card selector */
CARD_INDEX card = (CARD_INDEX) dibptr->card_index; /* set card selector */
UNIT *const uptr = &(ipl_unit [card]); /* associated unit pointer */
const char *iotype [] = { "Status", "Command" };
int32 sta;
@ -474,7 +478,7 @@ if (nb < 0) { /* connection closed? */
else if (nb == 0) /* no data? */
return SCPE_OK;
card = (uptr == &iplo_unit); /* set card selector */
card = (CARD_INDEX) (uptr == &iplo_unit); /* set card selector */
if (uptr->flags & UNIT_HOLD) { /* holdover byte? */
uptr->IBUF = (ipl [card].hold << 8) | (((int32) msg [0]) & 0377);
@ -537,7 +541,7 @@ t_stat ipl_reset (DEVICE *dptr)
{
UNIT *uptr = dptr->units;
DIB *dibptr = (DIB *) dptr->ctxt; /* DIB pointer */
CARD_INDEX card = dibptr->card_index; /* card number */
CARD_INDEX card = (CARD_INDEX) dibptr->card_index; /* card number */
hp_enbdis_pair (dptr, dptrs [card ^ 1]); /* make pair cons */

View file

@ -1,6 +1,6 @@
/* hp2100_lps.c: HP 2100 12653A/2767 line printer simulator
Copyright (c) 1993-2011, Robert M. Supnik
Copyright (c) 1993-2012, Robert M. Supnik
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"),
@ -26,6 +26,7 @@
LPS 12653A 2767 line printer
12566B microcircuit interface with loopback diagnostic connector
10-Feb-12 JDB Deprecated DEVNO in favor of SC
28-Mar-11 JDB Tidied up signal handling
26-Oct-10 JDB Changed I/O signal handler for revised signal model
Revised detection of CLC at last DMA cycle
@ -245,6 +246,7 @@ REG lps_reg[] = {
{ DRDATA (RTIME, lps_rtime, 24), PV_LEFT },
{ FLDATA (TIMING, lps_timing, 0), REG_HRO },
{ FLDATA (STOP_IOE, lps_stopioe, 0) },
{ ORDATA (SC, lps_dib.select_code, 6), REG_HRO },
{ ORDATA (DEVNO, lps_dib.select_code, 6), REG_HRO },
{ NULL }
};
@ -262,8 +264,8 @@ MTAB lps_mod[] = {
&lps_set_timing, NULL, NULL },
{ MTAB_XTD | MTAB_VDV, 0, "TIMING", NULL,
NULL, &lps_show_timing, NULL },
{ MTAB_XTD | MTAB_VDV, 0, "DEVNO", "DEVNO",
&hp_setdev, &hp_showdev, &lps_dev },
{ MTAB_XTD | MTAB_VDV, 0, "SC", "SC", &hp_setsc, &hp_showsc, &lps_dev },
{ MTAB_XTD | MTAB_VDV | MTAB_NMO, 0, "DEVNO", "DEVNO", &hp_setdev, &hp_showdev, &lps_dev },
{ 0 }
};

View file

@ -1,6 +1,6 @@
/* hp2100_lpt.c: HP 2100 12845B line printer simulator
Copyright (c) 1993-2011, Robert M. Supnik
Copyright (c) 1993-2012, Robert M. Supnik
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"),
@ -25,6 +25,7 @@
LPT 12845B 2607 line printer
10-Feb-12 JDB Deprecated DEVNO in favor of SC
28-Mar-11 JDB Tidied up signal handling
26-Oct-10 JDB Changed I/O signal handler for revised signal model
26-Jun-08 JDB Rewrote device I/O to model backplane signals
@ -137,6 +138,7 @@ REG lpt_reg[] = {
{ DRDATA (CTIME, lpt_ctime, 24), PV_LEFT },
{ DRDATA (PTIME, lpt_ptime, 24), PV_LEFT },
{ FLDATA (STOP_IOE, lpt_stopioe, 0) },
{ ORDATA (SC, lpt_dib.select_code, 6), REG_HRO },
{ ORDATA (DEVNO, lpt_dib.select_code, 6), REG_HRO },
{ NULL }
};
@ -146,8 +148,8 @@ MTAB lpt_mod[] = {
{ UNIT_POWEROFF, 0, "power on", "POWERON", lpt_restart },
{ UNIT_OFFLINE, UNIT_OFFLINE, "offline", "OFFLINE", NULL },
{ UNIT_OFFLINE, 0, "online", "ONLINE", lpt_restart },
{ MTAB_XTD | MTAB_VDV, 0, "DEVNO", "DEVNO",
&hp_setdev, &hp_showdev, &lpt_dev },
{ MTAB_XTD | MTAB_VDV, 0, "SC", "SC", &hp_setsc, &hp_showsc, &lpt_dev },
{ MTAB_XTD | MTAB_VDV | MTAB_NMO, 0, "DEVNO", "DEVNO", &hp_setdev, &hp_showdev, &lpt_dev },
{ 0 }
};

View file

@ -1,6 +1,6 @@
/* hp2100_mpx.c: HP 12792C eight-channel asynchronous multiplexer simulator
Copyright (c) 2008-2011, J. David Bryan
Copyright (c) 2008-2012, J. David Bryan
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"),
@ -25,6 +25,7 @@
MPX 12792C 8-channel multiplexer card
10-Feb-12 JDB Deprecated DEVNO in favor of SC
28-Mar-11 JDB Tidied up signal handling
26-Oct-10 JDB Changed I/O signal handler for revised signal model
25-Nov-08 JDB Revised for new multiplexer library SHOW routines
@ -105,9 +106,9 @@
The simulation provides both the "realistic timing" described above, as well
as an optimized "fast timing" option. Optimization makes three improvements:
1. Buffered characters are transferred via Telnet in blocks.
1. Buffered characters are transferred in blocks.
2. ENQ/ACK handshaking is done locally without involving the Telnet client.
2. ENQ/ACK handshaking is done locally without involving the client.
3. BS and DEL respond visually more like prior RTE terminal drivers.
@ -599,15 +600,15 @@ t_stat mpx_show_frev (FILE *st, UNIT *uptr, int32 val, void *desc);
/* MPX data structures.
mpx_order MPX line connection order table
mpx_ldsc MPX line descriptors
mpx_desc MPX multiplexer descriptor
mpx_dib MPX device information block
mpx_unit MPX unit list
mpx_reg MPX register list
mpx_mod MPX modifier list
mpx_deb MPX debug list
mpx_dev MPX device descriptor
mpx_order MPX line connection order table
mpx_ldsc MPX terminal multiplexer line descriptors
mpx_desc MPX terminal multiplexer device descriptor
mpx_dib MPX device information block
mpx_unit MPX unit list
mpx_reg MPX register list
mpx_mod MPX modifier list
mpx_deb MPX debug list
mpx_dev MPX device descriptor
The first eight units correspond to the eight multiplexer line ports. These
handle character I/O via the Telnet library. A ninth unit acts as the card
@ -626,19 +627,17 @@ t_stat mpx_show_frev (FILE *st, UNIT *uptr, int32 val, void *desc);
ten millisecond period.
The controller and poll units are hidden by disabling them, so as to present
a logical picture of the multiplexer to the user. However, we cannot attach
to a disabled unit, so the poll unit is enabled prior to attaching and
disabled thereafter.
a logical picture of the multiplexer to the user.
*/
DEVICE mpx_dev;
int32 mpx_order [MPX_PORTS] = { -1 }; /* connection order */
TMLN mpx_ldsc [MPX_PORTS] = { { 0 } }; /* line descriptors */
TMXR mpx_desc = { MPX_PORTS, 0, 0, mpx_ldsc, mpx_order }; /* device descriptor */
DIB mpx_dib = { &mpx_io, MPX };
DEVICE mpx_dev;
UNIT mpx_unit [] = {
{ UDATA (&mpx_line_svc, UNIT_FASTTIME, 0) }, /* terminal I/O line 0 */
{ UDATA (&mpx_line_svc, UNIT_FASTTIME, 0) }, /* terminal I/O line 1 */
@ -685,9 +684,10 @@ REG mpx_reg [] = {
{ BRDATA (SEP, mpx_sep, 10, 10, MPX_PORTS * 2) },
{ BRDATA (PUT, mpx_put, 10, 10, MPX_PORTS * 2) },
{ FLDATA (CTL, mpx.control, 0) },
{ FLDATA (FLG, mpx.flag, 0) },
{ FLDATA (FBF, mpx.flagbuf, 0) },
{ FLDATA (CTL, mpx.control, 0) },
{ FLDATA (FLG, mpx.flag, 0) },
{ FLDATA (FBF, mpx.flagbuf, 0) },
{ ORDATA (SC, mpx_dib.select_code, 6), REG_HRO },
{ ORDATA (DEVNO, mpx_dib.select_code, 6), REG_HRO },
{ BRDATA (CONNORD, mpx_order, 10, 32, MPX_PORTS), REG_HRO },
@ -711,7 +711,8 @@ MTAB mpx_mod [] = {
{ MTAB_XTD | MTAB_VDV | MTAB_NMO, 1, "CONNECTIONS", NULL, NULL, &tmxr_show_cstat, &mpx_desc },
{ MTAB_XTD | MTAB_VDV | MTAB_NMO, 0, "STATISTICS", NULL, NULL, &tmxr_show_cstat, &mpx_desc },
{ MTAB_XTD | MTAB_VDV, 1, NULL, "DISCONNECT", &tmxr_dscln, NULL, &mpx_desc },
{ MTAB_XTD | MTAB_VDV, 0, "DEVNO", "DEVNO", &hp_setdev, &hp_showdev, &mpx_dev },
{ MTAB_XTD | MTAB_VDV, 0, "SC", "SC", &hp_setsc, &hp_showsc, &mpx_dev },
{ MTAB_XTD | MTAB_VDV | MTAB_NMO, 0, "DEVNO", "DEVNO", &hp_setdev, &hp_showdev, &mpx_dev },
{ 0 }
};
@ -742,7 +743,7 @@ DEVICE mpx_dev = {
&mpx_attach, /* attach routine */
&mpx_detach, /* detach routine */
&mpx_dib, /* device information block */
DEV_NET | DEV_DEBUG | DEV_DISABLE, /* device flags */
DEV_DEBUG | DEV_DISABLE, /* device flags */
0, /* debug control flags */
mpx_deb, /* debug flag name table */
NULL, /* memory size change routine */
@ -2052,7 +2053,7 @@ return SCPE_OK;
the first serial line and be reported there in a SHOW MPX command.
To preserve the logical picture, we attach the port to the Telnet poll unit,
which is normally disabled, inhibiting its display. Attaching to a disabled
which is normally disabled to inhibit its display. Attaching to a disabled
unit is not allowed, so we first enable the unit, then attach it, then
disable it again. Attachment is reported by the "mpx_status" routine below.
@ -2073,7 +2074,7 @@ mpx_poll.flags = mpx_poll.flags | UNIT_DIS; /* disable unit */
if (status == SCPE_OK) {
mpx_poll.wait = POLL_FIRST; /* set up poll */
sim_activate (&mpx_poll, mpx_poll.wait); /* start Telnet poll immediately */
sim_activate (&mpx_poll, mpx_poll.wait); /* start poll immediately */
}
return status;
}
@ -2229,9 +2230,9 @@ return;
/* Calculate service time from baud rate.
Service times are based on 1580 instructions per second, which is the 1000
E-Series execution speed. Baud rate 0 means "don't change" and is handled by
the "Set port key" command executor.
Service times are based on 1580 instructions per millisecond, which is the
1000 E-Series execution speed. Baud rate 0 means "don't change" and is
handled by the "Set port key" command executor.
Baud rate settings of 13-15 are marked as "reserved" in the user manual, but
the firmware defines these as 38400, 9600, and 9600 baud, respectively.
@ -2239,9 +2240,8 @@ return;
static uint32 service_time (uint16 control_word)
{
/* Baud Rates 0- 7 : --, 50, 75, 110, 134.5, 150, 300, 1200,
Baud Rates 8-15 : 1800, 2400, 4800, 9600, 19200, 38400, 9600, 9600
*/
/* Baud Rates 0- 7 : --, 50, 75, 110, 134.5, 150, 300, 1200, */
/* Baud Rates 8-15 : 1800, 2400, 4800, 9600, 19200, 38400, 9600, 9600 */
static const int32 ticks [] = { 0, 316000, 210667, 143636, 117472, 105333, 52667, 13167,
8778, 6583, 3292, 1646, 823, 411, 1646, 1646 };

View file

@ -1,6 +1,6 @@
/* hp2100_ms.c: HP 2100 13181A/13183A magnetic tape simulator
Copyright (c) 1993-2011, Robert M. Supnik
Copyright (c) 1993-2012, Robert M. Supnik
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"),
@ -26,6 +26,8 @@
MS 13181A 7970B 800bpi nine track magnetic tape
13183A 7970E 1600bpi nine track magnetic tape
10-Feb-12 JDB Deprecated DEVNO in favor of SC
Added CNTLR_TYPE cast to ms_settype
28-Mar-11 JDB Tidied up signal handling
26-Oct-10 JDB Changed I/O signal handler for revised signal model
11-Aug-08 JDB Revised to use AR instead of saved_AR in boot
@ -151,7 +153,14 @@
#define STA_DYN (STA_PE | STA_SEL | STA_TBSY | STA_BOT | \
STA_EOT | STA_WLK | STA_LOCAL)
enum { A13181, A13183 } ms_ctype = A13181; /* ctrl type */
/* Controller types */
typedef enum {
A13181,
A13183
} CNTLR_TYPE;
CNTLR_TYPE ms_ctype = A13181; /* ctrl type */
int32 ms_timing = 1; /* timing type */
struct {
@ -260,13 +269,14 @@ REG msd_reg[] = {
{ BRDATA (DBUF, msxb, 8, 8, DBSIZE) },
{ DRDATA (BPTR, ms_ptr, DB_N_SIZE + 1) },
{ DRDATA (BMAX, ms_max, DB_N_SIZE + 1) },
{ ORDATA (SC, msd_dib.select_code, 6), REG_HRO },
{ ORDATA (DEVNO, msd_dib.select_code, 6), REG_HRO },
{ NULL }
};
MTAB msd_mod[] = {
{ MTAB_XTD | MTAB_VDV, 1, "DEVNO", "DEVNO",
&hp_setdev, &hp_showdev, &msd_dev },
{ MTAB_XTD | MTAB_VDV, 1, "SC", "SC", &hp_setsc, &hp_showsc, &msd_dev },
{ MTAB_XTD | MTAB_VDV | MTAB_NMO, 1, "DEVNO", "DEVNO", &hp_setdev, &hp_showdev, &msd_dev },
{ 0 }
};
@ -319,6 +329,7 @@ REG msc_reg[] = {
{ FLDATA (TIMING, ms_timing, 0), REG_HRO },
{ FLDATA (STOP_IOE, msc_stopioe, 0) },
{ FLDATA (CTYPE, ms_ctype, 0), REG_HRO },
{ ORDATA (SC, msc_dib.select_code, 6), REG_HRO },
{ ORDATA (DEVNO, msc_dib.select_code, 6), REG_HRO },
{ NULL }
};
@ -346,8 +357,8 @@ MTAB msc_mod[] = {
&ms_set_timing, NULL, NULL },
{ MTAB_XTD | MTAB_VDV, 0, "TIMING", NULL,
NULL, &ms_show_timing, NULL },
{ MTAB_XTD | MTAB_VDV, 1, "DEVNO", "DEVNO",
&hp_setdev, &hp_showdev, &msd_dev },
{ MTAB_XTD | MTAB_VDV, 1, "SC", "SC", &hp_setsc, &hp_showsc, &msd_dev },
{ MTAB_XTD | MTAB_VDV | MTAB_NMO, 1, "DEVNO", "DEVNO", &hp_setdev, &hp_showdev, &msd_dev },
{ 0 }
};
@ -1079,7 +1090,7 @@ if ((val < 0) || (val > 1) || (cptr != NULL)) return SCPE_ARG;
for (i = 0; i < MS_NUMDR; i++) {
if (msc_unit[i].flags & UNIT_ATT) return SCPE_ALATT;
}
ms_ctype = val;
ms_ctype = (CNTLR_TYPE) val;
ms_config_timing (); /* update for new type */
return SCPE_OK;
}

View file

@ -1,6 +1,6 @@
/* hp2100_mt.c: HP 2100 12559A magnetic tape simulator
Copyright (c) 1993-2011, Robert M. Supnik
Copyright (c) 1993-2012, Robert M. Supnik
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"),
@ -25,8 +25,9 @@
MT 12559A 3030 nine track magnetic tape
10-Feb-12 JDB Deprecated DEVNO in favor of SC
28-Mar-11 JDB Tidied up signal handling
29-Oct-10 JDB Fixed error in command scan in mtcio ioIOO handler
29-Oct-10 JDB Fixed command scanning error in mtcio ioIOO handler
26-Oct-10 JDB Changed I/O signal handler for revised signal model
04-Sep-08 JDB Fixed missing flag after CLR command
02-Sep-08 JDB Moved write enable and format commands from MTD to MTC
@ -168,13 +169,14 @@ REG mtd_reg[] = {
{ BRDATA (DBUF, mtxb, 8, 8, DBSIZE) },
{ DRDATA (BPTR, mt_ptr, DB_V_SIZE + 1) },
{ DRDATA (BMAX, mt_max, DB_V_SIZE + 1) },
{ ORDATA (SC, mtd_dib.select_code, 6), REG_HRO },
{ ORDATA (DEVNO, mtd_dib.select_code, 6), REG_HRO },
{ NULL }
};
MTAB mtd_mod[] = {
{ MTAB_XTD | MTAB_VDV, 1, "DEVNO", "DEVNO",
&hp_setdev, &hp_showdev, &mtd_dev },
{ MTAB_XTD | MTAB_VDV, 1, "SC", "SC", &hp_setsc, &hp_showsc, &mtd_dev },
{ MTAB_XTD | MTAB_VDV | MTAB_NMO, 1, "DEVNO", "DEVNO", &hp_setdev, &hp_showdev, &mtd_dev },
{ 0 }
};
@ -210,6 +212,7 @@ REG mtc_reg[] = {
{ DRDATA (GTIME, mtc_gtime, 24), REG_NZ + PV_LEFT },
{ DRDATA (XTIME, mtc_xtime, 24), REG_NZ + PV_LEFT },
{ FLDATA (STOP_IOE, mtc_stopioe, 0) },
{ ORDATA (SC, mtc_dib.select_code, 6), REG_HRO },
{ ORDATA (DEVNO, mtc_dib.select_code, 6), REG_HRO },
{ NULL }
};
@ -219,8 +222,8 @@ MTAB mtc_mod[] = {
{ MTUF_WLK, MTUF_WLK, "write locked", "LOCKED", NULL },
{ MTAB_XTD | MTAB_VDV | MTAB_VUN, 0, "FORMAT", "FORMAT",
&sim_tape_set_fmt, &sim_tape_show_fmt, NULL },
{ MTAB_XTD | MTAB_VDV, 1, "DEVNO", "DEVNO",
&hp_setdev, &hp_showdev, &mtd_dev },
{ MTAB_XTD | MTAB_VDV, 1, "SC", "SC", &hp_setsc, &hp_showsc, &mtd_dev },
{ MTAB_XTD | MTAB_VDV | MTAB_NMO, 1, "DEVNO", "DEVNO", &hp_setdev, &hp_showdev, &mtd_dev },
{ 0 }
};

View file

@ -1,6 +1,6 @@
/* hp2100_mux.c: HP 2100 12920A terminal multiplexor simulator
Copyright (c) 2002-2011, Robert M Supnik
Copyright (c) 2002-2012, Robert M Supnik
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"),
@ -25,6 +25,7 @@
MUX,MUXL,MUXM 12920A terminal multiplexor
10-Feb-12 JDB Deprecated DEVNO in favor of SC
28-Mar-11 JDB Tidied up signal handling
26-Oct-10 JDB Changed I/O signal handler for revised signal model
25-Nov-08 JDB Revised for new multiplexer library SHOW routines
@ -329,17 +330,12 @@ t_stat mux_detach (UNIT *uptr);
t_stat mux_setdiag (UNIT *uptr, int32 val, char *cptr, void *desc);
/* MUX data structures.
/* MUXL/MUXU device information block.
mux_order MUX line connection order table
mux_ldsc MUX line descriptors
mux_desc MUX multiplexer descriptor
The DIBs of adjacent cards must be contained in an array, so they are defined
here and referenced in the lower and upper card device structures.
*/
int32 mux_order [MUX_LINES] = { -1 }; /* connection order */
TMLN mux_ldsc [MUX_LINES] = { { 0 } }; /* line descriptors */
TMXR mux_desc = { MUX_LINES, 0, 0, mux_ldsc, mux_order }; /* device descriptor */
DIB mux_dib[] = {
{ &muxlio, MUXL },
{ &muxuio, MUXU }
@ -358,6 +354,8 @@ DIB mux_dib[] = {
muxl_dev MUXL device descriptor
*/
TMXR mux_desc;
DEVICE muxl_dev;
UNIT muxl_unit[] = {
@ -393,6 +391,7 @@ REG muxl_reg[] = {
{ BRDATA (BDFR, mux_defer, 8, 1, MUX_LINES) },
{ URDATA (TIME, muxl_unit[0].wait, 10, 24, 0,
MUX_LINES, REG_NZ + PV_LEFT) },
{ ORDATA (SC, muxl_dib.select_code, 6), REG_HRO },
{ ORDATA (DEVNO, muxl_dib.select_code, 6), REG_HRO },
{ NULL }
};
@ -409,8 +408,9 @@ MTAB muxl_mod[] = {
{ MTAB_XTD | MTAB_VUN | MTAB_NC, 0, "LOG", "LOG", &tmxr_set_log, &tmxr_show_log, &mux_desc },
{ MTAB_XTD | MTAB_VUN | MTAB_NC, 0, NULL, "NOLOG", &tmxr_set_nolog, NULL, &mux_desc },
{ MTAB_XTD | MTAB_VUN, 0, NULL, "DISCONNECT", &tmxr_dscln, NULL, &mux_desc },
{ MTAB_XTD | MTAB_VDV, 1, "DEVNO", "DEVNO", &hp_setdev, &hp_showdev, &muxl_dev },
{ MTAB_XTD | MTAB_VUN, 0, NULL, "DISCONNECT", &tmxr_dscln, NULL, &mux_desc },
{ MTAB_XTD | MTAB_VDV, 1, "SC", "SC", &hp_setsc, &hp_showsc, &muxl_dev },
{ MTAB_XTD | MTAB_VDV | MTAB_NMO, 1, "DEVNO", "DEVNO", &hp_setdev, &hp_showdev, &muxl_dev },
{ 0 }
};
@ -442,6 +442,10 @@ DEVICE muxl_dev = {
/* MUXU data structures
mux_order MUX line connection order table
mux_ldsc MUX terminal multiplexer line descriptors
mux_desc MUX terminal multiplexer device descriptor
muxu_dib MUXU device information block
muxu_unit MUXU unit list
muxu_reg MUXU register list
@ -452,11 +456,16 @@ DEVICE muxl_dev = {
DEVICE muxu_dev;
int32 mux_order [MUX_LINES] = { -1 }; /* connection order */
TMLN mux_ldsc [MUX_LINES] = { { 0 } }; /* line descriptors */
TMXR mux_desc = { MUX_LINES, 0, 0, mux_ldsc, mux_order }; /* device descriptor */
UNIT muxu_unit = { UDATA (&muxi_svc, UNIT_ATTABLE, 0), POLL_FIRST };
REG muxu_reg[] = {
{ ORDATA (IBUF, muxu_ibuf, 16) },
{ ORDATA (OBUF, muxu_obuf, 16) },
{ ORDATA (SC, muxu_dib.select_code, 6), REG_HRO },
{ ORDATA (DEVNO, muxu_dib.select_code, 6), REG_HRO },
{ NULL }
};
@ -471,7 +480,8 @@ MTAB muxu_mod[] = {
{ MTAB_XTD | MTAB_VDV | MTAB_NMO, 1, "CONNECTIONS", NULL, NULL, &tmxr_show_cstat, &mux_desc },
{ MTAB_XTD | MTAB_VDV | MTAB_NMO, 0, "STATISTICS", NULL, NULL, &tmxr_show_cstat, &mux_desc },
{ MTAB_XTD | MTAB_VDV, 1, NULL, "DISCONNECT", &tmxr_dscln, NULL, &mux_desc },
{ MTAB_XTD | MTAB_VDV, 1, "DEVNO", "DEVNO", &hp_setdev, &hp_showdev, &muxl_dev },
{ MTAB_XTD | MTAB_VDV, 1, "SC", "SC", &hp_setsc, &hp_showsc, &muxl_dev },
{ MTAB_XTD | MTAB_VDV | MTAB_NMO, 1, "DEVNO", "DEVNO", &hp_setdev, &hp_showdev, &muxl_dev },
{ 0 }
};
@ -501,7 +511,7 @@ DEVICE muxu_dev = {
&mux_attach, /* attach routine */
&mux_detach, /* detach routine */
&muxu_dib, /* device information block */
DEV_NET | DEV_DISABLE | DEV_DEBUG, /* device flags */
DEV_DISABLE | DEV_DEBUG, /* device flags */
0, /* debug control flags */
muxu_deb, /* debug flag name table */
NULL, /* memory size change routine */
@ -531,12 +541,14 @@ REG muxc_reg[] = {
{ ORDATA (CHAN, muxc_chan, 4) },
{ BRDATA (DSO, muxc_ota, 8, 6, MUX_LINES) },
{ BRDATA (DSI, muxc_lia, 8, 2, MUX_LINES) },
{ ORDATA (SC, muxc_dib.select_code, 6), REG_HRO },
{ ORDATA (DEVNO, muxc_dib.select_code, 6), REG_HRO },
{ NULL }
};
MTAB muxc_mod[] = {
{ MTAB_XTD | MTAB_VDV, 0, "DEVNO", "DEVNO", &hp_setdev, &hp_showdev, &muxc_dev },
{ MTAB_XTD | MTAB_VDV, 0, "SC", "SC", &hp_setsc, &hp_showsc, &muxc_dev },
{ MTAB_XTD | MTAB_VDV | MTAB_NMO, 0, "DEVNO", "DEVNO", &hp_setdev, &hp_showdev, &muxc_dev },
{ 0 }
};
@ -975,8 +987,6 @@ t_bool loopback;
loopback = ((muxu_unit.flags & UNIT_DIAG) != 0); /* diagnostic mode? */
if (!loopback) { /* terminal mode? */
if ((uptr->flags & UNIT_ATT) == 0) return SCPE_OK; /* attached? */
if (uptr->wait == POLL_FIRST) /* first poll? */
uptr->wait = sync_poll (INITIAL); /* initial synchronization */
else /* not first */
@ -1328,7 +1338,7 @@ if (status == SCPE_OK) {
sim_activate (&muxu_unit, muxu_unit.wait); /* start Telnet poll immediately */
}
return SCPE_OK;
return status;
}

View file

@ -1,6 +1,6 @@
/* hp2100_pif.c: HP 12620A/12936A privileged interrupt fence simulator
Copyright (c) 2008-2011, J. David Bryan
Copyright (c) 2008-2012, J. David Bryan
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"),
@ -25,6 +25,7 @@
PIF 12620A/12936A privileged interrupt fence
10-Feb-12 JDB Deprecated DEVNO in favor of SC
28-Mar-11 JDB Tidied up signal handling
26-Oct-10 JDB Changed I/O signal handler for revised signal model
26-Jun-08 JDB Rewrote device I/O to model backplane signals
@ -147,18 +148,20 @@ UNIT pif_unit = {
};
REG pif_reg [] = {
{ FLDATA (CTL, pif.control, 0) },
{ FLDATA (FLG, pif.flag, 0) },
{ FLDATA (FBF, pif.flagbuf, 0) },
{ FLDATA (CTL, pif.control, 0) },
{ FLDATA (FLG, pif.flag, 0) },
{ FLDATA (FBF, pif.flagbuf, 0) },
{ ORDATA (SC, pif_dib.select_code, 6), REG_HRO },
{ ORDATA (DEVNO, pif_dib.select_code, 6), REG_HRO },
{ NULL }
};
MTAB pif_mod [] = {
{ MTAB_XTD | MTAB_VDV, 0, NULL, "12620A", &pif_set_card, NULL, NULL },
{ MTAB_XTD | MTAB_VDV, 1, NULL, "12936A", &pif_set_card, NULL, NULL },
{ MTAB_XTD | MTAB_VDV, 0, "TYPE", NULL, NULL, &pif_show_card, NULL },
{ MTAB_XTD | MTAB_VDV, 0, "DEVNO", "DEVNO", &hp_setdev, &hp_showdev, &pif_dev },
{ MTAB_XTD | MTAB_VDV, 0, NULL, "12620A", &pif_set_card, NULL, NULL },
{ MTAB_XTD | MTAB_VDV, 1, NULL, "12936A", &pif_set_card, NULL, NULL },
{ MTAB_XTD | MTAB_VDV, 0, "TYPE", NULL, NULL, &pif_show_card, NULL },
{ MTAB_XTD | MTAB_VDV, 0, "SC", "SC", &hp_setsc, &hp_showsc, &pif_dev },
{ MTAB_XTD | MTAB_VDV | MTAB_NMO, 0, "DEVNO", "DEVNO", &hp_setdev, &hp_showdev, &pif_dev },
{ 0 }
};

View file

@ -1,6 +1,6 @@
/* hp2100_stddev.c: HP2100 standard devices simulator
Copyright (c) 1993-2011, Robert M. Supnik
Copyright (c) 1993-2012, Robert M. Supnik
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"),
@ -28,6 +28,8 @@
TTY 12531C buffered teleprinter interface
CLK 12539C time base generator
12-Feb-12 JDB Add TBG as a logical name for the CLK device
10-Feb-12 JDB Deprecated DEVNO in favor of SC
28-Mar-11 JDB Tidied up signal handling
26-Oct-10 JDB Changed I/O signal handler for revised signal model
26-Jun-08 JDB Rewrote device I/O to model backplane signals
@ -228,6 +230,7 @@ REG ptr_reg[] = {
{ DRDATA (POS, ptr_unit.pos, T_ADDR_W), PV_LEFT },
{ DRDATA (TIME, ptr_unit.wait, 24), PV_LEFT },
{ FLDATA (STOP_IOE, ptr_stopioe, 0) },
{ ORDATA (SC, ptr_dib.select_code, 6), REG_HRO },
{ ORDATA (DEVNO, ptr_dib.select_code, 6), REG_HRO },
{ NULL }
};
@ -235,8 +238,8 @@ REG ptr_reg[] = {
MTAB ptr_mod[] = {
{ UNIT_DIAG, UNIT_DIAG, "diagnostic mode", "DIAG", NULL },
{ UNIT_DIAG, 0, "reader mode", "READER", NULL },
{ MTAB_XTD | MTAB_VDV, 0, "DEVNO", "DEVNO",
&hp_setdev, &hp_showdev, &ptr_dev },
{ MTAB_XTD | MTAB_VDV, 0, "SC", "SC", &hp_setsc, &hp_showsc, &ptr_dev },
{ MTAB_XTD | MTAB_VDV | MTAB_NMO, 0, "DEVNO", "DEVNO", &hp_setdev, &hp_showdev, &ptr_dev },
{ 0 }
};
@ -270,13 +273,14 @@ REG ptp_reg[] = {
{ DRDATA (POS, ptp_unit.pos, T_ADDR_W), PV_LEFT },
{ DRDATA (TIME, ptp_unit.wait, 24), PV_LEFT },
{ FLDATA (STOP_IOE, ptp_stopioe, 0) },
{ ORDATA (SC, ptp_dib.select_code, 6), REG_HRO },
{ ORDATA (DEVNO, ptp_dib.select_code, 6), REG_HRO },
{ NULL }
};
MTAB ptp_mod[] = {
{ MTAB_XTD | MTAB_VDV, 0, "DEVNO", "DEVNO",
&hp_setdev, &hp_showdev, &ptp_dev },
{ MTAB_XTD | MTAB_VDV, 0, "SC", "SC", &hp_setsc, &hp_showsc, &ptp_dev },
{ MTAB_XTD | MTAB_VDV | MTAB_NMO, 0, "DEVNO", "DEVNO", &hp_setdev, &hp_showdev, &ptp_dev },
{ 0 }
};
@ -322,6 +326,7 @@ REG tty_reg[] = {
{ DRDATA (TTIME, tty_unit[TTO].wait, 24), REG_NZ + PV_LEFT },
{ DRDATA (PPOS, tty_unit[TTP].pos, T_ADDR_W), PV_LEFT },
{ FLDATA (STOP_IOE, ttp_stopioe, 0) },
{ ORDATA (SC, tty_dib.select_code, 6), REG_HRO },
{ ORDATA (DEVNO, tty_dib.select_code, 6), REG_HRO },
{ NULL }
};
@ -333,8 +338,8 @@ MTAB tty_mod[] = {
{ TT_MODE, TT_MODE_7P, "7p", "7P", &tty_set_opt },
{ UNIT_AUTOLF, UNIT_AUTOLF, "autolf", "AUTOLF", &tty_set_alf },
{ UNIT_AUTOLF, 0 , NULL, "NOAUTOLF", &tty_set_alf },
{ MTAB_XTD | MTAB_VDV, 0, "DEVNO", "DEVNO",
&hp_setdev, &hp_showdev, &tty_dev },
{ MTAB_XTD | MTAB_VDV, 0, "SC", "SC", &hp_setsc, &hp_showsc, &tty_dev },
{ MTAB_XTD | MTAB_VDV | MTAB_NMO, 0, "DEVNO", "DEVNO", &hp_setdev, &hp_showdev, &tty_dev },
{ 0 }
};
@ -367,6 +372,7 @@ REG clk_reg[] = {
{ FLDATA (ERR, clk_error, CLK_V_ERROR) },
{ BRDATA (TIME, clk_time, 10, 24, 8) },
{ DRDATA (IPTICK, clk_tick, 24), PV_RSPC | REG_RO },
{ ORDATA (SC, clk_dib.select_code, 6), REG_HRO },
{ ORDATA (DEVNO, clk_dib.select_code, 6), REG_HRO },
{ NULL }
};
@ -374,8 +380,8 @@ REG clk_reg[] = {
MTAB clk_mod[] = {
{ UNIT_DIAG, UNIT_DIAG, "diagnostic mode", "DIAG", NULL },
{ UNIT_DIAG, 0, "calibrated", "CALIBRATED", NULL },
{ MTAB_XTD | MTAB_VDV, 0, "DEVNO", "DEVNO",
&hp_setdev, &hp_showdev, &clk_dev },
{ MTAB_XTD | MTAB_VDV, 0, "SC", "SC", &hp_setsc, &hp_showsc, &clk_dev },
{ MTAB_XTD | MTAB_VDV | MTAB_NMO, 0, "DEVNO", "DEVNO", &hp_setdev, &hp_showdev, &clk_dev },
{ 0 }
};
@ -384,7 +390,8 @@ DEVICE clk_dev = {
1, 0, 0, 0, 0, 0,
NULL, NULL, &clk_reset,
NULL, NULL, NULL,
&clk_dib, DEV_DISABLE
&clk_dib, DEV_DISABLE,
0, NULL, NULL, "TBG"
};

View file

@ -1,6 +1,6 @@
/* hp2100_sys.c: HP 2100 simulator interface
Copyright (c) 1993-2010, Robert M. Supnik
Copyright (c) 1993-2012, Robert M. Supnik
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"),
@ -23,6 +23,9 @@
used in advertising or otherwise to promote the sale, use or other dealings
in this Software without prior written authorization from Robert M Supnik.
10-Feb-12 JDB Deprecated DEVNO in favor of SC
Added hp_setsc, hp_showsc functions to support SC modifier
15-Dec-11 JDB Added DA and dummy DC devices
29-Oct-10 JDB DMA channels renamed from 0,1 to 1,2 to match documentation
26-Oct-10 JDB Changed DIB access for revised signal model
03-Sep-08 JDB Fixed IAK instruction dual-use mnemonic display
@ -78,6 +81,7 @@ extern DEVICE ds_dev;
extern DEVICE muxl_dev, muxu_dev, muxc_dev;
extern DEVICE ipli_dev, iplo_dev;
extern DEVICE pif_dev;
extern DEVICE da_dev, dc_dev;
/* SCP data structures and interface routines
@ -118,6 +122,7 @@ DEVICE *sim_devices[] = {
&muxl_dev, &muxu_dev, &muxc_dev,
&ipli_dev, &iplo_dev,
&pif_dev,
&da_dev, &dc_dev,
NULL
};
@ -768,39 +773,84 @@ else { /* printable character *
}
/* Set device number */
/* Set select code */
t_stat hp_setdev (UNIT *uptr, int32 num, char *cptr, void *desc)
t_stat hp_setsc (UNIT *uptr, int32 num, char *cptr, void *desc)
{
DEVICE *dptr = (DEVICE *) desc;
DIB *dibptr;
int32 i, newdev;
t_stat r;
if (cptr == NULL) return SCPE_ARG;
if ((desc == NULL) || (num > 1)) return SCPE_IERR;
if (cptr == NULL)
return SCPE_ARG;
if ((desc == NULL) || (num > 1))
return SCPE_IERR;
dibptr = (DIB *) dptr->ctxt;
if (dibptr == NULL) return SCPE_IERR;
if (dibptr == NULL)
return SCPE_IERR;
newdev = get_uint (cptr, 8, I_DEVMASK - num, &r);
if (r != SCPE_OK) return r;
if (newdev < VARDEV) return SCPE_ARG;
for (i = 0; i <= num; i++, dibptr++) dibptr->select_code = newdev + i;
if (r != SCPE_OK)
return r;
if (newdev < VARDEV)
return SCPE_ARG;
for (i = 0; i <= num; i++, dibptr++)
dibptr->select_code = newdev + i;
return SCPE_OK;
}
/* Show select code */
t_stat hp_showsc (FILE *st, UNIT *uptr, int32 num, void *desc)
{
DEVICE *dptr = (DEVICE *) desc;
DIB *dibptr;
int32 i;
if ((desc == NULL) || (num > 1))
return SCPE_IERR;
dibptr = (DIB *) dptr->ctxt;
if (dibptr == NULL)
return SCPE_IERR;
fprintf (st, "select code=%o", dibptr->select_code);
for (i = 1; i <= num; i++)
fprintf (st, "/%o", dibptr->select_code + i);
return SCPE_OK;
}
/* Set device number */
t_stat hp_setdev (UNIT *uptr, int32 num, char *cptr, void *desc)
{
return hp_setsc (uptr, num, cptr, desc);
}
/* Show device number */
t_stat hp_showdev (FILE *st, UNIT *uptr, int32 num, void *desc)
{
DEVICE *dptr = (DEVICE *) desc;
DIB *dibptr;
int32 i;
t_stat result;
if ((desc == NULL) || (num > 1)) return SCPE_IERR;
dibptr = (DIB *) dptr->ctxt;
if (dibptr == NULL) return SCPE_IERR;
fprintf (st, "devno=%o", dibptr->select_code);
for (i = 1; i <= num; i++) fprintf (st, "/%o", dibptr->select_code + i);
return SCPE_OK;
result = hp_showsc (st, uptr, num, desc);
if (result == SCPE_OK)
fputc ('\n', st);
return result;
}

2407
HP2100/hp_disclib.c Normal file

File diff suppressed because it is too large Load diff

380
HP2100/hp_disclib.h Normal file
View file

@ -0,0 +1,380 @@
/* hp_disclib.h: HP MAC/ICD disc controller simulator library definitions
Copyright (c) 2011-2012, J. David Bryan
Copyright (c) 2004-2011, Robert M. Supnik
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"),
to deal in the Software without restriction, including without limitation
the rights to use, copy, modify, merge, publish, distribute, sublicense,
and/or sell copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Except as contained in this notice, the names of the authors shall not be
used in advertising or otherwise to promote the sale, use or other dealings
in this Software without prior written authorization from the authors.
15-Mar-12 JDB First release
09-Nov-11 JDB Created disc controller common library from DS simulator
This file defines the interface between interface simulators and the
simulation library for the HP 13037 and 13365 disc controllers. It must be
included by the interface-specific modules (DA, DS, etc.).
*/
#include "hp2100_defs.h"
/* Program limits */
#define DL_MAXDRIVE 7 /* last valid drive number */
#define DL_MAXUNIT 10 /* last legal unit number */
#define DL_AUXUNITS 2 /* number of MAC auxiliary units required */
#define DL_WPSEC 128 /* words per normal sector */
#define DL_WPFSEC 138 /* words per full sector */
#define DL_BUFSIZE DL_WPFSEC /* required buffer size in words */
/* Default controller times */
#define DL_SEEK_TIME 100 /* seek delay time (per cylinder) */
#define DL_SECTOR_TIME 27 /* intersector delay time */
#define DL_CMD_TIME 3 /* command start delay time */
#define DL_DATA_TIME 1 /* data transfer delay time */
#define DL_WAIT_TIME 2749200 /* command wait timeout (1.74 seconds) */
/* Common per-unit disc drive state variables */
#define CYL u3 /* current drive cylinder */
#define STAT u4 /* current drive status (Status 2) */
#define OP u5 /* current drive operation in process */
#define PHASE u6 /* current command phase */
/* Unit flags and accessors */
#define UNIT_V_MODEL (UNIT_V_UF + 0) /* bits 1-0: model ID */
#define UNIT_V_WLK (UNIT_V_UF + 2) /* bits 2-2: write locked (protect switch) */
#define UNIT_V_UNLOAD (UNIT_V_UF + 3) /* bits 3-3: heads unloaded */
#define UNIT_V_FMT (UNIT_V_UF + 4) /* bits 4-4: format enabled */
#define UNIT_V_AUTO (UNIT_V_UF + 5) /* bits 5-5: autosize */
#define DL_V_UF (UNIT_V_UF + 6) /* first free unit flag bit */
#define UNIT_M_MODEL 3 /* model ID mask */
#define UNIT_MODEL (UNIT_M_MODEL << UNIT_V_MODEL)
#define UNIT_WLK (1 << UNIT_V_WLK)
#define UNIT_UNLOAD (1 << UNIT_V_UNLOAD)
#define UNIT_FMT (1 << UNIT_V_FMT)
#define UNIT_AUTO (1 << UNIT_V_AUTO)
#define UNIT_WPROT (UNIT_WLK | UNIT_RO) /* write protected if locked or read-only */
#define GET_MODEL(t) (((t) >> UNIT_V_MODEL) & UNIT_M_MODEL)
#define SET_MODEL(t) (((t) & UNIT_M_MODEL) << UNIT_V_MODEL)
/* Status-1 accessors */
#define DL_V_S1SPD 13 /* bits 15-13: S/P/D flags */
#define DL_V_S1STAT 8 /* bits 12- 8: controller status */
#define DL_V_S1UNIT 0 /* bits 7- 0: last unit number */
#define DL_M_S1UNIT 15 /* unit mask */
#define GET_S1UNIT(v) (((v) >> DL_V_S1UNIT) & DL_M_S1UNIT)
#define SET_S1SPD(v) ((v) << DL_V_S1SPD)
#define SET_S1STAT(v) ((v) << DL_V_S1STAT)
#define SET_S1UNIT(v) ((v) << DL_V_S1UNIT)
/* Status-2 accessors (+ = kept in unit status, - = determined dynamically */
#define DL_V_S2ERR 15 /* bits 15-15: (-) any error flag */
#define DL_V_S2DTYP 9 /* bits 12- 9: (-) drive type */
#define DL_V_S2ATN 7 /* bits 7- 7: (+) attention flag */
#define DL_V_S2RO 6 /* bits 6- 6: (-) read only flag */
#define DL_V_S2FMT 5 /* bits 5- 5: (-) format enabled flag */
#define DL_V_S2FAULT 4 /* bits 4- 4: (+) drive fault flag */
#define DL_V_S2FS 3 /* bits 3- 3: (+) first status flag */
#define DL_V_S2SC 2 /* bits 2- 2: (+) seek error flag */
#define DL_V_S2NR 1 /* bits 1- 1: (-) not ready flag */
#define DL_V_S2BUSY 0 /* bits 0- 1: (-) drive busy flag */
#define DL_S2ERR (1 << DL_V_S2ERR)
#define DL_S2DTYP (1 << DL_V_S2DTYP)
#define DL_S2ATN (1 << DL_V_S2ATN)
#define DL_S2RO (1 << DL_V_S2RO)
#define DL_S2FMT (1 << DL_V_S2FMT)
#define DL_S2FAULT (1 << DL_V_S2FAULT)
#define DL_S2FS (1 << DL_V_S2FS)
#define DL_S2SC (1 << DL_V_S2SC)
#define DL_S2NR (1 << DL_V_S2NR)
#define DL_S2BUSY (1 << DL_V_S2BUSY)
#define DL_S2STOPS (DL_S2FAULT | DL_S2SC | DL_S2NR) /* bits that stop drive access */
#define DL_S2ERRORS (DL_S2FAULT | DL_S2SC | DL_S2NR | DL_S2BUSY) /* bits that set S2ERR */
#define DL_S2CPS (DL_S2ATN | DL_S2FAULT | DL_S2FS | DL_S2SC) /* bits cleared by Controller Preset */
/* Drive properties.
The controller library supports four different disc drive models with these
properties:
Drive Model Drive Sectors Heads per Cylinders Megabytes
Model ID Type per Head Cylinder per Drive per Drive
----- ----- ----- -------- --------- --------- ---------
7905 0 2 48 3 411 15
7906 1 0 48 4 411 20
7920 2 1 48 5 823 50
7925 3 3 64 9 823 120
The Drive Type is reported by the controller in the second status word
(Status-2) returned by the Request Status command.
Model IDs are used in the unit flags to identify the unit's model. For the
autosizing feature to work, models must be assigned ascending IDs in order of
ascending drive sizes.
*/
#define D7905_MODEL 0
#define D7905_SECTS 48
#define D7905_HEADS 3
#define D7905_CYLS 411
#define D7905_TYPE (2 << DL_V_S2DTYP)
#define D7905_WORDS (D7905_SECTS * D7905_HEADS * D7905_CYLS * DL_WPSEC)
#define D7906_MODEL 1
#define D7906_SECTS 48
#define D7906_HEADS 4
#define D7906_CYLS 411
#define D7906_TYPE (0 << DL_V_S2DTYP)
#define D7906_WORDS (D7906_SECTS * D7906_HEADS * D7906_CYLS * DL_WPSEC)
#define D7920_MODEL 2
#define D7920_SECTS 48
#define D7920_HEADS 5
#define D7920_CYLS 823
#define D7920_TYPE (1 << DL_V_S2DTYP)
#define D7920_WORDS (D7920_SECTS * D7920_HEADS * D7920_CYLS * DL_WPSEC)
#define D7925_MODEL 3
#define D7925_SECTS 64
#define D7925_HEADS 9
#define D7925_CYLS 823
#define D7925_TYPE (3 << DL_V_S2DTYP)
#define D7925_WORDS (D7925_SECTS * D7925_HEADS * D7925_CYLS * DL_WPSEC)
#define MODEL_7905 SET_MODEL (D7905_MODEL)
#define MODEL_7906 SET_MODEL (D7906_MODEL)
#define MODEL_7920 SET_MODEL (D7920_MODEL)
#define MODEL_7925 SET_MODEL (D7925_MODEL)
/* Controller types (values must be powers of 2) */
typedef enum {
MAC = 1,
ICD = 2
} CNTLR_TYPE;
/* Controller opcodes */
typedef enum {
cold_load_read = 000,
recalibrate = 001,
seek = 002,
request_status = 003,
request_sector_address = 004,
read = 005,
read_full_sector = 006,
verify = 007,
write = 010,
write_full_sector = 011,
clear = 012,
initialize = 013,
address_record = 014,
request_syndrome = 015,
read_with_offset = 016,
set_file_mask = 017,
read_without_verify = 022,
load_tio_register = 023,
request_disc_address = 024,
end = 025,
wakeup = 026, last_opcode = wakeup /* last opcode */
} CNTLR_OPCODE;
#define DL_OPCODE_MASK 037
/* Controller command phases */
typedef enum {
start_phase,
data_phase,
end_phase, last_phase = end_phase /* last phase */
} CNTLR_PHASE;
/* Controller status.
Not all status values are returned by the library. The values not currently
returned are:
- illegal_drive_type
- cylinder_miscompare
- head_sector_miscompare
- io_program_error
- sync_timeout
- correctable_data_error
- illegal_spare_access
- defective_track
- protected_track
*/
typedef enum {
normal_completion = 000,
illegal_opcode = 001,
unit_available = 002,
illegal_drive_type = 003,
cylinder_miscompare = 007,
uncorrectable_data_error = 010,
head_sector_miscompare = 011,
io_program_error = 012,
sync_timeout = 013,
end_of_cylinder = 014,
data_overrun = 016,
correctable_data_error = 017,
illegal_spare_access = 020,
defective_track = 021,
access_not_ready = 022,
status_2_error = 023,
protected_track = 026,
unit_unavailable = 027,
drive_attention = 037
} CNTLR_STATUS;
/* Controller execution states */
typedef enum {
cntlr_idle, /* idle */
cntlr_wait, /* command wait */
cntlr_busy /* busy */
} CNTLR_STATE;
/* Controller command classifications */
typedef enum {
class_invalid, /* invalid classification */
class_read, /* read classification */
class_write, /* write classification */
class_control, /* control classification */
class_status /* status classification */
} CNTLR_CLASS;
/* Controller clear types */
typedef enum {
hard_clear, /* power-on/preset hard clear */
soft_clear /* programmed soft clear */
} CNTLR_CLEAR;
/* Controller state variables */
typedef struct {
CNTLR_TYPE type; /* controller type */
CNTLR_STATE state; /* controller state */
CNTLR_OPCODE opcode; /* controller opcode */
CNTLR_STATUS status; /* controller status */
FLIP_FLOP eoc; /* end-of-cylinder flag */
FLIP_FLOP eod; /* end-of-data flag */
uint32 spd_unit; /* S/P/D flags and unit number */
uint32 file_mask; /* file mask */
uint32 retry; /* retry counter */
uint32 cylinder; /* cylinder address */
uint32 head; /* head address */
uint32 sector; /* sector address */
uint32 verify_count; /* count of sectors to verify */
uint32 poll_unit; /* last unit polled for attention */
uint16 *buffer; /* data buffer pointer */
uint32 index; /* data buffer index */
uint32 length; /* data buffer length */
UNIT *aux; /* auxiliary units (controller and timer) */
int32 seek_time; /* seek delay time (per cylinder) */
int32 sector_time; /* intersector delay time */
int32 cmd_time; /* command start delay time */
int32 data_time; /* data transfer delay time */
int32 wait_time; /* command wait timeout */
} CNTLR_VARS;
typedef CNTLR_VARS *CVPTR; /* pointer to controller state variables */
/* Controller state variables initialiation.
Parameters are:
ctype - type of the controller (CNTLR_TYPE)
bufptr - pointer to the data buffer
auxptr - pointer to the auxiliary units (MAC only; NULL for ICD)
*/
#define CNTLR_INIT(ctype,bufptr,auxptr) \
(ctype), cntlr_idle, end, normal_completion, \
CLEAR, CLEAR, \
0, 0, 0, 0, 0, 0, 0, 0, \
(bufptr), 0, 0, (auxptr), \
DL_SEEK_TIME, DL_SECTOR_TIME, \
DL_CMD_TIME, DL_DATA_TIME, DL_WAIT_TIME
/* Disc library global controller routines */
extern t_bool dl_prepare_command (CVPTR cvptr, UNIT *units, uint32 unit_limit);
extern UNIT *dl_start_command (CVPTR cvptr, UNIT *units, uint32 unit_limit);
extern void dl_end_command (CVPTR cvptr, CNTLR_STATUS status);
extern t_bool dl_poll_drives (CVPTR cvptr, UNIT *units, uint32 unit_limit);
extern t_stat dl_service_drive (CVPTR cvptr, UNIT *uptr);
extern t_stat dl_service_controller (CVPTR cvptr, UNIT *uptr);
extern t_stat dl_service_timer (CVPTR cvptr, UNIT *uptr);
extern void dl_idle_controller (CVPTR cvptr);
extern t_stat dl_clear_controller (CVPTR cvptr, UNIT *uptr, CNTLR_CLEAR clear_type);
extern t_stat dl_load_unload (CVPTR cvptr, UNIT *uptr, t_bool load);
/* Disc library global utility routines */
extern CNTLR_CLASS dl_classify (CNTLR_VARS cntlr);
extern const char *dl_opcode_name (CNTLR_TYPE controller, CNTLR_OPCODE opcode);
extern const char *dl_phase_name (CNTLR_PHASE phase);
/* Disc library global VM routines */
extern t_stat dl_attach (CVPTR cvptr, UNIT *uptr, char *cptr);
extern t_stat dl_detach (CVPTR cvptr, UNIT *uptr);
extern t_stat dl_set_model (UNIT *uptr, int32 value, char *cptr, void *desc);

View file

@ -225,6 +225,14 @@
RelativePath="..\HP2100\hp2100_cpu7.c"
>
</File>
<File
RelativePath="..\HP2100\hp2100_di.c"
>
</File>
<File
RelativePath="..\HP2100\hp2100_di_da.c"
>
</File>
<File
RelativePath="..\HP2100\hp2100_dp.c"
>
@ -289,6 +297,10 @@
RelativePath="..\HP2100\hp2100_sys.c"
>
</File>
<File
RelativePath="..\HP2100\hp_disclib.c"
>
</File>
<File
RelativePath="..\scp.c"
>
@ -338,6 +350,10 @@
RelativePath="hp2100_defs.h"
>
</File>
<File
RelativePath="..\HP2100\hp2100_di.h"
>
</File>
<File
RelativePath="..\HP2100\hp2100_fp.h"
>
@ -346,6 +362,10 @@
RelativePath="..\HP2100\hp2100_fp1.h"
>
</File>
<File
RelativePath="..\HP2100\hp_disclib.h"
>
</File>
<File
RelativePath="..\scp.h"
>

View file

@ -334,7 +334,9 @@ HP2100_SOURCE1 = $(HP2100_DIR)HP2100_STDDEV.C,$(HP2100_DIR)HP2100_DP.C,\
$(HP2100_DIR)HP2100_CPU6.C,$(HP2100_DIR)HP2100_CPU7.C
HP2100_LIB2 = $(LIB_DIR)HP2100L2-$(ARCH).OLB
HP2100_SOURCE2 = $(HP2100_DIR)HP2100_FP1.C,$(HP2100_DIR)HP2100_BACI.C,\
$(HP2100_DIR)HP2100_MPX.C,$(HP2100_DIR)HP2100_PIF.C
$(HP2100_DIR)HP2100_MPX.C,$(HP2100_DIR)HP2100_PIF.C \
$(HP2100_DIR)HP2100_DI.C,$(HP2100_DIR)HP2100_DI_DA.C,\
$(HP2100_DIR)HP_DISCLIB.C
.IFDEF ALPHA_OR_IA64
HP2100_OPTIONS = /INCL=($(SIMH_DIR),$(HP2100_DIR))\
/DEF=($(CC_DEFS),"HAVE_INT64=1")

View file

@ -470,7 +470,8 @@ HP2100 = ${HP2100D}/hp2100_stddev.c ${HP2100D}/hp2100_dp.c ${HP2100D}/hp2100_dq.
${HP2100D}/hp2100_cpu1.c ${HP2100D}/hp2100_cpu2.c ${HP2100D}/hp2100_cpu3.c \
${HP2100D}/hp2100_cpu4.c ${HP2100D}/hp2100_cpu5.c ${HP2100D}/hp2100_cpu6.c \
${HP2100D}/hp2100_cpu7.c ${HP2100D}/hp2100_fp1.c ${HP2100D}/hp2100_baci.c \
${HP2100D}/hp2100_mpx.c ${HP2100D}/hp2100_pif.c
${HP2100D}/hp2100_mpx.c ${HP2100D}/hp2100_pif.c ${HP2100D}/hp2100_di.c \
${HP2100D}/hp2100_di_da.c ${HP2100D}/hp_disclib.c
HP2100_OPT = -DHAVE_INT64 -I ${HP2100D}