summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author arbee <rb6502@users.noreply.github.com>2025-11-24 22:11:34 -0500
committer arbee <rb6502@users.noreply.github.com>2025-11-24 22:11:34 -0500
commit9eb4671fb2d3384b7d3a92b76973c975e462590b (patch)
tree02e0d1f396da07eb93eea3e5507d71ef16445a47
parent17ddd55d7facc30412c4a91cb075d1104f5159a6 (diff)
machine/upd765.cpp: Add support for machines that have non-standard TS (two-sided) line hookups. [R. Belmont]
akai/s3000.cpp: Connect the uPD769 TS line to DSKCHG. These machines now properly detect if no disk is inserted. [R. Belmont]
-rw-r--r--src/devices/machine/upd765.cpp3
-rw-r--r--src/devices/machine/upd765.h2
-rw-r--r--src/mame/akai/s3000.cpp9
3 files changed, 14 insertions, 0 deletions
diff --git a/src/devices/machine/upd765.cpp b/src/devices/machine/upd765.cpp
index 46be1653b28..f805153c452 100644
--- a/src/devices/machine/upd765.cpp
+++ b/src/devices/machine/upd765.cpp
@@ -198,6 +198,7 @@ upd765_family_device::upd765_family_device(const machine_config &mconfig, device
drq_cb(*this),
hdl_cb(*this),
idx_cb(*this),
+ ts_cb(*this, ASSERT_LINE),
us_cb(*this)
{
}
@@ -1613,6 +1614,8 @@ uint8_t upd765_family_device::get_st3(floppy_info &fi)
if (ts_connected)
st3 |= (fi.dev->twosid_r() ? 0x00 : ST3_TS);
+ else
+ st3 |= ts_cb() ? 0x00 : ST3_TS;
}
return st3;
}
diff --git a/src/devices/machine/upd765.h b/src/devices/machine/upd765.h
index 066dc3461b1..9c0cb293a16 100644
--- a/src/devices/machine/upd765.h
+++ b/src/devices/machine/upd765.h
@@ -24,6 +24,7 @@ public:
auto hdl_wr_callback() { return hdl_cb.bind(); }
auto us_wr_callback() { return us_cb.bind(); }
auto idx_wr_callback() { return idx_cb.bind(); }
+ auto ts_rd_callback() { return ts_cb.bind(); }
virtual void map(address_map &map) = 0;
@@ -240,6 +241,7 @@ protected:
live_info cur_live, checkpoint_live;
devcb_write_line intrq_cb, drq_cb, hdl_cb, idx_cb;
+ devcb_read_line ts_cb;
devcb_write8 us_cb;
bool cur_irq, irq, drq, internal_drq, tc, tc_done, locked, mfm, scan_done;
floppy_info flopi[4];
diff --git a/src/mame/akai/s3000.cpp b/src/mame/akai/s3000.cpp
index 3e2b54c58b6..2bbadad81f3 100644
--- a/src/mame/akai/s3000.cpp
+++ b/src/mame/akai/s3000.cpp
@@ -146,6 +146,8 @@ private:
uint8_t klcs_porta_r();
void klcs_portb_w(uint8_t data);
+ uint8_t ts_r();
+
HD44780_PIXEL_UPDATE(lcd_pixel_update);
uint8_t m_key_scan_row;
@@ -266,6 +268,12 @@ void s3000_state::klcs_portb_w(uint8_t data)
}
}
+uint8_t s3000_state::ts_r()
+{
+ const auto imagedev = m_floppy->get_device();
+ return imagedev->dskchg_r();
+}
+
HD44780_PIXEL_UPDATE(s3000_state::lcd_pixel_update)
{
if (x < 5 && y < 8 && line < 2 && pos < 16)
@@ -364,6 +372,7 @@ void s3000_state::s3000(machine_config &config)
m_fdc->intrq_wr_callback().set_inputline(m_maincpu, INPUT_LINE_IRQ3);
m_fdc->intrq_wr_callback().append(m_maincpu, FUNC(v53a_device::dsr_w));
m_fdc->drq_wr_callback().set(m_maincpu, FUNC(v53a_device::dreq_w<1>));
+ m_fdc->ts_rd_callback().set(FUNC(s3000_state::ts_r));
FLOPPY_CONNECTOR(config, m_floppy, s3000_state::floppies, "35hd", add_formats).enable_sound(true);