mirror of
https://github.com/simh/simh.git
synced 2026-04-27 20:38:04 +00:00
Notes For V3.5-0
The source set has been extensively overhauled. For correct viewing, set Visual C++ or Emacs to have tab stops every 4 characters. 1. New Features in 3.4-1 1.1 All Ethernet devices - Added Windows user-defined adapter names (from Timothe Litt) 1.2 Interdata, SDS, HP, PDP-8, PDP-18b terminal multiplexors - Added support for SET <unit>n DISCONNECT 1.3 VAX - Added latent QDSS support - Revised autoconfigure to handle QDSS 1.4 PDP-11 - Revised autoconfigure to handle more casees 2. Bugs Fixed in 3.4-1 2.1 SCP and libraries - Trim trailing spaces on all input (for example, attach file names) - Fixed sim_sock spurious SIGPIPE error in Unix/Linux - Fixed sim_tape misallocation of TPC map array for 64b simulators 2.2 1401 - Fixed bug, CPU reset was clearing SSB through SSG 2.3 PDP-11 - Fixed bug in VH vector display routine - Fixed XU runt packet processing (found by Tim Chapman) 2.4 Interdata - Fixed bug in SHOW PAS CONN/STATS - Fixed potential integer overflow exception in divide 2.5 SDS - Fixed bug in SHOW MUX CONN/STATS 2.6 HP - Fixed bug in SHOW MUX CONN/STATS 2.7 PDP-8 - Fixed bug in SHOW TTIX CONN/STATS - Fixed bug in SET/SHOW TTOXn LOG 2.8 PDP-18b - Fixed bug in SHOW TTIX CONN/STATS - Fixed bug in SET/SHOW TTOXn LOG 2.9 Nova, Eclipse - Fixed potential integer overflow exception in divide
This commit is contained in:
committed by
Mark Pizzolato
parent
ec60bbf329
commit
b7c1eae41f
154
PDP8/pdp8_clk.c
154
PDP8/pdp8_clk.c
@@ -1,6 +1,6 @@
|
||||
/* pdp8_clk.c: PDP-8 real-time clock simulator
|
||||
|
||||
Copyright (c) 1993-2004, 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"),
|
||||
@@ -19,18 +19,18 @@
|
||||
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
|
||||
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.
|
||||
|
||||
clk real time clock
|
||||
clk real time clock
|
||||
|
||||
01-Mar-03 RMS Aded SET/SHOW CLK FREQ support
|
||||
04-Oct-02 RMS Added DIB, device number support
|
||||
30-Dec-01 RMS Removed for generalized timers
|
||||
05-Sep-01 RMS Added terminal multiplexor support
|
||||
17-Jul-01 RMS Moved function prototype
|
||||
05-Mar-01 RMS Added clock calibration support
|
||||
01-Mar-03 RMS Aded SET/SHOW CLK FREQ support
|
||||
04-Oct-02 RMS Added DIB, device number support
|
||||
30-Dec-01 RMS Removed for generalized timers
|
||||
05-Sep-01 RMS Added terminal multiplexor support
|
||||
17-Jul-01 RMS Moved function prototype
|
||||
05-Mar-01 RMS Added clock calibration support
|
||||
|
||||
Note: includes the IOT's for both the PDP-8/E and PDP-8/A clocks
|
||||
*/
|
||||
@@ -39,8 +39,8 @@
|
||||
|
||||
extern int32 int_req, int_enable, dev_done, stop_inst;
|
||||
|
||||
int32 clk_tps = 60; /* ticks/second */
|
||||
int32 tmxr_poll = 16000; /* term mux poll */
|
||||
int32 clk_tps = 60; /* ticks/second */
|
||||
int32 tmxr_poll = 16000; /* term mux poll */
|
||||
|
||||
int32 clk (int32 IR, int32 AC);
|
||||
t_stat clk_svc (UNIT *uptr);
|
||||
@@ -50,9 +50,9 @@ t_stat clk_show_freq (FILE *st, UNIT *uptr, int32 val, void *desc);
|
||||
|
||||
/* CLK data structures
|
||||
|
||||
clk_dev CLK device descriptor
|
||||
clk_unit CLK unit descriptor
|
||||
clk_reg CLK register list
|
||||
clk_dev CLK device descriptor
|
||||
clk_unit CLK unit descriptor
|
||||
clk_reg CLK register list
|
||||
*/
|
||||
|
||||
DIB clk_dib = { DEV_CLK, 1, { &clk } };
|
||||
@@ -60,30 +60,33 @@ DIB clk_dib = { DEV_CLK, 1, { &clk } };
|
||||
UNIT clk_unit = { UDATA (&clk_svc, 0, 0), 16000 };
|
||||
|
||||
REG clk_reg[] = {
|
||||
{ FLDATA (DONE, dev_done, INT_V_CLK) },
|
||||
{ FLDATA (ENABLE, int_enable, INT_V_CLK) },
|
||||
{ FLDATA (INT, int_req, INT_V_CLK) },
|
||||
{ DRDATA (TIME, clk_unit.wait, 24), REG_NZ + PV_LEFT },
|
||||
{ DRDATA (TPS, clk_tps, 8), PV_LEFT + REG_HRO },
|
||||
{ NULL } };
|
||||
{ FLDATA (DONE, dev_done, INT_V_CLK) },
|
||||
{ FLDATA (ENABLE, int_enable, INT_V_CLK) },
|
||||
{ FLDATA (INT, int_req, INT_V_CLK) },
|
||||
{ DRDATA (TIME, clk_unit.wait, 24), REG_NZ + PV_LEFT },
|
||||
{ DRDATA (TPS, clk_tps, 8), PV_LEFT + REG_HRO },
|
||||
{ NULL }
|
||||
};
|
||||
|
||||
MTAB clk_mod[] = {
|
||||
{ MTAB_XTD|MTAB_VDV, 50, NULL, "50HZ",
|
||||
&clk_set_freq, NULL, NULL },
|
||||
{ MTAB_XTD|MTAB_VDV, 60, NULL, "60HZ",
|
||||
&clk_set_freq, NULL, NULL },
|
||||
{ MTAB_XTD|MTAB_VDV, 0, "FREQUENCY", NULL,
|
||||
NULL, &clk_show_freq, NULL },
|
||||
{ MTAB_XTD|MTAB_VDV, 0, "DEVNO", NULL, NULL, &show_dev },
|
||||
{ 0 } };
|
||||
{ MTAB_XTD|MTAB_VDV, 50, NULL, "50HZ",
|
||||
&clk_set_freq, NULL, NULL },
|
||||
{ MTAB_XTD|MTAB_VDV, 60, NULL, "60HZ",
|
||||
&clk_set_freq, NULL, NULL },
|
||||
{ MTAB_XTD|MTAB_VDV, 0, "FREQUENCY", NULL,
|
||||
NULL, &clk_show_freq, NULL },
|
||||
{ MTAB_XTD|MTAB_VDV, 0, "DEVNO", NULL, NULL, &show_dev },
|
||||
{ 0 }
|
||||
};
|
||||
|
||||
DEVICE clk_dev = {
|
||||
"CLK", &clk_unit, clk_reg, clk_mod,
|
||||
1, 0, 0, 0, 0, 0,
|
||||
NULL, NULL, &clk_reset,
|
||||
NULL, NULL, NULL,
|
||||
&clk_dib, 0 };
|
||||
|
||||
"CLK", &clk_unit, clk_reg, clk_mod,
|
||||
1, 0, 0, 0, 0, 0,
|
||||
NULL, NULL, &clk_reset,
|
||||
NULL, NULL, NULL,
|
||||
&clk_dib, 0
|
||||
};
|
||||
|
||||
/* IOT routine
|
||||
|
||||
IOT's 6131-6133 are the PDP-8/E clock
|
||||
@@ -92,34 +95,43 @@ DEVICE clk_dev = {
|
||||
|
||||
int32 clk (int32 IR, int32 AC)
|
||||
{
|
||||
switch (IR & 07) { /* decode IR<9:11> */
|
||||
case 1: /* CLEI */
|
||||
int_enable = int_enable | INT_CLK; /* enable clk ints */
|
||||
int_req = INT_UPDATE; /* update interrupts */
|
||||
return AC;
|
||||
case 2: /* CLDI */
|
||||
int_enable = int_enable & ~INT_CLK; /* disable clk ints */
|
||||
int_req = int_req & ~INT_CLK; /* update interrupts */
|
||||
return AC;
|
||||
case 3: /* CLSC */
|
||||
if (dev_done & INT_CLK) { /* flag set? */
|
||||
dev_done = dev_done & ~INT_CLK; /* clear flag */
|
||||
int_req = int_req & ~INT_CLK; /* clear int req */
|
||||
return IOT_SKP + AC; }
|
||||
return AC;
|
||||
case 5: /* CLLE */
|
||||
if (AC & 1) int_enable = int_enable | INT_CLK; /* test AC<11> */
|
||||
else int_enable = int_enable & ~INT_CLK;
|
||||
int_req = INT_UPDATE; /* update interrupts */
|
||||
return AC;
|
||||
case 6: /* CLCL */
|
||||
dev_done = dev_done & ~INT_CLK; /* clear flag */
|
||||
int_req = int_req & ~INT_CLK; /* clear int req */
|
||||
return AC;
|
||||
case 7: /* CLSK */
|
||||
return (dev_done & INT_CLK)? IOT_SKP + AC: AC;
|
||||
default:
|
||||
return (stop_inst << IOT_V_REASON) + AC; } /* end switch */
|
||||
switch (IR & 07) { /* decode IR<9:11> */
|
||||
|
||||
case 1: /* CLEI */
|
||||
int_enable = int_enable | INT_CLK; /* enable clk ints */
|
||||
int_req = INT_UPDATE; /* update interrupts */
|
||||
return AC;
|
||||
|
||||
case 2: /* CLDI */
|
||||
int_enable = int_enable & ~INT_CLK; /* disable clk ints */
|
||||
int_req = int_req & ~INT_CLK; /* update interrupts */
|
||||
return AC;
|
||||
|
||||
case 3: /* CLSC */
|
||||
if (dev_done & INT_CLK) { /* flag set? */
|
||||
dev_done = dev_done & ~INT_CLK; /* clear flag */
|
||||
int_req = int_req & ~INT_CLK; /* clear int req */
|
||||
return IOT_SKP + AC;
|
||||
}
|
||||
return AC;
|
||||
|
||||
case 5: /* CLLE */
|
||||
if (AC & 1) int_enable = int_enable | INT_CLK; /* test AC<11> */
|
||||
else int_enable = int_enable & ~INT_CLK;
|
||||
int_req = INT_UPDATE; /* update interrupts */
|
||||
return AC;
|
||||
|
||||
case 6: /* CLCL */
|
||||
dev_done = dev_done & ~INT_CLK; /* clear flag */
|
||||
int_req = int_req & ~INT_CLK; /* clear int req */
|
||||
return AC;
|
||||
|
||||
case 7: /* CLSK */
|
||||
return (dev_done & INT_CLK)? IOT_SKP + AC: AC;
|
||||
|
||||
default:
|
||||
return (stop_inst << IOT_V_REASON) + AC;
|
||||
} /* end switch */
|
||||
}
|
||||
|
||||
/* Unit service */
|
||||
@@ -128,11 +140,11 @@ t_stat clk_svc (UNIT *uptr)
|
||||
{
|
||||
int32 t;
|
||||
|
||||
dev_done = dev_done | INT_CLK; /* set done */
|
||||
int_req = INT_UPDATE; /* update interrupts */
|
||||
t = sim_rtcn_calb (clk_tps, TMR_CLK); /* calibrate clock */
|
||||
sim_activate (&clk_unit, t); /* reactivate unit */
|
||||
tmxr_poll = t; /* set mux poll */
|
||||
dev_done = dev_done | INT_CLK; /* set done */
|
||||
int_req = INT_UPDATE; /* update interrupts */
|
||||
t = sim_rtcn_calb (clk_tps, TMR_CLK); /* calibrate clock */
|
||||
sim_activate (&clk_unit, t); /* reactivate unit */
|
||||
tmxr_poll = t; /* set mux poll */
|
||||
return SCPE_OK;
|
||||
}
|
||||
|
||||
@@ -140,10 +152,10 @@ return SCPE_OK;
|
||||
|
||||
t_stat clk_reset (DEVICE *dptr)
|
||||
{
|
||||
dev_done = dev_done & ~INT_CLK; /* clear done, int */
|
||||
dev_done = dev_done & ~INT_CLK; /* clear done, int */
|
||||
int_req = int_req & ~INT_CLK;
|
||||
int_enable = int_enable & ~INT_CLK; /* clear enable */
|
||||
sim_activate (&clk_unit, clk_unit.wait); /* activate unit */
|
||||
int_enable = int_enable & ~INT_CLK; /* clear enable */
|
||||
sim_activate (&clk_unit, clk_unit.wait); /* activate unit */
|
||||
return SCPE_OK;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user