summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/bus/spectrum/uspeech.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/devices/bus/spectrum/uspeech.cpp')
-rw-r--r--src/devices/bus/spectrum/uspeech.cpp58
1 files changed, 32 insertions, 26 deletions
diff --git a/src/devices/bus/spectrum/uspeech.cpp b/src/devices/bus/spectrum/uspeech.cpp
index d3476bbc441..0e465a6f8b6 100644
--- a/src/devices/bus/spectrum/uspeech.cpp
+++ b/src/devices/bus/spectrum/uspeech.cpp
@@ -15,7 +15,7 @@
// DEVICE DEFINITIONS
//**************************************************************************
-DEFINE_DEVICE_TYPE(SPECTRUM_USPEECH, spectrum_uspeech_device, "spectrum_uspeech", "Spectrum Currah \xC2\xB5Speech")
+DEFINE_DEVICE_TYPE(SPECTRUM_USPEECH, spectrum_uspeech_device, "spectrum_uspeech", u8"Spectrum Currah µSpeech")
//-------------------------------------------------
@@ -94,7 +94,7 @@ void spectrum_uspeech_device::device_reset()
// IMPLEMENTATION
//**************************************************************************
-READ_LINE_MEMBER(spectrum_uspeech_device::romcs)
+bool spectrum_uspeech_device::romcs()
{
return m_romcs;
}
@@ -114,21 +114,24 @@ uint8_t spectrum_uspeech_device::iorq_r(offs_t offset)
m_romcs = !m_romcs;
}
- return 0xff;
+ return offset & 1 ? m_slot->fb_r() : 0xff;
}
uint8_t spectrum_uspeech_device::mreq_r(offs_t offset)
{
uint8_t data = 0xff;
- switch (offset & 0xf000)
+ if (m_romcs)
{
- case 0x0000:
- data = m_rom->base()[offset & 0x7ff];
- break;
- case 0x1000:
- data = !m_nsp->lrq_r();
- break;
+ switch (offset & 0xf000)
+ {
+ case 0x0000:
+ data = m_rom->base()[offset & 0x7ff];
+ break;
+ case 0x1000:
+ data = !m_nsp->lrq_r();
+ break;
+ }
}
return data;
@@ -136,22 +139,25 @@ uint8_t spectrum_uspeech_device::mreq_r(offs_t offset)
void spectrum_uspeech_device::mreq_w(offs_t offset, uint8_t data)
{
- switch (offset & 0xf001)
+ if (m_romcs)
{
- case 0x1000:
- case 0x1001:
- // allophone
- m_nsp->ald_w(data & 0x3f);
- break;
-
- case 0x3000:
- // intonation low
- m_nsp->set_clock(3050000); // oscillator frequency read from hardware
- break;
-
- case 0x3001:
- // intonation high
- m_nsp->set_clock(3260000); // oscillator frequency read from hardware
- break;
+ switch (offset & 0xf001)
+ {
+ case 0x1000:
+ case 0x1001:
+ // allophone
+ m_nsp->ald_w(data & 0x3f);
+ break;
+
+ case 0x3000:
+ // intonation low
+ m_nsp->set_clock(3050000); // oscillator frequency read from hardware
+ break;
+
+ case 0x3001:
+ // intonation high
+ m_nsp->set_clock(3260000); // oscillator frequency read from hardware
+ break;
+ }
}
}