PDP10, PDP11, VAX: Adjusted KDP, DUP and DMR/DMC devices to be better behaved when the simulated system is idling.

This may not completely fix the problem identified in issue #99, but it should help
This commit is contained in:
Mark Pizzolato 2014-12-19 08:41:10 -08:00
parent 88d644258e
commit 549779fb10
3 changed files with 11 additions and 11 deletions

View file

@ -986,9 +986,9 @@ DEBTAB dmc_debug[] = {
UNIT dmc_units[DMC_NUMDEVICE+2]; /* One per device plus an I/O polling unit and a timing unit */
UNIT dmc_unit_template = { UDATA (&dmc_svc, UNIT_ATTABLE, 0) };
UNIT dmc_poll_unit_template = { UDATA (&dmc_poll_svc, UNIT_DIS, 0) };
UNIT dmc_timer_unit_template = { UDATA (&dmc_timer_svc, UNIT_DIS, 0) };
UNIT dmc_unit_template = { UDATA (&dmc_svc, UNIT_ATTABLE|UNIT_IDLE, 0) };
UNIT dmc_poll_unit_template = { UDATA (&dmc_poll_svc, UNIT_DIS|UNIT_IDLE, 0) };
UNIT dmc_timer_unit_template = { UDATA (&dmc_timer_svc, UNIT_DIS|UNIT_IDLE, 0) };
UNIT dmp_units[DMP_NUMDEVICE+2]; /* One per device plus an I/O polling unit and a timing unit */
@ -2458,7 +2458,7 @@ if (dmc_is_attached(controller->unit)) {
if ((controller->completion_queue->count) || /* if completion queue not empty? */
(controller->control_out) || /* or pending control outs? */
(controller->transfer_state != Idle)) /* or registers are busy */
sim_activate (uptr, tmxr_poll); /* wake up periodically until these don't exist */
sim_clock_coschedule (uptr, tmxr_poll); /* wake up periodically until these don't exist */
}
return SCPE_OK;
@ -2479,7 +2479,7 @@ if (dmc >= 0) { /* new connection? */
dmc_get_modem (controller);
sim_debug(DBG_MDM, dptr, "dmc_poll_svc(dmc=%d) - Connection State Change to UP(ON)\n", dmc);
ddcmp_dispatch (controller, 0);
sim_activate (controller->unit, tmxr_poll); /* be sure to wake up soon to continue processing */
sim_clock_coschedule (controller->unit, tmxr_poll); /* be sure to wake up soon to continue processing */
}
tmxr_poll_rx (mp);
tmxr_poll_tx (mp);
@ -2499,7 +2499,7 @@ for (dmc=active=attached=0; dmc < mp->lines; dmc++) {
(!(new_modem & DMC_SEL4_M_CAR))) {
sim_debug(DBG_MDM, controller->device, "dmc_poll_svc(dmc=%d) - Connection State Change to %s\n", dmc, (new_modem & DMC_SEL4_M_CAR) ? "UP(ON)" : "DOWN(OFF)");
ddcmp_dispatch (controller, 0);
sim_activate (controller->unit, tmxr_poll); /* wake up soon to finish processing */
sim_clock_coschedule (controller->unit, tmxr_poll); /* wake up soon to finish processing */
}
if ((lp->xmte && tmxr_tpbusyln(lp)) ||
(lp->xmte && controller->link.xmt_buffer) ||

View file

@ -340,11 +340,11 @@ DIB dup_dib = {
};
static UNIT dup_unit_template = {
UDATA (&dup_svc, UNIT_ATTABLE, 0),
UDATA (&dup_svc, UNIT_ATTABLE|UNIT_IDLE, 0),
};
static UNIT dup_poll_unit_template = {
UDATA (&dup_poll_svc, UNIT_DIS, 0),
UDATA (&dup_poll_svc, UNIT_DIS|UNIT_IDLE, 0),
};
static UNIT dup_units[DUP_LINES+1]; /* One unit per line and a polling unit */

View file

@ -712,13 +712,13 @@ static t_stat kmc_reset(DEVICE* dptr) {
memset (&rx_units[i][k], 0, sizeof tx_units[0][0]);
tx_units[i][k].action = &kmc_txService;
tx_units[i][k].flags = 0;
tx_units[i][k].flags = UNIT_IDLE;
tx_units[i][k].capac = 0;
tx_units[i][k].unit_kmc = k;
tx_units[i][k].unit_line = i;
rx_units[i][k].action = &kmc_rxService;
rx_units[i][k].flags = 0;
rx_units[i][k].flags = UNIT_IDLE;
rx_units[i][k].capac = 0;
rx_units[i][k].unit_kmc = k;
rx_units[i][k].unit_line = i;
@ -728,7 +728,7 @@ static t_stat kmc_reset(DEVICE* dptr) {
if (sim_switches & SWMASK ('P'))
gflags &= ~FLG_INIT;
if (!(gflags & FLG_INIT)) { /* Power-up reset */
sel0 = 0x00aa;
sel2 = 0xa5a5;