summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--src/devices/bus/comx35/clm.h3
-rw-r--r--src/devices/bus/iq151/video32.cpp24
-rw-r--r--src/devices/bus/iq151/video32.h4
-rw-r--r--src/devices/bus/iq151/video64.cpp24
-rw-r--r--src/devices/bus/iq151/video64.h4
-rw-r--r--src/devices/machine/tc009xlvc.cpp23
-rw-r--r--src/devices/machine/tc009xlvc.h5
-rw-r--r--src/mame/drivers/actfancr.cpp14
-rw-r--r--src/mame/drivers/aerofgt.cpp14
-rw-r--r--src/mame/drivers/airbustr.cpp1
-rw-r--r--src/mame/drivers/asterix.cpp5
-rw-r--r--src/mame/drivers/backfire.cpp4
-rw-r--r--src/mame/drivers/bishi.cpp5
-rw-r--r--src/mame/drivers/blackt96.cpp1
-rw-r--r--src/mame/drivers/boogwing.cpp4
-rw-r--r--src/mame/drivers/cbuster.cpp3
-rw-r--r--src/mame/drivers/cchance.cpp1
-rw-r--r--src/mame/drivers/champbwl.cpp2
-rw-r--r--src/mame/drivers/cninja.cpp18
-rw-r--r--src/mame/drivers/cobra.cpp4
-rw-r--r--src/mame/drivers/crospang.cpp1
-rw-r--r--src/mame/drivers/crshrace.cpp1
-rw-r--r--src/mame/drivers/darius.cpp1
-rw-r--r--src/mame/drivers/darkseal.cpp3
-rw-r--r--src/mame/drivers/dassault.cpp4
-rw-r--r--src/mame/drivers/dblewing.cpp2
-rw-r--r--src/mame/drivers/dbz.cpp6
-rw-r--r--src/mame/drivers/dec0.cpp27
-rw-r--r--src/mame/drivers/dec8.cpp32
-rw-r--r--src/mame/drivers/deco156.cpp4
-rw-r--r--src/mame/drivers/deco32.cpp23
-rw-r--r--src/mame/drivers/dfruit.cpp1
-rw-r--r--src/mame/drivers/dietgo.cpp2
-rw-r--r--src/mame/drivers/djboy.cpp1
-rw-r--r--src/mame/drivers/djmain.cpp3
-rw-r--r--src/mame/drivers/dreambal.cpp1
-rw-r--r--src/mame/drivers/esd16.cpp1
-rw-r--r--src/mame/drivers/f1gp.cpp3
-rw-r--r--src/mame/drivers/funkyjet.cpp2
-rw-r--r--src/mame/drivers/galastrm.cpp1
-rw-r--r--src/mame/drivers/galpanic.cpp1
-rw-r--r--src/mame/drivers/gijoe.cpp8
-rw-r--r--src/mame/drivers/gotcha.cpp1
-rw-r--r--src/mame/drivers/groundfx.cpp1
-rw-r--r--src/mame/drivers/gstriker.cpp1
-rw-r--r--src/mame/drivers/gticlub.cpp15
-rw-r--r--src/mame/drivers/gunbustr.cpp1
-rw-r--r--src/mame/drivers/hornet.cpp11
-rw-r--r--src/mame/drivers/hvyunit.cpp1
-rw-r--r--src/mame/drivers/inufuku.cpp1
-rw-r--r--src/mame/drivers/jclub2.cpp8
-rw-r--r--src/mame/drivers/karnov.cpp6
-rw-r--r--src/mame/drivers/konamigx.cpp69
-rw-r--r--src/mame/drivers/lastbank.cpp1
-rw-r--r--src/mame/drivers/lemmings.cpp2
-rw-r--r--src/mame/drivers/lethal.cpp5
-rw-r--r--src/mame/drivers/madmotor.cpp9
-rw-r--r--src/mame/drivers/mirage.cpp2
-rw-r--r--src/mame/drivers/model1.cpp6
-rw-r--r--src/mame/drivers/model2.cpp9
-rw-r--r--src/mame/drivers/moo.cpp18
-rw-r--r--src/mame/drivers/mystwarr.cpp22
-rw-r--r--src/mame/drivers/namcond1.cpp110
-rw-r--r--src/mame/drivers/nmg5.cpp1
-rw-r--r--src/mame/drivers/nwk-tr.cpp8
-rw-r--r--src/mame/drivers/opwolf.cpp2
-rw-r--r--src/mame/drivers/overdriv.cpp6
-rw-r--r--src/mame/drivers/pcktgal.cpp2
-rw-r--r--src/mame/drivers/pipedrm.cpp1
-rw-r--r--src/mame/drivers/pktgaldx.cpp2
-rw-r--r--src/mame/drivers/qdrmfgp.cpp10
-rw-r--r--src/mame/drivers/rastan.cpp1
-rw-r--r--src/mame/drivers/rbisland.cpp2
-rw-r--r--src/mame/drivers/rohga.cpp14
-rw-r--r--src/mame/drivers/rungun.cpp3
-rw-r--r--src/mame/drivers/sandscrp.cpp1
-rw-r--r--src/mame/drivers/segas24.cpp2
-rw-r--r--src/mame/drivers/seta.cpp41
-rw-r--r--src/mame/drivers/silvmil.cpp1
-rw-r--r--src/mame/drivers/simpl156.cpp2
-rw-r--r--src/mame/drivers/simpsons.cpp5
-rw-r--r--src/mame/drivers/slapshot.cpp2
-rw-r--r--src/mame/drivers/snk68.cpp1
-rw-r--r--src/mame/drivers/snowbros.cpp1
-rw-r--r--src/mame/drivers/speglsht.cpp6
-rw-r--r--src/mame/drivers/spy.cpp2
-rw-r--r--src/mame/drivers/srmp2.cpp3
-rw-r--r--src/mame/drivers/sshangha.cpp3
-rw-r--r--src/mame/drivers/ssv.cpp1
-rw-r--r--src/mame/drivers/stadhero.cpp5
-rw-r--r--src/mame/drivers/supbtime.cpp4
-rw-r--r--src/mame/drivers/superchs.cpp1
-rw-r--r--src/mame/drivers/suprslam.cpp1
-rw-r--r--src/mame/drivers/taito_f2.cpp5
-rw-r--r--src/mame/drivers/taito_h.cpp3
-rw-r--r--src/mame/drivers/taito_o.cpp1
-rw-r--r--src/mame/drivers/taito_x.cpp4
-rw-r--r--src/mame/drivers/taito_z.cpp2
-rw-r--r--src/mame/drivers/taitoair.cpp1
-rw-r--r--src/mame/drivers/taotaido.cpp1
-rw-r--r--src/mame/drivers/tasman.cpp54
-rw-r--r--src/mame/drivers/thedealr.cpp1
-rw-r--r--src/mame/drivers/thedeep.cpp3
-rw-r--r--src/mame/drivers/tnzs.cpp7
-rw-r--r--src/mame/drivers/topspeed.cpp2
-rw-r--r--src/mame/drivers/tumbleb.cpp7
-rw-r--r--src/mame/drivers/tumblep.cpp2
-rw-r--r--src/mame/drivers/undrfire.cpp2
-rw-r--r--src/mame/drivers/vaportra.cpp5
-rw-r--r--src/mame/drivers/vendetta.cpp7
-rw-r--r--src/mame/drivers/welltris.cpp1
-rw-r--r--src/mame/drivers/xexex.cpp8
-rw-r--r--src/mame/drivers/xmen.cpp10
-rw-r--r--src/mame/drivers/zr107.cpp10
-rw-r--r--src/mame/includes/konamigx.h4
-rw-r--r--src/mame/machine/st0016.cpp25
-rw-r--r--src/mame/machine/st0016.h9
-rw-r--r--src/mame/video/733_asr.cpp19
-rw-r--r--src/mame/video/733_asr.h5
-rw-r--r--src/mame/video/911_vdt.cpp17
-rw-r--r--src/mame/video/911_vdt.h5
-rw-r--r--src/mame/video/bfm_adr2.cpp90
-rw-r--r--src/mame/video/bfm_adr2.h7
-rw-r--r--src/mame/video/decbac06.h3
-rw-r--r--src/mame/video/deckarn.cpp13
-rw-r--r--src/mame/video/deckarn.h6
-rw-r--r--src/mame/video/decmxc06.cpp13
-rw-r--r--src/mame/video/decmxc06.h6
-rw-r--r--src/mame/video/deco16ic.cpp15
-rw-r--r--src/mame/video/deco16ic.h4
-rw-r--r--src/mame/video/deco_zoomspr.cpp13
-rw-r--r--src/mame/video/deco_zoomspr.h5
-rw-r--r--src/mame/video/decospr.cpp15
-rw-r--r--src/mame/video/decospr.h5
-rw-r--r--src/mame/video/k001604.cpp61
-rw-r--r--src/mame/video/k001604.h22
-rw-r--r--src/mame/video/k037122.cpp38
-rw-r--r--src/mame/video/k037122.h17
-rw-r--r--src/mame/video/k053246_k053247_k055673.cpp64
-rw-r--r--src/mame/video/k053246_k053247_k055673.h35
-rw-r--r--src/mame/video/k054156_k054157_k056832.cpp92
-rw-r--r--src/mame/video/k054156_k054157_k056832.h21
-rw-r--r--src/mame/video/kan_pand.cpp13
-rw-r--r--src/mame/video/kan_pand.h5
-rw-r--r--src/mame/video/konami_helper.cpp5
-rw-r--r--src/mame/video/konami_helper.h2
-rw-r--r--src/mame/video/mystwarr.cpp2
-rw-r--r--src/mame/video/pc080sn.cpp13
-rw-r--r--src/mame/video/pc080sn.h5
-rw-r--r--src/mame/video/pcd.cpp19
-rw-r--r--src/mame/video/pcd.h4
-rw-r--r--src/mame/video/segaic24.cpp46
-rw-r--r--src/mame/video/segaic24.h11
-rw-r--r--src/mame/video/seta001.cpp13
-rw-r--r--src/mame/video/seta001.h5
-rw-r--r--src/mame/video/snk68_spr.cpp11
-rw-r--r--src/mame/video/snk68_spr.h6
-rw-r--r--src/mame/video/st0020.cpp37
-rw-r--r--src/mame/video/st0020.h13
-rw-r--r--src/mame/video/tc0080vco.cpp15
-rw-r--r--src/mame/video/tc0080vco.h5
-rw-r--r--src/mame/video/tc0480scp.cpp15
-rw-r--r--src/mame/video/tc0480scp.h5
-rw-r--r--src/mame/video/vsystem_spr.cpp13
-rw-r--r--src/mame/video/vsystem_spr.h4
-rw-r--r--src/mame/video/vsystem_spr2.cpp13
-rw-r--r--src/mame/video/vsystem_spr2.h4
-rw-r--r--src/mame/video/ygv608.cpp168
-rw-r--r--src/mame/video/ygv608.h13
169 files changed, 523 insertions, 1431 deletions
diff --git a/src/devices/bus/comx35/clm.h b/src/devices/bus/comx35/clm.h
index 131a57b2cd9..5b2da54d905 100644
--- a/src/devices/bus/comx35/clm.h
+++ b/src/devices/bus/comx35/clm.h
@@ -24,7 +24,8 @@
// ======================> comx_clm_device
class comx_clm_device : public device_t,
- public device_comx_expansion_card_interface
+ public device_comx_expansion_card_interface,
+ public device_gfx_interface
{
public:
// construction/destruction
diff --git a/src/devices/bus/iq151/video32.cpp b/src/devices/bus/iq151/video32.cpp
index a5ce59a51db..91724700a03 100644
--- a/src/devices/bus/iq151/video32.cpp
+++ b/src/devices/bus/iq151/video32.cpp
@@ -36,13 +36,6 @@ static const gfx_layout iq151_video32_charlayout =
8*8 /* every char takes 8 bytes */
};
-static GFXDECODE_START( video32 )
-GFXDECODE_END
-
-static MACHINE_CONFIG_FRAGMENT( video32 )
- MCFG_GFXDECODE_ADD("gfxdecode", "^^palette", video32)
-MACHINE_CONFIG_END
-
//**************************************************************************
// GLOBAL VARIABLES
//**************************************************************************
@@ -59,9 +52,8 @@ const device_type IQ151_VIDEO32 = &device_creator<iq151_video32_device>;
iq151_video32_device::iq151_video32_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
: device_t(mconfig, IQ151_VIDEO32, "IQ151 video32", tag, owner, clock, "iq151_video32", __FILE__),
- device_iq151cart_interface( mconfig, *this ), m_videoram(nullptr), m_chargen(nullptr),
- m_gfxdecode(*this, "gfxdecode"),
- m_palette(*this, "^^palette")
+ device_gfx_interface(mconfig, *this, nullptr, "^^palette"),
+ device_iq151cart_interface( mconfig, *this ), m_videoram(nullptr), m_chargen(nullptr)
{
}
@@ -75,7 +67,7 @@ void iq151_video32_device::device_start()
m_videoram = (UINT8*)memregion("videoram")->base();
m_chargen = (UINT8*)memregion("chargen")->base();
- m_gfxdecode->set_gfx(0, std::make_unique<gfx_element>(m_palette, iq151_video32_charlayout, m_chargen, 0, 1, 0));
+ set_gfx(0, std::make_unique<gfx_element>(palette(), iq151_video32_charlayout, m_chargen, 0, 1, 0));
}
//-------------------------------------------------
@@ -92,16 +84,6 @@ void iq151_video32_device::device_reset()
}
//-------------------------------------------------
-// machine_config_additions - device-specific
-// machine configurations
-//-------------------------------------------------
-
-machine_config_constructor iq151_video32_device::device_mconfig_additions() const
-{
- return MACHINE_CONFIG_NAME( video32 );
-}
-
-//-------------------------------------------------
// device_rom_region
//-------------------------------------------------
diff --git a/src/devices/bus/iq151/video32.h b/src/devices/bus/iq151/video32.h
index d8b3a1e93eb..10937728696 100644
--- a/src/devices/bus/iq151/video32.h
+++ b/src/devices/bus/iq151/video32.h
@@ -16,6 +16,7 @@
class iq151_video32_device :
public device_t,
+ public device_gfx_interface,
public device_iq151cart_interface
{
public:
@@ -24,7 +25,6 @@ public:
// optional information overrides
virtual const rom_entry *device_rom_region() const override;
- virtual machine_config_constructor device_mconfig_additions() const override;
protected:
// device-level overrides
@@ -39,8 +39,6 @@ protected:
private:
UINT8 * m_videoram;
UINT8 * m_chargen;
- required_device<gfxdecode_device> m_gfxdecode;
- required_device<palette_device> m_palette;
};
diff --git a/src/devices/bus/iq151/video64.cpp b/src/devices/bus/iq151/video64.cpp
index d58cca76aec..afb7462804d 100644
--- a/src/devices/bus/iq151/video64.cpp
+++ b/src/devices/bus/iq151/video64.cpp
@@ -36,13 +36,6 @@ static const gfx_layout iq151_video64_charlayout =
8*8 /* every char takes 8 bytes */
};
-static GFXDECODE_START( video64 )
-GFXDECODE_END
-
-static MACHINE_CONFIG_FRAGMENT( video64 )
- MCFG_GFXDECODE_ADD("gfxdecode", "^^palette", video64)
-MACHINE_CONFIG_END
-
//**************************************************************************
// GLOBAL VARIABLES
//**************************************************************************
@@ -59,9 +52,8 @@ const device_type IQ151_VIDEO64 = &device_creator<iq151_video64_device>;
iq151_video64_device::iq151_video64_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
: device_t(mconfig, IQ151_VIDEO64, "IQ151 video64", tag, owner, clock, "iq151_video64", __FILE__),
- device_iq151cart_interface( mconfig, *this ), m_videoram(nullptr), m_chargen(nullptr),
- m_gfxdecode(*this, "gfxdecode"),
- m_palette(*this, "^^palette")
+ device_gfx_interface(mconfig, *this, nullptr, "^^palette"),
+ device_iq151cart_interface( mconfig, *this ), m_videoram(nullptr), m_chargen(nullptr)
{
}
@@ -74,7 +66,7 @@ void iq151_video64_device::device_start()
m_videoram = (UINT8*)memregion("videoram")->base();
m_chargen = (UINT8*)memregion("chargen")->base();
- m_gfxdecode->set_gfx(0,std::make_unique<gfx_element>(m_palette, iq151_video64_charlayout, m_chargen, 0, 1, 0));
+ set_gfx(0,std::make_unique<gfx_element>(palette(), iq151_video64_charlayout, m_chargen, 0, 1, 0));
}
//-------------------------------------------------
@@ -91,16 +83,6 @@ void iq151_video64_device::device_reset()
}
//-------------------------------------------------
-// machine_config_additions - device-specific
-// machine configurations
-//-------------------------------------------------
-
-machine_config_constructor iq151_video64_device::device_mconfig_additions() const
-{
- return MACHINE_CONFIG_NAME( video64 );
-}
-
-//-------------------------------------------------
// device_rom_region
//-------------------------------------------------
diff --git a/src/devices/bus/iq151/video64.h b/src/devices/bus/iq151/video64.h
index 0162e107e31..f8d6d675f45 100644
--- a/src/devices/bus/iq151/video64.h
+++ b/src/devices/bus/iq151/video64.h
@@ -16,6 +16,7 @@
class iq151_video64_device :
public device_t,
+ public device_gfx_interface,
public device_iq151cart_interface
{
public:
@@ -24,7 +25,6 @@ public:
// optional information overrides
virtual const rom_entry *device_rom_region() const override;
- virtual machine_config_constructor device_mconfig_additions() const override;
protected:
// device-level overrides
@@ -40,8 +40,6 @@ protected:
private:
UINT8 * m_videoram;
UINT8 * m_chargen;
- required_device<gfxdecode_device> m_gfxdecode;
- required_device<palette_device> m_palette;
};
diff --git a/src/devices/machine/tc009xlvc.cpp b/src/devices/machine/tc009xlvc.cpp
index 724bd5edf16..3a10002e8f6 100644
--- a/src/devices/machine/tc009xlvc.cpp
+++ b/src/devices/machine/tc009xlvc.cpp
@@ -46,7 +46,7 @@ WRITE8_MEMBER(tc0091lvc_device::tc0091lvc_paletteram_w)
g |= ((i & 2) >> 1);
r |= (i & 1);
- m_palette->set_pen_color(offset / 2, pal5bit(r), pal5bit(g), pal5bit(b));
+ m_gfxdecode->palette().set_pen_color(offset / 2, pal5bit(r), pal5bit(g), pal5bit(b));
}
}
@@ -168,8 +168,7 @@ tc0091lvc_device::tc0091lvc_device(const machine_config &mconfig, const char *ta
: device_t(mconfig, TC0091LVC, "Taito TC0091LVC", tag, owner, clock, "tc0091lvc", __FILE__),
device_memory_interface(mconfig, *this),
m_space_config("tc0091lvc", ENDIANNESS_LITTLE, 8,20, 0, nullptr, *ADDRESS_MAP_NAME(tc0091lvc_map8)),
- m_gfxdecode(*this),
- m_palette(*this)
+ m_gfxdecode(*this)
{
}
@@ -184,17 +183,6 @@ void tc0091lvc_device::static_set_gfxdecode_tag(device_t &device, const char *ta
}
-//-------------------------------------------------
-// static_set_palette_tag: Set the tag of the
-// palette device
-//-------------------------------------------------
-
-void tc0091lvc_device::static_set_palette_tag(device_t &device, const char *tag)
-{
- downcast<tc0091lvc_device &>(device).m_palette.set_tag(tag);
-}
-
-
void tc0091lvc_device::device_config_complete()
{
// int address_bits = 20;
@@ -297,7 +285,8 @@ void tc0091lvc_device::device_start()
//printf("m_gfx_index %d\n", m_gfx_index);
- m_gfxdecode->set_gfx(m_gfx_index, std::make_unique<gfx_element>(m_palette, char_layout, (UINT8 *)m_pcg_ram, 0, m_palette->entries() / 16, 0));
+ palette_device &palette = m_gfxdecode->palette();
+ m_gfxdecode->set_gfx(m_gfx_index, std::make_unique<gfx_element>(palette, char_layout, (UINT8 *)m_pcg_ram, 0, palette.entries() / 16, 0));
}
void tc0091lvc_device::device_reset()
@@ -346,7 +335,7 @@ UINT32 tc0091lvc_device::screen_update(screen_device &screen, bitmap_ind16 &bitm
int x,y;
UINT8 global_flip;
- bitmap.fill(m_palette->black_pen(), cliprect);
+ bitmap.fill(m_gfxdecode->palette().black_pen(), cliprect);
if((m_vregs[4] & 0x20) == 0)
return 0;
@@ -367,7 +356,7 @@ UINT32 tc0091lvc_device::screen_update(screen_device &screen, bitmap_ind16 &bitm
res_y = (global_flip) ? 256-y : y;
if(screen.visible_area().contains(res_x, res_y))
- bitmap.pix16(res_y, res_x) = m_palette->pen(m_bitmap_ram[count]);
+ bitmap.pix16(res_y, res_x) = m_gfxdecode->palette().pen(m_bitmap_ram[count]);
count++;
}
diff --git a/src/devices/machine/tc009xlvc.h b/src/devices/machine/tc009xlvc.h
index 66911acd4e5..3f737cbf044 100644
--- a/src/devices/machine/tc009xlvc.h
+++ b/src/devices/machine/tc009xlvc.h
@@ -21,7 +21,6 @@ public:
// static configuration
static void static_set_gfxdecode_tag(device_t &device, const char *tag);
- static void static_set_palette_tag(device_t &device, const char *tag);
DECLARE_READ8_MEMBER( vregs_r );
DECLARE_WRITE8_MEMBER( vregs_w );
@@ -80,7 +79,6 @@ protected:
virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const override;
address_space_config m_space_config;
required_device<gfxdecode_device> m_gfxdecode;
- required_device<palette_device> m_palette;
};
extern const device_type TC0091LVC;
@@ -88,8 +86,5 @@ extern const device_type TC0091LVC;
#define MCFG_TC0091LVC_GFXDECODE(_gfxtag) \
tc0091lvc_device::static_set_gfxdecode_tag(*device, "^" _gfxtag);
-#define MCFG_TC0091LVC_PALETTE(_palette_tag) \
- tc0091lvc_device::static_set_palette_tag(*device, "^" _palette_tag);
-
#endif
diff --git a/src/mame/drivers/actfancr.cpp b/src/mame/drivers/actfancr.cpp
index c9acefba01c..6ce12f09413 100644
--- a/src/mame/drivers/actfancr.cpp
+++ b/src/mame/drivers/actfancr.cpp
@@ -312,16 +312,15 @@ static MACHINE_CONFIG_START( actfancr, actfancr_state )
MCFG_PALETTE_FORMAT(xxxxBBBBGGGGRRRR)
MCFG_DEVICE_ADD("tilegen1", DECO_BAC06, 0)
- deco_bac06_device::set_gfx_region_wide(*device,2,2,2);
+ MCFG_DECO_BAC06_GFX_REGION_WIDE(2, 2, 2)
MCFG_DECO_BAC06_GFXDECODE("gfxdecode")
MCFG_DEVICE_ADD("tilegen2", DECO_BAC06, 0)
- deco_bac06_device::set_gfx_region_wide(*device,0,0,0);
+ MCFG_DECO_BAC06_GFX_REGION_WIDE(0, 0, 0)
MCFG_DECO_BAC06_GFXDECODE("gfxdecode")
MCFG_DEVICE_ADD("spritegen", DECO_MXC06, 0)
- deco_mxc06_device::set_gfx_region(*device, 1);
+ MCFG_DECO_MXC06_GFX_REGION(1)
MCFG_DECO_MXC06_GFXDECODE("gfxdecode")
- MCFG_DECO_MXC06_PALETTE("palette")
/* sound hardware */
MCFG_SPEAKER_STANDARD_MONO("mono")
@@ -368,16 +367,15 @@ static MACHINE_CONFIG_START( triothep, actfancr_state )
MCFG_PALETTE_FORMAT(xxxxBBBBGGGGRRRR)
MCFG_DEVICE_ADD("tilegen1", DECO_BAC06, 0)
- deco_bac06_device::set_gfx_region_wide(*device,2,2,0);
+ MCFG_DECO_BAC06_GFX_REGION_WIDE(2, 2, 0)
MCFG_DECO_BAC06_GFXDECODE("gfxdecode")
MCFG_DEVICE_ADD("tilegen2", DECO_BAC06, 0)
- deco_bac06_device::set_gfx_region_wide(*device,0,0,0);
+ MCFG_DECO_BAC06_GFX_REGION_WIDE(0, 0, 0)
MCFG_DECO_BAC06_GFXDECODE("gfxdecode")
MCFG_DEVICE_ADD("spritegen", DECO_MXC06, 0)
- deco_mxc06_device::set_gfx_region(*device, 1);
+ MCFG_DECO_MXC06_GFX_REGION(1)
MCFG_DECO_MXC06_GFXDECODE("gfxdecode")
- MCFG_DECO_MXC06_PALETTE("palette")
/* sound hardware */
MCFG_SPEAKER_STANDARD_MONO("mono")
diff --git a/src/mame/drivers/aerofgt.cpp b/src/mame/drivers/aerofgt.cpp
index 2ad00982f1a..15ae41e4221 100644
--- a/src/mame/drivers/aerofgt.cpp
+++ b/src/mame/drivers/aerofgt.cpp
@@ -1341,7 +1341,6 @@ static MACHINE_CONFIG_START( pspikes, aerofgt_state )
MCFG_VSYSTEM_SPR2_SET_TILE_INDIRECT( aerofgt_state, aerofgt_old_tile_callback )
MCFG_VSYSTEM_SPR2_SET_GFXREGION(1)
MCFG_VSYSTEM_SPR2_GFXDECODE("gfxdecode")
- MCFG_VSYSTEM_SPR2_PALETTE("palette")
MCFG_VIDEO_START_OVERRIDE(aerofgt_state,pspikes)
@@ -1451,7 +1450,6 @@ static MACHINE_CONFIG_START( pspikesc, aerofgt_state )
MCFG_VSYSTEM_SPR2_SET_TILE_INDIRECT( aerofgt_state, aerofgt_old_tile_callback )
MCFG_VSYSTEM_SPR2_SET_GFXREGION(1)
MCFG_VSYSTEM_SPR2_GFXDECODE("gfxdecode")
- MCFG_VSYSTEM_SPR2_PALETTE("palette")
MCFG_VIDEO_START_OVERRIDE(aerofgt_state,pspikes)
@@ -1494,13 +1492,11 @@ static MACHINE_CONFIG_START( karatblz, aerofgt_state )
MCFG_VSYSTEM_SPR2_SET_TILE_INDIRECT( aerofgt_state, aerofgt_old_tile_callback )
MCFG_VSYSTEM_SPR2_SET_GFXREGION(2)
MCFG_VSYSTEM_SPR2_GFXDECODE("gfxdecode")
- MCFG_VSYSTEM_SPR2_PALETTE("palette")
MCFG_DEVICE_ADD("vsystem_spr_ol2", VSYSTEM_SPR2, 0)
MCFG_VSYSTEM_SPR2_SET_TILE_INDIRECT( aerofgt_state, aerofgt_ol2_tile_callback )
MCFG_VSYSTEM_SPR2_SET_GFXREGION(3)
MCFG_VSYSTEM_SPR2_GFXDECODE("gfxdecode")
- MCFG_VSYSTEM_SPR2_PALETTE("palette")
MCFG_VIDEO_START_OVERRIDE(aerofgt_state,karatblz)
@@ -1545,13 +1541,11 @@ static MACHINE_CONFIG_START( karatblzbl, aerofgt_state )
MCFG_VSYSTEM_SPR2_SET_TILE_INDIRECT( aerofgt_state, aerofgt_old_tile_callback )
MCFG_VSYSTEM_SPR2_SET_GFXREGION(2)
MCFG_VSYSTEM_SPR2_GFXDECODE("gfxdecode")
- MCFG_VSYSTEM_SPR2_PALETTE("palette")
MCFG_DEVICE_ADD("vsystem_spr_ol2", VSYSTEM_SPR2, 0)
MCFG_VSYSTEM_SPR2_SET_TILE_INDIRECT( aerofgt_state, aerofgt_ol2_tile_callback )
MCFG_VSYSTEM_SPR2_SET_GFXREGION(3)
MCFG_VSYSTEM_SPR2_GFXDECODE("gfxdecode")
- MCFG_VSYSTEM_SPR2_PALETTE("palette")
MCFG_VIDEO_START_OVERRIDE(aerofgt_state,karatblz)
@@ -1593,14 +1587,12 @@ static MACHINE_CONFIG_START( spinlbrk, aerofgt_state )
MCFG_VSYSTEM_SPR2_SET_PRITYPE(1)
MCFG_VSYSTEM_SPR2_SET_GFXREGION(2)
MCFG_VSYSTEM_SPR2_GFXDECODE("gfxdecode")
- MCFG_VSYSTEM_SPR2_PALETTE("palette")
MCFG_DEVICE_ADD("vsystem_spr_ol2", VSYSTEM_SPR2, 0)
MCFG_VSYSTEM_SPR2_SET_TILE_INDIRECT( aerofgt_state, aerofgt_ol2_tile_callback ) // rom lookup
MCFG_VSYSTEM_SPR2_SET_PRITYPE(1)
MCFG_VSYSTEM_SPR2_SET_GFXREGION(3)
MCFG_VSYSTEM_SPR2_GFXDECODE("gfxdecode")
- MCFG_VSYSTEM_SPR2_PALETTE("palette")
MCFG_VIDEO_START_OVERRIDE(aerofgt_state,spinlbrk)
@@ -1647,13 +1639,11 @@ static MACHINE_CONFIG_START( turbofrc, aerofgt_state )
MCFG_VSYSTEM_SPR2_SET_TILE_INDIRECT( aerofgt_state, aerofgt_old_tile_callback )
MCFG_VSYSTEM_SPR2_SET_GFXREGION(2)
MCFG_VSYSTEM_SPR2_GFXDECODE("gfxdecode")
- MCFG_VSYSTEM_SPR2_PALETTE("palette")
MCFG_DEVICE_ADD("vsystem_spr_ol2", VSYSTEM_SPR2, 0)
MCFG_VSYSTEM_SPR2_SET_TILE_INDIRECT( aerofgt_state, aerofgt_ol2_tile_callback )
MCFG_VSYSTEM_SPR2_SET_GFXREGION(3)
MCFG_VSYSTEM_SPR2_GFXDECODE("gfxdecode")
- MCFG_VSYSTEM_SPR2_PALETTE("palette")
MCFG_VIDEO_START_OVERRIDE(aerofgt_state,turbofrc)
@@ -1701,13 +1691,11 @@ static MACHINE_CONFIG_START( aerofgtb, aerofgt_state )
MCFG_VSYSTEM_SPR2_SET_TILE_INDIRECT( aerofgt_state, aerofgt_old_tile_callback )
MCFG_VSYSTEM_SPR2_SET_GFXREGION(2)
MCFG_VSYSTEM_SPR2_GFXDECODE("gfxdecode")
- MCFG_VSYSTEM_SPR2_PALETTE("palette")
MCFG_DEVICE_ADD("vsystem_spr_ol2", VSYSTEM_SPR2, 0)
MCFG_VSYSTEM_SPR2_SET_TILE_INDIRECT( aerofgt_state, aerofgt_ol2_tile_callback )
MCFG_VSYSTEM_SPR2_SET_GFXREGION(3)
MCFG_VSYSTEM_SPR2_GFXDECODE("gfxdecode")
- MCFG_VSYSTEM_SPR2_PALETTE("palette")
MCFG_VIDEO_START_OVERRIDE(aerofgt_state,turbofrc)
@@ -1755,7 +1743,6 @@ static MACHINE_CONFIG_START( aerofgt, aerofgt_state )
MCFG_VSYSTEM_SPR_SET_TILE_INDIRECT( aerofgt_state, aerofgt_tile_callback )
MCFG_VSYSTEM_SPR_SET_GFXREGION(2)
MCFG_VSYSTEM_SPR_GFXDECODE("gfxdecode")
- MCFG_VSYSTEM_SPR_PALETTE("palette")
MCFG_VIDEO_START_OVERRIDE(aerofgt_state,turbofrc)
@@ -1869,7 +1856,6 @@ static MACHINE_CONFIG_START( wbbc97, aerofgt_state )
MCFG_VSYSTEM_SPR2_SET_TILE_INDIRECT( aerofgt_state, aerofgt_old_tile_callback )
MCFG_VSYSTEM_SPR2_SET_GFXREGION(1)
MCFG_VSYSTEM_SPR2_GFXDECODE("gfxdecode")
- MCFG_VSYSTEM_SPR2_PALETTE("palette")
MCFG_VIDEO_START_OVERRIDE(aerofgt_state,wbbc97)
diff --git a/src/mame/drivers/airbustr.cpp b/src/mame/drivers/airbustr.cpp
index 3a000c60c30..8c6b6473bb3 100644
--- a/src/mame/drivers/airbustr.cpp
+++ b/src/mame/drivers/airbustr.cpp
@@ -619,7 +619,6 @@ static MACHINE_CONFIG_START( airbustr, airbustr_state )
MCFG_DEVICE_ADD("pandora", KANEKO_PANDORA, 0)
MCFG_KANEKO_PANDORA_GFX_REGION(1)
MCFG_KANEKO_PANDORA_GFXDECODE("gfxdecode")
- MCFG_KANEKO_PANDORA_PALETTE("palette")
/* sound hardware */
MCFG_SPEAKER_STANDARD_MONO("mono")
diff --git a/src/mame/drivers/asterix.cpp b/src/mame/drivers/asterix.cpp
index a0dd353246b..e43476e8474 100644
--- a/src/mame/drivers/asterix.cpp
+++ b/src/mame/drivers/asterix.cpp
@@ -270,12 +270,9 @@ static MACHINE_CONFIG_START( asterix, asterix_state )
MCFG_PALETTE_ENABLE_SHADOWS()
MCFG_PALETTE_FORMAT(xBBBBBGGGGGRRRRR)
- MCFG_GFXDECODE_ADD("gfxdecode", "palette", empty)
-
MCFG_DEVICE_ADD("k056832", K056832, 0)
MCFG_K056832_CB(asterix_state, tile_callback)
- MCFG_K056832_CONFIG("gfx1", 0, K056832_BPP_4, 1, 1, "none")
- MCFG_K056832_GFXDECODE("gfxdecode")
+ MCFG_K056832_CONFIG("gfx1", K056832_BPP_4, 1, 1, "none")
MCFG_K056832_PALETTE("palette")
MCFG_DEVICE_ADD("k053244", K053244, 0)
diff --git a/src/mame/drivers/backfire.cpp b/src/mame/drivers/backfire.cpp
index 9ca90c212e8..83f0f64f151 100644
--- a/src/mame/drivers/backfire.cpp
+++ b/src/mame/drivers/backfire.cpp
@@ -513,7 +513,6 @@ static MACHINE_CONFIG_START( backfire, backfire_state )
MCFG_DECO16IC_PF12_8X8_BANK(0)
MCFG_DECO16IC_PF12_16X16_BANK(1)
MCFG_DECO16IC_GFXDECODE("gfxdecode")
- MCFG_DECO16IC_PALETTE("palette")
MCFG_DEVICE_ADD("tilegen2", DECO16IC, 0)
MCFG_DECO16IC_SET_SCREEN("lscreen")
@@ -530,21 +529,18 @@ static MACHINE_CONFIG_START( backfire, backfire_state )
MCFG_DECO16IC_PF12_8X8_BANK(2)
MCFG_DECO16IC_PF12_16X16_BANK(3)
MCFG_DECO16IC_GFXDECODE("gfxdecode")
- MCFG_DECO16IC_PALETTE("palette")
MCFG_DEVICE_ADD("spritegen", DECO_SPRITE, 0)
MCFG_VIDEO_SET_SCREEN("lscreen")
MCFG_DECO_SPRITE_GFX_REGION(4)
MCFG_DECO_SPRITE_PRIORITY_CB(backfire_state, pri_callback)
MCFG_DECO_SPRITE_GFXDECODE("gfxdecode")
- MCFG_DECO_SPRITE_PALETTE("palette")
MCFG_DEVICE_ADD("spritegen2", DECO_SPRITE, 0)
MCFG_VIDEO_SET_SCREEN("rscreen")
MCFG_DECO_SPRITE_GFX_REGION(5)
MCFG_DECO_SPRITE_PRIORITY_CB(backfire_state, pri_callback)
MCFG_DECO_SPRITE_GFXDECODE("gfxdecode")
- MCFG_DECO_SPRITE_PALETTE("palette")
/* sound hardware */
diff --git a/src/mame/drivers/bishi.cpp b/src/mame/drivers/bishi.cpp
index f46f2b3e8e6..a9de3729ea9 100644
--- a/src/mame/drivers/bishi.cpp
+++ b/src/mame/drivers/bishi.cpp
@@ -392,12 +392,9 @@ static MACHINE_CONFIG_START( bishi, bishi_state )
MCFG_PALETTE_ENABLE_SHADOWS()
MCFG_PALETTE_ENABLE_HILIGHTS()
- MCFG_GFXDECODE_ADD("gfxdecode", "palette", empty)
-
MCFG_DEVICE_ADD("k056832", K056832, 0)
MCFG_K056832_CB(bishi_state, tile_callback)
- MCFG_K056832_CONFIG("gfx1", 0, K056832_BPP_8, 1, 0, "none")
- MCFG_K056832_GFXDECODE("gfxdecode")
+ MCFG_K056832_CONFIG("gfx1", K056832_BPP_8, 1, 0, "none")
MCFG_K056832_PALETTE("palette")
MCFG_DEVICE_ADD("k054338", K054338, 0)
diff --git a/src/mame/drivers/blackt96.cpp b/src/mame/drivers/blackt96.cpp
index 2039e7afe03..4f5801ecb3a 100644
--- a/src/mame/drivers/blackt96.cpp
+++ b/src/mame/drivers/blackt96.cpp
@@ -373,7 +373,6 @@ static MACHINE_CONFIG_START( blackt96, blackt96_state )
MCFG_DEVICE_ADD("sprites", SNK68_SPR, 0)
MCFG_SNK68_SPR_GFXDECODE("gfxdecode")
- MCFG_SNK68_SPR_PALETTE("palette")
MCFG_SNK68_SPR_SET_TILE_INDIRECT( blackt96_state, tile_callback )
MCFG_SNK68_SPR_NO_PARTIAL
diff --git a/src/mame/drivers/boogwing.cpp b/src/mame/drivers/boogwing.cpp
index 098397785c3..ef1fa53fb22 100644
--- a/src/mame/drivers/boogwing.cpp
+++ b/src/mame/drivers/boogwing.cpp
@@ -358,7 +358,6 @@ static MACHINE_CONFIG_START( boogwing, boogwing_state )
MCFG_DECO16IC_PF12_8X8_BANK(0)
MCFG_DECO16IC_PF12_16X16_BANK(1)
MCFG_DECO16IC_GFXDECODE("gfxdecode")
- MCFG_DECO16IC_PALETTE("palette")
MCFG_DEVICE_ADD("tilegen2", DECO16IC, 0)
MCFG_DECO16IC_SPLIT(0)
@@ -374,17 +373,14 @@ static MACHINE_CONFIG_START( boogwing, boogwing_state )
MCFG_DECO16IC_PF12_8X8_BANK(0)
MCFG_DECO16IC_PF12_16X16_BANK(2)
MCFG_DECO16IC_GFXDECODE("gfxdecode")
- MCFG_DECO16IC_PALETTE("palette")
MCFG_DEVICE_ADD("spritegen1", DECO_SPRITE, 0)
MCFG_DECO_SPRITE_GFX_REGION(3)
MCFG_DECO_SPRITE_GFXDECODE("gfxdecode")
- MCFG_DECO_SPRITE_PALETTE("palette")
MCFG_DEVICE_ADD("spritegen2", DECO_SPRITE, 0)
MCFG_DECO_SPRITE_GFX_REGION(4)
MCFG_DECO_SPRITE_GFXDECODE("gfxdecode")
- MCFG_DECO_SPRITE_PALETTE("palette")
MCFG_DECO104_ADD("ioprot104")
MCFG_DECO146_SET_INTERFACE_SCRAMBLE_REVERSE
diff --git a/src/mame/drivers/cbuster.cpp b/src/mame/drivers/cbuster.cpp
index b68b1ce2c94..16bc2ca7eac 100644
--- a/src/mame/drivers/cbuster.cpp
+++ b/src/mame/drivers/cbuster.cpp
@@ -331,7 +331,6 @@ static MACHINE_CONFIG_START( twocrude, cbuster_state )
MCFG_DECO16IC_PF12_8X8_BANK(0)
MCFG_DECO16IC_PF12_16X16_BANK(1)
MCFG_DECO16IC_GFXDECODE("gfxdecode")
- MCFG_DECO16IC_PALETTE("palette")
MCFG_DEVICE_ADD("tilegen2", DECO16IC, 0)
MCFG_DECO16IC_SPLIT(0)
@@ -347,12 +346,10 @@ static MACHINE_CONFIG_START( twocrude, cbuster_state )
MCFG_DECO16IC_PF12_8X8_BANK(0)
MCFG_DECO16IC_PF12_16X16_BANK(2)
MCFG_DECO16IC_GFXDECODE("gfxdecode")
- MCFG_DECO16IC_PALETTE("palette")
MCFG_DEVICE_ADD("spritegen", DECO_SPRITE, 0)
MCFG_DECO_SPRITE_GFX_REGION(3)
MCFG_DECO_SPRITE_GFXDECODE("gfxdecode")
- MCFG_DECO_SPRITE_PALETTE("palette")
/* sound hardware */
MCFG_SPEAKER_STANDARD_MONO("mono")
diff --git a/src/mame/drivers/cchance.cpp b/src/mame/drivers/cchance.cpp
index 0283cf99df9..184ef938fb4 100644
--- a/src/mame/drivers/cchance.cpp
+++ b/src/mame/drivers/cchance.cpp
@@ -218,7 +218,6 @@ static MACHINE_CONFIG_START( cchance, cchance_state )
MCFG_DEVICE_ADD("spritegen", SETA001_SPRITE, 0)
MCFG_SETA001_SPRITE_GFXDECODE("gfxdecode")
- MCFG_SETA001_SPRITE_PALETTE("palette")
/* video hardware */
MCFG_SCREEN_ADD("screen", RASTER)
diff --git a/src/mame/drivers/champbwl.cpp b/src/mame/drivers/champbwl.cpp
index 745870f02bc..8be942af8e2 100644
--- a/src/mame/drivers/champbwl.cpp
+++ b/src/mame/drivers/champbwl.cpp
@@ -503,7 +503,6 @@ static MACHINE_CONFIG_START( champbwl, champbwl_state )
MCFG_DEVICE_ADD("spritegen", SETA001_SPRITE, 0)
MCFG_SETA001_SPRITE_GFXDECODE("gfxdecode")
- MCFG_SETA001_SPRITE_PALETTE("palette")
/* video hardware */
MCFG_SCREEN_ADD("screen", RASTER)
@@ -565,7 +564,6 @@ static MACHINE_CONFIG_START( doraemon, champbwl_state )
MCFG_NVRAM_ADD_0FILL("nvram")
MCFG_DEVICE_ADD("spritegen", SETA001_SPRITE, 0)
MCFG_SETA001_SPRITE_GFXDECODE("gfxdecode")
- MCFG_SETA001_SPRITE_PALETTE("palette")
MCFG_TICKET_DISPENSER_ADD("hopper", attotime::from_msec(2000), TICKET_MOTOR_ACTIVE_LOW, TICKET_STATUS_ACTIVE_LOW )
MCFG_MACHINE_START_OVERRIDE(champbwl_state,doraemon)
diff --git a/src/mame/drivers/cninja.cpp b/src/mame/drivers/cninja.cpp
index 5e0e6c64183..d027733d85f 100644
--- a/src/mame/drivers/cninja.cpp
+++ b/src/mame/drivers/cninja.cpp
@@ -878,7 +878,6 @@ static MACHINE_CONFIG_START( cninja, cninja_state )
MCFG_DECO16IC_PF12_8X8_BANK(0)
MCFG_DECO16IC_PF12_16X16_BANK(1)
MCFG_DECO16IC_GFXDECODE("gfxdecode")
- MCFG_DECO16IC_PALETTE("palette")
MCFG_DEVICE_ADD("tilegen2", DECO16IC, 0)
MCFG_DECO16IC_SPLIT(0)
@@ -894,13 +893,11 @@ static MACHINE_CONFIG_START( cninja, cninja_state )
MCFG_DECO16IC_PF12_8X8_BANK(0)
MCFG_DECO16IC_PF12_16X16_BANK(2)
MCFG_DECO16IC_GFXDECODE("gfxdecode")
- MCFG_DECO16IC_PALETTE("palette")
MCFG_DEVICE_ADD("spritegen", DECO_SPRITE, 0)
MCFG_DECO_SPRITE_GFX_REGION(3)
MCFG_DECO_SPRITE_PRIORITY_CB(cninja_state, pri_callback)
MCFG_DECO_SPRITE_GFXDECODE("gfxdecode")
- MCFG_DECO_SPRITE_PALETTE("palette")
MCFG_DECO104_ADD("ioprot104")
MCFG_DECO146_SET_USE_MAGIC_ADDRESS_XOR
@@ -968,7 +965,6 @@ static MACHINE_CONFIG_START( stoneage, cninja_state )
MCFG_DECO16IC_PF12_8X8_BANK(0)
MCFG_DECO16IC_PF12_16X16_BANK(1)
MCFG_DECO16IC_GFXDECODE("gfxdecode")
- MCFG_DECO16IC_PALETTE("palette")
MCFG_DEVICE_ADD("tilegen2", DECO16IC, 0)
MCFG_DECO16IC_SPLIT(0)
@@ -984,13 +980,11 @@ static MACHINE_CONFIG_START( stoneage, cninja_state )
MCFG_DECO16IC_PF12_8X8_BANK(0)
MCFG_DECO16IC_PF12_16X16_BANK(2)
MCFG_DECO16IC_GFXDECODE("gfxdecode")
- MCFG_DECO16IC_PALETTE("palette")
MCFG_DEVICE_ADD("spritegen", DECO_SPRITE, 0)
MCFG_DECO_SPRITE_GFX_REGION(3)
MCFG_DECO_SPRITE_PRIORITY_CB(cninja_state, pri_callback)
MCFG_DECO_SPRITE_GFXDECODE("gfxdecode")
- MCFG_DECO_SPRITE_PALETTE("palette")
MCFG_DECO104_ADD("ioprot104")
MCFG_DECO146_SET_USE_MAGIC_ADDRESS_XOR
@@ -1053,7 +1047,6 @@ static MACHINE_CONFIG_START( cninjabl, cninja_state )
MCFG_DECO16IC_PF12_8X8_BANK(0)
MCFG_DECO16IC_PF12_16X16_BANK(1)
MCFG_DECO16IC_GFXDECODE("gfxdecode")
- MCFG_DECO16IC_PALETTE("palette")
MCFG_DEVICE_ADD("tilegen2", DECO16IC, 0)
MCFG_DECO16IC_SPLIT(0)
@@ -1069,7 +1062,6 @@ static MACHINE_CONFIG_START( cninjabl, cninja_state )
MCFG_DECO16IC_PF12_8X8_BANK(0)
MCFG_DECO16IC_PF12_16X16_BANK(2)
MCFG_DECO16IC_GFXDECODE("gfxdecode")
- MCFG_DECO16IC_PALETTE("palette")
/* sound hardware */
MCFG_SPEAKER_STANDARD_MONO("mono")
@@ -1125,7 +1117,6 @@ static MACHINE_CONFIG_START( edrandy, cninja_state )
MCFG_DECO16IC_PF12_8X8_BANK(0)
MCFG_DECO16IC_PF12_16X16_BANK(1)
MCFG_DECO16IC_GFXDECODE("gfxdecode")
- MCFG_DECO16IC_PALETTE("palette")
MCFG_DEVICE_ADD("tilegen2", DECO16IC, 0)
MCFG_DECO16IC_SPLIT(0)
@@ -1141,13 +1132,11 @@ static MACHINE_CONFIG_START( edrandy, cninja_state )
MCFG_DECO16IC_PF12_8X8_BANK(0)
MCFG_DECO16IC_PF12_16X16_BANK(2)
MCFG_DECO16IC_GFXDECODE("gfxdecode")
- MCFG_DECO16IC_PALETTE("palette")
MCFG_DEVICE_ADD("spritegen", DECO_SPRITE, 0)
MCFG_DECO_SPRITE_GFX_REGION(3)
MCFG_DECO_SPRITE_PRIORITY_CB(cninja_state, pri_callback)
MCFG_DECO_SPRITE_GFXDECODE("gfxdecode")
- MCFG_DECO_SPRITE_PALETTE("palette")
MCFG_DECO146_ADD("ioprot")
@@ -1213,7 +1202,6 @@ static MACHINE_CONFIG_START( robocop2, cninja_state )
MCFG_DECO16IC_PF12_8X8_BANK(0)
MCFG_DECO16IC_PF12_16X16_BANK(1)
MCFG_DECO16IC_GFXDECODE("gfxdecode")
- MCFG_DECO16IC_PALETTE("palette")
MCFG_DEVICE_ADD("tilegen2", DECO16IC, 0)
MCFG_DECO16IC_SPLIT(0)
@@ -1229,13 +1217,11 @@ static MACHINE_CONFIG_START( robocop2, cninja_state )
MCFG_DECO16IC_PF12_8X8_BANK(0)
MCFG_DECO16IC_PF12_16X16_BANK(2)
MCFG_DECO16IC_GFXDECODE("gfxdecode")
- MCFG_DECO16IC_PALETTE("palette")
MCFG_DEVICE_ADD("spritegen", DECO_SPRITE, 0)
MCFG_DECO_SPRITE_GFX_REGION(3)
MCFG_DECO_SPRITE_PRIORITY_CB(cninja_state, pri_callback)
MCFG_DECO_SPRITE_GFXDECODE("gfxdecode")
- MCFG_DECO_SPRITE_PALETTE("palette")
MCFG_DECO146_ADD("ioprot")
MCFG_DECO146_SET_USE_MAGIC_ADDRESS_XOR
@@ -1307,7 +1293,6 @@ static MACHINE_CONFIG_START( mutantf, cninja_state )
MCFG_DECO16IC_PF12_8X8_BANK(0)
MCFG_DECO16IC_PF12_16X16_BANK(1)
MCFG_DECO16IC_GFXDECODE("gfxdecode")
- MCFG_DECO16IC_PALETTE("palette")
MCFG_DEVICE_ADD("tilegen2", DECO16IC, 0)
MCFG_DECO16IC_SPLIT(0)
@@ -1323,17 +1308,14 @@ static MACHINE_CONFIG_START( mutantf, cninja_state )
MCFG_DECO16IC_PF12_8X8_BANK(0)
MCFG_DECO16IC_PF12_16X16_BANK(2)
MCFG_DECO16IC_GFXDECODE("gfxdecode")
- MCFG_DECO16IC_PALETTE("palette")
MCFG_DEVICE_ADD("spritegen1", DECO_SPRITE, 0)
MCFG_DECO_SPRITE_GFX_REGION(3)
MCFG_DECO_SPRITE_GFXDECODE("gfxdecode")
- MCFG_DECO_SPRITE_PALETTE("palette")
MCFG_DEVICE_ADD("spritegen2", DECO_SPRITE, 0)
MCFG_DECO_SPRITE_GFX_REGION(4)
MCFG_DECO_SPRITE_GFXDECODE("gfxdecode")
- MCFG_DECO_SPRITE_PALETTE("palette")
MCFG_DECO146_ADD("ioprot")
diff --git a/src/mame/drivers/cobra.cpp b/src/mame/drivers/cobra.cpp
index 30fc021028b..113498dd03f 100644
--- a/src/mame/drivers/cobra.cpp
+++ b/src/mame/drivers/cobra.cpp
@@ -3302,15 +3302,11 @@ static MACHINE_CONFIG_START( cobra, cobra_state )
MCFG_M48T58_ADD("m48t58")
- MCFG_GFXDECODE_ADD("gfxdecode", "palette", empty)
MCFG_DEVICE_ADD("k001604", K001604, 0) // on the LAN board in Racing Jam DX
- MCFG_K001604_GFX_INDEX1(0)
- MCFG_K001604_GFX_INDEX2(1)
MCFG_K001604_LAYER_SIZE(0)
MCFG_K001604_ROZ_SIZE(1)
MCFG_K001604_TXT_OFFSET(0) // correct?
MCFG_K001604_ROZ_OFFSET(0) // correct?
- MCFG_K001604_GFXDECODE("gfxdecode")
MCFG_K001604_PALETTE("palette")
MCFG_DEVICE_ADD("cobra_jvs_host", COBRA_JVS_HOST, 4000000)
diff --git a/src/mame/drivers/crospang.cpp b/src/mame/drivers/crospang.cpp
index 1cdd1ff9f83..19a999466f7 100644
--- a/src/mame/drivers/crospang.cpp
+++ b/src/mame/drivers/crospang.cpp
@@ -360,7 +360,6 @@ static MACHINE_CONFIG_START( crospang, crospang_state )
MCFG_DECO_SPRITE_ISBOOTLEG(true)
MCFG_DECO_SPRITE_OFFSETS(5, 7)
MCFG_DECO_SPRITE_GFXDECODE("gfxdecode")
- MCFG_DECO_SPRITE_PALETTE("palette")
/* sound hardware */
diff --git a/src/mame/drivers/crshrace.cpp b/src/mame/drivers/crshrace.cpp
index 7cc33cf93a2..49a7ba67639 100644
--- a/src/mame/drivers/crshrace.cpp
+++ b/src/mame/drivers/crshrace.cpp
@@ -455,7 +455,6 @@ static MACHINE_CONFIG_START( crshrace, crshrace_state )
MCFG_VSYSTEM_SPR_SET_TILE_INDIRECT( crshrace_state, crshrace_tile_callback )
MCFG_VSYSTEM_SPR_SET_GFXREGION(2)
MCFG_VSYSTEM_SPR_GFXDECODE("gfxdecode")
- MCFG_VSYSTEM_SPR_PALETTE("palette")
MCFG_BUFFERED_SPRITERAM16_ADD("spriteram")
MCFG_BUFFERED_SPRITERAM16_ADD("spriteram2")
diff --git a/src/mame/drivers/darius.cpp b/src/mame/drivers/darius.cpp
index aa8734d4c01..4026a85fde3 100644
--- a/src/mame/drivers/darius.cpp
+++ b/src/mame/drivers/darius.cpp
@@ -801,7 +801,6 @@ static MACHINE_CONFIG_START( darius, darius_state )
MCFG_PC080SN_YINVERT(0)
MCFG_PC080SN_DBLWIDTH(1)
MCFG_PC080SN_GFXDECODE("gfxdecode")
- MCFG_PC080SN_PALETTE("palette")
/* sound hardware */
MCFG_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker")
diff --git a/src/mame/drivers/darkseal.cpp b/src/mame/drivers/darkseal.cpp
index c652fee62a2..7c48821b591 100644
--- a/src/mame/drivers/darkseal.cpp
+++ b/src/mame/drivers/darkseal.cpp
@@ -260,7 +260,6 @@ static MACHINE_CONFIG_START( darkseal, darkseal_state )
MCFG_DECO16IC_PF12_8X8_BANK(0)
MCFG_DECO16IC_PF12_16X16_BANK(1)
MCFG_DECO16IC_GFXDECODE("gfxdecode")
- MCFG_DECO16IC_PALETTE("palette")
MCFG_DEVICE_ADD("tilegen2", DECO16IC, 0)
MCFG_DECO16IC_SPLIT(0)
@@ -274,12 +273,10 @@ static MACHINE_CONFIG_START( darkseal, darkseal_state )
MCFG_DECO16IC_PF12_8X8_BANK(2)
MCFG_DECO16IC_PF12_16X16_BANK(3)
MCFG_DECO16IC_GFXDECODE("gfxdecode")
- MCFG_DECO16IC_PALETTE("palette")
MCFG_DEVICE_ADD("spritegen", DECO_SPRITE, 0)
MCFG_DECO_SPRITE_GFX_REGION(4)
MCFG_DECO_SPRITE_GFXDECODE("gfxdecode")
- MCFG_DECO_SPRITE_PALETTE("palette")
/* sound hardware */
diff --git a/src/mame/drivers/dassault.cpp b/src/mame/drivers/dassault.cpp
index 5df8e0e002c..41d26bed464 100644
--- a/src/mame/drivers/dassault.cpp
+++ b/src/mame/drivers/dassault.cpp
@@ -584,7 +584,6 @@ static MACHINE_CONFIG_START( dassault, dassault_state )
MCFG_DECO16IC_PF12_16X16_BANK(1)
MCFG_DECO16IC_GFXDECODE("gfxdecode")
- MCFG_DECO16IC_PALETTE("palette")
MCFG_DEVICE_ADD("tilegen2", DECO16IC, 0)
MCFG_DECO16IC_SPLIT(0)
@@ -601,17 +600,14 @@ static MACHINE_CONFIG_START( dassault, dassault_state )
MCFG_DECO16IC_PF12_16X16_BANK(2)
MCFG_DECO16IC_GFXDECODE("gfxdecode")
- MCFG_DECO16IC_PALETTE("palette")
MCFG_DEVICE_ADD("spritegen1", DECO_SPRITE, 0)
MCFG_DECO_SPRITE_GFX_REGION(3)
MCFG_DECO_SPRITE_GFXDECODE("gfxdecode")
- MCFG_DECO_SPRITE_PALETTE("palette")
MCFG_DEVICE_ADD("spritegen2", DECO_SPRITE, 0)
MCFG_DECO_SPRITE_GFX_REGION(4)
MCFG_DECO_SPRITE_GFXDECODE("gfxdecode")
- MCFG_DECO_SPRITE_PALETTE("palette")
/* sound hardware */
diff --git a/src/mame/drivers/dblewing.cpp b/src/mame/drivers/dblewing.cpp
index 9076254e457..161dcd7d4fe 100644
--- a/src/mame/drivers/dblewing.cpp
+++ b/src/mame/drivers/dblewing.cpp
@@ -403,13 +403,11 @@ static MACHINE_CONFIG_START( dblewing, dblewing_state )
MCFG_DECO16IC_PF12_8X8_BANK(0)
MCFG_DECO16IC_PF12_16X16_BANK(1)
MCFG_DECO16IC_GFXDECODE("gfxdecode")
- MCFG_DECO16IC_PALETTE("palette")
MCFG_DEVICE_ADD("spritegen", DECO_SPRITE, 0)
MCFG_DECO_SPRITE_GFX_REGION(2)
MCFG_DECO_SPRITE_PRIORITY_CB(dblewing_state, pri_callback)
MCFG_DECO_SPRITE_GFXDECODE("gfxdecode")
- MCFG_DECO_SPRITE_PALETTE("palette")
MCFG_DECO104_ADD("ioprot104")
MCFG_DECO146_SET_INTERFACE_SCRAMBLE_INTERLEAVE
diff --git a/src/mame/drivers/dbz.cpp b/src/mame/drivers/dbz.cpp
index 6372c089fb1..c23e895dc27 100644
--- a/src/mame/drivers/dbz.cpp
+++ b/src/mame/drivers/dbz.cpp
@@ -346,14 +346,12 @@ static MACHINE_CONFIG_START( dbz, dbz_state )
MCFG_DEVICE_ADD("k056832", K056832, 0)
MCFG_K056832_CB(dbz_state, tile_callback)
- MCFG_K056832_CONFIG("gfx1", 2, K056832_BPP_4, 1, 1, "none")
- MCFG_K056832_GFXDECODE("gfxdecode")
+ MCFG_K056832_CONFIG("gfx1", K056832_BPP_4, 1, 1, "none")
MCFG_K056832_PALETTE("palette")
MCFG_DEVICE_ADD("k053246", K053246, 0)
MCFG_K053246_CB(dbz_state, sprite_callback)
- MCFG_K053246_CONFIG("gfx2", 3, NORMAL_PLANE_ORDER, -87, 32) // or -52, 16?
- MCFG_K053246_GFXDECODE("gfxdecode")
+ MCFG_K053246_CONFIG("gfx2", NORMAL_PLANE_ORDER, -87, 32) // or -52, 16?
MCFG_K053246_PALETTE("palette")
MCFG_K053251_ADD("k053251")
diff --git a/src/mame/drivers/dec0.cpp b/src/mame/drivers/dec0.cpp
index 0c8bba5ffb1..8f30e7b5b98 100644
--- a/src/mame/drivers/dec0.cpp
+++ b/src/mame/drivers/dec0.cpp
@@ -1291,19 +1291,18 @@ static MACHINE_CONFIG_START( dec0_base, dec0_state )
MCFG_PALETTE_ADD("palette", 1024)
MCFG_DEVICE_ADD("tilegen1", DECO_BAC06, 0)
- deco_bac06_device::set_gfx_region_wide(*device,0,0,0);
+ MCFG_DECO_BAC06_GFX_REGION_WIDE(0, 0, 0)
MCFG_DECO_BAC06_GFXDECODE("gfxdecode")
MCFG_DEVICE_ADD("tilegen2", DECO_BAC06, 0)
- deco_bac06_device::set_gfx_region_wide(*device,0,1,0);
+ MCFG_DECO_BAC06_GFX_REGION_WIDE(0, 1, 0)
MCFG_DECO_BAC06_GFXDECODE("gfxdecode")
MCFG_DEVICE_ADD("tilegen3", DECO_BAC06, 0)
- deco_bac06_device::set_gfx_region_wide(*device,0,2,0);
+ MCFG_DECO_BAC06_GFX_REGION_WIDE(0, 2, 0)
MCFG_DECO_BAC06_GFXDECODE("gfxdecode")
MCFG_DEVICE_ADD("spritegen", DECO_MXC06, 0)
- deco_mxc06_device::set_gfx_region(*device, 3);
+ MCFG_DECO_MXC06_GFX_REGION(3)
MCFG_DECO_MXC06_GFXDECODE("gfxdecode")
- MCFG_DECO_MXC06_PALETTE("palette")
MACHINE_CONFIG_END
static MACHINE_CONFIG_DERIVED( dec0, dec0_base )
@@ -1405,19 +1404,18 @@ static MACHINE_CONFIG_START( automat, dec0_automat_state )
MCFG_SCREEN_PALETTE("palette")
MCFG_DEVICE_ADD("tilegen1", DECO_BAC06, 0)
- deco_bac06_device::set_gfx_region_wide(*device,0,0,0);
+ MCFG_DECO_BAC06_GFX_REGION_WIDE(0, 0, 0)
MCFG_DECO_BAC06_GFXDECODE("gfxdecode")
MCFG_DEVICE_ADD("tilegen2", DECO_BAC06, 0)
- deco_bac06_device::set_gfx_region_wide(*device,0,1,0);
+ MCFG_DECO_BAC06_GFX_REGION_WIDE(0, 1, 0)
MCFG_DECO_BAC06_GFXDECODE("gfxdecode")
MCFG_DEVICE_ADD("tilegen3", DECO_BAC06, 0)
- deco_bac06_device::set_gfx_region_wide(*device,0,2,0);
+ MCFG_DECO_BAC06_GFX_REGION_WIDE(0, 2, 0)
MCFG_DECO_BAC06_GFXDECODE("gfxdecode")
MCFG_DEVICE_ADD("spritegen", DECO_MXC06, 0)
- deco_mxc06_device::set_gfx_region(*device, 3);
+ MCFG_DECO_MXC06_GFX_REGION(3)
MCFG_DECO_MXC06_GFXDECODE("gfxdecode")
- MCFG_DECO_MXC06_PALETTE("palette")
MCFG_PALETTE_ADD("palette", 1024)
MCFG_PALETTE_FORMAT(xxxxBBBBGGGGRRRR)
@@ -1467,19 +1465,18 @@ static MACHINE_CONFIG_START( secretab, dec0_automat_state )
MCFG_SCREEN_PALETTE("palette")
MCFG_DEVICE_ADD("tilegen1", DECO_BAC06, 0)
- deco_bac06_device::set_gfx_region_wide(*device,0,0,0);
+ MCFG_DECO_BAC06_GFX_REGION_WIDE(0, 0, 0)
MCFG_DECO_BAC06_GFXDECODE("gfxdecode")
MCFG_DEVICE_ADD("tilegen2", DECO_BAC06, 0)
- deco_bac06_device::set_gfx_region_wide(*device,0,1,0);
+ MCFG_DECO_BAC06_GFX_REGION_WIDE(0, 1, 0)
MCFG_DECO_BAC06_GFXDECODE("gfxdecode")
MCFG_DEVICE_ADD("tilegen3", DECO_BAC06, 0)
- deco_bac06_device::set_gfx_region_wide(*device,0,2,0);
+ MCFG_DECO_BAC06_GFX_REGION_WIDE(0, 2, 0)
MCFG_DECO_BAC06_GFXDECODE("gfxdecode")
MCFG_DEVICE_ADD("spritegen", DECO_MXC06, 0)
- deco_mxc06_device::set_gfx_region(*device, 3);
+ MCFG_DECO_MXC06_GFX_REGION(3)
MCFG_DECO_MXC06_GFXDECODE("gfxdecode")
- MCFG_DECO_MXC06_PALETTE("palette")
MCFG_PALETTE_ADD("palette", 1024)
MCFG_PALETTE_FORMAT(xxxxBBBBGGGGRRRR)
diff --git a/src/mame/drivers/dec8.cpp b/src/mame/drivers/dec8.cpp
index f9fe92ef5c9..26abe657ca1 100644
--- a/src/mame/drivers/dec8.cpp
+++ b/src/mame/drivers/dec8.cpp
@@ -2002,9 +2002,8 @@ static MACHINE_CONFIG_START( lastmisn, dec8_state )
MCFG_BUFFERED_SPRITERAM8_ADD("spriteram")
MCFG_DEVICE_ADD("spritegen_krn", DECO_KARNOVSPRITES, 0)
- deco_karnovsprites_device::set_gfx_region(*device, 1);
+ MCFG_DECO_KARNOVSPRITES_GFX_REGION(1)
MCFG_DECO_KARNOVSPRITES_GFXDECODE("gfxdecode")
- MCFG_DECO_KARNOVSPRITES_PALETTE("palette")
MCFG_SCREEN_ADD("screen", RASTER)
// MCFG_SCREEN_REFRESH_RATE(58)
@@ -2055,9 +2054,8 @@ static MACHINE_CONFIG_START( shackled, dec8_state )
MCFG_BUFFERED_SPRITERAM8_ADD("spriteram")
MCFG_DEVICE_ADD("spritegen_krn", DECO_KARNOVSPRITES, 0)
- deco_karnovsprites_device::set_gfx_region(*device, 1);
+ MCFG_DECO_KARNOVSPRITES_GFX_REGION(1)
MCFG_DECO_KARNOVSPRITES_GFXDECODE("gfxdecode")
- MCFG_DECO_KARNOVSPRITES_PALETTE("palette")
MCFG_SCREEN_ADD("screen", RASTER)
// MCFG_SCREEN_REFRESH_RATE(58)
@@ -2107,9 +2105,8 @@ static MACHINE_CONFIG_START( gondo, dec8_state )
MCFG_BUFFERED_SPRITERAM8_ADD("spriteram")
MCFG_DEVICE_ADD("spritegen_krn", DECO_KARNOVSPRITES, 0)
- deco_karnovsprites_device::set_gfx_region(*device, 1);
+ MCFG_DECO_KARNOVSPRITES_GFX_REGION(1)
MCFG_DECO_KARNOVSPRITES_GFXDECODE("gfxdecode")
- MCFG_DECO_KARNOVSPRITES_PALETTE("palette")
MCFG_SCREEN_ADD("screen", RASTER)
// MCFG_SCREEN_REFRESH_RATE(58)
@@ -2160,9 +2157,8 @@ static MACHINE_CONFIG_START( garyoret, dec8_state )
MCFG_BUFFERED_SPRITERAM8_ADD("spriteram")
MCFG_DEVICE_ADD("spritegen_krn", DECO_KARNOVSPRITES, 0)
- deco_karnovsprites_device::set_gfx_region(*device, 1);
+ MCFG_DECO_KARNOVSPRITES_GFX_REGION(1)
MCFG_DECO_KARNOVSPRITES_GFXDECODE("gfxdecode")
- MCFG_DECO_KARNOVSPRITES_PALETTE("palette")
MCFG_SCREEN_ADD("screen", RASTER)
// MCFG_SCREEN_REFRESH_RATE(58)
@@ -2213,13 +2209,12 @@ static MACHINE_CONFIG_START( ghostb, dec8_state )
MCFG_BUFFERED_SPRITERAM8_ADD("spriteram")
MCFG_DEVICE_ADD("tilegen1", DECO_BAC06, 0)
- deco_bac06_device::set_gfx_region_wide(*device,2,2,0);
+ MCFG_DECO_BAC06_GFX_REGION_WIDE(2, 2, 0)
MCFG_DECO_BAC06_GFXDECODE("gfxdecode")
MCFG_DEVICE_ADD("spritegen_krn", DECO_KARNOVSPRITES, 0)
- deco_karnovsprites_device::set_gfx_region(*device, 1);
+ MCFG_DECO_KARNOVSPRITES_GFX_REGION(1)
MCFG_DECO_KARNOVSPRITES_GFXDECODE("gfxdecode")
- MCFG_DECO_KARNOVSPRITES_PALETTE("palette")
MCFG_SCREEN_ADD("screen", RASTER)
// MCFG_SCREEN_REFRESH_RATE(58)
@@ -2277,9 +2272,8 @@ static MACHINE_CONFIG_START( csilver, dec8_state )
MCFG_BUFFERED_SPRITERAM8_ADD("spriteram")
MCFG_DEVICE_ADD("spritegen_krn", DECO_KARNOVSPRITES, 0)
- deco_karnovsprites_device::set_gfx_region(*device, 1);
+ MCFG_DECO_KARNOVSPRITES_GFX_REGION(1)
MCFG_DECO_KARNOVSPRITES_GFXDECODE("gfxdecode")
- MCFG_DECO_KARNOVSPRITES_PALETTE("palette")
MCFG_SCREEN_ADD("screen", RASTER)
// MCFG_SCREEN_REFRESH_RATE(58)
@@ -2335,13 +2329,12 @@ static MACHINE_CONFIG_START( oscar, dec8_state )
MCFG_BUFFERED_SPRITERAM8_ADD("spriteram")
MCFG_DEVICE_ADD("tilegen1", DECO_BAC06, 0)
- deco_bac06_device::set_gfx_region_wide(*device,2,2,0);
+ MCFG_DECO_BAC06_GFX_REGION_WIDE(2, 2, 0)
MCFG_DECO_BAC06_GFXDECODE("gfxdecode")
MCFG_DEVICE_ADD("spritegen_mxc", DECO_MXC06, 0)
- deco_mxc06_device::set_gfx_region(*device, 1);
+ MCFG_DECO_MXC06_GFX_REGION(1)
MCFG_DECO_MXC06_GFXDECODE("gfxdecode")
- MCFG_DECO_MXC06_PALETTE("palette")
MCFG_SCREEN_ADD("screen", RASTER)
// MCFG_SCREEN_REFRESH_RATE(58)
@@ -2432,16 +2425,15 @@ static MACHINE_CONFIG_START( cobracom, dec8_state )
MCFG_BUFFERED_SPRITERAM8_ADD("spriteram")
MCFG_DEVICE_ADD("tilegen1", DECO_BAC06, 0)
- deco_bac06_device::set_gfx_region_wide(*device,2,2,0);
+ MCFG_DECO_BAC06_GFX_REGION_WIDE(2, 2, 0)
MCFG_DECO_BAC06_GFXDECODE("gfxdecode")
MCFG_DEVICE_ADD("tilegen2", DECO_BAC06, 0)
- deco_bac06_device::set_gfx_region_wide(*device,3,3,0);
+ MCFG_DECO_BAC06_GFX_REGION_WIDE(3, 3, 0)
MCFG_DECO_BAC06_GFXDECODE("gfxdecode")
MCFG_DEVICE_ADD("spritegen_mxc", DECO_MXC06, 0)
- deco_mxc06_device::set_gfx_region(*device, 1);
+ MCFG_DECO_MXC06_GFX_REGION(1)
MCFG_DECO_MXC06_GFXDECODE("gfxdecode")
- MCFG_DECO_MXC06_PALETTE("palette")
MCFG_SCREEN_ADD("screen", RASTER)
diff --git a/src/mame/drivers/deco156.cpp b/src/mame/drivers/deco156.cpp
index b8ab102bee1..410f79504ee 100644
--- a/src/mame/drivers/deco156.cpp
+++ b/src/mame/drivers/deco156.cpp
@@ -369,13 +369,11 @@ static MACHINE_CONFIG_START( hvysmsh, deco156_state )
MCFG_DECO16IC_PF12_8X8_BANK(0)
MCFG_DECO16IC_PF12_16X16_BANK(1)
MCFG_DECO16IC_GFXDECODE("gfxdecode")
- MCFG_DECO16IC_PALETTE("palette")
MCFG_DEVICE_ADD("spritegen", DECO_SPRITE, 0)
MCFG_DECO_SPRITE_GFX_REGION(2)
MCFG_DECO_SPRITE_PRIORITY_CB(deco156_state, pri_callback)
MCFG_DECO_SPRITE_GFXDECODE("gfxdecode")
- MCFG_DECO_SPRITE_PALETTE("palette")
/* sound hardware */
MCFG_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker")
@@ -422,13 +420,11 @@ static MACHINE_CONFIG_START( wcvol95, deco156_state )
MCFG_DECO16IC_PF12_8X8_BANK(0)
MCFG_DECO16IC_PF12_16X16_BANK(1)
MCFG_DECO16IC_GFXDECODE("gfxdecode")
- MCFG_DECO16IC_PALETTE("palette")
MCFG_DEVICE_ADD("spritegen", DECO_SPRITE, 0)
MCFG_DECO_SPRITE_GFX_REGION(2)
MCFG_DECO_SPRITE_PRIORITY_CB(deco156_state, pri_callback)
MCFG_DECO_SPRITE_GFXDECODE("gfxdecode")
- MCFG_DECO_SPRITE_PALETTE("palette")
/* sound hardware */
MCFG_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker")
diff --git a/src/mame/drivers/deco32.cpp b/src/mame/drivers/deco32.cpp
index d8f77543f26..f4788a4b954 100644
--- a/src/mame/drivers/deco32.cpp
+++ b/src/mame/drivers/deco32.cpp
@@ -1840,7 +1840,6 @@ static MACHINE_CONFIG_START( captaven, deco32_state )
MCFG_DECO16IC_PF12_8X8_BANK(0)
MCFG_DECO16IC_PF12_16X16_BANK(1)
MCFG_DECO16IC_GFXDECODE("gfxdecode")
- MCFG_DECO16IC_PALETTE("palette")
MCFG_DEVICE_ADD("tilegen2", DECO16IC, 0) // pf3 is in 8bpp mode, pf4 is not used
MCFG_DECO16IC_SPLIT(0)
@@ -1856,13 +1855,11 @@ static MACHINE_CONFIG_START( captaven, deco32_state )
MCFG_DECO16IC_PF12_8X8_BANK(0)
MCFG_DECO16IC_PF12_16X16_BANK(2)
MCFG_DECO16IC_GFXDECODE("gfxdecode")
- MCFG_DECO16IC_PALETTE("palette")
MCFG_DEVICE_ADD("spritegen", DECO_SPRITE, 0)
MCFG_DECO_SPRITE_GFX_REGION(3)
MCFG_DECO_SPRITE_PRIORITY_CB(deco32_state, captaven_pri_callback)
MCFG_DECO_SPRITE_GFXDECODE("gfxdecode")
- MCFG_DECO_SPRITE_PALETTE("palette")
MCFG_DECO146_ADD("ioprot")
MCFG_DECO146_SET_SOUNDLATCH_CALLBACK(deco32_state, deco32_sound_cb)
@@ -1946,7 +1943,6 @@ static MACHINE_CONFIG_START( fghthist, deco32_state ) /* DE-0380-2 PCB */
MCFG_DECO16IC_PF12_8X8_BANK(0)
MCFG_DECO16IC_PF12_16X16_BANK(1)
MCFG_DECO16IC_GFXDECODE("gfxdecode")
- MCFG_DECO16IC_PALETTE("palette")
MCFG_DEVICE_ADD("tilegen2", DECO16IC, 0)
MCFG_DECO16IC_SPLIT(0)
@@ -1962,12 +1958,10 @@ static MACHINE_CONFIG_START( fghthist, deco32_state ) /* DE-0380-2 PCB */
MCFG_DECO16IC_PF12_8X8_BANK(0)
MCFG_DECO16IC_PF12_16X16_BANK(2)
MCFG_DECO16IC_GFXDECODE("gfxdecode")
- MCFG_DECO16IC_PALETTE("palette")
MCFG_DEVICE_ADD("spritegen", DECO_SPRITE, 0)
MCFG_DECO_SPRITE_GFX_REGION(3)
MCFG_DECO_SPRITE_GFXDECODE("gfxdecode")
- MCFG_DECO_SPRITE_PALETTE("palette")
MCFG_DECO146_ADD("ioprot")
MCFG_DECO146_SET_PORTA_CALLBACK( deco32_state, port_a_fghthist )
@@ -2032,7 +2026,6 @@ static MACHINE_CONFIG_START( fghthsta, deco32_state ) /* DE-0395-1 PCB */
MCFG_DECO16IC_PF12_8X8_BANK(0)
MCFG_DECO16IC_PF12_16X16_BANK(1)
MCFG_DECO16IC_GFXDECODE("gfxdecode")
- MCFG_DECO16IC_PALETTE("palette")
MCFG_DEVICE_ADD("tilegen2", DECO16IC, 0)
MCFG_DECO16IC_SPLIT(0)
@@ -2048,12 +2041,10 @@ static MACHINE_CONFIG_START( fghthsta, deco32_state ) /* DE-0395-1 PCB */
MCFG_DECO16IC_PF12_8X8_BANK(0)
MCFG_DECO16IC_PF12_16X16_BANK(2)
MCFG_DECO16IC_GFXDECODE("gfxdecode")
- MCFG_DECO16IC_PALETTE("palette")
MCFG_DEVICE_ADD("spritegen", DECO_SPRITE, 0)
MCFG_DECO_SPRITE_GFX_REGION(3)
MCFG_DECO_SPRITE_GFXDECODE("gfxdecode")
- MCFG_DECO_SPRITE_PALETTE("palette")
MCFG_DECO146_ADD("ioprot")
MCFG_DECO146_SET_PORTA_CALLBACK( deco32_state, port_a_fghthist )
@@ -2160,7 +2151,6 @@ static MACHINE_CONFIG_START( dragngun, dragngun_state )
MCFG_DECO16IC_PF12_8X8_BANK(0)
MCFG_DECO16IC_PF12_16X16_BANK(1)
MCFG_DECO16IC_GFXDECODE("gfxdecode")
- MCFG_DECO16IC_PALETTE("palette")
MCFG_DEVICE_ADD("tilegen2", DECO16IC, 0)
MCFG_DECO16IC_SPLIT(0)
@@ -2176,11 +2166,9 @@ static MACHINE_CONFIG_START( dragngun, dragngun_state )
MCFG_DECO16IC_PF12_8X8_BANK(0)
MCFG_DECO16IC_PF12_16X16_BANK(2)
MCFG_DECO16IC_GFXDECODE("gfxdecode")
- MCFG_DECO16IC_PALETTE("palette")
MCFG_DEVICE_ADD("spritegen_zoom", DECO_ZOOMSPR, 0)
MCFG_DECO_ZOOMSPR_GFXDECODE("gfxdecode")
- MCFG_DECO_ZOOMSPR_PALETTE("palette")
MCFG_GFXDECODE_ADD("gfxdecode", "palette", dragngun)
MCFG_PALETTE_ADD("palette", 2048)
@@ -2278,7 +2266,6 @@ static MACHINE_CONFIG_START( lockload, dragngun_state )
MCFG_DECO16IC_PF12_8X8_BANK(0)
MCFG_DECO16IC_PF12_16X16_BANK(1)
MCFG_DECO16IC_GFXDECODE("gfxdecode")
- MCFG_DECO16IC_PALETTE("palette")
MCFG_DEVICE_ADD("tilegen2", DECO16IC, 0)
MCFG_DECO16IC_SPLIT(0)
@@ -2294,11 +2281,9 @@ static MACHINE_CONFIG_START( lockload, dragngun_state )
MCFG_DECO16IC_PF12_8X8_BANK(0)
MCFG_DECO16IC_PF12_16X16_BANK(2)
MCFG_DECO16IC_GFXDECODE("gfxdecode")
- MCFG_DECO16IC_PALETTE("palette")
MCFG_DEVICE_ADD("spritegen_zoom", DECO_ZOOMSPR, 0)
MCFG_DECO_ZOOMSPR_GFXDECODE("gfxdecode")
- MCFG_DECO_ZOOMSPR_PALETTE("palette")
MCFG_DECO146_ADD("ioprot")
MCFG_DECO146_SET_SOUNDLATCH_CALLBACK(deco32_state, deco32_sound_cb)
@@ -2367,7 +2352,6 @@ static MACHINE_CONFIG_START( tattass, deco32_state )
MCFG_DECO16IC_PF12_8X8_BANK(0)
MCFG_DECO16IC_PF12_16X16_BANK(1)
MCFG_DECO16IC_GFXDECODE("gfxdecode")
- MCFG_DECO16IC_PALETTE("palette")
MCFG_DEVICE_ADD("tilegen2", DECO16IC, 0)
MCFG_DECO16IC_SPLIT(0)
@@ -2383,17 +2367,14 @@ static MACHINE_CONFIG_START( tattass, deco32_state )
MCFG_DECO16IC_PF12_8X8_BANK(0)
MCFG_DECO16IC_PF12_16X16_BANK(2)
MCFG_DECO16IC_GFXDECODE("gfxdecode")
- MCFG_DECO16IC_PALETTE("palette")
MCFG_DEVICE_ADD("spritegen1", DECO_SPRITE, 0)
MCFG_DECO_SPRITE_GFX_REGION(3)
MCFG_DECO_SPRITE_GFXDECODE("gfxdecode")
- MCFG_DECO_SPRITE_PALETTE("palette")
MCFG_DEVICE_ADD("spritegen2", DECO_SPRITE, 0)
MCFG_DECO_SPRITE_GFX_REGION(4)
MCFG_DECO_SPRITE_GFXDECODE("gfxdecode")
- MCFG_DECO_SPRITE_PALETTE("palette")
MCFG_GFXDECODE_ADD("gfxdecode", "palette", tattass)
MCFG_PALETTE_ADD("palette", 2048)
@@ -2444,7 +2425,6 @@ static MACHINE_CONFIG_START( nslasher, deco32_state )
MCFG_DECO16IC_PF12_8X8_BANK(0)
MCFG_DECO16IC_PF12_16X16_BANK(1)
MCFG_DECO16IC_GFXDECODE("gfxdecode")
- MCFG_DECO16IC_PALETTE("palette")
MCFG_DEVICE_ADD("tilegen2", DECO16IC, 0)
MCFG_DECO16IC_SPLIT(0)
@@ -2460,17 +2440,14 @@ static MACHINE_CONFIG_START( nslasher, deco32_state )
MCFG_DECO16IC_PF12_8X8_BANK(0)
MCFG_DECO16IC_PF12_16X16_BANK(2)
MCFG_DECO16IC_GFXDECODE("gfxdecode")
- MCFG_DECO16IC_PALETTE("palette")
MCFG_DEVICE_ADD("spritegen1", DECO_SPRITE, 0)
MCFG_DECO_SPRITE_GFX_REGION(3)
MCFG_DECO_SPRITE_GFXDECODE("gfxdecode")
- MCFG_DECO_SPRITE_PALETTE("palette")
MCFG_DEVICE_ADD("spritegen2", DECO_SPRITE, 0)
MCFG_DECO_SPRITE_GFX_REGION(4)
MCFG_DECO_SPRITE_GFXDECODE("gfxdecode")
- MCFG_DECO_SPRITE_PALETTE("palette")
MCFG_GFXDECODE_ADD("gfxdecode", "palette", nslasher)
MCFG_PALETTE_ADD("palette", 2048)
diff --git a/src/mame/drivers/dfruit.cpp b/src/mame/drivers/dfruit.cpp
index 20e459a2b3d..c2097280503 100644
--- a/src/mame/drivers/dfruit.cpp
+++ b/src/mame/drivers/dfruit.cpp
@@ -387,7 +387,6 @@ static MACHINE_CONFIG_START( dfruit, dfruit_state )
MCFG_DEVICE_ADD("tc0091lvc", TC0091LVC, 0)
MCFG_TC0091LVC_GFXDECODE("gfxdecode")
- MCFG_TC0091LVC_PALETTE("palette")
MCFG_DEVICE_ADD("ppi8255_0", I8255A, 0)
MCFG_I8255_IN_PORTA_CB(IOPORT("IN0"))
diff --git a/src/mame/drivers/dietgo.cpp b/src/mame/drivers/dietgo.cpp
index e2c8df4e31b..5e8954d705b 100644
--- a/src/mame/drivers/dietgo.cpp
+++ b/src/mame/drivers/dietgo.cpp
@@ -245,12 +245,10 @@ static MACHINE_CONFIG_START( dietgo, dietgo_state )
MCFG_DECO16IC_PF12_8X8_BANK(0)
MCFG_DECO16IC_PF12_16X16_BANK(1)
MCFG_DECO16IC_GFXDECODE("gfxdecode")
- MCFG_DECO16IC_PALETTE("palette")
MCFG_DEVICE_ADD("spritegen", DECO_SPRITE, 0)
MCFG_DECO_SPRITE_GFX_REGION(2)
MCFG_DECO_SPRITE_GFXDECODE("gfxdecode")
- MCFG_DECO_SPRITE_PALETTE("palette")
MCFG_DECO104_ADD("ioprot104")
MCFG_DECO146_SET_INTERFACE_SCRAMBLE_INTERLEAVE
diff --git a/src/mame/drivers/djboy.cpp b/src/mame/drivers/djboy.cpp
index ae0efeed0ee..bbd3eb25706 100644
--- a/src/mame/drivers/djboy.cpp
+++ b/src/mame/drivers/djboy.cpp
@@ -581,7 +581,6 @@ static MACHINE_CONFIG_START( djboy, djboy_state )
MCFG_DEVICE_ADD("pandora", KANEKO_PANDORA, 0)
MCFG_KANEKO_PANDORA_GFXDECODE("gfxdecode")
- MCFG_KANEKO_PANDORA_PALETTE("palette")
MCFG_SPEAKER_STANDARD_MONO("mono")
diff --git a/src/mame/drivers/djmain.cpp b/src/mame/drivers/djmain.cpp
index 3037b06723c..efa5c7ed4d8 100644
--- a/src/mame/drivers/djmain.cpp
+++ b/src/mame/drivers/djmain.cpp
@@ -1403,8 +1403,7 @@ static MACHINE_CONFIG_START( djmainj, djmain_state )
MCFG_DEVICE_ADD("k056832", K056832, 0)
MCFG_K056832_CB(djmain_state, tile_callback)
- MCFG_K056832_CONFIG("gfx2", 1, K056832_BPP_4dj, 1, 1, "none")
- MCFG_K056832_GFXDECODE("gfxdecode")
+ MCFG_K056832_CONFIG("gfx2", K056832_BPP_4dj, 1, 1, "none")
MCFG_K056832_PALETTE("palette")
MCFG_K055555_ADD("k055555")
diff --git a/src/mame/drivers/dreambal.cpp b/src/mame/drivers/dreambal.cpp
index 19516ea4123..727e82ac03c 100644
--- a/src/mame/drivers/dreambal.cpp
+++ b/src/mame/drivers/dreambal.cpp
@@ -340,7 +340,6 @@ static MACHINE_CONFIG_START( dreambal, dreambal_state )
MCFG_DECO16IC_PF12_8X8_BANK(0)
MCFG_DECO16IC_PF12_16X16_BANK(1)
MCFG_DECO16IC_GFXDECODE("gfxdecode")
- MCFG_DECO16IC_PALETTE("palette")
/* sound hardware */
MCFG_SPEAKER_STANDARD_MONO("mono")
diff --git a/src/mame/drivers/esd16.cpp b/src/mame/drivers/esd16.cpp
index 01f12b0de2b..912e811ac4e 100644
--- a/src/mame/drivers/esd16.cpp
+++ b/src/mame/drivers/esd16.cpp
@@ -632,7 +632,6 @@ static MACHINE_CONFIG_START( esd16, esd16_state )
MCFG_DECO_SPRITE_PRIORITY_CB(esd16_state, hedpanic_pri_callback)
MCFG_DECO_SPRITE_FLIPALLX(1)
MCFG_DECO_SPRITE_GFXDECODE("gfxdecode")
- MCFG_DECO_SPRITE_PALETTE("palette")
MCFG_GFXDECODE_ADD("gfxdecode", "palette", esd16)
MCFG_PALETTE_ADD("palette", 0x1000/2)
diff --git a/src/mame/drivers/f1gp.cpp b/src/mame/drivers/f1gp.cpp
index d6bf1eee619..f60b0ca1633 100644
--- a/src/mame/drivers/f1gp.cpp
+++ b/src/mame/drivers/f1gp.cpp
@@ -432,14 +432,12 @@ static MACHINE_CONFIG_START( f1gp, f1gp_state )
MCFG_VSYSTEM_SPR2_SET_GFXREGION(1)
MCFG_VSYSTEM_SPR2_SET_PRITYPE(2)
MCFG_VSYSTEM_SPR2_GFXDECODE("gfxdecode")
- MCFG_VSYSTEM_SPR2_PALETTE("palette")
MCFG_DEVICE_ADD("vsystem_spr_ol2", VSYSTEM_SPR2, 0)
MCFG_VSYSTEM_SPR2_SET_TILE_INDIRECT( f1gp_state, f1gp_ol2_tile_callback )
MCFG_VSYSTEM_SPR2_SET_GFXREGION(2)
MCFG_VSYSTEM_SPR2_SET_PRITYPE(2)
MCFG_VSYSTEM_SPR2_GFXDECODE("gfxdecode")
- MCFG_VSYSTEM_SPR2_PALETTE("palette")
MCFG_VIDEO_START_OVERRIDE(f1gp_state,f1gp)
@@ -516,7 +514,6 @@ static MACHINE_CONFIG_DERIVED( f1gp2, f1gp )
MCFG_VSYSTEM_SPR_SET_TILE_INDIRECT( f1gp_state, f1gp2_tile_callback )
MCFG_VSYSTEM_SPR_SET_GFXREGION(1)
MCFG_VSYSTEM_SPR_GFXDECODE("gfxdecode")
- MCFG_VSYSTEM_SPR_PALETTE("palette")
MCFG_DEVICE_MODIFY("k053936")
MCFG_K053936_OFFSETS(-48, -21)
diff --git a/src/mame/drivers/funkyjet.cpp b/src/mame/drivers/funkyjet.cpp
index a9cacb720c6..a3c2a47599a 100644
--- a/src/mame/drivers/funkyjet.cpp
+++ b/src/mame/drivers/funkyjet.cpp
@@ -346,12 +346,10 @@ static MACHINE_CONFIG_START( funkyjet, funkyjet_state )
MCFG_DECO16IC_PF12_8X8_BANK(0)
MCFG_DECO16IC_PF12_16X16_BANK(1)
MCFG_DECO16IC_GFXDECODE("gfxdecode")
- MCFG_DECO16IC_PALETTE("palette")
MCFG_DEVICE_ADD("spritegen", DECO_SPRITE, 0)
MCFG_DECO_SPRITE_GFX_REGION(2)
MCFG_DECO_SPRITE_GFXDECODE("gfxdecode")
- MCFG_DECO_SPRITE_PALETTE("palette")
/* sound hardware */
MCFG_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker")
diff --git a/src/mame/drivers/galastrm.cpp b/src/mame/drivers/galastrm.cpp
index 796b3130948..4ca8366e984 100644
--- a/src/mame/drivers/galastrm.cpp
+++ b/src/mame/drivers/galastrm.cpp
@@ -311,7 +311,6 @@ static MACHINE_CONFIG_START( galastrm, galastrm_state )
MCFG_TC0480SCP_TX_REGION(3)
MCFG_TC0480SCP_OFFSETS(-40, -3)
MCFG_TC0480SCP_GFXDECODE("gfxdecode")
- MCFG_TC0480SCP_PALETTE("palette")
/* sound hardware */
MCFG_DEVICE_ADD("taito_en", TAITO_EN, 0)
diff --git a/src/mame/drivers/galpanic.cpp b/src/mame/drivers/galpanic.cpp
index 1f9c349de33..9c355309e77 100644
--- a/src/mame/drivers/galpanic.cpp
+++ b/src/mame/drivers/galpanic.cpp
@@ -248,7 +248,6 @@ static MACHINE_CONFIG_START( galpanic, galpanic_state )
MCFG_DEVICE_ADD("pandora", KANEKO_PANDORA, 0)
MCFG_KANEKO_PANDORA_OFFSETS(0, -16)
MCFG_KANEKO_PANDORA_GFXDECODE("gfxdecode")
- MCFG_KANEKO_PANDORA_PALETTE("palette")
MCFG_DEVICE_ADD("calc1_mcu", KANEKO_HIT, 0)
kaneko_hit_device::set_type(*device, 0);
diff --git a/src/mame/drivers/gijoe.cpp b/src/mame/drivers/gijoe.cpp
index 8556742921f..80a0d830c87 100644
--- a/src/mame/drivers/gijoe.cpp
+++ b/src/mame/drivers/gijoe.cpp
@@ -329,18 +329,14 @@ static MACHINE_CONFIG_START( gijoe, gijoe_state )
MCFG_PALETTE_FORMAT(xBBBBBGGGGGRRRRR)
MCFG_PALETTE_ENABLE_SHADOWS()
- MCFG_GFXDECODE_ADD("gfxdecode", "palette", empty)
-
MCFG_DEVICE_ADD("k056832", K056832, 0)
MCFG_K056832_CB(gijoe_state, tile_callback)
- MCFG_K056832_CONFIG("gfx1", 0, K056832_BPP_4, 1, 0, "none")
- MCFG_K056832_GFXDECODE("gfxdecode")
+ MCFG_K056832_CONFIG("gfx1", K056832_BPP_4, 1, 0, "none")
MCFG_K056832_PALETTE("palette")
MCFG_DEVICE_ADD("k053246", K053246, 0)
MCFG_K053246_CB(gijoe_state, sprite_callback)
- MCFG_K053246_CONFIG("gfx2", 1, NORMAL_PLANE_ORDER, -37, 20)
- MCFG_K053246_GFXDECODE("gfxdecode")
+ MCFG_K053246_CONFIG("gfx2", NORMAL_PLANE_ORDER, -37, 20)
MCFG_K053246_PALETTE("palette")
MCFG_K053251_ADD("k053251")
diff --git a/src/mame/drivers/gotcha.cpp b/src/mame/drivers/gotcha.cpp
index 11c96bcdb0b..afb5540c576 100644
--- a/src/mame/drivers/gotcha.cpp
+++ b/src/mame/drivers/gotcha.cpp
@@ -287,7 +287,6 @@ static MACHINE_CONFIG_START( gotcha, gotcha_state )
MCFG_DECO_SPRITE_ISBOOTLEG(true)
MCFG_DECO_SPRITE_OFFSETS(5, -1) // aligned to 2nd instruction screen in attract
MCFG_DECO_SPRITE_GFXDECODE("gfxdecode")
- MCFG_DECO_SPRITE_PALETTE("palette")
/* sound hardware */
MCFG_SPEAKER_STANDARD_MONO("mono")
diff --git a/src/mame/drivers/groundfx.cpp b/src/mame/drivers/groundfx.cpp
index ff6d31a6870..e3e0c652ef7 100644
--- a/src/mame/drivers/groundfx.cpp
+++ b/src/mame/drivers/groundfx.cpp
@@ -344,7 +344,6 @@ static MACHINE_CONFIG_START( groundfx, groundfx_state )
MCFG_TC0480SCP_OFFSETS(0x24, 0)
MCFG_TC0480SCP_OFFSETS_TX(-1, 0)
MCFG_TC0480SCP_GFXDECODE("gfxdecode")
- MCFG_TC0480SCP_PALETTE("palette")
/* sound hardware */
MCFG_DEVICE_ADD("taito_en", TAITO_EN, 0)
diff --git a/src/mame/drivers/gstriker.cpp b/src/mame/drivers/gstriker.cpp
index 200cac43623..ca2ad772f7f 100644
--- a/src/mame/drivers/gstriker.cpp
+++ b/src/mame/drivers/gstriker.cpp
@@ -546,7 +546,6 @@ static MACHINE_CONFIG_START( gstriker, gstriker_state )
MCFG_VSYSTEM_SPR_SET_PALMASK(0x1f)
MCFG_VSYSTEM_SPR_SET_TRANSPEN(0)
MCFG_VSYSTEM_SPR_GFXDECODE("gfxdecode")
- MCFG_VSYSTEM_SPR_PALETTE("palette")
MCFG_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker")
diff --git a/src/mame/drivers/gticlub.cpp b/src/mame/drivers/gticlub.cpp
index e9cbb5e37a5..91eedfcdf83 100644
--- a/src/mame/drivers/gticlub.cpp
+++ b/src/mame/drivers/gticlub.cpp
@@ -973,15 +973,11 @@ static MACHINE_CONFIG_START( gticlub, gticlub_state )
MCFG_VIDEO_START_OVERRIDE(gticlub_state,gticlub)
- MCFG_GFXDECODE_ADD("gfxdecode", "palette", empty)
MCFG_DEVICE_ADD("k001604_1", K001604, 0)
- MCFG_K001604_GFX_INDEX1(1)
- MCFG_K001604_GFX_INDEX2(2)
MCFG_K001604_LAYER_SIZE(1)
MCFG_K001604_ROZ_SIZE(1)
MCFG_K001604_TXT_OFFSET(0)
MCFG_K001604_ROZ_OFFSET(0)
- MCFG_K001604_GFXDECODE("gfxdecode")
MCFG_K001604_PALETTE("palette")
MCFG_DEVICE_ADD("k001005", K001005, 0)
@@ -1031,13 +1027,10 @@ static MACHINE_CONFIG_DERIVED( slrasslt, gticlub )
MCFG_DEVICE_REMOVE("k001604_1")
MCFG_DEVICE_ADD("k001604_1", K001604, 0)
- MCFG_K001604_GFX_INDEX1(1)
- MCFG_K001604_GFX_INDEX2(2)
MCFG_K001604_LAYER_SIZE(0)
MCFG_K001604_ROZ_SIZE(0)
MCFG_K001604_TXT_OFFSET(16384)
MCFG_K001604_ROZ_OFFSET(0)
- MCFG_K001604_GFXDECODE("gfxdecode")
MCFG_K001604_PALETTE("palette")
MACHINE_CONFIG_END
@@ -1113,26 +1106,18 @@ static MACHINE_CONFIG_START( hangplt, gticlub_state )
MCFG_SCREEN_VISIBLE_AREA(0, 511, 0, 383)
MCFG_SCREEN_UPDATE_DRIVER(gticlub_state, screen_update_hangplt)
- MCFG_GFXDECODE_ADD("gfxdecode", "palette", empty)
-
MCFG_DEVICE_ADD("k001604_1", K001604, 0)
- MCFG_K001604_GFX_INDEX1(1)
- MCFG_K001604_GFX_INDEX2(2)
MCFG_K001604_LAYER_SIZE(0)
MCFG_K001604_ROZ_SIZE(1)
MCFG_K001604_TXT_OFFSET(0)
MCFG_K001604_ROZ_OFFSET(16384)
- MCFG_K001604_GFXDECODE("gfxdecode")
MCFG_K001604_PALETTE("palette")
MCFG_DEVICE_ADD("k001604_2", K001604, 0)
- MCFG_K001604_GFX_INDEX1(3)
- MCFG_K001604_GFX_INDEX2(4)
MCFG_K001604_LAYER_SIZE(0)
MCFG_K001604_ROZ_SIZE(1)
MCFG_K001604_TXT_OFFSET(0)
MCFG_K001604_ROZ_OFFSET(16384)
- MCFG_K001604_GFXDECODE("gfxdecode")
MCFG_K001604_PALETTE("palette")
MCFG_K056800_ADD("k056800", XTAL_33_8688MHz/2)
diff --git a/src/mame/drivers/gunbustr.cpp b/src/mame/drivers/gunbustr.cpp
index b4ffdf0ba70..5b1df1707db 100644
--- a/src/mame/drivers/gunbustr.cpp
+++ b/src/mame/drivers/gunbustr.cpp
@@ -303,7 +303,6 @@ static MACHINE_CONFIG_START( gunbustr, gunbustr_state )
MCFG_TC0480SCP_OFFSETS_TX(-1, -1)
MCFG_TC0480SCP_OFFSETS_FLIP(-1, 0)
MCFG_TC0480SCP_GFXDECODE("gfxdecode")
- MCFG_TC0480SCP_PALETTE("palette")
/* sound hardware */
MCFG_DEVICE_ADD("taito_en", TAITO_EN, 0)
diff --git a/src/mame/drivers/hornet.cpp b/src/mame/drivers/hornet.cpp
index b1df15c8419..bd99a6356fe 100644
--- a/src/mame/drivers/hornet.cpp
+++ b/src/mame/drivers/hornet.cpp
@@ -1014,10 +1014,7 @@ static MACHINE_CONFIG_START( hornet, hornet_state )
MCFG_PALETTE_ADD("palette", 65536)
- MCFG_GFXDECODE_ADD("gfxdecode", "palette", empty)
-
- MCFG_K037122_ADD("k037122_1", "screen", 0)
- MCFG_K037122_GFXDECODE("gfxdecode")
+ MCFG_K037122_ADD("k037122_1", "screen")
MCFG_K037122_PALETTE("palette")
MCFG_K056800_ADD("k056800", XTAL_16_9344MHz)
@@ -1067,12 +1064,10 @@ static MACHINE_CONFIG_DERIVED( hornet_2board, hornet )
MCFG_DEVICE_REMOVE("k037122_1")
- MCFG_K037122_ADD("k037122_1", "lscreen", 0)
- MCFG_K037122_GFXDECODE("gfxdecode")
+ MCFG_K037122_ADD("k037122_1", "lscreen")
MCFG_K037122_PALETTE("palette")
- MCFG_K037122_ADD("k037122_2", "rscreen", 1)
- MCFG_K037122_GFXDECODE("gfxdecode")
+ MCFG_K037122_ADD("k037122_2", "rscreen")
MCFG_K037122_PALETTE("palette")
MCFG_DEVICE_REMOVE("voodoo0")
diff --git a/src/mame/drivers/hvyunit.cpp b/src/mame/drivers/hvyunit.cpp
index 21ec09dfe4b..a8446a8537c 100644
--- a/src/mame/drivers/hvyunit.cpp
+++ b/src/mame/drivers/hvyunit.cpp
@@ -676,7 +676,6 @@ static MACHINE_CONFIG_START( hvyunit, hvyunit_state )
MCFG_DEVICE_ADD("pandora", KANEKO_PANDORA, 0)
MCFG_KANEKO_PANDORA_GFXDECODE("gfxdecode")
- MCFG_KANEKO_PANDORA_PALETTE("palette")
/* sound hardware */
MCFG_SPEAKER_STANDARD_MONO("mono")
diff --git a/src/mame/drivers/inufuku.cpp b/src/mame/drivers/inufuku.cpp
index dcbb74bd400..78621252fae 100644
--- a/src/mame/drivers/inufuku.cpp
+++ b/src/mame/drivers/inufuku.cpp
@@ -395,7 +395,6 @@ static MACHINE_CONFIG_START( inufuku, inufuku_state )
MCFG_VSYSTEM_SPR_SET_TILE_INDIRECT( inufuku_state, inufuku_tile_callback )
MCFG_VSYSTEM_SPR_SET_GFXREGION(2)
MCFG_VSYSTEM_SPR_GFXDECODE("gfxdecode")
- MCFG_VSYSTEM_SPR_PALETTE("palette")
MCFG_GFXDECODE_ADD("gfxdecode", "palette", inufuku)
MCFG_PALETTE_ADD("palette", 4096)
diff --git a/src/mame/drivers/jclub2.cpp b/src/mame/drivers/jclub2.cpp
index e3135dcbc6e..fe83f2ad7a5 100644
--- a/src/mame/drivers/jclub2.cpp
+++ b/src/mame/drivers/jclub2.cpp
@@ -156,7 +156,7 @@ public:
UINT32 screen_update_jclub2o(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
TIMER_DEVICE_CALLBACK_MEMBER(darkhors_irq);
void draw_sprites_darkhors(bitmap_ind16 &bitmap, const rectangle &cliprect);
- required_device<gfxdecode_device> m_gfxdecode;
+ optional_device<gfxdecode_device> m_gfxdecode;
WRITE8_MEMBER(st0016_rom_bank_w); // temp?
};
@@ -1021,13 +1021,10 @@ static MACHINE_CONFIG_START( jclub2, darkhors_state )
MCFG_SCREEN_UPDATE_DRIVER(darkhors_state, screen_update_jclub2)
MCFG_SCREEN_PALETTE("palette")
- MCFG_GFXDECODE_ADD("gfxdecode", "palette", empty)
-
// NOT an ST0020 but instead ST0032, ram format isn't compatible at least
MCFG_DEVICE_ADD("st0020_spr", ST0020_SPRITES, 0)
st0020_device::set_is_st0032(*device, 1);
st0020_device::set_is_jclub2o(*device, 1); // offsets
- MCFG_ST0020_SPRITES_GFXDECODE("gfxdecode")
MCFG_ST0020_SPRITES_PALETTE("palette")
MCFG_PALETTE_ADD("palette", 0x10000)
@@ -1101,11 +1098,8 @@ static MACHINE_CONFIG_START( jclub2o, darkhors_state )
MCFG_PALETTE_ADD("palette", 0x10000)
MCFG_PALETTE_FORMAT(xBBBBBGGGGGRRRRR)
- MCFG_GFXDECODE_ADD("gfxdecode", "palette", empty)
-
MCFG_DEVICE_ADD("st0020_spr", ST0020_SPRITES, 0)
st0020_device::set_is_jclub2o(*device, 1);
- MCFG_ST0020_SPRITES_GFXDECODE("gfxdecode")
MCFG_ST0020_SPRITES_PALETTE("palette")
MCFG_VIDEO_START_OVERRIDE(darkhors_state,jclub2o)
diff --git a/src/mame/drivers/karnov.cpp b/src/mame/drivers/karnov.cpp
index 9737c94c80d..3f602083f66 100644
--- a/src/mame/drivers/karnov.cpp
+++ b/src/mame/drivers/karnov.cpp
@@ -816,9 +816,8 @@ static MACHINE_CONFIG_START( karnov, karnov_state )
MCFG_PALETTE_INIT_OWNER(karnov_state, karnov)
MCFG_DEVICE_ADD("spritegen", DECO_KARNOVSPRITES, 0)
- deco_karnovsprites_device::set_gfx_region(*device, 2);
+ MCFG_DECO_KARNOVSPRITES_GFX_REGION(2)
MCFG_DECO_KARNOVSPRITES_GFXDECODE("gfxdecode")
- MCFG_DECO_KARNOVSPRITES_PALETTE("palette")
MCFG_VIDEO_START_OVERRIDE(karnov_state,karnov)
@@ -880,9 +879,8 @@ static MACHINE_CONFIG_START( wndrplnt, karnov_state )
MCFG_PALETTE_INIT_OWNER(karnov_state, karnov)
MCFG_DEVICE_ADD("spritegen", DECO_KARNOVSPRITES, 0)
- deco_karnovsprites_device::set_gfx_region(*device, 2);
+ MCFG_DECO_KARNOVSPRITES_GFX_REGION(2)
MCFG_DECO_KARNOVSPRITES_GFXDECODE("gfxdecode")
- MCFG_DECO_KARNOVSPRITES_PALETTE("palette")
MCFG_VIDEO_START_OVERRIDE(karnov_state,wndrplnt)
diff --git a/src/mame/drivers/konamigx.cpp b/src/mame/drivers/konamigx.cpp
index f134febe790..6aeee176b81 100644
--- a/src/mame/drivers/konamigx.cpp
+++ b/src/mame/drivers/konamigx.cpp
@@ -1583,7 +1583,7 @@ static GFXDECODE_START( racinfrc )
GFXDECODE_END
/* type 3 & 4 games use a simple 8bpp decode for the 53936 */
-static GFXDECODE_START( type34 )
+static GFXDECODE_START( type3 )
GFXDECODE_ENTRY( "gfx3", 0, bglayout_8bpp, 0x1000, 8 )
GFXDECODE_END
@@ -1646,12 +1646,9 @@ static MACHINE_CONFIG_START( konamigx, konamigx_state )
MCFG_PALETTE_ENABLE_SHADOWS()
MCFG_PALETTE_ENABLE_HILIGHTS()
- MCFG_GFXDECODE_ADD("gfxdecode", "palette", empty)
-
MCFG_DEVICE_ADD("k056832", K056832, 0)
MCFG_K056832_CB(konamigx_state, type2_tile_callback)
- MCFG_K056832_CONFIG("gfx1", 0, K056832_BPP_5, 0, 0, "none")
- MCFG_K056832_GFXDECODE("gfxdecode")
+ MCFG_K056832_CONFIG("gfx1", K056832_BPP_5, 0, 0, "none")
MCFG_K056832_PALETTE("palette")
MCFG_K055555_ADD("k055555")
@@ -1663,9 +1660,8 @@ static MACHINE_CONFIG_START( konamigx, konamigx_state )
MCFG_DEVICE_ADD("k055673", K055673, 0)
MCFG_K055673_CB(konamigx_state, type2_sprite_callback)
- MCFG_K055673_CONFIG("gfx2", 0, K055673_LAYOUT_GX, -26, -23)
+ MCFG_K055673_CONFIG("gfx2", K055673_LAYOUT_GX, -26, -23)
MCFG_K055673_SET_SCREEN("screen")
- MCFG_K055673_GFXDECODE("gfxdecode")
MCFG_K055673_PALETTE("palette")
MCFG_VIDEO_START_OVERRIDE(konamigx_state, konamigx_5bpp)
@@ -1698,12 +1694,12 @@ MACHINE_CONFIG_END
static MACHINE_CONFIG_DERIVED( konamigx_bios, konamigx )
MCFG_DEVICE_MODIFY("k056832")
- MCFG_K056832_CONFIG("gfx1", 0, K056832_BPP_4, 0, 0, "k055555")
+ MCFG_K056832_CONFIG("gfx1", K056832_BPP_4, 0, 0, "k055555")
MACHINE_CONFIG_END
static MACHINE_CONFIG_DERIVED( gokuparo, konamigx )
MCFG_DEVICE_MODIFY("k055673")
- MCFG_K055673_CONFIG("gfx2", 0, K055673_LAYOUT_GX, -46, -23)
+ MCFG_K055673_CONFIG("gfx2", K055673_LAYOUT_GX, -46, -23)
MACHINE_CONFIG_END
static MACHINE_CONFIG_DERIVED( sexyparo, konamigx )
@@ -1711,12 +1707,12 @@ static MACHINE_CONFIG_DERIVED( sexyparo, konamigx )
MCFG_K056832_CB(konamigx_state, alpha_tile_callback)
MCFG_DEVICE_MODIFY("k055673")
- MCFG_K055673_CONFIG("gfx2", 0, K055673_LAYOUT_GX, -42, -23)
+ MCFG_K055673_CONFIG("gfx2", K055673_LAYOUT_GX, -42, -23)
MACHINE_CONFIG_END
static MACHINE_CONFIG_DERIVED( tbyahhoo, konamigx )
MCFG_DEVICE_MODIFY("k056832")
- MCFG_K056832_CONFIG("gfx1", 0, K056832_BPP_5, 0, 0, "k055555")
+ MCFG_K056832_CONFIG("gfx1", K056832_BPP_5, 0, 0, "k055555")
MACHINE_CONFIG_END
static MACHINE_CONFIG_DERIVED( dragoonj, konamigx )
@@ -1727,11 +1723,11 @@ static MACHINE_CONFIG_DERIVED( dragoonj, konamigx )
MCFG_K053252_OFFSETS(24+16, 16)
MCFG_DEVICE_MODIFY("k056832")
- MCFG_K056832_CONFIG("gfx1", 0, K056832_BPP_5, 1, 0, "none")
+ MCFG_K056832_CONFIG("gfx1", K056832_BPP_5, 1, 0, "none")
MCFG_DEVICE_MODIFY("k055673")
MCFG_K055673_CB(konamigx_state, dragoonj_sprite_callback)
- MCFG_K055673_CONFIG("gfx2", 0, K055673_LAYOUT_RNG, -53, -23)
+ MCFG_K055673_CONFIG("gfx2", K055673_LAYOUT_RNG, -53, -23)
MACHINE_CONFIG_END
static MACHINE_CONFIG_DERIVED( le2, konamigx )
@@ -1739,41 +1735,42 @@ static MACHINE_CONFIG_DERIVED( le2, konamigx )
MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", konamigx_state, konamigx_type2_scanline, "screen", 0, 1)
MCFG_DEVICE_MODIFY("k056832")
- MCFG_K056832_CONFIG("gfx1", 0, K056832_BPP_8, 1, 0, "none")
+ MCFG_K056832_CONFIG("gfx1", K056832_BPP_8, 1, 0, "none")
MCFG_DEVICE_MODIFY("k055673")
MCFG_K055673_CB(konamigx_state, le2_sprite_callback)
- MCFG_K055673_CONFIG("gfx2", 0, K055673_LAYOUT_LE2, -46, -23)
+ MCFG_K055673_CONFIG("gfx2", K055673_LAYOUT_LE2, -46, -23)
MACHINE_CONFIG_END
static MACHINE_CONFIG_DERIVED( konamigx_6bpp, konamigx )
MCFG_VIDEO_START_OVERRIDE(konamigx_state, konamigx_6bpp)
MCFG_DEVICE_MODIFY("k056832")
- MCFG_K056832_CONFIG("gfx1", 0, K056832_BPP_6, 0, 0, "none")
+ MCFG_K056832_CONFIG("gfx1", K056832_BPP_6, 0, 0, "none")
MCFG_DEVICE_MODIFY("k055673")
- MCFG_K055673_CONFIG("gfx2", 0, K055673_LAYOUT_GX, -46, -23)
+ MCFG_K055673_CONFIG("gfx2", K055673_LAYOUT_GX, -46, -23)
MACHINE_CONFIG_END
static MACHINE_CONFIG_DERIVED( salmndr2, konamigx )
MCFG_DEVICE_MODIFY("k056832")
- MCFG_K056832_CONFIG("gfx1", 0, K056832_BPP_6, 1, 0, "none")
+ MCFG_K056832_CONFIG("gfx1", K056832_BPP_6, 1, 0, "none")
MCFG_DEVICE_MODIFY("k055673")
MCFG_K055673_CB(konamigx_state, salmndr2_sprite_callback)
- MCFG_K055673_CONFIG("gfx2", 0, K055673_LAYOUT_GX6, -48, -23)
+ MCFG_K055673_CONFIG("gfx2", K055673_LAYOUT_GX6, -48, -23)
MACHINE_CONFIG_END
static MACHINE_CONFIG_DERIVED( opengolf, konamigx )
MCFG_SCREEN_MODIFY("screen")
MCFG_SCREEN_RAW_PARAMS(8000000, 384+24+64+40, 0, 383, 224+16+8+16, 0, 223)
MCFG_SCREEN_VISIBLE_AREA(40, 40+384-1, 16, 16+224-1)
- MCFG_GFXDECODE_MODIFY("gfxdecode", opengolf)
+
+ MCFG_GFXDECODE_ADD("gfxdecode", "palette", opengolf)
MCFG_VIDEO_START_OVERRIDE(konamigx_state, opengolf)
MCFG_DEVICE_MODIFY("k055673")
- MCFG_K055673_CONFIG("gfx2", 0, K055673_LAYOUT_GX6, -53, -23)
+ MCFG_K055673_CONFIG("gfx2", K055673_LAYOUT_GX6, -53, -23)
MCFG_CPU_MODIFY("maincpu")
MCFG_CPU_PROGRAM_MAP(gx_type1_map)
@@ -1786,17 +1783,18 @@ static MACHINE_CONFIG_DERIVED( racinfrc, konamigx )
MCFG_SCREEN_MODIFY("screen")
//MCFG_SCREEN_RAW_PARAMS(6000000, 384+24+64+40, 0, 383, 224+16+8+16, 0, 223)
//MCFG_SCREEN_VISIBLE_AREA(32, 32+384-1, 16, 16+224-1)
- MCFG_GFXDECODE_MODIFY("gfxdecode", racinfrc)
+
+ MCFG_GFXDECODE_ADD("gfxdecode", "palette", racinfrc)
MCFG_VIDEO_START_OVERRIDE(konamigx_state, racinfrc)
MCFG_DEVICE_MODIFY("k053252")
MCFG_K053252_OFFSETS(24-8+16, 0)
MCFG_DEVICE_MODIFY("k056832")
- MCFG_K056832_CONFIG("gfx1", 0, K056832_BPP_6, 0, 0, "none")
+ MCFG_K056832_CONFIG("gfx1", K056832_BPP_6, 0, 0, "none")
MCFG_DEVICE_MODIFY("k055673")
- MCFG_K055673_CONFIG("gfx2", 0, K055673_LAYOUT_GX, -53, -23)
+ MCFG_K055673_CONFIG("gfx2", K055673_LAYOUT_GX, -53, -23)
MCFG_CPU_MODIFY("maincpu")
MCFG_CPU_PROGRAM_MAP(gx_type1_map)
@@ -1813,6 +1811,7 @@ static MACHINE_CONFIG_DERIVED( gxtype3, konamigx )
MCFG_DEFAULT_LAYOUT(layout_dualhsxs)
+ MCFG_GFXDECODE_ADD("gfxdecode", "palette", type3)
MCFG_VIDEO_START_OVERRIDE(konamigx_state, konamigx_type3)
MCFG_DEVICE_MODIFY("k053252")
@@ -1820,10 +1819,10 @@ static MACHINE_CONFIG_DERIVED( gxtype3, konamigx )
MCFG_K053252_SET_SLAVE_SCREEN("screen2")
MCFG_DEVICE_MODIFY("k056832")
- MCFG_K056832_CONFIG("gfx1", 0, K056832_BPP_6, 0, 2, "none")
+ MCFG_K056832_CONFIG("gfx1", K056832_BPP_6, 0, 2, "none")
MCFG_DEVICE_MODIFY("k055673")
- MCFG_K055673_CONFIG("gfx2", 0, K055673_LAYOUT_GX6, -132, -23)
+ MCFG_K055673_CONFIG("gfx2", K055673_LAYOUT_GX6, -132, -23)
MCFG_DEVICE_REMOVE("palette")
MCFG_PALETTE_ADD("palette", 16384)
@@ -1842,8 +1841,6 @@ static MACHINE_CONFIG_DERIVED( gxtype3, konamigx )
MCFG_SCREEN_SIZE(1024, 1024)
MCFG_SCREEN_VISIBLE_AREA(0, 576-1, 16, 32*8-1-16)
MCFG_SCREEN_UPDATE_DRIVER(konamigx_state, screen_update_konamigx_right)
-
- MCFG_GFXDECODE_MODIFY("gfxdecode", type34)
MACHINE_CONFIG_END
static MACHINE_CONFIG_DERIVED( gxtype4, konamigx )
@@ -1872,7 +1869,7 @@ static MACHINE_CONFIG_DERIVED( gxtype4, konamigx )
MCFG_PALETTE_ENABLE_SHADOWS()
MCFG_PALETTE_ENABLE_HILIGHTS()
- MCFG_GFXDECODE_MODIFY("gfxdecode", type4)
+ MCFG_GFXDECODE_ADD("gfxdecode", "palette", type4)
MCFG_VIDEO_START_OVERRIDE(konamigx_state, konamigx_type4)
MCFG_DEVICE_MODIFY("k053252")
@@ -1881,10 +1878,10 @@ static MACHINE_CONFIG_DERIVED( gxtype4, konamigx )
MCFG_DEVICE_MODIFY("k056832")
- MCFG_K056832_CONFIG("gfx1", 0, K056832_BPP_8, 0, 0, "none")
+ MCFG_K056832_CONFIG("gfx1", K056832_BPP_8, 0, 0, "none")
MCFG_DEVICE_MODIFY("k055673")
- MCFG_K055673_CONFIG("gfx2", 0, K055673_LAYOUT_GX6, -79, -24) // -23 looks better in intro
+ MCFG_K055673_CONFIG("gfx2", K055673_LAYOUT_GX6, -79, -24) // -23 looks better in intro
MACHINE_CONFIG_END
static MACHINE_CONFIG_DERIVED( gxtype4_vsn, gxtype4 )
@@ -1905,17 +1902,17 @@ static MACHINE_CONFIG_DERIVED( gxtype4_vsn, gxtype4 )
MCFG_VIDEO_START_OVERRIDE(konamigx_state, konamigx_type4_vsn)
MCFG_DEVICE_MODIFY("k056832")
- MCFG_K056832_CONFIG("gfx1", 0, K056832_BPP_8, 0, 2, "none") // set djmain_hack to 2 to kill layer association or half the tilemaps vanish on screen 0
+ MCFG_K056832_CONFIG("gfx1", K056832_BPP_8, 0, 2, "none") // set djmain_hack to 2 to kill layer association or half the tilemaps vanish on screen 0
MCFG_DEVICE_MODIFY("k055673")
- MCFG_K055673_CONFIG("gfx2", 0, K055673_LAYOUT_GX6, -132, -23)
+ MCFG_K055673_CONFIG("gfx2", K055673_LAYOUT_GX6, -132, -23)
MACHINE_CONFIG_END
static MACHINE_CONFIG_DERIVED( gxtype4sd2, gxtype4 )
MCFG_VIDEO_START_OVERRIDE(konamigx_state, konamigx_type4_sd2)
MCFG_DEVICE_MODIFY("k055673")
- MCFG_K055673_CONFIG("gfx2", 0, K055673_LAYOUT_GX6, -81, -23)
+ MCFG_K055673_CONFIG("gfx2", K055673_LAYOUT_GX6, -81, -23)
MACHINE_CONFIG_END
static MACHINE_CONFIG_DERIVED( winspike, konamigx )
@@ -1927,10 +1924,10 @@ static MACHINE_CONFIG_DERIVED( winspike, konamigx )
MCFG_DEVICE_MODIFY("k056832")
MCFG_K056832_CB(konamigx_state, alpha_tile_callback)
- MCFG_K056832_CONFIG("gfx1", 0, K056832_BPP_8, 0, 2, "none")
+ MCFG_K056832_CONFIG("gfx1", K056832_BPP_8, 0, 2, "none")
MCFG_DEVICE_MODIFY("k055673")
- MCFG_K055673_CONFIG("gfx2", 0, K055673_LAYOUT_LE2, -53, -23)
+ MCFG_K055673_CONFIG("gfx2", K055673_LAYOUT_LE2, -53, -23)
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/lastbank.cpp b/src/mame/drivers/lastbank.cpp
index 75bafbb6d6c..14c2cb772a6 100644
--- a/src/mame/drivers/lastbank.cpp
+++ b/src/mame/drivers/lastbank.cpp
@@ -483,7 +483,6 @@ static MACHINE_CONFIG_START( lastbank, lastbank_state )
MCFG_DEVICE_ADD("tc0091lvc", TC0091LVC, 0)
MCFG_TC0091LVC_GFXDECODE("gfxdecode")
- MCFG_TC0091LVC_PALETTE("palette")
// MCFG_VIDEO_START_OVERRIDE(lastbank_state,lastbank)
diff --git a/src/mame/drivers/lemmings.cpp b/src/mame/drivers/lemmings.cpp
index 5af69bba418..0c427a4c14f 100644
--- a/src/mame/drivers/lemmings.cpp
+++ b/src/mame/drivers/lemmings.cpp
@@ -260,12 +260,10 @@ static MACHINE_CONFIG_START( lemmings, lemmings_state )
MCFG_DEVICE_ADD("spritegen", DECO_SPRITE, 0)
MCFG_DECO_SPRITE_GFX_REGION(1)
MCFG_DECO_SPRITE_GFXDECODE("gfxdecode")
- MCFG_DECO_SPRITE_PALETTE("palette")
MCFG_DEVICE_ADD("spritegen2", DECO_SPRITE, 0)
MCFG_DECO_SPRITE_GFX_REGION(0)
MCFG_DECO_SPRITE_GFXDECODE("gfxdecode")
- MCFG_DECO_SPRITE_PALETTE("palette")
MCFG_DECO146_ADD("ioprot")
MCFG_DECO146_SET_USE_MAGIC_ADDRESS_XOR
diff --git a/src/mame/drivers/lethal.cpp b/src/mame/drivers/lethal.cpp
index fb6ce38d331..bd834f9fd94 100644
--- a/src/mame/drivers/lethal.cpp
+++ b/src/mame/drivers/lethal.cpp
@@ -509,8 +509,6 @@ static MACHINE_CONFIG_START( lethalen, lethal_state )
MCFG_EEPROM_SERIAL_ER5911_8BIT_ADD("eeprom")
- MCFG_GFXDECODE_ADD("gfxdecode", "palette", empty)
-
/* video hardware */
MCFG_SCREEN_ADD("screen", RASTER)
MCFG_SCREEN_REFRESH_RATE(59.62) /* verified on pcb */
@@ -526,8 +524,7 @@ static MACHINE_CONFIG_START( lethalen, lethal_state )
MCFG_DEVICE_ADD("k056832", K056832, 0)
MCFG_K056832_CB(lethal_state, tile_callback)
- MCFG_K056832_CONFIG("gfx1", 0, K056832_BPP_8LE, 1, 0, "none")
- MCFG_K056832_GFXDECODE("gfxdecode")
+ MCFG_K056832_CONFIG("gfx1", K056832_BPP_8LE, 1, 0, "none")
MCFG_K056832_PALETTE("palette")
MCFG_DEVICE_ADD("k053244", K053244, 0)
diff --git a/src/mame/drivers/madmotor.cpp b/src/mame/drivers/madmotor.cpp
index 34d50a6e22f..dd3e60bafff 100644
--- a/src/mame/drivers/madmotor.cpp
+++ b/src/mame/drivers/madmotor.cpp
@@ -255,19 +255,18 @@ static MACHINE_CONFIG_START( madmotor, madmotor_state )
MCFG_PALETTE_FORMAT(xxxxBBBBGGGGRRRR)
MCFG_DEVICE_ADD("tilegen1", DECO_BAC06, 0)
- deco_bac06_device::set_gfx_region_wide(*device,0,0,0);
+ MCFG_DECO_BAC06_GFX_REGION_WIDE(0, 0, 0)
MCFG_DECO_BAC06_GFXDECODE("gfxdecode")
MCFG_DEVICE_ADD("tilegen2", DECO_BAC06, 0)
- deco_bac06_device::set_gfx_region_wide(*device,0,1,0);
+ MCFG_DECO_BAC06_GFX_REGION_WIDE(0, 1, 0)
MCFG_DECO_BAC06_GFXDECODE("gfxdecode")
MCFG_DEVICE_ADD("tilegen3", DECO_BAC06, 0)
- deco_bac06_device::set_gfx_region_wide(*device,0,2,1);
+ MCFG_DECO_BAC06_GFX_REGION_WIDE(0, 2, 1)
MCFG_DECO_BAC06_GFXDECODE("gfxdecode")
MCFG_DEVICE_ADD("spritegen", DECO_MXC06, 0)
- deco_mxc06_device::set_gfx_region(*device, 3);
+ MCFG_DECO_MXC06_GFX_REGION(3)
MCFG_DECO_MXC06_GFXDECODE("gfxdecode")
- MCFG_DECO_MXC06_PALETTE("palette")
diff --git a/src/mame/drivers/mirage.cpp b/src/mame/drivers/mirage.cpp
index 29b275a7965..88a2ae21c37 100644
--- a/src/mame/drivers/mirage.cpp
+++ b/src/mame/drivers/mirage.cpp
@@ -342,12 +342,10 @@ static MACHINE_CONFIG_START( mirage, miragemi_state )
MCFG_DECO16IC_PF12_8X8_BANK(0)
MCFG_DECO16IC_PF12_16X16_BANK(1)
MCFG_DECO16IC_GFXDECODE("gfxdecode")
- MCFG_DECO16IC_PALETTE("palette")
MCFG_DEVICE_ADD("spritegen", DECO_SPRITE, 0)
MCFG_DECO_SPRITE_GFX_REGION(2)
MCFG_DECO_SPRITE_GFXDECODE("gfxdecode")
- MCFG_DECO_SPRITE_PALETTE("palette")
/* sound hardware */
MCFG_SPEAKER_STANDARD_MONO("mono")
diff --git a/src/mame/drivers/model1.cpp b/src/mame/drivers/model1.cpp
index 9fd1950cc0d..4e20dbfeb11 100644
--- a/src/mame/drivers/model1.cpp
+++ b/src/mame/drivers/model1.cpp
@@ -1534,10 +1534,7 @@ static MACHINE_CONFIG_START( model1, model1_state )
MCFG_MACHINE_RESET_OVERRIDE(model1_state,model1)
MCFG_NVRAM_ADD_0FILL("nvram")
- MCFG_GFXDECODE_ADD("gfxdecode", "palette", empty)
-
MCFG_S24TILE_DEVICE_ADD("tile", 0x3fff)
- MCFG_S24TILE_DEVICE_GFXDECODE("gfxdecode")
MCFG_S24TILE_DEVICE_PALETTE("palette")
MCFG_SCREEN_ADD("screen", RASTER)
@@ -1581,10 +1578,7 @@ static MACHINE_CONFIG_START( model1_vr, model1_state )
MCFG_MACHINE_RESET_OVERRIDE(model1_state,model1_vr)
MCFG_NVRAM_ADD_0FILL("nvram")
- MCFG_GFXDECODE_ADD("gfxdecode", "palette", empty)
-
MCFG_S24TILE_DEVICE_ADD("tile", 0x3fff)
- MCFG_S24TILE_DEVICE_GFXDECODE("gfxdecode")
MCFG_S24TILE_DEVICE_PALETTE("palette")
MCFG_SCREEN_ADD("screen", RASTER)
diff --git a/src/mame/drivers/model2.cpp b/src/mame/drivers/model2.cpp
index ac2cdaa2b94..0a12518fe0f 100644
--- a/src/mame/drivers/model2.cpp
+++ b/src/mame/drivers/model2.cpp
@@ -2405,10 +2405,7 @@ static MACHINE_CONFIG_START( model2o, model2_state )
MCFG_TIMER_DRIVER_ADD("timer3", model2_state, model2_timer_cb)
MCFG_TIMER_PTR((FPTR)3)
- MCFG_GFXDECODE_ADD("gfxdecode", "palette", empty)
-
MCFG_S24TILE_DEVICE_ADD("tile", 0x3fff)
- MCFG_S24TILE_DEVICE_GFXDECODE("gfxdecode")
MCFG_S24TILE_DEVICE_PALETTE("palette")
MCFG_SCREEN_ADD("screen", RASTER)
@@ -2454,9 +2451,7 @@ static MACHINE_CONFIG_START( model2a, model2_state )
MCFG_TIMER_DRIVER_ADD("timer3", model2_state, model2_timer_cb)
MCFG_TIMER_PTR((FPTR)3)
- MCFG_GFXDECODE_ADD("gfxdecode", "palette", empty)
MCFG_S24TILE_DEVICE_ADD("tile", 0x3fff)
- MCFG_S24TILE_DEVICE_GFXDECODE("gfxdecode")
MCFG_S24TILE_DEVICE_PALETTE("palette")
MCFG_SCREEN_ADD("screen", RASTER)
@@ -2571,9 +2566,7 @@ static MACHINE_CONFIG_START( model2b, model2_state )
MCFG_TIMER_DRIVER_ADD("timer3", model2_state, model2_timer_cb)
MCFG_TIMER_PTR((FPTR)3)
- MCFG_GFXDECODE_ADD("gfxdecode", "palette", empty)
MCFG_S24TILE_DEVICE_ADD("tile", 0x3fff)
- MCFG_S24TILE_DEVICE_GFXDECODE("gfxdecode")
MCFG_S24TILE_DEVICE_PALETTE("palette")
MCFG_SCREEN_ADD("screen", RASTER)
@@ -2636,9 +2629,7 @@ static MACHINE_CONFIG_START( model2c, model2_state )
MCFG_TIMER_DRIVER_ADD("timer3", model2_state, model2_timer_cb)
MCFG_TIMER_PTR((FPTR)3)
- MCFG_GFXDECODE_ADD("gfxdecode", "palette", empty)
MCFG_S24TILE_DEVICE_ADD("tile", 0x3fff)
- MCFG_S24TILE_DEVICE_GFXDECODE("gfxdecode")
MCFG_S24TILE_DEVICE_PALETTE("palette")
MCFG_SCREEN_ADD("screen", RASTER)
diff --git a/src/mame/drivers/moo.cpp b/src/mame/drivers/moo.cpp
index 73bcdaab223..da3d3960e43 100644
--- a/src/mame/drivers/moo.cpp
+++ b/src/mame/drivers/moo.cpp
@@ -550,18 +550,14 @@ static MACHINE_CONFIG_START( moo, moo_state )
MCFG_VIDEO_START_OVERRIDE(moo_state,moo)
- MCFG_GFXDECODE_ADD("gfxdecode", "palette", empty)
-
MCFG_DEVICE_ADD("k053246", K053246, 0)
MCFG_K053246_CB(moo_state, sprite_callback)
- MCFG_K053246_CONFIG("gfx2", 1, NORMAL_PLANE_ORDER, -48+1, 23)
- MCFG_K053246_GFXDECODE("gfxdecode")
+ MCFG_K053246_CONFIG("gfx2", NORMAL_PLANE_ORDER, -48+1, 23)
MCFG_K053246_PALETTE("palette")
MCFG_DEVICE_ADD("k056832", K056832, 0)
MCFG_K056832_CB(moo_state, tile_callback)
- MCFG_K056832_CONFIG("gfx1", 0, K056832_BPP_4, 1, 0, "none")
- MCFG_K056832_GFXDECODE("gfxdecode")
+ MCFG_K056832_CONFIG("gfx1", K056832_BPP_4, 1, 0, "none")
MCFG_K056832_PALETTE("palette")
MCFG_K053251_ADD("k053251")
@@ -608,18 +604,14 @@ static MACHINE_CONFIG_START( moobl, moo_state )
MCFG_VIDEO_START_OVERRIDE(moo_state,moo)
- MCFG_GFXDECODE_ADD("gfxdecode", "palette", empty)
-
MCFG_DEVICE_ADD("k053246", K053246, 0)
MCFG_K053246_CB(moo_state, sprite_callback)
- MCFG_K053246_CONFIG("gfx2", 1, NORMAL_PLANE_ORDER, -48+1, 23)
- MCFG_K053246_GFXDECODE("gfxdecode")
+ MCFG_K053246_CONFIG("gfx2", NORMAL_PLANE_ORDER, -48+1, 23)
MCFG_K053246_PALETTE("palette")
MCFG_DEVICE_ADD("k056832", K056832, 0)
MCFG_K056832_CB(moo_state, tile_callback)
- MCFG_K056832_CONFIG("gfx1", 0, K056832_BPP_4, 1, 0, "none")
- MCFG_K056832_GFXDECODE("gfxdecode")
+ MCFG_K056832_CONFIG("gfx1", K056832_BPP_4, 1, 0, "none")
MCFG_K056832_PALETTE("palette")
MCFG_K053251_ADD("k053251")
@@ -642,7 +634,7 @@ static MACHINE_CONFIG_DERIVED( bucky, moo )
MCFG_K054000_ADD("k054000")
MCFG_DEVICE_MODIFY("k053246")
- MCFG_K053246_CONFIG("gfx2", 1, NORMAL_PLANE_ORDER, -48, 23)
+ MCFG_K053246_CONFIG("gfx2", NORMAL_PLANE_ORDER, -48, 23)
/* video hardware */
MCFG_PALETTE_MODIFY("palette")
diff --git a/src/mame/drivers/mystwarr.cpp b/src/mame/drivers/mystwarr.cpp
index 8e8632c9e1b..1a198e42e23 100644
--- a/src/mame/drivers/mystwarr.cpp
+++ b/src/mame/drivers/mystwarr.cpp
@@ -953,20 +953,16 @@ static MACHINE_CONFIG_START( mystwarr, mystwarr_state )
MCFG_PALETTE_ENABLE_SHADOWS()
MCFG_PALETTE_ENABLE_HILIGHTS()
- MCFG_GFXDECODE_ADD("gfxdecode", "palette", empty)
-
MCFG_DEVICE_ADD("k056832", K056832, 0)
MCFG_K056832_CB(mystwarr_state, mystwarr_tile_callback)
- MCFG_K056832_CONFIG("gfx1", 0, K056832_BPP_5, 0, 0, "none")
- MCFG_K056832_GFXDECODE("gfxdecode")
+ MCFG_K056832_CONFIG("gfx1", K056832_BPP_5, 0, 0, "none")
MCFG_K056832_PALETTE("palette")
MCFG_K055555_ADD("k055555")
MCFG_DEVICE_ADD("k055673", K055673, 0)
MCFG_K055673_CB(mystwarr_state, mystwarr_sprite_callback)
- MCFG_K055673_CONFIG("gfx2", 0, K055673_LAYOUT_GX, -48, -24)
- MCFG_K055673_GFXDECODE("gfxdecode")
+ MCFG_K055673_CONFIG("gfx2", K055673_LAYOUT_GX, -48, -24)
MCFG_K055673_PALETTE("palette")
MCFG_DEVICE_ADD("k054338", K054338, 0)
@@ -1018,7 +1014,7 @@ static MACHINE_CONFIG_DERIVED( viostorm, mystwarr )
MCFG_DEVICE_MODIFY("k055673")
MCFG_K055673_CB(mystwarr_state, metamrph_sprite_callback)
- MCFG_K055673_CONFIG("gfx2", 0, K055673_LAYOUT_RNG, -62, -23)
+ MCFG_K055673_CONFIG("gfx2", K055673_LAYOUT_RNG, -62, -23)
MACHINE_CONFIG_END
static MACHINE_CONFIG_DERIVED( metamrph, mystwarr )
@@ -1051,7 +1047,7 @@ static MACHINE_CONFIG_DERIVED( metamrph, mystwarr )
MCFG_DEVICE_MODIFY("k055673")
MCFG_K055673_CB(mystwarr_state, metamrph_sprite_callback)
- MCFG_K055673_CONFIG("gfx2", 0, K055673_LAYOUT_RNG, -51, -24)
+ MCFG_K055673_CONFIG("gfx2", K055673_LAYOUT_RNG, -51, -24)
MACHINE_CONFIG_END
static MACHINE_CONFIG_DERIVED( dadandrn, mystwarr )
@@ -1067,7 +1063,7 @@ static MACHINE_CONFIG_DERIVED( dadandrn, mystwarr )
MCFG_DEVICE_MODIFY("k053252")
MCFG_K053252_OFFSETS(24, 16+1)
- MCFG_GFXDECODE_MODIFY("gfxdecode", dadandrn)
+ MCFG_GFXDECODE_ADD("gfxdecode", "palette", dadandrn)
/* video hardware */
MCFG_VIDEO_START_OVERRIDE(mystwarr_state, dadandrn)
@@ -1084,7 +1080,7 @@ static MACHINE_CONFIG_DERIVED( dadandrn, mystwarr )
MCFG_DEVICE_MODIFY("k055673")
MCFG_K055673_CB(mystwarr_state, gaiapols_sprite_callback)
- MCFG_K055673_CONFIG("gfx2", 0, K055673_LAYOUT_GX, -42, -22)
+ MCFG_K055673_CONFIG("gfx2", K055673_LAYOUT_GX, -42, -22)
MACHINE_CONFIG_END
static MACHINE_CONFIG_DERIVED( gaiapols, mystwarr )
@@ -1102,7 +1098,7 @@ static MACHINE_CONFIG_DERIVED( gaiapols, mystwarr )
MCFG_K054000_ADD("k054000")
- MCFG_GFXDECODE_MODIFY("gfxdecode", gaiapols)
+ MCFG_GFXDECODE_ADD("gfxdecode", "palette", gaiapols)
/* video hardware */
MCFG_VIDEO_START_OVERRIDE(mystwarr_state, gaiapols)
@@ -1120,7 +1116,7 @@ static MACHINE_CONFIG_DERIVED( gaiapols, mystwarr )
MCFG_DEVICE_MODIFY("k055673")
MCFG_K055673_CB(mystwarr_state, gaiapols_sprite_callback)
- MCFG_K055673_CONFIG("gfx2", 0, K055673_LAYOUT_RNG, -61, -22) // stage2 brick walls
+ MCFG_K055673_CONFIG("gfx2", K055673_LAYOUT_RNG, -61, -22) // stage2 brick walls
MACHINE_CONFIG_END
static MACHINE_CONFIG_DERIVED( martchmp, mystwarr )
@@ -1155,7 +1151,7 @@ static MACHINE_CONFIG_DERIVED( martchmp, mystwarr )
MCFG_DEVICE_MODIFY("k055673")
MCFG_K055673_CB(mystwarr_state, martchmp_sprite_callback)
- MCFG_K055673_CONFIG("gfx2", 0, K055673_LAYOUT_GX, -58, -23)
+ MCFG_K055673_CONFIG("gfx2", K055673_LAYOUT_GX, -58, -23)
MACHINE_CONFIG_END
/**********************************************************************************/
diff --git a/src/mame/drivers/namcond1.cpp b/src/mame/drivers/namcond1.cpp
index 5e740e11d4a..c2de731e5bb 100644
--- a/src/mame/drivers/namcond1.cpp
+++ b/src/mame/drivers/namcond1.cpp
@@ -124,104 +124,6 @@ static INPUT_PORTS_START( namcond1 )
INPUT_PORTS_END
-/* text-layer characters */
-
-static const UINT32 pts_4bits_layout_xoffset[64] =
-{
- STEP8( 0*256, 4 ), STEP8( 1*256, 4 ), STEP8( 4*256, 4 ), STEP8( 5*256, 4 ),
- STEP8( 16*256, 4 ), STEP8( 17*256, 4 ), STEP8( 20*256, 4 ), STEP8( 21*256, 4 )
-};
-
-static const UINT32 pts_4bits_layout_yoffset[64] =
-{
- STEP8( 0*256, 8*4 ), STEP8( 2*256, 8*4 ), STEP8( 8*256, 8*4 ), STEP8( 10*256, 8*4 ),
- STEP8( 32*256, 8*4 ), STEP8( 34*256, 8*4 ), STEP8( 40*256, 8*4 ), STEP8( 42*256, 8*4 )
-};
-
-static const gfx_layout pts_8x8_4bits_layout =
-{
- 8,8, /* 8*8 pixels */
- RGN_FRAC(1,1), /* 65536 patterns */
- 4, /* 4 bits per pixel */
- { 0, 1, 2, 3 },
- EXTENDED_XOFFS,
- EXTENDED_YOFFS,
- 8*8*4,
- pts_4bits_layout_xoffset,
- pts_4bits_layout_yoffset
-};
-
-static const gfx_layout pts_16x16_4bits_layout =
-{
- 16,16, /* 16*16 pixels */
- RGN_FRAC(1,1), /* 16384 patterns */
- 4, /* 4 bits per pixel */
- { 0, 1, 2, 3 },
- EXTENDED_XOFFS,
- EXTENDED_YOFFS,
- 16*16*4,
- pts_4bits_layout_xoffset,
- pts_4bits_layout_yoffset
-};
-
-static const gfx_layout pts_32x32_4bits_layout =
-{
- 32,32, /* 32*32 pixels */
- RGN_FRAC(1,1), /* 4096 patterns */
- 4, /* 4 bits per pixel */
- { 0, 1, 2, 3 },
- EXTENDED_XOFFS,
- EXTENDED_YOFFS,
- 32*32*4,
- pts_4bits_layout_xoffset,
- pts_4bits_layout_yoffset
-};
-
-static const gfx_layout pts_64x64_4bits_layout =
-{
- 64,64, /* 32*32 pixels */
- RGN_FRAC(1,1), /* 1024 patterns */
- 4, /* 4 bits per pixel */
- { 0, 1, 2, 3 },
- EXTENDED_XOFFS,
- EXTENDED_YOFFS,
- 64*64*4,
- pts_4bits_layout_xoffset,
- pts_4bits_layout_yoffset
-};
-
-
-static const gfx_layout pts_8x8_8bits_layout =
-{
- 8,8, /* 8*8 pixels */
- RGN_FRAC(1,1), /* 32768 patterns */
- 8, /* 8 bits per pixel */
- { 0, 1, 2, 3, 4, 5, 6, 7 },
- { STEP8( 0*512, 8 ) },
- { STEP8( 0*512, 8*8 ) },
- 8*8*8
-};
-
-static const gfx_layout pts_16x16_8bits_layout =
-{
- 16,16, /* 16*16 pixels */
- RGN_FRAC(1,1), /* 8192 patterns */
- 8, /* 8 bits per pixel */
- { 0, 1, 2, 3, 4, 5, 6, 7 },
- { STEP8( 0*512, 8 ), STEP8( 1*512, 8 ) },
- { STEP8( 0*512, 8*8 ), STEP8( 2*512, 8*8 ) },
- 16*16*8
-};
-
-static GFXDECODE_START( namcond1 )
- GFXDECODE_ENTRY( "gfx1", 0x00000000, pts_8x8_4bits_layout, 0, 16 )
- GFXDECODE_ENTRY( "gfx1", 0x00000000, pts_16x16_4bits_layout, 0, 16 )
- GFXDECODE_ENTRY( "gfx1", 0x00000000, pts_32x32_4bits_layout, 0, 16 )
- GFXDECODE_ENTRY( "gfx1", 0x00000000, pts_64x64_4bits_layout, 0, 16 )
- GFXDECODE_ENTRY( "gfx1", 0x00000000, pts_8x8_8bits_layout, 0, 256 )
- GFXDECODE_ENTRY( "gfx1", 0x00000000, pts_16x16_8bits_layout, 0, 256 )
-GFXDECODE_END
-
READ16_MEMBER(namcond1_state::mcu_p7_read)
{
return 0xff;
@@ -301,7 +203,6 @@ static MACHINE_CONFIG_START( namcond1, namcond1_state )
MCFG_SCREEN_UPDATE_DEVICE("ygv608", ygv608_device, update_screen)
MCFG_SCREEN_PALETTE("palette")
- MCFG_GFXDECODE_ADD("gfxdecode", "palette", namcond1)
MCFG_PALETTE_ADD("palette", 256)
/* sound hardware */
@@ -316,7 +217,6 @@ static MACHINE_CONFIG_START( namcond1, namcond1_state )
MCFG_AT28C16_ADD( "at28c16", NULL )
MCFG_YGV608_ADD("ygv608")
- MCFG_YGV608_GFXDECODE("gfxdecode")
MCFG_YGV608_PALETTE("palette")
MACHINE_CONFIG_END
@@ -328,7 +228,7 @@ ROM_START( ncv1 )
ROM_REGION( 0x80000,"mcu", 0 ) /* sub CPU */
ROM_LOAD( "nc1sub.1c", 0x00000, 0x80000, CRC(48ea0de2) SHA1(33e57c8d084a960ccbda462d18e355de44ec7ad9) )
- ROM_REGION( 0x200000,"gfx1", 0 ) /* 2MB character generator */
+ ROM_REGION( 0x200000,"ygv608", 0 ) /* 2MB character generator */
ROM_LOAD( "nc1cg0.10c", 0x000000, 0x200000, CRC(355e7f29) SHA1(47d92c4e28c3610a620d3c9b3be558199477f6d8) )
ROM_REGION( 0x1000000, "c352", 0 ) // Samples
@@ -343,7 +243,7 @@ ROM_START( ncv1j )
ROM_REGION( 0x80000,"mcu", 0 ) /* sub CPU */
ROM_LOAD( "nc1sub.1c", 0x00000, 0x80000, CRC(48ea0de2) SHA1(33e57c8d084a960ccbda462d18e355de44ec7ad9) )
- ROM_REGION( 0x200000,"gfx1", 0 ) /* 2MB character generator */
+ ROM_REGION( 0x200000,"ygv608", 0 ) /* 2MB character generator */
ROM_LOAD( "nc1cg0.10c", 0x000000, 0x200000, CRC(355e7f29) SHA1(47d92c4e28c3610a620d3c9b3be558199477f6d8) )
ROM_REGION( 0x1000000, "c352", 0 ) // Samples
@@ -358,7 +258,7 @@ ROM_START( ncv1j2 )
ROM_REGION( 0x80000,"mcu", 0 ) /* sub CPU */
ROM_LOAD( "nc1sub.1c", 0x00000, 0x80000, CRC(48ea0de2) SHA1(33e57c8d084a960ccbda462d18e355de44ec7ad9) )
- ROM_REGION( 0x200000,"gfx1", 0 ) /* 2MB character generator */
+ ROM_REGION( 0x200000,"ygv608", 0 ) /* 2MB character generator */
ROM_LOAD( "nc1cg0.10c", 0x000000, 0x200000, CRC(355e7f29) SHA1(47d92c4e28c3610a620d3c9b3be558199477f6d8) )
ROM_REGION( 0x1000000, "c352", 0 ) // Samples
@@ -373,7 +273,7 @@ ROM_START( ncv2 )
ROM_REGION( 0x80000,"mcu", 0 ) /* sub CPU */
ROM_LOAD( "ncs1sub.1d", 0x00000, 0x80000, CRC(365cadbf) SHA1(7263220e1630239e3e88b828c00389d02628bd7d) )
- ROM_REGION( 0x400000,"gfx1", 0 ) /* 4MB character generator */
+ ROM_REGION( 0x400000,"ygv608", 0 ) /* 4MB character generator */
ROM_LOAD( "ncs1cg0.10e", 0x000000, 0x200000, CRC(fdd24dbe) SHA1(4dceaae3d853075f58a7408be879afc91d80292e) )
ROM_LOAD( "ncs1cg1.10e", 0x200000, 0x200000, CRC(007b19de) SHA1(d3c093543511ec1dd2f8be6db45f33820123cabc) )
@@ -389,7 +289,7 @@ ROM_START( ncv2j )
ROM_REGION( 0x80000,"mcu", 0 ) /* sub CPU */
ROM_LOAD("ncs1sub.1d", 0x00000, 0x80000, CRC(365cadbf) SHA1(7263220e1630239e3e88b828c00389d02628bd7d) )
- ROM_REGION( 0x400000,"gfx1", 0 ) /* 4MB character generator */
+ ROM_REGION( 0x400000,"ygv608", 0 ) /* 4MB character generator */
ROM_LOAD( "ncs1cg0.10e", 0x000000, 0x200000, CRC(fdd24dbe) SHA1(4dceaae3d853075f58a7408be879afc91d80292e) )
ROM_LOAD( "ncs1cg1.10e", 0x200000, 0x200000, CRC(007b19de) SHA1(d3c093543511ec1dd2f8be6db45f33820123cabc) )
diff --git a/src/mame/drivers/nmg5.cpp b/src/mame/drivers/nmg5.cpp
index 53b65663cf0..6a808ce11d4 100644
--- a/src/mame/drivers/nmg5.cpp
+++ b/src/mame/drivers/nmg5.cpp
@@ -999,7 +999,6 @@ static MACHINE_CONFIG_START( nmg5, nmg5_state )
MCFG_DECO_SPRITE_FLIPALLX(1)
MCFG_DECO_SPRITE_OFFSETS(0, 8)
MCFG_DECO_SPRITE_GFXDECODE("gfxdecode")
- MCFG_DECO_SPRITE_PALETTE("palette")
/* sound hardware */
diff --git a/src/mame/drivers/nwk-tr.cpp b/src/mame/drivers/nwk-tr.cpp
index a64c10fd96a..1b216b62468 100644
--- a/src/mame/drivers/nwk-tr.cpp
+++ b/src/mame/drivers/nwk-tr.cpp
@@ -802,16 +802,11 @@ static MACHINE_CONFIG_START( nwktr, nwktr_state )
MCFG_PALETTE_ADD("palette", 65536)
- MCFG_GFXDECODE_ADD("gfxdecode", "palette", empty)
-
MCFG_DEVICE_ADD("k001604", K001604, 0)
- MCFG_K001604_GFX_INDEX1(0)
- MCFG_K001604_GFX_INDEX2(1)
MCFG_K001604_LAYER_SIZE(0)
MCFG_K001604_ROZ_SIZE(1)
MCFG_K001604_TXT_OFFSET(0) // correct?
MCFG_K001604_ROZ_OFFSET(0) // correct?
- MCFG_K001604_GFXDECODE("gfxdecode")
MCFG_K001604_PALETTE("palette")
MCFG_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker")
@@ -832,13 +827,10 @@ static MACHINE_CONFIG_DERIVED( thrilld, nwktr )
MCFG_DEVICE_REMOVE("k001604")
MCFG_DEVICE_ADD("k001604", K001604, 0)
- MCFG_K001604_GFX_INDEX1(0)
- MCFG_K001604_GFX_INDEX2(1)
MCFG_K001604_LAYER_SIZE(1)
MCFG_K001604_ROZ_SIZE(1)
MCFG_K001604_TXT_OFFSET(0) // correct?
MCFG_K001604_ROZ_OFFSET(0) // correct?
- MCFG_K001604_GFXDECODE("gfxdecode")
MCFG_K001604_PALETTE("palette")
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/opwolf.cpp b/src/mame/drivers/opwolf.cpp
index 36837da295e..1c4afa007ac 100644
--- a/src/mame/drivers/opwolf.cpp
+++ b/src/mame/drivers/opwolf.cpp
@@ -793,7 +793,6 @@ static MACHINE_CONFIG_START( opwolf, opwolf_state )
MCFG_DEVICE_ADD("pc080sn", PC080SN, 0)
MCFG_PC080SN_GFX_REGION(1)
MCFG_PC080SN_GFXDECODE("gfxdecode")
- MCFG_PC080SN_PALETTE("palette")
MCFG_DEVICE_ADD("pc090oj", PC090OJ, 0)
MCFG_PC090OJ_GFXDECODE("gfxdecode")
@@ -868,7 +867,6 @@ static MACHINE_CONFIG_START( opwolfb, opwolf_state ) /* OSC clocks unknown for t
MCFG_DEVICE_ADD("pc080sn", PC080SN, 0)
MCFG_PC080SN_GFX_REGION(1)
MCFG_PC080SN_GFXDECODE("gfxdecode")
- MCFG_PC080SN_PALETTE("palette")
MCFG_DEVICE_ADD("pc090oj", PC090OJ, 0)
MCFG_PC090OJ_GFXDECODE("gfxdecode")
diff --git a/src/mame/drivers/overdriv.cpp b/src/mame/drivers/overdriv.cpp
index 5dd5191318b..c5b1f19898d 100644
--- a/src/mame/drivers/overdriv.cpp
+++ b/src/mame/drivers/overdriv.cpp
@@ -340,17 +340,13 @@ static MACHINE_CONFIG_START( overdriv, overdriv_state )
MCFG_SCREEN_UPDATE_DRIVER(overdriv_state, screen_update_overdriv)
MCFG_SCREEN_PALETTE("palette")
-// MCFG_GFXDECODE_ADD("gfxdecode", "palette", overdriv)
MCFG_PALETTE_ADD("palette", 2048)
MCFG_PALETTE_FORMAT(xBBBBBGGGGGRRRRR)
MCFG_PALETTE_ENABLE_SHADOWS()
- MCFG_GFXDECODE_ADD("gfxdecode", "palette", empty)
-
MCFG_DEVICE_ADD("k053246", K053246, 0)
MCFG_K053246_CB(overdriv_state, sprite_callback)
- MCFG_K053246_CONFIG("gfx1", 0, NORMAL_PLANE_ORDER, 77, 22)
- MCFG_K053246_GFXDECODE("gfxdecode")
+ MCFG_K053246_CONFIG("gfx1", NORMAL_PLANE_ORDER, 77, 22)
MCFG_K053246_PALETTE("palette")
MCFG_DEVICE_ADD("k051316_1", K051316, 0)
diff --git a/src/mame/drivers/pcktgal.cpp b/src/mame/drivers/pcktgal.cpp
index 3a34210d516..f2745cb74a4 100644
--- a/src/mame/drivers/pcktgal.cpp
+++ b/src/mame/drivers/pcktgal.cpp
@@ -244,7 +244,7 @@ static MACHINE_CONFIG_START( pcktgal, pcktgal_state )
MCFG_DEVICE_ADD("tilegen1", DECO_BAC06, 0)
- deco_bac06_device::set_gfx_region_wide(*device,0,0,0);
+ MCFG_DECO_BAC06_GFX_REGION_WIDE(0, 0, 0)
MCFG_DECO_BAC06_GFXDECODE("gfxdecode")
/* sound hardware */
diff --git a/src/mame/drivers/pipedrm.cpp b/src/mame/drivers/pipedrm.cpp
index 0151f62c79c..d73d18bd93c 100644
--- a/src/mame/drivers/pipedrm.cpp
+++ b/src/mame/drivers/pipedrm.cpp
@@ -662,7 +662,6 @@ static MACHINE_CONFIG_START( pipedrm, pipedrm_state )
MCFG_VSYSTEM_SPR2_SET_OFFSETS(-13, -6)
MCFG_VSYSTEM_SPR2_SET_PRITYPE(3)
MCFG_VSYSTEM_SPR2_GFXDECODE("gfxdecode")
- MCFG_VSYSTEM_SPR2_PALETTE("palette")
MCFG_VIDEO_START_OVERRIDE(pipedrm_state,pipedrm)
diff --git a/src/mame/drivers/pktgaldx.cpp b/src/mame/drivers/pktgaldx.cpp
index f1f55c249af..98355880a4b 100644
--- a/src/mame/drivers/pktgaldx.cpp
+++ b/src/mame/drivers/pktgaldx.cpp
@@ -359,12 +359,10 @@ static MACHINE_CONFIG_START( pktgaldx, pktgaldx_state )
MCFG_DECO16IC_PF12_8X8_BANK(0)
MCFG_DECO16IC_PF12_16X16_BANK(1)
MCFG_DECO16IC_GFXDECODE("gfxdecode")
- MCFG_DECO16IC_PALETTE("palette")
MCFG_DEVICE_ADD("spritegen", DECO_SPRITE, 0)
MCFG_DECO_SPRITE_GFX_REGION(2)
MCFG_DECO_SPRITE_GFXDECODE("gfxdecode")
- MCFG_DECO_SPRITE_PALETTE("palette")
MCFG_DECO104_ADD("ioprot104")
MCFG_DECO146_SET_INTERFACE_SCRAMBLE(8,9, 4,5,6,7 ,1,0,3,2) // hopefully this is correct, nothing else uses this arrangement!
diff --git a/src/mame/drivers/qdrmfgp.cpp b/src/mame/drivers/qdrmfgp.cpp
index 6e8a59867eb..28e8593117d 100644
--- a/src/mame/drivers/qdrmfgp.cpp
+++ b/src/mame/drivers/qdrmfgp.cpp
@@ -598,12 +598,9 @@ static MACHINE_CONFIG_START( qdrmfgp, qdrmfgp_state )
MCFG_VIDEO_START_OVERRIDE(qdrmfgp_state,qdrmfgp)
- MCFG_GFXDECODE_ADD("gfxdecode", "palette", empty)
-
MCFG_DEVICE_ADD("k056832", K056832, 0)
MCFG_K056832_CB(qdrmfgp_state, qdrmfgp_tile_callback)
- MCFG_K056832_CONFIG("gfx1", 0, K056832_BPP_4dj, 1, 0, "none")
- MCFG_K056832_GFXDECODE("gfxdecode")
+ MCFG_K056832_CONFIG("gfx1", K056832_BPP_4dj, 1, 0, "none")
MCFG_K056832_PALETTE("palette")
MCFG_DEVICE_ADD("k053252", K053252, XTAL_32MHz/4)
@@ -645,12 +642,9 @@ static MACHINE_CONFIG_START( qdrmfgp2, qdrmfgp_state )
MCFG_VIDEO_START_OVERRIDE(qdrmfgp_state,qdrmfgp2)
- MCFG_GFXDECODE_ADD("gfxdecode", "palette", empty)
-
MCFG_DEVICE_ADD("k056832", K056832, 0)
MCFG_K056832_CB(qdrmfgp_state, qdrmfgp2_tile_callback)
- MCFG_K056832_CONFIG("gfx1", 0, K056832_BPP_4dj, 1, 0, "none")
- MCFG_K056832_GFXDECODE("gfxdecode")
+ MCFG_K056832_CONFIG("gfx1", K056832_BPP_4dj, 1, 0, "none")
MCFG_K056832_PALETTE("palette")
MCFG_DEVICE_ADD("k053252", K053252, XTAL_32MHz/4)
diff --git a/src/mame/drivers/rastan.cpp b/src/mame/drivers/rastan.cpp
index fe3c3dfa6b1..8ee49dd6992 100644
--- a/src/mame/drivers/rastan.cpp
+++ b/src/mame/drivers/rastan.cpp
@@ -383,7 +383,6 @@ static MACHINE_CONFIG_START( rastan, rastan_state )
MCFG_DEVICE_ADD("pc080sn", PC080SN, 0)
MCFG_PC080SN_GFXDECODE("gfxdecode")
- MCFG_PC080SN_PALETTE("palette")
MCFG_DEVICE_ADD("pc090oj", PC090OJ, 0)
MCFG_PC090OJ_GFX_REGION(1)
diff --git a/src/mame/drivers/rbisland.cpp b/src/mame/drivers/rbisland.cpp
index 922e7f48dad..c71c201750d 100644
--- a/src/mame/drivers/rbisland.cpp
+++ b/src/mame/drivers/rbisland.cpp
@@ -654,7 +654,6 @@ static MACHINE_CONFIG_START( rbisland, rbisland_state )
MCFG_DEVICE_ADD("pc080sn", PC080SN, 0)
MCFG_PC080SN_GFX_REGION(1)
MCFG_PC080SN_GFXDECODE("gfxdecode")
- MCFG_PC080SN_PALETTE("palette")
MCFG_DEVICE_ADD("pc090oj", PC090OJ, 0)
MCFG_PC090OJ_GFXDECODE("gfxdecode")
@@ -708,7 +707,6 @@ static MACHINE_CONFIG_START( jumping, rbisland_state )
MCFG_PC080SN_GFX_REGION(1)
MCFG_PC080SN_YINVERT(1)
MCFG_PC080SN_GFXDECODE("gfxdecode")
- MCFG_PC080SN_PALETTE("palette")
/* sound hardware */
MCFG_SPEAKER_STANDARD_MONO("mono")
diff --git a/src/mame/drivers/rohga.cpp b/src/mame/drivers/rohga.cpp
index 4114bf30579..0379125810b 100644
--- a/src/mame/drivers/rohga.cpp
+++ b/src/mame/drivers/rohga.cpp
@@ -834,7 +834,6 @@ static MACHINE_CONFIG_START( rohga, rohga_state )
MCFG_DECO16IC_PF12_8X8_BANK(0)
MCFG_DECO16IC_PF12_16X16_BANK(1)
MCFG_DECO16IC_GFXDECODE("gfxdecode")
- MCFG_DECO16IC_PALETTE("palette")
MCFG_DEVICE_ADD("tilegen2", DECO16IC, 0)
MCFG_DECO16IC_SPLIT(0)
@@ -850,14 +849,12 @@ static MACHINE_CONFIG_START( rohga, rohga_state )
MCFG_DECO16IC_PF12_8X8_BANK(0)
MCFG_DECO16IC_PF12_16X16_BANK(2)
MCFG_DECO16IC_GFXDECODE("gfxdecode")
- MCFG_DECO16IC_PALETTE("palette")
MCFG_DEVICE_ADD("spritegen1", DECO_SPRITE, 0)
MCFG_DECO_SPRITE_PRIORITY_CB(rohga_state, rohga_pri_callback)
MCFG_DECO_SPRITE_COLOUR_CB(rohga_state, rohga_col_callback)
MCFG_DECO_SPRITE_GFX_REGION(3)
MCFG_DECO_SPRITE_GFXDECODE("gfxdecode")
- MCFG_DECO_SPRITE_PALETTE("palette")
MCFG_DECO104_ADD("ioprot104")
@@ -920,7 +917,6 @@ static MACHINE_CONFIG_START( wizdfire, rohga_state )
MCFG_DECO16IC_PF12_8X8_BANK(0)
MCFG_DECO16IC_PF12_16X16_BANK(1)
MCFG_DECO16IC_GFXDECODE("gfxdecode")
- MCFG_DECO16IC_PALETTE("palette")
MCFG_DEVICE_ADD("tilegen2", DECO16IC, 0)
MCFG_DECO16IC_SPLIT(0)
@@ -936,17 +932,14 @@ static MACHINE_CONFIG_START( wizdfire, rohga_state )
MCFG_DECO16IC_PF12_8X8_BANK(0)
MCFG_DECO16IC_PF12_16X16_BANK(2)
MCFG_DECO16IC_GFXDECODE("gfxdecode")
- MCFG_DECO16IC_PALETTE("palette")
MCFG_DEVICE_ADD("spritegen1", DECO_SPRITE, 0)
MCFG_DECO_SPRITE_GFX_REGION(3)
MCFG_DECO_SPRITE_GFXDECODE("gfxdecode")
- MCFG_DECO_SPRITE_PALETTE("palette")
MCFG_DEVICE_ADD("spritegen2", DECO_SPRITE, 0)
MCFG_DECO_SPRITE_GFX_REGION(4)
MCFG_DECO_SPRITE_GFXDECODE("gfxdecode")
- MCFG_DECO_SPRITE_PALETTE("palette")
MCFG_DECO104_ADD("ioprot104")
MCFG_DECO146_SET_INTERFACE_SCRAMBLE_REVERSE
@@ -1012,7 +1005,6 @@ static MACHINE_CONFIG_START( nitrobal, rohga_state )
MCFG_DECO16IC_PF12_8X8_BANK(0)
MCFG_DECO16IC_PF12_16X16_BANK(1)
MCFG_DECO16IC_GFXDECODE("gfxdecode")
- MCFG_DECO16IC_PALETTE("palette")
MCFG_DEVICE_ADD("tilegen2", DECO16IC, 0)
MCFG_DECO16IC_SPLIT(0)
@@ -1028,17 +1020,14 @@ static MACHINE_CONFIG_START( nitrobal, rohga_state )
MCFG_DECO16IC_PF12_8X8_BANK(0)
MCFG_DECO16IC_PF12_16X16_BANK(2)
MCFG_DECO16IC_GFXDECODE("gfxdecode")
- MCFG_DECO16IC_PALETTE("palette")
MCFG_DEVICE_ADD("spritegen1", DECO_SPRITE, 0)
MCFG_DECO_SPRITE_GFX_REGION(3)
MCFG_DECO_SPRITE_GFXDECODE("gfxdecode")
- MCFG_DECO_SPRITE_PALETTE("palette")
MCFG_DEVICE_ADD("spritegen2", DECO_SPRITE, 0)
MCFG_DECO_SPRITE_GFX_REGION(4)
MCFG_DECO_SPRITE_GFXDECODE("gfxdecode")
- MCFG_DECO_SPRITE_PALETTE("palette")
MCFG_VIDEO_START_OVERRIDE(rohga_state, wizdfire)
@@ -1106,7 +1095,6 @@ static MACHINE_CONFIG_START( schmeisr, rohga_state )
MCFG_DECO16IC_PF12_8X8_BANK(0)
MCFG_DECO16IC_PF12_16X16_BANK(1)
MCFG_DECO16IC_GFXDECODE("gfxdecode")
- MCFG_DECO16IC_PALETTE("palette")
MCFG_DEVICE_ADD("tilegen2", DECO16IC, 0)
MCFG_DECO16IC_SPLIT(0)
@@ -1122,14 +1110,12 @@ static MACHINE_CONFIG_START( schmeisr, rohga_state )
MCFG_DECO16IC_PF12_8X8_BANK(0)
MCFG_DECO16IC_PF12_16X16_BANK(2)
MCFG_DECO16IC_GFXDECODE("gfxdecode")
- MCFG_DECO16IC_PALETTE("palette")
MCFG_DEVICE_ADD("spritegen1", DECO_SPRITE, 0)
MCFG_DECO_SPRITE_PRIORITY_CB(rohga_state, rohga_pri_callback)
MCFG_DECO_SPRITE_COLOUR_CB(rohga_state, schmeisr_col_callback) // wire mods on pcb...
MCFG_DECO_SPRITE_GFX_REGION(3)
MCFG_DECO_SPRITE_GFXDECODE("gfxdecode")
- MCFG_DECO_SPRITE_PALETTE("palette")
MCFG_DECO104_ADD("ioprot104")
diff --git a/src/mame/drivers/rungun.cpp b/src/mame/drivers/rungun.cpp
index 38d526632e0..662cf5f8237 100644
--- a/src/mame/drivers/rungun.cpp
+++ b/src/mame/drivers/rungun.cpp
@@ -447,8 +447,7 @@ static MACHINE_CONFIG_START( rng, rungun_state )
MCFG_DEVICE_ADD("k055673", K055673, 0)
MCFG_K055673_CB(rungun_state, sprite_callback)
- MCFG_K055673_CONFIG("gfx2", 1, K055673_LAYOUT_RNG, -8, 15)
- MCFG_K055673_GFXDECODE("gfxdecode")
+ MCFG_K055673_CONFIG("gfx2", K055673_LAYOUT_RNG, -8, 15)
MCFG_K055673_PALETTE("palette")
MCFG_K055673_SET_SCREEN("screen")
diff --git a/src/mame/drivers/sandscrp.cpp b/src/mame/drivers/sandscrp.cpp
index 50937085c9b..f42ccc583b9 100644
--- a/src/mame/drivers/sandscrp.cpp
+++ b/src/mame/drivers/sandscrp.cpp
@@ -499,7 +499,6 @@ static MACHINE_CONFIG_START( sandscrp, sandscrp_state )
MCFG_DEVICE_ADD("pandora", KANEKO_PANDORA, 0)
MCFG_KANEKO_PANDORA_GFXDECODE("gfxdecode")
- MCFG_KANEKO_PANDORA_PALETTE("palette")
/* sound hardware */
MCFG_SPEAKER_STANDARD_MONO("mono")
diff --git a/src/mame/drivers/segas24.cpp b/src/mame/drivers/segas24.cpp
index 0d97e55ffb3..795df5cfdfd 100644
--- a/src/mame/drivers/segas24.cpp
+++ b/src/mame/drivers/segas24.cpp
@@ -1934,9 +1934,7 @@ static MACHINE_CONFIG_START( system24, segas24_state )
MCFG_TIMER_ADD_NONE("frc_timer")
MCFG_TIMER_DRIVER_ADD_PERIODIC("irq_frc", segas24_state, irq_frc_cb, attotime::from_hz(FRC_CLOCK_MODE1))
- MCFG_GFXDECODE_ADD("gfxdecode", "palette", empty)
MCFG_S24TILE_DEVICE_ADD("tile", 0xfff)
- MCFG_S24TILE_DEVICE_GFXDECODE("gfxdecode")
MCFG_S24TILE_DEVICE_PALETTE("palette")
MCFG_S24SPRITE_DEVICE_ADD("sprite")
MCFG_S24MIXER_DEVICE_ADD("mixer")
diff --git a/src/mame/drivers/seta.cpp b/src/mame/drivers/seta.cpp
index 962c048cc94..5374875f519 100644
--- a/src/mame/drivers/seta.cpp
+++ b/src/mame/drivers/seta.cpp
@@ -7701,7 +7701,6 @@ static MACHINE_CONFIG_START( tndrcade, seta_state )
MCFG_DEVICE_ADD("spritegen", SETA001_SPRITE, 0)
MCFG_SETA001_SPRITE_GFXDECODE("gfxdecode")
- MCFG_SETA001_SPRITE_PALETTE("palette")
MCFG_SETA001_SPRITE_GFXBANK_CB(seta_state, setac_gfxbank_callback)
/* video hardware */
@@ -7756,7 +7755,6 @@ static MACHINE_CONFIG_START( twineagl, seta_state )
MCFG_DEVICE_ADD("spritegen", SETA001_SPRITE, 0)
MCFG_SETA001_SPRITE_GFXDECODE("gfxdecode")
- MCFG_SETA001_SPRITE_PALETTE("palette")
MCFG_SETA001_SPRITE_GFXBANK_CB(seta_state, setac_gfxbank_callback)
/* video hardware */
@@ -7800,7 +7798,6 @@ static MACHINE_CONFIG_START( downtown, seta_state )
MCFG_DEVICE_ADD("spritegen", SETA001_SPRITE, 0)
MCFG_SETA001_SPRITE_GFXDECODE("gfxdecode")
- MCFG_SETA001_SPRITE_PALETTE("palette")
MCFG_SETA001_SPRITE_GFXBANK_CB(seta_state, setac_gfxbank_callback)
/* video hardware */
@@ -7861,7 +7858,6 @@ static MACHINE_CONFIG_START( usclssic, seta_state )
MCFG_DEVICE_ADD("spritegen", SETA001_SPRITE, 0)
MCFG_SETA001_SPRITE_GFXDECODE("gfxdecode")
- MCFG_SETA001_SPRITE_PALETTE("palette")
MCFG_SETA001_SPRITE_GFXBANK_CB(seta_state, setac_gfxbank_callback)
/* video hardware */
@@ -7915,7 +7911,6 @@ static MACHINE_CONFIG_START( calibr50, seta_state )
MCFG_DEVICE_ADD("spritegen", SETA001_SPRITE, 0)
MCFG_SETA001_SPRITE_GFXDECODE("gfxdecode")
- MCFG_SETA001_SPRITE_PALETTE("palette")
MCFG_SETA001_SPRITE_GFXBANK_CB(seta_state, setac_gfxbank_callback)
/* video hardware */
@@ -7959,7 +7954,6 @@ static MACHINE_CONFIG_START( metafox, seta_state )
MCFG_DEVICE_ADD("spritegen", SETA001_SPRITE, 0)
MCFG_SETA001_SPRITE_GFXDECODE("gfxdecode")
- MCFG_SETA001_SPRITE_PALETTE("palette")
MCFG_SETA001_SPRITE_GFXBANK_CB(seta_state, setac_gfxbank_callback)
/* video hardware */
@@ -7997,7 +7991,6 @@ static MACHINE_CONFIG_START( atehate, seta_state )
MCFG_DEVICE_ADD("spritegen", SETA001_SPRITE, 0)
MCFG_SETA001_SPRITE_GFXDECODE("gfxdecode")
- MCFG_SETA001_SPRITE_PALETTE("palette")
MCFG_SETA001_SPRITE_GFXBANK_CB(seta_state, setac_gfxbank_callback)
/* video hardware */
@@ -8041,7 +8034,6 @@ static MACHINE_CONFIG_START( blandia, seta_state )
MCFG_DEVICE_ADD("spritegen", SETA001_SPRITE, 0)
MCFG_SETA001_SPRITE_GFXDECODE("gfxdecode")
- MCFG_SETA001_SPRITE_PALETTE("palette")
MCFG_SETA001_SPRITE_GFXBANK_CB(seta_state, setac_gfxbank_callback)
/* video hardware */
@@ -8079,7 +8071,6 @@ static MACHINE_CONFIG_START( blandiap, seta_state )
MCFG_DEVICE_ADD("spritegen", SETA001_SPRITE, 0)
MCFG_SETA001_SPRITE_GFXDECODE("gfxdecode")
- MCFG_SETA001_SPRITE_PALETTE("palette")
MCFG_SETA001_SPRITE_GFXBANK_CB(seta_state, setac_gfxbank_callback)
/* video hardware */
@@ -8122,7 +8113,6 @@ static MACHINE_CONFIG_START( blockcar, seta_state )
MCFG_DEVICE_ADD("spritegen", SETA001_SPRITE, 0)
MCFG_SETA001_SPRITE_GFXDECODE("gfxdecode")
- MCFG_SETA001_SPRITE_PALETTE("palette")
MCFG_SETA001_SPRITE_GFXBANK_CB(seta_state, setac_gfxbank_callback)
/* video hardware */
@@ -8194,7 +8184,6 @@ static MACHINE_CONFIG_START( daioh, seta_state )
MCFG_DEVICE_ADD("spritegen", SETA001_SPRITE, 0)
MCFG_SETA001_SPRITE_GFXDECODE("gfxdecode")
- MCFG_SETA001_SPRITE_PALETTE("palette")
MCFG_SETA001_SPRITE_GFXBANK_CB(seta_state, setac_gfxbank_callback)
/* video hardware */
@@ -8232,7 +8221,6 @@ static MACHINE_CONFIG_START( daiohp, seta_state )
MCFG_DEVICE_ADD("spritegen", SETA001_SPRITE, 0)
MCFG_SETA001_SPRITE_GFXDECODE("gfxdecode")
- MCFG_SETA001_SPRITE_PALETTE("palette")
MCFG_SETA001_SPRITE_GFXBANK_CB(seta_state, setac_gfxbank_callback)
/* video hardware */
@@ -8275,7 +8263,6 @@ static MACHINE_CONFIG_START( drgnunit, seta_state )
MCFG_DEVICE_ADD("spritegen", SETA001_SPRITE, 0)
MCFG_SETA001_SPRITE_GFXDECODE("gfxdecode")
- MCFG_SETA001_SPRITE_PALETTE("palette")
MCFG_SETA001_SPRITE_GFXBANK_CB(seta_state, setac_gfxbank_callback)
/* video hardware */
@@ -8312,7 +8299,6 @@ static MACHINE_CONFIG_START( qzkklgy2, seta_state )
MCFG_DEVICE_ADD("spritegen", SETA001_SPRITE, 0)
MCFG_SETA001_SPRITE_GFXDECODE("gfxdecode")
- MCFG_SETA001_SPRITE_PALETTE("palette")
MCFG_SETA001_SPRITE_GFXBANK_CB(seta_state, setac_gfxbank_callback)
/* video hardware */
@@ -8363,7 +8349,6 @@ static MACHINE_CONFIG_START( setaroul, seta_state )
MCFG_DEVICE_ADD("spritegen", SETA001_SPRITE, 0)
MCFG_SETA001_SPRITE_GFXDECODE("gfxdecode")
- MCFG_SETA001_SPRITE_PALETTE("palette")
MCFG_SETA001_SPRITE_GFXBANK_CB(seta_state, setac_gfxbank_callback)
MCFG_NVRAM_ADD_RANDOM_FILL("nvram")
@@ -8407,7 +8392,6 @@ static MACHINE_CONFIG_START( eightfrc, seta_state )
MCFG_DEVICE_ADD("spritegen", SETA001_SPRITE, 0)
MCFG_SETA001_SPRITE_GFXDECODE("gfxdecode")
- MCFG_SETA001_SPRITE_PALETTE("palette")
MCFG_SETA001_SPRITE_GFXBANK_CB(seta_state, setac_gfxbank_callback)
/* video hardware */
@@ -8450,7 +8434,6 @@ static MACHINE_CONFIG_START( extdwnhl, seta_state )
MCFG_DEVICE_ADD("spritegen", SETA001_SPRITE, 0)
MCFG_SETA001_SPRITE_GFXDECODE("gfxdecode")
- MCFG_SETA001_SPRITE_PALETTE("palette")
MCFG_SETA001_SPRITE_GFXBANK_CB(seta_state, setac_gfxbank_callback)
/* video hardware */
@@ -8516,7 +8499,6 @@ static MACHINE_CONFIG_START( gundhara, seta_state )
MCFG_DEVICE_ADD("spritegen", SETA001_SPRITE, 0)
MCFG_SETA001_SPRITE_GFXDECODE("gfxdecode")
- MCFG_SETA001_SPRITE_PALETTE("palette")
MCFG_SETA001_SPRITE_GFXBANK_CB(seta_state, setac_gfxbank_callback)
/* video hardware */
@@ -8561,7 +8543,6 @@ static MACHINE_CONFIG_START( jjsquawk, seta_state )
MCFG_DEVICE_ADD("spritegen", SETA001_SPRITE, 0)
MCFG_SETA001_SPRITE_GFXDECODE("gfxdecode")
- MCFG_SETA001_SPRITE_PALETTE("palette")
MCFG_SETA001_SPRITE_GFXBANK_CB(seta_state, setac_gfxbank_callback)
/* video hardware */
@@ -8597,7 +8578,6 @@ static MACHINE_CONFIG_START( jjsquawb, seta_state )
MCFG_DEVICE_ADD("spritegen", SETA001_SPRITE, 0)
MCFG_SETA001_SPRITE_GFXDECODE("gfxdecode")
- MCFG_SETA001_SPRITE_PALETTE("palette")
MCFG_SETA001_SPRITE_GFXBANK_CB(seta_state, setac_gfxbank_callback)
/* video hardware */
@@ -8642,7 +8622,6 @@ static MACHINE_CONFIG_START( kamenrid, seta_state )
MCFG_DEVICE_ADD("spritegen", SETA001_SPRITE, 0)
MCFG_SETA001_SPRITE_GFXDECODE("gfxdecode")
- MCFG_SETA001_SPRITE_PALETTE("palette")
MCFG_SETA001_SPRITE_GFXBANK_CB(seta_state, setac_gfxbank_callback)
/* video hardware */
@@ -8681,7 +8660,6 @@ static MACHINE_CONFIG_START( orbs, seta_state )
MCFG_DEVICE_ADD("spritegen", SETA001_SPRITE, 0)
MCFG_SETA001_SPRITE_GFXDECODE("gfxdecode")
- MCFG_SETA001_SPRITE_PALETTE("palette")
MCFG_SETA001_SPRITE_GFXBANK_CB(seta_state, setac_gfxbank_callback)
/* video hardware */
@@ -8724,7 +8702,6 @@ static MACHINE_CONFIG_START( keroppij, seta_state )
MCFG_DEVICE_ADD("spritegen", SETA001_SPRITE, 0)
MCFG_SETA001_SPRITE_GFXDECODE("gfxdecode")
- MCFG_SETA001_SPRITE_PALETTE("palette")
MCFG_SETA001_SPRITE_GFXBANK_CB(seta_state, setac_gfxbank_callback)
/* video hardware */
@@ -8766,7 +8743,6 @@ static MACHINE_CONFIG_START( krzybowl, seta_state )
MCFG_DEVICE_ADD("spritegen", SETA001_SPRITE, 0)
MCFG_SETA001_SPRITE_GFXDECODE("gfxdecode")
- MCFG_SETA001_SPRITE_PALETTE("palette")
MCFG_SETA001_SPRITE_GFXBANK_CB(seta_state, setac_gfxbank_callback)
/* video hardware */
@@ -8809,7 +8785,6 @@ static MACHINE_CONFIG_START( madshark, seta_state )
MCFG_DEVICE_ADD("spritegen", SETA001_SPRITE, 0)
MCFG_SETA001_SPRITE_GFXDECODE("gfxdecode")
- MCFG_SETA001_SPRITE_PALETTE("palette")
MCFG_SETA001_SPRITE_GFXBANK_CB(seta_state, setac_gfxbank_callback)
/* video hardware */
@@ -8854,7 +8829,6 @@ static MACHINE_CONFIG_START( magspeed, seta_state )
MCFG_DEVICE_ADD("spritegen", SETA001_SPRITE, 0)
MCFG_SETA001_SPRITE_GFXDECODE("gfxdecode")
- MCFG_SETA001_SPRITE_PALETTE("palette")
MCFG_SETA001_SPRITE_GFXBANK_CB(seta_state, setac_gfxbank_callback)
/* video hardware */
@@ -8902,7 +8876,6 @@ static MACHINE_CONFIG_START( msgundam, seta_state )
MCFG_DEVICE_ADD("spritegen", SETA001_SPRITE, 0)
MCFG_SETA001_SPRITE_GFXDECODE("gfxdecode")
- MCFG_SETA001_SPRITE_PALETTE("palette")
MCFG_SETA001_SPRITE_GFXBANK_CB(seta_state, setac_gfxbank_callback)
/* video hardware */
@@ -8942,7 +8915,6 @@ static MACHINE_CONFIG_START( oisipuzl, seta_state )
MCFG_DEVICE_ADD("spritegen", SETA001_SPRITE, 0)
MCFG_SETA001_SPRITE_GFXDECODE("gfxdecode")
- MCFG_SETA001_SPRITE_PALETTE("palette")
MCFG_SETA001_SPRITE_GFXBANK_CB(seta_state, setac_gfxbank_callback)
/* video hardware */
@@ -8982,7 +8954,6 @@ static MACHINE_CONFIG_START( triplfun, seta_state )
MCFG_DEVICE_ADD("spritegen", SETA001_SPRITE, 0)
MCFG_SETA001_SPRITE_GFXDECODE("gfxdecode")
- MCFG_SETA001_SPRITE_PALETTE("palette")
MCFG_SETA001_SPRITE_GFXBANK_CB(seta_state, setac_gfxbank_callback)
/* video hardware */
@@ -9021,7 +8992,6 @@ static MACHINE_CONFIG_START( kiwame, seta_state )
MCFG_DEVICE_ADD("spritegen", SETA001_SPRITE, 0)
MCFG_SETA001_SPRITE_GFXDECODE("gfxdecode")
- MCFG_SETA001_SPRITE_PALETTE("palette")
MCFG_SETA001_SPRITE_GFXBANK_CB(seta_state, setac_gfxbank_callback)
/* video hardware */
@@ -9063,7 +9033,6 @@ static MACHINE_CONFIG_START( rezon, seta_state )
MCFG_DEVICE_ADD("spritegen", SETA001_SPRITE, 0)
MCFG_SETA001_SPRITE_GFXDECODE("gfxdecode")
- MCFG_SETA001_SPRITE_PALETTE("palette")
MCFG_SETA001_SPRITE_GFXBANK_CB(seta_state, setac_gfxbank_callback)
/* video hardware */
@@ -9104,7 +9073,6 @@ static MACHINE_CONFIG_START( thunderl, seta_state )
MCFG_DEVICE_ADD("spritegen", SETA001_SPRITE, 0)
MCFG_SETA001_SPRITE_GFXDECODE("gfxdecode")
- MCFG_SETA001_SPRITE_PALETTE("palette")
MCFG_SETA001_SPRITE_GFXBANK_CB(seta_state, setac_gfxbank_callback)
/* video hardware */
@@ -9176,7 +9144,6 @@ static MACHINE_CONFIG_START( wiggie, seta_state )
MCFG_DEVICE_ADD("spritegen", SETA001_SPRITE, 0)
MCFG_SETA001_SPRITE_GFXDECODE("gfxdecode")
- MCFG_SETA001_SPRITE_PALETTE("palette")
MCFG_SETA001_SPRITE_GFXBANK_CB(seta_state, setac_gfxbank_callback)
/* video hardware */
@@ -9214,7 +9181,6 @@ static MACHINE_CONFIG_START( wits, seta_state )
MCFG_DEVICE_ADD("spritegen", SETA001_SPRITE, 0)
MCFG_SETA001_SPRITE_GFXDECODE("gfxdecode")
- MCFG_SETA001_SPRITE_PALETTE("palette")
MCFG_SETA001_SPRITE_GFXBANK_CB(seta_state, setac_gfxbank_callback)
/* video hardware */
@@ -9252,7 +9218,6 @@ static MACHINE_CONFIG_START( umanclub, seta_state )
MCFG_DEVICE_ADD("spritegen", SETA001_SPRITE, 0)
MCFG_SETA001_SPRITE_GFXDECODE("gfxdecode")
- MCFG_SETA001_SPRITE_PALETTE("palette")
MCFG_SETA001_SPRITE_GFXBANK_CB(seta_state, setac_gfxbank_callback)
/* video hardware */
@@ -9294,7 +9259,6 @@ static MACHINE_CONFIG_START( utoukond, seta_state )
MCFG_DEVICE_ADD("spritegen", SETA001_SPRITE, 0)
MCFG_SETA001_SPRITE_GFXDECODE("gfxdecode")
- MCFG_SETA001_SPRITE_PALETTE("palette")
MCFG_SETA001_SPRITE_GFXBANK_CB(seta_state, setac_gfxbank_callback)
/* video hardware */
@@ -9346,7 +9310,6 @@ static MACHINE_CONFIG_START( wrofaero, seta_state )
MCFG_DEVICE_ADD("spritegen", SETA001_SPRITE, 0)
MCFG_SETA001_SPRITE_GFXDECODE("gfxdecode")
- MCFG_SETA001_SPRITE_PALETTE("palette")
MCFG_SETA001_SPRITE_GFXBANK_CB(seta_state, setac_gfxbank_callback)
/* video hardware */
@@ -9391,7 +9354,6 @@ static MACHINE_CONFIG_START( zingzip, seta_state )
MCFG_DEVICE_ADD("spritegen", SETA001_SPRITE, 0)
MCFG_SETA001_SPRITE_GFXDECODE("gfxdecode")
- MCFG_SETA001_SPRITE_PALETTE("palette")
MCFG_SETA001_SPRITE_GFXBANK_CB(seta_state, setac_gfxbank_callback)
/* video hardware */
@@ -9447,7 +9409,6 @@ static MACHINE_CONFIG_START( pairlove, seta_state )
MCFG_DEVICE_ADD("spritegen", SETA001_SPRITE, 0)
MCFG_SETA001_SPRITE_GFXDECODE("gfxdecode")
- MCFG_SETA001_SPRITE_PALETTE("palette")
MCFG_SETA001_SPRITE_GFXBANK_CB(seta_state, setac_gfxbank_callback)
/* video hardware */
@@ -9496,7 +9457,6 @@ static MACHINE_CONFIG_START( crazyfgt, seta_state )
MCFG_DEVICE_ADD("spritegen", SETA001_SPRITE, 0)
MCFG_SETA001_SPRITE_GFXDECODE("gfxdecode")
- MCFG_SETA001_SPRITE_PALETTE("palette")
MCFG_SETA001_SPRITE_GFXBANK_CB(seta_state, setac_gfxbank_callback)
/* video hardware */
@@ -9562,7 +9522,6 @@ static MACHINE_CONFIG_START( inttoote, seta_state )
MCFG_DEVICE_ADD("spritegen", SETA001_SPRITE, 0)
MCFG_SETA001_SPRITE_GFXDECODE("gfxdecode")
- MCFG_SETA001_SPRITE_PALETTE("palette")
MCFG_SETA001_SPRITE_GFXBANK_CB(seta_state, setac_gfxbank_callback)
/* video hardware */
diff --git a/src/mame/drivers/silvmil.cpp b/src/mame/drivers/silvmil.cpp
index bff90fc7b16..fed4f7976be 100644
--- a/src/mame/drivers/silvmil.cpp
+++ b/src/mame/drivers/silvmil.cpp
@@ -420,7 +420,6 @@ static MACHINE_CONFIG_START( silvmil, silvmil_state )
MCFG_DECO_SPRITE_ISBOOTLEG(true)
MCFG_DECO_SPRITE_OFFSETS(5, 7)
MCFG_DECO_SPRITE_GFXDECODE("gfxdecode")
- MCFG_DECO_SPRITE_PALETTE("palette")
MCFG_SPEAKER_STANDARD_MONO("mono")
diff --git a/src/mame/drivers/simpl156.cpp b/src/mame/drivers/simpl156.cpp
index 8bda58693b0..9187475a280 100644
--- a/src/mame/drivers/simpl156.cpp
+++ b/src/mame/drivers/simpl156.cpp
@@ -413,13 +413,11 @@ static MACHINE_CONFIG_START( chainrec, simpl156_state )
MCFG_DECO16IC_PF12_8X8_BANK(0)
MCFG_DECO16IC_PF12_16X16_BANK(1)
MCFG_DECO16IC_GFXDECODE("gfxdecode")
- MCFG_DECO16IC_PALETTE("palette")
MCFG_DEVICE_ADD("spritegen", DECO_SPRITE, 0)
MCFG_DECO_SPRITE_GFX_REGION(2)
MCFG_DECO_SPRITE_PRIORITY_CB(simpl156_state, pri_callback)
MCFG_DECO_SPRITE_GFXDECODE("gfxdecode")
- MCFG_DECO_SPRITE_PALETTE("palette")
MCFG_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker")
diff --git a/src/mame/drivers/simpsons.cpp b/src/mame/drivers/simpsons.cpp
index 5641f189a33..20e01f6306c 100644
--- a/src/mame/drivers/simpsons.cpp
+++ b/src/mame/drivers/simpsons.cpp
@@ -356,16 +356,13 @@ static MACHINE_CONFIG_START( simpsons, simpsons_state )
MCFG_PALETTE_ENABLE_HILIGHTS()
MCFG_PALETTE_FORMAT(xBBBBBGGGGGRRRRR)
- MCFG_GFXDECODE_ADD("gfxdecode", "palette", empty)
-
MCFG_DEVICE_ADD("k052109", K052109, 0)
MCFG_GFX_PALETTE("palette")
MCFG_K052109_CB(simpsons_state, tile_callback)
MCFG_DEVICE_ADD("k053246", K053246, 0)
MCFG_K053246_CB(simpsons_state, sprite_callback)
- MCFG_K053246_CONFIG("gfx2", 1, NORMAL_PLANE_ORDER, 53, 23)
- MCFG_K053246_GFXDECODE("gfxdecode")
+ MCFG_K053246_CONFIG("gfx2", NORMAL_PLANE_ORDER, 53, 23)
MCFG_K053246_PALETTE("palette")
MCFG_K053251_ADD("k053251")
diff --git a/src/mame/drivers/slapshot.cpp b/src/mame/drivers/slapshot.cpp
index 9348a9dbb9c..417b4d4b335 100644
--- a/src/mame/drivers/slapshot.cpp
+++ b/src/mame/drivers/slapshot.cpp
@@ -498,7 +498,6 @@ static MACHINE_CONFIG_START( slapshot, slapshot_state )
MCFG_TC0480SCP_OFFSETS_FLIP(0, 2)
MCFG_TC0480SCP_COL_BASE(4096)
MCFG_TC0480SCP_GFXDECODE("gfxdecode")
- MCFG_TC0480SCP_PALETTE("palette")
MCFG_TC0360PRI_ADD("tc0360pri")
@@ -559,7 +558,6 @@ static MACHINE_CONFIG_START( opwolf3, slapshot_state )
MCFG_TC0480SCP_OFFSETS_FLIP(0, 2)
MCFG_TC0480SCP_COL_BASE(4096)
MCFG_TC0480SCP_GFXDECODE("gfxdecode")
- MCFG_TC0480SCP_PALETTE("palette")
MCFG_TC0360PRI_ADD("tc0360pri")
diff --git a/src/mame/drivers/snk68.cpp b/src/mame/drivers/snk68.cpp
index 72ef817e615..d173946a5ab 100644
--- a/src/mame/drivers/snk68.cpp
+++ b/src/mame/drivers/snk68.cpp
@@ -617,7 +617,6 @@ static MACHINE_CONFIG_START( pow, snk68_state )
MCFG_DEVICE_ADD("sprites", SNK68_SPR, 0)
MCFG_SNK68_SPR_GFXDECODE("gfxdecode")
- MCFG_SNK68_SPR_PALETTE("palette")
MCFG_SNK68_SPR_SET_TILE_INDIRECT( snk68_state, tile_callback_pow )
MCFG_SOUND_ADD("ymsnd", YM3812, XTAL_8MHz/2) /* verified on pcb */
diff --git a/src/mame/drivers/snowbros.cpp b/src/mame/drivers/snowbros.cpp
index e038d66471b..095946efcdc 100644
--- a/src/mame/drivers/snowbros.cpp
+++ b/src/mame/drivers/snowbros.cpp
@@ -1678,7 +1678,6 @@ static MACHINE_CONFIG_START( snowbros, snowbros_state )
MCFG_DEVICE_ADD("pandora", KANEKO_PANDORA, 0)
MCFG_KANEKO_PANDORA_GFXDECODE("gfxdecode")
- MCFG_KANEKO_PANDORA_PALETTE("palette")
/* sound hardware */
MCFG_SPEAKER_STANDARD_MONO("mono")
diff --git a/src/mame/drivers/speglsht.cpp b/src/mame/drivers/speglsht.cpp
index 74aee52aee1..6d683980e30 100644
--- a/src/mame/drivers/speglsht.cpp
+++ b/src/mame/drivers/speglsht.cpp
@@ -140,8 +140,8 @@ public:
DECLARE_VIDEO_START(speglsht);
UINT32 screen_update_speglsht(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect);
required_device<palette_device> m_palette;
- optional_device<st0016_cpu_device> m_maincpu;
- optional_device<cpu_device> m_subcpu;
+ required_device<st0016_cpu_device> m_maincpu;
+ required_device<cpu_device> m_subcpu;
DECLARE_WRITE8_MEMBER(st0016_rom_bank_w);
};
@@ -387,7 +387,7 @@ UINT32 speglsht_state::screen_update_speglsht(screen_device &screen, bitmap_rgb3
{
if(srcline[x])
{
- rgb_t color=m_maincpu->m_palette->pen_color(srcline[x]);
+ rgb_t color = m_maincpu->palette().pen_color(srcline[x]);
PLOT_PIXEL_RGB(x,y,color.r(),color.g(),color.b());
}
}
diff --git a/src/mame/drivers/spy.cpp b/src/mame/drivers/spy.cpp
index 0806c904736..07bc4ed9c23 100644
--- a/src/mame/drivers/spy.cpp
+++ b/src/mame/drivers/spy.cpp
@@ -511,8 +511,6 @@ static MACHINE_CONFIG_START( spy, spy_state )
MCFG_PALETTE_ENABLE_SHADOWS()
MCFG_PALETTE_FORMAT(xBBBBBGGGGGRRRRR)
- MCFG_GFXDECODE_ADD("gfxdecode", "palette", empty)
-
MCFG_DEVICE_ADD("k052109", K052109, 0)
MCFG_GFX_PALETTE("palette")
MCFG_K052109_CB(spy_state, tile_callback)
diff --git a/src/mame/drivers/srmp2.cpp b/src/mame/drivers/srmp2.cpp
index ca80decc53a..9b0c5bf1e62 100644
--- a/src/mame/drivers/srmp2.cpp
+++ b/src/mame/drivers/srmp2.cpp
@@ -1168,7 +1168,6 @@ static MACHINE_CONFIG_START( srmp2, srmp2_state )
MCFG_DEVICE_ADD("spritegen", SETA001_SPRITE, 0)
MCFG_SETA001_SPRITE_GFXDECODE("gfxdecode")
- MCFG_SETA001_SPRITE_PALETTE("palette")
/* video hardware */
MCFG_SCREEN_ADD("screen", RASTER)
@@ -1215,7 +1214,6 @@ static MACHINE_CONFIG_START( srmp3, srmp2_state )
MCFG_DEVICE_ADD("spritegen", SETA001_SPRITE, 0)
MCFG_SETA001_SPRITE_GFXDECODE("gfxdecode")
- MCFG_SETA001_SPRITE_PALETTE("palette")
MCFG_SETA001_SPRITE_GFXBANK_CB(srmp2_state, srmp3_gfxbank_callback)
/* video hardware */
@@ -1270,7 +1268,6 @@ static MACHINE_CONFIG_START( mjyuugi, srmp2_state )
MCFG_DEVICE_ADD("spritegen", SETA001_SPRITE, 0)
MCFG_SETA001_SPRITE_GFXDECODE("gfxdecode")
- MCFG_SETA001_SPRITE_PALETTE("palette")
MCFG_SETA001_SPRITE_GFXBANK_CB(srmp2_state, srmp3_gfxbank_callback)
/* video hardware */
diff --git a/src/mame/drivers/sshangha.cpp b/src/mame/drivers/sshangha.cpp
index 13df09a5fd8..041b629e7a2 100644
--- a/src/mame/drivers/sshangha.cpp
+++ b/src/mame/drivers/sshangha.cpp
@@ -416,17 +416,14 @@ static MACHINE_CONFIG_START( sshangha, sshangha_state )
MCFG_DECO16IC_PF12_8X8_BANK(0)
MCFG_DECO16IC_PF12_16X16_BANK(1)
MCFG_DECO16IC_GFXDECODE("gfxdecode")
- MCFG_DECO16IC_PALETTE("palette")
MCFG_DEVICE_ADD("spritegen1", DECO_SPRITE, 0)
MCFG_DECO_SPRITE_GFX_REGION(2)
MCFG_DECO_SPRITE_GFXDECODE("gfxdecode")
- MCFG_DECO_SPRITE_PALETTE("palette")
MCFG_DEVICE_ADD("spritegen2", DECO_SPRITE, 0)
MCFG_DECO_SPRITE_GFX_REGION(2)
MCFG_DECO_SPRITE_GFXDECODE("gfxdecode")
- MCFG_DECO_SPRITE_PALETTE("palette")
MCFG_DECO146_ADD("ioprot")
diff --git a/src/mame/drivers/ssv.cpp b/src/mame/drivers/ssv.cpp
index a698d6bcc9d..3b2419b8a3d 100644
--- a/src/mame/drivers/ssv.cpp
+++ b/src/mame/drivers/ssv.cpp
@@ -2637,7 +2637,6 @@ static MACHINE_CONFIG_DERIVED( gdfs, ssv )
MCFG_SCREEN_UPDATE_DRIVER(ssv_state, screen_update_gdfs)
MCFG_DEVICE_ADD("st0020_spr", ST0020_SPRITES, 0)
- MCFG_ST0020_SPRITES_GFXDECODE("gfxdecode")
MCFG_ST0020_SPRITES_PALETTE("palette")
MCFG_GFXDECODE_MODIFY("gfxdecode", gdfs)
diff --git a/src/mame/drivers/stadhero.cpp b/src/mame/drivers/stadhero.cpp
index e8fc5e9a4e1..3aea0de91c7 100644
--- a/src/mame/drivers/stadhero.cpp
+++ b/src/mame/drivers/stadhero.cpp
@@ -221,13 +221,12 @@ static MACHINE_CONFIG_START( stadhero, stadhero_state )
MCFG_PALETTE_FORMAT(xxxxBBBBGGGGRRRR)
MCFG_DEVICE_ADD("tilegen1", DECO_BAC06, 0)
- deco_bac06_device::set_gfx_region_wide(*device,1,1,2);
+ MCFG_DECO_BAC06_GFX_REGION_WIDE(1, 1, 2)
MCFG_DECO_BAC06_GFXDECODE("gfxdecode")
MCFG_DEVICE_ADD("spritegen", DECO_MXC06, 0)
- deco_mxc06_device::set_gfx_region(*device, 2);
+ MCFG_DECO_MXC06_GFX_REGION(2)
MCFG_DECO_MXC06_GFXDECODE("gfxdecode")
- MCFG_DECO_MXC06_PALETTE("palette")
/* sound hardware */
diff --git a/src/mame/drivers/supbtime.cpp b/src/mame/drivers/supbtime.cpp
index c2cc30185b2..7b4f6aaa542 100644
--- a/src/mame/drivers/supbtime.cpp
+++ b/src/mame/drivers/supbtime.cpp
@@ -349,12 +349,10 @@ static MACHINE_CONFIG_START( supbtime, supbtime_state )
MCFG_DECO16IC_PF12_8X8_BANK(0)
MCFG_DECO16IC_PF12_16X16_BANK(1)
MCFG_DECO16IC_GFXDECODE("gfxdecode")
- MCFG_DECO16IC_PALETTE("palette")
MCFG_DEVICE_ADD("spritegen", DECO_SPRITE, 0)
MCFG_DECO_SPRITE_GFX_REGION(2)
MCFG_DECO_SPRITE_GFXDECODE("gfxdecode")
- MCFG_DECO_SPRITE_PALETTE("palette")
/* sound hardware */
MCFG_SPEAKER_STANDARD_MONO("mono")
@@ -405,12 +403,10 @@ static MACHINE_CONFIG_START( chinatwn, supbtime_state )
MCFG_DECO16IC_PF12_8X8_BANK(0)
MCFG_DECO16IC_PF12_16X16_BANK(1)
MCFG_DECO16IC_GFXDECODE("gfxdecode")
- MCFG_DECO16IC_PALETTE("palette")
MCFG_DEVICE_ADD("spritegen", DECO_SPRITE, 0)
MCFG_DECO_SPRITE_GFX_REGION(2)
MCFG_DECO_SPRITE_GFXDECODE("gfxdecode")
- MCFG_DECO_SPRITE_PALETTE("palette")
/* sound hardware */
MCFG_SPEAKER_STANDARD_MONO("mono")
diff --git a/src/mame/drivers/superchs.cpp b/src/mame/drivers/superchs.cpp
index 035b0ccafc5..9aacce21f5e 100644
--- a/src/mame/drivers/superchs.cpp
+++ b/src/mame/drivers/superchs.cpp
@@ -336,7 +336,6 @@ static MACHINE_CONFIG_START( superchs, superchs_state )
MCFG_TC0480SCP_OFFSETS(0x20, 0x08)
MCFG_TC0480SCP_OFFSETS_TX(-1, 0)
MCFG_TC0480SCP_GFXDECODE("gfxdecode")
- MCFG_TC0480SCP_PALETTE("palette")
/* sound hardware */
MCFG_DEVICE_ADD("taito_en", TAITO_EN, 0)
diff --git a/src/mame/drivers/suprslam.cpp b/src/mame/drivers/suprslam.cpp
index 92d63b4de0d..20fd606a1f9 100644
--- a/src/mame/drivers/suprslam.cpp
+++ b/src/mame/drivers/suprslam.cpp
@@ -326,7 +326,6 @@ static MACHINE_CONFIG_START( suprslam, suprslam_state )
MCFG_VSYSTEM_SPR_SET_TILE_INDIRECT( suprslam_state, suprslam_tile_callback )
MCFG_VSYSTEM_SPR_SET_GFXREGION(1)
MCFG_VSYSTEM_SPR_GFXDECODE("gfxdecode")
- MCFG_VSYSTEM_SPR_PALETTE("palette")
MCFG_DEVICE_ADD("k053936", K053936, 0)
MCFG_K053936_WRAP(1)
diff --git a/src/mame/drivers/taito_f2.cpp b/src/mame/drivers/taito_f2.cpp
index 05a3b11fecc..9c72d17881f 100644
--- a/src/mame/drivers/taito_f2.cpp
+++ b/src/mame/drivers/taito_f2.cpp
@@ -3232,7 +3232,6 @@ static MACHINE_CONFIG_DERIVED( footchmp, taito_f2 )
MCFG_TC0480SCP_OFFSETS_TX(-1, 0)
MCFG_TC0480SCP_OFFSETS_FLIP(-1, 0)
MCFG_TC0480SCP_GFXDECODE("gfxdecode")
- MCFG_TC0480SCP_PALETTE("palette")
MCFG_TC0360PRI_ADD("tc0360pri")
MACHINE_CONFIG_END
@@ -3266,7 +3265,6 @@ static MACHINE_CONFIG_DERIVED( hthero, taito_f2 )
MCFG_TC0480SCP_OFFSETS_TX(-1, 0)
MCFG_TC0480SCP_OFFSETS_FLIP(-1, 0)
MCFG_TC0480SCP_GFXDECODE("gfxdecode")
- MCFG_TC0480SCP_PALETTE("palette")
MACHINE_CONFIG_END
@@ -3433,7 +3431,6 @@ static MACHINE_CONFIG_DERIVED( metalb, taito_f2_tc0510nio )
MCFG_TC0480SCP_OFFSETS_FLIP(-1, 0)
MCFG_TC0480SCP_COL_BASE(4096)
MCFG_TC0480SCP_GFXDECODE("gfxdecode")
- MCFG_TC0480SCP_PALETTE("palette")
MCFG_TC0360PRI_ADD("tc0360pri")
MACHINE_CONFIG_END
@@ -3501,7 +3498,6 @@ static MACHINE_CONFIG_DERIVED( deadconx, taito_f2 )
MCFG_TC0480SCP_OFFSETS_TX(-1, 0)
MCFG_TC0480SCP_OFFSETS_FLIP(-1, 0)
MCFG_TC0480SCP_GFXDECODE("gfxdecode")
- MCFG_TC0480SCP_PALETTE("palette")
MCFG_TC0360PRI_ADD("tc0360pri")
MACHINE_CONFIG_END
@@ -3526,7 +3522,6 @@ static MACHINE_CONFIG_DERIVED( deadconxj, taito_f2 )
MCFG_TC0480SCP_OFFSETS_TX(-1, 0)
MCFG_TC0480SCP_OFFSETS_FLIP(-1, 0)
MCFG_TC0480SCP_GFXDECODE("gfxdecode")
- MCFG_TC0480SCP_PALETTE("palette")
MCFG_TC0360PRI_ADD("tc0360pri")
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/taito_h.cpp b/src/mame/drivers/taito_h.cpp
index c2714413025..900940597a2 100644
--- a/src/mame/drivers/taito_h.cpp
+++ b/src/mame/drivers/taito_h.cpp
@@ -676,7 +676,6 @@ static MACHINE_CONFIG_START( syvalion, taitoh_state )
MCFG_TC0080VCO_OFFSETS(1, 1)
MCFG_TC0080VCO_BGFLIP_OFFS(-2)
MCFG_TC0080VCO_GFXDECODE("gfxdecode")
- MCFG_TC0080VCO_PALETTE("palette")
/* sound hardware */
MCFG_SPEAKER_STANDARD_MONO("mono")
@@ -732,7 +731,6 @@ static MACHINE_CONFIG_START( recordbr, taitoh_state )
MCFG_TC0080VCO_OFFSETS(1, 1)
MCFG_TC0080VCO_BGFLIP_OFFS(-2)
MCFG_TC0080VCO_GFXDECODE("gfxdecode")
- MCFG_TC0080VCO_PALETTE("palette")
/* sound hardware */
MCFG_SPEAKER_STANDARD_MONO("mono")
@@ -796,7 +794,6 @@ static MACHINE_CONFIG_START( dleague, taitoh_state )
MCFG_TC0080VCO_OFFSETS(1, 1)
MCFG_TC0080VCO_BGFLIP_OFFS(-2)
MCFG_TC0080VCO_GFXDECODE("gfxdecode")
- MCFG_TC0080VCO_PALETTE("palette")
/* sound hardware */
MCFG_SPEAKER_STANDARD_MONO("mono")
diff --git a/src/mame/drivers/taito_o.cpp b/src/mame/drivers/taito_o.cpp
index 263ff71afcd..2b9761750a4 100644
--- a/src/mame/drivers/taito_o.cpp
+++ b/src/mame/drivers/taito_o.cpp
@@ -253,7 +253,6 @@ static MACHINE_CONFIG_START( parentj, taitoo_state )
MCFG_TC0080VCO_OFFSETS(1, 1)
MCFG_TC0080VCO_BGFLIP_OFFS(-2)
MCFG_TC0080VCO_GFXDECODE("gfxdecode")
- MCFG_TC0080VCO_PALETTE("palette")
MCFG_SPEAKER_STANDARD_MONO("mono")
diff --git a/src/mame/drivers/taito_x.cpp b/src/mame/drivers/taito_x.cpp
index 9d068780e0b..ed18529079e 100644
--- a/src/mame/drivers/taito_x.cpp
+++ b/src/mame/drivers/taito_x.cpp
@@ -809,7 +809,6 @@ static MACHINE_CONFIG_START( superman, taitox_state )
MCFG_DEVICE_ADD("spritegen", SETA001_SPRITE, 0)
MCFG_SETA001_SPRITE_GFXDECODE("gfxdecode")
- MCFG_SETA001_SPRITE_PALETTE("palette")
/* video hardware */
MCFG_SCREEN_ADD("screen", RASTER)
@@ -857,7 +856,6 @@ static MACHINE_CONFIG_START( daisenpu, taitox_state )
MCFG_DEVICE_ADD("spritegen", SETA001_SPRITE, 0)
MCFG_SETA001_SPRITE_GFXDECODE("gfxdecode")
- MCFG_SETA001_SPRITE_PALETTE("palette")
/* video hardware */
MCFG_SCREEN_ADD("screen", RASTER)
@@ -903,7 +901,6 @@ static MACHINE_CONFIG_START( gigandes, taitox_state )
MCFG_DEVICE_ADD("spritegen", SETA001_SPRITE, 0)
MCFG_SETA001_SPRITE_GFXDECODE("gfxdecode")
- MCFG_SETA001_SPRITE_PALETTE("palette")
/* video hardware */
MCFG_SCREEN_ADD("screen", RASTER)
@@ -951,7 +948,6 @@ static MACHINE_CONFIG_START( ballbros, taitox_state )
MCFG_DEVICE_ADD("spritegen", SETA001_SPRITE, 0)
MCFG_SETA001_SPRITE_GFXDECODE("gfxdecode")
- MCFG_SETA001_SPRITE_PALETTE("palette")
/* video hardware */
MCFG_SCREEN_ADD("screen", RASTER)
diff --git a/src/mame/drivers/taito_z.cpp b/src/mame/drivers/taito_z.cpp
index 16fbc1beb8c..45d69582597 100644
--- a/src/mame/drivers/taito_z.cpp
+++ b/src/mame/drivers/taito_z.cpp
@@ -3641,7 +3641,6 @@ static MACHINE_CONFIG_START( dblaxle, taitoz_state )
MCFG_TC0480SCP_TX_REGION(2)
MCFG_TC0480SCP_OFFSETS(0x1f, 0x08)
MCFG_TC0480SCP_GFXDECODE("gfxdecode")
- MCFG_TC0480SCP_PALETTE("palette")
MCFG_DEVICE_ADD("tc0150rod", TC0150ROD, 0)
@@ -3717,7 +3716,6 @@ static MACHINE_CONFIG_START( racingb, taitoz_state )
MCFG_TC0480SCP_TX_REGION(2)
MCFG_TC0480SCP_OFFSETS(0x1f, 0x08)
MCFG_TC0480SCP_GFXDECODE("gfxdecode")
- MCFG_TC0480SCP_PALETTE("palette")
MCFG_DEVICE_ADD("tc0150rod", TC0150ROD, 0)
diff --git a/src/mame/drivers/taitoair.cpp b/src/mame/drivers/taitoair.cpp
index 95e1fcdcec9..3315310901b 100644
--- a/src/mame/drivers/taitoair.cpp
+++ b/src/mame/drivers/taitoair.cpp
@@ -767,7 +767,6 @@ static MACHINE_CONFIG_START( airsys, taitoair_state )
MCFG_TC0080VCO_OFFSETS(1, 1)
MCFG_TC0080VCO_BGFLIP_OFFS(-2)
MCFG_TC0080VCO_GFXDECODE("gfxdecode")
- MCFG_TC0080VCO_PALETTE("palette")
/* sound hardware */
MCFG_SPEAKER_STANDARD_MONO("mono")
diff --git a/src/mame/drivers/taotaido.cpp b/src/mame/drivers/taotaido.cpp
index 5f4585f3048..f977e8beb69 100644
--- a/src/mame/drivers/taotaido.cpp
+++ b/src/mame/drivers/taotaido.cpp
@@ -387,7 +387,6 @@ static MACHINE_CONFIG_START( taotaido, taotaido_state )
MCFG_VSYSTEM_SPR_SET_TILE_INDIRECT( taotaido_state, tile_callback )
MCFG_VSYSTEM_SPR_SET_GFXREGION(0)
MCFG_VSYSTEM_SPR_GFXDECODE("gfxdecode")
- MCFG_VSYSTEM_SPR_PALETTE("palette")
/* sound hardware */
MCFG_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker")
diff --git a/src/mame/drivers/tasman.cpp b/src/mame/drivers/tasman.cpp
index a9c65694c9b..91159716ee7 100644
--- a/src/mame/drivers/tasman.cpp
+++ b/src/mame/drivers/tasman.cpp
@@ -22,20 +22,44 @@
#include "emu.h"
#include "video/konami_helper.h"
-#include "includes/konamigx.h"
#include "cpu/m68000/m68000.h"
+#include "machine/k053252.h"
+#include "video/k053246_k053247_k055673.h"
+#include "video/k054156_k054157_k056832.h"
+#include "video/k055555.h"
#include "machine/eepromser.h"
#define CUSTOM_DRAW 1
-class kongambl_state : public konamigx_state // with everything devicified there's probably not much point in inheriting the GX state.
+class kongambl_state : public driver_device
{
public:
kongambl_state(const machine_config &mconfig, device_type type, const char *tag)
- : konamigx_state(mconfig, type, tag),
+ : driver_device(mconfig, type, tag),
+ m_maincpu(*this,"maincpu"),
+ m_k053252(*this, "k053252"),
+ m_k055673(*this, "k055673"),
+ m_k055555(*this, "k055555"),
+ m_k056832(*this, "k056832"),
+#if CUSTOM_DRAW
+ m_gfxdecode(*this, "gfxdecode"),
+#endif
+ m_screen(*this, "screen"),
+ m_palette(*this, "palette"),
m_vram(*this, "vram")
{ }
+ required_device<cpu_device> m_maincpu;
+ required_device<k053252_device> m_k053252;
+ required_device<k055673_device> m_k055673;
+ required_device<k055555_device> m_k055555;
+ required_device<k056832_device> m_k056832;
+#if CUSTOM_DRAW
+ required_device<gfxdecode_device> m_gfxdecode;
+#endif
+ required_device<screen_device> m_screen;
+ required_device<palette_device> m_palette;
+
optional_shared_ptr<UINT32> m_vram;
DECLARE_READ32_MEMBER(eeprom_r);
DECLARE_WRITE8_MEMBER(eeprom_w);
@@ -48,6 +72,8 @@ public:
virtual void machine_reset() override { m_irq_mask = 0; };
UINT32 screen_update_kongambl(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
+ WRITE_LINE_MEMBER(vblank_irq_ack_w);
+ WRITE_LINE_MEMBER(hblank_irq_ack_w);
TIMER_DEVICE_CALLBACK_MEMBER(kongambl_vblank);
K056832_CB_MEMBER(tile_callback);
K053246_CB_MEMBER(sprite_callback);
@@ -576,6 +602,16 @@ static GFXDECODE_START( tasman )
GFXDECODE_END
+WRITE_LINE_MEMBER(kongambl_state::vblank_irq_ack_w)
+{
+ m_maincpu->set_input_line(1, CLEAR_LINE);
+}
+
+WRITE_LINE_MEMBER(kongambl_state::hblank_irq_ack_w)
+{
+ m_maincpu->set_input_line(2, CLEAR_LINE);
+}
+
TIMER_DEVICE_CALLBACK_MEMBER(kongambl_state::kongambl_vblank)
{
int scanline = param;
@@ -606,8 +642,8 @@ static MACHINE_CONFIG_START( kongambl, kongambl_state )
MCFG_DEVICE_ADD("k053252", K053252, 25000000)
MCFG_K053252_OFFSETS(0, 16) // TBD
- MCFG_K053252_INT1_ACK_CB(WRITELINE(konamigx_state, vblank_irq_ack_w))
- MCFG_K053252_INT2_ACK_CB(WRITELINE(konamigx_state, hblank_irq_ack_w))
+ MCFG_K053252_INT1_ACK_CB(WRITELINE(kongambl_state, vblank_irq_ack_w))
+ MCFG_K053252_INT2_ACK_CB(WRITELINE(kongambl_state, hblank_irq_ack_w))
MCFG_VIDEO_SET_SCREEN("screen")
MCFG_EEPROM_SERIAL_93C46_ADD("eeprom")
@@ -626,16 +662,16 @@ static MACHINE_CONFIG_START( kongambl, kongambl_state )
MCFG_DEVICE_ADD("k055673", K055673, 0)
MCFG_K055673_CB(kongambl_state, sprite_callback)
- MCFG_K055673_CONFIG("gfx2", 1, K055673_LAYOUT_LE2, -48+1, -23)
- MCFG_K055673_GFXDECODE("gfxdecode")
+ MCFG_K055673_CONFIG("gfx2", K055673_LAYOUT_LE2, -48+1, -23)
MCFG_K055673_PALETTE("palette")
+#if CUSTOM_DRAW
MCFG_GFXDECODE_ADD("gfxdecode", "palette", tasman)
+#endif
MCFG_DEVICE_ADD("k056832", K056832, 0)
MCFG_K056832_CB(kongambl_state, tile_callback)
- MCFG_K056832_CONFIG("gfx1", 0, K056832_BPP_8TASMAN, 0, 0, "none")
- MCFG_K056832_GFXDECODE("gfxdecode")
+ MCFG_K056832_CONFIG("gfx1", K056832_BPP_8TASMAN, 0, 0, "none")
MCFG_K056832_PALETTE("palette")
MCFG_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker")
diff --git a/src/mame/drivers/thedealr.cpp b/src/mame/drivers/thedealr.cpp
index d6e9698474a..96a765dfda1 100644
--- a/src/mame/drivers/thedealr.cpp
+++ b/src/mame/drivers/thedealr.cpp
@@ -534,7 +534,6 @@ static MACHINE_CONFIG_START( thedealr, thedealr_state )
MCFG_DEVICE_ADD("spritegen", SETA001_SPRITE, 0)
MCFG_SETA001_SPRITE_GFXDECODE("gfxdecode")
- MCFG_SETA001_SPRITE_PALETTE("palette")
MCFG_MACHINE_RESET_OVERRIDE(thedealr_state,thedealr)
MCFG_MACHINE_START_OVERRIDE(thedealr_state,thedealr)
diff --git a/src/mame/drivers/thedeep.cpp b/src/mame/drivers/thedeep.cpp
index e999027842b..12e4926c632 100644
--- a/src/mame/drivers/thedeep.cpp
+++ b/src/mame/drivers/thedeep.cpp
@@ -439,9 +439,8 @@ static MACHINE_CONFIG_START( thedeep, thedeep_state )
MCFG_PALETTE_INIT_OWNER(thedeep_state, thedeep)
MCFG_DEVICE_ADD("spritegen", DECO_MXC06, 0)
- deco_mxc06_device::set_gfx_region(*device, 0);
+ MCFG_DECO_MXC06_GFX_REGION(0)
MCFG_DECO_MXC06_GFXDECODE("gfxdecode")
- MCFG_DECO_MXC06_PALETTE("palette")
MCFG_DECO_MXC06_RAMSIZE(0x400)
/* sound hardware */
diff --git a/src/mame/drivers/tnzs.cpp b/src/mame/drivers/tnzs.cpp
index 828ff045e2a..0a3d72a8e05 100644
--- a/src/mame/drivers/tnzs.cpp
+++ b/src/mame/drivers/tnzs.cpp
@@ -1565,7 +1565,6 @@ static MACHINE_CONFIG_START( arknoid2, tnzs_state )
MCFG_DEVICE_ADD("spritegen", SETA001_SPRITE, 0)
MCFG_SETA001_SPRITE_GFXDECODE("gfxdecode")
- MCFG_SETA001_SPRITE_PALETTE("palette")
/* video hardware */
MCFG_SCREEN_ADD("screen", RASTER)
@@ -1613,7 +1612,6 @@ static MACHINE_CONFIG_START( drtoppel, tnzs_state )
MCFG_DEVICE_ADD("spritegen", SETA001_SPRITE, 0)
MCFG_SETA001_SPRITE_GFXDECODE("gfxdecode")
- MCFG_SETA001_SPRITE_PALETTE("palette")
/* video hardware */
MCFG_SCREEN_ADD("screen", RASTER)
@@ -1663,7 +1661,6 @@ static MACHINE_CONFIG_START( tnzs, tnzs_state )
MCFG_DEVICE_ADD("spritegen", SETA001_SPRITE, 0)
MCFG_SETA001_SPRITE_GFXDECODE("gfxdecode")
- MCFG_SETA001_SPRITE_PALETTE("palette")
/* video hardware */
MCFG_SCREEN_ADD("screen", RASTER)
@@ -1709,7 +1706,6 @@ static MACHINE_CONFIG_START( insectx, tnzs_state )
MCFG_DEVICE_ADD("spritegen", SETA001_SPRITE, 0)
MCFG_SETA001_SPRITE_GFXDECODE("gfxdecode")
- MCFG_SETA001_SPRITE_PALETTE("palette")
/* video hardware */
MCFG_SCREEN_ADD("screen", RASTER)
@@ -1755,7 +1751,6 @@ static MACHINE_CONFIG_START( kageki, tnzs_state )
MCFG_DEVICE_ADD("spritegen", SETA001_SPRITE, 0)
MCFG_SETA001_SPRITE_GFXDECODE("gfxdecode")
- MCFG_SETA001_SPRITE_PALETTE("palette")
/* video hardware */
MCFG_SCREEN_ADD("screen", RASTER)
@@ -1813,7 +1808,6 @@ static MACHINE_CONFIG_START( tnzsb, tnzs_state )
MCFG_DEVICE_ADD("spritegen", SETA001_SPRITE, 0)
MCFG_SETA001_SPRITE_GFXDECODE("gfxdecode")
- MCFG_SETA001_SPRITE_PALETTE("palette")
/* video hardware */
MCFG_SCREEN_ADD("screen", RASTER)
@@ -1879,7 +1873,6 @@ static MACHINE_CONFIG_START( jpopnics, tnzs_state )
MCFG_DEVICE_ADD("spritegen", SETA001_SPRITE, 0)
MCFG_SETA001_SPRITE_GFXDECODE("gfxdecode")
- MCFG_SETA001_SPRITE_PALETTE("palette")
/* video hardware */
MCFG_SCREEN_ADD("screen", RASTER)
diff --git a/src/mame/drivers/topspeed.cpp b/src/mame/drivers/topspeed.cpp
index e265b3130f4..512bb5b6b91 100644
--- a/src/mame/drivers/topspeed.cpp
+++ b/src/mame/drivers/topspeed.cpp
@@ -580,13 +580,11 @@ static MACHINE_CONFIG_START( topspeed, topspeed_state )
MCFG_PC080SN_GFX_REGION(1)
MCFG_PC080SN_OFFSETS(0, 8)
MCFG_PC080SN_GFXDECODE("gfxdecode")
- MCFG_PC080SN_PALETTE("palette")
MCFG_DEVICE_ADD("pc080sn_2", PC080SN, 0)
MCFG_PC080SN_GFX_REGION(1)
MCFG_PC080SN_OFFSETS(0, 8)
MCFG_PC080SN_GFXDECODE("gfxdecode")
- MCFG_PC080SN_PALETTE("palette")
MCFG_DEVICE_ADD("tc0140syt", TC0140SYT, 0)
MCFG_TC0140SYT_MASTER_CPU("maincpu")
diff --git a/src/mame/drivers/tumbleb.cpp b/src/mame/drivers/tumbleb.cpp
index 291dcab7e68..9c00b3289e1 100644
--- a/src/mame/drivers/tumbleb.cpp
+++ b/src/mame/drivers/tumbleb.cpp
@@ -2063,7 +2063,6 @@ static MACHINE_CONFIG_START( tumblepb, tumbleb_state )
MCFG_DECO_SPRITE_GFX_REGION(3)
MCFG_DECO_SPRITE_ISBOOTLEG(true)
MCFG_DECO_SPRITE_GFXDECODE("gfxdecode")
- MCFG_DECO_SPRITE_PALETTE("palette")
MCFG_GFXDECODE_ADD("gfxdecode", "palette", tumbleb)
MCFG_PALETTE_ADD("palette", 1024)
@@ -2102,7 +2101,6 @@ static MACHINE_CONFIG_START( tumbleb2, tumbleb_state )
MCFG_DECO_SPRITE_GFX_REGION(3)
MCFG_DECO_SPRITE_ISBOOTLEG(true)
MCFG_DECO_SPRITE_GFXDECODE("gfxdecode")
- MCFG_DECO_SPRITE_PALETTE("palette")
MCFG_GFXDECODE_ADD("gfxdecode", "palette", tumbleb)
MCFG_PALETTE_ADD("palette", 1024)
@@ -2144,7 +2142,6 @@ static MACHINE_CONFIG_START( jumpkids, tumbleb_state )
MCFG_DECO_SPRITE_GFX_REGION(3)
MCFG_DECO_SPRITE_ISBOOTLEG(true)
MCFG_DECO_SPRITE_GFXDECODE("gfxdecode")
- MCFG_DECO_SPRITE_PALETTE("palette")
MCFG_GFXDECODE_ADD("gfxdecode", "palette", tumbleb)
MCFG_PALETTE_ADD("palette", 1024)
@@ -2183,7 +2180,6 @@ static MACHINE_CONFIG_START( fncywld, tumbleb_state )
MCFG_DECO_SPRITE_ISBOOTLEG(true)
MCFG_DECO_SPRITE_TRANSPEN(15)
MCFG_DECO_SPRITE_GFXDECODE("gfxdecode")
- MCFG_DECO_SPRITE_PALETTE("palette")
MCFG_GFXDECODE_ADD("gfxdecode", "palette", fncywld)
MCFG_PALETTE_ADD("palette", 0x800)
@@ -2246,7 +2242,6 @@ static MACHINE_CONFIG_START( htchctch, tumbleb_state )
MCFG_DECO_SPRITE_GFX_REGION(3)
MCFG_DECO_SPRITE_ISBOOTLEG(true)
MCFG_DECO_SPRITE_GFXDECODE("gfxdecode")
- MCFG_DECO_SPRITE_PALETTE("palette")
MCFG_GFXDECODE_ADD("gfxdecode", "palette", tumbleb)
MCFG_PALETTE_ADD("palette", 1024)
@@ -2357,7 +2352,6 @@ static MACHINE_CONFIG_START( suprtrio, tumbleb_state )
MCFG_DECO_SPRITE_GFX_REGION(3)
MCFG_DECO_SPRITE_ISBOOTLEG(true)
MCFG_DECO_SPRITE_GFXDECODE("gfxdecode")
- MCFG_DECO_SPRITE_PALETTE("palette")
MCFG_GFXDECODE_ADD("gfxdecode", "palette", suprtrio)
MCFG_PALETTE_ADD("palette", 1024)
@@ -2396,7 +2390,6 @@ static MACHINE_CONFIG_START( pangpang, tumbleb_state )
MCFG_DECO_SPRITE_GFX_REGION(3)
MCFG_DECO_SPRITE_ISBOOTLEG(true)
MCFG_DECO_SPRITE_GFXDECODE("gfxdecode")
- MCFG_DECO_SPRITE_PALETTE("palette")
MCFG_GFXDECODE_ADD("gfxdecode", "palette", tumbleb)
MCFG_PALETTE_ADD("palette", 1024)
diff --git a/src/mame/drivers/tumblep.cpp b/src/mame/drivers/tumblep.cpp
index ed7a0bbd561..6e68462322c 100644
--- a/src/mame/drivers/tumblep.cpp
+++ b/src/mame/drivers/tumblep.cpp
@@ -313,12 +313,10 @@ static MACHINE_CONFIG_START( tumblep, tumblep_state )
MCFG_DECO16IC_PF12_8X8_BANK(0)
MCFG_DECO16IC_PF12_16X16_BANK(1)
MCFG_DECO16IC_GFXDECODE("gfxdecode")
- MCFG_DECO16IC_PALETTE("palette")
MCFG_DEVICE_ADD("spritegen", DECO_SPRITE, 0)
MCFG_DECO_SPRITE_GFX_REGION(2)
MCFG_DECO_SPRITE_GFXDECODE("gfxdecode")
- MCFG_DECO_SPRITE_PALETTE("palette")
/* sound hardware */
MCFG_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker")
diff --git a/src/mame/drivers/undrfire.cpp b/src/mame/drivers/undrfire.cpp
index 65e79c5acee..b820a7a8565 100644
--- a/src/mame/drivers/undrfire.cpp
+++ b/src/mame/drivers/undrfire.cpp
@@ -708,7 +708,6 @@ static MACHINE_CONFIG_START( undrfire, undrfire_state )
MCFG_TC0480SCP_OFFSETS(0x24, 0)
MCFG_TC0480SCP_OFFSETS_TX(-1, 0)
MCFG_TC0480SCP_GFXDECODE("gfxdecode")
- MCFG_TC0480SCP_PALETTE("palette")
/* sound hardware */
MCFG_DEVICE_ADD("taito_en", TAITO_EN, 0)
@@ -757,7 +756,6 @@ static MACHINE_CONFIG_START( cbombers, undrfire_state )
MCFG_TC0480SCP_OFFSETS_TX(-1, 0)
MCFG_TC0480SCP_COL_BASE(4096)
MCFG_TC0480SCP_GFXDECODE("gfxdecode")
- MCFG_TC0480SCP_PALETTE("palette")
/* sound hardware */
MCFG_DEVICE_ADD("taito_en", TAITO_EN, 0)
diff --git a/src/mame/drivers/vaportra.cpp b/src/mame/drivers/vaportra.cpp
index 4f30b993a32..0eaa9a755b7 100644
--- a/src/mame/drivers/vaportra.cpp
+++ b/src/mame/drivers/vaportra.cpp
@@ -254,7 +254,6 @@ static MACHINE_CONFIG_START( vaportra, vaportra_state )
MCFG_DECO16IC_PF12_8X8_BANK(0)
MCFG_DECO16IC_PF12_16X16_BANK(1)
MCFG_DECO16IC_GFXDECODE("gfxdecode")
- MCFG_DECO16IC_PALETTE("palette")
MCFG_DEVICE_ADD("tilegen2", DECO16IC, 0)
MCFG_DECO16IC_SPLIT(0)
@@ -270,12 +269,10 @@ static MACHINE_CONFIG_START( vaportra, vaportra_state )
MCFG_DECO16IC_PF12_8X8_BANK(2)
MCFG_DECO16IC_PF12_16X16_BANK(3)
MCFG_DECO16IC_GFXDECODE("gfxdecode")
- MCFG_DECO16IC_PALETTE("palette")
MCFG_DEVICE_ADD("spritegen", DECO_MXC06, 0)
- deco_mxc06_device::set_gfx_region(*device, 4);
+ MCFG_DECO_MXC06_GFX_REGION(4)
MCFG_DECO_MXC06_GFXDECODE("gfxdecode")
- MCFG_DECO_MXC06_PALETTE("palette")
/* sound hardware */
MCFG_SPEAKER_STANDARD_MONO("mono")
diff --git a/src/mame/drivers/vendetta.cpp b/src/mame/drivers/vendetta.cpp
index 04795e83708..8bd74706d79 100644
--- a/src/mame/drivers/vendetta.cpp
+++ b/src/mame/drivers/vendetta.cpp
@@ -460,16 +460,13 @@ static MACHINE_CONFIG_START( vendetta, vendetta_state )
MCFG_PALETTE_ENABLE_SHADOWS()
MCFG_PALETTE_FORMAT(xBBBBBGGGGGRRRRR)
- MCFG_GFXDECODE_ADD("gfxdecode", "palette", empty)
-
MCFG_DEVICE_ADD("k052109", K052109, 0)
MCFG_GFX_PALETTE("palette")
MCFG_K052109_CB(vendetta_state, vendetta_tile_callback)
MCFG_DEVICE_ADD("k053246", K053246, 0)
MCFG_K053246_CB(vendetta_state, sprite_callback)
- MCFG_K053246_CONFIG("gfx2", 1, NORMAL_PLANE_ORDER, 53, 6)
- MCFG_K053246_GFXDECODE("gfxdecode")
+ MCFG_K053246_CONFIG("gfx2", NORMAL_PLANE_ORDER, 53, 6)
MCFG_K053246_PALETTE("palette")
MCFG_K053251_ADD("k053251")
@@ -507,7 +504,7 @@ static MACHINE_CONFIG_DERIVED( esckids, vendetta )
MCFG_K052109_CB(vendetta_state, esckids_tile_callback)
MCFG_DEVICE_MODIFY("k053246")
- MCFG_K053246_CONFIG("gfx2", 1, NORMAL_PLANE_ORDER, 101, 6)
+ MCFG_K053246_CONFIG("gfx2", NORMAL_PLANE_ORDER, 101, 6)
MCFG_DEVICE_ADD("k053252", K053252, 6000000)
MCFG_K053252_OFFSETS(12*8, 1*8)
diff --git a/src/mame/drivers/welltris.cpp b/src/mame/drivers/welltris.cpp
index 05b29b06cfc..5d547ef911e 100644
--- a/src/mame/drivers/welltris.cpp
+++ b/src/mame/drivers/welltris.cpp
@@ -723,7 +723,6 @@ static MACHINE_CONFIG_START( welltris, welltris_state )
MCFG_VSYSTEM_SPR2_SET_GFXREGION(1)
MCFG_VSYSTEM_SPR2_SET_PRITYPE(-1)
MCFG_VSYSTEM_SPR2_GFXDECODE("gfxdecode")
- MCFG_VSYSTEM_SPR2_PALETTE("palette")
/* sound hardware */
MCFG_SPEAKER_STANDARD_MONO("mono")
diff --git a/src/mame/drivers/xexex.cpp b/src/mame/drivers/xexex.cpp
index 24098d42aca..c9d3ebf32a8 100644
--- a/src/mame/drivers/xexex.cpp
+++ b/src/mame/drivers/xexex.cpp
@@ -521,18 +521,14 @@ static MACHINE_CONFIG_START( xexex, xexex_state )
MCFG_PALETTE_ENABLE_SHADOWS()
MCFG_PALETTE_ENABLE_HILIGHTS()
- MCFG_GFXDECODE_ADD("gfxdecode", "palette", empty)
-
MCFG_DEVICE_ADD("k056832", K056832, 0)
MCFG_K056832_CB(xexex_state, tile_callback)
- MCFG_K056832_CONFIG("gfx1", 0, K056832_BPP_4, 1, 0, "none")
- MCFG_K056832_GFXDECODE("gfxdecode")
+ MCFG_K056832_CONFIG("gfx1", K056832_BPP_4, 1, 0, "none")
MCFG_K056832_PALETTE("palette")
MCFG_DEVICE_ADD("k053246", K053246, 0)
MCFG_K053246_CB(xexex_state, sprite_callback)
- MCFG_K053246_CONFIG("gfx2", 1, NORMAL_PLANE_ORDER, -48, 32)
- MCFG_K053246_GFXDECODE("gfxdecode")
+ MCFG_K053246_CONFIG("gfx2", NORMAL_PLANE_ORDER, -48, 32)
MCFG_K053246_PALETTE("palette")
MCFG_K053250_ADD("k053250", "palette", "screen", -5, -16)
diff --git a/src/mame/drivers/xmen.cpp b/src/mame/drivers/xmen.cpp
index fb5e3a62705..c924ce91528 100644
--- a/src/mame/drivers/xmen.cpp
+++ b/src/mame/drivers/xmen.cpp
@@ -336,16 +336,13 @@ static MACHINE_CONFIG_START( xmen, xmen_state )
MCFG_PALETTE_ENABLE_SHADOWS()
MCFG_PALETTE_FORMAT(xBBBBBGGGGGRRRRR)
- MCFG_GFXDECODE_ADD("gfxdecode", "palette", empty)
-
MCFG_DEVICE_ADD("k052109", K052109, 0)
MCFG_GFX_PALETTE("palette")
MCFG_K052109_CB(xmen_state, tile_callback)
MCFG_DEVICE_ADD("k053246", K053246, 0)
MCFG_K053246_CB(xmen_state, sprite_callback)
- MCFG_K053246_CONFIG("gfx2", 1, NORMAL_PLANE_ORDER, 53, -2)
- MCFG_K053246_GFXDECODE("gfxdecode")
+ MCFG_K053246_CONFIG("gfx2", NORMAL_PLANE_ORDER, 53, -2)
MCFG_K053246_PALETTE("palette")
MCFG_K053251_ADD("k053251")
@@ -399,17 +396,14 @@ static MACHINE_CONFIG_START( xmen6p, xmen_state )
MCFG_VIDEO_START_OVERRIDE(xmen_state,xmen6p)
- MCFG_GFXDECODE_ADD("gfxdecode", "palette", empty)
-
MCFG_DEVICE_ADD("k052109", K052109, 0)
MCFG_GFX_PALETTE("palette")
MCFG_K052109_CB(xmen_state, tile_callback)
MCFG_DEVICE_ADD("k053246", K053246, 0)
MCFG_K053246_CB(xmen_state, sprite_callback)
- MCFG_K053246_CONFIG("gfx2", 1, NORMAL_PLANE_ORDER, 53, -2)
+ MCFG_K053246_CONFIG("gfx2", NORMAL_PLANE_ORDER, 53, -2)
MCFG_K053246_SET_SCREEN("screen")
- MCFG_K053246_GFXDECODE("gfxdecode")
MCFG_K053246_PALETTE("palette")
MCFG_K053251_ADD("k053251")
diff --git a/src/mame/drivers/zr107.cpp b/src/mame/drivers/zr107.cpp
index f838f3e21e2..202c0f102f9 100644
--- a/src/mame/drivers/zr107.cpp
+++ b/src/mame/drivers/zr107.cpp
@@ -784,12 +784,9 @@ static MACHINE_CONFIG_START( zr107, zr107_state )
MCFG_VIDEO_START_OVERRIDE(zr107_state,zr107)
- MCFG_GFXDECODE_ADD("gfxdecode", "palette", empty)
-
MCFG_DEVICE_ADD("k056832", K056832, 0)
MCFG_K056832_CB(zr107_state, tile_callback)
- MCFG_K056832_CONFIG("gfx2", 1, K056832_BPP_8, 1, 0, "none")
- MCFG_K056832_GFXDECODE("gfxdecode")
+ MCFG_K056832_CONFIG("gfx2", K056832_BPP_8, 1, 0, "none")
MCFG_K056832_PALETTE("palette")
MCFG_DEVICE_ADD("k001005", K001005, 0)
@@ -856,16 +853,11 @@ static MACHINE_CONFIG_START( jetwave, zr107_state )
MCFG_VIDEO_START_OVERRIDE(zr107_state,jetwave)
- MCFG_GFXDECODE_ADD("gfxdecode", "palette", empty)
-
MCFG_DEVICE_ADD("k001604", K001604, 0)
- MCFG_K001604_GFX_INDEX1(0)
- MCFG_K001604_GFX_INDEX2(1)
MCFG_K001604_LAYER_SIZE(0)
MCFG_K001604_ROZ_SIZE(0)
MCFG_K001604_TXT_OFFSET(0)
MCFG_K001604_ROZ_OFFSET(16384)
- MCFG_K001604_GFXDECODE("gfxdecode")
MCFG_K001604_PALETTE("palette")
MCFG_DEVICE_ADD("k001005", K001005, 0)
diff --git a/src/mame/includes/konamigx.h b/src/mame/includes/konamigx.h
index f5ee6f795d5..fb5f54f28d5 100644
--- a/src/mame/includes/konamigx.h
+++ b/src/mame/includes/konamigx.h
@@ -52,7 +52,7 @@ public:
required_device<cpu_device> m_maincpu;
optional_device<cpu_device> m_soundcpu;
optional_device<tms57002_device> m_dasp;
- required_device<k053252_device> m_k053252; // not hooked up in tasman.cpp yet (does it even have it?)
+ required_device<k053252_device> m_k053252;
required_device<k055673_device> m_k055673;
required_device<k055555_device> m_k055555;
required_device<k056832_device> m_k056832;
@@ -60,7 +60,7 @@ public:
optional_device<k056800_device> m_k056800;
optional_device<k054539_device> m_k054539_1;
optional_device<k054539_device> m_k054539_2;
- required_device<gfxdecode_device> m_gfxdecode;
+ optional_device<gfxdecode_device> m_gfxdecode;
required_device<screen_device> m_screen;
required_device<palette_device> m_palette;
diff --git a/src/mame/machine/st0016.cpp b/src/mame/machine/st0016.cpp
index 598a94ebddc..c663acae492 100644
--- a/src/mame/machine/st0016.cpp
+++ b/src/mame/machine/st0016.cpp
@@ -31,6 +31,7 @@ ADDRESS_MAP_END
st0016_cpu_device::st0016_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
: z80_device(mconfig, ST0016_CPU, "ST0016", tag, owner, clock, "st0016_cpu", __FILE__),
+ device_gfx_interface(mconfig, *this, nullptr, "palette"),
st0016_game(-1),
st0016_spr_bank(0),
st0016_spr2_bank(0),
@@ -43,11 +44,7 @@ st0016_cpu_device::st0016_cpu_device(const machine_config &mconfig, const char *
m_io_space_config("io", ENDIANNESS_LITTLE, 8, 16, 0, ADDRESS_MAP_NAME(st0016_cpu_internal_io_map)),
m_space_config("regs", ENDIANNESS_LITTLE, 8, 16, 0, ADDRESS_MAP_NAME(st0016_cpu_internal_map)),
-
- m_screen(*this, ":screen"),
- m_gfxdecode(*this, "gfxdecode"),
- m_palette(*this, "palette")
-
+ m_screen(*this, ":screen")
{
for (auto & elem : st0016_vregs)
elem = 0;
@@ -109,14 +106,10 @@ READ8_MEMBER(st0016_cpu_device::soundram_read)
return m_charram[offset];
}
-static GFXDECODE_START( st0016 )
-GFXDECODE_END
-
/* CPU interface */
static MACHINE_CONFIG_FRAGMENT( st0016_cpu )
MCFG_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker")
- MCFG_GFXDECODE_ADD("gfxdecode", "palette", st0016)
MCFG_PALETTE_ADD("palette", 16*16*4+1)
MCFG_DEVICE_ADD("stsnd", ST0016, 0)
@@ -218,8 +211,8 @@ WRITE8_MEMBER(st0016_cpu_device::st0016_palette_ram_w)
st0016_paletteram[ST0016_PAL_BANK_SIZE*st0016_pal_bank+offset]=data;
val=st0016_paletteram[color*2]+(st0016_paletteram[color*2+1]<<8);
if(!color)
- m_palette->set_pen_color(UNUSED_PEN,pal5bit(val >> 0),pal5bit(val >> 5),pal5bit(val >> 10)); /* same as color 0 - bg ? */
- m_palette->set_pen_color(color,pal5bit(val >> 0),pal5bit(val >> 5),pal5bit(val >> 10));
+ palette().set_pen_color(UNUSED_PEN,pal5bit(val >> 0),pal5bit(val >> 5),pal5bit(val >> 10)); /* same as color 0 - bg ? */
+ palette().set_pen_color(color,pal5bit(val >> 0),pal5bit(val >> 5),pal5bit(val >> 10));
}
READ8_MEMBER(st0016_cpu_device::st0016_character_ram_r)
@@ -230,7 +223,7 @@ READ8_MEMBER(st0016_cpu_device::st0016_character_ram_r)
WRITE8_MEMBER(st0016_cpu_device::st0016_character_ram_w)
{
m_charram[ST0016_CHAR_BANK_SIZE*st0016_char_bank+offset]=data;
- m_gfxdecode->gfx(st0016_ramgfx)->mark_dirty(st0016_char_bank);
+ gfx(st0016_ramgfx)->mark_dirty(st0016_char_bank);
}
READ8_MEMBER(st0016_cpu_device::st0016_vregs_r)
@@ -383,7 +376,7 @@ void st0016_cpu_device::draw_sprites(bitmap_ind16 &bitmap, const rectangle &clip
*/
- gfx_element *gfx = m_gfxdecode->gfx(st0016_ramgfx);
+ gfx_element *gfx = this->gfx(st0016_ramgfx);
int i, j, lx, ly, x, y, code, offset, length, sx, sy, color, flipx, flipy, scrollx, scrolly/*,plx,ply*/;
@@ -587,13 +580,13 @@ void st0016_cpu_device::startup()
/* find first empty slot to decode gfx */
for (gfx_index = 0; gfx_index < MAX_GFX_ELEMENTS; gfx_index++)
- if (m_gfxdecode->gfx(gfx_index) == nullptr)
+ if (gfx(gfx_index) == nullptr)
break;
assert(gfx_index != MAX_GFX_ELEMENTS);
/* create the char set (gfx will then be updated dynamically from RAM) */
- m_gfxdecode->set_gfx(gfx_index, std::make_unique<gfx_element>(m_palette, charlayout, m_charram.get(), 0, 0x40, 0));
+ set_gfx(gfx_index, std::make_unique<gfx_element>(palette(), charlayout, m_charram.get(), 0, 0x40, 0));
st0016_ramgfx = gfx_index;
spr_dx=0;
@@ -607,7 +600,7 @@ void st0016_cpu_device::startup()
void st0016_cpu_device::draw_bgmap(bitmap_ind16 &bitmap, const rectangle &cliprect, int priority)
{
- gfx_element *gfx = m_gfxdecode->gfx(st0016_ramgfx);
+ gfx_element *gfx = this->gfx(st0016_ramgfx);
int j;
//for(j=0x40-8;j>=0;j-=8)
for (j = 0; j < 0x40; j += 8)
diff --git a/src/mame/machine/st0016.h b/src/mame/machine/st0016.h
index 6401ddc5c19..447ce7e4d3c 100644
--- a/src/mame/machine/st0016.h
+++ b/src/mame/machine/st0016.h
@@ -34,7 +34,7 @@ extern UINT8 macs_cart_slot;
-class st0016_cpu_device : public z80_device
+class st0016_cpu_device : public z80_device, public device_gfx_interface
{
public:
st0016_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32);
@@ -97,13 +97,6 @@ protected:
}
};
required_device<screen_device> m_screen;
- required_device<gfxdecode_device> m_gfxdecode;
-
-public: // speglsht needs to access this for mixing
- required_device<palette_device> m_palette;
-
-private:
-
};
diff --git a/src/mame/video/733_asr.cpp b/src/mame/video/733_asr.cpp
index e9c446301a2..0194a1316fc 100644
--- a/src/mame/video/733_asr.cpp
+++ b/src/mame/video/733_asr.cpp
@@ -82,24 +82,13 @@ const device_type ASR733 = &device_creator<asr733_device>;
asr733_device::asr733_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
: device_t(mconfig, ASR733, "733 ASR", tag, owner, clock, "asr733", __FILE__),
- m_palette(*this, "palette"),
- m_gfxdecode(*this, "gfxdecode"),
+ device_gfx_interface(mconfig, *this, GFXDECODE_NAME(asr733), "palette"),
m_keyint_line(*this),
m_lineint_line(*this)
{
}
//-------------------------------------------------
-// device_config_complete - perform any
-// operations now that the configuration is
-// complete
-//-------------------------------------------------
-
-void asr733_device::device_config_complete()
-{
-}
-
-//-------------------------------------------------
// device_start - device-specific startup
//-------------------------------------------------
@@ -211,7 +200,7 @@ void asr733_device::set_interrupt_line()
/* write a single char on screen */
void asr733_device::draw_char(int character, int x, int y, int color)
{
- m_gfxdecode->gfx(0)->opaque(*m_bitmap, m_bitmap->cliprect(), character-32, color, 0, 0, x+1, y);
+ gfx(0)->opaque(*m_bitmap, m_bitmap->cliprect(), character-32, color, 0, 0, x+1, y);
}
void asr733_device::linefeed()
@@ -221,7 +210,7 @@ void asr733_device::linefeed()
for (int y=asr_window_offset_y; y<asr_window_offset_y+asr_window_height-asr_scroll_step; y++)
{
extract_scanline8(*m_bitmap, asr_window_offset_x, y+asr_scroll_step, asr_window_width, buf);
- draw_scanline8(*m_bitmap, asr_window_offset_x, y, asr_window_width, buf, m_palette->pens());
+ draw_scanline8(*m_bitmap, asr_window_offset_x, y, asr_window_width, buf, palette().pens());
}
const rectangle asr_scroll_clear_window(
@@ -721,8 +710,6 @@ UINT32 asr733_device::screen_update(screen_device &screen, bitmap_ind16 &bitmap,
}
static MACHINE_CONFIG_FRAGMENT( asr733 )
- MCFG_GFXDECODE_ADD("gfxdecode", "palette", asr733)
-
MCFG_PALETTE_ADD("palette", 2)
MCFG_PALETTE_INIT_OWNER(asr733_device, asr733)
diff --git a/src/mame/video/733_asr.h b/src/mame/video/733_asr.h
index 9c45c69c6ed..d5b48eebc9e 100644
--- a/src/mame/video/733_asr.h
+++ b/src/mame/video/733_asr.h
@@ -10,7 +10,7 @@ enum
asr733_chr_region_len = 128*asr733_single_char_len
};
-class asr733_device : public device_t
+class asr733_device : public device_t, public device_gfx_interface
{
public:
asr733_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
@@ -33,7 +33,6 @@ public:
protected:
// device-level overrides
- void device_config_complete() override;
void device_start() override;
void device_reset() override;
machine_config_constructor device_mconfig_additions() const override;
@@ -73,8 +72,6 @@ private:
std::unique_ptr<bitmap_ind16> m_bitmap;
- required_device<palette_device> m_palette;
- required_device<gfxdecode_device> m_gfxdecode;
devcb_write_line m_keyint_line;
devcb_write_line m_lineint_line;
};
diff --git a/src/mame/video/911_vdt.cpp b/src/mame/video/911_vdt.cpp
index ff7b2b6a03c..6b00207b919 100644
--- a/src/mame/video/911_vdt.cpp
+++ b/src/mame/video/911_vdt.cpp
@@ -145,24 +145,13 @@ const device_type VDT911 = &device_creator<vdt911_device>;
vdt911_device::vdt911_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
: device_t(mconfig, VDT911, "911 VDT", tag, owner, clock, "vdt911", __FILE__),
+ device_gfx_interface(mconfig, *this, GFXDECODE_NAME(vdt911), "palette"),
m_beeper(*this, "beeper"),
- m_gfxdecode(*this, "gfxdecode"),
- m_palette(*this, "palette"),
m_keyint_line(*this),
m_lineint_line(*this)
{
}
-//-------------------------------------------------
-// device_config_complete - perform any
-// operations now that the configuration is
-// complete
-//-------------------------------------------------
-
-void vdt911_device::device_config_complete()
-{
-}
-
enum
{
BLINK_TIMER,
@@ -467,7 +456,7 @@ WRITE8_MEMBER( vdt911_device::cru_w )
*/
void vdt911_device::refresh(bitmap_ind16 &bitmap, const rectangle &cliprect, int x, int y)
{
- gfx_element *gfx = m_gfxdecode->gfx(m_model);
+ gfx_element *gfx = this->gfx(m_model);
int height = (m_screen_size == char_960) ? 12 : /*25*/24;
int use_8bit_charcodes = USES_8BIT_CHARCODES();
@@ -822,8 +811,6 @@ static MACHINE_CONFIG_FRAGMENT( vdt911 )
MCFG_PALETTE_ADD("palette", 8)
MCFG_PALETTE_INDIRECT_ENTRIES(3)
MCFG_PALETTE_INIT_OWNER(vdt911_device, vdt911)
-
- MCFG_GFXDECODE_ADD("gfxdecode", "palette", vdt911)
MACHINE_CONFIG_END
//-------------------------------------------------
diff --git a/src/mame/video/911_vdt.h b/src/mame/video/911_vdt.h
index e0ced6bbede..7d90d549d50 100644
--- a/src/mame/video/911_vdt.h
+++ b/src/mame/video/911_vdt.h
@@ -34,7 +34,7 @@ enum vdt911_model_t
vdt911_model_FrenchWP // French word processing
};
-class vdt911_device : public device_t
+class vdt911_device : public device_t, public device_gfx_interface
{
public:
vdt911_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
@@ -58,7 +58,6 @@ public:
protected:
// device-level overrides
- void device_config_complete() override;
void device_start() override;
void device_reset() override;
@@ -103,8 +102,6 @@ private:
char m_foreign_mode;
required_device<beep_device> m_beeper;
- required_device<gfxdecode_device> m_gfxdecode;
- required_device<palette_device> m_palette;
devcb_write_line m_keyint_line;
devcb_write_line m_lineint_line;
};
diff --git a/src/mame/video/bfm_adr2.cpp b/src/mame/video/bfm_adr2.cpp
index bca9061ffc2..1bc4615fd69 100644
--- a/src/mame/video/bfm_adr2.cpp
+++ b/src/mame/video/bfm_adr2.cpp
@@ -115,13 +115,32 @@ E000-FFFF | R | D D D D D D D D | 8K ROM
+static const gfx_layout charlayout =
+{
+ 8,8, // 8 * 8 characters
+ 8192, // 8192 characters
+ 4, // 4 bits per pixel
+ { 0,1,2,3 },
+ { 0*4, 1*4, 2*4, 3*4, 4*4, 5*4, 6*4, 7*4 },
+ { 0*8*4, 1*8*4, 2*8*4, 3*8*4, 4*8*4, 5*8*4, 6*8*4, 7*8*4 },
+ 8*8*4
+};
+
+// this is a strange beast !!!!
+//
+// characters are grouped by 64 (512 pixels)
+// there are max 128 of these groups
+
+static GFXDECODE_START( adder2 )
+ GFXDECODE_ENTRY( ":gfx1", 0, charlayout, 0, 16 )
+GFXDECODE_END
+
const device_type BFM_ADDER2 = &device_creator<bfm_adder2_device>;
bfm_adder2_device::bfm_adder2_device( const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock )
: device_t(mconfig, BFM_ADDER2, "BFM ADDER2", tag, owner, clock, "bfm_adder2", __FILE__),
- m_cpu(*this, "adder2"),
- m_gfxdecode(*this, "gfxdecode"),
- m_palette(*this, "palette")
+ device_gfx_interface(mconfig, *this, GFXDECODE_NAME(adder2), "palette"),
+ m_cpu(*this, "adder2")
{
}
@@ -194,7 +213,7 @@ void bfm_adder2_device::device_reset()
void bfm_adder2_device::device_start()
{
- if (!m_palette->started())
+ if (!palette().started())
throw device_missing_dependencies();
adder2_decode_char_roms();
@@ -211,26 +230,26 @@ void bfm_adder2_device::device_start()
save_item(NAME(m_adder_ram));
save_item(NAME(m_adder_screen_ram));
- m_tilemap0 = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(bfm_adder2_device::get_tile0_info),this), TILEMAP_SCAN_ROWS, 8, 8, 50, 35);
-
- m_tilemap1 = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(bfm_adder2_device::get_tile1_info),this), TILEMAP_SCAN_ROWS, 8, 8, 50, 35);
-
- m_palette->set_pen_color(0,rgb_t(0x00,0x00,0x00));
- m_palette->set_pen_color(1,rgb_t(0x00,0x00,0xFF));
- m_palette->set_pen_color(2,rgb_t(0x00,0xFF,0x00));
- m_palette->set_pen_color(3,rgb_t(0x00,0xFF,0xFF));
- m_palette->set_pen_color(4,rgb_t(0xFF,0x00,0x00));
- m_palette->set_pen_color(5,rgb_t(0xFF,0x00,0xFF));
- m_palette->set_pen_color(6,rgb_t(0xFF,0xFF,0x00));
- m_palette->set_pen_color(7,rgb_t(0xFF,0xFF,0xFF));
- m_palette->set_pen_color(8,rgb_t(0x80,0x80,0x80));
- m_palette->set_pen_color(9,rgb_t(0x00,0x00,0x80));
- m_palette->set_pen_color(10,rgb_t(0x00,0x80,0x00));
- m_palette->set_pen_color(11,rgb_t(0x00,0x80,0x80));
- m_palette->set_pen_color(12,rgb_t(0x80,0x00,0x00));
- m_palette->set_pen_color(13,rgb_t(0x80,0x00,0x80));
- m_palette->set_pen_color(14,rgb_t(0x80,0x80,0x00));
- m_palette->set_pen_color(15,rgb_t(0x80,0x80,0x80));
+ m_tilemap0 = &machine().tilemap().create(*this, tilemap_get_info_delegate(FUNC(bfm_adder2_device::get_tile0_info),this), TILEMAP_SCAN_ROWS, 8, 8, 50, 35);
+
+ m_tilemap1 = &machine().tilemap().create(*this, tilemap_get_info_delegate(FUNC(bfm_adder2_device::get_tile1_info),this), TILEMAP_SCAN_ROWS, 8, 8, 50, 35);
+
+ palette().set_pen_color(0,rgb_t(0x00,0x00,0x00));
+ palette().set_pen_color(1,rgb_t(0x00,0x00,0xFF));
+ palette().set_pen_color(2,rgb_t(0x00,0xFF,0x00));
+ palette().set_pen_color(3,rgb_t(0x00,0xFF,0xFF));
+ palette().set_pen_color(4,rgb_t(0xFF,0x00,0x00));
+ palette().set_pen_color(5,rgb_t(0xFF,0x00,0xFF));
+ palette().set_pen_color(6,rgb_t(0xFF,0xFF,0x00));
+ palette().set_pen_color(7,rgb_t(0xFF,0xFF,0xFF));
+ palette().set_pen_color(8,rgb_t(0x80,0x80,0x80));
+ palette().set_pen_color(9,rgb_t(0x00,0x00,0x80));
+ palette().set_pen_color(10,rgb_t(0x00,0x80,0x00));
+ palette().set_pen_color(11,rgb_t(0x00,0x80,0x80));
+ palette().set_pen_color(12,rgb_t(0x80,0x00,0x00));
+ palette().set_pen_color(13,rgb_t(0x80,0x00,0x80));
+ palette().set_pen_color(14,rgb_t(0x80,0x80,0x00));
+ palette().set_pen_color(15,rgb_t(0x80,0x80,0x80));
}
// video update ///////////////////////////////////////////////////////////
@@ -278,7 +297,7 @@ WRITE8_MEMBER( bfm_adder2_device::screen_ram_w )
r = ((data & 0x18)>>3) * 85; // 00011000b = 0x18
g = ((data & 0x06)>>1) * 85; // 00000110b = 0x06
b = ((data & 0x01) ) * 255;
- m_palette->set_pen_color(pal, rgb_t(r,g,b));
+ palette().set_pen_color(pal, rgb_t(r,g,b));
}
if ( m_adder2_screen_page_reg & SL_ACCESS )
@@ -519,26 +538,6 @@ static ADDRESS_MAP_START( adder2_memmap, AS_PROGRAM, 8, bfm_adder2_device )
AM_RANGE(0xE000, 0xFFFF) AM_ROM AM_REGION(":adder2", 0xE000) // 8k ROM
ADDRESS_MAP_END
-static const gfx_layout charlayout =
-{
- 8,8, // 8 * 8 characters
- 8192, // 8192 characters
- 4, // 4 bits per pixel
- { 0,1,2,3 },
- { 0*4, 1*4, 2*4, 3*4, 4*4, 5*4, 6*4, 7*4 },
- { 0*8*4, 1*8*4, 2*8*4, 3*8*4, 4*8*4, 5*8*4, 6*8*4, 7*8*4 },
- 8*8*4
-};
-
-// this is a strange beast !!!!
-//
-// characters are grouped by 64 (512 pixels)
-// there are max 128 of these groups
-
-static GFXDECODE_START( adder2 )
- GFXDECODE_ENTRY( ":gfx1", 0, charlayout, 0, 16 )
-GFXDECODE_END
-
///////////////////////////////////////////////////////////////////////////
static MACHINE_CONFIG_FRAGMENT( adder2 )
@@ -550,7 +549,6 @@ static MACHINE_CONFIG_FRAGMENT( adder2 )
MCFG_SCREEN_UPDATE_DEVICE(DEVICE_SELF, bfm_adder2_device, update_screen)
MCFG_PALETTE_ADD("palette", 16)
- MCFG_GFXDECODE_ADD("gfxdecode", "palette", adder2)
MCFG_CPU_ADD("adder2", M6809, ADDER_CLOCK/4 ) // adder2 board 6809 CPU at 2 Mhz
MCFG_CPU_PROGRAM_MAP(adder2_memmap) // setup adder2 board memorymap
diff --git a/src/mame/video/bfm_adr2.h b/src/mame/video/bfm_adr2.h
index 301ee7acf0d..8f278dfb65c 100644
--- a/src/mame/video/bfm_adr2.h
+++ b/src/mame/video/bfm_adr2.h
@@ -3,7 +3,7 @@
#ifndef INC_BFMADDER2
#define INC_BFMADDER2
-class bfm_adder2_device : public device_t
+class bfm_adder2_device : public device_t, public device_gfx_interface
{
public:
// construction/destruction
@@ -61,8 +61,6 @@ private:
UINT8 m_adder2_sc2data;
optional_device<cpu_device> m_cpu;
- required_device<gfxdecode_device> m_gfxdecode;
- required_device<palette_device> m_palette;
};
// device type definition
@@ -76,7 +74,4 @@ extern const device_type BFM_ADDER2;
#define MCFG_BFM_ADDER2_ADD(_tag) \
MCFG_DEVICE_ADD(_tag, BFM_ADDER2, 0)
-#define MCFG_BFM_ADDER2_PALETTE(_palette_tag) \
- bfm_adder2_device::static_set_palette_tag(*device, "^" _palette_tag);
-
#endif
diff --git a/src/mame/video/decbac06.h b/src/mame/video/decbac06.h
index 51a991636fa..0f9c24ccdd3 100644
--- a/src/mame/video/decbac06.h
+++ b/src/mame/video/decbac06.h
@@ -152,3 +152,6 @@ extern const device_type DECO_BAC06;
#define MCFG_DECO_BAC06_GFXDECODE(_gfxtag) \
deco_bac06_device::static_set_gfxdecode_tag(*device, "^" _gfxtag);
+
+#define MCFG_DECO_BAC06_GFX_REGION_WIDE(_8x8, _16x16, _wide) \
+ deco_bac06_device::set_gfx_region_wide(*device, _8x8, _16x16, _wide);
diff --git a/src/mame/video/deckarn.cpp b/src/mame/video/deckarn.cpp
index 795bf5894d6..bde0dba82ab 100644
--- a/src/mame/video/deckarn.cpp
+++ b/src/mame/video/deckarn.cpp
@@ -17,8 +17,7 @@ const device_type DECO_KARNOVSPRITES = &device_creator<deco_karnovsprites_device
deco_karnovsprites_device::deco_karnovsprites_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
: device_t(mconfig, DECO_KARNOVSPRITES, "DECO Karnov Sprites", tag, owner, clock, "deco_karnovsprites", __FILE__),
m_gfxregion(0),
- m_gfxdecode(*this),
- m_palette(*this)
+ m_gfxdecode(*this)
{
}
@@ -112,13 +111,3 @@ void deco_karnovsprites_device::draw_sprites( bitmap_ind16 &bitmap, const rectan
colour,fx,fy,x,y+16,0);
}
}
-
-//-------------------------------------------------
-// static_set_palette_tag: Set the tag of the
-// palette device
-//-------------------------------------------------
-
-void deco_karnovsprites_device::static_set_palette_tag(device_t &device, const char *tag)
-{
- downcast<deco_karnovsprites_device &>(device).m_palette.set_tag(tag);
-}
diff --git a/src/mame/video/deckarn.h b/src/mame/video/deckarn.h
index 560e0f87ba0..7da58cdc789 100644
--- a/src/mame/video/deckarn.h
+++ b/src/mame/video/deckarn.h
@@ -11,7 +11,6 @@ public:
// static configuration
static void static_set_gfxdecode_tag(device_t &device, const char *tag);
- static void static_set_palette_tag(device_t &device, const char *tag);
static void set_gfx_region(device_t &device, int region);
protected:
@@ -21,7 +20,6 @@ protected:
UINT8 m_gfxregion;
private:
required_device<gfxdecode_device> m_gfxdecode;
- required_device<palette_device> m_palette;
};
extern const device_type DECO_KARNOVSPRITES;
@@ -29,5 +27,5 @@ extern const device_type DECO_KARNOVSPRITES;
#define MCFG_DECO_KARNOVSPRITES_GFXDECODE(_gfxtag) \
deco_karnovsprites_device::static_set_gfxdecode_tag(*device, "^" _gfxtag);
-#define MCFG_DECO_KARNOVSPRITES_PALETTE(_palette_tag) \
- deco_karnovsprites_device::static_set_palette_tag(*device, "^" _palette_tag);
+#define MCFG_DECO_KARNOVSPRITES_GFX_REGION(_region) \
+ deco_karnovsprites_device::set_gfx_region(*device, _region);
diff --git a/src/mame/video/decmxc06.cpp b/src/mame/video/decmxc06.cpp
index 888d5ae6ada..87bb3aa922e 100644
--- a/src/mame/video/decmxc06.cpp
+++ b/src/mame/video/decmxc06.cpp
@@ -54,8 +54,7 @@ deco_mxc06_device::deco_mxc06_device(const machine_config &mconfig, const char *
device_video_interface(mconfig, *this),
m_gfxregion(0),
m_ramsize(0x800),
- m_gfxdecode(*this),
- m_palette(*this)
+ m_gfxdecode(*this)
{
}
@@ -223,13 +222,3 @@ void deco_mxc06_device::device_start()
void deco_mxc06_device::device_reset()
{
}
-
-//-------------------------------------------------
-// static_set_palette_tag: Set the tag of the
-// palette device
-//-------------------------------------------------
-
-void deco_mxc06_device::static_set_palette_tag(device_t &device, const char *tag)
-{
- downcast<deco_mxc06_device &>(device).m_palette.set_tag(tag);
-}
diff --git a/src/mame/video/decmxc06.h b/src/mame/video/decmxc06.h
index a4b58a73195..b00a7d851b5 100644
--- a/src/mame/video/decmxc06.h
+++ b/src/mame/video/decmxc06.h
@@ -11,7 +11,6 @@ public:
// static configuration
static void static_set_gfxdecode_tag(device_t &device, const char *tag);
- static void static_set_palette_tag(device_t &device, const char *tag);
static void set_gfx_region(device_t &device, int region);
static void set_ram_size(device_t &device, int size)
{
@@ -35,7 +34,6 @@ protected:
private:
required_device<gfxdecode_device> m_gfxdecode;
- required_device<palette_device> m_palette;
};
extern const device_type DECO_MXC06;
@@ -43,8 +41,8 @@ extern const device_type DECO_MXC06;
#define MCFG_DECO_MXC06_GFXDECODE(_gfxtag) \
deco_mxc06_device::static_set_gfxdecode_tag(*device, "^" _gfxtag);
-#define MCFG_DECO_MXC06_PALETTE(_palette_tag) \
- deco_mxc06_device::static_set_palette_tag(*device, "^" _palette_tag);
+#define MCFG_DECO_MXC06_GFX_REGION(_region) \
+ deco_mxc06_device::set_gfx_region(*device, _region);
#define MCFG_DECO_MXC06_RAMSIZE(_size) \
deco_mxc06_device::set_ram_size(*device, _size);
diff --git a/src/mame/video/deco16ic.cpp b/src/mame/video/deco16ic.cpp
index fa5b1caba0a..df16e96bfc0 100644
--- a/src/mame/video/deco16ic.cpp
+++ b/src/mame/video/deco16ic.cpp
@@ -202,8 +202,7 @@ deco16ic_device::deco16ic_device(const machine_config &mconfig, const char *tag,
m_pf2_colourmask(0xf),
m_pf12_8x8_gfx_bank(0),
m_pf12_16x16_gfx_bank(0),
- m_gfxdecode(*this),
- m_palette(*this)
+ m_gfxdecode(*this)
{
}
@@ -511,7 +510,7 @@ void deco16ic_device::custom_tilemap_draw(
if ((flags & TILEMAP_DRAW_OPAQUE) || (p & trans_mask))
{
- bitmap.pix(y, x) = m_palette->pen(p);
+ bitmap.pix(y, x) = m_gfxdecode->palette().pen(p);
if (screen.priority().valid())
{
UINT8 *pri = &screen.priority().pix8(y);
@@ -943,13 +942,3 @@ void deco16ic_device::tilemap_12_combine_draw(screen_device &screen, bitmap_rgb3
{
custom_tilemap_draw(screen, bitmap, cliprect, nullptr, m_pf1_tilemap_16x16, nullptr, m_pf2_tilemap_16x16, m_pf1_rowscroll_ptr, m_pf12_control[1], m_pf12_control[2], m_pf12_control[5] & 0xff, m_pf12_control[6] & 0xff, 0xf, 4, 0xff, flags, priority, is_tattoo);
}
-
-//-------------------------------------------------
-// static_set_palette_tag: Set the tag of the
-// palette device
-//-------------------------------------------------
-
-void deco16ic_device::static_set_palette_tag(device_t &device, const char *tag)
-{
- downcast<deco16ic_device &>(device).m_palette.set_tag(tag);
-}
diff --git a/src/mame/video/deco16ic.h b/src/mame/video/deco16ic.h
index 5e45336c093..a15be609dbc 100644
--- a/src/mame/video/deco16ic.h
+++ b/src/mame/video/deco16ic.h
@@ -154,7 +154,6 @@ private:
TILE_GET_INFO_MEMBER(get_pf2_tile_info_b);
TILE_GET_INFO_MEMBER(get_pf1_tile_info_b);
required_device<gfxdecode_device> m_gfxdecode;
- required_device<palette_device> m_palette;
};
extern const device_type DECO16IC;
@@ -206,9 +205,6 @@ extern const device_type DECO16IC;
#define MCFG_DECO16IC_GFXDECODE(_gfxtag) \
deco16ic_device::static_set_gfxdecode_tag(*device, "^" _gfxtag);
-#define MCFG_DECO16IC_PALETTE(_palette_tag) \
- deco16ic_device::static_set_palette_tag(*device, "^" _palette_tag);
-
// function definition for a callback
#define DECO16IC_BANK_CB_MEMBER(_name) int _name(int bank)
diff --git a/src/mame/video/deco_zoomspr.cpp b/src/mame/video/deco_zoomspr.cpp
index e1b5cfdb949..aafefabc2a7 100644
--- a/src/mame/video/deco_zoomspr.cpp
+++ b/src/mame/video/deco_zoomspr.cpp
@@ -17,22 +17,11 @@ const device_type DECO_ZOOMSPR = &device_creator<deco_zoomspr_device>;
deco_zoomspr_device::deco_zoomspr_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
: device_t(mconfig, DECO_ZOOMSPR, "DECO Zooming Sprites", tag, owner, clock, "deco_zoomspr", __FILE__),
- m_palette(*this),
m_gfxdecode(*this)
{
}
//-------------------------------------------------
-// static_set_palette_tag: Set the tag of the
-// palette device
-//-------------------------------------------------
-
-void deco_zoomspr_device::static_set_palette_tag(device_t &device, const char *tag)
-{
- downcast<deco_zoomspr_device &>(device).m_palette.set_tag(tag);
-}
-
-//-------------------------------------------------
// static_set_gfxdecode_tag: Set the tag of the
// gfx decoder
//-------------------------------------------------
@@ -80,7 +69,7 @@ inline void deco_zoomspr_device::dragngun_drawgfxzoom(
{
if( gfx )
{
- const pen_t *pal = &m_palette->pen(gfx->colorbase() + gfx->granularity() * (color % gfx->colors()));
+ const pen_t *pal = &m_gfxdecode->palette().pen(gfx->colorbase() + gfx->granularity() * (color % gfx->colors()));
const UINT8 *code_base = gfx->get_data(code % gfx->elements());
if (sprite_screen_width && sprite_screen_height)
diff --git a/src/mame/video/deco_zoomspr.h b/src/mame/video/deco_zoomspr.h
index 4283f3aa62e..aed9b6b519a 100644
--- a/src/mame/video/deco_zoomspr.h
+++ b/src/mame/video/deco_zoomspr.h
@@ -7,7 +7,6 @@ class deco_zoomspr_device : public device_t
public:
deco_zoomspr_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
- static void static_set_palette_tag(device_t &device, const char *tag);
static void static_set_gfxdecode_tag(device_t &device, const char *tag);
void dragngun_draw_sprites(bitmap_rgb32 &bitmap, const rectangle &cliprect, const UINT32 *spritedata, UINT32* dragngun_sprite_layout_0_ram, UINT32* dragngun_sprite_layout_1_ram, UINT32* dragngun_sprite_lookup_0_ram, UINT32* dragngun_sprite_lookup_1_ram, UINT32 dragngun_sprite_ctrl, bitmap_ind8 &pri_bitmap, bitmap_rgb32 &temp_bitmap);
@@ -18,7 +17,6 @@ protected:
virtual void device_reset() override;
private:
- required_device<palette_device> m_palette;
required_device<gfxdecode_device> m_gfxdecode;
void dragngun_drawgfxzoom(
@@ -33,8 +31,5 @@ private:
extern const device_type DECO_ZOOMSPR;
-#define MCFG_DECO_ZOOMSPR_PALETTE(_palette_tag) \
- deco_zoomspr_device::static_set_palette_tag(*device, "^" _palette_tag);
-
#define MCFG_DECO_ZOOMSPR_GFXDECODE(_gfxtag) \
deco_zoomspr_device::static_set_gfxdecode_tag(*device, "^" _gfxtag);
diff --git a/src/mame/video/decospr.cpp b/src/mame/video/decospr.cpp
index 304fba4a87b..1ad69cff68a 100644
--- a/src/mame/video/decospr.cpp
+++ b/src/mame/video/decospr.cpp
@@ -157,8 +157,7 @@ decospr_device::decospr_device(const machine_config &mconfig, const char *tag, d
m_y_offset(0),
m_flipallx(0),
m_transpen(0),
- m_gfxdecode(*this),
- m_palette(*this)
+ m_gfxdecode(*this)
{
// default color callback
m_col_cb = decospr_col_cb_delegate(FUNC(decospr_device::default_col_cb), this);
@@ -579,7 +578,7 @@ void decospr_device::inefficient_copy_sprite_bitmap(bitmap_rgb32 &bitmap, const
fatalerror("decospr_device::inefficient_copy_sprite_bitmap with no m_sprite_bitmap\n");
int y, x;
- const pen_t *paldata = m_palette->pens();
+ const pen_t *paldata = m_gfxdecode->palette().pens();
UINT16* srcline;
UINT32* dstline;
@@ -623,13 +622,3 @@ void decospr_device::inefficient_copy_sprite_bitmap(bitmap_rgb32 &bitmap, const
}
}
}
-
-//-------------------------------------------------
-// static_set_palette_tag: Set the tag of the
-// palette device
-//-------------------------------------------------
-
-void decospr_device::static_set_palette_tag(device_t &device, const char *tag)
-{
- downcast<decospr_device &>(device).m_palette.set_tag(tag);
-}
diff --git a/src/mame/video/decospr.h b/src/mame/video/decospr.h
index 9679a22acc5..c9b2ee68a77 100644
--- a/src/mame/video/decospr.h
+++ b/src/mame/video/decospr.h
@@ -18,7 +18,6 @@ public:
// static configuration
static void static_set_gfxdecode_tag(device_t &device, const char *tag);
- static void static_set_palette_tag(device_t &device, const char *tag);
static void set_gfx_region(device_t &device, int gfxregion);
static void set_pri_callback(device_t &device, decospr_pri_cb_delegate callback) { downcast<decospr_device &>(device).m_pri_cb = callback; }
static void set_col_callback(device_t &device, decospr_col_cb_delegate callback) { downcast<decospr_device &>(device).m_col_cb = callback; }
@@ -67,7 +66,6 @@ private:
template<class _BitmapClass>
void draw_sprites_common(_BitmapClass &bitmap, const rectangle &cliprect, UINT16* spriteram, int sizewords, bool invert_flip);
required_device<gfxdecode_device> m_gfxdecode;
- required_device<palette_device> m_palette;
};
extern const device_type DECO_SPRITE;
@@ -98,6 +96,3 @@ extern const device_type DECO_SPRITE;
#define MCFG_DECO_SPRITE_GFXDECODE(_gfxtag) \
decospr_device::static_set_gfxdecode_tag(*device, "^" _gfxtag);
-
-#define MCFG_DECO_SPRITE_PALETTE(_palette_tag) \
- decospr_device::static_set_palette_tag(*device, "^" _palette_tag);
diff --git a/src/mame/video/k001604.cpp b/src/mame/video/k001604.cpp
index 6308e9f2736..efc658e44c4 100644
--- a/src/mame/video/k001604.cpp
+++ b/src/mame/video/k001604.cpp
@@ -19,8 +19,7 @@ const device_type K001604 = &device_creator<k001604_device>;
k001604_device::k001604_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
: device_t(mconfig, K001604, "K001604 2D tilemaps + 2x ROZ", tag, owner, clock, "k001604", __FILE__),
- m_gfx_index_1(0),
- m_gfx_index_2(0),
+ device_gfx_interface(mconfig, *this, nullptr),
m_layer_size(0),
m_roz_size(0),
m_txt_mem_offset(0),
@@ -28,22 +27,8 @@ k001604_device::k001604_device(const machine_config &mconfig, const char *tag, d
m_layer_roz(nullptr),
m_tile_ram(nullptr),
m_char_ram(nullptr),
- m_reg(nullptr),
- m_gfxdecode(*this),
- m_palette(*this)
+ m_reg(nullptr)
{
- m_gfx_index[0] = 0;
- m_gfx_index[1] = 0;
-}
-
-//-------------------------------------------------
-// static_set_gfxdecode_tag: Set the tag of the
-// gfx decoder
-//-------------------------------------------------
-
-void k001604_device::static_set_gfxdecode_tag(device_t &device, const char *tag)
-{
- downcast<k001604_device &>(device).m_gfxdecode.set_tag(tag);
}
//-------------------------------------------------
@@ -74,14 +59,8 @@ void k001604_device::device_start()
16*256
};
- if(!m_gfxdecode->started())
- throw device_missing_dependencies();
-
int roz_tile_size;
- m_gfx_index[0] = m_gfx_index_1;
- m_gfx_index[1] = m_gfx_index_2;
-
m_char_ram = make_unique_clear<UINT32[]>(0x200000 / 4);
m_tile_ram = make_unique_clear<UINT32[]>(0x20000 / 4);
m_reg = make_unique_clear<UINT32[]>(0x400 / 4);
@@ -91,24 +70,24 @@ void k001604_device::device_start()
if (m_layer_size)
{
- m_layer_8x8[0] = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(k001604_device::tile_info_layer_8x8),this), tilemap_mapper_delegate(FUNC(k001604_device::scan_layer_8x8_0_size1),this), 8, 8, 64, 64);
- m_layer_8x8[1] = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(k001604_device::tile_info_layer_8x8),this), tilemap_mapper_delegate(FUNC(k001604_device::scan_layer_8x8_1_size1),this), 8, 8, 64, 64);
+ m_layer_8x8[0] = &machine().tilemap().create(*this, tilemap_get_info_delegate(FUNC(k001604_device::tile_info_layer_8x8),this), tilemap_mapper_delegate(FUNC(k001604_device::scan_layer_8x8_0_size1),this), 8, 8, 64, 64);
+ m_layer_8x8[1] = &machine().tilemap().create(*this, tilemap_get_info_delegate(FUNC(k001604_device::tile_info_layer_8x8),this), tilemap_mapper_delegate(FUNC(k001604_device::scan_layer_8x8_1_size1),this), 8, 8, 64, 64);
- m_layer_roz = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(k001604_device::tile_info_layer_roz),this), tilemap_mapper_delegate(FUNC(k001604_device::scan_layer_roz_256),this), roz_tile_size, roz_tile_size, 128, 64);
+ m_layer_roz = &machine().tilemap().create(*this, tilemap_get_info_delegate(FUNC(k001604_device::tile_info_layer_roz),this), tilemap_mapper_delegate(FUNC(k001604_device::scan_layer_roz_256),this), roz_tile_size, roz_tile_size, 128, 64);
}
else
{
- m_layer_8x8[0] = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(k001604_device::tile_info_layer_8x8),this), tilemap_mapper_delegate(FUNC(k001604_device::scan_layer_8x8_0_size0),this), 8, 8, 64, 64);
- m_layer_8x8[1] = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(k001604_device::tile_info_layer_8x8),this), tilemap_mapper_delegate(FUNC(k001604_device::scan_layer_8x8_1_size0),this), 8, 8, 64, 64);
+ m_layer_8x8[0] = &machine().tilemap().create(*this, tilemap_get_info_delegate(FUNC(k001604_device::tile_info_layer_8x8),this), tilemap_mapper_delegate(FUNC(k001604_device::scan_layer_8x8_0_size0),this), 8, 8, 64, 64);
+ m_layer_8x8[1] = &machine().tilemap().create(*this, tilemap_get_info_delegate(FUNC(k001604_device::tile_info_layer_8x8),this), tilemap_mapper_delegate(FUNC(k001604_device::scan_layer_8x8_1_size0),this), 8, 8, 64, 64);
- m_layer_roz = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(k001604_device::tile_info_layer_roz),this), tilemap_mapper_delegate(FUNC(k001604_device::scan_layer_roz_128),this), roz_tile_size, roz_tile_size, 128, 64);
+ m_layer_roz = &machine().tilemap().create(*this, tilemap_get_info_delegate(FUNC(k001604_device::tile_info_layer_roz),this), tilemap_mapper_delegate(FUNC(k001604_device::scan_layer_roz_128),this), roz_tile_size, roz_tile_size, 128, 64);
}
m_layer_8x8[0]->set_transparent_pen(0);
m_layer_8x8[1]->set_transparent_pen(0);
- m_gfxdecode->set_gfx(m_gfx_index[0], std::make_unique<gfx_element>(m_palette, k001604_char_layout_layer_8x8, (UINT8*)&m_char_ram[0], 0, m_palette->entries() / 16, 0));
- m_gfxdecode->set_gfx(m_gfx_index[1], std::make_unique<gfx_element>(m_palette, k001604_char_layout_layer_16x16, (UINT8*)&m_char_ram[0], 0, m_palette->entries() / 16, 0));
+ set_gfx(0, std::make_unique<gfx_element>(palette(), k001604_char_layout_layer_8x8, (UINT8*)&m_char_ram[0], 0, palette().entries() / 16, 0));
+ set_gfx(1, std::make_unique<gfx_element>(palette(), k001604_char_layout_layer_16x16, (UINT8*)&m_char_ram[0], 0, palette().entries() / 16, 0));
save_pointer(NAME(m_reg.get()), 0x400 / 4);
save_pointer(NAME(m_char_ram.get()), 0x200000 / 4);
@@ -182,7 +161,7 @@ TILE_GET_INFO_MEMBER(k001604_device::tile_info_layer_8x8)
if (val & 0x800000)
flags |= TILE_FLIPY;
- SET_TILE_INFO_MEMBER(m_gfx_index[0], tile, color, flags);
+ SET_TILE_INFO_MEMBER(0, tile, color, flags);
}
TILE_GET_INFO_MEMBER(k001604_device::tile_info_layer_roz)
@@ -199,7 +178,7 @@ TILE_GET_INFO_MEMBER(k001604_device::tile_info_layer_roz)
tile += m_roz_size ? 0x800 : 0x2000;
- SET_TILE_INFO_MEMBER(m_gfx_index[m_roz_size], tile, color, flags);
+ SET_TILE_INFO_MEMBER(m_roz_size, tile, color, flags);
}
@@ -237,7 +216,7 @@ void k001604_device::draw_back_layer( bitmap_rgb32 &bitmap, const rectangle &cli
int ex = cliprect.max_x;
int ey = cliprect.max_y;
- const rgb_t *clut = m_palette->palette()->entry_list_raw();
+ const rgb_t *clut = palette().palette()->entry_list_raw();
int window_x, window_y, window_xmask, window_ymask;
@@ -397,8 +376,8 @@ WRITE32_MEMBER( k001604_device::char_w )
COMBINE_DATA(m_char_ram.get() + addr);
- m_gfxdecode->gfx(m_gfx_index[0])->mark_dirty(addr / 32);
- m_gfxdecode->gfx(m_gfx_index[1])->mark_dirty(addr / 128);
+ gfx(0)->mark_dirty(addr / 32);
+ gfx(1)->mark_dirty(addr / 128);
}
WRITE32_MEMBER( k001604_device::reg_w )
@@ -419,13 +398,3 @@ WRITE32_MEMBER( k001604_device::reg_w )
//printf("K001604_reg_w (%d), %02X, %08X, %08X at %08X\n", chip, offset, data, mem_mask, space.device().safe_pc());
}
}
-
-//-------------------------------------------------
-// static_set_palette_tag: Set the tag of the
-// palette device
-//-------------------------------------------------
-
-void k001604_device::static_set_palette_tag(device_t &device, const char *tag)
-{
- downcast<k001604_device &>(device).m_palette.set_tag(tag);
-}
diff --git a/src/mame/video/k001604.h b/src/mame/video/k001604.h
index d0719936029..d4264007856 100644
--- a/src/mame/video/k001604.h
+++ b/src/mame/video/k001604.h
@@ -5,17 +5,13 @@
#define __K001604_H__
-class k001604_device : public device_t
+class k001604_device : public device_t, public device_gfx_interface
{
public:
k001604_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
~k001604_device() {}
// static configuration
- static void static_set_gfxdecode_tag(device_t &device, const char *tag);
- static void static_set_palette_tag(device_t &device, const char *tag);
- static void set_gfx_index_1(device_t &device, int idx) { downcast<k001604_device &>(device).m_gfx_index_1 = idx; }
- static void set_gfx_index_2(device_t &device, int idx) { downcast<k001604_device &>(device).m_gfx_index_2 = idx; }
static void set_layer_size(device_t &device, int size) { downcast<k001604_device &>(device).m_layer_size = size; }
static void set_roz_size(device_t &device, int size) { downcast<k001604_device &>(device).m_roz_size = size; }
static void set_txt_mem_offset(device_t &device, int offs) { downcast<k001604_device &>(device).m_txt_mem_offset = offs; }
@@ -36,8 +32,6 @@ protected:
virtual void device_reset() override;
private:
// internal state
- int m_gfx_index_1;
- int m_gfx_index_2;
int m_layer_size; // 0 -> width = 128 tiles, 1 -> width = 256 tiles
int m_roz_size; // 0 -> 8x8, 1 -> 16x16
int m_txt_mem_offset;
@@ -45,13 +39,10 @@ private:
tilemap_t *m_layer_8x8[2];
tilemap_t *m_layer_roz;
- int m_gfx_index[2];
std::unique_ptr<UINT32[]> m_tile_ram;
std::unique_ptr<UINT32[]> m_char_ram;
std::unique_ptr<UINT32[]> m_reg;
- required_device<gfxdecode_device> m_gfxdecode;
- required_device<palette_device> m_palette;
TILEMAP_MAPPER_MEMBER(scan_layer_8x8_0_size0);
TILEMAP_MAPPER_MEMBER(scan_layer_8x8_0_size1);
@@ -66,12 +57,6 @@ private:
extern const device_type K001604;
-#define MCFG_K001604_GFX_INDEX1(_idx) \
- k001604_device::set_gfx_index_1(*device, _idx);
-
-#define MCFG_K001604_GFX_INDEX2(_idx) \
- k001604_device::set_gfx_index_2(*device, _idx);
-
#define MCFG_K001604_LAYER_SIZE(_size) \
k001604_device::set_layer_size(*device, _size);
@@ -84,10 +69,7 @@ extern const device_type K001604;
#define MCFG_K001604_ROZ_OFFSET(_offs) \
k001604_device::set_roz_mem_offset(*device, _offs);
-#define MCFG_K001604_GFXDECODE(_gfxtag) \
- k001604_device::static_set_gfxdecode_tag(*device, "^" _gfxtag);
-
#define MCFG_K001604_PALETTE(_palette_tag) \
- k001604_device::static_set_palette_tag(*device, "^" _palette_tag);
+ MCFG_GFX_PALETTE(_palette_tag)
#endif
diff --git a/src/mame/video/k037122.cpp b/src/mame/video/k037122.cpp
index e7f57786174..dd572916e9a 100644
--- a/src/mame/video/k037122.cpp
+++ b/src/mame/video/k037122.cpp
@@ -18,36 +18,15 @@ const device_type K037122 = &device_creator<k037122_device>;
k037122_device::k037122_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
: device_t(mconfig, K037122, "K037122 2D Tilemap", tag, owner, clock, "k037122", __FILE__),
device_video_interface(mconfig, *this),
+ device_gfx_interface(mconfig, *this, nullptr),
m_tile_ram(nullptr),
m_char_ram(nullptr),
m_reg(nullptr),
- m_gfx_index(0),
- m_gfxdecode(*this),
- m_palette(*this)
+ m_gfx_index(0)
{
}
//-------------------------------------------------
-// static_set_gfxdecode_tag: Set the tag of the
-// gfx decoder
-//-------------------------------------------------
-
-void k037122_device::static_set_gfxdecode_tag(device_t &device, const char *tag)
-{
- downcast<k037122_device &>(device).m_gfxdecode.set_tag(tag);
-}
-
-//-------------------------------------------------
-// static_set_palette_tag: Set the tag of the
-// palette device
-//-------------------------------------------------
-
-void k037122_device::static_set_palette_tag(device_t &device, const char *tag)
-{
- downcast<k037122_device &>(device).m_palette.set_tag(tag);
-}
-
-//-------------------------------------------------
// device_start - device-specific startup
//-------------------------------------------------
@@ -64,20 +43,17 @@ void k037122_device::device_start()
8*128
};
- if(!m_gfxdecode->started())
- throw device_missing_dependencies();
-
m_char_ram = make_unique_clear<UINT32[]>(0x200000 / 4);
m_tile_ram = make_unique_clear<UINT32[]>(0x20000 / 4);
m_reg = make_unique_clear<UINT32[]>(0x400 / 4);
- m_layer[0] = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(k037122_device::tile_info_layer0),this), TILEMAP_SCAN_ROWS, 8, 8, 256, 64);
- m_layer[1] = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(k037122_device::tile_info_layer1),this), TILEMAP_SCAN_ROWS, 8, 8, 128, 64);
+ m_layer[0] = &machine().tilemap().create(*this, tilemap_get_info_delegate(FUNC(k037122_device::tile_info_layer0),this), TILEMAP_SCAN_ROWS, 8, 8, 256, 64);
+ m_layer[1] = &machine().tilemap().create(*this, tilemap_get_info_delegate(FUNC(k037122_device::tile_info_layer1),this), TILEMAP_SCAN_ROWS, 8, 8, 128, 64);
m_layer[0]->set_transparent_pen(0);
m_layer[1]->set_transparent_pen(0);
- m_gfxdecode->set_gfx(m_gfx_index,std::make_unique<gfx_element>(m_palette, k037122_char_layout, (UINT8*)m_char_ram.get(), 0, m_palette->entries() / 16, 0));
+ set_gfx(m_gfx_index,std::make_unique<gfx_element>(palette(), k037122_char_layout, (UINT8*)m_char_ram.get(), 0, palette().entries() / 16, 0));
save_pointer(NAME(m_reg.get()), 0x400 / 4);
save_pointer(NAME(m_char_ram.get()), 0x200000 / 4);
@@ -153,7 +129,7 @@ void k037122_device::update_palette_color( UINT32 palette_base, int color )
{
UINT32 data = m_tile_ram[(palette_base / 4) + color];
- m_palette->set_pen_color(color, pal5bit(data >> 6), pal6bit(data >> 0), pal5bit(data >> 11));
+ palette().set_pen_color(color, pal5bit(data >> 6), pal6bit(data >> 0), pal5bit(data >> 11));
}
READ32_MEMBER( k037122_device::sram_r )
@@ -211,7 +187,7 @@ WRITE32_MEMBER( k037122_device::char_w )
UINT32 addr = offset + (bank * (0x40000/4));
COMBINE_DATA(m_char_ram.get() + addr);
- m_gfxdecode->gfx(m_gfx_index)->mark_dirty(addr / 32);
+ gfx(m_gfx_index)->mark_dirty(addr / 32);
}
READ32_MEMBER( k037122_device::reg_r )
diff --git a/src/mame/video/k037122.h b/src/mame/video/k037122.h
index 181f28e355d..99276695a36 100644
--- a/src/mame/video/k037122.h
+++ b/src/mame/video/k037122.h
@@ -5,15 +5,14 @@
#define __K037122_H__
class k037122_device : public device_t,
- public device_video_interface
+ public device_video_interface,
+ public device_gfx_interface
{
public:
k037122_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
~k037122_device() {}
// static configuration
- static void static_set_gfxdecode_tag(device_t &device, const char *tag);
- static void static_set_palette_tag(device_t &device, const char *tag);
static void static_set_gfx_index(device_t &device, int index) { downcast<k037122_device &>(device).m_gfx_index = index; }
void tile_draw( screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect );
@@ -38,8 +37,6 @@ private:
std::unique_ptr<UINT32[]> m_reg;
int m_gfx_index;
- required_device<gfxdecode_device> m_gfxdecode;
- required_device<palette_device> m_palette;
TILE_GET_INFO_MEMBER(tile_info_layer0);
TILE_GET_INFO_MEMBER(tile_info_layer1);
@@ -48,15 +45,11 @@ private:
extern const device_type K037122;
-#define MCFG_K037122_ADD(_tag, _screen, _gfxindex) \
+#define MCFG_K037122_ADD(_tag, _screen) \
MCFG_DEVICE_ADD(_tag, K037122, 0) \
- MCFG_VIDEO_SET_SCREEN(_screen) \
- k037122_device::static_set_gfx_index(*device, _gfxindex);
-
-#define MCFG_K037122_GFXDECODE(_gfxtag) \
- k037122_device::static_set_gfxdecode_tag(*device, "^" _gfxtag);
+ MCFG_VIDEO_SET_SCREEN(_screen)
#define MCFG_K037122_PALETTE(_palette_tag) \
- k037122_device::static_set_palette_tag(*device, "^" _palette_tag);
+ MCFG_GFX_PALETTE(_palette_tag)
#endif
diff --git a/src/mame/video/k053246_k053247_k055673.cpp b/src/mame/video/k053246_k053247_k055673.cpp
index fc9bc1581eb..1469014fbfc 100644
--- a/src/mame/video/k053246_k053247_k055673.cpp
+++ b/src/mame/video/k053246_k053247_k055673.cpp
@@ -292,9 +292,9 @@ void k053247_device::k053247_sprites_draw_common( _BitmapClass &bitmap, const re
VIDEO_HAS_SHADOWS | VIDEO_HAS_HIGHLIGHTS
*/
- if (m_palette->shadows_enabled())
+ if (palette().shadows_enabled())
{
- if (sizeof(typename _BitmapClass::pixel_t) == 4 && (m_palette->hilights_enabled()))
+ if (sizeof(typename _BitmapClass::pixel_t) == 4 && (palette().hilights_enabled()))
shdmask = 3; // enable all shadows and highlights
else
shdmask = 0; // enable default shadows
@@ -505,8 +505,8 @@ void k053247_device::zdrawgfxzoom32GP(
src_fh = 16;
src_base = m_gfx->get_data(code % m_gfx->elements());
- pal_base = m_palette->pens() + m_gfx->colorbase() + (color % m_gfx->colors()) * granularity;
- shd_base = m_palette->shadow_table();
+ pal_base = palette().pens() + m_gfx->colorbase() + (color % m_gfx->colors()) * granularity;
+ shd_base = palette().shadow_table();
dst_ptr = &bitmap.pix32(0);
dst_pitch = bitmap.rowpixels();
@@ -914,7 +914,7 @@ k055673_device::k055673_device(const machine_config &mconfig, const char *tag, d
void k055673_device::device_start()
{
- int gfx_index;
+ int gfx_index = 0;
UINT32 total;
static const gfx_layout spritelayout = /* System GX sprite layout */
@@ -965,12 +965,6 @@ void k055673_device::device_start()
UINT16 *alt_k055673_rom;
int size4;
- /* find first empty slot to decode gfx */
- for (gfx_index = 0; gfx_index < MAX_GFX_ELEMENTS; gfx_index++)
- if (m_gfxdecode->gfx(gfx_index) == nullptr)
- break;
- assert(gfx_index != MAX_GFX_ELEMENTS);
-
alt_k055673_rom = (UINT16 *)machine().root_device().memregion(m_memory_region)->base();
/* decode the graphics */
@@ -995,33 +989,33 @@ void k055673_device::device_start()
}
total = size4 / 128;
- konami_decode_gfx(machine(), m_gfxdecode, m_palette, gfx_index, (UINT8 *)alt_k055673_rom, total, &spritelayout, 5);
+ konami_decode_gfx(*this, gfx_index, (UINT8 *)alt_k055673_rom, total, &spritelayout, 5);
break;
case K055673_LAYOUT_RNG:
total = machine().root_device().memregion(m_memory_region)->bytes() / (16*16/2);
- konami_decode_gfx(machine(), m_gfxdecode, m_palette, gfx_index, (UINT8 *)alt_k055673_rom, total, &spritelayout2, 4);
+ konami_decode_gfx(*this, gfx_index, (UINT8 *)alt_k055673_rom, total, &spritelayout2, 4);
break;
case K055673_LAYOUT_LE2:
total = machine().root_device().memregion(m_memory_region)->bytes() / (16*16);
- konami_decode_gfx(machine(), m_gfxdecode, m_palette, gfx_index, (UINT8 *)alt_k055673_rom, total, &spritelayout3, 8);
+ konami_decode_gfx(*this, gfx_index, (UINT8 *)alt_k055673_rom, total, &spritelayout3, 8);
break;
case K055673_LAYOUT_GX6:
total = machine().root_device().memregion(m_memory_region)->bytes() / (16*16*6/8);
- konami_decode_gfx(machine(), m_gfxdecode, m_palette, gfx_index, (UINT8 *)alt_k055673_rom, total, &spritelayout4, 6);
+ konami_decode_gfx(*this, gfx_index, (UINT8 *)alt_k055673_rom, total, &spritelayout4, 6);
break;
default:
fatalerror("Unsupported layout\n");
}
- if (VERBOSE && !(m_palette->shadows_enabled()))
+ if (VERBOSE && !(palette().shadows_enabled()))
popmessage("driver should use VIDEO_HAS_SHADOWS");
m_z_rejection = -1;
- m_gfx = m_gfxdecode->gfx(gfx_index);
+ m_gfx = gfx(gfx_index);
m_objcha_line = CLEAR_LINE;
m_ram = std::make_unique<UINT16[]>(0x1000/2);
@@ -1046,8 +1040,8 @@ const device_type K053246 = &device_creator<k053247_device>;
k053247_device::k053247_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
: device_t(mconfig, K053246, "K053246 & K053247 Sprite Generator", tag, owner, clock, "k053247", __FILE__),
device_video_interface(mconfig, *this),
- m_gfxdecode(*this),
- m_palette(*this)
+ device_gfx_interface(mconfig, *this),
+ m_gfx_num(0)
{
clear_all();
}
@@ -1055,33 +1049,13 @@ k053247_device::k053247_device(const machine_config &mconfig, const char *tag, d
k053247_device::k053247_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source)
: device_t(mconfig, type, name, tag, owner, clock, shortname, source),
device_video_interface(mconfig, *this),
- m_gfxdecode(*this),
- m_palette(*this)
+ device_gfx_interface(mconfig, *this, nullptr),
+ m_gfx_num(0)
{
clear_all();
}
//-------------------------------------------------
-// static_set_gfxdecode_tag: Set the tag of the
-// gfx decoder
-//-------------------------------------------------
-
-void k053247_device::static_set_gfxdecode_tag(device_t &device, const char *tag)
-{
- downcast<k053247_device &>(device).m_gfxdecode.set_tag(tag);
-}
-
-//-------------------------------------------------
-// static_set_palette_tag: Set the tag of the
-// palette device
-//-------------------------------------------------
-
-void k053247_device::static_set_palette_tag(device_t &device, const char *tag)
-{
- downcast<k053247_device &>(device).m_palette.set_tag(tag);
-}
-
-//-------------------------------------------------
// device_start - device-specific startup
//-------------------------------------------------
@@ -1106,7 +1080,7 @@ void k053247_device::device_start()
{
case NORMAL_PLANE_ORDER:
total = machine().root_device().memregion(m_memory_region)->bytes() / 128;
- konami_decode_gfx(machine(), m_gfxdecode, m_palette, m_gfx_num, machine().root_device().memregion(m_memory_region)->base(), total, &spritelayout, 4);
+ konami_decode_gfx(*this, m_gfx_num, machine().root_device().memregion(m_memory_region)->base(), total, &spritelayout, 4);
break;
default:
@@ -1117,17 +1091,17 @@ void k053247_device::device_start()
{
if (m_screen->format() == BITMAP_FORMAT_RGB32)
{
- if (!m_palette->shadows_enabled() || !m_palette->hilights_enabled())
+ if (!palette().shadows_enabled() || !palette().hilights_enabled())
popmessage("driver missing SHADOWS or HIGHLIGHTS flag");
}
else
{
- if (!(m_palette->shadows_enabled()))
+ if (!(palette().shadows_enabled()))
popmessage("driver should use VIDEO_HAS_SHADOWS");
}
}
- m_gfx = m_gfxdecode->gfx(m_gfx_num);
+ m_gfx = gfx(m_gfx_num);
m_ram = make_unique_clear<UINT16[]>(0x1000 / 2);
diff --git a/src/mame/video/k053246_k053247_k055673.h b/src/mame/video/k053246_k053247_k055673.h
index 96e41f00893..7fe1adc37f6 100644
--- a/src/mame/video/k053246_k053247_k055673.h
+++ b/src/mame/video/k053246_k053247_k055673.h
@@ -17,14 +17,14 @@ typedef device_delegate<void (int *code, int *color, int *priority_mask)> k05324
#define MCFG_K053246_CB(_class, _method) \
k053247_device::set_k053247_callback(*device, k053247_cb_delegate(&_class::_method, #_class "::" #_method, downcast<_class *>(owner)));
-#define MCFG_K053246_CONFIG(_gfx_reg, _gfx_num, _order, _dx, _dy) \
- k053247_device::set_config(*device, _gfx_reg, _gfx_num, _order, _dx, _dy);
+#define MCFG_K053246_CONFIG(_gfx_reg, _order, _dx, _dy) \
+ k053247_device::set_config(*device, _gfx_reg, _order, _dx, _dy);
#define MCFG_K055673_CB(_class, _method) \
k053247_device::set_k053247_callback(*device, k053247_cb_delegate(&_class::_method, #_class "::" #_method, downcast<_class *>(owner)));
-#define MCFG_K055673_CONFIG(_gfx_reg, _gfx_num, _order, _dx, _dy) \
- k053247_device::set_config(*device, _gfx_reg, _gfx_num, _order, _dx, _dy);
+#define MCFG_K055673_CONFIG(_gfx_reg, _order, _dx, _dy) \
+ k053247_device::set_config(*device, _gfx_reg, _order, _dx, _dy);
/** Konami 053246 / 053247 / 055673 **/
@@ -58,7 +58,8 @@ Callback procedures for non-standard shadows:
class k053247_device : public device_t,
- public device_video_interface
+ public device_video_interface,
+ public device_gfx_interface
{
public:
k053247_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
@@ -67,14 +68,11 @@ public:
~k053247_device() { }
// static configuration
- static void static_set_gfxdecode_tag(device_t &device, const char *tag);
- static void static_set_palette_tag(device_t &device, const char *tag);
static void set_k053247_callback(device_t &device, k053247_cb_delegate callback) { downcast<k053247_device &>(device).m_k053247_cb = callback; }
- static void set_config(device_t &device, const char *gfx_reg, int gfx_num, int bpp, int dx, int dy)
+ static void set_config(device_t &device, const char *gfx_reg, int bpp, int dx, int dy)
{
k053247_device &dev = downcast<k053247_device &>(device);
dev.m_memory_region = gfx_reg;
- dev.m_gfx_num = gfx_num;
dev.m_bpp = bpp;
dev.m_dx = dx;
dev.m_dy = dy;
@@ -122,12 +120,9 @@ public:
k053247_cb_delegate m_k053247_cb;
- //FIXME: device should be updated to use device_gfx_interface to get rid of most of these!
const char *m_memory_region;
int m_gfx_num;
int m_bpp;
- required_device<gfxdecode_device> m_gfxdecode;
- required_device<palette_device> m_palette;
/* alt implementation - to be collapsed */
void zdrawgfxzoom32GP(
@@ -280,14 +275,14 @@ public:
color = 0;
shadow = -1;
whichtable = shadowmode_table;
- m_palette->set_shadow_mode(0);
+ palette().set_shadow_mode(0);
}
else
{
if (shdmask >= 0)
{
shadow = (color & K053247_CUSTOMSHADOW) ? (color >> K053247_SHDSHIFT) : (shadow >> 10);
- if (shadow &= 3) m_palette->set_shadow_mode((shadow - 1) & shdmask);
+ if (shadow &= 3) palette().set_shadow_mode((shadow - 1) & shdmask);
}
else
shadow = 0;
@@ -502,20 +497,12 @@ extern const device_type K055673;
#define MCFG_K053246_SET_SCREEN MCFG_VIDEO_SET_SCREEN
-#define MCFG_K053246_GFXDECODE(_gfxtag) \
- k053247_device::static_set_gfxdecode_tag(*device, "^" _gfxtag);
-
-#define MCFG_K053246_PALETTE(_palette_tag) \
- k053247_device::static_set_palette_tag(*device, "^" _palette_tag);
+#define MCFG_K053246_PALETTE MCFG_GFX_PALETTE
#define MCFG_K055673_SET_SCREEN MCFG_VIDEO_SET_SCREEN
-#define MCFG_K055673_GFXDECODE(_gfxtag) \
- k055673_device::static_set_gfxdecode_tag(*device, "^" _gfxtag);
-
-#define MCFG_K055673_PALETTE(_palette_tag) \
- k055673_device::static_set_palette_tag(*device, "^" _palette_tag);
+#define MCFG_K055673_PALETTE MCFG_GFX_PALETTE
#endif
diff --git a/src/mame/video/k054156_k054157_k056832.cpp b/src/mame/video/k054156_k054157_k056832.cpp
index 9167a3e571a..b5dc7fd67fa 100644
--- a/src/mame/video/k054156_k054157_k056832.cpp
+++ b/src/mame/video/k054156_k054157_k056832.cpp
@@ -183,6 +183,7 @@ const device_type K056832 = &device_creator<k056832_device>;
k056832_device::k056832_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
: device_t(mconfig, K056832, "K056832 Tilemap Generator", tag, owner, clock, "k056832", __FILE__),
+ device_gfx_interface(mconfig, *this),
//m_tilemap[K056832_PAGE_COUNT],
//*m_pixmap[K056832_PAGE_COUNT],
//m_regs[0x20],
@@ -219,33 +220,10 @@ k056832_device::k056832_device(const machine_config &mconfig, const char *tag, d
m_use_ext_linescroll(0),
m_uses_tile_banks(0),
m_cur_tile_bank(0),
- m_k055555(nullptr),
- m_gfxdecode(*this),
- m_palette(*this)
+ m_k055555(nullptr)
{
}
-//-------------------------------------------------
-// static_set_gfxdecode_tag: Set the tag of the
-// gfx decoder
-//-------------------------------------------------
-
-void k056832_device::static_set_gfxdecode_tag(device_t &device, const char *tag)
-{
- downcast<k056832_device &>(device).m_gfxdecode.set_tag(tag);
-}
-
-
-//-------------------------------------------------
-// static_set_palette_tag: Set the tag of the
-// palette device
-//-------------------------------------------------
-
-void k056832_device::static_set_palette_tag(device_t &device, const char *tag)
-{
- downcast<k056832_device &>(device).m_palette.set_tag(tag);
-}
-
void k056832_device::create_tilemaps()
{
tilemap_t *tmap;
@@ -284,22 +262,22 @@ void k056832_device::create_tilemaps()
m_videoram.resize(0x2000 * (K056832_PAGE_COUNT + 1) / 2);
memset(&m_videoram[0], 0, 2*m_videoram.size());
- m_tilemap[0x0] = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(k056832_device::get_tile_info0),this), TILEMAP_SCAN_ROWS, 8, 8, 64, 32);
- m_tilemap[0x1] = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(k056832_device::get_tile_info1),this), TILEMAP_SCAN_ROWS, 8, 8, 64, 32);
- m_tilemap[0x2] = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(k056832_device::get_tile_info2),this), TILEMAP_SCAN_ROWS, 8, 8, 64, 32);
- m_tilemap[0x3] = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(k056832_device::get_tile_info3),this), TILEMAP_SCAN_ROWS, 8, 8, 64, 32);
- m_tilemap[0x4] = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(k056832_device::get_tile_info4),this), TILEMAP_SCAN_ROWS, 8, 8, 64, 32);
- m_tilemap[0x5] = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(k056832_device::get_tile_info5),this), TILEMAP_SCAN_ROWS, 8, 8, 64, 32);
- m_tilemap[0x6] = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(k056832_device::get_tile_info6),this), TILEMAP_SCAN_ROWS, 8, 8, 64, 32);
- m_tilemap[0x7] = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(k056832_device::get_tile_info7),this), TILEMAP_SCAN_ROWS, 8, 8, 64, 32);
- m_tilemap[0x8] = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(k056832_device::get_tile_info8),this), TILEMAP_SCAN_ROWS, 8, 8, 64, 32);
- m_tilemap[0x9] = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(k056832_device::get_tile_info9),this), TILEMAP_SCAN_ROWS, 8, 8, 64, 32);
- m_tilemap[0xa] = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(k056832_device::get_tile_infoa),this), TILEMAP_SCAN_ROWS, 8, 8, 64, 32);
- m_tilemap[0xb] = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(k056832_device::get_tile_infob),this), TILEMAP_SCAN_ROWS, 8, 8, 64, 32);
- m_tilemap[0xc] = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(k056832_device::get_tile_infoc),this), TILEMAP_SCAN_ROWS, 8, 8, 64, 32);
- m_tilemap[0xd] = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(k056832_device::get_tile_infod),this), TILEMAP_SCAN_ROWS, 8, 8, 64, 32);
- m_tilemap[0xe] = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(k056832_device::get_tile_infoe),this), TILEMAP_SCAN_ROWS, 8, 8, 64, 32);
- m_tilemap[0xf] = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(k056832_device::get_tile_infof),this), TILEMAP_SCAN_ROWS, 8, 8, 64, 32);
+ m_tilemap[0x0] = &machine().tilemap().create(*this, tilemap_get_info_delegate(FUNC(k056832_device::get_tile_info0),this), TILEMAP_SCAN_ROWS, 8, 8, 64, 32);
+ m_tilemap[0x1] = &machine().tilemap().create(*this, tilemap_get_info_delegate(FUNC(k056832_device::get_tile_info1),this), TILEMAP_SCAN_ROWS, 8, 8, 64, 32);
+ m_tilemap[0x2] = &machine().tilemap().create(*this, tilemap_get_info_delegate(FUNC(k056832_device::get_tile_info2),this), TILEMAP_SCAN_ROWS, 8, 8, 64, 32);
+ m_tilemap[0x3] = &machine().tilemap().create(*this, tilemap_get_info_delegate(FUNC(k056832_device::get_tile_info3),this), TILEMAP_SCAN_ROWS, 8, 8, 64, 32);
+ m_tilemap[0x4] = &machine().tilemap().create(*this, tilemap_get_info_delegate(FUNC(k056832_device::get_tile_info4),this), TILEMAP_SCAN_ROWS, 8, 8, 64, 32);
+ m_tilemap[0x5] = &machine().tilemap().create(*this, tilemap_get_info_delegate(FUNC(k056832_device::get_tile_info5),this), TILEMAP_SCAN_ROWS, 8, 8, 64, 32);
+ m_tilemap[0x6] = &machine().tilemap().create(*this, tilemap_get_info_delegate(FUNC(k056832_device::get_tile_info6),this), TILEMAP_SCAN_ROWS, 8, 8, 64, 32);
+ m_tilemap[0x7] = &machine().tilemap().create(*this, tilemap_get_info_delegate(FUNC(k056832_device::get_tile_info7),this), TILEMAP_SCAN_ROWS, 8, 8, 64, 32);
+ m_tilemap[0x8] = &machine().tilemap().create(*this, tilemap_get_info_delegate(FUNC(k056832_device::get_tile_info8),this), TILEMAP_SCAN_ROWS, 8, 8, 64, 32);
+ m_tilemap[0x9] = &machine().tilemap().create(*this, tilemap_get_info_delegate(FUNC(k056832_device::get_tile_info9),this), TILEMAP_SCAN_ROWS, 8, 8, 64, 32);
+ m_tilemap[0xa] = &machine().tilemap().create(*this, tilemap_get_info_delegate(FUNC(k056832_device::get_tile_infoa),this), TILEMAP_SCAN_ROWS, 8, 8, 64, 32);
+ m_tilemap[0xb] = &machine().tilemap().create(*this, tilemap_get_info_delegate(FUNC(k056832_device::get_tile_infob),this), TILEMAP_SCAN_ROWS, 8, 8, 64, 32);
+ m_tilemap[0xc] = &machine().tilemap().create(*this, tilemap_get_info_delegate(FUNC(k056832_device::get_tile_infoc),this), TILEMAP_SCAN_ROWS, 8, 8, 64, 32);
+ m_tilemap[0xd] = &machine().tilemap().create(*this, tilemap_get_info_delegate(FUNC(k056832_device::get_tile_infod),this), TILEMAP_SCAN_ROWS, 8, 8, 64, 32);
+ m_tilemap[0xe] = &machine().tilemap().create(*this, tilemap_get_info_delegate(FUNC(k056832_device::get_tile_infoe),this), TILEMAP_SCAN_ROWS, 8, 8, 64, 32);
+ m_tilemap[0xf] = &machine().tilemap().create(*this, tilemap_get_info_delegate(FUNC(k056832_device::get_tile_infof),this), TILEMAP_SCAN_ROWS, 8, 8, 64, 32);
for (i = 0; i < K056832_PAGE_COUNT; i++)
{
@@ -362,9 +340,6 @@ void k056832_device::finalize_init()
void k056832_device::device_start()
{
- if(!m_gfxdecode->started())
- throw device_missing_dependencies();
-
memset(m_regs, 0x00, sizeof(m_regs) );
memset(m_regsb, 0x00, sizeof(m_regsb) );
@@ -1296,7 +1271,7 @@ int k056832_device::update_linemap( screen_device &screen, _BitmapClass &bitmap,
pixmap = m_pixmap[page];
pal_ptr = machine().pens;
- src_gfx = m_gfxdecode->gfx(m_gfx_num];
+ src_gfx = gfx(m_gfx_num);
src_pitch = src_gfx->rowbytes();
src_modulo = src_gfx->char_modulo;
dst_pitch = pixmap->rowpixels;
@@ -2024,7 +1999,7 @@ READ16_MEMBER( k056832_device::b_word_r )
void k056832_device::create_gfx(const char *gfx_memory_region, int bpp, int big)
{
- int gfx_index;
+ int gfx_index = 0;
int i;
UINT32 total;
@@ -2092,13 +2067,6 @@ void k056832_device::create_gfx(const char *gfx_memory_region, int bpp, int big)
m_bpp = bpp;
- /* find first empty slot to decode gfx */
- for (gfx_index = 0; gfx_index < MAX_GFX_ELEMENTS; gfx_index++)
- {
- if (m_gfxdecode->gfx(gfx_index) == nullptr) break;
- }
- assert(gfx_index != MAX_GFX_ELEMENTS);
-
/* handle the various graphics formats */
i = (big) ? 8 : 16;
@@ -2107,45 +2075,45 @@ void k056832_device::create_gfx(const char *gfx_memory_region, int bpp, int big)
{
case K056832_BPP_4:
total = machine().root_device().memregion(gfx_memory_region)->bytes() / (i*4);
- konami_decode_gfx(machine(), m_gfxdecode, m_palette, gfx_index, machine().root_device().memregion(gfx_memory_region)->base(), total, &charlayout4, 4);
+ konami_decode_gfx(*this, gfx_index, machine().root_device().memregion(gfx_memory_region)->base(), total, &charlayout4, 4);
break;
case K056832_BPP_5:
total = machine().root_device().memregion(gfx_memory_region)->bytes() / (i*5);
- konami_decode_gfx(machine(), m_gfxdecode, m_palette, gfx_index, machine().root_device().memregion(gfx_memory_region)->base(), total, &charlayout5, 5);
+ konami_decode_gfx(*this, gfx_index, machine().root_device().memregion(gfx_memory_region)->base(), total, &charlayout5, 5);
break;
case K056832_BPP_6:
total = machine().root_device().memregion(gfx_memory_region)->bytes() / (i*6);
- konami_decode_gfx(machine(), m_gfxdecode, m_palette, gfx_index, machine().root_device().memregion(gfx_memory_region)->base(), total, &charlayout6, 6);
+ konami_decode_gfx(*this, gfx_index, machine().root_device().memregion(gfx_memory_region)->base(), total, &charlayout6, 6);
break;
case K056832_BPP_8:
total = machine().root_device().memregion(gfx_memory_region)->bytes() / (i*8);
- konami_decode_gfx(machine(), m_gfxdecode, m_palette, gfx_index, machine().root_device().memregion(gfx_memory_region)->base(), total, &charlayout8, 8);
+ konami_decode_gfx(*this, gfx_index, machine().root_device().memregion(gfx_memory_region)->base(), total, &charlayout8, 8);
break;
case K056832_BPP_8LE:
total = machine().root_device().memregion(gfx_memory_region)->bytes() / (i*8);
- konami_decode_gfx(machine(), m_gfxdecode, m_palette, gfx_index, machine().root_device().memregion(gfx_memory_region)->base(), total, &charlayout8le, 8);
+ konami_decode_gfx(*this, gfx_index, machine().root_device().memregion(gfx_memory_region)->base(), total, &charlayout8le, 8);
break;
case K056832_BPP_8TASMAN:
total = machine().root_device().memregion(gfx_memory_region)->bytes() / (i*8);
- konami_decode_gfx(machine(), m_gfxdecode, m_palette, gfx_index, machine().root_device().memregion(gfx_memory_region)->base(), total, &charlayout8, 8);
+ konami_decode_gfx(*this, gfx_index, machine().root_device().memregion(gfx_memory_region)->base(), total, &charlayout8, 8);
break;
case K056832_BPP_4dj:
total = machine().root_device().memregion(gfx_memory_region)->bytes() / (i*4);
- konami_decode_gfx(machine(), m_gfxdecode, m_palette, gfx_index, machine().root_device().memregion(gfx_memory_region)->base(), total, &charlayout4dj, 4);
+ konami_decode_gfx(*this, gfx_index, machine().root_device().memregion(gfx_memory_region)->base(), total, &charlayout4dj, 4);
break;
default:
fatalerror("Unsupported bpp\n");
}
- m_gfxdecode->gfx(gfx_index)->set_granularity(16); /* override */
- m_gfxdecode->gfx(gfx_index)->set_colors(m_palette->entries() / 16);
+ gfx(gfx_index)->set_granularity(16); /* override */
+ gfx(gfx_index)->set_colors(palette().entries() / 16);
m_gfx_memory_region = gfx_memory_region;
m_gfx_num = gfx_index;
@@ -2225,7 +2193,7 @@ int k056832_device::altK056832_update_linemap(screen_device &screen, bitmap_rgb3
pixmap = m_pixmap[page];
pal_ptr = machine().pens;
- src_gfx = m_gfxdecode->gfx(m_gfx_num];
+ src_gfx = gfx(m_gfx_num);
src_pitch = src_gfx->rowbytes();
src_modulo = src_gfx->char_modulo;
dst_pitch = pixmap->rowpixels;
diff --git a/src/mame/video/k054156_k054157_k056832.h b/src/mame/video/k054156_k054157_k056832.h
index d043a4f9525..e0c6e87b3f4 100644
--- a/src/mame/video/k054156_k054157_k056832.h
+++ b/src/mame/video/k054156_k054157_k056832.h
@@ -16,8 +16,8 @@ typedef device_delegate<void (int layer, int *code, int *color, int *flags)> k05
#define MCFG_K056832_CB(_class, _method) \
k056832_device::set_k056832_callback(*device, k056832_cb_delegate(&_class::_method, #_class "::" #_method, downcast<_class *>(owner)));
-#define MCFG_K056832_CONFIG(_gfx_reg, _gfx_num, _bpp, _big, _djmain_hack, _k055555) \
- k056832_device::set_config(*device, _gfx_reg, _gfx_num, _bpp, _big, _djmain_hack, _k055555);
+#define MCFG_K056832_CONFIG(_gfx_reg, _bpp, _big, _djmain_hack, _k055555) \
+ k056832_device::set_config(*device, _gfx_reg, _bpp, _big, _djmain_hack, _k055555);
#define K056832_PAGE_COUNT 16
@@ -35,7 +35,7 @@ typedef device_delegate<void (int layer, int *code, int *color, int *flags)> k05
#define K056382_DRAW_FLAG_FORCE_XYSCROLL 0x00800000
-class k056832_device : public device_t
+class k056832_device : public device_t, public device_gfx_interface
{
public:
k056832_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
@@ -45,21 +45,16 @@ public:
}
static void set_k056832_callback(device_t &device, k056832_cb_delegate callback) { downcast<k056832_device &>(device).m_k056832_cb = callback; }
- static void set_config(device_t &device, const char *gfx_reg, int gfx_num, int bpp, int big, int djmain_hack, const char *k055555)
+ static void set_config(device_t &device, const char *gfx_reg, int bpp, int big, int djmain_hack, const char *k055555)
{
k056832_device &dev = downcast<k056832_device &>(device);
dev.m_gfx_memory_region = gfx_reg;
- dev.m_gfx_num = gfx_num;
dev.m_bpp = bpp;
dev.m_big = big;
dev.m_djmain_hack = djmain_hack;
dev.m_k055555_tag = k055555;
}
- // static configuration
- static void static_set_gfxdecode_tag(device_t &device, const char *tag);
- static void static_set_palette_tag(device_t &device, const char *tag);
-
void SetExtLinescroll(); /* Lethal Enforcers */
DECLARE_READ16_MEMBER( ram_word_r );
@@ -219,9 +214,6 @@ private:
void create_tilemaps();
void finalize_init();
- required_device<gfxdecode_device> m_gfxdecode;
- required_device<palette_device> m_palette;
-
public:
void m_tilemap_draw(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect, int num, UINT32 flags, UINT32 priority);
@@ -234,11 +226,8 @@ extern const device_type K056832;
-#define MCFG_K056832_GFXDECODE(_gfxtag) \
- k056832_device::static_set_gfxdecode_tag(*device, "^" _gfxtag);
-
#define MCFG_K056832_PALETTE(_palette_tag) \
- k056832_device::static_set_palette_tag(*device, "^" _palette_tag);
+ MCFG_GFX_PALETTE(_palette_tag)
#endif
diff --git a/src/mame/video/kan_pand.cpp b/src/mame/video/kan_pand.cpp
index 181de04020d..a1f43a21a7f 100644
--- a/src/mame/video/kan_pand.cpp
+++ b/src/mame/video/kan_pand.cpp
@@ -60,8 +60,7 @@ kaneko_pandora_device::kaneko_pandora_device(const machine_config &mconfig, cons
m_gfx_region(0),
m_xoffset(0),
m_yoffset(0),
- m_gfxdecode(*this),
- m_palette(*this)
+ m_gfxdecode(*this)
{
}
@@ -76,16 +75,6 @@ void kaneko_pandora_device::static_set_gfxdecode_tag(device_t &device, const cha
}
//-------------------------------------------------
-// static_set_palette_tag: Set the tag of the
-// palette device
-//-------------------------------------------------
-
-void kaneko_pandora_device::static_set_palette_tag(device_t &device, const char *tag)
-{
- downcast<kaneko_pandora_device &>(device).m_palette.set_tag(tag);
-}
-
-//-------------------------------------------------
// device_start - device-specific startup
//-------------------------------------------------
diff --git a/src/mame/video/kan_pand.h b/src/mame/video/kan_pand.h
index f29c5ef3605..a9cb3d3e7f2 100644
--- a/src/mame/video/kan_pand.h
+++ b/src/mame/video/kan_pand.h
@@ -24,7 +24,6 @@ public:
// static configuration
static void static_set_gfxdecode_tag(device_t &device, const char *tag);
- static void static_set_palette_tag(device_t &device, const char *tag);
static void set_gfx_region(device_t &device, int gfxregion) { downcast<kaneko_pandora_device &>(device).m_gfx_region = gfxregion; }
static void set_offsets(device_t &device, int x_offset, int y_offset)
{
@@ -59,7 +58,6 @@ private:
int m_xoffset;
int m_yoffset;
required_device<gfxdecode_device> m_gfxdecode;
- required_device<palette_device> m_palette;
};
extern const device_type KANEKO_PANDORA;
@@ -78,7 +76,4 @@ extern const device_type KANEKO_PANDORA;
#define MCFG_KANEKO_PANDORA_GFXDECODE(_gfxtag) \
kaneko_pandora_device::static_set_gfxdecode_tag(*device, "^" _gfxtag);
-#define MCFG_KANEKO_PANDORA_PALETTE(_palette_tag) \
- kaneko_pandora_device::static_set_palette_tag(*device, "^" _palette_tag);
-
#endif /* __KAN_PAND_H__ */
diff --git a/src/mame/video/konami_helper.cpp b/src/mame/video/konami_helper.cpp
index e26864a814b..236371fb4d6 100644
--- a/src/mame/video/konami_helper.cpp
+++ b/src/mame/video/konami_helper.cpp
@@ -5,13 +5,14 @@
#include "emu.h"
#include "konami_helper.h"
-void konami_decode_gfx(running_machine &machine, gfxdecode_device * gfxdecode, palette_device &palette, int gfx_index, UINT8 *data, UINT32 total, const gfx_layout *layout, int bpp)
+void konami_decode_gfx(device_gfx_interface &gfxdecode, int gfx_index, UINT8 *data, UINT32 total, const gfx_layout *layout, int bpp)
{
gfx_layout gl;
+ palette_device &palette = gfxdecode.palette();
memcpy(&gl, layout, sizeof(gl));
gl.total = total;
- gfxdecode->set_gfx(gfx_index, std::make_unique<gfx_element>(palette, gl, data, 0, palette.entries() >> bpp, 0));
+ gfxdecode.set_gfx(gfx_index, std::make_unique<gfx_element>(palette, gl, data, 0, palette.entries() >> bpp, 0));
}
diff --git a/src/mame/video/konami_helper.h b/src/mame/video/konami_helper.h
index 0938217e778..e1afd95aada 100644
--- a/src/mame/video/konami_helper.h
+++ b/src/mame/video/konami_helper.h
@@ -6,7 +6,7 @@
#ifndef __KONAMI_HELPER_H__
#define __KONAMI_HELPER_H__
-void konami_decode_gfx(running_machine &machine, gfxdecode_device * gfxdecode, palette_device &palette, int gfx_index, UINT8 *data, UINT32 total, const gfx_layout *layout, int bpp);
+void konami_decode_gfx(device_gfx_interface &gfxdecode, int gfx_index, UINT8 *data, UINT32 total, const gfx_layout *layout, int bpp);
/* helper function to sort three tile layers by priority order */
void konami_sortlayers3(int *layer, int *pri);
diff --git a/src/mame/video/mystwarr.cpp b/src/mame/video/mystwarr.cpp
index 537cd1e8157..8fc30620790 100644
--- a/src/mame/video/mystwarr.cpp
+++ b/src/mame/video/mystwarr.cpp
@@ -52,7 +52,7 @@ void mystwarr_state::decode_tiles()
d += 5;
}
- m_gfxdecode->gfx(gfxnum)->set_source(m_decoded.get());
+ m_k056832->gfx(gfxnum)->set_source(m_decoded.get());
}
diff --git a/src/mame/video/pc080sn.cpp b/src/mame/video/pc080sn.cpp
index 62736eecae8..54101789fa9 100644
--- a/src/mame/video/pc080sn.cpp
+++ b/src/mame/video/pc080sn.cpp
@@ -58,8 +58,7 @@ pc080sn_device::pc080sn_device(const machine_config &mconfig, const char *tag, d
m_y_offset(0),
m_y_invert(0),
m_dblwidth(0),
- m_gfxdecode(*this),
- m_palette(*this)
+ m_gfxdecode(*this)
{
for (auto & elem : m_ctrl)
elem = 0;
@@ -84,16 +83,6 @@ void pc080sn_device::static_set_gfxdecode_tag(device_t &device, const char *tag)
}
//-------------------------------------------------
-// static_set_palette_tag: Set the tag of the
-// palette device
-//-------------------------------------------------
-
-void pc080sn_device::static_set_palette_tag(device_t &device, const char *tag)
-{
- downcast<pc080sn_device &>(device).m_palette.set_tag(tag);
-}
-
-//-------------------------------------------------
// device_start - device-specific startup
//-------------------------------------------------
diff --git a/src/mame/video/pc080sn.h b/src/mame/video/pc080sn.h
index b181fbd134e..a63cdfd6915 100644
--- a/src/mame/video/pc080sn.h
+++ b/src/mame/video/pc080sn.h
@@ -11,7 +11,6 @@ public:
// static configuration
static void static_set_gfxdecode_tag(device_t &device, const char *tag);
- static void static_set_palette_tag(device_t &device, const char *tag);
static void set_gfx_region(device_t &device, int gfxregion) { downcast<pc080sn_device &>(device).m_gfxnum = gfxregion; }
static void set_yinvert(device_t &device, int y_inv) { downcast<pc080sn_device &>(device).m_y_invert = y_inv; }
static void set_dblwidth(device_t &device, int dblwidth) { downcast<pc080sn_device &>(device).m_dblwidth = dblwidth; }
@@ -68,7 +67,6 @@ public:
int m_dblwidth;
required_device<gfxdecode_device> m_gfxdecode;
- required_device<palette_device> m_palette;
};
extern const device_type PC080SN;
@@ -89,7 +87,4 @@ extern const device_type PC080SN;
#define MCFG_PC080SN_GFXDECODE(_gfxtag) \
pc080sn_device::static_set_gfxdecode_tag(*device, "^" _gfxtag);
-#define MCFG_PC080SN_PALETTE(_palette_tag) \
- pc080sn_device::static_set_palette_tag(*device, "^" _palette_tag);
-
#endif
diff --git a/src/mame/video/pcd.cpp b/src/mame/video/pcd.cpp
index 66d4b288347..cd453cffa14 100644
--- a/src/mame/video/pcd.cpp
+++ b/src/mame/video/pcd.cpp
@@ -10,11 +10,10 @@ const device_type PCX_VIDEO = &device_creator<pcx_video_device>;
pcdx_video_device::pcdx_video_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source) :
device_t(mconfig, type, name, tag, owner, clock, shortname, source),
+ device_gfx_interface(mconfig, *this, nullptr, "palette"),
m_maincpu(*this, ":maincpu"),
m_mcu(*this, "graphics"),
m_crtc(*this, "crtc"),
- m_palette(*this, "palette"),
- m_gfxdecode(*this, "gfxdecode"),
m_pic2(*this, ":pic2")
{
}
@@ -76,7 +75,7 @@ static const gfx_layout pcd_charlayout =
};
static GFXDECODE_START( pcx )
- GFXDECODE_ENTRY( "char", 0x0000, pcd_charlayout, 0, 1 )
+ GFXDECODE_DEVICE( "char", 0x0000, pcd_charlayout, 0, 1 )
GFXDECODE_END
static INPUT_PORTS_START( pcd_mouse )
@@ -113,7 +112,6 @@ static MACHINE_CONFIG_FRAGMENT( pcd_video )
MCFG_SCREEN_REFRESH_RATE(50)
MCFG_SCREEN_UPDATE_DEVICE("crtc", scn2674_device, screen_update)
- MCFG_GFXDECODE_ADD("gfxdecode", "palette", empty)
MCFG_PALETTE_ADD("palette", 3)
MCFG_PALETTE_INIT_OWNER(pcdx_video_device, pcdx)
@@ -159,7 +157,6 @@ static MACHINE_CONFIG_FRAGMENT( pcx_video )
MCFG_SCREEN_REFRESH_RATE(50)
MCFG_SCREEN_UPDATE_DEVICE("crtc", scn2674_device, screen_update)
- MCFG_GFXDECODE_ADD("gfxdecode", "palette", pcx)
MCFG_PALETTE_ADD_MONOCHROME("palette")
MCFG_SCN2674_VIDEO_ADD("crtc", 0, INPUTLINE("graphics", MCS51_INT0_LINE));
@@ -184,7 +181,7 @@ SCN2674_DRAW_CHARACTER_MEMBER(pcd_video_device::display_pixels)
if(m_p2 & 8)
data = ~data;
for(int i = 0; i < 16; i++)
- bitmap.pix32(y, x + i) = m_palette->pen((data & (1 << (15 - i))) ? 1 : 0);
+ bitmap.pix32(y, x + i) = palette().pen((data & (1 << (15 - i))) ? 1 : 0);
}
else
{
@@ -207,7 +204,7 @@ SCN2674_DRAW_CHARACTER_MEMBER(pcd_video_device::display_pixels)
else if(attr & 8)
bgnd = 2;
for(int i = 0; i < 8; i++)
- bitmap.pix32(y, x + i) = m_palette->pen((data & (1 << (7 - i))) ? fgnd : bgnd);
+ bitmap.pix32(y, x + i) = palette().pen((data & (1 << (7 - i))) ? fgnd : bgnd);
}
}
@@ -221,7 +218,7 @@ SCN2674_DRAW_CHARACTER_MEMBER(pcx_video_device::display_pixels)
if(m_p1 & 0x20)
data = ~data;
for(int i = 0; i < 8; i++)
- bitmap.pix32(y, x + i) = m_palette->pen((data & (1 << (7 - i))) ? 1 : 0);
+ bitmap.pix32(y, x + i) = palette().pen((data & (1 << (7 - i))) ? 1 : 0);
}
PALETTE_INIT_MEMBER(pcdx_video_device, pcdx)
@@ -276,7 +273,7 @@ WRITE8_MEMBER(pcd_video_device::vram_w)
{
offset >>= 1;
m_charram[offset & 0x1fff] = data;
- m_gfxdecode->gfx(0)->mark_dirty(offset/16);
+ gfx(0)->mark_dirty(offset/16);
}
}
@@ -410,7 +407,7 @@ void pcd_video_device::device_start()
{
m_maincpu->space(AS_IO).install_readwrite_handler(0xfb00, 0xfb01, 0, 0, read8_delegate(FUNC(pcdx_video_device::detect_r), this), write8_delegate(FUNC(pcdx_video_device::detect_w), this), 0xff00);
m_maincpu->space(AS_PROGRAM).install_readwrite_handler(0xf0000, 0xf7fff, 0, 0, read8_delegate(FUNC(pcd_video_device::vram_r), this), write8_delegate(FUNC(pcd_video_device::vram_w), this), 0xffff);
- m_gfxdecode->set_gfx(0, std::make_unique<gfx_element>(m_palette, pcd_charlayout, &m_charram[0], 0, 1, 0));
+ set_gfx(0, std::make_unique<gfx_element>(palette(), pcd_charlayout, &m_charram[0], 0, 1, 0));
}
void pcd_video_device::device_reset()
@@ -442,6 +439,8 @@ void pcx_video_device::device_start()
mcu->i8051_set_serial_rx_callback(READ8_DELEGATE(pcx_video_device, rx_callback));
set_data_frame(1, 8, PARITY_NONE, STOP_BITS_1);
set_rate(600*2); // FIXME: fix the keyboard when the mc2661 baud rate calc is fixed
+
+ decode_gfx(GFXDECODE_NAME(pcx));
}
void pcx_video_device::device_reset()
diff --git a/src/mame/video/pcd.h b/src/mame/video/pcd.h
index f22c2707569..32637fac992 100644
--- a/src/mame/video/pcd.h
+++ b/src/mame/video/pcd.h
@@ -11,7 +11,7 @@
#define MCFG_PCX_VIDEO_TXD_HANDLER(_devcb) \
devcb = &pcx_video_device::set_txd_handler(*device, DEVCB_##_devcb);
-class pcdx_video_device : public device_t
+class pcdx_video_device : public device_t, public device_gfx_interface
{
public:
pcdx_video_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source);
@@ -25,8 +25,6 @@ protected:
required_device<cpu_device> m_maincpu;
required_device<cpu_device> m_mcu;
required_device<scn2674_device> m_crtc;
- required_device<palette_device> m_palette;
- required_device<gfxdecode_device> m_gfxdecode;
required_device<pic8259_device> m_pic2;
};
diff --git a/src/mame/video/segaic24.cpp b/src/mame/video/segaic24.cpp
index 57c848287dc..f1e1f87aae9 100644
--- a/src/mame/video/segaic24.cpp
+++ b/src/mame/video/segaic24.cpp
@@ -25,31 +25,11 @@ const device_type S24MIXER = &device_creator<segas24_mixer>;
segas24_tile::segas24_tile(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
: device_t(mconfig, S24TILE, "Sega System 24 Tilemap", tag, owner, clock, "segas24_tile", __FILE__),
- m_gfxdecode(*this),
- m_palette(*this)
+ device_gfx_interface(mconfig, *this),
+ char_gfx_index(0)
{
}
-//-------------------------------------------------
-// static_set_gfxdecode_tag: Set the tag of the
-// gfx decoder
-//-------------------------------------------------
-
-void segas24_tile::static_set_gfxdecode_tag(device_t &device, const char *tag)
-{
- downcast<segas24_tile &>(device).m_gfxdecode.set_tag(tag);
-}
-
-//-------------------------------------------------
-// static_set_palette_tag: Set the tag of the
-// palette device
-//-------------------------------------------------
-
-void segas24_tile::static_set_palette_tag(device_t &device, const char *tag)
-{
- downcast<segas24_tile &>(device).m_palette.set_tag(tag);
-}
-
void segas24_tile::static_set_tile_mask(device_t &device, UINT16 _tile_mask)
{
@@ -96,21 +76,13 @@ TILE_GET_INFO_MEMBER(segas24_tile::tile_info_1w)
void segas24_tile::device_start()
{
- if(!m_gfxdecode->started())
- throw device_missing_dependencies();
-
- for(char_gfx_index = 0; char_gfx_index < MAX_GFX_ELEMENTS; char_gfx_index++)
- if (m_gfxdecode->gfx(char_gfx_index) == nullptr)
- break;
- assert(char_gfx_index != MAX_GFX_ELEMENTS);
-
char_ram = std::make_unique<UINT16[]>(0x80000/2);
tile_ram = std::make_unique<UINT16[]>(0x10000/2);
- tile_layer[0] = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(segas24_tile::tile_info_0s),this), TILEMAP_SCAN_ROWS, 8, 8, 64, 64);
- tile_layer[1] = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(segas24_tile::tile_info_0w),this), TILEMAP_SCAN_ROWS, 8, 8, 64, 64);
- tile_layer[2] = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(segas24_tile::tile_info_1s),this), TILEMAP_SCAN_ROWS, 8, 8, 64, 64);
- tile_layer[3] = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(segas24_tile::tile_info_1w),this), TILEMAP_SCAN_ROWS, 8, 8, 64, 64);
+ tile_layer[0] = &machine().tilemap().create(*this, tilemap_get_info_delegate(FUNC(segas24_tile::tile_info_0s),this), TILEMAP_SCAN_ROWS, 8, 8, 64, 64);
+ tile_layer[1] = &machine().tilemap().create(*this, tilemap_get_info_delegate(FUNC(segas24_tile::tile_info_0w),this), TILEMAP_SCAN_ROWS, 8, 8, 64, 64);
+ tile_layer[2] = &machine().tilemap().create(*this, tilemap_get_info_delegate(FUNC(segas24_tile::tile_info_1s),this), TILEMAP_SCAN_ROWS, 8, 8, 64, 64);
+ tile_layer[3] = &machine().tilemap().create(*this, tilemap_get_info_delegate(FUNC(segas24_tile::tile_info_1w),this), TILEMAP_SCAN_ROWS, 8, 8, 64, 64);
tile_layer[0]->set_transparent_pen(0);
tile_layer[1]->set_transparent_pen(0);
@@ -120,7 +92,7 @@ void segas24_tile::device_start()
memset(char_ram.get(), 0, 0x80000);
memset(tile_ram.get(), 0, 0x10000);
- m_gfxdecode->set_gfx(char_gfx_index, std::make_unique<gfx_element>(m_palette, char_layout, (UINT8 *)char_ram.get(), NATIVE_ENDIAN_VALUE_LE_BE(8,0), m_palette->entries() / 16, 0));
+ set_gfx(char_gfx_index, std::make_unique<gfx_element>(palette(), char_layout, (UINT8 *)char_ram.get(), NATIVE_ENDIAN_VALUE_LE_BE(8,0), palette().entries() / 16, 0));
save_pointer(NAME(tile_ram.get()), 0x10000/2);
save_pointer(NAME(char_ram.get()), 0x80000/2);
@@ -267,7 +239,7 @@ void segas24_tile::draw_rect(screen_device &screen, bitmap_ind16 &bm, bitmap_ind
const UINT16 *source = &bm.pix16(sy, sx);
const UINT8 *trans = &tm.pix8(sy, sx);
UINT32 *dest = &dm.pix32(0);
- const pen_t *pens = m_palette->pens();
+ const pen_t *pens = palette().pens();
tpri |= TILEMAP_PIXEL_LAYER0;
@@ -576,7 +548,7 @@ WRITE16_MEMBER(segas24_tile::char_w)
UINT16 old = char_ram[offset];
COMBINE_DATA(char_ram.get() + offset);
if(old != char_ram[offset])
- m_gfxdecode->gfx(char_gfx_index)->mark_dirty(offset / 16);
+ gfx(char_gfx_index)->mark_dirty(offset / 16);
}
READ32_MEMBER(segas24_tile::tile32_r)
diff --git a/src/mame/video/segaic24.h b/src/mame/video/segaic24.h
index 51165e32ac1..baa9b018afa 100644
--- a/src/mame/video/segaic24.h
+++ b/src/mame/video/segaic24.h
@@ -19,13 +19,10 @@
MCFG_DEVICE_ADD(_tag, S24MIXER, 0)
-#define MCFG_S24TILE_DEVICE_GFXDECODE(_gfxtag) \
- segas24_tile::static_set_gfxdecode_tag(*device, "^" _gfxtag);
-
#define MCFG_S24TILE_DEVICE_PALETTE(_palette_tag) \
- segas24_tile::static_set_palette_tag(*device, "^" _palette_tag);
+ MCFG_GFX_PALETTE(_palette_tag)
-class segas24_tile : public device_t
+class segas24_tile : public device_t, public device_gfx_interface
{
friend class segas24_tile_config;
@@ -33,8 +30,6 @@ public:
segas24_tile(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
// static configuration
- static void static_set_gfxdecode_tag(device_t &device, const char *tag);
- static void static_set_palette_tag(device_t &device, const char *tag);
static void static_set_tile_mask(device_t &device, UINT16 tile_mask);
DECLARE_READ16_MEMBER(tile_r);
@@ -65,8 +60,6 @@ private:
UINT16 tile_mask;
static const gfx_layout char_layout;
- required_device<gfxdecode_device> m_gfxdecode;
- required_device<palette_device> m_palette;
void tile_info(int offset, tile_data &tileinfo, tilemap_memory_index tile_index);
TILE_GET_INFO_MEMBER(tile_info_0s);
diff --git a/src/mame/video/seta001.cpp b/src/mame/video/seta001.cpp
index d0ff7874fb3..3c81cd94a0e 100644
--- a/src/mame/video/seta001.cpp
+++ b/src/mame/video/seta001.cpp
@@ -33,8 +33,7 @@ const device_type SETA001_SPRITE = &device_creator<seta001_device>;
seta001_device::seta001_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
: device_t(mconfig, SETA001_SPRITE, "Seta SETA001 Sprite", tag, owner, clock, "seta001", __FILE__),
- m_gfxdecode(*this),
- m_palette(*this)
+ m_gfxdecode(*this)
{
}
@@ -48,16 +47,6 @@ void seta001_device::static_set_gfxdecode_tag(device_t &device, const char *tag)
downcast<seta001_device &>(device).m_gfxdecode.set_tag(tag);
}
-//-------------------------------------------------
-// static_set_palette_tag: Set the tag of the
-// palette device
-//-------------------------------------------------
-
-void seta001_device::static_set_palette_tag(device_t &device, const char *tag)
-{
- downcast<seta001_device &>(device).m_palette.set_tag(tag);
-}
-
void seta001_device::device_start()
{
// chukatai draws a column on the left from uninitialized RAM which causes garbage in a debug build
diff --git a/src/mame/video/seta001.h b/src/mame/video/seta001.h
index b7fea3ce96e..936a9183859 100644
--- a/src/mame/video/seta001.h
+++ b/src/mame/video/seta001.h
@@ -15,7 +15,6 @@ public:
// static configuration
static void static_set_gfxdecode_tag(device_t &device, const char *tag);
- static void static_set_palette_tag(device_t &device, const char *tag);
static void set_gfxbank_callback(device_t &device, gfxbank_cb_delegate callback) { downcast<seta001_device &>(device).m_gfxbank_cb = callback; }
DECLARE_WRITE8_MEMBER( spritebgflag_w8 );
@@ -63,7 +62,6 @@ private:
void draw_background( bitmap_ind16 &bitmap, const rectangle &cliprect, int bank_size, int setac_type);
void draw_foreground( screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect, int bank_size);
required_device<gfxdecode_device> m_gfxdecode;
- required_device<palette_device> m_palette;
gfxbank_cb_delegate m_gfxbank_cb;
@@ -88,6 +86,3 @@ extern const device_type SETA001_SPRITE;
#define MCFG_SETA001_SPRITE_GFXDECODE(_gfxtag) \
seta001_device::static_set_gfxdecode_tag(*device, "^" _gfxtag);
-
-#define MCFG_SETA001_SPRITE_PALETTE(_palette_tag) \
- seta001_device::static_set_palette_tag(*device, "^" _palette_tag);
diff --git a/src/mame/video/snk68_spr.cpp b/src/mame/video/snk68_spr.cpp
index fa2382d76ef..0aa9315788a 100644
--- a/src/mame/video/snk68_spr.cpp
+++ b/src/mame/video/snk68_spr.cpp
@@ -10,7 +10,6 @@ const device_type SNK68_SPR = &device_creator<snk68_spr_device>;
snk68_spr_device::snk68_spr_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
: device_t(mconfig, SNK68_SPR, "SNK68 Sprites", tag, owner, clock, "snk68_spr", __FILE__),
m_gfxdecode(*this),
- m_palette(*this),
m_spriteram(*this, "^spriteram"),
m_screen(*this, "^screen"),
m_flipscreen(0),
@@ -34,16 +33,6 @@ void snk68_spr_device::static_set_gfxdecode_tag(device_t &device, const char *ta
downcast<snk68_spr_device &>(device).m_gfxdecode.set_tag(tag);
}
-//-------------------------------------------------
-// static_set_palette_tag: Set the tag of the
-// palette device
-//-------------------------------------------------
-
-void snk68_spr_device::static_set_palette_tag(device_t &device, const char *tag)
-{
- downcast<snk68_spr_device &>(device).m_palette.set_tag(tag);
-}
-
// static
void snk68_spr_device::set_tile_indirect_cb(device_t &device,snk68_tile_indirection_delegate newtilecb)
{
diff --git a/src/mame/video/snk68_spr.h b/src/mame/video/snk68_spr.h
index 5604f74714a..1f985727e5a 100644
--- a/src/mame/video/snk68_spr.h
+++ b/src/mame/video/snk68_spr.h
@@ -4,8 +4,6 @@ typedef device_delegate<void (int&, int&, int&, int&)> snk68_tile_indirection_de
#define MCFG_SNK68_SPR_GFXDECODE(_gfxtag) \
snk68_spr_device::static_set_gfxdecode_tag(*device, "^" _gfxtag);
-#define MCFG_SNK68_SPR_PALETTE(_palette_tag) \
- snk68_spr_device::static_set_palette_tag(*device, "^" _palette_tag);
#define MCFG_SNK68_SPR_SET_TILE_INDIRECT( _class, _method) \
snk68_spr_device::set_tile_indirect_cb(*device, snk68_tile_indirection_delegate(&_class::_method, #_class "::" #_method, NULL, (_class *)0));
#define MCFG_SNK68_SPR_NO_PARTIAL \
@@ -19,7 +17,6 @@ public:
// static configuration
static void static_set_gfxdecode_tag(device_t &device, const char *tag);
- static void static_set_palette_tag(device_t &device, const char *tag);
static void set_tile_indirect_cb(device_t &device,snk68_tile_indirection_delegate newtilecb);
static void static_set_no_partial(device_t &device);
@@ -38,8 +35,7 @@ protected:
virtual void device_reset() override;
private:
- optional_device<gfxdecode_device> m_gfxdecode;
- optional_device<palette_device> m_palette;
+ required_device<gfxdecode_device> m_gfxdecode;
required_shared_ptr<UINT16> m_spriteram;
required_device<screen_device> m_screen;
int m_flipscreen;
diff --git a/src/mame/video/st0020.cpp b/src/mame/video/st0020.cpp
index bb0bb01da1b..084d8be208f 100644
--- a/src/mame/video/st0020.cpp
+++ b/src/mame/video/st0020.cpp
@@ -17,33 +17,12 @@ const device_type ST0020_SPRITES = &device_creator<st0020_device>;
st0020_device::st0020_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
: device_t(mconfig, ST0020_SPRITES, "Seta ST0020 Sprites", tag, owner, clock, "st0020", __FILE__)
- , m_gfxdecode(*this)
- , m_palette(*this)
+ , device_gfx_interface(mconfig, *this)
{
m_is_st0032 = 0;
m_is_jclub2 = 0;
}
-//-------------------------------------------------
-// static_set_gfxdecode_tag: Set the tag of the
-// gfx decoder
-//-------------------------------------------------
-
-void st0020_device::static_set_gfxdecode_tag(device_t &device, const char *tag)
-{
- downcast<st0020_device &>(device).m_gfxdecode.set_tag(tag);
-}
-
-//-------------------------------------------------
-// static_set_palette_tag: Set the tag of the
-// palette device
-//-------------------------------------------------
-
-void st0020_device::static_set_palette_tag(device_t &device, const char *tag)
-{
- downcast<st0020_device &>(device).m_palette.set_tag(tag);
-}
-
void st0020_device::set_is_st0032(device_t &device, int is_st0032)
{
st0020_device &dev = downcast<st0020_device &>(device);
@@ -90,13 +69,9 @@ void st0020_device::device_start()
m_st0020_spriteram = make_unique_clear<UINT16[]>(0x80000 / 2);
m_st0020_blitram = make_unique_clear<UINT16[]>(0x100 / 2);
- for (m_gfx_index = 0; m_gfx_index < MAX_GFX_ELEMENTS; m_gfx_index++)
- if (m_gfxdecode->gfx(m_gfx_index) == nullptr)
- break;
-
- m_gfxdecode->set_gfx(m_gfx_index, std::make_unique<gfx_element>(m_palette, layout_16x8x8_2, (UINT8 *)m_st0020_gfxram.get(), 0, m_palette->entries() / 64, 0));
+ set_gfx(0, std::make_unique<gfx_element>(palette(), layout_16x8x8_2, (UINT8 *)m_st0020_gfxram.get(), 0, palette().entries() / 64, 0));
- m_gfxdecode->gfx(m_gfx_index)->set_granularity(64); /* 256 colour sprites with palette selectable on 64 colour boundaries */
+ gfx(0)->set_granularity(64); /* 256 colour sprites with palette selectable on 64 colour boundaries */
save_pointer(NAME(m_st0020_gfxram.get()), 4 * 0x100000/2);
save_pointer(NAME(m_st0020_spriteram.get()), 0x80000/2);
@@ -128,7 +103,7 @@ WRITE16_MEMBER(st0020_device::st0020_gfxram_w)
offset += m_st0020_gfxram_bank * 0x100000/2;
COMBINE_DATA(&m_st0020_gfxram[offset]);
- m_gfxdecode->gfx(m_gfx_index)->mark_dirty(offset / (16*8/2));
+ gfx(0)->mark_dirty(offset / (16*8/2));
}
READ16_MEMBER(st0020_device::st0020_sprram_r)
@@ -214,7 +189,7 @@ WRITE16_MEMBER(st0020_device::st0020_blit_w)
dst /= 16*8;
while (len--)
{
- m_gfxdecode->gfx(m_gfx_index)->mark_dirty(dst);
+ gfx(0)->mark_dirty(dst);
dst++;
}
}
@@ -407,7 +382,7 @@ void st0020_device::st0020_draw_zooming_sprites(bitmap_ind16 &bitmap, const rect
{
for (y = ystart; y != yend; y += yinc)
{
- m_gfxdecode->gfx(m_gfx_index)->zoom_transpen(bitmap,cliprect,
+ gfx(0)->zoom_transpen(bitmap,cliprect,
code++,
color,
flipx, flipy,
diff --git a/src/mame/video/st0020.h b/src/mame/video/st0020.h
index 33390a8bddc..23049c2b8fb 100644
--- a/src/mame/video/st0020.h
+++ b/src/mame/video/st0020.h
@@ -3,19 +3,15 @@
-class st0020_device : public device_t
+class st0020_device : public device_t, public device_gfx_interface
{
public:
st0020_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
// static configuration
- static void static_set_gfxdecode_tag(device_t &device, const char *tag);
- static void static_set_palette_tag(device_t &device, const char *tag);
static void set_is_st0032(device_t &device, int is_st0032);
static void set_is_jclub2o(device_t &device, int is_jclub2o);
- int m_gfx_index;
-
// see if we can handle the difference between this and the st0032 in here, or if we need another
// device
int m_is_st0032;
@@ -45,8 +41,6 @@ private:
void st0020_draw_zooming_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect, int priority);
DECLARE_READ16_MEMBER(st0020_blit_r);
DECLARE_WRITE16_MEMBER(st0020_blit_w);
- required_device<gfxdecode_device> m_gfxdecode;
- required_device<palette_device> m_palette;
UINT8* m_rom_ptr;
size_t m_rom_size;
};
@@ -57,8 +51,5 @@ private:
if (m_is_st0032) mem_mask = ((mem_mask & 0x00ff)<<8) | ((mem_mask & 0xff00)>>8);
extern const device_type ST0020_SPRITES;
-#define MCFG_ST0020_SPRITES_GFXDECODE(_gfxtag) \
- st0020_device::static_set_gfxdecode_tag(*device, "^" _gfxtag);
-
#define MCFG_ST0020_SPRITES_PALETTE(_palette_tag) \
- st0020_device::static_set_palette_tag(*device, "^" _palette_tag);
+ MCFG_GFX_PALETTE(_palette_tag)
diff --git a/src/mame/video/tc0080vco.cpp b/src/mame/video/tc0080vco.cpp
index 0bf5aec9b62..4e0604b9514 100644
--- a/src/mame/video/tc0080vco.cpp
+++ b/src/mame/video/tc0080vco.cpp
@@ -103,8 +103,7 @@ tc0080vco_device::tc0080vco_device(const machine_config &mconfig, const char *ta
m_bg_yoffs(0),
m_bg_flip_yoffs(0),
m_has_fg0(1),
- m_gfxdecode(*this),
- m_palette(*this)
+ m_gfxdecode(*this)
{
}
@@ -119,16 +118,6 @@ void tc0080vco_device::static_set_gfxdecode_tag(device_t &device, const char *ta
}
//-------------------------------------------------
-// static_set_palette_tag: Set the tag of the
-// palette device
-//-------------------------------------------------
-
-void tc0080vco_device::static_set_palette_tag(device_t &device, const char *tag)
-{
- downcast<tc0080vco_device &>(device).m_palette.set_tag(tag);
-}
-
-//-------------------------------------------------
// device_start - device-specific startup
//-------------------------------------------------
@@ -193,7 +182,7 @@ void tc0080vco_device::device_start()
m_scroll_ram = m_ram.get() + 0x20800 / 2;
/* create the char set (gfx will then be updated dynamically from RAM) */
- m_gfxdecode->set_gfx(m_txnum, std::make_unique<gfx_element>(m_palette, charlayout, (UINT8 *)m_char_ram, 0, 1, 512));
+ m_gfxdecode->set_gfx(m_txnum, std::make_unique<gfx_element>(m_gfxdecode->palette(), charlayout, (UINT8 *)m_char_ram, 0, 1, 512));
save_pointer(NAME(m_ram.get()), TC0080VCO_RAM_SIZE / 2);
machine().save().register_postload(save_prepost_delegate(FUNC(tc0080vco_device::postload), this));
diff --git a/src/mame/video/tc0080vco.h b/src/mame/video/tc0080vco.h
index c842e3a57b5..65652b011ec 100644
--- a/src/mame/video/tc0080vco.h
+++ b/src/mame/video/tc0080vco.h
@@ -11,7 +11,6 @@ public:
// static configuration
static void static_set_gfxdecode_tag(device_t &device, const char *tag);
- static void static_set_palette_tag(device_t &device, const char *tag);
static void set_gfx_region(device_t &device, int gfxnum) { downcast<tc0080vco_device &>(device).m_gfxnum = gfxnum; }
static void set_tx_region(device_t &device, int txnum) { downcast<tc0080vco_device &>(device).m_txnum = txnum; }
static void set_offsets(device_t &device, int x_offset, int y_offset)
@@ -75,7 +74,6 @@ private:
int m_has_fg0; // for debug, it can be enabled with set_fg0_debug(true)
required_device<gfxdecode_device> m_gfxdecode;
- required_device<palette_device> m_palette;
TILE_GET_INFO_MEMBER(get_bg0_tile_info);
TILE_GET_INFO_MEMBER(get_bg1_tile_info);
@@ -101,7 +99,4 @@ extern const device_type TC0080VCO;
#define MCFG_TC0080VCO_GFXDECODE(_gfxtag) \
tc0080vco_device::static_set_gfxdecode_tag(*device, "^" _gfxtag);
-#define MCFG_TC0080VCO_PALETTE(_palette_tag) \
- tc0080vco_device::static_set_palette_tag(*device, "^" _palette_tag);
-
#endif
diff --git a/src/mame/video/tc0480scp.cpp b/src/mame/video/tc0480scp.cpp
index 83b0ede8c18..bfd14613a53 100644
--- a/src/mame/video/tc0480scp.cpp
+++ b/src/mame/video/tc0480scp.cpp
@@ -166,8 +166,7 @@ tc0480scp_device::tc0480scp_device(const machine_config &mconfig, const char *ta
m_flip_xoffs(0),
m_flip_yoffs(0),
m_col_base(0),
- m_gfxdecode(*this),
- m_palette(*this)
+ m_gfxdecode(*this)
{
memset(m_ctrl, 0, sizeof(m_ctrl));
@@ -193,16 +192,6 @@ void tc0480scp_device::static_set_gfxdecode_tag(device_t &device, const char *ta
}
//-------------------------------------------------
-// static_set_palette_tag: Set the tag of the
-// palette device
-//-------------------------------------------------
-
-void tc0480scp_device::static_set_palette_tag(device_t &device, const char *tag)
-{
- downcast<tc0480scp_device &>(device).m_palette.set_tag(tag);
-}
-
-//-------------------------------------------------
// device_start - device-specific startup
//-------------------------------------------------
@@ -297,7 +286,7 @@ void tc0480scp_device::device_start()
set_layer_ptrs();
/* create the char set (gfx will then be updated dynamically from RAM) */
- m_gfxdecode->set_gfx(m_txnum, std::make_unique<gfx_element>(m_palette, tc0480scp_charlayout, (UINT8 *)m_char_ram, NATIVE_ENDIAN_VALUE_LE_BE(8,0), 64, m_col_base));
+ m_gfxdecode->set_gfx(m_txnum, std::make_unique<gfx_element>(m_gfxdecode->palette(), tc0480scp_charlayout, (UINT8 *)m_char_ram, NATIVE_ENDIAN_VALUE_LE_BE(8,0), 64, m_col_base));
m_gfxdecode->gfx(m_gfxnum)->set_colorbase(m_col_base);
save_item(NAME(m_ram));
diff --git a/src/mame/video/tc0480scp.h b/src/mame/video/tc0480scp.h
index 12c83523234..1f77d368b45 100644
--- a/src/mame/video/tc0480scp.h
+++ b/src/mame/video/tc0480scp.h
@@ -11,7 +11,6 @@ public:
// static configuration
static void static_set_gfxdecode_tag(device_t &device, const char *tag);
- static void static_set_palette_tag(device_t &device, const char *tag);
static void set_gfx_region(device_t &device, int gfxregion) { downcast<tc0480scp_device &>(device).m_gfxnum = gfxregion; }
static void set_tx_region(device_t &device, int txregion) { downcast<tc0480scp_device &>(device).m_txnum = txregion; }
static void set_col_base(device_t &device, int col) { downcast<tc0480scp_device &>(device).m_col_base = col; }
@@ -95,7 +94,6 @@ private:
int m_col_base;
required_device<gfxdecode_device> m_gfxdecode;
- required_device<palette_device> m_palette;
void common_get_tc0480bg_tile_info( tile_data &tileinfo, int tile_index, UINT16 *ram, int gfxnum );
void common_get_tc0480tx_tile_info( tile_data &tileinfo, int tile_index, UINT16 *ram, int gfxnum );
@@ -136,7 +134,4 @@ extern const device_type TC0480SCP;
#define MCFG_TC0480SCP_GFXDECODE(_gfxtag) \
tc0480scp_device::static_set_gfxdecode_tag(*device, "^" _gfxtag);
-#define MCFG_TC0480SCP_PALETTE(_palette_tag) \
- tc0480scp_device::static_set_palette_tag(*device, "^" _palette_tag);
-
#endif
diff --git a/src/mame/video/vsystem_spr.cpp b/src/mame/video/vsystem_spr.cpp
index 7b74e66851c..981dc32cb40 100644
--- a/src/mame/video/vsystem_spr.cpp
+++ b/src/mame/video/vsystem_spr.cpp
@@ -73,8 +73,7 @@ const device_type VSYSTEM_SPR = &device_creator<vsystem_spr_device>;
vsystem_spr_device::vsystem_spr_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
: device_t(mconfig, VSYSTEM_SPR, "Video System Sprites", tag, owner, clock, "vsystem_spr", __FILE__),
- m_gfxdecode(*this),
- m_palette(*this)
+ m_gfxdecode(*this)
{
m_transpen = 15;
m_pal_base = 0;
@@ -99,16 +98,6 @@ void vsystem_spr_device::static_set_gfxdecode_tag(device_t &device, const char *
downcast<vsystem_spr_device &>(device).m_gfxdecode.set_tag(tag);
}
-//-------------------------------------------------
-// static_set_palette_tag: Set the tag of the
-// palette device
-//-------------------------------------------------
-
-void vsystem_spr_device::static_set_palette_tag(device_t &device, const char *tag)
-{
- downcast<vsystem_spr_device &>(device).m_palette.set_tag(tag);
-}
-
UINT32 vsystem_spr_device::tile_callback_noindirect(UINT32 tile)
{
return tile;
diff --git a/src/mame/video/vsystem_spr.h b/src/mame/video/vsystem_spr.h
index 3e8574c9350..1a84e074208 100644
--- a/src/mame/video/vsystem_spr.h
+++ b/src/mame/video/vsystem_spr.h
@@ -17,8 +17,6 @@ typedef device_delegate<UINT32 (UINT32)> vsystem_tile_indirection_delegate;
vsystem_spr_device::CG10103_set_transpen(*device, _transpen);
#define MCFG_VSYSTEM_SPR_GFXDECODE(_gfxtag) \
vsystem_spr_device::static_set_gfxdecode_tag(*device, "^" _gfxtag);
-#define MCFG_VSYSTEM_SPR_PALETTE(_palette_tag) \
- vsystem_spr_device::static_set_palette_tag(*device, "^" _palette_tag);
/*** CG10103 **********************************************/
@@ -29,7 +27,6 @@ public:
// static configuration
static void static_set_gfxdecode_tag(device_t &device, const char *tag);
- static void static_set_palette_tag(device_t &device, const char *tag);
static void set_offsets(device_t &device, int xoffs, int yoffs);
static void set_pdraw(device_t &device, bool pdraw);
static void set_tile_indirect_cb(device_t &device,vsystem_tile_indirection_delegate newtilecb);
@@ -78,7 +75,6 @@ protected:
private:
required_device<gfxdecode_device> m_gfxdecode;
- required_device<palette_device> m_palette;
};
diff --git a/src/mame/video/vsystem_spr2.cpp b/src/mame/video/vsystem_spr2.cpp
index 68d1b8ff323..b934d27be56 100644
--- a/src/mame/video/vsystem_spr2.cpp
+++ b/src/mame/video/vsystem_spr2.cpp
@@ -31,8 +31,7 @@ const device_type VSYSTEM_SPR2 = &device_creator<vsystem_spr2_device>;
vsystem_spr2_device::vsystem_spr2_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
: device_t(mconfig, VSYSTEM_SPR2, "Video System Sprites Type 2", tag, owner, clock, "vsystem_spr2", __FILE__),
- m_gfxdecode(*this),
- m_palette(*this)
+ m_gfxdecode(*this)
{
m_newtilecb = vsystem_tile2_indirection_delegate(FUNC(vsystem_spr2_device::tile_callback_noindirect), this);
m_pritype = 0; // hack until we have better handling
@@ -51,16 +50,6 @@ void vsystem_spr2_device::static_set_gfxdecode_tag(device_t &device, const char
downcast<vsystem_spr2_device &>(device).m_gfxdecode.set_tag(tag);
}
-//-------------------------------------------------
-// static_set_palette_tag: Set the tag of the
-// palette device
-//-------------------------------------------------
-
-void vsystem_spr2_device::static_set_palette_tag(device_t &device, const char *tag)
-{
- downcast<vsystem_spr2_device &>(device).m_palette.set_tag(tag);
-}
-
void vsystem_spr2_device::set_tile_indirect_cb(device_t &device,vsystem_tile2_indirection_delegate newtilecb)
{
diff --git a/src/mame/video/vsystem_spr2.h b/src/mame/video/vsystem_spr2.h
index 967d6dc69bb..1ffdb41a537 100644
--- a/src/mame/video/vsystem_spr2.h
+++ b/src/mame/video/vsystem_spr2.h
@@ -14,8 +14,6 @@ typedef device_delegate<UINT32 (UINT32)> vsystem_tile2_indirection_delegate;
vsystem_spr2_device::set_offsets(*device, _xoffs,_yoffs);
#define MCFG_VSYSTEM_SPR2_GFXDECODE(_gfxtag) \
vsystem_spr2_device::static_set_gfxdecode_tag(*device, "^" _gfxtag);
-#define MCFG_VSYSTEM_SPR2_PALETTE(_palette_tag) \
- vsystem_spr2_device::static_set_palette_tag(*device, "^" _palette_tag);
class vsystem_spr2_device : public device_t
{
@@ -24,7 +22,6 @@ public:
// static configuration
static void static_set_gfxdecode_tag(device_t &device, const char *tag);
- static void static_set_palette_tag(device_t &device, const char *tag);
static void set_tile_indirect_cb(device_t &device,vsystem_tile2_indirection_delegate newtilecb);
static void set_pritype(device_t &device, int pritype);
static void set_gfx_region(device_t &device, int gfx_region);
@@ -68,7 +65,6 @@ protected:
private:
required_device<gfxdecode_device> m_gfxdecode;
- required_device<palette_device> m_palette;
};
diff --git a/src/mame/video/ygv608.cpp b/src/mame/video/ygv608.cpp
index 1b70da162ee..bbdf3212220 100644
--- a/src/mame/video/ygv608.cpp
+++ b/src/mame/video/ygv608.cpp
@@ -49,28 +49,111 @@
#define GFX_16X16_8BIT 5
-const device_type YGV608 = &device_creator<ygv608_device>;
+/* text-layer characters */
-ygv608_device::ygv608_device( const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock )
- : device_t(mconfig, YGV608, "YGV608 VDP", tag, owner, clock, "ygv608", __FILE__),
- m_gfxdecode(*this),
- m_palette(*this)
+static const UINT32 pts_4bits_layout_xoffset[64] =
{
-}
+ STEP8( 0*256, 4 ), STEP8( 1*256, 4 ), STEP8( 4*256, 4 ), STEP8( 5*256, 4 ),
+ STEP8( 16*256, 4 ), STEP8( 17*256, 4 ), STEP8( 20*256, 4 ), STEP8( 21*256, 4 )
+};
-void ygv608_device::static_set_gfxdecode_tag(device_t &device, const char *tag)
+static const UINT32 pts_4bits_layout_yoffset[64] =
{
- downcast<ygv608_device &>(device).m_gfxdecode.set_tag(tag);
-}
+ STEP8( 0*256, 8*4 ), STEP8( 2*256, 8*4 ), STEP8( 8*256, 8*4 ), STEP8( 10*256, 8*4 ),
+ STEP8( 32*256, 8*4 ), STEP8( 34*256, 8*4 ), STEP8( 40*256, 8*4 ), STEP8( 42*256, 8*4 )
+};
+
+static const gfx_layout pts_8x8_4bits_layout =
+{
+ 8,8, /* 8*8 pixels */
+ RGN_FRAC(1,1), /* 65536 patterns */
+ 4, /* 4 bits per pixel */
+ { 0, 1, 2, 3 },
+ EXTENDED_XOFFS,
+ EXTENDED_YOFFS,
+ 8*8*4,
+ pts_4bits_layout_xoffset,
+ pts_4bits_layout_yoffset
+};
+
+static const gfx_layout pts_16x16_4bits_layout =
+{
+ 16,16, /* 16*16 pixels */
+ RGN_FRAC(1,1), /* 16384 patterns */
+ 4, /* 4 bits per pixel */
+ { 0, 1, 2, 3 },
+ EXTENDED_XOFFS,
+ EXTENDED_YOFFS,
+ 16*16*4,
+ pts_4bits_layout_xoffset,
+ pts_4bits_layout_yoffset
+};
+
+static const gfx_layout pts_32x32_4bits_layout =
+{
+ 32,32, /* 32*32 pixels */
+ RGN_FRAC(1,1), /* 4096 patterns */
+ 4, /* 4 bits per pixel */
+ { 0, 1, 2, 3 },
+ EXTENDED_XOFFS,
+ EXTENDED_YOFFS,
+ 32*32*4,
+ pts_4bits_layout_xoffset,
+ pts_4bits_layout_yoffset
+};
-//-------------------------------------------------
-// static_set_palette_tag: Set the tag of the
-// palette device
-//-------------------------------------------------
+static const gfx_layout pts_64x64_4bits_layout =
+{
+ 64,64, /* 32*32 pixels */
+ RGN_FRAC(1,1), /* 1024 patterns */
+ 4, /* 4 bits per pixel */
+ { 0, 1, 2, 3 },
+ EXTENDED_XOFFS,
+ EXTENDED_YOFFS,
+ 64*64*4,
+ pts_4bits_layout_xoffset,
+ pts_4bits_layout_yoffset
+};
+
+
+static const gfx_layout pts_8x8_8bits_layout =
+{
+ 8,8, /* 8*8 pixels */
+ RGN_FRAC(1,1), /* 32768 patterns */
+ 8, /* 8 bits per pixel */
+ { 0, 1, 2, 3, 4, 5, 6, 7 },
+ { STEP8( 0*512, 8 ) },
+ { STEP8( 0*512, 8*8 ) },
+ 8*8*8
+};
+
+static const gfx_layout pts_16x16_8bits_layout =
+{
+ 16,16, /* 16*16 pixels */
+ RGN_FRAC(1,1), /* 8192 patterns */
+ 8, /* 8 bits per pixel */
+ { 0, 1, 2, 3, 4, 5, 6, 7 },
+ { STEP8( 0*512, 8 ), STEP8( 1*512, 8 ) },
+ { STEP8( 0*512, 8*8 ), STEP8( 2*512, 8*8 ) },
+ 16*16*8
+};
+
+static GFXDECODE_START( ygv608 )
+ GFXDECODE_DEVICE( DEVICE_SELF, 0x00000000, pts_8x8_4bits_layout, 0, 16 )
+ GFXDECODE_DEVICE( DEVICE_SELF, 0x00000000, pts_16x16_4bits_layout, 0, 16 )
+ GFXDECODE_DEVICE( DEVICE_SELF, 0x00000000, pts_32x32_4bits_layout, 0, 16 )
+ GFXDECODE_DEVICE( DEVICE_SELF, 0x00000000, pts_64x64_4bits_layout, 0, 16 )
+ GFXDECODE_DEVICE( DEVICE_SELF, 0x00000000, pts_8x8_8bits_layout, 0, 256 )
+ GFXDECODE_DEVICE( DEVICE_SELF, 0x00000000, pts_16x16_8bits_layout, 0, 256 )
+GFXDECODE_END
+
+
+const device_type YGV608 = &device_creator<ygv608_device>;
-void ygv608_device::static_set_palette_tag(device_t &device, const char *tag)
+ygv608_device::ygv608_device( const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock )
+ : device_t(mconfig, YGV608, "YGV608 VDP", tag, owner, clock, "ygv608", __FILE__),
+ device_gfx_interface(mconfig, *this, GFXDECODE_NAME(ygv608))
{
- downcast<ygv608_device &>(device).m_palette.set_tag(tag);
}
void ygv608_device::set_gfxbank(UINT8 gfxbank)
@@ -120,7 +203,7 @@ TILEMAP_MAPPER_MEMBER( ygv608_device::get_tile_offset )
}
#define layout_total(x) \
-(m_gfxdecode->gfx(x)->elements())
+(gfx(x)->elements())
TILE_GET_INFO_MEMBER( ygv608_device::get_tile_info_A_8 )
{
@@ -516,9 +599,6 @@ void ygv608_device::register_state_save()
void ygv608_device::device_start()
{
- if(!m_gfxdecode->started())
- throw device_missing_dependencies();
-
memset(&m_ports, 0, sizeof(m_ports));
memset(&m_regs, 0, sizeof(m_regs));
memset(&m_pattern_name_table, 0, sizeof(m_pattern_name_table));
@@ -546,21 +626,21 @@ void ygv608_device::device_start()
save_item(NAME(m_namcond1_gfxbank));
/* create tilemaps of all sizes and combinations */
- m_tilemap_A_cache_8[0] = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(ygv608_device::get_tile_info_A_8),this), tilemap_mapper_delegate(FUNC(ygv608_device::get_tile_offset),this), 8,8, 32,32);
- m_tilemap_A_cache_8[1] = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(ygv608_device::get_tile_info_A_8),this), tilemap_mapper_delegate(FUNC(ygv608_device::get_tile_offset),this), 8,8, 64,32);
- m_tilemap_A_cache_8[2] = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(ygv608_device::get_tile_info_A_8),this), tilemap_mapper_delegate(FUNC(ygv608_device::get_tile_offset),this), 8,8, 32,64);
+ m_tilemap_A_cache_8[0] = &machine().tilemap().create(*this, tilemap_get_info_delegate(FUNC(ygv608_device::get_tile_info_A_8),this), tilemap_mapper_delegate(FUNC(ygv608_device::get_tile_offset),this), 8,8, 32,32);
+ m_tilemap_A_cache_8[1] = &machine().tilemap().create(*this, tilemap_get_info_delegate(FUNC(ygv608_device::get_tile_info_A_8),this), tilemap_mapper_delegate(FUNC(ygv608_device::get_tile_offset),this), 8,8, 64,32);
+ m_tilemap_A_cache_8[2] = &machine().tilemap().create(*this, tilemap_get_info_delegate(FUNC(ygv608_device::get_tile_info_A_8),this), tilemap_mapper_delegate(FUNC(ygv608_device::get_tile_offset),this), 8,8, 32,64);
- m_tilemap_A_cache_16[0] = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(ygv608_device::get_tile_info_A_16),this), tilemap_mapper_delegate(FUNC(ygv608_device::get_tile_offset),this), 16,16, 32,32);
- m_tilemap_A_cache_16[1] = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(ygv608_device::get_tile_info_A_16),this), tilemap_mapper_delegate(FUNC(ygv608_device::get_tile_offset),this), 16,16, 64,32);
- m_tilemap_A_cache_16[2] = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(ygv608_device::get_tile_info_A_16),this), tilemap_mapper_delegate(FUNC(ygv608_device::get_tile_offset),this), 16,16, 32,64);
+ m_tilemap_A_cache_16[0] = &machine().tilemap().create(*this, tilemap_get_info_delegate(FUNC(ygv608_device::get_tile_info_A_16),this), tilemap_mapper_delegate(FUNC(ygv608_device::get_tile_offset),this), 16,16, 32,32);
+ m_tilemap_A_cache_16[1] = &machine().tilemap().create(*this, tilemap_get_info_delegate(FUNC(ygv608_device::get_tile_info_A_16),this), tilemap_mapper_delegate(FUNC(ygv608_device::get_tile_offset),this), 16,16, 64,32);
+ m_tilemap_A_cache_16[2] = &machine().tilemap().create(*this, tilemap_get_info_delegate(FUNC(ygv608_device::get_tile_info_A_16),this), tilemap_mapper_delegate(FUNC(ygv608_device::get_tile_offset),this), 16,16, 32,64);
- m_tilemap_B_cache_8[0] = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(ygv608_device::get_tile_info_B_8),this), tilemap_mapper_delegate(FUNC(ygv608_device::get_tile_offset),this), 8,8, 32,32);
- m_tilemap_B_cache_8[1] = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(ygv608_device::get_tile_info_B_8),this), tilemap_mapper_delegate(FUNC(ygv608_device::get_tile_offset),this), 8,8, 64,32);
- m_tilemap_B_cache_8[2] = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(ygv608_device::get_tile_info_B_8),this), tilemap_mapper_delegate(FUNC(ygv608_device::get_tile_offset),this), 8,8, 32,64);
+ m_tilemap_B_cache_8[0] = &machine().tilemap().create(*this, tilemap_get_info_delegate(FUNC(ygv608_device::get_tile_info_B_8),this), tilemap_mapper_delegate(FUNC(ygv608_device::get_tile_offset),this), 8,8, 32,32);
+ m_tilemap_B_cache_8[1] = &machine().tilemap().create(*this, tilemap_get_info_delegate(FUNC(ygv608_device::get_tile_info_B_8),this), tilemap_mapper_delegate(FUNC(ygv608_device::get_tile_offset),this), 8,8, 64,32);
+ m_tilemap_B_cache_8[2] = &machine().tilemap().create(*this, tilemap_get_info_delegate(FUNC(ygv608_device::get_tile_info_B_8),this), tilemap_mapper_delegate(FUNC(ygv608_device::get_tile_offset),this), 8,8, 32,64);
- m_tilemap_B_cache_16[0] = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(ygv608_device::get_tile_info_B_16),this), tilemap_mapper_delegate(FUNC(ygv608_device::get_tile_offset),this), 16,16, 32,32);
- m_tilemap_B_cache_16[1] = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(ygv608_device::get_tile_info_B_16),this), tilemap_mapper_delegate(FUNC(ygv608_device::get_tile_offset),this), 16,16, 64,32);
- m_tilemap_B_cache_16[2] = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(ygv608_device::get_tile_info_B_16),this), tilemap_mapper_delegate(FUNC(ygv608_device::get_tile_offset),this), 16,16, 32,64);
+ m_tilemap_B_cache_16[0] = &machine().tilemap().create(*this, tilemap_get_info_delegate(FUNC(ygv608_device::get_tile_info_B_16),this), tilemap_mapper_delegate(FUNC(ygv608_device::get_tile_offset),this), 16,16, 32,32);
+ m_tilemap_B_cache_16[1] = &machine().tilemap().create(*this, tilemap_get_info_delegate(FUNC(ygv608_device::get_tile_info_B_16),this), tilemap_mapper_delegate(FUNC(ygv608_device::get_tile_offset),this), 16,16, 64,32);
+ m_tilemap_B_cache_16[2] = &machine().tilemap().create(*this, tilemap_get_info_delegate(FUNC(ygv608_device::get_tile_info_B_16),this), tilemap_mapper_delegate(FUNC(ygv608_device::get_tile_offset),this), 16,16, 32,64);
m_tilemap_A = nullptr;
m_tilemap_B = nullptr;
@@ -620,20 +700,20 @@ void ygv608_device::draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect
logerror( "SZ_8X8: sprite=%d\n", code );
code = 0;
}
- m_gfxdecode->gfx(GFX_8X8_4BIT)->transpen(bitmap,spriteClip,
+ gfx(GFX_8X8_4BIT)->transpen(bitmap,spriteClip,
code+m_namcond1_gfxbank*0x10000,
color,
flipx,flipy,
sx,sy,0x00);
// redraw with wrap-around
if( sx > 512-8 )
- m_gfxdecode->gfx(GFX_8X8_4BIT)->transpen(bitmap,spriteClip,
+ gfx(GFX_8X8_4BIT)->transpen(bitmap,spriteClip,
code+m_namcond1_gfxbank*0x10000,
color,
flipx,flipy,
sx-512,sy,0x00);
if( sy > 512-8 )
- m_gfxdecode->gfx(GFX_8X8_4BIT)->transpen(bitmap,spriteClip,
+ gfx(GFX_8X8_4BIT)->transpen(bitmap,spriteClip,
code+m_namcond1_gfxbank*0x10000,
color,
flipx,flipy,
@@ -650,20 +730,20 @@ void ygv608_device::draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect
logerror( "SZ_8X8: sprite=%d\n", code );
code = 0;
}
- m_gfxdecode->gfx(GFX_16X16_4BIT)->transpen(bitmap,spriteClip,
+ gfx(GFX_16X16_4BIT)->transpen(bitmap,spriteClip,
code+m_namcond1_gfxbank*0x4000,
color,
flipx,flipy,
sx,sy,0x00);
// redraw with wrap-around
if( sx > 512-16 )
- m_gfxdecode->gfx(GFX_16X16_4BIT)->transpen(bitmap,spriteClip,
+ gfx(GFX_16X16_4BIT)->transpen(bitmap,spriteClip,
code+m_namcond1_gfxbank*0x4000,
color,
flipx,flipy,
sx-512,sy,0x00);
if( sy > 512-16 )
- m_gfxdecode->gfx(GFX_16X16_4BIT)->transpen(bitmap,spriteClip,
+ gfx(GFX_16X16_4BIT)->transpen(bitmap,spriteClip,
code+m_namcond1_gfxbank*0x4000,
color,
flipx,flipy,
@@ -680,20 +760,20 @@ void ygv608_device::draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect
logerror( "SZ_32X32: sprite=%d\n", code );
code = 0;
}
- m_gfxdecode->gfx(GFX_32X32_4BIT)->transpen(bitmap,spriteClip,
+ gfx(GFX_32X32_4BIT)->transpen(bitmap,spriteClip,
code+m_namcond1_gfxbank*0x1000,
color,
flipx,flipy,
sx,sy,0x00);
// redraw with wrap-around
if( sx > 512-32 )
- m_gfxdecode->gfx(GFX_32X32_4BIT)->transpen(bitmap,spriteClip,
+ gfx(GFX_32X32_4BIT)->transpen(bitmap,spriteClip,
code+m_namcond1_gfxbank*0x1000,
color,
flipx,flipy,
sx-512,sy,0x00);
if( sy > 512-32 )
- m_gfxdecode->gfx(GFX_32X32_4BIT)->transpen(bitmap,spriteClip,
+ gfx(GFX_32X32_4BIT)->transpen(bitmap,spriteClip,
code+m_namcond1_gfxbank*0x1000,
color,
flipx,flipy,
@@ -710,20 +790,20 @@ void ygv608_device::draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect
logerror( "SZ_64X64: sprite=%d\n", code );
code = 0;
}
- m_gfxdecode->gfx(GFX_64X64_4BIT)->transpen(bitmap,spriteClip,
+ gfx(GFX_64X64_4BIT)->transpen(bitmap,spriteClip,
code+m_namcond1_gfxbank*0x400,
color,
flipx,flipy,
sx,sy,0x00);
// redraw with wrap-around
if( sx > 512-64 )
- m_gfxdecode->gfx(GFX_64X64_4BIT)->transpen(bitmap,spriteClip,
+ gfx(GFX_64X64_4BIT)->transpen(bitmap,spriteClip,
code+m_namcond1_gfxbank*0x400,
color,
flipx,flipy,
sx-512,sy,0x00);
if( sy > 512-64 )
- m_gfxdecode->gfx(GFX_64X64_4BIT)->transpen(bitmap,spriteClip,
+ gfx(GFX_64X64_4BIT)->transpen(bitmap,spriteClip,
code+m_namcond1_gfxbank*0x400,
color,
flipx,flipy,
@@ -1228,7 +1308,7 @@ WRITE16_MEMBER( ygv608_device::write )
if (++p3_state == 3)
{
p3_state = 0;
- m_palette->set_pen_color(m_regs.s.cc,
+ palette().set_pen_color(m_regs.s.cc,
pal6bit(m_colour_palette[m_regs.s.cc][0]),
pal6bit(m_colour_palette[m_regs.s.cc][1]),
pal6bit(m_colour_palette[m_regs.s.cc][2]) );
diff --git a/src/mame/video/ygv608.h b/src/mame/video/ygv608.h
index b4360a4e5e4..3e6f5c54f09 100644
--- a/src/mame/video/ygv608.h
+++ b/src/mame/video/ygv608.h
@@ -282,16 +282,12 @@ struct SPRITE_ATTR {
UINT8 sn; // pattern name (0-255)
};
-class ygv608_device : public device_t
+class ygv608_device : public device_t, public device_gfx_interface
{
public:
// construction/destruction
ygv608_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
- // static configuration
- static void static_set_gfxdecode_tag(device_t &device, const char *tag);
- static void static_set_palette_tag(device_t &device, const char *tag);
-
DECLARE_WRITE16_MEMBER( write );
DECLARE_READ16_MEMBER( read );
@@ -376,8 +372,6 @@ private:
UINT8 m_screen_resize; // screen requires resize
UINT8 m_tilemap_resize; // tilemap requires resize
- required_device<gfxdecode_device> m_gfxdecode;
- required_device<palette_device> m_palette;
};
// device type definition
@@ -391,10 +385,7 @@ extern const device_type YGV608;
#define MCFG_YGV608_ADD(_tag) \
MCFG_DEVICE_ADD(_tag, YGV608, 0)
-#define MCFG_YGV608_GFXDECODE(_gfxtag) \
- ygv608_device::static_set_gfxdecode_tag(*device, "^" _gfxtag);
-
#define MCFG_YGV608_PALETTE(_palette_tag) \
- ygv608_device::static_set_palette_tag(*device, "^" _palette_tag);
+ MCFG_GFX_PALETTE(_palette_tag)
#endif