summaryrefslogtreecommitdiffstatshomepage
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/devices/bus/a1bus/a1bus.h17
-rw-r--r--src/devices/bus/adamnet/adamnet.h11
-rw-r--r--src/devices/bus/bml3/bml3bus.h4
-rw-r--r--src/devices/bus/cbm2/exp.h11
-rw-r--r--src/devices/bus/cbmiec/cbmiec.h21
-rw-r--r--src/devices/bus/cbmiec/interpod.h10
-rw-r--r--src/devices/bus/cbus/pc9801_cbus.h37
-rw-r--r--src/devices/bus/cpc/cpc_rom.cpp21
-rw-r--r--src/devices/bus/cpc/cpc_rom.h3
-rw-r--r--src/devices/bus/pet/cass.h13
-rw-r--r--src/devices/bus/pet/exp.h20
-rw-r--r--src/devices/bus/plus4/exp.h31
-rw-r--r--src/mame/drivers/apple1.cpp5
13 files changed, 15 insertions, 189 deletions
diff --git a/src/devices/bus/a1bus/a1bus.h b/src/devices/bus/a1bus/a1bus.h
index 484cba5b70f..ba31301fb87 100644
--- a/src/devices/bus/a1bus/a1bus.h
+++ b/src/devices/bus/a1bus/a1bus.h
@@ -13,19 +13,6 @@
//**************************************************************************
-// INTERFACE CONFIGURATION MACROS
-//**************************************************************************
-
-#define MCFG_A1BUS_CPU(_cputag) \
- downcast<a1bus_device &>(*device).set_cputag(_cputag);
-
-#define MCFG_A1BUS_OUT_IRQ_CB(_devcb) \
- downcast<a1bus_device &>(*device).set_out_irq_callback(DEVCB_##_devcb);
-
-#define MCFG_A1BUS_OUT_NMI_CB(_devcb) \
- downcast<a1bus_device &>(*device).set_out_nmi_callback(DEVCB_##_devcb);
-
-//**************************************************************************
// TYPE DEFINITIONS
//**************************************************************************
@@ -73,8 +60,8 @@ public:
// inline configuration
template <typename T> void set_cputag(T &&tag) { m_maincpu.set_tag(std::forward<T>(tag)); }
- template <class Object> devcb_base &set_out_irq_callback(Object &&cb) { return m_out_irq_cb.set_callback(std::forward<Object>(cb)); }
- template <class Object> devcb_base &set_out_nmi_callback(Object &&cb) { return m_out_nmi_cb.set_callback(std::forward<Object>(cb)); }
+ auto out_irq_callback() { return m_out_irq_cb.bind(); }
+ auto out_nmi_callback() { return m_out_nmi_cb.bind(); }
void add_a1bus_card(device_a1bus_card_interface *card);
device_a1bus_card_interface *get_a1bus_card();
diff --git a/src/devices/bus/adamnet/adamnet.h b/src/devices/bus/adamnet/adamnet.h
index c9090bf5482..51fc46a38dd 100644
--- a/src/devices/bus/adamnet/adamnet.h
+++ b/src/devices/bus/adamnet/adamnet.h
@@ -21,17 +21,6 @@
#define ADAMNET_TAG "adamnet"
-
-//**************************************************************************
-// INTERFACE CONFIGURATION MACROS
-//**************************************************************************
-
-#define MCFG_ADAMNET_SLOT_ADD(_tag, _slot_intf, _def_slot) \
- MCFG_DEVICE_ADD(_tag, ADAMNET_SLOT, 0) \
- MCFG_DEVICE_SLOT_INTERFACE(_slot_intf, _def_slot, false)
-
-
-
//**************************************************************************
// TYPE DEFINITIONS
//**************************************************************************
diff --git a/src/devices/bus/bml3/bml3bus.h b/src/devices/bus/bml3/bml3bus.h
index e608eabf3af..ddaa1c87dce 100644
--- a/src/devices/bus/bml3/bml3bus.h
+++ b/src/devices/bus/bml3/bml3bus.h
@@ -25,10 +25,6 @@
MCFG_DEVICE_SLOT_INTERFACE(_slot_intf, _def_slot, false) \
downcast<bml3bus_slot_device &>(*device).set_bml3bus_slot(_nbtag, _tag);
-#define MCFG_BML3BUS_ONBOARD_ADD(_nbtag, _tag, _dev_type) \
- MCFG_DEVICE_ADD(_tag, _dev_type, 0) \
- downcast<device_bml3bus_card_interface &>(*device).set_bml3bus_tag(_nbtag, _tag);
-
//**************************************************************************
// TYPE DEFINITIONS
diff --git a/src/devices/bus/cbm2/exp.h b/src/devices/bus/cbm2/exp.h
index 51f2cb15119..58e854c9aa0 100644
--- a/src/devices/bus/cbm2/exp.h
+++ b/src/devices/bus/cbm2/exp.h
@@ -40,17 +40,6 @@
#define CBM2_EXPANSION_SLOT_TAG "exp"
-
-//**************************************************************************
-// INTERFACE CONFIGURATION MACROS
-//**************************************************************************
-
-#define MCFG_CBM2_EXPANSION_SLOT_ADD(_tag, _clock, _slot_intf, _def_slot) \
- MCFG_DEVICE_ADD(_tag, CBM2_EXPANSION_SLOT, _clock) \
- MCFG_DEVICE_SLOT_INTERFACE(_slot_intf, _def_slot, false)
-
-
-
//**************************************************************************
// TYPE DEFINITIONS
//**************************************************************************
diff --git a/src/devices/bus/cbmiec/cbmiec.h b/src/devices/bus/cbmiec/cbmiec.h
index 4977bfc97be..6636dba45a2 100644
--- a/src/devices/bus/cbmiec/cbmiec.h
+++ b/src/devices/bus/cbmiec/cbmiec.h
@@ -30,22 +30,6 @@
MCFG_DEVICE_ADD(CBM_IEC_TAG, CBM_IEC, 0)
-#define MCFG_CBM_IEC_BUS_SRQ_CALLBACK(_write) \
- downcast<cbm_iec_device *>(device)->set_srq_callback(DEVCB_##_write);
-
-#define MCFG_CBM_IEC_BUS_ATN_CALLBACK(_write) \
- downcast<cbm_iec_device *>(device)->set_atn_callback(DEVCB_##_write);
-
-#define MCFG_CBM_IEC_BUS_CLK_CALLBACK(_write) \
- downcast<cbm_iec_device *>(device)->set_clk_callback(DEVCB_##_write);
-
-#define MCFG_CBM_IEC_BUS_DATA_CALLBACK(_write) \
- downcast<cbm_iec_device *>(device)->set_data_callback(DEVCB_##_write);
-
-#define MCFG_CBM_IEC_BUS_RESET_CALLBACK(_write) \
- downcast<cbm_iec_device *>(device)->set_reset_callback(DEVCB_##_write);
-
-
#define MCFG_CBM_IEC_SLOT_ADD(_tag, _address, _slot_intf, _def_slot) \
MCFG_DEVICE_ADD(_tag, CBM_IEC_SLOT, 0) \
MCFG_DEVICE_SLOT_INTERFACE(_slot_intf, _def_slot, false) \
@@ -78,11 +62,6 @@ public:
// construction/destruction
cbm_iec_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
- template <class Object> devcb_base &set_srq_callback(Object &&wr) { return m_write_srq.set_callback(std::forward<Object>(wr)); }
- template <class Object> devcb_base &set_atn_callback(Object &&wr) { return m_write_atn.set_callback(std::forward<Object>(wr)); }
- template <class Object> devcb_base &set_clk_callback(Object &&wr) { return m_write_clk.set_callback(std::forward<Object>(wr)); }
- template <class Object> devcb_base &set_data_callback(Object &&wr) { return m_write_data.set_callback(std::forward<Object>(wr)); }
- template <class Object> devcb_base &set_reset_callback(Object &&wr) { return m_write_reset.set_callback(std::forward<Object>(wr)); }
auto srq_callback() { return m_write_srq.bind(); }
auto atn_callback() { return m_write_atn.bind(); }
auto clk_callback() { return m_write_clk.bind(); }
diff --git a/src/devices/bus/cbmiec/interpod.h b/src/devices/bus/cbmiec/interpod.h
index cc6e07f7c7a..58c193286cf 100644
--- a/src/devices/bus/cbmiec/interpod.h
+++ b/src/devices/bus/cbmiec/interpod.h
@@ -27,16 +27,6 @@
#define INTERPOD_TAG "interpod"
-
-//**************************************************************************
-// INTERFACE CONFIGURATION MACROS
-//**************************************************************************
-
-#define MCFG_INTERPOD_ADD() \
- MCFG_DEVICE_ADD(INTERPOD_TAG, INTERPOD, 0)
-
-
-
//**************************************************************************
// TYPE DEFINITIONS
//**************************************************************************
diff --git a/src/devices/bus/cbus/pc9801_cbus.h b/src/devices/bus/cbus/pc9801_cbus.h
index 400cfa67d27..d238f659320 100644
--- a/src/devices/bus/cbus/pc9801_cbus.h
+++ b/src/devices/bus/cbus/pc9801_cbus.h
@@ -10,43 +10,6 @@
#pragma once
-
-
-//**************************************************************************
-// CONSTANTS
-//**************************************************************************
-
-
-
-//**************************************************************************
-// INTERFACE CONFIGURATION MACROS
-//**************************************************************************
-
-#define MCFG_PC9801CBUS_CPU(_cputag) \
- downcast<pc9801_slot_device &>(*device).set_cpu_tag(_cputag);
-
-#define MCFG_PC9801CBUS_INT0_CALLBACK(_devcb) \
- downcast<pc9801_slot_device &>(*device).set_int_callback<0>(DEVCB_##_devcb);
-
-#define MCFG_PC9801CBUS_INT1_CALLBACK(_devcb) \
- downcast<pc9801_slot_device &>(*device).set_int_callback<1>(DEVCB_##_devcb);
-
-#define MCFG_PC9801CBUS_INT2_CALLBACK(_devcb) \
- downcast<pc9801_slot_device &>(*device).set_int_callback<2>(DEVCB_##_devcb);
-
-#define MCFG_PC9801CBUS_INT3_CALLBACK(_devcb) \
- downcast<pc9801_slot_device &>(*device).set_int_callback<3>(DEVCB_##_devcb);
-
-#define MCFG_PC9801CBUS_INT4_CALLBACK(_devcb) \
- downcast<pc9801_slot_device &>(*device).set_int_callback<4>(DEVCB_##_devcb);
-
-#define MCFG_PC9801CBUS_INT5_CALLBACK(_devcb) \
- downcast<pc9801_slot_device &>(*device).set_int_callback<5>(DEVCB_##_devcb);
-
-#define MCFG_PC9801CBUS_INT6_CALLBACK(_devcb) \
- downcast<pc9801_slot_device &>(*device).set_int_callback<6>(DEVCB_##_devcb);
-
-
//**************************************************************************
// TYPE DEFINITIONS
//**************************************************************************
diff --git a/src/devices/bus/cpc/cpc_rom.cpp b/src/devices/bus/cpc/cpc_rom.cpp
index a3fedd575bc..69bd7f80035 100644
--- a/src/devices/bus/cpc/cpc_rom.cpp
+++ b/src/devices/bus/cpc/cpc_rom.cpp
@@ -18,22 +18,23 @@ void cpc_exp_cards(device_slot_interface &device);
//**************************************************************************
// device machine config
-MACHINE_CONFIG_START(cpc_rom_device::device_add_mconfig)
- MCFG_CPC_ROMSLOT_ADD("rom1")
- MCFG_CPC_ROMSLOT_ADD("rom2")
- MCFG_CPC_ROMSLOT_ADD("rom3")
- MCFG_CPC_ROMSLOT_ADD("rom4")
- MCFG_CPC_ROMSLOT_ADD("rom5")
- MCFG_CPC_ROMSLOT_ADD("rom6")
- MCFG_CPC_ROMSLOT_ADD("rom7")
- MCFG_CPC_ROMSLOT_ADD("rom8")
+void cpc_rom_device::device_add_mconfig(machine_config &config)
+{
+ CPC_ROMSLOT(config, m_rom[0], 0);
+ CPC_ROMSLOT(config, m_rom[1], 0);
+ CPC_ROMSLOT(config, m_rom[2], 0);
+ CPC_ROMSLOT(config, m_rom[3], 0);
+ CPC_ROMSLOT(config, m_rom[4], 0);
+ CPC_ROMSLOT(config, m_rom[5], 0);
+ CPC_ROMSLOT(config, m_rom[6], 0);
+ CPC_ROMSLOT(config, m_rom[7], 0);
// pass-through
cpc_expansion_slot_device &exp(CPC_EXPANSION_SLOT(config, "exp", DERIVED_CLOCK(1, 1), cpc_exp_cards, nullptr));
exp.irq_callback().set(DEVICE_SELF_OWNER, FUNC(cpc_expansion_slot_device::irq_w));
exp.nmi_callback().set(DEVICE_SELF_OWNER, FUNC(cpc_expansion_slot_device::nmi_w));
exp.romdis_callback().set(DEVICE_SELF_OWNER, FUNC(cpc_expansion_slot_device::romdis_w)); // ROMDIS
-MACHINE_CONFIG_END
+}
//**************************************************************************
diff --git a/src/devices/bus/cpc/cpc_rom.h b/src/devices/bus/cpc/cpc_rom.h
index 0128dc79337..67e88cf6137 100644
--- a/src/devices/bus/cpc/cpc_rom.h
+++ b/src/devices/bus/cpc/cpc_rom.h
@@ -53,9 +53,6 @@ private:
DECLARE_DEVICE_TYPE(CPC_ROMSLOT, cpc_rom_image_device)
-#define MCFG_CPC_ROMSLOT_ADD(_tag) \
- MCFG_DEVICE_ADD(_tag, CPC_ROMSLOT, 0)
-
/*** ROM box device ***/
class cpc_rom_device : public device_t,
diff --git a/src/devices/bus/pet/cass.h b/src/devices/bus/pet/cass.h
index d5a43fee19c..babfdf2058d 100644
--- a/src/devices/bus/pet/cass.h
+++ b/src/devices/bus/pet/cass.h
@@ -31,18 +31,6 @@
#define PET_DATASSETTE_PORT2_TAG "tape2"
-
-//**************************************************************************
-// INTERFACE CONFIGURATION MACROS
-//**************************************************************************
-
-#define MCFG_PET_DATASSETTE_PORT_ADD(_tag, _slot_intf, _def_slot, _devcb) \
- MCFG_DEVICE_ADD(_tag, PET_DATASSETTE_PORT, 0) \
- MCFG_DEVICE_SLOT_INTERFACE(_slot_intf, _def_slot, false) \
- downcast<pet_datassette_port_device &>(*device).set_read_handler(DEVCB_##_devcb);
-
-
-
//**************************************************************************
// TYPE DEFINITIONS
//**************************************************************************
@@ -68,7 +56,6 @@ public:
virtual ~pet_datassette_port_device();
// static configuration helpers
- template <class Object> devcb_base &set_read_handler(Object &&cb) { return m_read_handler.set_callback(std::forward<Object>(cb)); }
auto read_handler() { return m_read_handler.bind(); }
// computer interface
diff --git a/src/devices/bus/pet/exp.h b/src/devices/bus/pet/exp.h
index d44dcea6d19..0ed8b00177b 100644
--- a/src/devices/bus/pet/exp.h
+++ b/src/devices/bus/pet/exp.h
@@ -23,21 +23,6 @@
#define PET_EXPANSION_SLOT_TAG "exp"
-
-//**************************************************************************
-// INTERFACE CONFIGURATION MACROS
-//**************************************************************************
-
-#define MCFG_PET_EXPANSION_SLOT_ADD(_tag, _clock, _slot_intf, _def_slot) \
- MCFG_DEVICE_ADD(_tag, PET_EXPANSION_SLOT, _clock) \
- MCFG_DEVICE_SLOT_INTERFACE(_slot_intf, _def_slot, false)
-
-
-#define MCFG_PET_EXPANSION_SLOT_DMA_CALLBACKS(_read, _write) \
- downcast<pet_expansion_slot_device *>(device)->set_callbacks(DEVCB_##_read, DEVCB_##_write);
-
-
-
//**************************************************************************
// TYPE DEFINITIONS
//**************************************************************************
@@ -63,11 +48,6 @@ public:
pet_expansion_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
virtual ~pet_expansion_slot_device();
- template <class Read, class Write> void set_callbacks(Read &&rd, Write &&wr) {
- m_read_dma.set_callback(std::forward<Read>(rd));
- m_write_dma.set_callback(std::forward<Write>(wr));
- }
-
auto dma_read_callback() { return m_read_dma.bind(); }
auto dma_write_callback() { return m_write_dma.bind(); }
diff --git a/src/devices/bus/plus4/exp.h b/src/devices/bus/plus4/exp.h
index e61755a497e..aa28eaf3b5d 100644
--- a/src/devices/bus/plus4/exp.h
+++ b/src/devices/bus/plus4/exp.h
@@ -49,37 +49,6 @@
#define PLUS4_EXPANSION_SLOT_TAG "exp"
-
-//**************************************************************************
-// INTERFACE CONFIGURATION MACROS
-//**************************************************************************
-
-#define MCFG_PLUS4_EXPANSION_SLOT_ADD(_tag, _clock, _slot_intf, _def_slot) \
- MCFG_DEVICE_ADD(_tag, PLUS4_EXPANSION_SLOT, _clock) \
- MCFG_DEVICE_SLOT_INTERFACE(_slot_intf, _def_slot, false)
-
-#define MCFG_PLUS4_PASSTHRU_EXPANSION_SLOT_ADD() \
- MCFG_PLUS4_EXPANSION_SLOT_ADD(PLUS4_EXPANSION_SLOT_TAG, 0, plus4_expansion_cards, nullptr) \
- MCFG_PLUS4_EXPANSION_SLOT_IRQ_CALLBACK(WRITELINE(DEVICE_SELF_OWNER, plus4_expansion_slot_device, irq_w)) \
- MCFG_PLUS4_EXPANSION_SLOT_CD_INPUT_CALLBACK(READ8(DEVICE_SELF_OWNER, plus4_expansion_slot_device, dma_cd_r)) \
- MCFG_PLUS4_EXPANSION_SLOT_CD_OUTPUT_CALLBACK(WRITE8(DEVICE_SELF_OWNER, plus4_expansion_slot_device, dma_cd_w)) \
- MCFG_PLUS4_EXPANSION_SLOT_AEC_CALLBACK(WRITELINE(DEVICE_SELF_OWNER, plus4_expansion_slot_device, aec_w))
-
-
-#define MCFG_PLUS4_EXPANSION_SLOT_IRQ_CALLBACK(_write) \
- downcast<plus4_expansion_slot_device &>(*device).set_irq_wr_callback(DEVCB_##_write);
-
-#define MCFG_PLUS4_EXPANSION_SLOT_CD_INPUT_CALLBACK(_read) \
- downcast<plus4_expansion_slot_device &>(*device).set_cd_rd_callback(DEVCB_##_read);
-
-#define MCFG_PLUS4_EXPANSION_SLOT_CD_OUTPUT_CALLBACK(_write) \
- downcast<plus4_expansion_slot_device &>(*device).set_cd_wr_callback(DEVCB_##_write);
-
-#define MCFG_PLUS4_EXPANSION_SLOT_AEC_CALLBACK(_write) \
- downcast<plus4_expansion_slot_device &>(*device).set_aec_wr_callback(DEVCB_##_write);
-
-
-
//**************************************************************************
// TYPE DEFINITIONS
//**************************************************************************
diff --git a/src/mame/drivers/apple1.cpp b/src/mame/drivers/apple1.cpp
index a47e4cfa0e3..30df1743e6b 100644
--- a/src/mame/drivers/apple1.cpp
+++ b/src/mame/drivers/apple1.cpp
@@ -611,9 +611,8 @@ MACHINE_CONFIG_START(apple1_state::apple1)
m_pia->writepb_handler().set(FUNC(apple1_state::pia_display_w));
m_pia->cb2_handler().set(FUNC(apple1_state::pia_display_gate_w));
- MCFG_DEVICE_ADD(A1_BUS_TAG, A1BUS, 0)
- MCFG_A1BUS_CPU(m_maincpu)
- MCFG_DEVICE_ADD("exp", A1BUS_SLOT, 0, A1_BUS_TAG, apple1_cards, "cassette")
+ A1BUS(config, A1_BUS_TAG, 0).set_cputag(m_maincpu);
+ A1BUS_SLOT(config, "exp", 0, A1_BUS_TAG, apple1_cards, "cassette");
MCFG_SNAPSHOT_ADD("snapshot", apple1_state, apple1, "snp", 0)