Declare the console port input and output polling units for most simulators to potentially allow asynchronous console I/O.

This commit is contained in:
Mark Pizzolato 2013-01-21 11:31:29 -08:00
parent d46ebc7d49
commit 95033cee15
18 changed files with 36 additions and 1 deletions

View file

@ -39,6 +39,7 @@
*/
#include "gri_defs.h"
#include "sim_tmxr.h"
#include <ctype.h>
uint32 hsr_stopioe = 1, hsp_stopioe = 1;
@ -277,6 +278,7 @@ return SCPE_OK;
t_stat tti_reset (DEVICE *dptr)
{
tmxr_set_console_units (&tti_unit, &tto_unit);
tti_unit.buf = 0; /* clear buffer */
dev_done = dev_done & ~INT_TTI; /* clear ready */
sim_activate (&tti_unit, tti_unit.wait); /* activate unit */

View file

@ -68,6 +68,7 @@
*/
#include "h316_defs.h"
#include "sim_tmxr.h"
#include <ctype.h>
#define UNIT_V_ASC (TTUF_V_UF + 0) /* ASCII */
@ -533,6 +534,7 @@ return SCPE_OK;
t_stat ptp_reset (DEVICE *dptr)
{
tmxr_set_console_units (&tty_unit[TTR], &tty_unit[TTO]);
CLR_INT (INT_PTP); /* clear ready, enb */
CLR_ENB (INT_PTP);
ptp_power = 0; /* power off */

View file

@ -35,6 +35,7 @@
*/
#include "nova_defs.h"
#include "sim_tmxr.h"
#define UNIT_V_DASHER (UNIT_V_UF + 0) /* Dasher mode */
#define UNIT_DASHER (1 << UNIT_V_DASHER)
@ -192,6 +193,7 @@ void translate_in()
t_stat tti_reset (DEVICE *dptr)
{
tmxr_set_console_units (&tti_unit, &tto_unit);
tti_unit.buf = 0;
dev_busy = dev_busy & ~INT_TTI; /* clear busy */
dev_done = dev_done & ~INT_TTI; /* clear done, int */

View file

@ -49,6 +49,7 @@
*/
#include "nova_defs.h"
#include "sim_tmxr.h"
#define UNIT_V_DASHER (UNIT_V_UF + 0) /* Dasher mode */
#define UNIT_DASHER (1 << UNIT_V_DASHER)
@ -186,6 +187,7 @@ return SCPE_OK;
t_stat tti_reset (DEVICE *dptr)
{
tmxr_set_console_units (&tti_unit, &tto_unit);
tti_unit.buf = 0; /* <not DG compatible> */
DEV_CLR_BUSY( INT_TTI ) ;
DEV_CLR_DONE( INT_TTI ) ;

View file

@ -51,6 +51,7 @@
*/
#include "pdp1_defs.h"
#include "sim_tmxr.h"
#define FIODEC_STOP 013 /* stop code */
#define FIODEC_UC 074
@ -624,6 +625,7 @@ return SCPE_OK;
t_stat tty_reset (DEVICE *dptr)
{
tmxr_set_console_units (&tti_unit, &tto_unit);
tty_buf = 0; /* clear buffer */
tty_uc = 0; /* clear case */
tti_hold = 0; /* clear hold buf */

View file

@ -39,6 +39,7 @@
*/
#include "pdp10_defs.h"
#include "sim_tmxr.h"
#define UNIT_DUMMY (1 << UNIT_V_UF)
extern d10 *M;
@ -160,6 +161,7 @@ return SCPE_OK;
t_stat fe_reset (DEVICE *dptr)
{
tmxr_set_console_units (&fe_unit[0], &fe_unit[1]);
fei_unit.buf = feo_unit.buf = 0;
M[FE_CTYIN] = M[FE_CTYOUT] = 0;
apr_flg = apr_flg & ~(APRF_ITC | APRF_CON);

View file

@ -61,6 +61,7 @@
*/
#include "pdp11_defs.h"
#include "sim_tmxr.h"
#define TTICSR_IMP (CSR_DONE + CSR_IE) /* terminal input */
#define TTICSR_RW (CSR_IE)
@ -308,6 +309,7 @@ return SCPE_OK;
t_stat tti_reset (DEVICE *dptr)
{
tmxr_set_console_units (&tti_unit, &tto_unit);
tti_unit.buf = 0;
tti_csr = 0;
CLR_INT (TTI);

View file

@ -74,6 +74,7 @@
*/
#include "pdp18b_defs.h"
#include "sim_tmxr.h"
#include <ctype.h>
#define UNIT_V_RASCII (UNIT_V_UF + 0) /* reader ASCII */
@ -1079,6 +1080,7 @@ return (TST_INT (TTI)? IOS_TTI: 0);
t_stat tti_reset (DEVICE *dptr)
{
tmxr_set_console_units (&tti_unit, &tto_unit);
CLR_INT (TTI); /* clear flag */
if (!sim_is_running) { /* RESET (not CAF)? */
tti_unit.buf = 0; /* clear buffer */

View file

@ -42,6 +42,7 @@
*/
#include "pdp8_defs.h"
#include "sim_tmxr.h"
#include <ctype.h>
extern int32 int_req, int_enable, dev_done, stop_inst;
@ -193,6 +194,7 @@ return SCPE_OK;
t_stat tti_reset (DEVICE *dptr)
{
tmxr_set_console_units (&tti_unit, &tto_unit);
tti_unit.buf = 0;
dev_done = dev_done & ~INT_TTI; /* clear done, int */
int_req = int_req & ~INT_TTI;

View file

@ -33,6 +33,7 @@
*/
#include "sds_defs.h"
#include "sim_tmxr.h"
#define TT_CR 052 /* typewriter */
#define TT_TB 072
@ -518,6 +519,7 @@ return SCPE_OK;
t_stat tti_reset (DEVICE *dptr)
{
tmxr_set_console_units (&tti_unit, &tto_unit);
chan_disc (tti_dib.chan); /* disconnect */
tti_unit.buf = 0; /* clear state */
xfr_req = xfr_req & ~XFR_TTI; /* clr xfr flag */

View file

@ -48,6 +48,7 @@
*/
#include "tx0_defs.h"
#include "sim_tmxr.h"
#define FLEXO_STOP 061 /* stop code */
#define FLEXO_UC 071
@ -628,6 +629,7 @@ t_stat tto_svc (UNIT *uptr)
t_stat tty_reset (DEVICE *dptr)
{
tmxr_set_console_units (&tti_unit, &tto_unit);
tty_buf = 0; /* clear buffer */
tty_uc = 0; /* clear case */
tti_hold = 0; /* clear hold buf */

View file

@ -32,6 +32,7 @@
*/
#include "vax_defs.h"
#include "sim_tmxr.h"
#include <time.h>
#define TTICSR_IMP (CSR_DONE + CSR_IE) /* terminal input */
@ -343,6 +344,7 @@ return SCPE_OK;
t_stat tti_reset (DEVICE *dptr)
{
tmxr_set_console_units (&tti_unit, &tto_unit);
tti_unit.buf = 0;
tti_csr = 0;
CLR_INT (TTI);

View file

@ -32,6 +32,7 @@
*/
#include "vax_defs.h"
#include "sim_tmxr.h"
#include <time.h>
#define TTICSR_IMP (CSR_DONE + CSR_IE) /* terminal input */
@ -278,6 +279,7 @@ return SCPE_OK;
t_stat tti_reset (DEVICE *dptr)
{
tmxr_set_console_units (&tti_unit, &tto_unit);
tti_unit.buf = 0;
tti_csr = 0;
CLR_INT (TTI);

View file

@ -58,6 +58,7 @@
*/
#include "vax_defs.h"
#include "sim_tmxr.h"
/* Terminal definitions */
@ -668,6 +669,7 @@ return SCPE_OK;
t_stat tti_reset (DEVICE *dptr)
{
tmxr_set_console_units (&tti_unit, &tto_unit);
tti_buf = 0;
tti_csr = 0;
tti_int = 0;

View file

@ -59,6 +59,7 @@
*/
#include "vax_defs.h"
#include "sim_tmxr.h"
#include <time.h>
/* Terminal definitions */
@ -661,6 +662,7 @@ return SCPE_OK;
t_stat tti_reset (DEVICE *dptr)
{
tmxr_set_console_units (&tti_unit, &tto_unit);
tti_buf = 0;
tti_csr = 0;
tti_int = 0;

View file

@ -81,7 +81,7 @@
*/
#include "vax_defs.h"
#include "sim_tmxr.h"
/* Terminal definitions */
@ -484,6 +484,7 @@ return SCPE_OK;
t_stat tti_reset (DEVICE *dptr)
{
tmxr_set_console_units (&tti_unit, &tto_unit);
tti_buf = 0;
tti_csr = 0;
tti_int = 0;

View file

@ -34,6 +34,7 @@
*/
#include "vax_defs.h"
#include "sim_tmxr.h"
#include <time.h>
/* Terminal definitions */
@ -607,6 +608,7 @@ return SCPE_OK;
t_stat tti_reset (DEVICE *dptr)
{
tmxr_set_console_units (tti_unit, tto_unit);
tti_buf = 0;
tti_csr = 0;
tti_int = 0;

View file

@ -77,6 +77,7 @@
*/
#include "vax_defs.h"
#include "sim_tmxr.h"
#include <time.h>
#define TTICSR_IMP (CSR_DONE + CSR_IE) /* terminal input */
@ -341,6 +342,7 @@ return SCPE_OK;
t_stat tti_reset (DEVICE *dptr)
{
tmxr_set_console_units (&tti_unit, &tto_unit);
tti_unit.buf = 0;
tti_csr = 0;
CLR_INT (TTI);