From c573e3262be07ad17a4d5dd7a5f2b30e46ab4fc4 Mon Sep 17 00:00:00 2001 From: AJR Date: Wed, 27 Dec 2017 13:10:28 -0500 Subject: [PATCH] A few conversions to bitswap<4> (nw) --- src/devices/machine/74157.cpp | 10 ++-------- src/mame/drivers/mcr3.cpp | 2 +- 2 files changed, 3 insertions(+), 9 deletions(-) diff --git a/src/devices/machine/74157.cpp b/src/devices/machine/74157.cpp index 2151775e5d8..18f1a240b65 100644 --- a/src/devices/machine/74157.cpp +++ b/src/devices/machine/74157.cpp @@ -148,14 +148,8 @@ WRITE8_MEMBER(ls157_device::interleave_w) void ls157_device::interleave_w(u8 data) { - m_b = ((data >> 4) & 8) - | ((data >> 3) & 4) - | ((data >> 2) & 2) - | ((data >> 1) & 1); - m_a = ((data >> 3) & 8) - | ((data >> 2) & 4) - | ((data >> 1) & 2) - | ((data >> 0) & 1); + m_b = bitswap<4>(data, 7, 5, 3, 1); + m_a = bitswap<4>(data, 6, 4, 2, 0); update_output(); } diff --git a/src/mame/drivers/mcr3.cpp b/src/mame/drivers/mcr3.cpp index 4184d2535d6..eaad27a6c34 100644 --- a/src/mame/drivers/mcr3.cpp +++ b/src/mame/drivers/mcr3.cpp @@ -264,7 +264,7 @@ WRITE8_MEMBER(mcr3_state::maxrpm_op6_w) /* when both the write and the enable are low, it's a write to the ADC0844 */ if (!(data & 0x40) && !(data & 0x20)) - m_maxrpm_adc->write(space, 0, bitswap<8>(m_maxrpm_adc_control, 7, 6, 5, 4, 2, 3, 1, 0)); + m_maxrpm_adc->write(space, 0, bitswap<4>(m_maxrpm_adc_control, 2, 3, 1, 0)); /* low 5 bits control the turbo CS */ m_turbo_cheap_squeak->write(space, offset, data);