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.
This commit is contained in:
AJR 2019-01-09 23:52:50 -05:00
parent 7079d0f5fe
commit d0b212da47
2 changed files with 6 additions and 1 deletions

View File

@ -166,7 +166,8 @@ upd765_family_device::upd765_family_device(const machine_config &mconfig, device
pc_fdc_interface(mconfig, type, tag, owner, clock), pc_fdc_interface(mconfig, type, tag, owner, clock),
intrq_cb(*this), intrq_cb(*this),
drq_cb(*this), drq_cb(*this),
hdl_cb(*this) hdl_cb(*this),
us_cb(*this)
{ {
ready_polled = true; ready_polled = true;
ready_connected = true; ready_connected = true;
@ -199,6 +200,7 @@ void upd765_family_device::device_start()
intrq_cb.resolve_safe(); intrq_cb.resolve_safe();
drq_cb.resolve_safe(); drq_cb.resolve_safe();
hdl_cb.resolve_safe(); hdl_cb.resolve_safe();
us_cb.resolve_safe();
for(int i=0; i != 4; i++) { for(int i=0; i != 4; i++) {
char name[2]; char name[2];
@ -327,6 +329,7 @@ void upd765_family_device::set_ds(int fid)
for(floppy_info &fi : flopi) for(floppy_info &fi : flopi)
if(fi.dev) if(fi.dev)
fi.dev->ds_w(fid); fi.dev->ds_w(fid);
us_cb(fid);
// record selected drive // record selected drive
selected_drive = fid; selected_drive = fid;

View File

@ -45,6 +45,7 @@ public:
auto intrq_wr_callback() { return intrq_cb.bind(); } auto intrq_wr_callback() { return intrq_cb.bind(); }
auto drq_wr_callback() { return drq_cb.bind(); } auto drq_wr_callback() { return drq_cb.bind(); }
auto hdl_wr_callback() { return hdl_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; virtual void map(address_map &map) override = 0;
@ -270,6 +271,7 @@ protected:
live_info cur_live, checkpoint_live; live_info cur_live, checkpoint_live;
devcb_write_line intrq_cb, drq_cb, hdl_cb; 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; bool cur_irq, other_irq, data_irq, drq, internal_drq, tc, tc_done, locked, mfm, scan_done;
floppy_info flopi[4]; floppy_info flopi[4];