Adding more device help

This commit is contained in:
Mark Pizzolato 2013-02-05 04:41:48 -08:00
parent ef13fdd0dc
commit 453890f3d7
7 changed files with 54 additions and 14 deletions

View file

@ -660,10 +660,8 @@ fprintf (st, "by the Telnet client, a SET DCI DISCONNECT command, or a DETACH DC
fprintf (st, "Other special commands:\n\n"); fprintf (st, "Other special commands:\n\n");
fprintf (st, " sim> SHOW DCI CONNECTIONS show current connections\n"); fprintf (st, " sim> SHOW DCI CONNECTIONS show current connections\n");
fprintf (st, " sim> SHOW DCI STATISTICS show statistics for active connections\n"); fprintf (st, " sim> SHOW DCI STATISTICS show statistics for active connections\n");
fprintf (st, " sim> SET DCOn DISCONNECT disconnects the specified line.\n\n"); fprintf (st, " sim> SET DCOn DISCONNECT disconnects the specified line.\n");
fprintf (st, "The input device (DCI) implements these registers:\n\n");
fprint_reg_help (st, &dci_dev); fprint_reg_help (st, &dci_dev);
fprintf (st, "\nThe output device (DCO) implements these registers:\n\n");
fprint_reg_help (st, &dco_dev); fprint_reg_help (st, &dco_dev);
fprintf (st, "\nThe additional terminals do not support save and restore. All open connections\n"); fprintf (st, "\nThe additional terminals do not support save and restore. All open connections\n");
fprintf (st, "are lost when the simulator shuts down or DCI is detached.\n"); fprintf (st, "are lost when the simulator shuts down or DCI is detached.\n");

View file

@ -63,6 +63,7 @@ t_stat lpt_svc (UNIT *uptr);
t_stat lpt_reset (DEVICE *dptr); t_stat lpt_reset (DEVICE *dptr);
t_stat lpt_attach (UNIT *uptr, char *ptr); t_stat lpt_attach (UNIT *uptr, char *ptr);
t_stat lpt_detach (UNIT *uptr); t_stat lpt_detach (UNIT *uptr);
t_stat lpt_help (FILE *st, DEVICE *dptr, UNIT *uptr, int32 flag, char *cptr);
char *lpt_description (DEVICE *dptr); char *lpt_description (DEVICE *dptr);
/* LPT data structures /* LPT data structures
@ -112,7 +113,7 @@ DEVICE lpt_dev = {
NULL, NULL, &lpt_reset, NULL, NULL, &lpt_reset,
NULL, &lpt_attach, &lpt_detach, NULL, &lpt_attach, &lpt_detach,
&lpt_dib, DEV_DISABLE | DEV_UBUS | DEV_QBUS, 0, &lpt_dib, DEV_DISABLE | DEV_UBUS | DEV_QBUS, 0,
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, &lpt_help, NULL, NULL,
&lpt_description &lpt_description
}; };
@ -203,6 +204,23 @@ lpt_csr = lpt_csr | CSR_ERR;
return detach_unit (uptr); return detach_unit (uptr);
} }
t_stat lpt_help (FILE *st, DEVICE *dptr, UNIT *uptr, int32 flag, char *cptr)
{
fprintf (st, "Line Printer (LPT)\n\n");
fprintf (st, "The line printer (LPT) writes data to a disk file. The POS register specifies\n");
fprintf (st, "the number of the next data item to be written. Thus, by changing POS, the\n");
fprintf (st, "user can backspace or advance the printer.\n");
fprint_set_help (st, dptr);
fprint_show_help (st, dptr);
fprint_reg_help (st, dptr);
fprintf (st, "\nError handling is as follows:\n\n");
fprintf (st, " error STOP_IOE processed as\n");
fprintf (st, " not attached 1 out of paper\n");
fprintf (st, " 0 disk not ready\n\n");
fprintf (st, " OS I/O error x report error and stop\n");
return SCPE_OK;
}
char *lpt_description (DEVICE *dptr) char *lpt_description (DEVICE *dptr)
{ {
return (UNIBUS) ? "LP11 line printer" : return (UNIBUS) ? "LP11 line printer" :

View file

@ -1245,7 +1245,6 @@ fprintf (st, "bad block option can be used only when a unit is attached to a fil
#if defined (VM_PDP11) #if defined (VM_PDP11)
fprintf (st, "The RL device supports the BOOT command.\n"); fprintf (st, "The RL device supports the BOOT command.\n");
#endif #endif
fprintf (st, "\nThe RX211 implements these registers:\n\n");
fprint_reg_help (st, dptr); fprint_reg_help (st, dptr);
fprintf (st, "\nError handling is as follows:\n\n"); fprintf (st, "\nError handling is as follows:\n\n");
fprintf (st, " error STOP_IOE processed as\n"); fprintf (st, " error STOP_IOE processed as\n");

View file

@ -725,7 +725,6 @@ fprintf (st, "\n");
fprintf (st, "The RX211 supports the BOOT command.\n\n"); fprintf (st, "The RX211 supports the BOOT command.\n\n");
#endif #endif
fprintf (st, "The RX211 is disabled in a Qbus system with more than 256KB of memory.\n\n"); fprintf (st, "The RX211 is disabled in a Qbus system with more than 256KB of memory.\n\n");
fprintf (st, "The RX211 implements these registers:\n\n");
fprint_reg_help (st, dptr); fprint_reg_help (st, dptr);
fprintf (st, "\nError handling is as follows:\n\n"); fprintf (st, "\nError handling is as follows:\n\n");
fprintf (st, " error STOP_IOE processed as\n"); fprintf (st, " error STOP_IOE processed as\n");

View file

@ -184,6 +184,7 @@ extern uint32 nexus_req[NEXUS_HLVL];
t_stat uba_svc (UNIT *uptr); t_stat uba_svc (UNIT *uptr);
t_stat uba_reset (DEVICE *dptr); t_stat uba_reset (DEVICE *dptr);
t_stat uba_help (FILE *st, DEVICE *dptr, UNIT *uptr, int32 flag, char *cptr);
char *uba_description (DEVICE *dptr); char *uba_description (DEVICE *dptr);
t_stat uba_ex (t_value *vptr, t_addr exta, UNIT *uptr, int32 sw); t_stat uba_ex (t_value *vptr, t_addr exta, UNIT *uptr, int32 sw);
t_stat uba_dep (t_value val, t_addr exta, UNIT *uptr, int32 sw); t_stat uba_dep (t_value val, t_addr exta, UNIT *uptr, int32 sw);
@ -265,13 +266,14 @@ MTAB uba_mod[] = {
{ MTAB_XTD|MTAB_VDV, TR_UBA, "NEXUS", NULL, { MTAB_XTD|MTAB_VDV, TR_UBA, "NEXUS", NULL,
NULL, &show_nexus, NULL, "Display nexus" }, NULL, &show_nexus, NULL, "Display nexus" },
{ MTAB_XTD|MTAB_VDV|MTAB_NMO, 0, "IOSPACE", NULL, { MTAB_XTD|MTAB_VDV|MTAB_NMO, 0, "IOSPACE", NULL,
NULL, &show_iospace, NULL, "Display I/O space address map" }, NULL, &show_iospace, NULL, "Display IO address space assignments" },
{ MTAB_XTD|MTAB_VDV, 1, "AUTOCONFIG", "AUTOCONFIG", { MTAB_XTD|MTAB_VDV, 1, "AUTOCONFIG", "AUTOCONFIG",
&set_autocon, &show_autocon, NULL, "Enable/Display autoconfiguration" }, &set_autocon, &show_autocon, NULL, "Enable/Display autoconfiguration" },
{ MTAB_XTD|MTAB_VDV, 0, NULL, "NOAUTOCONFIG", { MTAB_XTD|MTAB_VDV, 0, NULL, "NOAUTOCONFIG",
&set_autocon, NULL, NULL, "Disable autoconfiguration" }, &set_autocon, NULL, NULL, "Disable autoconfiguration" },
{ MTAB_XTD|MTAB_VDV|MTAB_NMO|MTAB_SHP, 0, "VIRTUAL", NULL, { MTAB_XTD|MTAB_VDV|MTAB_NMO|MTAB_SHP, 0, "VIRTUAL", NULL,
NULL, &uba_show_virt, NULL, "Display translation for Unibus address arg" }, NULL, &uba_show_virt, NULL, "Show physical address translation for Unibus\n"
" address arg" },
{ 0 } { 0 }
}; };
@ -291,7 +293,7 @@ DEVICE uba_dev = {
&uba_ex, &uba_dep, &uba_reset, &uba_ex, &uba_dep, &uba_reset,
NULL, NULL, NULL, NULL, NULL, NULL,
&uba_dib, DEV_NEXUS | DEV_DEBUG, 0, &uba_dib, DEV_NEXUS | DEV_DEBUG, 0,
uba_deb, NULL, NULL, NULL, NULL, NULL, uba_deb, NULL, NULL, &uba_help, NULL, NULL,
&uba_description &uba_description
}; };
@ -933,6 +935,20 @@ uba_cnf = UBACNF_UBIC;
return SCPE_OK; return SCPE_OK;
} }
t_stat uba_help (FILE *st, DEVICE *dptr, UNIT *uptr, int32 flag, char *cptr)
{
fprintf (st, "Unibus Adapter (UBA)\n\n");
fprintf (st, "The Unibus adapter (UBA) simulates the DW780.\n");
fprint_set_help (st, dptr);
fprint_show_help (st, dptr);
fprintf (st, "\nThe UBA implements main memory examination and modification via the Unibus\n");
fprintf (st, "map. The data width is always 16b:\n\n");
fprintf (st, "EXAMINE UBA 0/10 examine main memory words corresponding\n");
fprintf (st, " to Unibus addresses 0-10\n");
fprint_reg_help (st, dptr);
return SCPE_OK;
}
char *uba_description (DEVICE *dptr) char *uba_description (DEVICE *dptr)
{ {
return "Unibus adapter"; return "Unibus adapter";

View file

@ -255,6 +255,7 @@ extern uint32 nexus_req[NEXUS_HLVL];
extern UNIT cpu_unit; extern UNIT cpu_unit;
t_stat mba_reset (DEVICE *dptr); t_stat mba_reset (DEVICE *dptr);
t_stat mba_help (FILE *st, DEVICE *dptr, UNIT *uptr, int32 flag, char *cptr);
char *mba_description (DEVICE *dptr); char *mba_description (DEVICE *dptr);
t_stat mba_rdreg (int32 *val, int32 pa, int32 mode); t_stat mba_rdreg (int32 *val, int32 pa, int32 mode);
t_stat mba_wrreg (int32 val, int32 pa, int32 lnt); t_stat mba_wrreg (int32 val, int32 pa, int32 lnt);
@ -341,7 +342,7 @@ DEVICE mba_dev[] = {
NULL, NULL, &mba_reset, NULL, NULL, &mba_reset,
NULL, NULL, NULL, NULL, NULL, NULL,
&mba0_dib, DEV_NEXUS | DEV_DEBUG, 0, &mba0_dib, DEV_NEXUS | DEV_DEBUG, 0,
mba_deb, NULL, NULL, NULL, NULL, NULL, mba_deb, NULL, NULL, &mba_help, NULL, NULL,
&mba_description &mba_description
}, },
{ {
@ -350,7 +351,7 @@ DEVICE mba_dev[] = {
NULL, NULL, &mba_reset, NULL, NULL, &mba_reset,
NULL, NULL, NULL, NULL, NULL, NULL,
&mba1_dib, DEV_NEXUS | DEV_DEBUG, 0, &mba1_dib, DEV_NEXUS | DEV_DEBUG, 0,
mba_deb, NULL, NULL, NULL, NULL, NULL, mba_deb, NULL, NULL, &mba_help, NULL, NULL,
&mba_description &mba_description
} }
}; };
@ -856,6 +857,17 @@ if (mbabort[mb]) /* reset device */
return SCPE_OK; return SCPE_OK;
} }
t_stat mba_help (FILE *st, DEVICE *dptr, UNIT *uptr, int32 flag, char *cptr)
{
fprintf (st, "Massbus Adapters (MBA0, MBA1)\n\n");
fprintf (st, "The Massbus adapters (MBA0, MBA1) simulate RH780's. MBA0 is assigned to the\n");
fprintf (st, "RP disk drives, MBA1 to the TU tape drives.\n");
fprint_set_help (st, dptr);
fprint_show_help (st, dptr);
fprint_reg_help (st, dptr);
return SCPE_OK;
}
char *mba_description (DEVICE *dptr) char *mba_description (DEVICE *dptr)
{ {
static char buf[64]; static char buf[64];

4
scp.c
View file

@ -1059,7 +1059,6 @@ DEVICE *tdptr;
char *tptr; char *tptr;
char *namebuf; char *namebuf;
char rangebuf[32]; char rangebuf[32];
char header[CBUFSIZE];
for (rptr = dptr->registers; rptr->name != NULL; rptr++) { for (rptr = dptr->registers; rptr->name != NULL; rptr++) {
if (rptr->depth > 1) if (rptr->depth > 1)
@ -1080,9 +1079,8 @@ if (!found) {
fprintf (st, "No register help is available for the %s device\n", dptr->name); fprintf (st, "No register help is available for the %s device\n", dptr->name);
} }
else { else {
sprintf (header, "\nThe %s device implements these registers:\n\n", dptr->name);
namebuf = calloc (max_namelen + 1, sizeof (*namebuf)); namebuf = calloc (max_namelen + 1, sizeof (*namebuf));
fprintf (st, "%s device registers:\n", dptr->name); fprintf (st, "\nThe %s device implements these registers:\n\n", dptr->name);
for (rptr = dptr->registers; rptr->name != NULL; rptr++) { for (rptr = dptr->registers; rptr->name != NULL; rptr++) {
if (rptr->desc) { if (rptr->desc) {
if (rptr->depth <= 1) if (rptr->depth <= 1)