mirror of
https://github.com/rcornwell/sims.git
synced 2026-01-21 18:15:04 +00:00
KA10: Magic switch.
The switch need to be in its on position for the processor to run. When turned off, exit to SIMH prompt.
This commit is contained in:
parent
7a61d2cbb7
commit
583c050cc7
@ -230,7 +230,10 @@ uint32 fault_addr; /* Fault address */
|
||||
uint64 opc; /* Saved PC and Flags */
|
||||
uint64 mar; /* Memory address compare */
|
||||
uint32 qua_time; /* Quantum clock value */
|
||||
#endif
|
||||
#if MAGIC_SWITCH
|
||||
int MAGIC = 1; /* Magic switch. */
|
||||
#endif /* MAGIC_SWITCH */
|
||||
#endif /* ITS */
|
||||
#if KL_ITS
|
||||
#define dbr1 FM[(6<<4)|1]
|
||||
#define dbr2 FM[(6<<4)|2]
|
||||
@ -464,7 +467,10 @@ REG cpu_reg[] = {
|
||||
{ ORDATAD (OPC, opc, 36, "Saved PC and flags")},
|
||||
{ ORDATAD (MAR, mar, 18, "Memory address register")},
|
||||
{ ORDATAD (QUA_TIME, qua_time, 36, "Quantum timer"), REG_RO},
|
||||
#endif
|
||||
#if MAGIC_SWITCH
|
||||
{ ORDATAD (MAGIC, MAGIC, 1, "Magic switch"), REG_FIT},
|
||||
#endif /* MAGIC_SWITCH */
|
||||
#endif /* ITS */
|
||||
#if KL
|
||||
{ ORDATAD (EXT_AC, ext_ac, 4, "Extended Instruction AC"), REG_HRO},
|
||||
{ ORDATAD (PREV_CTX, prev_ctx, 5, "Previous context"), REG_HRO},
|
||||
@ -4037,6 +4043,13 @@ if ((reason = build_dev_tab ()) != SCPE_OK) /* build, chk dib_tab */
|
||||
break;
|
||||
}
|
||||
|
||||
#if MAGIC_SWITCH
|
||||
if (!MAGIC) {
|
||||
reason = STOP_MAGIC;
|
||||
break;
|
||||
}
|
||||
#endif /* MAGIC_SWITCH */
|
||||
|
||||
check_apr_irq();
|
||||
/* Normal instruction */
|
||||
if (f_load_pc) {
|
||||
|
||||
@ -86,6 +86,10 @@
|
||||
#define PDP6_DEV PDP6|WAITS
|
||||
#endif
|
||||
|
||||
#ifndef MAGIC_SWITCH /* Infamous MIT magic switch. */
|
||||
#define MAGIC_SWITCH 0
|
||||
#endif
|
||||
|
||||
|
||||
/* MPX interrupt multiplexer for ITS systems */
|
||||
#define MPX_DEV ITS
|
||||
@ -132,6 +136,10 @@ typedef t_uint64 uint64;
|
||||
|
||||
#define STOP_HALT 1 /* halted */
|
||||
#define STOP_IBKPT 2 /* breakpoint */
|
||||
#define STOP_ACCESS 3 /* invalid access */
|
||||
#if MAGIC_SWITCH
|
||||
#define STOP_MAGIC 4 /* low on magic */
|
||||
#endif
|
||||
|
||||
/* Debuging controls */
|
||||
#define DEBUG_CMD 0x0000001 /* Show device commands */
|
||||
@ -628,6 +636,10 @@ int auxcpu_write (t_addr addr, t_uint64);
|
||||
#define NUM_DEVS_DPK ITS
|
||||
#define NUM_DEVS_AI ITS
|
||||
#endif
|
||||
#if MAGIC_SWITCH && !KA && !ITS
|
||||
#error "Magic switch only valid on KA10 with ITS mods"
|
||||
#endif
|
||||
|
||||
/* Global data */
|
||||
|
||||
|
||||
|
||||
@ -213,7 +213,10 @@ const char *sim_stop_messages[] = {
|
||||
"Unknown error",
|
||||
"HALT instruction",
|
||||
"Breakpoint",
|
||||
"Invalid access"
|
||||
"Invalid access",
|
||||
#if MAGIC_SWITCH
|
||||
"No magic"
|
||||
#endif
|
||||
};
|
||||
|
||||
/* Simulator debug controls */
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user