summaryrefslogtreecommitdiffstatshomepage
path: root/src/mame
diff options
context:
space:
mode:
author wilbertpol <wilbertpol@users.noreply.github.com>2018-03-03 18:18:08 +0100
committer Vas Crabb <cuavas@users.noreply.github.com>2018-03-04 04:18:08 +1100
commit3b923d59ccb8d2d8e386392518450006f8e644fe (patch)
tree73c48568e76d69edbde9f96a3f57d173dd05a747 /src/mame
parent25472091b626bd01ef47f11389a4b2ebe0fc0008 (diff)
destaticify initializations (nw) (#3289)
* destaticify initializations (nw) * fix this->set_screen (nw)
Diffstat (limited to 'src/mame')
-rw-r--r--src/mame/drivers/asst128.cpp2
-rw-r--r--src/mame/drivers/at.cpp8
-rw-r--r--src/mame/drivers/europc.cpp6
-rw-r--r--src/mame/drivers/ksys573.cpp2
-rw-r--r--src/mame/drivers/m24.cpp2
-rw-r--r--src/mame/drivers/microvsn.cpp30
-rw-r--r--src/mame/drivers/milton6805.cpp4
-rw-r--r--src/mame/drivers/mtouchxl.cpp18
-rw-r--r--src/mame/drivers/next.cpp2
-rw-r--r--src/mame/drivers/pc.cpp16
-rw-r--r--src/mame/drivers/rainbow.cpp2
-rw-r--r--src/mame/drivers/saturn.cpp10
-rw-r--r--src/mame/drivers/stv.cpp4
-rw-r--r--src/mame/drivers/tandy1t.cpp12
-rw-r--r--src/mame/drivers/tosh1000.cpp6
-rw-r--r--src/mame/drivers/tv990.cpp2
-rw-r--r--src/mame/includes/apollo.h8
-rw-r--r--src/mame/machine/at.cpp2
-rw-r--r--src/mame/machine/fd1094.cpp2
-rw-r--r--src/mame/machine/iteagle_fpga.cpp2
-rw-r--r--src/mame/machine/psxcd.cpp2
-rw-r--r--src/mame/machine/teleprinter.h2
-rw-r--r--src/mame/video/k051316.cpp8
-rw-r--r--src/mame/video/k051960.cpp6
-rw-r--r--src/mame/video/k052109.cpp4
-rw-r--r--src/mame/video/k053244_k053245.cpp4
26 files changed, 83 insertions, 83 deletions
diff --git a/src/mame/drivers/asst128.cpp b/src/mame/drivers/asst128.cpp
index 27d12505463..6273c3e69b3 100644
--- a/src/mame/drivers/asst128.cpp
+++ b/src/mame/drivers/asst128.cpp
@@ -102,7 +102,7 @@ MACHINE_CONFIG_START(asst128_state::asst128)
MCFG_CPU_IRQ_ACKNOWLEDGE_DEVICE("mb:pic8259", pic8259_device, inta_cb)
MCFG_DEVICE_ADD("mb", ASST128_MOTHERBOARD, 0)
- asst128_mb_device::static_set_cputag(*device, "^maincpu");
+ downcast<asst128_mb_device &>(*device).set_cputag("^maincpu");
MCFG_DEVICE_INPUT_DEFAULTS(asst128)
MCFG_DEVICE_MODIFY("mb:cassette")
diff --git a/src/mame/drivers/at.cpp b/src/mame/drivers/at.cpp
index f19fec5d715..c918083fd8f 100644
--- a/src/mame/drivers/at.cpp
+++ b/src/mame/drivers/at.cpp
@@ -392,14 +392,14 @@ MACHINE_START_MEMBER(at_state,vrom_fix)
void at_state::cfg_single_1200K(device_t *device)
{
- device_slot_interface::static_set_default_option(*device->subdevice("fdc:0"), "525hd");
- device_slot_interface::static_set_default_option(*device->subdevice("fdc:1"), "");
+ dynamic_cast<device_slot_interface &>(*device->subdevice("fdc:0")).set_default_option("525hd");
+ dynamic_cast<device_slot_interface &>(*device->subdevice("fdc:1")).set_default_option("");
}
void at_state::cfg_single_360K(device_t *device)
{
- device_slot_interface::static_set_default_option(*device->subdevice("fdc:0"), "525dd");
- device_slot_interface::static_set_default_option(*device->subdevice("fdc:1"), "");
+ dynamic_cast<device_slot_interface &>(*device->subdevice("fdc:0")).set_default_option("525dd");
+ dynamic_cast<device_slot_interface &>(*device->subdevice("fdc:1")).set_default_option("");
}
static SLOT_INTERFACE_START( pci_devices )
diff --git a/src/mame/drivers/europc.cpp b/src/mame/drivers/europc.cpp
index ee390c6ff53..7fa2d3cab2e 100644
--- a/src/mame/drivers/europc.cpp
+++ b/src/mame/drivers/europc.cpp
@@ -512,9 +512,9 @@ ADDRESS_MAP_END
/* single built-in 3.5" 720K drive, connector for optional external 3.5" or 5.25" drive */
void europc_pc_state::cfg_builtin_720K(device_t *device)
{
- device_slot_interface::static_set_default_option(*device->subdevice("fdc:0"), "35dd");
- device_slot_interface::static_set_fixed(*device->subdevice("fdc:0"), true);
- device_slot_interface::static_set_default_option(*device->subdevice("fdc:1"), "");
+ dynamic_cast<device_slot_interface &>(*device->subdevice("fdc:0")).set_default_option("35dd");
+ dynamic_cast<device_slot_interface &>(*device->subdevice("fdc:0")).set_fixed(true);
+ dynamic_cast<device_slot_interface &>(*device->subdevice("fdc:1")).set_default_option("");
}
//Euro PC
diff --git a/src/mame/drivers/ksys573.cpp b/src/mame/drivers/ksys573.cpp
index 6498134920f..82943174abf 100644
--- a/src/mame/drivers/ksys573.cpp
+++ b/src/mame/drivers/ksys573.cpp
@@ -1770,7 +1770,7 @@ void ksys573_state::punchmania_cassette_install(device_t *device)
{
auto game = downcast<konami573_cassette_xi_device *>(device);
auto adc0838 = device->subdevice<adc083x_device>("adc0838");
- adc083x_device::set_input_callback(*adc0838, adc083x_device::input_delegate(FUNC(konami573_cassette_xi_device::punchmania_inputs_callback), game));
+ adc0838->set_input_callback(adc083x_device::input_delegate(FUNC(konami573_cassette_xi_device::punchmania_inputs_callback), game));
}
int pad_light[ 6 ];
diff --git a/src/mame/drivers/m24.cpp b/src/mame/drivers/m24.cpp
index dd573ff22b9..4f7ce27b05d 100644
--- a/src/mame/drivers/m24.cpp
+++ b/src/mame/drivers/m24.cpp
@@ -290,7 +290,7 @@ MACHINE_CONFIG_START(m24_state::olivetti)
MCFG_DEVICE_MODIFY("mb:dma8237")
MCFG_I8237_OUT_HREQ_CB(DEVWRITELINE(":", m24_state, dma_hrq_w))
MCFG_DEVICE_MODIFY("mb:pic8259")
- devcb = &pic8259_device::static_set_out_int_callback(*device, DEVCB_DEVWRITELINE(":", m24_state, int_w));
+ devcb = &downcast<pic8259_device &>(*device).set_out_int_callback(DEVCB_DEVWRITELINE(":", m24_state, int_w));
/* software lists */
MCFG_SOFTWARE_LIST_ADD("disk_list","ibm5150")
diff --git a/src/mame/drivers/microvsn.cpp b/src/mame/drivers/microvsn.cpp
index 2a03f0a5793..8a0023422cd 100644
--- a/src/mame/drivers/microvsn.cpp
+++ b/src/mame/drivers/microvsn.cpp
@@ -94,7 +94,7 @@ public:
protected:
required_device<dac_byte_interface> m_dac;
required_device<cpu_device> m_i8021;
- required_device<cpu_device> m_tms1100;
+ required_device<tms1100_cpu_device> m_tms1100;
required_device<generic_slot_device> m_cart;
// Timers
@@ -165,14 +165,14 @@ MACHINE_START_MEMBER(microvision_state, microvision)
MACHINE_RESET_MEMBER(microvision_state, microvision)
{
- for(auto & elem : m_lcd_latch)
+ for (auto & elem : m_lcd_latch)
{
elem = 0;
}
- for(auto & elem : m_lcd)
+ for (auto & elem : m_lcd)
{
- for ( int j = 0; j < 16; j++ )
+ for (int j = 0; j < 16; j++)
{
elem[j] = 0;
}
@@ -184,32 +184,32 @@ MACHINE_RESET_MEMBER(microvision_state, microvision)
m_p2 = 0;
m_t1 = 0;
- m_paddle_timer->adjust( attotime::never );
+ m_paddle_timer->adjust(attotime::never);
- switch ( m_cpu_type )
+ switch (m_cpu_type)
{
case CPU_TYPE_I8021:
- m_i8021->resume( SUSPEND_REASON_DISABLE );
- m_tms1100->suspend( SUSPEND_REASON_DISABLE, 0 );
+ m_i8021->resume(SUSPEND_REASON_DISABLE);
+ m_tms1100->suspend(SUSPEND_REASON_DISABLE, 0);
break;
case CPU_TYPE_TMS1100:
- m_i8021->suspend( SUSPEND_REASON_DISABLE, 0 );
- m_tms1100->resume( SUSPEND_REASON_DISABLE );
+ m_i8021->suspend(SUSPEND_REASON_DISABLE, 0);
+ m_tms1100->resume(SUSPEND_REASON_DISABLE);
- switch ( m_rc_type )
+ switch (m_rc_type)
{
case RC_TYPE_100PF_21_0K:
- static_set_clock( *m_tms1100, 550000 );
+ m_tms1100->set_clock(550000);
break;
case RC_TYPE_100PF_23_2K:
case RC_TYPE_UNKNOWN: // Default to most occurring setting
- static_set_clock( *m_tms1100, 500000 );
+ m_tms1100->set_clock(500000);
break;
case RC_TYPE_100PF_39_4K:
- static_set_clock( *m_tms1100, 300000 );
+ m_tms1100->set_clock(300000);
break;
}
break;
@@ -538,7 +538,7 @@ DEVICE_IMAGE_LOAD_MEMBER(microvision_state, microvsn_cart)
if (pla)
m_pla = 1;
- tms1100_cpu_device::set_output_pla(*m_tms1100, m_pla ? microvision_output_pla_1 : microvision_output_pla_0);
+ m_tms1100->set_output_pla(m_pla ? microvision_output_pla_1 : microvision_output_pla_0);
// Set default setting for PCB type and RC type
m_pcb_type = microvision_state::PCB_TYPE_UNKNOWN;
diff --git a/src/mame/drivers/milton6805.cpp b/src/mame/drivers/milton6805.cpp
index 00cf81a793d..e025a1bc7f4 100644
--- a/src/mame/drivers/milton6805.cpp
+++ b/src/mame/drivers/milton6805.cpp
@@ -126,10 +126,10 @@ MACHINE_CONFIG_START(milton_state::milton)
MCFG_CPU_IO_MAP(io_map)
MCFG_DEVICE_ADD("grom3", TMC0430, 3120000 / 8)
- tmc0430_device::set_region_and_ident(*device, "groms", 0x0000, 0);
+ downcast<tmc0430_device &>(*device).set_region_and_ident("groms", 0x0000, 0);
MCFG_DEVICE_ADD("grom4", TMC0430, 3120000 / 8)
- tmc0430_device::set_region_and_ident(*device, "groms", 0x2000, 1);
+ downcast<tmc0430_device &>(*device).set_region_and_ident("groms", 0x2000, 1);
MCFG_SPEAKER_STANDARD_MONO("speaker")
MCFG_SOUND_ADD("sp0250", SP0250, 3120000)
diff --git a/src/mame/drivers/mtouchxl.cpp b/src/mame/drivers/mtouchxl.cpp
index 0819e03a088..ae158d3e808 100644
--- a/src/mame/drivers/mtouchxl.cpp
+++ b/src/mame/drivers/mtouchxl.cpp
@@ -192,15 +192,15 @@ SLOT_INTERFACE_END
void mtxl_state::cdrom(device_t *device)
{
- auto ide0 = device->subdevice("ide:0");
- device_slot_interface::static_option_reset(*ide0);
- SLOT_INTERFACE_NAME(mt6k_ata_devices)(ide0);
- device_slot_interface::static_set_default_option(*ide0, "cdrom");
- device_slot_interface::static_set_fixed(*ide0, true);
-
- auto ide1 = device->subdevice("ide:1");
- device_slot_interface::static_set_default_option(*ide1, "");
- device_slot_interface::static_set_fixed(*ide1, true);
+ auto ide0 = dynamic_cast<device_slot_interface *>(device->subdevice("ide:0"));
+ ide0->option_reset();
+ SLOT_INTERFACE_NAME(mt6k_ata_devices)(device->subdevice("ide:0"));
+ ide0->set_default_option("cdrom");
+ ide0->set_fixed(true);
+
+ auto ide1 = dynamic_cast<device_slot_interface *>(device->subdevice("ide:1"));
+ ide1->set_default_option("");
+ ide1->set_fixed(true);
MACHINE_CONFIG_END
#endif
diff --git a/src/mame/drivers/next.cpp b/src/mame/drivers/next.cpp
index 65bad1adf83..d6730d13c0f 100644
--- a/src/mame/drivers/next.cpp
+++ b/src/mame/drivers/next.cpp
@@ -572,7 +572,7 @@ WRITE32_MEMBER( next_state::scsictrl_w )
scsictrl = data >> 24;
if(scsictrl & 0x02)
scsi->reset();
- device_t::static_set_clock(*scsi, scsi_clocks[scsictrl >> 6]);
+ scsi->set_clock(scsi_clocks[scsictrl >> 6]);
logerror("SCSIctrl %dMHz int=%s dma=%s dmadir=%s%s%s dest=%s (%08x)\n",
scsi_clocks[scsictrl >> 6]/1000000,
diff --git a/src/mame/drivers/pc.cpp b/src/mame/drivers/pc.cpp
index d3d7f161b19..a927759a2a6 100644
--- a/src/mame/drivers/pc.cpp
+++ b/src/mame/drivers/pc.cpp
@@ -536,22 +536,22 @@ MACHINE_CONFIG_END
void pc_state::cfg_dual_720K(device_t *device)
{
- device_slot_interface::static_set_default_option(*device->subdevice("fdc:0"), "35dd");
- device_slot_interface::static_set_default_option(*device->subdevice("fdc:1"), "35dd");
+ dynamic_cast<device_slot_interface &>(*device->subdevice("fdc:0")).set_default_option("35dd");
+ dynamic_cast<device_slot_interface &>(*device->subdevice("fdc:1")).set_default_option("35dd");
}
void pc_state::cfg_single_360K(device_t *device)
{
- device_slot_interface::static_set_default_option(*device->subdevice("fdc:0"), "525dd");
- device_slot_interface::static_set_fixed(*device->subdevice("fdc:0"), true);
- device_slot_interface::static_set_default_option(*device->subdevice("fdc:1"), "");
+ dynamic_cast<device_slot_interface &>(*device->subdevice("fdc:0")).set_default_option("525dd");
+ dynamic_cast<device_slot_interface &>(*device->subdevice("fdc:0")).set_fixed(true);
+ dynamic_cast<device_slot_interface &>(*device->subdevice("fdc:1")).set_default_option("");
}
void pc_state::cfg_single_720K(device_t *device)
{
- device_slot_interface::static_set_default_option(*device->subdevice("fdc:0"), "35dd");
- device_slot_interface::static_set_fixed(*device->subdevice("fdc:0"), true);
- device_slot_interface::static_set_default_option(*device->subdevice("fdc:1"), "");
+ dynamic_cast<device_slot_interface &>(*device->subdevice("fdc:0")).set_default_option("35dd");
+ dynamic_cast<device_slot_interface &>(*device->subdevice("fdc:0")).set_fixed(true);
+ dynamic_cast<device_slot_interface &>(*device->subdevice("fdc:1")).set_default_option("");
}
//Data General One
diff --git a/src/mame/drivers/rainbow.cpp b/src/mame/drivers/rainbow.cpp
index 18929fd893e..19ff393fb15 100644
--- a/src/mame/drivers/rainbow.cpp
+++ b/src/mame/drivers/rainbow.cpp
@@ -877,7 +877,7 @@ void rainbow_state::machine_start()
m_SCREEN_BLANK = false;
cpu_device *maincpu = machine().device<cpu_device>("maincpu");
- device_execute_interface::static_set_irq_acknowledge_callback(*maincpu, device_irq_acknowledge_delegate(FUNC(rainbow_state::irq_callback), this));
+ maincpu->set_irq_acknowledge_callback(device_irq_acknowledge_delegate(FUNC(rainbow_state::irq_callback), this));
save_item(NAME(m_z80_private));
save_item(NAME(m_z80_mailbox));
diff --git a/src/mame/drivers/saturn.cpp b/src/mame/drivers/saturn.cpp
index 7d1ee0c6f75..2e6c064ec53 100644
--- a/src/mame/drivers/saturn.cpp
+++ b/src/mame/drivers/saturn.cpp
@@ -799,13 +799,13 @@ MACHINE_CONFIG_START(sat_console_state::saturn)
MCFG_CPU_PROGRAM_MAP(sound_mem)
MCFG_SEGA_SCU_ADD("scu")
- sega_scu_device::static_set_hostcpu(*device, "maincpu");
+ downcast<sega_scu_device &>(*device).set_hostcpu("maincpu");
// SH-1
// SMPC MCU, running at 4 MHz (+ custom RTC device that runs at 32.768 KHz)
MCFG_SMPC_HLE_ADD("smpc", XTAL(4'000'000))
- smpc_hle_device::static_set_control_port_tags(*device, "ctrl1", "ctrl2");
+ downcast<smpc_hle_device &>(*device).set_control_port_tags("ctrl1", "ctrl2");
MCFG_SMPC_HLE_PDR1_IN_CB(READ8(sat_console_state, saturn_pdr1_direct_r))
MCFG_SMPC_HLE_PDR2_IN_CB(READ8(sat_console_state, saturn_pdr2_direct_r))
MCFG_SMPC_HLE_PDR1_OUT_CB(WRITE8(sat_console_state, saturn_pdr1_direct_w))
@@ -873,7 +873,7 @@ MACHINE_CONFIG_START(sat_console_state::saturnus)
MCFG_SOFTWARE_LIST_ADD("cart_list","sat_cart")
MCFG_DEVICE_MODIFY("smpc")
- smpc_hle_device::static_set_region_code(*device, 4);
+ downcast<smpc_hle_device &>(*device).set_region_code(4);
MACHINE_CONFIG_END
@@ -888,7 +888,7 @@ MACHINE_CONFIG_START(sat_console_state::saturneu)
MCFG_SOFTWARE_LIST_ADD("cart_list","sat_cart")
MCFG_DEVICE_MODIFY("smpc")
- smpc_hle_device::static_set_region_code(*device, 12);
+ downcast<smpc_hle_device &>(*device).set_region_code(12);
MACHINE_CONFIG_END
MACHINE_CONFIG_START(sat_console_state::saturnjp)
@@ -902,7 +902,7 @@ MACHINE_CONFIG_START(sat_console_state::saturnjp)
MCFG_SOFTWARE_LIST_ADD("cart_list","sat_cart")
MCFG_DEVICE_MODIFY("smpc")
- smpc_hle_device::static_set_region_code(*device, 1);
+ downcast<smpc_hle_device &>(*device).set_region_code(1);
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/stv.cpp b/src/mame/drivers/stv.cpp
index 6bf758c8ad9..d0a12ad2e42 100644
--- a/src/mame/drivers/stv.cpp
+++ b/src/mame/drivers/stv.cpp
@@ -1077,10 +1077,10 @@ MACHINE_CONFIG_START(stv_state::stv)
MCFG_CPU_PROGRAM_MAP(sound_mem)
MCFG_SEGA_SCU_ADD("scu")
- sega_scu_device::static_set_hostcpu(*device, "maincpu");
+ downcast<sega_scu_device &>(*device).set_hostcpu("maincpu");
MCFG_SMPC_HLE_ADD("smpc", XTAL(4'000'000))
- smpc_hle_device::static_set_region_code(*device, 0);
+ downcast<smpc_hle_device &>(*device).set_region_code(0);
MCFG_SMPC_HLE_PDR1_IN_CB(READ8(stv_state, pdr1_input_r))
MCFG_SMPC_HLE_PDR2_IN_CB(READ8(stv_state, pdr2_input_r))
MCFG_SMPC_HLE_PDR1_OUT_CB(WRITE8(stv_state, pdr1_output_w))
diff --git a/src/mame/drivers/tandy1t.cpp b/src/mame/drivers/tandy1t.cpp
index 4e965c29ab6..b401b24ef22 100644
--- a/src/mame/drivers/tandy1t.cpp
+++ b/src/mame/drivers/tandy1t.cpp
@@ -623,15 +623,15 @@ static const gfx_layout t1000_charlayout =
void tandy1000_state::cfg_fdc_35(device_t *device)
{
- device_slot_interface::static_set_default_option(*device->subdevice("fdc:0"), "35dd");
- device_slot_interface::static_set_fixed(*device->subdevice("fdc:0"), true);
- device_slot_interface::static_set_default_option(*device->subdevice("fdc:1"), "");
+ dynamic_cast<device_slot_interface &>(*device->subdevice("fdc:0")).set_default_option("35dd");
+ dynamic_cast<device_slot_interface &>(*device->subdevice("fdc:0")).set_fixed(true);
+ dynamic_cast<device_slot_interface &>(*device->subdevice("fdc:1")).set_default_option("");
}
void tandy1000_state::cfg_fdc_525(device_t *device)
{
- device_slot_interface::static_set_fixed(*device->subdevice("fdc:0"), true);
- device_slot_interface::static_set_default_option(*device->subdevice("fdc:1"), "");
+ dynamic_cast<device_slot_interface &>(*device->subdevice("fdc:0")).set_fixed(true);
+ dynamic_cast<device_slot_interface &>(*device->subdevice("fdc:1")).set_default_option("");
}
static GFXDECODE_START( t1000 )
@@ -640,7 +640,7 @@ GFXDECODE_END
MACHINE_CONFIG_START(tandy1000_state::tandy1000_common)
MCFG_DEVICE_ADD("mb", T1000_MOTHERBOARD, 0)
- t1000_mb_device::static_set_cputag(*device, "^maincpu");
+ downcast<t1000_mb_device &>(*device).set_cputag("^maincpu");
/* video hardware */
MCFG_PCVIDEO_T1000_ADD("pcvideo_t1000")
diff --git a/src/mame/drivers/tosh1000.cpp b/src/mame/drivers/tosh1000.cpp
index 0589cef9f1f..d93bb180ba9 100644
--- a/src/mame/drivers/tosh1000.cpp
+++ b/src/mame/drivers/tosh1000.cpp
@@ -244,9 +244,9 @@ ADDRESS_MAP_END
void tosh1000_state::cfg_fdc_35(device_t *device)
{
- device_slot_interface::static_set_default_option(*device->subdevice("fdc:0"), "35dd");
- device_slot_interface::static_set_fixed(*device->subdevice("fdc:0"), true);
- device_slot_interface::static_set_default_option(*device->subdevice("fdc:1"), "");
+ dynamic_cast<device_slot_interface &>(*device->subdevice("fdc:0")).set_default_option("35dd");
+ dynamic_cast<device_slot_interface &>(*device->subdevice("fdc:0")).set_fixed(true);
+ dynamic_cast<device_slot_interface &>(*device->subdevice("fdc:1")).set_default_option("");
}
MACHINE_CONFIG_START(tosh1000_state::tosh1000)
diff --git a/src/mame/drivers/tv990.cpp b/src/mame/drivers/tv990.cpp
index d3ea90bd866..edda41f49aa 100644
--- a/src/mame/drivers/tv990.cpp
+++ b/src/mame/drivers/tv990.cpp
@@ -351,7 +351,7 @@ INPUT_CHANGED_MEMBER(tv990_state::color)
color = rgb_t::white();
break;
}
- m_screen->static_set_color(*m_screen, color);
+ m_screen->set_color(color);
}
void tv990_state::machine_reset()
diff --git a/src/mame/includes/apollo.h b/src/mame/includes/apollo.h
index ab4a2dd3174..4ad12ecd6b7 100644
--- a/src/mame/includes/apollo.h
+++ b/src/mame/includes/apollo.h
@@ -338,16 +338,16 @@ void apollo_csr_set_status_register(uint16_t mask, uint16_t data);
MCFG_DEVICE_ADD(_tag, APOLLO_SIO, _clock)
#define MCFG_APOLLO_SIO_IRQ_CALLBACK(_cb) \
- devcb = &apollo_sio::set_irq_cb(*device, DEVCB_##_cb);
+ devcb = &downcast<apollo_sio &>(*device).set_irq_cb(DEVCB_##_cb);
#define MCFG_APOLLO_SIO_A_TX_CALLBACK(_cb) \
- devcb = &apollo_sio::set_a_tx_cb(*device, DEVCB_##_cb);
+ devcb = &downcast<apollo_sio &>(*device).set_a_tx_cb(DEVCB_##_cb);
#define MCFG_APOLLO_SIO_B_TX_CALLBACK(_cb) \
- devcb = &apollo_sio::set_b_tx_cb(*device, DEVCB_##_cb);
+ devcb = &downcast<apollo_sio &>(*device).set_b_tx_cb(DEVCB_##_cb);
#define MCFG_APOLLO_SIO_OUTPORT_CALLBACK(_cb) \
- devcb = &apollo_sio::set_outport_cb(*device, DEVCB_##_cb);
+ devcb = &downcast<apollo_sio &>(*device).set_outport_cb(DEVCB_##_cb);
class apollo_sio: public duart_base_device
{
diff --git a/src/mame/machine/at.cpp b/src/mame/machine/at.cpp
index 773d8494d88..9502d532fce 100644
--- a/src/mame/machine/at.cpp
+++ b/src/mame/machine/at.cpp
@@ -43,7 +43,7 @@ void at_mb_device::device_reset()
void at_mb_device::device_start()
{
if(!strncmp(m_maincpu->shortname(), "i80286", 6))
- i80286_cpu_device::static_set_a20_callback(*m_maincpu, i80286_cpu_device::a20_cb(&at_mb_device::a20_286, this));
+ downcast<i80286_cpu_device *>(m_maincpu.target())->set_a20_callback(i80286_cpu_device::a20_cb(&at_mb_device::a20_286, this));
}
MACHINE_CONFIG_START(at_mb_device::at_softlists)
diff --git a/src/mame/machine/fd1094.cpp b/src/mame/machine/fd1094.cpp
index 590e582caf4..1692c2f969c 100644
--- a/src/mame/machine/fd1094.cpp
+++ b/src/mame/machine/fd1094.cpp
@@ -655,7 +655,7 @@ void fd1094_device::device_start()
// register for the state changing callbacks we need in the m68000
set_cmpild_callback(write32_delegate(FUNC(fd1094_device::cmp_callback),this));
set_rte_callback(write_line_delegate(FUNC(fd1094_device::rte_callback),this));
- static_set_irq_acknowledge_callback(*this, device_irq_acknowledge_delegate(FUNC(fd1094_device::irq_callback), this));
+ set_irq_acknowledge_callback(device_irq_acknowledge_delegate(FUNC(fd1094_device::irq_callback), this));
// save state
save_item(NAME(m_state));
diff --git a/src/mame/machine/iteagle_fpga.cpp b/src/mame/machine/iteagle_fpga.cpp
index 54595db3a3f..81aeec15293 100644
--- a/src/mame/machine/iteagle_fpga.cpp
+++ b/src/mame/machine/iteagle_fpga.cpp
@@ -689,7 +689,7 @@ void iteagle_eeprom_device::device_start()
}
m_iteagle_default_eeprom[0x3f] = checkSum;
- eeprom_base_device::static_set_default_data(*m_eeprom, m_iteagle_default_eeprom.data(), 0x80);
+ m_eeprom->set_default_data(m_iteagle_default_eeprom.data(), 0x80);
pci_device::device_start();
skip_map_regs(1);
diff --git a/src/mame/machine/psxcd.cpp b/src/mame/machine/psxcd.cpp
index b26bc7a9e5c..f8acf75be68 100644
--- a/src/mame/machine/psxcd.cpp
+++ b/src/mame/machine/psxcd.cpp
@@ -89,7 +89,7 @@ psxcd_device::psxcd_device(const machine_config &mconfig, const char *tag, devic
cdrom_image_device(mconfig, PSXCD, tag, owner, clock),
m_irq_handler(*this)
{
- static_set_interface(*this, "psx_cdrom");
+ set_interface("psx_cdrom");
}
diff --git a/src/mame/machine/teleprinter.h b/src/mame/machine/teleprinter.h
index 9ad5d73aabb..2c6948de5e7 100644
--- a/src/mame/machine/teleprinter.h
+++ b/src/mame/machine/teleprinter.h
@@ -15,7 +15,7 @@
#define TELEPRINTER_SCREEN_TAG "tty_screen"
#define MCFG_GENERIC_TELEPRINTER_KEYBOARD_CB(cb) \
- generic_terminal_device::set_keyboard_callback(*device, KEYBOARDCB_##cb);
+ downcast<generic_terminal_device &>(*device).set_keyboard_callback(KEYBOARDCB_##cb);
/***************************************************************************
FUNCTION PROTOTYPES
diff --git a/src/mame/video/k051316.cpp b/src/mame/video/k051316.cpp
index 0c2d8514af0..528a7e6cbb8 100644
--- a/src/mame/video/k051316.cpp
+++ b/src/mame/video/k051316.cpp
@@ -121,19 +121,19 @@ void k051316_device::set_bpp(int bpp)
switch(bpp)
{
case 4:
- device_gfx_interface::static_set_info(*this, gfxinfo);
+ set_info(gfxinfo);
m_pixels_per_byte = 2;
break;
case 7:
- device_gfx_interface::static_set_info(*this, gfxinfo7);
+ set_info(gfxinfo7);
m_pixels_per_byte = 1;
break;
case 8:
- device_gfx_interface::static_set_info(*this, gfxinfo8);
+ set_info(gfxinfo8);
m_pixels_per_byte = 1;
break;
case -4:
- device_gfx_interface::static_set_info(*this, gfxinfo4_ram);
+ set_info(gfxinfo4_ram);
m_pixels_per_byte = 2;
break;
default:
diff --git a/src/mame/video/k051960.cpp b/src/mame/video/k051960.cpp
index bf78ecdfceb..9a922bde19b 100644
--- a/src/mame/video/k051960.cpp
+++ b/src/mame/video/k051960.cpp
@@ -150,15 +150,15 @@ void k051960_device::set_plane_order(int order)
switch (order)
{
case K051960_PLANEORDER_BASE:
- device_gfx_interface::static_set_info(*this, gfxinfo);
+ set_info(gfxinfo);
break;
case K051960_PLANEORDER_MIA:
- device_gfx_interface::static_set_info(*this, gfxinfo_reverse);
+ set_info(gfxinfo_reverse);
break;
case K051960_PLANEORDER_GRADIUS3:
- device_gfx_interface::static_set_info(*this, gfxinfo_gradius3);
+ set_info(gfxinfo_gradius3);
break;
default:
diff --git a/src/mame/video/k052109.cpp b/src/mame/video/k052109.cpp
index bdb6d4fb6c1..de9c8fcd5b8 100644
--- a/src/mame/video/k052109.cpp
+++ b/src/mame/video/k052109.cpp
@@ -191,9 +191,9 @@ k052109_device::k052109_device(const machine_config &mconfig, const char *tag, d
void k052109_device::set_ram(bool ram)
{
if (ram)
- device_gfx_interface::static_set_info(*this, gfxinfo_ram);
+ set_info(gfxinfo_ram);
else
- device_gfx_interface::static_set_info(*this, gfxinfo);
+ set_info(gfxinfo);
}
diff --git a/src/mame/video/k053244_k053245.cpp b/src/mame/video/k053244_k053245.cpp
index e1c422d18b7..6c3d8f3ed34 100644
--- a/src/mame/video/k053244_k053245.cpp
+++ b/src/mame/video/k053244_k053245.cpp
@@ -101,10 +101,10 @@ void k05324x_device::set_bpp(int bpp)
switch(bpp)
{
case 4:
- device_gfx_interface::static_set_info(*this, gfxinfo);
+ set_info(gfxinfo);
break;
case 6:
- device_gfx_interface::static_set_info(*this, gfxinfo_6bpp);
+ set_info(gfxinfo_6bpp);
break;
default:
fatalerror("Unsupported bpp\n");