summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatarGravatar Vas Crabb <vas@vastheman.com>2018-07-07 02:40:29 +1000
committerGravatarGravatar Vas Crabb <vas@vastheman.com>2018-07-07 02:40:29 +1000
commitc3fb11c2c98a5c28ece6a27093a0f9def350ac64 (patch) (github)
treec68b38f05ed1d32358add721fda7f45e8803479f
parent5d9e33b786d7ef452317439359f3cbd8cc920513 (diff)
downloadmame-c3fb11c2c98a5c28ece6a27093a0f9def350ac64.tar.bz2
mame-c3fb11c2c98a5c28ece6a27093a0f9def350ac64.zip
devcb3
There are multiple issues with the current device callbacks: * They always dispatch through a pointer-to-member * Chained callbacks are a linked list so the branch unit can't predict the early * There's a runtime decision made on the left/right shift direction * There are runtime NULL checks on various objects * Binding a lambda isn't practical * Arbitrary transformations are not supported * When chaining callbacks it isn't clear what the MCFG_DEVCB_ modifiers apply to * It isn't possible to just append to a callback in derived configuration * The macros need a magic, hidden local called devcb * Moving code that uses the magic locals around is error-prone * Writing the MCFG_ macros to make a device usable is a pain * You can't discover applicable MCFG_ macros with intellisense * Macros are not scoped * Using an inappropriate macro isn't detected at compile time * Lots of other things This changeset overcomes the biggest obstacle to remving MCFG_ macros altogether. Essentially, to allow a devcb to be configured, call .bind() and expose the result (a bind target for the callback). Bind target methods starting with "set" repace the current callbacks; methods starting with "append" append to them. You can't reconfigure a callback after resolving it. There's no need to use a macro matching the handler signatures - use FUNC for everything. Current device is implied if no tag/finder is supplied (no need for explicit this). Lambdas are supported, and the memory space and offset are optional. These kinds of things work: * .read_cb().set([this] () { return something; }); * .read_cb().set([this] (offs_t offset) { return ~offset; }); * .write_cb().set([this] (offs_t offset, u8 data) { m_array[offset] = data; }); * .write_cb().set([this] (int state) { some_var = state; }); Arbitrary transforms are allowed, and they can modify offset/mask for example: * .read_cb().set(FUNC(my_state::handler)).transform([] (u8 data) { return bitswap<4>(data, 1, 3, 0, 2); }); * .read_cb().set(m_dev, FUNC(some_device::member)).transform([] (offs_t &offset, u8 data) { offset ^= 3; return data; }); It's possible to stack arbitrary transforms, at the cost of compile time (the whole transform stack gets inlined at compile time). Shifts count as an arbitrary transform, but mask/exor does not. Order of mask/shift/exor now matters. Modifications are applied in the specified order. These are NOT EQUIVALENT: * .read_cb().set(FUNC(my_state::handler)).mask(0x06).lshift(2); * .read_cb().set(FUNC(my_state::handler)).lshift(2).mask(0x06); The bit helper no longer reverses its behaviour for read callbacks, and I/O ports are no longer aware of the field mask. Binding a read callback to no-op is not supported - specify a constant. The GND and VCC aliases have been removed intentionally - they're TTL-centric, and were already being abused. Other quirks have been preserved, including write logger only logging when the data is non-zero (quite unhelpful in many of the cases where it's used). Legacy syntax is still supported for simple cases, but will be phased out. New devices should not have MCFG_ macros. I don't think I've missed any fundamental issues, but if I've broken something, let me know.
-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
-rw-r--r--src/devices/cpu/adsp2100/adsp2100.h8
-rw-r--r--src/devices/cpu/amis2000/amis2000.h12
-rw-r--r--src/devices/cpu/apexc/apexc.h4
-rw-r--r--src/devices/cpu/cop400/cop400.h22
-rw-r--r--src/devices/cpu/cosmac/cosmac.h20
-rw-r--r--src/devices/cpu/cp1610/cp1610.h2
-rw-r--r--src/devices/cpu/dsp32/dsp32.h2
-rw-r--r--src/devices/cpu/e0c6200/e0c6s46.h6
-rw-r--r--src/devices/cpu/esrip/esrip.h6
-rw-r--r--src/devices/cpu/h8/h83002.h4
-rw-r--r--src/devices/cpu/h8/h8_sci.h6
-rw-r--r--src/devices/cpu/hcd62121/hcd62121.h12
-rw-r--r--src/devices/cpu/hd61700/hd61700.h14
-rw-r--r--src/devices/cpu/hmcs40/hmcs40.h8
-rw-r--r--src/devices/cpu/hphybrid/hphybrid.h2
-rw-r--r--src/devices/cpu/i386/i386.h4
-rw-r--r--src/devices/cpu/i8085/i8085.h12
-rw-r--r--src/devices/cpu/i8089/i8089.h4
-rw-r--r--src/devices/cpu/i86/i186.h12
-rw-r--r--src/devices/cpu/i86/i286.h2
-rw-r--r--src/devices/cpu/i86/i86.h8
-rw-r--r--src/devices/cpu/jaguar/jaguar.h2
-rw-r--r--src/devices/cpu/lc8670/lc8670.h2
-rw-r--r--src/devices/cpu/lh5801/lh5801.h2
-rw-r--r--src/devices/cpu/lr35902/lr35902.h4
-rw-r--r--src/devices/cpu/m6502/m5074x.h16
-rw-r--r--src/devices/cpu/m6502/m6502.h2
-rw-r--r--src/devices/cpu/m6800/m6801.h4
-rw-r--r--src/devices/cpu/m6805/m68705.h14
-rw-r--r--src/devices/cpu/m6805/m68hc05.h18
-rw-r--r--src/devices/cpu/m6809/konami.h2
-rw-r--r--src/devices/cpu/m6809/m6809.h2
-rw-r--r--src/devices/cpu/mb88xx/mb88xx.h26
-rw-r--r--src/devices/cpu/mcs40/mcs40.h38
-rw-r--r--src/devices/cpu/mcs48/mcs48.h27
-rw-r--r--src/devices/cpu/mcs51/mcs51.h22
-rw-r--r--src/devices/cpu/melps4/melps4.h20
-rw-r--r--src/devices/cpu/mips/r3000.h8
-rw-r--r--src/devices/cpu/mn10200/mn10200.h4
-rw-r--r--src/devices/cpu/nanoprocessor/nanoprocessor.h4
-rw-r--r--src/devices/cpu/nec/v25.h21
-rw-r--r--src/devices/cpu/nec/v53.cpp12
-rw-r--r--src/devices/cpu/nec/v53.h52
-rw-r--r--src/devices/cpu/patinhofeio/patinhofeio_cpu.h8
-rw-r--r--src/devices/cpu/pic16c5x/pic16c5x.h16
-rw-r--r--src/devices/cpu/pps4/pps4.h6
-rw-r--r--src/devices/cpu/psx/dma.h2
-rw-r--r--src/devices/cpu/psx/irq.h2
-rw-r--r--src/devices/cpu/psx/psx.h12
-rw-r--r--src/devices/cpu/psx/rcnt.h6
-rw-r--r--src/devices/cpu/psx/sio.h10
-rw-r--r--src/devices/cpu/rsp/rsp.h10
-rw-r--r--src/devices/cpu/s2650/s2650.h9
-rw-r--r--src/devices/cpu/sc61860/sc61860.h16
-rw-r--r--src/devices/cpu/scudsp/scudsp.h6
-rw-r--r--src/devices/cpu/sm510/sm500.h2
-rw-r--r--src/devices/cpu/sm510/sm510.h18
-rw-r--r--src/devices/cpu/sm8500/sm8500.h4
-rw-r--r--src/devices/cpu/superfx/superfx.h2
-rw-r--r--src/devices/cpu/t11/t11.h2
-rw-r--r--src/devices/cpu/tlcs90/tlcs90.h36
-rw-r--r--src/devices/cpu/tlcs900/tlcs900.h108
-rw-r--r--src/devices/cpu/tms1000/tms0270.h6
-rw-r--r--src/devices/cpu/tms1000/tms1k_base.h8
-rw-r--r--src/devices/cpu/tms32010/tms32010.h2
-rw-r--r--src/devices/cpu/tms32025/tms32025.h12
-rw-r--r--src/devices/cpu/tms32031/tms32031.h8
-rw-r--r--src/devices/cpu/tms34010/tms34010.h2
-rw-r--r--src/devices/cpu/tms7000/tms7000.h18
-rw-r--r--src/devices/cpu/tms9900/tms9995.h10
-rw-r--r--src/devices/cpu/tms9900/tms99com.h14
-rw-r--r--src/devices/cpu/ucom4/ucom4.h22
-rw-r--r--src/devices/cpu/upd7725/upd7725.h22
-rw-r--r--src/devices/cpu/upd7810/upd7810.h48
-rw-r--r--src/devices/cpu/z8/z8.h16
-rw-r--r--src/devices/cpu/z80/tmpz84c011.h26
-rw-r--r--src/devices/cpu/z80/tmpz84c015.h69
-rw-r--r--src/devices/cpu/z80/z80.h6
-rw-r--r--src/devices/cpu/z8000/z8000.h2
-rw-r--r--src/devices/imagedev/flopdrv.h2
-rw-r--r--src/devices/imagedev/midiin.h2
-rw-r--r--src/devices/imagedev/printer.h2
-rw-r--r--src/devices/machine/1mb5.h8
-rw-r--r--src/devices/machine/40105.h6
-rw-r--r--src/devices/machine/53c7xx.h6
-rw-r--r--src/devices/machine/64h156.h6
-rw-r--r--src/devices/machine/6522via.cpp4
-rw-r--r--src/devices/machine/6522via.h60
-rw-r--r--src/devices/machine/6525tpi.h18
-rw-r--r--src/devices/machine/6532riot.h10
-rw-r--r--src/devices/machine/68153bim.h14
-rw-r--r--src/devices/machine/6821pia.h33
-rw-r--r--src/devices/machine/68230pit.h24
-rw-r--r--src/devices/machine/68307.h8
-rw-r--r--src/devices/machine/68340.h20
-rw-r--r--src/devices/machine/6840ptm.h12
-rw-r--r--src/devices/machine/6850acia.h9
-rw-r--r--src/devices/machine/68561mpcc.h12
-rw-r--r--src/devices/machine/7200fifo.h6
-rw-r--r--src/devices/machine/7400.h8
-rw-r--r--src/devices/machine/7404.h12
-rw-r--r--src/devices/machine/74123.h2
-rw-r--r--src/devices/machine/74145.h20
-rw-r--r--src/devices/machine/74153.h4
-rw-r--r--src/devices/machine/74157.h11
-rw-r--r--src/devices/machine/74161.h12
-rw-r--r--src/devices/machine/74165.h4
-rw-r--r--src/devices/machine/74166.h4
-rw-r--r--src/devices/machine/74175.h28
-rw-r--r--src/devices/machine/74259.h20
-rw-r--r--src/devices/machine/7474.h6
-rw-r--r--src/devices/machine/8042kbdc.h10
-rw-r--r--src/devices/machine/82s129.h20
-rw-r--r--src/devices/machine/8364_paula.h4
-rw-r--r--src/devices/machine/8530scc.h2
-rw-r--r--src/devices/machine/aakart.h4
-rw-r--r--src/devices/machine/adc0808.h20
-rw-r--r--src/devices/machine/adc0844.h18
-rw-r--r--src/devices/machine/akiko.h12
-rw-r--r--src/devices/machine/am53cf96.h2
-rw-r--r--src/devices/machine/am9513.h18
-rw-r--r--src/devices/machine/am9517a.h39
-rw-r--r--src/devices/machine/am9519.h2
-rw-r--r--src/devices/machine/amigafdc.h10
-rw-r--r--src/devices/machine/at45dbxx.h2
-rw-r--r--src/devices/machine/at_keybc.h12
-rw-r--r--src/devices/machine/ataintf.h6
-rw-r--r--src/devices/machine/atmel_arm_aic.h2
-rw-r--r--src/devices/machine/ay31015.h40
-rw-r--r--src/devices/machine/busmouse.h2
-rw-r--r--src/devices/machine/cdp1852.h8
-rw-r--r--src/devices/machine/cdp1871.h26
-rw-r--r--src/devices/machine/cdp1879.h2
-rw-r--r--src/devices/machine/clock.h7
-rw-r--r--src/devices/machine/com8116.h9
-rw-r--r--src/devices/machine/cr511b.h18
-rw-r--r--src/devices/machine/cs4031.cpp4
-rw-r--r--src/devices/machine/cs4031.h18
-rw-r--r--src/devices/machine/cxd1095.h20
-rw-r--r--src/devices/machine/dmac.h14
-rw-r--r--src/devices/machine/dp8390.h16
-rw-r--r--src/devices/machine/ds1315.h2
-rw-r--r--src/devices/machine/ds1386.h6
-rw-r--r--src/devices/machine/ds75161a.h32
-rw-r--r--src/devices/machine/e05a03.h10
-rw-r--r--src/devices/machine/e05a30.h18
-rw-r--r--src/devices/machine/eepromser.h3
-rw-r--r--src/devices/machine/fdc37c93x.h10
-rw-r--r--src/devices/machine/fga002.h10
-rw-r--r--src/devices/machine/gayle.h10
-rw-r--r--src/devices/machine/gen_fifo.h4
-rw-r--r--src/devices/machine/gen_latch.h3
-rw-r--r--src/devices/machine/hd63450.h20
-rw-r--r--src/devices/machine/hd64610.h4
-rw-r--r--src/devices/machine/hdc92x4.h12
-rw-r--r--src/devices/machine/hp_taco.h6
-rw-r--r--src/devices/machine/i7220.h4
-rw-r--r--src/devices/machine/i80130.h12
-rw-r--r--src/devices/machine/i8087.h4
-rw-r--r--src/devices/machine/i8155.h21
-rw-r--r--src/devices/machine/i8212.h8
-rw-r--r--src/devices/machine/i8214.h6
-rw-r--r--src/devices/machine/i82371sb.cpp4
-rw-r--r--src/devices/machine/i82371sb.h8
-rw-r--r--src/devices/machine/i8243.h4
-rw-r--r--src/devices/machine/i8251.h21
-rw-r--r--src/devices/machine/i8255.h24
-rw-r--r--src/devices/machine/i8257.h32
-rw-r--r--src/devices/machine/i82586.h2
-rw-r--r--src/devices/machine/i8271.h8
-rw-r--r--src/devices/machine/i8279.h14
-rw-r--r--src/devices/machine/i8355.h8
-rw-r--r--src/devices/machine/ie15_kbd.h2
-rw-r--r--src/devices/machine/im6402.h8
-rw-r--r--src/devices/machine/input_merger.h3
-rw-r--r--src/devices/machine/ins8154.h10
-rw-r--r--src/devices/machine/ins8250.h21
-rw-r--r--src/devices/machine/k053252.h10
-rw-r--r--src/devices/machine/kb3600.h26
-rw-r--r--src/devices/machine/kr2376.h22
-rw-r--r--src/devices/machine/latch8.h32
-rw-r--r--src/devices/machine/ldv1000.h2
-rw-r--r--src/devices/machine/lh5810.h12
-rw-r--r--src/devices/machine/mb8421.h4
-rw-r--r--src/devices/machine/mb87078.h2
-rw-r--r--src/devices/machine/mb8795.h8
-rw-r--r--src/devices/machine/mb89352.h4
-rw-r--r--src/devices/machine/mb89363b.h24
-rw-r--r--src/devices/machine/mb89374.h10
-rw-r--r--src/devices/machine/mc14411.h48
-rw-r--r--src/devices/machine/mc146818.h4
-rw-r--r--src/devices/machine/mc2661.h16
-rw-r--r--src/devices/machine/mc68328.h48
-rw-r--r--src/devices/machine/mc6843.h2
-rw-r--r--src/devices/machine/mc6846.h12
-rw-r--r--src/devices/machine/mc6852.h8
-rw-r--r--src/devices/machine/mc6854.h8
-rw-r--r--src/devices/machine/mc68681.h19
-rw-r--r--src/devices/machine/mc68901.h18
-rw-r--r--src/devices/machine/mccs1850.h6
-rw-r--r--src/devices/machine/microtch.h2
-rw-r--r--src/devices/machine/mm5740.h24
-rw-r--r--src/devices/machine/mm58167.h2
-rw-r--r--src/devices/machine/mm74c922.h12
-rw-r--r--src/devices/machine/mos6526.h24
-rw-r--r--src/devices/machine/mos6529.h16
-rw-r--r--src/devices/machine/mos6530.h8
-rw-r--r--src/devices/machine/mos6530n.h83
-rw-r--r--src/devices/machine/mos6551.h15
-rw-r--r--src/devices/machine/mos8722.h10
-rw-r--r--src/devices/machine/mpu401.h2
-rw-r--r--src/devices/machine/msm58321.h10
-rw-r--r--src/devices/machine/msm6242.h3
-rw-r--r--src/devices/machine/msm6253.h18
-rw-r--r--src/devices/machine/ncr5380.h2
-rw-r--r--src/devices/machine/ncr5380n.h4
-rw-r--r--src/devices/machine/ncr5385.h2
-rw-r--r--src/devices/machine/ncr5390.h4
-rw-r--r--src/devices/machine/ncr539x.h4
-rw-r--r--src/devices/machine/nsc810.h16
-rw-r--r--src/devices/machine/nscsi_cb.h12
-rw-r--r--src/devices/machine/output_latch.h17
-rw-r--r--src/devices/machine/pc_fdc.h4
-rw-r--r--src/devices/machine/pc_lpt.h2
-rw-r--r--src/devices/machine/pci-ide.h3
-rw-r--r--src/devices/machine/pci9050.h4
-rw-r--r--src/devices/machine/pckeybrd.h6
-rw-r--r--src/devices/machine/pdc.h4
-rw-r--r--src/devices/machine/phi.h30
-rw-r--r--src/devices/machine/pic8259.h9
-rw-r--r--src/devices/machine/pit8253.h7
-rw-r--r--src/devices/machine/pxa255.h6
-rw-r--r--src/devices/machine/ripple_counter.h6
-rw-r--r--src/devices/machine/rp5c01.h2
-rw-r--r--src/devices/machine/rp5c15.h4
-rw-r--r--src/devices/machine/rstbuf.h2
-rw-r--r--src/devices/machine/rtc4543.h2
-rw-r--r--src/devices/machine/rtc65271.h2
-rw-r--r--src/devices/machine/s2636.h2
-rw-r--r--src/devices/machine/s3c2400.h18
-rw-r--r--src/devices/machine/s3c2410.h26
-rw-r--r--src/devices/machine/s3c2440.h26
-rw-r--r--src/devices/machine/s3c44b0.h14
-rw-r--r--src/devices/machine/saa1043.h36
-rw-r--r--src/devices/machine/scnxx562.h26
-rw-r--r--src/devices/machine/sis85c496.cpp4
-rw-r--r--src/devices/machine/smartmed.h2
-rw-r--r--src/devices/machine/smc91c9x.h4
-rw-r--r--src/devices/machine/smpc.h24
-rw-r--r--src/devices/machine/steppers.h2
-rw-r--r--src/devices/machine/te7750.h57
-rw-r--r--src/devices/machine/timekpr.h4
-rw-r--r--src/devices/machine/tmp68301.h4
-rw-r--r--src/devices/machine/tms1024.h19
-rw-r--r--src/devices/machine/tms5501.h8
-rw-r--r--src/devices/machine/tms9901.h36
-rw-r--r--src/devices/machine/tms9902.h8
-rw-r--r--src/devices/machine/tube.h12
-rw-r--r--src/devices/machine/upd71071.h28
-rw-r--r--src/devices/machine/upd765.h15
-rw-r--r--src/devices/machine/vrc4373.h2
-rw-r--r--src/devices/machine/wd11c00_17.h33
-rw-r--r--src/devices/machine/wd2010.h45
-rw-r--r--src/devices/machine/wd33c93.h2
-rw-r--r--src/devices/machine/wd7600.cpp4
-rw-r--r--src/devices/machine/wd7600.h18
-rw-r--r--src/devices/machine/wd_fdc.h15
-rw-r--r--src/devices/machine/ym2148.h8
-rw-r--r--src/devices/machine/ym3802.h4
-rw-r--r--src/devices/machine/z80ctc.h12
-rw-r--r--src/devices/machine/z80daisy_generic.h2
-rw-r--r--src/devices/machine/z80dart.h45
-rw-r--r--src/devices/machine/z80dma.h14
-rw-r--r--src/devices/machine/z80pio.h22
-rw-r--r--src/devices/machine/z80scc.h30
-rw-r--r--src/devices/machine/z80sio.cpp27
-rw-r--r--src/devices/machine/z80sio.h51
-rw-r--r--src/devices/machine/z80sti.h16
-rw-r--r--src/devices/machine/z8536.h14
-rw-r--r--src/devices/sound/2203intf.h3
-rw-r--r--src/devices/sound/2608intf.h2
-rw-r--r--src/devices/sound/2610intf.h3
-rw-r--r--src/devices/sound/2612intf.h2
-rw-r--r--src/devices/sound/262intf.h2
-rw-r--r--src/devices/sound/3526intf.h2
-rw-r--r--src/devices/sound/3812intf.h3
-rw-r--r--src/devices/sound/8950intf.h10
-rw-r--r--src/devices/sound/ad1848.h4
-rw-r--r--src/devices/sound/aica.h4
-rw-r--r--src/devices/sound/asc.h2
-rw-r--r--src/devices/sound/astrocde.h18
-rw-r--r--src/devices/sound/ay8910.h15
-rw-r--r--src/devices/sound/cdp1869.h4
-rw-r--r--src/devices/sound/dave.h6
-rw-r--r--src/devices/sound/es1373.h3
-rw-r--r--src/devices/sound/es5503.h4
-rw-r--r--src/devices/sound/es5506.h8
-rw-r--r--src/devices/sound/es8712.h4
-rw-r--r--src/devices/sound/ics2115.h2
-rw-r--r--src/devices/sound/k007232.h2
-rw-r--r--src/devices/sound/k054539.h2
-rw-r--r--src/devices/sound/k056800.h2
-rw-r--r--src/devices/sound/lc7535.h2
-rw-r--r--src/devices/sound/mea8000.h2
-rw-r--r--src/devices/sound/mm5837.h2
-rw-r--r--src/devices/sound/mos6560.h4
-rw-r--r--src/devices/sound/mos6581.h4
-rw-r--r--src/devices/sound/msm5205.h25
-rw-r--r--src/devices/sound/msm5232.h2
-rw-r--r--src/devices/sound/nes_apu.h4
-rw-r--r--src/devices/sound/pokey.h22
-rw-r--r--src/devices/sound/qs1000.h14
-rw-r--r--src/devices/sound/s14001a.h4
-rw-r--r--src/devices/sound/scsp.h6
-rw-r--r--src/devices/sound/sn76496.h2
-rw-r--r--src/devices/sound/sp0250.h2
-rw-r--r--src/devices/sound/sp0256.h4
-rw-r--r--src/devices/sound/spu.h2
-rw-r--r--src/devices/sound/st0016.h2
-rw-r--r--src/devices/sound/t6721a.h8
-rw-r--r--src/devices/sound/tms5110.h14
-rw-r--r--src/devices/sound/tms5220.h14
-rw-r--r--src/devices/sound/upd1771.h2
-rw-r--r--src/devices/sound/upd7759.h2
-rw-r--r--src/devices/sound/upd934g.h2
-rw-r--r--src/devices/sound/votrax.h2
-rw-r--r--src/devices/sound/ym2151.h6
-rw-r--r--src/devices/sound/ymf271.h2
-rw-r--r--src/devices/sound/ymf278b.h2
-rw-r--r--src/devices/sound/ymz280b.h3
-rw-r--r--src/devices/sound/zsg2.h2
-rw-r--r--src/devices/video/315_5124.h18
-rw-r--r--src/devices/video/315_5313.h10
-rw-r--r--src/devices/video/cdp1861.h6
-rw-r--r--src/devices/video/cdp1862.h6
-rw-r--r--src/devices/video/cesblit.h2
-rw-r--r--src/devices/video/crt9007.h22
-rw-r--r--src/devices/video/crt9212.h6
-rw-r--r--src/devices/video/crtc_ega.h8
-rw-r--r--src/devices/video/dl1416.h4
-rw-r--r--src/devices/video/dm9368.h4
-rw-r--r--src/devices/video/ef9364.h2
-rw-r--r--src/devices/video/ef9365.h2
-rw-r--r--src/devices/video/gba_lcd.h10
-rw-r--r--src/devices/video/hd44352.h2
-rw-r--r--src/devices/video/hd61830.h2
-rw-r--r--src/devices/video/hlcd0515.h4
-rw-r--r--src/devices/video/hlcd0538.h4
-rw-r--r--src/devices/video/huc6202.h24
-rw-r--r--src/devices/video/huc6260.h8
-rw-r--r--src/devices/video/huc6270.h2
-rw-r--r--src/devices/video/huc6272.h2
-rw-r--r--src/devices/video/i8244.h4
-rw-r--r--src/devices/video/i82730.h2
-rw-r--r--src/devices/video/i8275.h16
-rw-r--r--src/devices/video/imagetek_i4100.h2
-rw-r--r--src/devices/video/mb88303.h6
-rw-r--r--src/devices/video/mc6845.h32
-rw-r--r--src/devices/video/mc6847.h9
-rw-r--r--src/devices/video/mos6566.h8
-rw-r--r--src/devices/video/ppu2c0x.h1
-rw-r--r--src/devices/video/ppu2c0x_vt.h4
-rw-r--r--src/devices/video/psx.h2
-rw-r--r--src/devices/video/saa5050.h2
-rw-r--r--src/devices/video/scn2674.h4
-rw-r--r--src/devices/video/snes_ppu.h9
-rw-r--r--src/devices/video/tms34061.h2
-rw-r--r--src/devices/video/tms9927.h6
-rw-r--r--src/devices/video/tms9928a.h6
-rw-r--r--src/devices/video/upd3301.h16
-rw-r--r--src/devices/video/upd7220.h8
-rw-r--r--src/devices/video/v9938.h2
-rw-r--r--src/devices/video/vic4567.h16
-rw-r--r--src/devices/video/voodoo.h6
-rw-r--r--src/devices/video/zeus2.h4
-rw-r--r--src/emu/devcb.cpp1031
-rw-r--r--src/emu/devcb.h2980
-rw-r--r--src/emu/device.cpp11
-rw-r--r--src/emu/device.h9
-rw-r--r--src/emu/emu.h1
-rw-r--r--src/emu/emufwd.h6
-rw-r--r--src/emu/mconfig.h2
-rw-r--r--src/emu/output.h5
-rw-r--r--src/emu/screen.h8
-rw-r--r--src/emu/validity.cpp6
-rw-r--r--src/mame/audio/atarijsa.h14
-rw-r--r--src/mame/audio/cage.h2
-rw-r--r--src/mame/audio/cmi01a.h2
-rw-r--r--src/mame/audio/dsbz80.cpp27
-rw-r--r--src/mame/audio/dsbz80.h2
-rw-r--r--src/mame/audio/efo_zsu.cpp20
-rw-r--r--src/mame/audio/exidy.h8
-rw-r--r--src/mame/audio/harddriv.cpp20
-rw-r--r--src/mame/audio/irem.cpp38
-rw-r--r--src/mame/audio/irem.h7
-rw-r--r--src/mame/audio/namco52.h4
-rw-r--r--src/mame/audio/rad_eu3a05.h2
-rw-r--r--src/mame/audio/segag80r.cpp2
-rw-r--r--src/mame/audio/segam1audio.cpp12
-rw-r--r--src/mame/audio/segam1audio.h8
-rw-r--r--src/mame/audio/segasnd.h2
-rw-r--r--src/mame/audio/seibu.h4
-rw-r--r--src/mame/audio/svis_snd.h2
-rw-r--r--src/mame/audio/tvc.h2
-rw-r--r--src/mame/audio/williams.cpp24
-rw-r--r--src/mame/audio/zaccaria.h2
-rw-r--r--src/mame/drivers/24cdjuke.cpp6
-rw-r--r--src/mame/drivers/2mindril.cpp12
-rw-r--r--src/mame/drivers/68ksbc.cpp29
-rw-r--r--src/mame/drivers/a7150.cpp22
-rw-r--r--src/mame/drivers/abc80x.cpp12
-rw-r--r--src/mame/drivers/aerofgt.cpp18
-rw-r--r--src/mame/drivers/alesis.cpp30
-rw-r--r--src/mame/drivers/alpha68k.cpp8
-rw-r--r--src/mame/drivers/alphatpx.cpp20
-rw-r--r--src/mame/drivers/alphatro.cpp6
-rw-r--r--src/mame/drivers/altair.cpp6
-rw-r--r--src/mame/drivers/altos2.cpp43
-rw-r--r--src/mame/drivers/altos486.cpp10
-rw-r--r--src/mame/drivers/altos5.cpp24
-rw-r--r--src/mame/drivers/altos8600.cpp49
-rw-r--r--src/mame/drivers/amiga.cpp40
-rw-r--r--src/mame/drivers/ampro.cpp20
-rw-r--r--src/mame/drivers/amust.cpp6
-rw-r--r--src/mame/drivers/apc.cpp16
-rw-r--r--src/mame/drivers/apricot.cpp28
-rw-r--r--src/mame/drivers/asteroid.cpp40
-rw-r--r--src/mame/drivers/astrocde.cpp34
-rw-r--r--src/mame/drivers/asuka.cpp96
-rw-r--r--src/mame/drivers/atarist.cpp24
-rw-r--r--src/mame/drivers/atarisy1.cpp12
-rw-r--r--src/mame/drivers/attache.cpp64
-rw-r--r--src/mame/drivers/aussiebyte.cpp38
-rw-r--r--src/mame/drivers/avt.cpp28
-rw-r--r--src/mame/drivers/balsente.cpp28
-rw-r--r--src/mame/drivers/bbc.cpp8
-rw-r--r--src/mame/drivers/bbusters.cpp16
-rw-r--r--src/mame/drivers/bebox.cpp16
-rw-r--r--src/mame/drivers/bigbord2.cpp22
-rw-r--r--src/mame/drivers/bladestl.cpp6
-rw-r--r--src/mame/drivers/bml3.cpp6
-rw-r--r--src/mame/drivers/bombjack.cpp18
-rw-r--r--src/mame/drivers/bw2.cpp16
-rw-r--r--src/mame/drivers/capbowl.cpp24
-rw-r--r--src/mame/drivers/cat.cpp9
-rw-r--r--src/mame/drivers/ccastles.cpp32
-rw-r--r--src/mame/drivers/cclimber.cpp62
-rw-r--r--src/mame/drivers/ccs2810.cpp66
-rw-r--r--src/mame/drivers/ccs300.cpp6
-rw-r--r--src/mame/drivers/cdc721.cpp18
-rw-r--r--src/mame/drivers/centiped.cpp28
-rw-r--r--src/mame/drivers/cgc7900.cpp10
-rw-r--r--src/mame/drivers/cidelsa.cpp24
-rw-r--r--src/mame/drivers/cit101.cpp38
-rw-r--r--src/mame/drivers/clcd.cpp28
-rw-r--r--src/mame/drivers/cloak.cpp14
-rw-r--r--src/mame/drivers/cloud9.cpp28
-rw-r--r--src/mame/drivers/clshroad.cpp20
-rw-r--r--src/mame/drivers/cntsteer.cpp18
-rw-r--r--src/mame/drivers/coco12.cpp70
-rw-r--r--src/mame/drivers/coco3.cpp22
-rw-r--r--src/mame/drivers/codata.cpp16
-rw-r--r--src/mame/drivers/commando.cpp19
-rw-r--r--src/mame/drivers/compucolor.cpp6
-rw-r--r--src/mame/drivers/comx35.cpp4
-rw-r--r--src/mame/drivers/cortex.cpp9
-rw-r--r--src/mame/drivers/cosmicos.cpp2
-rw-r--r--src/mame/drivers/cp1.cpp24
-rw-r--r--src/mame/drivers/cpzodiac.cpp22
-rw-r--r--src/mame/drivers/crshrace.cpp16
-rw-r--r--src/mame/drivers/darkseal.cpp4
-rw-r--r--src/mame/drivers/dblewing.cpp16
-rw-r--r--src/mame/drivers/ddenlovr.cpp55
-rw-r--r--src/mame/drivers/dec8.cpp72
-rw-r--r--src/mame/drivers/deco32.cpp53
-rw-r--r--src/mame/drivers/decwritr.cpp18
-rw-r--r--src/mame/drivers/destroyr.cpp6
-rw-r--r--src/mame/drivers/dietgo.cpp14
-rw-r--r--src/mame/drivers/divebomb.cpp20
-rw-r--r--src/mame/drivers/dkong.cpp39
-rw-r--r--src/mame/drivers/dmax8000.cpp24
-rw-r--r--src/mame/drivers/dms86.cpp57
-rw-r--r--src/mame/drivers/dmv.cpp28
-rw-r--r--src/mame/drivers/docastle.cpp32
-rw-r--r--src/mame/drivers/dragon.cpp24
-rw-r--r--src/mame/drivers/dragrace.cpp44
-rw-r--r--src/mame/drivers/dreambal.cpp12
-rw-r--r--src/mame/drivers/dsb46.cpp18
-rw-r--r--src/mame/drivers/duet16.cpp32
-rw-r--r--src/mame/drivers/dynamoah.cpp29
-rw-r--r--src/mame/drivers/dynax.cpp40
-rw-r--r--src/mame/drivers/dynduke.cpp22
-rw-r--r--src/mame/drivers/einstein.cpp8
-rw-r--r--src/mame/drivers/eti660.cpp14
-rw-r--r--src/mame/drivers/exterm.cpp14
-rw-r--r--src/mame/drivers/f1gp.cpp12
-rw-r--r--src/mame/drivers/fanucspmg.cpp4
-rw-r--r--src/mame/drivers/fc100.cpp10
-rw-r--r--src/mame/drivers/firefox.cpp38
-rw-r--r--src/mame/drivers/fmtowns.cpp4
-rw-r--r--src/mame/drivers/ft68m.cpp14
-rw-r--r--src/mame/drivers/gaelco.cpp34
-rw-r--r--src/mame/drivers/gaelco3d.cpp3
-rw-r--r--src/mame/drivers/gaiden.cpp18
-rw-r--r--src/mame/drivers/galaga.cpp114
-rw-r--r--src/mame/drivers/galastrm.cpp16
-rw-r--r--src/mame/drivers/galaxold.cpp22
-rw-r--r--src/mame/drivers/gaplus.cpp23
-rw-r--r--src/mame/drivers/gimix.cpp10
-rw-r--r--src/mame/drivers/gladiatr.cpp24
-rw-r--r--src/mame/drivers/gng.cpp22
-rw-r--r--src/mame/drivers/gotcha.cpp19
-rw-r--r--src/mame/drivers/groundfx.cpp18
-rw-r--r--src/mame/drivers/gstriker.cpp20
-rw-r--r--src/mame/drivers/gsword.cpp14
-rw-r--r--src/mame/drivers/guab.cpp6
-rw-r--r--src/mame/drivers/gunbustr.cpp18
-rw-r--r--src/mame/drivers/h8.cpp10
-rw-r--r--src/mame/drivers/harriet.cpp6
-rw-r--r--src/mame/drivers/hazelgr.cpp16
-rw-r--r--src/mame/drivers/hazeltin.cpp6
-rw-r--r--src/mame/drivers/hnayayoi.cpp20
-rw-r--r--src/mame/drivers/holeland.cpp16
-rw-r--r--src/mame/drivers/hp16500.cpp29
-rw-r--r--src/mame/drivers/i7000.cpp4
-rw-r--r--src/mame/drivers/ibm6580.cpp10
-rw-r--r--src/mame/drivers/igs017.cpp12
-rw-r--r--src/mame/drivers/imds2.cpp4
-rw-r--r--src/mame/drivers/imolagp.cpp14
-rw-r--r--src/mame/drivers/imsai.cpp12
-rw-r--r--src/mame/drivers/inder.cpp11
-rw-r--r--src/mame/drivers/interpro.cpp8
-rw-r--r--src/mame/drivers/ipc.cpp69
-rw-r--r--src/mame/drivers/irisha.cpp16
-rw-r--r--src/mame/drivers/isbc.cpp52
-rw-r--r--src/mame/drivers/isbc8030.cpp74
-rw-r--r--src/mame/drivers/iteagle.cpp16
-rw-r--r--src/mame/drivers/jade.cpp11
-rw-r--r--src/mame/drivers/jp.cpp36
-rw-r--r--src/mame/drivers/jpmsys5.cpp127
-rw-r--r--src/mame/drivers/kaypro.cpp61
-rw-r--r--src/mame/drivers/kdt6.cpp70
-rw-r--r--src/mame/drivers/kingobox.cpp62
-rw-r--r--src/mame/drivers/kinst.cpp3
-rw-r--r--src/mame/drivers/konin.cpp16
-rw-r--r--src/mame/drivers/kopunch.cpp26
-rw-r--r--src/mame/drivers/kyugo.cpp8
-rw-r--r--src/mame/drivers/liberatr.cpp18
-rw-r--r--src/mame/drivers/m24.cpp2
-rw-r--r--src/mame/drivers/m79152pc.cpp6
-rw-r--r--src/mame/drivers/magmax.cpp6
-rw-r--r--src/mame/drivers/mappy.cpp272
-rw-r--r--src/mame/drivers/marineb.cpp25
-rw-r--r--src/mame/drivers/mbee.cpp28
-rw-r--r--src/mame/drivers/mc8020.cpp8
-rw-r--r--src/mame/drivers/mc8030.cpp6
-rw-r--r--src/mame/drivers/mccpm.cpp6
-rw-r--r--src/mame/drivers/meritm.cpp26
-rw-r--r--src/mame/drivers/metro.cpp2
-rw-r--r--src/mame/drivers/mfabfz.cpp37
-rw-r--r--src/mame/drivers/mice.cpp10
-rw-r--r--src/mame/drivers/micro3d.cpp6
-rw-r--r--src/mame/drivers/microdec.cpp75
-rw-r--r--src/mame/drivers/microkit.cpp2
-rw-r--r--src/mame/drivers/microterm.cpp37
-rw-r--r--src/mame/drivers/milwaukee.cpp55
-rw-r--r--src/mame/drivers/miniframe.cpp22
-rw-r--r--src/mame/drivers/mits680b.cpp6
-rw-r--r--src/mame/drivers/mk14.cpp2
-rw-r--r--src/mame/drivers/mmd1.cpp4
-rw-r--r--src/mame/drivers/model1.cpp18
-rw-r--r--src/mame/drivers/model2.cpp49
-rw-r--r--src/mame/drivers/model3.cpp10
-rw-r--r--src/mame/drivers/mrflea.cpp20
-rw-r--r--src/mame/drivers/multi8.cpp6
-rw-r--r--src/mame/drivers/munchmo.cpp3
-rw-r--r--src/mame/drivers/mx2178.cpp10
-rw-r--r--src/mame/drivers/namcos12.cpp13
-rw-r--r--src/mame/drivers/namcos23.cpp49
-rw-r--r--src/mame/drivers/nbmj9195.cpp20
-rw-r--r--src/mame/drivers/nemesis.cpp18
-rw-r--r--src/mame/drivers/neogeo.cpp16
-rw-r--r--src/mame/drivers/neogeocd.cpp3
-rw-r--r--src/mame/drivers/ngen.cpp20
-rw-r--r--src/mame/drivers/ninjaw.cpp28
-rw-r--r--src/mame/drivers/norautp.cpp22
-rw-r--r--src/mame/drivers/nss.cpp6
-rw-r--r--src/mame/drivers/ob68k1a.cpp70
-rw-r--r--src/mame/drivers/octopus.cpp20
-rw-r--r--src/mame/drivers/okean240.cpp8
-rw-r--r--src/mame/drivers/olyboss.cpp22
-rw-r--r--src/mame/drivers/onyx.cpp12
-rw-r--r--src/mame/drivers/osbexec.cpp43
-rw-r--r--src/mame/drivers/othello.cpp2
-rw-r--r--src/mame/drivers/othunder.cpp16
-rw-r--r--src/mame/drivers/p8k.cpp12
-rw-r--r--src/mame/drivers/pacman.cpp8
-rw-r--r--src/mame/drivers/pandoras.cpp16
-rw-r--r--src/mame/drivers/pc100.cpp2
-rw-r--r--src/mame/drivers/pc88va.cpp4
-rw-r--r--src/mame/drivers/pc9801.cpp38
-rw-r--r--src/mame/drivers/pcd.cpp2
-rw-r--r--src/mame/drivers/pcm.cpp18
-rw-r--r--src/mame/drivers/pecom.cpp2
-rw-r--r--src/mame/drivers/peoplepc.cpp4
-rw-r--r--src/mame/drivers/peyper.cpp4
-rw-r--r--src/mame/drivers/pg685.cpp6
-rw-r--r--src/mame/drivers/pimps.cpp66
-rw-r--r--src/mame/drivers/pktgaldx.cpp10
-rw-r--r--src/mame/drivers/play_2.cpp14
-rw-r--r--src/mame/drivers/play_3.cpp16
-rw-r--r--src/mame/drivers/playch10.cpp52
-rw-r--r--src/mame/drivers/plus4.cpp42
-rw-r--r--src/mame/drivers/pm68k.cpp10
-rw-r--r--src/mame/drivers/pntnpuzl.cpp12
-rw-r--r--src/mame/drivers/pokechmp.cpp26
-rw-r--r--src/mame/drivers/polepos.cpp102
-rw-r--r--src/mame/drivers/polgar.cpp22
-rw-r--r--src/mame/drivers/policetr.cpp9
-rw-r--r--src/mame/drivers/poly.cpp9
-rw-r--r--src/mame/drivers/prof80.cpp42
-rw-r--r--src/mame/drivers/proteus.cpp24
-rw-r--r--src/mame/drivers/pulsar.cpp10
-rw-r--r--src/mame/drivers/punchout.cpp18
-rw-r--r--src/mame/drivers/pve500.cpp34
-rw-r--r--src/mame/drivers/qtsbc.cpp12
-rw-r--r--src/mame/drivers/qvt6800.cpp6
-rw-r--r--src/mame/drivers/qx10.cpp10
-rw-r--r--src/mame/drivers/raiden.cpp22
-rw-r--r--src/mame/drivers/rainbow.cpp6
-rw-r--r--src/mame/drivers/rc702.cpp25
-rw-r--r--src/mame/drivers/retofinv.cpp14
-rw-r--r--src/mame/drivers/rmnimbus.cpp4
-rw-r--r--src/mame/drivers/rohga.cpp32
-rw-r--r--src/mame/drivers/royalmah.cpp18
-rw-r--r--src/mame/drivers/runaway.cpp16
-rw-r--r--src/mame/drivers/s7.cpp18
-rw-r--r--src/mame/drivers/sbrain.cpp14
-rw-r--r--src/mame/drivers/sbrkout.cpp28
-rw-r--r--src/mame/drivers/scopus.cpp6
-rw-r--r--src/mame/drivers/sdk85.cpp12
-rw-r--r--src/mame/drivers/sdk86.cpp10
-rw-r--r--src/mame/drivers/seattle.cpp6
-rw-r--r--src/mame/drivers/seattlecmp.cpp28
-rw-r--r--src/mame/drivers/segac2.cpp29
-rw-r--r--src/mame/drivers/segae.cpp14
-rw-r--r--src/mame/drivers/segajw.cpp26
-rw-r--r--src/mame/drivers/segam1.cpp20
-rw-r--r--src/mame/drivers/segas16a.cpp2
-rw-r--r--src/mame/drivers/segas16b.cpp11
-rw-r--r--src/mame/drivers/segas18.cpp38
-rw-r--r--src/mame/drivers/segas24.cpp57
-rw-r--r--src/mame/drivers/segas32.cpp92
-rw-r--r--src/mame/drivers/segaufo.cpp132
-rw-r--r--src/mame/drivers/segaxbd.cpp22
-rw-r--r--src/mame/drivers/segaybd.cpp18
-rw-r--r--src/mame/drivers/selz80.cpp10
-rw-r--r--src/mame/drivers/seta.cpp8
-rw-r--r--src/mame/drivers/seta2.cpp2
-rw-r--r--src/mame/drivers/sfcbox.cpp6
-rw-r--r--src/mame/drivers/shangkid.cpp61
-rw-r--r--src/mame/drivers/shougi.cpp18
-rw-r--r--src/mame/drivers/slapfght.cpp66
-rw-r--r--src/mame/drivers/slapshot.cpp24
-rw-r--r--src/mame/drivers/snes.cpp6
-rw-r--r--src/mame/drivers/snesb.cpp6
-rw-r--r--src/mame/drivers/splash.cpp10
-rw-r--r--src/mame/drivers/stargame.cpp23
-rw-r--r--src/mame/drivers/starwars.cpp53
-rw-r--r--src/mame/drivers/studio2.cpp8
-rw-r--r--src/mame/drivers/subs.cpp18
-rw-r--r--src/mame/drivers/sun1.cpp67
-rw-r--r--src/mame/drivers/super6.cpp28
-rw-r--r--src/mame/drivers/superchs.cpp16
-rw-r--r--src/mame/drivers/superslave.cpp16
-rw-r--r--src/mame/drivers/suprloco.cpp10
-rw-r--r--src/mame/drivers/suprslam.cpp14
-rw-r--r--src/mame/drivers/supstarf.cpp4
-rw-r--r--src/mame/drivers/swtpc.cpp82
-rw-r--r--src/mame/drivers/swtpc09.cpp16
-rw-r--r--src/mame/drivers/sys9002.cpp10
-rw-r--r--src/mame/drivers/systec.cpp6
-rw-r--r--src/mame/drivers/taito_b.cpp302
-rw-r--r--src/mame/drivers/taito_f2.cpp56
-rw-r--r--src/mame/drivers/taito_h.cpp42
-rw-r--r--src/mame/drivers/taito_l.cpp60
-rw-r--r--src/mame/drivers/taito_z.cpp142
-rw-r--r--src/mame/drivers/taitoair.cpp14
-rw-r--r--src/mame/drivers/taitojc.cpp14
-rw-r--r--src/mame/drivers/taotaido.cpp26
-rw-r--r--src/mame/drivers/tatsumi.cpp6
-rw-r--r--src/mame/drivers/tavernie.cpp6
-rw-r--r--src/mame/drivers/thedealr.cpp18
-rw-r--r--src/mame/drivers/tim100.cpp54
-rw-r--r--src/mame/drivers/timelimt.cpp12
-rw-r--r--src/mame/drivers/tmc1800.cpp8
-rw-r--r--src/mame/drivers/tmc2000e.cpp4
-rw-r--r--src/mame/drivers/tmc600.cpp12
-rw-r--r--src/mame/drivers/toaplan2.cpp859
-rw-r--r--src/mame/drivers/tomcat.cpp18
-rw-r--r--src/mame/drivers/topspeed.cpp24
-rw-r--r--src/mame/drivers/tranz330.cpp12
-rw-r--r--src/mame/drivers/triplhnt.cpp47
-rw-r--r--src/mame/drivers/trs80dt1.cpp20
-rw-r--r--src/mame/drivers/ts803.cpp12
-rw-r--r--src/mame/drivers/tsamurai.cpp18
-rw-r--r--src/mame/drivers/tv912.cpp71
-rw-r--r--src/mame/drivers/twincobr.cpp14
-rw-r--r--src/mame/drivers/undrfire.cpp44
-rw-r--r--src/mame/drivers/unior.cpp21
-rw-r--r--src/mame/drivers/univac.cpp36
-rw-r--r--src/mame/drivers/v100.cpp36
-rw-r--r--src/mame/drivers/v1050.cpp14
-rw-r--r--src/mame/drivers/v550.cpp10
-rw-r--r--src/mame/drivers/v6809.cpp14
-rw-r--r--src/mame/drivers/vaportra.cpp4
-rw-r--r--src/mame/drivers/vastar.cpp8
-rw-r--r--src/mame/drivers/vector4.cpp14
-rw-r--r--src/mame/drivers/victor9k.cpp11
-rw-r--r--src/mame/drivers/vip.cpp2
-rw-r--r--src/mame/drivers/votrpss.cpp12
-rw-r--r--src/mame/drivers/votrtnt.cpp6
-rw-r--r--src/mame/drivers/vt100.cpp30
-rw-r--r--src/mame/drivers/vta2000.cpp28
-rw-r--r--src/mame/drivers/vtech1.cpp33
-rw-r--r--src/mame/drivers/wardner.cpp14
-rw-r--r--src/mame/drivers/warriorb.cpp28
-rw-r--r--src/mame/drivers/wgp.cpp14
-rw-r--r--src/mame/drivers/wicat.cpp18
-rw-r--r--src/mame/drivers/williams.cpp52
-rw-r--r--src/mame/drivers/wiping.cpp13
-rw-r--r--src/mame/drivers/xain.cpp31
-rw-r--r--src/mame/drivers/xerox820.cpp14
-rw-r--r--src/mame/drivers/xor100.cpp10
-rw-r--r--src/mame/drivers/z100.cpp4
-rw-r--r--src/mame/drivers/z88.cpp13
-rw-r--r--src/mame/drivers/zac2650.cpp24
-rw-r--r--src/mame/drivers/zn.cpp37
-rw-r--r--src/mame/drivers/zorba.cpp28
-rw-r--r--src/mame/drivers/zsbc3.cpp52
-rw-r--r--src/mame/includes/alesis.h2
-rw-r--r--src/mame/includes/apexc.h1
-rw-r--r--src/mame/includes/apollo.h10
-rw-r--r--src/mame/includes/asteroid.h7
-rw-r--r--src/mame/includes/balsente.h1
-rw-r--r--src/mame/includes/ccastles.h1
-rw-r--r--src/mame/includes/cloud9.h2
-rw-r--r--src/mame/includes/cvs.h6
-rw-r--r--src/mame/includes/dec8.h1
-rw-r--r--src/mame/includes/dragon.h4
-rw-r--r--src/mame/includes/galaxold.h2
-rw-r--r--src/mame/includes/gng.h2
-rw-r--r--src/mame/includes/jpmsys5.h1
-rw-r--r--src/mame/includes/kopunch.h6
-rw-r--r--src/mame/includes/liberatr.h2
-rw-r--r--src/mame/includes/pgm2.h1
-rw-r--r--src/mame/includes/super6.h26
-rw-r--r--src/mame/includes/taito_b.h34
-rw-r--r--src/mame/includes/triplhnt.h4
-rw-r--r--src/mame/includes/v1050.h4
-rw-r--r--src/mame/includes/xbox_pci.h8
-rw-r--r--src/mame/includes/z88.h6
-rw-r--r--src/mame/machine/315_5296.h102
-rw-r--r--src/mame/machine/315_5338a.h83
-rw-r--r--src/mame/machine/315_5649.h52
-rw-r--r--src/mame/machine/6883sam.h2
-rw-r--r--src/mame/machine/abc80kb.h2
-rw-r--r--src/mame/machine/acs8600_ics.cpp122
-rw-r--r--src/mame/machine/acs8600_ics.h43
-rw-r--r--src/mame/machine/apollo.cpp16
-rw-r--r--src/mame/machine/apollo_kbd.h4
-rw-r--r--src/mame/machine/apricotkb.h2
-rw-r--r--src/mame/machine/at.cpp48
-rw-r--r--src/mame/machine/atarigen.h2
-rw-r--r--src/mame/machine/balsente.cpp5
-rw-r--r--src/mame/machine/c117.h2
-rw-r--r--src/mame/machine/cammu.h2
-rw-r--r--src/mame/machine/cat702.h2
-rw-r--r--src/mame/machine/cit101_kbd.h2
-rw-r--r--src/mame/machine/compiskb.h2
-rw-r--r--src/mame/machine/cuda.h8
-rw-r--r--src/mame/machine/dec_lk201.h2
-rw-r--r--src/mame/machine/deco104.h4
-rw-r--r--src/mame/machine/deco146.h12
-rw-r--r--src/mame/machine/deco_irq.h12
-rw-r--r--src/mame/machine/egret.h8
-rw-r--r--src/mame/machine/esqpanel.h4
-rw-r--r--src/mame/machine/fm_scsi.h4
-rw-r--r--src/mame/machine/gaelco3d.h2
-rw-r--r--src/mame/machine/hp9845_printer.h6
-rw-r--r--src/mame/machine/ibm6580_fdc.h6
-rw-r--r--src/mame/machine/ibm6580_kbd.h15
-rw-r--r--src/mame/machine/interpro_ioga.h27
-rw-r--r--src/mame/machine/interpro_sga.h2
-rw-r--r--src/mame/machine/ioptimer.h2
-rw-r--r--src/mame/machine/isbc_208.h2
-rw-r--r--src/mame/machine/isbc_215g.h2
-rw-r--r--src/mame/machine/k573cass.h18
-rw-r--r--src/mame/machine/kay_kbd.h8
-rw-r--r--src/mame/machine/kc_keyb.h2
-rw-r--r--src/mame/machine/km035.h4
-rw-r--r--src/mame/machine/m24_kbd.h2
-rw-r--r--src/mame/machine/m24_z8000.h2
-rw-r--r--src/mame/machine/mackbd.cpp25
-rw-r--r--src/mame/machine/mackbd.h2
-rw-r--r--src/mame/machine/microdrv.h2
-rw-r--r--src/mame/machine/micropolis.h6
-rw-r--r--src/mame/machine/midikbd.h2
-rw-r--r--src/mame/machine/midwayic.h6
-rw-r--r--src/mame/machine/mm1kb.h2
-rw-r--r--src/mame/machine/model1io.cpp49
-rw-r--r--src/mame/machine/model1io.h32
-rw-r--r--src/mame/machine/model1io2.cpp98
-rw-r--r--src/mame/machine/model1io2.h32
-rw-r--r--src/mame/machine/ms7004.h4
-rw-r--r--src/mame/machine/msx_matsushita.h2
-rw-r--r--src/mame/machine/namco06.h24
-rw-r--r--src/mame/machine/namco51.h14
-rw-r--r--src/mame/machine/namco53.h15
-rw-r--r--src/mame/machine/namco62.h12
-rw-r--r--src/mame/machine/namco_c148.h4
-rw-r--r--src/mame/machine/namcoio.h39
-rw-r--r--src/mame/machine/nb1412m2.h2
-rw-r--r--src/mame/machine/nextkbd.h6
-rw-r--r--src/mame/machine/nextmo.h4
-rw-r--r--src/mame/machine/pc1512kb.h4
-rw-r--r--src/mame/machine/pc9801_kbd.h2
-rw-r--r--src/mame/machine/pcd_kbd.h2
-rw-r--r--src/mame/machine/pcshare.cpp4
-rw-r--r--src/mame/machine/ps2timer.h3
-rw-r--r--src/mame/machine/psxcd.h2
-rw-r--r--src/mame/machine/qimi.h2
-rw-r--r--src/mame/machine/rad_eu3a05gpio.h6
-rw-r--r--src/mame/machine/segaic16.h15
-rw-r--r--src/mame/machine/seibucop/seibucop.h4
-rw-r--r--src/mame/machine/tait8741.h8
-rw-r--r--src/mame/machine/taito68705interface.h6
-rw-r--r--src/mame/machine/taitocchip.h14
-rw-r--r--src/mame/machine/taitoio.h140
-rw-r--r--src/mame/machine/taitosjsec.h8
-rw-r--r--src/mame/machine/tandy2kb.h4
-rw-r--r--src/mame/machine/trs80m2kb.h2
-rw-r--r--src/mame/machine/upd65031.h12
-rw-r--r--src/mame/machine/v1050kb.h2
-rw-r--r--src/mame/machine/victor9k_fdc.h21
-rw-r--r--src/mame/machine/victor9k_kb.h4
-rw-r--r--src/mame/machine/vs9209.h68
-rw-r--r--src/mame/machine/vt100_kbd.h2
-rw-r--r--src/mame/machine/wangpckb.h2
-rw-r--r--src/mame/machine/x820kb.h2
-rw-r--r--src/mame/machine/xbox.cpp4
-rw-r--r--src/mame/machine/znmcu.h10
-rw-r--r--src/mame/machine/zx8302.h28
-rw-r--r--src/mame/video/733_asr.h4
-rw-r--r--src/mame/video/911_vdt.h4
-rw-r--r--src/mame/video/abc800.cpp11
-rw-r--r--src/mame/video/abc802.cpp13
-rw-r--r--src/mame/video/atarivad.h2
-rw-r--r--src/mame/video/bfm_dm01.h2
-rw-r--r--src/mame/video/cidelsa.cpp6
-rw-r--r--src/mame/video/comx35.cpp4
-rw-r--r--src/mame/video/decodmd1.cpp14
-rw-r--r--src/mame/video/dynax_blitter_rev2.h22
-rw-r--r--src/mame/video/exidy440.cpp14
-rw-r--r--src/mame/video/gime.h6
-rw-r--r--src/mame/video/gp9001.h17
-rw-r--r--src/mame/video/gtia.h4
-rw-r--r--src/mame/video/k051960.h6
-rw-r--r--src/mame/video/k052109.h2
-rw-r--r--src/mame/video/k053250_ps.h2
-rw-r--r--src/mame/video/k057714.h2
-rw-r--r--src/mame/video/k1ge.h8
-rw-r--r--src/mame/video/liberatr.cpp6
-rw-r--r--src/mame/video/nick.h2
-rw-r--r--src/mame/video/pcd.h2
-rw-r--r--src/mame/video/pecom.cpp2
-rw-r--r--src/mame/video/runaway.cpp3
-rw-r--r--src/mame/video/segaic24.h4
-rw-r--r--src/mame/video/seibu_crtc.h10
-rw-r--r--src/mame/video/taito_b.cpp6
-rw-r--r--src/mame/video/tc0180vcu.h4
-rw-r--r--src/mame/video/tia.h6
-rw-r--r--src/mame/video/tmc1800.cpp4
-rw-r--r--src/mame/video/tmc600.cpp2
-rw-r--r--src/mame/video/uv201.h6
-rw-r--r--src/mame/video/vsystem_gga.h2
-rw-r--r--src/mame/video/vtvideo.h8
-rw-r--r--src/mame/video/wpc_dmd.h2
-rw-r--r--src/mame/video/ygv608.h4
-rw-r--r--src/mame/video/zx8301.h2
1008 files changed, 11044 insertions, 9734 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
diff --git a/src/devices/cpu/adsp2100/adsp2100.h b/src/devices/cpu/adsp2100/adsp2100.h
index 31c7d257572..337de47771d 100644
--- a/src/devices/cpu/adsp2100/adsp2100.h
+++ b/src/devices/cpu/adsp2100/adsp2100.h
@@ -181,16 +181,16 @@ enum
//**************************************************************************
#define MCFG_ADSP21XX_SPORT_RX_CB(_devcb) \
- devcb = &downcast<adsp21xx_device &>(*device).set_sport_rx_callback(DEVCB_##_devcb);
+ downcast<adsp21xx_device &>(*device).set_sport_rx_callback(DEVCB_##_devcb);
#define MCFG_ADSP21XX_SPORT_TX_CB(_devcb) \
- devcb = &downcast<adsp21xx_device &>(*device).set_sport_tx_callback(DEVCB_##_devcb);
+ downcast<adsp21xx_device &>(*device).set_sport_tx_callback(DEVCB_##_devcb);
#define MCFG_ADSP21XX_TIMER_FIRED_CB(_devcb) \
- devcb = &downcast<adsp21xx_device &>(*device).set_timer_fired_callback(DEVCB_##_devcb);
+ downcast<adsp21xx_device &>(*device).set_timer_fired_callback(DEVCB_##_devcb);
#define MCFG_ADSP21XX_DMOVLAY_CB(_devcb) \
- devcb = &downcast<adsp21xx_device &>(*device).set_dmovlay_callback(DEVCB_##_devcb);
+ downcast<adsp21xx_device &>(*device).set_dmovlay_callback(DEVCB_##_devcb);
//**************************************************************************
// TYPE DEFINITIONS
diff --git a/src/devices/cpu/amis2000/amis2000.h b/src/devices/cpu/amis2000/amis2000.h
index abf3b55fca8..2e15b6572ff 100644
--- a/src/devices/cpu/amis2000/amis2000.h
+++ b/src/devices/cpu/amis2000/amis2000.h
@@ -14,25 +14,25 @@
// generic input pins (4 bits each)
#define MCFG_AMI_S2000_READ_K_CB(_devcb) \
- devcb = &downcast<amis2000_base_device &>(*device).set_read_k_callback(DEVCB_##_devcb);
+ downcast<amis2000_base_device &>(*device).set_read_k_callback(DEVCB_##_devcb);
#define MCFG_AMI_S2000_READ_I_CB(_devcb) \
- devcb = &downcast<amis2000_base_device &>(*device).set_read_i_callback(DEVCB_##_devcb);
+ downcast<amis2000_base_device &>(*device).set_read_i_callback(DEVCB_##_devcb);
// 8-bit external databus coupled as input/output pins
#define MCFG_AMI_S2000_READ_D_CB(_devcb) \
- devcb = &downcast<amis2000_base_device &>(*device).set_read_d_callback(DEVCB_##_devcb);
+ downcast<amis2000_base_device &>(*device).set_read_d_callback(DEVCB_##_devcb);
#define MCFG_AMI_S2000_WRITE_D_CB(_devcb) \
- devcb = &downcast<amis2000_base_device &>(*device).set_write_d_callback(DEVCB_##_devcb);
+ downcast<amis2000_base_device &>(*device).set_write_d_callback(DEVCB_##_devcb);
// 13-bit external address bus coupled as output pins
#define MCFG_AMI_S2000_WRITE_A_CB(_devcb) \
- devcb = &downcast<amis2000_base_device &>(*device).set_write_a_callback(DEVCB_##_devcb);
+ downcast<amis2000_base_device &>(*device).set_write_a_callback(DEVCB_##_devcb);
// F_out pin (only for S2152)
#define MCFG_AMI_S2152_FOUT_CB(_devcb) \
- devcb = &downcast<amis2000_base_device &>(*device).set_write_f_callback(DEVCB_##_devcb);
+ downcast<amis2000_base_device &>(*device).set_write_f_callback(DEVCB_##_devcb);
// S2000 has a hardcoded 7seg table, that (unlike S2200) is officially
// uncustomizable, but wildfire proves to be an exception to that rule.
diff --git a/src/devices/cpu/apexc/apexc.h b/src/devices/cpu/apexc/apexc.h
index 74a19a594be..4da1108a518 100644
--- a/src/devices/cpu/apexc/apexc.h
+++ b/src/devices/cpu/apexc/apexc.h
@@ -7,10 +7,10 @@
#pragma once
#define MCFG_APEXC_TAPE_READ_CB(_devcb) \
- devcb = &downcast<apexc_cpu_device &>(*device).set_tape_read_cb(DEVCB_##_devcb);
+ downcast<apexc_cpu_device &>(*device).set_tape_read_cb(DEVCB_##_devcb);
#define MCFG_APEXC_TAPE_PUNCH_CB(_devcb) \
- devcb = &downcast<apexc_cpu_device &>(*device).set_tape_punch_cb(DEVCB_##_devcb);
+ downcast<apexc_cpu_device &>(*device).set_tape_punch_cb(DEVCB_##_devcb);
enum
{
diff --git a/src/devices/cpu/cop400/cop400.h b/src/devices/cpu/cop400/cop400.h
index 197cf86abf1..5dbff8a9281 100644
--- a/src/devices/cpu/cop400/cop400.h
+++ b/src/devices/cpu/cop400/cop400.h
@@ -17,40 +17,40 @@
// L pins: 8-bit bi-directional
#define MCFG_COP400_READ_L_CB(_devcb) \
- devcb = &downcast<cop400_cpu_device &>(*device).set_read_l_callback(DEVCB_##_devcb);
+ downcast<cop400_cpu_device &>(*device).set_read_l_callback(DEVCB_##_devcb);
#define MCFG_COP400_WRITE_L_CB(_devcb) \
- devcb = &downcast<cop400_cpu_device &>(*device).set_write_l_callback(DEVCB_##_devcb);
+ downcast<cop400_cpu_device &>(*device).set_write_l_callback(DEVCB_##_devcb);
// output state when pins are in tri-state, default 0
#define MCFG_COP400_READ_L_TRISTATE_CB(_devcb) \
- devcb = &downcast<cop400_cpu_device &>(*device).set_read_l_tristate_callback(DEVCB_##_devcb);
+ downcast<cop400_cpu_device &>(*device).set_read_l_tristate_callback(DEVCB_##_devcb);
// G pins: 4-bit bi-directional
#define MCFG_COP400_READ_G_CB(_devcb) \
- devcb = &downcast<cop400_cpu_device &>(*device).set_read_g_callback(DEVCB_##_devcb);
+ downcast<cop400_cpu_device &>(*device).set_read_g_callback(DEVCB_##_devcb);
#define MCFG_COP400_WRITE_G_CB(_devcb) \
- devcb = &downcast<cop400_cpu_device &>(*device).set_write_g_callback(DEVCB_##_devcb);
+ downcast<cop400_cpu_device &>(*device).set_write_g_callback(DEVCB_##_devcb);
// D outputs: 4-bit general purpose output
#define MCFG_COP400_WRITE_D_CB(_devcb) \
- devcb = &downcast<cop400_cpu_device &>(*device).set_write_d_callback(DEVCB_##_devcb);
+ downcast<cop400_cpu_device &>(*device).set_write_d_callback(DEVCB_##_devcb);
// IN inputs: 4-bit general purpose input
#define MCFG_COP400_READ_IN_CB(_devcb) \
- devcb = &downcast<cop400_cpu_device &>(*device).set_read_in_callback(DEVCB_##_devcb);
+ downcast<cop400_cpu_device &>(*device).set_read_in_callback(DEVCB_##_devcb);
// SI/SO lines: serial in/out or counter/gen.purpose
#define MCFG_COP400_READ_SI_CB(_devcb) \
- devcb = &downcast<cop400_cpu_device &>(*device).set_read_si_callback(DEVCB_##_devcb);
+ downcast<cop400_cpu_device &>(*device).set_read_si_callback(DEVCB_##_devcb);
#define MCFG_COP400_WRITE_SO_CB(_devcb) \
- devcb = &downcast<cop400_cpu_device &>(*device).set_write_so_callback(DEVCB_##_devcb);
+ downcast<cop400_cpu_device &>(*device).set_write_so_callback(DEVCB_##_devcb);
// SK output line: logic-controlled clock or gen.purpose
#define MCFG_COP400_WRITE_SK_CB(_devcb) \
- devcb = &downcast<cop400_cpu_device &>(*device).set_write_sk_callback(DEVCB_##_devcb);
+ downcast<cop400_cpu_device &>(*device).set_write_sk_callback(DEVCB_##_devcb);
// CKI/CKO lines: only CKO input here
#define MCFG_COP400_READ_CKO_CB(_devcb) \
- devcb = &downcast<cop400_cpu_device &>(*device).set_read_cko_callback(DEVCB_##_devcb);
+ downcast<cop400_cpu_device &>(*device).set_read_cko_callback(DEVCB_##_devcb);
/***************************************************************************
diff --git a/src/devices/cpu/cosmac/cosmac.h b/src/devices/cpu/cosmac/cosmac.h
index 4a535f3c4c1..d5c98c8c992 100644
--- a/src/devices/cpu/cosmac/cosmac.h
+++ b/src/devices/cpu/cosmac/cosmac.h
@@ -88,34 +88,34 @@
//**************************************************************************
#define MCFG_COSMAC_WAIT_CALLBACK(_read) \
- devcb = &downcast<cosmac_device &>(*device).set_wait_rd_callback(DEVCB_##_read);
+ downcast<cosmac_device &>(*device).set_wait_rd_callback(DEVCB_##_read);
#define MCFG_COSMAC_CLEAR_CALLBACK(_read) \
- devcb = &downcast<cosmac_device &>(*device).set_clear_rd_callback(DEVCB_##_read);
+ downcast<cosmac_device &>(*device).set_clear_rd_callback(DEVCB_##_read);
#define MCFG_COSMAC_EF1_CALLBACK(_read) \
- devcb = &downcast<cosmac_device &>(*device).set_ef1_rd_callback(DEVCB_##_read);
+ downcast<cosmac_device &>(*device).set_ef1_rd_callback(DEVCB_##_read);
#define MCFG_COSMAC_EF2_CALLBACK(_read) \
- devcb = &downcast<cosmac_device &>(*device).set_ef2_rd_callback(DEVCB_##_read);
+ downcast<cosmac_device &>(*device).set_ef2_rd_callback(DEVCB_##_read);
#define MCFG_COSMAC_EF3_CALLBACK(_read) \
- devcb = &downcast<cosmac_device &>(*device).set_ef3_rd_callback(DEVCB_##_read);
+ downcast<cosmac_device &>(*device).set_ef3_rd_callback(DEVCB_##_read);
#define MCFG_COSMAC_EF4_CALLBACK(_read) \
- devcb = &downcast<cosmac_device &>(*device).set_ef4_rd_callback(DEVCB_##_read);
+ downcast<cosmac_device &>(*device).set_ef4_rd_callback(DEVCB_##_read);
#define MCFG_COSMAC_Q_CALLBACK(_write) \
- devcb = &downcast<cosmac_device &>(*device).set_q_wr_callback(DEVCB_##_write);
+ downcast<cosmac_device &>(*device).set_q_wr_callback(DEVCB_##_write);
#define MCFG_COSMAC_DMAR_CALLBACK(_read) \
- devcb = &downcast<cosmac_device &>(*device).set_dma_rd_callback(DEVCB_##_read);
+ downcast<cosmac_device &>(*device).set_dma_rd_callback(DEVCB_##_read);
#define MCFG_COSMAC_DMAW_CALLBACK(_write) \
- devcb = &downcast<cosmac_device &>(*device).set_dma_wr_callback(DEVCB_##_write);
+ downcast<cosmac_device &>(*device).set_dma_wr_callback(DEVCB_##_write);
#define MCFG_COSMAC_SC_CALLBACK(_write) \
- devcb = &downcast<cosmac_device &>(*device).set_sc_wr_callback(DEVCB_##_write);
+ downcast<cosmac_device &>(*device).set_sc_wr_callback(DEVCB_##_write);
diff --git a/src/devices/cpu/cp1610/cp1610.h b/src/devices/cpu/cp1610/cp1610.h
index d2ab4fa18bf..280546fc436 100644
--- a/src/devices/cpu/cp1610/cp1610.h
+++ b/src/devices/cpu/cp1610/cp1610.h
@@ -20,7 +20,7 @@
#define CP1610_INT_INTR INPUT_LINE_NMI /* Non-Maskable */
#define MCFG_CP1610_BEXT_CALLBACK(_read) \
- devcb = &downcast<cp1610_cpu_device *>(device)->set_bext_callback(DEVCB_##_read);
+ downcast<cp1610_cpu_device *>(device)->set_bext_callback(DEVCB_##_read);
class cp1610_cpu_device : public cpu_device
diff --git a/src/devices/cpu/dsp32/dsp32.h b/src/devices/cpu/dsp32/dsp32.h
index 7de09dd1198..59289064f90 100644
--- a/src/devices/cpu/dsp32/dsp32.h
+++ b/src/devices/cpu/dsp32/dsp32.h
@@ -31,7 +31,7 @@ const int DSP32_OUTPUT_PDF = 0x02;
//**************************************************************************
#define MCFG_DSP32C_OUTPUT_CALLBACK(_write) \
- devcb = &downcast<dsp32c_device &>(*device).set_output_pins_callback(DEVCB_##_write);
+ downcast<dsp32c_device &>(*device).set_output_pins_callback(DEVCB_##_write);
// ======================> dsp32c_device
diff --git a/src/devices/cpu/e0c6200/e0c6s46.h b/src/devices/cpu/e0c6200/e0c6s46.h
index 7e9c4d0f91b..0d9f86c5772 100644
--- a/src/devices/cpu/e0c6200/e0c6s46.h
+++ b/src/devices/cpu/e0c6200/e0c6s46.h
@@ -16,7 +16,7 @@
// 5 4-bit R output ports
#define MCFG_E0C6S46_WRITE_R_CB(R, _devcb) \
- devcb = &downcast<e0c6s46_device &>(*device).set_write_r##R##_callback(DEVCB_##_devcb);
+ downcast<e0c6s46_device &>(*device).set_write_r##R##_callback(DEVCB_##_devcb);
enum
{
@@ -29,9 +29,9 @@ enum
// 4 4-bit P I/O ports
#define MCFG_E0C6S46_READ_P_CB(R, _devcb) \
- devcb = &downcast<hmcs40_cpu_device &>(*device).set_read_r##P##_callback(DEVCB_##_devcb);
+ downcast<hmcs40_cpu_device &>(*device).set_read_r##P##_callback(DEVCB_##_devcb);
#define MCFG_E0C6S46_WRITE_P_CB(R, _devcb) \
- devcb = &downcast<e0c6s46_device &>(*device).set_write_r##P##_callback(DEVCB_##_devcb);
+ downcast<e0c6s46_device &>(*device).set_write_r##P##_callback(DEVCB_##_devcb);
enum
{
diff --git a/src/devices/cpu/esrip/esrip.h b/src/devices/cpu/esrip/esrip.h
index a97675e9be4..b9df5365da3 100644
--- a/src/devices/cpu/esrip/esrip.h
+++ b/src/devices/cpu/esrip/esrip.h
@@ -20,13 +20,13 @@
#define ESRIP_DRAW(name) int name(int l, int r, int fig, int attr, int addr, int col, int x_scale, int bank)
#define MCFG_ESRIP_FDT_R_CALLBACK(_read) \
- devcb = &downcast<esrip_device &>(*device).set_fdt_r_callback(DEVCB_##_read);
+ downcast<esrip_device &>(*device).set_fdt_r_callback(DEVCB_##_read);
#define MCFG_ESRIP_FDT_W_CALLBACK(_write) \
- devcb = &downcast<esrip_device &>(*device).set_fdt_w_callback(DEVCB_##_write);
+ downcast<esrip_device &>(*device).set_fdt_w_callback(DEVCB_##_write);
#define MCFG_ESRIP_STATUS_IN_CALLBACK(_read) \
- devcb = &downcast<esrip_device &>(*device).set_status_in_callback(DEVCB_##_read);
+ downcast<esrip_device &>(*device).set_status_in_callback(DEVCB_##_read);
#define MCFG_ESRIP_DRAW_CALLBACK_OWNER(_class, _method) \
downcast<esrip_device &>(*device).set_draw_callback(esrip_device::draw_delegate(&_class::_method, #_class "::" #_method, this));
diff --git a/src/devices/cpu/h8/h83002.h b/src/devices/cpu/h8/h83002.h
index 457e604aa21..32047b60390 100644
--- a/src/devices/cpu/h8/h83002.h
+++ b/src/devices/cpu/h8/h83002.h
@@ -26,9 +26,9 @@
#include "h8_watchdog.h"
#define MCFG_H83002_TEND0_CALLBACK(_devcb) \
- devcb = &downcast<h83002_device &>(*device).set_tend0_callback(DEVCB_##_devcb);
+ downcast<h83002_device &>(*device).set_tend0_callback(DEVCB_##_devcb);
#define MCFG_H83002_TEND1_CALLBACK(_devcb) \
- devcb = &downcast<h83002_device &>(*device).set_tend1_callback(DEVCB_##_devcb);
+ downcast<h83002_device &>(*device).set_tend1_callback(DEVCB_##_devcb);
class h83002_device : public h8h_device {
public:
diff --git a/src/devices/cpu/h8/h8_sci.h b/src/devices/cpu/h8/h8_sci.h
index 3c2db4147df..065c5e4b305 100644
--- a/src/devices/cpu/h8/h8_sci.h
+++ b/src/devices/cpu/h8/h8_sci.h
@@ -25,10 +25,10 @@
downcast<h8_sci_device *>(device)->set_external_clock_period(_period);
#define MCFG_H8_SCI_TX_CALLBACK(_devcb) \
- devcb = &downcast<h8_sci_device &>(*device).set_tx_cb(DEVCB_##_devcb);
+ downcast<h8_sci_device &>(*device).set_tx_cb(DEVCB_##_devcb);
#define MCFG_H8_SCI_CLK_CALLBACK(_devcb) \
- devcb = &downcast<h8_sci_device &>(*device).set_clk_cb(DEVCB_##_devcb);
+ downcast<h8_sci_device &>(*device).set_clk_cb(DEVCB_##_devcb);
class h8_sci_device : public device_t {
public:
@@ -56,6 +56,8 @@ public:
template <class Object> devcb_base &set_tx_cb(Object &&cb) { return tx_cb.set_callback(std::forward<Object>(cb)); }
template <class Object> devcb_base &set_clk_cb(Object &&cb) { return clk_cb.set_callback(std::forward<Object>(cb)); }
+ auto tx_handler() { return tx_cb.bind(); }
+ auto clk_handler() { return clk_cb.bind(); }
uint64_t internal_update(uint64_t current_time);
diff --git a/src/devices/cpu/hcd62121/hcd62121.h b/src/devices/cpu/hcd62121/hcd62121.h
index 0c2da71fec5..7e85bc2af96 100644
--- a/src/devices/cpu/hcd62121/hcd62121.h
+++ b/src/devices/cpu/hcd62121/hcd62121.h
@@ -6,12 +6,12 @@
#pragma once
-#define MCFG_HCD62121_KOL_CB(_devcb) devcb = &downcast<hcd62121_cpu_device &>(*device).set_kol_callback(DEVCB_##_devcb);
-#define MCFG_HCD62121_KOH_CB(_devcb) devcb = &downcast<hcd62121_cpu_device &>(*device).set_koh_callback(DEVCB_##_devcb);
-#define MCFG_HCD62121_PORT_CB(_devcb) devcb = &downcast<hcd62121_cpu_device &>(*device).set_port_callback(DEVCB_##_devcb);
-#define MCFG_HCD62121_OPT_CB(_devcb) devcb = &downcast<hcd62121_cpu_device &>(*device).set_opt_callback(DEVCB_##_devcb);
-#define MCFG_HCD62121_KI_CB(_devcb) devcb = &downcast<hcd62121_cpu_device &>(*device).set_ki_callback(DEVCB_##_devcb);
-#define MCFG_HCD62121_IN0_CB(_devcb) devcb = &downcast<hcd62121_cpu_device &>(*device).set_in0_callback(DEVCB_##_devcb);
+#define MCFG_HCD62121_KOL_CB(_devcb) downcast<hcd62121_cpu_device &>(*device).set_kol_callback(DEVCB_##_devcb);
+#define MCFG_HCD62121_KOH_CB(_devcb) downcast<hcd62121_cpu_device &>(*device).set_koh_callback(DEVCB_##_devcb);
+#define MCFG_HCD62121_PORT_CB(_devcb) downcast<hcd62121_cpu_device &>(*device).set_port_callback(DEVCB_##_devcb);
+#define MCFG_HCD62121_OPT_CB(_devcb) downcast<hcd62121_cpu_device &>(*device).set_opt_callback(DEVCB_##_devcb);
+#define MCFG_HCD62121_KI_CB(_devcb) downcast<hcd62121_cpu_device &>(*device).set_ki_callback(DEVCB_##_devcb);
+#define MCFG_HCD62121_IN0_CB(_devcb) downcast<hcd62121_cpu_device &>(*device).set_in0_callback(DEVCB_##_devcb);
class hcd62121_cpu_device : public cpu_device
diff --git a/src/devices/cpu/hd61700/hd61700.h b/src/devices/cpu/hd61700/hd61700.h
index cb139878221..8b69bf41913 100644
--- a/src/devices/cpu/hd61700/hd61700.h
+++ b/src/devices/cpu/hd61700/hd61700.h
@@ -16,25 +16,25 @@
//**************************************************************************
#define MCFG_HD61700_LCD_CTRL_CB(_devcb) \
- devcb = &downcast<hd61700_cpu_device &>(*device).set_lcd_ctrl_callback(DEVCB_##_devcb);
+ downcast<hd61700_cpu_device &>(*device).set_lcd_ctrl_callback(DEVCB_##_devcb);
#define MCFG_HD61700_LCD_WRITE_CB(_devcb) \
- devcb = &downcast<hd61700_cpu_device &>(*device).set_lcd_write_callback(DEVCB_##_devcb);
+ downcast<hd61700_cpu_device &>(*device).set_lcd_write_callback(DEVCB_##_devcb);
#define MCFG_HD61700_LCD_READ_CB(_devcb) \
- devcb = &downcast<hd61700_cpu_device &>(*device).set_lcd_read_callback(DEVCB_##_devcb);
+ downcast<hd61700_cpu_device &>(*device).set_lcd_read_callback(DEVCB_##_devcb);
#define MCFG_HD61700_KB_WRITE_CB(_devcb) \
- devcb = &downcast<hd61700_cpu_device &>(*device).set_kb_write_callback(DEVCB_##_devcb);
+ downcast<hd61700_cpu_device &>(*device).set_kb_write_callback(DEVCB_##_devcb);
#define MCFG_HD61700_KB_READ_CB(_devcb) \
- devcb = &downcast<hd61700_cpu_device &>(*device).set_kb_read_callback(DEVCB_##_devcb);
+ downcast<hd61700_cpu_device &>(*device).set_kb_read_callback(DEVCB_##_devcb);
#define MCFG_HD61700_PORT_WRITE_CB(_devcb) \
- devcb = &downcast<hd61700_cpu_device &>(*device).set_port_write_callback(DEVCB_##_devcb);
+ downcast<hd61700_cpu_device &>(*device).set_port_write_callback(DEVCB_##_devcb);
#define MCFG_HD61700_PORT_READ_CB(_devcb) \
- devcb = &downcast<hd61700_cpu_device &>(*device).set_port_read_callback(DEVCB_##_devcb);
+ downcast<hd61700_cpu_device &>(*device).set_port_read_callback(DEVCB_##_devcb);
//**************************************************************************
diff --git a/src/devices/cpu/hmcs40/hmcs40.h b/src/devices/cpu/hmcs40/hmcs40.h
index 355780dee11..ffa5ea26d5e 100644
--- a/src/devices/cpu/hmcs40/hmcs40.h
+++ b/src/devices/cpu/hmcs40/hmcs40.h
@@ -16,15 +16,15 @@
// max 8 4-bit R ports
#define MCFG_HMCS40_READ_R_CB(R, _devcb) \
- devcb = &downcast<hmcs40_cpu_device &>(*device).set_read_r##R##_callback(DEVCB_##_devcb);
+ downcast<hmcs40_cpu_device &>(*device).set_read_r##R##_callback(DEVCB_##_devcb);
#define MCFG_HMCS40_WRITE_R_CB(R, _devcb) \
- devcb = &downcast<hmcs40_cpu_device &>(*device).set_write_r##R##_callback(DEVCB_##_devcb);
+ downcast<hmcs40_cpu_device &>(*device).set_write_r##R##_callback(DEVCB_##_devcb);
// 16-bit discrete
#define MCFG_HMCS40_READ_D_CB(_devcb) \
- devcb = &downcast<hmcs40_cpu_device &>(*device).set_read_d_callback(DEVCB_##_devcb);
+ downcast<hmcs40_cpu_device &>(*device).set_read_d_callback(DEVCB_##_devcb);
#define MCFG_HMCS40_WRITE_D_CB(_devcb) \
- devcb = &downcast<hmcs40_cpu_device &>(*device).set_write_d_callback(DEVCB_##_devcb);
+ downcast<hmcs40_cpu_device &>(*device).set_write_d_callback(DEVCB_##_devcb);
enum
{
diff --git a/src/devices/cpu/hphybrid/hphybrid.h b/src/devices/cpu/hphybrid/hphybrid.h
index 404100a8115..4b03035950a 100644
--- a/src/devices/cpu/hphybrid/hphybrid.h
+++ b/src/devices/cpu/hphybrid/hphybrid.h
@@ -45,7 +45,7 @@
// PA changed callback
#define MCFG_HPHYBRID_PA_CHANGED(_devcb) \
- devcb = &downcast<hp_hybrid_cpu_device &>(*device).set_pa_changed_func(DEVCB_##_devcb);
+ downcast<hp_hybrid_cpu_device &>(*device).set_pa_changed_func(DEVCB_##_devcb);
class hp_hybrid_cpu_device : public cpu_device
{
diff --git a/src/devices/cpu/i386/i386.h b/src/devices/cpu/i386/i386.h
index c6039009209..92a5e4ddbc5 100644
--- a/src/devices/cpu/i386/i386.h
+++ b/src/devices/cpu/i386/i386.h
@@ -26,10 +26,10 @@
#define MCFG_I386_SMIACT(_devcb) \
- devcb = &downcast<i386_device &>(*device).set_smiact(DEVCB_##_devcb);
+ downcast<i386_device &>(*device).set_smiact(DEVCB_##_devcb);
#define MCFG_I486_FERR_HANDLER(_devcb) \
- devcb = &downcast<i386_device &>(*device).set_ferr(DEVCB_##_devcb);
+ downcast<i386_device &>(*device).set_ferr(DEVCB_##_devcb);
#define X86_NUM_CPUS 4
diff --git a/src/devices/cpu/i8085/i8085.h b/src/devices/cpu/i8085/i8085.h
index 8c70aa03d71..899dd0b85b8 100644
--- a/src/devices/cpu/i8085/i8085.h
+++ b/src/devices/cpu/i8085/i8085.h
@@ -18,19 +18,19 @@
// STATUS changed callback
#define MCFG_I8085A_STATUS(_devcb) \
- devcb = &downcast<i8085a_cpu_device &>(*device).set_out_status_func(DEVCB_##_devcb);
+ downcast<i8085a_cpu_device &>(*device).set_out_status_func(DEVCB_##_devcb);
// INTE changed callback
#define MCFG_I8085A_INTE(_devcb) \
- devcb = &downcast<i8085a_cpu_device &>(*device).set_out_inte_func(DEVCB_##_devcb);
+ downcast<i8085a_cpu_device &>(*device).set_out_inte_func(DEVCB_##_devcb);
// SID changed callback (8085A only)
#define MCFG_I8085A_SID(_devcb) \
- devcb = &downcast<i8085a_cpu_device &>(*device).set_in_sid_func(DEVCB_##_devcb);
+ downcast<i8085a_cpu_device &>(*device).set_in_sid_func(DEVCB_##_devcb);
// SOD changed callback (8085A only)
#define MCFG_I8085A_SOD(_devcb) \
- devcb = &downcast<i8085a_cpu_device &>(*device).set_out_sod_func(DEVCB_##_devcb);
+ downcast<i8085a_cpu_device &>(*device).set_out_sod_func(DEVCB_##_devcb);
// CLK rate callback (8085A only)
#define MCFG_I8085A_CLK_OUT_DEVICE(_tag) \
@@ -71,6 +71,10 @@ public:
template <class Object> devcb_base &set_in_sid_func(Object &&cb) { return m_in_sid_func.set_callback(std::forward<Object>(cb)); }
template <class Object> devcb_base &set_out_sod_func(Object &&cb) { return m_out_sod_func.set_callback(std::forward<Object>(cb)); }
template <typename Object> void set_clk_out(Object &&cb) { m_clk_out_func = std::forward<Object>(cb); }
+ auto out_status_func() { return m_out_status_func.bind(); }
+ auto out_inte_func() { return m_out_inte_func.bind(); }
+ auto in_sid_func() { return m_in_sid_func.bind(); }
+ auto out_sod_func() { return m_out_sod_func.bind(); }
protected:
i8085a_cpu_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock, int cputype);
diff --git a/src/devices/cpu/i8089/i8089.h b/src/devices/cpu/i8089/i8089.h
index 57dc9baea3d..0ea8c523f0a 100644
--- a/src/devices/cpu/i8089/i8089.h
+++ b/src/devices/cpu/i8089/i8089.h
@@ -26,10 +26,10 @@
downcast<i8089_device &>(*device).set_data_width(_data_width);
#define MCFG_I8089_SINTR1(_sintr1) \
- devcb = &downcast<i8089_device *>(device)->set_sintr1_callback(DEVCB_##_sintr1);
+ downcast<i8089_device *>(device)->set_sintr1_callback(DEVCB_##_sintr1);
#define MCFG_I8089_SINTR2(_sintr2) \
- devcb = &downcast<i8089_device *>(device)->set_sintr2_callback(DEVCB_##_sintr2);
+ downcast<i8089_device *>(device)->set_sintr2_callback(DEVCB_##_sintr2);
//**************************************************************************
diff --git a/src/devices/cpu/i86/i186.h b/src/devices/cpu/i86/i186.h
index ca281a58604..297a185ba66 100644
--- a/src/devices/cpu/i86/i186.h
+++ b/src/devices/cpu/i86/i186.h
@@ -20,6 +20,10 @@ public:
template <class Object> devcb_base &set_chip_select_callback(Object &&cb) { return m_out_chip_select_func.set_callback(std::forward<Object>(cb)); }
template <class Object> devcb_base &set_tmrout0_handler(Object &&cb) { return m_out_tmrout0_func.set_callback(std::forward<Object>(cb)); }
template <class Object> devcb_base &set_tmrout1_handler(Object &&cb) { return m_out_tmrout1_func.set_callback(std::forward<Object>(cb)); }
+ auto read_slave_ack_callback() { return m_read_slave_ack_func.bind(); }
+ auto chip_select_callback() { return m_out_chip_select_func.bind(); }
+ auto tmrout0_handler() { return m_out_tmrout0_func.bind(); }
+ auto tmrout1_handler() { return m_out_tmrout1_func.bind(); }
IRQ_CALLBACK_MEMBER(int_callback);
DECLARE_WRITE_LINE_MEMBER(drq0_w) { if(state) drq_callback(0); m_dma[0].drq_state = state; }
@@ -157,15 +161,15 @@ public:
};
#define MCFG_80186_IRQ_SLAVE_ACK(_devcb) \
- devcb = &downcast<i80186_cpu_device &>(*device).set_read_slave_ack_callback(DEVCB_##_devcb);
+ downcast<i80186_cpu_device &>(*device).set_read_slave_ack_callback(DEVCB_##_devcb);
#define MCFG_80186_CHIP_SELECT_CB(_devcb) \
- devcb = &downcast<i80186_cpu_device &>(*device).set_chip_select_callback(DEVCB_##_devcb);
+ downcast<i80186_cpu_device &>(*device).set_chip_select_callback(DEVCB_##_devcb);
#define MCFG_80186_TMROUT0_HANDLER(_devcb) \
- devcb = &downcast<i80186_cpu_device &>(*device).set_tmrout0_handler(DEVCB_##_devcb);
+ downcast<i80186_cpu_device &>(*device).set_tmrout0_handler(DEVCB_##_devcb);
#define MCFG_80186_TMROUT1_HANDLER(_devcb) \
- devcb = &downcast<i80186_cpu_device &>(*device).set_tmrout1_handler(DEVCB_##_devcb);
+ downcast<i80186_cpu_device &>(*device).set_tmrout1_handler(DEVCB_##_devcb);
#endif // MAME_CPU_I86_I186_H
diff --git a/src/devices/cpu/i86/i286.h b/src/devices/cpu/i86/i286.h
index dbf5e245673..0012cd63699 100644
--- a/src/devices/cpu/i86/i286.h
+++ b/src/devices/cpu/i86/i286.h
@@ -165,6 +165,6 @@ private:
downcast<i80286_cpu_device &>(*device).set_a20_callback(i80286_cpu_device::a20_cb(&_class::_a20_cb, this));
#define MCFG_80286_SHUTDOWN(_devcb) \
- devcb = &downcast<i80286_cpu_device &>(*device).set_shutdown_callback(DEVCB_##_devcb);
+ downcast<i80286_cpu_device &>(*device).set_shutdown_callback(DEVCB_##_devcb);
#endif // MAME_CPU_I86_I286_H
diff --git a/src/devices/cpu/i86/i86.h b/src/devices/cpu/i86/i86.h
index 2631003c576..55202931ae1 100644
--- a/src/devices/cpu/i86/i86.h
+++ b/src/devices/cpu/i86/i86.h
@@ -17,10 +17,10 @@ DECLARE_DEVICE_TYPE(I8088, i8088_cpu_device)
#define MCFG_I8086_LOCK_HANDLER(_write) \
- devcb = &downcast<i8086_common_cpu_device &>(*device).set_lock_handler(DEVCB_##_write);
+ downcast<i8086_common_cpu_device &>(*device).set_lock_handler(DEVCB_##_write);
#define MCFG_I8086_IF_HANDLER(_write) \
- devcb = &downcast<i8086_cpu_device &>(*device).set_if_handler(DEVCB_##_write);
+ downcast<i8086_cpu_device &>(*device).set_if_handler(DEVCB_##_write);
#define MCFG_I8086_STACK_MAP(map) \
MCFG_DEVICE_ADDRESS_MAP(i8086_cpu_device::AS_STACK, map)
@@ -32,10 +32,10 @@ DECLARE_DEVICE_TYPE(I8088, i8088_cpu_device)
MCFG_DEVICE_ADDRESS_MAP(i8086_cpu_device::AS_EXTRA, map)
#define MCFG_I8086_ESC_OPCODE_HANDLER(_write) \
- devcb = &downcast<i8086_cpu_device &>(*device).set_esc_opcode_handler(DEVCB_##_write);
+ downcast<i8086_cpu_device &>(*device).set_esc_opcode_handler(DEVCB_##_write);
#define MCFG_I8086_ESC_DATA_HANDLER(_write) \
- devcb = &downcast<i8086_cpu_device &>(*device).set_esc_data_handler(DEVCB_##_write);
+ downcast<i8086_cpu_device &>(*device).set_esc_data_handler(DEVCB_##_write);
enum
{
diff --git a/src/devices/cpu/jaguar/jaguar.h b/src/devices/cpu/jaguar/jaguar.h
index 40a4292f65b..79c6b77bc1c 100644
--- a/src/devices/cpu/jaguar/jaguar.h
+++ b/src/devices/cpu/jaguar/jaguar.h
@@ -65,7 +65,7 @@ enum
***************************************************************************/
#define MCFG_JAGUAR_IRQ_HANDLER(_devcb) \
- devcb = &downcast<jaguar_cpu_device &>(*device).set_int_func(DEVCB_##_devcb);
+ downcast<jaguar_cpu_device &>(*device).set_int_func(DEVCB_##_devcb);
/***************************************************************************
diff --git a/src/devices/cpu/lc8670/lc8670.h b/src/devices/cpu/lc8670/lc8670.h
index c52a2a7ae72..3856b4a8e4b 100644
--- a/src/devices/cpu/lc8670/lc8670.h
+++ b/src/devices/cpu/lc8670/lc8670.h
@@ -49,7 +49,7 @@ enum
downcast<lc8670_cpu_device &>(*device).set_cpu_clock(lc8670_cpu_device::clock_source::RC, _rc_clock); \
downcast<lc8670_cpu_device &>(*device).set_cpu_clock(lc8670_cpu_device::clock_source::CF, _cf_clock);
#define MCFG_LC8670_BANKSWITCH_CB(_devcb) \
- devcb = &downcast<lc8670_cpu_device &>(*device).set_bankswitch_cb(DEVCB_##_devcb);
+ downcast<lc8670_cpu_device &>(*device).set_bankswitch_cb(DEVCB_##_devcb);
#define MCFG_LC8670_LCD_UPDATE_CB(_cb) \
downcast<lc8670_cpu_device &>(*device).set_lcd_update_cb(_cb);
diff --git a/src/devices/cpu/lh5801/lh5801.h b/src/devices/cpu/lh5801/lh5801.h
index 1d004105a9c..02a359b6cb1 100644
--- a/src/devices/cpu/lh5801/lh5801.h
+++ b/src/devices/cpu/lh5801/lh5801.h
@@ -61,7 +61,7 @@ enum
#define MCFG_LH5801_IN(_devcb) \
- devcb = &downcast<lh5801_cpu_device &>(*device).set_in_func(DEVCB_##_devcb);
+ downcast<lh5801_cpu_device &>(*device).set_in_func(DEVCB_##_devcb);
class lh5801_cpu_device : public cpu_device
diff --git a/src/devices/cpu/lr35902/lr35902.h b/src/devices/cpu/lr35902/lr35902.h
index 5fad91ff8e2..ab70377a21e 100644
--- a/src/devices/cpu/lr35902/lr35902.h
+++ b/src/devices/cpu/lr35902/lr35902.h
@@ -7,7 +7,7 @@
#define MCFG_LR35902_TIMER_CB(_devcb) \
- devcb = &downcast<lr35902_cpu_device &>(*device).set_timer_cb(DEVCB_##_devcb);
+ downcast<lr35902_cpu_device &>(*device).set_timer_cb(DEVCB_##_devcb);
// The first release of this CPU has a bug where the programcounter
// is not incremented properly after an interrupt after the halt opcode.
@@ -19,7 +19,7 @@
// a 16-bit register in the $fe** region.
// note: oldval is in hiword, newval is in loword
#define MCFG_LR35902_INCDEC16_CB(_devcb) \
- devcb = &downcast<lr35902_cpu_device &>(*device).set_incdec16_cb(DEVCB_##_devcb);
+ downcast<lr35902_cpu_device &>(*device).set_incdec16_cb(DEVCB_##_devcb);
enum
diff --git a/src/devices/cpu/m6502/m5074x.h b/src/devices/cpu/m6502/m5074x.h
index 2782d09f2d7..cb1b71a962c 100644
--- a/src/devices/cpu/m6502/m5074x.h
+++ b/src/devices/cpu/m6502/m5074x.h
@@ -20,28 +20,28 @@
//**************************************************************************
#define MCFG_M5074X_PORT0_READ_CALLBACK(_read) \
- devcb = &downcast<m5074x_device &>(*device).set_p0_rd_callback(DEVCB_##_read);
+ downcast<m5074x_device &>(*device).set_p0_rd_callback(DEVCB_##_read);
#define MCFG_M5074X_PORT1_READ_CALLBACK(_read) \
- devcb = &downcast<m5074x_device &>(*device).set_p1_rd_callback(DEVCB_##_read);
+ downcast<m5074x_device &>(*device).set_p1_rd_callback(DEVCB_##_read);
#define MCFG_M5074X_PORT2_READ_CALLBACK(_read) \
- devcb = &downcast<m5074x_device &>(*device).set_p2_rd_callback(DEVCB_##_read);
+ downcast<m5074x_device &>(*device).set_p2_rd_callback(DEVCB_##_read);
#define MCFG_M5074X_PORT3_READ_CALLBACK(_read) \
- devcb = &downcast<m5074x_device &>(*device).set_p3_rd_callback(DEVCB_##_read);
+ downcast<m5074x_device &>(*device).set_p3_rd_callback(DEVCB_##_read);
#define MCFG_M5074X_PORT0_WRITE_CALLBACK(_write) \
- devcb = &downcast<m5074x_device &>(*device).set_p0_wr_callback(DEVCB_##_write);
+ downcast<m5074x_device &>(*device).set_p0_wr_callback(DEVCB_##_write);
#define MCFG_M5074X_PORT1_WRITE_CALLBACK(_write) \
- devcb = &downcast<m5074x_device &>(*device).set_p1_wr_callback(DEVCB_##_write);
+ downcast<m5074x_device &>(*device).set_p1_wr_callback(DEVCB_##_write);
#define MCFG_M5074X_PORT2_WRITE_CALLBACK(_write) \
- devcb = &downcast<m5074x_device &>(*device).set_p2_wr_callback(DEVCB_##_write);
+ downcast<m5074x_device &>(*device).set_p2_wr_callback(DEVCB_##_write);
#define MCFG_M5074X_PORT3_WRITE_CALLBACK(_write) \
- devcb = &downcast<m5074x_device &>(*device).set_p3_wr_callback(DEVCB_##_write);
+ downcast<m5074x_device &>(*device).set_p3_wr_callback(DEVCB_##_write);
//**************************************************************************
// TYPE DEFINITIONS
diff --git a/src/devices/cpu/m6502/m6502.h b/src/devices/cpu/m6502/m6502.h
index c16757581f3..0a230508e43 100644
--- a/src/devices/cpu/m6502/m6502.h
+++ b/src/devices/cpu/m6502/m6502.h
@@ -15,7 +15,7 @@
downcast<m6502_device *>(device)->disable_cache();
#define MCFG_M6502_SYNC_CALLBACK(_cb) \
- devcb = &downcast<m6502_device &>(*device).set_sync_callback(DEVCB_##_cb);
+ downcast<m6502_device &>(*device).set_sync_callback(DEVCB_##_cb);
class m6502_device : public cpu_device {
public:
diff --git a/src/devices/cpu/m6800/m6801.h b/src/devices/cpu/m6800/m6801.h
index 8c8c98d8104..34a371edcef 100644
--- a/src/devices/cpu/m6800/m6801.h
+++ b/src/devices/cpu/m6800/m6801.h
@@ -51,9 +51,9 @@ enum
#define MCFG_M6801_SC2(_devcb) \
- devcb = &downcast<m6801_cpu_device &>(*device).set_out_sc2_func(DEVCB_##_devcb);
+ downcast<m6801_cpu_device &>(*device).set_out_sc2_func(DEVCB_##_devcb);
#define MCFG_M6801_SER_TX(_devcb) \
- devcb = &downcast<m6801_cpu_device &>(*device).set_out_sertx_func(DEVCB_##_devcb);
+ downcast<m6801_cpu_device &>(*device).set_out_sertx_func(DEVCB_##_devcb);
class m6801_cpu_device : public m6800_cpu_device
diff --git a/src/devices/cpu/m6805/m68705.h b/src/devices/cpu/m6805/m68705.h
index 04e2e273640..ac9f4942db9 100644
--- a/src/devices/cpu/m6805/m68705.h
+++ b/src/devices/cpu/m6805/m68705.h
@@ -25,25 +25,25 @@ DECLARE_DEVICE_TYPE(M68705U3, m68705u3_device)
// ======================> m68705_device
#define MCFG_M68705_PORTA_R_CB(obj) \
- devcb = &downcast<m68705_device &>(*device).set_port_cb_r<0>(DEVCB_##obj);
+ downcast<m68705_device &>(*device).set_port_cb_r<0>(DEVCB_##obj);
#define MCFG_M68705_PORTB_R_CB(obj) \
- devcb = &downcast<m68705_device &>(*device).set_port_cb_r<1>(DEVCB_##obj);
+ downcast<m68705_device &>(*device).set_port_cb_r<1>(DEVCB_##obj);
#define MCFG_M68705_PORTC_R_CB(obj) \
- devcb = &downcast<m68705_device &>(*device).set_port_cb_r<2>(DEVCB_##obj);
+ downcast<m68705_device &>(*device).set_port_cb_r<2>(DEVCB_##obj);
#define MCFG_M68705_PORTD_R_CB(obj) \
- devcb = &downcast<m68705_device &>(*device).set_port_cb_r<3>(DEVCB_##obj);
+ downcast<m68705_device &>(*device).set_port_cb_r<3>(DEVCB_##obj);
#define MCFG_M68705_PORTA_W_CB(obj) \
- devcb = &downcast<m68705_device &>(*device).set_port_cb_w<0>(DEVCB_##obj);
+ downcast<m68705_device &>(*device).set_port_cb_w<0>(DEVCB_##obj);
#define MCFG_M68705_PORTB_W_CB(obj) \
- devcb = &downcast<m68705_device &>(*device).set_port_cb_w<1>(DEVCB_##obj);
+ downcast<m68705_device &>(*device).set_port_cb_w<1>(DEVCB_##obj);
#define MCFG_M68705_PORTC_W_CB(obj) \
- devcb = &downcast<m68705_device &>(*device).set_port_cb_w<2>(DEVCB_##obj);
+ downcast<m68705_device &>(*device).set_port_cb_w<2>(DEVCB_##obj);
class m68705_device : public m6805_base_device, public device_nvram_interface
diff --git a/src/devices/cpu/m6805/m68hc05.h b/src/devices/cpu/m6805/m68hc05.h
index 99dae24ffeb..4aaa856b867 100644
--- a/src/devices/cpu/m6805/m68hc05.h
+++ b/src/devices/cpu/m6805/m68hc05.h
@@ -26,31 +26,31 @@ DECLARE_DEVICE_TYPE(M68HC705C8A, m68hc705c8a_device)
// ======================> m68hc05_device
#define MCFG_M68HC05_PORTA_R_CB(obj) \
- devcb = &downcast<m68hc05_device &>(*device).set_port_cb_r<0>(DEVCB_##obj);
+ downcast<m68hc05_device &>(*device).set_port_cb_r<0>(DEVCB_##obj);
#define MCFG_M68HC05_PORTB_R_CB(obj) \
- devcb = &downcast<m68hc05_device &>(*device).set_port_cb_r<1>(DEVCB_##obj);
+ downcast<m68hc05_device &>(*device).set_port_cb_r<1>(DEVCB_##obj);
#define MCFG_M68HC05_PORTC_R_CB(obj) \
- devcb = &downcast<m68hc05_device &>(*device).set_port_cb_r<2>(DEVCB_##obj);
+ downcast<m68hc05_device &>(*device).set_port_cb_r<2>(DEVCB_##obj);
#define MCFG_M68HC05_PORTD_R_CB(obj) \
- devcb = &downcast<m68hc05_device &>(*device).set_port_cb_r<3>(DEVCB_##obj);
+ downcast<m68hc05_device &>(*device).set_port_cb_r<3>(DEVCB_##obj);
#define MCFG_M68HC05_PORTA_W_CB(obj) \
- devcb = &downcast<m68hc05_device &>(*device).set_port_cb_w<0>(DEVCB_##obj);
+ downcast<m68hc05_device &>(*device).set_port_cb_w<0>(DEVCB_##obj);
#define MCFG_M68HC05_PORTB_W_CB(obj) \
- devcb = &downcast<m68hc05_device &>(*device).set_port_cb_w<1>(DEVCB_##obj);
+ downcast<m68hc05_device &>(*device).set_port_cb_w<1>(DEVCB_##obj);
#define MCFG_M68HC05_PORTC_W_CB(obj) \
- devcb = &downcast<m68hc05_device &>(*device).set_port_cb_w<2>(DEVCB_##obj);
+ downcast<m68hc05_device &>(*device).set_port_cb_w<2>(DEVCB_##obj);
#define MCFG_M68HC05_PORTD_W_CB(obj) \
- devcb = &downcast<m68hc05_device &>(*device).set_port_cb_w<3>(DEVCB_##obj);
+ downcast<m68hc05_device &>(*device).set_port_cb_w<3>(DEVCB_##obj);
#define MCFG_M68HC05_TCMP_CB(obj) \
- devcb = &downcast<m68hc05_device &>(*device).set_tcmp_cb(DEVCB_##obj);
+ downcast<m68hc05_device &>(*device).set_tcmp_cb(DEVCB_##obj);
class m68hc05_device : public m6805_base_device
diff --git a/src/devices/cpu/m6809/konami.h b/src/devices/cpu/m6809/konami.h
index 08d1c75026e..0ca8adda93f 100644
--- a/src/devices/cpu/m6809/konami.h
+++ b/src/devices/cpu/m6809/konami.h
@@ -21,7 +21,7 @@
//**************************************************************************
#define MCFG_KONAMICPU_LINE_CB(_devcb) \
- devcb = &downcast<konami_cpu_device &>(*device).set_line_callback(DEVCB_##_devcb);
+ downcast<konami_cpu_device &>(*device).set_line_callback(DEVCB_##_devcb);
// device type definition
diff --git a/src/devices/cpu/m6809/m6809.h b/src/devices/cpu/m6809/m6809.h
index 6451a3074ca..fdd9120b1ca 100644
--- a/src/devices/cpu/m6809/m6809.h
+++ b/src/devices/cpu/m6809/m6809.h
@@ -307,7 +307,7 @@ public:
// MC6809E has LIC line to indicate opcode/data fetch
#define MCFG_MC6809E_LIC_CB(_devcb) \
- devcb = &downcast<mc6809e_device &>(*device).set_lic_cb(DEVCB_##_devcb);
+ downcast<mc6809e_device &>(*device).set_lic_cb(DEVCB_##_devcb);
class mc6809e_device : public m6809_base_device
diff --git a/src/devices/cpu/mb88xx/mb88xx.h b/src/devices/cpu/mb88xx/mb88xx.h
index 6afe25aa57d..8c071ad8cec 100644
--- a/src/devices/cpu/mb88xx/mb88xx.h
+++ b/src/devices/cpu/mb88xx/mb88xx.h
@@ -54,47 +54,47 @@
// K (K3-K0): input-only port
#define MCFG_MB88XX_READ_K_CB(_devcb) \
- devcb = &downcast<mb88_cpu_device &>(*device).set_read_k_callback(DEVCB_##_devcb);
+ downcast<mb88_cpu_device &>(*device).set_read_k_callback(DEVCB_##_devcb);
// O (O7-O4 = OH, O3-O0 = OL): output through PLA
#define MCFG_MB88XX_WRITE_O_CB(_devcb) \
- devcb = &downcast<mb88_cpu_device &>(*device).set_write_o_callback(DEVCB_##_devcb);
+ downcast<mb88_cpu_device &>(*device).set_write_o_callback(DEVCB_##_devcb);
// P (P3-P0): output-only port
#define MCFG_MB88XX_WRITE_P_CB(_devcb) \
- devcb = &downcast<mb88_cpu_device &>(*device).set_write_p_callback(DEVCB_##_devcb);
+ downcast<mb88_cpu_device &>(*device).set_write_p_callback(DEVCB_##_devcb);
// R0 (R3-R0): input/output port
#define MCFG_MB88XX_READ_R0_CB(_devcb) \
- devcb = &downcast<mb88_cpu_device &>(*device).set_read_r_callback(0, DEVCB_##_devcb);
+ downcast<mb88_cpu_device &>(*device).set_read_r_callback(0, DEVCB_##_devcb);
#define MCFG_MB88XX_WRITE_R0_CB(_devcb) \
- devcb = &downcast<mb88_cpu_device &>(*device).set_write_r_callback(0, DEVCB_##_devcb);
+ downcast<mb88_cpu_device &>(*device).set_write_r_callback(0, DEVCB_##_devcb);
// R1 (R7-R4): input/output port
#define MCFG_MB88XX_READ_R1_CB(_devcb) \
- devcb = &downcast<mb88_cpu_device &>(*device).set_read_r_callback(1, DEVCB_##_devcb);
+ downcast<mb88_cpu_device &>(*device).set_read_r_callback(1, DEVCB_##_devcb);
#define MCFG_MB88XX_WRITE_R1_CB(_devcb) \
- devcb = &downcast<mb88_cpu_device &>(*device).set_write_r_callback(1, DEVCB_##_devcb);
+ downcast<mb88_cpu_device &>(*device).set_write_r_callback(1, DEVCB_##_devcb);
// R2 (R11-R8): input/output port
#define MCFG_MB88XX_READ_R2_CB(_devcb) \
- devcb = &downcast<mb88_cpu_device &>(*device).set_read_r_callback(2, DEVCB_##_devcb);
+ downcast<mb88_cpu_device &>(*device).set_read_r_callback(2, DEVCB_##_devcb);
#define MCFG_MB88XX_WRITE_R2_CB(_devcb) \
- devcb = &downcast<mb88_cpu_device &>(*device).set_write_r_callback(2, DEVCB_##_devcb);
+ downcast<mb88_cpu_device &>(*device).set_write_r_callback(2, DEVCB_##_devcb);
// R3 (R15-R12): input/output port
#define MCFG_MB88XX_READ_R3_CB(_devcb) \
- devcb = &downcast<mb88_cpu_device &>(*device).set_read_r_callback(3, DEVCB_##_devcb);
+ downcast<mb88_cpu_device &>(*device).set_read_r_callback(3, DEVCB_##_devcb);
#define MCFG_MB88XX_WRITE_R3_CB(_devcb) \
- devcb = &downcast<mb88_cpu_device &>(*device).set_write_r_callback(3, DEVCB_##_devcb);
+ downcast<mb88_cpu_device &>(*device).set_write_r_callback(3, DEVCB_##_devcb);
// SI: serial input
#define MCFG_MB88XX_READ_SI_CB(_devcb) \
- devcb = &downcast<mb88_cpu_device &>(*device).set_read_si_callback(DEVCB_##_devcb);
+ downcast<mb88_cpu_device &>(*device).set_read_si_callback(DEVCB_##_devcb);
// SO: serial output
#define MCFG_MB88XX_WRITE_SO_CB(_devcb) \
- devcb = &downcast<mb88_cpu_device &>(*device).set_write_so_callback(DEVCB_##_devcb);
+ downcast<mb88_cpu_device &>(*device).set_write_so_callback(DEVCB_##_devcb);
// Configure 32 byte PLA; if nullptr (default) assume direct output
#define MCFG_MB88XX_OUTPUT_PLA(_pla) \
diff --git a/src/devices/cpu/mcs40/mcs40.h b/src/devices/cpu/mcs40/mcs40.h
index a56a1813f34..73cc2a10fe4 100644
--- a/src/devices/cpu/mcs40/mcs40.h
+++ b/src/devices/cpu/mcs40/mcs40.h
@@ -36,65 +36,65 @@ enum
downcast<i4004_cpu_device &>(*device).set_bus_cycle_cb((MCS40CB_##obj));
#define MCFG_I4004_SYNC_CB(obj) \
- devcb = &downcast<i4004_cpu_device &>(*device).set_sync_cb(DEVCB_##obj);
+ downcast<i4004_cpu_device &>(*device).set_sync_cb(DEVCB_##obj);
#define MCFG_I4004_CM_ROM_CB(obj) \
- devcb = &downcast<i4004_cpu_device &>(*device).set_cm_rom_cb(DEVCB_##obj);
+ downcast<i4004_cpu_device &>(*device).set_cm_rom_cb(DEVCB_##obj);
#define MCFG_I4004_CM_RAM0_CB(obj) \
- devcb = &downcast<i4004_cpu_device &>(*device).set_cm_ram_cb<0>(DEVCB_##obj);
+ downcast<i4004_cpu_device &>(*device).set_cm_ram_cb<0>(DEVCB_##obj);
#define MCFG_I4004_CM_RAM1_CB(obj) \
- devcb = &downcast<i4004_cpu_device &>(*device).set_cm_ram_cb<1>(DEVCB_##obj);
+ downcast<i4004_cpu_device &>(*device).set_cm_ram_cb<1>(DEVCB_##obj);
#define MCFG_I4004_CM_RAM2_CB(obj) \
- devcb = &downcast<i4004_cpu_device &>(*device).set_cm_ram_cb<2>(DEVCB_##obj);
+ downcast<i4004_cpu_device &>(*device).set_cm_ram_cb<2>(DEVCB_##obj);
#define MCFG_I4004_CM_RAM3_CB(obj) \
- devcb = &downcast<i4004_cpu_device &>(*device).set_cm_ram_cb<3>(DEVCB_##obj);
+ downcast<i4004_cpu_device &>(*device).set_cm_ram_cb<3>(DEVCB_##obj);
#define MCFG_I4004_4289_PM_CB(obj) \
- devcb = &downcast<i4004_cpu_device &>(*device).set_4289_pm_cb(DEVCB_##obj);
+ downcast<i4004_cpu_device &>(*device).set_4289_pm_cb(DEVCB_##obj);
#define MCFG_I4004_4289_F_L_CB(obj) \
- devcb = &downcast<i4004_cpu_device &>(*device).set_4289_f_l_cb(DEVCB_##obj);
+ downcast<i4004_cpu_device &>(*device).set_4289_f_l_cb(DEVCB_##obj);
#define MCFG_I4040_BUS_CYCLE_CB(obj) \
downcast<i4040_cpu_device &>(*device).set_bus_cycle_cb((MCS40CB_##obj));
#define MCFG_I4040_SYNC_CB(obj) \
- devcb = &downcast<i4040_cpu_device &>(*device).set_sync_cb(DEVCB_##obj);
+ downcast<i4040_cpu_device &>(*device).set_sync_cb(DEVCB_##obj);
#define MCFG_I4040_CM_ROM0_CB(obj) \
- devcb = &downcast<i4040_cpu_device &>(*device).set_cm_rom_cb<0>(DEVCB_##obj);
+ downcast<i4040_cpu_device &>(*device).set_cm_rom_cb<0>(DEVCB_##obj);
#define MCFG_I4040_CM_ROM1_CB(obj) \
- devcb = &downcast<i4040_cpu_device &>(*device).set_cm_rom_cb<1>(DEVCB_##obj);
+ downcast<i4040_cpu_device &>(*device).set_cm_rom_cb<1>(DEVCB_##obj);
#define MCFG_I4040_CM_RAM0_CB(obj) \
- devcb = &downcast<i4040_cpu_device &>(*device).set_cm_ram_cb<0>(DEVCB_##obj);
+ downcast<i4040_cpu_device &>(*device).set_cm_ram_cb<0>(DEVCB_##obj);
#define MCFG_I4040_CM_RAM1_CB(obj) \
- devcb = &downcast<i4040_cpu_device &>(*device).set_cm_ram_cb<1>(DEVCB_##obj);
+ downcast<i4040_cpu_device &>(*device).set_cm_ram_cb<1>(DEVCB_##obj);
#define MCFG_I4040_CM_RAM2_CB(obj) \
- devcb = &downcast<i4040_cpu_device &>(*device).set_cm_ram_cb<2>(DEVCB_##obj);
+ downcast<i4040_cpu_device &>(*device).set_cm_ram_cb<2>(DEVCB_##obj);
#define MCFG_I4040_CM_RAM3_CB(obj) \
- devcb = &downcast<i4040_cpu_device &>(*device).set_cm_ram_cb<3>(DEVCB_##obj);
+ downcast<i4040_cpu_device &>(*device).set_cm_ram_cb<3>(DEVCB_##obj);
#define MCFG_I4040_CY_CB(obj) \
- devcb = &downcast<i4040_cpu_device &>(*device).set_cy_cb(DEVCB_##obj);
+ downcast<i4040_cpu_device &>(*device).set_cy_cb(DEVCB_##obj);
#define MCFG_I4040_STP_ACK_CB(obj) \
- devcb = &downcast<i4040_cpu_device &>(*device).set_stp_ack_cb(DEVCB_##obj);
+ downcast<i4040_cpu_device &>(*device).set_stp_ack_cb(DEVCB_##obj);
#define MCFG_I4040_4289_PM_CB(obj) \
- devcb = &downcast<i4040_cpu_device &>(*device).set_4289_pm_cb(DEVCB_##obj);
+ downcast<i4040_cpu_device &>(*device).set_4289_pm_cb(DEVCB_##obj);
#define MCFG_I4040_4289_F_L_CB(obj) \
- devcb = &downcast<i4040_cpu_device &>(*device).set_4289_f_l_cb(DEVCB_##obj);
+ downcast<i4040_cpu_device &>(*device).set_4289_f_l_cb(DEVCB_##obj);
diff --git a/src/devices/cpu/mcs48/mcs48.h b/src/devices/cpu/mcs48/mcs48.h
index ae26c1a2d62..fe8affa2387 100644
--- a/src/devices/cpu/mcs48/mcs48.h
+++ b/src/devices/cpu/mcs48/mcs48.h
@@ -69,33 +69,33 @@ enum
#define MCFG_MCS48_PORT_P1_IN_CB(_devcb) \
- devcb = &downcast<mcs48_cpu_device &>(*device).set_port_in_cb(0, DEVCB_##_devcb);
+ downcast<mcs48_cpu_device &>(*device).set_port_in_cb(0, DEVCB_##_devcb);
#define MCFG_MCS48_PORT_P1_OUT_CB(_devcb) \
- devcb = &downcast<mcs48_cpu_device &>(*device).set_port_out_cb(0, DEVCB_##_devcb);
+ downcast<mcs48_cpu_device &>(*device).set_port_out_cb(0, DEVCB_##_devcb);
#define MCFG_MCS48_PORT_P2_IN_CB(_devcb) \
- devcb = &downcast<mcs48_cpu_device &>(*device).set_port_in_cb(1, DEVCB_##_devcb);
+ downcast<mcs48_cpu_device &>(*device).set_port_in_cb(1, DEVCB_##_devcb);
#define MCFG_MCS48_PORT_P2_OUT_CB(_devcb) \
- devcb = &downcast<mcs48_cpu_device &>(*device).set_port_out_cb(1, DEVCB_##_devcb);
+ downcast<mcs48_cpu_device &>(*device).set_port_out_cb(1, DEVCB_##_devcb);
#define MCFG_MCS48_PORT_T0_IN_CB(_devcb) \
- devcb = &downcast<mcs48_cpu_device &>(*device).set_test_in_cb(0, DEVCB_##_devcb);
+ downcast<mcs48_cpu_device &>(*device).set_test_in_cb(0, DEVCB_##_devcb);
#define MCFG_MCS48_PORT_T0_CLK_DEVICE(_tag) \
downcast<mcs48_cpu_device &>(*device).set_t0_clk_cb(clock_update_delegate(FUNC(device_t::set_unscaled_clock), _tag, (device_t *)nullptr));
#define MCFG_MCS48_PORT_T0_CLK_CUSTOM(_class, _func) \
downcast<mcs48_cpu_device &>(*device).set_t0_clk_cb(clock_update_delegate(&_class::_func, #_class "::" _func, owner));
#define MCFG_MCS48_PORT_T1_IN_CB(_devcb) \
- devcb = &downcast<mcs48_cpu_device &>(*device).set_test_in_cb(1, DEVCB_##_devcb);
+ downcast<mcs48_cpu_device &>(*device).set_test_in_cb(1, DEVCB_##_devcb);
#define MCFG_MCS48_PORT_BUS_IN_CB(_devcb) \
- devcb = &downcast<mcs48_cpu_device &>(*device).set_bus_in_cb(DEVCB_##_devcb);
+ downcast<mcs48_cpu_device &>(*device).set_bus_in_cb(DEVCB_##_devcb);
#define MCFG_MCS48_PORT_BUS_OUT_CB(_devcb) \
- devcb = &downcast<mcs48_cpu_device &>(*device).set_bus_out_cb(DEVCB_##_devcb);
+ downcast<mcs48_cpu_device &>(*device).set_bus_out_cb(DEVCB_##_devcb);
// PROG line to 8243 expander
#define MCFG_MCS48_PORT_PROG_OUT_CB(_devcb) \
- devcb = &downcast<mcs48_cpu_device &>(*device).set_prog_out_cb(DEVCB_##_devcb);
+ downcast<mcs48_cpu_device &>(*device).set_prog_out_cb(DEVCB_##_devcb);
/***************************************************************************
@@ -149,6 +149,15 @@ public:
template <class Object> devcb_base &set_test_in_cb(int n, Object &&cb) { return m_test_in_cb[n].set_callback(std::forward<Object>(cb)); }
template <typename Object> void set_t0_clk_cb(Object &&cb) { m_t0_clk_func = std::forward<Object>(cb); }
template <class Object> devcb_base &set_prog_out_cb(Object &&cb) { return m_prog_out_cb.set_callback(std::forward<Object>(cb)); }
+ auto p1_in_cb() { return m_port_in_cb[0].bind(); }
+ auto p2_in_cb() { return m_port_in_cb[1].bind(); }
+ auto p1_out_cb() { return m_port_out_cb[0].bind(); }
+ auto p2_out_cb() { return m_port_out_cb[1].bind(); }
+ auto bus_in_cb() { return m_bus_in_cb.bind(); }
+ auto bus_out_cb() { return m_bus_out_cb.bind(); }
+ auto t0_in_cb() { return m_test_in_cb[0].bind(); }
+ auto t1_in_cb() { return m_test_in_cb[1].bind(); }
+ auto prog_out_cb() { return m_prog_out_cb.bind(); }
DECLARE_READ8_MEMBER(p1_r);
DECLARE_READ8_MEMBER(p2_r);
diff --git a/src/devices/cpu/mcs51/mcs51.h b/src/devices/cpu/mcs51/mcs51.h
index cb3c7f635f1..51ffe2978d5 100644
--- a/src/devices/cpu/mcs51/mcs51.h
+++ b/src/devices/cpu/mcs51/mcs51.h
@@ -33,30 +33,30 @@
#define MCFG_MCS51_PORT_P0_IN_CB(_devcb) \
- devcb = &downcast<mcs51_cpu_device &>(*device).set_port_in_cb(0, DEVCB_##_devcb);
+ downcast<mcs51_cpu_device &>(*device).set_port_in_cb(0, DEVCB_##_devcb);
#define MCFG_MCS51_PORT_P0_OUT_CB(_devcb) \
- devcb = &downcast<mcs51_cpu_device &>(*device).set_port_out_cb(0, DEVCB_##_devcb);
+ downcast<mcs51_cpu_device &>(*device).set_port_out_cb(0, DEVCB_##_devcb);
#define MCFG_MCS51_PORT_P1_IN_CB(_devcb) \
- devcb = &downcast<mcs51_cpu_device &>(*device).set_port_in_cb(1, DEVCB_##_devcb);
+ downcast<mcs51_cpu_device &>(*device).set_port_in_cb(1, DEVCB_##_devcb);
#define MCFG_MCS51_PORT_P1_OUT_CB(_devcb) \
- devcb = &downcast<mcs51_cpu_device &>(*device).set_port_out_cb(1, DEVCB_##_devcb);
+ downcast<mcs51_cpu_device &>(*device).set_port_out_cb(1, DEVCB_##_devcb);
#define MCFG_MCS51_PORT_P2_IN_CB(_devcb) \
- devcb = &downcast<mcs51_cpu_device &>(*device).set_port_in_cb(2, DEVCB_##_devcb);
+ downcast<mcs51_cpu_device &>(*device).set_port_in_cb(2, DEVCB_##_devcb);
#define MCFG_MCS51_PORT_P2_OUT_CB(_devcb) \
- devcb = &downcast<mcs51_cpu_device &>(*device).set_port_out_cb(2, DEVCB_##_devcb);
+ downcast<mcs51_cpu_device &>(*device).set_port_out_cb(2, DEVCB_##_devcb);
#define MCFG_MCS51_PORT_P3_IN_CB(_devcb) \
- devcb = &downcast<mcs51_cpu_device &>(*device).set_port_in_cb(3, DEVCB_##_devcb);
+ downcast<mcs51_cpu_device &>(*device).set_port_in_cb(3, DEVCB_##_devcb);
#define MCFG_MCS51_PORT_P3_OUT_CB(_devcb) \
- devcb = &downcast<mcs51_cpu_device &>(*device).set_port_out_cb(3, DEVCB_##_devcb);
+ downcast<mcs51_cpu_device &>(*device).set_port_out_cb(3, DEVCB_##_devcb);
#define MCFG_MCS51_SERIAL_RX_CB(_devcb) \
- devcb = &downcast<mcs51_cpu_device &>(*device).set_serial_rx_cb(DEVCB_##_devcb);
+ downcast<mcs51_cpu_device &>(*device).set_serial_rx_cb(DEVCB_##_devcb);
#define MCFG_MCS51_SERIAL_TX_CB(_devcb) \
- devcb = &downcast<mcs51_cpu_device &>(*device).set_serial_tx_cb(DEVCB_##_devcb);
+ downcast<mcs51_cpu_device &>(*device).set_serial_tx_cb(DEVCB_##_devcb);
enum
@@ -100,6 +100,8 @@ public:
void set_port_forced_input(uint8_t port, uint8_t forced_input) { m_forced_inputs[port] = forced_input; }
template<class Object> devcb_base &set_serial_rx_cb(Object &&cb) { return m_serial_rx_cb.set_callback(std::forward<Object>(cb)); }
template<class Object> devcb_base &set_serial_tx_cb(Object &&cb) { return m_serial_tx_cb.set_callback(std::forward<Object>(cb)); }
+ template <unsigned N> auto port_in_cb() { return m_port_in_cb[N].bind(); }
+ template <unsigned N> auto port_out_cb() { return m_port_out_cb[N].bind(); }
void program_internal(address_map &map);
void data_internal(address_map &map);
diff --git a/src/devices/cpu/melps4/melps4.h b/src/devices/cpu/melps4/melps4.h
index e7bbe83b238..17b0c9ea623 100644
--- a/src/devices/cpu/melps4/melps4.h
+++ b/src/devices/cpu/melps4/melps4.h
@@ -16,37 +16,37 @@
// K input or A/D input port, up to 16 pins
#define MCFG_MELPS4_READ_K_CB(_devcb) \
- devcb = &downcast<melps4_cpu_device &>(*device).set_read_k_callback(DEVCB_##_devcb);
+ downcast<melps4_cpu_device &>(*device).set_read_k_callback(DEVCB_##_devcb);
// D discrete I/O port, up to 16 pins - offset 0-15 for bit, 16 for all pins clear
#define MCFG_MELPS4_READ_D_CB(_devcb) \
- devcb = &downcast<melps4_cpu_device &>(*device).set_read_d_callback(DEVCB_##_devcb);
+ downcast<melps4_cpu_device &>(*device).set_read_d_callback(DEVCB_##_devcb);
#define MCFG_MELPS4_WRITE_D_CB(_devcb) \
- devcb = &downcast<melps4_cpu_device &>(*device).set_write_d_callback(DEVCB_##_devcb);
+ downcast<melps4_cpu_device &>(*device).set_write_d_callback(DEVCB_##_devcb);
// 8-bit S generic I/O port
#define MCFG_MELPS4_READ_S_CB(_devcb) \
- devcb = &downcast<melps4_cpu_device &>(*device).set_read_s_callback(DEVCB_##_devcb);
+ downcast<melps4_cpu_device &>(*device).set_read_s_callback(DEVCB_##_devcb);
#define MCFG_MELPS4_WRITE_S_CB(_devcb) \
- devcb = &downcast<melps4_cpu_device &>(*device).set_write_s_callback(DEVCB_##_devcb);
+ downcast<melps4_cpu_device &>(*device).set_write_s_callback(DEVCB_##_devcb);
// 4-bit F generic I/O port
#define MCFG_MELPS4_READ_F_CB(_devcb) \
- devcb = &downcast<melps4_cpu_device &>(*device).set_read_f_callback(DEVCB_##_devcb);
+ downcast<melps4_cpu_device &>(*device).set_read_f_callback(DEVCB_##_devcb);
#define MCFG_MELPS4_WRITE_F_CB(_devcb) \
- devcb = &downcast<melps4_cpu_device &>(*device).set_write_f_callback(DEVCB_##_devcb);
+ downcast<melps4_cpu_device &>(*device).set_write_f_callback(DEVCB_##_devcb);
// 4-bit G generic output port
#define MCFG_MELPS4_WRITE_G_CB(_devcb) \
- devcb = &downcast<melps4_cpu_device &>(*device).set_write_g_callback(DEVCB_##_devcb);
+ downcast<melps4_cpu_device &>(*device).set_write_g_callback(DEVCB_##_devcb);
// 1-bit U generic output port
#define MCFG_MELPS4_WRITE_U_CB(_devcb) \
- devcb = &downcast<melps4_cpu_device &>(*device).set_write_u_callback(DEVCB_##_devcb);
+ downcast<melps4_cpu_device &>(*device).set_write_u_callback(DEVCB_##_devcb);
// T timer I/O pin (use execute_set_input for reads)
#define MCFG_MELPS4_WRITE_T_CB(_devcb) \
- devcb = &downcast<melps4_cpu_device &>(*device).set_write_t_callback(DEVCB_##_devcb);
+ downcast<melps4_cpu_device &>(*device).set_write_t_callback(DEVCB_##_devcb);
#define MELPS4_PORTD_CLR 16
diff --git a/src/devices/cpu/mips/r3000.h b/src/devices/cpu/mips/r3000.h
index 79529b01195..db8313309e2 100644
--- a/src/devices/cpu/mips/r3000.h
+++ b/src/devices/cpu/mips/r3000.h
@@ -22,16 +22,16 @@
downcast<r3000_device &>(*device).set_endianness(_endianness);
#define MCFG_R3000_BRCOND0_INPUT(_devcb) \
- devcb = &downcast<r3000_device &>(*device).set_brcond0_input(DEVCB_##_devcb);
+ downcast<r3000_device &>(*device).set_brcond0_input(DEVCB_##_devcb);
#define MCFG_R3000_BRCOND1_INPUT(_devcb) \
- devcb = &downcast<r3000_device &>(*device).set_brcond1_input(DEVCB_##_devcb);
+ downcast<r3000_device &>(*device).set_brcond1_input(DEVCB_##_devcb);
#define MCFG_R3000_BRCOND2_INPUT(_devcb) \
- devcb = &downcast<r3000_device &>(*device).set_brcond2_input(DEVCB_##_devcb);
+ downcast<r3000_device &>(*device).set_brcond2_input(DEVCB_##_devcb);
#define MCFG_R3000_BRCOND3_INPUT(_devcb) \
- devcb = &downcast<r3000_device &>(*device).set_brcond3_input(DEVCB_##_devcb);
+ downcast<r3000_device &>(*device).set_brcond3_input(DEVCB_##_devcb);
/***************************************************************************
diff --git a/src/devices/cpu/mn10200/mn10200.h b/src/devices/cpu/mn10200/mn10200.h
index 714fd9385e7..8fd12ef5118 100644
--- a/src/devices/cpu/mn10200/mn10200.h
+++ b/src/devices/cpu/mn10200/mn10200.h
@@ -15,9 +15,9 @@
// port setup
#define MCFG_MN10200_READ_PORT_CB(X, _devcb) \
- devcb = &downcast<mn10200_device &>(*device).set_read_port##X##_callback(DEVCB_##_devcb);
+ downcast<mn10200_device &>(*device).set_read_port##X##_callback(DEVCB_##_devcb);
#define MCFG_MN10200_WRITE_PORT_CB(X, _devcb) \
- devcb = &downcast<mn10200_device &>(*device).set_write_port##X##_callback(DEVCB_##_devcb);
+ downcast<mn10200_device &>(*device).set_write_port##X##_callback(DEVCB_##_devcb);
enum
{
diff --git a/src/devices/cpu/nanoprocessor/nanoprocessor.h b/src/devices/cpu/nanoprocessor/nanoprocessor.h
index a4de6b661fb..42f43c60e01 100644
--- a/src/devices/cpu/nanoprocessor/nanoprocessor.h
+++ b/src/devices/cpu/nanoprocessor/nanoprocessor.h
@@ -62,12 +62,12 @@ constexpr unsigned HP_NANO_IE_DC = 7; // DC line used as interrupt enable/ma
// DC0 is in bit 0, DC1 in bit 1 and so on.
// Keep in mind that DC7 usually masks the interrupt signal.
#define MCFG_HP_NANO_DC_CHANGED(_devcb) \
- devcb = &downcast<hp_nanoprocessor_device &>(*device).set_dc_changed_func(DEVCB_##_devcb);
+ downcast<hp_nanoprocessor_device &>(*device).set_dc_changed_func(DEVCB_##_devcb);
// Callback to read the input state of DC lines
// All lines that are not in input are to be reported at "1"
#define MCFG_HP_NANO_READ_DC_CB(_devcb) \
- devcb = &downcast<hp_nanoprocessor_device &>(*device).set_read_dc_func(DEVCB_##_devcb);
+ downcast<hp_nanoprocessor_device &>(*device).set_read_dc_func(DEVCB_##_devcb);
class hp_nanoprocessor_device : public cpu_device
{
diff --git a/src/devices/cpu/nec/v25.h b/src/devices/cpu/nec/v25.h
index 9deaa0951ae..af7d5eb4d93 100644
--- a/src/devices/cpu/nec/v25.h
+++ b/src/devices/cpu/nec/v25.h
@@ -27,26 +27,26 @@ enum
#define MCFG_V25_PORT_PT_READ_CB(_devcb) \
- devcb = &downcast<v25_common_device &>(*device).set_pt_in_cb(DEVCB_##_devcb);
+ downcast<v25_common_device &>(*device).set_pt_in_cb(DEVCB_##_devcb);
#define MCFG_V25_PORT_P0_READ_CB(_devcb) \
- devcb = &downcast<v25_common_device &>(*device).set_p0_in_cb(DEVCB_##_devcb);
+ downcast<v25_common_device &>(*device).set_p0_in_cb(DEVCB_##_devcb);
#define MCFG_V25_PORT_P1_READ_CB(_devcb) \
- devcb = &downcast<v25_common_device &>(*device).set_p1_in_cb(DEVCB_##_devcb);
+ downcast<v25_common_device &>(*device).set_p1_in_cb(DEVCB_##_devcb);
#define MCFG_V25_PORT_P2_READ_CB(_devcb) \
- devcb = &downcast<v25_common_device &>(*device).set_p2_in_cb(DEVCB_##_devcb);
+ downcast<v25_common_device &>(*device).set_p2_in_cb(DEVCB_##_devcb);
#define MCFG_V25_PORT_P0_WRITE_CB(_devcb) \
- devcb = &downcast<v25_common_device &>(*device).set_p0_out_cb(DEVCB_##_devcb);
+ downcast<v25_common_device &>(*device).set_p0_out_cb(DEVCB_##_devcb);
#define MCFG_V25_PORT_P1_WRITE_CB(_devcb) \
- devcb = &downcast<v25_common_device &>(*device).set_p1_out_cb(DEVCB_##_devcb);
+ downcast<v25_common_device &>(*device).set_p1_out_cb(DEVCB_##_devcb);
#define MCFG_V25_PORT_P2_WRITE_CB(_devcb) \
- devcb = &downcast<v25_common_device &>(*device).set_p2_out_cb(DEVCB_##_devcb);
+ downcast<v25_common_device &>(*device).set_p2_out_cb(DEVCB_##_devcb);
class v25_common_device : public cpu_device
{
@@ -58,10 +58,17 @@ public:
template <class Object> devcb_base &set_p0_in_cb(Object &&cb) { return m_p0_in.set_callback(std::forward<Object>(cb)); }
template <class Object> devcb_base &set_p1_in_cb(Object &&cb) { return m_p1_in.set_callback(std::forward<Object>(cb)); }
template <class Object> devcb_base &set_p2_in_cb(Object &&cb) { return m_p2_in.set_callback(std::forward<Object>(cb)); }
+ auto pt_in_cb() { return m_pt_in.bind(); }
+ auto p0_in_cb() { return m_p0_in.bind(); }
+ auto p1_in_cb() { return m_p1_in.bind(); }
+ auto p2_in_cb() { return m_p2_in.bind(); }
template <class Object> devcb_base &set_p0_out_cb(Object &&cb) { return m_p0_out.set_callback(std::forward<Object>(cb)); }
template <class Object> devcb_base &set_p1_out_cb(Object &&cb) { return m_p1_out.set_callback(std::forward<Object>(cb)); }
template <class Object> devcb_base &set_p2_out_cb(Object &&cb) { return m_p2_out.set_callback(std::forward<Object>(cb)); }
+ auto p0_out_cb() { return m_p0_out.bind(); }
+ auto p1_out_cb() { return m_p1_out.bind(); }
+ auto p2_out_cb() { return m_p2_out.bind(); }
TIMER_CALLBACK_MEMBER(v25_timer_callback);
diff --git a/src/devices/cpu/nec/v53.cpp b/src/devices/cpu/nec/v53.cpp
index fc30638836b..d71e9d89d62 100644
--- a/src/devices/cpu/nec/v53.cpp
+++ b/src/devices/cpu/nec/v53.cpp
@@ -496,7 +496,6 @@ MACHINE_CONFIG_START(v53_base_device::device_add_mconfig)
MCFG_PIT8253_OUT1_HANDLER(WRITELINE( *this, v53_base_device, tcu_out1_trampoline_cb ))
MCFG_PIT8253_OUT2_HANDLER(WRITELINE( *this, v53_base_device, tcu_out2_trampoline_cb ))
-
MCFG_DEVICE_ADD("upd71071dma", V53_DMAU, 4000000)
MCFG_AM9517A_OUT_HREQ_CB(WRITELINE(*this, v53_base_device, hreq_trampoline_cb))
MCFG_AM9517A_OUT_EOP_CB(WRITELINE(*this, v53_base_device, eop_trampoline_cb))
@@ -515,13 +514,10 @@ MACHINE_CONFIG_START(v53_base_device::device_add_mconfig)
MCFG_AM9517A_OUT_DACK_2_CB(WRITELINE(*this, v53_base_device, dma_dack2_trampoline_w))
MCFG_AM9517A_OUT_DACK_3_CB(WRITELINE(*this, v53_base_device, dma_dack3_trampoline_w))
-
- MCFG_DEVICE_ADD("upd71059pic", PIC8259, 0)
- MCFG_PIC8259_OUT_INT_CB(WRITELINE(*this, v53_base_device, internal_irq_w))
- MCFG_PIC8259_IN_SP_CB(VCC)
- MCFG_PIC8259_CASCADE_ACK_CB(READ8(*this, v53_base_device, get_pic_ack))
-
-
+ pic8259_device &upd71059pic(PIC8259(config, "upd71059pic", 0));
+ upd71059pic.out_int_callback().set(FUNC(v53_base_device::internal_irq_w));
+ upd71059pic.in_sp_callback().set_constant(1);
+ upd71059pic.read_slave_ack_callback().set(FUNC(v53_base_device::get_pic_ack));
MCFG_DEVICE_ADD("v53scu", V53_SCU, 0)
MCFG_I8251_TXD_HANDLER(WRITELINE(*this, v53_base_device, scu_txd_trampoline_cb))
diff --git a/src/devices/cpu/nec/v53.h b/src/devices/cpu/nec/v53.h
index ef3450bb74e..536b8f8f458 100644
--- a/src/devices/cpu/nec/v53.h
+++ b/src/devices/cpu/nec/v53.h
@@ -16,25 +16,25 @@
// SCU
#define MCFG_V53_SCU_TXD_HANDLER(_devcb) \
- devcb = &downcast<v53_base_device &>(*device).set_txd_handler(DEVCB_##_devcb);
+ downcast<v53_base_device &>(*device).set_txd_handler(DEVCB_##_devcb);
#define MCFG_V53_SCU_DTR_HANDLER(_devcb) \
- devcb = &downcast<v53_base_device &>(*device).set_dtr_handler(DEVCB_##_devcb);
+ downcast<v53_base_device &>(*device).set_dtr_handler(DEVCB_##_devcb);
#define MCFG_V53_SCU_RTS_HANDLER(_devcb) \
- devcb = &downcast<v53_base_device &>(*device).set_rts_handler(DEVCB_##_devcb);
+ downcast<v53_base_device &>(*device).set_rts_handler(DEVCB_##_devcb);
#define MCFG_V53_SCU_RXRDY_HANDLER(_devcb) \
- devcb = &downcast<v53_base_device &>(*device).set_rxrdy_handler(DEVCB_##_devcb);
+ downcast<v53_base_device &>(*device).set_rxrdy_handler(DEVCB_##_devcb);
#define MCFG_V53_SCU_TXRDY_HANDLER(_devcb) \
- devcb = &downcast<v53_base_device &>(*device).set_txrdy_handler(DEVCB_##_devcb);
+ downcast<v53_base_device &>(*device).set_txrdy_handler(DEVCB_##_devcb);
#define MCFG_V53_SCU_TXEMPTY_HANDLER(_devcb) \
- devcb = &downcast<v53_base_device &>(*device).set_txempty_handler(DEVCB_##_devcb);
+ downcast<v53_base_device &>(*device).set_txempty_handler(DEVCB_##_devcb);
#define MCFG_V53_SCU_SYNDET_HANDLER(_devcb) \
- devcb = &downcast<v53_base_device &>(*device).set_syndet_handler(DEVCB_##_devcb);
+ downcast<v53_base_device &>(*device).set_syndet_handler(DEVCB_##_devcb);
// TCU
#define MCFG_V53_TCU_CLK0(_clk) \
@@ -47,63 +47,63 @@
downcast<v53_base_device &>(*device).set_clk2(_clk);
#define MCFG_V53_TCU_OUT0_HANDLER(_devcb) \
- devcb = &downcast<v53_base_device &>(*device).set_out0_handler(DEVCB_##_devcb);
+ downcast<v53_base_device &>(*device).set_out0_handler(DEVCB_##_devcb);
#define MCFG_V53_TCU_OUT1_HANDLER(_devcb) \
- devcb = &downcast<v53_base_device &>(*device).set_out1_handler(DEVCB_##_devcb);
+ downcast<v53_base_device &>(*device).set_out1_handler(DEVCB_##_devcb);
#define MCFG_V53_TCU_OUT2_HANDLER(_devcb) \
- devcb = &downcast<v53_base_device &>(*device).set_out2_handler(DEVCB_##_devcb);
+ downcast<v53_base_device &>(*device).set_out2_handler(DEVCB_##_devcb);
// DMAU
#define MCFG_V53_DMAU_OUT_HREQ_CB(_devcb) \
- devcb = &downcast<v53_base_device &>(*device).set_out_hreq_callback(DEVCB_##_devcb);
+ downcast<v53_base_device &>(*device).set_out_hreq_callback(DEVCB_##_devcb);
#define MCFG_V53_DMAU_OUT_EOP_CB(_devcb) \
- devcb = &downcast<v53_base_device &>(*device).set_out_eop_callback(DEVCB_##_devcb);
+ downcast<v53_base_device &>(*device).set_out_eop_callback(DEVCB_##_devcb);
#define MCFG_V53_DMAU_IN_MEMR_CB(_devcb) \
- devcb = &downcast<v53_base_device &>(*device).set_in_memr_callback(DEVCB_##_devcb);
+ downcast<v53_base_device &>(*device).set_in_memr_callback(DEVCB_##_devcb);
#define MCFG_V53_DMAU_OUT_MEMW_CB(_devcb) \
- devcb = &downcast<v53_base_device &>(*device).set_out_memw_callback(DEVCB_##_devcb);
+ downcast<v53_base_device &>(*device).set_out_memw_callback(DEVCB_##_devcb);
#define MCFG_V53_DMAU_IN_IOR_0_CB(_devcb) \
- devcb = &downcast<v53_base_device &>(*device).set_in_ior_0_callback(DEVCB_##_devcb);
+ downcast<v53_base_device &>(*device).set_in_ior_0_callback(DEVCB_##_devcb);
#define MCFG_V53_DMAU_IN_IOR_1_CB(_devcb) \
- devcb = &downcast<v53_base_device &>(*device).set_in_ior_1_callback(DEVCB_##_devcb);
+ downcast<v53_base_device &>(*device).set_in_ior_1_callback(DEVCB_##_devcb);
#define MCFG_V53_DMAU_IN_IOR_2_CB(_devcb) \
- devcb = &downcast<v53_base_device &>(*device).set_in_ior_2_callback(DEVCB_##_devcb);
+ downcast<v53_base_device &>(*device).set_in_ior_2_callback(DEVCB_##_devcb);
#define MCFG_V53_DMAU_IN_IOR_3_CB(_devcb) \
- devcb = &downcast<v53_base_device &>(*device).set_in_ior_3_callback(DEVCB_##_devcb);
+ downcast<v53_base_device &>(*device).set_in_ior_3_callback(DEVCB_##_devcb);
#define MCFG_V53_DMAU_OUT_IOW_0_CB(_devcb) \
- devcb = &downcast<v53_base_device &>(*device).set_out_iow_0_callback(DEVCB_##_devcb);
+ downcast<v53_base_device &>(*device).set_out_iow_0_callback(DEVCB_##_devcb);
#define MCFG_V53_DMAU_OUT_IOW_1_CB(_devcb) \
- devcb = &downcast<v53_base_device &>(*device).set_out_iow_1_callback(DEVCB_##_devcb);
+ downcast<v53_base_device &>(*device).set_out_iow_1_callback(DEVCB_##_devcb);
#define MCFG_V53_DMAU_OUT_IOW_2_CB(_devcb) \
- devcb = &downcast<v53_base_device &>(*device).set_out_iow_2_callback(DEVCB_##_devcb);
+ downcast<v53_base_device &>(*device).set_out_iow_2_callback(DEVCB_##_devcb);
#define MCFG_V53_DMAU_OUT_IOW_3_CB(_devcb) \
- devcb = &downcast<v53_base_device &>(*device).set_out_iow_3_callback(DEVCB_##_devcb);
+ downcast<v53_base_device &>(*device).set_out_iow_3_callback(DEVCB_##_devcb);
#define MCFG_V53_DMAU_OUT_DACK_0_CB(_devcb) \
- devcb = &downcast<v53_base_device &>(*device).set_out_dack_0_callback(DEVCB_##_devcb);
+ downcast<v53_base_device &>(*device).set_out_dack_0_callback(DEVCB_##_devcb);
#define MCFG_V53_DMAU_OUT_DACK_1_CB(_devcb) \
- devcb = &downcast<v53_base_device &>(*device).set_out_dack_1_callback(DEVCB_##_devcb);
+ downcast<v53_base_device &>(*device).set_out_dack_1_callback(DEVCB_##_devcb);
#define MCFG_V53_DMAU_OUT_DACK_2_CB(_devcb) \
- devcb = &downcast<v53_base_device &>(*device).set_out_dack_2_callback(DEVCB_##_devcb);
+ downcast<v53_base_device &>(*device).set_out_dack_2_callback(DEVCB_##_devcb);
#define MCFG_V53_DMAU_OUT_DACK_3_CB(_devcb) \
- devcb = &downcast<v53_base_device &>(*device).set_out_dack_3_callback(DEVCB_##_devcb);
+ downcast<v53_base_device &>(*device).set_out_dack_3_callback(DEVCB_##_devcb);
diff --git a/src/devices/cpu/patinhofeio/patinhofeio_cpu.h b/src/devices/cpu/patinhofeio/patinhofeio_cpu.h
index ecff53f7249..c1f0dafab7a 100644
--- a/src/devices/cpu/patinhofeio/patinhofeio_cpu.h
+++ b/src/devices/cpu/patinhofeio/patinhofeio_cpu.h
@@ -6,13 +6,13 @@
#pragma once
#define MCFG_PATINHO_RC_READ_CB(_devcb) \
- devcb = &downcast<patinho_feio_cpu_device &>(*device).set_rc_read_callback(DEVCB_##_devcb);
+ downcast<patinho_feio_cpu_device &>(*device).set_rc_read_callback(DEVCB_##_devcb);
#define MCFG_PATINHO_BUTTONS_READ_CB(_devcb) \
- devcb = &downcast<patinho_feio_cpu_device &>(*device).set_buttons_read_callback(DEVCB_##_devcb);
+ downcast<patinho_feio_cpu_device &>(*device).set_buttons_read_callback(DEVCB_##_devcb);
#define MCFG_PATINHO_IODEV_READ_CB(devnumber, _devcb) \
- devcb = &downcast<patinho_feio_cpu_device &>(*device).set_iodev_read_callback(devnumber, DEVCB_##_devcb);
+ downcast<patinho_feio_cpu_device &>(*device).set_iodev_read_callback(devnumber, DEVCB_##_devcb);
#define MCFG_PATINHO_IODEV_WRITE_CB(devnumber, _devcb) \
- devcb = &downcast<patinho_feio_cpu_device &>(*device).set_iodev_write_callback(devnumber, DEVCB_##_devcb);
+ downcast<patinho_feio_cpu_device &>(*device).set_iodev_write_callback(devnumber, DEVCB_##_devcb);
/* register IDs */
enum
diff --git a/src/devices/cpu/pic16c5x/pic16c5x.h b/src/devices/cpu/pic16c5x/pic16c5x.h
index f83e2a420b4..e337ca196d5 100644
--- a/src/devices/cpu/pic16c5x/pic16c5x.h
+++ b/src/devices/cpu/pic16c5x/pic16c5x.h
@@ -37,27 +37,27 @@ enum
// port a, 4 or 8 bits, 2-way
#define MCFG_PIC16C5x_READ_A_CB(_devcb) \
- devcb = &downcast<pic16c5x_device &>(*device).set_read_a_callback(DEVCB_##_devcb);
+ downcast<pic16c5x_device &>(*device).set_read_a_callback(DEVCB_##_devcb);
#define MCFG_PIC16C5x_WRITE_A_CB(_devcb) \
- devcb = &downcast<pic16c5x_device &>(*device).set_write_a_callback(DEVCB_##_devcb);
+ downcast<pic16c5x_device &>(*device).set_write_a_callback(DEVCB_##_devcb);
// port b, 8 bits, 2-way
#define MCFG_PIC16C5x_READ_B_CB(_devcb) \
- devcb = &downcast<pic16c5x_device &>(*device).set_read_b_callback(DEVCB_##_devcb);
+ downcast<pic16c5x_device &>(*device).set_read_b_callback(DEVCB_##_devcb);
#define MCFG_PIC16C5x_WRITE_B_CB(_devcb) \
- devcb = &downcast<pic16c5x_device &>(*device).set_write_b_callback(DEVCB_##_devcb);
+ downcast<pic16c5x_device &>(*device).set_write_b_callback(DEVCB_##_devcb);
// port c, 8 bits, 2-way
#define MCFG_PIC16C5x_READ_C_CB(_devcb) \
- devcb = &downcast<pic16c5x_device &>(*device).set_read_c_callback(DEVCB_##_devcb);
+ downcast<pic16c5x_device &>(*device).set_read_c_callback(DEVCB_##_devcb);
#define MCFG_PIC16C5x_WRITE_C_CB(_devcb) \
- devcb = &downcast<pic16c5x_device &>(*device).set_write_c_callback(DEVCB_##_devcb);
+ downcast<pic16c5x_device &>(*device).set_write_c_callback(DEVCB_##_devcb);
// port d, 8 bits, 2-way
#define MCFG_PIC16C5x_READ_D_CB(_devcb) \
- devcb = &downcast<pic16c5x_device &>(*device).set_read_d_callback(DEVCB_##_devcb);
+ downcast<pic16c5x_device &>(*device).set_read_d_callback(DEVCB_##_devcb);
#define MCFG_PIC16C5x_WRITE_D_CB(_devcb) \
- devcb = &downcast<pic16c5x_device &>(*device).set_write_d_callback(DEVCB_##_devcb);
+ downcast<pic16c5x_device &>(*device).set_write_d_callback(DEVCB_##_devcb);
// CONFIG register
#define MCFG_PIC16C5x_SET_CONFIG(_data) \
diff --git a/src/devices/cpu/pps4/pps4.h b/src/devices/cpu/pps4/pps4.h
index d74621890b3..aceb23e2294 100644
--- a/src/devices/cpu/pps4/pps4.h
+++ b/src/devices/cpu/pps4/pps4.h
@@ -29,13 +29,13 @@ enum
//**************************************************************************
#define MCFG_PPS4_DISCRETE_INPUT_A_CB(_devcb) \
- devcb = &downcast<pps4_device &>(*device).set_dia_cb(DEVCB_##_devcb);
+ downcast<pps4_device &>(*device).set_dia_cb(DEVCB_##_devcb);
#define MCFG_PPS4_DISCRETE_INPUT_B_CB(_devcb) \
- devcb = &downcast<pps4_device &>(*device).set_dib_cb(DEVCB_##_devcb);
+ downcast<pps4_device &>(*device).set_dib_cb(DEVCB_##_devcb);
#define MCFG_PPS4_DISCRETE_OUTPUT_CB(_devcb) \
- devcb = &downcast<pps4_device &>(*device).set_do_cb(DEVCB_##_devcb);
+ downcast<pps4_device &>(*device).set_do_cb(DEVCB_##_devcb);
//**************************************************************************
// DEVICE TYPE DEFINITIONS
diff --git a/src/devices/cpu/psx/dma.h b/src/devices/cpu/psx/dma.h
index 7be62c0eb0d..97785439bb3 100644
--- a/src/devices/cpu/psx/dma.h
+++ b/src/devices/cpu/psx/dma.h
@@ -16,7 +16,7 @@
DECLARE_DEVICE_TYPE(PSX_DMA, psxdma_device)
#define MCFG_PSX_DMA_IRQ_HANDLER(_devcb) \
- devcb = &downcast<psxdma_device &>(*device).set_irq_handler(DEVCB_##_devcb);
+ downcast<psxdma_device &>(*device).set_irq_handler(DEVCB_##_devcb);
class psxdma_device : public device_t
{
diff --git a/src/devices/cpu/psx/irq.h b/src/devices/cpu/psx/irq.h
index 93e0d6ce737..051c68a089d 100644
--- a/src/devices/cpu/psx/irq.h
+++ b/src/devices/cpu/psx/irq.h
@@ -16,7 +16,7 @@
DECLARE_DEVICE_TYPE(PSX_IRQ, psxirq_device)
#define MCFG_PSX_IRQ_HANDLER(_devcb) \
- devcb = &downcast<psxirq_device &>(*device).set_irq_handler(DEVCB_##_devcb);
+ downcast<psxirq_device &>(*device).set_irq_handler(DEVCB_##_devcb);
class psxirq_device : public device_t
{
diff --git a/src/devices/cpu/psx/psx.h b/src/devices/cpu/psx/psx.h
index ca417ee9607..646c5e8a4b1 100644
--- a/src/devices/cpu/psx/psx.h
+++ b/src/devices/cpu/psx/psx.h
@@ -121,19 +121,19 @@ enum
psxcpu_device::getcpu( *this, cputag )->subdevice<psxdma_device>("dma")->install_write_handler( channel, handler );
#define MCFG_PSX_GPU_READ_HANDLER(_devcb) \
- devcb = &downcast<psxcpu_device &>(*device).set_gpu_read_handler(DEVCB_##_devcb);
+ downcast<psxcpu_device &>(*device).set_gpu_read_handler(DEVCB_##_devcb);
#define MCFG_PSX_GPU_WRITE_HANDLER(_devcb) \
- devcb = &downcast<psxcpu_device &>(*device).set_gpu_write_handler(DEVCB_##_devcb);
+ downcast<psxcpu_device &>(*device).set_gpu_write_handler(DEVCB_##_devcb);
#define MCFG_PSX_SPU_READ_HANDLER(_devcb) \
- devcb = &downcast<psxcpu_device &>(*device).set_spu_read_handler(DEVCB_##_devcb);
+ downcast<psxcpu_device &>(*device).set_spu_read_handler(DEVCB_##_devcb);
#define MCFG_PSX_SPU_WRITE_HANDLER(_devcb) \
- devcb = &downcast<psxcpu_device &>(*device).set_spu_write_handler(DEVCB_##_devcb);
+ downcast<psxcpu_device &>(*device).set_spu_write_handler(DEVCB_##_devcb);
#define MCFG_PSX_CD_READ_HANDLER(_devcb) \
- devcb = &downcast<psxcpu_device &>(*device).set_cd_read_handler(DEVCB_##_devcb);
+ downcast<psxcpu_device &>(*device).set_cd_read_handler(DEVCB_##_devcb);
#define MCFG_PSX_CD_WRITE_HANDLER(_devcb) \
- devcb = &downcast<psxcpu_device &>(*device).set_cd_write_handler(DEVCB_##_devcb);
+ downcast<psxcpu_device &>(*device).set_cd_write_handler(DEVCB_##_devcb);
#define MCFG_PSX_DISABLE_ROM_BERR \
downcast<psxcpu_device *>(device)->set_disable_rom_berr(true);
diff --git a/src/devices/cpu/psx/rcnt.h b/src/devices/cpu/psx/rcnt.h
index 2047d229c3e..9332a5c174d 100644
--- a/src/devices/cpu/psx/rcnt.h
+++ b/src/devices/cpu/psx/rcnt.h
@@ -16,11 +16,11 @@
DECLARE_DEVICE_TYPE(PSX_RCNT, psxrcnt_device)
#define MCFG_PSX_RCNT_IRQ0_HANDLER(_devcb) \
- devcb = &downcast<psxrcnt_device &>(*device).set_irq0_handler(DEVCB_##_devcb);
+ downcast<psxrcnt_device &>(*device).set_irq0_handler(DEVCB_##_devcb);
#define MCFG_PSX_RCNT_IRQ1_HANDLER(_devcb) \
- devcb = &downcast<psxrcnt_device &>(*device).set_irq1_handler(DEVCB_##_devcb);
+ downcast<psxrcnt_device &>(*device).set_irq1_handler(DEVCB_##_devcb);
#define MCFG_PSX_RCNT_IRQ2_HANDLER(_devcb) \
- devcb = &downcast<psxrcnt_device &>(*device).set_irq2_handler(DEVCB_##_devcb);
+ downcast<psxrcnt_device &>(*device).set_irq2_handler(DEVCB_##_devcb);
#define PSX_RC_STOP ( 0x01 )
#define PSX_RC_RESET ( 0x04 ) /* guess */
#define PSX_RC_COUNTTARGET ( 0x08 )
diff --git a/src/devices/cpu/psx/sio.h b/src/devices/cpu/psx/sio.h
index fe2cb6af269..0548480abeb 100644
--- a/src/devices/cpu/psx/sio.h
+++ b/src/devices/cpu/psx/sio.h
@@ -17,19 +17,19 @@ DECLARE_DEVICE_TYPE(PSX_SIO0, psxsio0_device)
DECLARE_DEVICE_TYPE(PSX_SIO1, psxsio1_device)
#define MCFG_PSX_SIO_IRQ_HANDLER(_devcb) \
- devcb = &downcast<psxsio_device &>(*device).set_irq_handler(DEVCB_##_devcb);
+ downcast<psxsio_device &>(*device).set_irq_handler(DEVCB_##_devcb);
#define MCFG_PSX_SIO_SCK_HANDLER(_devcb) \
- devcb = &downcast<psxsio_device &>(*device).set_sck_handler(DEVCB_##_devcb);
+ downcast<psxsio_device &>(*device).set_sck_handler(DEVCB_##_devcb);
#define MCFG_PSX_SIO_TXD_HANDLER(_devcb) \
- devcb = &downcast<psxsio_device &>(*device).set_txd_handler(DEVCB_##_devcb);
+ downcast<psxsio_device &>(*device).set_txd_handler(DEVCB_##_devcb);
#define MCFG_PSX_SIO_DTR_HANDLER(_devcb) \
- devcb = &downcast<psxsio_device &>(*device).set_dtr_handler(DEVCB_##_devcb);
+ downcast<psxsio_device &>(*device).set_dtr_handler(DEVCB_##_devcb);
#define MCFG_PSX_SIO_RTS_HANDLER(_devcb) \
- devcb = &downcast<psxsio_device &>(*device).set_rts_handler(DEVCB_##_devcb);
+ downcast<psxsio_device &>(*device).set_rts_handler(DEVCB_##_devcb);
#define SIO_BUF_SIZE ( 8 )
diff --git a/src/devices/cpu/rsp/rsp.h b/src/devices/cpu/rsp/rsp.h
index 4c4c315e111..0e07b732ad2 100644
--- a/src/devices/cpu/rsp/rsp.h
+++ b/src/devices/cpu/rsp/rsp.h
@@ -84,19 +84,19 @@ enum
#define RSPDRC_STRICT_VERIFY 0x0001 /* verify all instructions */
#define MCFG_RSP_DP_REG_R_CB(_devcb) \
- devcb = &downcast<rsp_device &>(*device).set_dp_reg_r_callback(DEVCB_##_devcb);
+ downcast<rsp_device &>(*device).set_dp_reg_r_callback(DEVCB_##_devcb);
#define MCFG_RSP_DP_REG_W_CB(_devcb) \
- devcb = &downcast<rsp_device &>(*device).set_dp_reg_w_callback(DEVCB_##_devcb);
+ downcast<rsp_device &>(*device).set_dp_reg_w_callback(DEVCB_##_devcb);
#define MCFG_RSP_SP_REG_R_CB(_devcb) \
- devcb = &downcast<rsp_device &>(*device).set_sp_reg_r_callback(DEVCB_##_devcb);
+ downcast<rsp_device &>(*device).set_sp_reg_r_callback(DEVCB_##_devcb);
#define MCFG_RSP_SP_REG_W_CB(_devcb) \
- devcb = &downcast<rsp_device &>(*device).set_sp_reg_w_callback(DEVCB_##_devcb);
+ downcast<rsp_device &>(*device).set_sp_reg_w_callback(DEVCB_##_devcb);
#define MCFG_RSP_SP_SET_STATUS_CB(_devcb) \
- devcb = &downcast<rsp_device &>(*device).set_status_callback(DEVCB_##_devcb);
+ downcast<rsp_device &>(*device).set_status_callback(DEVCB_##_devcb);
class rsp_device : public cpu_device
diff --git a/src/devices/cpu/s2650/s2650.h b/src/devices/cpu/s2650/s2650.h
index 666c79cad5b..9bf1f03cf2f 100644
--- a/src/devices/cpu/s2650/s2650.h
+++ b/src/devices/cpu/s2650/s2650.h
@@ -28,13 +28,13 @@ DECLARE_DEVICE_TYPE(S2650, s2650_device)
#define MCFG_S2650_SENSE_INPUT(_devcb) \
- devcb = &downcast<s2650_device &>(*device).set_sense_handler(DEVCB_##_devcb);
+ downcast<s2650_device &>(*device).set_sense_handler(DEVCB_##_devcb);
#define MCFG_S2650_FLAG_OUTPUT(_devcb) \
- devcb = &downcast<s2650_device &>(*device).set_flag_handler(DEVCB_##_devcb);
+ downcast<s2650_device &>(*device).set_flag_handler(DEVCB_##_devcb);
#define MCFG_S2650_INTACK_HANDLER(_devcb) \
- devcb = &downcast<s2650_device &>(*device).set_intack_handler(DEVCB_##_devcb);
+ downcast<s2650_device &>(*device).set_intack_handler(DEVCB_##_devcb);
class s2650_device : public cpu_device, public s2650_disassembler::config
{
@@ -46,6 +46,9 @@ public:
template <class Object> devcb_base &set_sense_handler(Object &&cb) { return m_sense_handler.set_callback(std::forward<Object>(cb)); }
template <class Object> devcb_base &set_flag_handler(Object &&cb) { return m_flag_handler.set_callback(std::forward<Object>(cb)); }
template <class Object> devcb_base &set_intack_handler(Object &&cb) { return m_intack_handler.set_callback(std::forward<Object>(cb)); }
+ auto sense_handler() { return m_sense_handler.bind(); }
+ auto flag_handler() { return m_flag_handler.bind(); }
+ auto intack_handler() { return m_intack_handler.bind(); }
protected:
// device-level overrides
diff --git a/src/devices/cpu/sc61860/sc61860.h b/src/devices/cpu/sc61860/sc61860.h
index 18ea784db2d..cd38606e486 100644
--- a/src/devices/cpu/sc61860/sc61860.h
+++ b/src/devices/cpu/sc61860/sc61860.h
@@ -45,28 +45,28 @@ enum
#define MCFG_SC61860_READ_RESET_HANDLER(_devcb) \
- devcb = &downcast<sc61860_device &>(*device).set_reset_cb(DEVCB_##_devcb);
+ downcast<sc61860_device &>(*device).set_reset_cb(DEVCB_##_devcb);
#define MCFG_SC61860_READ_BRK_HANDLER(_devcb) \
- devcb = &downcast<sc61860_device &>(*device).set_brk_cb(DEVCB_##_devcb);
+ downcast<sc61860_device &>(*device).set_brk_cb(DEVCB_##_devcb);
#define MCFG_SC61860_READ_X_HANDLER(_devcb) \
- devcb = &downcast<sc61860_device &>(*device).set_x_cb(DEVCB_##_devcb);
+ downcast<sc61860_device &>(*device).set_x_cb(DEVCB_##_devcb);
#define MCFG_SC61860_READ_A_HANDLER(_devcb) \
- devcb = &downcast<sc61860_device &>(*device).set_ina_cb(DEVCB_##_devcb);
+ downcast<sc61860_device &>(*device).set_ina_cb(DEVCB_##_devcb);
#define MCFG_SC61860_WRITE_A_HANDLER(_devcb) \
- devcb = &downcast<sc61860_device &>(*device).set_outa_cb(DEVCB_##_devcb);
+ downcast<sc61860_device &>(*device).set_outa_cb(DEVCB_##_devcb);
#define MCFG_SC61860_READ_B_HANDLER(_devcb) \
- devcb = &downcast<sc61860_device &>(*device).set_inb_cb(DEVCB_##_devcb);
+ downcast<sc61860_device &>(*device).set_inb_cb(DEVCB_##_devcb);
#define MCFG_SC61860_WRITE_B_HANDLER(_devcb) \
- devcb = &downcast<sc61860_device &>(*device).set_outb_cb(DEVCB_##_devcb);
+ downcast<sc61860_device &>(*device).set_outb_cb(DEVCB_##_devcb);
#define MCFG_SC61860_WRITE_C_HANDLER(_devcb) \
- devcb = &downcast<sc61860_device &>(*device).set_outc_cb(DEVCB_##_devcb);
+ downcast<sc61860_device &>(*device).set_outc_cb(DEVCB_##_devcb);
class sc61860_device : public cpu_device
{
diff --git a/src/devices/cpu/scudsp/scudsp.h b/src/devices/cpu/scudsp/scudsp.h
index 6fb8133e51e..d7b7440acaf 100644
--- a/src/devices/cpu/scudsp/scudsp.h
+++ b/src/devices/cpu/scudsp/scudsp.h
@@ -37,13 +37,13 @@ enum
#define MCFG_SCUDSP_OUT_IRQ_CB(_devcb) \
- devcb = &downcast<scudsp_cpu_device &>(*device).set_out_irq_callback(DEVCB_##_devcb);
+ downcast<scudsp_cpu_device &>(*device).set_out_irq_callback(DEVCB_##_devcb);
#define MCFG_SCUDSP_IN_DMA_CB(_devcb) \
- devcb = &downcast<scudsp_cpu_device &>(*device).set_in_dma_callback(DEVCB_##_devcb);
+ downcast<scudsp_cpu_device &>(*device).set_in_dma_callback(DEVCB_##_devcb);
#define MCFG_SCUDSP_OUT_DMA_CB(_devcb) \
- devcb = &downcast<scudsp_cpu_device &>(*device).set_out_dma_callback(DEVCB_##_devcb);
+ downcast<scudsp_cpu_device &>(*device).set_out_dma_callback(DEVCB_##_devcb);
#define SCUDSP_RESET INPUT_LINE_RESET /* Non-Maskable */
diff --git a/src/devices/cpu/sm510/sm500.h b/src/devices/cpu/sm510/sm500.h
index 813d9cf70e5..c0c9d112504 100644
--- a/src/devices/cpu/sm510/sm500.h
+++ b/src/devices/cpu/sm510/sm500.h
@@ -18,7 +18,7 @@
// LCD segment outputs: H1/2 as a0, O group as a1-a4, O data as d0-d3
#define MCFG_SM500_WRITE_O_CB(_devcb) \
- devcb = &downcast<sm500_device &>(*device).set_write_o_callback(DEVCB_##_devcb);
+ downcast<sm500_device &>(*device).set_write_o_callback(DEVCB_##_devcb);
// see sm510.h for ACL, K, R, alpha, beta
diff --git a/src/devices/cpu/sm510/sm510.h b/src/devices/cpu/sm510/sm510.h
index 69521f8de4d..986381dd63c 100644
--- a/src/devices/cpu/sm510/sm510.h
+++ b/src/devices/cpu/sm510/sm510.h
@@ -15,26 +15,26 @@
// 4-bit K input port (pull-down)
#define MCFG_SM510_READ_K_CB(_devcb) \
- devcb = &downcast<sm510_base_device &>(*device).set_read_k_callback(DEVCB_##_devcb);
+ downcast<sm510_base_device &>(*device).set_read_k_callback(DEVCB_##_devcb);
// when in halt state, any K input going High can wake up the CPU,
// driver is required to use set_input_line(SM510_INPUT_LINE_K, state)
#define SM510_INPUT_LINE_K 0
// 1-bit BA(aka alpha) input pin (pull-up)
#define MCFG_SM510_READ_BA_CB(_devcb) \
- devcb = &downcast<sm510_base_device &>(*device).set_read_ba_callback(DEVCB_##_devcb);
+ downcast<sm510_base_device &>(*device).set_read_ba_callback(DEVCB_##_devcb);
// 1-bit B(beta) input pin (pull-up)
#define MCFG_SM510_READ_B_CB(_devcb) \
- devcb = &downcast<sm510_base_device &>(*device).set_read_b_callback(DEVCB_##_devcb);
+ downcast<sm510_base_device &>(*device).set_read_b_callback(DEVCB_##_devcb);
// 8-bit S strobe output port
#define MCFG_SM510_WRITE_S_CB(_devcb) \
- devcb = &downcast<sm510_base_device &>(*device).set_write_s_callback(DEVCB_##_devcb);
+ downcast<sm510_base_device &>(*device).set_write_s_callback(DEVCB_##_devcb);
// 1/2/4-bit R (buzzer/melody) output port
#define MCFG_SM510_WRITE_R_CB(_devcb) \
- devcb = &downcast<sm510_base_device &>(*device).set_write_r_callback(DEVCB_##_devcb);
+ downcast<sm510_base_device &>(*device).set_write_r_callback(DEVCB_##_devcb);
// For SM510, SM500, SM5A, R port output is selected with a mask option,
// either from the divider or direct contol. Documented options are:
// SM510/SM5A: control, 2(4096Hz meant for alarm sound)
@@ -45,15 +45,15 @@
// LCD segment outputs: H1-4 as offset(low), a/b/c 1-16 as data d0-d15
#define MCFG_SM510_WRITE_SEGA_CB(_devcb) \
- devcb = &downcast<sm510_base_device &>(*device).set_write_sega_callback(DEVCB_##_devcb);
+ downcast<sm510_base_device &>(*device).set_write_sega_callback(DEVCB_##_devcb);
#define MCFG_SM510_WRITE_SEGB_CB(_devcb) \
- devcb = &downcast<sm510_base_device &>(*device).set_write_segb_callback(DEVCB_##_devcb);
+ downcast<sm510_base_device &>(*device).set_write_segb_callback(DEVCB_##_devcb);
#define MCFG_SM510_WRITE_SEGC_CB(_devcb) \
- devcb = &downcast<sm510_base_device &>(*device).set_write_segc_callback(DEVCB_##_devcb);
+ downcast<sm510_base_device &>(*device).set_write_segc_callback(DEVCB_##_devcb);
// LCD bs output: same as above, but only up to 2 bits used
#define MCFG_SM510_WRITE_SEGBS_CB(_devcb) \
- devcb = &downcast<sm510_base_device &>(*device).set_write_segbs_callback(DEVCB_##_devcb);
+ downcast<sm510_base_device &>(*device).set_write_segbs_callback(DEVCB_##_devcb);
// LCD output lazy combination
#define MCFG_SM510_WRITE_SEGS_CB(_devcb) \
diff --git a/src/devices/cpu/sm8500/sm8500.h b/src/devices/cpu/sm8500/sm8500.h
index ddb4916fc1f..247a283685f 100644
--- a/src/devices/cpu/sm8500/sm8500.h
+++ b/src/devices/cpu/sm8500/sm8500.h
@@ -6,10 +6,10 @@
#pragma once
#define MCFG_SM8500_DMA_CB(_devcb) \
- devcb = &downcast<sm8500_cpu_device &>(*device).set_dma_cb(DEVCB_##_devcb);
+ downcast<sm8500_cpu_device &>(*device).set_dma_cb(DEVCB_##_devcb);
#define MCFG_SM8500_TIMER_CB(_devcb) \
- devcb = &downcast<sm8500_cpu_device &>(*device).set_timer_cb(DEVCB_##_devcb);
+ downcast<sm8500_cpu_device &>(*device).set_timer_cb(DEVCB_##_devcb);
enum
{
diff --git a/src/devices/cpu/superfx/superfx.h b/src/devices/cpu/superfx/superfx.h
index 14cc48d401f..90e98790d4f 100644
--- a/src/devices/cpu/superfx/superfx.h
+++ b/src/devices/cpu/superfx/superfx.h
@@ -90,7 +90,7 @@ enum
#define MCFG_SUPERFX_OUT_IRQ(_devcb) \
- devcb = &downcast<superfx_device &>(*device).set_out_irq_func(DEVCB_##_devcb);
+ downcast<superfx_device &>(*device).set_out_irq_func(DEVCB_##_devcb);
class superfx_device : public cpu_device, public superfx_disassembler::config
diff --git a/src/devices/cpu/t11/t11.h b/src/devices/cpu/t11/t11.h
index a6e12b51518..5c4d964ff46 100644
--- a/src/devices/cpu/t11/t11.h
+++ b/src/devices/cpu/t11/t11.h
@@ -32,7 +32,7 @@ enum
downcast<t11_device &>(*device).set_initial_mode(_mode);
#define MCFG_T11_RESET(_devcb) \
- devcb = &downcast<t11_device &>(*device).set_out_reset_func(DEVCB_##_devcb);
+ downcast<t11_device &>(*device).set_out_reset_func(DEVCB_##_devcb);
class t11_device : public cpu_device
{
diff --git a/src/devices/cpu/tlcs90/tlcs90.h b/src/devices/cpu/tlcs90/tlcs90.h
index 9fb16ad5bd4..73a168efb84 100644
--- a/src/devices/cpu/tlcs90/tlcs90.h
+++ b/src/devices/cpu/tlcs90/tlcs90.h
@@ -8,59 +8,59 @@
// I/O callbacks
#define MCFG_TLCS90_PORT_P0_READ_CB(_devcb) \
- devcb = &downcast<tlcs90_device &>(*device).set_port_read_cb(0, DEVCB_##_devcb);
+ downcast<tlcs90_device &>(*device).set_port_read_cb(0, DEVCB_##_devcb);
#define MCFG_TLCS90_PORT_P1_READ_CB(_devcb) \
- devcb = &downcast<tlcs90_device &>(*device).set_port_read_cb(1, DEVCB_##_devcb);
+ downcast<tlcs90_device &>(*device).set_port_read_cb(1, DEVCB_##_devcb);
#define MCFG_TLCS90_PORT_P2_READ_CB(_devcb) \
- devcb = &downcast<tlcs90_device &>(*device).set_port_read_cb(2, DEVCB_##_devcb);
+ downcast<tlcs90_device &>(*device).set_port_read_cb(2, DEVCB_##_devcb);
#define MCFG_TLCS90_PORT_P3_READ_CB(_devcb) \
- devcb = &downcast<tlcs90_device &>(*device).set_port_read_cb(3, DEVCB_##_devcb);
+ downcast<tlcs90_device &>(*device).set_port_read_cb(3, DEVCB_##_devcb);
#define MCFG_TLCS90_PORT_P4_READ_CB(_devcb) \
- devcb = &downcast<tlcs90_device &>(*device).set_port_read_cb(4, DEVCB_##_devcb);
+ downcast<tlcs90_device &>(*device).set_port_read_cb(4, DEVCB_##_devcb);
#define MCFG_TLCS90_PORT_P5_READ_CB(_devcb) \
- devcb = &downcast<tlcs90_device &>(*device).set_port_read_cb(5, DEVCB_##_devcb);
+ downcast<tlcs90_device &>(*device).set_port_read_cb(5, DEVCB_##_devcb);
#define MCFG_TLCS90_PORT_P6_READ_CB(_devcb) \
- devcb = &downcast<tlcs90_device &>(*device).set_port_read_cb(6, DEVCB_##_devcb);
+ downcast<tlcs90_device &>(*device).set_port_read_cb(6, DEVCB_##_devcb);
#define MCFG_TLCS90_PORT_P7_READ_CB(_devcb) \
- devcb = &downcast<tlcs90_device &>(*device).set_port_read_cb(7, DEVCB_##_devcb);
+ downcast<tlcs90_device &>(*device).set_port_read_cb(7, DEVCB_##_devcb);
#define MCFG_TLCS90_PORT_P8_READ_CB(_devcb) \
- devcb = &downcast<tlcs90_device &>(*device).set_port_read_cb(8, DEVCB_##_devcb);
+ downcast<tlcs90_device &>(*device).set_port_read_cb(8, DEVCB_##_devcb);
#define MCFG_TLCS90_PORT_P0_WRITE_CB(_devcb) \
- devcb = &downcast<tlcs90_device &>(*device).set_port_write_cb(0, DEVCB_##_devcb);
+ downcast<tlcs90_device &>(*device).set_port_write_cb(0, DEVCB_##_devcb);
#define MCFG_TLCS90_PORT_P1_WRITE_CB(_devcb) \
- devcb = &downcast<tlcs90_device &>(*device).set_port_write_cb(1, DEVCB_##_devcb);
+ downcast<tlcs90_device &>(*device).set_port_write_cb(1, DEVCB_##_devcb);
#define MCFG_TLCS90_PORT_P2_WRITE_CB(_devcb) \
- devcb = &downcast<tlcs90_device &>(*device).set_port_write_cb(2, DEVCB_##_devcb);
+ downcast<tlcs90_device &>(*device).set_port_write_cb(2, DEVCB_##_devcb);
#define MCFG_TLCS90_PORT_P3_WRITE_CB(_devcb) \
- devcb = &downcast<tlcs90_device &>(*device).set_port_write_cb(3, DEVCB_##_devcb);
+ downcast<tlcs90_device &>(*device).set_port_write_cb(3, DEVCB_##_devcb);
#define MCFG_TLCS90_PORT_P4_WRITE_CB(_devcb) \
- devcb = &downcast<tlcs90_device &>(*device).set_port_write_cb(4, DEVCB_##_devcb);
+ downcast<tlcs90_device &>(*device).set_port_write_cb(4, DEVCB_##_devcb);
#define MCFG_TLCS90_PORT_P5_WRITE_CB(_devcb) \
- devcb = &downcast<tlcs90_device &>(*device).set_port_write_cb(5, DEVCB_##_devcb);
+ downcast<tlcs90_device &>(*device).set_port_write_cb(5, DEVCB_##_devcb);
#define MCFG_TLCS90_PORT_P6_WRITE_CB(_devcb) \
- devcb = &downcast<tlcs90_device &>(*device).set_port_write_cb(6, DEVCB_##_devcb);
+ downcast<tlcs90_device &>(*device).set_port_write_cb(6, DEVCB_##_devcb);
#define MCFG_TLCS90_PORT_P7_WRITE_CB(_devcb) \
- devcb = &downcast<tlcs90_device &>(*device).set_port_write_cb(7, DEVCB_##_devcb);
+ downcast<tlcs90_device &>(*device).set_port_write_cb(7, DEVCB_##_devcb);
#define MCFG_TLCS90_PORT_P8_WRITE_CB(_devcb) \
- devcb = &downcast<tlcs90_device &>(*device).set_port_write_cb(8, DEVCB_##_devcb);
+ downcast<tlcs90_device &>(*device).set_port_write_cb(8, DEVCB_##_devcb);
enum tlcs90_e_irq { INTSWI = 0, INTNMI, INTWD, INT0, INTT0, INTT1, INTT2, INTT3, INTT4, INT1, INTT5, INT2, INTRX, INTTX, INTMAX };
diff --git a/src/devices/cpu/tlcs900/tlcs900.h b/src/devices/cpu/tlcs900/tlcs900.h
index 0da3f597a61..2fd1d37fbaa 100644
--- a/src/devices/cpu/tlcs900/tlcs900.h
+++ b/src/devices/cpu/tlcs900/tlcs900.h
@@ -613,37 +613,37 @@ protected:
};
#define MCFG_TMP95C061_PORT1_READ( _port_read ) \
- devcb = &downcast<tmp95c061_device &>(*device).set_port1_read(DEVCB_##_port_read);
+ downcast<tmp95c061_device &>(*device).set_port1_read(DEVCB_##_port_read);
#define MCFG_TMP95C061_PORT1_WRITE( _port_write ) \
- devcb = &downcast<tmp95c061_device &>(*device).set_port1_write(DEVCB_##_port_write);
+ downcast<tmp95c061_device &>(*device).set_port1_write(DEVCB_##_port_write);
#define MCFG_TMP95C061_PORT2_WRITE( _port_write ) \
- devcb = &downcast<tmp95c061_device &>(*device).set_port2_write(DEVCB_##_port_write);
+ downcast<tmp95c061_device &>(*device).set_port2_write(DEVCB_##_port_write);
#define MCFG_TMP95C061_PORT5_READ( _port_read ) \
- devcb = &downcast<tmp95c061_device &>(*device).set_port5_read(DEVCB_##_port_read);
+ downcast<tmp95c061_device &>(*device).set_port5_read(DEVCB_##_port_read);
#define MCFG_TMP95C061_PORT5_WRITE( _port_write ) \
- devcb = &downcast<tmp95c061_device &>(*device).set_port5_write(DEVCB_##_port_write);
+ downcast<tmp95c061_device &>(*device).set_port5_write(DEVCB_##_port_write);
#define MCFG_TMP95C061_PORT6_READ( _port_read ) \
- devcb = &downcast<tmp95c061_device &>(*device).set_port6_read(DEVCB_##_port_read);
+ downcast<tmp95c061_device &>(*device).set_port6_read(DEVCB_##_port_read);
#define MCFG_TMP95C061_PORT6_WRITE( _port_write ) \
- devcb = &downcast<tmp95c061_device &>(*device).set_port6_write(DEVCB_##_port_write);
+ downcast<tmp95c061_device &>(*device).set_port6_write(DEVCB_##_port_write);
#define MCFG_TMP95C061_PORT7_READ( _port_read ) \
- devcb = &downcast<tmp95c061_device &>(*device).set_port7_read(DEVCB_##_port_read);
+ downcast<tmp95c061_device &>(*device).set_port7_read(DEVCB_##_port_read);
#define MCFG_TMP95C061_PORT7_WRITE( _port_write ) \
- devcb = &downcast<tmp95c061_device &>(*device).set_port7_write(DEVCB_##_port_write);
+ downcast<tmp95c061_device &>(*device).set_port7_write(DEVCB_##_port_write);
#define MCFG_TMP95C061_PORT8_READ( _port_read ) \
- devcb = &downcast<tmp95c061_device &>(*device).set_port8_read(DEVCB_##_port_read);
+ downcast<tmp95c061_device &>(*device).set_port8_read(DEVCB_##_port_read);
#define MCFG_TMP95C061_PORT8_WRITE( _port_write ) \
- devcb = &downcast<mp95c061_device &>(*device).set_port8_write(DEVCB_##_port_write);
+ downcast<mp95c061_device &>(*device).set_port8_write(DEVCB_##_port_write);
#define MCFG_TMP95C061_PORT9_READ( _port_read ) \
- devcb = &downcast<tmp95c061_device &>(*device).set_port9_read(DEVCB_##_port_read);
+ downcast<tmp95c061_device &>(*device).set_port9_read(DEVCB_##_port_read);
#define MCFG_TMP95C061_PORTA_READ( _port_read ) \
- devcb = &downcast<tmp95c061_device &>(*device).set_porta_read(DEVCB_##_port_read);
+ downcast<tmp95c061_device &>(*device).set_porta_read(DEVCB_##_port_read);
#define MCFG_TMP95C061_PORTA_WRITE( _port_write ) \
- devcb = &downcast<tmp95c061_device &>(*device).set_porta_write(DEVCB_##_port_write);
+ downcast<tmp95c061_device &>(*device).set_porta_write(DEVCB_##_port_write);
#define MCFG_TMP95C061_PORTB_READ( _port_read ) \
- devcb = &downcast<tmp95c061_device &>(*device).set_portb_read(DEVCB_##_port_read);
+ downcast<tmp95c061_device &>(*device).set_portb_read(DEVCB_##_port_read);
#define MCFG_TMP95C061_PORTB_WRITE( _port_write ) \
- devcb = &downcast<tmp95c061_device &>(*device).set_portb_write(DEVCB_##_port_write);
+ downcast<tmp95c061_device &>(*device).set_portb_write(DEVCB_##_port_write);
class tmp95c061_device : public tlcs900h_device
{
@@ -728,44 +728,44 @@ private:
};
-#define MCFG_TMP95C063_PORT0_READ( _port_read ) devcb = &downcast<tmp95c063_device &>(*device).set_port0_read(DEVCB_##_port_read);
-#define MCFG_TMP95C063_PORT0_WRITE( _port_write ) devcb = &downcast<tmp95c063_device &>(*device).set_port0_write(DEVCB_##_port_write);
-#define MCFG_TMP95C063_PORT1_READ( _port_read ) devcb = &downcast<tmp95c063_device &>(*device).set_port1_read(DEVCB_##_port_read);
-#define MCFG_TMP95C063_PORT1_WRITE( _port_write ) devcb = &downcast<tmp95c063_device &>(*device).set_port1_write(DEVCB_##_port_write);
-#define MCFG_TMP95C063_PORT2_READ( _port_read ) devcb = &downcast<tmp95c063_device &>(*device).set_port2_read(DEVCB_##_port_read);
-#define MCFG_TMP95C063_PORT2_WRITE( _port_write ) devcb = &downcast<tmp95c063_device &>(*device).set_port2_write(DEVCB_##_port_write);
-#define MCFG_TMP95C063_PORT3_READ( _port_read ) devcb = &downcast<tmp95c063_device &>(*device).set_port3_read(DEVCB_##_port_read);
-#define MCFG_TMP95C063_PORT3_WRITE( _port_write ) devcb = &downcast<tmp95c063_device &>(*device).set_port3_write(DEVCB_##_port_write);
-#define MCFG_TMP95C063_PORT4_READ( _port_read ) devcb = &downcast<tmp95c063_device &>(*device).set_port4_read(DEVCB_##_port_read);
-#define MCFG_TMP95C063_PORT4_WRITE( _port_write ) devcb = &downcast<tmp95c063_device &>(*device).set_port4_write(DEVCB_##_port_write);
-#define MCFG_TMP95C063_PORT5_READ( _port_read ) devcb = &downcast<tmp95c063_device &>(*device).set_port5_read(DEVCB_##_port_read);
-#define MCFG_TMP95C063_PORT5_WRITE( _port_write ) devcb = &downcast<tmp95c063_device &>(*device).set_port5_write(DEVCB_##_port_write);
-#define MCFG_TMP95C063_PORT6_READ( _port_read ) devcb = &downcast<tmp95c063_device &>(*device).set_port6_read(DEVCB_##_port_read);
-#define MCFG_TMP95C063_PORT6_WRITE( _port_write ) devcb = &downcast<tmp95c063_device &>(*device).set_port6_write(DEVCB_##_port_write);
-#define MCFG_TMP95C063_PORT7_READ( _port_read ) devcb = &downcast<tmp95c063_device &>(*device).set_port7_read(DEVCB_##_port_read);
-#define MCFG_TMP95C063_PORT7_WRITE( _port_write ) devcb = &downcast<tmp95c063_device &>(*device).set_port7_write(DEVCB_##_port_write);
-#define MCFG_TMP95C063_PORT8_READ( _port_read ) devcb = &downcast<tmp95c063_device &>(*device).set_port8_read(DEVCB_##_port_read);
-#define MCFG_TMP95C063_PORT8_WRITE( _port_write ) devcb = &downcast<tmp95c063_device &>(*device).set_port8_write(DEVCB_##_port_write);
-#define MCFG_TMP95C063_PORT9_READ( _port_read ) devcb = &downcast<tmp95c063_device &>(*device).set_port9_read(DEVCB_##_port_read);
-#define MCFG_TMP95C063_PORT9_WRITE( _port_write ) devcb = &downcast<tmp95c063_device &>(*device).set_port9_write(DEVCB_##_port_write);
-#define MCFG_TMP95C063_PORTA_READ( _port_read ) devcb = &downcast<tmp95c063_device &>(*device).set_porta_read(DEVCB_##_port_read);
-#define MCFG_TMP95C063_PORTA_WRITE( _port_write ) devcb = &downcast<tmp95c063_device &>(*device).set_porta_write(DEVCB_##_port_write);
-#define MCFG_TMP95C063_PORTB_READ( _port_read ) devcb = &downcast<tmp95c063_device &>(*device).set_portb_read(DEVCB_##_port_read);
-#define MCFG_TMP95C063_PORTB_WRITE( _port_write ) devcb = &downcast<tmp95c063_device &>(*device).set_portb_write(DEVCB_##_port_write);
-#define MCFG_TMP95C063_PORTC_READ( _port_read ) devcb = &downcast<tmp95c063_device &>(*device).set_portc_read(DEVCB_##_port_read);
-#define MCFG_TMP95C063_PORTC_WRITE( _port_write ) devcb = &downcast<tmp95c063_device &>(*device).set_portc_write(DEVCB_##_port_write);
-#define MCFG_TMP95C063_PORTD_READ( _port_read ) devcb = &downcast<tmp95c063_device &>(*device).set_portd_read(DEVCB_##_port_read);
-#define MCFG_TMP95C063_PORTD_WRITE( _port_write ) devcb = &downcast<tmp95c063_device &>(*device).set_portd_write(DEVCB_##_port_write);
-#define MCFG_TMP95C063_PORTE_READ( _port_read ) devcb = &downcast<tmp95c063_device &>(*device).set_porte_read(DEVCB_##_port_read);
-#define MCFG_TMP95C063_PORTE_WRITE( _port_write ) devcb = &downcast<tmp95c063_device &>(*device).set_porte_write(DEVCB_##_port_write);
-#define MCFG_TMP95C063_AN0_READ( _port_read ) devcb = &downcast<tmp95c063_device &>(*device).set_an0_read(DEVCB_##_port_read);
-#define MCFG_TMP95C063_AN1_READ( _port_read ) devcb = &downcast<tmp95c063_device &>(*device).set_an1_read(DEVCB_##_port_read);
-#define MCFG_TMP95C063_AN2_READ( _port_read ) devcb = &downcast<tmp95c063_device &>(*device).set_an2_read(DEVCB_##_port_read);
-#define MCFG_TMP95C063_AN3_READ( _port_read ) devcb = &downcast<tmp95c063_device &>(*device).set_an3_read(DEVCB_##_port_read);
-#define MCFG_TMP95C063_AN4_READ( _port_read ) devcb = &downcast<tmp95c063_device &>(*device).set_an4_read(DEVCB_##_port_read);
-#define MCFG_TMP95C063_AN5_READ( _port_read ) devcb = &downcast<tmp95c063_device &>(*device).set_an5_read(DEVCB_##_port_read);
-#define MCFG_TMP95C063_AN6_READ( _port_read ) devcb = &downcast<tmp95c063_device &>(*device).set_an6_read(DEVCB_##_port_read);
-#define MCFG_TMP95C063_AN7_READ( _port_read ) devcb = &downcast<tmp95c063_device &>(*device).set_an7_read(DEVCB_##_port_read);
+#define MCFG_TMP95C063_PORT0_READ( _port_read ) downcast<tmp95c063_device &>(*device).set_port0_read(DEVCB_##_port_read);
+#define MCFG_TMP95C063_PORT0_WRITE( _port_write ) downcast<tmp95c063_device &>(*device).set_port0_write(DEVCB_##_port_write);
+#define MCFG_TMP95C063_PORT1_READ( _port_read ) downcast<tmp95c063_device &>(*device).set_port1_read(DEVCB_##_port_read);
+#define MCFG_TMP95C063_PORT1_WRITE( _port_write ) downcast<tmp95c063_device &>(*device).set_port1_write(DEVCB_##_port_write);
+#define MCFG_TMP95C063_PORT2_READ( _port_read ) downcast<tmp95c063_device &>(*device).set_port2_read(DEVCB_##_port_read);
+#define MCFG_TMP95C063_PORT2_WRITE( _port_write ) downcast<tmp95c063_device &>(*device).set_port2_write(DEVCB_##_port_write);
+#define MCFG_TMP95C063_PORT3_READ( _port_read ) downcast<tmp95c063_device &>(*device).set_port3_read(DEVCB_##_port_read);
+#define MCFG_TMP95C063_PORT3_WRITE( _port_write ) downcast<tmp95c063_device &>(*device).set_port3_write(DEVCB_##_port_write);
+#define MCFG_TMP95C063_PORT4_READ( _port_read ) downcast<tmp95c063_device &>(*device).set_port4_read(DEVCB_##_port_read);
+#define MCFG_TMP95C063_PORT4_WRITE( _port_write ) downcast<tmp95c063_device &>(*device).set_port4_write(DEVCB_##_port_write);
+#define MCFG_TMP95C063_PORT5_READ( _port_read ) downcast<tmp95c063_device &>(*device).set_port5_read(DEVCB_##_port_read);
+#define MCFG_TMP95C063_PORT5_WRITE( _port_write ) downcast<tmp95c063_device &>(*device).set_port5_write(DEVCB_##_port_write);
+#define MCFG_TMP95C063_PORT6_READ( _port_read ) downcast<tmp95c063_device &>(*device).set_port6_read(DEVCB_##_port_read);
+#define MCFG_TMP95C063_PORT6_WRITE( _port_write ) downcast<tmp95c063_device &>(*device).set_port6_write(DEVCB_##_port_write);
+#define MCFG_TMP95C063_PORT7_READ( _port_read ) downcast<tmp95c063_device &>(*device).set_port7_read(DEVCB_##_port_read);
+#define MCFG_TMP95C063_PORT7_WRITE( _port_write ) downcast<tmp95c063_device &>(*device).set_port7_write(DEVCB_##_port_write);
+#define MCFG_TMP95C063_PORT8_READ( _port_read ) downcast<tmp95c063_device &>(*device).set_port8_read(DEVCB_##_port_read);
+#define MCFG_TMP95C063_PORT8_WRITE( _port_write ) downcast<tmp95c063_device &>(*device).set_port8_write(DEVCB_##_port_write);
+#define MCFG_TMP95C063_PORT9_READ( _port_read ) downcast<tmp95c063_device &>(*device).set_port9_read(DEVCB_##_port_read);
+#define MCFG_TMP95C063_PORT9_WRITE( _port_write ) downcast<tmp95c063_device &>(*device).set_port9_write(DEVCB_##_port_write);
+#define MCFG_TMP95C063_PORTA_READ( _port_read ) downcast<tmp95c063_device &>(*device).set_porta_read(DEVCB_##_port_read);
+#define MCFG_TMP95C063_PORTA_WRITE( _port_write ) downcast<tmp95c063_device &>(*device).set_porta_write(DEVCB_##_port_write);
+#define MCFG_TMP95C063_PORTB_READ( _port_read ) downcast<tmp95c063_device &>(*device).set_portb_read(DEVCB_##_port_read);
+#define MCFG_TMP95C063_PORTB_WRITE( _port_write ) downcast<tmp95c063_device &>(*device).set_portb_write(DEVCB_##_port_write);
+#define MCFG_TMP95C063_PORTC_READ( _port_read ) downcast<tmp95c063_device &>(*device).set_portc_read(DEVCB_##_port_read);
+#define MCFG_TMP95C063_PORTC_WRITE( _port_write ) downcast<tmp95c063_device &>(*device).set_portc_write(DEVCB_##_port_write);
+#define MCFG_TMP95C063_PORTD_READ( _port_read ) downcast<tmp95c063_device &>(*device).set_portd_read(DEVCB_##_port_read);
+#define MCFG_TMP95C063_PORTD_WRITE( _port_write ) downcast<tmp95c063_device &>(*device).set_portd_write(DEVCB_##_port_write);
+#define MCFG_TMP95C063_PORTE_READ( _port_read ) downcast<tmp95c063_device &>(*device).set_porte_read(DEVCB_##_port_read);
+#define MCFG_TMP95C063_PORTE_WRITE( _port_write ) downcast<tmp95c063_device &>(*device).set_porte_write(DEVCB_##_port_write);
+#define MCFG_TMP95C063_AN0_READ( _port_read ) downcast<tmp95c063_device &>(*device).set_an0_read(DEVCB_##_port_read);
+#define MCFG_TMP95C063_AN1_READ( _port_read ) downcast<tmp95c063_device &>(*device).set_an1_read(DEVCB_##_port_read);
+#define MCFG_TMP95C063_AN2_READ( _port_read ) downcast<tmp95c063_device &>(*device).set_an2_read(DEVCB_##_port_read);
+#define MCFG_TMP95C063_AN3_READ( _port_read ) downcast<tmp95c063_device &>(*device).set_an3_read(DEVCB_##_port_read);
+#define MCFG_TMP95C063_AN4_READ( _port_read ) downcast<tmp95c063_device &>(*device).set_an4_read(DEVCB_##_port_read);
+#define MCFG_TMP95C063_AN5_READ( _port_read ) downcast<tmp95c063_device &>(*device).set_an5_read(DEVCB_##_port_read);
+#define MCFG_TMP95C063_AN6_READ( _port_read ) downcast<tmp95c063_device &>(*device).set_an6_read(DEVCB_##_port_read);
+#define MCFG_TMP95C063_AN7_READ( _port_read ) downcast<tmp95c063_device &>(*device).set_an7_read(DEVCB_##_port_read);
class tmp95c063_device : public tlcs900h_device
{
diff --git a/src/devices/cpu/tms1000/tms0270.h b/src/devices/cpu/tms1000/tms0270.h
index 64f28d4b544..d0947e5bc47 100644
--- a/src/devices/cpu/tms1000/tms0270.h
+++ b/src/devices/cpu/tms1000/tms0270.h
@@ -16,13 +16,13 @@
// TMS0270 was designed to interface with TMS5100, set it up at driver level
#define MCFG_TMS0270_READ_CTL_CB(_devcb) \
- devcb = &downcast<tms0270_cpu_device &>(*device).set_read_ctl_callback(DEVCB_##_devcb);
+ downcast<tms0270_cpu_device &>(*device).set_read_ctl_callback(DEVCB_##_devcb);
#define MCFG_TMS0270_WRITE_CTL_CB(_devcb) \
- devcb = &downcast<tms0270_cpu_device &>(*device).set_write_ctl_callback(DEVCB_##_devcb);
+ downcast<tms0270_cpu_device &>(*device).set_write_ctl_callback(DEVCB_##_devcb);
#define MCFG_TMS0270_WRITE_PDC_CB(_devcb) \
- devcb = &downcast<tms0270_cpu_device &>(*device).set_write_pdc_callback(DEVCB_##_devcb);
+ downcast<tms0270_cpu_device &>(*device).set_write_pdc_callback(DEVCB_##_devcb);
class tms0270_cpu_device : public tms0980_cpu_device
diff --git a/src/devices/cpu/tms1000/tms1k_base.h b/src/devices/cpu/tms1000/tms1k_base.h
index ed7164f2d43..481e9ad0d49 100644
--- a/src/devices/cpu/tms1000/tms1k_base.h
+++ b/src/devices/cpu/tms1000/tms1k_base.h
@@ -19,11 +19,11 @@
// K input pins
#define MCFG_TMS1XXX_READ_K_CB(_devcb) \
- devcb = &downcast<tms1k_base_device &>(*device).set_read_k_callback(DEVCB_##_devcb);
+ downcast<tms1k_base_device &>(*device).set_read_k_callback(DEVCB_##_devcb);
// O/Segment output pins
#define MCFG_TMS1XXX_WRITE_O_CB(_devcb) \
- devcb = &downcast<tms1k_base_device &>(*device).set_write_o_callback(DEVCB_##_devcb);
+ downcast<tms1k_base_device &>(*device).set_write_o_callback(DEVCB_##_devcb);
// Use this if the output PLA is unknown:
// If the microinstructions (or other) PLA is unknown, try using one from another romset.
@@ -32,11 +32,11 @@
// R output pins (also called D on some chips)
#define MCFG_TMS1XXX_WRITE_R_CB(_devcb) \
- devcb = &downcast<tms1k_base_device &>(*device).set_write_r_callback(DEVCB_##_devcb);
+ downcast<tms1k_base_device &>(*device).set_write_r_callback(DEVCB_##_devcb);
// OFF request on TMS0980 and up
#define MCFG_TMS1XXX_POWER_OFF_CB(_devcb) \
- devcb = &downcast<tms1k_base_device &>(*device).set_power_off_callback(DEVCB_##_devcb);
+ downcast<tms1k_base_device &>(*device).set_power_off_callback(DEVCB_##_devcb);
// HALT input pin on CMOS chips (use set_input_line)
#define TMS1XXX_INPUT_LINE_HALT 0
diff --git a/src/devices/cpu/tms32010/tms32010.h b/src/devices/cpu/tms32010/tms32010.h
index 0c1e705ada9..023bb1787a4 100644
--- a/src/devices/cpu/tms32010/tms32010.h
+++ b/src/devices/cpu/tms32010/tms32010.h
@@ -18,7 +18,7 @@
#define MCFG_TMS32010_BIO_IN_CB(_devcb) \
- devcb = &downcast<tms32010_device &>(*device).set_bio_in_cb(DEVCB_##_devcb); /* BIO input */
+ downcast<tms32010_device &>(*device).set_bio_in_cb(DEVCB_##_devcb); /* BIO input */
#define TMS32010_INT_PENDING 0x80000000
diff --git a/src/devices/cpu/tms32025/tms32025.h b/src/devices/cpu/tms32025/tms32025.h
index 6a3354f5bbd..de7f2681bb7 100644
--- a/src/devices/cpu/tms32025/tms32025.h
+++ b/src/devices/cpu/tms32025/tms32025.h
@@ -24,22 +24,22 @@
#define MCFG_TMS32025_BIO_IN_CB(_devcb) \
- devcb = &downcast<tms32025_device &>(*device).set_bio_in_cb(DEVCB_##_devcb); /* BIO input */
+ downcast<tms32025_device &>(*device).set_bio_in_cb(DEVCB_##_devcb); /* BIO input */
#define MCFG_TMS32025_HOLD_IN_CB(_devcb) \
- devcb = &downcast<tms32025_device &>(*device).set_hold_in_cb(DEVCB_##_devcb); /* HOLD input */
+ downcast<tms32025_device &>(*device).set_hold_in_cb(DEVCB_##_devcb); /* HOLD input */
#define MCFG_TMS32025_HOLD_ACK_OUT_CB(_devcb) \
- devcb = &downcast<tms32025_device &>(*device).set_hold_ack_out_cb(DEVCB_##_devcb); /* HOLD Acknowledge output */
+ downcast<tms32025_device &>(*device).set_hold_ack_out_cb(DEVCB_##_devcb); /* HOLD Acknowledge output */
#define MCFG_TMS32025_XF_OUT_CB(_devcb) \
- devcb = &downcast<tms32025_device &>(*device).set_xf_out_cb(DEVCB_##_devcb); /* XF output */
+ downcast<tms32025_device &>(*device).set_xf_out_cb(DEVCB_##_devcb); /* XF output */
#define MCFG_TMS32025_DR_IN_CB(_devcb) \
- devcb = &downcast<tms32025_device &>(*device).set_dr_in_cb(DEVCB_##_devcb); /* Serial Data Receive input */
+ downcast<tms32025_device &>(*device).set_dr_in_cb(DEVCB_##_devcb); /* Serial Data Receive input */
#define MCFG_TMS32025_DX_OUT_CB(_devcb) \
- devcb = &downcast<tms32025_device &>(*device).set_dx_out_cb(DEVCB_##_devcb); /* Serial Data Transmit output */
+ downcast<tms32025_device &>(*device).set_dx_out_cb(DEVCB_##_devcb); /* Serial Data Transmit output */
/****************************************************************************
diff --git a/src/devices/cpu/tms32031/tms32031.h b/src/devices/cpu/tms32031/tms32031.h
index dc11f88d8dd..14b7ab015db 100644
--- a/src/devices/cpu/tms32031/tms32031.h
+++ b/src/devices/cpu/tms32031/tms32031.h
@@ -95,16 +95,16 @@ enum
downcast<tms3203x_device &>(*device).set_mcbl_mode(_mode);
#define MCFG_TMS3203X_XF0_CB(_devcb) \
- devcb = &downcast<tms3203x_device &>(*device).set_xf0_callback(DEVCB_##_devcb);
+ downcast<tms3203x_device &>(*device).set_xf0_callback(DEVCB_##_devcb);
#define MCFG_TMS3203X_XF1_CB(_devcb) \
- devcb = &downcast<tms3203x_device &>(*device).set_xf1_callback(DEVCB_##_devcb);
+ downcast<tms3203x_device &>(*device).set_xf1_callback(DEVCB_##_devcb);
#define MCFG_TMS3203X_IACK_CB(_devcb) \
- devcb = &downcast<tms3203x_device &>(*device).set_iack_callback(DEVCB_##_devcb);
+ downcast<tms3203x_device &>(*device).set_iack_callback(DEVCB_##_devcb);
#define MCFG_TMS3203X_HOLDA_CB(_devcb) \
- devcb = &downcast<tms3203x_device &>(*device).set_holda_callback(DEVCB_##_devcb);
+ downcast<tms3203x_device &>(*device).set_holda_callback(DEVCB_##_devcb);
//**************************************************************************
// TYPE DEFINITIONS
diff --git a/src/devices/cpu/tms34010/tms34010.h b/src/devices/cpu/tms34010/tms34010.h
index 27176ceb54e..6d835a18975 100644
--- a/src/devices/cpu/tms34010/tms34010.h
+++ b/src/devices/cpu/tms34010/tms34010.h
@@ -125,7 +125,7 @@ enum
#define MCFG_TMS340X0_OUTPUT_INT_CB(_devcb) \
- devcb = &downcast<tms340x0_device &>(*device).set_output_int_callback(DEVCB_##_devcb);
+ downcast<tms340x0_device &>(*device).set_output_int_callback(DEVCB_##_devcb);
#define TMS340X0_TO_SHIFTREG_CB_MEMBER(_name) void _name(address_space &space, offs_t address, uint16_t *shiftreg)
diff --git a/src/devices/cpu/tms7000/tms7000.h b/src/devices/cpu/tms7000/tms7000.h
index 125a43d5dec..a1a50084b18 100644
--- a/src/devices/cpu/tms7000/tms7000.h
+++ b/src/devices/cpu/tms7000/tms7000.h
@@ -16,29 +16,29 @@
// read-only on 70x0
#define MCFG_TMS7000_IN_PORTA_CB(_devcb) \
- devcb = &downcast<tms7000_device &>(*device).set_port_read_cb(0, DEVCB_##_devcb);
+ downcast<tms7000_device &>(*device).set_port_read_cb(0, DEVCB_##_devcb);
#define MCFG_TMS7000_OUT_PORTA_CB(_devcb) \
- devcb = &downcast<tms7000_device &>(*device).set_port_write_cb(0, DEVCB_##_devcb);
+ downcast<tms7000_device &>(*device).set_port_write_cb(0, DEVCB_##_devcb);
// write-only
#define MCFG_TMS7000_OUT_PORTB_CB(_devcb) \
- devcb = &downcast<tms7000_device &>(*device).set_port_write_cb(1, DEVCB_##_devcb);
+ downcast<tms7000_device &>(*device).set_port_write_cb(1, DEVCB_##_devcb);
#define MCFG_TMS7000_IN_PORTC_CB(_devcb) \
- devcb = &downcast<tms7000_device &>(*device).set_port_read_cb(2, DEVCB_##_devcb);
+ downcast<tms7000_device &>(*device).set_port_read_cb(2, DEVCB_##_devcb);
#define MCFG_TMS7000_OUT_PORTC_CB(_devcb) \
- devcb = &downcast<tms7000_device &>(*device).set_port_write_cb(2, DEVCB_##_devcb);
+ downcast<tms7000_device &>(*device).set_port_write_cb(2, DEVCB_##_devcb);
#define MCFG_TMS7000_IN_PORTD_CB(_devcb) \
- devcb = &downcast<tms7000_device &>(*device).set_port_read_cb(3, DEVCB_##_devcb);
+ downcast<tms7000_device &>(*device).set_port_read_cb(3, DEVCB_##_devcb);
#define MCFG_TMS7000_OUT_PORTD_CB(_devcb) \
- devcb = &downcast<tms7000_device &>(*device).set_port_write_cb(3, DEVCB_##_devcb);
+ downcast<tms7000_device &>(*device).set_port_write_cb(3, DEVCB_##_devcb);
// TMS70C46 only
#define MCFG_TMS7000_IN_PORTE_CB(_devcb) \
- devcb = &downcast<tms7000_device &>(*device).set_port_read_cb(4, DEVCB_##_devcb);
+ downcast<tms7000_device &>(*device).set_port_read_cb(4, DEVCB_##_devcb);
#define MCFG_TMS7000_OUT_PORTE_CB(_devcb) \
- devcb = &downcast<tms7000_device &>(*device).set_port_write_cb(4, DEVCB_##_devcb);
+ downcast<tms7000_device &>(*device).set_port_write_cb(4, DEVCB_##_devcb);
enum { TMS7000_PC=1, TMS7000_SP, TMS7000_ST };
diff --git a/src/devices/cpu/tms9900/tms9995.h b/src/devices/cpu/tms9900/tms9995.h
index 940ec0f43ee..956d35cf11c 100644
--- a/src/devices/cpu/tms9900/tms9995.h
+++ b/src/devices/cpu/tms9900/tms9995.h
@@ -28,19 +28,19 @@ enum
};
#define MCFG_TMS9995_EXTOP_HANDLER( _extop) \
- devcb = &downcast<tms9995_device &>(*device).set_extop_callback(DEVCB_##_extop);
+ downcast<tms9995_device &>(*device).set_extop_callback(DEVCB_##_extop);
#define MCFG_TMS9995_IAQ_HANDLER( _iaq ) \
- devcb = &downcast<tms9995_device &>(*device).set_iaq_callback(DEVCB_##_iaq);
+ downcast<tms9995_device &>(*device).set_iaq_callback(DEVCB_##_iaq);
#define MCFG_TMS9995_CLKOUT_HANDLER( _clkout ) \
- devcb = &downcast<tms9995_device &>(*device).set_clkout_callback(DEVCB_##_clkout);
+ downcast<tms9995_device &>(*device).set_clkout_callback(DEVCB_##_clkout);
#define MCFG_TMS9995_HOLDA_HANDLER( _holda ) \
- devcb = &downcast<tms9995_device &>(*device).set_holda_callback(DEVCB_##_holda);
+ downcast<tms9995_device &>(*device).set_holda_callback(DEVCB_##_holda);
#define MCFG_TMS9995_DBIN_HANDLER( _dbin ) \
- devcb = &downcast<tms9995_device &>(*device).set_dbin_callback(DEVCB_##_dbin);
+ downcast<tms9995_device &>(*device).set_dbin_callback(DEVCB_##_dbin);
#define MCFG_TMS9995_ENABLE_OVINT( _ovint ) \
downcast<tms9995_device*>(device)->set_overflow_interrupt( _ovint );
diff --git a/src/devices/cpu/tms9900/tms99com.h b/src/devices/cpu/tms9900/tms99com.h
index 2ee65b3f2cc..033511ef350 100644
--- a/src/devices/cpu/tms9900/tms99com.h
+++ b/src/devices/cpu/tms9900/tms99com.h
@@ -47,25 +47,25 @@
MCFG_DEVICE_IO_MAP(_iomap)
#define MCFG_TMS99xx_EXTOP_HANDLER( _extop) \
- devcb = &downcast<tms99xx_device &>(*device).set_extop_callback(DEVCB_##_extop);
+ downcast<tms99xx_device &>(*device).set_extop_callback(DEVCB_##_extop);
#define MCFG_TMS99xx_INTLEVEL_HANDLER( _intlevel ) \
- devcb = &downcast<tms99xx_device &>(*device).set_intlevel_callback(DEVCB_##_intlevel);
+ downcast<tms99xx_device &>(*device).set_intlevel_callback(DEVCB_##_intlevel);
#define MCFG_TMS99xx_IAQ_HANDLER( _iaq ) \
- devcb = &downcast<tms99xx_device &>(*device).set_iaq_callback(DEVCB_##_iaq);
+ downcast<tms99xx_device &>(*device).set_iaq_callback(DEVCB_##_iaq);
#define MCFG_TMS99xx_CLKOUT_HANDLER( _clkout ) \
- devcb = &downcast<tms99xx_device &>(*device).set_clkout_callback(DEVCB_##_clkout);
+ downcast<tms99xx_device &>(*device).set_clkout_callback(DEVCB_##_clkout);
#define MCFG_TMS99xx_WAIT_HANDLER( _wait ) \
- devcb = &downcast<tms99xx_device &>(*device).set_wait_callback(DEVCB_##_wait);
+ downcast<tms99xx_device &>(*device).set_wait_callback(DEVCB_##_wait);
#define MCFG_TMS99xx_HOLDA_HANDLER( _holda ) \
- devcb = &downcast<tms99xx_device &>(*device).set_holda_callback(DEVCB_##_holda);
+ downcast<tms99xx_device &>(*device).set_holda_callback(DEVCB_##_holda);
#define MCFG_TMS99xx_DBIN_HANDLER( _dbin ) \
- devcb = &downcast<tms99xx_device &>(*device).set_dbin_callback(DEVCB_##_dbin);
+ downcast<tms99xx_device &>(*device).set_dbin_callback(DEVCB_##_dbin);
enum
{
diff --git a/src/devices/cpu/ucom4/ucom4.h b/src/devices/cpu/ucom4/ucom4.h
index 77f963a61e9..fe93029ac91 100644
--- a/src/devices/cpu/ucom4/ucom4.h
+++ b/src/devices/cpu/ucom4/ucom4.h
@@ -14,35 +14,35 @@
// I/O ports setup
#define MCFG_UCOM4_READ_A_CB(_devcb) \
- devcb = &downcast<ucom4_cpu_device &>(*device).set_read_a_callback(DEVCB_##_devcb);
+ downcast<ucom4_cpu_device &>(*device).set_read_a_callback(DEVCB_##_devcb);
#define MCFG_UCOM4_READ_B_CB(_devcb) \
- devcb = &downcast<ucom4_cpu_device &>(*device).set_read_b_callback(DEVCB_##_devcb);
+ downcast<ucom4_cpu_device &>(*device).set_read_b_callback(DEVCB_##_devcb);
#define MCFG_UCOM4_READ_C_CB(_devcb) \
- devcb = &downcast<ucom4_cpu_device &>(*device).set_read_c_callback(DEVCB_##_devcb);
+ downcast<ucom4_cpu_device &>(*device).set_read_c_callback(DEVCB_##_devcb);
#define MCFG_UCOM4_WRITE_C_CB(_devcb) \
- devcb = &downcast<ucom4_cpu_device &>(*device).set_write_c_callback(DEVCB_##_devcb);
+ downcast<ucom4_cpu_device &>(*device).set_write_c_callback(DEVCB_##_devcb);
#define MCFG_UCOM4_READ_D_CB(_devcb) \
- devcb = &downcast<ucom4_cpu_device &>(*device).set_read_d_callback(DEVCB_##_devcb);
+ downcast<ucom4_cpu_device &>(*device).set_read_d_callback(DEVCB_##_devcb);
#define MCFG_UCOM4_WRITE_D_CB(_devcb) \
- devcb = &downcast<ucom4_cpu_device &>(*device).set_write_d_callback(DEVCB_##_devcb);
+ downcast<ucom4_cpu_device &>(*device).set_write_d_callback(DEVCB_##_devcb);
#define MCFG_UCOM4_WRITE_E_CB(_devcb) \
- devcb = &downcast<ucom4_cpu_device &>(*device).set_write_e_callback(DEVCB_##_devcb);
+ downcast<ucom4_cpu_device &>(*device).set_write_e_callback(DEVCB_##_devcb);
#define MCFG_UCOM4_WRITE_F_CB(_devcb) \
- devcb = &downcast<ucom4_cpu_device &>(*device).set_write_f_callback(DEVCB_##_devcb);
+ downcast<ucom4_cpu_device &>(*device).set_write_f_callback(DEVCB_##_devcb);
#define MCFG_UCOM4_WRITE_G_CB(_devcb) \
- devcb = &downcast<ucom4_cpu_device &>(*device).set_write_g_callback(DEVCB_##_devcb);
+ downcast<ucom4_cpu_device &>(*device).set_write_g_callback(DEVCB_##_devcb);
#define MCFG_UCOM4_WRITE_H_CB(_devcb) \
- devcb = &downcast<ucom4_cpu_device &>(*device).set_write_h_callback(DEVCB_##_devcb);
+ downcast<ucom4_cpu_device &>(*device).set_write_h_callback(DEVCB_##_devcb);
#define MCFG_UCOM4_WRITE_I_CB(_devcb) \
- devcb = &downcast<ucom4_cpu_device &>(*device).set_write_i_callback(DEVCB_##_devcb);
+ downcast<ucom4_cpu_device &>(*device).set_write_i_callback(DEVCB_##_devcb);
enum
{
diff --git a/src/devices/cpu/upd7725/upd7725.h b/src/devices/cpu/upd7725/upd7725.h
index 93d5019245b..0b4cb717f81 100644
--- a/src/devices/cpu/upd7725/upd7725.h
+++ b/src/devices/cpu/upd7725/upd7725.h
@@ -30,37 +30,37 @@ enum
#define MCFG_NECDSP_IN_INT_CB(_devcb) \
- devcb = &downcast<necdsp_device &>(*device).set_in_int_callback(DEVCB_##_devcb);
+ downcast<necdsp_device &>(*device).set_in_int_callback(DEVCB_##_devcb);
#define MCFG_NECDSP_IN_SI_CB(_devcb) \
- devcb = &downcast<necdsp_device &>(*device).set_in_si_callback(DEVCB_##_devcb);
+ downcast<necdsp_device &>(*device).set_in_si_callback(DEVCB_##_devcb);
#define MCFG_NECDSP_IN_SCK_CB(_devcb) \
- devcb = &downcast<necdsp_device &>(*device).set_in_sck_callback(DEVCB_##_devcb);
+ downcast<necdsp_device &>(*device).set_in_sck_callback(DEVCB_##_devcb);
#define MCFG_NECDSP_IN_SIEN_CB(_devcb) \
- devcb = &downcast<necdsp_device &>(*device).set_in_sien_callback(DEVCB_##_devcb);
+ downcast<necdsp_device &>(*device).set_in_sien_callback(DEVCB_##_devcb);
#define MCFG_NECDSP_IN_SOEN_CB(_devcb) \
- devcb = &downcast<necdsp_device &>(*device).set_in_soen_callback(DEVCB_##_devcb);
+ downcast<necdsp_device &>(*device).set_in_soen_callback(DEVCB_##_devcb);
#define MCFG_NECDSP_IN_DACK_CB(_devcb) \
- devcb = &downcast<necdsp_device &>(*device).set_in_dack_callback(DEVCB_##_devcb);
+ downcast<necdsp_device &>(*device).set_in_dack_callback(DEVCB_##_devcb);
#define MCFG_NECDSP_OUT_P0_CB(_devcb) \
- devcb = &downcast<necdsp_device &>(*device).set_out_p0_callback(DEVCB_##_devcb);
+ downcast<necdsp_device &>(*device).set_out_p0_callback(DEVCB_##_devcb);
#define MCFG_NECDSP_OUT_P1_CB(_devcb) \
- devcb = &downcast<necdsp_device &>(*device).set_out_p1_callback(DEVCB_##_devcb);
+ downcast<necdsp_device &>(*device).set_out_p1_callback(DEVCB_##_devcb);
#define MCFG_NECDSP_OUT_SO_CB(_devcb) \
- devcb = &downcast<necdsp_device &>(*device).set_out_so_callback(DEVCB_##_devcb);
+ downcast<necdsp_device &>(*device).set_out_so_callback(DEVCB_##_devcb);
#define MCFG_NECDSP_OUT_SORQ_CB(_devcb) \
- devcb = &downcast<necdsp_device &>(*device).set_out_sorq_callback(DEVCB_##_devcb);
+ downcast<necdsp_device &>(*device).set_out_sorq_callback(DEVCB_##_devcb);
#define MCFG_NECDSP_OUT_DRQ_CB(_devcb) \
- devcb = &downcast<necdsp_device &>(*device).set_out_drq_callback(DEVCB_##_devcb);
+ downcast<necdsp_device &>(*device).set_out_drq_callback(DEVCB_##_devcb);
// ======================> necdsp_device
diff --git a/src/devices/cpu/upd7810/upd7810.h b/src/devices/cpu/upd7810/upd7810.h
index a609707f1d9..497ffc0acb7 100644
--- a/src/devices/cpu/upd7810/upd7810.h
+++ b/src/devices/cpu/upd7810/upd7810.h
@@ -39,74 +39,74 @@ enum
#define MCFG_UPD7810_TO(_devcb) \
- devcb = &downcast<upd7810_device &>(*device).set_to_func(DEVCB_##_devcb);
+ downcast<upd7810_device &>(*device).set_to_func(DEVCB_##_devcb);
#define MCFG_UPD7810_CO0(_devcb) \
- devcb = &downcast<upd7810_device &>(*device).set_co0_func(DEVCB_##_devcb);
+ downcast<upd7810_device &>(*device).set_co0_func(DEVCB_##_devcb);
#define MCFG_UPD7810_CO1(_devcb) \
- devcb = &downcast<upd7810_device &>(*device).set_co1_func(DEVCB_##_devcb);
+ downcast<upd7810_device &>(*device).set_co1_func(DEVCB_##_devcb);
#define MCFG_UPD7810_TXD(_devcb) \
- devcb = &downcast<upd7810_device &>(*device).set_txd_func(DEVCB_##_devcb);
+ downcast<upd7810_device &>(*device).set_txd_func(DEVCB_##_devcb);
#define MCFG_UPD7810_RXD(_devcb) \
- devcb = &downcast<upd7810_device &>(*device).set_rxd_func(DEVCB_##_devcb);
+ downcast<upd7810_device &>(*device).set_rxd_func(DEVCB_##_devcb);
#define MCFG_UPD7810_AN0(_devcb) \
- devcb = &downcast<upd7810_device &>(*device).set_an0_func(DEVCB_##_devcb);
+ downcast<upd7810_device &>(*device).set_an0_func(DEVCB_##_devcb);
#define MCFG_UPD7810_AN1(_devcb) \
- devcb = &downcast<upd7810_device &>(*device).set_an1_func(DEVCB_##_devcb);
+ downcast<upd7810_device &>(*device).set_an1_func(DEVCB_##_devcb);
#define MCFG_UPD7810_AN2(_devcb) \
- devcb = &downcast<upd7810_device &>(*device).set_an2_func(DEVCB_##_devcb);
+ downcast<upd7810_device &>(*device).set_an2_func(DEVCB_##_devcb);
#define MCFG_UPD7810_AN3(_devcb) \
- devcb = &downcast<upd7810_device &>(*device).set_an3_func(DEVCB_##_devcb);
+ downcast<upd7810_device &>(*device).set_an3_func(DEVCB_##_devcb);
#define MCFG_UPD7810_AN4(_devcb) \
- devcb = &downcast<upd7810_device &>(*device).set_an4_func(DEVCB_##_devcb);
+ downcast<upd7810_device &>(*device).set_an4_func(DEVCB_##_devcb);
#define MCFG_UPD7810_AN5(_devcb) \
- devcb = &downcast<upd7810_device &>(*device).set_an5_func(DEVCB_##_devcb);
+ downcast<upd7810_device &>(*device).set_an5_func(DEVCB_##_devcb);
#define MCFG_UPD7810_AN6(_devcb) \
- devcb = &downcast<upd7810_device &>(*device).set_an6_func(DEVCB_##_devcb);
+ downcast<upd7810_device &>(*device).set_an6_func(DEVCB_##_devcb);
#define MCFG_UPD7810_AN7(_devcb) \
- devcb = &downcast<upd7810_device &>(*device).set_an7_func(DEVCB_##_devcb);
+ downcast<upd7810_device &>(*device).set_an7_func(DEVCB_##_devcb);
#define MCFG_UPD7810_PORTA_READ_CB(_devcb) \
- devcb = &downcast<upd7810_device &>(*device).set_pa_in_cb(DEVCB_##_devcb);
+ downcast<upd7810_device &>(*device).set_pa_in_cb(DEVCB_##_devcb);
#define MCFG_UPD7810_PORTB_READ_CB(_devcb) \
- devcb = &downcast<upd7810_device &>(*device).set_pb_in_cb(DEVCB_##_devcb);
+ downcast<upd7810_device &>(*device).set_pb_in_cb(DEVCB_##_devcb);
#define MCFG_UPD7810_PORTC_READ_CB(_devcb) \
- devcb = &downcast<upd7810_device &>(*device).set_pc_in_cb(DEVCB_##_devcb);
+ downcast<upd7810_device &>(*device).set_pc_in_cb(DEVCB_##_devcb);
#define MCFG_UPD7810_PORTD_READ_CB(_devcb) \
- devcb = &downcast<upd7810_device &>(*device).set_pd_in_cb(DEVCB_##_devcb);
+ downcast<upd7810_device &>(*device).set_pd_in_cb(DEVCB_##_devcb);
#define MCFG_UPD7810_PORTF_READ_CB(_devcb) \
- devcb = &downcast<upd7810_device &>(*device).set_pf_in_cb(DEVCB_##_devcb);
+ downcast<upd7810_device &>(*device).set_pf_in_cb(DEVCB_##_devcb);
#define MCFG_UPD7810_PORTA_WRITE_CB(_devcb) \
- devcb = &downcast<upd7810_device &>(*device).set_pa_out_cb(DEVCB_##_devcb);
+ downcast<upd7810_device &>(*device).set_pa_out_cb(DEVCB_##_devcb);
#define MCFG_UPD7810_PORTB_WRITE_CB(_devcb) \
- devcb = &downcast<upd7810_device &>(*device).set_pb_out_cb(DEVCB_##_devcb);
+ downcast<upd7810_device &>(*device).set_pb_out_cb(DEVCB_##_devcb);
#define MCFG_UPD7810_PORTC_WRITE_CB(_devcb) \
- devcb = &downcast<upd7810_device &>(*device).set_pc_out_cb(DEVCB_##_devcb);
+ downcast<upd7810_device &>(*device).set_pc_out_cb(DEVCB_##_devcb);
#define MCFG_UPD7810_PORTD_WRITE_CB(_devcb) \
- devcb = &downcast<upd7810_device &>(*device).set_pd_out_cb(DEVCB_##_devcb);
+ downcast<upd7810_device &>(*device).set_pd_out_cb(DEVCB_##_devcb);
#define MCFG_UPD7810_PORTF_WRITE_CB(_devcb) \
- devcb = &downcast<upd7810_device &>(*device).set_pf_out_cb(DEVCB_##_devcb);
+ downcast<upd7810_device &>(*device).set_pf_out_cb(DEVCB_##_devcb);
#define MCFG_UPD7807_PORTA_READ_CB MCFG_UPD7810_PORTA_READ_CB
@@ -121,7 +121,7 @@ enum
#define MCFG_UPD7807_PORTF_WRITE_CB MCFG_UPD7810_PORTF_WRITE_CB
#define MCFG_UPD7807_PORTT_READ_CB(_devcb) \
- devcb = &downcast<upd7810_device &>(*device).set_pt_in_cb(DEVCB_##_devcb);
+ downcast<upd7810_device &>(*device).set_pt_in_cb(DEVCB_##_devcb);
class upd7810_device : public cpu_device
diff --git a/src/devices/cpu/z8/z8.h b/src/devices/cpu/z8/z8.h
index f0f135296e4..551ac1b87f0 100644
--- a/src/devices/cpu/z8/z8.h
+++ b/src/devices/cpu/z8/z8.h
@@ -13,29 +13,29 @@
#define MCFG_Z8_PORT_P0_READ_CB(_devcb) \
- devcb = &downcast<z8_device &>(*device).set_input_cb(0, DEVCB_##_devcb);
+ downcast<z8_device &>(*device).set_input_cb(0, DEVCB_##_devcb);
#define MCFG_Z8_PORT_P1_READ_CB(_devcb) \
- devcb = &downcast<z8_device &>(*device).set_input_cb(1, DEVCB_##_devcb);
+ downcast<z8_device &>(*device).set_input_cb(1, DEVCB_##_devcb);
#define MCFG_Z8_PORT_P2_READ_CB(_devcb) \
- devcb = &downcast<z8_device &>(*device).set_input_cb(2, DEVCB_##_devcb);
+ downcast<z8_device &>(*device).set_input_cb(2, DEVCB_##_devcb);
#define MCFG_Z8_PORT_P3_READ_CB(_devcb) \
- devcb = &downcast<z8_device &>(*device).set_input_cb(3, DEVCB_##_devcb);
+ downcast<z8_device &>(*device).set_input_cb(3, DEVCB_##_devcb);
#define MCFG_Z8_PORT_P0_WRITE_CB(_devcb) \
- devcb = &downcast<z8_device &>(*device).set_output_cb(0, DEVCB_##_devcb);
+ downcast<z8_device &>(*device).set_output_cb(0, DEVCB_##_devcb);
#define MCFG_Z8_PORT_P1_WRITE_CB(_devcb) \
- devcb = &downcast<z8_device &>(*device).set_output_cb(1, DEVCB_##_devcb);
+ downcast<z8_device &>(*device).set_output_cb(1, DEVCB_##_devcb);
#define MCFG_Z8_PORT_P2_WRITE_CB(_devcb) \
- devcb = &downcast<z8_device &>(*device).set_output_cb(2, DEVCB_##_devcb);
+ downcast<z8_device &>(*device).set_output_cb(2, DEVCB_##_devcb);
#define MCFG_Z8_PORT_P3_WRITE_CB(_devcb) \
- devcb = &downcast<z8_device &>(*device).set_output_cb(3, DEVCB_##_devcb);
+ downcast<z8_device &>(*device).set_output_cb(3, DEVCB_##_devcb);
class z8_device : public cpu_device
diff --git a/src/devices/cpu/z80/tmpz84c011.h b/src/devices/cpu/z80/tmpz84c011.h
index b210dbd1589..bef9986698c 100644
--- a/src/devices/cpu/z80/tmpz84c011.h
+++ b/src/devices/cpu/z80/tmpz84c011.h
@@ -25,46 +25,46 @@
// CTC callbacks
#define MCFG_TMPZ84C011_ZC0_CB(_devcb) \
- devcb = &downcast<tmpz84c011_device &>(*device).set_zc0_callback(DEVCB_##_devcb);
+ downcast<tmpz84c011_device &>(*device).set_zc0_callback(DEVCB_##_devcb);
#define MCFG_TMPZ84C011_ZC1_CB(_devcb) \
- devcb = &downcast<tmpz84c011_device &>(*device).set_zc1_callback(DEVCB_##_devcb);
+ downcast<tmpz84c011_device &>(*device).set_zc1_callback(DEVCB_##_devcb);
#define MCFG_TMPZ84C011_ZC2_CB(_devcb) \
- devcb = &downcast<tmpz84c011_device &>(*device).set_zc2_callback(DEVCB_##_devcb);
+ downcast<tmpz84c011_device &>(*device).set_zc2_callback(DEVCB_##_devcb);
// I/O callbacks
#define MCFG_TMPZ84C011_PORTA_READ_CB(_devcb) \
- devcb = &downcast<tmpz84c011_device &>(*device).set_inportsa_cb(DEVCB_##_devcb);
+ downcast<tmpz84c011_device &>(*device).set_inportsa_cb(DEVCB_##_devcb);
#define MCFG_TMPZ84C011_PORTB_READ_CB(_devcb) \
- devcb = &downcast<tmpz84c011_device &>(*device).set_inportsb_cb(DEVCB_##_devcb);
+ downcast<tmpz84c011_device &>(*device).set_inportsb_cb(DEVCB_##_devcb);
#define MCFG_TMPZ84C011_PORTC_READ_CB(_devcb) \
- devcb = &downcast<tmpz84c011_device &>(*device).set_inportsc_cb(DEVCB_##_devcb);
+ downcast<tmpz84c011_device &>(*device).set_inportsc_cb(DEVCB_##_devcb);
#define MCFG_TMPZ84C011_PORTD_READ_CB(_devcb) \
- devcb = &downcast<tmpz84c011_device &>(*device).set_inportsd_cb(DEVCB_##_devcb);
+ downcast<tmpz84c011_device &>(*device).set_inportsd_cb(DEVCB_##_devcb);
#define MCFG_TMPZ84C011_PORTE_READ_CB(_devcb) \
- devcb = &downcast<tmpz84c011_device &>(*device).set_inportse_cb(DEVCB_##_devcb);
+ downcast<tmpz84c011_device &>(*device).set_inportse_cb(DEVCB_##_devcb);
#define MCFG_TMPZ84C011_PORTA_WRITE_CB(_devcb) \
- devcb = &downcast<tmpz84c011_device &>(*device).set_outportsa_cb(DEVCB_##_devcb);
+ downcast<tmpz84c011_device &>(*device).set_outportsa_cb(DEVCB_##_devcb);
#define MCFG_TMPZ84C011_PORTB_WRITE_CB(_devcb) \
- devcb = &downcast<tmpz84c011_device &>(*device).set_outportsb_cb(DEVCB_##_devcb);
+ downcast<tmpz84c011_device &>(*device).set_outportsb_cb(DEVCB_##_devcb);
#define MCFG_TMPZ84C011_PORTC_WRITE_CB(_devcb) \
- devcb = &downcast<tmpz84c011_device &>(*device).set_outportsc_cb(DEVCB_##_devcb);
+ downcast<tmpz84c011_device &>(*device).set_outportsc_cb(DEVCB_##_devcb);
#define MCFG_TMPZ84C011_PORTD_WRITE_CB(_devcb) \
- devcb = &downcast<tmpz84c011_device &>(*device).set_outportsd_cb(DEVCB_##_devcb);
+ downcast<tmpz84c011_device &>(*device).set_outportsd_cb(DEVCB_##_devcb);
#define MCFG_TMPZ84C011_PORTE_WRITE_CB(_devcb) \
- devcb = &downcast<tmpz84c011_device &>(*device).set_outportse_cb(DEVCB_##_devcb);
+ downcast<tmpz84c011_device &>(*device).set_outportse_cb(DEVCB_##_devcb);
/***************************************************************************
diff --git a/src/devices/cpu/z80/tmpz84c015.h b/src/devices/cpu/z80/tmpz84c015.h
index 18f221f3b34..93b4d897c16 100644
--- a/src/devices/cpu/z80/tmpz84c015.h
+++ b/src/devices/cpu/z80/tmpz84c015.h
@@ -24,80 +24,80 @@
// SIO callbacks
#define MCFG_TMPZ84C015_OUT_TXDA_CB(_devcb) \
- devcb = &downcast<tmpz84c015_device &>(*device).set_out_txda_callback(DEVCB_##_devcb);
+ downcast<tmpz84c015_device &>(*device).set_out_txda_callback(DEVCB_##_devcb);
#define MCFG_TMPZ84C015_OUT_DTRA_CB(_devcb) \
- devcb = &downcast<tmpz84c015_device &>(*device).set_out_dtra_callback(DEVCB_##_devcb);
+ downcast<tmpz84c015_device &>(*device).set_out_dtra_callback(DEVCB_##_devcb);
#define MCFG_TMPZ84C015_OUT_RTSA_CB(_devcb) \
- devcb = &downcast<tmpz84c015_device &>(*device).set_out_rtsa_callback(DEVCB_##_devcb);
+ downcast<tmpz84c015_device &>(*device).set_out_rtsa_callback(DEVCB_##_devcb);
#define MCFG_TMPZ84C015_OUT_WRDYA_CB(_devcb) \
- devcb = &downcast<tmpz84c015_device &>(*device).set_out_wrdya_callback(DEVCB_##_devcb);
+ downcast<tmpz84c015_device &>(*device).set_out_wrdya_callback(DEVCB_##_devcb);
#define MCFG_TMPZ84C015_OUT_SYNCA_CB(_devcb) \
- devcb = &downcast<tmpz84c015_device &>(*device).set_out_synca_callback(DEVCB_##_devcb);
+ downcast<tmpz84c015_device &>(*device).set_out_synca_callback(DEVCB_##_devcb);
#define MCFG_TMPZ84C015_OUT_TXDB_CB(_devcb) \
- devcb = &downcast<tmpz84c015_device &>(*device).set_out_txdb_callback(DEVCB_##_devcb);
+ downcast<tmpz84c015_device &>(*device).set_out_txdb_callback(DEVCB_##_devcb);
#define MCFG_TMPZ84C015_OUT_DTRB_CB(_devcb) \
- devcb = &downcast<tmpz84c015_device &>(*device).set_out_dtrb_callback(DEVCB_##_devcb);
+ downcast<tmpz84c015_device &>(*device).set_out_dtrb_callback(DEVCB_##_devcb);
#define MCFG_TMPZ84C015_OUT_RTSB_CB(_devcb) \
- devcb = &downcast<tmpz84c015_device &>(*device).set_out_rtsb_callback(DEVCB_##_devcb);
+ downcast<tmpz84c015_device &>(*device).set_out_rtsb_callback(DEVCB_##_devcb);
#define MCFG_TMPZ84C015_OUT_WRDYB_CB(_devcb) \
- devcb = &downcast<tmpz84c015_device &>(*device).set_out_wrdyb_callback(DEVCB_##_devcb);
+ downcast<tmpz84c015_device &>(*device).set_out_wrdyb_callback(DEVCB_##_devcb);
#define MCFG_TMPZ84C015_OUT_SYNCB_CB(_devcb) \
- devcb = &downcast<tmpz84c015_device &>(*device).set_out_syncb_callback(DEVCB_##_devcb);
+ downcast<tmpz84c015_device &>(*device).set_out_syncb_callback(DEVCB_##_devcb);
#define MCFG_TMPZ84C015_OUT_RXDRQA_CB(_devcb) \
- devcb = &downcast<tmpz84c015_device &>(*device).set_out_rxdrqa_callback(DEVCB_##_devcb);
+ downcast<tmpz84c015_device &>(*device).set_out_rxdrqa_callback(DEVCB_##_devcb);
#define MCFG_TMPZ84C015_OUT_TXDRQA_CB(_devcb) \
- devcb = &downcast<tmpz84c015_device &>(*device).set_out_txdrqa_callback(DEVCB_##_devcb);
+ downcast<tmpz84c015_device &>(*device).set_out_txdrqa_callback(DEVCB_##_devcb);
#define MCFG_TMPZ84C015_OUT_RXDRQB_CB(_devcb) \
- devcb = &downcast<tmpz84c015_device &>(*device).set_out_rxdrqb_callback(DEVCB_##_devcb);
+ downcast<tmpz84c015_device &>(*device).set_out_rxdrqb_callback(DEVCB_##_devcb);
#define MCFG_TMPZ84C015_OUT_TXDRQB_CB(_devcb) \
- devcb = &downcast<tmpz84c015_device &>(*device).set_out_txdrqb_callback(DEVCB_##_devcb);
+ downcast<tmpz84c015_device &>(*device).set_out_txdrqb_callback(DEVCB_##_devcb);
// CTC callbacks
#define MCFG_TMPZ84C015_ZC0_CB(_devcb) \
- devcb = &downcast<tmpz84c015_device &>(*device).set_zc_callback<0>(DEVCB_##_devcb);
+ downcast<tmpz84c015_device &>(*device).set_zc_callback<0>(DEVCB_##_devcb);
#define MCFG_TMPZ84C015_ZC1_CB(_devcb) \
- devcb = &downcast<tmpz84c015_device &>(*device).set_zc_callback<1>(DEVCB_##_devcb);
+ downcast<tmpz84c015_device &>(*device).set_zc_callback<1>(DEVCB_##_devcb);
#define MCFG_TMPZ84C015_ZC2_CB(_devcb) \
- devcb = &downcast<tmpz84c015_device &>(*device).set_zc_callback<2>(DEVCB_##_devcb);
+ downcast<tmpz84c015_device &>(*device).set_zc_callback<2>(DEVCB_##_devcb);
#define MCFG_TMPZ84C015_ZC3_CB(_devcb) \
- devcb = &downcast<tmpz84c015_device &>(*device).set_zc_callback<3>(DEVCB_##_devcb);
+ downcast<tmpz84c015_device &>(*device).set_zc_callback<3>(DEVCB_##_devcb);
// PIO callbacks
#define MCFG_TMPZ84C015_IN_PA_CB(_devcb) \
- devcb = &downcast<tmpz84c015_device &>(*device).set_in_pa_callback(DEVCB_##_devcb);
+ downcast<tmpz84c015_device &>(*device).set_in_pa_callback(DEVCB_##_devcb);
#define MCFG_TMPZ84C015_OUT_PA_CB(_devcb) \
- devcb = &downcast<tmpz84c015_device &>(*device).set_out_pa_callback(DEVCB_##_devcb);
+ downcast<tmpz84c015_device &>(*device).set_out_pa_callback(DEVCB_##_devcb);
#define MCFG_TMPZ84C015_OUT_ARDY_CB(_devcb) \
- devcb = &downcast<tmpz84c015_device &>(*device).set_out_ardy_callback(DEVCB_##_devcb);
+ downcast<tmpz84c015_device &>(*device).set_out_ardy_callback(DEVCB_##_devcb);
#define MCFG_TMPZ84C015_IN_PB_CB(_devcb) \
- devcb = &downcast<tmpz84c015_device &>(*device).set_in_pb_callback(DEVCB_##_devcb);
+ downcast<tmpz84c015_device &>(*device).set_in_pb_callback(DEVCB_##_devcb);
#define MCFG_TMPZ84C015_OUT_PB_CB(_devcb) \
- devcb = &downcast<tmpz84c015_device &>(*device).set_out_pb_callback(DEVCB_##_devcb);
+ downcast<tmpz84c015_device &>(*device).set_out_pb_callback(DEVCB_##_devcb);
#define MCFG_TMPZ84C015_OUT_BRDY_CB(_devcb) \
- devcb = &downcast<tmpz84c015_device &>(*device).set_out_brdy_callback(DEVCB_##_devcb);
+ downcast<tmpz84c015_device &>(*device).set_out_brdy_callback(DEVCB_##_devcb);
/***************************************************************************
@@ -115,27 +115,48 @@ public:
template<class Object> devcb_base &set_out_rtsa_callback(Object &&cb) { return m_out_rtsa_cb.set_callback(std::forward<Object>(cb)); }
template<class Object> devcb_base &set_out_wrdya_callback(Object &&cb) { return m_out_wrdya_cb.set_callback(std::forward<Object>(cb)); }
template<class Object> devcb_base &set_out_synca_callback(Object &&cb) { return m_out_synca_cb.set_callback(std::forward<Object>(cb)); }
+ auto out_txda_callback() { return m_out_txda_cb.bind(); }
+ auto out_dtra_callback() { return m_out_dtra_cb.bind(); }
+ auto out_rtsa_callback() { return m_out_rtsa_cb.bind(); }
+ auto out_wrdya_callback() { return m_out_wrdya_cb.bind(); }
+ auto out_synca_callback() { return m_out_synca_cb.bind(); }
template<class Object> devcb_base &set_out_txdb_callback(Object &&cb) { return m_out_txdb_cb.set_callback(std::forward<Object>(cb)); }
template<class Object> devcb_base &set_out_dtrb_callback(Object &&cb) { return m_out_dtrb_cb.set_callback(std::forward<Object>(cb)); }
template<class Object> devcb_base &set_out_rtsb_callback(Object &&cb) { return m_out_rtsb_cb.set_callback(std::forward<Object>(cb)); }
template<class Object> devcb_base &set_out_wrdyb_callback(Object &&cb) { return m_out_wrdyb_cb.set_callback(std::forward<Object>(cb)); }
template<class Object> devcb_base &set_out_syncb_callback(Object &&cb) { return m_out_syncb_cb.set_callback(std::forward<Object>(cb)); }
+ auto out_txdb_callback() { return m_out_txdb_cb.bind(); }
+ auto out_dtrb_callback() { return m_out_dtrb_cb.bind(); }
+ auto out_rtsb_callback() { return m_out_rtsb_cb.bind(); }
+ auto out_wrdyb_callback() { return m_out_wrdyb_cb.bind(); }
+ auto out_syncb_callback() { return m_out_syncb_cb.bind(); }
template<class Object> devcb_base &set_out_rxdrqa_callback(Object &&cb) { return m_out_rxdrqa_cb.set_callback(std::forward<Object>(cb)); }
template<class Object> devcb_base &set_out_txdrqa_callback(Object &&cb) { return m_out_txdrqa_cb.set_callback(std::forward<Object>(cb)); }
template<class Object> devcb_base &set_out_rxdrqb_callback(Object &&cb) { return m_out_rxdrqb_cb.set_callback(std::forward<Object>(cb)); }
template<class Object> devcb_base &set_out_txdrqb_callback(Object &&cb) { return m_out_txdrqb_cb.set_callback(std::forward<Object>(cb)); }
+ auto out_rxdrqa_callback() { return m_out_rxdrqa_cb.bind(); }
+ auto out_txdrqa_callback() { return m_out_txdrqa_cb.bind(); }
+ auto out_rxdrqb_callback() { return m_out_rxdrqb_cb.bind(); }
+ auto out_txdrqb_callback() { return m_out_txdrqb_cb.bind(); }
template<unsigned N, class Object> devcb_base &set_zc_callback(Object &&cb) { return m_zc_cb[N].set_callback(std::forward<Object>(cb)); }
+ template<unsigned N> auto zc_callback() { return m_zc_cb[N].bind(); }
template<class Object> devcb_base &set_in_pa_callback(Object &&cb) { return m_in_pa_cb.set_callback(std::forward<Object>(cb)); }
template<class Object> devcb_base &set_out_pa_callback(Object &&cb) { return m_out_pa_cb.set_callback(std::forward<Object>(cb)); }
template<class Object> devcb_base &set_out_ardy_callback(Object &&cb) { return m_out_ardy_cb.set_callback(std::forward<Object>(cb)); }
+ auto in_pa_callback() { return m_in_pa_cb.bind(); }
+ auto out_pa_callback() { return m_out_pa_cb.bind(); }
+ auto out_ardy_callback() { return m_out_ardy_cb.bind(); }
template<class Object> devcb_base &set_in_pb_callback(Object &&cb) { return m_in_pb_cb.set_callback(std::forward<Object>(cb)); }
template<class Object> devcb_base &set_out_pb_callback(Object &&cb) { return m_out_pb_cb.set_callback(std::forward<Object>(cb)); }
template<class Object> devcb_base &set_out_brdy_callback(Object &&cb) { return m_out_brdy_cb.set_callback(std::forward<Object>(cb)); }
+ auto in_pb_callback() { return m_in_pb_cb.bind(); }
+ auto out_pb_callback() { return m_out_pb_cb.bind(); }
+ auto out_brdy_callback() { return m_out_brdy_cb.bind(); }
// SIO public interface
DECLARE_WRITE_LINE_MEMBER( rxa_w ) { m_sio->rxa_w(state); }
diff --git a/src/devices/cpu/z80/z80.h b/src/devices/cpu/z80/z80.h
index 9e7471c9826..8af446f9882 100644
--- a/src/devices/cpu/z80/z80.h
+++ b/src/devices/cpu/z80/z80.h
@@ -8,13 +8,13 @@
#include "machine/z80daisy.h"
#define MCFG_Z80_SET_IRQACK_CALLBACK(_devcb) \
- devcb = &downcast<z80_device &>(*device).set_irqack_cb(DEVCB_##_devcb);
+ downcast<z80_device &>(*device).set_irqack_cb(DEVCB_##_devcb);
#define MCFG_Z80_SET_REFRESH_CALLBACK(_devcb) \
- devcb = &downcast<z80_device &>(*device).set_refresh_cb(DEVCB_##_devcb);
+ downcast<z80_device &>(*device).set_refresh_cb(DEVCB_##_devcb);
#define MCFG_Z80_SET_HALT_CALLBACK(_devcb) \
- devcb = &downcast<z80_device &>(*device).set_halt_cb(DEVCB_##_devcb);
+ downcast<z80_device &>(*device).set_halt_cb(DEVCB_##_devcb);
enum
{
diff --git a/src/devices/cpu/z8000/z8000.h b/src/devices/cpu/z8000/z8000.h
index 93cab12a193..1bd2311c6ed 100644
--- a/src/devices/cpu/z8000/z8000.h
+++ b/src/devices/cpu/z8000/z8000.h
@@ -30,7 +30,7 @@ enum
#define Z8000_HALT 0x0100 /* halted flag */
#define MCFG_Z8000_MO(_devcb) \
- devcb = &downcast<z8002_device &>(*device).set_mo_callback(DEVCB_##_devcb);
+ downcast<z8002_device &>(*device).set_mo_callback(DEVCB_##_devcb);
class z8002_device : public cpu_device, public z8000_disassembler::config
{
diff --git a/src/devices/imagedev/flopdrv.h b/src/devices/imagedev/flopdrv.h
index 1546eec8546..11182f2dc00 100644
--- a/src/devices/imagedev/flopdrv.h
+++ b/src/devices/imagedev/flopdrv.h
@@ -88,7 +88,7 @@ struct chrn_id
#define FLOPPY_DRIVE_INDEX 0x0020
#define MCFG_LEGACY_FLOPPY_IDX_CB(_devcb) \
- devcb = &downcast<legacy_floppy_image_device &>(*device).set_out_idx_func(DEVCB_##_devcb);
+ downcast<legacy_floppy_image_device &>(*device).set_out_idx_func(DEVCB_##_devcb);
class legacy_floppy_image_device : public device_t,
public device_image_interface
diff --git a/src/devices/imagedev/midiin.h b/src/devices/imagedev/midiin.h
index aaba86fc2d1..b429bc4f65f 100644
--- a/src/devices/imagedev/midiin.h
+++ b/src/devices/imagedev/midiin.h
@@ -16,7 +16,7 @@
#include "diserial.h"
#define MCFG_MIDIIN_INPUT_CB(_devcb) \
- devcb = &downcast<midiin_device &>(*device).set_input_callback(DEVCB_##_devcb);
+ downcast<midiin_device &>(*device).set_input_callback(DEVCB_##_devcb);
/***************************************************************************
diff --git a/src/devices/imagedev/printer.h b/src/devices/imagedev/printer.h
index 41f2dbb03cd..099d19cab9e 100644
--- a/src/devices/imagedev/printer.h
+++ b/src/devices/imagedev/printer.h
@@ -14,7 +14,7 @@
#pragma once
#define MCFG_PRINTER_ONLINE_CB(_devcb) \
- devcb = &downcast<printer_image_device &>(*device).set_online_callback(DEVCB_##_devcb);
+ downcast<printer_image_device &>(*device).set_online_callback(DEVCB_##_devcb);
/***************************************************************************
TYPE DEFINITIONS
diff --git a/src/devices/machine/1mb5.h b/src/devices/machine/1mb5.h
index 9c7c76eab3e..09c05d2fd8c 100644
--- a/src/devices/machine/1mb5.h
+++ b/src/devices/machine/1mb5.h
@@ -14,16 +14,16 @@
#pragma once
#define MCFG_1MB5_IRL_HANDLER(_devcb) \
- devcb = &downcast<hp_1mb5_device &>(*device).set_irl_handler(DEVCB_##_devcb);
+ downcast<hp_1mb5_device &>(*device).set_irl_handler(DEVCB_##_devcb);
#define MCFG_1MB5_HALT_HANDLER(_devcb) \
- devcb = &downcast<hp_1mb5_device &>(*device).set_halt_handler(DEVCB_##_devcb);
+ downcast<hp_1mb5_device &>(*device).set_halt_handler(DEVCB_##_devcb);
#define MCFG_1MB5_RESET_HANDLER(_devcb) \
- devcb = &downcast<hp_1mb5_device &>(*device).set_reset_handler(DEVCB_##_devcb);
+ downcast<hp_1mb5_device &>(*device).set_reset_handler(DEVCB_##_devcb);
#define MCFG_1MB5_INT_HANDLER(_devcb) \
- devcb = &downcast<hp_1mb5_device &>(*device).set_int_handler(DEVCB_##_devcb);
+ downcast<hp_1mb5_device &>(*device).set_int_handler(DEVCB_##_devcb);
class hp_1mb5_device : public device_t
{
diff --git a/src/devices/machine/40105.h b/src/devices/machine/40105.h
index 7b8b82819e0..77b58bbaf08 100644
--- a/src/devices/machine/40105.h
+++ b/src/devices/machine/40105.h
@@ -31,13 +31,13 @@
///*************************************************************************
#define MCFG_40105_DATA_IN_READY_CB(_dir) \
- devcb = &downcast<cmos_40105_device *>(device)->set_dir_callback(DEVCB_##_dir);
+ downcast<cmos_40105_device *>(device)->set_dir_callback(DEVCB_##_dir);
#define MCFG_40105_DATA_OUT_READY_CB(_dor) \
- devcb = &downcast<cmos_40105_device *>(device)->set_dor_callback(DEVCB_##_dor);
+ downcast<cmos_40105_device *>(device)->set_dor_callback(DEVCB_##_dor);
#define MCFG_40105_DATA_OUT_CB(_out) \
- devcb = &downcast<cmos_40105_device *>(device)->set_data_out_callback(DEVCB_##_out);
+ downcast<cmos_40105_device *>(device)->set_data_out_callback(DEVCB_##_out);
diff --git a/src/devices/machine/53c7xx.h b/src/devices/machine/53c7xx.h
index f2af9e616f8..8887a78a5ef 100644
--- a/src/devices/machine/53c7xx.h
+++ b/src/devices/machine/53c7xx.h
@@ -17,13 +17,13 @@
#define MCFG_NCR53C7XX_IRQ_HANDLER(_devcb) \
- devcb = &downcast<ncr53c7xx_device &>(*device).set_irq_handler(DEVCB_##_devcb);
+ downcast<ncr53c7xx_device &>(*device).set_irq_handler(DEVCB_##_devcb);
#define MCFG_NCR53C7XX_HOST_WRITE(_devcb) \
- devcb = &downcast<ncr53c7xx_device &>(*device).set_host_write(DEVCB_##_devcb);
+ downcast<ncr53c7xx_device &>(*device).set_host_write(DEVCB_##_devcb);
#define MCFG_NCR53C7XX_HOST_READ(_devcb) \
- devcb = &downcast<ncr53c7xx_device &>(*device).set_host_read(DEVCB_##_devcb);
+ downcast<ncr53c7xx_device &>(*device).set_host_read(DEVCB_##_devcb);
class ncr53c7xx_device : public nscsi_device, public device_execute_interface
{
diff --git a/src/devices/machine/64h156.h b/src/devices/machine/64h156.h
index 62e1ccabff9..24244e64517 100644
--- a/src/devices/machine/64h156.h
+++ b/src/devices/machine/64h156.h
@@ -71,13 +71,13 @@
//**************************************************************************
#define MCFG_64H156_ATN_CALLBACK(_write) \
- devcb = &downcast<c64h156_device &>(*device).set_atn_wr_callback(DEVCB_##_write);
+ downcast<c64h156_device &>(*device).set_atn_wr_callback(DEVCB_##_write);
#define MCFG_64H156_SYNC_CALLBACK(_write) \
- devcb = &downcast<c64h156_device &>(*device).set_sync_wr_callback(DEVCB_##_write);
+ downcast<c64h156_device &>(*device).set_sync_wr_callback(DEVCB_##_write);
#define MCFG_64H156_BYTE_CALLBACK(_write) \
- devcb = &downcast<c64h156_device &>(*device).set_byte_wr_callback(DEVCB_##_write);
+ downcast<c64h156_device &>(*device).set_byte_wr_callback(DEVCB_##_write);
diff --git a/src/devices/machine/6522via.cpp b/src/devices/machine/6522via.cpp
index 9c6b2936c8c..cd6588374c5 100644
--- a/src/devices/machine/6522via.cpp
+++ b/src/devices/machine/6522via.cpp
@@ -954,7 +954,7 @@ WRITE8_MEMBER( via6522_device::write )
}
}
-void via6522_device::write_pa(int line, int state)
+void via6522_device::set_pa_line(int line, int state)
{
if (state)
m_in_a |= (1 << line);
@@ -1020,7 +1020,7 @@ WRITE_LINE_MEMBER( via6522_device::write_ca2 )
}
}
-void via6522_device::write_pb(int line, int state)
+void via6522_device::set_pb_line(int line, int state)
{
if (state)
m_in_b |= (1 << line);
diff --git a/src/devices/machine/6522via.h b/src/devices/machine/6522via.h
index facb67b34a3..5b3823b2b5c 100644
--- a/src/devices/machine/6522via.h
+++ b/src/devices/machine/6522via.h
@@ -24,29 +24,29 @@
// TODO: REMOVE THESE
#define MCFG_VIA6522_READPA_HANDLER(_devcb) \
- devcb = &downcast<via6522_device &>(*device).set_readpa_handler(DEVCB_##_devcb);
+ downcast<via6522_device &>(*device).set_readpa_handler(DEVCB_##_devcb);
#define MCFG_VIA6522_READPB_HANDLER(_devcb) \
- devcb = &downcast<via6522_device &>(*device).set_readpb_handler(DEVCB_##_devcb);
+ downcast<via6522_device &>(*device).set_readpb_handler(DEVCB_##_devcb);
// TODO: CONVERT THESE TO WRITE LINE
#define MCFG_VIA6522_WRITEPA_HANDLER(_devcb) \
- devcb = &downcast<via6522_device &>(*device).set_writepa_handler(DEVCB_##_devcb);
+ downcast<via6522_device &>(*device).set_writepa_handler(DEVCB_##_devcb);
#define MCFG_VIA6522_WRITEPB_HANDLER(_devcb) \
- devcb = &downcast<via6522_device &>(*device).set_writepb_handler(DEVCB_##_devcb);
+ downcast<via6522_device &>(*device).set_writepb_handler(DEVCB_##_devcb);
#define MCFG_VIA6522_CA2_HANDLER(_devcb) \
- devcb = &downcast<via6522_device &>(*device).set_ca2_handler(DEVCB_##_devcb);
+ downcast<via6522_device &>(*device).set_ca2_handler(DEVCB_##_devcb);
#define MCFG_VIA6522_CB1_HANDLER(_devcb) \
- devcb = &downcast<via6522_device &>(*device).set_cb1_handler(DEVCB_##_devcb);
+ downcast<via6522_device &>(*device).set_cb1_handler(DEVCB_##_devcb);
#define MCFG_VIA6522_CB2_HANDLER(_devcb) \
- devcb = &downcast<via6522_device &>(*device).set_cb2_handler(DEVCB_##_devcb);
+ downcast<via6522_device &>(*device).set_cb2_handler(DEVCB_##_devcb);
#define MCFG_VIA6522_IRQ_HANDLER(_devcb) \
- devcb = &downcast<via6522_device &>(*device).set_irq_handler(DEVCB_##_devcb);
+ downcast<via6522_device &>(*device).set_irq_handler(DEVCB_##_devcb);
/***************************************************************************
@@ -85,41 +85,49 @@ public:
// TODO: REMOVE THESE
template <class Object> devcb_base &set_readpa_handler(Object &&cb) { return m_in_a_handler.set_callback(std::forward<Object>(cb)); }
template <class Object> devcb_base &set_readpb_handler(Object &&cb) { return m_in_b_handler.set_callback(std::forward<Object>(cb)); }
+ auto readpa_handler() { return m_in_a_handler.bind(); }
+ auto readpb_handler() { return m_in_b_handler.bind(); }
// TODO: CONVERT THESE TO WRITE LINE
template <class Object> devcb_base &set_writepa_handler(Object &&cb) { return m_out_a_handler.set_callback(std::forward<Object>(cb)); }
template <class Object> devcb_base &set_writepb_handler(Object &&cb) { return m_out_b_handler.set_callback(std::forward<Object>(cb)); }
+ auto writepa_handler() { return m_out_a_handler.bind(); }
+ auto writepb_handler() { return m_out_b_handler.bind(); }
template <class Object> devcb_base &set_ca2_handler(Object &&cb) { return m_ca2_handler.set_callback(std::forward<Object>(cb)); }
template <class Object> devcb_base &set_cb1_handler(Object &&cb) { return m_cb1_handler.set_callback(std::forward<Object>(cb)); }
template <class Object> devcb_base &set_cb2_handler(Object &&cb) { return m_cb2_handler.set_callback(std::forward<Object>(cb)); }
template <class Object> devcb_base &set_irq_handler(Object &&cb) { return m_irq_handler.set_callback(std::forward<Object>(cb)); }
+ auto ca2_handler() { return m_ca2_handler.bind(); }
+ auto cb1_handler() { return m_cb1_handler.bind(); }
+ auto cb2_handler() { return m_cb2_handler.bind(); }
+ auto irq_handler() { return m_irq_handler.bind(); }
virtual void map(address_map &map);
DECLARE_READ8_MEMBER( read );
DECLARE_WRITE8_MEMBER( write );
- DECLARE_WRITE_LINE_MEMBER( write_pa0 ) { write_pa(0, state); }
- DECLARE_WRITE_LINE_MEMBER( write_pa1 ) { write_pa(1, state); }
- DECLARE_WRITE_LINE_MEMBER( write_pa2 ) { write_pa(2, state); }
- DECLARE_WRITE_LINE_MEMBER( write_pa3 ) { write_pa(3, state); }
- DECLARE_WRITE_LINE_MEMBER( write_pa4 ) { write_pa(4, state); }
- DECLARE_WRITE_LINE_MEMBER( write_pa5 ) { write_pa(5, state); }
- DECLARE_WRITE_LINE_MEMBER( write_pa6 ) { write_pa(6, state); }
- DECLARE_WRITE_LINE_MEMBER( write_pa7 ) { write_pa(7, state); }
+ DECLARE_WRITE_LINE_MEMBER( write_pa0 ) { set_pa_line(0, state); }
+ DECLARE_WRITE_LINE_MEMBER( write_pa1 ) { set_pa_line(1, state); }
+ DECLARE_WRITE_LINE_MEMBER( write_pa2 ) { set_pa_line(2, state); }
+ DECLARE_WRITE_LINE_MEMBER( write_pa3 ) { set_pa_line(3, state); }
+ DECLARE_WRITE_LINE_MEMBER( write_pa4 ) { set_pa_line(4, state); }
+ DECLARE_WRITE_LINE_MEMBER( write_pa5 ) { set_pa_line(5, state); }
+ DECLARE_WRITE_LINE_MEMBER( write_pa6 ) { set_pa_line(6, state); }
+ DECLARE_WRITE_LINE_MEMBER( write_pa7 ) { set_pa_line(7, state); }
DECLARE_WRITE8_MEMBER( write_pa );
DECLARE_WRITE_LINE_MEMBER( write_ca1 );
DECLARE_WRITE_LINE_MEMBER( write_ca2 );
- DECLARE_WRITE_LINE_MEMBER( write_pb0 ) { write_pb(0, state); }
- DECLARE_WRITE_LINE_MEMBER( write_pb1 ) { write_pb(1, state); }
- DECLARE_WRITE_LINE_MEMBER( write_pb2 ) { write_pb(2, state); }
- DECLARE_WRITE_LINE_MEMBER( write_pb3 ) { write_pb(3, state); }
- DECLARE_WRITE_LINE_MEMBER( write_pb4 ) { write_pb(4, state); }
- DECLARE_WRITE_LINE_MEMBER( write_pb5 ) { write_pb(5, state); }
- DECLARE_WRITE_LINE_MEMBER( write_pb6 ) { write_pb(6, state); }
- DECLARE_WRITE_LINE_MEMBER( write_pb7 ) { write_pb(7, state); }
+ DECLARE_WRITE_LINE_MEMBER( write_pb0 ) { set_pb_line(0, state); }
+ DECLARE_WRITE_LINE_MEMBER( write_pb1 ) { set_pb_line(1, state); }
+ DECLARE_WRITE_LINE_MEMBER( write_pb2 ) { set_pb_line(2, state); }
+ DECLARE_WRITE_LINE_MEMBER( write_pb3 ) { set_pb_line(3, state); }
+ DECLARE_WRITE_LINE_MEMBER( write_pb4 ) { set_pb_line(4, state); }
+ DECLARE_WRITE_LINE_MEMBER( write_pb5 ) { set_pb_line(5, state); }
+ DECLARE_WRITE_LINE_MEMBER( write_pb6 ) { set_pb_line(6, state); }
+ DECLARE_WRITE_LINE_MEMBER( write_pb7 ) { set_pb_line(7, state); }
DECLARE_WRITE8_MEMBER( write_pb );
DECLARE_WRITE_LINE_MEMBER( write_cb1 );
DECLARE_WRITE_LINE_MEMBER( write_cb2 );
@@ -143,8 +151,8 @@ private:
void clear_int(int data);
void shift_out();
void shift_in();
- void write_pa(int line, int state);
- void write_pb(int line, int state);
+ void set_pa_line(int line, int state);
+ void set_pb_line(int line, int state);
uint8_t input_pa();
void output_pa();
diff --git a/src/devices/machine/6525tpi.h b/src/devices/machine/6525tpi.h
index a844de2ac0f..a17b0ebb01c 100644
--- a/src/devices/machine/6525tpi.h
+++ b/src/devices/machine/6525tpi.h
@@ -125,31 +125,31 @@ DECLARE_DEVICE_TYPE(TPI6525, tpi6525_device)
#define MCFG_TPI6525_OUT_IRQ_CB(_devcb) \
- devcb = &downcast<tpi6525_device &>(*device).set_out_irq_callback(DEVCB_##_devcb);
+ downcast<tpi6525_device &>(*device).set_out_irq_callback(DEVCB_##_devcb);
#define MCFG_TPI6525_IN_PA_CB(_devcb) \
- devcb = &downcast<tpi6525_device &>(*device).set_in_pa_callback(DEVCB_##_devcb);
+ downcast<tpi6525_device &>(*device).set_in_pa_callback(DEVCB_##_devcb);
#define MCFG_TPI6525_OUT_PA_CB(_devcb) \
- devcb = &downcast<tpi6525_device &>(*device).set_out_pa_callback(DEVCB_##_devcb);
+ downcast<tpi6525_device &>(*device).set_out_pa_callback(DEVCB_##_devcb);
#define MCFG_TPI6525_IN_PB_CB(_devcb) \
- devcb = &downcast<tpi6525_device &>(*device).set_in_pb_callback(DEVCB_##_devcb);
+ downcast<tpi6525_device &>(*device).set_in_pb_callback(DEVCB_##_devcb);
#define MCFG_TPI6525_OUT_PB_CB(_devcb) \
- devcb = &downcast<tpi6525_device &>(*device).set_out_pb_callback(DEVCB_##_devcb);
+ downcast<tpi6525_device &>(*device).set_out_pb_callback(DEVCB_##_devcb);
#define MCFG_TPI6525_IN_PC_CB(_devcb) \
- devcb = &downcast<tpi6525_device &>(*device).set_in_pc_callback(DEVCB_##_devcb);
+ downcast<tpi6525_device &>(*device).set_in_pc_callback(DEVCB_##_devcb);
#define MCFG_TPI6525_OUT_PC_CB(_devcb) \
- devcb = &downcast<tpi6525_device &>(*device).set_out_pc_callback(DEVCB_##_devcb);
+ downcast<tpi6525_device &>(*device).set_out_pc_callback(DEVCB_##_devcb);
#define MCFG_TPI6525_OUT_CA_CB(_devcb) \
- devcb = &downcast<tpi6525_device &>(*device).set_out_ca_callback(DEVCB_##_devcb);
+ downcast<tpi6525_device &>(*device).set_out_ca_callback(DEVCB_##_devcb);
#define MCFG_TPI6525_OUT_CB_CB(_devcb) \
- devcb = &downcast<tpi6525_device &>(*device).set_out_cb_callback(DEVCB_##_devcb);
+ downcast<tpi6525_device &>(*device).set_out_cb_callback(DEVCB_##_devcb);
#endif // MAME_MACHINE_6525TPI_H
diff --git a/src/devices/machine/6532riot.h b/src/devices/machine/6532riot.h
index f51aa8766f5..25dbbcb1acc 100644
--- a/src/devices/machine/6532riot.h
+++ b/src/devices/machine/6532riot.h
@@ -18,19 +18,19 @@
//**************************************************************************
#define MCFG_RIOT6532_IN_PA_CB(_devcb) \
- devcb = &downcast<riot6532_device &>(*device).set_in_pa_callback(DEVCB_##_devcb);
+ downcast<riot6532_device &>(*device).set_in_pa_callback(DEVCB_##_devcb);
#define MCFG_RIOT6532_OUT_PA_CB(_devcb) \
- devcb = &downcast<riot6532_device &>(*device).set_out_pa_callback(DEVCB_##_devcb);
+ downcast<riot6532_device &>(*device).set_out_pa_callback(DEVCB_##_devcb);
#define MCFG_RIOT6532_IN_PB_CB(_devcb) \
- devcb = &downcast<riot6532_device &>(*device).set_in_pb_callback(DEVCB_##_devcb);
+ downcast<riot6532_device &>(*device).set_in_pb_callback(DEVCB_##_devcb);
#define MCFG_RIOT6532_OUT_PB_CB(_devcb) \
- devcb = &downcast<riot6532_device &>(*device).set_out_pb_callback(DEVCB_##_devcb);
+ downcast<riot6532_device &>(*device).set_out_pb_callback(DEVCB_##_devcb);
#define MCFG_RIOT6532_IRQ_CB(_devcb) \
- devcb = &downcast<riot6532_device &>(*device).set_irq_callback(DEVCB_##_devcb);
+ downcast<riot6532_device &>(*device).set_irq_callback(DEVCB_##_devcb);
/***************************************************************************
diff --git a/src/devices/machine/68153bim.h b/src/devices/machine/68153bim.h
index 0a81715ca18..a0e223b6b2e 100644
--- a/src/devices/machine/68153bim.h
+++ b/src/devices/machine/68153bim.h
@@ -46,25 +46,25 @@
MCFG_DEVICE_ADD(_tag, EI68C153, _clock)
#define MCFG_BIM68153_OUT_INT_CB(_devcb) \
- devcb = &downcast<bim68153_device &>(*device).set_out_int_callback(DEVCB_##_devcb);
+ downcast<bim68153_device &>(*device).set_out_int_callback(DEVCB_##_devcb);
// These callback sets INTAL0 and INTAL1 but is probably not needed as the
// shorthand OUT_IACK0..OUT_IACK3 below embedd the channel information
#define MCFG_BIM68153_OUT_INTAL0_CB(_devcb) \
- devcb = &downcast<bim68153_device &>(*device).set_out_intal0_callback(DEVCB_##_devcb);
+ downcast<bim68153_device &>(*device).set_out_intal0_callback(DEVCB_##_devcb);
#define MCFG_BIM68153_OUT_INTAL1_CB(_devcb) \
- devcb = &downcast<bim68153_device &>(*device).set_out_intal1_callback(DEVCB_##_devcb);
+ downcast<bim68153_device &>(*device).set_out_intal1_callback(DEVCB_##_devcb);
// LOCAL IACK callbacks emulating the INTAL0 and INTAL1 outputs for INTAE requesting a vector from a sub device
#define MCFG_BIM68153_OUT_IACK0_CB(_devcb) \
- devcb = &downcast<bim68153_device &>(*device).set_out_iack0_callback(DEVCB_##_devcb);
+ downcast<bim68153_device &>(*device).set_out_iack0_callback(DEVCB_##_devcb);
#define MCFG_BIM68153_OUT_IACK1_CB(_devcb) \
- devcb = &downcast<bim68153_device &>(*device).set_out_iack1_callback(DEVCB_##_devcb);
+ downcast<bim68153_device &>(*device).set_out_iack1_callback(DEVCB_##_devcb);
#define MCFG_BIM68153_OUT_IACK2_CB(_devcb) \
- devcb = &downcast<bim68153_device &>(*device).set_out_iack2_callback(DEVCB_##_devcb);
+ downcast<bim68153_device &>(*device).set_out_iack2_callback(DEVCB_##_devcb);
#define MCFG_BIM68153_OUT_IACK3_CB(_devcb) \
- devcb = &downcast<bim68153_device &>(*device).set_out_iack3_callback(DEVCB_##_devcb);
+ downcast<bim68153_device &>(*device).set_out_iack3_callback(DEVCB_##_devcb);
//**************************************************************************
// TYPE DEFINITIONS
diff --git a/src/devices/machine/6821pia.h b/src/devices/machine/6821pia.h
index 236aae0f301..76fd7f96e2b 100644
--- a/src/devices/machine/6821pia.h
+++ b/src/devices/machine/6821pia.h
@@ -33,38 +33,38 @@
// TODO: REMOVE THESE
#define MCFG_PIA_READPA_HANDLER(_devcb) \
- devcb = &downcast<pia6821_device &>(*device).set_readpa_handler(DEVCB_##_devcb);
+ downcast<pia6821_device &>(*device).set_readpa_handler(DEVCB_##_devcb);
#define MCFG_PIA_READPB_HANDLER(_devcb) \
- devcb = &downcast<pia6821_device &>(*device).set_readpb_handler(DEVCB_##_devcb);
+ downcast<pia6821_device &>(*device).set_readpb_handler(DEVCB_##_devcb);
#define MCFG_PIA_READCA1_HANDLER(_devcb) \
- devcb = &downcast<pia6821_device &>(*device).set_readca1_handler(DEVCB_##_devcb);
+ downcast<pia6821_device &>(*device).set_readca1_handler(DEVCB_##_devcb);
#define MCFG_PIA_READCA2_HANDLER(_devcb) \
- devcb = &downcast<pia6821_device &>(*device).set_readca2_handler(DEVCB_##_devcb);
+ downcast<pia6821_device &>(*device).set_readca2_handler(DEVCB_##_devcb);
#define MCFG_PIA_READCB1_HANDLER(_devcb) \
- devcb = &downcast<pia6821_device &>(*device).set_readcb1_handler(DEVCB_##_devcb);
+ downcast<pia6821_device &>(*device).set_readcb1_handler(DEVCB_##_devcb);
// TODO: CONVERT THESE TO WRITE LINE
#define MCFG_PIA_WRITEPA_HANDLER(_devcb) \
- devcb = &downcast<pia6821_device &>(*device).set_writepa_handler(DEVCB_##_devcb);
+ downcast<pia6821_device &>(*device).set_writepa_handler(DEVCB_##_devcb);
#define MCFG_PIA_WRITEPB_HANDLER(_devcb) \
- devcb = &downcast<pia6821_device &>(*device).set_writepb_handler(DEVCB_##_devcb);
+ downcast<pia6821_device &>(*device).set_writepb_handler(DEVCB_##_devcb);
#define MCFG_PIA_CA2_HANDLER(_devcb) \
- devcb = &downcast<pia6821_device &>(*device).set_ca2_handler(DEVCB_##_devcb);
+ downcast<pia6821_device &>(*device).set_ca2_handler(DEVCB_##_devcb);
#define MCFG_PIA_CB2_HANDLER(_devcb) \
- devcb = &downcast<pia6821_device &>(*device).set_cb2_handler(DEVCB_##_devcb);
+ downcast<pia6821_device &>(*device).set_cb2_handler(DEVCB_##_devcb);
#define MCFG_PIA_IRQA_HANDLER(_devcb) \
- devcb = &downcast<pia6821_device &>(*device).set_irqa_handler(DEVCB_##_devcb);
+ downcast<pia6821_device &>(*device).set_irqa_handler(DEVCB_##_devcb);
#define MCFG_PIA_IRQB_HANDLER(_devcb) \
- devcb = &downcast<pia6821_device &>(*device).set_irqb_handler(DEVCB_##_devcb);
+ downcast<pia6821_device &>(*device).set_irqb_handler(DEVCB_##_devcb);
/***************************************************************************
@@ -86,15 +86,26 @@ public:
template<class Obj> devcb_base &set_readca1_handler(Obj &&object) { return m_in_ca1_handler.set_callback(std::forward<Obj>(object)); }
template<class Obj> devcb_base &set_readca2_handler(Obj &&object) { return m_in_ca2_handler.set_callback(std::forward<Obj>(object)); }
template<class Obj> devcb_base &set_readcb1_handler(Obj &&object) { return m_in_cb1_handler.set_callback(std::forward<Obj>(object)); }
+ auto readpa_handler() { return m_in_a_handler.bind(); }
+ auto readpb_handler() { return m_in_b_handler.bind(); }
+ auto readca1_handler() { return m_in_ca1_handler.bind(); }
+ auto readca2_handler() { return m_in_ca2_handler.bind(); }
+ auto readcb1_handler() { return m_in_cb1_handler.bind(); }
// TODO: CONVERT THESE TO WRITE LINE
template<class Obj> devcb_base &set_writepa_handler(Obj &&object) { return m_out_a_handler.set_callback(std::forward<Obj>(object)); }
template<class Obj> devcb_base &set_writepb_handler(Obj &&object) { return m_out_b_handler.set_callback(std::forward<Obj>(object)); }
+ auto writepa_handler() { return m_out_a_handler.bind(); }
+ auto writepb_handler() { return m_out_b_handler.bind(); }
template<class Obj> devcb_base &set_ca2_handler(Obj &&object) { return m_ca2_handler.set_callback(std::forward<Obj>(object)); }
template<class Obj> devcb_base &set_cb2_handler(Obj &&object) { return m_cb2_handler.set_callback(std::forward<Obj>(object)); }
template<class Obj> devcb_base &set_irqa_handler(Obj &&object) { return m_irqa_handler.set_callback(std::forward<Obj>(object)); }
template<class Obj> devcb_base &set_irqb_handler(Obj &&object) { return m_irqb_handler.set_callback(std::forward<Obj>(object)); }
+ auto ca2_handler() { return m_ca2_handler.bind(); }
+ auto cb2_handler() { return m_cb2_handler.bind(); }
+ auto irqa_handler() { return m_irqa_handler.bind(); }
+ auto irqb_handler() { return m_irqb_handler.bind(); }
uint8_t reg_r(uint8_t offset);
void reg_w(uint8_t offset, uint8_t data);
diff --git a/src/devices/machine/68230pit.h b/src/devices/machine/68230pit.h
index c155c1d6b29..eaf7356d202 100644
--- a/src/devices/machine/68230pit.h
+++ b/src/devices/machine/68230pit.h
@@ -43,40 +43,40 @@
//**************************************************************************
#define MCFG_PIT68230_PA_INPUT_CB(_devcb) \
- devcb = &downcast<pit68230_device &>(*device).set_pa_in_callback(DEVCB_##_devcb);
+ downcast<pit68230_device &>(*device).set_pa_in_callback(DEVCB_##_devcb);
#define MCFG_PIT68230_PA_OUTPUT_CB(_devcb) \
- devcb = &downcast<pit68230_device &>(*device).set_pa_out_callback(DEVCB_##_devcb);
+ downcast<pit68230_device &>(*device).set_pa_out_callback(DEVCB_##_devcb);
#define MCFG_PIT68230_PB_INPUT_CB(_devcb) \
- devcb = &downcast<pit68230_device &>(*device).set_pb_in_callback(DEVCB_##_devcb);
+ downcast<pit68230_device &>(*device).set_pb_in_callback(DEVCB_##_devcb);
#define MCFG_PIT68230_PB_OUTPUT_CB(_devcb) \
- devcb = &downcast<pit68230_device &>(*device).set_pb_out_callback(DEVCB_##_devcb);
+ downcast<pit68230_device &>(*device).set_pb_out_callback(DEVCB_##_devcb);
#define MCFG_PIT68230_PC_INPUT_CB(_devcb) \
- devcb = &downcast<pit68230_device &>(*device).set_pc_in_callback(DEVCB_##_devcb);
+ downcast<pit68230_device &>(*device).set_pc_in_callback(DEVCB_##_devcb);
#define MCFG_PIT68230_PC_OUTPUT_CB(_devcb) \
- devcb = &downcast<pit68230_device &>(*device).set_pc_out_callback(DEVCB_##_devcb);
+ downcast<pit68230_device &>(*device).set_pc_out_callback(DEVCB_##_devcb);
#define MCFG_PIT68230_H1_CB(_devcb) \
- devcb = &downcast<pit68230_device &>(*device).set_h1_out_callback(DEVCB_##_devcb);
+ downcast<pit68230_device &>(*device).set_h1_out_callback(DEVCB_##_devcb);
#define MCFG_PIT68230_H2_CB(_devcb) \
- devcb = &downcast<pit68230_device &>(*device).set_h2_out_callback(DEVCB_##_devcb);
+ downcast<pit68230_device &>(*device).set_h2_out_callback(DEVCB_##_devcb);
#define MCFG_PIT68230_H3_CB(_devcb) \
- devcb = &downcast<pit68230_device &>(*device).set_h3_out_callback(DEVCB_##_devcb);
+ downcast<pit68230_device &>(*device).set_h3_out_callback(DEVCB_##_devcb);
#define MCFG_PIT68230_H4_CB(_devcb) \
- devcb = &downcast<pit68230_device &>(*device).set_h4_out_callback(DEVCB_##_devcb);
+ downcast<pit68230_device &>(*device).set_h4_out_callback(DEVCB_##_devcb);
#define MCFG_PIT68230_TIMER_IRQ_CB(_devcb) \
- devcb = &downcast<pit68230_device &>(*device).set_tirq_out_callback(DEVCB_##_devcb);
+ downcast<pit68230_device &>(*device).set_tirq_out_callback(DEVCB_##_devcb);
#define MCFG_PIT68230_PORT_IRQ_CB(_devcb) \
- devcb = &downcast<pit68230_device &>(*device).set_pirq_out_callback(DEVCB_##_devcb);
+ downcast<pit68230_device &>(*device).set_pirq_out_callback(DEVCB_##_devcb);
/*-----------------------------------------------------------------------
* Registers RS1-RS5 R/W Description
diff --git a/src/devices/machine/68307.h b/src/devices/machine/68307.h
index c159dfd796b..cce3630aede 100644
--- a/src/devices/machine/68307.h
+++ b/src/devices/machine/68307.h
@@ -12,17 +12,17 @@
/* trampolines so we can specify the 68681 serial configuration when adding the CPU */
#define MCFG_MC68307_SERIAL_A_TX_CALLBACK(_cb) \
- devcb = &downcast<m68307_cpu_device &>(*device).set_a_tx_cb(DEVCB_##_cb);
+ downcast<m68307_cpu_device &>(*device).set_a_tx_cb(DEVCB_##_cb);
#define MCFG_MC68307_SERIAL_B_TX_CALLBACK(_cb) \
- devcb = &downcast<m68307_cpu_device &>(*device).set_b_tx_cb(DEVCB_##_cb);
+ downcast<m68307_cpu_device &>(*device).set_b_tx_cb(DEVCB_##_cb);
// deprecated: use ipX_w() instead
#define MCFG_MC68307_SERIAL_INPORT_CALLBACK(_cb) \
- devcb = &downcast<m68307_cpu_device &>(*device).set_inport_cb(DEVCB_##_cb);
+ downcast<m68307_cpu_device &>(*device).set_inport_cb(DEVCB_##_cb);
#define MCFG_MC68307_SERIAL_OUTPORT_CALLBACK(_cb) \
- devcb = &downcast<m68307_cpu_device &>(*device).set_outport_cb(DEVCB_##_cb);
+ downcast<m68307_cpu_device &>(*device).set_outport_cb(DEVCB_##_cb);
class m68307_cpu_device : public m68000_device
diff --git a/src/devices/machine/68340.h b/src/devices/machine/68340.h
index fcec19e453d..29febd8ef75 100644
--- a/src/devices/machine/68340.h
+++ b/src/devices/machine/68340.h
@@ -17,37 +17,37 @@
// INTERFACE CONFIGURATION MACROS
//**************************************************************************
#define MCFG_MC68340_PA_INPUT_CB(_devcb) \
- devcb = &downcast<m68340_cpu_device &>(*device).set_pa_in_callback(DEVCB_##_devcb);
+ downcast<m68340_cpu_device &>(*device).set_pa_in_callback(DEVCB_##_devcb);
#define MCFG_MC68340_PA_OUTPUT_CB(_devcb) \
- devcb = &downcast<m68340_cpu_device &>(*device).set_pa_out_callback(DEVCB_##_devcb);
+ downcast<m68340_cpu_device &>(*device).set_pa_out_callback(DEVCB_##_devcb);
#define MCFG_MC68340_PB_INPUT_CB(_devcb) \
- devcb = &downcast<m68340_cpu_device &>(*device).set_pb_in_callback(DEVCB_##_devcb);
+ downcast<m68340_cpu_device &>(*device).set_pb_in_callback(DEVCB_##_devcb);
#define MCFG_MC68340_PB_OUTPUT_CB(_devcb) \
- devcb = &downcast<m68340_cpu_device &>(*device).set_pb_out_callback(DEVCB_##_devcb);
+ downcast<m68340_cpu_device &>(*device).set_pb_out_callback(DEVCB_##_devcb);
#define MCFG_MC68340_ADD_CRYSTAL(_crystal) \
downcast<m68340_cpu_device &>(*device).set_crystal(_crystal);
#define MCFG_MC68340_TOUT1_OUTPUT_CB(_devcb) \
- devcb = &downcast<m68340_cpu_device &>(*device).set_tout1_out_callback(DEVCB_##_devcb);
+ downcast<m68340_cpu_device &>(*device).set_tout1_out_callback(DEVCB_##_devcb);
#define MCFG_MC68340_TIN1_INPUT_CB(_devcb) \
- devcb = &downcast<m68340_cpu_device &>(*device).set_tin1_out_callback(DEVCB_##_devcb);
+ downcast<m68340_cpu_device &>(*device).set_tin1_out_callback(DEVCB_##_devcb);
#define MCFG_MC68340_TGATE1_INPUT_CB(_devcb) \
- devcb = &downcast<m68340_cpu_device &>(*device).set_tgate1_out_callback(DEVCB_##_devcb);
+ downcast<m68340_cpu_device &>(*device).set_tgate1_out_callback(DEVCB_##_devcb);
#define MCFG_MC68340_TOUT2_OUTPUT_CB(_devcb) \
- devcb = &downcast<m68340_cpu_device &>(*device).set_tout2_out_callback(DEVCB_##_devcb);
+ downcast<m68340_cpu_device &>(*device).set_tout2_out_callback(DEVCB_##_devcb);
#define MCFG_MC68340_TIN2_INPUT_CB(_devcb) \
- devcb = &downcast<m68340_cpu_device &>(*device).set_tin2_out_callback(DEVCB_##_devcb);
+ downcast<m68340_cpu_device &>(*device).set_tin2_out_callback(DEVCB_##_devcb);
#define MCFG_MC68340_TGATE2_INPUT_CB(_devcb) \
- devcb = &downcast<m68340_cpu_device &>(*device).set_tgate2_out_callback(DEVCB_##_devcb);
+ downcast<m68340_cpu_device &>(*device).set_tgate2_out_callback(DEVCB_##_devcb);
class m68340_cpu_device : public fscpu32_device
{
diff --git a/src/devices/machine/6840ptm.h b/src/devices/machine/6840ptm.h
index 0fd9f3b1196..dbae5eeeb23 100644
--- a/src/devices/machine/6840ptm.h
+++ b/src/devices/machine/6840ptm.h
@@ -23,16 +23,16 @@
downcast<ptm6840_device &>(*device).set_external_clocks(_clk0, _clk1, _clk2);
#define MCFG_PTM6840_O1_CB(_devcb) \
- devcb = &downcast<ptm6840_device &>(*device).set_out_callback(0, DEVCB_##_devcb);
+ downcast<ptm6840_device &>(*device).set_out_callback(0, DEVCB_##_devcb);
#define MCFG_PTM6840_O2_CB(_devcb) \
- devcb = &downcast<ptm6840_device &>(*device).set_out_callback(1, DEVCB_##_devcb);
+ downcast<ptm6840_device &>(*device).set_out_callback(1, DEVCB_##_devcb);
#define MCFG_PTM6840_O3_CB(_devcb) \
- devcb = &downcast<ptm6840_device &>(*device).set_out_callback(2, DEVCB_##_devcb);
+ downcast<ptm6840_device &>(*device).set_out_callback(2, DEVCB_##_devcb);
#define MCFG_PTM6840_IRQ_CB(_devcb) \
- devcb = &downcast<ptm6840_device &>(*device).set_irq_callback(DEVCB_##_devcb);
+ downcast<ptm6840_device &>(*device).set_irq_callback(DEVCB_##_devcb);
//**************************************************************************
// TYPE DEFINITIONS
@@ -50,6 +50,10 @@ public:
void set_external_clocks(const XTAL &clock0, const XTAL &clock1, const XTAL &clock2) { set_external_clocks(clock0.dvalue(), clock1.dvalue(), clock2.dvalue()); }
template <class Object> devcb_base &set_out_callback(int index, Object &&cb) { return m_out_cb[index].set_callback(std::forward<Object>(cb)); }
template <class Object> devcb_base &set_irq_callback(Object &&cb) { return m_irq_cb.set_callback(std::forward<Object>(cb)); }
+ auto o1_callback() { return m_out_cb[0].bind(); }
+ auto o2_callback() { return m_out_cb[1].bind(); }
+ auto o3_callback() { return m_out_cb[2].bind(); }
+ auto irq_callback() { return m_irq_cb.bind(); }
int status(int clock) const { return m_enabled[clock]; } // get whether timer is enabled
int irq_state() const { return m_irq; } // get IRQ state
diff --git a/src/devices/machine/6850acia.h b/src/devices/machine/6850acia.h
index 1dc975911d8..4d4086fd4af 100644
--- a/src/devices/machine/6850acia.h
+++ b/src/devices/machine/6850acia.h
@@ -15,13 +15,13 @@
#define MCFG_ACIA6850_TXD_HANDLER(_devcb) \
- devcb = &downcast<acia6850_device &>(*device).set_txd_handler(DEVCB_##_devcb);
+ downcast<acia6850_device &>(*device).set_txd_handler(DEVCB_##_devcb);
#define MCFG_ACIA6850_RTS_HANDLER(_devcb) \
- devcb = &downcast<acia6850_device &>(*device).set_rts_handler(DEVCB_##_devcb);
+ downcast<acia6850_device &>(*device).set_rts_handler(DEVCB_##_devcb);
#define MCFG_ACIA6850_IRQ_HANDLER(_devcb) \
- devcb = &downcast<acia6850_device &>(*device).set_irq_handler(DEVCB_##_devcb);
+ downcast<acia6850_device &>(*device).set_irq_handler(DEVCB_##_devcb);
class acia6850_device : public device_t
{
@@ -33,6 +33,9 @@ public:
template <class Object> devcb_base &set_txd_handler(Object &&cb) { return m_txd_handler.set_callback(std::forward<Object>(cb)); }
template <class Object> devcb_base &set_rts_handler(Object &&cb) { return m_rts_handler.set_callback(std::forward<Object>(cb)); }
template <class Object> devcb_base &set_irq_handler(Object &&cb) { return m_irq_handler.set_callback(std::forward<Object>(cb)); }
+ auto txd_handler() { return m_txd_handler.bind(); }
+ auto rts_handler() { return m_rts_handler.bind(); }
+ auto irq_handler() { return m_irq_handler.bind(); }
DECLARE_WRITE8_MEMBER( control_w );
DECLARE_READ8_MEMBER( status_r );
diff --git a/src/devices/machine/68561mpcc.h b/src/devices/machine/68561mpcc.h
index ad4f4f2dda4..24b3c3c7da7 100644
--- a/src/devices/machine/68561mpcc.h
+++ b/src/devices/machine/68561mpcc.h
@@ -68,22 +68,22 @@
/* Callbacks to be called by us for signals driven by the MPCC */
#define MCFG_MPCC_OUT_TXD_CB(_devcb) \
- devcb = &downcast<mpcc_device &>(*device).set_out_txd_callback(DEVCB_##_devcb);
+ downcast<mpcc_device &>(*device).set_out_txd_callback(DEVCB_##_devcb);
#define MCFG_MPCC_OUT_DTR_CB(_devcb) \
- devcb = &downcast<mpcc_device &>(*device).set_out_dtr_callback(DEVCB_##_devcb);
+ downcast<mpcc_device &>(*device).set_out_dtr_callback(DEVCB_##_devcb);
#define MCFG_MPCC_OUT_RTS_CB(_devcb) \
- devcb = &downcast<mpcc_device &>(*device).set_out_rts_callback(DEVCB_##_devcb);
+ downcast<mpcc_device &>(*device).set_out_rts_callback(DEVCB_##_devcb);
#define MCFG_MPCC_OUT_TRXC_CB(_devcb) \
- devcb = &downcast<mpcc_device &>(*device).set_out_trxc_callback(DEVCB_##_devcb);
+ downcast<mpcc_device &>(*device).set_out_trxc_callback(DEVCB_##_devcb);
#define MCFG_MPCC_OUT_RTXC_CB(_devcb) \
- devcb = &downcast<mpcc_device &>(*device).set_out_rtxc_callback(DEVCB_##_devcb);
+ downcast<mpcc_device &>(*device).set_out_rtxc_callback(DEVCB_##_devcb);
#define MCFG_MPCC_OUT_INT_CB(_devcb) \
- devcb = &downcast<mpcc_device &>(*device).set_out_int_callback(DEVCB_##_devcb);
+ downcast<mpcc_device &>(*device).set_out_int_callback(DEVCB_##_devcb);
diff --git a/src/devices/machine/7200fifo.h b/src/devices/machine/7200fifo.h
index 1b89b53406b..642932691c0 100644
--- a/src/devices/machine/7200fifo.h
+++ b/src/devices/machine/7200fifo.h
@@ -61,13 +61,13 @@ The following chips are functionally equivalent and pin-compatible.
downcast<fifo7200_device &>(*device).set_ram_size(_ramsize);
#define MCFG_FIFO7200_EF_HANDLER(_devcb) \
- devcb = &downcast<fifo7200_device &>(*device).set_ef_handler(DEVCB_##_devcb);
+ downcast<fifo7200_device &>(*device).set_ef_handler(DEVCB_##_devcb);
#define MCFG_FIFO7200_FF_HANDLER(_devcb) \
- devcb = &downcast<fifo7200_device &>(*device).set_ff_handler(DEVCB_##_devcb);
+ downcast<fifo7200_device &>(*device).set_ff_handler(DEVCB_##_devcb);
#define MCFG_FIFO7200_HF_HANDLER(_devcb) \
- devcb = &downcast<fifo7200_device &>(*device).set_hf_handler(DEVCB_##_devcb);
+ downcast<fifo7200_device &>(*device).set_hf_handler(DEVCB_##_devcb);
diff --git a/src/devices/machine/7400.h b/src/devices/machine/7400.h
index 0f7d7cb67a6..a96c02bcf87 100644
--- a/src/devices/machine/7400.h
+++ b/src/devices/machine/7400.h
@@ -35,16 +35,16 @@
#define MCFG_7400_Y1_CB(_devcb) \
- devcb = &downcast<ttl7400_device &>(*device).set_y1_cb(DEVCB_##_devcb);
+ downcast<ttl7400_device &>(*device).set_y1_cb(DEVCB_##_devcb);
#define MCFG_7400_Y2_CB(_devcb) \
- devcb = &downcast<ttl7400_device &>(*device).set_y2_cb(DEVCB_##_devcb);
+ downcast<ttl7400_device &>(*device).set_y2_cb(DEVCB_##_devcb);
#define MCFG_7400_Y3_CB(_devcb) \
- devcb = &downcast<ttl7400_device &>(*device).set_y3_cb(DEVCB_##_devcb);
+ downcast<ttl7400_device &>(*device).set_y3_cb(DEVCB_##_devcb);
#define MCFG_7400_Y4_CB(_devcb) \
- devcb = &downcast<ttl7400_device &>(*device).set_y4_cb(DEVCB_##_devcb);
+ downcast<ttl7400_device &>(*device).set_y4_cb(DEVCB_##_devcb);
class ttl7400_device : public device_t
diff --git a/src/devices/machine/7404.h b/src/devices/machine/7404.h
index 31900c1ac9d..4d767fbfed4 100644
--- a/src/devices/machine/7404.h
+++ b/src/devices/machine/7404.h
@@ -62,22 +62,22 @@
#define MCFG_7404_Y1_CB(_devcb) \
- devcb = &downcast<ttl7404_device &>(*device).set_y1_cb(DEVCB_##_devcb);
+ downcast<ttl7404_device &>(*device).set_y1_cb(DEVCB_##_devcb);
#define MCFG_7404_Y2_CB(_devcb) \
- devcb = &downcast<ttl7404_device &>(*device).set_y2_cb(DEVCB_##_devcb);
+ downcast<ttl7404_device &>(*device).set_y2_cb(DEVCB_##_devcb);
#define MCFG_7404_Y3_CB(_devcb) \
- devcb = &downcast<ttl7404_device &>(*device).set_y3_cb(DEVCB_##_devcb);
+ downcast<ttl7404_device &>(*device).set_y3_cb(DEVCB_##_devcb);
#define MCFG_7404_Y4_CB(_devcb) \
- devcb = &downcast<ttl7404_device &>(*device).set_y4_cb(DEVCB_##_devcb);
+ downcast<ttl7404_device &>(*device).set_y4_cb(DEVCB_##_devcb);
#define MCFG_7404_Y5_CB(_devcb) \
- devcb = &downcast<ttl7404_device &>(*device).set_y5_cb(DEVCB_##_devcb);
+ downcast<ttl7404_device &>(*device).set_y5_cb(DEVCB_##_devcb);
#define MCFG_7404_Y6_CB(_devcb) \
- devcb = &downcast<ttl7404_device &>(*device).set_y6_cb(DEVCB_##_devcb);
+ downcast<ttl7404_device &>(*device).set_y6_cb(DEVCB_##_devcb);
class ttl7404_device : public device_t
{
diff --git a/src/devices/machine/74123.h b/src/devices/machine/74123.h
index 075e56c8206..b5f0fc7e15b 100644
--- a/src/devices/machine/74123.h
+++ b/src/devices/machine/74123.h
@@ -76,7 +76,7 @@
downcast<ttl74123_device &>(*device).set_clear_pin_value(_value);
#define MCFG_TTL74123_OUTPUT_CHANGED_CB(_devcb) \
- devcb = &downcast<ttl74123_device &>(*device).set_output_changed_callback(DEVCB_##_devcb);
+ downcast<ttl74123_device &>(*device).set_output_changed_callback(DEVCB_##_devcb);
/* constants for the different ways the cap/res can be connected.
This determines the formula for calculating the pulse width */
diff --git a/src/devices/machine/74145.h b/src/devices/machine/74145.h
index 553d4ee86db..c396c1c1fbf 100644
--- a/src/devices/machine/74145.h
+++ b/src/devices/machine/74145.h
@@ -18,34 +18,34 @@
// INTERFACE CONFIGURATION MACROS
//**************************************************************************
#define MCFG_TTL74145_OUTPUT_LINE_0_CB(_devcb) \
- devcb = &downcast<ttl74145_device &>(*device).set_output_line_0_callback(DEVCB_##_devcb);
+ downcast<ttl74145_device &>(*device).set_output_line_0_callback(DEVCB_##_devcb);
#define MCFG_TTL74145_OUTPUT_LINE_1_CB(_devcb) \
- devcb = &downcast<ttl74145_device &>(*device).set_output_line_1_callback(DEVCB_##_devcb);
+ downcast<ttl74145_device &>(*device).set_output_line_1_callback(DEVCB_##_devcb);
#define MCFG_TTL74145_OUTPUT_LINE_2_CB(_devcb) \
- devcb = &downcast<ttl74145_device &>(*device).set_output_line_2_callback(DEVCB_##_devcb);
+ downcast<ttl74145_device &>(*device).set_output_line_2_callback(DEVCB_##_devcb);
#define MCFG_TTL74145_OUTPUT_LINE_3_CB(_devcb) \
- devcb = &downcast<ttl74145_device &>(*device).set_output_line_3_callback(DEVCB_##_devcb);
+ downcast<ttl74145_device &>(*device).set_output_line_3_callback(DEVCB_##_devcb);
#define MCFG_TTL74145_OUTPUT_LINE_4_CB(_devcb) \
- devcb = &downcast<ttl74145_device &>(*device).set_output_line_4_callback(DEVCB_##_devcb);
+ downcast<ttl74145_device &>(*device).set_output_line_4_callback(DEVCB_##_devcb);
#define MCFG_TTL74145_OUTPUT_LINE_5_CB(_devcb) \
- devcb = &downcast<ttl74145_device &>(*device).set_output_line_5_callback(DEVCB_##_devcb);
+ downcast<ttl74145_device &>(*device).set_output_line_5_callback(DEVCB_##_devcb);
#define MCFG_TTL74145_OUTPUT_LINE_6_CB(_devcb) \
- devcb = &downcast<ttl74145_device &>(*device).set_output_line_6_callback(DEVCB_##_devcb);
+ downcast<ttl74145_device &>(*device).set_output_line_6_callback(DEVCB_##_devcb);
#define MCFG_TTL74145_OUTPUT_LINE_7_CB(_devcb) \
- devcb = &downcast<ttl74145_device &>(*device).set_output_line_7_callback(DEVCB_##_devcb);
+ downcast<ttl74145_device &>(*device).set_output_line_7_callback(DEVCB_##_devcb);
#define MCFG_TTL74145_OUTPUT_LINE_8_CB(_devcb) \
- devcb = &downcast<ttl74145_device &>(*device).set_output_line_8_callback(DEVCB_##_devcb);
+ downcast<ttl74145_device &>(*device).set_output_line_8_callback(DEVCB_##_devcb);
#define MCFG_TTL74145_OUTPUT_LINE_9_CB(_devcb) \
- devcb = &downcast<ttl74145_device &>(*device).set_output_line_9_callback(DEVCB_##_devcb);
+ downcast<ttl74145_device &>(*device).set_output_line_9_callback(DEVCB_##_devcb);
//**************************************************************************
// TYPE DEFINITIONS
diff --git a/src/devices/machine/74153.h b/src/devices/machine/74153.h
index 4ce38d32a9e..fc234463e30 100644
--- a/src/devices/machine/74153.h
+++ b/src/devices/machine/74153.h
@@ -30,10 +30,10 @@
//**************************************************************************
#define MCFG_TTL153_ZA_CB(_devcb) \
- devcb = &downcast<ttl153_device &>(*device).set_za_callback(DEVCB_##_devcb);
+ downcast<ttl153_device &>(*device).set_za_callback(DEVCB_##_devcb);
#define MCFG_TTL153_ZB_CB(_devcb) \
- devcb = &downcast<ttl153_device &>(*device).set_zb_callback(DEVCB_##_devcb);
+ downcast<ttl153_device &>(*device).set_zb_callback(DEVCB_##_devcb);
//**************************************************************************
diff --git a/src/devices/machine/74157.h b/src/devices/machine/74157.h
index 196194c8ddb..96a23d64235 100644
--- a/src/devices/machine/74157.h
+++ b/src/devices/machine/74157.h
@@ -30,13 +30,13 @@
//**************************************************************************
#define MCFG_74157_A_IN_CB(_devcb) \
- devcb = &downcast<ls157_device &>(*device).set_a_in_callback(DEVCB_##_devcb);
+ downcast<ls157_device &>(*device).set_a_in_callback(DEVCB_##_devcb);
#define MCFG_74157_B_IN_CB(_devcb) \
- devcb = &downcast<ls157_device &>(*device).set_b_in_callback(DEVCB_##_devcb);
+ downcast<ls157_device &>(*device).set_b_in_callback(DEVCB_##_devcb);
#define MCFG_74157_OUT_CB(_devcb) \
- devcb = &downcast<ls157_device &>(*device).set_out_callback(DEVCB_##_devcb);
+ downcast<ls157_device &>(*device).set_out_callback(DEVCB_##_devcb);
//**************************************************************************
@@ -49,12 +49,15 @@ class ls157_device : public device_t
{
public:
// construction/destruction
- ls157_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock);
+ ls157_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock = 0);
// static configuration
template <class Object> devcb_base &set_a_in_callback(Object &&cb) { return m_a_in_cb.set_callback(std::forward<Object>(cb)); }
template <class Object> devcb_base &set_b_in_callback(Object &&cb) { return m_b_in_cb.set_callback(std::forward<Object>(cb)); }
template <class Object> devcb_base &set_out_callback(Object &&cb) { return m_out_cb.set_callback(std::forward<Object>(cb)); }
+ auto a_in_callback() { return m_a_in_cb.bind(); }
+ auto b_in_callback() { return m_b_in_cb.bind(); }
+ auto out_callback() { return m_out_cb.bind(); }
// data writes
DECLARE_WRITE8_MEMBER(a_w) { write_a(data); }
diff --git a/src/devices/machine/74161.h b/src/devices/machine/74161.h
index 8428411c05b..932428bdb78 100644
--- a/src/devices/machine/74161.h
+++ b/src/devices/machine/74161.h
@@ -59,22 +59,22 @@
#define MCFG_7416x_QA_CB(_devcb) \
- devcb = &downcast<ttl7416x_device &>(*device).set_qa_cb(DEVCB_##_devcb);
+ downcast<ttl7416x_device &>(*device).set_qa_cb(DEVCB_##_devcb);
#define MCFG_7416x_QB_CB(_devcb) \
- devcb = &downcast<ttl7416x_device &>(*device).set_qb_cb(DEVCB_##_devcb);
+ downcast<ttl7416x_device &>(*device).set_qb_cb(DEVCB_##_devcb);
#define MCFG_7416x_QC_CB(_devcb) \
- devcb = &downcast<ttl7416x_device &>(*device).set_qc_cb(DEVCB_##_devcb);
+ downcast<ttl7416x_device &>(*device).set_qc_cb(DEVCB_##_devcb);
#define MCFG_7416x_QD_CB(_devcb) \
- devcb = &downcast<ttl7416x_device &>(*device).set_qd_cb(DEVCB_##_devcb);
+ downcast<ttl7416x_device &>(*device).set_qd_cb(DEVCB_##_devcb);
#define MCFG_7416x_OUTPUT_CB(_devcb) \
- devcb = &downcast<ttl7416x_device &>(*device).set_output_cb(DEVCB_##_devcb);
+ downcast<ttl7416x_device &>(*device).set_output_cb(DEVCB_##_devcb);
#define MCFG_7416x_TC_CB(_devcb) \
- devcb = &downcast<ttl7416x_device &>(*device).set_tc_cb(DEVCB_##_devcb);
+ downcast<ttl7416x_device &>(*device).set_tc_cb(DEVCB_##_devcb);
class ttl7416x_device : public device_t
{
diff --git a/src/devices/machine/74165.h b/src/devices/machine/74165.h
index 8b608760572..1db3f2809fe 100644
--- a/src/devices/machine/74165.h
+++ b/src/devices/machine/74165.h
@@ -31,10 +31,10 @@
//**************************************************************************
#define MCFG_TTL165_DATA_CB(_devcb) \
- devcb = &downcast<ttl165_device &>(*device).set_data_callback(DEVCB_##_devcb);
+ downcast<ttl165_device &>(*device).set_data_callback(DEVCB_##_devcb);
#define MCFG_TTL165_QH_CB(_devcb) \
- devcb = &downcast<ttl165_device &>(*device).set_qh_callback(DEVCB_##_devcb);
+ downcast<ttl165_device &>(*device).set_qh_callback(DEVCB_##_devcb);
//**************************************************************************
diff --git a/src/devices/machine/74166.h b/src/devices/machine/74166.h
index 77497b1be5e..a256f904bf4 100644
--- a/src/devices/machine/74166.h
+++ b/src/devices/machine/74166.h
@@ -31,10 +31,10 @@
//**************************************************************************
#define MCFG_TTL166_DATA_CB(_devcb) \
- devcb = &downcast<ttl166_device &>(*device).set_data_callback(DEVCB_##_devcb);
+ downcast<ttl166_device &>(*device).set_data_callback(DEVCB_##_devcb);
#define MCFG_TTL166_QH_CB(_devcb) \
- devcb = &downcast<ttl166_device &>(*device).set_qh_callback(DEVCB_##_devcb);
+ downcast<ttl166_device &>(*device).set_qh_callback(DEVCB_##_devcb);
//**************************************************************************
diff --git a/src/devices/machine/74175.h b/src/devices/machine/74175.h
index e8f17a5ecbb..f4f1912f085 100644
--- a/src/devices/machine/74175.h
+++ b/src/devices/machine/74175.h
@@ -49,46 +49,46 @@
#define MCFG_74174_Q1_CB(_devcb) \
- devcb = &downcast<ttl741745_device &>(*device).set_q1_cb(DEVCB_##_devcb);
+ downcast<ttl741745_device &>(*device).set_q1_cb(DEVCB_##_devcb);
#define MCFG_74174_Q2_CB(_devcb) \
- devcb = &downcast<ttl741745_device &>(*device).set_q2_cb(DEVCB_##_devcb);
+ downcast<ttl741745_device &>(*device).set_q2_cb(DEVCB_##_devcb);
#define MCFG_74174_Q3_CB(_devcb) \
- devcb = &downcast<ttl741745_device &>(*device).set_q3_cb(DEVCB_##_devcb);
+ downcast<ttl741745_device &>(*device).set_q3_cb(DEVCB_##_devcb);
#define MCFG_74174_Q4_CB(_devcb) \
- devcb = &downcast<ttl741745_device &>(*device).set_q4_cb(DEVCB_##_devcb);
+ downcast<ttl741745_device &>(*device).set_q4_cb(DEVCB_##_devcb);
#define MCFG_74175_Q1_CB(_devcb) \
- devcb = &downcast<ttl741745_device &>(*device).set_q1_cb(DEVCB_##_devcb);
+ downcast<ttl741745_device &>(*device).set_q1_cb(DEVCB_##_devcb);
#define MCFG_74175_Q2_CB(_devcb) \
- devcb = &downcast<ttl741745_device &>(*device).set_q2_cb(DEVCB_##_devcb);
+ downcast<ttl741745_device &>(*device).set_q2_cb(DEVCB_##_devcb);
#define MCFG_74175_Q3_CB(_devcb) \
- devcb = &downcast<ttl741745_device &>(*device).set_q3_cb(DEVCB_##_devcb);
+ downcast<ttl741745_device &>(*device).set_q3_cb(DEVCB_##_devcb);
#define MCFG_74175_Q4_CB(_devcb) \
- devcb = &downcast<ttl741745_device &>(*device).set_q4_cb(DEVCB_##_devcb);
+ downcast<ttl741745_device &>(*device).set_q4_cb(DEVCB_##_devcb);
#define MCFG_74174_Q5_CB(_devcb) \
- devcb = &downcast<ttl74174_device &>(*device).set_q5_cb(DEVCB_##_devcb);
+ downcast<ttl74174_device &>(*device).set_q5_cb(DEVCB_##_devcb);
#define MCFG_74174_Q6_CB(_devcb) \
- devcb = &downcast<ttl74174_device &>(*device).set_q6_cb(DEVCB_##_devcb);
+ downcast<ttl74174_device &>(*device).set_q6_cb(DEVCB_##_devcb);
#define MCFG_74175_NOT_Q1_CB(_devcb) \
- devcb = &downcast<ttl74175_device &>(*device).set_not_q1_cb(DEVCB_##_devcb);
+ downcast<ttl74175_device &>(*device).set_not_q1_cb(DEVCB_##_devcb);
#define MCFG_74175_NOT_Q2_CB(_devcb) \
- devcb = &downcast<ttl74175_device &>(*device).set_not_q2_cb(DEVCB_##_devcb);
+ downcast<ttl74175_device &>(*device).set_not_q2_cb(DEVCB_##_devcb);
#define MCFG_74175_NOT_Q3_CB(_devcb) \
- devcb = &downcast<ttl74175_device &>(*device).set_not_q3_cb(DEVCB_##_devcb);
+ downcast<ttl74175_device &>(*device).set_not_q3_cb(DEVCB_##_devcb);
#define MCFG_74175_NOT_Q4_CB(_devcb) \
- devcb = &downcast<ttl74175_device &>(*device).set_not_q1_cb(DEVCB_##_devcb);
+ downcast<ttl74175_device &>(*device).set_not_q1_cb(DEVCB_##_devcb);
class ttl741745_device : public device_t
diff --git a/src/devices/machine/74259.h b/src/devices/machine/74259.h
index 60a43a2a55d..990c1f1ca58 100644
--- a/src/devices/machine/74259.h
+++ b/src/devices/machine/74259.h
@@ -37,24 +37,24 @@
//**************************************************************************
#define MCFG_ADDRESSABLE_LATCH_Q0_OUT_CB(_devcb) \
- devcb = &downcast<addressable_latch_device &>(*device).set_q_out_cb<0>(DEVCB_##_devcb);
+ downcast<addressable_latch_device &>(*device).set_q_out_cb<0>(DEVCB_##_devcb);
#define MCFG_ADDRESSABLE_LATCH_Q1_OUT_CB(_devcb) \
- devcb = &downcast<addressable_latch_device &>(*device).set_q_out_cb<1>(DEVCB_##_devcb);
+ downcast<addressable_latch_device &>(*device).set_q_out_cb<1>(DEVCB_##_devcb);
#define MCFG_ADDRESSABLE_LATCH_Q2_OUT_CB(_devcb) \
- devcb = &downcast<addressable_latch_device &>(*device).set_q_out_cb<2>(DEVCB_##_devcb);
+ downcast<addressable_latch_device &>(*device).set_q_out_cb<2>(DEVCB_##_devcb);
#define MCFG_ADDRESSABLE_LATCH_Q3_OUT_CB(_devcb) \
- devcb = &downcast<addressable_latch_device &>(*device).set_q_out_cb<3>(DEVCB_##_devcb);
+ downcast<addressable_latch_device &>(*device).set_q_out_cb<3>(DEVCB_##_devcb);
#define MCFG_ADDRESSABLE_LATCH_Q4_OUT_CB(_devcb) \
- devcb = &downcast<addressable_latch_device &>(*device).set_q_out_cb<4>(DEVCB_##_devcb);
+ downcast<addressable_latch_device &>(*device).set_q_out_cb<4>(DEVCB_##_devcb);
#define MCFG_ADDRESSABLE_LATCH_Q5_OUT_CB(_devcb) \
- devcb = &downcast<addressable_latch_device &>(*device).set_q_out_cb<5>(DEVCB_##_devcb);
+ downcast<addressable_latch_device &>(*device).set_q_out_cb<5>(DEVCB_##_devcb);
#define MCFG_ADDRESSABLE_LATCH_Q6_OUT_CB(_devcb) \
- devcb = &downcast<addressable_latch_device &>(*device).set_q_out_cb<6>(DEVCB_##_devcb);
+ downcast<addressable_latch_device &>(*device).set_q_out_cb<6>(DEVCB_##_devcb);
#define MCFG_ADDRESSABLE_LATCH_Q7_OUT_CB(_devcb) \
- devcb = &downcast<addressable_latch_device &>(*device).set_q_out_cb<7>(DEVCB_##_devcb);
+ downcast<addressable_latch_device &>(*device).set_q_out_cb<7>(DEVCB_##_devcb);
#define MCFG_ADDRESSABLE_LATCH_PARALLEL_OUT_CB(_devcb) \
- devcb = &downcast<addressable_latch_device &>(*device).set_parallel_out_cb(DEVCB_##_devcb);
+ downcast<addressable_latch_device &>(*device).set_parallel_out_cb(DEVCB_##_devcb);
//**************************************************************************
// TYPE DEFINITIONS
@@ -68,6 +68,8 @@ public:
// static configuration
template<unsigned Bit, class Object> devcb_base &set_q_out_cb(Object &&cb) { return m_q_out_cb[Bit].set_callback(std::forward<Object>(cb)); }
template<class Object> devcb_base &set_parallel_out_cb(Object &&cb) { return m_parallel_out_cb.set_callback(std::forward<Object>(cb)); }
+ template <unsigned Bit> auto q_out_cb() { return m_q_out_cb[Bit].bind(); }
+ auto parallel_out_cb() { return m_parallel_out_cb.bind(); }
// data write handlers
void write_bit(offs_t offset, bool d);
diff --git a/src/devices/machine/7474.h b/src/devices/machine/7474.h
index 2d4cab1a9df..0a6a678ddfb 100644
--- a/src/devices/machine/7474.h
+++ b/src/devices/machine/7474.h
@@ -52,10 +52,10 @@
//**************************************************************************
#define MCFG_7474_OUTPUT_CB(_devcb) \
- devcb = &downcast<ttl7474_device &>(*device).set_output_cb(DEVCB_##_devcb);
+ downcast<ttl7474_device &>(*device).set_output_cb(DEVCB_##_devcb);
#define MCFG_7474_COMP_OUTPUT_CB(_devcb) \
- devcb = &downcast<ttl7474_device &>(*device).set_comp_output_cb(DEVCB_##_devcb);
+ downcast<ttl7474_device &>(*device).set_comp_output_cb(DEVCB_##_devcb);
//**************************************************************************
@@ -73,6 +73,8 @@ public:
// static configuration helpers
template <class Object> devcb_base &set_output_cb(Object &&cb) { return m_output_func.set_callback(std::forward<Object>(cb)); }
template <class Object> devcb_base &set_comp_output_cb(Object &&cb) { return m_comp_output_func.set_callback(std::forward<Object>(cb)); }
+ auto output_cb() { return m_output_func.bind(); }
+ auto comp_output_cb() { return m_comp_output_func.bind(); }
// public interfaces
DECLARE_WRITE_LINE_MEMBER( clear_w );
diff --git a/src/devices/machine/8042kbdc.h b/src/devices/machine/8042kbdc.h
index b7f1610497e..2d5b63d96bc 100644
--- a/src/devices/machine/8042kbdc.h
+++ b/src/devices/machine/8042kbdc.h
@@ -24,19 +24,19 @@
downcast<kbdc8042_device &>(*device).set_keyboard_type(kbdc8042_device::_kbdt);
#define MCFG_KBDC8042_SYSTEM_RESET_CB(_devcb) \
- devcb = &downcast<kbdc8042_device &>(*device).set_system_reset_callback(DEVCB_##_devcb);
+ downcast<kbdc8042_device &>(*device).set_system_reset_callback(DEVCB_##_devcb);
#define MCFG_KBDC8042_GATE_A20_CB(_devcb) \
- devcb = &downcast<kbdc8042_device &>(*device).set_gate_a20_callback(DEVCB_##_devcb);
+ downcast<kbdc8042_device &>(*device).set_gate_a20_callback(DEVCB_##_devcb);
#define MCFG_KBDC8042_INPUT_BUFFER_FULL_CB(_devcb) \
- devcb = &downcast<kbdc8042_device &>(*device).set_input_buffer_full_callback(DEVCB_##_devcb);
+ downcast<kbdc8042_device &>(*device).set_input_buffer_full_callback(DEVCB_##_devcb);
#define MCFG_KBDC8042_OUTPUT_BUFFER_EMPTY_CB(_devcb) \
- devcb = &downcast<kbdc8042_device &>(*device).set_output_buffer_empty_callback(DEVCB_##_devcb);
+ downcast<kbdc8042_device &>(*device).set_output_buffer_empty_callback(DEVCB_##_devcb);
#define MCFG_KBDC8042_SPEAKER_CB(_devcb) \
- devcb = &downcast<kbdc8042_device &>(*device).set_speaker_callback(DEVCB_##_devcb);
+ downcast<kbdc8042_device &>(*device).set_speaker_callback(DEVCB_##_devcb);
//**************************************************************************
// TYPE DEFINITIONS
diff --git a/src/devices/machine/82s129.h b/src/devices/machine/82s129.h
index 1eb79166a30..9b5ef9d3bf1 100644
--- a/src/devices/machine/82s129.h
+++ b/src/devices/machine/82s129.h
@@ -47,34 +47,34 @@
#define MCFG_82S126_OUTPUT_CB(_devcb) \
- devcb = &downcast<prom82s129_base_device &>(*device).set_out_cb(DEVCB_##_devcb);
+ downcast<prom82s129_base_device &>(*device).set_out_cb(DEVCB_##_devcb);
#define MCFG_82S126_O1_CB(_devcb) \
- devcb = &downcast<prom82s129_base_device &>(*device).set_o1_cb(DEVCB_##_devcb);
+ downcast<prom82s129_base_device &>(*device).set_o1_cb(DEVCB_##_devcb);
#define MCFG_82S126_O2_CB(_devcb) \
- devcb = &downcast<prom82s129_base_device &>(*device).set_o2_cb(DEVCB_##_devcb);
+ downcast<prom82s129_base_device &>(*device).set_o2_cb(DEVCB_##_devcb);
#define MCFG_82S126_O3_CB(_devcb) \
- devcb = &downcast<prom82s129_base_device &>(*device).set_o3_cb(DEVCB_##_devcb);
+ downcast<prom82s129_base_device &>(*device).set_o3_cb(DEVCB_##_devcb);
#define MCFG_82S126_O4_CB(_devcb) \
- devcb = &downcast<prom82s129_base_device &>(*device).set_o4_cb(DEVCB_##_devcb);
+ downcast<prom82s129_base_device &>(*device).set_o4_cb(DEVCB_##_devcb);
#define MCFG_82S129_OUTPUT_CB(_devcb) \
- devcb = &downcast<prom82s129_base_device &>(*device).set_out_cb(DEVCB_##_devcb);
+ downcast<prom82s129_base_device &>(*device).set_out_cb(DEVCB_##_devcb);
#define MCFG_82S129_O1_CB(_devcb) \
- devcb = &downcast<prom82s129_base_device &>(*device).set_o1_cb(DEVCB_##_devcb);
+ downcast<prom82s129_base_device &>(*device).set_o1_cb(DEVCB_##_devcb);
#define MCFG_82S129_O2_CB(_devcb) \
- devcb = &downcast<prom82s129_base_device &>(*device).set_o2_cb(DEVCB_##_devcb);
+ downcast<prom82s129_base_device &>(*device).set_o2_cb(DEVCB_##_devcb);
#define MCFG_82S129_O3_CB(_devcb) \
- devcb = &downcast<prom82s129_base_device &>(*device).set_o3_cb(DEVCB_##_devcb);
+ downcast<prom82s129_base_device &>(*device).set_o3_cb(DEVCB_##_devcb);
#define MCFG_82S129_O4_CB(_devcb) \
- devcb = &downcast<prom82s129_base_device &>(*device).set_o4_cb(DEVCB_##_devcb);
+ downcast<prom82s129_base_device &>(*device).set_o4_cb(DEVCB_##_devcb);
#define MCFG_82S129_ADD(_tag) \
MCFG_DEVICE_ADD(_tag, PROM82S129, 0)
diff --git a/src/devices/machine/8364_paula.h b/src/devices/machine/8364_paula.h
index db9ed3727c0..31e2c2661bf 100644
--- a/src/devices/machine/8364_paula.h
+++ b/src/devices/machine/8364_paula.h
@@ -49,10 +49,10 @@
//**************************************************************************
#define MCFG_PAULA_MEM_READ_CB(_devcb) \
- devcb = &downcast<paula_8364_device &>(*device).set_mem_r_callback(DEVCB_##_devcb);
+ downcast<paula_8364_device &>(*device).set_mem_r_callback(DEVCB_##_devcb);
#define MCFG_PAULA_INT_CB(_devcb) \
- devcb = &downcast<paula_8364_device &>(*device).set_int_w_callback(DEVCB_##_devcb);
+ downcast<paula_8364_device &>(*device).set_int_w_callback(DEVCB_##_devcb);
//**************************************************************************
diff --git a/src/devices/machine/8530scc.h b/src/devices/machine/8530scc.h
index 5333fda0060..457a0d36334 100644
--- a/src/devices/machine/8530scc.h
+++ b/src/devices/machine/8530scc.h
@@ -12,7 +12,7 @@
#define MAME_MACHINE_8530SCC_H
#define MCFG_Z8530_INTRQ_CALLBACK(_write) \
- devcb = &downcast<scc8530_t &>(*device).set_intrq_wr_callback(DEVCB_##_write);
+ downcast<scc8530_t &>(*device).set_intrq_wr_callback(DEVCB_##_write);
class scc8530_t : public device_t
{
diff --git a/src/devices/machine/aakart.h b/src/devices/machine/aakart.h
index f432055f59c..661a1f33086 100644
--- a/src/devices/machine/aakart.h
+++ b/src/devices/machine/aakart.h
@@ -18,10 +18,10 @@ Acorn Archimedes KART interface
//**************************************************************************
#define MCFG_AAKART_OUT_TX_CB(_devcb) \
- devcb = &downcast<aakart_device &>(*device).set_out_tx_callback(DEVCB_##_devcb);
+ downcast<aakart_device &>(*device).set_out_tx_callback(DEVCB_##_devcb);
#define MCFG_AAKART_OUT_RX_CB(_devcb) \
- devcb = &downcast<aakart_device &>(*device).set_out_rx_callback(DEVCB_##_devcb);
+ downcast<aakart_device &>(*device).set_out_rx_callback(DEVCB_##_devcb);
//**************************************************************************
diff --git a/src/devices/machine/adc0808.h b/src/devices/machine/adc0808.h
index ace9fcf4682..4d717446be0 100644
--- a/src/devices/machine/adc0808.h
+++ b/src/devices/machine/adc0808.h
@@ -42,35 +42,35 @@
//**************************************************************************
#define MCFG_ADC0808_EOC_CB(_devcb) \
- devcb = &downcast<adc0808_device &>(*device).set_eoc_callback(DEVCB_##_devcb);
+ downcast<adc0808_device &>(*device).set_eoc_callback(DEVCB_##_devcb);
// common hookup where the eoc output is connected to a flip-flop
#define MCFG_ADC0808_EOC_FF_CB(_devcb) \
- devcb = &downcast<adc0808_device &>(*device).set_eoc_ff_callback(DEVCB_##_devcb);
+ downcast<adc0808_device &>(*device).set_eoc_ff_callback(DEVCB_##_devcb);
#define MCFG_ADC0808_IN0_CB(_devcb) \
- devcb = &downcast<adc0808_device &>(*device).set_in_callback(DEVCB_##_devcb, 0);
+ downcast<adc0808_device &>(*device).set_in_callback(DEVCB_##_devcb, 0);
#define MCFG_ADC0808_IN1_CB(_devcb) \
- devcb = &downcast<adc0808_device &>(*device).set_in_callback(DEVCB_##_devcb, 1);
+ downcast<adc0808_device &>(*device).set_in_callback(DEVCB_##_devcb, 1);
#define MCFG_ADC0808_IN2_CB(_devcb) \
- devcb = &downcast<adc0808_device &>(*device).set_in_callback(DEVCB_##_devcb, 2);
+ downcast<adc0808_device &>(*device).set_in_callback(DEVCB_##_devcb, 2);
#define MCFG_ADC0808_IN3_CB(_devcb) \
- devcb = &downcast<adc0808_device &>(*device).set_in_callback(DEVCB_##_devcb, 3);
+ downcast<adc0808_device &>(*device).set_in_callback(DEVCB_##_devcb, 3);
#define MCFG_ADC0808_IN4_CB(_devcb) \
- devcb = &downcast<adc0808_device &>(*device).set_in_callback(DEVCB_##_devcb, 4);
+ downcast<adc0808_device &>(*device).set_in_callback(DEVCB_##_devcb, 4);
#define MCFG_ADC0808_IN5_CB(_devcb) \
- devcb = &downcast<adc0808_device &>(*device).set_in_callback(DEVCB_##_devcb, 5);
+ downcast<adc0808_device &>(*device).set_in_callback(DEVCB_##_devcb, 5);
#define MCFG_ADC0808_IN6_CB(_devcb) \
- devcb = &downcast<adc0808_device &>(*device).set_in_callback(DEVCB_##_devcb, 6);
+ downcast<adc0808_device &>(*device).set_in_callback(DEVCB_##_devcb, 6);
#define MCFG_ADC0808_IN7_CB(_devcb) \
- devcb = &downcast<adc0808_device &>(*device).set_in_callback(DEVCB_##_devcb, 7);
+ downcast<adc0808_device &>(*device).set_in_callback(DEVCB_##_devcb, 7);
//**************************************************************************
diff --git a/src/devices/machine/adc0844.h b/src/devices/machine/adc0844.h
index e31740b3d09..d7133695128 100644
--- a/src/devices/machine/adc0844.h
+++ b/src/devices/machine/adc0844.h
@@ -34,19 +34,19 @@
MCFG_DEVICE_ADD(_tag, ADC0844, 0)
#define MCFG_ADC0844_INTR_CB(_devcb) \
- devcb = &downcast<adc0844_device &>(*device).set_intr_callback(DEVCB_##_devcb);
+ downcast<adc0844_device &>(*device).set_intr_callback(DEVCB_##_devcb);
#define MCFG_ADC0844_CH1_CB(_devcb) \
- devcb = &downcast<adc0844_device &>(*device).set_ch1_callback(DEVCB_##_devcb);
+ downcast<adc0844_device &>(*device).set_ch1_callback(DEVCB_##_devcb);
#define MCFG_ADC0844_CH2_CB(_devcb) \
- devcb = &downcast<adc0844_device &>(*device).set_ch2_callback(DEVCB_##_devcb);
+ downcast<adc0844_device &>(*device).set_ch2_callback(DEVCB_##_devcb);
#define MCFG_ADC0844_CH3_CB(_devcb) \
- devcb = &downcast<adc0844_device &>(*device).set_ch3_callback(DEVCB_##_devcb);
+ downcast<adc0844_device &>(*device).set_ch3_callback(DEVCB_##_devcb);
#define MCFG_ADC0844_CH4_CB(_devcb) \
- devcb = &downcast<adc0844_device &>(*device).set_ch4_callback(DEVCB_##_devcb);
+ downcast<adc0844_device &>(*device).set_ch4_callback(DEVCB_##_devcb);
#define MCFG_ADC0848_ADD(_tag) \
MCFG_DEVICE_ADD(_tag, ADC0848, 0)
@@ -58,16 +58,16 @@
#define MCFG_ADC0848_CH4_CB MCFG_ADC0844_CH4_CB
#define MCFG_ADC0848_CH5_CB(_devcb) \
- devcb = &downcast<adc0848_device &>(*device).set_ch5_callback(DEVCB_##_devcb);
+ downcast<adc0848_device &>(*device).set_ch5_callback(DEVCB_##_devcb);
#define MCFG_ADC0848_CH6_CB(_devcb) \
- devcb = &downcast<adc0848_device &>(*device).set_ch6_callback(DEVCB_##_devcb);
+ downcast<adc0848_device &>(*device).set_ch6_callback(DEVCB_##_devcb);
#define MCFG_ADC0848_CH7_CB(_devcb) \
- devcb = &downcast<adc0848_device &>(*device).set_ch7_callback(DEVCB_##_devcb);
+ downcast<adc0848_device &>(*device).set_ch7_callback(DEVCB_##_devcb);
#define MCFG_ADC0848_CH8_CB(_devcb) \
- devcb = &downcast<adc0848_device &>(*device).set_ch8_callback(DEVCB_##_devcb);
+ downcast<adc0848_device &>(*device).set_ch8_callback(DEVCB_##_devcb);
//**************************************************************************
diff --git a/src/devices/machine/akiko.h b/src/devices/machine/akiko.h
index d72b5b58ce5..49e2623adbe 100644
--- a/src/devices/machine/akiko.h
+++ b/src/devices/machine/akiko.h
@@ -29,22 +29,22 @@
MCFG_DEVICE_ADD(_tag, AKIKO, 0)
#define MCFG_AKIKO_MEM_READ_CB(_devcb) \
- devcb = &downcast<akiko_device &>(*device).set_mem_r_callback(DEVCB_##_devcb);
+ downcast<akiko_device &>(*device).set_mem_r_callback(DEVCB_##_devcb);
#define MCFG_AKIKO_MEM_WRITE_CB(_devcb) \
- devcb = &downcast<akiko_device &>(*device).set_mem_w_callback(DEVCB_##_devcb);
+ downcast<akiko_device &>(*device).set_mem_w_callback(DEVCB_##_devcb);
#define MCFG_AKIKO_INT_CB(_devcb) \
- devcb = &downcast<akiko_device &>(*device).set_int_w_callback(DEVCB_##_devcb);
+ downcast<akiko_device &>(*device).set_int_w_callback(DEVCB_##_devcb);
#define MCFG_AKIKO_SCL_HANDLER(_devcb) \
- devcb = &downcast<akiko_device &>(*device).set_scl_handler(DEVCB_##_devcb);
+ downcast<akiko_device &>(*device).set_scl_handler(DEVCB_##_devcb);
#define MCFG_AKIKO_SDA_READ_HANDLER(_devcb) \
- devcb = &downcast<akiko_device &>(*device).set_sda_read_handler(DEVCB_##_devcb);
+ downcast<akiko_device &>(*device).set_sda_read_handler(DEVCB_##_devcb);
#define MCFG_AKIKO_SDA_WRITE_HANDLER(_devcb) \
- devcb = &downcast<akiko_device &>(*device).set_sda_write_handler(DEVCB_##_devcb);
+ downcast<akiko_device &>(*device).set_sda_write_handler(DEVCB_##_devcb);
//**************************************************************************
diff --git a/src/devices/machine/am53cf96.h b/src/devices/machine/am53cf96.h
index ba7b46ab2c7..02e64599827 100644
--- a/src/devices/machine/am53cf96.h
+++ b/src/devices/machine/am53cf96.h
@@ -13,7 +13,7 @@
#include "legscsi.h"
#define MCFG_AM53CF96_IRQ_HANDLER(_devcb) \
- devcb = &downcast<am53cf96_device &>(*device).set_irq_handler(DEVCB_##_devcb);
+ downcast<am53cf96_device &>(*device).set_irq_handler(DEVCB_##_devcb);
class am53cf96_device : public legacy_scsi_host_adapter
{
diff --git a/src/devices/machine/am9513.h b/src/devices/machine/am9513.h
index c11a659624f..51fdfd54091 100644
--- a/src/devices/machine/am9513.h
+++ b/src/devices/machine/am9513.h
@@ -39,17 +39,17 @@
//**************************************************************************
#define MCFG_AM9513_OUT1_CALLBACK(_devcb) \
- devcb = &downcast<am9513_device &>(*device).set_out_cb(0, DEVCB_##_devcb);
+ downcast<am9513_device &>(*device).set_out_cb(0, DEVCB_##_devcb);
#define MCFG_AM9513_OUT2_CALLBACK(_devcb) \
- devcb = &downcast<am9513_device &>(*device).set_out_cb(1, DEVCB_##_devcb);
+ downcast<am9513_device &>(*device).set_out_cb(1, DEVCB_##_devcb);
#define MCFG_AM9513_OUT3_CALLBACK(_devcb) \
- devcb = &downcast<am9513_device &>(*device).set_out_cb(2, DEVCB_##_devcb);
+ downcast<am9513_device &>(*device).set_out_cb(2, DEVCB_##_devcb);
#define MCFG_AM9513_OUT4_CALLBACK(_devcb) \
- devcb = &downcast<am9513_device &>(*device).set_out_cb(3, DEVCB_##_devcb);
+ downcast<am9513_device &>(*device).set_out_cb(3, DEVCB_##_devcb);
#define MCFG_AM9513_OUT5_CALLBACK(_devcb) \
- devcb = &downcast<am9513_device &>(*device).set_out_cb(4, DEVCB_##_devcb);
+ downcast<am9513_device &>(*device).set_out_cb(4, DEVCB_##_devcb);
#define MCFG_AM9513_FOUT_CALLBACK(_devcb) \
- devcb = &downcast<am9513_device &>(*device).set_fout_cb(DEVCB_##_devcb);
+ downcast<am9513_device &>(*device).set_fout_cb(DEVCB_##_devcb);
@@ -68,6 +68,12 @@ public:
// static configuration
template<class Object> devcb_base &set_out_cb(int c, Object &&cb) { assert(c >= 0 && c < 5); return m_out_cb[c].set_callback(std::forward<Object>(cb)); }
template<class Object> devcb_base &set_fout_cb(Object &&cb) { return m_fout_cb.set_callback(std::forward<Object>(cb)); }
+ auto out1_cb() { return m_out_cb[0].bind(); }
+ auto out2_cb() { return m_out_cb[1].bind(); }
+ auto out3_cb() { return m_out_cb[2].bind(); }
+ auto out4_cb() { return m_out_cb[3].bind(); }
+ auto out5_cb() { return m_out_cb[4].bind(); }
+ auto fout_cb() { return m_fout_cb.bind(); }
// 8-bit data bus interface
DECLARE_READ8_MEMBER(read8);
diff --git a/src/devices/machine/am9517a.h b/src/devices/machine/am9517a.h
index 8527dfaa42f..dd262cec356 100644
--- a/src/devices/machine/am9517a.h
+++ b/src/devices/machine/am9517a.h
@@ -53,13 +53,20 @@ public:
template <class Object> devcb_base &set_out_hreq_callback(Object &&cb) { return m_out_hreq_cb.set_callback(std::forward<Object>(cb)); }
template <class Object> devcb_base &set_out_eop_callback(Object &&cb) { return m_out_eop_cb.set_callback(std::forward<Object>(cb)); }
+ auto out_hreq_callback() { return m_out_hreq_cb.bind(); }
+ auto out_eop_callback() { return m_out_eop_cb.bind(); }
template <class Object> devcb_base &set_in_memr_callback(Object &&cb) { return m_in_memr_cb.set_callback(std::forward<Object>(cb)); }
template <class Object> devcb_base &set_out_memw_callback(Object &&cb) { return m_out_memw_cb.set_callback(std::forward<Object>(cb)); }
+ auto in_memr_callback() { return m_in_memr_cb.bind(); }
+ auto out_memw_callback() { return m_out_memw_cb.bind(); }
template <unsigned C, class Object> devcb_base &set_in_ior_callback(Object &&cb) { return m_in_ior_cb[C].set_callback(std::forward<Object>(cb)); }
template <unsigned C, class Object> devcb_base &set_out_iow_callback(Object &&cb) { return m_out_iow_cb[C].set_callback(std::forward<Object>(cb)); }
template <unsigned C, class Object> devcb_base &set_out_dack_callback(Object &&cb) { return m_out_dack_cb[C].set_callback(std::forward<Object>(cb)); }
+ template <unsigned C> auto in_ior_callback() { return m_in_ior_cb[C].bind(); }
+ template <unsigned C> auto out_iow_callback() { return m_out_iow_cb[C].bind(); }
+ template <unsigned C> auto out_dack_callback() { return m_out_dack_cb[C].bind(); }
virtual DECLARE_READ8_MEMBER( read );
virtual DECLARE_WRITE8_MEMBER( write );
@@ -179,52 +186,52 @@ DECLARE_DEVICE_TYPE(PCXPORT_DMAC, pcxport_dmac_device)
***************************************************************************/
#define MCFG_AM9517A_OUT_HREQ_CB(_devcb) \
- devcb = &downcast<am9517a_device &>(*device).set_out_hreq_callback(DEVCB_##_devcb);
+ downcast<am9517a_device &>(*device).set_out_hreq_callback(DEVCB_##_devcb);
#define MCFG_AM9517A_OUT_EOP_CB(_devcb) \
- devcb = &downcast<am9517a_device &>(*device).set_out_eop_callback(DEVCB_##_devcb);
+ downcast<am9517a_device &>(*device).set_out_eop_callback(DEVCB_##_devcb);
#define MCFG_AM9517A_IN_MEMR_CB(_devcb) \
- devcb = &downcast<am9517a_device &>(*device).set_in_memr_callback(DEVCB_##_devcb);
+ downcast<am9517a_device &>(*device).set_in_memr_callback(DEVCB_##_devcb);
#define MCFG_AM9517A_OUT_MEMW_CB(_devcb) \
- devcb = &downcast<am9517a_device &>(*device).set_out_memw_callback(DEVCB_##_devcb);
+ downcast<am9517a_device &>(*device).set_out_memw_callback(DEVCB_##_devcb);
#define MCFG_AM9517A_IN_IOR_0_CB(_devcb) \
- devcb = &downcast<am9517a_device &>(*device).set_in_ior_callback<0>(DEVCB_##_devcb);
+ downcast<am9517a_device &>(*device).set_in_ior_callback<0>(DEVCB_##_devcb);
#define MCFG_AM9517A_IN_IOR_1_CB(_devcb) \
- devcb = &downcast<am9517a_device &>(*device).set_in_ior_callback<1>(DEVCB_##_devcb);
+ downcast<am9517a_device &>(*device).set_in_ior_callback<1>(DEVCB_##_devcb);
#define MCFG_AM9517A_IN_IOR_2_CB(_devcb) \
- devcb = &downcast<am9517a_device &>(*device).set_in_ior_callback<2>(DEVCB_##_devcb);
+ downcast<am9517a_device &>(*device).set_in_ior_callback<2>(DEVCB_##_devcb);
#define MCFG_AM9517A_IN_IOR_3_CB(_devcb) \
- devcb = &downcast<am9517a_device &>(*device).set_in_ior_callback<3>(DEVCB_##_devcb);
+ downcast<am9517a_device &>(*device).set_in_ior_callback<3>(DEVCB_##_devcb);
#define MCFG_AM9517A_OUT_IOW_0_CB(_devcb) \
- devcb = &downcast<am9517a_device &>(*device).set_out_iow_callback<0>(DEVCB_##_devcb);
+ downcast<am9517a_device &>(*device).set_out_iow_callback<0>(DEVCB_##_devcb);
#define MCFG_AM9517A_OUT_IOW_1_CB(_devcb) \
- devcb = &downcast<am9517a_device &>(*device).set_out_iow_callback<1>(DEVCB_##_devcb);
+ downcast<am9517a_device &>(*device).set_out_iow_callback<1>(DEVCB_##_devcb);
#define MCFG_AM9517A_OUT_IOW_2_CB(_devcb) \
- devcb = &downcast<am9517a_device &>(*device).set_out_iow_callback<2>(DEVCB_##_devcb);
+ downcast<am9517a_device &>(*device).set_out_iow_callback<2>(DEVCB_##_devcb);
#define MCFG_AM9517A_OUT_IOW_3_CB(_devcb) \
- devcb = &downcast<am9517a_device &>(*device).set_out_iow_callback<3>(DEVCB_##_devcb);
+ downcast<am9517a_device &>(*device).set_out_iow_callback<3>(DEVCB_##_devcb);
#define MCFG_AM9517A_OUT_DACK_0_CB(_devcb) \
- devcb = &downcast<am9517a_device &>(*device).set_out_dack_callback<0>(DEVCB_##_devcb);
+ downcast<am9517a_device &>(*device).set_out_dack_callback<0>(DEVCB_##_devcb);
#define MCFG_AM9517A_OUT_DACK_1_CB(_devcb) \
- devcb = &downcast<am9517a_device &>(*device).set_out_dack_callback<1>(DEVCB_##_devcb);
+ downcast<am9517a_device &>(*device).set_out_dack_callback<1>(DEVCB_##_devcb);
#define MCFG_AM9517A_OUT_DACK_2_CB(_devcb) \
- devcb = &downcast<am9517a_device &>(*device).set_out_dack_callback<2>(DEVCB_##_devcb);
+ downcast<am9517a_device &>(*device).set_out_dack_callback<2>(DEVCB_##_devcb);
#define MCFG_AM9517A_OUT_DACK_3_CB(_devcb) \
- devcb = &downcast<am9517a_device &>(*device).set_out_dack_callback<3>(DEVCB_##_devcb);
+ downcast<am9517a_device &>(*device).set_out_dack_callback<3>(DEVCB_##_devcb);
#define MCFG_I8237_OUT_HREQ_CB MCFG_AM9517A_OUT_HREQ_CB
#define MCFG_I8237_OUT_EOP_CB MCFG_AM9517A_OUT_EOP_CB
diff --git a/src/devices/machine/am9519.h b/src/devices/machine/am9519.h
index 27ac1e9a46e..cae08467b40 100644
--- a/src/devices/machine/am9519.h
+++ b/src/devices/machine/am9519.h
@@ -33,7 +33,7 @@
***************************************************************************/
#define MCFG_AM9519_OUT_INT_CB(_devcb) \
- devcb = &downcast<am9519_device &>(*device).static_set_out_int_callback(DEVCB_##_devcb);
+ downcast<am9519_device &>(*device).static_set_out_int_callback(DEVCB_##_devcb);
class am9519_device : public device_t
diff --git a/src/devices/machine/amigafdc.h b/src/devices/machine/amigafdc.h
index e95e1ed0137..1cd55ca1d18 100644
--- a/src/devices/machine/amigafdc.h