PDP11: Fix to allow allow Q18 devices to be enabled on Qbus systems with memory <= 256KB. Reported by Christian Gauger-Cosgrove.

The devices which are affected by this are: RK, HK, RM and VT.
This commit is contained in:
Mark Pizzolato 2014-01-26 18:09:06 -08:00
parent 9ab6c4d1c1
commit 4ec1f7ed2b

View file

@ -47,6 +47,10 @@ extern t_stat build_dib_tab (void);
static DIB *iodibp[IOPAGESIZE >> 1]; static DIB *iodibp[IOPAGESIZE >> 1];
#if !defined(UNIMEMSIZE)
#define UNIMEMSIZE 001000000 /* 2**18 */
#endif
#define AUTO_MAXC 32 /* Maximum number of controllers */ #define AUTO_MAXC 32 /* Maximum number of controllers */
#define AUTO_CSRBASE 0010 #define AUTO_CSRBASE 0010
#define AUTO_CSRMAX 04000 #define AUTO_CSRMAX 04000
@ -765,6 +769,7 @@ t_stat auto_config (char *name, int32 nctrl)
{ {
uint32 csr = IOPAGEBASE + AUTO_CSRBASE; uint32 csr = IOPAGEBASE + AUTO_CSRBASE;
uint32 vec = VEC_Q + AUTO_VECBASE; uint32 vec = VEC_Q + AUTO_VECBASE;
extern UNIT cpu_unit;
AUTO_CON *autp; AUTO_CON *autp;
DEVICE *dptr; DEVICE *dptr;
DIB *dibp; DIB *dibp;
@ -801,8 +806,9 @@ for (autp = auto_tab; autp->numc >= 0; autp++) { /* loop thru table */
!(dptr->flags & (DEV_UBUS | DEV_QBUS | DEV_Q18)) ) !(dptr->flags & (DEV_UBUS | DEV_QBUS | DEV_Q18)) )
continue; continue;
/* Sanity check that enabled devices can work on the current bus */ /* Sanity check that enabled devices can work on the current bus */
if ((!UNIBUS && !(dptr->flags & DEV_QBUS)) || if (!((UNIBUS && (dptr->flags & (DEV_UBUS | DEV_Q18))) ||
(UNIBUS && !(dptr->flags & (DEV_UBUS | DEV_Q18)))) { ((!UNIBUS) && ((dptr->flags & DEV_QBUS) ||
((dptr->flags & DEV_Q18) && (MEMSIZE <= UNIMEMSIZE)))))) {
dptr->flags |= DEV_DIS; dptr->flags |= DEV_DIS;
if (sim_switches & SWMASK ('P')) if (sim_switches & SWMASK ('P'))
continue; continue;