mirror of
https://github.com/open-simh/simh.git
synced 2026-04-27 12:39:13 +00:00
Qbus & Unibus VAX: Add a SHOW QBA|UBA MAP{=n} command to display the bus map
This commit is contained in:
@@ -87,10 +87,8 @@ t_stat qba_ex (t_value *vptr, t_addr exta, UNIT *uptr, int32 sw);
|
||||
t_stat qba_dep (t_value val, t_addr exta, UNIT *uptr, int32 sw);
|
||||
t_bool qba_map_addr (uint32 qa, uint32 *ma);
|
||||
t_bool qba_map_addr_c (uint32 qa, uint32 *ma);
|
||||
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 show_iospace (FILE *st, UNIT *uptr, int32 val, CONST void *desc);
|
||||
t_stat qba_show_virt (FILE *of, UNIT *uptr, int32 val, CONST void *desc);
|
||||
t_stat qba_show_map (FILE *of, UNIT *uptr, int32 val, CONST void *desc);
|
||||
t_stat qba_help (FILE *st, DEVICE *dptr, UNIT *uptr, int32 flag, const char *cptr);
|
||||
const char *qba_description (DEVICE *dptr);
|
||||
|
||||
@@ -132,6 +130,8 @@ MTAB qba_mod[] = {
|
||||
&set_autocon, NULL, NULL, "Disable autoconfiguration" },
|
||||
{ MTAB_XTD|MTAB_VDV|MTAB_NMO|MTAB_SHP, 0, "VIRTUAL", NULL,
|
||||
NULL, &qba_show_virt, NULL, "Display translation for Qbus address arg" },
|
||||
{ MTAB_XTD|MTAB_VDV|MTAB_NMO|MTAB_SHP, 0, "MAP", NULL,
|
||||
NULL, &qba_show_map, NULL, "Display Qbus map register(s)" },
|
||||
{ 0 }
|
||||
};
|
||||
|
||||
@@ -814,6 +814,13 @@ fprintf (of, "Invalid argument\n");
|
||||
return SCPE_OK;
|
||||
}
|
||||
|
||||
/* Show QBA map register(s) */
|
||||
|
||||
t_stat qba_show_map (FILE *of, UNIT *uptr, int32 val, CONST void *desc)
|
||||
{
|
||||
return show_bus_map (of, (const char *)desc, (uint32 *)qb_map, QBNMAPR, "Qbus", QBMAP_VLD);
|
||||
}
|
||||
|
||||
t_stat qba_help (FILE *st, DEVICE *dptr, UNIT *uptr, int32 flag, const char *cptr)
|
||||
{
|
||||
fprintf (st, "Qbus Adapter (QBA)\n\n");
|
||||
|
||||
@@ -103,10 +103,8 @@ int32 uba_get_ubvector (int32 lvl);
|
||||
t_bool uba_eval_int (int32 lvl);
|
||||
void uba_ubpdn (int32 time);
|
||||
t_bool uba_map_addr (uint32 ua, uint32 *ma);
|
||||
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 show_iospace (FILE *st, UNIT *uptr, int32 val, CONST void *desc);
|
||||
t_stat uba_show_virt (FILE *st, UNIT *uptr, int32 val, CONST void *desc);
|
||||
t_stat uba_show_map (FILE *st, UNIT *uptr, int32 val, CONST void *desc);
|
||||
|
||||
extern int32 eval_int (void);
|
||||
extern t_stat build_dib_tab (void);
|
||||
@@ -160,6 +158,8 @@ MTAB uba_mod[] = {
|
||||
&set_autocon, NULL, NULL, "Disable autoconfiguration" },
|
||||
{ MTAB_XTD|MTAB_VDV|MTAB_NMO|MTAB_SHP, 0, "VIRTUAL", NULL,
|
||||
NULL, &uba_show_virt, NULL, "Display translation for Unibus address arg" },
|
||||
{ MTAB_XTD|MTAB_VDV|MTAB_NMO|MTAB_SHP, 0, "MAP", NULL,
|
||||
NULL, &uba_show_map, NULL, "Display Unibus Map Register(s)" },
|
||||
{ 0 }
|
||||
};
|
||||
|
||||
@@ -671,3 +671,10 @@ const char *uba_description (DEVICE *dptr)
|
||||
{
|
||||
return "Unibus adapter";
|
||||
}
|
||||
|
||||
/* Show UBA map register(s) */
|
||||
|
||||
t_stat uba_show_map (FILE *of, UNIT *uptr, int32 val, CONST void *desc)
|
||||
{
|
||||
return show_bus_map (of, (const char *)desc, uba_map, UBA_NMAPR, "Unibus", UBAMAP_VLD);
|
||||
}
|
||||
|
||||
@@ -92,10 +92,8 @@ int32 uba_get_ubvector (int32 lvl);
|
||||
void uba_eval_int (void);
|
||||
void uba_ioreset (void);
|
||||
t_bool uba_map_addr (uint32 ua, uint32 *ma);
|
||||
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 show_iospace (FILE *st, UNIT *uptr, int32 val, CONST void *desc);
|
||||
t_stat uba_show_virt (FILE *st, UNIT *uptr, int32 val, CONST void *desc);
|
||||
t_stat uba_show_map (FILE *st, UNIT *uptr, int32 val, CONST void *desc);
|
||||
|
||||
extern int32 eval_int (void);
|
||||
extern t_stat build_dib_tab (void);
|
||||
@@ -153,6 +151,8 @@ MTAB uba_mod[] = {
|
||||
&set_autocon, NULL, NULL, "Disable autoconfiguration" },
|
||||
{ MTAB_XTD|MTAB_VDV|MTAB_NMO|MTAB_SHP, 0, "VIRTUAL", NULL,
|
||||
NULL, &uba_show_virt, NULL, "Display translation for Unibus address arg" },
|
||||
{ MTAB_XTD|MTAB_VDV|MTAB_NMO|MTAB_SHP, 0, "MAP", NULL,
|
||||
NULL, &uba_show_map, NULL, "Display Unibus Map Register(s)" },
|
||||
{ 0 }
|
||||
};
|
||||
|
||||
@@ -664,3 +664,10 @@ if (cptr) {
|
||||
fprintf (of, "Invalid argument\n");
|
||||
return SCPE_OK;
|
||||
}
|
||||
|
||||
/* Show UBA map register(s) */
|
||||
|
||||
t_stat uba_show_map (FILE *of, UNIT *uptr, int32 val, CONST void *desc)
|
||||
{
|
||||
return show_bus_map (of, (const char *)desc, uba_map, UBA_NMAPR, "Unibus", UBAMAP_VLD);
|
||||
}
|
||||
|
||||
@@ -197,10 +197,8 @@ void uba_adap_clr_int ();
|
||||
void uba_set_dpr (uint32 ua, t_bool wr);
|
||||
void uba_ubpdn (int32 time);
|
||||
t_bool uba_map_addr (uint32 ua, uint32 *ma);
|
||||
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 show_iospace (FILE *st, UNIT *uptr, int32 val, CONST void *desc);
|
||||
t_stat uba_show_virt (FILE *st, UNIT *uptr, int32 val, CONST void *desc);
|
||||
t_stat uba_show_map (FILE *st, UNIT *uptr, int32 val, CONST void *desc);
|
||||
|
||||
extern int32 eval_int (void);
|
||||
extern t_stat build_dib_tab (void);
|
||||
@@ -273,6 +271,8 @@ MTAB uba_mod[] = {
|
||||
{ MTAB_XTD|MTAB_VDV|MTAB_NMO|MTAB_SHP, 0, "VIRTUAL", NULL,
|
||||
NULL, &uba_show_virt, NULL, "Show physical address translation for Unibus\n"
|
||||
" address arg" },
|
||||
{ MTAB_XTD|MTAB_VDV|MTAB_NMO|MTAB_SHP, 0, "MAP", NULL,
|
||||
NULL, &uba_show_map, NULL, "Display Unibus Map Register(s)" },
|
||||
{ 0 }
|
||||
};
|
||||
|
||||
@@ -1003,3 +1003,10 @@ if (cptr) {
|
||||
fprintf (of, "Invalid argument\n");
|
||||
return SCPE_OK;
|
||||
}
|
||||
|
||||
/* Show UBA map register(s) */
|
||||
|
||||
t_stat uba_show_map (FILE *of, UNIT *uptr, int32 val, CONST void *desc)
|
||||
{
|
||||
return show_bus_map (of, (const char *)desc, uba_map, UBA_NMAPR, "Unibus", UBAMAP_VLD);
|
||||
}
|
||||
|
||||
@@ -147,10 +147,8 @@ void uba_adap_set_int ();
|
||||
void uba_adap_clr_int ();
|
||||
void uba_ubpdn (int32 time);
|
||||
t_bool uba_map_addr (uint32 ua, uint32 *ma);
|
||||
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 show_iospace (FILE *st, UNIT *uptr, int32 val, CONST void *desc);
|
||||
t_stat uba_show_virt (FILE *st, UNIT *uptr, int32 val, CONST void *desc);
|
||||
t_stat uba_show_map (FILE *st, UNIT *uptr, int32 val, CONST void *desc);
|
||||
|
||||
extern int32 eval_int (void);
|
||||
extern t_stat build_dib_tab (void);
|
||||
@@ -206,15 +204,17 @@ REG uba_reg[] = {
|
||||
|
||||
MTAB uba_mod[] = {
|
||||
{ MTAB_XTD|MTAB_VDV, TR_UBA, "NEXUS", NULL,
|
||||
NULL, &show_nexus },
|
||||
NULL, &show_nexus, NULL, "Display nexus" },
|
||||
{ MTAB_XTD|MTAB_VDV|MTAB_NMO, 0, "IOSPACE", NULL,
|
||||
NULL, &show_iospace },
|
||||
NULL, &show_iospace, NULL, "Display I/O space address map" },
|
||||
{ MTAB_XTD|MTAB_VDV, 1, "AUTOCONFIG", "AUTOCONFIG",
|
||||
&set_autocon, &show_autocon },
|
||||
&set_autocon, &show_autocon, NULL, "Enable/Display autoconfiguration" },
|
||||
{ MTAB_XTD|MTAB_VDV, 0, NULL, "NOAUTOCONFIG",
|
||||
&set_autocon, NULL },
|
||||
&set_autocon, NULL, NULL, "Disable autoconfiguration" },
|
||||
{ MTAB_XTD|MTAB_VDV|MTAB_NMO|MTAB_SHP, 0, "VIRTUAL", NULL,
|
||||
NULL, &uba_show_virt },
|
||||
NULL, &uba_show_virt, NULL, "Display translation for Unibus address arg" },
|
||||
{ MTAB_XTD|MTAB_VDV|MTAB_NMO|MTAB_SHP, 0, "MAP", NULL,
|
||||
NULL, &uba_show_map, NULL, "Display Unibus Map Register(s)" },
|
||||
{ 0 }
|
||||
};
|
||||
|
||||
@@ -990,3 +990,10 @@ if (cptr) {
|
||||
fprintf (of, "Invalid argument\n");
|
||||
return SCPE_OK;
|
||||
}
|
||||
|
||||
/* Show UBA map register(s) */
|
||||
|
||||
t_stat uba_show_map (FILE *of, UNIT *uptr, int32 val, CONST void *desc)
|
||||
{
|
||||
return show_bus_map (of, (const char *)desc, uba_map, UBA_NMAPR, "Unibus", UBAMAP_VLD);
|
||||
}
|
||||
|
||||
17
VAX/vax_io.c
17
VAX/vax_io.c
@@ -132,10 +132,8 @@ t_stat qba_ex (t_value *vptr, t_addr exta, UNIT *uptr, int32 sw);
|
||||
t_stat qba_dep (t_value val, t_addr exta, UNIT *uptr, int32 sw);
|
||||
t_bool qba_map_addr (uint32 qa, uint32 *ma);
|
||||
t_bool qba_map_addr_c (uint32 qa, uint32 *ma);
|
||||
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 show_iospace (FILE *st, UNIT *uptr, int32 val, CONST void *desc);
|
||||
t_stat qba_show_virt (FILE *of, UNIT *uptr, int32 val, CONST void *desc);
|
||||
t_stat qba_show_map (FILE *of, UNIT *uptr, int32 val, CONST void *desc);
|
||||
t_stat qba_help (FILE *st, DEVICE *dptr, UNIT *uptr, int32 flag, const char *cptr);
|
||||
const char *qba_description (DEVICE *dptr);
|
||||
|
||||
@@ -175,7 +173,9 @@ MTAB qba_mod[] = {
|
||||
{ MTAB_XTD|MTAB_VDV, 0, NULL, "NOAUTOCONFIG",
|
||||
&set_autocon, NULL, NULL, "Disable autoconfiguration" },
|
||||
{ MTAB_XTD|MTAB_VDV|MTAB_NMO|MTAB_SHP, 0, "VIRTUAL", NULL,
|
||||
NULL, &qba_show_virt, NULL, "Display translation for Unibus address arg" },
|
||||
NULL, &qba_show_virt, NULL, "Display translation for Qbus address arg" },
|
||||
{ MTAB_XTD|MTAB_VDV|MTAB_NMO|MTAB_SHP, 0, "MAP", NULL,
|
||||
NULL, &qba_show_map, NULL, "Display Qbus map register(s)" },
|
||||
{ 0 }
|
||||
};
|
||||
|
||||
@@ -959,6 +959,15 @@ fprintf (of, "Invalid argument\n");
|
||||
return SCPE_OK;
|
||||
}
|
||||
|
||||
/* Show QBA map register(s) */
|
||||
|
||||
t_stat qba_show_map (FILE *of, UNIT *uptr, int32 val, CONST void *desc)
|
||||
{
|
||||
uint32 *qb_map = &M[cq_mbr >> 2];
|
||||
|
||||
return show_bus_map (of, (const char *)desc, qb_map, (CQMAPSIZE >> 2), "Qbus", CQMAP_VLD);
|
||||
}
|
||||
|
||||
t_stat qba_help (FILE *st, DEVICE *dptr, UNIT *uptr, int32 flag, const char *cptr)
|
||||
{
|
||||
fprintf (st, "Qbus Adapter (QBA)\n\n");
|
||||
|
||||
Reference in New Issue
Block a user