summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/bus/einstein/userport/speech.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/devices/bus/einstein/userport/speech.cpp')
-rw-r--r--src/devices/bus/einstein/userport/speech.cpp88
1 files changed, 88 insertions, 0 deletions
diff --git a/src/devices/bus/einstein/userport/speech.cpp b/src/devices/bus/einstein/userport/speech.cpp
new file mode 100644
index 00000000000..b98e5d5513e
--- /dev/null
+++ b/src/devices/bus/einstein/userport/speech.cpp
@@ -0,0 +1,88 @@
+// license: GPL-2.0+
+// copyright-holders: Dirk Best
+/***************************************************************************
+
+ Einstein Speech Synthesiser (J&K Software)
+
+ TODO: Verify implementation
+
+***************************************************************************/
+
+#include "emu.h"
+#include "speech.h"
+#include "speaker.h"
+
+
+//**************************************************************************
+// DEVICE DEFINITIONS
+//**************************************************************************
+
+DEFINE_DEVICE_TYPE(EINSTEIN_SPEECH, einstein_speech_device, "einstein_speech", "Einstein Speech Synthesiser")
+
+//-------------------------------------------------
+// rom_region - device-specific ROM region
+//-------------------------------------------------
+
+ROM_START( sp0256 )
+ ROM_REGION(0x10000, "sp0256", 0)
+ ROM_LOAD("sp0256a-al2.bin", 0x1000, 0x0800, CRC(b504ac15) SHA1(e60fcb5fa16ff3f3b69d36c7a6e955744d3feafc))
+ROM_END
+
+const tiny_rom_entry *einstein_speech_device::device_rom_region() const
+{
+ return ROM_NAME( sp0256 );
+}
+
+//-------------------------------------------------
+// device_add_mconfig - add device configuration
+//-------------------------------------------------
+
+MACHINE_CONFIG_MEMBER( einstein_speech_device::device_add_mconfig )
+ MCFG_SPEAKER_STANDARD_MONO("mono")
+ MCFG_SOUND_ADD("sp0256", SP0256, 3120000) // ???
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.00)
+MACHINE_CONFIG_END
+
+
+//**************************************************************************
+// LIVE DEVICE
+//**************************************************************************
+
+//-------------------------------------------------
+// einstein_speech_device - constructor
+//-------------------------------------------------
+
+einstein_speech_device::einstein_speech_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) :
+ device_t(mconfig, EINSTEIN_SPEECH, tag, owner, clock),
+ device_einstein_userport_interface(mconfig, *this),
+ m_sp0256(*this, "sp0256")
+{
+}
+
+//-------------------------------------------------
+// device_start - device-specific startup
+//-------------------------------------------------
+
+void einstein_speech_device::device_start()
+{
+}
+
+
+//**************************************************************************
+// IMPLEMENTATION
+//**************************************************************************
+
+// 7------- reset?
+// -6------ sp0256 lrq
+// --543210 sp0256 ald
+
+uint8_t einstein_speech_device::read()
+{
+ return m_sp0256->lrq_r() ? 0x00 : 0x40;
+}
+
+void einstein_speech_device::write(uint8_t data)
+{
+ if (BIT(data, 7) == 0)
+ m_sp0256->ald_w(machine().dummy_space(), 0, data & 0x3f);
+}