1
0
mirror of https://github.com/simh/simh.git synced 2026-01-25 19:56:25 +00:00

Returned the pdp11_cr device to the VAX Qbus systems and changed the pdp11_cr device to properly describe itself as a Qbus capable device when CR11 device is being simulated since it is a programmed I/O device and doesn't have bus addressing issues that DMA devices have.

This commit is contained in:
Mark Pizzolato
2013-02-04 06:53:10 -08:00
parent 8a97baa553
commit 6b4353f257
11 changed files with 66 additions and 9 deletions

View File

@@ -174,15 +174,15 @@ extern int32 int_req;
#elif defined (VM_VAX) /* VAX version */
#include "vax_defs.h"
extern int32 int_req[IPL_HLVL];
#define DFLT_DIS (0)
#define DFLT_CR11 (UNIT_CR11)
#define DFLT_DIS (DEV_QBUS) /* CR11 is programmed I/O only, Qbus OK */
#define DFLT_CR11 (UNIT_CR11) /* CR11 only */
#define DFLT_CPM 285
#else /* PDP-11 version */
#include "pdp11_defs.h"
extern int32 int_req[IPL_HLVL];
#define DFLT_DIS (DEV_DIS)
#define DFLT_CR11 (UNIT_CR11)
#define DFLT_DIS (DEV_QBUS) /* CR11 is programmed I/O only, Qbus OK */
#define DFLT_CR11 (UNIT_CR11) /* Default, but changable */
#define DFLT_CPM 285
#endif
@@ -1148,9 +1148,18 @@ t_stat cr_set_type ( UNIT *uptr,
char *cptr,
void *desc )
{
DEVICE *dptr = find_dev_from_unit (uptr);
/* disallow type change if currently attached */
if (uptr->flags & UNIT_ATT)
return (SCPE_NOFNC);
if (val == UNIT_CR11) {
dptr->flags |= DEV_QBUS; /* Can be a Qbus device - programmed I/O only */
} else { /* CD11 is 18bit DMA device */
if (!UNIBUS)
return SCPE_NOFNC;
dptr->flags &= ~DEV_QBUS; /* Not on a Qbus (22bit) */
}
cpm = (val & UNIT_CR11) ? 285 : 1000;
uptr->wait = (60 * 1000) / cpm;
return (SCPE_OK);

View File

@@ -575,11 +575,6 @@ if (name) { /* updating? */
autp->numc = nctrl;
}
}
dptr = find_dev (name); /* find ctrl */
if (dptr && !UNIBUS && !(dptr->flags & DEV_DIS) && !(dptr->flags & DEV_QBUS)) {
dptr->flags |= DEV_DIS;
return SCPE_ARG;
}
}
for (autp = auto_tab; autp->numc >= 0; autp++) { /* loop thru table */
if (autp->amod) { /* floating csr? */
@@ -595,6 +590,17 @@ for (autp = auto_tab; autp->numc >= 0; autp++) { /* loop thru table */
(dptr->flags & DEV_NEXUS) ||
!(dptr->flags & (DEV_UBUS | DEV_QBUS | DEV_Q18)) )
continue;
/* Sanity check that enabled devices can work on the current bus */
if ((!UNIBUS && !(dptr->flags & DEV_QBUS)) ||
(UNIBUS && !(dptr->flags & (DEV_UBUS | DEV_Q18)))) {
dptr->flags |= DEV_DIS;
if (sim_switches & SWMASK ('P'))
continue;
printf ("%s device not compatible with system bus\n", sim_dname(dptr));
if (sim_log)
fprintf (sim_log, "%s device not compatible with system bus\n", sim_dname(dptr));
return SCPE_NOFNC;
}
dibp = (DIB *) dptr->ctxt; /* get DIB */
if (dibp == NULL) /* not there??? */
return SCPE_IERR;