diff options
author | 2019-03-25 23:13:40 +0100 | |
---|---|---|
committer | 2019-03-25 23:13:40 +0100 | |
commit | b380514764cf857469bae61c11143a19f79a74c5 (patch) | |
tree | 63c8012e262618f08a332da31dd714281aa2c5ed /src/devices/bus/pofo/hpc101.cpp | |
parent | c24473ddff715ecec2e258a6eb38960cf8c8e98e (diff) |
Revert "conflict resolution (nw)"
This reverts commit c24473ddff715ecec2e258a6eb38960cf8c8e98e, reversing
changes made to 009cba4fb8102102168ef32870892438327f3705.
Diffstat (limited to 'src/devices/bus/pofo/hpc101.cpp')
-rw-r--r-- | src/devices/bus/pofo/hpc101.cpp | 37 |
1 files changed, 17 insertions, 20 deletions
diff --git a/src/devices/bus/pofo/hpc101.cpp b/src/devices/bus/pofo/hpc101.cpp index d62f1002f7d..93268e95bb6 100644 --- a/src/devices/bus/pofo/hpc101.cpp +++ b/src/devices/bus/pofo/hpc101.cpp @@ -33,31 +33,28 @@ DEFINE_DEVICE_TYPE(POFO_HPC101, pofo_hpc101_device, "pofo_hpc101", "Atari Portfo // device_add_mconfig - add device configuration //------------------------------------------------- -void pofo_hpc101_device::device_add_mconfig(machine_config &config) -{ +MACHINE_CONFIG_START(pofo_hpc101_device::device_add_mconfig) I8255A(config, m_ppi); m_ppi->out_pa_callback().set("cent_data_out", FUNC(output_latch_device::bus_w)); m_ppi->out_pb_callback().set("cent_ctrl_out", FUNC(output_latch_device::bus_w)); m_ppi->in_pc_callback().set("cent_status_in", FUNC(input_buffer_device::bus_r)); - centronics_device ¢ronics(CENTRONICS(config, CENTRONICS_TAG, centronics_devices, "printer")); - centronics.ack_handler().set("cent_status_in", FUNC(input_buffer_device::write_bit5)); - centronics.busy_handler().set("cent_status_in", FUNC(input_buffer_device::write_bit4)); - centronics.fault_handler().set("cent_status_in", FUNC(input_buffer_device::write_bit3)); - centronics.select_handler().set("cent_status_in", FUNC(input_buffer_device::write_bit1)); - centronics.perror_handler().set("cent_status_in", FUNC(input_buffer_device::write_bit0)); - - output_latch_device ¢_data_out(OUTPUT_LATCH(config, "cent_data_out")); - centronics.set_output_latch(cent_data_out); + 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)) + MCFG_CENTRONICS_SELECT_HANDLER(WRITELINE("cent_status_in", input_buffer_device, write_bit1)) + MCFG_CENTRONICS_PERROR_HANDLER(WRITELINE("cent_status_in", input_buffer_device, write_bit0)) - INPUT_BUFFER(config, "cent_status_in"); + MCFG_CENTRONICS_OUTPUT_LATCH_ADD("cent_data_out", CENTRONICS_TAG) + MCFG_DEVICE_ADD("cent_status_in", INPUT_BUFFER, 0) - output_latch_device ¢_ctrl_out(OUTPUT_LATCH(config, "cent_ctrl_out")); - cent_ctrl_out.bit_handler<0>().set(CENTRONICS_TAG, FUNC(centronics_device::write_strobe)); - cent_ctrl_out.bit_handler<1>().set(CENTRONICS_TAG, FUNC(centronics_device::write_autofd)); - cent_ctrl_out.bit_handler<2>().set(CENTRONICS_TAG, FUNC(centronics_device::write_init)); - cent_ctrl_out.bit_handler<3>().set(CENTRONICS_TAG, FUNC(centronics_device::write_select_in)); -} + MCFG_DEVICE_ADD("cent_ctrl_out", OUTPUT_LATCH, 0) + MCFG_OUTPUT_LATCH_BIT0_HANDLER(WRITELINE(CENTRONICS_TAG, centronics_device, write_strobe)) + MCFG_OUTPUT_LATCH_BIT1_HANDLER(WRITELINE(CENTRONICS_TAG, centronics_device, write_autofd)) + MCFG_OUTPUT_LATCH_BIT2_HANDLER(WRITELINE(CENTRONICS_TAG, centronics_device, write_init)) + MCFG_OUTPUT_LATCH_BIT3_HANDLER(WRITELINE(CENTRONICS_TAG, centronics_device, write_select_in)) +MACHINE_CONFIG_END //************************************************************************** @@ -99,7 +96,7 @@ void pofo_hpc101_device::device_reset() // nrdi_r - read //------------------------------------------------- -uint8_t pofo_hpc101_device::nrdi_r(offs_t offset, uint8_t data, bool iom, bool bcom, bool ncc1) +uint8_t pofo_hpc101_device::nrdi_r(address_space &space, offs_t offset, uint8_t data, bool iom, bool bcom, bool ncc1) { if (!bcom) { @@ -122,7 +119,7 @@ uint8_t pofo_hpc101_device::nrdi_r(offs_t offset, uint8_t data, bool iom, bool b // nwri_w - write //------------------------------------------------- -void pofo_hpc101_device::nwri_w(offs_t offset, uint8_t data, bool iom, bool bcom, bool ncc1) +void pofo_hpc101_device::nwri_w(address_space &space, offs_t offset, uint8_t data, bool iom, bool bcom, bool ncc1) { if (!bcom) { |