diff options
author | 2019-02-01 18:13:14 +0100 | |
---|---|---|
committer | 2019-02-01 18:13:14 +0100 | |
commit | 7918b8068c8ea1b16fa223061c7c761bb5893537 (patch) | |
tree | 453f60840d893d6afa58842842ce41bb5de4d9b1 /src/devices/bus/newbrain | |
parent | 5bb63697f066a04c3072f6e4bed52a5bb446d7c8 (diff) |
devices\bus: some more MCFG macros removal (nw)
Diffstat (limited to 'src/devices/bus/newbrain')
-rw-r--r-- | src/devices/bus/newbrain/eim.cpp | 7 | ||||
-rw-r--r-- | src/devices/bus/newbrain/exp.h | 21 | ||||
-rw-r--r-- | src/devices/bus/newbrain/fdc.cpp | 13 |
3 files changed, 21 insertions, 20 deletions
diff --git a/src/devices/bus/newbrain/eim.cpp b/src/devices/bus/newbrain/eim.cpp index b3f7cf1a4cc..f28b2af5360 100644 --- a/src/devices/bus/newbrain/eim.cpp +++ b/src/devices/bus/newbrain/eim.cpp @@ -67,7 +67,8 @@ const tiny_rom_entry *newbrain_eim_device::device_rom_region() const // device_add_mconfig - add device configuration //------------------------------------------------- -MACHINE_CONFIG_START(newbrain_eim_device::device_add_mconfig) +void newbrain_eim_device::device_add_mconfig(machine_config &config) +{ // devices Z80CTC(config, m_ctc, XTAL(16'000'000)/8); m_ctc->zc_callback<0>().set(m_acia, FUNC(acia6850_device::write_rxc)); @@ -92,11 +93,11 @@ MACHINE_CONFIG_START(newbrain_eim_device::device_add_mconfig) RS232_PORT(config, RS232_TAG, default_rs232_devices, nullptr); - MCFG_NEWBRAIN_EXPANSION_SLOT_ADD(NEWBRAIN_EXPANSION_SLOT_TAG, XTAL(16'000'000)/8, newbrain_expansion_cards, "fdc") + NEWBRAIN_EXPANSION_SLOT(config, m_exp, XTAL(16'000'000)/8, newbrain_expansion_cards, "fdc"); // internal ram RAM(config, RAM_TAG).set_default_size("96K"); -MACHINE_CONFIG_END +} //************************************************************************** diff --git a/src/devices/bus/newbrain/exp.h b/src/devices/bus/newbrain/exp.h index e3ab89a35ef..26655d76410 100644 --- a/src/devices/bus/newbrain/exp.h +++ b/src/devices/bus/newbrain/exp.h @@ -49,17 +49,6 @@ #define NEWBRAIN_EXPANSION_SLOT_TAG "exp" - -//************************************************************************** -// INTERFACE CONFIGURATION MACROS -//************************************************************************** - -#define MCFG_NEWBRAIN_EXPANSION_SLOT_ADD(_tag, _clock, _slot_intf, _def_slot) \ - MCFG_DEVICE_ADD(_tag, NEWBRAIN_EXPANSION_SLOT, _clock) \ - MCFG_DEVICE_SLOT_INTERFACE(_slot_intf, _def_slot, false) - - - //************************************************************************** // TYPE DEFINITIONS //************************************************************************** @@ -73,6 +62,16 @@ class newbrain_expansion_slot_device : public device_t, { public: // construction/destruction + template <typename T> + newbrain_expansion_slot_device(machine_config const &mconfig, char const *tag, device_t *owner, uint32_t clock, T &&opts, char const *dflt) + : newbrain_expansion_slot_device(mconfig, tag, owner, clock) + { + option_reset(); + opts(*this); + set_default_option(dflt); + set_fixed(false); + } + newbrain_expansion_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); // computer interface diff --git a/src/devices/bus/newbrain/fdc.cpp b/src/devices/bus/newbrain/fdc.cpp index d94a079e4bb..238109153e5 100644 --- a/src/devices/bus/newbrain/fdc.cpp +++ b/src/devices/bus/newbrain/fdc.cpp @@ -104,10 +104,11 @@ static void newbrain_floppies(device_slot_interface &device) // device_add_mconfig - add device configuration //------------------------------------------------- -MACHINE_CONFIG_START(newbrain_fdc_device::device_add_mconfig) - MCFG_DEVICE_ADD(Z80_TAG, Z80, XTAL(4'000'000)) - MCFG_DEVICE_PROGRAM_MAP(newbrain_fdc_mem) - MCFG_DEVICE_IO_MAP(newbrain_fdc_io) +void newbrain_fdc_device::device_add_mconfig(machine_config &config) +{ + Z80(config, m_maincpu, XTAL(4'000'000)); + m_maincpu->set_addrmap(AS_PROGRAM, &newbrain_fdc_device::newbrain_fdc_mem); + m_maincpu->set_addrmap(AS_IO, &newbrain_fdc_device::newbrain_fdc_io); UPD765A(config, m_fdc, 8'000'000, false, true); m_fdc->intrq_wr_callback().set(FUNC(newbrain_fdc_device::fdc_int_w)); @@ -117,8 +118,8 @@ MACHINE_CONFIG_START(newbrain_fdc_device::device_add_mconfig) FLOPPY_CONNECTOR(config, UPD765_TAG ":2", newbrain_floppies, nullptr, floppy_image_device::default_floppy_formats); FLOPPY_CONNECTOR(config, UPD765_TAG ":3", newbrain_floppies, nullptr, floppy_image_device::default_floppy_formats); - MCFG_NEWBRAIN_EXPANSION_SLOT_ADD(NEWBRAIN_EXPANSION_SLOT_TAG, XTAL(16'000'000)/8, newbrain_expansion_cards, nullptr) -MACHINE_CONFIG_END + NEWBRAIN_EXPANSION_SLOT(config, m_exp, XTAL(16'000'000)/8, newbrain_expansion_cards, nullptr); +} //************************************************************************** |