summaryrefslogtreecommitdiffstatshomepage
path: root/src/mame/drivers/hh_tms1k.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mame/drivers/hh_tms1k.cpp')
-rw-r--r--src/mame/drivers/hh_tms1k.cpp76
1 files changed, 38 insertions, 38 deletions
diff --git a/src/mame/drivers/hh_tms1k.cpp b/src/mame/drivers/hh_tms1k.cpp
index e14282582f9..5c908fdbb50 100644
--- a/src/mame/drivers/hh_tms1k.cpp
+++ b/src/mame/drivers/hh_tms1k.cpp
@@ -250,7 +250,7 @@ void hh_tms1k_state::machine_reset()
void hh_tms1k_state::display_update()
{
- uint32_t active_state[0x20];
+ u32 active_state[0x20];
for (int y = 0; y < m_display_maxy; y++)
{
@@ -263,7 +263,7 @@ void hh_tms1k_state::display_update()
m_display_decay[y][x] = m_display_wait;
// determine active state
- uint32_t ds = (m_display_decay[y][x] != 0) ? 1 : 0;
+ u32 ds = (m_display_decay[y][x] != 0) ? 1 : 0;
active_state[y] |= (ds << x);
}
}
@@ -325,7 +325,7 @@ void hh_tms1k_state::set_display_size(int maxx, int maxy)
m_display_maxy = maxy;
}
-void hh_tms1k_state::set_display_segmask(uint32_t digits, uint32_t mask)
+void hh_tms1k_state::set_display_segmask(u32 digits, u32 mask)
{
// set a segment mask per selected digit, but leave unselected ones alone
for (int i = 0; i < 0x20; i++)
@@ -336,12 +336,12 @@ void hh_tms1k_state::set_display_segmask(uint32_t digits, uint32_t mask)
}
}
-void hh_tms1k_state::display_matrix(int maxx, int maxy, uint32_t setx, uint32_t sety, bool update)
+void hh_tms1k_state::display_matrix(int maxx, int maxy, u32 setx, u32 sety, bool update)
{
set_display_size(maxx, maxy);
// update current state
- uint32_t mask = (1 << maxx) - 1;
+ u32 mask = (1 << maxx) - 1;
for (int y = 0; y < maxy; y++)
m_display_state[y] = (sety >> y & 1) ? ((setx & mask) | (1 << maxx)) : 0;
@@ -352,9 +352,9 @@ void hh_tms1k_state::display_matrix(int maxx, int maxy, uint32_t setx, uint32_t
// generic input handlers
-uint8_t hh_tms1k_state::read_inputs(int columns)
+u8 hh_tms1k_state::read_inputs(int columns)
{
- uint8_t ret = 0;
+ u8 ret = 0;
// read selected input rows
for (int i = 0; i < columns; i++)
@@ -364,10 +364,10 @@ uint8_t hh_tms1k_state::read_inputs(int columns)
return ret;
}
-uint8_t hh_tms1k_state::read_rotated_inputs(int columns, uint8_t rowmask)
+u8 hh_tms1k_state::read_rotated_inputs(int columns, u8 rowmask)
{
- uint8_t ret = 0;
- uint16_t colmask = (1 << columns) - 1;
+ u8 ret = 0;
+ u16 colmask = (1 << columns) - 1;
// read selected input columns
for (int i = 0; i < 8; i++)
@@ -510,7 +510,7 @@ static INPUT_PORTS_START( matchnum )
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("Square 1")
INPUT_PORTS_END
-static const int16_t matchnum_speaker_levels[4] = { 0, 0x7fff, -0x8000, 0 };
+static const s16 matchnum_speaker_levels[4] = { 0, 0x7fff, -0x8000, 0 };
static MACHINE_CONFIG_START( matchnum, matchnum_state )
@@ -656,7 +656,7 @@ static INPUT_PORTS_START( mathmagi )
INPUT_PORTS_END
// output PLA is not decapped
-static const uint16_t mathmagi_output_pla[0x20] =
+static const u16 mathmagi_output_pla[0x20] =
{
lA+lB+lC+lD+lE+lF, // 0
lB+lC, // 1
@@ -873,7 +873,7 @@ WRITE16_MEMBER(amaztron_state::write_o)
READ8_MEMBER(amaztron_state::read_k)
{
// K: multiplexed inputs
- uint8_t k = read_inputs(6);
+ u8 k = read_inputs(6);
// the 5th column is tied to K4+K8
if (k & 0x10) k |= 0xc;
@@ -1066,7 +1066,7 @@ static INPUT_PORTS_START( zodiac )
INPUT_PORTS_END
// output PLA is not decapped
-static const uint16_t zodiac_output_pla[0x20] =
+static const u16 zodiac_output_pla[0x20] =
{
0x80, // empty/led 1/7
lC, // i/led 2/8
@@ -1154,7 +1154,7 @@ public:
void cqback_state::prepare_display()
{
// R9 selects between segments B/C or A'/D'
- uint16_t seg = m_o;
+ u16 seg = m_o;
if (m_r & 0x200)
seg = (m_o << 7 & 0x300) | (m_o & 0xf9);
@@ -2087,7 +2087,7 @@ static INPUT_PORTS_START( cnfball )
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_16WAY
INPUT_PORTS_END
-static const int16_t cnfball_speaker_levels[4] = { 0, 0x7fff, -0x8000, 0 };
+static const s16 cnfball_speaker_levels[4] = { 0, 0x7fff, -0x8000, 0 };
static MACHINE_CONFIG_START( cnfball, cnfball_state )
@@ -2143,7 +2143,7 @@ public:
void cnfball2_state::prepare_display()
{
// R1 selects between segments B/C or A'/D'
- uint16_t seg = m_o;
+ u16 seg = m_o;
if (~m_r & 2)
seg = (m_o << 7 & 0x300) | (m_o & 0xf9);
@@ -2205,7 +2205,7 @@ static INPUT_PORTS_START( cnfball2 )
INPUT_PORTS_END
// output PLA is not decapped
-static const uint16_t cnfball2_output_pla[0x20] =
+static const u16 cnfball2_output_pla[0x20] =
{
// first half was dumped electronically
0x3f, 0x06, 0x5b, 0x4f, 0x66, 0x6d, 0x7d, 0x07, 0x7f, 0x6f, 0x40, 0x01, 0x08, 0x02, 0x04, 0x00,
@@ -3346,7 +3346,7 @@ void raisedvl_state::set_clock()
// 0: R=47K -> ~350kHz
// 2,3: R=35K8 -> ~425kHz (combined)
// 4: R=32K -> ~465kHz (combined)
- uint8_t inp = m_inp_matrix[1]->read();
+ u8 inp = m_inp_matrix[1]->read();
m_maincpu->set_unscaled_clock((inp & 0x20) ? 465000 : ((inp & 0x10) ? 425000 : 350000));
}
@@ -3665,8 +3665,8 @@ public:
void ginv1000_state::prepare_display()
{
- uint16_t grid = BITSWAP16(m_grid,15,14,13,12,11,10,0,1,2,3,4,5,6,9,8,7);
- uint16_t plate = BITSWAP16(m_plate,15,14,13,12,3,4,7,8,9,10,11,2,6,5,1,0);
+ 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);
display_matrix(12, 10, plate, grid);
}
@@ -3987,7 +3987,7 @@ static INPUT_PORTS_START( elecdet )
PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_PGDN) PORT_NAME("Off") PORT_CHANGED_MEMBER(DEVICE_SELF, hh_tms1k_state, power_button, (void *)false)
INPUT_PORTS_END
-static const int16_t elecdet_speaker_levels[4] = { 0, 0x3fff, 0x3fff, 0x7fff };
+static const s16 elecdet_speaker_levels[4] = { 0, 0x3fff, 0x3fff, 0x7fff };
static MACHINE_CONFIG_START( elecdet, elecdet_state )
@@ -4313,8 +4313,8 @@ void elecbowl_state::prepare_display()
}
// lamp muxes
- uint8_t mask = 1 << (m_o & 7);
- uint8_t d = (m_r & 2) ? mask : 0;
+ u8 mask = 1 << (m_o & 7);
+ u8 d = (m_r & 2) ? mask : 0;
if (~m_r & 1)
m_display_state[5] = (m_display_state[5] & ~mask) | d;
if (~m_r & 4)
@@ -4391,7 +4391,7 @@ static INPUT_PORTS_START( elecbowl )
INPUT_PORTS_END
// output PLA is not decapped
-static const uint16_t elecbowl_output_pla[0x20] =
+static const u16 elecbowl_output_pla[0x20] =
{
lA+lB+lC+lD+lE+lF, // 0
lB+lC, // 1
@@ -5197,7 +5197,7 @@ void ssimon_state::set_clock()
// 0 Simple: R=51K -> ~200kHz
// 1 Normal: R=37K -> ~275kHz
// 2 Super: R=22K -> ~400kHz
- uint8_t inp = m_inp_matrix[6]->read();
+ u8 inp = m_inp_matrix[6]->read();
m_maincpu->set_unscaled_clock((inp & 2) ? 400000 : ((inp & 1) ? 275000 : 200000));
}
@@ -5385,7 +5385,7 @@ void bigtrak_state::machine_start()
save_item(NAME(m_gearbox_pos));
}
-static const int16_t bigtrak_speaker_levels[8] = { 0, 0x7fff/3, 0x7fff/3, 0x7fff/3*2, 0x7fff/3, 0x7fff/3*2, 0x7fff/3*2, 0x7fff };
+static const s16 bigtrak_speaker_levels[8] = { 0, 0x7fff/3, 0x7fff/3, 0x7fff/3*2, 0x7fff/3, 0x7fff/3*2, 0x7fff/3*2, 0x7fff };
static MACHINE_CONFIG_START( bigtrak, bigtrak_state )
@@ -5509,7 +5509,7 @@ void mbdtower_state::prepare_display()
// update current state
if (~m_r & 0x10)
{
- uint8_t o = BITSWAP8(m_o,7,0,4,3,2,1,6,5) & 0x7f;
+ u8 o = BITSWAP8(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);
@@ -5851,7 +5851,7 @@ static INPUT_PORTS_START( merlin )
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_N) PORT_CODE(KEYCODE_ENTER) PORT_CODE(KEYCODE_ENTER_PAD) PORT_NAME("New Game")
INPUT_PORTS_END
-static const int16_t merlin_speaker_levels[8] = { 0, 0x7fff/3, 0x7fff/3, 0x7fff/3*2, 0x7fff/3, 0x7fff/3*2, 0x7fff/3*2, 0x7fff };
+static const s16 merlin_speaker_levels[8] = { 0, 0x7fff/3, 0x7fff/3, 0x7fff/3*2, 0x7fff/3, 0x7fff/3*2, 0x7fff/3*2, 0x7fff };
static MACHINE_CONFIG_START( merlin, merlin_state )
@@ -6030,7 +6030,7 @@ static INPUT_PORTS_START( stopthief )
PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_PGDN) PORT_NAME("Off") PORT_CHANGED_MEMBER(DEVICE_SELF, hh_tms1k_state, power_button, (void *)false)
INPUT_PORTS_END
-static const int16_t stopthief_speaker_levels[7] = { 0, 0x7fff/6, 0x7fff/5, 0x7fff/4, 0x7fff/3, 0x7fff/2, 0x7fff };
+static const s16 stopthief_speaker_levels[7] = { 0, 0x7fff/6, 0x7fff/5, 0x7fff/4, 0x7fff/3, 0x7fff/2, 0x7fff };
static MACHINE_CONFIG_START( stopthief, stopthief_state )
@@ -6364,7 +6364,7 @@ static INPUT_PORTS_START( lostreas )
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_U) PORT_NAME("Up")
INPUT_PORTS_END
-static const int16_t lostreas_speaker_levels[16] =
+static const s16 lostreas_speaker_levels[16] =
{
0, 0x7fff/15, 0x7fff/14, 0x7fff/13, 0x7fff/12, 0x7fff/11, 0x7fff/10, 0x7fff/9,
0x7fff/8, 0x7fff/7, 0x7fff/6, 0x7fff/5, 0x7fff/4, 0x7fff/3, 0x7fff/2, 0x7fff/1
@@ -6422,8 +6422,8 @@ public:
void tcfball_state::prepare_display()
{
// R8 enables leds, R9 enables digits
- uint16_t mask = ((m_r >> 9 & 1) * 0x7f) | ((m_r >> 8 & 1) * 0x780);
- uint16_t sel = ((m_r & 0x7f) | (m_r << 7 & 0x780)) & mask;
+ u16 mask = ((m_r >> 9 & 1) * 0x7f) | ((m_r >> 8 & 1) * 0x780);
+ u16 sel = ((m_r & 0x7f) | (m_r << 7 & 0x780)) & mask;
set_display_segmask(0x77, 0x7f);
set_display_segmask(0x08, 0xff); // R3 has DP
@@ -6538,7 +6538,7 @@ static INPUT_PORTS_START( tcfballa )
INPUT_PORTS_END
// output PLA is not decapped, dumped electronically
-static const uint16_t tcfballa_output_pla[0x20] =
+static const u16 tcfballa_output_pla[0x20] =
{
0x3f, 0x06, 0x5b, 0x4f, 0x66, 0x6d, 0x7d, 0x07, 0x7f, 0x6f, 0x00, 0x46, 0x70, 0x00, 0x00, 0x00,
0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
@@ -6696,7 +6696,7 @@ static INPUT_PORTS_START( tandy12 )
INPUT_PORTS_END
// output PLA is not decapped
-static const uint16_t tandy12_output_pla[0x20] =
+static const u16 tandy12_output_pla[0x20] =
{
// these are certain
0x00, 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40,
@@ -7069,7 +7069,7 @@ static INPUT_PORTS_START( copycat )
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_UNUSED )
INPUT_PORTS_END
-static const int16_t copycat_speaker_levels[4] = { 0, 0x7fff, -0x8000, 0 };
+static const s16 copycat_speaker_levels[4] = { 0, 0x7fff, -0x8000, 0 };
static MACHINE_CONFIG_START( copycat, copycat_state )
@@ -7398,7 +7398,7 @@ public:
{ }
required_device<tms1024_device> m_expander;
- uint8_t m_exp_port[7];
+ u8 m_exp_port[7];
DECLARE_WRITE8_MEMBER(expander_w);
void prepare_display();
@@ -7787,7 +7787,7 @@ static INPUT_PORTS_START( ssports4 )
INPUT_PORTS_END
// output PLA is not decapped, dumped electronically
-static const uint16_t ssports4_output_pla[0x20] =
+static const u16 ssports4_output_pla[0x20] =
{
0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x3f, 0x06, 0x5b, 0x4f, 0x66, 0x6d, 0x7d, 0x07, 0x7f, 0x6f, 0x00, 0x40, 0x40, 0x40, 0x40, 0x40