diff options
Diffstat (limited to 'src/devices/bus/coco/dragon_fdc.cpp')
-rw-r--r-- | src/devices/bus/coco/dragon_fdc.cpp | 56 |
1 files changed, 23 insertions, 33 deletions
diff --git a/src/devices/bus/coco/dragon_fdc.cpp b/src/devices/bus/coco/dragon_fdc.cpp index 9ca1758b887..9f644d088fb 100644 --- a/src/devices/bus/coco/dragon_fdc.cpp +++ b/src/devices/bus/coco/dragon_fdc.cpp @@ -82,8 +82,6 @@ ***************************************************************************/ #define LOG_FDC 0 -#define WD2791_TAG "wd2791" -#define WD2797_TAG "wd2797" @@ -146,36 +144,28 @@ static void dragon_fdc_drives(device_slot_interface &device) } -MACHINE_CONFIG_START(dragon_fdc_device_base::device_add_mconfig) - MCFG_DEVICE_ADD(WD2797_TAG, WD2797, 4_MHz_XTAL / 4) - MCFG_WD_FDC_INTRQ_CALLBACK(WRITELINE(*this, dragon_fdc_device_base, fdc_intrq_w)) - MCFG_WD_FDC_DRQ_CALLBACK(WRITELINE(*this, dragon_fdc_device_base, fdc_drq_w)) - MCFG_WD_FDC_FORCE_READY - - MCFG_FLOPPY_DRIVE_ADD(WD2797_TAG ":0", dragon_fdc_drives, "qd", dragon_fdc_device_base::floppy_formats) - MCFG_FLOPPY_DRIVE_SOUND(true) - MCFG_FLOPPY_DRIVE_ADD(WD2797_TAG ":1", dragon_fdc_drives, "qd", dragon_fdc_device_base::floppy_formats) - MCFG_FLOPPY_DRIVE_SOUND(true) - MCFG_FLOPPY_DRIVE_ADD(WD2797_TAG ":2", dragon_fdc_drives, "", dragon_fdc_device_base::floppy_formats) - MCFG_FLOPPY_DRIVE_SOUND(true) - MCFG_FLOPPY_DRIVE_ADD(WD2797_TAG ":3", dragon_fdc_drives, "", dragon_fdc_device_base::floppy_formats) - MCFG_FLOPPY_DRIVE_SOUND(true) -MACHINE_CONFIG_END +void dragon_fdc_device_base::device_add_mconfig(machine_config &config) +{ + WD2797(config, m_wd2797, 4_MHz_XTAL / 4).set_force_ready(true); + m_wd2797->intrq_wr_callback().set(FUNC(dragon_fdc_device_base::fdc_intrq_w)); + m_wd2797->drq_wr_callback().set(FUNC(dragon_fdc_device_base::fdc_drq_w)); + + FLOPPY_CONNECTOR(config, m_floppies[0], dragon_fdc_drives, "qd", dragon_fdc_device_base::floppy_formats).enable_sound(true); + FLOPPY_CONNECTOR(config, m_floppies[1], dragon_fdc_drives, "qd", dragon_fdc_device_base::floppy_formats).enable_sound(true); + FLOPPY_CONNECTOR(config, m_floppies[2], dragon_fdc_drives, "", dragon_fdc_device_base::floppy_formats).enable_sound(true); + FLOPPY_CONNECTOR(config, m_floppies[3], dragon_fdc_drives, "", dragon_fdc_device_base::floppy_formats).enable_sound(true); +} -MACHINE_CONFIG_START(premier_fdc_device_base::device_add_mconfig) - MCFG_DEVICE_ADD(WD2791_TAG, WD2791, 2_MHz_XTAL / 2) - MCFG_WD_FDC_FORCE_READY +void premier_fdc_device_base::device_add_mconfig(machine_config &config) +{ + WD2791(config, m_wd2791, 2_MHz_XTAL / 2).set_force_ready(true); - MCFG_FLOPPY_DRIVE_ADD(WD2791_TAG ":0", dragon_fdc_drives, "qd", dragon_fdc_device_base::floppy_formats) - MCFG_FLOPPY_DRIVE_SOUND(true) - MCFG_FLOPPY_DRIVE_ADD(WD2791_TAG ":1", dragon_fdc_drives, "qd", dragon_fdc_device_base::floppy_formats) - MCFG_FLOPPY_DRIVE_SOUND(true) - MCFG_FLOPPY_DRIVE_ADD(WD2791_TAG ":2", dragon_fdc_drives, "", dragon_fdc_device_base::floppy_formats) - MCFG_FLOPPY_DRIVE_SOUND(true) - MCFG_FLOPPY_DRIVE_ADD(WD2791_TAG ":3", dragon_fdc_drives, "", dragon_fdc_device_base::floppy_formats) - MCFG_FLOPPY_DRIVE_SOUND(true) -MACHINE_CONFIG_END + FLOPPY_CONNECTOR(config, m_floppies[0], dragon_fdc_drives, "qd", dragon_fdc_device_base::floppy_formats).enable_sound(true); + FLOPPY_CONNECTOR(config, m_floppies[1], dragon_fdc_drives, "qd", dragon_fdc_device_base::floppy_formats).enable_sound(true); + FLOPPY_CONNECTOR(config, m_floppies[2], dragon_fdc_drives, "", dragon_fdc_device_base::floppy_formats).enable_sound(true); + FLOPPY_CONNECTOR(config, m_floppies[3], dragon_fdc_drives, "", dragon_fdc_device_base::floppy_formats).enable_sound(true); +} //************************************************************************** @@ -187,16 +177,16 @@ MACHINE_CONFIG_END //------------------------------------------------- dragon_fdc_device_base::dragon_fdc_device_base(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) : coco_family_fdc_device_base(mconfig, type, tag, owner, clock) - , m_wd2797(*this, WD2797_TAG) - , m_floppies(*this, WD2797_TAG ":%u", 0) + , m_wd2797(*this, "wd2797") + , m_floppies(*this, "wd2797:%u", 0) { } premier_fdc_device_base::premier_fdc_device_base(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) : coco_family_fdc_device_base(mconfig, type, tag, owner, clock) - , m_wd2791(*this, WD2791_TAG) - , m_floppies(*this, WD2791_TAG ":%u", 0) + , m_wd2791(*this, "wd2791") + , m_floppies(*this, "wd2791:%u", 0) { } |