mirror of
https://github.com/simh/simh.git
synced 2026-04-28 12:47:25 +00:00
Notes For V3.3
RESTRICTION: The HP DS disk is not debugged. DO NOT enable this feature for normal operations. WARNING: Massive changes in the PDP-11 make all previous SAVEd file obsolete. Do not attempt to use a PDP-11 SAVE file from a prior release with V3.3! 1. New Features in 3.3 1.1 SCP - Added -p (powerup) qualifier to RESET - Changed SET <unit> ONLINE/OFFLINE to SET <unit> ENABLED/DISABLED - Moved SET DEBUG under SET CONSOLE hierarchy - Added optional parameter value to SHOW command - Added output file option to SHOW command 1.2 PDP-11 - Separated RH Massbus adapter from RP controller - Added TU tape support - Added model emulation framework - Added model details 1.3 VAX - Separated out CVAX-specific features from core instruction simulator - Implemented capability for CIS, octaword, compatibility mode instructions - Added instruction display and parse for compatibility mode - Changed SET CPU VIRTUAL=n to SHOW CPU VIRTUAL=n - Added =n optional parameter to SHOW CPU HISTORY 1.4 Unibus/Qbus simulators (PDP-11, VAX, PDP-10) - Simplified DMA API's - Modified DMA peripherals to use simplified API's 1.5 HP2100 (all changes from Dave Bryan) CPU - moved MP into its own device; added MP option jumpers - modified DMA to allow disabling - modified SET CPU 2100/2116 to truncate memory > 32K - added -F switch to SET CPU to force memory truncation - modified WRU to be REG_HRO - added BRK and DEL to save console settings DR - provided protected tracks and "Writing Enabled" status bit - added "parity error" status return on writes for 12606 - added track origin test for 12606 - added SCP test for 12606 - added "Sector Flag" status bit - added "Read Inhibit" status bit for 12606 - added TRACKPROT modifier LPS - added SET OFFLINE/ONLINE, POWEROFF/POWERON - added fast/realistic timing - added debug printouts LPT - added SET OFFLINE/ONLINE, POWEROFF/POWERON PTR - added paper tape loop mode, DIAG/READER modifiers to PTR - added PV_LEFT to PTR TRLLIM register CLK - modified CLK to permit disable 1.6 IBM 1401, IBM 1620, Interdata 16b, SDS 940, PDP-10 - Added instruction history 1.7 H316, PDP-15, PDP-8 - Added =n optional value to SHOW CPU HISTORY 2. Bugs Fixed in 3.3 2.1 SCP - Fixed comma-separated SET options (from Dave Bryan) - Fixed duplicate HELP displays with user-specified commands 2.2 PDP-10 - Replicated RP register state per drive - Fixed TU to set FCE on short record - Fixed TU to return bit<15> in drive type - Fixed TU format specification, 1:0 are don't cares - Fixed TU handling of TMK status - Fixed TU handling of DONE, ATA at end of operation - Implemented TU write check 2.3 PDP-11 - Replicated RP register state per drive - Fixed RQ, TQ to report correct controller type and stage 1 configuration flags on a Unibus system - Fixed HK CS2<output_ready> flag 2.4 VAX - Fixed parsing of indirect displacement modes in instruction input 2.5 HP2100 (all fixes from Dave Bryan) CPU - fixed S-register behavior on 2116 - fixed LIx/MIx behavior for DMA on 2116 and 2100 - fixed LIx/MIx behavior for empty I/O card slots DP - fixed enable/disable from either device - fixed ANY ERROR status for 12557A interface - fixed unattached drive status for 12557A interface - status cmd without prior STC DC now completes (12557A) - OTA/OTB CC on 13210A interface also does CLC CC - fixed RAR model - fixed seek check on 13210 if sector out of range DQ - fixed enable/disable from either device - shortened xtime from 5 to 3 (drive avg 156KW/second) - fixed not ready/any error status - fixed RAR model DR - fixed enable/disable from either device - fixed sector return in status word - fixed DMA last word write, incomplete sector fill value - fixed 12610 SFC operation - fixed current-sector determination IPL - fixed enable/disable from either device LPS - fixed status returns for error conditions - fixed handling of non-printing characters - fixed handling of characters after column 80 - improved timing model accuracy for RTE LPT - fixed status returns for error conditions - fixed TOF handling so form remains on line 0 SYS - fixed display of CCA/CCB/CCE instructions 2.5 PDP-15 FPP - fixed URFST to mask low 9b of fraction - fixed exception PC setting
This commit is contained in:
committed by
Mark Pizzolato
parent
2e00e1122f
commit
b6393b36b4
@@ -26,6 +26,7 @@
|
||||
This CPU module incorporates code and comments from the 1620 simulator by
|
||||
Geoff Kuenning, with his permission.
|
||||
|
||||
07-Nov-04 RMS Added instruction history
|
||||
26-Mar-04 RMS Fixed warnings with -std=c99
|
||||
02-Nov-03 RMS Fixed bug in branch digit (found by Dave Babcock)
|
||||
21-Aug-03 RMS Fixed bug in immediate index add (found by Michael Short)
|
||||
@@ -98,6 +99,14 @@
|
||||
#define PCQ_MASK (PCQ_SIZE - 1)
|
||||
#define PCQ_ENTRY pcq[pcq_p = (pcq_p - 1) & PCQ_MASK] = saved_PC
|
||||
|
||||
#define HIST_PC 0x40000000
|
||||
#define HIST_MIN 64
|
||||
#define HIST_MAX 65536
|
||||
struct InstHistory {
|
||||
uint16 vld;
|
||||
uint16 pc;
|
||||
uint8 inst[INST_LEN]; };
|
||||
|
||||
uint8 M[MAXMEMSIZE] = { 0 }; /* main memory */
|
||||
uint32 saved_PC = 0; /* saved PC */
|
||||
uint32 IR2 = 1; /* inst reg 2 */
|
||||
@@ -113,6 +122,9 @@ int32 ind_max = 16; /* iadr nest limit */
|
||||
uint16 pcq[PCQ_SIZE] = { 0 }; /* PC queue */
|
||||
int32 pcq_p = 0; /* PC queue ptr */
|
||||
REG *pcq_r = NULL; /* PC queue reg ptr */
|
||||
int32 hst_p = 0; /* history pointer */
|
||||
int32 hst_lnt = 0; /* history length */
|
||||
struct InstHistory *hst = NULL; /* instruction history */
|
||||
uint8 ind[NUM_IND] = { 0 }; /* indicators */
|
||||
|
||||
extern int32 sim_int_char;
|
||||
@@ -129,6 +141,8 @@ t_stat cpu_set_model (UNIT *uptr, int32 val, char *cptr, void *desc);
|
||||
t_stat cpu_set_size (UNIT *uptr, int32 val, char *cptr, void *desc);
|
||||
t_stat cpu_set_save (UNIT *uptr, int32 val, char *cptr, void *desc);
|
||||
t_stat cpu_set_table (UNIT *uptr, int32 val, char *cptr, void *desc);
|
||||
t_stat cpu_set_hist (UNIT *uptr, int32 val, char *cptr, void *desc);
|
||||
t_stat cpu_show_hist (FILE *st, UNIT *uptr, int32 val, void *desc);
|
||||
|
||||
int32 get_2d (uint32 ad);
|
||||
t_stat get_addr (uint32 alast, int32 lnt, t_bool indexok, uint32 *addr);
|
||||
@@ -228,6 +242,8 @@ MTAB cpu_mod[] = {
|
||||
{ UNIT_MSIZE, 60000, NULL, "60K", &cpu_set_size },
|
||||
{ UNIT_MSIZE, 0, NULL, "SAVE", &cpu_set_save },
|
||||
{ UNIT_MSIZE, 0, NULL, "TABLE", &cpu_set_table },
|
||||
{ MTAB_XTD|MTAB_VDV|MTAB_NMO|MTAB_SHP, 0, "HISTORY", "HISTORY",
|
||||
&cpu_set_hist, &cpu_show_hist },
|
||||
{ 0 } };
|
||||
|
||||
DEVICE cpu_dev = {
|
||||
@@ -484,6 +500,16 @@ if (flags & (IF_VQA | IF_4QA | IF_NQX)) { /* need Q? */
|
||||
reason = reason + (STOP_INVQDG - STOP_INVPDG);
|
||||
break; } }
|
||||
else if (flags & IF_IMM) QAR = qla; /* immediate? */
|
||||
|
||||
if (hst_lnt) { /* history enabled? */
|
||||
hst_p = (hst_p + 1); /* next entry */
|
||||
if (hst_p >= hst_lnt) hst_p = 0;
|
||||
hst[hst_p].vld = 1;
|
||||
hst[hst_p].pc = PC;
|
||||
for (i = 0; i < INST_LEN; i++)
|
||||
hst[hst_p].inst[i] = M[(PC + i) % MEMSIZE];
|
||||
}
|
||||
|
||||
PC = PC + INST_LEN; /* advance PC */
|
||||
switch (op) { /* case on op */
|
||||
|
||||
@@ -1884,3 +1910,65 @@ if (((cpu_unit.flags & IF_MII) == 0) || val) { /* set add table */
|
||||
M[ADD_TABLE + i] = std_add_table[i]; }
|
||||
return SCPE_OK;
|
||||
}
|
||||
|
||||
/* Set history */
|
||||
|
||||
t_stat cpu_set_hist (UNIT *uptr, int32 val, char *cptr, void *desc)
|
||||
{
|
||||
int32 i, lnt;
|
||||
t_stat r;
|
||||
|
||||
if (cptr == NULL) {
|
||||
for (i = 0; i < hst_lnt; i++) hst[i].vld = 0;
|
||||
hst_p = 0;
|
||||
return SCPE_OK; }
|
||||
lnt = (int32) get_uint (cptr, 10, HIST_MAX, &r);
|
||||
if ((r != SCPE_OK) || (lnt && (lnt < HIST_MIN))) return SCPE_ARG;
|
||||
hst_p = 0;
|
||||
if (hst_lnt) {
|
||||
free (hst);
|
||||
hst_lnt = 0;
|
||||
hst = NULL; }
|
||||
if (lnt) {
|
||||
hst = calloc (sizeof (struct InstHistory), lnt);
|
||||
if (hst == NULL) return SCPE_MEM;
|
||||
hst_lnt = lnt; }
|
||||
return SCPE_OK;
|
||||
}
|
||||
|
||||
/* Show history */
|
||||
|
||||
t_stat cpu_show_hist (FILE *st, UNIT *uptr, int32 val, void *desc)
|
||||
{
|
||||
int32 i, k, di, lnt;
|
||||
char *cptr = (char *) desc;
|
||||
t_value sim_eval[INST_LEN];
|
||||
t_stat r;
|
||||
struct InstHistory *h;
|
||||
extern t_stat fprint_sym (FILE *ofile, t_addr addr, t_value *val,
|
||||
UNIT *uptr, int32 sw);
|
||||
|
||||
if (hst_lnt == 0) return SCPE_NOFNC; /* enabled? */
|
||||
if (cptr) {
|
||||
lnt = (int32) get_uint (cptr, 10, hst_lnt, &r);
|
||||
if ((r != SCPE_OK) || (lnt == 0)) return SCPE_ARG; }
|
||||
else lnt = hst_lnt;
|
||||
di = hst_p - lnt; /* work forward */
|
||||
if (di < 0) di = di + hst_lnt;
|
||||
fprintf (st, "PC IR\n\n");
|
||||
for (k = 0; k < lnt; k++) { /* print specified */
|
||||
h = &hst[(++di) % hst_lnt]; /* entry pointer */
|
||||
if (h->vld) { /* instruction? */
|
||||
fprintf (st, "%05d ", h->pc);
|
||||
for (i = 0; i < INST_LEN; i++)
|
||||
sim_eval[i] = h->inst[i];
|
||||
if ((fprint_sym (st, h->pc, sim_eval, &cpu_unit, SWMASK ('M'))) > 0) {
|
||||
fprintf (st, "(undefined)");
|
||||
for (i = 0; i < INST_LEN; i++)
|
||||
fprintf (st, "% 02X", h->inst[i]);
|
||||
}
|
||||
fputc ('\n', st); /* end line */
|
||||
} /* end else instruction */
|
||||
} /* end for */
|
||||
return SCPE_OK;
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
To: Users
|
||||
From: Bob Supnik
|
||||
Subj: IBM 1620 Simulator Usage
|
||||
Date: 15-Feb-2004
|
||||
Date: 15-Nov-2004
|
||||
|
||||
COPYRIGHT NOTICE
|
||||
|
||||
@@ -188,6 +188,17 @@ interrupt system.
|
||||
most recent IR1 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 Console Typewriter (TTY)
|
||||
|
||||
The console typewriter (TTY) is a half-duplex console. The typewriter
|
||||
@@ -361,7 +372,7 @@ pack options include the ability to enable address writing (formatting).
|
||||
SET DPn ADDROFF set unit n address enable off
|
||||
SET DPn ADDRON set unit n address enable on
|
||||
|
||||
Units can also be set ONLINE or OFFLINE.
|
||||
Units can also be set ENABLED or DISABLED.
|
||||
|
||||
Unlike most simulated disks, the 1311 includes explicit representation
|
||||
for sector addresses. This is to support non-standard formats, such as
|
||||
|
||||
@@ -219,8 +219,8 @@ return STOP_RWRAP;
|
||||
|
||||
t_stat tti_rnum (int8 *c)
|
||||
{
|
||||
int8 flg = 0;
|
||||
char *cp, raw;
|
||||
int8 raw, flg = 0;
|
||||
char *cp;
|
||||
t_stat r;
|
||||
|
||||
*c = -1; /* no char yet */
|
||||
@@ -240,7 +240,7 @@ return SCPE_OK;
|
||||
|
||||
t_stat tti_ralp (int8 *c)
|
||||
{
|
||||
char raw;
|
||||
int8 raw;
|
||||
t_stat r;
|
||||
|
||||
*c = -1; /* no char yet */
|
||||
|
||||
Reference in New Issue
Block a user