diff options
Diffstat (limited to 'src')
149 files changed, 424 insertions, 420 deletions
diff --git a/src/devices/bus/cbmiec/c1571.cpp b/src/devices/bus/cbmiec/c1571.cpp index e0118b1b868..432dc99e23f 100644 --- a/src/devices/bus/cbmiec/c1571.cpp +++ b/src/devices/bus/cbmiec/c1571.cpp @@ -916,7 +916,7 @@ void c1571_t::device_start() // install image callbacks m_ga->set_floppy(m_floppy); //m_fdc->set_floppy(m_floppy); - m_floppy->setup_wpt_cb(floppy_image_device::wpt_cb(FUNC(c1571_t::wpt_callback), this)); + m_floppy->setup_wpt_cb(floppy_image_device::wpt_cb(&c1571_t::wpt_callback, this)); // register for state saving save_item(NAME(m_1_2mhz)); diff --git a/src/devices/bus/cpc/mface2.cpp b/src/devices/bus/cpc/mface2.cpp index 769b2c82fa2..7832de1ba7c 100644 --- a/src/devices/bus/cpc/mface2.cpp +++ b/src/devices/bus/cpc/mface2.cpp @@ -66,7 +66,7 @@ DIRECT_UPDATE_MEMBER( cpc_multiface2_device::amstrad_multiface_directoverride ) m_romdis=0; /* clear op base override */ - machine().device("maincpu")->memory().space(AS_PROGRAM).set_direct_update_handler(direct_update_delegate(FUNC(cpc_multiface2_device::amstrad_default),this)); + machine().device("maincpu")->memory().space(AS_PROGRAM).set_direct_update_handler(direct_update_delegate(&cpc_multiface2_device::amstrad_default,this)); } return pc; @@ -158,7 +158,7 @@ void cpc_multiface2_device::multiface_stop() m_slot->nmi_w(0); /* initialise 0065 override to monitor calls to 0065 */ - machine().device("maincpu")->memory().space(AS_PROGRAM).set_direct_update_handler(direct_update_delegate(FUNC(cpc_multiface2_device::amstrad_multiface_directoverride),this)); + machine().device("maincpu")->memory().space(AS_PROGRAM).set_direct_update_handler(direct_update_delegate(&cpc_multiface2_device::amstrad_multiface_directoverride,this)); } } diff --git a/src/devices/bus/generic/slot.h b/src/devices/bus/generic/slot.h index 434f68fba10..11e7aeb08ca 100644 --- a/src/devices/bus/generic/slot.h +++ b/src/devices/bus/generic/slot.h @@ -82,10 +82,10 @@ enum static_cast<generic_slot_device *>(device)->set_extensions(_ext); #define MCFG_GENERIC_LOAD(_class, _method) \ - generic_slot_device::static_set_device_load(*device, device_image_load_delegate(&DEVICE_IMAGE_LOAD_NAME(_class,_method), #_class "::device_image_load_" #_method, downcast<_class *>(owner))); + generic_slot_device::static_set_device_load(*device, device_image_load_delegate(&DEVICE_IMAGE_LOAD_NAME(_class,_method), downcast<_class *>(owner))); #define MCFG_GENERIC_UNLOAD(_class, _method) \ - generic_slot_device::static_set_device_unload(*device, device_image_func_delegate(&DEVICE_IMAGE_UNLOAD_NAME(_class,_method), #_class "::device_image_unload_" #_method, downcast<_class *>(owner))); + generic_slot_device::static_set_device_unload(*device, device_image_func_delegate(&DEVICE_IMAGE_UNLOAD_NAME(_class,_method), downcast<_class *>(owner))); diff --git a/src/devices/bus/isa/pgc.cpp b/src/devices/bus/isa/pgc.cpp index 6238e218592..8225c4724fc 100644 --- a/src/devices/bus/isa/pgc.cpp +++ b/src/devices/bus/isa/pgc.cpp @@ -246,7 +246,7 @@ void isa8_pgc_device::device_start() m_eram = std::make_unique<uint8_t[]>(0x8000); - machine().add_notifier(MACHINE_NOTIFY_RESET, machine_notify_delegate(FUNC(isa8_pgc_device::reset_common), this)); + machine().add_notifier(MACHINE_NOTIFY_RESET, machine_notify_delegate(&isa8_pgc_device::reset_common, this)); } void isa8_pgc_device::reset_common() diff --git a/src/devices/bus/psx/ctlrport.cpp b/src/devices/bus/psx/ctlrport.cpp index dfbfca0ef48..229d9fb8b61 100644 --- a/src/devices/bus/psx/ctlrport.cpp +++ b/src/devices/bus/psx/ctlrport.cpp @@ -55,8 +55,8 @@ void psxcontrollerports_device::device_start() m_port0 = machine().device<psx_controller_port_device>("port1"); m_port1 = machine().device<psx_controller_port_device>("port2"); - m_port0->setup_ack_cb(psx_controller_port_device::void_cb(FUNC(psxcontrollerports_device::ack), this)); - m_port1->setup_ack_cb(psx_controller_port_device::void_cb(FUNC(psxcontrollerports_device::ack), this)); + m_port0->setup_ack_cb(psx_controller_port_device::void_cb(&psxcontrollerports_device::ack, this)); + m_port1->setup_ack_cb(psx_controller_port_device::void_cb(&psxcontrollerports_device::ack, this)); } // add controllers to define so they can be connected to the multitap diff --git a/src/devices/bus/psx/multitap.cpp b/src/devices/bus/psx/multitap.cpp index e71e6175dd7..f783aa9ab94 100644 --- a/src/devices/bus/psx/multitap.cpp +++ b/src/devices/bus/psx/multitap.cpp @@ -34,10 +34,10 @@ machine_config_constructor psx_multitap_device::device_mconfig_additions() const void psx_multitap_device::device_start() { - m_porta->setup_ack_cb(psx_controller_port_device::void_cb(FUNC(psx_multitap_device::ack), this)); - m_portb->setup_ack_cb(psx_controller_port_device::void_cb(FUNC(psx_multitap_device::ack), this)); - m_portc->setup_ack_cb(psx_controller_port_device::void_cb(FUNC(psx_multitap_device::ack), this)); - m_portd->setup_ack_cb(psx_controller_port_device::void_cb(FUNC(psx_multitap_device::ack), this)); + m_porta->setup_ack_cb(psx_controller_port_device::void_cb(&psx_multitap_device::ack, this)); + m_portb->setup_ack_cb(psx_controller_port_device::void_cb(&psx_multitap_device::ack, this)); + m_portc->setup_ack_cb(psx_controller_port_device::void_cb(&psx_multitap_device::ack, this)); + m_portd->setup_ack_cb(psx_controller_port_device::void_cb(&psx_multitap_device::ack, this)); m_nextmode = false; save_item(NAME(m_activeport)); diff --git a/src/devices/bus/ti99_peb/hfdc.cpp b/src/devices/bus/ti99_peb/hfdc.cpp index 6554f687f25..f3ea9740a16 100644 --- a/src/devices/bus/ti99_peb/hfdc.cpp +++ b/src/devices/bus/ti99_peb/hfdc.cpp @@ -728,7 +728,7 @@ void myarc_hfdc_device::connect_floppy_unit(int index) // The controller fetches the state with the auxbus access if (TRACE_LINES) logerror("Connect index callback DSK%d\n", index+1); if (m_current_floppy != nullptr) - m_current_floppy->setup_index_pulse_cb(floppy_image_device::index_pulse_cb(FUNC(myarc_hfdc_device::floppy_index_callback), this)); + m_current_floppy->setup_index_pulse_cb(floppy_image_device::index_pulse_cb(&myarc_hfdc_device::floppy_index_callback, this)); else logerror("Connection to DSK%d failed because no drive is connected\n", index+1); m_hdc9234->connect_floppy_drive(m_floppy_unit[index]); @@ -753,9 +753,9 @@ void myarc_hfdc_device::connect_harddisk_unit(int index) if (TRACE_LINES) logerror("Connect index callback WDS%d\n", index+1); if (m_current_harddisk != nullptr) { - m_current_harddisk->setup_index_pulse_cb(mfm_harddisk_device::index_pulse_cb(FUNC(myarc_hfdc_device::harddisk_index_callback), this)); - m_current_harddisk->setup_ready_cb(mfm_harddisk_device::ready_cb(FUNC(myarc_hfdc_device::harddisk_ready_callback), this)); - m_current_harddisk->setup_seek_complete_cb(mfm_harddisk_device::seek_complete_cb(FUNC(myarc_hfdc_device::harddisk_skcom_callback), this)); + m_current_harddisk->setup_index_pulse_cb(mfm_harddisk_device::index_pulse_cb(&myarc_hfdc_device::harddisk_index_callback, this)); + m_current_harddisk->setup_ready_cb(mfm_harddisk_device::ready_cb(&myarc_hfdc_device::harddisk_ready_callback, this)); + m_current_harddisk->setup_seek_complete_cb(mfm_harddisk_device::seek_complete_cb(&myarc_hfdc_device::harddisk_skcom_callback, this)); } else logerror("Connection to WDS%d failed because no drive is connected\n", index+1); diff --git a/src/devices/bus/ti99_peb/ti_fdc.cpp b/src/devices/bus/ti99_peb/ti_fdc.cpp index 3fef602c3fb..c8d71dbd9a4 100644 --- a/src/devices/bus/ti99_peb/ti_fdc.cpp +++ b/src/devices/bus/ti99_peb/ti_fdc.cpp @@ -380,7 +380,7 @@ void ti_fdc_device::device_start() m_motor_on_timer = timer_alloc(MOTOR_TIMER); m_cru_base = 0x1100; // In case we implement a callback after all: - // m_fd1771->setup_ready_cb(wd_fdc_t::rline_cb(FUNC(ti_fdc_device::dvena_r), this)); + // m_fd1771->setup_ready_cb(wd_fdc_t::rline_cb(&ti_fdc_device::dvena_r, this)); save_item(NAME(m_address)); save_item(NAME(m_DRQ)); diff --git a/src/devices/bus/vtech/memexp/floppy.cpp b/src/devices/bus/vtech/memexp/floppy.cpp index 6da28bee463..c5645606f52 100644 --- a/src/devices/bus/vtech/memexp/floppy.cpp +++ b/src/devices/bus/vtech/memexp/floppy.cpp @@ -157,7 +157,7 @@ WRITE8_MEMBER(floppy_controller_device::latch_w) if(newflop) { newflop->set_rpm(85); newflop->mon_w(0); - newflop->setup_index_pulse_cb(floppy_image_device::index_pulse_cb(FUNC(floppy_controller_device::index_callback), this)); + newflop->setup_index_pulse_cb(floppy_image_device::index_pulse_cb(&floppy_controller_device::index_callback, this)); m_current_cyl = newflop->get_cyl() << 1; } m_floppy = newflop; diff --git a/src/devices/cpu/drcbec.cpp b/src/devices/cpu/drcbec.cpp index d8e093f126c..28a4abdd9be 100644 --- a/src/devices/cpu/drcbec.cpp +++ b/src/devices/cpu/drcbec.cpp @@ -288,7 +288,7 @@ drcbe_c::drcbe_c(drcuml_state &drcuml, device_t &device, drc_cache &cache, uint3 m_hash(cache, modes, addrbits, ignorebits), m_map(cache, 0), m_labels(cache), - m_fixup_delegate(FUNC(drcbe_c::fixup_label), this) + m_fixup_delegate(&drcbe_c::fixup_label, this) { } diff --git a/src/devices/cpu/drcbeut.cpp b/src/devices/cpu/drcbeut.cpp index 265740d463c..3c752f9bcfd 100644 --- a/src/devices/cpu/drcbeut.cpp +++ b/src/devices/cpu/drcbeut.cpp @@ -435,7 +435,7 @@ uint32_t drc_map_variables::get_last_value(uint32_t mapvar) drc_label_list::drc_label_list(drc_cache &cache) : m_cache(cache), - m_oob_callback_delegate(FUNC(drc_label_list::oob_callback), this) + m_oob_callback_delegate(&drc_label_list::oob_callback, this) { } diff --git a/src/devices/cpu/drcbex64.cpp b/src/devices/cpu/drcbex64.cpp index 78dd9146ee2..3c136fff783 100644 --- a/src/devices/cpu/drcbex64.cpp +++ b/src/devices/cpu/drcbex64.cpp @@ -622,8 +622,8 @@ drcbe_x64::drcbe_x64(drcuml_state &drcuml, device_t &device, drc_cache &cache, u m_entry(nullptr), m_exit(nullptr), m_nocode(nullptr), - m_fixup_label(FUNC(drcbe_x64::fixup_label), this), - m_fixup_exception(FUNC(drcbe_x64::fixup_exception), this), + m_fixup_label(&drcbe_x64::fixup_label, this), + m_fixup_exception(&drcbe_x64::fixup_exception, this), m_near(*(near_state *)cache.alloc_near(sizeof(m_near))) { // build up necessary arrays diff --git a/src/devices/cpu/drcbex86.cpp b/src/devices/cpu/drcbex86.cpp index 7cc67502093..5f7bf220ef2 100644 --- a/src/devices/cpu/drcbex86.cpp +++ b/src/devices/cpu/drcbex86.cpp @@ -542,8 +542,8 @@ drcbe_x86::drcbe_x86(drcuml_state &drcuml, device_t &device, drc_cache &cache, u m_hashstacksave(nullptr), m_reslo(0), m_reshi(0), - m_fixup_label(FUNC(drcbe_x86::fixup_label), this), - m_fixup_exception(FUNC(drcbe_x86::fixup_exception), this) + m_fixup_label(&drcbe_x86::fixup_label, this), + m_fixup_exception(&drcbe_x86::fixup_exception, this) { // compute hi pointers for each register for (int regnum = 0; regnum < ARRAY_LENGTH(int_register_map); regnum++) diff --git a/src/devices/cpu/i86/i286.h b/src/devices/cpu/i86/i286.h index ea47badb7fc..82694e1dc52 100644 --- a/src/devices/cpu/i86/i286.h +++ b/src/devices/cpu/i86/i286.h @@ -156,7 +156,7 @@ private: }; #define MCFG_80286_A20(_class, _a20_cb) \ - i80286_cpu_device::static_set_a20_callback(*device, i80286_cpu_device::a20_cb(FUNC(_class::_a20_cb), (_class *)owner)); + i80286_cpu_device::static_set_a20_callback(*device, i80286_cpu_device::a20_cb(&_class::_a20_cb, (_class *)owner)); #define MCFG_80286_SHUTDOWN(_devcb) \ devcb = &i80286_cpu_device::static_set_shutdown_callback(*device, DEVCB_##_devcb); diff --git a/src/devices/cpu/m68000/m68kcpu.cpp b/src/devices/cpu/m68000/m68kcpu.cpp index 9a08cf5f101..4af6e2c82ed 100644 --- a/src/devices/cpu/m68000/m68kcpu.cpp +++ b/src/devices/cpu/m68000/m68kcpu.cpp @@ -1231,13 +1231,13 @@ void m68000_base_device::init8(address_space &space, address_space &ospace) // m_cpustate = this; opcode_xor = 0; - readimm16 = m68k_readimm16_delegate(FUNC(m68000_base_device::m68008_read_immediate_16), this); - read8 = m68k_read8_delegate(FUNC(address_space::read_byte), &space); - read16 = m68k_read16_delegate(FUNC(address_space::read_word), &space); - read32 = m68k_read32_delegate(FUNC(address_space::read_dword), &space); - write8 = m68k_write8_delegate(FUNC(address_space::write_byte), &space); - write16 = m68k_write16_delegate(FUNC(address_space::write_word), &space); - write32 = m68k_write32_delegate(FUNC(address_space::write_dword), &space); + readimm16 = m68k_readimm16_delegate(&m68000_base_device::m68008_read_immediate_16, this); + read8 = m68k_read8_delegate(&address_space::read_byte, &space); + read16 = m68k_read16_delegate(&address_space::read_word, &space); + read32 = m68k_read32_delegate(&address_space::read_dword, &space); + write8 = m68k_write8_delegate(&address_space::write_byte, &space); + write16 = m68k_write16_delegate(&address_space::write_word, &space); + write32 = m68k_write32_delegate(&address_space::write_dword, &space); } /**************************************************************************** @@ -1270,13 +1270,13 @@ void m68000_base_device::init16(address_space &space, address_space &ospace) opcode_xor = 0; - readimm16 = m68k_readimm16_delegate(FUNC(m68000_base_device::simple_read_immediate_16), this); - read8 = m68k_read8_delegate(FUNC(address_space::read_byte), &space); - read16 = m68k_read16_delegate(FUNC(address_space::read_word), &space); - read32 = m68k_read32_delegate(FUNC(address_space::read_dword), &space); - write8 = m68k_write8_delegate(FUNC(m68000_base_device::m68000_write_byte), this); - write16 = m68k_write16_delegate(FUNC(address_space::write_word), &space); - write32 = m68k_write32_delegate(FUNC(address_space::write_dword), &space); + readimm16 = m68k_readimm16_delegate(&m68000_base_device::simple_read_immediate_16, this); + read8 = m68k_read8_delegate(&address_space::read_byte, &space); + read16 = m68k_read16_delegate(&address_space::read_word, &space); + read32 = m68k_read32_delegate(&address_space::read_dword, &space); + write8 = m68k_write8_delegate(&m68000_base_device::m68000_write_byte, this); + write16 = m68k_write16_delegate(&address_space::write_word, &space); + write32 = m68k_write32_delegate(&address_space::write_dword, &space); } @@ -1296,13 +1296,13 @@ void m68000_base_device::init32(address_space &space, address_space &ospace) m_odirect = &ospace.direct(); opcode_xor = WORD_XOR_BE(0); - readimm16 = m68k_readimm16_delegate(FUNC(m68000_base_device::read_immediate_16), this); - read8 = m68k_read8_delegate(FUNC(address_space::read_byte), &space); - read16 = m68k_read16_delegate(FUNC(address_space::read_word_unaligned), &space); - read32 = m68k_read32_delegate(FUNC(address_space::read_dword_unaligned), &space); - write8 = m68k_write8_delegate(FUNC(address_space::write_byte), &space); - write16 = m68k_write16_delegate(FUNC(address_space::write_word_unaligned), &space); - write32 = m68k_write32_delegate(FUNC(address_space::write_dword_unaligned), &space); + readimm16 = m68k_readimm16_delegate(&m68000_base_device::read_immediate_16, this); + read8 = m68k_read8_delegate(&address_space::read_byte, &space); + read16 = m68k_read16_delegate(&address_space::read_word_unaligned, &space); + read32 = m68k_read32_delegate(&address_space::read_dword_unaligned, &space); + write8 = m68k_write8_delegate(&address_space::write_byte, &space); + write16 = m68k_write16_delegate(&address_space::write_word_unaligned, &space); + write32 = m68k_write32_delegate(&address_space::write_dword_unaligned, &space); } /* interface for 32-bit data bus with PMMU (68EC020, 68020) */ @@ -1515,13 +1515,13 @@ void m68000_base_device::init32mmu(address_space &space, address_space &ospace) m_odirect = &ospace.direct(); opcode_xor = WORD_XOR_BE(0); - readimm16 = m68k_readimm16_delegate(FUNC(m68000_base_device::read_immediate_16_mmu), this); - read8 = m68k_read8_delegate(FUNC(m68000_base_device::read_byte_32_mmu), this); - read16 = m68k_read16_delegate(FUNC(m68000_base_device::readword_d32_mmu), this); - read32 = m68k_read32_delegate(FUNC(m68000_base_device::readlong_d32_mmu), this); - write8 = m68k_write8_delegate(FUNC(m68000_base_device::write_byte_32_mmu), this); - write16 = m68k_write16_delegate(FUNC(m68000_base_device::writeword_d32_mmu), this); - write32 = m68k_write32_delegate(FUNC(m68000_base_device::writelong_d32_mmu), this); + readimm16 = m68k_readimm16_delegate(&m68000_base_device::read_immediate_16_mmu, this); + read8 = m68k_read8_delegate(&m68000_base_device::read_byte_32_mmu, this); + read16 = m68k_read16_delegate(&m68000_base_device::readword_d32_mmu, this); + read32 = m68k_read32_delegate(&m68000_base_device::readlong_d32_mmu, this); + write8 = m68k_write8_delegate(&m68000_base_device::write_byte_32_mmu, this); + write16 = m68k_write16_delegate(&m68000_base_device::writeword_d32_mmu, this); + write32 = m68k_write32_delegate(&m68000_base_device::writelong_d32_mmu, this); } @@ -1643,13 +1643,13 @@ void m68000_base_device::init32hmmu(address_space &space, address_space &ospace) m_odirect = &ospace.direct(); opcode_xor = WORD_XOR_BE(0); - readimm16 = m68k_readimm16_delegate(FUNC(m68000_base_device::read_immediate_16_hmmu), this); - read8 = m68k_read8_delegate(FUNC(m68000_base_device::read_byte_32_hmmu), this); - read16 = m68k_read16_delegate(FUNC(m68000_base_device::readword_d32_hmmu), this); - read32 = m68k_read32_delegate(FUNC(m68000_base_device::readlong_d32_hmmu), this); - write8 = m68k_write8_delegate(FUNC(m68000_base_device::write_byte_32_hmmu), this); - write16 = m68k_write16_delegate(FUNC(m68000_base_device::writeword_d32_hmmu), this); - write32 = m68k_write32_delegate(FUNC(m68000_base_device::writelong_d32_hmmu), this); + readimm16 = m68k_readimm16_delegate(&m68000_base_device::read_immediate_16_hmmu, this); + read8 = m68k_read8_delegate(&m68000_base_device::read_byte_32_hmmu, this); + read16 = m68k_read16_delegate(&m68000_base_device::readword_d32_hmmu, this); + read32 = m68k_read32_delegate(&m68000_base_device::readlong_d32_hmmu, this); + write8 = m68k_write8_delegate(&m68000_base_device::write_byte_32_hmmu, this); + write16 = m68k_write16_delegate(&m68000_base_device::writeword_d32_hmmu, this); + write32 = m68k_write32_delegate(&m68000_base_device::writelong_d32_hmmu, this); } void m68000_base_device::set_reset_callback(write_line_delegate callback) diff --git a/src/devices/cpu/psx/psx.cpp b/src/devices/cpu/psx/psx.cpp index 9584c58eb27..f69e2bf8d00 100644 --- a/src/devices/cpu/psx/psx.cpp +++ b/src/devices/cpu/psx/psx.cpp @@ -3391,8 +3391,8 @@ static MACHINE_CONFIG_FRAGMENT( psx ) MCFG_PSX_DMA_IRQ_HANDLER( DEVWRITELINE("irq", psxirq_device, intin3 ) ) MCFG_DEVICE_ADD( "mdec", PSX_MDEC, 0 ) - MCFG_PSX_DMA_CHANNEL_WRITE( DEVICE_SELF, 0, psx_dma_write_delegate( FUNC( psxmdec_device::dma_write ), (psxmdec_device *) device ) ) - MCFG_PSX_DMA_CHANNEL_READ( DEVICE_SELF, 1, psx_dma_read_delegate( FUNC( psxmdec_device::dma_read ), (psxmdec_device *) device ) ) + MCFG_PSX_DMA_CHANNEL_WRITE( DEVICE_SELF, 0, psx_dma_write_delegate(&psxmdec_device::dma_write, (psxmdec_device *) device ) ) + MCFG_PSX_DMA_CHANNEL_READ( DEVICE_SELF, 1, psx_dma_read_delegate(&psxmdec_device::dma_read, (psxmdec_device *) device ) ) MCFG_DEVICE_ADD( "rcnt", PSX_RCNT, 0 ) MCFG_PSX_RCNT_IRQ0_HANDLER( DEVWRITELINE( "irq", psxirq_device, intin4 ) ) diff --git a/src/devices/cpu/tms32031/tms32031.cpp b/src/devices/cpu/tms32031/tms32031.cpp index a2a86c8b89a..06c50c7777a 100644 --- a/src/devices/cpu/tms32031/tms32031.cpp +++ b/src/devices/cpu/tms32031/tms32031.cpp @@ -383,7 +383,7 @@ void tms3203x_device::device_start() // set up the internal boot loader ROM m_bootrom = reinterpret_cast<uint32_t*>(memregion(shortname())->base()); - m_direct->set_direct_update(direct_update_delegate(FUNC(tms3203x_device::direct_handler), this)); + m_direct->set_direct_update(direct_update_delegate(&tms3203x_device::direct_handler, this)); // save state save_item(NAME(m_pc)); diff --git a/src/devices/imagedev/diablo.h b/src/devices/imagedev/diablo.h index cb0366728b0..e19cc598fa0 100644 --- a/src/devices/imagedev/diablo.h +++ b/src/devices/imagedev/diablo.h @@ -80,10 +80,10 @@ extern const device_type DIABLO; MCFG_DEVICE_ADD(_tag, DIABLO, 0) #define MCFG_DIABLO_LOAD(_class,_method) \ - diablo_image_device::static_set_device_load(*device, device_image_load_delegate(&DEVICE_IMAGE_LOAD_NAME(_class,_method), #_class "::device_image_load_" #_method, downcast<_class *>(owner))); + diablo_image_device::static_set_device_load(*device, device_image_load_delegate(&DEVICE_IMAGE_LOAD_NAME(_class,_method), downcast<_class *>(owner))); #define MCFG_DIABLO_UNLOAD(_class,_method) \ - diablo_image_device::static_set_device_unload(*device, device_image_func_delegate(&DEVICE_IMAGE_UNLOAD_NAME(_class,_method), #_class "::device_image_unload_" #_method, downcast<_class *>(owner))); + diablo_image_device::static_set_device_unload(*device, device_image_func_delegate(&DEVICE_IMAGE_UNLOAD_NAME(_class,_method), downcast<_class *>(owner))); #define MCFG_DIABLO_INTERFACE(_interface) \ diablo_image_device::static_set_interface(*device, _interface); diff --git a/src/devices/imagedev/harddriv.h b/src/devices/imagedev/harddriv.h index 0302a2b58b0..6347a43f624 100644 --- a/src/devices/imagedev/harddriv.h +++ b/src/devices/imagedev/harddriv.h @@ -84,10 +84,10 @@ extern const device_type HARDDISK; MCFG_DEVICE_ADD(_tag, HARDDISK, 0) #define MCFG_HARDDISK_LOAD(_class,_method) \ - harddisk_image_device::static_set_device_load(*device, device_image_load_delegate(&DEVICE_IMAGE_LOAD_NAME(_class,_method), #_class "::device_image_load_" #_method, downcast<_class *>(owner))); + harddisk_image_device::static_set_device_load(*device, device_image_load_delegate(&DEVICE_IMAGE_LOAD_NAME(_class,_method), downcast<_class *>(owner))); #define MCFG_HARDDISK_UNLOAD(_class,_method) \ - harddisk_image_device::static_set_device_unload(*device, device_image_func_delegate(&DEVICE_IMAGE_UNLOAD_NAME(_class,_method), #_class "::device_image_unload_" #_method, downcast<_class *>(owner))); + harddisk_image_device::static_set_device_unload(*device, device_image_func_delegate(&DEVICE_IMAGE_UNLOAD_NAME(_class,_method), downcast<_class *>(owner))); #define MCFG_HARDDISK_INTERFACE(_interface) \ harddisk_image_device::static_set_interface(*device, _interface); diff --git a/src/devices/imagedev/snapquik.h b/src/devices/imagedev/snapquik.h index c1c421f99cb..6c3c08743b7 100644 --- a/src/devices/imagedev/snapquik.h +++ b/src/devices/imagedev/snapquik.h @@ -79,13 +79,13 @@ extern const device_type QUICKLOAD; #define SNAPSHOT_LOAD_NAME(_class,_name) _class::SNAPSHOT_LOAD_MEMBER_NAME(_name) #define DECLARE_SNAPSHOT_LOAD_MEMBER(_name) image_init_result SNAPSHOT_LOAD_MEMBER_NAME(_name)(device_image_interface &image, const char *file_type, int snapshot_size) #define SNAPSHOT_LOAD_MEMBER(_class,_name) image_init_result SNAPSHOT_LOAD_NAME(_class,_name)(device_image_interface &image, const char *file_type, int snapshot_size) -#define SNAPSHOT_LOAD_DELEGATE(_class,_name) snapquick_load_delegate(&SNAPSHOT_LOAD_NAME(_class,_name),#_class "::snapshot_load_" #_name, downcast<_class *>(device->owner())) +#define SNAPSHOT_LOAD_DELEGATE(_class,_name) snapquick_load_delegate(&SNAPSHOT_LOAD_NAME(_class,_name), downcast<_class *>(device->owner())) #define QUICKLOAD_LOAD_MEMBER_NAME(_name) quickload_load##_name #define QUICKLOAD_LOAD_NAME(_class,_name) _class::QUICKLOAD_LOAD_MEMBER_NAME(_name) #define DECLARE_QUICKLOAD_LOAD_MEMBER(_name) image_init_result QUICKLOAD_LOAD_MEMBER_NAME(_name)(device_image_interface &image, const char *file_type, int quickload_size) #define QUICKLOAD_LOAD_MEMBER(_class,_name) image_init_result QUICKLOAD_LOAD_NAME(_class,_name)(device_image_interface &image, const char *file_type, int quickload_size) -#define QUICKLOAD_LOAD_DELEGATE(_class,_name) snapquick_load_delegate(&QUICKLOAD_LOAD_NAME(_class,_name),#_class "::quickload_load_" #_name, downcast<_class *>(device->owner())) +#define QUICKLOAD_LOAD_DELEGATE(_class,_name) snapquick_load_delegate(&QUICKLOAD_LOAD_NAME(_class,_name), downcast<_class *>(device->owner())) #define MCFG_SNAPSHOT_ADD(_tag, _class, _load, _file_extensions, _delay) \ MCFG_DEVICE_ADD(_tag, SNAPSHOT, 0) \ diff --git a/src/devices/machine/53c810.cpp b/src/devices/machine/53c810.cpp index 91775ef7d13..cdbee6a288e 100644 --- a/src/devices/machine/53c810.cpp +++ b/src/devices/machine/53c810.cpp @@ -636,25 +636,25 @@ void lsi53c810_device::device_start() for (auto & elem : dma_opcode) { - elem = opcode_handler_delegate(FUNC(lsi53c810_device::dmaop_invalid), this); - } - - add_opcode(0x00, 0xc0, opcode_handler_delegate(FUNC( lsi53c810_device::dmaop_block_move ), this)); - add_opcode(0x40, 0xf8, opcode_handler_delegate(FUNC( lsi53c810_device::dmaop_select ), this)); - add_opcode(0x48, 0xf8, opcode_handler_delegate(FUNC( lsi53c810_device::dmaop_wait_disconnect ), this)); - add_opcode(0x50, 0xf8, opcode_handler_delegate(FUNC( lsi53c810_device::dmaop_wait_reselect ), this)); - add_opcode(0x58, 0xf8, opcode_handler_delegate(FUNC( lsi53c810_device::dmaop_set ), this)); - add_opcode(0x60, 0xf8, opcode_handler_delegate(FUNC( lsi53c810_device::dmaop_clear ), this)); - add_opcode(0x68, 0xf8, opcode_handler_delegate(FUNC( lsi53c810_device::dmaop_move_from_sfbr ), this)); - add_opcode(0x70, 0xf8, opcode_handler_delegate(FUNC( lsi53c810_device::dmaop_move_to_sfbr ), this)); - add_opcode(0x78, 0xf8, opcode_handler_delegate(FUNC( lsi53c810_device::dmaop_read_modify_write ), this)); - add_opcode(0x80, 0xf8, opcode_handler_delegate(FUNC( lsi53c810_device::dmaop_jump ), this)); - add_opcode(0x88, 0xf8, opcode_handler_delegate(FUNC( lsi53c810_device::dmaop_call ), this)); - add_opcode(0x90, 0xf8, opcode_handler_delegate(FUNC( lsi53c810_device::dmaop_return ), this)); - add_opcode(0x98, 0xf8, opcode_handler_delegate(FUNC( lsi53c810_device::dmaop_interrupt ), this)); - add_opcode(0xc0, 0xfe, opcode_handler_delegate(FUNC( lsi53c810_device::dmaop_move_memory ), this)); - add_opcode(0xe0, 0xed, opcode_handler_delegate(FUNC( lsi53c810_device::dmaop_store ), this)); - add_opcode(0xe1, 0xed, opcode_handler_delegate(FUNC( lsi53c810_device::dmaop_load ), this)); + elem = opcode_handler_delegate(&lsi53c810_device::dmaop_invalid, this); + } + + add_opcode(0x00, 0xc0, opcode_handler_delegate(&lsi53c810_device::dmaop_block_move, this)); + add_opcode(0x40, 0xf8, opcode_handler_delegate(&lsi53c810_device::dmaop_select, this)); + add_opcode(0x48, 0xf8, opcode_handler_delegate(&lsi53c810_device::dmaop_wait_disconnect, this)); + add_opcode(0x50, 0xf8, opcode_handler_delegate(&lsi53c810_device::dmaop_wait_reselect, this)); + add_opcode(0x58, 0xf8, opcode_handler_delegate(&lsi53c810_device::dmaop_set, this)); + add_opcode(0x60, 0xf8, opcode_handler_delegate(&lsi53c810_device::dmaop_clear, this)); + add_opcode(0x68, 0xf8, opcode_handler_delegate(&lsi53c810_device::dmaop_move_from_sfbr, this)); + add_opcode(0x70, 0xf8, opcode_handler_delegate(&lsi53c810_device::dmaop_move_to_sfbr, this)); + add_opcode(0x78, 0xf8, opcode_handler_delegate(&lsi53c810_device::dmaop_read_modify_write, this)); + add_opcode(0x80, 0xf8, opcode_handler_delegate(&lsi53c810_device::dmaop_jump, this)); + add_opcode(0x88, 0xf8, opcode_handler_delegate(&lsi53c810_device::dmaop_call, this)); + add_opcode(0x90, 0xf8, opcode_handler_delegate(&lsi53c810_device::dmaop_return, this)); + add_opcode(0x98, 0xf8, opcode_handler_delegate(&lsi53c810_device::dmaop_interrupt, this)); + add_opcode(0xc0, 0xfe, opcode_handler_delegate(&lsi53c810_device::dmaop_move_memory, this)); + add_opcode(0xe0, 0xed, opcode_handler_delegate(&lsi53c810_device::dmaop_store, this)); + add_opcode(0xe1, 0xed, opcode_handler_delegate(&lsi53c810_device::dmaop_load, this)); } /************************************* diff --git a/src/devices/machine/68307.cpp b/src/devices/machine/68307.cpp index 70a272a5436..77f85cc22c2 100644 --- a/src/devices/machine/68307.cpp +++ b/src/devices/machine/68307.cpp @@ -162,13 +162,13 @@ void m68307cpu_device::init16_m68307(address_space &space) m_direct = &space.direct(); opcode_xor = 0; - readimm16 = m68k_readimm16_delegate(FUNC(m68307cpu_device::simple_read_immediate_16_m68307), this); - read8 = m68k_read8_delegate(FUNC(m68307cpu_device::read_byte_m68307), this); - read16 = m68k_read16_delegate(FUNC(m68307cpu_device::read_word_m68307), this); - read32 = m68k_read32_delegate(FUNC(m68307cpu_device::read_dword_m68307), this); - write8 = m68k_write8_delegate(FUNC(m68307cpu_device::write_byte_m68307), this); - write16 = m68k_write16_delegate(FUNC(m68307cpu_device::write_word_m68307), this); - write32 = m68k_write32_delegate(FUNC(m68307cpu_device::write_dword_m68307), this); + readimm16 = m68k_readimm16_delegate(&m68307cpu_device::simple_read_immediate_16_m68307, this); + read8 = m68k_read8_delegate(&m68307cpu_device::read_byte_m68307, this); + read16 = m68k_read16_delegate(&m68307cpu_device::read_word_m68307, this); + read32 = m68k_read32_delegate(&m68307cpu_device::read_dword_m68307, this); + write8 = m68k_write8_delegate(&m68307cpu_device::write_byte_m68307, this); + write16 = m68k_write16_delegate(&m68307cpu_device::write_word_m68307, this); + write32 = m68k_write32_delegate(&m68307cpu_device::write_dword_m68307, this); } diff --git a/src/devices/machine/amigafdc.cpp b/src/devices/machine/amigafdc.cpp index 81f7efd2fb5..89a626e46fc 100644 --- a/src/devices/machine/amigafdc.cpp +++ b/src/devices/machine/amigafdc.cpp @@ -463,7 +463,7 @@ WRITE8_MEMBER( amiga_fdc::ciaaprb_w ) if(old_floppy) old_floppy->setup_index_pulse_cb(floppy_image_device::index_pulse_cb()); if(floppy) - floppy->setup_index_pulse_cb(floppy_image_device::index_pulse_cb(FUNC(amiga_fdc::index_callback), this)); + floppy->setup_index_pulse_cb(floppy_image_device::index_pulse_cb(&amiga_fdc::index_callback, this)); } if(floppy) { diff --git a/src/devices/machine/i8271.cpp b/src/devices/machine/i8271.cpp index be0fa7576a0..de4fb7105f0 100644 --- a/src/devices/machine/i8271.cpp +++ b/src/devices/machine/i8271.cpp @@ -51,7 +51,7 @@ void i8271_device::device_start() if(con) { flopi[i].dev = con->get_device(); if (flopi[i].dev != nullptr) - flopi[i].dev->setup_index_pulse_cb(floppy_image_device::index_pulse_cb(FUNC(i8271_device::index_callback), this)); + flopi[i].dev->setup_index_pulse_cb(floppy_image_device::index_pulse_cb(&i8271_device::index_callback, this)); } else flopi[i].dev = nullptr; } else @@ -126,7 +126,7 @@ void i8271_device::set_floppy(floppy_image_device *flop) elem.dev = flop; } if(flop) - flop->setup_index_pulse_cb(floppy_image_device::index_pulse_cb(FUNC(i8271_device::index_callback), this)); + flop->setup_index_pulse_cb(floppy_image_device::index_pulse_cb(&i8271_device::index_callback, this)); } READ8_MEMBER(i8271_device::sr_r) diff --git a/src/devices/machine/laserdsc.cpp b/src/devices/machine/laserdsc.cpp index 6c20da364e4..badbd395354 100644 --- a/src/devices/machine/laserdsc.cpp +++ b/src/devices/machine/laserdsc.cpp @@ -321,7 +321,7 @@ void laserdisc_device::device_start() init_audio(); // register callbacks - machine().configuration().config_register("laserdisc", config_saveload_delegate(FUNC(laserdisc_device::config_load), this), config_saveload_delegate(FUNC(laserdisc_device::config_save), this)); + machine().configuration().config_register("laserdisc", config_saveload_delegate(&laserdisc_device::config_load, this), config_saveload_delegate(&laserdisc_device::config_save, this)); } @@ -792,7 +792,7 @@ void laserdisc_device::init_disc() void laserdisc_device::init_video() { // register for VBLANK callbacks - m_screen->register_vblank_callback(vblank_state_delegate(FUNC(laserdisc_device::vblank_state_changed), this)); + m_screen->register_vblank_callback(vblank_state_delegate(&laserdisc_device::vblank_state_changed, this)); // allocate palette for applying brightness/contrast/gamma m_videopalette = palette_t::alloc(256); diff --git a/src/devices/machine/microtch.h b/src/devices/machine/microtch.h index 070fb65d7e0..0ceb7dada6c 100644 --- a/src/devices/machine/microtch.h +++ b/src/devices/machine/microtch.h @@ -72,7 +72,7 @@ extern const device_type MICROTOUCH; devcb = µtouch_device::static_set_stx_callback(*device, DEVCB_##_devcb); #define MCFG_MICROTOUCH_TOUCH_CB(_class, _touch_cb) \ - microtouch_device::static_set_touch_callback(*device, microtouch_device::touch_cb(FUNC(_class::_touch_cb), (_class *)owner)); + microtouch_device::static_set_touch_callback(*device, microtouch_device::touch_cb(&_class::_touch_cb, (_class *)owner)); #endif //_MICROTOUCH_H diff --git a/src/devices/machine/pci.cpp b/src/devices/machine/pci.cpp index f5e4197b0b9..c10a58306a8 100644 --- a/src/devices/machine/pci.cpp +++ b/src/devices/machine/pci.cpp @@ -446,7 +446,7 @@ void pci_bridge_device::device_start() sub_devices[(id << 3) | fct] = downcast<pci_device *>(&d); } - mapper_cb cf_cb(FUNC(pci_bridge_device::regenerate_config_mapping), this); + mapper_cb cf_cb(&pci_bridge_device::regenerate_config_mapping, this); for(int i=0; i<32*8; i++) if(sub_devices[i]) { @@ -817,7 +817,7 @@ device_t *pci_host_device::bus_root() void pci_host_device::device_start() { - remap_cb = mapper_cb(FUNC(pci_host_device::regenerate_mapping), this); + remap_cb = mapper_cb(&pci_host_device::regenerate_mapping, this); pci_bridge_device::device_start(); diff --git a/src/devices/machine/pckeybrd.cpp b/src/devices/machine/pckeybrd.cpp index 5aa9e00541c..4b6e7713dcd 100644 --- a/src/devices/machine/pckeybrd.cpp +++ b/src/devices/machine/pckeybrd.cpp @@ -336,9 +336,9 @@ void pc_keyboard_device::device_start() memset(m_make, 0, sizeof(m_make)); machine().ioport().natkeyboard().configure( - ioport_queue_chars_delegate(FUNC(pc_keyboard_device::queue_chars), this), - ioport_accept_char_delegate(FUNC(pc_keyboard_device::accept_char), this), - ioport_charqueue_empty_delegate(FUNC(pc_keyboard_device::charqueue_empty), this)); + ioport_queue_chars_delegate(&pc_keyboard_device::queue_chars, this), + ioport_accept_char_delegate(&pc_keyboard_device::accept_char, this), + ioport_charqueue_empty_delegate(&pc_keyboard_device::charqueue_empty, this)); m_out_keypress_func.resolve_safe(); m_keyboard_timer = timer_alloc(); diff --git a/src/devices/machine/upd765.cpp b/src/devices/machine/upd765.cpp index 37b92a68a20..fef20a7a73f 100644 --- a/src/devices/machine/upd765.cpp +++ b/src/devices/machine/upd765.cpp @@ -156,7 +156,7 @@ void upd765_family_device::device_start() if(con) { flopi[i].dev = con->get_device(); if (flopi[i].dev != nullptr) - flopi[i].dev->setup_index_pulse_cb(floppy_image_device::index_pulse_cb(FUNC(upd765_family_device::index_callback), this)); + flopi[i].dev->setup_index_pulse_cb(floppy_image_device::index_pulse_cb(&upd765_family_device::index_callback, this)); } else flopi[i].dev = nullptr; } else @@ -268,7 +268,7 @@ void upd765_family_device::set_floppy(floppy_image_device *flop) elem.dev = flop; } if(flop) - flop->setup_index_pulse_cb(floppy_image_device::index_pulse_cb(FUNC(upd765_family_device::index_callback), this)); + flop->setup_index_pulse_cb(floppy_image_device::index_pulse_cb(&upd765_family_device::index_callback, this)); } READ8_MEMBER(upd765_family_device::sra_r) diff --git a/src/devices/machine/watchdog.cpp b/src/devices/machine/watchdog.cpp index 3dd1664d997..74f0083df72 100644 --- a/src/devices/machine/watchdog.cpp +++ b/src/devices/machine/watchdog.cpp @@ -89,7 +89,7 @@ void watchdog_timer_device::device_start() // fetch the screen screen_device *screen = siblingdevice<screen_device>(m_screen_tag); if (screen != nullptr) - screen->register_vblank_callback(vblank_state_delegate(FUNC(watchdog_timer_device::watchdog_vblank), this)); + screen->register_vblank_callback(vblank_state_delegate(&watchdog_timer_device::watchdog_vblank, this)); } save_item(NAME(m_enabled)); save_item(NAME(m_counter)); diff --git a/src/devices/machine/wd_fdc.cpp b/src/devices/machine/wd_fdc.cpp index c748b155aca..5ae55544f36 100644 --- a/src/devices/machine/wd_fdc.cpp +++ b/src/devices/machine/wd_fdc.cpp @@ -179,8 +179,8 @@ void wd_fdc_t::set_floppy(floppy_image_device *_floppy) if(floppy) { if(motor_control) floppy->mon_w(status & S_MON ? 0 : 1); - floppy->setup_index_pulse_cb(floppy_image_device::index_pulse_cb(FUNC(wd_fdc_t::index_callback), this)); - floppy->setup_ready_cb(floppy_image_device::ready_cb(FUNC(wd_fdc_t::ready_callback), this)); + floppy->setup_index_pulse_cb(floppy_image_device::index_pulse_cb(&wd_fdc_t::index_callback, this)); + floppy->setup_ready_cb(floppy_image_device::ready_cb(&wd_fdc_t::ready_callback, this)); } if(prev_ready != next_ready) diff --git a/src/devices/sound/2203intf.cpp b/src/devices/sound/2203intf.cpp index daf27514d10..fc47564ac21 100644 --- a/src/devices/sound/2203intf.cpp +++ b/src/devices/sound/2203intf.cpp @@ -149,7 +149,7 @@ void ym2203_device::calculate_rates() if (m_stream != nullptr) m_stream->set_sample_rate(rate); else - m_stream = machine().sound().stream_alloc(*this,0,1,rate, stream_update_delegate(FUNC(ym2203_device::stream_generate),this)); + m_stream = machine().sound().stream_alloc(*this,0,1,rate, stream_update_delegate(&ym2203_device::stream_generate,this)); } //------------------------------------------------- diff --git a/src/devices/sound/2608intf.cpp b/src/devices/sound/2608intf.cpp index 54ce825357a..dd5b3ee6359 100644 --- a/src/devices/sound/2608intf.cpp +++ b/src/devices/sound/2608intf.cpp @@ -142,7 +142,7 @@ void ym2608_device::device_start() m_timer[1] = timer_alloc(1); /* stream system initialize */ - m_stream = machine().sound().stream_alloc(*this,0,2,rate, stream_update_delegate(FUNC(ym2608_device::stream_generate),this)); + m_stream = machine().sound().stream_alloc(*this,0,2,rate, stream_update_delegate(&ym2608_device::stream_generate,this)); /* setup adpcm buffers */ pcmbufa = m_region->base(); pcmsizea = m_region->bytes(); diff --git a/src/devices/sound/2610intf.cpp b/src/devices/sound/2610intf.cpp index b4bcb62c754..4a2e3efe3bc 100644 --- a/src/devices/sound/2610intf.cpp +++ b/src/devices/sound/2610intf.cpp @@ -154,7 +154,7 @@ void ym2610_device::device_start() m_timer[1] = timer_alloc(1); /* stream system initialize */ - m_stream = machine().sound().stream_alloc(*this,0,2,rate, stream_update_delegate(FUNC(ym2610_device::stream_generate),this)); + m_stream = machine().sound().stream_alloc(*this,0,2,rate, stream_update_delegate(&ym2610_device::stream_generate,this)); /* setup adpcm buffers */ void *pcmbufa = m_region->base(); diff --git a/src/devices/sound/disc_inp.hxx b/src/devices/sound/disc_inp.hxx index f8395835e01..2b39825f9f3 100644 --- a/src/devices/sound/disc_inp.hxx +++ b/src/devices/sound/disc_inp.hxx @@ -318,7 +318,7 @@ void DISCRETE_CLASS_NAME(dss_input_stream)::stream_start(void) discrete_sound_device *snd_device = downcast<discrete_sound_device *>(m_device); //assert(DSS_INPUT_STREAM__STREAM < snd_device->m_input_stream_list.count()); - m_buffer_stream = m_device->machine().sound().stream_alloc(*snd_device, 0, 1, this->sample_rate(), stream_update_delegate(FUNC(discrete_dss_input_stream_node::stream_generate),this)); + m_buffer_stream = m_device->machine().sound().stream_alloc(*snd_device, 0, 1, this->sample_rate(), stream_update_delegate(&discrete_dss_input_stream_node::stream_generate,this)); snd_device->get_stream()->set_input(m_stream_in_number, m_buffer_stream); } diff --git a/src/devices/sound/spu.h b/src/devices/sound/spu.h index 019b49426fc..a04b45b439d 100644 --- a/src/devices/sound/spu.h +++ b/src/devices/sound/spu.h @@ -20,8 +20,8 @@ MCFG_PSX_SPU_WRITE_HANDLER(DEVWRITE16(_tag, spu_device, write)) \ MCFG_DEVICE_ADD(_tag, SPU, _clock) \ MCFG_SPU_IRQ_HANDLER(DEVWRITELINE("maincpu:irq", psxirq_device, intin9)) \ - MCFG_PSX_DMA_CHANNEL_READ( "maincpu", 4, psx_dma_read_delegate( FUNC( spu_device::dma_read ), (spu_device *) device ) ) \ - MCFG_PSX_DMA_CHANNEL_WRITE( "maincpu", 4, psx_dma_write_delegate( FUNC( spu_device::dma_write ), (spu_device *) device ) ) + MCFG_PSX_DMA_CHANNEL_READ( "maincpu", 4, psx_dma_read_delegate(&spu_device::dma_read, (spu_device *) device ) ) \ + MCFG_PSX_DMA_CHANNEL_WRITE( "maincpu", 4, psx_dma_write_delegate(&spu_device::dma_write, (spu_device *) device ) ) // ======================> spu_device diff --git a/src/devices/video/psx.cpp b/src/devices/video/psx.cpp index d621949b819..27490f6738b 100644 --- a/src/devices/video/psx.cpp +++ b/src/devices/video/psx.cpp @@ -3804,7 +3804,7 @@ MACHINE_CONFIG_FRAGMENT( psxgpu ) MCFG_SCREEN_SIZE( 1024, 1024 ) MCFG_SCREEN_VISIBLE_AREA( 0, 639, 0, 479 ) MCFG_SCREEN_UPDATE_DEVICE( DEVICE_SELF, psxgpu_device, update_screen ) - ((screen_device *)device)->register_vblank_callback(vblank_state_delegate(FUNC(psxgpu_device::vblank), (psxgpu_device *) owner)); + ((screen_device *)device)->register_vblank_callback(vblank_state_delegate(&psxgpu_device::vblank, (psxgpu_device *) owner)); MCFG_SCREEN_PALETTE("palette") MCFG_PALETTE_ADD( "palette", 65536 ) diff --git a/src/devices/video/psx.h b/src/devices/video/psx.h index f60ff1d6e88..e798122c697 100644 --- a/src/devices/video/psx.h +++ b/src/devices/video/psx.h @@ -24,8 +24,8 @@ MCFG_DEVICE_ADD( tag, type, clock ) \ ((psxgpu_device *) device)->vramSize = _vramSize; \ MCFG_PSX_GPU_VBLANK_HANDLER(DEVWRITELINE(cputag ":irq", psxirq_device, intin0)) \ - MCFG_PSX_DMA_CHANNEL_READ( cputag, 2, psx_dma_write_delegate( FUNC( psxgpu_device::dma_read ), (psxgpu_device *) device ) ) \ - MCFG_PSX_DMA_CHANNEL_WRITE( cputag, 2, psx_dma_read_delegate( FUNC( psxgpu_device::dma_write ), (psxgpu_device *) device ) ) + MCFG_PSX_DMA_CHANNEL_READ( cputag, 2, psx_dma_write_delegate(&psxgpu_device::dma_read, (psxgpu_device *) device ) ) \ + MCFG_PSX_DMA_CHANNEL_WRITE( cputag, 2, psx_dma_read_delegate(&psxgpu_device::dma_write, (psxgpu_device *) device ) ) #define MCFG_PSXGPU_REPLACE( cputag, tag, type, _vramSize, clock ) \ MCFG_DEVICE_MODIFY( cputag ) \ @@ -34,8 +34,8 @@ MCFG_DEVICE_REPLACE( tag, type, clock ) \ ((psxgpu_device *) device)->vramSize = _vramSize; \ MCFG_PSX_GPU_VBLANK_HANDLER(DEVWRITELINE(cputag ":irq", psxirq_device, intin0)) \ - MCFG_PSX_DMA_CHANNEL_READ( cputag, 2, psx_dma_write_delegate( FUNC( psxgpu_device::dma_read ), (psxgpu_device *) device ) ) \ - MCFG_PSX_DMA_CHANNEL_WRITE( cputag, 2, psx_dma_read_delegate( FUNC( psxgpu_device::dma_write ), (psxgpu_device *) device ) ) + MCFG_PSX_DMA_CHANNEL_READ( cputag, 2, psx_dma_write_delegate(&psxgpu_device::dma_read, (psxgpu_device *) device ) ) \ + MCFG_PSX_DMA_CHANNEL_WRITE( cputag, 2, psx_dma_read_delegate(&psxgpu_device::dma_write, (psxgpu_device *) device ) ) #define MCFG_PSXGPU_VBLANK_CALLBACK( _delegate ) \ ((screen_device *) config.device_find( device, "screen" ))->register_vblank_callback( _delegate ); diff --git a/src/devices/video/stvvdp2.cpp b/src/devices/video/stvvdp2.cpp index cd4325fd2b6..ace04646691 100644 --- a/src/devices/video/stvvdp2.cpp +++ b/src/devices/video/stvvdp2.cpp @@ -6099,7 +6099,7 @@ void saturn_state::stv_vdp2_exit ( void ) int saturn_state::stv_vdp2_start ( void ) { - machine().add_notifier(MACHINE_NOTIFY_EXIT, machine_notify_delegate(FUNC(saturn_state::stv_vdp2_exit), this)); + machine().add_notifier(MACHINE_NOTIFY_EXIT, machine_notify_delegate(&saturn_state::stv_vdp2_exit, this)); m_vdp2_regs = make_unique_clear<uint16_t[]>(0x040000/2 ); m_vdp2_vram = make_unique_clear<uint32_t[]>(0x100000/4 ); diff --git a/src/devices/video/zeus2.cpp b/src/devices/video/zeus2.cpp index 203f4339492..82951eea94a 100644 --- a/src/devices/video/zeus2.cpp +++ b/src/devices/video/zeus2.cpp @@ -80,7 +80,7 @@ void zeus2_device::device_start() m_irq.resolve_safe(); /* we need to cleanup on exit */ - //machine().add_notifier(MACHINE_NOTIFY_EXIT, machine_notify_delegate(FUNC(zeus2_device::exit_handler2), this)); + //machine().add_notifier(MACHINE_NOTIFY_EXIT, machine_notify_delegate(&zeus2_device::exit_handler2, this)); int_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(zeus2_device::int_timer_callback), this)); vblank_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(zeus2_device::display_irq), this)); @@ -1550,11 +1550,11 @@ void zeus2_renderer::zeus2_draw_quad(const uint32_t *databuffer, uint32_t texdat // tests, but the (numverts == 5) statement below may actually be a quad fan instead of a 5-sided // polygon. if (numverts == 3) - render_triangle(m_state->zeus_cliprect, render_delegate(FUNC(zeus2_renderer::render_poly_8bit), this), 4, clipvert[0], clipvert[1], clipvert[2]); + render_triangle(m_state->zeus_cliprect, render_delegate(&zeus2_renderer::render_poly_8bit, this), 4, clipvert[0], clipvert[1], clipvert[2]); else if (numverts == 4) - render_polygon<4>(m_state->zeus_cliprect, render_delegate(FUNC(zeus2_renderer::render_poly_8bit), this), 4, clipvert); + render_polygon<4>(m_state->zeus_cliprect, render_delegate(&zeus2_renderer::render_poly_8bit, this), 4, clipvert); else if (numverts == 5) - render_polygon<5>(m_state->zeus_cliprect, render_delegate(FUNC(zeus2_renderer::render_poly_8bit), this), 4, clipvert); + render_polygon<5>(m_state->zeus_cliprect, render_delegate(&zeus2_renderer::render_poly_8bit, this), 4, clipvert); } diff --git a/src/emu/bookkeeping.cpp b/src/emu/bookkeeping.cpp index 0fb4f2f9386..89b32c3972a 100644 --- a/src/emu/bookkeeping.cpp +++ b/src/emu/bookkeeping.cpp @@ -39,7 +39,7 @@ bookkeeping_manager::bookkeeping_manager(running_machine &machine) machine.save().save_item(NAME(m_dispensed_tickets)); // register for configuration - machine.configuration().config_register("counters", config_saveload_delegate(FUNC(bookkeeping_manager::config_load), this), config_saveload_delegate(FUNC(bookkeeping_manager::config_save), this)); + machine.configuration().config_register("counters", config_saveload_delegate(&bookkeeping_manager::config_load, this), config_saveload_delegate(&bookkeeping_manager::config_save, this)); } diff --git a/src/emu/crsshair.cpp b/src/emu/crsshair.cpp index 4feea7b1e9e..9d2eae42762 100644 --- a/src/emu/crsshair.cpp +++ b/src/emu/crsshair.cpp @@ -287,7 +287,7 @@ crosshair_manager::crosshair_manager(running_machine &machine) , m_auto_time(CROSSHAIR_VISIBILITY_AUTOTIME_DEFAULT) { /* request a callback upon exiting */ - machine.add_notifier(MACHINE_NOTIFY_EXIT, machine_notify_delegate(FUNC(crosshair_manager::exit), this)); + machine.add_notifier(MACHINE_NOTIFY_EXIT, machine_notify_delegate(&crosshair_manager::exit, this)); for (int player = 0; player < MAX_PLAYERS; player++) m_crosshair[player] = std::make_unique<render_crosshair>(machine, player); @@ -311,11 +311,11 @@ crosshair_manager::crosshair_manager(running_machine &machine) /* register callbacks for when we load/save configurations */ if (m_usage) - machine.configuration().config_register("crosshairs", config_saveload_delegate(FUNC(crosshair_manager::config_load), this), config_saveload_delegate(FUNC(crosshair_manager::config_save), this)); + machine.configuration().config_register("crosshairs", config_saveload_delegate(&crosshair_manager::config_load, this), config_saveload_delegate(&crosshair_manager::config_save, this)); /* register the animation callback */ if (machine.first_screen() != nullptr) - machine.first_screen()->register_vblank_callback(vblank_state_delegate(FUNC(crosshair_manager::animate), this)); + machine.first_screen()->register_vblank_callback(vblank_state_delegate(&crosshair_manager::animate, this)); } /*------------------------------------------------- diff --git a/src/emu/debug/debugcon.cpp b/src/emu/debug/debugcon.cpp index c9762bf927d..b0a7e1dd2a4 100644 --- a/src/emu/debug/debugcon.cpp +++ b/src/emu/debug/debugcon.cpp @@ -52,7 +52,7 @@ debugger_console::debugger_console(running_machine &machine) printf("Currently targeting %s (%s)\n", m_machine.system().name, m_machine.system().description); /* request callback upon exiting */ - m_machine.add_notifier(MACHINE_NOTIFY_EXIT, machine_notify_delegate(FUNC(debugger_console::exit), this)); + m_machine.add_notifier(MACHINE_NOTIFY_EXIT, machine_notify_delegate(&debugger_console::exit, this)); /* listen in on the errorlog */ using namespace std::placeholders; diff --git a/src/emu/debug/debugcpu.cpp b/src/emu/debug/debugcpu.cpp index 4690298e9a3..90641019986 100644 --- a/src/emu/debug/debugcpu.cpp +++ b/src/emu/debug/debugcpu.cpp @@ -83,7 +83,7 @@ debugger_cpu::debugger_cpu(running_machine &machine) /* add callback for breaking on VBLANK */ if (m_machine.first_screen() != nullptr) - m_machine.first_screen()->register_vblank_callback(vblank_state_delegate(FUNC(debugger_cpu::on_vblank), this)); + m_machine.first_screen()->register_vblank_callback(vblank_state_delegate(&debugger_cpu::on_vblank, this)); } void debugger_cpu::configure_memory(symbol_table &table) diff --git a/src/emu/devdelegate.h b/src/emu/devdelegate.h index 147550791b0..f76116004aa 100644 --- a/src/emu/devdelegate.h +++ b/src/emu/devdelegate.h @@ -38,15 +38,38 @@ protected: }; +// ======================> named_delegate +template<typename _Signature> +class named_delegate : public delegate<_Signature> +{ + typedef delegate<_Signature> basetype; + +public: + // create a standard set of constructors + named_delegate() : basetype(), m_name(nullptr) { } + explicit named_delegate(const basetype &src) : basetype(src), m_name(src.m_name) { } + named_delegate(const basetype &src, delegate_late_bind &object) : basetype(src, object), m_name(src.m_name) { } + template<class _FunctionClass> named_delegate(typename basetype::template traits<_FunctionClass>::member_func_type funcptr, const char *name, _FunctionClass *object) : basetype(funcptr, object), m_name(name) { } + template<class _FunctionClass> named_delegate(typename basetype::template traits<_FunctionClass>::const_member_func_type funcptr, const char *name, _FunctionClass *object) : basetype(funcptr, object), m_name(name) { } + explicit named_delegate(std::function<_Signature> funcptr, const char *name) : basetype(funcptr), m_name(name) { } + template<class _FunctionClass> named_delegate(typename basetype::template traits<_FunctionClass>::static_func_type funcptr, const char *name, _FunctionClass *object) : basetype(funcptr, object), m_name(name) { } + template<class _FunctionClass> named_delegate(typename basetype::template traits<_FunctionClass>::static_ref_func_type funcptr, const char *name, _FunctionClass *object) : basetype(funcptr, object), m_name(name) { } + named_delegate &operator=(const basetype &src) { *static_cast<basetype *>(this) = src; m_name = src.m_name; return *this; } + + const char *name() const { return m_name; } +private: + const char * m_name; // name string +}; + // ======================> device_delegate // device_delegate is a delegate that wraps with a device tag and can be easily // late bound without replicating logic everywhere template<typename _Signature> -class device_delegate : public delegate<_Signature>, device_delegate_helper +class device_delegate : public named_delegate<_Signature>, device_delegate_helper { typedef device_delegate<_Signature> thistype; - typedef delegate<_Signature> basetype; + typedef named_delegate<_Signature> basetype; public: // provide the same constructors as the base class @@ -55,11 +78,9 @@ public: device_delegate(const basetype &src, delegate_late_bind &object) : basetype(src, object), device_delegate_helper(src.m_device_name) { } template<class _FunctionClass> device_delegate(typename basetype::template traits<_FunctionClass>::member_func_type funcptr, const char *name, _FunctionClass *object) : basetype(funcptr, name, object), device_delegate_helper(safe_tag(dynamic_cast<device_t *>(object))) { } template<class _FunctionClass> device_delegate(typename basetype::template traits<_FunctionClass>::const_member_func_type funcptr, const char *name, _FunctionClass *object) : basetype(funcptr, name, object), device_delegate_helper(safe_tag(dynamic_cast<device_t *>(object))) { } -#ifdef USE_STATIC_DELEGATE template<class _FunctionClass> device_delegate(typename basetype::template traits<_FunctionClass>::static_func_type funcptr, const char *name, _FunctionClass *object) : basetype(funcptr, name, object), device_delegate_helper(safe_tag(dynamic_cast<device_t *>(object))) { } template<class _FunctionClass> device_delegate(typename basetype::template traits<_FunctionClass>::static_ref_func_type funcptr, const char *name, _FunctionClass *object) : basetype(funcptr, name, object), device_delegate_helper(safe_tag(dynamic_cast<device_t *>(object))) { } -#endif - device_delegate(std::function<_Signature> funcptr) : basetype(funcptr), device_delegate_helper(nullptr) { } + device_delegate(std::function<_Signature> funcptr, const char *name) : basetype(funcptr,name), device_delegate_helper(nullptr) { } device_delegate &operator=(const thistype &src) { *static_cast<basetype *>(this) = src; m_device_name = src.m_device_name; return *this; } // provide additional constructors that take a device name string @@ -67,12 +88,10 @@ public: template<class _FunctionClass> device_delegate(typename basetype::template traits<_FunctionClass>::member_func_type funcptr, const char *name, const char *devname, _FunctionClass *) : basetype(funcptr, name, static_cast<_FunctionClass *>(nullptr)), device_delegate_helper(devname) { } template<class _FunctionClass> device_delegate(typename basetype::template traits<_FunctionClass>::const_member_func_type funcptr, const char *name, const char *devname) : basetype(funcptr, name, static_cast<_FunctionClass *>(nullptr)), device_delegate_helper(devname) { } template<class _FunctionClass> device_delegate(typename basetype::template traits<_FunctionClass>::const_member_func_type funcptr, const char *name, const char *devname, _FunctionClass *) : basetype(funcptr, name, static_cast<_FunctionClass *>(nullptr)), device_delegate_helper(devname) { } -#ifdef USE_STATIC_DELEGATE template<class _FunctionClass> device_delegate(typename basetype::template traits<_FunctionClass>::static_func_type funcptr, const char *name, const char *devname, _FunctionClass *) : basetype(funcptr, name, static_cast<_FunctionClass *>(nullptr)), device_delegate_helper(devname) { } template<class _FunctionClass> device_delegate(typename basetype::template traits<_FunctionClass>::static_ref_func_type funcptr, const char *name, const char *devname, _FunctionClass *) : basetype(funcptr, name, static_cast<_FunctionClass *>(nullptr)), device_delegate_helper(devname) { } device_delegate(typename basetype::template traits<device_t>::static_func_type funcptr, const char *name) : basetype(funcptr, name, static_cast<device_t *>(nullptr)), device_delegate_helper(nullptr) { } device_delegate(typename basetype::template traits<device_t>::static_ref_func_type funcptr, const char *name) : basetype(funcptr, name, static_cast<device_t *>(nullptr)), device_delegate_helper(nullptr) { } -#endif // and constructors that provide a search root device_delegate(const thistype &src, device_t &search_root) : basetype(src), device_delegate_helper(src.m_device_name) { bind_relative_to(search_root); } diff --git a/src/emu/diexec.cpp b/src/emu/diexec.cpp index ca253d766ce..02c46244c0a 100644 --- a/src/emu/diexec.cpp +++ b/src/emu/diexec.cpp @@ -548,7 +548,7 @@ void device_execute_interface::interface_post_reset() screen_device *screen = downcast<screen_device *>(device().machine().device(device().siblingtag(m_vblank_interrupt_screen).c_str())); assert(screen != nullptr); - screen->register_vblank_callback(vblank_state_delegate(FUNC(device_execute_interface::on_vblank), this)); + screen->register_vblank_callback(vblank_state_delegate(&device_execute_interface::on_vblank, this)); } // reconfigure periodic interrupts diff --git a/src/emu/diimage.h b/src/emu/diimage.h index 91a8e0d452e..8c9aaaf9e7f 100644 --- a/src/emu/diimage.h +++ b/src/emu/diimage.h @@ -116,13 +116,13 @@ typedef void (*device_image_partialhash_func)(util::hash_collection &, const uns #define DEVICE_IMAGE_LOAD_NAME(_class,_name) _class::DEVICE_IMAGE_LOAD_MEMBER_NAME(_name) #define DECLARE_DEVICE_IMAGE_LOAD_MEMBER(_name) image_init_result DEVICE_IMAGE_LOAD_MEMBER_NAME(_name)(device_image_interface &image) #define DEVICE_IMAGE_LOAD_MEMBER(_class,_name) image_init_result DEVICE_IMAGE_LOAD_NAME(_class,_name)(device_image_interface &image) -#define DEVICE_IMAGE_LOAD_DELEGATE(_class,_name) device_image_load_delegate(&DEVICE_IMAGE_LOAD_NAME(_class,_name),#_class "::device_image_load_" #_name, downcast<_class *>(device->owner())) +#define DEVICE_IMAGE_LOAD_DELEGATE(_class,_name) device_image_load_delegate(&DEVICE_IMAGE_LOAD_NAME(_class,_name), downcast<_class *>(device->owner())) #define DEVICE_IMAGE_UNLOAD_MEMBER_NAME(_name) device_image_unload_##_name #define DEVICE_IMAGE_UNLOAD_NAME(_class,_name) _class::DEVICE_IMAGE_UNLOAD_MEMBER_NAME(_name) #define DECLARE_DEVICE_IMAGE_UNLOAD_MEMBER(_name) void DEVICE_IMAGE_UNLOAD_MEMBER_NAME(_name)(device_image_interface &image) #define DEVICE_IMAGE_UNLOAD_MEMBER(_class,_name) void DEVICE_IMAGE_UNLOAD_NAME(_class,_name)(device_image_interface &image) -#define DEVICE_IMAGE_UNLOAD_DELEGATE(_class,_name) device_image_func_delegate(&DEVICE_IMAGE_UNLOAD_NAME(_class,_name),#_class "::device_image_unload_" #_name, downcast<_class *>(device->owner())) +#define DEVICE_IMAGE_UNLOAD_DELEGATE(_class,_name) device_image_func_delegate(&DEVICE_IMAGE_UNLOAD_NAME(_class,_name), downcast<_class *>(device->owner())) #define MCFG_SET_IMAGE_LOADABLE(_usrload) \ device_image_interface::static_set_user_loadable(*device, _usrload); diff --git a/src/emu/driver.h b/src/emu/driver.h index e5760e821a4..74205f57af3 100644 --- a/src/emu/driver.h +++ b/src/emu/driver.h @@ -24,28 +24,28 @@ // core machine callbacks #define MCFG_MACHINE_START_OVERRIDE(_class, _func) \ - driver_device::static_set_callback(config.root_device(), driver_device::CB_MACHINE_START, driver_callback_delegate(&_class::MACHINE_START_NAME(_func), #_class "::machine_start_" #_func, downcast<_class *>(owner))); + driver_device::static_set_callback(config.root_device(), driver_device::CB_MACHINE_START, driver_callback_delegate(&_class::MACHINE_START_NAME(_func), downcast<_class *>(owner))); #define MCFG_MACHINE_RESET_OVERRIDE(_class, _func) \ - driver_device::static_set_callback(config.root_device(), driver_device::CB_MACHINE_RESET, driver_callback_delegate(&_class::MACHINE_RESET_NAME(_func), #_class "::machine_reset_" #_func, downcast<_class *>(owner))); + driver_device::static_set_callback(config.root_device(), driver_device::CB_MACHINE_RESET, driver_callback_delegate(&_class::MACHINE_RESET_NAME(_func), downcast<_class *>(owner))); #define MCFG_MACHINE_RESET_REMOVE() \ driver_device::static_set_callback(config.root_device(), driver_device::CB_MACHINE_RESET, driver_callback_delegate()); // core sound callbacks #define MCFG_SOUND_START_OVERRIDE(_class, _func) \ - driver_device::static_set_callback(config.root_device(), driver_device::CB_SOUND_START, driver_callback_delegate(&_class::SOUND_START_NAME(_func), #_class "::sound_start_" #_func, downcast<_class *>(owner))); + driver_device::static_set_callback(config.root_device(), driver_device::CB_SOUND_START, driver_callback_delegate(&_class::SOUND_START_NAME(_func), downcast<_class *>(owner))); #define MCFG_SOUND_RESET_OVERRIDE(_class, _func) \ - driver_device::static_set_callback(config.root_device(), driver_device::CB_SOUND_RESET, driver_callback_delegate(&_class::SOUND_RESET_NAME(_func), #_class "::sound_reset_" #_func, downcast<_class *>(owner))); + driver_device::static_set_callback(config.root_device(), driver_device::CB_SOUND_RESET, driver_callback_delegate(&_class::SOUND_RESET_NAME(_func), downcast<_class *>(owner))); // core video callbacks #define MCFG_VIDEO_START_OVERRIDE(_class, _func) \ - driver_device::static_set_callback(config.root_device(), driver_device::CB_VIDEO_START, driver_callback_delegate(&_class::VIDEO_START_NAME(_func), #_class "::video_start_" #_func, downcast<_class *>(owner))); + driver_device::static_set_callback(config.root_device(), driver_device::CB_VIDEO_START, driver_callback_delegate(&_class::VIDEO_START_NAME(_func), downcast<_class *>(owner))); #define MCFG_VIDEO_RESET_OVERRIDE(_class, _func) \ - driver_device::static_set_callback(config.root_device(), driver_device::CB_VIDEO_RESET, driver_callback_delegate(&_class::VIDEO_RESET_NAME(_func), #_class "::video_reset_" #_func, downcast<_class *>(owner))); + driver_device::static_set_callback(config.root_device(), driver_device::CB_VIDEO_RESET, driver_callback_delegate(&_class::VIDEO_RESET_NAME(_func), downcast<_class *>(owner))); diff --git a/src/emu/emumem.h b/src/emu/emumem.h index 72b7c58b81c..80f8e050660 100644 --- a/src/emu/emumem.h +++ b/src/emu/emumem.h @@ -83,7 +83,7 @@ typedef uint32_t offs_t; typedef void (*address_map_constructor)(address_map &map, device_t &devconfig); // submap retriever delegate -typedef delegate<void (address_map &, device_t &)> address_map_delegate; +typedef named_delegate<void (address_map &, device_t &)> address_map_delegate; // struct with function pointers for accessors; use is generally discouraged unless necessary struct data_accessors diff --git a/src/emu/image.cpp b/src/emu/image.cpp index 8ce958fc79f..398a72d07e1 100644 --- a/src/emu/image.cpp +++ b/src/emu/image.cpp @@ -76,7 +76,7 @@ image_manager::image_manager(running_machine &machine) } } - machine.configuration().config_register("image_directories", config_saveload_delegate(FUNC(image_manager::config_load), this), config_saveload_delegate(FUNC(image_manager::config_save), this)); + machine.configuration().config_register("image_directories", config_saveload_delegate(&image_manager::config_load, this), config_saveload_delegate(&image_manager::config_save, this)); } //------------------------------------------------- @@ -233,5 +233,5 @@ void image_manager::postdevice_init() } } /* add a callback for when we shut down */ - machine().add_notifier(MACHINE_NOTIFY_EXIT, machine_notify_delegate(FUNC(image_manager::unload_all), this)); + machine().add_notifier(MACHINE_NOTIFY_EXIT, machine_notify_delegate(&image_manager::unload_all, this)); } diff --git a/src/emu/inputdev.cpp b/src/emu/inputdev.cpp index cf56387578f..ff58d63268b 100644 --- a/src/emu/inputdev.cpp +++ b/src/emu/inputdev.cpp @@ -585,7 +585,7 @@ input_class_keyboard::input_class_keyboard(input_manager &manager) : input_class(manager, DEVICE_CLASS_KEYBOARD, "keyboard", true, manager.machine().options().multi_keyboard()) { // request a per-frame callback for the keyboard class - machine().add_notifier(MACHINE_NOTIFY_FRAME, machine_notify_delegate(FUNC(input_class_keyboard::frame_callback), this)); + machine().add_notifier(MACHINE_NOTIFY_FRAME, machine_notify_delegate(&input_class_keyboard::frame_callback, this)); } diff --git a/src/emu/ioport.cpp b/src/emu/ioport.cpp index ead51010d7f..8f87d33b592 100644 --- a/src/emu/ioport.cpp +++ b/src/emu/ioport.cpp @@ -1681,8 +1681,8 @@ ioport_manager::ioport_manager(running_machine &machine) time_t ioport_manager::initialize() { // add an exit callback and a frame callback - machine().add_notifier(MACHINE_NOTIFY_EXIT, machine_notify_delegate(FUNC(ioport_manager::exit), this)); - machine().add_notifier(MACHINE_NOTIFY_FRAME, machine_notify_delegate(FUNC(ioport_manager::frame_update_callback), this)); + machine().add_notifier(MACHINE_NOTIFY_EXIT, machine_notify_delegate(&ioport_manager::exit, this)); + machine().add_notifier(MACHINE_NOTIFY_FRAME, machine_notify_delegate(&ioport_manager::frame_update_callback, this)); // initialize the default port info from the OSD init_port_types(); @@ -1747,7 +1747,7 @@ time_t ioport_manager::initialize() m_natkeyboard = std::make_unique<natural_keyboard>(machine()); // register callbacks for when we load configurations - machine().configuration().config_register("input", config_saveload_delegate(FUNC(ioport_manager::load_config), this), config_saveload_delegate(FUNC(ioport_manager::save_config), this)); + machine().configuration().config_register("input", config_saveload_delegate(&ioport_manager::load_config, this), config_saveload_delegate(&ioport_manager::save_config, this)); // open playback and record files if specified time_t basetime = playback_init(); diff --git a/src/emu/machine.cpp b/src/emu/machine.cpp index 4871e004d82..6d3de46de32 100644 --- a/src/emu/machine.cpp +++ b/src/emu/machine.cpp @@ -256,8 +256,8 @@ void running_machine::start() manager().create_custom(*this); // register callbacks for the devices, then start them - add_notifier(MACHINE_NOTIFY_RESET, machine_notify_delegate(FUNC(running_machine::reset_all_devices), this)); - add_notifier(MACHINE_NOTIFY_EXIT, machine_notify_delegate(FUNC(running_machine::stop_all_devices), this)); + add_notifier(MACHINE_NOTIFY_RESET, machine_notify_delegate(&running_machine::reset_all_devices, this)); + add_notifier(MACHINE_NOTIFY_EXIT, machine_notify_delegate(&running_machine::stop_all_devices, this)); save().register_presave(save_prepost_delegate(FUNC(running_machine::presave_all_devices), this)); start_all_devices(); save().register_postload(save_prepost_delegate(FUNC(running_machine::postload_all_devices), this)); diff --git a/src/emu/network.cpp b/src/emu/network.cpp index dc3d57e9c46..ed72e59cd06 100644 --- a/src/emu/network.cpp +++ b/src/emu/network.cpp @@ -24,7 +24,7 @@ network_manager::network_manager(running_machine &machine) : m_machine(machine) { - machine.configuration().config_register("network", config_saveload_delegate(FUNC(network_manager::config_load), this), config_saveload_delegate(FUNC(network_manager::config_save), this)); + machine.configuration().config_register("network", config_saveload_delegate(&network_manager::config_load, this), config_saveload_delegate(&network_manager::config_save, this)); } //------------------------------------------------- diff --git a/src/emu/output.cpp b/src/emu/output.cpp index af30ac9a0b6..60489cae11e 100644 --- a/src/emu/output.cpp +++ b/src/emu/output.cpp @@ -28,8 +28,8 @@ output_manager::output_manager(running_machine &machine) m_uniqueid(12345) { /* add pause callback */ - machine.add_notifier(MACHINE_NOTIFY_PAUSE, machine_notify_delegate(FUNC(output_manager::pause), this)); - machine.add_notifier(MACHINE_NOTIFY_RESUME, machine_notify_delegate(FUNC(output_manager::resume), this)); + machine.add_notifier(MACHINE_NOTIFY_PAUSE, machine_notify_delegate(&output_manager::pause, this)); + machine.add_notifier(MACHINE_NOTIFY_RESUME, machine_notify_delegate(&output_manager::resume, this)); } /*------------------------------------------------- diff --git a/src/emu/render.cpp b/src/emu/render.cpp index 8f3bc9cce8c..3c883fa3d23 100644 --- a/src/emu/render.cpp +++ b/src/emu/render.cpp @@ -2618,7 +2618,7 @@ render_manager::render_manager(running_machine &machine) m_ui_container(global_alloc(render_container(*this))) { // register callbacks - machine.configuration().config_register("video", config_saveload_delegate(FUNC(render_manager::config_load), this), config_saveload_delegate(FUNC(render_manager::config_save), this)); + machine.configuration().config_register("video", config_saveload_delegate(&render_manager::config_load, this), config_saveload_delegate(&render_manager::config_save, this)); // create one container per screen for (screen_device &screen : screen_device_iterator(machine.root_device())) diff --git a/src/emu/save.h b/src/emu/save.h index dc527570acf..7c8c6ac5e32 100644 --- a/src/emu/save.h +++ b/src/emu/save.h @@ -39,7 +39,7 @@ enum save_error //************************************************************************** // callback delegate for presave/postload -typedef delegate<void ()> save_prepost_delegate; +typedef named_delegate<void ()> save_prepost_delegate; // use this to declare a given type is a simple, non-pointer type that can be diff --git a/src/emu/schedule.h b/src/emu/schedule.h index 6eb050216fa..56fb750c0aa 100644 --- a/src/emu/schedule.h +++ b/src/emu/schedule.h @@ -39,7 +39,7 @@ //************************************************************************** // timer callbacks look like this -typedef delegate<void (void *, int32_t)> timer_expired_delegate; +typedef named_delegate<void (void *, int32_t)> timer_expired_delegate; // ======================> emu_timer diff --git a/src/emu/sound.cpp b/src/emu/sound.cpp index 95f2d85d1b4..28a17f111a2 100644 --- a/src/emu/sound.cpp +++ b/src/emu/sound.cpp @@ -72,7 +72,7 @@ sound_stream::sound_stream(device_t &device, int inputs, int outputs, int sample throw emu_fatalerror("Attempted to create a sound_stream with a non-sound device"); if(m_callback.isnull()) - m_callback = stream_update_delegate(FUNC(device_sound_interface::sound_stream_update),(device_sound_interface *)sound); + m_callback = stream_update_delegate(&device_sound_interface::sound_stream_update,(device_sound_interface *)sound); // create a unique tag for saving std::string state_tag = string_format("%d", m_device.machine().sound().m_stream_list.size()); @@ -835,11 +835,11 @@ sound_manager::sound_manager(running_machine &machine) #endif // register callbacks - machine.configuration().config_register("mixer", config_saveload_delegate(FUNC(sound_manager::config_load), this), config_saveload_delegate(FUNC(sound_manager::config_save), this)); - machine.add_notifier(MACHINE_NOTIFY_PAUSE, machine_notify_delegate(FUNC(sound_manager::pause), this)); - machine.add_notifier(MACHINE_NOTIFY_RESUME, machine_notify_delegate(FUNC(sound_manager::resume), this)); - machine.add_notifier(MACHINE_NOTIFY_RESET, machine_notify_delegate(FUNC(sound_manager::reset), this)); - machine.add_notifier(MACHINE_NOTIFY_EXIT, machine_notify_delegate(FUNC(sound_manager::stop_recording), this)); + machine.configuration().config_register("mixer", config_saveload_delegate(&sound_manager::config_load, this), config_saveload_delegate(&sound_manager::config_save, this)); + machine.add_notifier(MACHINE_NOTIFY_PAUSE, machine_notify_delegate(&sound_manager::pause, this)); + machine.add_notifier(MACHINE_NOTIFY_RESUME, machine_notify_delegate(&sound_manager::resume, this)); + machine.add_notifier(MACHINE_NOTIFY_RESET, machine_notify_delegate(&sound_manager::reset, this)); + machine.add_notifier(MACHINE_NOTIFY_EXIT, machine_notify_delegate(&sound_manager::stop_recording, this)); // register global states machine.save().save_item(NAME(m_last_update)); diff --git a/src/emu/uiinput.cpp b/src/emu/uiinput.cpp index 3094df31ce8..de4435298b6 100644 --- a/src/emu/uiinput.cpp +++ b/src/emu/uiinput.cpp @@ -45,7 +45,7 @@ ui_input_manager::ui_input_manager(running_machine &machine) m_current_mouse_y = -1; /* add a frame callback to poll inputs */ - machine.add_notifier(MACHINE_NOTIFY_FRAME, machine_notify_delegate(FUNC(ui_input_manager::frame_update), this)); + machine.add_notifier(MACHINE_NOTIFY_FRAME, machine_notify_delegate(&ui_input_manager::frame_update, this)); } diff --git a/src/emu/video.cpp b/src/emu/video.cpp index d91467bdbd7..f25da887e03 100644 --- a/src/emu/video.cpp +++ b/src/emu/video.cpp @@ -116,7 +116,7 @@ video_manager::video_manager(running_machine &machine) { // request a callback upon exiting - machine.add_notifier(MACHINE_NOTIFY_EXIT, machine_notify_delegate(FUNC(video_manager::exit), this)); + machine.add_notifier(MACHINE_NOTIFY_EXIT, machine_notify_delegate(&video_manager::exit, this)); machine.save().register_postload(save_prepost_delegate(FUNC(video_manager::postload), this)); // extract initial execution state from global configuration settings diff --git a/src/frontend/mame/cheat.cpp b/src/frontend/mame/cheat.cpp index af14e5ab693..0bb594e5c03 100644 --- a/src/frontend/mame/cheat.cpp +++ b/src/frontend/mame/cheat.cpp @@ -1070,7 +1070,7 @@ cheat_manager::cheat_manager(running_machine &machine) m_justify.resize(UI_TARGET_FONT_ROWS*2); // request a callback - machine.add_notifier(MACHINE_NOTIFY_FRAME, machine_notify_delegate(FUNC(cheat_manager::frame_update), this)); + machine.add_notifier(MACHINE_NOTIFY_FRAME, machine_notify_delegate(&cheat_manager::frame_update, this)); // create a global symbol table m_symtable.add("frame", symbol_table::READ_ONLY, &m_framecount); diff --git a/src/frontend/mame/luaengine.cpp b/src/frontend/mame/luaengine.cpp index b9ca13e17f0..e544efa5f71 100644 --- a/src/frontend/mame/luaengine.cpp +++ b/src/frontend/mame/luaengine.cpp @@ -670,12 +670,12 @@ void lua_engine::on_frame_done() void lua_engine::attach_notifiers() { - machine().add_notifier(MACHINE_NOTIFY_RESET, machine_notify_delegate(FUNC(lua_engine::on_machine_prestart), this), true); - machine().add_notifier(MACHINE_NOTIFY_RESET, machine_notify_delegate(FUNC(lua_engine::on_machine_start), this)); - machine().add_notifier(MACHINE_NOTIFY_EXIT, machine_notify_delegate(FUNC(lua_engine::on_machine_stop), this)); - machine().add_notifier(MACHINE_NOTIFY_PAUSE, machine_notify_delegate(FUNC(lua_engine::on_machine_pause), this)); - machine().add_notifier(MACHINE_NOTIFY_RESUME, machine_notify_delegate(FUNC(lua_engine::on_machine_resume), this)); - machine().add_notifier(MACHINE_NOTIFY_FRAME, machine_notify_delegate(FUNC(lua_engine::on_machine_frame), this)); + machine().add_notifier(MACHINE_NOTIFY_RESET, machine_notify_delegate(&lua_engine::on_machine_prestart, this), true); + machine().add_notifier(MACHINE_NOTIFY_RESET, machine_notify_delegate(&lua_engine::on_machine_start, this)); + machine().add_notifier(MACHINE_NOTIFY_EXIT, machine_notify_delegate(&lua_engine::on_machine_stop, this)); + machine().add_notifier(MACHINE_NOTIFY_PAUSE, machine_notify_delegate(&lua_engine::on_machine_pause, this)); + machine().add_notifier(MACHINE_NOTIFY_RESUME, machine_notify_delegate(&lua_engine::on_machine_resume, this)); + machine().add_notifier(MACHINE_NOTIFY_FRAME, machine_notify_delegate(&lua_engine::on_machine_frame, this)); } //------------------------------------------------- diff --git a/src/frontend/mame/mame.cpp b/src/frontend/mame/mame.cpp index 155b949f181..fa5cc2999e6 100644 --- a/src/frontend/mame/mame.cpp +++ b/src/frontend/mame/mame.cpp @@ -269,7 +269,7 @@ ui_manager* mame_machine_manager::create_ui(running_machine& machine) m_ui = std::make_unique<mame_ui_manager>(machine); m_ui->init(); - machine.add_notifier(MACHINE_NOTIFY_RESET, machine_notify_delegate(FUNC(mame_machine_manager::reset), this)); + machine.add_notifier(MACHINE_NOTIFY_RESET, machine_notify_delegate(&mame_machine_manager::reset, this)); m_ui->set_startup_text("Initializing...", true); diff --git a/src/frontend/mame/ui/menu.cpp b/src/frontend/mame/ui/menu.cpp index f55842a0cd9..bac0b8a1c10 100644 --- a/src/frontend/mame/ui/menu.cpp +++ b/src/frontend/mame/ui/menu.cpp @@ -191,7 +191,7 @@ void menu::init(running_machine &machine, ui_options &mopt) auto const ins(s_global_states.emplace(&machine, std::make_shared<global_state>(machine, mopt))); assert(ins.second); // calling init twice is bad if (ins.second) - machine.add_notifier(MACHINE_NOTIFY_EXIT, machine_notify_delegate(FUNC(menu::exit), &machine)); // add an exit callback to free memory + machine.add_notifier(MACHINE_NOTIFY_EXIT, machine_notify_delegate(&menu::exit, &machine)); // add an exit callback to free memory else ins.first->second->stack_reset(); } diff --git a/src/frontend/mame/ui/ui.cpp b/src/frontend/mame/ui/ui.cpp index ea86fc2c850..315da7763a5 100644 --- a/src/frontend/mame/ui/ui.cpp +++ b/src/frontend/mame/ui/ui.cpp @@ -208,7 +208,7 @@ void mame_ui_manager::init() m_mouse_show = machine().system().flags & MACHINE_CLICKABLE_ARTWORK ? true : false; // request a callback upon exiting - machine().add_notifier(MACHINE_NOTIFY_EXIT, machine_notify_delegate(FUNC(mame_ui_manager::exit), this)); + machine().add_notifier(MACHINE_NOTIFY_EXIT, machine_notify_delegate(&mame_ui_manager::exit, this)); // create mouse bitmap bitmap_argb32 *ui_mouse_bitmap = auto_alloc(machine(), bitmap_argb32(32, 32)); diff --git a/src/frontend/mame/ui/viewgfx.cpp b/src/frontend/mame/ui/viewgfx.cpp index aae31d2fc61..f87afd67d20 100644 --- a/src/frontend/mame/ui/viewgfx.cpp +++ b/src/frontend/mame/ui/viewgfx.cpp @@ -140,7 +140,7 @@ void ui_gfx_init(running_machine &machine) uint8_t rotate = machine.system().flags & ORIENTATION_MASK; // make sure we clean up after ourselves - machine.add_notifier(MACHINE_NOTIFY_EXIT, machine_notify_delegate(FUNC(ui_gfx_exit), &machine)); + machine.add_notifier(MACHINE_NOTIFY_EXIT, machine_notify_delegate(&ui_gfx_exit, &machine)); // initialize our global state memset(state, 0, sizeof(*state)); diff --git a/src/ldplayer/ldplayer.cpp b/src/ldplayer/ldplayer.cpp index 879def09d6f..37b9c170573 100644 --- a/src/ldplayer/ldplayer.cpp +++ b/src/ldplayer/ldplayer.cpp @@ -641,7 +641,7 @@ MACHINE_CONFIG_END static MACHINE_CONFIG_DERIVED_CLASS( ldv1000, ldplayer_ntsc, ldv1000_state ) MCFG_LASERDISC_LDV1000_ADD("laserdisc") - MCFG_LASERDISC_GET_DISC(laserdisc_get_disc_delegate(FUNC(ldplayer_state::get_disc_static), device)) + MCFG_LASERDISC_GET_DISC(laserdisc_get_disc_delegate(&ldplayer_state::get_disc_static, device)) MCFG_LASERDISC_SCREEN_ADD_NTSC("screen", "laserdisc") MCFG_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker") @@ -653,7 +653,7 @@ MACHINE_CONFIG_END static MACHINE_CONFIG_DERIVED_CLASS( pr8210, ldplayer_ntsc, pr8210_state ) MCFG_LASERDISC_PR8210_ADD("laserdisc") - MCFG_LASERDISC_GET_DISC(laserdisc_get_disc_delegate(FUNC(ldplayer_state::get_disc_static), device)) + MCFG_LASERDISC_GET_DISC(laserdisc_get_disc_delegate(&ldplayer_state::get_disc_static, device)) MCFG_LASERDISC_SCREEN_ADD_NTSC("screen", "laserdisc") MCFG_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker") diff --git a/src/lib/util/delegate.h b/src/lib/util/delegate.h index 632fa10c309..5e2fdb2f143 100644 --- a/src/lib/util/delegate.h +++ b/src/lib/util/delegate.h @@ -116,8 +116,6 @@ #define USE_DELEGATE_TYPE DELEGATE_TYPE_COMPATIBLE #endif -#define USE_STATIC_DELEGATE 1 - #if defined(FORCE_COMPATIBLE) #undef USE_DELEGATE_TYPE #undef MEMBER_ABI @@ -424,7 +422,6 @@ public: delegate_base() : m_function(nullptr), m_object(nullptr), - m_name(nullptr), m_latebinder(nullptr), m_raw_function(nullptr), m_std_func(nullptr){ } @@ -433,7 +430,6 @@ public: delegate_base(const delegate_base &src) : m_function(src.m_function), m_object(nullptr), - m_name(src.m_name), m_latebinder(src.m_latebinder), m_raw_function(src.m_raw_function), m_raw_mfp(src.m_raw_mfp), @@ -446,7 +442,6 @@ public: delegate_base(const delegate_base &src, delegate_late_bind &object) : m_function(src.m_function), m_object(nullptr), - m_name(src.m_name), m_latebinder(src.m_latebinder), m_raw_function(src.m_raw_function), m_raw_mfp(src.m_raw_mfp), @@ -457,10 +452,9 @@ public: // construct from member function with object pointer template<class _FunctionClass> - delegate_base(typename traits<_FunctionClass>::member_func_type funcptr, const char *name, _FunctionClass *object) + delegate_base(typename traits<_FunctionClass>::member_func_type funcptr, _FunctionClass *object) : m_function(nullptr), m_object(nullptr), - m_name(name), m_latebinder(&late_bind_helper<_FunctionClass>), m_raw_function(nullptr), m_raw_mfp(funcptr, object, static_cast<_ReturnType *>(nullptr), static_cast<generic_static_func>(nullptr)), @@ -470,10 +464,9 @@ public: } template<class _FunctionClass> - delegate_base(typename traits<_FunctionClass>::const_member_func_type funcptr, const char *name, _FunctionClass *object) + delegate_base(typename traits<_FunctionClass>::const_member_func_type funcptr, _FunctionClass *object) : m_function(nullptr), m_object(nullptr), - m_name(name), m_latebinder(&late_bind_helper<_FunctionClass>), m_raw_function(nullptr), m_raw_mfp(funcptr, object, static_cast<_ReturnType *>(nullptr), static_cast<generic_static_func>(nullptr)), @@ -484,10 +477,9 @@ public: // construct from static function with object pointer template<class _FunctionClass> - delegate_base(typename traits<_FunctionClass>::static_func_type funcptr, const char *name, _FunctionClass *object) + delegate_base(typename traits<_FunctionClass>::static_func_type funcptr, _FunctionClass *object) : m_function(reinterpret_cast<generic_static_func>(funcptr)), m_object(nullptr), - m_name(name), m_latebinder(&late_bind_helper<_FunctionClass>), m_raw_function(reinterpret_cast<generic_static_func>(funcptr)), m_std_func(nullptr) @@ -497,10 +489,9 @@ public: // construct from static reference function with object reference template<class _FunctionClass> - delegate_base(typename traits<_FunctionClass>::static_ref_func_type funcptr, const char *name, _FunctionClass *object) + delegate_base(typename traits<_FunctionClass>::static_ref_func_type funcptr, _FunctionClass *object) : m_function(reinterpret_cast<generic_static_func>(funcptr)), m_object(nullptr), - m_name(name), m_latebinder(&late_bind_helper<_FunctionClass>), m_raw_function(reinterpret_cast<generic_static_func>(funcptr)), m_std_func(nullptr) @@ -509,10 +500,9 @@ public: } // construct from static reference function with object reference - delegate_base(functional_type funcptr, const char *name) + delegate_base(functional_type funcptr) : m_function(nullptr), m_object(nullptr), - m_name(name), m_latebinder(nullptr), m_raw_function(nullptr), m_std_func(funcptr) @@ -527,7 +517,6 @@ public: { m_function = src.m_function; m_object = nullptr; - m_name = src.m_name; m_latebinder = src.m_latebinder; m_raw_function = src.m_raw_function; m_raw_mfp = src.m_raw_mfp; @@ -556,8 +545,7 @@ public: } // getters - bool has_object() const { return (object() != nullptr) || (m_std_func); } - const char *name() const { return m_name; } + bool has_object() const { return (object() != nullptr); } // helpers bool isnull() const { return (m_raw_function == nullptr && m_raw_mfp.isnull() && !m_std_func); } @@ -597,7 +585,6 @@ protected: // internal state generic_static_func m_function; // resolved static function pointer delegate_generic_class * m_object; // resolved object to the post-cast object - const char * m_name; // name string late_bind_func m_latebinder; // late binding helper generic_static_func m_raw_function; // raw static function pointer delegate_mfp m_raw_mfp; // raw member function pointer @@ -622,15 +609,13 @@ class delegate<_ReturnType (Params...)> : public delegate_base<_ReturnType, Para public: // create a standard set of constructors delegate() : basetype() { } - delegate(const basetype &src) : basetype(src) { } + explicit delegate(const basetype &src) : basetype(src) { } delegate(const basetype &src, delegate_late_bind &object) : basetype(src, object) { } - template<class _FunctionClass> delegate(typename basetype::template traits<_FunctionClass>::member_func_type funcptr, const char *name, _FunctionClass *object) : basetype(funcptr, name, object) { } - template<class _FunctionClass> delegate(typename basetype::template traits<_FunctionClass>::const_member_func_type funcptr, const char *name, _FunctionClass *object) : basetype(funcptr, name, object) { } - delegate(std::function<_ReturnType(Params...)> funcptr) : basetype(funcptr, "") { } -#ifdef USE_STATIC_DELEGATE - template<class _FunctionClass> delegate(typename basetype::template traits<_FunctionClass>::static_func_type funcptr, const char *name, _FunctionClass *object) : basetype(funcptr, name, object) { } - template<class _FunctionClass> delegate(typename basetype::template traits<_FunctionClass>::static_ref_func_type funcptr, const char *name, _FunctionClass *object) : basetype(funcptr, name, object) { } -#endif + template<class _FunctionClass> delegate(typename basetype::template traits<_FunctionClass>::member_func_type funcptr, _FunctionClass *object) : basetype(funcptr, object) { } + template<class _FunctionClass> delegate(typename basetype::template traits<_FunctionClass>::const_member_func_type funcptr, _FunctionClass *object) : basetype(funcptr, object) { } + explicit delegate(std::function<_ReturnType(Params...)> funcptr) : basetype(funcptr) { } + template<class _FunctionClass> delegate(typename basetype::template traits<_FunctionClass>::static_func_type funcptr, _FunctionClass *object) : basetype(funcptr, object) { } + template<class _FunctionClass> delegate(typename basetype::template traits<_FunctionClass>::static_ref_func_type funcptr,_FunctionClass *object) : basetype(funcptr, object) { } delegate &operator=(const basetype &src) { *static_cast<basetype *>(this) = src; return *this; } }; diff --git a/src/mame/drivers/a2600.cpp b/src/mame/drivers/a2600.cpp index b99f56ec0d3..3613753f6e4 100644 --- a/src/mame/drivers/a2600.cpp +++ b/src/mame/drivers/a2600.cpp @@ -383,7 +383,7 @@ MACHINE_START_MEMBER(a2600_state,a2600) case A26_F6: case A26_DPC: m_maincpu->space(AS_PROGRAM).install_readwrite_handler(0x1000, 0x1fff, read8_delegate(FUNC(vcs_cart_slot_device::read_rom),(vcs_cart_slot_device*)m_cart), write8_delegate(FUNC(vcs_cart_slot_device::write_bank),(vcs_cart_slot_device*)m_cart)); - m_maincpu->space(AS_PROGRAM).set_direct_update_handler(direct_update_delegate(FUNC(vcs_cart_slot_device::cart_opbase),(vcs_cart_slot_device*)m_cart)); + m_maincpu->space(AS_PROGRAM).set_direct_update_handler(direct_update_delegate(&vcs_cart_slot_device::cart_opbase,(vcs_cart_slot_device*)m_cart)); break; case A26_FE: m_maincpu->space(AS_PROGRAM).install_readwrite_handler(0x1000, 0x1fff, read8_delegate(FUNC(vcs_cart_slot_device::read_rom),(vcs_cart_slot_device*)m_cart), write8_delegate(FUNC(vcs_cart_slot_device::write_ram),(vcs_cart_slot_device*)m_cart)); diff --git a/src/mame/drivers/abc80x.cpp b/src/mame/drivers/abc80x.cpp index 207bba0a2c3..2330b3d22cb 100644 --- a/src/mame/drivers/abc80x.cpp +++ b/src/mame/drivers/abc80x.cpp @@ -1608,7 +1608,7 @@ DIRECT_UPDATE_MEMBER( abc800c_state::direct_update_handler ) DRIVER_INIT_MEMBER(abc800c_state,driver_init) { - m_maincpu->space(AS_PROGRAM).set_direct_update_handler(direct_update_delegate(FUNC(abc800c_state::direct_update_handler), this)); + m_maincpu->space(AS_PROGRAM).set_direct_update_handler(direct_update_delegate(&abc800c_state::direct_update_handler, this)); } @@ -1642,7 +1642,7 @@ DIRECT_UPDATE_MEMBER( abc800m_state::direct_update_handler ) DRIVER_INIT_MEMBER(abc800m_state,driver_init) { - m_maincpu->space(AS_PROGRAM).set_direct_update_handler(direct_update_delegate(FUNC(abc800m_state::direct_update_handler), this)); + m_maincpu->space(AS_PROGRAM).set_direct_update_handler(direct_update_delegate(&abc800m_state::direct_update_handler, this)); } @@ -1666,7 +1666,7 @@ DIRECT_UPDATE_MEMBER( abc802_state::direct_update_handler ) DRIVER_INIT_MEMBER(abc802_state,driver_init) { - m_maincpu->space(AS_PROGRAM).set_direct_update_handler(direct_update_delegate(FUNC(abc802_state::direct_update_handler), this)); + m_maincpu->space(AS_PROGRAM).set_direct_update_handler(direct_update_delegate(&abc802_state::direct_update_handler, this)); } @@ -1700,7 +1700,7 @@ DIRECT_UPDATE_MEMBER( abc806_state::direct_update_handler ) DRIVER_INIT_MEMBER(abc806_state,driver_init) { - m_maincpu->space(AS_PROGRAM).set_direct_update_handler(direct_update_delegate(FUNC(abc806_state::direct_update_handler), this)); + m_maincpu->space(AS_PROGRAM).set_direct_update_handler(direct_update_delegate(&abc806_state::direct_update_handler, this)); } diff --git a/src/mame/drivers/atarisy4.cpp b/src/mame/drivers/atarisy4.cpp index 924b1c0161b..ede54766efa 100644 --- a/src/mame/drivers/atarisy4.cpp +++ b/src/mame/drivers/atarisy4.cpp @@ -302,7 +302,7 @@ void atarisy4_renderer::draw_polygon(uint16_t color) rectangle clip; vertex_t v1, v2, v3; atarisy4_polydata &extradata = object_data_alloc(); - render_delegate rd_scan = render_delegate(FUNC(atarisy4_renderer::draw_scanline), this); + render_delegate rd_scan = render_delegate(&atarisy4_renderer::draw_scanline, this); clip.set(0, 511, 0, 511); diff --git a/src/mame/drivers/atm.cpp b/src/mame/drivers/atm.cpp index 5ac43d436cf..0f944ac9d8b 100644 --- a/src/mame/drivers/atm.cpp +++ b/src/mame/drivers/atm.cpp @@ -147,7 +147,7 @@ MACHINE_RESET_MEMBER(atm_state,atm) { m_beta->enable(); } - space.set_direct_update_handler(direct_update_delegate(FUNC(atm_state::atm_direct), this)); + space.set_direct_update_handler(direct_update_delegate(&atm_state::atm_direct, this)); memset(messram,0,128*1024); diff --git a/src/mame/drivers/cobra.cpp b/src/mame/drivers/cobra.cpp index 49be80ec9e0..1af6d4aa3a3 100644 --- a/src/mame/drivers/cobra.cpp +++ b/src/mame/drivers/cobra.cpp @@ -1060,7 +1060,7 @@ void cobra_state::cobra_video_exit() void cobra_state::video_start() { - machine().add_notifier(MACHINE_NOTIFY_EXIT, machine_notify_delegate(FUNC(cobra_state::cobra_video_exit), this)); + machine().add_notifier(MACHINE_NOTIFY_EXIT, machine_notify_delegate(&cobra_state::cobra_video_exit, this)); m_renderer = std::make_unique<cobra_renderer>(*m_screen); m_renderer->gfx_init(); @@ -2531,7 +2531,7 @@ void cobra_renderer::gfx_fifo_exec() { if (w2 & 0x00200000) { - render_delegate rd = render_delegate(FUNC(cobra_renderer::render_texture_scan), this); + render_delegate rd = render_delegate(&cobra_renderer::render_texture_scan, this); for (int i=2; i < units; i++) { render_triangle(visarea, rd, 8, vert[i-2], vert[i-1], vert[i]); @@ -2539,7 +2539,7 @@ void cobra_renderer::gfx_fifo_exec() } else { - render_delegate rd = render_delegate(FUNC(cobra_renderer::render_color_scan), this); + render_delegate rd = render_delegate(&cobra_renderer::render_color_scan, this); for (int i=2; i < units; i++) { render_triangle(visarea, rd, 5, vert[i-2], vert[i-1], vert[i]); @@ -3331,7 +3331,7 @@ DRIVER_INIT_MEMBER(cobra_state, cobra) 8192, "GFXFIFO_IN", GFXFIFO_IN_VERBOSE != 0, - cobra_fifo::event_delegate(FUNC(cobra_state::gfxfifo_in_event_callback), this)) + cobra_fifo::event_delegate(&cobra_state::gfxfifo_in_event_callback, this)) ); m_gfxfifo_out = auto_alloc(machine(), @@ -3339,7 +3339,7 @@ DRIVER_INIT_MEMBER(cobra_state, cobra) 8192, "GFXFIFO_OUT", GFXFIFO_OUT_VERBOSE != 0, - cobra_fifo::event_delegate(FUNC(cobra_state::gfxfifo_out_event_callback), this)) + cobra_fifo::event_delegate(&cobra_state::gfxfifo_out_event_callback, this)) ); m_m2sfifo = auto_alloc(machine(), @@ -3347,7 +3347,7 @@ DRIVER_INIT_MEMBER(cobra_state, cobra) 2048, "M2SFIFO", M2SFIFO_VERBOSE != 0, - cobra_fifo::event_delegate(FUNC(cobra_state::m2sfifo_event_callback), this)) + cobra_fifo::event_delegate(&cobra_state::m2sfifo_event_callback, this)) ); m_s2mfifo = auto_alloc(machine(), @@ -3355,7 +3355,7 @@ DRIVER_INIT_MEMBER(cobra_state, cobra) 2048, "S2MFIFO", S2MFIFO_VERBOSE != 0, - cobra_fifo::event_delegate(FUNC(cobra_state::s2mfifo_event_callback), this)) + cobra_fifo::event_delegate(&cobra_state::s2mfifo_event_callback, this)) ); m_maincpu->ppc_set_dcstore_callback(write32_delegate(FUNC(cobra_state::main_cpu_dc_store),this)); diff --git a/src/mame/drivers/elwro800.cpp b/src/mame/drivers/elwro800.cpp index 4682eb5c3eb..845d063109a 100644 --- a/src/mame/drivers/elwro800.cpp +++ b/src/mame/drivers/elwro800.cpp @@ -507,7 +507,7 @@ MACHINE_RESET_MEMBER(elwro800_state,elwro800) // this is a reset of ls175 in mmu elwro800jr_mmu_w(0); - m_maincpu->space(AS_PROGRAM).set_direct_update_handler(direct_update_delegate(FUNC(elwro800_state::elwro800_direct_handler), this)); + m_maincpu->space(AS_PROGRAM).set_direct_update_handler(direct_update_delegate(&elwro800_state::elwro800_direct_handler, this)); } INTERRUPT_GEN_MEMBER(elwro800_state::elwro800jr_interrupt) diff --git a/src/mame/drivers/firefox.cpp b/src/mame/drivers/firefox.cpp index 3d527bd39c5..3a99b06518b 100644 --- a/src/mame/drivers/firefox.cpp +++ b/src/mame/drivers/firefox.cpp @@ -512,7 +512,7 @@ void firefox_state::machine_start() m_nvram_1c = machine().device<x2212_device>("nvram_1c"); m_nvram_1d = machine().device<x2212_device>("nvram_1d"); - m_laserdisc->set_data_ready_callback(phillips_22vp931_device::data_ready_delegate(FUNC(firefox_state::firq_gen), this)); + m_laserdisc->set_data_ready_callback(phillips_22vp931_device::data_ready_delegate(&firefox_state::firq_gen, this)); m_control_num = 0; m_sprite_bank = 0; diff --git a/src/mame/drivers/gba.cpp b/src/mame/drivers/gba.cpp index 60c5b11661f..e4ad9c227ea 100644 --- a/src/mame/drivers/gba.cpp +++ b/src/mame/drivers/gba.cpp @@ -1452,7 +1452,7 @@ DIRECT_UPDATE_MEMBER(gba_state::gba_direct) DRIVER_INIT_MEMBER(gba_state,gbadv) { - m_maincpu->space(AS_PROGRAM).set_direct_update_handler(direct_update_delegate(FUNC(gba_state::gba_direct), this)); + m_maincpu->space(AS_PROGRAM).set_direct_update_handler(direct_update_delegate(&gba_state::gba_direct, this)); } diff --git a/src/mame/drivers/gottlieb.cpp b/src/mame/drivers/gottlieb.cpp index fbaf0f2cb1a..3c65b88ddcd 100644 --- a/src/mame/drivers/gottlieb.cpp +++ b/src/mame/drivers/gottlieb.cpp @@ -1803,7 +1803,7 @@ static MACHINE_CONFIG_DERIVED( g2laser, gottlieb_core ) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 1.0) MCFG_LASERDISC_PR8210_ADD("laserdisc") - MCFG_LASERDISC_AUDIO(laserdisc_audio_delegate(FUNC(gottlieb_state::laserdisc_audio_process), (gottlieb_state*)owner)) + MCFG_LASERDISC_AUDIO(laserdisc_audio_delegate(gottlieb_state::laserdisc_audio_process, (gottlieb_state*)owner)) MCFG_LASERDISC_OVERLAY_DRIVER(GOTTLIEB_VIDEO_HCOUNT, GOTTLIEB_VIDEO_VCOUNT, gottlieb_state, screen_update_gottlieb) MCFG_LASERDISC_OVERLAY_CLIP(0, GOTTLIEB_VIDEO_HBLANK-1, 0, GOTTLIEB_VIDEO_VBLANK-8) MCFG_LASERDISC_OVERLAY_PALETTE("palette") @@ -1896,7 +1896,7 @@ static MACHINE_CONFIG_DERIVED( cobram3, gottlieb_core ) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 1.0) MCFG_LASERDISC_PR8210_ADD("laserdisc") - MCFG_LASERDISC_AUDIO(laserdisc_audio_delegate(FUNC(gottlieb_state::laserdisc_audio_process), (gottlieb_state*)owner)) + MCFG_LASERDISC_AUDIO(laserdisc_audio_delegate(gottlieb_state::laserdisc_audio_process, (gottlieb_state*)owner)) MCFG_LASERDISC_OVERLAY_DRIVER(GOTTLIEB_VIDEO_HCOUNT, GOTTLIEB_VIDEO_VCOUNT, gottlieb_state, screen_update_gottlieb) MCFG_LASERDISC_OVERLAY_CLIP(0, GOTTLIEB_VIDEO_HBLANK-1, 0, GOTTLIEB_VIDEO_VBLANK-8) MCFG_LASERDISC_OVERLAY_PALETTE("palette") diff --git a/src/mame/drivers/hp64k.cpp b/src/mame/drivers/hp64k.cpp index da247cd93ec..98fcc823baf 100644 --- a/src/mame/drivers/hp64k.cpp +++ b/src/mame/drivers/hp64k.cpp @@ -864,11 +864,11 @@ void hp64k_state::hp64k_update_drv_ctrl(void) if (new_drive != m_current_floppy) { m_fdc->set_floppy(new_drive); - floppy0->setup_index_pulse_cb(floppy_image_device::index_pulse_cb(FUNC(hp64k_state::hp64k_floppy_idx_cb) , this)); - floppy1->setup_index_pulse_cb(floppy_image_device::index_pulse_cb(FUNC(hp64k_state::hp64k_floppy_idx_cb) , this)); + floppy0->setup_index_pulse_cb(floppy_image_device::index_pulse_cb(&hp64k_state::hp64k_floppy_idx_cb, this)); + floppy1->setup_index_pulse_cb(floppy_image_device::index_pulse_cb(&hp64k_state::hp64k_floppy_idx_cb, this)); - floppy0->setup_wpt_cb(floppy_image_device::wpt_cb(FUNC(hp64k_state::hp64k_floppy_wpt_cb) , this)); - floppy1->setup_wpt_cb(floppy_image_device::wpt_cb(FUNC(hp64k_state::hp64k_floppy_wpt_cb) , this)); + floppy0->setup_wpt_cb(floppy_image_device::wpt_cb(&hp64k_state::hp64k_floppy_wpt_cb, this)); + floppy1->setup_wpt_cb(floppy_image_device::wpt_cb(&hp64k_state::hp64k_floppy_wpt_cb, this)); m_current_floppy = new_drive; } diff --git a/src/mame/drivers/konamigq.cpp b/src/mame/drivers/konamigq.cpp index 62658e0bf4f..70440be9a9e 100644 --- a/src/mame/drivers/konamigq.cpp +++ b/src/mame/drivers/konamigq.cpp @@ -316,8 +316,8 @@ static MACHINE_CONFIG_START( konamigq, konamigq_state ) MCFG_RAM_MODIFY("maincpu:ram") MCFG_RAM_DEFAULT_SIZE("4M") - MCFG_PSX_DMA_CHANNEL_READ( "maincpu", 5, psx_dma_read_delegate( FUNC( konamigq_state::scsi_dma_read ), (konamigq_state *) owner ) ) - MCFG_PSX_DMA_CHANNEL_WRITE( "maincpu", 5, psx_dma_write_delegate( FUNC( konamigq_state::scsi_dma_write ), (konamigq_state *) owner ) ) + MCFG_PSX_DMA_CHANNEL_READ( "maincpu", 5, psx_dma_read_delegate(&konamigq_state::scsi_dma_read, (konamigq_state *) owner ) ) + MCFG_PSX_DMA_CHANNEL_WRITE( "maincpu", 5, psx_dma_write_delegate(&konamigq_state::scsi_dma_write, (konamigq_state *) owner ) ) MCFG_CPU_ADD("soundcpu", M68000, XTAL_32MHz/4) /* 8MHz - measured */ MCFG_CPU_PROGRAM_MAP(konamigq_sound_map) diff --git a/src/mame/drivers/konamigv.cpp b/src/mame/drivers/konamigv.cpp index ea47f2a2bfd..16e162e49fa 100644 --- a/src/mame/drivers/konamigv.cpp +++ b/src/mame/drivers/konamigv.cpp @@ -325,8 +325,8 @@ static MACHINE_CONFIG_START( konamigv, konamigv_state ) MCFG_RAM_MODIFY("maincpu:ram") MCFG_RAM_DEFAULT_SIZE("2M") - MCFG_PSX_DMA_CHANNEL_READ( "maincpu", 5, psx_dma_read_delegate( FUNC( konamigv_state::scsi_dma_read ), (konamigv_state *) owner ) ) - MCFG_PSX_DMA_CHANNEL_WRITE( "maincpu", 5, psx_dma_write_delegate( FUNC( konamigv_state::scsi_dma_write ), (konamigv_state *) owner ) ) + MCFG_PSX_DMA_CHANNEL_READ( "maincpu", 5, psx_dma_read_delegate(&konamigv_state::scsi_dma_read, (konamigv_state *) owner ) ) + MCFG_PSX_DMA_CHANNEL_WRITE( "maincpu", 5, psx_dma_write_delegate(&konamigv_state::scsi_dma_write, (konamigv_state *) owner ) ) MCFG_DEVICE_ADD("mb89371", MB89371, 0) MCFG_EEPROM_SERIAL_93C46_ADD("eeprom") diff --git a/src/mame/drivers/ksys573.cpp b/src/mame/drivers/ksys573.cpp index b6019514d81..cfd6a8f73bf 100644 --- a/src/mame/drivers/ksys573.cpp +++ b/src/mame/drivers/ksys573.cpp @@ -2025,8 +2025,8 @@ static MACHINE_CONFIG_START( konami573, ksys573_state ) MCFG_RAM_MODIFY( "maincpu:ram" ) MCFG_RAM_DEFAULT_SIZE( "4M" ) - MCFG_PSX_DMA_CHANNEL_READ( "maincpu", 5, psx_dma_read_delegate( FUNC( ksys573_state::cdrom_dma_read ), (ksys573_state *) owner ) ) - MCFG_PSX_DMA_CHANNEL_WRITE( "maincpu", 5, psx_dma_write_delegate( FUNC( ksys573_state::cdrom_dma_write ), (ksys573_state *) owner ) ) + MCFG_PSX_DMA_CHANNEL_READ( "maincpu", 5, psx_dma_read_delegate(&ksys573_state::cdrom_dma_read, (ksys573_state *) owner ) ) + MCFG_PSX_DMA_CHANNEL_WRITE( "maincpu", 5, psx_dma_write_delegate(&ksys573_state::cdrom_dma_write, (ksys573_state *) owner ) ) MCFG_MACHINE_RESET_OVERRIDE( ksys573_state, konami573 ) @@ -2064,7 +2064,7 @@ static MACHINE_CONFIG_START( konami573, ksys573_state ) /* video hardware */ MCFG_PSXGPU_ADD( "maincpu", "gpu", CXD8561Q, 0x200000, XTAL_53_693175MHz ) - MCFG_PSXGPU_VBLANK_CALLBACK( vblank_state_delegate( FUNC( ksys573_state::sys573_vblank ), (ksys573_state *) owner ) ) + MCFG_PSXGPU_VBLANK_CALLBACK(vblank_state_delegate(&ksys573_state::sys573_vblank, (ksys573_state *) owner )) /* sound hardware */ MCFG_SPEAKER_STANDARD_STEREO( "lspeaker", "rspeaker" ) diff --git a/src/mame/drivers/mc1000.cpp b/src/mame/drivers/mc1000.cpp index 84810ed4cd9..7735c3124bb 100644 --- a/src/mame/drivers/mc1000.cpp +++ b/src/mame/drivers/mc1000.cpp @@ -586,7 +586,7 @@ DIRECT_UPDATE_MEMBER(mc1000_state::mc1000_direct_update_handler) DRIVER_INIT_MEMBER(mc1000_state,mc1000) { - m_maincpu->space(AS_PROGRAM).set_direct_update_handler(direct_update_delegate(FUNC(mc1000_state::mc1000_direct_update_handler), this)); + m_maincpu->space(AS_PROGRAM).set_direct_update_handler(direct_update_delegate(&mc1000_state::mc1000_direct_update_handler, this)); } /* System Drivers */ diff --git a/src/mame/drivers/mediagx.cpp b/src/mame/drivers/mediagx.cpp index 2d4d90959b8..cd40dea7e17 100644 --- a/src/mame/drivers/mediagx.cpp +++ b/src/mame/drivers/mediagx.cpp @@ -973,7 +973,7 @@ void mediagx_state::install_speedups(const speedup_entry *entries, int count) } #ifdef MAME_DEBUG - machine().add_notifier(MACHINE_NOTIFY_EXIT, machine_notify_delegate(FUNC(mediagx_state::report_speedups), this)); + machine().add_notifier(MACHINE_NOTIFY_EXIT, machine_notify_delegate(&mediagx_state::report_speedups, this)); #endif } diff --git a/src/mame/drivers/mpf1.cpp b/src/mame/drivers/mpf1.cpp index cb5f0db7e9c..f3049cc686c 100644 --- a/src/mame/drivers/mpf1.cpp +++ b/src/mame/drivers/mpf1.cpp @@ -475,7 +475,7 @@ DIRECT_UPDATE_MEMBER(mpf1_state::mpf1_direct_update_handler) DRIVER_INIT_MEMBER(mpf1_state,mpf1) { - m_maincpu->space(AS_PROGRAM).set_direct_update_handler(direct_update_delegate(FUNC(mpf1_state::mpf1_direct_update_handler), this)); + m_maincpu->space(AS_PROGRAM).set_direct_update_handler(direct_update_delegate(&mpf1_state::mpf1_direct_update_handler, this)); } COMP( 1979, mpf1, 0, 0, mpf1, mpf1, mpf1_state, mpf1, "Multitech", "Micro Professor 1", 0) diff --git a/src/mame/drivers/mpz80.cpp b/src/mame/drivers/mpz80.cpp index 13b4c8d2732..e4310af2b8f 100644 --- a/src/mame/drivers/mpz80.cpp +++ b/src/mame/drivers/mpz80.cpp @@ -794,7 +794,7 @@ DIRECT_UPDATE_MEMBER(mpz80_state::mpz80_direct_update_handler) DRIVER_INIT_MEMBER(mpz80_state,mpz80) { address_space &program = machine().device<cpu_device>(Z80_TAG)->space(AS_PROGRAM); - program.set_direct_update_handler(direct_update_delegate(FUNC(mpz80_state::mpz80_direct_update_handler), this)); + program.set_direct_update_handler(direct_update_delegate(&mpz80_state::mpz80_direct_update_handler, this)); } diff --git a/src/mame/drivers/namcos12.cpp b/src/mame/drivers/namcos12.cpp index 4a2f0a31255..c35f594f6c8 100644 --- a/src/mame/drivers/namcos12.cpp +++ b/src/mame/drivers/namcos12.cpp @@ -1677,7 +1677,7 @@ static MACHINE_CONFIG_START( coh700, namcos12_state ) MCFG_RAM_MODIFY("maincpu:ram") MCFG_RAM_DEFAULT_SIZE("4M") - MCFG_PSX_DMA_CHANNEL_READ( "maincpu", 5, psx_dma_read_delegate( FUNC( namcos12_state::namcos12_rom_read ), (namcos12_state *) owner ) ) + MCFG_PSX_DMA_CHANNEL_READ( "maincpu", 5, psx_dma_read_delegate(&namcos12_state::namcos12_rom_read, (namcos12_state *) owner )) MCFG_CPU_ADD("sub", H83002, 16934400) // frequency based on research (superctr) MCFG_CPU_PROGRAM_MAP(s12h8rwmap) @@ -1700,7 +1700,7 @@ static MACHINE_CONFIG_START( coh700, namcos12_state ) /* video hardware */ MCFG_PSXGPU_ADD( "maincpu", "gpu", CXD8654Q, 0x200000, XTAL_53_693175MHz ) - MCFG_PSXGPU_VBLANK_CALLBACK( vblank_state_delegate( FUNC( namcos12_state::namcos12_sub_irq ), (namcos12_state *) owner ) ) + MCFG_PSXGPU_VBLANK_CALLBACK(vblank_state_delegate(&namcos12_state::namcos12_sub_irq, (namcos12_state *) owner ) ) /* sound hardware */ MCFG_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker") diff --git a/src/mame/drivers/namcos23.cpp b/src/mame/drivers/namcos23.cpp index 33add29d97b..133193de49c 100644 --- a/src/mame/drivers/namcos23.cpp +++ b/src/mame/drivers/namcos23.cpp @@ -2284,13 +2284,13 @@ void namcos23_renderer::render_flush(bitmap_rgb32& bitmap) // We should probably split the polygons into triangles ourselves to insure everything is being rendered properly if (p->vertex_count == 3) - render_triangle(scissor, render_delegate(FUNC(namcos23_renderer::render_scanline), this), 4, p->pv[0], p->pv[1], p->pv[2]); + render_triangle(scissor, render_delegate(&namcos23_renderer::render_scanline, this), 4, p->pv[0], p->pv[1], p->pv[2]); else if (p->vertex_count == 4) - render_polygon<4>(scissor, render_delegate(FUNC(namcos23_renderer::render_scanline), this), 4, p->pv); + render_polygon<4>(scissor, render_delegate(&namcos23_renderer::render_scanline, this), 4, p->pv); else if (p->vertex_count == 5) - render_polygon<5>(scissor, render_delegate(FUNC(namcos23_renderer::render_scanline), this), 4, p->pv); + render_polygon<5>(scissor, render_delegate(&namcos23_renderer::render_scanline, this), 4, p->pv); else if (p->vertex_count == 6) - render_polygon<6>(scissor, render_delegate(FUNC(namcos23_renderer::render_scanline), this), 4, p->pv); + render_polygon<6>(scissor, render_delegate(&namcos23_renderer::render_scanline, this), 4, p->pv); } render.poly_count = 0; } diff --git a/src/mame/drivers/osi.cpp b/src/mame/drivers/osi.cpp index 383009f271c..8559f07867d 100644 --- a/src/mame/drivers/osi.cpp +++ b/src/mame/drivers/osi.cpp @@ -690,7 +690,7 @@ void c1pmf_state::machine_start() // drive select logic missing if (m_floppy0->get_device()) - m_floppy0->get_device()->setup_index_pulse_cb(floppy_image_device::index_pulse_cb(FUNC(sb2m600_state::floppy_index_callback), this)); + m_floppy0->get_device()->setup_index_pulse_cb(floppy_image_device::index_pulse_cb(&sb2m600_state::floppy_index_callback, this)); } // disk format: 1 head, 36 tracks (? - manual displays a directory listing with 40 tracks), diff --git a/src/mame/drivers/pc88va.cpp b/src/mame/drivers/pc88va.cpp index 5f6244f9c7b..0afae61e590 100644 --- a/src/mame/drivers/pc88va.cpp +++ b/src/mame/drivers/pc88va.cpp @@ -1646,11 +1646,11 @@ void pc88va_state::machine_start() floppy_image_device *floppy; floppy = machine().device<floppy_connector>("upd765:0")->get_device(); if(floppy) - floppy->setup_ready_cb(floppy_image_device::ready_cb(FUNC(pc88va_state::pc88va_fdc_update_ready), this)); + floppy->setup_ready_cb(floppy_image_device::ready_cb(&pc88va_state::pc88va_fdc_update_ready, this)); floppy = machine().device<floppy_connector>("upd765:1")->get_device(); if(floppy) - floppy->setup_ready_cb(floppy_image_device::ready_cb(FUNC(pc88va_state::pc88va_fdc_update_ready), this)); + floppy->setup_ready_cb(floppy_image_device::ready_cb(&pc88va_state::pc88va_fdc_update_ready, this)); machine().device<floppy_connector>("upd765:0")->get_device()->set_rpm(300); machine().device<floppy_connector>("upd765:1")->get_device()->set_rpm(300); diff --git a/src/mame/drivers/pdp1.cpp b/src/mame/drivers/pdp1.cpp index 859b5d3e4b8..6fcb5a367e7 100644 --- a/src/mame/drivers/pdp1.cpp +++ b/src/mame/drivers/pdp1.cpp @@ -647,7 +647,7 @@ void pdp1_state::machine_start() dst = memregion("gfx1")->base(); memcpy(dst, fontdata6x8, pdp1_fontdata_size); - machine().add_notifier(MACHINE_NOTIFY_EXIT, machine_notify_delegate(FUNC(pdp1_state::pdp1_machine_stop),this)); + machine().add_notifier(MACHINE_NOTIFY_EXIT, machine_notify_delegate(&pdp1_state::pdp1_machine_stop,this)); m_tape_reader.timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(pdp1_state::reader_callback),this)); m_tape_puncher.timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(pdp1_state::puncher_callback),this)); diff --git a/src/mame/drivers/pentagon.cpp b/src/mame/drivers/pentagon.cpp index 9f0bb0697b1..725e3003b2c 100644 --- a/src/mame/drivers/pentagon.cpp +++ b/src/mame/drivers/pentagon.cpp @@ -212,7 +212,7 @@ MACHINE_RESET_MEMBER(pentagon_state,pentagon) if (strcmp(machine().system().name, "pent1024")==0) m_beta->enable(); } - space.set_direct_update_handler(direct_update_delegate(FUNC(pentagon_state::pentagon_direct), this)); + space.set_direct_update_handler(direct_update_delegate(&pentagon_state::pentagon_direct, this)); memset(messram,0,128*1024); diff --git a/src/mame/drivers/peoplepc.cpp b/src/mame/drivers/peoplepc.cpp index e194517c460..51ed69a429d 100644 --- a/src/mame/drivers/peoplepc.cpp +++ b/src/mame/drivers/peoplepc.cpp @@ -180,10 +180,10 @@ void peoplepc_state::machine_start() m_dma0pg = 0; // FIXME: cheat as there no docs about how or obvious ports that set to control the motor - m_flop0->get_device()->setup_load_cb(floppy_image_device::load_cb(FUNC(peoplepc_state::floppy_load), this)); - m_flop0->get_device()->setup_unload_cb(floppy_image_device::unload_cb(FUNC(peoplepc_state::floppy_unload), this)); - m_flop1->get_device()->setup_load_cb(floppy_image_device::load_cb(FUNC(peoplepc_state::floppy_load), this)); - m_flop1->get_device()->setup_unload_cb(floppy_image_device::unload_cb(FUNC(peoplepc_state::floppy_unload), this)); + m_flop0->get_device()->setup_load_cb(floppy_image_device::load_cb(&peoplepc_state::floppy_load, this)); + m_flop0->get_device()->setup_unload_cb(floppy_image_device::unload_cb(&peoplepc_state::floppy_unload, this)); + m_flop1->get_device()->setup_load_cb(floppy_image_device::load_cb(&peoplepc_state::floppy_load, this)); + m_flop1->get_device()->setup_unload_cb(floppy_image_device::unload_cb(&peoplepc_state::floppy_unload, this)); } static ADDRESS_MAP_START( peoplepc_map, AS_PROGRAM, 16, peoplepc_state ) diff --git a/src/mame/drivers/psx.cpp b/src/mame/drivers/psx.cpp index 10ead0cdd54..1b3536e4f50 100644 --- a/src/mame/drivers/psx.cpp +++ b/src/mame/drivers/psx.cpp @@ -124,8 +124,8 @@ static MACHINE_CONFIG_START( psj, psx1_state ) MCFG_PSXCD_ADD(PSXCD_TAG, "cdrom") MCFG_PSXCD_IRQ_HANDLER(DEVWRITELINE("maincpu:irq", psxirq_device, intin2)) - MCFG_PSX_DMA_CHANNEL_READ( "maincpu", 3, psx_dma_read_delegate( FUNC( psx1_state::cd_dma_read ), (psx1_state *) owner ) ) - MCFG_PSX_DMA_CHANNEL_WRITE( "maincpu", 3, psx_dma_write_delegate( FUNC( psx1_state::cd_dma_write ), (psx1_state *) owner ) ) + MCFG_PSX_DMA_CHANNEL_READ( "maincpu", 3, psx_dma_read_delegate(&psx1_state::cd_dma_read, (psx1_state *) owner ) ) + MCFG_PSX_DMA_CHANNEL_WRITE( "maincpu", 3, psx_dma_write_delegate(&psx1_state::cd_dma_write, (psx1_state *) owner ) ) MACHINE_CONFIG_END static MACHINE_CONFIG_DERIVED( psu, psj ) @@ -170,8 +170,8 @@ static MACHINE_CONFIG_START( pse, psx1_state ) MCFG_PSXCD_ADD(PSXCD_TAG, "cdrom") MCFG_PSXCD_IRQ_HANDLER(DEVWRITELINE("maincpu:irq", psxirq_device, intin2)) - MCFG_PSX_DMA_CHANNEL_READ( "maincpu", 3, psx_dma_read_delegate( FUNC( psx1_state::cd_dma_read ), (psx1_state *) owner ) ) - MCFG_PSX_DMA_CHANNEL_WRITE( "maincpu", 3, psx_dma_write_delegate( FUNC( psx1_state::cd_dma_write ), (psx1_state *) owner ) ) + MCFG_PSX_DMA_CHANNEL_READ( "maincpu", 3, psx_dma_read_delegate(&psx1_state::cd_dma_read, (psx1_state *) owner ) ) + MCFG_PSX_DMA_CHANNEL_WRITE( "maincpu", 3, psx_dma_write_delegate(&psx1_state::cd_dma_write, (psx1_state *) owner ) ) MACHINE_CONFIG_END ROM_START( psj ) diff --git a/src/mame/drivers/rollext.cpp b/src/mame/drivers/rollext.cpp index e77fa721a9f..016b6b5adfe 100644 --- a/src/mame/drivers/rollext.cpp +++ b/src/mame/drivers/rollext.cpp @@ -153,7 +153,7 @@ void rollext_renderer::process_display_list(uint32_t* disp_ram) { const rectangle& visarea = screen().visible_area(); - render_delegate rd = render_delegate(FUNC(rollext_renderer::render_texture_scan), this); + render_delegate rd = render_delegate(&rollext_renderer::render_texture_scan, this); int num = disp_ram[0xffffc/4]; diff --git a/src/mame/drivers/sage2.cpp b/src/mame/drivers/sage2.cpp index 3276c2d0fc4..808679974a3 100644 --- a/src/mame/drivers/sage2.cpp +++ b/src/mame/drivers/sage2.cpp @@ -557,7 +557,7 @@ DIRECT_UPDATE_MEMBER(sage2_state::sage2_direct_update_handler) DRIVER_INIT_MEMBER(sage2_state,sage2) { address_space &program = machine().device<cpu_device>(M68000_TAG)->space(AS_PROGRAM); - program.set_direct_update_handler(direct_update_delegate(FUNC(sage2_state::sage2_direct_update_handler), this)); + program.set_direct_update_handler(direct_update_delegate(&sage2_state::sage2_direct_update_handler, this)); } diff --git a/src/mame/drivers/saturn.cpp b/src/mame/drivers/saturn.cpp index 0ff04737435..ac2d1f2bd91 100644 --- a/src/mame/drivers/saturn.cpp +++ b/src/mame/drivers/saturn.cpp @@ -727,7 +727,7 @@ MACHINE_START_MEMBER(sat_console_state, saturn) save_item(NAME(m_smpc.SR)); save_item(NAME(m_smpc.SMEM)); - machine().add_notifier(MACHINE_NOTIFY_EXIT, machine_notify_delegate(FUNC(sat_console_state::stvcd_exit), this)); + machine().add_notifier(MACHINE_NOTIFY_EXIT, machine_notify_delegate(&sat_console_state::stvcd_exit, this)); m_smpc.rtc_data[0] = DectoBCD(systime.local_time.year /100); m_smpc.rtc_data[1] = DectoBCD(systime.local_time.year %100); diff --git a/src/mame/drivers/scorpion.cpp b/src/mame/drivers/scorpion.cpp index 02aedba513f..80b8dca50de 100644 --- a/src/mame/drivers/scorpion.cpp +++ b/src/mame/drivers/scorpion.cpp @@ -196,7 +196,7 @@ MACHINE_RESET_MEMBER(scorpion_state,scorpion) space.install_write_handler(0x0000, 0x3fff, write8_delegate(FUNC(scorpion_state::scorpion_0000_w),this)); m_beta->disable(); - space.set_direct_update_handler(direct_update_delegate(FUNC(scorpion_state::scorpion_direct), this)); + space.set_direct_update_handler(direct_update_delegate(&scorpion_state::scorpion_direct, this)); memset(messram,0,256*1024); diff --git a/src/mame/drivers/segahang.cpp b/src/mame/drivers/segahang.cpp index 33b13b57b82..0ef5a5d2ae2 100644 --- a/src/mame/drivers/segahang.cpp +++ b/src/mame/drivers/segahang.cpp @@ -1965,7 +1965,7 @@ DRIVER_INIT_MEMBER(segahang_state,sharrier) { DRIVER_INIT_CALL(generic); m_sharrier_video = true; - m_i8751_vblank_hook = i8751_sim_delegate(FUNC(segahang_state::sharrier_i8751_sim), this); + m_i8751_vblank_hook = i8751_sim_delegate(&segahang_state::sharrier_i8751_sim, this); } DRIVER_INIT_MEMBER(segahang_state,enduror) diff --git a/src/mame/drivers/segas16a.cpp b/src/mame/drivers/segas16a.cpp index 88378af9992..6c72db14c1d 100644 --- a/src/mame/drivers/segas16a.cpp +++ b/src/mame/drivers/segas16a.cpp @@ -3665,7 +3665,7 @@ DRIVER_INIT_MEMBER(segas16a_state,aceattaca) DRIVER_INIT_MEMBER(segas16a_state,dumpmtmt) { DRIVER_INIT_CALL(generic); - m_i8751_vblank_hook = i8751_sim_delegate(FUNC(segas16a_state::dumpmtmt_i8751_sim), this); + m_i8751_vblank_hook = i8751_sim_delegate(&segas16a_state::dumpmtmt_i8751_sim, this); } DRIVER_INIT_MEMBER(segas16a_state,mjleague) @@ -3683,7 +3683,7 @@ DRIVER_INIT_MEMBER(segas16a_state,passsht16a) DRIVER_INIT_MEMBER(segas16a_state,quartet) { DRIVER_INIT_CALL(generic); - m_i8751_vblank_hook = i8751_sim_delegate(FUNC(segas16a_state::quartet_i8751_sim), this); + m_i8751_vblank_hook = i8751_sim_delegate(&segas16a_state::quartet_i8751_sim, this); } @@ -3697,7 +3697,7 @@ DRIVER_INIT_MEMBER(segas16a_state,sjryukoa) { DRIVER_INIT_CALL(generic); m_custom_io_r = read16_delegate(FUNC(segas16a_state::sjryuko_custom_io_r), this); - m_lamp_changed_w = lamp_changed_delegate(FUNC(segas16a_state::sjryuko_lamp_changed_w), this); + m_lamp_changed_w = lamp_changed_delegate(&segas16a_state::sjryuko_lamp_changed_w, this); } diff --git a/src/mame/drivers/segas16b.cpp b/src/mame/drivers/segas16b.cpp index 995cefe3be1..65f285a8ee2 100644 --- a/src/mame/drivers/segas16b.cpp +++ b/src/mame/drivers/segas16b.cpp @@ -8622,19 +8622,19 @@ DRIVER_INIT_MEMBER(segas16b_state,aliensyn7_5358_small) DRIVER_INIT_MEMBER(segas16b_state,altbeast_5521) { DRIVER_INIT_CALL(generic_5521); - m_i8751_vblank_hook = i8751_sim_delegate(FUNC(segas16b_state::altbeast_i8751_sim), this); + m_i8751_vblank_hook = i8751_sim_delegate(&segas16b_state::altbeast_i8751_sim, this); } DRIVER_INIT_MEMBER(segas16b_state,altbeasj_5521) { DRIVER_INIT_CALL(generic_5521); - m_i8751_vblank_hook = i8751_sim_delegate(FUNC(segas16b_state::altbeasj_i8751_sim), this); + m_i8751_vblank_hook = i8751_sim_delegate(&segas16b_state::altbeasj_i8751_sim, this); } DRIVER_INIT_MEMBER(segas16b_state,altbeas5_5521) { DRIVER_INIT_CALL(generic_5521); - m_i8751_vblank_hook = i8751_sim_delegate(FUNC(segas16b_state::altbeas5_i8751_sim), this); + m_i8751_vblank_hook = i8751_sim_delegate(&segas16b_state::altbeas5_i8751_sim, this); } DRIVER_INIT_MEMBER(segas16b_state,altbeas4_5521) @@ -8646,7 +8646,7 @@ DRIVER_INIT_MEMBER(segas16b_state,altbeas4_5521) DRIVER_INIT_MEMBER(segas16b_state,ddux_5704) { DRIVER_INIT_CALL(generic_5704); - m_i8751_vblank_hook = i8751_sim_delegate(FUNC(segas16b_state::ddux_i8751_sim), this); + m_i8751_vblank_hook = i8751_sim_delegate(&segas16b_state::ddux_i8751_sim, this); } DRIVER_INIT_MEMBER(segas16b_state,dunkshot_5358_small) @@ -8665,7 +8665,7 @@ DRIVER_INIT_MEMBER(segas16b_state,exctleag_5358) DRIVER_INIT_MEMBER(segas16b_state,goldnaxe_5704) { DRIVER_INIT_CALL(generic_5704); - m_i8751_vblank_hook = i8751_sim_delegate(FUNC(segas16b_state::goldnaxe_i8751_sim), this); + m_i8751_vblank_hook = i8751_sim_delegate(&segas16b_state::goldnaxe_i8751_sim, this); static const uint8_t memory_control_5704[0x10] = { 0x02,0x00, 0x02,0x08, 0x00,0x1f, 0x00,0xff, 0x00,0x20, 0x01,0x10, 0x00,0x14, 0x00,0xc4 }; @@ -8675,7 +8675,7 @@ DRIVER_INIT_MEMBER(segas16b_state,goldnaxe_5704) DRIVER_INIT_MEMBER(segas16b_state,goldnaxe_5797) { DRIVER_INIT_CALL(generic_5797); - m_i8751_vblank_hook = i8751_sim_delegate(FUNC(segas16b_state::goldnaxe_i8751_sim), this); + m_i8751_vblank_hook = i8751_sim_delegate(&segas16b_state::goldnaxe_i8751_sim, this); static const uint8_t memory_control_5797[0x10] = { 0x02,0x00, 0x00,0x1f, 0x00,0x1e, 0x00,0xff, 0x00,0x20, 0x01,0x10, 0x00,0x14, 0x00,0xc4 }; @@ -8749,13 +8749,13 @@ DRIVER_INIT_MEMBER(segas16b_state,timescan_5358_small) DRIVER_INIT_MEMBER(segas16b_state,tturf_5704) { DRIVER_INIT_CALL(generic_5704); - m_i8751_vblank_hook = i8751_sim_delegate(FUNC(segas16b_state::tturf_i8751_sim), this); + m_i8751_vblank_hook = i8751_sim_delegate(&segas16b_state::tturf_i8751_sim, this); } DRIVER_INIT_MEMBER(segas16b_state,wb3_5704) { DRIVER_INIT_CALL(generic_5704); - m_i8751_vblank_hook = i8751_sim_delegate(FUNC(segas16b_state::wb3_i8751_sim), this); + m_i8751_vblank_hook = i8751_sim_delegate(&segas16b_state::wb3_i8751_sim, this); } DRIVER_INIT_MEMBER(segas16b_state,snapper) @@ -9430,7 +9430,7 @@ DRIVER_INIT_MEMBER(isgsm_state,shinfz) memcpy(rom, &temp[0], 0x200000); m_read_xor = 0x66; - m_security_callback = security_callback_delegate(FUNC(isgsm_state::shinfz_security), this); + m_security_callback = security_callback_delegate(&isgsm_state::shinfz_security, this); } DRIVER_INIT_MEMBER(isgsm_state,tetrbx) @@ -9444,7 +9444,7 @@ DRIVER_INIT_MEMBER(isgsm_state,tetrbx) memcpy(rom, &temp[0], 0x80000); m_read_xor = 0x73; - m_security_callback = security_callback_delegate(FUNC(isgsm_state::tetrbx_security), this); + m_security_callback = security_callback_delegate(&isgsm_state::tetrbx_security, this); } diff --git a/src/mame/drivers/segaxbd.cpp b/src/mame/drivers/segaxbd.cpp index 2ab905b232b..c33521f6361 100644 --- a/src/mame/drivers/segaxbd.cpp +++ b/src/mame/drivers/segaxbd.cpp @@ -317,7 +317,7 @@ void segaxbd_state::device_start() m_scanline_timer = timer_alloc(TID_SCANLINE); // reset the custom handlers and other pointers - m_iochip_custom_io_w[0][3] = iowrite_delegate(FUNC(segaxbd_state::generic_iochip0_lamps_w), this); + m_iochip_custom_io_w[0][3] = iowrite_delegate(&segaxbd_state::generic_iochip0_lamps_w, this); // save state @@ -4736,8 +4736,8 @@ ROM_END void segaxbd_state::install_aburner2(void) { m_road_priority = 0; - m_iochip_custom_io_r[0][0] = ioread_delegate(FUNC(segaxbd_state::aburner2_iochip0_motor_r), this); - m_iochip_custom_io_w[0][1] = iowrite_delegate(FUNC(segaxbd_state::aburner2_iochip0_motor_w), this); + m_iochip_custom_io_r[0][0] = ioread_delegate(&segaxbd_state::aburner2_iochip0_motor_r, this); + m_iochip_custom_io_w[0][1] = iowrite_delegate(&segaxbd_state::aburner2_iochip0_motor_w, this); } DRIVER_INIT_MEMBER(segaxbd_new_state,aburner2) @@ -4747,8 +4747,8 @@ DRIVER_INIT_MEMBER(segaxbd_new_state,aburner2) void segaxbd_state::install_lastsurv(void) { - m_iochip_custom_io_r[1][1] = ioread_delegate(FUNC(segaxbd_state::lastsurv_iochip1_port_r), this); - m_iochip_custom_io_w[0][3] = iowrite_delegate(FUNC(segaxbd_state::lastsurv_iochip0_muxer_w), this); + m_iochip_custom_io_r[1][1] = ioread_delegate(&segaxbd_state::lastsurv_iochip1_port_r, this); + m_iochip_custom_io_w[0][3] = iowrite_delegate(&segaxbd_state::lastsurv_iochip0_muxer_w, this); } DRIVER_INIT_MEMBER(segaxbd_new_state,lastsurv) @@ -4773,8 +4773,8 @@ DRIVER_INIT_MEMBER(segaxbd_new_state,loffire) void segaxbd_state::install_smgp(void) { - m_iochip_custom_io_r[0][0] = ioread_delegate(FUNC(segaxbd_state::smgp_iochip0_motor_r), this); - m_iochip_custom_io_w[0][1] = iowrite_delegate(FUNC(segaxbd_state::smgp_iochip0_motor_w), this); + m_iochip_custom_io_r[0][0] = ioread_delegate(&segaxbd_state::smgp_iochip0_motor_r, this); + m_iochip_custom_io_w[0][1] = iowrite_delegate(&segaxbd_state::smgp_iochip0_motor_w, this); // map /EXCS space m_maincpu->space(AS_PROGRAM).install_readwrite_handler(0x2f0000, 0x2f3fff, read16_delegate(FUNC(segaxbd_state::smgp_excs_r), this), write16_delegate(FUNC(segaxbd_state::smgp_excs_w), this)); diff --git a/src/mame/drivers/segaybd.cpp b/src/mame/drivers/segaybd.cpp index c06d9f3ad17..e456ba3d3a7 100644 --- a/src/mame/drivers/segaybd.cpp +++ b/src/mame/drivers/segaybd.cpp @@ -2754,16 +2754,16 @@ DRIVER_INIT_MEMBER(segaybd_state,generic) DRIVER_INIT_MEMBER(segaybd_state,gforce2) { DRIVER_INIT_CALL(generic); - m_output_cb1 = output_delegate(FUNC(segaybd_state::gforce2_output_cb1), this); - m_output_cb2 = output_delegate(FUNC(segaybd_state::gforce2_output_cb2), this); + m_output_cb1 = output_delegate(&segaybd_state::gforce2_output_cb1, this); + m_output_cb2 = output_delegate(&segaybd_state::gforce2_output_cb2, this); } DRIVER_INIT_MEMBER(segaybd_state,gloc) { // because some of the output data isn't fully understood we need to "center" the rams DRIVER_INIT_CALL(generic); - m_output_cb1 = output_delegate(FUNC(segaybd_state::gloc_output_cb1), this); - m_output_cb2 = output_delegate(FUNC(segaybd_state::gloc_output_cb2), this); + m_output_cb1 = output_delegate(&segaybd_state::gloc_output_cb1, this); + m_output_cb2 = output_delegate(&segaybd_state::gloc_output_cb2, this); output().set_value("left_motor_position_nor", 16); output().set_value("right_motor_position_nor", 16); @@ -2772,21 +2772,21 @@ DRIVER_INIT_MEMBER(segaybd_state,gloc) DRIVER_INIT_MEMBER(segaybd_state,r360) { DRIVER_INIT_CALL(generic); - m_output_cb2 = output_delegate(FUNC(segaybd_state::r360_output_cb2), this); + m_output_cb2 = output_delegate(&segaybd_state::r360_output_cb2, this); } DRIVER_INIT_MEMBER(segaybd_state,pdrift) { // because some of the output data isn't fully understood we need to "center" the motor DRIVER_INIT_CALL(generic); - m_output_cb1 = output_delegate(FUNC(segaybd_state::pdrift_output_cb1), this); - m_output_cb2 = output_delegate(FUNC(segaybd_state::pdrift_output_cb2), this); + m_output_cb1 = output_delegate(&segaybd_state::pdrift_output_cb1, this); + m_output_cb2 = output_delegate(&segaybd_state::pdrift_output_cb2, this); } DRIVER_INIT_MEMBER(segaybd_state,rchase) { DRIVER_INIT_CALL(generic); - m_output_cb2 = output_delegate(FUNC(segaybd_state::rchase_output_cb2), this); + m_output_cb2 = output_delegate(&segaybd_state::rchase_output_cb2, this); } diff --git a/src/mame/drivers/statriv2.cpp b/src/mame/drivers/statriv2.cpp index e82db5281c5..df7f437290d 100644 --- a/src/mame/drivers/statriv2.cpp +++ b/src/mame/drivers/statriv2.cpp @@ -1150,11 +1150,11 @@ DRIVER_INIT_MEMBER(statriv2_state,laserdisc) result = 0x18; osd_printf_debug("%s:ld read ($%02X) = %02X\n", machine().describe_context(), 0x28 + offset, result); return result; - }), + },"write_lambda"), write8_delegate([this](address_space &space, offs_t offset, uint8_t data, uint8_t mem_mask) { osd_printf_debug("%s:ld write ($%02X) = %02X\n", machine().describe_context(), 0x28 + offset, data); - }) + },"read_lambda") ); } diff --git a/src/mame/drivers/stv.cpp b/src/mame/drivers/stv.cpp index a347a848f93..c6ffc5efbc2 100644 --- a/src/mame/drivers/stv.cpp +++ b/src/mame/drivers/stv.cpp @@ -1182,7 +1182,7 @@ MACHINE_START_MEMBER(stv_state,stv) stv_register_protection_savestates(); // machine/stvprot.c - machine().add_notifier(MACHINE_NOTIFY_EXIT, machine_notify_delegate(FUNC(stv_state::stvcd_exit), this)); + machine().add_notifier(MACHINE_NOTIFY_EXIT, machine_notify_delegate(&stv_state::stvcd_exit, this)); m_smpc.rtc_data[0] = DectoBCD(systime.local_time.year /100); m_smpc.rtc_data[1] = DectoBCD(systime.local_time.year %100); diff --git a/src/mame/drivers/taitopjc.cpp b/src/mame/drivers/taitopjc.cpp index 022d5a1fee5..ab8a8877ddd 100644 --- a/src/mame/drivers/taitopjc.cpp +++ b/src/mame/drivers/taitopjc.cpp @@ -239,7 +239,7 @@ void taitopjc_state::video_start() m_gfxdecode->set_gfx(0, std::make_unique<gfx_element>(*m_palette, char_layout, (uint8_t*)m_screen_ram.get(), 0, m_palette->entries() / 256, 0)); - machine().add_notifier(MACHINE_NOTIFY_EXIT, machine_notify_delegate(FUNC(taitopjc_state::video_exit), this)); + machine().add_notifier(MACHINE_NOTIFY_EXIT, machine_notify_delegate(&taitopjc_state::video_exit, this)); } uint32_t taitopjc_state::screen_update_taitopjc(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) diff --git a/src/mame/drivers/taitosj.cpp b/src/mame/drivers/taitosj.cpp index 75c0f6117e3..eeff2ff23e6 100644 --- a/src/mame/drivers/taitosj.cpp +++ b/src/mame/drivers/taitosj.cpp @@ -2788,7 +2788,7 @@ void taitosj_state::init_common() save_item(NAME(m_input_port_4_f0)); save_item(NAME(m_kikstart_gears)); - machine().add_notifier(MACHINE_NOTIFY_RESET, machine_notify_delegate(FUNC(taitosj_state::reset_common), this)); + machine().add_notifier(MACHINE_NOTIFY_RESET, machine_notify_delegate(&taitosj_state::reset_common, this)); } DRIVER_INIT_MEMBER(taitosj_state,taitosj) diff --git a/src/mame/drivers/taitotz.cpp b/src/mame/drivers/taitotz.cpp index 61053858ade..1d6850148bd 100644 --- a/src/mame/drivers/taitotz.cpp +++ b/src/mame/drivers/taitotz.cpp @@ -768,7 +768,7 @@ void taitotz_state::video_start() /* create renderer */ m_renderer = std::make_unique<taitotz_renderer>(*this, width, height, m_screen_ram.get(), m_texture_ram.get()); - //machine().add_notifier(MACHINE_NOTIFY_EXIT, machine_notify_delegate(FUNC(taitotz_exit), &machine())); + //machine().add_notifier(MACHINE_NOTIFY_EXIT, machine_notify_delegate(&taitotz_exit, &machine())); } static const float dot3_tex_table[32] = @@ -1322,7 +1322,7 @@ void taitotz_renderer::render_tnl_object(uint32_t address, float scale, uint8_t for (int i=2; i < num_verts; i++) { - render_triangle(m_cliprect, render_delegate(FUNC(taitotz_renderer::draw_scanline), this), 6, v[0], v[i-1], v[i]); + render_triangle(m_cliprect, render_delegate(&taitotz_renderer::draw_scanline, this), 6, v[0], v[i-1], v[i]); } } while (!end); @@ -1412,7 +1412,7 @@ void taitotz_renderer::push_direct_poly_fifo(uint32_t data) for (int i=2; i < num_verts; i++) { - render_triangle(m_cliprect, render_delegate(FUNC(taitotz_renderer::draw_scanline_noz), this), 3, v[0], v[i-1], v[i]); + render_triangle(m_cliprect, render_delegate(&taitotz_renderer::draw_scanline_noz, this), 3, v[0], v[i-1], v[i]); } m_direct_fifo_ptr = 0; diff --git a/src/mame/drivers/twinkle.cpp b/src/mame/drivers/twinkle.cpp index 01c4286d446..051608c3d04 100644 --- a/src/mame/drivers/twinkle.cpp +++ b/src/mame/drivers/twinkle.cpp @@ -939,8 +939,8 @@ static MACHINE_CONFIG_START( twinkle, twinkle_state ) MCFG_RAM_MODIFY("maincpu:ram") MCFG_RAM_DEFAULT_SIZE("4M") - MCFG_PSX_DMA_CHANNEL_READ( "maincpu", 5, psx_dma_read_delegate( FUNC( scsi_dma_read ), (twinkle_state *) owner ) ) - MCFG_PSX_DMA_CHANNEL_WRITE( "maincpu", 5, psx_dma_write_delegate( FUNC( scsi_dma_write ), (twinkle_state *) owner ) ) + MCFG_PSX_DMA_CHANNEL_READ( "maincpu", 5, psx_dma_read_delegate(&scsi_dma_read, (twinkle_state *) owner ) ) + MCFG_PSX_DMA_CHANNEL_WRITE( "maincpu", 5, psx_dma_write_delegate(&scsi_dma_write, (twinkle_state *) owner ) ) MCFG_CPU_ADD("audiocpu", M68000, 32000000/2) /* 16.000 MHz */ MCFG_CPU_PROGRAM_MAP( sound_map ) diff --git a/src/mame/drivers/tx0.cpp b/src/mame/drivers/tx0.cpp index c1e075a7623..13a7844c1d7 100644 --- a/src/mame/drivers/tx0.cpp +++ b/src/mame/drivers/tx0.cpp @@ -344,7 +344,7 @@ void tx0_state::machine_start() m_typewriter.prt_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(tx0_state::prt_callback),this)); m_dis_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(tx0_state::dis_callback),this)); - machine().add_notifier(MACHINE_NOTIFY_EXIT, machine_notify_delegate(FUNC(tx0_state::tx0_machine_stop),this)); + machine().add_notifier(MACHINE_NOTIFY_EXIT, machine_notify_delegate(&tx0_state::tx0_machine_stop,this)); } diff --git a/src/mame/drivers/vcs80.cpp b/src/mame/drivers/vcs80.cpp index bbca57adb3f..e7bc50855ca 100644 --- a/src/mame/drivers/vcs80.cpp +++ b/src/mame/drivers/vcs80.cpp @@ -247,8 +247,8 @@ DIRECT_UPDATE_MEMBER(vcs80_state::vcs80_direct_update_handler) DRIVER_INIT_MEMBER(vcs80_state,vcs80) { - m_maincpu->space(AS_PROGRAM).set_direct_update_handler(direct_update_delegate(FUNC(vcs80_state::vcs80_direct_update_handler), this)); - m_maincpu->space(AS_IO).set_direct_update_handler(direct_update_delegate(FUNC(vcs80_state::vcs80_direct_update_handler), this)); + m_maincpu->space(AS_PROGRAM).set_direct_update_handler(direct_update_delegate(&vcs80_state::vcs80_direct_update_handler, this)); + m_maincpu->space(AS_IO).set_direct_update_handler(direct_update_delegate(&vcs80_state::vcs80_direct_update_handler, this)); } /* System Drivers */ diff --git a/src/mame/drivers/wangpc.cpp b/src/mame/drivers/wangpc.cpp index dac18d5e700..c6e70b61ac4 100644 --- a/src/mame/drivers/wangpc.cpp +++ b/src/mame/drivers/wangpc.cpp @@ -1178,10 +1178,10 @@ WRITE_LINE_MEMBER( wangpc_state::bus_irq2_w ) void wangpc_state::machine_start() { // connect floppy callbacks - m_floppy0->setup_load_cb(floppy_image_device::load_cb(FUNC(wangpc_state::on_disk0_load), this)); - m_floppy0->setup_unload_cb(floppy_image_device::unload_cb(FUNC(wangpc_state::on_disk0_unload), this)); - m_floppy1->setup_load_cb(floppy_image_device::load_cb(FUNC(wangpc_state::on_disk1_load), this)); - m_floppy1->setup_unload_cb(floppy_image_device::unload_cb(FUNC(wangpc_state::on_disk1_unload), this)); + m_floppy0->setup_load_cb(floppy_image_device::load_cb(&wangpc_state::on_disk0_load, this)); + m_floppy0->setup_unload_cb(floppy_image_device::unload_cb(&wangpc_state::on_disk0_unload, this)); + m_floppy1->setup_load_cb(floppy_image_device::load_cb(&wangpc_state::on_disk1_load, this)); + m_floppy1->setup_unload_cb(floppy_image_device::unload_cb(&wangpc_state::on_disk1_unload, this)); // state saving save_item(NAME(m_dma_page)); diff --git a/src/mame/drivers/wpc_95.cpp b/src/mame/drivers/wpc_95.cpp index ed1014c5658..6bc85f01c6d 100644 --- a/src/mame/drivers/wpc_95.cpp +++ b/src/mame/drivers/wpc_95.cpp @@ -376,7 +376,7 @@ DRIVER_INIT_MEMBER(wpc_95_state, afm) pic->set_serial("541 123456 12345 123"); lamp->set_names(lamps_afm); out->set_names(outputs_afm); - out->set_handler(wpc_out_device::handler_t(FUNC(wpc_95_state::afm_led_handler), this)); + out->set_handler(wpc_out_device::handler_t(&wpc_95_state::afm_led_handler, this)); init(); } @@ -449,7 +449,7 @@ DRIVER_INIT_MEMBER(wpc_95_state, sc) pic->set_serial("903 123456 12345 123"); lamp->set_names(lamps_sc); out->set_names(outputs_sc); - out->set_handler(wpc_out_device::handler_t(FUNC(wpc_95_state::sc_aux_lamps_handler), this)); + out->set_handler(wpc_out_device::handler_t(&wpc_95_state::sc_aux_lamps_handler, this)); init(); } diff --git a/src/mame/drivers/x68k.cpp b/src/mame/drivers/x68k.cpp index 7bd67852e8e..d6c74f5640b 100644 --- a/src/mame/drivers/x68k.cpp +++ b/src/mame/drivers/x68k.cpp @@ -1563,8 +1563,8 @@ MACHINE_START_MEMBER(x68k_state,x68000) floppy_image_device *floppy = m_upd72065->subdevice<floppy_connector>(devname)->get_device(); m_fdc.floppy[drive] = floppy; if(floppy) { - floppy->setup_load_cb(floppy_image_device::load_cb(FUNC(x68k_state::floppy_load), this)); - floppy->setup_unload_cb(floppy_image_device::unload_cb(FUNC(x68k_state::floppy_unload), this)); + floppy->setup_load_cb(floppy_image_device::load_cb(&x68k_state::floppy_load, this)); + floppy->setup_unload_cb(floppy_image_device::unload_cb(&x68k_state::floppy_unload, this)); } } m_fdc.motor = 0; diff --git a/src/mame/drivers/zn.cpp b/src/mame/drivers/zn.cpp index 816ee52fcee..5ebbf5253c4 100644 --- a/src/mame/drivers/zn.cpp +++ b/src/mame/drivers/zn.cpp @@ -1330,8 +1330,8 @@ static MACHINE_CONFIG_DERIVED( coh1000w, zn1_2mb_vram ) MCFG_VT83C461_ADD("ide", ata_devices, "hdd", nullptr, true) MCFG_ATA_INTERFACE_IRQ_HANDLER(DEVWRITELINE("maincpu:irq", psxirq_device, intin10)) - MCFG_PSX_DMA_CHANNEL_READ( "maincpu", 5, psx_dma_read_delegate( FUNC( zn_state::atpsx_dma_read ), (zn_state *) owner ) ) - MCFG_PSX_DMA_CHANNEL_WRITE( "maincpu", 5, psx_dma_write_delegate( FUNC( zn_state::atpsx_dma_write ), (zn_state *) owner ) ) + MCFG_PSX_DMA_CHANNEL_READ( "maincpu", 5, psx_dma_read_delegate(&zn_state::atpsx_dma_read, (zn_state *) owner ) ) + MCFG_PSX_DMA_CHANNEL_WRITE( "maincpu", 5, psx_dma_write_delegate(&zn_state::atpsx_dma_write, (zn_state *) owner ) ) MACHINE_CONFIG_END /* @@ -1983,7 +1983,7 @@ static MACHINE_CONFIG_DERIVED( jdredd, coh1000a ) MCFG_CPU_PROGRAM_MAP(jdredd_map) MCFG_DEVICE_MODIFY("gpu") - MCFG_PSXGPU_VBLANK_CALLBACK(vblank_state_delegate( FUNC( zn_state::jdredd_vblank ), (zn_state *) owner)) + MCFG_PSXGPU_VBLANK_CALLBACK(vblank_state_delegate(&zn_state::jdredd_vblank, (zn_state *) owner)) MCFG_ATA_INTERFACE_ADD("ata", ata_devices, "hdd", nullptr, true) MCFG_ATA_INTERFACE_IRQ_HANDLER(DEVWRITELINE("maincpu:irq", psxirq_device, intin10)) diff --git a/src/mame/machine/archimds.cpp b/src/mame/machine/archimds.cpp index 55b12034d4f..48457abeb56 100644 --- a/src/mame/machine/archimds.cpp +++ b/src/mame/machine/archimds.cpp @@ -432,7 +432,7 @@ void archimedes_state::archimedes_driver_init() { m_archimedes_memc_physmem = reinterpret_cast<uint32_t *>(memshare("physicalram")->ptr()); // address_space &space = m_maincpu->space(AS_PROGRAM); -// space.set_direct_update_handler(direct_update_delegate(FUNC(a310_setopbase), &machine)); +// space.set_direct_update_handler(direct_update_delegate(&a310_setopbase, &machine)); } static const char *const ioc_regnames[] = diff --git a/src/mame/machine/at.cpp b/src/mame/machine/at.cpp index 43239c8095e..21f0ac46cc6 100644 --- a/src/mame/machine/at.cpp +++ b/src/mame/machine/at.cpp @@ -41,7 +41,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(FUNC(at_mb_device::a20_286), this)); + i80286_cpu_device::static_set_a20_callback(*m_maincpu, i80286_cpu_device::a20_cb(&at_mb_device::a20_286, this)); } MACHINE_CONFIG_FRAGMENT( at_softlists ) diff --git a/src/mame/machine/bbc.cpp b/src/mame/machine/bbc.cpp index ef099311db6..7f8582dc0f1 100644 --- a/src/mame/machine/bbc.cpp +++ b/src/mame/machine/bbc.cpp @@ -1788,7 +1788,7 @@ MACHINE_START_MEMBER(bbc_state, bbcbp) m_machinetype = BPLUS; m_mc6850_clock = 0; - m_maincpu->space(AS_PROGRAM).set_direct_update_handler(direct_update_delegate(FUNC(bbc_state::bbcbp_direct_handler), this)); + m_maincpu->space(AS_PROGRAM).set_direct_update_handler(direct_update_delegate(&bbc_state::bbcbp_direct_handler, this)); bbc_setup_banks(m_bank4, 16, 0, 0x3000); m_bank4->configure_entries(16, 1, m_region_maincpu->base() + 0x8000, 0x3000); // additional bank for paged ram @@ -1816,7 +1816,7 @@ MACHINE_START_MEMBER(bbc_state, bbcm) m_machinetype = MASTER; m_mc6850_clock = 0; - m_maincpu->space(AS_PROGRAM).set_direct_update_handler(direct_update_delegate(FUNC(bbc_state::bbcm_direct_handler), this)); + m_maincpu->space(AS_PROGRAM).set_direct_update_handler(direct_update_delegate(&bbc_state::bbcm_direct_handler, this)); bbcm_setup_banks(m_bank4, 16, 0, 0x1000); m_bank4->configure_entries(16, 1, m_region_maincpu->base() + 0x8000, 0x1000); // additional bank for paged ram diff --git a/src/mame/machine/coco.cpp b/src/mame/machine/coco.cpp index 4945982c61b..4c89a8a8594 100644 --- a/src/mame/machine/coco.cpp +++ b/src/mame/machine/coco.cpp @@ -138,7 +138,7 @@ void coco_state::device_start() m_diecom_lightgun_timer = timer_alloc(TIMER_DIECOM_LIGHTGUN); /* cart base update */ - m_cococart->set_cart_base_update(cococart_base_update_delegate(FUNC(coco_state::update_cart_base), this)); + m_cococart->set_cart_base_update(cococart_base_update_delegate(&coco_state::update_cart_base, this)); /* save state support */ save_item(NAME(m_dac_output)); diff --git a/src/mame/machine/dc.cpp b/src/mame/machine/dc.cpp index d35ec8612cb..0541938f582 100644 --- a/src/mame/machine/dc.cpp +++ b/src/mame/machine/dc.cpp @@ -649,7 +649,7 @@ void dc_state::machine_start() { // dccons doesn't have a specific g1 device yet if(m_naomig1) - m_naomig1->set_dma_cb(naomi_g1_device::dma_cb(FUNC(dc_state::generic_dma), this)); + m_naomig1->set_dma_cb(naomi_g1_device::dma_cb(&dc_state::generic_dma, this)); // save states save_pointer(NAME(dc_sysctrl_regs), 0x200/4); diff --git a/src/mame/machine/fd1094.cpp b/src/mame/machine/fd1094.cpp index 93cfe1d9a99..bdf0a430e5b 100644 --- a/src/mame/machine/fd1094.cpp +++ b/src/mame/machine/fd1094.cpp @@ -581,7 +581,7 @@ fd1094_device::fd1094_device(const machine_config &mconfig, const char *tag, dev if ((opcode & 0xff80) == 0x4e80 || (opcode & 0xf0f8) == 0x50c8 || (opcode & 0xf000) == 0x6000) m_masked_opcodes_lookup[1][opcode >> 4] |= 1 << ((opcode >> 1) & 7); - m_state_change = state_change_delegate(FUNC(fd1094_device::default_state_change), this); + m_state_change = state_change_delegate(&fd1094_device::default_state_change, this); } diff --git a/src/mame/machine/mm1kb.cpp b/src/mame/machine/mm1kb.cpp index 3eefba9bf7d..157c1558e15 100644 --- a/src/mame/machine/mm1kb.cpp +++ b/src/mame/machine/mm1kb.cpp @@ -237,7 +237,7 @@ void mm1_keyboard_t::device_start() m_scan_timer->adjust(attotime::from_hz(clock()), 0, attotime::from_hz(clock())); // add notification request for system shut down (to play back the power switch sound once more) - machine().add_notifier(MACHINE_NOTIFY_EXIT, machine_notify_delegate(FUNC(mm1_keyboard_t::shut_down_mm1), this)); + machine().add_notifier(MACHINE_NOTIFY_EXIT, machine_notify_delegate(&mm1_keyboard_t::shut_down_mm1, this)); // state saving save_item(NAME(m_sense)); diff --git a/src/mame/machine/n64.cpp b/src/mame/machine/n64.cpp index bf0ec04fb22..8171ab3e311 100644 --- a/src/mame/machine/n64.cpp +++ b/src/mame/machine/n64.cpp @@ -2740,7 +2740,7 @@ void n64_state::machine_start() rsp->rsp_add_imem(m_rsp_imem); /* add a hook for battery save */ - machine().add_notifier(MACHINE_NOTIFY_EXIT, machine_notify_delegate(FUNC(n64_state::n64_machine_stop),this)); + machine().add_notifier(MACHINE_NOTIFY_EXIT, machine_notify_delegate(&n64_state::n64_machine_stop,this)); } void n64_state::machine_reset() diff --git a/src/mame/machine/namcoic.cpp b/src/mame/machine/namcoic.cpp index 2fc579d8a0d..663e918902c 100644 --- a/src/mame/machine/namcoic.cpp +++ b/src/mame/machine/namcoic.cpp @@ -818,7 +818,7 @@ void namcos2_shared_state::c355_obj_init(int gfxbank, int pal_xor, c355_obj_code if (!code2tile.isnull()) m_c355_obj_code2tile = code2tile; else - m_c355_obj_code2tile = c355_obj_code2tile_delegate(FUNC(namcos2_shared_state::c355_obj_default_code2tile), this); + m_c355_obj_code2tile = c355_obj_code2tile_delegate(&namcos2_shared_state::c355_obj_default_code2tile, this); memset(m_c355_obj_ram, 0, sizeof(m_c355_obj_ram)); // needed for Nebulas Ray memset(m_c355_obj_position, 0, sizeof(m_c355_obj_position)); diff --git a/src/mame/machine/segaic16.cpp b/src/mame/machine/segaic16.cpp index fac72484c8a..11ec0dddc8c 100644 --- a/src/mame/machine/segaic16.cpp +++ b/src/mame/machine/segaic16.cpp @@ -538,7 +538,7 @@ void sega_315_5195_mapper_device::device_start() fd1094_device *fd1094 = dynamic_cast<fd1094_device *>(m_cpu.target()); if (fd1094 != nullptr) { - fd1094->notify_state_change(fd1094_device::state_change_delegate(FUNC(sega_315_5195_mapper_device::fd1094_state_change), this)); + fd1094->notify_state_change(fd1094_device::state_change_delegate(&sega_315_5195_mapper_device::fd1094_state_change, this)); for (auto & elem : m_banks) elem.set_decrypt(fd1094); } diff --git a/src/mame/machine/tecmosys.cpp b/src/mame/machine/tecmosys.cpp index 2b0553546b6..e119070d7d6 100644 --- a/src/mame/machine/tecmosys.cpp +++ b/src/mame/machine/tecmosys.cpp @@ -121,7 +121,7 @@ void tecmosys_state::prot_init(int which) case 2: m_device_data = &tkdensha_data; break; } - machine().add_notifier(MACHINE_NOTIFY_RESET, machine_notify_delegate(FUNC(tecmosys_state::prot_reset),this)); + machine().add_notifier(MACHINE_NOTIFY_RESET, machine_notify_delegate(&tecmosys_state::prot_reset,this)); } READ16_MEMBER(tecmosys_state::prot_status_r) diff --git a/src/mame/machine/ti85.cpp b/src/mame/machine/ti85.cpp index 3832b4b7395..654244bc102 100644 --- a/src/mame/machine/ti85.cpp +++ b/src/mame/machine/ti85.cpp @@ -311,7 +311,7 @@ MACHINE_START_MEMBER(ti85_state,ti83p) m_model = TI83P; //address_space &space = m_maincpu->space(AS_PROGRAM); //m_bios = memregion("flash")->base(); - m_maincpu->space(AS_PROGRAM).set_direct_update_handler(direct_update_delegate(FUNC(ti85_state::ti83p_direct_update_handler), this)); + m_maincpu->space(AS_PROGRAM).set_direct_update_handler(direct_update_delegate(&ti85_state::ti83p_direct_update_handler, this)); m_timer_interrupt_mask = 0; m_timer_interrupt_status = 0; @@ -375,7 +375,7 @@ void ti85_state::ti8xpse_init_common() m_flash_unlocked = 0; ti85_state::update_ti83pse_memory(); - m_maincpu->space(AS_PROGRAM).set_direct_update_handler(direct_update_delegate(FUNC(ti85_state::ti83p_direct_update_handler), this)); + m_maincpu->space(AS_PROGRAM).set_direct_update_handler(direct_update_delegate(&ti85_state::ti83p_direct_update_handler, this)); machine().scheduler().timer_pulse(attotime::from_hz(256), timer_expired_delegate(FUNC(ti85_state::ti83_timer1_callback),this)); diff --git a/src/mame/machine/victor9k_fdc.cpp b/src/mame/machine/victor9k_fdc.cpp index fcc1b262d1e..d0bd89baf2d 100644 --- a/src/mame/machine/victor9k_fdc.cpp +++ b/src/mame/machine/victor9k_fdc.cpp @@ -339,14 +339,14 @@ void victor_9000_fdc_t::device_reset() // set floppy callbacks if (m_floppy0->get_device()) { - m_floppy0->get_device()->setup_load_cb(floppy_image_device::load_cb(FUNC(victor_9000_fdc_t::load0_cb), this)); - m_floppy0->get_device()->setup_unload_cb(floppy_image_device::unload_cb(FUNC(victor_9000_fdc_t::unload0_cb), this)); + m_floppy0->get_device()->setup_load_cb(floppy_image_device::load_cb(&victor_9000_fdc_t::load0_cb, this)); + m_floppy0->get_device()->setup_unload_cb(floppy_image_device::unload_cb(&victor_9000_fdc_t::unload0_cb, this)); } if (m_floppy1->get_device()) { - m_floppy1->get_device()->setup_load_cb(floppy_image_device::load_cb(FUNC(victor_9000_fdc_t::load1_cb), this)); - m_floppy1->get_device()->setup_unload_cb(floppy_image_device::unload_cb(FUNC(victor_9000_fdc_t::unload1_cb), this)); + m_floppy1->get_device()->setup_load_cb(floppy_image_device::load_cb(&victor_9000_fdc_t::load1_cb, this)); + m_floppy1->get_device()->setup_unload_cb(floppy_image_device::unload_cb(&victor_9000_fdc_t::unload1_cb, this)); } } diff --git a/src/mame/machine/z80ne.cpp b/src/mame/machine/z80ne.cpp index b77d7a2f986..571dae53262 100644 --- a/src/mame/machine/z80ne.cpp +++ b/src/mame/machine/z80ne.cpp @@ -167,7 +167,7 @@ DIRECT_UPDATE_MEMBER(z80ne_state::z80ne_nmi_delay_count) if (!m_nmi_delay_counter) { - m_maincpu->space(AS_PROGRAM).set_direct_update_handler(direct_update_delegate(FUNC(z80ne_state::z80ne_default), this)); + m_maincpu->space(AS_PROGRAM).set_direct_update_handler(direct_update_delegate(&z80ne_state::z80ne_default, this)); m_maincpu->set_input_line(INPUT_LINE_NMI, PULSE_LINE); } return address; @@ -190,7 +190,7 @@ DIRECT_UPDATE_MEMBER(z80ne_state::z80ne_reset_delay_count) if (!m_reset_delay_counter) { /* remove this callback */ - m_maincpu->space(AS_PROGRAM).set_direct_update_handler(direct_update_delegate(FUNC(z80ne_state::z80ne_default), this)); + m_maincpu->space(AS_PROGRAM).set_direct_update_handler(direct_update_delegate(&z80ne_state::z80ne_default, this)); /* and switch to RAM bank at address 0x0000 */ m_bank1->set_entry( 0 ); /* RAM at 0x0000 (bank 1) */ } @@ -211,7 +211,7 @@ void z80ne_state::reset_lx382_banking() /* after the first 3 bytes have been read from ROM, switch the RAM back in */ m_reset_delay_counter = 2; - m_maincpu->space(AS_PROGRAM).set_direct_update_handler(direct_update_delegate(FUNC(z80ne_state::z80ne_reset_delay_count), this)); + m_maincpu->space(AS_PROGRAM).set_direct_update_handler(direct_update_delegate(&z80ne_state::z80ne_reset_delay_count, this)); } void z80ne_state::reset_lx390_banking() @@ -228,7 +228,7 @@ void z80ne_state::reset_lx390_banking() m_bank4->set_entry(0); /* RAM at 0xF000 */ /* after the first 3 bytes have been read from ROM, switch the RAM back in */ m_reset_delay_counter = 2; - m_maincpu->space(AS_PROGRAM).set_direct_update_handler(direct_update_delegate(FUNC(z80ne_state::z80ne_reset_delay_count), this)); + m_maincpu->space(AS_PROGRAM).set_direct_update_handler(direct_update_delegate(&z80ne_state::z80ne_reset_delay_count, this)); break; case 0x02: /* EP548 16k BASIC */ if (VERBOSE) @@ -237,7 +237,7 @@ void z80ne_state::reset_lx390_banking() m_bank2->set_entry(1); /* ep548 at 0x0400-0x3FFF */ m_bank3->set_entry(0); /* RAM at 0x8000 */ m_bank4->set_entry(0); /* RAM at 0xF000 */ - m_maincpu->space(AS_PROGRAM).set_direct_update_handler(direct_update_delegate(FUNC(z80ne_state::z80ne_default), this)); + m_maincpu->space(AS_PROGRAM).set_direct_update_handler(direct_update_delegate(&z80ne_state::z80ne_default, this)); break; case 0x03: /* EP390 Boot Loader for 5.5k floppy BASIC */ if (VERBOSE) @@ -246,7 +246,7 @@ void z80ne_state::reset_lx390_banking() m_bank2->set_entry(0); /* RAM at 0x0400-0x3FFF */ m_bank3->set_entry(0); /* RAM at 0x8000 */ m_bank4->set_entry(1); /* ep390 at 0xF000 */ - m_maincpu->space(AS_PROGRAM).set_direct_update_handler(direct_update_delegate(FUNC(z80ne_state::z80ne_default), this)); + m_maincpu->space(AS_PROGRAM).set_direct_update_handler(direct_update_delegate(&z80ne_state::z80ne_default, this)); break; case 0x04: /* EP1390 Boot Loader for NE DOS 1.0/1.5 */ if (VERBOSE) @@ -255,7 +255,7 @@ void z80ne_state::reset_lx390_banking() m_bank2->set_entry(0); /* RAM at 0x0400-0x3FFF */ m_bank3->set_entry(0); /* RAM at 0x8000 */ m_bank4->set_entry(2); /* ep1390 at 0xF000 */ - m_maincpu->space(AS_PROGRAM).set_direct_update_handler(direct_update_delegate(FUNC(z80ne_state::z80ne_default), this)); + m_maincpu->space(AS_PROGRAM).set_direct_update_handler(direct_update_delegate(&z80ne_state::z80ne_default, this)); break; case 0x05: /* EP2390 Boot Loader for NE DOS G.1 */ if (VERBOSE) @@ -264,7 +264,7 @@ void z80ne_state::reset_lx390_banking() m_bank2->set_entry(0); /* RAM at 0x0400-0x3FFF */ m_bank3->set_entry(0); /* RAM at 0x8000 */ m_bank4->set_entry(3); /* ep2390 at 0xF000 */ - m_maincpu->space(AS_PROGRAM).set_direct_update_handler(direct_update_delegate(FUNC(z80ne_state::z80ne_default), this)); + m_maincpu->space(AS_PROGRAM).set_direct_update_handler(direct_update_delegate(&z80ne_state::z80ne_default, this)); break; } @@ -467,7 +467,7 @@ WRITE8_MEMBER(z80ne_state::lx383_w) { /* after writing to port 0xF8 and the first ~M1 cycles strike a NMI for single step execution */ m_nmi_delay_counter = 1; - m_maincpu->space(AS_PROGRAM).set_direct_update_handler(direct_update_delegate(FUNC(z80ne_state::z80ne_nmi_delay_count), this)); + m_maincpu->space(AS_PROGRAM).set_direct_update_handler(direct_update_delegate(&z80ne_state::z80ne_nmi_delay_count, this)); } } diff --git a/src/mame/video/apollo.cpp b/src/mame/video/apollo.cpp index 9b3f14a4d17..0de39c5d5a9 100644 --- a/src/mame/video/apollo.cpp +++ b/src/mame/video/apollo.cpp @@ -1698,7 +1698,7 @@ void apollo_graphics_15i::register_vblank_callback() /* register for VBLANK callbacks */ screen_device *screen = (screen_device *)machine().device(VIDEO_SCREEN_TAG); - screen->register_vblank_callback(vblank_state_delegate(FUNC(apollo_graphics_15i::vblank_state_changed),this)); + screen->register_vblank_callback(vblank_state_delegate(&apollo_graphics_15i::vblank_state_changed,this)); } diff --git a/src/mame/video/atarirle.cpp b/src/mame/video/atarirle.cpp index 9891ebaf944..6c328eca057 100644 --- a/src/mame/video/atarirle.cpp +++ b/src/mame/video/atarirle.cpp @@ -196,7 +196,7 @@ void atari_rle_objects_device::device_start() m_ram.set(*share, 2); // register a VBLANK callback - m_screen->register_vblank_callback(vblank_state_delegate(FUNC(atari_rle_objects_device::vblank_callback), this)); + m_screen->register_vblank_callback(vblank_state_delegate(&atari_rle_objects_device::vblank_callback, this)); // build and allocate the generic tables build_rle_tables(); diff --git a/src/mame/video/chihiro.cpp b/src/mame/video/chihiro.cpp index 33ab36bece0..1028d4e615f 100644 --- a/src/mame/video/chihiro.cpp +++ b/src/mame/video/chihiro.cpp @@ -2900,13 +2900,13 @@ int nv2a_renderer::geforce_exec_method(address_space & space, uint32_t chanel, u primitive_type = (NV2A_BEGIN_END)data; if (data != 0) { if (((channel[chanel][subchannel].object.method[0x1e60 / 4] & 7) > 0) && (combiner.used != 0)) { - render_spans_callback = render_delegate(FUNC(nv2a_renderer::render_register_combiners), this); + render_spans_callback = render_delegate(&nv2a_renderer::render_register_combiners, this); } else if (texture[0].enabled) { - render_spans_callback = render_delegate(FUNC(nv2a_renderer::render_texture_simple), this); + render_spans_callback = render_delegate(&nv2a_renderer::render_texture_simple, this); } else - render_spans_callback = render_delegate(FUNC(nv2a_renderer::render_color), this); + render_spans_callback = render_delegate(&nv2a_renderer::render_color, this); } countlen--; } diff --git a/src/mame/video/gaelco3d.cpp b/src/mame/video/gaelco3d.cpp index e8721eee36c..95644d1338a 100644 --- a/src/mame/video/gaelco3d.cpp +++ b/src/mame/video/gaelco3d.cpp @@ -185,15 +185,15 @@ void gaelco3d_renderer::render_poly(screen_device &screen, uint32_t *polydata) /* special case: no Z buffering and no perspective correction */ if (color != 0x7f00 && z0 < 0 && ooz_dx == 0 && ooz_dy == 0) - render_triangle_fan(visarea, render_delegate(FUNC(gaelco3d_renderer::render_noz_noperspective), this), 0, vertnum, &vert[0]); + render_triangle_fan(visarea, render_delegate(&gaelco3d_renderer::render_noz_noperspective, this), 0, vertnum, &vert[0]); /* general case: non-alpha blended */ else if (color != 0x7f00) - render_triangle_fan(visarea, render_delegate(FUNC(gaelco3d_renderer::render_normal), this), 0, vertnum, &vert[0]); + render_triangle_fan(visarea, render_delegate(&gaelco3d_renderer::render_normal, this), 0, vertnum, &vert[0]); /* color 0x7f seems to be hard-coded as a 50% alpha blend */ else - render_triangle_fan(visarea, render_delegate(FUNC(gaelco3d_renderer::render_alphablend), this), 0, vertnum, &vert[0]); + render_triangle_fan(visarea, render_delegate(&gaelco3d_renderer::render_alphablend, this), 0, vertnum, &vert[0]); m_polygons += vertnum - 2; } diff --git a/src/mame/video/galastrm.cpp b/src/mame/video/galastrm.cpp index ba2bcbe4d2a..d6bb17ce93c 100644 --- a/src/mame/video/galastrm.cpp +++ b/src/mame/video/galastrm.cpp @@ -408,7 +408,7 @@ void galastrm_renderer::tc0610_rotate_draw(bitmap_ind16 &srcbitmap, const rectan gs_poly_data& extra = object_data_alloc(); extra.texbase = &srcbitmap; - render_polygon<4>(clip, render_delegate(FUNC(galastrm_renderer::tc0610_draw_scanline), this), 2, vert); + render_polygon<4>(clip, render_delegate(&galastrm_renderer::tc0610_draw_scanline, this), 2, vert); wait(); } diff --git a/src/mame/video/hng64_3d.hxx b/src/mame/video/hng64_3d.hxx index 30ee1157d8d..7f96c7412ad 100644 --- a/src/mame/video/hng64_3d.hxx +++ b/src/mame/video/hng64_3d.hxx @@ -1302,6 +1302,6 @@ void hng64_poly_renderer::drawShaded(polygon *p) renderData = rOptions; const rectangle& visibleArea = m_state.m_screen->visible_area(); - render_triangle(visibleArea, render_delegate(FUNC(hng64_poly_renderer::render_scanline), this), 7, pVert[0], pVert[1], pVert[2]); + render_triangle(visibleArea, render_delegate(&hng64_poly_renderer::render_scanline, this), 7, pVert[0], pVert[1], pVert[2]); } } diff --git a/src/mame/video/k001005.cpp b/src/mame/video/k001005.cpp index 25db8f24c2c..837c88b94d1 100644 --- a/src/mame/video/k001005.cpp +++ b/src/mame/video/k001005.cpp @@ -151,11 +151,11 @@ void k001005_renderer::render_polygons() float fog_density = 1.5f; - render_delegate rd_scan_2d = render_delegate(FUNC(k001005_renderer::draw_scanline_2d), this); - render_delegate rd_scan_tex2d = render_delegate(FUNC(k001005_renderer::draw_scanline_2d_tex), this); - render_delegate rd_scan = render_delegate(FUNC(k001005_renderer::draw_scanline), this); - render_delegate rd_scan_tex = render_delegate(FUNC(k001005_renderer::draw_scanline_tex), this); - render_delegate rd_scan_gour_blend = render_delegate(FUNC(k001005_renderer::draw_scanline_gouraud_blend), this); + render_delegate rd_scan_2d = render_delegate(&k001005_renderer::draw_scanline_2d, this); + render_delegate rd_scan_tex2d = render_delegate(&k001005_renderer::draw_scanline_2d_tex, this); + render_delegate rd_scan = render_delegate(&k001005_renderer::draw_scanline, this); + render_delegate rd_scan_tex = render_delegate(&k001005_renderer::draw_scanline_tex, this); + render_delegate rd_scan_gour_blend = render_delegate(&k001005_renderer::draw_scanline_gouraud_blend, this); do { diff --git a/src/mame/video/k052109.cpp b/src/mame/video/k052109.cpp index e54d7c55757..a5aebd44abf 100644 --- a/src/mame/video/k052109.cpp +++ b/src/mame/video/k052109.cpp @@ -211,7 +211,7 @@ void k052109_device::device_start() throw device_missing_dependencies(); // and register a callback for vblank state - m_screen->register_vblank_callback(vblank_state_delegate(FUNC(k052109_device::vblank_callback), this)); + m_screen->register_vblank_callback(vblank_state_delegate(&k052109_device::vblank_callback, this)); } decode_gfx(); diff --git a/src/mame/video/midvunit.cpp b/src/mame/video/midvunit.cpp index 2fb9ef2031d..3c2fd31ffb9 100644 --- a/src/mame/video/midvunit.cpp +++ b/src/mame/video/midvunit.cpp @@ -320,7 +320,7 @@ void midvunit_renderer::process_dma_queue() /* handle flat-shaded quads here */ if (!textured) { - callback = render_delegate(FUNC(midvunit_renderer::render_flat), this); + callback = render_delegate(&midvunit_renderer::render_flat, this); pixdata += (m_state.m_dma_data[0] & 0x00ff); } /* handle textured quads here */ @@ -339,23 +339,23 @@ void midvunit_renderer::process_dma_queue() /* handle non-masked, non-transparent quads */ if ((m_state.m_dma_data[0] & 0xc00) == 0x000) { - callback = render_delegate(FUNC(midvunit_renderer::render_tex), this); + callback = render_delegate(&midvunit_renderer::render_tex, this); } /* handle non-masked, transparent quads */ else if ((m_state.m_dma_data[0] & 0xc00) == 0x800) { - callback = render_delegate(FUNC(midvunit_renderer::render_textrans), this); + callback = render_delegate(&midvunit_renderer::render_textrans, this); } /* handle masked, transparent quads */ else if ((m_state.m_dma_data[0] & 0xc00) == 0xc00) { - callback = render_delegate(FUNC(midvunit_renderer::render_textransmask), this); + callback = render_delegate(&midvunit_renderer::render_textransmask, this); pixdata += (m_state.m_dma_data[0] & 0x00ff); } /* handle masked, non-transparent quads (invalid?) */ else { - callback = render_delegate(FUNC(midvunit_renderer::render_flat), this); + callback = render_delegate(&midvunit_renderer::render_flat, this); pixdata += (m_state.m_dma_data[0] & 0x00ff); } } diff --git a/src/mame/video/midzeus.cpp b/src/mame/video/midzeus.cpp index ac2280cd234..2b3b3062cbe 100644 --- a/src/mame/video/midzeus.cpp +++ b/src/mame/video/midzeus.cpp @@ -292,7 +292,7 @@ VIDEO_START_MEMBER(midzeus_state,midzeus) poly = auto_alloc(machine(), midzeus_renderer(*this)); /* we need to cleanup on exit */ - machine().add_notifier(MACHINE_NOTIFY_EXIT, machine_notify_delegate(FUNC(midzeus_state::exit_handler), this)); + machine().add_notifier(MACHINE_NOTIFY_EXIT, machine_notify_delegate(&midzeus_state::exit_handler, this)); yoffs = 0; texel_width = 256; @@ -1269,14 +1269,14 @@ void midzeus_renderer::zeus_draw_quad(int long_fmt, const uint32_t *databuffer, // a poly_render_quad_fan. It appears as though the new code defaults to a fan if // the template argument is 4, but keep an eye out for missing quads. poly->render_polygon<4>(zeus_cliprect, - render_delegate(FUNC(midzeus_renderer::render_poly), this), + render_delegate(&midzeus_renderer::render_poly, this), 4, clipvert); } void midzeus_renderer::zeus_draw_debug_quad(const rectangle& rect, const vertex_t *vert) { - poly->render_polygon<4>(rect, render_delegate(FUNC(midzeus_renderer::render_poly_solid_fixedz), this), 0, vert); + poly->render_polygon<4>(rect, render_delegate(&midzeus_renderer::render_poly_solid_fixedz, this), 0, vert); } diff --git a/src/mame/video/midzeus2.cpp b/src/mame/video/midzeus2.cpp index ff7690a6bd6..ca0a3e7e95a 100644 --- a/src/mame/video/midzeus2.cpp +++ b/src/mame/video/midzeus2.cpp @@ -282,7 +282,7 @@ VIDEO_START_MEMBER(midzeus2_state,midzeus2) poly = auto_alloc(machine(), midzeus2_renderer(*this)); /* we need to cleanup on exit */ - machine().add_notifier(MACHINE_NOTIFY_EXIT, machine_notify_delegate(FUNC(midzeus2_state::exit_handler2), this)); + machine().add_notifier(MACHINE_NOTIFY_EXIT, machine_notify_delegate(&midzeus2_state::exit_handler2, this)); zbase = 2.0f; yoffs = 0; @@ -1277,11 +1277,11 @@ In memory: // tests, but the (numverts == 5) statement below may actually be a quad fan instead of a 5-sided // polygon. if (numverts == 3) - render_triangle(zeus_cliprect, render_delegate(FUNC(midzeus2_renderer::render_poly_8bit), this), 4, clipvert[0], clipvert[1], clipvert[2]); + render_triangle(zeus_cliprect, render_delegate(&midzeus2_renderer::render_poly_8bit, this), 4, clipvert[0], clipvert[1], clipvert[2]); else if (numverts == 4) - render_polygon<4>(zeus_cliprect, render_delegate(FUNC(midzeus2_renderer::render_poly_8bit), this), 4, clipvert); + render_polygon<4>(zeus_cliprect, render_delegate(&midzeus2_renderer::render_poly_8bit, this), 4, clipvert); else if (numverts == 5) - render_polygon<5>(zeus_cliprect, render_delegate(FUNC(midzeus2_renderer::render_poly_8bit), this), 4, clipvert); + render_polygon<5>(zeus_cliprect, render_delegate(&midzeus2_renderer::render_poly_8bit, this), 4, clipvert); } diff --git a/src/mame/video/model2.cpp b/src/mame/video/model2.cpp index b6ce47a42d2..a98f05199df 100644 --- a/src/mame/video/model2.cpp +++ b/src/mame/video/model2.cpp @@ -823,28 +823,28 @@ void model2_renderer::model2_3d_render(triangle *tri, const rectangle &cliprect) // I was unable to make it work when converting to the new polygon rasterizer interface. switch (renderer) { - case 0: render_triangle(vp, render_delegate(FUNC(model2_renderer::model2_3d_render_0), this), 3, tri->v[0], tri->v[1], tri->v[2]); break; - case 1: render_triangle(vp, render_delegate(FUNC(model2_renderer::model2_3d_render_1), this), 3, tri->v[0], tri->v[1], tri->v[2]); break; - case 2: render_triangle(vp, render_delegate(FUNC(model2_renderer::model2_3d_render_2), this), 3, tri->v[0], tri->v[1], tri->v[2]); break; - case 3: render_triangle(vp, render_delegate(FUNC(model2_renderer::model2_3d_render_3), this), 3, tri->v[0], tri->v[1], tri->v[2]); break; - case 4: render_triangle(vp, render_delegate(FUNC(model2_renderer::model2_3d_render_4), this), 3, tri->v[0], tri->v[1], tri->v[2]); break; - case 5: render_triangle(vp, render_delegate(FUNC(model2_renderer::model2_3d_render_5), this), 3, tri->v[0], tri->v[1], tri->v[2]); break; - case 6: render_triangle(vp, render_delegate(FUNC(model2_renderer::model2_3d_render_6), this), 3, tri->v[0], tri->v[1], tri->v[2]); break; - case 7: render_triangle(vp, render_delegate(FUNC(model2_renderer::model2_3d_render_7), this), 3, tri->v[0], tri->v[1], tri->v[2]); break; + case 0: render_triangle(vp, render_delegate(&model2_renderer::model2_3d_render_0, this), 3, tri->v[0], tri->v[1], tri->v[2]); break; + case 1: render_triangle(vp, render_delegate(&model2_renderer::model2_3d_render_1, this), 3, tri->v[0], tri->v[1], tri->v[2]); break; + case 2: render_triangle(vp, render_delegate(&model2_renderer::model2_3d_render_2, this), 3, tri->v[0], tri->v[1], tri->v[2]); break; + case 3: render_triangle(vp, render_delegate(&model2_renderer::model2_3d_render_3, this), 3, tri->v[0], tri->v[1], tri->v[2]); break; + case 4: render_triangle(vp, render_delegate(&model2_renderer::model2_3d_render_4, this), 3, tri->v[0], tri->v[1], tri->v[2]); break; + case 5: render_triangle(vp, render_delegate(&model2_renderer::model2_3d_render_5, this), 3, tri->v[0], tri->v[1], tri->v[2]); break; + case 6: render_triangle(vp, render_delegate(&model2_renderer::model2_3d_render_6, this), 3, tri->v[0], tri->v[1], tri->v[2]); break; + case 7: render_triangle(vp, render_delegate(&model2_renderer::model2_3d_render_7, this), 3, tri->v[0], tri->v[1], tri->v[2]); break; } } else { switch (renderer) { - case 0: render_triangle(vp, render_delegate(FUNC(model2_renderer::model2_3d_render_0), this), 0, tri->v[0], tri->v[1], tri->v[2]); break; - case 1: render_triangle(vp, render_delegate(FUNC(model2_renderer::model2_3d_render_1), this), 0, tri->v[0], tri->v[1], tri->v[2]); break; - case 2: render_triangle(vp, render_delegate(FUNC(model2_renderer::model2_3d_render_2), this), 0, tri->v[0], tri->v[1], tri->v[2]); break; - case 3: render_triangle(vp, render_delegate(FUNC(model2_renderer::model2_3d_render_3), this), 0, tri->v[0], tri->v[1], tri->v[2]); break; - case 4: render_triangle(vp, render_delegate(FUNC(model2_renderer::model2_3d_render_4), this), 0, tri->v[0], tri->v[1], tri->v[2]); break; - case 5: render_triangle(vp, render_delegate(FUNC(model2_renderer::model2_3d_render_5), this), 0, tri->v[0], tri->v[1], tri->v[2]); break; - case 6: render_triangle(vp, render_delegate(FUNC(model2_renderer::model2_3d_render_6), this), 0, tri->v[0], tri->v[1], tri->v[2]); break; - case 7: render_triangle(vp, render_delegate(FUNC(model2_renderer::model2_3d_render_7), this), 0, tri->v[0], tri->v[1], tri->v[2]); break; + case 0: render_triangle(vp, render_delegate(&model2_renderer::model2_3d_render_0, this), 0, tri->v[0], tri->v[1], tri->v[2]); break; + case 1: render_triangle(vp, render_delegate(&model2_renderer::model2_3d_render_1, this), 0, tri->v[0], tri->v[1], tri->v[2]); break; + case 2: render_triangle(vp, render_delegate(&model2_renderer::model2_3d_render_2, this), 0, tri->v[0], tri->v[1], tri->v[2]); break; + case 3: render_triangle(vp, render_delegate(&model2_renderer::model2_3d_render_3, this), 0, tri->v[0], tri->v[1], tri->v[2]); break; + case 4: render_triangle(vp, render_delegate(&model2_renderer::model2_3d_render_4, this), 0, tri->v[0], tri->v[1], tri->v[2]); break; + case 5: render_triangle(vp, render_delegate(&model2_renderer::model2_3d_render_5, this), 0, tri->v[0], tri->v[1], tri->v[2]); break; + case 6: render_triangle(vp, render_delegate(&model2_renderer::model2_3d_render_6, this), 0, tri->v[0], tri->v[1], tri->v[2]); break; + case 7: render_triangle(vp, render_delegate(&model2_renderer::model2_3d_render_7, this), 0, tri->v[0], tri->v[1], tri->v[2]); break; } } } diff --git a/src/mame/video/model3.cpp b/src/mame/video/model3.cpp index e8ec96fe7e6..259d2ebe53e 100644 --- a/src/mame/video/model3.cpp +++ b/src/mame/video/model3.cpp @@ -177,7 +177,7 @@ void model3_state::video_start() m_tri_buffer = auto_alloc_array_clear(machine(), m3_triangle, TRI_BUFFER_SIZE); m_tri_alpha_buffer = auto_alloc_array_clear(machine(), m3_triangle, TRI_ALPHA_BUFFER_SIZE); - machine().add_notifier(MACHINE_NOTIFY_EXIT, machine_notify_delegate(FUNC(model3_state::model3_exit), this)); + machine().add_notifier(MACHINE_NOTIFY_EXIT, machine_notify_delegate(&model3_state::model3_exit, this)); m_m3_char_ram = make_unique_clear<uint64_t[]>(0x100000/8); m_m3_tile_ram = make_unique_clear<uint64_t[]>(0x8000/8); @@ -2106,14 +2106,14 @@ void model3_renderer::draw_opaque_triangles(const m3_triangle* tris, int num_tri if (tri->param & TRI_PARAM_ALPHA_TEST) { - render_triangle(cliprect, render_delegate(FUNC(model3_renderer::draw_scanline_tex_contour), this), 5, v[0], v[1], v[2]); + render_triangle(cliprect, render_delegate(&model3_renderer::draw_scanline_tex_contour, this), 5, v[0], v[1], v[2]); } else { if (tri->param & TRI_PARAM_COLOR_MOD) - render_triangle(cliprect, render_delegate(FUNC(model3_renderer::draw_scanline_tex_colormod), this), 5, v[0], v[1], v[2]); + render_triangle(cliprect, render_delegate(&model3_renderer::draw_scanline_tex_colormod, this), 5, v[0], v[1], v[2]); else - render_triangle(cliprect, render_delegate(FUNC(model3_renderer::draw_scanline_tex), this), 5, v[0], v[1], v[2]); + render_triangle(cliprect, render_delegate(&model3_renderer::draw_scanline_tex, this), 5, v[0], v[1], v[2]); } } else @@ -2129,7 +2129,7 @@ void model3_renderer::draw_opaque_triangles(const m3_triangle* tris, int num_tri model3_polydata &extra = object_data_alloc(); extra.color = tri->color; - render_triangle(cliprect, render_delegate(FUNC(model3_renderer::draw_scanline_solid), this), 2, v[0], v[1], v[2]); + render_triangle(cliprect, render_delegate(&model3_renderer::draw_scanline_solid, this), 2, v[0], v[1], v[2]); } } } @@ -2168,7 +2168,7 @@ void model3_renderer::draw_alpha_triangles(const m3_triangle* tris, int num_tris extra.transparency = tri->transparency; extra.texture_param = tri->param; - render_triangle(cliprect, render_delegate(FUNC(model3_renderer::draw_scanline_tex_alpha), this), 5, v[0], v[1], v[2]); + render_triangle(cliprect, render_delegate(&model3_renderer::draw_scanline_tex_alpha, this), 5, v[0], v[1], v[2]); } else { @@ -2184,7 +2184,7 @@ void model3_renderer::draw_alpha_triangles(const m3_triangle* tris, int num_tris extra.color = tri->color; extra.transparency = tri->transparency; - render_triangle(cliprect, render_delegate(FUNC(model3_renderer::draw_scanline_solid_trans), this), 2, v[0], v[1], v[2]); + render_triangle(cliprect, render_delegate(&model3_renderer::draw_scanline_solid_trans, this), 2, v[0], v[1], v[2]); } } } diff --git a/src/mame/video/n64.cpp b/src/mame/video/n64.cpp index d24a9e68ecd..ac784a06431 100644 --- a/src/mame/video/n64.cpp +++ b/src/mame/video/n64.cpp @@ -3246,19 +3246,19 @@ void n64_rdp::render_spans(int32_t start, int32_t end, int32_t tilenum, bool fli switch(m_other_modes.cycle_type) { case CYCLE_TYPE_1: - render_triangle_custom(clip, render_delegate(FUNC(n64_rdp::span_draw_1cycle), this), start, (end - start) + 1, spans + offset); + render_triangle_custom(clip, render_delegate(&n64_rdp::span_draw_1cycle, this), start, (end - start) + 1, spans + offset); break; case CYCLE_TYPE_2: - render_triangle_custom(clip, render_delegate(FUNC(n64_rdp::span_draw_2cycle), this), start, (end - start) + 1, spans + offset); + render_triangle_custom(clip, render_delegate(&n64_rdp::span_draw_2cycle, this), start, (end - start) + 1, spans + offset); break; case CYCLE_TYPE_COPY: - render_triangle_custom(clip, render_delegate(FUNC(n64_rdp::span_draw_copy), this), start, (end - start) + 1, spans + offset); + render_triangle_custom(clip, render_delegate(&n64_rdp::span_draw_copy, this), start, (end - start) + 1, spans + offset); break; case CYCLE_TYPE_FILL: - render_triangle_custom(clip, render_delegate(FUNC(n64_rdp::span_draw_fill), this), start, (end - start) + 1, spans + offset); + render_triangle_custom(clip, render_delegate(&n64_rdp::span_draw_fill, this), start, (end - start) + 1, spans + offset); break; } wait("render spans"); diff --git a/src/mame/video/namcofl.cpp b/src/mame/video/namcofl.cpp index 3393c603851..4f9267c0a77 100644 --- a/src/mame/video/namcofl.cpp +++ b/src/mame/video/namcofl.cpp @@ -91,6 +91,6 @@ static int FLobjcode2tile( running_machine &machine, int code ) VIDEO_START_MEMBER(namcofl_state,namcofl) { namco_tilemap_init(NAMCOFL_TILEGFX, memregion(NAMCOFL_TILEMASKREGION)->base(), TilemapCB ); - c355_obj_init(NAMCOFL_SPRITEGFX,0x0,namcos2_shared_state::c355_obj_code2tile_delegate(FUNC(FLobjcode2tile), &machine())); + c355_obj_init(NAMCOFL_SPRITEGFX,0x0,namcos2_shared_state::c355_obj_code2tile_delegate(&FLobjcode2tile, &machine())); c169_roz_init(NAMCOFL_ROTGFX,NAMCOFL_ROTMASKREGION); } diff --git a/src/mame/video/namconb1.cpp b/src/mame/video/namconb1.cpp index f27f96f6d05..a51794ad84e 100644 --- a/src/mame/video/namconb1.cpp +++ b/src/mame/video/namconb1.cpp @@ -129,7 +129,7 @@ int namconb1_state::NB1objcode2tile( int code ) VIDEO_START_MEMBER(namconb1_state,namconb1) { namco_tilemap_init(NAMCONB1_TILEGFX, memregion(NAMCONB1_TILEMASKREGION)->base(), NB1TilemapCB ); - c355_obj_init(NAMCONB1_SPRITEGFX,0x0,namcos2_shared_state::c355_obj_code2tile_delegate(FUNC(namconb1_state::NB1objcode2tile), this)); + c355_obj_init(NAMCONB1_SPRITEGFX,0x0,namcos2_shared_state::c355_obj_code2tile_delegate(&namconb1_state::NB1objcode2tile, this)); save_item(NAME(m_tilemap_tile_bank)); } /* namconb1 */ @@ -187,7 +187,7 @@ int namconb1_state::NB2objcode2tile( int code ) VIDEO_START_MEMBER(namconb1_state,namconb2) { namco_tilemap_init(NAMCONB1_TILEGFX, memregion(NAMCONB1_TILEMASKREGION)->base(), NB2TilemapCB ); - c355_obj_init(NAMCONB1_SPRITEGFX,0x0,namcos2_shared_state::c355_obj_code2tile_delegate(FUNC(namconb1_state::NB2objcode2tile), this)); + c355_obj_init(NAMCONB1_SPRITEGFX,0x0,namcos2_shared_state::c355_obj_code2tile_delegate(&namconb1_state::NB2objcode2tile, this)); c169_roz_init(NAMCONB1_ROTGFX,NAMCONB1_ROTMASKREGION); save_item(NAME(m_tilemap_tile_bank)); diff --git a/src/mame/video/namcos22.cpp b/src/mame/video/namcos22.cpp index 3b3c3535197..19cabcc08bd 100644 --- a/src/mame/video/namcos22.cpp +++ b/src/mame/video/namcos22.cpp @@ -497,7 +497,7 @@ void namcos22_renderer::poly3d_drawquad(screen_device &screen, bitmap_rgb32 &bit } } - render_triangle_fan(m_cliprect, render_delegate(FUNC(namcos22_renderer::renderscanline_uvi_full), this), 4, clipverts, clipv); + render_triangle_fan(m_cliprect, render_delegate(&namcos22_renderer::renderscanline_uvi_full, this), 4, clipverts, clipv); } @@ -575,7 +575,7 @@ void namcos22_renderer::poly3d_drawsprite( extra.fogcolor.set(0, m_state.m_fog_r, m_state.m_fog_g, m_state.m_fog_b); } - render_triangle_fan(m_cliprect, render_delegate(FUNC(namcos22_renderer::renderscanline_sprite), this), 2, 4, vert); + render_triangle_fan(m_cliprect, render_delegate(&namcos22_renderer::renderscanline_sprite, this), 2, 4, vert); } } diff --git a/src/mame/video/tc0780fpa.cpp b/src/mame/video/tc0780fpa.cpp index 2f3c730cb72..e011d8640de 100644 --- a/src/mame/video/tc0780fpa.cpp +++ b/src/mame/video/tc0780fpa.cpp @@ -220,11 +220,11 @@ void tc0780fpa_renderer::render(uint16_t *polygon_fifo, int length) vert[1].p[1] == vert[2].p[1]) { // optimization: all colours the same -> render solid - render_triangle(m_cliprect, render_delegate(FUNC(tc0780fpa_renderer::render_solid_scan), this), 2, vert[0], vert[1], vert[2]); + render_triangle(m_cliprect, render_delegate(&tc0780fpa_renderer::render_solid_scan, this), 2, vert[0], vert[1], vert[2]); } else { - render_triangle(m_cliprect, render_delegate(FUNC(tc0780fpa_renderer::render_shade_scan), this), 2, vert[0], vert[1], vert[2]); + render_triangle(m_cliprect, render_delegate(&tc0780fpa_renderer::render_shade_scan, this), 2, vert[0], vert[1], vert[2]); } } break; @@ -275,7 +275,7 @@ void tc0780fpa_renderer::render(uint16_t *polygon_fifo, int length) if (vert[0].p[0] < 0x8000 && vert[1].p[0] < 0x8000 && vert[2].p[0] < 0x8000) { - render_triangle(m_cliprect, render_delegate(FUNC(tc0780fpa_renderer::render_texture_scan), this), 4, vert[0], vert[1], vert[2]); + render_triangle(m_cliprect, render_delegate(&tc0780fpa_renderer::render_texture_scan, this), 4, vert[0], vert[1], vert[2]); } break; } @@ -316,11 +316,11 @@ void tc0780fpa_renderer::render(uint16_t *polygon_fifo, int length) vert[2].p[1] == vert[3].p[1]) { // optimization: all colours the same -> render solid - render_polygon<4>(m_cliprect, render_delegate(FUNC(tc0780fpa_renderer::render_solid_scan), this), 2, vert); + render_polygon<4>(m_cliprect, render_delegate(&tc0780fpa_renderer::render_solid_scan, this), 2, vert); } else { - render_polygon<4>(m_cliprect, render_delegate(FUNC(tc0780fpa_renderer::render_shade_scan), this), 2, vert); + render_polygon<4>(m_cliprect, render_delegate(&tc0780fpa_renderer::render_shade_scan, this), 2, vert); } } break; @@ -377,7 +377,7 @@ void tc0780fpa_renderer::render(uint16_t *polygon_fifo, int length) if (vert[0].p[0] < 0x8000 && vert[1].p[0] < 0x8000 && vert[2].p[0] < 0x8000 && vert[3].p[0] < 0x8000) { - render_polygon<4>(m_cliprect, render_delegate(FUNC(tc0780fpa_renderer::render_texture_scan), this), 4, vert); + render_polygon<4>(m_cliprect, render_delegate(&tc0780fpa_renderer::render_texture_scan, this), 4, vert); } break; } diff --git a/src/osd/modules/debugger/debugqt.cpp b/src/osd/modules/debugger/debugqt.cpp index e9abe538981..7cdca830349 100644 --- a/src/osd/modules/debugger/debugqt.cpp +++ b/src/osd/modules/debugger/debugqt.cpp @@ -269,8 +269,8 @@ void debug_qt::init_debugger(running_machine &machine) m_machine = &machine; // Setup the configuration XML saving and loading machine.configuration().config_register("debugger", - config_saveload_delegate(FUNC(xml_configuration_load), &machine), - config_saveload_delegate(FUNC(xml_configuration_save), &machine)); + config_saveload_delegate(&xml_configuration_load, &machine), + config_saveload_delegate(&xml_configuration_save, &machine)); } diff --git a/src/osd/modules/lib/osdobj_common.cpp b/src/osd/modules/lib/osdobj_common.cpp index bbf8c88f19f..e9ab4f76060 100644 --- a/src/osd/modules/lib/osdobj_common.cpp +++ b/src/osd/modules/lib/osdobj_common.cpp @@ -435,7 +435,7 @@ void osd_common_t::init(running_machine &machine) set_verbose(true); // ensure we get called on the way out - machine.add_notifier(MACHINE_NOTIFY_EXIT, machine_notify_delegate(FUNC(osd_common_t::osd_exit), this)); + machine.add_notifier(MACHINE_NOTIFY_EXIT, machine_notify_delegate(&osd_common_t::osd_exit, this)); /* now setup watchdog */ @@ -669,8 +669,8 @@ void osd_common_t::init_subsystems() input_init(); // we need pause callbacks - machine().add_notifier(MACHINE_NOTIFY_PAUSE, machine_notify_delegate(FUNC(osd_common_t::input_pause), this)); - machine().add_notifier(MACHINE_NOTIFY_RESUME, machine_notify_delegate(FUNC(osd_common_t::input_resume), this)); + machine().add_notifier(MACHINE_NOTIFY_PAUSE, machine_notify_delegate(&osd_common_t::input_pause, this)); + machine().add_notifier(MACHINE_NOTIFY_RESUME, machine_notify_delegate(&osd_common_t::input_resume, this)); } bool osd_common_t::video_init() |