diff options
author | 2019-01-29 18:03:29 +0100 | |
---|---|---|
committer | 2019-01-29 18:03:29 +0100 | |
commit | ca1b0f3d41f6dc0853c724d19d18a661c750449b (patch) | |
tree | c9ffc5280b49c3db42d44e60a795c1df1f6d9e4a /src/devices/bus/pofo | |
parent | 08bb5cacb09cccff9cb4093326912370ba6739b3 (diff) |
output_latch: removed MCFG macros (nw)
Diffstat (limited to 'src/devices/bus/pofo')
-rw-r--r-- | src/devices/bus/pofo/hpc101.cpp | 37 |
1 files changed, 20 insertions, 17 deletions
diff --git a/src/devices/bus/pofo/hpc101.cpp b/src/devices/bus/pofo/hpc101.cpp index 93268e95bb6..f9127afa47e 100644 --- a/src/devices/bus/pofo/hpc101.cpp +++ b/src/devices/bus/pofo/hpc101.cpp @@ -33,28 +33,31 @@ DEFINE_DEVICE_TYPE(POFO_HPC101, pofo_hpc101_device, "pofo_hpc101", "Atari Portfo // device_add_mconfig - add device configuration //------------------------------------------------- -MACHINE_CONFIG_START(pofo_hpc101_device::device_add_mconfig) +void pofo_hpc101_device::device_add_mconfig(machine_config &config) +{ 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)); - 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)) - - MCFG_CENTRONICS_OUTPUT_LATCH_ADD("cent_data_out", CENTRONICS_TAG) - MCFG_DEVICE_ADD("cent_status_in", INPUT_BUFFER, 0) - - 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 + 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); + + INPUT_BUFFER(config, "cent_status_in"); + + 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)); +} //************************************************************************** |