From d0b212da470078716cceb12d4d654a5a6d3a99de Mon Sep 17 00:00:00 2001 From: AJR Date: Wed, 9 Jan 2019 23:52:50 -0500 Subject: [PATCH] upd765: Add output callback for unit/drive select lines (nw) This is intended for future use by machines in which the US/DS lines are neither directly connected to the drives nor wholly disconnected from them. --- src/devices/machine/upd765.cpp | 5 ++++- src/devices/machine/upd765.h | 2 ++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/devices/machine/upd765.cpp b/src/devices/machine/upd765.cpp index bfbf277449b..87a76515885 100644 --- a/src/devices/machine/upd765.cpp +++ b/src/devices/machine/upd765.cpp @@ -166,7 +166,8 @@ upd765_family_device::upd765_family_device(const machine_config &mconfig, device pc_fdc_interface(mconfig, type, tag, owner, clock), intrq_cb(*this), drq_cb(*this), - hdl_cb(*this) + hdl_cb(*this), + us_cb(*this) { ready_polled = true; ready_connected = true; @@ -199,6 +200,7 @@ void upd765_family_device::device_start() intrq_cb.resolve_safe(); drq_cb.resolve_safe(); hdl_cb.resolve_safe(); + us_cb.resolve_safe(); for(int i=0; i != 4; i++) { char name[2]; @@ -327,6 +329,7 @@ void upd765_family_device::set_ds(int fid) for(floppy_info &fi : flopi) if(fi.dev) fi.dev->ds_w(fid); + us_cb(fid); // record selected drive selected_drive = fid; diff --git a/src/devices/machine/upd765.h b/src/devices/machine/upd765.h index dd2e30ce78a..f921f484ee6 100644 --- a/src/devices/machine/upd765.h +++ b/src/devices/machine/upd765.h @@ -45,6 +45,7 @@ public: auto intrq_wr_callback() { return intrq_cb.bind(); } auto drq_wr_callback() { return drq_cb.bind(); } auto hdl_wr_callback() { return hdl_cb.bind(); } + auto us_wr_callback() { return us_cb.bind(); } virtual void map(address_map &map) override = 0; @@ -270,6 +271,7 @@ protected: live_info cur_live, checkpoint_live; devcb_write_line intrq_cb, drq_cb, hdl_cb; + devcb_write8 us_cb; bool cur_irq, other_irq, data_irq, drq, internal_drq, tc, tc_done, locked, mfm, scan_done; floppy_info flopi[4];