mirror of
https://github.com/simh/simh.git
synced 2026-01-25 11:46:37 +00:00
Merge of Bob's simh-v3.9-0-rc3
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
/* pdp18b_defs.h: 18b PDP simulator definitions
|
||||
|
||||
Copyright (c) 1993-2010, Robert M Supnik
|
||||
Copyright (c) 1993-2012, 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"),
|
||||
@@ -23,6 +23,7 @@
|
||||
used in advertising or otherwise to promote the sale, use or other dealings
|
||||
in this Software without prior written authorization from Robert M Supnik.
|
||||
|
||||
18-Apr-12 RMS Added clk_cosched prototype
|
||||
22-May-10 RMS Added check for 64b definitions
|
||||
30-Oct-06 RMS Added infinite loop stop
|
||||
14-Jan-04 RMS Revised IO device call interface
|
||||
@@ -495,4 +496,6 @@ typedef struct {
|
||||
t_stat set_devno (UNIT *uptr, int32 val, char *cptr, void *desc);
|
||||
t_stat show_devno (FILE *st, UNIT *uptr, int32 val, void *desc);
|
||||
|
||||
int32 clk_cosched (int32 wait);
|
||||
|
||||
#endif
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* pdp18b_stddev.c: 18b PDP's standard devices
|
||||
|
||||
Copyright (c) 1993-2008, Robert M Supnik
|
||||
Copyright (c) 1993-2012, 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"),
|
||||
@@ -29,6 +29,8 @@
|
||||
tto teleprinter
|
||||
clk clock
|
||||
|
||||
18-Apr-12 RMS Added clk_cosched routine
|
||||
Revised clk and tti scheduling
|
||||
18-Jun-07 RMS Added UNIT_IDLE to console input, clock
|
||||
18-Oct-06 RMS Added PDP-15 programmable duplex control
|
||||
Fixed handling of non-printable characters in KSR mode
|
||||
@@ -477,6 +479,16 @@ int32 clk_iors (void)
|
||||
return (TST_INT (CLK)? IOS_CLK: 0);
|
||||
}
|
||||
|
||||
/* Clock coscheduling routine */
|
||||
|
||||
int32 clk_cosched (int32 wait)
|
||||
{
|
||||
int32 t;
|
||||
|
||||
t = sim_is_active (&clk_unit);
|
||||
return (t? t - 1: wait);
|
||||
}
|
||||
|
||||
/* Reset routine */
|
||||
|
||||
t_stat clk_reset (DEVICE *dptr)
|
||||
@@ -1002,7 +1014,8 @@ t_stat tti_svc (UNIT *uptr)
|
||||
#if defined (KSR28) /* Baudot... */
|
||||
int32 in, c, out;
|
||||
|
||||
sim_activate (uptr, KBD_WAIT (uptr->wait, tmxr_poll)); /* continue poll */
|
||||
sim_activate (uptr, KBD_WAIT (uptr->wait, clk_cosched (tmxr_poll)));
|
||||
/* continue poll */
|
||||
if (tti_2nd) { /* char waiting? */
|
||||
uptr->buf = tti_2nd; /* return char */
|
||||
tti_2nd = 0; /* not waiting */
|
||||
@@ -1037,7 +1050,8 @@ else {
|
||||
#else /* ASCII... */
|
||||
int32 c, out;
|
||||
|
||||
sim_activate (uptr, KBD_WAIT (uptr->wait, tmxr_poll)); /* continue poll */
|
||||
sim_activate (uptr, KBD_WAIT (uptr->wait, clk_cosched (tmxr_poll)));
|
||||
/* continue poll */
|
||||
if ((c = sim_poll_kbd ()) < SCPE_KFLAG) /* no char or error? */
|
||||
return c;
|
||||
out = c & 0177; /* mask echo to 7b */
|
||||
@@ -1068,12 +1082,14 @@ return (TST_INT (TTI)? IOS_TTI: 0);
|
||||
|
||||
t_stat tti_reset (DEVICE *dptr)
|
||||
{
|
||||
tti_unit.buf = 0; /* clear buffer */
|
||||
tti_2nd = 0;
|
||||
tty_shift = 0; /* clear state */
|
||||
tti_fdpx = 0; /* clear dpx mode */
|
||||
CLR_INT (TTI); /* clear flag */
|
||||
sim_activate_abs (&tti_unit, KBD_WAIT (tti_unit.wait, tmxr_poll));
|
||||
if (!sim_is_running) { /* RESET (not CAF)? */
|
||||
tti_unit.buf = 0; /* clear buffer */
|
||||
tti_2nd = 0;
|
||||
tty_shift = 0; /* clear state */
|
||||
tti_fdpx = 0; /* clear dpx mode */
|
||||
}
|
||||
sim_activate (&tti_unit, KBD_WAIT (tti_unit.wait, tmxr_poll));
|
||||
return SCPE_OK;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* pdp18b_ttx.c: PDP-9/15 additional terminals simulator
|
||||
|
||||
Copyright (c) 1993-2008, Robert M Supnik
|
||||
Copyright (c) 1993-2012, 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 LT15/LT19 terminal input/output
|
||||
|
||||
18-Apr-12 RMS Revised to use clock coscheduling
|
||||
19-Nov-08 RMS Revised for common TMXR show routines
|
||||
18-Jun-07 RMS Added UNIT_IDLE flag
|
||||
30-Sep-06 RMS Fixed handling of non-printable characters in KSR mode
|
||||
@@ -214,7 +215,7 @@ int32 ln, c, temp;
|
||||
|
||||
if ((uptr->flags & UNIT_ATT) == 0) /* attached? */
|
||||
return SCPE_OK;
|
||||
sim_activate (uptr, tmxr_poll); /* continue poll */
|
||||
sim_activate (uptr, clk_cosched (tmxr_poll)); /* continue poll */
|
||||
ln = tmxr_poll_conn (&ttx_desc); /* look for connect */
|
||||
if (ln >= 0) /* got one? rcv enab */
|
||||
ttx_ldsc[ln].rcve = 1;
|
||||
|
||||
Reference in New Issue
Block a user