diff options
author | Dirk Best <mail@dirk-best.de> | 2018-05-17 14:15:29 +0200 |
---|---|---|
committer | Dirk Best <mail@dirk-best.de> | 2018-05-17 14:17:02 +0200 |
commit | 8b92654900c1aada296b68b50d632b0902b25ad2 (patch) | |
tree | 75683b14a082833c8098ff68a19ab009ef850aaa | |
parent | cf828c6c5fe1093cb04422cee95af6d378bded40 (diff) |
caswin: output_finder
-rw-r--r-- | src/mame/drivers/caswin.cpp | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/src/mame/drivers/caswin.cpp b/src/mame/drivers/caswin.cpp index 22e9e96f88c..9c23eb18f22 100644 --- a/src/mame/drivers/caswin.cpp +++ b/src/mame/drivers/caswin.cpp @@ -83,7 +83,8 @@ public: m_sc0_vram(*this, "sc0_vram"), m_sc0_attr(*this, "sc0_attr"), m_maincpu(*this, "maincpu"), - m_gfxdecode(*this, "gfxdecode") + m_gfxdecode(*this, "gfxdecode"), + m_lamps(*this, "lamp%u", 0U) { } void vvillage(machine_config &config); @@ -110,6 +111,7 @@ private: tilemap_t *m_sc0_tilemap; required_device<cpu_device> m_maincpu; required_device<gfxdecode_device> m_gfxdecode; + output_finder<5> m_lamps; }; @@ -127,6 +129,7 @@ TILE_GET_INFO_MEMBER(caswin_state::get_sc0_tile_info) void caswin_state::video_start() { + m_lamps.resolve(); m_sc0_tilemap = &machine().tilemap().create(*m_gfxdecode, tilemap_get_info_delegate(FUNC(caswin_state::get_sc0_tile_info),this),TILEMAP_SCAN_ROWS,8,8,32,32); } @@ -190,11 +193,9 @@ WRITE8_MEMBER(caswin_state::vvillage_lamps_w) ---- --x- lamp button 2 ---- ---x lamp button 1 */ - output().set_led_value(0, data & 0x01); - output().set_led_value(1, data & 0x02); - output().set_led_value(2, data & 0x04); - output().set_led_value(3, data & 0x08); - output().set_led_value(4, data & 0x10); + + for (unsigned i = 0; i < 5; i++) + m_lamps[i] = BIT(data, i); } void caswin_state::vvillage_mem(address_map &map) |