mirror of
https://github.com/rcornwell/sims.git
synced 2026-05-04 07:00:17 +00:00
KA10: make auxcpu base address configurable.
1972 vintage ITS 724 has the PDP-6 memory at 1,,040000, whereas the latest version has it at 3,,000000.
This commit is contained in:
@@ -54,12 +54,15 @@
|
|||||||
|
|
||||||
static int pia = 0;
|
static int pia = 0;
|
||||||
static int status = 0;
|
static int status = 0;
|
||||||
|
int auxcpu_base = 03000000;
|
||||||
|
|
||||||
static t_stat auxcpu_devio(uint32 dev, t_uint64 *data);
|
static t_stat auxcpu_devio(uint32 dev, t_uint64 *data);
|
||||||
static t_stat auxcpu_svc (UNIT *uptr);
|
static t_stat auxcpu_svc (UNIT *uptr);
|
||||||
static t_stat auxcpu_reset (DEVICE *dptr);
|
static t_stat auxcpu_reset (DEVICE *dptr);
|
||||||
static t_stat auxcpu_attach (UNIT *uptr, CONST char *ptr);
|
static t_stat auxcpu_attach (UNIT *uptr, CONST char *ptr);
|
||||||
static t_stat auxcpu_detach (UNIT *uptr);
|
static t_stat auxcpu_detach (UNIT *uptr);
|
||||||
|
static t_stat auxcpu_set_base (UNIT *uptr, int32 val, CONST char *cptr, void *desc);
|
||||||
|
static t_stat auxcpu_show_base (FILE *st, UNIT *uptr, int32 val, CONST void *desc);
|
||||||
static t_stat auxcpu_attach_help (FILE *st, DEVICE *dptr, UNIT *uptr, int32 flag, const char *cptr);
|
static t_stat auxcpu_attach_help (FILE *st, DEVICE *dptr, UNIT *uptr, int32 flag, const char *cptr);
|
||||||
static const char *auxcpu_description (DEVICE *dptr);
|
static const char *auxcpu_description (DEVICE *dptr);
|
||||||
|
|
||||||
@@ -73,6 +76,8 @@ static REG auxcpu_reg[] = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
static MTAB auxcpu_mod[] = {
|
static MTAB auxcpu_mod[] = {
|
||||||
|
{ MTAB_XTD|MTAB_VDV|MTAB_VALR, 0, "base address", "BASE",
|
||||||
|
&auxcpu_set_base, &auxcpu_show_base },
|
||||||
{ 0 }
|
{ 0 }
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -389,4 +394,26 @@ t_stat auxcpu_devio(uint32 dev, t_uint64 *data)
|
|||||||
|
|
||||||
return SCPE_OK;
|
return SCPE_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static t_stat auxcpu_set_base (UNIT *uptr, int32 val, CONST char *cptr, void *desc)
|
||||||
|
{
|
||||||
|
t_stat r;
|
||||||
|
int x;
|
||||||
|
|
||||||
|
if (cptr == NULL || *cptr == 0)
|
||||||
|
return SCPE_ARG;
|
||||||
|
|
||||||
|
x = get_uint (cptr, 8, 03777777, &r);
|
||||||
|
if (r != SCPE_OK)
|
||||||
|
return SCPE_ARG;
|
||||||
|
|
||||||
|
auxcpu_base = x;
|
||||||
|
return SCPE_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
static t_stat auxcpu_show_base (FILE *st, UNIT *uptr, int32 val, CONST void *desc)
|
||||||
|
{
|
||||||
|
fprintf (st, "Base: %o", auxcpu_base);
|
||||||
|
return SCPE_OK;
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -221,7 +221,8 @@ int32 tmxr_poll = 10000;
|
|||||||
/* Physical address range for Rubin 10-11 interface. */
|
/* Physical address range for Rubin 10-11 interface. */
|
||||||
#define T11RANGE(addr) ((addr) >= 03040000)
|
#define T11RANGE(addr) ((addr) >= 03040000)
|
||||||
/* Physical address range for auxiliary PDP-6. */
|
/* Physical address range for auxiliary PDP-6. */
|
||||||
#define AUXCPURANGE(addr) ((addr) >= 03000000 && (addr) < 03040000)
|
extern int auxcpu_base;
|
||||||
|
#define AUXCPURANGE(addr) ((addr) >= auxcpu_base && (addr) < (auxcpu_base + 040000))
|
||||||
|
|
||||||
DEVICE *rh_devs[] = {
|
DEVICE *rh_devs[] = {
|
||||||
#if (NUM_DEVS_RS > 0)
|
#if (NUM_DEVS_RS > 0)
|
||||||
|
|||||||
Reference in New Issue
Block a user