diff options
| author | 2018-09-28 19:04:34 +0200 | |
|---|---|---|
| committer | 2018-09-28 19:04:34 +0200 | |
| commit | f211cf034303a495cc07e7d01b6ed38bf098545b (patch) | |
| tree | 4c71262efd887b9082557fb7ff60ad05a290a217 /src/devices/machine/pdc.cpp | |
| parent | fff30faa4f965b1b87dfe0012532a17d7eccb436 (diff) | |
pc_lpt, upd765: removed MCFG macros (nw)
Diffstat (limited to 'src/devices/machine/pdc.cpp')
| -rw-r--r-- | src/devices/machine/pdc.cpp | 23 |
1 files changed, 12 insertions, 11 deletions
diff --git a/src/devices/machine/pdc.cpp b/src/devices/machine/pdc.cpp index deccddb7869..0c21778fc14 100644 --- a/src/devices/machine/pdc.cpp +++ b/src/devices/machine/pdc.cpp @@ -157,9 +157,9 @@ void pdc_device::pdc_io(address_map &map) map(0x3c, 0x3c).portr("SW2").mirror(0xFF00); /* FDC Dipswitch */ map(0x3d, 0x3d).portr("SW1").mirror(0xFF00); /* HDC Dipswitch */ map(0x40, 0x41).rw(HDC_TAG, FUNC(hdc9224_device::read), FUNC(hdc9224_device::write)).mirror(0xFF00); - map(0x42, 0x43).m(FDC_TAG, FUNC(upd765a_device::map)).mirror(0xFF00); + map(0x42, 0x43).m(m_fdc, FUNC(upd765a_device::map)).mirror(0xFF00); map(0x50, 0x5f).w(FUNC(pdc_device::p50_5f_w)).mirror(0xFF00); - map(0x60, 0x6f).rw(FDCDMA_TAG, FUNC(am9517a_device::read), FUNC(am9517a_device::write)).mirror(0xFF00); + map(0x60, 0x6f).rw(m_dma8237, FUNC(am9517a_device::read), FUNC(am9517a_device::write)).mirror(0xFF00); } //------------------------------------------------- @@ -255,20 +255,21 @@ FLOPPY_FORMATS_END // device_add_mconfig - add device configuration //------------------------------------------------- -MACHINE_CONFIG_START(pdc_device::device_add_mconfig) +void pdc_device::device_add_mconfig(machine_config &config) +{ /* CPU - Zilog Z0840006PSC */ - MCFG_DEVICE_ADD(Z80_TAG, Z80, XTAL(10'000'000) / 2) - MCFG_DEVICE_PROGRAM_MAP(pdc_mem) - MCFG_DEVICE_IO_MAP(pdc_io) + Z80(config, m_pdccpu, XTAL(10'000'000) / 2); + m_pdccpu->set_addrmap(AS_PROGRAM, pdc_device::pdc_mem); + m_pdccpu->set_addrmap(AS_IO, pdc_device::pdc_io); //MCFG_QUANTUM_PERFECT_CPU(M6502_TAG) /* Floppy Disk Controller - uPD765a - NEC D765AC-2 */ - MCFG_UPD765A_ADD(FDC_TAG, true, true) - MCFG_UPD765_INTRQ_CALLBACK(WRITELINE(*this, pdc_device, fdc_irq)) - MCFG_UPD765_DRQ_CALLBACK(WRITELINE(FDCDMA_TAG, am9517a_device, dreq0_w)) //MCFG_DEVCB_INVERT + UPD765A(config, m_fdc, true, true); + m_fdc->intrq_wr_callback().set(FUNC(pdc_device::fdc_irq)); + m_fdc->drq_wr_callback().set(m_dma8237, FUNC(am9517a_device::dreq0_w)); //.invert(); // Floppy disk drive - MCFG_FLOPPY_DRIVE_ADD(FDC_TAG":0", pdc_floppies, "35hd", pdc_device::floppy_formats) + FLOPPY_CONNECTOR(config, FDC_TAG":0", pdc_floppies, "35hd", pdc_device::floppy_formats); /* DMA Controller - Intel P8237A-5 */ /* Channel 0: uPD765a Floppy Disk Controller */ @@ -288,7 +289,7 @@ MACHINE_CONFIG_START(pdc_device::device_add_mconfig) HDC9224(config, HDC_TAG, 0); MFM_HD_CONNECTOR(config, "h1", pdc_harddisks, nullptr, MFM_BYTE, 3000, 20, MFMHD_GEN_FORMAT); -MACHINE_CONFIG_END +} ioport_constructor pdc_device::device_input_ports() const { |
