PDP11: Allow a device to have a linked list of DIB structures

This allows a single device to have multiple disjoint parts of the I/O page
This commit is contained in:
Mark Pizzolato 2018-09-06 02:35:23 -07:00
parent 2ed1ed9049
commit 5f0370749e
2 changed files with 13 additions and 11 deletions

View file

@ -527,6 +527,7 @@ struct pdp_dib {
/* simulated through a single */
/* DEVICE structure (e.g., DZ, VH, DL, DC). */
/* Populated by auto-configure */
struct pdp_dib *next; /* devices with more than one DIB can chain them */
};
typedef struct pdp_dib DIB;

View file

@ -406,7 +406,7 @@ for (i = 0; i < 7; i++) /* seed PIRQ intr */
if ((r = cpu_build_dib ())) /* build CPU entries */
return r;
for (i = 0; (dptr = sim_devices[i]) != NULL; i++) { /* loop thru dev */
dibp = (DIB *) dptr->ctxt; /* get DIB */
for (dibp = (DIB *) dptr->ctxt; dibp; dibp = dibp->next) { /* loop thru dibs */
if (dibp && !(dptr->flags & DEV_DIS)) { /* defined, enabled? */
if (dptr->flags & DEV_MBUS) { /* Massbus? */
if ((r = build_mbus_tab (dptr, dibp))) /* add to Mbus tab */
@ -417,6 +417,7 @@ for (i = 0; (dptr = sim_devices[i]) != NULL; i++) { /* loop thru dev */
return r;
}
} /* end if enabled */
}
} /* end for */
return SCPE_OK;
}