Notes For V3.2-2

RESTRICTION: The PDP-15 FPP is only partially debugged.  Do NOT
enable this feature for normal operations.
RESTRICTION: The HP DS disk is not debugged.  DO NOT enable this
feature under any circumstances.

1. New Features in 3.2-2

None

2. Bugs Fixed in 3.2-2

2.1 SCP

- Fixed problem ATTACHing to read-only files (found by John Dundas)
- Fixed problems in Windows terminal code (found by Dave Bryan)
- Fixed problem in big-endian reads (reported by Scott Bailey)

2.2 GRI-909

- Updated MSR to include SOV
- Updated EAO to include additional functions

2.2 HP2100 (from Dave Bryan)

- Generalized control character handling for console terminal

2.3 VAX

- Fixed bad block initialization routine
This commit is contained in:
Bob Supnik 2004-07-17 11:55:00 -07:00 committed by Mark Pizzolato
parent e2ba672610
commit 2688f2d26e
11 changed files with 193 additions and 97 deletions

View file

@ -1,64 +1,32 @@
Notes For V3.2-1
Notes For V3.2-2
RESTRICTION: The PDP-15 FPP is only partially debugged. Do NOT
enable this feature for normal operations.
RESTRICTION: The HP DS disk is not debugged. DO NOT enable this
feature under any circumstances.
1. New Features in 3.2-1
1. New Features in 3.2-2
1.1 SCP and libraries
None
- Added SET CONSOLE subhierarchy.
- Added SHOW CONSOLE subhierarchy.
- Added limited keyboard mapping capability.
2. Bugs Fixed in 3.2-2
1.2 HP2100 (new features from Dave Bryan)
2.1 SCP
- Added instruction printout to HALT message.
- Added M and T internal registers.
- Added N, S, and U breakpoints.
- Fixed problem ATTACHing to read-only files (found by John Dundas)
- Fixed problems in Windows terminal code (found by Dave Bryan)
- Fixed problem in big-endian reads (reported by Scott Bailey)
1.3 PDP-11 and VAX
2.2 GRI-909
- Added DHQ11 support (from John Dundas)
- Updated MSR to include SOV
- Updated EAO to include additional functions
2. Bugs Fixed in 3.2-1
2.2 HP2100 (from Dave Bryan)
2.1 HP2100 (most fixes from Dave Bryan)
- Generalized control character handling for console terminal
- SBT increments B after store.
- DMS console map must check dms_enb.
- SFS x,C and SFC x,C work.
- MP violation clears automatically on interrupt.
- SFS/SFC 5 is not gated by protection enabled.
- DMS enable does not disable mem prot checks.
- DMS status inconsistent at simulator halt.
- Examine/deposit are checking wrong addresses.
- Physical addresses are 20b not 15b.
- Revised DMS to use memory rather than internal format.
- Revised IBL facility to conform to microcode.
- Added DMA EDT I/O pseudo-opcode.
- Separated DMA SRQ (service request) from FLG.
- Revised peripherals to make SFS x,C and SFC x,C work.
- Revised boot ROMs to use IBL facility.
- Revised IBL treatment of SR to preserve SR<5:3>.
- Fixed LPS, LPT timing.
- Fixed DP boot interpretation of SR<0>.
- Revised DR boot code to use IBL algorithm.
- Fixed TTY input behavior during typeout for RTE-IV.
- Suppressed nulls on TTY output for RTE-IV.
- Added SFS x,C and SFC x,C to print/parse routines.
- Fixed spurious timing error in magtape reads.
2.3 VAX
2.2 All DEC console devices
- Fixed bad block initialization routine
- Removed SET TTI CTRL-C option.
2.3 PDP-11/VAX peripherals
- Fixed bug in TQ reporting write protect status (reported by Lyle Bickley).
- Fixed TK70 model number and media ID (found by Robert Schaffrath).
- Fixed bug in autoconfigure (found by John Dundas).
2.4 VAX
- Fixed bug in DIVBx and DIVWx (reported by Peter Trimmel).

View file

@ -25,6 +25,7 @@
cpu GRI-909 CPU
17-Jul-04 RMS Revised MSR, EAO based on additional documentation
14-Mar-03 RMS Fixed bug in SC queue tracking
The system state for the GRI-909 is:
@ -731,6 +732,9 @@ case AO_IOR:
break; }
if ((AX + AY) & CBIT) MSR = MSR | MSR_AOV; /* always calc AOV */
else MSR = MSR & ~MSR_AOV;
if (SIGN & ((AX ^ (AX + AY)) & (~AX ^ AY))) /* always calc SOV */
MSR = MSR | MSR_SOV;
else MSR = MSR & ~MSR_SOV;
return t;
}
@ -778,21 +782,41 @@ if (cpu_unit.flags & UNIT_NOEAO) return stop_opr; /* EAO installed? */
if (op == EAO_MUL) { /* mul? */
t = AX * AY; /* AX * AY */
AX = (t >> 16) & DMASK; /* to AX'GR1 */
GR[0] = t & DMASK; }
if (op == EAO_DIV) { /* div? */
GR[0] = t & DMASK;
}
else if (op == EAO_DIV) { /* div? */
if (AY && (AX < AY)) {
t = (AX << 16) | GR[0]; /* AX'GR1 / AY */
GR[0] = t / AY; /* quo to GR1 */
AX = t % AY; } /* rem to AX */
AX = t % AY; /* rem to AX */
MSR = MSR & ~MSR_L; } /* clear link */
else MSR = MSR | MSR_L; /* set link */
}
else if (op == EAO_ARS) { /* arith right? */
t = 0; /* shift limiter */
if (AX & SIGN) MSR = MSR | MSR_L; /* L = sign */
else MSR = MSR & ~MSR_L;
do { /* shift one bit */
AY = ((AY >> 1) | (AX << 15)) & DMASK;
AX = (AX & SIGN) | (AX >> 1);
GR[0] = (GR[0] + 1) & DMASK; }
while (GR[0] && (++t < 32)); /* until cnt or limit */
}
else if (op == EAO_NORM) { /* norm? */
if ((AX | AY) != 0) { /* can normalize? */
while ((AX & SIGN) != ((AX << 1) & SIGN)) { /* until AX15 != AX14 */
AX = ((AX << 1) | (AY >> 15)) & DMASK;
AY = (AY << 1) & DMASK;
GR[0] = (GR[0] + 1) & DMASK; } }
}
ao_update ();
return SCPE_OK;
}
uint32 ao_sf (uint32 op)
{
if (((op & 2) && (MSR & MSR_AOV)) || /* arith carry? */
((op & 4) && (SIGN & /* arith overflow? */
((AX ^ (AX + AY)) & (~AX ^ AY))))) return 1;
((op & 4) && (MSR & MSR_SOV))) return 1; /* arith overflow? */
return 0;
}

View file

@ -28,28 +28,29 @@
There are several discrepancies between the original GRI-909 Reference
Manual of 1969 and the only surviving code sample, the MIT Crystal Growing
System of 1972:
System of 1972. These discrepancies were clarified by later documentation:
1. Ref Manual documents two GR's at codes 26-27; MITCS documents six GR's
at 30-35.
at 30-35. Answer: 6 GR's, 26-27 were used for character compares.
2. Ref Manual documents only unsigned overflow (carry) for arithmetic
operator; MITCS uses both unsigned overflow (AOV) and signed overflow
(SOV).
(SOV). Answer: signed and unsigned.
3. Ref Manual documents a ROM-subroutine multiply operator and mentions
but does not document a "fast multiply"; MITCS uses an extended
arithmetic operator with multiply, divide, and shifts. The behavior
arithmetic operator with multiply, divide, and shift. The behavior
of the extended arithmetic operator can only be inferred partially;
the shifts are never used, and there is no indication of how divide
overflow is handled.
The simulator follows the code in these instances.
the shift is never used, and there is no indication of how divide
overflow is handled. Answer: EAO is a package of ROM subroutines
with just four functions: multiply, divide, arithmetic right shift,
and normalize.
Outstanding issues:
1. Is there any interaction between the byte swapper and the byte packer?
2. Is SOV testable even if the FOA is not ADD?
3. How does the EAO handle divide overflow?
3. How does the EAO handle divide overflow? Answer: set link.
4. What are the other EAO functions beside multiply and divide?
Answer: arithmetic right shift, normalize.
*/
#include "sim_defs.h" /* simulator defns */
@ -109,7 +110,6 @@
#define U_MSR 017 /* machine status */
#define U_BSW 024 /* byte swap */
#define U_BPK 025 /* byte pack */
/* #define U_GR 026 /* dual general regs */
#define U_GR 030 /* hex general regs */
#define U_RTC 075 /* clock */
#define U_HS 076 /* paper tape */
@ -159,17 +159,20 @@ struct gdev {
#define AO_IOR 03 /* or */
#define EAO_MUL 01 /* multiply */
#define EAO_DIV 02 /* divide */
#define EAO_ASR 03 /* arith rshft */
#define EAO_ARS 03 /* arith rshft */
#define EAO_NORM 04 /* normalize */
/* Machine status */
#define MSR_V_BOV 15 /* bus carry */
#define MSR_BOV (1u << MSR_V_BOV)
#define MSR_V_L 14 /* bus link */
#define MSR_L (1u << MSR_V_L) /* bus link */
#define MSR_V_FOA 8 /* arith func */
#define MSR_M_FOA 03
#define MSR_V_SOV 1 /* arith ovflo */
#define MSR_V_AOV 0 /* arith carry */
#define MSR_BOV (1u << MSR_V_BOV)
#define MSR_L (1u << MSR_V_L)
#define MSR_SOV (1u << MSR_V_SOV)
#define MSR_AOV (1u << MSR_V_AOV)
#define MSR_GET_FOA(x) (((x) >> MSR_V_FOA) & MSR_M_FOA)
#define MSR_PUT_FOA(x,n) (((x) & ~(MSR_M_FOA << MSR_V_FOA)) | \

View file

@ -185,7 +185,11 @@ control registers for the interrupt system.
DMSCUR 21MX 1 DMS current mode
DMSSR 21MX 16 DMS status register
DMSVR 21MX 16 DMS violation register
DMSMAP[4][16] 21MX 16 DMS maps
DMSMAP[128] 21MX 16 DMS maps
[0:31] system map
[32:63] user map
[64:95] port A map
[96:127] port B map
STOP_INST all 1 stop on undefined instruction
STOP_DEV all 1 stop on undefined device
INDMAX all 16 indirect address limit
@ -652,7 +656,7 @@ buffer for reads and writes. The device controller includes the four
disk drives. Disk drives can be set ONLINE or OFFLINE.
The 12557A/13210A supports the BOOT command. BOOT DPC copies the IBL
for 7900 class disks into memory and starts it running. BOOT -R DP
for 7900 class disks into memory and starts it running. BOOT -R DPC
boots from the removable platter (head 2). The switch register (S) is
set automatically to the value expected by the IBL loader:

View file

@ -28,6 +28,8 @@
tty 12531C buffered teleprinter interface
clk 12539C time base generator
14-Jul-04 RMS Generalized handling of control char echoing
(from Dave Bryan)
26-Apr-04 RMS Fixed SFS x,C and SFC x,C
Fixed SR setting in IBL
Fixed input behavior during typeout for RTE-IV
@ -68,6 +70,16 @@
#include "hp2100_defs.h"
#include <ctype.h>
#define CHAR_FLAG(c) (1u << (c))
#define BEL_FLAG CHAR_FLAG('\a')
#define BS_FLAG CHAR_FLAG('\b')
#define LF_FLAG CHAR_FLAG('\n')
#define CR_FLAG CHAR_FLAG('\r')
#define FULL_SET 0xFFFFFFFF
#define CNTL_SET (BEL_FLAG | BS_FLAG | LF_FLAG | CR_FLAG)
#define UNIT_V_8B (UNIT_V_UF + 0) /* 8B */
#define UNIT_V_UC (UNIT_V_UF + 1) /* UC only */
#define UNIT_V_DIAG (UNIT_V_UF + 2) /* diag mode */
@ -101,6 +113,8 @@ int32 tty_buf = 0; /* tty buffer */
int32 tty_mode = 0; /* tty mode */
int32 tty_shin = 0377; /* tty shift in */
int32 tty_lf = 0; /* lf flag */
uint32 tty_cntlprt = CNTL_SET; /* tty print flags */
uint32 tty_cntlset = CNTL_SET; /* tty cntl set */
int32 clk_select = 0; /* clock time select */
int32 clk_error = 0; /* clock error */
int32 clk_ctr = 0; /* clock counter */
@ -246,6 +260,8 @@ 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 (CNTLPRT, tty_cntlprt, 32), REG_HRO },
{ ORDATA (CNTLSET, tty_cntlset, 32), REG_HIDDEN },
{ ORDATA (DEVNO, tty_dib.devno, 6), REG_HRO },
{ NULL } };
@ -653,7 +669,7 @@ if (tty_mode & TM_PRI) { /* printing? */
c = c & 0177;
if (islower (c)) c = toupper (c); }
else c = c & ((tty_unit[TTO].flags & UNIT_8B)? 0377: 0177);
if (c || (tty_unit[TTO].flags & UNIT_8B)) { /* !null or 8b? */
if ((c > 31) || (CHAR_FLAG (c) & tty_cntlprt)) {/* normal, ctrl? */
if (r = sim_putchar_s (c)) return r; /* output char */
tty_unit[TTO].pos = tty_unit[TTO].pos + 1; }
}
@ -696,6 +712,8 @@ int32 mask = (int32) desc;
if (u > 1) return SCPE_NOFNC;
tty_unit[TTI].flags = (tty_unit[TTI].flags & ~mask) | val;
tty_unit[TTO].flags = (tty_unit[TTO].flags & ~mask) | val;
if (val == UNIT_8B) tty_cntlprt = FULL_SET;
else tty_cntlprt = tty_cntlset;
return SCPE_OK;
}

View file

@ -23,6 +23,7 @@
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.
13-Jul-04 RMS Fixed bad block routine
16-Jun-04 RMS Added DHQ11 support
21-Mar-04 RMS Added RXV21 support
06-May-03 RMS Added support for second DELQA
@ -197,20 +198,22 @@ return SCPE_OK;
t_stat pdp11_bad_block (UNIT *uptr, int32 sec, int32 wds)
{
int32 i, da;
int32 *buf;
int32 i;
t_addr da;
uint16 *buf;
if ((sec < 2) || (wds < 16)) return SCPE_ARG;
if ((uptr->flags & UNIT_ATT) == 0) return SCPE_UNATT;
if (!get_yn ("Overwrite last track? [N]", FALSE)) return SCPE_OK;
da = (int32) (uptr->capac - (sec * wds)) * sizeof (int16);
if (fseek (uptr->fileref, da, SEEK_SET)) return SCPE_IOERR;
if ((buf = malloc (wds * sizeof (int32))) == NULL) return SCPE_MEM;
buf[0] = 0x12345678;
buf[1] = 0;
for (i = 2; i < wds; i++) buf[i] = 0xFFFFFFFF;
da = (uptr->capac - (sec * wds)) * sizeof (uint16);
if (sim_fseek (uptr->fileref, da, SEEK_SET)) return SCPE_IOERR;
if ((buf = malloc (wds * sizeof (uint16))) == NULL) return SCPE_MEM;
buf[0] = 0x1234;
buf[1] = 0x5678;
buf[2] = buf[3] = 0;
for (i = 4; i < wds; i++) buf[i] = 0xFFFF;
for (i = 0; (i < sec) && (i < 10); i++)
fxwrite (buf, sizeof (int32), wds, uptr->fileref);
sim_fwrite (buf, sizeof (uint16), wds, uptr->fileref);
free (buf);
if (ferror (uptr->fileref)) return SCPE_IOERR;
return SCPE_OK;

4
scp.c
View file

@ -23,6 +23,8 @@
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.
12-Jul-04 RMS Fixed problem ATTACHing to read only files
(found by John Dundas)
28-May-04 RMS Added SET/SHOW CONSOLE
14-Feb-04 RMS Updated SAVE/RESTORE (V3.2)
RMS Added debug print routines (from Dave Hittner)
@ -1543,7 +1545,7 @@ if (sim_switches & SWMASK ('R')) { /* read only? */
else { /* normal */
uptr->fileref = sim_fopen (cptr, "rb+"); /* open r/w */
if (uptr->fileref == NULL) { /* open fail? */
if (errno == EROFS) { /* read only? */
if ((errno == EROFS) || (errno == EACCES)) { /* read only? */
if ((uptr->flags & UNIT_ROABLE) == 0) /* allowed? */
return attach_err (uptr, SCPE_NORO); /* no error */
uptr->fileref = sim_fopen (cptr, "rb"); /* open rd only */

View file

@ -23,6 +23,7 @@
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.
14-Jul-04 RMS Revised Windows console code (from Dave Bryan)
28-May-04 RMS Added SET/SHOW CONSOLE
RMS Added break, delete character maps
02-Jan-04 RMS Removed timer routines, added Telnet console routines
@ -467,32 +468,40 @@ return SCPE_OK;
#elif defined (_WIN32)
#include <conio.h>
#include <fcntl.h>
#include <io.h>
#include <windows.h>
#include <signal.h>
static volatile int sim_win_ctlc = 0;
void win_handler (int sig)
{
sim_win_ctlc = 1;
return;
}
#define RAW_MODE 0
static HANDLE std_input;
static DWORD saved_mode;
t_stat sim_ttinit (void)
{
std_input = GetStdHandle (STD_INPUT_HANDLE);
if ((std_input == INVALID_HANDLE_VALUE) ||
!GetConsoleMode (std_input, &saved_mode)) return SCPE_TTYERR;
return SCPE_OK;
}
t_stat sim_ttrun (void)
{
if (signal (SIGINT, win_handler) == SIG_ERR) return SCPE_SIGERR;
if (!GetConsoleMode(std_input, &saved_mode) ||
!SetConsoleMode(std_input, RAW_MODE)) return SCPE_TTYERR;
if (sim_log) {
fflush (sim_log);
setmode (_fileno (sim_log), _O_BINARY); }
SetThreadPriority (GetCurrentThread(), THREAD_PRIORITY_BELOW_NORMAL);
return SCPE_OK;
}
t_stat sim_ttcmd (void)
{
if (sim_log) {
fflush (sim_log);
_setmode (_fileno (sim_log), _O_TEXT); }
SetThreadPriority (GetCurrentThread(), THREAD_PRIORITY_NORMAL);
if (!SetConsoleMode(std_input, saved_mode)) return SCPE_TTYERR;
return SCPE_OK;
}
@ -505,10 +514,6 @@ t_stat sim_os_poll_kbd (void)
{
int c;
if (sim_win_ctlc) {
sim_win_ctlc = 0;
signal (SIGINT, win_handler);
return 003 | SCPE_KFLAG; }
if (!_kbhit ()) return SCPE_OK;
c = _getch ();
if ((c & 0177) == sim_del_char) c = 0177;

View file

@ -23,6 +23,7 @@
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.
17-Jul-04 RMS Fixed bug in optimized sim_fread (reported by Scott Bailey)
26-May-04 RMS Optimized sim_fread (suggested by John Dundas)
02-Jan-04 RMS Split out from SCP
@ -82,11 +83,11 @@ c = fread (bptr, size, count, fptr); /* read buffer */
if (sim_end || (size == sizeof (char)) || (c == 0)) /* le, byte, or err? */
return c; /* done */
for (j = 0, dptr = sptr = bptr; j < c; j++) { /* loop on items */
for (k = size - 1; k >= 0; k--) { /* loop on bytes/item */
for (k = size - 1; k >= (((int32) size + 1) / 2); k--) {
by = *sptr; /* swap end-for-end */
*sptr++ = *(dptr + k);
*(dptr + k) = by; }
dptr = dptr + size; } /* next item */
sptr = dptr = dptr + size; } /* next item */
return c;
}

View file

@ -29,12 +29,27 @@
#define SIM_MAJOR 3
#define SIM_MINOR 2
#define SIM_PATCH 1
#define SIM_PATCH 2
/* V3.2 revision history
patch date module(s) and fix(es)
2 17-Jul-04 scp.c: fixed problem ATTACHing to read only files
(found by John Dundas)
sim_console.c: revised Windows console code (from Dave Bryan)
sim_fio.c: fixed problem in big-endian read
(reported by Scott Bailey)
gri_cpu.c: updated MSR, EAO functions
hp_stddev.c: generalized handling of control char echoing
(from Dave Bryan)
vax_sys.c: fixed bad block initialization routine
1 10-Jul-04 scp.c: added SET/SHOW CONSOLE subhierarchy
hp2100_cpu.c: fixed bugs and added features from Dave Bryan

View file

@ -27,6 +27,7 @@ SIMH FAQ, 31-Mar-2004
2.8 How can I get binary files in and out of SIMH?
2.9 Can I connect real devices on the host computer to SIMH?
2.10 My Windows host can't communicate with the PDP-11 or VAX over Ethernet; why?
2.11 How can I use my wireless Ethernet card with SIMH?
--------------------------------------------------------------------------------
@ -376,6 +377,58 @@ and a PC host, add a second Ethernet controller, attach both controllers to the
same hub, and attach SIMH to the second controller. The host and SIMH will now
be able to communicate across the physical network connection.
--------------------------------------------------------------------------------
2.11 How can I use my wireless Ethernet card with SIMH?
Wireless Ethernet is something of a misnomer - it "works like" Ethernet.
Wireless cards behave differently than real Ethernet cards in promiscuous mode
but can be successfully used with existing SIMH code.
The caveat is that the simulated machine cannot run any software which changes
the simulated MAC address, or the network connection will stop working. For
example, DECNET Phase IV (or Phase V in compatibility mode) tries to change the
MAC of the network card to AA-00-04-xx-xx-xx. Nor can you preset the wireless
MAC address to the anticipated target DECNET address using something like SMAC
to get DECNET to work - DECNET will see the MAC already preset to the required
DECNET address and generate an invalid media (duplicate address) fault.
Otherwise, TCP/IP, LAT, VMS Clustering, and DECNET Phase V in non-compatibility
mode work fine.
To get wireless cards to work with SIMH, set the simulated MAC to be the same
as the MAC of the wireless card. An example:
c:\> IPCONFIG/ALL
Windows 2000 IP Configuration
Host Name . . . . . . . . . . . . : LLOH3-EXP29189
Primary DNS Suffix . . . . . . . : ad.tasc.com
Node Type . . . . . . . . . . . . : Hybrid
IP Routing Enabled. . . . . . . . : No
WINS Proxy Enabled. . . . . . . . : No
DNS Suffix Search List. . . . . . : ad.tasc.com
Ethernet adapter Local Area Connection:
Connection-specific DNS Suffix . :
Description . . . . . . . . . . . : D-Link DWL-650+ Wireless Cardbus Adapter
Physical Address. . . . . . . . . : 00-80-C8-08-CE-DB <-- MAC address
DHCP Enabled. . . . . . . . . . . : No
IP Address. . . . . . . . . . . . : 192.168.0.5
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Default Gateway . . . . . . . . . :
DNS Servers . . . . . . . . . . . :
Primary WINS Server . . . . . . . : 132.228.188.100
Secondary WINS Server . . . . . . : 132.228.196.98
c:\> VAX
VAX simulator V3.2-1
sim> DO VAX_CONFIG.DO <-- setup VAX as normal
sim> SET XQ MAC=00-80-C8-08-CE-DB <-- set XQ MAC to wireless MAC address
sim> B CPU <-- and continue...
================================================================================
3 Writing and Debugging New Code
================================================================================