mirror of
https://github.com/simh/simh.git
synced 2026-05-05 23:34:21 +00:00
Bob Supnik's state as of 5/9/2015 after backporting some things from the master branch
This commit is contained in:
@@ -244,14 +244,12 @@
|
||||
#define STK_CHECK(x,y) if (((x) & 0377) < (y)) \
|
||||
int_req = int_req | INT_STK
|
||||
#define IND_STEP(x) M[x] & A_IND; /* return next level indicator */ \
|
||||
if (((x) <= AUTO_TOP) && ((x) >= AUTO_INC)) { \
|
||||
if ( (x) < AUTO_DEC ) { \
|
||||
M[x] = (M[x] + 1) & DMASK; \
|
||||
} \
|
||||
else { \
|
||||
M[x] = (M[x] - 1) & DMASK; \
|
||||
} \
|
||||
} \
|
||||
if ( ((x) <= AUTO_TOP) && ((x) >= AUTO_INC) ) { \
|
||||
if ( (x) < AUTO_DEC ) \
|
||||
M[x] = (M[x] + 1) & DMASK; \
|
||||
else \
|
||||
M[x] = (M[x] - 1) & DMASK; \
|
||||
} \
|
||||
x = M[x] & AMASK
|
||||
|
||||
#define INCREMENT_PC PC = (PC + 1) & AMASK /* increment PC */
|
||||
@@ -259,12 +257,12 @@
|
||||
#define UNIT_V_MDV (UNIT_V_UF + 0) /* MDV present */
|
||||
#define UNIT_V_STK (UNIT_V_UF + 1) /* stack instr */
|
||||
#define UNIT_V_BYT (UNIT_V_UF + 2) /* byte instr */
|
||||
#define UNIT_V_64KW (UNIT_V_UF + 3) /* 64KW mem support */
|
||||
#define UNIT_V_64KW (UNIT_V_UF + 3) /* 64KW mem support */
|
||||
#define UNIT_V_MSIZE (UNIT_V_UF + 4) /* dummy mask */
|
||||
#define UNIT_MDV (1 << UNIT_V_MDV)
|
||||
#define UNIT_STK (1 << UNIT_V_STK)
|
||||
#define UNIT_BYT (1 << UNIT_V_BYT)
|
||||
#define UNIT_64KW (1 << UNIT_V_64KW)
|
||||
#define UNIT_64KW (1 << UNIT_V_64KW)
|
||||
#define UNIT_MSIZE (1 << UNIT_V_MSIZE)
|
||||
#define UNIT_IOPT (UNIT_MDV | UNIT_STK | UNIT_BYT | UNIT_64KW)
|
||||
#define UNIT_NOVA3 (UNIT_MDV | UNIT_STK)
|
||||
@@ -334,14 +332,6 @@ char * devBitNames( int32 flags, char * ptr, char * sepStr ) ;
|
||||
void mask_out (int32 mask);
|
||||
|
||||
|
||||
extern int32 sim_interval;
|
||||
extern int32 sim_int_char;
|
||||
extern uint32 sim_brk_types, sim_brk_dflt, sim_brk_summ; /* breakpoint info */
|
||||
extern DEVICE * sim_devices[];
|
||||
extern t_stat fprint_sym(FILE *ofile, t_addr addr, t_value *val, UNIT *uptr, int32 sw);
|
||||
|
||||
|
||||
|
||||
/* CPU data structures
|
||||
|
||||
cpu_dev CPU device descriptor
|
||||
@@ -398,7 +388,6 @@ MTAB cpu_mod[] = {
|
||||
{ UNIT_MSIZE, (24 * 1024), NULL, "24K", &cpu_set_size },
|
||||
{ UNIT_MSIZE, (28 * 1024), NULL, "28K", &cpu_set_size },
|
||||
{ UNIT_MSIZE, (32 * 1024), NULL, "32K", &cpu_set_size },
|
||||
|
||||
{ UNIT_MSIZE, (36 * 1024), NULL, "36K", &cpu_set_size },
|
||||
{ UNIT_MSIZE, (40 * 1024), NULL, "40K", &cpu_set_size },
|
||||
{ UNIT_MSIZE, (44 * 1024), NULL, "44K", &cpu_set_size },
|
||||
@@ -487,7 +476,7 @@ while (reason == 0) { /* loop until halted */
|
||||
IR = M[PC]; /* fetch instr */
|
||||
if ( hist_cnt )
|
||||
{
|
||||
hist_save( PC, IR ) ; /* PC, int_req unchanged */
|
||||
hist_save( PC, IR ) ; /* PC, int_req unchanged */
|
||||
}
|
||||
|
||||
INCREMENT_PC ;
|
||||
@@ -983,15 +972,15 @@ while (reason == 0) { /* loop until halted */
|
||||
else if (device == DEV_CPU) { /* CPU control */
|
||||
switch (code) { /* decode IR<5:7> */
|
||||
|
||||
case ioNIO: /* NIOP <x> CPU ? */
|
||||
if ( pulse == iopP )
|
||||
if ( MODE_64K )
|
||||
case ioNIO: /* NIOP <x> CPU ? */
|
||||
if ( pulse == iopP )
|
||||
if ( MODE_64K )
|
||||
{
|
||||
/* Keronix/Point4/SCI/INI/IDP (and others) */
|
||||
/* 64 KW memory extension: */
|
||||
/* NIOP - set memory mode (32/64 KW) per AC: */
|
||||
/* B15: 0 = 32 KW, 1 = 64 KW mode */
|
||||
AMASK = (AC[dstAC] & 0x0001) ? 0177777 : 077777 ;
|
||||
/* Keronix/Point4/SCI/INI/IDP (and others) */
|
||||
/* 64 KW memory extension: */
|
||||
/* NIOP - set memory mode (32/64 KW) per AC: */
|
||||
/* B15: 0 = 32 KW, 1 = 64 KW mode */
|
||||
AMASK = (AC[dstAC] & 0x0001) ? 0177777 : 077777 ;
|
||||
}
|
||||
break ;
|
||||
|
||||
@@ -1213,11 +1202,11 @@ return SCPE_OK;
|
||||
* - The Binary Loader was in turn used to load tapes in the usual DG 'absolute binary' format.
|
||||
*/
|
||||
|
||||
#define BOOT_START 00000
|
||||
#define BOOT_LEN (sizeof(boot_rom) / sizeof(int32))
|
||||
#define BOOT_START 00000
|
||||
#define BOOT_LEN (sizeof(boot_rom) / sizeof(int32))
|
||||
|
||||
static const int32 boot_rom[] = {
|
||||
0062677, /* IORST ;reset all I/O */
|
||||
0062677, /* IORST ;reset all I/O */
|
||||
0060477, /* READS 0 ;read SR into AC0 */
|
||||
0024026, /* LDA 1,C77 ;get dev mask */
|
||||
0107400, /* AND 0,1 ;isolate dev code */
|
||||
@@ -1256,7 +1245,7 @@ static const int32 boot_rom[] = {
|
||||
|
||||
t_stat cpu_boot (int32 unitno, DEVICE *dptr)
|
||||
{
|
||||
int32 i;
|
||||
size_t i;
|
||||
|
||||
for (i = 0; i < BOOT_LEN; i++) M[BOOT_START + i] = boot_rom[i];
|
||||
saved_PC = BOOT_START;
|
||||
@@ -1363,7 +1352,7 @@ if ( (r != SCPE_OK) || (lnt && (lnt < HIST_MIN)) )
|
||||
}
|
||||
hist_p = 0;
|
||||
if ( hist_cnt )
|
||||
{
|
||||
{
|
||||
free( hist ) ;
|
||||
hist_cnt = 0 ;
|
||||
hist = NULL ;
|
||||
|
||||
Reference in New Issue
Block a user