diff --git a/VAX/vax860_abus.c b/VAX/vax860_abus.c index b6f4cec9..d6e69e52 100644 --- a/VAX/vax860_abus.c +++ b/VAX/vax860_abus.c @@ -192,7 +192,7 @@ DEVICE abus_dev = { }; /* -The 8600/8650 systems can have a max of 260MB of memory. +The 8600/8650 systems can have a max of 260MB of physical memory. There are three different memory boards that exists: 4MB, 16MB, and 64MB. In addition, you can mix different boards. The rule is to put large boards first, and smaller boards later. @@ -205,6 +205,13 @@ up any other slot. If you are using 16MB boards, the max memory is 68MB. Slot 0,2,4 and 6 will have 16MB boards. And then you can place a 4MB board in slot 7. Same story with the 64MB boards. + +The system architecture reserves 512MB of address space for memory, so the +simulated memory can be expanded up to 512MB using 2 256MB memory boards which +never existed but are easy to simulate. We call these fictional boards MS86-E + +The logic here fills as many slots as possible with memory boards to describe +the total system memory size. */ void init_pamm() @@ -212,28 +219,27 @@ void init_pamm() int32 addr = 0; int32 mem = (int32)(MEMSIZE >> 20); int32 slot = 0; -int32 size = 0; +int32 slots_remaining = 8; +int32 size = 4; int32 i; for (i=0; i<1024; i++) pamm[i] = PAMM_NXM; for (;mem > 0; ) { - if (mem >= 64) - size = 64; - else { - if (mem >= 16) - size = 16; - else - size = 4; - } - if ((size > 4) && (slot > 0)) + size = 4; + while (mem/size > slots_remaining/((size > 4) ? 2 : 1)) + size = size * 4; + if ((size > 4) && (slot > 0)) { slot++; + slots_remaining--; + } if (slot < 8) { for (i=0; i=0; i--) { } for (i=0; i<8; i++) { - if (slot[i] > 0) - fprintf(st, "Memory slot %d (@0x%08x): %d Mbytes.\n", i, base[i] << 20, slot[i]); + if (slot[i] > 0) { + for (j=0; boards[j].option && boards[j].capacity != slot[i]; ++j) + ; + fprintf(st, "Memory slot %d (@0x%08x): %3d Mbytes (%s).\n", i, base[i] << 20, boards[j].capacity, boards[j].option); + } } for (i=8; i<0x18; i++) { if (slot[i] > 0) - fprintf(st, "Unused code %d (@0x%08x): %d Mbytes.\n", i, base[i] << 20, slot[i]); + fprintf(st, "Unused code %d (@0x%08x): %3d Mbytes.\n", i, base[i] << 20, slot[i]); } for (i=0x18; i<0x1c; i++) { if (slot[i] > 0) - fprintf(st, "I/O adapter %d (@0x%08x): %d Mbytes.\n", i-0x18, base[i] << 20, slot[i]); + fprintf(st, "I/O adapter %d (@0x%08x): %3d Mbytes.\n", i-0x18, base[i] << 20, slot[i]); } for (i=0x1c; i<0x1f; i++) { if (slot[i] > 0) - fprintf(st, "Unused code %d (@0x%08x): %d Mbytes.\n", i, base[i] << 20, slot[i]); + fprintf(st, "Unused code %d (@0x%08x): %3d Mbytes.\n", i, base[i] << 20, slot[i]); } fprintf(st, "Ununsed address space: %d Mbytes.\n", slot[0x1f]); diff --git a/VAX/vax860_defs.h b/VAX/vax860_defs.h index ee4b6d23..a1d0b7f2 100644 --- a/VAX/vax860_defs.h +++ b/VAX/vax860_defs.h @@ -178,8 +178,8 @@ #define MAXMEMWIDTH 25 /* max mem, 4MB boards */ #define MAXMEMSIZE (1 << MAXMEMWIDTH) -#define MAXMEMWIDTH_X 28 /* max mem, 64MB boards */ -#define MAXMEMSIZE_X ((1 << MAXMEMWIDTH_X) + (1 << 22)) /* 8 64MB + 1 4MB */ +#define MAXMEMWIDTH_X 29 /* max mem space using non-existant 256MB boards */ +#define MAXMEMSIZE_X (1 << MAXMEMWIDTH_X) #define INITMEMSIZE (1 << MAXMEMWIDTH) /* initial memory size */ #define MEMSIZE (cpu_unit.capac) #define ADDR_IS_MEM(x) (((uint32) (x)) < MEMSIZE) @@ -192,6 +192,7 @@ { UNIT_MSIZE, (1u << 27), NULL, "128M", &cpu_set_size, NULL, NULL, "Set Memory to 128M bytes" }, \ { UNIT_MSIZE, (1u << 28), NULL, "256M", &cpu_set_size, NULL, NULL, "Set Memory to 256M bytes" }, \ { UNIT_MSIZE, (1u << 28) + (1u << 22), NULL, "260M", &cpu_set_size, NULL, NULL, "Set Memory to 260M bytes" }, \ + { UNIT_MSIZE, (1u << 29), NULL, "512M", &cpu_set_size, NULL, NULL, "Set Memory to 512M bytes" }, \ { MTAB_XTD|MTAB_VDV|MTAB_NMO, 0, "MEMORY", NULL, NULL, &cpu_show_memory, NULL, "Display memory configuration" } extern t_stat cpu_show_memory (FILE* st, UNIT* uptr, int32 val, void* desc); diff --git a/scp.c b/scp.c index 2a5df1db..9d8ca876 100644 --- a/scp.c +++ b/scp.c @@ -2556,7 +2556,9 @@ else if ((shptr = find_shtab (show_glob_tab, gbuf))) /* global? */ else { if (sim_dflt_dev->modifiers) for (mptr = sim_dflt_dev->modifiers; mptr->mask != 0; mptr++) { - if (mptr->mstring && (MATCH_CMD (gbuf, mptr->mstring) == 0)) { + if ((((mptr->mask & MTAB_VDV) == MTAB_VDV) && + (mptr->pstring && (MATCH_CMD (gbuf, mptr->pstring) == 0))) || + (!(mptr->mask & MTAB_VDV) && (mptr->mstring && (MATCH_CMD (gbuf, mptr->mstring) == 0)))) { dptr = sim_dflt_dev; cptr -= strlen (gbuf) + 1; while (isspace(*cptr))