summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author Patrick Mackinlay <pmackinlay@hotmail.com>2019-05-17 18:39:40 +0700
committer Patrick Mackinlay <pmackinlay@hotmail.com>2019-05-17 18:39:40 +0700
commit5c265dc43fd04365139f50a647d225984aadc6bc (patch)
tree38a357482c84a1b89dcad95ec639f916c6be6e3d
parent0d75b0272dcf52bdc419934c6ead6b99bb8b4204 (diff)
diserial: correct parity output (nw)
-rw-r--r--src/emu/diserial.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/emu/diserial.cpp b/src/emu/diserial.cpp
index 66778e5458c..2704defab0c 100644
--- a/src/emu/diserial.cpp
+++ b/src/emu/diserial.cpp
@@ -399,10 +399,10 @@ void device_serial_interface::transmit_register_setup(u8 data_byte)
/* get parity */
/* if parity = 0, data has even parity - i.e. there is an even number of one bits in the data */
/* if parity = 1, data has odd parity - i.e. there is an odd number of one bits in the data */
- parity = serial_helper_get_parity(data_byte);
+ parity = serial_helper_get_parity(data_byte) ^ 1;
break;
case PARITY_EVEN:
- parity = serial_helper_get_parity(data_byte) ^ 1;
+ parity = serial_helper_get_parity(data_byte);
break;
case PARITY_MARK:
parity = 1;