summaryrefslogtreecommitdiffstats
path: root/src/mame/includes
diff options
context:
space:
mode:
authorGravatarGravatar wilbertpol <wilbertpol@users.noreply.github.com>2018-05-20 19:27:20 +0200
committerGravatarGravatar R. Belmont <rb6502@users.noreply.github.com>2018-05-20 13:27:20 -0400
commit2beba4ce73fad917c7159a39939bace54f76494b (patch)
treee9d33c059bc5045f13d0c1748f0a044650370b8d /src/mame/includes
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')
-rw-r--r--src/mame/includes/ajax.h51
-rw-r--r--src/mame/includes/amiga.h2
-rw-r--r--src/mame/includes/atarifb.h83
-rw-r--r--src/mame/includes/atarist.h28
-rw-r--r--src/mame/includes/atarisy2.h4
-rw-r--r--src/mame/includes/baraduke.h39
-rw-r--r--src/mame/includes/bladestl.h40
-rw-r--r--src/mame/includes/bw12.h103
-rw-r--r--src/mame/includes/bwidow.h27
-rw-r--r--src/mame/includes/calomega.h8
-rw-r--r--src/mame/includes/cave.h180
-rw-r--r--src/mame/includes/ccastles.h4
-rw-r--r--src/mame/includes/cidelsa.h55
-rw-r--r--src/mame/includes/cischeat.h161
-rw-r--r--src/mame/includes/copsnrob.h4
-rw-r--r--src/mame/includes/cps1.h229
-rw-r--r--src/mame/includes/cvs.h146
-rw-r--r--src/mame/includes/djmain.h69
-rw-r--r--src/mame/includes/dynax.h185
-rw-r--r--src/mame/includes/elf.h32
-rw-r--r--src/mame/includes/eolith.h3
-rw-r--r--src/mame/includes/epos.h38
-rw-r--r--src/mame/includes/eti660.h2
-rw-r--r--src/mame/includes/firetrk.h127
-rw-r--r--src/mame/includes/foodf.h4
-rw-r--r--src/mame/includes/funworld.h25
-rw-r--r--src/mame/includes/galaga.h98
-rw-r--r--src/mame/includes/galaxian.h167
-rw-r--r--src/mame/includes/galaxold.h40
-rw-r--r--src/mame/includes/gaplus.h87
-rw-r--r--src/mame/includes/goldstar.h9
-rw-r--r--src/mame/includes/gottlieb.h124
-rw-r--r--src/mame/includes/harddriv.h1
-rw-r--r--src/mame/includes/irobot.h5
-rw-r--r--src/mame/includes/itech32.h5
-rw-r--r--src/mame/includes/jpmimpct.h4
-rw-r--r--src/mame/includes/konamigx.h173
-rw-r--r--src/mame/includes/kopunch.h47
-rw-r--r--src/mame/includes/lethalj.h48
-rw-r--r--src/mame/includes/lockon.h43
-rw-r--r--src/mame/includes/lucky74.h53
-rw-r--r--src/mame/includes/mainevt.h53
-rw-r--r--src/mame/includes/mcr.h17
-rw-r--r--src/mame/includes/mcr3.h13
-rw-r--r--src/mame/includes/mhavoc.h48
-rw-r--r--src/mame/includes/microtan.h56
-rw-r--r--src/mame/includes/midzeus.h4
-rw-r--r--src/mame/includes/msx.h2
-rw-r--r--src/mame/includes/multfish.h54
-rw-r--r--src/mame/includes/namcos22.h273
-rw-r--r--src/mame/includes/namcos86.h54
-rw-r--r--src/mame/includes/nitedrvr.h4
-rw-r--r--src/mame/includes/norautp.h29
-rw-r--r--src/mame/includes/overdriv.h69
-rw-r--r--src/mame/includes/pmd85.h11
-rw-r--r--src/mame/includes/polyplay.h49
-rw-r--r--src/mame/includes/poolshrk.h5
-rw-r--r--src/mame/includes/portrait.h50
-rw-r--r--src/mame/includes/runaway.h42
-rw-r--r--src/mame/includes/sage2.h79
-rw-r--r--src/mame/includes/sderby.h41
-rw-r--r--src/mame/includes/segahang.h35
-rw-r--r--src/mame/includes/segas16a.h55
-rw-r--r--src/mame/includes/segas16b.h81
-rw-r--r--src/mame/includes/segas32.h107
-rw-r--r--src/mame/includes/segaxbd.h1
-rw-r--r--src/mame/includes/seta.h5
-rw-r--r--src/mame/includes/seta2.h71
-rw-r--r--src/mame/includes/skykid.h60
-rw-r--r--src/mame/includes/sms.h190
-rw-r--r--src/mame/includes/snookr10.h41
-rw-r--r--src/mame/includes/softbox.h31
-rw-r--r--src/mame/includes/spcforce.h51
-rw-r--r--src/mame/includes/starshp1.h5
-rw-r--r--src/mame/includes/suna16.h69
-rw-r--r--src/mame/includes/suna8.h112
-rw-r--r--src/mame/includes/system16.h195
-rw-r--r--src/mame/includes/taito_z.h10
-rw-r--r--src/mame/includes/tek405x.h69
-rw-r--r--src/mame/includes/tetrisp2.h104
-rw-r--r--src/mame/includes/tiki100.h5
-rw-r--r--src/mame/includes/tmc1800.h117
-rw-r--r--src/mame/includes/tmc2000e.h37
-rw-r--r--src/mame/includes/triplhnt.h5
-rw-r--r--src/mame/includes/tunhunt.h5
-rw-r--r--src/mame/includes/turbo.h4
-rw-r--r--src/mame/includes/unico.h3
-rw-r--r--src/mame/includes/victory.h8
-rw-r--r--src/mame/includes/videopin.h4
-rw-r--r--src/mame/includes/vip.h98
-rw-r--r--src/mame/includes/wolfpack.h4
91 files changed, 2728 insertions, 2360 deletions
diff --git a/src/mame/includes/ajax.h b/src/mame/includes/ajax.h
index 05731e392c8..4a154060a04 100644
--- a/src/mame/includes/ajax.h
+++ b/src/mame/includes/ajax.h
@@ -12,8 +12,8 @@
class ajax_state : public driver_device
{
public:
- ajax_state(const machine_config &mconfig, device_type type, const char *tag)
- : driver_device(mconfig, type, tag),
+ ajax_state(const machine_config &mconfig, device_type type, const char *tag) :
+ driver_device(mconfig, type, tag),
m_maincpu(*this, "maincpu"),
m_audiocpu(*this, "audiocpu"),
m_subcpu(*this, "sub"),
@@ -24,7 +24,31 @@ public:
m_k051960(*this, "k051960"),
m_k051316(*this, "k051316"),
m_palette(*this, "palette"),
- m_soundlatch(*this, "soundlatch") { }
+ m_soundlatch(*this, "soundlatch"),
+ m_lamp(*this, "lamp%u", 0U)
+ { }
+
+ DECLARE_WRITE8_MEMBER(sound_bank_w);
+ DECLARE_READ8_MEMBER(ls138_f10_r);
+ DECLARE_WRITE8_MEMBER(ls138_f10_w);
+ DECLARE_WRITE8_MEMBER(bankswitch_2_w);
+ DECLARE_WRITE8_MEMBER(bankswitch_w);
+ DECLARE_WRITE8_MEMBER(lamps_w);
+ DECLARE_WRITE8_MEMBER(k007232_extvol_w);
+ uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
+ DECLARE_WRITE8_MEMBER(volume_callback0);
+ DECLARE_WRITE8_MEMBER(volume_callback1);
+ K051316_CB_MEMBER(zoom_callback);
+ K052109_CB_MEMBER(tile_callback);
+ K051960_CB_MEMBER(sprite_callback);
+ void ajax(machine_config &config);
+ void ajax_main_map(address_map &map);
+ void ajax_sound_map(address_map &map);
+ void ajax_sub_map(address_map &map);
+
+protected:
+ virtual void machine_start() override;
+ virtual void machine_reset() override;
/* video-related */
uint8_t m_priority;
@@ -44,24 +68,5 @@ public:
required_device<k051316_device> m_k051316;
required_device<palette_device> m_palette;
required_device<generic_latch_8_device> m_soundlatch;
-
- DECLARE_WRITE8_MEMBER(sound_bank_w);
- DECLARE_READ8_MEMBER(ls138_f10_r);
- DECLARE_WRITE8_MEMBER(ls138_f10_w);
- DECLARE_WRITE8_MEMBER(bankswitch_2_w);
- DECLARE_WRITE8_MEMBER(bankswitch_w);
- DECLARE_WRITE8_MEMBER(lamps_w);
- DECLARE_WRITE8_MEMBER(k007232_extvol_w);
- virtual void machine_start() override;
- virtual void machine_reset() override;
- uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
- DECLARE_WRITE8_MEMBER(volume_callback0);
- DECLARE_WRITE8_MEMBER(volume_callback1);
- K051316_CB_MEMBER(zoom_callback);
- K052109_CB_MEMBER(tile_callback);
- K051960_CB_MEMBER(sprite_callback);
- void ajax(machine_config &config);
- void ajax_main_map(address_map &map);
- void ajax_sound_map(address_map &map);
- void ajax_sub_map(address_map &map);
+ output_finder<8> m_lamp;
};
diff --git a/src/mame/includes/amiga.h b/src/mame/includes/amiga.h
index 63e5fc79375..3d2f3eb90e4 100644
--- a/src/mame/includes/amiga.h
+++ b/src/mame/includes/amiga.h
@@ -332,6 +332,7 @@ public:
m_p2_mouse_x(*this, "p2_mouse_x"),
m_p2_mouse_y(*this, "p2_mouse_y"),
m_hvpos(*this, "HVPOS"),
+ m_power_led(*this, "power_led"),
m_chip_ram_mask(0),
m_cia_0_irq(0),
m_cia_1_irq(0),
@@ -595,6 +596,7 @@ protected:
optional_ioport m_p2_mouse_y;
optional_ioport m_hvpos;
+ output_finder<> m_power_led;
memory_array m_chip_ram;
uint32_t m_chip_ram_mask;
diff --git a/src/mame/includes/atarifb.h b/src/mame/includes/atarifb.h
index c7327c47130..5d6e812d010 100644
--- a/src/mame/includes/atarifb.h
+++ b/src/mame/includes/atarifb.h
@@ -21,8 +21,8 @@
class atarifb_state : public driver_device
{
public:
- atarifb_state(const machine_config &mconfig, device_type type, const char *tag)
- : driver_device(mconfig, type, tag),
+ atarifb_state(const machine_config &mconfig, device_type type, const char *tag) :
+ driver_device(mconfig, type, tag),
m_alphap1_videoram(*this, "p1_videoram"),
m_alphap2_videoram(*this, "p2_videoram"),
m_field_videoram(*this, "field_videoram"),
@@ -32,7 +32,47 @@ public:
m_discrete(*this, "discrete"),
m_gfxdecode(*this, "gfxdecode"),
m_screen(*this, "screen"),
- m_palette(*this, "palette"){ }
+ m_palette(*this, "palette"),
+ m_led(*this, "led%u", 0U)
+ { }
+
+ DECLARE_WRITE8_MEMBER(atarifb_out1_w);
+ DECLARE_WRITE8_MEMBER(atarifb4_out1_w);
+ DECLARE_WRITE8_MEMBER(abaseb_out1_w);
+ DECLARE_WRITE8_MEMBER(soccer_out1_w);
+ DECLARE_WRITE8_MEMBER(atarifb_out2_w);
+ DECLARE_WRITE8_MEMBER(soccer_out2_w);
+ DECLARE_WRITE8_MEMBER(atarifb_out3_w);
+ DECLARE_READ8_MEMBER(atarifb_in0_r);
+ DECLARE_READ8_MEMBER(atarifb_in2_r);
+ DECLARE_READ8_MEMBER(atarifb4_in0_r);
+ DECLARE_READ8_MEMBER(atarifb4_in2_r);
+ DECLARE_WRITE8_MEMBER(atarifb_alpha1_videoram_w);
+ DECLARE_WRITE8_MEMBER(atarifb_alpha2_videoram_w);
+ DECLARE_WRITE8_MEMBER(atarifb_field_videoram_w);
+ TILE_GET_INFO_MEMBER(alpha1_get_tile_info);
+ TILE_GET_INFO_MEMBER(alpha2_get_tile_info);
+ TILE_GET_INFO_MEMBER(field_get_tile_info);
+ DECLARE_PALETTE_INIT(atarifb);
+ uint32_t screen_update_atarifb(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
+ uint32_t screen_update_abaseb(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
+ uint32_t screen_update_soccer(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
+ void get_tile_info_common( tile_data &tileinfo, tilemap_memory_index tile_index, uint8_t *alpha_videoram );
+ void draw_playfield_and_alpha( bitmap_ind16 &bitmap, const rectangle &cliprect, int playfield_x_offset, int playfield_y_offset );
+ void draw_sprites( bitmap_ind16 &bitmap, const rectangle &cliprect, int gfx, int is_soccer );
+ void atarifb4(machine_config &config);
+ void atarifb(machine_config &config);
+ void soccer(machine_config &config);
+ void abaseb(machine_config &config);
+ void abaseb_map(address_map &map);
+ void atarifb4_map(address_map &map);
+ void atarifb_map(address_map &map);
+ void soccer_map(address_map &map);
+
+protected:
+ virtual void machine_start() override;
+ virtual void machine_reset() override;
+ virtual void video_start() override;
/* video-related */
required_shared_ptr<uint8_t> m_alphap1_videoram;
@@ -70,42 +110,7 @@ public:
required_device<gfxdecode_device> m_gfxdecode;
required_device<screen_device> m_screen;
required_device<palette_device> m_palette;
-
- DECLARE_WRITE8_MEMBER(atarifb_out1_w);
- DECLARE_WRITE8_MEMBER(atarifb4_out1_w);
- DECLARE_WRITE8_MEMBER(abaseb_out1_w);
- DECLARE_WRITE8_MEMBER(soccer_out1_w);
- DECLARE_WRITE8_MEMBER(atarifb_out2_w);
- DECLARE_WRITE8_MEMBER(soccer_out2_w);
- DECLARE_WRITE8_MEMBER(atarifb_out3_w);
- DECLARE_READ8_MEMBER(atarifb_in0_r);
- DECLARE_READ8_MEMBER(atarifb_in2_r);
- DECLARE_READ8_MEMBER(atarifb4_in0_r);
- DECLARE_READ8_MEMBER(atarifb4_in2_r);
- DECLARE_WRITE8_MEMBER(atarifb_alpha1_videoram_w);
- DECLARE_WRITE8_MEMBER(atarifb_alpha2_videoram_w);
- DECLARE_WRITE8_MEMBER(atarifb_field_videoram_w);
- TILE_GET_INFO_MEMBER(alpha1_get_tile_info);
- TILE_GET_INFO_MEMBER(alpha2_get_tile_info);
- TILE_GET_INFO_MEMBER(field_get_tile_info);
- virtual void machine_start() override;
- virtual void machine_reset() override;
- virtual void video_start() override;
- DECLARE_PALETTE_INIT(atarifb);
- uint32_t screen_update_atarifb(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
- uint32_t screen_update_abaseb(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
- uint32_t screen_update_soccer(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
- void get_tile_info_common( tile_data &tileinfo, tilemap_memory_index tile_index, uint8_t *alpha_videoram );
- void draw_playfield_and_alpha( bitmap_ind16 &bitmap, const rectangle &cliprect, int playfield_x_offset, int playfield_y_offset );
- void draw_sprites( bitmap_ind16 &bitmap, const rectangle &cliprect, int gfx, int is_soccer );
- void atarifb4(machine_config &config);
- void atarifb(machine_config &config);
- void soccer(machine_config &config);
- void abaseb(machine_config &config);
- void abaseb_map(address_map &map);
- void atarifb4_map(address_map &map);
- void atarifb_map(address_map &map);
- void soccer_map(address_map &map);
+ output_finder<2> m_led;
};
/*----------- defined in audio/atarifb.c -----------*/
diff --git a/src/mame/includes/atarist.h b/src/mame/includes/atarist.h
index 6910ad20956..15c3930ada0 100644
--- a/src/mame/includes/atarist.h
+++ b/src/mame/includes/atarist.h
@@ -122,7 +122,8 @@ public:
m_ikbd_joy(1),
m_monochrome(1),
m_palette(*this, "palette"),
- m_screen(*this, "screen")
+ m_screen(*this, "screen"),
+ m_led(*this, "led1")
{ }
required_device<cpu_device> m_maincpu;
@@ -155,10 +156,6 @@ public:
optional_ioport m_mousey;
optional_ioport m_config;
- void machine_start() override;
-
- void video_start() override;
-
uint32_t screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect);
// video
@@ -344,6 +341,10 @@ public:
void st_map(address_map &map);
protected:
virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) override;
+ virtual void machine_start() override;
+ virtual void video_start() override;
+
+ output_finder<> m_led;
};
class megast_state : public st_state
@@ -375,10 +376,6 @@ public:
optional_device<lmc1992_device> m_lmc1992;
- void machine_start() override;
-
- void video_start() override;
-
DECLARE_READ8_MEMBER( shifter_base_low_r );
DECLARE_WRITE8_MEMBER( shifter_base_low_w );
DECLARE_READ8_MEMBER( shifter_counter_r );
@@ -443,6 +440,8 @@ public:
void ste_map(address_map &map);
protected:
virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) override;
+ virtual void machine_start() override;
+ virtual void video_start() override;
};
class megaste_state : public ste_state
@@ -452,14 +451,15 @@ public:
: ste_state(mconfig, type, tag)
{ }
- void machine_start() override;
-
DECLARE_READ16_MEMBER( cache_r );
DECLARE_WRITE16_MEMBER( cache_w );
uint16_t m_cache;
void megaste(machine_config &config);
void megaste_map(address_map &map);
+
+protected:
+ virtual void machine_start() override;
};
class stbook_state : public ste_state
@@ -472,15 +472,15 @@ public:
required_ioport m_sw400;
- void machine_start() override;
- void video_start() override;
-
DECLARE_READ16_MEMBER( config_r );
DECLARE_WRITE16_MEMBER( lcd_control_w );
DECLARE_WRITE8_MEMBER( psg_pa_w );
DECLARE_READ8_MEMBER( mfp_gpio_r );
void stbook_map(address_map &map);
+protected:
+ virtual void machine_start() override;
+ virtual void video_start() override;
};
#endif // MAME_INCLUDES_ATARI_ST_H
diff --git a/src/mame/includes/atarisy2.h b/src/mame/includes/atarisy2.h
index b274be89577..cd47a987cd5 100644
--- a/src/mame/includes/atarisy2.h
+++ b/src/mame/includes/atarisy2.h
@@ -35,6 +35,7 @@ public:
, m_tms5220(*this, "tms")
, m_rombank(*this, "rombank%u", 1U)
, m_slapstic(*this, "slapstic")
+ , m_led(*this, "led%u", 0U)
{ }
required_device<t11_device> m_maincpu;
@@ -126,4 +127,7 @@ public:
void main_map(address_map &map);
void sound_map(address_map &map);
void vrambank_map(address_map &map);
+
+protected:
+ output_finder<2> m_led;
};
diff --git a/src/mame/includes/baraduke.h b/src/mame/includes/baraduke.h
index acfa09b85f8..de97d34805a 100644
--- a/src/mame/includes/baraduke.h
+++ b/src/mame/includes/baraduke.h
@@ -14,23 +14,10 @@ public:
m_mcu(*this, "mcu"),
m_cus30(*this, "namco"),
m_gfxdecode(*this, "gfxdecode"),
- m_palette(*this, "palette") { }
+ m_palette(*this, "palette"),
+ m_lamp(*this, "lamp%u", 0U)
+ { }
- int m_inputport_selected;
- int m_counter;
- required_shared_ptr<uint8_t> m_spriteram;
- required_shared_ptr<uint8_t> m_videoram;
- required_shared_ptr<uint8_t> m_textram;
- required_device<cpu_device> m_maincpu;
- required_device<cpu_device> m_mcu;
- required_device<namco_cus30_device> m_cus30;
- required_device<gfxdecode_device> m_gfxdecode;
- required_device<palette_device> m_palette;
- tilemap_t *m_tx_tilemap;
- tilemap_t *m_bg_tilemap[2];
- int m_xscroll[2];
- int m_yscroll[2];
- int m_copy_sprites;
DECLARE_WRITE8_MEMBER(inputport_select_w);
DECLARE_READ8_MEMBER(inputport_r);
DECLARE_WRITE8_MEMBER(baraduke_lamps_w);
@@ -61,4 +48,24 @@ public:
void baraduke_map(address_map &map);
void mcu_map(address_map &map);
void mcu_port_map(address_map &map);
+
+protected:
+ virtual void machine_start() override;
+
+ int m_inputport_selected;
+ int m_counter;
+ required_shared_ptr<uint8_t> m_spriteram;
+ required_shared_ptr<uint8_t> m_videoram;
+ required_shared_ptr<uint8_t> m_textram;
+ required_device<cpu_device> m_maincpu;
+ required_device<cpu_device> m_mcu;
+ required_device<namco_cus30_device> m_cus30;
+ required_device<gfxdecode_device> m_gfxdecode;
+ required_device<palette_device> m_palette;
+ tilemap_t *m_tx_tilemap;
+ tilemap_t *m_bg_tilemap[2];
+ int m_xscroll[2];
+ int m_yscroll[2];
+ int m_copy_sprites;
+ output_finder<2> m_lamp;
};
diff --git a/src/mame/includes/bladestl.h b/src/mame/includes/bladestl.h
index 2dd3ba6c750..10db44d8301 100644
--- a/src/mame/includes/bladestl.h
+++ b/src/mame/includes/bladestl.h
@@ -31,7 +31,28 @@ public:
m_gfxdecode(*this, "gfxdecode"),
m_soundlatch(*this, "soundlatch"),
m_trackball(*this, "TRACKBALL.%u", 0),
- m_rombank(*this, "rombank") { }
+ m_rombank(*this, "rombank"),
+ m_lamp(*this, "lamp%u", 0U)
+ { }
+
+ /* devices */
+ DECLARE_READ8_MEMBER(trackball_r);
+ DECLARE_WRITE8_MEMBER(bladestl_bankswitch_w);
+ DECLARE_WRITE8_MEMBER(bladestl_port_B_w);
+ DECLARE_READ8_MEMBER(bladestl_speech_busy_r);
+ DECLARE_WRITE8_MEMBER(bladestl_speech_ctrl_w);
+ DECLARE_PALETTE_INIT(bladestl);
+ uint32_t screen_update_bladestl(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
+ TIMER_DEVICE_CALLBACK_MEMBER(bladestl_scanline);
+ K007342_CALLBACK_MEMBER(bladestl_tile_callback);
+ K007420_CALLBACK_MEMBER(bladestl_sprite_callback);
+ void bladestl(machine_config &config);
+ void main_map(address_map &map);
+ void sound_map(address_map &map);
+
+protected:
+ virtual void machine_start() override;
+ virtual void machine_reset() override;
required_device<cpu_device> m_maincpu;
required_device<cpu_device> m_audiocpu;
@@ -54,20 +75,5 @@ public:
/* misc */
int m_last_track[4];
- /* devices */
- DECLARE_READ8_MEMBER(trackball_r);
- DECLARE_WRITE8_MEMBER(bladestl_bankswitch_w);
- DECLARE_WRITE8_MEMBER(bladestl_port_B_w);
- DECLARE_READ8_MEMBER(bladestl_speech_busy_r);
- DECLARE_WRITE8_MEMBER(bladestl_speech_ctrl_w);
- virtual void machine_start() override;
- virtual void machine_reset() override;
- DECLARE_PALETTE_INIT(bladestl);
- uint32_t screen_update_bladestl(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
- TIMER_DEVICE_CALLBACK_MEMBER(bladestl_scanline);
- K007342_CALLBACK_MEMBER(bladestl_tile_callback);
- K007420_CALLBACK_MEMBER(bladestl_sprite_callback);
- void bladestl(machine_config &config);
- void main_map(address_map &map);
- void sound_map(address_map &map);
+ output_finder<2> m_lamp;
};
diff --git a/src/mame/includes/bw12.h b/src/mame/includes/bw12.h
index 6a10d8db569..d8e9d9e525e 100644
--- a/src/mame/includes/bw12.h
+++ b/src/mame/includes/bw12.h
@@ -38,26 +38,61 @@ class bw12_state : public driver_device
{
public:
bw12_state(const machine_config &mconfig, device_type type, const char *tag)
- : driver_device(mconfig, type, tag),
- m_maincpu(*this, Z80_TAG),
- m_pia(*this, PIA6821_TAG),
- m_sio(*this, Z80SIO_TAG),
- m_fdc(*this, UPD765_TAG),
- m_kbc(*this, AY3600PRO002_TAG),
- m_crtc(*this, MC6845_TAG),
- m_pit(*this, PIT8253_TAG),
- m_palette(*this, "palette"),
- m_centronics(*this, CENTRONICS_TAG),
- m_ram(*this, RAM_TAG),
- m_floppy0(*this, UPD765_TAG ":1:525dd"),
- m_floppy1(*this, UPD765_TAG ":2:525dd"),
- m_floppy_timer(*this, FLOPPY_TIMER_TAG),
- m_rom(*this, Z80_TAG),
- m_char_rom(*this, "chargen"),
- m_video_ram(*this, "video_ram"),
- m_modifiers(*this, "MODIFIERS")
+ : driver_device(mconfig, type, tag)
+ , m_maincpu(*this, Z80_TAG)
+ , m_pia(*this, PIA6821_TAG)
+ , m_sio(*this, Z80SIO_TAG)
+ , m_fdc(*this, UPD765_TAG)
+ , m_kbc(*this, AY3600PRO002_TAG)
+ , m_crtc(*this, MC6845_TAG)
+ , m_pit(*this, PIT8253_TAG)
+ , m_palette(*this, "palette")
+ , m_centronics(*this, CENTRONICS_TAG)
+ , m_ram(*this, RAM_TAG)
+ , m_floppy0(*this, UPD765_TAG ":1:525dd")
+ , m_floppy1(*this, UPD765_TAG ":2:525dd")
+ , m_floppy_timer(*this, FLOPPY_TIMER_TAG)
+ , m_rom(*this, Z80_TAG)
+ , m_char_rom(*this, "chargen")
+ , m_video_ram(*this, "video_ram")
+ , m_modifiers(*this, "MODIFIERS")
+ , m_led(*this, "led0")
{ }
+ void bankswitch();
+ void floppy_motor_off();
+ void set_floppy_motor_off_timer();
+ void ls259_w(int address, int data);
+
+ DECLARE_READ8_MEMBER( ls259_r );
+ DECLARE_WRITE8_MEMBER( ls259_w );
+ DECLARE_READ8_MEMBER( pia_pa_r );
+ DECLARE_WRITE_LINE_MEMBER( pia_cb2_w );
+ DECLARE_WRITE_LINE_MEMBER( pit_out2_w );
+ DECLARE_READ_LINE_MEMBER( ay3600_shift_r );
+ DECLARE_READ_LINE_MEMBER( ay3600_control_r );
+ DECLARE_WRITE_LINE_MEMBER( ay3600_data_ready_w );
+ MC6845_UPDATE_ROW( crtc_update_row );
+
+ TIMER_DEVICE_CALLBACK_MEMBER(floppy_motor_off_tick);
+ DECLARE_WRITE_LINE_MEMBER(pit_out0_w);
+ DECLARE_FLOPPY_FORMATS( bw12_floppy_formats );
+ DECLARE_FLOPPY_FORMATS( bw14_floppy_formats );
+
+ DECLARE_WRITE_LINE_MEMBER(write_centronics_busy);
+ DECLARE_WRITE_LINE_MEMBER(write_centronics_fault);
+ DECLARE_WRITE_LINE_MEMBER(write_centronics_perror);
+
+ void common(machine_config &config);
+ void bw14(machine_config &config);
+ void bw12(machine_config &config);
+ void bw12_io(address_map &map);
+ void bw12_mem(address_map &map);
+
+protected:
+ virtual void machine_start() override;
+ virtual void machine_reset() override;
+
required_device<cpu_device> m_maincpu;
required_device<pia6821_device> m_pia;
required_device<z80sio0_device> m_sio;
@@ -75,24 +110,7 @@ public:
required_memory_region m_char_rom;
required_shared_ptr<uint8_t> m_video_ram;
required_ioport m_modifiers;
-
- virtual void machine_start() override;
- virtual void machine_reset() override;
-
- void bankswitch();
- void floppy_motor_off();
- void set_floppy_motor_off_timer();
- void ls259_w(int address, int data);
-
- DECLARE_READ8_MEMBER( ls259_r );
- DECLARE_WRITE8_MEMBER( ls259_w );
- DECLARE_READ8_MEMBER( pia_pa_r );
- DECLARE_WRITE_LINE_MEMBER( pia_cb2_w );
- DECLARE_WRITE_LINE_MEMBER( pit_out2_w );
- DECLARE_READ_LINE_MEMBER( ay3600_shift_r );
- DECLARE_READ_LINE_MEMBER( ay3600_control_r );
- DECLARE_WRITE_LINE_MEMBER( ay3600_data_ready_w );
- MC6845_UPDATE_ROW( crtc_update_row );
+ output_finder<> m_led;
/* memory state */
int m_bank;
@@ -110,23 +128,10 @@ public:
int m_motor_on;
int m_motor0;
int m_motor1;
- TIMER_DEVICE_CALLBACK_MEMBER(floppy_motor_off_tick);
- DECLARE_WRITE_LINE_MEMBER(pit_out0_w);
- DECLARE_FLOPPY_FORMATS( bw12_floppy_formats );
- DECLARE_FLOPPY_FORMATS( bw14_floppy_formats );
- DECLARE_WRITE_LINE_MEMBER(write_centronics_busy);
- DECLARE_WRITE_LINE_MEMBER(write_centronics_fault);
- DECLARE_WRITE_LINE_MEMBER(write_centronics_perror);
int m_centronics_busy;
int m_centronics_fault;
int m_centronics_perror;
-
- void common(machine_config &config);
- void bw14(machine_config &config);
- void bw12(machine_config &config);
- void bw12_io(address_map &map);
- void bw12_mem(address_map &map);
};
#endif
diff --git a/src/mame/includes/bwidow.h b/src/mame/includes/bwidow.h
index 224f1ae1bb4..db9ff2b4173 100644
--- a/src/mame/includes/bwidow.h
+++ b/src/mame/includes/bwidow.h
@@ -12,23 +12,20 @@ class bwidow_state : public driver_device
{
public:
bwidow_state(const machine_config &mconfig, device_type type, const char *tag)
- : driver_device(mconfig, type, tag) ,
- m_maincpu(*this, "maincpu"),
- m_in3(*this, "IN3"),
- m_in4(*this, "IN4"),
- m_dsw2(*this, "DSW2") { }
+ : driver_device(mconfig, type, tag)
+ , m_maincpu(*this, "maincpu")
+ , m_in3(*this, "IN3")
+ , m_in4(*this, "IN4")
+ , m_dsw2(*this, "DSW2")
+ , m_led(*this, "led%u", 0U)
+ { }
- int m_lastdata;
DECLARE_READ8_MEMBER(spacduel_IN3_r);
DECLARE_READ8_MEMBER(bwidowp_in_r);
DECLARE_WRITE8_MEMBER(bwidow_misc_w);
DECLARE_WRITE8_MEMBER(spacduel_coin_counter_w);
DECLARE_WRITE8_MEMBER(irq_ack_w);
DECLARE_CUSTOM_INPUT_MEMBER(clock_r);
- required_device<cpu_device> m_maincpu;
- optional_ioport m_in3;
- optional_ioport m_in4;
- optional_ioport m_dsw2;
void spacduel(machine_config &config);
void gravitar(machine_config &config);
void bwidowp(machine_config &config);
@@ -39,6 +36,16 @@ public:
void bwidow_map(address_map &map);
void bwidowp_map(address_map &map);
void spacduel_map(address_map &map);
+
+protected:
+ virtual void machine_start() override { m_led.resolve(); }
+
+ int m_lastdata;
+ required_device<cpu_device> m_maincpu;
+ optional_ioport m_in3;
+ optional_ioport m_in4;
+ optional_ioport m_dsw2;
+ output_finder<2> m_led;
};
#endif // MAME_INCLUDES_BWIDOW_H
diff --git a/src/mame/includes/calomega.h b/src/mame/includes/calomega.h
index 76b22fc8536..93241317ecb 100644
--- a/src/mame/includes/calomega.h
+++ b/src/mame/includes/calomega.h
@@ -21,9 +21,9 @@ public:
m_in0_2(*this, "IN0-2"),
m_in0_3(*this, "IN0-3"),
m_frq(*this, "FRQ"),
- m_sw2(*this, "SW2")
- {
- }
+ m_sw2(*this, "SW2"),
+ m_lamp(*this, "lamp%u", 0U)
+ { }
DECLARE_WRITE8_MEMBER(calomega_videoram_w);
DECLARE_WRITE8_MEMBER(calomega_colorram_w);
@@ -63,6 +63,7 @@ public:
void sys905_map(address_map &map);
void sys906_map(address_map &map);
protected:
+ virtual void machine_start() override { m_lamp.resolve(); }
virtual void video_start() override;
private:
@@ -82,6 +83,7 @@ private:
optional_ioport m_in0_3;
optional_ioport m_frq;
optional_ioport m_sw2;
+ output_finder<10> m_lamp;
uint8_t m_tx_line;
int m_s903_mux_data;
diff --git a/src/mame/includes/cave.h b/src/mame/includes/cave.h
index 3bae5ccb4c9..834041f0fc8 100644
--- a/src/mame/includes/cave.h
+++ b/src/mame/includes/cave.h
@@ -67,27 +67,9 @@ public:
, m_gfxdecode(*this, "gfxdecode")
, m_screen(*this, "screen")
, m_palette(*this, "palette")
- , m_soundlatch(*this, "soundlatch") { }
-
- /* memory pointers */
- optional_shared_ptr_array<uint16_t, 4> m_videoregs;
- optional_shared_ptr_array<uint16_t, 4> m_vram;
- optional_shared_ptr_array<uint16_t, 4> m_vctrl;
- optional_shared_ptr_array<uint16_t, 4> m_spriteram;
- optional_shared_ptr_array<uint16_t, 4> m_paletteram;
-
- /* memory regions */
- optional_memory_region_array<4> m_spriteregion;
- optional_memory_region_array<4> m_tileregion;
- optional_memory_region_array<2> m_okiregion;
- optional_memory_region m_z80region;
- optional_memory_bank m_z80bank;
- optional_memory_bank_array<2> m_okibank_lo;
- optional_memory_bank_array<2> m_okibank_hi;
-
- /* video-related */
- std::unique_ptr<sprite_cave []> m_sprite[4];
- sprite_cave *m_sprite_table[4][MAX_PRIORITY][MAX_SPRITE_NUM + 1];
+ , m_soundlatch(*this, "soundlatch")
+ , m_led(*this, "led%u", 0U)
+ { }
struct
{
@@ -102,71 +84,6 @@ public:
void (cave_state::*m_get_sprite_info)(int chip);
void (cave_state::*m_sprite_draw)(int chip, int priority);
- tilemap_t *m_tilemap[4];
- int m_tiledim[4];
- int m_old_tiledim[4];
-
- bitmap_ind16 m_sprite_zbuf;
- uint16_t m_sprite_zbuf_baseval;
-
- int m_num_sprites[4];
-
- int m_spriteram_bank[4];
- int m_spriteram_bank_delay[4];
-
- std::unique_ptr<uint16_t[]> m_palette_map[4];
-
- int m_layers_offs_x;
- int m_layers_offs_y;
- int m_row_effect_offs_n;
- int m_row_effect_offs_f;
- int m_background_pen;
-
- int m_spritetype[2];
- int m_kludge;
- emu_timer *m_vblank_end_timer;
-
-
- /* misc */
- int m_time_vblank_irq;
- uint8_t m_irq_level;
- uint8_t m_vblank_irq;
- uint8_t m_sound_irq;
- uint8_t m_unknown_irq;
- uint8_t m_agallet_vblank_irq;
-
- /* sound related */
- int m_soundbuf_wptr;
- int m_soundbuf_rptr;
- uint8_t m_soundbuf_data[32];
- bool m_soundbuf_empty;
- //uint8_t m_sound_flag1;
- //uint8_t m_sound_flag2;
-
- /* game specific */
- // sailormn
- int m_sailormn_tilebank;
- // korokoro
- uint16_t m_leds[2];
- int m_hopper;
- // ppsatan
- uint16_t m_ppsatan_io_mux;
-
- /* devices */
- required_device<cpu_device> m_maincpu;
- optional_device<cpu_device> m_audiocpu;
- optional_device_array<okim6295_device, 2> m_oki;
- required_device<timer_device> m_int_timer;
- optional_device<timer_device> m_int_timer_left;
- optional_device<timer_device> m_int_timer_right;
- optional_device<eeprom_serial_93cxx_device> m_eeprom;
- required_device<gfxdecode_device> m_gfxdecode;
- required_device<screen_device> m_screen;
- required_device<palette_device> m_palette;
- optional_device<generic_latch_16_device> m_soundlatch;
-
- int m_rasflag;
- int m_old_rasflag;
DECLARE_READ16_MEMBER(cave_irq_cause_r);
DECLARE_READ8_MEMBER(soundflags_r);
DECLARE_READ16_MEMBER(soundflags_ack_r);
@@ -223,7 +140,6 @@ public:
void init_ppsatan();
TILE_GET_INFO_MEMBER(sailormn_get_tile_info_2);
template<int Chip> TILE_GET_INFO_MEMBER(get_tile_info);
- DECLARE_MACHINE_START(cave);
DECLARE_MACHINE_RESET(cave);
DECLARE_MACHINE_RESET(sailormn);
DECLARE_VIDEO_START(cave_2_layers);
@@ -314,6 +230,96 @@ public:
void tekkencw_map(address_map &map);
void tjumpman_map(address_map &map);
void uopoko_map(address_map &map);
+protected:
+ virtual void machine_start() override;
+
+ /* memory pointers */
+ optional_shared_ptr_array<uint16_t, 4> m_videoregs;
+ optional_shared_ptr_array<uint16_t, 4> m_vram;
+ optional_shared_ptr_array<uint16_t, 4> m_vctrl;
+ optional_shared_ptr_array<uint16_t, 4> m_spriteram;
+ optional_shared_ptr_array<uint16_t, 4> m_paletteram;
+
+ /* memory regions */
+ optional_memory_region_array<4> m_spriteregion;
+ optional_memory_region_array<4> m_tileregion;
+ optional_memory_region_array<2> m_okiregion;
+ optional_memory_region m_z80region;
+ optional_memory_bank m_z80bank;
+ optional_memory_bank_array<2> m_okibank_lo;
+ optional_memory_bank_array<2> m_okibank_hi;
+
+ /* video-related */
+ std::unique_ptr<sprite_cave []> m_sprite[4];
+ sprite_cave *m_sprite_table[4][MAX_PRIORITY][MAX_SPRITE_NUM + 1];
+
+ tilemap_t *m_tilemap[4];
+ int m_tiledim[4];
+ int m_old_tiledim[4];
+
+ bitmap_ind16 m_sprite_zbuf;
+ uint16_t m_sprite_zbuf_baseval;
+
+ int m_num_sprites[4];
+
+ int m_spriteram_bank[4];
+ int m_spriteram_bank_delay[4];
+
+ std::unique_ptr<uint16_t[]> m_palette_map[4];
+
+ int m_layers_offs_x;
+ int m_layers_offs_y;
+ int m_row_effect_offs_n;
+ int m_row_effect_offs_f;
+ int m_background_pen;
+
+ int m_spritetype[2];
+ int m_kludge;
+ emu_timer *m_vblank_end_timer;
+
+
+ /* misc */
+ int m_time_vblank_irq;
+ uint8_t m_irq_level;
+ uint8_t m_vblank_irq;
+ uint8_t m_sound_irq;
+ uint8_t m_unknown_irq;
+ uint8_t m_agallet_vblank_irq;
+
+ /* sound related */
+ int m_soundbuf_wptr;
+ int m_soundbuf_rptr;
+ uint8_t m_soundbuf_data[32];
+ bool m_soundbuf_empty;
+ //uint8_t m_sound_flag1;
+ //uint8_t m_sound_flag2;
+
+ /* game specific */
+ // sailormn
+ int m_sailormn_tilebank;
+ // korokoro
+ uint16_t m_leds[2];
+ int m_hopper;
+ // ppsatan
+ uint16_t m_ppsatan_io_mux;
+
+ /* devices */
+ required_device<cpu_device> m_maincpu;
+ optional_device<cpu_device> m_audiocpu;
+ optional_device_array<okim6295_device, 2> m_oki;
+ required_device<timer_device> m_int_timer;
+ optional_device<timer_device> m_int_timer_left;
+ optional_device<timer_device> m_int_timer_right;
+ optional_device<eeprom_serial_93cxx_device> m_eeprom;
+ required_device<gfxdecode_device> m_gfxdecode;
+ required_device<screen_device> m_screen;
+ required_device<palette_device> m_palette;
+ optional_device<generic_latch_16_device> m_soundlatch;
+ output_finder<9> m_led;
+
+ int m_rasflag;
+ int m_old_rasflag;
+
private:
inline void tilemap_draw( int chip, screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect, uint32_t flags, uint32_t priority, uint32_t priority2, int GFX );
void set_pens(int chip);
diff --git a/src/mame/includes/ccastles.h b/src/mame/includes/ccastles.h
index 680a412426f..a7ba5ce2dc8 100644
--- a/src/mame/includes/ccastles.h
+++ b/src/mame/includes/ccastles.h
@@ -26,7 +26,8 @@ public:
m_spriteram(*this, "spriteram"),
m_gfxdecode(*this, "gfxdecode"),
m_screen(*this, "screen"),
- m_palette(*this, "palette")
+ m_palette(*this, "palette"),
+ m_led(*this, "led%u", 0U)
{ }
DECLARE_CUSTOM_INPUT_MEMBER(get_vblank);
@@ -72,6 +73,7 @@ private:
required_device<gfxdecode_device> m_gfxdecode;
required_device<screen_device> m_screen;
required_device<palette_device> m_palette;
+ output_finder<2> m_led;
/* video-related */
const uint8_t *m_syncprom;
diff --git a/src/mame/includes/cidelsa.h b/src/mame/includes/cidelsa.h
index ac5468c86e5..e9c4f81c6f3 100644
--- a/src/mame/includes/cidelsa.h
+++ b/src/mame/includes/cidelsa.h
@@ -49,16 +49,9 @@ public:
: driver_device(mconfig, type, tag)
, m_maincpu(*this, CDP1802_TAG)
, m_vis(*this, CDP1869_TAG)
+ , m_led(*this, "led%u", 0U)
{ }
- required_device<cosmac_device> m_maincpu;
- required_device<cdp1869_device> m_vis;
-
- virtual void machine_start() override;
- virtual void machine_reset() override;
-
- virtual void video_start() override;
-
DECLARE_WRITE8_MEMBER( cdp1869_w );
DECLARE_WRITE8_MEMBER( destryer_out1_w );
DECLARE_WRITE8_MEMBER( altair_out1_w );
@@ -73,17 +66,6 @@ public:
CDP1869_CHAR_RAM_WRITE_MEMBER(cidelsa_charram_w);
CDP1869_PCB_READ_MEMBER(cidelsa_pcb_r);
- // cpu state
- int m_reset;
-
- // video state
- int m_cdp1802_q;
- int m_cdp1869_pcb;
-
- uint8_t *m_pageram;
- std::unique_ptr<uint8_t[]> m_pcbram;
- std::unique_ptr<uint8_t[]> m_charram;
-
void destryera(machine_config &config);
void altair(machine_config &config);
void destryer(machine_config &config);
@@ -95,8 +77,28 @@ public:
void destryer_io_map(address_map &map);
void destryer_map(address_map &map);
void destryera_map(address_map &map);
+
protected:
virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) override;
+ virtual void machine_start() override;
+ virtual void machine_reset() override;
+
+ virtual void video_start() override;
+
+ required_device<cosmac_device> m_maincpu;
+ required_device<cdp1869_device> m_vis;
+ output_finder<3> m_led;
+
+ // cpu state
+ int m_reset;
+
+ // video state
+ int m_cdp1802_q;
+ int m_cdp1869_pcb;
+
+ uint8_t *m_pageram;
+ std::unique_ptr<uint8_t[]> m_pcbram;
+ std::unique_ptr<uint8_t[]> m_charram;
};
class draco_state : public cidelsa_state
@@ -107,10 +109,6 @@ public:
m_psg(*this, AY8910_TAG)
{ }
- required_device<ay8910_device> m_psg;
-
- virtual void machine_start() override;
-
DECLARE_READ8_MEMBER( sound_in_r );
DECLARE_READ8_MEMBER( psg_r );
DECLARE_WRITE8_MEMBER( sound_bankswitch_w );
@@ -123,15 +121,20 @@ public:
CDP1869_CHAR_RAM_WRITE_MEMBER(draco_charram_w);
CDP1869_PCB_READ_MEMBER(draco_pcb_r);
- // sound state
- int m_sound;
- int m_psg_latch;
void draco(machine_config &config);
void draco_video(machine_config &config);
void draco_io_map(address_map &map);
void draco_map(address_map &map);
void draco_page_ram(address_map &map);
void draco_sound_map(address_map &map);
+
+protected:
+ virtual void machine_start() override;
+
+ required_device<ay8910_device> m_psg;
+ // sound state
+ int m_sound;
+ int m_psg_latch;
};
#endif // MAME_INCLUDES_CIDELSA_H
diff --git a/src/mame/includes/cischeat.h b/src/mame/includes/cischeat.h
index 0e76df53df2..a309d7b95a9 100644
--- a/src/mame/includes/cischeat.h
+++ b/src/mame/includes/cischeat.h
@@ -15,56 +15,36 @@ class cischeat_state : public driver_device
{
public:
cischeat_state(const machine_config &mconfig, device_type type, const char *tag)
- : driver_device(mconfig, type, tag),
- m_tmap(*this, "scroll%u", 0),
- m_ram(*this, "ram"),
- m_roadram(*this, "roadram.%u", 0),
- m_f1gpstr2_ioready(*this, "ioready"),
- m_maincpu(*this, "maincpu"),
- m_cpu1(*this, "cpu1"),
- m_cpu2(*this, "cpu2"),
- m_cpu3(*this, "cpu3"),
- m_cpu5(*this, "cpu5"),
- m_soundcpu(*this, "soundcpu"),
- m_screen(*this, "screen"),
- m_watchdog(*this, "watchdog"),
- m_oki1(*this, "oki1"),
- m_oki2(*this, "oki2"),
- m_gfxdecode(*this, "gfxdecode"),
- m_palette(*this, "palette"),
- m_soundlatch(*this, "soundlatch"),
- m_soundlatch2(*this, "soundlatch2"),
- m_captflag_hopper(*this, "hopper"),
- m_captflag_motor_left(*this, "motor_left"),
- m_captflag_motor_right(*this, "motor_right"),
- m_oki1_bank(*this, "oki1_bank"),
- m_oki2_bank(*this, "oki2_bank")
- {
- for (int side = 0; side < 2; ++side)
- m_captflag_motor_command[side] = m_captflag_motor_pos[side] = 0;
- m_captflag_leds = 0;
- }
-
- optional_device_array<megasys1_tilemap_device, 3> m_tmap;
- required_shared_ptr<uint16_t> m_ram;
- optional_shared_ptr_array<uint16_t,2> m_roadram;
- optional_shared_ptr<uint16_t> m_f1gpstr2_ioready;
-
- uint16_t *m_objectram;
- uint16_t m_active_layers;
-
- int m_prev;
- int m_armold;
- uint16_t m_scudhamm_motor_command;
- int m_ip_select;
- uint16_t m_wildplt_output;
- uint8_t m_drawmode_table[16];
- int m_debugsprites;
- int m_show_unknown;
- uint16_t *m_spriteram;
-
- uint8_t m_motor_value;
- uint8_t m_io_value;
+ : driver_device(mconfig, type, tag)
+ , m_tmap(*this, "scroll%u", 0)
+ , m_ram(*this, "ram")
+ , m_roadram(*this, "roadram.%u", 0)
+ , m_f1gpstr2_ioready(*this, "ioready")
+ , m_maincpu(*this, "maincpu")
+ , m_cpu1(*this, "cpu1")
+ , m_cpu2(*this, "cpu2")
+ , m_cpu3(*this, "cpu3")
+ , m_cpu5(*this, "cpu5")
+ , m_soundcpu(*this, "soundcpu")
+ , m_screen(*this, "screen")
+ , m_watchdog(*this, "watchdog")
+ , m_oki1(*this, "oki1")
+ , m_oki2(*this, "oki2")
+ , m_gfxdecode(*this, "gfxdecode")
+ , m_palette(*this, "palette")
+ , m_soundlatch(*this, "soundlatch")
+ , m_soundlatch2(*this, "soundlatch2")
+ , m_captflag_hopper(*this, "hopper")
+ , m_captflag_motor_left(*this, "motor_left")
+ , m_captflag_motor_right(*this, "motor_right")
+ , m_oki1_bank(*this, "oki1_bank")
+ , m_oki2_bank(*this, "oki2_bank")
+ , m_led(*this, "led%u", 0U)
+ {
+ for (int side = 0; side < 2; ++side)
+ m_captflag_motor_command[side] = m_captflag_motor_pos[side] = 0;
+ m_captflag_leds = 0;
+ }
DECLARE_WRITE16_MEMBER(scudhamm_motor_command_w);
DECLARE_WRITE16_MEMBER(scudhamm_leds_w);
@@ -105,7 +85,6 @@ public:
void init_cischeat();
void init_bigrun();
void init_f1gpstar();
- virtual void video_start() override;
uint32_t screen_update_bigrun(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
uint32_t screen_update_scudhamm(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
uint32_t screen_update_cischeat(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
@@ -119,40 +98,14 @@ public:
void cischeat_draw_sprites(bitmap_ind16 &bitmap , const rectangle &cliprect, int priority1, int priority2);
void bigrun_draw_sprites(bitmap_ind16 &bitmap , const rectangle &cliprect, int priority1, int priority2);
void cischeat_untangle_sprites(const char *region);
- optional_device<cpu_device> m_maincpu; // some are called cpu1
- optional_device<cpu_device> m_cpu1;
- optional_device<cpu_device> m_cpu2;
- optional_device<cpu_device> m_cpu3;
- optional_device<cpu_device> m_cpu5;
- optional_device<cpu_device> m_soundcpu;
- required_device<screen_device> m_screen;
- optional_device<watchdog_timer_device> m_watchdog;
- required_device<okim6295_device> m_oki1;
- required_device<okim6295_device> m_oki2;
- required_device<gfxdecode_device> m_gfxdecode;
- required_device<palette_device> m_palette;
- optional_device<generic_latch_16_device> m_soundlatch;
- optional_device<generic_latch_16_device> m_soundlatch2;
-
- // captflag
- optional_device<ticket_dispenser_device> m_captflag_hopper;
-
- optional_device<timer_device> m_captflag_motor_left;
- optional_device<timer_device> m_captflag_motor_right;
- uint16_t m_captflag_motor_command[2];
- uint16_t m_captflag_motor_pos[2];
DECLARE_WRITE16_MEMBER(captflag_motor_command_right_w);
DECLARE_WRITE16_MEMBER(captflag_motor_command_left_w);
void captflag_motor_move(int side, uint16_t data);
DECLARE_CUSTOM_INPUT_MEMBER(captflag_motor_busy_r);
DECLARE_CUSTOM_INPUT_MEMBER(captflag_motor_pos_r);
-
- optional_memory_bank m_oki1_bank;
- optional_memory_bank m_oki2_bank;
DECLARE_WRITE16_MEMBER(captflag_oki_bank_w);
- uint16_t m_captflag_leds;
DECLARE_WRITE16_MEMBER(captflag_leds_w);
void init_captflag();
@@ -186,4 +139,58 @@ public:
void f1gpstr2_sound_map(address_map &map);
void scudhamm_map(address_map &map);
void wildplt_map(address_map &map);
+
+protected:
+ virtual void machine_start() override { m_led.resolve(); }
+ virtual void video_start() override;
+
+ optional_device_array<megasys1_tilemap_device, 3> m_tmap;
+ required_shared_ptr<uint16_t> m_ram;
+ optional_shared_ptr_array<uint16_t,2> m_roadram;
+ optional_shared_ptr<uint16_t> m_f1gpstr2_ioready;
+
+ uint16_t *m_objectram;
+ uint16_t m_active_layers;
+
+ int m_prev;
+ int m_armold;
+ uint16_t m_scudhamm_motor_command;
+ int m_ip_select;
+ uint16_t m_wildplt_output;
+ uint8_t m_drawmode_table[16];
+ int m_debugsprites;
+ int m_show_unknown;
+ uint16_t *m_spriteram;
+
+ uint8_t m_motor_value;
+ uint8_t m_io_value;
+
+ optional_device<cpu_device> m_maincpu; // some are called cpu1
+ optional_device<cpu_device> m_cpu1;
+ optional_device<cpu_device> m_cpu2;
+ optional_device<cpu_device> m_cpu3;
+ optional_device<cpu_device> m_cpu5;
+ optional_device<cpu_device> m_soundcpu;
+ required_device<screen_device> m_screen;
+ optional_device<watchdog_timer_device> m_watchdog;
+ required_device<okim6295_device> m_oki1;
+ required_device<okim6295_device> m_oki2;
+ required_device<gfxdecode_device> m_gfxdecode;
+ required_device<palette_device> m_palette;
+ optional_device<generic_latch_16_device> m_soundlatch;
+ optional_device<generic_latch_16_device> m_soundlatch2;
+
+ // captflag
+ optional_device<ticket_dispenser_device> m_captflag_hopper;
+
+ optional_device<timer_device> m_captflag_motor_left;
+ optional_device<timer_device> m_captflag_motor_right;
+ uint16_t m_captflag_motor_command[2];
+ uint16_t m_captflag_motor_pos[2];
+
+ optional_memory_bank m_oki1_bank;
+ optional_memory_bank m_oki2_bank;
+
+ uint16_t m_captflag_leds;
+ output_finder<5> m_led;
};
diff --git a/src/mame/includes/copsnrob.h b/src/mame/includes/copsnrob.h
index aaef2afbab3..2c5d63ace35 100644
--- a/src/mame/includes/copsnrob.h
+++ b/src/mame/includes/copsnrob.h
@@ -31,7 +31,7 @@ public:
m_gfxdecode(*this, "gfxdecode"),
m_screen(*this, "screen"),
m_palette(*this, "palette"),
- m_led(*this, "led")
+ m_led(*this, "led%u", 0U)
{ }
void copsnrob(machine_config &config);
@@ -66,7 +66,7 @@ private:
required_device<screen_device> m_screen;
required_device<palette_device> m_palette;
- output_finder<> m_led;
+ output_finder<2> m_led;
};
#endif // MAME_INCLUDES_COPSNROB_H
diff --git a/src/mame/includes/cps1.h b/src/mame/includes/cps1.h
index 51ec10adafb..b1637030620 100644
--- a/src/mame/includes/cps1.h
+++ b/src/mame/includes/cps1.h
@@ -100,8 +100,8 @@ struct CPS1config
class cps_state : public driver_device
{
public:
- cps_state(const machine_config &mconfig, device_type type, const char *tag)
- : driver_device(mconfig, type, tag),
+ cps_state(const machine_config &mconfig, device_type type, const char *tag) :
+ driver_device(mconfig, type, tag),
m_mainram(*this, "mainram"),
m_gfxram(*this, "gfxram"),
m_cps_a_regs(*this, "cps_a_regs"),
@@ -131,118 +131,10 @@ public:
m_soundlatch2(*this, "soundlatch2"),
m_decrypted_opcodes(*this, "decrypted_opcodes"),
m_region_key(*this, "key"),
- m_region_stars(*this, "stars")
+ m_region_stars(*this, "stars"),
+ m_led_cboard(*this, "led_cboard%u", 0U)
{ }
- /* memory pointers */
- // cps1
- optional_shared_ptr<uint16_t> m_mainram;
- required_shared_ptr<uint16_t> m_gfxram;
- required_shared_ptr<uint16_t> m_cps_a_regs;
- required_shared_ptr<uint16_t> m_cps_b_regs;
- uint16_t * m_scroll1;
- uint16_t * m_scroll2;
- uint16_t * m_scroll3;
- uint16_t * m_obj;
- uint16_t * m_other;
- std::unique_ptr<uint16_t[]> m_buffered_obj;
- optional_shared_ptr<uint8_t> m_qsound_sharedram1;
- optional_shared_ptr<uint8_t> m_qsound_sharedram2;
- std::unique_ptr<uint8_t[]> m_decrypt_kabuki;
- // cps2
- optional_shared_ptr<uint16_t> m_objram1;
- optional_shared_ptr<uint16_t> m_objram2;
- optional_shared_ptr<uint16_t> m_output;
-
- optional_ioport m_io_in0;
- optional_ioport m_io_in1;
- std::unique_ptr<uint16_t[]> m_cps2_buffered_obj;
- // game-specific
- std::unique_ptr<uint16_t[]> m_gigaman2_dummyqsound_ram;
- uint16_t sf2ceblp_prot;
-
- /* video-related */
- tilemap_t *m_bg_tilemap[3];
- int m_scanline1;
- int m_scanline2;
- int m_scancalls;
-
- int m_scroll1x;
- int m_scroll1y;
- int m_scroll2x;
- int m_scroll2y;
- int m_scroll3x;
- int m_scroll3y;
-
- int m_stars_enabled[2]; /* Layer enabled [Y/N] */
- int m_stars1x;
- int m_stars1y;
- int m_stars2x;
- int m_stars2y;
- int m_last_sprite_offset; /* Offset of the last sprite */
- int m_cps2_last_sprite_offset; /* Offset of the last sprite */
- int m_pri_ctrl; /* Sprite layer priorities */
- int m_objram_bank;
-
- /* misc */
- int m_readpaddle; // pzloop2
- int m_cps2networkpresent;
- int m_cps2digitalvolumelevel;
- int m_cps2disabledigitalvolume;
- emu_timer *m_digital_volume_timer;
- int m_cps2_dial_type;
- int m_ecofghtr_dial_direction0;
- int m_ecofghtr_dial_direction1;
- int m_ecofghtr_dial_last0;
- int m_ecofghtr_dial_last1;
-
-
- /* fcrash sound hw */
- int m_sample_buffer1;
- int m_sample_buffer2;
- int m_sample_select1;
- int m_sample_select2;
-
- /* video config (never changed after video_start) */
- const struct CPS1config *m_game_config;
- int m_scroll_size;
- int m_obj_size;
- int m_cps2_obj_size;
- int m_other_size;
- int m_palette_align;
- int m_palette_size;
- int m_stars_rom_size;
- uint8_t m_empty_tile[32*32];
- int m_cps_version;
-
- /* fcrash video config */
- uint8_t m_layer_enable_reg;
- uint8_t m_layer_mask_reg[4];
- int m_layer_scroll1x_offset;
- int m_layer_scroll2x_offset;
- int m_layer_scroll3x_offset;
- int m_sprite_base;
- int m_sprite_list_end_marker;
- int m_sprite_x_offset;
- std::unique_ptr<uint16_t[]> m_bootleg_sprite_ram;
- std::unique_ptr<uint16_t[]> m_bootleg_work_ram;
-
- /* devices */
- required_device<m68000_base_device> m_maincpu;
- optional_device<cpu_device> m_audiocpu;
- optional_device<okim6295_device> m_oki;
- optional_device<m48t35_device> m_m48t35;
- optional_device<msm5205_device> m_msm_1; // fcrash
- optional_device<msm5205_device> m_msm_2; // fcrash
- required_device<gfxdecode_device> m_gfxdecode;
- required_device<screen_device> m_screen;
- required_device<palette_device> m_palette;
- optional_device<generic_latch_8_device> m_soundlatch;
- optional_device<generic_latch_8_device> m_soundlatch2;
- optional_shared_ptr<uint16_t> m_decrypted_opcodes;
- optional_memory_region m_region_key;
- optional_memory_region m_region_stars;
-
DECLARE_READ16_MEMBER(cps1_hack_dsw_r);
DECLARE_READ16_MEMBER(cps1_in1_r);
DECLARE_READ16_MEMBER(cps1_in2_r);
@@ -463,6 +355,119 @@ public:
void sound_map(address_map &map);
void sub_map(address_map &map);
void varthb_map(address_map &map);
+
+protected:
+ virtual void machine_start() override { m_led_cboard.resolve(); }
+
+ /* memory pointers */
+ // cps1
+ optional_shared_ptr<uint16_t> m_mainram;
+ required_shared_ptr<uint16_t> m_gfxram;
+ required_shared_ptr<uint16_t> m_cps_a_regs;
+ required_shared_ptr<uint16_t> m_cps_b_regs;
+ uint16_t * m_scroll1;
+ uint16_t * m_scroll2;
+ uint16_t * m_scroll3;
+ uint16_t * m_obj;
+ uint16_t * m_other;
+ std::unique_ptr<uint16_t[]> m_buffered_obj;
+ optional_shared_ptr<uint8_t> m_qsound_sharedram1;
+ optional_shared_ptr<uint8_t> m_qsound_sharedram2;
+ std::unique_ptr<uint8_t[]> m_decrypt_kabuki;
+ // cps2
+ optional_shared_ptr<uint16_t> m_objram1;
+ optional_shared_ptr<uint16_t> m_objram2;
+ optional_shared_ptr<uint16_t> m_output;
+
+ optional_ioport m_io_in0;
+ optional_ioport m_io_in1;
+ std::unique_ptr<uint16_t[]> m_cps2_buffered_obj;
+ // game-specific
+ std::unique_ptr<uint16_t[]> m_gigaman2_dummyqsound_ram;
+ uint16_t sf2ceblp_prot;
+
+ /* video-related */
+ tilemap_t *m_bg_tilemap[3];
+ int m_scanline1;
+ int m_scanline2;
+ int m_scancalls;
+
+ int m_scroll1x;
+ int m_scroll1y;
+ int m_scroll2x;
+ int m_scroll2y;
+ int m_scroll3x;
+ int m_scroll3y;
+
+ int m_stars_enabled[2]; /* Layer enabled [Y/N] */
+ int m_stars1x;
+ int m_stars1y;
+ int m_stars2x;
+ int m_stars2y;
+ int m_last_sprite_offset; /* Offset of the last sprite */
+ int m_cps2_last_sprite_offset; /* Offset of the last sprite */
+ int m_pri_ctrl; /* Sprite layer priorities */
+ int m_objram_bank;
+
+ /* misc */
+ int m_readpaddle; // pzloop2
+ int m_cps2networkpresent;
+ int m_cps2digitalvolumelevel;
+ int m_cps2disabledigitalvolume;
+ emu_timer *m_digital_volume_timer;
+ int m_cps2_dial_type;
+ int m_ecofghtr_dial_direction0;
+ int m_ecofghtr_dial_direction1;
+ int m_ecofghtr_dial_last0;
+ int m_ecofghtr_dial_last1;
+
+
+ /* fcrash sound hw */
+ int m_sample_buffer1;
+ int m_sample_buffer2;
+ int m_sample_select1;
+ int m_sample_select2;
+
+ /* video config (never changed after video_start) */
+ const struct CPS1config *m_game_config;
+ int m_scroll_size;
+ int m_obj_size;
+ int m_cps2_obj_size;
+ int m_other_size;
+ int m_palette_align;
+ int m_palette_size;
+ int m_stars_rom_size;
+ uint8_t m_empty_tile[32*32];
+ int m_cps_version;
+
+ /* fcrash video config */
+ uint8_t m_layer_enable_reg;
+ uint8_t m_layer_mask_reg[4];
+ int m_layer_scroll1x_offset;
+ int m_layer_scroll2x_offset;
+ int m_layer_scroll3x_offset;
+ int m_sprite_base;
+ int m_sprite_list_end_marker;
+ int m_sprite_x_offset;
+ std::unique_ptr<uint16_t[]> m_bootleg_sprite_ram;
+ std::unique_ptr<uint16_t[]> m_bootleg_work_ram;
+
+ /* devices */
+ required_device<m68000_base_device> m_maincpu;
+ optional_device<cpu_device> m_audiocpu;
+ optional_device<okim6295_device> m_oki;
+ optional_device<m48t35_device> m_m48t35;
+ optional_device<msm5205_device> m_msm_1; // fcrash
+ optional_device<msm5205_device> m_msm_2; // fcrash
+ required_device<gfxdecode_device> m_gfxdecode;
+ required_device<screen_device> m_screen;
+ required_device<palette_device> m_palette;
+ optional_device<generic_latch_8_device> m_soundlatch;
+ optional_device<generic_latch_8_device> m_soundlatch2;
+ optional_shared_ptr<uint16_t> m_decrypted_opcodes;
+ optional_memory_region m_region_key;
+ optional_memory_region m_region_stars;
+ output_finder<3> m_led_cboard;
};
/*----------- defined in drivers/cps1.c -----------*/
diff --git a/src/mame/includes/cvs.h b/src/mame/includes/cvs.h
index b36f0b89159..2fe961b5603 100644
--- a/src/mame/includes/cvs.h
+++ b/src/mame/includes/cvs.h
@@ -25,76 +25,28 @@ class cvs_state : public driver_device
{
public:
cvs_state(const machine_config &mconfig, device_type type, const char *tag)
- : driver_device(mconfig, type, tag),
- m_video_ram(*this, "video_ram"),
- m_bullet_ram(*this, "bullet_ram"),
- m_cvs_4_bit_dac_data(*this, "4bit_dac"),
- m_tms5110_ctl_data(*this, "tms5110_ctl"),
- m_dac3_state(*this, "dac3_state"),
- m_maincpu(*this, "maincpu"),
- m_audiocpu(*this, "audiocpu"),
- m_speechcpu(*this, "speechcpu"),
- m_dac2(*this, "dac2"),
- m_dac3(*this, "dac3"),
- m_tms5110(*this, "tms"),
- m_s2636_0(*this, "s2636_0"),
- m_s2636_1(*this, "s2636_1"),
- m_s2636_2(*this, "s2636_2"),
- m_gfxdecode(*this, "gfxdecode"),
- m_screen(*this, "screen"),
- m_palette(*this, "palette"),
- m_soundlatch(*this, "soundlatch")
- {
- }
+ : driver_device(mconfig, type, tag)
+ , m_video_ram(*this, "video_ram")
+ , m_bullet_ram(*this, "bullet_ram")
+ , m_cvs_4_bit_dac_data(*this, "4bit_dac")
+ , m_tms5110_ctl_data(*this, "tms5110_ctl")
+ , m_dac3_state(*this, "dac3_state")
+ , m_maincpu(*this, "maincpu")
+ , m_audiocpu(*this, "audiocpu")
+ , m_speechcpu(*this, "speechcpu")
+ , m_dac2(*this, "dac2")
+ , m_dac3(*this, "dac3")
+ , m_tms5110(*this, "tms")
+ , m_s2636_0(*this, "s2636_0")
+ , m_s2636_1(*this, "s2636_1")
+ , m_s2636_2(*this, "s2636_2")
+ , m_gfxdecode(*this, "gfxdecode")
+ , m_screen(*this, "screen")
+ , m_palette(*this, "palette")
+ , m_soundlatch(*this, "soundlatch")
+ , m_lamp(*this, "lamp%u", 0U)
+ { }
- /* memory pointers */
- required_shared_ptr<uint8_t> m_video_ram;
- required_shared_ptr<uint8_t> m_bullet_ram;
- optional_shared_ptr<uint8_t> m_cvs_4_bit_dac_data;
- optional_shared_ptr<uint8_t> m_tms5110_ctl_data;
- optional_shared_ptr<uint8_t> m_dac3_state;
-
- /* video-related */
- struct cvs_star m_stars[CVS_MAX_STARS];
- bitmap_ind16 m_collision_background;
- bitmap_ind16 m_background_bitmap;
- bitmap_ind16 m_scrolled_collision_background;
- int m_collision_register;
- int m_total_stars;
- int m_stars_on;
- uint8_t m_scroll_reg;
- int m_stars_scroll;
-
- /* misc */
- int m_s2650_flag;
- emu_timer *m_cvs_393hz_timer;
- uint8_t m_cvs_393hz_clock;
-
- uint8_t m_character_banking_mode;
- uint16_t m_character_ram_page_start;
- uint16_t m_speech_rom_bit_address;
-
- /* devices */
- required_device<cpu_device> m_maincpu;
- optional_device<cpu_device> m_audiocpu;
- optional_device<cpu_device> m_speechcpu;
- optional_device<dac_byte_interface> m_dac2;
- optional_device<dac_bit_interface> m_dac3;
- optional_device<tms5110_device> m_tms5110;
- optional_device<s2636_device> m_s2636_0;
- optional_device<s2636_device> m_s2636_1;
- optional_device<s2636_device> m_s2636_2;
- required_device<gfxdecode_device> m_gfxdecode;
- required_device<screen_device> m_screen;
- required_device<palette_device> m_palette;
- optional_device<generic_latch_8_device> m_soundlatch;
-
- /* memory */
- uint8_t m_color_ram[0x400];
- uint8_t m_palette_ram[0x10];
- uint8_t m_character_ram[3 * 0x800]; /* only half is used, but
- by allocating twice the amount,
- we can use the same gfx_layout */
DECLARE_READ_LINE_MEMBER(speech_rom_read_bit);
DECLARE_WRITE_LINE_MEMBER(write_s2650_flag);
DECLARE_WRITE_LINE_MEMBER(cvs_slave_cpu_interrupt);
@@ -127,8 +79,6 @@ public:
void init_hero();
void init_superbik();
void init_hunchbaka();
- DECLARE_MACHINE_START(cvs);
- DECLARE_MACHINE_RESET(cvs);
DECLARE_VIDEO_START(cvs);
DECLARE_PALETTE_INIT(cvs);
uint32_t screen_update_cvs(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
@@ -145,4 +95,58 @@ public:
void cvs_main_cpu_io_map(address_map &map);
void cvs_main_cpu_map(address_map &map);
void cvs_speech_cpu_map(address_map &map);
+
+protected:
+ virtual void machine_start() override;
+ virtual void machine_reset() override;
+
+ /* memory pointers */
+ required_shared_ptr<uint8_t> m_video_ram;
+ required_shared_ptr<uint8_t> m_bullet_ram;
+ optional_shared_ptr<uint8_t> m_cvs_4_bit_dac_data;
+ optional_shared_ptr<uint8_t> m_tms5110_ctl_data;
+ optional_shared_ptr<uint8_t> m_dac3_state;
+
+ /* video-related */
+ struct cvs_star m_stars[CVS_MAX_STARS];
+ bitmap_ind16 m_collision_background;
+ bitmap_ind16 m_background_bitmap;
+ bitmap_ind16 m_scrolled_collision_background;
+ int m_collision_register;
+ int m_total_stars;
+ int m_stars_on;
+ uint8_t m_scroll_reg;
+ int m_stars_scroll;
+
+ /* misc */
+ int m_s2650_flag;
+ emu_timer *m_cvs_393hz_timer;
+ uint8_t m_cvs_393hz_clock;
+
+ uint8_t m_character_banking_mode;
+ uint16_t m_character_ram_page_start;
+ uint16_t m_speech_rom_bit_address;
+
+ /* devices */
+ required_device<cpu_device> m_maincpu;
+ optional_device<cpu_device> m_audiocpu;
+ optional_device<cpu_device> m_speechcpu;
+ optional_device<dac_byte_interface> m_dac2;
+ optional_device<dac_bit_interface> m_dac3;
+ optional_device<tms5110_device> m_tms5110;
+ optional_device<s2636_device> m_s2636_0;
+ optional_device<s2636_device> m_s2636_1;
+ optional_device<s2636_device> m_s2636_2;
+ required_device<gfxdecode_device> m_gfxdecode;
+ required_device<screen_device> m_screen;
+ required_device<palette_device> m_palette;
+ optional_device<generic_latch_8_device> m_soundlatch;
+ output_finder<3> m_lamp;
+
+ /* memory */
+ uint8_t m_color_ram[0x400];
+ uint8_t m_palette_ram[0x10];
+ uint8_t m_character_ram[3 * 0x800]; /* only half is used, but
+ by allocating twice the amount,
+ we can use the same gfx_layout */
};
diff --git a/src/mame/includes/djmain.h b/src/mame/includes/djmain.h
index 1b12630bb82..bc81dec7218 100644
--- a/src/mame/includes/djmain.h
+++ b/src/mame/includes/djmain.h
@@ -9,38 +9,20 @@ class djmain_state : public driver_device
{
public:
djmain_state(const machine_config &mconfig, device_type type, const char *tag)
- : driver_device(mconfig, type, tag),
- m_obj_ram(*this, "obj_ram"),
- m_maincpu(*this, "maincpu"),
- m_k056832(*this, "k056832"),
- m_k055555(*this, "k055555"),
- m_ata(*this, "ata"),
- m_gfxdecode(*this, "gfxdecode"),
- m_palette(*this, "palette"),
- m_turntable(*this, {"TT1", "TT2"}),
- m_sndram(*this, "sndram")
+ : driver_device(mconfig, type, tag)
+ , m_obj_ram(*this, "obj_ram")
+ , m_maincpu(*this, "maincpu")
+ , m_k056832(*this, "k056832")
+ , m_k055555(*this, "k055555")
+ , m_ata(*this, "ata")
+ , m_gfxdecode(*this, "gfxdecode")
+ , m_palette(*this, "palette")
+ , m_turntable(*this, {"TT1", "TT2"})
+ , m_sndram(*this, "sndram")
+ , m_led(*this, "led%u", 0U)
{
}
- required_shared_ptr<uint32_t> m_obj_ram;
- required_device<cpu_device> m_maincpu;
- required_device<k056832_device> m_k056832;
- required_device<k055555_device> m_k055555;
- required_device<ata_interface_device> m_ata;
- required_device<gfxdecode_device> m_gfxdecode;
- required_device<palette_device> m_palette;
- optional_ioport_array<2> m_turntable;
- required_shared_ptr<uint8_t> m_sndram;
-
- int m_sndram_bank;
- int m_turntable_select;
- uint8_t m_turntable_last_pos[2];
- uint16_t m_turntable_pos[2];
- uint8_t m_pending_vb_int;
- uint16_t m_v_ctrl;
- uint32_t m_obj_regs[0xa0/4];
- const uint8_t *m_ata_user_password;
- const uint8_t *m_ata_master_password;
DECLARE_WRITE32_MEMBER(sndram_bank_w);
DECLARE_READ32_MEMBER(sndram_r);
DECLARE_WRITE32_MEMBER(sndram_w);
@@ -70,9 +52,6 @@ public:
void init_bmcompm2();
void init_bmcorerm();
void init_bmclubmx();
- virtual void machine_start() override;
- virtual void machine_reset() override;
- virtual void video_start() override;
uint32_t screen_update_djmain(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect);
INTERRUPT_GEN_MEMBER(vb_interrupt);
DECLARE_WRITE_LINE_MEMBER(ide_interrupt);
@@ -86,4 +65,30 @@ public:
void maincpu_djmaina(address_map &map);
void maincpu_djmainj(address_map &map);
void maincpu_djmainu(address_map &map);
+
+protected:
+ virtual void machine_start() override;
+ virtual void machine_reset() override;
+ virtual void video_start() override;
+
+ required_shared_ptr<uint32_t> m_obj_ram;
+ required_device<cpu_device> m_maincpu;
+ required_device<k056832_device> m_k056832;
+ required_device<k055555_device> m_k055555;
+ required_device<ata_interface_device> m_ata;
+ required_device<gfxdecode_device> m_gfxdecode;
+ required_device<palette_device> m_palette;
+ optional_ioport_array<2> m_turntable;
+ required_shared_ptr<uint8_t> m_sndram;
+ output_finder<3> m_led;
+
+ int m_sndram_bank;
+ int m_turntable_select;
+ uint8_t m_turntable_last_pos[2];
+ uint16_t m_turntable_pos[2];
+ uint8_t m_pending_vb_int;
+ uint16_t m_v_ctrl;
+ uint32_t m_obj_regs[0xa0/4];
+ const uint8_t *m_ata_user_password;
+ const uint8_t *m_ata_master_password;
};
diff --git a/src/mame/includes/dynax.h b/src/mame/includes/dynax.h
index 1bc90064d8e..398357b6703 100644
--- a/src/mame/includes/dynax.h
+++ b/src/mame/includes/dynax.h
@@ -38,100 +38,11 @@ public:
, m_gfx_region6(*this, "gfx6")
, m_gfx_region7(*this, "gfx7")
, m_gfx_region8(*this, "gfx8")
+ , m_led(*this, "led0")
{
}
- /* devices */
- required_device<cpu_device> m_maincpu;
- optional_device<cpu_device> m_soundcpu;
- optional_device<okim6295_device> m_oki;
- optional_device<msm5205_device> m_msm;
- optional_device<screen_device> m_screen;
- required_device<palette_device> m_palette;
- optional_device<address_map_bank_device> m_bankdev;
- optional_device<ls259_device> m_mainlatch;
- optional_device<rst_pos_buffer_device> m_mainirq;
- optional_device<rst_pos_buffer_device> m_soundirq;
- optional_device<generic_latch_8_device> m_soundlatch;
- optional_region_ptr<uint8_t> m_gfx_region1;
- optional_region_ptr<uint8_t> m_gfx_region2;
- optional_region_ptr<uint8_t> m_gfx_region3;
- optional_region_ptr<uint8_t> m_gfx_region4;
- optional_region_ptr<uint8_t> m_gfx_region5;
- optional_region_ptr<uint8_t> m_gfx_region6;
- optional_region_ptr<uint8_t> m_gfx_region7;
- optional_region_ptr<uint8_t> m_gfx_region8;
-
- memory_region * m_gfxregions[8];
-
- // up to 8 layers, 2 images per layer (interleaved on screen)
- std::unique_ptr<uint8_t[]> m_pixmap[8][2];
-
- /* irq */
typedef void (dynax_state::*irq_func)(); // some games trigger IRQ at blitter end, some don't
- irq_func m_update_irq_func;
- bool m_blitter_irq;
- bool m_blitter_irq_mask;
- bool m_blitter2_irq;
- bool m_blitter2_irq_mask;
-
- /* blitters */
- int m_blit_scroll_x;
- int m_blit2_scroll_x;
- int m_blit_scroll_y;
- int m_blit2_scroll_y;
- int m_blit_wrap_enable;
- int m_blit2_wrap_enable;
- int m_blit_x;
- int m_blit_y;
- int m_blit2_x;
- int m_blit2_y;
- int m_blit_src;
- int m_blit2_src;
- int m_blit_romregion;
- int m_blit2_romregion;
- int m_blit_dest;
- int m_blit2_dest;
- int m_blit_pen;
- int m_blit2_pen;
- int m_blit_palbank;
- int m_blit2_palbank;
- int m_blit_palettes;
- int m_blit2_palettes;
- int m_layer_enable;
- int m_blit_backpen;
-
- int m_hanamai_layer_half;
- int m_hnoridur_layer_half2;
-
- int m_extra_scroll_x;
- int m_extra_scroll_y;
- int m_flipscreen;
-
- int m_layer_layout;
-
- const int *m_priority_table;
- int m_hanamai_priority;
-
- /* input */
- uint8_t m_input_sel;
- uint8_t m_dsw_sel;
- uint8_t m_keyb;
- uint8_t m_coins;
- uint8_t m_hopper;
-
- /* misc */
- uint8_t m_palette_ram[16*256*2];
- int m_palbank;
- int m_msm5205next;
- int m_resetkludge;
- int m_toggle;
- int m_toggle_cpu1;
- int m_rombank;
- uint8_t m_tenkai_p5_val;
- int m_tenkai_6c;
- int m_tenkai_70;
- uint8_t m_gekisha_val[2];
DECLARE_WRITE8_MEMBER(dynax_vblank_ack_w);
DECLARE_WRITE_LINE_MEMBER(blitter_ack_w);
@@ -358,4 +269,98 @@ public:
void yarunara_banked_map(address_map &map);
void yarunara_io_map(address_map &map);
void yarunara_mem_map(address_map &map);
+
+protected:
+ /* devices */
+ required_device<cpu_device> m_maincpu;
+ optional_device<cpu_device> m_soundcpu;
+ optional_device<okim6295_device> m_oki;
+ optional_device<msm5205_device> m_msm;
+ optional_device<screen_device> m_screen;
+ required_device<palette_device> m_palette;
+ optional_device<address_map_bank_device> m_bankdev;
+ optional_device<ls259_device> m_mainlatch;
+ optional_device<rst_pos_buffer_device> m_mainirq;
+ optional_device<rst_pos_buffer_device> m_soundirq;
+ optional_device<generic_latch_8_device> m_soundlatch;
+ optional_region_ptr<uint8_t> m_gfx_region1;
+ optional_region_ptr<uint8_t> m_gfx_region2;
+ optional_region_ptr<uint8_t> m_gfx_region3;
+ optional_region_ptr<uint8_t> m_gfx_region4;
+ optional_region_ptr<uint8_t> m_gfx_region5;
+ optional_region_ptr<uint8_t> m_gfx_region6;
+ optional_region_ptr<uint8_t> m_gfx_region7;
+ optional_region_ptr<uint8_t> m_gfx_region8;
+ output_finder<> m_led;
+
+ memory_region * m_gfxregions[8];
+
+ // up to 8 layers, 2 images per layer (interleaved on screen)
+ std::unique_ptr<uint8_t[]> m_pixmap[8][2];
+
+ /* irq */
+ irq_func m_update_irq_func;
+ bool m_blitter_irq;
+ bool m_blitter_irq_mask;
+ bool m_blitter2_irq;
+ bool m_blitter2_irq_mask;
+
+ /* blitters */
+ int m_blit_scroll_x;
+ int m_blit2_scroll_x;
+ int m_blit_scroll_y;
+ int m_blit2_scroll_y;
+ int m_blit_wrap_enable;
+ int m_blit2_wrap_enable;
+ int m_blit_x;
+ int m_blit_y;
+ int m_blit2_x;
+ int m_blit2_y;
+ int m_blit_src;
+ int m_blit2_src;
+ int m_blit_romregion;
+ int m_blit2_romregion;
+ int m_blit_dest;
+ int m_blit2_dest;
+ int m_blit_pen;
+ int m_blit2_pen;
+ int m_blit_palbank;
+ int m_blit2_palbank;
+ int m_blit_palettes;
+ int m_blit2_palettes;
+ int m_layer_enable;
+ int m_blit_backpen;
+
+ int m_hanamai_layer_half;
+ int m_hnoridur_layer_half2;
+
+ int m_extra_scroll_x;
+ int m_extra_scroll_y;
+ int m_flipscreen;
+
+ int m_layer_layout;
+
+ const int *m_priority_table;
+ int m_hanamai_priority;
+
+ /* input */
+ uint8_t m_input_sel;
+ uint8_t m_dsw_sel;
+ uint8_t m_keyb;
+ uint8_t m_coins;
+ uint8_t m_hopper;
+
+ /* misc */
+ uint8_t m_palette_ram[16*256*2];
+ int m_palbank;
+ int m_msm5205next;
+ int m_resetkludge;
+ int m_toggle;
+ int m_toggle_cpu1;
+ int m_rombank;
+ uint8_t m_tenkai_p5_val;
+ int m_tenkai_6c;
+ int m_tenkai_70;
+ uint8_t m_gekisha_val[2];
+
};
diff --git a/src/mame/includes/elf.h b/src/mame/includes/elf.h
index 7d0f089651e..b1879a5d006 100644
--- a/src/mame/includes/elf.h
+++ b/src/mame/includes/elf.h
@@ -36,20 +36,9 @@ public:
, m_ram(*this, RAM_TAG)
, m_special(*this, "SPECIAL")
, m_7segs(*this, "digit%u", 0U)
+ , m_led(*this, "led0")
{ }
- required_device<cpu_device> m_maincpu;
- required_device<cdp1861_device> m_vdc;
- required_device<mm74c922_device> m_kb;
- required_device<dm9368_device> m_led_l;
- required_device<dm9368_device> m_led_h;
- required_device<cassette_image_device> m_cassette;
- required_device<ram_device> m_ram;
- required_ioport m_special;
- output_finder<2> m_7segs;
-
- virtual void machine_start() override;
-
DECLARE_READ8_MEMBER( dispon_r );
DECLARE_READ8_MEMBER( data_r );
DECLARE_WRITE8_MEMBER( data_w );
@@ -65,11 +54,26 @@ public:
template <unsigned N> DECLARE_WRITE8_MEMBER( digit_w ) { m_7segs[N] = data; }
DECLARE_QUICKLOAD_LOAD_MEMBER( elf );
- // display state
- uint8_t m_data;
void elf2(machine_config &config);
void elf2_io(address_map &map);
void elf2_mem(address_map &map);
+
+protected:
+ virtual void machine_start() override;
+
+ required_device<cpu_device> m_maincpu;
+ required_device<cdp1861_device> m_vdc;
+ required_device<mm74c922_device> m_kb;
+ required_device<dm9368_device> m_led_l;
+ required_device<dm9368_device> m_led_h;
+ required_device<cassette_image_device> m_cassette;
+ required_device<ram_device> m_ram;
+ required_ioport m_special;
+ output_finder<2> m_7segs;
+ output_finder<> m_led;
+
+ // display state
+ uint8_t m_data;
};
#endif
diff --git a/src/mame/includes/eolith.h b/src/mame/includes/eolith.h
index 616a5da4f4d..74161a7f567 100644
--- a/src/mame/includes/eolith.h
+++ b/src/mame/includes/eolith.h
@@ -20,6 +20,7 @@ public:
, m_in0(*this, "IN0")
, m_penxport(*this, "PEN_X_P%u", 1)
, m_penyport(*this, "PEN_Y_P%u", 1)
+ , m_led(*this, "led0")
, m_sndbank(*this, "sound_bank")
{
}
@@ -60,6 +61,7 @@ public:
void sound_io_map(address_map &map);
void sound_prg_map(address_map &map);
protected:
+ virtual void machine_start() override;
// shared with eolith16.cpp, vegaeo.cpp
optional_ioport m_eepromoutport;
@@ -77,6 +79,7 @@ private:
optional_ioport m_in0; // klondkp doesn't have it
optional_ioport_array<2> m_penxport;
optional_ioport_array<2> m_penyport;
+ output_finder<> m_led;
optional_memory_bank m_sndbank;
diff --git a/src/mame/includes/epos.h b/src/mame/includes/epos.h
index df5ce02a6a9..f2a5e1ee623 100644
--- a/src/mame/includes/epos.h
+++ b/src/mame/includes/epos.h
@@ -9,25 +9,15 @@
class epos_state : public driver_device
{
public:
- epos_state(const machine_config &mconfig, device_type type, const char *tag)
- : driver_device(mconfig, type, tag),
+ epos_state(const machine_config &mconfig, device_type type, const char *tag) :
+ driver_device(mconfig, type, tag),
m_videoram(*this, "videoram"),
m_inputs(*this, { "INPUTS", "INPUTS2" }),
m_maincpu(*this, "maincpu"),
- m_palette(*this, "palette")
+ m_palette(*this, "palette"),
+ m_led(*this, "led%u", 0U)
{ }
- /* memory pointers */
- required_shared_ptr<uint8_t> m_videoram;
- optional_ioport_array<2> m_inputs;
-
- /* video-related */
- uint8_t m_palette_bank;
-
- /* misc */
- int m_counter;
- int m_input_multiplex;
- bool m_ay_porta_multiplex;
DECLARE_WRITE8_MEMBER(dealer_decrypt_rom);
DECLARE_WRITE8_MEMBER(port_1_w);
DECLARE_READ8_MEMBER(i8255_porta_r);
@@ -42,12 +32,28 @@ public:
DECLARE_PALETTE_INIT(epos);
uint32_t screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect);
void set_pal_color( uint8_t offset, uint8_t data );
- required_device<cpu_device> m_maincpu;
- required_device<palette_device> m_palette;
void epos(machine_config &config);
void dealer(machine_config &config);
void dealer_io_map(address_map &map);
void dealer_map(address_map &map);
void epos_io_map(address_map &map);
void epos_map(address_map &map);
+
+protected:
+ virtual void machine_start() override { m_led.resolve(); }
+
+ /* memory pointers */
+ required_shared_ptr<uint8_t> m_videoram;
+ optional_ioport_array<2> m_inputs;
+
+ /* video-related */
+ uint8_t m_palette_bank;
+
+ /* misc */
+ int m_counter;
+ int m_input_multiplex;
+ bool m_ay_porta_multiplex;
+ required_device<cpu_device> m_maincpu;
+ required_device<palette_device> m_palette;
+ output_finder<2> m_led;
};
diff --git a/src/mame/includes/eti660.h b/src/mame/includes/eti660.h
index b0d68695ac2..cf0eb5f78b3 100644
--- a/src/mame/includes/eti660.h
+++ b/src/mame/includes/eti660.h
@@ -36,6 +36,7 @@ public:
, m_cassette(*this, "cassette")
, m_io_keyboard(*this, "KEY.%u", 0)
, m_special(*this, "SPECIAL")
+ , m_led(*this, "led%u", 0U)
{ }
DECLARE_READ8_MEMBER( pia_r );
@@ -64,6 +65,7 @@ private:
required_device<cassette_image_device> m_cassette;
required_ioport_array<4> m_io_keyboard;
required_ioport m_special;
+ output_finder<2> m_led;
virtual void machine_start() override;
virtual void machine_reset() override;
diff --git a/src/mame/includes/firetrk.h b/src/mame/includes/firetrk.h
index b5e533cef40..fa8c3aa638f 100644
--- a/src/mame/includes/firetrk.h
+++ b/src/mame/includes/firetrk.h
@@ -39,67 +39,30 @@ class firetrk_state : public driver_device
{
public:
firetrk_state(const machine_config &mconfig, device_type type, const char *tag)
- : driver_device(mconfig, type, tag),
- m_maincpu(*this, "maincpu"),
- m_watchdog(*this, "watchdog"),
- m_discrete(*this, "discrete"),
- m_alpha_num_ram(*this, "alpha_num_ram"),
- m_playfield_ram(*this, "playfield_ram"),
- m_scroll_y(*this, "scroll_y"),
- m_scroll_x(*this, "scroll_x"),
- m_car_rot(*this, "car_rot"),
- m_blink(*this, "blink"),
- m_drone_x(*this, "drone_x"),
- m_drone_y(*this, "drone_y"),
- m_drone_rot(*this, "drone_rot"),
- m_gfxdecode(*this, "gfxdecode"),
- m_screen(*this, "screen"),
- m_palette(*this, "palette"),
- m_bit_0(*this, "BIT_0"),
- m_bit_6(*this, "BIT_6"),
- m_bit_7(*this, "BIT_7"),
- m_dips(*this, {"DIP_0", "DIP_1"}),
- m_steer(*this, {"STEER_1", "STEER_2"})
+ : driver_device(mconfig, type, tag)
+ , m_maincpu(*this, "maincpu")
+ , m_watchdog(*this, "watchdog")
+ , m_discrete(*this, "discrete")
+ , m_alpha_num_ram(*this, "alpha_num_ram")
+ , m_playfield_ram(*this, "playfield_ram")
+ , m_scroll_y(*this, "scroll_y")
+ , m_scroll_x(*this, "scroll_x")
+ , m_car_rot(*this, "car_rot")
+ , m_blink(*this, "blink")
+ , m_drone_x(*this, "drone_x")
+ , m_drone_y(*this, "drone_y")
+ , m_drone_rot(*this, "drone_rot")
+ , m_gfxdecode(*this, "gfxdecode")
+ , m_screen(*this, "screen")
+ , m_palette(*this, "palette")
+ , m_bit_0(*this, "BIT_0")
+ , m_bit_6(*this, "BIT_6")
+ , m_bit_7(*this, "BIT_7")
+ , m_dips(*this, {"DIP_0", "DIP_1"})
+ , m_steer(*this, {"STEER_1", "STEER_2"})
+ , m_led(*this, "led%u", 0U)
{ }
- required_device<cpu_device> m_maincpu;
- required_device<watchdog_timer_device> m_watchdog;
- required_device<discrete_device> m_discrete;
- required_shared_ptr<uint8_t> m_alpha_num_ram;
- required_shared_ptr<uint8_t> m_playfield_ram;
- required_shared_ptr<uint8_t> m_scroll_y;
- required_shared_ptr<uint8_t> m_scroll_x;
- required_shared_ptr<uint8_t> m_car_rot;
- optional_shared_ptr<uint8_t> m_blink;
- optional_shared_ptr<uint8_t> m_drone_x;
- optional_shared_ptr<uint8_t> m_drone_y;
- optional_shared_ptr<uint8_t> m_drone_rot;
- required_device<gfxdecode_device> m_gfxdecode;
- required_device<screen_device> m_screen;
- required_device<palette_device> m_palette;
-
- optional_ioport m_bit_0;
- optional_ioport m_bit_6;
- optional_ioport m_bit_7;
- required_ioport_array<2> m_dips;
- optional_ioport_array<2> m_steer;
-
- uint8_t m_in_service_mode;
- uint32_t m_dial[2];
- uint8_t m_steer_dir[2];
- uint8_t m_steer_flag[2];
- uint8_t m_gear;
-
- uint8_t m_flash;
- uint8_t m_crash[2];
- uint8_t m_skid[2];
- bitmap_ind16 m_helper1;
- bitmap_ind16 m_helper2;
- uint32_t m_color1_mask;
- uint32_t m_color2_mask;
- tilemap_t *m_tilemap1;
- tilemap_t *m_tilemap2;
-
DECLARE_WRITE8_MEMBER(firetrk_output_w);
DECLARE_WRITE8_MEMBER(superbug_output_w);
DECLARE_WRITE8_MEMBER(montecar_output_1_w);
@@ -127,8 +90,6 @@ public:
TILE_GET_INFO_MEMBER(firetrk_get_tile_info2);
TILE_GET_INFO_MEMBER(superbug_get_tile_info2);
TILE_GET_INFO_MEMBER(montecar_get_tile_info2);
- virtual void machine_reset() override;
- virtual void video_start() override;
DECLARE_PALETTE_INIT(firetrk);
DECLARE_VIDEO_START(superbug);
DECLARE_VIDEO_START(montecar);
@@ -157,6 +118,50 @@ public:
void firetrk_map(address_map &map);
void montecar_map(address_map &map);
void superbug_map(address_map &map);
+
+protected:
+ virtual void machine_start() override { m_led.resolve(); }
+ virtual void machine_reset() override;
+ virtual void video_start() override;
+
+ required_device<cpu_device> m_maincpu;
+ required_device<watchdog_timer_device> m_watchdog;
+ required_device<discrete_device> m_discrete;
+ required_shared_ptr<uint8_t> m_alpha_num_ram;
+ required_shared_ptr<uint8_t> m_playfield_ram;
+ required_shared_ptr<uint8_t> m_scroll_y;
+ required_shared_ptr<uint8_t> m_scroll_x;
+ required_shared_ptr<uint8_t> m_car_rot;
+ optional_shared_ptr<uint8_t> m_blink;
+ optional_shared_ptr<uint8_t> m_drone_x;
+ optional_shared_ptr<uint8_t> m_drone_y;
+ optional_shared_ptr<uint8_t> m_drone_rot;
+ required_device<gfxdecode_device> m_gfxdecode;
+ required_device<screen_device> m_screen;
+ required_device<palette_device> m_palette;
+
+ optional_ioport m_bit_0;
+ optional_ioport m_bit_6;
+ optional_ioport m_bit_7;
+ required_ioport_array<2> m_dips;
+ optional_ioport_array<2> m_steer;
+ output_finder<4> m_led;
+
+ uint8_t m_in_service_mode;
+ uint32_t m_dial[2];
+ uint8_t m_steer_dir[2];
+ uint8_t m_steer_flag[2];
+ uint8_t m_gear;
+
+ uint8_t m_flash;
+ uint8_t m_crash[2];
+ uint8_t m_skid[2];
+ bitmap_ind16 m_helper1;
+ bitmap_ind16 m_helper2;
+ uint32_t m_color1_mask;
+ uint32_t m_color2_mask;
+ tilemap_t *m_tilemap1;
+ tilemap_t *m_tilemap2;
};
diff --git a/src/mame/includes/foodf.h b/src/mame/includes/foodf.h
index a143498f1f5..6aadfca6f27 100644
--- a/src/mame/includes/foodf.h
+++ b/src/mame/includes/foodf.h
@@ -21,7 +21,8 @@ public:
atarigen_state(mconfig, type, tag),
m_nvram(*this, "nvram"),
m_playfield_tilemap(*this, "playfield"),
- m_spriteram(*this, "spriteram")
+ m_spriteram(*this, "spriteram"),
+ m_led(*this, "led%u", 0U)
{ }
void foodf(machine_config &config);
@@ -52,6 +53,7 @@ private:
uint8_t m_playfield_flip;
required_shared_ptr<uint16_t> m_spriteram;
+ output_finder<2> m_led;
};
#endif // MAME_INCLUDES_FOODF_H
diff --git a/src/mame/includes/funworld.h b/src/mame/includes/funworld.h
index 0c39ac93bdd..7bc574e8422 100644
--- a/src/mame/includes/funworld.h
+++ b/src/mame/includes/funworld.h
@@ -3,17 +3,16 @@
class funworld_state : public driver_device
{
public:
- funworld_state(const machine_config &mconfig, device_type type, const char *tag)
- : driver_device(mconfig, type, tag),
+ funworld_state(const machine_config &mconfig, device_type type, const char *tag) :
+ driver_device(mconfig, type, tag),
m_videoram(*this, "videoram"),
m_colorram(*this, "colorram"),
m_maincpu(*this, "maincpu"),
m_gfxdecode(*this, "gfxdecode"),
- m_palette(*this, "palette") { }
+ m_palette(*this, "palette"),
+ m_lamp(*this, "lamp%u", 0U)
+ { }
- required_shared_ptr<uint8_t> m_videoram;
- required_shared_ptr<uint8_t> m_colorram;
- tilemap_t *m_bg_tilemap;
DECLARE_READ8_MEMBER(questions_r);
DECLARE_WRITE8_MEMBER(question_bank_w);
DECLARE_WRITE8_MEMBER(funworld_videoram_w);
@@ -44,9 +43,6 @@ public:
DECLARE_MACHINE_START(lunapark);
DECLARE_MACHINE_RESET(lunapark);
uint32_t screen_update_funworld(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
- required_device<cpu_device> m_maincpu;
- required_device<gfxdecode_device> m_gfxdecode;
- required_device<palette_device> m_palette;
void royalcd1(machine_config &config);
void royalcd2(machine_config &config);
void fw1stpal(machine_config &config);
@@ -71,4 +67,15 @@ public:
void magicrd2_map(address_map &map);
void saloon_map(address_map &map);
void witchryl_map(address_map &map);
+
+protected:
+ virtual void machine_start() override { m_lamp.resolve(); }
+
+ required_shared_ptr<uint8_t> m_videoram;
+ required_shared_ptr<uint8_t> m_colorram;
+ tilemap_t *m_bg_tilemap;
+ required_device<cpu_device> m_maincpu;
+ required_device<gfxdecode_device> m_gfxdecode;
+ required_device<palette_device> m_palette;
+ output_finder<8> m_lamp;
};
diff --git a/src/mame/includes/galaga.h b/src/mame/includes/galaga.h
index f26e6602349..e0fdfed6046 100644
--- a/src/mame/includes/galaga.h
+++ b/src/mame/includes/galaga.h
@@ -15,19 +15,56 @@ class galaga_state : public driver_device
{
public:
galaga_state(const machine_config &mconfig, device_type type, const char *tag)
- : driver_device(mconfig, type, tag),
- m_videoram(*this, "videoram"),
- m_galaga_ram1(*this, "galaga_ram1"),
- m_galaga_ram2(*this, "galaga_ram2"),
- m_galaga_ram3(*this, "galaga_ram3"),
- m_videolatch(*this, "videolatch"),
- m_maincpu(*this, "maincpu"),
- m_subcpu(*this, "sub"),
- m_subcpu2(*this, "sub2"),
- m_namco_sound(*this, "namco"),
- m_gfxdecode(*this, "gfxdecode"),
- m_screen(*this, "screen"),
- m_palette(*this, "palette") { }
+ : driver_device(mconfig, type, tag)
+ , m_videoram(*this, "videoram")
+ , m_galaga_ram1(*this, "galaga_ram1")
+ , m_galaga_ram2(*this, "galaga_ram2")
+ , m_galaga_ram3(*this, "galaga_ram3")
+ , m_videolatch(*this, "videolatch")
+ , m_maincpu(*this, "maincpu")
+ , m_subcpu(*this, "sub")
+ , m_subcpu2(*this, "sub2")
+ , m_namco_sound(*this, "namco")
+ , m_gfxdecode(*this, "gfxdecode")
+ , m_screen(*this, "screen")
+ , m_palette(*this, "palette")
+ , m_led(*this, "led%u", 0U)
+ { }
+
+ DECLARE_READ8_MEMBER(bosco_dsw_r);
+ DECLARE_WRITE_LINE_MEMBER(flip_screen_w);
+ DECLARE_WRITE_LINE_MEMBER(irq1_clear_w);
+ DECLARE_WRITE_LINE_MEMBER(irq2_clear_w);
+ DECLARE_WRITE_LINE_MEMBER(nmion_w);
+ DECLARE_WRITE8_MEMBER(galaga_videoram_w);
+ DECLARE_WRITE_LINE_MEMBER(gatsbee_bank_w);
+ DECLARE_WRITE8_MEMBER(out_0);
+ DECLARE_WRITE8_MEMBER(out_1);
+ DECLARE_READ8_MEMBER(namco_52xx_rom_r);
+ DECLARE_READ8_MEMBER(namco_52xx_si_r);
+ void init_galaga();
+ void init_gatsbee();
+ TILEMAP_MAPPER_MEMBER(tilemap_scan);
+ TILE_GET_INFO_MEMBER(get_tile_info);
+ DECLARE_VIDEO_START(galaga);
+ DECLARE_PALETTE_INIT(galaga);
+ uint32_t screen_update_galaga(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
+ DECLARE_WRITE_LINE_MEMBER(screen_vblank_galaga);
+ DECLARE_WRITE_LINE_MEMBER(vblank_irq);
+ TIMER_CALLBACK_MEMBER(cpu3_interrupt_callback);
+ void draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect );
+ void draw_stars(bitmap_ind16 &bitmap, const rectangle &cliprect );
+ void galaga(machine_config &config);
+ void gatsbee(machine_config &config);
+ void galagab(machine_config &config);
+ void dzigzag_mem4(address_map &map);
+ void galaga_map(address_map &map);
+ void galaga_mem4(address_map &map);
+ void gatsbee_main_map(address_map &map);
+
+protected:
+ virtual void machine_start() override;
+ virtual void machine_reset() override;
/* memory pointers */
optional_shared_ptr<uint8_t> m_videoram;
@@ -42,6 +79,7 @@ public:
required_device<gfxdecode_device> m_gfxdecode;
required_device<screen_device> m_screen;
required_device<palette_device> m_palette;
+ output_finder<2> m_led;
emu_timer *m_cpu3_interrupt_timer;
/* machine state */
@@ -61,31 +99,7 @@ public:
uint8_t m_main_irq_mask;
uint8_t m_sub_irq_mask;
uint8_t m_sub2_nmi_mask;
- DECLARE_READ8_MEMBER(bosco_dsw_r);
- DECLARE_WRITE_LINE_MEMBER(flip_screen_w);
- DECLARE_WRITE_LINE_MEMBER(irq1_clear_w);
- DECLARE_WRITE_LINE_MEMBER(irq2_clear_w);
- DECLARE_WRITE_LINE_MEMBER(nmion_w);
- DECLARE_WRITE8_MEMBER(galaga_videoram_w);
- DECLARE_WRITE_LINE_MEMBER(gatsbee_bank_w);
- DECLARE_WRITE8_MEMBER(out_0);
- DECLARE_WRITE8_MEMBER(out_1);
- DECLARE_READ8_MEMBER(namco_52xx_rom_r);
- DECLARE_READ8_MEMBER(namco_52xx_si_r);
- void init_galaga();
- void init_gatsbee();
- TILEMAP_MAPPER_MEMBER(tilemap_scan);
- TILE_GET_INFO_MEMBER(get_tile_info);
- DECLARE_MACHINE_START(galaga);
- DECLARE_MACHINE_RESET(galaga);
- DECLARE_VIDEO_START(galaga);
- DECLARE_PALETTE_INIT(galaga);
- uint32_t screen_update_galaga(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
- DECLARE_WRITE_LINE_MEMBER(screen_vblank_galaga);
- DECLARE_WRITE_LINE_MEMBER(vblank_irq);
- TIMER_CALLBACK_MEMBER(cpu3_interrupt_callback);
- void draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect );
- void draw_stars(bitmap_ind16 &bitmap, const rectangle &cliprect );
+
struct star
{
uint16_t x,y;
@@ -93,13 +107,7 @@ public:
};
static struct star m_star_seed_tab[];
- void galaga(machine_config &config);
- void gatsbee(machine_config &config);
- void galagab(machine_config &config);
- void dzigzag_mem4(address_map &map);
- void galaga_map(address_map &map);
- void galaga_mem4(address_map &map);
- void gatsbee_main_map(address_map &map);
+
};
DISCRETE_SOUND_EXTERN( galaga_discrete );
diff --git a/src/mame/includes/galaxian.h b/src/mame/includes/galaxian.h
index adf89b226f9..c3f7f3ca56c 100644
--- a/src/mame/includes/galaxian.h
+++ b/src/mame/includes/galaxian.h
@@ -40,65 +40,26 @@ class galaxian_state : public driver_device
{
public:
galaxian_state(const machine_config &mconfig, device_type type, const char *tag)
- : driver_device(mconfig, type, tag),
- m_maincpu(*this, "maincpu"),
- m_audiocpu(*this, "audiocpu"),
- m_audio2(*this, "audio2"),
- m_dac(*this, "dac"),
- m_ay8910(*this, "8910.%u", 0),
- m_ay8910_cclimber(*this, "cclimber_audio:aysnd"),
- m_digitalker(*this, "digitalker"),
- m_ppi8255(*this, "ppi8255_%u", 0),
- m_gfxdecode(*this, "gfxdecode"),
- m_screen(*this, "screen"),
- m_palette(*this, "palette"),
- m_soundlatch(*this, "soundlatch"),
- m_fake_select(*this, "FAKE_SELECT"),
- m_tenspot_game_dsw(*this, {"IN2_GAME0", "IN2_GAME1", "IN2_GAME2", "IN2_GAME3", "IN2_GAME4", "IN2_GAME5", "IN2_GAME6", "IN2_GAME7", "IN2_GAME8", "IN2_GAME9"}),
- m_spriteram(*this, "spriteram"),
- m_videoram(*this, "videoram"),
- m_decrypted_opcodes(*this, "decrypted_opcodes") { }
-
- required_device<cpu_device> m_maincpu;
- optional_device<cpu_device> m_audiocpu;
- optional_device<cpu_device> m_audio2;
- optional_device<dac_byte_interface> m_dac;
- optional_device_array<ay8910_device, 3> m_ay8910;
- optional_device<ay8910_device> m_ay8910_cclimber;
- optional_device<digitalker_device> m_digitalker;
- optional_device_array<i8255_device, 3> m_ppi8255;
- required_device<gfxdecode_device> m_gfxdecode;
- required_device<screen_device> m_screen;
- required_device<palette_device> m_palette;
- optional_device<generic_latch_8_device> m_soundlatch;
-
- optional_ioport m_fake_select;
- optional_ioport_array<10> m_tenspot_game_dsw;
-
- required_shared_ptr<uint8_t> m_spriteram;
- required_shared_ptr<uint8_t> m_videoram;
- optional_shared_ptr<uint8_t> m_decrypted_opcodes;
-
- int m_bullets_base;
- int m_sprites_base;
- int m_numspritegens;
- int m_counter_74ls161[2];
- int m_direction[2];
- uint8_t m_gmgalax_selected_game;
- uint8_t m_zigzag_ay8910_latch;
- uint8_t m_kingball_speech_dip;
- uint8_t m_kingball_sound;
- uint8_t m_mshuttle_ay8910_cs;
- uint16_t m_protection_state;
- uint8_t m_protection_result;
- uint8_t m_konami_sound_control;
- uint8_t m_sfx_sample_control;
- uint8_t m_moonwar_port_select;
- uint8_t m_irq_enabled;
- int m_irq_line;
- int m_tenspot_current_game;
- uint8_t m_frogger_adjust;
- uint8_t m_sfx_tilemap;
+ : driver_device(mconfig, type, tag)
+ , m_maincpu(*this, "maincpu")
+ , m_audiocpu(*this, "audiocpu")
+ , m_audio2(*this, "audio2")
+ , m_dac(*this, "dac")
+ , m_ay8910(*this, "8910.%u", 0)
+ , m_ay8910_cclimber(*this, "cclimber_audio:aysnd")
+ , m_digitalker(*this, "digitalker")
+ , m_ppi8255(*this, "ppi8255_%u", 0)
+ , m_gfxdecode(*this, "gfxdecode")
+ , m_screen(*this, "screen")
+ , m_palette(*this, "palette")
+ , m_soundlatch(*this, "soundlatch")
+ , m_fake_select(*this, "FAKE_SELECT")
+ , m_tenspot_game_dsw(*this, {"IN2_GAME0", "IN2_GAME1", "IN2_GAME2", "IN2_GAME3", "IN2_GAME4", "IN2_GAME5", "IN2_GAME6", "IN2_GAME7", "IN2_GAME8", "IN2_GAME9"})
+ , m_spriteram(*this, "spriteram")
+ , m_videoram(*this, "videoram")
+ , m_decrypted_opcodes(*this, "decrypted_opcodes")
+ , m_lamp(*this, "lamp%u", 0U)
+ { }
/* video extension callbacks */
typedef void (galaxian_state::*galaxian_extend_tile_info_func)(uint16_t *code, uint8_t *color, uint8_t attrib, uint8_t x);
@@ -106,26 +67,6 @@ public:
typedef void (galaxian_state::*galaxian_draw_bullet_func)(bitmap_rgb32 &bitmap, const rectangle &cliprect, int offs, int x, int y);
typedef void (galaxian_state::*galaxian_draw_background_func)(bitmap_rgb32 &bitmap, const rectangle &cliprect);
- galaxian_extend_tile_info_func m_extend_tile_info_ptr;
- galaxian_extend_sprite_info_func m_extend_sprite_info_ptr;
- galaxian_draw_bullet_func m_draw_bullet_ptr;
- galaxian_draw_background_func m_draw_background_ptr;
-
- tilemap_t *m_bg_tilemap;
- uint8_t m_flipscreen_x;
- uint8_t m_flipscreen_y;
- uint8_t m_background_enable;
- uint8_t m_background_red;
- uint8_t m_background_green;
- uint8_t m_background_blue;
- uint32_t m_star_rng_origin;
- uint32_t m_star_rng_origin_frame;
- rgb_t m_star_color[64];
- std::unique_ptr<uint8_t[]> m_stars;
- uint8_t m_stars_enabled;
- uint8_t m_stars_blink_state;
- rgb_t m_bullet_color[8];
- uint8_t m_gfxbank[5];
DECLARE_WRITE8_MEMBER(galaxian_videoram_w);
DECLARE_WRITE8_MEMBER(galaxian_objram_w);
DECLARE_WRITE8_MEMBER(galaxian_flip_screen_x_w);
@@ -269,7 +210,6 @@ public:
void init_victoryc();
void init_victorycb();
TILE_GET_INFO_MEMBER(bg_get_tile_info);
- virtual void video_start() override;
DECLARE_PALETTE_INIT(galaxian);
DECLARE_PALETTE_INIT(moonwar);
void tenspot_set_game_bank(int bank, int from_game);
@@ -422,4 +362,71 @@ public:
void turpins_sound_map(address_map &map);
void turtles_map(address_map &map);
void zigzag_map(address_map &map);
+
+protected:
+ virtual void machine_start() override { m_lamp.resolve(); }
+ virtual void video_start() override;
+
+ required_device<cpu_device> m_maincpu;
+ optional_device<cpu_device> m_audiocpu;
+ optional_device<cpu_device> m_audio2;
+ optional_device<dac_byte_interface> m_dac;
+ optional_device_array<ay8910_device, 3> m_ay8910;
+ optional_device<ay8910_device> m_ay8910_cclimber;
+ optional_device<digitalker_device> m_digitalker;
+ optional_device_array<i8255_device, 3> m_ppi8255;
+ required_device<gfxdecode_device> m_gfxdecode;
+ required_device<screen_device> m_screen;
+ required_device<palette_device> m_palette;
+ optional_device<generic_latch_8_device> m_soundlatch;
+
+ optional_ioport m_fake_select;
+ optional_ioport_array<10> m_tenspot_game_dsw;
+
+ required_shared_ptr<uint8_t> m_spriteram;
+ required_shared_ptr<uint8_t> m_videoram;
+ optional_shared_ptr<uint8_t> m_decrypted_opcodes;
+ output_finder<2> m_lamp;
+
+ int m_bullets_base;
+ int m_sprites_base;
+ int m_numspritegens;
+ int m_counter_74ls161[2];
+ int m_direction[2];
+ uint8_t m_gmgalax_selected_game;
+ uint8_t m_zigzag_ay8910_latch;
+ uint8_t m_kingball_speech_dip;
+ uint8_t m_kingball_sound;
+ uint8_t m_mshuttle_ay8910_cs;
+ uint16_t m_protection_state;
+ uint8_t m_protection_result;
+ uint8_t m_konami_sound_control;
+ uint8_t m_sfx_sample_control;
+ uint8_t m_moonwar_port_select;
+ uint8_t m_irq_enabled;
+ int m_irq_line;
+ int m_tenspot_current_game;
+ uint8_t m_frogger_adjust;
+ uint8_t m_sfx_tilemap;
+
+ galaxian_extend_tile_info_func m_extend_tile_info_ptr;
+ galaxian_extend_sprite_info_func m_extend_sprite_info_ptr;
+ galaxian_draw_bullet_func m_draw_bullet_ptr;
+ galaxian_draw_background_func m_draw_background_ptr;
+
+ tilemap_t *m_bg_tilemap;
+ uint8_t m_flipscreen_x;
+ uint8_t m_flipscreen_y;
+ uint8_t m_background_enable;
+ uint8_t m_background_red;
+ uint8_t m_background_green;
+ uint8_t m_background_blue;
+ uint32_t m_star_rng_origin;
+ uint32_t m_star_rng_origin_frame;
+ rgb_t m_star_color[64];
+ std::unique_ptr<uint8_t[]> m_stars;
+ uint8_t m_stars_enabled;
+ uint8_t m_stars_blink_state;
+ rgb_t m_bullet_color[8];
+ uint8_t m_gfxbank[5];
};
diff --git a/src/mame/includes/galaxold.h b/src/mame/includes/galaxold.h
index 754a70921cc..fb70548a0e5 100644
--- a/src/mame/includes/galaxold.h
+++ b/src/mame/includes/galaxold.h
@@ -30,24 +30,24 @@ class galaxold_state : public driver_device
{
public:
galaxold_state(const machine_config &mconfig, device_type type, const char *tag)
- : driver_device(mconfig, type, tag),
- m_maincpu(*this, "maincpu"),
- m_audiocpu(*this, "audiocpu"),
- m_7474_9m_1(*this, "7474_9m_1"),
- m_7474_9m_2(*this, "7474_9m_2"),
- m_gfxdecode(*this, "gfxdecode"),
- m_screen(*this, "screen"),
- m_palette(*this, "palette"),
- m_videoram(*this,"videoram"),
- m_spriteram(*this,"spriteram"),
- m_spriteram2(*this,"spriteram2"),
- m_attributesram(*this,"attributesram"),
- m_bulletsram(*this,"bulletsram"),
- m_rockclim_videoram(*this,"rockclim_vram"),
- m_racknrol_tiles_bank(*this,"racknrol_tbank"),
- m_leftclip(2)
- {
- }
+ : driver_device(mconfig, type, tag)
+ , m_maincpu(*this, "maincpu")
+ , m_audiocpu(*this, "audiocpu")
+ , m_7474_9m_1(*this, "7474_9m_1")
+ , m_7474_9m_2(*this, "7474_9m_2")
+ , m_gfxdecode(*this, "gfxdecode")
+ , m_screen(*this, "screen")
+ , m_palette(*this, "palette")
+ , m_videoram(*this,"videoram")
+ , m_spriteram(*this,"spriteram")
+ , m_spriteram2(*this,"spriteram2")
+ , m_attributesram(*this,"attributesram")
+ , m_bulletsram(*this,"bulletsram")
+ , m_rockclim_videoram(*this,"rockclim_vram")
+ , m_racknrol_tiles_bank(*this,"racknrol_tbank")
+ , m_led(*this, "led%u", 0U)
+ , m_leftclip(2)
+ { }
/* devices */
required_device<cpu_device> m_maincpu;
@@ -66,6 +66,7 @@ public:
optional_shared_ptr<uint8_t> m_bulletsram;
optional_shared_ptr<uint8_t> m_rockclim_videoram;
optional_shared_ptr<uint8_t> m_racknrol_tiles_bank;
+ output_finder<2> m_led;
int m_irq_line;
uint8_t m__4in1_bank;
@@ -323,6 +324,9 @@ public:
void scrambler_map(address_map &map);
void spcwarp(address_map &map);
void tazzmang(address_map &map);
+
+protected:
+ virtual void machine_start() override { m_led.resolve(); }
};
#define galaxold_coin_counter_0_w galaxold_coin_counter_w
diff --git a/src/mame/includes/gaplus.h b/src/mame/includes/gaplus.h
index c45f4c9efd0..8c36493ff90 100644
--- a/src/mame/includes/gaplus.h
+++ b/src/mame/includes/gaplus.h
@@ -30,45 +30,20 @@ public:
};
gaplus_state(const machine_config &mconfig, device_type type, const char *tag)
- : driver_device(mconfig, type, tag),
- m_maincpu(*this, "maincpu"),
- m_subcpu(*this, "sub"),
- m_subcpu2(*this, "sub2"),
- m_namco_15xx(*this, "namco"),
- m_samples(*this, "samples") ,
- m_gfxdecode(*this, "gfxdecode"),
- m_screen(*this, "screen"),
- m_palette(*this, "palette"),
- m_customio_3(*this,"customio_3"),
- m_videoram(*this,"videoram"),
- m_spriteram(*this,"spriteram") { }
-
- required_device<cpu_device> m_maincpu;
- required_device<cpu_device> m_subcpu;
- required_device<cpu_device> m_subcpu2;
- required_device<namco_15xx_device> m_namco_15xx;
- required_device<samples_device> m_samples;
- required_device<gfxdecode_device> m_gfxdecode;
- required_device<screen_device> m_screen;
- required_device<palette_device> m_palette;
- namco58xx_device *m_namco58xx;
- namco56xx_device *m_namco56xx;
-
- required_shared_ptr<uint8_t> m_customio_3;
- required_shared_ptr<uint8_t> m_videoram;
- required_shared_ptr<uint8_t> m_spriteram;
-
- int m_type;
-
- tilemap_t *m_bg_tilemap;
- uint8_t m_starfield_control[4];
- int m_total_stars;
- struct star m_stars[MAX_STARS];
- uint8_t m_main_irq_mask;
- uint8_t m_sub_irq_mask;
- uint8_t m_sub2_irq_mask;
- emu_timer *m_namcoio0_run_timer;
- emu_timer *m_namcoio1_run_timer;
+ : driver_device(mconfig, type, tag)
+ , m_maincpu(*this, "maincpu")
+ , m_subcpu(*this, "sub")
+ , m_subcpu2(*this, "sub2")
+ , m_namco_15xx(*this, "namco")
+ , m_samples(*this, "samples")
+ , m_gfxdecode(*this, "gfxdecode")
+ , m_screen(*this, "screen")
+ , m_palette(*this, "palette")
+ , m_customio_3(*this,"customio_3")
+ , m_videoram(*this,"videoram")
+ , m_spriteram(*this,"spriteram")
+ , m_lamp(*this, "lamp%u", 0U)
+ { }
DECLARE_WRITE8_MEMBER(irq_1_ctrl_w);
DECLARE_WRITE8_MEMBER(irq_2_ctrl_w);
@@ -85,9 +60,6 @@ public:
void init_gaplus();
void init_gaplusd();
void init_galaga3();
- virtual void machine_start() override;
- virtual void machine_reset() override;
- virtual void video_start() override;
DECLARE_PALETTE_INIT(gaplus);
TILEMAP_MAPPER_MEMBER(tilemap_scan);
@@ -112,4 +84,35 @@ public:
void cpu3_map(address_map &map);
protected:
virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) override;
+ virtual void machine_start() override;
+ virtual void machine_reset() override;
+ virtual void video_start() override;
+
+ required_device<cpu_device> m_maincpu;
+ required_device<cpu_device> m_subcpu;
+ required_device<cpu_device> m_subcpu2;
+ required_device<namco_15xx_device> m_namco_15xx;
+ required_device<samples_device> m_samples;
+ required_device<gfxdecode_device> m_gfxdecode;
+ required_device<screen_device> m_screen;
+ required_device<palette_device> m_palette;
+ namco58xx_device *m_namco58xx;
+ namco56xx_device *m_namco56xx;
+
+ required_shared_ptr<uint8_t> m_customio_3;
+ required_shared_ptr<uint8_t> m_videoram;
+ required_shared_ptr<uint8_t> m_spriteram;
+ output_finder<2> m_lamp;
+
+ int m_type;
+
+ tilemap_t *m_bg_tilemap;
+ uint8_t m_starfield_control[4];
+ int m_total_stars;
+ struct star m_stars[MAX_STARS];
+ uint8_t m_main_irq_mask;
+ uint8_t m_sub_irq_mask;
+ uint8_t m_sub2_irq_mask;
+ emu_timer *m_namcoio0_run_timer;
+ emu_timer *m_namcoio1_run_timer;
};
diff --git a/src/mame/includes/goldstar.h b/src/mame/includes/goldstar.h
index f7780fe120a..ef92e7e262a 100644
--- a/src/mame/includes/goldstar.h
+++ b/src/mame/includes/goldstar.h
@@ -22,9 +22,9 @@ public:
m_reel3_scroll(*this, "reel3_scroll"),
m_maincpu(*this, "maincpu"),
m_gfxdecode(*this, "gfxdecode"),
- m_palette(*this, "palette")
- {
- }
+ m_palette(*this, "palette"),
+ m_lamp(*this, "lamp%u", 0U)
+ { }
DECLARE_WRITE8_MEMBER(protection_w);
DECLARE_READ8_MEMBER(protection_r);
@@ -80,7 +80,9 @@ public:
void wcat3_map(address_map &map);
void wcherry_map(address_map &map);
void wcherry_readwriteport(address_map &map);
+
protected:
+ virtual void machine_start() override { m_lamp.resolve(); }
TILE_GET_INFO_MEMBER(get_goldstar_fg_tile_info);
TILE_GET_INFO_MEMBER(get_cherrym_fg_tile_info);
TILE_GET_INFO_MEMBER(get_goldstar_reel1_tile_info);
@@ -118,6 +120,7 @@ protected:
required_device<cpu_device> m_maincpu;
required_device<gfxdecode_device> m_gfxdecode;
required_device<palette_device> m_palette;
+ output_finder<16> m_lamp;
};
diff --git a/src/mame/includes/gottlieb.h b/src/mame/includes/gottlieb.h
index a7ca9e6128e..8f1fa1eac4a 100644
--- a/src/mame/includes/gottlieb.h
+++ b/src/mame/includes/gottlieb.h
@@ -37,66 +37,24 @@ public:
};
gottlieb_state(const machine_config &mconfig, device_type type, const char *tag)
- : driver_device(mconfig, type, tag),
- m_maincpu(*this, "maincpu"),
- m_laserdisc(*this, "laserdisc"),
- m_r1_sound(*this, "r1sound"),
- m_r2_sound(*this, "r2sound"),
- m_knocker_sample(*this, "knocker_sam"),
- m_videoram(*this, "videoram"),
- m_charram(*this, "charram"),
- m_spriteram(*this, "spriteram"),
- m_gfxdecode(*this, "gfxdecode"),
- m_screen(*this, "screen"),
- m_palette(*this, "palette"),
- m_generic_paletteram_8(*this, "paletteram"),
- m_track_x(*this, "TRACKX"),
- m_track_y(*this, "TRACKY")
+ : driver_device(mconfig, type, tag)
+ , m_maincpu(*this, "maincpu")
+ , m_laserdisc(*this, "laserdisc")
+ , m_r1_sound(*this, "r1sound")
+ , m_r2_sound(*this, "r2sound")
+ , m_knocker_sample(*this, "knocker_sam")
+ , m_videoram(*this, "videoram")
+ , m_charram(*this, "charram")
+ , m_spriteram(*this, "spriteram")
+ , m_gfxdecode(*this, "gfxdecode")
+ , m_screen(*this, "screen")
+ , m_palette(*this, "palette")
+ , m_generic_paletteram_8(*this, "paletteram")
+ , m_track_x(*this, "TRACKX")
+ , m_track_y(*this, "TRACKY")
+ , m_led(*this, "led%u", 0U)
{ }
- // devices
- required_device<cpu_device> m_maincpu;
- optional_device<pioneer_pr8210_device> m_laserdisc;
- optional_device<gottlieb_sound_r1_device> m_r1_sound;
- optional_device<gottlieb_sound_r2_device> m_r2_sound;
- optional_device<samples_device> m_knocker_sample;
-
- required_shared_ptr<uint8_t> m_videoram;
- required_shared_ptr<uint8_t> m_charram;
- required_shared_ptr<uint8_t> m_spriteram;
-
- required_device<gfxdecode_device> m_gfxdecode;
- required_device<screen_device> m_screen;
- required_device<palette_device> m_palette;
- required_shared_ptr<uint8_t> m_generic_paletteram_8;
-
- optional_ioport m_track_x;
- optional_ioport m_track_y;
-
- uint8_t m_knocker_prev;
- uint8_t m_joystick_select;
- uint8_t m_track[2];
- emu_timer *m_laserdisc_bit_timer;
- emu_timer *m_laserdisc_philips_timer;
- uint8_t m_laserdisc_select;
- uint8_t m_laserdisc_status;
- uint16_t m_laserdisc_philips_code;
- std::unique_ptr<uint8_t[]> m_laserdisc_audio_buffer;
- uint16_t m_laserdisc_audio_address;
- int16_t m_laserdisc_last_samples[2];
- attotime m_laserdisc_last_time;
- attotime m_laserdisc_last_clock;
- uint8_t m_laserdisc_zero_seen;
- uint8_t m_laserdisc_audio_bits;
- uint8_t m_laserdisc_audio_bit_count;
- uint8_t m_gfxcharlo;
- uint8_t m_gfxcharhi;
- uint8_t m_background_priority;
- uint8_t m_spritebank;
- uint8_t m_transparent0;
- tilemap_t *m_bg_tilemap;
- double m_weights[4];
-
void qbert_knocker(uint8_t knock);
DECLARE_WRITE8_MEMBER(gottlieb_analog_reset_w);
@@ -125,9 +83,6 @@ public:
void init_qbertqub();
TILE_GET_INFO_MEMBER(get_bg_tile_info);
TILE_GET_INFO_MEMBER(get_screwloo_bg_tile_info);
- virtual void machine_start() override;
- virtual void machine_reset() override;
- virtual void video_start() override;
DECLARE_VIDEO_START(screwloo);
uint32_t screen_update_gottlieb(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect);
INTERRUPT_GEN_MEMBER(gottlieb_interrupt);
@@ -155,5 +110,52 @@ public:
void gottlieb_map(address_map &map);
void reactor_map(address_map &map);
protected:
+ virtual void machine_start() override;
+ virtual void machine_reset() override;
+ virtual void video_start() override;
virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) override;
+
+ // devices
+ required_device<cpu_device> m_maincpu;
+ optional_device<pioneer_pr8210_device> m_laserdisc;
+ optional_device<gottlieb_sound_r1_device> m_r1_sound;
+ optional_device<gottlieb_sound_r2_device> m_r2_sound;
+ optional_device<samples_device> m_knocker_sample;
+
+ required_shared_ptr<uint8_t> m_videoram;
+ required_shared_ptr<uint8_t> m_charram;
+ required_shared_ptr<uint8_t> m_spriteram;
+
+ required_device<gfxdecode_device> m_gfxdecode;
+ required_device<screen_device> m_screen;
+ required_device<palette_device> m_palette;
+ required_shared_ptr<uint8_t> m_generic_paletteram_8;
+
+ optional_ioport m_track_x;
+ optional_ioport m_track_y;
+ output_finder<3> m_led; // only used by reactor
+
+ uint8_t m_knocker_prev;
+ uint8_t m_joystick_select;
+ uint8_t m_track[2];
+ emu_timer *m_laserdisc_bit_timer;
+ emu_timer *m_laserdisc_philips_timer;
+ uint8_t m_laserdisc_select;
+ uint8_t m_laserdisc_status;
+ uint16_t m_laserdisc_philips_code;
+ std::unique_ptr<uint8_t[]> m_laserdisc_audio_buffer;
+ uint16_t m_laserdisc_audio_address;
+ int16_t m_laserdisc_last_samples[2];
+ attotime m_laserdisc_last_time;
+ attotime m_laserdisc_last_clock;
+ uint8_t m_laserdisc_zero_seen;
+ uint8_t m_laserdisc_audio_bits;
+ uint8_t m_laserdisc_audio_bit_count;
+ uint8_t m_gfxcharlo;
+ uint8_t m_gfxcharhi;
+ uint8_t m_background_priority;
+ uint8_t m_spritebank;
+ uint8_t m_transparent0;
+ tilemap_t *m_bg_tilemap;
+ double m_weights[4];
};
diff --git a/src/mame/includes/harddriv.h b/src/mame/includes/harddriv.h
index caaf899a893..6b21e733012 100644
--- a/src/mame/includes/harddriv.h
+++ b/src/mame/includes/harddriv.h
@@ -301,6 +301,7 @@ protected:
optional_device<screen_device> m_screen;
optional_device<mc68681_device> m_duartn68681;
required_device<adc0808_device> m_adc8;
+ output_finder<3> m_lamp;
uint8_t m_hd34010_host_access;
diff --git a/src/mame/includes/irobot.h b/src/mame/includes/irobot.h
index 37f5c3ea008..1514978db80 100644
--- a/src/mame/includes/irobot.h
+++ b/src/mame/includes/irobot.h
@@ -41,7 +41,8 @@ public:
m_gfxdecode(*this, "gfxdecode"),
m_screen(*this, "screen"),
m_palette(*this, "palette"),
- m_pokey(*this, "pokey%u", 1U)
+ m_pokey(*this, "pokey%u", 1U),
+ m_led(*this, "led%u", 0U)
{ }
void init_irobot();
@@ -49,6 +50,7 @@ public:
void irobot(machine_config &config);
protected:
+ virtual void machine_start() override { m_led.resolve(); }
virtual void machine_reset() override;
virtual void video_start() override;
void irobot_map(address_map &map);
@@ -117,6 +119,7 @@ private:
required_device<screen_device> m_screen;
required_device<palette_device> m_palette;
required_device_array<pokey_device, 4> m_pokey;
+ output_finder<2> m_led;
};
#endif // MAME_INCLUDES_IROBOT_H
diff --git a/src/mame/includes/itech32.h b/src/mame/includes/itech32.h
index 6ad5cadac4e..1f147141344 100644
--- a/src/mame/includes/itech32.h
+++ b/src/mame/includes/itech32.h
@@ -37,7 +37,9 @@ public:
m_drivedge_zbuf_control(*this, "drivedge_zctl"),
m_tms1_boot(*this, "tms1_boot"),
m_tms1_ram(*this, "tms1_ram"),
- m_tms2_ram(*this, "tms2_ram") { }
+ m_tms2_ram(*this, "tms2_ram"),
+ m_led(*this, "led%u", 0U)
+ { }
required_device<cpu_device> m_maincpu;
@@ -56,6 +58,7 @@ public:
optional_shared_ptr<uint32_t> m_tms1_boot;
optional_shared_ptr<uint32_t> m_tms1_ram;
optional_shared_ptr<uint32_t> m_tms2_ram;
+ output_finder<4> m_led;
void nvram_init(nvram_device &nvram, void *base, size_t length);
diff --git a/src/mame/includes/jpmimpct.h b/src/mame/includes/jpmimpct.h
index 3fc55f7dc44..6bde694bd20 100644
--- a/src/mame/includes/jpmimpct.h
+++ b/src/mame/includes/jpmimpct.h
@@ -76,7 +76,8 @@ public:
, m_reel5(*this, "reel5")
, m_meters(*this, "meters")
, m_digits(*this, "digit%u", 0U)
- { }
+ , m_lamp_output(*this, "lamp%u", 0U)
+ { }
DECLARE_WRITE_LINE_MEMBER(reel0_optic_cb) { if (state) m_optic_pattern |= 0x01; else m_optic_pattern &= ~0x01; }
DECLARE_WRITE_LINE_MEMBER(reel1_optic_cb) { if (state) m_optic_pattern |= 0x02; else m_optic_pattern &= ~0x02; }
@@ -156,4 +157,5 @@ private:
optional_device<stepper_device> m_reel5;
required_device<meters_device> m_meters;
output_finder<300> m_digits;
+ output_finder<256> m_lamp_output;
};
diff --git a/src/mame/includes/konamigx.h b/src/mame/includes/konamigx.h
index 26bf9f7a790..3ef4a65f967 100644
--- a/src/mame/includes/konamigx.h
+++ b/src/mame/includes/konamigx.h
@@ -20,66 +20,40 @@ class konamigx_state : public driver_device
{
public:
konamigx_state(const machine_config &mconfig, device_type type, const char *tag)
- : driver_device(mconfig, type, tag),
- m_maincpu(*this,"maincpu"),
- m_soundcpu(*this, "soundcpu"),
- m_dasp(*this, "dasp"),
- m_k053252(*this, "k053252"),
- m_k055673(*this, "k055673"),
- m_k055555(*this, "k055555"),
- m_k056832(*this, "k056832"),
- m_k054338(*this, "k054338"),
- m_k056800(*this, "k056800"),
- m_k054539_1(*this,"k054539_1"),
- m_k054539_2(*this,"k054539_2"),
- m_gfxdecode(*this, "gfxdecode"),
- m_screen(*this, "screen"),
- m_palette(*this, "palette"),
- m_workram(*this,"workram"),
- m_psacram(*this,"psacram"),
- m_subpaletteram32(*this,"subpaletteram"),
- m_k053936_0_ctrl(*this,"k053936_0_ctrl",32),
- m_k053936_0_linectrl(*this,"k053936_0_line",32),
- m_k053936_0_ctrl_16(*this,"k053936_0_ct16",16),
- m_k053936_0_linectrl_16(*this,"k053936_0_li16",16),
- m_konamigx_type3_psac2_bank(*this,"psac2_bank"),
- m_generic_paletteram_32(*this, "paletteram"),
- m_an0(*this, "AN0"),
- m_an1(*this, "AN1"),
- m_light0_x(*this, "LIGHT0_X"),
- m_light0_y(*this, "LIGHT0_Y"),
- m_light1_x(*this, "LIGHT1_X"),
- m_light1_y(*this, "LIGHT1_Y"),
- m_eepromout(*this, "EEPROMOUT"),
- m_use_68020_post_clock_hack(0)
- { }
-
- required_device<cpu_device> m_maincpu;
- optional_device<cpu_device> m_soundcpu;
- optional_device<tms57002_device> m_dasp;
- required_device<k053252_device> m_k053252;
- required_device<k055673_device> m_k055673;
- required_device<k055555_device> m_k055555;
- required_device<k056832_device> m_k056832;
- optional_device<k054338_device> m_k054338;
- optional_device<k056800_device> m_k056800;
- optional_device<k054539_device> m_k054539_1;
- optional_device<k054539_device> m_k054539_2;
- optional_device<gfxdecode_device> m_gfxdecode;
- required_device<screen_device> m_screen;
- required_device<palette_device> m_palette;
-
- optional_shared_ptr<uint32_t> m_workram;
- optional_shared_ptr<uint32_t> m_psacram;
- optional_shared_ptr<uint32_t> m_subpaletteram32;
- optional_shared_ptr<uint16_t> m_k053936_0_ctrl;
- optional_shared_ptr<uint16_t> m_k053936_0_linectrl;
- optional_shared_ptr<uint16_t> m_k053936_0_ctrl_16;
- optional_shared_ptr<uint16_t> m_k053936_0_linectrl_16;
- optional_shared_ptr<uint32_t> m_konamigx_type3_psac2_bank;
- optional_shared_ptr<uint32_t> m_generic_paletteram_32;
-
- optional_ioport m_an0, m_an1, m_light0_x, m_light0_y, m_light1_x, m_light1_y, m_eepromout;
+ : driver_device(mconfig, type, tag)
+ , m_maincpu(*this,"maincpu")
+ , m_soundcpu(*this, "soundcpu")
+ , m_dasp(*this, "dasp")
+ , m_k053252(*this, "k053252")
+ , m_k055673(*this, "k055673")
+ , m_k055555(*this, "k055555")
+ , m_k056832(*this, "k056832")
+ , m_k054338(*this, "k054338")
+ , m_k056800(*this, "k056800")
+ , m_k054539_1(*this, "k054539_1")
+ , m_k054539_2(*this, "k054539_2")
+ , m_gfxdecode(*this, "gfxdecode")
+ , m_screen(*this, "screen")
+ , m_palette(*this, "palette")
+ , m_workram(*this, "workram")
+ , m_psacram(*this, "psacram")
+ , m_subpaletteram32(*this, "subpaletteram")
+ , m_k053936_0_ctrl(*this, "k053936_0_ctrl", 32)
+ , m_k053936_0_linectrl(*this, "k053936_0_line", 32)
+ , m_k053936_0_ctrl_16(*this, "k053936_0_ct16", 16)
+ , m_k053936_0_linectrl_16(*this, "k053936_0_li16", 16)
+ , m_konamigx_type3_psac2_bank(*this, "psac2_bank")
+ , m_generic_paletteram_32(*this, "paletteram")
+ , m_an0(*this, "AN0")
+ , m_an1(*this, "AN1")
+ , m_light0_x(*this, "LIGHT0_X")
+ , m_light0_y(*this, "LIGHT0_Y")
+ , m_light1_x(*this, "LIGHT1_X")
+ , m_light1_y(*this, "LIGHT1_Y")
+ , m_eepromout(*this, "EEPROMOUT")
+ , m_use_68020_post_clock_hack(0)
+ , m_lamp(*this, "lamp0")
+ { }
DECLARE_WRITE32_MEMBER(esc_w);
DECLARE_WRITE32_MEMBER(eeprom_w);
@@ -187,6 +161,59 @@ public:
inline int K055555GX_decode_inpri(int c18);
int K055555GX_decode_vmixcolor(int layer, int *color);
+ void init_posthack();
+ void konamigx_6bpp(machine_config &config);
+ void gxtype4(machine_config &config);
+ void gxtype4_vsn(machine_config &config);
+ void racinfrc(machine_config &config);
+ void gxtype4sd2(machine_config &config);
+ void konamigx_bios(machine_config &config);
+ void gxtype3(machine_config &config);
+ void opengolf(machine_config &config);
+ void winspike(machine_config &config);
+ void le2(machine_config &config);
+ void konamigx(machine_config &config);
+ void dragoonj(machine_config &config);
+ void salmndr2(machine_config &config);
+ void tbyahhoo(machine_config &config);
+ void gokuparo(machine_config &config);
+ void sexyparo(machine_config &config);
+ void gx_base_memmap(address_map &map);
+ void gx_type1_map(address_map &map);
+ void gx_type2_map(address_map &map);
+ void gx_type3_map(address_map &map);
+ void gx_type4_map(address_map &map);
+ void gxsndmap(address_map &map);
+ void gxtmsmap(address_map &map);
+
+protected:
+ required_device<cpu_device> m_maincpu;
+ optional_device<cpu_device> m_soundcpu;
+ optional_device<tms57002_device> m_dasp;
+ required_device<k053252_device> m_k053252;
+ required_device<k055673_device> m_k055673;
+ required_device<k055555_device> m_k055555;
+ required_device<k056832_device> m_k056832;
+ optional_device<k054338_device> m_k054338;
+ optional_device<k056800_device> m_k056800;
+ optional_device<k054539_device> m_k054539_1;
+ optional_device<k054539_device> m_k054539_2;
+ optional_device<gfxdecode_device> m_gfxdecode;
+ required_device<screen_device> m_screen;
+ required_device<palette_device> m_palette;
+
+ optional_shared_ptr<uint32_t> m_workram;
+ optional_shared_ptr<uint32_t> m_psacram;
+ optional_shared_ptr<uint32_t> m_subpaletteram32;
+ optional_shared_ptr<uint16_t> m_k053936_0_ctrl;
+ optional_shared_ptr<uint16_t> m_k053936_0_linectrl;
+ optional_shared_ptr<uint16_t> m_k053936_0_ctrl_16;
+ optional_shared_ptr<uint16_t> m_k053936_0_linectrl_16;
+ optional_shared_ptr<uint32_t> m_konamigx_type3_psac2_bank;
+ optional_shared_ptr<uint32_t> m_generic_paletteram_32;
+
+ optional_ioport m_an0, m_an1, m_light0_x, m_light0_y, m_light1_x, m_light1_y, m_eepromout;
+
uint8_t m_sound_ctrl;
uint8_t m_sound_intck;
uint32_t m_fantjour_dma[8];
@@ -259,32 +286,8 @@ public:
int m_konamigx_type3_psac2_actual_bank;
//int m_konamigx_type3_psac2_actual_last_bank = 0;
-
- void init_posthack();
int m_use_68020_post_clock_hack;
- void konamigx_6bpp(machine_config &config);
- void gxtype4(machine_config &config);
- void gxtype4_vsn(machine_config &config);
- void racinfrc(machine_config &config);
- void gxtype4sd2(machine_config &config);
- void konamigx_bios(machine_config &config);
- void gxtype3(machine_config &config);
- void opengolf(machine_config &config);
- void winspike(machine_config &config);
- void le2(machine_config &config);
- void konamigx(machine_config &config);
- void dragoonj(machine_config &config);
- void salmndr2(machine_config &config);
- void tbyahhoo(machine_config &config);
- void gokuparo(machine_config &config);
- void sexyparo(machine_config &config);
- void gx_base_memmap(address_map &map);
- void gx_type1_map(address_map &map);
- void gx_type2_map(address_map &map);
- void gx_type3_map(address_map &map);
- void gx_type4_map(address_map &map);
- void gxsndmap(address_map &map);
- void gxtmsmap(address_map &map);
+ output_finder<> m_lamp;
};
// Sprite Callbacks
diff --git a/src/mame/includes/kopunch.h b/src/mame/includes/kopunch.h
index 76cbcd84489..e3d4f8d39b7 100644
--- a/src/mame/includes/kopunch.h
+++ b/src/mame/includes/kopunch.h
@@ -10,27 +10,14 @@ class kopunch_state : public driver_device
{
public:
kopunch_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_vram_fg(*this, "vram_fg"),
- m_vram_bg(*this, "vram_bg")
+ : driver_device(mconfig, type, tag)
+ , m_maincpu(*this, "maincpu")
+ , m_gfxdecode(*this, "gfxdecode")
+ , m_vram_fg(*this, "vram_fg")
+ , m_vram_bg(*this, "vram_bg")
+ , m_lamp(*this, "lamp0")
{ }
- /* devices */
- required_device<cpu_device> m_maincpu;
- required_device<gfxdecode_device> m_gfxdecode;
-
- /* memory pointers */
- required_shared_ptr<uint8_t> m_vram_fg;
- required_shared_ptr<uint8_t> m_vram_bg;
-
- /* video-related */
- tilemap_t *m_bg_tilemap;
- tilemap_t *m_fg_tilemap;
- uint8_t m_gfxbank;
- uint8_t m_scrollx;
-
DECLARE_READ8_MEMBER(sensors1_r);
DECLARE_READ8_MEMBER(sensors2_r);
DECLARE_WRITE8_MEMBER(lamp_w);
@@ -50,9 +37,27 @@ public:
DECLARE_PALETTE_INIT(kopunch);
uint32_t screen_update_kopunch(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
- virtual void machine_start() override;
- virtual void video_start() override;
void kopunch(machine_config &config);
void kopunch_io_map(address_map &map);
void kopunch_map(address_map &map);
+
+protected:
+ virtual void machine_start() override;
+ virtual void video_start() override;
+
+ /* devices */
+ required_device<cpu_device> m_maincpu;
+ required_device<gfxdecode_device> m_gfxdecode;
+
+ /* memory pointers */
+ required_shared_ptr<uint8_t> m_vram_fg;
+ required_shared_ptr<uint8_t> m_vram_bg;
+
+ output_finder<> m_lamp;
+
+ /* video-related */
+ tilemap_t *m_bg_tilemap;
+ tilemap_t *m_fg_tilemap;
+ uint8_t m_gfxbank;
+ uint8_t m_scrollx;
};
diff --git a/src/mame/includes/lethalj.h b/src/mame/includes/lethalj.h
index be98fb58805..32d840c7e32 100644
--- a/src/mame/includes/lethalj.h
+++ b/src/mame/includes/lethalj.h
@@ -23,8 +23,8 @@ public:
TIMER_GEN_EXT1_INT
};
- lethalj_state(const machine_config &mconfig, device_type type, const char *tag)
- : driver_device(mconfig, type, tag) ,
+ lethalj_state(const machine_config &mconfig, device_type type, const char *tag) :
+ driver_device(mconfig, type, tag) ,
m_maincpu(*this, "maincpu"),
m_screen(*this, "screen"),
m_ticket(*this, "ticket"),
@@ -32,27 +32,10 @@ public:
m_light0_x(*this, "LIGHT0_X"),
m_light0_y(*this, "LIGHT0_Y"),
m_light1_x(*this, "LIGHT1_X"),
- m_light1_y(*this, "LIGHT1_Y")
+ m_light1_y(*this, "LIGHT1_Y"),
+ m_lamp(*this, "lamp%u", 0U)
{ }
- required_device<tms34010_device> m_maincpu;
- required_device<screen_device> m_screen;
- required_device<ticket_dispenser_device> m_ticket;
- optional_ioport m_paddle;
- optional_ioport m_light0_x;
- optional_ioport m_light0_y;
- optional_ioport m_light1_x;
- optional_ioport m_light1_y;
-
- emu_timer *m_gen_ext1_int_timer;
- uint16_t m_blitter_data[8];
- std::unique_ptr<uint16_t[]> m_screenram;
- uint8_t m_vispage;
- uint16_t *m_blitter_base;
- int m_blitter_rows;
- uint16_t m_gunx;
- uint16_t m_guny;
- uint8_t m_blank_palette;
DECLARE_WRITE16_MEMBER(ripribit_control_w);
DECLARE_WRITE16_MEMBER(cfarm_control_w);
DECLARE_WRITE16_MEMBER(cclownz_control_w);
@@ -63,7 +46,6 @@ public:
void init_cfarm();
void init_ripribit();
void init_cclownz();
- virtual void video_start() override;
inline void get_crosshair_xy(int player, int *x, int *y);
TMS340X0_SCANLINE_IND16_CB_MEMBER(scanline_update);
@@ -71,7 +53,29 @@ public:
void gameroom(machine_config &config);
void lethalj_map(address_map &map);
protected:
+ virtual void machine_start() override { m_lamp.resolve(); }
virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) override;
+ virtual void video_start() override;
+
+ required_device<tms34010_device> m_maincpu;
+ required_device<screen_device> m_screen;
+ required_device<ticket_dispenser_device> m_ticket;
+ optional_ioport m_paddle;
+ optional_ioport m_light0_x;
+ optional_ioport m_light0_y;
+ optional_ioport m_light1_x;
+ optional_ioport m_light1_y;
+ output_finder<3> m_lamp;
+
+ emu_timer *m_gen_ext1_int_timer;
+ uint16_t m_blitter_data[8];
+ std::unique_ptr<uint16_t[]> m_screenram;
+ uint8_t m_vispage;
+ uint16_t *m_blitter_base;
+ int m_blitter_rows;
+ uint16_t m_gunx;
+ uint16_t m_guny;
+ uint8_t m_blank_palette;
};
#endif // MAME_INCLUDES_LETHALJ_H
diff --git a/src/mame/includes/lockon.h b/src/mame/includes/lockon.h
index a016410984e..f99585fa116 100644
--- a/src/mame/includes/lockon.h
+++ b/src/mame/includes/lockon.h
@@ -25,26 +25,28 @@ class lockon_state : public driver_device
{
public:
lockon_state(const machine_config &mconfig, device_type type, const char *tag)
- : driver_device(mconfig, type, tag),
- m_char_ram(*this, "char_ram"),
- m_hud_ram(*this, "hud_ram"),
- m_scene_ram(*this, "scene_ram"),
- m_ground_ram(*this, "ground_ram"),
- m_object_ram(*this, "object_ram"),
- m_maincpu(*this, "maincpu"),
- m_audiocpu(*this, "audiocpu"),
- m_ground(*this, "ground"),
- m_object(*this, "object"),
- m_watchdog(*this, "watchdog"),
- m_f2203_1l(*this, "f2203.1l"),
- m_f2203_2l(*this, "f2203.2l"),
- m_f2203_3l(*this, "f2203.3l"),
- m_f2203_1r(*this, "f2203.1r"),
- m_f2203_2r(*this, "f2203.2r"),
- m_f2203_3r(*this, "f2203.3r"),
- m_gfxdecode(*this, "gfxdecode"),
- m_screen(*this, "screen"),
- m_palette(*this, "palette") { }
+ : driver_device(mconfig, type, tag)
+ , m_char_ram(*this, "char_ram")
+ , m_hud_ram(*this, "hud_ram")
+ , m_scene_ram(*this, "scene_ram")
+ , m_ground_ram(*this, "ground_ram")
+ , m_object_ram(*this, "object_ram")
+ , m_maincpu(*this, "maincpu")
+ , m_audiocpu(*this, "audiocpu")
+ , m_ground(*this, "ground")
+ , m_object(*this, "object")
+ , m_watchdog(*this, "watchdog")
+ , m_f2203_1l(*this, "f2203.1l")
+ , m_f2203_2l(*this, "f2203.2l")
+ , m_f2203_3l(*this, "f2203.3l")
+ , m_f2203_1r(*this, "f2203.1r")
+ , m_f2203_2r(*this, "f2203.2r")
+ , m_f2203_3r(*this, "f2203.3r")
+ , m_gfxdecode(*this, "gfxdecode")
+ , m_screen(*this, "screen")
+ , m_palette(*this, "palette")
+ , m_lamp(*this, "lamp%u", 0U)
+ { }
void lockon(machine_config &config);
@@ -106,6 +108,7 @@ private:
required_device<gfxdecode_device> m_gfxdecode;
required_device<screen_device> m_screen;
required_device<palette_device> m_palette;
+ output_finder<2> m_lamp;
DECLARE_READ16_MEMBER(lockon_crtc_r);
DECLARE_WRITE16_MEMBER(lockon_crtc_w);
diff --git a/src/mame/includes/lucky74.h b/src/mame/includes/lucky74.h
index 478b1934be4..327acd90a94 100644
--- a/src/mame/includes/lucky74.h
+++ b/src/mame/includes/lucky74.h
@@ -5,30 +5,18 @@
class lucky74_state : public driver_device
{
public:
- lucky74_state(const machine_config &mconfig, device_type type, const char *tag)
- : driver_device(mconfig, type, tag),
+ lucky74_state(const machine_config &mconfig, device_type type, const char *tag) :
+ driver_device(mconfig, type, tag),
m_fg_videoram(*this, "fg_videoram"),
m_fg_colorram(*this, "fg_colorram"),
m_bg_videoram(*this, "bg_videoram"),
m_bg_colorram(*this, "bg_colorram"),
m_maincpu(*this, "maincpu"),
m_msm(*this, "msm"),
- m_gfxdecode(*this, "gfxdecode") { }
+ m_gfxdecode(*this, "gfxdecode"),
+ m_lamp(*this, "lamp%u", 0U)
+ { }
- uint8_t m_ym2149_portb;
- uint8_t m_usart_8251;
- uint8_t m_copro_sm7831;
- int m_adpcm_pos;
- int m_adpcm_end;
- int m_adpcm_data;
- uint8_t m_adpcm_reg[6];
- uint8_t m_adpcm_busy_line;
- required_shared_ptr<uint8_t> m_fg_videoram;
- required_shared_ptr<uint8_t> m_fg_colorram;
- required_shared_ptr<uint8_t> m_bg_videoram;
- required_shared_ptr<uint8_t> m_bg_colorram;
- tilemap_t *m_fg_tilemap;
- tilemap_t *m_bg_tilemap;
DECLARE_READ8_MEMBER(custom_09R81P_port_r);
DECLARE_WRITE8_MEMBER(custom_09R81P_port_w);
DECLARE_READ8_MEMBER(usart_8251_r);
@@ -44,17 +32,36 @@ public:
DECLARE_WRITE8_MEMBER(lamps_b_w);
TILE_GET_INFO_MEMBER(get_fg_tile_info);
TILE_GET_INFO_MEMBER(get_bg_tile_info);
- virtual void video_start() override;
- virtual void machine_reset() override;
- virtual void sound_start() override;
DECLARE_PALETTE_INIT(lucky74);
uint32_t screen_update_lucky74(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
INTERRUPT_GEN_MEMBER(nmi_interrupt);
DECLARE_WRITE_LINE_MEMBER(lucky74_adpcm_int);
- required_device<cpu_device> m_maincpu;
- required_device<msm5205_device> m_msm;
- required_device<gfxdecode_device> m_gfxdecode;
void lucky74(machine_config &config);
void lucky74_map(address_map &map);
void lucky74_portmap(address_map &map);
+
+protected:
+ virtual void machine_start() override { m_lamp.resolve(); }
+ virtual void video_start() override;
+ virtual void machine_reset() override;
+ virtual void sound_start() override;
+
+ uint8_t m_ym2149_portb;
+ uint8_t m_usart_8251;
+ uint8_t m_copro_sm7831;
+ int m_adpcm_pos;
+ int m_adpcm_end;
+ int m_adpcm_data;
+ uint8_t m_adpcm_reg[6];
+ uint8_t m_adpcm_busy_line;
+ required_shared_ptr<uint8_t> m_fg_videoram;
+ required_shared_ptr<uint8_t> m_fg_colorram;
+ required_shared_ptr<uint8_t> m_bg_videoram;
+ required_shared_ptr<uint8_t> m_bg_colorram;
+ tilemap_t *m_fg_tilemap;
+ tilemap_t *m_bg_tilemap;
+ required_device<cpu_device> m_maincpu;
+ required_device<msm5205_device> m_msm;
+ required_device<gfxdecode_device> m_gfxdecode;
+ output_finder<12> m_lamp;
};
diff --git a/src/mame/includes/mainevt.h b/src/mame/includes/mainevt.h
index 746379e6a09..ab3c7fec9e1 100644
--- a/src/mame/includes/mainevt.h
+++ b/src/mame/includes/mainevt.h
@@ -16,28 +16,16 @@ class mainevt_state : public driver_device
{
public:
mainevt_state(const machine_config &mconfig, device_type type, const char *tag)
- : driver_device(mconfig, type, tag),
- m_maincpu(*this, "maincpu"),
- m_audiocpu(*this, "audiocpu"),
- m_upd7759(*this, "upd"),
- m_k007232(*this, "k007232"),
- m_k052109(*this, "k052109"),
- m_k051960(*this, "k051960"),
- m_rombank(*this, "rombank") { }
-
- /* misc */
- int m_nmi_enable;
- uint8_t m_sound_irq_mask;
-
- /* devices */
- required_device<cpu_device> m_maincpu;
- required_device<cpu_device> m_audiocpu;
- optional_device<upd7759_device> m_upd7759;
- required_device<k007232_device> m_k007232;
- required_device<k052109_device> m_k052109;
- required_device<k051960_device> m_k051960;
-
- required_memory_bank m_rombank;
+ : driver_device(mconfig, type, tag)
+ , m_maincpu(*this, "maincpu")
+ , m_audiocpu(*this, "audiocpu")
+ , m_upd7759(*this, "upd")
+ , m_k007232(*this, "k007232")
+ , m_k052109(*this, "k052109")
+ , m_k051960(*this, "k051960")
+ , m_rombank(*this, "rombank")
+ , m_led(*this, "led%u", 0U)
+ { }
DECLARE_WRITE8_MEMBER(dv_nmienable_w);
DECLARE_WRITE8_MEMBER(mainevt_bankswitch_w);
@@ -50,8 +38,6 @@ public:
DECLARE_WRITE8_MEMBER(k052109_051960_w);
DECLARE_READ8_MEMBER(mainevt_sh_busy_r);
DECLARE_WRITE8_MEMBER(dv_sh_bankswitch_w);
- virtual void machine_start() override;
- virtual void machine_reset() override;
uint32_t screen_update_mainevt(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
uint32_t screen_update_dv(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
INTERRUPT_GEN_MEMBER(mainevt_interrupt);
@@ -69,4 +55,23 @@ public:
void devstors_sound_map(address_map &map);
void mainevt_map(address_map &map);
void mainevt_sound_map(address_map &map);
+
+protected:
+ virtual void machine_start() override;
+ virtual void machine_reset() override;
+
+ /* misc */
+ int m_nmi_enable;
+ uint8_t m_sound_irq_mask;
+
+ /* devices */
+ required_device<cpu_device> m_maincpu;
+ required_device<cpu_device> m_audiocpu;
+ optional_device<upd7759_device> m_upd7759;
+ required_device<k007232_device> m_k007232;
+ required_device<k052109_device> m_k052109;
+ required_device<k051960_device> m_k051960;
+
+ required_memory_bank m_rombank;
+ output_finder<4> m_led;
};
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
diff --git a/src/mame/includes/mcr3.h b/src/mame/includes/mcr3.h
index e2084d51956..27da1c42072 100644
--- a/src/mame/includes/mcr3.h
+++ b/src/mame/includes/mcr3.h
@@ -14,11 +14,12 @@ class mcr3_state : public mcr_state
{
public:
mcr3_state(const machine_config &mconfig, device_type type, const char *tag)
- : mcr_state(mconfig, type, tag),
- m_spyhunt_alpharam(*this, "spyhunt_alpha"),
- m_maxrpm_adc(*this, "adc"),
- m_lamplatch(*this, "lamplatch"),
- m_screen(*this, "screen")
+ : mcr_state(mconfig, type, tag)
+ , m_spyhunt_alpharam(*this, "spyhunt_alpha")
+ , m_maxrpm_adc(*this, "adc")
+ , m_lamplatch(*this, "lamplatch")
+ , m_screen(*this, "screen")
+ , m_lamp(*this, "lamp%u", 0U)
{ }
DECLARE_WRITE8_MEMBER(mcr3_videoram_w);
@@ -72,6 +73,7 @@ public:
void spyhunt_map(address_map &map);
void spyhunt_portmap(address_map &map);
protected:
+ virtual void machine_start() override { m_lamp.resolve(); }
virtual void video_start() override;
private:
@@ -79,6 +81,7 @@ private:
optional_device<adc0844_device> m_maxrpm_adc;
optional_device<cd4099_device> m_lamplatch;
required_device<screen_device> m_screen;
+ output_finder<3> m_lamp;
uint8_t m_latched_input;
uint8_t m_maxrpm_adc_control;
diff --git a/src/mame/includes/mhavoc.h b/src/mame/includes/mhavoc.h
index aeb386bb605..c579a2a58c6 100644
--- a/src/mame/includes/mhavoc.h
+++ b/src/mame/includes/mhavoc.h
@@ -22,29 +22,15 @@
class mhavoc_state : public driver_device
{
public:
- mhavoc_state(const machine_config &mconfig, device_type type, const char *tag)
- : driver_device(mconfig, type, tag),
+ mhavoc_state(const machine_config &mconfig, device_type type, const char *tag) :
+ driver_device(mconfig, type, tag),
m_zram0(*this, "zram0"),
m_zram1(*this, "zram1"),
m_alpha(*this, "alpha"),
- m_gamma(*this, "gamma"){ }
+ m_gamma(*this, "gamma"),
+ m_lamp(*this, "lamp%u", 0U)
+ { }
- required_shared_ptr<uint8_t> m_zram0;
- required_shared_ptr<uint8_t> m_zram1;
- required_device<cpu_device> m_alpha;
- optional_device<cpu_device> m_gamma;
- uint8_t m_alpha_data;
- uint8_t m_alpha_rcvd;
- uint8_t m_alpha_xmtd;
- uint8_t m_gamma_data;
- uint8_t m_gamma_rcvd;
- uint8_t m_gamma_xmtd;
- uint8_t m_player_1;
- uint8_t m_alpha_irq_clock;
- uint8_t m_alpha_irq_clock_enable;
- uint8_t m_gamma_irq_clock;
- uint8_t m_has_gamma_cpu;
- uint8_t m_speech_write_buffer;
DECLARE_READ8_MEMBER(dual_pokey_r);
DECLARE_WRITE8_MEMBER(dual_pokey_w);
DECLARE_WRITE8_MEMBER(mhavoc_alpha_irq_ack_w);
@@ -70,8 +56,6 @@ public:
DECLARE_CUSTOM_INPUT_MEMBER(alpha_xmtd_r);
DECLARE_CUSTOM_INPUT_MEMBER(clock_r);
void init_mhavocrv();
- virtual void machine_start() override;
- virtual void machine_reset() override;
TIMER_CALLBACK_MEMBER(delayed_gamma_w);
TIMER_DEVICE_CALLBACK_MEMBER(mhavoc_cpu_irq_clock);
void alphaone(machine_config &config);
@@ -80,4 +64,26 @@ public:
void alpha_map(address_map &map);
void alphaone_map(address_map &map);
void gamma_map(address_map &map);
+
+protected:
+ virtual void machine_start() override;
+ virtual void machine_reset() override;
+
+ required_shared_ptr<uint8_t> m_zram0;
+ required_shared_ptr<uint8_t> m_zram1;
+ required_device<cpu_device> m_alpha;
+ optional_device<cpu_device> m_gamma;
+ output_finder<2> m_lamp;
+ uint8_t m_alpha_data;
+ uint8_t m_alpha_rcvd;
+ uint8_t m_alpha_xmtd;
+ uint8_t m_gamma_data;
+ uint8_t m_gamma_rcvd;
+ uint8_t m_gamma_xmtd;
+ uint8_t m_player_1;
+ uint8_t m_alpha_irq_clock;
+ uint8_t m_alpha_irq_clock_enable;
+ uint8_t m_gamma_irq_clock;
+ uint8_t m_has_gamma_cpu;
+ uint8_t m_speech_write_buffer;
};
diff --git a/src/mame/includes/microtan.h b/src/mame/includes/microtan.h
index 69a220f6165..83818e913f8 100644
--- a/src/mame/includes/microtan.h
+++ b/src/mame/includes/microtan.h
@@ -30,32 +30,17 @@ public:
TIMER_PULSE_NMI
};
- microtan_state(const machine_config &mconfig, device_type type, const char *tag)
- : driver_device(mconfig, type, tag),
+ microtan_state(const machine_config &mconfig, device_type type, const char *tag) :
+ driver_device(mconfig, type, tag),
m_videoram(*this, "videoram"),
m_maincpu(*this, "maincpu"),
m_cassette(*this, "cassette"),
m_via6522_0(*this, "via6522_0"),
m_via6522_1(*this, "via6522_1"),
- m_gfxdecode(*this, "gfxdecode")
+ m_gfxdecode(*this, "gfxdecode"),
+ m_led(*this, "led%u", 0U)
{ }
- required_shared_ptr<uint8_t> m_videoram;
- uint8_t m_chunky_graphics;
- std::unique_ptr<uint8_t[]> m_chunky_buffer;
- uint8_t m_keypad_column;
- uint8_t m_keyboard_ascii;
- emu_timer *m_timer;
- int m_via_0_irq_line;
- int m_via_1_irq_line;
- int m_kbd_irq_line;
- uint8_t m_keyrows[10];
- int m_lastrow;
- int m_mask;
- int m_key;
- int m_repeat;
- int m_repeater;
- tilemap_t *m_bg_tilemap;
DECLARE_READ8_MEMBER(microtan_sound_r);
DECLARE_WRITE8_MEMBER(microtan_sound_w);
DECLARE_READ8_MEMBER(microtan_bffx_r);
@@ -63,8 +48,6 @@ public:
DECLARE_WRITE8_MEMBER(microtan_videoram_w);
void init_microtan();
TILE_GET_INFO_MEMBER(get_bg_tile_info);
- virtual void machine_reset() override;
- virtual void video_start() override;
uint32_t screen_update_microtan(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
INTERRUPT_GEN_MEMBER(microtan_interrupt);
TIMER_CALLBACK_MEMBER(microtan_read_cassette);
@@ -80,11 +63,6 @@ public:
DECLARE_WRITE_LINE_MEMBER(via_1_out_cb2);
DECLARE_WRITE_LINE_MEMBER(via_0_irq);
DECLARE_WRITE_LINE_MEMBER(via_1_irq);
- required_device<cpu_device> m_maincpu;
- required_device<cassette_image_device> m_cassette;
- required_device<via6522_device> m_via6522_0;
- required_device<via6522_device> m_via6522_1;
- required_device<gfxdecode_device> m_gfxdecode;
uint8_t read_dsw();
void microtan_set_irq_line();
void store_key(int key);
@@ -99,7 +77,33 @@ public:
void microtan(machine_config &config);
void microtan_map(address_map &map);
protected:
+ virtual void machine_start() override { m_led.resolve(); }
+ virtual void machine_reset() override;
+ virtual void video_start() override;
virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) override;
+
+ required_shared_ptr<uint8_t> m_videoram;
+ uint8_t m_chunky_graphics;
+ std::unique_ptr<uint8_t[]> m_chunky_buffer;
+ uint8_t m_keypad_column;
+ uint8_t m_keyboard_ascii;
+ emu_timer *m_timer;
+ int m_via_0_irq_line;
+ int m_via_1_irq_line;
+ int m_kbd_irq_line;
+ uint8_t m_keyrows[10];
+ int m_lastrow;
+ int m_mask;
+ int m_key;
+ int m_repeat;
+ int m_repeater;
+ tilemap_t *m_bg_tilemap;
+ required_device<cpu_device> m_maincpu;
+ required_device<cassette_image_device> m_cassette;
+ required_device<via6522_device> m_via6522_0;
+ required_device<via6522_device> m_via6522_1;
+ required_device<gfxdecode_device> m_gfxdecode;
+ output_finder<2> m_led;
};
#endif // MAME_INCLUDES_MICROTAN_H
diff --git a/src/mame/includes/midzeus.h b/src/mame/includes/midzeus.h
index d4a19a0fc9c..dfe022dc98e 100644
--- a/src/mame/includes/midzeus.h
+++ b/src/mame/includes/midzeus.h
@@ -49,8 +49,6 @@ public:
DECLARE_WRITE32_MEMBER(disk_asic_w);
DECLARE_READ32_MEMBER(disk_asic_jr_r);
DECLARE_WRITE32_MEMBER(disk_asic_jr_w);
- DECLARE_READ32_MEMBER(crusnexo_leds_r);
- DECLARE_WRITE32_MEMBER(crusnexo_leds_w);
DECLARE_READ32_MEMBER(firewire_r);
DECLARE_WRITE32_MEMBER(firewire_w);
DECLARE_READ32_MEMBER(tms32031_control_r);
@@ -68,8 +66,6 @@ public:
DECLARE_READ32_MEMBER(trackball_r);
void init_invasn();
void init_mk4();
- void init_thegrid();
- void init_crusnexo();
DECLARE_MACHINE_START(midzeus);
DECLARE_MACHINE_RESET(midzeus);
DECLARE_VIDEO_START(midzeus);
diff --git a/src/mame/includes/msx.h b/src/mame/includes/msx.h
index f3ab7d3b635..bc846957773 100644
--- a/src/mame/includes/msx.h
+++ b/src/mame/includes/msx.h
@@ -131,6 +131,7 @@ public:
, m_io_mouse0(*this, "MOUSE0")
, m_io_mouse1(*this, "MOUSE1")
, m_io_key(*this, {"KEY0", "KEY1", "KEY2", "KEY3", "KEY4", "KEY5"})
+ , m_led(*this, "led%u", 0U)
, m_psg_b(0)
, m_rtc_latch(0)
, m_kanji_latch(0)
@@ -497,6 +498,7 @@ private:
required_ioport m_io_mouse0;
required_ioport m_io_mouse1;
required_ioport_array<6> m_io_key;
+ output_finder<3> m_led;
/* PSG */
int m_psg_b;
diff --git a/src/mame/includes/multfish.h b/src/mame/includes/multfish.h
index 8c23221d004..6f28bc5b0fd 100644
--- a/src/mame/includes/multfish.h
+++ b/src/mame/includes/multfish.h
@@ -16,31 +16,17 @@
class igrosoft_gamble_state : public driver_device
{
public:
- igrosoft_gamble_state(const machine_config &mconfig, device_type type, const char *tag)
- : driver_device(mconfig, type, tag),
+ igrosoft_gamble_state(const machine_config &mconfig, device_type type, const char *tag) :
+ driver_device(mconfig, type, tag),
m_maincpu(*this, "maincpu"),
m_m48t35(*this, "m48t35" ),
m_gfxdecode(*this, "gfxdecode"),
m_screen(*this, "screen"),
m_palette(*this, "palette"),
- m_hopper(*this, "hopper")
- {
- }
+ m_hopper(*this, "hopper"),
+ m_lamp(*this, "lamp%u", 0U)
+ { }
- /* Video related */
-
- int m_disp_enable;
- int m_xor_paltype;
- int m_xor_palette;
-
- tilemap_t *m_tilemap;
- tilemap_t *m_reel_tilemap;
-
- /* Misc related */
-
- uint8_t m_rambk;
-
- uint8_t m_vid[igrosoft_gamble_VIDRAM_SIZE];
DECLARE_WRITE8_MEMBER(igrosoft_gamble_vid_w);
DECLARE_WRITE8_MEMBER(igrosoft_gamble_bank_w);
DECLARE_READ8_MEMBER(bankedram_r);
@@ -81,21 +67,39 @@ public:
void init_crzmon2ent();
TILE_GET_INFO_MEMBER(get_igrosoft_gamble_tile_info);
TILE_GET_INFO_MEMBER(get_igrosoft_gamble_reel_tile_info);
+ uint32_t screen_update_igrosoft_gamble(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
+ void rollfr(machine_config &config);
+ void igrosoft_gamble(machine_config &config);
+ void igrosoft_gamble_map(address_map &map);
+ void igrosoft_gamble_portmap(address_map &map);
+ void rollfr_portmap(address_map &map);
+
+protected:
virtual void machine_start() override;
virtual void machine_reset() override;
virtual void video_start() override;
- uint32_t screen_update_igrosoft_gamble(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
+
+ /* Video related */
+
+ int m_disp_enable;
+ int m_xor_paltype;
+ int m_xor_palette;
+
+ tilemap_t *m_tilemap;
+ tilemap_t *m_reel_tilemap;
+
+ /* Misc related */
+
+ uint8_t m_rambk;
+
+ uint8_t m_vid[igrosoft_gamble_VIDRAM_SIZE];
required_device<cpu_device> m_maincpu;
required_device<timekeeper_device> m_m48t35;
required_device<gfxdecode_device> m_gfxdecode;
required_device<screen_device> m_screen;
required_device<palette_device> m_palette;
required_device<ticket_dispenser_device> m_hopper;
- void rollfr(machine_config &config);
- void igrosoft_gamble(machine_config &config);
- void igrosoft_gamble_map(address_map &map);
- void igrosoft_gamble_portmap(address_map &map);
- void rollfr_portmap(address_map &map);
+ output_finder<13> m_lamp;
};
diff --git a/src/mame/includes/namcos22.h b/src/mame/includes/namcos22.h
index d8a312c2d29..425867a770a 100644
--- a/src/mame/includes/namcos22.h
+++ b/src/mame/includes/namcos22.h
@@ -174,129 +174,54 @@ class namcos22_state : public driver_device
{
public:
namcos22_state(const machine_config &mconfig, device_type type, const char *tag)
- : driver_device(mconfig, type, tag),
- m_maincpu(*this, "maincpu"),
- m_master(*this, "master"),
- m_slave(*this, "slave"),
- m_mcu(*this, "mcu"),
- m_iomcu(*this, "iomcu"),
- m_spriteram(*this, "spriteram"),
- m_shareram(*this, "shareram"),
- m_eeprom(*this, "eeprom"),
- m_pSlaveExternalRAM(*this, "slaveextram"),
- m_pMasterExternalRAM(*this, "masterextram"),
- m_paletteram(*this, "paletteram"),
- m_cgram(*this, "cgram"),
- m_textram(*this, "textram"),
- m_polygonram(*this, "polygonram"),
- m_mixer(*this, "video_mixer"),
- m_gamma_proms(*this, "gamma_proms"),
- m_vics_data(*this, "vics_data"),
- m_vics_control(*this, "vics_control"),
- m_czattr(*this, "czattr"),
- m_tilemapattr(*this, "tilemapattr"),
- m_czram(*this, "czram"),
- m_motor_timer(*this, "motor_timer"),
- m_pc_pedal_interrupt(*this, "pc_p_int"),
- m_gfxdecode(*this, "gfxdecode"),
- m_screen(*this, "screen"),
- m_palette(*this, "palette"),
- m_adc_ports(*this, "ADC.%u", 0),
- m_p1(*this, "P1"),
- m_p2(*this, "P2"),
- m_mcup5a(*this, "MCUP5A"),
- m_mcup5b(*this, "MCUP5B")
+ : driver_device(mconfig, type, tag)
+ , m_spriteram(*this, "spriteram")
+ , m_czattr(*this, "czattr")
+ , m_czram(*this, "czram")
+ , m_gfxdecode(*this, "gfxdecode")
+ , m_palette(*this, "palette")
+ , m_maincpu(*this, "maincpu")
+ , m_master(*this, "master")
+ , m_slave(*this, "slave")
+ , m_mcu(*this, "mcu")
+ , m_iomcu(*this, "iomcu")
+ , m_shareram(*this, "shareram")
+ , m_eeprom(*this, "eeprom")
+ , m_pSlaveExternalRAM(*this, "slaveextram")
+ , m_pMasterExternalRAM(*this, "masterextram")
+ , m_paletteram(*this, "paletteram")
+ , m_cgram(*this, "cgram")
+ , m_textram(*this, "textram")
+ , m_polygonram(*this, "polygonram")
+ , m_mixer(*this, "video_mixer")
+ , m_gamma_proms(*this, "gamma_proms")
+ , m_vics_data(*this, "vics_data")
+ , m_vics_control(*this, "vics_control")
+ , m_tilemapattr(*this, "tilemapattr")
+ , m_motor_timer(*this, "motor_timer")
+ , m_pc_pedal_interrupt(*this, "pc_p_int")
+ , m_screen(*this, "screen")
+ , m_adc_ports(*this, "ADC.%u", 0)
+ , m_p1(*this, "P1")
+ , m_p2(*this, "P2")
+ , m_mcup5a(*this, "MCUP5A")
+ , m_mcup5b(*this, "MCUP5B")
+ , m_led(*this, "led")
+ , m_cpuled(*this, "cpuled%u", 0U)
{ }
- required_device<cpu_device> m_maincpu;
- required_device<cpu_device> m_master;
- required_device<cpu_device> m_slave;
- required_device<cpu_device> m_mcu;
- optional_device<cpu_device> m_iomcu;
optional_shared_ptr<uint32_t> m_spriteram;
- required_shared_ptr<uint32_t> m_shareram;
- required_device<eeprom_parallel_28xx_device> m_eeprom;
- required_shared_ptr<uint16_t> m_pSlaveExternalRAM;
- required_shared_ptr<uint16_t> m_pMasterExternalRAM;
- required_shared_ptr<uint32_t> m_paletteram;
- required_shared_ptr<uint32_t> m_cgram;
- required_shared_ptr<uint32_t> m_textram;
- required_shared_ptr<uint32_t> m_polygonram;
- required_shared_ptr<uint32_t> m_mixer;
- optional_region_ptr<uint8_t> m_gamma_proms;
- optional_shared_ptr<uint32_t> m_vics_data;
- optional_shared_ptr<uint32_t> m_vics_control;
optional_shared_ptr<uint32_t> m_czattr;
- required_shared_ptr<uint32_t> m_tilemapattr;
optional_shared_ptr<uint32_t> m_czram;
- optional_device<timer_device> m_motor_timer;
- optional_device<timer_device> m_pc_pedal_interrupt;
required_device<gfxdecode_device> m_gfxdecode;
- required_device<screen_device> m_screen;
required_device<palette_device> m_palette;
- optional_ioport_array<8> m_adc_ports;
- optional_ioport m_p1;
- optional_ioport m_p2;
- optional_ioport m_mcup5a;
- optional_ioport m_mcup5b;
-
- uint8_t m_syscontrol[0x20];
- bool m_dsp_irq_enabled;
- emu_timer *m_ar_tb_interrupt[2];
- uint16_t m_dsp_master_bioz;
- std::unique_ptr<uint32_t[]> m_pointram;
- uint32_t m_old_coin_state;
- uint32_t m_credits1;
- uint32_t m_credits2;
- uint32_t m_point_address;
- uint32_t m_point_data;
- uint16_t m_SerialDataSlaveToMasterNext;
- uint16_t m_SerialDataSlaveToMasterCurrent;
- int m_RenderBufSize;
- uint16_t m_RenderBufData[NAMCOS22_MAX_RENDER_CMD_SEQ];
- uint16_t m_portbits[2];
- int m_irq_state;
- namcos22_dsp_upload_state m_dsp_upload_state;
- int m_UploadDestIdx;
- uint32_t m_alpinesa_protection;
- int m_motor_status;
- int m_p4;
- uint16_t m_su_82;
- uint16_t m_keycus_id;
- uint16_t m_keycus_rng;
- int m_gametype;
- int m_is_ss22;
- int m_chipselect;
- int m_spot_enable;
- int m_spot_read_address;
- int m_spot_write_address;
- std::unique_ptr<uint16_t[]> m_spotram;
- std::unique_ptr<uint16_t[]> m_banked_czram[4];
- std::unique_ptr<uint8_t[]> m_recalc_czram[4];
- uint32_t m_cz_was_written[4];
- int m_cz_adjust;
- namcos22_renderer *m_poly;
+ int m_poly_translucency;
uint16_t *m_texture_tilemap;
std::unique_ptr<uint8_t[]> m_texture_tileattr;
uint8_t *m_texture_tiledata;
std::unique_ptr<uint8_t[]> m_texture_ayx_to_pixel;
- uint16_t m_dspram_bank;
- uint16_t m_dspram16_latch;
- bool m_slave_simulation_active;
- int32_t m_absolute_priority;
- int32_t m_objectshift;
- uint16_t m_PrimitiveID;
- float m_viewmatrix[4][4];
- uint8_t m_LitSurfaceInfo[NAMCOS22_MAX_LIT_SURFACES];
- int32_t m_SurfaceNormalFormat;
- unsigned m_LitSurfaceCount;
- unsigned m_LitSurfaceIndex;
- int m_pointrom_size;
- int32_t *m_pointrom;
- std::unique_ptr<uint8_t[]> m_dirtypal;
- std::unique_ptr<bitmap_ind16> m_mix_bitmap;
- tilemap_t *m_bgtilemap;
-
+ std::unique_ptr<uint8_t[]> m_recalc_czram[4];
+ int m_is_ss22;
int m_mixer_flags;
int m_fog_r;
int m_fog_g;
@@ -305,28 +230,14 @@ public:
int m_fog_g_per_cztype[4];
int m_fog_b_per_cztype[4];
uint32_t m_fog_colormask;
- int m_poly_fade_r;
- int m_poly_fade_g;
- int m_poly_fade_b;
- int m_poly_fade_enabled;
int m_screen_fade_r;
int m_screen_fade_g;
int m_screen_fade_b;
int m_screen_fade_factor;
- int m_spot_limit;
- int m_poly_translucency;
- int m_text_palbase;
-
- float m_camera_zoom;
- float m_camera_vx;
- float m_camera_vy;
- float m_camera_vw;
- float m_camera_vh;
- float m_camera_lx; // unit vector for light direction
- float m_camera_ly; // "
- float m_camera_lz; // "
- int m_camera_ambient; // 0.0..1.0
- int m_camera_power; // 0.0..1.0
+ int m_poly_fade_r;
+ int m_poly_fade_g;
+ int m_poly_fade_b;
+ int m_poly_fade_enabled;
DECLARE_WRITE32_MEMBER(namcos22s_czram_w);
DECLARE_READ32_MEMBER(namcos22s_czram_r);
@@ -486,9 +397,6 @@ public:
void init_alpinesa();
TILE_GET_INFO_MEMBER(get_text_tile_info);
- virtual void machine_reset() override;
- virtual void machine_start() override;
- virtual void video_start() override;
DECLARE_MACHINE_START(adillor);
uint32_t screen_update_namcos22s(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect);
uint32_t screen_update_namcos22(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect);
@@ -532,4 +440,103 @@ public:
void slave_dsp_io(address_map &map);
void slave_dsp_program(address_map &map);
void timecris_am(address_map &map);
+
+protected:
+ virtual void machine_reset() override;
+ virtual void machine_start() override;
+ virtual void video_start() override;
+
+ required_device<cpu_device> m_maincpu;
+ required_device<cpu_device> m_master;
+ required_device<cpu_device> m_slave;
+ required_device<cpu_device> m_mcu;
+ optional_device<cpu_device> m_iomcu;
+ required_shared_ptr<uint32_t> m_shareram;
+ required_device<eeprom_parallel_28xx_device> m_eeprom;
+ required_shared_ptr<uint16_t> m_pSlaveExternalRAM;
+ required_shared_ptr<uint16_t> m_pMasterExternalRAM;
+ required_shared_ptr<uint32_t> m_paletteram;
+ required_shared_ptr<uint32_t> m_cgram;
+ required_shared_ptr<uint32_t> m_textram;
+ required_shared_ptr<uint32_t> m_polygonram;
+ required_shared_ptr<uint32_t> m_mixer;
+ optional_region_ptr<uint8_t> m_gamma_proms;
+ optional_shared_ptr<uint32_t> m_vics_data;
+ optional_shared_ptr<uint32_t> m_vics_control;
+ required_shared_ptr<uint32_t> m_tilemapattr;
+ optional_device<timer_device> m_motor_timer;
+ optional_device<timer_device> m_pc_pedal_interrupt;
+ required_device<screen_device> m_screen;
+ optional_ioport_array<8> m_adc_ports;
+ optional_ioport m_p1;
+ optional_ioport m_p2;
+ optional_ioport m_mcup5a;
+ optional_ioport m_mcup5b;
+ output_finder<> m_led;
+ output_finder<8> m_cpuled;
+
+ uint8_t m_syscontrol[0x20];
+ bool m_dsp_irq_enabled;
+ emu_timer *m_ar_tb_interrupt[2];
+ uint16_t m_dsp_master_bioz;
+ std::unique_ptr<uint32_t[]> m_pointram;
+ uint32_t m_old_coin_state;
+ uint32_t m_credits1;
+ uint32_t m_credits2;
+ uint32_t m_point_address;
+ uint32_t m_point_data;
+ uint16_t m_SerialDataSlaveToMasterNext;
+ uint16_t m_SerialDataSlaveToMasterCurrent;
+ int m_RenderBufSize;
+ uint16_t m_RenderBufData[NAMCOS22_MAX_RENDER_CMD_SEQ];
+ uint16_t m_portbits[2];
+ int m_irq_state;
+ namcos22_dsp_upload_state m_dsp_upload_state;
+ int m_UploadDestIdx;
+ uint32_t m_alpinesa_protection;
+ int m_motor_status;
+ int m_p4;
+ uint16_t m_su_82;
+ uint16_t m_keycus_id;
+ uint16_t m_keycus_rng;
+ int m_gametype;
+ int m_chipselect;
+ int m_spot_enable;
+ int m_spot_read_address;
+ int m_spot_write_address;
+ std::unique_ptr<uint16_t[]> m_spotram;
+ std::unique_ptr<uint16_t[]> m_banked_czram[4];
+ uint32_t m_cz_was_written[4];
+ int m_cz_adjust;
+ namcos22_renderer *m_poly;
+ uint16_t m_dspram_bank;
+ uint16_t m_dspram16_latch;
+ bool m_slave_simulation_active;
+ int32_t m_absolute_priority;
+ int32_t m_objectshift;
+ uint16_t m_PrimitiveID;
+ float m_viewmatrix[4][4];
+ uint8_t m_LitSurfaceInfo[NAMCOS22_MAX_LIT_SURFACES];
+ int32_t m_SurfaceNormalFormat;
+ unsigned m_LitSurfaceCount;
+ unsigned m_LitSurfaceIndex;
+ int m_pointrom_size;
+ int32_t *m_pointrom;
+ std::unique_ptr<uint8_t[]> m_dirtypal;
+ std::unique_ptr<bitmap_ind16> m_mix_bitmap;
+ tilemap_t *m_bgtilemap;
+
+ int m_spot_limit;
+ int m_text_palbase;
+
+ float m_camera_zoom;
+ float m_camera_vx;
+ float m_camera_vy;
+ float m_camera_vw;
+ float m_camera_vh;
+ float m_camera_lx; // unit vector for light direction
+ float m_camera_ly; // "
+ float m_camera_lz; // "
+ int m_camera_ambient; // 0.0..1.0
+ int m_camera_power; // 0.0..1.0
};
diff --git a/src/mame/includes/namcos86.h b/src/mame/includes/namcos86.h
index 21703cdbe82..42b04197f79 100644
--- a/src/mame/includes/namcos86.h
+++ b/src/mame/includes/namcos86.h
@@ -18,29 +18,8 @@ public:
, m_rthunder_videoram2(*this, "videoram2")
, m_rthunder_spriteram(*this, "spriteram")
, m_user1_ptr(*this, "user1")
- {
- }
-
- required_device<cpu_device> m_cpu1;
- required_device<cpu_device> m_cpu2;
- required_device<watchdog_timer_device> m_watchdog;
- required_device<namco_cus30_device> m_cus30;
- required_device<gfxdecode_device> m_gfxdecode;
- required_device<palette_device> m_palette;
- required_shared_ptr<uint8_t> m_rthunder_videoram1;
- required_shared_ptr<uint8_t> m_rthunder_videoram2;
- required_shared_ptr<uint8_t> m_rthunder_spriteram;
- optional_region_ptr<uint8_t> m_user1_ptr;
-
- uint8_t *m_spriteram;
- int m_wdog;
- int m_tilebank;
- int m_xscroll[4];
- int m_yscroll[4];
- tilemap_t *m_bg_tilemap[4];
- int m_backcolor;
- const uint8_t *m_tile_address_prom;
- int m_copy_sprites;
+ , m_led(*this, "led%u", 0U)
+ { }
DECLARE_WRITE8_MEMBER(bankswitch1_w);
DECLARE_WRITE8_MEMBER(bankswitch1_ext_w);
@@ -71,8 +50,6 @@ public:
TILE_GET_INFO_MEMBER(get_tile_info3);
void init_namco86();
- virtual void machine_start() override;
- virtual void video_start() override;
DECLARE_PALETTE_INIT(namcos86);
uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
@@ -98,6 +75,33 @@ public:
void rthunder_mcu_map(address_map &map);
void wndrmomo_cpu2_map(address_map &map);
void wndrmomo_mcu_map(address_map &map);
+
+protected:
+ virtual void machine_start() override;
+ virtual void video_start() override;
+
+ required_device<cpu_device> m_cpu1;
+ required_device<cpu_device> m_cpu2;
+ required_device<watchdog_timer_device> m_watchdog;
+ required_device<namco_cus30_device> m_cus30;
+ required_device<gfxdecode_device> m_gfxdecode;
+ required_device<palette_device> m_palette;
+ required_shared_ptr<uint8_t> m_rthunder_videoram1;
+ required_shared_ptr<uint8_t> m_rthunder_videoram2;
+ required_shared_ptr<uint8_t> m_rthunder_spriteram;
+ optional_region_ptr<uint8_t> m_user1_ptr;
+ output_finder<2> m_led;
+
+ uint8_t *m_spriteram;
+ int m_wdog;
+ int m_tilebank;
+ int m_xscroll[4];
+ int m_yscroll[4];
+ tilemap_t *m_bg_tilemap[4];
+ int m_backcolor;
+ const uint8_t *m_tile_address_prom;
+ int m_copy_sprites;
+
private:
inline void get_tile_info(tile_data &tileinfo,int tile_index,int layer,uint8_t *vram);
void set_scroll(int layer);
diff --git a/src/mame/includes/nitedrvr.h b/src/mame/includes/nitedrvr.h
index e4151e6dc94..6b6a7112fc7 100644
--- a/src/mame/includes/nitedrvr.h
+++ b/src/mame/includes/nitedrvr.h
@@ -32,7 +32,8 @@ public:
m_maincpu(*this, "maincpu"),
m_discrete(*this, "discrete"),
m_gfxdecode(*this, "gfxdecode"),
- m_palette(*this, "palette")
+ m_palette(*this, "palette"),
+ m_led(*this, "led")
{ }
void nitedrvr(machine_config &config);
@@ -80,6 +81,7 @@ private:
required_device<discrete_device> m_discrete;
required_device<gfxdecode_device> m_gfxdecode;
required_device<palette_device> m_palette;
+ output_finder<> m_led;
};
/*----------- defined in audio/nitedrvr.c -----------*/
diff --git a/src/mame/includes/norautp.h b/src/mame/includes/norautp.h
index e0c40389045..672d1f73133 100644
--- a/src/mame/includes/norautp.h
+++ b/src/mame/includes/norautp.h
@@ -18,16 +18,17 @@
class norautp_state : public driver_device
{
public:
- norautp_state(const machine_config &mconfig, device_type type, const char *tag)
- : driver_device(mconfig, type, tag) ,
+ norautp_state(const machine_config &mconfig, device_type type, const char *tag) :
+ driver_device(mconfig, type, tag),
m_maincpu(*this, "maincpu"),
m_ppi8255(*this, "ppi8255_%u", 0),
m_discrete(*this, "discrete"),
m_gfxdecode(*this, "gfxdecode"),
m_screen(*this, "screen"),
- m_palette(*this, "palette") { }
+ m_palette(*this, "palette"),
+ m_lamp(*this, "lamp%u", 0U)
+ { }
- std::unique_ptr<uint16_t[]> m_np_vram;
DECLARE_WRITE_LINE_MEMBER(ppi2_obf_w);
TIMER_CALLBACK_MEMBER(ppi2_ack);
DECLARE_READ8_MEMBER(test2_r);
@@ -37,15 +38,8 @@ public:
void init_ssa();
void init_enc();
void init_deb();
- virtual void video_start() override;
DECLARE_PALETTE_INIT(norautp);
uint32_t screen_update_norautp(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
- required_device<cpu_device> m_maincpu;
- required_device_array<i8255_device, 3> m_ppi8255;
- required_device<discrete_device> m_discrete;
- required_device<gfxdecode_device> m_gfxdecode;
- required_device<screen_device> m_screen;
- required_device<palette_device> m_palette;
void noraut_base(machine_config &config);
void kimble(machine_config &config);
void kimbldhl(machine_config &config);
@@ -75,6 +69,19 @@ public:
void norautxp_portmap(address_map &map);
void nortest1_map(address_map &map);
void ssjkrpkr_map(address_map &map);
+
+protected:
+ virtual void machine_start() override { m_lamp.resolve(); }
+ virtual void video_start() override;
+
+ std::unique_ptr<uint16_t[]> m_np_vram;
+ required_device<cpu_device> m_maincpu;
+ required_device_array<i8255_device, 3> m_ppi8255;
+ required_device<discrete_device> m_discrete;
+ required_device<gfxdecode_device> m_gfxdecode;
+ required_device<screen_device> m_screen;
+ required_device<palette_device> m_palette;
+ output_finder<12> m_lamp;
};
/*----------- defined in audio/norautp.c -----------*/
diff --git a/src/mame/includes/overdriv.h b/src/mame/includes/overdriv.h
index de6a1f2ba0f..7d7c6e8da10 100644
--- a/src/mame/includes/overdriv.h
+++ b/src/mame/includes/overdriv.h
@@ -18,37 +18,19 @@ class overdriv_state : public driver_device
{
public:
overdriv_state(const machine_config &mconfig, device_type type, const char *tag)
- : driver_device(mconfig, type, tag),
- m_maincpu(*this, "maincpu"),
- m_subcpu(*this, "sub"),
- m_audiocpu(*this, "audiocpu"),
- m_k051316_1(*this, "k051316_1"),
- m_k051316_2(*this, "k051316_2"),
- m_k053246(*this, "k053246"),
- m_k053251(*this, "k053251"),
- m_k053252(*this, "k053252"),
- m_screen(*this, "screen")
+ : driver_device(mconfig, type, tag)
+ , m_maincpu(*this, "maincpu")
+ , m_subcpu(*this, "sub")
+ , m_audiocpu(*this, "audiocpu")
+ , m_k051316_1(*this, "k051316_1")
+ , m_k051316_2(*this, "k051316_2")
+ , m_k053246(*this, "k053246")
+ , m_k053251(*this, "k053251")
+ , m_k053252(*this, "k053252")
+ , m_screen(*this, "screen")
+ , m_led(*this, "led0")
{ }
- /* video-related */
- int m_zoom_colorbase[2];
- int m_road_colorbase[2];
- int m_sprite_colorbase;
- emu_timer *m_objdma_end_timer;
-
- /* misc */
- uint16_t m_cpuB_ctrl;
-
- /* devices */
- required_device<cpu_device> m_maincpu;
- required_device<cpu_device> m_subcpu;
- required_device<cpu_device> m_audiocpu;
- required_device<k051316_device> m_k051316_1;
- required_device<k051316_device> m_k051316_2;
- required_device<k053247_device> m_k053246;
- required_device<k053251_device> m_k053251;
- required_device<k053252_device> m_k053252;
- required_device<screen_device> m_screen;
DECLARE_WRITE16_MEMBER(eeprom_w);
DECLARE_WRITE16_MEMBER(cpuA_ctrl_w);
DECLARE_READ16_MEMBER(cpuB_ctrl_r);
@@ -60,12 +42,9 @@ public:
DECLARE_WRITE16_MEMBER(objdma_w);
TIMER_CALLBACK_MEMBER(objdma_end_cb);
- virtual void machine_start() override;
- virtual void machine_reset() override;
uint32_t screen_update_overdriv(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
//INTERRUPT_GEN_MEMBER(cpuB_interrupt);
TIMER_DEVICE_CALLBACK_MEMBER(overdriv_cpuA_scanline);
- int m_fake_timer;
K051316_CB_MEMBER(zoom_callback_1);
K051316_CB_MEMBER(zoom_callback_2);
@@ -75,4 +54,30 @@ public:
void overdriv_master_map(address_map &map);
void overdriv_slave_map(address_map &map);
void overdriv_sound_map(address_map &map);
+
+protected:
+ virtual void machine_start() override;
+ virtual void machine_reset() override;
+
+ /* video-related */
+ int m_zoom_colorbase[2];
+ int m_road_colorbase[2];
+ int m_sprite_colorbase;
+ emu_timer *m_objdma_end_timer;
+
+ /* misc */
+ uint16_t m_cpuB_ctrl;
+
+ /* devices */
+ required_device<cpu_device> m_maincpu;
+ required_device<cpu_device> m_subcpu;
+ required_device<cpu_device> m_audiocpu;
+ required_device<k051316_device> m_k051316_1;
+ required_device<k051316_device> m_k051316_2;
+ required_device<k053247_device> m_k053246;
+ required_device<k053251_device> m_k053251;
+ required_device<k053252_device> m_k053252;
+ required_device<screen_device> m_screen;
+ output_finder<> m_led;
+ int m_fake_timer;
};
diff --git a/src/mame/includes/pmd85.h b/src/mame/includes/pmd85.h
index cbc4c75651e..8d72c8df857 100644
--- a/src/mame/includes/pmd85.h
+++ b/src/mame/includes/pmd85.h
@@ -24,8 +24,8 @@ public:
TIMER_CASSETTE
};
- pmd85_state(const machine_config &mconfig, device_type type, const char *tag)
- : driver_device(mconfig, type, tag),
+ pmd85_state(const machine_config &mconfig, device_type type, const char *tag) :
+ driver_device(mconfig, type, tag),
m_maincpu(*this, "maincpu"),
m_ram(*this, RAM_TAG),
m_cassette(*this, "cassette"),
@@ -53,7 +53,9 @@ public:
m_bank15(*this, "bank15"),
m_bank16(*this, "bank16"),
m_io_dsw0(*this, "DSW0"),
- m_palette(*this, "palette") { }
+ m_palette(*this, "palette"),
+ m_led(*this, "led%u", 0U)
+ { }
uint8_t m_rom_module_present;
uint8_t m_ppi_port_outputs[4][3];
@@ -124,6 +126,8 @@ public:
void pmd85_io_map(address_map &map);
void pmd85_mem(address_map &map);
protected:
+ virtual void machine_start() override { m_led.resolve(); }
+
required_device<cpu_device> m_maincpu;
required_device<ram_device> m_ram;
required_device<cassette_image_device> m_cassette;
@@ -153,6 +157,7 @@ protected:
optional_ioport m_io_dsw0;
ioport_port *m_io_port[16];
required_device<palette_device> m_palette;
+ output_finder<3> m_led;
void pmd851_update_memory();
void pmd852a_update_memory();
diff --git a/src/mame/includes/polyplay.h b/src/mame/includes/polyplay.h
index 1f217a50cf3..70c6bd37cac 100644
--- a/src/mame/includes/polyplay.h
+++ b/src/mame/includes/polyplay.h
@@ -19,8 +19,8 @@
class polyplay_state : public driver_device
{
public:
- polyplay_state(const machine_config &mconfig, device_type type, const char *tag)
- : driver_device(mconfig, type, tag),
+ polyplay_state(const machine_config &mconfig, device_type type, const char *tag) :
+ driver_device(mconfig, type, tag),
m_videoram(*this, "videoram"),
m_characterram(*this, "characterram"),
m_maincpu(*this, Z80CPU_TAG),
@@ -31,18 +31,9 @@ public:
m_gfxdecode(*this, "gfxdecode"),
m_palette(*this, "palette"),
m_speaker1(*this, "speaker1"),
- m_speaker2(*this, "speaker2") { }
-
- required_shared_ptr<uint8_t> m_videoram;
- required_shared_ptr<uint8_t> m_characterram;
-
- required_device<cpu_device> m_maincpu;
- required_device<z80ctc_device> m_z80ctc;
- required_device<z80pio_device> m_z80pio;
- optional_device<z80sio_device> m_z80sio;
- required_ioport m_in0_port;
- required_device<gfxdecode_device> m_gfxdecode;
- required_device<palette_device> m_palette;
+ m_speaker2(*this, "speaker2"),
+ m_lamp(*this, "lamp%u", 0U)
+ { }
INTERRUPT_GEN_MEMBER(nmi_handler);
@@ -58,14 +49,6 @@ public:
DECLARE_INPUT_CHANGED_MEMBER(input_changed);
- /* audio */
- uint8_t m_flipflop1;
- uint8_t m_flipflop2;
- required_device<speaker_sound_device> m_speaker1;
- required_device<speaker_sound_device> m_speaker2;
-
- /* video */
- virtual void video_start() override;
DECLARE_WRITE8_MEMBER(polyplay_characterram_w);
DECLARE_PALETTE_INIT(polyplay);
uint32_t screen_update_polyplay(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
@@ -75,6 +58,28 @@ public:
void polyplay_io_zrepp(address_map &map);
void polyplay_mem_zre(address_map &map);
void polyplay_mem_zrepp(address_map &map);
+
+protected:
+ virtual void machine_start() override { m_lamp.resolve(); }
+ virtual void video_start() override;
+
+ required_shared_ptr<uint8_t> m_videoram;
+ required_shared_ptr<uint8_t> m_characterram;
+
+ required_device<cpu_device> m_maincpu;
+ required_device<z80ctc_device> m_z80ctc;
+ required_device<z80pio_device> m_z80pio;
+ optional_device<z80sio_device> m_z80sio;
+ required_ioport m_in0_port;
+ required_device<gfxdecode_device> m_gfxdecode;
+ required_device<palette_device> m_palette;
+
+ /* audio */
+ uint8_t m_flipflop1;
+ uint8_t m_flipflop2;
+ required_device<speaker_sound_device> m_speaker1;
+ required_device<speaker_sound_device> m_speaker2;
+ output_finder<5> m_lamp;
};
#endif // MAME_INCLUDES_POLYPLAY_H
diff --git a/src/mame/includes/poolshrk.h b/src/mame/includes/poolshrk.h
index bc2029c8d31..5bef83a8f04 100644
--- a/src/mame/includes/poolshrk.h
+++ b/src/mame/includes/poolshrk.h
@@ -27,7 +27,8 @@ public:
m_discrete(*this, "discrete"),
m_playfield_ram(*this, "playfield_ram"),
m_hpos_ram(*this, "hpos_ram"),
- m_vpos_ram(*this, "vpos_ram")
+ m_vpos_ram(*this, "vpos_ram"),
+ m_led(*this, "led%u", 0U)
{ }
void init_poolshrk();
@@ -51,6 +52,7 @@ protected:
uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
virtual void video_start() override;
void poolshrk_cpu_map(address_map &map);
+ virtual void machine_start() override { m_led.resolve(); }
private:
required_device<cpu_device> m_maincpu;
@@ -62,6 +64,7 @@ private:
required_shared_ptr<uint8_t> m_playfield_ram;
required_shared_ptr<uint8_t> m_hpos_ram;
required_shared_ptr<uint8_t> m_vpos_ram;
+ output_finder<2> m_led;
tilemap_t* m_bg_tilemap;
int m_da_latch;
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;
};
diff --git a/src/mame/includes/runaway.h b/src/mame/includes/runaway.h
index 87a33b920f1..2535986af53 100644
--- a/src/mame/includes/runaway.h
+++ b/src/mame/includes/runaway.h
@@ -6,19 +6,16 @@ class runaway_state : public driver_device
{
public:
runaway_state(const machine_config &mconfig, device_type type, const char *tag)
- : driver_device(mconfig, type, tag),
- m_video_ram(*this, "video_ram"),
- m_sprite_ram(*this, "sprite_ram"),
- m_maincpu(*this, "maincpu"),
- m_gfxdecode(*this, "gfxdecode"),
- m_screen(*this, "screen"),
- m_palette(*this, "palette") { }
+ : driver_device(mconfig, type, tag)
+ , m_video_ram(*this, "video_ram")
+ , m_sprite_ram(*this, "sprite_ram")
+ , m_maincpu(*this, "maincpu")
+ , m_gfxdecode(*this, "gfxdecode")
+ , m_screen(*this, "screen")
+ , m_palette(*this, "palette")
+ , m_led(*this, "led%u", 0U)
+ { }
- emu_timer *m_interrupt_timer;
- required_shared_ptr<uint8_t> m_video_ram;
- required_shared_ptr<uint8_t> m_sprite_ram;
- tilemap_t *m_bg_tilemap;
- int m_tile_bank;
DECLARE_READ8_MEMBER(runaway_input_r);
DECLARE_WRITE8_MEMBER(runaway_led_w);
DECLARE_WRITE8_MEMBER(runaway_irq_ack_w);
@@ -28,18 +25,27 @@ public:
DECLARE_READ8_MEMBER(runaway_pot_r);
TILE_GET_INFO_MEMBER(runaway_get_tile_info);
TILE_GET_INFO_MEMBER(qwak_get_tile_info);
- virtual void machine_start() override;
- virtual void machine_reset() override;
- virtual void video_start() override;
DECLARE_VIDEO_START(qwak);
uint32_t screen_update_runaway(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
uint32_t screen_update_qwak(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
TIMER_CALLBACK_MEMBER(interrupt_callback);
+ void qwak(machine_config &config);
+ void runaway(machine_config &config);
+ void runaway_map(address_map &map);
+
+protected:
+ virtual void machine_start() override;
+ virtual void machine_reset() override;
+ virtual void video_start() override;
+
+ emu_timer *m_interrupt_timer;
+ required_shared_ptr<uint8_t> m_video_ram;
+ required_shared_ptr<uint8_t> m_sprite_ram;
+ tilemap_t *m_bg_tilemap;
+ int m_tile_bank;
required_device<cpu_device> m_maincpu;
required_device<gfxdecode_device> m_gfxdecode;
required_device<screen_device> m_screen;
required_device<palette_device> m_palette;
- void qwak(machine_config &config);
- void runaway(machine_config &config);
- void runaway_map(address_map &map);
+ output_finder<2> m_led;
};
diff --git a/src/mame/includes/sage2.h b/src/mame/includes/sage2.h
index 463255ff862..5542a6716ec 100644
--- a/src/mame/includes/sage2.h
+++ b/src/mame/includes/sage2.h
@@ -29,23 +29,48 @@ class sage2_state : public driver_device
{
public:
sage2_state(const machine_config &mconfig, device_type type, const char *tag)
- : driver_device(mconfig, type, tag),
- m_maincpu(*this, M68000_TAG),
- m_pic(*this, I8259_TAG),
- m_usart0(*this, I8251_0_TAG),
- m_usart1(*this, I8251_1_TAG),
- m_fdc(*this, UPD765_TAG),
- m_ram(*this, RAM_TAG),
- m_rom(*this, M68000_TAG),
- m_floppy0(*this, UPD765_TAG ":0"),
- m_floppy1(*this, UPD765_TAG ":1"),
- m_floppy(nullptr),
- m_centronics(*this, CENTRONICS_TAG),
- m_ieee488(*this, IEEE488_TAG),
- m_fdc_int(0),
- m_fdie(0)
+ : driver_device(mconfig, type, tag)
+ , m_maincpu(*this, M68000_TAG)
+ , m_pic(*this, I8259_TAG)
+ , m_usart0(*this, I8251_0_TAG)
+ , m_usart1(*this, I8251_1_TAG)
+ , m_fdc(*this, UPD765_TAG)
+ , m_ram(*this, RAM_TAG)
+ , m_rom(*this, M68000_TAG)
+ , m_floppy0(*this, UPD765_TAG ":0")
+ , m_floppy1(*this, UPD765_TAG ":1")
+ , m_floppy(nullptr)
+ , m_centronics(*this, CENTRONICS_TAG)
+ , m_ieee488(*this, IEEE488_TAG)
+ , m_fdc_int(0)
+ , m_fdie(0)
+ , m_led(*this, "led0")
{ }
+ void update_fdc_int();
+
+ DECLARE_READ16_MEMBER(rom_r);
+ DECLARE_WRITE_LINE_MEMBER( br1_w );
+ DECLARE_WRITE_LINE_MEMBER( br2_w );
+ DECLARE_WRITE8_MEMBER( ppi0_pc_w );
+ DECLARE_READ8_MEMBER( ppi1_pb_r );
+ DECLARE_WRITE8_MEMBER( ppi1_pc_w );
+
+ DECLARE_WRITE_LINE_MEMBER( fdc_irq );
+
+ DECLARE_WRITE_LINE_MEMBER(write_centronics_ack);
+ DECLARE_WRITE_LINE_MEMBER(write_centronics_busy);
+ DECLARE_WRITE_LINE_MEMBER(write_centronics_perror);
+ DECLARE_WRITE_LINE_MEMBER(write_centronics_select);
+ DECLARE_WRITE_LINE_MEMBER(write_centronics_fault);
+ void sage2(machine_config &config);
+ void sage2_mem(address_map &map);
+ void init_sage2();
+
+protected:
+ virtual void machine_start() override;
+ virtual void machine_reset() override;
+
required_device<cpu_device> m_maincpu;
required_device<pic8259_device> m_pic;
required_device<i8251_device> m_usart0;
@@ -59,35 +84,13 @@ public:
required_device<centronics_device> m_centronics;
required_device<ieee488_device> m_ieee488;
- virtual void machine_start() override;
- virtual void machine_reset() override;
-
- void update_fdc_int();
-
- DECLARE_READ16_MEMBER(rom_r);
- DECLARE_WRITE_LINE_MEMBER( br1_w );
- DECLARE_WRITE_LINE_MEMBER( br2_w );
- DECLARE_WRITE8_MEMBER( ppi0_pc_w );
- DECLARE_READ8_MEMBER( ppi1_pb_r );
- DECLARE_WRITE8_MEMBER( ppi1_pc_w );
-
- DECLARE_WRITE_LINE_MEMBER( fdc_irq );
-
// floppy state
int m_fdc_int;
int m_fdie;
- void init_sage2();
int m_centronics_busy;
int m_centronics_perror;
int m_centronics_select;
int m_centronics_fault;
-
- DECLARE_WRITE_LINE_MEMBER(write_centronics_ack);
- DECLARE_WRITE_LINE_MEMBER(write_centronics_busy);
- DECLARE_WRITE_LINE_MEMBER(write_centronics_perror);
- DECLARE_WRITE_LINE_MEMBER(write_centronics_select);
- DECLARE_WRITE_LINE_MEMBER(write_centronics_fault);
- void sage2(machine_config &config);
- void sage2_mem(address_map &map);
+ output_finder<> m_led;
};
diff --git a/src/mame/includes/sderby.h b/src/mame/includes/sderby.h
index 4fbe0a49258..2f59f662640 100644
--- a/src/mame/includes/sderby.h
+++ b/src/mame/includes/sderby.h
@@ -3,26 +3,18 @@
class sderby_state : public driver_device
{
public:
- sderby_state(const machine_config &mconfig, device_type type, const char *tag)
- : driver_device(mconfig, type, tag),
+ sderby_state(const machine_config &mconfig, device_type type, const char *tag) :
+ driver_device(mconfig, type, tag),
m_videoram(*this, "videoram"),
m_md_videoram(*this, "md_videoram"),
m_fg_videoram(*this, "fg_videoram"),
m_spriteram(*this, "spriteram"),
m_maincpu(*this, "maincpu"),
m_gfxdecode(*this, "gfxdecode"),
- m_palette(*this, "palette") { }
+ m_palette(*this, "palette"),
+ m_lamp(*this, "lamp%u", 0U)
+ { }
- required_shared_ptr<uint16_t> m_videoram;
- required_shared_ptr<uint16_t> m_md_videoram;
- required_shared_ptr<uint16_t> m_fg_videoram;
- required_shared_ptr<uint16_t> m_spriteram;
-
- tilemap_t *m_tilemap;
- tilemap_t *m_md_tilemap;
- tilemap_t *m_fg_tilemap;
-
- uint16_t m_scroll[6];
DECLARE_READ16_MEMBER(sderby_input_r);
DECLARE_READ16_MEMBER(sderbya_input_r);
DECLARE_READ16_MEMBER(roulette_input_r);
@@ -38,13 +30,9 @@ public:
TILE_GET_INFO_MEMBER(get_sderby_tile_info);
TILE_GET_INFO_MEMBER(get_sderby_md_tile_info);
TILE_GET_INFO_MEMBER(get_sderby_fg_tile_info);
- virtual void video_start() override;
uint32_t screen_update_sderby(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
uint32_t screen_update_pmroulet(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
void draw_sprites(bitmap_ind16 &bitmap,const rectangle &cliprect,int codeshift);
- required_device<cpu_device> m_maincpu;
- required_device<gfxdecode_device> m_gfxdecode;
- required_device<palette_device> m_palette;
void spacewin(machine_config &config);
void sderbya(machine_config &config);
void pmroulet(machine_config &config);
@@ -57,4 +45,23 @@ public:
void sderbya_map(address_map &map);
void shinygld_map(address_map &map);
void spacewin_map(address_map &map);
+
+protected:
+ virtual void machine_start() override { m_lamp.resolve(); }
+ virtual void video_start() override;
+
+ required_shared_ptr<uint16_t> m_videoram;
+ required_shared_ptr<uint16_t> m_md_videoram;
+ required_shared_ptr<uint16_t> m_fg_videoram;
+ required_shared_ptr<uint16_t> m_spriteram;
+
+ tilemap_t *m_tilemap;
+ tilemap_t *m_md_tilemap;
+ tilemap_t *m_fg_tilemap;
+
+ uint16_t m_scroll[6];
+ required_device<cpu_device> m_maincpu;
+ required_device<gfxdecode_device> m_gfxdecode;
+ required_device<palette_device> m_palette;
+ output_finder<8> m_lamp;
};
diff --git a/src/mame/includes/segahang.h b/src/mame/includes/segahang.h
index aa6c1b235af..9547dbf3379 100644
--- a/src/mame/includes/segahang.h
+++ b/src/mame/includes/segahang.h
@@ -24,22 +24,23 @@ class segahang_state : public sega_16bit_common_base
public:
// construction/destruction
segahang_state(const machine_config &mconfig, device_type type, const char *tag)
- : sega_16bit_common_base(mconfig, type, tag),
- m_maincpu(*this, "maincpu"),
- m_subcpu(*this, "subcpu"),
- m_soundcpu(*this, "soundcpu"),
- m_mcu(*this, "mcu"),
- m_i8255_1(*this, "i8255_1"),
- m_i8255_2(*this, "i8255_2"),
- m_sprites(*this, "sprites"),
- m_segaic16vid(*this, "segaic16vid"),
- m_segaic16road(*this, "segaic16road"),
- m_soundlatch(*this, "soundlatch"),
- m_workram(*this, "workram"),
- m_sharrier_video(false),
- m_adc_select(0),
- m_adc_ports(*this, {"ADC0", "ADC1", "ADC2", "ADC3"}),
- m_decrypted_opcodes(*this, "decrypted_opcodes")
+ : sega_16bit_common_base(mconfig, type, tag)
+ , m_maincpu(*this, "maincpu")
+ , m_subcpu(*this, "subcpu")
+ , m_soundcpu(*this, "soundcpu")
+ , m_mcu(*this, "mcu")
+ , m_i8255_1(*this, "i8255_1")
+ , m_i8255_2(*this, "i8255_2")
+ , m_sprites(*this, "sprites")
+ , m_segaic16vid(*this, "segaic16vid")
+ , m_segaic16road(*this, "segaic16road")
+ , m_soundlatch(*this, "soundlatch")
+ , m_workram(*this, "workram")
+ , m_sharrier_video(false)
+ , m_adc_select(0)
+ , m_adc_ports(*this, {"ADC0", "ADC1", "ADC2", "ADC3"})
+ , m_decrypted_opcodes(*this, "decrypted_opcodes")
+ , m_lamp(*this, "lamp%u", 0U)
{ }
// PPI read/write callbacks
@@ -112,6 +113,7 @@ protected:
// driver overrides
virtual void video_start() override;
+ virtual void machine_start() override { m_lamp.resolve(); }
virtual void machine_reset() override;
virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) override;
@@ -142,4 +144,5 @@ protected:
optional_ioport_array<4> m_adc_ports;
bool m_shadow;
optional_shared_ptr<uint16_t> m_decrypted_opcodes;
+ output_finder<2> m_lamp;
};
diff --git a/src/mame/includes/segas16a.h b/src/mame/includes/segas16a.h
index b120a12a853..e10eb923192 100644
--- a/src/mame/includes/segas16a.h
+++ b/src/mame/includes/segas16a.h
@@ -29,31 +29,32 @@ class segas16a_state : public sega_16bit_common_base
public:
// construction/destruction
segas16a_state(const machine_config &mconfig, device_type type, const char *tag)
- : sega_16bit_common_base(mconfig, type, tag),
- m_maincpu(*this, "maincpu"),
- m_soundcpu(*this, "soundcpu"),
- m_mcu(*this, "mcu"),
- m_i8255(*this, "i8255"),
- m_ymsnd(*this, "ymsnd"),
- m_n7751(*this, "n7751"),
- m_n7751_i8243(*this, "n7751_8243"),
- m_nvram(*this, "nvram"),
- m_watchdog(*this, "watchdog"),
- m_segaic16vid(*this, "segaic16vid"),
- m_soundlatch(*this, "soundlatch"),
- m_sprites(*this, "sprites"),
- m_cxdio(*this, "cxdio"),
- m_workram(*this, "nvram"),
- m_sound_decrypted_opcodes(*this, "sound_decrypted_opcodes"),
- m_video_control(0),
- m_mcu_control(0),
- m_n7751_command(0),
- m_n7751_rom_address(0),
- m_last_buttons1(0),
- m_last_buttons2(0),
- m_read_port(0),
- m_mj_input_num(0),
- m_mj_inputs(*this, {"MJ0", "MJ1", "MJ2", "MJ3", "MJ4", "MJ5"})
+ : sega_16bit_common_base(mconfig, type, tag)
+ , m_maincpu(*this, "maincpu")
+ , m_soundcpu(*this, "soundcpu")
+ , m_mcu(*this, "mcu")
+ , m_i8255(*this, "i8255")
+ , m_ymsnd(*this, "ymsnd")
+ , m_n7751(*this, "n7751")
+ , m_n7751_i8243(*this, "n7751_8243")
+ , m_nvram(*this, "nvram")
+ , m_watchdog(*this, "watchdog")
+ , m_segaic16vid(*this, "segaic16vid")
+ , m_soundlatch(*this, "soundlatch")
+ , m_sprites(*this, "sprites")
+ , m_cxdio(*this, "cxdio")
+ , m_workram(*this, "nvram")
+ , m_sound_decrypted_opcodes(*this, "sound_decrypted_opcodes")
+ , m_video_control(0)
+ , m_mcu_control(0)
+ , m_n7751_command(0)
+ , m_n7751_rom_address(0)
+ , m_last_buttons1(0)
+ , m_last_buttons2(0)
+ , m_read_port(0)
+ , m_mj_input_num(0)
+ , m_mj_inputs(*this, {"MJ0", "MJ1", "MJ2", "MJ3", "MJ4", "MJ5"})
+ , m_lamp(*this, "lamp%u", 0U)
{ }
// PPI read/write callbacks
@@ -131,6 +132,7 @@ protected:
// driver overrides
virtual void video_start() override;
+ virtual void machine_start() override { m_lamp.resolve(); }
virtual void machine_reset() override;
virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) override;
@@ -182,6 +184,7 @@ protected:
uint8_t m_read_port;
uint8_t m_mj_input_num;
optional_ioport_array<6> m_mj_inputs;
+ output_finder<2> m_lamp;
};
class afighter_16a_analog_state : public segas16a_state
@@ -198,7 +201,7 @@ public:
DECLARE_CUSTOM_INPUT_MEMBER(afighter_handl_left_r);
DECLARE_CUSTOM_INPUT_MEMBER(afighter_handl_right_r);
- protected:
+protected:
required_ioport m_accel;
required_ioport m_steer;
};
diff --git a/src/mame/includes/segas16b.h b/src/mame/includes/segas16b.h
index 2f27137784a..a26960bd4e7 100644
--- a/src/mame/includes/segas16b.h
+++ b/src/mame/includes/segas16b.h
@@ -28,43 +28,44 @@ class segas16b_state : public sega_16bit_common_base
public:
// construction/destruction
segas16b_state(const machine_config &mconfig, device_type type, const char *tag)
- : sega_16bit_common_base(mconfig, type, tag),
- m_mapper(*this, "mapper"),
- m_maincpu(*this, "maincpu"),
- m_soundcpu(*this, "soundcpu"),
- m_mcu(*this, "mcu"),
- m_ym2151(*this, "ym2151"),
- m_ym2413(*this, "ym2413"),
- m_upd7759(*this, "upd"),
- m_multiplier(*this, "multiplier"),
- m_cmptimer_1(*this, "cmptimer_1"),
- m_cmptimer_2(*this, "cmptimer_2"),
- m_nvram(*this, "nvram"),
- m_sprites(*this, "sprites"),
- m_segaic16vid(*this, "segaic16vid"),
- m_soundlatch(*this, "soundlatch"),
- m_cxdio(*this, "cxdio"),
- m_upd4701a(*this, {"upd4701a1", "upd4701a2"}),
- m_workram(*this, "workram"),
- m_romboard(ROM_BOARD_INVALID),
- m_tilemap_type(segaic16_video_device::TILEMAP_16B),
- m_disable_screen_blanking(false),
- m_i8751_initial_config(nullptr),
- m_atomicp_sound_divisor(0),
- m_atomicp_sound_count(0),
- m_hwc_input_value(0),
- m_hwc_monitor(*this, "MONITOR"),
- m_hwc_left(*this, "LEFT"),
- m_hwc_right(*this, "RIGHT"),
- m_mj_input_num(0),
- m_mj_last_val(0),
- m_mj_inputs(*this, {"MJ0", "MJ1", "MJ2", "MJ3", "MJ4", "MJ5"}),
- m_spritepalbase(0x400),
- m_gfxdecode(*this, "gfxdecode"),
- m_sound_decrypted_opcodes(*this, "sound_decrypted_opcodes"),
- m_decrypted_opcodes(*this, "decrypted_opcodes"),
- m_bootleg_scroll(*this, "bootleg_scroll"),
- m_bootleg_page(*this, "bootleg_page")
+ : sega_16bit_common_base(mconfig, type, tag)
+ , m_mapper(*this, "mapper")
+ , m_maincpu(*this, "maincpu")
+ , m_soundcpu(*this, "soundcpu")
+ , m_mcu(*this, "mcu")
+ , m_ym2151(*this, "ym2151")
+ , m_ym2413(*this, "ym2413")
+ , m_upd7759(*this, "upd")
+ , m_multiplier(*this, "multiplier")
+ , m_cmptimer_1(*this, "cmptimer_1")
+ , m_cmptimer_2(*this, "cmptimer_2")
+ , m_nvram(*this, "nvram")
+ , m_sprites(*this, "sprites")
+ , m_segaic16vid(*this, "segaic16vid")
+ , m_soundlatch(*this, "soundlatch")
+ , m_cxdio(*this, "cxdio")
+ , m_upd4701a(*this, {"upd4701a1", "upd4701a2"})
+ , m_workram(*this, "workram")
+ , m_romboard(ROM_BOARD_INVALID)
+ , m_tilemap_type(segaic16_video_device::TILEMAP_16B)
+ , m_disable_screen_blanking(false)
+ , m_i8751_initial_config(nullptr)
+ , m_atomicp_sound_divisor(0)
+ , m_atomicp_sound_count(0)
+ , m_hwc_input_value(0)
+ , m_hwc_monitor(*this, "MONITOR")
+ , m_hwc_left(*this, "LEFT")
+ , m_hwc_right(*this, "RIGHT")
+ , m_mj_input_num(0)
+ , m_mj_last_val(0)
+ , m_mj_inputs(*this, {"MJ0", "MJ1", "MJ2", "MJ3", "MJ4", "MJ5"})
+ , m_spritepalbase(0x400)
+ , m_gfxdecode(*this, "gfxdecode")
+ , m_sound_decrypted_opcodes(*this, "sound_decrypted_opcodes")
+ , m_decrypted_opcodes(*this, "decrypted_opcodes")
+ , m_bootleg_scroll(*this, "bootleg_scroll")
+ , m_bootleg_page(*this, "bootleg_page")
+ , m_lamp(*this, "lamp%u", 0U)
{ }
// memory mapping
@@ -197,6 +198,7 @@ protected:
// device overrides
virtual void video_start() override;
+ virtual void machine_start() override { m_lamp.resolve(); }
virtual void machine_reset() override;
virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) override;
@@ -222,7 +224,7 @@ protected:
DECLARE_READ16_MEMBER( sjryuko_custom_io_r );
DECLARE_WRITE16_MEMBER( sjryuko_custom_io_w );
- protected:
+protected:
// devices
optional_device<sega_315_5195_mapper_device> m_mapper;
required_device<m68000_device> m_maincpu;
@@ -270,8 +272,7 @@ protected:
optional_shared_ptr<uint16_t> m_decrypted_opcodes;
optional_shared_ptr<uint16_t> m_bootleg_scroll;
optional_shared_ptr<uint16_t> m_bootleg_page;
-
-
+ output_finder<2> m_lamp;
};
class afighter_16b_analog_state : public segas16b_state
diff --git a/src/mame/includes/segas32.h b/src/mame/includes/segas32.h
index 3ae63918c3a..9dcbca0e44a 100644
--- a/src/mame/includes/segas32.h
+++ b/src/mame/includes/segas32.h
@@ -23,29 +23,6 @@ class segas32_state : public device_t
public:
segas32_state(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
- required_shared_ptr<uint8_t> m_z80_shared_ram;
- optional_shared_ptr<uint16_t> m_system32_workram;
- required_shared_ptr<uint16_t> m_system32_videoram;
- required_shared_ptr<uint16_t> m_system32_spriteram;
- optional_shared_ptr_array<uint16_t, 2> m_system32_paletteram;
-
- required_device<cpu_device> m_maincpu;
- required_device<cpu_device> m_soundcpu;
- optional_device<multipcm_device> m_multipcm;
- required_device<gfxdecode_device> m_gfxdecode;
- required_device<screen_device> m_screen;
- required_device<palette_device> m_palette;
-
- required_device<timer_device> m_irq_timer_0;
- required_device<timer_device> m_irq_timer_1;
- optional_device<s32comm_device> m_s32comm;
-
- required_region_ptr<uint32_t> m_sprite_region;
- required_memory_region m_maincpu_region;
- required_memory_bank m_soundrom_bank;
- optional_memory_bank m_multipcm_bank_hi;
- optional_memory_bank m_multipcm_bank_lo;
-
typedef void (segas32_state::*sys32_output_callback)(int which, uint16_t data);
struct layer_info
@@ -69,34 +46,6 @@ public:
uint8_t bank;
};
- uint8_t m_v60_irq_control[0x10];
- timer_device *m_v60_irq_timer[2];
- uint8_t m_sound_irq_control[4];
- uint8_t m_sound_irq_input;
- uint8_t m_sound_dummy_value;
- uint16_t m_sound_bank;
- sys32_output_callback m_sw1_output;
- sys32_output_callback m_sw2_output;
- sys32_output_callback m_sw3_output;
- std::unique_ptr<uint16_t[]> m_system32_protram;
- uint16_t m_system32_displayenable[2];
- uint16_t m_system32_tilebank_external;
- uint16_t m_arescue_dsp_io[6];
- uint8_t m_is_multi32;
- struct cache_entry *m_cache_head;
- struct layer_info m_layer_data[11];
- uint16_t m_mixer_control[2][0x40];
- std::unique_ptr<uint16_t[]> m_solid_0000;
- std::unique_ptr<uint16_t[]> m_solid_ffff;
- uint8_t m_sprite_render_count;
- uint8_t m_sprite_control_latched[8];
- uint8_t m_sprite_control[8];
- std::unique_ptr<uint32_t[]> m_spriteram_32bit;
- typedef void (segas32_state::*prot_vblank_func)();
- prot_vblank_func m_system32_prot_vblank;
- int m_print_count;
- emu_timer *m_vblank_end_int_timer;
- emu_timer *m_update_sprites_timer;
DECLARE_WRITE16_MEMBER(sonic_level_load_protection);
DECLARE_READ16_MEMBER(brival_protection_r);
DECLARE_WRITE16_MEMBER(brival_protection_w);
@@ -208,6 +157,7 @@ public:
void clear_sound_irq(int which);
void darkedge_fd1149_vblank();
void f1lap_fd1149_vblank();
+ cpu_device* maincpu() { return m_maincpu; }
void init_alien3(void);
void init_arescue(int m_hasdsp);
@@ -255,6 +205,58 @@ protected:
virtual void device_add_mconfig(machine_config &config) override;
virtual void device_start() override;
virtual void device_reset() override;
+
+ required_shared_ptr<uint8_t> m_z80_shared_ram;
+ optional_shared_ptr<uint16_t> m_system32_workram;
+ required_shared_ptr<uint16_t> m_system32_videoram;
+ required_shared_ptr<uint16_t> m_system32_spriteram;
+ optional_shared_ptr_array<uint16_t, 2> m_system32_paletteram;
+
+ required_device<cpu_device> m_maincpu;
+ required_device<cpu_device> m_soundcpu;
+ optional_device<multipcm_device> m_multipcm;
+ required_device<gfxdecode_device> m_gfxdecode;
+ required_device<screen_device> m_screen;
+ required_device<palette_device> m_palette;
+
+ required_device<timer_device> m_irq_timer_0;
+ required_device<timer_device> m_irq_timer_1;
+ optional_device<s32comm_device> m_s32comm;
+
+ required_region_ptr<uint32_t> m_sprite_region;
+ required_memory_region m_maincpu_region;
+ required_memory_bank m_soundrom_bank;
+ optional_memory_bank m_multipcm_bank_hi;
+ optional_memory_bank m_multipcm_bank_lo;
+
+ uint8_t m_v60_irq_control[0x10];
+ timer_device *m_v60_irq_timer[2];
+ uint8_t m_sound_irq_control[4];
+ uint8_t m_sound_irq_input;
+ uint8_t m_sound_dummy_value;
+ uint16_t m_sound_bank;
+ sys32_output_callback m_sw1_output;
+ sys32_output_callback m_sw2_output;
+ sys32_output_callback m_sw3_output;
+ std::unique_ptr<uint16_t[]> m_system32_protram;
+ uint16_t m_system32_displayenable[2];
+ uint16_t m_system32_tilebank_external;
+ uint16_t m_arescue_dsp_io[6];
+ uint8_t m_is_multi32;
+ struct cache_entry *m_cache_head;
+ struct layer_info m_layer_data[11];
+ uint16_t m_mixer_control[2][0x40];
+ std::unique_ptr<uint16_t[]> m_solid_0000;
+ std::unique_ptr<uint16_t[]> m_solid_ffff;
+ uint8_t m_sprite_render_count;
+ uint8_t m_sprite_control_latched[8];
+ uint8_t m_sprite_control[8];
+ std::unique_ptr<uint32_t[]> m_spriteram_32bit;
+ typedef void (segas32_state::*prot_vblank_func)();
+ prot_vblank_func m_system32_prot_vblank;
+ int m_print_count;
+ emu_timer *m_vblank_end_int_timer;
+ emu_timer *m_update_sprites_timer;
};
class segas32_regular_state : public segas32_state
@@ -347,6 +349,9 @@ protected:
virtual void device_add_mconfig(machine_config &config) override;
virtual void device_start() override;
// virtual void device_reset() override;
+
+private:
+ output_finder<16> m_lamp;
};
class sega_multi32_state : public segas32_state
diff --git a/src/mame/includes/segaxbd.h b/src/mame/includes/segaxbd.h
index a8306d44247..c47d227b230 100644
--- a/src/mame/includes/segaxbd.h
+++ b/src/mame/includes/segaxbd.h
@@ -153,6 +153,7 @@ protected:
required_ioport m_io0_porta;
optional_ioport_array<8> m_adc_ports;
optional_ioport_array<4> m_mux_ports;
+ output_finder<4> m_lamp;
protected:
virtual void device_start() override;
diff --git a/src/mame/includes/seta.h b/src/mame/includes/seta.h
index cef9c7e4a6c..8c12dd7dd23 100644
--- a/src/mame/includes/seta.h
+++ b/src/mame/includes/seta.h
@@ -64,6 +64,7 @@ public:
m_vctrl(*this,"vctrl_%u", 0),
m_paletteram(*this,"paletteram%u", 1),
m_subbank(*this,"subbank"),
+ m_leds(*this,"led%u", 0U),
m_gfxdecode(*this, "gfxdecode"),
m_palette(*this, "palette") { }
@@ -95,6 +96,8 @@ public:
optional_memory_bank m_subbank;
+ output_finder<48> m_leds;
+
required_device<gfxdecode_device> m_gfxdecode;
required_device<palette_device> m_palette;
@@ -202,6 +205,7 @@ public:
DECLARE_PALETTE_INIT(gundhara);
DECLARE_PALETTE_INIT(jjsquawk);
DECLARE_MACHINE_START(keroppi);
+ DECLARE_MACHINE_START(magspeed);
DECLARE_VIDEO_START(oisipuzl_2_layers);
uint32_t screen_update_seta_no_layers(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
uint32_t screen_update_seta(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
@@ -360,6 +364,7 @@ public:
DECLARE_WRITE16_MEMBER(spritectrl_w);
+ DECLARE_MACHINE_START(setaroul);
DECLARE_MACHINE_RESET(setaroul);
DECLARE_VIDEO_START(setaroul_1_layer);
diff --git a/src/mame/includes/seta2.h b/src/mame/includes/seta2.h
index 7e2f1239a98..39574b24600 100644
--- a/src/mame/includes/seta2.h
+++ b/src/mame/includes/seta2.h
@@ -19,8 +19,8 @@
class seta2_state : public driver_device
{
public:
- seta2_state(const machine_config &mconfig, device_type type, const char *tag)
- : driver_device(mconfig, type, tag),
+ seta2_state(const machine_config &mconfig, device_type type, const char *tag) :
+ driver_device(mconfig, type, tag),
m_maincpu(*this,"maincpu"),
m_sub(*this,"sub"),
m_gfxdecode(*this, "gfxdecode"),
@@ -39,37 +39,11 @@ public:
m_tileram(*this, "tileram", 0),
m_vregs(*this, "vregs", 0),
m_funcube_outputs(*this, "funcube_outputs"),
- m_funcube_leds(*this, "funcube_leds")
+ m_funcube_leds(*this, "funcube_leds"),
+ m_led(*this, "led%u", 0U),
+ m_lamp(*this, "lamp%u", 0U)
{ }
- required_device<cpu_device> m_maincpu;
- optional_device<cpu_device> m_sub;
- required_device<gfxdecode_device> m_gfxdecode;
- required_device<screen_device> m_screen;
- required_device<palette_device> m_palette;
-
- optional_device<tmp68301_device> m_tmp68301;
- optional_device<okim9810_device> m_oki;
- optional_device<eeprom_serial_93cxx_device> m_eeprom;
- optional_device<intelfsh16_device> m_flash;
- optional_device<upd4992_device> m_rtc;
- optional_device<ticket_dispenser_device> m_dispenser;
-
- optional_shared_ptr<uint16_t> m_nvram;
- optional_shared_ptr<uint16_t> m_spriteram;
- optional_shared_ptr<uint16_t> m_tileram;
- optional_shared_ptr<uint16_t> m_vregs;
- optional_shared_ptr<uint16_t> m_funcube_outputs;
- optional_shared_ptr<uint16_t> m_funcube_leds;
-
- int m_xoffset;
- int m_yoffset;
- int m_keyboard_row;
- std::unique_ptr<uint16_t[]> m_buffered_spriteram;
-
- uint64_t m_funcube_coin_start_cycles;
- uint8_t m_funcube_hopper_motor;
-
DECLARE_WRITE16_MEMBER(spriteram16_word_w);
DECLARE_READ16_MEMBER(spriteram16_word_r);
DECLARE_WRITE16_MEMBER(vregs_w);
@@ -116,7 +90,6 @@ public:
DECLARE_MACHINE_START(funcube);
DECLARE_MACHINE_RESET(funcube);
- virtual void video_start() override;
DECLARE_VIDEO_START(yoffset);
DECLARE_VIDEO_START(xoffset);
DECLARE_VIDEO_START(xoffset1);
@@ -164,6 +137,40 @@ public:
void reelquak_map(address_map &map);
void samshoot_map(address_map &map);
void telpacfl_map(address_map &map);
+
+protected:
+ virtual void machine_start() override { m_led.resolve(); m_lamp.resolve(); }
+ virtual void video_start() override;
+
+ required_device<cpu_device> m_maincpu;
+ optional_device<cpu_device> m_sub;
+ required_device<gfxdecode_device> m_gfxdecode;
+ required_device<screen_device> m_screen;
+ required_device<palette_device> m_palette;
+
+ optional_device<tmp68301_device> m_tmp68301;
+ optional_device<okim9810_device> m_oki;
+ optional_device<eeprom_serial_93cxx_device> m_eeprom;
+ optional_device<intelfsh16_device> m_flash;
+ optional_device<upd4992_device> m_rtc;
+ optional_device<ticket_dispenser_device> m_dispenser;
+
+ optional_shared_ptr<uint16_t> m_nvram;
+ optional_shared_ptr<uint16_t> m_spriteram;
+ optional_shared_ptr<uint16_t> m_tileram;
+ optional_shared_ptr<uint16_t> m_vregs;
+ optional_shared_ptr<uint16_t> m_funcube_outputs;
+ optional_shared_ptr<uint16_t> m_funcube_leds;
+ output_finder<7> m_led;
+ output_finder<11> m_lamp;
+
+ int m_xoffset;
+ int m_yoffset;
+ int m_keyboard_row;
+ std::unique_ptr<uint16_t[]> m_buffered_spriteram;
+
+ uint64_t m_funcube_coin_start_cycles;
+ uint8_t m_funcube_hopper_motor;
};
diff --git a/src/mame/includes/skykid.h b/src/mame/includes/skykid.h
index 0159bb118f9..ef3705ad870 100644
--- a/src/mame/includes/skykid.h
+++ b/src/mame/includes/skykid.h
@@ -7,32 +7,18 @@ class skykid_state : public driver_device
{
public:
skykid_state(const machine_config &mconfig, device_type type, const char *tag)
- : driver_device(mconfig, type, tag),
- m_videoram(*this, "videoram"),
- m_textram(*this, "textram"),
- m_spriteram(*this, "spriteram"),
- m_maincpu(*this, "maincpu"),
- m_mcu(*this, "mcu"),
- m_cus30(*this, "namco"),
- m_gfxdecode(*this, "gfxdecode"),
- m_palette(*this, "palette") { }
+ : driver_device(mconfig, type, tag)
+ , m_videoram(*this, "videoram")
+ , m_textram(*this, "textram")
+ , m_spriteram(*this, "spriteram")
+ , m_maincpu(*this, "maincpu")
+ , m_mcu(*this, "mcu")
+ , m_cus30(*this, "namco")
+ , m_gfxdecode(*this, "gfxdecode")
+ , m_palette(*this, "palette")
+ , m_led(*this, "led%u", 0U)
+ { }
- uint8_t m_inputport_selected;
- required_shared_ptr<uint8_t> m_videoram;
- required_shared_ptr<uint8_t> m_textram;
- required_shared_ptr<uint8_t> m_spriteram;
- required_device<cpu_device> m_maincpu;
- required_device<hd63701_cpu_device> m_mcu;
- required_device<namco_cus30_device> m_cus30;
- required_device<gfxdecode_device> m_gfxdecode;
- required_device<palette_device> m_palette;
- tilemap_t *m_bg_tilemap;
- tilemap_t *m_tx_tilemap;
- uint8_t m_priority;
- uint16_t m_scroll_x;
- uint16_t m_scroll_y;
- uint8_t m_main_irq_mask;
- uint8_t m_mcu_irq_mask;
DECLARE_WRITE8_MEMBER(inputport_select_w);
DECLARE_READ8_MEMBER(inputport_r);
DECLARE_WRITE8_MEMBER(skykid_led_w);
@@ -52,8 +38,6 @@ public:
TILEMAP_MAPPER_MEMBER(tx_tilemap_scan);
TILE_GET_INFO_MEMBER(tx_get_tile_info);
TILE_GET_INFO_MEMBER(bg_get_tile_info);
- virtual void machine_start() override;
- virtual void video_start() override;
DECLARE_PALETTE_INIT(skykid);
uint32_t screen_update_skykid(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
DECLARE_WRITE_LINE_MEMBER(vblank_irq);
@@ -62,4 +46,26 @@ public:
void mcu_map(address_map &map);
void mcu_port_map(address_map &map);
void skykid_map(address_map &map);
+
+protected:
+ virtual void machine_start() override;
+ virtual void video_start() override;
+
+ uint8_t m_inputport_selected;
+ required_shared_ptr<uint8_t> m_videoram;
+ required_shared_ptr<uint8_t> m_textram;
+ required_shared_ptr<uint8_t> m_spriteram;
+ required_device<cpu_device> m_maincpu;
+ required_device<hd63701_cpu_device> m_mcu;
+ required_device<namco_cus30_device> m_cus30;
+ required_device<gfxdecode_device> m_gfxdecode;
+ required_device<palette_device> m_palette;
+ output_finder<2> m_led;
+ tilemap_t *m_bg_tilemap;
+ tilemap_t *m_tx_tilemap;
+ uint8_t m_priority;
+ uint16_t m_scroll_x;
+ uint16_t m_scroll_y;
+ uint8_t m_main_irq_mask;
+ uint8_t m_mcu_irq_mask;
};
diff --git a/src/mame/includes/sms.h b/src/mame/includes/sms.h
index 3c635f9ddcf..381778ab431 100644
--- a/src/mame/includes/sms.h
+++ b/src/mame/includes/sms.h
@@ -70,6 +70,102 @@ public:
m_store_cart_selection_data(0)
{ }
+ void store_post_load();
+ void store_select_cart(uint8_t data);
+
+ DECLARE_READ8_MEMBER(read_0000);
+ DECLARE_READ8_MEMBER(read_4000);
+ DECLARE_READ8_MEMBER(read_8000);
+ DECLARE_READ8_MEMBER(read_ram);
+ DECLARE_WRITE8_MEMBER(write_ram);
+ DECLARE_WRITE8_MEMBER(write_cart);
+
+ DECLARE_READ8_MEMBER(sms_mapper_r);
+ DECLARE_WRITE8_MEMBER(sms_mapper_w);
+ DECLARE_WRITE8_MEMBER(sms_mem_control_w);
+ DECLARE_WRITE8_MEMBER(sms_io_control_w);
+ DECLARE_READ8_MEMBER(sms_count_r);
+ DECLARE_READ8_MEMBER(sms_input_port_dc_r);
+ DECLARE_READ8_MEMBER(sms_input_port_dd_r);
+ DECLARE_READ8_MEMBER(gg_input_port_00_r);
+ DECLARE_READ8_MEMBER(sg1000m3_peripheral_r);
+ DECLARE_WRITE8_MEMBER(sg1000m3_peripheral_w);
+ DECLARE_READ8_MEMBER(gg_sio_r);
+ DECLARE_WRITE8_MEMBER(gg_sio_w);
+ DECLARE_WRITE8_MEMBER(gg_psg_stereo_w);
+ DECLARE_WRITE8_MEMBER(gg_psg_w);
+ DECLARE_WRITE8_MEMBER(sms_psg_w);
+ DECLARE_READ8_MEMBER(smsj_audio_control_r);
+ DECLARE_WRITE8_MEMBER(smsj_audio_control_w);
+ DECLARE_WRITE8_MEMBER(smsj_ym2413_register_port_w);
+ DECLARE_WRITE8_MEMBER(smsj_ym2413_data_port_w);
+ DECLARE_READ8_MEMBER(sms_sscope_r);
+ DECLARE_WRITE8_MEMBER(sms_sscope_w);
+
+ DECLARE_WRITE_LINE_MEMBER(sms_pause_callback);
+ DECLARE_WRITE_LINE_MEMBER(sms_csync_callback);
+ DECLARE_WRITE_LINE_MEMBER(sms_ctrl1_th_input);
+ DECLARE_WRITE_LINE_MEMBER(sms_ctrl2_th_input);
+ DECLARE_WRITE_LINE_MEMBER(gg_ext_th_input);
+ DECLARE_READ32_MEMBER(sms_pixel_color);
+
+ void init_sg1000m3();
+ void init_gamegear();
+ void init_gamegeaj();
+ void init_sms1krfm();
+ void init_sms1kr();
+ void init_smskr();
+ void init_smsj();
+ void init_sms1();
+ void init_sms();
+ DECLARE_VIDEO_START(gamegear);
+ DECLARE_VIDEO_RESET(gamegear);
+ DECLARE_VIDEO_START(sms1);
+ DECLARE_VIDEO_RESET(sms1);
+
+ uint32_t screen_update_sms(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect);
+ uint32_t screen_update_sms1(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect);
+ uint32_t screen_update_gamegear(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect);
+ void screen_gg_sms_mode_scaling(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect);
+ DECLARE_WRITE_LINE_MEMBER(screen_vblank_sms1);
+
+ void sms_base(machine_config &config);
+ void sms_ntsc_base(machine_config &config);
+ void sms_pal_base(machine_config &config);
+ void sms_paln_base(machine_config &config);
+ void sms_br_base(machine_config &config);
+ void sms3_br(machine_config &config);
+ void sg1000m3(machine_config &config);
+ void smsj(machine_config &config);
+ void sms1_paln(machine_config &config);
+ void sms1_ntsc(machine_config &config);
+ void gamegear(machine_config &config);
+ void sms3_paln(machine_config &config);
+ void sms1_pal(machine_config &config);
+ void sms2_pal(machine_config &config);
+ void sms2_kr(machine_config &config);
+ void sms1_br(machine_config &config);
+ void sms2_ntsc(machine_config &config);
+ void sms1_kr(machine_config &config);
+ void gg_io(address_map &map);
+ void sg1000m3_io(address_map &map);
+ void sms1_mem(address_map &map);
+ void sms_io(address_map &map);
+ void sms_mem(address_map &map);
+ void smsj_io(address_map &map);
+ void smskr_io(address_map &map);
+
+protected:
+ virtual void machine_start() override;
+ virtual void machine_reset() override;
+ uint8_t read_bus(address_space &space, unsigned int bank, uint16_t base_addr, uint16_t offset);
+ void setup_bios();
+ void setup_media_slots();
+ void setup_enabled_slots();
+ void lphaser_hcount_latch();
+ void sms_get_inputs();
+ void smsj_set_audio_control(uint8_t data);
+
// devices
required_device<cpu_device> m_maincpu;
required_device<sega315_5124_device> m_vdp;
@@ -168,100 +264,6 @@ public:
sega8_card_slot_device *m_cards[16];
uint8_t m_store_control;
uint8_t m_store_cart_selection_data;
- void store_post_load();
- void store_select_cart(uint8_t data);
-
- DECLARE_READ8_MEMBER(read_0000);
- DECLARE_READ8_MEMBER(read_4000);
- DECLARE_READ8_MEMBER(read_8000);
- DECLARE_READ8_MEMBER(read_ram);
- DECLARE_WRITE8_MEMBER(write_ram);
- DECLARE_WRITE8_MEMBER(write_cart);
-
- DECLARE_READ8_MEMBER(sms_mapper_r);
- DECLARE_WRITE8_MEMBER(sms_mapper_w);
- DECLARE_WRITE8_MEMBER(sms_mem_control_w);
- DECLARE_WRITE8_MEMBER(sms_io_control_w);
- DECLARE_READ8_MEMBER(sms_count_r);
- DECLARE_READ8_MEMBER(sms_input_port_dc_r);
- DECLARE_READ8_MEMBER(sms_input_port_dd_r);
- DECLARE_READ8_MEMBER(gg_input_port_00_r);
- DECLARE_READ8_MEMBER(sg1000m3_peripheral_r);
- DECLARE_WRITE8_MEMBER(sg1000m3_peripheral_w);
- DECLARE_READ8_MEMBER(gg_sio_r);
- DECLARE_WRITE8_MEMBER(gg_sio_w);
- DECLARE_WRITE8_MEMBER(gg_psg_stereo_w);
- DECLARE_WRITE8_MEMBER(gg_psg_w);
- DECLARE_WRITE8_MEMBER(sms_psg_w);
- DECLARE_READ8_MEMBER(smsj_audio_control_r);
- DECLARE_WRITE8_MEMBER(smsj_audio_control_w);
- DECLARE_WRITE8_MEMBER(smsj_ym2413_register_port_w);
- DECLARE_WRITE8_MEMBER(smsj_ym2413_data_port_w);
- DECLARE_READ8_MEMBER(sms_sscope_r);
- DECLARE_WRITE8_MEMBER(sms_sscope_w);
-
- DECLARE_WRITE_LINE_MEMBER(sms_pause_callback);
- DECLARE_WRITE_LINE_MEMBER(sms_csync_callback);
- DECLARE_WRITE_LINE_MEMBER(sms_ctrl1_th_input);
- DECLARE_WRITE_LINE_MEMBER(sms_ctrl2_th_input);
- DECLARE_WRITE_LINE_MEMBER(gg_ext_th_input);
- DECLARE_READ32_MEMBER(sms_pixel_color);
-
- void init_sg1000m3();
- void init_gamegear();
- void init_gamegeaj();
- void init_sms1krfm();
- void init_sms1kr();
- void init_smskr();
- void init_smsj();
- void init_sms1();
- void init_sms();
- DECLARE_MACHINE_START(sms);
- DECLARE_MACHINE_RESET(sms);
- DECLARE_VIDEO_START(gamegear);
- DECLARE_VIDEO_RESET(gamegear);
- DECLARE_VIDEO_START(sms1);
- DECLARE_VIDEO_RESET(sms1);
-
- uint32_t screen_update_sms(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect);
- uint32_t screen_update_sms1(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect);
- uint32_t screen_update_gamegear(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect);
- void screen_gg_sms_mode_scaling(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect);
- DECLARE_WRITE_LINE_MEMBER(screen_vblank_sms1);
-
- void sms_base(machine_config &config);
- void sms_ntsc_base(machine_config &config);
- void sms_pal_base(machine_config &config);
- void sms_paln_base(machine_config &config);
- void sms_br_base(machine_config &config);
- void sms3_br(machine_config &config);
- void sg1000m3(machine_config &config);
- void smsj(machine_config &config);
- void sms1_paln(machine_config &config);
- void sms1_ntsc(machine_config &config);
- void gamegear(machine_config &config);
- void sms3_paln(machine_config &config);
- void sms1_pal(machine_config &config);
- void sms2_pal(machine_config &config);
- void sms2_kr(machine_config &config);
- void sms1_br(machine_config &config);
- void sms2_ntsc(machine_config &config);
- void sms1_kr(machine_config &config);
- void gg_io(address_map &map);
- void sg1000m3_io(address_map &map);
- void sms1_mem(address_map &map);
- void sms_io(address_map &map);
- void sms_mem(address_map &map);
- void smsj_io(address_map &map);
- void smskr_io(address_map &map);
-protected:
- uint8_t read_bus(address_space &space, unsigned int bank, uint16_t base_addr, uint16_t offset);
- void setup_bios();
- void setup_media_slots();
- void setup_enabled_slots();
- void lphaser_hcount_latch();
- void sms_get_inputs();
- void smsj_set_audio_control(uint8_t data);
};
class smssdisp_state : public sms_state
diff --git a/src/mame/includes/snookr10.h b/src/mame/includes/snookr10.h
index 1eebbf56b4c..5516b806d95 100644
--- a/src/mame/includes/snookr10.h
+++ b/src/mame/includes/snookr10.h
@@ -3,24 +3,15 @@
class snookr10_state : public driver_device
{
public:
- snookr10_state(const machine_config &mconfig, device_type type, const char *tag)
- : driver_device(mconfig, type, tag),
+ snookr10_state(const machine_config &mconfig, device_type type, const char *tag) :
+ driver_device(mconfig, type, tag),
m_videoram(*this, "videoram"),
m_colorram(*this, "colorram"),
m_maincpu(*this, "maincpu"),
- m_gfxdecode(*this, "gfxdecode") { }
+ m_gfxdecode(*this, "gfxdecode"),
+ m_lamp(*this, "lamp%u", 0U)
+ { }
- int m_outportl;
- int m_outporth;
- int m_bit0;
- int m_bit1;
- int m_bit2;
- int m_bit3;
- int m_bit4;
- int m_bit5;
- required_shared_ptr<uint8_t> m_videoram;
- required_shared_ptr<uint8_t> m_colorram;
- tilemap_t *m_bg_tilemap;
DECLARE_READ8_MEMBER(dsw_port_1_r);
DECLARE_READ8_MEMBER(port2000_8_r);
DECLARE_WRITE8_MEMBER(output_port_0_w);
@@ -30,15 +21,12 @@ public:
TILE_GET_INFO_MEMBER(get_bg_tile_info);
TILE_GET_INFO_MEMBER(apple10_get_bg_tile_info);
TILE_GET_INFO_MEMBER(crystalc_get_bg_tile_info);
- virtual void video_start() override;
DECLARE_PALETTE_INIT(snookr10);
DECLARE_VIDEO_START(apple10);
DECLARE_VIDEO_START(crystalc);
DECLARE_PALETTE_INIT(apple10);
DECLARE_PALETTE_INIT(crystalc);
uint32_t screen_update_snookr10(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
- required_device<cpu_device> m_maincpu;
- required_device<gfxdecode_device> m_gfxdecode;
void apple10(machine_config &config);
void snookr10(machine_config &config);
void crystalc(machine_config &config);
@@ -46,4 +34,23 @@ public:
void crystalc_map(address_map &map);
void snookr10_map(address_map &map);
void tenballs_map(address_map &map);
+
+protected:
+ virtual void machine_start() override { m_lamp.resolve(); }
+ virtual void video_start() override;
+
+ int m_outportl;
+ int m_outporth;
+ int m_bit0;
+ int m_bit1;
+ int m_bit2;
+ int m_bit3;
+ int m_bit4;
+ int m_bit5;
+ required_shared_ptr<uint8_t> m_videoram;
+ required_shared_ptr<uint8_t> m_colorram;
+ tilemap_t *m_bg_tilemap;
+ required_device<cpu_device> m_maincpu;
+ required_device<gfxdecode_device> m_gfxdecode;
+ output_finder<7> m_lamp;
};
diff --git a/src/mame/includes/softbox.h b/src/mame/includes/softbox.h
index 4a8faa8869e..59ae7cae07c 100644
--- a/src/mame/includes/softbox.h
+++ b/src/mame/includes/softbox.h
@@ -26,21 +26,14 @@ class softbox_state : public driver_device
{
public:
softbox_state(const machine_config &mconfig, device_type type, const char *tag)
- : driver_device(mconfig, type, tag),
- m_maincpu(*this, Z80_TAG),
- m_dbrg(*this, COM8116_TAG),
- m_ieee(*this, IEEE488_TAG),
- m_hdc(*this, CORVUS_HDC_TAG)
+ : driver_device(mconfig, type, tag)
+ , m_maincpu(*this, Z80_TAG)
+ , m_dbrg(*this, COM8116_TAG)
+ , m_ieee(*this, IEEE488_TAG)
+ , m_hdc(*this, CORVUS_HDC_TAG)
+ , m_led(*this, "led%u", 0U)
{ }
- required_device<cpu_device> m_maincpu;
- required_device<com8116_device> m_dbrg;
- required_device<ieee488_device> m_ieee;
- required_device<corvus_hdc_device> m_hdc;
-
- virtual void machine_start() override;
- virtual void device_reset_after_children() override;
-
// device_ieee488_interface overrides
virtual void ieee488_ifc(int state);
@@ -56,7 +49,7 @@ public:
enum
{
- LED_A,
+ LED_A = 0,
LED_B,
LED_READY
};
@@ -65,6 +58,16 @@ public:
void softbox_io(address_map &map);
void softbox_mem(address_map &map);
int m_ifc; // Tracks previous state of IEEE-488 IFC line
+
+protected:
+ virtual void machine_start() override;
+ virtual void device_reset_after_children() override;
+
+ required_device<cpu_device> m_maincpu;
+ required_device<com8116_device> m_dbrg;
+ required_device<ieee488_device> m_ieee;
+ required_device<corvus_hdc_device> m_hdc;
+ output_finder<3> m_led;
};
#endif
diff --git a/src/mame/includes/spcforce.h b/src/mame/includes/spcforce.h
index ff11d74ed8e..378288412ef 100644
--- a/src/mame/includes/spcforce.h
+++ b/src/mame/includes/spcforce.h
@@ -5,8 +5,8 @@
class spcforce_state : public driver_device
{
public:
- spcforce_state(const machine_config &mconfig, device_type type, const char *tag)
- : driver_device(mconfig, type, tag),
+ spcforce_state(const machine_config &mconfig, device_type type, const char *tag) :
+ driver_device(mconfig, type, tag),
m_maincpu(*this, "maincpu"),
m_audiocpu(*this, "audiocpu"),
m_gfxdecode(*this, "gfxdecode"),
@@ -16,26 +16,9 @@ public:
m_sn3(*this, "sn3"),
m_scrollram(*this, "scrollram"),
m_videoram(*this, "videoram"),
- m_colorram(*this, "colorram") { }
-
- required_device<cpu_device> m_maincpu;
- required_device<cpu_device> m_audiocpu;
- required_device<gfxdecode_device> m_gfxdecode;
- required_device<palette_device> m_palette;
- required_device<sn76496_device> m_sn1;
- required_device<sn76496_device> m_sn2;
- required_device<sn76496_device> m_sn3;
-
- required_shared_ptr<uint8_t> m_scrollram;
- required_shared_ptr<uint8_t> m_videoram;
- required_shared_ptr<uint8_t> m_colorram;
-
- int m_sn76496_latch;
- int m_sn76496_select;
- int m_sn1_ready;
- int m_sn2_ready;
- int m_sn3_ready;
- uint8_t m_irq_mask;
+ m_colorram(*this, "colorram"),
+ m_lamp(*this, "lamp%u", 0U)
+ { }
DECLARE_WRITE8_MEMBER(SN76496_latch_w);
DECLARE_READ8_MEMBER(SN76496_select_r);
@@ -50,7 +33,6 @@ public:
DECLARE_WRITE_LINE_MEMBER(flip_screen_w);
DECLARE_WRITE_LINE_MEMBER(unknown_w);
- virtual void machine_start() override;
DECLARE_PALETTE_INIT(spcforce);
uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
@@ -60,4 +42,27 @@ public:
void spcforce(machine_config &config);
void spcforce_map(address_map &map);
void spcforce_sound_map(address_map &map);
+
+protected:
+ virtual void machine_start() override;
+
+ required_device<cpu_device> m_maincpu;
+ required_device<cpu_device> m_audiocpu;
+ required_device<gfxdecode_device> m_gfxdecode;
+ required_device<palette_device> m_palette;
+ required_device<sn76496_device> m_sn1;
+ required_device<sn76496_device> m_sn2;
+ required_device<sn76496_device> m_sn3;
+
+ required_shared_ptr<uint8_t> m_scrollram;
+ required_shared_ptr<uint8_t> m_videoram;
+ required_shared_ptr<uint8_t> m_colorram;
+ output_finder<2> m_lamp;
+
+ int m_sn76496_latch;
+ int m_sn76496_select;
+ int m_sn1_ready;
+ int m_sn2_ready;
+ int m_sn3_ready;
+ uint8_t m_irq_mask;
};
diff --git a/src/mame/includes/starshp1.h b/src/mame/includes/starshp1.h
index d666e9db81d..c2ec5b00067 100644
--- a/src/mame/includes/starshp1.h
+++ b/src/mame/includes/starshp1.h
@@ -58,7 +58,8 @@ public:
m_discrete(*this, "discrete"),
m_gfxdecode(*this, "gfxdecode"),
m_screen(*this, "screen"),
- m_palette(*this, "palette")
+ m_palette(*this, "palette"),
+ m_led(*this, "led0")
{ }
DECLARE_CUSTOM_INPUT_MEMBER(starshp1_analog_r);
@@ -66,6 +67,7 @@ public:
void starshp1(machine_config &config);
protected:
+ virtual void machine_start() override;
DECLARE_WRITE8_MEMBER(starshp1_collision_reset_w);
DECLARE_WRITE8_MEMBER(starshp1_analog_in_w);
DECLARE_WRITE_LINE_MEMBER(ship_explode_w);
@@ -136,6 +138,7 @@ private:
required_device<gfxdecode_device> m_gfxdecode;
required_device<screen_device> m_screen;
required_device<palette_device> m_palette;
+ output_finder<> m_led;
};
/*----------- defined in audio/starshp1.c -----------*/
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;
};
diff --git a/src/mame/includes/suna8.h b/src/mame/includes/suna8.h
index 71b6c65da34..73b5e002b33 100644
--- a/src/mame/includes/suna8.h
+++ b/src/mame/includes/suna8.h
@@ -11,8 +11,8 @@
class suna8_state : public driver_device
{
public:
- suna8_state(const machine_config &mconfig, device_type type, const char *tag)
- : driver_device(mconfig, type, tag),
+ suna8_state(const machine_config &mconfig, device_type type, const char *tag) :
+ driver_device(mconfig, type, tag),
m_maincpu(*this,"maincpu"),
m_hardhead_ip(*this, "hardhead_ip"),
m_spriteram(*this, "spriteram"),
@@ -29,40 +29,9 @@ public:
m_bank1(*this, "bank1"),
m_bank1d(*this, "bank1d"),
m_prot_opcode_toggle(0),
- m_remap_sound(0)
- { }
-
- required_device<cpu_device> m_maincpu;
- optional_shared_ptr<uint8_t> m_hardhead_ip;
- optional_shared_ptr<uint8_t> m_spriteram;
- optional_shared_ptr<uint8_t> m_wram;
- optional_shared_ptr<uint8_t> m_banked_paletteram;
- required_device<cpu_device> m_audiocpu;
- optional_device<samples_device> m_samples;
- 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_device<generic_latch_8_device> m_soundlatch2;
- optional_memory_bank m_bank0d;
- required_memory_bank m_bank1;
- optional_memory_bank m_bank1d;
-
- uint8_t m_rombank;
- uint8_t m_rombank_latch;
- uint8_t m_spritebank;
- uint8_t m_palettebank;
- uint8_t m_paletteram_enab;
- uint8_t m_prot2;
- uint8_t m_prot2_prev;
-
- uint8_t m_protection_val;
- uint8_t m_nmi_enable;
- uint8_t m_spritebank_latch;
- uint8_t m_write_disable;
- uint8_t m_prot_opcode_toggle;
- uint8_t m_remap_sound;
- uint8_t* m_decrypt;
+ m_remap_sound(0),
+ m_led(*this, "led%u", 0U)
+ { }
enum GFXBANK_TYPE_T
{
@@ -70,23 +39,6 @@ public:
GFXBANK_TYPE_BRICKZN,
GFXBANK_TYPE_STARFIGH
} m_gfxbank_type;
- uint8_t m_gfxbank;
-
- bool m_has_text; // has text sprites (older games)
-
- // samples
- std::unique_ptr<int16_t[]> m_samplebuf;
- int m_sample, m_play;
- int m_numsamples;
-
-#if TILEMAPS
- tilemap_t *m_bg_tilemap;
- int m_tiles;
- int m_trombank;
- int m_page;
-
- TILE_GET_INFO_MEMBER(get_tile_info);
-#endif
DECLARE_READ8_MEMBER(hardhead_protection_r);
DECLARE_WRITE8_MEMBER(hardhead_protection_w);
@@ -202,4 +154,58 @@ public:
void rranger_sound_map(address_map &map);
void sparkman_map(address_map &map);
void starfigh_map(address_map &map);
+
+protected:
+ virtual void machine_start() override { m_led.resolve(); }
+
+ required_device<cpu_device> m_maincpu;
+ optional_shared_ptr<uint8_t> m_hardhead_ip;
+ optional_shared_ptr<uint8_t> m_spriteram;
+ optional_shared_ptr<uint8_t> m_wram;
+ optional_shared_ptr<uint8_t> m_banked_paletteram;
+ required_device<cpu_device> m_audiocpu;
+ optional_device<samples_device> m_samples;
+ 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_device<generic_latch_8_device> m_soundlatch2;
+ optional_memory_bank m_bank0d;
+ required_memory_bank m_bank1;
+ optional_memory_bank m_bank1d;
+
+ uint8_t m_rombank;
+ uint8_t m_rombank_latch;
+ uint8_t m_spritebank;
+ uint8_t m_palettebank;
+ uint8_t m_paletteram_enab;
+ uint8_t m_prot2;
+ uint8_t m_prot2_prev;
+
+ uint8_t m_protection_val;
+ uint8_t m_nmi_enable;
+ uint8_t m_spritebank_latch;
+ uint8_t m_write_disable;
+ uint8_t m_prot_opcode_toggle;
+ uint8_t m_remap_sound;
+ uint8_t* m_decrypt;
+
+ uint8_t m_gfxbank;
+
+ bool m_has_text; // has text sprites (older games)
+
+ // samples
+ std::unique_ptr<int16_t[]> m_samplebuf;
+ int m_sample, m_play;
+ int m_numsamples;
+
+#if TILEMAPS
+ tilemap_t *m_bg_tilemap;
+ int m_tiles;
+ int m_trombank;
+ int m_page;
+
+ TILE_GET_INFO_MEMBER(get_tile_info);
+#endif
+ output_finder<2> m_led;
};
diff --git a/src/mame/includes/system16.h b/src/mame/includes/system16.h
index 23747d6d08e..aa165d847e3 100644
--- a/src/mame/includes/system16.h
+++ b/src/mame/includes/system16.h
@@ -32,103 +32,9 @@ public:
, m_soundlatch(*this, "soundlatch")
, m_adpcm_select(*this, "adpcm_select")
, m_decrypted_opcodes(*this, "decrypted_opcodes")
+ , m_led(*this, "led%u", 0U)
{ }
- required_shared_ptr<uint16_t> m_textram;
- optional_shared_ptr<uint16_t> m_bg0_tileram;
- optional_shared_ptr<uint16_t> m_bg1_tileram;
- optional_shared_ptr<uint16_t> m_tileram;
- optional_shared_ptr<uint16_t> m_goldnaxeb2_bgpage;
- optional_shared_ptr<uint16_t> m_goldnaxeb2_fgpage;
-
- optional_memory_region m_sprites_region;
- optional_memory_region m_soundcpu_region;
- optional_memory_bank m_soundbank;
- optional_memory_bank m_okibank;
-
- optional_device<sega_16bit_sprite_device> m_sprites;
-
- uint16_t m_coinctrl;
-
- /* game specific */
- int m_passht4b_io1_val;
- int m_passht4b_io2_val;
- int m_passht4b_io3_val;
-
- int m_beautyb_unkx;
-
- int m_shinobl_kludge;
-
- int m_eswat_tilebank0;
-
-
- /* video-related */
- tilemap_t *m_background[2];
- tilemap_t *m_foreground[2];
- tilemap_t *m_text_layer;
- tilemap_t *m_bg_tilemaps[2];
- tilemap_t *m_text_tilemap;
- double m_weights[2][3][6];
-
- int m_spritebank_type;
- int m_back_yscroll;
- int m_fore_yscroll;
- int m_text_yscroll;
-
- int m_bg1_trans; // alien syn + sys18
-
- int m_tile_bank[2];
- int m_bg_page[2][4];
- int m_fg_page[2][4];
-
- uint16_t m_datsu_page[4];
-
- int m_old_bg_page[2][4];
- int m_old_fg_page[2][4];
- int m_old_tile_bank[2];
-
- int m_bg_scrollx;
- int m_bg_scrolly;
- int m_fg_scrollx;
- int m_fg_scrolly;
- uint16_t m_tilemapselect;
-
- int m_textlayer_lo_min;
- int m_textlayer_lo_max;
- int m_textlayer_hi_min;
- int m_textlayer_hi_max;
-
- int m_tilebank_switch;
-
-
- /* sound-related */
- int m_sample_buffer;
- int m_sample_select;
-
- uint8_t *m_soundbank_ptr; /* Pointer to currently selected portion of ROM */
-
- /* sys18 */
- uint8_t *m_sound_bank;
- uint16_t *m_splittab_bg_x;
- uint16_t *m_splittab_bg_y;
- uint16_t *m_splittab_fg_x;
- uint16_t *m_splittab_fg_y;
- int m_sound_info[4*2];
- int m_refreshenable;
- int m_system18;
-
- uint8_t *m_decrypted_region; // goldnaxeb1 & bayrouteb1
-
- /* devices */
- required_device<cpu_device> m_maincpu;
- optional_device<cpu_device> m_soundcpu;
- optional_device<msm5205_device> m_msm;
- optional_device<upd7759_device> m_upd7759;
- required_device<gfxdecode_device> m_gfxdecode;
- optional_device<generic_latch_8_device> m_soundlatch;
- optional_device<ls157_device> m_adpcm_select;
- optional_shared_ptr<uint16_t> m_decrypted_opcodes;
-
DECLARE_WRITE16_MEMBER(sound_command_nmi_w);
DECLARE_WRITE16_MEMBER(sound_command_irq_w);
DECLARE_READ8_MEMBER(sound_command_irq_r);
@@ -289,4 +195,103 @@ public:
void tturfbl_sound_io_map(address_map &map);
void tturfbl_sound_map(address_map &map);
void wb3bbl_map(address_map &map);
+
+protected:
+ virtual void machine_start() override { m_led.resolve(); }
+
+ required_shared_ptr<uint16_t> m_textram;
+ optional_shared_ptr<uint16_t> m_bg0_tileram;
+ optional_shared_ptr<uint16_t> m_bg1_tileram;
+ optional_shared_ptr<uint16_t> m_tileram;
+ optional_shared_ptr<uint16_t> m_goldnaxeb2_bgpage;
+ optional_shared_ptr<uint16_t> m_goldnaxeb2_fgpage;
+
+ optional_memory_region m_sprites_region;
+ optional_memory_region m_soundcpu_region;
+ optional_memory_bank m_soundbank;
+ optional_memory_bank m_okibank;
+
+ optional_device<sega_16bit_sprite_device> m_sprites;
+
+ uint16_t m_coinctrl;
+
+ /* game specific */
+ int m_passht4b_io1_val;
+ int m_passht4b_io2_val;
+ int m_passht4b_io3_val;
+
+ int m_beautyb_unkx;
+
+ int m_shinobl_kludge;
+
+ int m_eswat_tilebank0;
+
+
+ /* video-related */
+ tilemap_t *m_background[2];
+ tilemap_t *m_foreground[2];
+ tilemap_t *m_text_layer;
+ tilemap_t *m_bg_tilemaps[2];
+ tilemap_t *m_text_tilemap;
+ double m_weights[2][3][6];
+
+ int m_spritebank_type;
+ int m_back_yscroll;
+ int m_fore_yscroll;
+ int m_text_yscroll;
+
+ int m_bg1_trans; // alien syn + sys18
+
+ int m_tile_bank[2];
+ int m_bg_page[2][4];
+ int m_fg_page[2][4];
+
+ uint16_t m_datsu_page[4];
+
+ int m_old_bg_page[2][4];
+ int m_old_fg_page[2][4];
+ int m_old_tile_bank[2];
+
+ int m_bg_scrollx;
+ int m_bg_scrolly;
+ int m_fg_scrollx;
+ int m_fg_scrolly;
+ uint16_t m_tilemapselect;
+
+ int m_textlayer_lo_min;
+ int m_textlayer_lo_max;
+ int m_textlayer_hi_min;
+ int m_textlayer_hi_max;
+
+ int m_tilebank_switch;
+
+
+ /* sound-related */
+ int m_sample_buffer;
+ int m_sample_select;
+
+ uint8_t *m_soundbank_ptr; /* Pointer to currently selected portion of ROM */
+
+ /* sys18 */
+ uint8_t *m_sound_bank;
+ uint16_t *m_splittab_bg_x;
+ uint16_t *m_splittab_bg_y;
+ uint16_t *m_splittab_fg_x;
+ uint16_t *m_splittab_fg_y;
+ int m_sound_info[4*2];
+ int m_refreshenable;
+ int m_system18;
+
+ uint8_t *m_decrypted_region; // goldnaxeb1 & bayrouteb1
+
+ /* devices */
+ required_device<cpu_device> m_maincpu;
+ optional_device<cpu_device> m_soundcpu;
+ optional_device<msm5205_device> m_msm;
+ optional_device<upd7759_device> m_upd7759;
+ required_device<gfxdecode_device> m_gfxdecode;
+ optional_device<generic_latch_8_device> m_soundlatch;
+ optional_device<ls157_device> m_adpcm_select;
+ optional_shared_ptr<uint16_t> m_decrypted_opcodes;
+ output_finder<2> m_led;
};
diff --git a/src/mame/includes/taito_z.h b/src/mame/includes/taito_z.h
index 6b79c8fc58d..180641613f9 100644
--- a/src/mame/includes/taito_z.h
+++ b/src/mame/includes/taito_z.h
@@ -19,8 +19,8 @@
class taitoz_state : public driver_device
{
public:
- taitoz_state(const machine_config &mconfig, device_type type, const char *tag)
- : driver_device(mconfig, type, tag),
+ taitoz_state(const machine_config &mconfig, device_type type, const char *tag) :
+ driver_device(mconfig, type, tag),
m_spriteram(*this, "spriteram"),
m_maincpu(*this, "maincpu"),
m_audiocpu(*this, "audiocpu"),
@@ -35,7 +35,9 @@ public:
m_tc0510nio(*this, "tc0510nio"),
m_tc0140syt(*this, "tc0140syt"),
m_gfxdecode(*this, "gfxdecode"),
- m_steer(*this, "STEER") { }
+ m_steer(*this, "STEER"),
+ m_lamp(*this, "lamp%u", 0U)
+ { }
DECLARE_CUSTOM_INPUT_MEMBER(taitoz_pedal_r);
@@ -55,6 +57,7 @@ public:
void init_bshark();
protected:
+ virtual void machine_start() override { m_lamp.resolve(); }
virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) override;
private:
@@ -91,6 +94,7 @@ private:
optional_device<tc0140syt_device> m_tc0140syt; // bshark & spacegun miss the CPUs which shall use TC0140
required_device<gfxdecode_device> m_gfxdecode;
optional_ioport m_steer;
+ output_finder<2> m_lamp;
DECLARE_WRITE16_MEMBER(cpua_ctrl_w);
DECLARE_WRITE16_MEMBER(bshark_cpua_ctrl_w);
diff --git a/src/mame/includes/tek405x.h b/src/mame/includes/tek405x.h
index 3c6835fd487..805ab42c1b2 100644
--- a/src/mame/includes/tek405x.h
+++ b/src/mame/includes/tek405x.h
@@ -51,26 +51,9 @@ public:
m_rom(*this, MC6800_TAG),
m_bsofl_rom(*this, "020_0147_00"),
m_bscom_rom(*this, "021_0188_00"),
- m_special(*this, "SPECIAL")
- {
- }
-
- required_device<cpu_device> m_maincpu;
- required_device<pia6821_device> m_gpib_pia;
- required_device<pia6821_device> m_com_pia;
- required_device<acia6850_device> m_acia;
- required_device<clock_device> m_acia_clock;
- required_device<ieee488_device> m_gpib;
- required_device<speaker_sound_device> m_speaker;
- required_device<ram_device> m_ram;
- required_memory_region m_rom;
- required_memory_region m_bsofl_rom;
- required_memory_region m_bscom_rom;
- required_ioport m_special;
-
- virtual void machine_start() override;
-
- virtual void video_start() override;
+ m_special(*this, "SPECIAL"),
+ m_lamp(*this, "lamp%u", 0U)
+ { }
void bankswitch(uint8_t data);
void update_irq();
@@ -122,6 +105,28 @@ public:
DECLARE_WRITE_LINE_MEMBER( acia_irq_w );
DECLARE_WRITE_LINE_MEMBER( write_acia_clock );
+ TIMER_DEVICE_CALLBACK_MEMBER(keyboard_tick);
+ void tek4051(machine_config &config);
+ void tek4051_mem(address_map &map);
+
+protected:
+ virtual void machine_start() override;
+ virtual void video_start() override;
+
+ required_device<cpu_device> m_maincpu;
+ required_device<pia6821_device> m_gpib_pia;
+ required_device<pia6821_device> m_com_pia;
+ required_device<acia6850_device> m_acia;
+ required_device<clock_device> m_acia_clock;
+ required_device<ieee488_device> m_gpib;
+ required_device<speaker_sound_device> m_speaker;
+ required_device<ram_device> m_ram;
+ required_memory_region m_rom;
+ required_memory_region m_bsofl_rom;
+ required_memory_region m_bscom_rom;
+ required_ioport m_special;
+ output_finder<4> m_lamp;
+
// interrupts
int m_x_pia_irqa;
int m_x_pia_irqb;
@@ -143,28 +148,26 @@ public:
// GPIB
int m_talk;
- TIMER_DEVICE_CALLBACK_MEMBER(keyboard_tick);
- void tek4051(machine_config &config);
- void tek4051_mem(address_map &map);
};
class tek4052_state : public driver_device
{
public:
- tek4052_state(const machine_config &mconfig, device_type type, const char *tag)
- : driver_device(mconfig, type, tag),
- m_maincpu(*this, AM2901A_TAG),
- m_ram(*this, RAM_TAG)
- { }
+ tek4052_state(const machine_config &mconfig, device_type type, const char *tag) :
+ driver_device(mconfig, type, tag),
+ m_maincpu(*this, AM2901A_TAG),
+ m_ram(*this, RAM_TAG)
+ { }
- required_device<cpu_device> m_maincpu;
- required_device<ram_device> m_ram;
+ void tek4052(machine_config &config);
+ void tek4052_mem(address_map &map);
+protected:
virtual void machine_start() override;
-
virtual void video_start() override;
- void tek4052(machine_config &config);
- void tek4052_mem(address_map &map);
+
+ required_device<cpu_device> m_maincpu;
+ required_device<ram_device> m_ram;
};
#endif // MAME_INCLUDES_TEK405X_H
diff --git a/src/mame/includes/tetrisp2.h b/src/mame/includes/tetrisp2.h
index 6a1fd83576c..2f54773adc0 100644
--- a/src/mame/includes/tetrisp2.h
+++ b/src/mame/includes/tetrisp2.h
@@ -31,57 +31,10 @@ public:
m_palette(*this, "palette"),
m_sub_palette(*this, "sub_palette"),
m_paletteram(*this, "paletteram"),
- m_sub_paletteram(*this, "sub_paletteram")
+ m_sub_paletteram(*this, "sub_paletteram"),
+ m_led(*this, "led%u", 0U)
{ }
- required_device<cpu_device> m_maincpu;
- optional_device<cpu_device> m_subcpu;
-
- required_shared_ptr<uint16_t> m_spriteram;
- optional_shared_ptr<uint16_t> m_spriteram2;
-
- uint16_t m_systemregs[0x10];
- required_shared_ptr<uint16_t> m_vram_fg;
- required_shared_ptr<uint16_t> m_vram_bg;
- required_shared_ptr<uint16_t> m_vram_rot;
- required_shared_ptr<uint16_t> m_nvram;
- required_shared_ptr<uint16_t> m_scroll_fg;
- required_shared_ptr<uint16_t> m_scroll_bg;
- required_shared_ptr<uint16_t> m_rotregs;
- std::unique_ptr<uint8_t[]> m_priority;
- optional_shared_ptr<uint16_t> m_rocknms_sub_priority;
- optional_shared_ptr<uint16_t> m_rocknms_sub_vram_rot;
- optional_shared_ptr<uint16_t> m_rocknms_sub_vram_fg;
- optional_shared_ptr<uint16_t> m_rocknms_sub_vram_bg;
- optional_shared_ptr<uint16_t> m_rocknms_sub_scroll_fg;
- optional_shared_ptr<uint16_t> m_rocknms_sub_scroll_bg;
- optional_shared_ptr<uint16_t> m_rocknms_sub_rotregs;
- required_device<gfxdecode_device> m_gfxdecode;
- optional_device<gfxdecode_device> m_sub_gfxdecode;
- required_device<palette_device> m_palette;
- optional_device<palette_device> m_sub_palette;
- required_shared_ptr<uint16_t> m_paletteram;
- optional_shared_ptr<uint16_t> m_sub_paletteram;
-
- uint16_t m_rocknms_sub_systemregs[0x10];
- uint16_t m_rockn_protectdata;
- uint16_t m_rockn_adpcmbank;
- uint16_t m_rockn_soundvolume;
- emu_timer *m_rockn_timer_l4;
- emu_timer *m_rockn_timer_sub_l4;
- emu_timer *m_rockn_timer_l1;
- emu_timer *m_rockn_timer_sub_l1;
- int m_bank_lo;
- int m_bank_hi;
- uint16_t m_rocknms_main2sub;
- uint16_t m_rocknms_sub2main;
- int m_flipscreen_old;
- tilemap_t *m_tilemap_bg;
- tilemap_t *m_tilemap_fg;
- tilemap_t *m_tilemap_rot;
- tilemap_t *m_tilemap_sub_bg;
- tilemap_t *m_tilemap_sub_fg;
- tilemap_t *m_tilemap_sub_rot;
DECLARE_WRITE16_MEMBER(rockn_systemregs_w);
DECLARE_WRITE16_MEMBER(rocknms_sub_systemregs_w);
DECLARE_READ16_MEMBER(rockn_adpcmbank_r);
@@ -149,6 +102,59 @@ public:
void rocknms_main_map(address_map &map);
void rocknms_sub_map(address_map &map);
void tetrisp2_map(address_map &map);
+
+protected:
+ virtual void machine_start() override { m_led.resolve(); }
+
+ required_device<cpu_device> m_maincpu;
+ optional_device<cpu_device> m_subcpu;
+
+ required_shared_ptr<uint16_t> m_spriteram;
+ optional_shared_ptr<uint16_t> m_spriteram2;
+
+ uint16_t m_systemregs[0x10];
+ required_shared_ptr<uint16_t> m_vram_fg;
+ required_shared_ptr<uint16_t> m_vram_bg;
+ required_shared_ptr<uint16_t> m_vram_rot;
+ required_shared_ptr<uint16_t> m_nvram;
+ required_shared_ptr<uint16_t> m_scroll_fg;
+ required_shared_ptr<uint16_t> m_scroll_bg;
+ required_shared_ptr<uint16_t> m_rotregs;
+ std::unique_ptr<uint8_t[]> m_priority;
+ optional_shared_ptr<uint16_t> m_rocknms_sub_priority;
+ optional_shared_ptr<uint16_t> m_rocknms_sub_vram_rot;
+ optional_shared_ptr<uint16_t> m_rocknms_sub_vram_fg;
+ optional_shared_ptr<uint16_t> m_rocknms_sub_vram_bg;
+ optional_shared_ptr<uint16_t> m_rocknms_sub_scroll_fg;
+ optional_shared_ptr<uint16_t> m_rocknms_sub_scroll_bg;
+ optional_shared_ptr<uint16_t> m_rocknms_sub_rotregs;
+ required_device<gfxdecode_device> m_gfxdecode;
+ optional_device<gfxdecode_device> m_sub_gfxdecode;
+ required_device<palette_device> m_palette;
+ optional_device<palette_device> m_sub_palette;
+ required_shared_ptr<uint16_t> m_paletteram;
+ optional_shared_ptr<uint16_t> m_sub_paletteram;
+ output_finder<45> m_led;
+
+ uint16_t m_rocknms_sub_systemregs[0x10];
+ uint16_t m_rockn_protectdata;
+ uint16_t m_rockn_adpcmbank;
+ uint16_t m_rockn_soundvolume;
+ emu_timer *m_rockn_timer_l4;
+ emu_timer *m_rockn_timer_sub_l4;
+ emu_timer *m_rockn_timer_l1;
+ emu_timer *m_rockn_timer_sub_l1;
+ int m_bank_lo;
+ int m_bank_hi;
+ uint16_t m_rocknms_main2sub;
+ uint16_t m_rocknms_sub2main;
+ int m_flipscreen_old;
+ tilemap_t *m_tilemap_bg;
+ tilemap_t *m_tilemap_fg;
+ tilemap_t *m_tilemap_rot;
+ tilemap_t *m_tilemap_sub_bg;
+ tilemap_t *m_tilemap_sub_fg;
+ tilemap_t *m_tilemap_sub_rot;
};
class stepstag_state : public tetrisp2_state
diff --git a/src/mame/includes/tiki100.h b/src/mame/includes/tiki100.h
index 35861655818..101e1c4fd3f 100644
--- a/src/mame/includes/tiki100.h
+++ b/src/mame/includes/tiki100.h
@@ -63,7 +63,8 @@ public:
m_st_io(*this, "ST"),
m_palette(*this, "palette"),
m_rome(1),
- m_vire(1)
+ m_vire(1),
+ m_led(*this, "led%u", 0U)
{ }
uint32_t screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect);
@@ -149,6 +150,8 @@ protected:
// serial state
bool m_st;
+
+ output_finder<3> m_led;
};
#endif // MAME_INCLUDES_TIKI100_H
diff --git a/src/mame/includes/tmc1800.h b/src/mame/includes/tmc1800.h
index eb46a663523..7fabc43512c 100644
--- a/src/mame/includes/tmc1800.h
+++ b/src/mame/includes/tmc1800.h
@@ -26,24 +26,24 @@ class tmc1800_base_state : public driver_device
{
public:
tmc1800_base_state(const machine_config &mconfig, device_type type, const char *tag)
- : driver_device(mconfig, type, tag),
- m_maincpu(*this, CDP1802_TAG),
- m_cassette(*this, "cassette"),
- m_rom(*this, CDP1802_TAG),
- m_run(*this, "RUN"),
- m_ram(*this, RAM_TAG),
- m_beeper(*this, "beeper")
+ : driver_device(mconfig, type, tag)
+ , m_maincpu(*this, CDP1802_TAG)
+ , m_cassette(*this, "cassette")
+ , m_rom(*this, CDP1802_TAG)
+ , m_run(*this, "RUN")
+ , m_ram(*this, RAM_TAG)
+ , m_beeper(*this, "beeper")
{ }
+ DECLARE_QUICKLOAD_LOAD_MEMBER( tmc1800 );
+protected:
required_device<cpu_device> m_maincpu;
required_device<cassette_image_device> m_cassette;
required_memory_region m_rom;
required_ioport m_run;
required_device<ram_device> m_ram;
optional_device<beep_device> m_beeper;
-
- DECLARE_QUICKLOAD_LOAD_MEMBER( tmc1800 );
};
class tmc1800_state : public tmc1800_base_state
@@ -55,15 +55,10 @@ public:
};
tmc1800_state(const machine_config &mconfig, device_type type, const char *tag)
- : tmc1800_base_state(mconfig, type, tag),
- m_vdc(*this, CDP1861_TAG)
+ : tmc1800_base_state(mconfig, type, tag)
+ , m_vdc(*this, CDP1861_TAG)
{ }
- required_device<cdp1861_device> m_vdc;
-
- virtual void machine_start() override;
- virtual void machine_reset() override;
-
DECLARE_WRITE8_MEMBER( keylatch_w );
DECLARE_READ8_MEMBER( dispon_r );
DECLARE_WRITE8_MEMBER( dispoff_w );
@@ -72,16 +67,21 @@ public:
DECLARE_READ_LINE_MEMBER( ef3_r );
DECLARE_WRITE_LINE_MEMBER( q_w );
- /* keyboard state */
- int m_keylatch; /* key latch */
void init_tmc1800();
void tmc1800(machine_config &config);
void tmc1800_video(machine_config &config);
void tmc1800_io_map(address_map &map);
void tmc1800_map(address_map &map);
+
protected:
+ virtual void machine_start() override;
+ virtual void machine_reset() override;
virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) override;
+
+ required_device<cdp1861_device> m_vdc;
+ /* keyboard state */
+ int m_keylatch; /* key latch */
};
class osc1000b_state : public tmc1800_base_state
@@ -92,9 +92,6 @@ public:
{ }
- virtual void machine_start() override;
- virtual void machine_reset() override;
-
uint32_t screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect);
DECLARE_WRITE8_MEMBER( keylatch_w );
@@ -103,31 +100,30 @@ public:
DECLARE_READ_LINE_MEMBER( ef3_r );
DECLARE_WRITE_LINE_MEMBER( q_w );
- /* keyboard state */
- int m_keylatch;
void osc1000b(machine_config &config);
void osc1000b_video(machine_config &config);
void osc1000b_io_map(address_map &map);
void osc1000b_map(address_map &map);
+
+protected:
+ virtual void machine_start() override;
+ virtual void machine_reset() override;
+
+ /* keyboard state */
+ int m_keylatch;
};
class tmc2000_state : public tmc1800_base_state
{
public:
tmc2000_state(const machine_config &mconfig, device_type type, const char *tag)
- : tmc1800_base_state(mconfig, type, tag),
- m_cti(*this, CDP1864_TAG),
- m_colorram(*this, "color_ram"),
- m_key_row(*this, {"Y0", "Y1", "Y2", "Y3", "Y4", "Y5", "Y6", "Y7"})
+ : tmc1800_base_state(mconfig, type, tag)
+ , m_cti(*this, CDP1864_TAG)
+ , m_colorram(*this, "color_ram")
+ , m_key_row(*this, {"Y0", "Y1", "Y2", "Y3", "Y4", "Y5", "Y6", "Y7"})
+ , m_led(*this, "led%u", 0U)
{ }
- required_device<cdp1864_device> m_cti;
- optional_shared_ptr<uint8_t> m_colorram;
- required_ioport_array<8> m_key_row;
-
- virtual void machine_start() override;
- virtual void machine_reset() override;
-
DECLARE_WRITE8_MEMBER( keylatch_w );
DECLARE_WRITE8_MEMBER( bankswitch_w );
DECLARE_READ_LINE_MEMBER( clear_r );
@@ -142,6 +138,20 @@ public:
void bankswitch();
+ void tmc2000(machine_config &config);
+ void tmc2000_video(machine_config &config);
+ void tmc2000_io_map(address_map &map);
+ void tmc2000_map(address_map &map);
+
+protected:
+ virtual void machine_start() override;
+ virtual void machine_reset() override;
+
+ required_device<cdp1864_device> m_cti;
+ optional_shared_ptr<uint8_t> m_colorram;
+ required_ioport_array<8> m_key_row;
+ output_finder<2> m_led;
+
// memory
int m_rac;
int m_roc;
@@ -151,32 +161,20 @@ public:
/* keyboard state */
int m_keylatch;
- void tmc2000(machine_config &config);
- void tmc2000_video(machine_config &config);
- void tmc2000_io_map(address_map &map);
- void tmc2000_map(address_map &map);
};
class nano_state : public tmc1800_base_state
{
public:
nano_state(const machine_config &mconfig, device_type type, const char *tag)
- : tmc1800_base_state(mconfig, type, tag),
- m_cti(*this, CDP1864_TAG),
- m_ny0(*this, "NY0"),
- m_ny1(*this, "NY1"),
- m_monitor(*this, "MONITOR")
+ : tmc1800_base_state(mconfig, type, tag)
+ , m_cti(*this, CDP1864_TAG)
+ , m_ny0(*this, "NY0")
+ , m_ny1(*this, "NY1")
+ , m_monitor(*this, "MONITOR")
+ , m_led(*this, "led%u", 0U)
{ }
- required_device<cdp1864_device> m_cti;
- required_ioport m_ny0;
- required_ioport m_ny1;
- required_ioport m_monitor;
-
- virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) override;
- virtual void machine_start() override;
- virtual void machine_reset() override;
-
enum
{
TIMER_ID_EF4
@@ -191,12 +189,23 @@ public:
DECLARE_INPUT_CHANGED_MEMBER( run_pressed );
DECLARE_INPUT_CHANGED_MEMBER( monitor_pressed );
- /* keyboard state */
- int m_keylatch; /* key latch */
void nano(machine_config &config);
void nano_video(machine_config &config);
void nano_io_map(address_map &map);
void nano_map(address_map &map);
+
+protected:
+ virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) override;
+ virtual void machine_start() override;
+ virtual void machine_reset() override;
+
+ required_device<cdp1864_device> m_cti;
+ required_ioport m_ny0;
+ required_ioport m_ny1;
+ required_ioport m_monitor;
+ output_finder<2> m_led;
+ /* keyboard state */
+ int m_keylatch; /* key latch */
};
#endif
diff --git a/src/mame/includes/tmc2000e.h b/src/mame/includes/tmc2000e.h
index e77ce889452..781f2197be8 100644
--- a/src/mame/includes/tmc2000e.h
+++ b/src/mame/includes/tmc2000e.h
@@ -22,25 +22,16 @@ class tmc2000e_state : public driver_device
{
public:
tmc2000e_state(const machine_config &mconfig, device_type type, const char *tag)
- : driver_device(mconfig, type, tag),
- m_maincpu(*this, CDP1802_TAG),
- m_cti(*this, CDP1864_TAG),
- m_cassette(*this, "cassette"),
- m_colorram(*this, "colorram"),
- m_key_row(*this, {"Y0", "Y1", "Y2", "Y3", "Y4", "Y5", "Y6", "Y7"}),
- m_run(*this, "RUN")
+ : driver_device(mconfig, type, tag)
+ , m_maincpu(*this, CDP1802_TAG)
+ , m_cti(*this, CDP1864_TAG)
+ , m_cassette(*this, "cassette")
+ , m_colorram(*this, "colorram")
+ , m_key_row(*this, {"Y0", "Y1", "Y2", "Y3", "Y4", "Y5", "Y6", "Y7"})
+ , m_run(*this, "RUN")
+ , m_led(*this, "led%u", 0U)
{ }
- required_device<cpu_device> m_maincpu;
- required_device<cdp1864_device> m_cti;
- required_device<cassette_image_device> m_cassette;
- required_shared_ptr<uint8_t> m_colorram;
- required_ioport_array<8> m_key_row;
- required_ioport m_run;
-
- virtual void machine_start() override;
- virtual void machine_reset() override;
-
DECLARE_READ8_MEMBER( vismac_r );
DECLARE_WRITE8_MEMBER( vismac_w );
DECLARE_READ8_MEMBER( floppy_r );
@@ -69,6 +60,18 @@ public:
void tmc2000e(machine_config &config);
void tmc2000e_io_map(address_map &map);
void tmc2000e_map(address_map &map);
+
+protected:
+ virtual void machine_start() override;
+ virtual void machine_reset() override;
+
+ required_device<cpu_device> m_maincpu;
+ required_device<cdp1864_device> m_cti;
+ required_device<cassette_image_device> m_cassette;
+ required_shared_ptr<uint8_t> m_colorram;
+ required_ioport_array<8> m_key_row;
+ required_ioport m_run;
+ output_finder<2> m_led;
};
#endif
diff --git a/src/mame/includes/triplhnt.h b/src/mame/includes/triplhnt.h
index 074eb640f86..3f0b5de52ed 100644
--- a/src/mame/includes/triplhnt.h
+++ b/src/mame/includes/triplhnt.h
@@ -47,7 +47,8 @@ public:
m_vpos_ram(*this, "vpos_ram"),
m_hpos_ram(*this, "hpos_ram"),
m_orga_ram(*this, "orga_ram"),
- m_code_ram(*this, "code_ram")
+ m_code_ram(*this, "code_ram"),
+ m_lamp(*this, "lamp0")
{ }
void init_triplhnt();
@@ -75,6 +76,7 @@ protected:
void set_collision(int code);
virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) override;
+ virtual void machine_start() override;
void triplhnt_map(address_map &map);
private:
@@ -92,6 +94,7 @@ private:
required_shared_ptr<uint8_t> m_hpos_ram;
required_shared_ptr<uint8_t> m_orga_ram;
required_shared_ptr<uint8_t> m_code_ram;
+ output_finder<> m_lamp;
uint8_t m_cmos[16];
uint8_t m_da_latch;
diff --git a/src/mame/includes/tunhunt.h b/src/mame/includes/tunhunt.h
index c8ec1f281ec..1023c7d8ea8 100644
--- a/src/mame/includes/tunhunt.h
+++ b/src/mame/includes/tunhunt.h
@@ -19,7 +19,8 @@ public:
m_workram(*this, "workram"),
m_videoram(*this, "videoram"),
m_spriteram(*this, "spriteram"),
- m_generic_paletteram_8(*this, "paletteram")
+ m_generic_paletteram_8(*this, "paletteram"),
+ m_led(*this, "led0")
{ }
void tunhunt(machine_config &config);
@@ -36,6 +37,7 @@ protected:
TILE_GET_INFO_MEMBER(get_fg_tile_info);
+ virtual void machine_start() override { m_led.resolve(); }
virtual void video_start() override;
DECLARE_PALETTE_INIT(tunhunt);
@@ -57,6 +59,7 @@ private:
required_shared_ptr<uint8_t> m_videoram;
required_shared_ptr<uint8_t> m_spriteram;
required_shared_ptr<uint8_t> m_generic_paletteram_8;
+ output_finder<> m_led;
uint8_t m_control;
tilemap_t *m_fg_tilemap;
diff --git a/src/mame/includes/turbo.h b/src/mame/includes/turbo.h
index e14e4f89ea1..e8b3cb3b0e8 100644
--- a/src/mame/includes/turbo.h
+++ b/src/mame/includes/turbo.h
@@ -41,6 +41,7 @@ public:
, m_gfxdecode(*this, "gfxdecode")
, m_screen(*this, "screen")
, m_digits(*this, "digit%u", 0U)
+ , m_lamp(*this, "lamp")
{ }
private:
@@ -67,9 +68,10 @@ private:
required_device<gfxdecode_device> m_gfxdecode;
required_device<screen_device> m_screen;
output_finder<32> m_digits;
+ output_finder<> m_lamp;
std::unique_ptr<uint8_t[]> m_buckrog_bitmap_ram;
- virtual void machine_start() override { m_digits.resolve(); }
+ virtual void machine_start() override { m_digits.resolve(); m_lamp.resolve(); }
/* machine states */
uint8_t m_i8279_scanlines;
diff --git a/src/mame/includes/unico.h b/src/mame/includes/unico.h
index 500e836d57c..8bf66dfbe35 100644
--- a/src/mame/includes/unico.h
+++ b/src/mame/includes/unico.h
@@ -15,6 +15,7 @@ public:
unico_state(const machine_config &mconfig, device_type type, const char *tag) :
driver_device(mconfig, type, tag),
m_palette(*this, "palette"),
+ m_led(*this, "led%u", 0U),
m_maincpu(*this, "maincpu"),
m_oki(*this, "oki"),
m_gfxdecode(*this, "gfxdecode"),
@@ -34,6 +35,7 @@ protected:
DECLARE_WRITE16_MEMBER(burglarx_sound_bank_w);
TILE_GET_INFO_MEMBER(get_tile_info);
+ virtual void machine_start() override;
virtual void video_start() override;
uint32_t screen_update_unico(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
void unico_draw_sprites(screen_device &screen, bitmap_ind16 &bitmap,const rectangle &cliprect);
@@ -41,6 +43,7 @@ protected:
void burglarx_map(address_map &map);
required_device<palette_device> m_palette;
+ output_finder<2> m_led;
private:
std::unique_ptr<uint16_t[]> m_vram;
diff --git a/src/mame/includes/victory.h b/src/mame/includes/victory.h
index 0db8f44943c..a1c107bbd4f 100644
--- a/src/mame/includes/victory.h
+++ b/src/mame/includes/victory.h
@@ -33,9 +33,9 @@ public:
m_screen(*this, "screen"),
m_palette(*this, "palette"),
m_videoram(*this, "videoram"),
- m_charram(*this, "charram")
- {
- }
+ m_charram(*this, "charram"),
+ m_lamp(*this, "lamp%u", 0U)
+ { }
void victory(machine_config &config);
@@ -61,6 +61,7 @@ protected:
void update_background();
void update_foreground();
+ virtual void machine_start() override { m_lamp.resolve(); }
virtual void video_start() override;
void victory_audio(machine_config &config);
void main_io_map(address_map &map);
@@ -89,6 +90,7 @@ private:
required_shared_ptr<uint8_t> m_videoram;
required_shared_ptr<uint8_t> m_charram;
+ output_finder<4> m_lamp;
uint16_t m_paletteram[0x40];
std::unique_ptr<uint8_t[]> m_bgbitmap;
diff --git a/src/mame/includes/videopin.h b/src/mame/includes/videopin.h
index 31049b7fa07..adf911badd6 100644
--- a/src/mame/includes/videopin.h
+++ b/src/mame/includes/videopin.h
@@ -37,7 +37,8 @@ public:
m_gfxdecode(*this, "gfxdecode"),
m_screen(*this, "screen"),
m_palette(*this, "palette"),
- m_video_ram(*this, "video_ram")
+ m_video_ram(*this, "video_ram"),
+ m_led(*this, "led0")
{ }
void videopin(machine_config &config);
@@ -74,6 +75,7 @@ private:
required_device<palette_device> m_palette;
required_shared_ptr<uint8_t> m_video_ram;
+ output_finder<> m_led;
attotime m_time_pushed;
attotime m_time_released;
diff --git a/src/mame/includes/vip.h b/src/mame/includes/vip.h
index 1a1fdd01cc0..f90aedaacec 100644
--- a/src/mame/includes/vip.h
+++ b/src/mame/includes/vip.h
@@ -24,51 +24,35 @@ class vip_state : public driver_device
{
public:
vip_state(const machine_config &mconfig, device_type type, const char *tag)
- : driver_device(mconfig, type, tag),
- m_maincpu(*this, CDP1802_TAG),
- m_vdc(*this, CDP1861_TAG),
- m_cassette(*this, "cassette"),
- m_beeper(*this, DISCRETE_TAG),
- m_byteio(*this, VIP_BYTEIO_PORT_TAG),
- m_exp(*this, VIP_EXPANSION_SLOT_TAG),
- m_ram(*this, RAM_TAG),
- m_rom(*this, CDP1802_TAG),
- m_chip8(*this, "chip8"),
- m_chip8x(*this, "chip8x"),
- m_run(*this, "RUN"),
- m_keypad(*this, "KEYPAD"),
- m_io_beeper(*this, "BEEPER"),
- m_8000(1),
- m_vdc_int(CLEAR_LINE),
- m_vdc_dma_out(CLEAR_LINE),
- m_vdc_ef1(CLEAR_LINE),
- m_exp_int(CLEAR_LINE),
- m_exp_dma_out(CLEAR_LINE),
- m_exp_dma_in(CLEAR_LINE),
- m_byteio_ef3(CLEAR_LINE),
- m_byteio_ef4(CLEAR_LINE),
- m_exp_ef1(CLEAR_LINE),
- m_exp_ef3(CLEAR_LINE),
- m_exp_ef4(CLEAR_LINE)
+ : driver_device(mconfig, type, tag)
+ , m_maincpu(*this, CDP1802_TAG)
+ , m_vdc(*this, CDP1861_TAG)
+ , m_cassette(*this, "cassette")
+ , m_beeper(*this, DISCRETE_TAG)
+ , m_byteio(*this, VIP_BYTEIO_PORT_TAG)
+ , m_exp(*this, VIP_EXPANSION_SLOT_TAG)
+ , m_ram(*this, RAM_TAG)
+ , m_rom(*this, CDP1802_TAG)
+ , m_chip8(*this, "chip8")
+ , m_chip8x(*this, "chip8x")
+ , m_run(*this, "RUN")
+ , m_keypad(*this, "KEYPAD")
+ , m_io_beeper(*this, "BEEPER")
+ , m_8000(1)
+ , m_vdc_int(CLEAR_LINE)
+ , m_vdc_dma_out(CLEAR_LINE)
+ , m_vdc_ef1(CLEAR_LINE)
+ , m_exp_int(CLEAR_LINE)
+ , m_exp_dma_out(CLEAR_LINE)
+ , m_exp_dma_in(CLEAR_LINE)
+ , m_byteio_ef3(CLEAR_LINE)
+ , m_byteio_ef4(CLEAR_LINE)
+ , m_exp_ef1(CLEAR_LINE)
+ , m_exp_ef3(CLEAR_LINE)
+ , m_exp_ef4(CLEAR_LINE)
+ , m_led(*this, "led%u", 0U)
{ }
- required_device<cosmac_device> m_maincpu;
- required_device<cdp1861_device> m_vdc;
- required_device<cassette_image_device> m_cassette;
- required_device<discrete_sound_device> m_beeper;
- required_device<vip_byteio_port_device> m_byteio;
- required_device<vip_expansion_slot_device> m_exp;
- required_device<ram_device> m_ram;
- required_memory_region m_rom;
- required_memory_region m_chip8;
- required_memory_region m_chip8x;
- required_ioport m_run;
- required_ioport m_keypad;
- required_ioport m_io_beeper;
-
- virtual void machine_start() override;
- virtual void machine_reset() override;
-
uint32_t screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect);
void update_interrupts();
@@ -102,6 +86,29 @@ public:
DECLARE_INPUT_CHANGED_MEMBER( beeper_w );
DECLARE_QUICKLOAD_LOAD_MEMBER( vip );
+ void vp111(machine_config &config);
+ void vip(machine_config &config);
+ void vip_io(address_map &map);
+ void vip_mem(address_map &map);
+
+protected:
+ virtual void machine_start() override;
+ virtual void machine_reset() override;
+
+ required_device<cosmac_device> m_maincpu;
+ required_device<cdp1861_device> m_vdc;
+ required_device<cassette_image_device> m_cassette;
+ required_device<discrete_sound_device> m_beeper;
+ required_device<vip_byteio_port_device> m_byteio;
+ required_device<vip_expansion_slot_device> m_exp;
+ required_device<ram_device> m_ram;
+ required_memory_region m_rom;
+ required_memory_region m_chip8;
+ required_memory_region m_chip8x;
+ required_ioport m_run;
+ required_ioport m_keypad;
+ required_ioport m_io_beeper;
+
// memory state
int m_8000;
@@ -123,10 +130,7 @@ public:
// expansion state
uint8_t m_byteio_data;
- void vp111(machine_config &config);
- void vip(machine_config &config);
- void vip_io(address_map &map);
- void vip_mem(address_map &map);
+ output_finder<3> m_led;
};
#endif
diff --git a/src/mame/includes/wolfpack.h b/src/mame/includes/wolfpack.h
index d170a712296..663e3c1edfc 100644
--- a/src/mame/includes/wolfpack.h
+++ b/src/mame/includes/wolfpack.h
@@ -28,7 +28,8 @@ public:
m_s14001a(*this, "speech"),
m_gfxdecode(*this, "gfxdecode"),
m_screen(*this, "screen"),
- m_palette(*this, "palette")
+ m_palette(*this, "palette"),
+ m_led(*this, "led0")
{ }
DECLARE_CUSTOM_INPUT_MEMBER(dial_r);
@@ -88,6 +89,7 @@ private:
required_device<gfxdecode_device> m_gfxdecode;
required_device<screen_device> m_screen;
required_device<palette_device> m_palette;
+ output_finder<> m_led;
bool m_collision;
unsigned m_current_index;