joeylib2/installer/patches/mame/0002-z80scc-rx-fifo.patch

26 lines
1.1 KiB
Diff

--- a/src/devices/machine/z80scc.cpp
+++ b/src/devices/machine/z80scc.cpp
@@ -1045,7 +1045,7 @@
m_uart->m_wr0_ptrbits = 0;
- m_rx_fifo_sz = (m_uart->m_variant & z80scc_device::SET_ESCC) ? 8 : 3;
+ m_rx_fifo_sz = 512; // RetroNet patch: see z80scc.h - emulation-side depth for polled receivers
m_tx_fifo_sz = (m_uart->m_variant & z80scc_device::SET_ESCC) ? 4 : 1;
--- a/src/devices/machine/z80scc.h
+++ b/src/devices/machine/z80scc.h
@@ -256,8 +256,10 @@
unsigned int m_delayed_tx_brg_change;
// receiver state
- uint8_t m_rx_data_fifo[8]; // receive data FIFO
- uint8_t m_rx_error_fifo[8]; // receive error FIFO
+ // RetroNet patch: widened from 8 so a POLLED receiver (no RX interrupt) survives its deaf
+ // windows under emulation; real silicon depth is 3/8 and real clients need interrupt RX.
+ uint8_t m_rx_data_fifo[512]; // receive data FIFO
+ uint8_t m_rx_error_fifo[512]; // receive error FIFO
uint8_t m_rx_error; // current receive error
//int m_rx_fifo // receive FIFO pointer
int m_rx_fifo_rp; // receive FIFO read pointer