From 26d9d7131ac6e3067b71abf841a2107f594068d6 Mon Sep 17 00:00:00 2001 From: OBattler Date: Sat, 22 Jun 2024 00:09:52 +0200 Subject: [PATCH] Mask out the upper 3 bits at MCR write, the serial ports now pass Check-It 2.1's MCR test. --- src/device/serial.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/device/serial.c b/src/device/serial.c index ab26fc622..2a61347a1 100644 --- a/src/device/serial.c +++ b/src/device/serial.c @@ -597,7 +597,7 @@ serial_write(uint16_t addr, uint8_t val, void *priv) serial_reset_fifo(dev); if (dev->sd && dev->sd->dtr_callback && (val ^ dev->mctrl) & 1) dev->sd->dtr_callback(dev, val & 1, dev->sd->priv); - dev->mctrl = val; + dev->mctrl = val & 0x1f; if (val & 0x10) { new_msr = (val & 0x0c) << 4; new_msr |= (val & 0x02) ? 0x10 : 0;