mirror of
https://github.com/simh/simh.git
synced 2026-04-25 03:34:34 +00:00
Notes For V3.2-0
RESTRICTION: The PDP-15 FPP is only partially debugged. Do NOT enable this feature for normal operations. WARNING: The core simulator files (scp.c, sim_*.c) have been reorganized. Unzip V3.2-0 to an empty directory before attempting to compile the source. IMPORTANT: If you are compiling for UNIX, please read the notes for Ethernet very carefully. You may need to download a new version of the pcap library, or make changes to the makefile, to get Ethernet support to work. 1. New Features in 3.2-0 1.1 SCP and libraries - Added SHOW <device> RADIX command. - Added SHOW <device> MODIFIERS command. - Added SHOW <device> NAMES command. - Added SET/SHOW <device> DEBUG command. - Added sim_vm_parse_addr and sim_vm_fprint_addr optional interfaces. - Added REG_VMAD flag. - Split SCP into separate libraries for easier modification. - Added more room to the device and unit flag fields. - Changed terminal multiplexor library to support unlimited. number of async lines. 1.2 All DECtapes - Added STOP_EOR flag to enable end-of-reel error stop - Added device debug support. 1.3 Nova and Eclipse - Added QTY and ALM multiplexors (Bruce Ray). 1.4 LGP-30 - Added LGP-30/LGP-21 simulator. 1.5 PDP-11 - Added format, address increment inhibit, transfer overrun detection to RK. - Added device debug support to HK, RP, TM, TQ, TS. - Added DEUNA/DELUA (XU) support (Dave Hittner). - Add DZ per-line logging. 1.6 18b PDP's - Added support for 1-4 (PDP-9)/1-16 (PDP-15) additional terminals. 1.7 PDP-10 - Added DEUNA/DELUA (XU) support (Dave Hittner). 1.8 VAX - Added extended memory to 512MB (Mark Pizzolato). - Added RXV21 support. 2. Bugs Fixed in 3.2-0 2.1 SCP - Fixed double logging of SHOW BREAK (found by Mark Pizzolato). - Fixed implementation of REG_VMIO. 2.2 Nova and Eclipse - Fixed device enable/disable support (found by Bruce Ray). 2.3 PDP-1 - Fixed bug in LOAD (found by Mark Crispin). 2.4 PDP-10 - Fixed bug in floating point unpack. - Fixed bug in FIXR (found by Phil Stone, fixed by Chris Smith). 2.6 PDP-11 - Fixed bug in RQ interrupt control (found by Tom Evans). 2.6 PDP-18B - Fixed bug in PDP-15 XVM g_mode implementation. - Fixed bug in PDP-15 indexed address calculation. - Fixed bug in PDP-15 autoindexed address calculation. - Fixed bugs in FPP-15 instruction decode. - Fixed clock response to CAF. - Fixed bug in hardware read-in mode bootstrap. - Fixed PDP-15 XVM instruction decoding errors. 2.7 VAX - Fixed PC read fault in EXTxV. - Fixed PC write fault in INSV.
This commit is contained in:
committed by
Mark Pizzolato
parent
1da2d9452d
commit
26aa6de663
@@ -1,6 +1,6 @@
|
||||
/* pdp8_clk.c: PDP-8 real-time clock simulator
|
||||
|
||||
Copyright (c) 1993-2003, Robert M Supnik
|
||||
Copyright (c) 1993-2004, Robert M Supnik
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a
|
||||
copy of this software and associated documentation files (the "Software"),
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* pdp8_defs.h: PDP-8 simulator definitions
|
||||
|
||||
Copyright (c) 1993-2003, Robert M Supnik
|
||||
Copyright (c) 1993-2004, Robert M Supnik
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a
|
||||
copy of this software and associated documentation files (the "Software"),
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* pdp8_df.c: DF32 fixed head disk simulator
|
||||
|
||||
Copyright (c) 1993-2003, Robert M Supnik
|
||||
Copyright (c) 1993-2004, Robert M Supnik
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a
|
||||
copy of this software and associated documentation files (the "Software"),
|
||||
@@ -25,6 +25,7 @@
|
||||
|
||||
df DF32 fixed head disk
|
||||
|
||||
04-Jan-04 RMS Changed sim_fsize calling sequence
|
||||
26-Oct-03 RMS Cleaned up buffer copy code
|
||||
26-Jul-03 RMS Fixed bug in set size routine
|
||||
14-Mar-03 RMS Fixed variable platter interaction with save/restore
|
||||
@@ -327,14 +328,17 @@ t_stat df_attach (UNIT *uptr, char *cptr)
|
||||
{
|
||||
uint32 p, sz;
|
||||
uint32 ds_bytes = DF_DKSIZE * sizeof (int16);
|
||||
t_stat r;
|
||||
|
||||
if ((uptr->flags & UNIT_AUTO) && (sz = sim_fsize (cptr))) {
|
||||
r = attach_unit (uptr, cptr);
|
||||
if (r != SCPE_OK) return r;
|
||||
if ((uptr->flags & UNIT_AUTO) && (sz = sim_fsize (uptr->fileref))) {
|
||||
p = (sz + ds_bytes - 1) / ds_bytes;
|
||||
if (p >= DF_NUMDK) p = DF_NUMDK - 1;
|
||||
uptr->flags = (uptr->flags & ~UNIT_PLAT) |
|
||||
(p << UNIT_V_PLAT); }
|
||||
uptr->capac = UNIT_GETP (uptr->flags) * DF_DKSIZE;
|
||||
return attach_unit (uptr, cptr);
|
||||
return SCPE_OK;
|
||||
}
|
||||
|
||||
/* Change disk size */
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
To: Users
|
||||
From: Bob Supnik
|
||||
Subj: PDP-8 Simulator Usage
|
||||
Date: 1-Feb-2003
|
||||
Date: 15-Feb-2004
|
||||
|
||||
COPYRIGHT NOTICE
|
||||
|
||||
The following copyright notice applies to both the SIMH source and binary:
|
||||
|
||||
Original code published in 1993-2003, written by Robert M Supnik
|
||||
Copyright (c) 1993-2003, Robert M Supnik
|
||||
Original code published in 1993-2004, written by Robert M Supnik
|
||||
Copyright (c) 1993-2004, Robert M Supnik
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a
|
||||
copy of this software and associated documentation files (the "Software"),
|
||||
@@ -36,15 +36,21 @@ This memorandum documents the PDP-8 simulator.
|
||||
|
||||
1. Simulator Files
|
||||
|
||||
sim/ sim_defs.h
|
||||
sim/ scp.h
|
||||
sim_console.h
|
||||
sim_defs.h
|
||||
sim_fio.h
|
||||
sim_rev.h
|
||||
sim_sock.h
|
||||
sim_tape.h
|
||||
sim_timer.h
|
||||
sim_tmxr.h
|
||||
scp.c
|
||||
scp_tty.c
|
||||
sim_console.c
|
||||
sim_fio.c
|
||||
sim_sock.c
|
||||
sim_tape.c
|
||||
sim_timer.c
|
||||
sim_tmxr.c
|
||||
|
||||
sim/pdp8/ pdp8_defs.h
|
||||
@@ -381,10 +387,16 @@ where port is a decimal number between 1 and 65535 that is not being used
|
||||
for other TCP/IP activities.
|
||||
|
||||
The additional terminals can be set to one of three modes: UC, 7B, or
|
||||
8B. In KSR mode, lower case input and output characters are converted
|
||||
8B. In UC mode, lower case input and output characters are converted
|
||||
automatically to upper case. In 7B mode, input and output characters
|
||||
are masked to 7 bits. In 8B mode, characters are not modified. The
|
||||
default mode is UC.
|
||||
default mode is UC. Finally, each line supports output logging.
|
||||
The SET TTOXn LOG command enables logging on a line:
|
||||
|
||||
SET TTOXn LOG=filename log output of line n to filename
|
||||
|
||||
The SET TTOXLn NOLOG command disables logging and closes the open log
|
||||
file, if any.
|
||||
|
||||
Once TTIX is attached and the simulator is running, the terminals listen
|
||||
for connections on the specified port. They assume that the incoming
|
||||
@@ -466,6 +478,7 @@ The TD8E controller implements these registers:
|
||||
DCTIME 31 time to decelerate to a full stop
|
||||
POS[0:7] 32 position, in lines, units 0-7
|
||||
STATT[0:7] 18 unit state, units 0-7
|
||||
STOP_OFFR 1 stop on off-reel error
|
||||
|
||||
The LTIME parameter should not be changed, or OS/8 may fail to run
|
||||
correctly. The DCTIME parameter should always be at least 100 times
|
||||
@@ -745,6 +758,7 @@ The DECtape controller implements these registers:
|
||||
SUBSTATE 2 read/write command substate
|
||||
POS[0:7] 32 position, in lines, units 0-7
|
||||
STATT[0:7] 31 unit state, units 0-7
|
||||
STOP_OFFR 1 stop on off-reel error
|
||||
|
||||
It is critically important to maintain certain timing relationships
|
||||
among the DECtape parameters, or the DECtape simulator will fail to
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* pdp8_dt.c: PDP-8 DECtape simulator
|
||||
|
||||
Copyright (c) 1993-2003, Robert M Supnik
|
||||
Copyright (c) 1993-2004, Robert M Supnik
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a
|
||||
copy of this software and associated documentation files (the "Software"),
|
||||
@@ -25,6 +25,8 @@
|
||||
|
||||
dt TC08/TU56 DECtape
|
||||
|
||||
25-Jan-04 RMS Revised for device debug support
|
||||
09-Jan-04 RMS Changed sim_fsize calling sequence, added STOP_OFFR
|
||||
18-Oct-03 RMS Fixed bugs in read all, tightened timing
|
||||
25-Apr-03 RMS Revised for extended file support
|
||||
14-Mar-03 RMS Fixed sizing interaction with save/restore
|
||||
@@ -250,8 +252,7 @@
|
||||
|
||||
#define LOG_MS 001 /* move, search */
|
||||
#define LOG_RW 002 /* read, write */
|
||||
#define LOG_RA 004 /* read all */
|
||||
#define LOG_BL 010 /* block # lblk */
|
||||
#define LOG_BL 004 /* block # lblk */
|
||||
|
||||
#define DT_UPDINT if ((dtsa & DTA_ENB) && (dtsb & (DTB_ERF | DTB_DTF))) \
|
||||
int_req = int_req | INT_DTA; \
|
||||
@@ -262,14 +263,15 @@ extern uint16 M[];
|
||||
extern int32 int_req;
|
||||
extern UNIT cpu_unit;
|
||||
extern int32 sim_switches;
|
||||
extern FILE *sim_deb;
|
||||
|
||||
int32 dtsa = 0; /* status A */
|
||||
int32 dtsb = 0; /* status B */
|
||||
int32 dt_ltime = 12; /* interline time */
|
||||
int32 dt_dctime = 40000; /* decel time */
|
||||
int32 dt_substate = 0;
|
||||
int32 dt_log = 0; /* debug */
|
||||
int32 dt_logblk = 0;
|
||||
int32 dt_stopoffr = 0;
|
||||
|
||||
DEVICE dt_dev;
|
||||
int32 dt76 (int32 IR, int32 AC);
|
||||
@@ -330,7 +332,6 @@ REG dt_reg[] = {
|
||||
{ DRDATA (LTIME, dt_ltime, 31), REG_NZ | PV_LEFT },
|
||||
{ DRDATA (DCTIME, dt_dctime, 31), REG_NZ | PV_LEFT },
|
||||
{ ORDATA (SUBSTATE, dt_substate, 2) },
|
||||
{ ORDATA (LOG, dt_log, 4), REG_HIDDEN },
|
||||
{ DRDATA (LBLK, dt_logblk, 12), REG_HIDDEN },
|
||||
{ URDATA (POS, dt_unit[0].pos, 10, T_ADDR_W, 0,
|
||||
DT_NUMDR, PV_LEFT | REG_RO) },
|
||||
@@ -338,6 +339,7 @@ REG dt_reg[] = {
|
||||
DT_NUMDR, REG_RO) },
|
||||
{ URDATA (LASTT, dt_unit[0].LASTT, 10, 32, 0,
|
||||
DT_NUMDR, REG_HRO) },
|
||||
{ FLDATA (STOP_OFFR, dt_stopoffr, 0) },
|
||||
{ ORDATA (DEVNUM, dt_dib.dev, 6), REG_HRO },
|
||||
{ NULL } };
|
||||
|
||||
@@ -351,12 +353,19 @@ MTAB dt_mod[] = {
|
||||
&set_dev, &show_dev, NULL },
|
||||
{ 0 } };
|
||||
|
||||
DEBTAB dt_deb[] = {
|
||||
{ "MOTION", LOG_MS },
|
||||
{ "DATA", LOG_RW },
|
||||
{ "BLOCK", LOG_BL },
|
||||
{ NULL, 0 } };
|
||||
|
||||
DEVICE dt_dev = {
|
||||
"DT", dt_unit, dt_reg, dt_mod,
|
||||
DT_NUMDR, 8, 24, 1, 8, 12,
|
||||
NULL, NULL, &dt_reset,
|
||||
&dt_boot, &dt_attach, &dt_detach,
|
||||
&dt_dib, DEV_DISABLE };
|
||||
&dt_dib, DEV_DISABLE | DEV_DEBUG, 0,
|
||||
dt_deb, NULL, NULL };
|
||||
|
||||
/* IOT routines */
|
||||
|
||||
@@ -536,16 +545,16 @@ case DTS_OFR: /* off reel */
|
||||
break;
|
||||
case FNC_MOVE: /* move */
|
||||
dt_schedez (uptr, dir); /* sched end zone */
|
||||
if (dt_log & LOG_MS) printf ("[DT%d: moving %s]\n", unum, (dir?
|
||||
"backward": "forward"));
|
||||
if (DEBUG_PRI (dt_dev, LOG_MS)) fprintf (sim_deb, ">>DT%d: moving %s\n",
|
||||
unum, (dir? "backward": "forward"));
|
||||
return; /* done */
|
||||
case FNC_SRCH: /* search */
|
||||
if (dir) newpos = DT_BLK2LN ((DT_QFEZ (uptr)?
|
||||
DTU_TSIZE (uptr): blk), uptr) - DT_BLKLN - DT_WSIZE;
|
||||
else newpos = DT_BLK2LN ((DT_QREZ (uptr)?
|
||||
0: blk + 1), uptr) + DT_BLKLN + (DT_WSIZE - 1);
|
||||
if (dt_log & LOG_MS) printf ("[DT%d: searching %s]\n", unum,
|
||||
(dir? "backward": "forward"));
|
||||
if (DEBUG_PRI (dt_dev, LOG_MS)) fprintf (sim_deb, ">>DT%d: searching %s]\n",
|
||||
unum, (dir? "backward": "forward"));
|
||||
break;
|
||||
case FNC_WRIT: /* write */
|
||||
case FNC_READ: /* read */
|
||||
@@ -654,7 +663,8 @@ uint32 ba;
|
||||
|
||||
switch (mot) {
|
||||
case DTS_DECF: case DTS_DECR: /* decelerating */
|
||||
if (dt_setpos (uptr)) return STOP_DTOFF; /* update pos */
|
||||
if (dt_setpos (uptr)) /* upd pos; off reel? */
|
||||
return IORETURN (dt_stopoffr, STOP_DTOFF);
|
||||
uptr->STATE = DTS_NXTSTA (uptr->STATE); /* advance state */
|
||||
if (uptr->STATE) /* not stopped? */
|
||||
sim_activate (uptr, dt_dctime - (dt_dctime >> 2)); /* must be reversing */
|
||||
@@ -675,7 +685,8 @@ default: /* other */
|
||||
Off reel - detach unit (it must be deselected)
|
||||
*/
|
||||
|
||||
if (dt_setpos (uptr)) return STOP_DTOFF; /* update pos */
|
||||
if (dt_setpos (uptr)) /* upd pos; off reel? */
|
||||
return IORETURN (dt_stopoffr, STOP_DTOFF);
|
||||
if (DT_QEZ (uptr)) { /* in end zone? */
|
||||
dt_seterr (uptr, DTB_END); /* end zone error */
|
||||
return SCPE_OK; }
|
||||
@@ -720,10 +731,11 @@ case FNC_READ: /* read */
|
||||
if (dtsb & DTB_DTF) { /* DTF set? */
|
||||
dt_seterr (uptr, DTB_TIM); /* timing error */
|
||||
return SCPE_OK; }
|
||||
if ((dt_log & LOG_RW) || ((dt_log & LOG_BL) && (blk == dt_logblk)))
|
||||
printf ("[DT%d: reading block %d %s%s\n",
|
||||
if (DEBUG_PRI (dt_dev, LOG_RW) ||
|
||||
(DEBUG_PRI (dt_dev, LOG_BL) && (blk == dt_logblk)))
|
||||
fprintf (sim_deb, ">>DT%d: reading block %d %s%s\n",
|
||||
unum, blk, (dir? "backward": "forward"),
|
||||
((dtsa & DTA_MODE)? " continuous]": "]"));
|
||||
((dtsa & DTA_MODE)? " continuous": " "));
|
||||
dt_substate = 0; /* fall through */
|
||||
case 0: /* normal read */
|
||||
M[DT_WC] = (M[DT_WC] + 1) & 07777; /* incr WC, CA */
|
||||
@@ -769,10 +781,11 @@ case FNC_WRIT: /* write */
|
||||
if (dtsb & DTB_DTF) { /* DTF set? */
|
||||
dt_seterr (uptr, DTB_TIM); /* timing error */
|
||||
return SCPE_OK; }
|
||||
if ((dt_log & LOG_RW) || ((dt_log & LOG_BL) && (blk == dt_logblk)))
|
||||
printf ("[DT%d: writing block %d %s%s\n", unum, blk,
|
||||
if (DEBUG_PRI (dt_dev, LOG_RW) ||
|
||||
(DEBUG_PRI (dt_dev, LOG_BL) && (blk == dt_logblk)))
|
||||
fprintf (sim_deb, ">>DT%d: writing block %d %s%s\n", unum, blk,
|
||||
(dir? "backward": "forward"),
|
||||
((dtsa & DTA_MODE)? " continuous]": "]"));
|
||||
((dtsa & DTA_MODE)? " continuous": " "));
|
||||
dt_substate = 0; /* fall through */
|
||||
case 0: /* normal write */
|
||||
M[DT_WC] = (M[DT_WC] + 1) & 07777; /* incr WC, CA */
|
||||
@@ -1089,7 +1102,7 @@ if ((sim_switches & SIM_SW_REST) == 0) { /* not from rest? */
|
||||
else if (sim_switches & SWMASK ('S')) /* att 16b? */
|
||||
uptr->flags = (uptr->flags | UNIT_11FMT) & ~UNIT_8FMT;
|
||||
else if (!(sim_switches & SWMASK ('R')) && /* autosize? */
|
||||
(sz = sim_fsize (cptr))) {
|
||||
(sz = sim_fsize (uptr->fileref))) {
|
||||
if (sz == D11_FILSIZ)
|
||||
uptr->flags = (uptr->flags | UNIT_11FMT) & ~UNIT_8FMT;
|
||||
else if (sz > D8_FILSIZ)
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* pdp8_lp.c: PDP-8 line printer simulator
|
||||
|
||||
Copyright (c) 1993-2003, Robert M Supnik
|
||||
Copyright (c) 1993-2004, Robert M Supnik
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a
|
||||
copy of this software and associated documentation files (the "Software"),
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* pdp8_mt.c: PDP-8 magnetic tape simulator
|
||||
|
||||
Copyright (c) 1993-2003, Robert M Supnik
|
||||
Copyright (c) 1993-2004, Robert M Supnik
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a
|
||||
copy of this software and associated documentation files (the "Software"),
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* pdp8_pt.c: PDP-8 paper tape reader/punch simulator
|
||||
|
||||
Copyright (c) 1993-2003, Robert M Supnik
|
||||
Copyright (c) 1993-2004, Robert M Supnik
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a
|
||||
copy of this software and associated documentation files (the "Software"),
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* pdp8_rf.c: RF08 fixed head disk simulator
|
||||
|
||||
Copyright (c) 1993-2003, Robert M Supnik
|
||||
Copyright (c) 1993-2004, Robert M Supnik
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a
|
||||
copy of this software and associated documentation files (the "Software"),
|
||||
@@ -25,6 +25,7 @@
|
||||
|
||||
rf RF08 fixed head disk
|
||||
|
||||
04-Jan-04 RMS Changed sim_fsize calling sequence
|
||||
26-Oct-03 RMS Cleaned up buffer copy code
|
||||
26-Jul-03 RMS Fixed bug in set size routine
|
||||
14-Mar-03 RMS Fixed variable platter interaction with save/restore
|
||||
@@ -381,14 +382,17 @@ t_stat rf_attach (UNIT *uptr, char *cptr)
|
||||
{
|
||||
uint32 sz, p;
|
||||
uint32 ds_bytes = RF_DKSIZE * sizeof (int16);
|
||||
t_stat r;
|
||||
|
||||
if ((uptr->flags & UNIT_AUTO) && (sz = sim_fsize (cptr))) {
|
||||
r = attach_unit (uptr, cptr);
|
||||
if (r != SCPE_OK) return r;
|
||||
if ((uptr->flags & UNIT_AUTO) && (sz = sim_fsize (uptr->fileref))) {
|
||||
p = (sz + ds_bytes - 1) / ds_bytes;
|
||||
if (p >= RF_NUMDK) p = RF_NUMDK - 1;
|
||||
uptr->flags = (uptr->flags & ~UNIT_PLAT) |
|
||||
(p << UNIT_V_PLAT); }
|
||||
uptr->capac = UNIT_GETP (uptr->flags) * RF_DKSIZE;
|
||||
return attach_unit (uptr, cptr);
|
||||
return SCPE_OK;
|
||||
}
|
||||
|
||||
/* Change disk size */
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* pdp8_rk.c: RK8E cartridge disk simulator
|
||||
|
||||
Copyright (c) 1993-2003, Robert M Supnik
|
||||
Copyright (c) 1993-2004, Robert M Supnik
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a
|
||||
copy of this software and associated documentation files (the "Software"),
|
||||
@@ -85,7 +85,7 @@
|
||||
#define RKC_WALL 5
|
||||
#define RKC_V_FUNC 9
|
||||
#define RKC_IE 00400 /* interrupt enable */
|
||||
#define RKC_SKDN 00200 /* int on seek done */
|
||||
#define RKC_SKDN 00200 /* set done on seek done */
|
||||
#define RKC_HALF 00100 /* 128W sector */
|
||||
#define RKC_MEX 00070 /* memory extension */
|
||||
#define RKC_V_MEX 3
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* pdp8_rl.c: RL8A cartridge disk simulator
|
||||
|
||||
Copyright (c) 1993-2003, Robert M Supnik
|
||||
Copyright (c) 1993-2004, Robert M Supnik
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a
|
||||
copy of this software and associated documentation files (the "Software"),
|
||||
@@ -25,6 +25,7 @@
|
||||
|
||||
rl RL8A cartridge disk
|
||||
|
||||
04-Jan-04 RMS Changed attach routine to use sim_fsize
|
||||
25-Apr-03 RMS Revised for extended file support
|
||||
04-Oct-02 RMS Added DIB, device number support
|
||||
06-Jan-02 RMS Changed enable/disable support
|
||||
@@ -523,8 +524,7 @@ r = attach_unit (uptr, cptr); /* attach unit */
|
||||
if (r != SCPE_OK) return r; /* error? */
|
||||
uptr->TRK = 0; /* cyl 0 */
|
||||
uptr->STAT = RLDS_VCK; /* new volume */
|
||||
if (fseek (uptr->fileref, 0, SEEK_END)) return SCPE_OK; /* seek to end */
|
||||
if ((p = ftell (uptr->fileref)) == 0) { /* new disk image? */
|
||||
if ((p = sim_fsize (uptr->fileref)) == 0) { /* new disk image? */
|
||||
if (uptr->flags & UNIT_RO) return SCPE_OK;
|
||||
return rl_set_bad (uptr, 0, NULL, NULL); }
|
||||
if ((uptr->flags & UNIT_AUTO) == 0) return r; /* autosize? */
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* pdp8_rx.c: RX8E/RX01, RX28/RX02 floppy disk simulator
|
||||
|
||||
Copyright (c) 1993-2003, Robert M Supnik
|
||||
Copyright (c) 1993-2004, Robert M Supnik
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a
|
||||
copy of this software and associated documentation files (the "Software"),
|
||||
@@ -25,6 +25,7 @@
|
||||
|
||||
rx RX8E/RX01, RX28/RX02 floppy disk
|
||||
|
||||
04-Jan-04 RMS Changed sim_fsize calling sequence
|
||||
05-Nov-03 RMS Fixed bug in RX28 read status (found by Charles Dickman)
|
||||
26-Oct-03 RMS Cleaned up buffer copy code, fixed double density write
|
||||
25-Apr-03 RMS Revised for extended file support
|
||||
@@ -523,12 +524,15 @@ return SCPE_OK;
|
||||
t_stat rx_attach (UNIT *uptr, char *cptr)
|
||||
{
|
||||
uint32 sz;
|
||||
t_stat r;
|
||||
|
||||
if ((uptr->flags & UNIT_AUTO) && (sz = sim_fsize (cptr))) {
|
||||
r = attach_unit (uptr, cptr);
|
||||
if (r != SCPE_OK) return r;
|
||||
if ((uptr->flags & UNIT_AUTO) && (sz = sim_fsize (uptr->fileref))) {
|
||||
if (sz > RX_SIZE) uptr->flags = uptr->flags | UNIT_DEN;
|
||||
else uptr->flags = uptr->flags & ~UNIT_DEN; }
|
||||
uptr->capac = (uptr->flags & UNIT_DEN)? RX2_SIZE: RX_SIZE;
|
||||
return attach_unit (uptr, cptr);
|
||||
return SCPE_OK;
|
||||
}
|
||||
|
||||
/* Set size routine */
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* pdp8_sys.c: PDP-8 simulator interface
|
||||
|
||||
Copyright (c) 1993-2003, Robert M Supnik
|
||||
Copyright (c) 1993-2004, Robert M Supnik
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a
|
||||
copy of this software and associated documentation files (the "Software"),
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* pdp8_td.c: PDP-8 simple DECtape controller (TD8E) simulator
|
||||
|
||||
Copyright (c) 1993-2003, Robert M Supnik
|
||||
Copyright (c) 1993-2004, Robert M Supnik
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a
|
||||
copy of this software and associated documentation files (the "Software"),
|
||||
@@ -28,6 +28,8 @@
|
||||
|
||||
td TD8E/TU56 DECtape
|
||||
|
||||
09-Jan-04 RMS Changed sim_fsize calling sequence, added STOP_OFFR
|
||||
|
||||
PDP-8 DECtapes are represented in memory by fixed length buffer of 12b words.
|
||||
Three file formats are supported:
|
||||
|
||||
@@ -183,6 +185,7 @@ int32 td_csum = 0; /* save check sum */
|
||||
int32 td_qlctr = 0; /* quad line ctr */
|
||||
int32 td_ltime = 20; /* interline time */
|
||||
int32 td_dctime = 40000; /* decel time */
|
||||
int32 td_stopoffr = 0;
|
||||
static uint8 tdb_mtk[DT_NUMDR][D18_LPERB]; /* mark track bits */
|
||||
|
||||
DEVICE td_dev;
|
||||
@@ -238,6 +241,7 @@ REG td_reg[] = {
|
||||
DT_NUMDR, REG_RO) },
|
||||
{ URDATA (LASTT, td_unit[0].LASTT, 10, 32, 0,
|
||||
DT_NUMDR, REG_HRO) },
|
||||
{ FLDATA (STOP_OFFR, td_stopoffr, 0) },
|
||||
{ ORDATA (DEVNUM, td_dib.dev, 6), REG_HRO },
|
||||
{ NULL } };
|
||||
|
||||
@@ -283,7 +287,7 @@ case 04: /* SDLC */
|
||||
td_cmd = AC & TDC_MASK; /* update cmd */
|
||||
if ((diff != 0) && (diff != TDC_RW)) { /* signif change? */
|
||||
if (td_newsa (td_cmd)) /* new command */
|
||||
return AC | (STOP_DTOFF << IOT_V_REASON); }
|
||||
return AC | (IORETURN (td_stopoffr, STOP_DTOFF) << IOT_V_REASON); }
|
||||
break;
|
||||
case 05: /* SDLD */
|
||||
td_slf = 0; /* clear flags */
|
||||
@@ -433,7 +437,8 @@ if ((uptr->flags & UNIT_ATT) == 0) { /* not attached? */
|
||||
|
||||
switch (mot) { /* case on motion */
|
||||
case STA_DEC: /* deceleration */
|
||||
if (td_setpos (uptr)) return STOP_DTOFF; /* update pos */
|
||||
if (td_setpos (uptr)) /* upd pos; off reel? */
|
||||
return IORETURN (td_stopoffr, STOP_DTOFF);
|
||||
if ((unum != su) || !(td_cmd & TDC_STPGO)) /* not sel or stop? */
|
||||
uptr->STATE = 0; /* stop */
|
||||
else { /* selected and go */
|
||||
@@ -442,7 +447,8 @@ case STA_DEC: /* deceleration */
|
||||
sim_activate (uptr, td_dctime - (td_dctime >> 2)); }
|
||||
return SCPE_OK;
|
||||
case STA_ACC: /* accelerating */
|
||||
if (td_setpos (uptr)) return STOP_DTOFF; /* update pos */
|
||||
if (td_setpos (uptr)) /* upd pos; off reel? */
|
||||
return IORETURN (td_stopoffr, STOP_DTOFF);
|
||||
uptr->STATE = STA_UTS | dir; /* set up to speed */
|
||||
break;
|
||||
case STA_UTS: /* up to speed */
|
||||
@@ -452,7 +458,7 @@ case STA_UTS: /* up to speed */
|
||||
if (((int32) uptr->pos < 0) || /* off reel? */
|
||||
(uptr->pos >= (((uint32) DTU_FWDEZ (uptr)) + DT_EZLIN))) {
|
||||
detach_unit (uptr);
|
||||
return STOP_DTOFF; }
|
||||
return IORETURN (td_stopoffr, STOP_DTOFF); }
|
||||
break; } /* check function */
|
||||
|
||||
/* At speed - process the current line
|
||||
@@ -707,7 +713,7 @@ if ((sim_switches & SIM_SW_REST) == 0) { /* not from rest? */
|
||||
else if (sim_switches & SWMASK ('S')) /* att 16b? */
|
||||
uptr->flags = (uptr->flags | UNIT_11FMT) & ~UNIT_8FMT;
|
||||
else if (!(sim_switches & SWMASK ('R')) && /* autosize? */
|
||||
(sz = sim_fsize (cptr))) {
|
||||
(sz = sim_fsize (uptr->fileref))) {
|
||||
if (sz == D11_FILSIZ)
|
||||
uptr->flags = (uptr->flags | UNIT_11FMT) & ~UNIT_8FMT;
|
||||
else if (sz > D8_FILSIZ)
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* pdp8_tsc.c: PDP-8 ETOS timesharing option board (TSC8-75)
|
||||
|
||||
Copyright (c) 2003, Robert M Supnik
|
||||
Copyright (c) 2003-2004, Robert M Supnik
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a
|
||||
copy of this software and associated documentation files (the "Software"),
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* pdp8_ttx.c: PDP-8 additional terminals simulator
|
||||
|
||||
Copyright (c) 1993-2003, Robert M Supnik
|
||||
Copyright (c) 1993-2004, Robert M Supnik
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a
|
||||
copy of this software and associated documentation files (the "Software"),
|
||||
@@ -25,6 +25,7 @@
|
||||
|
||||
ttix,ttox PT08/KL8JA terminal input/output
|
||||
|
||||
05-Jan-04 RMS Revised for tmxr library changes
|
||||
09-May-03 RMS Added network device flag
|
||||
25-Apr-03 RMS Revised for extended file support
|
||||
22-Dec-02 RMS Added break support
|
||||
@@ -62,8 +63,7 @@ uint8 ttix_buf[TTX_LINES] = { 0 }; /* input buffers */
|
||||
uint8 ttox_buf[TTX_LINES] = { 0 }; /* output buffers */
|
||||
int32 ttx_tps = 100; /* polls per second */
|
||||
TMLN ttx_ldsc[TTX_LINES] = { 0 }; /* line descriptors */
|
||||
TMXR ttx_desc = { /* mux descriptor */
|
||||
TTX_LINES, 0, 0, &ttx_ldsc[0], &ttx_ldsc[1], &ttx_ldsc[2], &ttx_ldsc[3] };
|
||||
TMXR ttx_desc = { TTX_LINES, 0, 0, ttx_ldsc }; /* mux descriptor */
|
||||
|
||||
DEVICE ttix_dev, ttox_dev;
|
||||
int32 ttix (int32 IR, int32 AC);
|
||||
@@ -111,6 +111,10 @@ MTAB ttix_mod[] = {
|
||||
NULL, &ttx_show, NULL },
|
||||
{ MTAB_XTD|MTAB_VDV, 0, "DEVNO", "DEVNO",
|
||||
&set_dev, &show_dev, NULL },
|
||||
{ MTAB_XTD|MTAB_VUN|MTAB_NC, 0, "LOG", "LOG",
|
||||
&tmxr_set_log, &tmxr_show_log, &ttx_desc },
|
||||
{ MTAB_XTD|MTAB_VUN|MTAB_NC, 0, NULL, "NOLOG",
|
||||
&tmxr_set_nolog, NULL, &ttx_desc },
|
||||
{ 0 } };
|
||||
|
||||
DEVICE ttix_dev = {
|
||||
@@ -279,9 +283,9 @@ t_stat ttox_svc (UNIT *uptr)
|
||||
{
|
||||
int32 c, ln = uptr - ttox_unit; /* line # */
|
||||
|
||||
if (ttx_desc.ldsc[ln]->conn) { /* connected? */
|
||||
if (ttx_desc.ldsc[ln]->xmte) { /* tx enabled? */
|
||||
TMLN *lp = ttx_desc.ldsc[ln]; /* get line */
|
||||
if (ttx_ldsc[ln].conn) { /* connected? */
|
||||
if (ttx_ldsc[ln].xmte) { /* tx enabled? */
|
||||
TMLN *lp = &ttx_ldsc[ln]; /* get line */
|
||||
if (ttox_unit[ln].flags & UNIT_UC) { /* UC mode? */
|
||||
c = ttox_buf[ln] & 0177; /* get char */
|
||||
if (islower (c)) c = toupper (c); }
|
||||
@@ -337,7 +341,7 @@ t_stat r;
|
||||
|
||||
r = tmxr_detach (&ttx_desc, uptr); /* detach */
|
||||
for (i = 0; i < TTX_LINES; i++) { /* all lines, */
|
||||
ttx_desc.ldsc[i]->rcve = 0; /* disable rcv */
|
||||
ttx_ldsc[i].rcve = 0; /* disable rcv */
|
||||
sim_cancel (&ttox_unit[i]); } /* stop poll */
|
||||
return r;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user