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;

View file

@ -37,6 +37,7 @@ extern DEVICE tlb_dev;
extern DEVICE sysd_dev;
extern DEVICE qba_dev;
extern DEVICE tti_dev, tto_dev;
extern DEVICE cr_dev;
extern DEVICE lpt_dev;
extern DEVICE clk_dev;
extern DEVICE rq_dev, rqb_dev, rqc_dev, rqd_dev;
@ -61,6 +62,7 @@ DEVICE *sim_devices[] = {
&tto_dev,
&dz_dev,
&vh_dev,
&cr_dev,
&lpt_dev,
&rl_dev,
&rq_dev,

View file

@ -43,6 +43,7 @@ extern DEVICE wtc_dev;
extern DEVICE sysd_dev;
extern DEVICE qba_dev;
extern DEVICE tti_dev, tto_dev;
extern DEVICE cr_dev;
extern DEVICE lpt_dev;
extern DEVICE clk_dev;
extern DEVICE rq_dev, rqb_dev, rqc_dev, rqd_dev;
@ -70,6 +71,7 @@ DEVICE *sim_devices[] = {
&tto_dev,
&dz_dev,
&vh_dev,
&cr_dev,
&lpt_dev,
&rl_dev,
&rq_dev,

View file

@ -39,6 +39,7 @@ extern DEVICE nvr_dev;
extern DEVICE sysd_dev;
extern DEVICE qba_dev;
extern DEVICE tti_dev, tto_dev;
extern DEVICE cr_dev;
extern DEVICE lpt_dev;
extern DEVICE clk_dev;
extern DEVICE rq_dev, rqb_dev, rqc_dev, rqd_dev;
@ -68,6 +69,7 @@ DEVICE *sim_devices[] = {
&cso_dev,
&dz_dev,
&vh_dev,
&cr_dev,
&lpt_dev,
&rl_dev,
&rq_dev,

View file

@ -207,6 +207,10 @@
Name="Source Files"
Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm"
>
<File
RelativePath="..\PDP11\pdp11_cr.c"
>
</File>
<File
RelativePath="..\PDP11\pdp11_dz.c"
>
@ -361,6 +365,10 @@
Name="Header Files"
Filter="h;hpp;hxx;hm;inl;inc"
>
<File
RelativePath="..\PDP11\pdp11_cr_dat.h"
>
</File>
<File
RelativePath="..\PDP11\pdp11_io_lib.h"
>

View file

@ -203,6 +203,10 @@
Name="Source Files"
Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm"
>
<File
RelativePath="..\PDP11\pdp11_cr.c"
>
</File>
<File
RelativePath="..\PDP11\pdp11_dz.c"
>
@ -361,6 +365,10 @@
Name="Header Files"
Filter="h;hpp;hxx;hm;inl;inc"
>
<File
RelativePath="..\PDP11\pdp11_cr_dat.h"
>
</File>
<File
RelativePath="..\PDP11\pdp11_io_lib.h"
>

View file

@ -203,6 +203,10 @@
Name="Source Files"
Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm"
>
<File
RelativePath="..\PDP11\pdp11_cr.c"
>
</File>
<File
RelativePath="..\PDP11\pdp11_dz.c"
>
@ -361,6 +365,10 @@
Name="Header Files"
Filter="h;hpp;hxx;hm;inl;inc"
>
<File
RelativePath="..\PDP11\pdp11_cr_dat.h"
>
</File>
<File
RelativePath="..\PDP11\pdp11_io_lib.h"
>

View file

@ -203,6 +203,10 @@
Name="Source Files"
Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm"
>
<File
RelativePath="..\PDP11\pdp11_cr.c"
>
</File>
<File
RelativePath="..\PDP11\pdp11_dz.c"
>
@ -361,6 +365,10 @@
Name="Header Files"
Filter="h;hpp;hxx;hm;inl;inc"
>
<File
RelativePath="..\PDP11\pdp11_cr_dat.h"
>
</File>
<File
RelativePath="..\PDP11\pdp11_io_lib.h"
>

View file

@ -395,6 +395,10 @@
Name="Header Files"
Filter="h;hpp;hxx;hm;inl;inc"
>
<File
RelativePath="..\PDP11\pdp11_cr_dat.h"
>
</File>
<File
RelativePath="..\PDP11\pdp11_dmc.h"
>

Binary file not shown.