diff options
author | Vas Crabb <vas@vastheman.com> | 2018-06-15 13:17:32 +1000 |
---|---|---|
committer | Vas Crabb <vas@vastheman.com> | 2018-06-15 13:17:32 +1000 |
commit | 65c4569652eb3e0559669ba84085bf2a703c414f (patch) | |
tree | 6b5383bf23107b1b4eead0b4f60602563acfb420 /src/devices/bus | |
parent | f255eb1663d3d7b5a33efa794f5003d2498abf87 (diff) |
acro removal, disambiguation, debugger side effects (nw)
Diffstat (limited to 'src/devices/bus')
27 files changed, 98 insertions, 101 deletions
diff --git a/src/devices/bus/a2bus/a2pic.cpp b/src/devices/bus/a2bus/a2pic.cpp index 799a056ccff..5c86651178e 100644 --- a/src/devices/bus/a2bus/a2pic.cpp +++ b/src/devices/bus/a2bus/a2pic.cpp @@ -72,7 +72,7 @@ ioport_constructor a2bus_pic_device::device_input_ports() const //------------------------------------------------- MACHINE_CONFIG_START(a2bus_pic_device::device_add_mconfig) - MCFG_CENTRONICS_ADD(PIC_CENTRONICS_TAG, centronics_devices, "printer") + MCFG_DEVICE_ADD(m_ctx, CENTRONICS, centronics_devices, "printer") MCFG_CENTRONICS_DATA_INPUT_BUFFER("ctx_data_in") MCFG_CENTRONICS_ACK_HANDLER(WRITELINE(*this, a2bus_pic_device, ack_w)) diff --git a/src/devices/bus/a2bus/agat7ports.cpp b/src/devices/bus/a2bus/agat7ports.cpp index 0eddac11c7a..b74b941f600 100644 --- a/src/devices/bus/a2bus/agat7ports.cpp +++ b/src/devices/bus/a2bus/agat7ports.cpp @@ -57,7 +57,7 @@ MACHINE_CONFIG_START(a2bus_agat7_ports_device::device_add_mconfig) MCFG_I8255_OUT_PORTB_CB(WRITE8(*this, a2bus_agat7_ports_device, write_portb)) MCFG_I8255_IN_PORTC_CB(READ8(*this, a2bus_agat7_ports_device, read_portc)) - MCFG_CENTRONICS_ADD("centronics", centronics_devices, "printer") + MCFG_DEVICE_ADD(m_centronics, CENTRONICS, centronics_devices, "printer") MCFG_CENTRONICS_BUSY_HANDLER(WRITELINE(*this, a2bus_agat7_ports_device, write_centronics_busy)) MCFG_CENTRONICS_OUTPUT_LATCH_ADD("cent_data_out", "centronics") diff --git a/src/devices/bus/adam/ide.cpp b/src/devices/bus/adam/ide.cpp index eb081677cbb..d5f403f3d10 100644 --- a/src/devices/bus/adam/ide.cpp +++ b/src/devices/bus/adam/ide.cpp @@ -64,7 +64,7 @@ const tiny_rom_entry *powermate_ide_device::device_rom_region() const MACHINE_CONFIG_START(powermate_ide_device::device_add_mconfig) MCFG_ATA_INTERFACE_ADD(ATA_TAG, ata_devices, "hdd", nullptr, false) - MCFG_CENTRONICS_ADD(CENTRONICS_TAG, centronics_devices, "printer") + MCFG_DEVICE_ADD(CENTRONICS_TAG, CENTRONICS, centronics_devices, "printer") MCFG_CENTRONICS_OUTPUT_LATCH_ADD("cent_data_out", CENTRONICS_TAG) MACHINE_CONFIG_END diff --git a/src/devices/bus/adamnet/spi.cpp b/src/devices/bus/adamnet/spi.cpp index 62be608f09f..3d681653a70 100644 --- a/src/devices/bus/adamnet/spi.cpp +++ b/src/devices/bus/adamnet/spi.cpp @@ -85,7 +85,7 @@ MACHINE_CONFIG_START(adam_spi_device::device_add_mconfig) MCFG_DEVICE_ADD(RS232_TAG, RS232_PORT, default_rs232_devices, nullptr) - MCFG_CENTRONICS_ADD(CENTRONICS_TAG, centronics_devices, "printer") + MCFG_DEVICE_ADD(CENTRONICS_TAG, CENTRONICS, centronics_devices, "printer") MCFG_CENTRONICS_DATA_INPUT_BUFFER("cent_data_in") MCFG_DEVICE_ADD("cent_data_in", INPUT_BUFFER, 0) MCFG_CENTRONICS_OUTPUT_LATCH_ADD("cent_data_out", CENTRONICS_TAG) diff --git a/src/devices/bus/c64/geocable.cpp b/src/devices/bus/c64/geocable.cpp index ab4d5db39dc..e740ec0da69 100644 --- a/src/devices/bus/c64/geocable.cpp +++ b/src/devices/bus/c64/geocable.cpp @@ -31,7 +31,7 @@ DEFINE_DEVICE_TYPE(C64_GEOCABLE, c64_geocable_device, "c64_geocable", "C64 geoCa //------------------------------------------------- MACHINE_CONFIG_START(c64_geocable_device::device_add_mconfig) - MCFG_CENTRONICS_ADD("centronics", centronics_devices, "printer") + MCFG_DEVICE_ADD(m_centronics, CENTRONICS, centronics_devices, "printer") MCFG_CENTRONICS_BUSY_HANDLER(WRITELINE(*this, c64_geocable_device, output_b)) MACHINE_CONFIG_END diff --git a/src/devices/bus/c64/ieee488.cpp b/src/devices/bus/c64/ieee488.cpp index 51769f142b3..ef33798bdfc 100644 --- a/src/devices/bus/c64/ieee488.cpp +++ b/src/devices/bus/c64/ieee488.cpp @@ -76,12 +76,12 @@ WRITE8_MEMBER( c64_ieee488_device::tpi_pa_w ) */ - m_bus->ren_w(BIT(data, 2)); - m_bus->atn_w(BIT(data, 3)); - m_bus->dav_w(BIT(data, 4)); - m_bus->eoi_w(BIT(data, 5)); - m_bus->ndac_w(BIT(data, 6)); - m_bus->nrfd_w(BIT(data, 7)); + m_bus->host_ren_w(BIT(data, 2)); + m_bus->host_atn_w(BIT(data, 3)); + m_bus->host_dav_w(BIT(data, 4)); + m_bus->host_eoi_w(BIT(data, 5)); + m_bus->host_ndac_w(BIT(data, 6)); + m_bus->host_nrfd_w(BIT(data, 7)); } READ8_MEMBER( c64_ieee488_device::tpi_pc_r ) @@ -128,8 +128,8 @@ WRITE8_MEMBER( c64_ieee488_device::tpi_pc_w ) */ - m_bus->ifc_w(BIT(data, 0)); - m_bus->srq_w(BIT(data, 1)); + m_bus->host_ifc_w(BIT(data, 0)); + m_bus->host_srq_w(BIT(data, 1)); m_exrom = !BIT(data, 3); @@ -146,7 +146,7 @@ MACHINE_CONFIG_START(c64_ieee488_device::device_add_mconfig) MCFG_TPI6525_IN_PA_CB(READ8(*this, c64_ieee488_device, tpi_pa_r)) MCFG_TPI6525_OUT_PA_CB(WRITE8(*this, c64_ieee488_device, tpi_pa_w)) MCFG_TPI6525_IN_PB_CB(READ8(IEEE488_TAG, ieee488_device, dio_r)) - MCFG_TPI6525_OUT_PB_CB(WRITE8(IEEE488_TAG, ieee488_device, dio_w)) + MCFG_TPI6525_OUT_PB_CB(WRITE8(IEEE488_TAG, ieee488_device, host_dio_w)) MCFG_TPI6525_IN_PC_CB(READ8(*this, c64_ieee488_device, tpi_pc_r)) MCFG_TPI6525_OUT_PC_CB(WRITE8(*this, c64_ieee488_device, tpi_pc_w)) diff --git a/src/devices/bus/cbmiec/c1541.cpp b/src/devices/bus/cbmiec/c1541.cpp index 5c7d1de2771..13c866eac92 100644 --- a/src/devices/bus/cbmiec/c1541.cpp +++ b/src/devices/bus/cbmiec/c1541.cpp @@ -877,9 +877,9 @@ MACHINE_CONFIG_START(c1541_prologic_dos_classic_device::device_add_mconfig) MCFG_PIA_WRITEPB_HANDLER(WRITE8(*this, c1541_prologic_dos_classic_device, pia_pb_w)) MCFG_PIA_CA2_HANDLER(WRITELINE(CENTRONICS_TAG, centronics_device, write_strobe)) - MCFG_CENTRONICS_ADD(CENTRONICS_TAG, centronics_devices, "printer") + MCFG_DEVICE_ADD(CENTRONICS_TAG, CENTRONICS, centronics_devices, "printer") MCFG_CENTRONICS_ACK_HANDLER(WRITELINE(MC6821_TAG, pia6821_device, ca1_w)) - MCFG_CENTRONICS_OUTPUT_LATCH_ADD("cent_data_out", "centronics") + MCFG_CENTRONICS_OUTPUT_LATCH_ADD("cent_data_out", CENTRONICS_TAG) MACHINE_CONFIG_END diff --git a/src/devices/bus/centronics/ctronics.h b/src/devices/bus/centronics/ctronics.h index 4117c8d0a31..3c73690199d 100644 --- a/src/devices/bus/centronics/ctronics.h +++ b/src/devices/bus/centronics/ctronics.h @@ -14,10 +14,6 @@ #include "machine/output_latch.h" -#define MCFG_CENTRONICS_ADD(_tag, _slot_intf, _def_slot) \ - MCFG_DEVICE_ADD(_tag, CENTRONICS, 0) \ - MCFG_DEVICE_SLOT_INTERFACE(_slot_intf, _def_slot, false) - #define MCFG_CENTRONICS_STROBE_HANDLER(_devcb) \ devcb = &downcast<centronics_device &>(*device).set_strobe_handler(DEVCB_##_devcb); @@ -100,6 +96,15 @@ class centronics_device : public device_t, friend class device_centronics_peripheral_interface; public: + template <typename T> + centronics_device(const machine_config &mconfig, const char *tag, device_t *owner, T &&opts, const char *dflt) + : centronics_device(mconfig, tag, owner, 0) + { + option_reset(); + opts(*this); + set_default_option(dflt); + set_fixed(false); + } centronics_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); template <class Object> devcb_base &set_strobe_handler(Object &&cb) { return m_strobe_handler.set_callback(std::forward<Object>(cb)); } diff --git a/src/devices/bus/cgenie/parallel/printer.cpp b/src/devices/bus/cgenie/parallel/printer.cpp index b31e09da419..bce52a61c97 100644 --- a/src/devices/bus/cgenie/parallel/printer.cpp +++ b/src/devices/bus/cgenie/parallel/printer.cpp @@ -28,7 +28,7 @@ DEFINE_DEVICE_TYPE(CGENIE_PRINTER, cgenie_printer_device, "cgenie_printer", "Pri //------------------------------------------------- MACHINE_CONFIG_START(cgenie_printer_device::device_add_mconfig) - MCFG_CENTRONICS_ADD("centronics", centronics_devices, "printer") + MCFG_DEVICE_ADD(m_centronics, CENTRONICS, centronics_devices, "printer") MCFG_CENTRONICS_BUSY_HANDLER(WRITELINE(*this, cgenie_printer_device, busy_w)) MCFG_CENTRONICS_PERROR_HANDLER(WRITELINE(*this, cgenie_printer_device, perror_w)) MCFG_CENTRONICS_SELECT_HANDLER(WRITELINE(*this, cgenie_printer_device, select_w)) diff --git a/src/devices/bus/comx35/printer.cpp b/src/devices/bus/comx35/printer.cpp index 36d11482186..24a50e7ed53 100644 --- a/src/devices/bus/comx35/printer.cpp +++ b/src/devices/bus/comx35/printer.cpp @@ -56,7 +56,7 @@ const tiny_rom_entry *comx_prn_device::device_rom_region() const //------------------------------------------------- MACHINE_CONFIG_START(comx_prn_device::device_add_mconfig) - MCFG_CENTRONICS_ADD(CENTRONICS_TAG, centronics_devices, "printer") + MCFG_DEVICE_ADD(m_centronics, CENTRONICS, centronics_devices, "printer") MCFG_CENTRONICS_ACK_HANDLER(WRITELINE("cent_status_in", input_buffer_device, write_bit0)) MCFG_CENTRONICS_BUSY_HANDLER(WRITELINE("cent_status_in", input_buffer_device, write_bit1)) MCFG_CENTRONICS_PERROR_HANDLER(WRITELINE("cent_status_in", input_buffer_device, write_bit2)) diff --git a/src/devices/bus/dmv/k210.cpp b/src/devices/bus/dmv/k210.cpp index 6d47b8f5921..34288eb2519 100644 --- a/src/devices/bus/dmv/k210.cpp +++ b/src/devices/bus/dmv/k210.cpp @@ -82,7 +82,7 @@ MACHINE_CONFIG_START(dmv_k210_device::device_add_mconfig) MCFG_I8255_OUT_PORTB_CB(WRITE8(*this, dmv_k210_device, portb_w)) MCFG_I8255_OUT_PORTC_CB(WRITE8(*this, dmv_k210_device, portc_w)) - MCFG_CENTRONICS_ADD("centronics", centronics_devices, "printer") + MCFG_DEVICE_ADD(m_centronics, CENTRONICS, centronics_devices, "printer") MCFG_CENTRONICS_DATA_INPUT_BUFFER("cent_data_in") MCFG_CENTRONICS_ACK_HANDLER(WRITELINE(*this, dmv_k210_device, cent_ack_w)) MCFG_CENTRONICS_BUSY_HANDLER(WRITELINE(*this, dmv_k210_device, cent_busy_w)) diff --git a/src/devices/bus/ecbbus/grip.cpp b/src/devices/bus/ecbbus/grip.cpp index 1b6e09c1ec6..1000a8a51bf 100644 --- a/src/devices/bus/ecbbus/grip.cpp +++ b/src/devices/bus/ecbbus/grip.cpp @@ -451,7 +451,7 @@ MACHINE_CONFIG_START(ecb_grip21_device::device_add_mconfig) MCFG_Z80STI_OUT_TCO_CB(WRITELINE(Z80STI_TAG, z80sti_device, tc_w)) MCFG_Z80STI_OUT_TDO_CB(WRITELINE(Z80STI_TAG, z80sti_device, tc_w)) - MCFG_CENTRONICS_ADD(CENTRONICS_TAG, centronics_devices, "printer") + MCFG_DEVICE_ADD(m_centronics, CENTRONICS, centronics_devices, "printer") MCFG_CENTRONICS_BUSY_HANDLER(WRITELINE(*this, ecb_grip21_device, write_centronics_busy)) MCFG_CENTRONICS_FAULT_HANDLER(WRITELINE(*this, ecb_grip21_device, write_centronics_fault)) diff --git a/src/devices/bus/econet/e01.cpp b/src/devices/bus/econet/e01.cpp index 3ed758d843e..c50325bdc1b 100644 --- a/src/devices/bus/econet/e01.cpp +++ b/src/devices/bus/econet/e01.cpp @@ -267,7 +267,7 @@ MACHINE_CONFIG_START(econet_e01_device::device_add_mconfig) MCFG_FLOPPY_DRIVE_ADD(WD2793_TAG":1", e01_floppies, "35dd", floppy_formats_afs) MCFG_SOFTWARE_LIST_ADD("flop_ls_e01", "e01_flop") - MCFG_CENTRONICS_ADD(CENTRONICS_TAG, centronics_devices, "printer") + MCFG_DEVICE_ADD(m_centronics, CENTRONICS, centronics_devices, "printer") MCFG_CENTRONICS_ACK_HANDLER(WRITELINE(R6522_TAG, via6522_device, write_ca1)) MCFG_CENTRONICS_OUTPUT_LATCH_ADD("cent_data_out", CENTRONICS_TAG) diff --git a/src/devices/bus/electron/m2105.cpp b/src/devices/bus/electron/m2105.cpp index b4ed7bd0a53..77c4b196c90 100644 --- a/src/devices/bus/electron/m2105.cpp +++ b/src/devices/bus/electron/m2105.cpp @@ -74,7 +74,7 @@ MACHINE_CONFIG_START(electron_m2105_device::device_add_mconfig) //MCFG_VIA6522_READPB_HANDLER(READ8(*this, electron_m2105_device, m2105_via_user_read_portb)) MCFG_VIA6522_WRITEPA_HANDLER(WRITE8("cent_data_out", output_latch_device, bus_w)) //MCFG_VIA6522_WRITEPB_HANDLER(WRITE8(*this, electron_m2105_device, m2105_via_user_write_portb)) - MCFG_VIA6522_CA2_HANDLER(WRITELINE("centronics", centronics_device, write_strobe)) + MCFG_VIA6522_CA2_HANDLER(WRITELINE(m_centronics, centronics_device, write_strobe)) MCFG_VIA6522_IRQ_HANDLER(WRITELINE("irqs", input_merger_device, in_w<1>)) /* duart */ @@ -87,7 +87,7 @@ MACHINE_CONFIG_START(electron_m2105_device::device_add_mconfig) MCFG_RS232_RXD_HANDLER(WRITELINE("duart", scn2681_device, rx_a_w)) /* printer */ - MCFG_CENTRONICS_ADD("centronics", centronics_devices, "printer") + MCFG_DEVICE_ADD(m_centronics, CENTRONICS, centronics_devices, "printer") MCFG_CENTRONICS_ACK_HANDLER(WRITELINE("via6522_1", via6522_device, write_ca1)) MCFG_DEVCB_INVERT /* ack seems to be inverted? */ MCFG_CENTRONICS_OUTPUT_LATCH_ADD("cent_data_out", "centronics") diff --git a/src/devices/bus/electron/plus1.cpp b/src/devices/bus/electron/plus1.cpp index 344f53a3b64..2dafbd1479b 100644 --- a/src/devices/bus/electron/plus1.cpp +++ b/src/devices/bus/electron/plus1.cpp @@ -92,7 +92,7 @@ ioport_constructor electron_plus1_device::device_input_ports() const MACHINE_CONFIG_START(electron_plus1_device::device_add_mconfig) /* printer */ - MCFG_CENTRONICS_ADD("centronics", centronics_devices, "printer") + MCFG_DEVICE_ADD(m_centronics, CENTRONICS, centronics_devices, "printer") MCFG_CENTRONICS_BUSY_HANDLER(WRITELINE(*this, electron_plus1_device, busy_w)) MCFG_CENTRONICS_OUTPUT_LATCH_ADD("cent_data_out", "centronics") @@ -130,9 +130,9 @@ const tiny_rom_entry *electron_plus1_device::device_rom_region() const // electron_plus1_device - constructor //------------------------------------------------- -electron_plus1_device::electron_plus1_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) - : device_t(mconfig, ELECTRON_PLUS1, tag, owner, clock), - device_electron_expansion_interface(mconfig, *this), +electron_plus1_device::electron_plus1_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : + device_t(mconfig, ELECTRON_PLUS1, tag, owner, clock), + device_electron_expansion_interface(mconfig, *this), m_exp_rom(*this, "exp_rom"), m_cart_sk1(*this, "cart_sk1"), m_cart_sk2(*this, "cart_sk2"), diff --git a/src/devices/bus/electron/romboxp.cpp b/src/devices/bus/electron/romboxp.cpp index 0cc50406fee..d3ca80d43f4 100644 --- a/src/devices/bus/electron/romboxp.cpp +++ b/src/devices/bus/electron/romboxp.cpp @@ -86,7 +86,7 @@ ioport_constructor electron_romboxp_device::device_input_ports() const MACHINE_CONFIG_START(electron_romboxp_device::device_add_mconfig) /* printer */ - MCFG_CENTRONICS_ADD("centronics", centronics_devices, "printer") + MCFG_DEVICE_ADD(m_centronics, CENTRONICS, centronics_devices, "printer") MCFG_CENTRONICS_BUSY_HANDLER(WRITELINE(*this, electron_romboxp_device, busy_w)) MCFG_CENTRONICS_OUTPUT_LATCH_ADD("cent_data_out", "centronics") @@ -126,9 +126,9 @@ const tiny_rom_entry *electron_romboxp_device::device_rom_region() const // electron_romboxp_device - constructor //------------------------------------------------- -electron_romboxp_device::electron_romboxp_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) - : device_t(mconfig, ELECTRON_ROMBOXP, tag, owner, clock), - device_electron_expansion_interface(mconfig, *this), +electron_romboxp_device::electron_romboxp_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : + device_t(mconfig, ELECTRON_ROMBOXP, tag, owner, clock), + device_electron_expansion_interface(mconfig, *this), m_exp_rom(*this, "exp_rom"), m_rom(*this, "rom%u", 1), m_cart(*this, "cart%u", 1), diff --git a/src/devices/bus/hp80_io/82937.cpp b/src/devices/bus/hp80_io/82937.cpp index 3e80cd61646..e5aff4fac43 100644 --- a/src/devices/bus/hp80_io/82937.cpp +++ b/src/devices/bus/hp80_io/82937.cpp @@ -267,40 +267,40 @@ void hp82937_io_card_device::update_signals() uint8_t p1 = m_cpu->p1_r(machine().dummy_space() , 0); m_iatn = BIT(p1 , P1_ATN_BIT); if (ctrl_active) { - m_ieee488->atn_w(m_iatn); - m_ieee488->srq_w(1); + m_ieee488->host_atn_w(m_iatn); + m_ieee488->host_srq_w(1); } else { - m_ieee488->atn_w(1); + m_ieee488->host_atn_w(1); m_iatn = m_iatn && m_ieee488->atn_r(); - m_ieee488->srq_w(BIT(p1 , P1_SRQ_BIT)); + m_ieee488->host_srq_w(BIT(p1 , P1_SRQ_BIT)); } m_talker_out = (ctrl_active && !m_iatn) || (BIT(m_latch , LATCH_TA_BIT) && m_iatn); if (m_talker_out) { - m_ieee488->nrfd_w(1); - m_ieee488->dav_w(BIT(p1 , P1_DAV_BIT)); - m_ieee488->eoi_w(BIT(p1 , P1_EOI_BIT)); - m_ieee488->ndac_w(1); + m_ieee488->host_nrfd_w(1); + m_ieee488->host_dav_w(BIT(p1 , P1_DAV_BIT)); + m_ieee488->host_eoi_w(BIT(p1 , P1_EOI_BIT)); + m_ieee488->host_ndac_w(1); } else { - m_ieee488->nrfd_w(BIT(p1 , P1_NRFD_BIT)); - m_ieee488->dav_w(1); - m_ieee488->eoi_w(1); + m_ieee488->host_nrfd_w(BIT(p1 , P1_NRFD_BIT)); + m_ieee488->host_dav_w(1); + m_ieee488->host_eoi_w(1); bool ndac = BIT(p1 , P1_NDAC_BIT); if (BIT(m_latch , LATCH_EN_NDAC_BIT) && !m_iatn) { ndac = false; } - m_ieee488->ndac_w(ndac); + m_ieee488->host_ndac_w(ndac); } bool iren = BIT(p1 , P1_REN_BIT); if (BIT(m_sw1->read() , 5)) { // System controller - m_ieee488->ren_w(iren); - m_ieee488->ifc_w(BIT(p1 , P1_IFC_BIT)); + m_ieee488->host_ren_w(iren); + m_ieee488->host_ifc_w(BIT(p1 , P1_IFC_BIT)); } else { // Not system controller - m_ieee488->ren_w(1); + m_ieee488->host_ren_w(1); iren = iren && m_ieee488->ren_r(); - m_ieee488->ifc_w(1); + m_ieee488->host_ifc_w(1); } bool not_u8_1 = m_iatn || m_ieee488->eoi_r(); m_dio_out = not_u8_1 && m_talker_out; diff --git a/src/devices/bus/hp9845_io/98034.cpp b/src/devices/bus/hp9845_io/98034.cpp index 0f615d7c967..77c8933aa15 100644 --- a/src/devices/bus/hp9845_io/98034.cpp +++ b/src/devices/bus/hp9845_io/98034.cpp @@ -309,20 +309,20 @@ void hp98034_io_card_device::update_data_out() void hp98034_io_card_device::update_ctrl_out() { if (m_clr_hpib) { - m_ieee488->dav_w(1); - m_ieee488->nrfd_w(1); - m_ieee488->eoi_w(1); - m_ieee488->ndac_w(0); + m_ieee488->host_dav_w(1); + m_ieee488->host_nrfd_w(1); + m_ieee488->host_eoi_w(1); + m_ieee488->host_ndac_w(0); } else { - m_ieee488->dav_w(BIT(m_dc , 2)); - m_ieee488->nrfd_w(BIT(m_dc , 1)); - m_ieee488->eoi_w(!BIT(m_ctrl_out , 4)); - m_ieee488->ndac_w(BIT(m_dc , 6)); + m_ieee488->host_dav_w(BIT(m_dc , 2)); + m_ieee488->host_nrfd_w(BIT(m_dc , 1)); + m_ieee488->host_eoi_w(!BIT(m_ctrl_out , 4)); + m_ieee488->host_ndac_w(BIT(m_dc , 6)); } - m_ieee488->srq_w(!BIT(m_ctrl_out , 0)); - m_ieee488->ren_w(!BIT(m_ctrl_out , 1)); - m_ieee488->atn_w(!BIT(m_ctrl_out , 2)); - m_ieee488->ifc_w(!BIT(m_ctrl_out , 3)); + m_ieee488->host_srq_w(!BIT(m_ctrl_out , 0)); + m_ieee488->host_ren_w(!BIT(m_ctrl_out , 1)); + m_ieee488->host_atn_w(!BIT(m_ctrl_out , 2)); + m_ieee488->host_ifc_w(!BIT(m_ctrl_out , 3)); } void hp98034_io_card_device::update_clr_hpib() diff --git a/src/devices/bus/ieee488/ieee488.h b/src/devices/bus/ieee488/ieee488.h index 138dd1df484..2920eaa2320 100644 --- a/src/devices/bus/ieee488/ieee488.h +++ b/src/devices/bus/ieee488/ieee488.h @@ -123,15 +123,15 @@ public: // writes for host (driver_device) void write_dio(uint8_t data) { set_data(this, data); } - DECLARE_WRITE8_MEMBER( dio_w ) { set_data(this, data); } - DECLARE_WRITE_LINE_MEMBER( eoi_w ) { set_signal(this, EOI, state); } - DECLARE_WRITE_LINE_MEMBER( dav_w ) { set_signal(this, DAV, state); } - DECLARE_WRITE_LINE_MEMBER( nrfd_w ) { set_signal(this, NRFD, state); } - DECLARE_WRITE_LINE_MEMBER( ndac_w ) { set_signal(this, NDAC, state); } - DECLARE_WRITE_LINE_MEMBER( ifc_w ) { set_signal(this, IFC, state); } - DECLARE_WRITE_LINE_MEMBER( srq_w ) { set_signal(this, SRQ, state); } - DECLARE_WRITE_LINE_MEMBER( atn_w ) { set_signal(this, ATN, state); } - DECLARE_WRITE_LINE_MEMBER( ren_w ) { set_signal(this, REN, state); } + DECLARE_WRITE8_MEMBER( host_dio_w ) { set_data(this, data); } + DECLARE_WRITE_LINE_MEMBER( host_eoi_w ) { set_signal(this, EOI, state); } + DECLARE_WRITE_LINE_MEMBER( host_dav_w ) { set_signal(this, DAV, state); } + DECLARE_WRITE_LINE_MEMBER( host_nrfd_w ) { set_signal(this, NRFD, state); } + DECLARE_WRITE_LINE_MEMBER( host_ndac_w ) { set_signal(this, NDAC, state); } + DECLARE_WRITE_LINE_MEMBER( host_ifc_w ) { set_signal(this, IFC, state); } + DECLARE_WRITE_LINE_MEMBER( host_srq_w ) { set_signal(this, SRQ, state); } + DECLARE_WRITE_LINE_MEMBER( host_atn_w ) { set_signal(this, ATN, state); } + DECLARE_WRITE_LINE_MEMBER( host_ren_w ) { set_signal(this, REN, state); } // writes for peripherals (device_t) void dio_w(device_t *device, uint8_t data) { set_data(device, data); } diff --git a/src/devices/bus/isa/3c503.cpp b/src/devices/bus/isa/3c503.cpp index 50922872343..424ce8bb082 100644 --- a/src/devices/bus/isa/3c503.cpp +++ b/src/devices/bus/isa/3c503.cpp @@ -8,8 +8,8 @@ MACHINE_CONFIG_START(el2_3c503_device::device_add_mconfig) MCFG_DEVICE_ADD("dp8390d", DP8390D, 0) MCFG_DP8390D_IRQ_CB(WRITELINE(*this, el2_3c503_device, el2_3c503_irq_w)) - MCFG_DP8390D_MEM_READ_CB(READ8(*this, el2_3c503_device, el2_3c503_mem_read)) - MCFG_DP8390D_MEM_WRITE_CB(WRITE8(*this, el2_3c503_device, el2_3c503_mem_write)) + MCFG_DP8390D_MEM_READ_CB(READ8(*this, el2_3c503_device, el2_3c503_mem_r)) + MCFG_DP8390D_MEM_WRITE_CB(WRITE8(*this, el2_3c503_device, el2_3c503_mem_w)) MACHINE_CONFIG_END DEFINE_DEVICE_TYPE(EL2_3C503, el2_3c503_device, "el2_3c503", "3C503 Network Adapter") @@ -168,10 +168,10 @@ READ8_MEMBER(el2_3c503_device::el2_3c503_hiport_r) { return (m_regs.vptr & 0x0f) << 4; case 14: if(!(m_regs.ctrl & 0x80)) return 0xff; - return el2_3c503_mem_read(space, m_regs.da++, mem_mask); + return el2_3c503_mem_r(space, machine().side_effects_disabled() ? m_regs.da : m_regs.da++, mem_mask); case 15: if(!(m_regs.ctrl & 0x80)) return 0xff; - return el2_3c503_mem_read(space, m_regs.da++, mem_mask); + return el2_3c503_mem_r(space, machine().side_effects_disabled() ? m_regs.da : m_regs.da++, mem_mask); } return 0; } @@ -267,11 +267,11 @@ WRITE8_MEMBER(el2_3c503_device::el2_3c503_hiport_w) { return; case 14: if(!(m_regs.ctrl & 0x80)) return; - el2_3c503_mem_write(space, m_regs.da++, data, mem_mask); + el2_3c503_mem_w(space, m_regs.da++, data, mem_mask); return; case 15: if(!(m_regs.ctrl & 0x80)) return; - el2_3c503_mem_write(space, m_regs.da++, data, mem_mask); + el2_3c503_mem_w(space, m_regs.da++, data, mem_mask); return; default: logerror("3c503: invalid high register write %02x\n", offset); @@ -283,14 +283,6 @@ WRITE_LINE_MEMBER(el2_3c503_device::el2_3c503_irq_w) { if(!(m_regs.gacfr & 0x80)) set_irq(state); } -READ8_MEMBER(el2_3c503_device::el2_3c503_mem_read) { - return el2_3c503_mem_read(offset); -} - -WRITE8_MEMBER(el2_3c503_device::el2_3c503_mem_write) { - el2_3c503_mem_write(offset, data); -} - uint8_t el2_3c503_device::el2_3c503_mem_read(offs_t offset) { if((offset < 8*1024) || (offset >= 16*1024)) return 0xff; return m_board_ram[offset - (8*1024)]; diff --git a/src/devices/bus/isa/3c503.h b/src/devices/bus/isa/3c503.h index 73661ab2071..d987dc79cb2 100644 --- a/src/devices/bus/isa/3c503.h +++ b/src/devices/bus/isa/3c503.h @@ -30,8 +30,8 @@ protected: private: void el2_3c503_irq_w(int state); - DECLARE_READ8_MEMBER(el2_3c503_mem_read); - DECLARE_WRITE8_MEMBER(el2_3c503_mem_write); + DECLARE_READ8_MEMBER(el2_3c503_mem_r) { return el2_3c503_mem_read(offset); } + DECLARE_WRITE8_MEMBER(el2_3c503_mem_w) { el2_3c503_mem_write(offset, data); } required_device<dp8390d_device> m_dp8390; uint8_t m_board_ram[8*1024]; diff --git a/src/devices/bus/pofo/hpc101.cpp b/src/devices/bus/pofo/hpc101.cpp index 0d7e58b50e3..b7d31727615 100644 --- a/src/devices/bus/pofo/hpc101.cpp +++ b/src/devices/bus/pofo/hpc101.cpp @@ -39,7 +39,7 @@ MACHINE_CONFIG_START(pofo_hpc101_device::device_add_mconfig) MCFG_I8255_OUT_PORTB_CB(WRITE8("cent_ctrl_out", output_latch_device, bus_w)) MCFG_I8255_IN_PORTC_CB(READ8("cent_status_in", input_buffer_device, bus_r)) - MCFG_CENTRONICS_ADD(CENTRONICS_TAG, centronics_devices, "printer") + MCFG_DEVICE_ADD(CENTRONICS_TAG, CENTRONICS, centronics_devices, "printer") MCFG_CENTRONICS_ACK_HANDLER(WRITELINE("cent_status_in", input_buffer_device, write_bit5)) MCFG_CENTRONICS_BUSY_HANDLER(WRITELINE("cent_status_in", input_buffer_device, write_bit4)) MCFG_CENTRONICS_FAULT_HANDLER(WRITELINE("cent_status_in", input_buffer_device, write_bit3)) diff --git a/src/devices/bus/ql/sandy_superdisk.cpp b/src/devices/bus/ql/sandy_superdisk.cpp index dfbeec4d695..a2bfa83a13d 100644 --- a/src/devices/bus/ql/sandy_superdisk.cpp +++ b/src/devices/bus/ql/sandy_superdisk.cpp @@ -87,7 +87,7 @@ MACHINE_CONFIG_START(sandy_super_disk_device::device_add_mconfig) MCFG_FLOPPY_DRIVE_ADD(WD1772_TAG":0", sandy_super_disk_floppies, "35dd", sandy_super_disk_device::floppy_formats) MCFG_FLOPPY_DRIVE_ADD(WD1772_TAG":1", sandy_super_disk_floppies, nullptr, sandy_super_disk_device::floppy_formats) - MCFG_CENTRONICS_ADD(CENTRONICS_TAG, centronics_devices, "printer") + MCFG_DEVICE_ADD(m_centronics, CENTRONICS, centronics_devices, "printer") MCFG_CENTRONICS_BUSY_HANDLER(WRITELINE(*this, sandy_super_disk_device, busy_w)) MCFG_CENTRONICS_OUTPUT_LATCH_ADD(TTL74273_TAG, CENTRONICS_TAG) MACHINE_CONFIG_END diff --git a/src/devices/bus/ql/sandy_superqboard.cpp b/src/devices/bus/ql/sandy_superqboard.cpp index 3dc9eb3c6f7..9942d50cb52 100644 --- a/src/devices/bus/ql/sandy_superqboard.cpp +++ b/src/devices/bus/ql/sandy_superqboard.cpp @@ -108,7 +108,7 @@ MACHINE_CONFIG_START(sandy_superqboard_device::device_add_mconfig) MCFG_FLOPPY_DRIVE_ADD(WD1772_TAG":0", sandy_superqboard_floppies, "35hd", sandy_superqboard_device::floppy_formats) MCFG_FLOPPY_DRIVE_ADD(WD1772_TAG":1", sandy_superqboard_floppies, nullptr, sandy_superqboard_device::floppy_formats) - MCFG_CENTRONICS_ADD(CENTRONICS_TAG, centronics_devices, "printer") + MCFG_DEVICE_ADD(m_centronics, CENTRONICS, centronics_devices, "printer") MCFG_CENTRONICS_BUSY_HANDLER(WRITELINE(*this, sandy_superqboard_device, busy_w)) MCFG_CENTRONICS_OUTPUT_LATCH_ADD(TTL74273_TAG, CENTRONICS_TAG) MACHINE_CONFIG_END diff --git a/src/devices/bus/svi3x8/slot/sv802.cpp b/src/devices/bus/svi3x8/slot/sv802.cpp index b89935ee9b5..2cc905d472c 100644 --- a/src/devices/bus/svi3x8/slot/sv802.cpp +++ b/src/devices/bus/svi3x8/slot/sv802.cpp @@ -21,7 +21,7 @@ DEFINE_DEVICE_TYPE(SV802, sv802_device, "sv802", "SV-802 Centronics Printer Inte //------------------------------------------------- MACHINE_CONFIG_START(sv802_device::device_add_mconfig) - MCFG_CENTRONICS_ADD("centronics", centronics_devices, "printer") + MCFG_DEVICE_ADD(m_centronics, CENTRONICS, centronics_devices, "printer") MCFG_CENTRONICS_BUSY_HANDLER(WRITELINE(*this, sv802_device, busy_w)) MCFG_CENTRONICS_OUTPUT_LATCH_ADD("cent_data_out", "centronics") diff --git a/src/devices/bus/vic20/vic1112.cpp b/src/devices/bus/vic20/vic1112.cpp index 5266e430ab3..b709b6f281b 100644 --- a/src/devices/bus/vic20/vic1112.cpp +++ b/src/devices/bus/vic20/vic1112.cpp @@ -79,9 +79,9 @@ WRITE8_MEMBER( vic1112_device::via0_pb_w ) */ - m_bus->dav_w(BIT(data, 0)); - m_bus->nrfd_w(BIT(data, 1)); - m_bus->ndac_w(BIT(data, 2)); + m_bus->host_dav_w(BIT(data, 0)); + m_bus->host_nrfd_w(BIT(data, 1)); + m_bus->host_ndac_w(BIT(data, 2)); } @@ -105,9 +105,9 @@ MACHINE_CONFIG_START(vic1112_device::device_add_mconfig) MCFG_DEVICE_ADD(M6522_1_TAG, VIA6522, DERIVED_CLOCK(1, 1)) MCFG_VIA6522_READPB_HANDLER(READ8(IEEE488_TAG, ieee488_device, dio_r)) - MCFG_VIA6522_WRITEPA_HANDLER(WRITE8(IEEE488_TAG, ieee488_device, dio_w)) - MCFG_VIA6522_CA2_HANDLER(WRITELINE(IEEE488_TAG, ieee488_device, atn_w)) - MCFG_VIA6522_CB2_HANDLER(WRITELINE(IEEE488_TAG, ieee488_device, eoi_w)) + MCFG_VIA6522_WRITEPA_HANDLER(WRITE8(IEEE488_TAG, ieee488_device, host_dio_w)) + MCFG_VIA6522_CA2_HANDLER(WRITELINE(IEEE488_TAG, ieee488_device, host_atn_w)) + MCFG_VIA6522_CB2_HANDLER(WRITELINE(IEEE488_TAG, ieee488_device, host_eoi_w)) MCFG_VIA6522_IRQ_HANDLER(WRITELINE(*this, vic1112_device, via1_irq_w)) MCFG_CBM_IEEE488_ADD(nullptr) @@ -153,8 +153,8 @@ void vic1112_device::device_start() void vic1112_device::device_reset() { - m_bus->ifc_w(0); - m_bus->ifc_w(1); + m_bus->host_ifc_w(0); + m_bus->host_ifc_w(1); } diff --git a/src/devices/bus/vtech/ioexp/printer.cpp b/src/devices/bus/vtech/ioexp/printer.cpp index bc900e7555a..66967668703 100644 --- a/src/devices/bus/vtech/ioexp/printer.cpp +++ b/src/devices/bus/vtech/ioexp/printer.cpp @@ -24,7 +24,7 @@ DEFINE_DEVICE_TYPE(VTECH_PRINTER_INTERFACE, vtech_printer_interface_device, "vte //------------------------------------------------- MACHINE_CONFIG_START(vtech_printer_interface_device::device_add_mconfig) - MCFG_CENTRONICS_ADD("centronics", centronics_devices, "printer") + MCFG_DEVICE_ADD(m_centronics, CENTRONICS, centronics_devices, "printer") MCFG_CENTRONICS_BUSY_HANDLER(WRITELINE(*this, vtech_printer_interface_device, busy_w)) MCFG_CENTRONICS_OUTPUT_LATCH_ADD("latch", "centronics") MACHINE_CONFIG_END |