From 2beba4ce73fad917c7159a39939bace54f76494b Mon Sep 17 00:00:00 2001 From: wilbertpol Date: Sun, 20 May 2018 19:27:20 +0200 Subject: =?UTF-8?q?Replace=20set=5Fled=5Fvalue=20and=20set=5Flamp=5Fvalue?= =?UTF-8?q?=20with=20output=5Ffinders.=20=20[Wilbe=E2=80=A6=20(#3592)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Replace set_led_value and set_lamp_value with output_finders. [Wilbert Pol] * segaufo: keep the 2 bit lamp outputs --- src/mame/includes/suna16.h | 69 ++++++++++++++++++++++++---------------------- 1 file changed, 36 insertions(+), 33 deletions(-) (limited to 'src/mame/includes/suna16.h') diff --git a/src/mame/includes/suna16.h b/src/mame/includes/suna16.h index 95dbfde6b0f..27316675be4 100644 --- a/src/mame/includes/suna16.h +++ b/src/mame/includes/suna16.h @@ -9,41 +9,21 @@ class suna16_state : public driver_device { public: suna16_state(const machine_config &mconfig, device_type type, const char *tag) - : driver_device(mconfig, type, tag), - m_maincpu(*this,"maincpu"), - m_pcm1(*this,"pcm1"), - m_pcm2(*this,"pcm2"), - m_gfxdecode(*this, "gfxdecode"), - m_screen(*this, "screen"), - m_palette(*this, "palette"), - m_soundlatch(*this, "soundlatch"), - m_spriteram(*this, "spriteram"), - m_spriteram2(*this, "spriteram2"), - m_bank1(*this, "bank1"), - m_bank2(*this, "bank2") - - + : driver_device(mconfig, type, tag) + , m_maincpu(*this,"maincpu") + , m_pcm1(*this,"pcm1") + , m_pcm2(*this,"pcm2") + , m_gfxdecode(*this, "gfxdecode") + , m_screen(*this, "screen") + , m_palette(*this, "palette") + , m_soundlatch(*this, "soundlatch") + , m_spriteram(*this, "spriteram") + , m_spriteram2(*this, "spriteram2") + , m_bank1(*this, "bank1") + , m_bank2(*this, "bank2") + , m_led(*this, "led%u", 0U) { } - required_device m_maincpu; - optional_device m_pcm1; - optional_device m_pcm2; - required_device m_gfxdecode; - required_device m_screen; - required_device m_palette; - required_device m_soundlatch; - - required_shared_ptr m_spriteram; - optional_shared_ptr m_spriteram2; - - optional_memory_bank m_bank1; - optional_memory_bank m_bank2; - - - std::unique_ptr m_paletteram; - int m_color_bank; - uint8_t m_prot; - // common DECLARE_WRITE16_MEMBER(soundlatch_w); DECLARE_READ16_MEMBER(paletteram_r); @@ -100,4 +80,27 @@ public: void uballoon_pcm_1_io_map(address_map &map); void uballoon_pcm_1_map(address_map &map); void uballoon_sound_map(address_map &map); + +protected: + virtual void machine_start() override { m_led.resolve(); } + + required_device m_maincpu; + optional_device m_pcm1; + optional_device m_pcm2; + required_device m_gfxdecode; + required_device m_screen; + required_device m_palette; + required_device m_soundlatch; + + required_shared_ptr m_spriteram; + optional_shared_ptr m_spriteram2; + + optional_memory_bank m_bank1; + optional_memory_bank m_bank2; + + output_finder<4> m_led; + + std::unique_ptr m_paletteram; + int m_color_bank; + uint8_t m_prot; }; -- cgit v1.2.3