1
0
mirror of https://github.com/rcornwell/sims.git synced 2026-01-19 09:28:10 +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:
Lars Brinkhoff 2019-08-05 21:27:37 +02:00
parent 896fcd07f4
commit 4096eb8c2a
2 changed files with 29 additions and 1 deletions

View File

@ -54,12 +54,15 @@
static int pia = 0;
static int status = 0;
int auxcpu_base = 03000000;
static t_stat auxcpu_devio(uint32 dev, t_uint64 *data);
static t_stat auxcpu_svc (UNIT *uptr);
static t_stat auxcpu_reset (DEVICE *dptr);
static t_stat auxcpu_attach (UNIT *uptr, CONST char *ptr);
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 const char *auxcpu_description (DEVICE *dptr);
@ -73,6 +76,8 @@ static REG auxcpu_reg[] = {
};
static MTAB auxcpu_mod[] = {
{ MTAB_XTD|MTAB_VDV|MTAB_VALR, 0, "base address", "BASE",
&auxcpu_set_base, &auxcpu_show_base },
{ 0 }
};
@ -389,4 +394,26 @@ t_stat auxcpu_devio(uint32 dev, t_uint64 *data)
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

View File

@ -221,7 +221,8 @@ int32 tmxr_poll = 10000;
/* Physical address range for Rubin 10-11 interface. */
#define T11RANGE(addr) ((addr) >= 03040000)
/* 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[] = {
#if (NUM_DEVS_RS > 0)