Added SHOW CPU MEMORY to the MicroVAX I simulator
This commit is contained in:
parent
d245c0b77c
commit
471ea3efce
4 changed files with 35 additions and 4 deletions
|
@ -351,7 +351,7 @@ AUTO_CON auto_tab[] = {/*c #v am vm fxa fxv */
|
||||||
{ { "QBA" }, 1, 0, 0, 0,
|
{ { "QBA" }, 1, 0, 0, 0,
|
||||||
{017500} }, /* doorbell - fx CSR, no VEC */
|
{017500} }, /* doorbell - fx CSR, no VEC */
|
||||||
{ { "MCTL" }, 1, 0, 0, 0,
|
{ { "MCTL" }, 1, 0, 0, 0,
|
||||||
{012100} }, /* MSV11-P - fx CSR, no VEC */
|
{012100} }, /* MSV11-P/MSV11-Q - fx CSR, no VEC */
|
||||||
{ { "KE" }, 1, 0, 0, 0,
|
{ { "KE" }, 1, 0, 0, 0,
|
||||||
{017300} }, /* KE11-A - fx CSR, no VEC */
|
{017300} }, /* KE11-A - fx CSR, no VEC */
|
||||||
{ { "KG" }, 1, 0, 0, 0,
|
{ { "KG" }, 1, 0, 0, 0,
|
||||||
|
|
|
@ -94,10 +94,13 @@
|
||||||
#define ADDR_IS_MEM(x) (((uint32) (x)) < MEMSIZE)
|
#define ADDR_IS_MEM(x) (((uint32) (x)) < MEMSIZE)
|
||||||
#undef PAMASK
|
#undef PAMASK
|
||||||
#define PAMASK 0x203FFFFF /* KA610 needs a special mask */
|
#define PAMASK 0x203FFFFF /* KA610 needs a special mask */
|
||||||
#define MEM_MODIFIERS { UNIT_MSIZE, (1u << 19), NULL, "512k", &cpu_set_size, NULL, NULL, "Set Memory to 512K bytes" },\
|
#define MEM_MODIFIERS { UNIT_MSIZE, (1u << 19), NULL, "512K", &cpu_set_size, NULL, NULL, "Set Memory to 512K bytes" },\
|
||||||
|
{ UNIT_MSIZE, (1u << 19) + (1u << 18), NULL, "768K", &cpu_set_size, NULL, NULL, "Set Memory to 1M bytes" }, \
|
||||||
{ UNIT_MSIZE, (1u << 20), NULL, "1M", &cpu_set_size, NULL, NULL, "Set Memory to 1M bytes" }, \
|
{ UNIT_MSIZE, (1u << 20), NULL, "1M", &cpu_set_size, NULL, NULL, "Set Memory to 1M bytes" }, \
|
||||||
{ UNIT_MSIZE, (1u << 21), NULL, "2M", &cpu_set_size, NULL, NULL, "Set Memory to 2M bytes" }, \
|
{ UNIT_MSIZE, (1u << 21), NULL, "2M", &cpu_set_size, NULL, NULL, "Set Memory to 2M bytes" }, \
|
||||||
{ UNIT_MSIZE, (1u << 22), NULL, "4M", &cpu_set_size, NULL, NULL, "Set Memory to 4M bytes" }
|
{ UNIT_MSIZE, (1u << 22), NULL, "4M", &cpu_set_size, NULL, NULL, "Set Memory to 4M 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);
|
||||||
#define CPU_MODEL_MODIFIERS { MTAB_XTD|MTAB_VDV, 0, "LEDS", NULL, \
|
#define CPU_MODEL_MODIFIERS { MTAB_XTD|MTAB_VDV, 0, "LEDS", NULL, \
|
||||||
NULL, &cpu_show_leds, NULL, "Display the CPU LED values" }, \
|
NULL, &cpu_show_leds, NULL, "Display the CPU LED values" }, \
|
||||||
{ MTAB_XTD|MTAB_VDV, 0, "MODEL", NULL, \
|
{ MTAB_XTD|MTAB_VDV, 0, "MODEL", NULL, \
|
||||||
|
|
|
@ -73,7 +73,7 @@ DEVICE mctl_dev = {
|
||||||
1, DEV_RDX, 20, 1, DEV_RDX, 8,
|
1, DEV_RDX, 20, 1, DEV_RDX, 8,
|
||||||
NULL, NULL, &mctl_reset,
|
NULL, NULL, &mctl_reset,
|
||||||
NULL, NULL, NULL,
|
NULL, NULL, NULL,
|
||||||
&mctl_dib, DEV_Q18, 0, NULL, NULL, NULL, NULL, NULL, NULL,
|
&mctl_dib, DEV_QBUS, 0, NULL, NULL, NULL, NULL, NULL, NULL,
|
||||||
&mctl_description
|
&mctl_description
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -119,3 +119,30 @@ void rom_wr_B (int32 pa, int32 val)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
t_stat cpu_show_memory (FILE* st, UNIT* uptr, int32 val, void* desc)
|
||||||
|
{
|
||||||
|
uint32 memsize = (uint32)(MEMSIZE>>10);
|
||||||
|
uint32 baseaddr = 0;
|
||||||
|
uint32 csraddr = mctl_dib.ba;
|
||||||
|
struct {
|
||||||
|
uint32 capacity;
|
||||||
|
char *option;
|
||||||
|
} boards[] = {
|
||||||
|
{ 4096, "MSV11-QC"},
|
||||||
|
{ 2048, "MSV11-QB"},
|
||||||
|
{ 1024, "MSV11-QA"},
|
||||||
|
{ 512, "MSV11-PL"},
|
||||||
|
{ 256, "MSV11-PK"},
|
||||||
|
{ 0, NULL}};
|
||||||
|
int32 i;
|
||||||
|
|
||||||
|
while (memsize) {
|
||||||
|
for (i=0; boards[i].capacity > memsize; ++i)
|
||||||
|
;
|
||||||
|
fprintf(st, "Memory (0x%08x): %3d %sbytes (%s) - CSR: 0x%08x.\n", baseaddr, boards[i].capacity/((boards[i].capacity >= 1024) ? 1024 : 1), (boards[i].capacity >= 1024) ? "M" : "K", boards[i].option, csraddr);
|
||||||
|
memsize -= boards[i].capacity;
|
||||||
|
baseaddr += boards[i].capacity*1024;
|
||||||
|
csraddr += (boards[i].capacity/256)*2;
|
||||||
|
}
|
||||||
|
return SCPE_OK;
|
||||||
|
}
|
||||||
|
|
1
scp.c
1
scp.c
|
@ -2560,6 +2560,7 @@ else {
|
||||||
(mptr->pstring && (MATCH_CMD (gbuf, mptr->pstring) == 0))) ||
|
(mptr->pstring && (MATCH_CMD (gbuf, mptr->pstring) == 0))) ||
|
||||||
(!(mptr->mask & MTAB_VDV) && (mptr->mstring && (MATCH_CMD (gbuf, mptr->mstring) == 0)))) {
|
(!(mptr->mask & MTAB_VDV) && (mptr->mstring && (MATCH_CMD (gbuf, mptr->mstring) == 0)))) {
|
||||||
dptr = sim_dflt_dev;
|
dptr = sim_dflt_dev;
|
||||||
|
lvl = MTAB_VDV; /* device match */
|
||||||
cptr -= strlen (gbuf) + 1;
|
cptr -= strlen (gbuf) + 1;
|
||||||
while (isspace(*cptr))
|
while (isspace(*cptr))
|
||||||
++cptr;
|
++cptr;
|
||||||
|
|
Loading…
Add table
Reference in a new issue