diff --git a/VAX/vax630_io.c b/VAX/vax630_io.c index 2ec39934..e341234d 100644 --- a/VAX/vax630_io.c +++ b/VAX/vax630_io.c @@ -78,6 +78,8 @@ t_stat set_autocon (UNIT *uptr, int32 val, char *cptr, void *desc); t_stat show_autocon (FILE *st, UNIT *uptr, int32 val, void *desc); t_stat show_iospace (FILE *st, UNIT *uptr, int32 val, void *desc); t_stat qba_show_virt (FILE *of, UNIT *uptr, int32 val, void *desc); +t_stat qba_help (FILE *st, DEVICE *dptr, UNIT *uptr, int32 flag, char *cptr); +char *qba_description (DEVICE *dptr); /* Qbus adapter data structures @@ -120,7 +122,8 @@ DEVICE qba_dev = { 1, 16, QBMAWIDTH, 2, 16, 16, &qba_ex, &qba_dep, &qba_reset, NULL, NULL, NULL, - &qba_dib, DEV_QBUS + &qba_dib, DEV_QBUS, 0, NULL, NULL, NULL, &qba_help, NULL, NULL, + &qba_description }; /* IO page dispatches */ @@ -620,3 +623,22 @@ if (cptr) { fprintf (of, "Invalid argument\n"); return SCPE_OK; } + +t_stat qba_help (FILE *st, DEVICE *dptr, UNIT *uptr, int32 flag, char *cptr) +{ +fprintf (st, "Qbus Adapter (QBA)\n\n"); +fprintf (st, "The Qbus adapter (QBA) simulates the CQBIC Qbus adapter chip.\n"); +fprint_set_help (st, dptr); +fprint_show_help (st, dptr); +fprintf (st, "\nThe QBA implements main memory examination and modification via the Qbus\n"); +fprintf (st, "map. The data width is always 16b:\n\n"); +fprintf (st, "EXAMINE QBA 0/10 examine main memory words corresponding\n"); +fprintf (st, " to Qbus addresses 0-10\n"); +fprint_reg_help (st, dptr); +return SCPE_OK; +} + +char *qba_description (DEVICE *dptr) +{ +return "Qbus adapter"; +} diff --git a/VAX/vax630_sysdev.c b/VAX/vax630_sysdev.c index 6a027f4b..423f8ada 100644 --- a/VAX/vax630_sysdev.c +++ b/VAX/vax630_sysdev.c @@ -154,9 +154,9 @@ t_bool ka_hltenab = TRUE; /* Halt Enable / Autoboo t_stat rom_ex (t_value *vptr, t_addr exta, UNIT *uptr, int32 sw); t_stat rom_dep (t_value val, t_addr exta, UNIT *uptr, int32 sw); t_stat rom_reset (DEVICE *dptr); -t_stat rom_help (FILE *st, DEVICE *dptr, UNIT *uptr, int32 flag, char *cptr); t_stat rom_set_diag (UNIT *uptr, int32 val, char *cptr, void *desc); t_stat rom_show_diag (FILE *st, UNIT *uptr, int32 val, void *desc); +t_stat rom_help (FILE *st, DEVICE *dptr, UNIT *uptr, int32 flag, char *cptr); char *rom_description (DEVICE *dptr); t_stat nvr_ex (t_value *vptr, t_addr exta, UNIT *uptr, int32 sw); t_stat nvr_dep (t_value val, t_addr exta, UNIT *uptr, int32 sw); @@ -166,6 +166,7 @@ t_stat nvr_attach (UNIT *uptr, char *cptr); t_stat nvr_detach (UNIT *uptr); char *nvr_description (DEVICE *dptr); t_stat sysd_reset (DEVICE *dptr); +t_stat sysd_help (FILE *st, DEVICE *dptr, UNIT *uptr, int32 flag, char *cptr); char *sysd_description (DEVICE *dptr); int32 rom_rd (int32 pa); @@ -409,17 +410,20 @@ fprintf (st, "The boot ROM consists of a single unit, simulating the 64KB boot R fprintf (st, "no registers. The boot ROM is loaded with a binary byte stream using the \n"); fprintf (st, "LOAD -r command:\n\n"); fprintf (st, " LOAD -r KA630.BIN load ROM image KA630.BIN\n\n"); -fprintf (st, "ROM accesses a use a calibrated delay that slows ROM-based execution to about\n"); -fprintf (st, "500K instructions per second. This delay is required to make the power-up\n"); -fprintf (st, "self-test routines run correctly on very fast hosts. The delay is controlled\n"); -fprintf (st, "with the commands:\n\n"); -fprintf (st, " SET ROM NODELAY ROM runs like RAM\n"); -fprintf (st, " SET ROM DELAY ROM runs slowly\n\n"); -fprintf (st, "By default the memory power-up self-tests are skipped as they take a long time\n"); -fprintf (st, "to complete. The self-test sequence can be controlled with the following\n"); -fprintf (st, "commands:\n\n"); -fprintf (st, " SET CPU DIAG=MIN Run minimal diagnostics (skip memory test)\n"); -fprintf (st, " SET CPU DIAG=FULL Run full diagnostics\n\n"); +fprintf (st, "When the simulator starts running (via the BOOT command), if the ROM has\n"); +fprintf (st, "not yet been loaded, an attempt will be made to automatically load the\n"); +fprintf (st, "ROM image from the file ka655x.bin in the current working directory.\n"); +fprintf (st, "If that load attempt fails, then a copy of the missing ROM file is\n"); +fprintf (st, "written to the current directory and the load attempt is retried.\n\n"); +fprintf (st, "ROM accesses a use a calibrated delay that slows ROM-based execution to\n"); +fprintf (st, "about 500K instructions per second. This delay is required to make the\n"); +fprintf (st, "power-up self-test routines run correctly on very fast hosts.\n"); +fprint_set_help (st, dptr); +fprintf (st, "By default the memory power-up self-tests are skipped as they take a long\n"); +fprintf (st, "time to complete. The self-test sequence can be controlled with the\n"); +fprintf (st, "following commands:\n\n"); +fprintf (st, " SET CPU DIAG=MIN Run minimal diagnostics (skip memory test)\n"); +fprintf (st, " SET CPU DIAG=FULL Run full diagnostics\n\n"); return SCPE_OK; } @@ -497,7 +501,7 @@ return SCPE_OK; t_stat nvr_help (FILE *st, DEVICE *dptr, UNIT *uptr, int32 flag, char *cptr) { fprintf (st, "Non-volatile Memory (NVR)\n\n"); -fprintf (st, "The NVR simulates 50 bytes of battery-backed up memory.\n"); +fprintf (st, "The NVR simulates 128 bytes of battery-backed up memory.\n"); fprintf (st, "When the simulator starts, NVR is cleared to 0, and the battery-low indicator\n"); fprintf (st, "is set. Alternately, NVR can be attached to a file. This allows the NVR\n"); fprintf (st, "state to be preserved across simulator runs. Successfully attaching an NVR\n"); diff --git a/VAX/vax_io.c b/VAX/vax_io.c index b435c27b..f498a3ec 100644 --- a/VAX/vax_io.c +++ b/VAX/vax_io.c @@ -132,6 +132,7 @@ t_stat set_autocon (UNIT *uptr, int32 val, char *cptr, void *desc); t_stat show_autocon (FILE *st, UNIT *uptr, int32 val, void *desc); t_stat show_iospace (FILE *st, UNIT *uptr, int32 val, void *desc); t_stat qba_show_virt (FILE *of, UNIT *uptr, int32 val, void *desc); +t_stat qba_help (FILE *st, DEVICE *dptr, UNIT *uptr, int32 flag, char *cptr); char *qba_description (DEVICE *dptr); /* Qbus adapter data structures @@ -179,7 +180,7 @@ DEVICE qba_dev = { 1, 16, CQMAWIDTH, 2, 16, 16, &qba_ex, &qba_dep, &qba_reset, NULL, NULL, NULL, - &qba_dib, DEV_QBUS, 0, NULL, NULL, NULL, NULL, NULL, NULL, + &qba_dib, DEV_QBUS, 0, NULL, NULL, NULL, &qba_help, NULL, NULL, &qba_description }; @@ -821,6 +822,20 @@ fprintf (of, "Invalid argument\n"); return SCPE_OK; } +t_stat qba_help (FILE *st, DEVICE *dptr, UNIT *uptr, int32 flag, char *cptr) +{ +fprintf (st, "Qbus Adapter (QBA)\n\n"); +fprintf (st, "The Qbus adapter (QBA) simulates the CQBIC Qbus adapter chip.\n"); +fprint_set_help (st, dptr); +fprint_show_help (st, dptr); +fprintf (st, "\nThe QBA implements main memory examination and modification via the Qbus\n"); +fprintf (st, "map. The data width is always 16b:\n\n"); +fprintf (st, "EXAMINE QBA 0/10 examine main memory words corresponding\n"); +fprintf (st, " to Qbus addresses 0-10\n"); +fprint_reg_help (st, dptr); +return SCPE_OK; +} + char *qba_description (DEVICE *dptr) { return "Qbus adapter"; diff --git a/VAX/vax_stddev.c b/VAX/vax_stddev.c index 7156bbf1..284b7f03 100644 --- a/VAX/vax_stddev.c +++ b/VAX/vax_stddev.c @@ -122,6 +122,7 @@ t_stat clk_detach (UNIT *uptr); t_stat todr_resync (void); char *tti_description (DEVICE *dptr); char *tto_description (DEVICE *dptr); +t_stat clk_help (FILE *st, DEVICE *dptr, UNIT *uptr, int32 flag, char *cptr); char *clk_description (DEVICE *dptr); extern int32 sysd_hlt_enb (void); @@ -244,7 +245,7 @@ DEVICE clk_dev = { 1, 0, 8, 4, 0, 32, NULL, NULL, &clk_reset, NULL, &clk_attach, &clk_detach, - &clk_dib, 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, + &clk_dib, 0, 0, NULL, NULL, NULL, &clk_help, NULL, NULL, &clk_description }; @@ -528,6 +529,33 @@ if (clk_unit.filebuf == NULL) { /* make sure the TODR is return SCPE_OK; } +t_stat clk_help (FILE *st, DEVICE *dptr, UNIT *uptr, int32 flag, char *cptr) +{ +fprintf (st, "Real-Time Clock (CLK)\n\n"); +fprintf (st, "The real-time clock autocalibrates; the clock interval is adjusted up or down\n"); +fprintf (st, "so that the clock tracks actual elapsed time.\n\n"); +fprintf (st, "There are two modes of TODR operation:\n\n"); +fprintf (st, " Default VMS mode. Without initializing the TODR it returns the current\n"); +fprintf (st, " time of year offset which VMS would set the clock to\n"); +fprintf (st, " if VMS knew the correct time (i.e. by manual input).\n"); +fprintf (st, " This is correct almost all the time unless a VMS disk\n"); +fprintf (st, " hadn’t been booted from in the current year. This mode\n"); +fprintf (st, " produces strange time results for non VMS OSes on each\n"); +fprintf (st, " system boot.\n"); +fprintf (st, " OS Agnostic mode. This mode behaves precisely like the VAX780 TODR and\n"); +fprintf (st, " works correctly for all OSes. This mode is enabled by\n"); +fprintf (st, " attaching the CLK to a battery backup state file for the\n"); +fprintf (st, " TOY clock (i.e. sim> attach CLK TOY_CLOCK). When\n"); +fprintf (st, " operating in OS Agnostic mode, the TODR will initially\n"); +fprintf (st, " start counting from 0 and be adjusted differently when\n"); +fprintf (st, " an OS specifically writes to the TODR. VMS will prompt\n"); +fprintf (st, " to set the time on each boot (if the TODR value is less\n"); +fprintf (st, " than about 1 month) unless the SYSGEN parameter\n"); +fprintf (st, " TIMEPROMPTWAIT is set to 0.\n"); +fprint_reg_help (st, dptr); +return SCPE_OK; +} + char *clk_description (DEVICE *dptr) { return "time of year clock"; diff --git a/VAX/vax_sysdev.c b/VAX/vax_sysdev.c index 222d7396..58ae915a 100644 --- a/VAX/vax_sysdev.c +++ b/VAX/vax_sysdev.c @@ -235,12 +235,14 @@ static uint32 rom_delay = 0; t_stat rom_ex (t_value *vptr, t_addr exta, UNIT *uptr, int32 sw); t_stat rom_dep (t_value val, t_addr exta, UNIT *uptr, int32 sw); t_stat rom_reset (DEVICE *dptr); +t_stat rom_help (FILE *st, DEVICE *dptr, UNIT *uptr, int32 flag, char *cptr); char *rom_description (DEVICE *dptr); t_stat nvr_ex (t_value *vptr, t_addr exta, UNIT *uptr, int32 sw); t_stat nvr_dep (t_value val, t_addr exta, UNIT *uptr, int32 sw); t_stat nvr_reset (DEVICE *dptr); t_stat nvr_attach (UNIT *uptr, char *cptr); t_stat nvr_detach (UNIT *uptr); +t_stat nvr_help (FILE *st, DEVICE *dptr, UNIT *uptr, int32 flag, char *cptr); char *nvr_description (DEVICE *dptr); t_stat csi_reset (DEVICE *dptr); char *csi_description (DEVICE *dptr); @@ -249,6 +251,7 @@ t_stat cso_svc (UNIT *uptr); char *cso_description (DEVICE *dptr); t_stat tmr_svc (UNIT *uptr); t_stat sysd_reset (DEVICE *dptr); +t_stat sysd_help (FILE *st, DEVICE *dptr, UNIT *uptr, int32 flag, char *cptr); char *sysd_description (DEVICE *dptr); int32 rom_rd (int32 pa); @@ -314,8 +317,8 @@ REG rom_reg[] = { }; MTAB rom_mod[] = { - { UNIT_NODELAY, UNIT_NODELAY, "fast access", "NODELAY", NULL, NULL, NULL, "Disable calibrated ROM access speed" }, - { UNIT_NODELAY, 0, "1usec calibrated access", "DELAY", NULL, NULL, NULL, "Enable calibrated ROM access speed" }, + { UNIT_NODELAY, UNIT_NODELAY, "fast access", "NODELAY", NULL, NULL, NULL, "Disable calibrated delay - ROM runs like RAM" }, + { UNIT_NODELAY, 0, "1usec calibrated access", "DELAY", NULL, NULL, NULL, "Enable calibrated ROM delay - ROM runs slowly" }, { 0 } }; @@ -324,7 +327,7 @@ DEVICE rom_dev = { 1, 16, ROMAWIDTH, 4, 16, 32, &rom_ex, &rom_dep, &rom_reset, NULL, NULL, NULL, - NULL, 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, + NULL, 0, 0, NULL, NULL, NULL, &rom_help, NULL, NULL, &rom_description }; @@ -347,7 +350,7 @@ DEVICE nvr_dev = { 1, 16, NVRAWIDTH, 4, 16, 32, &nvr_ex, &nvr_dep, &nvr_reset, NULL, &nvr_attach, &nvr_detach, - NULL, 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, + NULL, 0, 0, NULL, NULL, NULL, &nvr_help, NULL, NULL, &nvr_description }; @@ -478,7 +481,7 @@ DEVICE sysd_dev = { 2, 16, 16, 1, 16, 8, NULL, NULL, &sysd_reset, NULL, NULL, NULL, - &sysd_dib, 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, + &sysd_dib, 0, 0, NULL, NULL, NULL, &sysd_help, NULL, NULL, &sysd_description }; @@ -605,6 +608,25 @@ if (rom == NULL) return SCPE_OK; } +t_stat rom_help (FILE *st, DEVICE *dptr, UNIT *uptr, int32 flag, char *cptr) +{ +fprintf (st, "Read-only memory (ROM)\n\n"); +fprintf (st, "The boot ROM consists of a single unit, simulating the 128KB boot ROM. It\n"); +fprintf (st, "has no registers. The boot ROM can be loaded with a binary byte stream\n"); +fprintf (st, "using the LOAD -r command:\n\n"); +fprintf (st, " LOAD -r KA655X.BIN load ROM image KA655X.BIN\n\n"); +fprintf (st, "When the simulator starts running (via the BOOT command), if the ROM has\n"); +fprintf (st, "not yet been loaded, an attempt will be made to automatically load the\n"); +fprintf (st, "ROM image from the file ka655x.bin in the current working directory.\n"); +fprintf (st, "If that load attempt fails, then a copy of the missing ROM file is\n"); +fprintf (st, "written to the current directory and the load attempt is retried.\n\n"); +fprintf (st, "ROM accesses a use a calibrated delay that slows ROM-based execution to\n"); +fprintf (st, "about 500K instructions per second. This delay is required to make the\n"); +fprintf (st, "power-up self-test routines run correctly on very fast hosts.\n"); +fprint_set_help (st, dptr); +return SCPE_OK; +} + char *rom_description (DEVICE *dptr) { return "read-only memory"; @@ -703,6 +725,19 @@ if ((uptr->flags & UNIT_ATT) == 0) return r; } +t_stat nvr_help (FILE *st, DEVICE *dptr, UNIT *uptr, int32 flag, char *cptr) +{ +fprintf (st, "Non-volatile Memory (NVR)\n\n"); +fprintf (st, "The NVR consists of a single unit, simulating 1KB of battery-backed up memory\n"); +fprintf (st, "in the SSC chip. When the simulator starts, NVR is cleared to 0, and the SSC\n"); +fprintf (st, "battery-low indicator is set. Normally, NVR is saved and restored like other\n"); +fprintf (st, "memory in the system. Alternately, NVR can be attached to a file. This\n"); +fprintf (st, "allows its contents to be saved and restored independently of other memories,\n"); +fprintf (st, "so that NVR state can be preserved across simulator runs.\n\n"); +fprintf (st, "Successfully loading an NVR image clears the SSC battery-low indicator.\n\n"); +return SCPE_OK; +} + char *nvr_description (DEVICE *dptr) { return "non-volatile memory"; @@ -1689,10 +1724,31 @@ ssc_otp = 0; return SCPE_OK; } +t_stat sysd_help (FILE *st, DEVICE *dptr, UNIT *uptr, int32 flag, char *cptr) +{ +fprintf (st, "System Devices (SYSD)\n\n"); +fprintf (st, "The system devices are the system-specific facilities implemented in the CVAX\n"); +fprintf (st, "chip, the KA655 CPU board, the CMCTL memory controller, and the SSC\n"); +fprintf (st, "system support chip. Note that the simulation of these devices is incomplete\n"); +fprintf (st, "and is intended strictly to allow the patched bootstrap and console code to\n"); +fprintf (st, "run.\n"); +fprint_reg_help (st, dptr); +fprintf (st, "\nBDR<7> is the halt-enabled switch. It controls how the console firmware\n"); +fprintf (st, "responds to a BOOT command, a kernel halt (if option CONHALT is set), or a\n"); +fprintf (st, "console halt (BREAK typed on the console terminal). If BDR<7> is set, the\n"); +fprintf (st, "onsole firmware responds to all these conditions by entering its interactive\n"); +fprintf (st, "command mode. If BDR<7> is clear, the console firmware boots the operating\n"); +fprintf (st, "system in response to these conditions. This bit can be set and cleared by\n"); +fprintf (st, "the command “SET CPU AUTOBOOT” (clearing the flag) and “SET CPU NOAUTOBOOT”\n"); +fprintf (st, "setting the flag. The default value is set.\n"); +return SCPE_OK; +} + char *sysd_description (DEVICE *dptr) { return "system devices"; } + t_stat cpu_set_model (UNIT *uptr, int32 val, char *cptr, void *desc) { if ((cptr == NULL) || (!*cptr))