Provide more useful help for VAX simulator boot commands and clearer error reports for boot command errors
This commit is contained in:
parent
7dddb56845
commit
370f57ed56
6 changed files with 68 additions and 13 deletions
|
@ -117,7 +117,8 @@ DEVICE sysd_dev = {
|
|||
|
||||
CTAB vax610_cmd[] = {
|
||||
{ "BOOT", &vax610_boot, RU_BOOT,
|
||||
"bo{ot} <device>{/R5:flg} boot device\n", &run_cmd_message },
|
||||
"bo{ot} <device>{/R5:flg} boot device\n"
|
||||
" type HELP CPU to see bootable devices\n", &run_cmd_message },
|
||||
{ NULL }
|
||||
};
|
||||
|
||||
|
@ -336,8 +337,15 @@ t_stat vax610_boot (int32 flag, char *ptr)
|
|||
t_stat r;
|
||||
|
||||
r = vax610_boot_parse (flag, ptr); /* parse the boot cmd */
|
||||
if (r != SCPE_OK) /* error? */
|
||||
if (r != SCPE_OK) { /* error? */
|
||||
if (r >= SCPE_BASE) { /* message available? */
|
||||
printf ("%s\n", sim_error_text (r));
|
||||
if (sim_log)
|
||||
fprintf (sim_log, "%s\n", sim_error_text (r));
|
||||
r |= SCPE_NOMESSAGE;
|
||||
}
|
||||
return r;
|
||||
}
|
||||
strncpy (cpu_boot_cmd, ptr, CBUFSIZE); /* save for reboot */
|
||||
return run_cmd (flag, "CPU");
|
||||
}
|
||||
|
|
|
@ -140,7 +140,8 @@ DEVICE sysb_dev = {
|
|||
|
||||
CTAB vax730_cmd[] = {
|
||||
{ "BOOT", &vax730_boot, RU_BOOT,
|
||||
"bo{ot} <device>{/R5:flg} boot device\n", &run_cmd_message },
|
||||
"bo{ot} <device>{/R5:flg} boot device\n"
|
||||
" type HELP CPU to see bootable devices\n", &run_cmd_message },
|
||||
{ NULL }
|
||||
};
|
||||
|
||||
|
@ -482,8 +483,15 @@ t_stat vax730_boot (int32 flag, char *ptr)
|
|||
t_stat r;
|
||||
|
||||
r = vax730_boot_parse (flag, ptr); /* parse the boot cmd */
|
||||
if (r != SCPE_OK) /* error? */
|
||||
if (r != SCPE_OK) { /* error? */
|
||||
if (r >= SCPE_BASE) { /* message available? */
|
||||
printf ("%s\n", sim_error_text (r));
|
||||
if (sim_log)
|
||||
fprintf (sim_log, "%s\n", sim_error_text (r));
|
||||
r |= SCPE_NOMESSAGE;
|
||||
}
|
||||
return r;
|
||||
}
|
||||
strncpy (cpu_boot_cmd, ptr, CBUFSIZE); /* save for reboot */
|
||||
return run_cmd (flag, "CPU");
|
||||
}
|
||||
|
@ -501,6 +509,8 @@ DIB *dibp;
|
|||
uint32 ba;
|
||||
t_stat r;
|
||||
|
||||
if (!ptr || !*ptr)
|
||||
return SCPE_2FARG;
|
||||
regptr = get_glyph (ptr, gbuf, 0); /* get glyph */
|
||||
if ((slptr = strchr (gbuf, '/'))) { /* found slash? */
|
||||
regptr = strchr (ptr, '/'); /* locate orig */
|
||||
|
|
|
@ -167,7 +167,8 @@ DEVICE cmi_dev = {
|
|||
|
||||
CTAB vax750_cmd[] = {
|
||||
{ "BOOT", &vax750_boot, RU_BOOT,
|
||||
"bo{ot} <device>{/R5:flg} boot device\n", &run_cmd_message },
|
||||
"bo{ot} <device>{/R5:flg} boot device\n"
|
||||
" type HELP CPU to see bootable devices\n", &run_cmd_message },
|
||||
{ NULL }
|
||||
};
|
||||
|
||||
|
@ -566,8 +567,15 @@ t_stat vax750_boot (int32 flag, char *ptr)
|
|||
t_stat r;
|
||||
|
||||
r = vax750_boot_parse (flag, ptr); /* parse the boot cmd */
|
||||
if (r != SCPE_OK) /* error? */
|
||||
if (r != SCPE_OK) { /* error? */
|
||||
if (r >= SCPE_BASE) { /* message available? */
|
||||
printf ("%s\n", sim_error_text (r));
|
||||
if (sim_log)
|
||||
fprintf (sim_log, "%s\n", sim_error_text (r));
|
||||
r |= SCPE_NOMESSAGE;
|
||||
}
|
||||
return r;
|
||||
}
|
||||
strncpy (cpu_boot_cmd, ptr, CBUFSIZE); /* save for reboot */
|
||||
return run_cmd (flag, "CPU");
|
||||
}
|
||||
|
@ -585,6 +593,8 @@ DIB *dibp;
|
|||
uint32 ba;
|
||||
t_stat r;
|
||||
|
||||
if (!ptr || !*ptr)
|
||||
return SCPE_2FARG;
|
||||
regptr = get_glyph (ptr, gbuf, 0); /* get glyph */
|
||||
if ((slptr = strchr (gbuf, '/'))) { /* found slash? */
|
||||
regptr = strchr (ptr, '/'); /* locate orig */
|
||||
|
|
|
@ -204,7 +204,8 @@ DEVICE sbi_dev = {
|
|||
|
||||
CTAB vax780_cmd[] = {
|
||||
{ "BOOT", &vax780_boot, RU_BOOT,
|
||||
"bo{ot} <device>{/R5:flg} boot device\n", &run_cmd_message },
|
||||
"bo{ot} <device>{/R5:flg} boot device\n"
|
||||
" type HELP CPU to see bootable devices\n", &run_cmd_message },
|
||||
{ "FLOAD", &vax780_fload, 0,
|
||||
"fl{oad} <file> {<start>} load file from console floppy\n" },
|
||||
{ NULL }
|
||||
|
@ -631,8 +632,15 @@ t_stat vax780_boot (int32 flag, char *ptr)
|
|||
t_stat r;
|
||||
|
||||
r = vax780_boot_parse (flag, ptr); /* parse the boot cmd */
|
||||
if (r != SCPE_OK) /* error? */
|
||||
if (r != SCPE_OK) { /* error? */
|
||||
if (r >= SCPE_BASE) { /* message available? */
|
||||
printf ("%s\n", sim_error_text (r));
|
||||
if (sim_log)
|
||||
fprintf (sim_log, "%s\n", sim_error_text (r));
|
||||
r |= SCPE_NOMESSAGE;
|
||||
}
|
||||
return r;
|
||||
}
|
||||
strncpy (cpu_boot_cmd, ptr, CBUFSIZE); /* save for reboot */
|
||||
return run_cmd (flag, "CPU");
|
||||
}
|
||||
|
@ -649,6 +657,8 @@ UNIT *uptr;
|
|||
DIB *dibp;
|
||||
t_stat r;
|
||||
|
||||
if (!ptr || !*ptr)
|
||||
return SCPE_2FARG;
|
||||
regptr = get_glyph (ptr, gbuf, 0); /* get glyph */
|
||||
if ((slptr = strchr (gbuf, '/'))) { /* found slash? */
|
||||
regptr = strchr (ptr, '/'); /* locate orig */
|
||||
|
|
|
@ -186,7 +186,8 @@ DEVICE abus_dev = {
|
|||
|
||||
CTAB vax860_cmd[] = {
|
||||
{ "BOOT", &vax860_boot, RU_BOOT,
|
||||
"bo{ot} <device>{/R5:flg} boot device\n", &run_cmd_message },
|
||||
"bo{ot} <device>{/R5:flg} boot device\n"
|
||||
" type HELP CPU to see bootable devices\n", &run_cmd_message },
|
||||
{ NULL }
|
||||
};
|
||||
|
||||
|
@ -591,8 +592,15 @@ t_stat vax860_boot (int32 flag, char *ptr)
|
|||
t_stat r;
|
||||
|
||||
r = vax860_boot_parse (flag, ptr); /* parse the boot cmd */
|
||||
if (r != SCPE_OK) /* error? */
|
||||
if (r != SCPE_OK) { /* error? */
|
||||
if (r >= SCPE_BASE) { /* message available? */
|
||||
printf ("%s\n", sim_error_text (r));
|
||||
if (sim_log)
|
||||
fprintf (sim_log, "%s\n", sim_error_text (r));
|
||||
r |= SCPE_NOMESSAGE;
|
||||
}
|
||||
return r;
|
||||
}
|
||||
strncpy (cpu_boot_cmd, ptr, CBUFSIZE); /* save for reboot */
|
||||
return run_cmd (flag, "CPU");
|
||||
}
|
||||
|
@ -610,6 +618,8 @@ DIB *dibp;
|
|||
uint32 ba;
|
||||
t_stat r;
|
||||
|
||||
if (!ptr || !*ptr)
|
||||
return SCPE_2FARG;
|
||||
regptr = get_glyph (ptr, gbuf, 0); /* get glyph */
|
||||
if ((slptr = strchr (gbuf, '/'))) { /* found slash? */
|
||||
regptr = strchr (ptr, '/'); /* locate orig */
|
||||
|
|
13
scp.c
13
scp.c
|
@ -1236,9 +1236,16 @@ if (*cptr) {
|
|||
dptr->attach_help (sim_log, dptr, uptr, 0, cptr);
|
||||
}
|
||||
else {
|
||||
helps[i].attach_help (stdout, dptr, uptr, 0, cptr);
|
||||
if (sim_log)
|
||||
helps[i].attach_help (sim_log, dptr, uptr, 0, cptr);
|
||||
if (helps[i].attach_help) {
|
||||
helps[i].attach_help (stdout, dptr, uptr, 0, cptr);
|
||||
if (sim_log)
|
||||
helps[i].attach_help (sim_log, dptr, uptr, 0, cptr);
|
||||
}
|
||||
else {
|
||||
fprintf (stdout, "No help available for the %s device ATTACH command\n", dptr->name, cmdp->name);
|
||||
if (sim_log)
|
||||
fprintf (sim_log, "No help available for the %s device ATTACH command\n", dptr->name, cmdp->name);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue