summaryrefslogtreecommitdiffstats
path: root/src/devices/bus/ieee488
diff options
context:
space:
mode:
Diffstat (limited to 'src/devices/bus/ieee488')
-rw-r--r--src/devices/bus/ieee488/c2040fdc.h6
-rw-r--r--src/devices/bus/ieee488/c8050.cpp187
-rw-r--r--src/devices/bus/ieee488/c8050fdc.h26
-rw-r--r--src/devices/bus/ieee488/hp9895.cpp25
-rw-r--r--src/devices/bus/ieee488/ieee488.h18
5 files changed, 122 insertions, 140 deletions
diff --git a/src/devices/bus/ieee488/c2040fdc.h b/src/devices/bus/ieee488/c2040fdc.h
index 1c552c1c508..7e27f1f1b81 100644
--- a/src/devices/bus/ieee488/c2040fdc.h
+++ b/src/devices/bus/ieee488/c2040fdc.h
@@ -24,13 +24,13 @@
//**************************************************************************
#define MCFG_C2040_SYNC_CALLBACK(_write) \
- devcb = &downcast<c2040_fdc_device &>(*device).set_sync_wr_callback(DEVCB_##_write);
+ downcast<c2040_fdc_device &>(*device).set_sync_wr_callback(DEVCB_##_write);
#define MCFG_C2040_READY_CALLBACK(_write) \
- devcb = &downcast<c2040_fdc_device &>(*device).set_ready_wr_callback(DEVCB_##_write);
+ downcast<c2040_fdc_device &>(*device).set_ready_wr_callback(DEVCB_##_write);
#define MCFG_C2040_ERROR_CALLBACK(_write) \
- devcb = &downcast<c2040_fdc_device &>(*device).set_error_wr_callback(DEVCB_##_write);
+ downcast<c2040_fdc_device &>(*device).set_error_wr_callback(DEVCB_##_write);
diff --git a/src/devices/bus/ieee488/c8050.cpp b/src/devices/bus/ieee488/c8050.cpp
index ca9ae2cfa2d..94d8e9a89dc 100644
--- a/src/devices/bus/ieee488/c8050.cpp
+++ b/src/devices/bus/ieee488/c8050.cpp
@@ -35,7 +35,6 @@
#define M6532_0_TAG "uc1"
#define M6532_1_TAG "ue1"
#define M6504_TAG "uh3"
-#define M6522_TAG "um3"
#define M6530_TAG "uk3"
#define FDC_TAG "fdc"
@@ -207,14 +206,14 @@ void c8050_device::c8050_main_mem(address_map &map)
void c8050_device::c8050_fdc_mem(address_map &map)
{
map.global_mask(0x1fff);
- map(0x0000, 0x003f).mirror(0x0300).m(M6530_TAG, FUNC(mos6530_new_device::ram_map));
- map(0x0040, 0x004f).mirror(0x0330).m(M6522_TAG, FUNC(via6522_device::map));
- map(0x0080, 0x008f).mirror(0x0330).m(M6530_TAG, FUNC(mos6530_new_device::io_map));
+ map(0x0000, 0x003f).mirror(0x0300).m(m_miot, FUNC(mos6530_new_device::ram_map));
+ map(0x0040, 0x004f).mirror(0x0330).m(m_via, FUNC(via6522_device::map));
+ map(0x0080, 0x008f).mirror(0x0330).m(m_miot, FUNC(mos6530_new_device::io_map));
map(0x0400, 0x07ff).ram().share("share1");
map(0x0800, 0x0bff).ram().share("share2");
map(0x0c00, 0x0fff).ram().share("share3");
map(0x1000, 0x13ff).ram().share("share4");
- map(0x1c00, 0x1fff).m(M6530_TAG, FUNC(mos6530_new_device::rom_map));
+ map(0x1c00, 0x1fff).m(m_miot, FUNC(mos6530_new_device::rom_map));
}
@@ -225,9 +224,9 @@ void c8050_device::c8050_fdc_mem(address_map &map)
void c8050_device::c8250lp_fdc_mem(address_map &map)
{
map.global_mask(0x1fff);
- map(0x0000, 0x003f).mirror(0x0300).m(M6530_TAG, FUNC(mos6530_new_device::ram_map));
- map(0x0040, 0x004f).mirror(0x0330).m(M6522_TAG, FUNC(via6522_device::map));
- map(0x0080, 0x008f).mirror(0x0330).m(M6530_TAG, FUNC(mos6530_new_device::io_map));
+ map(0x0000, 0x003f).mirror(0x0300).m(m_miot, FUNC(mos6530_new_device::ram_map));
+ map(0x0040, 0x004f).mirror(0x0330).m(m_via, FUNC(via6522_device::map));
+ map(0x0080, 0x008f).mirror(0x0330).m(m_miot, FUNC(mos6530_new_device::io_map));
map(0x0400, 0x07ff).ram().share("share1");
map(0x0800, 0x0bff).ram().share("share2");
map(0x0c00, 0x0fff).ram().share("share3");
@@ -243,9 +242,9 @@ void c8050_device::c8250lp_fdc_mem(address_map &map)
void c8050_device::sfd1001_fdc_mem(address_map &map)
{
map.global_mask(0x1fff);
- map(0x0000, 0x003f).mirror(0x0300).m(M6530_TAG, FUNC(mos6530_new_device::ram_map));
- map(0x0040, 0x004f).mirror(0x0330).m(M6522_TAG, FUNC(via6522_device::map));
- map(0x0080, 0x008f).mirror(0x0330).m(M6530_TAG, FUNC(mos6530_new_device::io_map));
+ map(0x0000, 0x003f).mirror(0x0300).m(m_miot, FUNC(mos6530_new_device::ram_map));
+ map(0x0040, 0x004f).mirror(0x0330).m(m_via, FUNC(via6522_device::map));
+ map(0x0080, 0x008f).mirror(0x0330).m(m_miot, FUNC(mos6530_new_device::io_map));
map(0x0400, 0x07ff).ram().share("share1");
map(0x0800, 0x0bff).ram().share("share2");
map(0x0c00, 0x0fff).ram().share("share3");
@@ -550,29 +549,29 @@ MACHINE_CONFIG_START(c8050_device::device_add_mconfig)
MCFG_MOS6530n_IRQ_CB(INPUTLINE(M6502_TAG, INPUT_LINE_IRQ0))
// controller
- MCFG_DEVICE_ADD(M6504_TAG, M6504, XTAL(12'000'000)/12)
+ MCFG_DEVICE_ADD(m_fdccpu, M6504, XTAL(12'000'000)/12)
MCFG_DEVICE_PROGRAM_MAP(c8050_fdc_mem)
- MCFG_DEVICE_ADD(M6522_TAG, VIA6522, XTAL(12'000'000)/12)
- MCFG_VIA6522_READPA_HANDLER(READ8(FDC_TAG, c8050_fdc_device, read))
+ MCFG_DEVICE_ADD(m_via, VIA6522, XTAL(12'000'000)/12)
+ MCFG_VIA6522_READPA_HANDLER(READ8(m_fdc, c8050_fdc_device, read))
MCFG_VIA6522_WRITEPB_HANDLER(WRITE8(*this, c8050_device, via_pb_w))
- MCFG_VIA6522_CA2_HANDLER(WRITELINE(FDC_TAG, c8050_fdc_device, mode_sel_w))
- MCFG_VIA6522_CB2_HANDLER(WRITELINE(FDC_TAG, c8050_fdc_device, rw_sel_w))
-
- MCFG_DEVICE_ADD(M6530_TAG, MOS6530_NEW, XTAL(12'000'000)/12)
- MCFG_MOS6530n_OUT_PA_CB(WRITE8(FDC_TAG, c8050_fdc_device, write))
- MCFG_MOS6530n_OUT_PB0_CB(WRITELINE(FDC_TAG, c8050_fdc_device, drv_sel_w))
- MCFG_MOS6530n_OUT_PB1_CB(WRITELINE(FDC_TAG, c8050_fdc_device, ds0_w))
- MCFG_MOS6530n_OUT_PB2_CB(WRITELINE(FDC_TAG, c8050_fdc_device, ds1_w))
- MCFG_MOS6530n_IN_PB3_CB(READLINE(FDC_TAG, c8050_fdc_device, wps_r))
- MCFG_MOS6530n_IN_PB6_CB(VCC) // SINGLE SIDED
- MCFG_MOS6530n_OUT_PB7_CB(INPUTLINE(M6504_TAG, M6502_IRQ_LINE))
-
- MCFG_DEVICE_ADD(FDC_TAG, C8050_FDC, XTAL(12'000'000)/2)
- MCFG_C8050_SYNC_CALLBACK(WRITELINE(M6522_TAG, via6522_device, write_pb7))
- MCFG_C8050_READY_CALLBACK(WRITELINE(M6522_TAG, via6522_device, write_ca1))
- MCFG_C8050_BRDY_CALLBACK(INPUTLINE(M6504_TAG, M6502_SET_OVERFLOW)) MCFG_DEVCB_XOR(1)
- MCFG_C8050_ERROR_CALLBACK(WRITELINE(M6522_TAG, via6522_device, write_cb1))
+ MCFG_VIA6522_CA2_HANDLER(WRITELINE(m_fdc, c8050_fdc_device, mode_sel_w))
+ MCFG_VIA6522_CB2_HANDLER(WRITELINE(m_fdc, c8050_fdc_device, rw_sel_w))
+
+ MOS6530_NEW(config, m_miot, XTAL(12'000'000)/12);
+ m_miot->pa_wr_callback().set(m_fdc, FUNC(c8050_fdc_device::write));
+ m_miot->pb_wr_callback<0>().set(m_fdc, FUNC(c8050_fdc_device::drv_sel_w));
+ m_miot->pb_wr_callback<1>().set(m_fdc, FUNC(c8050_fdc_device::ds0_w));
+ m_miot->pb_wr_callback<2>().set(m_fdc, FUNC(c8050_fdc_device::ds1_w));
+ m_miot->pb_rd_callback<3>().set(m_fdc, FUNC(c8050_fdc_device::wps_r));
+ m_miot->pb_rd_callback<6>().set_constant(1); // SINGLE SIDED
+ m_miot->pb_wr_callback<7>().set_inputline(m_fdccpu, M6502_IRQ_LINE);
+
+ C8050_FDC(config, m_fdc, XTAL(12'000'000)/2);
+ m_fdc->sync_wr_callback().set(m_via, FUNC(via6522_device::write_pb7));
+ m_fdc->ready_wr_callback().set(m_via, FUNC(via6522_device::write_ca1));
+ m_fdc->brdy_wr_callback().set_inputline(m_fdccpu, M6502_SET_OVERFLOW).invert();
+ m_fdc->error_wr_callback().set(m_via, FUNC(via6522_device::write_cb1));
MCFG_FLOPPY_DRIVE_ADD(FDC_TAG ":0", c8050_floppies, "525ssqd", c8050_device::floppy_formats)
MCFG_FLOPPY_DRIVE_ADD(FDC_TAG ":1", c8050_floppies, "525ssqd", c8050_device::floppy_formats)
MACHINE_CONFIG_END
@@ -595,30 +594,30 @@ MACHINE_CONFIG_START(c8250_device::device_add_mconfig)
MCFG_MOS6530n_IRQ_CB(INPUTLINE(M6502_TAG, INPUT_LINE_IRQ0))
// controller
- MCFG_DEVICE_ADD(M6504_TAG, M6504, XTAL(12'000'000)/12)
+ MCFG_DEVICE_ADD(m_fdccpu, M6504, XTAL(12'000'000)/12)
MCFG_DEVICE_PROGRAM_MAP(c8050_fdc_mem)
- MCFG_DEVICE_ADD(M6522_TAG, VIA6522, XTAL(12'000'000)/12)
- MCFG_VIA6522_READPA_HANDLER(READ8(FDC_TAG, c8050_fdc_device, read))
+ MCFG_DEVICE_ADD(m_via, VIA6522, XTAL(12'000'000)/12)
+ MCFG_VIA6522_READPA_HANDLER(READ8(m_fdc, c8050_fdc_device, read))
MCFG_VIA6522_WRITEPB_HANDLER(WRITE8(*this, c8050_device, via_pb_w))
- MCFG_VIA6522_CA2_HANDLER(WRITELINE(FDC_TAG, c8050_fdc_device, mode_sel_w))
- MCFG_VIA6522_CB2_HANDLER(WRITELINE(FDC_TAG, c8050_fdc_device, rw_sel_w))
-
- MCFG_DEVICE_ADD(M6530_TAG, MOS6530_NEW, XTAL(12'000'000)/12)
- MCFG_MOS6530n_OUT_PA_CB(WRITE8(FDC_TAG, c8050_fdc_device, write))
- MCFG_MOS6530n_OUT_PB0_CB(WRITELINE(FDC_TAG, c8050_fdc_device, drv_sel_w))
- MCFG_MOS6530n_OUT_PB1_CB(WRITELINE(FDC_TAG, c8050_fdc_device, ds0_w))
- MCFG_MOS6530n_OUT_PB2_CB(WRITELINE(FDC_TAG, c8050_fdc_device, ds1_w))
- MCFG_MOS6530n_IN_PB3_CB(READLINE(FDC_TAG, c8050_fdc_device, wps_r))
- MCFG_MOS6530n_OUT_PB4_CB(WRITELINE(FDC_TAG, c8050_fdc_device, odd_hd_w))
- MCFG_MOS6530n_IN_PB6_CB(GND) // DOUBLE SIDED
- MCFG_MOS6530n_OUT_PB7_CB(INPUTLINE(M6504_TAG, M6502_IRQ_LINE))
-
- MCFG_DEVICE_ADD(FDC_TAG, C8050_FDC, XTAL(12'000'000)/2)
- MCFG_C8050_SYNC_CALLBACK(WRITELINE(M6522_TAG, via6522_device, write_pb7))
- MCFG_C8050_READY_CALLBACK(WRITELINE(M6522_TAG, via6522_device, write_ca1))
- MCFG_C8050_BRDY_CALLBACK(INPUTLINE(M6504_TAG, M6502_SET_OVERFLOW)) MCFG_DEVCB_XOR(1)
- MCFG_C8050_ERROR_CALLBACK(WRITELINE(M6522_TAG, via6522_device, write_cb1))
+ MCFG_VIA6522_CA2_HANDLER(WRITELINE(m_fdc, c8050_fdc_device, mode_sel_w))
+ MCFG_VIA6522_CB2_HANDLER(WRITELINE(m_fdc, c8050_fdc_device, rw_sel_w))
+
+ MOS6530_NEW(config, m_miot, XTAL(12'000'000)/12);
+ m_miot->pa_wr_callback().set(m_fdc, FUNC(c8050_fdc_device::write));
+ m_miot->pb_wr_callback<0>().set(m_fdc, FUNC(c8050_fdc_device::drv_sel_w));
+ m_miot->pb_wr_callback<1>().set(m_fdc, FUNC(c8050_fdc_device::ds0_w));
+ m_miot->pb_wr_callback<2>().set(m_fdc, FUNC(c8050_fdc_device::ds1_w));
+ m_miot->pb_rd_callback<3>().set(m_fdc, FUNC(c8050_fdc_device::wps_r));
+ m_miot->pb_wr_callback<4>().set(m_fdc, FUNC(c8050_fdc_device::odd_hd_w));
+ m_miot->pb_rd_callback<6>().set_constant(0); // DOUBLE SIDED
+ m_miot->pb_wr_callback<7>().set_inputline(m_fdccpu, M6502_IRQ_LINE);
+
+ C8050_FDC(config, m_fdc, XTAL(12'000'000)/2);
+ m_fdc->sync_wr_callback().set(m_via, FUNC(via6522_device::write_pb7));
+ m_fdc->ready_wr_callback().set(m_via, FUNC(via6522_device::write_ca1));
+ m_fdc->brdy_wr_callback().set_inputline(m_fdccpu, M6502_SET_OVERFLOW).invert();
+ m_fdc->error_wr_callback().set(m_via, FUNC(via6522_device::write_cb1));
MCFG_FLOPPY_DRIVE_ADD(FDC_TAG ":0", c8250_floppies, "525qd", c8250_device::floppy_formats)
MCFG_FLOPPY_DRIVE_ADD(FDC_TAG ":1", c8250_floppies, "525qd", c8250_device::floppy_formats)
MACHINE_CONFIG_END
@@ -641,30 +640,30 @@ MACHINE_CONFIG_START(c8250lp_device::device_add_mconfig)
MCFG_MOS6530n_IRQ_CB(INPUTLINE(M6502_TAG, INPUT_LINE_IRQ0))
// controller
- MCFG_DEVICE_ADD(M6504_TAG, M6504, XTAL(12'000'000)/12)
+ MCFG_DEVICE_ADD(m_fdccpu, M6504, XTAL(12'000'000)/12)
MCFG_DEVICE_PROGRAM_MAP(c8250lp_fdc_mem)
- MCFG_DEVICE_ADD(M6522_TAG, VIA6522, XTAL(12'000'000)/12)
- MCFG_VIA6522_READPA_HANDLER(READ8(FDC_TAG, c8050_fdc_device, read))
+ MCFG_DEVICE_ADD(m_via, VIA6522, XTAL(12'000'000)/12)
+ MCFG_VIA6522_READPA_HANDLER(READ8(m_fdc, c8050_fdc_device, read))
MCFG_VIA6522_WRITEPB_HANDLER(WRITE8(*this, c8050_device, via_pb_w))
- MCFG_VIA6522_CA2_HANDLER(WRITELINE(FDC_TAG, c8050_fdc_device, mode_sel_w))
- MCFG_VIA6522_CB2_HANDLER(WRITELINE(FDC_TAG, c8050_fdc_device, rw_sel_w))
-
- MCFG_DEVICE_ADD(M6530_TAG, MOS6530_NEW, XTAL(12'000'000)/12)
- MCFG_MOS6530n_OUT_PA_CB(WRITE8(FDC_TAG, c8050_fdc_device, write))
- MCFG_MOS6530n_OUT_PB0_CB(WRITELINE(FDC_TAG, c8050_fdc_device, drv_sel_w))
- MCFG_MOS6530n_OUT_PB1_CB(WRITELINE(FDC_TAG, c8050_fdc_device, ds0_w))
- MCFG_MOS6530n_OUT_PB2_CB(WRITELINE(FDC_TAG, c8050_fdc_device, ds1_w))
- MCFG_MOS6530n_IN_PB3_CB(READLINE(FDC_TAG, c8050_fdc_device, wps_r))
- MCFG_MOS6530n_OUT_PB4_CB(WRITELINE(FDC_TAG, c8050_fdc_device, odd_hd_w))
- MCFG_MOS6530n_IN_PB6_CB(GND) // DOUBLE SIDED
- MCFG_MOS6530n_OUT_PB7_CB(INPUTLINE(M6504_TAG, M6502_IRQ_LINE))
-
- MCFG_DEVICE_ADD(FDC_TAG, C8050_FDC, XTAL(12'000'000)/2)
- MCFG_C8050_SYNC_CALLBACK(WRITELINE(M6522_TAG, via6522_device, write_pb7))
- MCFG_C8050_READY_CALLBACK(WRITELINE(M6522_TAG, via6522_device, write_ca1))
- MCFG_C8050_BRDY_CALLBACK(INPUTLINE(M6504_TAG, M6502_SET_OVERFLOW)) MCFG_DEVCB_XOR(1)
- MCFG_C8050_ERROR_CALLBACK(WRITELINE(M6522_TAG, via6522_device, write_cb1))
+ MCFG_VIA6522_CA2_HANDLER(WRITELINE(m_fdc, c8050_fdc_device, mode_sel_w))
+ MCFG_VIA6522_CB2_HANDLER(WRITELINE(m_fdc, c8050_fdc_device, rw_sel_w))
+
+ MOS6530_NEW(config, m_miot, XTAL(12'000'000)/12);
+ m_miot->pa_wr_callback().set(m_fdc, FUNC(c8050_fdc_device::write));
+ m_miot->pb_wr_callback<0>().set(m_fdc, FUNC(c8050_fdc_device::drv_sel_w));
+ m_miot->pb_wr_callback<1>().set(m_fdc, FUNC(c8050_fdc_device::ds0_w));
+ m_miot->pb_wr_callback<2>().set(m_fdc, FUNC(c8050_fdc_device::ds1_w));
+ m_miot->pb_rd_callback<3>().set(m_fdc, FUNC(c8050_fdc_device::wps_r));
+ m_miot->pb_wr_callback<4>().set(m_fdc, FUNC(c8050_fdc_device::odd_hd_w));
+ m_miot->pb_rd_callback<6>().set_constant(0); // DOUBLE SIDED
+ m_miot->pb_wr_callback<7>().set_inputline(m_fdccpu, M6502_IRQ_LINE);
+
+ C8050_FDC(config, m_fdc, XTAL(12'000'000)/2);
+ m_fdc->sync_wr_callback().set(m_via, FUNC(via6522_device::write_pb7));
+ m_fdc->ready_wr_callback().set(m_via, FUNC(via6522_device::write_ca1));
+ m_fdc->brdy_wr_callback().set_inputline(m_fdccpu, M6502_SET_OVERFLOW).invert();
+ m_fdc->error_wr_callback().set(m_via, FUNC(via6522_device::write_cb1));
MCFG_FLOPPY_DRIVE_ADD(FDC_TAG ":0", c8250_floppies, "525qd", c8250lp_device::floppy_formats)
MCFG_FLOPPY_DRIVE_ADD(FDC_TAG ":1", c8250_floppies, "525qd", c8250lp_device::floppy_formats)
MACHINE_CONFIG_END
@@ -687,29 +686,29 @@ MACHINE_CONFIG_START(sfd1001_device::device_add_mconfig)
MCFG_MOS6530n_IRQ_CB(INPUTLINE(M6502_TAG, INPUT_LINE_IRQ0))
// controller
- MCFG_DEVICE_ADD(M6504_TAG, M6504, XTAL(12'000'000)/12)
+ MCFG_DEVICE_ADD(m_fdccpu, M6504, XTAL(12'000'000)/12)
MCFG_DEVICE_PROGRAM_MAP(sfd1001_fdc_mem)
- MCFG_DEVICE_ADD(M6522_TAG, VIA6522, XTAL(12'000'000)/12)
- MCFG_VIA6522_READPA_HANDLER(READ8(FDC_TAG, c8050_fdc_device, read))
+ MCFG_DEVICE_ADD(m_via, VIA6522, XTAL(12'000'000)/12)
+ MCFG_VIA6522_READPA_HANDLER(READ8(m_fdc, c8050_fdc_device, read))
MCFG_VIA6522_WRITEPB_HANDLER(WRITE8(*this, c8050_device, via_pb_w))
- MCFG_VIA6522_CA2_HANDLER(WRITELINE(FDC_TAG, c8050_fdc_device, mode_sel_w))
- MCFG_VIA6522_CB2_HANDLER(WRITELINE(FDC_TAG, c8050_fdc_device, rw_sel_w))
-
- MCFG_DEVICE_ADD(M6530_TAG, MOS6530_NEW, XTAL(12'000'000)/12)
- MCFG_MOS6530n_OUT_PA_CB(WRITE8(FDC_TAG, c8050_fdc_device, write))
- MCFG_MOS6530n_OUT_PB1_CB(WRITELINE(FDC_TAG, c8050_fdc_device, ds0_w))
- MCFG_MOS6530n_OUT_PB2_CB(WRITELINE(FDC_TAG, c8050_fdc_device, ds1_w))
- MCFG_MOS6530n_IN_PB3_CB(READLINE(FDC_TAG, c8050_fdc_device, wps_r))
- MCFG_MOS6530n_OUT_PB4_CB(WRITELINE(FDC_TAG, c8050_fdc_device, odd_hd_w))
- MCFG_MOS6530n_IN_PB6_CB(GND) // DOUBLE SIDED
- MCFG_MOS6530n_OUT_PB7_CB(INPUTLINE(M6504_TAG, M6502_IRQ_LINE))
-
- MCFG_DEVICE_ADD(FDC_TAG, C8050_FDC, XTAL(12'000'000)/2)
- MCFG_C8050_SYNC_CALLBACK(WRITELINE(M6522_TAG, via6522_device, write_pb7))
- MCFG_C8050_READY_CALLBACK(WRITELINE(M6522_TAG, via6522_device, write_ca1))
- MCFG_C8050_BRDY_CALLBACK(INPUTLINE(M6504_TAG, M6502_SET_OVERFLOW)) MCFG_DEVCB_XOR(1)
- MCFG_C8050_ERROR_CALLBACK(WRITELINE(M6522_TAG, via6522_device, write_cb1))
+ MCFG_VIA6522_CA2_HANDLER(WRITELINE(m_fdc, c8050_fdc_device, mode_sel_w))
+ MCFG_VIA6522_CB2_HANDLER(WRITELINE(m_fdc, c8050_fdc_device, rw_sel_w))
+
+ MOS6530_NEW(config, m_miot, XTAL(12'000'000)/12);
+ m_miot->pa_wr_callback().set(m_fdc, FUNC(c8050_fdc_device::write));
+ m_miot->pb_wr_callback<1>().set(m_fdc, FUNC(c8050_fdc_device::ds0_w));
+ m_miot->pb_wr_callback<2>().set(m_fdc, FUNC(c8050_fdc_device::ds1_w));
+ m_miot->pb_rd_callback<3>().set(m_fdc, FUNC(c8050_fdc_device::wps_r));
+ m_miot->pb_wr_callback<4>().set(m_fdc, FUNC(c8050_fdc_device::odd_hd_w));
+ m_miot->pb_rd_callback<6>().set_constant(0); // DOUBLE SIDED
+ m_miot->pb_wr_callback<7>().set_inputline(m_fdccpu, M6502_IRQ_LINE);
+
+ C8050_FDC(config, m_fdc, XTAL(12'000'000)/2);
+ m_fdc->sync_wr_callback().set(m_via, FUNC(via6522_device::write_pb7));
+ m_fdc->ready_wr_callback().set(m_via, FUNC(via6522_device::write_ca1));
+ m_fdc->brdy_wr_callback().set_inputline(m_fdccpu, M6502_SET_OVERFLOW).invert();
+ m_fdc->error_wr_callback().set(m_via, FUNC(via6522_device::write_cb1));
MCFG_FLOPPY_DRIVE_ADD(FDC_TAG ":0", sfd1001_floppies, "525qd", sfd1001_device::floppy_formats)
MACHINE_CONFIG_END
@@ -779,7 +778,7 @@ c8050_device::c8050_device(const machine_config &mconfig, device_type type, cons
m_riot0(*this, M6532_0_TAG),
m_riot1(*this, M6532_1_TAG),
m_miot(*this, M6530_TAG),
- m_via(*this, M6522_TAG),
+ m_via(*this, "um3"),
m_floppy0(*this, FDC_TAG ":0"),
m_floppy1(*this, FDC_TAG ":1"),
m_fdc(*this, FDC_TAG),
diff --git a/src/devices/bus/ieee488/c8050fdc.h b/src/devices/bus/ieee488/c8050fdc.h
index 9bae3891284..2f75511b817 100644
--- a/src/devices/bus/ieee488/c8050fdc.h
+++ b/src/devices/bus/ieee488/c8050fdc.h
@@ -19,24 +19,6 @@
//**************************************************************************
-// INTERFACE CONFIGURATION MACROS
-//**************************************************************************
-
-#define MCFG_C8050_SYNC_CALLBACK(_write) \
- devcb = &downcast<c8050_fdc_device &>(*device).set_sync_wr_callback(DEVCB_##_write);
-
-#define MCFG_C8050_READY_CALLBACK(_write) \
- devcb = &downcast<c8050_fdc_device &>(*device).set_ready_wr_callback(DEVCB_##_write);
-
-#define MCFG_C8050_BRDY_CALLBACK(_write) \
- devcb = &downcast<c8050_fdc_device &>(*device).set_brdy_wr_callback(DEVCB_##_write);
-
-#define MCFG_C8050_ERROR_CALLBACK(_write) \
- devcb = &downcast<c8050_fdc_device &>(*device).set_error_wr_callback(DEVCB_##_write);
-
-
-
-//**************************************************************************
// TYPE DEFINITIONS
//**************************************************************************
@@ -48,10 +30,10 @@ public:
// construction/destruction
c8050_fdc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
- template <class Object> devcb_base &set_sync_wr_callback(Object &&cb) { return m_write_sync.set_callback(std::forward<Object>(cb)); }
- template <class Object> devcb_base &set_ready_wr_callback(Object &&cb) { return m_write_ready.set_callback(std::forward<Object>(cb)); }
- template <class Object> devcb_base &set_brdy_wr_callback(Object &&cb) { return m_write_brdy.set_callback(std::forward<Object>(cb)); }
- template <class Object> devcb_base &set_error_wr_callback(Object &&cb) { return m_write_error.set_callback(std::forward<Object>(cb)); }
+ auto sync_wr_callback() { return m_write_sync.bind(); }
+ auto ready_wr_callback() { return m_write_ready.bind(); }
+ auto brdy_wr_callback() { return m_write_brdy.bind(); }
+ auto error_wr_callback() { return m_write_error.bind(); }
DECLARE_READ8_MEMBER( read );
DECLARE_WRITE8_MEMBER( write );
diff --git a/src/devices/bus/ieee488/hp9895.cpp b/src/devices/bus/ieee488/hp9895.cpp
index 31e0e4989df..72d99ce1c4f 100644
--- a/src/devices/bus/ieee488/hp9895.cpp
+++ b/src/devices/bus/ieee488/hp9895.cpp
@@ -891,18 +891,19 @@ MACHINE_CONFIG_START(hp9895_device::device_add_mconfig)
MCFG_DEVICE_IO_MAP(z80_io_map)
MCFG_Z80_SET_REFRESH_CALLBACK(WRITE8(*this, hp9895_device , z80_m1_w))
- MCFG_DEVICE_ADD("phi" , PHI , 0)
- MCFG_PHI_EOI_WRITE_CB(WRITELINE(*this, hp9895_device , phi_eoi_w))
- MCFG_PHI_DAV_WRITE_CB(WRITELINE(*this, hp9895_device , phi_dav_w))
- MCFG_PHI_NRFD_WRITE_CB(WRITELINE(*this, hp9895_device , phi_nrfd_w))
- MCFG_PHI_NDAC_WRITE_CB(WRITELINE(*this, hp9895_device , phi_ndac_w))
- MCFG_PHI_IFC_WRITE_CB(WRITELINE(*this, hp9895_device , phi_ifc_w))
- MCFG_PHI_SRQ_WRITE_CB(WRITELINE(*this, hp9895_device , phi_srq_w))
- MCFG_PHI_ATN_WRITE_CB(WRITELINE(*this, hp9895_device , phi_atn_w))
- MCFG_PHI_REN_WRITE_CB(WRITELINE(*this, hp9895_device , phi_ren_w))
- MCFG_PHI_DIO_READWRITE_CB(READ8(*this, hp9895_device , phi_dio_r) , WRITE8(*this, hp9895_device , phi_dio_w))
- MCFG_PHI_INT_WRITE_CB(WRITELINE(*this, hp9895_device , phi_int_w))
- MCFG_PHI_SYS_CNTRL_READ_CB(GND)
+ PHI(config, m_phi, 0);
+ m_phi->signal_write_cb<phi_device::PHI_488_EOI>().set(FUNC(hp9895_device::phi_eoi_w));
+ m_phi->signal_write_cb<phi_device::PHI_488_DAV>().set(FUNC(hp9895_device::phi_dav_w));
+ m_phi->signal_write_cb<phi_device::PHI_488_NRFD>().set(FUNC(hp9895_device::phi_nrfd_w));
+ m_phi->signal_write_cb<phi_device::PHI_488_NDAC>().set(FUNC(hp9895_device::phi_ndac_w));
+ m_phi->signal_write_cb<phi_device::PHI_488_IFC>().set(FUNC(hp9895_device::phi_ifc_w));
+ m_phi->signal_write_cb<phi_device::PHI_488_SRQ>().set(FUNC(hp9895_device::phi_srq_w));
+ m_phi->signal_write_cb<phi_device::PHI_488_ATN>().set(FUNC(hp9895_device::phi_atn_w));
+ m_phi->signal_write_cb<phi_device::PHI_488_REN>().set(FUNC(hp9895_device::phi_ren_w));
+ m_phi->dio_read_cb().set(FUNC(hp9895_device::phi_dio_r));
+ m_phi->dio_write_cb().set(FUNC(hp9895_device::phi_dio_w));
+ m_phi->int_write_cb().set(FUNC(hp9895_device::phi_int_w));
+ m_phi->sys_cntrl_read_cb().set_constant(0);
MCFG_FLOPPY_DRIVE_ADD("floppy0" , hp9895_floppies , "8dsdd" , hp9895_floppy_formats)
MCFG_SLOT_FIXED(true)
diff --git a/src/devices/bus/ieee488/ieee488.h b/src/devices/bus/ieee488/ieee488.h
index 2920eaa2320..9dd05039e0a 100644
--- a/src/devices/bus/ieee488/ieee488.h
+++ b/src/devices/bus/ieee488/ieee488.h
@@ -32,35 +32,35 @@
#define MCFG_IEEE488_EOI_CALLBACK(_write) \
- devcb = &downcast<ieee488_device *>(device)->set_eoi_callback(DEVCB_##_write);
+ downcast<ieee488_device *>(device)->set_eoi_callback(DEVCB_##_write);
#define MCFG_IEEE488_DAV_CALLBACK(_write) \
- devcb = &downcast<ieee488_device *>(device)->set_dav_callback(DEVCB_##_write);
+ downcast<ieee488_device *>(device)->set_dav_callback(DEVCB_##_write);
#define MCFG_IEEE488_NRFD_CALLBACK(_write) \
- devcb = &downcast<ieee488_device *>(device)->set_nrfd_callback(DEVCB_##_write);
+ downcast<ieee488_device *>(device)->set_nrfd_callback(DEVCB_##_write);
#define MCFG_IEEE488_NDAC_CALLBACK(_write) \
- devcb = &downcast<ieee488_device *>(device)->set_ndac_callback(DEVCB_##_write);
+ downcast<ieee488_device *>(device)->set_ndac_callback(DEVCB_##_write);
#define MCFG_IEEE488_IFC_CALLBACK(_write) \
- devcb = &downcast<ieee488_device *>(device)->set_ifc_callback(DEVCB_##_write);
+ downcast<ieee488_device *>(device)->set_ifc_callback(DEVCB_##_write);
#define MCFG_IEEE488_SRQ_CALLBACK(_write) \
- devcb = &downcast<ieee488_device *>(device)->set_srq_callback(DEVCB_##_write);
+ downcast<ieee488_device *>(device)->set_srq_callback(DEVCB_##_write);
#define MCFG_IEEE488_ATN_CALLBACK(_write) \
- devcb = &downcast<ieee488_device *>(device)->set_atn_callback(DEVCB_##_write);
+ downcast<ieee488_device *>(device)->set_atn_callback(DEVCB_##_write);
#define MCFG_IEEE488_REN_CALLBACK(_write) \
- devcb = &downcast<ieee488_device *>(device)->set_ren_callback(DEVCB_##_write);
+ downcast<ieee488_device *>(device)->set_ren_callback(DEVCB_##_write);
// This CB reports changes to the DIO lines on the bus (whose value comes from
// ANDing the DIO lines of each device on the bus)
// This CB is needed by those controllers that start a parallel poll and wait
// for some condition to be set by devices on the DIO lines (e.g. PHI controller).
#define MCFG_IEEE488_DIO_CALLBACK(_write) \
- devcb = &downcast<ieee488_device *>(device)->set_dio_callback(DEVCB_##_write);
+ downcast<ieee488_device *>(device)->set_dio_callback(DEVCB_##_write);
#define MCFG_IEEE488_SLOT_ADD(_tag, _address, _slot_intf, _def_slot) \
MCFG_DEVICE_ADD(_tag, IEEE488_SLOT, 0) \