1
0
mirror of https://github.com/open-simh/simh.git synced 2026-01-25 19:57:36 +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:
Bob Supnik
2006-05-27 11:34:00 -07:00
committed by Mark Pizzolato
parent a12e4a1c39
commit dc871fa631
106 changed files with 15439 additions and 17517 deletions

View File

@@ -1,6 +1,6 @@
/* id16_cpu.c: Interdata 16b CPU simulator
Copyright (c) 2000-2005, Robert M. Supnik
Copyright (c) 2000-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 Interdata 16b CPU
06-Feb-06 RMS Fixed bug in DH (found by Mark Hittinger)
22-Sep-05 RMS Fixed declarations (from Sterling Garwood)
25-Aug-05 RMS Fixed DH integer overflow cases
16-Aug-05 RMS Fixed C++ declaration and cast problems
@@ -169,6 +170,7 @@ typedef struct {
uint16 opnd;
} InstHistory;
#define PSW_GETMAP(x) (((x) >> PSW_V_MAP) & PSW_M_MAP)
#define SEXT16(x) (((x) & SIGN16)? ((int32) ((x) | 0xFFFF8000)): \
((int32) ((x) & 0x7FFF)))
#define CC_GL_16(x) if ((x) & SIGN16) cc = CC_L; \
@@ -1058,7 +1060,7 @@ while (reason == 0) { /* loop until halted */
case 0x4D: /* DH - RXH */
r1p1 = (r1 + 1) & 0xF; /* R1 + 1 */
if ((opnd == 0) ||
((R[r1] == 0x8000) && (R[r1p1] == 0) && (opnd = 0xFFFF))) {
((R[r1] == 0x8000) && (R[r1p1] == 0) && (opnd == 0xFFFF))) {
if (PSW & PSW_AFI) /* div fault enabled? */
cc = swap_psw (AFIPSW, cc); /* swap PSW */
break;

View File

@@ -1,6 +1,6 @@
/* id32_cpu.c: Interdata 32b CPU simulator
Copyright (c) 2000-2005, Robert M. Supnik
Copyright (c) 2000-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,8 @@
cpu Interdata 32b CPU
09-Mar-06 RMS Added 8 register bank support for 8/32
06-Feb-06 RMS Fixed bug in DH (found by Mark Hittinger)
22-Sep-05 RMS Fixed declarations (from Sterling Garwood)
16-Aug-05 RMS Fixed C++ declaration and cast problems
10-Mar-05 RMS Fixed bug in initial memory allocation
@@ -156,7 +158,7 @@
#define PCQ_MASK (PCQ_SIZE - 1)
#define PCQ_ENTRY pcq[pcq_p = (pcq_p - 1) & PCQ_MASK] = oPC
#define VAMASK VAMASK32
#define NRSETS 2 /* 2 gen reg sets */
#define NRSETS 8 /* up to 8 reg sets */
#define PSW_MASK PSW_x32
#define ABORT(val) longjmp (save_env, (val))
#define MPRO (-1)
@@ -164,9 +166,11 @@
#define UNIT_V_MSIZE (UNIT_V_UF + 0) /* dummy mask */
#define UNIT_V_DPFP (UNIT_V_UF + 1)
#define UNIT_V_832 (UNIT_V_UF + 2)
#define UNIT_V_8RS (UNIT_V_UF + 3)
#define UNIT_MSIZE (1 << UNIT_V_MSIZE)
#define UNIT_DPFP (1 << UNIT_V_DPFP)
#define UNIT_832 (1 << UNIT_V_832)
#define UNIT_8RS (1 << UNIT_V_8RS)
#define UNIT_TYPE (UNIT_DPFP | UNIT_832)
#define HIST_PC 0x40000000
@@ -183,6 +187,7 @@ typedef struct {
uint32 opnd;
} InstHistory;
#define PSW_GETREG(x) (((x) >> PSW_V_REG) & psw_reg_mask)
#define SEXT32(x) (((x) & SIGN32)? ((int32) ((x) | ~0x7FFFFFFF)): \
((int32) ((x) & 0x7FFFFFFF)))
#define SEXT16(x) (((x) & SIGN16)? ((int32) ((x) | ~0x7FFF)): \
@@ -235,6 +240,7 @@ uint32 fp_in_hwre = 0; /* ucode vs hwre fp */
uint32 pawidth = PAWIDTH32; /* addr mask */
uint32 hst_p = 0; /* history pointer */
uint32 hst_lnt = 0; /* history length */
uint32 psw_reg_mask = 1; /* PSW reg mask */
InstHistory *hst = NULL; /* instruction history */
jmp_buf save_env; /* abort handler */
struct BlockIO blk_io; /* block I/O status */
@@ -565,10 +571,14 @@ MTAB cpu_mod[] = {
{ UNIT_MSIZE, 262144, NULL, "256K", &cpu_set_size },
{ UNIT_MSIZE, 524288, NULL, "512K", &cpu_set_size },
{ UNIT_MSIZE, 1048756, NULL, "1M", &cpu_set_size },
{ UNIT_TYPE, 0, "7/32, single precision fp", "732", NULL },
{ UNIT_8RS|UNIT_TYPE, 0, NULL, "732", NULL },
{ UNIT_DPFP, UNIT_DPFP, NULL, "DPFP", NULL },
{ UNIT_TYPE, 0, "7/32, single precision fp", "732", NULL },
{ UNIT_TYPE, UNIT_DPFP, "7/32, double precision fp", NULL, NULL },
{ UNIT_TYPE, UNIT_DPFP | UNIT_832, "8/32", "832", NULL },
{ UNIT_8RS|UNIT_TYPE, UNIT_8RS|UNIT_DPFP|UNIT_832, NULL, "832", NULL },
{ UNIT_8RS, 0, NULL, "2RS", NULL },
{ UNIT_8RS|UNIT_TYPE, UNIT_8RS|UNIT_DPFP|UNIT_832, "832, 8 register sets", NULL, NULL },
{ UNIT_8RS|UNIT_TYPE, UNIT_DPFP|UNIT_832, "832, 2 register sets", NULL, NULL },
{ MTAB_XTD|MTAB_VDV|MTAB_NMO, 0, NULL, "CONSINT",
&cpu_set_consint, NULL, NULL },
{ MTAB_XTD|MTAB_VDV|MTAB_NMO|MTAB_SHP, 0, "HISTORY", "HISTORY",
@@ -608,6 +618,8 @@ else {
fp_in_hwre = 0; /* fp in ucode */
dec_flgs = OP_DPF; /* sp only */
}
if (cpu_unit.flags & UNIT_8RS) psw_reg_mask = 7; /* 8 register sets */
else psw_reg_mask = 1; /* 2 register sets */
int_eval (); /* eval interrupts */
cc = newPSW (PSW & PSW_MASK); /* split PSW, eval wait */
sim_rtcn_init (lfc_unit.wait, TMR_LFC); /* init clock */
@@ -1223,7 +1235,7 @@ while (reason == 0) { /* loop until halted */
case 0x4D: /* DH - RXH */
opnd = opnd & DMASK16; /* force HW opnd */
if ((opnd == 0) || /* div by zero? */
((R[r1] == 0x80000000) && (opnd = 0xFFFF))) {
((R[r1] == 0x80000000) && (opnd == 0xFFFF))) {
if (PSW & PSW_AFI) /* div fault enabled? */
cc = exception (AFIPSW, cc, 0); /* exception */
break;

View File

@@ -1,6 +1,6 @@
/* id_defs.h: Interdata 16b/32b simulator definitions
Copyright (c) 2000-2005, Robert M. Supnik
Copyright (c) 2000-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"),
@@ -26,6 +26,7 @@
The author gratefully acknowledges the help of Carl Friend and Al Kossow,
who provided key documents about the Interdata product line.
09-Mar-06 RMS Increased register sets to architectural limit
25-Jan-04 RMS Removed local logging support
22-Sep-03 RMS Added additional instruction decode types
21-Jun-03 RMS Changed subroutine argument for ARM compiler conflict
@@ -65,9 +66,9 @@
#if defined (IFP_IN_MEM)
#define ReadFReg(r) (fp_in_hwre? \
F[(r) >> 1]: ReadF (((r) << 1) & ~3, P))
F[(r) >> 1]: ReadF (((r) << 1) & ~3, P))
#define WriteFReg(r,v) if (fp_in_hwre) F[(r) >> 1] = (v); \
else WriteF (((r) << 1) & ~3, (v), P)
else WriteF (((r) << 1) & ~3, (v), P)
#else
#define ReadFReg(r) (F[(r) >> 1])
#define WriteFReg(r,v) F[(r) >> 1] = (v)
@@ -114,13 +115,11 @@ typedef struct {
#define PSW_M_MAP 0xF
#define PSW_MAP (PSW_M_MAP << PSW_V_MAP)
#define PSW_V_REG 4 /* reg set, 32b */
#define PSW_M_REG 0x1
#define PSW_M_REG 0xF
#define PSW_ID4 0xF40F /* I3, I4 PSW */
#define PSW_x16 0xFF0F /* 7/16, 8/16 PSW */
#define PSW_816E 0xFFFF /* 8/16E PSW */
#define PSW_x32 0xFFFF /* 7/32, 8/32 PSW */
#define PSW_GETMAP(x) (((x) >> PSW_V_MAP) & PSW_M_MAP)
#define PSW_GETREG(x) (((x) >> PSW_V_REG) & PSW_M_REG)
#define MCKOPSW 0x20 /* mchk old PSW, 32b */
#define FPFPSW 0x28 /* flt fault PSW, 16b */

View File

@@ -655,7 +655,7 @@ sim> boot mt0
Breakpoint, PC: 00A00 (B A5E)
sim> d -w a10 0101 ; patch for TTY console
sim> d -h a10 0202 ; patch for TTY console
sim> att dm0 foo.dsk
sim> att dm1 foo1.dsk
sim> c
@@ -904,4 +904,8 @@ Bugs found
92. IDC: read with invalid head sets ACF, not DTE
93. DP, IDC: write with cylinder overflow advanced selch pointer
94. MT: read error must stop selector channel (if active)
95. IDC: xx000000 to controller or drive are NOP's, not invalid commands
96. IDC: WD/WH use standard Interdata write pointers
97. SELCH: GO preserves EXA and SSTA
98. CPU: DH overflow checking broken

File diff suppressed because it is too large Load Diff

View File

@@ -505,7 +505,7 @@ if (OP_DPFP (op)) { /* double precision? */
}
else {
WriteFReg (r1, hi);
}
}
return cc;
}
@@ -527,6 +527,6 @@ if (OP_DPFP (op)) { /* double precision? */
}
else {
WriteFReg (r1, fop->h);
}
}
return cc;
}

View File

@@ -1,6 +1,6 @@
/* id_idc.c: Interdata MSM/IDC disk controller simulator
Copyright (c) 2001-2005, Robert M. Supnik
Copyright (c) 2001-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,8 @@
idc MSM/IDC disk controller
03-Apr-06 RMS Fixed WD/WH handling (found by Davis Johnson)
30-Mar-06 RMS Fixed bug, nop command should be ignored (found by Davis Johnson)
25-Apr-03 RMS Revised for extended file support
16-Feb-03 RMS Fixed read to test transfer ok before selch operation
@@ -199,14 +201,16 @@ extern uint32 int_req[INTSZ], int_enb[INTSZ];
uint8 idcxb[IDC_NUMBY * 3]; /* xfer buffer */
uint32 idc_bptr = 0; /* buffer ptr */
uint32 idc_wdptr = 0; /* ctrl write data ptr */
uint32 idc_db = 0; /* ctrl buffer */
uint32 idd_db = 0; /* drive buffer */
uint32 idc_sta = 0; /* ctrl status */
uint32 idc_sec = 0; /* sector */
uint32 idc_hcyl = 0; /* head/cyl */
uint32 idc_svun = 0; /* most recent unit */
uint32 idc_1st = 0; /* first byte */
uint32 idc_arm = 0; /* ctrl armed */
uint32 idd_db = 0; /* drive buffer */
uint32 idd_wdptr = 0; /* drive write data ptr */
uint32 idd_arm[ID_NUMDR] = { 0 }; /* drives armed */
uint16 idd_dcy[ID_NUMDR] = { 0 }; /* desired cyl */
uint32 idd_sirq = 0; /* drive saved irq */
@@ -221,6 +225,7 @@ t_stat idc_svc (UNIT *uptr);
t_stat idc_reset (DEVICE *dptr);
t_stat idc_attach (UNIT *uptr, char *cptr);
t_stat idc_set_size (UNIT *uptr, int32 val, char *cptr, void *desc);
void idc_wd_byte (uint32 dat);
t_stat idc_rds (UNIT *uptr);
t_stat idc_wds (UNIT *uptr);
t_bool idc_dter (UNIT *uptr, uint32 first);
@@ -259,6 +264,8 @@ REG idc_reg[] = {
{ BRDATA (DBUF, idcxb, 16, 8, IDC_NUMBY * 3) },
{ HRDATA (DBPTR, idc_bptr, 10), REG_RO },
{ FLDATA (FIRST, idc_1st, 0) },
{ HRDATA (CWDPTR, idc_wdptr, 2) },
{ HRDATA (DWDPTR, idc_wdptr, 1) },
{ GRDATA (IREQ, int_req[l_IDC], 16, ID_NUMDR + 1, i_IDC) },
{ GRDATA (IENB, int_enb[l_IDC], 16, ID_NUMDR + 1, i_IDC) },
{ GRDATA (SIREQ, idd_sirq, 16, ID_NUMDR, i_IDC + 1), REG_RO },
@@ -358,11 +365,12 @@ switch (op) { /* case IO op */
return 0; /* return data */
case IO_WD: /* write data */
idc_sec = dat; /* sector */
idc_wd_byte (dat); /* one byte only */
break;
case IO_WH: /* write halfword */
idc_hcyl = dat; /* head/cylinder */
idc_wd_byte (dat >> 8); /* high byte */
idc_wd_byte (dat); /* low byte */
break;
case IO_SS: /* status */
@@ -372,15 +380,17 @@ switch (op) { /* case IO op */
case IO_OC: /* command */
idc_arm = int_chg (v_IDC, dat, idc_arm); /* upd int ctrl */
idc_wdptr = 0; /* init ptr */
f = dat & CMC_MASK; /* get cmd */
uptr = idc_dev.units + idc_svun; /* get unit */
if (f & CMC_CLR) { /* clear? */
idc_reset (&idc_dev); /* reset world */
break;
}
if (!(idc_sta & STC_IDL) || /* if !idle, */
sim_is_active (uptr) || /* unit busy, */
(f == CMC_EXP0)) break; /* expg, ignore */
if ((f == 0) || /* if nop, */
(f == CMC_EXP0) || /* expg, */
!(idc_sta & STC_IDL) || /* !idle, */
sim_is_active (uptr)) break; /* unit busy, ignore */
idc_sta = STA_BSY; /* bsy=1,idl,err=0 */
idc_1st = 1; /* xfr not started */
idc_bptr = 0; /* buffer empty */
@@ -394,11 +404,37 @@ switch (op) { /* case IO op */
return 0;
}
/* Process WD/WH data */
void idc_wd_byte (uint32 dat)
{
dat = dat & 0xFF;
switch (idc_wdptr) {
case 0: /* byte 0 = sector */
idc_sec = dat;
idc_wdptr++;
break;
case 1: /* byte 1 = high hd/cyl */
idc_hcyl = (idc_hcyl & 0xFF) | (dat << 8);
idc_wdptr++;
break;
case 2: /* byte 2 = low hd/cyl */
idc_hcyl = (idc_hcyl & 0xFF00) | dat;
idc_wdptr = 0;
break;
}
return;
}
/* Drives: IO routine */
uint32 id (uint32 dev, uint32 op, uint32 dat)
{
uint32 t, u;
uint32 t, u, f;
UNIT *uptr;
if (dev == idc_dib.dno) return idc (dev, op, dat); /* controller? */
@@ -408,15 +444,17 @@ switch (op) { /* case IO op */
case IO_ADR: /* select */
if (idc_sta & STC_IDL) idc_svun = u; /* idle? save unit */
return HW; /* byte only */
return BY; /* byte only */
case IO_RD: /* read data */
case IO_RH:
return 0;
case IO_WD: /* write data */
case IO_WH: /* write halfword */
idd_db = dat; /* save data */
if (idd_wdptr & 1) /* low byte? */
idd_db = (idd_db & 0xFF00) | dat;
else idd_db = (idd_db & 0xFF) | (dat << 8); /* no, high */
idd_wdptr = idd_wdptr ^ 1; /* other byte */
break;
case IO_SS: /* status */
@@ -430,12 +468,15 @@ switch (op) { /* case IO op */
case IO_OC: /* command */
idd_arm[u] = int_chg (v_IDC + u + 1, dat, idd_arm[u]);
idd_wdptr = 0; /* init ptr */
if (idd_arm[u] == 0) /* disarmed? */
idd_sirq &= ~(1 << (v_IDC + u + 1)); /* clr saved req */
if (sim_is_active (uptr) || /* if busy or */
!(idc_sta & STC_IDL)) break; /* !idle, ignore */
if ((dat & CMC_MASK) == CMDX_MASK) break; /* ignore 0x30 */
uptr->FNC = (dat & CMC_MASK) | CMC_DRV; /* save cmd */
f = dat & CMC_MASK; /* get cmd */
if ((f == 0) || /* if nop, */
(f == CMDX_MASK) || /* 0x30, */
!(idc_sta & STC_IDL) || /* !idle, */
sim_is_active (uptr)) break; /* unit busy, ignore */
uptr->FNC = f | CMC_DRV; /* save cmd */
idc_sta = idc_sta & ~STC_IDL; /* clr idle */
sim_activate (uptr, idc_ctime); /* schedule */
break;
@@ -687,6 +728,8 @@ uint32 u;
UNIT *uptr;
idc_sta = STC_IDL | STA_BSY; /* idle, busy */
idc_wdptr = 0;
idd_wdptr = 0;
idc_1st = 0; /* clear flag */
idc_svun = idc_db = 0; /* clear unit, buf */
idc_sec = 0; /* clear addr */

View File

@@ -1,6 +1,6 @@
/* id_io.c: Interdata CPU-independent I/O routines
Copyright (c) 2001-2005, Robert M. Supnik
Copyright (c) 2001-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"),
@@ -23,6 +23,7 @@
used in advertising or otherwise to promote the sale, use or other dealings
in this Software without prior written authorization from Robert M Supnik.
30-Mar-06 RMS Fixed bug, GO preserves EXA and SSTA (found by Davis Johnson)
21-Jun-03 RMS Changed subroutine argument for ARM compiler conflict
Interdata I/O devices are defined by a device information block:
@@ -209,7 +210,7 @@ switch (op) { /* case IO op */
sch_wdc[ch] = 0;
}
else if (dat & SCHC_GO) { /* go? */
sch_cmd[ch] = dat & (SCHC_GO | SCHC_RD);
sch_cmd[ch] = dat & (SCHC_EXA | SCHC_SSTA| SCHC_GO | SCHC_RD);
if (sch_wdc[ch] <= 4) { /* 4 bytes? */
sch_sa[ch] = (sch_sa[ch] & PAMASK16) | bank; /* 16b addr */
sch_ea[ch] = (sch_ea[ch] & PAMASK16) | bank;

View File

@@ -1,6 +1,6 @@
/* id_mt.c: Interdata magnetic tape simulator
Copyright (c) 2001-2005, Robert M Supnik
Copyright (c) 2001-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 M46-494 dual density 9-track magtape controller
16-Feb-06 RMS Added tape capacity checking
18-Mar-05 RMS Added attached test to detach routine
07-Dec-04 RMS Added read-only file support
25-Apr-03 RMS Revised for extended file support
@@ -153,6 +154,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, "DEVNO", "DEVNO",
&set_dev, &show_dev, NULL },
{ MTAB_XTD|MTAB_VDV, 0, "SELCH", "SELCH",
@@ -260,6 +263,7 @@ uint32 i;
int32 u = uptr - mt_dev.units;
uint32 dev = mt_dib.dno + (u * o_MT0);
t_mtrlnt tbc;
t_bool passed_eot;
t_stat st, r = SCPE_OK;
if ((uptr->flags & UNIT_ATT) == 0) { /* not attached? */
@@ -273,7 +277,7 @@ if ((uptr->flags & UNIT_ATT) == 0) { /* not attached? */
if (uptr->UCMD & MTC_STOP2) { /* stop, gen NMTN? */
uptr->UCMD = 0; /* clr cmd */
uptr->UST = STA_NMTN; /* set nmtn, not eot */
uptr->UST = uptr->UST | STA_NMTN; /* set nmtn */
mt_xfr = 0; /* clr xfr */
if (mt_arm[u]) SET_INT (v_MT + u); /* set intr */
return SCPE_OK;
@@ -287,6 +291,7 @@ if (uptr->UCMD & MTC_STOP1) { /* stop, gen EOM? */
return SCPE_OK;
}
passed_eot = sim_tape_eot (uptr); /* passed EOT? */
switch (uptr->UCMD) { /* case on function */
case MTC_REW: /* rewind */
@@ -388,6 +393,8 @@ switch (uptr->UCMD) { /* case on function */
break;
} /* end case */
if (!passed_eot && sim_tape_eot (uptr)) /* just passed EOT? */
uptr->UST = uptr->UST | STA_EOT;
uptr->UCMD = uptr->UCMD | MTC_STOP1; /* set stop stage 1 */
sim_activate (uptr, mt_rtime); /* schedule */
return r;