From bdddcb4004bfa40cf13c9c30177c6b3edc385136 Mon Sep 17 00:00:00 2001 From: Mark Pizzolato Date: Mon, 18 Dec 2017 05:10:27 -0800 Subject: [PATCH] VAX, MicroVAX2: Add display of ROM and NVR address ranges --- PDP11/pdp11_io_lib.c | 10 ++++++++++ PDP11/pdp11_io_lib.h | 1 + VAX/vax630_sysdev.c | 8 +++++++- VAX/vax_sysdev.c | 8 +++++++- 4 files changed, 25 insertions(+), 2 deletions(-) diff --git a/PDP11/pdp11_io_lib.c b/PDP11/pdp11_io_lib.c index 66cdc61b..b6865dfd 100644 --- a/PDP11/pdp11_io_lib.c +++ b/PDP11/pdp11_io_lib.c @@ -169,6 +169,16 @@ if (dptr == NULL) return auto_config (NULL, 0); /* autoconfigure */ } +/* Show device address */ + +t_stat show_mapped_addr (FILE *st, UNIT *uptr, int32 val, CONST void *desc) +{ +uint32 base = (uint32)desc; + +fprintf (st, "address=%08X-%08X", base, (int)(base + uptr->capac - 1)); +return SCPE_OK; +} + /* Change device vector */ t_stat set_vec (UNIT *uptr, int32 arg, CONST char *cptr, void *desc) diff --git a/PDP11/pdp11_io_lib.h b/PDP11/pdp11_io_lib.h index d213e539..93518e5f 100644 --- a/PDP11/pdp11_io_lib.h +++ b/PDP11/pdp11_io_lib.h @@ -31,6 +31,7 @@ t_stat set_autocon (UNIT *uptr, int32 val, CONST char *cptr, void *desc); t_stat show_autocon (FILE *st, UNIT *uptr, int32 val, CONST void *desc); t_stat set_addr (UNIT *uptr, int32 val, CONST char *cptr, void *desc); t_stat show_addr (FILE *st, UNIT *uptr, int32 val, CONST void *desc); +t_stat show_mapped_addr (FILE *st, UNIT *uptr, int32 val, CONST void *desc); t_stat set_addr_flt (UNIT *uptr, int32 val, CONST char *cptr, void *desc); t_stat set_vec (UNIT *uptr, int32 arg, CONST char *cptr, void *desc); t_stat show_vec (FILE *st, UNIT *uptr, int32 arg, CONST void *desc); diff --git a/VAX/vax630_sysdev.c b/VAX/vax630_sysdev.c index 65746658..97fa8c52 100644 --- a/VAX/vax630_sysdev.c +++ b/VAX/vax630_sysdev.c @@ -206,6 +206,7 @@ REG rom_reg[] = { }; MTAB rom_mod[] = { + { MTAB_XTD|MTAB_VDV, 0, "ADDRESS", NULL, NULL, &show_mapped_addr, (void *)ROMBASE, "Display base address" }, { 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" }, { 0 } @@ -234,8 +235,13 @@ REG nvr_reg[] = { { NULL } }; +MTAB nvr_mod[] = { + { MTAB_XTD|MTAB_VDV, 0, "ADDRESS", NULL, NULL, &show_mapped_addr, (void *)NVRBASE, "Display base address" }, + { 0 } + }; + DEVICE nvr_dev = { - "NVR", &nvr_unit, nvr_reg, NULL, + "NVR", &nvr_unit, nvr_reg, nvr_mod, 1, 16, NVRAWIDTH, 4, 16, 32, &nvr_ex, &nvr_dep, &nvr_reset, NULL, &nvr_attach, &nvr_detach, diff --git a/VAX/vax_sysdev.c b/VAX/vax_sysdev.c index 55daf95a..746dbe5b 100644 --- a/VAX/vax_sysdev.c +++ b/VAX/vax_sysdev.c @@ -337,6 +337,7 @@ REG rom_reg[] = { }; MTAB rom_mod[] = { + { MTAB_XTD|MTAB_VDV, 0, "ADDRESS", NULL, NULL, &show_mapped_addr, (void *)ROMBASE, "Display base address" }, { 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 } @@ -365,8 +366,13 @@ REG nvr_reg[] = { { NULL } }; +MTAB nvr_mod[] = { + { MTAB_XTD|MTAB_VDV, 0, "ADDRESS", NULL, NULL, &show_mapped_addr, (void *)NVRBASE, "Display base address" }, + { 0 } + }; + DEVICE nvr_dev = { - "NVR", &nvr_unit, nvr_reg, NULL, + "NVR", &nvr_unit, nvr_reg, nvr_mod, 1, 16, NVRAWIDTH, 4, 16, 32, &nvr_ex, &nvr_dep, &nvr_reset, NULL, &nvr_attach, &nvr_detach,