CDC1700: Update to add help and descriptions from John Forecast

- add internal help entries
- add descriptions to the register, modifier and debug tables.
- changed device CD name to CDD to avoid name conflict with the CD command
This commit is contained in:
Mark Pizzolato 2016-07-24 13:33:03 -07:00
parent 75ab9f513b
commit a59cd3bd3b
11 changed files with 715 additions and 362 deletions

View file

@ -46,8 +46,8 @@ Sample installation run of MSOS 5 (user input to MSOS is marked with "<==="):
sim> set lp type=1742 sim> set lp type=1742
sim> att lp MSOSinstall.lpt sim> att lp MSOSinstall.lpt
LP: creating new file LP: creating new file
sim> att cd0 MSOS5.dsk sim> att cdd0 MSOS5.dsk
CD: creating new file CDD: creating new file
sim> boot mt0 sim> boot mt0
MSOS 5.0 SYSTEM INITIALIZER MSOS 5.0 SYSTEM INITIALIZER
@ -548,7 +548,7 @@ Sample installation run of MSOS 5 (user input to MSOS is marked with "<==="):
POWERU POWERU
INITIALIZATION COMPLETED - YOU MAY AUTOLOAD INITIALIZATION COMPLETED - YOU MAY AUTOLOAD
Simulation stopped, P: 5914 ( 18FF JMP* $FF) Simulation stopped, P: 5914 ( 18FF JMP* $FF)
sim> autoload cd sim> autoload cdd
sim> run 0 sim> run 0

View file

@ -14,8 +14,9 @@ mostly from the early period of its release:
device name Hardware device name Hardware
CPU 1714 CPU with up to 32KW of memory in 4KW increments CPU 1714 CPU with 4KW, 8KW, 16KW or 32KW of memory
1705 Interrupt/Data channel option 1705 Multi-Level Interrupt and Direct Storage Access
Bus
Optional extensions: Optional extensions:
@ -70,7 +71,7 @@ mostly from the early period of its release:
[Equipment address: 0x3] [Equipment address: 0x3]
CD 1733-2 Cartridge disk pack controller. Supports up to CDD 1733-2 Cartridge disk pack controller. Supports up to
4 cartridge disk drives. Each drive supports a fixed 4 cartridge disk drives. Each drive supports a fixed
and a removeable disk: and a removeable disk:
@ -80,13 +81,13 @@ mostly from the early period of its release:
[Equipment address: 0x3] [Equipment address: 0x3]
Notes: Notes:
DP and CD use the same equipment address so only 1 of them may be DP and CDD use the same equipment address so only 1 of them may be
enabled (default is for CD to be enabled). enabled (default is for CDD to be enabled).
Both controllers use checkwords (CRC) for validating the consistency Both controllers use checkwords (CRC) for validating the consistency
of the data stored on disk. The DP controller exports a single status of the data stored on disk. The DP controller exports a single status
bit indicating whether the checkword is valid or not (the simulator bit indicating whether the checkword is valid or not (the simulator
always sets this to valid). The CD controller also exports a single always sets this to valid). The CDD controller also exports a single
status bit which is handled in the same way as the DP controller. status bit which is handled in the same way as the DP controller.
It also makes the actual checkword value available. The simulator It also makes the actual checkword value available. The simulator
always returns a checkword value of 0 so any attempt to verify the always returns a checkword value of 0 so any attempt to verify the

View file

@ -51,7 +51,6 @@ extern void rebuildPending(void);
extern t_stat checkReset(DEVICE *, uint8); extern t_stat checkReset(DEVICE *, uint8);
extern t_stat show_debug(FILE *, UNIT *, int32, CONST void *);
extern t_stat show_addr(FILE *, UNIT *, int32, CONST void *); extern t_stat show_addr(FILE *, UNIT *, int32, CONST void *);
extern t_stat set_protected(UNIT *, int32, CONST char *, void *); extern t_stat set_protected(UNIT *, int32, CONST char *, void *);
@ -83,6 +82,8 @@ static t_stat show_addressing(FILE *, UNIT *, int32, CONST void *);
t_stat set_cartfirst(UNIT *, int32, CONST char *, void *); t_stat set_cartfirst(UNIT *, int32, CONST char *, void *);
t_stat set_fixedfirst(UNIT *, int32, CONST char *, void *); t_stat set_fixedfirst(UNIT *, int32, CONST char *, void *);
t_stat cd_help(FILE *, DEVICE *, UNIT *, int32, const char *);
/* Constants */ /* Constants */
#define CD_NUMWD (96) /* words/sector */ #define CD_NUMWD (96) /* words/sector */
@ -351,53 +352,61 @@ UNIT cd_unit[] = {
}; };
REG cd_reg[] = { REG cd_reg[] = {
{ HRDATA(FUNCTION, CDdev.FUNCTION, 16) }, { HRDATAD(FUNCTION, CDdev.FUNCTION, 16, "Last director function issued") },
{ HRDATA(STATUS, CDdev.STATUS, 16) }, { HRDATAD(STATUS, CDdev.STATUS, 16, "Director status register") },
{ HRDATA(IENABLE, CDdev.IENABLE, 16) }, { HRDATAD(IENABLE, CDdev.IENABLE, 16, "Interrupts enabled") },
/*** more ***/ /*** more ***/
{ NULL } { NULL }
}; };
MTAB cd_mod[] = { MTAB cd_mod[] = {
{ MTAB_XTD|MTAB_VDV, 0, "1733-2", NULL, NULL, NULL }, { MTAB_XTD|MTAB_VDV, 0, "1733-2 Cartridge Disk Drive Controller" },
{ MTAB_XTD|MTAB_VDV, 0, "EQUIPMENT", NULL, NULL, &show_addr, NULL }, { MTAB_XTD|MTAB_VDV, 0, "EQUIPMENT", "EQUIPMENT=hexAddress",
{ MTAB_XTD|MTAB_VDV|MTAB_VALR, 0, NULL, "EQUIPMENT", &set_equipment, NULL, NULL }, &set_equipment, &show_addr, NULL, "Display equipment address" },
{ MTAB_XTD|MTAB_VUN, 0, "DRIVE", NULL, NULL, &show_drive, NULL }, { MTAB_XTD|MTAB_VUN, 0, "DRIVE", NULL,
{ MTAB_XTD|MTAB_VUN, 0, NULL, "856-2", &set_cd856_2, NULL, NULL }, NULL, &show_drive, NULL, "Display type of drive (856-2 or 856-4)" },
{ MTAB_XTD|MTAB_VUN, 0, NULL, "856-4", &set_cd856_4, NULL, NULL }, { MTAB_XTD|MTAB_VUN, 0, NULL, "856-2",
{ MTAB_XTD|MTAB_VDV, 0, "DEBUG", NULL, NULL, &show_debug, NULL }, &set_cd856_2, NULL, NULL, "Set drive type to 856-2" },
{ MTAB_XTD|MTAB_VDV, 0, NULL, "STOPONREJECT", &set_stoponrej, NULL, NULL }, { MTAB_XTD|MTAB_VUN, 0, NULL, "856-4",
{ MTAB_XTD|MTAB_VDV, 0, NULL, "NOSTOPONREJECT", &clr_stoponrej, NULL, NULL }, &set_cd856_4, NULL, NULL, "Set drive type to 856-4" },
{ MTAB_XTD|MTAB_VDV, 0, NULL, "STOPONREJECT",
&set_stoponrej, NULL, NULL, "Stop simulation if I/O is rejected" },
{ MTAB_XTD|MTAB_VDV, 0, NULL, "NOSTOPONREJECT",
&clr_stoponrej, NULL, NULL, "Don't stop simulation if I/O is rejected" },
/*** should protect be per-unit? ***/ /*** should protect be per-unit? ***/
{ MTAB_XTD|MTAB_VDV, 0, NULL, "PROTECT", &set_protected, NULL, NULL }, { MTAB_XTD|MTAB_VDV, 0, NULL, "PROTECT",
{ MTAB_XTD|MTAB_VDV, 0, NULL, "NOPROTECT", &clear_protected, NULL, NULL }, &set_protected, NULL, NULL, "Device is protected (unimplemented)" },
{ MTAB_XTD|MTAB_VDV, 0, "ADDRESSING", NULL, NULL, &show_addressing, NULL }, { MTAB_XTD|MTAB_VDV, 0, NULL, "NOPROTECT",
{ MTAB_XTD|MTAB_VDV, 0, NULL, "CARTFIRST", &set_cartfirst, NULL, NULL }, &clear_protected, NULL, NULL, "Device is unprotected (unimplemented)" },
{ MTAB_XTD|MTAB_VDV, 0, NULL, "FIXEDFIRST", &set_fixedfirst, NULL, NULL }, { MTAB_XTD|MTAB_VDV, 0, "ADDRESSING", NULL,
NULL, &show_addressing, NULL, "Show disk addressing mode" },
{ MTAB_XTD|MTAB_VDV, 0, NULL, "CARTFIRST",
&set_cartfirst, NULL, NULL, "Set cartridge as logical disk 0" },
{ MTAB_XTD|MTAB_VDV, 0, NULL, "FIXEDFIRST",
&set_fixedfirst, NULL, NULL, "Set fixec disk as logical disk 0" },
{ 0 } { 0 }
}; };
DEBTAB cd_deb[] = { DEBTAB cd_deb[] = {
{ "TRACE", DBG_DTRACE }, { "TRACE", DBG_DTRACE, "Trace device I/O requests" },
{ "STATE", DBG_DSTATE }, { "STATE", DBG_DSTATE, "Display device state changes" },
{ "INTR", DBG_DINTR }, { "INTR", DBG_DINTR, "Display device interrupt requests" },
{ "ERROR", DBG_DERROR }, { "ERROR", DBG_DERROR, "Display device errors" },
{ "LOCATION", DBG_DLOC }, { "LOCATION", DBG_DLOC, "Display address for I/O instructions" },
{ "FIRSTREJ", DBG_DFIRSTREJ }, { "FIRSTREJ", DBG_DFIRSTREJ, "Suppress display of 2nd ... I/O rejects" },
{ "ALL", DBG_DTRACE | DBG_DSTATE | DBG_DINTR | DBG_DERROR | DBG_DLOC }, { "ALL", DBG_DTRACE | DBG_DSTATE | DBG_DINTR | DBG_DERROR | DBG_DLOC },
{ NULL } { NULL }
}; };
DEVICE cd_dev = { DEVICE cd_dev = {
"CD", cd_unit, cd_reg, cd_mod, "CDD", cd_unit, cd_reg, cd_mod,
CD_NUMDR * 2, 10, 31, 1, 8, 8, CD_NUMDR * 2, 10, 31, 1, 8, 8,
NULL, NULL, &cd_reset, NULL, NULL, &cd_reset,
NULL, &cd_attach, &cd_detach, NULL, &cd_attach, &cd_detach,
&CDdev, &CDdev,
DEV_DEBUG | DEV_DISK | DEV_DISABLE | DEV_INDEV | DEV_OUTDEV | DEV_PROTECT, DEV_DEBUG | DEV_DISK | DEV_DISABLE | DEV_INDEV | DEV_OUTDEV | DEV_PROTECT,
0, cd_deb, 0, cd_deb,
NULL, NULL, NULL, &cd_help, NULL, NULL, NULL
NULL
}; };
/* /*
@ -1325,3 +1334,41 @@ t_stat CDautoload(void)
} }
return SCPE_UNATT; return SCPE_UNATT;
} }
t_stat cd_help(FILE *st, DEVICE *dptr, UNIT *uptr, int32 flag, const char *cptr)
{
const char helpString[] =
/****************************************************************************/
" The %D device is a 1733-2 cartridge disk drive controller.\n"
"1 Hardware Description\n"
" The 1733-2 consists of a controller with up to 4 attached disk drives.\n"
" Each drive consists of 2 logical disks; a removeable disk pack and a\n"
" fixed disk. The controller includes a jumper which controls which disk\n"
" is addressed as logical disk 0:\n\n"
"+sim> SET %D CARTFIRST\n"
"+sim> SET %D FIXEDFIRST\n\n"
" Each physical drive may be configured as a 856-2 or 856-4 and both the\n"
" fixed and removeable disks must be the same size.\n\n"
"+856-2 drive: 1130304 words per disk\n"
"+856-4 drive: 2271744 words per disk\n\n"
" The configuration may be changed by referencing either of the logical\n"
" disks present on a drive:\n\n"
"+sim> SET %U 856-2\n"
"+sim> SET %U 856-4\n\n"
"2 Equipment Address\n"
" Disk controllers are typically set to equipment address 3. This address\n"
" may be changed by:\n\n"
"+sim> SET %D EQUIPMENT=hexValue\n\n"
"2 $Registers\n"
"\n"
" These registers contain the emulated state of the device. These values\n"
" don't necessarily relate to any detail of the original device being\n"
" emulated but are merely internal details of the emulation. STATUS always\n"
" contains the current status of the device as it would be read by an\n"
" application program.\n"
"1 Configuration\n"
" A %D device is configured with various simh SET and ATTACH commands\n"
"2 $Set commands\n";
return scp_help(st, dptr, uptr, flag, helpString, cptr);
}

View file

@ -83,7 +83,7 @@ uint8 P[MAXMEMSIZE];
t_uint64 Instructions; t_uint64 Instructions;
uint16 Preg, Areg, Qreg, Mreg, CAenable, OrigPreg, Pending, IOAreg, IOQreg; uint16 Preg, Areg, Qreg, Mreg, CAenable, OrigPreg, Pending, IOAreg, IOQreg;
uint8 Pfault, Protected, lastP, Oflag, PARflag, INTflag, DEFERflag; uint8 Pfault, Protected, lastP, Oflag, INTflag, DEFERflag;
t_bool ExecutionStarted = FALSE; t_bool ExecutionStarted = FALSE;
uint16 CharAddrMode[16]; uint16 CharAddrMode[16];
@ -110,6 +110,8 @@ t_stat cpu_set_size(UNIT *, int32, CONST char *, void *);
t_stat cpu_ex(t_value *, t_addr, UNIT *, int32); t_stat cpu_ex(t_value *, t_addr, UNIT *, int32);
t_stat cpu_dep(t_value, t_addr, UNIT *uptr, int32 sw); t_stat cpu_dep(t_value, t_addr, UNIT *uptr, int32 sw);
t_stat cpu_help(FILE *, DEVICE *, UNIT *, int32, const char *);
#define UNIT_V_STOPSW (UNIT_V_UF + 1) /* Selective STOP switch */ #define UNIT_V_STOPSW (UNIT_V_UF + 1) /* Selective STOP switch */
#define UNIT_STOPSW (1 << UNIT_V_STOPSW) #define UNIT_STOPSW (1 << UNIT_V_STOPSW)
#define UNIT_V_SKIPSW (UNIT_V_UF + 2) /* Selective SKIP switch */ #define UNIT_V_SKIPSW (UNIT_V_UF + 2) /* Selective SKIP switch */
@ -123,7 +125,7 @@ t_stat cpu_dep(t_value, t_addr, UNIT *uptr, int32 sw);
#define UNIT_V_MSIZE (UNIT_V_UF + 6) /* Memory size */ #define UNIT_V_MSIZE (UNIT_V_UF + 6) /* Memory size */
#define UNIT_MSIZE (1 << UNIT_V_MSIZE) #define UNIT_MSIZE (1 << UNIT_V_MSIZE)
IO_DEVICE CPUdev = IODEV(NULL, "1704", CPU, 0, 0xFF, 0, IO_DEVICE CPUdev = IODEV(NULL, "1714", CPU, 0, 0xFF, 0,
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
0, 0, 0, 0, 0, 0, 0, 0, NULL); 0, 0, 0, 0, 0, 0, 0, 0, NULL);
@ -137,39 +139,53 @@ IO_DEVICE CPUdev = IODEV(NULL, "1704", CPU, 0, 0xFF, 0,
UNIT cpu_unit = { UDATA(NULL, UNIT_FIX+UNIT_BINK, DEFAULTMEMSIZE) }; UNIT cpu_unit = { UDATA(NULL, UNIT_FIX+UNIT_BINK, DEFAULTMEMSIZE) };
REG cpu_reg[] = { REG cpu_reg[] = {
{ HRDATA(P, Preg, 16) }, { HRDATAD(P, Preg, 16, "Program address counter") },
{ HRDATA(A, Areg, 16) }, { HRDATAD(A, Areg, 16, "Principal arithmetic register") },
{ HRDATA(Q, Qreg, 16) }, { HRDATAD(Q, Qreg, 16, "Index register") },
{ HRDATA(M, Mreg, 16) }, { HRDATAD(M, Mreg, 16, "Interrupt mask register") },
{ HRDATA(O, Oflag, 1) }, { HRDATAD(O, Oflag, 1, "Overflow flag") },
{ HRDATA(CH, CAenable, 1) }, { HRDATAD(CH, CAenable, 1, "Character addressing enable flag") },
{ HRDATA(PAR, PARflag, 1) }, { HRDATAD(INT, INTflag, 1, "Interrupt enable flag") },
{ HRDATA(INT, INTflag, 1) }, { HRDATAD(DEFER, DEFERflag, 1, "Interrupt deferred flag") },
{ HRDATA(DEFER, DEFERflag, 1) }, { HRDATAD(PENDING, Pending, 16, "Pending interrupt flags") },
{ HRDATA(PENDING, Pending, 1) }, { HRDATAD(PFAULT, Pfault, 1, "Protect fault pending flag") },
{ HRDATA(PFAULT, Pfault, 1) },
{ NULL } { NULL }
}; };
MTAB cpu_mod[] = { MTAB cpu_mod[] = {
{ UNIT_STOPSW, UNIT_STOPSW, "Selective Stop", "SSTOP", NULL }, { MTAB_XTD|MTAB_VDV, 0, "1714 CDC 1700 series CPU", NULL, NULL, NULL },
{ UNIT_STOPSW, 0, "No Selective Stop", "NOSSTOP", NULL }, { UNIT_STOPSW, UNIT_STOPSW, "Selective Stop", "SSTOP",
{ UNIT_SKIPSW, UNIT_SKIPSW, "Selective Skip", "SSKIP", NULL }, NULL, NULL, NULL, "Enable Selective Stop" },
{ UNIT_SKIPSW, 0, "No Selective Skip", "NOSSKIP", NULL }, { UNIT_STOPSW, 0, "No Selective Stop", "NOSSTOP",
{ UNIT_MODE65K, UNIT_MODE65K, "65K Addressing Mode", "MODE65K", NULL }, NULL, NULL, NULL, "Disable Selective Stop" },
{ UNIT_MODE65K, 0, "32K Addressing Mode", "MODE32K", NULL }, { UNIT_SKIPSW, UNIT_SKIPSW, "Selective Skip", "SSKIP",
{ UNIT_CHAR, UNIT_CHAR, "Character Addressing", "CHAR", NULL }, NULL, NULL, NULL, "Enable Selective Skip" },
{ UNIT_CHAR, 0, "No Character Addressing", "NOCHAR", NULL }, { UNIT_SKIPSW, 0, "No Selective Skip", "NOSSKIP",
{ UNIT_PROT, UNIT_PROT, "Program Protect", "PROTECT", NULL }, NULL, NULL, NULL, "Disable Selective Skip" },
{ UNIT_PROT, 0, "", "NOPROTECT", NULL }, { UNIT_MODE65K, UNIT_MODE65K, "65K Addressing Mode", "MODE65K",
{ UNIT_MSIZE, 4096, NULL, "4K", &cpu_set_size }, NULL, NULL, NULL, "Enable 65K Indirect Addressing Mode" },
{ UNIT_MSIZE, 8192, NULL, "8K", &cpu_set_size }, { UNIT_MODE65K, 0, "32K Addressing Mode", "MODE32K",
{ UNIT_MSIZE, 16384, NULL, "16K", &cpu_set_size }, NULL, NULL, NULL, "Enable 32K Indirect Addressing Mode" },
{ UNIT_MSIZE, 32768, NULL, "32K", &cpu_set_size }, { UNIT_CHAR, UNIT_CHAR, "Character Addressing", "CHAR",
NULL, NULL, NULL, "Enable Character Addressing Mode" },
{ UNIT_CHAR, 0, "No Character Addressing", "NOCHAR",
NULL, NULL, NULL, "Disable Character Addressing Mode" },
{ UNIT_PROT, UNIT_PROT, "Program Protect", "PROTECT",
NULL, NULL, NULL, "Enable Protect Mode Operation" },
{ UNIT_PROT, 0, "", "NOPROTECT",
NULL, NULL, NULL, "Disable Protect Mode Operation" },
{ UNIT_MSIZE, 4096, NULL, "4K",
&cpu_set_size, NULL, NULL, "Set Memory Size to 4KW" },
{ UNIT_MSIZE, 8192, NULL, "8K",
&cpu_set_size, NULL, NULL, "Set Memory Size to 8KW" },
{ UNIT_MSIZE, 16384, NULL, "16K",
&cpu_set_size, NULL, NULL, "Set Memory Size to 16KW" },
{ UNIT_MSIZE, 32768, NULL, "32K",
&cpu_set_size, NULL, NULL, "Set Memory Size to 32KW" },
#if MAXMEMSIZE > 32768 #if MAXMEMSIZE > 32768
{ UNIT_MSIZE, 65536, NULL, "64K", &cpu_set_size }, { UNIT_MSIZE, 65536, NULL, "64K",
&cpu_set_size, NULL, NULL, "Set Memory Size to 64KW" },
#endif #endif
{ MTAB_XTD | MTAB_VDV, 0, "1714", NULL, NULL, NULL },
{ 0 } { 0 }
}; };
@ -177,18 +193,18 @@ MTAB cpu_mod[] = {
(DBG_DISASS | DBG_TRACE | DBG_TARGET | DBG_INPUT | DBG_OUTPUT | DBG_FULL) (DBG_DISASS | DBG_TRACE | DBG_TARGET | DBG_INPUT | DBG_OUTPUT | DBG_FULL)
DEBTAB cpu_deb[] = { DEBTAB cpu_deb[] = {
{ "DISASSEMBLE", DBG_DISASS }, { "DISASSEMBLE", DBG_DISASS, "Disassemble instructions while tracing" },
{ "IDISASSEMBLE", DBG_IDISASS }, { "IDISASSEMBLE", DBG_IDISASS, "Disassemble while interrupts active" },
{ "INTERRUPT", DBG_INTR }, { "INTERRUPT", DBG_INTR, "Display interrupt entry/exit" },
{ "TRACE", DBG_TRACE }, { "TRACE", DBG_TRACE, "Trace instruction execution" },
{ "ITRACE", DBG_ITRACE }, { "ITRACE", DBG_ITRACE, "Trace while interrupts active" },
{ "TARGET", DBG_TARGET }, { "TARGET", DBG_TARGET, "Display target address of instructions" },
{ "INPUT", DBG_INPUT }, { "INPUT", DBG_INPUT, "Display INP instruction execution" },
{ "OUTPUT", DBG_OUTPUT }, { "OUTPUT", DBG_OUTPUT, "Display OUT instruction execution" },
{ "IO", DBG_INPUT | DBG_OUTPUT }, { "IO", DBG_INPUT | DBG_OUTPUT, "Display INP and OUT execution" },
{ "INTLVL", DBG_INTLVL }, { "INTLVL", DBG_INTLVL, "Add interrupt level to all displays" },
{ "PROTECT", DBG_PROTECT }, { "PROTECT", DBG_PROTECT, "Display protect faults" },
{ "MISSING", DBG_MISSING }, { "MISSING", DBG_MISSING, "Display info about missing devices" },
{ "FULL", DBG_ALL }, { "FULL", DBG_ALL },
{ NULL } { NULL }
}; };
@ -200,8 +216,7 @@ DEVICE cpu_dev = {
NULL, NULL, NULL, NULL, NULL, NULL,
&CPUdev, &CPUdev,
DEV_DEBUG | DEV_NOEQUIP, 0, cpu_deb, DEV_DEBUG | DEV_NOEQUIP, 0, cpu_deb,
NULL, NULL, NULL, &cpu_help, NULL, NULL, NULL
NULL
}; };
/* /*
@ -1546,3 +1561,76 @@ t_stat sim_instr(void)
} }
return reason; return reason;
} }
t_stat cpu_help(FILE *st, DEVICE *dptr, UNIT *uptr, int32 flag, const char *cptr)
{
const char helpString[] =
/****************************************************************************/
" The %D device is a 1714 central processing unit.\n"
"1 Hardware Description\n"
" The 1714 can access up to 64KW of memory (4KW, 8KW, 16KW, 32KW and 64KW\n"
" are supported). A 1705 multi-level interrupt system with a direct\n"
" storage access bus and 3 1706-A buffered data channels are included.\n\n"
" The amount of memory available to the system can be changed with:\n\n"
"+sim> SET CPU nK\n\n"
" The original 1700 series CPU (the 1704) only allowed up to 32KW to be\n"
" attached to the CPU and indirect memory references would continue to\n"
" loop through memory if bit 15 of the target address was set. When 64KW\n"
" support was added indirect addressing was limited to a single level\n"
" so that the entire 16-bits of address could be used. The indirect\n"
" addressing mode may be changed by:\n\n"
"+sim> SET CPU MODE32K\n"
"+sim> SET CPU MODE65K\n\n"
" In 32KW addressing mode, the number of indirect address chaining\n"
" operations is limited to 10000 to avoid infinite loops.\n"
"2 Equipment Address\n"
" The CPU is not directly accessible via an equipment address but it does\n"
" reserve interrupt 0 (and therefore equipment address 0) for parity\n"
" errors (never detected by the simulator), protect faults and power fail\n"
" (not supported by the simulator).\n"
"2 $Registers\n"
"2 Front Panel Switches\n"
" The 1714 front panel includes a number of switches which control the\n"
" operation of the CPU. Note that selective stop and selective skip are\n"
" used extensively to control execution of the System Maintenance\n"
" Monitor.\n"
"3 Selective Stop\n"
" The selective stop switch controls how the 'Selective Stop' (SLS)\n"
" instruction executes. If the switch is off, SLS executes as a\n"
" no-operation. If the switch is on, SLS executes as a halt instruction.\n"
" Continuing after the halt causes the CPU to resume execution at the\n"
" instruction following the SLS.\n\n"
"+sim> SET CPU SSTOP\n"
"+sim> SET CPU NOSSTOP\n\n"
"3 Selective Skip\n"
" The selective skip switch controls how the SWS and SWN skip\n"
" instructions execute. SWS will skip if the switch is set and SWN will\n"
" skip if the switch is not set.\n\n"
"+sim> SET CPU SSKIP\n"
"+sim> SET CPU NOSSKIP\n\n"
"3 Protect\n"
" Each word of memory on the CDC 1700 series consists of 18-bits; 16-bits\n"
" of data/instruction, a parity bit (which is not implemented in the\n"
" simulator) and a program bit. If the protect switch is off, any program\n"
" may reference any word of memory. If the protect switch is on, there are\n"
" a set of rules which control how memory accesses work and when to\n"
" generate a program protect violation - see one of the 1700 reference\n"
" manuals on bitsavers.org for exact details. This means that the\n"
" operating system can be protected from modification by application\n"
" programs but there is no isolation between application programs.\n\n"
"+sim> SET CPU PROTECT\n"
"+sim> SET CPU NOPROTECT\n\n"
" The Simulator fully implements CPU protect mode allowing protected\n"
" operating systems such as MSOS 5 to execute. It does not implement\n"
" peripheral protect operation which allows unprotected applications to\n"
" directly access some unprotected peripherals.\n\n"
" Operating systems and other programs which run with the protect switch\n"
" on usually start up with the protect switch off, manipulate the\n"
" protect bits in memory (using the CPB/SPB instructions) and then ask\n"
" the operator to set the protect switch on.\n"
"1 Configuration\n"
" The CPU is configured with various simh SET commands.\n"
"2 $Set commands\n";
return scp_help(st, dptr, uptr, flag, helpString, cptr);
}

View file

@ -53,8 +53,6 @@ extern enum IOstatus fw_doBDCIO(IO_DEVICE *, uint16 *, t_bool, uint8);
extern uint16 LoadFromMem(uint16); extern uint16 LoadFromMem(uint16);
extern t_bool IOStoreToMem(uint16, uint16, t_bool); extern t_bool IOStoreToMem(uint16, uint16, t_bool);
extern t_stat show_debug(FILE *, UNIT *, int32, CONST void *);
t_stat set_intr(UNIT *uptr, int32 val, CONST char *, void *); t_stat set_intr(UNIT *uptr, int32 val, CONST char *, void *);
t_stat show_intr(FILE *, UNIT *, int32, CONST void *); t_stat show_intr(FILE *, UNIT *, int32, CONST void *);
t_stat show_target(FILE *, UNIT *, int32, CONST void *); t_stat show_target(FILE *, UNIT *, int32, CONST void *);
@ -67,6 +65,8 @@ t_bool DCreject(IO_DEVICE *, t_bool, uint8);
enum IOstatus DCin(IO_DEVICE *, uint8); enum IOstatus DCin(IO_DEVICE *, uint8);
enum IOstatus DCout(IO_DEVICE *, uint8); enum IOstatus DCout(IO_DEVICE *, uint8);
t_stat dc_help(FILE *, DEVICE *, UNIT *, int32, const char *);
/* /*
1706-A Buffered Data Channel 1706-A Buffered Data Channel
@ -203,46 +203,46 @@ UNIT dcc_unit[] = {
}; };
REG dca_reg[] = { REG dca_reg[] = {
{ HRDATA(STATUS, DCAdev.iod_readR[2], 16) }, { HRDATAD(STATUS, DCAdev.iod_readR[2], 16, "1706 Status") },
{ HRDATA(CWA, DCAdev.iod_CWA, 16) }, { HRDATAD(CWA, DCAdev.iod_CWA, 16, "1706 Current Address") },
{ HRDATA(NEXT, DCAdev.iod_nextAddr, 16) }, { HRDATAD(NEXT, DCAdev.iod_nextAddr, 16, "Next transfer address") },
{ HRDATA(LWA, DCAdev.iod_LWA, 16) }, { HRDATAD(LWA, DCAdev.iod_LWA, 16, "Last word address") },
{ HRDATA(IENABLE, DCAdev.IENABLE, 16) }, { HRDATAD(IENABLE, DCAdev.IENABLE, 16, "Interrupt enabled") },
{ NULL } { NULL }
}; };
REG dcb_reg[] = { REG dcb_reg[] = {
{ HRDATA(STATUS, DCBdev.iod_readR[2], 16) }, { HRDATAD(STATUS, DCBdev.iod_readR[2], 16, "1706 Status") },
{ HRDATA(CWA, DCBdev.iod_CWA, 16) }, { HRDATAD(CWA, DCBdev.iod_CWA, 16, "1706 Current Address") },
{ HRDATA(NEXT, DCBdev.iod_nextAddr, 16) }, { HRDATAD(NEXT, DCBdev.iod_nextAddr, 16, "Next transfer address") },
{ HRDATA(LWA, DCBdev.iod_LWA, 16) }, { HRDATAD(LWA, DCBdev.iod_LWA, 16, "Last word address") },
{ HRDATA(IENABLE, DCBdev.IENABLE, 16) }, { HRDATAD(IENABLE, DCBdev.IENABLE, 16, "Interrupt enabled") },
{ NULL } { NULL }
}; };
REG dcc_reg[] = { REG dcc_reg[] = {
{ HRDATA(STATUS, DCCdev.iod_readR[2], 16) }, { HRDATAD(STATUS, DCCdev.iod_readR[2], 16, "1706 Status") },
{ HRDATA(CWA, DCCdev.iod_CWA, 16) }, { HRDATAD(CWA, DCCdev.iod_CWA, 16, "1706 Current Address") },
{ HRDATA(NEXT, DCCdev.iod_nextAddr, 16) }, { HRDATAD(NEXT, DCCdev.iod_nextAddr, 16, "Next transfer address") },
{ HRDATA(LWA, DCCdev.iod_LWA, 16) }, { HRDATAD(LWA, DCCdev.iod_LWA, 16, "Last word address") },
{ HRDATA(IENABLE, DCCdev.IENABLE, 16) }, { HRDATAD(IENABLE, DCCdev.IENABLE, 16, "Interrupt enabled") },
{ NULL } { NULL }
}; };
MTAB dc_mod[] = { MTAB dc_mod[] = {
{ MTAB_XTD|MTAB_VDV, 0, "1706-A", NULL, NULL, NULL }, { MTAB_XTD|MTAB_VDV, 0, "1706-A Buffered Data Channel" },
{ MTAB_XTD|MTAB_VUN, 0, "TARGET", NULL, NULL, &show_target, NULL }, { MTAB_XTD|MTAB_VDV, 0, "TARGET", NULL,
{ MTAB_XTD|MTAB_VDV|MTAB_VALR, 0, NULL, "INTERRUPT", &set_intr, NULL, NULL }, NULL, &show_target, NULL, "Display devices attached to the data channel" },
{ MTAB_XTD|MTAB_VDV, 0, "INTERRUPT", NULL, NULL, &show_intr, NULL }, { MTAB_XTD|MTAB_VDV, 0, "INTERRUPT", "INTERRUPT=hexValue",
{ MTAB_XTD|MTAB_VDV, 0, "DEBUG", NULL, NULL, &show_debug, NULL }, &set_intr, &show_intr, NULL, "Display data channel interrupt" },
{ 0 } { 0 }
}; };
DEBTAB dc_deb[] = { DEBTAB dc_deb[] = {
{ "TRACE", DBG_DTRACE }, { "TRACE", DBG_DTRACE, "Trace device I/O requests" },
{ "STATE", DBG_DSTATE }, { "STATE", DBG_DSTATE, "Display device state changes" },
{ "INTR", DBG_DINTR }, { "INTR", DBG_DINTR, "Display device interrupt requests" },
{ "LOCATION", DBG_DLOC }, { "LOCATION", DBG_DLOC, "Display address for I/O instructions" },
{ "ALL", DBG_DTRACE | DBG_DSTATE | DBG_DINTR | DBG_DLOC }, { "ALL", DBG_DTRACE | DBG_DSTATE | DBG_DINTR | DBG_DLOC },
{ NULL } { NULL }
}; };
@ -254,12 +254,7 @@ DEVICE dca_dev = {
NULL, NULL, NULL, NULL, NULL, NULL,
&DCAdev, &DCAdev,
DEV_DEBUG | DEV_NOEQUIP | DEV_INDEV | DEV_OUTDEV, 0, dc_deb, DEV_DEBUG | DEV_NOEQUIP | DEV_INDEV | DEV_OUTDEV, 0, dc_deb,
NULL, NULL, NULL, &dc_help, NULL, NULL, NULL
NULL,
NULL,
NULL,
NULL,
NULL
}; };
DEVICE dcb_dev = { DEVICE dcb_dev = {
@ -269,12 +264,7 @@ DEVICE dcb_dev = {
NULL, NULL, NULL, NULL, NULL, NULL,
&DCBdev, &DCBdev,
DEV_DEBUG | DEV_NOEQUIP | DEV_INDEV | DEV_OUTDEV, 0, dc_deb, DEV_DEBUG | DEV_NOEQUIP | DEV_INDEV | DEV_OUTDEV, 0, dc_deb,
NULL, NULL, NULL, &dc_help, NULL, NULL, NULL
NULL,
NULL,
NULL,
NULL,
NULL
}; };
DEVICE dcc_dev = { DEVICE dcc_dev = {
@ -284,12 +274,7 @@ DEVICE dcc_dev = {
NULL, NULL, NULL, NULL, NULL, NULL,
&DCCdev, &DCCdev,
DEV_DEBUG | DEV_NOEQUIP | DEV_INDEV | DEV_OUTDEV, 0, dc_deb, DEV_DEBUG | DEV_NOEQUIP | DEV_INDEV | DEV_OUTDEV, 0, dc_deb,
NULL, NULL, NULL, &dc_help, NULL, NULL, NULL
NULL,
NULL,
NULL,
NULL,
NULL
}; };
static DEVICE *dc_devices[IO_1706_MAX] = { static DEVICE *dc_devices[IO_1706_MAX] = {
@ -541,17 +526,17 @@ t_stat show_intr(FILE *st, UNIT *uptr, int32 val, CONST void *desc)
*/ */
t_stat show_target(FILE *st, UNIT *uptr, int32 val, CONST void *desc) t_stat show_target(FILE *st, UNIT *uptr, int32 val, CONST void *desc)
{ {
DEVICE *dptr;
IO_DEVICE *iod; IO_DEVICE *iod;
if (uptr == NULL) if (uptr == NULL)
return SCPE_IERR; return SCPE_IERR;
iod = (IO_DEVICE *)uptr->up8; if ((iod = (IO_DEVICE *)uptr->up8) != NULL) {
dptr = iod->iod_indev; DEVICE *dptr = iod->iod_indev;
fprintf(st, "Target: %s (%s), Equip: %d", fprintf(st, "\n\tTarget: %s (%s), Equip: %d",
sim_dname(dptr), iod->iod_model, iod->iod_equip); sim_dname(dptr), iod->iod_model, iod->iod_equip);
}
return SCPE_OK; return SCPE_OK;
} }
@ -793,3 +778,30 @@ uint16 dcINTR(void)
return result; return result;
} }
t_stat dc_help(FILE *st, DEVICE *dptr, UNIT *uptr, int32 flag, const char *cptr)
{
const char helpString[] =
" The %D device is a 1706-A buffered data channel.\n"
"1 Hardware Description\n"
" The 1706-A consists of a controller which can control up to 8 other\n"
" controllers to provide them with direct memory access. Up to 3\n"
" 1706-A's may be connected to the CPU. All 3 buffered data channels are\n"
" available in the simulator but only channel 1 (DCA) is connected to a\n"
" peripheral (the magtape controller) and only if that controller is\n"
" configured as a 1732-A. Unlike actual hardware, the simulator allows\n"
" access to the magtape controller either through the A/Q channel or\n"
" through a 1706-A.\n\n"
" By default, the simulator does not assign an interrupt to a 1706-A. An\n"
" interrupt may be assigned with the command:\n\n"
"+sim> SET %D INTERRUPT=hexValue\n"
"2 Equipment Address\n"
" Unlike most peripherals, buffered data channels use private addresses\n"
" outside the normal 1 - 15 address range.\n"
"2 $Registers\n"
"1 Configuration\n"
" A %D device is configured with various simh SET commands\n"
"2 $Set commands\n";
return scp_help(st, dptr, uptr, flag, helpString, cptr);
}

View file

@ -46,7 +46,6 @@ extern void RaiseExternalInterrupt(DEVICE *);
extern t_bool doDirectorFunc(DEVICE *, t_bool); extern t_bool doDirectorFunc(DEVICE *, t_bool);
extern t_stat show_debug(FILE *, UNIT *, int32, CONST void *);
extern t_stat show_addr(FILE *, UNIT *, int32, CONST void *); extern t_stat show_addr(FILE *, UNIT *, int32, CONST void *);
extern t_stat set_stoponrej(UNIT *, int32, CONST char *, void *); extern t_stat set_stoponrej(UNIT *, int32, CONST char *, void *);
@ -72,6 +71,8 @@ t_bool TTreject(IO_DEVICE *, t_bool, uint8);
enum IOstatus TTin(IO_DEVICE *, uint8); enum IOstatus TTin(IO_DEVICE *, uint8);
enum IOstatus TTout(IO_DEVICE *, uint8); enum IOstatus TTout(IO_DEVICE *, uint8);
t_stat tt_help(FILE *, DEVICE *, UNIT *, int32, const char *);
/* /*
1711-A/B, 1712-A Teletypewriter 1711-A/B, 1712-A Teletypewriter
@ -189,29 +190,31 @@ uint8 tti_manualIntr = 0x7;
UNIT tti_unit = { UDATA(&tti_svc, UNIT_IDLE+TT_MODE_KSR+TTUF_HDX, 0), KBD_POLL_WAIT }; UNIT tti_unit = { UDATA(&tti_svc, UNIT_IDLE+TT_MODE_KSR+TTUF_HDX, 0), KBD_POLL_WAIT };
REG tti_reg[] = { REG tti_reg[] = {
{ HRDATA(MODE, TTdev.iod_rmode, 8) }, { HRDATAD(MODE, TTdev.iod_rmode, 1, "Read/Write mode (Read == TRUE)") },
{ HRDATA(FUNCTION, TTdev.FUNCTION, 16) }, { HRDATAD(FUNCTION, TTdev.FUNCTION, 16, "Last director function issued") },
{ HRDATA(STATUS, TTdev.STATUS, 16) }, { HRDATAD(STATUS, TTdev.STATUS, 16, "Director status register") },
{ HRDATA(IENABLE, TTIdev.IENABLE, 16) }, { HRDATAD(IENABLE, TTIdev.IENABLE, 16, "Interrupts enabled") },
{ HRDATA(INTRKEY, tti_manualIntr, 8) }, { HRDATAD(INTRKEY, tti_manualIntr, 8, "Manual interrupt keycode") },
{ NULL } { NULL }
}; };
MTAB tti_mod[] = { MTAB tti_mod[] = {
{ TTUF_HDX, 0, "full duplex", "FDX", NULL }, { MTAB_XTD | MTAB_VDV, 0, "1711-A Console Terminal (Input)" },
{ TTUF_HDX, TTUF_HDX, "half duplex", "HDX", NULL }, { TTUF_HDX, 0, "full duplex", "FDX",
{ MTAB_XTD | MTAB_VDV, 0, "1711-A", NULL, NULL, NULL }, NULL, NULL, NULL, "Set TT device to full duplex" },
{ MTAB_XTD|MTAB_VDV, 0, "EQUIPMENT", NULL, NULL, &show_addr, NULL }, { TTUF_HDX, TTUF_HDX, "half duplex", "HDX",
{ MTAB_XTD|MTAB_VDV, 0, "DEBUG", NULL, NULL, &show_debug, NULL }, NULL, NULL, NULL, "Set TT device to half duplex" },
{ MTAB_XTD|MTAB_VDV, 0, "EQUIPMENT", NULL,
NULL, &show_addr, NULL, "Display equipment address" },
{ 0 } { 0 }
}; };
DEBTAB tti_deb[] = { DEBTAB tti_deb[] = {
{ "TRACE", DBG_DTRACE }, { "TRACE", DBG_DTRACE, "Trace device I/O requests" },
{ "STATE", DBG_DSTATE }, { "STATE", DBG_DSTATE, "Display device state changes" },
{ "INTR", DBG_DINTR }, { "INTR", DBG_DINTR, "Display device interrupt requests" },
{ "LOCATION", DBG_DLOC }, { "LOCATION", DBG_DLOC, "Display address of I/O instructions" },
{ "FIRSTREJ", DBG_DFIRSTREJ }, { "FIRSTREJ", DBG_DFIRSTREJ, "Suppress display of 2nd ... I/O rejects" },
{ "ALL", DBG_DTRACE | DBG_DSTATE | DBG_DLOC }, { "ALL", DBG_DTRACE | DBG_DSTATE | DBG_DLOC },
{ NULL } { NULL }
}; };
@ -223,8 +226,7 @@ DEVICE tti_dev = {
NULL, NULL, NULL, NULL, NULL, NULL,
&TTdev, &TTdev,
DEV_DEBUG | DEV_NOEQUIP | DEV_INDEV, 0, tti_deb, DEV_DEBUG | DEV_NOEQUIP | DEV_INDEV, 0, tti_deb,
NULL, NULL, NULL, &tt_help, NULL, NULL, NULL
NULL
}; };
/* TTO data structures /* TTO data structures
@ -238,29 +240,31 @@ DEVICE tti_dev = {
UNIT tto_unit = { UDATA(&tto_svc, TT_MODE_KSR+TTUF_HDX, 0), TT_OUT_WAIT }; UNIT tto_unit = { UDATA(&tto_svc, TT_MODE_KSR+TTUF_HDX, 0), TT_OUT_WAIT };
REG tto_reg[] = { REG tto_reg[] = {
{ HRDATA(MODE, TTdev.iod_rmode, 8) }, { HRDATAD(MODE, TTdev.iod_rmode, 1, "Read/Write mode (Read == TRUE)") },
{ HRDATA(FUNCTION, TTdev.FUNCTION, 16) }, { HRDATAD(FUNCTION, TTdev.FUNCTION, 16, "Last director function issued") },
{ HRDATA(STATUS, TTdev.STATUS, 16) }, { HRDATAD(STATUS, TTdev.STATUS, 16, "Director status register") },
{ HRDATA(IENABLE, TTOdev.IENABLE, 16) }, { HRDATAD(IENABLE, TTOdev.IENABLE, 16, "Interrupts enabled") },
{ NULL } { NULL }
}; };
MTAB tto_mod[] = { MTAB tto_mod[] = {
{ TTUF_HDX, 0, "full duplex", "FDX", NULL }, { MTAB_XTD | MTAB_VDV, 0, "1711-A Console Terminal (Output)" },
{ TTUF_HDX, TTUF_HDX, "half duplex", "HDX", NULL }, { TTUF_HDX, 0, "full duplex", "FDX",
{ MTAB_XTD | MTAB_VDV, 0, "1711-A", NULL, NULL, NULL }, NULL, NULL, NULL, "Set TT device to full duplex" },
{ MTAB_XTD|MTAB_VDV, 0, "EQUIPMENT", NULL, NULL, &show_addr, NULL }, { TTUF_HDX, TTUF_HDX, "half duplex", "HDX",
{ MTAB_XTD|MTAB_VDV, 0, "DEBUG", NULL, NULL, &show_debug, NULL }, NULL, NULL, NULL, "Set TT device to half duplex" },
{ MTAB_XTD|MTAB_VDV, 0, "EQUIPMENT", NULL,
NULL, &show_addr, NULL, "Display equipment address" },
{ 0 } { 0 }
}; };
DEBTAB tto_deb[] = { DEBTAB tto_deb[] = {
{ "TRACE", DBG_DTRACE }, { "TRACE", DBG_DTRACE, "Trace device I/O requests" },
{ "STATE", DBG_DSTATE }, { "STATE", DBG_DSTATE, "Display devide state changes" },
{ "INTR", DBG_DINTR }, { "INTR", DBG_DINTR, "Display device interrupt requests" },
{ "LOCATION", DBG_DLOC }, { "LOCATION", DBG_DLOC, "Display address for I/O instructions" },
{ "FIRSTREJ", DBG_DFIRSTREJ }, { "FIRSTREJ", DBG_DFIRSTREJ, "Suppress display of 2nd ... I/O rejects" },
{ "ALL", DBG_DTRACE | DBG_DSTATE | DBG_DLOC }, { "ALL", DBG_DTRACE | DBG_DSTATE | DBG_DLOC },
{ NULL } { NULL }
}; };
@ -272,8 +276,7 @@ DEVICE tto_dev = {
NULL, NULL, NULL, NULL, NULL, NULL,
&TTdev, &TTdev,
DEV_DEBUG | DEV_NOEQUIP | DEV_OUTDEV, 0, tto_deb, DEV_DEBUG | DEV_NOEQUIP | DEV_OUTDEV, 0, tto_deb,
NULL, NULL, NULL, &tt_help, NULL, NULL, NULL
NULL
}; };
/* /*
@ -751,6 +754,34 @@ enum IOstatus TTout(IO_DEVICE *iod, uint8 reg)
return IO_REPLY; return IO_REPLY;
} }
t_stat tt_help(FILE *st, DEVICE *dptr, UNIT *uptr, int32 flag, const char *cptr)
{
const char helpString[] =
/****************************************************************************/
" The TTI/TTO device is a 1711-A teletype console. The device is\n"
" implemented as 2 seperate devices within the simulator; TTI for input\n"
" and TTO for output.\n"
"1 Hardware Description\n"
" The 1711-A consists of a teletype console terminal with an extra button\n"
" which is used to generate a 'manual interrupt'. By default, the\n"
" simulator uses the 'Control+G' combination to generate the interrupt.\n"
" This key combination may be changed by:\n\n"
"+sim> DEPOSIT TTI INTRKEY keycodeValue\n\n"
"2 Equipment Address\n"
" The console device is part of the low-speed package and, as such, is at\n"
" fixed equipment address 1, station 1.\n"
"2 $Registers\n"
"\n"
" These registers contain the emulated state of the device. These values\n"
" don't necessarily relate to any detail of the original device being\n"
" emulated but are merely internal details of the emulation.\n"
"1 Configuration\n"
" A %D device is configured with various simh SET commands\n"
"2 $Set commands\n";
return scp_help(st, dptr, uptr, flag, helpString, cptr);
}
t_stat ptr_svc(UNIT *); t_stat ptr_svc(UNIT *);
t_stat ptr_reset(DEVICE *); t_stat ptr_reset(DEVICE *);
t_stat ptr_attach(UNIT *, CONST char *); t_stat ptr_attach(UNIT *, CONST char *);
@ -759,6 +790,8 @@ t_stat ptr_detach(UNIT *);
enum IOstatus PTRin(IO_DEVICE *, uint8); enum IOstatus PTRin(IO_DEVICE *, uint8);
enum IOstatus PTRout(IO_DEVICE *, uint8); enum IOstatus PTRout(IO_DEVICE *, uint8);
t_stat ptr_help(FILE *, DEVICE *, UNIT *, int32, const char *);
/* /*
1721-A/B/C/D, 1722-A/B Paper Tape Reader 1721-A/B/C/D, 1722-A/B Paper Tape Reader
@ -837,28 +870,32 @@ UNIT ptr_unit = {
}; };
REG ptr_reg[] = { REG ptr_reg[] = {
{ HRDATA(FUNCTION, PTRdev.FUNCTION, 16) }, { HRDATAD(FUNCTION, PTRdev.FUNCTION, 16, "Last director function issued") },
{ HRDATA(STATUS, PTRdev.STATUS, 16) }, { HRDATAD(STATUS, PTRdev.STATUS, 16, "Director status register") },
{ HRDATA(IENABLE, PTRdev.IENABLE, 16)}, { HRDATAD(IENABLE, PTRdev.IENABLE, 16, "Interrupts enabled") },
{ NULL } { NULL }
}; };
MTAB ptr_mod[] = { MTAB ptr_mod[] = {
{ MTAB_XTD | MTAB_VDV, 0, "1721-A", NULL, NULL, NULL }, { MTAB_XTD | MTAB_VDV, 0, "1721-A Paper Tape Reader" },
{ MTAB_XTD|MTAB_VDV, 0, "EQUIPMENT", "EQUIPMENT", NULL, &show_addr, NULL }, { MTAB_XTD|MTAB_VDV, 0, "EQUIPMENT", NULL,
{ MTAB_XTD|MTAB_VDV, 0, "DEBUG", NULL, NULL, &show_debug, NULL }, NULL, &show_addr, NULL, "Display equipment address" },
{ MTAB_XTD|MTAB_VDV, 0, NULL, "STOPONREJECT", &set_stoponrej, NULL, NULL }, { MTAB_XTD|MTAB_VDV, 0, NULL, "STOPONREJECT",
{ MTAB_XTD|MTAB_VDV, 0, NULL, "NOSTOPONREJECT", &clr_stoponrej, NULL, NULL }, &set_stoponrej, NULL, NULL, "Stop simulation if I/O is rejected" },
{ MTAB_XTD|MTAB_VDV, 0, NULL, "PROTECT", &set_protected, NULL, NULL }, { MTAB_XTD|MTAB_VDV, 0, NULL, "NOSTOPONREJECT",
{ MTAB_XTD|MTAB_VDV, 0, NULL, "NOPROTECT", &clear_protected, NULL, NULL }, &clr_stoponrej, NULL, NULL, "Don't stop simulation if I/O is rejected" },
{ MTAB_XTD|MTAB_VDV, 0, NULL, "PROTECT",
&set_protected, NULL, NULL, "Device is protected (unimplemented)" },
{ MTAB_XTD|MTAB_VDV, 0, NULL, "NOPROTECT",
&clear_protected, NULL, NULL, "Device is unprotected (unimplemented)" },
{ 0 } { 0 }
}; };
DEBTAB ptr_deb[] = { DEBTAB ptr_deb[] = {
{ "TRACE", DBG_DTRACE }, { "TRACE", DBG_DTRACE, "Traced device I/O requests" },
{ "STATE", DBG_DSTATE }, { "STATE", DBG_DSTATE, "Display device state changes" },
{ "LOCATION", DBG_DLOC }, { "LOCATION", DBG_DLOC, "Display address of I/O instructions" },
{ "FIRSTREJ", DBG_DFIRSTREJ }, { "FIRSTREJ", DBG_DFIRSTREJ, "Suppress display of 2nd ... I/O rejected" },
{ "ALL", DBG_DTRACE | DBG_DSTATE | DBG_DLOC }, { "ALL", DBG_DTRACE | DBG_DSTATE | DBG_DLOC },
{ NULL } { NULL }
}; };
@ -869,7 +906,8 @@ DEVICE ptr_dev = {
NULL, NULL, &ptr_reset, NULL, NULL, &ptr_reset,
NULL, &ptr_attach, &ptr_detach, NULL, &ptr_attach, &ptr_detach,
&PTRdev, &PTRdev,
DEV_DEBUG | DEV_NOEQUIP | DEV_INDEV | DEV_PROTECT, 0, ptr_deb DEV_DEBUG | DEV_NOEQUIP | DEV_INDEV | DEV_PROTECT, 0, ptr_deb,
NULL, NULL, &ptr_help, NULL, NULL, NULL
}; };
/* /*
@ -1028,12 +1066,38 @@ enum IOstatus PTRout(IO_DEVICE *iod, uint8 reg)
return IO_REPLY; return IO_REPLY;
} }
t_stat ptr_help(FILE *st, DEVICE *dptr, UNIT *uptr, int32 flag, const char *cptr)
{
const char helpString[] =
/****************************************************************************/
" The %D device is a 1721-A paper tape reader.\n"
"1 Hardware Description\n"
" The 1721-A consists of a controller and a physical paper tape reader.\n"
"2 Equipment Address\n"
" The paper tape reader is part of the low-speed package and, as such, is\n"
" at fixed equipment address 1, station 2.\n"
"2 $Registers\n"
"\n"
" These registers contain the emulated state of the device. These values\n"
" don't necessarily relate to any detail of the original device being\n"
" emulated but are merely internal details of the emulation. STATUS always\n"
" contains the current status of the device as it would be read by an\n"
" application program.\n"
"1 Configuration\n"
" A %D device is configured with various simh SET and ATTACH commands\n"
"2 $Set commands\n";
return scp_help(st, dptr, uptr, flag, helpString, cptr);
}
t_stat ptp_svc(UNIT *); t_stat ptp_svc(UNIT *);
t_stat ptp_reset(DEVICE *); t_stat ptp_reset(DEVICE *);
enum IOstatus PTPin(IO_DEVICE *, uint8); enum IOstatus PTPin(IO_DEVICE *, uint8);
enum IOstatus PTPout(IO_DEVICE *, uint8); enum IOstatus PTPout(IO_DEVICE *, uint8);
t_stat ptp_help(FILE *, DEVICE *, UNIT *, int32, const char *);
/* /*
1723-A/B, 1724-A/B Paper Tape Punch 1723-A/B, 1724-A/B Paper Tape Punch
@ -1113,28 +1177,32 @@ UNIT ptp_unit = {
}; };
REG ptp_reg[] = { REG ptp_reg[] = {
{ HRDATA(FUNCTION, PTPdev.FUNCTION, 16) }, { HRDATAD(FUNCTION, PTPdev.FUNCTION, 16, "Last director function issued") },
{ HRDATA(STATUS, PTPdev.STATUS, 16) }, { HRDATAD(STATUS, PTPdev.STATUS, 16, "Director status register") },
{ HRDATA(IENABLE, PTPdev.IENABLE, 16)}, { HRDATAD(IENABLE, PTPdev.IENABLE, 16, "Interrupts enabled") },
{ NULL } { NULL }
}; };
MTAB ptp_mod[] = { MTAB ptp_mod[] = {
{ MTAB_XTD | MTAB_VDV, 0, "1723-A", NULL, NULL, NULL }, { MTAB_XTD | MTAB_VDV, 0, "1723-A Paper Tape Punch" },
{ MTAB_XTD|MTAB_VDV, 0, "EQUIPMENT", "EQUIPMENT", NULL, &show_addr, NULL }, { MTAB_XTD|MTAB_VDV, 0, "EQUIPMENT", NULL,
{ MTAB_XTD|MTAB_VDV, 0, "DEBUG", NULL, NULL, &show_debug, NULL }, NULL, &show_addr, NULL, "Display equipment address" },
{ MTAB_XTD|MTAB_VDV, 0, NULL, "STOPONREJECT", &set_stoponrej, NULL, NULL }, { MTAB_XTD|MTAB_VDV, 0, NULL, "STOPONREJECT",
{ MTAB_XTD|MTAB_VDV, 0, NULL, "NOSTOPONREJECT", &clr_stoponrej, NULL, NULL }, &set_stoponrej, NULL, NULL, "Stop simulation if I/O is rejected" },
{ MTAB_XTD|MTAB_VDV, 0, NULL, "PROTECT", &set_protected, NULL, NULL }, { MTAB_XTD|MTAB_VDV, 0, NULL, "NOSTOPONREJECT",
{ MTAB_XTD|MTAB_VDV, 0, NULL, "NOPROTECT", &clear_protected, NULL, NULL }, &clr_stoponrej, NULL, NULL, "Don't stop simulation if I/O is rejected" },
{ MTAB_XTD|MTAB_VDV, 0, NULL, "PROTECT",
&set_protected, NULL, NULL, "Device is protected (unimplemented)" },
{ MTAB_XTD|MTAB_VDV, 0, NULL, "NOPROTECT",
&clear_protected, NULL, NULL, "Device is unprotected (unimplemented)" },
{ 0 } { 0 }
}; };
DEBTAB ptp_deb[] = { DEBTAB ptp_deb[] = {
{ "TRACE", DBG_DTRACE }, { "TRACE", DBG_DTRACE, "Trace device I/O requests" },
{ "STATE", DBG_DSTATE }, { "STATE", DBG_DSTATE, "Display device state changes" },
{ "LOCATION", DBG_DLOC }, { "LOCATION", DBG_DLOC, "Display address of I/O instructions" },
{ "FIRSTREJ", DBG_DFIRSTREJ }, { "FIRSTREJ", DBG_DFIRSTREJ, "Suppress display of 2nd ... I/O rejects" },
{ "ALL", DBG_DTRACE | DBG_DSTATE | DBG_DLOC }, { "ALL", DBG_DTRACE | DBG_DSTATE | DBG_DLOC },
{ NULL } { NULL }
}; };
@ -1146,10 +1214,9 @@ DEVICE ptp_dev = {
NULL, NULL, NULL, NULL, NULL, NULL,
&PTPdev, &PTPdev,
DEV_DEBUG | DEV_NOEQUIP | DEV_OUTDEV | DEV_PROTECT, 0, ptp_deb, DEV_DEBUG | DEV_NOEQUIP | DEV_OUTDEV | DEV_PROTECT, 0, ptp_deb,
NULL, NULL, NULL, &ptp_help, NULL, NULL, NULL
NULL
}; };
/* /*
* Dump the current internal state of the PTP device. * Dump the current internal state of the PTP device.
*/ */
@ -1306,6 +1373,30 @@ enum IOstatus PTPout(IO_DEVICE *iod, uint8 reg)
return IO_REPLY; return IO_REPLY;
} }
t_stat ptp_help(FILE *st, DEVICE *dptr, UNIT *uptr, int32 flag, const char *cptr)
{
const char helpString[] =
/****************************************************************************/
" The %D device is a 1723-A paper tape punch.\n"
"1 Hardware Description\n"
" The 1723-A consists of a controller and a physical paper tape punch.\n"
"2 Equipment Address\n"
" The paper tape reader is part of the low-speed package and, as such, is\n"
" at fixed equipment address 1, station 4.\n"
"2 $Registers\n"
"\n"
" These registers contain the emulated state of the device. These values\n"
" don't necessarily relate to any detail of the original device being\n"
" emulated but are merely internal details of the emulation. STATUS always\n"
" contains the current status of the device as it would be read by an\n"
" application program.\n"
"1 Configuration\n"
" A %D device is configured with various simh SET and ATTACH commands\n"
"2 $Set commands\n";
return scp_help(st, dptr, uptr, flag, helpString, cptr);
}
t_stat cdr_svc(UNIT *); t_stat cdr_svc(UNIT *);
t_stat cdr_reset(DEVICE *); t_stat cdr_reset(DEVICE *);
@ -1382,26 +1473,28 @@ UNIT cdr_unit = {
}; };
REG cdr_reg[] = { REG cdr_reg[] = {
{ HRDATA(FUNCTION, CDRdev.FUNCTION, 16) }, { HRDATAD(FUNCTION, CDRdev.FUNCTION, 16, "Last director function issued") },
{ HRDATA(STATUS, CDRdev.STATUS, 16) }, { HRDATAD(STATUS, CDRdev.STATUS, 16, "Director status register") },
{ HRDATA(IENABLE, CDRdev.IENABLE, 16)}, { HRDATAD(IENABLE, CDRdev.IENABLE, 16, "Interrupts enabled") },
{ NULL } { NULL }
}; };
MTAB cdr_mod[] = { MTAB cdr_mod[] = {
{ MTAB_XTD | MTAB_VDV, 0, "1729", NULL, NULL, NULL }, { MTAB_XTD | MTAB_VDV, 0, "1729 Card Reader" },
{ MTAB_XTD|MTAB_VDV, 0, "EQUIPMENT", "EQUIPMENT", NULL, &show_addr, NULL }, { MTAB_XTD|MTAB_VDV, 0, "EQUIPMENT", NULL,
{ MTAB_XTD|MTAB_VDV, 0, "DEBUG", NULL, NULL, &show_debug, NULL }, NULL, &show_addr, NULL, "Display equipment address" },
{ MTAB_XTD|MTAB_VDV, 0, NULL, "PROTECT", &set_protected, NULL, NULL }, { MTAB_XTD|MTAB_VDV, 0, NULL, "PROTECT",
{ MTAB_XTD|MTAB_VDV, 0, NULL, "NOPROTECT", &clear_protected, NULL, NULL }, &set_protected, NULL, NULL, "Device is protected (unimplemented)" },
{ MTAB_XTD|MTAB_VDV, 0, NULL, "NOPROTECT",
&clear_protected, NULL, NULL, "Device is unprotected (unimplemented)" },
{ 0 } { 0 }
}; };
DEBTAB cdr_deb[] = { DEBTAB cdr_deb[] = {
{ "TRACE", DBG_DTRACE }, { "TRACE", DBG_DTRACE, "Trace device I/O requests" },
{ "STATE", DBG_DSTATE }, { "STATE", DBG_DSTATE, "Display device state changes" },
{ "LOCATION", DBG_DLOC }, { "LOCATION", DBG_DLOC, "Display address for I/O instructions" },
{ "FIRSTREJ", DBG_DFIRSTREJ }, { "FIRSTREJ", DBG_DFIRSTREJ, "Suppress display of 2nd ... I/O rejects" },
{ "ALL", DBG_DTRACE | DBG_DSTATE | DBG_DLOC }, { "ALL", DBG_DTRACE | DBG_DSTATE | DBG_DLOC },
{ NULL } { NULL }
}; };
@ -1413,8 +1506,7 @@ DEVICE cdr_dev = {
NULL, NULL, NULL, NULL, NULL, NULL,
&CDRdev, &CDRdev,
DEV_DEBUG | DEV_NOEQUIP | DEV_INDEV | DEV_PROTECT, 0, cdr_deb, DEV_DEBUG | DEV_NOEQUIP | DEV_INDEV | DEV_PROTECT, 0, cdr_deb,
NULL, NULL, NULL, NULL, NULL, NULL, NULL
NULL
}; };
/* Unit service */ /* Unit service */

View file

@ -45,7 +45,6 @@ extern void fw_IOintr(t_bool, DEVICE *, IO_DEVICE *, uint16, uint16, uint16, con
extern t_stat checkReset(DEVICE *, uint8); extern t_stat checkReset(DEVICE *, uint8);
extern t_stat show_debug(FILE *, UNIT *, int32, CONST void *);
extern t_stat show_addr(FILE *, UNIT *, int32, CONST void *); extern t_stat show_addr(FILE *, UNIT *, int32, CONST void *);
extern t_stat set_protected(UNIT *, int32, CONST char *, void *); extern t_stat set_protected(UNIT *, int32, CONST char *, void *);
@ -134,8 +133,10 @@ enum IOstatus DPin(IO_DEVICE *, uint8);
enum IOstatus DPout(IO_DEVICE *, uint8); enum IOstatus DPout(IO_DEVICE *, uint8);
t_bool DPintr(IO_DEVICE *); t_bool DPintr(IO_DEVICE *);
t_stat dp_help(FILE *, DEVICE *, UNIT *, int32, const char *);
/* /*
1738-A/B Disk Pack Controller 1738-B Disk Pack Controller
Addresses Addresses
Computer Instruction Computer Instruction
@ -257,38 +258,47 @@ UNIT dp_unit[] = {
}; };
REG dp_reg[] = { REG dp_reg[] = {
{ HRDATA(FUNCTION, DPdev.FUNCTION, 16) }, { HRDATAD(FUNCTION, DPdev.FUNCTION, 16, "Last director function issued") },
{ HRDATA(STATUS, DPdev.STATUS, 16) }, { HRDATAD(STATUS, DPdev.STATUS, 16, "Director status register") },
{ HRDATA(IENABLE, DPdev.IENABLE, 16) }, { HRDATAD(IENABLE, DPdev.IENABLE, 16, "Interrupts enabled") },
{ HRDATA(ADDRSTATUS, DPdev.ADDRSTATUS, 16) }, { HRDATAD(ADDRSTATUS, DPdev.ADDRSTATUS, 16, "Address register status") },
{ NULL } { NULL }
}; };
MTAB dp_mod[] = { MTAB dp_mod[] = {
{ MTAB_XTD|MTAB_VDV, 0, "1738-B", NULL, NULL, NULL }, { MTAB_XTD|MTAB_VDV, 0, "1738-B Disk Pack Controller" },
{ MTAB_XTD|MTAB_VDV, 0, "EQUIPMENT", NULL, NULL, &show_addr, NULL }, { MTAB_XTD|MTAB_VDV, 0, "EQUIPMENT", "EQUIPMENT=hexAddress",
{ MTAB_XTD|MTAB_VDV|MTAB_VALR, 0, NULL, "EQUIPMENT", &set_equipment, NULL, NULL }, &set_equipment, &show_addr, NULL, "Display equipment address" },
{ MTAB_XTD|MTAB_VUN, 0, "DRIVE", NULL, NULL, &show_drive, NULL }, { MTAB_XTD|MTAB_VUN, 0, "DRIVE", NULL,
{ MTAB_XTD|MTAB_VUN, 0, NULL, "853", &set_dp853, NULL, NULL }, NULL, &show_drive, NULL, "Display type of drive (853 or 854" },
{ MTAB_XTD|MTAB_VUN, 0, NULL, "854", &set_dp854, NULL, NULL }, { MTAB_XTD|MTAB_VUN, 0, NULL, "853",
{ MTAB_XTD|MTAB_VDV, 0, "DEBUG", NULL, NULL, &show_debug, NULL }, &set_dp853, NULL, NULL, "Set drive type to 853" },
{ MTAB_XTD|MTAB_VDV, 0, NULL, "STOPONREJECT", &set_stoponrej, NULL, NULL }, { MTAB_XTD|MTAB_VUN, 0, NULL, "854",
{ MTAB_XTD|MTAB_VDV, 0, NULL, "NOSTOPONREJECT", &clr_stoponrej, NULL, NULL }, &set_dp854, NULL, NULL, "Set drive type to 854" },
{ MTAB_XTD|MTAB_VDV, 0, NULL,"PROTECT", &set_protected, NULL, NULL }, { MTAB_XTD|MTAB_VDV, 0, NULL, "STOPONREJECT",
{ MTAB_XTD|MTAB_VDV, 0, NULL, "NOPROTECT", &clear_protected, NULL, NULL}, &set_stoponrej, NULL, NULL, "Stop simulation if I/O is rejected" },
{ MTAB_XTD|MTAB_VDV, 0, "ADDRESSING", NULL, NULL, &show_addressing, NULL }, { MTAB_XTD|MTAB_VDV, 0, NULL, "NOSTOPONREJECT",
{ MTAB_XTD|MTAB_VDV, 0, NULL, "NORMAL", &set_normal, NULL, NULL }, &clr_stoponrej, NULL, NULL, "Don't stop simulation if I/O is rejected" },
{ MTAB_XTD|MTAB_VDV, 0, NULL, "REVERSE", &set_reverse, NULL, NULL }, { MTAB_XTD|MTAB_VDV, 0, NULL,"PROTECT",
&set_protected, NULL, NULL, "Device is protected (unimplemented)" },
{ MTAB_XTD|MTAB_VDV, 0, NULL, "NOPROTECT",
&clear_protected, NULL, NULL, "Device is unprotected (unimplemented)"},
{ MTAB_XTD|MTAB_VDV, 0, "ADDRESSING", NULL,
NULL, &show_addressing, NULL, "Display disk addressing mode" },
{ MTAB_XTD|MTAB_VDV, 0, NULL, "NORMAL",
&set_normal, NULL, NULL, "Normal addressing mode: drive 0 then 1" },
{ MTAB_XTD|MTAB_VDV, 0, NULL, "REVERSE",
&set_reverse, NULL, NULL, "Reverse addressing mode: drive 1 then 0" },
{ 0 } { 0 }
}; };
DEBTAB dp_deb[] = { DEBTAB dp_deb[] = {
{ "TRACE", DBG_DTRACE }, { "TRACE", DBG_DTRACE, "Trace device I/O requests" },
{ "STATE", DBG_DSTATE }, { "STATE", DBG_DSTATE, "Display device state changes" },
{ "INTR", DBG_DINTR }, { "INTR", DBG_DINTR, "Display device interrupt requests" },
{ "ERROR", DBG_DERROR }, { "ERROR", DBG_DERROR, "Display device errors" },
{ "LOCATION", DBG_DLOC }, { "LOCATION", DBG_DLOC, "Display address of I/O instructions" },
{ "FIRSTREJ", DBG_DFIRSTREJ }, { "FIRSTREJ", DBG_DFIRSTREJ, "Suppress display of 2nd ... I/O rejects" },
{ "ALL", DBG_DTRACE | DBG_DSTATE | DBG_DINTR | DBG_DERROR | DBG_DLOC }, { "ALL", DBG_DTRACE | DBG_DSTATE | DBG_DINTR | DBG_DERROR | DBG_DLOC },
{ NULL } { NULL }
}; };
@ -302,8 +312,7 @@ DEVICE dp_dev = {
DEV_DEBUG | DEV_DISK | DEV_DISABLE | \ DEV_DEBUG | DEV_DISK | DEV_DISABLE | \
DEV_DIS | DEV_INDEV | DEV_OUTDEV | DEV_PROTECT, DEV_DIS | DEV_INDEV | DEV_OUTDEV | DEV_PROTECT,
0, dp_deb, 0, dp_deb,
NULL, NULL, NULL, &dp_help, NULL, NULL, NULL
NULL
}; };
/* /*
@ -1100,3 +1109,38 @@ t_stat DPautoload(void)
} }
return SCPE_UNATT; return SCPE_UNATT;
} }
t_stat dp_help(FILE *st, DEVICE *dptr, UNIT *uptr, int32 flag, const char *cptr)
{
const char helpString[] =
/****************************************************************************/
" The %D device is a 1738-B disk pack controller.\n"
"1 Hardware Description\n"
" The 1738-B consists of a controller with up to 2 attached disk drives.\n"
" The controller includes a jumper which controls which drive is\n"
" addressed as logical disk 0:\n\n"
"+sim> SET %D NORMAL\n"
"+sim> SET %D REVERSE\n\n"
" Each physical drive may be configured as a 853 or 854:\n\n"
"+853 drive: 1536000 words per drive\n"
"+854 drive: 3118080 words per drive\n\n"
" The configuration may be changed by:\n\n"
"+sim> SET %U 853\n"
"+sim> SET %U 854\n"
"2 Equipment Address\n"
" Disk controllers are typically set to equipment address 3. This address\n"
" may be changed by:\n\n"
"+sim> SET %D EQUIPMENT=hexValue\n\n"
"2 $Registers\n"
"\n"
" These registers contain the emulated state of the device. These values\n"
" don't necessarily relate to any detail of the original device being\n"
" emulated but are merely internal details of the emulation. STATUS always\n"
" contains the current status of the device as it would be read by an\n"
" application program.\n"
"1 Configuration\n"
" A %D device is configured with various simh SET and ATTACH commands\n"
"2 $Set commands\n";
return scp_help(st, dptr, uptr, flag, helpString, cptr);
}

View file

@ -79,44 +79,6 @@ devIO *IOcall[16];
DEVICE *IOdev[16]; DEVICE *IOdev[16];
devINTR *IOintr[16]; devINTR *IOintr[16];
/*
* Display device debug status
*/
t_stat show_debug(FILE *st, UNIT *uptr, int32 val, CONST void *desc)
{
DEVICE *dptr;
t_bool first = TRUE;
DEBTAB *tab;
if (uptr == NULL)
return SCPE_IERR;
dptr = find_dev_from_unit(uptr);
if (dptr == NULL)
return SCPE_IERR;
tab = dptr->debflags;
if (tab == NULL)
return SCPE_IERR;
fprintf(st, "Debug: ");
if (dptr->dctrl != 0) {
uint32 dctrl = dptr->dctrl;
while ((tab->name != NULL) && (dctrl != 0)) {
if ((dctrl & tab->mask) != 0) {
if (!first)
fprintf(st, ",");
fprintf(st, "%s", tab->name);
dctrl &= ~tab->mask;
first = FALSE;
}
tab++;
}
} else fprintf(st, "None");
return SCPE_OK;
}
/* /*
* Display equipment/station address, buffered data channel and optional * Display equipment/station address, buffered data channel and optional
* additional information: * additional information:
@ -137,7 +99,7 @@ t_stat show_addr(FILE *st, UNIT *uptr, int32 val, CONST void *desc)
return SCPE_IERR; return SCPE_IERR;
iod = (IO_DEVICE *)dptr->ctxt; iod = (IO_DEVICE *)dptr->ctxt;
fprintf(st, "equip: 0x"); fprintf(st, "\n\tequip: 0x");
fprint_val(st, (t_value)iod->iod_equip, DEV_RDX, 16, PV_LEFT); fprint_val(st, (t_value)iod->iod_equip, DEV_RDX, 16, PV_LEFT);
if (iod->iod_station != 0xFF) { if (iod->iod_station != 0xFF) {
fprintf(st, ", station: "); fprintf(st, ", station: ");

View file

@ -78,7 +78,6 @@ extern t_bool doDirectorFunc(DEVICE *, t_bool);
extern t_stat checkReset(DEVICE *, uint8); extern t_stat checkReset(DEVICE *, uint8);
extern t_stat show_debug(FILE *, UNIT *, int32, CONST void *);
extern t_stat show_addr(FILE *, UNIT *, int32, CONST void *); extern t_stat show_addr(FILE *, UNIT *, int32, CONST void *);
extern t_stat set_stoponrej(UNIT *, int32, CONST char *, void *); extern t_stat set_stoponrej(UNIT *, int32, CONST char *, void *);
@ -105,6 +104,8 @@ enum IOstatus LPout(IO_DEVICE *, uint8);
uint8 LPbuf[COLUMNS]; uint8 LPbuf[COLUMNS];
t_stat lp_help(FILE *, DEVICE *, UNIT *, int32, const char *);
/* /*
1740, 1742-30 Line Printer 1740, 1742-30 Line Printer
@ -218,31 +219,33 @@ UNIT lp_unit = {
}; };
REG lp_reg_1740[] = { REG lp_reg_1740[] = {
{ HRDATA(FUNCTION, LPdev.FUNCTION, 16) }, { HRDATAD(FUNCTION, LPdev.FUNCTION, 16, "Last director function issued") },
{ HRDATA(FUNCTION2, LPdev.FUNCTION2, 16) }, { HRDATAD(FUNCTION2, LPdev.FUNCTION2, 16, "Last VFC function issued") },
{ HRDATA(STATUS, LPdev.STATUS, 16) }, { HRDATAD(STATUS, LPdev.STATUS, 16, "Director status register") },
{ HRDATA(IENABLE, LPdev.IENABLE, 16) }, { HRDATAD(IENABLE, LPdev.IENABLE, 16, "Interrupts enabled") },
{ NULL } { NULL }
}; };
REG lp_reg_1742[] = { REG lp_reg_1742[] = {
{ HRDATA(FUNCTION, LPdev.FUNCTION, 16) }, { HRDATAD(FUNCTION, LPdev.FUNCTION, 16, "Last director function issued") },
{ HRDATA(STATUS, LPdev.STATUS, 16) }, { HRDATAD(STATUS, LPdev.STATUS, 16, "Director status register") },
{ HRDATA(IENABLE, LPdev.IENABLE, 16) }, { HRDATAD(IENABLE, LPdev.IENABLE, 16, "Interrupts enabled") },
{ NULL } { NULL }
}; };
MTAB lp_mod[] = { MTAB lp_mod[] = {
{ MTAB_XTD|MTAB_VDV|MTAB_VALR, 0, NULL, "TYPE", &lp_set_type, NULL, NULL, { MTAB_XTD|MTAB_VDV, 0, "TYPE", "TYPE={1740|1742}",
"TYPE={1740|1742}" }, &lp_set_type, &lp_show_type, NULL, "Display printer controller type" },
{ MTAB_XTD|MTAB_VDV, 0, "TYPE", NULL, NULL, &lp_show_type, NULL, NULL }, { MTAB_XTD|MTAB_VDV, 0, "EQUIPMENT", "EQUIPMENT=hexAddress",
{ MTAB_XTD|MTAB_VDV|MTAB_VALR, 0, NULL, "EQUIPMENT", &set_equipment, NULL, NULL }, &set_equipment, &show_addr, NULL, "Display equipment address" },
{ MTAB_XTD|MTAB_VDV, 0, "EQUIPMENT", NULL, NULL, &show_addr, NULL }, { MTAB_XTD|MTAB_VDV, 0, NULL, "STOPONREJECT",
{ MTAB_XTD|MTAB_VDV, 0, "DEBUG", NULL, NULL, &show_debug, NULL }, &set_stoponrej, NULL, NULL, "Stop simulation if I/O is rejected" },
{ MTAB_XTD|MTAB_VDV, 0, NULL, "STOPONREJECT", &set_stoponrej, NULL, NULL }, { MTAB_XTD|MTAB_VDV, 0, NULL, "NOSTOPONREJECT",
{ MTAB_XTD|MTAB_VDV, 0, NULL, "NOSTOPONREJECT", &clr_stoponrej, NULL, NULL }, &clr_stoponrej, NULL, NULL, "Don't stop simulation is I/O is rejected" },
{ MTAB_XTD|MTAB_VDV, 0, NULL, "PROTECT", &set_protected, NULL, NULL }, { MTAB_XTD|MTAB_VDV, 0, NULL, "PROTECT",
{ MTAB_XTD|MTAB_VDV, 0, NULL, "NOPROTECT", &clear_protected, NULL, NULL }, &set_protected, NULL, NULL, "Device is protected (unimplemented)" },
{ MTAB_XTD|MTAB_VDV, 0, NULL, "NOPROTECT",
&clear_protected, NULL, NULL, "Device is unprotected (unimplemented)" },
{ 0 } { 0 }
}; };
@ -254,13 +257,13 @@ MTAB lp_mod[] = {
#define DBG_CC (1 << DBG_V_CC) #define DBG_CC (1 << DBG_V_CC)
DEBTAB lp_deb[] = { DEBTAB lp_deb[] = {
{ "TRACE", DBG_DTRACE }, { "TRACE", DBG_DTRACE, "Trace device I/O requests" },
{ "STATE", DBG_DSTATE }, { "STATE", DBG_DSTATE, "Display device state changes" },
{ "INTR", DBG_DINTR }, { "INTR", DBG_DINTR, "Display device interrupt requests" },
{ "LOCATION", DBG_DLOC }, { "LOCATION", DBG_DLOC, "Display address of I/O instructions" },
{ "FIRSTREJ", DBG_DFIRSTREJ }, { "FIRSTREJ", DBG_DFIRSTREJ, "Suppress display of 2nd ... I/O rejects" },
{ "CC", DBG_CC, "Display carriage control requests" },
{ "ALL", DBG_DTRACE | DBG_DSTATE | DBG_DINTR | DBG_DLOC }, { "ALL", DBG_DTRACE | DBG_DSTATE | DBG_DINTR | DBG_DLOC },
{ "CC", DBG_CC },
{ NULL } { NULL }
}; };
@ -271,19 +274,18 @@ DEVICE lp_dev = {
NULL, NULL, NULL, NULL, NULL, NULL,
&LPdev, &LPdev,
DEV_DEBUG | DEV_DISABLE | DEV_OUTDEV | DEV_PROTECT, 0, lp_deb, DEV_DEBUG | DEV_DISABLE | DEV_OUTDEV | DEV_PROTECT, 0, lp_deb,
NULL, NULL, NULL, &lp_help, NULL, NULL, NULL
NULL
}; };
t_stat lp_show_type(FILE *st, UNIT *uptr, int32 val, CONST void *desc) t_stat lp_show_type(FILE *st, UNIT *uptr, int32 val, CONST void *desc)
{ {
switch (LPdev.iod_type) { switch (LPdev.iod_type) {
case DEVTYPE_1740: case DEVTYPE_1740:
fprintf(st, "1740"); fprintf(st, "1740 Line Printer Controller");
break; break;
case DEVTYPE_1742: case DEVTYPE_1742:
fprintf(st, "1742-30"); fprintf(st, "1742-30 Line Printer Controller");
break; break;
default: default:
@ -652,3 +654,31 @@ enum IOstatus LPout(IO_DEVICE *iod, uint8 reg)
return IO_REPLY; return IO_REPLY;
} }
t_stat lp_help(FILE *st, DEVICE *dptr, UNIT *uptr, int32 flag, const char *cptr)
{
const char helpString[] =
/****************************************************************************/
" The %D device is either a 1740 or 1742 line printer controller.\n"
"1 Hardware Description\n"
" The %D device consists of either a 1740 or 1742 controller along with\n"
" a physical line printer. The type of controller present may be changed\n"
" by:\n\n"
"+sim> SET %D TYPE=1740\n"
"+sim> SET %D TYPE=1742\n\n"
"2 Equipment Address\n"
" Line printer controllers are typically set to equipment address 4. This\n"
" address may be changed by:\n\n"
"+sim> SET %D EQUIPMENT=hexValue\n\n"
"2 $Registers\n"
"\n"
" These registers contain the emulated state of the device. These values\n"
" don't necessarily relate to any detail of the original device being\n"
" emulated but are merely internal details of the emulation. STATUS always\n"
" contains the current status of the device as it would be read by an\n"
" application program.\n"
"1 Configuration\n"
" A %D device is configured with various simh SET and ATTACH commands\n"
"2 $Set commands\n";
return scp_help(st, dptr, uptr, flag, helpString, cptr);
}

View file

@ -107,7 +107,6 @@ extern void loadBootstrap(uint16 *, int, uint16, uint16);
extern t_stat checkReset(DEVICE *, uint8); extern t_stat checkReset(DEVICE *, uint8);
extern t_stat show_debug(FILE *, UNIT *, int32, CONST void *);
extern t_stat show_addr(FILE *, UNIT *, int32, CONST void *); extern t_stat show_addr(FILE *, UNIT *, int32, CONST void *);
extern t_stat set_protected(UNIT *, int32, CONST char *, void *); extern t_stat set_protected(UNIT *, int32, CONST char *, void *);
@ -296,6 +295,8 @@ enum IOstatus MTout(IO_DEVICE *, uint8);
enum IOstatus MTBDCin(IO_DEVICE *, uint16 *, uint8); enum IOstatus MTBDCin(IO_DEVICE *, uint16 *, uint8);
enum IOstatus MTBDCout(IO_DEVICE *, uint16 *, uint8); enum IOstatus MTBDCout(IO_DEVICE *, uint16 *, uint8);
t_stat mt_help(FILE *, DEVICE *, UNIT *, int32, const char *);
/* /*
1732-3 Magnetic Tape Controller 1732-3 Magnetic Tape Controller
@ -450,42 +451,49 @@ UNIT mt_unit[] = {
}; };
REG mt_reg_1732_A[] = { REG mt_reg_1732_A[] = {
{ HRDATA(FUNCTION, MTdev.FUNCTION, 16) }, { HRDATAD(FUNCTION, MTdev.FUNCTION, 16, "Last director status issued") },
{ HRDATA(STATUS, MTdev.STATUS, 16) }, { HRDATAD(STATUS, MTdev.STATUS, 16, "Director status register") },
{ HRDATA(UNITSEL, MTdev.iod_writeR[2], 16) }, { HRDATAD(UNITSEL, MTdev.iod_writeR[2], 16, "Last Unit Select issued") },
{ HRDATA(STATUS2, MTdev.STATUS2, 16) }, { HRDATAD(STATUS2, MTdev.STATUS2, 16, "Transport status register") },
{ HRDATA(IENABLE, MTdev.IENABLE, 16) }, { HRDATAD(IENABLE, MTdev.IENABLE, 16, "Interrupts enabled") },
{ NULL } { NULL }
}; };
REG mt_reg_1732_3[] = { REG mt_reg_1732_3[] = {
{ HRDATA(FUNCTION, MTdev.FUNCTION, 16) }, { HRDATAD(FUNCTION, MTdev.FUNCTION, 16, "Last director status issued") },
{ HRDATA(STATUS, MTdev.STATUS, 16) }, { HRDATAD(STATUS, MTdev.STATUS, 16, "Director status register") },
{ HRDATA(UNITSEL, MTdev.iod_writeR[2], 16) }, { HRDATAD(UNITSEL, MTdev.iod_writeR[2], 16, "Last Unit Select issued") },
{ HRDATA(STATUS2, MTdev.STATUS2, 16) }, { HRDATAD(STATUS2, MTdev.STATUS2, 16, "Transport status register") },
{ HRDATA(IENABLE, MTdev.IENABLE, 16) }, { HRDATAD(IENABLE, MTdev.IENABLE, 16, "Interrupts enabled") },
{ HRDATA(BUFFEREDIO, MTdev.BUFFEREDIO, 16) }, { HRDATAD(BUFFEREDIO, MTdev.BUFFEREDIO, 16, "Last Buffered I/O issued") },
{ HRDATA(CURADDRESS, MTdev.CURADDRESS, 16) }, { HRDATAD(CURADDRESS, MTdev.CURADDRESS, 16, "Current DSA address") },
{ HRDATA(LASTADDRESS, MTdev.iod_LWA, 16) }, { HRDATAD(LASTADDRESS, MTdev.iod_LWA, 16, "Last DSA address") },
{ NULL } { NULL }
}; };
MTAB mt_mod[] = { MTAB mt_mod[] = {
{ MTUF_WLK, 0, "write enabled", "WRITEENABLED", &mt_vlock }, { MTAB_XTD|MTAB_VDV, 0, "TYPE", "TYPE={1732-A|1732-3}",
{ MTUF_WLK, MTUF_WLK, "write locked", "LOCKED", &mt_vlock }, &mt_set_type, &mt_show_type, NULL, "Set/Display magtape controller type" },
{ MTAB_XTD|MTAB_VUN, 0, "FORMAT", "FORMAT", &sim_tape_set_fmt, &sim_tape_show_fmt, NULL }, { MTAB_XTD|MTAB_VDV, 0, "EQUIPMENT", "EQUIPMENT=hexAddress",
{ MTAB_XTD|MTAB_VUN, 0, "CAPACITY", "CAPACITY", &sim_tape_set_capac, &sim_tape_show_capac, NULL }, &set_equipment, &show_addr, NULL, "Set/Display equipment address" },
{ MTAB_XTD|MTAB_VDV|MTAB_VALR, 0, NULL, "TYPE", &mt_set_type, NULL, NULL, { MTUF_WLK, 0, "write enabled", "WRITEENABLED",
"TYPE={1732-A|1732-3}" }, &mt_vlock, NULL, NULL, "Mark transport as write enabled" },
{ MTAB_XTD|MTAB_VDV, 0, "TYPE", NULL, NULL, &mt_show_type, NULL, NULL }, { MTUF_WLK, MTUF_WLK, "write locked", "LOCKED",
{ MTAB_XTD|MTAB_VDV, 0, "EQUIPMENT", NULL, NULL, &show_addr, NULL }, &mt_vlock, NULL, NULL, "Mark transport as writed locked" },
{ MTAB_XTD|MTAB_VDV|MTAB_VALR, 0, NULL, "EQUIPMENT", &set_equipment, NULL, NULL }, { MTAB_XTD|MTAB_VUN, 0, "FORMAT", "FORMAT",
{ MTAB_XTD|MTAB_VUN, 0, "TRANSPORT", NULL, NULL, &mt_show_transport, NULL }, &sim_tape_set_fmt, &sim_tape_show_fmt, NULL, "Define tape format" },
{ MTAB_XTD|MTAB_VDV, 0, "DEBUG", NULL, NULL, &show_debug, NULL }, { MTAB_XTD|MTAB_VUN, 0, "CAPACITY", "CAPACITY",
{ MTAB_XTD|MTAB_VDV, 0, NULL, "STOPONREJECT", &set_stoponrej, NULL, NULL }, &sim_tape_set_capac, &sim_tape_show_capac, NULL, "Specify tape capacity" },
{ MTAB_XTD|MTAB_VDV, 0, NULL, "NOSTOPONREJECT", &clr_stoponrej, NULL, NULL }, { MTAB_XTD|MTAB_VUN, 0, "TRANSPORT", NULL,
{ MTAB_XTD|MTAB_VDV, 0, NULL, "PROTECT", &set_protected, NULL, NULL }, NULL, &mt_show_transport, NULL, "Display type of tape transport" },
{ MTAB_XTD|MTAB_VDV, 0, NULL, "NOPROTECT", &clear_protected, NULL, NULL }, { MTAB_XTD|MTAB_VDV, 0, NULL, "STOPONREJECT",
&set_stoponrej, NULL, NULL, "Stop simulation if I/O is rejected" },
{ MTAB_XTD|MTAB_VDV, 0, NULL, "NOSTOPONREJECT",
&clr_stoponrej, NULL, NULL, "Don't stop simulation if I/O is rejected" },
{ MTAB_XTD|MTAB_VDV, 0, NULL, "PROTECT",
&set_protected, NULL, NULL, "Device is protected (unimplemented)" },
{ MTAB_XTD|MTAB_VDV, 0, NULL, "NOPROTECT",
&clear_protected, NULL, NULL, "Device is unprotected (unimplemented)" },
{ 0 } { 0 }
}; };
@ -509,18 +517,18 @@ MTAB mt_mod[] = {
#define DBG_SELECT (1 << DBG_V_SELECT) #define DBG_SELECT (1 << DBG_V_SELECT)
DEBTAB mt_deb[] = { DEBTAB mt_deb[] = {
{ "STATE", DBG_DSTATE }, { "TRACE", DBG_DTRACE, "Trace device I/O requests" },
{ "TRACE", DBG_DTRACE }, { "STATE", DBG_DSTATE, "Display device state changes" },
{ "INTR", DBG_DINTR }, { "INTR", DBG_DINTR, "Display device interrupt requests" },
{ "LOCATION", DBG_DLOC }, { "LOCATION", DBG_DLOC, "Display address of I/O instructions" },
{ "FIRSTREJ", DBG_DFIRSTREJ }, { "FIRSTREJ", DBG_DFIRSTREJ, "Suppress display of 2nd ... I/O rejects" },
{ "OPS", DBG_OPS }, { "OPS", DBG_OPS, "Trace tape transport operations" },
{ "READ", DBG_READ }, { "READ", DBG_READ, "Dump read records" },
{ "RDATA", DBG_RDATA }, { "RDATA", DBG_RDATA, "Dump programmed I/O read data" },
{ "WDATA", DBG_WDATA }, { "WDATA", DBG_WDATA, "Dump programmed I/O write data" },
{ "MTIO", DBG_MTIO }, { "MTIO", DBG_MTIO, "Trace tape library routine calls" },
{ "DENS", DBG_DENS }, { "DENS", DBG_DENS, "Trace denisty select changes" },
{ "SELECT", DBG_SELECT }, { "SELECT", DBG_SELECT, "Trace transport select/de-select" },
{ NULL } { NULL }
}; };
@ -532,8 +540,7 @@ DEVICE mt_dev = {
&MTdev, &MTdev,
DEV_DEBUG | DEV_TAPE | DEV_DISABLE | DEV_INDEV | DEV_OUTDEV | DEV_PROTECT, DEV_DEBUG | DEV_TAPE | DEV_DISABLE | DEV_INDEV | DEV_OUTDEV | DEV_PROTECT,
0, mt_deb, 0, mt_deb,
NULL, NULL, NULL, &mt_help, NULL, NULL, NULL
NULL
}; };
/* MT trace routine */ /* MT trace routine */
@ -777,11 +784,11 @@ t_stat mt_show_type(FILE *st, UNIT *uptr, int32 val, CONST void *desc)
{ {
switch (MTdev.iod_type) { switch (MTdev.iod_type) {
case DEVTYPE_1732_A: case DEVTYPE_1732_A:
fprintf(st, "1732-A"); fprintf(st, "1732-A Magnetic Tape Controller");
break; break;
case DEVTYPE_1732_3: case DEVTYPE_1732_3:
fprintf(st, "1733-3"); fprintf(st, "1733-3 Magnetic Tape Controller");
break; break;
default: default:
@ -1971,3 +1978,43 @@ enum IOstatus MTBDCout(IO_DEVICE *iod, uint16 *data, uint8 reg)
} }
return IO_REJECT; return IO_REJECT;
} }
t_stat mt_help(FILE *st, DEVICE *dptr, UNIT *uptr, int32 flag, const char *cptr)
{
const char helpString[] =
/****************************************************************************/
" The %D device is either a 1732-A or 1732-3 magtape controller.\n"
"1 Hardware Description\n"
" The %D device consists of either a 1732-A or 1732-3 controller along\n"
" with 4 tape transports. The type con controller present may be changed\n"
" by:\n\n"
"+sim> SET %D 1732-A\n"
"+sim> SET %D 1732-3\n\n"
" The first 3 transports (MT0, MT1, MT2) are 9-track drives and MT3 is a\n"
" 7-track drive. Each drive may be individually write-locked or\n"
" write-enabled with:\n\n"
"+sim> SET %U LOCKED\n"
"+sim> SET %U WRITEENABLED\n\n"
" The 1732-A controller can only perform I/O 1 or 2 bytes at a time. In\n"
" order to use DMA it must be coupled with a 1706-A. Due to the lack of\n"
" DMA it can only support 200, 556 and 800 BPI on 9-track transports.\n\n"
" The 1732-3 is a newer controller which has DMA capability built in. It\n"
" loses the ability to handle 200 BPI tape but adds the ability to access\n"
" 1600 BPI phase encoded tapes.\n"
"2 Equipment Address\n"
" Magtape controllers are typically set to equipment address 7. This\n"
" address may be changed by:\n\n"
"+sim> SET %D EQUIPMENT=hexValue\n\n"
"2 $Registers\n"
"\n"
" These registers contain the emulated state of the device. These values\n"
" don't necessarily relate to any detail of the original device being\n"
" emulated but are merely internal details of the emulation. STATUS and\n"
" STATUS2 always contains the current status of the device as it would be\n"
" read by an application program.\n"
"1 Configuration\n"
" A %D device is configured with various simh SET and ATTACH commands\n"
"2 $Set commands\n";
return scp_help(st, dptr, uptr, flag, helpString, cptr);
}

View file

@ -37,7 +37,6 @@ extern char INTprefix[];
extern t_stat checkReset(DEVICE *, uint8); extern t_stat checkReset(DEVICE *, uint8);
extern t_stat show_debug(FILE *, UNIT *, int32, CONST void *);
extern t_stat show_addr(FILE *, UNIT *, int32, CONST void *); extern t_stat show_addr(FILE *, UNIT *, int32, CONST void *);
extern t_stat set_equipment(UNIT *, int32, CONST char *, void *); extern t_stat set_equipment(UNIT *, int32, CONST char *, void *);
@ -60,6 +59,8 @@ enum IOstatus RTCout(IO_DEVICE *, uint8);
t_stat rtc_svc(UNIT *); t_stat rtc_svc(UNIT *);
t_stat rtc_reset(DEVICE *); t_stat rtc_reset(DEVICE *);
t_stat rtc_help(FILE *, DEVICE *, UNIT *, int32, const char *);
/* /*
10336-1 Real-Time Clock 10336-1 Real-Time Clock
@ -161,25 +162,23 @@ UNIT rtc_unit = {
}; };
REG rtc_reg[] = { REG rtc_reg[] = {
{ HRDATA(FUNCTION, RTCdev.FUNCTION, 16) }, { HRDATAD(FUNCTION, RTCdev.FUNCTION, 16, "Last director function issued") },
{ HRDATA(COUNTER, RTCdev.COUNTER, 16) }, { HRDATAD(COUNTER, RTCdev.COUNTER, 16, "Counter register") },
{ HRDATA(HOLDING, RTCdev.HOLDREG, 16) }, { HRDATAD(HOLDING, RTCdev.HOLDREG, 16, "Hold register") },
{ NULL } { NULL }
}; };
MTAB rtc_mod[] = { MTAB rtc_mod[] = {
{ MTAB_XTD|MTAB_VDV, 0, "10336-1", NULL, NULL, NULL }, { MTAB_XTD|MTAB_VDV, 0, "10336-1 Real Time Clock" },
{ MTAB_XTD|MTAB_VDV|MTAB_VALR, 0, NULL, "RATE", &rtc_set_rate, NULL, NULL, { MTAB_XTD|MTAB_VDV, 0, "EQUIPMENT", "EQUIPMENT=hexAddress",
"val={1usec|10usec|100usec|1msec|10msec|100msec|1second}" }, &set_equipment, &show_addr, NULL, "Display equipment address" },
{ MTAB_XTD|MTAB_VDV, 0, "RATE", NULL, NULL, &rtc_show_rate, NULL, NULL }, { MTAB_XTD|MTAB_VDV, 0, "RATE", "RATE={1usec|10usec|100usec|1msec|10msec|100msec|1second}",
{ MTAB_XTD|MTAB_VDV, 0, "EQUIPMENT", NULL, NULL, &show_addr, NULL }, &rtc_set_rate, &rtc_show_rate, NULL, "Show timer tick interval" },
{ MTAB_XTD|MTAB_VDV|MTAB_VALR, 0, NULL, "EQUIPMENT", &set_equipment, NULL, NULL },
{ MTAB_XTD|MTAB_VDV, 0, "DEBUG", NULL, NULL, &show_debug, NULL },
{ 0 } { 0 }
}; };
DEBTAB rtc_deb[] = { DEBTAB rtc_deb[] = {
{ "TRACE", DBG_DTRACE }, { "TRACE", DBG_DTRACE, "Trace device I/O requests" },
{ NULL } { NULL }
}; };
@ -190,8 +189,7 @@ DEVICE rtc_dev = {
NULL, NULL, NULL, NULL, NULL, NULL,
&RTCdev, &RTCdev,
DEV_DEBUG | DEV_DISABLE, 0, rtc_deb, DEV_DEBUG | DEV_DISABLE, 0, rtc_deb,
NULL, NULL, NULL, &rtc_help, NULL, NULL, NULL
NULL
}; };
t_stat rtc_show_rate(FILE *st, UNIT *uptr, int32 val, CONST void *desc) t_stat rtc_show_rate(FILE *st, UNIT *uptr, int32 val, CONST void *desc)
@ -339,3 +337,35 @@ enum IOstatus RTCout(IO_DEVICE *iod, uint8 reg)
} }
return IO_REPLY; return IO_REPLY;
} }
t_stat rtc_help(FILE *st, DEVICE *dptr, UNIT *uptr, int32 flag, const char *cptr)
{
const char helpString[] =
/****************************************************************************/
" The %D device 10336-1 Real Time Clock.\n"
"1 Hardware Description\n"
" The 10336-1 is a Real Time Clock which can generate periodic interrupts\n"
" or measure elapsed time. The timer resolution is set via jumpers on the\n"
" physical hardware. For the simulator, the resolution can be changed by:\n\n"
"+sim> SET %D RATE=1usec\n"
"+sim> SET %D RATE=10usec\n"
"+sim> SET %D RATE=100usec\n"
"+sim> SET %D RATE=1msec\n"
"+sim> SET %D RATE=10msec\n"
"+sim> SET %D RATE=100msec\n"
"+sim> SET %D RATE=1second\n\n"
"2 Equipment Address\n"
" The %D device is set to equipment address 13. This address may be\n"
" changed by:\n\n"
"+sim> SET %D EQUIPMENT=hexValue\n\n"
"2 $Registers\n"
"\n"
" These registers contain the emulated state of the device. These values\n"
" don't necessarily relate to any detail of the original device being\n"
" emulated but are merely internal details of the emulation.\n"
"1 Configuration\n"
" A %D device is configured with various simh SET commands\n"
"2 $Set commands\n";
return scp_help(st, dptr, uptr, flag, helpString, cptr);
}