diff --git a/VAX/vax780_stddev.c b/VAX/vax780_stddev.c index 2e6e91c3..d79e9661 100644 --- a/VAX/vax780_stddev.c +++ b/VAX/vax780_stddev.c @@ -726,13 +726,13 @@ return SCPE_OK; void tmr_sched (uint32 nicr) { -uint32 usecs = (nicr) ? (~nicr + 1) : 0xFFFFFFFF; +double usecs = (nicr) ? (double)(~nicr + 1) : (double)0x100000000LL; clk_tps = (int32)((1000000.0 / usecs) + 0.5); -sim_debug (TMR_DB_SCHED, &tmr_dev, "tmr_sched(nicr=0x%08X-usecs=0x%08X) - tps=%d\n", nicr, usecs, clk_tps); +sim_debug (TMR_DB_SCHED, &tmr_dev, "tmr_sched(nicr=0x%08X-usecs=%.0f) - tps=%d\n", nicr, usecs, clk_tps); tmr_poll = sim_rtcn_calb (clk_tps, TMR_CLK); -sim_activate_after (&tmr_unit, usecs); +sim_activate_after_d (&tmr_unit, usecs); } /* 100Hz TODR reset */ diff --git a/VAX/vax_sysdev.c b/VAX/vax_sysdev.c index 4f8d261a..8663bf66 100644 --- a/VAX/vax_sysdev.c +++ b/VAX/vax_sysdev.c @@ -1615,8 +1615,6 @@ uint32 usecs_sched = tmr_tir[tmr] ? (~tmr_tir[tmr] + 1) : 0xFFFFFFFF; double usecs_sched_d = tmr_tir[tmr] ? (double)(~tmr_tir[tmr] + 1) : (1.0 + (double)0xFFFFFFFFu); sim_cancel (&sysd_unit[tmr]); /* Make sure not active */ -if (sysd_unit[tmr].usecs_remaining != 0.0) - sim_debug (DBG_SCHD, &sysd_dev, "tmr_sched(tmr=%d) - BUG - usecs remaining = %.0f usecs\n", tmr, sysd_unit[tmr].usecs_remaining); if ((ADDR_IS_ROM(fault_PC)) && /* running from ROM and */ (usecs_sched < TMR_INC)) { /* short delay? */ tmr_inst[tmr] = TRUE; /* wait for instructions */