From ebbd25c8665321f51ba35d573dbc3fc49dbf867f Mon Sep 17 00:00:00 2001 From: Ivan Vangelista Date: Fri, 23 Nov 2018 17:50:48 +0100 Subject: mame/video: more macro removal (nw) --- src/mame/audio/dcs.h | 6 - src/mame/drivers/a7800.cpp | 6 +- src/mame/drivers/aerofgt.cpp | 148 ++++++------ src/mame/drivers/airbustr.cpp | 6 +- src/mame/drivers/asuka.cpp | 110 ++++----- src/mame/drivers/blackt96.cpp | 8 +- src/mame/drivers/cchance.cpp | 4 +- src/mame/drivers/champbwl.cpp | 10 +- src/mame/drivers/crshrace.cpp | 8 +- src/mame/drivers/darius.cpp | 12 +- src/mame/drivers/djboy.cpp | 4 +- src/mame/drivers/expro02.cpp | 23 +- src/mame/drivers/f1gp.cpp | 38 ++-- src/mame/drivers/fromance.cpp | 12 +- src/mame/drivers/gaiden.cpp | 4 +- src/mame/drivers/galastrm.cpp | 83 +++---- src/mame/drivers/galpani2.cpp | 7 +- src/mame/drivers/galpanic.cpp | 6 +- src/mame/drivers/galspnbl.cpp | 6 +- src/mame/drivers/groundfx.cpp | 28 +-- src/mame/drivers/gstriker.cpp | 55 ++--- src/mame/drivers/gunbustr.cpp | 16 +- src/mame/drivers/hvyunit.cpp | 4 +- src/mame/drivers/inufuku.cpp | 12 +- src/mame/drivers/jchan.cpp | 8 +- src/mame/drivers/kinst.cpp | 2 +- src/mame/drivers/ladybug.cpp | 10 +- src/mame/drivers/midtunit.cpp | 15 +- src/mame/drivers/midvunit.cpp | 6 +- src/mame/drivers/midwunit.cpp | 2 +- src/mame/drivers/midxunit.cpp | 2 +- src/mame/drivers/ninjaw.cpp | 174 +++++++------- src/mame/drivers/ojankohs.cpp | 4 +- src/mame/drivers/opwolf.cpp | 24 +- src/mame/drivers/othunder.cpp | 16 +- src/mame/drivers/pipedrm.cpp | 20 +- src/mame/drivers/rastan.cpp | 12 +- src/mame/drivers/rbisland.cpp | 20 +- src/mame/drivers/redclash.cpp | 4 +- src/mame/drivers/rpunch.cpp | 8 +- src/mame/drivers/sandscrp.cpp | 12 +- src/mame/drivers/segahang.cpp | 11 +- src/mame/drivers/segaorun.cpp | 6 +- src/mame/drivers/segas16a.cpp | 4 +- src/mame/drivers/segas16b.cpp | 20 +- src/mame/drivers/segas18.cpp | 4 +- src/mame/drivers/segaxbd.cpp | 6 +- src/mame/drivers/segaybd.cpp | 6 +- src/mame/drivers/seta.cpp | 246 ++++++++++---------- src/mame/drivers/slapshot.cpp | 36 +-- src/mame/drivers/snk68.cpp | 14 +- src/mame/drivers/snowbros.cpp | 8 +- src/mame/drivers/spbactn.cpp | 8 +- src/mame/drivers/srmp2.cpp | 16 +- src/mame/drivers/superchs.cpp | 14 +- src/mame/drivers/suprslam.cpp | 8 +- src/mame/drivers/system16.cpp | 54 +++-- src/mame/drivers/taito_f2.cpp | 518 +++++++++++++++++++++--------------------- src/mame/drivers/taito_h.cpp | 36 +-- src/mame/drivers/taito_o.cpp | 12 +- src/mame/drivers/taito_x.cpp | 16 +- src/mame/drivers/taito_z.cpp | 132 +++++------ src/mame/drivers/taitoair.cpp | 12 +- src/mame/drivers/taotaido.cpp | 8 +- src/mame/drivers/tbowl.cpp | 2 +- src/mame/drivers/tecmo.cpp | 2 +- src/mame/drivers/tecmo16.cpp | 4 +- src/mame/drivers/thedealr.cpp | 4 +- src/mame/drivers/tnzs.cpp | 4 +- src/mame/drivers/toaplan1.cpp | 4 +- src/mame/drivers/topspeed.cpp | 18 +- src/mame/drivers/twincobr.cpp | 20 +- src/mame/drivers/undrfire.cpp | 58 ++--- src/mame/drivers/volfied.cpp | 6 +- src/mame/drivers/wardner.cpp | 4 +- src/mame/drivers/warriorb.cpp | 86 +++---- src/mame/drivers/wc90.cpp | 10 +- src/mame/drivers/welltris.cpp | 15 +- src/mame/drivers/wgp.cpp | 15 +- src/mame/drivers/wpc_95.cpp | 2 +- src/mame/drivers/wpc_dcs.cpp | 2 +- src/mame/drivers/wpc_s.cpp | 2 +- src/mame/drivers/wswan.cpp | 11 +- src/mame/includes/fromance.h | 9 +- src/mame/includes/galastrm.h | 33 ++- src/mame/video/galastrm.cpp | 12 +- src/mame/video/kan_pand.h | 16 +- src/mame/video/kaneko_spr.h | 20 +- src/mame/video/kaneko_tmap.h | 11 +- src/mame/video/ladybug.h | 6 +- src/mame/video/maria.h | 11 +- src/mame/video/mb60553.h | 9 +- src/mame/video/pc080sn.h | 18 +- src/mame/video/pc090oj.h | 20 +- src/mame/video/pc_t1t.h | 3 - src/mame/video/sega16sp.h | 15 -- src/mame/video/segaic16.h | 13 +- src/mame/video/seta001.h | 10 +- src/mame/video/snk68_spr.h | 11 +- src/mame/video/tc0080vco.h | 17 +- src/mame/video/tc0100scn.h | 32 +-- src/mame/video/tc0280grd.h | 14 +- src/mame/video/tc0360pri.h | 2 - src/mame/video/tc0480scp.h | 24 +- src/mame/video/tecmo_spr.h | 17 +- src/mame/video/toaplan_scu.h | 7 - src/mame/video/vs920a.cpp | 2 +- src/mame/video/vs920a.h | 9 +- src/mame/video/vsystem_gga.h | 9 +- src/mame/video/vsystem_spr.h | 26 +-- src/mame/video/vsystem_spr2.h | 14 +- src/mame/video/wswan.h | 14 +- 112 files changed, 1276 insertions(+), 1547 deletions(-) diff --git a/src/mame/audio/dcs.h b/src/mame/audio/dcs.h index fc82c05bf51..717416ce0fc 100644 --- a/src/mame/audio/dcs.h +++ b/src/mame/audio/dcs.h @@ -16,12 +16,6 @@ #include "machine/bankdev.h" #include "machine/timer.h" -#define MCFG_DCS2_AUDIO_DRAM_IN_MB(_dram_in_mb) \ - downcast(*device).set_dram_in_mb(_dram_in_mb); - -#define MCFG_DCS2_AUDIO_POLLING_OFFSET(_polling_offset) \ - downcast(*device).set_polling_offset(_polling_offset); - class dcs_audio_device : public device_t { diff --git a/src/mame/drivers/a7800.cpp b/src/mame/drivers/a7800.cpp index 1fcf3609db3..fb27462e638 100644 --- a/src/mame/drivers/a7800.cpp +++ b/src/mame/drivers/a7800.cpp @@ -1390,9 +1390,9 @@ MACHINE_CONFIG_START(a7800_state::a7800_ntsc) MCFG_PALETTE_ADD("palette", ARRAY_LENGTH(a7800_palette)) MCFG_PALETTE_INIT_OWNER(a7800_state, a7800) - MCFG_DEVICE_ADD("maria", ATARI_MARIA, 0) - MCFG_MARIA_DMACPU("maincpu") - MCFG_MARIA_SCREEN("screen") + ATARI_MARIA(config, m_maria, 0); + m_maria->set_dmacpu_tag(m_maincpu); + m_maria->set_screen_tag(m_screen); /* sound hardware */ SPEAKER(config, "mono").front_center(); diff --git a/src/mame/drivers/aerofgt.cpp b/src/mame/drivers/aerofgt.cpp index 1a08f0ef079..dbc94eddb10 100644 --- a/src/mame/drivers/aerofgt.cpp +++ b/src/mame/drivers/aerofgt.cpp @@ -1489,12 +1489,12 @@ MACHINE_CONFIG_START(aerofgt_state::pspikes) MCFG_PALETTE_ADD("palette", 2048) MCFG_PALETTE_FORMAT(xRRRRRGGGGGBBBBB) - MCFG_DEVICE_ADD("vsystem_spr_old1", VSYSTEM_SPR2, 0) - MCFG_VSYSTEM_SPR2_SET_TILE_INDIRECT( aerofgt_state, aerofgt_old_tile_callback ) - MCFG_VSYSTEM_SPR2_SET_GFXREGION(1) - MCFG_VSYSTEM_SPR2_GFXDECODE("gfxdecode") + VSYSTEM_SPR2(config, m_spr_old[0], 0); + m_spr_old[0]->set_tile_indirect_cb(FUNC(aerofgt_state::aerofgt_old_tile_callback), this); + m_spr_old[0]->set_gfx_region(1); + m_spr_old[0]->set_gfxdecode_tag(m_gfxdecode); - MCFG_DEVICE_ADD("gga", VSYSTEM_GGA, XTAL(14'318'181) / 2) // divider not verified + VSYSTEM_GGA(config, "gga", XTAL(14'318'181) / 2); // divider not verified MCFG_VIDEO_START_OVERRIDE(aerofgt_state,pspikes) @@ -1539,7 +1539,7 @@ MACHINE_CONFIG_START(aerofgt_state::spikes91) MCFG_PALETTE_ADD("palette", 2048) MCFG_PALETTE_FORMAT(xRRRRRGGGGGBBBBB) - //MCFG_DEVICE_ADD("gga", VSYSTEM_GGA, 0) + //VSYSTEM_GGA(config, "gga", 0); MCFG_VIDEO_START_OVERRIDE(aerofgt_state,pspikes) @@ -1575,7 +1575,7 @@ MACHINE_CONFIG_START(aerofgt_state::pspikesb) MCFG_PALETTE_ADD("palette", 2048) MCFG_PALETTE_FORMAT(xRRRRRGGGGGBBBBB) - //MCFG_DEVICE_ADD("gga", VSYSTEM_GGA, 0) + //VSYSTEM_GGA(config, "gga", 0); MCFG_VIDEO_START_OVERRIDE(aerofgt_state,pspikes) @@ -1620,12 +1620,12 @@ MACHINE_CONFIG_START(aerofgt_state::kickball) MCFG_PALETTE_ADD("palette", 2048) MCFG_PALETTE_FORMAT(xRRRRRGGGGGBBBBB) - MCFG_DEVICE_ADD("vsystem_spr_old1", VSYSTEM_SPR2, 0) - MCFG_VSYSTEM_SPR2_SET_TILE_INDIRECT( aerofgt_state, aerofgt_old_tile_callback ) - MCFG_VSYSTEM_SPR2_SET_GFXREGION(1) - MCFG_VSYSTEM_SPR2_GFXDECODE("gfxdecode") + VSYSTEM_SPR2(config, m_spr_old[0], 0); + m_spr_old[0]->set_tile_indirect_cb(FUNC(aerofgt_state::aerofgt_old_tile_callback), this); + m_spr_old[0]->set_gfx_region(1); + m_spr_old[0]->set_gfxdecode_tag(m_gfxdecode); - //MCFG_DEVICE_ADD("gga", VSYSTEM_GGA, 0) // still accessed as if it exists, in clone hardware? + //VSYSTEM_GGA(config, "gga", 0); // still accessed as if it exists, in clone hardware? MCFG_VIDEO_START_OVERRIDE(aerofgt_state,pspikes) @@ -1667,12 +1667,12 @@ MACHINE_CONFIG_START(aerofgt_state::pspikesc) MCFG_PALETTE_ADD("palette", 2048) MCFG_PALETTE_FORMAT(xRRRRRGGGGGBBBBB) - //MCFG_DEVICE_ADD("gga", VSYSTEM_GGA, 0) + //VSYSTEM_GGA(config, "gga", 0); - MCFG_DEVICE_ADD("vsystem_spr_old1", VSYSTEM_SPR2, 0) - MCFG_VSYSTEM_SPR2_SET_TILE_INDIRECT( aerofgt_state, aerofgt_old_tile_callback ) - MCFG_VSYSTEM_SPR2_SET_GFXREGION(1) - MCFG_VSYSTEM_SPR2_GFXDECODE("gfxdecode") + VSYSTEM_SPR2(config, m_spr_old[0], 0); + m_spr_old[0]->set_tile_indirect_cb(FUNC(aerofgt_state::aerofgt_old_tile_callback), this); + m_spr_old[0]->set_gfx_region(1); + m_spr_old[0]->set_gfxdecode_tag(m_gfxdecode); MCFG_VIDEO_START_OVERRIDE(aerofgt_state,pspikes) @@ -1711,17 +1711,17 @@ MACHINE_CONFIG_START(aerofgt_state::karatblz) MCFG_PALETTE_ADD("palette", 1024) MCFG_PALETTE_FORMAT(xRRRRRGGGGGBBBBB) - MCFG_DEVICE_ADD("gga", VSYSTEM_GGA, XTAL(14'318'181) / 2) // divider not verified + VSYSTEM_GGA(config, "gga", XTAL(14'318'181) / 2); // divider not verified - MCFG_DEVICE_ADD("vsystem_spr_old1", VSYSTEM_SPR2, 0) - MCFG_VSYSTEM_SPR2_SET_TILE_INDIRECT( aerofgt_state, aerofgt_old_tile_callback ) - MCFG_VSYSTEM_SPR2_SET_GFXREGION(2) - MCFG_VSYSTEM_SPR2_GFXDECODE("gfxdecode") + VSYSTEM_SPR2(config, m_spr_old[0], 0); + m_spr_old[0]->set_tile_indirect_cb(FUNC(aerofgt_state::aerofgt_old_tile_callback), this); + m_spr_old[0]->set_gfx_region(2); + m_spr_old[0]->set_gfxdecode_tag(m_gfxdecode); - MCFG_DEVICE_ADD("vsystem_spr_old2", 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") + VSYSTEM_SPR2(config, m_spr_old[1], 0); + m_spr_old[1]->set_tile_indirect_cb(FUNC(aerofgt_state::aerofgt_ol2_tile_callback), this); + m_spr_old[1]->set_gfx_region(3); + m_spr_old[1]->set_gfxdecode_tag(m_gfxdecode); MCFG_VIDEO_START_OVERRIDE(aerofgt_state,karatblz) @@ -1768,17 +1768,17 @@ MACHINE_CONFIG_START(aerofgt_state::karatblzbl) MCFG_PALETTE_ADD("palette", 1024) MCFG_PALETTE_FORMAT(xRRRRRGGGGGBBBBB) - MCFG_DEVICE_ADD("vsystem_spr_old1", VSYSTEM_SPR2, 0) - MCFG_VSYSTEM_SPR2_SET_TILE_INDIRECT( aerofgt_state, aerofgt_old_tile_callback ) - MCFG_VSYSTEM_SPR2_SET_GFXREGION(2) - MCFG_VSYSTEM_SPR2_GFXDECODE("gfxdecode") + VSYSTEM_SPR2(config, m_spr_old[0], 0); + m_spr_old[0]->set_tile_indirect_cb(FUNC(aerofgt_state::aerofgt_old_tile_callback), this); + m_spr_old[0]->set_gfx_region(2); + m_spr_old[0]->set_gfxdecode_tag(m_gfxdecode); - MCFG_DEVICE_ADD("vsystem_spr_old2", 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") + VSYSTEM_SPR2(config, m_spr_old[1], 0); + m_spr_old[1]->set_tile_indirect_cb(FUNC(aerofgt_state::aerofgt_ol2_tile_callback), this); + m_spr_old[1]->set_gfx_region(3); + m_spr_old[1]->set_gfxdecode_tag(m_gfxdecode); - //MCFG_DEVICE_ADD("gga", VSYSTEM_GGA, 0) + //VSYSTEM_GGA(config, "gga", 0); MCFG_VIDEO_START_OVERRIDE(aerofgt_state,karatblz) @@ -1825,18 +1825,18 @@ MACHINE_CONFIG_START(aerofgt_state::spinlbrk) MCFG_PALETTE_ADD_INIT_BLACK("palette", 1024) // doesn't fully initialize palette at start-up ... MCFG_PALETTE_FORMAT(xRRRRRGGGGGBBBBB) - MCFG_DEVICE_ADD("gga", VSYSTEM_GGA, XTAL(14'318'181) / 2) // divider not verified + VSYSTEM_GGA(config, "gga", XTAL(14'318'181) / 2); // divider not verified - MCFG_DEVICE_ADD("vsystem_spr_old1", VSYSTEM_SPR2, 0) - MCFG_VSYSTEM_SPR2_SET_PRITYPE(1) - MCFG_VSYSTEM_SPR2_SET_GFXREGION(2) - MCFG_VSYSTEM_SPR2_GFXDECODE("gfxdecode") + VSYSTEM_SPR2(config, m_spr_old[0], 0); + m_spr_old[0]->set_pritype(1); + m_spr_old[0]->set_gfx_region(2); + m_spr_old[0]->set_gfxdecode_tag(m_gfxdecode); - MCFG_DEVICE_ADD("vsystem_spr_old2", VSYSTEM_SPR2, 0) - MCFG_VSYSTEM_SPR2_SET_TILE_INDIRECT( aerofgt_state, spinbrk_tile_callback ) // rom lookup - MCFG_VSYSTEM_SPR2_SET_PRITYPE(1) - MCFG_VSYSTEM_SPR2_SET_GFXREGION(3) - MCFG_VSYSTEM_SPR2_GFXDECODE("gfxdecode") + VSYSTEM_SPR2(config, m_spr_old[1], 0); + m_spr_old[1]->set_tile_indirect_cb(FUNC(aerofgt_state::spinbrk_tile_callback), this); // rom lookup + m_spr_old[0]->set_pritype(1); + m_spr_old[1]->set_gfx_region(3); + m_spr_old[1]->set_gfxdecode_tag(m_gfxdecode); MCFG_VIDEO_START_OVERRIDE(aerofgt_state,spinlbrk) @@ -1884,17 +1884,17 @@ MACHINE_CONFIG_START(aerofgt_state::turbofrc) MCFG_PALETTE_ADD("palette", 1024) MCFG_PALETTE_FORMAT(xRRRRRGGGGGBBBBB) - MCFG_DEVICE_ADD("gga", VSYSTEM_GGA, XTAL(14'318'181) / 2) // divider not verified + VSYSTEM_GGA(config, "gga", XTAL(14'318'181) / 2); // divider not verified - MCFG_DEVICE_ADD("vsystem_spr_old1", VSYSTEM_SPR2, 0) - MCFG_VSYSTEM_SPR2_SET_TILE_INDIRECT( aerofgt_state, aerofgt_old_tile_callback ) - MCFG_VSYSTEM_SPR2_SET_GFXREGION(2) - MCFG_VSYSTEM_SPR2_GFXDECODE("gfxdecode") + VSYSTEM_SPR2(config, m_spr_old[0], 0); + m_spr_old[0]->set_tile_indirect_cb(FUNC(aerofgt_state::aerofgt_old_tile_callback), this); + m_spr_old[0]->set_gfx_region(2); + m_spr_old[0]->set_gfxdecode_tag(m_gfxdecode); - MCFG_DEVICE_ADD("vsystem_spr_old2", 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") + VSYSTEM_SPR2(config, m_spr_old[1], 0); + m_spr_old[1]->set_tile_indirect_cb(FUNC(aerofgt_state::aerofgt_ol2_tile_callback), this); + m_spr_old[1]->set_gfx_region(3); + m_spr_old[1]->set_gfxdecode_tag(m_gfxdecode); MCFG_VIDEO_START_OVERRIDE(aerofgt_state,turbofrc) @@ -1943,17 +1943,17 @@ MACHINE_CONFIG_START(aerofgt_state::aerofgtb) MCFG_PALETTE_ADD("palette", 1024) MCFG_PALETTE_FORMAT(xRRRRRGGGGGBBBBB) - MCFG_DEVICE_ADD("gga", VSYSTEM_GGA, XTAL(14'318'181) / 2) // divider not verified + VSYSTEM_GGA(config, "gga", XTAL(14'318'181) / 2); // divider not verified - MCFG_DEVICE_ADD("vsystem_spr_old1", VSYSTEM_SPR2, 0) - MCFG_VSYSTEM_SPR2_SET_TILE_INDIRECT( aerofgt_state, aerofgt_old_tile_callback ) - MCFG_VSYSTEM_SPR2_SET_GFXREGION(2) - MCFG_VSYSTEM_SPR2_GFXDECODE("gfxdecode") + VSYSTEM_SPR2(config, m_spr_old[0], 0); + m_spr_old[0]->set_tile_indirect_cb(FUNC(aerofgt_state::aerofgt_old_tile_callback), this); + m_spr_old[0]->set_gfx_region(2); + m_spr_old[0]->set_gfxdecode_tag(m_gfxdecode); - MCFG_DEVICE_ADD("vsystem_spr_old2", 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") + VSYSTEM_SPR2(config, m_spr_old[1], 0); + m_spr_old[1]->set_tile_indirect_cb(FUNC(aerofgt_state::aerofgt_ol2_tile_callback), this); + m_spr_old[1]->set_gfx_region(3); + m_spr_old[1]->set_gfxdecode_tag(m_gfxdecode); MCFG_VIDEO_START_OVERRIDE(aerofgt_state,turbofrc) @@ -2014,10 +2014,10 @@ MACHINE_CONFIG_START(aerofgt_state::aerofgt) MCFG_PALETTE_ADD("palette", 1024) MCFG_PALETTE_FORMAT(xRRRRRGGGGGBBBBB) - MCFG_DEVICE_ADD("vsystem_spr", VSYSTEM_SPR, 0) - MCFG_VSYSTEM_SPR_SET_TILE_INDIRECT( aerofgt_state, aerofgt_tile_callback ) - MCFG_VSYSTEM_SPR_SET_GFXREGION(2) - MCFG_VSYSTEM_SPR_GFXDECODE("gfxdecode") + VSYSTEM_SPR(config, m_spr, 0); + m_spr->set_tile_indirect_cb(FUNC(aerofgt_state::aerofgt_tile_callback), this); + m_spr->set_gfx_region(2); + m_spr->set_gfxdecode_tag(m_gfxdecode); MCFG_VIDEO_START_OVERRIDE(aerofgt_state,turbofrc) @@ -2064,7 +2064,7 @@ MACHINE_CONFIG_START(aerofgt_state::aerfboot) MCFG_PALETTE_ADD("palette", 1024) MCFG_PALETTE_FORMAT(xRRRRRGGGGGBBBBB) - //MCFG_DEVICE_ADD("gga", VSYSTEM_GGA, 0) + //VSYSTEM_GGA(config, "gga", 0); MCFG_VIDEO_START_OVERRIDE(aerofgt_state,turbofrc) @@ -2103,7 +2103,7 @@ MACHINE_CONFIG_START(aerofgt_state::aerfboo2) MCFG_PALETTE_ADD("palette", 1024) MCFG_PALETTE_FORMAT(xRRRRRGGGGGBBBBB) - //MCFG_DEVICE_ADD("gga", VSYSTEM_GGA, 0) + //VSYSTEM_GGA(config, "gga", 0); MCFG_VIDEO_START_OVERRIDE(aerofgt_state,turbofrc) @@ -2139,12 +2139,12 @@ MACHINE_CONFIG_START(aerofgt_state::wbbc97) MCFG_PALETTE_ADD("palette", 2048) MCFG_PALETTE_FORMAT(xRRRRRGGGGGBBBBB) - //MCFG_DEVICE_ADD("gga", VSYSTEM_GGA, 0) + //VSYSTEM_GGA(config, "gga", 0); - MCFG_DEVICE_ADD("vsystem_spr_old1", VSYSTEM_SPR2, 0) - MCFG_VSYSTEM_SPR2_SET_TILE_INDIRECT( aerofgt_state, aerofgt_old_tile_callback ) - MCFG_VSYSTEM_SPR2_SET_GFXREGION(1) - MCFG_VSYSTEM_SPR2_GFXDECODE("gfxdecode") + VSYSTEM_SPR2(config, m_spr_old[0], 0); + m_spr_old[0]->set_tile_indirect_cb(FUNC(aerofgt_state::aerofgt_old_tile_callback), this); + m_spr_old[0]->set_gfx_region(1); + m_spr_old[0]->set_gfxdecode_tag(m_gfxdecode); MCFG_VIDEO_START_OVERRIDE(aerofgt_state,wbbc97) diff --git a/src/mame/drivers/airbustr.cpp b/src/mame/drivers/airbustr.cpp index 598a131623d..dac0bb2ab59 100644 --- a/src/mame/drivers/airbustr.cpp +++ b/src/mame/drivers/airbustr.cpp @@ -599,9 +599,9 @@ MACHINE_CONFIG_START(airbustr_state::airbustr) MCFG_PALETTE_ADD("palette", 768) MCFG_PALETTE_FORMAT(xGGGGGRRRRRBBBBB) - MCFG_DEVICE_ADD("pandora", KANEKO_PANDORA, 0) - MCFG_KANEKO_PANDORA_GFX_REGION(1) - MCFG_KANEKO_PANDORA_GFXDECODE("gfxdecode") + KANEKO_PANDORA(config, m_pandora, 0); + m_pandora->set_gfx_region(1); + m_pandora->set_gfxdecode_tag(m_gfxdecode); /* sound hardware */ SPEAKER(config, "mono").front_center(); diff --git a/src/mame/drivers/asuka.cpp b/src/mame/drivers/asuka.cpp index e677acc88a4..98f353c1408 100644 --- a/src/mame/drivers/asuka.cpp +++ b/src/mame/drivers/asuka.cpp @@ -882,18 +882,18 @@ MACHINE_CONFIG_START(asuka_state::bonzeadv) MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_asuka) MCFG_PALETTE_ADD("palette", 4096) - MCFG_DEVICE_ADD("pc090oj", PC090OJ, 0) - MCFG_PC090OJ_OFFSETS(0, 8) - MCFG_PC090OJ_GFXDECODE("gfxdecode") - MCFG_PC090OJ_PALETTE("palette") + PC090OJ(config, m_pc090oj, 0); + m_pc090oj->set_offsets(0, 8); + m_pc090oj->set_gfxdecode_tag("gfxdecode"); + m_pc090oj->set_palette_tag("palette"); - MCFG_DEVICE_ADD("tc0100scn", TC0100SCN, 0) - MCFG_TC0100SCN_GFX_REGION(1) - MCFG_TC0100SCN_TX_REGION(2) - MCFG_TC0100SCN_GFXDECODE("gfxdecode") - MCFG_TC0100SCN_PALETTE("palette") + TC0100SCN(config, m_tc0100scn, 0); + m_tc0100scn->set_gfx_region(1); + m_tc0100scn->set_tx_region(2); + m_tc0100scn->set_gfxdecode_tag("gfxdecode"); + m_tc0100scn->set_palette_tag("palette"); - MCFG_DEVICE_ADD("tc0110pcr", TC0110PCR, 0, "palette") + TC0110PCR(config, m_tc0110pcr, 0, "palette"); /* sound hardware */ SPEAKER(config, "mono").front_center(); @@ -943,19 +943,19 @@ MACHINE_CONFIG_START(asuka_state::asuka) MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_asuka) MCFG_PALETTE_ADD("palette", 4096) - MCFG_DEVICE_ADD("pc090oj", PC090OJ, 0) - MCFG_PC090OJ_OFFSETS(0, 8) - MCFG_PC090OJ_USEBUFFER(1) - MCFG_PC090OJ_GFXDECODE("gfxdecode") - MCFG_PC090OJ_PALETTE("palette") + PC090OJ(config, m_pc090oj, 0); + m_pc090oj->set_offsets(0, 8); + m_pc090oj->set_usebuffer(1); + m_pc090oj->set_gfxdecode_tag("gfxdecode"); + m_pc090oj->set_palette_tag("palette"); - MCFG_DEVICE_ADD("tc0100scn", TC0100SCN, 0) - MCFG_TC0100SCN_GFX_REGION(1) - MCFG_TC0100SCN_TX_REGION(2) - MCFG_TC0100SCN_GFXDECODE("gfxdecode") - MCFG_TC0100SCN_PALETTE("palette") + TC0100SCN(config, m_tc0100scn, 0); + m_tc0100scn->set_gfx_region(1); + m_tc0100scn->set_tx_region(2); + m_tc0100scn->set_gfxdecode_tag("gfxdecode"); + m_tc0100scn->set_palette_tag("palette"); - MCFG_DEVICE_ADD("tc0110pcr", TC0110PCR, 0, "palette") + TC0110PCR(config, m_tc0110pcr, 0, "palette"); /* sound hardware */ SPEAKER(config, "mono").front_center(); @@ -1017,20 +1017,20 @@ MACHINE_CONFIG_START(asuka_state::cadash) MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_asuka) MCFG_PALETTE_ADD("palette", 4096) - MCFG_DEVICE_ADD("pc090oj", PC090OJ, 0) - MCFG_PC090OJ_OFFSETS(0, 8) - MCFG_PC090OJ_USEBUFFER(1) - MCFG_PC090OJ_GFXDECODE("gfxdecode") - MCFG_PC090OJ_PALETTE("palette") + PC090OJ(config, m_pc090oj, 0); + m_pc090oj->set_offsets(0, 8); + m_pc090oj->set_usebuffer(1); + m_pc090oj->set_gfxdecode_tag("gfxdecode"); + m_pc090oj->set_palette_tag("palette"); - MCFG_DEVICE_ADD("tc0100scn", TC0100SCN, 0) - MCFG_TC0100SCN_GFX_REGION(1) - MCFG_TC0100SCN_TX_REGION(2) - MCFG_TC0100SCN_OFFSETS(1, 0) - MCFG_TC0100SCN_GFXDECODE("gfxdecode") - MCFG_TC0100SCN_PALETTE("palette") + TC0100SCN(config, m_tc0100scn, 0); + m_tc0100scn->set_gfx_region(1); + m_tc0100scn->set_tx_region(2); + m_tc0100scn->set_offsets(1, 0); + m_tc0100scn->set_gfxdecode_tag("gfxdecode"); + m_tc0100scn->set_palette_tag("palette"); - MCFG_DEVICE_ADD("tc0110pcr", TC0110PCR, 0, "palette") + TC0110PCR(config, m_tc0110pcr, 0, "palette"); /* sound hardware */ SPEAKER(config, "mono").front_center(); @@ -1080,19 +1080,19 @@ MACHINE_CONFIG_START(asuka_state::mofflott) MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_asuka) MCFG_PALETTE_ADD("palette", 4096) /* only Mofflott uses full palette space */ - MCFG_DEVICE_ADD("pc090oj", PC090OJ, 0) - MCFG_PC090OJ_OFFSETS(0, 8) - MCFG_PC090OJ_GFXDECODE("gfxdecode") - MCFG_PC090OJ_PALETTE("palette") + PC090OJ(config, m_pc090oj, 0); + m_pc090oj->set_offsets(0, 8); + m_pc090oj->set_gfxdecode_tag("gfxdecode"); + m_pc090oj->set_palette_tag("palette"); - MCFG_DEVICE_ADD("tc0100scn", TC0100SCN, 0) - MCFG_TC0100SCN_GFX_REGION(1) - MCFG_TC0100SCN_TX_REGION(2) - MCFG_TC0100SCN_OFFSETS(1, 0) - MCFG_TC0100SCN_GFXDECODE("gfxdecode") - MCFG_TC0100SCN_PALETTE("palette") + TC0100SCN(config, m_tc0100scn, 0); + m_tc0100scn->set_gfx_region(1); + m_tc0100scn->set_tx_region(2); + m_tc0100scn->set_offsets(1, 0); + m_tc0100scn->set_gfxdecode_tag("gfxdecode"); + m_tc0100scn->set_palette_tag("palette"); - MCFG_DEVICE_ADD("tc0110pcr", TC0110PCR, 0, "palette") + TC0110PCR(config, m_tc0110pcr, 0, "palette"); /* sound hardware */ SPEAKER(config, "mono").front_center(); @@ -1150,19 +1150,19 @@ MACHINE_CONFIG_START(asuka_state::eto) MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_asuka) MCFG_PALETTE_ADD("palette", 4096) - MCFG_DEVICE_ADD("pc090oj", PC090OJ, 0) - MCFG_PC090OJ_OFFSETS(0, 8) - MCFG_PC090OJ_GFXDECODE("gfxdecode") - MCFG_PC090OJ_PALETTE("palette") + PC090OJ(config, m_pc090oj, 0); + m_pc090oj->set_offsets(0, 8); + m_pc090oj->set_gfxdecode_tag("gfxdecode"); + m_pc090oj->set_palette_tag("palette"); - MCFG_DEVICE_ADD("tc0100scn", TC0100SCN, 0) - MCFG_TC0100SCN_GFX_REGION(1) - MCFG_TC0100SCN_TX_REGION(2) - MCFG_TC0100SCN_OFFSETS(1, 0) - MCFG_TC0100SCN_GFXDECODE("gfxdecode") - MCFG_TC0100SCN_PALETTE("palette") + TC0100SCN(config, m_tc0100scn, 0); + m_tc0100scn->set_gfx_region(1); + m_tc0100scn->set_tx_region(2); + m_tc0100scn->set_offsets(1, 0); + m_tc0100scn->set_gfxdecode_tag("gfxdecode"); + m_tc0100scn->set_palette_tag("palette"); - MCFG_DEVICE_ADD("tc0110pcr", TC0110PCR, 0, "palette") + TC0110PCR(config, m_tc0110pcr, 0, "palette"); /* sound hardware */ SPEAKER(config, "mono").front_center(); diff --git a/src/mame/drivers/blackt96.cpp b/src/mame/drivers/blackt96.cpp index 3fe3c7415d2..f537db3b37c 100644 --- a/src/mame/drivers/blackt96.cpp +++ b/src/mame/drivers/blackt96.cpp @@ -503,10 +503,10 @@ MACHINE_CONFIG_START(blackt96_state::blackt96) MCFG_PALETTE_ADD("palette", 0x800) MCFG_PALETTE_FORMAT(xxxxRRRRGGGGBBBB) - MCFG_DEVICE_ADD("sprites", SNK68_SPR, 0) - MCFG_SNK68_SPR_GFXDECODE("gfxdecode") - MCFG_SNK68_SPR_SET_TILE_INDIRECT( blackt96_state, tile_callback ) - MCFG_SNK68_SPR_NO_PARTIAL + SNK68_SPR(config, m_sprites, 0); + m_sprites->set_gfxdecode_tag(m_gfxdecode); + m_sprites->set_tile_indirect_cb(FUNC(blackt96_state::tile_callback), this); + m_sprites->set_no_partial(); SPEAKER(config, "lspeaker").front_left(); SPEAKER(config, "rspeaker").front_right(); diff --git a/src/mame/drivers/cchance.cpp b/src/mame/drivers/cchance.cpp index 9b20cf0d609..f55bc9cde2c 100644 --- a/src/mame/drivers/cchance.cpp +++ b/src/mame/drivers/cchance.cpp @@ -220,8 +220,8 @@ MACHINE_CONFIG_START(cchance_state::cchance) MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_cchance) - MCFG_DEVICE_ADD("spritegen", SETA001_SPRITE, 0) - MCFG_SETA001_SPRITE_GFXDECODE("gfxdecode") + SETA001_SPRITE(config, m_seta001, 0); + m_seta001->set_gfxdecode_tag("gfxdecode"); /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) diff --git a/src/mame/drivers/champbwl.cpp b/src/mame/drivers/champbwl.cpp index f6120b790c8..a011293d49b 100644 --- a/src/mame/drivers/champbwl.cpp +++ b/src/mame/drivers/champbwl.cpp @@ -502,8 +502,8 @@ MACHINE_CONFIG_START(champbwl_state::champbwl) MCFG_MACHINE_START_OVERRIDE(champbwl_state,champbwl) MCFG_MACHINE_RESET_OVERRIDE(champbwl_state,champbwl) - MCFG_DEVICE_ADD("spritegen", SETA001_SPRITE, 0) - MCFG_SETA001_SPRITE_GFXDECODE("gfxdecode") + SETA001_SPRITE(config, m_seta001, 0); + m_seta001->set_gfxdecode_tag("gfxdecode"); /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) @@ -564,8 +564,10 @@ MACHINE_CONFIG_START(champbwl_state::doraemon) MCFG_DEVICE_VBLANK_INT_DRIVER("screen", champbwl_state, irq0_line_hold) NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0); - MCFG_DEVICE_ADD("spritegen", SETA001_SPRITE, 0) - MCFG_SETA001_SPRITE_GFXDECODE("gfxdecode") + + SETA001_SPRITE(config, m_seta001, 0); + m_seta001->set_gfxdecode_tag("gfxdecode"); + 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/crshrace.cpp b/src/mame/drivers/crshrace.cpp index 3e0156c4187..de8c17e0de1 100644 --- a/src/mame/drivers/crshrace.cpp +++ b/src/mame/drivers/crshrace.cpp @@ -428,10 +428,10 @@ MACHINE_CONFIG_START(crshrace_state::crshrace) MCFG_PALETTE_ADD("palette", 2048) MCFG_PALETTE_FORMAT(xGGGGGBBBBBRRRRR) - MCFG_DEVICE_ADD("vsystem_spr", VSYSTEM_SPR, 0) - MCFG_VSYSTEM_SPR_SET_TILE_INDIRECT( crshrace_state, crshrace_tile_callback ) - MCFG_VSYSTEM_SPR_SET_GFXREGION(2) - MCFG_VSYSTEM_SPR_GFXDECODE("gfxdecode") + VSYSTEM_SPR(config, m_spr, 0); + m_spr->set_tile_indirect_cb(FUNC(crshrace_state::crshrace_tile_callback), this); + m_spr->set_gfx_region(2); + m_spr->set_gfxdecode_tag(m_gfxdecode); MCFG_DEVICE_ADD("spriteram", BUFFERED_SPRITERAM16) MCFG_DEVICE_ADD("spriteram2", BUFFERED_SPRITERAM16) diff --git a/src/mame/drivers/darius.cpp b/src/mame/drivers/darius.cpp index 6ef500bdcee..0a36276016a 100644 --- a/src/mame/drivers/darius.cpp +++ b/src/mame/drivers/darius.cpp @@ -756,12 +756,12 @@ MACHINE_CONFIG_START(darius_state::darius) MCFG_SCREEN_UPDATE_DRIVER(darius_state, screen_update_darius_right) MCFG_SCREEN_PALETTE("palette") - MCFG_DEVICE_ADD("pc080sn", PC080SN, 0) - MCFG_PC080SN_GFX_REGION(1) - MCFG_PC080SN_OFFSETS(-16, 8) - MCFG_PC080SN_YINVERT(0) - MCFG_PC080SN_DBLWIDTH(1) - MCFG_PC080SN_GFXDECODE("gfxdecode") + PC080SN(config, m_pc080sn, 0); + m_pc080sn->set_gfx_region(1); + m_pc080sn->set_offsets(-16, 8); + m_pc080sn->set_yinvert(0); + m_pc080sn->set_dblwidth(1); + m_pc080sn->set_gfxdecode_tag(m_gfxdecode); /* sound hardware */ SPEAKER(config, "lspeaker").front_left(); diff --git a/src/mame/drivers/djboy.cpp b/src/mame/drivers/djboy.cpp index 2dd4d4765e4..b2803efd326 100644 --- a/src/mame/drivers/djboy.cpp +++ b/src/mame/drivers/djboy.cpp @@ -526,8 +526,8 @@ MACHINE_CONFIG_START(djboy_state::djboy) MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_djboy) MCFG_PALETTE_ADD("palette", 0x200) - MCFG_DEVICE_ADD("pandora", KANEKO_PANDORA, 0) - MCFG_KANEKO_PANDORA_GFXDECODE("gfxdecode") + KANEKO_PANDORA(config, m_pandora, 0); + m_pandora->set_gfxdecode_tag(m_gfxdecode); SPEAKER(config, "lspeaker").front_left(); SPEAKER(config, "rspeaker").front_right(); diff --git a/src/mame/drivers/expro02.cpp b/src/mame/drivers/expro02.cpp index de18d1ef64d..07ad65ca712 100644 --- a/src/mame/drivers/expro02.cpp +++ b/src/mame/drivers/expro02.cpp @@ -934,15 +934,15 @@ MACHINE_CONFIG_START(expro02_state::expro02) MCFG_PALETTE_FORMAT(GGGGGRRRRRBBBBBx) MCFG_PALETTE_INIT_OWNER(expro02_state, expro02) - MCFG_DEVICE_ADD("view2_0", KANEKO_TMAP, 0) - MCFG_KANEKO_TMAP_GFX_REGION(1) - MCFG_KANEKO_TMAP_OFFSET(0x5b, 0x8, 256, 224) - MCFG_KANEKO_TMAP_GFXDECODE("gfxdecode") + KANEKO_TMAP(config, m_view2_0); + m_view2_0->set_gfx_region(1); + m_view2_0->set_offset(0x5b, 0x8, 256, 224); + m_view2_0->set_gfxdecode_tag("gfxdecode"); - MCFG_DEVICE_ADD_VU002_SPRITES - MCFG_KANEKO16_SPRITE_PRIORITIES(8,8,8,8) // above all (not verified) - MCFG_KANEKO16_SPRITE_OFFSETS(0, -0x40) - MCFG_KANEKO16_SPRITE_GFXDECODE("gfxdecode") + KANEKO_VU002_SPRITE(config, m_kaneko_spr); + m_kaneko_spr->set_priorities(8,8,8,8); // above all (not verified) + m_kaneko_spr->set_offsets(0, -0x40); + m_kaneko_spr->set_gfxdecode_tag("gfxdecode"); MCFG_DEVICE_ADD("calc1_mcu", KANEKO_HIT, 0) MCFG_KANEKO_HIT_TYPE(0) @@ -970,17 +970,16 @@ MACHINE_CONFIG_START(expro02_state::comad) MCFG_DEVICE_REMOVE("calc1_mcu") - MCFG_DEVICE_MODIFY("view2_0") // these values might not be correct, behavior differs from original boards - MCFG_KANEKO_TMAP_INVERT_FLIP(1) - MCFG_KANEKO_TMAP_OFFSET(-256, -216, 256, 224) + m_view2_0->set_invert_flip(1); + m_view2_0->set_offset(-256, -216, 256, 224); subdevice("watchdog")->set_time(attotime::from_seconds(0)); /* a guess, and certainly wrong */ MACHINE_CONFIG_END MACHINE_CONFIG_START(expro02_state::comad_noview2) comad(config); - MCFG_DEVICE_REMOVE("view2_0") + config.device_remove("view2_0"); MCFG_GFXDECODE_MODIFY("gfxdecode", gfx_expro02_noview2) MACHINE_CONFIG_END diff --git a/src/mame/drivers/f1gp.cpp b/src/mame/drivers/f1gp.cpp index 165725a5cf3..00070eb5403 100644 --- a/src/mame/drivers/f1gp.cpp +++ b/src/mame/drivers/f1gp.cpp @@ -430,19 +430,19 @@ MACHINE_CONFIG_START(f1gp_state::f1gp) MCFG_PALETTE_ADD("palette", 2048) MCFG_PALETTE_FORMAT(xRRRRRGGGGGBBBBB) - MCFG_DEVICE_ADD("gga", VSYSTEM_GGA, XTAL(14'318'181) / 2) // divider not verified + VSYSTEM_GGA(config, "gga", XTAL(14'318'181) / 2); // divider not verified - MCFG_DEVICE_ADD("vsystem_spr_old1", VSYSTEM_SPR2, 0) - MCFG_VSYSTEM_SPR2_SET_TILE_INDIRECT( f1gp_state, tile_callback<0> ) - MCFG_VSYSTEM_SPR2_SET_GFXREGION(1) - MCFG_VSYSTEM_SPR2_SET_PRITYPE(2) - MCFG_VSYSTEM_SPR2_GFXDECODE("gfxdecode") + VSYSTEM_SPR2(config, m_spr_old[0], 0); + m_spr_old[0]->set_tile_indirect_cb(FUNC(f1gp2_state::tile_callback<0>), this); + m_spr_old[0]->set_gfx_region(1); + m_spr_old[0]->set_pritype(2); + m_spr_old[0]->set_gfxdecode_tag(m_gfxdecode); - MCFG_DEVICE_ADD("vsystem_spr_old2", VSYSTEM_SPR2, 0) - MCFG_VSYSTEM_SPR2_SET_TILE_INDIRECT( f1gp_state, tile_callback<1> ) - MCFG_VSYSTEM_SPR2_SET_GFXREGION(2) - MCFG_VSYSTEM_SPR2_SET_PRITYPE(2) - MCFG_VSYSTEM_SPR2_GFXDECODE("gfxdecode") + VSYSTEM_SPR2(config, m_spr_old[1], 0); + m_spr_old[1]->set_tile_indirect_cb(FUNC(f1gp2_state::tile_callback<1>), this); + m_spr_old[1]->set_gfx_region(2); + m_spr_old[1]->set_pritype(2); + m_spr_old[1]->set_gfxdecode_tag(m_gfxdecode); MCFG_DEVICE_ADD("k053936", K053936, 0) MCFG_K053936_WRAP(1) @@ -499,7 +499,7 @@ MACHINE_CONFIG_START(f1gp_state::f1gpb) MCFG_PALETTE_ADD("palette", 2048) MCFG_PALETTE_FORMAT(xRRRRRGGGGGBBBBB) - //MCFG_DEVICE_ADD("gga", VSYSTEM_GGA, 0) + //VSYSTEM_GGA(config, "gga", 0); /* sound hardware */ SPEAKER(config, "mono").front_center(); @@ -522,13 +522,13 @@ MACHINE_CONFIG_START(f1gp2_state::f1gp2) MCFG_SCREEN_VISIBLE_AREA(0*8, 40*8-1, 0*8, 28*8-1) MCFG_SCREEN_UPDATE_DRIVER(f1gp2_state, screen_update) - MCFG_DEVICE_REMOVE("gga") - MCFG_DEVICE_REMOVE("vsystem_spr_old1") - MCFG_DEVICE_REMOVE("vsystem_spr_old2") - MCFG_DEVICE_ADD("vsystem_spr", VSYSTEM_SPR, 0) - MCFG_VSYSTEM_SPR_SET_TILE_INDIRECT( f1gp2_state, tile_callback<0> ) - MCFG_VSYSTEM_SPR_SET_GFXREGION(1) - MCFG_VSYSTEM_SPR_GFXDECODE("gfxdecode") + config.device_remove("gga"); + config.device_remove("vsystem_spr_old1"); + config.device_remove("vsystem_spr_old2"); + VSYSTEM_SPR(config, m_spr, 0); + m_spr->set_tile_indirect_cb(FUNC(f1gp2_state::tile_callback<0>), this); + m_spr->set_gfx_region(1); + m_spr->set_gfxdecode_tag(m_gfxdecode); MCFG_DEVICE_MODIFY("k053936") MCFG_K053936_OFFSETS(-48, -21) diff --git a/src/mame/drivers/fromance.cpp b/src/mame/drivers/fromance.cpp index b5e6f8d42af..61ea744dabd 100644 --- a/src/mame/drivers/fromance.cpp +++ b/src/mame/drivers/fromance.cpp @@ -928,8 +928,8 @@ MACHINE_CONFIG_START(fromance_state::nekkyoku) MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_fromance) MCFG_PALETTE_ADD("palette", 1024) - MCFG_DEVICE_ADD("gga", VSYSTEM_GGA, 14318180 / 2) // clock not verified - MCFG_VSYSTEM_GGA_REGISTER_WRITE_CB(WRITE8(*this, fromance_state, fromance_gga_data_w)) + VSYSTEM_GGA(config, m_gga, 14318181 / 2); // clock not verified + m_gga->write_cb().set(FUNC(fromance_state::fromance_gga_data_w)); MCFG_VIDEO_START_OVERRIDE(fromance_state,nekkyoku) @@ -973,8 +973,8 @@ MACHINE_CONFIG_START(fromance_state::idolmj) MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_fromance) MCFG_PALETTE_ADD("palette", 2048) - MCFG_DEVICE_ADD("gga", VSYSTEM_GGA, XTAL(14'318'181) / 2) // divider not verified - MCFG_VSYSTEM_GGA_REGISTER_WRITE_CB(WRITE8(*this, fromance_state, fromance_gga_data_w)) + VSYSTEM_GGA(config, m_gga, XTAL(14'318'181) / 2); // divider not verified + m_gga->write_cb().set(FUNC(fromance_state::fromance_gga_data_w)); MCFG_VIDEO_START_OVERRIDE(fromance_state,fromance) @@ -1018,8 +1018,8 @@ MACHINE_CONFIG_START(fromance_state::fromance) MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_fromance) MCFG_PALETTE_ADD("palette", 2048) - MCFG_DEVICE_ADD("gga", VSYSTEM_GGA, XTAL(14'318'181) / 2) // divider not verified - MCFG_VSYSTEM_GGA_REGISTER_WRITE_CB(WRITE8(*this, fromance_state, fromance_gga_data_w)) + VSYSTEM_GGA(config, m_gga, XTAL(14'318'181) / 2); // divider not verified + m_gga->write_cb().set(FUNC(fromance_state::fromance_gga_data_w)); MCFG_VIDEO_START_OVERRIDE(fromance_state,fromance) diff --git a/src/mame/drivers/gaiden.cpp b/src/mame/drivers/gaiden.cpp index 276e10b4d5d..7e15ae29114 100644 --- a/src/mame/drivers/gaiden.cpp +++ b/src/mame/drivers/gaiden.cpp @@ -777,8 +777,8 @@ MACHINE_CONFIG_START(gaiden_state::shadoww) MCFG_PALETTE_ADD("palette", 4096) MCFG_PALETTE_FORMAT(xxxxBBBBGGGGRRRR) - MCFG_DEVICE_ADD("spritegen", TECMO_SPRITE, 0) - MCFG_TECMO_SPRITE_GFX_REGION(3) + TECMO_SPRITE(config, m_sprgen, 0); + m_sprgen->set_gfx_region(3); TECMO_MIXER(config, m_mixer, 0); m_mixer->set_mixer_shifts(10,9,4); diff --git a/src/mame/drivers/galastrm.cpp b/src/mame/drivers/galastrm.cpp index 1dd4d969252..5798ae78775 100644 --- a/src/mame/drivers/galastrm.cpp +++ b/src/mame/drivers/galastrm.cpp @@ -36,6 +36,10 @@ Written by Hau tips $300.b debugmode $305.b invincibility + +TODO: +- convert to use device implementation of TC0110PCR +- device-ify TC0610? (no other known users) */ @@ -51,13 +55,13 @@ $305.b invincibility /*********************************************************************/ -INTERRUPT_GEN_MEMBER(galastrm_state::galastrm_interrupt) +INTERRUPT_GEN_MEMBER(galastrm_state::interrupt) { m_frame_counter ^= 1; device.execute().set_input_line(5, HOLD_LINE); } -WRITE32_MEMBER(galastrm_state::galastrm_palette_w) +WRITE32_MEMBER(galastrm_state::palette_w) { if (ACCESSING_BITS_16_31) m_tc0110pcr_addr = data >> 16; @@ -65,7 +69,7 @@ WRITE32_MEMBER(galastrm_state::galastrm_palette_w) m_palette->set_pen_color(m_tc0110pcr_addr, pal5bit(data >> 10), pal5bit(data >> 5), pal5bit(data >> 0)); } -WRITE32_MEMBER(galastrm_state::galastrm_tc0610_0_w) +WRITE32_MEMBER(galastrm_state::tc0610_0_w) { if (ACCESSING_BITS_16_31) m_tc0610_0_addr = data >> 16; @@ -73,7 +77,7 @@ WRITE32_MEMBER(galastrm_state::galastrm_tc0610_0_w) m_tc0610_ctrl_reg[0][m_tc0610_0_addr] = data; } -WRITE32_MEMBER(galastrm_state::galastrm_tc0610_1_w) +WRITE32_MEMBER(galastrm_state::tc0610_1_w) { if (ACCESSING_BITS_16_31) m_tc0610_1_addr = data >> 16; @@ -100,7 +104,7 @@ WRITE8_MEMBER(galastrm_state::coin_word_w) MEMORY STRUCTURES ***********************************************************/ -void galastrm_state::galastrm_map(address_map &map) +void galastrm_state::main_map(address_map &map) { map(0x000000, 0x0fffff).rom(); map(0x200000, 0x21ffff).ram().share("ram"); /* main CPUA ram */ @@ -111,9 +115,9 @@ void galastrm_state::galastrm_map(address_map &map) map(0x600000, 0x6007ff).rw("taito_en:dpram", FUNC(mb8421_device::left_r), FUNC(mb8421_device::left_w)); /* Sound shared ram */ map(0x800000, 0x80ffff).rw(m_tc0480scp, FUNC(tc0480scp_device::long_r), FUNC(tc0480scp_device::long_w)); /* tilemaps */ map(0x830000, 0x83002f).rw(m_tc0480scp, FUNC(tc0480scp_device::ctrl_long_r), FUNC(tc0480scp_device::ctrl_long_w)); - map(0x900000, 0x900003).w(FUNC(galastrm_state::galastrm_palette_w)); /* TC0110PCR */ - map(0xb00000, 0xb00003).w(FUNC(galastrm_state::galastrm_tc0610_0_w)); /* TC0610 */ - map(0xc00000, 0xc00003).w(FUNC(galastrm_state::galastrm_tc0610_1_w)); + map(0x900000, 0x900003).w(FUNC(galastrm_state::palette_w)); /* TC0110PCR */ + map(0xb00000, 0xb00003).w(FUNC(galastrm_state::tc0610_0_w)); /* TC0610 */ + map(0xc00000, 0xc00003).w(FUNC(galastrm_state::tc0610_1_w)); map(0xd00000, 0xd0ffff).rw(m_tc0100scn, FUNC(tc0100scn_device::long_r), FUNC(tc0100scn_device::long_w)); /* piv tilemaps */ map(0xd20000, 0xd2000f).rw(m_tc0100scn, FUNC(tc0100scn_device::ctrl_long_r), FUNC(tc0100scn_device::ctrl_long_w)); } @@ -125,7 +129,7 @@ void galastrm_state::galastrm_map(address_map &map) static INPUT_PORTS_START( galastrm ) PORT_START("IN0") PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_START1 ) - PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, galastrm_state,frame_counter_r, nullptr) + PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, galastrm_state, frame_counter_r, nullptr) PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN ) @@ -200,11 +204,12 @@ GFXDECODE_END /***************************************************************************/ -MACHINE_CONFIG_START(galastrm_state::galastrm) +void galastrm_state::galastrm(machine_config &config) +{ /* basic machine hardware */ - MCFG_DEVICE_ADD("maincpu", M68EC020, 16000000) /* 16 MHz */ - MCFG_DEVICE_PROGRAM_MAP(galastrm_map) - MCFG_DEVICE_VBLANK_INT_DRIVER("screen", galastrm_state, galastrm_interrupt) /* VBL */ + M68EC020(config, m_maincpu, 16000000); /* 16 MHz */ + m_maincpu->set_addrmap(AS_PROGRAM, &galastrm_state::main_map); + m_maincpu->set_vblank_int("screen", FUNC(galastrm_state::interrupt)); /* VBL */ EEPROM_93C46_16BIT(config, "eeprom"); @@ -223,33 +228,33 @@ MACHINE_CONFIG_START(galastrm_state::galastrm) tc0510nio.read_7_callback().set_ioport("IN2"); /* video hardware */ - MCFG_SCREEN_ADD("screen", RASTER) - MCFG_SCREEN_REFRESH_RATE(60) - MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0)) - MCFG_SCREEN_SIZE(64*8, 50*8) - MCFG_SCREEN_VISIBLE_AREA(0+96, 40*8-1+96, 3*8+60, 32*8-1+60) - MCFG_SCREEN_UPDATE_DRIVER(galastrm_state, screen_update_galastrm) - MCFG_SCREEN_PALETTE("palette") - - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_galastrm) - MCFG_PALETTE_ADD("palette", 4096) - - MCFG_DEVICE_ADD("tc0100scn", TC0100SCN, 0) - MCFG_TC0100SCN_GFX_REGION(0) - MCFG_TC0100SCN_TX_REGION(2) - MCFG_TC0100SCN_OFFSETS(-48, -56) - MCFG_TC0100SCN_GFXDECODE("gfxdecode") - MCFG_TC0100SCN_PALETTE("palette") - - MCFG_DEVICE_ADD("tc0480scp", TC0480SCP, 0) - MCFG_TC0480SCP_GFX_REGION(1) - MCFG_TC0480SCP_TX_REGION(3) - MCFG_TC0480SCP_OFFSETS(-40, -3) - MCFG_TC0480SCP_GFXDECODE("gfxdecode") + SCREEN(config, m_screen, SCREEN_TYPE_RASTER); + m_screen->set_refresh_hz(60); + m_screen->set_vblank_time(ATTOSECONDS_IN_USEC(0)); + m_screen->set_size(64*8, 50*8); + m_screen->set_visarea(0+96, 40*8-1+96, 3*8+60, 32*8-1+60); + m_screen->set_screen_update(FUNC(galastrm_state::screen_update)); + m_screen->set_palette(m_palette); + + GFXDECODE(config, m_gfxdecode, m_palette, gfx_galastrm); + PALETTE(config, m_palette, 4096); + + TC0100SCN(config, m_tc0100scn, 0); + m_tc0100scn->set_gfx_region(0); + m_tc0100scn->set_tx_region(2); + m_tc0100scn->set_offsets(-48, -56); + m_tc0100scn->set_gfxdecode_tag(m_gfxdecode); + m_tc0100scn->set_palette_tag(m_palette); + + TC0480SCP(config, m_tc0480scp, 0); + m_tc0480scp->set_gfx_region(1); + m_tc0480scp->set_tx_region(3); + m_tc0480scp->set_offsets(-40, -3); + m_tc0480scp->set_gfxdecode_tag(m_gfxdecode); /* sound hardware */ - MCFG_DEVICE_ADD("taito_en", TAITO_EN, 0) -MACHINE_CONFIG_END + TAITO_EN(config, "taito_en", 0); +} /***************************************************************************/ @@ -291,4 +296,4 @@ ROM_START( galastrm ) ROM_END -GAME( 1992, galastrm, 0, galastrm, galastrm, galastrm_state, empty_init, ROT0, "Taito Corporation", "Galactic Storm (Japan)", MACHINE_IMPERFECT_GRAPHICS ) +GAME( 1992, galastrm, 0, galastrm, galastrm, galastrm_state, empty_init, ROT0, "Taito Corporation", "Galactic Storm (Japan)", MACHINE_IMPERFECT_GRAPHICS | MACHINE_SUPPORTS_SAVE ) diff --git a/src/mame/drivers/galpani2.cpp b/src/mame/drivers/galpani2.cpp index a7e135cc1d5..e4c08a87042 100644 --- a/src/mame/drivers/galpani2.cpp +++ b/src/mame/drivers/galpani2.cpp @@ -655,10 +655,9 @@ MACHINE_CONFIG_START(galpani2_state::galpani2) MCFG_PALETTE_FORMAT(xGGGGGRRRRRBBBBB) MCFG_PALETTE_INIT_OWNER(galpani2_state,galpani2) - MCFG_DEVICE_ADD_KC002_SPRITES - MCFG_KANEKO16_SPRITE_OFFSETS(0x10000 - 0x16c0 + 0xc00, 0) - MCFG_KANEKO16_SPRITE_GFXDECODE("gfxdecode") - + KANEKO_KC002_SPRITE(config, m_kaneko_spr); + m_kaneko_spr->set_offsets(0x10000 - 0x16c0 + 0xc00, 0); + m_kaneko_spr->set_gfxdecode_tag("gfxdecode"); /* sound hardware */ SPEAKER(config, "lspeaker").front_left(); diff --git a/src/mame/drivers/galpanic.cpp b/src/mame/drivers/galpanic.cpp index 7cbd9cbfac9..7176eb5dd60 100644 --- a/src/mame/drivers/galpanic.cpp +++ b/src/mame/drivers/galpanic.cpp @@ -256,9 +256,9 @@ MACHINE_CONFIG_START(galpanic_state::galpanic) MCFG_PALETTE_FORMAT(GGGGGRRRRRBBBBBx) // fg palette ram, bit 0 seems to be a transparency flag for the front bitmap MCFG_PALETTE_INIT_OWNER(galpanic_state, galpanic) - MCFG_DEVICE_ADD("pandora", KANEKO_PANDORA, 0) - MCFG_KANEKO_PANDORA_OFFSETS(0, -16) - MCFG_KANEKO_PANDORA_GFXDECODE("gfxdecode") + KANEKO_PANDORA(config, m_pandora, 0); + m_pandora->set_offsets(0, -16); + m_pandora->set_gfxdecode_tag(m_gfxdecode); /* sound hardware */ SPEAKER(config, "mono").front_center(); diff --git a/src/mame/drivers/galspnbl.cpp b/src/mame/drivers/galspnbl.cpp index 1af7014c8c2..3dc9a63e3de 100644 --- a/src/mame/drivers/galspnbl.cpp +++ b/src/mame/drivers/galspnbl.cpp @@ -243,9 +243,9 @@ MACHINE_CONFIG_START(galspnbl_state::galspnbl) MCFG_PALETTE_INIT_OWNER(galspnbl_state, galspnbl) MCFG_PALETTE_FORMAT(xxxxBBBBGGGGRRRR) - MCFG_DEVICE_ADD("spritegen", TECMO_SPRITE, 0) - MCFG_TECMO_SPRITE_GFX_REGION(1) - MCFG_TECMO_SPRITE_BOOTLEG(1) + TECMO_SPRITE(config, m_sprgen, 0); + m_sprgen->set_gfx_region(1); + m_sprgen->set_bootleg(1); /* sound hardware */ SPEAKER(config, "mono").front_center(); diff --git a/src/mame/drivers/groundfx.cpp b/src/mame/drivers/groundfx.cpp index 7972bfbf788..9bae2e20283 100644 --- a/src/mame/drivers/groundfx.cpp +++ b/src/mame/drivers/groundfx.cpp @@ -274,22 +274,22 @@ MACHINE_CONFIG_START(groundfx_state::groundfx) MCFG_PALETTE_ADD("palette", 16384) MCFG_PALETTE_FORMAT(XRGB) - MCFG_DEVICE_ADD("tc0100scn", TC0100SCN, 0) - MCFG_TC0100SCN_GFX_REGION(2) - MCFG_TC0100SCN_TX_REGION(3) - MCFG_TC0100SCN_OFFSETS(50, 8) - MCFG_TC0100SCN_GFXDECODE("gfxdecode") - MCFG_TC0100SCN_PALETTE("palette") - - MCFG_DEVICE_ADD("tc0480scp", TC0480SCP, 0) - MCFG_TC0480SCP_GFX_REGION(1) - MCFG_TC0480SCP_TX_REGION(4) - MCFG_TC0480SCP_OFFSETS(0x24, 0) - MCFG_TC0480SCP_OFFSETS_TX(-1, 0) - MCFG_TC0480SCP_GFXDECODE("gfxdecode") + TC0100SCN(config, m_tc0100scn, 0); + m_tc0100scn->set_gfx_region(2); + m_tc0100scn->set_tx_region(3); + m_tc0100scn->set_offsets(50, 8); + m_tc0100scn->set_gfxdecode_tag(m_gfxdecode); + m_tc0100scn->set_palette_tag(m_palette); + + TC0480SCP(config, m_tc0480scp, 0); + m_tc0480scp->set_gfx_region(1); + m_tc0480scp->set_tx_region(4); + m_tc0480scp->set_offsets(0x24, 0); + m_tc0480scp->set_offsets_tx(-1, 0); + m_tc0480scp->set_gfxdecode_tag(m_gfxdecode); /* sound hardware */ - MCFG_DEVICE_ADD("taito_en", TAITO_EN, 0) + TAITO_EN(config, "taito_en", 0); MACHINE_CONFIG_END /*************************************************************************** diff --git a/src/mame/drivers/gstriker.cpp b/src/mame/drivers/gstriker.cpp index 492cbee9faf..72f3743d6d2 100644 --- a/src/mame/drivers/gstriker.cpp +++ b/src/mame/drivers/gstriker.cpp @@ -524,20 +524,19 @@ MACHINE_CONFIG_START(gstriker_state::base) MCFG_PALETTE_FORMAT(xRRRRRGGGGGBBBBB) - MCFG_DEVICE_ADD("zoomtilemap", MB60553, 0) - MCFG_MB60553_GFXDECODE("gfxdecode") - MCFG_MB60553_GFX_REGION(1) + MB60553(config, m_bg, 0); + m_bg->set_gfxdecode_tag(m_gfxdecode); + m_bg->set_gfx_region(1); - MCFG_DEVICE_ADD("texttilemap", VS920A, 0) - MCFG_VS920A_GFXDECODE("gfxdecode") - MCFG_VS920A_GFX_REGION(0) + VS920A(config, m_tx, 0); + m_tx->set_gfxdecode_tag(m_gfxdecode); + m_tx->set_gfx_region(0); - - MCFG_DEVICE_ADD("vsystem_spr", VSYSTEM_SPR, 0) - MCFG_VSYSTEM_SPR_SET_GFXREGION(2) - MCFG_VSYSTEM_SPR_SET_PALMASK(0x1f) - MCFG_VSYSTEM_SPR_SET_TRANSPEN(0) - MCFG_VSYSTEM_SPR_GFXDECODE("gfxdecode") + VSYSTEM_SPR(config, m_spr, 0); + m_spr->set_gfx_region(2); + m_spr->set_pal_mask(0x1f); + m_spr->set_transpen(0); + m_spr->set_gfxdecode_tag(m_gfxdecode); SPEAKER(config, "lspeaker").front_left(); SPEAKER(config, "rspeaker").front_right(); @@ -554,35 +553,37 @@ MACHINE_CONFIG_START(gstriker_state::base) MCFG_SOUND_ROUTE(2, "rspeaker", 1.0) MACHINE_CONFIG_END -MACHINE_CONFIG_START(gstriker_state::gstriker) +void gstriker_state::gstriker(machine_config &config) +{ base(config); - MCFG_DEVICE_ADD("maincpu", M68000, 10000000) - MCFG_DEVICE_PROGRAM_MAP(gstriker_map) - MCFG_DEVICE_VBLANK_INT_DRIVER("screen", gstriker_state, irq1_line_hold) + M68000(config, m_maincpu, 10000000); + m_maincpu->set_addrmap(AS_PROGRAM, &gstriker_state::gstriker_map); + m_maincpu->set_vblank_int("screen", FUNC(gstriker_state::irq1_line_hold)); ACIA6850(config, m_acia, 0); - m_acia->irq_handler().set_inputline("maincpu", M68K_IRQ_2); + m_acia->irq_handler().set_inputline(m_maincpu, M68K_IRQ_2); //m_acia->txd_handler().set("link", FUNC(rs232_port_device::write_txd)); //m_acia->rts_handler().set("link", FUNC(rs232_port_device::write_rts)); -MACHINE_CONFIG_END +} -MACHINE_CONFIG_START(gstriker_state::twc94) +void gstriker_state::twc94(machine_config &config) +{ base(config); - MCFG_DEVICE_ADD("maincpu", M68000, 16000000) - MCFG_DEVICE_PROGRAM_MAP(twcup94_map) - MCFG_DEVICE_VBLANK_INT_DRIVER("screen", gstriker_state, irq1_line_hold) + M68000(config, m_maincpu, 16000000); + m_maincpu->set_addrmap(AS_PROGRAM, &gstriker_state::twcup94_map); + m_maincpu->set_vblank_int("screen", FUNC(gstriker_state::irq1_line_hold)); subdevice("io")->porth_output_cb().append(FUNC(gstriker_state::twcup94_prot_reg_w)); -MACHINE_CONFIG_END +} -MACHINE_CONFIG_START(gstriker_state::vgoal) +void gstriker_state::vgoal(machine_config &config) +{ twc94(config); - MCFG_DEVICE_MODIFY("vsystem_spr") - MCFG_VSYSTEM_SPR_SET_TRANSPEN(0xf) // different vs. the other games, find register -MACHINE_CONFIG_END + m_spr->set_transpen(0xf); // different vs. the other games, find register +} diff --git a/src/mame/drivers/gunbustr.cpp b/src/mame/drivers/gunbustr.cpp index f1beed7a5d4..84000dbb49b 100644 --- a/src/mame/drivers/gunbustr.cpp +++ b/src/mame/drivers/gunbustr.cpp @@ -260,16 +260,16 @@ MACHINE_CONFIG_START(gunbustr_state::gunbustr) MCFG_PALETTE_ADD("palette", 4096) MCFG_PALETTE_FORMAT(xRRRRRGGGGGBBBBB) - MCFG_DEVICE_ADD("tc0480scp", TC0480SCP, 0) - MCFG_TC0480SCP_GFX_REGION(1) - MCFG_TC0480SCP_TX_REGION(2) - MCFG_TC0480SCP_OFFSETS(0x20, 0x07) - MCFG_TC0480SCP_OFFSETS_TX(-1, -1) - MCFG_TC0480SCP_OFFSETS_FLIP(-1, 0) - MCFG_TC0480SCP_GFXDECODE("gfxdecode") + TC0480SCP(config, m_tc0480scp, 0); + m_tc0480scp->set_gfx_region(1); + m_tc0480scp->set_tx_region(2); + m_tc0480scp->set_offsets(0x20, 0x07); + m_tc0480scp->set_offsets_tx(-1, -1); + m_tc0480scp->set_offsets_flip(-1, 0); + m_tc0480scp->set_gfxdecode_tag(m_gfxdecode); /* sound hardware */ - MCFG_DEVICE_ADD("taito_en", TAITO_EN, 0) + TAITO_EN(config, "taito_en", 0); MACHINE_CONFIG_END /***************************************************************************/ diff --git a/src/mame/drivers/hvyunit.cpp b/src/mame/drivers/hvyunit.cpp index 96bf825d958..525750f2772 100644 --- a/src/mame/drivers/hvyunit.cpp +++ b/src/mame/drivers/hvyunit.cpp @@ -665,8 +665,8 @@ MACHINE_CONFIG_START(hvyunit_state::hvyunit) MCFG_PALETTE_ADD("palette", 0x800) MCFG_PALETTE_FORMAT(xxxxRRRRGGGGBBBB) - MCFG_DEVICE_ADD("pandora", KANEKO_PANDORA, 0) - MCFG_KANEKO_PANDORA_GFXDECODE("gfxdecode") + KANEKO_PANDORA(config, m_pandora, 0); + m_pandora->set_gfxdecode_tag(m_gfxdecode); /* sound hardware */ SPEAKER(config, "mono").front_center(); diff --git a/src/mame/drivers/inufuku.cpp b/src/mame/drivers/inufuku.cpp index f84756dfdbd..d1791d09830 100644 --- a/src/mame/drivers/inufuku.cpp +++ b/src/mame/drivers/inufuku.cpp @@ -358,12 +358,12 @@ MACHINE_CONFIG_START(inufuku_state::inufuku) MCFG_SCREEN_VBLANK_CALLBACK(WRITELINE(*this, inufuku_state, screen_vblank_inufuku)) MCFG_SCREEN_PALETTE("palette") - MCFG_DEVICE_ADD("vsystem_spr", VSYSTEM_SPR, 0) - MCFG_VSYSTEM_SPR_SET_OFFSETS(0,1) // reference videos confirm at least the +1 against tilemaps in 3on3dunk (the highscore header text and black box are meant to be 1 pixel misaligned, although there is currently a priority bug there too) - MCFG_VSYSTEM_SPR_SET_PDRAW(true) - MCFG_VSYSTEM_SPR_SET_TILE_INDIRECT( inufuku_state, inufuku_tile_callback ) - MCFG_VSYSTEM_SPR_SET_GFXREGION(2) - MCFG_VSYSTEM_SPR_GFXDECODE("gfxdecode") + VSYSTEM_SPR(config, m_spr, 0); + m_spr->set_offsets(0, 1); // reference videos confirm at least the +1 against tilemaps in 3on3dunk (the highscore header text and black box are meant to be 1 pixel misaligned, although there is currently a priority bug there too) + m_spr->set_pdraw(true); + m_spr->set_tile_indirect_cb(FUNC(inufuku_state::inufuku_tile_callback), this); + m_spr->set_gfx_region(2); + m_spr->set_gfxdecode_tag(m_gfxdecode); MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_inufuku) MCFG_PALETTE_ADD("palette", 4096) diff --git a/src/mame/drivers/jchan.cpp b/src/mame/drivers/jchan.cpp index e654e534c6a..9de1278308f 100644 --- a/src/mame/drivers/jchan.cpp +++ b/src/mame/drivers/jchan.cpp @@ -627,10 +627,10 @@ MACHINE_CONFIG_START(jchan_state::jchan) MCFG_PALETTE_ADD("palette", 0x10000) MCFG_PALETTE_FORMAT(xGGGGGRRRRRBBBBB) - MCFG_DEVICE_ADD("view2", KANEKO_TMAP, 0) - MCFG_KANEKO_TMAP_GFX_REGION(0) - MCFG_KANEKO_TMAP_OFFSET(33, 11, 320, 240) - MCFG_KANEKO_TMAP_GFXDECODE("gfxdecode") + KANEKO_TMAP(config, m_view2); + m_view2->set_gfx_region(0); + m_view2->set_offset(33, 11, 320, 240); + m_view2->set_gfxdecode_tag("gfxdecode"); MCFG_DEVICE_ADD("spritegen1", SKNS_SPRITE, 0) MCFG_DEVICE_ADD("spritegen2", SKNS_SPRITE, 0) diff --git a/src/mame/drivers/kinst.cpp b/src/mame/drivers/kinst.cpp index 2f0fb213fcf..edb37fba599 100644 --- a/src/mame/drivers/kinst.cpp +++ b/src/mame/drivers/kinst.cpp @@ -743,7 +743,7 @@ MACHINE_CONFIG_START(kinst_state::kinst) MCFG_PALETTE_ADD_BBBBBGGGGGRRRRR("palette") /* sound hardware */ - MCFG_DEVICE_ADD(m_dcs, DCS_AUDIO_2K, 0) + DCS_AUDIO_2K(config, m_dcs, 0); MACHINE_CONFIG_END diff --git a/src/mame/drivers/ladybug.cpp b/src/mame/drivers/ladybug.cpp index b554d1c311c..9f1757a1a80 100644 --- a/src/mame/drivers/ladybug.cpp +++ b/src/mame/drivers/ladybug.cpp @@ -741,8 +741,8 @@ MACHINE_CONFIG_START(ladybug_state::ladybug) MCFG_PALETTE_INDIRECT_ENTRIES(32) MCFG_PALETTE_INIT_OWNER(ladybug_state,ladybug) - MCFG_DEVICE_ADD("video", LADYBUG_VIDEO, 4000000) - MCFG_LADYBUG_VIDEO_GFXDECODE("gfxdecode") + LADYBUG_VIDEO(config, m_video, 4000000); + m_video->set_gfxdecode_tag("gfxdecode"); ls259_device &videolatch(LS259(config, "videolatch")); // L5 on video board or H3 on single board videolatch.q_out_cb<0>().set(FUNC(ladybug_state::flipscreen_w)); // no other outputs used @@ -791,10 +791,10 @@ MACHINE_CONFIG_START(sraider_state::sraider) MCFG_PALETTE_INDIRECT_ENTRIES(32+32+1) MCFG_PALETTE_INIT_OWNER(sraider_state,sraider) - MCFG_DEVICE_ADD("video", LADYBUG_VIDEO, 4000000) - MCFG_LADYBUG_VIDEO_GFXDECODE("gfxdecode") + LADYBUG_VIDEO(config, m_video, 4000000); + m_video->set_gfxdecode_tag(m_gfxdecode); - MCFG_DEVICE_ADD("stars", ZEROHOUR_STARS, 0) + ZEROHOUR_STARS(config, m_stars, 0); /* sound hardware */ SPEAKER(config, "mono").front_center(); diff --git a/src/mame/drivers/midtunit.cpp b/src/mame/drivers/midtunit.cpp index 35fa726cda2..aae36462505 100644 --- a/src/mame/drivers/midtunit.cpp +++ b/src/mame/drivers/midtunit.cpp @@ -622,22 +622,23 @@ MACHINE_CONFIG_START(midtunit_state::tunit_core) MACHINE_CONFIG_END -MACHINE_CONFIG_START(midtunit_state::tunit_adpcm) +void midtunit_state::tunit_adpcm(machine_config &config) +{ tunit_core(config); /* basic machine hardware */ SPEAKER(config, "speaker").front_center(); - MCFG_DEVICE_ADD("adpcm", WILLIAMS_ADPCM_SOUND) - MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 1.0) -MACHINE_CONFIG_END + WILLIAMS_ADPCM_SOUND(config, m_adpcm_sound, 0).add_route(ALL_OUTPUTS, "speaker", 1.0); +} -MACHINE_CONFIG_START(midtunit_state::tunit_dcs) +void midtunit_state::tunit_dcs(machine_config &config) +{ tunit_core(config); /* basic machine hardware */ - MCFG_DEVICE_ADD("dcs", DCS_AUDIO_2K, 0) -MACHINE_CONFIG_END + DCS_AUDIO_2K(config, m_dcs, 0); +} diff --git a/src/mame/drivers/midvunit.cpp b/src/mame/drivers/midvunit.cpp index a528b21680f..caac9b70d71 100644 --- a/src/mame/drivers/midvunit.cpp +++ b/src/mame/drivers/midvunit.cpp @@ -1135,9 +1135,9 @@ MACHINE_CONFIG_START(midvunit_state::midvplus) MCFG_MIDWAY_IOASIC_YEAR_OFFS(94) /* sound hardware */ - MCFG_DEVICE_ADD("dcs", DCS2_AUDIO_2115, 0) - MCFG_DCS2_AUDIO_DRAM_IN_MB(2) - MCFG_DCS2_AUDIO_POLLING_OFFSET(0x3839) + DCS2_AUDIO_2115(config, m_dcs, 0); + m_dcs->set_dram_in_mb(2); + m_dcs->set_polling_offset(0x3839); MACHINE_CONFIG_END diff --git a/src/mame/drivers/midwunit.cpp b/src/mame/drivers/midwunit.cpp index d29a9971081..951589f4971 100644 --- a/src/mame/drivers/midwunit.cpp +++ b/src/mame/drivers/midwunit.cpp @@ -651,7 +651,7 @@ MACHINE_CONFIG_START(midwunit_state::wunit) MCFG_VIDEO_START_OVERRIDE(midwunit_state,midwunit) /* sound hardware */ - MCFG_DEVICE_ADD("dcs", DCS_AUDIO_8K, 0) + DCS_AUDIO_8K(config, m_dcs, 0); MACHINE_CONFIG_END MACHINE_CONFIG_START(midwunit_state::wunit_picsim) diff --git a/src/mame/drivers/midxunit.cpp b/src/mame/drivers/midxunit.cpp index 651fa53e887..f9bbe07a9e6 100644 --- a/src/mame/drivers/midxunit.cpp +++ b/src/mame/drivers/midxunit.cpp @@ -280,7 +280,7 @@ MACHINE_CONFIG_START(midxunit_state::midxunit) adc.ch6_callback().set_ioport("AN5"); /* sound hardware */ - MCFG_DEVICE_ADD("dcs", DCS_AUDIO_2K_UART, 0) + DCS_AUDIO_2K_UART(config, m_dcs, 0); MACHINE_CONFIG_END diff --git a/src/mame/drivers/ninjaw.cpp b/src/mame/drivers/ninjaw.cpp index 88f78b4797e..d91ffa3ac4f 100644 --- a/src/mame/drivers/ninjaw.cpp +++ b/src/mame/drivers/ninjaw.cpp @@ -429,15 +429,15 @@ void ninjaw_state::ninjaw_master_map(address_map &map) map(0x220000, 0x220003).rw(FUNC(ninjaw_state::sound_r), FUNC(ninjaw_state::sound_w)); map(0x240000, 0x24ffff).ram().share("share1"); map(0x260000, 0x263fff).ram().share("spriteram"); - map(0x280000, 0x293fff).r("tc0100scn_1", FUNC(tc0100scn_device::word_r)).w(FUNC(ninjaw_state::tc0100scn_triple_screen_w)); /* tilemaps (1st screen/all screens) */ - map(0x2a0000, 0x2a000f).rw("tc0100scn_1", FUNC(tc0100scn_device::ctrl_word_r), FUNC(tc0100scn_device::ctrl_word_w)); - map(0x2c0000, 0x2d3fff).rw("tc0100scn_2", FUNC(tc0100scn_device::word_r), FUNC(tc0100scn_device::word_w)); /* tilemaps (2nd screen) */ - map(0x2e0000, 0x2e000f).rw("tc0100scn_2", FUNC(tc0100scn_device::ctrl_word_r), FUNC(tc0100scn_device::ctrl_word_w)); - map(0x300000, 0x313fff).rw("tc0100scn_3", FUNC(tc0100scn_device::word_r), FUNC(tc0100scn_device::word_w)); /* tilemaps (3rd screen) */ - map(0x320000, 0x32000f).rw("tc0100scn_3", FUNC(tc0100scn_device::ctrl_word_r), FUNC(tc0100scn_device::ctrl_word_w)); - map(0x340000, 0x340007).rw("tc0110pcr_1", FUNC(tc0110pcr_device::word_r), FUNC(tc0110pcr_device::step1_word_w)); /* palette (1st screen) */ - map(0x350000, 0x350007).rw("tc0110pcr_2", FUNC(tc0110pcr_device::word_r), FUNC(tc0110pcr_device::step1_word_w)); /* palette (2nd screen) */ - map(0x360000, 0x360007).rw("tc0110pcr_3", FUNC(tc0110pcr_device::word_r), FUNC(tc0110pcr_device::step1_word_w)); /* palette (3rd screen) */ + map(0x280000, 0x293fff).r(m_tc0100scn[0], FUNC(tc0100scn_device::word_r)).w(FUNC(ninjaw_state::tc0100scn_triple_screen_w)); /* tilemaps (1st screen/all screens) */ + map(0x2a0000, 0x2a000f).rw(m_tc0100scn[0], FUNC(tc0100scn_device::ctrl_word_r), FUNC(tc0100scn_device::ctrl_word_w)); + map(0x2c0000, 0x2d3fff).rw(m_tc0100scn[1], FUNC(tc0100scn_device::word_r), FUNC(tc0100scn_device::word_w)); /* tilemaps (2nd screen) */ + map(0x2e0000, 0x2e000f).rw(m_tc0100scn[1], FUNC(tc0100scn_device::ctrl_word_r), FUNC(tc0100scn_device::ctrl_word_w)); + map(0x300000, 0x313fff).rw(m_tc0100scn[2], FUNC(tc0100scn_device::word_r), FUNC(tc0100scn_device::word_w)); /* tilemaps (3rd screen) */ + map(0x320000, 0x32000f).rw(m_tc0100scn[2], FUNC(tc0100scn_device::ctrl_word_r), FUNC(tc0100scn_device::ctrl_word_w)); + map(0x340000, 0x340007).rw(m_tc0110pcr[0], FUNC(tc0110pcr_device::word_r), FUNC(tc0110pcr_device::step1_word_w)); /* palette (1st screen) */ + map(0x350000, 0x350007).rw(m_tc0110pcr[1], FUNC(tc0110pcr_device::word_r), FUNC(tc0110pcr_device::step1_word_w)); /* palette (2nd screen) */ + map(0x360000, 0x360007).rw(m_tc0110pcr[2], FUNC(tc0110pcr_device::word_r), FUNC(tc0110pcr_device::step1_word_w)); /* palette (3rd screen) */ } // NB there could be conflicts between which cpu writes what to the @@ -450,10 +450,10 @@ void ninjaw_state::ninjaw_slave_map(address_map &map) map(0x200000, 0x200003).rw("tc0040ioc", FUNC(tc0040ioc_device::read), FUNC(tc0040ioc_device::write)).umask16(0x00ff); map(0x240000, 0x24ffff).ram().share("share1"); map(0x260000, 0x263fff).ram().share("spriteram"); - map(0x280000, 0x293fff).r("tc0100scn_1", FUNC(tc0100scn_device::word_r)).w(FUNC(ninjaw_state::tc0100scn_triple_screen_w)); /* tilemaps (1st screen/all screens) */ - map(0x340000, 0x340007).rw("tc0110pcr_1", FUNC(tc0110pcr_device::word_r), FUNC(tc0110pcr_device::step1_word_w)); /* palette (1st screen) */ - map(0x350000, 0x350007).rw("tc0110pcr_2", FUNC(tc0110pcr_device::word_r), FUNC(tc0110pcr_device::step1_word_w)); /* palette (2nd screen) */ - map(0x360000, 0x360007).rw("tc0110pcr_3", FUNC(tc0110pcr_device::word_r), FUNC(tc0110pcr_device::step1_word_w)); /* palette (3rd screen) */ + map(0x280000, 0x293fff).r(m_tc0100scn[0], FUNC(tc0100scn_device::word_r)).w(FUNC(ninjaw_state::tc0100scn_triple_screen_w)); /* tilemaps (1st screen/all screens) */ + map(0x340000, 0x340007).rw(m_tc0110pcr[0], FUNC(tc0110pcr_device::word_r), FUNC(tc0110pcr_device::step1_word_w)); /* palette (1st screen) */ + map(0x350000, 0x350007).rw(m_tc0110pcr[1], FUNC(tc0110pcr_device::word_r), FUNC(tc0110pcr_device::step1_word_w)); /* palette (2nd screen) */ + map(0x360000, 0x360007).rw(m_tc0110pcr[2], FUNC(tc0110pcr_device::word_r), FUNC(tc0110pcr_device::step1_word_w)); /* palette (3rd screen) */ } void ninjaw_state::darius2_master_map(address_map &map) @@ -465,15 +465,15 @@ void ninjaw_state::darius2_master_map(address_map &map) map(0x220000, 0x220003).rw(FUNC(ninjaw_state::sound_r), FUNC(ninjaw_state::sound_w)); map(0x240000, 0x24ffff).ram().share("share1"); map(0x260000, 0x263fff).ram().share("spriteram"); - map(0x280000, 0x293fff).r("tc0100scn_1", FUNC(tc0100scn_device::word_r)).w(FUNC(ninjaw_state::tc0100scn_triple_screen_w)); /* tilemaps (1st screen/all screens) */ - map(0x2a0000, 0x2a000f).rw("tc0100scn_1", FUNC(tc0100scn_device::ctrl_word_r), FUNC(tc0100scn_device::ctrl_word_w)); - map(0x2c0000, 0x2d3fff).rw("tc0100scn_2", FUNC(tc0100scn_device::word_r), FUNC(tc0100scn_device::word_w)); /* tilemaps (2nd screen) */ - map(0x2e0000, 0x2e000f).rw("tc0100scn_2", FUNC(tc0100scn_device::ctrl_word_r), FUNC(tc0100scn_device::ctrl_word_w)); - map(0x300000, 0x313fff).rw("tc0100scn_3", FUNC(tc0100scn_device::word_r), FUNC(tc0100scn_device::word_w)); /* tilemaps (3rd screen) */ - map(0x320000, 0x32000f).rw("tc0100scn_3", FUNC(tc0100scn_device::ctrl_word_r), FUNC(tc0100scn_device::ctrl_word_w)); - map(0x340000, 0x340007).rw("tc0110pcr_1", FUNC(tc0110pcr_device::word_r), FUNC(tc0110pcr_device::step1_word_w)); /* palette (1st screen) */ - map(0x350000, 0x350007).rw("tc0110pcr_2", FUNC(tc0110pcr_device::word_r), FUNC(tc0110pcr_device::step1_word_w)); /* palette (2nd screen) */ - map(0x360000, 0x360007).rw("tc0110pcr_3", FUNC(tc0110pcr_device::word_r), FUNC(tc0110pcr_device::step1_word_w)); /* palette (3rd screen) */ + map(0x280000, 0x293fff).r(m_tc0100scn[0], FUNC(tc0100scn_device::word_r)).w(FUNC(ninjaw_state::tc0100scn_triple_screen_w)); /* tilemaps (1st screen/all screens) */ + map(0x2a0000, 0x2a000f).rw(m_tc0100scn[0], FUNC(tc0100scn_device::ctrl_word_r), FUNC(tc0100scn_device::ctrl_word_w)); + map(0x2c0000, 0x2d3fff).rw(m_tc0100scn[1], FUNC(tc0100scn_device::word_r), FUNC(tc0100scn_device::word_w)); /* tilemaps (2nd screen) */ + map(0x2e0000, 0x2e000f).rw(m_tc0100scn[1], FUNC(tc0100scn_device::ctrl_word_r), FUNC(tc0100scn_device::ctrl_word_w)); + map(0x300000, 0x313fff).rw(m_tc0100scn[2], FUNC(tc0100scn_device::word_r), FUNC(tc0100scn_device::word_w)); /* tilemaps (3rd screen) */ + map(0x320000, 0x32000f).rw(m_tc0100scn[2], FUNC(tc0100scn_device::ctrl_word_r), FUNC(tc0100scn_device::ctrl_word_w)); + map(0x340000, 0x340007).rw(m_tc0110pcr[0], FUNC(tc0110pcr_device::word_r), FUNC(tc0110pcr_device::step1_word_w)); /* palette (1st screen) */ + map(0x350000, 0x350007).rw(m_tc0110pcr[1], FUNC(tc0110pcr_device::word_r), FUNC(tc0110pcr_device::step1_word_w)); /* palette (2nd screen) */ + map(0x360000, 0x360007).rw(m_tc0110pcr[2], FUNC(tc0110pcr_device::word_r), FUNC(tc0110pcr_device::step1_word_w)); /* palette (3rd screen) */ } void ninjaw_state::darius2_slave_map(address_map &map) @@ -483,7 +483,7 @@ void ninjaw_state::darius2_slave_map(address_map &map) map(0x200000, 0x200003).rw("tc0040ioc", FUNC(tc0040ioc_device::read), FUNC(tc0040ioc_device::write)).umask16(0x00ff); map(0x240000, 0x24ffff).ram().share("share1"); map(0x260000, 0x263fff).ram().share("spriteram"); - map(0x280000, 0x293fff).r("tc0100scn_1", FUNC(tc0100scn_device::word_r)).w(FUNC(ninjaw_state::tc0100scn_triple_screen_w)); /* tilemaps (1st screen/all screens) */ + map(0x280000, 0x293fff).r(m_tc0100scn[0], FUNC(tc0100scn_device::word_r)).w(FUNC(ninjaw_state::tc0100scn_triple_screen_w)); /* tilemaps (1st screen/all screens) */ } @@ -793,38 +793,38 @@ MACHINE_CONFIG_START(ninjaw_state::ninjaw) MCFG_SCREEN_UPDATE_DRIVER(ninjaw_state, screen_update_right) MCFG_SCREEN_PALETTE("palette3") - MCFG_DEVICE_ADD("tc0100scn_1", TC0100SCN, 0) - MCFG_TC0100SCN_GFX_REGION(1) - MCFG_TC0100SCN_TX_REGION(3) - MCFG_TC0100SCN_OFFSETS(22, 0) - MCFG_TC0100SCN_MULTISCR_XOFFS(0) - MCFG_TC0100SCN_MULTISCR_HACK(0) - MCFG_TC0100SCN_GFXDECODE("gfxdecode") - MCFG_TC0100SCN_PALETTE("palette") - - MCFG_DEVICE_ADD("tc0110pcr_1", TC0110PCR, 0, "palette") - - MCFG_DEVICE_ADD("tc0100scn_2", TC0100SCN, 0) - MCFG_TC0100SCN_GFX_REGION(2) - MCFG_TC0100SCN_TX_REGION(3) - MCFG_TC0100SCN_OFFSETS(22, 0) - MCFG_TC0100SCN_MULTISCR_XOFFS(2) - MCFG_TC0100SCN_MULTISCR_HACK(1) - MCFG_TC0100SCN_GFXDECODE("gfxdecode") - MCFG_TC0100SCN_PALETTE("palette2") - - MCFG_DEVICE_ADD("tc0110pcr_2", TC0110PCR, 0, "palette2") - - MCFG_DEVICE_ADD("tc0100scn_3", TC0100SCN, 0) - MCFG_TC0100SCN_GFX_REGION(2) - MCFG_TC0100SCN_TX_REGION(3) - MCFG_TC0100SCN_OFFSETS(22, 0) - MCFG_TC0100SCN_MULTISCR_XOFFS(4) - MCFG_TC0100SCN_MULTISCR_HACK(1) - MCFG_TC0100SCN_GFXDECODE("gfxdecode") - MCFG_TC0100SCN_PALETTE("palette3") - - MCFG_DEVICE_ADD("tc0110pcr_3", TC0110PCR, 0, "palette3") + TC0100SCN(config, m_tc0100scn[0], 0); + m_tc0100scn[0]->set_gfx_region(1); + m_tc0100scn[0]->set_tx_region(3); + m_tc0100scn[0]->set_offsets(22, 0); + m_tc0100scn[0]->set_multiscr_xoffs(0); + m_tc0100scn[0]->set_multiscr_hack(0); + m_tc0100scn[0]->set_gfxdecode_tag(m_gfxdecode); + m_tc0100scn[0]->set_palette_tag(m_palette); + + TC0110PCR(config, m_tc0110pcr[0], 0, m_palette); + + TC0100SCN(config, m_tc0100scn[1], 0); + m_tc0100scn[1]->set_gfx_region(2); + m_tc0100scn[1]->set_tx_region(3); + m_tc0100scn[1]->set_offsets(22, 0); + m_tc0100scn[1]->set_multiscr_xoffs(2); + m_tc0100scn[1]->set_multiscr_hack(1); + m_tc0100scn[1]->set_gfxdecode_tag(m_gfxdecode); + m_tc0100scn[1]->set_palette_tag("palette2"); + + TC0110PCR(config, m_tc0110pcr[1], 0, "palette2"); + + TC0100SCN(config, m_tc0100scn[2], 0); + m_tc0100scn[2]->set_gfx_region(2); + m_tc0100scn[2]->set_tx_region(3); + m_tc0100scn[2]->set_offsets(22, 0); + m_tc0100scn[2]->set_multiscr_xoffs(4); + m_tc0100scn[2]->set_multiscr_hack(1); + m_tc0100scn[2]->set_gfxdecode_tag(m_gfxdecode); + m_tc0100scn[2]->set_palette_tag("palette3"); + + TC0110PCR(config, m_tc0110pcr[2], 0, "palette3"); /* sound hardware */ SPEAKER(config, "lspeaker").front_left(); @@ -909,38 +909,38 @@ MACHINE_CONFIG_START(ninjaw_state::darius2) MCFG_SCREEN_UPDATE_DRIVER(ninjaw_state, screen_update_right) MCFG_SCREEN_PALETTE("palette3") - MCFG_DEVICE_ADD("tc0100scn_1", TC0100SCN, 0) - MCFG_TC0100SCN_GFX_REGION(1) - MCFG_TC0100SCN_TX_REGION(3) - MCFG_TC0100SCN_OFFSETS(22, 0) - MCFG_TC0100SCN_MULTISCR_XOFFS(0) - MCFG_TC0100SCN_MULTISCR_HACK(0) - MCFG_TC0100SCN_GFXDECODE("gfxdecode") - MCFG_TC0100SCN_PALETTE("palette") - - MCFG_DEVICE_ADD("tc0110pcr_1", TC0110PCR, 0, "palette") - - MCFG_DEVICE_ADD("tc0100scn_2", TC0100SCN, 0) - MCFG_TC0100SCN_GFX_REGION(2) - MCFG_TC0100SCN_TX_REGION(3) - MCFG_TC0100SCN_OFFSETS(22, 0) - MCFG_TC0100SCN_MULTISCR_XOFFS(2) - MCFG_TC0100SCN_MULTISCR_HACK(1) - MCFG_TC0100SCN_GFXDECODE("gfxdecode") - MCFG_TC0100SCN_PALETTE("palette2") - - MCFG_DEVICE_ADD("tc0110pcr_2", TC0110PCR, 0, "palette2") - - MCFG_DEVICE_ADD("tc0100scn_3", TC0100SCN, 0) - MCFG_TC0100SCN_GFX_REGION(2) - MCFG_TC0100SCN_TX_REGION(3) - MCFG_TC0100SCN_OFFSETS(22, 0) - MCFG_TC0100SCN_MULTISCR_XOFFS(4) - MCFG_TC0100SCN_MULTISCR_HACK(1) - MCFG_TC0100SCN_GFXDECODE("gfxdecode") - MCFG_TC0100SCN_PALETTE("palette3") - - MCFG_DEVICE_ADD("tc0110pcr_3", TC0110PCR, 0, "palette3") + TC0100SCN(config, m_tc0100scn[0], 0); + m_tc0100scn[0]->set_gfx_region(1); + m_tc0100scn[0]->set_tx_region(3); + m_tc0100scn[0]->set_offsets(22, 0); + m_tc0100scn[0]->set_multiscr_xoffs(0); + m_tc0100scn[0]->set_multiscr_hack(0); + m_tc0100scn[0]->set_gfxdecode_tag(m_gfxdecode); + m_tc0100scn[0]->set_palette_tag(m_palette); + + TC0110PCR(config, m_tc0110pcr[0], 0, m_palette); + + TC0100SCN(config, m_tc0100scn[1], 0); + m_tc0100scn[1]->set_gfx_region(2); + m_tc0100scn[1]->set_tx_region(3); + m_tc0100scn[1]->set_offsets(22, 0); + m_tc0100scn[1]->set_multiscr_xoffs(2); + m_tc0100scn[1]->set_multiscr_hack(1); + m_tc0100scn[1]->set_gfxdecode_tag(m_gfxdecode); + m_tc0100scn[1]->set_palette_tag("palette2"); + + TC0110PCR(config, m_tc0110pcr[1], 0, "palette2"); + + TC0100SCN(config, m_tc0100scn[2], 0); + m_tc0100scn[2]->set_gfx_region(2); + m_tc0100scn[2]->set_tx_region(3); + m_tc0100scn[2]->set_offsets(22, 0); + m_tc0100scn[2]->set_multiscr_xoffs(4); + m_tc0100scn[2]->set_multiscr_hack(1); + m_tc0100scn[2]->set_gfxdecode_tag(m_gfxdecode); + m_tc0100scn[2]->set_palette_tag("palette3"); + + TC0110PCR(config, m_tc0110pcr[2], 0, "palette3"); /* sound hardware */ SPEAKER(config, "lspeaker").front_left(); diff --git a/src/mame/drivers/ojankohs.cpp b/src/mame/drivers/ojankohs.cpp index d9c84f428e3..391881bed32 100644 --- a/src/mame/drivers/ojankohs.cpp +++ b/src/mame/drivers/ojankohs.cpp @@ -735,7 +735,7 @@ MACHINE_CONFIG_START(ojankohs_state::ojankohs) MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_ojankohs) MCFG_PALETTE_ADD("palette", 1024) - MCFG_DEVICE_ADD("gga", VSYSTEM_GGA, XTAL(13'333'000)/2) // divider not verified + VSYSTEM_GGA(config, "gga", XTAL(13'333'000)/2); // divider not verified MCFG_VIDEO_START_OVERRIDE(ojankohs_state,ojankohs) @@ -816,7 +816,7 @@ MACHINE_CONFIG_START(ojankohs_state::ccasino) MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_ojankohs) MCFG_PALETTE_ADD("palette", 1024) - MCFG_DEVICE_ADD("gga", VSYSTEM_GGA, XTAL(13'333'000)/2) // divider not verified + VSYSTEM_GGA(config, "gga", XTAL(13'333'000)/2); // divider not verified MCFG_VIDEO_START_OVERRIDE(ojankohs_state,ccasino) diff --git a/src/mame/drivers/opwolf.cpp b/src/mame/drivers/opwolf.cpp index bf41d28caff..6166f0d908f 100644 --- a/src/mame/drivers/opwolf.cpp +++ b/src/mame/drivers/opwolf.cpp @@ -967,13 +967,13 @@ MACHINE_CONFIG_START(opwolf_state::opwolf) MCFG_PALETTE_ADD("palette", 2048) MCFG_PALETTE_FORMAT(xxxxRRRRGGGGBBBB) - MCFG_DEVICE_ADD("pc080sn", PC080SN, 0) - MCFG_PC080SN_GFX_REGION(1) - MCFG_PC080SN_GFXDECODE("gfxdecode") + PC080SN(config, m_pc080sn, 0); + m_pc080sn->set_gfx_region(1); + m_pc080sn->set_gfxdecode_tag("gfxdecode"); - MCFG_DEVICE_ADD("pc090oj", PC090OJ, 0) - MCFG_PC090OJ_GFXDECODE("gfxdecode") - MCFG_PC090OJ_PALETTE("palette") + PC090OJ(config, m_pc090oj, 0); + m_pc090oj->set_gfxdecode_tag("gfxdecode"); + m_pc090oj->set_palette_tag("palette"); /* sound hardware */ SPEAKER(config, "lspeaker").front_left(); @@ -1042,13 +1042,13 @@ MACHINE_CONFIG_START(opwolf_state::opwolfb) /* OSC clocks unknown for the bootle MCFG_PALETTE_ADD("palette", 2048) MCFG_PALETTE_FORMAT(xxxxRRRRGGGGBBBB) - MCFG_DEVICE_ADD("pc080sn", PC080SN, 0) - MCFG_PC080SN_GFX_REGION(1) - MCFG_PC080SN_GFXDECODE("gfxdecode") + PC080SN(config, m_pc080sn, 0); + m_pc080sn->set_gfx_region(1); + m_pc080sn->set_gfxdecode_tag("gfxdecode"); - MCFG_DEVICE_ADD("pc090oj", PC090OJ, 0) - MCFG_PC090OJ_GFXDECODE("gfxdecode") - MCFG_PC090OJ_PALETTE("palette") + PC090OJ(config, m_pc090oj, 0); + m_pc090oj->set_gfxdecode_tag("gfxdecode"); + m_pc090oj->set_palette_tag("palette"); /* sound hardware */ SPEAKER(config, "lspeaker").front_left(); diff --git a/src/mame/drivers/othunder.cpp b/src/mame/drivers/othunder.cpp index 4ea806dd725..056e33c039b 100644 --- a/src/mame/drivers/othunder.cpp +++ b/src/mame/drivers/othunder.cpp @@ -644,14 +644,14 @@ MACHINE_CONFIG_START(othunder_state::othunder) MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_othunder) MCFG_PALETTE_ADD("palette", 4096) - MCFG_DEVICE_ADD("tc0100scn", TC0100SCN, 0) - MCFG_TC0100SCN_GFX_REGION(1) - MCFG_TC0100SCN_TX_REGION(2) - MCFG_TC0100SCN_OFFSETS(4, 0) - MCFG_TC0100SCN_GFXDECODE("gfxdecode") - MCFG_TC0100SCN_PALETTE("palette") - - MCFG_DEVICE_ADD("tc0110pcr", TC0110PCR, 0, "palette") + TC0100SCN(config, m_tc0100scn, 0); + m_tc0100scn->set_gfx_region(1); + m_tc0100scn->set_tx_region(2); + m_tc0100scn->set_offsets(4, 0); + m_tc0100scn->set_gfxdecode_tag(m_gfxdecode); + m_tc0100scn->set_palette_tag(m_palette); + + TC0110PCR(config, m_tc0110pcr, 0, m_palette); /* sound hardware */ SPEAKER(config, "speaker").front_center(); diff --git a/src/mame/drivers/pipedrm.cpp b/src/mame/drivers/pipedrm.cpp index cf2e97504c3..ebdb8256bfb 100644 --- a/src/mame/drivers/pipedrm.cpp +++ b/src/mame/drivers/pipedrm.cpp @@ -607,15 +607,14 @@ MACHINE_CONFIG_START(pipedrm_state::pipedrm) MCFG_PALETTE_ADD("palette", 2048) MCFG_PALETTE_FORMAT(xRRRRRGGGGGBBBBB) - MCFG_DEVICE_ADD("gga", VSYSTEM_GGA, XTAL(14'318'181) / 2) // divider not verified + VSYSTEM_GGA(config, m_gga, XTAL(14'318'181) / 2); // divider not verified + m_gga->write_cb().set(FUNC(fromance_state::fromance_gga_data_w)); - MCFG_VSYSTEM_GGA_REGISTER_WRITE_CB(WRITE8(*this, fromance_state, fromance_gga_data_w)) - - MCFG_DEVICE_ADD("vsystem_spr_old", VSYSTEM_SPR2, 0) - MCFG_VSYSTEM_SPR2_SET_GFXREGION(2) - MCFG_VSYSTEM_SPR2_SET_OFFSETS(-13, -6) - MCFG_VSYSTEM_SPR2_SET_PRITYPE(3) - MCFG_VSYSTEM_SPR2_GFXDECODE("gfxdecode") + VSYSTEM_SPR2(config, m_spr_old, 0); + m_spr_old->set_gfx_region(2); + m_spr_old->set_offsets(-13, -6); + m_spr_old->set_pritype(3); + m_spr_old->set_gfxdecode_tag(m_gfxdecode); MCFG_VIDEO_START_OVERRIDE(pipedrm_state,pipedrm) @@ -662,9 +661,8 @@ MACHINE_CONFIG_START(pipedrm_state::hatris) MCFG_PALETTE_ADD("palette", 2048) MCFG_PALETTE_FORMAT(xRRRRRGGGGGBBBBB) - MCFG_DEVICE_ADD("gga", VSYSTEM_GGA, XTAL(14'318'181) / 2) // divider not verified - - MCFG_VSYSTEM_GGA_REGISTER_WRITE_CB(WRITE8(*this, fromance_state, fromance_gga_data_w)) + VSYSTEM_GGA(config, m_gga, XTAL(14'318'181) / 2); // divider not verified + m_gga->write_cb().set(FUNC(fromance_state::fromance_gga_data_w)); MCFG_VIDEO_START_OVERRIDE(pipedrm_state,hatris) diff --git a/src/mame/drivers/rastan.cpp b/src/mame/drivers/rastan.cpp index 1de15916f1b..79b5ecf7a6f 100644 --- a/src/mame/drivers/rastan.cpp +++ b/src/mame/drivers/rastan.cpp @@ -392,13 +392,13 @@ MACHINE_CONFIG_START(rastan_state::rastan) MCFG_PALETTE_ADD("palette", 2048) MCFG_PALETTE_FORMAT(xBBBBBGGGGGRRRRR) - MCFG_DEVICE_ADD("pc080sn", PC080SN, 0) - MCFG_PC080SN_GFXDECODE("gfxdecode") + PC080SN(config, m_pc080sn, 0); + m_pc080sn->set_gfxdecode_tag("gfxdecode"); - MCFG_DEVICE_ADD("pc090oj", PC090OJ, 0) - MCFG_PC090OJ_GFX_REGION(1) - MCFG_PC090OJ_GFXDECODE("gfxdecode") - MCFG_PC090OJ_PALETTE("palette") + PC090OJ(config, m_pc090oj, 0); + m_pc090oj->set_gfx_region(1); + m_pc090oj->set_gfxdecode_tag("gfxdecode"); + m_pc090oj->set_palette_tag("palette"); /* sound hardware */ SPEAKER(config, "mono").front_center(); diff --git a/src/mame/drivers/rbisland.cpp b/src/mame/drivers/rbisland.cpp index 554dcbbd983..8f457a9b1f9 100644 --- a/src/mame/drivers/rbisland.cpp +++ b/src/mame/drivers/rbisland.cpp @@ -687,13 +687,13 @@ MACHINE_CONFIG_START(rbisland_state::rbisland) MCFG_PALETTE_ADD("palette", 2048) MCFG_PALETTE_FORMAT(xBBBBBGGGGGRRRRR) - MCFG_DEVICE_ADD("pc080sn", PC080SN, 0) - MCFG_PC080SN_GFX_REGION(1) - MCFG_PC080SN_GFXDECODE("gfxdecode") + PC080SN(config, m_pc080sn, 0); + m_pc080sn->set_gfx_region(1); + m_pc080sn->set_gfxdecode_tag(m_gfxdecode); - MCFG_DEVICE_ADD("pc090oj", PC090OJ, 0) - MCFG_PC090OJ_GFXDECODE("gfxdecode") - MCFG_PC090OJ_PALETTE("palette") + PC090OJ(config, m_pc090oj, 0); + m_pc090oj->set_gfxdecode_tag(m_gfxdecode); + m_pc090oj->set_palette_tag(m_palette); /* sound hardware */ SPEAKER(config, "mono").front_center(); @@ -739,10 +739,10 @@ MACHINE_CONFIG_START(rbisland_state::jumping) MCFG_VIDEO_START_OVERRIDE(rbisland_state,jumping) - MCFG_DEVICE_ADD("pc080sn", PC080SN, 0) - MCFG_PC080SN_GFX_REGION(1) - MCFG_PC080SN_YINVERT(1) - MCFG_PC080SN_GFXDECODE("gfxdecode") + PC080SN(config, m_pc080sn, 0); + m_pc080sn->set_gfx_region(1); + m_pc080sn->set_yinvert(1); + m_pc080sn->set_gfxdecode_tag(m_gfxdecode); /* sound hardware */ SPEAKER(config, "mono").front_center(); diff --git a/src/mame/drivers/redclash.cpp b/src/mame/drivers/redclash.cpp index 30d3b0881fb..70433081ffc 100644 --- a/src/mame/drivers/redclash.cpp +++ b/src/mame/drivers/redclash.cpp @@ -366,7 +366,7 @@ MACHINE_CONFIG_START(redclash_state::zerohour) MCFG_PALETTE_INDIRECT_ENTRIES(32+32) MCFG_PALETTE_INIT_OWNER(redclash_state,redclash) - MCFG_DEVICE_ADD("stars", ZEROHOUR_STARS, 0) + ZEROHOUR_STARS(config, m_stars, 0); /* sound hardware */ MACHINE_CONFIG_END @@ -393,7 +393,7 @@ MACHINE_CONFIG_START(redclash_state::redclash) MCFG_PALETTE_INDIRECT_ENTRIES(32+32) MCFG_PALETTE_INIT_OWNER(redclash_state,redclash) - MCFG_DEVICE_ADD("stars", ZEROHOUR_STARS, 0) + ZEROHOUR_STARS(config, m_stars, 0); /* sound hardware */ MACHINE_CONFIG_END diff --git a/src/mame/drivers/rpunch.cpp b/src/mame/drivers/rpunch.cpp index 2273a1bbd5a..206453b8499 100644 --- a/src/mame/drivers/rpunch.cpp +++ b/src/mame/drivers/rpunch.cpp @@ -484,8 +484,8 @@ MACHINE_CONFIG_START(rpunch_state::rpunch) MCFG_PALETTE_ADD("palette", 1024) MCFG_PALETTE_FORMAT(xRRRRRGGGGGBBBBB) - MCFG_DEVICE_ADD("gga", VSYSTEM_GGA, VIDEO_CLOCK/2) // verified from rpunch schematics - MCFG_VSYSTEM_GGA_REGISTER_WRITE_CB(WRITE8(*this, rpunch_state, rpunch_gga_data_w)) + VSYSTEM_GGA(config, m_gga, VIDEO_CLOCK/2); // verified from rpunch schematics + m_gga->write_cb().set(FUNC(rpunch_state::rpunch_gga_data_w)); MCFG_VIDEO_START_OVERRIDE(rpunch_state,rpunch) @@ -535,8 +535,8 @@ MACHINE_CONFIG_START(rpunch_state::svolleybl) MCFG_PALETTE_ADD("palette", 1024) MCFG_PALETTE_FORMAT(xRRRRRGGGGGBBBBB) - MCFG_DEVICE_ADD("gga", VSYSTEM_GGA, VIDEO_CLOCK/2) - MCFG_VSYSTEM_GGA_REGISTER_WRITE_CB(WRITE8(*this, rpunch_state, rpunch_gga_data_w)) + VSYSTEM_GGA(config, m_gga, VIDEO_CLOCK/2); + m_gga->write_cb().set(FUNC(rpunch_state::rpunch_gga_data_w)); MCFG_VIDEO_START_OVERRIDE(rpunch_state,rpunch) diff --git a/src/mame/drivers/sandscrp.cpp b/src/mame/drivers/sandscrp.cpp index 9139d181a12..9152e610cfc 100644 --- a/src/mame/drivers/sandscrp.cpp +++ b/src/mame/drivers/sandscrp.cpp @@ -494,16 +494,16 @@ MACHINE_CONFIG_START(sandscrp_state::sandscrp) MCFG_PALETTE_ADD("palette", 2048) MCFG_PALETTE_FORMAT(xGGGGGRRRRRBBBBB) - MCFG_DEVICE_ADD("view2", KANEKO_TMAP, 0) - MCFG_KANEKO_TMAP_GFX_REGION(1) - MCFG_KANEKO_TMAP_OFFSET(0x5b, 0, 256, 224) - MCFG_KANEKO_TMAP_GFXDECODE("gfxdecode") + KANEKO_TMAP(config, m_view2); + m_view2->set_gfx_region(1); + m_view2->set_offset(0x5b, 0, 256, 224); + m_view2->set_gfxdecode_tag("gfxdecode"); MCFG_DEVICE_ADD("calc1_mcu", KANEKO_HIT, 0) MCFG_KANEKO_HIT_TYPE(0) - MCFG_DEVICE_ADD("pandora", KANEKO_PANDORA, 0) - MCFG_KANEKO_PANDORA_GFXDECODE("gfxdecode") + KANEKO_PANDORA(config, m_pandora, 0); + m_pandora->set_gfxdecode_tag("gfxdecode"); /* sound hardware */ SPEAKER(config, "mono").front_center(); diff --git a/src/mame/drivers/segahang.cpp b/src/mame/drivers/segahang.cpp index 310dad33756..e5c80008685 100644 --- a/src/mame/drivers/segahang.cpp +++ b/src/mame/drivers/segahang.cpp @@ -778,7 +778,7 @@ MACHINE_CONFIG_START(segahang_state::shared_base) m_i8255_2->out_pa_callback().set(FUNC(segahang_state::sub_control_adc_w)); m_i8255_2->in_pc_callback().set(FUNC(segahang_state::adc_status_r)); - MCFG_DEVICE_ADD("segaic16vid", SEGAIC16VID, 0, "gfxdecode") + SEGAIC16VID(config, m_segaic16vid, 0, "gfxdecode"); MCFG_DEVICE_ADD("segaic16road", SEGAIC16_ROAD, 0) // video hardware @@ -794,11 +794,12 @@ MACHINE_CONFIG_START(segahang_state::shared_base) MACHINE_CONFIG_END -MACHINE_CONFIG_START(segahang_state::hangon_base) +void segahang_state::hangon_base(machine_config &config) +{ shared_base(config); // video hardware - MCFG_DEVICE_ADD("sprites", SEGA_HANGON_SPRITES, 0) -MACHINE_CONFIG_END + SEGA_HANGON_SPRITES(config, m_sprites, 0); +} MACHINE_CONFIG_START(segahang_state::sharrier_base) @@ -813,7 +814,7 @@ MACHINE_CONFIG_START(segahang_state::sharrier_base) MCFG_DEVICE_CLOCK(MASTER_CLOCK_10MHz) // video hardware - MCFG_DEVICE_ADD("sprites", SEGA_SHARRIER_SPRITES, 0) + SEGA_SHARRIER_SPRITES(config, m_sprites, 0); MACHINE_CONFIG_END diff --git a/src/mame/drivers/segaorun.cpp b/src/mame/drivers/segaorun.cpp index 0dcb52288e1..ebd5612ff92 100644 --- a/src/mame/drivers/segaorun.cpp +++ b/src/mame/drivers/segaorun.cpp @@ -1183,7 +1183,7 @@ MACHINE_CONFIG_START(segaorun_state::outrun_base) MCFG_SCREEN_UPDATE_DRIVER(segaorun_state, screen_update_outrun) MCFG_SCREEN_PALETTE("palette") - MCFG_DEVICE_ADD("segaic16vid", SEGAIC16VID, 0, "gfxdecode") + SEGAIC16VID(config, m_segaic16vid, 0, "gfxdecode"); MCFG_DEVICE_ADD("segaic16road", SEGAIC16_ROAD, 0) // sound hardware @@ -1211,7 +1211,7 @@ MACHINE_CONFIG_START(segaorun_state::outrundx) MCFG_TIMER_DRIVER_ADD_PERIODIC("bankmotor", segaorun_state, bankmotor_update, attotime::from_msec(10)) // video hardware - MCFG_DEVICE_ADD("sprites", SEGA_OUTRUN_SPRITES, 0) + SEGA_OUTRUN_SPRITES(config, m_sprites, 0); MACHINE_CONFIG_END void segaorun_state::outrun(machine_config &config) @@ -1257,7 +1257,7 @@ MACHINE_CONFIG_START(segaorun_state::shangon) MCFG_SCREEN_RAW_PARAMS(MASTER_CLOCK_25MHz/4, 400, 0, 320, 262, 0, 224) MCFG_SCREEN_UPDATE_DRIVER(segaorun_state, screen_update_shangon) - MCFG_DEVICE_ADD("sprites", SEGA_SYS16B_SPRITES, 0) + SEGA_SYS16B_SPRITES(config, m_sprites, 0); MACHINE_CONFIG_END MACHINE_CONFIG_START(segaorun_state::shangon_fd1089b) diff --git a/src/mame/drivers/segas16a.cpp b/src/mame/drivers/segas16a.cpp index a2b08f60039..25a73ebf3fb 100644 --- a/src/mame/drivers/segas16a.cpp +++ b/src/mame/drivers/segas16a.cpp @@ -2005,8 +2005,8 @@ MACHINE_CONFIG_START(segas16a_state::system16a) MCFG_SCREEN_UPDATE_DRIVER(segas16a_state, screen_update) MCFG_SCREEN_PALETTE("palette") - MCFG_DEVICE_ADD("sprites", SEGA_SYS16A_SPRITES, 0) - MCFG_DEVICE_ADD("segaic16vid", SEGAIC16VID, 0, "gfxdecode") + SEGA_SYS16A_SPRITES(config, m_sprites, 0); + SEGAIC16VID(config, m_segaic16vid, 0, "gfxdecode"); MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_segas16a) MCFG_PALETTE_ADD("palette", 2048*3) diff --git a/src/mame/drivers/segas16b.cpp b/src/mame/drivers/segas16b.cpp index 2b1113f03f5..e7f3e4069ae 100644 --- a/src/mame/drivers/segas16b.cpp +++ b/src/mame/drivers/segas16b.cpp @@ -3738,8 +3738,8 @@ MACHINE_CONFIG_START(segas16b_state::system16b) MCFG_SCREEN_UPDATE_DRIVER(segas16b_state, screen_update) MCFG_SCREEN_PALETTE("palette") - MCFG_DEVICE_ADD("sprites", SEGA_SYS16B_SPRITES, 0) - MCFG_DEVICE_ADD("segaic16vid", SEGAIC16VID, 0, "gfxdecode") + SEGA_SYS16B_SPRITES(config, m_sprites, 0); + SEGAIC16VID(config, m_segaic16vid, 0, m_gfxdecode); // sound hardware SPEAKER(config, "mono").front_center(); @@ -3893,12 +3893,11 @@ MACHINE_CONFIG_START(segas16b_state::fpointbl) GENERIC_LATCH_8(config, m_soundlatch); m_soundlatch->data_pending_callback().set_inputline(m_soundcpu, 0); - MCFG_DEVICE_ADD("sprites", SEGA_SYS16B_SPRITES, 0) - MCFG_BOOTLEG_SYS16B_SPRITES_XORIGIN(75) // these align the pieces with the playfield - MCFG_BOOTLEG_SYS16B_SPRITES_YORIGIN(-2) // some other gfx don't have identical alignment to original tho (flickey character over 'good luck') + SEGA_SYS16B_SPRITES(config, m_sprites, 0); + m_sprites->set_local_originx(75); // these align the pieces with the playfield + m_sprites->set_local_originy(-2); // some other gfx don't have identical alignment to original tho (flickey character over 'good luck') - MCFG_DEVICE_MODIFY("segaic16vid") - MCFG_SEGAIC16_VIDEO_SET_PAGELATCH_CB(segas16b_state, tilemap_16b_fpointbl_fill_latch) + m_segaic16vid->set_pagelatch_cb(FUNC(segas16b_state::tilemap_16b_fpointbl_fill_latch), this); MACHINE_CONFIG_END @@ -3911,8 +3910,7 @@ MACHINE_CONFIG_START(segas16b_state::fpointbla) MCFG_DEVICE_MODIFY("soundcpu") MCFG_DEVICE_PROGRAM_MAP(bootleg_sound_map) - MCFG_DEVICE_MODIFY("sprites") - MCFG_BOOTLEG_SYS16B_SPRITES_XORIGIN(60) // these align the pieces with the playfield + m_sprites->set_local_originx(60); // these align the pieces with the playfield MACHINE_CONFIG_END MACHINE_CONFIG_START(segas16b_state::lockonph) @@ -3938,8 +3936,8 @@ MACHINE_CONFIG_START(segas16b_state::lockonph) MCFG_SCREEN_UPDATE_DRIVER(segas16b_state, screen_update) MCFG_SCREEN_PALETTE("palette") - MCFG_DEVICE_ADD("sprites", SEGA_SYS16B_SPRITES, 0) - MCFG_DEVICE_ADD("segaic16vid", SEGAIC16VID, 0, "gfxdecode") + SEGA_SYS16B_SPRITES(config, m_sprites, 0); + SEGAIC16VID(config, m_segaic16vid, 0, m_gfxdecode); // sound hardware SPEAKER(config, "mono").front_center(); diff --git a/src/mame/drivers/segas18.cpp b/src/mame/drivers/segas18.cpp index aaf363de565..5daf9d2d9ed 100644 --- a/src/mame/drivers/segas18.cpp +++ b/src/mame/drivers/segas18.cpp @@ -1360,8 +1360,8 @@ MACHINE_CONFIG_START(segas18_state::system18) MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_segas18) MCFG_PALETTE_ADD("palette", 2048*3+2048 + 64*3) - MCFG_DEVICE_ADD("sprites", SEGA_SYS16B_SPRITES, 0) - MCFG_DEVICE_ADD("segaic16vid", SEGAIC16VID, 0, "gfxdecode") + SEGA_SYS16B_SPRITES(config, m_sprites, 0); + SEGAIC16VID(config, m_segaic16vid, 0, m_gfxdecode); // sound hardware SPEAKER(config, "mono").front_center(); diff --git a/src/mame/drivers/segaxbd.cpp b/src/mame/drivers/segaxbd.cpp index 1d2f4d6aa63..0bcaa287b21 100644 --- a/src/mame/drivers/segaxbd.cpp +++ b/src/mame/drivers/segaxbd.cpp @@ -1723,9 +1723,9 @@ MACHINE_CONFIG_START(segaxbd_state::xboard_base_mconfig ) MCFG_SCREEN_UPDATE_DRIVER(segaxbd_state, screen_update) MCFG_SCREEN_PALETTE("palette") - MCFG_DEVICE_ADD("sprites", SEGA_XBOARD_SPRITES, 0) - MCFG_DEVICE_ADD("segaic16vid", SEGAIC16VID, 0, "gfxdecode") - MCFG_VIDEO_SET_SCREEN("screen") + SEGA_XBOARD_SPRITES(config, m_sprites, 0); + SEGAIC16VID(config, m_segaic16vid, 0, "gfxdecode"); + m_segaic16vid->set_screen(m_screen); MCFG_DEVICE_ADD("segaic16road", SEGAIC16_ROAD, 0) diff --git a/src/mame/drivers/segaybd.cpp b/src/mame/drivers/segaybd.cpp index 83873f7d587..dcc68aa8236 100644 --- a/src/mame/drivers/segaybd.cpp +++ b/src/mame/drivers/segaybd.cpp @@ -1326,9 +1326,9 @@ MACHINE_CONFIG_START(segaybd_state::yboard) MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfxdecode_device::empty) - MCFG_DEVICE_ADD("bsprites", SEGA_SYS16B_SPRITES, 0) - MCFG_DEVICE_ADD("ysprites", SEGA_YBOARD_SPRITES, 0) - MCFG_DEVICE_ADD("segaic16vid", SEGAIC16VID, 0, "gfxdecode") + SEGA_SYS16B_SPRITES(config, m_bsprites, 0); + SEGA_YBOARD_SPRITES(config, m_ysprites, 0); + SEGAIC16VID(config, m_segaic16vid, 0, "gfxdecode"); MCFG_PALETTE_ADD("palette", 8192*3) diff --git a/src/mame/drivers/seta.cpp b/src/mame/drivers/seta.cpp index b4dba0a304d..7baae74fc45 100644 --- a/src/mame/drivers/seta.cpp +++ b/src/mame/drivers/seta.cpp @@ -7860,9 +7860,9 @@ MACHINE_CONFIG_START(seta_state::tndrcade) MCFG_DEVICE_PROGRAM_MAP(tndrcade_sub_map) MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", seta_state, tndrcade_sub_interrupt, "screen", 0, 1) - MCFG_DEVICE_ADD("spritegen", SETA001_SPRITE, 0) - MCFG_SETA001_SPRITE_GFXDECODE("gfxdecode") - MCFG_SETA001_SPRITE_GFXBANK_CB(seta_state, setac_gfxbank_callback) + SETA001_SPRITE(config, m_seta001, 0); + m_seta001->set_gfxdecode_tag(m_gfxdecode); + m_seta001->set_gfxbank_callback(FUNC(seta_state::setac_gfxbank_callback), this); /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) @@ -7915,9 +7915,9 @@ MACHINE_CONFIG_START(seta_state::twineagl) MCFG_DEVICE_PROGRAM_MAP(twineagl_sub_map) MCFG_TIMER_DRIVER_ADD_SCANLINE("s_scantimer", seta_state, seta_sub_interrupt, "screen", 0, 1) - MCFG_DEVICE_ADD("spritegen", SETA001_SPRITE, 0) - MCFG_SETA001_SPRITE_GFXDECODE("gfxdecode") - MCFG_SETA001_SPRITE_GFXBANK_CB(seta_state, setac_gfxbank_callback) + SETA001_SPRITE(config, m_seta001, 0); + m_seta001->set_gfxdecode_tag(m_gfxdecode); + m_seta001->set_gfxbank_callback(FUNC(seta_state::setac_gfxbank_callback), this); /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) @@ -7961,9 +7961,9 @@ MACHINE_CONFIG_START(seta_state::downtown) MCFG_DEVICE_PROGRAM_MAP(downtown_sub_map) MCFG_TIMER_DRIVER_ADD_SCANLINE("s_scantimer", seta_state, seta_sub_interrupt, "screen", 0, 1) - MCFG_DEVICE_ADD("spritegen", SETA001_SPRITE, 0) - MCFG_SETA001_SPRITE_GFXDECODE("gfxdecode") - MCFG_SETA001_SPRITE_GFXBANK_CB(seta_state, setac_gfxbank_callback) + SETA001_SPRITE(config, m_seta001, 0); + m_seta001->set_gfxdecode_tag(m_gfxdecode); + m_seta001->set_gfxbank_callback(FUNC(seta_state::setac_gfxbank_callback), this); /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) @@ -8043,9 +8043,9 @@ MACHINE_CONFIG_START(seta_state::usclssic) MCFG_MACHINE_START_OVERRIDE(seta_state,usclssic) MCFG_MACHINE_RESET_OVERRIDE(seta_state,calibr50) - MCFG_DEVICE_ADD("spritegen", SETA001_SPRITE, 0) - MCFG_SETA001_SPRITE_GFXDECODE("gfxdecode") - MCFG_SETA001_SPRITE_GFXBANK_CB(seta_state, setac_gfxbank_callback) + SETA001_SPRITE(config, m_seta001, 0); + m_seta001->set_gfxdecode_tag(m_gfxdecode); + m_seta001->set_gfxbank_callback(FUNC(seta_state::setac_gfxbank_callback), this); /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) @@ -8106,9 +8106,9 @@ MACHINE_CONFIG_START(seta_state::calibr50) MCFG_MACHINE_RESET_OVERRIDE(seta_state,calibr50) - MCFG_DEVICE_ADD("spritegen", SETA001_SPRITE, 0) - MCFG_SETA001_SPRITE_GFXDECODE("gfxdecode") - MCFG_SETA001_SPRITE_GFXBANK_CB(seta_state, setac_gfxbank_callback) + SETA001_SPRITE(config, m_seta001, 0); + m_seta001->set_gfxdecode_tag(m_gfxdecode); + m_seta001->set_gfxbank_callback(FUNC(seta_state::setac_gfxbank_callback), this); /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) @@ -8155,9 +8155,9 @@ MACHINE_CONFIG_START(seta_state::metafox) MCFG_DEVICE_PROGRAM_MAP(metafox_sub_map) MCFG_TIMER_DRIVER_ADD_SCANLINE("s_scantimer", seta_state, seta_sub_interrupt, "screen", 0, 1) - MCFG_DEVICE_ADD("spritegen", SETA001_SPRITE, 0) - MCFG_SETA001_SPRITE_GFXDECODE("gfxdecode") - MCFG_SETA001_SPRITE_GFXBANK_CB(seta_state, setac_gfxbank_callback) + SETA001_SPRITE(config, m_seta001, 0); + m_seta001->set_gfxdecode_tag(m_gfxdecode); + m_seta001->set_gfxbank_callback(FUNC(seta_state::setac_gfxbank_callback), this); /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) @@ -8195,9 +8195,9 @@ MACHINE_CONFIG_START(seta_state::atehate) MCFG_DEVICE_PROGRAM_MAP(atehate_map) MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", seta_state, seta_interrupt_1_and_2, "screen", 0, 1) - MCFG_DEVICE_ADD("spritegen", SETA001_SPRITE, 0) - MCFG_SETA001_SPRITE_GFXDECODE("gfxdecode") - MCFG_SETA001_SPRITE_GFXBANK_CB(seta_state, setac_gfxbank_callback) + SETA001_SPRITE(config, m_seta001, 0); + m_seta001->set_gfxdecode_tag(m_gfxdecode); + m_seta001->set_gfxbank_callback(FUNC(seta_state::setac_gfxbank_callback), this); /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) @@ -8238,9 +8238,9 @@ MACHINE_CONFIG_START(seta_state::blandia) MCFG_DEVICE_PROGRAM_MAP(blandia_map) MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", seta_state, seta_interrupt_2_and_4, "screen", 0, 1) - MCFG_DEVICE_ADD("spritegen", SETA001_SPRITE, 0) - MCFG_SETA001_SPRITE_GFXDECODE("gfxdecode") - MCFG_SETA001_SPRITE_GFXBANK_CB(seta_state, setac_gfxbank_callback) + SETA001_SPRITE(config, m_seta001, 0); + m_seta001->set_gfxdecode_tag(m_gfxdecode); + m_seta001->set_gfxbank_callback(FUNC(seta_state::setac_gfxbank_callback), this); /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) @@ -8276,9 +8276,9 @@ MACHINE_CONFIG_START(seta_state::blandiap) MCFG_DEVICE_PROGRAM_MAP(blandiap_map) MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", seta_state, seta_interrupt_2_and_4, "screen", 0, 1) - MCFG_DEVICE_ADD("spritegen", SETA001_SPRITE, 0) - MCFG_SETA001_SPRITE_GFXDECODE("gfxdecode") - MCFG_SETA001_SPRITE_GFXBANK_CB(seta_state, setac_gfxbank_callback) + SETA001_SPRITE(config, m_seta001, 0); + m_seta001->set_gfxdecode_tag(m_gfxdecode); + m_seta001->set_gfxbank_callback(FUNC(seta_state::setac_gfxbank_callback), this); /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) @@ -8319,9 +8319,9 @@ MACHINE_CONFIG_START(seta_state::blockcar) MCFG_DEVICE_PROGRAM_MAP(blockcar_map) MCFG_DEVICE_VBLANK_INT_DRIVER("screen", seta_state, irq3_line_hold) - MCFG_DEVICE_ADD("spritegen", SETA001_SPRITE, 0) - MCFG_SETA001_SPRITE_GFXDECODE("gfxdecode") - MCFG_SETA001_SPRITE_GFXBANK_CB(seta_state, setac_gfxbank_callback) + SETA001_SPRITE(config, m_seta001, 0); + m_seta001->set_gfxdecode_tag(m_gfxdecode); + m_seta001->set_gfxbank_callback(FUNC(seta_state::setac_gfxbank_callback), this); /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) @@ -8393,9 +8393,9 @@ MACHINE_CONFIG_START(seta_state::daioh) MCFG_DEVICE_PROGRAM_MAP(daioh_map) MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", seta_state, seta_interrupt_1_and_2, "screen", 0, 1) - MCFG_DEVICE_ADD("spritegen", SETA001_SPRITE, 0) - MCFG_SETA001_SPRITE_GFXDECODE("gfxdecode") - MCFG_SETA001_SPRITE_GFXBANK_CB(seta_state, setac_gfxbank_callback) + SETA001_SPRITE(config, m_seta001, 0); + m_seta001->set_gfxdecode_tag(m_gfxdecode); + m_seta001->set_gfxbank_callback(FUNC(seta_state::setac_gfxbank_callback), this); /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) @@ -8430,9 +8430,9 @@ MACHINE_CONFIG_START(seta_state::daiohp) MCFG_DEVICE_PROGRAM_MAP(daiohp_map) MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", seta_state, seta_interrupt_1_and_2, "screen", 0, 1) - MCFG_DEVICE_ADD("spritegen", SETA001_SPRITE, 0) - MCFG_SETA001_SPRITE_GFXDECODE("gfxdecode") - MCFG_SETA001_SPRITE_GFXBANK_CB(seta_state, setac_gfxbank_callback) + SETA001_SPRITE(config, m_seta001, 0); + m_seta001->set_gfxdecode_tag(m_gfxdecode); + m_seta001->set_gfxbank_callback(FUNC(seta_state::setac_gfxbank_callback), this); /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) @@ -8472,9 +8472,9 @@ MACHINE_CONFIG_START(seta_state::drgnunit) MCFG_DEVICE_PROGRAM_MAP(drgnunit_map) MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", seta_state, seta_interrupt_1_and_2, "screen", 0, 1) - MCFG_DEVICE_ADD("spritegen", SETA001_SPRITE, 0) - MCFG_SETA001_SPRITE_GFXDECODE("gfxdecode") - MCFG_SETA001_SPRITE_GFXBANK_CB(seta_state, setac_gfxbank_callback) + SETA001_SPRITE(config, m_seta001, 0); + m_seta001->set_gfxdecode_tag(m_gfxdecode); + m_seta001->set_gfxbank_callback(FUNC(seta_state::setac_gfxbank_callback), this); /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) @@ -8508,9 +8508,9 @@ MACHINE_CONFIG_START(seta_state::qzkklgy2) MCFG_DEVICE_PROGRAM_MAP(drgnunit_map) MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", seta_state, seta_interrupt_1_and_2, "screen", 0, 1) - MCFG_DEVICE_ADD("spritegen", SETA001_SPRITE, 0) - MCFG_SETA001_SPRITE_GFXDECODE("gfxdecode") - MCFG_SETA001_SPRITE_GFXBANK_CB(seta_state, setac_gfxbank_callback) + SETA001_SPRITE(config, m_seta001, 0); + m_seta001->set_gfxdecode_tag(m_gfxdecode); + m_seta001->set_gfxbank_callback(FUNC(seta_state::setac_gfxbank_callback), this); /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) @@ -8564,9 +8564,9 @@ MACHINE_CONFIG_START(setaroul_state::setaroul) MCFG_MACHINE_START_OVERRIDE(setaroul_state, setaroul) MCFG_MACHINE_RESET_OVERRIDE(setaroul_state, setaroul) - MCFG_DEVICE_ADD("spritegen", SETA001_SPRITE, 0) - MCFG_SETA001_SPRITE_GFXDECODE("gfxdecode") - MCFG_SETA001_SPRITE_GFXBANK_CB(seta_state, setac_gfxbank_callback) + SETA001_SPRITE(config, m_seta001, 0); + m_seta001->set_gfxdecode_tag(m_gfxdecode); + m_seta001->set_gfxbank_callback(FUNC(seta_state::setac_gfxbank_callback), this); NVRAM(config, "nvram", nvram_device::DEFAULT_RANDOM); @@ -8616,9 +8616,9 @@ MACHINE_CONFIG_START(seta_state::eightfrc) MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", seta_state, seta_interrupt_1_and_2, "screen", 0, 1) WATCHDOG_TIMER(config, "watchdog"); - MCFG_DEVICE_ADD("spritegen", SETA001_SPRITE, 0) - MCFG_SETA001_SPRITE_GFXDECODE("gfxdecode") - MCFG_SETA001_SPRITE_GFXBANK_CB(seta_state, setac_gfxbank_callback) + SETA001_SPRITE(config, m_seta001, 0); + m_seta001->set_gfxdecode_tag(m_gfxdecode); + m_seta001->set_gfxbank_callback(FUNC(seta_state::setac_gfxbank_callback), this); /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) @@ -8660,9 +8660,9 @@ MACHINE_CONFIG_START(seta_state::extdwnhl) MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", seta_state, seta_interrupt_1_and_2, "screen", 0, 1) WATCHDOG_TIMER(config, "watchdog"); - MCFG_DEVICE_ADD("spritegen", SETA001_SPRITE, 0) - MCFG_SETA001_SPRITE_GFXDECODE("gfxdecode") - MCFG_SETA001_SPRITE_GFXBANK_CB(seta_state, setac_gfxbank_callback) + SETA001_SPRITE(config, m_seta001, 0); + m_seta001->set_gfxdecode_tag(m_gfxdecode); + m_seta001->set_gfxbank_callback(FUNC(seta_state::setac_gfxbank_callback), this); /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) @@ -8728,9 +8728,9 @@ MACHINE_CONFIG_START(seta_state::gundhara) MCFG_MACHINE_START_OVERRIDE(seta_state, wrofaero ) #endif // USE_uPD71054_TIMER - MCFG_DEVICE_ADD("spritegen", SETA001_SPRITE, 0) - MCFG_SETA001_SPRITE_GFXDECODE("gfxdecode") - MCFG_SETA001_SPRITE_GFXBANK_CB(seta_state, setac_gfxbank_callback) + SETA001_SPRITE(config, m_seta001, 0); + m_seta001->set_gfxdecode_tag(m_gfxdecode); + m_seta001->set_gfxbank_callback(FUNC(seta_state::setac_gfxbank_callback), this); /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) @@ -8796,9 +8796,9 @@ MACHINE_CONFIG_START(seta_state::jjsquawk) MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", seta_state, seta_interrupt_1_and_2, "screen", 0, 1) WATCHDOG_TIMER(config, "watchdog"); - MCFG_DEVICE_ADD("spritegen", SETA001_SPRITE, 0) - MCFG_SETA001_SPRITE_GFXDECODE("gfxdecode") - MCFG_SETA001_SPRITE_GFXBANK_CB(seta_state, setac_gfxbank_callback) + SETA001_SPRITE(config, m_seta001, 0); + m_seta001->set_gfxdecode_tag(m_gfxdecode); + m_seta001->set_gfxbank_callback(FUNC(seta_state::setac_gfxbank_callback), this); /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) @@ -8831,9 +8831,9 @@ MACHINE_CONFIG_START(seta_state::jjsquawb) MCFG_DEVICE_PROGRAM_MAP(jjsquawb_map) MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", seta_state, seta_interrupt_1_and_2, "screen", 0, 1) - MCFG_DEVICE_ADD("spritegen", SETA001_SPRITE, 0) - MCFG_SETA001_SPRITE_GFXDECODE("gfxdecode") - MCFG_SETA001_SPRITE_GFXBANK_CB(seta_state, setac_gfxbank_callback) + SETA001_SPRITE(config, m_seta001, 0); + m_seta001->set_gfxdecode_tag(m_gfxdecode); + m_seta001->set_gfxbank_callback(FUNC(seta_state::setac_gfxbank_callback), this); /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) @@ -8876,9 +8876,9 @@ MACHINE_CONFIG_START(seta_state::kamenrid) pit.set_clk<0>(16000000/2/8); pit.out_handler<0>().set(FUNC(seta_state::pit_out0)); - MCFG_DEVICE_ADD("spritegen", SETA001_SPRITE, 0) - MCFG_SETA001_SPRITE_GFXDECODE("gfxdecode") - MCFG_SETA001_SPRITE_GFXBANK_CB(seta_state, setac_gfxbank_callback) + SETA001_SPRITE(config, m_seta001, 0); + m_seta001->set_gfxdecode_tag(m_gfxdecode); + m_seta001->set_gfxbank_callback(FUNC(seta_state::setac_gfxbank_callback), this); /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) @@ -8914,9 +8914,9 @@ MACHINE_CONFIG_START(seta_state::orbs) MCFG_DEVICE_PROGRAM_MAP(orbs_map) MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", seta_state, seta_interrupt_1_and_2, "screen", 0, 1) - MCFG_DEVICE_ADD("spritegen", SETA001_SPRITE, 0) - MCFG_SETA001_SPRITE_GFXDECODE("gfxdecode") - MCFG_SETA001_SPRITE_GFXBANK_CB(seta_state, setac_gfxbank_callback) + SETA001_SPRITE(config, m_seta001, 0); + m_seta001->set_gfxdecode_tag(m_gfxdecode); + m_seta001->set_gfxbank_callback(FUNC(seta_state::setac_gfxbank_callback), this); /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) @@ -8957,9 +8957,9 @@ MACHINE_CONFIG_START(seta_state::keroppij) MCFG_MACHINE_START_OVERRIDE(seta_state,keroppi) - MCFG_DEVICE_ADD("spritegen", SETA001_SPRITE, 0) - MCFG_SETA001_SPRITE_GFXDECODE("gfxdecode") - MCFG_SETA001_SPRITE_GFXBANK_CB(seta_state, setac_gfxbank_callback) + SETA001_SPRITE(config, m_seta001, 0); + m_seta001->set_gfxdecode_tag(m_gfxdecode); + m_seta001->set_gfxbank_callback(FUNC(seta_state::setac_gfxbank_callback), this); /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) @@ -9008,9 +9008,9 @@ MACHINE_CONFIG_START(seta_state::krzybowl) upd2.set_portx_tag("TRACK2_X"); upd2.set_porty_tag("TRACK2_Y"); - MCFG_DEVICE_ADD("spritegen", SETA001_SPRITE, 0) - MCFG_SETA001_SPRITE_GFXDECODE("gfxdecode") - MCFG_SETA001_SPRITE_GFXBANK_CB(seta_state, setac_gfxbank_callback) + SETA001_SPRITE(config, m_seta001, 0); + m_seta001->set_gfxdecode_tag(m_gfxdecode); + m_seta001->set_gfxbank_callback(FUNC(seta_state::setac_gfxbank_callback), this); /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) @@ -9050,9 +9050,9 @@ MACHINE_CONFIG_START(seta_state::madshark) pit.set_clk<0>(16000000/2/8); pit.out_handler<0>().set(FUNC(seta_state::pit_out0)); - MCFG_DEVICE_ADD("spritegen", SETA001_SPRITE, 0) - MCFG_SETA001_SPRITE_GFXDECODE("gfxdecode") - MCFG_SETA001_SPRITE_GFXBANK_CB(seta_state, setac_gfxbank_callback) + SETA001_SPRITE(config, m_seta001, 0); + m_seta001->set_gfxdecode_tag(m_gfxdecode); + m_seta001->set_gfxbank_callback(FUNC(seta_state::setac_gfxbank_callback), this); WATCHDOG_TIMER(config, "watchdog"); @@ -9102,9 +9102,9 @@ MACHINE_CONFIG_START(seta_state::magspeed) pit.set_clk<0>(16000000/2/8); pit.out_handler<0>().set(FUNC(seta_state::pit_out0)); - MCFG_DEVICE_ADD("spritegen", SETA001_SPRITE, 0) - MCFG_SETA001_SPRITE_GFXDECODE("gfxdecode") - MCFG_SETA001_SPRITE_GFXBANK_CB(seta_state, setac_gfxbank_callback) + SETA001_SPRITE(config, m_seta001, 0); + m_seta001->set_gfxdecode_tag(m_gfxdecode); + m_seta001->set_gfxbank_callback(FUNC(seta_state::setac_gfxbank_callback), this); /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) @@ -9145,9 +9145,9 @@ MACHINE_CONFIG_START(seta_state::msgundam) pit.set_clk<0>(16000000/2/8); pit.out_handler<0>().set(FUNC(seta_state::pit_out0)); - MCFG_DEVICE_ADD("spritegen", SETA001_SPRITE, 0) - MCFG_SETA001_SPRITE_GFXDECODE("gfxdecode") - MCFG_SETA001_SPRITE_GFXBANK_CB(seta_state, setac_gfxbank_callback) + SETA001_SPRITE(config, m_seta001, 0); + m_seta001->set_gfxdecode_tag(m_gfxdecode); + m_seta001->set_gfxbank_callback(FUNC(seta_state::setac_gfxbank_callback), this); /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) @@ -9184,9 +9184,9 @@ MACHINE_CONFIG_START(seta_state::oisipuzl) MCFG_DEVICE_PROGRAM_MAP(oisipuzl_map) MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", seta_state, seta_interrupt_1_and_2, "screen", 0, 1) - MCFG_DEVICE_ADD("spritegen", SETA001_SPRITE, 0) - MCFG_SETA001_SPRITE_GFXDECODE("gfxdecode") - MCFG_SETA001_SPRITE_GFXBANK_CB(seta_state, setac_gfxbank_callback) + SETA001_SPRITE(config, m_seta001, 0); + m_seta001->set_gfxdecode_tag(m_gfxdecode); + m_seta001->set_gfxbank_callback(FUNC(seta_state::setac_gfxbank_callback), this); /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) @@ -9224,9 +9224,9 @@ MACHINE_CONFIG_START(seta_state::triplfun) MCFG_DEVICE_PROGRAM_MAP(triplfun_map) MCFG_DEVICE_VBLANK_INT_DRIVER("screen", seta_state, irq3_line_hold) - MCFG_DEVICE_ADD("spritegen", SETA001_SPRITE, 0) - MCFG_SETA001_SPRITE_GFXDECODE("gfxdecode") - MCFG_SETA001_SPRITE_GFXBANK_CB(seta_state, setac_gfxbank_callback) + SETA001_SPRITE(config, m_seta001, 0); + m_seta001->set_gfxdecode_tag(m_gfxdecode); + m_seta001->set_gfxbank_callback(FUNC(seta_state::setac_gfxbank_callback), this); /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) @@ -9268,9 +9268,9 @@ MACHINE_CONFIG_START(seta_state::kiwame) NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0); - MCFG_DEVICE_ADD("spritegen", SETA001_SPRITE, 0) - MCFG_SETA001_SPRITE_GFXDECODE("gfxdecode") - MCFG_SETA001_SPRITE_GFXBANK_CB(seta_state, setac_gfxbank_callback) + SETA001_SPRITE(config, m_seta001, 0); + m_seta001->set_gfxdecode_tag(m_gfxdecode); + m_seta001->set_gfxbank_callback(FUNC(seta_state::setac_gfxbank_callback), this); /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) @@ -9311,9 +9311,9 @@ MACHINE_CONFIG_START(seta_state::rezon) MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", seta_state, seta_interrupt_1_and_2, "screen", 0, 1) WATCHDOG_TIMER(config, "watchdog"); - MCFG_DEVICE_ADD("spritegen", SETA001_SPRITE, 0) - MCFG_SETA001_SPRITE_GFXDECODE("gfxdecode") - MCFG_SETA001_SPRITE_GFXBANK_CB(seta_state, setac_gfxbank_callback) + SETA001_SPRITE(config, m_seta001, 0); + m_seta001->set_gfxdecode_tag(m_gfxdecode); + m_seta001->set_gfxbank_callback(FUNC(seta_state::setac_gfxbank_callback), this); /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) @@ -9351,9 +9351,9 @@ MACHINE_CONFIG_START(seta_state::thunderl) MCFG_DEVICE_PROGRAM_MAP(thunderl_map) MCFG_DEVICE_VBLANK_INT_DRIVER("screen", seta_state, irq2_line_assert) - MCFG_DEVICE_ADD("spritegen", SETA001_SPRITE, 0) - MCFG_SETA001_SPRITE_GFXDECODE("gfxdecode") - MCFG_SETA001_SPRITE_GFXBANK_CB(seta_state, setac_gfxbank_callback) + SETA001_SPRITE(config, m_seta001, 0); + m_seta001->set_gfxdecode_tag(m_gfxdecode); + m_seta001->set_gfxbank_callback(FUNC(seta_state::setac_gfxbank_callback), this); /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) @@ -9426,9 +9426,9 @@ MACHINE_CONFIG_START(seta_state::wiggie) MCFG_DEVICE_ADD("audiocpu", Z80, 16000000/4) /* 4 MHz */ MCFG_DEVICE_PROGRAM_MAP(wiggie_sound_map) - MCFG_DEVICE_ADD("spritegen", SETA001_SPRITE, 0) - MCFG_SETA001_SPRITE_GFXDECODE("gfxdecode") - MCFG_SETA001_SPRITE_GFXBANK_CB(seta_state, setac_gfxbank_callback) + SETA001_SPRITE(config, m_seta001, 0); + m_seta001->set_gfxdecode_tag(m_gfxdecode); + m_seta001->set_gfxbank_callback(FUNC(seta_state::setac_gfxbank_callback), this); /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) @@ -9467,9 +9467,9 @@ MACHINE_CONFIG_START(seta_state::wits) MCFG_DEVICE_PROGRAM_MAP(thunderl_map) MCFG_DEVICE_VBLANK_INT_DRIVER("screen", seta_state, irq2_line_assert) - MCFG_DEVICE_ADD("spritegen", SETA001_SPRITE, 0) - MCFG_SETA001_SPRITE_GFXDECODE("gfxdecode") - MCFG_SETA001_SPRITE_GFXBANK_CB(seta_state, setac_gfxbank_callback) + SETA001_SPRITE(config, m_seta001, 0); + m_seta001->set_gfxdecode_tag(m_gfxdecode); + m_seta001->set_gfxbank_callback(FUNC(seta_state::setac_gfxbank_callback), this); /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) @@ -9504,9 +9504,9 @@ MACHINE_CONFIG_START(seta_state::umanclub) MCFG_DEVICE_PROGRAM_MAP(umanclub_map) MCFG_DEVICE_VBLANK_INT_DRIVER("screen", seta_state, irq3_line_hold) - MCFG_DEVICE_ADD("spritegen", SETA001_SPRITE, 0) - MCFG_SETA001_SPRITE_GFXDECODE("gfxdecode") - MCFG_SETA001_SPRITE_GFXBANK_CB(seta_state, setac_gfxbank_callback) + SETA001_SPRITE(config, m_seta001, 0); + m_seta001->set_gfxdecode_tag(m_gfxdecode); + m_seta001->set_gfxbank_callback(FUNC(seta_state::setac_gfxbank_callback), this); /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) @@ -9545,9 +9545,9 @@ MACHINE_CONFIG_START(seta_state::utoukond) MCFG_DEVICE_PROGRAM_MAP(utoukond_sound_map) MCFG_DEVICE_IO_MAP(utoukond_sound_io_map) - MCFG_DEVICE_ADD("spritegen", SETA001_SPRITE, 0) - MCFG_SETA001_SPRITE_GFXDECODE("gfxdecode") - MCFG_SETA001_SPRITE_GFXBANK_CB(seta_state, setac_gfxbank_callback) + SETA001_SPRITE(config, m_seta001, 0); + m_seta001->set_gfxdecode_tag(m_gfxdecode); + m_seta001->set_gfxbank_callback(FUNC(seta_state::setac_gfxbank_callback), this); /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) @@ -9603,9 +9603,9 @@ MACHINE_CONFIG_START(seta_state::wrofaero) MCFG_MACHINE_START_OVERRIDE(seta_state, wrofaero ) #endif // USE_uPD71054_TIMER - MCFG_DEVICE_ADD("spritegen", SETA001_SPRITE, 0) - MCFG_SETA001_SPRITE_GFXDECODE("gfxdecode") - MCFG_SETA001_SPRITE_GFXBANK_CB(seta_state, setac_gfxbank_callback) + SETA001_SPRITE(config, m_seta001, 0); + m_seta001->set_gfxdecode_tag(m_gfxdecode); + m_seta001->set_gfxbank_callback(FUNC(seta_state::setac_gfxbank_callback), this); /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) @@ -9647,9 +9647,9 @@ MACHINE_CONFIG_START(seta_state::zingzip) MCFG_DEVICE_PROGRAM_MAP(wrofaero_map) MCFG_DEVICE_VBLANK_INT_DRIVER("screen", seta_state, irq3_line_hold) - MCFG_DEVICE_ADD("spritegen", SETA001_SPRITE, 0) - MCFG_SETA001_SPRITE_GFXDECODE("gfxdecode") - MCFG_SETA001_SPRITE_GFXBANK_CB(seta_state, setac_gfxbank_callback) + SETA001_SPRITE(config, m_seta001, 0); + m_seta001->set_gfxdecode_tag(m_gfxdecode); + m_seta001->set_gfxbank_callback(FUNC(seta_state::setac_gfxbank_callback), this); WATCHDOG_TIMER(config, "watchdog"); @@ -9705,9 +9705,9 @@ MACHINE_CONFIG_START(seta_state::pairlove) MCFG_DEVICE_PROGRAM_MAP(pairlove_map) MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", seta_state, seta_interrupt_1_and_2, "screen", 0, 1) - MCFG_DEVICE_ADD("spritegen", SETA001_SPRITE, 0) - MCFG_SETA001_SPRITE_GFXDECODE("gfxdecode") - MCFG_SETA001_SPRITE_GFXBANK_CB(seta_state, setac_gfxbank_callback) + SETA001_SPRITE(config, m_seta001, 0); + m_seta001->set_gfxdecode_tag(m_gfxdecode); + m_seta001->set_gfxbank_callback(FUNC(seta_state::setac_gfxbank_callback), this); /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) @@ -9753,9 +9753,9 @@ MACHINE_CONFIG_START(seta_state::crazyfgt) MCFG_DEVICE_PROGRAM_MAP(crazyfgt_map) MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", seta_state, crazyfgt_interrupt, "screen", 0, 1) - MCFG_DEVICE_ADD("spritegen", SETA001_SPRITE, 0) - MCFG_SETA001_SPRITE_GFXDECODE("gfxdecode") - MCFG_SETA001_SPRITE_GFXBANK_CB(seta_state, setac_gfxbank_callback) + SETA001_SPRITE(config, m_seta001, 0); + m_seta001->set_gfxdecode_tag(m_gfxdecode); + m_seta001->set_gfxbank_callback(FUNC(seta_state::setac_gfxbank_callback), this); /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) @@ -9823,9 +9823,9 @@ MACHINE_CONFIG_START(jockeyc_state::jockeyc) MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", jockeyc_state, interrupt, "screen", 0, 1) WATCHDOG_TIMER(config, "watchdog").set_time(attotime::from_seconds(2.0)); // jockeyc: watchdog test error if over 2.5s - MCFG_DEVICE_ADD("spritegen", SETA001_SPRITE, 0) - MCFG_SETA001_SPRITE_GFXDECODE("gfxdecode") - MCFG_SETA001_SPRITE_GFXBANK_CB(seta_state, setac_gfxbank_callback) + SETA001_SPRITE(config, m_seta001, 0); + m_seta001->set_gfxdecode_tag(m_gfxdecode); + m_seta001->set_gfxbank_callback(FUNC(seta_state::setac_gfxbank_callback), this); NVRAM(config, "nvram", nvram_device::DEFAULT_RANDOM); diff --git a/src/mame/drivers/slapshot.cpp b/src/mame/drivers/slapshot.cpp index 5d77a50d950..2b78bd64e31 100644 --- a/src/mame/drivers/slapshot.cpp +++ b/src/mame/drivers/slapshot.cpp @@ -474,16 +474,16 @@ MACHINE_CONFIG_START(slapshot_state::slapshot) MCFG_PALETTE_ADD("palette", 8192) MCFG_PALETTE_FORMAT(XRGB) - MCFG_DEVICE_ADD("tc0480scp", TC0480SCP, 0) - MCFG_TC0480SCP_GFX_REGION(1) - MCFG_TC0480SCP_TX_REGION(2) - MCFG_TC0480SCP_OFFSETS(30 + 3, 9) - MCFG_TC0480SCP_OFFSETS_TX(-1, -1) - MCFG_TC0480SCP_OFFSETS_FLIP(0, 2) - MCFG_TC0480SCP_COL_BASE(4096) - MCFG_TC0480SCP_GFXDECODE("gfxdecode") + TC0480SCP(config, m_tc0480scp, 0); + m_tc0480scp->set_gfx_region(1); + m_tc0480scp->set_tx_region(2); + m_tc0480scp->set_offsets(30 + 3, 9); + m_tc0480scp->set_offsets_tx(-1, -1); + m_tc0480scp->set_offsets_flip(0, 2); + m_tc0480scp->set_col_base(4096); + m_tc0480scp->set_gfxdecode_tag(m_gfxdecode); - MCFG_TC0360PRI_ADD("tc0360pri") + TC0360PRI(config, m_tc0360pri, 0); /* sound hardware */ SPEAKER(config, "lspeaker").front_left(); @@ -543,16 +543,16 @@ MACHINE_CONFIG_START(slapshot_state::opwolf3) MCFG_PALETTE_ADD("palette", 8192) MCFG_PALETTE_FORMAT(XRGB) - MCFG_DEVICE_ADD("tc0480scp", TC0480SCP, 0) - MCFG_TC0480SCP_GFX_REGION(1) - MCFG_TC0480SCP_TX_REGION(2) - MCFG_TC0480SCP_OFFSETS(30 + 3, 9) - MCFG_TC0480SCP_OFFSETS_TX(-1, -1) - MCFG_TC0480SCP_OFFSETS_FLIP(0, 2) - MCFG_TC0480SCP_COL_BASE(4096) - MCFG_TC0480SCP_GFXDECODE("gfxdecode") + TC0480SCP(config, m_tc0480scp, 0); + m_tc0480scp->set_gfx_region(1); + m_tc0480scp->set_tx_region(2); + m_tc0480scp->set_offsets(30 + 3, 9); + m_tc0480scp->set_offsets_tx(-1, -1); + m_tc0480scp->set_offsets_flip(0, 2); + m_tc0480scp->set_col_base(4096); + m_tc0480scp->set_gfxdecode_tag(m_gfxdecode); - MCFG_TC0360PRI_ADD("tc0360pri") + TC0360PRI(config, m_tc0360pri, 0); /* sound hardware */ SPEAKER(config, "lspeaker").front_left(); diff --git a/src/mame/drivers/snk68.cpp b/src/mame/drivers/snk68.cpp index 303aafa2b71..7352a94196d 100644 --- a/src/mame/drivers/snk68.cpp +++ b/src/mame/drivers/snk68.cpp @@ -617,9 +617,9 @@ MACHINE_CONFIG_START(snk68_state::pow) MCFG_PALETTE_ADD("palette", 0x800) MCFG_PALETTE_FORMAT(xRGBRRRRGGGGBBBB_bit0) - MCFG_DEVICE_ADD("sprites", SNK68_SPR, 0) - MCFG_SNK68_SPR_GFXDECODE("gfxdecode") - MCFG_SNK68_SPR_SET_TILE_INDIRECT( snk68_state, tile_callback_pow ) + SNK68_SPR(config, m_sprites, 0); + m_sprites->set_gfxdecode_tag(m_gfxdecode); + m_sprites->set_tile_indirect_cb(FUNC(snk68_state::tile_callback_pow), this); /* sound hardware */ SPEAKER(config, "mono").front_center(); @@ -635,11 +635,11 @@ MACHINE_CONFIG_START(snk68_state::pow) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50) MACHINE_CONFIG_END -MACHINE_CONFIG_START(snk68_state::streetsm) +void snk68_state::streetsm(machine_config &config) +{ pow(config); - MCFG_DEVICE_MODIFY("sprites") - MCFG_SNK68_SPR_SET_TILE_INDIRECT( snk68_state, tile_callback_notpow ) -MACHINE_CONFIG_END + m_sprites->set_tile_indirect_cb(FUNC(snk68_state::tile_callback_notpow), this); +} MACHINE_CONFIG_START(snk68_state::searchar) streetsm(config); diff --git a/src/mame/drivers/snowbros.cpp b/src/mame/drivers/snowbros.cpp index ba0cc8f9113..71f1af51e78 100644 --- a/src/mame/drivers/snowbros.cpp +++ b/src/mame/drivers/snowbros.cpp @@ -1750,8 +1750,8 @@ MACHINE_CONFIG_START(snowbros_state::snowbros) MCFG_PALETTE_ADD("palette", 256) MCFG_PALETTE_FORMAT(xBBBBBGGGGGRRRRR) - MCFG_DEVICE_ADD("pandora", KANEKO_PANDORA, 0) - MCFG_KANEKO_PANDORA_GFXDECODE("gfxdecode") + KANEKO_PANDORA(config, m_pandora, 0); + m_pandora->set_gfxdecode_tag(m_gfxdecode); /* sound hardware */ SPEAKER(config, "mono").front_center(); @@ -2012,8 +2012,8 @@ MACHINE_CONFIG_START(snowbros_state::yutnori) MCFG_PALETTE_ADD("palette", 256) MCFG_PALETTE_FORMAT(xBBBBBGGGGGRRRRR) - MCFG_DEVICE_ADD("pandora", KANEKO_PANDORA, 0) - MCFG_KANEKO_PANDORA_GFXDECODE("gfxdecode") + KANEKO_PANDORA(config, m_pandora, 0); + m_pandora->set_gfxdecode_tag(m_gfxdecode); /* sound hardware */ SPEAKER(config, "mono").front_center(); diff --git a/src/mame/drivers/spbactn.cpp b/src/mame/drivers/spbactn.cpp index f66dcd9514d..bbfbc8eb8f0 100644 --- a/src/mame/drivers/spbactn.cpp +++ b/src/mame/drivers/spbactn.cpp @@ -435,8 +435,8 @@ MACHINE_CONFIG_START(spbactn_state::spbactn) MCFG_PALETTE_ADD("palette", 0x2800/2) MCFG_PALETTE_FORMAT(xxxxBBBBGGGGRRRR) - MCFG_DEVICE_ADD("spritegen", TECMO_SPRITE, 0) - MCFG_TECMO_SPRITE_GFX_REGION(2) + TECMO_SPRITE(config, m_sprgen, 0); + m_sprgen->set_gfx_region(2); TECMO_MIXER(config, m_mixer, 0); m_mixer->set_mixer_shifts(8,10,4); @@ -490,8 +490,8 @@ MACHINE_CONFIG_START(spbactn_state::spbactnp) MCFG_PALETTE_ADD("palette", 0x2800/2) MCFG_PALETTE_FORMAT(xxxxBBBBRRRRGGGG) - MCFG_DEVICE_ADD("spritegen", TECMO_SPRITE, 0) - MCFG_TECMO_SPRITE_GFX_REGION(2) + TECMO_SPRITE(config, m_sprgen, 0); + m_sprgen->set_gfx_region(2); TECMO_MIXER(config, m_mixer, 0); m_mixer->set_mixer_shifts(12,14,8); diff --git a/src/mame/drivers/srmp2.cpp b/src/mame/drivers/srmp2.cpp index 5f2deef2faa..6ac877fd30e 100644 --- a/src/mame/drivers/srmp2.cpp +++ b/src/mame/drivers/srmp2.cpp @@ -1146,8 +1146,8 @@ MACHINE_CONFIG_START(srmp2_state::srmp2) MCFG_MACHINE_START_OVERRIDE(srmp2_state,srmp2) NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0); - MCFG_DEVICE_ADD("spritegen", SETA001_SPRITE, 0) - MCFG_SETA001_SPRITE_GFXDECODE("gfxdecode") + SETA001_SPRITE(config, m_seta001, 0); + m_seta001->set_gfxdecode_tag("gfxdecode"); /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) @@ -1192,9 +1192,9 @@ MACHINE_CONFIG_START(srmp2_state::srmp3) MCFG_MACHINE_START_OVERRIDE(srmp2_state,srmp3) NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0); - MCFG_DEVICE_ADD("spritegen", SETA001_SPRITE, 0) - MCFG_SETA001_SPRITE_GFXDECODE("gfxdecode") - MCFG_SETA001_SPRITE_GFXBANK_CB(srmp2_state, srmp3_gfxbank_callback) + SETA001_SPRITE(config, m_seta001, 0); + m_seta001->set_gfxdecode_tag("gfxdecode"); + m_seta001->set_gfxbank_callback(FUNC(srmp2_state::srmp3_gfxbank_callback), this); /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) @@ -1247,9 +1247,9 @@ MACHINE_CONFIG_START(srmp2_state::mjyuugi) NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0); - MCFG_DEVICE_ADD("spritegen", SETA001_SPRITE, 0) - MCFG_SETA001_SPRITE_GFXDECODE("gfxdecode") - MCFG_SETA001_SPRITE_GFXBANK_CB(srmp2_state, srmp3_gfxbank_callback) + SETA001_SPRITE(config, m_seta001, 0); + m_seta001->set_gfxdecode_tag("gfxdecode"); + m_seta001->set_gfxbank_callback(FUNC(srmp2_state::srmp3_gfxbank_callback), this); /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) diff --git a/src/mame/drivers/superchs.cpp b/src/mame/drivers/superchs.cpp index fb8b3229fda..cc5bbe8b6d1 100644 --- a/src/mame/drivers/superchs.cpp +++ b/src/mame/drivers/superchs.cpp @@ -267,15 +267,15 @@ MACHINE_CONFIG_START(superchs_state::superchs) MCFG_PALETTE_ADD("palette", 8192) MCFG_PALETTE_FORMAT(XRGB) - MCFG_DEVICE_ADD("tc0480scp", TC0480SCP, 0) - MCFG_TC0480SCP_GFX_REGION(1) - MCFG_TC0480SCP_TX_REGION(2) - MCFG_TC0480SCP_OFFSETS(0x20, 0x08) - MCFG_TC0480SCP_OFFSETS_TX(-1, 0) - MCFG_TC0480SCP_GFXDECODE("gfxdecode") + TC0480SCP(config, m_tc0480scp, 0); + m_tc0480scp->set_gfx_region(1); + m_tc0480scp->set_tx_region(2); + m_tc0480scp->set_offsets(0x20, 0x08); + m_tc0480scp->set_offsets_tx(-1, 0); + m_tc0480scp->set_gfxdecode_tag(m_gfxdecode); /* sound hardware */ - MCFG_DEVICE_ADD("taito_en", TAITO_EN, 0) + TAITO_EN(config, "taito_en", 0); MACHINE_CONFIG_END MACHINE_CONFIG_START(superchs_state::chase3) diff --git a/src/mame/drivers/suprslam.cpp b/src/mame/drivers/suprslam.cpp index 89dbf8f2420..a1bdecb19d3 100644 --- a/src/mame/drivers/suprslam.cpp +++ b/src/mame/drivers/suprslam.cpp @@ -300,10 +300,10 @@ MACHINE_CONFIG_START(suprslam_state::suprslam) MCFG_PALETTE_ADD("palette", 0x800) MCFG_PALETTE_FORMAT(xGGGGGBBBBBRRRRR) - MCFG_DEVICE_ADD("vsystem_spr", VSYSTEM_SPR, 0) - MCFG_VSYSTEM_SPR_SET_TILE_INDIRECT( suprslam_state, suprslam_tile_callback ) - MCFG_VSYSTEM_SPR_SET_GFXREGION(1) - MCFG_VSYSTEM_SPR_GFXDECODE("gfxdecode") + VSYSTEM_SPR(config, m_spr, 0); + m_spr->set_tile_indirect_cb(FUNC(suprslam_state::suprslam_tile_callback), this); + m_spr->set_gfx_region(1); + m_spr->set_gfxdecode_tag(m_gfxdecode); MCFG_DEVICE_ADD("k053936", K053936, 0) MCFG_K053936_WRAP(1) diff --git a/src/mame/drivers/system16.cpp b/src/mame/drivers/system16.cpp index 2404ac07378..4f1286f02ca 100644 --- a/src/mame/drivers/system16.cpp +++ b/src/mame/drivers/system16.cpp @@ -2187,7 +2187,7 @@ MACHINE_CONFIG_START(segas1x_bootleg_state::shinobi_datsu) MCFG_DEVICE_MODIFY("maincpu") MCFG_DEVICE_PROGRAM_MAP(shinobib_map) - MCFG_DEVICE_ADD("sprites", BOOTLEG_SYS16A_SPRITES, 0, 189-117, 0, 1, 2, 3, 4, 5, 6, 7) + BOOTLEG_SYS16A_SPRITES(config, m_sprites, 0, 189-117, 0, 1, 2, 3, 4, 5, 6, 7); MCFG_VIDEO_START_OVERRIDE(segas1x_bootleg_state, s16a_bootleg_shinobi ) MCFG_SCREEN_MODIFY("screen") @@ -2204,7 +2204,7 @@ MACHINE_CONFIG_START(segas1x_bootleg_state::passshtb) MCFG_DEVICE_MODIFY("maincpu") MCFG_DEVICE_PROGRAM_MAP(passshtb_map) - MCFG_DEVICE_ADD("sprites", BOOTLEG_SYS16A_SPRITES, 0, 189-117, 1, 0, 3, 2, 5, 4, 7, 6) + BOOTLEG_SYS16A_SPRITES(config, m_sprites, 0, 189-117, 1, 0, 3, 2, 5, 4, 7, 6); MCFG_VIDEO_START_OVERRIDE(segas1x_bootleg_state, s16a_bootleg_passsht ) MCFG_SCREEN_MODIFY("screen") @@ -2222,7 +2222,7 @@ MACHINE_CONFIG_START(segas1x_bootleg_state::passsht4b) MCFG_DEVICE_PROGRAM_MAP(passht4b_map) // wrong - MCFG_DEVICE_ADD("sprites", BOOTLEG_SYS16A_SPRITES, 0, 189-117, 1, 0, 3, 2, 5, 4, 7, 6) + BOOTLEG_SYS16A_SPRITES(config, m_sprites, 0, 189-117, 1, 0, 3, 2, 5, 4, 7, 6); MCFG_VIDEO_START_OVERRIDE(segas1x_bootleg_state, s16a_bootleg_passsht ) MCFG_SCREEN_MODIFY("screen") @@ -2240,8 +2240,8 @@ MACHINE_CONFIG_START(segas1x_bootleg_state::wb3bb) MCFG_DEVICE_MODIFY("maincpu") MCFG_DEVICE_PROGRAM_MAP(wb3bbl_map) - MCFG_DEVICE_ADD("sprites", BOOTLEG_SYS16A_SPRITES, 0, 189-117, 4, 0, 5, 1, 6, 2, 7, 3) - MCFG_BOOTLEG_SYS16A_SPRITES_YORIGIN(0) + BOOTLEG_SYS16A_SPRITES(config, m_sprites, 0, 189-117, 4, 0, 5, 1, 6, 2, 7, 3); + m_sprites->set_local_originy(0); MCFG_VIDEO_START_OVERRIDE(segas1x_bootleg_state, s16a_bootleg_wb3bl ) MCFG_SCREEN_MODIFY("screen") @@ -2273,8 +2273,8 @@ MACHINE_CONFIG_START(segas1x_bootleg_state::goldnaxeb_base) MCFG_PALETTE_ADD_INIT_BLACK("palette", 2048*SHADOW_COLORS_MULTIPLIER) - MCFG_DEVICE_ADD("sprites", SEGA_SYS16B_SPRITES, 0) - MCFG_BOOTLEG_SYS16B_SPRITES_XORIGIN(189-121) + SEGA_SYS16B_SPRITES(config, m_sprites, 0); + m_sprites->set_local_originx(189-121); MCFG_VIDEO_START_OVERRIDE(segas1x_bootleg_state,system16) @@ -2324,9 +2324,7 @@ MACHINE_CONFIG_START(segas1x_bootleg_state::bayrouteb2) datsu_ym2151_msm5205(config); - MCFG_DEVICE_MODIFY("sprites") - MCFG_BOOTLEG_SYS16B_SPRITES_XORIGIN(189-107) - + m_sprites->set_local_originx(189-107); MACHINE_CONFIG_END MACHINE_CONFIG_START(segas1x_bootleg_state::tturfbl) @@ -2338,8 +2336,8 @@ MACHINE_CONFIG_START(segas1x_bootleg_state::tturfbl) datsu_ym2151_msm5205(config); - MCFG_DEVICE_ADD("sprites", SEGA_SYS16B_SPRITES, 0) - MCFG_BOOTLEG_SYS16B_SPRITES_XORIGIN(189-107) + SEGA_SYS16B_SPRITES(config, m_sprites, 0); + m_sprites->set_local_originx(189-107); MACHINE_CONFIG_END MACHINE_CONFIG_START(segas1x_bootleg_state::dduxbl) @@ -2349,8 +2347,8 @@ MACHINE_CONFIG_START(segas1x_bootleg_state::dduxbl) MCFG_DEVICE_MODIFY("maincpu") MCFG_DEVICE_PROGRAM_MAP(dduxbl_map) - MCFG_DEVICE_ADD("sprites", SEGA_SYS16B_SPRITES, 0) - MCFG_BOOTLEG_SYS16B_SPRITES_XORIGIN(189-112) + SEGA_SYS16B_SPRITES(config, m_sprites, 0); + m_sprites->set_local_originx(189-112); z80_ym2151(config); MACHINE_CONFIG_END @@ -2362,8 +2360,8 @@ MACHINE_CONFIG_START(segas1x_bootleg_state::eswatbl) MCFG_DEVICE_MODIFY("maincpu") MCFG_DEVICE_PROGRAM_MAP(eswatbl_map) - MCFG_DEVICE_ADD("sprites", SEGA_SYS16B_SPRITES, 0) - MCFG_BOOTLEG_SYS16B_SPRITES_XORIGIN(189-124) + SEGA_SYS16B_SPRITES(config, m_sprites, 0); + m_sprites->set_local_originx(189-124); z80_ym2151_upd7759(config); MACHINE_CONFIG_END @@ -2375,8 +2373,8 @@ MACHINE_CONFIG_START(segas1x_bootleg_state::eswatbl2) MCFG_DEVICE_MODIFY("maincpu") MCFG_DEVICE_PROGRAM_MAP(eswatbl2_map) - MCFG_DEVICE_ADD("sprites", SEGA_SYS16B_SPRITES, 0) - MCFG_BOOTLEG_SYS16B_SPRITES_XORIGIN(189-121) + SEGA_SYS16B_SPRITES(config, m_sprites, 0); + m_sprites->set_local_originx(189-121); datsu_2x_ym2203_msm5205(config); MACHINE_CONFIG_END @@ -2388,8 +2386,8 @@ MACHINE_CONFIG_START(segas1x_bootleg_state::tetrisbl) MCFG_DEVICE_MODIFY("maincpu") MCFG_DEVICE_PROGRAM_MAP(tetrisbl_map) - MCFG_DEVICE_ADD("sprites", SEGA_SYS16B_SPRITES, 0) - MCFG_BOOTLEG_SYS16B_SPRITES_XORIGIN(189-112) + SEGA_SYS16B_SPRITES(config, m_sprites, 0); + m_sprites->set_local_originx(189-112); z80_ym2151(config); MACHINE_CONFIG_END @@ -2400,8 +2398,8 @@ MACHINE_CONFIG_START(segas1x_bootleg_state::altbeastbl) MCFG_DEVICE_MODIFY("maincpu") MCFG_DEVICE_PROGRAM_MAP(tetrisbl_map) - MCFG_DEVICE_ADD("sprites", SEGA_SYS16B_SPRITES, 0) - MCFG_BOOTLEG_SYS16B_SPRITES_XORIGIN(189-112) + SEGA_SYS16B_SPRITES(config, m_sprites, 0); + m_sprites->set_local_originx(189-112); datsu_2x_ym2203_msm5205(config); MCFG_DEVICE_MODIFY("5205") @@ -2446,8 +2444,8 @@ MACHINE_CONFIG_START(segas1x_bootleg_state::system18) MCFG_VIDEO_START_OVERRIDE(segas1x_bootleg_state,system18old) - MCFG_DEVICE_ADD("sprites", SEGA_SYS16B_SPRITES, 0) - MCFG_BOOTLEG_SYS16B_SPRITES_XORIGIN(189-107) + SEGA_SYS16B_SPRITES(config, m_sprites, 0); + m_sprites->set_local_originx(189-107); /* sound hardware */ SPEAKER(config, "lspeaker").front_left(); @@ -2502,8 +2500,8 @@ MACHINE_CONFIG_START(segas1x_bootleg_state::astormb2) MCFG_VIDEO_START_OVERRIDE(segas1x_bootleg_state,system18old) - MCFG_DEVICE_ADD("sprites", SEGA_SYS16B_SPRITES, 0) - MCFG_BOOTLEG_SYS16B_SPRITES_XORIGIN(189-107) + SEGA_SYS16B_SPRITES(config, m_sprites, 0); + m_sprites->set_local_originx(189-107); GENERIC_LATCH_8(config, m_soundlatch); m_soundlatch->data_pending_callback().set_inputline(m_soundcpu, 0); @@ -2597,8 +2595,8 @@ MACHINE_CONFIG_START(segas1x_bootleg_state::ddcrewbl) MCFG_VIDEO_START_OVERRIDE(segas1x_bootleg_state,system18old) - MCFG_DEVICE_ADD("sprites", SEGA_SYS16B_SPRITES, 0) - MCFG_BOOTLEG_SYS16B_SPRITES_XORIGIN(189-124) + SEGA_SYS16B_SPRITES(config, m_sprites, 0); + m_sprites->set_local_originx(189-124); MCFG_MACHINE_RESET_OVERRIDE(segas1x_bootleg_state,ddcrewbl) diff --git a/src/mame/drivers/taito_f2.cpp b/src/mame/drivers/taito_f2.cpp index 7b9b1aaac33..a85b1e3da3c 100644 --- a/src/mame/drivers/taito_f2.cpp +++ b/src/mame/drivers/taito_f2.cpp @@ -2953,14 +2953,14 @@ MACHINE_CONFIG_START(taitof2_state::finalb) MCFG_SCREEN_MODIFY("screen") MCFG_SCREEN_VBLANK_CALLBACK(WRITELINE(*this, taitof2_state, screen_vblank_partial_buffer_delayed)) - MCFG_DEVICE_ADD("tc0100scn", TC0100SCN, 0) - MCFG_TC0100SCN_GFX_REGION(1) - MCFG_TC0100SCN_TX_REGION(2) - MCFG_TC0100SCN_OFFSETS(1, 0) - MCFG_TC0100SCN_GFXDECODE("gfxdecode") - MCFG_TC0100SCN_PALETTE("palette") - - MCFG_DEVICE_ADD("tc0110pcr", TC0110PCR, 0, "palette") + TC0100SCN(config, m_tc0100scn, 0); + m_tc0100scn->set_gfx_region(1); + m_tc0100scn->set_tx_region(2); + m_tc0100scn->set_offsets(1, 0); + m_tc0100scn->set_gfxdecode_tag(m_gfxdecode); + m_tc0100scn->set_palette_tag(m_palette); + + TC0110PCR(config, m_tc0110pcr, 0, m_palette); MACHINE_CONFIG_END @@ -2978,18 +2978,18 @@ MACHINE_CONFIG_START(taitof2_state::dondokod) MCFG_SCREEN_VBLANK_CALLBACK(WRITELINE(*this, taitof2_state, screen_vblank_partial_buffer_delayed)) MCFG_SCREEN_UPDATE_DRIVER(taitof2_state, screen_update_taitof2_pri_roz) - MCFG_DEVICE_ADD("tc0100scn", TC0100SCN, 0) - MCFG_TC0100SCN_GFX_REGION(1) - MCFG_TC0100SCN_TX_REGION(3) - MCFG_TC0100SCN_OFFSETS(3, 0) - MCFG_TC0100SCN_GFXDECODE("gfxdecode") - MCFG_TC0100SCN_PALETTE("palette") + TC0100SCN(config, m_tc0100scn, 0); + m_tc0100scn->set_gfx_region(1); + m_tc0100scn->set_tx_region(3); + m_tc0100scn->set_offsets(3, 0); + m_tc0100scn->set_gfxdecode_tag(m_gfxdecode); + m_tc0100scn->set_palette_tag(m_palette); - MCFG_DEVICE_ADD("tc0280grd", TC0280GRD, 0) - MCFG_TC0280GRD_GFX_REGION(2) - MCFG_TC0280GRD_GFXDECODE("gfxdecode"); + TC0280GRD(config, m_tc0280grd, 0); + m_tc0280grd->set_gfx_region(2); + m_tc0280grd->set_gfxdecode_tag(m_gfxdecode); - MCFG_TC0360PRI_ADD("tc0360pri") + TC0360PRI(config, m_tc0360pri, 0); MACHINE_CONFIG_END @@ -3011,14 +3011,14 @@ MACHINE_CONFIG_START(taitof2_state::megab) MCFG_SCREEN_MODIFY("screen") MCFG_SCREEN_UPDATE_DRIVER(taitof2_state, screen_update_taitof2_pri) - MCFG_DEVICE_ADD("tc0100scn", TC0100SCN, 0) - MCFG_TC0100SCN_GFX_REGION(1) - MCFG_TC0100SCN_TX_REGION(2) - MCFG_TC0100SCN_OFFSETS(3, 0) - MCFG_TC0100SCN_GFXDECODE("gfxdecode") - MCFG_TC0100SCN_PALETTE("palette") + TC0100SCN(config, m_tc0100scn, 0); + m_tc0100scn->set_gfx_region(1); + m_tc0100scn->set_tx_region(2); + m_tc0100scn->set_offsets(3, 0); + m_tc0100scn->set_gfxdecode_tag(m_gfxdecode); + m_tc0100scn->set_palette_tag(m_palette); - MCFG_TC0360PRI_ADD("tc0360pri") + TC0360PRI(config, m_tc0360pri, 0); MACHINE_CONFIG_END @@ -3036,27 +3036,27 @@ MACHINE_CONFIG_START(taitof2_state::thundfox) MCFG_SCREEN_UPDATE_DRIVER(taitof2_state, screen_update_taitof2_thundfox) MCFG_SCREEN_VBLANK_CALLBACK(WRITELINE(*this, taitof2_state, screen_vblank_partial_buffer_delayed_thundfox)) - MCFG_DEVICE_ADD("tc0100scn_1", TC0100SCN, 0) - MCFG_TC0100SCN_GFX_REGION(1) - MCFG_TC0100SCN_TX_REGION(3) - MCFG_TC0100SCN_OFFSETS(3, 0) - MCFG_TC0100SCN_OFFSETS_FLIP(5, 0) - MCFG_TC0100SCN_OFFSETS_FLIPTX(4, 1) - MCFG_TC0100SCN_GFXDECODE("gfxdecode") - MCFG_TC0100SCN_PALETTE("palette") - - MCFG_DEVICE_ADD("tc0100scn_2", TC0100SCN, 0) - MCFG_TC0100SCN_GFX_REGION(2) - MCFG_TC0100SCN_TX_REGION(4) - MCFG_TC0100SCN_OFFSETS(3, 0) - MCFG_TC0100SCN_OFFSETS_FLIP(5, 0) - MCFG_TC0100SCN_OFFSETS_FLIPTX(4, 1) - MCFG_TC0100SCN_MULTISCR_XOFFS(tc0100scn_device::SINGLE_VDU) - MCFG_TC0100SCN_MULTISCR_HACK(1) - MCFG_TC0100SCN_GFXDECODE("gfxdecode") - MCFG_TC0100SCN_PALETTE("palette") - - MCFG_TC0360PRI_ADD("tc0360pri") + TC0100SCN(config, m_tc0100scn_1, 0); + m_tc0100scn_1->set_gfx_region(1); + m_tc0100scn_1->set_tx_region(3); + m_tc0100scn_1->set_offsets(3, 0); + m_tc0100scn_1->set_offsets_flip(5, 0); + m_tc0100scn_1->set_offsets_fliptx(4, 1); + m_tc0100scn_1->set_gfxdecode_tag(m_gfxdecode); + m_tc0100scn_1->set_palette_tag(m_palette); + + TC0100SCN(config, m_tc0100scn_2, 0); + m_tc0100scn_2->set_gfx_region(2); + m_tc0100scn_2->set_tx_region(4); + m_tc0100scn_2->set_offsets(3, 0); + m_tc0100scn_2->set_offsets_flip(5, 0); + m_tc0100scn_2->set_offsets_fliptx(4, 1); + m_tc0100scn_2->set_multiscr_xoffs(tc0100scn_device::SINGLE_VDU); + m_tc0100scn_2->set_multiscr_hack(1); + m_tc0100scn_2->set_gfxdecode_tag(m_gfxdecode); + m_tc0100scn_2->set_palette_tag(m_palette); + + TC0360PRI(config, m_tc0360pri, 0); MACHINE_CONFIG_END @@ -3073,18 +3073,18 @@ MACHINE_CONFIG_START(taitof2_state::cameltry) MCFG_SCREEN_MODIFY("screen") MCFG_SCREEN_UPDATE_DRIVER(taitof2_state, screen_update_taitof2_pri_roz) - MCFG_DEVICE_ADD("tc0100scn", TC0100SCN, 0) - MCFG_TC0100SCN_GFX_REGION(1) - MCFG_TC0100SCN_TX_REGION(3) - MCFG_TC0100SCN_OFFSETS(3, 0) - MCFG_TC0100SCN_GFXDECODE("gfxdecode") - MCFG_TC0100SCN_PALETTE("palette") + TC0100SCN(config, m_tc0100scn, 0); + m_tc0100scn->set_gfx_region(1); + m_tc0100scn->set_tx_region(3); + m_tc0100scn->set_offsets(3, 0); + m_tc0100scn->set_gfxdecode_tag(m_gfxdecode); + m_tc0100scn->set_palette_tag(m_palette); - MCFG_DEVICE_ADD("tc0280grd", TC0280GRD, 0) - MCFG_TC0280GRD_GFX_REGION(2) - MCFG_TC0280GRD_GFXDECODE("gfxdecode"); + TC0280GRD(config, m_tc0280grd, 0); + m_tc0280grd->set_gfx_region(2); + m_tc0280grd->set_gfxdecode_tag(m_gfxdecode); - MCFG_TC0360PRI_ADD("tc0360pri") + TC0360PRI(config, m_tc0360pri, 0); MACHINE_CONFIG_END @@ -3100,13 +3100,13 @@ MACHINE_CONFIG_START(taitof2_state::qtorimon) MCFG_SCREEN_MODIFY("screen") MCFG_SCREEN_VBLANK_CALLBACK(WRITELINE(*this, taitof2_state, screen_vblank_partial_buffer_delayed)) - MCFG_DEVICE_ADD("tc0100scn", TC0100SCN, 0) - MCFG_TC0100SCN_GFX_REGION(1) - MCFG_TC0100SCN_TX_REGION(2) - MCFG_TC0100SCN_GFXDECODE("gfxdecode") - MCFG_TC0100SCN_PALETTE("palette") + TC0100SCN(config, m_tc0100scn, 0); + m_tc0100scn->set_gfx_region(1); + m_tc0100scn->set_tx_region(2); + m_tc0100scn->set_gfxdecode_tag(m_gfxdecode); + m_tc0100scn->set_palette_tag(m_palette); - MCFG_DEVICE_ADD("tc0110pcr", TC0110PCR, 0, "palette") + TC0110PCR(config, m_tc0110pcr, 0, m_palette); MACHINE_CONFIG_END @@ -3123,14 +3123,14 @@ MACHINE_CONFIG_START(taitof2_state::liquidk) MCFG_SCREEN_UPDATE_DRIVER(taitof2_state, screen_update_taitof2_pri) MCFG_SCREEN_VBLANK_CALLBACK(WRITELINE(*this, taitof2_state, screen_vblank_partial_buffer_delayed)) - MCFG_DEVICE_ADD("tc0100scn", TC0100SCN, 0) - MCFG_TC0100SCN_GFX_REGION(1) - MCFG_TC0100SCN_TX_REGION(2) - MCFG_TC0100SCN_OFFSETS(3, 0) - MCFG_TC0100SCN_GFXDECODE("gfxdecode") - MCFG_TC0100SCN_PALETTE("palette") + TC0100SCN(config, m_tc0100scn, 0); + m_tc0100scn->set_gfx_region(1); + m_tc0100scn->set_tx_region(2); + m_tc0100scn->set_offsets(3, 0); + m_tc0100scn->set_gfxdecode_tag(m_gfxdecode); + m_tc0100scn->set_palette_tag(m_palette); - MCFG_TC0360PRI_ADD("tc0360pri") + TC0360PRI(config, m_tc0360pri, 0); MACHINE_CONFIG_END @@ -3146,13 +3146,13 @@ MACHINE_CONFIG_START(taitof2_state::quizhq) MCFG_SCREEN_MODIFY("screen") MCFG_SCREEN_VBLANK_CALLBACK(WRITELINE(*this, taitof2_state, screen_vblank_partial_buffer_delayed)) - MCFG_DEVICE_ADD("tc0100scn", TC0100SCN, 0) - MCFG_TC0100SCN_GFX_REGION(1) - MCFG_TC0100SCN_TX_REGION(2) - MCFG_TC0100SCN_GFXDECODE("gfxdecode") - MCFG_TC0100SCN_PALETTE("palette") + TC0100SCN(config, m_tc0100scn, 0); + m_tc0100scn->set_gfx_region(1); + m_tc0100scn->set_tx_region(2); + m_tc0100scn->set_gfxdecode_tag(m_gfxdecode); + m_tc0100scn->set_palette_tag(m_palette); - MCFG_DEVICE_ADD("tc0110pcr", TC0110PCR, 0, "palette") + TC0110PCR(config, m_tc0110pcr, 0, m_palette); MACHINE_CONFIG_END @@ -3172,12 +3172,12 @@ MACHINE_CONFIG_START(taitof2_state::ssi) MCFG_SCREEN_UPDATE_DRIVER(taitof2_state, screen_update_taitof2_ssi) MCFG_SCREEN_VBLANK_CALLBACK(WRITELINE(*this, taitof2_state, screen_vblank_partial_buffer_delayed_thundfox)) - MCFG_DEVICE_ADD("tc0100scn", TC0100SCN, 0) - MCFG_TC0100SCN_GFX_REGION(1) - MCFG_TC0100SCN_TX_REGION(2) - MCFG_TC0100SCN_OFFSETS(3, 0) - MCFG_TC0100SCN_GFXDECODE("gfxdecode") - MCFG_TC0100SCN_PALETTE("palette") + TC0100SCN(config, m_tc0100scn, 0); + m_tc0100scn->set_gfx_region(1); + m_tc0100scn->set_tx_region(2); + m_tc0100scn->set_offsets(3, 0); + m_tc0100scn->set_gfxdecode_tag(m_gfxdecode); + m_tc0100scn->set_palette_tag(m_palette); MACHINE_CONFIG_END @@ -3197,14 +3197,14 @@ MACHINE_CONFIG_START(taitof2_state::gunfront) MCFG_SCREEN_UPDATE_DRIVER(taitof2_state, screen_update_taitof2_pri) MCFG_SCREEN_VBLANK_CALLBACK(WRITELINE(*this, taitof2_state, screen_vblank_partial_buffer_delayed)) - MCFG_DEVICE_ADD("tc0100scn", TC0100SCN, 0) - MCFG_TC0100SCN_GFX_REGION(1) - MCFG_TC0100SCN_TX_REGION(2) - MCFG_TC0100SCN_OFFSETS(3, 0) - MCFG_TC0100SCN_GFXDECODE("gfxdecode") - MCFG_TC0100SCN_PALETTE("palette") + TC0100SCN(config, m_tc0100scn, 0); + m_tc0100scn->set_gfx_region(1); + m_tc0100scn->set_tx_region(2); + m_tc0100scn->set_offsets(3, 0); + m_tc0100scn->set_gfxdecode_tag(m_gfxdecode); + m_tc0100scn->set_palette_tag(m_palette); - MCFG_TC0360PRI_ADD("tc0360pri") + TC0360PRI(config, m_tc0360pri, 0); MACHINE_CONFIG_END @@ -3223,14 +3223,14 @@ MACHINE_CONFIG_START(taitof2_state::growl) MCFG_PALETTE_MODIFY("palette") MCFG_PALETTE_FORMAT(RRRRGGGGBBBBRGBx) - MCFG_DEVICE_ADD("tc0100scn", TC0100SCN, 0) - MCFG_TC0100SCN_GFX_REGION(1) - MCFG_TC0100SCN_TX_REGION(2) - MCFG_TC0100SCN_OFFSETS(3, 0) - MCFG_TC0100SCN_GFXDECODE("gfxdecode") - MCFG_TC0100SCN_PALETTE("palette") + TC0100SCN(config, m_tc0100scn, 0); + m_tc0100scn->set_gfx_region(1); + m_tc0100scn->set_tx_region(2); + m_tc0100scn->set_offsets(3, 0); + m_tc0100scn->set_gfxdecode_tag(m_gfxdecode); + m_tc0100scn->set_palette_tag(m_palette); - MCFG_TC0360PRI_ADD("tc0360pri") + TC0360PRI(config, m_tc0360pri, 0); MACHINE_CONFIG_END @@ -3244,13 +3244,13 @@ MACHINE_CONFIG_START(taitof2_state::mjnquest) /* video hardware */ MCFG_VIDEO_START_OVERRIDE(taitof2_state,taitof2_mjnquest) - MCFG_DEVICE_ADD("tc0100scn", TC0100SCN, 0) - MCFG_TC0100SCN_GFX_REGION(1) - MCFG_TC0100SCN_TX_REGION(2) - MCFG_TC0100SCN_GFXDECODE("gfxdecode") - MCFG_TC0100SCN_PALETTE("palette") + TC0100SCN(config, m_tc0100scn, 0); + m_tc0100scn->set_gfx_region(1); + m_tc0100scn->set_tx_region(2); + m_tc0100scn->set_gfxdecode_tag(m_gfxdecode); + m_tc0100scn->set_palette_tag(m_palette); - MCFG_DEVICE_ADD("tc0110pcr", TC0110PCR, 0, "palette") + TC0110PCR(config, m_tc0110pcr, 0, m_palette); MACHINE_CONFIG_END @@ -3268,15 +3268,15 @@ MACHINE_CONFIG_START(taitof2_state::footchmp) MCFG_SCREEN_UPDATE_DRIVER(taitof2_state, screen_update_taitof2_deadconx) MCFG_SCREEN_VBLANK_CALLBACK(WRITELINE(*this, taitof2_state, screen_vblank_full_buffer_delayed)) - MCFG_DEVICE_ADD("tc0480scp", TC0480SCP, 0) - MCFG_TC0480SCP_GFX_REGION(1) - MCFG_TC0480SCP_TX_REGION(2) - MCFG_TC0480SCP_OFFSETS(0x1d + 3, 0x08) - MCFG_TC0480SCP_OFFSETS_TX(-1, 0) - MCFG_TC0480SCP_OFFSETS_FLIP(-1, 0) - MCFG_TC0480SCP_GFXDECODE("gfxdecode") + TC0480SCP(config, m_tc0480scp, 0); + m_tc0480scp->set_gfx_region(1); + m_tc0480scp->set_tx_region(2); + m_tc0480scp->set_offsets(0x1d + 3, 0x08); + m_tc0480scp->set_offsets_tx(-1, 0); + m_tc0480scp->set_offsets_flip(-1, 0); + m_tc0480scp->set_gfxdecode_tag(m_gfxdecode); - MCFG_TC0360PRI_ADD("tc0360pri") + TC0360PRI(config, m_tc0360pri, 0); MACHINE_CONFIG_END MACHINE_CONFIG_START(taitof2_state::footchmpbl) @@ -3301,15 +3301,15 @@ MACHINE_CONFIG_START(taitof2_state::hthero) MCFG_SCREEN_UPDATE_DRIVER(taitof2_state, screen_update_taitof2_deadconx) MCFG_SCREEN_VBLANK_CALLBACK(WRITELINE(*this, taitof2_state, screen_vblank_full_buffer_delayed)) - MCFG_TC0360PRI_ADD("tc0360pri") + TC0360PRI(config, m_tc0360pri, 0); - MCFG_DEVICE_ADD("tc0480scp", TC0480SCP, 0) - MCFG_TC0480SCP_GFX_REGION(1) - MCFG_TC0480SCP_TX_REGION(2) - MCFG_TC0480SCP_OFFSETS(0x33 + 3, -0x04) - MCFG_TC0480SCP_OFFSETS_TX(-1, 0) - MCFG_TC0480SCP_OFFSETS_FLIP(-1, 0) - MCFG_TC0480SCP_GFXDECODE("gfxdecode") + TC0480SCP(config, m_tc0480scp, 0); + m_tc0480scp->set_gfx_region(1); + m_tc0480scp->set_tx_region(2); + m_tc0480scp->set_offsets(0x33 + 3, -0x04); + m_tc0480scp->set_offsets_tx(-1, 0); + m_tc0480scp->set_offsets_flip(-1, 0); + m_tc0480scp->set_gfxdecode_tag(m_gfxdecode); MACHINE_CONFIG_END @@ -3328,15 +3328,15 @@ MACHINE_CONFIG_START(taitof2_state::koshien) MCFG_PALETTE_MODIFY("palette") MCFG_PALETTE_FORMAT(RRRRGGGGBBBBRGBx) - MCFG_DEVICE_ADD("tc0100scn", TC0100SCN, 0) - MCFG_TC0100SCN_GFX_REGION(1) - MCFG_TC0100SCN_TX_REGION(2) - MCFG_TC0100SCN_OFFSETS(1, 0) - MCFG_TC0100SCN_OFFSETS_FLIP(2, 0) - MCFG_TC0100SCN_GFXDECODE("gfxdecode") - MCFG_TC0100SCN_PALETTE("palette") + TC0100SCN(config, m_tc0100scn, 0); + m_tc0100scn->set_gfx_region(1); + m_tc0100scn->set_tx_region(2); + m_tc0100scn->set_offsets(1, 0); + m_tc0100scn->set_offsets_flip(2, 0); + m_tc0100scn->set_gfxdecode_tag(m_gfxdecode); + m_tc0100scn->set_palette_tag(m_palette); - MCFG_TC0360PRI_ADD("tc0360pri") + TC0360PRI(config, m_tc0360pri, 0); MACHINE_CONFIG_END @@ -3356,12 +3356,12 @@ MACHINE_CONFIG_START(taitof2_state::yuyugogo) MCFG_SCREEN_MODIFY("screen") MCFG_SCREEN_UPDATE_DRIVER(taitof2_state, screen_update_taitof2_yesnoj) - MCFG_DEVICE_ADD("tc0100scn", TC0100SCN, 0) - MCFG_TC0100SCN_GFX_REGION(1) - MCFG_TC0100SCN_TX_REGION(2) - MCFG_TC0100SCN_OFFSETS(3, 0) - MCFG_TC0100SCN_GFXDECODE("gfxdecode") - MCFG_TC0100SCN_PALETTE("palette") + TC0100SCN(config, m_tc0100scn, 0); + m_tc0100scn->set_gfx_region(1); + m_tc0100scn->set_tx_region(2); + m_tc0100scn->set_offsets(3, 0); + m_tc0100scn->set_gfxdecode_tag(m_gfxdecode); + m_tc0100scn->set_palette_tag(m_palette); MACHINE_CONFIG_END @@ -3387,14 +3387,14 @@ MACHINE_CONFIG_START(taitof2_state::ninjak) MCFG_SCREEN_MODIFY("screen") MCFG_SCREEN_UPDATE_DRIVER(taitof2_state, screen_update_taitof2_pri) - MCFG_DEVICE_ADD("tc0100scn", TC0100SCN, 0) - MCFG_TC0100SCN_GFX_REGION(1) - MCFG_TC0100SCN_TX_REGION(2) - MCFG_TC0100SCN_OFFSETS(1, 0) - MCFG_TC0100SCN_GFXDECODE("gfxdecode") - MCFG_TC0100SCN_PALETTE("palette") + TC0100SCN(config, m_tc0100scn, 0); + m_tc0100scn->set_gfx_region(1); + m_tc0100scn->set_tx_region(2); + m_tc0100scn->set_offsets(1, 0); + m_tc0100scn->set_gfxdecode_tag(m_gfxdecode); + m_tc0100scn->set_palette_tag(m_palette); - MCFG_TC0360PRI_ADD("tc0360pri") + TC0360PRI(config, m_tc0360pri, 0); MACHINE_CONFIG_END @@ -3410,16 +3410,16 @@ MACHINE_CONFIG_START(taitof2_state::solfigtr) MCFG_SCREEN_MODIFY("screen") MCFG_SCREEN_UPDATE_DRIVER(taitof2_state, screen_update_taitof2_pri) - MCFG_DEVICE_ADD("tc0100scn", TC0100SCN, 0) - MCFG_TC0100SCN_GFX_REGION(1) - MCFG_TC0100SCN_TX_REGION(2) - MCFG_TC0100SCN_OFFSETS(3, 0) - MCFG_TC0100SCN_OFFSETS_FLIP(6, 0) - MCFG_TC0100SCN_OFFSETS_FLIPTX(6, 0) - MCFG_TC0100SCN_GFXDECODE("gfxdecode") - MCFG_TC0100SCN_PALETTE("palette") + TC0100SCN(config, m_tc0100scn, 0); + m_tc0100scn->set_gfx_region(1); + m_tc0100scn->set_tx_region(2); + m_tc0100scn->set_offsets(3, 0); + m_tc0100scn->set_offsets_flip(6, 0); + m_tc0100scn->set_offsets_fliptx(6, 0); + m_tc0100scn->set_gfxdecode_tag(m_gfxdecode); + m_tc0100scn->set_palette_tag(m_palette); - MCFG_TC0360PRI_ADD("tc0360pri") + TC0360PRI(config, m_tc0360pri, 0); MACHINE_CONFIG_END @@ -3434,11 +3434,11 @@ MACHINE_CONFIG_START(taitof2_state::qzquest) MCFG_SCREEN_MODIFY("screen") MCFG_SCREEN_VBLANK_CALLBACK(WRITELINE(*this, taitof2_state, screen_vblank_partial_buffer_delayed)) - MCFG_DEVICE_ADD("tc0100scn", TC0100SCN, 0) - MCFG_TC0100SCN_GFX_REGION(1) - MCFG_TC0100SCN_TX_REGION(2) - MCFG_TC0100SCN_GFXDECODE("gfxdecode") - MCFG_TC0100SCN_PALETTE("palette") + TC0100SCN(config, m_tc0100scn, 0); + m_tc0100scn->set_gfx_region(1); + m_tc0100scn->set_tx_region(2); + m_tc0100scn->set_gfxdecode_tag(m_gfxdecode); + m_tc0100scn->set_palette_tag(m_palette); MACHINE_CONFIG_END @@ -3455,18 +3455,18 @@ MACHINE_CONFIG_START(taitof2_state::pulirula) MCFG_SCREEN_MODIFY("screen") MCFG_SCREEN_UPDATE_DRIVER(taitof2_state, screen_update_taitof2_pri_roz) - MCFG_DEVICE_ADD("tc0100scn", TC0100SCN, 0) - MCFG_TC0100SCN_GFX_REGION(1) - MCFG_TC0100SCN_TX_REGION(3) - MCFG_TC0100SCN_OFFSETS(3, 0) - MCFG_TC0100SCN_GFXDECODE("gfxdecode") - MCFG_TC0100SCN_PALETTE("palette") + TC0100SCN(config, m_tc0100scn, 0); + m_tc0100scn->set_gfx_region(1); + m_tc0100scn->set_tx_region(3); + m_tc0100scn->set_offsets(3, 0); + m_tc0100scn->set_gfxdecode_tag(m_gfxdecode); + m_tc0100scn->set_palette_tag(m_palette); - MCFG_DEVICE_ADD("tc0430grw", TC0430GRW, 0) - MCFG_TC0430GRW_GFX_REGION(2) - MCFG_TC0430GRW_GFXDECODE("gfxdecode") + TC0430GRW(config, m_tc0430grw, 0); + m_tc0430grw->set_gfx_region(2); + m_tc0430grw->set_gfxdecode_tag(m_gfxdecode); - MCFG_TC0360PRI_ADD("tc0360pri") + TC0360PRI(config, m_tc0360pri, 0); MACHINE_CONFIG_END @@ -3487,16 +3487,16 @@ MACHINE_CONFIG_START(taitof2_state::metalb) MCFG_SCREEN_MODIFY("screen") MCFG_SCREEN_UPDATE_DRIVER(taitof2_state, screen_update_taitof2_metalb) - MCFG_DEVICE_ADD("tc0480scp", TC0480SCP, 0) - MCFG_TC0480SCP_GFX_REGION(1) - MCFG_TC0480SCP_TX_REGION(2) - MCFG_TC0480SCP_OFFSETS(0x32 + 3, -0x04) - MCFG_TC0480SCP_OFFSETS_TX(1, 0) - MCFG_TC0480SCP_OFFSETS_FLIP(-1, 0) - MCFG_TC0480SCP_COL_BASE(4096) - MCFG_TC0480SCP_GFXDECODE("gfxdecode") + TC0480SCP(config, m_tc0480scp, 0); + m_tc0480scp->set_gfx_region(1); + m_tc0480scp->set_tx_region(2); + m_tc0480scp->set_offsets(0x32 + 3, -0x04); + m_tc0480scp->set_offsets_tx(1, 0); + m_tc0480scp->set_offsets_flip(-1, 0); + m_tc0480scp->set_col_base(4096); + m_tc0480scp->set_gfxdecode_tag(m_gfxdecode); - MCFG_TC0360PRI_ADD("tc0360pri") + TC0360PRI(config, m_tc0360pri, 0); MACHINE_CONFIG_END @@ -3512,14 +3512,14 @@ MACHINE_CONFIG_START(taitof2_state::qzchikyu) MCFG_SCREEN_MODIFY("screen") MCFG_SCREEN_VBLANK_CALLBACK(WRITELINE(*this, taitof2_state, screen_vblank_partial_buffer_delayed_qzchikyu)) - MCFG_DEVICE_ADD("tc0100scn", TC0100SCN, 0) - MCFG_TC0100SCN_GFX_REGION(1) - MCFG_TC0100SCN_TX_REGION(2) - MCFG_TC0100SCN_OFFSETS(0, 0) - MCFG_TC0100SCN_OFFSETS_FLIP(-4, 0) - MCFG_TC0100SCN_OFFSETS_FLIPTX(-11, 0) - MCFG_TC0100SCN_GFXDECODE("gfxdecode") - MCFG_TC0100SCN_PALETTE("palette") + TC0100SCN(config, m_tc0100scn, 0); + m_tc0100scn->set_gfx_region(1); + m_tc0100scn->set_tx_region(2); + m_tc0100scn->set_offsets(0, 0); + m_tc0100scn->set_offsets_flip(-4, 0); + m_tc0100scn->set_offsets_fliptx(-11, 0); + m_tc0100scn->set_gfxdecode_tag(m_gfxdecode); + m_tc0100scn->set_palette_tag(m_palette); MACHINE_CONFIG_END @@ -3539,12 +3539,12 @@ MACHINE_CONFIG_START(taitof2_state::yesnoj) MCFG_SCREEN_MODIFY("screen") MCFG_SCREEN_UPDATE_DRIVER(taitof2_state, screen_update_taitof2_yesnoj) - MCFG_DEVICE_ADD("tc0100scn", TC0100SCN, 0) - MCFG_TC0100SCN_GFX_REGION(1) - MCFG_TC0100SCN_TX_REGION(2) - MCFG_TC0100SCN_OFFSETS(3, 0) - MCFG_TC0100SCN_GFXDECODE("gfxdecode") - MCFG_TC0100SCN_PALETTE("palette") + TC0100SCN(config, m_tc0100scn, 0); + m_tc0100scn->set_gfx_region(1); + m_tc0100scn->set_tx_region(2); + m_tc0100scn->set_offsets(3, 0); + m_tc0100scn->set_gfxdecode_tag(m_gfxdecode); + m_tc0100scn->set_palette_tag(m_palette); TC8521(config, "rtc", XTAL(32'768)); MACHINE_CONFIG_END @@ -3566,15 +3566,15 @@ MACHINE_CONFIG_START(taitof2_state::deadconx) MCFG_SCREEN_MODIFY("screen") MCFG_SCREEN_UPDATE_DRIVER(taitof2_state, screen_update_taitof2_deadconx) - MCFG_DEVICE_ADD("tc0480scp", TC0480SCP, 0) - MCFG_TC0480SCP_GFX_REGION(1) - MCFG_TC0480SCP_TX_REGION(2) - MCFG_TC0480SCP_OFFSETS(0x1e + 3, 0x08) - MCFG_TC0480SCP_OFFSETS_TX(-1, 0) - MCFG_TC0480SCP_OFFSETS_FLIP(-1, 0) - MCFG_TC0480SCP_GFXDECODE("gfxdecode") + TC0480SCP(config, m_tc0480scp, 0); + m_tc0480scp->set_gfx_region(1); + m_tc0480scp->set_tx_region(2); + m_tc0480scp->set_offsets(0x1e + 3, 0x08); + m_tc0480scp->set_offsets_tx(-1, 0); + m_tc0480scp->set_offsets_flip(-1, 0); + m_tc0480scp->set_gfxdecode_tag(m_gfxdecode); - MCFG_TC0360PRI_ADD("tc0360pri") + TC0360PRI(config, m_tc0360pri, 0); MACHINE_CONFIG_END @@ -3591,15 +3591,15 @@ MACHINE_CONFIG_START(taitof2_state::deadconxj) MCFG_SCREEN_MODIFY("screen") MCFG_SCREEN_UPDATE_DRIVER(taitof2_state, screen_update_taitof2_deadconx) - MCFG_DEVICE_ADD("tc0480scp", TC0480SCP, 0) - MCFG_TC0480SCP_GFX_REGION(1) - MCFG_TC0480SCP_TX_REGION(2) - MCFG_TC0480SCP_OFFSETS(0x34 + 3, -0x05) - MCFG_TC0480SCP_OFFSETS_TX(-1, 0) - MCFG_TC0480SCP_OFFSETS_FLIP(-1, 0) - MCFG_TC0480SCP_GFXDECODE("gfxdecode") + TC0480SCP(config, m_tc0480scp, 0); + m_tc0480scp->set_gfx_region(1); + m_tc0480scp->set_tx_region(2); + m_tc0480scp->set_offsets(0x34 + 3, -0x05); + m_tc0480scp->set_offsets_tx(-1, 0); + m_tc0480scp->set_offsets_flip(-1, 0); + m_tc0480scp->set_gfxdecode_tag(m_gfxdecode); - MCFG_TC0360PRI_ADD("tc0360pri") + TC0360PRI(config, m_tc0360pri, 0); MACHINE_CONFIG_END @@ -3618,14 +3618,14 @@ MACHINE_CONFIG_START(taitof2_state::dinorex) MCFG_PALETTE_MODIFY("palette") MCFG_PALETTE_FORMAT(RRRRGGGGBBBBRGBx) - MCFG_DEVICE_ADD("tc0100scn", TC0100SCN, 0) - MCFG_TC0100SCN_GFX_REGION(1) - MCFG_TC0100SCN_TX_REGION(2) - MCFG_TC0100SCN_OFFSETS(3, 0) - MCFG_TC0100SCN_GFXDECODE("gfxdecode") - MCFG_TC0100SCN_PALETTE("palette") + TC0100SCN(config, m_tc0100scn, 0); + m_tc0100scn->set_gfx_region(1); + m_tc0100scn->set_tx_region(2); + m_tc0100scn->set_offsets(3, 0); + m_tc0100scn->set_gfxdecode_tag(m_gfxdecode); + m_tc0100scn->set_palette_tag(m_palette); - MCFG_TC0360PRI_ADD("tc0360pri") + TC0360PRI(config, m_tc0360pri, 0); MACHINE_CONFIG_END @@ -3644,14 +3644,14 @@ MACHINE_CONFIG_START(taitof2_state::qjinsei) MCFG_PALETTE_MODIFY("palette") MCFG_PALETTE_FORMAT(RRRRGGGGBBBBRGBx) - MCFG_DEVICE_ADD("tc0100scn", TC0100SCN, 0) - MCFG_TC0100SCN_GFX_REGION(1) - MCFG_TC0100SCN_TX_REGION(2) - MCFG_TC0100SCN_OFFSETS(3, 0) - MCFG_TC0100SCN_GFXDECODE("gfxdecode") - MCFG_TC0100SCN_PALETTE("palette") + TC0100SCN(config, m_tc0100scn, 0); + m_tc0100scn->set_gfx_region(1); + m_tc0100scn->set_tx_region(2); + m_tc0100scn->set_offsets(3, 0); + m_tc0100scn->set_gfxdecode_tag(m_gfxdecode); + m_tc0100scn->set_palette_tag(m_palette); - MCFG_TC0360PRI_ADD("tc0360pri") + TC0360PRI(config, m_tc0360pri, 0); MACHINE_CONFIG_END @@ -3670,14 +3670,14 @@ MACHINE_CONFIG_START(taitof2_state::qcrayon) MCFG_PALETTE_MODIFY("palette") MCFG_PALETTE_FORMAT(RRRRGGGGBBBBRGBx) - MCFG_DEVICE_ADD("tc0100scn", TC0100SCN, 0) - MCFG_TC0100SCN_GFX_REGION(1) - MCFG_TC0100SCN_TX_REGION(2) - MCFG_TC0100SCN_OFFSETS(3, 0) - MCFG_TC0100SCN_GFXDECODE("gfxdecode") - MCFG_TC0100SCN_PALETTE("palette") + TC0100SCN(config, m_tc0100scn, 0); + m_tc0100scn->set_gfx_region(1); + m_tc0100scn->set_tx_region(2); + m_tc0100scn->set_offsets(3, 0); + m_tc0100scn->set_gfxdecode_tag(m_gfxdecode); + m_tc0100scn->set_palette_tag(m_palette); - MCFG_TC0360PRI_ADD("tc0360pri") + TC0360PRI(config, m_tc0360pri, 0); MACHINE_CONFIG_END @@ -3696,14 +3696,14 @@ MACHINE_CONFIG_START(taitof2_state::qcrayon2) MCFG_PALETTE_MODIFY("palette") MCFG_PALETTE_FORMAT(RRRRGGGGBBBBRGBx) - MCFG_DEVICE_ADD("tc0100scn", TC0100SCN, 0) - MCFG_TC0100SCN_GFX_REGION(1) - MCFG_TC0100SCN_TX_REGION(2) - MCFG_TC0100SCN_OFFSETS(3, 0) - MCFG_TC0100SCN_GFXDECODE("gfxdecode") - MCFG_TC0100SCN_PALETTE("palette") + TC0100SCN(config, m_tc0100scn, 0); + m_tc0100scn->set_gfx_region(1); + m_tc0100scn->set_tx_region(2); + m_tc0100scn->set_offsets(3, 0); + m_tc0100scn->set_gfxdecode_tag(m_gfxdecode); + m_tc0100scn->set_palette_tag(m_palette); - MCFG_TC0360PRI_ADD("tc0360pri") + TC0360PRI(config, m_tc0360pri, 0); MACHINE_CONFIG_END @@ -3721,18 +3721,18 @@ MACHINE_CONFIG_START(taitof2_state::driftout) MCFG_SCREEN_MODIFY("screen") MCFG_SCREEN_UPDATE_DRIVER(taitof2_state, screen_update_taitof2_pri_roz) - MCFG_DEVICE_ADD("tc0100scn", TC0100SCN, 0) - MCFG_TC0100SCN_GFX_REGION(1) - MCFG_TC0100SCN_TX_REGION(3) - MCFG_TC0100SCN_OFFSETS(3, 0) - MCFG_TC0100SCN_GFXDECODE("gfxdecode") - MCFG_TC0100SCN_PALETTE("palette") + TC0100SCN(config, m_tc0100scn, 0); + m_tc0100scn->set_gfx_region(1); + m_tc0100scn->set_tx_region(3); + m_tc0100scn->set_offsets(3, 0); + m_tc0100scn->set_gfxdecode_tag(m_gfxdecode); + m_tc0100scn->set_palette_tag(m_palette); - MCFG_DEVICE_ADD("tc0430grw", TC0430GRW, 0) - MCFG_TC0430GRW_GFX_REGION(2) - MCFG_TC0430GRW_GFXDECODE("gfxdecode") + TC0430GRW(config, m_tc0430grw, 0); + m_tc0430grw->set_gfx_region(2); + m_tc0430grw->set_gfxdecode_tag(m_gfxdecode); - MCFG_TC0360PRI_ADD("tc0360pri") + TC0360PRI(config, m_tc0360pri, 0); MACHINE_CONFIG_END @@ -3772,18 +3772,18 @@ MACHINE_CONFIG_START(taitof2_state::cameltrya) MCFG_VIDEO_START_OVERRIDE(taitof2_state,taitof2_dondokod) - MCFG_DEVICE_ADD("tc0100scn", TC0100SCN, 0) - MCFG_TC0100SCN_GFX_REGION(1) - MCFG_TC0100SCN_TX_REGION(3) - MCFG_TC0100SCN_OFFSETS(3, 0) - MCFG_TC0100SCN_GFXDECODE("gfxdecode") - MCFG_TC0100SCN_PALETTE("palette") + TC0100SCN(config, m_tc0100scn, 0); + m_tc0100scn->set_gfx_region(1); + m_tc0100scn->set_tx_region(3); + m_tc0100scn->set_offsets(3, 0); + m_tc0100scn->set_gfxdecode_tag(m_gfxdecode); + m_tc0100scn->set_palette_tag(m_palette); - MCFG_DEVICE_ADD("tc0280grd", TC0280GRD, 0) - MCFG_TC0280GRD_GFX_REGION(2) - MCFG_TC0280GRD_GFXDECODE("gfxdecode"); + TC0280GRD(config, m_tc0280grd, 0); + m_tc0280grd->set_gfx_region(2); + m_tc0280grd->set_gfxdecode_tag(m_gfxdecode); - MCFG_TC0360PRI_ADD("tc0360pri") + TC0360PRI(config, m_tc0360pri, 0); /* sound hardware */ SPEAKER(config, "mono").front_center(); @@ -3841,18 +3841,18 @@ MACHINE_CONFIG_START(taitof2_state::driveout) MCFG_VIDEO_START_OVERRIDE(taitof2_state,taitof2_driftout) - MCFG_DEVICE_ADD("tc0100scn", TC0100SCN, 0) - MCFG_TC0100SCN_GFX_REGION(1) - MCFG_TC0100SCN_TX_REGION(3) - MCFG_TC0100SCN_OFFSETS(3, 0) - MCFG_TC0100SCN_GFXDECODE("gfxdecode") - MCFG_TC0100SCN_PALETTE("palette") + TC0100SCN(config, m_tc0100scn, 0); + m_tc0100scn->set_gfx_region(1); + m_tc0100scn->set_tx_region(3); + m_tc0100scn->set_offsets(3, 0); + m_tc0100scn->set_gfxdecode_tag(m_gfxdecode); + m_tc0100scn->set_palette_tag(m_palette); - MCFG_DEVICE_ADD("tc0430grw", TC0430GRW, 0) - MCFG_TC0430GRW_GFX_REGION(2) - MCFG_TC0430GRW_GFXDECODE("gfxdecode") + TC0430GRW(config, m_tc0430grw, 0); + m_tc0430grw->set_gfx_region(2); + m_tc0430grw->set_gfxdecode_tag(m_gfxdecode); - MCFG_TC0360PRI_ADD("tc0360pri") + TC0360PRI(config, m_tc0360pri, 0); /* sound hardware */ SPEAKER(config, "lspeaker").front_left(); /* does it ? */ diff --git a/src/mame/drivers/taito_h.cpp b/src/mame/drivers/taito_h.cpp index 1f1dd869f4e..ddbe669cd30 100644 --- a/src/mame/drivers/taito_h.cpp +++ b/src/mame/drivers/taito_h.cpp @@ -678,12 +678,12 @@ MACHINE_CONFIG_START(taitoh_state::syvalion) MCFG_PALETTE_ADD(m_palette, 33*16) MCFG_PALETTE_FORMAT(xBBBBBGGGGGRRRRR) - MCFG_DEVICE_ADD("tc0080vco", TC0080VCO, 0) - MCFG_TC0080VCO_GFX_REGION(0) - MCFG_TC0080VCO_TX_REGION(1) - MCFG_TC0080VCO_OFFSETS(1, 1) - MCFG_TC0080VCO_BGFLIP_OFFS(-2) - MCFG_TC0080VCO_GFXDECODE("gfxdecode") + TC0080VCO(config, m_tc0080vco, 0); + m_tc0080vco->set_gfx_region(0); + m_tc0080vco->set_tx_region(1); + m_tc0080vco->set_offsets(1, 1); + m_tc0080vco->set_bgflip_yoffs(-2); + m_tc0080vco->set_gfxdecode_tag(m_gfxdecode); /* sound hardware */ SPEAKER(config, "mono").front_center(); @@ -734,12 +734,12 @@ MACHINE_CONFIG_START(taitoh_state::recordbr) MCFG_PALETTE_ADD(m_palette, 32*16) MCFG_PALETTE_FORMAT(xBBBBBGGGGGRRRRR) - MCFG_DEVICE_ADD("tc0080vco", TC0080VCO, 0) - MCFG_TC0080VCO_GFX_REGION(0) - MCFG_TC0080VCO_TX_REGION(1) - MCFG_TC0080VCO_OFFSETS(1, 1) - MCFG_TC0080VCO_BGFLIP_OFFS(-2) - MCFG_TC0080VCO_GFXDECODE("gfxdecode") + TC0080VCO(config, m_tc0080vco, 0); + m_tc0080vco->set_gfx_region(0); + m_tc0080vco->set_tx_region(1); + m_tc0080vco->set_offsets(1, 1); + m_tc0080vco->set_bgflip_yoffs(-2); + m_tc0080vco->set_gfxdecode_tag(m_gfxdecode); /* sound hardware */ SPEAKER(config, "mono").front_center(); @@ -801,12 +801,12 @@ MACHINE_CONFIG_START(taitoh_state::dleague) MCFG_PALETTE_ADD(m_palette, 33*16) MCFG_PALETTE_FORMAT(xBBBBBGGGGGRRRRR) - MCFG_DEVICE_ADD("tc0080vco", TC0080VCO, 0) - MCFG_TC0080VCO_GFX_REGION(0) - MCFG_TC0080VCO_TX_REGION(1) - MCFG_TC0080VCO_OFFSETS(1, 1) - MCFG_TC0080VCO_BGFLIP_OFFS(-2) - MCFG_TC0080VCO_GFXDECODE("gfxdecode") + TC0080VCO(config, m_tc0080vco, 0); + m_tc0080vco->set_gfx_region(0); + m_tc0080vco->set_tx_region(1); + m_tc0080vco->set_offsets(1, 1); + m_tc0080vco->set_bgflip_yoffs(-2); + m_tc0080vco->set_gfxdecode_tag(m_gfxdecode); /* sound hardware */ SPEAKER(config, "mono").front_center(); diff --git a/src/mame/drivers/taito_o.cpp b/src/mame/drivers/taito_o.cpp index b856525e00c..308ffc471ce 100644 --- a/src/mame/drivers/taito_o.cpp +++ b/src/mame/drivers/taito_o.cpp @@ -253,12 +253,12 @@ MACHINE_CONFIG_START(taitoo_state::parentj) MCFG_PALETTE_ADD("palette", 33*16) MCFG_PALETTE_FORMAT(xBBBBBGGGGGRRRRR) - MCFG_DEVICE_ADD("tc0080vco", TC0080VCO, 0) - MCFG_TC0080VCO_GFX_REGION(0) - MCFG_TC0080VCO_TX_REGION(1) - MCFG_TC0080VCO_OFFSETS(1, 1) - MCFG_TC0080VCO_BGFLIP_OFFS(-2) - MCFG_TC0080VCO_GFXDECODE("gfxdecode") + TC0080VCO(config, m_tc0080vco, 0); + m_tc0080vco->set_gfx_region(0); + m_tc0080vco->set_tx_region(1); + m_tc0080vco->set_offsets(1, 1); + m_tc0080vco->set_bgflip_yoffs(-2); + m_tc0080vco->set_gfxdecode_tag(m_gfxdecode); SPEAKER(config, "mono").front_center(); diff --git a/src/mame/drivers/taito_x.cpp b/src/mame/drivers/taito_x.cpp index ef42d027573..eb3847a1c43 100644 --- a/src/mame/drivers/taito_x.cpp +++ b/src/mame/drivers/taito_x.cpp @@ -849,8 +849,8 @@ MACHINE_CONFIG_START(taitox_state::superman) MCFG_MACHINE_START_OVERRIDE(taitox_state,taitox) - MCFG_DEVICE_ADD("spritegen", SETA001_SPRITE, 0) - MCFG_SETA001_SPRITE_GFXDECODE("gfxdecode") + SETA001_SPRITE(config, m_seta001, 0); + m_seta001->set_gfxdecode_tag(m_gfxdecode); /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) @@ -897,8 +897,8 @@ MACHINE_CONFIG_START(taitox_state::daisenpu) MCFG_MACHINE_START_OVERRIDE(taitox_state,taitox) - MCFG_DEVICE_ADD("spritegen", SETA001_SPRITE, 0) - MCFG_SETA001_SPRITE_GFXDECODE("gfxdecode") + SETA001_SPRITE(config, m_seta001, 0); + m_seta001->set_gfxdecode_tag(m_gfxdecode); /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) @@ -943,8 +943,8 @@ MACHINE_CONFIG_START(taitox_state::gigandes) MCFG_MACHINE_START_OVERRIDE(taitox_state,taitox) - MCFG_DEVICE_ADD("spritegen", SETA001_SPRITE, 0) - MCFG_SETA001_SPRITE_GFXDECODE("gfxdecode") + SETA001_SPRITE(config, m_seta001, 0); + m_seta001->set_gfxdecode_tag(m_gfxdecode); /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) @@ -991,8 +991,8 @@ MACHINE_CONFIG_START(taitox_state::ballbros) MCFG_MACHINE_START_OVERRIDE(taitox_state,taitox) - MCFG_DEVICE_ADD("spritegen", SETA001_SPRITE, 0) - MCFG_SETA001_SPRITE_GFXDECODE("gfxdecode") + SETA001_SPRITE(config, m_seta001, 0); + m_seta001->set_gfxdecode_tag(m_gfxdecode); /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) diff --git a/src/mame/drivers/taito_z.cpp b/src/mame/drivers/taito_z.cpp index 5f53d8195d9..5c5381039b6 100644 --- a/src/mame/drivers/taito_z.cpp +++ b/src/mame/drivers/taito_z.cpp @@ -3219,15 +3219,15 @@ MACHINE_CONFIG_START(taitoz_state::contcirc) MCFG_VIDEO_START_OVERRIDE(taitoz_state,taitoz) - MCFG_DEVICE_ADD("tc0100scn", TC0100SCN, 0) - MCFG_TC0100SCN_GFX_REGION(1) - MCFG_TC0100SCN_TX_REGION(2) - MCFG_TC0100SCN_GFXDECODE("gfxdecode") - MCFG_TC0100SCN_PALETTE("palette") + TC0100SCN(config, m_tc0100scn, 0); + m_tc0100scn->set_gfx_region(1); + m_tc0100scn->set_tx_region(2); + m_tc0100scn->set_gfxdecode_tag(m_gfxdecode); + m_tc0100scn->set_palette_tag("palette"); - MCFG_DEVICE_ADD("tc0150rod", TC0150ROD, 0) + TC0150ROD(config, m_tc0150rod, 0); - MCFG_DEVICE_ADD("tc0110pcr", TC0110PCR, 0, "palette") + TC0110PCR(config, m_tc0110pcr, 0, "palette"); /* sound hardware */ SPEAKER(config, "front").front_center(); @@ -3293,15 +3293,15 @@ MACHINE_CONFIG_START(taitoz_state::chasehq) MCFG_VIDEO_START_OVERRIDE(taitoz_state,taitoz) - MCFG_DEVICE_ADD("tc0100scn", TC0100SCN, 0) - MCFG_TC0100SCN_GFX_REGION(1) - MCFG_TC0100SCN_TX_REGION(3) - MCFG_TC0100SCN_GFXDECODE("gfxdecode") - MCFG_TC0100SCN_PALETTE("palette") + TC0100SCN(config, m_tc0100scn, 0); + m_tc0100scn->set_gfx_region(1); + m_tc0100scn->set_tx_region(3); + m_tc0100scn->set_gfxdecode_tag(m_gfxdecode); + m_tc0100scn->set_palette_tag("palette"); - MCFG_DEVICE_ADD("tc0150rod", TC0150ROD, 0) + TC0150ROD(config, m_tc0150rod, 0); - MCFG_DEVICE_ADD("tc0110pcr", TC0110PCR, 0, "palette") + TC0110PCR(config, m_tc0110pcr, 0, "palette"); /* sound hardware */ SPEAKER(config, "front").front_center(); @@ -3369,15 +3369,15 @@ MACHINE_CONFIG_START(taitoz_state::enforce) MCFG_VIDEO_START_OVERRIDE(taitoz_state,taitoz) - MCFG_DEVICE_ADD("tc0100scn", TC0100SCN, 0) - MCFG_TC0100SCN_GFX_REGION(1) - MCFG_TC0100SCN_TX_REGION(2) - MCFG_TC0100SCN_GFXDECODE("gfxdecode") - MCFG_TC0100SCN_PALETTE("palette") + TC0100SCN(config, m_tc0100scn, 0); + m_tc0100scn->set_gfx_region(1); + m_tc0100scn->set_tx_region(2); + m_tc0100scn->set_gfxdecode_tag(m_gfxdecode); + m_tc0100scn->set_palette_tag("palette"); - MCFG_DEVICE_ADD("tc0150rod", TC0150ROD, 0) + TC0150ROD(config, m_tc0150rod, 0); - MCFG_DEVICE_ADD("tc0110pcr", TC0110PCR, 0, "palette") + TC0110PCR(config, m_tc0110pcr, 0, "palette"); /* sound hardware */ SPEAKER(config, "lspeaker").front_left(); @@ -3440,13 +3440,13 @@ MACHINE_CONFIG_START(taitoz_state::bshark_base) MCFG_VIDEO_START_OVERRIDE(taitoz_state,taitoz) - MCFG_DEVICE_ADD("tc0100scn", TC0100SCN, 0) - MCFG_TC0100SCN_GFX_REGION(1) - MCFG_TC0100SCN_TX_REGION(2) - MCFG_TC0100SCN_GFXDECODE("gfxdecode") - MCFG_TC0100SCN_PALETTE("palette") + TC0100SCN(config, m_tc0100scn, 0); + m_tc0100scn->set_gfx_region(1); + m_tc0100scn->set_tx_region(2); + m_tc0100scn->set_gfxdecode_tag(m_gfxdecode); + m_tc0100scn->set_palette_tag("palette"); - MCFG_DEVICE_ADD("tc0150rod", TC0150ROD, 0) + TC0150ROD(config, m_tc0150rod, 0); /* sound hardware */ SPEAKER(config, "lspeaker").front_left(); @@ -3528,13 +3528,13 @@ MACHINE_CONFIG_START(taitoz_state::sci) MCFG_VIDEO_START_OVERRIDE(taitoz_state,taitoz) - MCFG_DEVICE_ADD("tc0100scn", TC0100SCN, 0) - MCFG_TC0100SCN_GFX_REGION(1) - MCFG_TC0100SCN_TX_REGION(2) - MCFG_TC0100SCN_GFXDECODE("gfxdecode") - MCFG_TC0100SCN_PALETTE("palette") + TC0100SCN(config, m_tc0100scn, 0); + m_tc0100scn->set_gfx_region(1); + m_tc0100scn->set_tx_region(2); + m_tc0100scn->set_gfxdecode_tag(m_gfxdecode); + m_tc0100scn->set_palette_tag("palette"); - MCFG_DEVICE_ADD("tc0150rod", TC0150ROD, 0) + TC0150ROD(config, m_tc0150rod, 0); /* sound hardware */ SPEAKER(config, "lspeaker").front_left(); @@ -3609,15 +3609,15 @@ MACHINE_CONFIG_START(taitoz_state::nightstr) MCFG_VIDEO_START_OVERRIDE(taitoz_state,taitoz) - MCFG_DEVICE_ADD("tc0100scn", TC0100SCN, 0) - MCFG_TC0100SCN_GFX_REGION(1) - MCFG_TC0100SCN_TX_REGION(3) - MCFG_TC0100SCN_GFXDECODE("gfxdecode") - MCFG_TC0100SCN_PALETTE("palette") + TC0100SCN(config, m_tc0100scn, 0); + m_tc0100scn->set_gfx_region(1); + m_tc0100scn->set_tx_region(3); + m_tc0100scn->set_gfxdecode_tag(m_gfxdecode); + m_tc0100scn->set_palette_tag("palette"); - MCFG_DEVICE_ADD("tc0150rod", TC0150ROD, 0) + TC0150ROD(config, m_tc0150rod, 0); - MCFG_DEVICE_ADD("tc0110pcr", TC0110PCR, 0, "palette") + TC0110PCR(config, m_tc0110pcr, 0, "palette"); /* sound hardware */ SPEAKER(config, "front").front_center(); @@ -3685,15 +3685,15 @@ MACHINE_CONFIG_START(taitoz_state::aquajack) MCFG_VIDEO_START_OVERRIDE(taitoz_state,taitoz) - MCFG_DEVICE_ADD("tc0100scn", TC0100SCN, 0) - MCFG_TC0100SCN_GFX_REGION(1) - MCFG_TC0100SCN_TX_REGION(2) - MCFG_TC0100SCN_GFXDECODE("gfxdecode") - MCFG_TC0100SCN_PALETTE("palette") + TC0100SCN(config, m_tc0100scn, 0); + m_tc0100scn->set_gfx_region(1); + m_tc0100scn->set_tx_region(2); + m_tc0100scn->set_gfxdecode_tag(m_gfxdecode); + m_tc0100scn->set_palette_tag("palette"); - MCFG_DEVICE_ADD("tc0150rod", TC0150ROD, 0) + TC0150ROD(config, m_tc0150rod, 0); - MCFG_DEVICE_ADD("tc0110pcr", TC0110PCR, 0, "palette") + TC0110PCR(config, m_tc0110pcr, 0, "palette"); /* sound hardware */ SPEAKER(config, "lspeaker").front_left(); @@ -3764,14 +3764,14 @@ MACHINE_CONFIG_START(taitoz_state::spacegun) MCFG_PALETTE_ADD("palette", 4096) MCFG_PALETTE_FORMAT(xBBBBBGGGGGRRRRR) - MCFG_DEVICE_ADD("tc0100scn", TC0100SCN, 0) - MCFG_TC0100SCN_GFX_REGION(1) - MCFG_TC0100SCN_TX_REGION(2) - MCFG_TC0100SCN_OFFSETS(4, 0) - MCFG_TC0100SCN_GFXDECODE("gfxdecode") - MCFG_TC0100SCN_PALETTE("palette") + TC0100SCN(config, m_tc0100scn, 0); + m_tc0100scn->set_gfx_region(1); + m_tc0100scn->set_tx_region(2); + m_tc0100scn->set_offsets(4, 0); + m_tc0100scn->set_gfxdecode_tag(m_gfxdecode); + m_tc0100scn->set_palette_tag("palette"); - MCFG_DEVICE_ADD("tc0110pcr", TC0110PCR, 0, "palette") + TC0110PCR(config, m_tc0110pcr, 0, "palette"); /* sound hardware */ SPEAKER(config, "lspeaker").front_left(); @@ -3836,13 +3836,13 @@ MACHINE_CONFIG_START(taitoz_state::dblaxle) MCFG_VIDEO_START_OVERRIDE(taitoz_state,taitoz) - MCFG_DEVICE_ADD("tc0480scp", TC0480SCP, 0) - MCFG_TC0480SCP_GFX_REGION(1) - MCFG_TC0480SCP_TX_REGION(2) - MCFG_TC0480SCP_OFFSETS(0x1f, 0x08) - MCFG_TC0480SCP_GFXDECODE("gfxdecode") + TC0480SCP(config, m_tc0480scp, 0); + m_tc0480scp->set_gfx_region(1); + m_tc0480scp->set_tx_region(2); + m_tc0480scp->set_offsets(0x1f, 0x08); + m_tc0480scp->set_gfxdecode_tag(m_gfxdecode); - MCFG_DEVICE_ADD("tc0150rod", TC0150ROD, 0) + TC0150ROD(config, m_tc0150rod, 0); /* sound hardware */ SPEAKER(config, "lspeaker").front_left(); @@ -3909,13 +3909,13 @@ MACHINE_CONFIG_START(taitoz_state::racingb) MCFG_PALETTE_FORMAT(xBBBBBGGGGGRRRRR) MCFG_VIDEO_START_OVERRIDE(taitoz_state,taitoz) - MCFG_DEVICE_ADD("tc0480scp", TC0480SCP, 0) - MCFG_TC0480SCP_GFX_REGION(1) - MCFG_TC0480SCP_TX_REGION(2) - MCFG_TC0480SCP_OFFSETS(0x1f, 0x08) - MCFG_TC0480SCP_GFXDECODE("gfxdecode") + TC0480SCP(config, m_tc0480scp, 0); + m_tc0480scp->set_gfx_region(1); + m_tc0480scp->set_tx_region(2); + m_tc0480scp->set_offsets(0x1f, 0x08); + m_tc0480scp->set_gfxdecode_tag(m_gfxdecode); - MCFG_DEVICE_ADD("tc0150rod", TC0150ROD, 0) + TC0150ROD(config, m_tc0150rod, 0); /* sound hardware */ SPEAKER(config, "lspeaker").front_left(); diff --git a/src/mame/drivers/taitoair.cpp b/src/mame/drivers/taitoair.cpp index 5e1ad21fd31..87df37dc19a 100644 --- a/src/mame/drivers/taitoair.cpp +++ b/src/mame/drivers/taitoair.cpp @@ -745,12 +745,12 @@ MACHINE_CONFIG_START(taitoair_state::airsys) MCFG_PALETTE_ADD_INIT_BLACK("palette", 512*16+512*16) - MCFG_DEVICE_ADD("tc0080vco", TC0080VCO, 0) - MCFG_TC0080VCO_GFX_REGION(0) - MCFG_TC0080VCO_TX_REGION(1) - MCFG_TC0080VCO_OFFSETS(1, 1) - MCFG_TC0080VCO_BGFLIP_OFFS(-2) - MCFG_TC0080VCO_GFXDECODE("gfxdecode") + TC0080VCO(config, m_tc0080vco, 0); + m_tc0080vco->set_gfx_region(0); + m_tc0080vco->set_tx_region(1); + m_tc0080vco->set_offsets(1, 1); + m_tc0080vco->set_bgflip_yoffs(-2); + m_tc0080vco->set_gfxdecode_tag(m_gfxdecode); /* sound hardware */ SPEAKER(config, "mono").front_center(); diff --git a/src/mame/drivers/taotaido.cpp b/src/mame/drivers/taotaido.cpp index 3b72e18936a..1742a073660 100644 --- a/src/mame/drivers/taotaido.cpp +++ b/src/mame/drivers/taotaido.cpp @@ -388,10 +388,10 @@ MACHINE_CONFIG_START(taotaido_state::taotaido) MCFG_PALETTE_ADD("palette", 0x800) MCFG_PALETTE_FORMAT(xRRRRRGGGGGBBBBB) - MCFG_DEVICE_ADD("vsystem_spr", VSYSTEM_SPR, 0) - MCFG_VSYSTEM_SPR_SET_TILE_INDIRECT( taotaido_state, tile_callback ) - MCFG_VSYSTEM_SPR_SET_GFXREGION(0) - MCFG_VSYSTEM_SPR_GFXDECODE("gfxdecode") + VSYSTEM_SPR(config, m_spr, 0); + m_spr->set_tile_indirect_cb(FUNC(taotaido_state::tile_callback), this); + m_spr->set_gfx_region(0); + m_spr->set_gfxdecode_tag(m_gfxdecode); /* sound hardware */ SPEAKER(config, "lspeaker").front_left(); diff --git a/src/mame/drivers/tbowl.cpp b/src/mame/drivers/tbowl.cpp index bcb31d00057..e3f381e251e 100644 --- a/src/mame/drivers/tbowl.cpp +++ b/src/mame/drivers/tbowl.cpp @@ -455,7 +455,7 @@ MACHINE_CONFIG_START(tbowl_state::tbowl) MCFG_PALETTE_ENDIANNESS(ENDIANNESS_BIG) config.set_default_layout(layout_dualhsxs); - MCFG_DEVICE_ADD("spritegen", TECMO_SPRITE, 0) + TECMO_SPRITE(config, m_sprgen, 0); MCFG_SCREEN_ADD("lscreen", RASTER) MCFG_SCREEN_REFRESH_RATE(60) diff --git a/src/mame/drivers/tecmo.cpp b/src/mame/drivers/tecmo.cpp index c5dfa0a140f..749e7314790 100644 --- a/src/mame/drivers/tecmo.cpp +++ b/src/mame/drivers/tecmo.cpp @@ -723,7 +723,7 @@ MACHINE_CONFIG_START(tecmo_state::rygar) MCFG_PALETTE_FORMAT(xxxxBBBBRRRRGGGG) MCFG_PALETTE_ENDIANNESS(ENDIANNESS_BIG) - MCFG_DEVICE_ADD("spritegen", TECMO_SPRITE, 0) + TECMO_SPRITE(config, m_sprgen, 0); /* sound hardware */ SPEAKER(config, "mono").front_center(); diff --git a/src/mame/drivers/tecmo16.cpp b/src/mame/drivers/tecmo16.cpp index b895fc43b89..f8a05d471c2 100644 --- a/src/mame/drivers/tecmo16.cpp +++ b/src/mame/drivers/tecmo16.cpp @@ -381,8 +381,8 @@ MACHINE_CONFIG_START(tecmo16_state::fstarfrc) MCFG_PALETTE_ADD_INIT_BLACK("palette", 4096) MCFG_PALETTE_FORMAT(xxxxBBBBGGGGRRRR) - MCFG_DEVICE_ADD("spritegen", TECMO_SPRITE, 0) - MCFG_TECMO_SPRITE_GFX_REGION(2) + TECMO_SPRITE(config, m_sprgen, 0); + m_sprgen->set_gfx_region(2); TECMO_MIXER(config, m_mixer, 0); m_mixer->set_mixer_shifts(10,9,4); diff --git a/src/mame/drivers/thedealr.cpp b/src/mame/drivers/thedealr.cpp index 72b8c77ad06..162a69351eb 100644 --- a/src/mame/drivers/thedealr.cpp +++ b/src/mame/drivers/thedealr.cpp @@ -554,8 +554,8 @@ MACHINE_CONFIG_START(thedealr_state::thedealr) WATCHDOG_TIMER(config, "watchdog"); - MCFG_DEVICE_ADD("spritegen", SETA001_SPRITE, 0) - MCFG_SETA001_SPRITE_GFXDECODE("gfxdecode") + SETA001_SPRITE(config, m_seta001, 0); + m_seta001->set_gfxdecode_tag("gfxdecode"); // video hardware screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER)); diff --git a/src/mame/drivers/tnzs.cpp b/src/mame/drivers/tnzs.cpp index 4c2fe4195cd..eed341491d0 100644 --- a/src/mame/drivers/tnzs.cpp +++ b/src/mame/drivers/tnzs.cpp @@ -1544,8 +1544,8 @@ MACHINE_CONFIG_START(tnzs_base_state::tnzs_base) MCFG_QUANTUM_PERFECT_CPU("maincpu") /* video hardware */ - MCFG_DEVICE_ADD("spritegen", SETA001_SPRITE, 0) - MCFG_SETA001_SPRITE_GFXDECODE("gfxdecode") + SETA001_SPRITE(config, m_seta001, 0); + m_seta001->set_gfxdecode_tag("gfxdecode"); MCFG_SCREEN_ADD("screen", RASTER) MCFG_SCREEN_REFRESH_RATE(60) diff --git a/src/mame/drivers/toaplan1.cpp b/src/mame/drivers/toaplan1.cpp index 4b11aa421d9..8599036800e 100644 --- a/src/mame/drivers/toaplan1.cpp +++ b/src/mame/drivers/toaplan1.cpp @@ -1936,7 +1936,9 @@ MACHINE_CONFIG_START(toaplan1_rallybik_state::rallybik) MCFG_SCREEN_VBLANK_CALLBACK(WRITELINE(*this, toaplan1_rallybik_state, screen_vblank_rallybik)) MCFG_SCREEN_PALETTE("palette") - MCFG_TOAPLAN_SCU_ADD("scu", "palette", 31, 15) + TOAPLAN_SCU(config, m_spritegen, 0); + m_spritegen->set_palette(m_palette); + m_spritegen->set_xoffsets(31, 15); MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_rallybik) MCFG_PALETTE_ADD("palette", (64*16)+(64*16)) diff --git a/src/mame/drivers/topspeed.cpp b/src/mame/drivers/topspeed.cpp index 169ea82ffc3..2867a02b7dd 100644 --- a/src/mame/drivers/topspeed.cpp +++ b/src/mame/drivers/topspeed.cpp @@ -585,15 +585,15 @@ MACHINE_CONFIG_START(topspeed_state::topspeed) z80ctc_device& ctc(Z80CTC(config, "ctc", XTAL(16'000'000) / 4)); ctc.intr_callback().set(FUNC(topspeed_state::z80ctc_to0)); - MCFG_DEVICE_ADD("pc080sn_1", PC080SN, 0) - MCFG_PC080SN_GFX_REGION(1) - MCFG_PC080SN_OFFSETS(0, 8) - MCFG_PC080SN_GFXDECODE("gfxdecode") - - MCFG_DEVICE_ADD("pc080sn_2", PC080SN, 0) - MCFG_PC080SN_GFX_REGION(1) - MCFG_PC080SN_OFFSETS(0, 8) - MCFG_PC080SN_GFXDECODE("gfxdecode") + PC080SN(config, m_pc080sn[0], 0); + m_pc080sn[0]->set_gfx_region(1); + m_pc080sn[0]->set_offsets(0, 8); + m_pc080sn[0]->set_gfxdecode_tag(m_gfxdecode); + + PC080SN(config, m_pc080sn[1], 0); + m_pc080sn[1]->set_gfx_region(1); + m_pc080sn[1]->set_offsets(0, 8); + m_pc080sn[1]->set_gfxdecode_tag(m_gfxdecode); pc060ha_device &ciu(PC060HA(config, "ciu", 0)); ciu.set_master_tag(m_maincpu); diff --git a/src/mame/drivers/twincobr.cpp b/src/mame/drivers/twincobr.cpp index 590f13c9a45..f60ab4b4eef 100644 --- a/src/mame/drivers/twincobr.cpp +++ b/src/mame/drivers/twincobr.cpp @@ -690,7 +690,9 @@ MACHINE_CONFIG_START(twincobr_state::twincobr) crtc.set_show_border_area(false); crtc.set_char_width(2); - MCFG_TOAPLAN_SCU_ADD("scu", "palette", 31, 15) + TOAPLAN_SCU(config, m_spritegen, 0); + m_spritegen->set_palette(m_palette); + m_spritegen->set_xoffsets(31, 15); MCFG_DEVICE_ADD("spriteram16", BUFFERED_SPRITERAM16) @@ -722,23 +724,23 @@ MACHINE_CONFIG_START(twincobr_state::twincobrw) MCFG_DEVICE_CLOCK(XTAL(10'000'000)) /* The export versions have a dedicated OSC for the M68000 on the top right of the board */ MACHINE_CONFIG_END -MACHINE_CONFIG_START(twincobr_state::fshark) +void twincobr_state::fshark(machine_config &config) +{ twincobr(config); m_mainlatch->q_out_cb<6>().set_nop(); m_coinlatch->q_out_cb<0>().set(FUNC(twincobr_state::dsp_int_w)); - MCFG_DEVICE_MODIFY("scu") - MCFG_TOAPLAN_SCU_SET_XOFFSETS(32, 14) -MACHINE_CONFIG_END + m_spritegen->set_xoffsets(32, 14); +} -MACHINE_CONFIG_START(twincobr_state::fsharkbt) +void twincobr_state::fsharkbt(machine_config &config) +{ fshark(config); - MCFG_DEVICE_ADD("mcu", I8741, XTAL(28'000'000)/16) + I8741(config, "mcu", XTAL(28'000'000)/16).set_disable(); /* Internal program code is not dumped */ /* Program Map is internal to the CPU */ - MCFG_DEVICE_DISABLE() /* Internal program code is not dumped */ -MACHINE_CONFIG_END +} diff --git a/src/mame/drivers/undrfire.cpp b/src/mame/drivers/undrfire.cpp index 673823c25fb..081d0e15eb1 100644 --- a/src/mame/drivers/undrfire.cpp +++ b/src/mame/drivers/undrfire.cpp @@ -598,22 +598,22 @@ MACHINE_CONFIG_START(undrfire_state::undrfire) MCFG_PALETTE_ADD("palette", 16384) MCFG_PALETTE_FORMAT(XRGB) - MCFG_DEVICE_ADD("tc0100scn", TC0100SCN, 0) - MCFG_TC0100SCN_GFX_REGION(2) - MCFG_TC0100SCN_TX_REGION(3) - MCFG_TC0100SCN_OFFSETS(50, 8) - MCFG_TC0100SCN_GFXDECODE("gfxdecode") - MCFG_TC0100SCN_PALETTE("palette") - - MCFG_DEVICE_ADD("tc0480scp", TC0480SCP, 0) - MCFG_TC0480SCP_GFX_REGION(1) - MCFG_TC0480SCP_TX_REGION(4) - MCFG_TC0480SCP_OFFSETS(0x24, 0) - MCFG_TC0480SCP_OFFSETS_TX(-1, 0) - MCFG_TC0480SCP_GFXDECODE("gfxdecode") + TC0100SCN(config, m_tc0100scn, 0); + m_tc0100scn->set_gfx_region(2); + m_tc0100scn->set_tx_region(3); + m_tc0100scn->set_offsets(50, 8); + m_tc0100scn->set_gfxdecode_tag(m_gfxdecode); + m_tc0100scn->set_palette_tag(m_palette); + + TC0480SCP(config, m_tc0480scp, 0); + m_tc0480scp->set_gfx_region(1); + m_tc0480scp->set_tx_region(4); + m_tc0480scp->set_offsets(0x24, 0); + m_tc0480scp->set_offsets_tx(-1, 0); + m_tc0480scp->set_gfxdecode_tag(m_gfxdecode); /* sound hardware */ - MCFG_DEVICE_ADD("taito_en", TAITO_EN, 0) + TAITO_EN(config, "taito_en", 0); MACHINE_CONFIG_END @@ -661,23 +661,23 @@ MACHINE_CONFIG_START(undrfire_state::cbombers) MCFG_PALETTE_ADD("palette", 16384) MCFG_PALETTE_FORMAT(XRGB) - MCFG_DEVICE_ADD("tc0100scn", TC0100SCN, 0) - MCFG_TC0100SCN_GFX_REGION(2) - MCFG_TC0100SCN_TX_REGION(3) - MCFG_TC0100SCN_OFFSETS(50, 8) - MCFG_TC0100SCN_GFXDECODE("gfxdecode") - MCFG_TC0100SCN_PALETTE("palette") - - MCFG_DEVICE_ADD("tc0480scp", TC0480SCP, 0) - MCFG_TC0480SCP_GFX_REGION(1) - MCFG_TC0480SCP_TX_REGION(4) - MCFG_TC0480SCP_OFFSETS(0x24, 0) - MCFG_TC0480SCP_OFFSETS_TX(-1, 0) - MCFG_TC0480SCP_COL_BASE(4096) - MCFG_TC0480SCP_GFXDECODE("gfxdecode") + TC0100SCN(config, m_tc0100scn, 0); + m_tc0100scn->set_gfx_region(2); + m_tc0100scn->set_tx_region(3); + m_tc0100scn->set_offsets(50, 8); + m_tc0100scn->set_gfxdecode_tag(m_gfxdecode); + m_tc0100scn->set_palette_tag(m_palette); + + TC0480SCP(config, m_tc0480scp, 0); + m_tc0480scp->set_gfx_region(1); + m_tc0480scp->set_tx_region(4); + m_tc0480scp->set_offsets(0x24, 0); + m_tc0480scp->set_offsets_tx(-1, 0); + m_tc0480scp->set_col_base(4096); + m_tc0480scp->set_gfxdecode_tag(m_gfxdecode); /* sound hardware */ - MCFG_DEVICE_ADD("taito_en", TAITO_EN, 0) + TAITO_EN(config, "taito_en", 0); MACHINE_CONFIG_END diff --git a/src/mame/drivers/volfied.cpp b/src/mame/drivers/volfied.cpp index 47c3745104f..13ca04608be 100644 --- a/src/mame/drivers/volfied.cpp +++ b/src/mame/drivers/volfied.cpp @@ -273,9 +273,9 @@ MACHINE_CONFIG_START(volfied_state::volfied) MCFG_PALETTE_ADD("palette", 8192) MCFG_PALETTE_FORMAT(xBBBBBGGGGGRRRRR) - MCFG_DEVICE_ADD("pc090oj", PC090OJ, 0) - MCFG_PC090OJ_GFXDECODE("gfxdecode") - MCFG_PC090OJ_PALETTE("palette") + PC090OJ(config, m_pc090oj, 0); + m_pc090oj->set_gfxdecode_tag("gfxdecode"); + m_pc090oj->set_palette_tag("palette"); /* sound hardware */ SPEAKER(config, "mono").front_center(); diff --git a/src/mame/drivers/wardner.cpp b/src/mame/drivers/wardner.cpp index 79e4d2c5dc5..7b6e4cab331 100644 --- a/src/mame/drivers/wardner.cpp +++ b/src/mame/drivers/wardner.cpp @@ -420,7 +420,9 @@ MACHINE_CONFIG_START(wardner_state::wardner) crtc.set_show_border_area(false); crtc.set_char_width(2); - MCFG_TOAPLAN_SCU_ADD("scu", "palette", 32, 14) + TOAPLAN_SCU(config, m_spritegen, 0); + m_spritegen->set_palette(m_palette); + m_spritegen->set_xoffsets(32, 14); MCFG_DEVICE_ADD("spriteram8", BUFFERED_SPRITERAM8) diff --git a/src/mame/drivers/warriorb.cpp b/src/mame/drivers/warriorb.cpp index 2e1f9a6a816..18b24e19dbb 100644 --- a/src/mame/drivers/warriorb.cpp +++ b/src/mame/drivers/warriorb.cpp @@ -227,13 +227,13 @@ void warriorb_state::darius2d_map(address_map &map) { map(0x000000, 0x0fffff).rom(); map(0x100000, 0x10ffff).ram(); /* main ram */ - map(0x200000, 0x213fff).r("tc0100scn_1", FUNC(tc0100scn_device::word_r)).w(FUNC(warriorb_state::tc0100scn_dual_screen_w)); /* tilemaps (all screens) */ + map(0x200000, 0x213fff).r(m_tc0100scn[0], FUNC(tc0100scn_device::word_r)).w(FUNC(warriorb_state::tc0100scn_dual_screen_w)); /* tilemaps (all screens) */ map(0x214000, 0x2141ff).nopw(); /* error in screen clearing code ? */ - map(0x220000, 0x22000f).rw("tc0100scn_1", FUNC(tc0100scn_device::ctrl_word_r), FUNC(tc0100scn_device::ctrl_word_w)); - map(0x240000, 0x253fff).rw("tc0100scn_2", FUNC(tc0100scn_device::word_r), FUNC(tc0100scn_device::word_w)); /* tilemaps (2nd screen) */ - map(0x260000, 0x26000f).rw("tc0100scn_2", FUNC(tc0100scn_device::ctrl_word_r), FUNC(tc0100scn_device::ctrl_word_w)); - map(0x400000, 0x400007).rw("tc0110pcr_1", FUNC(tc0110pcr_device::word_r), FUNC(tc0110pcr_device::step1_word_w)); /* palette (1st screen) */ - map(0x420000, 0x420007).rw("tc0110pcr_2", FUNC(tc0110pcr_device::word_r), FUNC(tc0110pcr_device::step1_word_w)); /* palette (2nd screen) */ + map(0x220000, 0x22000f).rw(m_tc0100scn[0], FUNC(tc0100scn_device::ctrl_word_r), FUNC(tc0100scn_device::ctrl_word_w)); + map(0x240000, 0x253fff).rw(m_tc0100scn[1], FUNC(tc0100scn_device::word_r), FUNC(tc0100scn_device::word_w)); /* tilemaps (2nd screen) */ + map(0x260000, 0x26000f).rw(m_tc0100scn[1], FUNC(tc0100scn_device::ctrl_word_r), FUNC(tc0100scn_device::ctrl_word_w)); + map(0x400000, 0x400007).rw(m_tc0110pcr[0], FUNC(tc0110pcr_device::word_r), FUNC(tc0110pcr_device::step1_word_w)); /* palette (1st screen) */ + map(0x420000, 0x420007).rw(m_tc0110pcr[1], FUNC(tc0110pcr_device::word_r), FUNC(tc0110pcr_device::step1_word_w)); /* palette (2nd screen) */ map(0x600000, 0x6013ff).ram().share("spriteram"); map(0x800000, 0x80000f).rw(m_tc0220ioc, FUNC(tc0220ioc_device::read), FUNC(tc0220ioc_device::write)).umask16(0x00ff); // AM_RANGE(0x820000, 0x820001) AM_WRITENOP // ??? @@ -244,12 +244,12 @@ void warriorb_state::warriorb_map(address_map &map) { map(0x000000, 0x1fffff).rom(); map(0x200000, 0x213fff).ram(); - map(0x300000, 0x313fff).r("tc0100scn_1", FUNC(tc0100scn_device::word_r)).w(FUNC(warriorb_state::tc0100scn_dual_screen_w)); /* tilemaps (all screens) */ - map(0x320000, 0x32000f).rw("tc0100scn_1", FUNC(tc0100scn_device::ctrl_word_r), FUNC(tc0100scn_device::ctrl_word_w)); - map(0x340000, 0x353fff).rw("tc0100scn_2", FUNC(tc0100scn_device::word_r), FUNC(tc0100scn_device::word_w)); /* tilemaps (2nd screen) */ - map(0x360000, 0x36000f).rw("tc0100scn_2", FUNC(tc0100scn_device::ctrl_word_r), FUNC(tc0100scn_device::ctrl_word_w)); - map(0x400000, 0x400007).rw("tc0110pcr_1", FUNC(tc0110pcr_device::word_r), FUNC(tc0110pcr_device::step1_word_w)); /* palette (1st screen) */ - map(0x420000, 0x420007).rw("tc0110pcr_2", FUNC(tc0110pcr_device::word_r), FUNC(tc0110pcr_device::step1_word_w)); /* palette (2nd screen) */ + map(0x300000, 0x313fff).r(m_tc0100scn[0], FUNC(tc0100scn_device::word_r)).w(FUNC(warriorb_state::tc0100scn_dual_screen_w)); /* tilemaps (all screens) */ + map(0x320000, 0x32000f).rw(m_tc0100scn[0], FUNC(tc0100scn_device::ctrl_word_r), FUNC(tc0100scn_device::ctrl_word_w)); + map(0x340000, 0x353fff).rw(m_tc0100scn[1], FUNC(tc0100scn_device::word_r), FUNC(tc0100scn_device::word_w)); /* tilemaps (2nd screen) */ + map(0x360000, 0x36000f).rw(m_tc0100scn[1], FUNC(tc0100scn_device::ctrl_word_r), FUNC(tc0100scn_device::ctrl_word_w)); + map(0x400000, 0x400007).rw(m_tc0110pcr[0], FUNC(tc0110pcr_device::word_r), FUNC(tc0110pcr_device::step1_word_w)); /* palette (1st screen) */ + map(0x420000, 0x420007).rw(m_tc0110pcr[1], FUNC(tc0110pcr_device::word_r), FUNC(tc0110pcr_device::step1_word_w)); /* palette (2nd screen) */ map(0x600000, 0x6013ff).ram().share("spriteram"); map(0x800000, 0x80000f).rw(m_tc0510nio, FUNC(tc0510nio_device::read), FUNC(tc0510nio_device::write)).umask16(0x00ff); // AM_RANGE(0x820000, 0x820001) AM_WRITENOP // ? uses bits 0,2,3 @@ -468,14 +468,14 @@ MACHINE_CONFIG_START(warriorb_state::darius2d) MCFG_SCREEN_UPDATE_DRIVER(warriorb_state, screen_update_left) MCFG_SCREEN_PALETTE("palette") - MCFG_DEVICE_ADD("tc0100scn_1", TC0100SCN, 0) - MCFG_TC0100SCN_GFX_REGION(1) - MCFG_TC0100SCN_TX_REGION(3) - MCFG_TC0100SCN_OFFSETS(4, 0) - MCFG_TC0100SCN_GFXDECODE("gfxdecode") - MCFG_TC0100SCN_PALETTE("palette") + TC0100SCN(config, m_tc0100scn[0], 0); + m_tc0100scn[0]->set_gfx_region(1); + m_tc0100scn[0]->set_tx_region(3); + m_tc0100scn[0]->set_offsets(4, 0); + m_tc0100scn[0]->set_gfxdecode_tag(m_gfxdecode); + m_tc0100scn[0]->set_palette_tag(m_palette); - MCFG_DEVICE_ADD("tc0110pcr_1", TC0110PCR, 0, "palette") + TC0110PCR(config, m_tc0110pcr[0], 0, m_palette); MCFG_SCREEN_ADD("rscreen", RASTER) MCFG_SCREEN_REFRESH_RATE(60) @@ -485,15 +485,15 @@ MACHINE_CONFIG_START(warriorb_state::darius2d) MCFG_SCREEN_UPDATE_DRIVER(warriorb_state, screen_update_right) MCFG_SCREEN_PALETTE("palette2") - MCFG_DEVICE_ADD("tc0100scn_2", TC0100SCN, 0) - MCFG_TC0100SCN_GFX_REGION(2) - MCFG_TC0100SCN_TX_REGION(3) - MCFG_TC0100SCN_OFFSETS(4, 0) - MCFG_TC0100SCN_MULTISCR_HACK(1) - MCFG_TC0100SCN_GFXDECODE("gfxdecode") - MCFG_TC0100SCN_PALETTE("palette2") + TC0100SCN(config, m_tc0100scn[1], 0); + m_tc0100scn[1]->set_gfx_region(2); + m_tc0100scn[1]->set_tx_region(3); + m_tc0100scn[1]->set_offsets(4, 0); + m_tc0100scn[1]->set_multiscr_hack(1); + m_tc0100scn[1]->set_gfxdecode_tag(m_gfxdecode); + m_tc0100scn[1]->set_palette_tag("palette2"); - MCFG_DEVICE_ADD("tc0110pcr_2", TC0110PCR, 0, "palette2") + TC0110PCR(config, m_tc0110pcr[1], 0, "palette2"); /* sound hardware */ SPEAKER(config, "lspeaker").front_left(); @@ -552,14 +552,14 @@ MACHINE_CONFIG_START(warriorb_state::warriorb) MCFG_SCREEN_UPDATE_DRIVER(warriorb_state, screen_update_left) MCFG_SCREEN_PALETTE("palette") - MCFG_DEVICE_ADD("tc0100scn_1", TC0100SCN, 0) - MCFG_TC0100SCN_GFX_REGION(1) - MCFG_TC0100SCN_TX_REGION(3) - MCFG_TC0100SCN_OFFSETS(4, 0) - MCFG_TC0100SCN_GFXDECODE("gfxdecode") - MCFG_TC0100SCN_PALETTE("palette") + TC0100SCN(config, m_tc0100scn[0], 0); + m_tc0100scn[0]->set_gfx_region(1); + m_tc0100scn[0]->set_tx_region(3); + m_tc0100scn[0]->set_offsets(4, 0); + m_tc0100scn[0]->set_gfxdecode_tag(m_gfxdecode); + m_tc0100scn[0]->set_palette_tag(m_palette); - MCFG_DEVICE_ADD("tc0110pcr_1", TC0110PCR, 0, "palette") + TC0110PCR(config, m_tc0110pcr[0], 0, m_palette); MCFG_SCREEN_ADD("rscreen", RASTER) MCFG_SCREEN_REFRESH_RATE(60) @@ -569,16 +569,16 @@ MACHINE_CONFIG_START(warriorb_state::warriorb) MCFG_SCREEN_UPDATE_DRIVER(warriorb_state, screen_update_right) MCFG_SCREEN_PALETTE("palette2") - MCFG_DEVICE_ADD("tc0100scn_2", TC0100SCN, 0) - MCFG_TC0100SCN_GFX_REGION(2) - MCFG_TC0100SCN_TX_REGION(3) - MCFG_TC0100SCN_OFFSETS(4, 0) - MCFG_TC0100SCN_MULTISCR_XOFFS(1) - MCFG_TC0100SCN_MULTISCR_HACK(1) - MCFG_TC0100SCN_GFXDECODE("gfxdecode") - MCFG_TC0100SCN_PALETTE("palette2") + TC0100SCN(config, m_tc0100scn[1], 0); + m_tc0100scn[1]->set_gfx_region(2); + m_tc0100scn[1]->set_tx_region(3); + m_tc0100scn[1]->set_offsets(4, 0); + m_tc0100scn[1]->set_multiscr_xoffs(1); + m_tc0100scn[1]->set_multiscr_hack(1); + m_tc0100scn[1]->set_gfxdecode_tag(m_gfxdecode); + m_tc0100scn[1]->set_palette_tag("palette2"); - MCFG_DEVICE_ADD("tc0110pcr_2", TC0110PCR, 0, "palette2") + TC0110PCR(config, m_tc0110pcr[1], 0, "palette2"); /* sound hardware */ SPEAKER(config, "lspeaker").front_left(); diff --git a/src/mame/drivers/wc90.cpp b/src/mame/drivers/wc90.cpp index 30963329b3f..ab46ebe9ddc 100644 --- a/src/mame/drivers/wc90.cpp +++ b/src/mame/drivers/wc90.cpp @@ -375,7 +375,7 @@ MACHINE_CONFIG_START(wc90_state::wc90) MCFG_PALETTE_FORMAT(xxxxBBBBRRRRGGGG) MCFG_PALETTE_ENDIANNESS(ENDIANNESS_BIG) - MCFG_DEVICE_ADD(m_sprgen, TECMO_SPRITE, 0) + TECMO_SPRITE(config, m_sprgen, 0); /* sound hardware */ SPEAKER(config, "mono").front_center(); @@ -395,11 +395,11 @@ MACHINE_CONFIG_START(wc90_state::wc90t) MCFG_VIDEO_START_OVERRIDE(wc90_state, wc90t ) MACHINE_CONFIG_END -MACHINE_CONFIG_START(wc90_state::pac90) +void wc90_state::pac90(machine_config &config) +{ wc90(config); - MCFG_DEVICE_MODIFY("spritegen") - MCFG_TECMO_SPRITE_YOFFSET(16) // sprites need shifting, why? -MACHINE_CONFIG_END + m_sprgen->set_yoffset(16); // sprites need shifting, why? +} ROM_START( twcup90 ) diff --git a/src/mame/drivers/welltris.cpp b/src/mame/drivers/welltris.cpp index e3658e3eddd..4237fde2dde 100644 --- a/src/mame/drivers/welltris.cpp +++ b/src/mame/drivers/welltris.cpp @@ -50,7 +50,7 @@ V-SYSTEM VS8803 6082 9040 EBBB ******************************************************************************** - its impossible to know what some of the video registers do due to lack of + it's impossible to know what some of the video registers do due to lack of evidence (bg palette has a selector, but I'm not sure which ... test mode colours use different palette on rgb test @@ -695,12 +695,12 @@ MACHINE_CONFIG_START(welltris_state::welltris) MCFG_PALETTE_ADD("palette", 2048) MCFG_PALETTE_FORMAT(xRRRRRGGGGGBBBBB) - MCFG_DEVICE_ADD("gga", VSYSTEM_GGA, XTAL(14'318'181) / 2) // divider not verified + VSYSTEM_GGA(config, "gga", XTAL(14'318'181) / 2); // divider not verified - MCFG_DEVICE_ADD("vsystem_spr_old", VSYSTEM_SPR2, 0) - MCFG_VSYSTEM_SPR2_SET_GFXREGION(1) - MCFG_VSYSTEM_SPR2_SET_PRITYPE(-1) - MCFG_VSYSTEM_SPR2_GFXDECODE("gfxdecode") + VSYSTEM_SPR2(config, m_spr_old, 0); + m_spr_old->set_gfx_region(1); + m_spr_old->set_pritype(-1); + m_spr_old->set_gfxdecode_tag(m_gfxdecode); /* sound hardware */ SPEAKER(config, "mono").front_center(); @@ -724,8 +724,7 @@ MACHINE_CONFIG_START(welltris_state::quiz18k) MCFG_SCREEN_MODIFY("screen") MCFG_SCREEN_VISIBLE_AREA(15, 335-1, 0, 224-1) - MCFG_DEVICE_MODIFY("vsystem_spr_old") - MCFG_VSYSTEM_SPR2_SET_OFFSETS(6, 1) + m_spr_old->set_offsets(6, 1); MACHINE_CONFIG_END diff --git a/src/mame/drivers/wgp.cpp b/src/mame/drivers/wgp.cpp index db1fbfd3fbe..5b08c86ab9d 100644 --- a/src/mame/drivers/wgp.cpp +++ b/src/mame/drivers/wgp.cpp @@ -950,11 +950,11 @@ MACHINE_CONFIG_START(wgp_state::wgp) MCFG_PALETTE_ADD("palette", 4096) MCFG_PALETTE_FORMAT(RRRRGGGGBBBBxxxx) - MCFG_DEVICE_ADD("tc0100scn", TC0100SCN, 0) - MCFG_TC0100SCN_GFX_REGION(1) - MCFG_TC0100SCN_TX_REGION(3) - MCFG_TC0100SCN_GFXDECODE("gfxdecode") - MCFG_TC0100SCN_PALETTE("palette") + TC0100SCN(config, m_tc0100scn, 0); + m_tc0100scn->set_gfx_region(1); + m_tc0100scn->set_tx_region(3); + m_tc0100scn->set_gfxdecode_tag(m_gfxdecode); + m_tc0100scn->set_palette_tag(m_palette); /* sound hardware */ SPEAKER(config, "lspeaker").front_left(); @@ -980,10 +980,7 @@ MACHINE_CONFIG_START(wgp_state::wgp2) /* video hardware */ MCFG_VIDEO_START_OVERRIDE(wgp_state, wgp2) - MCFG_DEVICE_MODIFY("tc0100scn") - MCFG_TC0100SCN_OFFSETS(4, 2) - MCFG_TC0100SCN_GFXDECODE("gfxdecode") - MCFG_TC0100SCN_PALETTE("palette") + m_tc0100scn->set_offsets(4, 2); MACHINE_CONFIG_END diff --git a/src/mame/drivers/wpc_95.cpp b/src/mame/drivers/wpc_95.cpp index 5324a50347f..42312011bc5 100644 --- a/src/mame/drivers/wpc_95.cpp +++ b/src/mame/drivers/wpc_95.cpp @@ -2263,7 +2263,7 @@ MACHINE_CONFIG_START(wpc_95_state::wpc_95) WPC_DMD(config, "dmd", 0).scanline_callback().set(FUNC(wpc_95_state::scanline_irq)); NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0); - MCFG_DEVICE_ADD("dcs", DCS_AUDIO_WPC, 0) + DCS_AUDIO_WPC(config, dcs, 0); MACHINE_CONFIG_END /*----------------- diff --git a/src/mame/drivers/wpc_dcs.cpp b/src/mame/drivers/wpc_dcs.cpp index 206bac9dc7a..a1b988f0bba 100644 --- a/src/mame/drivers/wpc_dcs.cpp +++ b/src/mame/drivers/wpc_dcs.cpp @@ -438,7 +438,7 @@ MACHINE_CONFIG_START(wpc_dcs_state::wpc_dcs) WPC_DMD(config, "dmd", 0).scanline_callback().set(FUNC(wpc_dcs_state::scanline_irq)); NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0); - MCFG_DEVICE_ADD("dcs", DCS_AUDIO_8K, 0) + DCS_AUDIO_8K(config, dcs, 0); MACHINE_CONFIG_END /*------------- diff --git a/src/mame/drivers/wpc_s.cpp b/src/mame/drivers/wpc_s.cpp index 4ab976af276..be54001da58 100644 --- a/src/mame/drivers/wpc_s.cpp +++ b/src/mame/drivers/wpc_s.cpp @@ -1985,7 +1985,7 @@ MACHINE_CONFIG_START(wpc_s_state::wpc_s) WPC_DMD(config, "dmd", 0).scanline_callback().set(FUNC(wpc_s_state::scanline_irq)); NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0); - MCFG_DEVICE_ADD("dcs", DCS_AUDIO_8K, 0) + DCS_AUDIO_8K(config, dcs, 0); MACHINE_CONFIG_END /*----------------- diff --git a/src/mame/drivers/wswan.cpp b/src/mame/drivers/wswan.cpp index abd46b66060..2d4e6fc8274 100644 --- a/src/mame/drivers/wswan.cpp +++ b/src/mame/drivers/wswan.cpp @@ -123,10 +123,10 @@ MACHINE_CONFIG_START(wswan_state::wswan) MCFG_DEVICE_PROGRAM_MAP(wswan_mem) MCFG_DEVICE_IO_MAP(wswan_io) - MCFG_DEVICE_ADD(m_vdp, WSWAN_VIDEO, 0) - MCFG_WSWAN_VIDEO_TYPE(VDP_TYPE_WSWAN) - MCFG_WSWAN_VIDEO_IRQ_CB(wswan_state, set_irq_line) - MCFG_WSWAN_VIDEO_DMASND_CB(wswan_state, dma_sound_cb) + WSWAN_VIDEO(config, m_vdp, 0); + m_vdp->set_vdp_type(VDP_TYPE_WSWAN); + m_vdp->set_irq_callback(FUNC(wswan_state::set_irq_line), this); + m_vdp->set_dmasnd_callback(FUNC(wswan_state::dma_sound_cb), this); MCFG_SCREEN_ADD("screen", LCD) // MCFG_SCREEN_REFRESH_RATE(75) @@ -171,8 +171,7 @@ MACHINE_CONFIG_START(wscolor_state::wscolor) MCFG_DEVICE_MODIFY("maincpu") MCFG_DEVICE_PROGRAM_MAP(wscolor_mem) - MCFG_DEVICE_MODIFY("vdp") - MCFG_WSWAN_VIDEO_TYPE(VDP_TYPE_WSC) + m_vdp->set_vdp_type(VDP_TYPE_WSWAN); MCFG_PALETTE_MODIFY("palette") MCFG_PALETTE_ENTRIES(4096) diff --git a/src/mame/includes/fromance.h b/src/mame/includes/fromance.h index 1eb7f5be3eb..bdcda416618 100644 --- a/src/mame/includes/fromance.h +++ b/src/mame/includes/fromance.h @@ -26,11 +26,11 @@ public: m_spriteram(*this, "spriteram"), m_palette(*this, "palette"), m_gga(*this, "gga"), - m_videoram(*this, "videoram"), m_spr_old(*this, "vsystem_spr_old"), + m_gfxdecode(*this, "gfxdecode"), + m_videoram(*this, "videoram"), m_sublatch(*this, "sublatch"), m_msm(*this, "msm"), - m_gfxdecode(*this, "gfxdecode"), m_screen(*this, "screen") { } @@ -48,6 +48,8 @@ protected: optional_shared_ptr m_spriteram; required_device m_palette; required_device m_gga; + optional_device m_spr_old; // only used by pipe dream, split this state up and clean things... + required_device m_gfxdecode; DECLARE_WRITE8_MEMBER(fromance_gfxreg_w); DECLARE_READ8_MEMBER(fromance_videoram_r); @@ -74,8 +76,6 @@ private: /* memory pointers (used by pipedrm) */ optional_shared_ptr m_videoram; - optional_device m_spr_old; // only used by pipe dream, split this state up and clean things... - /* video-related */ tilemap_t *m_bg_tilemap; tilemap_t *m_fg_tilemap; @@ -116,7 +116,6 @@ private: DECLARE_WRITE_LINE_MEMBER(fromance_adpcm_int); optional_device m_sublatch; optional_device m_msm; - required_device m_gfxdecode; required_device m_screen; void fromance_main_map(address_map &map); void fromance_sub_io_map(address_map &map); diff --git a/src/mame/includes/galastrm.h b/src/mame/includes/galastrm.h index 29d25ecb4f2..b17966c18b1 100644 --- a/src/mame/includes/galastrm.h +++ b/src/mame/includes/galastrm.h @@ -38,16 +38,6 @@ private: }; -struct gs_tempsprite -{ - int gfx; - int code,color; - int flipx,flipy; - int x,y; - int zoomx,zoomy; - int primask; -}; - class galastrm_state : public driver_device { friend class galastrm_renderer; @@ -83,11 +73,20 @@ private: required_device m_screen; required_device m_palette; + struct gs_tempsprite + { + int gfx; + int code,color; + int flipx,flipy; + int x,y; + int zoomx,zoomy; + int primask; + }; + uint16_t m_frame_counter; int m_tc0110pcr_addr; int m_tc0610_0_addr; int m_tc0610_1_addr; - uint32_t m_mem[2]; int16_t m_tc0610_ctrl_reg[2][8]; std::unique_ptr m_spritelist; struct gs_tempsprite *m_sprite_ptr_pre; @@ -99,16 +98,16 @@ private: int m_rsxoffs; int m_rsyoffs; - DECLARE_WRITE32_MEMBER(galastrm_palette_w); - DECLARE_WRITE32_MEMBER(galastrm_tc0610_0_w); - DECLARE_WRITE32_MEMBER(galastrm_tc0610_1_w); + DECLARE_WRITE32_MEMBER(palette_w); + DECLARE_WRITE32_MEMBER(tc0610_0_w); + DECLARE_WRITE32_MEMBER(tc0610_1_w); DECLARE_WRITE8_MEMBER(coin_word_w); - uint32_t screen_update_galastrm(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); - INTERRUPT_GEN_MEMBER(galastrm_interrupt); + uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + INTERRUPT_GEN_MEMBER(interrupt); void draw_sprites_pre(int x_offs, int y_offs); void draw_sprites(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect, const int *primasks, int priority); - void galastrm_map(address_map &map); + void main_map(address_map &map); }; #endif // MAME_INCLUDES_GALASTRM_H diff --git a/src/mame/video/galastrm.cpp b/src/mame/video/galastrm.cpp index d6bb17ce93c..49e3efa5bf0 100644 --- a/src/mame/video/galastrm.cpp +++ b/src/mame/video/galastrm.cpp @@ -25,6 +25,16 @@ void galastrm_state::video_start() m_screen->register_screen_bitmap(m_tmpbitmaps); m_screen->register_screen_bitmap(m_poly->screenbits()); + + save_item(NAME(m_rsxb)); + save_item(NAME(m_rsyb)); + save_item(NAME(m_rsxoffs)); + save_item(NAME(m_rsyoffs)); + save_item(NAME(m_frame_counter)); + save_item(NAME(m_tc0110pcr_addr)); + save_item(NAME(m_tc0610_0_addr)); + save_item(NAME(m_tc0610_1_addr)); + save_item(NAME(m_tc0610_ctrl_reg)); } @@ -416,7 +426,7 @@ void galastrm_renderer::tc0610_rotate_draw(bitmap_ind16 &srcbitmap, const rectan SCREEN REFRESH **************************************************************/ -uint32_t galastrm_state::screen_update_galastrm(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) +uint32_t galastrm_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) { uint8_t layer[5]; uint8_t pivlayer[3]; diff --git a/src/mame/video/kan_pand.h b/src/mame/video/kan_pand.h index bb578bead53..0a529e4be79 100644 --- a/src/mame/video/kan_pand.h +++ b/src/mame/video/kan_pand.h @@ -24,7 +24,7 @@ public: kaneko_pandora_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); // configuration - void set_gfxdecode_tag(const char *tag) { m_gfxdecode.set_tag(tag); } + template void set_gfxdecode_tag(T &&tag) { m_gfxdecode.set_tag(std::forward(tag)); } void set_gfx_region(int gfxregion) { m_gfx_region = gfxregion; } void set_offsets(int x_offset, int y_offset) { @@ -64,18 +64,4 @@ private: DECLARE_DEVICE_TYPE(KANEKO_PANDORA, kaneko_pandora_device) - -/*************************************************************************** - DEVICE CONFIGURATION MACROS -***************************************************************************/ - -#define MCFG_KANEKO_PANDORA_GFX_REGION(_region) \ - downcast(*device).set_gfx_region(_region); - -#define MCFG_KANEKO_PANDORA_OFFSETS(_xoffs, _yoffs) \ - downcast(*device).set_offsets(_xoffs, _yoffs); - -#define MCFG_KANEKO_PANDORA_GFXDECODE(_gfxtag) \ - downcast(*device).set_gfxdecode_tag(_gfxtag); - #endif // MAME_VIDEO_KAN_PAND_H diff --git a/src/mame/video/kaneko_spr.h b/src/mame/video/kaneko_spr.h index 3137535e3af..98fbc3649a4 100644 --- a/src/mame/video/kaneko_spr.h +++ b/src/mame/video/kaneko_spr.h @@ -7,13 +7,6 @@ /* Kaneko Sprites */ -/* berlwall, blazeon etc. */ -#define MCFG_DEVICE_ADD_VU002_SPRITES \ - MCFG_DEVICE_ADD("kan_spr", KANEKO_VU002_SPRITE, 0) -/* gtmr, gtmr2, bloodwar etc. */ -#define MCFG_DEVICE_ADD_KC002_SPRITES \ - MCFG_DEVICE_ADD("kan_spr", KANEKO_KC002_SPRITE, 0) - struct kaneko16_priority_t { @@ -35,7 +28,7 @@ class kaneko16_sprite_device : public device_t, public device_video_interface { public: // configuration - void set_gfxdecode_tag(const char *tag) { m_gfxdecode.set_tag(tag); } + template void set_gfxdecode_tag(T &&tag) { m_gfxdecode.set_tag(std::forward(tag)); } void set_fliptype(int fliptype) { m_sprite_fliptype = fliptype; } void set_offsets(int xoffs, int yoffs) { @@ -124,16 +117,8 @@ private: //extern const device_type KANEKO16_SPRITE; -#define MCFG_KANEKO16_SPRITE_GFXDECODE(_gfxtag) \ - downcast(*device).set_gfxdecode_tag(_gfxtag); -#define MCFG_KANEKO16_SPRITE_PRIORITIES(_pri0, _pri1, _pri2, _pri3) \ - downcast(*device).set_priorities(_pri0, _pri1, _pri2, _pri3); -#define MCFG_KANEKO16_SPRITE_OFFSETS(_xoffs, _yoffs) \ - downcast(*device).set_offsets(_xoffs, _yoffs); -#define MCFG_KANEKO16_SPRITE_FLIPTYPE(_fliptype) \ - downcast(*device).set_fliptype(_fliptype); - +/* berlwall, blazeon etc. */ class kaneko_vu002_sprite_device : public kaneko16_sprite_device { public: @@ -149,6 +134,7 @@ public: DECLARE_DEVICE_TYPE(KANEKO_VU002_SPRITE, kaneko_vu002_sprite_device) +/* gtmr, gtmr2, bloodwar etc. */ class kaneko_kc002_sprite_device : public kaneko16_sprite_device { public: diff --git a/src/mame/video/kaneko_tmap.h b/src/mame/video/kaneko_tmap.h index 093d5822888..abdef1a86d6 100644 --- a/src/mame/video/kaneko_tmap.h +++ b/src/mame/video/kaneko_tmap.h @@ -18,7 +18,7 @@ public: kaneko_view2_tilemap_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); // configuration - void set_gfxdecode_tag(const char *tag) { m_gfxdecode.set_tag(tag); } + template void set_gfxdecode_tag(T &&tag) { m_gfxdecode.set_tag(std::forward(tag)); } void set_gfx_region(int region) { m_tilebase = region; } void set_offset(int dx, int dy, int xdim, int ydim) { @@ -96,13 +96,4 @@ private: DECLARE_DEVICE_TYPE(KANEKO_TMAP, kaneko_view2_tilemap_device) -#define MCFG_KANEKO_TMAP_GFXDECODE(_gfxtag) \ - downcast(*device).set_gfxdecode_tag(_gfxtag); -#define MCFG_KANEKO_TMAP_GFX_REGION(_region) \ - downcast(*device).set_gfx_region(_region); -#define MCFG_KANEKO_TMAP_INVERT_FLIP(_invert) \ - downcast(*device).set_invert_flip(_invert); -#define MCFG_KANEKO_TMAP_OFFSET(_dx, _dy, _xdim, _ydim) \ - downcast(*device).set_offset(_dx, _dy, _xdim, _ydim); - #endif // MAME_VIDEO_KANEKO_TMAP_H diff --git a/src/mame/video/ladybug.h b/src/mame/video/ladybug.h index 72ad9f0c30f..a747e490434 100644 --- a/src/mame/video/ladybug.h +++ b/src/mame/video/ladybug.h @@ -8,17 +8,13 @@ #include "screen.h" -#define MCFG_LADYBUG_VIDEO_GFXDECODE(tag) \ - downcast(*device).set_gfxdecode_tag(tag); - - // used by ladybug and sraider class ladybug_video_device : public device_t { public: ladybug_video_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock); - void set_gfxdecode_tag(char const *tag) { m_gfxdecode.set_tag(tag); } + template void set_gfxdecode_tag(T &&tag) { m_gfxdecode.set_tag(std::forward(tag)); } DECLARE_READ8_MEMBER(spr_r) { return m_spr_ram[offset & 0x03ff]; } DECLARE_WRITE8_MEMBER(spr_w) { m_spr_ram[offset & 0x03ff] = data; } diff --git a/src/mame/video/maria.h b/src/mame/video/maria.h index 15f1a68cfa9..76374baf715 100644 --- a/src/mame/video/maria.h +++ b/src/mame/video/maria.h @@ -14,8 +14,8 @@ public: // construction/destruction atari_maria_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); - void set_screen_tag(const char *tag) { m_screen.set_tag(tag); } - void set_cpu_tag(const char *tag) { m_cpu.set_tag(tag); } + template void set_screen_tag(T &&tag) { m_screen.set_tag(std::forward(tag)); } + template void set_dmacpu_tag(T &&tag) { m_cpu.set_tag(std::forward(tag)); } void interrupt(int lines); void startdma(int lines); @@ -65,11 +65,4 @@ private: // device type definition DECLARE_DEVICE_TYPE(ATARI_MARIA, atari_maria_device) -#define MCFG_MARIA_SCREEN(screen_tag) \ - downcast(*device).set_screen_tag(screen_tag); - -#define MCFG_MARIA_DMACPU(cpu_tag) \ - downcast(*device).set_cpu_tag(cpu_tag); - - #endif // MAME_VIDEO_MARIA_H diff --git a/src/mame/video/mb60553.h b/src/mame/video/mb60553.h index 3f54dd7fc95..4b8d37a2742 100644 --- a/src/mame/video/mb60553.h +++ b/src/mame/video/mb60553.h @@ -11,7 +11,7 @@ class mb60553_zooming_tilemap_device : public device_t { public: - void set_gfxdecode_tag(const char *tag) { m_gfxdecode.set_tag(tag); } + template void set_gfxdecode_tag(T &&tag) { m_gfxdecode.set_tag(std::forward(tag)); } void set_gfx_region(int gfxregion) { m_gfx_region = gfxregion; } mb60553_zooming_tilemap_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); @@ -58,11 +58,4 @@ private: DECLARE_DEVICE_TYPE(MB60553, mb60553_zooming_tilemap_device) - -#define MCFG_MB60553_GFX_REGION(_region) \ - downcast(*device).set_gfx_region(_region); - -#define MCFG_MB60553_GFXDECODE(_gfxtag) \ - downcast(*device).set_gfxdecode_tag(_gfxtag); - #endif // MAME_VIDEO_MB60533_H diff --git a/src/mame/video/pc080sn.h b/src/mame/video/pc080sn.h index 39a2ca6794a..eb50c36abe5 100644 --- a/src/mame/video/pc080sn.h +++ b/src/mame/video/pc080sn.h @@ -11,7 +11,7 @@ public: pc080sn_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); // configuration - void set_gfxdecode_tag(const char *tag) { m_gfxdecode.set_tag(tag); } + template void set_gfxdecode_tag(T &&tag) { m_gfxdecode.set_tag(std::forward(tag)); } void set_gfx_region(int gfxregion) { m_gfxnum = gfxregion; } void set_yinvert(int y_inv) { m_y_invert = y_inv; } void set_dblwidth(int dblwidth) { m_dblwidth = dblwidth; } @@ -72,20 +72,4 @@ private: DECLARE_DEVICE_TYPE(PC080SN, pc080sn_device) - -#define MCFG_PC080SN_GFX_REGION(_region) \ - downcast(*device).set_gfx_region(_region); - -#define MCFG_PC080SN_OFFSETS(_xoffs, _yoffs) \ - downcast(*device).set_offsets(_xoffs, _yoffs); - -#define MCFG_PC080SN_YINVERT(_yinv) \ - downcast(*device).set_yinvert(_yinv); - -#define MCFG_PC080SN_DBLWIDTH(_dbl) \ - downcast(*device).set_dblwidth(_dbl); - -#define MCFG_PC080SN_GFXDECODE(_gfxtag) \ - downcast(*device).set_gfxdecode_tag(_gfxtag); - #endif // MAME_VIDEO_PC080SN_H diff --git a/src/mame/video/pc090oj.h b/src/mame/video/pc090oj.h index 564856d65e4..d47ae4d31ce 100644 --- a/src/mame/video/pc090oj.h +++ b/src/mame/video/pc090oj.h @@ -13,8 +13,8 @@ public: pc090oj_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); // configuration - void set_gfxdecode_tag(const char *tag) { m_gfxdecode.set_tag(tag); } - void set_palette_tag(const char *tag) { m_palette.set_tag(tag); } + template void set_gfxdecode_tag(T &&tag) { m_gfxdecode.set_tag(std::forward(tag)); } + template void set_palette_tag(T &&tag) { m_palette.set_tag(std::forward(tag)); } void set_gfx_region(int gfxregion) { m_gfxnum = gfxregion; } void set_usebuffer(int use_buf) { m_use_buffer = use_buf; } void set_offsets(int x_offset, int y_offset) @@ -62,20 +62,4 @@ private: DECLARE_DEVICE_TYPE(PC090OJ, pc090oj_device) - -#define MCFG_PC090OJ_GFX_REGION(_region) \ - downcast(*device).set_gfx_region(_region); - -#define MCFG_PC090OJ_OFFSETS(_xoffs, _yoffs) \ - downcast(*device).set_offsets(_xoffs, _yoffs); - -#define MCFG_PC090OJ_USEBUFFER(_use_buf) \ - downcast(*device).set_usebuffer(_use_buf); - -#define MCFG_PC090OJ_GFXDECODE(_gfxtag) \ - downcast(*device).set_gfxdecode_tag(_gfxtag); - -#define MCFG_PC090OJ_PALETTE(_palette_tag) \ - downcast(*device).set_palette_tag(_palette_tag); - #endif // MAME_VIDEO_PC090)J_H diff --git a/src/mame/video/pc_t1t.h b/src/mame/video/pc_t1t.h index 2c064f6006e..7ed2ad4e378 100644 --- a/src/mame/video/pc_t1t.h +++ b/src/mame/video/pc_t1t.h @@ -116,9 +116,6 @@ private: DECLARE_DEVICE_TYPE(PCVIDEO_T1000, pcvideo_t1000_device) -#define MCFG_PCVIDEO_T1000_ADD(_tag) \ - MCFG_DEVICE_ADD(_tag, PCVIDEO_T1000, 0) - class pcvideo_pcjr_device : public pc_t1t_device { public: diff --git a/src/mame/video/sega16sp.h b/src/mame/video/sega16sp.h index 48adeb079e2..fd40bc2cc75 100644 --- a/src/mame/video/sega16sp.h +++ b/src/mame/video/sega16sp.h @@ -14,21 +14,6 @@ #include "segaic16.h" - -//************************************************************************** -// INTERFACE CONFIGURATION MACROS -//************************************************************************** - -#define MCFG_BOOTLEG_SYS16A_SPRITES_YORIGIN(_yorigin) \ - downcast(*device).set_local_originy(_yorigin); - -#define MCFG_BOOTLEG_SYS16B_SPRITES_XORIGIN(_xorigin) \ - downcast(*device).set_local_originx(_xorigin); -#define MCFG_BOOTLEG_SYS16B_SPRITES_YORIGIN(_yorigin) \ - downcast(*device).set_local_originy(_yorigin); - - - //************************************************************************** // TYPE DEFINITIONS //************************************************************************** diff --git a/src/mame/video/segaic16.h b/src/mame/video/segaic16.h index d93475e4cee..76fb4fb280d 100644 --- a/src/mame/video/segaic16.h +++ b/src/mame/video/segaic16.h @@ -12,17 +12,6 @@ typedef device_delegate segaic16_video_pagelatch_delegate; -#define MCFG_SEGAIC16_VIDEO_SET_PAGELATCH_CB( _class, _method) \ - downcast(*device).set_pagelatch_cb(segaic16_video_pagelatch_delegate(&_class::_method, #_class "::" #_method, nullptr, (_class *)nullptr)); - - -/************************************* - * - * Type definitions - * - *************************************/ - - /*************************************************************************** FUNCTION PROTOTYPES @@ -107,7 +96,7 @@ public: segaic16_video_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); // configuration - void set_pagelatch_cb(segaic16_video_pagelatch_delegate newtilecb) { m_pagelatch_cb = newtilecb; } + template void set_pagelatch_cb(T &&... args) { m_pagelatch_cb = segaic16_video_pagelatch_delegate(std::forward(args)...); } uint8_t m_display_enable; optional_shared_ptr m_tileram; diff --git a/src/mame/video/seta001.h b/src/mame/video/seta001.h index 07753a8a02a..ed3a03ca2d6 100644 --- a/src/mame/video/seta001.h +++ b/src/mame/video/seta001.h @@ -9,17 +9,14 @@ typedef device_delegate gfxbank_cb_delegate; #define SETA001_SPRITE_GFXBANK_CB_MEMBER(_name) int _name(uint16_t code, uint8_t color) -#define MCFG_SETA001_SPRITE_GFXBANK_CB(_class, _method) \ - downcast(*device).set_gfxbank_callback(gfxbank_cb_delegate(&_class::_method, #_class "::" #_method, this)); - class seta001_device : public device_t { public: seta001_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); // configuration - void set_gfxdecode_tag(const char *tag) { m_gfxdecode.set_tag(tag); } - void set_gfxbank_callback(gfxbank_cb_delegate callback) { m_gfxbank_cb = callback; } + template void set_gfxdecode_tag(T &&tag) { m_gfxdecode.set_tag(std::forward(tag)); } + template void set_gfxbank_callback(T &&... args) { m_gfxbank_cb = gfxbank_cb_delegate(std::forward(args)...); } DECLARE_WRITE8_MEMBER( spritebgflag_w8 ); @@ -88,7 +85,4 @@ private: DECLARE_DEVICE_TYPE(SETA001_SPRITE, seta001_device) -#define MCFG_SETA001_SPRITE_GFXDECODE(_gfxtag) \ - downcast(*device).set_gfxdecode_tag(_gfxtag); - #endif // MAME_VIDEO_SETA001_H diff --git a/src/mame/video/snk68_spr.h b/src/mame/video/snk68_spr.h index d31bccdacf3..f1ced5a9935 100644 --- a/src/mame/video/snk68_spr.h +++ b/src/mame/video/snk68_spr.h @@ -9,13 +9,6 @@ typedef device_delegate snk68_tile_indirection_delegate; -#define MCFG_SNK68_SPR_GFXDECODE(_gfxtag) \ - downcast(*device).set_gfxdecode_tag(_gfxtag); -#define MCFG_SNK68_SPR_SET_TILE_INDIRECT( _class, _method) \ - downcast(*device).set_tile_indirect_cb(snk68_tile_indirection_delegate(&_class::_method, #_class "::" #_method, nullptr, (_class *)nullptr)); -#define MCFG_SNK68_SPR_NO_PARTIAL \ - downcast(*device).set_no_partial(); - class snk68_spr_device : public device_t { @@ -23,8 +16,8 @@ public: snk68_spr_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); // static configuration - void set_gfxdecode_tag(const char *tag) { m_gfxdecode.set_tag(tag); } - template void set_tile_indirect_cb(Object &&cb) { m_newtilecb = std::forward(cb); } + template void set_gfxdecode_tag(T &&tag) { m_gfxdecode.set_tag(std::forward(tag)); } + template void set_tile_indirect_cb(T &&... args) { m_newtilecb = snk68_tile_indirection_delegate(std::forward(args)...); } void set_no_partial() { m_partialupdates = 0; } DECLARE_READ16_MEMBER(spriteram_r); diff --git a/src/mame/video/tc0080vco.h b/src/mame/video/tc0080vco.h index 64665db56ab..32a07905b5b 100644 --- a/src/mame/video/tc0080vco.h +++ b/src/mame/video/tc0080vco.h @@ -11,7 +11,7 @@ public: tc0080vco_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); // configuration - void set_gfxdecode_tag(const char *tag) { m_gfxdecode.set_tag(tag); } + template void set_gfxdecode_tag(T &&tag) { m_gfxdecode.set_tag(std::forward(tag)); } void set_gfx_region(int gfxnum) { m_gfxnum = gfxnum; } void set_tx_region(int txnum) { m_txnum = txnum; } void set_offsets(int x_offset, int y_offset) @@ -84,19 +84,4 @@ private: DECLARE_DEVICE_TYPE(TC0080VCO, tc0080vco_device) -#define MCFG_TC0080VCO_GFX_REGION(_region) \ - downcast(*device).set_gfx_region(_region); - -#define MCFG_TC0080VCO_TX_REGION(_region) \ - downcast(*device).set_tx_region(_region); - -#define MCFG_TC0080VCO_OFFSETS(_xoffs, _yoffs) \ - downcast(*device).set_offsets(_xoffs, _yoffs); - -#define MCFG_TC0080VCO_BGFLIP_OFFS(_offs) \ - downcast(*device).set_bgflip_yoffs(_offs); - -#define MCFG_TC0080VCO_GFXDECODE(_gfxtag) \ - downcast(*device).set_gfxdecode_tag(_gfxtag); - #endif // MAME_VIDEO_TC0080VCO_H diff --git a/src/mame/video/tc0100scn.h b/src/mame/video/tc0100scn.h index 3236cfb3279..8bd82a48773 100644 --- a/src/mame/video/tc0100scn.h +++ b/src/mame/video/tc0100scn.h @@ -13,8 +13,8 @@ public: tc0100scn_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); // configuration - void set_gfxdecode_tag(const char *tag) { m_gfxdecode.set_tag(tag); } - void set_palette_tag(const char *tag) { m_palette.set_tag(tag); } + template void set_gfxdecode_tag(T &&tag) { m_gfxdecode.set_tag(std::forward(tag)); } + template void set_palette_tag(T &&tag) { m_palette.set_tag(std::forward(tag)); } void set_gfx_region(int gfxregion) { m_gfxnum = gfxregion; } void set_tx_region(int txregion) { m_txnum = txregion; } void set_multiscr_xoffs(int xoffs) { m_multiscrn_xoffs = xoffs; } @@ -119,32 +119,4 @@ private: DECLARE_DEVICE_TYPE(TC0100SCN, tc0100scn_device) - -#define MCFG_TC0100SCN_GFX_REGION(_region) \ - downcast(*device).set_gfx_region(_region); - -#define MCFG_TC0100SCN_TX_REGION(_region) \ - downcast(*device).set_tx_region(_region); - -#define MCFG_TC0100SCN_OFFSETS(_xoffs, _yoffs) \ - downcast(*device).set_offsets(_xoffs, _yoffs); - -#define MCFG_TC0100SCN_OFFSETS_FLIP(_xoffs, _yoffs) \ - downcast(*device).set_offsets_flip(_xoffs, _yoffs); - -#define MCFG_TC0100SCN_OFFSETS_FLIPTX(_xoffs, _yoffs) \ - downcast(*device).set_offsets_fliptx(_xoffs, _yoffs); - -#define MCFG_TC0100SCN_MULTISCR_XOFFS(_xoffs) \ - downcast(*device).set_multiscr_xoffs(_xoffs); - -#define MCFG_TC0100SCN_MULTISCR_HACK(_hack) \ - downcast(*device).set_multiscr_hack(_hack); - -#define MCFG_TC0100SCN_GFXDECODE(_gfxtag) \ - downcast(*device).set_gfxdecode_tag(_gfxtag); - -#define MCFG_TC0100SCN_PALETTE(_palette_tag) \ - downcast(*device).set_palette_tag(_palette_tag); - #endif // MAME_VIDEO_TC0100SCN_H diff --git a/src/mame/video/tc0280grd.h b/src/mame/video/tc0280grd.h index 65b3a9c5591..848258bee63 100644 --- a/src/mame/video/tc0280grd.h +++ b/src/mame/video/tc0280grd.h @@ -11,7 +11,7 @@ public: tc0280grd_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); // configuration - void set_gfxdecode_tag(const char *tag) { m_gfxdecode.set_tag(tag); } + template void set_gfxdecode_tag(T &&tag) { m_gfxdecode.set_tag(std::forward(tag)); } void set_gfx_region(int gfxregion) { m_gfxnum = gfxregion; } DECLARE_READ16_MEMBER( tc0280grd_word_r ); @@ -50,16 +50,4 @@ DECLARE_DEVICE_TYPE(TC0280GRD, tc0280grd_device) #define TC0430GRW TC0280GRD -#define MCFG_TC0280GRD_GFX_REGION(_region) \ - downcast(*device).set_gfx_region(_region); - -#define MCFG_TC0430GRW_GFX_REGION(_region) \ - downcast(*device).set_gfx_region(_region); - -#define MCFG_TC0280GRD_GFXDECODE(_gfxtag) \ - downcast(*device).set_gfxdecode_tag(_gfxtag); - -#define MCFG_TC0430GRW_GFXDECODE(_gfxtag) \ - downcast(*device).set_gfxdecode_tag(_gfxtag); - #endif // MAME_VIDEO_TC0280GRD_H diff --git a/src/mame/video/tc0360pri.h b/src/mame/video/tc0360pri.h index 65fe0c7820c..0427954ddf9 100644 --- a/src/mame/video/tc0360pri.h +++ b/src/mame/video/tc0360pri.h @@ -25,7 +25,5 @@ private: DECLARE_DEVICE_TYPE(TC0360PRI, tc0360pri_device) -#define MCFG_TC0360PRI_ADD(_tag) \ - MCFG_DEVICE_ADD(_tag, TC0360PRI, 0) #endif // MAME_VIDEO_TC0360PRI_H diff --git a/src/mame/video/tc0480scp.h b/src/mame/video/tc0480scp.h index 084922f225d..7d0ef29acdc 100644 --- a/src/mame/video/tc0480scp.h +++ b/src/mame/video/tc0480scp.h @@ -11,7 +11,7 @@ public: tc0480scp_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); // configuration - void set_gfxdecode_tag(const char *tag) { m_gfxdecode.set_tag(tag); } + template void set_gfxdecode_tag(T &&tag) { m_gfxdecode.set_tag(std::forward(tag)); } void set_gfx_region(int gfxregion) { m_gfxnum = gfxregion; } void set_tx_region(int txregion) { m_txnum = txregion; } void set_col_base(int col) { m_col_base = col; } @@ -109,26 +109,4 @@ private: DECLARE_DEVICE_TYPE(TC0480SCP, tc0480scp_device) - -#define MCFG_TC0480SCP_GFX_REGION(_region) \ - downcast(*device).set_gfx_region(_region); - -#define MCFG_TC0480SCP_TX_REGION(_region) \ - downcast(*device).set_tx_region(_region); - -#define MCFG_TC0480SCP_OFFSETS(_xoffs, _yoffs) \ - downcast(*device).set_offsets(_xoffs, _yoffs); - -#define MCFG_TC0480SCP_OFFSETS_TX(_xoffs, _yoffs) \ - downcast(*device).set_offsets_tx(_xoffs, _yoffs); - -#define MCFG_TC0480SCP_OFFSETS_FLIP(_xoffs, _yoffs) \ - downcast(*device).set_offsets_flip(_xoffs, _yoffs); - -#define MCFG_TC0480SCP_COL_BASE(_col) \ - downcast(*device).set_col_base(_col); - -#define MCFG_TC0480SCP_GFXDECODE(_gfxtag) \ - downcast(*device).set_gfxdecode_tag(_gfxtag); - #endif // MAME_VIDEO_TC0480SCP_H diff --git a/src/mame/video/tecmo_spr.h b/src/mame/video/tecmo_spr.h index 1bbf1308fe9..e8d371a1a3a 100644 --- a/src/mame/video/tecmo_spr.h +++ b/src/mame/video/tecmo_spr.h @@ -15,16 +15,16 @@ public: void set_bootleg(int bootleg) { m_bootleg = bootleg; } void set_yoffset(int yoffset) { m_yoffset = yoffset; } - // gaiden.c / spbactn.c / tecmo16.c sprites + // gaiden.cpp / spbactn.cpp / tecmo16.cpp sprites void gaiden_draw_sprites(screen_device &screen, gfxdecode_device *gfxdecode, const rectangle &cliprect, uint16_t* spriteram, int sprite_sizey, int spr_offset_y, int flip_screen, bitmap_ind16 &sprite_bitmap); - // tecmo.c sprites + // tecmo.cpp sprites void draw_sprites_8bit(screen_device &screen, bitmap_ind16 &bitmap, gfxdecode_device *gfxdecode, const rectangle &cliprect, uint8_t* spriteram, int size, int video_type, int flip_screen); - // wc90.c sprites + // wc90.cpp sprites void draw_wc90_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect, gfxdecode_device *gfxdecode, uint8_t* spriteram, int size, int priority); - // tbowl.c sprites + // tbowl.cpp sprites void tbowl_draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect, gfxdecode_device *gfxdecode, int xscroll, uint8_t* spriteram); protected: @@ -39,13 +39,4 @@ protected: DECLARE_DEVICE_TYPE(TECMO_SPRITE, tecmo_spr_device) -#define MCFG_TECMO_SPRITE_GFX_REGION(_region) \ - downcast(*device).set_gfx_region(_region); - -#define MCFG_TECMO_SPRITE_BOOTLEG(_bootleg) \ - downcast(*device).set_bootleg(_bootleg); - -#define MCFG_TECMO_SPRITE_YOFFSET(_yoffset) \ - downcast(*device).set_yoffset(_yoffset); - #endif // MAME_VIDEO_TECMO_SPR_H diff --git a/src/mame/video/toaplan_scu.h b/src/mame/video/toaplan_scu.h index e860c66df53..bafceb28953 100644 --- a/src/mame/video/toaplan_scu.h +++ b/src/mame/video/toaplan_scu.h @@ -38,12 +38,5 @@ private: DECLARE_DEVICE_TYPE(TOAPLAN_SCU, toaplan_scu_device) -#define MCFG_TOAPLAN_SCU_SET_XOFFSETS(_xoffs, _xoffs_flipped ) \ - downcast(*device).set_xoffsets(_xoffs, _xoffs_flipped); - -#define MCFG_TOAPLAN_SCU_ADD(_tag, _palette_tag, _xoffs, _xoffs_flipped ) \ - MCFG_DEVICE_ADD(_tag, TOAPLAN_SCU, 0) \ - MCFG_GFX_PALETTE(_palette_tag) \ - downcast(*device).set_xoffsets(_xoffs, _xoffs_flipped); #endif // MAME_VIDEO_TOAPLAN_SCU_H diff --git a/src/mame/video/vs920a.cpp b/src/mame/video/vs920a.cpp index a0eeca2f63d..f827b95453f 100644 --- a/src/mame/video/vs920a.cpp +++ b/src/mame/video/vs920a.cpp @@ -1,7 +1,7 @@ // license:BSD-3-Clause // copyright-holders:David Haywood -// currently used by gstriker.c, apparently inufuku uses the same chip +// currently used by gstriker.cpp, apparently inufuku uses the same chip /*** VS920A (score tilemap) **********************************************/ diff --git a/src/mame/video/vs920a.h b/src/mame/video/vs920a.h index 0779c5e7891..8607329d5a0 100644 --- a/src/mame/video/vs920a.h +++ b/src/mame/video/vs920a.h @@ -9,7 +9,7 @@ class vs920a_text_tilemap_device : public device_t { public: - void set_gfxdecode_tag(const char *tag) { m_gfxdecode.set_tag(tag); } + template void set_gfxdecode_tag(T &&tag) { m_gfxdecode.set_tag(std::forward(tag)); } void set_gfx_region(int gfxregion) { m_gfx_region = gfxregion; } vs920a_text_tilemap_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); @@ -39,11 +39,4 @@ private: DECLARE_DEVICE_TYPE(VS920A, vs920a_text_tilemap_device) - -#define MCFG_VS920A_GFX_REGION(_region) \ - downcast(*device).set_gfx_region(_region); - -#define MCFG_VS920A_GFXDECODE(_gfxtag) \ - downcast(*device).set_gfxdecode_tag(_gfxtag); - #endif // MAME_VIDEO_VS920A_H diff --git a/src/mame/video/vsystem_gga.h b/src/mame/video/vsystem_gga.h index 02e633c2b38..01654aa7718 100644 --- a/src/mame/video/vsystem_gga.h +++ b/src/mame/video/vsystem_gga.h @@ -46,13 +46,6 @@ #pragma once -//************************************************************************** -// CONFIGURATION MACROS -//************************************************************************** - -#define MCFG_VSYSTEM_GGA_REGISTER_WRITE_CB(_devcb) \ - downcast(*device).set_write_cb(DEVCB_##_devcb); - //************************************************************************** // TYPE DEFINITIONS @@ -67,7 +60,7 @@ public: vsystem_gga_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); // static configuration - template devcb_base &set_write_cb(Obj &&object) { return m_write_cb.set_callback(std::forward(object)); } + auto write_cb() { return m_write_cb.bind(); } // memory handlers DECLARE_WRITE8_MEMBER(write); diff --git a/src/mame/video/vsystem_spr.h b/src/mame/video/vsystem_spr.h index 8ca15c3693a..bd30347baad 100644 --- a/src/mame/video/vsystem_spr.h +++ b/src/mame/video/vsystem_spr.h @@ -9,46 +9,28 @@ typedef device_delegate vsystem_tile_indirection_delegate; -#define MCFG_VSYSTEM_SPR_SET_TILE_INDIRECT(_class, _method) \ - downcast(*device).set_tile_indirect_cb(vsystem_tile_indirection_delegate(&_class::_method, #_class "::" #_method, nullptr, (_class *)nullptr)); -#define MCFG_VSYSTEM_SPR_SET_GFXREGION(_rgn) \ - downcast(*device).set_gfx_region(_rgn); -#define MCFG_VSYSTEM_SPR_SET_PALBASE(_palbase) \ - downcast(*device).CG10103_set_pal_base(_palbase); -#define MCFG_VSYSTEM_SPR_SET_PALMASK(_palmask) \ - downcast(*device).set_pal_mask(_palmask); -#define MCFG_VSYSTEM_SPR_SET_TRANSPEN(_transpen) \ - downcast(*device).CG10103_set_transpen(_transpen); -#define MCFG_VSYSTEM_SPR_GFXDECODE(_gfxtag) \ - downcast(*device).set_gfxdecode_tag(_gfxtag); -#define MCFG_VSYSTEM_SPR_SET_OFFSETS(_xoffs, _yoffs) \ - downcast(*device).set_offsets(_xoffs,_yoffs); -#define MCFG_VSYSTEM_SPR_SET_PDRAW(_pdraw) \ - downcast(*device).set_pdraw(_pdraw); - /*** CG10103 **********************************************/ class vsystem_spr_device : public device_t { public: // configuration - void set_gfxdecode_tag(const char *tag) { m_gfxdecode.set_tag(tag); } + template void set_gfxdecode_tag(T &&tag) { m_gfxdecode.set_tag(std::forward(tag)); } void set_offsets(int xoffs, int yoffs) { m_xoffs = xoffs; m_yoffs = yoffs; } void set_pdraw(bool pdraw) { m_pdraw = pdraw; } - template void set_tile_indirect_cb(Object &&cb) { m_newtilecb = std::forward(cb); } + template void set_tile_indirect_cb(T &&... args) { m_newtilecb = vsystem_tile_indirection_delegate(std::forward(args)...); } void set_gfx_region(int gfx_region) { m_gfx_region = gfx_region; } - void CG10103_set_pal_base(int pal_base) { m_pal_base = pal_base; } + void set_pal_base(int pal_base) { m_pal_base = pal_base; } void set_pal_mask(int pal_mask) { m_pal_mask = pal_mask; } - void CG10103_set_transpen(int transpen) { m_transpen = transpen; } + void set_transpen(int transpen) { m_transpen = transpen; } vsystem_spr_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); void draw_sprites(uint16_t const *spriteram, int spriteram_bytes, screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect, int prihack_mask = -1, int prihack_val = -1 ); - void set_pal_base(int pal_base) { m_pal_base = pal_base; } protected: virtual void device_start() override; diff --git a/src/mame/video/vsystem_spr2.h b/src/mame/video/vsystem_spr2.h index e25e07c0d32..13bcc4d9acd 100644 --- a/src/mame/video/vsystem_spr2.h +++ b/src/mame/video/vsystem_spr2.h @@ -6,23 +6,13 @@ typedef device_delegate vsystem_tile2_indirection_delegate; -#define MCFG_VSYSTEM_SPR2_SET_TILE_INDIRECT(_class, _method) \ - downcast(*device).set_tile_indirect_cb(vsystem_tile2_indirection_delegate(&_class::_method, #_class "::" #_method, nullptr, (_class *)nullptr)); -#define MCFG_VSYSTEM_SPR2_SET_PRITYPE(_val) \ - downcast(*device).set_pritype(_val); -#define MCFG_VSYSTEM_SPR2_SET_GFXREGION(_rgn) \ - downcast(*device).set_gfx_region(_rgn); -#define MCFG_VSYSTEM_SPR2_SET_OFFSETS(_xoffs, _yoffs) \ - downcast(*device).set_offsets(_xoffs,_yoffs); -#define MCFG_VSYSTEM_SPR2_GFXDECODE(_gfxtag) \ - downcast(*device).set_gfxdecode_tag(_gfxtag); class vsystem_spr2_device : public device_t { public: // configuration - void set_gfxdecode_tag(const char *tag) { m_gfxdecode.set_tag(tag); } - template void set_tile_indirect_cb(Object &&cb) { m_newtilecb = std::forward(cb); } + template void set_gfxdecode_tag(T &&tag) { m_gfxdecode.set_tag(std::forward(tag)); } + template void set_tile_indirect_cb(T &&... args) { m_newtilecb = vsystem_tile2_indirection_delegate(std::forward(args)...); } void set_pritype(int pritype) { m_pritype = pritype; } void set_gfx_region(int gfx_region) { m_gfx_region = gfx_region; } void set_offsets(int xoffs, int yoffs) diff --git a/src/mame/video/wswan.h b/src/mame/video/wswan.h index 6d4e1f0e802..89eb0c499da 100644 --- a/src/mame/video/wswan.h +++ b/src/mame/video/wswan.h @@ -34,16 +34,6 @@ typedef device_delegate wswan_video_irq_cb_delegate; typedef device_delegate wswan_video_dmasnd_cb_delegate; #define WSWAN_VIDEO_DMASND_CB_MEMBER(_name) void _name(void) -#define MCFG_WSWAN_VIDEO_IRQ_CB(_class, _method) \ - downcast(*device).set_irq_callback(wswan_video_irq_cb_delegate(&_class::_method, #_class "::" #_method, this)); - -#define MCFG_WSWAN_VIDEO_DMASND_CB(_class, _method) \ - downcast(*device).set_dmasnd_callback(wswan_video_dmasnd_cb_delegate(&_class::_method, #_class "::" #_method, this)); - -#define MCFG_WSWAN_VIDEO_TYPE( _type) \ - downcast(*device).set_vdp_type(_type); - - class wswan_video_device : public device_t { public: @@ -51,8 +41,8 @@ public: ~wswan_video_device() {} // static configuration - void set_irq_callback(wswan_video_irq_cb_delegate callback) { m_set_irq_cb = callback; } - void set_dmasnd_callback(wswan_video_dmasnd_cb_delegate callback) { m_snd_dma_cb = callback; } + template void set_irq_callback(T &&... args) { m_set_irq_cb = wswan_video_irq_cb_delegate(std::forward(args)...); } + template void set_dmasnd_callback(T &&... args) { m_snd_dma_cb = wswan_video_dmasnd_cb_delegate(std::forward(args)...); } void set_vdp_type(int type) { m_vdp_type = type; } uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); -- cgit v1.2.3