diff options
Diffstat (limited to 'src/mame/drivers/mephisto_montec.cpp')
-rw-r--r-- | src/mame/drivers/mephisto_montec.cpp | 34 |
1 files changed, 18 insertions, 16 deletions
diff --git a/src/mame/drivers/mephisto_montec.cpp b/src/mame/drivers/mephisto_montec.cpp index cb92c2162ac..30e5bb8d2de 100644 --- a/src/mame/drivers/mephisto_montec.cpp +++ b/src/mame/drivers/mephisto_montec.cpp @@ -41,7 +41,8 @@ public: , m_beeper(*this, "beeper") , m_keys(*this, "KEY.%u", 0) , m_digits(*this, "digit%u", 0U) - , m_led(*this, "led%u", 0U) + , m_low_leds(*this, "led%u", 0U) + , m_high_leds(*this, "led%u", 100U) { } @@ -86,7 +87,7 @@ private: required_device<beep_device> m_beeper; optional_ioport_array<2> m_keys; output_finder<8> m_digits; - output_finder<116> m_led; + output_finder<16> m_low_leds, m_high_leds; uint8_t m_lcd_mux; uint8_t m_input_mux; @@ -106,7 +107,8 @@ private: void mephisto_montec_state::machine_start() { m_digits.resolve(); - m_led.resolve(); + m_low_leds.resolve(); + m_high_leds.resolve(); save_item(NAME(m_lcd_mux)); save_item(NAME(m_input_mux)); @@ -136,7 +138,7 @@ WRITE8_MEMBER(mephisto_montec_state::montec_led_w) for(int i=0; i<4; i++) for(int j=0; j<4; j++) if (BIT(data, i)) - m_led[100 + i * 4 + j] = BIT(data, 4 + j); + m_high_leds[(i << 2) | j] = BIT(data, 4 + j); } @@ -231,9 +233,9 @@ WRITE8_MEMBER(mephisto_montec_state::megaiv_led_w) { if (!BIT(m_leds_mux, i)) { - m_led[100 + i] = BIT(data, 0) | BIT(data, 1); - m_led[0 + i] = BIT(data, 2) | BIT(data, 3); - m_led[8 + i] = BIT(data, 4) | BIT(data, 5); + m_high_leds[i] = BIT(data, 0) | BIT(data, 1); + m_low_leds[0 + i] = BIT(data, 2) | BIT(data, 3); + m_low_leds[8 + i] = BIT(data, 4) | BIT(data, 5); } } } @@ -302,9 +304,9 @@ WRITE8_MEMBER(mephisto_montec_state::smondial_board_mux_w) for (int i=0; i<8; i++) { - if (m_leds_mux & 0x03) m_led[100 + i] = BIT(~m_smondial_board_mux, i); - if (m_leds_mux & 0x0c) m_led[ 8 + i] = BIT(~m_smondial_board_mux, i); - if (m_leds_mux & 0x30) m_led[ 0 + i] = BIT(~m_smondial_board_mux, i); + if (m_leds_mux & 0x03) m_high_leds[i] = BIT(~m_smondial_board_mux, i); + if (m_leds_mux & 0x0c) m_low_leds[8 + i] = BIT(~m_smondial_board_mux, i); + if (m_leds_mux & 0x30) m_low_leds[0 + i] = BIT(~m_smondial_board_mux, i); } } @@ -339,9 +341,9 @@ WRITE8_MEMBER(mephisto_montec_state::mondial2_input_mux_w) { if (!BIT(leds_data, i)) { - if (data & 0x10) m_led[100 + i] = 1; - if (data & 0x20) m_led[ 8 + i] = 1; - if (data & 0x40) m_led[ 0 + i] = 1; + if (data & 0x10) m_high_leds[i] = 1; + if (data & 0x20) m_low_leds[8 + i] = 1; + if (data & 0x40) m_low_leds[0 + i] = 1; } } @@ -363,9 +365,9 @@ TIMER_DEVICE_CALLBACK_MEMBER(mephisto_montec_state::refresh_leds) { for (int i=0; i<8; i++) { - m_led[0 + i] = 0; - m_led[8 + i] = 0; - m_led[100 + i] = 0; + m_low_leds[0 + i] = 0; + m_low_leds[8 + i] = 0; + m_high_leds[i] = 0; } } |