summaryrefslogtreecommitdiffstats
path: root/src/devices/cpu
diff options
context:
space:
mode:
Diffstat (limited to 'src/devices/cpu')
-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
79 files changed, 543 insertions, 495 deletions
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
{