summaryrefslogtreecommitdiffstatshomepage
path: root/src/mame/drivers/hh_melps4.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mame/drivers/hh_melps4.cpp')
-rw-r--r--src/mame/drivers/hh_melps4.cpp38
1 files changed, 19 insertions, 19 deletions
diff --git a/src/mame/drivers/hh_melps4.cpp b/src/mame/drivers/hh_melps4.cpp
index e1315a3ede4..aebaef2ff7e 100644
--- a/src/mame/drivers/hh_melps4.cpp
+++ b/src/mame/drivers/hh_melps4.cpp
@@ -34,9 +34,9 @@ public:
optional_device<speaker_sound_device> m_speaker;
// misc common
- UINT16 m_inp_mux; // multiplexed inputs mask
+ uint16_t m_inp_mux; // multiplexed inputs mask
- UINT8 read_inputs(int columns);
+ uint8_t read_inputs(int columns);
DECLARE_INPUT_CHANGED_MEMBER(reset_button);
// display common
@@ -44,18 +44,18 @@ public:
int m_display_maxy; // display matrix number of rows
int m_display_maxx; // display matrix number of columns (max 31 for now)
- UINT32 m_grid; // VFD current row data
- UINT32 m_plate; // VFD current column data
+ uint32_t m_grid; // VFD current row data
+ uint32_t m_plate; // VFD current column data
- UINT32 m_display_state[0x20]; // display matrix rows data (last bit is used for always-on)
- UINT16 m_display_segmask[0x20]; // if not 0, display matrix row is a digit, mask indicates connected segments
- UINT32 m_display_cache[0x20]; // (internal use)
- UINT8 m_display_decay[0x20][0x20]; // (internal use)
+ uint32_t m_display_state[0x20]; // display matrix rows data (last bit is used for always-on)
+ uint16_t m_display_segmask[0x20]; // if not 0, display matrix row is a digit, mask indicates connected segments
+ uint32_t m_display_cache[0x20]; // (internal use)
+ uint8_t m_display_decay[0x20][0x20]; // (internal use)
TIMER_DEVICE_CALLBACK_MEMBER(display_decay_tick);
void display_update();
void set_display_size(int maxx, int maxy);
- void display_matrix(int maxx, int maxy, UINT32 setx, UINT32 sety, bool update = true);
+ void display_matrix(int maxx, int maxy, uint32_t setx, uint32_t sety, bool update = true);
protected:
virtual void machine_start() override;
@@ -109,7 +109,7 @@ void hh_melps4_state::machine_reset()
void hh_melps4_state::display_update()
{
- UINT32 active_state[0x20];
+ uint32_t active_state[0x20];
for (int y = 0; y < m_display_maxy; y++)
{
@@ -122,7 +122,7 @@ void hh_melps4_state::display_update()
m_display_decay[y][x] = m_display_wait;
// determine active state
- UINT32 ds = (m_display_decay[y][x] != 0) ? 1 : 0;
+ uint32_t ds = (m_display_decay[y][x] != 0) ? 1 : 0;
active_state[y] |= (ds << x);
}
}
@@ -177,12 +177,12 @@ void hh_melps4_state::set_display_size(int maxx, int maxy)
m_display_maxy = maxy;
}
-void hh_melps4_state::display_matrix(int maxx, int maxy, UINT32 setx, UINT32 sety, bool update)
+void hh_melps4_state::display_matrix(int maxx, int maxy, uint32_t setx, uint32_t sety, bool update)
{
set_display_size(maxx, maxy);
// update current state
- UINT32 mask = (1 << maxx) - 1;
+ uint32_t mask = (1 << maxx) - 1;
for (int y = 0; y < maxy; y++)
m_display_state[y] = (sety >> y & 1) ? ((setx & mask) | (1 << maxx)) : 0;
@@ -193,9 +193,9 @@ void hh_melps4_state::display_matrix(int maxx, int maxy, UINT32 setx, UINT32 set
// generic input handlers
-UINT8 hh_melps4_state::read_inputs(int columns)
+uint8_t hh_melps4_state::read_inputs(int columns)
{
- UINT8 ret = 0;
+ uint8_t ret = 0;
// read selected input rows
for (int i = 0; i < columns; i++)
@@ -246,8 +246,8 @@ public:
void cfrogger_state::prepare_display()
{
- UINT16 grid = BITSWAP16(m_grid,15,14,13,12,0,1,2,3,4,5,6,7,8,9,10,11);
- UINT16 plate = BITSWAP16(m_plate,12,4,13,5,14,6,15,7,3,11,2,10,1,9,0,8);
+ uint16_t grid = BITSWAP16(m_grid,15,14,13,12,0,1,2,3,4,5,6,7,8,9,10,11);
+ uint16_t plate = BITSWAP16(m_plate,12,4,13,5,14,6,15,7,3,11,2,10,1,9,0,8);
display_matrix(16, 12, plate, grid);
}
@@ -362,8 +362,8 @@ public:
void gjungler_state::prepare_display()
{
- UINT16 grid = BITSWAP16(m_grid,15,14,13,12,11,10,9,8,7,6,5,4,3,2,0,1);
- UINT32 plate = BITSWAP24(m_plate,23,22,21,20,19,18,8,9,10,11,13,16,15,14,13,12,7,0,6,1,5,2,4,3) | 0x2000;
+ uint16_t grid = BITSWAP16(m_grid,15,14,13,12,11,10,9,8,7,6,5,4,3,2,0,1);
+ uint32_t plate = BITSWAP24(m_plate,23,22,21,20,19,18,8,9,10,11,13,16,15,14,13,12,7,0,6,1,5,2,4,3) | 0x2000;
display_matrix(18, 12, plate, grid);
}