summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author AJR <ajrhacker@users.noreply.github.com>2019-04-17 19:47:17 -0400
committer AJR <ajrhacker@users.noreply.github.com>2019-04-17 19:47:17 -0400
commit2ecfd840e8476f80b72f046753427cf46601cd8d (patch)
treed4dbf6ce080f2abe88a2b86b884c57efa260e4e0
parente812e77567e81a2eab033840c7d88eb6911fc3a8 (diff)
wd37c65c: Allow second clock to be configured (not used yet) (nw)
-rw-r--r--src/devices/bus/isa/cl_sh260.cpp3
-rw-r--r--src/devices/machine/upd765.cpp6
-rw-r--r--src/devices/machine/upd765.h13
3 files changed, 19 insertions, 3 deletions
diff --git a/src/devices/bus/isa/cl_sh260.cpp b/src/devices/bus/isa/cl_sh260.cpp
index f8fb39249f5..a06b7b625a6 100644
--- a/src/devices/bus/isa/cl_sh260.cpp
+++ b/src/devices/bus/isa/cl_sh260.cpp
@@ -68,8 +68,7 @@ void isa16_jc1310_device::device_add_mconfig(machine_config &config)
mcu.set_addrmap(AS_PROGRAM, &isa16_jc1310_device::i8031_map);
mcu.set_addrmap(AS_IO, &isa16_jc1310_device::ext_map);
- WD37C65C(config, m_fdc, 16_MHz_XTAL); // WD37C65B-PL
- //m_fdc->set_clock2(9.6_MHz_XTAL);
+ WD37C65C(config, m_fdc, 16_MHz_XTAL, 9.6_MHz_XTAL); // WD37C65B-PL
}
ROM_START(ev346)
diff --git a/src/devices/machine/upd765.cpp b/src/devices/machine/upd765.cpp
index 9de742a39d9..3d763187bd8 100644
--- a/src/devices/machine/upd765.cpp
+++ b/src/devices/machine/upd765.cpp
@@ -2966,12 +2966,16 @@ pc8477a_device::pc8477a_device(const machine_config &mconfig, const char *tag, d
select_multiplexed = false;
}
-wd37c65c_device::wd37c65c_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : upd765_family_device(mconfig, WD37C65C, tag, owner, clock)
+wd37c65c_device::wd37c65c_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) :
+ upd765_family_device(mconfig, WD37C65C, tag, owner, clock),
+ m_clock2(0)
{
ready_polled = true;
ready_connected = false;
select_connected = true;
select_multiplexed = false;
+
+ (void)m_clock2; // TODO
}
mcs3201_device::mcs3201_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) :
diff --git a/src/devices/machine/upd765.h b/src/devices/machine/upd765.h
index ae32663f0da..f796673d77a 100644
--- a/src/devices/machine/upd765.h
+++ b/src/devices/machine/upd765.h
@@ -518,7 +518,20 @@ class wd37c65c_device : public upd765_family_device {
public:
wd37c65c_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
+ template <typename X>
+ wd37c65c_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, X &&clock2)
+ : wd37c65c_device(mconfig, tag, owner, clock)
+ {
+ set_clock2(std::forward<X>(clock2));
+ }
+
+ void set_clock2(uint32_t clock) { m_clock2 = clock; }
+ void set_clock2(const XTAL &xtal) { set_clock2(xtal.value()); }
+
virtual void map(address_map &map) override;
+
+private:
+ uint32_t m_clock2;
};
class mcs3201_device : public upd765_family_device {