summaryrefslogtreecommitdiffstatshomepage
path: root/src/mame/includes/mcr.h
diff options
context:
space:
mode:
author wilbertpol <wilbertpol@users.noreply.github.com>2018-05-20 19:27:20 +0200
committer R. Belmont <rb6502@users.noreply.github.com>2018-05-20 13:27:20 -0400
commit2beba4ce73fad917c7159a39939bace54f76494b (patch)
treee9d33c059bc5045f13d0c1748f0a044650370b8d /src/mame/includes/mcr.h
parentacf93837ac21b2b0bb003d1649b893200c269812 (diff)
Replace set_led_value and set_lamp_value with output_finders. [Wilbe… (#3592)
* Replace set_led_value and set_lamp_value with output_finders. [Wilbert Pol] * segaufo: keep the 2 bit lamp outputs
Diffstat (limited to 'src/mame/includes/mcr.h')
-rw-r--r--src/mame/includes/mcr.h17
1 files changed, 12 insertions, 5 deletions
diff --git a/src/mame/includes/mcr.h b/src/mame/includes/mcr.h
index 260144a4c2f..6c4126c51b8 100644
--- a/src/mame/includes/mcr.h
+++ b/src/mame/includes/mcr.h
@@ -24,8 +24,8 @@
class mcr_state : public driver_device
{
public:
- mcr_state(const machine_config &mconfig, device_type type, const char *tag)
- : driver_device(mconfig, type, tag),
+ mcr_state(const machine_config &mconfig, device_type type, const char *tag) :
+ driver_device(mconfig, type, tag),
m_maincpu(*this, "maincpu"),
m_spriteram(*this, "spriteram"),
m_videoram(*this, "videoram"),
@@ -136,10 +136,12 @@ private:
class mcr_dpoker_state : public mcr_state
{
public:
- mcr_dpoker_state(const machine_config &mconfig, device_type type, const char *tag)
- : mcr_state(mconfig, type, tag),
+ mcr_dpoker_state(const machine_config &mconfig, device_type type, const char *tag) :
+ mcr_state(mconfig, type, tag),
m_coin_in_timer(*this, "coinin"),
- m_hopper_timer(*this, "hopper") {}
+ m_hopper_timer(*this, "hopper"),
+ m_lamp(*this, "lamp%u", 0U)
+ { }
DECLARE_READ8_MEMBER(ip0_r);
DECLARE_WRITE8_MEMBER(lamps1_w);
@@ -155,12 +157,17 @@ public:
void init_dpoker();
void mcr_90009_dp(machine_config &config);
+
+protected:
+ virtual void machine_start() override { mcr_state::machine_start(); m_lamp.resolve(); }
+
private:
uint8_t m_coin_status;
uint8_t m_output;
required_device<timer_device> m_coin_in_timer;
required_device<timer_device> m_hopper_timer;
+ output_finder<14> m_lamp;
};
class mcr_nflfoot_state : public mcr_state