summaryrefslogtreecommitdiffstatshomepage
path: root/src/mame/includes/portrait.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/mame/includes/portrait.h')
-rw-r--r--src/mame/includes/portrait.h50
1 files changed, 28 insertions, 22 deletions
diff --git a/src/mame/includes/portrait.h b/src/mame/includes/portrait.h
index 1212ea0546e..76556dde845 100644
--- a/src/mame/includes/portrait.h
+++ b/src/mame/includes/portrait.h
@@ -6,27 +6,16 @@ class portrait_state : public driver_device
{
public:
portrait_state(const machine_config &mconfig, device_type type, const char *tag)
- : driver_device(mconfig, type, tag),
- m_maincpu(*this, "maincpu"),
- m_gfxdecode(*this, "gfxdecode"),
- m_palette(*this, "palette"),
- m_tms(*this, "tms"),
- m_bgvideoram(*this, "bgvideoram"),
- m_fgvideoram(*this, "fgvideoram"),
- m_spriteram(*this, "spriteram") { }
-
- required_device<cpu_device> m_maincpu;
- required_device<gfxdecode_device> m_gfxdecode;
- required_device<palette_device> m_palette;
- required_device<tms5200_device> m_tms;
-
- required_shared_ptr<uint8_t> m_bgvideoram;
- required_shared_ptr<uint8_t> m_fgvideoram;
- required_shared_ptr<uint8_t> m_spriteram;
-
- int m_scroll;
- tilemap_t *m_foreground;
- tilemap_t *m_background;
+ : driver_device(mconfig, type, tag)
+ , m_maincpu(*this, "maincpu")
+ , m_gfxdecode(*this, "gfxdecode")
+ , m_palette(*this, "palette")
+ , m_tms(*this, "tms")
+ , m_bgvideoram(*this, "bgvideoram")
+ , m_fgvideoram(*this, "fgvideoram")
+ , m_spriteram(*this, "spriteram")
+ , m_lamp(*this, "lamp%u", 0U)
+ { }
DECLARE_WRITE8_MEMBER(ctrl_w);
DECLARE_WRITE8_MEMBER(positive_scroll_w);
@@ -37,7 +26,6 @@ public:
TILE_GET_INFO_MEMBER(get_bg_tile_info);
TILE_GET_INFO_MEMBER(get_fg_tile_info);
- virtual void video_start() override;
DECLARE_PALETTE_INIT(portrait);
uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
@@ -46,4 +34,22 @@ public:
void portrait(machine_config &config);
void portrait_map(address_map &map);
void portrait_sound_map(address_map &map);
+
+protected:
+ virtual void machine_start() override { m_lamp.resolve(); }
+ virtual void video_start() override;
+
+ required_device<cpu_device> m_maincpu;
+ required_device<gfxdecode_device> m_gfxdecode;
+ required_device<palette_device> m_palette;
+ required_device<tms5200_device> m_tms;
+
+ required_shared_ptr<uint8_t> m_bgvideoram;
+ required_shared_ptr<uint8_t> m_fgvideoram;
+ required_shared_ptr<uint8_t> m_spriteram;
+ output_finder<2> m_lamp;
+
+ int m_scroll;
+ tilemap_t *m_foreground;
+ tilemap_t *m_background;
};