diff options
author | 2019-03-06 21:47:37 +0100 | |
---|---|---|
committer | 2019-03-06 21:47:53 +0100 | |
commit | 1c30786bc515923b99d98a57a45e20380a6a419a (patch) | |
tree | e82ba6ce13b32a74d8b2081d628e567e3a783ea9 /src/devices/cpu/amis2000/amis2000op.cpp | |
parent | d246606018f8247164d8f09ec6aac54c19643c5d (diff) |
hh_amis2k driver rewrite (nw)
Diffstat (limited to 'src/devices/cpu/amis2000/amis2000op.cpp')
-rw-r--r-- | src/devices/cpu/amis2000/amis2000op.cpp | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/devices/cpu/amis2000/amis2000op.cpp b/src/devices/cpu/amis2000/amis2000op.cpp index e67ee6d153b..92c2eaae3dc 100644 --- a/src/devices/cpu/amis2000/amis2000op.cpp +++ b/src/devices/cpu/amis2000/amis2000op.cpp @@ -220,11 +220,13 @@ void amis2000_base_device::op_disn() // DISN: set D-latch to ACC+carry via on-die segment decoder static const u8 lut_segment_decoder[0x10] = { - // 0-F digits in bit order [DP]abcdefg - 0x7e, 0x30, 0x6d, 0x79, 0x33, 0x5b, 0x5f, 0x70, 0x7f, 0x7b, 0x77, 0x1f, 0x4e, 0x3d, 0x4f, 0x47 + 0x3f, 0x06, 0x5b, 0x4f, 0x66, 0x6d, 0x7d, 0x07, // 0-7 + 0x7f, 0x6f, 0x77, 0x7c, 0x39, 0x5e, 0x79, 0x71 // 8-F }; - const u8 *ptr = (m_7seg_table != nullptr) ? m_7seg_table : lut_segment_decoder; - m_d = ptr[m_acc] | (m_carry ? 0x80 : 0x00); + const u8 *lut = (m_7seg_table != nullptr) ? m_7seg_table : lut_segment_decoder; + + // segments are in order [DP]abcdefg + m_d = bitswap<7>(lut[m_acc],0,1,2,3,4,5,6) | (m_carry ? 0x80 : 0x00); d_latch_out(true); } @@ -500,7 +502,6 @@ void amis2000_base_device::op_rf2() } - // AMI S2152 specific handlers void amis2152_cpu_device::d2f_timer_clock() |