diff options
| author | 2024-02-24 23:51:03 +0100 | |
|---|---|---|
| committer | 2024-02-25 00:04:09 +0100 | |
| commit | 3d21b4d249986b2e226fcd80ac8a6a83d7f14e0f (patch) | |
| tree | 5d150b2d5023c0acda785023e6445d0d7c8f3d4c | |
| parent | 1b7b4e5f1114c1d28c109973ca34cefeef73b778 (diff) | |
tmp68301: Add parity tx support
| -rw-r--r-- | src/devices/cpu/m68000/tmp68301.cpp | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/devices/cpu/m68000/tmp68301.cpp b/src/devices/cpu/m68000/tmp68301.cpp index dcbd3a4a4a7..5063f504138 100644 --- a/src/devices/cpu/m68000/tmp68301.cpp +++ b/src/devices/cpu/m68000/tmp68301.cpp @@ -1099,8 +1099,15 @@ void tmp68301_device::serial_tx_update(int ch) nstate = m_smr[ch] & SMR_PEN ? SR_PARITY : SR_STOP; break; - case SR_PARITY: - abort(); + case SR_PARITY: { + u32 parity = m_smr[ch] & SMR_PEO ? 0 : 1; + for(u32 i = 0; i != 5 + ((m_smr[ch] >> SMR_CL_SFT) & 3); i++) + if((m_serial_tx[ch] >> i) & 1) + parity = parity ^ 1; + m_tx_cb[ch](parity); + nstate = SR_STOP; + break; + } case SR_STOP: m_tx_cb[ch](1); |
