diff --git a/src/mame/drivers/cbuster.c b/src/mame/drivers/cbuster.c index ea67e5a0312..5f15c26da01 100644 --- a/src/mame/drivers/cbuster.c +++ b/src/mame/drivers/cbuster.c @@ -291,9 +291,6 @@ static const deco16ic_interface twocrude_deco16ic_tilegen2_intf = void cbuster_state::machine_start() { - m_deco_tilegen1 = machine().device("tilegen1"); - m_deco_tilegen2 = machine().device("tilegen2"); - save_item(NAME(m_prot)); save_item(NAME(m_pri)); } diff --git a/src/mame/drivers/dblewing.c b/src/mame/drivers/dblewing.c index a04c1e1d64c..f6615335ed5 100644 --- a/src/mame/drivers/dblewing.c +++ b/src/mame/drivers/dblewing.c @@ -36,7 +36,8 @@ public: m_spriteram(*this, "spriteram"), m_sprgen(*this, "spritegen"), m_maincpu(*this, "maincpu"), - m_audiocpu(*this, "audiocpu") + m_audiocpu(*this, "audiocpu"), + m_deco_tilegen1(*this, "tilegen1") { } /* memory pointers */ @@ -81,7 +82,7 @@ public: /* devices */ required_device m_maincpu; required_device m_audiocpu; - device_t *m_deco_tilegen1; + required_device m_deco_tilegen1; DECLARE_WRITE_LINE_MEMBER(sound_irq); DECLARE_READ16_MEMBER(dblewing_prot_r); DECLARE_WRITE16_MEMBER(dblewing_prot_w); @@ -562,8 +563,6 @@ static const deco16ic_interface dblewing_deco16ic_tilegen1_intf = void dblewing_state::machine_start() { - m_deco_tilegen1 = machine().device("tilegen1"); - save_item(NAME(m_008_data)); save_item(NAME(m_104_data)); save_item(NAME(m_406_data)); diff --git a/src/mame/drivers/dietgo.c b/src/mame/drivers/dietgo.c index 64384a76bd4..40f94e7a9c8 100644 --- a/src/mame/drivers/dietgo.c +++ b/src/mame/drivers/dietgo.c @@ -184,7 +184,6 @@ static const deco16ic_interface dietgo_deco16ic_tilegen1_intf = void dietgo_state::machine_start() { - m_deco_tilegen1 = machine().device("tilegen1"); } static MACHINE_CONFIG_START( dietgo, dietgo_state ) diff --git a/src/mame/drivers/dreambal.c b/src/mame/drivers/dreambal.c index 68eda3cb991..99696aebca2 100644 --- a/src/mame/drivers/dreambal.c +++ b/src/mame/drivers/dreambal.c @@ -33,14 +33,15 @@ public: dreambal_state(const machine_config &mconfig, device_type type, const char *tag) : driver_device(mconfig, type, tag), m_eeprom(*this, "eeprom"), - m_maincpu(*this, "maincpu") + m_maincpu(*this, "maincpu"), + m_deco_tilegen1(*this, "tilegen1") { } required_device m_eeprom; /* devices */ required_device m_maincpu; - device_t *m_deco_tilegen1; + required_device m_deco_tilegen1; DECLARE_DRIVER_INIT(dreambal); virtual void machine_start(); @@ -283,9 +284,6 @@ static const deco16ic_interface dreambal_deco16ic_tilegen1_intf = void dreambal_state::machine_start() { - m_deco_tilegen1 = machine().device("tilegen1"); - - } void dreambal_state::machine_reset() diff --git a/src/mame/drivers/funkyjet.c b/src/mame/drivers/funkyjet.c index cf1f9c050ae..d8f29408cec 100644 --- a/src/mame/drivers/funkyjet.c +++ b/src/mame/drivers/funkyjet.c @@ -288,8 +288,6 @@ static const deco16ic_interface funkyjet_deco16ic_tilegen1_intf = void funkyjet_state::machine_start() { - m_deco_tilegen1 = machine().device("tilegen1"); - decoprot_reset(machine()); } diff --git a/src/mame/drivers/pktgaldx.c b/src/mame/drivers/pktgaldx.c index 6ca0b64591f..27987765e3c 100644 --- a/src/mame/drivers/pktgaldx.c +++ b/src/mame/drivers/pktgaldx.c @@ -314,8 +314,6 @@ static const deco16ic_interface pktgaldx_deco16ic_tilegen1_intf = void pktgaldx_state::machine_start() { - m_deco_tilegen1 = machine().device("tilegen1"); - decoprot_reset(machine()); } diff --git a/src/mame/drivers/supbtime.c b/src/mame/drivers/supbtime.c index 5791dae740e..6103e89d31e 100644 --- a/src/mame/drivers/supbtime.c +++ b/src/mame/drivers/supbtime.c @@ -320,7 +320,6 @@ static const deco16ic_interface supbtime_deco16ic_tilegen1_intf = void supbtime_state::machine_start() { - m_deco_tilegen1 = machine().device("tilegen1"); } static MACHINE_CONFIG_START( supbtime, supbtime_state ) diff --git a/src/mame/drivers/tumblep.c b/src/mame/drivers/tumblep.c index 467131c0f1b..55349187ad6 100644 --- a/src/mame/drivers/tumblep.c +++ b/src/mame/drivers/tumblep.c @@ -285,7 +285,6 @@ static const deco16ic_interface tumblep_deco16ic_tilegen1_intf = void tumblep_state::machine_start() { - m_deco_tilegen1 = machine().device("tilegen1"); } static MACHINE_CONFIG_START( tumblep, tumblep_state ) diff --git a/src/mame/drivers/vaportra.c b/src/mame/drivers/vaportra.c index 09432122206..2fbd2684565 100644 --- a/src/mame/drivers/vaportra.c +++ b/src/mame/drivers/vaportra.c @@ -230,9 +230,6 @@ static const deco16ic_interface vaportra_deco16ic_tilegen2_intf = void vaportra_state::machine_start() { - m_deco_tilegen1 = machine().device("tilegen1"); - m_deco_tilegen2 = machine().device("tilegen2"); - save_item(NAME(m_priority)); } diff --git a/src/mame/includes/cbuster.h b/src/mame/includes/cbuster.h index 0419857c558..b3ff8f52a00 100644 --- a/src/mame/includes/cbuster.h +++ b/src/mame/includes/cbuster.h @@ -5,6 +5,7 @@ *************************************************************************/ #include "video/decospr.h" +#include "video/deco16ic.h" class cbuster_state : public driver_device { @@ -19,7 +20,9 @@ public: m_spriteram16(*this, "spriteram16"), m_sprgen(*this, "spritegen"), m_maincpu(*this, "maincpu"), - m_audiocpu(*this, "audiocpu") + m_audiocpu(*this, "audiocpu"), + m_deco_tilegen1(*this, "tilegen1"), + m_deco_tilegen2(*this, "tilegen2") { } /* memory pointers */ @@ -40,8 +43,8 @@ public: /* devices */ required_device m_maincpu; required_device m_audiocpu; - device_t *m_deco_tilegen1; - device_t *m_deco_tilegen2; + required_device m_deco_tilegen1; + required_device m_deco_tilegen2; DECLARE_WRITE16_MEMBER(twocrude_control_w); DECLARE_READ16_MEMBER(twocrude_control_r); DECLARE_WRITE16_MEMBER(twocrude_palette_24bit_rg_w); diff --git a/src/mame/includes/deco32.h b/src/mame/includes/deco32.h index 50d7a1ad3cf..55d30214bb1 100644 --- a/src/mame/includes/deco32.h +++ b/src/mame/includes/deco32.h @@ -1,6 +1,7 @@ #include "audio/decobsmt.h" #include "video/bufsprite.h" #include "video/decospr.h" +#include "video/deco16ic.h" #include "machine/eeprom.h" #include "sound/okim6295.h" @@ -24,7 +25,9 @@ public: m_sprgen2(*this, "spritegen2"), m_eeprom(*this, "eeprom"), m_oki1(*this, "oki1"), - m_oki2(*this, "oki2") + m_oki2(*this, "oki2"), + m_deco_tilegen1(*this, "tilegen1"), + m_deco_tilegen2(*this, "tilegen2") { } required_device m_maincpu; @@ -77,8 +80,8 @@ public: UINT16 m_pf3_rowscroll[0x1000]; UINT16 m_pf4_rowscroll[0x1000]; - device_t *m_deco_tilegen1; - device_t *m_deco_tilegen2; + required_device m_deco_tilegen1; + required_device m_deco_tilegen2; UINT8 m_irq_source; DECLARE_WRITE_LINE_MEMBER(sound_irq_nslasher); DECLARE_READ32_MEMBER(deco32_irq_controller_r); diff --git a/src/mame/includes/dietgo.h b/src/mame/includes/dietgo.h index 0b4d9a62926..c7e744ebf2a 100644 --- a/src/mame/includes/dietgo.h +++ b/src/mame/includes/dietgo.h @@ -5,6 +5,7 @@ *************************************************************************/ #include "video/decospr.h" +#include "video/deco16ic.h" class dietgo_state : public driver_device { @@ -16,7 +17,8 @@ public: m_spriteram(*this, "spriteram"), m_sprgen(*this, "spritegen"), m_maincpu(*this, "maincpu"), - m_audiocpu(*this, "audiocpu") + m_audiocpu(*this, "audiocpu"), + m_deco_tilegen1(*this, "tilegen1") { } /* memory pointers */ @@ -29,7 +31,7 @@ public: /* devices */ required_device m_maincpu; required_device m_audiocpu; - device_t *m_deco_tilegen1; + required_device m_deco_tilegen1; DECLARE_DRIVER_INIT(dietgo); virtual void machine_start(); UINT32 screen_update_dietgo(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); diff --git a/src/mame/includes/funkyjet.h b/src/mame/includes/funkyjet.h index f2db3cef49f..6a8c11c8beb 100644 --- a/src/mame/includes/funkyjet.h +++ b/src/mame/includes/funkyjet.h @@ -5,6 +5,7 @@ *************************************************************************/ #include "video/decospr.h" +#include "video/deco16ic.h" class funkyjet_state : public driver_device { @@ -16,7 +17,8 @@ public: m_pf2_rowscroll(*this, "pf2_rowscroll"), m_sprgen(*this, "spritegen"), m_maincpu(*this, "maincpu"), - m_audiocpu(*this, "audiocpu") + m_audiocpu(*this, "audiocpu"), + m_deco_tilegen1(*this, "tilegen1") { } /* memory pointers */ @@ -29,7 +31,7 @@ public: /* devices */ required_device m_maincpu; required_device m_audiocpu; - device_t *m_deco_tilegen1; + required_device m_deco_tilegen1; DECLARE_DRIVER_INIT(funkyjet); virtual void machine_start(); UINT32 screen_update_funkyjet(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); diff --git a/src/mame/includes/pktgaldx.h b/src/mame/includes/pktgaldx.h index 44e8a157616..7a9775d180f 100644 --- a/src/mame/includes/pktgaldx.h +++ b/src/mame/includes/pktgaldx.h @@ -18,7 +18,8 @@ public: m_pktgaldb_sprites(*this, "pktgaldb_spr"), m_sprgen(*this, "spritegen"), m_maincpu(*this, "maincpu"), - m_oki2(*this, "oki2") + m_oki2(*this, "oki2"), + m_deco_tilegen1(*this, "tilegen1") { } /* memory pointers */ @@ -34,7 +35,7 @@ public: /* devices */ required_device m_maincpu; required_device m_oki2; - device_t *m_deco_tilegen1; + optional_device m_deco_tilegen1; DECLARE_READ16_MEMBER(pckgaldx_unknown_r); DECLARE_READ16_MEMBER(pckgaldx_protection_r); DECLARE_WRITE16_MEMBER(pktgaldx_oki_bank_w); diff --git a/src/mame/includes/supbtime.h b/src/mame/includes/supbtime.h index 0979dc2d235..b2f8563fbcd 100644 --- a/src/mame/includes/supbtime.h +++ b/src/mame/includes/supbtime.h @@ -16,7 +16,8 @@ public: m_pf2_rowscroll(*this, "pf2_rowscroll"), m_sprgen(*this, "spritegen"), m_maincpu(*this, "maincpu"), - m_audiocpu(*this, "audiocpu") + m_audiocpu(*this, "audiocpu"), + m_deco_tilegen1(*this, "tilegen1") { } /* memory pointers */ @@ -31,7 +32,7 @@ public: /* devices */ required_device m_maincpu; required_device m_audiocpu; - device_t *m_deco_tilegen1; + required_device m_deco_tilegen1; DECLARE_READ16_MEMBER(supbtime_controls_r); DECLARE_WRITE16_MEMBER(sound_w); virtual void machine_start(); diff --git a/src/mame/includes/tumblep.h b/src/mame/includes/tumblep.h index 2318e52fabd..2dbb012aeec 100644 --- a/src/mame/includes/tumblep.h +++ b/src/mame/includes/tumblep.h @@ -5,6 +5,7 @@ *************************************************************************/ #include "video/decospr.h" +#include "video/deco16ic.h" class tumblep_state : public driver_device { @@ -16,7 +17,8 @@ public: m_pf2_rowscroll(*this, "pf2_rowscroll"), m_sprgen(*this, "spritegen"), m_maincpu(*this, "maincpu"), - m_audiocpu(*this, "audiocpu") + m_audiocpu(*this, "audiocpu"), + m_deco_tilegen1(*this, "tilegen1") { } /* memory pointers */ @@ -29,7 +31,7 @@ public: /* devices */ required_device m_maincpu; required_device m_audiocpu; - device_t *m_deco_tilegen1; + required_device m_deco_tilegen1; DECLARE_READ16_MEMBER(tumblep_prot_r); DECLARE_WRITE16_MEMBER(tumblep_sound_w); DECLARE_WRITE16_MEMBER(jumppop_sound_w); diff --git a/src/mame/includes/vaportra.h b/src/mame/includes/vaportra.h index 6d394596ffb..a656638458c 100644 --- a/src/mame/includes/vaportra.h +++ b/src/mame/includes/vaportra.h @@ -13,6 +13,8 @@ public: : driver_device(mconfig, type, tag), m_maincpu(*this, "maincpu"), m_audiocpu(*this, "audiocpu"), + m_deco_tilegen1(*this, "tilegen1"), + m_deco_tilegen2(*this, "tilegen2"), m_spriteram(*this, "spriteram") { } /* memory pointers */ @@ -27,8 +29,8 @@ public: /* devices */ required_device m_maincpu; required_device m_audiocpu; - device_t *m_deco_tilegen1; - device_t *m_deco_tilegen2; + required_device m_deco_tilegen1; + required_device m_deco_tilegen2; required_device m_spriteram; DECLARE_WRITE16_MEMBER(vaportra_sound_w); DECLARE_READ16_MEMBER(vaportra_control_r); diff --git a/src/mame/video/deco32.c b/src/mame/video/deco32.c index 7b032b182f2..9a454b94b66 100644 --- a/src/mame/video/deco32.c +++ b/src/mame/video/deco32.c @@ -568,9 +568,6 @@ void dragngun_state::screen_eof_dragngun(screen_device &screen, bool state) UINT32 deco32_state::screen_update_captaven(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) { - m_deco_tilegen1 = machine().device("tilegen1"); - m_deco_tilegen2 = machine().device("tilegen2"); - machine().tilemap().set_flip_all(flip_screen() ? (TILEMAP_FLIPY | TILEMAP_FLIPX) : 0); machine().priority_bitmap.fill(0, cliprect); @@ -604,9 +601,6 @@ UINT32 deco32_state::screen_update_captaven(screen_device &screen, bitmap_ind16 UINT32 dragngun_state::screen_update_dragngun(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect) { - m_deco_tilegen1 = machine().device("tilegen1"); - m_deco_tilegen2 = machine().device("tilegen2"); - bitmap.fill(get_black_pen(machine()), cliprect); deco16ic_pf_update(m_deco_tilegen1, m_pf1_rowscroll, m_pf2_rowscroll); @@ -643,9 +637,6 @@ UINT32 dragngun_state::screen_update_dragngun(screen_device &screen, bitmap_rgb3 UINT32 deco32_state::screen_update_fghthist(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect) { - m_deco_tilegen1 = machine().device("tilegen1"); - m_deco_tilegen2 = machine().device("tilegen2"); - machine().priority_bitmap.fill(0, cliprect); bitmap.fill(machine().pens[0x000], cliprect); // Palette index not confirmed @@ -818,9 +809,6 @@ void deco32_state::mixDualAlphaSprites(bitmap_rgb32 &bitmap, const rectangle &cl UINT32 deco32_state::screen_update_nslasher(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect) { int alphaTilemap=0; - m_deco_tilegen1 = machine().device("tilegen1"); - m_deco_tilegen2 = machine().device("tilegen2"); - deco16ic_pf_update(m_deco_tilegen1, m_pf1_rowscroll, m_pf2_rowscroll); deco16ic_pf_update(m_deco_tilegen2, m_pf3_rowscroll, m_pf4_rowscroll);