diff options
Diffstat (limited to 'src/mame/drivers/tempest.cpp')
-rw-r--r-- | src/mame/drivers/tempest.cpp | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/src/mame/drivers/tempest.cpp b/src/mame/drivers/tempest.cpp index 8661512f3c1..627581c4ba8 100644 --- a/src/mame/drivers/tempest.cpp +++ b/src/mame/drivers/tempest.cpp @@ -298,8 +298,8 @@ static constexpr XTAL CLOCK_3KHZ = MASTER_CLOCK / 4096; class tempest_state : public driver_device { public: - tempest_state(const machine_config &mconfig, device_type type, const char *tag) - : driver_device(mconfig, type, tag), + tempest_state(const machine_config &mconfig, device_type type, const char *tag) : + driver_device(mconfig, type, tag), m_maincpu(*this, "maincpu"), m_mathbox(*this, "mathbox"), m_watchdog(*this, "watchdog"), @@ -310,7 +310,8 @@ public: m_buttons_p1(*this, TEMPEST_BUTTONS_P1_TAG), m_buttons_p2(*this, TEMPEST_BUTTONS_P2_TAG), m_in1(*this, "IN1/DSW0"), - m_in2(*this, "IN2") + m_in2(*this, "IN2"), + m_led(*this, "led%u", 0U) { } DECLARE_CUSTOM_INPUT_MEMBER(tempest_knob_r); @@ -343,6 +344,7 @@ private: required_ioport m_buttons_p2; required_ioport m_in1; required_ioport m_in2; + output_finder<2> m_led; uint8_t m_player_select; }; @@ -350,6 +352,7 @@ private: void tempest_state::machine_start() { + m_led.resolve(); save_item(NAME(m_player_select)); } @@ -410,8 +413,8 @@ READ8_MEMBER(tempest_state::input_port_2_bit_r) WRITE8_MEMBER(tempest_state::tempest_led_w) { - output().set_led_value(0, ~data & 0x02); - output().set_led_value(1, ~data & 0x01); + m_led[0] = BIT(~data, 1); + m_led[1] = BIT(~data, 0); /* FLIP is bit 0x04 */ m_player_select = data & 0x04; } |