summaryrefslogtreecommitdiffstatshomepage
path: root/src
diff options
context:
space:
mode:
author wilbertpol <wilbertpol@users.noreply.github.com>2018-02-20 08:29:34 +0100
committer Olivier Galibert <galibert@pobox.com>2018-02-20 08:29:34 +0100
commit9b3008b0aea2f7425d3ef8125c835f02cffc1e6c (patch)
treef79e0feb9e844b43087c9495ae79eba497057b7f /src
parent0d9494480ac4a89310dd10df64ee2b23432a63e3 (diff)
de-staticify initializations for src/mame/video (nw) (#3246)
Diffstat (limited to 'src')
-rw-r--r--src/mame/drivers/expro02.cpp12
-rw-r--r--src/mame/drivers/galpani2.cpp2
-rw-r--r--src/mame/drivers/galpani3.cpp6
-rw-r--r--src/mame/drivers/inufuku.cpp4
-rw-r--r--src/mame/drivers/jchan.cpp4
-rw-r--r--src/mame/drivers/jclub2.cpp6
-rw-r--r--src/mame/drivers/kaneko16.cpp64
-rw-r--r--src/mame/drivers/sandscrp.cpp4
-rw-r--r--src/mame/drivers/twincobr.cpp2
-rw-r--r--src/mame/video/733_asr.h12
-rw-r--r--src/mame/video/911_vdt.h12
-rw-r--r--src/mame/video/antic.h4
-rw-r--r--src/mame/video/atarimo.cpp13
-rw-r--r--src/mame/video/atarimo.h10
-rw-r--r--src/mame/video/atarirle.cpp7
-rw-r--r--src/mame/video/atarirle.h6
-rw-r--r--src/mame/video/avgdvg.cpp4
-rw-r--r--src/mame/video/avgdvg.h4
-rw-r--r--src/mame/video/bfm_dm01.h4
-rw-r--r--src/mame/video/crt.h22
-rw-r--r--src/mame/video/decbac06.cpp15
-rw-r--r--src/mame/video/decbac06.h37
-rw-r--r--src/mame/video/deckarn.cpp11
-rw-r--r--src/mame/video/deckarn.h10
-rw-r--r--src/mame/video/decmxc06.cpp11
-rw-r--r--src/mame/video/decmxc06.h19
-rw-r--r--src/mame/video/deco16ic.cpp6
-rw-r--r--src/mame/video/deco16ic.h60
-rw-r--r--src/mame/video/deco_ace.cpp6
-rw-r--r--src/mame/video/deco_ace.h6
-rw-r--r--src/mame/video/deco_zoomspr.cpp6
-rw-r--r--src/mame/video/deco_zoomspr.h4
-rw-r--r--src/mame/video/decocomn.cpp6
-rw-r--r--src/mame/video/decocomn.h6
-rw-r--r--src/mame/video/decodmd1.cpp5
-rw-r--r--src/mame/video/decodmd1.h4
-rw-r--r--src/mame/video/decodmd2.cpp5
-rw-r--r--src/mame/video/decodmd2.h4
-rw-r--r--src/mame/video/decodmd3.cpp5
-rw-r--r--src/mame/video/decodmd3.h4
-rw-r--r--src/mame/video/decospr.cpp11
-rw-r--r--src/mame/video/decospr.h43
-rw-r--r--src/mame/video/decrmc3.cpp16
-rw-r--r--src/mame/video/decrmc3.h24
-rw-r--r--src/mame/video/dooyong.cpp37
-rw-r--r--src/mame/video/dooyong.h46
-rw-r--r--src/mame/video/fuukifg.cpp4
-rw-r--r--src/mame/video/fuukifg.h6
-rw-r--r--src/mame/video/gic.h6
-rw-r--r--src/mame/video/gime.h24
-rw-r--r--src/mame/video/gp9001.h4
-rw-r--r--src/mame/video/gtia.h8
-rw-r--r--src/mame/video/igs017_igs031.cpp6
-rw-r--r--src/mame/video/igs017_igs031.h11
-rw-r--r--src/mame/video/k001005.cpp4
-rw-r--r--src/mame/video/k001005.h4
-rw-r--r--src/mame/video/k001006.h10
-rw-r--r--src/mame/video/k001604.h18
-rw-r--r--src/mame/video/k007121.cpp6
-rw-r--r--src/mame/video/k007121.h4
-rw-r--r--src/mame/video/k007342.cpp6
-rw-r--r--src/mame/video/k007342.h16
-rw-r--r--src/mame/video/k007420.cpp6
-rw-r--r--src/mame/video/k007420.h12
-rw-r--r--src/mame/video/k037122.h4
-rw-r--r--src/mame/video/k051316.cpp20
-rw-r--r--src/mame/video/k051316.h27
-rw-r--r--src/mame/video/k051960.cpp15
-rw-r--r--src/mame/video/k051960.h30
-rw-r--r--src/mame/video/k052109.cpp13
-rw-r--r--src/mame/video/k052109.h18
-rw-r--r--src/mame/video/k053244_k053245.cpp7
-rw-r--r--src/mame/video/k053244_k053245.h19
-rw-r--r--src/mame/video/k053246_k053247_k055673.h23
-rw-r--r--src/mame/video/k053250.cpp7
-rw-r--r--src/mame/video/k053250.h4
-rw-r--r--src/mame/video/k053250_ps.cpp7
-rw-r--r--src/mame/video/k053250_ps.h8
-rw-r--r--src/mame/video/k053936.h15
-rw-r--r--src/mame/video/k054156_k054157_k056832.h19
-rw-r--r--src/mame/video/k054338.h10
-rw-r--r--src/mame/video/k057714.h4
-rw-r--r--src/mame/video/k1ge.h12
-rw-r--r--src/mame/video/kan_pand.cpp6
-rw-r--r--src/mame/video/kan_pand.h19
-rw-r--r--src/mame/video/kaneko_grap2.cpp11
-rw-r--r--src/mame/video/kaneko_grap2.h8
-rw-r--r--src/mame/video/kaneko_spr.cpp29
-rw-r--r--src/mame/video/kaneko_spr.h18
-rw-r--r--src/mame/video/kaneko_tmap.cpp27
-rw-r--r--src/mame/video/kaneko_tmap.h18
-rw-r--r--src/mame/video/maria.h4
-rw-r--r--src/mame/video/mb60553.cpp9
-rw-r--r--src/mame/video/mb60553.h8
-rw-r--r--src/mame/video/ms1_tmap.cpp16
-rw-r--r--src/mame/video/ms1_tmap.h18
-rw-r--r--src/mame/video/nick.h4
-rw-r--r--src/mame/video/pc080sn.cpp6
-rw-r--r--src/mame/video/pc080sn.h27
-rw-r--r--src/mame/video/pc090oj.cpp12
-rw-r--r--src/mame/video/pc090oj.h27
-rw-r--r--src/mame/video/pcd.h4
-rw-r--r--src/mame/video/sega16sp.cpp21
-rw-r--r--src/mame/video/sega16sp.h22
-rw-r--r--src/mame/video/segaic16.cpp11
-rw-r--r--src/mame/video/segaic16.h10
-rw-r--r--src/mame/video/segaic24.cpp5
-rw-r--r--src/mame/video/segaic24.h6
-rw-r--r--src/mame/video/seibu_crtc.h20
-rw-r--r--src/mame/video/seta001.cpp6
-rw-r--r--src/mame/video/seta001.h10
-rw-r--r--src/mame/video/snk68_spr.cpp17
-rw-r--r--src/mame/video/snk68_spr.h12
-rw-r--r--src/mame/video/st0020.cpp8
-rw-r--r--src/mame/video/st0020.h12
-rw-r--r--src/mame/video/tc0080vco.cpp6
-rw-r--r--src/mame/video/tc0080vco.h27
-rw-r--r--src/mame/video/tc0100scn.cpp12
-rw-r--r--src/mame/video/tc0100scn.h53
-rw-r--r--src/mame/video/tc0110pcr.cpp6
-rw-r--r--src/mame/video/tc0110pcr.h4
-rw-r--r--src/mame/video/tc0180vcu.cpp6
-rw-r--r--src/mame/video/tc0180vcu.h18
-rw-r--r--src/mame/video/tc0280grd.cpp6
-rw-r--r--src/mame/video/tc0280grd.h14
-rw-r--r--src/mame/video/tc0480scp.cpp6
-rw-r--r--src/mame/video/tc0480scp.h45
-rw-r--r--src/mame/video/tecmo_mix.cpp48
-rw-r--r--src/mame/video/tecmo_mix.h24
-rw-r--r--src/mame/video/tecmo_spr.cpp15
-rw-r--r--src/mame/video/tecmo_spr.h12
-rw-r--r--src/mame/video/tia.h12
-rw-r--r--src/mame/video/toaplan_scu.cpp7
-rw-r--r--src/mame/video/toaplan_scu.h9
-rw-r--r--src/mame/video/uv201.h12
-rw-r--r--src/mame/video/vrender0.h4
-rw-r--r--src/mame/video/vs920a.cpp9
-rw-r--r--src/mame/video/vs920a.h8
-rw-r--r--src/mame/video/vsystem_gga.h4
-rw-r--r--src/mame/video/vsystem_spr.cpp50
-rw-r--r--src/mame/video/vsystem_spr.h44
-rw-r--r--src/mame/video/vsystem_spr2.cpp28
-rw-r--r--src/mame/video/vsystem_spr2.h30
-rw-r--r--src/mame/video/vtvideo.h16
-rw-r--r--src/mame/video/wpc_dmd.h4
-rw-r--r--src/mame/video/wswan.h12
-rw-r--r--src/mame/video/ygv608.h12
-rw-r--r--src/mame/video/zx8301.h8
148 files changed, 973 insertions, 1055 deletions
diff --git a/src/mame/drivers/expro02.cpp b/src/mame/drivers/expro02.cpp
index 2e27f905203..37b59c6e7e4 100644
--- a/src/mame/drivers/expro02.cpp
+++ b/src/mame/drivers/expro02.cpp
@@ -920,13 +920,13 @@ MACHINE_CONFIG_START(expro02_state::expro02)
MCFG_PALETTE_INIT_OWNER(expro02_state, expro02)
MCFG_DEVICE_ADD("view2_0", KANEKO_TMAP, 0)
- kaneko_view2_tilemap_device::set_gfx_region(*device, 1);
- kaneko_view2_tilemap_device::set_offset(*device, 0x5b, 0x8, 256, 224);
+ MCFG_KANEKO_TMAP_GFX_REGION(1)
+ MCFG_KANEKO_TMAP_OFFSET(0x5b, 0x8, 256, 224)
MCFG_KANEKO_TMAP_GFXDECODE("gfxdecode")
MCFG_DEVICE_ADD_VU002_SPRITES
- kaneko16_sprite_device::set_priorities(*device, 8,8,8,8); // above all (not verified)
- kaneko16_sprite_device::set_offsets(*device, 0, -0x40);
+ MCFG_KANEKO16_SPRITE_PRIORITIES(8,8,8,8) // above all (not verified)
+ MCFG_KANEKO16_SPRITE_OFFSETS(0, -0x40)
MCFG_KANEKO16_SPRITE_GFXDECODE("gfxdecode")
MCFG_DEVICE_ADD("calc1_mcu", KANEKO_HIT, 0)
@@ -958,8 +958,8 @@ MACHINE_CONFIG_START(expro02_state::comad)
MCFG_DEVICE_MODIFY("view2_0")
// these values might not be correct, behavior differs from original boards
- kaneko_view2_tilemap_device::set_invert_flip(*device, 1);
- kaneko_view2_tilemap_device::set_offset(*device, -256, -216, 256, 224);
+ MCFG_KANEKO_TMAP_INVERT_FLIP(1)
+ MCFG_KANEKO_TMAP_OFFSET(-256, -216, 256, 224)
MCFG_WATCHDOG_MODIFY("watchdog")
MCFG_WATCHDOG_TIME_INIT(attotime::from_seconds(0)) /* a guess, and certainly wrong */
diff --git a/src/mame/drivers/galpani2.cpp b/src/mame/drivers/galpani2.cpp
index 5492ef0c61e..81e7a951119 100644
--- a/src/mame/drivers/galpani2.cpp
+++ b/src/mame/drivers/galpani2.cpp
@@ -653,7 +653,7 @@ MACHINE_CONFIG_START(galpani2_state::galpani2)
MCFG_PALETTE_INIT_OWNER(galpani2_state,galpani2)
MCFG_DEVICE_ADD_KC002_SPRITES
- kaneko16_sprite_device::set_offsets(*device, 0x10000 - 0x16c0 + 0xc00, 0);
+ MCFG_KANEKO16_SPRITE_OFFSETS(0x10000 - 0x16c0 + 0xc00, 0)
MCFG_KANEKO16_SPRITE_GFXDECODE("gfxdecode")
diff --git a/src/mame/drivers/galpani3.cpp b/src/mame/drivers/galpani3.cpp
index ef776b0529c..443710aff72 100644
--- a/src/mame/drivers/galpani3.cpp
+++ b/src/mame/drivers/galpani3.cpp
@@ -529,15 +529,15 @@ MACHINE_CONFIG_START(galpani3_state::galpani3)
MCFG_DEVICE_ADD("spritegen", SKNS_SPRITE, 0)
MCFG_DEVICE_ADD("grap2_0", KANEKO_GRAP2, 0)
- kaneko_grap2_device::set_chipnum(*device, 0);
+ MCFG_KANEKO_GRAP2_CHIPNUM(0)
MCFG_KANEKO_GRAP2_PALETTE("palette")
MCFG_DEVICE_ADD("grap2_1", KANEKO_GRAP2, 0)
- kaneko_grap2_device::set_chipnum(*device, 1);
+ MCFG_KANEKO_GRAP2_CHIPNUM(1)
MCFG_KANEKO_GRAP2_PALETTE("palette")
MCFG_DEVICE_ADD("grap2_2", KANEKO_GRAP2, 0)
- kaneko_grap2_device::set_chipnum(*device, 2);
+ MCFG_KANEKO_GRAP2_CHIPNUM(2)
MCFG_KANEKO_GRAP2_PALETTE("palette")
diff --git a/src/mame/drivers/inufuku.cpp b/src/mame/drivers/inufuku.cpp
index fdc511cc557..411ff7abca5 100644
--- a/src/mame/drivers/inufuku.cpp
+++ b/src/mame/drivers/inufuku.cpp
@@ -356,8 +356,8 @@ MACHINE_CONFIG_START(inufuku_state::inufuku)
MCFG_SCREEN_PALETTE("palette")
MCFG_DEVICE_ADD("vsystem_spr", VSYSTEM_SPR, 0)
- vsystem_spr_device::set_offsets(*device, 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)
- vsystem_spr_device::set_pdraw(*device, true);
+ 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")
diff --git a/src/mame/drivers/jchan.cpp b/src/mame/drivers/jchan.cpp
index 3a4c4c8bc84..9b303fa31cd 100644
--- a/src/mame/drivers/jchan.cpp
+++ b/src/mame/drivers/jchan.cpp
@@ -606,8 +606,8 @@ MACHINE_CONFIG_START(jchan_state::jchan)
MCFG_PALETTE_FORMAT(xGGGGGRRRRRBBBBB)
MCFG_DEVICE_ADD("view2_0", KANEKO_TMAP, 0)
- kaneko_view2_tilemap_device::set_gfx_region(*device, 1);
- kaneko_view2_tilemap_device::set_offset(*device, 25, 11, 320, 240);
+ MCFG_KANEKO_TMAP_GFX_REGION(1)
+ MCFG_KANEKO_TMAP_OFFSET(25, 11, 320, 240)
MCFG_KANEKO_TMAP_GFXDECODE("gfxdecode")
diff --git a/src/mame/drivers/jclub2.cpp b/src/mame/drivers/jclub2.cpp
index b4b20cf522d..4ecd39945fa 100644
--- a/src/mame/drivers/jclub2.cpp
+++ b/src/mame/drivers/jclub2.cpp
@@ -1155,7 +1155,7 @@ MACHINE_CONFIG_START(jclub2o_state::jclub2o)
MCFG_PALETTE_FORMAT(xBBBBBGGGGGRRRRR)
MCFG_DEVICE_ADD("st0020", ST0020_SPRITES, 0)
- st0020_device::static_set_is_jclub2(*device, 1);
+ MCFG_ST0020_IS_JCLUB2(1)
MCFG_ST0020_SPRITES_PALETTE("palette")
// layout
@@ -1190,8 +1190,8 @@ MACHINE_CONFIG_START(jclub2_state::jclub2)
// NOT an ST0020 but instead ST0032, ram format isn't compatible at least
MCFG_DEVICE_ADD("st0020", ST0020_SPRITES, 0)
- st0020_device::static_set_is_st0032(*device, 1);
- st0020_device::static_set_is_jclub2(*device, 1); // offsets
+ MCFG_ST0020_IS_ST0032(1)
+ MCFG_ST0020_IS_JCLUB2(1) // offsets
MCFG_ST0020_SPRITES_PALETTE("palette")
// layout
diff --git a/src/mame/drivers/kaneko16.cpp b/src/mame/drivers/kaneko16.cpp
index dba608a0694..49b6ed955f4 100644
--- a/src/mame/drivers/kaneko16.cpp
+++ b/src/mame/drivers/kaneko16.cpp
@@ -1895,12 +1895,12 @@ MACHINE_CONFIG_START(kaneko16_berlwall_state::berlwall)
MCFG_PALETTE_INIT_OWNER(kaneko16_berlwall_state,berlwall)
MCFG_DEVICE_ADD("view2_0", KANEKO_TMAP, 0)
- kaneko_view2_tilemap_device::set_gfx_region(*device, 1);
- kaneko_view2_tilemap_device::set_offset(*device, 0x5b, -0x8, 256, 240+16);
+ MCFG_KANEKO_TMAP_GFX_REGION(1)
+ MCFG_KANEKO_TMAP_OFFSET(0x5b, -0x8, 256, 240+16)
MCFG_KANEKO_TMAP_GFXDECODE("gfxdecode")
MCFG_DEVICE_ADD_VU002_SPRITES
- kaneko16_sprite_device::set_offsets(*device, 0, -1*64);
+ MCFG_KANEKO16_SPRITE_OFFSETS(0, -1*64)
MCFG_KANEKO16_SPRITE_GFXDECODE("gfxdecode")
MCFG_VIDEO_START_OVERRIDE(kaneko16_berlwall_state,berlwall)
@@ -1953,17 +1953,17 @@ MACHINE_CONFIG_START(kaneko16_state::bakubrkr)
MCFG_PALETTE_FORMAT(xGGGGGRRRRRBBBBB)
MCFG_DEVICE_ADD("view2_0", KANEKO_TMAP, 0)
- kaneko_view2_tilemap_device::set_gfx_region(*device, 1);
- kaneko_view2_tilemap_device::set_offset(*device, 0x5b, -0x8, 256, 240);
+ MCFG_KANEKO_TMAP_GFX_REGION(1)
+ MCFG_KANEKO_TMAP_OFFSET(0x5b, -0x8, 256, 240)
MCFG_KANEKO_TMAP_GFXDECODE("gfxdecode")
MCFG_DEVICE_ADD("view2_1", KANEKO_TMAP, 0)
- kaneko_view2_tilemap_device::set_gfx_region(*device, 2);
- kaneko_view2_tilemap_device::set_offset(*device, 0x5b, -0x8, 256, 240);
+ MCFG_KANEKO_TMAP_GFX_REGION(2)
+ MCFG_KANEKO_TMAP_OFFSET(0x5b, -0x8, 256, 240)
MCFG_KANEKO_TMAP_GFXDECODE("gfxdecode")
MCFG_DEVICE_ADD_VU002_SPRITES
- kaneko16_sprite_device::set_priorities(*device, 8,8,8,8); // above all
+ MCFG_KANEKO16_SPRITE_PRIORITIES(8,8,8,8) // above all
MCFG_KANEKO16_SPRITE_GFXDECODE("gfxdecode")
@@ -2027,13 +2027,13 @@ MACHINE_CONFIG_START(kaneko16_state::blazeon)
MCFG_PALETTE_FORMAT(xGGGGGRRRRRBBBBB)
MCFG_DEVICE_ADD("view2_0", KANEKO_TMAP, 0)
- kaneko_view2_tilemap_device::set_gfx_region(*device, 1);
- kaneko_view2_tilemap_device::set_offset(*device, 0x33, 0x8, 320, 240);
+ MCFG_KANEKO_TMAP_GFX_REGION(1)
+ MCFG_KANEKO_TMAP_OFFSET(0x33, 0x8, 320, 240)
MCFG_KANEKO_TMAP_GFXDECODE("gfxdecode")
MCFG_DEVICE_ADD_VU002_SPRITES
- kaneko16_sprite_device::set_priorities(*device, 1 /* "above tile[0], below the others" */ ,2 /* "above tile[0-1], below the others" */ ,8 /* above all */,8 /* above all */);
- kaneko16_sprite_device::set_offsets(*device, 0x10000 - 0x680, 0x000);
+ MCFG_KANEKO16_SPRITE_PRIORITIES(1 /* "above tile[0], below the others" */ ,2 /* "above tile[0-1], below the others" */ ,8 /* above all */,8 /* above all */)
+ MCFG_KANEKO16_SPRITE_OFFSETS(0x10000 - 0x680, 0x000)
MCFG_KANEKO16_SPRITE_GFXDECODE("gfxdecode")
// there is actually a 2nd sprite chip! looks like our device emulation handles both at once
@@ -2081,13 +2081,13 @@ MACHINE_CONFIG_START(kaneko16_state::wingforc)
MCFG_PALETTE_FORMAT(xGGGGGRRRRRBBBBB)
MCFG_DEVICE_ADD("view2_0", KANEKO_TMAP, 0)
- kaneko_view2_tilemap_device::set_gfx_region(*device, 1);
- kaneko_view2_tilemap_device::set_offset(*device, 0x33, 0x8+1, 320, 240);
+ MCFG_KANEKO_TMAP_GFX_REGION(1)
+ MCFG_KANEKO_TMAP_OFFSET(0x33, 0x8+1, 320, 240)
MCFG_KANEKO_TMAP_GFXDECODE("gfxdecode")
MCFG_DEVICE_ADD_VU002_SPRITES
- kaneko16_sprite_device::set_priorities(*device, 1 /* "above tile[0], below the others" */ ,2 /* "above tile[0-1], below the others" */ ,8 /* above all */,8 /* above all */);
- kaneko16_sprite_device::set_offsets(*device, 0x10000 - 0x680, 0x000);
+ MCFG_KANEKO16_SPRITE_PRIORITIES(1 /* "above tile[0], below the others" */ ,2 /* "above tile[0-1], below the others" */ ,8 /* above all */,8 /* above all */)
+ MCFG_KANEKO16_SPRITE_OFFSETS(0x10000 - 0x680, 0x000)
MCFG_KANEKO16_SPRITE_GFXDECODE("gfxdecode")
// there is actually a 2nd sprite chip! looks like our device emulation handles both at once
@@ -2149,13 +2149,13 @@ MACHINE_CONFIG_START(kaneko16_gtmr_state::gtmr)
MCFG_PALETTE_FORMAT(xGGGGGRRRRRBBBBB)
MCFG_DEVICE_ADD("view2_0", KANEKO_TMAP, 0)
- kaneko_view2_tilemap_device::set_gfx_region(*device, 1);
- kaneko_view2_tilemap_device::set_offset(*device, 0x33, 0x0, 320, 240);
+ MCFG_KANEKO_TMAP_GFX_REGION(1)
+ MCFG_KANEKO_TMAP_OFFSET(0x33, 0x0, 320, 240)
MCFG_KANEKO_TMAP_GFXDECODE("gfxdecode")
MCFG_DEVICE_ADD("view2_1", KANEKO_TMAP, 0)
- kaneko_view2_tilemap_device::set_gfx_region(*device, 2);
- kaneko_view2_tilemap_device::set_offset(*device, 0x33, 0x0, 320, 240);
+ MCFG_KANEKO_TMAP_GFX_REGION(2)
+ MCFG_KANEKO_TMAP_OFFSET(0x33, 0x0, 320, 240)
MCFG_KANEKO_TMAP_GFXDECODE("gfxdecode")
MCFG_DEVICE_ADD_KC002_SPRITES
@@ -2211,7 +2211,7 @@ MACHINE_CONFIG_START(kaneko16_gtmr_state::bloodwar)
MCFG_MACHINE_RESET_OVERRIDE(kaneko16_gtmr_state, gtmr )
MCFG_DEVICE_MODIFY("kan_spr")
- kaneko16_sprite_device::set_priorities(*device, 2 /* never used? */ ,3 /* character selection / vs. portraits */ ,5 /* winning portrait*/ ,7 /* ? */);
+ MCFG_KANEKO16_SPRITE_PRIORITIES(2 /* never used? */ ,3 /* character selection / vs. portraits */ ,5 /* winning portrait*/ ,7 /* ? */)
@@ -2233,7 +2233,7 @@ MACHINE_CONFIG_START(kaneko16_gtmr_state::bonkadv)
MCFG_MACHINE_RESET_OVERRIDE(kaneko16_gtmr_state, gtmr )
MCFG_DEVICE_MODIFY("kan_spr")
- kaneko16_sprite_device::set_priorities(*device, 2 /* never used? */ ,3 /* volcano lava on level 2 */ ,5 /* in-game player */ ,7 /* demostration text */);
+ MCFG_KANEKO16_SPRITE_PRIORITIES(2 /* never used? */ ,3 /* volcano lava on level 2 */ ,5 /* in-game player */ ,7 /* demostration text */)
MCFG_DEVICE_MODIFY("toybox")
@@ -2275,17 +2275,17 @@ MACHINE_CONFIG_START(kaneko16_state::mgcrystl)
MCFG_PALETTE_FORMAT(xGGGGGRRRRRBBBBB)
MCFG_DEVICE_ADD("view2_0", KANEKO_TMAP, 0)
- kaneko_view2_tilemap_device::set_gfx_region(*device, 1);
- kaneko_view2_tilemap_device::set_offset(*device, 0x5b, -0x8, 256, 240);
+ MCFG_KANEKO_TMAP_GFX_REGION(1)
+ MCFG_KANEKO_TMAP_OFFSET(0x5b, -0x8, 256, 240)
MCFG_KANEKO_TMAP_GFXDECODE("gfxdecode")
MCFG_DEVICE_ADD("view2_1", KANEKO_TMAP, 0)
- kaneko_view2_tilemap_device::set_gfx_region(*device, 2);
- kaneko_view2_tilemap_device::set_offset(*device, 0x5b, -0x8, 256, 240);
+ MCFG_KANEKO_TMAP_GFX_REGION(2)
+ MCFG_KANEKO_TMAP_OFFSET(0x5b, -0x8, 256, 240)
MCFG_KANEKO_TMAP_GFXDECODE("gfxdecode")
MCFG_DEVICE_ADD_VU002_SPRITES
- kaneko16_sprite_device::set_priorities(*device, 2 /* below all */ ,3 /* above tile[0], below the other */ ,5 /* above all */ ,7 /* above all */);
+ MCFG_KANEKO16_SPRITE_PRIORITIES(2 /* below all */ ,3 /* above tile[0], below the other */ ,5 /* above all */ ,7 /* above all */)
MCFG_KANEKO16_SPRITE_GFXDECODE("gfxdecode")
@@ -2406,16 +2406,16 @@ MACHINE_CONFIG_START(kaneko16_shogwarr_state::shogwarr)
MCFG_PALETTE_FORMAT(xGGGGGRRRRRBBBBB)
MCFG_DEVICE_ADD("view2_0", KANEKO_TMAP, 0)
- kaneko_view2_tilemap_device::set_gfx_region(*device, 1);
- kaneko_view2_tilemap_device::set_offset(*device, 0x33, -0x8, 320, 240);
+ MCFG_KANEKO_TMAP_GFX_REGION(1)
+ MCFG_KANEKO_TMAP_OFFSET(0x33, -0x8, 320, 240)
MCFG_KANEKO_TMAP_GFXDECODE("gfxdecode")
MCFG_VIDEO_START_OVERRIDE(kaneko16_shogwarr_state,kaneko16)
MCFG_DEVICE_ADD_VU002_SPRITES
- kaneko16_sprite_device::set_priorities(*device, 1 /* below all */ ,3 /* above tile[0], below the others */ ,5 /* above all */ ,7 /* above all */);
- kaneko16_sprite_device::set_offsets(*device, 0xa00, -0x40);
- kaneko16_sprite_device::set_fliptype(*device, 1);
+ MCFG_KANEKO16_SPRITE_PRIORITIES(1 /* below all */ ,3 /* above tile[0], below the others */ ,5 /* above all */ ,7 /* above all */)
+ MCFG_KANEKO16_SPRITE_OFFSETS(0xa00, -0x40)
+ MCFG_KANEKO16_SPRITE_FLIPTYPE(1)
MCFG_KANEKO16_SPRITE_GFXDECODE("gfxdecode")
MCFG_DEVICE_ADD("kan_hit", KANEKO_HIT, 0)
diff --git a/src/mame/drivers/sandscrp.cpp b/src/mame/drivers/sandscrp.cpp
index 32451c92954..7bfd0340a67 100644
--- a/src/mame/drivers/sandscrp.cpp
+++ b/src/mame/drivers/sandscrp.cpp
@@ -503,8 +503,8 @@ MACHINE_CONFIG_START(sandscrp_state::sandscrp)
MCFG_PALETTE_FORMAT(xGGGGGRRRRRBBBBB)
MCFG_DEVICE_ADD("view2_0", KANEKO_TMAP, 0)
- kaneko_view2_tilemap_device::set_gfx_region(*device, 1);
- kaneko_view2_tilemap_device::set_offset(*device, 0x5b, 0, 256, 224);
+ MCFG_KANEKO_TMAP_GFX_REGION(1)
+ MCFG_KANEKO_TMAP_OFFSET(0x5b, 0, 256, 224)
MCFG_KANEKO_TMAP_GFXDECODE("gfxdecode")
MCFG_DEVICE_ADD("calc1_mcu", KANEKO_HIT, 0)
diff --git a/src/mame/drivers/twincobr.cpp b/src/mame/drivers/twincobr.cpp
index c3525851b5b..ae450944b82 100644
--- a/src/mame/drivers/twincobr.cpp
+++ b/src/mame/drivers/twincobr.cpp
@@ -730,7 +730,7 @@ MACHINE_CONFIG_START(twincobr_state::fshark)
MCFG_ADDRESSABLE_LATCH_Q0_OUT_CB(WRITELINE(twincobr_state, dsp_int_w))
MCFG_DEVICE_MODIFY("scu")
- toaplan_scu_device::static_set_xoffsets(*device, 32, 14);
+ MCFG_TOAPLAN_SCU_SET_XOFFSETS(32, 14)
MACHINE_CONFIG_END
diff --git a/src/mame/video/733_asr.h b/src/mame/video/733_asr.h
index 7939bc2e3a6..7d623abc35a 100644
--- a/src/mame/video/733_asr.h
+++ b/src/mame/video/733_asr.h
@@ -22,13 +22,13 @@ public:
DECLARE_READ8_MEMBER(cru_r);
DECLARE_WRITE8_MEMBER(cru_w);
- template <class Object> static devcb_base &static_set_keyint_callback(device_t &device, Object &&cb)
+ template <class Object> devcb_base &set_keyint_callback(Object &&cb)
{
- return downcast<asr733_device &>(device).m_keyint_line.set_callback(std::forward<Object>(cb));
+ return m_keyint_line.set_callback(std::forward<Object>(cb));
}
- template <class Object> static devcb_base &static_set_lineint_callback(device_t &device, Object &&cb)
+ template <class Object> devcb_base &set_lineint_callback(Object &&cb)
{
- return downcast<asr733_device &>(device).m_lineint_line.set_callback(std::forward<Object>(cb));
+ return m_lineint_line.set_callback(std::forward<Object>(cb));
}
protected:
@@ -83,9 +83,9 @@ private:
DECLARE_DEVICE_TYPE(ASR733, asr733_device)
#define MCFG_ASR733_KEYINT_HANDLER( _intcallb ) \
- devcb = &asr733_device::static_set_keyint_callback( *device, DEVCB_##_intcallb );
+ devcb = &downcast<asr733_device &>(*device).set_keyint_callback(DEVCB_##_intcallb);
#define MCFG_ASR733_LINEINT_HANDLER( _intcallb ) \
- devcb = &asr733_device::static_set_lineint_callback( *device, DEVCB_##_intcallb );
+ devcb = &downcast<asr733_device &>(*device).set_lineint_callback(DEVCB_##_intcallb);
#endif // MAME_VIDEO_733_ASR
diff --git a/src/mame/video/911_vdt.h b/src/mame/video/911_vdt.h
index 5661bc83ccf..737941f7300 100644
--- a/src/mame/video/911_vdt.h
+++ b/src/mame/video/911_vdt.h
@@ -48,14 +48,14 @@ public:
DECLARE_READ8_MEMBER(cru_r);
DECLARE_WRITE8_MEMBER(cru_w);
- template <class Object> static devcb_base &static_set_keyint_callback(device_t &device, Object &&cb)
+ template <class Object> devcb_base &set_keyint_callback(Object &&cb)
{
- return downcast<vdt911_device &>(device).m_keyint_line.set_callback(std::forward<Object>(cb));
+ return m_keyint_line.set_callback(std::forward<Object>(cb));
}
- template <class Object> static devcb_base &static_set_lineint_callback(device_t &device, Object &&cb)
+ template <class Object> devcb_base &set_lineint_callback(Object &&cb)
{
- return downcast<vdt911_device &>(device).m_lineint_line.set_callback(std::forward<Object>(cb));
+ return m_lineint_line.set_callback(std::forward<Object>(cb));
}
protected:
@@ -114,9 +114,9 @@ private:
DECLARE_DEVICE_TYPE(VDT911, vdt911_device)
#define MCFG_VDT911_KEYINT_HANDLER( _intcallb ) \
- devcb = &vdt911_device::static_set_keyint_callback( *device, DEVCB_##_intcallb );
+ devcb = &downcast<vdt911_device &>(*device).set_keyint_callback(DEVCB_##_intcallb);
#define MCFG_VDT911_LINEINT_HANDLER( _intcallb ) \
- devcb = &vdt911_device::static_set_lineint_callback( *device, DEVCB_##_intcallb );
+ devcb = &downcast<vdt911_device &>(*device).set_lineint_callback(DEVCB_##_intcallb);
#endif // MAME_VIDEO_911_VDT_H
diff --git a/src/mame/video/antic.h b/src/mame/video/antic.h
index dabce4e1eeb..fd8a3ebb4f9 100644
--- a/src/mame/video/antic.h
+++ b/src/mame/video/antic.h
@@ -50,7 +50,7 @@ public:
virtual void device_reset() override;
virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) override;
- static void set_gtia_tag(device_t &device, const char *tag) { downcast<antic_device &>(device).m_gtia_tag = tag; }
+ void set_gtia_tag(const char *tag) { m_gtia_tag = tag; }
DECLARE_READ8_MEMBER( read );
DECLARE_WRITE8_MEMBER( write );
@@ -212,7 +212,7 @@ DECLARE_DEVICE_TYPE(ATARI_ANTIC, antic_device)
#define MCFG_ANTIC_GTIA(_tag) \
- antic_device::set_gtia_tag(*device, _tag);
+ downcast<antic_device &>(*device).set_gtia_tag(_tag);
#define MCFG_SCREEN_VISIBLE_AREA_ANTIC() \
MCFG_SCREEN_VISIBLE_AREA(antic_device::MIN_X, antic_device::MAX_X, antic_device::MIN_Y, antic_device::MAX_Y)
diff --git a/src/mame/video/atarimo.cpp b/src/mame/video/atarimo.cpp
index 304da2f5ab6..f2893be0376 100644
--- a/src/mame/video/atarimo.cpp
+++ b/src/mame/video/atarimo.cpp
@@ -154,24 +154,23 @@ atari_motion_objects_device::atari_motion_objects_device(const machine_config &m
}
//-------------------------------------------------
-// static_set_gfxdecode_tag: Set the tag of the
+// set_gfxdecode_tag: Set the tag of the
// gfx decoder
//-------------------------------------------------
-void atari_motion_objects_device::static_set_gfxdecode_tag(device_t &device, const char *tag)
+void atari_motion_objects_device::set_gfxdecode_tag(const char *tag)
{
- downcast<atari_motion_objects_device &>(device).m_gfxdecode.set_tag(tag);
+ m_gfxdecode.set_tag(tag);
}
//-------------------------------------------------
-// static_set_config: Set the tag of the
+// set_config: Set the tag of the
// sound CPU
//-------------------------------------------------
-void atari_motion_objects_device::static_set_config(device_t &device, const atari_motion_objects_config &config)
+void atari_motion_objects_device::set_config(const atari_motion_objects_config &config)
{
- atari_motion_objects_device &target = downcast<atari_motion_objects_device &>(device);
- static_cast<atari_motion_objects_config &>(target) = config;
+ static_cast<atari_motion_objects_config &>(*this) = config;
}
diff --git a/src/mame/video/atarimo.h b/src/mame/video/atarimo.h
index bbb9ae626ab..f9de759a5d4 100644
--- a/src/mame/video/atarimo.h
+++ b/src/mame/video/atarimo.h
@@ -21,10 +21,10 @@
#define MCFG_ATARI_MOTION_OBJECTS_ADD(_tag, _screen, _config) \
MCFG_DEVICE_ADD(_tag, ATARI_MOTION_OBJECTS, 0) \
MCFG_VIDEO_SET_SCREEN(_screen) \
- atari_motion_objects_device::static_set_config(*device, _config);
+ downcast<atari_motion_objects_device &>(*device).set_config(_config);
#define MCFG_ATARI_MOTION_OBJECTS_GFXDECODE(_gfxtag) \
- atari_motion_objects_device::static_set_gfxdecode_tag(*device, "^" _gfxtag);
+ downcast<atari_motion_objects_device &>(*device).set_gfxdecode_tag("^" _gfxtag);
//**************************************************************************
@@ -85,9 +85,9 @@ public:
// construction/destruction
atari_motion_objects_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
- // static configuration
- static void static_set_gfxdecode_tag(device_t &device, const char *tag);
- static void static_set_config(device_t &device, const atari_motion_objects_config &config);
+ // configuration
+ void set_gfxdecode_tag(const char *tag);
+ void set_config(const atari_motion_objects_config &config);
// getters
int bank() const { return m_bank; }
diff --git a/src/mame/video/atarirle.cpp b/src/mame/video/atarirle.cpp
index 5c0ddfa5bc5..7897ef20042 100644
--- a/src/mame/video/atarirle.cpp
+++ b/src/mame/video/atarirle.cpp
@@ -76,14 +76,13 @@ atari_rle_objects_device::atari_rle_objects_device(const machine_config &mconfig
//-------------------------------------------------
-// static_set_config: Set the tag of the
+// set_config: Set the tag of the
// sound CPU
//-------------------------------------------------
-void atari_rle_objects_device::static_set_config(device_t &device, const atari_rle_objects_config &config)
+void atari_rle_objects_device::set_config(const atari_rle_objects_config &config)
{
- atari_rle_objects_device &target = downcast<atari_rle_objects_device &>(device);
- static_cast<atari_rle_objects_config &>(target) = config;
+ static_cast<atari_rle_objects_config &>(*this) = config;
}
diff --git a/src/mame/video/atarirle.h b/src/mame/video/atarirle.h
index 3bd70986705..a75cc336d79 100644
--- a/src/mame/video/atarirle.h
+++ b/src/mame/video/atarirle.h
@@ -19,7 +19,7 @@
#define MCFG_ATARIRLE_ADD(_tag, _interface) \
MCFG_DEVICE_ADD(_tag, ATARI_RLE_OBJECTS, 0) \
- atari_rle_objects_device::static_set_config(*device, _interface);
+ downcast<atari_rle_objects_device &>(*device).set_config(_interface);
@@ -80,8 +80,8 @@ public:
// construction/destruction
atari_rle_objects_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
- // static configuration helpers
- static void static_set_config(device_t &device, const atari_rle_objects_config &config);
+ // configuration helpers
+ void set_config(const atari_rle_objects_config &config);
// control handlers
DECLARE_WRITE8_MEMBER(control_write);
diff --git a/src/mame/video/avgdvg.cpp b/src/mame/video/avgdvg.cpp
index 0786b1d61ff..3b9e9db4392 100644
--- a/src/mame/video/avgdvg.cpp
+++ b/src/mame/video/avgdvg.cpp
@@ -1462,9 +1462,9 @@ void dvg_device::device_start()
register_state();
}
-void avgdvg_device::static_set_vector_tag(device_t &device, const char *tag)
+void avgdvg_device::set_vector_tag(const char *tag)
{
- downcast<avgdvg_device &>(device).m_vector.set_tag(tag);
+ m_vector.set_tag(tag);
}
avgdvg_device::avgdvg_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock)
diff --git a/src/mame/video/avgdvg.h b/src/mame/video/avgdvg.h
index 113d7633032..98bcba69f6e 100644
--- a/src/mame/video/avgdvg.h
+++ b/src/mame/video/avgdvg.h
@@ -9,14 +9,14 @@
#include "video/vector.h"
#define MCFG_AVGDVG_VECTOR(_tag) \
- avgdvg_device::static_set_vector_tag(*device, "^" _tag);
+ downcast<avgdvg_device &>(*device).set_vector_tag("^" _tag);
// ======================> avgdvg_device
class avgdvg_device : public device_t
{
public:
- static void static_set_vector_tag(device_t &device, const char *tag);
+ void set_vector_tag(const char *tag);
DECLARE_CUSTOM_INPUT_MEMBER(done_r);
DECLARE_WRITE8_MEMBER(go_w);
diff --git a/src/mame/video/bfm_dm01.h b/src/mame/video/bfm_dm01.h
index e41e7ed4a16..06a2923f6bb 100644
--- a/src/mame/video/bfm_dm01.h
+++ b/src/mame/video/bfm_dm01.h
@@ -13,7 +13,7 @@
#include "screen.h"
#define MCFG_BFM_DM01_BUSY_CB(_devcb) \
- devcb = &bfm_dm01_device::set_busy_callback(*device, DEVCB_##_devcb);
+ devcb = &downcast<bfm_dm01_device &>(*device).set_busy_callback(DEVCB_##_devcb);
class bfm_dm01_device : public device_t
{
@@ -21,7 +21,7 @@ public:
bfm_dm01_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
~bfm_dm01_device() {}
- template <class Object> static devcb_base &set_busy_callback(device_t &device, Object &&cb) { return downcast<bfm_dm01_device &>(device).m_busy_cb.set_callback(std::forward<Object>(cb)); }
+ template <class Object> devcb_base &set_busy_callback(Object &&cb) { return m_busy_cb.set_callback(std::forward<Object>(cb)); }
DECLARE_READ8_MEMBER( control_r );
DECLARE_WRITE8_MEMBER( control_w );
diff --git a/src/mame/video/crt.h b/src/mame/video/crt.h
index 34c546107f3..8b09f355435 100644
--- a/src/mame/video/crt.h
+++ b/src/mame/video/crt.h
@@ -19,13 +19,13 @@
//**************************************************************************
#define MCFG_CRT_NUM_LEVELS(_lev) \
- crt_device::set_num_levels(*device, _lev);
+ downcast<crt_device &>(*device).set_num_levels(_lev);
#define MCFG_CRT_OFFSETS(_xoffs, _yoffs) \
- crt_device::set_offsets(*device, _xoffs, _yoffs);
+ downcast<crt_device &>(*device).set_offsets(_xoffs, _yoffs);
#define MCFG_CRT_SIZE(_width, _height) \
- crt_device::set_size(*device, _width, _height);
+ downcast<crt_device &>(*device).set_size(_width, _height);
//**************************************************************************
@@ -39,18 +39,16 @@ class crt_device : public device_t
public:
crt_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
- static void set_num_levels(device_t &device, int levels) { downcast<crt_device &>(device).m_num_intensity_levels = levels; }
- static void set_offsets(device_t &device, int x_offset, int y_offset)
+ void set_num_levels(int levels) { m_num_intensity_levels = levels; }
+ void set_offsets(int x_offset, int y_offset)
{
- crt_device &dev = downcast<crt_device &>(device);
- dev.m_window_offset_x = x_offset;
- dev.m_window_offset_y = y_offset;
+ m_window_offset_x = x_offset;
+ m_window_offset_y = y_offset;
}
- static void set_size(device_t &device, int width, int height)
+ void set_size(int width, int height)
{
- crt_device &dev = downcast<crt_device &>(device);
- dev.m_window_width = width;
- dev.m_window_height = height;
+ m_window_width = width;
+ m_window_height = height;
}
void plot(int x, int y);
diff --git a/src/mame/video/decbac06.cpp b/src/mame/video/decbac06.cpp
index a48b8165d45..87f43a58d4a 100644
--- a/src/mame/video/decbac06.cpp
+++ b/src/mame/video/decbac06.cpp
@@ -94,13 +94,13 @@ deco_bac06_device::deco_bac06_device(const machine_config &mconfig, const char *
}
//-------------------------------------------------
-// static_set_gfxdecode_tag: Set the tag of the
+// set_gfxdecode_tag: Set the tag of the
// gfx decoder
//-------------------------------------------------
-void deco_bac06_device::static_set_gfxdecode_tag(device_t &device, const char *tag)
+void deco_bac06_device::set_gfxdecode_tag(const char *tag)
{
- downcast<deco_bac06_device &>(device).m_gfxdecode.set_tag(tag);
+ m_gfxdecode.set_tag(tag);
}
void deco_bac06_device::device_start()
@@ -134,12 +134,11 @@ void deco_bac06_device::device_reset()
{
}
-void deco_bac06_device::set_gfx_region_wide(device_t &device, int region8x8, int region16x16, int wide)
+void deco_bac06_device::set_gfx_region_wide(int region8x8, int region16x16, int wide)
{
- deco_bac06_device &dev = downcast<deco_bac06_device &>(device);
- dev.m_gfxregion8x8 = region8x8;
- dev.m_gfxregion16x16 = region16x16;
- dev.m_wide = wide;
+ m_gfxregion8x8 = region8x8;
+ m_gfxregion16x16 = region16x16;
+ m_wide = wide;
}
void deco_bac06_device::set_flip_screen(bool flip)
diff --git a/src/mame/video/decbac06.h b/src/mame/video/decbac06.h
index 64f51dfc266..6fc4b8ae98b 100644
--- a/src/mame/video/decbac06.h
+++ b/src/mame/video/decbac06.h
@@ -8,13 +8,13 @@
#include <memory>
#define MCFG_BAC06_BOOTLEG_DISABLE_8x8 \
- deco_bac06_device::disable_8x8(*device);
+ downcast<deco_bac06_device &>(*device).disable_8x8();
#define MCFG_BAC06_BOOTLEG_DISABLE_16x16 \
- deco_bac06_device::disable_16x16(*device);
+ downcast<deco_bac06_device &>(*device).disable_16x16();
#define MCFG_BAC06_BOOTLEG_DISABLE_RC_SCROLL \
- deco_bac06_device::disable_rc_scroll(*device);
+ downcast<deco_bac06_device &>(*device).disable_rc_scroll();
class deco_bac06_device : public device_t
@@ -22,9 +22,12 @@ class deco_bac06_device : public device_t
public:
deco_bac06_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
- // static configuration
- static void static_set_gfxdecode_tag(device_t &device, const char *tag);
- static void set_gfx_region_wide(device_t &device, int region8x8, int region16x16, int wide);
+ // configuration
+ void set_gfxdecode_tag(const char *tag);
+ void set_gfx_region_wide(int region8x8, int region16x16, int wide);
+ void disable_8x8() { m_supports_8x8 = false; }
+ void disable_16x16() { m_supports_16x16 = false; }
+ void disable_rc_scroll() { m_supports_rc_scroll = false; }
std::unique_ptr<uint16_t[]> m_pf_data;
std::unique_ptr<uint16_t[]> m_pf_rowscroll;
@@ -40,24 +43,6 @@ public:
bool m_supports_16x16;
bool m_supports_rc_scroll;
- static void disable_8x8(device_t &device)
- {
- deco_bac06_device &dev = downcast<deco_bac06_device &>(device);
- dev.m_supports_8x8 = false;
- }
-
- static void disable_16x16(device_t &device)
- {
- deco_bac06_device &dev = downcast<deco_bac06_device &>(device);
- dev.m_supports_16x16 = false;
- }
-
- static void disable_rc_scroll(device_t &device)
- {
- deco_bac06_device &dev = downcast<deco_bac06_device &>(device);
- dev.m_supports_rc_scroll = false;
- }
-
void create_tilemaps(int region8x8,int region16x16);
uint16_t m_pf_control_0[8];
uint16_t m_pf_control_1[8];
@@ -159,9 +144,9 @@ private:
DECLARE_DEVICE_TYPE(DECO_BAC06, deco_bac06_device)
#define MCFG_DECO_BAC06_GFXDECODE(_gfxtag) \
- deco_bac06_device::static_set_gfxdecode_tag(*device, "^" _gfxtag);
+ downcast<deco_bac06_device &>(*device).set_gfxdecode_tag("^" _gfxtag);
#define MCFG_DECO_BAC06_GFX_REGION_WIDE(_8x8, _16x16, _wide) \
- deco_bac06_device::set_gfx_region_wide(*device, _8x8, _16x16, _wide);
+ downcast<deco_bac06_device &>(*device).set_gfx_region_wide(_8x8, _16x16, _wide);
#endif // MAME_VIDEO_DECOBAC06_H
diff --git a/src/mame/video/deckarn.cpp b/src/mame/video/deckarn.cpp
index d3b54d1324d..5d5b18e8c32 100644
--- a/src/mame/video/deckarn.cpp
+++ b/src/mame/video/deckarn.cpp
@@ -6,10 +6,9 @@
#include "emu.h"
#include "deckarn.h"
-void deco_karnovsprites_device::set_gfx_region(device_t &device, int region)
+void deco_karnovsprites_device::set_gfx_region(int region)
{
- deco_karnovsprites_device &dev = downcast<deco_karnovsprites_device &>(device);
- dev.m_gfxregion = region;
+ m_gfxregion = region;
}
DEFINE_DEVICE_TYPE(DECO_KARNOVSPRITES, deco_karnovsprites_device, "deco_karnovsprites", "DECO Karnov Sprites")
@@ -22,13 +21,13 @@ deco_karnovsprites_device::deco_karnovsprites_device(const machine_config &mconf
}
//-------------------------------------------------
-// static_set_gfxdecode_tag: Set the tag of the
+// set_gfxdecode_tag: Set the tag of the
// gfx decoder
//-------------------------------------------------
-void deco_karnovsprites_device::static_set_gfxdecode_tag(device_t &device, const char *tag)
+void deco_karnovsprites_device::set_gfxdecode_tag(const char *tag)
{
- downcast<deco_karnovsprites_device &>(device).m_gfxdecode.set_tag(tag);
+ m_gfxdecode.set_tag(tag);
}
void deco_karnovsprites_device::device_start()
diff --git a/src/mame/video/deckarn.h b/src/mame/video/deckarn.h
index 43ae0ba6314..a9c5b62d51e 100644
--- a/src/mame/video/deckarn.h
+++ b/src/mame/video/deckarn.h
@@ -14,9 +14,9 @@ public:
void draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect, uint16_t* spriteram, int size, int priority);
void set_flip_screen(bool flip) { m_flip_screen = flip; }
- // static configuration
- static void static_set_gfxdecode_tag(device_t &device, const char *tag);
- static void set_gfx_region(device_t &device, int region);
+ // configuration
+ void set_gfxdecode_tag(const char *tag);
+ void set_gfx_region(int region);
protected:
virtual void device_start() override;
@@ -31,9 +31,9 @@ private:
DECLARE_DEVICE_TYPE(DECO_KARNOVSPRITES, deco_karnovsprites_device)
#define MCFG_DECO_KARNOVSPRITES_GFXDECODE(_gfxtag) \
- deco_karnovsprites_device::static_set_gfxdecode_tag(*device, "^" _gfxtag);
+ downcast<deco_karnovsprites_device &>(*device).set_gfxdecode_tag("^" _gfxtag);
#define MCFG_DECO_KARNOVSPRITES_GFX_REGION(_region) \
- deco_karnovsprites_device::set_gfx_region(*device, _region);
+ downcast<deco_karnovsprites_device &>(*device).set_gfx_region(_region);
#endif // MAME_VIDEO_DECKARN_H
diff --git a/src/mame/video/decmxc06.cpp b/src/mame/video/decmxc06.cpp
index ef66c48b556..f61b3fbbde4 100644
--- a/src/mame/video/decmxc06.cpp
+++ b/src/mame/video/decmxc06.cpp
@@ -41,10 +41,9 @@ todo:
#include "decmxc06.h"
#include "screen.h"
-void deco_mxc06_device::set_gfx_region(device_t &device, int region)
+void deco_mxc06_device::set_gfx_region(int region)
{
- deco_mxc06_device &dev = downcast<deco_mxc06_device &>(device);
- dev.m_gfxregion = region;
+ m_gfxregion = region;
}
@@ -60,13 +59,13 @@ deco_mxc06_device::deco_mxc06_device(const machine_config &mconfig, const char *
}
//-------------------------------------------------
-// static_set_gfxdecode_tag: Set the tag of the
+// set_gfxdecode_tag: Set the tag of the
// gfx decoder
//-------------------------------------------------
-void deco_mxc06_device::static_set_gfxdecode_tag(device_t &device, const char *tag)
+void deco_mxc06_device::set_gfxdecode_tag(const char *tag)
{
- downcast<deco_mxc06_device &>(device).m_gfxdecode.set_tag(tag);
+ m_gfxdecode.set_tag(tag);
}
diff --git a/src/mame/video/decmxc06.h b/src/mame/video/decmxc06.h
index 95aec2ec5a2..154092813ac 100644
--- a/src/mame/video/decmxc06.h
+++ b/src/mame/video/decmxc06.h
@@ -11,15 +11,10 @@ class deco_mxc06_device : public device_t, public device_video_interface
public:
deco_mxc06_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
- // static configuration
- static void static_set_gfxdecode_tag(device_t &device, const char *tag);
- static void set_gfx_region(device_t &device, int region);
- static void set_ram_size(device_t &device, int size)
- {
- deco_mxc06_device &dev = downcast<deco_mxc06_device &>(device);
- dev.m_ramsize = size;
- }
-
+ // configuration
+ void set_gfxdecode_tag(const char *tag);
+ void set_gfx_region(int region);
+ void set_ram_size(int size) { m_ramsize = size; }
void set_gfxregion(int region) { m_gfxregion = region; };
void draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect, uint16_t* spriteram16, int pri_mask, int pri_val, int col_mask);
@@ -43,12 +38,12 @@ private:
DECLARE_DEVICE_TYPE(DECO_MXC06, deco_mxc06_device)
#define MCFG_DECO_MXC06_GFXDECODE(_gfxtag) \
- deco_mxc06_device::static_set_gfxdecode_tag(*device, "^" _gfxtag);
+ downcast<deco_mxc06_device &>(*device).set_gfxdecode_tag("^" _gfxtag);
#define MCFG_DECO_MXC06_GFX_REGION(_region) \
- deco_mxc06_device::set_gfx_region(*device, _region);
+ downcast<deco_mxc06_device &>(*device).set_gfx_region(_region);
#define MCFG_DECO_MXC06_RAMSIZE(_size) \
- deco_mxc06_device::set_ram_size(*device, _size);
+ downcast<deco_mxc06_device &>(*device).set_ram_size(_size);
#endif // MAME_VIDEO_DECMXC06_H
diff --git a/src/mame/video/deco16ic.cpp b/src/mame/video/deco16ic.cpp
index 41449bfdd05..afe0cf7e797 100644
--- a/src/mame/video/deco16ic.cpp
+++ b/src/mame/video/deco16ic.cpp
@@ -207,13 +207,13 @@ deco16ic_device::deco16ic_device(const machine_config &mconfig, const char *tag,
}
//-------------------------------------------------
-// static_set_gfxdecode_tag: Set the tag of the
+// set_gfxdecode_tag: Set the tag of the
// gfx decoder
//-------------------------------------------------
-void deco16ic_device::static_set_gfxdecode_tag(device_t &device, const char *tag)
+void deco16ic_device::set_gfxdecode_tag(const char *tag)
{
- downcast<deco16ic_device &>(device).m_gfxdecode.set_tag(tag);
+ m_gfxdecode.set_tag(tag);
}
//-------------------------------------------------
diff --git a/src/mame/video/deco16ic.h b/src/mame/video/deco16ic.h
index 17fd6025ec9..382d56c16c3 100644
--- a/src/mame/video/deco16ic.h
+++ b/src/mame/video/deco16ic.h
@@ -32,22 +32,22 @@ public:
deco16ic_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
~deco16ic_device() {}
- // static configuration
- static void static_set_gfxdecode_tag(device_t &device, const char *tag);
- static void static_set_palette_tag(device_t &device, const char *tag);
- static void set_bank1_callback(device_t &device, deco16_bank_cb_delegate callback) { downcast<deco16ic_device &>(device).m_bank1_cb = callback; }
- static void set_bank2_callback(device_t &device, deco16_bank_cb_delegate callback) { downcast<deco16ic_device &>(device).m_bank2_cb = callback; }
- static void set_split(device_t &device, int split) { downcast<deco16ic_device &>(device).m_split = split; }
- static void set_pf1_size(device_t &device, int size) { downcast<deco16ic_device &>(device).m_pf1_size = size; }
- static void set_pf2_size(device_t &device, int size) { downcast<deco16ic_device &>(device).m_pf2_size = size; }
- static void set_pf1_trans_mask(device_t &device, int mask) { downcast<deco16ic_device &>(device).m_pf1_trans_mask = mask; }
- static void set_pf2_trans_mask(device_t &device, int mask) { downcast<deco16ic_device &>(device).m_pf2_trans_mask = mask; }
- static void set_pf1_col_mask(device_t &device, int mask) { downcast<deco16ic_device &>(device).m_pf1_colourmask = mask; }
- static void set_pf2_col_mask(device_t &device, int mask) { downcast<deco16ic_device &>(device).m_pf2_colourmask = mask; }
- static void set_pf1_col_bank(device_t &device, int bank) { downcast<deco16ic_device &>(device).m_pf1_colour_bank = bank; }
- static void set_pf2_col_bank(device_t &device, int bank) { downcast<deco16ic_device &>(device).m_pf2_colour_bank = bank; }
- static void set_pf12_8x8_bank(device_t &device, int bank) { downcast<deco16ic_device &>(device).m_pf12_8x8_gfx_bank = bank; }
- static void set_pf12_16x16_bank(device_t &device, int bank) { downcast<deco16ic_device &>(device).m_pf12_16x16_gfx_bank = bank; }
+ // configuration
+ void set_gfxdecode_tag(const char *tag);
+ void set_palette_tag(const char *tag);
+ void set_bank1_callback(deco16_bank_cb_delegate callback) { m_bank1_cb = callback; }
+ void set_bank2_callback(deco16_bank_cb_delegate callback) { m_bank2_cb = callback; }
+ void set_split(int split) { m_split = split; }
+ void set_pf1_size(int size) { m_pf1_size = size; }
+ void set_pf2_size(int size) { m_pf2_size = size; }
+ void set_pf1_trans_mask(int mask) { m_pf1_trans_mask = mask; }
+ void set_pf2_trans_mask(int mask) { m_pf2_trans_mask = mask; }
+ void set_pf1_col_mask(int mask) { m_pf1_colourmask = mask; }
+ void set_pf2_col_mask(int mask) { m_pf2_colourmask = mask; }
+ void set_pf1_col_bank(int bank) { m_pf1_colour_bank = bank; }
+ void set_pf2_col_bank(int bank) { m_pf2_colour_bank = bank; }
+ void set_pf12_8x8_bank(int bank) { m_pf12_8x8_gfx_bank = bank; }
+ void set_pf12_16x16_bank(int bank) { m_pf12_16x16_gfx_bank = bank; }
DECLARE_WRITE16_MEMBER( pf1_data_w );
@@ -173,46 +173,46 @@ DECLARE_DEVICE_TYPE(DECO16IC, deco16ic_device)
#define MCFG_DECO16IC_SET_SCREEN MCFG_VIDEO_SET_SCREEN
#define MCFG_DECO16IC_BANK1_CB(_class, _method) \
- deco16ic_device::set_bank1_callback(*device, deco16_bank_cb_delegate(&_class::_method, #_class "::" #_method, this));
+ downcast<deco16ic_device &>(*device).set_bank1_callback(deco16_bank_cb_delegate(&_class::_method, #_class "::" #_method, this));
#define MCFG_DECO16IC_BANK2_CB(_class, _method) \
- deco16ic_device::set_bank2_callback(*device, deco16_bank_cb_delegate(&_class::_method, #_class "::" #_method, this));
+ downcast<deco16ic_device &>(*device).set_bank2_callback(deco16_bank_cb_delegate(&_class::_method, #_class "::" #_method, this));
#define MCFG_DECO16IC_SPLIT(_split) \
- deco16ic_device::set_split(*device, _split);
+ downcast<deco16ic_device &>(*device).set_split(_split);
#define MCFG_DECO16IC_PF1_SIZE(_size) \
- deco16ic_device::set_pf1_size(*device, _size);
+ downcast<deco16ic_device &>(*device).set_pf1_size(_size);
#define MCFG_DECO16IC_PF2_SIZE(_size) \
- deco16ic_device::set_pf2_size(*device, _size);
+ downcast<deco16ic_device &>(*device).set_pf2_size(_size);
#define MCFG_DECO16IC_PF1_TRANS_MASK(_mask) \
- deco16ic_device::set_pf1_trans_mask(*device, _mask);
+ downcast<deco16ic_device &>(*device).set_pf1_trans_mask(_mask);
#define MCFG_DECO16IC_PF2_TRANS_MASK(_mask) \
- deco16ic_device::set_pf2_trans_mask(*device, _mask);
+ downcast<deco16ic_device &>(*device).set_pf2_trans_mask(_mask);
#define MCFG_DECO16IC_PF1_COL_MASK(_mask) \
- deco16ic_device::set_pf1_col_mask(*device, _mask);
+ downcast<deco16ic_device &>(*device).set_pf1_col_mask(_mask);
#define MCFG_DECO16IC_PF2_COL_MASK(_mask) \
- deco16ic_device::set_pf2_col_mask(*device, _mask);
+ downcast<deco16ic_device &>(*device).set_pf2_col_mask(_mask);
#define MCFG_DECO16IC_PF1_COL_BANK(_bank) \
- deco16ic_device::set_pf1_col_bank(*device, _bank);
+ downcast<deco16ic_device &>(*device).set_pf1_col_bank(_bank);
#define MCFG_DECO16IC_PF2_COL_BANK(_bank) \
- deco16ic_device::set_pf2_col_bank(*device, _bank);
+ downcast<deco16ic_device &>(*device).set_pf2_col_bank(_bank);
#define MCFG_DECO16IC_PF12_8X8_BANK(_bank) \
- deco16ic_device::set_pf12_8x8_bank(*device, _bank);
+ downcast<deco16ic_device &>(*device).set_pf12_8x8_bank(_bank);
#define MCFG_DECO16IC_PF12_16X16_BANK(_bank) \
- deco16ic_device::set_pf12_16x16_bank(*device, _bank);
+ downcast<deco16ic_device &>(*device).set_pf12_16x16_bank(_bank);
#define MCFG_DECO16IC_GFXDECODE(_gfxtag) \
- deco16ic_device::static_set_gfxdecode_tag(*device, "^" _gfxtag);
+ downcast<deco16ic_device &>(*device).set_gfxdecode_tag("^" _gfxtag);
// function definition for a callback
#define DECO16IC_BANK_CB_MEMBER(_name) int _name(int bank)
diff --git a/src/mame/video/deco_ace.cpp b/src/mame/video/deco_ace.cpp
index ec74830bcf1..bc360fba624 100644
--- a/src/mame/video/deco_ace.cpp
+++ b/src/mame/video/deco_ace.cpp
@@ -74,13 +74,13 @@ deco_ace_device::deco_ace_device(const machine_config &mconfig, const char *tag,
}
//-------------------------------------------------
-// static_set_palette_tag: Set the tag of the
+// set_palette_tag: Set the tag of the
// palette device
//-------------------------------------------------
-void deco_ace_device::static_set_palette_tag(device_t &device, const char *tag)
+void deco_ace_device::set_palette_tag(const char *tag)
{
- downcast<deco_ace_device &>(device).m_palette.set_tag(tag);
+ m_palette.set_tag(tag);
}
//-------------------------------------------------
diff --git a/src/mame/video/deco_ace.h b/src/mame/video/deco_ace.h
index 9d45c5a76c7..e43f00ad5ff 100644
--- a/src/mame/video/deco_ace.h
+++ b/src/mame/video/deco_ace.h
@@ -26,8 +26,8 @@ class deco_ace_device : public device_t,
public:
deco_ace_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
- // static configuration
- static void static_set_palette_tag(device_t &device, const char *tag);
+ // configuration
+ void set_palette_tag(const char *tag);
DECLARE_READ32_MEMBER( buffered_palette_r );
DECLARE_READ16_MEMBER( buffered_palette16_r );
@@ -69,6 +69,6 @@ DECLARE_DEVICE_TYPE(DECO_ACE, deco_ace_device)
MCFG_DEVICE_ADD(_tag, DECO_ACE, 0)
#define MCFG_DECO_ACE_PALETTE(_palette_tag) \
- deco_ace_device::static_set_palette_tag(*device, "^" _palette_tag);
+ downcast<deco_ace_device &>(*device).set_palette_tag("^" _palette_tag);
#endif // MAME_VIDEO_DECO_ACE_H
diff --git a/src/mame/video/deco_zoomspr.cpp b/src/mame/video/deco_zoomspr.cpp
index 4a613bf5e78..c8266df83e6 100644
--- a/src/mame/video/deco_zoomspr.cpp
+++ b/src/mame/video/deco_zoomspr.cpp
@@ -22,13 +22,13 @@ deco_zoomspr_device::deco_zoomspr_device(const machine_config &mconfig, const ch
}
//-------------------------------------------------
-// static_set_gfxdecode_tag: Set the tag of the
+// set_gfxdecode_tag: Set the tag of the
// gfx decoder
//-------------------------------------------------
-void deco_zoomspr_device::static_set_gfxdecode_tag(device_t &device, const char *tag)
+void deco_zoomspr_device::set_gfxdecode_tag(const char *tag)
{
- downcast<deco_zoomspr_device &>(device).m_gfxdecode.set_tag(tag);
+ m_gfxdecode.set_tag(tag);
}
diff --git a/src/mame/video/deco_zoomspr.h b/src/mame/video/deco_zoomspr.h
index 83236eb4ff6..306bc718b21 100644
--- a/src/mame/video/deco_zoomspr.h
+++ b/src/mame/video/deco_zoomspr.h
@@ -11,7 +11,7 @@ class deco_zoomspr_device : public device_t
public:
deco_zoomspr_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
- static void static_set_gfxdecode_tag(device_t &device, const char *tag);
+ void set_gfxdecode_tag(const char *tag);
void dragngun_draw_sprites(bitmap_rgb32 &bitmap, const rectangle &cliprect, const uint32_t *spritedata, uint32_t* dragngun_sprite_layout_0_ram, uint32_t* dragngun_sprite_layout_1_ram, uint32_t* dragngun_sprite_lookup_0_ram, uint32_t* dragngun_sprite_lookup_1_ram, uint32_t dragngun_sprite_ctrl, bitmap_ind8 &pri_bitmap, bitmap_rgb32 &temp_bitmap);
@@ -36,6 +36,6 @@ private:
DECLARE_DEVICE_TYPE(DECO_ZOOMSPR, deco_zoomspr_device)
#define MCFG_DECO_ZOOMSPR_GFXDECODE(_gfxtag) \
- deco_zoomspr_device::static_set_gfxdecode_tag(*device, "^" _gfxtag);
+ downcast<deco_zoomspr_device &>(*device).set_gfxdecode_tag("^" _gfxtag);
#endif // MAME_VIDEO_DECO_ZOOMSPR_H
diff --git a/src/mame/video/decocomn.cpp b/src/mame/video/decocomn.cpp
index dfff3833089..a22444754ac 100644
--- a/src/mame/video/decocomn.cpp
+++ b/src/mame/video/decocomn.cpp
@@ -23,13 +23,13 @@ decocomn_device::decocomn_device(const machine_config &mconfig, const char *tag,
}
//-------------------------------------------------
-// static_set_palette_tag: Set the tag of the
+// set_palette_tag: Set the tag of the
// palette device
//-------------------------------------------------
-void decocomn_device::static_set_palette_tag(device_t &device, const char *tag)
+void decocomn_device::set_palette_tag(const char *tag)
{
- downcast<decocomn_device &>(device).m_palette.set_tag(tag);
+ m_palette.set_tag(tag);
}
//-------------------------------------------------
diff --git a/src/mame/video/decocomn.h b/src/mame/video/decocomn.h
index eaeba2c0a0a..7dc5f0ebabb 100644
--- a/src/mame/video/decocomn.h
+++ b/src/mame/video/decocomn.h
@@ -22,8 +22,8 @@ class decocomn_device : public device_t,
public:
decocomn_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
- // static configuration
- static void static_set_palette_tag(device_t &device, const char *tag);
+ // configuration
+ void set_palette_tag(const char *tag);
DECLARE_WRITE16_MEMBER( buffered_palette_w );
DECLARE_WRITE16_MEMBER( palette_dma_w );
@@ -56,6 +56,6 @@ DECLARE_DEVICE_TYPE(DECOCOMN, decocomn_device)
MCFG_DEVICE_ADD(_tag, DECOCOMN, 0)
#define MCFG_DECOCOMN_PALETTE(_palette_tag) \
- decocomn_device::static_set_palette_tag(*device, "^" _palette_tag);
+ downcast<decocomn_device &>(*device).set_palette_tag("^" _palette_tag);
#endif // MAME_VIDEO_DECOCOMN_H
diff --git a/src/mame/video/decodmd1.cpp b/src/mame/video/decodmd1.cpp
index 70f9269ca9c..bb676f75e84 100644
--- a/src/mame/video/decodmd1.cpp
+++ b/src/mame/video/decodmd1.cpp
@@ -266,10 +266,9 @@ void decodmd_type1_device::device_reset()
m_frameswap = false;
}
-void decodmd_type1_device::static_set_gfxregion(device_t &device, const char *tag)
+void decodmd_type1_device::set_gfxregion(const char *tag)
{
- decodmd_type1_device &cpuboard = downcast<decodmd_type1_device &>(device);
- cpuboard.m_gfxtag = tag;
+ m_gfxtag = tag;
}
uint32_t decodmd_type1_device::screen_update( screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect )
diff --git a/src/mame/video/decodmd1.h b/src/mame/video/decodmd1.h
index f9bd15b66f8..4c2624655a4 100644
--- a/src/mame/video/decodmd1.h
+++ b/src/mame/video/decodmd1.h
@@ -16,7 +16,7 @@
#define MCFG_DECODMD_TYPE1_ADD(_tag, _region) \
MCFG_DEVICE_ADD(_tag, DECODMD1, 0) \
- decodmd_type1_device::static_set_gfxregion(*device, _region);
+ downcast<decodmd_type1_device &>(*device).set_gfxregion(_region);
class decodmd_type1_device : public device_t
{
@@ -45,7 +45,7 @@ public:
DECLARE_WRITE_LINE_MEMBER(rowclock_w);
DECLARE_WRITE_LINE_MEMBER(test_w);
- static void static_set_gfxregion(device_t &device, const char *tag);
+ void set_gfxregion(const char *tag);
void decodmd1_io_map(address_map &map);
void decodmd1_map(address_map &map);
diff --git a/src/mame/video/decodmd2.cpp b/src/mame/video/decodmd2.cpp
index 287d38c07d6..f86e4d256c3 100644
--- a/src/mame/video/decodmd2.cpp
+++ b/src/mame/video/decodmd2.cpp
@@ -188,8 +188,7 @@ void decodmd_type2_device::device_reset()
m_busy = false;
}
-void decodmd_type2_device::static_set_gfxregion(device_t &device, const char *tag)
+void decodmd_type2_device::set_gfxregion(const char *tag)
{
- decodmd_type2_device &cpuboard = downcast<decodmd_type2_device &>(device);
- cpuboard.m_gfxtag = tag;
+ m_gfxtag = tag;
}
diff --git a/src/mame/video/decodmd2.h b/src/mame/video/decodmd2.h
index 3c39f5bc636..0d0d69d1a2b 100644
--- a/src/mame/video/decodmd2.h
+++ b/src/mame/video/decodmd2.h
@@ -16,7 +16,7 @@
#define MCFG_DECODMD_TYPE2_ADD(_tag, _region) \
MCFG_DEVICE_ADD(_tag, DECODMD2, 0) \
- decodmd_type2_device::static_set_gfxregion(*device, _region);
+ downcast<decodmd_type2_device &>(*device).set_gfxregion(_region);
class decodmd_type2_device : public device_t
{
@@ -35,7 +35,7 @@ public:
DECLARE_READ8_MEMBER(status_r);
DECLARE_WRITE8_MEMBER(status_w);
- static void static_set_gfxregion(device_t &device, const char *tag);
+ void set_gfxregion(const char *tag);
void decodmd2_map(address_map &map);
protected:
diff --git a/src/mame/video/decodmd3.cpp b/src/mame/video/decodmd3.cpp
index f111124e662..75bcac915e9 100644
--- a/src/mame/video/decodmd3.cpp
+++ b/src/mame/video/decodmd3.cpp
@@ -184,8 +184,7 @@ void decodmd_type3_device::device_reset()
m_rombank->set_entry(0);
}
-void decodmd_type3_device::static_set_gfxregion(device_t &device, const char *tag)
+void decodmd_type3_device::set_gfxregion(const char *tag)
{
- decodmd_type3_device &cpuboard = downcast<decodmd_type3_device &>(device);
- cpuboard.m_gfxtag = tag;
+ m_gfxtag = tag;
}
diff --git a/src/mame/video/decodmd3.h b/src/mame/video/decodmd3.h
index 5c9d901b3cf..cc67b26a41c 100644
--- a/src/mame/video/decodmd3.h
+++ b/src/mame/video/decodmd3.h
@@ -16,7 +16,7 @@
#define MCFG_DECODMD_TYPE3_ADD(_tag, _region) \
MCFG_DEVICE_ADD(_tag, DECODMD3, 0) \
- decodmd_type3_device::static_set_gfxregion(*device, _region);
+ downcast<decodmd_type3_device &>(*device).set_gfxregion(_region);
class decodmd_type3_device : public device_t
{
@@ -33,7 +33,7 @@ public:
DECLARE_WRITE16_MEMBER(crtc_register_w);
DECLARE_READ16_MEMBER(crtc_status_r);
- static void static_set_gfxregion(device_t &device, const char *tag);
+ void set_gfxregion(const char *tag);
void decodmd3_map(address_map &map);
protected:
diff --git a/src/mame/video/decospr.cpp b/src/mame/video/decospr.cpp
index 0eb74abeb44..7f0f66fe2dc 100644
--- a/src/mame/video/decospr.cpp
+++ b/src/mame/video/decospr.cpp
@@ -139,10 +139,9 @@ DECOSPR_COLOUR_CB_MEMBER(decospr_device::default_col_cb)
return (col >> 9) & 0x1f;
}
-void decospr_device::set_gfx_region(device_t &device, int gfxregion)
+void decospr_device::set_gfx_region(int gfxregion)
{
- decospr_device &dev = downcast<decospr_device &>(device);
- dev.m_gfxregion = gfxregion;
+ m_gfxregion = gfxregion;
// printf("decospr_device::set_gfx_region()\n");
}
@@ -165,13 +164,13 @@ decospr_device::decospr_device(const machine_config &mconfig, const char *tag, d
}
//-------------------------------------------------
-// static_set_gfxdecode_tag: Set the tag of the
+// set_gfxdecode_tag: Set the tag of the
// gfx decoder
//-------------------------------------------------
-void decospr_device::static_set_gfxdecode_tag(device_t &device, const char *tag)
+void decospr_device::set_gfxdecode_tag(const char *tag)
{
- downcast<decospr_device &>(device).m_gfxdecode.set_tag(tag);
+ m_gfxdecode.set_tag(tag);
}
void decospr_device::device_start()
diff --git a/src/mame/video/decospr.h b/src/mame/video/decospr.h
index cf8b62aed6c..38489ae631d 100644
--- a/src/mame/video/decospr.h
+++ b/src/mame/video/decospr.h
@@ -19,20 +19,19 @@ class decospr_device : public device_t, public device_video_interface
public:
decospr_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
- // static configuration
- static void static_set_gfxdecode_tag(device_t &device, const char *tag);
- static void set_gfx_region(device_t &device, int gfxregion);
- static void set_pri_callback(device_t &device, decospr_pri_cb_delegate callback) { downcast<decospr_device &>(device).m_pri_cb = callback; }
- static void set_col_callback(device_t &device, decospr_col_cb_delegate callback) { downcast<decospr_device &>(device).m_col_cb = callback; }
- static void set_is_bootleg(device_t &device, bool is_bootleg) { downcast<decospr_device &>(device).m_is_bootleg = is_bootleg; }
- static void set_bootleg_type(device_t &device, int bootleg_type) { downcast<decospr_device &>(device).m_bootleg_type = bootleg_type; }
- static void set_flipallx(device_t &device, int flipallx) { downcast<decospr_device &>(device).m_flipallx = flipallx; }
- static void set_transpen(device_t &device, int transpen) { downcast<decospr_device &>(device).m_transpen = transpen; }
- static void set_offsets(device_t &device, int x_offset, int y_offset)
+ // configuration
+ void set_gfxdecode_tag(const char *tag);
+ void set_gfx_region(int gfxregion);
+ void set_pri_callback(decospr_pri_cb_delegate callback) { m_pri_cb = callback; }
+ void set_col_callback(decospr_col_cb_delegate callback) { m_col_cb = callback; }
+ void set_is_bootleg(bool is_bootleg) { m_is_bootleg = is_bootleg; }
+ void set_bootleg_type(int bootleg_type) { m_bootleg_type = bootleg_type; }
+ void set_flipallx(int flipallx) { m_flipallx = flipallx; }
+ void set_transpen(int transpen) { m_transpen = transpen; }
+ void set_offsets(int x_offset, int y_offset)
{
- decospr_device &dev = downcast<decospr_device &>(device);
- dev.m_x_offset = x_offset;
- dev.m_y_offset = y_offset;
+ m_x_offset = x_offset;
+ m_y_offset = y_offset;
}
void draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect, uint16_t* spriteram, int sizewords);
@@ -76,30 +75,30 @@ private:
DECLARE_DEVICE_TYPE(DECO_SPRITE, decospr_device)
#define MCFG_DECO_SPRITE_GFX_REGION(_region) \
- decospr_device::set_gfx_region(*device, _region);
+ downcast<decospr_device &>(*device).set_gfx_region(_region);
#define MCFG_DECO_SPRITE_PRIORITY_CB(_class, _method) \
- decospr_device::set_pri_callback(*device, decospr_pri_cb_delegate(&_class::_method, #_class "::" #_method, this));
+ downcast<decospr_device &>(*device).set_pri_callback(decospr_pri_cb_delegate(&_class::_method, #_class "::" #_method, this));
#define MCFG_DECO_SPRITE_COLOUR_CB(_class, _method) \
- decospr_device::set_col_callback(*device, decospr_col_cb_delegate(&_class::_method, #_class "::" #_method, this));
+ downcast<decospr_device &>(*device).set_col_callback(decospr_col_cb_delegate(&_class::_method, #_class "::" #_method, this));
#define MCFG_DECO_SPRITE_ISBOOTLEG(_boot) \
- decospr_device::set_is_bootleg(*device, _boot);
+ downcast<decospr_device &>(*device).set_is_bootleg(_boot);
#define MCFG_DECO_SPRITE_BOOTLEG_TYPE(_bootleg_type) \
- decospr_device::set_bootleg_type(*device, _bootleg_type);
+ downcast<decospr_device &>(*device).set_bootleg_type(_bootleg_type);
#define MCFG_DECO_SPRITE_FLIPALLX(_flip) \
- decospr_device::set_flipallx(*device, _flip);
+ downcast<decospr_device &>(*device).set_flipallx(_flip);
#define MCFG_DECO_SPRITE_TRANSPEN(_pen) \
- decospr_device::set_transpen(*device, _pen);
+ downcast<decospr_device &>(*device).set_transpen(_pen);
#define MCFG_DECO_SPRITE_OFFSETS(_xoffs, _yoffs) \
- decospr_device::set_offsets(*device, _xoffs, _yoffs);
+ downcast<decospr_device &>(*device).set_offsets(_xoffs, _yoffs);
#define MCFG_DECO_SPRITE_GFXDECODE(_gfxtag) \
- decospr_device::static_set_gfxdecode_tag(*device, "^" _gfxtag);
+ downcast<decospr_device &>(*device).set_gfxdecode_tag("^" _gfxtag);
#endif // MAME_VIDEO_DECOSPR_H
diff --git a/src/mame/video/decrmc3.cpp b/src/mame/video/decrmc3.cpp
index 18a8dbaa828..35dba63dd22 100644
--- a/src/mame/video/decrmc3.cpp
+++ b/src/mame/video/decrmc3.cpp
@@ -33,26 +33,26 @@ deco_rmc3_device::deco_rmc3_device(const machine_config &mconfig, const char *ta
// INITIALIZATION AND CONFIGURATION
//**************************************************************************
-void deco_rmc3_device::static_set_init(device_t &device, deco_rmc3_palette_init_delegate init)
+void deco_rmc3_device::set_init(deco_rmc3_palette_init_delegate init)
{
- downcast<deco_rmc3_device &>(device).m_init = init;
+ m_init = init;
}
-void deco_rmc3_device::static_set_entries(device_t &device, u32 entries)
+void deco_rmc3_device::set_entries(u32 entries)
{
- downcast<deco_rmc3_device &>(device).m_entries = entries;
+ m_entries = entries;
}
-void deco_rmc3_device::static_set_indirect_entries(device_t &device, u32 entries)
+void deco_rmc3_device::set_indirect_entries(u32 entries)
{
- downcast<deco_rmc3_device &>(device).m_indirect_entries = entries;
+ m_indirect_entries = entries;
}
-void deco_rmc3_device::static_set_prom_region(device_t &device, const char *region)
+void deco_rmc3_device::set_prom_region(const char *region)
{
- downcast<deco_rmc3_device &>(device).m_prom_region.set_tag(region);
+ m_prom_region.set_tag(region);
}
diff --git a/src/mame/video/decrmc3.h b/src/mame/video/decrmc3.h
index 9b0ba7b009e..2f7a850f86b 100644
--- a/src/mame/video/decrmc3.h
+++ b/src/mame/video/decrmc3.h
@@ -32,19 +32,19 @@
#define MCFG_DECO_RMC3_MODIFY MCFG_DEVICE_MODIFY
#define MCFG_DECO_RMC3_SET_PALETTE_SIZE(_entries) \
- deco_rmc3_device::static_set_entries(*device, _entries);
+ downcast<deco_rmc3_device &>(*device).set_entries(_entries);
#define MCFG_DECO_RMC3_INDIRECT_ENTRIES(_entries) \
- deco_rmc3_device::static_set_indirect_entries(*device, _entries);
+ downcast<deco_rmc3_device &>(*device).set_indirect_entries( _entries);
// other standard palettes
#define MCFG_DECO_RMC3_ADD_PROMS(_tag, _region, _entries) \
MCFG_DECO_RMC3_ADD(_tag, _entries) \
- deco_rmc3_device::static_set_prom_region(*device, "^" _region); \
- deco_rmc3_device::static_set_init(*device, deco_rmc3_palette_init_delegate(FUNC(deco_rmc3_device::palette_init_proms), downcast<deco_rmc3_device *>(device)));
+ downcast<deco_rmc3_device &>(*device).set_prom_region("^" _region); \
+ downcast<deco_rmc3_device &>(*device).set_init(deco_rmc3_palette_init_delegate(FUNC(deco_rmc3_device::palette_init_proms), downcast<deco_rmc3_device *>(device)));
//#define MCFG_DECO_RMC3_INIT_OWNER(_class, _method)
-// deco_rmc3_device::static_set_init(*device, deco_rmc3_palette_init_delegate(&_class::PALETTE_INIT_NAME(_method), #_class "::palette_init_" #_method, this));
+// downcast<deco_rmc3_device &>(*device).set_init(deco_rmc3_palette_init_delegate(&_class::PALETTE_INIT_NAME(_method), #_class "::palette_init_" #_method, this));
//**************************************************************************
// TYPE DEFINITIONS
@@ -61,13 +61,13 @@ public:
// construction/destruction
deco_rmc3_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock);
- // static configuration
- static void static_set_init(device_t &device, deco_rmc3_palette_init_delegate init);
- static void static_set_membits(device_t &device, int membits);
- static void static_set_endianness(device_t &device, endianness_t endianness);
- static void static_set_entries(device_t &device, u32 entries);
- static void static_set_indirect_entries(device_t &device, u32 entries);
- static void static_set_prom_region(device_t &device, const char *region);
+ // configuration
+ void set_init(deco_rmc3_palette_init_delegate init);
+ void set_membits(int membits);
+ void set_endianness(endianness_t endianness);
+ void set_entries(u32 entries);
+ void set_indirect_entries(u32 entries);
+ void set_prom_region(const char *region);
// palette RAM accessors
memory_array &basemem() { return m_paletteram; }
diff --git a/src/mame/video/dooyong.cpp b/src/mame/video/dooyong.cpp
index baae9402616..e1d3986687a 100644
--- a/src/mame/video/dooyong.cpp
+++ b/src/mame/video/dooyong.cpp
@@ -35,14 +35,14 @@ dooyong_tilemap_device_base::dooyong_tilemap_device_base(
{
}
-void dooyong_tilemap_device_base::static_set_gfxdecode_tag(device_t &device, char const *tag)
+void dooyong_tilemap_device_base::set_gfxdecode_tag(char const *tag)
{
- downcast<dooyong_tilemap_device_base &>(device).m_gfxdecode.set_tag(tag);
+ m_gfxdecode.set_tag(tag);
}
-void dooyong_tilemap_device_base::static_set_gfxnum(device_t &device, int gfxnum)
+void dooyong_tilemap_device_base::set_gfxnum(int gfxnum)
{
- downcast<dooyong_tilemap_device_base &>(device).m_gfxnum = gfxnum;
+ m_gfxnum = gfxnum;
}
void dooyong_tilemap_device_base::draw(screen_device &screen, bitmap_ind16 &dest, rectangle const &cliprect, uint32_t flags, uint8_t priority)
@@ -83,27 +83,26 @@ dooyong_rom_tilemap_device::dooyong_rom_tilemap_device(
{
}
-void dooyong_rom_tilemap_device::static_set_tilerom_tag(device_t &device, char const *tag)
+void dooyong_rom_tilemap_device::set_tilerom_tag(char const *tag)
{
- downcast<dooyong_rom_tilemap_device &>(device).m_tilerom.set_tag(tag);
+ m_tilerom.set_tag(tag);
}
-void dooyong_rom_tilemap_device::static_set_tilerom_offset(device_t &device, int offset)
+void dooyong_rom_tilemap_device::set_tilerom_offset(int offset)
{
- downcast<dooyong_rom_tilemap_device &>(device).m_tilerom_offset = offset;
+ m_tilerom_offset = offset;
}
-void dooyong_rom_tilemap_device::static_set_transparent_pen(device_t &device, unsigned pen)
+void dooyong_rom_tilemap_device::set_transparent_pen(unsigned pen)
{
- downcast<dooyong_rom_tilemap_device &>(device).m_transparent_pen = pen;
+ m_transparent_pen = pen;
}
-void dooyong_rom_tilemap_device::static_set_primella_code_bits(device_t &device, unsigned bits)
+void dooyong_rom_tilemap_device::set_primella_code_bits(unsigned bits)
{
- dooyong_rom_tilemap_device &tilemap_device(downcast<dooyong_rom_tilemap_device &>(device));
- tilemap_device.m_primella_code_mask = (1U << bits) - 1U;
- tilemap_device.m_primella_color_mask = ((1U << 14) - 1) & ~tilemap_device.m_primella_code_mask;
- tilemap_device.m_primella_color_shift = bits;
+ m_primella_code_mask = (1U << bits) - 1U;
+ m_primella_color_mask = ((1U << 14) - 1) & ~m_primella_code_mask;
+ m_primella_color_shift = bits;
}
WRITE8_MEMBER(dooyong_rom_tilemap_device::ctrl_w)
@@ -211,14 +210,14 @@ rshark_rom_tilemap_device::rshark_rom_tilemap_device(machine_config const &mconf
m_rows = 32;
}
-void rshark_rom_tilemap_device::static_set_colorrom_tag(device_t &device, char const *tag)
+void rshark_rom_tilemap_device::set_colorrom_tag(char const *tag)
{
- downcast<rshark_rom_tilemap_device &>(device).m_colorrom.set_tag(tag);
+ m_colorrom.set_tag(tag);
}
-void rshark_rom_tilemap_device::static_set_colorrom_offset(device_t &device, int offset)
+void rshark_rom_tilemap_device::set_colorrom_offset(int offset)
{
- downcast<rshark_rom_tilemap_device &>(device).m_colorrom_offset = offset;
+ m_colorrom_offset = offset;
}
void rshark_rom_tilemap_device::device_start()
diff --git a/src/mame/video/dooyong.h b/src/mame/video/dooyong.h
index 03f9bbde16c..1fc8287e213 100644
--- a/src/mame/video/dooyong.h
+++ b/src/mame/video/dooyong.h
@@ -9,29 +9,29 @@
#define MCFG_DOOYONG_ROM_TILEMAP_ADD(tag, gfx, num, rom, offset) \
MCFG_DEVICE_ADD(tag, DOOYONG_ROM_TILEMAP, 0) \
- dooyong_rom_tilemap_device::static_set_gfxdecode_tag(*device, "^" gfx); \
- dooyong_rom_tilemap_device::static_set_tilerom_tag(*device, "^" rom); \
- dooyong_rom_tilemap_device::static_set_gfxnum(*device, (num)); \
- dooyong_rom_tilemap_device::static_set_tilerom_offset(*device, (offset));
+ downcast<dooyong_rom_tilemap_device &>(*device).set_gfxdecode_tag("^" gfx); \
+ downcast<dooyong_rom_tilemap_device &>(*device).set_tilerom_tag("^" rom); \
+ downcast<dooyong_rom_tilemap_device &>(*device).set_gfxnum((num)); \
+ downcast<dooyong_rom_tilemap_device &>(*device).set_tilerom_offset((offset));
#define MCFG_DOOYONG_ROM_TILEMAP_TRANSPARENT_PEN(pen) \
- dooyong_rom_tilemap_device::static_set_transparent_pen(*device, (pen));
+ downcast<dooyong_rom_tilemap_device &>(*device).set_transparent_pen((pen));
#define MCFG_DOOYONG_ROM_TILEMAP_PRIMELLA_CODE_BITS(bits) \
- dooyong_rom_tilemap_device::static_set_primella_code_bits(*device, (bits));
+ downcast<dooyong_rom_tilemap_device &>(*device).set_primella_code_bits((bits));
#define MCFG_RSHARK_ROM_TILEMAP_ADD(tag, gfx, num, rom, offset, rom2, offset2) \
MCFG_DEVICE_ADD(tag, RSHARK_ROM_TILEMAP, 0) \
- dooyong_rom_tilemap_device::static_set_gfxdecode_tag(*device, "^" gfx); \
- dooyong_rom_tilemap_device::static_set_tilerom_tag(*device, "^" rom); \
- dooyong_rom_tilemap_device::static_set_gfxnum(*device, (num)); \
- dooyong_rom_tilemap_device::static_set_tilerom_offset(*device, (offset)); \
- dooyong_rom_tilemap_device::static_set_primella_code_bits(*device, 13); \
- rshark_rom_tilemap_device::static_set_colorrom_tag(*device, "^" rom2); \
- rshark_rom_tilemap_device::static_set_colorrom_offset(*device, (offset2));
+ downcast<rshark_rom_tilemap_device &>(*device).set_gfxdecode_tag("^" gfx); \
+ downcast<rshark_rom_tilemap_device &>(*device).set_tilerom_tag("^" rom); \
+ downcast<rshark_rom_tilemap_device &>(*device).set_gfxnum((num)); \
+ downcast<rshark_rom_tilemap_device &>(*device).set_tilerom_offset((offset)); \
+ downcast<rshark_rom_tilemap_device &>(*device).set_primella_code_bits(13); \
+ downcast<rshark_rom_tilemap_device &>(*device).set_colorrom_tag("^" rom2); \
+ downcast<rshark_rom_tilemap_device &>(*device).set_colorrom_offset((offset2));
#define MCFG_DOOYONG_RAM_TILEMAP_ADD(tag, gfx, num) \
MCFG_DEVICE_ADD(tag, DOOYONG_RAM_TILEMAP, 0) \
- dooyong_rom_tilemap_device::static_set_gfxdecode_tag(*device, "^" gfx); \
- dooyong_rom_tilemap_device::static_set_gfxnum(*device, (num));
+ downcast<dooyong_ram_tilemap_device &>(*device).set_gfxdecode_tag("^" gfx); \
+ downcast<dooyong_ram_tilemap_device &>(*device).set_gfxnum((num));
DECLARE_DEVICE_TYPE(DOOYONG_ROM_TILEMAP, dooyong_rom_tilemap_device)
@@ -42,8 +42,8 @@ DECLARE_DEVICE_TYPE(DOOYONG_RAM_TILEMAP, dooyong_ram_tilemap_device)
class dooyong_tilemap_device_base : public device_t
{
public:
- static void static_set_gfxdecode_tag(device_t &device, char const *tag);
- static void static_set_gfxnum(device_t &device, int gfxnum);
+ void set_gfxdecode_tag(char const *tag);
+ void set_gfxnum(int gfxnum);
void draw(screen_device &screen, bitmap_ind16 &dest, rectangle const &cliprect, uint32_t flags, uint8_t priority);
@@ -71,10 +71,10 @@ class dooyong_rom_tilemap_device : public dooyong_tilemap_device_base
public:
dooyong_rom_tilemap_device(machine_config const &mconfig, char const *tag, device_t *owner, uint32_t clock);
- static void static_set_tilerom_tag(device_t &device, char const *tag);
- static void static_set_tilerom_offset(device_t &device, int offset);
- static void static_set_transparent_pen(device_t &device, unsigned pen);
- static void static_set_primella_code_bits(device_t &device, unsigned bits);
+ void set_tilerom_tag(char const *tag);
+ void set_tilerom_offset(int offset);
+ void set_transparent_pen(unsigned pen);
+ void set_primella_code_bits(unsigned bits);
DECLARE_WRITE8_MEMBER(ctrl_w);
@@ -111,8 +111,8 @@ class rshark_rom_tilemap_device : public dooyong_rom_tilemap_device
public:
rshark_rom_tilemap_device(machine_config const &mconfig, char const *tag, device_t *owner, uint32_t clock);
- static void static_set_colorrom_tag(device_t &device, char const *tag);
- static void static_set_colorrom_offset(device_t &device, int offset);
+ void set_colorrom_tag(char const *tag);
+ void set_colorrom_offset(int offset);
protected:
virtual void device_start() override;
diff --git a/src/mame/video/fuukifg.cpp b/src/mame/video/fuukifg.cpp
index 606db66ccd1..3f70fbfda1c 100644
--- a/src/mame/video/fuukifg.cpp
+++ b/src/mame/video/fuukifg.cpp
@@ -16,9 +16,9 @@ fuukivid_device::fuukivid_device(const machine_config &mconfig, const char *tag,
{
}
-void fuukivid_device::static_set_gfxdecode_tag(device_t &device, const char *tag)
+void fuukivid_device::set_gfxdecode_tag(const char *tag)
{
- downcast<fuukivid_device &>(device).m_gfxdecode.set_tag(tag);
+ m_gfxdecode.set_tag(tag);
}
diff --git a/src/mame/video/fuukifg.h b/src/mame/video/fuukifg.h
index 5e57722f2cc..365b4b00fc7 100644
--- a/src/mame/video/fuukifg.h
+++ b/src/mame/video/fuukifg.h
@@ -12,8 +12,8 @@ class fuukivid_device : public device_t,
public:
fuukivid_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
- // static configuration
- static void static_set_gfxdecode_tag(device_t &device, const char *tag);
+ // configuration
+ void set_gfxdecode_tag(const char *tag);
void draw_sprites(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect, int flip_screen, uint32_t* tilebank);
std::unique_ptr<uint16_t[]> m_sprram;
@@ -44,6 +44,6 @@ private:
DECLARE_DEVICE_TYPE(FUUKI_VIDEO, fuukivid_device)
#define MCFG_FUUKI_VIDEO_GFXDECODE(_gfxtag) \
- fuukivid_device::static_set_gfxdecode_tag(*device, "^" _gfxtag);
+ downcast<fuukivid_device &>(*device).set_gfxdecode_tag("^" _gfxtag);
#endif // MAME_VIDEO_FUUKIFH_H
diff --git a/src/mame/video/gic.h b/src/mame/video/gic.h
index 8f2f78fd3c6..cba71069b14 100644
--- a/src/mame/video/gic.h
+++ b/src/mame/video/gic.h
@@ -25,7 +25,7 @@
#define MCFG_GIC_ADD(tag, clock, screen_tag, ram_cb) \
MCFG_DEVICE_ADD(tag, GIC, clock) \
MCFG_VIDEO_SET_SCREEN(screen_tag) \
- gic_device::set_ram(*device, DEVCB_##ram_cb);
+ downcast<gic_device &>(*device).set_ram(DEVCB_##ram_cb);
/***************************************************************************
TYPE DEFINITIONS
@@ -56,8 +56,8 @@ public:
// construction/destruction
gic_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
- // static configuration helpers
- template <typename Obj> static void set_ram(device_t &device, Obj &&cb) { downcast<gic_device &>(device).m_ram.set_callback(std::forward<Obj>(cb)); }
+ // configuration helpers
+ template <typename Obj> void set_ram(Obj &&cb) { m_ram.set_callback(std::forward<Obj>(cb)); }
DECLARE_PALETTE_INIT(gic);
diff --git a/src/mame/video/gime.h b/src/mame/video/gime.h
index 34e20fd4e3b..f6e2124de94 100644
--- a/src/mame/video/gime.h
+++ b/src/mame/video/gime.h
@@ -28,22 +28,22 @@
#define MCFG_GIME_FSYNC_CALLBACK MCFG_MC6847_FSYNC_CALLBACK
#define MCFG_GIME_IRQ_CALLBACK(_write) \
- devcb = &gime_device::set_irq_wr_callback(*device, DEVCB_##_write);
+ devcb = &downcast<gime_device &>(*device).set_irq_wr_callback(DEVCB_##_write);
#define MCFG_GIME_FIRQ_CALLBACK(_write) \
- devcb = &gime_device::set_firq_wr_callback(*device, DEVCB_##_write);
+ devcb = &downcast<gime_device &>(*device).set_firq_wr_callback(DEVCB_##_write);
#define MCFG_GIME_FLOATING_BUS_CALLBACK(_read) \
- devcb = &gime_device::set_floating_bus_rd_callback(*device, DEVCB_##_read);
+ devcb = &downcast<gime_device &>(*device).set_floating_bus_rd_callback(DEVCB_##_read);
#define MCFG_GIME_MAINCPU(_tag) \
- gime_device::set_maincpu_tag(*device, _tag);
+ downcast<gime_device &>(*device).set_maincpu_tag(_tag);
#define MCFG_GIME_RAM(_tag) \
- gime_device::set_ram_tag(*device, _tag);
+ downcast<gime_device &>(*device).set_ram_tag(_tag);
#define MCFG_GIME_EXT(_tag) \
- gime_device::set_ext_tag(*device, _tag);
+ downcast<gime_device &>(*device).set_ext_tag(_tag);
//**************************************************************************
@@ -55,12 +55,12 @@ class cococart_slot_device;
class gime_device : public mc6847_friend_device, public sam6883_friend_device_interface
{
public:
- template <class Object> static devcb_base &set_irq_wr_callback(device_t &device, Object &&cb) { return downcast<gime_device &>(device).m_write_irq.set_callback(std::forward<Object>(cb)); }
- template <class Object> static devcb_base &set_firq_wr_callback(device_t &device, Object &&cb) { return downcast<gime_device &>(device).m_write_firq.set_callback(std::forward<Object>(cb)); }
- template <class Object> static devcb_base &set_floating_bus_rd_callback(device_t &device, Object &&cb) { return downcast<gime_device &>(device).m_read_floating_bus.set_callback(std::forward<Object>(cb)); }
- static void set_maincpu_tag(device_t &device, const char *tag) { downcast<gime_device &>(device).m_maincpu_tag = tag; }
- static void set_ram_tag(device_t &device, const char *tag) { downcast<gime_device &>(device).m_ram_tag = tag; }
- static void set_ext_tag(device_t &device, const char *tag) { downcast<gime_device &>(device).m_ext_tag = tag; }
+ template <class Object> devcb_base &set_irq_wr_callback(Object &&cb) { return m_write_irq.set_callback(std::forward<Object>(cb)); }
+ template <class Object> devcb_base &set_firq_wr_callback(Object &&cb) { return m_write_firq.set_callback(std::forward<Object>(cb)); }
+ template <class Object> devcb_base &set_floating_bus_rd_callback(Object &&cb) { return m_read_floating_bus.set_callback(std::forward<Object>(cb)); }
+ void set_maincpu_tag(const char *tag) { m_maincpu_tag = tag; }
+ void set_ram_tag(const char *tag) { m_ram_tag = tag; }
+ void set_ext_tag(const char *tag) { m_ext_tag = tag; }
// read/write
DECLARE_READ8_MEMBER( read ) { return read(offset); }
diff --git a/src/mame/video/gp9001.h b/src/mame/video/gp9001.h
index 0c832b50674..2f515b3e053 100644
--- a/src/mame/video/gp9001.h
+++ b/src/mame/video/gp9001.h
@@ -7,7 +7,7 @@
#pragma once
#define MCFG_GP9001_VINT_CALLBACK(_devcb) \
- devcb = &gp9001vdp_device::set_vint_out_cb(*device, DEVCB_##_devcb);
+ devcb = &downcast<gp9001vdp_device &>(*device).set_vint_out_cb(DEVCB_##_devcb);
class gp9001vdp_device : public device_t,
public device_gfx_interface,
@@ -22,7 +22,7 @@ class gp9001vdp_device : public device_t,
public:
gp9001vdp_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
- template<class Object> static devcb_base &set_vint_out_cb(device_t &device, Object &&obj) { return downcast<gp9001vdp_device &>(device).m_vint_out_cb.set_callback(std::forward<Object>(obj)); }
+ template<class Object> devcb_base &set_vint_out_cb(Object &&obj) { return m_vint_out_cb.set_callback(std::forward<Object>(obj)); }
void draw_sprites( bitmap_ind16 &bitmap, const rectangle &cliprect, const uint8_t* primap );
void gp9001_draw_custom_tilemap( bitmap_ind16 &bitmap, tilemap_t* tilemap, const uint8_t* priremap, const uint8_t* pri_enable );
diff --git a/src/mame/video/gtia.h b/src/mame/video/gtia.h
index 68f911fde35..b377cf24426 100644
--- a/src/mame/video/gtia.h
+++ b/src/mame/video/gtia.h
@@ -17,10 +17,10 @@
#define MCFG_GTIA_READ_CB(_devcb) \
- devcb = &gtia_device::set_read_callback(*device, DEVCB_##_devcb);
+ devcb = &downcast<gtia_device &>(*device).set_read_callback(DEVCB_##_devcb);
#define MCFG_GTIA_WRITE_CB(_devcb) \
- devcb = &gtia_device::set_write_callback(*device, DEVCB_##_devcb);
+ devcb = &downcast<gtia_device &>(*device).set_write_callback(DEVCB_##_devcb);
// ======================> gtia_device
@@ -31,8 +31,8 @@ public:
// construction/destruction
gtia_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
- template <class Object> static devcb_base &set_read_callback(device_t &device, Object &&cb) { return downcast<gtia_device &>(device).m_read_cb.set_callback(std::forward<Object>(cb)); }
- template <class Object> static devcb_base &set_write_callback(device_t &device, Object &&cb) { return downcast<gtia_device &>(device).m_write_cb.set_callback(std::forward<Object>(cb)); }
+ template <class Object> devcb_base &set_read_callback(Object &&cb) { return m_read_cb.set_callback(std::forward<Object>(cb)); }
+ template <class Object> devcb_base &set_write_callback(Object &&cb) { return m_write_cb.set_callback(std::forward<Object>(cb)); }
DECLARE_READ8_MEMBER( read );
DECLARE_WRITE8_MEMBER( write );
diff --git a/src/mame/video/igs017_igs031.cpp b/src/mame/video/igs017_igs031.cpp
index 392592b7373..3008f50a63c 100644
--- a/src/mame/video/igs017_igs031.cpp
+++ b/src/mame/video/igs017_igs031.cpp
@@ -105,11 +105,9 @@ uint16_t igs017_igs031_device::palette_callback_straight(uint16_t bgr)
}
-// static
-void igs017_igs031_device::set_palette_scramble_cb(device_t &device,igs017_igs031_palette_scramble_delegate newtilecb)
+void igs017_igs031_device::set_palette_scramble_cb(igs017_igs031_palette_scramble_delegate newtilecb)
{
- igs017_igs031_device &dev = downcast<igs017_igs031_device &>(device);
- dev.m_palette_scramble_cb = newtilecb;
+ m_palette_scramble_cb = newtilecb;
}
diff --git a/src/mame/video/igs017_igs031.h b/src/mame/video/igs017_igs031.h
index d9a998775a0..3a5b27e0546 100644
--- a/src/mame/video/igs017_igs031.h
+++ b/src/mame/video/igs017_igs031.h
@@ -10,10 +10,10 @@
typedef device_delegate<uint16_t (uint16_t)> igs017_igs031_palette_scramble_delegate;
#define MCFG_PALETTE_SCRAMBLE_CB( _class, _method) \
- igs017_igs031_device::set_palette_scramble_cb(*device, igs017_igs031_palette_scramble_delegate(&_class::_method, #_class "::" #_method, nullptr, (_class *)nullptr));
+ downcast<igs017_igs031_device &>(*device).set_palette_scramble_cb(igs017_igs031_palette_scramble_delegate(&_class::_method, #_class "::" #_method, nullptr, (_class *)nullptr));
#define MCFG_REVERSE_TEXT_BITS \
- igs017_igs031_device::static_set_text_reverse_bits(*device);
+ downcast<igs017_igs031_device &>(*device).set_text_reverse_bits();
class igs017_igs031_device : public device_t,
public device_gfx_interface,
@@ -24,12 +24,11 @@ public:
igs017_igs031_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
- static void set_palette_scramble_cb(device_t &device,igs017_igs031_palette_scramble_delegate newtilecb);
+ void set_palette_scramble_cb(igs017_igs031_palette_scramble_delegate newtilecb);
- static void static_set_text_reverse_bits(device_t &device)
+ void set_text_reverse_bits()
{
- igs017_igs031_device &dev = downcast<igs017_igs031_device &>(device);
- dev.m_revbits = 1;
+ m_revbits = 1;
}
uint16_t palette_callback_straight(uint16_t bgr);
diff --git a/src/mame/video/k001005.cpp b/src/mame/video/k001005.cpp
index 317426da3a1..aa2c9f4f455 100644
--- a/src/mame/video/k001005.cpp
+++ b/src/mame/video/k001005.cpp
@@ -1462,7 +1462,7 @@ void k001005_device::draw( bitmap_rgb32 &bitmap, const rectangle &cliprect )
m_renderer->draw(bitmap, cliprect);
}
-void k001005_device::set_texel_chip(device_t &device, const char *tag)
+void k001005_device::set_texel_chip(const char *tag)
{
- downcast<k001005_device &>(device).m_k001006_tag = tag;
+ m_k001006_tag = tag;
}
diff --git a/src/mame/video/k001005.h b/src/mame/video/k001005.h
index 4a459295d24..e20dcd811d8 100644
--- a/src/mame/video/k001005.h
+++ b/src/mame/video/k001005.h
@@ -104,7 +104,7 @@ class k001005_device : public device_t, public device_video_interface
public:
k001005_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
- static void set_texel_chip(device_t &device, const char *tag);
+ void set_texel_chip(const char *tag);
void draw(bitmap_rgb32 &bitmap, const rectangle &cliprect);
void swap_buffers();
@@ -140,6 +140,6 @@ DECLARE_DEVICE_TYPE(K001005, k001005_device)
#define MCFG_K001005_TEXEL_CHIP(_tag) \
- k001005_device::set_texel_chip(*device, _tag);
+ downcast<k001005_device &>(*device).set_texel_chip(_tag);
#endif // MAME_VIDEO_K001005_H
diff --git a/src/mame/video/k001006.h b/src/mame/video/k001006.h
index 421db9e56e9..67abc8b417c 100644
--- a/src/mame/video/k001006.h
+++ b/src/mame/video/k001006.h
@@ -13,9 +13,9 @@ public:
k001006_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
~k001006_device() {}
- // static configuration
- static void set_gfx_region(device_t &device, const char *tag) { downcast<k001006_device &>(device).m_gfx_region = tag; }
- static void set_tex_layout(device_t &device, int layout) { downcast<k001006_device &>(device).m_tex_layout = layout; }
+ // configuration
+ void set_gfx_region(const char *tag) { m_gfx_region = tag; }
+ void set_tex_layout(int layout) { m_tex_layout = layout; }
uint32_t fetch_texel(int page, int pal_index, int u, int v);
void preprocess_texture_data(uint8_t *dst, uint8_t *src, int length, int gticlub);
@@ -53,9 +53,9 @@ DECLARE_DEVICE_TYPE(K001006, k001006_device)
#define MCFG_K001006_GFX_REGION(_tag) \
- k001006_device::set_gfx_region(*device, _tag);
+ downcast<k001006_device &>(*device).set_gfx_region(_tag);
#define MCFG_K001006_TEX_LAYOUT(x) \
- k001006_device::set_tex_layout(*device, x);
+ downcast<k001006_device &>(*device).set_tex_layout(x);
#endif // MAME_VIDEO_K001006_H
diff --git a/src/mame/video/k001604.h b/src/mame/video/k001604.h
index 1bbe1278ae2..8ff317f5008 100644
--- a/src/mame/video/k001604.h
+++ b/src/mame/video/k001604.h
@@ -11,11 +11,11 @@ class k001604_device : public device_t, public device_gfx_interface
public:
k001604_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
- // static configuration
- static void set_layer_size(device_t &device, int size) { downcast<k001604_device &>(device).m_layer_size = size; }
- static void set_roz_size(device_t &device, int size) { downcast<k001604_device &>(device).m_roz_size = size; }
- static void set_txt_mem_offset(device_t &device, int offs) { downcast<k001604_device &>(device).m_txt_mem_offset = offs; }
- static void set_roz_mem_offset(device_t &device, int offs) { downcast<k001604_device &>(device).m_roz_mem_offset = offs; }
+ // configuration
+ void set_layer_size(int size) { m_layer_size = size; }
+ void set_roz_size(int size) { m_roz_size = size; }
+ void set_txt_mem_offset(int offs) { m_txt_mem_offset = offs; }
+ void set_roz_mem_offset(int offs) { m_roz_mem_offset = offs; }
void draw_back_layer( bitmap_rgb32 &bitmap, const rectangle &cliprect );
void draw_front_layer( screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect );
@@ -58,16 +58,16 @@ DECLARE_DEVICE_TYPE(K001604, k001604_device)
#define MCFG_K001604_LAYER_SIZE(_size) \
- k001604_device::set_layer_size(*device, _size);
+ downcast<k001604_device &>(*device).set_layer_size(_size);
#define MCFG_K001604_ROZ_SIZE(_size) \
- k001604_device::set_roz_size(*device, _size);
+ downcast<k001604_device &>(*device).set_roz_size(_size);
#define MCFG_K001604_TXT_OFFSET(_offs) \
- k001604_device::set_txt_mem_offset(*device, _offs);
+ downcast<k001604_device &>(*device).set_txt_mem_offset(_offs);
#define MCFG_K001604_ROZ_OFFSET(_offs) \
- k001604_device::set_roz_mem_offset(*device, _offs);
+ downcast<k001604_device &>(*device).set_roz_mem_offset(_offs);
#define MCFG_K001604_PALETTE(_palette_tag) \
MCFG_GFX_PALETTE(_palette_tag)
diff --git a/src/mame/video/k007121.cpp b/src/mame/video/k007121.cpp
index 806efc8fb81..c3ce1110827 100644
--- a/src/mame/video/k007121.cpp
+++ b/src/mame/video/k007121.cpp
@@ -349,11 +349,11 @@ void k007121_device::sprites_draw( bitmap_ind16 &bitmap, const rectangle &clipre
}
//-------------------------------------------------
-// static_set_palette_tag: Set the tag of the
+// set_palette_tag: Set the tag of the
// palette device
//-------------------------------------------------
-void k007121_device::static_set_palette_tag(device_t &device, const char *tag)
+void k007121_device::set_palette_tag(const char *tag)
{
- downcast<k007121_device &>(device).m_palette.set_tag(tag);
+ m_palette.set_tag(tag);
}
diff --git a/src/mame/video/k007121.h b/src/mame/video/k007121.h
index 3a0b9aabd54..b02fa78804c 100644
--- a/src/mame/video/k007121.h
+++ b/src/mame/video/k007121.h
@@ -11,7 +11,7 @@ class k007121_device : public device_t
public:
k007121_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
- static void static_set_palette_tag(device_t &device, const char *tag);
+ void set_palette_tag(const char *tag);
uint8_t ctrlram_r(int offset);
DECLARE_WRITE8_MEMBER( ctrl_w );
@@ -38,6 +38,6 @@ DECLARE_DEVICE_TYPE(K007121, k007121_device)
MCFG_DEVICE_ADD(_tag, K007121, 0)
#define MCFG_K007121_PALETTE(_palette_tag) \
- k007121_device::static_set_palette_tag(*device, "^" _palette_tag);
+ downcast<k007121_device &>(*device).set_palette_tag("^" _palette_tag);
#endif // MAME_VIDEO_K007121_H
diff --git a/src/mame/video/k007342.cpp b/src/mame/video/k007342.cpp
index 106d6d3c0cc..37d09eea145 100644
--- a/src/mame/video/k007342.cpp
+++ b/src/mame/video/k007342.cpp
@@ -57,13 +57,13 @@ k007342_device::k007342_device(const machine_config &mconfig, const char *tag, d
}
//-------------------------------------------------
-// static_set_gfxdecode_tag: Set the tag of the
+// set_gfxdecode_tag: Set the tag of the
// gfx decoder
//-------------------------------------------------
-void k007342_device::static_set_gfxdecode_tag(device_t &device, const char *tag)
+void k007342_device::set_gfxdecode_tag(const char *tag)
{
- downcast<k007342_device &>(device).m_gfxdecode.set_tag(tag);
+ m_gfxdecode.set_tag(tag);
}
//-------------------------------------------------
diff --git a/src/mame/video/k007342.h b/src/mame/video/k007342.h
index 4e1c1193ff3..734ab40fc97 100644
--- a/src/mame/video/k007342.h
+++ b/src/mame/video/k007342.h
@@ -13,10 +13,10 @@ class k007342_device : public device_t
public:
k007342_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
- // static configuration
- static void static_set_gfxdecode_tag(device_t &device, const char *tag);
- static void static_set_gfxnum(device_t &device, int gfxnum) { downcast<k007342_device &>(device).m_gfxnum = gfxnum; }
- static void static_set_callback(device_t &device, k007342_delegate callback) { downcast<k007342_device &>(device).m_callback = callback; }
+ // configuration
+ void set_gfxdecode_tag(const char *tag);
+ void set_gfxnum(int gfxnum) { m_gfxnum = gfxnum; }
+ void set_callback(k007342_delegate callback) { m_callback = callback; }
DECLARE_READ8_MEMBER( read );
DECLARE_WRITE8_MEMBER( write );
@@ -61,16 +61,16 @@ DECLARE_DEVICE_TYPE(K007342, k007342_device)
#define MCFG_K007342_ADD(_tag) \
MCFG_DEVICE_ADD(_tag, K007342, 0)
#define MCFG_K007342_GFXDECODE(_gfxtag) \
- k007342_device::static_set_gfxdecode_tag(*device, "^" _gfxtag);
+ downcast<k007342_device &>(*device).set_gfxdecode_tag("^" _gfxtag);
#define MCFG_K007342_GFXNUM(_gfxnum) \
- k007342_device::static_set_gfxnum(*device, _gfxnum);
+ downcast<k007342_device &>(*device).set_gfxnum(_gfxnum);
#define MCFG_K007342_CALLBACK_OWNER(_class, _method) \
- k007342_device::static_set_callback(*device, k007342_delegate(&_class::_method, #_class "::" #_method, this));
+ downcast<k007342_device &>(*device).set_callback(k007342_delegate(&_class::_method, #_class "::" #_method, this));
#define MCFG_K007342_CALLBACK_DEVICE(_tag, _class, _method) \
- k007342_device::static_set_callback(*device, k007342_delegate(&_class::_method, #_class "::" #_method, _tag));
+ downcast<k007342_device &>(*device).set_callback(k007342_delegate(&_class::_method, #_class "::" #_method, _tag));
// function definition for a callback
#define K007342_CALLBACK_MEMBER(_name) void _name(int layer, int bank, int *code, int *color, int *flags)
diff --git a/src/mame/video/k007420.cpp b/src/mame/video/k007420.cpp
index ae702212c26..db5a1052cc5 100644
--- a/src/mame/video/k007420.cpp
+++ b/src/mame/video/k007420.cpp
@@ -250,11 +250,11 @@ void k007420_device::sprites_draw( bitmap_ind16 &bitmap, const rectangle &clipre
}
//-------------------------------------------------
-// static_set_palette_tag: Set the tag of the
+// set_palette_tag: Set the tag of the
// palette device
//-------------------------------------------------
-void k007420_device::static_set_palette_tag(device_t &device, const char *tag)
+void k007420_device::set_palette_tag(const char *tag)
{
- downcast<k007420_device &>(device).m_palette.set_tag(tag);
+ m_palette.set_tag(tag);
}
diff --git a/src/mame/video/k007420.h b/src/mame/video/k007420.h
index a7e49059dd7..50c19d0a5ef 100644
--- a/src/mame/video/k007420.h
+++ b/src/mame/video/k007420.h
@@ -13,9 +13,9 @@ class k007420_device : public device_t
public:
k007420_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
- static void static_set_palette_tag(device_t &device, const char *tag);
- static void static_set_bank_limit(device_t &device, int limit) { downcast<k007420_device &>(device).m_banklimit = limit; }
- static void static_set_callback(device_t &device, k007420_delegate callback) { downcast<k007420_device &>(device).m_callback = callback; }
+ void set_palette_tag(const char *tag);
+ void set_bank_limit(int limit) { m_banklimit = limit; }
+ void set_callback(k007420_delegate callback) { m_callback = callback; }
DECLARE_READ8_MEMBER( read );
DECLARE_WRITE8_MEMBER( write );
@@ -42,13 +42,13 @@ DECLARE_DEVICE_TYPE(K007420, k007420_device)
MCFG_DEVICE_ADD(_tag, K007420, 0)
#define MCFG_K007420_PALETTE(_palette_tag) \
- k007420_device::static_set_palette_tag(*device, "^" _palette_tag);
+ downcast<k007420_device &>(*device).set_palette_tag("^" _palette_tag);
#define MCFG_K007420_BANK_LIMIT(_limit) \
- k007420_device::static_set_bank_limit(*device, _limit);
+ downcast<k007420_device &>(*device).set_bank_limit(_limit);
#define MCFG_K007420_CALLBACK_OWNER(_class, _method) \
- k007420_device::static_set_callback(*device, k007420_delegate(&_class::_method, #_class "::" #_method, this));
+ downcast<k007420_device &>(*device).set_callback(k007420_delegate(&_class::_method, #_class "::" #_method, this));
// function definition for a callback
#define K007420_CALLBACK_MEMBER(_name) void _name(int *code, int *color)
diff --git a/src/mame/video/k037122.h b/src/mame/video/k037122.h
index dd0dff6f216..7a3656bbe99 100644
--- a/src/mame/video/k037122.h
+++ b/src/mame/video/k037122.h
@@ -11,8 +11,8 @@ class k037122_device : public device_t,
public:
k037122_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
- // static configuration
- static void static_set_gfx_index(device_t &device, int index) { downcast<k037122_device &>(device).m_gfx_index = index; }
+ // configuration
+ void set_gfx_index(int index) { m_gfx_index = index; }
void tile_draw( screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect );
DECLARE_READ32_MEMBER( sram_r );
diff --git a/src/mame/video/k051316.cpp b/src/mame/video/k051316.cpp
index cd2053e4690..0c2d8514af0 100644
--- a/src/mame/video/k051316.cpp
+++ b/src/mame/video/k051316.cpp
@@ -116,27 +116,25 @@ k051316_device::k051316_device(const machine_config &mconfig, const char *tag, d
{
}
-void k051316_device::set_bpp(device_t &device, int bpp)
+void k051316_device::set_bpp(int bpp)
{
- k051316_device &dev = downcast<k051316_device &>(device);
-
switch(bpp)
{
case 4:
- device_gfx_interface::static_set_info(dev, gfxinfo);
- dev.m_pixels_per_byte = 2;
+ device_gfx_interface::static_set_info(*this, gfxinfo);
+ m_pixels_per_byte = 2;
break;
case 7:
- device_gfx_interface::static_set_info(dev, gfxinfo7);
- dev.m_pixels_per_byte = 1;
+ device_gfx_interface::static_set_info(*this, gfxinfo7);
+ m_pixels_per_byte = 1;
break;
case 8:
- device_gfx_interface::static_set_info(dev, gfxinfo8);
- dev.m_pixels_per_byte = 1;
+ device_gfx_interface::static_set_info(*this, gfxinfo8);
+ m_pixels_per_byte = 1;
break;
case -4:
- device_gfx_interface::static_set_info(dev, gfxinfo4_ram);
- dev.m_pixels_per_byte = 2;
+ device_gfx_interface::static_set_info(*this, gfxinfo4_ram);
+ m_pixels_per_byte = 2;
break;
default:
fatalerror("Unsupported bpp\n");
diff --git a/src/mame/video/k051316.h b/src/mame/video/k051316.h
index fec501fc981..7e984b01547 100644
--- a/src/mame/video/k051316.h
+++ b/src/mame/video/k051316.h
@@ -11,19 +11,19 @@ typedef device_delegate<void (int *code, int *color, int *flags)> k051316_cb_del
#define MCFG_K051316_CB(_class, _method) \
- k051316_device::set_k051316_callback(*device, k051316_cb_delegate(&_class::_method, #_class "::" #_method, this));
+ downcast<k051316_device &>(*device).set_k051316_callback(k051316_cb_delegate(&_class::_method, #_class "::" #_method, this));
#define MCFG_K051316_OFFSETS(_xoffs, _yoffs) \
- k051316_device::set_offsets(*device, _xoffs, _yoffs);
+ downcast<k051316_device &>(*device).set_offsets(_xoffs, _yoffs);
#define MCFG_K051316_BPP(_bpp) \
- k051316_device::set_bpp(*device, _bpp);
+ downcast<k051316_device &>(*device).set_bpp(_bpp);
#define MCFG_K051316_LAYER_MASK(_mask) \
- k051316_device::set_layermask(*device, _mask);
+ downcast<k051316_device &>(*device).set_layermask(_mask);
#define MCFG_K051316_WRAP(_wrap) \
- k051316_device::set_wrap(*device, _wrap);
+ downcast<k051316_device &>(*device).set_wrap(_wrap);
class k051316_device : public device_t, public device_gfx_interface
@@ -39,16 +39,15 @@ public:
DECLARE_GFXDECODE_MEMBER(gfxinfo8);
DECLARE_GFXDECODE_MEMBER(gfxinfo4_ram);
- // static configuration
- static void set_k051316_callback(device_t &device, k051316_cb_delegate callback) { downcast<k051316_device &>(device).m_k051316_cb = callback; }
- static void set_wrap(device_t &device, int wrap) { downcast<k051316_device &>(device).m_wrap = wrap; }
- static void set_bpp(device_t &device, int bpp);
- static void set_layermask(device_t &device, int mask) { downcast<k051316_device &>(device).m_layermask = mask; }
- static void set_offsets(device_t &device, int x_offset, int y_offset)
+ // configuration
+ void set_k051316_callback(k051316_cb_delegate callback) { m_k051316_cb = callback; }
+ void set_wrap(int wrap) { m_wrap = wrap; }
+ void set_bpp(int bpp);
+ void set_layermask(int mask) { m_layermask = mask; }
+ void set_offsets(int x_offset, int y_offset)
{
- k051316_device &dev = downcast<k051316_device &>(device);
- dev.m_dx = x_offset;
- dev.m_dy = y_offset;
+ m_dx = x_offset;
+ m_dy = y_offset;
}
/*
diff --git a/src/mame/video/k051960.cpp b/src/mame/video/k051960.cpp
index 66dc764ac6a..96339beec43 100644
--- a/src/mame/video/k051960.cpp
+++ b/src/mame/video/k051960.cpp
@@ -145,22 +145,20 @@ k051960_device::k051960_device(const machine_config &mconfig, const char *tag, d
{
}
-void k051960_device::set_plane_order(device_t &device, int order)
+void k051960_device::set_plane_order(int order)
{
- k051960_device &dev = downcast<k051960_device &>(device);
-
switch (order)
{
case K051960_PLANEORDER_BASE:
- device_gfx_interface::static_set_info(dev, gfxinfo);
+ device_gfx_interface::static_set_info(*this, gfxinfo);
break;
case K051960_PLANEORDER_MIA:
- device_gfx_interface::static_set_info(dev, gfxinfo_reverse);
+ device_gfx_interface::static_set_info(*this, gfxinfo_reverse);
break;
case K051960_PLANEORDER_GRADIUS3:
- device_gfx_interface::static_set_info(dev, gfxinfo_gradius3);
+ device_gfx_interface::static_set_info(*this, gfxinfo_gradius3);
break;
default:
@@ -172,10 +170,9 @@ void k051960_device::set_plane_order(device_t &device, int order)
// set_screen_tag - set screen we are attached to
//-------------------------------------------------
-void k051960_device::set_screen_tag(device_t &device, const char *tag)
+void k051960_device::set_screen_tag(const char *tag)
{
- k051960_device &dev = dynamic_cast<k051960_device &>(device);
- dev.m_screen.set_tag(tag);
+ m_screen.set_tag(tag);
}
//-------------------------------------------------
diff --git a/src/mame/video/k051960.h b/src/mame/video/k051960.h
index 160d5a70cf3..047d9f084fc 100644
--- a/src/mame/video/k051960.h
+++ b/src/mame/video/k051960.h
@@ -19,22 +19,22 @@ typedef device_delegate<void (int *code, int *color, int *priority, int *shadow)
#define K051960_CB_MEMBER(_name) void _name(int *code, int *color, int *priority, int *shadow)
#define MCFG_K051960_CB(_class, _method) \
- k051960_device::set_k051960_callback(*device, k051960_cb_delegate(&_class::_method, #_class "::" #_method, this));
+ downcast<k051960_device &>(*device).set_k051960_callback(k051960_cb_delegate(&_class::_method, #_class "::" #_method, this));
#define MCFG_K051960_PLANEORDER(_order) \
- k051960_device::set_plane_order(*device, _order);
+ downcast<k051960_device &>(*device).set_plane_order(_order);
#define MCFG_K051960_SCREEN_TAG(_tag) \
- k051960_device::set_screen_tag(*device, "^" _tag);
+ downcast<k051960_device &>(*device).set_screen_tag("^" _tag);
#define MCFG_K051960_IRQ_HANDLER(_devcb) \
- devcb = &k051960_device::set_irq_handler(*device, DEVCB_##_devcb);
+ devcb = &downcast<k051960_device &>(*device).set_irq_handler(DEVCB_##_devcb);
#define MCFG_K051960_NMI_HANDLER(_devcb) \
- devcb = &k051960_device::set_nmi_handler(*device, DEVCB_##_devcb);
+ devcb = &downcast<k051960_device &>(*device).set_nmi_handler(DEVCB_##_devcb);
#define MCFG_K051960_VREG_CONTRAST_HANDLER(_devcb) \
- devcb = &k051960_device::set_vreg_contrast_handler(*device, DEVCB_##_devcb);
+ devcb = &downcast<k051960_device &>(*device).set_vreg_contrast_handler(DEVCB_##_devcb);
class k051960_device : public device_t, public device_gfx_interface
@@ -49,20 +49,20 @@ class k051960_device : public device_t, public device_gfx_interface
public:
k051960_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
- template <class Object> static devcb_base &set_irq_handler(device_t &device, Object &&cb)
- { return downcast<k051960_device &>(device).m_irq_handler.set_callback(std::forward<Object>(cb)); }
+ template <class Object> devcb_base &set_irq_handler(Object &&cb)
+ { return m_irq_handler.set_callback(std::forward<Object>(cb)); }
- template <class Object> static devcb_base &set_nmi_handler(device_t &device, Object &&cb)
- { return downcast<k051960_device &>(device).m_nmi_handler.set_callback(std::forward<Object>(cb)); }
+ template <class Object> devcb_base &set_nmi_handler(Object &&cb)
+ { return m_nmi_handler.set_callback(std::forward<Object>(cb)); }
- template <class Object> static devcb_base &set_vreg_contrast_handler(device_t &device, Object &&cb)
- { return downcast<k051960_device &>(device).m_vreg_contrast_handler.set_callback(std::forward<Object>(cb)); }
+ template <class Object> devcb_base &set_vreg_contrast_handler(Object &&cb)
+ { return m_vreg_contrast_handler.set_callback(std::forward<Object>(cb)); }
// static configuration
- static void set_k051960_callback(device_t &device, k051960_cb_delegate callback) { downcast<k051960_device &>(device).m_k051960_cb = callback; }
- static void set_plane_order(device_t &device, int order);
- static void set_screen_tag(device_t &device, const char *tag);
+ void set_k051960_callback(k051960_cb_delegate callback) { m_k051960_cb = callback; }
+ void set_plane_order(int order);
+ void set_screen_tag(const char *tag);
/*
The callback is passed:
diff --git a/src/mame/video/k052109.cpp b/src/mame/video/k052109.cpp
index b83ab4ba113..f8c4b45e519 100644
--- a/src/mame/video/k052109.cpp
+++ b/src/mame/video/k052109.cpp
@@ -188,14 +188,12 @@ k052109_device::k052109_device(const machine_config &mconfig, const char *tag, d
}
-void k052109_device::set_ram(device_t &device, bool ram)
+void k052109_device::set_ram(bool ram)
{
- k052109_device &dev = downcast<k052109_device &>(device);
-
if (ram)
- device_gfx_interface::static_set_info(dev, gfxinfo_ram);
+ device_gfx_interface::static_set_info(*this, gfxinfo_ram);
else
- device_gfx_interface::static_set_info(dev, gfxinfo);
+ device_gfx_interface::static_set_info(*this, gfxinfo);
}
@@ -281,10 +279,9 @@ void k052109_device::device_reset()
// set_screen_tag - set screen we are attached to
//-------------------------------------------------
-void k052109_device::set_screen_tag(device_t &device, const char *tag)
+void k052109_device::set_screen_tag(const char *tag)
{
- k052109_device &dev = dynamic_cast<k052109_device &>(device);
- dev.m_screen.set_tag(tag);
+ m_screen.set_tag(tag);
}
diff --git a/src/mame/video/k052109.h b/src/mame/video/k052109.h
index 1ee5b162ead..355b8ba26bd 100644
--- a/src/mame/video/k052109.h
+++ b/src/mame/video/k052109.h
@@ -11,16 +11,16 @@ typedef device_delegate<void (int layer, int bank, int *code, int *color, int *f
#define K052109_CB_MEMBER(_name) void _name(int layer, int bank, int *code, int *color, int *flags, int *priority)
#define MCFG_K052109_CB(_class, _method) \
- k052109_device::set_k052109_callback(*device, k052109_cb_delegate(&_class::_method, #_class "::" #_method, this));
+ downcast<k052109_device &>(*device).set_k052109_callback(k052109_cb_delegate(&_class::_method, #_class "::" #_method, this));
#define MCFG_K052109_CHARRAM(_ram) \
- k052109_device::set_ram(*device, _ram);
+ downcast<k052109_device &>(*device).set_ram(_ram);
#define MCFG_K052109_SCREEN_TAG(_tag) \
- k052109_device::set_screen_tag(*device, "^" _tag);
+ downcast<k052109_device &>(*device).set_screen_tag("^" _tag);
#define MCFG_K052109_IRQ_HANDLER(_devcb) \
- devcb = &k052109_device::set_irq_handler(*device, DEVCB_##_devcb);
+ devcb = &downcast<k052109_device &>(*device).set_irq_handler(DEVCB_##_devcb);
class k052109_device : public device_t, public device_gfx_interface
@@ -34,12 +34,12 @@ public:
k052109_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
~k052109_device() {}
- template <class Object> static devcb_base &set_irq_handler(device_t &device, Object &&cb)
- { return downcast<k052109_device &>(device).m_irq_handler.set_callback(std::forward<Object>(cb)); }
+ template <class Object> devcb_base &set_irq_handler(Object &&cb)
+ { return m_irq_handler.set_callback(std::forward<Object>(cb)); }
- static void set_k052109_callback(device_t &device, k052109_cb_delegate callback) { downcast<k052109_device &>(device).m_k052109_cb = callback; }
- static void set_ram(device_t &device, bool ram);
- static void set_screen_tag(device_t &device, const char *tag);
+ void set_k052109_callback(k052109_cb_delegate callback) { m_k052109_cb = callback; }
+ void set_ram(bool ram);
+ void set_screen_tag(const char *tag);
/*
The callback is passed:
diff --git a/src/mame/video/k053244_k053245.cpp b/src/mame/video/k053244_k053245.cpp
index 0f6acdd9688..e1c422d18b7 100644
--- a/src/mame/video/k053244_k053245.cpp
+++ b/src/mame/video/k053244_k053245.cpp
@@ -96,16 +96,15 @@ k05324x_device::k05324x_device(const machine_config &mconfig, const char *tag, d
{
}
-void k05324x_device::set_bpp(device_t &device, int bpp)
+void k05324x_device::set_bpp(int bpp)
{
- k05324x_device &dev = downcast<k05324x_device &>(device);
switch(bpp)
{
case 4:
- device_gfx_interface::static_set_info(dev, gfxinfo);
+ device_gfx_interface::static_set_info(*this, gfxinfo);
break;
case 6:
- device_gfx_interface::static_set_info(dev, gfxinfo_6bpp);
+ device_gfx_interface::static_set_info(*this, gfxinfo_6bpp);
break;
default:
fatalerror("Unsupported bpp\n");
diff --git a/src/mame/video/k053244_k053245.h b/src/mame/video/k053244_k053245.h
index 22838b386db..998ad71c0db 100644
--- a/src/mame/video/k053244_k053245.h
+++ b/src/mame/video/k053244_k053245.h
@@ -11,13 +11,13 @@ typedef device_delegate<void (int *code, int *color, int *priority)> k05324x_cb_
#define MCFG_K05324X_BPP(_bpp) \
- k05324x_device::set_bpp(*device, _bpp);
+ downcast<k05324x_device &>(*device).set_bpp(_bpp);
#define MCFG_K05324X_CB(_class, _method) \
- k05324x_device::set_k05324x_callback(*device, k05324x_cb_delegate(&_class::_method, #_class "::" #_method, this));
+ downcast<k05324x_device &>(*device).set_k05324x_callback(k05324x_cb_delegate(&_class::_method, #_class "::" #_method, this));
#define MCFG_K05324X_OFFSETS(_xoffs, _yoffs) \
- k05324x_device::set_offsets(*device, _xoffs, _yoffs);
+ downcast<k05324x_device &>(*device).set_offsets(_xoffs, _yoffs);
class k05324x_device : public device_t, public device_gfx_interface
@@ -30,14 +30,13 @@ class k05324x_device : public device_t, public device_gfx_interface
public:
k05324x_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
- // static configuration
- static void set_bpp(device_t &device, int bpp);
- static void set_k05324x_callback(device_t &device, k05324x_cb_delegate callback) { downcast<k05324x_device &>(device).m_k05324x_cb = callback; }
- static void set_offsets(device_t &device, int x_offset, int y_offset)
+ // configuration
+ void set_bpp(int bpp);
+ void set_k05324x_callback(k05324x_cb_delegate callback) { m_k05324x_cb = callback; }
+ void set_offsets(int x_offset, int y_offset)
{
- k05324x_device &dev = downcast<k05324x_device &>(device);
- dev.m_dx = x_offset;
- dev.m_dy = y_offset;
+ m_dx = x_offset;
+ m_dy = y_offset;
}
DECLARE_READ16_MEMBER( k053245_word_r );
diff --git a/src/mame/video/k053246_k053247_k055673.h b/src/mame/video/k053246_k053247_k055673.h
index 087966b6692..00ef8b8b224 100644
--- a/src/mame/video/k053246_k053247_k055673.h
+++ b/src/mame/video/k053246_k053247_k055673.h
@@ -17,16 +17,16 @@ typedef device_delegate<void (int *code, int *color, int *priority_mask)> k05324
#define K055673_CB_MEMBER(_name) void _name(int *code, int *color, int *priority_mask)
#define MCFG_K053246_CB(_class, _method) \
- k053247_device::set_k053247_callback(*device, k053247_cb_delegate(&_class::_method, #_class "::" #_method, this));
+ downcast<k053247_device &>(*device).set_k053247_callback(k053247_cb_delegate(&_class::_method, #_class "::" #_method, this));
#define MCFG_K053246_CONFIG(_gfx_reg, _order, _dx, _dy) \
- k053247_device::set_config(*device, _gfx_reg, _order, _dx, _dy);
+ downcast<k053247_device &>(*device).set_config(_gfx_reg, _order, _dx, _dy);
#define MCFG_K055673_CB(_class, _method) \
- k053247_device::set_k053247_callback(*device, k053247_cb_delegate(&_class::_method, #_class "::" #_method, this));
+ downcast<k053247_device &>(*device).set_k053247_callback(k053247_cb_delegate(&_class::_method, #_class "::" #_method, this));
#define MCFG_K055673_CONFIG(_gfx_reg, _order, _dx, _dy) \
- k053247_device::set_config(*device, _gfx_reg, _order, _dx, _dy);
+ downcast<k053247_device &>(*device).set_config(_gfx_reg, _order, _dx, _dy);
/** Konami 053246 / 053247 / 055673 **/
@@ -66,15 +66,14 @@ class k053247_device : public device_t,
public:
k053247_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
- // static configuration
- static void set_k053247_callback(device_t &device, k053247_cb_delegate callback) { downcast<k053247_device &>(device).m_k053247_cb = callback; }
- static void set_config(device_t &device, const char *gfx_reg, int bpp, int dx, int dy)
+ // configuration
+ void set_k053247_callback(k053247_cb_delegate callback) { m_k053247_cb = callback; }
+ void set_config(const char *gfx_reg, int bpp, int dx, int dy)
{
- k053247_device &dev = downcast<k053247_device &>(device);
- dev.m_memory_region = gfx_reg;
- dev.m_bpp = bpp;
- dev.m_dx = dx;
- dev.m_dy = dy;
+ m_memory_region = gfx_reg;
+ m_bpp = bpp;
+ m_dx = dx;
+ m_dy = dy;
}
void clear_all();
diff --git a/src/mame/video/k053250.cpp b/src/mame/video/k053250.cpp
index 0f8c5b83b1a..1aa7165253b 100644
--- a/src/mame/video/k053250.cpp
+++ b/src/mame/video/k053250.cpp
@@ -15,11 +15,10 @@ k053250_device::k053250_device(const machine_config &mconfig, const char *tag, d
{
}
-void k053250_device::static_set_offsets(device_t &device, int offx, int offy)
+void k053250_device::set_offsets(int offx, int offy)
{
- k053250_device &dev = downcast<k053250_device &>(device);
- dev.m_offx = offx;
- dev.m_offy = offy;
+ m_offx = offx;
+ m_offy = offy;
}
void k053250_device::unpack_nibbles()
diff --git a/src/mame/video/k053250.h b/src/mame/video/k053250.h
index 3365c7f4dbe..c0f54a4d0bd 100644
--- a/src/mame/video/k053250.h
+++ b/src/mame/video/k053250.h
@@ -14,7 +14,7 @@
MCFG_DEVICE_ADD(_tag, K053250, 0) \
MCFG_GFX_PALETTE(_palette_tag) \
MCFG_VIDEO_SET_SCREEN(_screen_tag) \
- k053250_device::static_set_offsets(*device, offx, offy);
+ downcast<k053250_device &>(*device).set_offsets(offx, offy);
class k053250_device : public device_t,
public device_gfx_interface,
@@ -23,7 +23,7 @@ class k053250_device : public device_t,
public:
k053250_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
- static void static_set_offsets(device_t &device, int offx, int offy);
+ void set_offsets(int offx, int offy);
DECLARE_READ16_MEMBER(reg_r);
DECLARE_WRITE16_MEMBER(reg_w);
diff --git a/src/mame/video/k053250_ps.cpp b/src/mame/video/k053250_ps.cpp
index 9d607f5cba6..64e9b497aa6 100644
--- a/src/mame/video/k053250_ps.cpp
+++ b/src/mame/video/k053250_ps.cpp
@@ -49,11 +49,10 @@ k053250ps_device::k053250ps_device(const machine_config &mconfig, const char *ta
{
}
-void k053250ps_device::static_set_offsets(device_t &device, int offx, int offy)
+void k053250ps_device::set_offsets(int offx, int offy)
{
- k053250ps_device &dev = downcast<k053250ps_device &>(device);
- dev.m_offx = offx;
- dev.m_offy = offy;
+ m_offx = offx;
+ m_offy = offy;
}
void k053250ps_device::unpack_nibbles()
diff --git a/src/mame/video/k053250_ps.h b/src/mame/video/k053250_ps.h
index 99479e5a9a2..b0a2a9a1da1 100644
--- a/src/mame/video/k053250_ps.h
+++ b/src/mame/video/k053250_ps.h
@@ -14,10 +14,10 @@
MCFG_DEVICE_ADD(_tag, K053250PS, 12000000) \
MCFG_GFX_PALETTE(_palette_tag) \
MCFG_VIDEO_SET_SCREEN(_screen_tag) \
- k053250ps_device::static_set_offsets(*device, offx, offy);
+ downcast<k053250ps_device &>(*device).set_offsets(offx, offy);
#define MCFG_K053250PS_DMAIRQ_CB(_cb) \
- devcb = &k053250ps_device::set_dmairq_cb(*device, DEVCB_##_cb);
+ devcb = &downcast<k053250ps_device &>(*device).set_dmairq_cb(DEVCB_##_cb);
class k053250ps_device : public device_t,
public device_gfx_interface,
@@ -26,8 +26,8 @@ class k053250ps_device : public device_t,
public:
k053250ps_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
- static void static_set_offsets(device_t &device, int offx, int offy);
- template<class _cb> static devcb_base &set_dmairq_cb(device_t &device, _cb cb) { return downcast<k053250ps_device &>(device).m_dmairq_cb.set_callback(cb); }
+ void set_offsets(int offx, int offy);
+ template<class _cb> devcb_base &set_dmairq_cb(_cb cb) { return m_dmairq_cb.set_callback(cb); }
DECLARE_READ16_MEMBER(reg_r);
DECLARE_WRITE16_MEMBER(reg_w);
diff --git a/src/mame/video/k053936.h b/src/mame/video/k053936.h
index f1546e8482b..c891acd51c7 100644
--- a/src/mame/video/k053936.h
+++ b/src/mame/video/k053936.h
@@ -23,13 +23,12 @@ public:
k053936_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
~k053936_device() {}
- // static configuration
- static void set_wrap(device_t &device, int wrap) { downcast<k053936_device &>(device).m_wrap = wrap; }
- static void set_offsets(device_t &device, int x_offset, int y_offset)
+ // configuration
+ void set_wrap(int wrap) { m_wrap = wrap; }
+ void set_offsets(int x_offset, int y_offset)
{
- k053936_device &dev = downcast<k053936_device &>(device);
- dev.m_xoff = x_offset;
- dev.m_yoff = y_offset;
+ m_xoff = x_offset;
+ m_yoff = y_offset;
}
DECLARE_WRITE16_MEMBER( ctrl_w );
@@ -55,9 +54,9 @@ private:
DECLARE_DEVICE_TYPE(K053936, k053936_device)
#define MCFG_K053936_WRAP(_wrap) \
- k053936_device::set_wrap(*device, _wrap);
+ downcast<k053936_device &>(*device).set_wrap(_wrap);
#define MCFG_K053936_OFFSETS(_xoffs, _yoffs) \
- k053936_device::set_offsets(*device, _xoffs, _yoffs);
+ downcast<k053936_device &>(*device).set_offsets(_xoffs, _yoffs);
#endif // MAME_VIDEO_K053936_H
diff --git a/src/mame/video/k054156_k054157_k056832.h b/src/mame/video/k054156_k054157_k056832.h
index 9c05c17ca5c..b6bc6fec7a5 100644
--- a/src/mame/video/k054156_k054157_k056832.h
+++ b/src/mame/video/k054156_k054157_k056832.h
@@ -10,10 +10,10 @@ typedef device_delegate<void (int layer, int *code, int *color, int *flags)> k05
#define K056832_CB_MEMBER(_name) void _name(int layer, int *code, int *color, int *flags)
#define MCFG_K056832_CB(_class, _method) \
- k056832_device::set_k056832_callback(*device, k056832_cb_delegate(&_class::_method, #_class "::" #_method, this));
+ downcast<k056832_device &>(*device).set_k056832_callback(k056832_cb_delegate(&_class::_method, #_class "::" #_method, this));
#define MCFG_K056832_CONFIG(_gfx_reg, _bpp, _big, _djmain_hack, _k055555) \
- k056832_device::set_config(*device, "^" _gfx_reg, _bpp, _big, _djmain_hack, _k055555);
+ downcast<k056832_device &>(*device).set_config("^" _gfx_reg, _bpp, _big, _djmain_hack, _k055555);
#define K056832_PAGE_COUNT 16
@@ -39,15 +39,14 @@ class k056832_device : public device_t, public device_gfx_interface
public:
k056832_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
- static void set_k056832_callback(device_t &device, k056832_cb_delegate callback) { downcast<k056832_device &>(device).m_k056832_cb = callback; }
- static void set_config(device_t &device, const char *gfx_reg, int bpp, int big, int djmain_hack, const char *k055555)
+ void set_k056832_callback(k056832_cb_delegate callback) { m_k056832_cb = callback; }
+ void set_config(const char *gfx_reg, int bpp, int big, int djmain_hack, const char *k055555)
{
- k056832_device &dev = downcast<k056832_device &>(device);
- dev.m_rombase.set_tag(gfx_reg);
- dev.m_bpp = bpp;
- dev.m_big = big;
- dev.m_djmain_hack = djmain_hack;
- dev.m_k055555_tag = k055555;
+ m_rombase.set_tag(gfx_reg);
+ m_bpp = bpp;
+ m_big = big;
+ m_djmain_hack = djmain_hack;
+ m_k055555_tag = k055555;
}
void SetExtLinescroll(); /* Lethal Enforcers */
diff --git a/src/mame/video/k054338.h b/src/mame/video/k054338.h
index 8385fe10c2d..a8b9bcb2b8d 100644
--- a/src/mame/video/k054338.h
+++ b/src/mame/video/k054338.h
@@ -28,9 +28,9 @@ class k054338_device : public device_t,
public:
k054338_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
- // static configuration
- static void set_mixer_tag(device_t &device, const char *tag) { downcast<k054338_device &>(device).m_k055555_tag = tag; }
- static void set_alpha_invert(device_t &device, int alpha_inv) { downcast<k054338_device &>(device).m_alpha_inv = alpha_inv; }
+ // configuration
+ void set_mixer_tag(const char *tag) { m_k055555_tag = tag; }
+ void set_alpha_invert(int alpha_inv) { m_alpha_inv = alpha_inv; }
DECLARE_WRITE16_MEMBER( word_w ); // "CLCT" registers
DECLARE_WRITE32_MEMBER( long_w );
@@ -64,10 +64,10 @@ DECLARE_DEVICE_TYPE(K054338, k054338_device)
#define MCFG_K054338_MIXER(_tag) \
- k054338_device::set_mixer_tag(*device, _tag);
+ downcast<k054338_device &>(*device).set_mixer_tag(_tag);
#define MCFG_K054338_ALPHAINV(_alphainv) \
- k054338_device::set_alpha_invert(*device, _alphainv);
+ downcast<k054338_device &>(*device).set_alpha_invert(_alphainv);
#define MCFG_K054338_SET_SCREEN MCFG_VIDEO_SET_SCREEN
diff --git a/src/mame/video/k057714.h b/src/mame/video/k057714.h
index c5bf4b0bf40..08524f1fde3 100644
--- a/src/mame/video/k057714.h
+++ b/src/mame/video/k057714.h
@@ -10,7 +10,7 @@ class k057714_device : public device_t
{
public:
k057714_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
- template <class Object> static devcb_base &static_set_irq_callback(device_t &device, Object &&cb) { return downcast<k057714_device &>(device).m_irq.set_callback(std::forward<Object>(cb)); }
+ template <class Object> devcb_base &set_irq_callback(Object &&cb) { return m_irq.set_callback(std::forward<Object>(cb)); }
int draw(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
@@ -64,7 +64,7 @@ private:
DECLARE_DEVICE_TYPE(K057714, k057714_device)
#define MCFG_K057714_IRQ_CALLBACK(_devcb) \
- devcb = &k057714_device::static_set_irq_callback(*device, DEVCB_##_devcb);
+ devcb = &downcast<k057714_device &>(*device).set_irq_callback(DEVCB_##_devcb);
#endif // MAME_MACHINE_K057714_H
diff --git a/src/mame/video/k1ge.h b/src/mame/video/k1ge.h
index 8a0731001dc..dee1b5dc43c 100644
--- a/src/mame/video/k1ge.h
+++ b/src/mame/video/k1ge.h
@@ -15,14 +15,14 @@
#define MCFG_K1GE_ADD(_tag, _clock, _screen, _vblank, _hblank ) \
MCFG_DEVICE_ADD( _tag, K1GE, _clock ) \
MCFG_VIDEO_SET_SCREEN( _screen ) \
- devcb = &k1ge_device::static_set_vblank_callback( *device, DEVCB_##_vblank ); \
- devcb = &k1ge_device::static_set_hblank_callback( *device, DEVCB_##_hblank );
+ devcb = &downcast<k1ge_device &>(*device).set_vblank_callback(DEVCB_##_vblank ); \
+ devcb = &downcast<k1ge_device &>(*device).set_hblank_callback(DEVCB_##_hblank );
#define MCFG_K2GE_ADD(_tag, _clock, _screen, _vblank, _hblank ) \
MCFG_DEVICE_ADD( _tag, K2GE, _clock ) \
MCFG_VIDEO_SET_SCREEN( _screen ) \
- devcb = &k1ge_device::static_set_vblank_callback( *device, DEVCB_##_vblank ); \
- devcb = &k1ge_device::static_set_hblank_callback( *device, DEVCB_##_hblank );
+ devcb = &downcast<k1ge_device &>(*device).set_vblank_callback(DEVCB_##_vblank ); \
+ devcb = &downcast<k1ge_device &>(*device).set_hblank_callback(DEVCB_##_hblank );
class k1ge_device : public device_t, public device_video_interface
@@ -36,8 +36,8 @@ public:
void update( bitmap_ind16 &bitmap, const rectangle &cliprect );
// Static methods
- template <class Object> static devcb_base &static_set_vblank_callback(device_t &device, Object &&cb) { return downcast<k1ge_device &>(device).m_vblank_pin_w.set_callback(std::forward<Object>(cb)); }
- template <class Object> static devcb_base &static_set_hblank_callback(device_t &device, Object &&cb) { return downcast<k1ge_device &>(device).m_hblank_pin_w.set_callback(std::forward<Object>(cb)); }
+ template <class Object> devcb_base &set_vblank_callback(Object &&cb) { return m_vblank_pin_w.set_callback(std::forward<Object>(cb)); }
+ template <class Object> devcb_base &set_hblank_callback(Object &&cb) { return m_hblank_pin_w.set_callback(std::forward<Object>(cb)); }
static const int K1GE_SCREEN_HEIGHT = 199;
diff --git a/src/mame/video/kan_pand.cpp b/src/mame/video/kan_pand.cpp
index 9c69ec2323b..30105a001ff 100644
--- a/src/mame/video/kan_pand.cpp
+++ b/src/mame/video/kan_pand.cpp
@@ -66,13 +66,13 @@ kaneko_pandora_device::kaneko_pandora_device(const machine_config &mconfig, cons
}
//-------------------------------------------------
-// static_set_gfxdecode_tag: Set the tag of the
+// set_gfxdecode_tag: Set the tag of the
// gfx decoder
//-------------------------------------------------
-void kaneko_pandora_device::static_set_gfxdecode_tag(device_t &device, const char *tag)
+void kaneko_pandora_device::set_gfxdecode_tag(const char *tag)
{
- downcast<kaneko_pandora_device &>(device).m_gfxdecode.set_tag(tag);
+ m_gfxdecode.set_tag(tag);
}
//-------------------------------------------------
diff --git a/src/mame/video/kan_pand.h b/src/mame/video/kan_pand.h
index b6c73a1aca9..54df95d044d 100644
--- a/src/mame/video/kan_pand.h
+++ b/src/mame/video/kan_pand.h
@@ -23,14 +23,13 @@ class kaneko_pandora_device : public device_t,
public:
kaneko_pandora_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
- // static configuration
- static void static_set_gfxdecode_tag(device_t &device, const char *tag);
- static void set_gfx_region(device_t &device, int gfxregion) { downcast<kaneko_pandora_device &>(device).m_gfx_region = gfxregion; }
- static void set_offsets(device_t &device, int x_offset, int y_offset)
+ // configuration
+ void set_gfxdecode_tag(const char *tag);
+ void set_gfx_region(int gfxregion) { m_gfx_region = gfxregion; }
+ void set_offsets(int x_offset, int y_offset)
{
- kaneko_pandora_device &dev = downcast<kaneko_pandora_device &>(device);
- dev.m_xoffset = x_offset;
- dev.m_yoffset = y_offset;
+ m_xoffset = x_offset;
+ m_yoffset = y_offset;
}
DECLARE_WRITE8_MEMBER ( spriteram_w );
@@ -71,12 +70,12 @@ DECLARE_DEVICE_TYPE(KANEKO_PANDORA, kaneko_pandora_device)
***************************************************************************/
#define MCFG_KANEKO_PANDORA_GFX_REGION(_region) \
- kaneko_pandora_device::set_gfx_region(*device, _region);
+ downcast<kaneko_pandora_device &>(*device).set_gfx_region(_region);
#define MCFG_KANEKO_PANDORA_OFFSETS(_xoffs, _yoffs) \
- kaneko_pandora_device::set_offsets(*device, _xoffs, _yoffs);
+ downcast<kaneko_pandora_device &>(*device).set_offsets(_xoffs, _yoffs);
#define MCFG_KANEKO_PANDORA_GFXDECODE(_gfxtag) \
- kaneko_pandora_device::static_set_gfxdecode_tag(*device, "^" _gfxtag);
+ downcast<kaneko_pandora_device &>(*device).set_gfxdecode_tag("^" _gfxtag);
#endif // MAME_VIDEO_KAN_PAND_H
diff --git a/src/mame/video/kaneko_grap2.cpp b/src/mame/video/kaneko_grap2.cpp
index 07b0e08c8cd..d84c6d40c29 100644
--- a/src/mame/video/kaneko_grap2.cpp
+++ b/src/mame/video/kaneko_grap2.cpp
@@ -24,20 +24,19 @@ kaneko_grap2_device::kaneko_grap2_device(const machine_config &mconfig, const ch
}
-void kaneko_grap2_device::set_chipnum(device_t &device, int chipnum)
+void kaneko_grap2_device::set_chipnum(int chipnum)
{
- kaneko_grap2_device &dev = downcast<kaneko_grap2_device &>(device);
- dev.m_chipnum = chipnum;
+ m_chipnum = chipnum;
}
//-------------------------------------------------
-// static_set_palette_tag: Set the tag of the
+// set_palette_tag: Set the tag of the
// palette device
//-------------------------------------------------
-void kaneko_grap2_device::static_set_palette_tag(device_t &device, const char *tag)
+void kaneko_grap2_device::set_palette_tag(const char *tag)
{
- downcast<kaneko_grap2_device &>(device).m_palette.set_tag(tag);
+ m_palette.set_tag(tag);
}
diff --git a/src/mame/video/kaneko_grap2.h b/src/mame/video/kaneko_grap2.h
index 65380accf6d..44a5f50ee5c 100644
--- a/src/mame/video/kaneko_grap2.h
+++ b/src/mame/video/kaneko_grap2.h
@@ -30,8 +30,8 @@ public:
int m_chipnum; // used to decide where we write the palette
- static void set_chipnum(device_t &device, int chipnum);
- static void static_set_palette_tag(device_t &device, const char *tag);
+ void set_chipnum(int chipnum);
+ void set_palette_tag(const char *tag);
DECLARE_READ16_MEMBER(galpani3_regs1_r);
DECLARE_WRITE16_MEMBER(galpani3_regs1_go_w);
@@ -97,7 +97,9 @@ private:
DECLARE_DEVICE_TYPE(KANEKO_GRAP2, kaneko_grap2_device)
#define MCFG_KANEKO_GRAP2_PALETTE(_palette_tag) \
- kaneko_grap2_device::static_set_palette_tag(*device, "^" _palette_tag);
+ downcast<kaneko_grap2_device &>(*device).set_palette_tag("^" _palette_tag);
+#define MCFG_KANEKO_GRAP2_CHIPNUM(_chipnum) \
+ downcast<kaneko_grap2_device &>(*device).set_chipnum(_chipnum);
#endif // MAME_VIDEO_KANEKO_GRAP2_H
diff --git a/src/mame/video/kaneko_spr.cpp b/src/mame/video/kaneko_spr.cpp
index 39a171a5870..281edcb2a97 100644
--- a/src/mame/video/kaneko_spr.cpp
+++ b/src/mame/video/kaneko_spr.cpp
@@ -68,9 +68,9 @@ kaneko16_sprite_device::kaneko16_sprite_device(
// gfx decoder
//-------------------------------------------------
-void kaneko16_sprite_device::static_set_gfxdecode_tag(device_t &device, const char *tag)
+void kaneko16_sprite_device::set_gfxdecode_tag(const char *tag)
{
- downcast<kaneko16_sprite_device &>(device).m_gfxdecode.set_tag(tag);
+ m_gfxdecode.set_tag(tag);
}
void kaneko16_sprite_device::device_start()
@@ -94,29 +94,24 @@ void kaneko16_sprite_device::device_reset()
m_sprite_flipy = 0;
}
-void kaneko16_sprite_device::set_priorities(device_t &device, int pri0, int pri1, int pri2, int pri3)
+void kaneko16_sprite_device::set_priorities(int pri0, int pri1, int pri2, int pri3)
{
- kaneko16_sprite_device &dev = downcast<kaneko16_sprite_device &>(device);
-
- dev.m_priority.sprite[0] = pri0;
- dev.m_priority.sprite[1] = pri1;
- dev.m_priority.sprite[2] = pri2;
- dev.m_priority.sprite[3] = pri3;
+ m_priority.sprite[0] = pri0;
+ m_priority.sprite[1] = pri1;
+ m_priority.sprite[2] = pri2;
+ m_priority.sprite[3] = pri3;
}
-void kaneko16_sprite_device::set_fliptype(device_t &device, int fliptype)
+void kaneko16_sprite_device::set_fliptype(int fliptype)
{
- kaneko16_sprite_device &dev = downcast<kaneko16_sprite_device &>(device);
- dev.m_sprite_fliptype = fliptype;
-
+ m_sprite_fliptype = fliptype;
}
-void kaneko16_sprite_device::set_offsets(device_t &device, int xoffs, int yoffs)
+void kaneko16_sprite_device::set_offsets(int xoffs, int yoffs)
{
- kaneko16_sprite_device &dev = downcast<kaneko16_sprite_device &>(device);
- dev.m_sprite_xoffs = xoffs;
- dev.m_sprite_yoffs = yoffs;
+ m_sprite_xoffs = xoffs;
+ m_sprite_yoffs = yoffs;
}
diff --git a/src/mame/video/kaneko_spr.h b/src/mame/video/kaneko_spr.h
index 8a27bb8013e..cf4ec0d4f25 100644
--- a/src/mame/video/kaneko_spr.h
+++ b/src/mame/video/kaneko_spr.h
@@ -34,11 +34,11 @@ struct kan_tempsprite
class kaneko16_sprite_device : public device_t, public device_video_interface
{
public:
- // static configuration
- static void static_set_gfxdecode_tag(device_t &device, const char *tag);
- static void set_fliptype(device_t &device, int fliptype);
- static void set_offsets(device_t &device, int xoffs, int yoffs);
- static void set_priorities(device_t &device, int pri0, int pri1, int pri2, int pri3);
+ // configuration
+ void set_gfxdecode_tag(const char *tag);
+ void set_fliptype(int fliptype);
+ void set_offsets(int xoffs, int yoffs);
+ void set_priorities(int pri0, int pri1, int pri2, int pri3);
// (legacy) used in the bitmap clear functions
virtual int get_sprite_type(void) =0;
@@ -115,7 +115,13 @@ private:
//extern const device_type KANEKO16_SPRITE;
#define MCFG_KANEKO16_SPRITE_GFXDECODE(_gfxtag) \
- kaneko16_sprite_device::static_set_gfxdecode_tag(*device, "^" _gfxtag);
+ downcast<kaneko16_sprite_device &>(*device).set_gfxdecode_tag("^" _gfxtag);
+#define MCFG_KANEKO16_SPRITE_PRIORITIES(_pri0, _pri1, _pri2, _pri3) \
+ downcast<kaneko16_sprite_device &>(*device).set_priorities(_pri0, _pri1, _pri2, _pri3);
+#define MCFG_KANEKO16_SPRITE_OFFSETS(_xoffs, _yoffs) \
+ downcast<kaneko16_sprite_device &>(*device).set_offsets(_xoffs, _yoffs);
+#define MCFG_KANEKO16_SPRITE_FLIPTYPE(_fliptype) \
+ downcast<kaneko16_sprite_device &>(*device).set_fliptype(_fliptype);
class kaneko_vu002_sprite_device : public kaneko16_sprite_device
diff --git a/src/mame/video/kaneko_tmap.cpp b/src/mame/video/kaneko_tmap.cpp
index d9770bc8478..e8cb2976901 100644
--- a/src/mame/video/kaneko_tmap.cpp
+++ b/src/mame/video/kaneko_tmap.cpp
@@ -104,34 +104,31 @@ kaneko_view2_tilemap_device::kaneko_view2_tilemap_device(const machine_config &m
}
//-------------------------------------------------
-// static_set_gfxdecode_tag: Set the tag of the
+// set_gfxdecode_tag: Set the tag of the
// gfx decoder
//-------------------------------------------------
-void kaneko_view2_tilemap_device::static_set_gfxdecode_tag(device_t &device, const char *tag)
+void kaneko_view2_tilemap_device::set_gfxdecode_tag(const char *tag)
{
- downcast<kaneko_view2_tilemap_device &>(device).m_gfxdecode.set_tag(tag);
+ m_gfxdecode.set_tag(tag);
}
-void kaneko_view2_tilemap_device::set_gfx_region(device_t &device, int region)
+void kaneko_view2_tilemap_device::set_gfx_region(int region)
{
- kaneko_view2_tilemap_device &dev = downcast<kaneko_view2_tilemap_device &>(device);
- dev.m_tilebase = region;
+ m_tilebase = region;
}
-void kaneko_view2_tilemap_device::set_offset(device_t &device, int dx, int dy, int xdim, int ydim)
+void kaneko_view2_tilemap_device::set_offset(int dx, int dy, int xdim, int ydim)
{
- kaneko_view2_tilemap_device &dev = downcast<kaneko_view2_tilemap_device &>(device);
- dev.m_dx = dx;
- dev.m_dy = dy;
- dev.m_xdim = xdim;
- dev.m_ydim = ydim;
+ m_dx = dx;
+ m_dy = dy;
+ m_xdim = xdim;
+ m_ydim = ydim;
}
-void kaneko_view2_tilemap_device::set_invert_flip(device_t &device, int invert_flip)
+void kaneko_view2_tilemap_device::set_invert_flip(int invert_flip)
{
- kaneko_view2_tilemap_device &dev = downcast<kaneko_view2_tilemap_device &>(device);
- dev.m_invert_flip = invert_flip;
+ m_invert_flip = invert_flip;
}
void kaneko_view2_tilemap_device::get_tile_info(tile_data &tileinfo, tilemap_memory_index tile_index, int _N_)
diff --git a/src/mame/video/kaneko_tmap.h b/src/mame/video/kaneko_tmap.h
index 23daae62f50..8a7b56f6e4f 100644
--- a/src/mame/video/kaneko_tmap.h
+++ b/src/mame/video/kaneko_tmap.h
@@ -12,11 +12,11 @@ class kaneko_view2_tilemap_device : public device_t
public:
kaneko_view2_tilemap_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
- // static configuration
- static void static_set_gfxdecode_tag(device_t &device, const char *tag);
- static void set_gfx_region(device_t &device, int region);
- static void set_offset(device_t &device, int dx, int dy, int xdim, int ydim);
- static void set_invert_flip(device_t &device, int invert_flip); // for fantasia (bootleg)
+ // configuration
+ void set_gfxdecode_tag(const char *tag);
+ void set_gfx_region(int region);
+ void set_offset(int dx, int dy, int xdim, int ydim);
+ void set_invert_flip(int invert_flip); // for fantasia (bootleg)
void get_tile_info(tile_data &tileinfo, tilemap_memory_index tile_index, int _N_);
void kaneko16_vram_w(offs_t offset, uint16_t data, uint16_t mem_mask, int _N_);
@@ -86,6 +86,12 @@ private:
DECLARE_DEVICE_TYPE(KANEKO_TMAP, kaneko_view2_tilemap_device)
#define MCFG_KANEKO_TMAP_GFXDECODE(_gfxtag) \
- kaneko_view2_tilemap_device::static_set_gfxdecode_tag(*device, "^" _gfxtag);
+ downcast<kaneko_view2_tilemap_device &>(*device).set_gfxdecode_tag("^" _gfxtag);
+#define MCFG_KANEKO_TMAP_GFX_REGION(_region) \
+ downcast<kaneko_view2_tilemap_device &>(*device).set_gfx_region(_region);
+#define MCFG_KANEKO_TMAP_INVERT_FLIP(_invert) \
+ downcast<kaneko_view2_tilemap_device &>(*device).set_invert_flip(_invert);
+#define MCFG_KANEKO_TMAP_OFFSET(_dx, _dy, _xdim, _ydim) \
+ downcast<kaneko_view2_tilemap_device &>(*device).set_offset(_dx, _dy, _xdim, _ydim);
#endif // MAME_VIDEO_KANEKO_TMAP_H
diff --git a/src/mame/video/maria.h b/src/mame/video/maria.h
index 48145b4062d..675aa2f98b0 100644
--- a/src/mame/video/maria.h
+++ b/src/mame/video/maria.h
@@ -14,7 +14,7 @@ public:
// construction/destruction
atari_maria_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
- static void set_cpu_tag(device_t &device, const char *tag) { downcast<atari_maria_device &>(device).m_cpu_tag = tag; }
+ void set_cpu_tag(const char *tag) { m_cpu_tag = tag; }
void interrupt(int lines);
void startdma(int lines);
@@ -67,7 +67,7 @@ DECLARE_DEVICE_TYPE(ATARI_MARIA, atari_maria_device)
#define MCFG_MARIA_DMACPU(_tag) \
- atari_maria_device::set_cpu_tag(*device, _tag);
+ downcast<atari_maria_device &>(*device).set_cpu_tag(_tag);
#endif // MAME_VIDEO_MARIA_H
diff --git a/src/mame/video/mb60553.cpp b/src/mame/video/mb60553.cpp
index 63888c8601c..a81cbea96f7 100644
--- a/src/mame/video/mb60553.cpp
+++ b/src/mame/video/mb60553.cpp
@@ -57,15 +57,14 @@ void mb60553_zooming_tilemap_device::device_reset()
}
-void mb60553_zooming_tilemap_device::set_gfx_region(device_t &device, int gfxregion)
+void mb60553_zooming_tilemap_device::set_gfx_region(int gfxregion)
{
- mb60553_zooming_tilemap_device &dev = downcast<mb60553_zooming_tilemap_device &>(device);
- dev.m_gfx_region = gfxregion;
+ m_gfx_region = gfxregion;
}
-void mb60553_zooming_tilemap_device::static_set_gfxdecode_tag(device_t &device, const char *tag)
+void mb60553_zooming_tilemap_device::set_gfxdecode_tag(const char *tag)
{
- downcast<mb60553_zooming_tilemap_device &>(device).m_gfxdecode.set_tag(tag);
+ m_gfxdecode.set_tag(tag);
}
diff --git a/src/mame/video/mb60553.h b/src/mame/video/mb60553.h
index 71d387227c2..c245f0f072e 100644
--- a/src/mame/video/mb60553.h
+++ b/src/mame/video/mb60553.h
@@ -11,8 +11,8 @@
class mb60553_zooming_tilemap_device : public device_t
{
public:
- static void static_set_gfxdecode_tag(device_t &device, const char *tag);
- static void set_gfx_region(device_t &device, int gfxregion);
+ void set_gfxdecode_tag(const char *tag);
+ void set_gfx_region(int gfxregion);
mb60553_zooming_tilemap_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
@@ -60,9 +60,9 @@ DECLARE_DEVICE_TYPE(MB60553, mb60553_zooming_tilemap_device)
#define MCFG_MB60553_GFX_REGION(_region) \
- mb60553_zooming_tilemap_device::set_gfx_region(*device, _region);
+ downcast<mb60553_zooming_tilemap_device &>(*device).set_gfx_region(_region);
#define MCFG_MB60553_GFXDECODE(_gfxtag) \
- mb60553_zooming_tilemap_device::static_set_gfxdecode_tag(*device, "^" _gfxtag);
+ downcast<mb60553_zooming_tilemap_device &>(*device).set_gfxdecode_tag("^" _gfxtag);
#endif // MAME_VIDEO_MB60533_H
diff --git a/src/mame/video/ms1_tmap.cpp b/src/mame/video/ms1_tmap.cpp
index 389182501f9..ad5034765ca 100644
--- a/src/mame/video/ms1_tmap.cpp
+++ b/src/mame/video/ms1_tmap.cpp
@@ -56,24 +56,24 @@ megasys1_tilemap_device::megasys1_tilemap_device(const machine_config &mconfig,
{
}
-void megasys1_tilemap_device::static_set_8x8_scroll_factor(device_t &device, int scroll_factor)
+void megasys1_tilemap_device::set_8x8_scroll_factor(int scroll_factor)
{
- downcast<megasys1_tilemap_device &>(device).m_8x8_scroll_factor = scroll_factor;
+ m_8x8_scroll_factor = scroll_factor;
}
-void megasys1_tilemap_device::static_set_16x16_scroll_factor(device_t &device, int scroll_factor)
+void megasys1_tilemap_device::set_16x16_scroll_factor(int scroll_factor)
{
- downcast<megasys1_tilemap_device &>(device).m_16x16_scroll_factor = scroll_factor;
+ m_16x16_scroll_factor = scroll_factor;
}
-void megasys1_tilemap_device::static_set_bits_per_color_code(device_t &device, int bits)
+void megasys1_tilemap_device::set_bits_per_color_code(int bits)
{
- downcast<megasys1_tilemap_device &>(device).m_bits_per_color_code = bits;
+ m_bits_per_color_code = bits;
}
-void megasys1_tilemap_device::static_set_colorbase(device_t &device, uint16_t colorbase)
+void megasys1_tilemap_device::set_colorbase(uint16_t colorbase)
{
- downcast<megasys1_tilemap_device &>(device).m_colorbase = colorbase;
+ m_colorbase = colorbase;
}
diff --git a/src/mame/video/ms1_tmap.h b/src/mame/video/ms1_tmap.h
index 4bf19756931..75331ab4062 100644
--- a/src/mame/video/ms1_tmap.h
+++ b/src/mame/video/ms1_tmap.h
@@ -24,16 +24,16 @@
MCFG_MEGASYS1_TILEMAP_COLORBASE(colorbase)
#define MCFG_MEGASYS1_TILEMAP_8X8_SCROLL_FACTOR(scroll_factor) \
- megasys1_tilemap_device::static_set_8x8_scroll_factor(*device, scroll_factor);
+ downcast<megasys1_tilemap_device &>(*device).set_8x8_scroll_factor(scroll_factor);
#define MCFG_MEGASYS1_TILEMAP_16X16_SCROLL_FACTOR(scroll_factor) \
- megasys1_tilemap_device::static_set_16x16_scroll_factor(*device, scroll_factor);
+ downcast<megasys1_tilemap_device &>(*device).set_16x16_scroll_factor(scroll_factor);
#define MCFG_MEGASYS1_TILEMAP_BITS_PER_COLOR_CODE(bits) \
- megasys1_tilemap_device::static_set_bits_per_color_code(*device, bits);
+ downcast<megasys1_tilemap_device &>(*device).set_bits_per_color_code(bits);
#define MCFG_MEGASYS1_TILEMAP_COLORBASE(colorbase) \
- megasys1_tilemap_device::static_set_colorbase(*device, colorbase);
+ downcast<megasys1_tilemap_device &>(*device).set_colorbase(colorbase);
//**************************************************************************
// TYPE DEFINITIONS
@@ -47,11 +47,11 @@ public:
// construction/destruction
megasys1_tilemap_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
- // static configuration
- static void static_set_8x8_scroll_factor(device_t &device, int scroll_factor);
- static void static_set_16x16_scroll_factor(device_t &device, int scroll_factor);
- static void static_set_bits_per_color_code(device_t &device, int bits);
- static void static_set_colorbase(device_t &device, uint16_t colorbase);
+ // configuration
+ void set_8x8_scroll_factor(int scroll_factor);
+ void set_16x16_scroll_factor(int scroll_factor);
+ void set_bits_per_color_code(int bits);
+ void set_colorbase(uint16_t colorbase);
// memory handlers
DECLARE_WRITE16_MEMBER(write);
diff --git a/src/mame/video/nick.h b/src/mame/video/nick.h
index 57e6862da98..d3fd53bf110 100644
--- a/src/mame/video/nick.h
+++ b/src/mame/video/nick.h
@@ -33,7 +33,7 @@
#define MCFG_NICK_VIRQ_CALLBACK(_write) \
- devcb = &nick_device::set_virq_wr_callback(*device, DEVCB_##_write);
+ devcb = &downcast<nick_device &>(*device).set_virq_wr_callback(DEVCB_##_write);
/* there are 64us per line, although in reality
@@ -75,7 +75,7 @@ public:
// construction/destruction
nick_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
- template<class _Object> static devcb_base &set_virq_wr_callback(device_t &device, _Object object) { return downcast<nick_device &>(device).m_write_virq.set_callback(object); }
+ template<class _Object> devcb_base &set_virq_wr_callback(_Object object) { return m_write_virq.set_callback(object); }
virtual void vram_map(address_map &map);
virtual void vio_map(address_map &map);
diff --git a/src/mame/video/pc080sn.cpp b/src/mame/video/pc080sn.cpp
index f277554f771..800be22ed24 100644
--- a/src/mame/video/pc080sn.cpp
+++ b/src/mame/video/pc080sn.cpp
@@ -74,13 +74,13 @@ pc080sn_device::pc080sn_device(const machine_config &mconfig, const char *tag, d
}
//-------------------------------------------------
-// static_set_gfxdecode_tag: Set the tag of the
+// set_gfxdecode_tag: Set the tag of the
// gfx decoder
//-------------------------------------------------
-void pc080sn_device::static_set_gfxdecode_tag(device_t &device, const char *tag)
+void pc080sn_device::set_gfxdecode_tag(const char *tag)
{
- downcast<pc080sn_device &>(device).m_gfxdecode.set_tag(tag);
+ m_gfxdecode.set_tag(tag);
}
//-------------------------------------------------
diff --git a/src/mame/video/pc080sn.h b/src/mame/video/pc080sn.h
index a108b45ffbb..28379eb62d0 100644
--- a/src/mame/video/pc080sn.h
+++ b/src/mame/video/pc080sn.h
@@ -10,16 +10,15 @@ class pc080sn_device : public device_t
public:
pc080sn_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
- // static configuration
- static void static_set_gfxdecode_tag(device_t &device, const char *tag);
- static void set_gfx_region(device_t &device, int gfxregion) { downcast<pc080sn_device &>(device).m_gfxnum = gfxregion; }
- static void set_yinvert(device_t &device, int y_inv) { downcast<pc080sn_device &>(device).m_y_invert = y_inv; }
- static void set_dblwidth(device_t &device, int dblwidth) { downcast<pc080sn_device &>(device).m_dblwidth = dblwidth; }
- static void set_offsets(device_t &device, int x_offset, int y_offset)
+ // configuration
+ void set_gfxdecode_tag(const char *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; }
+ void set_offsets(int x_offset, int y_offset)
{
- pc080sn_device &dev = downcast<pc080sn_device &>(device);
- dev.m_x_offset = x_offset;
- dev.m_y_offset = y_offset;
+ m_x_offset = x_offset;
+ m_y_offset = y_offset;
}
DECLARE_READ16_MEMBER( word_r );
@@ -74,18 +73,18 @@ DECLARE_DEVICE_TYPE(PC080SN, pc080sn_device)
#define MCFG_PC080SN_GFX_REGION(_region) \
- pc080sn_device::set_gfx_region(*device, _region);
+ downcast<pc080sn_device &>(*device).set_gfx_region(_region);
#define MCFG_PC080SN_OFFSETS(_xoffs, _yoffs) \
- pc080sn_device::set_offsets(*device, _xoffs, _yoffs);
+ downcast<pc080sn_device &>(*device).set_offsets(_xoffs, _yoffs);
#define MCFG_PC080SN_YINVERT(_yinv) \
- pc080sn_device::set_yinvert(*device, _yinv);
+ downcast<pc080sn_device &>(*device).set_yinvert(_yinv);
#define MCFG_PC080SN_DBLWIDTH(_dbl) \
- pc080sn_device::set_dblwidth(*device, _dbl);
+ downcast<pc080sn_device &>(*device).set_dblwidth(_dbl);
#define MCFG_PC080SN_GFXDECODE(_gfxtag) \
- pc080sn_device::static_set_gfxdecode_tag(*device, "^" _gfxtag);
+ downcast<pc080sn_device &>(*device).set_gfxdecode_tag("^" _gfxtag);
#endif // MAME_VIDEO_PC080SN_H
diff --git a/src/mame/video/pc090oj.cpp b/src/mame/video/pc090oj.cpp
index 59988bdd08a..a1c86229bf6 100644
--- a/src/mame/video/pc090oj.cpp
+++ b/src/mame/video/pc090oj.cpp
@@ -90,23 +90,23 @@ pc090oj_device::pc090oj_device(const machine_config &mconfig, const char *tag, d
}
//-------------------------------------------------
-// static_set_gfxdecode_tag: Set the tag of the
+// set_gfxdecode_tag: Set the tag of the
// gfx decoder
//-------------------------------------------------
-void pc090oj_device::static_set_gfxdecode_tag(device_t &device, const char *tag)
+void pc090oj_device::set_gfxdecode_tag(const char *tag)
{
- downcast<pc090oj_device &>(device).m_gfxdecode.set_tag(tag);
+ m_gfxdecode.set_tag(tag);
}
//-------------------------------------------------
-// static_set_palette_tag: Set the tag of the
+// set_palette_tag: Set the tag of the
// palette device
//-------------------------------------------------
-void pc090oj_device::static_set_palette_tag(device_t &device, const char *tag)
+void pc090oj_device::set_palette_tag(const char *tag)
{
- downcast<pc090oj_device &>(device).m_palette.set_tag(tag);
+ m_palette.set_tag(tag);
}
//-------------------------------------------------
diff --git a/src/mame/video/pc090oj.h b/src/mame/video/pc090oj.h
index 85a1ee7e904..271aca88436 100644
--- a/src/mame/video/pc090oj.h
+++ b/src/mame/video/pc090oj.h
@@ -10,16 +10,15 @@ class pc090oj_device : public device_t
public:
pc090oj_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
- // static configuration
- static void static_set_gfxdecode_tag(device_t &device, const char *tag);
- static void static_set_palette_tag(device_t &device, const char *tag);
- static void set_gfx_region(device_t &device, int gfxregion) { downcast<pc090oj_device &>(device).m_gfxnum = gfxregion; }
- static void set_usebuffer(device_t &device, int use_buf) { downcast<pc090oj_device &>(device).m_use_buffer = use_buf; }
- static void set_offsets(device_t &device, int x_offset, int y_offset)
+ // configuration
+ void set_gfxdecode_tag(const char *tag);
+ void set_palette_tag(const char *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)
{
- pc090oj_device &dev = downcast<pc090oj_device &>(device);
- dev.m_x_offset = x_offset;
- dev.m_y_offset = y_offset;
+ m_x_offset = x_offset;
+ m_y_offset = y_offset;
}
DECLARE_READ16_MEMBER( word_r );
@@ -63,18 +62,18 @@ DECLARE_DEVICE_TYPE(PC090OJ, pc090oj_device)
#define MCFG_PC090OJ_GFX_REGION(_region) \
- pc090oj_device::set_gfx_region(*device, _region);
+ downcast<pc090oj_device &>(*device).set_gfx_region(_region);
#define MCFG_PC090OJ_OFFSETS(_xoffs, _yoffs) \
- pc090oj_device::set_offsets(*device, _xoffs, _yoffs);
+ downcast<pc090oj_device &>(*device).set_offsets(_xoffs, _yoffs);
#define MCFG_PC090OJ_USEBUFFER(_use_buf) \
- pc090oj_device::set_usebuffer(*device, _use_buf);
+ downcast<pc090oj_device &>(*device).set_usebuffer(_use_buf);
#define MCFG_PC090OJ_GFXDECODE(_gfxtag) \
- pc090oj_device::static_set_gfxdecode_tag(*device, "^" _gfxtag);
+ downcast<pc090oj_device &>(*device).set_gfxdecode_tag("^" _gfxtag);
#define MCFG_PC090OJ_PALETTE(_palette_tag) \
- pc090oj_device::static_set_palette_tag(*device, "^" _palette_tag);
+ downcast<pc090oj_device &>(*device).set_palette_tag("^" _palette_tag);
#endif // MAME_VIDEO_PC090)J_H
diff --git a/src/mame/video/pcd.h b/src/mame/video/pcd.h
index f89ad3ba3ad..1e057bd169c 100644
--- a/src/mame/video/pcd.h
+++ b/src/mame/video/pcd.h
@@ -11,7 +11,7 @@
#include "video/scn2674.h"
#define MCFG_PCX_VIDEO_TXD_HANDLER(_devcb) \
- devcb = &pcx_video_device::set_txd_handler(*device, DEVCB_##_devcb);
+ devcb = &downcast<pcx_video_device &>(*device).set_txd_handler(DEVCB_##_devcb);
class pcdx_video_device : public device_t, public device_gfx_interface
{
@@ -82,7 +82,7 @@ class pcx_video_device : public pcdx_video_device,
{
public:
pcx_video_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
- template <class Object> static devcb_base &set_txd_handler(device_t &device, Object &&cb) { return downcast<pcx_video_device &>(device).m_txd_handler.set_callback(std::forward<Object>(cb)); }
+ template <class Object> devcb_base &set_txd_handler(Object &&cb) { return m_txd_handler.set_callback(std::forward<Object>(cb)); }
virtual void map(address_map &map) override;
DECLARE_READ8_MEMBER(term_r);
diff --git a/src/mame/video/sega16sp.cpp b/src/mame/video/sega16sp.cpp
index e5609298baf..970f1a40b90 100644
--- a/src/mame/video/sega16sp.cpp
+++ b/src/mame/video/sega16sp.cpp
@@ -656,21 +656,20 @@ bootleg_sys16a_sprite_device::bootleg_sys16a_sprite_device(const machine_config
//-------------------------------------------------
-// static_set_remap -- configure sprite address
+// set_remap -- configure sprite address
// remapping
//-------------------------------------------------
-void bootleg_sys16a_sprite_device::static_set_remap(device_t &device, uint8_t offs0, uint8_t offs1, uint8_t offs2, uint8_t offs3, uint8_t offs4, uint8_t offs5, uint8_t offs6, uint8_t offs7)
+void bootleg_sys16a_sprite_device::set_remap(uint8_t offs0, uint8_t offs1, uint8_t offs2, uint8_t offs3, uint8_t offs4, uint8_t offs5, uint8_t offs6, uint8_t offs7)
{
- bootleg_sys16a_sprite_device &target = downcast<bootleg_sys16a_sprite_device &>(device);
- target.m_addrmap[0] = offs0;
- target.m_addrmap[1] = offs1;
- target.m_addrmap[2] = offs2;
- target.m_addrmap[3] = offs3;
- target.m_addrmap[4] = offs4;
- target.m_addrmap[5] = offs5;
- target.m_addrmap[6] = offs6;
- target.m_addrmap[7] = offs7;
+ m_addrmap[0] = offs0;
+ m_addrmap[1] = offs1;
+ m_addrmap[2] = offs2;
+ m_addrmap[3] = offs3;
+ m_addrmap[4] = offs4;
+ m_addrmap[5] = offs5;
+ m_addrmap[6] = offs6;
+ m_addrmap[7] = offs7;
}
diff --git a/src/mame/video/sega16sp.h b/src/mame/video/sega16sp.h
index 87d3e4e7483..ec65e940e2d 100644
--- a/src/mame/video/sega16sp.h
+++ b/src/mame/video/sega16sp.h
@@ -37,21 +37,21 @@
#define MCFG_BOOTLEG_SYS16A_SPRITES_ADD(_tag) \
MCFG_DEVICE_ADD(_tag, BOOTLEG_SYS16A_SPRITES, 0)
#define MCFG_BOOTLEG_SYS16A_SPRITES_REMAP(_0,_1,_2,_3,_4,_5,_6,_7) \
- bootleg_sys16a_sprite_device::static_set_remap(*device, _0,_1,_2,_3,_4,_5,_6,_7);
+ downcast<bootleg_sys16a_sprite_device &>(*device).set_remap(_0,_1,_2,_3,_4,_5,_6,_7);
#define MCFG_BOOTLEG_SYS16A_SPRITES_XORIGIN(_xorigin) \
- bootleg_sys16a_sprite_device::set_local_originx(*device, _xorigin);
+ downcast<bootleg_sys16a_sprite_device &>(*device).set_local_originx(_xorigin);
#define MCFG_BOOTLEG_SYS16A_SPRITES_YORIGIN(_yorigin) \
- bootleg_sys16a_sprite_device::set_local_originy(*device, _yorigin);
+ downcast<bootleg_sys16a_sprite_device &>(*device).set_local_originy(_yorigin);
#define MCFG_BOOTLEG_SYS16B_SPRITES_ADD(_tag) \
MCFG_DEVICE_ADD(_tag, SEGA_SYS16B_SPRITES, 0)
#define MCFG_BOOTLEG_SYS16B_SPRITES_XORIGIN(_xorigin) \
- sega_sys16b_sprite_device::set_local_originx(*device, _xorigin);
+ downcast<sega_16bit_sprite_device &>(*device).set_local_originx(_xorigin);
#define MCFG_BOOTLEG_SYS16B_SPRITES_YORIGIN(_yorigin) \
- sega_sys16b_sprite_device::set_local_originy(*device, _yorigin);
+ downcast<sega_16bit_sprite_device &>(*device).set_local_originy(_yorigin);
@@ -91,16 +91,14 @@ public:
void set_local_originx_(int x) { m_xoffs_flipped = m_xoffs = x; set_origin(x, m_yoffs); }
void set_local_originy_(int y) { m_yoffs_flipped = m_yoffs = y; set_origin(m_xoffs, y); }
- static void set_local_originx(device_t &device, int x)
+ void set_local_originx(int x)
{
- sega_16bit_sprite_device &dev = downcast<sega_16bit_sprite_device &>(device);
- dev.set_local_originx_(x);
+ set_local_originx_(x);
};
- static void set_local_originy(device_t &device, int y)
+ void set_local_originy(int y)
{
- sega_16bit_sprite_device &dev = downcast<sega_16bit_sprite_device &>(device);
- dev.set_local_originy_(y);
+ set_local_originy_(y);
};
// write trigger memory handler
@@ -206,7 +204,7 @@ public:
bootleg_sys16a_sprite_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
// configuration
- static void static_set_remap(device_t &device, uint8_t offs0, uint8_t offs1, uint8_t offs2, uint8_t offs3, uint8_t offs4, uint8_t offs5, uint8_t offs6, uint8_t offs7);
+ void set_remap(uint8_t offs0, uint8_t offs1, uint8_t offs2, uint8_t offs3, uint8_t offs4, uint8_t offs5, uint8_t offs6, uint8_t offs7);
protected:
// subclass overrides
diff --git a/src/mame/video/segaic16.cpp b/src/mame/video/segaic16.cpp
index f706c6f2d84..b80c90f981f 100644
--- a/src/mame/video/segaic16.cpp
+++ b/src/mame/video/segaic16.cpp
@@ -389,21 +389,20 @@ segaic16_video_device::segaic16_video_device(const machine_config &mconfig, cons
m_pagelatch_cb = segaic16_video_pagelatch_delegate(FUNC(segaic16_video_device::tilemap_16b_fill_latch), this);
}
-void segaic16_video_device::set_pagelatch_cb(device_t &device,segaic16_video_pagelatch_delegate newtilecb)
+void segaic16_video_device::set_pagelatch_cb(segaic16_video_pagelatch_delegate newtilecb)
{
- segaic16_video_device &dev = downcast<segaic16_video_device &>(device);
- dev.m_pagelatch_cb = newtilecb;
+ m_pagelatch_cb = newtilecb;
}
//-------------------------------------------------
-// static_set_gfxdecode_tag: Set the tag of the
+// set_gfxdecode_tag: Set the tag of the
// gfx decoder
//-------------------------------------------------
-void segaic16_video_device::static_set_gfxdecode_tag(device_t &device, const char *tag)
+void segaic16_video_device::set_gfxdecode_tag(const char *tag)
{
- downcast<segaic16_video_device &>(device).m_gfxdecode.set_tag(tag);
+ m_gfxdecode.set_tag(tag);
}
diff --git a/src/mame/video/segaic16.h b/src/mame/video/segaic16.h
index 15554d3f3b5..2dc319482e7 100644
--- a/src/mame/video/segaic16.h
+++ b/src/mame/video/segaic16.h
@@ -13,7 +13,7 @@
typedef device_delegate<void (int, uint16_t*, uint16_t*, uint16_t*, uint16_t*)> segaic16_video_pagelatch_delegate;
#define MCFG_SEGAIC16_VIDEO_SET_PAGELATCH_CB( _class, _method) \
- segaic16_video_device::set_pagelatch_cb(*device, segaic16_video_pagelatch_delegate(&_class::_method, #_class "::" #_method, nullptr, (_class *)nullptr));
+ downcast<segaic16_video_device &>(*device).set_pagelatch_cb(segaic16_video_pagelatch_delegate(&_class::_method, #_class "::" #_method, nullptr, (_class *)nullptr));
/*************************************
@@ -101,9 +101,9 @@ public:
segaic16_video_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
- // static configuration
- static void static_set_gfxdecode_tag(device_t &device, const char *tag);
- static void set_pagelatch_cb(device_t &device,segaic16_video_pagelatch_delegate newtilecb);
+ // configuration
+ void set_gfxdecode_tag(const char *tag);
+ void set_pagelatch_cb(segaic16_video_pagelatch_delegate newtilecb);
uint8_t m_display_enable;
optional_shared_ptr<uint16_t> m_tileram;
@@ -165,6 +165,6 @@ DECLARE_DEVICE_TYPE(SEGAIC16VID, segaic16_video_device)
MCFG_DEVICE_ADD(_tag, SEGAIC16VID, 0)
#define MCFG_SEGAIC16VID_GFXDECODE(_gfxtag) \
- segaic16_video_device::static_set_gfxdecode_tag(*device, "^" _gfxtag);
+ downcast<segaic16_video_device &>(*device).set_gfxdecode_tag("^" _gfxtag);
#endif // MAME_VIDEO_SEGAIC16_H
diff --git a/src/mame/video/segaic24.cpp b/src/mame/video/segaic24.cpp
index a601d907757..c41c0f182fe 100644
--- a/src/mame/video/segaic24.cpp
+++ b/src/mame/video/segaic24.cpp
@@ -32,10 +32,9 @@ segas24_tile_device::segas24_tile_device(const machine_config &mconfig, const ch
}
-void segas24_tile_device::static_set_tile_mask(device_t &device, uint16_t _tile_mask)
+void segas24_tile_device::set_tile_mask(uint16_t _tile_mask)
{
- segas24_tile_device &dev = downcast<segas24_tile_device &>(device);
- dev.tile_mask = _tile_mask;
+ tile_mask = _tile_mask;
}
const gfx_layout segas24_tile_device::char_layout = {
diff --git a/src/mame/video/segaic24.h b/src/mame/video/segaic24.h
index babfc21cc8c..e62c4db5272 100644
--- a/src/mame/video/segaic24.h
+++ b/src/mame/video/segaic24.h
@@ -12,7 +12,7 @@
#define MCFG_S24TILE_DEVICE_ADD(_tag, tile_mask) \
MCFG_DEVICE_ADD(_tag, S24TILE, 0) \
- segas24_tile_device::static_set_tile_mask(*device, tile_mask);
+ downcast<segas24_tile_device &>(*device).set_tile_mask(tile_mask);
#define MCFG_S24SPRITE_DEVICE_ADD(_tag) \
MCFG_DEVICE_ADD(_tag, S24SPRITE, 0)
@@ -31,8 +31,8 @@ class segas24_tile_device : public device_t, public device_gfx_interface
public:
segas24_tile_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
- // static configuration
- static void static_set_tile_mask(device_t &device, uint16_t tile_mask);
+ // configuration
+ void set_tile_mask(uint16_t tile_mask);
DECLARE_READ16_MEMBER(tile_r);
DECLARE_WRITE16_MEMBER(tile_w);
diff --git a/src/mame/video/seibu_crtc.h b/src/mame/video/seibu_crtc.h
index 13e9b25391b..30818aa5a6f 100644
--- a/src/mame/video/seibu_crtc.h
+++ b/src/mame/video/seibu_crtc.h
@@ -17,19 +17,19 @@
//**************************************************************************
#define MCFG_SEIBU_CRTC_DECRYPT_KEY_CB(_devcb) \
- devcb = &seibu_crtc_device::set_decrypt_key_callback(*device, DEVCB_##_devcb);
+ devcb = &downcast<seibu_crtc_device &>(*device).set_decrypt_key_callback(DEVCB_##_devcb);
#define MCFG_SEIBU_CRTC_LAYER_EN_CB(_devcb) \
- devcb = &seibu_crtc_device::set_layer_en_callback(*device, DEVCB_##_devcb);
+ devcb = &downcast<seibu_crtc_device &>(*device).set_layer_en_callback(DEVCB_##_devcb);
#define MCFG_SEIBU_CRTC_LAYER_SCROLL_CB(_devcb) \
- devcb = &seibu_crtc_device::set_layer_scroll_callback(*device, DEVCB_##_devcb);
+ devcb = &downcast<seibu_crtc_device &>(*device).set_layer_scroll_callback(DEVCB_##_devcb);
#define MCFG_SEIBU_CRTC_LAYER_SCROLL_BASE_CB(_devcb) \
- devcb = &seibu_crtc_device::set_layer_scroll_base_callback(*device, DEVCB_##_devcb);
+ devcb = &downcast<seibu_crtc_device &>(*device).set_layer_scroll_base_callback(DEVCB_##_devcb);
#define MCFG_SEIBU_CRTC_REG_1A_CB(_devcb) \
- devcb = &seibu_crtc_device::set_reg_1a_callback(*device, DEVCB_##_devcb);
+ devcb = &downcast<seibu_crtc_device &>(*device).set_reg_1a_callback(DEVCB_##_devcb);
//**************************************************************************
@@ -46,11 +46,11 @@ public:
// construction/destruction
seibu_crtc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
- template <class Object> static devcb_base &set_decrypt_key_callback(device_t &device, Object &&cb) { return downcast<seibu_crtc_device &>(device).m_decrypt_key_cb.set_callback(std::forward<Object>(cb)); }
- template <class Object> static devcb_base &set_layer_en_callback(device_t &device, Object &&cb) { return downcast<seibu_crtc_device &>(device).m_layer_en_cb.set_callback(std::forward<Object>(cb)); }
- template <class Object> static devcb_base &set_layer_scroll_callback(device_t &device, Object &&cb) { return downcast<seibu_crtc_device &>(device).m_layer_scroll_cb.set_callback(std::forward<Object>(cb)); }
- template <class Object> static devcb_base &set_reg_1a_callback(device_t &device, Object &&cb) { return downcast<seibu_crtc_device &>(device).m_reg_1a_cb.set_callback(std::forward<Object>(cb)); }
- template <class Object> static devcb_base &set_layer_scroll_base_callback(device_t &device, Object &&cb) { return downcast<seibu_crtc_device &>(device).m_layer_scroll_base_cb.set_callback(std::forward<Object>(cb)); }
+ template <class Object> devcb_base &set_decrypt_key_callback(Object &&cb) { return m_decrypt_key_cb.set_callback(std::forward<Object>(cb)); }
+ template <class Object> devcb_base &set_layer_en_callback(Object &&cb) { return m_layer_en_cb.set_callback(std::forward<Object>(cb)); }
+ template <class Object> devcb_base &set_layer_scroll_callback(Object &&cb) { return m_layer_scroll_cb.set_callback(std::forward<Object>(cb)); }
+ template <class Object> devcb_base &set_reg_1a_callback(Object &&cb) { return m_reg_1a_cb.set_callback(std::forward<Object>(cb)); }
+ template <class Object> devcb_base &set_layer_scroll_base_callback(Object &&cb) { return m_layer_scroll_base_cb.set_callback(std::forward<Object>(cb)); }
// I/O operations
DECLARE_WRITE16_MEMBER( write );
diff --git a/src/mame/video/seta001.cpp b/src/mame/video/seta001.cpp
index 67ead040f9b..320d73d70af 100644
--- a/src/mame/video/seta001.cpp
+++ b/src/mame/video/seta001.cpp
@@ -39,13 +39,13 @@ seta001_device::seta001_device(const machine_config &mconfig, const char *tag, d
}
//-------------------------------------------------
-// static_set_gfxdecode_tag: Set the tag of the
+// set_gfxdecode_tag: Set the tag of the
// gfx decoder
//-------------------------------------------------
-void seta001_device::static_set_gfxdecode_tag(device_t &device, const char *tag)
+void seta001_device::set_gfxdecode_tag(const char *tag)
{
- downcast<seta001_device &>(device).m_gfxdecode.set_tag(tag);
+ m_gfxdecode.set_tag(tag);
}
void seta001_device::device_start()
diff --git a/src/mame/video/seta001.h b/src/mame/video/seta001.h
index 38045a0b32a..804e027587e 100644
--- a/src/mame/video/seta001.h
+++ b/src/mame/video/seta001.h
@@ -10,16 +10,16 @@ typedef device_delegate<int (uint16_t code, uint8_t color)> 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) \
- seta001_device::set_gfxbank_callback(*device, gfxbank_cb_delegate(&_class::_method, #_class "::" #_method, this));
+ downcast<seta001_device &>(*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);
- // static configuration
- static void static_set_gfxdecode_tag(device_t &device, const char *tag);
- static void set_gfxbank_callback(device_t &device, gfxbank_cb_delegate callback) { downcast<seta001_device &>(device).m_gfxbank_cb = callback; }
+ // configuration
+ void set_gfxdecode_tag(const char *tag);
+ void set_gfxbank_callback(gfxbank_cb_delegate callback) { m_gfxbank_cb = callback; }
DECLARE_WRITE8_MEMBER( spritebgflag_w8 );
@@ -89,6 +89,6 @@ private:
DECLARE_DEVICE_TYPE(SETA001_SPRITE, seta001_device)
#define MCFG_SETA001_SPRITE_GFXDECODE(_gfxtag) \
- seta001_device::static_set_gfxdecode_tag(*device, "^" _gfxtag);
+ downcast<seta001_device &>(*device).set_gfxdecode_tag("^" _gfxtag);
#endif // MAME_VIDEO_SETA001_H
diff --git a/src/mame/video/snk68_spr.cpp b/src/mame/video/snk68_spr.cpp
index 6ce6e8c5761..d7521cf5171 100644
--- a/src/mame/video/snk68_spr.cpp
+++ b/src/mame/video/snk68_spr.cpp
@@ -24,26 +24,23 @@ void snk68_spr_device::tile_callback_noindirect(int &tile, int& fx, int& fy, int
//-------------------------------------------------
-// static_set_gfxdecode_tag: Set the tag of the
+// set_gfxdecode_tag: Set the tag of the
// gfx decoder
//-------------------------------------------------
-void snk68_spr_device::static_set_gfxdecode_tag(device_t &device, const char *tag)
+void snk68_spr_device::set_gfxdecode_tag(const char *tag)
{
- downcast<snk68_spr_device &>(device).m_gfxdecode.set_tag(tag);
+ m_gfxdecode.set_tag(tag);
}
-// static
-void snk68_spr_device::set_tile_indirect_cb(device_t &device,snk68_tile_indirection_delegate newtilecb)
+void snk68_spr_device::set_tile_indirect_cb(snk68_tile_indirection_delegate newtilecb)
{
- snk68_spr_device &dev = downcast<snk68_spr_device &>(device);
- dev.m_newtilecb = newtilecb;
+ m_newtilecb = newtilecb;
}
-void snk68_spr_device::static_set_no_partial(device_t &device)
+void snk68_spr_device::set_no_partial()
{
- snk68_spr_device &dev = downcast<snk68_spr_device &>(device);
- dev.m_partialupdates = 0;
+ m_partialupdates = 0;
}
void snk68_spr_device::device_start()
diff --git a/src/mame/video/snk68_spr.h b/src/mame/video/snk68_spr.h
index d7c9433b811..b60066c1b97 100644
--- a/src/mame/video/snk68_spr.h
+++ b/src/mame/video/snk68_spr.h
@@ -10,11 +10,11 @@
typedef device_delegate<void (int&, int&, int&, int&)> snk68_tile_indirection_delegate;
#define MCFG_SNK68_SPR_GFXDECODE(_gfxtag) \
- snk68_spr_device::static_set_gfxdecode_tag(*device, "^" _gfxtag);
+ downcast<snk68_spr_device &>(*device).set_gfxdecode_tag("^" _gfxtag);
#define MCFG_SNK68_SPR_SET_TILE_INDIRECT( _class, _method) \
- snk68_spr_device::set_tile_indirect_cb(*device, snk68_tile_indirection_delegate(&_class::_method, #_class "::" #_method, nullptr, (_class *)nullptr));
+ downcast<snk68_spr_device &>(*device).set_tile_indirect_cb(snk68_tile_indirection_delegate(&_class::_method, #_class "::" #_method, nullptr, (_class *)nullptr));
#define MCFG_SNK68_SPR_NO_PARTIAL \
- snk68_spr_device::static_set_no_partial(*device);
+ downcast<snk68_spr_device &>(*device).set_no_partial();
class snk68_spr_device : public device_t
@@ -23,9 +23,9 @@ public:
snk68_spr_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
// static configuration
- static void static_set_gfxdecode_tag(device_t &device, const char *tag);
- static void set_tile_indirect_cb(device_t &device,snk68_tile_indirection_delegate newtilecb);
- static void static_set_no_partial(device_t &device);
+ void set_gfxdecode_tag(const char *tag);
+ void set_tile_indirect_cb(snk68_tile_indirection_delegate newtilecb);
+ void set_no_partial();
DECLARE_READ16_MEMBER(spriteram_r);
DECLARE_WRITE16_MEMBER(spriteram_w);
diff --git a/src/mame/video/st0020.cpp b/src/mame/video/st0020.cpp
index f9879f6a467..93b4df4da78 100644
--- a/src/mame/video/st0020.cpp
+++ b/src/mame/video/st0020.cpp
@@ -36,14 +36,14 @@ st0020_device::st0020_device(const machine_config &mconfig, const char *tag, dev
}
-void st0020_device::static_set_is_st0032(device_t &device, int is_st0032)
+void st0020_device::set_is_st0032(int is_st0032)
{
- downcast<st0020_device &>(device).m_is_st0032 = is_st0032;
+ m_is_st0032 = is_st0032;
}
-void st0020_device::static_set_is_jclub2(device_t &device, int is_jclub2)
+void st0020_device::set_is_jclub2(int is_jclub2)
{
- downcast<st0020_device &>(device).m_is_jclub2 = is_jclub2;
+ m_is_jclub2 = is_jclub2;
}
diff --git a/src/mame/video/st0020.h b/src/mame/video/st0020.h
index 4f3a84722b4..9dccf6a3c84 100644
--- a/src/mame/video/st0020.h
+++ b/src/mame/video/st0020.h
@@ -11,9 +11,9 @@ class st0020_device : public device_t, public device_gfx_interface
public:
st0020_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
- // static configuration
- static void static_set_is_st0032(device_t &device, int is_st0032);
- static void static_set_is_jclub2(device_t &device, int is_jclub2);
+ // configuration
+ void set_is_st0032(int is_st0032);
+ void set_is_jclub2(int is_jclub2);
void update_screen(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect, bool update_visible_area);
@@ -77,4 +77,10 @@ DECLARE_DEVICE_TYPE(ST0020_SPRITES, st0020_device)
#define MCFG_ST0020_SPRITES_PALETTE(_palette_tag) \
MCFG_GFX_PALETTE(_palette_tag)
+#define MCFG_ST0020_IS_ST0032(_st0032) \
+ downcast<st0020_device &>(*device).set_is_st0032(_st0032)
+
+#define MCFG_ST0020_IS_JCLUB2(_jclub2) \
+ downcast<st0020_device &>(*device).set_is_jclub2(_jclub2)
+
#endif // MAME_VIDEO_ST0020_H
diff --git a/src/mame/video/tc0080vco.cpp b/src/mame/video/tc0080vco.cpp
index 788446f07fe..ac991fc4212 100644
--- a/src/mame/video/tc0080vco.cpp
+++ b/src/mame/video/tc0080vco.cpp
@@ -111,13 +111,13 @@ tc0080vco_device::tc0080vco_device(const machine_config &mconfig, const char *ta
}
//-------------------------------------------------
-// static_set_gfxdecode_tag: Set the tag of the
+// set_gfxdecode_tag: Set the tag of the
// gfx decoder
//-------------------------------------------------
-void tc0080vco_device::static_set_gfxdecode_tag(device_t &device, const char *tag)
+void tc0080vco_device::set_gfxdecode_tag(const char *tag)
{
- downcast<tc0080vco_device &>(device).m_gfxdecode.set_tag(tag);
+ m_gfxdecode.set_tag(tag);
}
//-------------------------------------------------
diff --git a/src/mame/video/tc0080vco.h b/src/mame/video/tc0080vco.h
index 0d998666706..344d26010e6 100644
--- a/src/mame/video/tc0080vco.h
+++ b/src/mame/video/tc0080vco.h
@@ -10,17 +10,16 @@ class tc0080vco_device : public device_t
public:
tc0080vco_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
- // static configuration
- static void static_set_gfxdecode_tag(device_t &device, const char *tag);
- static void set_gfx_region(device_t &device, int gfxnum) { downcast<tc0080vco_device &>(device).m_gfxnum = gfxnum; }
- static void set_tx_region(device_t &device, int txnum) { downcast<tc0080vco_device &>(device).m_txnum = txnum; }
- static void set_offsets(device_t &device, int x_offset, int y_offset)
+ // configuration
+ void set_gfxdecode_tag(const char *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)
{
- tc0080vco_device &dev = downcast<tc0080vco_device &>(device);
- dev.m_bg_xoffs = x_offset;
- dev.m_bg_yoffs = y_offset;
+ m_bg_xoffs = x_offset;
+ m_bg_yoffs = y_offset;
}
- static void set_bgflip_yoffs(device_t &device, int offs) { downcast<tc0080vco_device &>(device).m_bg_flip_yoffs = offs; }
+ void set_bgflip_yoffs(int offs) { m_bg_flip_yoffs = offs; }
DECLARE_READ16_MEMBER( word_r );
DECLARE_WRITE16_MEMBER( word_w );
@@ -86,18 +85,18 @@ private:
DECLARE_DEVICE_TYPE(TC0080VCO, tc0080vco_device)
#define MCFG_TC0080VCO_GFX_REGION(_region) \
- tc0080vco_device::set_gfx_region(*device, _region);
+ downcast<tc0080vco_device &>(*device).set_gfx_region(_region);
#define MCFG_TC0080VCO_TX_REGION(_region) \
- tc0080vco_device::set_tx_region(*device, _region);
+ downcast<tc0080vco_device &>(*device).set_tx_region(_region);
#define MCFG_TC0080VCO_OFFSETS(_xoffs, _yoffs) \
- tc0080vco_device::set_offsets(*device, _xoffs, _yoffs);
+ downcast<tc0080vco_device &>(*device).set_offsets(_xoffs, _yoffs);
#define MCFG_TC0080VCO_BGFLIP_OFFS(_offs) \
- tc0080vco_device::set_bgflip_yoffs(*device, _offs);
+ downcast<tc0080vco_device &>(*device).set_bgflip_yoffs(_offs);
#define MCFG_TC0080VCO_GFXDECODE(_gfxtag) \
- tc0080vco_device::static_set_gfxdecode_tag(*device, "^" _gfxtag);
+ downcast<tc0080vco_device &>(*device).set_gfxdecode_tag("^" _gfxtag);
#endif // MAME_VIDEO_TC0080VCO_H
diff --git a/src/mame/video/tc0100scn.cpp b/src/mame/video/tc0100scn.cpp
index f1c7ffcd30d..12c3373454d 100644
--- a/src/mame/video/tc0100scn.cpp
+++ b/src/mame/video/tc0100scn.cpp
@@ -185,23 +185,23 @@ tc0100scn_device::tc0100scn_device(const machine_config &mconfig, const char *ta
}
//-------------------------------------------------
-// static_set_gfxdecode_tag: Set the tag of the
+// set_gfxdecode_tag: Set the tag of the
// gfx decoder
//-------------------------------------------------
-void tc0100scn_device::static_set_gfxdecode_tag(device_t &device, const char *tag)
+void tc0100scn_device::set_gfxdecode_tag(const char *tag)
{
- downcast<tc0100scn_device &>(device).m_gfxdecode.set_tag(tag);
+ m_gfxdecode.set_tag(tag);
}
//-------------------------------------------------
-// static_set_palette_tag: Set the tag of the
+// set_palette_tag: Set the tag of the
// palette device
//-------------------------------------------------
-void tc0100scn_device::static_set_palette_tag(device_t &device, const char *tag)
+void tc0100scn_device::set_palette_tag(const char *tag)
{
- downcast<tc0100scn_device &>(device).m_palette.set_tag(tag);
+ m_palette.set_tag(tag);
}
//-------------------------------------------------
diff --git a/src/mame/video/tc0100scn.h b/src/mame/video/tc0100scn.h
index 0b98a5b1b1d..a0399a2a031 100644
--- a/src/mame/video/tc0100scn.h
+++ b/src/mame/video/tc0100scn.h
@@ -10,30 +10,27 @@ class tc0100scn_device : public device_t
public:
tc0100scn_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
- // static configuration
- static void static_set_gfxdecode_tag(device_t &device, const char *tag);
- static void static_set_palette_tag(device_t &device, const char *tag);
- static void set_gfx_region(device_t &device, int gfxregion) { downcast<tc0100scn_device &>(device).m_gfxnum = gfxregion; }
- static void set_tx_region(device_t &device, int txregion) { downcast<tc0100scn_device &>(device).m_txnum = txregion; }
- static void set_multiscr_xoffs(device_t &device, int xoffs) { downcast<tc0100scn_device &>(device).m_multiscrn_xoffs = xoffs; }
- static void set_multiscr_hack(device_t &device, int hack) { downcast<tc0100scn_device &>(device).m_multiscrn_hack = hack; }
- static void set_offsets(device_t &device, int x_offset, int y_offset)
+ // configuration
+ void set_gfxdecode_tag(const char *tag);
+ void set_palette_tag(const char *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; }
+ void set_multiscr_hack(int hack) { m_multiscrn_hack = hack; }
+ void set_offsets(int x_offset, int y_offset)
{
- tc0100scn_device &dev = downcast<tc0100scn_device &>(device);
- dev.m_x_offset = x_offset;
- dev.m_y_offset = y_offset;
+ m_x_offset = x_offset;
+ m_y_offset = y_offset;
}
- static void set_offsets_flip(device_t &device, int x_offset, int y_offset)
+ void set_offsets_flip(int x_offset, int y_offset)
{
- tc0100scn_device &dev = downcast<tc0100scn_device &>(device);
- dev.m_flip_xoffs = x_offset;
- dev.m_flip_yoffs = y_offset;
+ m_flip_xoffs = x_offset;
+ m_flip_yoffs = y_offset;
}
- static void set_offsets_fliptx(device_t &device, int x_offset, int y_offset)
+ void set_offsets_fliptx(int x_offset, int y_offset)
{
- tc0100scn_device &dev = downcast<tc0100scn_device &>(device);
- dev.m_flip_text_xoffs = x_offset;
- dev.m_flip_text_yoffs = y_offset;
+ m_flip_text_xoffs = x_offset;
+ m_flip_text_yoffs = y_offset;
}
static constexpr unsigned SINGLE_VDU = 1024; // for set_multiscr_xoffs
@@ -123,30 +120,30 @@ DECLARE_DEVICE_TYPE(TC0100SCN, tc0100scn_device)
#define MCFG_TC0100SCN_GFX_REGION(_region) \
- tc0100scn_device::set_gfx_region(*device, _region);
+ downcast<tc0100scn_device &>(*device).set_gfx_region(_region);
#define MCFG_TC0100SCN_TX_REGION(_region) \
- tc0100scn_device::set_tx_region(*device, _region);
+ downcast<tc0100scn_device &>(*device).set_tx_region(_region);
#define MCFG_TC0100SCN_OFFSETS(_xoffs, _yoffs) \
- tc0100scn_device::set_offsets(*device, _xoffs, _yoffs);
+ downcast<tc0100scn_device &>(*device).set_offsets(_xoffs, _yoffs);
#define MCFG_TC0100SCN_OFFSETS_FLIP(_xoffs, _yoffs) \
- tc0100scn_device::set_offsets_flip(*device, _xoffs, _yoffs);
+ downcast<tc0100scn_device &>(*device).set_offsets_flip(_xoffs, _yoffs);
#define MCFG_TC0100SCN_OFFSETS_FLIPTX(_xoffs, _yoffs) \
- tc0100scn_device::set_offsets_fliptx(*device, _xoffs, _yoffs);
+ downcast<tc0100scn_device &>(*device).set_offsets_fliptx(_xoffs, _yoffs);
#define MCFG_TC0100SCN_MULTISCR_XOFFS(_xoffs) \
- tc0100scn_device::set_multiscr_xoffs(*device, _xoffs);
+ downcast<tc0100scn_device &>(*device).set_multiscr_xoffs(_xoffs);
#define MCFG_TC0100SCN_MULTISCR_HACK(_hack) \
- tc0100scn_device::set_multiscr_hack(*device, _hack);
+ downcast<tc0100scn_device &>(*device).set_multiscr_hack(_hack);
#define MCFG_TC0100SCN_GFXDECODE(_gfxtag) \
- tc0100scn_device::static_set_gfxdecode_tag(*device, "^" _gfxtag);
+ downcast<tc0100scn_device &>(*device).set_gfxdecode_tag("^" _gfxtag);
#define MCFG_TC0100SCN_PALETTE(_palette_tag) \
- tc0100scn_device::static_set_palette_tag(*device, "^" _palette_tag);
+ downcast<tc0100scn_device &>(*device).set_palette_tag("^" _palette_tag);
#endif // MAME_VIDEO_TC0100SCN_H
diff --git a/src/mame/video/tc0110pcr.cpp b/src/mame/video/tc0110pcr.cpp
index 1a60579acf0..2b746aa3e3f 100644
--- a/src/mame/video/tc0110pcr.cpp
+++ b/src/mame/video/tc0110pcr.cpp
@@ -30,13 +30,13 @@ tc0110pcr_device::tc0110pcr_device(const machine_config &mconfig, const char *ta
}
//-------------------------------------------------
-// static_set_palette_tag: Set the tag of the
+// set_palette_tag: Set the tag of the
// palette device
//-------------------------------------------------
-void tc0110pcr_device::static_set_palette_tag(device_t &device, const char *tag)
+void tc0110pcr_device::set_palette_tag(const char *tag)
{
- downcast<tc0110pcr_device &>(device).m_palette.set_tag(tag);
+ m_palette.set_tag(tag);
}
//-------------------------------------------------
diff --git a/src/mame/video/tc0110pcr.h b/src/mame/video/tc0110pcr.h
index dae0f99626c..a682cfba091 100644
--- a/src/mame/video/tc0110pcr.h
+++ b/src/mame/video/tc0110pcr.h
@@ -19,7 +19,7 @@ public:
void restore_colors();
- static void static_set_palette_tag(device_t &device, const char *tag);
+ void set_palette_tag(const char *tag);
protected:
// device-level overrides
@@ -38,6 +38,6 @@ DECLARE_DEVICE_TYPE(TC0110PCR, tc0110pcr_device)
#define MCFG_TC0110PCR_ADD(_tag) \
MCFG_DEVICE_ADD(_tag, TC0110PCR, 0)
#define MCFG_TC0110PCR_PALETTE(_palette_tag) \
- tc0110pcr_device::static_set_palette_tag(*device, "^" _palette_tag);
+ downcast<tc0110pcr_device &>(*device).set_palette_tag("^" _palette_tag);
#endif // MAME_VIDEO_TC0110PCR_H
diff --git a/src/mame/video/tc0180vcu.cpp b/src/mame/video/tc0180vcu.cpp
index e3a8aacac71..e51d34370db 100644
--- a/src/mame/video/tc0180vcu.cpp
+++ b/src/mame/video/tc0180vcu.cpp
@@ -28,13 +28,13 @@ tc0180vcu_device::tc0180vcu_device(const machine_config &mconfig, const char *ta
}
//-------------------------------------------------
-// static_set_gfxdecode_tag: Set the tag of the
+// set_gfxdecode_tag: Set the tag of the
// gfx decoder
//-------------------------------------------------
-void tc0180vcu_device::static_set_gfxdecode_tag(device_t &device, const char *tag)
+void tc0180vcu_device::set_gfxdecode_tag(const char *tag)
{
- downcast<tc0180vcu_device &>(device).m_gfxdecode.set_tag(tag);
+ m_gfxdecode.set_tag(tag);
}
//-------------------------------------------------
diff --git a/src/mame/video/tc0180vcu.h b/src/mame/video/tc0180vcu.h
index 7d2a6800f19..d3cd188f64c 100644
--- a/src/mame/video/tc0180vcu.h
+++ b/src/mame/video/tc0180vcu.h
@@ -10,11 +10,11 @@ class tc0180vcu_device : public device_t
public:
tc0180vcu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
- // static configuration
- static void static_set_gfxdecode_tag(device_t &device, const char *tag);
- static void set_bg_colorbase(device_t &device, int color) { downcast<tc0180vcu_device &>(device).m_bg_color_base = color; }
- static void set_fg_colorbase(device_t &device, int color) { downcast<tc0180vcu_device &>(device).m_fg_color_base = color; }
- static void set_tx_colorbase(device_t &device, int color) { downcast<tc0180vcu_device &>(device).m_tx_color_base = color; }
+ // configuration
+ void set_gfxdecode_tag(const char *tag);
+ void set_bg_colorbase(int color) { m_bg_color_base = color; }
+ void set_fg_colorbase(int color) { m_fg_color_base = color; }
+ void set_tx_colorbase(int color) { m_tx_color_base = color; }
DECLARE_READ8_MEMBER( get_fb_page );
DECLARE_WRITE8_MEMBER( set_fb_page );
@@ -61,15 +61,15 @@ private:
DECLARE_DEVICE_TYPE(TC0180VCU, tc0180vcu_device)
#define MCFG_TC0180VCU_BG_COLORBASE(_color) \
- tc0180vcu_device::set_bg_colorbase(*device, _color);
+ downcast<tc0180vcu_device &>(*device).set_bg_colorbase(_color);
#define MCFG_TC0180VCU_FG_COLORBASE(_color) \
- tc0180vcu_device::set_fg_colorbase(*device, _color);
+ downcast<tc0180vcu_device &>(*device).set_fg_colorbase(_color);
#define MCFG_TC0180VCU_TX_COLORBASE(_color) \
- tc0180vcu_device::set_tx_colorbase(*device, _color);
+ downcast<tc0180vcu_device &>(*device).set_tx_colorbase(_color);
#define MCFG_TC0180VCU_GFXDECODE(_gfxtag) \
- tc0180vcu_device::static_set_gfxdecode_tag(*device, "^" _gfxtag);
+ downcast<tc0180vcu_device &>(*device).set_gfxdecode_tag("^" _gfxtag);
#endif // MAME_VIDEO_TC0180VCU_H
diff --git a/src/mame/video/tc0280grd.cpp b/src/mame/video/tc0280grd.cpp
index 35f1920c4c5..60a18b9c310 100644
--- a/src/mame/video/tc0280grd.cpp
+++ b/src/mame/video/tc0280grd.cpp
@@ -37,13 +37,13 @@ tc0280grd_device::tc0280grd_device(const machine_config &mconfig, const char *ta
}
//-------------------------------------------------
-// static_set_gfxdecode_tag: Set the tag of the
+// set_gfxdecode_tag: Set the tag of the
// gfx decoder
//-------------------------------------------------
-void tc0280grd_device::static_set_gfxdecode_tag(device_t &device, const char *tag)
+void tc0280grd_device::set_gfxdecode_tag(const char *tag)
{
- downcast<tc0280grd_device &>(device).m_gfxdecode.set_tag(tag);
+ m_gfxdecode.set_tag(tag);
}
diff --git a/src/mame/video/tc0280grd.h b/src/mame/video/tc0280grd.h
index 93bd12eea06..629ed2ea211 100644
--- a/src/mame/video/tc0280grd.h
+++ b/src/mame/video/tc0280grd.h
@@ -10,9 +10,9 @@ class tc0280grd_device : public device_t
public:
tc0280grd_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
- // static configuration
- static void static_set_gfxdecode_tag(device_t &device, const char *tag);
- static void set_gfx_region(device_t &device, int gfxregion) { downcast<tc0280grd_device &>(device).m_gfxnum = gfxregion; }
+ // configuration
+ void set_gfxdecode_tag(const char *tag);
+ void set_gfx_region(int gfxregion) { m_gfxnum = gfxregion; }
DECLARE_READ16_MEMBER( tc0280grd_word_r );
DECLARE_WRITE16_MEMBER( tc0280grd_word_w );
@@ -51,15 +51,15 @@ DECLARE_DEVICE_TYPE(TC0280GRD, tc0280grd_device)
#define TC0430GRW TC0280GRD
#define MCFG_TC0280GRD_GFX_REGION(_region) \
- tc0280grd_device::set_gfx_region(*device, _region);
+ downcast<tc0280grd_device &>(*device).set_gfx_region(_region);
#define MCFG_TC0430GRW_GFX_REGION(_region) \
- tc0280grd_device::set_gfx_region(*device, _region);
+ downcast<tc0280grd_device &>(*device).set_gfx_region(_region);
#define MCFG_TC0280GRD_GFXDECODE(_gfxtag) \
- tc0280grd_device::static_set_gfxdecode_tag(*device, "^" _gfxtag);
+ downcast<tc0280grd_device &>(*device).set_gfxdecode_tag("^" _gfxtag);
#define MCFG_TC0430GRW_GFXDECODE(_gfxtag) \
- tc0280grd_device::static_set_gfxdecode_tag(*device, "^" _gfxtag);
+ downcast<tc0280grd_device &>(*device).set_gfxdecode_tag("^" _gfxtag);
#endif // MAME_VIDEO_TC0280GRD_H
diff --git a/src/mame/video/tc0480scp.cpp b/src/mame/video/tc0480scp.cpp
index 0152631e0bc..0ead80e157f 100644
--- a/src/mame/video/tc0480scp.cpp
+++ b/src/mame/video/tc0480scp.cpp
@@ -183,13 +183,13 @@ tc0480scp_device::tc0480scp_device(const machine_config &mconfig, const char *ta
}
//-------------------------------------------------
-// static_set_gfxdecode_tag: Set the tag of the
+// set_gfxdecode_tag: Set the tag of the
// gfx decoder
//-------------------------------------------------
-void tc0480scp_device::static_set_gfxdecode_tag(device_t &device, const char *tag)
+void tc0480scp_device::set_gfxdecode_tag(const char *tag)
{
- downcast<tc0480scp_device &>(device).m_gfxdecode.set_tag(tag);
+ m_gfxdecode.set_tag(tag);
}
//-------------------------------------------------
diff --git a/src/mame/video/tc0480scp.h b/src/mame/video/tc0480scp.h
index b63fd3442df..03e9dc48b08 100644
--- a/src/mame/video/tc0480scp.h
+++ b/src/mame/video/tc0480scp.h
@@ -10,28 +10,25 @@ class tc0480scp_device : public device_t
public:
tc0480scp_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
- // static configuration
- static void static_set_gfxdecode_tag(device_t &device, const char *tag);
- static void set_gfx_region(device_t &device, int gfxregion) { downcast<tc0480scp_device &>(device).m_gfxnum = gfxregion; }
- static void set_tx_region(device_t &device, int txregion) { downcast<tc0480scp_device &>(device).m_txnum = txregion; }
- static void set_col_base(device_t &device, int col) { downcast<tc0480scp_device &>(device).m_col_base = col; }
- static void set_offsets(device_t &device, int x_offset, int y_offset)
+ // configuration
+ void set_gfxdecode_tag(const char *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; }
+ void set_offsets(int x_offset, int y_offset)
{
- tc0480scp_device &dev = downcast<tc0480scp_device &>(device);
- dev.m_x_offset = x_offset;
- dev.m_y_offset = y_offset;
+ m_x_offset = x_offset;
+ m_y_offset = y_offset;
}
- static void set_offsets_tx(device_t &device, int x_offset, int y_offset)
+ void set_offsets_tx(int x_offset, int y_offset)
{
- tc0480scp_device &dev = downcast<tc0480scp_device &>(device);
- dev.m_text_xoffs = x_offset;
- dev.m_text_yoffs = y_offset;
+ m_text_xoffs = x_offset;
+ m_text_yoffs = y_offset;
}
- static void set_offsets_flip(device_t &device, int x_offset, int y_offset)
+ void set_offsets_flip(int x_offset, int y_offset)
{
- tc0480scp_device &dev = downcast<tc0480scp_device &>(device);
- dev.m_flip_xoffs = x_offset;
- dev.m_flip_yoffs = y_offset;
+ m_flip_xoffs = x_offset;
+ m_flip_yoffs = y_offset;
}
/* When writing a driver, pass zero for the text and flip offsets initially:
@@ -115,24 +112,24 @@ DECLARE_DEVICE_TYPE(TC0480SCP, tc0480scp_device)
#define MCFG_TC0480SCP_GFX_REGION(_region) \
- tc0480scp_device::set_gfx_region(*device, _region);
+ downcast<tc0480scp_device &>(*device).set_gfx_region(_region);
#define MCFG_TC0480SCP_TX_REGION(_region) \
- tc0480scp_device::set_tx_region(*device, _region);
+ downcast<tc0480scp_device &>(*device).set_tx_region(_region);
#define MCFG_TC0480SCP_OFFSETS(_xoffs, _yoffs) \
- tc0480scp_device::set_offsets(*device, _xoffs, _yoffs);
+ downcast<tc0480scp_device &>(*device).set_offsets(_xoffs, _yoffs);
#define MCFG_TC0480SCP_OFFSETS_TX(_xoffs, _yoffs) \
- tc0480scp_device::set_offsets_tx(*device, _xoffs, _yoffs);
+ downcast<tc0480scp_device &>(*device).set_offsets_tx(_xoffs, _yoffs);
#define MCFG_TC0480SCP_OFFSETS_FLIP(_xoffs, _yoffs) \
- tc0480scp_device::set_offsets_flip(*device, _xoffs, _yoffs);
+ downcast<tc0480scp_device &>(*device).set_offsets_flip(_xoffs, _yoffs);
#define MCFG_TC0480SCP_COL_BASE(_col) \
- tc0480scp_device::set_col_base(*device, _col);
+ downcast<tc0480scp_device &>(*device).set_col_base(_col);
#define MCFG_TC0480SCP_GFXDECODE(_gfxtag) \
- tc0480scp_device::static_set_gfxdecode_tag(*device, "^" _gfxtag);
+ downcast<tc0480scp_device &>(*device).set_gfxdecode_tag("^" _gfxtag);
#endif // MAME_VIDEO_TC0480SCP_H
diff --git a/src/mame/video/tecmo_mix.cpp b/src/mame/video/tecmo_mix.cpp
index ec1ac96a42c..7de58739f22 100644
--- a/src/mame/video/tecmo_mix.cpp
+++ b/src/mame/video/tecmo_mix.cpp
@@ -44,49 +44,43 @@ void tecmo_mix_device::device_reset()
-void tecmo_mix_device::set_mixer_shifts(device_t &device, int sprpri_shift, int sprbln_shift, int sprcol_shift)
+void tecmo_mix_device::set_mixer_shifts(int sprpri_shift, int sprbln_shift, int sprcol_shift)
{
- tecmo_mix_device &dev = downcast<tecmo_mix_device &>(device);
- dev.m_sprpri_shift = sprpri_shift;
- dev.m_sprbln_shift = sprbln_shift;
- dev.m_sprcol_shift = sprcol_shift;
+ m_sprpri_shift = sprpri_shift;
+ m_sprbln_shift = sprbln_shift;
+ m_sprcol_shift = sprcol_shift;
}
-void tecmo_mix_device::set_blendcols(device_t &device, int bgblend_comp, int fgblend_comp, int txblend_comp, int spblend_comp)
+void tecmo_mix_device::set_blendcols(int bgblend_comp, int fgblend_comp, int txblend_comp, int spblend_comp)
{
- tecmo_mix_device &dev = downcast<tecmo_mix_device &>(device);
- dev.m_bgblend_comp = bgblend_comp;
- dev.m_fgblend_comp = fgblend_comp;
- dev.m_txblend_comp = txblend_comp;
- dev.m_spblend_comp = spblend_comp;
+ m_bgblend_comp = bgblend_comp;
+ m_fgblend_comp = fgblend_comp;
+ m_txblend_comp = txblend_comp;
+ m_spblend_comp = spblend_comp;
}
-void tecmo_mix_device::set_regularcols(device_t &device, int bgregular_comp, int fgregular_comp, int txregular_comp, int spregular_comp)
+void tecmo_mix_device::set_regularcols(int bgregular_comp, int fgregular_comp, int txregular_comp, int spregular_comp)
{
- tecmo_mix_device &dev = downcast<tecmo_mix_device &>(device);
- dev.m_bgregular_comp = bgregular_comp;
- dev.m_fgregular_comp = fgregular_comp;
- dev.m_txregular_comp = txregular_comp;
- dev.m_spregular_comp = spregular_comp;
+ m_bgregular_comp = bgregular_comp;
+ m_fgregular_comp = fgregular_comp;
+ m_txregular_comp = txregular_comp;
+ m_spregular_comp = spregular_comp;
}
-void tecmo_mix_device::set_blendsource(device_t &device, int spblend_source, int fgblend_source)
+void tecmo_mix_device::set_blendsource(int spblend_source, int fgblend_source)
{
- tecmo_mix_device &dev = downcast<tecmo_mix_device &>(device);
- dev.m_spblend_source = spblend_source;
- dev.m_fgblend_source = fgblend_source;
+ m_spblend_source = spblend_source;
+ m_fgblend_source = fgblend_source;
}
-void tecmo_mix_device::set_revspritetile(device_t &device)
+void tecmo_mix_device::set_revspritetile()
{
- tecmo_mix_device &dev = downcast<tecmo_mix_device &>(device);
- dev.m_revspritetile = 3;
+ m_revspritetile = 3;
}
-void tecmo_mix_device::set_bgpen(device_t &device, int bgpen)
+void tecmo_mix_device::set_bgpen(int bgpen)
{
- tecmo_mix_device &dev = downcast<tecmo_mix_device &>(device);
- dev.m_bgpen = bgpen;
+ m_bgpen = bgpen;
}
uint32_t tecmo_mix_device::sum_colors(const pen_t *pal, int c1_idx, int c2_idx)
diff --git a/src/mame/video/tecmo_mix.h b/src/mame/video/tecmo_mix.h
index cc2616b2dc3..09799ed9a15 100644
--- a/src/mame/video/tecmo_mix.h
+++ b/src/mame/video/tecmo_mix.h
@@ -13,12 +13,12 @@ public:
tecmo_mix_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
void mix_bitmaps(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect, palette_device &palette, bitmap_ind16* bitmap_bg, bitmap_ind16* bitmap_fg, bitmap_ind16* bitmap_tx, bitmap_ind16* bitmap_sp);
- static void set_mixer_shifts(device_t &device, int sprpri_shift, int sprbln_shift, int sprcol_shift);
- static void set_blendcols(device_t &device, int bgblend_comp, int fgblend_comp, int txblend_comp, int spblend_comp);
- static void set_regularcols(device_t &device, int bgregular_comp, int fgregular_comp, int txregular_comp, int spregular_comp);
- static void set_blendsource(device_t &device, int spblend_source, int fgblend_source);
- static void set_revspritetile(device_t &device);
- static void set_bgpen(device_t &device, int bgpen);
+ void set_mixer_shifts(int sprpri_shift, int sprbln_shift, int sprcol_shift);
+ void set_blendcols(int bgblend_comp, int fgblend_comp, int txblend_comp, int spblend_comp);
+ void set_regularcols(int bgregular_comp, int fgregular_comp, int txregular_comp, int spregular_comp);
+ void set_blendsource(int spblend_source, int fgblend_source);
+ void set_revspritetile();
+ void set_bgpen(int bgpen);
protected:
virtual void device_start() override;
@@ -56,21 +56,21 @@ DECLARE_DEVICE_TYPE(TECMO_MIXER, tecmo_mix_device)
#define MCFG_TECMO_MIXER_SHIFTS(_sprpri_shift, _sprbln_shift, _sprcol_shift) \
- tecmo_mix_device::set_mixer_shifts(*device, _sprpri_shift, _sprbln_shift, _sprcol_shift);
+ downcast<tecmo_mix_device &>(*device).set_mixer_shifts(_sprpri_shift, _sprbln_shift, _sprcol_shift);
#define MCFG_TECMO_MIXER_BLENDCOLS(_bgblend_comp, _fgblend_comp, _txblend_comp, _spblend_comp) \
- tecmo_mix_device::set_blendcols(*device, _bgblend_comp, _fgblend_comp, _txblend_comp, _spblend_comp);
+ downcast<tecmo_mix_device &>(*device).set_blendcols(_bgblend_comp, _fgblend_comp, _txblend_comp, _spblend_comp);
#define MCFG_TECMO_MIXER_REGULARCOLS(_bgregular_comp, _fgregular_comp, _txregular_comp, _spregular_comp) \
- tecmo_mix_device::set_regularcols(*device, _bgregular_comp, _fgregular_comp, _txregular_comp, _spregular_comp);
+ downcast<tecmo_mix_device &>(*device).set_regularcols(_bgregular_comp, _fgregular_comp, _txregular_comp, _spregular_comp);
#define MCFG_TECMO_MIXER_BLENDSOURCE(_spblend_source, _fgblend_source) \
- tecmo_mix_device::set_blendsource(*device, _spblend_source, _fgblend_source);
+ downcast<tecmo_mix_device &>(*device).set_blendsource(_spblend_source, _fgblend_source);
#define MCFG_TECMO_MIXER_REVSPRITETILE \
- tecmo_mix_device::set_revspritetile(*device);
+ downcast<tecmo_mix_device &>(*device).set_revspritetile();
#define MCFG_TECMO_MIXER_BGPEN(_bgpen) \
- tecmo_mix_device::set_bgpen(*device, _bgpen);
+ downcast<tecmo_mix_device &>(*device).set_bgpen(_bgpen);
#endif // MAME_VIDEO_TECMO_MIX_H
diff --git a/src/mame/video/tecmo_spr.cpp b/src/mame/video/tecmo_spr.cpp
index 6bc94adb2a0..2807fdd4e12 100644
--- a/src/mame/video/tecmo_spr.cpp
+++ b/src/mame/video/tecmo_spr.cpp
@@ -35,22 +35,19 @@ void tecmo_spr_device::device_reset()
}
-void tecmo_spr_device::set_gfx_region(device_t &device, int gfxregion)
+void tecmo_spr_device::set_gfx_region(int gfxregion)
{
- tecmo_spr_device &dev = downcast<tecmo_spr_device &>(device);
- dev.m_gfxregion = gfxregion;
+ m_gfxregion = gfxregion;
}
-void tecmo_spr_device::set_bootleg(device_t &device, int bootleg)
+void tecmo_spr_device::set_bootleg(int bootleg)
{
- tecmo_spr_device &dev = downcast<tecmo_spr_device &>(device);
- dev.m_bootleg = bootleg;
+ m_bootleg = bootleg;
}
-void tecmo_spr_device::set_yoffset(device_t &device, int yoffset)
+void tecmo_spr_device::set_yoffset(int yoffset)
{
- tecmo_spr_device &dev = downcast<tecmo_spr_device &>(device);
- dev.m_yoffset = yoffset;
+ m_yoffset = yoffset;
}
diff --git a/src/mame/video/tecmo_spr.h b/src/mame/video/tecmo_spr.h
index b8b3d8075ff..e20d8c918b8 100644
--- a/src/mame/video/tecmo_spr.h
+++ b/src/mame/video/tecmo_spr.h
@@ -11,9 +11,9 @@ class tecmo_spr_device : public device_t
{
public:
tecmo_spr_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
- static void set_gfx_region(device_t &device, int gfxregion);
- static void set_bootleg(device_t &device, int bootleg);
- static void set_yoffset(device_t &device, int bootleg);
+ void set_gfx_region(int gfxregion);
+ void set_bootleg(int bootleg);
+ void set_yoffset(int yoffset);
// gaiden.c / spbactn.c / tecmo16.c 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);
@@ -40,12 +40,12 @@ DECLARE_DEVICE_TYPE(TECMO_SPRITE, tecmo_spr_device)
#define MCFG_TECMO_SPRITE_GFX_REGION(_region) \
- tecmo_spr_device::set_gfx_region(*device, _region);
+ downcast<tecmo_spr_device &>(*device).set_gfx_region(_region);
#define MCFG_TECMO_SPRITE_BOOTLEG(_bootleg) \
- tecmo_spr_device::set_bootleg(*device, _bootleg);
+ downcast<tecmo_spr_device &>(*device).set_bootleg(_bootleg);
#define MCFG_TECMO_SPRITE_YOFFSET(_yoffset) \
- tecmo_spr_device::set_yoffset(*device, _yoffset);
+ downcast<tecmo_spr_device &>(*device).set_yoffset(_yoffset);
#endif // MAME_VIDEO_TECMO_SPR_H
diff --git a/src/mame/video/tia.h b/src/mame/video/tia.h
index 53c050a6188..f4f488e5fe8 100644
--- a/src/mame/video/tia.h
+++ b/src/mame/video/tia.h
@@ -33,13 +33,13 @@ struct player_gfx {
//**************************************************************************
#define MCFG_TIA_READ_INPUT_PORT_CB(_devcb) \
- devcb = &tia_video_device::set_read_input_port_callback(*device, DEVCB_##_devcb);
+ devcb = &downcast<tia_video_device &>(*device).set_read_input_port_callback(DEVCB_##_devcb);
#define MCFG_TIA_DATABUS_CONTENTS_CB(_devcb) \
- devcb = &tia_video_device::set_databus_contents_callback(*device, DEVCB_##_devcb);
+ devcb = &downcast<tia_video_device &>(*device).set_databus_contents_callback(DEVCB_##_devcb);
#define MCFG_TIA_VSYNC_CB(_devcb) \
- devcb = &tia_video_device::set_vsync_callback(*device, DEVCB_##_devcb);
+ devcb = &downcast<tia_video_device &>(*device).set_vsync_callback(DEVCB_##_devcb);
//**************************************************************************
// TYPE DEFINITIONS
@@ -54,9 +54,9 @@ class tia_video_device : public device_t,
public:
uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
- template<class _Object> static devcb_base &set_read_input_port_callback(device_t &device, _Object object) { return downcast<tia_video_device &>(device).m_read_input_port_cb.set_callback(object); }
- template<class _Object> static devcb_base &set_databus_contents_callback(device_t &device, _Object object) { return downcast<tia_video_device &>(device).m_databus_contents_cb.set_callback(object); }
- template<class _Object> static devcb_base &set_vsync_callback(device_t &device, _Object object) { return downcast<tia_video_device &>(device).m_vsync_cb.set_callback(object); }
+ template<class _Object> devcb_base &set_read_input_port_callback(_Object object) { return m_read_input_port_cb.set_callback(object); }
+ template<class _Object> devcb_base &set_databus_contents_callback(_Object object) { return m_databus_contents_cb.set_callback(object); }
+ template<class _Object> devcb_base &set_vsync_callback(_Object object) { return m_vsync_cb.set_callback(object); }
DECLARE_READ8_MEMBER( read );
DECLARE_WRITE8_MEMBER( write );
diff --git a/src/mame/video/toaplan_scu.cpp b/src/mame/video/toaplan_scu.cpp
index a6d02b4df4e..8a73847085e 100644
--- a/src/mame/video/toaplan_scu.cpp
+++ b/src/mame/video/toaplan_scu.cpp
@@ -35,11 +35,10 @@ toaplan_scu_device::toaplan_scu_device(const machine_config &mconfig, const char
{
}
-void toaplan_scu_device::static_set_xoffsets(device_t &device, int xoffs, int xoffs_flipped)
+void toaplan_scu_device::set_xoffsets(int xoffs, int xoffs_flipped)
{
- toaplan_scu_device &dev = downcast<toaplan_scu_device &>(device);
- dev.m_xoffs = xoffs;
- dev.m_xoffs_flipped = xoffs_flipped;
+ m_xoffs = xoffs;
+ m_xoffs_flipped = xoffs_flipped;
}
void toaplan_scu_device::device_start()
diff --git a/src/mame/video/toaplan_scu.h b/src/mame/video/toaplan_scu.h
index 3466380c102..1096747f038 100644
--- a/src/mame/video/toaplan_scu.h
+++ b/src/mame/video/toaplan_scu.h
@@ -12,8 +12,8 @@ class toaplan_scu_device : public device_t, public device_gfx_interface
public:
toaplan_scu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
- // static configuration
- static void static_set_xoffsets(device_t &device, int xoffs, int xoffs_flipped);
+ // configuration
+ void set_xoffsets(int xoffs, int xoffs_flipped);
void draw_sprites_to_tempbitmap(const rectangle &cliprect, uint16_t* spriteram, uint32_t bytes );
void copy_sprites_from_tempbitmap(bitmap_ind16 &bitmap, const rectangle &cliprect, int priority);
@@ -34,9 +34,12 @@ private:
DECLARE_DEVICE_TYPE(TOAPLAN_SCU, toaplan_scu_device)
+#define MCFG_TOAPLAN_SCU_SET_XOFFSETS(_xoffs, _xoffs_flipped ) \
+ downcast<toaplan_scu_device &>(*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) \
- toaplan_scu_device::static_set_xoffsets(*device, _xoffs, _xoffs_flipped);
+ downcast<toaplan_scu_device &>(*device).set_xoffsets(_xoffs, _xoffs_flipped);
#endif // MAME_VIDEO_TOAPLAN_SCU_H
diff --git a/src/mame/video/uv201.h b/src/mame/video/uv201.h
index deeaa64eef0..0f7d07615aa 100644
--- a/src/mame/video/uv201.h
+++ b/src/mame/video/uv201.h
@@ -73,13 +73,13 @@
#define MCFG_UV201_EXT_INT_CALLBACK(_write) \
- devcb = &uv201_device::set_ext_int_wr_callback(*device, DEVCB_##_write);
+ devcb = &downcast<uv201_device &>(*device).set_ext_int_wr_callback(DEVCB_##_write);
#define MCFG_UV201_HBLANK_CALLBACK(_write) \
- devcb = &uv201_device::set_hblank_wr_callback(*device, DEVCB_##_write);
+ devcb = &downcast<uv201_device &>(*device).set_hblank_wr_callback(DEVCB_##_write);
#define MCFG_UV201_DB_CALLBACK(_read) \
- devcb = &uv201_device::set_db_rd_callback(*device, DEVCB_##_read);
+ devcb = &downcast<uv201_device &>(*device).set_db_rd_callback(DEVCB_##_read);
@@ -96,9 +96,9 @@ public:
// construction/destruction
uv201_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
- template <class Object> static devcb_base &set_ext_int_wr_callback(device_t &device, Object &&cb) { return downcast<uv201_device &>(device).m_write_ext_int.set_callback(std::forward<Object>(cb)); }
- template <class Object> static devcb_base &set_hblank_wr_callback(device_t &device, Object &&cb) { return downcast<uv201_device &>(device).m_write_hblank.set_callback(std::forward<Object>(cb)); }
- template <class Object> static devcb_base &set_db_rd_callback(device_t &device, Object &&cb) { return downcast<uv201_device &>(device).m_read_db.set_callback(std::forward<Object>(cb)); }
+ template <class Object> devcb_base &set_ext_int_wr_callback(Object &&cb) { return m_write_ext_int.set_callback(std::forward<Object>(cb)); }
+ template <class Object> devcb_base &set_hblank_wr_callback(Object &&cb) { return m_write_hblank.set_callback(std::forward<Object>(cb)); }
+ template <class Object> devcb_base &set_db_rd_callback(Object &&cb) { return m_read_db.set_callback(std::forward<Object>(cb)); }
DECLARE_READ8_MEMBER( read );
DECLARE_WRITE8_MEMBER( write );
diff --git a/src/mame/video/vrender0.h b/src/mame/video/vrender0.h
index 607e24a2905..8d2e005c346 100644
--- a/src/mame/video/vrender0.h
+++ b/src/mame/video/vrender0.h
@@ -18,7 +18,7 @@ public:
int vrender0_ProcessPacket(uint32_t PacketPtr, uint16_t *Dest, uint8_t *TEXTURE);
- static void set_cpu_tag(device_t &device, const char *tag) { downcast<vr0video_device &>(device).m_cpu.set_tag(tag); }
+ void set_cpu_tag(const char *tag) { m_cpu.set_tag(tag); }
protected:
// device-level overrides
@@ -63,6 +63,6 @@ DECLARE_DEVICE_TYPE(VIDEO_VRENDER0, vr0video_device)
#define MCFG_VIDEO_VRENDER0_CPU(_tag) \
- vr0video_device::set_cpu_tag(*device, "^" _tag);
+ downcast<vr0video_device &>(*device).set_cpu_tag("^" _tag);
#endif // MAME_VIDEO_VRENDER0_H
diff --git a/src/mame/video/vs920a.cpp b/src/mame/video/vs920a.cpp
index a6c0cf10a32..23a61c540bc 100644
--- a/src/mame/video/vs920a.cpp
+++ b/src/mame/video/vs920a.cpp
@@ -62,15 +62,14 @@ void vs920a_text_tilemap_device::device_reset()
}
-void vs920a_text_tilemap_device::set_gfx_region(device_t &device, int gfxregion)
+void vs920a_text_tilemap_device::set_gfx_region(int gfxregion)
{
- vs920a_text_tilemap_device &dev = downcast<vs920a_text_tilemap_device &>(device);
- dev.m_gfx_region = gfxregion;
+ m_gfx_region = gfxregion;
}
-void vs920a_text_tilemap_device::static_set_gfxdecode_tag(device_t &device, const char *tag)
+void vs920a_text_tilemap_device::set_gfxdecode_tag(const char *tag)
{
- downcast<vs920a_text_tilemap_device &>(device).m_gfxdecode.set_tag(tag);
+ m_gfxdecode.set_tag(tag);
}
diff --git a/src/mame/video/vs920a.h b/src/mame/video/vs920a.h
index 5d53191630f..b20d18e8c10 100644
--- a/src/mame/video/vs920a.h
+++ b/src/mame/video/vs920a.h
@@ -9,8 +9,8 @@
class vs920a_text_tilemap_device : public device_t
{
public:
- static void static_set_gfxdecode_tag(device_t &device, const char *tag);
- static void set_gfx_region(device_t &device, int gfxregion);
+ void set_gfxdecode_tag(const char *tag);
+ void set_gfx_region(int gfxregion);
vs920a_text_tilemap_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
@@ -41,9 +41,9 @@ DECLARE_DEVICE_TYPE(VS920A, vs920a_text_tilemap_device)
#define MCFG_VS920A_GFX_REGION(_region) \
- vs920a_text_tilemap_device::set_gfx_region(*device, _region);
+ downcast<vs920a_text_tilemap_device &>(*device).set_gfx_region(_region);
#define MCFG_VS920A_GFXDECODE(_gfxtag) \
- vs920a_text_tilemap_device::static_set_gfxdecode_tag(*device, "^" _gfxtag);
+ downcast<vs920a_text_tilemap_device &>(*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 32e5e8f4189..a15d02a963a 100644
--- a/src/mame/video/vsystem_gga.h
+++ b/src/mame/video/vsystem_gga.h
@@ -51,7 +51,7 @@
//**************************************************************************
#define MCFG_VSYSTEM_GGA_REGISTER_WRITE_CB(_devcb) \
- devcb = &vsystem_gga_device::static_set_write_cb(*device, DEVCB_##_devcb);
+ devcb = &downcast<vsystem_gga_device &>(*device).set_write_cb(DEVCB_##_devcb);
//**************************************************************************
@@ -67,7 +67,7 @@ public:
vsystem_gga_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock);
// static configuration
- template<class Obj> static devcb_base &static_set_write_cb(device_t &device, Obj &&object) { return downcast<vsystem_gga_device &>(device).m_write_cb.set_callback(std::forward<Obj>(object)); }
+ template<class Obj> devcb_base &set_write_cb(Obj &&object) { return m_write_cb.set_callback(std::forward<Obj>(object)); }
// memory handlers
DECLARE_WRITE8_MEMBER(write);
diff --git a/src/mame/video/vsystem_spr.cpp b/src/mame/video/vsystem_spr.cpp
index 232787704a1..85c7cbcfd81 100644
--- a/src/mame/video/vsystem_spr.cpp
+++ b/src/mame/video/vsystem_spr.cpp
@@ -82,13 +82,13 @@ vsystem_spr_device::vsystem_spr_device(const machine_config &mconfig, const char
}
//-------------------------------------------------
-// static_set_gfxdecode_tag: Set the tag of the
+// set_gfxdecode_tag: Set the tag of the
// gfx decoder
//-------------------------------------------------
-void vsystem_spr_device::static_set_gfxdecode_tag(device_t &device, const char *tag)
+void vsystem_spr_device::set_gfxdecode_tag(const char *tag)
{
- downcast<vsystem_spr_device &>(device).m_gfxdecode.set_tag(tag);
+ m_gfxdecode.set_tag(tag);
}
uint32_t vsystem_spr_device::tile_callback_noindirect(uint32_t tile)
@@ -97,56 +97,42 @@ uint32_t vsystem_spr_device::tile_callback_noindirect(uint32_t tile)
}
-// static
-void vsystem_spr_device::set_tile_indirect_cb(device_t &device,vsystem_tile_indirection_delegate newtilecb)
+void vsystem_spr_device::set_tile_indirect_cb(vsystem_tile_indirection_delegate newtilecb)
{
- vsystem_spr_device &dev = downcast<vsystem_spr_device &>(device);
- dev.m_newtilecb = newtilecb;
+ m_newtilecb = newtilecb;
}
-// static
-void vsystem_spr_device::set_offsets(device_t &device, int xoffs, int yoffs)
+void vsystem_spr_device::set_offsets(int xoffs, int yoffs)
{
- vsystem_spr_device &dev = downcast<vsystem_spr_device &>(device);
- dev.m_xoffs = xoffs;
- dev.m_yoffs = yoffs;
+ m_xoffs = xoffs;
+ m_yoffs = yoffs;
}
-// static
-void vsystem_spr_device::set_pdraw(device_t &device, bool pdraw)
+void vsystem_spr_device::set_pdraw(bool pdraw)
{
- vsystem_spr_device &dev = downcast<vsystem_spr_device &>(device);
- dev.m_pdraw = pdraw;
+ m_pdraw = pdraw;
}
-// static
-void vsystem_spr_device::set_gfx_region(device_t &device, int gfx_region)
+void vsystem_spr_device::set_gfx_region(int gfx_region)
{
- vsystem_spr_device &dev = downcast<vsystem_spr_device &>(device);
- dev.m_gfx_region = gfx_region;
+ m_gfx_region = gfx_region;
}
-// static
-void vsystem_spr_device::CG10103_set_pal_base(device_t &device, int pal_base)
+void vsystem_spr_device::CG10103_set_pal_base(int pal_base)
{
- vsystem_spr_device &dev = downcast<vsystem_spr_device &>(device);
- dev.m_pal_base = pal_base;
+ m_pal_base = pal_base;
}
-// static
-void vsystem_spr_device::set_pal_mask(device_t &device, int pal_mask)
+void vsystem_spr_device::set_pal_mask(int pal_mask)
{
- vsystem_spr_device &dev = downcast<vsystem_spr_device &>(device);
- dev.m_pal_mask = pal_mask;
+ m_pal_mask = pal_mask;
}
-// static
-void vsystem_spr_device::CG10103_set_transpen(device_t &device, int transpen)
+void vsystem_spr_device::CG10103_set_transpen(int transpen)
{
- vsystem_spr_device &dev = downcast<vsystem_spr_device &>(device);
- dev.m_transpen = transpen;
+ m_transpen = transpen;
}
diff --git a/src/mame/video/vsystem_spr.h b/src/mame/video/vsystem_spr.h
index c033b0d6903..073800d3108 100644
--- a/src/mame/video/vsystem_spr.h
+++ b/src/mame/video/vsystem_spr.h
@@ -9,33 +9,37 @@
typedef device_delegate<uint32_t (uint32_t)> vsystem_tile_indirection_delegate;
-#define MCFG_VSYSTEM_SPR_SET_TILE_INDIRECT( _class, _method) \
- vsystem_spr_device::set_tile_indirect_cb(*device, vsystem_tile_indirection_delegate(&_class::_method, #_class "::" #_method, nullptr, (_class *)nullptr));
-#define MCFG_VSYSTEM_SPR_SET_GFXREGION( _rgn ) \
- vsystem_spr_device::set_gfx_region(*device, _rgn);
-#define MCFG_VSYSTEM_SPR_SET_PALBASE( _palbase ) \
- vsystem_spr_device::CG10103_set_pal_base(*device, _palbase);
-#define MCFG_VSYSTEM_SPR_SET_PALMASK( _palmask ) \
- vsystem_spr_device::set_pal_mask(*device, _palmask);
-#define MCFG_VSYSTEM_SPR_SET_TRANSPEN( _transpen ) \
- vsystem_spr_device::CG10103_set_transpen(*device, _transpen);
+#define MCFG_VSYSTEM_SPR_SET_TILE_INDIRECT(_class, _method) \
+ downcast<vsystem_spr_device &>(*device).set_tile_indirect_cb(vsystem_tile_indirection_delegate(&_class::_method, #_class "::" #_method, nullptr, (_class *)nullptr));
+#define MCFG_VSYSTEM_SPR_SET_GFXREGION(_rgn) \
+ downcast<vsystem_spr_device &>(*device).set_gfx_region(_rgn);
+#define MCFG_VSYSTEM_SPR_SET_PALBASE(_palbase) \
+ downcast<vsystem_spr_device &>(*device).CG10103_set_pal_base(_palbase);
+#define MCFG_VSYSTEM_SPR_SET_PALMASK(_palmask) \
+ downcast<vsystem_spr_device &>(*device).set_pal_mask(_palmask);
+#define MCFG_VSYSTEM_SPR_SET_TRANSPEN(_transpen) \
+ downcast<vsystem_spr_device &>(*device).CG10103_set_transpen(_transpen);
#define MCFG_VSYSTEM_SPR_GFXDECODE(_gfxtag) \
- vsystem_spr_device::static_set_gfxdecode_tag(*device, "^" _gfxtag);
+ downcast<vsystem_spr_device &>(*device).set_gfxdecode_tag("^" _gfxtag);
+#define MCFG_VSYSTEM_SPR_SET_OFFSETS(_xoffs, _yoffs) \
+ downcast<vsystem_spr_device &>(*device).set_offsets(_xoffs,_yoffs);
+#define MCFG_VSYSTEM_SPR_SET_PDRAW(_pdraw) \
+ downcast<vsystem_spr_device &>(*device).set_pdraw(_pdraw);
/*** CG10103 **********************************************/
class vsystem_spr_device : public device_t
{
public:
- // static configuration
- static void static_set_gfxdecode_tag(device_t &device, const char *tag);
- static void set_offsets(device_t &device, int xoffs, int yoffs);
- static void set_pdraw(device_t &device, bool pdraw);
- static void set_tile_indirect_cb(device_t &device, vsystem_tile_indirection_delegate newtilecb);
- static void set_gfx_region(device_t &device, int gfx_region);
- static void CG10103_set_pal_base(device_t &device, int pal_base);
- static void set_pal_mask(device_t &device, int pal_mask);
- static void CG10103_set_transpen(device_t &device, int transpen);
+ // configuration
+ void set_gfxdecode_tag(const char *tag);
+ void set_offsets(int xoffs, int yoffs);
+ void set_pdraw(bool pdraw);
+ void set_tile_indirect_cb(vsystem_tile_indirection_delegate newtilecb);
+ void set_gfx_region(int gfx_region);
+ void CG10103_set_pal_base(int pal_base);
+ void set_pal_mask(int pal_mask);
+ void CG10103_set_transpen(int transpen);
vsystem_spr_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
diff --git a/src/mame/video/vsystem_spr2.cpp b/src/mame/video/vsystem_spr2.cpp
index ad6dd167edc..1f8be9e675e 100644
--- a/src/mame/video/vsystem_spr2.cpp
+++ b/src/mame/video/vsystem_spr2.cpp
@@ -42,39 +42,35 @@ vsystem_spr2_device::vsystem_spr2_device(const machine_config &mconfig, const ch
}
//-------------------------------------------------
-// static_set_gfxdecode_tag: Set the tag of the
+// set_gfxdecode_tag: Set the tag of the
// gfx decoder
//-------------------------------------------------
-void vsystem_spr2_device::static_set_gfxdecode_tag(device_t &device, const char *tag)
+void vsystem_spr2_device::set_gfxdecode_tag(const char *tag)
{
- downcast<vsystem_spr2_device &>(device).m_gfxdecode.set_tag(tag);
+ m_gfxdecode.set_tag(tag);
}
-void vsystem_spr2_device::set_tile_indirect_cb(device_t &device,vsystem_tile2_indirection_delegate newtilecb)
+void vsystem_spr2_device::set_tile_indirect_cb(vsystem_tile2_indirection_delegate newtilecb)
{
- vsystem_spr2_device &dev = downcast<vsystem_spr2_device &>(device);
- dev.m_newtilecb = newtilecb;
+ m_newtilecb = newtilecb;
}
-void vsystem_spr2_device::set_pritype(device_t &device,int pritype)
+void vsystem_spr2_device::set_pritype(int pritype)
{
- vsystem_spr2_device &dev = downcast<vsystem_spr2_device &>(device);
- dev.m_pritype = pritype;
+ m_pritype = pritype;
}
-void vsystem_spr2_device::set_gfx_region(device_t &device, int gfx_region)
+void vsystem_spr2_device::set_gfx_region(int gfx_region)
{
- vsystem_spr2_device &dev = downcast<vsystem_spr2_device &>(device);
- dev.m_gfx_region = gfx_region;
+ m_gfx_region = gfx_region;
}
-void vsystem_spr2_device::set_offsets(device_t &device, int xoffs, int yoffs)
+void vsystem_spr2_device::set_offsets(int xoffs, int yoffs)
{
- vsystem_spr2_device &dev = downcast<vsystem_spr2_device &>(device);
- dev.m_xoffs = xoffs;
- dev.m_yoffs = yoffs;
+ m_xoffs = xoffs;
+ m_yoffs = yoffs;
}
uint32_t vsystem_spr2_device::tile_callback_noindirect(uint32_t tile)
diff --git a/src/mame/video/vsystem_spr2.h b/src/mame/video/vsystem_spr2.h
index 9be3c04b950..876a82230ee 100644
--- a/src/mame/video/vsystem_spr2.h
+++ b/src/mame/video/vsystem_spr2.h
@@ -6,26 +6,26 @@
typedef device_delegate<uint32_t (uint32_t)> vsystem_tile2_indirection_delegate;
-#define MCFG_VSYSTEM_SPR2_SET_TILE_INDIRECT( _class, _method) \
- vsystem_spr2_device::set_tile_indirect_cb(*device, vsystem_tile2_indirection_delegate(&_class::_method, #_class "::" #_method, nullptr, (_class *)nullptr));
-#define MCFG_VSYSTEM_SPR2_SET_PRITYPE( _val) \
- vsystem_spr2_device::set_pritype(*device, _val);
-#define MCFG_VSYSTEM_SPR2_SET_GFXREGION( _rgn ) \
- vsystem_spr2_device::set_gfx_region(*device, _rgn);
-#define MCFG_VSYSTEM_SPR2_SET_OFFSETS( _xoffs, _yoffs ) \
- vsystem_spr2_device::set_offsets(*device, _xoffs,_yoffs);
+#define MCFG_VSYSTEM_SPR2_SET_TILE_INDIRECT(_class, _method) \
+ downcast<vsystem_spr2_device &>(*device).set_tile_indirect_cb(vsystem_tile2_indirection_delegate(&_class::_method, #_class "::" #_method, nullptr, (_class *)nullptr));
+#define MCFG_VSYSTEM_SPR2_SET_PRITYPE(_val) \
+ downcast<vsystem_spr2_device &>(*device).set_pritype(_val);
+#define MCFG_VSYSTEM_SPR2_SET_GFXREGION(_rgn) \
+ downcast<vsystem_spr2_device &>(*device).set_gfx_region(_rgn);
+#define MCFG_VSYSTEM_SPR2_SET_OFFSETS(_xoffs, _yoffs) \
+ downcast<vsystem_spr2_device &>(*device).set_offsets(_xoffs,_yoffs);
#define MCFG_VSYSTEM_SPR2_GFXDECODE(_gfxtag) \
- vsystem_spr2_device::static_set_gfxdecode_tag(*device, "^" _gfxtag);
+ downcast<vsystem_spr2_device &>(*device).set_gfxdecode_tag("^" _gfxtag);
class vsystem_spr2_device : public device_t
{
public:
- // static configuration
- static void static_set_gfxdecode_tag(device_t &device, const char *tag);
- static void set_tile_indirect_cb(device_t &device, vsystem_tile2_indirection_delegate newtilecb);
- static void set_pritype(device_t &device, int pritype);
- static void set_gfx_region(device_t &device, int gfx_region);
- static void set_offsets(device_t &device, int xoffs, int yoffs);
+ // configuration
+ void set_gfxdecode_tag(const char *tag);
+ void set_tile_indirect_cb(vsystem_tile2_indirection_delegate newtilecb);
+ void set_pritype(int pritype);
+ void set_gfx_region(int gfx_region);
+ void set_offsets(int xoffs, int yoffs);
vsystem_spr2_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
diff --git a/src/mame/video/vtvideo.h b/src/mame/video/vtvideo.h
index 01d677867d1..e89459ae7a4 100644
--- a/src/mame/video/vtvideo.h
+++ b/src/mame/video/vtvideo.h
@@ -21,11 +21,11 @@ class vt100_video_device : public device_t,
public:
vt100_video_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
- template <class Object> static devcb_base &set_ram_rd_callback(device_t &device, Object &&cb) { return downcast<vt100_video_device &>(device).m_read_ram.set_callback(std::forward<Object>(cb)); }
- template <class Object> static devcb_base &set_vert_freq_intr_wr_callback(device_t &device, Object &&cb) { return downcast<vt100_video_device &>(device).m_write_vert_freq_intr.set_callback(std::forward<Object>(cb)); }
- template <class Object> static devcb_base &set_lba7_wr_callback(device_t &device, Object &&cb) { return downcast<vt100_video_device &>(device).m_write_lba7.set_callback(std::forward<Object>(cb)); }
+ template <class Object> devcb_base &set_ram_rd_callback(Object &&cb) { return m_read_ram.set_callback(std::forward<Object>(cb)); }
+ template <class Object> devcb_base &set_vert_freq_intr_wr_callback(Object &&cb) { return m_write_vert_freq_intr.set_callback(std::forward<Object>(cb)); }
+ template <class Object> devcb_base &set_lba7_wr_callback(Object &&cb) { return m_write_lba7.set_callback(std::forward<Object>(cb)); }
- static void set_chargen_tag(device_t &device, const char *tag) { downcast<vt100_video_device &>(device).m_char_rom.set_tag(tag); }
+ void set_chargen_tag(const char *tag) { m_char_rom.set_tag(tag); }
DECLARE_READ_LINE_MEMBER(lba7_r);
DECLARE_WRITE8_MEMBER(dc012_w);
@@ -108,15 +108,15 @@ DECLARE_DEVICE_TYPE(RAINBOW_VIDEO, rainbow_video_device)
#define MCFG_VT_SET_SCREEN MCFG_VIDEO_SET_SCREEN
#define MCFG_VT_CHARGEN(_tag) \
- vt100_video_device::set_chargen_tag(*device, "^" _tag);
+ downcast<vt100_video_device &>(*device).set_chargen_tag("^" _tag);
#define MCFG_VT_VIDEO_RAM_CALLBACK(_read) \
- devcb = &vt100_video_device::set_ram_rd_callback(*device, DEVCB_##_read);
+ devcb = &downcast<vt100_video_device &>(*device).set_ram_rd_callback(DEVCB_##_read);
#define MCFG_VT_VIDEO_VERT_FREQ_INTR_CALLBACK(_write) \
- devcb = &vt100_video_device::set_vert_freq_intr_wr_callback(*device, DEVCB_##_write);
+ devcb = &downcast<vt100_video_device &>(*device).set_vert_freq_intr_wr_callback(DEVCB_##_write);
#define MCFG_VT_VIDEO_LBA7_CALLBACK(_write) \
- devcb = &vt100_video_device::set_lba7_wr_callback(*device, DEVCB_##_write);
+ devcb = &downcast<vt100_video_device &>(*device).set_lba7_wr_callback(DEVCB_##_write);
#endif // MAME_VIDEO_VTVIDEO_H
diff --git a/src/mame/video/wpc_dmd.h b/src/mame/video/wpc_dmd.h
index 7af30d9f151..d995b9f27d4 100644
--- a/src/mame/video/wpc_dmd.h
+++ b/src/mame/video/wpc_dmd.h
@@ -12,7 +12,7 @@
#define MCFG_WPC_DMD_ADD( _tag, _scanline_cb ) \
MCFG_DEVICE_ADD( _tag, WPC_DMD, 0 ) \
- devcb = &wpc_dmd_device::set_scanline_cb(*device, DEVCB_##_scanline_cb);
+ devcb = &downcast<wpc_dmd_device &>(*device).set_scanline_cb(DEVCB_##_scanline_cb);
class wpc_dmd_device : public device_t
{
@@ -31,7 +31,7 @@ public:
DECLARE_WRITE8_MEMBER(visible_page_w);
DECLARE_WRITE8_MEMBER(firq_scanline_w);
- template <class Object> static devcb_base &set_scanline_cb(device_t &device, Object &&cb) { return downcast<wpc_dmd_device &>(device).scanline_cb.set_callback(std::forward<Object>(cb)); }
+ template <class Object> devcb_base &set_scanline_cb(Object &&cb) { return scanline_cb.set_callback(std::forward<Object>(cb)); }
protected:
devcb_write_line scanline_cb;
diff --git a/src/mame/video/wswan.h b/src/mame/video/wswan.h
index 40c17e71c9c..687d5e963d2 100644
--- a/src/mame/video/wswan.h
+++ b/src/mame/video/wswan.h
@@ -35,13 +35,13 @@ typedef device_delegate<void (void)> wswan_video_dmasnd_cb_delegate;
#define WSWAN_VIDEO_DMASND_CB_MEMBER(_name) void _name(void)
#define MCFG_WSWAN_VIDEO_IRQ_CB(_class, _method) \
- wswan_video_device::set_irq_callback(*device, wswan_video_irq_cb_delegate(&_class::_method, #_class "::" #_method, this));
+ downcast<wswan_video_device &>(*device).set_irq_callback(wswan_video_irq_cb_delegate(&_class::_method, #_class "::" #_method, this));
#define MCFG_WSWAN_VIDEO_DMASND_CB(_class, _method) \
- wswan_video_device::set_dmasnd_callback(*device, wswan_video_dmasnd_cb_delegate(&_class::_method, #_class "::" #_method, this));
+ downcast<wswan_video_device &>(*device).set_dmasnd_callback(wswan_video_dmasnd_cb_delegate(&_class::_method, #_class "::" #_method, this));
#define MCFG_WSWAN_VIDEO_TYPE( _type) \
- wswan_video_device::set_vdp_type(*device, _type);
+ downcast<wswan_video_device &>(*device).set_vdp_type(_type);
class wswan_video_device : public device_t
@@ -51,9 +51,9 @@ public:
~wswan_video_device() {}
// static configuration
- static void set_irq_callback(device_t &device, wswan_video_irq_cb_delegate callback) { downcast<wswan_video_device &>(device).m_set_irq_cb = callback; }
- static void set_dmasnd_callback(device_t &device, wswan_video_dmasnd_cb_delegate callback) { downcast<wswan_video_device &>(device).m_snd_dma_cb = callback; }
- static void set_vdp_type(device_t &device, int type) { downcast<wswan_video_device &>(device).m_vdp_type = type; }
+ 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; }
+ void set_vdp_type(int type) { m_vdp_type = type; }
uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
diff --git a/src/mame/video/ygv608.h b/src/mame/video/ygv608.h
index 82860f1c921..0a3b4ba9896 100644
--- a/src/mame/video/ygv608.h
+++ b/src/mame/video/ygv608.h
@@ -88,13 +88,13 @@ public:
uint32_t update_screen(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
- template <class Object> static devcb_base &static_set_vblank_callback(device_t &device, Object &&cb)
+ template <class Object> devcb_base &set_vblank_callback(Object &&cb)
{
- return downcast<ygv608_device &>(device).m_vblank_handler.set_callback(std::forward<Object>(cb));
+ return m_vblank_handler.set_callback(std::forward<Object>(cb));
}
- template <class Object> static devcb_base &static_set_raster_callback(device_t &device, Object &&cb)
+ template <class Object> devcb_base &set_raster_callback(Object &&cb)
{
- return downcast<ygv608_device &>(device).m_raster_handler.set_callback(std::forward<Object>(cb));
+ return m_raster_handler.set_callback(std::forward<Object>(cb));
}
void regs_map(address_map &map);
@@ -321,10 +321,10 @@ DECLARE_DEVICE_TYPE(YGV608, ygv608_device)
MCFG_GFX_PALETTE(_palette_tag)
#define MCFG_YGV608_VBLANK_HANDLER( _intcallb ) \
- devcb = &ygv608_device::static_set_vblank_callback( *device, DEVCB_##_intcallb );
+ devcb = &downcast<ygv608_device &>(*device).set_vblank_callback(DEVCB_##_intcallb);
#define MCFG_YGV608_RASTER_HANDLER( _intcallb ) \
- devcb = &ygv608_device::static_set_raster_callback( *device, DEVCB_##_intcallb );
+ devcb = &downcast<ygv608_device &>(*device).set_raster_callback(DEVCB_##_intcallb);
#endif
diff --git a/src/mame/video/zx8301.h b/src/mame/video/zx8301.h
index 1c0bb9deb0f..a8509f536aa 100644
--- a/src/mame/video/zx8301.h
+++ b/src/mame/video/zx8301.h
@@ -42,10 +42,10 @@
///*************************************************************************
#define MCFG_ZX8301_CPU(_tag) \
- zx8301_device::static_set_cpu_tag(*device, "^" _tag);
+ downcast<zx8301_device &>(*device).set_cpu_tag("^" _tag);
#define MCFG_ZX8301_VSYNC_CALLBACK(_write) \
- devcb = &zx8301_device::set_vsync_wr_callback(*device, DEVCB_##_write);
+ devcb = &downcast<zx8301_device &>(*device).set_vsync_wr_callback(DEVCB_##_write);
@@ -63,8 +63,8 @@ public:
// construction/destruction
zx8301_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
- template <class Object> static devcb_base &set_vsync_wr_callback(device_t &device, Object &&cb) { return downcast<zx8301_device &>(device).m_write_vsync.set_callback(std::forward<Object>(cb)); }
- static void static_set_cpu_tag(device_t &device, const char *tag) { downcast<zx8301_device &>(device).m_cpu.set_tag(tag); }
+ template <class Object> devcb_base &set_vsync_wr_callback(Object &&cb) { return m_write_vsync.set_callback(std::forward<Object>(cb)); }
+ void set_cpu_tag(const char *tag) { m_cpu.set_tag(tag); }
DECLARE_WRITE8_MEMBER( control_w );
DECLARE_READ8_MEMBER( data_r );