summaryrefslogtreecommitdiffstats
path: root/src/devices/bus
diff options
context:
space:
mode:
Diffstat (limited to 'src/devices/bus')
-rw-r--r--src/devices/bus/a1bus/a1bus.h4
-rw-r--r--src/devices/bus/a2bus/a2bus.h6
-rw-r--r--src/devices/bus/a2bus/a2eauxslot.h4
-rw-r--r--src/devices/bus/a2bus/a2mcms.cpp2
-rw-r--r--src/devices/bus/a2bus/pc_xporter.cpp4
-rw-r--r--src/devices/bus/a800/a8sio.h2
-rw-r--r--src/devices/bus/abcbus/abcbus.h20
-rw-r--r--src/devices/bus/abckb/abckb.h6
-rw-r--r--src/devices/bus/adam/exp.h2
-rw-r--r--src/devices/bus/amiga/keyboard/keyboard.h6
-rw-r--r--src/devices/bus/amiga/zorro/zorro.h22
-rw-r--r--src/devices/bus/apricot/expansion/expansion.h12
-rw-r--r--src/devices/bus/apricot/keyboard/keyboard.h2
-rw-r--r--src/devices/bus/bbc/1mhzbus/1mhzbus.h4
-rw-r--r--src/devices/bus/bbc/fdc/fdc.h4
-rw-r--r--src/devices/bus/bbc/joyport/joyport.h4
-rw-r--r--src/devices/bus/bbc/tube/tube.h2
-rw-r--r--src/devices/bus/bbc/tube/tube_80186.cpp30
-rw-r--r--src/devices/bus/bbc/tube/tube_casper.cpp35
-rw-r--r--src/devices/bus/bbc/userport/userport.h4
-rw-r--r--src/devices/bus/bml3/bml3bus.h6
-rw-r--r--src/devices/bus/c64/exp.h12
-rw-r--r--src/devices/bus/cbm2/user.h8
-rw-r--r--src/devices/bus/cbmiec/cbmiec.h10
-rw-r--r--src/devices/bus/cbus/pc9801_cbus.h14
-rw-r--r--src/devices/bus/centronics/ctronics.h43
-rw-r--r--src/devices/bus/cgenie/expansion/expansion.h6
-rw-r--r--src/devices/bus/coco/cococart.h18
-rw-r--r--src/devices/bus/coleco/ctrl.h2
-rw-r--r--src/devices/bus/comx35/exp.h2
-rw-r--r--src/devices/bus/cpc/cpcexp.h10
-rw-r--r--src/devices/bus/dmv/dmvbus.h10
-rw-r--r--src/devices/bus/ecbbus/ecbbus.h4
-rw-r--r--src/devices/bus/econet/econet.h4
-rw-r--r--src/devices/bus/einstein/pipe/pipe.h6
-rw-r--r--src/devices/bus/einstein/userport/userport.h2
-rw-r--r--src/devices/bus/electron/cart/slot.h4
-rw-r--r--src/devices/bus/electron/exp.h4
-rw-r--r--src/devices/bus/electron/m2105.cpp4
-rw-r--r--src/devices/bus/ep64/exp.h6
-rw-r--r--src/devices/bus/epson_sio/epson_sio.h4
-rw-r--r--src/devices/bus/gamegear/ggext.h4
-rw-r--r--src/devices/bus/hexbus/tp0370.h6
-rw-r--r--src/devices/bus/hp80_io/hp80_io.h4
-rw-r--r--src/devices/bus/hp9845_io/hp9845_io.h6
-rw-r--r--src/devices/bus/hp_dio/hp_dio.h8
-rw-r--r--src/devices/bus/hp_hil/hp_hil.h6
-rw-r--r--src/devices/bus/ieee488/c2040fdc.h6
-rw-r--r--src/devices/bus/ieee488/c8050.cpp187
-rw-r--r--src/devices/bus/ieee488/c8050fdc.h26
-rw-r--r--src/devices/bus/ieee488/hp9895.cpp25
-rw-r--r--src/devices/bus/ieee488/ieee488.h18
-rw-r--r--src/devices/bus/interpro/keyboard/keyboard.h2
-rw-r--r--src/devices/bus/interpro/mouse/mouse.h2
-rw-r--r--src/devices/bus/interpro/sr/sr.h16
-rw-r--r--src/devices/bus/iq151/iq151.h12
-rw-r--r--src/devices/bus/isa/gus.h22
-rw-r--r--src/devices/bus/isa/hdc.h4
-rw-r--r--src/devices/bus/isa/isa.h38
-rw-r--r--src/devices/bus/isa/p1_hdc.cpp16
-rw-r--r--src/devices/bus/isa/wdxt_gen.cpp65
-rw-r--r--src/devices/bus/kc/kc.h12
-rw-r--r--src/devices/bus/lpci/i82371sb.h4
-rw-r--r--src/devices/bus/lpci/southbridge.cpp4
-rw-r--r--src/devices/bus/midi/midi.h2
-rw-r--r--src/devices/bus/msx_slot/cartridge.h4
-rw-r--r--src/devices/bus/nasbus/nasbus.h2
-rw-r--r--src/devices/bus/newbrain/eim.cpp16
-rw-r--r--src/devices/bus/nubus/nubus.h12
-rw-r--r--src/devices/bus/oricext/oricext.h2
-rw-r--r--src/devices/bus/pc1512/mouse.h8
-rw-r--r--src/devices/bus/pc_kbd/pc_kbdc.h4
-rw-r--r--src/devices/bus/pet/cass.h2
-rw-r--r--src/devices/bus/pet/user.h57
-rw-r--r--src/devices/bus/plus4/exp.h8
-rw-r--r--src/devices/bus/pofo/exp.h6
-rw-r--r--src/devices/bus/psi_kbd/psi_kbd.h4
-rw-r--r--src/devices/bus/psx/ctlrport.h4
-rw-r--r--src/devices/bus/ql/exp.h8
-rw-r--r--src/devices/bus/rs232/rs232.h24
-rw-r--r--src/devices/bus/s100/s100.h34
-rw-r--r--src/devices/bus/s100/wunderbus.cpp2
-rw-r--r--src/devices/bus/scsi/scsi.h64
-rw-r--r--src/devices/bus/sms_ctrl/smsctrl.h4
-rw-r--r--src/devices/bus/spectrum/exp.h4
-rw-r--r--src/devices/bus/ss50/interface.h4
-rw-r--r--src/devices/bus/ss50/mpc.cpp32
-rw-r--r--src/devices/bus/sunkbd/sunkbd.h2
-rw-r--r--src/devices/bus/svi3x8/expander/expander.h14
-rw-r--r--src/devices/bus/svi3x8/slot/slot.h6
-rw-r--r--src/devices/bus/ti8x/ti8x.h4
-rw-r--r--src/devices/bus/ti99/gromport/gromport.h4
-rw-r--r--src/devices/bus/ti99/internal/992board.h8
-rw-r--r--src/devices/bus/ti99/internal/998board.h8
-rw-r--r--src/devices/bus/ti99/internal/datamux.h2
-rw-r--r--src/devices/bus/ti99/internal/evpcconn.h2
-rw-r--r--src/devices/bus/ti99/internal/genboard.h4
-rw-r--r--src/devices/bus/ti99/internal/ioport.h4
-rw-r--r--src/devices/bus/ti99/joyport/joyport.h2
-rw-r--r--src/devices/bus/ti99/peb/peribox.h8
-rw-r--r--src/devices/bus/ti99x/990_dk.h2
-rw-r--r--src/devices/bus/ti99x/990_hd.h2
-rw-r--r--src/devices/bus/ti99x/990_tap.h2
-rw-r--r--src/devices/bus/tiki100/exp.h10
-rw-r--r--src/devices/bus/tiki100/hdc.cpp10
-rw-r--r--src/devices/bus/tvc/tvc.h4
-rw-r--r--src/devices/bus/vcs_ctrl/ctrl.h2
-rw-r--r--src/devices/bus/vic10/exp.h8
-rw-r--r--src/devices/bus/vic20/exp.h6
-rw-r--r--src/devices/bus/vic20/vic1011.cpp25
-rw-r--r--src/devices/bus/vidbrain/exp.h2
-rw-r--r--src/devices/bus/vip/exp.h6
-rw-r--r--src/devices/bus/vme/vme.h2
-rw-r--r--src/devices/bus/vme/vme_mzr8300.cpp18
-rw-r--r--src/devices/bus/vtech/memexp/memexp.h6
-rw-r--r--src/devices/bus/wangpc/wangpc.h20
-rw-r--r--src/devices/bus/x68k/x68kexp.h8
-rw-r--r--src/devices/bus/z88/z88.h2
118 files changed, 705 insertions, 652 deletions
diff --git a/src/devices/bus/a1bus/a1bus.h b/src/devices/bus/a1bus/a1bus.h
index 6ab28767a29..484cba5b70f 100644
--- a/src/devices/bus/a1bus/a1bus.h
+++ b/src/devices/bus/a1bus/a1bus.h
@@ -20,10 +20,10 @@
downcast<a1bus_device &>(*device).set_cputag(_cputag);
#define MCFG_A1BUS_OUT_IRQ_CB(_devcb) \
- devcb = &downcast<a1bus_device &>(*device).set_out_irq_callback(DEVCB_##_devcb);
+ downcast<a1bus_device &>(*device).set_out_irq_callback(DEVCB_##_devcb);
#define MCFG_A1BUS_OUT_NMI_CB(_devcb) \
- devcb = &downcast<a1bus_device &>(*device).set_out_nmi_callback(DEVCB_##_devcb);
+ downcast<a1bus_device &>(*device).set_out_nmi_callback(DEVCB_##_devcb);
//**************************************************************************
// TYPE DEFINITIONS
diff --git a/src/devices/bus/a2bus/a2bus.h b/src/devices/bus/a2bus/a2bus.h
index 546c2592885..1e1d2b832ee 100644
--- a/src/devices/bus/a2bus/a2bus.h
+++ b/src/devices/bus/a2bus/a2bus.h
@@ -33,13 +33,13 @@
downcast<a2bus_device &>(*device).set_cputag(_cputag);
#define MCFG_A2BUS_OUT_IRQ_CB(_devcb) \
- devcb = &downcast<a2bus_device &>(*device).set_out_irq_callback(DEVCB_##_devcb);
+ downcast<a2bus_device &>(*device).set_out_irq_callback(DEVCB_##_devcb);
#define MCFG_A2BUS_OUT_NMI_CB(_devcb) \
- devcb = &downcast<a2bus_device &>(*device).set_out_nmi_callback(DEVCB_##_devcb);
+ downcast<a2bus_device &>(*device).set_out_nmi_callback(DEVCB_##_devcb);
#define MCFG_A2BUS_OUT_INH_CB(_devcb) \
- devcb = &downcast<a2bus_device &>(*device).set_out_inh_callback(DEVCB_##_devcb);
+ downcast<a2bus_device &>(*device).set_out_inh_callback(DEVCB_##_devcb);
// 7M = XTAL(14'318'181) / 2 or XTAL(28'636'363) / 4 (for IIgs)
static constexpr uint32_t A2BUS_7M_CLOCK = 7159090;
diff --git a/src/devices/bus/a2bus/a2eauxslot.h b/src/devices/bus/a2bus/a2eauxslot.h
index 2101f5cfc6b..1da89b18d7a 100644
--- a/src/devices/bus/a2bus/a2eauxslot.h
+++ b/src/devices/bus/a2bus/a2eauxslot.h
@@ -23,10 +23,10 @@
downcast<a2eauxslot_device &>(*device).set_cputag(_cputag);
#define MCFG_A2EAUXSLOT_OUT_IRQ_CB(_devcb) \
- devcb = &downcast<a2eauxslot_device &>(*device).set_out_irq_callback(DEVCB_##_devcb);
+ downcast<a2eauxslot_device &>(*device).set_out_irq_callback(DEVCB_##_devcb);
#define MCFG_A2EAUXSLOT_OUT_NMI_CB(_devcb) \
- devcb = &downcast<a2eauxslot_device &>(*device).set_out_nmi_callback(DEVCB_##_devcb);
+ downcast<a2eauxslot_device &>(*device).set_out_nmi_callback(DEVCB_##_devcb);
#define MCFG_A2EAUXSLOT_SLOT_ADD(_nbtag, _tag, _slot_intf, _def_slot) \
MCFG_DEVICE_ADD(_tag, A2EAUXSLOT_SLOT, 0) \
diff --git a/src/devices/bus/a2bus/a2mcms.cpp b/src/devices/bus/a2bus/a2mcms.cpp
index 6d11cbebf27..1442d7d68bc 100644
--- a/src/devices/bus/a2bus/a2mcms.cpp
+++ b/src/devices/bus/a2bus/a2mcms.cpp
@@ -39,7 +39,7 @@ DEFINE_DEVICE_TYPE(A2BUS_MCMS2, a2bus_mcms2_device, "a2mcms2", "Mountain Compute
#define ENGINE_TAG "engine"
#define MCFG_MCMS_IRQ_CALLBACK(_cb) \
- devcb = &downcast<mcms_device &>(*device).set_irq_cb(DEVCB_##_cb);
+ downcast<mcms_device &>(*device).set_irq_cb(DEVCB_##_cb);
/***************************************************************************
FUNCTION PROTOTYPES
diff --git a/src/devices/bus/a2bus/pc_xporter.cpp b/src/devices/bus/a2bus/pc_xporter.cpp
index 0495fb4fbf6..dd8671b7b87 100644
--- a/src/devices/bus/a2bus/pc_xporter.cpp
+++ b/src/devices/bus/a2bus/pc_xporter.cpp
@@ -147,8 +147,8 @@ MACHINE_CONFIG_START(a2bus_pcxporter_device::device_add_mconfig)
MCFG_I8237_OUT_DACK_2_CB(WRITELINE(*this, a2bus_pcxporter_device, pc_dack2_w))
MCFG_I8237_OUT_DACK_3_CB(WRITELINE(*this, a2bus_pcxporter_device, pc_dack3_w))
- MCFG_DEVICE_ADD(m_pic8259, PIC8259, 0)
- MCFG_PIC8259_OUT_INT_CB(INPUTLINE(m_v30, 0))
+ PIC8259(config, m_pic8259, 0);
+ m_pic8259->out_int_callback().set_inputline(m_v30, 0);
MCFG_DEVICE_ADD(m_isabus, ISA8, 0)
MCFG_ISA8_CPU(m_v30)
diff --git a/src/devices/bus/a800/a8sio.h b/src/devices/bus/a800/a8sio.h
index 448edf5602f..a2c88b08328 100644
--- a/src/devices/bus/a800/a8sio.h
+++ b/src/devices/bus/a800/a8sio.h
@@ -46,7 +46,7 @@
downcast<a8sio_slot_device &>(*device).set_a8sio_slot(_nbtag, _tag);
#define MCFG_A8SIO_DATA_IN_CB(_devcb) \
- devcb = &downcast<a8sio_device &>(*device).set_data_in_callback(DEVCB_##_devcb);
+ downcast<a8sio_device &>(*device).set_data_in_callback(DEVCB_##_devcb);
class a8sio_slot_device : public device_t,
diff --git a/src/devices/bus/abcbus/abcbus.h b/src/devices/bus/abcbus/abcbus.h
index b66744c2ec2..5bd338b05d7 100644
--- a/src/devices/bus/abcbus/abcbus.h
+++ b/src/devices/bus/abcbus/abcbus.h
@@ -120,34 +120,34 @@
#define MCFG_ABCBUS_SLOT_IRQ_CALLBACK(_irq) \
- devcb = &downcast<abcbus_slot_device *>(device)->set_irq_callback(DEVCB_##_irq);
+ downcast<abcbus_slot_device *>(device)->set_irq_callback(DEVCB_##_irq);
#define MCFG_ABCBUS_SLOT_NMI_CALLBACK(_nmi) \
- devcb = &downcast<abcbus_slot_device *>(device)->set_nmi_callback(DEVCB_##_nmi);
+ downcast<abcbus_slot_device *>(device)->set_nmi_callback(DEVCB_##_nmi);
#define MCFG_ABCBUS_SLOT_RDY_CALLBACK(_rdy) \
- devcb = &downcast<abcbus_slot_device *>(device)->set_rdy_callback(DEVCB_##_rdy);
+ downcast<abcbus_slot_device *>(device)->set_rdy_callback(DEVCB_##_rdy);
#define MCFG_ABCBUS_SLOT_RESIN_CALLBACK(_resin) \
- devcb = &downcast<abcbus_slot_device *>(device)->set_resin_callback(DEVCB_##_resin);
+ downcast<abcbus_slot_device *>(device)->set_resin_callback(DEVCB_##_resin);
#define MCFG_ABCBUS_SLOT_PREN_CALLBACK(_pren) \
- devcb = &downcast<abcbus_slot_device *>(device)->set_pren_callback(DEVCB_##_pren);
+ downcast<abcbus_slot_device *>(device)->set_pren_callback(DEVCB_##_pren);
#define MCFG_ABCBUS_SLOT_TRRQ_CALLBACK(_trrq) \
- devcb = &downcast<abcbus_slot_device *>(device)->set_trrq_callback(DEVCB_##_trrq);
+ downcast<abcbus_slot_device *>(device)->set_trrq_callback(DEVCB_##_trrq);
#define MCFG_ABCBUS_SLOT_XINT2_CALLBACK(_xint2) \
- devcb = &downcast<abcbus_slot_device *>(device)->set_xint2_callback(DEVCB_##_xint2);
+ downcast<abcbus_slot_device *>(device)->set_xint2_callback(DEVCB_##_xint2);
#define MCFG_ABCBUS_SLOT_XINT3_CALLBACK(_xint3) \
- devcb = &downcast<abcbus_slot_device *>(device)->set_xint3_callback(DEVCB_##_xint3);
+ downcast<abcbus_slot_device *>(device)->set_xint3_callback(DEVCB_##_xint3);
#define MCFG_ABCBUS_SLOT_XINT4_CALLBACK(_xint4) \
- devcb = &downcast<abcbus_slot_device *>(device)->set_xint4_callback(DEVCB_##_xint4);
+ downcast<abcbus_slot_device *>(device)->set_xint4_callback(DEVCB_##_xint4);
#define MCFG_ABCBUS_SLOT_XINT5_CALLBACK(_xint5) \
- devcb = &downcast<abcbus_slot_device *>(device)->set_xint5_callback(DEVCB_##_xint5);
+ downcast<abcbus_slot_device *>(device)->set_xint5_callback(DEVCB_##_xint5);
diff --git a/src/devices/bus/abckb/abckb.h b/src/devices/bus/abckb/abckb.h
index 2f1256299ba..7ec223fc942 100644
--- a/src/devices/bus/abckb/abckb.h
+++ b/src/devices/bus/abckb/abckb.h
@@ -23,13 +23,13 @@
MCFG_DEVICE_SLOT_INTERFACE(abc_keyboard_devices, _def_slot, false)
#define MCFG_ABC_KEYBOARD_OUT_RX_HANDLER(_devcb) \
- devcb = &downcast<abc_keyboard_port_device &>(*device).set_out_rx_handler(DEVCB_##_devcb);
+ downcast<abc_keyboard_port_device &>(*device).set_out_rx_handler(DEVCB_##_devcb);
#define MCFG_ABC_KEYBOARD_OUT_TRXC_HANDLER(_devcb) \
- devcb = &downcast<abc_keyboard_port_device &>(*device).set_out_trxc_handler(DEVCB_##_devcb);
+ downcast<abc_keyboard_port_device &>(*device).set_out_trxc_handler(DEVCB_##_devcb);
#define MCFG_ABC_KEYBOARD_OUT_KEYDOWN_HANDLER(_devcb) \
- devcb = &downcast<abc_keyboard_port_device &>(*device).set_out_keydown_handler(DEVCB_##_devcb);
+ downcast<abc_keyboard_port_device &>(*device).set_out_keydown_handler(DEVCB_##_devcb);
diff --git a/src/devices/bus/adam/exp.h b/src/devices/bus/adam/exp.h
index 9743577e7ec..7751c0f4c64 100644
--- a/src/devices/bus/adam/exp.h
+++ b/src/devices/bus/adam/exp.h
@@ -34,7 +34,7 @@
#define MCFG_ADAM_EXPANSION_SLOT_IRQ_CALLBACK(_write) \
- devcb = &downcast<adam_expansion_slot_device &>(*device).set_irq_wr_callback(DEVCB_##_write);
+ downcast<adam_expansion_slot_device &>(*device).set_irq_wr_callback(DEVCB_##_write);
diff --git a/src/devices/bus/amiga/keyboard/keyboard.h b/src/devices/bus/amiga/keyboard/keyboard.h
index 772a904f889..5fb210afa29 100644
--- a/src/devices/bus/amiga/keyboard/keyboard.h
+++ b/src/devices/bus/amiga/keyboard/keyboard.h
@@ -28,13 +28,13 @@
MCFG_DEVICE_SLOT_INTERFACE(amiga_keyboard_devices, _def_slot, false)
#define MCFG_AMIGA_KEYBOARD_KCLK_HANDLER(_devcb) \
- devcb = &downcast<amiga_keyboard_bus_device &>(*device).set_kclk_handler(DEVCB_##_devcb);
+ downcast<amiga_keyboard_bus_device &>(*device).set_kclk_handler(DEVCB_##_devcb);
#define MCFG_AMIGA_KEYBOARD_KDAT_HANDLER(_devcb) \
- devcb = &downcast<amiga_keyboard_bus_device &>(*device).set_kdat_handler(DEVCB_##_devcb);
+ downcast<amiga_keyboard_bus_device &>(*device).set_kdat_handler(DEVCB_##_devcb);
#define MCFG_AMIGA_KEYBOARD_KRST_HANDLER(_devcb) \
- devcb = &downcast<amiga_keyboard_bus_device &>(*device).set_krst_handler(DEVCB_##_devcb);
+ downcast<amiga_keyboard_bus_device &>(*device).set_krst_handler(DEVCB_##_devcb);
//**************************************************************************
diff --git a/src/devices/bus/amiga/zorro/zorro.h b/src/devices/bus/amiga/zorro/zorro.h
index 02ece4b59a4..3686f050002 100644
--- a/src/devices/bus/amiga/zorro/zorro.h
+++ b/src/devices/bus/amiga/zorro/zorro.h
@@ -172,16 +172,16 @@
// callbacks
#define MCFG_EXPANSION_SLOT_OVR_HANDLER(_devcb) \
- devcb = &downcast<zorro_device &>(*device).set_ovr_handler(DEVCB_##_devcb);
+ downcast<zorro_device &>(*device).set_ovr_handler(DEVCB_##_devcb);
#define MCFG_EXPANSION_SLOT_INT2_HANDLER(_devcb) \
- devcb = &downcast<zorro_device &>(*device).set_int2_handler(DEVCB_##_devcb);
+ downcast<zorro_device &>(*device).set_int2_handler(DEVCB_##_devcb);
#define MCFG_EXPANSION_SLOT_INT6_HANDLER(_devcb) \
- devcb = &downcast<zorro_device &>(*device).set_int6_handler(DEVCB_##_devcb);
+ downcast<zorro_device &>(*device).set_int6_handler(DEVCB_##_devcb);
#define MCFG_EXPANSION_SLOT_IPL_HANDLER(_devcb) \
- devcb = &downcast<exp_slot_device &>(*device).set_ipl_handler(DEVCB_##_devcb);
+ downcast<exp_slot_device &>(*device).set_ipl_handler(DEVCB_##_devcb);
// ======================> zorro 2 bus
@@ -193,25 +193,25 @@
MCFG_ZORRO_SLOT_ADD(ZORROBUS_TAG, _tag, _slot_intf, _def_slot)
#define MCFG_ZORRO2_OVR_HANDLER(_devcb) \
- devcb = &downcast<zorro_device &>(*device).set_ovr_handler(DEVCB_##_devcb);
+ downcast<zorro_device &>(*device).set_ovr_handler(DEVCB_##_devcb);
#define MCFG_ZORRO2_INT2_HANDLER(_devcb) \
- devcb = &downcast<zorro_device &>(*device).set_int2_handler(DEVCB_##_devcb);
+ downcast<zorro_device &>(*device).set_int2_handler(DEVCB_##_devcb);
#define MCFG_ZORRO2_INT6_HANDLER(_devcb) \
- devcb = &downcast<zorro_device &>(*device).set_int6_handler(DEVCB_##_devcb);
+ downcast<zorro_device &>(*device).set_int6_handler(DEVCB_##_devcb);
#define MCFG_ZORRO2_EINT1_HANDLER(_devcb) \
- devcb = &downcast<zorro2_device &>(*device).set_eint1_handler(DEVCB_##_devcb);
+ downcast<zorro2_device &>(*device).set_eint1_handler(DEVCB_##_devcb);
#define MCFG_ZORRO2_EINT4_HANDLER(_devcb) \
- devcb = &downcast<zorro2_device &>(*device).set_eint4_handler(DEVCB_##_devcb);
+ downcast<zorro2_device &>(*device).set_eint4_handler(DEVCB_##_devcb);
#define MCFG_ZORRO2_EINT5_HANDLER(_devcb) \
- devcb = &downcast<zorro2_device &>(*device).set_eint5_handler(DEVCB_##_devcb);
+ downcast<zorro2_device &>(*device).set_eint5_handler(DEVCB_##_devcb);
#define MCFG_ZORRO2_EINT7_HANDLER(_devcb) \
- devcb = &downcast<zorro2_device &>(*device).set_eint7_handler(DEVCB_##_devcb);
+ downcast<zorro2_device &>(*device).set_eint7_handler(DEVCB_##_devcb);
//**************************************************************************
diff --git a/src/devices/bus/apricot/expansion/expansion.h b/src/devices/bus/apricot/expansion/expansion.h
index 02ebbbe32ce..e7f2b881819 100644
--- a/src/devices/bus/apricot/expansion/expansion.h
+++ b/src/devices/bus/apricot/expansion/expansion.h
@@ -64,22 +64,22 @@
MCFG_DEVICE_SLOT_INTERFACE(_slot_intf, _def_slot, false)
#define MCFG_EXPANSION_DMA1_HANDLER(_devcb) \
- devcb = &downcast<apricot_expansion_bus_device &>(*device).set_dma1_handler(DEVCB_##_devcb);
+ downcast<apricot_expansion_bus_device &>(*device).set_dma1_handler(DEVCB_##_devcb);
#define MCFG_EXPANSION_DMA2_HANDLER(_devcb) \
- devcb = &downcast<apricot_expansion_bus_device &>(*device).set_dma2_handler(DEVCB_##_devcb);
+ downcast<apricot_expansion_bus_device &>(*device).set_dma2_handler(DEVCB_##_devcb);
#define MCFG_EXPANSION_EXT1_HANDLER(_devcb) \
- devcb = &downcast<apricot_expansion_bus_device &>(*device).set_ext1_handler(DEVCB_##_devcb);
+ downcast<apricot_expansion_bus_device &>(*device).set_ext1_handler(DEVCB_##_devcb);
#define MCFG_EXPANSION_EXT2_HANDLER(_devcb) \
- devcb = &downcast<apricot_expansion_bus_device &>(*device).set_ext2_handler(DEVCB_##_devcb);
+ downcast<apricot_expansion_bus_device &>(*device).set_ext2_handler(DEVCB_##_devcb);
#define MCFG_EXPANSION_INT2_HANDLER(_devcb) \
- devcb = &downcast<apricot_expansion_bus_device &>(*device).set_int2_handler(DEVCB_##_devcb);
+ downcast<apricot_expansion_bus_device &>(*device).set_int2_handler(DEVCB_##_devcb);
#define MCFG_EXPANSION_INT3_HANDLER(_devcb) \
- devcb = &downcast<apricot_expansion_bus_device &>(*device).set_int3_handler(DEVCB_##_devcb);
+ downcast<apricot_expansion_bus_device &>(*device).set_int3_handler(DEVCB_##_devcb);
//**************************************************************************
diff --git a/src/devices/bus/apricot/keyboard/keyboard.h b/src/devices/bus/apricot/keyboard/keyboard.h
index 857a78b7d1c..b71c2a47c5f 100644
--- a/src/devices/bus/apricot/keyboard/keyboard.h
+++ b/src/devices/bus/apricot/keyboard/keyboard.h
@@ -43,7 +43,7 @@
MCFG_DEVICE_SLOT_INTERFACE(apricot_keyboard_devices, _def_slot, false)
#define MCFG_APRICOT_KEYBOARD_IN_HANDLER(_devcb) \
- devcb = &downcast<apricot_keyboard_bus_device &>(*device).set_in_handler(DEVCB_##_devcb);
+ downcast<apricot_keyboard_bus_device &>(*device).set_in_handler(DEVCB_##_devcb);
//**************************************************************************
diff --git a/src/devices/bus/bbc/1mhzbus/1mhzbus.h b/src/devices/bus/bbc/1mhzbus/1mhzbus.h
index e2237bef0ff..15e4721e556 100644
--- a/src/devices/bus/bbc/1mhzbus/1mhzbus.h
+++ b/src/devices/bus/bbc/1mhzbus/1mhzbus.h
@@ -100,10 +100,10 @@
MCFG_BBC_1MHZBUS_SLOT_NMI_HANDLER(WRITELINE(DEVICE_SELF_OWNER, bbc_1mhzbus_slot_device, nmi_w))
#define MCFG_BBC_1MHZBUS_SLOT_IRQ_HANDLER(_devcb) \
- devcb = &downcast<bbc_1mhzbus_slot_device &>(*device).set_irq_handler(DEVCB_##_devcb);
+ downcast<bbc_1mhzbus_slot_device &>(*device).set_irq_handler(DEVCB_##_devcb);
#define MCFG_BBC_1MHZBUS_SLOT_NMI_HANDLER(_devcb) \
- devcb = &downcast<bbc_1mhzbus_slot_device &>(*device).set_nmi_handler(DEVCB_##_devcb);
+ downcast<bbc_1mhzbus_slot_device &>(*device).set_nmi_handler(DEVCB_##_devcb);
//**************************************************************************
diff --git a/src/devices/bus/bbc/fdc/fdc.h b/src/devices/bus/bbc/fdc/fdc.h
index 4e2363560ba..892db41fe1d 100644
--- a/src/devices/bus/bbc/fdc/fdc.h
+++ b/src/devices/bus/bbc/fdc/fdc.h
@@ -22,10 +22,10 @@
MCFG_DEVICE_SLOT_INTERFACE(_slot_intf, _def_slot, _fixed)
#define MCFG_BBC_FDC_SLOT_INTRQ_HANDLER(_devcb) \
- devcb = &downcast<bbc_fdc_slot_device &>(*device).set_intrq_handler(DEVCB_##_devcb);
+ downcast<bbc_fdc_slot_device &>(*device).set_intrq_handler(DEVCB_##_devcb);
#define MCFG_BBC_FDC_SLOT_DRQ_HANDLER(_devcb) \
- devcb = &downcast<bbc_fdc_slot_device &>(*device).set_drq_handler(DEVCB_##_devcb);
+ downcast<bbc_fdc_slot_device &>(*device).set_drq_handler(DEVCB_##_devcb);
//**************************************************************************
diff --git a/src/devices/bus/bbc/joyport/joyport.h b/src/devices/bus/bbc/joyport/joyport.h
index bfc93f2d9e2..a11e39a38ec 100644
--- a/src/devices/bus/bbc/joyport/joyport.h
+++ b/src/devices/bus/bbc/joyport/joyport.h
@@ -42,10 +42,10 @@
MCFG_DEVICE_SLOT_INTERFACE(_slot_intf, _def_slot, false)
#define MCFG_BBC_JOYPORT_CB1_HANDLER(_devcb) \
- devcb = &downcast<bbc_joyport_slot_device &>(*device).set_cb1_handler(DEVCB_##_devcb);
+ downcast<bbc_joyport_slot_device &>(*device).set_cb1_handler(DEVCB_##_devcb);
#define MCFG_BBC_JOYPORT_CB2_HANDLER(_devcb) \
- devcb = &downcast<bbc_joyport_slot_device &>(*device).set_cb2_handler(DEVCB_##_devcb);
+ downcast<bbc_joyport_slot_device &>(*device).set_cb2_handler(DEVCB_##_devcb);
//**************************************************************************
// TYPE DEFINITIONS
diff --git a/src/devices/bus/bbc/tube/tube.h b/src/devices/bus/bbc/tube/tube.h
index b60d349df47..722207d8d93 100644
--- a/src/devices/bus/bbc/tube/tube.h
+++ b/src/devices/bus/bbc/tube/tube.h
@@ -54,7 +54,7 @@
MCFG_DEVICE_SLOT_INTERFACE(_slot_intf, _def_slot, false)
#define MCFG_BBC_TUBE_SLOT_IRQ_HANDLER(_devcb) \
- devcb = &downcast<bbc_tube_slot_device &>(*device).set_irq_handler(DEVCB_##_devcb);
+ downcast<bbc_tube_slot_device &>(*device).set_irq_handler(DEVCB_##_devcb);
//**************************************************************************
diff --git a/src/devices/bus/bbc/tube/tube_80186.cpp b/src/devices/bus/bbc/tube/tube_80186.cpp
index 46350c4a13b..432341ea15b 100644
--- a/src/devices/bus/bbc/tube/tube_80186.cpp
+++ b/src/devices/bus/bbc/tube/tube_80186.cpp
@@ -53,25 +53,25 @@ ROM_END
// device_add_mconfig - add device configuration
//-------------------------------------------------
-MACHINE_CONFIG_START(bbc_tube_80186_device::device_add_mconfig)
- MCFG_DEVICE_ADD("i80186", I80186, XTAL(20'000'000) / 2)
- MCFG_DEVICE_PROGRAM_MAP(tube_80186_mem)
- MCFG_DEVICE_IO_MAP(tube_80186_io)
- //MCFG_80186_CHIP_SELECT_CB(WRITE16(*this, bbc_tube_80186_device, chip_select_cb))
- MCFG_80186_TMROUT0_HANDLER(INPUTLINE("i80186", INPUT_LINE_HALT)) MCFG_DEVCB_INVERT
- MCFG_80186_TMROUT1_HANDLER(INPUTLINE("i80186", INPUT_LINE_NMI)) MCFG_DEVCB_INVERT
-
- MCFG_TUBE_ADD("ula")
- MCFG_TUBE_PIRQ_HANDLER(WRITELINE("i80186", i80186_cpu_device, int0_w))
- MCFG_TUBE_DRQ_HANDLER(WRITELINE("i80186", i80186_cpu_device, drq0_w))
+void bbc_tube_80186_device::device_add_mconfig(machine_config &config)
+{
+ I80186(config, m_i80186, 20_MHz_XTAL / 2);
+ m_i80186->set_addrmap(AS_PROGRAM, &bbc_tube_80186_device::tube_80186_mem);
+ m_i80186->set_addrmap(AS_IO, &bbc_tube_80186_device::tube_80186_io);
+ //m_i80186->chip_select_callback().set(FUNC(bbc_tube_80186_device::chip_select_cb));
+ m_i80186->tmrout0_handler().set_inputline(m_i80186, INPUT_LINE_HALT).invert();
+ m_i80186->tmrout1_handler().set_inputline(m_i80186, INPUT_LINE_NMI).invert();
+
+ TUBE(config, m_ula, 0);
+ m_ula->pirq_handler().set(m_i80186, FUNC(i80186_cpu_device::int0_w));
+ m_ula->drq_handler().set(m_i80186, FUNC(i80186_cpu_device::drq0_w));
/* internal ram */
- MCFG_RAM_ADD(RAM_TAG)
- MCFG_RAM_DEFAULT_SIZE("512K")
+ RAM(config, m_ram, 0).set_default_size("512K");
/* software lists */
- MCFG_SOFTWARE_LIST_ADD("flop_ls_80186", "bbc_flop_80186")
-MACHINE_CONFIG_END
+ SOFTWARE_LIST(config, "flop_ls_80186").set_original("bbc_flop_80186");
+}
//-------------------------------------------------
// rom_region - device-specific ROM region
diff --git a/src/devices/bus/bbc/tube/tube_casper.cpp b/src/devices/bus/bbc/tube/tube_casper.cpp
index 02c19165fd0..393305616b8 100644
--- a/src/devices/bus/bbc/tube/tube_casper.cpp
+++ b/src/devices/bus/bbc/tube/tube_casper.cpp
@@ -48,25 +48,26 @@ ROM_END
// device_add_mconfig - add device configuration
//-------------------------------------------------
-MACHINE_CONFIG_START(bbc_tube_casper_device::device_add_mconfig)
- MCFG_DEVICE_ADD(m_m68000, M68000, XTAL(4'000'000))
- MCFG_DEVICE_PROGRAM_MAP(tube_casper_mem)
-
- MCFG_DEVICE_ADD(m_via6522_0, VIA6522, XTAL(4'000'000) / 2)
- MCFG_VIA6522_WRITEPB_HANDLER(WRITE8(m_via6522_1, via6522_device, write_pa))
- MCFG_VIA6522_CA2_HANDLER(WRITELINE(m_via6522_1, via6522_device, write_cb1))
- MCFG_VIA6522_CB2_HANDLER(WRITELINE(m_via6522_1, via6522_device, write_ca1))
- MCFG_VIA6522_IRQ_HANDLER(WRITELINE(DEVICE_SELF_OWNER, bbc_tube_slot_device, irq_w))
-
- MCFG_DEVICE_ADD(m_via6522_1, VIA6522, XTAL(4'000'000) / 2)
- MCFG_VIA6522_WRITEPB_HANDLER(WRITE8(m_via6522_0, via6522_device, write_pa))
- MCFG_VIA6522_CA2_HANDLER(WRITELINE(m_via6522_0, via6522_device, write_cb1))
- MCFG_VIA6522_CB2_HANDLER(WRITELINE(m_via6522_0, via6522_device, write_ca1))
- MCFG_VIA6522_IRQ_HANDLER(INPUTLINE(m_m68000, M68K_IRQ_1))
+void bbc_tube_casper_device::device_add_mconfig(machine_config &config)
+{
+ M68000(config, m_m68000, 4_MHz_XTAL);
+ m_m68000->set_addrmap(AS_PROGRAM, &bbc_tube_casper_device::tube_casper_mem);
+
+ VIA6522(config, m_via6522_0, 4_MHz_XTAL / 2);
+ m_via6522_0->writepb_handler().set(m_via6522_1, FUNC(via6522_device::write_pa));
+ m_via6522_0->ca2_handler().set(m_via6522_1, FUNC(via6522_device::write_cb1));
+ m_via6522_0->cb2_handler().set(m_via6522_1, FUNC(via6522_device::write_ca1));
+ m_via6522_0->irq_handler().set(DEVICE_SELF_OWNER, FUNC(bbc_tube_slot_device::irq_w));
+
+ VIA6522(config, m_via6522_1, 4_MHz_XTAL / 2);
+ m_via6522_1->writepb_handler().set(m_via6522_0, FUNC(via6522_device::write_pa));
+ m_via6522_1->ca2_handler().set(m_via6522_0, FUNC(via6522_device::write_cb1));
+ m_via6522_1->cb2_handler().set(m_via6522_0, FUNC(via6522_device::write_ca1));
+ m_via6522_1->irq_handler().set_inputline(m_m68000, M68K_IRQ_1);
/* software lists */
- MCFG_SOFTWARE_LIST_ADD("flop_ls_casper", "bbc_flop_68000")
-MACHINE_CONFIG_END
+ SOFTWARE_LIST(config, "flop_ls_casper").set_original("bbc_flop_68000");
+}
//-------------------------------------------------
// rom_region - device-specific ROM region
diff --git a/src/devices/bus/bbc/userport/userport.h b/src/devices/bus/bbc/userport/userport.h
index f19911a4631..22003968ee9 100644
--- a/src/devices/bus/bbc/userport/userport.h
+++ b/src/devices/bus/bbc/userport/userport.h
@@ -41,10 +41,10 @@
MCFG_DEVICE_SLOT_INTERFACE(_slot_intf, _def_slot, false)
#define MCFG_BBC_USERPORT_CB1_HANDLER(_devcb) \
- devcb = &downcast<bbc_userport_slot_device &>(*device).set_cb1_handler(DEVCB_##_devcb);
+ downcast<bbc_userport_slot_device &>(*device).set_cb1_handler(DEVCB_##_devcb);
#define MCFG_BBC_USERPORT_CB2_HANDLER(_devcb) \
- devcb = &downcast<bbc_userport_slot_device &>(*device).set_cb2_handler(DEVCB_##_devcb);
+ downcast<bbc_userport_slot_device &>(*device).set_cb2_handler(DEVCB_##_devcb);
//**************************************************************************
// TYPE DEFINITIONS
diff --git a/src/devices/bus/bml3/bml3bus.h b/src/devices/bus/bml3/bml3bus.h
index be5e419b8f8..918e7b449b1 100644
--- a/src/devices/bus/bml3/bml3bus.h
+++ b/src/devices/bus/bml3/bml3bus.h
@@ -24,13 +24,13 @@
downcast<bml3bus_device &>(*device).set_cputag(_cputag);
#define MCFG_BML3BUS_OUT_NMI_CB(_devcb) \
- devcb = &downcast<bml3bus_device &>(*device).set_out_nmi_callback(DEVCB_##_devcb);
+ downcast<bml3bus_device &>(*device).set_out_nmi_callback(DEVCB_##_devcb);
#define MCFG_BML3BUS_OUT_IRQ_CB(_devcb) \
- devcb = &downcast<bml3bus_device &>(*device).set_out_irq_callback(DEVCB_##_devcb);
+ downcast<bml3bus_device &>(*device).set_out_irq_callback(DEVCB_##_devcb);
#define MCFG_BML3BUS_OUT_FIRQ_CB(_devcb) \
- devcb = &downcast<bml3bus_device &>(*device).set_out_firq_callback(DEVCB_##_devcb);
+ downcast<bml3bus_device &>(*device).set_out_firq_callback(DEVCB_##_devcb);
#define MCFG_BML3BUS_SLOT_ADD(_nbtag, _tag, _slot_intf, _def_slot) \
MCFG_DEVICE_ADD(_tag, BML3BUS_SLOT, 0) \
diff --git a/src/devices/bus/c64/exp.h b/src/devices/bus/c64/exp.h
index de35666a5d2..ff3c8eadbab 100644
--- a/src/devices/bus/c64/exp.h
+++ b/src/devices/bus/c64/exp.h
@@ -68,22 +68,22 @@
#define MCFG_C64_EXPANSION_SLOT_IRQ_CALLBACK(_write) \
- devcb = &downcast<c64_expansion_slot_device &>(*device).set_irq_wr_callback(DEVCB_##_write);
+ downcast<c64_expansion_slot_device &>(*device).set_irq_wr_callback(DEVCB_##_write);
#define MCFG_C64_EXPANSION_SLOT_NMI_CALLBACK(_write) \
- devcb = &downcast<c64_expansion_slot_device &>(*device).set_nmi_wr_callback(DEVCB_##_write);
+ downcast<c64_expansion_slot_device &>(*device).set_nmi_wr_callback(DEVCB_##_write);
#define MCFG_C64_EXPANSION_SLOT_RESET_CALLBACK(_write) \
- devcb = &downcast<c64_expansion_slot_device &>(*device).set_reset_wr_callback(DEVCB_##_write);
+ downcast<c64_expansion_slot_device &>(*device).set_reset_wr_callback(DEVCB_##_write);
#define MCFG_C64_EXPANSION_SLOT_CD_INPUT_CALLBACK(_read) \
- devcb = &downcast<c64_expansion_slot_device &>(*device).set_cd_rd_callback(DEVCB_##_read);
+ downcast<c64_expansion_slot_device &>(*device).set_cd_rd_callback(DEVCB_##_read);
#define MCFG_C64_EXPANSION_SLOT_CD_OUTPUT_CALLBACK(_write) \
- devcb = &downcast<c64_expansion_slot_device &>(*device).set_cd_wr_callback(DEVCB_##_write);
+ downcast<c64_expansion_slot_device &>(*device).set_cd_wr_callback(DEVCB_##_write);
#define MCFG_C64_EXPANSION_SLOT_DMA_CALLBACK(_write) \
- devcb = &downcast<c64_expansion_slot_device &>(*device).set_dma_wr_callback(DEVCB_##_write);
+ downcast<c64_expansion_slot_device &>(*device).set_dma_wr_callback(DEVCB_##_write);
diff --git a/src/devices/bus/cbm2/user.h b/src/devices/bus/cbm2/user.h
index 7ebe6ddbf34..55a76c2d4fb 100644
--- a/src/devices/bus/cbm2/user.h
+++ b/src/devices/bus/cbm2/user.h
@@ -48,16 +48,16 @@
#define MCFG_CBM2_USER_PORT_IRQ_CALLBACK(_write) \
- devcb = &downcast<cbm2_user_port_device &>(*device).set_irq_wr_callback(DEVCB_##_write);
+ downcast<cbm2_user_port_device &>(*device).set_irq_wr_callback(DEVCB_##_write);
#define MCFG_CBM2_USER_PORT_SP_CALLBACK(_write) \
- devcb = &downcast<cbm2_user_port_device &>(*device).set_sp_wr_callback(DEVCB_##_write);
+ downcast<cbm2_user_port_device &>(*device).set_sp_wr_callback(DEVCB_##_write);
#define MCFG_CBM2_USER_PORT_CNT_CALLBACK(_write) \
- devcb = &downcast<cbm2_user_port_device &>(*device).set_cnt_wr_callback(DEVCB_##_write);
+ downcast<cbm2_user_port_device &>(*device).set_cnt_wr_callback(DEVCB_##_write);
#define MCFG_CBM2_USER_PORT_FLAG_CALLBACK(_write) \
- devcb = &downcast<cbm2_user_port_device &>(*device).set_flag_wr_callback(DEVCB_##_write);
+ downcast<cbm2_user_port_device &>(*device).set_flag_wr_callback(DEVCB_##_write);
diff --git a/src/devices/bus/cbmiec/cbmiec.h b/src/devices/bus/cbmiec/cbmiec.h
index da951186a81..0ed382142e0 100644
--- a/src/devices/bus/cbmiec/cbmiec.h
+++ b/src/devices/bus/cbmiec/cbmiec.h
@@ -31,19 +31,19 @@
#define MCFG_CBM_IEC_BUS_SRQ_CALLBACK(_write) \
- devcb = &downcast<cbm_iec_device *>(device)->set_srq_callback(DEVCB_##_write);
+ downcast<cbm_iec_device *>(device)->set_srq_callback(DEVCB_##_write);
#define MCFG_CBM_IEC_BUS_ATN_CALLBACK(_write) \
- devcb = &downcast<cbm_iec_device *>(device)->set_atn_callback(DEVCB_##_write);
+ downcast<cbm_iec_device *>(device)->set_atn_callback(DEVCB_##_write);
#define MCFG_CBM_IEC_BUS_CLK_CALLBACK(_write) \
- devcb = &downcast<cbm_iec_device *>(device)->set_clk_callback(DEVCB_##_write);
+ downcast<cbm_iec_device *>(device)->set_clk_callback(DEVCB_##_write);
#define MCFG_CBM_IEC_BUS_DATA_CALLBACK(_write) \
- devcb = &downcast<cbm_iec_device *>(device)->set_data_callback(DEVCB_##_write);
+ downcast<cbm_iec_device *>(device)->set_data_callback(DEVCB_##_write);
#define MCFG_CBM_IEC_BUS_RESET_CALLBACK(_write) \
- devcb = &downcast<cbm_iec_device *>(device)->set_reset_callback(DEVCB_##_write);
+ downcast<cbm_iec_device *>(device)->set_reset_callback(DEVCB_##_write);
#define MCFG_CBM_IEC_SLOT_ADD(_tag, _address, _slot_intf, _def_slot) \
diff --git a/src/devices/bus/cbus/pc9801_cbus.h b/src/devices/bus/cbus/pc9801_cbus.h
index 9f2f72591fb..4fb77ebe7fb 100644
--- a/src/devices/bus/cbus/pc9801_cbus.h
+++ b/src/devices/bus/cbus/pc9801_cbus.h
@@ -31,25 +31,25 @@
downcast<pc9801_slot_device &>(*device).set_cpu_tag(_cputag);
#define MCFG_PC9801CBUS_INT0_CALLBACK(_devcb) \
- devcb = &downcast<pc9801_slot_device &>(*device).set_int_callback<0>(DEVCB_##_devcb);
+ downcast<pc9801_slot_device &>(*device).set_int_callback<0>(DEVCB_##_devcb);
#define MCFG_PC9801CBUS_INT1_CALLBACK(_devcb) \
- devcb = &downcast<pc9801_slot_device &>(*device).set_int_callback<1>(DEVCB_##_devcb);
+ downcast<pc9801_slot_device &>(*device).set_int_callback<1>(DEVCB_##_devcb);
#define MCFG_PC9801CBUS_INT2_CALLBACK(_devcb) \
- devcb = &downcast<pc9801_slot_device &>(*device).set_int_callback<2>(DEVCB_##_devcb);
+ downcast<pc9801_slot_device &>(*device).set_int_callback<2>(DEVCB_##_devcb);
#define MCFG_PC9801CBUS_INT3_CALLBACK(_devcb) \
- devcb = &downcast<pc9801_slot_device &>(*device).set_int_callback<3>(DEVCB_##_devcb);
+ downcast<pc9801_slot_device &>(*device).set_int_callback<3>(DEVCB_##_devcb);
#define MCFG_PC9801CBUS_INT4_CALLBACK(_devcb) \
- devcb = &downcast<pc9801_slot_device &>(*device).set_int_callback<4>(DEVCB_##_devcb);
+ downcast<pc9801_slot_device &>(*device).set_int_callback<4>(DEVCB_##_devcb);
#define MCFG_PC9801CBUS_INT5_CALLBACK(_devcb) \
- devcb = &downcast<pc9801_slot_device &>(*device).set_int_callback<5>(DEVCB_##_devcb);
+ downcast<pc9801_slot_device &>(*device).set_int_callback<5>(DEVCB_##_devcb);
#define MCFG_PC9801CBUS_INT6_CALLBACK(_devcb) \
- devcb = &downcast<pc9801_slot_device &>(*device).set_int_callback<6>(DEVCB_##_devcb);
+ downcast<pc9801_slot_device &>(*device).set_int_callback<6>(DEVCB_##_devcb);
//**************************************************************************
diff --git a/src/devices/bus/centronics/ctronics.h b/src/devices/bus/centronics/ctronics.h
index 3c73690199d..a9e9c921546 100644
--- a/src/devices/bus/centronics/ctronics.h
+++ b/src/devices/bus/centronics/ctronics.h
@@ -15,55 +15,55 @@
#define MCFG_CENTRONICS_STROBE_HANDLER(_devcb) \
- devcb = &downcast<centronics_device &>(*device).set_strobe_handler(DEVCB_##_devcb);
+ downcast<centronics_device &>(*device).set_strobe_handler(DEVCB_##_devcb);
#define MCFG_CENTRONICS_DATA0_HANDLER(_devcb) \
- devcb = &downcast<centronics_device &>(*device).set_data0_handler(DEVCB_##_devcb);
+ downcast<centronics_device &>(*device).set_data0_handler(DEVCB_##_devcb);
#define MCFG_CENTRONICS_DATA1_HANDLER(_devcb) \
- devcb = &downcast<centronics_device &>(*device).set_data1_handler(DEVCB_##_devcb);
+ downcast<centronics_device &>(*device).set_data1_handler(DEVCB_##_devcb);
#define MCFG_CENTRONICS_DATA2_HANDLER(_devcb) \
- devcb = &downcast<centronics_device &>(*device).set_data2_handler(DEVCB_##_devcb);
+ downcast<centronics_device &>(*device).set_data2_handler(DEVCB_##_devcb);
#define MCFG_CENTRONICS_DATA3_HANDLER(_devcb) \
- devcb = &downcast<centronics_device &>(*device).set_data3_handler(DEVCB_##_devcb);
+ downcast<centronics_device &>(*device).set_data3_handler(DEVCB_##_devcb);
#define MCFG_CENTRONICS_DATA4_HANDLER(_devcb) \
- devcb = &downcast<centronics_device &>(*device).set_data4_handler(DEVCB_##_devcb);
+ downcast<centronics_device &>(*device).set_data4_handler(DEVCB_##_devcb);
#define MCFG_CENTRONICS_DATA5_HANDLER(_devcb) \
- devcb = &downcast<centronics_device &>(*device).set_data5_handler(DEVCB_##_devcb);
+ downcast<centronics_device &>(*device).set_data5_handler(DEVCB_##_devcb);
#define MCFG_CENTRONICS_DATA6_HANDLER(_devcb) \
- devcb = &downcast<centronics_device &>(*device).set_data6_handler(DEVCB_##_devcb);
+ downcast<centronics_device &>(*device).set_data6_handler(DEVCB_##_devcb);
#define MCFG_CENTRONICS_DATA7_HANDLER(_devcb) \
- devcb = &downcast<centronics_device &>(*device).set_data7_handler(DEVCB_##_devcb);
+ downcast<centronics_device &>(*device).set_data7_handler(DEVCB_##_devcb);
#define MCFG_CENTRONICS_ACK_HANDLER(_devcb) \
- devcb = &downcast<centronics_device &>(*device).set_ack_handler(DEVCB_##_devcb);
+ downcast<centronics_device &>(*device).set_ack_handler(DEVCB_##_devcb);
#define MCFG_CENTRONICS_BUSY_HANDLER(_devcb) \
- devcb = &downcast<centronics_device &>(*device).set_busy_handler(DEVCB_##_devcb);
+ downcast<centronics_device &>(*device).set_busy_handler(DEVCB_##_devcb);
#define MCFG_CENTRONICS_PERROR_HANDLER(_devcb) \
- devcb = &downcast<centronics_device &>(*device).set_perror_handler(DEVCB_##_devcb);
+ downcast<centronics_device &>(*device).set_perror_handler(DEVCB_##_devcb);
#define MCFG_CENTRONICS_SELECT_HANDLER(_devcb) \
- devcb = &downcast<centronics_device &>(*device).set_select_handler(DEVCB_##_devcb);
+ downcast<centronics_device &>(*device).set_select_handler(DEVCB_##_devcb);
#define MCFG_CENTRONICS_AUTOFD_HANDLER(_devcb) \
- devcb = &downcast<centronics_device &>(*device).set_autofd_handler(DEVCB_##_devcb);
+ downcast<centronics_device &>(*device).set_autofd_handler(DEVCB_##_devcb);
#define MCFG_CENTRONICS_FAULT_HANDLER(_devcb) \
- devcb = &downcast<centronics_device &>(*device).set_fault_handler(DEVCB_##_devcb);
+ downcast<centronics_device &>(*device).set_fault_handler(DEVCB_##_devcb);
#define MCFG_CENTRONICS_INIT_HANDLER(_devcb) \
- devcb = &downcast<centronics_device &>(*device).set_init_handler(DEVCB_##_devcb);
+ downcast<centronics_device &>(*device).set_init_handler(DEVCB_##_devcb);
#define MCFG_CENTRONICS_SELECT_IN_HANDLER(_devcb) \
- devcb = &downcast<centronics_device &>(*device).set_select_in_handler(DEVCB_##_devcb);
+ downcast<centronics_device &>(*device).set_select_in_handler(DEVCB_##_devcb);
#define MCFG_CENTRONICS_OUTPUT_LATCH_ADD(_tag, _centronics_tag) \
MCFG_DEVICE_ADD(_tag, OUTPUT_LATCH, 0) \
@@ -125,6 +125,15 @@ public:
template <class Object> devcb_base &set_init_handler(Object &&cb) { return m_init_handler.set_callback(std::forward<Object>(cb)); }
template <class Object> devcb_base &set_select_in_handler(Object &&cb) { return m_select_in_handler.set_callback(std::forward<Object>(cb)); }
+ auto ack_handler() { return m_ack_handler.bind(); }
+ auto busy_handler() { return m_busy_handler.bind(); }
+ auto perror_handler() { return m_perror_handler.bind(); }
+ auto select_handler() { return m_select_handler.bind(); }
+ auto autofd_handler() { return m_autofd_handler.bind(); }
+ auto fault_handler() { return m_fault_handler.bind(); }
+ auto init_handler() { return m_init_handler.bind(); }
+ auto select_in_handler() { return m_select_in_handler.bind(); }
+
DECLARE_WRITE_LINE_MEMBER( write_strobe );
DECLARE_WRITE_LINE_MEMBER( write_data0 );
DECLARE_WRITE_LINE_MEMBER( write_data1 );
diff --git a/src/devices/bus/cgenie/expansion/expansion.h b/src/devices/bus/cgenie/expansion/expansion.h
index 1e01a3f64a1..2dd6f659f5e 100644
--- a/src/devices/bus/cgenie/expansion/expansion.h
+++ b/src/devices/bus/cgenie/expansion/expansion.h
@@ -50,13 +50,13 @@
MCFG_DEVICE_SLOT_INTERFACE(cg_exp_slot_carts, nullptr, false)
#define MCFG_CG_EXP_SLOT_INT_HANDLER(_devcb) \
- devcb = &downcast<cg_exp_slot_device &>(*device).set_int_handler(DEVCB_##_devcb);
+ downcast<cg_exp_slot_device &>(*device).set_int_handler(DEVCB_##_devcb);
#define MCFG_CG_EXP_SLOT_NMI_HANDLER(_devcb) \
- devcb = &downcast<cg_exp_slot_device &>(*device).set_nmi_handler(DEVCB_##_devcb);
+ downcast<cg_exp_slot_device &>(*device).set_nmi_handler(DEVCB_##_devcb);
#define MCFG_CG_EXP_SLOT_RESET_HANDLER(_devcb) \
- devcb = &downcast<cg_exp_slot_device &>(*device).set_reset_handler(DEVCB_##_devcb);
+ downcast<cg_exp_slot_device &>(*device).set_reset_handler(DEVCB_##_devcb);
//**************************************************************************
diff --git a/src/devices/bus/coco/cococart.h b/src/devices/bus/coco/cococart.h
index 440630e05a3..325d5f2e1d6 100644
--- a/src/devices/bus/coco/cococart.h
+++ b/src/devices/bus/coco/cococart.h
@@ -26,13 +26,13 @@
typedef delegate<void (uint8_t *)> cococart_base_update_delegate;
#define MCFG_COCO_CARTRIDGE_CART_CB(_devcb) \
- devcb = &downcast<cococart_slot_device &>(*device).set_cart_callback(DEVCB_##_devcb);
+ downcast<cococart_slot_device &>(*device).set_cart_callback(DEVCB_##_devcb);
#define MCFG_COCO_CARTRIDGE_NMI_CB(_devcb) \
- devcb = &downcast<cococart_slot_device &>(*device).set_nmi_callback(DEVCB_##_devcb);
+ downcast<cococart_slot_device &>(*device).set_nmi_callback(DEVCB_##_devcb);
#define MCFG_COCO_CARTRIDGE_HALT_CB(_devcb) \
- devcb = &downcast<cococart_slot_device &>(*device).set_halt_callback(DEVCB_##_devcb);
+ downcast<cococart_slot_device &>(*device).set_halt_callback(DEVCB_##_devcb);
// ======================> cococart_slot_device
@@ -61,11 +61,23 @@ public:
};
// construction/destruction
+ template <typename T>
+ cococart_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, T &&opts, const char *dflt)
+ : cococart_slot_device(mconfig, tag, owner, clock)
+ {
+ option_reset();
+ opts(*this);
+ set_default_option(dflt);
+ set_fixed(false);
+ }
cococart_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
template <class Object> devcb_base &set_cart_callback(Object &&cb) { return m_cart_callback.set_callback(std::forward<Object>(cb)); }
template <class Object> devcb_base &set_nmi_callback(Object &&cb) { return m_nmi_callback.set_callback(std::forward<Object>(cb)); }
template <class Object> devcb_base &set_halt_callback(Object &&cb) { return m_halt_callback.set_callback(std::forward<Object>(cb)); }
+ auto cart_callback() { return m_cart_callback.bind(); }
+ auto nmi_callback() { return m_nmi_callback.bind(); }
+ auto halt_callback() { return m_halt_callback.bind(); }
// device-level overrides
virtual void device_start() override;
diff --git a/src/devices/bus/coleco/ctrl.h b/src/devices/bus/coleco/ctrl.h
index 9d605415cb4..b36c256067b 100644
--- a/src/devices/bus/coleco/ctrl.h
+++ b/src/devices/bus/coleco/ctrl.h
@@ -27,7 +27,7 @@
#define MCFG_COLECOVISION_CONTROL_PORT_IRQ_CALLBACK(_write) \
- devcb = &downcast<colecovision_control_port_device &>(*device).set_irq_wr_callback(DEVCB_##_write);
+ downcast<colecovision_control_port_device &>(*device).set_irq_wr_callback(DEVCB_##_write);
diff --git a/src/devices/bus/comx35/exp.h b/src/devices/bus/comx35/exp.h
index 6ffa7e9b67c..4aaf1d793fa 100644
--- a/src/devices/bus/comx35/exp.h
+++ b/src/devices/bus/comx35/exp.h
@@ -57,7 +57,7 @@
#define MCFG_COMX_EXPANSION_SLOT_IRQ_CALLBACK(_write) \
- devcb = &downcast<comx_expansion_slot_device &>(*device).set_irq_wr_callback(DEVCB_##_write);
+ downcast<comx_expansion_slot_device &>(*device).set_irq_wr_callback(DEVCB_##_write);
diff --git a/src/devices/bus/cpc/cpcexp.h b/src/devices/bus/cpc/cpcexp.h
index 0633ffd4c6b..e24c0b99d1c 100644
--- a/src/devices/bus/cpc/cpcexp.h
+++ b/src/devices/bus/cpc/cpcexp.h
@@ -60,19 +60,19 @@
//**************************************************************************
#define MCFG_CPC_EXPANSION_SLOT_OUT_IRQ_CB(_devcb) \
- devcb = &downcast<cpc_expansion_slot_device &>(*device).set_out_irq_callback(DEVCB_##_devcb);
+ downcast<cpc_expansion_slot_device &>(*device).set_out_irq_callback(DEVCB_##_devcb);
#define MCFG_CPC_EXPANSION_SLOT_OUT_NMI_CB(_devcb) \
- devcb = &downcast<cpc_expansion_slot_device &>(*device).set_out_nmi_callback(DEVCB_##_devcb);
+ downcast<cpc_expansion_slot_device &>(*device).set_out_nmi_callback(DEVCB_##_devcb);
#define MCFG_CPC_EXPANSION_SLOT_OUT_RESET_CB(_devcb) \
- devcb = &downcast<cpc_expansion_slot_device &>(*device).set_out_reset_callback(DEVCB_##_devcb);
+ downcast<cpc_expansion_slot_device &>(*device).set_out_reset_callback(DEVCB_##_devcb);
#define MCFG_CPC_EXPANSION_SLOT_OUT_ROMDIS_CB(_devcb) \
- devcb = &downcast<cpc_expansion_slot_device &>(*device).set_out_romdis_callback(DEVCB_##_devcb);
+ downcast<cpc_expansion_slot_device &>(*device).set_out_romdis_callback(DEVCB_##_devcb);
#define MCFG_CPC_EXPANSION_SLOT_ROM_SELECT(_devcb) \
- devcb = &downcast<cpc_expansion_slot_device &>(*device).set_out_rom_select_callback(DEVCB_##_devcb);
+ downcast<cpc_expansion_slot_device &>(*device).set_out_rom_select_callback(DEVCB_##_devcb);
//**************************************************************************
// TYPE DEFINITIONS
diff --git a/src/devices/bus/dmv/dmvbus.h b/src/devices/bus/dmv/dmvbus.h
index 2c683ef7a31..a10eab52bc0 100644
--- a/src/devices/bus/dmv/dmvbus.h
+++ b/src/devices/bus/dmv/dmvbus.h
@@ -111,16 +111,16 @@ DECLARE_DEVICE_TYPE(DMVCART_SLOT, dmvcart_slot_device)
***************************************************************************/
#define MCFG_DMVCART_SLOT_PROGRAM_READWRITE_CB(_read_devcb, _write_devcb) \
- devcb = &downcast<dmvcart_slot_device &>(*device).set_prog_read_callback(DEVCB_##_read_devcb); \
- devcb = &downcast<dmvcart_slot_device &>(*device).set_prog_write_callback(DEVCB_##_write_devcb);
+ downcast<dmvcart_slot_device &>(*device).set_prog_read_callback(DEVCB_##_read_devcb); \
+ downcast<dmvcart_slot_device &>(*device).set_prog_write_callback(DEVCB_##_write_devcb);
#define MCFG_DMVCART_SLOT_OUT_INT_CB(_devcb) \
- devcb = &downcast<dmvcart_slot_device &>(*device).set_out_int_callback(DEVCB_##_devcb);
+ downcast<dmvcart_slot_device &>(*device).set_out_int_callback(DEVCB_##_devcb);
#define MCFG_DMVCART_SLOT_OUT_IRQ_CB(_devcb) \
- devcb = &downcast<dmvcart_slot_device &>(*device).set_out_irq_callback(DEVCB_##_devcb);
+ downcast<dmvcart_slot_device &>(*device).set_out_irq_callback(DEVCB_##_devcb);
#define MCFG_DMVCART_SLOT_OUT_THOLD_CB(_devcb) \
- devcb = &downcast<dmvcart_slot_device &>(*device).set_out_thold_callback(DEVCB_##_devcb);
+ downcast<dmvcart_slot_device &>(*device).set_out_thold_callback(DEVCB_##_devcb);
#endif // MAME_BUS_DMV_DMVBUS_H
diff --git a/src/devices/bus/ecbbus/ecbbus.h b/src/devices/bus/ecbbus/ecbbus.h
index b446b6ee0ae..f4d53b5cc9a 100644
--- a/src/devices/bus/ecbbus/ecbbus.h
+++ b/src/devices/bus/ecbbus/ecbbus.h
@@ -70,10 +70,10 @@
#define MCFG_ECBBUS_IRQ_CALLBACK(_write) \
- devcb = &downcast<ecbbus_device &>(*device).set_irq_wr_callback(DEVCB_##_write);
+ downcast<ecbbus_device &>(*device).set_irq_wr_callback(DEVCB_##_write);
#define MCFG_ECBBUS_NMI_CALLBACK(_write) \
- devcb = &downcast<ecbbus_device &>(*device).set_nmi_wr_callback(DEVCB_##_write);
+ downcast<ecbbus_device &>(*device).set_nmi_wr_callback(DEVCB_##_write);
diff --git a/src/devices/bus/econet/econet.h b/src/devices/bus/econet/econet.h
index 01040acd84c..611d9aa49bf 100644
--- a/src/devices/bus/econet/econet.h
+++ b/src/devices/bus/econet/econet.h
@@ -36,10 +36,10 @@
#define MCFG_ECONET_CLK_CALLBACK(_write) \
- devcb = &downcast<econet_device &>(*device).set_clk_wr_callback(DEVCB_##_write);
+ downcast<econet_device &>(*device).set_clk_wr_callback(DEVCB_##_write);
#define MCFG_ECONET_DATA_CALLBACK(_write) \
- devcb = &downcast<econet_device &>(*device).set_data_wr_callback(DEVCB_##_write);
+ downcast<econet_device &>(*device).set_data_wr_callback(DEVCB_##_write);
diff --git a/src/devices/bus/einstein/pipe/pipe.h b/src/devices/bus/einstein/pipe/pipe.h
index 078a88fe004..31fe5345be8 100644
--- a/src/devices/bus/einstein/pipe/pipe.h
+++ b/src/devices/bus/einstein/pipe/pipe.h
@@ -54,13 +54,13 @@
MCFG_DEVICE_SLOT_INTERFACE(tatung_pipe_cards, nullptr, false)
#define MCFG_TATUNG_PIPE_INT_HANDLER(_devcb) \
- devcb = &downcast<tatung_pipe_device &>(*device).set_int_handler(DEVCB_##_devcb);
+ downcast<tatung_pipe_device &>(*device).set_int_handler(DEVCB_##_devcb);
#define MCFG_TATUNG_PIPE_NMI_HANDLER(_devcb) \
- devcb = &downcast<tatung_pipe_device &>(*device).set_nmi_handler(DEVCB_##_devcb);
+ downcast<tatung_pipe_device &>(*device).set_nmi_handler(DEVCB_##_devcb);
#define MCFG_TATUNG_PIPE_RESET_HANDLER(_devcb) \
- devcb = &downcast<tatung_pipe_device &>(*device).set_reset_handler(DEVCB_##_devcb);
+ downcast<tatung_pipe_device &>(*device).set_reset_handler(DEVCB_##_devcb);
//**************************************************************************
diff --git a/src/devices/bus/einstein/userport/userport.h b/src/devices/bus/einstein/userport/userport.h
index a0c650b2193..4bdbaed36d2 100644
--- a/src/devices/bus/einstein/userport/userport.h
+++ b/src/devices/bus/einstein/userport/userport.h
@@ -32,7 +32,7 @@
MCFG_DEVICE_SLOT_INTERFACE(einstein_userport_cards, nullptr, false)
#define MCFG_EINSTEIN_USERPORT_BSTB_HANDLER(_devcb) \
- devcb = &downcast<einstein_userport_device &>(*device).set_bstb_handler(DEVCB_##_devcb);
+ downcast<einstein_userport_device &>(*device).set_bstb_handler(DEVCB_##_devcb);
//**************************************************************************
diff --git a/src/devices/bus/electron/cart/slot.h b/src/devices/bus/electron/cart/slot.h
index 3b7b934ff1e..9e4b66182f1 100644
--- a/src/devices/bus/electron/cart/slot.h
+++ b/src/devices/bus/electron/cart/slot.h
@@ -110,10 +110,10 @@
MCFG_DEVICE_SLOT_INTERFACE(_slot_intf, _def_slot, false)
#define MCFG_ELECTRON_CARTSLOT_IRQ_HANDLER(_devcb) \
- devcb = &downcast<electron_cartslot_device &>(*device).set_irq_handler(DEVCB_##_devcb);
+ downcast<electron_cartslot_device &>(*device).set_irq_handler(DEVCB_##_devcb);
#define MCFG_ELECTRON_CARTSLOT_NMI_HANDLER(_devcb) \
- devcb = &downcast<electron_cartslot_device &>(*device).set_nmi_handler(DEVCB_##_devcb);
+ downcast<electron_cartslot_device &>(*device).set_nmi_handler(DEVCB_##_devcb);
//**************************************************************************
diff --git a/src/devices/bus/electron/exp.h b/src/devices/bus/electron/exp.h
index 7457c6099fc..ddac72c4d2b 100644
--- a/src/devices/bus/electron/exp.h
+++ b/src/devices/bus/electron/exp.h
@@ -111,10 +111,10 @@ AC RETURNS (pins 3,4) - adaptor. A total of 6W may be drawn from these lines as
MCFG_ELECTRON_EXPANSION_SLOT_NMI_HANDLER(WRITELINE(DEVICE_SELF_OWNER, electron_expansion_slot_device, nmi_w))
#define MCFG_ELECTRON_EXPANSION_SLOT_IRQ_HANDLER(_devcb) \
- devcb = &downcast<electron_expansion_slot_device &>(*device).set_irq_handler(DEVCB_##_devcb);
+ downcast<electron_expansion_slot_device &>(*device).set_irq_handler(DEVCB_##_devcb);
#define MCFG_ELECTRON_EXPANSION_SLOT_NMI_HANDLER(_devcb) \
- devcb = &downcast<electron_expansion_slot_device &>(*device).set_nmi_handler(DEVCB_##_devcb);
+ downcast<electron_expansion_slot_device &>(*device).set_nmi_handler(DEVCB_##_devcb);
//**************************************************************************
diff --git a/src/devices/bus/electron/m2105.cpp b/src/devices/bus/electron/m2105.cpp
index 77c4b196c90..0f32fff7331 100644
--- a/src/devices/bus/electron/m2105.cpp
+++ b/src/devices/bus/electron/m2105.cpp
@@ -87,8 +87,8 @@ MACHINE_CONFIG_START(electron_m2105_device::device_add_mconfig)
MCFG_RS232_RXD_HANDLER(WRITELINE("duart", scn2681_device, rx_a_w))
/* printer */
- MCFG_DEVICE_ADD(m_centronics, CENTRONICS, centronics_devices, "printer")
- MCFG_CENTRONICS_ACK_HANDLER(WRITELINE("via6522_1", via6522_device, write_ca1)) MCFG_DEVCB_INVERT /* ack seems to be inverted? */
+ CENTRONICS(config, m_centronics, centronics_devices, "printer");
+ m_centronics->ack_handler().set(m_via6522_1, FUNC(via6522_device::write_ca1)).invert(); // ack seems to be inverted?
MCFG_CENTRONICS_OUTPUT_LATCH_ADD("cent_data_out", "centronics")
/* speech hardware */
diff --git a/src/devices/bus/ep64/exp.h b/src/devices/bus/ep64/exp.h
index b101fa29f70..5a89296f3a5 100644
--- a/src/devices/bus/ep64/exp.h
+++ b/src/devices/bus/ep64/exp.h
@@ -71,13 +71,13 @@
downcast<ep64_expansion_bus_slot_device &>(*device).set_dave_tag(_tag);
#define MCFG_EP64_EXPANSION_BUS_SLOT_IRQ_CALLBACK(_write) \
- devcb = &downcast<ep64_expansion_bus_slot_device &>(*device).set_irq_wr_callback(DEVCB_##_write);
+ downcast<ep64_expansion_bus_slot_device &>(*device).set_irq_wr_callback(DEVCB_##_write);
#define MCFG_EP64_EXPANSION_BUS_SLOT_NMI_CALLBACK(_write) \
- devcb = &downcast<ep64_expansion_bus_slot_device &>(*device).set_nmi_wr_callback(DEVCB_##_write);
+ downcast<ep64_expansion_bus_slot_device &>(*device).set_nmi_wr_callback(DEVCB_##_write);
#define MCFG_EP64_EXPANSION_BUS_SLOT_WAIT_CALLBACK(_write) \
- devcb = &downcast<ep64_expansion_bus_slot_device &>(*device).set_wait_wr_callback(DEVCB_##_write);
+ downcast<ep64_expansion_bus_slot_device &>(*device).set_wait_wr_callback(DEVCB_##_write);
diff --git a/src/devices/bus/epson_sio/epson_sio.h b/src/devices/bus/epson_sio/epson_sio.h
index 8da0a4b3e44..189e36c5bdf 100644
--- a/src/devices/bus/epson_sio/epson_sio.h
+++ b/src/devices/bus/epson_sio/epson_sio.h
@@ -22,10 +22,10 @@
MCFG_DEVICE_SLOT_INTERFACE(epson_sio_devices, _def_slot, false)
#define MCFG_EPSON_SIO_RX(_rx) \
- devcb = &downcast<epson_sio_device *>(device)->set_rx_callback(DEVCB_##_rx);
+ downcast<epson_sio_device *>(device)->set_rx_callback(DEVCB_##_rx);
#define MCFG_EPSON_SIO_PIN(_pin) \
- devcb = &downcast<epson_sio_device *>(device)->set_pin_callback(DEVCB_##_pin);
+ downcast<epson_sio_device *>(device)->set_pin_callback(DEVCB_##_pin);
//**************************************************************************
diff --git a/src/devices/bus/gamegear/ggext.h b/src/devices/bus/gamegear/ggext.h
index d4dae3eb277..71d6ecfcf72 100644
--- a/src/devices/bus/gamegear/ggext.h
+++ b/src/devices/bus/gamegear/ggext.h
@@ -30,11 +30,11 @@
#define MCFG_GG_EXT_PORT_TH_INPUT_HANDLER(_devcb) \
- devcb = &downcast<gg_ext_port_device &>(*device).set_th_input_handler(DEVCB_##_devcb);
+ downcast<gg_ext_port_device &>(*device).set_th_input_handler(DEVCB_##_devcb);
#define MCFG_GG_EXT_PORT_PIXEL_HANDLER(_devcb) \
- devcb = &downcast<gg_ext_port_device &>(*device).set_pixel_handler(DEVCB_##_devcb);
+ downcast<gg_ext_port_device &>(*device).set_pixel_handler(DEVCB_##_devcb);
diff --git a/src/devices/bus/hexbus/tp0370.h b/src/devices/bus/hexbus/tp0370.h
index 94d32a5b87c..0888f7ad859 100644
--- a/src/devices/bus/hexbus/tp0370.h
+++ b/src/devices/bus/hexbus/tp0370.h
@@ -73,13 +73,13 @@ private:
*/
#define MCFG_IBC_HEXBUS_OUT_CALLBACK(_write) \
- devcb = &ibc_device::set_hexbus_wr_callback(*device, DEVCB_##_write);
+ ibc_device::set_hexbus_wr_callback(*device, DEVCB_##_write);
#define MCFG_IBC_HSKLATCH_CALLBACK(_write) \
- devcb = &ibc_device::set_hsklatch_wr_callback(*device, DEVCB_##_write);
+ ibc_device::set_hsklatch_wr_callback(*device, DEVCB_##_write);
#define MCFG_IBC_INT_CALLBACK(_write) \
- devcb = &ibc_device::set_ibc_int_callback(*device, DEVCB_##_write);
+ ibc_device::set_ibc_int_callback(*device, DEVCB_##_write);
DECLARE_DEVICE_TYPE_NS(IBC, bus::hexbus, ibc_device)
#endif
diff --git a/src/devices/bus/hp80_io/hp80_io.h b/src/devices/bus/hp80_io/hp80_io.h
index a1bd90f47ed..11025d30d03 100644
--- a/src/devices/bus/hp80_io/hp80_io.h
+++ b/src/devices/bus/hp80_io/hp80_io.h
@@ -19,10 +19,10 @@
downcast<hp80_io_slot_device &>(*device).set_slot_no(_idx);
#define MCFG_HP80_IO_IRL_CB(_devcb) \
- devcb = &downcast<hp80_io_slot_device &>(*device).set_irl_cb_func(DEVCB_##_devcb);
+ downcast<hp80_io_slot_device &>(*device).set_irl_cb_func(DEVCB_##_devcb);
#define MCFG_HP80_IO_HALT_CB(_devcb) \
- devcb = &downcast<hp80_io_slot_device &>(*device).set_halt_cb_func(DEVCB_##_devcb);
+ downcast<hp80_io_slot_device &>(*device).set_halt_cb_func(DEVCB_##_devcb);
#define HP80_IO_FIRST_SC 3 // Lowest SC used by I/O cards
diff --git a/src/devices/bus/hp9845_io/hp9845_io.h b/src/devices/bus/hp9845_io/hp9845_io.h
index 8b4065ce9e3..4f18ab75939 100644
--- a/src/devices/bus/hp9845_io/hp9845_io.h
+++ b/src/devices/bus/hp9845_io/hp9845_io.h
@@ -19,13 +19,13 @@
MCFG_DEVICE_SLOT_INTERFACE(hp9845_io_slot_devices, nullptr, false)
#define MCFG_HP9845_IO_IRQ_CB(_devcb) \
- devcb = &downcast<hp9845_io_slot_device &>(*device).set_irq_cb_func(DEVCB_##_devcb);
+ downcast<hp9845_io_slot_device &>(*device).set_irq_cb_func(DEVCB_##_devcb);
#define MCFG_HP9845_IO_STS_CB(_devcb) \
- devcb = &downcast<hp9845_io_slot_device &>(*device).set_sts_cb_func(DEVCB_##_devcb);
+ downcast<hp9845_io_slot_device &>(*device).set_sts_cb_func(DEVCB_##_devcb);
#define MCFG_HP9845_IO_FLG_CB(_devcb) \
- devcb = &downcast<hp9845_io_slot_device &>(*device).set_flg_cb_func(DEVCB_##_devcb);
+ downcast<hp9845_io_slot_device &>(*device).set_flg_cb_func(DEVCB_##_devcb);
#define HP9845_IO_FIRST_SC 1 // Lowest SC used by I/O cards
diff --git a/src/devices/bus/hp_dio/hp_dio.h b/src/devices/bus/hp_dio/hp_dio.h
index c11d6f8f7e0..b63b44c0482 100644
--- a/src/devices/bus/hp_dio/hp_dio.h
+++ b/src/devices/bus/hp_dio/hp_dio.h
@@ -27,16 +27,16 @@
downcast<dio32_device &>(*device).set_cputag(_cputag);
#define MCFG_ISA_OUT_IRQ3_CB(_devcb) \
- devcb = &downcast<dio16_device &>(*device).set_out_irq3_callback(DEVCB_##_devcb);
+ downcast<dio16_device &>(*device).set_out_irq3_callback(DEVCB_##_devcb);
#define MCFG_ISA_OUT_IRQ4_CB(_devcb) \
- devcb = &downcast<dio16_device &>(*device).set_out_irq4_callback(DEVCB_##_devcb);
+ downcast<dio16_device &>(*device).set_out_irq4_callback(DEVCB_##_devcb);
#define MCFG_ISA_OUT_IRQ5_CB(_devcb) \
- devcb = &downcast<dio16_device &>(*device).set_out_irq5_callback(DEVCB_##_devcb);
+ downcast<dio16_device &>(*device).set_out_irq5_callback(DEVCB_##_devcb);
#define MCFG_ISA_OUT_IRQ6_CB(_devcb) \
- devcb = &downcast<dio16_device &>(*device).set_out_irq6_callback(DEVCB_##_devcb);
+ downcast<dio16_device &>(*device).set_out_irq6_callback(DEVCB_##_devcb);
//**************************************************************************
// TYPE DEFINITIONS
diff --git a/src/devices/bus/hp_hil/hp_hil.h b/src/devices/bus/hp_hil/hp_hil.h
index f4cdbb5a771..a11c53be461 100644
--- a/src/devices/bus/hp_hil/hp_hil.h
+++ b/src/devices/bus/hp_hil/hp_hil.h
@@ -82,10 +82,10 @@
//**************************************************************************
#define MCFG_HP_HIL_INT_CALLBACK(_devcb) \
- devcb = &downcast<hp_hil_mlc_device &>(*device).set_int_callback(DEVCB_##_devcb);
+ downcast<hp_hil_mlc_device &>(*device).set_int_callback(DEVCB_##_devcb);
#define MCFG_HP_HIL_NMI_CALLBACK(_devcb) \
- devcb = &downcast<hp_hil_mlc_device &>(*device).set_nmi_callback(DEVCB_##_devcb);
+ downcast<hp_hil_mlc_device &>(*device).set_nmi_callback(DEVCB_##_devcb);
#define MCFG_HP_HIL_SLOT_ADD(_mlc_tag, _tag, _slot_intf, _def_slot) \
MCFG_DEVICE_ADD(_tag, HP_HIL_SLOT, 0) \
@@ -131,6 +131,8 @@ public:
template <class Object> devcb_base &set_int_callback(Object &&cb) { return int_cb.set_callback(std::forward<Object>(cb)); }
template <class Object> devcb_base &set_nmi_callback(Object &&cb) { return nmi_cb.set_callback(std::forward<Object>(cb)); }
+ auto int_callback() { return int_cb.bind(); }
+ auto nmi_callback() { return nmi_cb.bind(); }
void add_hp_hil_device(device_hp_hil_interface *device);
bool get_int(void) { return m_r3 & 1; }
diff --git a/src/devices/bus/ieee488/c2040fdc.h b/src/devices/bus/ieee488/c2040fdc.h
index 1c552c1c508..7e27f1f1b81 100644
--- a/src/devices/bus/ieee488/c2040fdc.h
+++ b/src/devices/bus/ieee488/c2040fdc.h
@@ -24,13 +24,13 @@
//**************************************************************************
#define MCFG_C2040_SYNC_CALLBACK(_write) \
- devcb = &downcast<c2040_fdc_device &>(*device).set_sync_wr_callback(DEVCB_##_write);
+ downcast<c2040_fdc_device &>(*device).set_sync_wr_callback(DEVCB_##_write);
#define MCFG_C2040_READY_CALLBACK(_write) \
- devcb = &downcast<c2040_fdc_device &>(*device).set_ready_wr_callback(DEVCB_##_write);
+ downcast<c2040_fdc_device &>(*device).set_ready_wr_callback(DEVCB_##_write);
#define MCFG_C2040_ERROR_CALLBACK(_write) \
- devcb = &downcast<c2040_fdc_device &>(*device).set_error_wr_callback(DEVCB_##_write);
+ downcast<c2040_fdc_device &>(*device).set_error_wr_callback(DEVCB_##_write);
diff --git a/src/devices/bus/ieee488/c8050.cpp b/src/devices/bus/ieee488/c8050.cpp
index ca9ae2cfa2d..94d8e9a89dc 100644
--- a/src/devices/bus/ieee488/c8050.cpp
+++ b/src/devices/bus/ieee488/c8050.cpp
@@ -35,7 +35,6 @@
#define M6532_0_TAG "uc1"
#define M6532_1_TAG "ue1"
#define M6504_TAG "uh3"
-#define M6522_TAG "um3"
#define M6530_TAG "uk3"
#define FDC_TAG "fdc"
@@ -207,14 +206,14 @@ void c8050_device::c8050_main_mem(address_map &map)
void c8050_device::c8050_fdc_mem(address_map &map)
{
map.global_mask(0x1fff);
- map(0x0000, 0x003f).mirror(0x0300).m(M6530_TAG, FUNC(mos6530_new_device::ram_map));
- map(0x0040, 0x004f).mirror(0x0330).m(M6522_TAG, FUNC(via6522_device::map));
- map(0x0080, 0x008f).mirror(0x0330).m(M6530_TAG, FUNC(mos6530_new_device::io_map));
+ map(0x0000, 0x003f).mirror(0x0300).m(m_miot, FUNC(mos6530_new_device::ram_map));
+ map(0x0040, 0x004f).mirror(0x0330).m(m_via, FUNC(via6522_device::map));
+ map(0x0080, 0x008f).mirror(0x0330).m(m_miot, FUNC(mos6530_new_device::io_map));
map(0x0400, 0x07ff).ram().share("share1");
map(0x0800, 0x0bff).ram().share("share2");
map(0x0c00, 0x0fff).ram().share("share3");
map(0x1000, 0x13ff).ram().share("share4");
- map(0x1c00, 0x1fff).m(M6530_TAG, FUNC(mos6530_new_device::rom_map));
+ map(0x1c00, 0x1fff).m(m_miot, FUNC(mos6530_new_device::rom_map));
}
@@ -225,9 +224,9 @@ void c8050_device::c8050_fdc_mem(address_map &map)
void c8050_device::c8250lp_fdc_mem(address_map &map)
{
map.global_mask(0x1fff);
- map(0x0000, 0x003f).mirror(0x0300).m(M6530_TAG, FUNC(mos6530_new_device::ram_map));
- map(0x0040, 0x004f).mirror(0x0330).m(M6522_TAG, FUNC(via6522_device::map));
- map(0x0080, 0x008f).mirror(0x0330).m(M6530_TAG, FUNC(mos6530_new_device::io_map));
+ map(0x0000, 0x003f).mirror(0x0300).m(m_miot, FUNC(mos6530_new_device::ram_map));
+ map(0x0040, 0x004f).mirror(0x0330).m(m_via, FUNC(via6522_device::map));
+ map(0x0080, 0x008f).mirror(0x0330).m(m_miot, FUNC(mos6530_new_device::io_map));
map(0x0400, 0x07ff).ram().share("share1");
map(0x0800, 0x0bff).ram().share("share2");
map(0x0c00, 0x0fff).ram().share("share3");
@@ -243,9 +242,9 @@ void c8050_device::c8250lp_fdc_mem(address_map &map)
void c8050_device::sfd1001_fdc_mem(address_map &map)
{
map.global_mask(0x1fff);
- map(0x0000, 0x003f).mirror(0x0300).m(M6530_TAG, FUNC(mos6530_new_device::ram_map));
- map(0x0040, 0x004f).mirror(0x0330).m(M6522_TAG, FUNC(via6522_device::map));
- map(0x0080, 0x008f).mirror(0x0330).m(M6530_TAG, FUNC(mos6530_new_device::io_map));
+ map(0x0000, 0x003f).mirror(0x0300).m(m_miot, FUNC(mos6530_new_device::ram_map));
+ map(0x0040, 0x004f).mirror(0x0330).m(m_via, FUNC(via6522_device::map));
+ map(0x0080, 0x008f).mirror(0x0330).m(m_miot, FUNC(mos6530_new_device::io_map));
map(0x0400, 0x07ff).ram().share("share1");
map(0x0800, 0x0bff).ram().share("share2");
map(0x0c00, 0x0fff).ram().share("share3");
@@ -550,29 +549,29 @@ MACHINE_CONFIG_START(c8050_device::device_add_mconfig)
MCFG_MOS6530n_IRQ_CB(INPUTLINE(M6502_TAG, INPUT_LINE_IRQ0))
// controller
- MCFG_DEVICE_ADD(M6504_TAG, M6504, XTAL(12'000'000)/12)
+ MCFG_DEVICE_ADD(m_fdccpu, M6504, XTAL(12'000'000)/12)
MCFG_DEVICE_PROGRAM_MAP(c8050_fdc_mem)
- MCFG_DEVICE_ADD(M6522_TAG, VIA6522, XTAL(12'000'000)/12)
- MCFG_VIA6522_READPA_HANDLER(READ8(FDC_TAG, c8050_fdc_device, read))
+ MCFG_DEVICE_ADD(m_via, VIA6522, XTAL(12'000'000)/12)
+ MCFG_VIA6522_READPA_HANDLER(READ8(m_fdc, c8050_fdc_device, read))
MCFG_VIA6522_WRITEPB_HANDLER(WRITE8(*this, c8050_device, via_pb_w))
- MCFG_VIA6522_CA2_HANDLER(WRITELINE(FDC_TAG, c8050_fdc_device, mode_sel_w))
- MCFG_VIA6522_CB2_HANDLER(WRITELINE(FDC_TAG, c8050_fdc_device, rw_sel_w))
-
- MCFG_DEVICE_ADD(M6530_TAG, MOS6530_NEW, XTAL(12'000'000)/12)
- MCFG_MOS6530n_OUT_PA_CB(WRITE8(FDC_TAG, c8050_fdc_device, write))
- MCFG_MOS6530n_OUT_PB0_CB(WRITELINE(FDC_TAG, c8050_fdc_device, drv_sel_w))
- MCFG_MOS6530n_OUT_PB1_CB(WRITELINE(FDC_TAG, c8050_fdc_device, ds0_w))
- MCFG_MOS6530n_OUT_PB2_CB(WRITELINE(FDC_TAG, c8050_fdc_device, ds1_w))
- MCFG_MOS6530n_IN_PB3_CB(READLINE(FDC_TAG, c8050_fdc_device, wps_r))
- MCFG_MOS6530n_IN_PB6_CB(VCC) // SINGLE SIDED
- MCFG_MOS6530n_OUT_PB7_CB(INPUTLINE(M6504_TAG, M6502_IRQ_LINE))
-
- MCFG_DEVICE_ADD(FDC_TAG, C8050_FDC, XTAL(12'000'000)/2)
- MCFG_C8050_SYNC_CALLBACK(WRITELINE(M6522_TAG, via6522_device, write_pb7))
- MCFG_C8050_READY_CALLBACK(WRITELINE(M6522_TAG, via6522_device, write_ca1))
- MCFG_C8050_BRDY_CALLBACK(INPUTLINE(M6504_TAG, M6502_SET_OVERFLOW)) MCFG_DEVCB_XOR(1)
- MCFG_C8050_ERROR_CALLBACK(WRITELINE(M6522_TAG, via6522_device, write_cb1))
+ MCFG_VIA6522_CA2_HANDLER(WRITELINE(m_fdc, c8050_fdc_device, mode_sel_w))
+ MCFG_VIA6522_CB2_HANDLER(WRITELINE(m_fdc, c8050_fdc_device, rw_sel_w))
+
+ MOS6530_NEW(config, m_miot, XTAL(12'000'000)/12);
+ m_miot->pa_wr_callback().set(m_fdc, FUNC(c8050_fdc_device::write));
+ m_miot->pb_wr_callback<0>().set(m_fdc, FUNC(c8050_fdc_device::drv_sel_w));
+ m_miot->pb_wr_callback<1>().set(m_fdc, FUNC(c8050_fdc_device::ds0_w));
+ m_miot->pb_wr_callback<2>().set(m_fdc, FUNC(c8050_fdc_device::ds1_w));
+ m_miot->pb_rd_callback<3>().set(m_fdc, FUNC(c8050_fdc_device::wps_r));
+ m_miot->pb_rd_callback<6>().set_constant(1); // SINGLE SIDED
+ m_miot->pb_wr_callback<7>().set_inputline(m_fdccpu, M6502_IRQ_LINE);
+
+ C8050_FDC(config, m_fdc, XTAL(12'000'000)/2);
+ m_fdc->sync_wr_callback().set(m_via, FUNC(via6522_device::write_pb7));
+ m_fdc->ready_wr_callback().set(m_via, FUNC(via6522_device::write_ca1));
+ m_fdc->brdy_wr_callback().set_inputline(m_fdccpu, M6502_SET_OVERFLOW).invert();
+ m_fdc->error_wr_callback().set(m_via, FUNC(via6522_device::write_cb1));
MCFG_FLOPPY_DRIVE_ADD(FDC_TAG ":0", c8050_floppies, "525ssqd", c8050_device::floppy_formats)
MCFG_FLOPPY_DRIVE_ADD(FDC_TAG ":1", c8050_floppies, "525ssqd", c8050_device::floppy_formats)
MACHINE_CONFIG_END
@@ -595,30 +594,30 @@ MACHINE_CONFIG_START(c8250_device::device_add_mconfig)
MCFG_MOS6530n_IRQ_CB(INPUTLINE(M6502_TAG, INPUT_LINE_IRQ0))
// controller
- MCFG_DEVICE_ADD(M6504_TAG, M6504, XTAL(12'000'000)/12)
+ MCFG_DEVICE_ADD(m_fdccpu, M6504, XTAL(12'000'000)/12)
MCFG_DEVICE_PROGRAM_MAP(c8050_fdc_mem)
- MCFG_DEVICE_ADD(M6522_TAG, VIA6522, XTAL(12'000'000)/12)
- MCFG_VIA6522_READPA_HANDLER(READ8(FDC_TAG, c8050_fdc_device, read))
+ MCFG_DEVICE_ADD(m_via, VIA6522, XTAL(12'000'000)/12)
+ MCFG_VIA6522_READPA_HANDLER(READ8(m_fdc, c8050_fdc_device, read))
MCFG_VIA6522_WRITEPB_HANDLER(WRITE8(*this, c8050_device, via_pb_w))
- MCFG_VIA6522_CA2_HANDLER(WRITELINE(FDC_TAG, c8050_fdc_device, mode_sel_w))
- MCFG_VIA6522_CB2_HANDLER(WRITELINE(FDC_TAG, c8050_fdc_device, rw_sel_w))
-
- MCFG_DEVICE_ADD(M6530_TAG, MOS6530_NEW, XTAL(12'000'000)/12)
- MCFG_MOS6530n_OUT_PA_CB(WRITE8(FDC_TAG, c8050_fdc_device, write))
- MCFG_MOS6530n_OUT_PB0_CB(WRITELINE(FDC_TAG, c8050_fdc_device, drv_sel_w))
- MCFG_MOS6530n_OUT_PB1_CB(WRITELINE(FDC_TAG, c8050_fdc_device, ds0_w))
- MCFG_MOS6530n_OUT_PB2_CB(WRITELINE(FDC_TAG, c8050_fdc_device, ds1_w))
- MCFG_MOS6530n_IN_PB3_CB(READLINE(FDC_TAG, c8050_fdc_device, wps_r))
- MCFG_MOS6530n_OUT_PB4_CB(WRITELINE(FDC_TAG, c8050_fdc_device, odd_hd_w))
- MCFG_MOS6530n_IN_PB6_CB(GND) // DOUBLE SIDED
- MCFG_MOS6530n_OUT_PB7_CB(INPUTLINE(M6504_TAG, M6502_IRQ_LINE))
-
- MCFG_DEVICE_ADD(FDC_TAG, C8050_FDC, XTAL(12'000'000)/2)
- MCFG_C8050_SYNC_CALLBACK(WRITELINE(M6522_TAG, via6522_device, write_pb7))
- MCFG_C8050_READY_CALLBACK(WRITELINE(M6522_TAG, via6522_device, write_ca1))
- MCFG_C8050_BRDY_CALLBACK(INPUTLINE(M6504_TAG, M6502_SET_OVERFLOW)) MCFG_DEVCB_XOR(1)
- MCFG_C8050_ERROR_CALLBACK(WRITELINE(M6522_TAG, via6522_device, write_cb1))
+ MCFG_VIA6522_CA2_HANDLER(WRITELINE(m_fdc, c8050_fdc_device, mode_sel_w))
+ MCFG_VIA6522_CB2_HANDLER(WRITELINE(m_fdc, c8050_fdc_device, rw_sel_w))
+
+ MOS6530_NEW(config, m_miot, XTAL(12'000'000)/12);
+ m_miot->pa_wr_callback().set(m_fdc, FUNC(c8050_fdc_device::write));
+ m_miot->pb_wr_callback<0>().set(m_fdc, FUNC(c8050_fdc_device::drv_sel_w));
+ m_miot->pb_wr_callback<1>().set(m_fdc, FUNC(c8050_fdc_device::ds0_w));
+ m_miot->pb_wr_callback<2>().set(m_fdc, FUNC(c8050_fdc_device::ds1_w));
+ m_miot->pb_rd_callback<3>().set(m_fdc, FUNC(c8050_fdc_device::wps_r));
+ m_miot->pb_wr_callback<4>().set(m_fdc, FUNC(c8050_fdc_device::odd_hd_w));
+ m_miot->pb_rd_callback<6>().set_constant(0); // DOUBLE SIDED
+ m_miot->pb_wr_callback<7>().set_inputline(m_fdccpu, M6502_IRQ_LINE);
+
+ C8050_FDC(config, m_fdc, XTAL(12'000'000)/2);
+ m_fdc->sync_wr_callback().set(m_via, FUNC(via6522_device::write_pb7));
+ m_fdc->ready_wr_callback().set(m_via, FUNC(via6522_device::write_ca1));
+ m_fdc->brdy_wr_callback().set_inputline(m_fdccpu, M6502_SET_OVERFLOW).invert();
+ m_fdc->error_wr_callback().set(m_via, FUNC(via6522_device::write_cb1));
MCFG_FLOPPY_DRIVE_ADD(FDC_TAG ":0", c8250_floppies, "525qd", c8250_device::floppy_formats)
MCFG_FLOPPY_DRIVE_ADD(FDC_TAG ":1", c8250_floppies, "525qd", c8250_device::floppy_formats)
MACHINE_CONFIG_END
@@ -641,30 +640,30 @@ MACHINE_CONFIG_START(c8250lp_device::device_add_mconfig)
MCFG_MOS6530n_IRQ_CB(INPUTLINE(M6502_TAG, INPUT_LINE_IRQ0))
// controller
- MCFG_DEVICE_ADD(M6504_TAG, M6504, XTAL(12'000'000)/12)
+ MCFG_DEVICE_ADD(m_fdccpu, M6504, XTAL(12'000'000)/12)
MCFG_DEVICE_PROGRAM_MAP(c8250lp_fdc_mem)
- MCFG_DEVICE_ADD(M6522_TAG, VIA6522, XTAL(12'000'000)/12)
- MCFG_VIA6522_READPA_HANDLER(READ8(FDC_TAG, c8050_fdc_device, read))
+ MCFG_DEVICE_ADD(m_via, VIA6522, XTAL(12'000'000)/12)
+ MCFG_VIA6522_READPA_HANDLER(READ8(m_fdc, c8050_fdc_device, read))
MCFG_VIA6522_WRITEPB_HANDLER(WRITE8(*this, c8050_device, via_pb_w))
- MCFG_VIA6522_CA2_HANDLER(WRITELINE(FDC_TAG, c8050_fdc_device, mode_sel_w))
- MCFG_VIA6522_CB2_HANDLER(WRITELINE(FDC_TAG, c8050_fdc_device, rw_sel_w))
-
- MCFG_DEVICE_ADD(M6530_TAG, MOS6530_NEW, XTAL(12'000'000)/12)
- MCFG_MOS6530n_OUT_PA_CB(WRITE8(FDC_TAG, c8050_fdc_device, write))
- MCFG_MOS6530n_OUT_PB0_CB(WRITELINE(FDC_TAG, c8050_fdc_device, drv_sel_w))
- MCFG_MOS6530n_OUT_PB1_CB(WRITELINE(FDC_TAG, c8050_fdc_device, ds0_w))
- MCFG_MOS6530n_OUT_PB2_CB(WRITELINE(FDC_TAG, c8050_fdc_device, ds1_w))
- MCFG_MOS6530n_IN_PB3_CB(READLINE(FDC_TAG, c8050_fdc_device, wps_r))
- MCFG_MOS6530n_OUT_PB4_CB(WRITELINE(FDC_TAG, c8050_fdc_device, odd_hd_w))
- MCFG_MOS6530n_IN_PB6_CB(GND) // DOUBLE SIDED
- MCFG_MOS6530n_OUT_PB7_CB(INPUTLINE(M6504_TAG, M6502_IRQ_LINE))
-
- MCFG_DEVICE_ADD(FDC_TAG, C8050_FDC, XTAL(12'000'000)/2)
- MCFG_C8050_SYNC_CALLBACK(WRITELINE(M6522_TAG, via6522_device, write_pb7))
- MCFG_C8050_READY_CALLBACK(WRITELINE(M6522_TAG, via6522_device, write_ca1))
- MCFG_C8050_BRDY_CALLBACK(INPUTLINE(M6504_TAG, M6502_SET_OVERFLOW)) MCFG_DEVCB_XOR(1)
- MCFG_C8050_ERROR_CALLBACK(WRITELINE(M6522_TAG, via6522_device, write_cb1))
+ MCFG_VIA6522_CA2_HANDLER(WRITELINE(m_fdc, c8050_fdc_device, mode_sel_w))
+ MCFG_VIA6522_CB2_HANDLER(WRITELINE(m_fdc, c8050_fdc_device, rw_sel_w))
+
+ MOS6530_NEW(config, m_miot, XTAL(12'000'000)/12);
+ m_miot->pa_wr_callback().set(m_fdc, FUNC(c8050_fdc_device::write));
+ m_miot->pb_wr_callback<0>().set(m_fdc, FUNC(c8050_fdc_device::drv_sel_w));
+ m_miot->pb_wr_callback<1>().set(m_fdc, FUNC(c8050_fdc_device::ds0_w));
+ m_miot->pb_wr_callback<2>().set(m_fdc, FUNC(c8050_fdc_device::ds1_w));
+ m_miot->pb_rd_callback<3>().set(m_fdc, FUNC(c8050_fdc_device::wps_r));
+ m_miot->pb_wr_callback<4>().set(m_fdc, FUNC(c8050_fdc_device::odd_hd_w));
+ m_miot->pb_rd_callback<6>().set_constant(0); // DOUBLE SIDED
+ m_miot->pb_wr_callback<7>().set_inputline(m_fdccpu, M6502_IRQ_LINE);
+
+ C8050_FDC(config, m_fdc, XTAL(12'000'000)/2);
+ m_fdc->sync_wr_callback().set(m_via, FUNC(via6522_device::write_pb7));
+ m_fdc->ready_wr_callback().set(m_via, FUNC(via6522_device::write_ca1));
+ m_fdc->brdy_wr_callback().set_inputline(m_fdccpu, M6502_SET_OVERFLOW).invert();
+ m_fdc->error_wr_callback().set(m_via, FUNC(via6522_device::write_cb1));
MCFG_FLOPPY_DRIVE_ADD(FDC_TAG ":0", c8250_floppies, "525qd", c8250lp_device::floppy_formats)
MCFG_FLOPPY_DRIVE_ADD(FDC_TAG ":1", c8250_floppies, "525qd", c8250lp_device::floppy_formats)
MACHINE_CONFIG_END
@@ -687,29 +686,29 @@ MACHINE_CONFIG_START(sfd1001_device::device_add_mconfig)
MCFG_MOS6530n_IRQ_CB(INPUTLINE(M6502_TAG, INPUT_LINE_IRQ0))
// controller
- MCFG_DEVICE_ADD(M6504_TAG, M6504, XTAL(12'000'000)/12)
+ MCFG_DEVICE_ADD(m_fdccpu, M6504, XTAL(12'000'000)/12)
MCFG_DEVICE_PROGRAM_MAP(sfd1001_fdc_mem)
- MCFG_DEVICE_ADD(M6522_TAG, VIA6522, XTAL(12'000'000)/12)
- MCFG_VIA6522_READPA_HANDLER(READ8(FDC_TAG, c8050_fdc_device, read))
+ MCFG_DEVICE_ADD(m_via, VIA6522, XTAL(12'000'000)/12)
+ MCFG_VIA6522_READPA_HANDLER(READ8(m_fdc, c8050_fdc_device, read))
MCFG_VIA6522_WRITEPB_HANDLER(WRITE8(*this, c8050_device, via_pb_w))
- MCFG_VIA6522_CA2_HANDLER(WRITELINE(FDC_TAG, c8050_fdc_device, mode_sel_w))
- MCFG_VIA6522_CB2_HANDLER(WRITELINE(FDC_TAG, c8050_fdc_device, rw_sel_w))
-
- MCFG_DEVICE_ADD(M6530_TAG, MOS6530_NEW, XTAL(12'000'000)/12)
- MCFG_MOS6530n_OUT_PA_CB(WRITE8(FDC_TAG, c8050_fdc_device, write))
- MCFG_MOS6530n_OUT_PB1_CB(WRITELINE(FDC_TAG, c8050_fdc_device, ds0_w))
- MCFG_MOS6530n_OUT_PB2_CB(WRITELINE(FDC_TAG, c8050_fdc_device, ds1_w))
- MCFG_MOS6530n_IN_PB3_CB(READLINE(FDC_TAG, c8050_fdc_device, wps_r))
- MCFG_MOS6530n_OUT_PB4_CB(WRITELINE(FDC_TAG, c8050_fdc_device, odd_hd_w))
- MCFG_MOS6530n_IN_PB6_CB(GND) // DOUBLE SIDED
- MCFG_MOS6530n_OUT_PB7_CB(INPUTLINE(M6504_TAG, M6502_IRQ_LINE))
-
- MCFG_DEVICE_ADD(FDC_TAG, C8050_FDC, XTAL(12'000'000)/2)
- MCFG_C8050_SYNC_CALLBACK(WRITELINE(M6522_TAG, via6522_device, write_pb7))
- MCFG_C8050_READY_CALLBACK(WRITELINE(M6522_TAG, via6522_device, write_ca1))
- MCFG_C8050_BRDY_CALLBACK(INPUTLINE(M6504_TAG, M6502_SET_OVERFLOW)) MCFG_DEVCB_XOR(1)
- MCFG_C8050_ERROR_CALLBACK(WRITELINE(M6522_TAG, via6522_device, write_cb1))
+ MCFG_VIA6522_CA2_HANDLER(WRITELINE(m_fdc, c8050_fdc_device, mode_sel_w))
+ MCFG_VIA6522_CB2_HANDLER(WRITELINE(m_fdc, c8050_fdc_device, rw_sel_w))
+
+ MOS6530_NEW(config, m_miot, XTAL(12'000'000)/12);
+ m_miot->pa_wr_callback().set(m_fdc, FUNC(c8050_fdc_device::write));
+ m_miot->pb_wr_callback<1>().set(m_fdc, FUNC(c8050_fdc_device::ds0_w));
+ m_miot->pb_wr_callback<2>().set(m_fdc, FUNC(c8050_fdc_device::ds1_w));
+ m_miot->pb_rd_callback<3>().set(m_fdc, FUNC(c8050_fdc_device::wps_r));
+ m_miot->pb_wr_callback<4>().set(m_fdc, FUNC(c8050_fdc_device::odd_hd_w));
+ m_miot->pb_rd_callback<6>().set_constant(0); // DOUBLE SIDED
+ m_miot->pb_wr_callback<7>().set_inputline(m_fdccpu, M6502_IRQ_LINE);
+
+ C8050_FDC(config, m_fdc, XTAL(12'000'000)/2);
+ m_fdc->sync_wr_callback().set(m_via, FUNC(via6522_device::write_pb7));
+ m_fdc->ready_wr_callback().set(m_via, FUNC(via6522_device::write_ca1));
+ m_fdc->brdy_wr_callback().set_inputline(m_fdccpu, M6502_SET_OVERFLOW).invert();
+ m_fdc->error_wr_callback().set(m_via, FUNC(via6522_device::write_cb1));
MCFG_FLOPPY_DRIVE_ADD(FDC_TAG ":0", sfd1001_floppies, "525qd", sfd1001_device::floppy_formats)
MACHINE_CONFIG_END
@@ -779,7 +778,7 @@ c8050_device::c8050_device(const machine_config &mconfig, device_type type, cons
m_riot0(*this, M6532_0_TAG),
m_riot1(*this, M6532_1_TAG),
m_miot(*this, M6530_TAG),
- m_via(*this, M6522_TAG),
+ m_via(*this, "um3"),
m_floppy0(*this, FDC_TAG ":0"),
m_floppy1(*this, FDC_TAG ":1"),
m_fdc(*this, FDC_TAG),
diff --git a/src/devices/bus/ieee488/c8050fdc.h b/src/devices/bus/ieee488/c8050fdc.h
index 9bae3891284..2f75511b817 100644
--- a/src/devices/bus/ieee488/c8050fdc.h
+++ b/src/devices/bus/ieee488/c8050fdc.h
@@ -19,24 +19,6 @@
//**************************************************************************
-// INTERFACE CONFIGURATION MACROS
-//**************************************************************************
-
-#define MCFG_C8050_SYNC_CALLBACK(_write) \
- devcb = &downcast<c8050_fdc_device &>(*device).set_sync_wr_callback(DEVCB_##_write);
-
-#define MCFG_C8050_READY_CALLBACK(_write) \
- devcb = &downcast<c8050_fdc_device &>(*device).set_ready_wr_callback(DEVCB_##_write);
-
-#define MCFG_C8050_BRDY_CALLBACK(_write) \
- devcb = &downcast<c8050_fdc_device &>(*device).set_brdy_wr_callback(DEVCB_##_write);
-
-#define MCFG_C8050_ERROR_CALLBACK(_write) \
- devcb = &downcast<c8050_fdc_device &>(*device).set_error_wr_callback(DEVCB_##_write);
-
-
-
-//**************************************************************************
// TYPE DEFINITIONS
//**************************************************************************
@@ -48,10 +30,10 @@ public:
// construction/destruction
c8050_fdc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
- template <class Object> devcb_base &set_sync_wr_callback(Object &&cb) { return m_write_sync.set_callback(std::forward<Object>(cb)); }
- template <class Object> devcb_base &set_ready_wr_callback(Object &&cb) { return m_write_ready.set_callback(std::forward<Object>(cb)); }
- template <class Object> devcb_base &set_brdy_wr_callback(Object &&cb) { return m_write_brdy.set_callback(std::forward<Object>(cb)); }
- template <class Object> devcb_base &set_error_wr_callback(Object &&cb) { return m_write_error.set_callback(std::forward<Object>(cb)); }
+ auto sync_wr_callback() { return m_write_sync.bind(); }
+ auto ready_wr_callback() { return m_write_ready.bind(); }
+ auto brdy_wr_callback() { return m_write_brdy.bind(); }
+ auto error_wr_callback() { return m_write_error.bind(); }
DECLARE_READ8_MEMBER( read );
DECLARE_WRITE8_MEMBER( write );
diff --git a/src/devices/bus/ieee488/hp9895.cpp b/src/devices/bus/ieee488/hp9895.cpp
index 31e0e4989df..72d99ce1c4f 100644
--- a/src/devices/bus/ieee488/hp9895.cpp
+++ b/src/devices/bus/ieee488/hp9895.cpp
@@ -891,18 +891,19 @@ MACHINE_CONFIG_START(hp9895_device::device_add_mconfig)
MCFG_DEVICE_IO_MAP(z80_io_map)
MCFG_Z80_SET_REFRESH_CALLBACK(WRITE8(*this, hp9895_device , z80_m1_w))
- MCFG_DEVICE_ADD("phi" , PHI , 0)
- MCFG_PHI_EOI_WRITE_CB(WRITELINE(*this, hp9895_device , phi_eoi_w))
- MCFG_PHI_DAV_WRITE_CB(WRITELINE(*this, hp9895_device , phi_dav_w))
- MCFG_PHI_NRFD_WRITE_CB(WRITELINE(*this, hp9895_device , phi_nrfd_w))
- MCFG_PHI_NDAC_WRITE_CB(WRITELINE(*this, hp9895_device , phi_ndac_w))
- MCFG_PHI_IFC_WRITE_CB(WRITELINE(*this, hp9895_device , phi_ifc_w))
- MCFG_PHI_SRQ_WRITE_CB(WRITELINE(*this, hp9895_device , phi_srq_w))
- MCFG_PHI_ATN_WRITE_CB(WRITELINE(*this, hp9895_device , phi_atn_w))
- MCFG_PHI_REN_WRITE_CB(WRITELINE(*this, hp9895_device , phi_ren_w))
- MCFG_PHI_DIO_READWRITE_CB(READ8(*this, hp9895_device , phi_dio_r) , WRITE8(*this, hp9895_device , phi_dio_w))
- MCFG_PHI_INT_WRITE_CB(WRITELINE(*this, hp9895_device , phi_int_w))
- MCFG_PHI_SYS_CNTRL_READ_CB(GND)
+ PHI(config, m_phi, 0);
+ m_phi->signal_write_cb<phi_device::PHI_488_EOI>().set(FUNC(hp9895_device::phi_eoi_w));
+ m_phi->signal_write_cb<phi_device::PHI_488_DAV>().set(FUNC(hp9895_device::phi_dav_w));
+ m_phi->signal_write_cb<phi_device::PHI_488_NRFD>().set(FUNC(hp9895_device::phi_nrfd_w));
+ m_phi->signal_write_cb<phi_device::PHI_488_NDAC>().set(FUNC(hp9895_device::phi_ndac_w));
+ m_phi->signal_write_cb<phi_device::PHI_488_IFC>().set(FUNC(hp9895_device::phi_ifc_w));
+ m_phi->signal_write_cb<phi_device::PHI_488_SRQ>().set(FUNC(hp9895_device::phi_srq_w));
+ m_phi->signal_write_cb<phi_device::PHI_488_ATN>().set(FUNC(hp9895_device::phi_atn_w));
+ m_phi->signal_write_cb<phi_device::PHI_488_REN>().set(FUNC(hp9895_device::phi_ren_w));
+ m_phi->dio_read_cb().set(FUNC(hp9895_device::phi_dio_r));
+ m_phi->dio_write_cb().set(FUNC(hp9895_device::phi_dio_w));
+ m_phi->int_write_cb().set(FUNC(hp9895_device::phi_int_w));
+ m_phi->sys_cntrl_read_cb().set_constant(0);
MCFG_FLOPPY_DRIVE_ADD("floppy0" , hp9895_floppies , "8dsdd" , hp9895_floppy_formats)
MCFG_SLOT_FIXED(true)
diff --git a/src/devices/bus/ieee488/ieee488.h b/src/devices/bus/ieee488/ieee488.h
index 2920eaa2320..9dd05039e0a 100644
--- a/src/devices/bus/ieee488/ieee488.h
+++ b/src/devices/bus/ieee488/ieee488.h
@@ -32,35 +32,35 @@
#define MCFG_IEEE488_EOI_CALLBACK(_write) \
- devcb = &downcast<ieee488_device *>(device)->set_eoi_callback(DEVCB_##_write);
+ downcast<ieee488_device *>(device)->set_eoi_callback(DEVCB_##_write);
#define MCFG_IEEE488_DAV_CALLBACK(_write) \
- devcb = &downcast<ieee488_device *>(device)->set_dav_callback(DEVCB_##_write);
+ downcast<ieee488_device *>(device)->set_dav_callback(DEVCB_##_write);
#define MCFG_IEEE488_NRFD_CALLBACK(_write) \
- devcb = &downcast<ieee488_device *>(device)->set_nrfd_callback(DEVCB_##_write);
+ downcast<ieee488_device *>(device)->set_nrfd_callback(DEVCB_##_write);
#define MCFG_IEEE488_NDAC_CALLBACK(_write) \
- devcb = &downcast<ieee488_device *>(device)->set_ndac_callback(DEVCB_##_write);
+ downcast<ieee488_device *>(device)->set_ndac_callback(DEVCB_##_write);
#define MCFG_IEEE488_IFC_CALLBACK(_write) \
- devcb = &downcast<ieee488_device *>(device)->set_ifc_callback(DEVCB_##_write);
+ downcast<ieee488_device *>(device)->set_ifc_callback(DEVCB_##_write);
#define MCFG_IEEE488_SRQ_CALLBACK(_write) \
- devcb = &downcast<ieee488_device *>(device)->set_srq_callback(DEVCB_##_write);
+ downcast<ieee488_device *>(device)->set_srq_callback(DEVCB_##_write);
#define MCFG_IEEE488_ATN_CALLBACK(_write) \
- devcb = &downcast<ieee488_device *>(device)->set_atn_callback(DEVCB_##_write);
+ downcast<ieee488_device *>(device)->set_atn_callback(DEVCB_##_write);
#define MCFG_IEEE488_REN_CALLBACK(_write) \
- devcb = &downcast<ieee488_device *>(device)->set_ren_callback(DEVCB_##_write);
+ downcast<ieee488_device *>(device)->set_ren_callback(DEVCB_##_write);
// This CB reports changes to the DIO lines on the bus (whose value comes from
// ANDing the DIO lines of each device on the bus)
// This CB is needed by those controllers that start a parallel poll and wait
// for some condition to be set by devices on the DIO lines (e.g. PHI controller).
#define MCFG_IEEE488_DIO_CALLBACK(_write) \
- devcb = &downcast<ieee488_device *>(device)->set_dio_callback(DEVCB_##_write);
+ downcast<ieee488_device *>(device)->set_dio_callback(DEVCB_##_write);
#define MCFG_IEEE488_SLOT_ADD(_tag, _address, _slot_intf, _def_slot) \
MCFG_DEVICE_ADD(_tag, IEEE488_SLOT, 0) \
diff --git a/src/devices/bus/interpro/keyboard/keyboard.h b/src/devices/bus/interpro/keyboard/keyboard.h
index f4bfc7cc0cb..9d40e5a9e96 100644
--- a/src/devices/bus/interpro/keyboard/keyboard.h
+++ b/src/devices/bus/interpro/keyboard/keyboard.h
@@ -10,7 +10,7 @@
MCFG_DEVICE_SLOT_INTERFACE(slot_intf, def_slot, false)
#define MCFG_INTERPRO_KEYBOARD_RXD_HANDLER(cb) \
- devcb = &downcast<interpro_keyboard_port_device &>(*device).set_rxd_handler(DEVCB_##cb);
+ downcast<interpro_keyboard_port_device &>(*device).set_rxd_handler(DEVCB_##cb);
class device_interpro_keyboard_port_interface;
diff --git a/src/devices/bus/interpro/mouse/mouse.h b/src/devices/bus/interpro/mouse/mouse.h
index d3a03f494a8..d13ee669e48 100644
--- a/src/devices/bus/interpro/mouse/mouse.h
+++ b/src/devices/bus/interpro/mouse/mouse.h
@@ -6,7 +6,7 @@
#pragma once
#define MCFG_MOUSE_STATE_CB(_state_cb) \
- devcb = &downcast<interpro_mouse_port_device &>(*device).set_state_callback(DEVCB_##_state_cb);
+ downcast<interpro_mouse_port_device &>(*device).set_state_callback(DEVCB_##_state_cb);
class device_interpro_mouse_port_interface;
diff --git a/src/devices/bus/interpro/sr/sr.h b/src/devices/bus/interpro/sr/sr.h
index ec584f0b7db..9d23fad04e5 100644
--- a/src/devices/bus/interpro/sr/sr.h
+++ b/src/devices/bus/interpro/sr/sr.h
@@ -7,16 +7,16 @@
#pragma once
#define MCFG_CBUS_OUT_IRQ0_CB(_devcb) \
- devcb = &downcast<cbus_device &>(*device).set_out_irq0_callback(DEVCB_##_devcb);
+ downcast<cbus_device &>(*device).set_out_irq0_callback(DEVCB_##_devcb);
#define MCFG_CBUS_OUT_IRQ1_CB(_devcb) \
- devcb = &downcast<cbus_device &>(*device).set_out_irq1_callback(DEVCB_##_devcb);
+ downcast<cbus_device &>(*device).set_out_irq1_callback(DEVCB_##_devcb);
#define MCFG_CBUS_OUT_IRQ2_CB(_devcb) \
- devcb = &downcast<cbus_device &>(*device).set_out_irq2_callback(DEVCB_##_devcb);
+ downcast<cbus_device &>(*device).set_out_irq2_callback(DEVCB_##_devcb);
#define MCFG_CBUS_OUT_VBLANK_CB(_devcb) \
- devcb = &downcast<cbus_device &>(*device).set_out_vblank_callback(DEVCB_##_devcb);
+ downcast<cbus_device &>(*device).set_out_vblank_callback(DEVCB_##_devcb);
#define MCFG_CBUS_SLOT_ADD(_bus_tag, _slot_tag, _slot_intf, _def_slot, _fixed) \
MCFG_DEVICE_ADD(_slot_tag, CBUS_SLOT, 0) \
@@ -28,16 +28,16 @@
#define MCFG_SRX_OUT_IRQ0_CB(_devcb) \
- devcb = &downcast<srx_device &>(*device).set_out_irq0_callback(DEVCB_##_devcb);
+ downcast<srx_device &>(*device).set_out_irq0_callback(DEVCB_##_devcb);
#define MCFG_SRX_OUT_IRQ1_CB(_devcb) \
- devcb = &downcast<srx_device &>(*device).set_out_irq1_callback(DEVCB_##_devcb);
+ downcast<srx_device &>(*device).set_out_irq1_callback(DEVCB_##_devcb);
#define MCFG_SRX_OUT_IRQ2_CB(_devcb) \
- devcb = &downcast<srx_device &>(*device).set_out_irq2_callback(DEVCB_##_devcb);
+ downcast<srx_device &>(*device).set_out_irq2_callback(DEVCB_##_devcb);
#define MCFG_SRX_OUT_VBLANK_CB(_devcb) \
- devcb = &downcast<srx_device &>(*device).set_out_vblank_callback(DEVCB_##_devcb);
+ downcast<srx_device &>(*device).set_out_vblank_callback(DEVCB_##_devcb);
#define MCFG_SRX_SLOT_ADD(_bus_tag, _slot_tag, _slot_intf, _def_slot, _fixed) \
MCFG_DEVICE_ADD(_slot_tag, SRX_SLOT, 0) \
diff --git a/src/devices/bus/iq151/iq151.h b/src/devices/bus/iq151/iq151.h
index 270e47193af..e68d27a007d 100644
--- a/src/devices/bus/iq151/iq151.h
+++ b/src/devices/bus/iq151/iq151.h
@@ -145,22 +145,22 @@ DECLARE_DEVICE_TYPE(IQ151CART_SLOT, iq151cart_slot_device)
***************************************************************************/
#define MCFG_IQ151CART_SLOT_OUT_IRQ0_CB(_devcb) \
- devcb = &downcast<iq151cart_slot_device &>(*device).set_out_irq0_callback(DEVCB_##_devcb);
+ downcast<iq151cart_slot_device &>(*device).set_out_irq0_callback(DEVCB_##_devcb);
#define MCFG_IQ151CART_SLOT_OUT_IRQ1_CB(_devcb) \
- devcb = &downcast<iq151cart_slot_device &>(*device).set_out_irq1_callback(DEVCB_##_devcb);
+ downcast<iq151cart_slot_device &>(*device).set_out_irq1_callback(DEVCB_##_devcb);
#define MCFG_IQ151CART_SLOT_OUT_IRQ2_CB(_devcb) \
- devcb = &downcast<iq151cart_slot_device &>(*device).set_out_irq2_callback(DEVCB_##_devcb);
+ downcast<iq151cart_slot_device &>(*device).set_out_irq2_callback(DEVCB_##_devcb);
#define MCFG_IQ151CART_SLOT_OUT_IRQ3_CB(_devcb) \
- devcb = &downcast<iq151cart_slot_device &>(*device).set_out_irq3_callback(DEVCB_##_devcb);
+ downcast<iq151cart_slot_device &>(*device).set_out_irq3_callback(DEVCB_##_devcb);
#define MCFG_IQ151CART_SLOT_OUT_IRQ4_CB(_devcb) \
- devcb = &downcast<iq151cart_slot_device &>(*device).set_out_irq4_callback(DEVCB_##_devcb);
+ downcast<iq151cart_slot_device &>(*device).set_out_irq4_callback(DEVCB_##_devcb);
#define MCFG_IQ151CART_SLOT_OUT_DRQ_CB(_devcb) \
- devcb = &downcast<iq151cart_slot_device &>(*device).set_out_drq_callback(DEVCB_##_devcb);
+ downcast<iq151cart_slot_device &>(*device).set_out_drq_callback(DEVCB_##_devcb);
#define MCFG_IQ151CART_SLOT_SCREEN_TAG(screen_tag) \
downcast<iq151cart_slot_device &>(*device).set_screen_tag(screen_tag);
diff --git a/src/devices/bus/isa/gus.h b/src/devices/bus/isa/gus.h
index 09f86e0b091..47428309970 100644
--- a/src/devices/bus/isa/gus.h
+++ b/src/devices/bus/isa/gus.h
@@ -46,37 +46,37 @@
#include "machine/6850acia.h"
#define MCFG_GF1_TXIRQ_HANDLER(_devcb) \
- devcb = &downcast<gf1_device &>(*device).set_txirq_handler(DEVCB_##_devcb);
+ downcast<gf1_device &>(*device).set_txirq_handler(DEVCB_##_devcb);
#define MCFG_GF1_RXIRQ_HANDLER(_devcb) \
- devcb = &downcast<gf1_device &>(*device).set_rxirq_handler(DEVCB_##_devcb);
+ downcast<gf1_device &>(*device).set_rxirq_handler(DEVCB_##_devcb);
#define MCFG_GF1_WAVE_IRQ_HANDLER(_devcb) \
- devcb = &downcast<gf1_device &>(*device).set_wave_irq_handler(DEVCB_##_devcb);
+ downcast<gf1_device &>(*device).set_wave_irq_handler(DEVCB_##_devcb);
#define MCFG_GF1_RAMP_IRQ_HANDLER(_devcb) \
- devcb = &downcast<gf1_device &>(*device).set_ramp_irq_handler(DEVCB_##_devcb);
+ downcast<gf1_device &>(*device).set_ramp_irq_handler(DEVCB_##_devcb);
#define MCFG_GF1_TIMER1_IRQ_HANDLER(_devcb) \
- devcb = &downcast<gf1_device &>(*device).set_timer1_irq_handler(DEVCB_##_devcb);
+ downcast<gf1_device &>(*device).set_timer1_irq_handler(DEVCB_##_devcb);
#define MCFG_GF1_TIMER2_IRQ_HANDLER(_devcb) \
- devcb = &downcast<gf1_device &>(*device).set_timer2_irq_handler(DEVCB_##_devcb);
+ downcast<gf1_device &>(*device).set_timer2_irq_handler(DEVCB_##_devcb);
#define MCFG_GF1_SB_IRQ_HANDLER(_devcb) \
- devcb = &downcast<gf1_device &>(*device).set_sb_irq_handler(DEVCB_##_devcb);
+ downcast<gf1_device &>(*device).set_sb_irq_handler(DEVCB_##_devcb);
#define MCFG_GF1_DMA_IRQ_HANDLER(_devcb) \
- devcb = &downcast<gf1_device &>(*device).set_dma_irq_handler(DEVCB_##_devcb);
+ downcast<gf1_device &>(*device).set_dma_irq_handler(DEVCB_##_devcb);
#define MCFG_GF1_DRQ1_HANDLER(_devcb) \
- devcb = &downcast<gf1_device &>(*device).set_drq1_handler(DEVCB_##_devcb);
+ downcast<gf1_device &>(*device).set_drq1_handler(DEVCB_##_devcb);
#define MCFG_GF1_DRQ2_HANDLER(_devcb) \
- devcb = &downcast<gf1_device &>(*device).set_drq2_handler(DEVCB_##_devcb);
+ downcast<gf1_device &>(*device).set_drq2_handler(DEVCB_##_devcb);
#define MCFG_GF1_NMI_HANDLER(_devcb) \
- devcb = &downcast<gf1_device &>(*device).set_nmi_handler(DEVCB_##_devcb);
+ downcast<gf1_device &>(*device).set_nmi_handler(DEVCB_##_devcb);
//**************************************************************************
// TYPE DEFINITIONS
diff --git a/src/devices/bus/isa/hdc.h b/src/devices/bus/isa/hdc.h
index a935fe9288d..3e91c57d063 100644
--- a/src/devices/bus/isa/hdc.h
+++ b/src/devices/bus/isa/hdc.h
@@ -20,10 +20,10 @@
// XT HD controller device
#define MCFG_XTHDC_IRQ_HANDLER(_devcb) \
- devcb = &downcast<xt_hdc_device &>(*device).set_irq_handler(DEVCB_##_devcb);
+ downcast<xt_hdc_device &>(*device).set_irq_handler(DEVCB_##_devcb);
#define MCFG_XTHDC_DRQ_HANDLER(_devcb) \
- devcb = &downcast<xt_hdc_device &>(*device).set_drq_handler(DEVCB_##_devcb);
+ downcast<xt_hdc_device &>(*device).set_drq_handler(DEVCB_##_devcb);
class xt_hdc_device :
public device_t
diff --git a/src/devices/bus/isa/isa.h b/src/devices/bus/isa/isa.h
index 47bd9a23993..36654de4e17 100644
--- a/src/devices/bus/isa/isa.h
+++ b/src/devices/bus/isa/isa.h
@@ -85,62 +85,62 @@
downcast<isa8_device &>(*device).set_custom_spaces();
#define MCFG_ISA_BUS_IOCHCK(_iochck) \
- devcb = &downcast<isa8_device *>(device)->set_iochck_callback(DEVCB_##_iochck);
+ downcast<isa8_device *>(device)->set_iochck_callback(DEVCB_##_iochck);
#define MCFG_ISA_OUT_IRQ2_CB(_devcb) \
- devcb = &downcast<isa8_device &>(*device).set_out_irq2_callback(DEVCB_##_devcb);
+ downcast<isa8_device &>(*device).set_out_irq2_callback(DEVCB_##_devcb);
#define MCFG_ISA_OUT_IRQ3_CB(_devcb) \
- devcb = &downcast<isa8_device &>(*device).set_out_irq3_callback(DEVCB_##_devcb);
+ downcast<isa8_device &>(*device).set_out_irq3_callback(DEVCB_##_devcb);
#define MCFG_ISA_OUT_IRQ4_CB(_devcb) \
- devcb = &downcast<isa8_device &>(*device).set_out_irq4_callback(DEVCB_##_devcb);
+ downcast<isa8_device &>(*device).set_out_irq4_callback(DEVCB_##_devcb);
#define MCFG_ISA_OUT_IRQ5_CB(_devcb) \
- devcb = &downcast<isa8_device &>(*device).set_out_irq5_callback(DEVCB_##_devcb);
+ downcast<isa8_device &>(*device).set_out_irq5_callback(DEVCB_##_devcb);
#define MCFG_ISA_OUT_IRQ6_CB(_devcb) \
- devcb = &downcast<isa8_device &>(*device).set_out_irq6_callback(DEVCB_##_devcb);
+ downcast<isa8_device &>(*device).set_out_irq6_callback(DEVCB_##_devcb);
#define MCFG_ISA_OUT_IRQ7_CB(_devcb) \
- devcb = &downcast<isa8_device &>(*device).set_out_irq7_callback(DEVCB_##_devcb);
+ downcast<isa8_device &>(*device).set_out_irq7_callback(DEVCB_##_devcb);
#define MCFG_ISA_OUT_DRQ1_CB(_devcb) \
- devcb = &downcast<isa8_device &>(*device).set_out_drq1_callback(DEVCB_##_devcb);
+ downcast<isa8_device &>(*device).set_out_drq1_callback(DEVCB_##_devcb);
#define MCFG_ISA_OUT_DRQ2_CB(_devcb) \
- devcb = &downcast<isa8_device &>(*device).set_out_drq2_callback(DEVCB_##_devcb);
+ downcast<isa8_device &>(*device).set_out_drq2_callback(DEVCB_##_devcb);
#define MCFG_ISA_OUT_DRQ3_CB(_devcb) \
- devcb = &downcast<isa8_device &>(*device).set_out_drq3_callback(DEVCB_##_devcb);
+ downcast<isa8_device &>(*device).set_out_drq3_callback(DEVCB_##_devcb);
#define MCFG_ISA_OUT_IRQ10_CB(_devcb) \
- devcb = &downcast<isa16_device &>(*device).set_out_irq10_callback(DEVCB_##_devcb);
+ downcast<isa16_device &>(*device).set_out_irq10_callback(DEVCB_##_devcb);
#define MCFG_ISA_OUT_IRQ11_CB(_devcb) \
- devcb = &downcast<isa16_device &>(*device).set_out_irq11_callback(DEVCB_##_devcb);
+ downcast<isa16_device &>(*device).set_out_irq11_callback(DEVCB_##_devcb);
#define MCFG_ISA_OUT_IRQ12_CB(_devcb) \
- devcb = &downcast<isa16_device &>(*device).set_out_irq12_callback(DEVCB_##_devcb);
+ downcast<isa16_device &>(*device).set_out_irq12_callback(DEVCB_##_devcb);
#define MCFG_ISA_OUT_IRQ14_CB(_devcb) \
- devcb = &downcast<isa16_device &>(*device).set_out_irq14_callback(DEVCB_##_devcb);
+ downcast<isa16_device &>(*device).set_out_irq14_callback(DEVCB_##_devcb);
#define MCFG_ISA_OUT_IRQ15_CB(_devcb) \
- devcb = &downcast<isa16_device &>(*device).set_out_irq15_callback(DEVCB_##_devcb);
+ downcast<isa16_device &>(*device).set_out_irq15_callback(DEVCB_##_devcb);
#define MCFG_ISA_OUT_DRQ0_CB(_devcb) \
- devcb = &downcast<isa16_device &>(*device).set_out_drq0_callback(DEVCB_##_devcb);
+ downcast<isa16_device &>(*device).set_out_drq0_callback(DEVCB_##_devcb);
#define MCFG_ISA_OUT_DRQ5_CB(_devcb) \
- devcb = &downcast<isa16_device &>(*device).set_out_drq5_callback(DEVCB_##_devcb);
+ downcast<isa16_device &>(*device).set_out_drq5_callback(DEVCB_##_devcb);
#define MCFG_ISA_OUT_DRQ6_CB(_devcb) \
- devcb = &downcast<isa16_device &>(*device).set_out_drq6_callback(DEVCB_##_devcb);
+ downcast<isa16_device &>(*device).set_out_drq6_callback(DEVCB_##_devcb);
#define MCFG_ISA_OUT_DRQ7_CB(_devcb) \
- devcb = &downcast<isa16_device &>(*device).set_out_drq7_callback(DEVCB_##_devcb);
+ downcast<isa16_device &>(*device).set_out_drq7_callback(DEVCB_##_devcb);
//**************************************************************************
diff --git a/src/devices/bus/isa/p1_hdc.cpp b/src/devices/bus/isa/p1_hdc.cpp
index 9fdfe607e1e..8b743bdac03 100644
--- a/src/devices/bus/isa/p1_hdc.cpp
+++ b/src/devices/bus/isa/p1_hdc.cpp
@@ -26,8 +26,6 @@
} \
} while (0)
-#define KM1809VG7_TAG "d17"
-
//**************************************************************************
// DEVICE DEFINITIONS
@@ -59,12 +57,12 @@ ROM_END
//-------------------------------------------------
MACHINE_CONFIG_START(p1_hdc_device::device_add_mconfig)
- MCFG_DEVICE_ADD(KM1809VG7_TAG, WD2010, 5000000) // XXX clock?
- MCFG_WD2010_IN_DRDY_CB(VCC)
- MCFG_WD2010_IN_INDEX_CB(VCC)
- MCFG_WD2010_IN_WF_CB(VCC)
- MCFG_WD2010_IN_TK000_CB(VCC)
- MCFG_WD2010_IN_SC_CB(VCC)
+ WD2010(config, m_hdc, 5'000'000); // XXX clock?
+ m_hdc->in_drdy_callback().set_constant(1);
+ m_hdc->in_index_callback().set_constant(1);
+ m_hdc->in_wf_callback().set_constant(1);
+ m_hdc->in_tk000_callback().set_constant(1);
+ m_hdc->in_sc_callback().set_constant(1);
MCFG_HARDDISK_ADD("hard0")
MCFG_HARDDISK_ADD("hard1")
@@ -117,7 +115,7 @@ WRITE8_MEMBER(p1_hdc_device::p1_HDC_w)
p1_hdc_device::p1_hdc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: device_t(mconfig, P1_HDC, tag, owner, clock)
, device_isa8_card_interface(mconfig, *this)
- , m_hdc(*this, KM1809VG7_TAG)
+ , m_hdc(*this, "d17")
{
}
diff --git a/src/devices/bus/isa/wdxt_gen.cpp b/src/devices/bus/isa/wdxt_gen.cpp
index 244383a4cef..18778d5c092 100644
--- a/src/devices/bus/isa/wdxt_gen.cpp
+++ b/src/devices/bus/isa/wdxt_gen.cpp
@@ -53,8 +53,6 @@ Notes:
//**************************************************************************
#define WD1015_TAG "u6"
-#define WD11C00_17_TAG "u11"
-#define WD2010A_TAG "u7"
@@ -94,7 +92,7 @@ const tiny_rom_entry *wdxt_gen_device::device_rom_region() const
void wdxt_gen_device::wd1015_io(address_map &map)
{
- map(0x00, 0xff).rw(WD11C00_17_TAG, FUNC(wd11c00_17_device::read), FUNC(wd11c00_17_device::write));
+ map(0x00, 0xff).rw(m_host, FUNC(wd11c00_17_device::read), FUNC(wd11c00_17_device::write));
}
@@ -140,34 +138,35 @@ WRITE8_MEMBER( wdxt_gen_device::ram_w )
//-------------------------------------------------
MACHINE_CONFIG_START(wdxt_gen_device::device_add_mconfig)
- MCFG_DEVICE_ADD(WD1015_TAG, I8049, 5000000)
- MCFG_DEVICE_IO_MAP(wd1015_io)
- MCFG_MCS48_PORT_T0_IN_CB(READLINE(WD11C00_17_TAG, wd11c00_17_device, busy_r))
- MCFG_MCS48_PORT_T1_IN_CB(READLINE(*this, wdxt_gen_device, wd1015_t1_r))
- MCFG_MCS48_PORT_P1_IN_CB(READ8(*this, wdxt_gen_device, wd1015_p1_r))
- MCFG_MCS48_PORT_P1_OUT_CB(WRITE8(*this, wdxt_gen_device, wd1015_p1_w))
- MCFG_MCS48_PORT_P2_IN_CB(READ8(*this, wdxt_gen_device, wd1015_p2_r))
- MCFG_MCS48_PORT_P2_OUT_CB(WRITE8(*this, wdxt_gen_device, wd1015_p2_w))
-
- MCFG_DEVICE_ADD(WD11C00_17_TAG, WD11C00_17, 5000000)
- MCFG_WD11C00_17_OUT_IRQ5_CB(WRITELINE(*this, wdxt_gen_device, irq5_w))
- MCFG_WD11C00_17_OUT_DRQ3_CB(WRITELINE(*this, wdxt_gen_device, drq3_w))
- MCFG_WD11C00_17_OUT_MR_CB(WRITELINE(*this, wdxt_gen_device, mr_w))
- MCFG_WD11C00_17_OUT_RA3_CB(INPUTLINE(WD1015_TAG, MCS48_INPUT_IRQ))
- MCFG_WD11C00_17_IN_RD322_CB(READ8(*this, wdxt_gen_device, rd322_r))
- MCFG_WD11C00_17_IN_RAMCS_CB(READ8(*this, wdxt_gen_device, ram_r))
- MCFG_WD11C00_17_OUT_RAMWR_CB(WRITE8(*this, wdxt_gen_device, ram_w))
- MCFG_WD11C00_17_IN_CS1010_CB(READ8(WD2010A_TAG, wd2010_device, read))
- MCFG_WD11C00_17_OUT_CS1010_CB(WRITE8(WD2010A_TAG, wd2010_device, write))
- MCFG_DEVICE_ADD(WD2010A_TAG, WD2010, 5000000)
- MCFG_WD2010_OUT_BCR_CB(WRITELINE(WD11C00_17_TAG, wd11c00_17_device, clct_w))
- MCFG_WD2010_IN_BCS_CB(READ8(WD11C00_17_TAG, wd11c00_17_device, read))
- MCFG_WD2010_OUT_BCS_CB(WRITE8(WD11C00_17_TAG, wd11c00_17_device, write))
- MCFG_WD2010_IN_DRDY_CB(VCC)
- MCFG_WD2010_IN_INDEX_CB(VCC)
- MCFG_WD2010_IN_WF_CB(VCC)
- MCFG_WD2010_IN_TK000_CB(VCC)
- MCFG_WD2010_IN_SC_CB(VCC)
+ mcs48_cpu_device &cpu(I8049(config, m_maincpu, 5000000));
+ cpu.set_addrmap(AS_IO, &wdxt_gen_device::wd1015_io);
+ cpu.t0_in_cb().set(m_host, FUNC(wd11c00_17_device::busy_r));
+ cpu.t1_in_cb().set(FUNC(wdxt_gen_device::wd1015_t1_r));
+ cpu.p1_in_cb().set(FUNC(wdxt_gen_device::wd1015_p1_r));
+ cpu.p1_out_cb().set(FUNC(wdxt_gen_device::wd1015_p1_w));
+ cpu.p2_in_cb().set(FUNC(wdxt_gen_device::wd1015_p2_r));
+ cpu.p2_out_cb().set(FUNC(wdxt_gen_device::wd1015_p2_w));
+
+ WD11C00_17(config, m_host, 5000000);
+ m_host->out_irq5_callback().set(FUNC(wdxt_gen_device::irq5_w));
+ m_host->out_drq3_callback().set(FUNC(wdxt_gen_device::drq3_w));
+ m_host->out_mr_callback().set(FUNC(wdxt_gen_device::mr_w));
+ m_host->out_ra3_callback().set_inputline(m_maincpu, MCS48_INPUT_IRQ);
+ m_host->in_rd322_callback().set(FUNC(wdxt_gen_device::rd322_r));
+ m_host->in_ramcs_callback().set(FUNC(wdxt_gen_device::ram_r));
+ m_host->out_ramwr_callback().set(FUNC(wdxt_gen_device::ram_w));
+ m_host->in_cs1010_callback().set(m_hdc, FUNC(wd2010_device::read));
+ m_host->out_cs1010_callback().set(m_hdc, FUNC(wd2010_device::write));
+
+ WD2010(config, m_hdc, 5000000);
+ m_hdc->out_bcr_callback().set(m_host, FUNC(wd11c00_17_device::clct_w));
+ m_hdc->in_bcs_callback().set(m_host, FUNC(wd11c00_17_device::read));
+ m_hdc->out_bcs_callback().set(m_host, FUNC(wd11c00_17_device::write));
+ m_hdc->in_drdy_callback().set_constant(1);
+ m_hdc->in_index_callback().set_constant(1);
+ m_hdc->in_wf_callback().set_constant(1);
+ m_hdc->in_tk000_callback().set_constant(1);
+ m_hdc->in_sc_callback().set_constant(1);
MCFG_HARDDISK_ADD("hard0")
MCFG_HARDDISK_ADD("hard1")
@@ -186,8 +185,8 @@ wdxt_gen_device::wdxt_gen_device(const machine_config &mconfig, const char *tag,
: device_t(mconfig, ISA8_WDXT_GEN, tag, owner, clock)
, device_isa8_card_interface(mconfig, *this)
, m_maincpu(*this, WD1015_TAG)
- , m_host(*this, WD11C00_17_TAG)
- , m_hdc(*this, WD2010A_TAG)
+ , m_host(*this, "u11")
+ , m_hdc(*this, "u7")
{
}
diff --git a/src/devices/bus/kc/kc.h b/src/devices/bus/kc/kc.h
index 083f60e3a66..0689169c5ee 100644
--- a/src/devices/bus/kc/kc.h
+++ b/src/devices/bus/kc/kc.h
@@ -121,26 +121,26 @@ DECLARE_DEVICE_TYPE(KCCART_SLOT, kccart_slot_device)
***************************************************************************/
#define MCFG_KCEXP_SLOT_OUT_IRQ_CB(_devcb) \
- devcb = &downcast<kcexp_slot_device &>(*device).set_out_irq_callback(DEVCB_##_devcb);
+ downcast<kcexp_slot_device &>(*device).set_out_irq_callback(DEVCB_##_devcb);
#define MCFG_KCEXP_SLOT_OUT_NMI_CB(_devcb) \
- devcb = &downcast<kcexp_slot_device &>(*device).set_out_nmi_callback(DEVCB_##_devcb);
+ downcast<kcexp_slot_device &>(*device).set_out_nmi_callback(DEVCB_##_devcb);
#define MCFG_KCEXP_SLOT_OUT_HALT_CB(_devcb) \
- devcb = &downcast<kcexp_slot_device &>(*device).set_out_halt_callback(DEVCB_##_devcb);
+ downcast<kcexp_slot_device &>(*device).set_out_halt_callback(DEVCB_##_devcb);
#define MCFG_KCEXP_SLOT_NEXT_SLOT(_next_slot_tag) \
downcast<kcexp_slot_device &>(*device).set_next_slot(_next_slot_tag);
#define MCFG_KCCART_SLOT_OUT_IRQ_CB(_devcb) \
- devcb = &downcast<kccart_slot_device &>(*device).set_out_irq_callback(DEVCB_##_devcb);
+ downcast<kccart_slot_device &>(*device).set_out_irq_callback(DEVCB_##_devcb);
#define MCFG_KCCART_SLOT_OUT_NMI_CB(_devcb) \
- devcb = &downcast<kccart_slot_device &>(*device).set_out_nmi_callback(DEVCB_##_devcb);
+ downcast<kccart_slot_device &>(*device).set_out_nmi_callback(DEVCB_##_devcb);
#define MCFG_KCCART_SLOT_OUT_HALT_CB(_devcb) \
- devcb = &downcast<kccart_slot_device &>(*device).set_out_halt_callback(DEVCB_##_devcb);
+ downcast<kccart_slot_device &>(*device).set_out_halt_callback(DEVCB_##_devcb);
#define MCFG_KCCART_SLOT_NEXT_SLOT(_next_slot_tag) \
downcast<kccart_slot_device &>(*device).set_next_slot(_next_slot_tag);
diff --git a/src/devices/bus/lpci/i82371sb.h b/src/devices/bus/lpci/i82371sb.h
index a3904279614..0352b13e445 100644
--- a/src/devices/bus/lpci/i82371sb.h
+++ b/src/devices/bus/lpci/i82371sb.h
@@ -67,9 +67,9 @@ private:
DECLARE_DEVICE_TYPE(I82371SB, i82371sb_device)
#define MCFG_I82371SB_SMI_CB(_devcb) \
- devcb = &downcast<i82371sb_device &>(*device).set_smi_callback(DEVCB_##_devcb);
+ downcast<i82371sb_device &>(*device).set_smi_callback(DEVCB_##_devcb);
#define MCFG_I82371SB_BOOT_STATE_HOOK(_devcb) \
- devcb = &downcast<i82371sb_device &>(*device).set_boot_state_hook(DEVCB_##_devcb);
+ downcast<i82371sb_device &>(*device).set_boot_state_hook(DEVCB_##_devcb);
#endif // MAME_BUS_LPCI_I82371SB_H
diff --git a/src/devices/bus/lpci/southbridge.cpp b/src/devices/bus/lpci/southbridge.cpp
index 27eead94a7b..25b37e3a298 100644
--- a/src/devices/bus/lpci/southbridge.cpp
+++ b/src/devices/bus/lpci/southbridge.cpp
@@ -69,12 +69,12 @@ MACHINE_CONFIG_START(southbridge_device::device_add_mconfig)
MCFG_DEVICE_ADD("pic8259_master", PIC8259, 0)
MCFG_PIC8259_OUT_INT_CB(INPUTLINE(":maincpu", 0))
- MCFG_PIC8259_IN_SP_CB(VCC)
+ MCFG_PIC8259_IN_SP_CB(CONSTANT(1))
MCFG_PIC8259_CASCADE_ACK_CB(READ8(*this, southbridge_device, get_slave_ack))
MCFG_DEVICE_ADD("pic8259_slave", PIC8259, 0)
MCFG_PIC8259_OUT_INT_CB(WRITELINE("pic8259_master", pic8259_device, ir2_w))
- MCFG_PIC8259_IN_SP_CB(GND)
+ MCFG_PIC8259_IN_SP_CB(CONSTANT(0))
MCFG_BUS_MASTER_IDE_CONTROLLER_ADD("ide", ata_devices, "hdd", nullptr, false)
MCFG_ATA_INTERFACE_IRQ_HANDLER(WRITELINE("pic8259_slave", pic8259_device, ir6_w))
diff --git a/src/devices/bus/midi/midi.h b/src/devices/bus/midi/midi.h
index 114c6bf948b..5ca8bb92e2c 100644
--- a/src/devices/bus/midi/midi.h
+++ b/src/devices/bus/midi/midi.h
@@ -11,7 +11,7 @@
MCFG_DEVICE_SLOT_INTERFACE(_slot_intf, _def_slot, false)
#define MCFG_MIDI_RX_HANDLER(_devcb) \
- devcb = &downcast<midi_port_device &>(*device).set_rx_handler(DEVCB_##_devcb);
+ downcast<midi_port_device &>(*device).set_rx_handler(DEVCB_##_devcb);
class device_midi_port_interface;
diff --git a/src/devices/bus/msx_slot/cartridge.h b/src/devices/bus/msx_slot/cartridge.h
index ff8fbb96fb3..be0856e8d82 100644
--- a/src/devices/bus/msx_slot/cartridge.h
+++ b/src/devices/bus/msx_slot/cartridge.h
@@ -17,13 +17,13 @@ DECLARE_DEVICE_TYPE(MSX_SLOT_YAMAHA_EXPANSION, msx_slot_yamaha_expansion_device)
#define MCFG_MSX_SLOT_CARTRIDGE_ADD(_tag, _devcb) \
MCFG_DEVICE_ADD(_tag, MSX_SLOT_CARTRIDGE, 0) \
MCFG_DEVICE_SLOT_INTERFACE(msx_cart, nullptr, false) \
- devcb = &downcast<msx_slot_cartridge_device &>(*device).set_irq_handler(DEVCB_##_devcb);
+ downcast<msx_slot_cartridge_device &>(*device).set_irq_handler(DEVCB_##_devcb);
#define MCFG_MSX_SLOT_YAMAHA_EXPANSION_ADD(_tag, _devcb, _default) \
MCFG_DEVICE_ADD(_tag, MSX_SLOT_YAMAHA_EXPANSION, 0) \
MCFG_DEVICE_SLOT_INTERFACE(msx_yamaha_60pin, _default, false) \
- devcb = &downcast<msx_slot_cartridge_device &>(*device).set_irq_handler(DEVCB_##_devcb);
+ downcast<msx_slot_cartridge_device &>(*device).set_irq_handler(DEVCB_##_devcb);
class msx_slot_cartridge_device : public device_t
diff --git a/src/devices/bus/nasbus/nasbus.h b/src/devices/bus/nasbus/nasbus.h
index 477a737e7f9..8a0a1d3775f 100644
--- a/src/devices/bus/nasbus/nasbus.h
+++ b/src/devices/bus/nasbus/nasbus.h
@@ -114,7 +114,7 @@
downcast<nasbus_slot_device &>(*device).set_nasbus_slot(this, NASBUS_TAG);
#define MCFG_NASBUS_RAM_DISABLE_HANDLER(_devcb) \
- devcb = &downcast<nasbus_device &>(*device).set_ram_disable_handler(DEVCB_##_devcb);
+ downcast<nasbus_device &>(*device).set_ram_disable_handler(DEVCB_##_devcb);
//**************************************************************************
diff --git a/src/devices/bus/newbrain/eim.cpp b/src/devices/bus/newbrain/eim.cpp
index 65994afe2ca..b778b092694 100644
--- a/src/devices/bus/newbrain/eim.cpp
+++ b/src/devices/bus/newbrain/eim.cpp
@@ -78,14 +78,14 @@ MACHINE_CONFIG_START(newbrain_eim_device::device_add_mconfig)
MCFG_DEVICE_ADD(ADC0809_TAG, ADC0809, 500000)
MCFG_ADC0808_EOC_CB(WRITELINE(*this, newbrain_eim_device, adc_eoc_w))
- MCFG_ADC0808_IN0_CB(GND)
- MCFG_ADC0808_IN1_CB(GND)
- MCFG_ADC0808_IN2_CB(GND)
- MCFG_ADC0808_IN3_CB(GND)
- MCFG_ADC0808_IN4_CB(GND)
- MCFG_ADC0808_IN5_CB(GND)
- MCFG_ADC0808_IN6_CB(GND)
- MCFG_ADC0808_IN7_CB(GND)
+ MCFG_ADC0808_IN0_CB(CONSTANT(0))
+ MCFG_ADC0808_IN1_CB(CONSTANT(0))
+ MCFG_ADC0808_IN2_CB(CONSTANT(0))
+ MCFG_ADC0808_IN3_CB(CONSTANT(0))
+ MCFG_ADC0808_IN4_CB(CONSTANT(0))
+ MCFG_ADC0808_IN5_CB(CONSTANT(0))
+ MCFG_ADC0808_IN6_CB(CONSTANT(0))
+ MCFG_ADC0808_IN7_CB(CONSTANT(0))
MCFG_DEVICE_ADD(MC6850_TAG, ACIA6850, 0)
MCFG_ACIA6850_IRQ_HANDLER(WRITELINE(*this, newbrain_eim_device, acia_interrupt))
diff --git a/src/devices/bus/nubus/nubus.h b/src/devices/bus/nubus/nubus.h
index 011a87a861d..37c5700df6e 100644
--- a/src/devices/bus/nubus/nubus.h
+++ b/src/devices/bus/nubus/nubus.h
@@ -23,22 +23,22 @@
downcast<nubus_device &>(*device).set_cputag(_cputag);
#define MCFG_NUBUS_OUT_IRQ9_CB(_devcb) \
- devcb = &downcast<nubus_device &>(*device).set_out_irq9_callback(DEVCB_##_devcb);
+ downcast<nubus_device &>(*device).set_out_irq9_callback(DEVCB_##_devcb);
#define MCFG_NUBUS_OUT_IRQA_CB(_devcb) \
- devcb = &downcast<nubus_device &>(*device).set_out_irqa_callback(DEVCB_##_devcb);
+ downcast<nubus_device &>(*device).set_out_irqa_callback(DEVCB_##_devcb);
#define MCFG_NUBUS_OUT_IRQB_CB(_devcb) \
- devcb = &downcast<nubus_device &>(*device).set_out_irqb_callback(DEVCB_##_devcb);
+ downcast<nubus_device &>(*device).set_out_irqb_callback(DEVCB_##_devcb);
#define MCFG_NUBUS_OUT_IRQC_CB(_devcb) \
- devcb = &downcast<nubus_device &>(*device).set_out_irqc_callback(DEVCB_##_devcb);
+ downcast<nubus_device &>(*device).set_out_irqc_callback(DEVCB_##_devcb);
#define MCFG_NUBUS_OUT_IRQD_CB(_devcb) \
- devcb = &downcast<nubus_device &>(*device).set_out_irqd_callback(DEVCB_##_devcb);
+ downcast<nubus_device &>(*device).set_out_irqd_callback(DEVCB_##_devcb);
#define MCFG_NUBUS_OUT_IRQE_CB(_devcb) \
- devcb = &downcast<nubus_device &>(*device).set_out_irqe_callback(DEVCB_##_devcb);
+ downcast<nubus_device &>(*device).set_out_irqe_callback(DEVCB_##_devcb);
#define MCFG_NUBUS_SLOT_ADD(_nbtag, _tag, _slot_intf, _def_slot) \
MCFG_DEVICE_ADD(_tag, NUBUS_SLOT, 0) \
diff --git a/src/devices/bus/oricext/oricext.h b/src/devices/bus/oricext/oricext.h
index febcc9384e0..0daf45dc612 100644
--- a/src/devices/bus/oricext/oricext.h
+++ b/src/devices/bus/oricext/oricext.h
@@ -17,7 +17,7 @@
MCFG_DEVICE_ADD(_tag, ORICEXT_CONNECTOR, 0) \
MCFG_DEVICE_SLOT_INTERFACE(_slot_intf, _def_slot, false) \
downcast<oricext_connector *>(device)->set_cputag(_cputag); \
- devcb = &downcast<oricext_connector &>(*device).set_irq_handler(DEVCB_##_irq);
+ downcast<oricext_connector &>(*device).set_irq_handler(DEVCB_##_irq);
class oricext_device;
diff --git a/src/devices/bus/pc1512/mouse.h b/src/devices/bus/pc1512/mouse.h
index ca98296f53d..db432598a98 100644
--- a/src/devices/bus/pc1512/mouse.h
+++ b/src/devices/bus/pc1512/mouse.h
@@ -37,16 +37,16 @@
MCFG_DEVICE_SLOT_INTERFACE(_slot_intf, _def_slot, false)
#define MCFG_PC1512_MOUSE_PORT_X_CB(_write) \
- devcb = &downcast<pc1512_mouse_port_device &>(*device).set_x_wr_callback(DEVCB_##_write);
+ downcast<pc1512_mouse_port_device &>(*device).set_x_wr_callback(DEVCB_##_write);
#define MCFG_PC1512_MOUSE_PORT_Y_CB(_write) \
- devcb = &downcast<pc1512_mouse_port_device &>(*device).set_y_wr_callback(DEVCB_##_write);
+ downcast<pc1512_mouse_port_device &>(*device).set_y_wr_callback(DEVCB_##_write);
#define MCFG_PC1512_MOUSE_PORT_M1_CB(_write) \
- devcb = &downcast<pc1512_mouse_port_device &>(*device).set_m1_wr_callback(DEVCB_##_write);
+ downcast<pc1512_mouse_port_device &>(*device).set_m1_wr_callback(DEVCB_##_write);
#define MCFG_PC1512_MOUSE_PORT_M2_CB(_write) \
- devcb = &downcast<pc1512_mouse_port_device &>(*device).set_m2_wr_callback(DEVCB_##_write);
+ downcast<pc1512_mouse_port_device &>(*device).set_m2_wr_callback(DEVCB_##_write);
diff --git a/src/devices/bus/pc_kbd/pc_kbdc.h b/src/devices/bus/pc_kbd/pc_kbdc.h
index 75a17da2d19..4e20fc68a1c 100644
--- a/src/devices/bus/pc_kbd/pc_kbdc.h
+++ b/src/devices/bus/pc_kbd/pc_kbdc.h
@@ -21,10 +21,10 @@ set the data line and then set the clock line.
//**************************************************************************
#define MCFG_PC_KBDC_OUT_CLOCK_CB(_devcb) \
- devcb = &downcast<pc_kbdc_device &>(*device).set_out_clock_callback(DEVCB_##_devcb);
+ downcast<pc_kbdc_device &>(*device).set_out_clock_callback(DEVCB_##_devcb);
#define MCFG_PC_KBDC_OUT_DATA_CB(_devcb) \
- devcb = &downcast<pc_kbdc_device &>(*device).set_out_data_callback(DEVCB_##_devcb);
+ downcast<pc_kbdc_device &>(*device).set_out_data_callback(DEVCB_##_devcb);
#define MCFG_PC_KBDC_SLOT_ADD(_kbdc_tag, _tag, _slot_intf, _def_slot) \
MCFG_DEVICE_ADD(_tag, PC_KBDC_SLOT, 0 ) \
diff --git a/src/devices/bus/pet/cass.h b/src/devices/bus/pet/cass.h
index c843f58282b..29d64278a3b 100644
--- a/src/devices/bus/pet/cass.h
+++ b/src/devices/bus/pet/cass.h
@@ -39,7 +39,7 @@
#define MCFG_PET_DATASSETTE_PORT_ADD(_tag, _slot_intf, _def_slot, _devcb) \
MCFG_DEVICE_ADD(_tag, PET_DATASSETTE_PORT, 0) \
MCFG_DEVICE_SLOT_INTERFACE(_slot_intf, _def_slot, false) \
- devcb = &downcast<pet_datassette_port_device &>(*device).set_read_handler(DEVCB_##_devcb);
+ downcast<pet_datassette_port_device &>(*device).set_read_handler(DEVCB_##_devcb);
diff --git a/src/devices/bus/pet/user.h b/src/devices/bus/pet/user.h
index 651e121a2fa..71e1c19e799 100644
--- a/src/devices/bus/pet/user.h
+++ b/src/devices/bus/pet/user.h
@@ -28,61 +28,61 @@
#define MCFG_PET_USER_PORT_2_HANDLER(_devcb) \
- devcb = &downcast<pet_user_port_device &>(*device).set_2_handler(DEVCB_##_devcb);
+ downcast<pet_user_port_device &>(*device).set_2_handler(DEVCB_##_devcb);
#define MCFG_PET_USER_PORT_3_HANDLER(_devcb) \
- devcb = &downcast<pet_user_port_device &>(*device).set_3_handler(DEVCB_##_devcb);
+ downcast<pet_user_port_device &>(*device).set_3_handler(DEVCB_##_devcb);
#define MCFG_PET_USER_PORT_4_HANDLER(_devcb) \
- devcb = &downcast<pet_user_port_device &>(*device).set_4_handler(DEVCB_##_devcb);
+ downcast<pet_user_port_device &>(*device).set_4_handler(DEVCB_##_devcb);
#define MCFG_PET_USER_PORT_5_HANDLER(_devcb) \
- devcb = &downcast<pet_user_port_device &>(*device).set_5_handler(DEVCB_##_devcb);
+ downcast<pet_user_port_device &>(*device).set_5_handler(DEVCB_##_devcb);
#define MCFG_PET_USER_PORT_6_HANDLER(_devcb) \
- devcb = &downcast<pet_user_port_device &>(*device).set_6_handler(DEVCB_##_devcb);
+ downcast<pet_user_port_device &>(*device).set_6_handler(DEVCB_##_devcb);
#define MCFG_PET_USER_PORT_7_HANDLER(_devcb) \
- devcb = &downcast<pet_user_port_device &>(*device).set_7_handler(DEVCB_##_devcb);
+ downcast<pet_user_port_device &>(*device).set_7_handler(DEVCB_##_devcb);
#define MCFG_PET_USER_PORT_8_HANDLER(_devcb) \
- devcb = &downcast<pet_user_port_device &>(*device).set_8_handler(DEVCB_##_devcb);
+ downcast<pet_user_port_device &>(*device).set_8_handler(DEVCB_##_devcb);
#define MCFG_PET_USER_PORT_9_HANDLER(_devcb) \
- devcb = &downcast<pet_user_port_device &>(*device).set_9_handler(DEVCB_##_devcb);
+ downcast<pet_user_port_device &>(*device).set_9_handler(DEVCB_##_devcb);
#define MCFG_PET_USER_PORT_10_HANDLER(_devcb) \
- devcb = &downcast<pet_user_port_device &>(*device).set_10_handler(DEVCB_##_devcb);
+ downcast<pet_user_port_device &>(*device).set_10_handler(DEVCB_##_devcb);
#define MCFG_PET_USER_PORT_B_HANDLER(_devcb) \
- devcb = &downcast<pet_user_port_device &>(*device).set_b_handler(DEVCB_##_devcb);
+ downcast<pet_user_port_device &>(*device).set_b_handler(DEVCB_##_devcb);
#define MCFG_PET_USER_PORT_C_HANDLER(_devcb) \
- devcb = &downcast<pet_user_port_device &>(*device).set_c_handler(DEVCB_##_devcb);
+ downcast<pet_user_port_device &>(*device).set_c_handler(DEVCB_##_devcb);
#define MCFG_PET_USER_PORT_D_HANDLER(_devcb) \
- devcb = &downcast<pet_user_port_device &>(*device).set_d_handler(DEVCB_##_devcb);
+ downcast<pet_user_port_device &>(*device).set_d_handler(DEVCB_##_devcb);
#define MCFG_PET_USER_PORT_E_HANDLER(_devcb) \
- devcb = &downcast<pet_user_port_device &>(*device).set_e_handler(DEVCB_##_devcb);
+ downcast<pet_user_port_device &>(*device).set_e_handler(DEVCB_##_devcb);
#define MCFG_PET_USER_PORT_F_HANDLER(_devcb) \
- devcb = &downcast<pet_user_port_device &>(*device).set_f_handler(DEVCB_##_devcb);
+ downcast<pet_user_port_device &>(*device).set_f_handler(DEVCB_##_devcb);
#define MCFG_PET_USER_PORT_H_HANDLER(_devcb) \
- devcb = &downcast<pet_user_port_device &>(*device).set_h_handler(DEVCB_##_devcb);
+ downcast<pet_user_port_device &>(*device).set_h_handler(DEVCB_##_devcb);
#define MCFG_PET_USER_PORT_J_HANDLER(_devcb) \
- devcb = &downcast<pet_user_port_device &>(*device).set_j_handler(DEVCB_##_devcb);
+ downcast<pet_user_port_device &>(*device).set_j_handler(DEVCB_##_devcb);
#define MCFG_PET_USER_PORT_K_HANDLER(_devcb) \
- devcb = &downcast<pet_user_port_device &>(*device).set_k_handler(DEVCB_##_devcb);
+ downcast<pet_user_port_device &>(*device).set_k_handler(DEVCB_##_devcb);
#define MCFG_PET_USER_PORT_L_HANDLER(_devcb) \
- devcb = &downcast<pet_user_port_device &>(*device).set_l_handler(DEVCB_##_devcb);
+ downcast<pet_user_port_device &>(*device).set_l_handler(DEVCB_##_devcb);
#define MCFG_PET_USER_PORT_M_HANDLER(_devcb) \
- devcb = &downcast<pet_user_port_device &>(*device).set_m_handler(DEVCB_##_devcb);
+ downcast<pet_user_port_device &>(*device).set_m_handler(DEVCB_##_devcb);
DECLARE_DEVICE_TYPE(PET_USER_PORT, pet_user_port_device)
@@ -125,6 +125,25 @@ public:
template <class Object> devcb_base &set_k_handler(Object &&cb) { return m_k_handler.set_callback(std::forward<Object>(cb)); }
template <class Object> devcb_base &set_l_handler(Object &&cb) { return m_l_handler.set_callback(std::forward<Object>(cb)); }
template <class Object> devcb_base &set_m_handler(Object &&cb) { return m_m_handler.set_callback(std::forward<Object>(cb)); }
+ auto p2_handler() { return m_2_handler.bind(); }
+ auto p3_handler() { return m_3_handler.bind(); }
+ auto p4_handler() { return m_4_handler.bind(); }
+ auto p5_handler() { return m_5_handler.bind(); }
+ auto p6_handler() { return m_6_handler.bind(); }
+ auto p7_handler() { return m_7_handler.bind(); }
+ auto p8_handler() { return m_8_handler.bind(); }
+ auto p9_handler() { return m_9_handler.bind(); }
+ auto p10_handler() { return m_10_handler.bind(); }
+ auto pb_handler() { return m_b_handler.bind(); }
+ auto pc_handler() { return m_c_handler.bind(); }
+ auto pd_handler() { return m_d_handler.bind(); }
+ auto pe_handler() { return m_e_handler.bind(); }
+ auto pf_handler() { return m_f_handler.bind(); }
+ auto ph_handler() { return m_h_handler.bind(); }
+ auto pj_handler() { return m_j_handler.bind(); }
+ auto pk_handler() { return m_k_handler.bind(); }
+ auto pl_handler() { return m_l_handler.bind(); }
+ auto pm_handler() { return m_m_handler.bind(); }
DECLARE_WRITE_LINE_MEMBER( write_2 );
DECLARE_WRITE_LINE_MEMBER( write_3 );
diff --git a/src/devices/bus/plus4/exp.h b/src/devices/bus/plus4/exp.h
index 09fc78e3b23..35dc291fa52 100644
--- a/src/devices/bus/plus4/exp.h
+++ b/src/devices/bus/plus4/exp.h
@@ -67,16 +67,16 @@
#define MCFG_PLUS4_EXPANSION_SLOT_IRQ_CALLBACK(_write) \
- devcb = &downcast<plus4_expansion_slot_device &>(*device).set_irq_wr_callback(DEVCB_##_write);
+ downcast<plus4_expansion_slot_device &>(*device).set_irq_wr_callback(DEVCB_##_write);
#define MCFG_PLUS4_EXPANSION_SLOT_CD_INPUT_CALLBACK(_read) \
- devcb = &downcast<plus4_expansion_slot_device &>(*device).set_cd_rd_callback(DEVCB_##_read);
+ downcast<plus4_expansion_slot_device &>(*device).set_cd_rd_callback(DEVCB_##_read);
#define MCFG_PLUS4_EXPANSION_SLOT_CD_OUTPUT_CALLBACK(_write) \
- devcb = &downcast<plus4_expansion_slot_device &>(*device).set_cd_wr_callback(DEVCB_##_write);
+ downcast<plus4_expansion_slot_device &>(*device).set_cd_wr_callback(DEVCB_##_write);
#define MCFG_PLUS4_EXPANSION_SLOT_AEC_CALLBACK(_write) \
- devcb = &downcast<plus4_expansion_slot_device &>(*device).set_aec_wr_callback(DEVCB_##_write);
+ downcast<plus4_expansion_slot_device &>(*device).set_aec_wr_callback(DEVCB_##_write);
diff --git a/src/devices/bus/pofo/exp.h b/src/devices/bus/pofo/exp.h
index 08db6ef24ee..ab0685d28ca 100644
--- a/src/devices/bus/pofo/exp.h
+++ b/src/devices/bus/pofo/exp.h
@@ -64,13 +64,13 @@
MCFG_DEVICE_SLOT_INTERFACE(_slot_intf, _def_slot, false)
#define MCFG_PORTFOLIO_EXPANSION_SLOT_EINT_CALLBACK(_write) \
- devcb = &downcast<portfolio_expansion_slot_device &>(*device).set_eint_wr_callback(DEVCB_##_write);
+ downcast<portfolio_expansion_slot_device &>(*device).set_eint_wr_callback(DEVCB_##_write);
#define MCFG_PORTFOLIO_EXPANSION_SLOT_NMIO_CALLBACK(_write) \
- devcb = &downcast<portfolio_expansion_slot_device &>(*device).set_nmio_wr_callback(DEVCB_##_write);
+ downcast<portfolio_expansion_slot_device &>(*device).set_nmio_wr_callback(DEVCB_##_write);
#define MCFG_PORTFOLIO_EXPANSION_SLOT_WAKE_CALLBACK(_write) \
- devcb = &downcast<portfolio_expansion_slot_device &>(*device).set_wake_wr_callback(DEVCB_##_write);
+ downcast<portfolio_expansion_slot_device &>(*device).set_wake_wr_callback(DEVCB_##_write);
diff --git a/src/devices/bus/psi_kbd/psi_kbd.h b/src/devices/bus/psi_kbd/psi_kbd.h
index 1b35adca1c6..8e62b1df17b 100644
--- a/src/devices/bus/psi_kbd/psi_kbd.h
+++ b/src/devices/bus/psi_kbd/psi_kbd.h
@@ -40,10 +40,10 @@
MCFG_DEVICE_SLOT_INTERFACE(psi_keyboard_devices, _def_slot, false)
#define MCFG_PSI_KEYBOARD_RX_HANDLER(_devcb) \
- devcb = &downcast<psi_keyboard_bus_device &>(*device).set_rx_handler(DEVCB_##_devcb);
+ downcast<psi_keyboard_bus_device &>(*device).set_rx_handler(DEVCB_##_devcb);
#define MCFG_PSI_KEYBOARD_KEY_STROBE_HANDLER(_devcb) \
- devcb = &downcast<psi_keyboard_bus_device &>(*device).set_key_strobe_handler(DEVCB_##_devcb);
+ downcast<psi_keyboard_bus_device &>(*device).set_key_strobe_handler(DEVCB_##_devcb);
//**************************************************************************
diff --git a/src/devices/bus/psx/ctlrport.h b/src/devices/bus/psx/ctlrport.h
index 29c8f38b604..ba9191b239d 100644
--- a/src/devices/bus/psx/ctlrport.h
+++ b/src/devices/bus/psx/ctlrport.h
@@ -82,10 +82,10 @@ private:
};
#define MCFG_PSX_CONTROLLER_PORTS_DSR_HANDLER(_devcb) \
- devcb = &downcast<psxcontrollerports_device &>(*device).set_dsr_handler(DEVCB_##_devcb);
+ downcast<psxcontrollerports_device &>(*device).set_dsr_handler(DEVCB_##_devcb);
#define MCFG_PSX_CONTROLLER_PORTS_RXD_HANDLER(_devcb) \
- devcb = &downcast<psxcontrollerports_device &>(*device).set_rxd_handler(DEVCB_##_devcb);
+ downcast<psxcontrollerports_device &>(*device).set_rxd_handler(DEVCB_##_devcb);
class psxcontrollerports_device : public device_t
{
diff --git a/src/devices/bus/ql/exp.h b/src/devices/bus/ql/exp.h
index 9f9c6cb22f3..ed5febc4854 100644
--- a/src/devices/bus/ql/exp.h
+++ b/src/devices/bus/ql/exp.h
@@ -53,16 +53,16 @@
//**************************************************************************
#define MCFG_QL_EXPANSION_SLOT_IPL0L_CALLBACK(_write) \
- devcb = &downcast<ql_expansion_slot_device &>(*device).set_ipl0l_wr_callback(DEVCB_##_write);
+ downcast<ql_expansion_slot_device &>(*device).set_ipl0l_wr_callback(DEVCB_##_write);
#define MCFG_QL_EXPANSION_SLOT_IPL1L_CALLBACK(_write) \
- devcb = &downcast<ql_expansion_slot_device &>(*device).set_ipl1l_wr_callback(DEVCB_##_write);
+ downcast<ql_expansion_slot_device &>(*device).set_ipl1l_wr_callback(DEVCB_##_write);
#define MCFG_QL_EXPANSION_SLOT_BERRL_CALLBACK(_write) \
- devcb = &downcast<ql_expansion_slot_device &>(*device).set_berrl_wr_callback(DEVCB_##_write);
+ downcast<ql_expansion_slot_device &>(*device).set_berrl_wr_callback(DEVCB_##_write);
#define MCFG_QL_EXPANSION_SLOT_EXTINTL_CALLBACK(_write) \
- devcb = &downcast<ql_expansion_slot_device &>(*device).set_extintl_wr_callback(DEVCB_##_write);
+ downcast<ql_expansion_slot_device &>(*device).set_extintl_wr_callback(DEVCB_##_write);
diff --git a/src/devices/bus/rs232/rs232.h b/src/devices/bus/rs232/rs232.h
index c4db0af2313..b58f876cb48 100644
--- a/src/devices/bus/rs232/rs232.h
+++ b/src/devices/bus/rs232/rs232.h
@@ -9,28 +9,28 @@
#define MCFG_RS232_RXD_HANDLER(_devcb) \
- devcb = &downcast<rs232_port_device &>(*device).set_rxd_handler(DEVCB_##_devcb);
+ downcast<rs232_port_device &>(*device).set_rxd_handler(DEVCB_##_devcb);
#define MCFG_RS232_DCD_HANDLER(_devcb) \
- devcb = &downcast<rs232_port_device &>(*device).set_dcd_handler(DEVCB_##_devcb);
+ downcast<rs232_port_device &>(*device).set_dcd_handler(DEVCB_##_devcb);
#define MCFG_RS232_DSR_HANDLER(_devcb) \
- devcb = &downcast<rs232_port_device &>(*device).set_dsr_handler(DEVCB_##_devcb);
+ downcast<rs232_port_device &>(*device).set_dsr_handler(DEVCB_##_devcb);
#define MCFG_RS232_RI_HANDLER(_devcb) \
- devcb = &downcast<rs232_port_device &>(*device).set_ri_handler(DEVCB_##_devcb);
+ downcast<rs232_port_device &>(*device).set_ri_handler(DEVCB_##_devcb);
#define MCFG_RS232_SI_HANDLER(_devcb) \
- devcb = &downcast<rs232_port_device &>(*device).set_si_handler(DEVCB_##_devcb);
+ downcast<rs232_port_device &>(*device).set_si_handler(DEVCB_##_devcb);
#define MCFG_RS232_CTS_HANDLER(_devcb) \
- devcb = &downcast<rs232_port_device &>(*device).set_cts_handler(DEVCB_##_devcb);
+ downcast<rs232_port_device &>(*device).set_cts_handler(DEVCB_##_devcb);
#define MCFG_RS232_RXC_HANDLER(_devcb) \
- devcb = &downcast<rs232_port_device &>(*device).set_rxc_handler(DEVCB_##_devcb);
+ downcast<rs232_port_device &>(*device).set_rxc_handler(DEVCB_##_devcb);
#define MCFG_RS232_TXC_HANDLER(_devcb) \
- devcb = &downcast<rs232_port_device &>(*device).set_txc_handler(DEVCB_##_devcb);
+ downcast<rs232_port_device &>(*device).set_txc_handler(DEVCB_##_devcb);
#define RS232_BAUD_110 (0x00)
#define RS232_BAUD_150 (0x01)
@@ -143,6 +143,14 @@ public:
template <class Object> devcb_base &set_cts_handler(Object &&cb) { return m_cts_handler.set_callback(std::forward<Object>(cb)); }
template <class Object> devcb_base &set_rxc_handler(Object &&cb) { return m_rxc_handler.set_callback(std::forward<Object>(cb)); }
template <class Object> devcb_base &set_txc_handler(Object &&cb) { return m_txc_handler.set_callback(std::forward<Object>(cb)); }
+ auto rxd_handler() { return m_rxd_handler.bind(); }
+ auto dcd_handler() { return m_dcd_handler.bind(); }
+ auto dsr_handler() { return m_dsr_handler.bind(); }
+ auto ri_handler() { return m_ri_handler.bind(); }
+ auto si_handler() { return m_si_handler.bind(); }
+ auto cts_handler() { return m_cts_handler.bind(); }
+ auto rxc_handler() { return m_rxc_handler.bind(); }
+ auto txc_handler() { return m_txc_handler.bind(); }
DECLARE_WRITE_LINE_MEMBER( write_txd );
DECLARE_WRITE_LINE_MEMBER( write_dtr );
diff --git a/src/devices/bus/s100/s100.h b/src/devices/bus/s100/s100.h
index 99fe0891261..139839a7172 100644
--- a/src/devices/bus/s100/s100.h
+++ b/src/devices/bus/s100/s100.h
@@ -77,55 +77,55 @@
#define MCFG_S100_IRQ_CALLBACK(_write) \
- devcb = &downcast<s100_bus_device &>(*device).set_irq_wr_callback(DEVCB_##_write);
+ downcast<s100_bus_device &>(*device).set_irq_wr_callback(DEVCB_##_write);
#define MCFG_S100_NMI_CALLBACK(_write) \
- devcb = &downcast<s100_bus_device &>(*device).set_nmi_wr_callback(DEVCB_##_write);
+ downcast<s100_bus_device &>(*device).set_nmi_wr_callback(DEVCB_##_write);
#define MCFG_S100_VI0_CALLBACK(_write) \
- devcb = &downcast<s100_bus_device &>(*device).set_vi0_wr_callback(DEVCB_##_write);
+ downcast<s100_bus_device &>(*device).set_vi0_wr_callback(DEVCB_##_write);
#define MCFG_S100_VI1_CALLBACK(_write) \
- devcb = &downcast<s100_bus_device &>(*device).set_vi1_wr_callback(DEVCB_##_write);
+ downcast<s100_bus_device &>(*device).set_vi1_wr_callback(DEVCB_##_write);
#define MCFG_S100_VI2_CALLBACK(_write) \
- devcb = &downcast<s100_bus_device &>(*device).set_vi2_wr_callback(DEVCB_##_write);
+ downcast<s100_bus_device &>(*device).set_vi2_wr_callback(DEVCB_##_write);
#define MCFG_S100_VI3_CALLBACK(_write) \
- devcb = &downcast<s100_bus_device &>(*device).set_vi3_wr_callback(DEVCB_##_write);
+ downcast<s100_bus_device &>(*device).set_vi3_wr_callback(DEVCB_##_write);
#define MCFG_S100_VI4_CALLBACK(_write) \
- devcb = &downcast<s100_bus_device &>(*device).set_vi4_wr_callback(DEVCB_##_write);
+ downcast<s100_bus_device &>(*device).set_vi4_wr_callback(DEVCB_##_write);
#define MCFG_S100_VI5_CALLBACK(_write) \
- devcb = &downcast<s100_bus_device &>(*device).set_vi5_wr_callback(DEVCB_##_write);
+ downcast<s100_bus_device &>(*device).set_vi5_wr_callback(DEVCB_##_write);
#define MCFG_S100_VI6_CALLBACK(_write) \
- devcb = &downcast<s100_bus_device &>(*device).set_vi6_wr_callback(DEVCB_##_write);
+ downcast<s100_bus_device &>(*device).set_vi6_wr_callback(DEVCB_##_write);
#define MCFG_S100_VI7_CALLBACK(_write) \
- devcb = &downcast<s100_bus_device &>(*device).set_vi7_wr_callback(DEVCB_##_write);
+ downcast<s100_bus_device &>(*device).set_vi7_wr_callback(DEVCB_##_write);
#define MCFG_S100_DMA0_CALLBACK(_write) \
- devcb = &downcast<s100_bus_device &>(*device).set_dma0_wr_callback(DEVCB_##_write);
+ downcast<s100_bus_device &>(*device).set_dma0_wr_callback(DEVCB_##_write);
#define MCFG_S100_DMA1_CALLBACK(_write) \
- devcb = &downcast<s100_bus_device &>(*device).set_dma1_wr_callback(DEVCB_##_write);
+ downcast<s100_bus_device &>(*device).set_dma1_wr_callback(DEVCB_##_write);
#define MCFG_S100_DMA2_CALLBACK(_write) \
- devcb = &downcast<s100_bus_device &>(*device).set_dma2_wr_callback(DEVCB_##_write);
+ downcast<s100_bus_device &>(*device).set_dma2_wr_callback(DEVCB_##_write);
#define MCFG_S100_DMA3_CALLBACK(_write) \
- devcb = &downcast<s100_bus_device &>(*device).set_dma3_wr_callback(DEVCB_##_write);
+ downcast<s100_bus_device &>(*device).set_dma3_wr_callback(DEVCB_##_write);
#define MCFG_S100_RDY_CALLBACK(_write) \
- devcb = &downcast<s100_bus_device &>(*device).set_rdy_wr_callback(DEVCB_##_write);
+ downcast<s100_bus_device &>(*device).set_rdy_wr_callback(DEVCB_##_write);
#define MCFG_S100_HOLD_CALLBACK(_write) \
- devcb = &downcast<s100_bus_device &>(*device).set_hold_wr_callback(DEVCB_##_write);
+ downcast<s100_bus_device &>(*device).set_hold_wr_callback(DEVCB_##_write);
#define MCFG_S100_ERROR_CALLBACK(_write) \
- devcb = &downcast<s100_bus_device &>(*device).set_error_wr_callback(DEVCB_##_write);
+ downcast<s100_bus_device &>(*device).set_error_wr_callback(DEVCB_##_write);
diff --git a/src/devices/bus/s100/wunderbus.cpp b/src/devices/bus/s100/wunderbus.cpp
index a327bfa3966..490929ec252 100644
--- a/src/devices/bus/s100/wunderbus.cpp
+++ b/src/devices/bus/s100/wunderbus.cpp
@@ -90,7 +90,7 @@ WRITE_LINE_MEMBER( s100_wunderbus_device::rtc_tp_w )
MACHINE_CONFIG_START(s100_wunderbus_device::device_add_mconfig)
MCFG_DEVICE_ADD(I8259A_TAG, PIC8259, 0)
MCFG_PIC8259_OUT_INT_CB(WRITELINE(*this, s100_wunderbus_device, pic_int_w))
- MCFG_PIC8259_IN_SP_CB(VCC)
+ MCFG_PIC8259_IN_SP_CB(CONSTANT(1))
MCFG_DEVICE_ADD(INS8250_1_TAG, INS8250, XTAL(18'432'000)/10)
MCFG_INS8250_OUT_TX_CB(WRITELINE(RS232_A_TAG, rs232_port_device, write_txd))
diff --git a/src/devices/bus/scsi/scsi.h b/src/devices/bus/scsi/scsi.h
index d6c93129667..154b346d6a4 100644
--- a/src/devices/bus/scsi/scsi.h
+++ b/src/devices/bus/scsi/scsi.h
@@ -18,55 +18,55 @@
#define SCSI_PORT_DEVICE7 "7"
#define MCFG_SCSI_BSY_HANDLER(_devcb) \
- devcb = &downcast<scsi_port_device &>(*device).set_bsy_handler(DEVCB_##_devcb);
+ downcast<scsi_port_device &>(*device).set_bsy_handler(DEVCB_##_devcb);
#define MCFG_SCSI_SEL_HANDLER(_devcb) \
- devcb = &downcast<scsi_port_device &>(*device).set_sel_handler(DEVCB_##_devcb);
+ downcast<scsi_port_device &>(*device).set_sel_handler(DEVCB_##_devcb);
#define MCFG_SCSI_CD_HANDLER(_devcb) \
- devcb = &downcast<scsi_port_device &>(*device).set_cd_handler(DEVCB_##_devcb);
+ downcast<scsi_port_device &>(*device).set_cd_handler(DEVCB_##_devcb);
#define MCFG_SCSI_IO_HANDLER(_devcb) \
- devcb = &downcast<scsi_port_device &>(*device).set_io_handler(DEVCB_##_devcb);
+ downcast<scsi_port_device &>(*device).set_io_handler(DEVCB_##_devcb);
#define MCFG_SCSI_MSG_HANDLER(_devcb) \
- devcb = &downcast<scsi_port_device &>(*device).set_msg_handler(DEVCB_##_devcb);
+ downcast<scsi_port_device &>(*device).set_msg_handler(DEVCB_##_devcb);
#define MCFG_SCSI_REQ_HANDLER(_devcb) \
- devcb = &downcast<scsi_port_device &>(*device).set_req_handler(DEVCB_##_devcb);
+ downcast<scsi_port_device &>(*device).set_req_handler(DEVCB_##_devcb);
#define MCFG_SCSI_ACK_HANDLER(_devcb) \
- devcb = &downcast<scsi_port_device &>(*device).set_ack_handler(DEVCB_##_devcb);
+ downcast<scsi_port_device &>(*device).set_ack_handler(DEVCB_##_devcb);
#define MCFG_SCSI_ATN_HANDLER(_devcb) \
- devcb = &downcast<scsi_port_device &>(*device).set_atn_handler(DEVCB_##_devcb);
+ downcast<scsi_port_device &>(*device).set_atn_handler(DEVCB_##_devcb);
#define MCFG_SCSI_RST_HANDLER(_devcb) \
- devcb = &downcast<scsi_port_device &>(*device).set_rst_handler(DEVCB_##_devcb);
+ downcast<scsi_port_device &>(*device).set_rst_handler(DEVCB_##_devcb);
#define MCFG_SCSI_DATA0_HANDLER(_devcb) \
- devcb = &downcast<scsi_port_device &>(*device).set_data0_handler(DEVCB_##_devcb);
+ downcast<scsi_port_device &>(*device).set_data0_handler(DEVCB_##_devcb);
#define MCFG_SCSI_DATA1_HANDLER(_devcb) \
- devcb = &downcast<scsi_port_device &>(*device).set_data1_handler(DEVCB_##_devcb);
+ downcast<scsi_port_device &>(*device).set_data1_handler(DEVCB_##_devcb);
#define MCFG_SCSI_DATA2_HANDLER(_devcb) \
- devcb = &downcast<scsi_port_device &>(*device).set_data2_handler(DEVCB_##_devcb);
+ downcast<scsi_port_device &>(*device).set_data2_handler(DEVCB_##_devcb);
#define MCFG_SCSI_DATA3_HANDLER(_devcb) \
- devcb = &downcast<scsi_port_device &>(*device).set_data3_handler(DEVCB_##_devcb);
+ downcast<scsi_port_device &>(*device).set_data3_handler(DEVCB_##_devcb);
#define MCFG_SCSI_DATA4_HANDLER(_devcb) \
- devcb = &downcast<scsi_port_device &>(*device).set_data4_handler(DEVCB_##_devcb);
+ downcast<scsi_port_device &>(*device).set_data4_handler(DEVCB_##_devcb);
#define MCFG_SCSI_DATA5_HANDLER(_devcb) \
- devcb = &downcast<scsi_port_device &>(*device).set_data5_handler(DEVCB_##_devcb);
+ downcast<scsi_port_device &>(*device).set_data5_handler(DEVCB_##_devcb);
#define MCFG_SCSI_DATA6_HANDLER(_devcb) \
- devcb = &downcast<scsi_port_device &>(*device).set_data6_handler(DEVCB_##_devcb);
+ downcast<scsi_port_device &>(*device).set_data6_handler(DEVCB_##_devcb);
#define MCFG_SCSI_DATA7_HANDLER(_devcb) \
- devcb = &downcast<scsi_port_device &>(*device).set_data7_handler(DEVCB_##_devcb);
+ downcast<scsi_port_device &>(*device).set_data7_handler(DEVCB_##_devcb);
#define MCFG_SCSI_OUTPUT_LATCH_ADD(_tag, scsi_port_tag) \
MCFG_DEVICE_ADD(_tag, OUTPUT_LATCH, 0) \
@@ -117,6 +117,36 @@ public:
template <class Object> devcb_base &set_data5_handler(Object &&cb) { return m_data5_handler.set_callback(std::forward<Object>(cb)); }
template <class Object> devcb_base &set_data6_handler(Object &&cb) { return m_data6_handler.set_callback(std::forward<Object>(cb)); }
template <class Object> devcb_base &set_data7_handler(Object &&cb) { return m_data7_handler.set_callback(std::forward<Object>(cb)); }
+ auto bsy_handler() { return m_bsy_handler.bind(); }
+ auto sel_handler() { return m_sel_handler.bind(); }
+ auto cd_handler() { return m_cd_handler.bind(); }
+ auto io_handler() { return m_io_handler.bind(); }
+ auto msg_handler() { return m_msg_handler.bind(); }
+ auto req_handler() { return m_req_handler.bind(); }
+ auto ack_handler() { return m_ack_handler.bind(); }
+ auto atn_handler() { return m_atn_handler.bind(); }
+ auto rst_handler() { return m_rst_handler.bind(); }
+ auto data0_handler() { return m_data0_handler.bind(); }
+ auto data1_handler() { return m_data1_handler.bind(); }
+ auto data2_handler() { return m_data2_handler.bind(); }
+ auto data3_handler() { return m_data3_handler.bind(); }
+ auto data4_handler() { return m_data4_handler.bind(); }
+ auto data5_handler() { return m_data5_handler.bind(); }
+ auto data6_handler() { return m_data6_handler.bind(); }
+ auto data7_handler() { return m_data7_handler.bind(); }
+
+ template <typename T>
+ void set_data_input_buffer(T &&tag)
+ {
+ data0_handler().set(tag, FUNC(input_buffer_device::write_bit0));
+ data1_handler().set(tag, FUNC(input_buffer_device::write_bit1));
+ data2_handler().set(tag, FUNC(input_buffer_device::write_bit2));
+ data3_handler().set(tag, FUNC(input_buffer_device::write_bit3));
+ data4_handler().set(tag, FUNC(input_buffer_device::write_bit4));
+ data5_handler().set(tag, FUNC(input_buffer_device::write_bit5));
+ data6_handler().set(tag, FUNC(input_buffer_device::write_bit6));
+ data7_handler().set(tag, FUNC(input_buffer_device::write_bit7));
+ }
DECLARE_WRITE_LINE_MEMBER( write_bsy );
DECLARE_WRITE_LINE_MEMBER( write_sel );
diff --git a/src/devices/bus/sms_ctrl/smsctrl.h b/src/devices/bus/sms_ctrl/smsctrl.h
index 9ead03ca812..d116f2c769d 100644
--- a/src/devices/bus/sms_ctrl/smsctrl.h
+++ b/src/devices/bus/sms_ctrl/smsctrl.h
@@ -27,11 +27,11 @@
#define MCFG_SMS_CONTROL_PORT_TH_INPUT_HANDLER(_devcb) \
- devcb = &downcast<sms_control_port_device &>(*device).set_th_input_handler(DEVCB_##_devcb);
+ downcast<sms_control_port_device &>(*device).set_th_input_handler(DEVCB_##_devcb);
#define MCFG_SMS_CONTROL_PORT_PIXEL_HANDLER(_devcb) \
- devcb = &downcast<sms_control_port_device &>(*device).set_pixel_handler(DEVCB_##_devcb);
+ downcast<sms_control_port_device &>(*device).set_pixel_handler(DEVCB_##_devcb);
diff --git a/src/devices/bus/spectrum/exp.h b/src/devices/bus/spectrum/exp.h
index f868853bdf4..f795fc05ad8 100644
--- a/src/devices/bus/spectrum/exp.h
+++ b/src/devices/bus/spectrum/exp.h
@@ -66,10 +66,10 @@
MCFG_SPECTRUM_EXPANSION_SLOT_NMI_HANDLER(WRITELINE(DEVICE_SELF_OWNER, spectrum_expansion_slot_device, nmi_w))
#define MCFG_SPECTRUM_EXPANSION_SLOT_IRQ_HANDLER(_devcb) \
- devcb = &downcast<spectrum_expansion_slot_device &>(*device).set_irq_handler(DEVCB_##_devcb);
+ downcast<spectrum_expansion_slot_device &>(*device).set_irq_handler(DEVCB_##_devcb);
#define MCFG_SPECTRUM_EXPANSION_SLOT_NMI_HANDLER(_devcb) \
- devcb = &downcast<spectrum_expansion_slot_device &>(*device).set_nmi_handler(DEVCB_##_devcb);
+ downcast<spectrum_expansion_slot_device &>(*device).set_nmi_handler(DEVCB_##_devcb);
//**************************************************************************
diff --git a/src/devices/bus/ss50/interface.h b/src/devices/bus/ss50/interface.h
index 5b79e00894c..1865eda6324 100644
--- a/src/devices/bus/ss50/interface.h
+++ b/src/devices/bus/ss50/interface.h
@@ -20,10 +20,10 @@
MCFG_DEVICE_SLOT_INTERFACE(ss50_##_slot_intf, _def_slot, false)
#define MCFG_SS50_INTERFACE_IRQ_CALLBACK(_devcb) \
- devcb = &downcast<ss50_interface_port_device &>(*device).set_irq_cb(DEVCB_##_devcb);
+ downcast<ss50_interface_port_device &>(*device).set_irq_cb(DEVCB_##_devcb);
#define MCFG_SS50_INTERFACE_FIRQ_CALLBACK(_devcb) \
- devcb = &downcast<ss50_interface_port_device &>(*device).set_firq_cb(DEVCB_##_devcb);
+ downcast<ss50_interface_port_device &>(*device).set_firq_cb(DEVCB_##_devcb);
//**************************************************************************
// TYPE DEFINITIONS
diff --git a/src/devices/bus/ss50/mpc.cpp b/src/devices/bus/ss50/mpc.cpp
index 8489e23e29b..25a6ed43951 100644
--- a/src/devices/bus/ss50/mpc.cpp
+++ b/src/devices/bus/ss50/mpc.cpp
@@ -25,13 +25,13 @@ class ss50_mpc_device : public device_t, public ss50_card_interface
public:
// construction/destruction
ss50_mpc_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock)
- : device_t(mconfig, SS50_MPC, tag, owner, clock),
- ss50_card_interface(mconfig, *this),
- m_pia(*this, "pia"),
- m_loopback(*this, "loopback"),
- m_counter(*this, "counter"),
- m_baud_jumper(*this, "BAUD"),
- m_count_select(false)
+ : device_t(mconfig, SS50_MPC, tag, owner, clock)
+ , ss50_card_interface(mconfig, *this)
+ , m_pia(*this, "pia")
+ , m_loopback(*this, "loopback")
+ , m_counter(*this, "counter")
+ , m_baud_jumper(*this, "BAUD")
+ , m_count_select(false)
{
}
@@ -101,15 +101,15 @@ DEVICE_INPUT_DEFAULTS_END
//-------------------------------------------------
MACHINE_CONFIG_START(ss50_mpc_device::device_add_mconfig)
- MCFG_DEVICE_ADD("pia", PIA6821, 0) // actually MC6820
- MCFG_PIA_WRITEPA_HANDLER(WRITELINE("outgate", input_merger_device, in_w<0>)) MCFG_DEVCB_BIT(0)
- MCFG_PIA_CB2_HANDLER(WRITELINE(*this, ss50_mpc_device, reader_control_w))
- MCFG_PIA_READPB_HANDLER(IOPORT("STOP")) MCFG_DEVCB_BIT(6)
- MCFG_DEVCB_CHAIN_INPUT(READLINE(*this, ss50_mpc_device, count_r)) MCFG_DEVCB_BIT(7)
- MCFG_PIA_WRITEPB_HANDLER(WRITELINE(*this, ss50_mpc_device, count_select_w)) MCFG_DEVCB_BIT(2)
- MCFG_DEVCB_CHAIN_OUTPUT(WRITELINE("counter", ripple_counter_device, reset_w)) MCFG_DEVCB_BIT(0)
- //MCFG_PIA_IRQA_HANDLER(WRITELINE(*this, ss50_mpc_device, pia_irq_w))
- //MCFG_PIA_IRQB_HANDLER(WRITELINE(*this, ss50_mpc_device, pia_irq_w))
+ PIA6821(config, m_pia, 0); // actually MC6820
+ m_pia->writepa_handler().set("outgate", FUNC(input_merger_device::in_w<0>)).bit(0);
+ m_pia->cb2_handler().set(FUNC(ss50_mpc_device::reader_control_w));
+ m_pia->readpb_handler().set_ioport("STOP").mask(0x01).lshift(6);
+ m_pia->readpb_handler().append(FUNC(ss50_mpc_device::count_r)).lshift(7);
+ m_pia->writepb_handler().set(FUNC(ss50_mpc_device::count_select_w)).bit(2);
+ m_pia->writepb_handler().append(m_counter, FUNC(ripple_counter_device::reset_w)).bit(0);
+ //m_pia->irqa_handler().set(FUNC(ss50_mpc_device::pia_irq_w));
+ //m_pia->irqb_handler().set(FUNC(ss50_mpc_device::pia_irq_w));
MCFG_DEVICE_ADD("rs232", RS232_PORT, default_rs232_devices, "terminal")
MCFG_RS232_RXD_HANDLER(WRITELINE(*this, ss50_mpc_device, serial_input_w))
diff --git a/src/devices/bus/sunkbd/sunkbd.h b/src/devices/bus/sunkbd/sunkbd.h
index d40d9e20a39..037c81f66ba 100644
--- a/src/devices/bus/sunkbd/sunkbd.h
+++ b/src/devices/bus/sunkbd/sunkbd.h
@@ -9,7 +9,7 @@
#define MCFG_SUNKBD_RXD_HANDLER(cb) \
- devcb = &downcast<sun_keyboard_port_device &>(*device).set_rxd_handler(DEVCB_##cb);
+ downcast<sun_keyboard_port_device &>(*device).set_rxd_handler(DEVCB_##cb);
class device_sun_keyboard_port_interface;
diff --git a/src/devices/bus/svi3x8/expander/expander.h b/src/devices/bus/svi3x8/expander/expander.h
index 0ec5be756c8..549a17c5970 100644
--- a/src/devices/bus/svi3x8/expander/expander.h
+++ b/src/devices/bus/svi3x8/expander/expander.h
@@ -49,25 +49,25 @@
MCFG_DEVICE_ADD(_tag, SVI_EXPANDER, 0) \
MCFG_DEVICE_SLOT_INTERFACE(svi_expander_modules, nullptr, false)
#define MCFG_SVI_EXPANDER_INT_HANDLER(_devcb) \
- devcb = &downcast<svi_expander_device &>(*device).set_int_handler(DEVCB_##_devcb);
+ downcast<svi_expander_device &>(*device).set_int_handler(DEVCB_##_devcb);
#define MCFG_SVI_EXPANDER_ROMDIS_HANDLER(_devcb) \
- devcb = &downcast<svi_expander_device &>(*device).set_romdis_handler(DEVCB_##_devcb);
+ downcast<svi_expander_device &>(*device).set_romdis_handler(DEVCB_##_devcb);
#define MCFG_SVI_EXPANDER_RAMDIS_HANDLER(_devcb) \
- devcb = &downcast<svi_expander_device &>(*device).set_ramdis_handler(DEVCB_##_devcb);
+ downcast<svi_expander_device &>(*device).set_ramdis_handler(DEVCB_##_devcb);
#define MCFG_SVI_EXPANDER_CTRL1_HANDLER(_devcb) \
- devcb = &downcast<svi_expander_device &>(*device).set_ctrl1_handler(DEVCB_##_devcb);
+ downcast<svi_expander_device &>(*device).set_ctrl1_handler(DEVCB_##_devcb);
#define MCFG_SVI_EXPANDER_CTRL2_HANDLER(_devcb) \
- devcb = &downcast<svi_expander_device &>(*device).set_ctrl2_handler(DEVCB_##_devcb);
+ downcast<svi_expander_device &>(*device).set_ctrl2_handler(DEVCB_##_devcb);
#define MCFG_SVI_EXPANDER_EXCSR_HANDLER(_devcb) \
- devcb = &downcast<svi_expander_device &>(*device).set_excsr_handler(DEVCB_##_devcb);
+ downcast<svi_expander_device &>(*device).set_excsr_handler(DEVCB_##_devcb);
#define MCFG_SVI_EXPANDER_EXCSW_HANDLER(_devcb) \
- devcb = &downcast<svi_expander_device &>(*device).set_excsw_handler(DEVCB_##_devcb);
+ downcast<svi_expander_device &>(*device).set_excsw_handler(DEVCB_##_devcb);
//**************************************************************************
diff --git a/src/devices/bus/svi3x8/slot/slot.h b/src/devices/bus/svi3x8/slot/slot.h
index 84764b1dc4f..702c005b770 100644
--- a/src/devices/bus/svi3x8/slot/slot.h
+++ b/src/devices/bus/svi3x8/slot/slot.h
@@ -54,13 +54,13 @@
downcast<svi_slot_device &>(*device).set_bus(this, "slotbus");
#define MCFG_SVI_SLOT_INT_HANDLER(_devcb) \
- devcb = &downcast<svi_slot_bus_device &>(*device).set_int_handler(DEVCB_##_devcb);
+ downcast<svi_slot_bus_device &>(*device).set_int_handler(DEVCB_##_devcb);
#define MCFG_SVI_SLOT_ROMDIS_HANDLER(_devcb) \
- devcb = &downcast<svi_slot_bus_device &>(*device).set_romdis_handler(DEVCB_##_devcb);
+ downcast<svi_slot_bus_device &>(*device).set_romdis_handler(DEVCB_##_devcb);
#define MCFG_SVI_SLOT_RAMDIS_HANDLER(_devcb) \
- devcb = &downcast<svi_slot_bus_device &>(*device).set_ramdis_handler(DEVCB_##_devcb);
+ downcast<svi_slot_bus_device &>(*device).set_ramdis_handler(DEVCB_##_devcb);
//**************************************************************************
diff --git a/src/devices/bus/ti8x/ti8x.h b/src/devices/bus/ti8x/ti8x.h
index b17321d2ce5..1a01aeda2e3 100644
--- a/src/devices/bus/ti8x/ti8x.h
+++ b/src/devices/bus/ti8x/ti8x.h
@@ -43,10 +43,10 @@ DECLARE_DEVICE_TYPE(TI8X_LINK_PORT, ti8x_link_port_device)
#define MCFG_TI8X_LINK_TIP_HANDLER(cb) \
- devcb = &downcast<ti8x_link_port_device &>(*device).set_tip_handler(DEVCB_##cb);
+ downcast<ti8x_link_port_device &>(*device).set_tip_handler(DEVCB_##cb);
#define MCFG_TI8X_LINK_RING_HANDLER(cb) \
- devcb = &downcast<ti8x_link_port_device &>(*device).set_ring_handler(DEVCB_##cb);
+ downcast<ti8x_link_port_device &>(*device).set_ring_handler(DEVCB_##cb);
class device_ti8x_link_port_interface;
diff --git a/src/devices/bus/ti99/gromport/gromport.h b/src/devices/bus/ti99/gromport/gromport.h
index 3f7941e9641..7d370ce39d6 100644
--- a/src/devices/bus/ti99/gromport/gromport.h
+++ b/src/devices/bus/ti99/gromport/gromport.h
@@ -106,10 +106,10 @@ void gromport8(device_slot_interface &device);
MCFG_DEVICE_SLOT_INTERFACE(gromport8, "single", false)
#define MCFG_GROMPORT_READY_HANDLER( _ready ) \
- devcb = &downcast<bus::ti99::gromport::gromport_device &>(*device).set_ready_callback(DEVCB_##_ready);
+ downcast<bus::ti99::gromport::gromport_device &>(*device).set_ready_callback(DEVCB_##_ready);
#define MCFG_GROMPORT_RESET_HANDLER( _reset ) \
- devcb = &downcast<bus::ti99::gromport::gromport_device &>(*device).set_reset_callback(DEVCB_##_reset);
+ downcast<bus::ti99::gromport::gromport_device &>(*device).set_reset_callback(DEVCB_##_reset);
DECLARE_DEVICE_TYPE_NS(TI99_GROMPORT, bus::ti99::gromport, gromport_device)
diff --git a/src/devices/bus/ti99/internal/992board.h b/src/devices/bus/ti99/internal/992board.h
index 02ffb5b25d1..7e79c8d1358 100644
--- a/src/devices/bus/ti99/internal/992board.h
+++ b/src/devices/bus/ti99/internal/992board.h
@@ -163,16 +163,16 @@ public:
bus::ti99::internal::video992_device::TOTAL_VERT_NTSC, bus::ti99::internal::video992_device::VERT_DISPLAY_START_NTSC - 12, bus::ti99::internal::video992_device::VERT_DISPLAY_START_NTSC + 192 + 12 )
#define MCFG_VIDEO992_MEM_ACCESS_CB(_devcb) \
- devcb = &downcast<bus::ti99::internal::video992_device &>(*device).set_readmem_callback(DEVCB_##_devcb);
+ downcast<bus::ti99::internal::video992_device &>(*device).set_readmem_callback(DEVCB_##_devcb);
#define MCFG_VIDEO992_HOLD_CB(_devcb) \
- devcb = &downcast<bus::ti99::internal::video992_device &>(*device).set_hold_callback(DEVCB_##_devcb);
+ downcast<bus::ti99::internal::video992_device &>(*device).set_hold_callback(DEVCB_##_devcb);
#define MCFG_VIDEO992_INT_CB(_devcb) \
- devcb = &downcast<bus::ti99::internal::video992_device &>(*device).set_int_callback(DEVCB_##_devcb);
+ downcast<bus::ti99::internal::video992_device &>(*device).set_int_callback(DEVCB_##_devcb);
#define MCFG_SET_ROMBANK_HANDLER( _devcb ) \
- devcb = &downcast<bus::ti99::internal::io992_device &>(*device).set_rombank_callback(DEVCB_##_devcb);
+ downcast<bus::ti99::internal::io992_device &>(*device).set_rombank_callback(DEVCB_##_devcb);
DECLARE_DEVICE_TYPE_NS(VIDEO99224, bus::ti99::internal, video992_24_device)
DECLARE_DEVICE_TYPE_NS(VIDEO99232, bus::ti99::internal, video992_32_device)
diff --git a/src/devices/bus/ti99/internal/998board.h b/src/devices/bus/ti99/internal/998board.h
index 820199f536d..e59e80b437e 100644
--- a/src/devices/bus/ti99/internal/998board.h
+++ b/src/devices/bus/ti99/internal/998board.h
@@ -702,16 +702,16 @@ private:
} } } // end namespace bus::ti99::internal
#define MCFG_MAINBOARD8_READY_CALLBACK(_write) \
- devcb = &downcast<bus::ti99::internal::mainboard8_device &>(*device).set_ready_wr_callback(DEVCB_##_write);
+ downcast<bus::ti99::internal::mainboard8_device &>(*device).set_ready_wr_callback(DEVCB_##_write);
#define MCFG_MAINBOARD8_RESET_CALLBACK(_write) \
- devcb = &downcast<bus::ti99::internal::mainboard8_device &>(*device).set_reset_wr_callback(DEVCB_##_write);
+ downcast<bus::ti99::internal::mainboard8_device &>(*device).set_reset_wr_callback(DEVCB_##_write);
#define MCFG_MAINBOARD8_HOLD_CALLBACK(_write) \
- devcb = &downcast<bus::ti99::internal::mainboard8_device &>(*device).set_hold_wr_callback(DEVCB_##_write);
+ downcast<bus::ti99::internal::mainboard8_device &>(*device).set_hold_wr_callback(DEVCB_##_write);
#define MCFG_OSO_INT_CALLBACK(_int) \
- devcb = &downcast<bus::ti99::internal::oso_device &>(*device).set_int_callback(DEVCB##_int);
+ downcast<bus::ti99::internal::oso_device &>(*device).set_int_callback(DEVCB##_int);
DECLARE_DEVICE_TYPE_NS(TI99_MAINBOARD8, bus::ti99::internal, mainboard8_device)
DECLARE_DEVICE_TYPE_NS(TI99_VAQUERRO, bus::ti99::internal, vaquerro_device)
diff --git a/src/devices/bus/ti99/internal/datamux.h b/src/devices/bus/ti99/internal/datamux.h
index 47d2d1f84c3..72695279332 100644
--- a/src/devices/bus/ti99/internal/datamux.h
+++ b/src/devices/bus/ti99/internal/datamux.h
@@ -141,7 +141,7 @@ private:
/******************************************************************************/
#define MCFG_DMUX_READY_HANDLER( _intcallb ) \
- devcb = &downcast<bus::ti99::internal::datamux_device &>(*device).set_ready_callback(DEVCB_##_intcallb);
+ downcast<bus::ti99::internal::datamux_device &>(*device).set_ready_callback(DEVCB_##_intcallb);
} } } // end namespace bus::ti99::internal
diff --git a/src/devices/bus/ti99/internal/evpcconn.h b/src/devices/bus/ti99/internal/evpcconn.h
index 9f1af61ccf9..67e5784cd4f 100644
--- a/src/devices/bus/ti99/internal/evpcconn.h
+++ b/src/devices/bus/ti99/internal/evpcconn.h
@@ -37,6 +37,6 @@ DECLARE_DEVICE_TYPE_NS(TI99_EVPCCONN, bus::ti99::internal, evpc_clock_connector)
#define MCFG_ADD_EVPC_CONNECTOR( _tag, _vdpint ) \
MCFG_DEVICE_ADD(_tag, TI99_EVPCCONN, 0) \
- devcb = &downcast<bus::ti99::internal::evpc_clock_connector &>(*device).set_vdpint_callback(DEVCB_##_vdpint);
+ downcast<bus::ti99::internal::evpc_clock_connector &>(*device).set_vdpint_callback(DEVCB_##_vdpint);
#endif // MAME_BUS_TI99_INTERNAL_EVPCCONN_H
diff --git a/src/devices/bus/ti99/internal/genboard.h b/src/devices/bus/ti99/internal/genboard.h
index 260f02932b1..e83e81cfc26 100644
--- a/src/devices/bus/ti99/internal/genboard.h
+++ b/src/devices/bus/ti99/internal/genboard.h
@@ -108,7 +108,7 @@ private:
};
#define MCFG_GENEVE_KBINT_HANDLER( _intcallb ) \
- devcb = &downcast<bus::ti99::internal::geneve_keyboard_device &>(*device).set_int_callback(DEVCB_##_intcallb);
+ downcast<bus::ti99::internal::geneve_keyboard_device &>(*device).set_int_callback(DEVCB_##_intcallb);
/*****************************************************************************/
@@ -308,7 +308,7 @@ private:
};
#define MCFG_GENEVE_READY_HANDLER( _intcallb ) \
- devcb = &downcast<bus::ti99::internal::geneve_mapper_device &>(*device).set_ready_callback(DEVCB_##_intcallb);
+ downcast<bus::ti99::internal::geneve_mapper_device &>(*device).set_ready_callback(DEVCB_##_intcallb);
} } } // end namespace bus::ti99::internal
diff --git a/src/devices/bus/ti99/internal/ioport.h b/src/devices/bus/ti99/internal/ioport.h
index 4c21a11651e..0468649a72f 100644
--- a/src/devices/bus/ti99/internal/ioport.h
+++ b/src/devices/bus/ti99/internal/ioport.h
@@ -99,9 +99,9 @@ void ti99_io_port_ev(device_slot_interface &device);
MCFG_DEVICE_SLOT_INTERFACE(ti99_io_port_ev, "peb", false)
#define MCFG_IOPORT_EXTINT_HANDLER( _extint ) \
- devcb = &downcast<bus::ti99::internal::ioport_device &>(*device).set_extint_callback(DEVCB_##_extint);
+ downcast<bus::ti99::internal::ioport_device &>(*device).set_extint_callback(DEVCB_##_extint);
#define MCFG_IOPORT_READY_HANDLER( _ready ) \
- devcb = &downcast<bus::ti99::internal::ioport_device &>(*device).set_ready_callback(DEVCB_##_ready);
+ downcast<bus::ti99::internal::ioport_device &>(*device).set_ready_callback(DEVCB_##_ready);
#endif /* __TI99IOPORT__ */
diff --git a/src/devices/bus/ti99/joyport/joyport.h b/src/devices/bus/ti99/joyport/joyport.h
index c455058c387..3808f5bff7c 100644
--- a/src/devices/bus/ti99/joyport/joyport.h
+++ b/src/devices/bus/ti99/joyport/joyport.h
@@ -75,7 +75,7 @@ void ti99_joystick_port_gen(device_slot_interface &device);
DECLARE_DEVICE_TYPE_NS(TI99_JOYPORT, bus::ti99::joyport, joyport_device)
#define MCFG_JOYPORT_INT_HANDLER( _intcallb ) \
- devcb = &downcast<bus::ti99::joyport::joyport_device &>(*device).set_int_callback(DEVCB_##_intcallb);
+ downcast<bus::ti99::joyport::joyport_device &>(*device).set_int_callback(DEVCB_##_intcallb);
#define MCFG_GENEVE_JOYPORT_ADD( _tag ) \
MCFG_DEVICE_ADD(_tag, TI99_JOYPORT, 0) \
diff --git a/src/devices/bus/ti99/peb/peribox.h b/src/devices/bus/ti99/peb/peribox.h
index 71ad9eb589b..d83c8f0aa44 100644
--- a/src/devices/bus/ti99/peb/peribox.h
+++ b/src/devices/bus/ti99/peb/peribox.h
@@ -250,16 +250,16 @@ private:
MCFG_DEVICE_SLOT_INTERFACE(_slot_intf, _default, false)
#define MCFG_PERIBOX_INTA_HANDLER( _inta ) \
- devcb = &downcast<bus::ti99::peb::peribox_device &>(*device).set_inta_callback(DEVCB_##_inta);
+ downcast<bus::ti99::peb::peribox_device &>(*device).set_inta_callback(DEVCB_##_inta);
#define MCFG_PERIBOX_INTB_HANDLER( _intb ) \
- devcb = &downcast<bus::ti99::peb::peribox_device &>(*device).set_intb_callback(DEVCB_##_intb);
+ downcast<bus::ti99::peb::peribox_device &>(*device).set_intb_callback(DEVCB_##_intb);
#define MCFG_PERIBOX_READY_HANDLER( _ready ) \
- devcb = &downcast<bus::ti99::peb::peribox_device &>(*device).set_ready_callback(DEVCB_##_ready);
+ downcast<bus::ti99::peb::peribox_device &>(*device).set_ready_callback(DEVCB_##_ready);
#define MCFG_PERIBOX_LCP_HANDLER( _lcp ) \
- devcb = &downcast<bus::ti99::peb::peribox_device &>(*device).set_lcp_callback(DEVCB_##_lcp);
+ downcast<bus::ti99::peb::peribox_device &>(*device).set_lcp_callback(DEVCB_##_lcp);
} } } // end namespace bus::ti99::peb
diff --git a/src/devices/bus/ti99x/990_dk.h b/src/devices/bus/ti99x/990_dk.h
index 79bebc674d6..cb5dd86a61e 100644
--- a/src/devices/bus/ti99x/990_dk.h
+++ b/src/devices/bus/ti99x/990_dk.h
@@ -69,6 +69,6 @@ private:
// LEGACY_FLOPPY_OPTIONS_EXTERN(fd800);
#define MCFG_FD800_INT_HANDLER( _intcallb ) \
- devcb = &downcast<fd800_legacy_device &>(*device).set_int_callback(DEVCB_##_intcallb);
+ downcast<fd800_legacy_device &>(*device).set_int_callback(DEVCB_##_intcallb);
#endif // MAME_BUS_TI99X_990_DK_H
diff --git a/src/devices/bus/ti99x/990_hd.h b/src/devices/bus/ti99x/990_hd.h
index 57f0f55fa27..77b4f6a2749 100644
--- a/src/devices/bus/ti99x/990_hd.h
+++ b/src/devices/bus/ti99x/990_hd.h
@@ -75,7 +75,7 @@ private:
};
#define MCFG_TI990_HDC_INT_CALLBACK( _write ) \
- devcb = &downcast<ti990_hdc_device &>(*device).set_int_callback(DEVCB_##_write);
+ downcast<ti990_hdc_device &>(*device).set_int_callback(DEVCB_##_write);
DECLARE_DEVICE_TYPE(TI990_HDC, ti990_hdc_device)
diff --git a/src/devices/bus/ti99x/990_tap.h b/src/devices/bus/ti99x/990_tap.h
index a86725dd079..9bc8b04666b 100644
--- a/src/devices/bus/ti99x/990_tap.h
+++ b/src/devices/bus/ti99x/990_tap.h
@@ -61,6 +61,6 @@ private:
};
#define MCFG_TI990_TAPE_INT_HANDLER( _intcallb ) \
- devcb = &downcast<tap_990_device &>(*device).set_int_callback(DEVCB_##_intcallb);
+ downcast<tap_990_device &>(*device).set_int_callback(DEVCB_##_intcallb);
#endif // MAME_BUS_TI99X_990_TAP_H
diff --git a/src/devices/bus/tiki100/exp.h b/src/devices/bus/tiki100/exp.h
index 5636ce6e5a7..fb82a62fdce 100644
--- a/src/devices/bus/tiki100/exp.h
+++ b/src/devices/bus/tiki100/exp.h
@@ -39,19 +39,19 @@
#define MCFG_TIKI100_BUS_IRQ_CALLBACK(_write) \
- devcb = &downcast<tiki100_bus_device &>(*device).set_irq_wr_callback(DEVCB_##_write);
+ downcast<tiki100_bus_device &>(*device).set_irq_wr_callback(DEVCB_##_write);
#define MCFG_TIKI100_BUS_NMI_CALLBACK(_write) \
- devcb = &downcast<tiki100_bus_device &>(*device).set_nmi_wr_callback(DEVCB_##_write);
+ downcast<tiki100_bus_device &>(*device).set_nmi_wr_callback(DEVCB_##_write);
#define MCFG_TIKI100_BUS_BUSRQ_CALLBACK(_write) \
- devcb = &downcast<tiki100_bus_device &>(*device).set_busrq_wr_callback(DEVCB_##_write);
+ downcast<tiki100_bus_device &>(*device).set_busrq_wr_callback(DEVCB_##_write);
#define MCFG_TIKI100_BUS_IN_MREQ_CALLBACK(_read) \
- devcb = &downcast<tiki100_bus_device &>(*device).set_mrq_rd_callback(DEVCB_##_read);
+ downcast<tiki100_bus_device &>(*device).set_mrq_rd_callback(DEVCB_##_read);
#define MCFG_TIKI100_BUS_OUT_MREQ_CALLBACK(_write) \
- devcb = &downcast<tiki100_bus_device &>(*device).set_mrq_wr_callback(DEVCB_##_write);
+ downcast<tiki100_bus_device &>(*device).set_mrq_wr_callback(DEVCB_##_write);
diff --git a/src/devices/bus/tiki100/hdc.cpp b/src/devices/bus/tiki100/hdc.cpp
index 1807d39b10d..9a0b10384c7 100644
--- a/src/devices/bus/tiki100/hdc.cpp
+++ b/src/devices/bus/tiki100/hdc.cpp
@@ -33,11 +33,11 @@ DEFINE_DEVICE_TYPE(TIKI100_HDC, tiki100_hdc_device, "tiki100_hdc", "TIKI-100 Win
MACHINE_CONFIG_START(tiki100_hdc_device::device_add_mconfig)
MCFG_DEVICE_ADD(WD1010_TAG, WD2010, 5000000)
//MCFG_WD2010_OUT_INTRQ_CB()
- MCFG_WD2010_IN_DRDY_CB(VCC)
- MCFG_WD2010_IN_INDEX_CB(VCC)
- MCFG_WD2010_IN_WF_CB(VCC)
- MCFG_WD2010_IN_TK000_CB(VCC)
- MCFG_WD2010_IN_SC_CB(VCC)
+ MCFG_WD2010_IN_DRDY_CB(CONSTANT(1))
+ MCFG_WD2010_IN_INDEX_CB(CONSTANT(1))
+ MCFG_WD2010_IN_WF_CB(CONSTANT(1))
+ MCFG_WD2010_IN_TK000_CB(CONSTANT(1))
+ MCFG_WD2010_IN_SC_CB(CONSTANT(1))
MCFG_HARDDISK_ADD("hard0")
MCFG_HARDDISK_ADD("hard1")
diff --git a/src/devices/bus/tvc/tvc.h b/src/devices/bus/tvc/tvc.h
index 9fd9db95e14..584e121f428 100644
--- a/src/devices/bus/tvc/tvc.h
+++ b/src/devices/bus/tvc/tvc.h
@@ -125,9 +125,9 @@ DECLARE_DEVICE_TYPE(TVCEXP_SLOT, tvcexp_slot_device)
***************************************************************************/
#define MCFG_TVCEXP_SLOT_OUT_IRQ_CB(_devcb) \
- devcb = &downcast<tvcexp_slot_device &>(*device).set_out_irq_callback(DEVCB_##_devcb);
+ downcast<tvcexp_slot_device &>(*device).set_out_irq_callback(DEVCB_##_devcb);
#define MCFG_TVCEXP_SLOT_OUT_NMI_CB(_devcb) \
- devcb = &downcast<tvcexp_slot_device &>(*device).set_out_nmi_callback(DEVCB_##_devcb);
+ downcast<tvcexp_slot_device &>(*device).set_out_nmi_callback(DEVCB_##_devcb);
#endif // MAME_BUS_TVC_TVC_H
diff --git a/src/devices/bus/vcs_ctrl/ctrl.h b/src/devices/bus/vcs_ctrl/ctrl.h
index 2018d70ba34..271001b3486 100644
--- a/src/devices/bus/vcs_ctrl/ctrl.h
+++ b/src/devices/bus/vcs_ctrl/ctrl.h
@@ -27,7 +27,7 @@
#define MCFG_VCS_CONTROL_PORT_TRIGGER_CALLBACK(_write) \
- devcb = &downcast<vcs_control_port_device &>(*device).set_trigger_wr_callback(DEVCB_##_write);
+ downcast<vcs_control_port_device &>(*device).set_trigger_wr_callback(DEVCB_##_write);
diff --git a/src/devices/bus/vic10/exp.h b/src/devices/bus/vic10/exp.h
index c504be951cf..56754923a02 100644
--- a/src/devices/bus/vic10/exp.h
+++ b/src/devices/bus/vic10/exp.h
@@ -53,16 +53,16 @@
//**************************************************************************
#define MCFG_VIC10_EXPANSION_SLOT_IRQ_CALLBACK(_write) \
- devcb = &downcast<vic10_expansion_slot_device &>(*device).set_irq_wr_callback(DEVCB_##_write);
+ downcast<vic10_expansion_slot_device &>(*device).set_irq_wr_callback(DEVCB_##_write);
#define MCFG_VIC10_EXPANSION_SLOT_RES_CALLBACK(_write) \
- devcb = &downcast<vic10_expansion_slot_device &>(*device).set_res_wr_callback(DEVCB_##_write);
+ downcast<vic10_expansion_slot_device &>(*device).set_res_wr_callback(DEVCB_##_write);
#define MCFG_VIC10_EXPANSION_SLOT_CNT_CALLBACK(_write) \
- devcb = &downcast<vic10_expansion_slot_device &>(*device).set_cnt_wr_callback(DEVCB_##_write);
+ downcast<vic10_expansion_slot_device &>(*device).set_cnt_wr_callback(DEVCB_##_write);
#define MCFG_VIC10_EXPANSION_SLOT_SP_CALLBACK(_write) \
- devcb = &downcast<vic10_expansion_slot_device &>(*device).set_sp_wr_callback(DEVCB_##_write);
+ downcast<vic10_expansion_slot_device &>(*device).set_sp_wr_callback(DEVCB_##_write);
#define MCFG_VIC10_EXPANSION_SLOT_IRQ_CALLBACKS(_irq, _res) \
diff --git a/src/devices/bus/vic20/exp.h b/src/devices/bus/vic20/exp.h
index 231c6821f1d..eadac324dfb 100644
--- a/src/devices/bus/vic20/exp.h
+++ b/src/devices/bus/vic20/exp.h
@@ -59,13 +59,13 @@
#define MCFG_VIC20_EXPANSION_SLOT_IRQ_CALLBACK(_write) \
- devcb = &downcast<vic20_expansion_slot_device &>(*device).set_irq_wr_callback(DEVCB_##_write);
+ downcast<vic20_expansion_slot_device &>(*device).set_irq_wr_callback(DEVCB_##_write);
#define MCFG_VIC20_EXPANSION_SLOT_NMI_CALLBACK(_write) \
- devcb = &downcast<vic20_expansion_slot_device &>(*device).set_nmi_wr_callback(DEVCB_##_write);
+ downcast<vic20_expansion_slot_device &>(*device).set_nmi_wr_callback(DEVCB_##_write);
#define MCFG_VIC20_EXPANSION_SLOT_RES_CALLBACK(_write) \
- devcb = &downcast<vic20_expansion_slot_device &>(*device).set_res_wr_callback(DEVCB_##_write);
+ downcast<vic20_expansion_slot_device &>(*device).set_res_wr_callback(DEVCB_##_write);
diff --git a/src/devices/bus/vic20/vic1011.cpp b/src/devices/bus/vic20/vic1011.cpp
index cb136d4a0a4..893536a5b09 100644
--- a/src/devices/bus/vic20/vic1011.cpp
+++ b/src/devices/bus/vic20/vic1011.cpp
@@ -12,14 +12,6 @@
//**************************************************************************
-// MACROS/CONSTANTS
-//**************************************************************************
-
-#define RS232_TAG "rs232"
-
-
-
-//**************************************************************************
// DEVICE DEFINITIONS
//**************************************************************************
@@ -30,13 +22,14 @@ DEFINE_DEVICE_TYPE(VIC1011, vic1011_device, "vic1011", "VIC-1011 RS-232C")
// device_add_mconfig - add device configuration
//-------------------------------------------------
-MACHINE_CONFIG_START(vic1011_device::device_add_mconfig)
- MCFG_DEVICE_ADD(RS232_TAG, RS232_PORT, default_rs232_devices, nullptr)
- MCFG_RS232_RXD_HANDLER(WRITELINE(DEVICE_SELF, vic1011_device, output_rxd))
- MCFG_RS232_DCD_HANDLER(WRITELINE(DEVICE_SELF, vic1011_device, output_h)) MCFG_DEVCB_XOR(1)
- MCFG_RS232_CTS_HANDLER(WRITELINE(DEVICE_SELF, vic1011_device, output_k)) MCFG_DEVCB_XOR(1)
- MCFG_RS232_DSR_HANDLER(WRITELINE(DEVICE_SELF, vic1011_device, output_l)) MCFG_DEVCB_XOR(1)
-MACHINE_CONFIG_END
+void vic1011_device::device_add_mconfig(machine_config &config)
+{
+ RS232_PORT(config, m_rs232, default_rs232_devices, nullptr);
+ m_rs232->rxd_handler().set(FUNC(vic1011_device::output_rxd));
+ m_rs232->dcd_handler().set(FUNC(vic1011_device::output_h)).invert();
+ m_rs232->cts_handler().set(FUNC(vic1011_device::output_k)).invert();
+ m_rs232->dsr_handler().set(FUNC(vic1011_device::output_l)).invert();
+}
//**************************************************************************
@@ -50,7 +43,7 @@ MACHINE_CONFIG_END
vic1011_device::vic1011_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: device_t(mconfig, VIC1011, tag, owner, clock)
, device_pet_user_port_interface(mconfig, *this)
- , m_rs232(*this, RS232_TAG)
+ , m_rs232(*this, "rs232")
{
}
diff --git a/src/devices/bus/vidbrain/exp.h b/src/devices/bus/vidbrain/exp.h
index b7f3f5cad7a..fdb4b6a6ac7 100644
--- a/src/devices/bus/vidbrain/exp.h
+++ b/src/devices/bus/vidbrain/exp.h
@@ -60,7 +60,7 @@
#define MCFG_VIDEOBRAIN_EXPANSION_SLOT_EXTRES_CALLBACK(_write) \
- devcb = &downcast<videobrain_expansion_slot_device &>(*device).set_extres_wr_callback(DEVCB_##_write);
+ downcast<videobrain_expansion_slot_device &>(*device).set_extres_wr_callback(DEVCB_##_write);
diff --git a/src/devices/bus/vip/exp.h b/src/devices/bus/vip/exp.h
index 98eda45bdbe..b9bc3235fa7 100644
--- a/src/devices/bus/vip/exp.h
+++ b/src/devices/bus/vip/exp.h
@@ -57,13 +57,13 @@
#define MCFG_VIP_EXPANSION_SLOT_INT_CALLBACK(_write) \
- devcb = &downcast<vip_expansion_slot_device &>(*device).set_int_wr_callback(DEVCB_##_write);
+ downcast<vip_expansion_slot_device &>(*device).set_int_wr_callback(DEVCB_##_write);
#define MCFG_VIP_EXPANSION_SLOT_DMA_OUT_CALLBACK(_write) \
- devcb = &downcast<vip_expansion_slot_device &>(*device).set_dma_out_wr_callback(DEVCB_##_write);
+ downcast<vip_expansion_slot_device &>(*device).set_dma_out_wr_callback(DEVCB_##_write);
#define MCFG_VIP_EXPANSION_SLOT_DMA_IN_CALLBACK(_write) \
- devcb = &downcast<vip_expansion_slot_device &>(*device).set_dma_in_wr_callback(DEVCB_##_write);
+ downcast<vip_expansion_slot_device &>(*device).set_dma_in_wr_callback(DEVCB_##_write);
diff --git a/src/devices/bus/vme/vme.h b/src/devices/bus/vme/vme.h
index 8f86d90bd29..a2b2ab944eb 100644
--- a/src/devices/bus/vme/vme.h
+++ b/src/devices/bus/vme/vme.h
@@ -59,7 +59,7 @@
// Callbacks to the board from the VME bus comes through here
#define MCFG_VME_J1_CB(_devcb) \
- devcb = &downcast<vme_slot_device &>(*device).set_vme_j1_callback(DEVCB_##_devcb);
+ downcast<vme_slot_device &>(*device).set_vme_j1_callback(DEVCB_##_devcb);
//void vme_slot1(device_slot_interface &device); // Disabled until we know how to combine a board driver and a slot device.
void vme_slots(device_slot_interface &device);
diff --git a/src/devices/bus/vme/vme_mzr8300.cpp b/src/devices/bus/vme/vme_mzr8300.cpp
index c5a94ca1b8e..158845770e4 100644
--- a/src/devices/bus/vme/vme_mzr8300.cpp
+++ b/src/devices/bus/vme/vme_mzr8300.cpp
@@ -136,15 +136,15 @@ MACHINE_CONFIG_START(vme_mzr8300_card_device::device_add_mconfig)
MCFG_RS232_RXD_HANDLER(WRITELINE("sio0", upd7201_new_device, rxb_w))
MCFG_RS232_CTS_HANDLER(WRITELINE("sio0", upd7201_new_device, ctsb_w))
- MCFG_DEVICE_ADD("stc", AM9513, XTAL(4'000'000))
- MCFG_AM9513_OUT1_CALLBACK(WRITELINE("sio0", upd7201_new_device, rxca_w))
- MCFG_DEVCB_CHAIN_OUTPUT(WRITELINE("sio0", upd7201_new_device, txca_w))
- MCFG_AM9513_OUT2_CALLBACK(WRITELINE("sio0", upd7201_new_device, rxcb_w))
- MCFG_DEVCB_CHAIN_OUTPUT(WRITELINE("sio0", upd7201_new_device, txcb_w))
- MCFG_AM9513_OUT3_CALLBACK(WRITELINE("sio1", upd7201_new_device, rxca_w))
- MCFG_DEVCB_CHAIN_OUTPUT(WRITELINE("sio1", upd7201_new_device, txca_w))
- MCFG_AM9513_OUT4_CALLBACK(WRITELINE("sio1", upd7201_new_device, rxcb_w))
- MCFG_DEVCB_CHAIN_OUTPUT(WRITELINE("sio1", upd7201_new_device, txcb_w))
+ am9513_device &stc(AM9513(config, "stc", 4_MHz_XTAL));
+ stc.out1_cb().set("sio0", FUNC(upd7201_new_device::rxca_w));
+ stc.out1_cb().append("sio0", FUNC(upd7201_new_device::txca_w));
+ stc.out2_cb().set("sio0", FUNC(upd7201_new_device::rxcb_w));
+ stc.out2_cb().append("sio0", FUNC(upd7201_new_device::txcb_w));
+ stc.out3_cb().set("sio1", FUNC(upd7201_new_device::rxca_w));
+ stc.out3_cb().append("sio1", FUNC(upd7201_new_device::txca_w));
+ stc.out4_cb().set("sio1", FUNC(upd7201_new_device::rxcb_w));
+ stc.out4_cb().append("sio1", FUNC(upd7201_new_device::txcb_w));
MACHINE_CONFIG_END
diff --git a/src/devices/bus/vtech/memexp/memexp.h b/src/devices/bus/vtech/memexp/memexp.h
index 91737e003bc..87bde42bf5d 100644
--- a/src/devices/bus/vtech/memexp/memexp.h
+++ b/src/devices/bus/vtech/memexp/memexp.h
@@ -47,13 +47,13 @@
MCFG_DEVICE_SLOT_INTERFACE(vtech_memexp_carts, nullptr, false)
#define MCFG_MEMEXP_SLOT_INT_HANDLER(_devcb) \
- devcb = &downcast<vtech_memexp_device &>(*device).set_int_handler(DEVCB_##_devcb);
+ downcast<vtech_memexp_device &>(*device).set_int_handler(DEVCB_##_devcb);
#define MCFG_MEMEXP_SLOT_NMI_HANDLER(_devcb) \
- devcb = &downcast<vtech_memexp_device &>(*device).set_nmi_handler(DEVCB_##_devcb);
+ downcast<vtech_memexp_device &>(*device).set_nmi_handler(DEVCB_##_devcb);
#define MCFG_MEMEXP_SLOT_RESET_HANDLER(_devcb) \
- devcb = &downcast<vtech_memexp_device &>(*device).set_reset_handler(DEVCB_##_devcb);
+ downcast<vtech_memexp_device &>(*device).set_reset_handler(DEVCB_##_devcb);
//**************************************************************************
diff --git a/src/devices/bus/wangpc/wangpc.h b/src/devices/bus/wangpc/wangpc.h
index 1510eba9fbf..1f10892f7fc 100644
--- a/src/devices/bus/wangpc/wangpc.h
+++ b/src/devices/bus/wangpc/wangpc.h
@@ -39,34 +39,34 @@
#define MCFG_WANGPC_BUS_IRQ2_CALLBACK(_write) \
- devcb = &downcast<wangpcbus_device &>(*device).set_irq2_wr_callback(DEVCB_##_write);
+ downcast<wangpcbus_device &>(*device).set_irq2_wr_callback(DEVCB_##_write);
#define MCFG_WANGPC_BUS_IRQ3_CALLBACK(_write) \
- devcb = &downcast<wangpcbus_device &>(*device).set_irq3_wr_callback(DEVCB_##_write);
+ downcast<wangpcbus_device &>(*device).set_irq3_wr_callback(DEVCB_##_write);
#define MCFG_WANGPC_BUS_IRQ4_CALLBACK(_write) \
- devcb = &downcast<wangpcbus_device &>(*device).set_irq4_wr_callback(DEVCB_##_write);
+ downcast<wangpcbus_device &>(*device).set_irq4_wr_callback(DEVCB_##_write);
#define MCFG_WANGPC_BUS_IRQ5_CALLBACK(_write) \
- devcb = &downcast<wangpcbus_device &>(*device).set_irq5_wr_callback(DEVCB_##_write);
+ downcast<wangpcbus_device &>(*device).set_irq5_wr_callback(DEVCB_##_write);
#define MCFG_WANGPC_BUS_IRQ6_CALLBACK(_write) \
- devcb = &downcast<wangpcbus_device &>(*device).set_irq6_wr_callback(DEVCB_##_write);
+ downcast<wangpcbus_device &>(*device).set_irq6_wr_callback(DEVCB_##_write);
#define MCFG_WANGPC_BUS_IRQ7_CALLBACK(_write) \
- devcb = &downcast<wangpcbus_device &>(*device).set_irq7_wr_callback(DEVCB_##_write);
+ downcast<wangpcbus_device &>(*device).set_irq7_wr_callback(DEVCB_##_write);
#define MCFG_WANGPC_BUS_DRQ1_CALLBACK(_write) \
- devcb = &downcast<wangpcbus_device &>(*device).set_drq1_wr_callback(DEVCB_##_write);
+ downcast<wangpcbus_device &>(*device).set_drq1_wr_callback(DEVCB_##_write);
#define MCFG_WANGPC_BUS_DRQ2_CALLBACK(_write) \
- devcb = &downcast<wangpcbus_device &>(*device).set_drq2_wr_callback(DEVCB_##_write);
+ downcast<wangpcbus_device &>(*device).set_drq2_wr_callback(DEVCB_##_write);
#define MCFG_WANGPC_BUS_DRQ3_CALLBACK(_write) \
- devcb = &downcast<wangpcbus_device &>(*device).set_drq3_wr_callback(DEVCB_##_write);
+ downcast<wangpcbus_device &>(*device).set_drq3_wr_callback(DEVCB_##_write);
#define MCFG_WANGPC_BUS_IOERROR_CALLBACK(_write) \
- devcb = &downcast<wangpcbus_device &>(*device).set_ioerror_wr_callback(DEVCB_##_write);
+ downcast<wangpcbus_device &>(*device).set_ioerror_wr_callback(DEVCB_##_write);
//**************************************************************************
diff --git a/src/devices/bus/x68k/x68kexp.h b/src/devices/bus/x68k/x68kexp.h
index 3b0a0080e1e..56f9feea8a5 100644
--- a/src/devices/bus/x68k/x68kexp.h
+++ b/src/devices/bus/x68k/x68kexp.h
@@ -78,16 +78,16 @@
//**************************************************************************
#define MCFG_X68K_EXPANSION_SLOT_OUT_IRQ2_CB(_devcb) \
- devcb = &downcast<x68k_expansion_slot_device &>(*device).set_out_irq2_callback(DEVCB_##_devcb);
+ downcast<x68k_expansion_slot_device &>(*device).set_out_irq2_callback(DEVCB_##_devcb);
#define MCFG_X68K_EXPANSION_SLOT_OUT_IRQ4_CB(_devcb) \
- devcb = &downcast<x68k_expansion_slot_device &>(*device).set_out_irq4_callback(DEVCB_##_devcb);
+ downcast<x68k_expansion_slot_device &>(*device).set_out_irq4_callback(DEVCB_##_devcb);
#define MCFG_X68K_EXPANSION_SLOT_OUT_NMI_CB(_devcb) \
- devcb = &downcast<x68k_expansion_slot_device &>(*device).set_out_nmi_callback(DEVCB_##_devcb);
+ downcast<x68k_expansion_slot_device &>(*device).set_out_nmi_callback(DEVCB_##_devcb);
#define MCFG_X68K_EXPANSION_SLOT_OUT_RESET_CB(_devcb) \
- devcb = &downcast<x68k_expansion_slot_device &>(*device).set_out_reset_callback(DEVCB_##_devcb);
+ downcast<x68k_expansion_slot_device &>(*device).set_out_reset_callback(DEVCB_##_devcb);
//**************************************************************************
diff --git a/src/devices/bus/z88/z88.h b/src/devices/bus/z88/z88.h
index f5b63fcbfd0..de8ecdc883f 100644
--- a/src/devices/bus/z88/z88.h
+++ b/src/devices/bus/z88/z88.h
@@ -139,6 +139,6 @@ DECLARE_DEVICE_TYPE(Z88CART_SLOT, z88cart_slot_device)
***************************************************************************/
#define MCFG_Z88CART_SLOT_OUT_FLP_CB(_devcb) \
- devcb = &downcast<z88cart_slot_device &>(*device).set_out_flp_callback(DEVCB_##_devcb);
+ downcast<z88cart_slot_device &>(*device).set_out_flp_callback(DEVCB_##_devcb);
#endif // MAME_BUS_Z88_Z88_H