SCP: Add a way to see the enabled SCP internal devices SHOW DEV -I

This commit is contained in:
Mark Pizzolato 2016-12-17 10:35:56 -08:00
parent 7dd1f0b89e
commit 48e0b47d51
3 changed files with 13 additions and 7 deletions

8
scp.c
View file

@ -1186,7 +1186,7 @@ static const char simh_help[] =
"+sh{ow} {-c} br{eak} <list> show breakpoints\n"
"+sh{ow} con{figuration} show configuration\n"
"+sh{ow} cons{ole} {arg} show console options\n"
"+sh{ow} dev{ices} show devices\n"
"+sh{ow} {-ei} dev{ices} show devices\n"
"+sh{ow} fea{tures} show system devices with descriptions\n"
"+sh{ow} m{odifiers} show modifiers for all devices\n"
"+sh{ow} s{how} show SHOW commands for all devices\n"
@ -4661,6 +4661,12 @@ fprintf (st, "%s simulator configuration%s\n\n", sim_name, only_enabled ? " (ena
for (i = 0; (dptr = sim_devices[i]) != NULL; i++)
if (!only_enabled || !qdisable (dptr))
show_device (st, dptr, flag);
if (sim_switches & SWMASK ('I')) {
fprintf (st, "\nInternal Devices%s\n\n", only_enabled ? " (enabled devices)" : "");
for (i = 0; sim_internal_device_count && (dptr = sim_internal_devices[i]); ++i)
if (!only_enabled || !qdisable (dptr))
show_device (st, dptr, flag);
}
return SCPE_OK;
}

View file

@ -403,7 +403,7 @@ t_stat sim_rem_con_data_svc (UNIT *uptr); /* remote console connec
t_stat sim_rem_con_reset (DEVICE *dptr); /* remote console reset routine */
UNIT sim_rem_con_unit[2] = {
{ UDATA (&sim_rem_con_poll_svc, UNIT_IDLE, 0) }, /* remote console connection polling unit */
{ UDATA (&sim_rem_con_data_svc, UNIT_IDLE, 0) }}; /* console data handling unit */
{ UDATA (&sim_rem_con_data_svc, UNIT_IDLE|UNIT_DIS, 0) }}; /* console data handling unit */
DEBTAB sim_rem_con_debug[] = {
{"TRC", DBG_TRC},

View file

@ -1013,11 +1013,9 @@ for (tmr=0; tmr<=SIM_NTIMERS; tmr++) {
sim_timer_units[tmr].action = &sim_timer_tick_svc;
sim_timer_units[tmr].flags = UNIT_DIS | UNIT_IDLE;
}
SIM_INTERNAL_UNIT.flags = UNIT_DIS | UNIT_IDLE;
SIM_INTERNAL_UNIT.flags = UNIT_IDLE;
sim_register_internal_device (&sim_timer_dev);
sim_throttle_unit.action = &sim_throt_svc;
sim_throttle_unit.flags = UNIT_DIS;
sim_register_internal_device (&sim_throttle_dev);
sim_register_clock_unit_tmr (&SIM_INTERNAL_UNIT, SIM_INTERNAL_CLK);
sim_idle_enab = FALSE; /* init idle off */
sim_idle_rate_ms = sim_os_ms_sleep_init (); /* get OS timer rate */
@ -1564,6 +1562,7 @@ else {
}
}
}
sim_register_internal_device (&sim_throttle_dev);
sim_throt_cps = SIM_INITIAL_IPS; /* Initial value while correct one is determined */
return SCPE_OK;
}
@ -2066,7 +2065,7 @@ if (tmr == SIM_NTIMERS) { /* None found? */
sim_calb_tmr = SIM_NTIMERS;
sim_debug (DBG_CAL, &sim_timer_dev, "_rtcn_configure_calibrated_clock() - Starting Internal Calibrated Timer at %dHz\n", sim_int_clk_tps);
SIM_INTERNAL_UNIT.action = &sim_timer_clock_tick_svc;
SIM_INTERNAL_UNIT.flags = UNIT_DIS | UNIT_IDLE;
SIM_INTERNAL_UNIT.flags = UNIT_IDLE;
sim_activate_abs (&SIM_INTERNAL_UNIT, 0);
sim_rtcn_init_unit (&SIM_INTERNAL_UNIT, (CLK_INIT*CLK_TPS)/sim_int_clk_tps, SIM_INTERNAL_CLK);
}
@ -2334,7 +2333,8 @@ if (NULL == sim_clock_unit[tmr])
sim_clock_cosched_queue[tmr] = QUEUE_LIST_END;
sim_clock_unit[tmr] = uptr;
uptr->dynflags |= UNIT_TMR_UNIT;
sim_timer_units[tmr].flags = UNIT_DIS | (sim_clock_unit[tmr] ? UNIT_IDLE : 0);
sim_timer_units[tmr].flags = ((tmr == SIM_NTIMERS) ? 0 : UNIT_DIS) |
(sim_clock_unit[tmr] ? UNIT_IDLE : 0);
return SCPE_OK;
}