summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author Nigel Barnes <Pernod70@users.noreply.github.com>2019-03-13 17:20:15 +0000
committer Nigel Barnes <Pernod70@users.noreply.github.com>2019-03-13 18:31:42 +0000
commit169643596920a522f0b94168dae78e092831b4de (patch)
tree5e418b489466d4f4f5f16a6f4741e1f064938ad5
parent2cd7fa0a6c7342a331b71bd627dddb9f65ebd016 (diff)
spectrum_uspeech: Use measured oscillator frequencies, and toggle ROM also on IORQ as used in Rockfall1/2. [Thomas Busse]
-rw-r--r--src/devices/bus/spectrum/uspeech.cpp17
-rw-r--r--src/devices/bus/spectrum/uspeech.h1
2 files changed, 15 insertions, 3 deletions
diff --git a/src/devices/bus/spectrum/uspeech.cpp b/src/devices/bus/spectrum/uspeech.cpp
index e3d5fca54d2..60374fd3c2c 100644
--- a/src/devices/bus/spectrum/uspeech.cpp
+++ b/src/devices/bus/spectrum/uspeech.cpp
@@ -107,6 +107,16 @@ void spectrum_uspeech_device::opcode_fetch(offs_t offset)
}
}
+uint8_t spectrum_uspeech_device::iorq_r(offs_t offset)
+{
+ if (!machine().side_effects_disabled() && (offset == 0x0038))
+ {
+ m_romcs = !m_romcs;
+ }
+
+ return 0xff;
+}
+
uint8_t spectrum_uspeech_device::mreq_r(offs_t offset)
{
uint8_t data = 0xff;
@@ -117,7 +127,7 @@ uint8_t spectrum_uspeech_device::mreq_r(offs_t offset)
data = m_rom->base()[offset & 0x7ff];
break;
case 0x1000:
- data = !m_nsp->lrq_r(); // (m_nsp->lrq_r() && (m_nsp->sby_r() != 0)) ? 0x00 : 0x01;
+ data = !m_nsp->lrq_r();
break;
}
@@ -129,18 +139,19 @@ void spectrum_uspeech_device::mreq_w(offs_t offset, uint8_t data)
switch (offset & 0xf001)
{
case 0x1000:
+ case 0x1001:
// allophone
m_nsp->ald_w(data & 0x3f);
break;
case 0x3000:
// intonation low
- m_nsp->set_clock(3500000); // CK / 4 ??
+ m_nsp->set_clock(3050000); // oscillator frequency read from hardware
break;
case 0x3001:
// intonation high
- m_nsp->set_clock(3800000); // TODO: the exact frequency is unknown
+ m_nsp->set_clock(3260000); // oscillator frequency read from hardware
break;
}
}
diff --git a/src/devices/bus/spectrum/uspeech.h b/src/devices/bus/spectrum/uspeech.h
index 31fe8c65b85..8013abf9222 100644
--- a/src/devices/bus/spectrum/uspeech.h
+++ b/src/devices/bus/spectrum/uspeech.h
@@ -44,6 +44,7 @@ protected:
virtual DECLARE_READ_LINE_MEMBER(romcs) override;
virtual uint8_t mreq_r(offs_t offset) override;
virtual void mreq_w(offs_t offset, uint8_t data) override;
+ virtual uint8_t iorq_r(offs_t offset) override;
private:
required_device<sp0256_device> m_nsp;