From 90e24f006cba8122fc8a487e7a7a86b68b504b01 Mon Sep 17 00:00:00 2001 From: Richard Cornwell Date: Tue, 10 Mar 2020 01:06:43 -0400 Subject: [PATCH] KA10: Allow NIA to work on polled mode system. --- PDP10/kl10_nia.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/PDP10/kl10_nia.c b/PDP10/kl10_nia.c index 1c3a2e3..80064b9 100644 --- a/PDP10/kl10_nia.c +++ b/PDP10/kl10_nia.c @@ -352,6 +352,7 @@ struct nia_device { uint64 status; /* Status of device. */ uint32 uver[4]; /* Version information */ int r_pkt; /* Packet pending */ + int poll; /* Need to poll receiver */ } nia_data; @@ -1496,6 +1497,8 @@ t_stat nia_eth_srv(UNIT * uptr) struct nia_eth_hdr *hdr; uint16 type; + if (nia_data.poll) + sim_clock_coschedule(uptr, 1000); /* continue poll */ /* Check if we need to get a packet */ while (nia_data.r_pkt == 0) { if (eth_read(&nia_data.etherface, &nia_data.rec_buff, NULL) <= 0) @@ -1636,7 +1639,12 @@ t_stat nia_attach(UNIT* uptr, CONST char* cptr) /* Allow Asynchronous inbound packets */ - eth_set_async (&nia_data.etherface, 0); + if (eth_set_async (&nia_data.etherface, 0) == SCPE_OK) + nia_data.poll = 0; + else { + nia_data.poll = 1; + sim_activate (&nia_unit[0], 100); + } return SCPE_OK; }