diff --git a/PDP10/pdp10_cpu.c b/PDP10/pdp10_cpu.c index 2e08155e..60e00e9f 100644 --- a/PDP10/pdp10_cpu.c +++ b/PDP10/pdp10_cpu.c @@ -194,7 +194,6 @@ int32 stop_op0 = 0; /* stop on 0 */ int32 rlog = 0; /* extend fixup log */ int32 ind_max = 0; /* nested ind limit */ int32 xct_max = 0; /* nested XCT limit */ -int32 t20_idlelock = 0; /* TOPS-20 idle lock */ a10 pcq[PCQ_SIZE] = { 0 }; /* PC queue */ int32 pcq_p = 0; /* PC queue ptr */ REG *pcq_r = NULL; /* PC queue reg ptr */ @@ -650,7 +649,6 @@ rlog = 0; /* not in extend */ pi_eval (); /* eval pi system */ if (!Q_ITS) /* ~ITS, clr 1-proc */ its_1pr = 0; -t20_idlelock = 0; /* clr T20 idle lock */ /* Abort handling @@ -1153,7 +1151,7 @@ case 0341: AOJ; if (TL (AC(ac))) JUMP (ea); break; /* AOJL */ case 0342: AOJ; if (TE (AC(ac))) JUMP (ea); break; /* AOJE */ case 0343: AOJ; if (TLE (AC(ac))) JUMP (ea); break; /* AOJLE */ case 0344: AOJ; JUMP(ea); /* AOJA */ - if (Q_ITS && Q_IDLE && /* ITS idle? */ + if (Q_ITS && /* ITS idle? */ TSTF (F_USR) && (pager_PC == 017) && /* user mode, loc 17? */ (ac == 0) && (ea == 017)) /* AOJA 0,17? */ sim_idle (0, FALSE); @@ -1177,19 +1175,13 @@ case 0364: SOJ; JUMP(ea); break; /* SOJA */ case 0365: SOJ; if (TGE (AC(ac))) JUMP (ea); break; /* SOJGE */ case 0366: SOJ; if (TN (AC(ac))) JUMP (ea); break; /* SOJN */ case 0367: SOJ; if (TG (AC(ac))) JUMP (ea); /* SOJG */ - if ((ea == pager_PC) && Q_IDLE) { /* to self, idle enab? */ - extern int32 tmr_poll; + if (ea == pager_PC) { /* to self? */ if ((ac == 6) && (ea == 1) && /* SOJG 6,1? */ TSTF (F_USR) && Q_T10) /* T10, user mode? */ - sim_idle (0, FALSE); - else if (!t20_idlelock && /* interlock off? */ - (ac == 2) && (ea == 3) && /* SOJG 2,3? */ - !TSTF (F_USR) && Q_T20 && /* T20, mon mode? */ - (sim_interval > (tmr_poll >> 1))) { /* >= half clock? */ - t20_idlelock = 1; /* set interlock */ - if (sim_os_ms_sleep (1)) /* sleep 1ms */ - sim_interval = 0; /* if ok, sched event */ - } + sim_idle (0, FALSE); /* idle */ + else if ((ac == 2) && (ea == 3) && /* SOJG 2,3? */ + !TSTF (F_USR) && Q_T20) /* T20, mon mode? */ + sim_idle (0, FALSE); /* idle */ } break; case 0370: SOS; break; /* SOS */ diff --git a/PDP10/pdp10_defs.h b/PDP10/pdp10_defs.h index fa37e24b..e6a86309 100644 --- a/PDP10/pdp10_defs.h +++ b/PDP10/pdp10_defs.h @@ -140,7 +140,6 @@ typedef t_int64 d10; /* PDP-10 data (36b) */ #define Q_ITS (cpu_unit.flags & UNIT_ITS) #define Q_T20 (cpu_unit.flags & UNIT_T20) #define Q_KLAD (cpu_unit.flags & UNIT_KLAD) -#define Q_IDLE (sim_idle_enab) /* Architectural constants */ diff --git a/PDP10/pdp10_tim.c b/PDP10/pdp10_tim.c index b0f0cd9b..708bfc00 100644 --- a/PDP10/pdp10_tim.c +++ b/PDP10/pdp10_tim.c @@ -132,7 +132,6 @@ static d10 tim_new_period = 0; /* period for the next i static int32 tim_mult; /* Multiple of interval timer period at which tmxr is polled */ d10 quant = 0; /* ITS quantum */ -static int32 tim_t20_prob = 33; /* TOPS-20 prob */ /* Exported variables - initialized by set CPU model and reset */ @@ -144,7 +143,6 @@ extern int32 apr_flg, pi_act; extern UNIT cpu_unit; extern d10 pcst; extern a10 pager_PC; -extern int32 t20_idlelock; static t_stat tcu_rd (int32 *data, int32 PA, int32 access); static t_stat tim_svc (UNIT *uptr); @@ -175,7 +173,6 @@ static REG tim_reg[] = { { ORDATAD (PERIOD, tim_period, 36, "reset value for interval") }, { ORDATAD (QUANT, quant, 36, "quantum timer (ITS only)") }, { DRDATAD (TIME, tim_unit.wait, 24, "tick delay"), REG_NZ + PV_LEFT }, - { DRDATA (PROB, tim_t20_prob, 6), REG_NZ + PV_LEFT + REG_HIDDEN }, { DRDATA (POLL, tmr_poll, 32), REG_HRO + PV_LEFT }, { DRDATA (MUXPOLL, tmxr_poll, 32), REG_HRO + PV_LEFT }, { DRDATA (MULT, tim_mult, 6), REG_HRO + PV_LEFT }, @@ -341,12 +338,14 @@ return FALSE; static t_stat tim_svc (UNIT *uptr) { -if (cpu_unit.flags & UNIT_KLAD) /* diags? */ +if (cpu_unit.flags & UNIT_KLAD) { /* diags? */ tmr_poll = uptr->wait; /* fixed clock */ -else + sim_activate (uptr, tmr_poll); /* reactivate unit */ + } +else { tmr_poll = sim_rtc_calb (clk_tps); /* else calibrate */ - -sim_activate (uptr, tmr_poll); /* reactivate unit */ + sim_activate_after (uptr, 1000000/clk_tps); /* reactivate unit */ + } tmxr_poll = tmr_poll * tim_mult; /* set mux poll */ tim_incr_base (tim_base, tim_period); /* incr time base based on period of expired interval */ tim_period = tim_new_period; /* If interval has changed, update period */ @@ -360,10 +359,6 @@ if (Q_ITS) { /* ITS? */ pcst = AOB (pcst); /* add 1,,1 */ } } /* end ITS */ -else { - if (t20_idlelock && PROB (100 - tim_t20_prob)) - t20_idlelock = 0; - } return SCPE_OK; }