summaryrefslogtreecommitdiffstatshomepage
path: root/src/mame/drivers/hh_tms1k.cpp
diff options
context:
space:
mode:
author Vas Crabb <vas@vastheman.com>2017-12-13 17:32:17 +1100
committer Vas Crabb <vas@vastheman.com>2017-12-13 19:26:12 +1100
commit9bf81912d3e6c7a59b83ebbbdab72189d1c3cc75 (patch)
treec95b463f45b0a67d67c37bce2d2e859b7354740b /src/mame/drivers/hh_tms1k.cpp
parentbb524ec858e142a497767fd3f1605f43bea7cca9 (diff)
get rid of legacy BITSWAP* (nw)
Diffstat (limited to 'src/mame/drivers/hh_tms1k.cpp')
-rw-r--r--src/mame/drivers/hh_tms1k.cpp22
1 files changed, 11 insertions, 11 deletions
diff --git a/src/mame/drivers/hh_tms1k.cpp b/src/mame/drivers/hh_tms1k.cpp
index be2a9f5bf23..3511785a6cc 100644
--- a/src/mame/drivers/hh_tms1k.cpp
+++ b/src/mame/drivers/hh_tms1k.cpp
@@ -1775,7 +1775,7 @@ DEVICE_IMAGE_LOAD_MEMBER(quizwizc_state, cartridge)
// get cartridge pinout K1 to R connections
std::string pinout(image.get_feature("pinout"));
m_pinout = std::stoul(pinout, nullptr, 2) & 0xe7;
- m_pinout = BITSWAP8(m_pinout,4,3,7,5,2,1,6,0) << 4;
+ m_pinout = bitswap<8>(m_pinout,4,3,7,5,2,1,6,0) << 4;
return image_init_result::PASS;
}
@@ -1807,7 +1807,7 @@ WRITE16_MEMBER(quizwizc_state::write_r)
WRITE16_MEMBER(quizwizc_state::write_o)
{
// O0-O7: led/digit segment data
- m_o = BITSWAP8(data,7,0,1,2,3,4,5,6);
+ m_o = bitswap<8>(data,7,0,1,2,3,4,5,6);
prepare_display();
}
@@ -3894,7 +3894,7 @@ WRITE16_MEMBER(f2pbball_state::write_r)
WRITE16_MEMBER(f2pbball_state::write_o)
{
// O0-O7: led state
- m_o = BITSWAP8(data,0,7,6,5,4,3,2,1);
+ m_o = bitswap<8>(data,0,7,6,5,4,3,2,1);
prepare_display();
}
@@ -4133,7 +4133,7 @@ protected:
void gpoker_state::prepare_display()
{
set_display_segmask(0x7ff, 0x20ff); // 7seg + bottom-right diagonal
- u16 segs = BITSWAP16(m_o, 15,14,7,12,11,10,9,8,6,6,5,4,3,2,1,0) & 0x20ff;
+ u16 segs = bitswap<16>(m_o, 15,14,7,12,11,10,9,8,6,6,5,4,3,2,1,0) & 0x20ff;
display_matrix(14, 11, segs | (m_r >> 3 & 0xf00), m_r & 0x7ff);
}
@@ -4385,8 +4385,8 @@ public:
void ginv1000_state::prepare_display()
{
- u16 grid = BITSWAP16(m_grid,15,14,13,12,11,10,0,1,2,3,4,5,6,9,8,7);
- u16 plate = BITSWAP16(m_plate,15,14,13,12,3,4,7,8,9,10,11,2,6,5,1,0);
+ u16 grid = bitswap<16>(m_grid,15,14,13,12,11,10,0,1,2,3,4,5,6,9,8,7);
+ u16 plate = bitswap<16>(m_plate,15,14,13,12,3,4,7,8,9,10,11,2,6,5,1,0);
display_matrix(12, 10, plate, grid);
}
@@ -4637,7 +4637,7 @@ void fxmcr165_state::prepare_display()
{
// 7seg digit from O0-O6
m_display_segmask[0] = 0x7f;
- m_display_state[0] = BITSWAP8(m_o,7,2,6,5,4,3,1,0) & 0x7f;
+ m_display_state[0] = bitswap<8>(m_o,7,2,6,5,4,3,1,0) & 0x7f;
// leds from R4-R10
m_display_state[1] = m_r >> 4 & 0x7f;
@@ -4774,7 +4774,7 @@ WRITE16_MEMBER(elecdet_state::write_r)
// R0-R6: select digit
set_display_segmask(0x7f, 0x7f);
- display_matrix(7, 7, BITSWAP8(m_o,7,5,2,1,4,0,6,3), data);
+ display_matrix(7, 7, bitswap<8>(m_o,7,5,2,1,4,0,6,3), data);
}
WRITE16_MEMBER(elecdet_state::write_o)
@@ -5332,7 +5332,7 @@ WRITE32_MEMBER(horseran_state::lcd_output_w)
// col5-11 and col13-19 are 7segs
for (int i = 0; i < 2; i++)
- m_display_state[3 + (offset << 1 | i)] = BITSWAP8(data >> (4+8*i),7,3,5,2,0,1,4,6) & 0x7f;
+ m_display_state[3 + (offset << 1 | i)] = bitswap<8>(data >> (4+8*i),7,3,5,2,0,1,4,6) & 0x7f;
set_display_segmask(0x3f<<3, 0x7f);
set_display_size(24, 3+6);
@@ -6519,7 +6519,7 @@ void mbdtower_state::prepare_display()
// update current state
if (~m_r & 0x10)
{
- u8 o = BITSWAP8(m_o,7,0,4,3,2,1,6,5) & 0x7f;
+ u8 o = bitswap<8>(m_o,7,0,4,3,2,1,6,5) & 0x7f;
m_display_state[2] = (m_o & 0x80) ? o : 0;
m_display_state[1] = (m_o & 0x80) ? 0 : o;
m_display_state[0] = (m_r >> 8 & 1) | (m_r >> 4 & 0xe);
@@ -7090,7 +7090,7 @@ WRITE16_MEMBER(stopthief_state::write_r)
{
// R0-R2: select digit
set_display_segmask(7, 0x7f);
- display_matrix(7, 3, BITSWAP8(m_o,3,5,2,1,4,0,6,7) & 0x7f, data & 7);
+ display_matrix(7, 3, bitswap<8>(m_o,3,5,2,1,4,0,6,7) & 0x7f, data & 7);
// R3-R8(tied together): speaker out
int level = 0;