summaryrefslogtreecommitdiffstatshomepage
path: root/src/mame/includes/suna16.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/suna16.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/suna16.h')
-rw-r--r--src/mame/includes/suna16.h69
1 files changed, 36 insertions, 33 deletions
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<cpu_device> m_maincpu;
- optional_device<cpu_device> m_pcm1;
- optional_device<cpu_device> m_pcm2;
- required_device<gfxdecode_device> m_gfxdecode;
- required_device<screen_device> m_screen;
- required_device<palette_device> m_palette;
- required_device<generic_latch_8_device> m_soundlatch;
-
- required_shared_ptr<uint16_t> m_spriteram;
- optional_shared_ptr<uint16_t> m_spriteram2;
-
- optional_memory_bank m_bank1;
- optional_memory_bank m_bank2;
-
-
- std::unique_ptr<uint16_t[]> 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<cpu_device> m_maincpu;
+ optional_device<cpu_device> m_pcm1;
+ optional_device<cpu_device> m_pcm2;
+ required_device<gfxdecode_device> m_gfxdecode;
+ required_device<screen_device> m_screen;
+ required_device<palette_device> m_palette;
+ required_device<generic_latch_8_device> m_soundlatch;
+
+ required_shared_ptr<uint16_t> m_spriteram;
+ optional_shared_ptr<uint16_t> m_spriteram2;
+
+ optional_memory_bank m_bank1;
+ optional_memory_bank m_bank2;
+
+ output_finder<4> m_led;
+
+ std::unique_ptr<uint16_t[]> m_paletteram;
+ int m_color_bank;
+ uint8_t m_prot;
};