mirror of
https://github.com/open-simh/simh.git
synced 2026-04-26 04:07:23 +00:00
Notes For V3.6-0
The save/restore format has been updated to improve its reliability. As a result, save files prior to release 3.0 are no longer supported. The text documentation files are obsolete and are no longer included with the distribution. Up-to-date PDF documentation files are available on the SimH web site. 1. New Features 1.1 3.6-0 1.1.1 Most magnetic tapes - Added support for limiting tape capacity to a particular size in MB 1.1.2 IBM 7090/7094 - First release 1.1.3 VAX-11/780 - Added FLOAD command, loads system file from console floppy disk 1.1.4 VAX, VAX-11/780, and PDP-11 - Added card reader support (from John Dundas) 1.1.5 PDP-11 - Added instruction history 2. Bugs Fixed Please see the revision history on http://simh.trailing-edge.com or in the source module sim_rev.h.
This commit is contained in:
committed by
Mark Pizzolato
parent
a12e4a1c39
commit
dc871fa631
@@ -1,6 +1,6 @@
|
||||
/* h316_cpu.c: Honeywell 316/516 CPU simulator
|
||||
|
||||
Copyright (c) 1999-2005, Robert M. Supnik
|
||||
Copyright (c) 1999-2006, 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 @@
|
||||
|
||||
cpu H316/H516 CPU
|
||||
|
||||
03-Apr-06 RMS Fixed bugs in LLL, LRL (from Theo Engel)
|
||||
22-Sep-05 RMS Fixed declarations (from Sterling Garwood)
|
||||
16-Aug-05 RMS Fixed C++ declaration and cast problems
|
||||
15-Feb-05 RMS Added start button interrupt
|
||||
@@ -427,7 +428,7 @@ if (chan_req) { /* channel request? */
|
||||
if (st & DMA_IN) { /* input? */
|
||||
t = iotab[dev] (ioINA, 0, 0, dev); /* input word */
|
||||
if ((t & IOT_SKIP) == 0) return STOP_DMAER;
|
||||
if (r = (t >> IOT_V_REASON)) return r;
|
||||
if ((r = t >> IOT_V_REASON) != 0) return r;
|
||||
Write (ad, t & DMASK); /* write to mem */
|
||||
}
|
||||
else { /* no, output */
|
||||
@@ -441,7 +442,7 @@ if (chan_req) { /* channel request? */
|
||||
if (dma_wc[i] == 0) { /* done? */
|
||||
dma_eor[i] = 1; /* set end of range */
|
||||
t = iotab[dev] (ioEND, 0, 0, dev); /* send end range */
|
||||
if (r = (t >> IOT_V_REASON)) return r;
|
||||
if ((r = t >> IOT_V_REASON) != 0) return r;
|
||||
}
|
||||
}
|
||||
else { /* DMC */
|
||||
@@ -450,7 +451,7 @@ if (chan_req) { /* channel request? */
|
||||
end = Read (dmcad + 1); /* get end */
|
||||
if (((ad ^ end) & X_AMASK) == 0) { /* start == end? */
|
||||
t = iotab[dev] (ioEND, 0, 0, dev); /* send end range */
|
||||
if (r = (t >> IOT_V_REASON)) return r;
|
||||
if ((r = t >> IOT_V_REASON) != 0) return r;
|
||||
} /* end if end range */
|
||||
} /* end else DMC */
|
||||
} /* end if chan i */
|
||||
@@ -659,6 +660,7 @@ switch (I_GETOP (MB)) { /* case on <1:6> */
|
||||
|
||||
case 000:
|
||||
if ((MB & 1) == 0) { /* HLT */
|
||||
if ((reason = sim_process_event ()) != SCPE_OK) break;
|
||||
reason = STOP_HALT;
|
||||
break;
|
||||
}
|
||||
@@ -739,7 +741,8 @@ switch (I_GETOP (MB)) { /* case on <1:6> */
|
||||
else {
|
||||
ut = GETDBL_U (AR, BR); /* get A'B */
|
||||
C = (ut >> (t1 - 1)) & 1; /* C = last out */
|
||||
ut = ut >> t1; /* log right */
|
||||
if (t1 == 32) ut = 0; /* =32? all 0 */
|
||||
else ut = ut >> t1; /* log right */
|
||||
}
|
||||
PUTDBL_U (ut); /* store A,B */
|
||||
break;
|
||||
@@ -803,7 +806,8 @@ switch (I_GETOP (MB)) { /* case on <1:6> */
|
||||
else {
|
||||
ut = GETDBL_U (AR, BR); /* get A'B */
|
||||
C = (ut >> (32 - t1)) & 1; /* C = last out */
|
||||
ut = ut << t1; /* log left */
|
||||
if (t1 == 32) ut = 0; /* =32? all 0 */
|
||||
else ut = ut << t1; /* log left */
|
||||
}
|
||||
PUTDBL_U (ut); /* store A,B */
|
||||
break;
|
||||
@@ -879,7 +883,7 @@ switch (I_GETOP (MB)) { /* case on <1:6> */
|
||||
((MB & 000020) && ss[0]) || /* SS1 */
|
||||
((MB & 000040) && AR) || /* SNZ */
|
||||
((MB & 000100) && (AR & 1)) || /* SLN */
|
||||
((MB & 000200) && (TST_INTREQ (INT_MPE))) || /* SPS */
|
||||
((MB & 000200) && (TST_INTREQ (INT_MPE))) || /* SPS */
|
||||
((MB & 000400) && (AR & SIGN))) skip = 1; /* SMI */
|
||||
if ((MB & 001000) == 0) skip = skip ^ 1; /* reverse? */
|
||||
PC = NEWA (PC, PC + skip);
|
||||
@@ -895,12 +899,12 @@ switch (I_GETOP (MB)) { /* case on <1:6> */
|
||||
else if (MB == 0140320) { /* CSA */
|
||||
C = (AR & SIGN) >> 15;
|
||||
AR = AR & ~SIGN;
|
||||
}
|
||||
}
|
||||
else if (MB == 0140401) AR = AR ^ DMASK; /* CMA */
|
||||
else if (MB == 0140407) { /* TCA */
|
||||
AR = (-AR) & DMASK;
|
||||
sc = 0;
|
||||
}
|
||||
}
|
||||
else if (MB == 0140500) AR = AR | SIGN; /* SSM */
|
||||
else if (MB == 0140600) C = 1; /* SCB */
|
||||
else if (MB == 0141044) AR = AR & 0177400; /* CAR */
|
||||
@@ -1369,9 +1373,11 @@ for (i = 0; dptr = sim_devices[i]; i++) { /* loop thru devices */
|
||||
dno = dibp->dev; /* device number */
|
||||
for (j = 0; j < dibp->num; j++) { /* repeat for slots */
|
||||
if (iotab[dno + j]) { /* conflict? */
|
||||
printf ("%s device number conflict, devno = %02o\n", sim_dname (dptr), dno + j);
|
||||
printf ("%s device number conflict, devno = %02o\n",
|
||||
sim_dname (dptr), dno + j);
|
||||
if (sim_log) fprintf (sim_log,
|
||||
"%s device number conflict, devno = %02o\n", sim_dname (dptr), dno + j);
|
||||
"%s device number conflict, devno = %02o\n",
|
||||
sim_dname (dptr), dno + j);
|
||||
return TRUE;
|
||||
}
|
||||
iotab[dno + j] = dibp->io; /* set I/O routine */
|
||||
@@ -1379,21 +1385,27 @@ for (i = 0; dptr = sim_devices[i]; i++) { /* loop thru devices */
|
||||
if (dibp->chan) { /* DMA/DMC? */
|
||||
chan = dibp->chan - 1;
|
||||
if ((chan < DMC_V_DMC1) && (chan >= dma_nch)) {
|
||||
printf ("%s configured for DMA channel %d\n", sim_dname (dptr), chan + 1);
|
||||
printf ("%s configured for DMA channel %d\n",
|
||||
sim_dname (dptr), chan + 1);
|
||||
if (sim_log) fprintf (sim_log,
|
||||
"%s configured for DMA channel %d\n", sim_dname (dptr), chan + 1);
|
||||
"%s configured for DMA channel %d\n",
|
||||
sim_dname (dptr), chan + 1);
|
||||
return TRUE;
|
||||
}
|
||||
if ((chan >= DMC_V_DMC1) && !(cpu_unit.flags & UNIT_DMC)) {
|
||||
printf ("%s configured for DMC, option disabled\n", sim_dname (dptr));
|
||||
printf ("%s configured for DMC, option disabled\n",
|
||||
sim_dname (dptr));
|
||||
if (sim_log) fprintf (sim_log,
|
||||
"%s configured for DMC, option disabled\n", sim_dname (dptr));
|
||||
"%s configured for DMC, option disabled\n",
|
||||
sim_dname (dptr));
|
||||
return TRUE;
|
||||
}
|
||||
if (chan_map[chan]) { /* channel conflict? */
|
||||
printf ("%s DMA/DMC channel conflict, devno = %02o\n", sim_dname (dptr), dno);
|
||||
printf ("%s DMA/DMC channel conflict, devno = %02o\n",
|
||||
sim_dname (dptr), dno);
|
||||
if (sim_log) fprintf (sim_log,
|
||||
"%s DMA/DMC channel conflict, devno = %02o\n", sim_dname (dptr), dno);
|
||||
"%s DMA/DMC channel conflict, devno = %02o\n",
|
||||
sim_dname (dptr), dno);
|
||||
return TRUE;
|
||||
}
|
||||
chan_map[chan] = dno; /* channel back map */
|
||||
@@ -1466,7 +1478,8 @@ for (k = 0; k < lnt; k++) { /* print specified */
|
||||
if (h->pc & HIST_EA) fprintf (st, "%05o ", h->ea);
|
||||
else fprintf (st, " ");
|
||||
sim_eval = h->ir;
|
||||
if ((fprint_sym (st, h->pc & X_AMASK, &sim_eval, &cpu_unit, SWMASK ('M'))) > 0)
|
||||
if ((fprint_sym (st, h->pc & X_AMASK, &sim_eval,
|
||||
&cpu_unit, SWMASK ('M'))) > 0)
|
||||
fprintf (st, "(undefined) %06o", h->ir);
|
||||
op = I_GETOP (h->ir) & 017; /* base op */
|
||||
if (has_opnd[op]) fprintf (st, " [%06o]", h->opnd);
|
||||
|
||||
@@ -1,672 +0,0 @@
|
||||
To: Users
|
||||
From: Bob Supnik
|
||||
Subj: H316 Simulator Usage
|
||||
Date: 01-Dec-2005
|
||||
|
||||
COPYRIGHT NOTICE
|
||||
|
||||
The following copyright notice applies to both the SIMH source and binary:
|
||||
|
||||
Original code published in 1993-2005, written by Robert M Supnik
|
||||
Copyright (c) 1993-2005, 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
|
||||
ROBERT M SUPNIK 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 Robert M Supnik shall not 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.
|
||||
|
||||
This memorandum documents the Honeywell 316/516 simulator.
|
||||
|
||||
|
||||
1. Simulator Files
|
||||
|
||||
The H316 requires the following files:
|
||||
|
||||
sim/ scp.h
|
||||
sim_console.h
|
||||
sim_defs.h
|
||||
sim_fio.h
|
||||
sim_rev.h
|
||||
sim_sock.h
|
||||
sim_tape.h
|
||||
sim_timer.h
|
||||
sim_tmxr.h
|
||||
scp.c
|
||||
sim_console.c
|
||||
sim_fio.c
|
||||
sim_sock.c
|
||||
sim_tape.c
|
||||
sim_timer.c
|
||||
sim_tmxr.c
|
||||
|
||||
sim/h316/ h316_defs.h
|
||||
h316_cpu.c
|
||||
h316_fhd.c
|
||||
h316_lp.c
|
||||
h316_mt.c
|
||||
h316_dp.c
|
||||
h316_stddev.c
|
||||
h316_sys.c
|
||||
|
||||
2. H316/H516 Features
|
||||
|
||||
The Honeywell 316/516 simulator is configured as follows:
|
||||
|
||||
device simulates
|
||||
name(s)
|
||||
|
||||
CPU H316/H516 CPU with 16/32KW memory
|
||||
PTR 316/516-50 paper tape reader
|
||||
PTP 316/516-52 paper tape punch
|
||||
TTY 316/516-33 console terminal
|
||||
CLK 316/516-12 real time clock
|
||||
LPT 316/516 line printer
|
||||
FHD 4400 fixed head disk
|
||||
DP 4623/4653/4720 disk pack controller with eight drives
|
||||
MT 4100 seven track magtape with four drives
|
||||
|
||||
The H316/H516 simulator implements several unique stop conditions:
|
||||
|
||||
- decode of an undefined instruction, and STOP_INST is et
|
||||
- reference to an undefined I/O device, and STOP_DEV is set
|
||||
- more than INDMAX indirect references are detected during
|
||||
memory reference address decoding
|
||||
- DMA/DMC direction does not agree with I/O device operation
|
||||
- a write operation is initiated on a write locked magtape
|
||||
unit (hangs the real system)
|
||||
- a disk write overruns the specified record size (destroys
|
||||
the rest of the track on the real system)
|
||||
- a disk track has an illegal format
|
||||
|
||||
The H316/H516 loader is not implemented.
|
||||
|
||||
2.1 CPU
|
||||
|
||||
CPU options include choice of instruction set, memory size, DMC option,
|
||||
and number of DMA channels.
|
||||
|
||||
SET CPU HSA high speed arithmetic instructions
|
||||
SET CPU NOHSA no high speed arithmetic instructions
|
||||
SET CPU 4K set memory size = 4K
|
||||
SET CPU 8K set memory size = 8K
|
||||
SET CPU 12K set memory size = 12K
|
||||
SET CPU 16K set memory size = 16K
|
||||
SET CPU 24K set memory size = 24K
|
||||
SET CPU 32K set memory size = 32K
|
||||
SET CPU DMC enable DMC option
|
||||
SET CPU NODMC disable DMC option
|
||||
SET CPU DMA=n set number of DMA channels to n (0-4)
|
||||
|
||||
If memory size is being reduced, and the memory being truncated contains
|
||||
non-zero data, the simulator asks for confirmation. Data in the truncated
|
||||
portion of memory is lost. Initial memory size is 32K. The HSA and DMC
|
||||
options are enabled, and four DMA channels are configured.
|
||||
|
||||
The CPU includes special show commands to display the state of the DMA
|
||||
channels:
|
||||
|
||||
SHOW CPU DMAn show DMA channel n
|
||||
|
||||
CPU registers include the visible state of the processor as well as the
|
||||
control registers for the interrupt system.
|
||||
|
||||
name size comments
|
||||
|
||||
P 15 program counter
|
||||
A 16 A register
|
||||
B 16 B register
|
||||
X 16 index register
|
||||
SC 16 shift count
|
||||
C 1 carry flag
|
||||
EXT 1 extend flag
|
||||
PME 1 previous mode extend flag
|
||||
EXT_OFF 1 extend off pending flag
|
||||
DP 1 double precision flag
|
||||
SS1..4 1 sense switches 1..4
|
||||
ION 1 interrupts enabled
|
||||
INODEF 1 interrupts not deferred
|
||||
INTREQ 16 interrupt requests
|
||||
DEVRDY 16 device ready flags (read only)
|
||||
DEVENB 16 device interrupt enable flags (read only)
|
||||
CHREQ 20 DMA/DMC channel requests
|
||||
DMAAD[0:3] 16 DMA channel current address, channels 1-4
|
||||
DMAWC[0:3] 15 DMA channel word count, channels 1-4
|
||||
DMAEOR[0:3] 1 DMA end of range flag, channels 1-4
|
||||
STOP_INST 1 stop on undefined instruction
|
||||
STOP_DEV 1 stop on undefined device
|
||||
INDMAX 1 indirect address limit
|
||||
PCQ[0:63] 15 PC prior to last JMP, JSB, or interrupt;
|
||||
most recent PC change first
|
||||
WRU 8 interrupt character
|
||||
|
||||
The CPU can maintain a history of the most recently executed instructions.
|
||||
This is controlled by the SET CPU HISTORY and SHOW CPU HISTORY commands:
|
||||
|
||||
SET CPU HISTORY clear history buffer
|
||||
SET CPU HISTORY=0 disable history
|
||||
SET CPU HISTORY=n enable history, length = n
|
||||
SHOW CPU HISTORY print CPU history
|
||||
SHOW CPU HISTORY=n print first n entries of CPU history
|
||||
|
||||
The maximum length for the history is 65536 entries.
|
||||
|
||||
2.2 Programmed I/O Devices
|
||||
|
||||
2.2.1 316/516-50 Paper Tape Reader (PTR)
|
||||
|
||||
The paper tape reader (PTR) reads data from a disk file. The POS
|
||||
register specifies the number of the next data item to be read.
|
||||
Thus, by changing POS, the user can backspace or advance the reader.
|
||||
|
||||
The paper tape reader can bet set to operate in binary, ASCII, or
|
||||
Unix ASCII mode:
|
||||
|
||||
sim> set ptr binary -- binary mode
|
||||
sim> set ptr ascii -- ASCII mode
|
||||
sim> set ptr uascii -- Unix ASCII mode
|
||||
|
||||
The mode can also be set by a switch setting in the attach command:
|
||||
|
||||
sim> att -b ptr <file> -- binary mode
|
||||
sim> att -a ptr <file> -- ASCII mode
|
||||
sim> att -u ptr <file> -- Unix ASCII mode
|
||||
|
||||
In ASCII or Unix ASCII mode, all non-zero characters have the high
|
||||
order bit forced on. In Unix ASCII mode, newline is converted to
|
||||
CR, and LF in inserted as the following character.
|
||||
|
||||
The paper tape reader supports the BOOT command. BOOT PTR copies the
|
||||
absolute binary loader into memory and starts it running.
|
||||
|
||||
The paper tape reader implements these registers:
|
||||
|
||||
name size comments
|
||||
|
||||
BUF 8 last data item processed
|
||||
INTREQ 1 device interrupt request
|
||||
READY 1 device ready
|
||||
ENABLE 1 device interrupts enabled
|
||||
POS 32 position in the input or output file
|
||||
TIME 24 time from I/O initiation to interrupt
|
||||
STOP_IOE 1 stop on I/O error
|
||||
|
||||
Error handling is as follows:
|
||||
|
||||
error STOP_IOE processed as
|
||||
|
||||
not attached 1 report error and stop
|
||||
0 out of tape
|
||||
|
||||
end of file 1 report error and stop
|
||||
0 out of tape or paper
|
||||
|
||||
OS I/O error x report error and stop
|
||||
|
||||
2.2.2 316/516-52 Paper Tape Punch (PTP)
|
||||
|
||||
The paper tape punch (PTP) writes data to a disk file. The POS
|
||||
register specifies the number of the next data item to be written.
|
||||
Thus, by changing POS, the user can backspace or advance the punch.
|
||||
|
||||
The paper tape punch can bet set to operate in binary, ASCII, or
|
||||
Unix ASCII mode:
|
||||
|
||||
sim> set ptp binary -- binary mode
|
||||
sim> set ptp ascii -- ASCII mode
|
||||
sim> set ptp uascii -- Unix ASCII mode
|
||||
|
||||
The mode can also be set by a switch setting in the attach command:
|
||||
|
||||
sim> att -b ptp <file> -- binary mode
|
||||
sim> att -a ptp <file> -- ASCII mode
|
||||
sim> att -u ptp <file> -- Unix ASCII mode
|
||||
|
||||
In ASCII or Unix ASCII mode, all characters are masked to 7b
|
||||
before being written to the output file. In Unix ASCII mode, LF
|
||||
is converted to newline, and CR is discarded.
|
||||
|
||||
The paper tape punch implements these registers:
|
||||
|
||||
name size comments
|
||||
|
||||
BUF 8 last data item processed
|
||||
INTREQ 1 device interrupt request
|
||||
READY 1 device ready
|
||||
ENABLE 1 device interrupts enabled
|
||||
POWER 1 device powered up
|
||||
POS 32 position in the input or output file
|
||||
TIME 24 time from I/O initiation to interrupt
|
||||
PWRTIME 24 time from I/O request to power up
|
||||
STOP_IOE 1 stop on I/O error
|
||||
|
||||
Error handling is as follows:
|
||||
|
||||
error STOP_IOE processed as
|
||||
|
||||
not attached 1 report error and stop
|
||||
0 out of tape
|
||||
|
||||
OS I/O error x report error and stop
|
||||
|
||||
2.2.3 316/516-33 Console Teletype (TTY)
|
||||
|
||||
The console Teletype (TTY) consists of four separate units:
|
||||
|
||||
TTY0 keyboard
|
||||
TTY1 printer
|
||||
TTY2 paper tape reader
|
||||
TTY3 paper tape punch
|
||||
|
||||
The keyboard and printer (TTY0, TTY1) can be set to one of four modes,
|
||||
KSR, 7P, 7B, or 8B:
|
||||
|
||||
mode input characters output characters
|
||||
|
||||
KSR lower case converted lower case converted
|
||||
to upper case, to upper case,
|
||||
high-order bit set high-order bit cleared,
|
||||
non-printing characters
|
||||
suppressed
|
||||
7P high-order bit cleared high-order bit cleared,
|
||||
non-printing characters
|
||||
suppressed
|
||||
7B high-order bit cleared high-order bit cleared
|
||||
8B no changes no changes
|
||||
|
||||
The default mode is KSR. The Teletype keyboard reads from the console
|
||||
keyboard, and the printer writes to the simulator console window.
|
||||
|
||||
The paper tape reader (TTY2) can bet set to operate in binary, ASCII, or
|
||||
Unix ASCII mode:
|
||||
|
||||
sim> set tty2 binary -- binary mode
|
||||
sim> set tty2 ascii -- ASCII mode
|
||||
sim> set tty2 uascii -- Unix ASCII mode
|
||||
|
||||
The mode can also be set by a switch setting in the attach command:
|
||||
|
||||
sim> att -b tty2 <file> -- binary mode
|
||||
sim> att -a tty2 <file> -- ASCII mode
|
||||
sim> att -u tty2 <file> -- Unix ASCII mode
|
||||
|
||||
In ASCII or Unix ASCII mode, all non-zero characters have the high
|
||||
order bit forced on. In Unix ASCII mode, newline is converted to
|
||||
CR, and LF in inserted as the following character.
|
||||
|
||||
The paper tape reader is started by program output of XON or by
|
||||
the command SET TTY2 START. The paper tape reader is stopped by
|
||||
reader input of XOFF or by the command SET TTY2 STOP.
|
||||
|
||||
The paper tape punch (TTY3) can bet set to operate in binary, ASCII, or
|
||||
Unix ASCII mode:
|
||||
|
||||
sim> set tty3 binary -- binary mode
|
||||
sim> set tty3 ascii -- ASCII mode
|
||||
sim> set tty3 uascii -- Unix ASCII mode
|
||||
|
||||
The mode can also be set by a switch setting in the attach command:
|
||||
|
||||
sim> att -b tty3 <file> -- binary mode
|
||||
sim> att -a tty3 <file> -- ASCII mode
|
||||
sim> att -u tty3 <file> -- Unix ASCII mode
|
||||
|
||||
In ASCII or Unix ASCII mode, all characters are masked to 7b
|
||||
before being written to the output file. In Unix ASCII mode, LF
|
||||
is converted to newline, and CR is discarded.
|
||||
|
||||
The paper tape punch is started by program output of TAPE or by
|
||||
the command SET TTY3 START. The paper tape punch is stopped by
|
||||
program output of XOFF or by the command SET TTY3 STOP.
|
||||
|
||||
It implements these registers:
|
||||
|
||||
name size comments
|
||||
|
||||
BUF 8 last data item processed
|
||||
MODE 1 read/write mode
|
||||
INTREQ 1 device interrupt request
|
||||
READY 1 device ready
|
||||
ENABLE 1 device interrupts enabled
|
||||
KPOS 32 number of keyboard characters input
|
||||
KTIME 24 keyboard polling interval
|
||||
TPOS 32 number of printer characters output
|
||||
TTIME 24 time from I/O initiation to interrupt
|
||||
RPOS 32 current reader character position
|
||||
PPOS 32 current punch character position
|
||||
|
||||
2.2.4 316/516-12 Real Time Clock (CLK)
|
||||
|
||||
The real time clock (CLK) frequency can be adjusted as follows:
|
||||
|
||||
SET CLK 60HZ set frequency to 60Hz
|
||||
SET CLK 50HZ set frequency to 50Hz
|
||||
|
||||
The default is 60Hz.
|
||||
|
||||
The clock implements these registers:
|
||||
|
||||
name size comments
|
||||
|
||||
INTREQ 1 device interrupt request
|
||||
READY 1 device ready
|
||||
ENABLE 1 device interrupts enabled
|
||||
TIME 24 clock interval
|
||||
|
||||
The real-time clock autocalibrates; the clock interval is adjusted up or
|
||||
down so that the clock tracks actual elapsed time.
|
||||
|
||||
2.3 316/516 Line Printer (LPT)
|
||||
|
||||
The line printer (LPT) writes data to a disk file. The POS register
|
||||
specifies the number of the next data item to be written. Thus,
|
||||
by changing POS, the user can backspace or advance the printer.
|
||||
|
||||
The line printer can be connected to the IO bus, a DMC channel, or
|
||||
a DMA channel:
|
||||
|
||||
SET LPT IOBUS connect to IO bus
|
||||
SET LPT DMC=n connect to DMC channel n (1-16)
|
||||
SET LPT DMA=n connect to DMA channel n (1-4)
|
||||
|
||||
By default, the line printer is connected to the IO bus.
|
||||
|
||||
The line printer implements these registers:
|
||||
|
||||
name size comments
|
||||
|
||||
WDPOS 6 word position in current scan
|
||||
DRPOS 6 drum position
|
||||
CRPOS 1 carriage position
|
||||
PRDN 1 print done flag
|
||||
RDY 1 ready flag
|
||||
EOR 1 (DMA/DMC) end of range flag
|
||||
DMA 1 transfer using DMA/DMC
|
||||
INTREQ 1 device interrupt request
|
||||
ENABLE 1 device interrupt enable
|
||||
SVCST 2 service state
|
||||
SVCCH 2 service channel
|
||||
BUF 8 buffer
|
||||
POS 32 number of characters output
|
||||
XTIME 24 delay between transfers
|
||||
ETIME 24 delay at end of scan
|
||||
PTIME 24 delay for shuttle/line advance
|
||||
STOP_IOE 1 stop on I/O error
|
||||
|
||||
Error handling is as follows:
|
||||
|
||||
error STOP_IOE processed as
|
||||
|
||||
not attached 1 report error and stop
|
||||
0 out of paper
|
||||
|
||||
OS I/O error x report error and stop
|
||||
|
||||
2.4 4400 Fixed Head Disk (FHD)
|
||||
|
||||
Fixed head disk options include the ability to set the number of
|
||||
surfaces to a fixed value between 1 and 16, or to autosize the number
|
||||
of surfaces from the attached file:
|
||||
|
||||
SET FHD 1S one surface (98K)
|
||||
SET FHD 2S two platters (196K)
|
||||
:
|
||||
SET FHD 16S sixteen surfaces (1568K)
|
||||
SET FHD AUTOSIZE autosized on attach
|
||||
|
||||
The default is one surface.
|
||||
|
||||
The fixed head disk can be connected to the IO bus, a DMC channel, or
|
||||
a DMA channel:
|
||||
|
||||
SET FHD IOBUS connect to IO bus
|
||||
SET FHD DMC=n connect to DMC channel n (1-16)
|
||||
SET FHD DMA=n connect to DMA channel n (1-4)
|
||||
|
||||
By default, the fixed head disk is connected to the IO bus.
|
||||
|
||||
|
||||
The fixed head disk implements these registers:
|
||||
|
||||
name size comments
|
||||
|
||||
CW1 16 control word 1 (read write, surface, track)
|
||||
CW2 16 control word 2 (character address)
|
||||
BUF 16 data buffer
|
||||
BUSY 1 controller busy flag
|
||||
RDY 1 transfer ready flag
|
||||
DTE 1 data transfer error flag
|
||||
ACE 1 access error flag
|
||||
EOR 1 (DMA/DMC) end of range
|
||||
DMA 1 transfer using DMA/DMC
|
||||
CSUM 1 transfer parity checksum
|
||||
INTREQ 1 device interrupt request
|
||||
ENABLE 1 device interrupt enable
|
||||
TIME 24 delay between words
|
||||
STOP_IOE 1 stop on I/O error
|
||||
|
||||
The fixed head disk does not support the BOOT command.
|
||||
|
||||
Error handling is as follows:
|
||||
|
||||
error STOP_IOE processed as
|
||||
|
||||
not attached 1 report error and stop
|
||||
0 disk not ready
|
||||
|
||||
Fixed head disk data files are buffered in memory; therefore, end of file
|
||||
and OS I/O errors cannot occur.
|
||||
|
||||
2.5 4100 7-track Magnetic Tape (MT)
|
||||
|
||||
Magnetic tape options include the ability to make units write enabled or
|
||||
or write locked.
|
||||
|
||||
SET MTn LOCKED set unit n write locked
|
||||
SET MTn WRITEENABLED set unit n write enabled
|
||||
|
||||
Units can also be set ENABLED or DISABLED.
|
||||
|
||||
The magtape controller can be connected to the IO bus, a DMC channel, or
|
||||
a DMA channel:
|
||||
|
||||
SET MT IOBUS connect to IO bus
|
||||
SET MT DMC=n connect to DMC channel n (1-16)
|
||||
SET MT DMA=n connect to DMA channel n (1-4)
|
||||
|
||||
By default, the magtape controller is connected to the IO bus.
|
||||
|
||||
The magnetic tape controller implements these registers:
|
||||
|
||||
name size comments
|
||||
|
||||
BUF 16 data buffer
|
||||
USEL 2 unit select
|
||||
BUSY 1 controller busy flag
|
||||
RDY 1 transfer ready flag
|
||||
ERR 1 error flag
|
||||
EOF 1 end of file flag
|
||||
EOR 1 (DMA/DMC) end of range
|
||||
DMA 1 transfer using DMA/DMC
|
||||
MDIRQ 1 motion done interrupt request
|
||||
INTREQ 1 device interrupt request
|
||||
ENABLE 1 device interrupt enable
|
||||
DBUF[0:65535] 8 transfer buffer
|
||||
BPTR 17 transfer buffer pointer
|
||||
BMAX 17 transfer size (reads)
|
||||
CTIME 24 start/stop time
|
||||
XTIME 24 delay between words
|
||||
POS[0:3] 32 position, units 0-3
|
||||
STOP_IOE 1 stop on I/O error
|
||||
|
||||
Error handling is as follows:
|
||||
|
||||
error processed as
|
||||
|
||||
not attached tape not ready; if STOP_IOE, stop
|
||||
|
||||
end of file bad tape
|
||||
|
||||
OS I/O error parity error; if STOP_IOE, stop
|
||||
|
||||
2.6 4623/4651/4720 Disk Packs (DP)
|
||||
|
||||
The disk controller can be configured as a 4623, supporting 10 surface
|
||||
disk packs; a 4651, supporting 2 surface disk packs; or a 4720, supporting
|
||||
20 surface disk packs:
|
||||
|
||||
SET DP 4623 controller is 4623
|
||||
SET DP 4651 controller is 4651
|
||||
SET DP 4720 controller is 4720
|
||||
|
||||
The default is 4651. All disk packs on the controller must be of the
|
||||
same type. Units can be set ENABLED or DISABLED, and WRITEENABLED or
|
||||
write LOCKED.
|
||||
|
||||
The disk pack controller can be connected to a DMC channel or a DMA
|
||||
channel; it cannot be connected to the IO bus:
|
||||
|
||||
SET DP DMC=n connect to DMC channel n (1-16)
|
||||
SET DP DMA=n connect to DMA channel n (1-4)
|
||||
|
||||
The disk pack controller supports variable track formatting. Each track
|
||||
can contain between 1 and 103 records, with a minimum size of 1 word and
|
||||
a maximum size of 1893 words. Record addresses are unconstrained. The
|
||||
simulator provides a command to perform a simple, fixed record size format
|
||||
of a new disk:
|
||||
|
||||
SET DPn FORMAT=k format unit n with k words per record
|
||||
SET -R DPn FORMAT=k format unit n with k records per track
|
||||
|
||||
Record addresses can either be geometric (cylinder/track/sector) or simple
|
||||
sequential starting from 0:
|
||||
|
||||
SET DPn FORMAT=k format with geometric record addresses
|
||||
SET -S DPn FORMAT=k format with sequential record addresses
|
||||
|
||||
Geometric address have the cylinder number in bits<1:8>, the head number in
|
||||
bits<9:13>, and the sector number in bits <14:16>.
|
||||
|
||||
A summary of the current format, and its validity, can be obtained with
|
||||
the command:
|
||||
|
||||
SHOW DPn FORMAT display format of unit n
|
||||
|
||||
To accomodate the variable formatting, each track is allocated 2048 words
|
||||
in the data file. A record consists of a three word header, the data, and
|
||||
a five word trailer:
|
||||
|
||||
word 0 record length in words, not including header/trailer
|
||||
word 1 record address
|
||||
word 2 number of extension words used (0-4)
|
||||
word 3 start of data record
|
||||
word 3+n-1 end of data record
|
||||
word 3+n..7+n record trailer: up to four extension words,
|
||||
plus checksum
|
||||
|
||||
A record can "grow" by up to four words without disrupting the track formatting;
|
||||
writing more than four extra words destroys the formatting of the rest of the
|
||||
track and causes a simulator error.
|
||||
|
||||
The disk pack controller implements these registers:
|
||||
|
||||
name size comments
|
||||
|
||||
STA 16 status
|
||||
BUF 16 data buffer
|
||||
FNC 4 controller function
|
||||
CW1 16 command word 1
|
||||
CW2 16 command word 2
|
||||
CSUM 16 record checksum
|
||||
BUSY 1 controller busy
|
||||
RDY 1 transfer ready
|
||||
EOR 1 (DMA/DMC) end of range
|
||||
DEFINT 1 seek deferred interrupt pending
|
||||
INTREQ 1 interrupt request
|
||||
ENABLE 1 interrupt enable
|
||||
TBUF[0:2047] 16 track buffer
|
||||
RPTR 11 pointer to start of record in track buffer
|
||||
WPTR 11 pointer to current word in record
|
||||
BCTR 15 bit counter for formatting
|
||||
STIME 24 seek time, per cylinder
|
||||
XTIME 24 transfer time, per word
|
||||
BTIME 24 controller busy time
|
||||
|
||||
Error handling is as follows:
|
||||
|
||||
error processed as
|
||||
|
||||
not attached pack off line; if STOP_IOE, stop
|
||||
|
||||
end of file ignored
|
||||
|
||||
OS I/O error data error; if STOP_IOE, stop
|
||||
|
||||
2.7 Symbolic Display and Input
|
||||
|
||||
The H316/H516 simulator implements symbolic display and input. Display is
|
||||
controlled by command line switches:
|
||||
|
||||
-a display as ASCII character
|
||||
-c display as two character string
|
||||
-m display instruction mnemonics
|
||||
|
||||
Input parsing is controlled by the first character typed in or by command
|
||||
line switches:
|
||||
|
||||
' or -a ASCII character
|
||||
" or -c two character sixbit string
|
||||
alphabetic instruction mnemonic
|
||||
numeric octal number
|
||||
|
||||
Instruction input uses standard H316/H516 assembler syntax. There are six
|
||||
instruction classes: memory reference, I/O, control, shift, skip, and
|
||||
operate.
|
||||
|
||||
Memory reference instructions have the format
|
||||
|
||||
memref{*} {C/Z} address{,1}
|
||||
|
||||
where * signifies indirect, C a current sector reference, Z a sector zero
|
||||
reference, and 1 indexed. The address is an octal number in the range 0 -
|
||||
077777; if C or Z is specified, the address is a page offset in the range
|
||||
0 - 0777. Normally, C is not needed; the simulator figures out from the
|
||||
address what mode to use. However, when referencing memory outside the CPU,
|
||||
there is no valid PC, and C must be used to specify current sector addressing.
|
||||
|
||||
I/O instructions have the format
|
||||
|
||||
io pulse+device
|
||||
|
||||
The pulse+device is an octal number in the range 0 - 01777.
|
||||
|
||||
Control and operate instructions consist of a single opcode
|
||||
|
||||
opcode
|
||||
|
||||
Shift instructions have the format
|
||||
|
||||
shift n
|
||||
|
||||
where n is an octal number in the range 0-77.
|
||||
|
||||
Skip instructions have the format
|
||||
|
||||
sub-op sub-op sub-op...
|
||||
|
||||
The simulator checks that the combination of sub-opcodes is legal.
|
||||
@@ -1,6 +1,6 @@
|
||||
/* h316_fhd.c: H316/516 fixed head simulator
|
||||
|
||||
Copyright (c) 2003-2005, Robert M. Supnik
|
||||
Copyright (c) 2003-2006, 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 @@
|
||||
|
||||
fhd 516-4400 fixed head disk
|
||||
|
||||
15-May-06 RMS Fixed bug in autosize attach (reported by David Gesswein)
|
||||
04-Jan-04 RMS Changed sim_fsize calling sequence
|
||||
|
||||
These head-per-track devices are buffered in memory, to minimize overhead.
|
||||
@@ -63,7 +64,7 @@
|
||||
#define CW2_GETCA(x) (((x) >> CW2_V_CA) & CW2_M_CA)
|
||||
|
||||
#define GET_POS(x) ((int) fmod (sim_gtime() / ((double) (x)), \
|
||||
((double) FH_NUMWD)))
|
||||
((double) FH_NUMWD)))
|
||||
|
||||
/* OTA states */
|
||||
|
||||
@@ -93,7 +94,6 @@ int32 fhdio (int32 inst, int32 fnc, int32 dat, int32 dev);
|
||||
t_stat fhd_svc (UNIT *uptr);
|
||||
t_stat fhd_reset (DEVICE *dptr);
|
||||
t_stat fhd_attach (UNIT *uptr, char *cptr);
|
||||
t_stat fhd_boot (int32 unitno, DEVICE *dptr);
|
||||
t_stat fhd_set_size (UNIT *uptr, int32 val, char *cptr, void *desc);
|
||||
void fhd_go (uint32 dma);
|
||||
void fhd_go1 (uint32 dat);
|
||||
@@ -433,18 +433,15 @@ t_stat fhd_attach (UNIT *uptr, char *cptr)
|
||||
{
|
||||
uint32 sz, sf;
|
||||
uint32 ds_bytes = FH_WDPSF * sizeof (int16);
|
||||
t_stat r;
|
||||
|
||||
r = attach_unit (uptr, cptr);
|
||||
if (r != SCPE_OK) return r;
|
||||
if ((uptr->flags & UNIT_AUTO) && (sz = sim_fsize (uptr->fileref))) {
|
||||
if ((uptr->flags & UNIT_AUTO) && (sz = sim_fsize_name (cptr))) {
|
||||
sf = (sz + ds_bytes - 1) / ds_bytes;
|
||||
if (sf >= FH_NUMSF) sf = FH_NUMSF - 1;
|
||||
uptr->flags = (uptr->flags & ~UNIT_SF) |
|
||||
(sf << UNIT_V_SF);
|
||||
}
|
||||
uptr->capac = UNIT_GETSF (uptr->flags) * FH_WDPSF;
|
||||
return SCPE_OK;
|
||||
return attach_unit (uptr, cptr);
|
||||
}
|
||||
|
||||
/* Set size routine */
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* h316_lp.c: Honeywell 316/516 line printer
|
||||
|
||||
Copyright (c) 1999-2005, Robert M. Supnik
|
||||
Copyright (c) 1999-2006, 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 line printer
|
||||
|
||||
03-Apr-06 RMS Fixed bug in blanks backscanning (from Theo Engel)
|
||||
01-Dec-04 RMS Fixed bug in DMA/DMC support
|
||||
24-Oct-03 RMS Added DMA/DMC support
|
||||
25-Apr-03 RMS Revised for extended file support
|
||||
@@ -298,7 +299,7 @@ if (lpt_svcst & LPT_SVCSH) { /* shuttling */
|
||||
}
|
||||
if (lpt_svcst & LPT_SVCPA) { /* paper advance */
|
||||
SET_INT (INT_LPT); /* interrupt */
|
||||
for (i = LPT_WIDTH - 1; i >= 0; i++) {
|
||||
for (i = LPT_WIDTH - 1; i >= 0; i--) { /* backscan for blanks */
|
||||
if (lpt_buf[i] != ' ') break;
|
||||
}
|
||||
lpt_buf[i + 1] = 0;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* h316_mt.c: H316/516 magnetic tape simulator
|
||||
|
||||
Copyright (c) 2003-2005, Robert M. Supnik
|
||||
Copyright (c) 2003-2006, 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 @@
|
||||
|
||||
mt 516-4100 seven track magnetic tape
|
||||
|
||||
16-Feb-06 RMS Added tape capacity checking
|
||||
26-Aug-05 RMS Revised to use API for write lock check
|
||||
08-Feb-05 RMS Fixed error reporting from OCP (found by Philipp Hachtmann)
|
||||
01-Dec-04 RMS Fixed bug in DMA/DMC support
|
||||
@@ -154,6 +155,8 @@ MTAB mt_mod[] = {
|
||||
{ MTUF_WLK, MTUF_WLK, "write locked", "LOCKED", NULL },
|
||||
{ MTAB_XTD|MTAB_VUN, 0, "FORMAT", "FORMAT",
|
||||
&sim_tape_set_fmt, &sim_tape_show_fmt, NULL },
|
||||
{ MTAB_XTD|MTAB_VUN, 0, "CAPACITY", "CAPACITY",
|
||||
&sim_tape_set_capac, &sim_tape_show_capac, NULL },
|
||||
{ MTAB_XTD|MTAB_VDV, 0, NULL, "IOBUS",
|
||||
&io_set_iobus, NULL, NULL },
|
||||
{ MTAB_XTD|MTAB_VDV, 0, NULL, "DMC",
|
||||
@@ -177,7 +180,7 @@ DEVICE mt_dev = {
|
||||
|
||||
int32 mtio (int32 inst, int32 fnc, int32 dat, int32 dev)
|
||||
{
|
||||
uint32 u = dev & 03;
|
||||
uint32 i, u = dev & 03;
|
||||
UNIT *uptr = mt_dev.units + u;
|
||||
static uint8 wrt_fnc[16] = { /* >0 = wr, 1 = chan op */
|
||||
0, 0, 0, 0, 1, 1, 2, 0, 1, 0, 0, 0, 0, 0, 0, 0
|
||||
@@ -222,6 +225,8 @@ switch (inst) { /* case on opcode */
|
||||
uptr->FNC = fnc;
|
||||
uptr->UST = 0;
|
||||
mt_busy = 1;
|
||||
for (i = 0; i < MT_NUMDR; i++) /* clear all EOT flags */
|
||||
mt_unit[i].UST = mt_unit[i].UST & ~STA_EOT;
|
||||
sim_activate (uptr, mt_ctime); /* schedule */
|
||||
break;
|
||||
}
|
||||
@@ -319,6 +324,7 @@ t_stat mt_svc (UNIT *uptr)
|
||||
int32 ch = mt_dib.chan - 1; /* DMA/DMC ch */
|
||||
uint32 i, c1, c2, c3;
|
||||
t_mtrlnt tbc;
|
||||
t_bool passed_eot;
|
||||
t_stat st, r = SCPE_OK;
|
||||
|
||||
if ((uptr->flags & UNIT_ATT) == 0) { /* offline? */
|
||||
@@ -328,6 +334,7 @@ if ((uptr->flags & UNIT_ATT) == 0) { /* offline? */
|
||||
return IORETURN (mt_stopioe, SCPE_UNATT);
|
||||
}
|
||||
|
||||
passed_eot = sim_tape_eot (uptr); /* passed EOT? */
|
||||
switch (uptr->FNC) { /* case on function */
|
||||
|
||||
case FNC_REW: /* rewind (initial) */
|
||||
@@ -442,6 +449,8 @@ switch (uptr->FNC) { /* case on function */
|
||||
|
||||
/* End of command, process error or schedule end of motion */
|
||||
|
||||
if (!passed_eot && sim_tape_eot (uptr)) /* just passed EOT? */
|
||||
uptr->UST = uptr->UST | STA_EOT;
|
||||
if (r != SCPE_OK) {
|
||||
uptr->FNC = FNC_NOP; /* nop function */
|
||||
mt_busy = 0; /* not busy */
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* h316_stddev.c: Honeywell 316/516 standard devices
|
||||
|
||||
Copyright (c) 1999-2005, Robert M. Supnik
|
||||
Copyright (c) 1999-2006, 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,7 @@
|
||||
tty 316/516-33 teleprinter
|
||||
clk/options 316/516-12 real time clocks/internal options
|
||||
|
||||
03-Apr-06 RMS Fixed bugs in punch state handling (from Theo Engel)
|
||||
22-Nov-05 RMS Revised for new terminal processing routines
|
||||
05-Feb-05 RMS Fixed bug in OCP '0001 (found by Philipp Hachtmann)
|
||||
31-Jan-05 RMS Fixed bug in TTY print (found by Philipp Hachtmann)
|
||||
@@ -608,7 +609,7 @@ else if ((ruptr->flags & UNIT_ATT) && /* TTR attached */
|
||||
(ruptr->STA & RUNNING)) { /* and running? */
|
||||
if (ruptr->STA & LF_PEND) { /* lf pending? */
|
||||
c = 0212; /* char is lf */
|
||||
ruptr->STA &= LF_PEND; /* clear flag */
|
||||
ruptr->STA &= ~LF_PEND; /* clear flag */
|
||||
}
|
||||
else { /* normal read */
|
||||
if ((c = getc (ruptr->fileref)) == EOF) { /* read byte */
|
||||
@@ -665,7 +666,7 @@ if (ttp_tape_rcvd != 0) { /* prev = tape? */
|
||||
else if (c7b == TAPE) ttp_tape_rcvd = 2; /* char = TAPE? */
|
||||
if (ttp_xoff_rcvd != 0) { /* prev = XOFF? */
|
||||
ttp_xoff_rcvd--; /* decrement state */
|
||||
if (ttp_xoff_rcvd == 0) puptr->STA &= RUNNING; /* stop after delay */
|
||||
if (ttp_xoff_rcvd == 0) puptr->STA &= ~RUNNING; /* stop after delay */
|
||||
}
|
||||
else if (c7b == XOFF) ttp_xoff_rcvd = 2; /* char = XOFF? */
|
||||
if ((c7b == XON) && (ruptr->flags & UNIT_ATT)) { /* char = XON? */
|
||||
|
||||
Reference in New Issue
Block a user