KS10: Make Chaosnet work.
This commit is contained in:
parent
47cf74ac4b
commit
1ed26cfb0e
1 changed files with 11 additions and 4 deletions
|
@ -186,13 +186,18 @@ t_stat ch_rx_word (int32 *data)
|
|||
sim_debug (DBG_DAT, &ch_dev, "Read buffer word %d: %06o\n",
|
||||
rx_count, *data);
|
||||
rx_count--;
|
||||
if (rx_count == 0) {
|
||||
ch_lines[0].rcve = TRUE;
|
||||
sim_debug (DBG_TRC, &ch_dev, "Read all, rx on\n");
|
||||
status &= ~RXD;
|
||||
}
|
||||
}
|
||||
return SCPE_OK;
|
||||
}
|
||||
|
||||
t_stat ch_tx_word (int data)
|
||||
{
|
||||
if (tx_count < 126) {
|
||||
if (tx_count < 246) {
|
||||
int i = CHUDP_HEADER + 2*tx_count;
|
||||
sim_debug (DBG_DAT, &ch_dev, "Write buffer word %d: %06o\n",
|
||||
tx_count, data);
|
||||
|
@ -237,10 +242,11 @@ t_stat ch_transmit ()
|
|||
if (r == SCPE_OK) {
|
||||
sim_debug (DBG_PKT, &ch_dev, "Sent UDP packet, %d bytes.\n", (int)len);
|
||||
tmxr_poll_tx (&ch_tmxr);
|
||||
status |= TXD;
|
||||
ch_test_int ();
|
||||
} else
|
||||
sim_debug (DBG_ERR, &ch_dev, "Sending UDP failed: %d.\n", r);
|
||||
tx_count = 0;
|
||||
status |= TXD;
|
||||
ch_test_int ();
|
||||
return SCPE_OK;
|
||||
}
|
||||
|
||||
|
@ -405,7 +411,8 @@ t_stat ch_wr (int32 data, int32 PA, int32 access)
|
|||
t_stat ch_svc(UNIT *uptr)
|
||||
{
|
||||
sim_clock_coschedule (uptr, 1000);
|
||||
(void)tmxr_poll_conn (&ch_tmxr);
|
||||
if (tmxr_poll_conn (&ch_tmxr) != -1)
|
||||
ch_lines[0].rcve = TRUE;
|
||||
if (ch_lines[0].conn)
|
||||
ch_receive ();
|
||||
return SCPE_OK;
|
||||
|
|
Loading…
Add table
Reference in a new issue