summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author Curt Coder <curtcoder@mail.com>2013-02-07 14:55:59 +0000
committer Curt Coder <curtcoder@mail.com>2013-02-07 14:55:59 +0000
commit99c28d1fb90e7d10e596fdb48e4b2cc925112532 (patch)
tree13ad7798f22e8823b8a44a9ad96555b4c45fb08d
parentfa97d2f4e94b31e2c0aabb53e240075764504c37 (diff)
(MESS) plus4: Speech WIP. (nw)
-rw-r--r--.gitattributes8
-rw-r--r--src/emu/sound/sound.mak10
-rw-r--r--src/emu/sound/t6721a.c101
-rw-r--r--src/emu/sound/t6721a.h101
-rw-r--r--src/mess/audio/t6721.c320
-rw-r--r--src/mess/audio/t6721.h45
-rw-r--r--src/mess/drivers/plus4.c14
-rw-r--r--src/mess/includes/plus4.h18
-rw-r--r--src/mess/machine/c64_magic_voice.c207
-rw-r--r--src/mess/machine/c64_magic_voice.h71
-rw-r--r--src/mess/machine/cbmipt.c1
-rw-r--r--src/mess/machine/cbmipt.h1
-rw-r--r--src/mess/machine/mos8706.c79
-rw-r--r--src/mess/machine/mos8706.h71
-rw-r--r--src/mess/mess.mak4
15 files changed, 669 insertions, 382 deletions
diff --git a/.gitattributes b/.gitattributes
index 9cc7df0aa91..c60b43e3365 100644
--- a/.gitattributes
+++ b/.gitattributes
@@ -1635,6 +1635,8 @@ src/emu/sound/spureverb.c svneol=native#text/plain
src/emu/sound/spureverb.h svneol=native#text/plain
src/emu/sound/st0016.c svneol=native#text/plain
src/emu/sound/st0016.h svneol=native#text/plain
+src/emu/sound/t6721a.c svneol=native#text/plain
+src/emu/sound/t6721a.h svneol=native#text/plain
src/emu/sound/t6w28.c svneol=native#text/plain
src/emu/sound/t6w28.h svneol=native#text/plain
src/emu/sound/tc8830f.c svneol=native#text/plain
@@ -5804,8 +5806,6 @@ src/mess/audio/spchroms.c svneol=native#text/plain
src/mess/audio/spchroms.h svneol=native#text/plain
src/mess/audio/special.c svneol=native#text/plain
src/mess/audio/svision.c svneol=native#text/plain
-src/mess/audio/t6721.c svneol=native#text/plain
-src/mess/audio/t6721.h svneol=native#text/plain
src/mess/audio/tvc.c svneol=native#text/plain
src/mess/audio/upd1771.c svneol=native#text/plain
src/mess/audio/upd1771.h svneol=native#text/plain
@@ -6925,6 +6925,8 @@ src/mess/machine/c64_magic_desk.c svneol=native#text/plain
src/mess/machine/c64_magic_desk.h svneol=native#text/plain
src/mess/machine/c64_magic_formel.c svneol=native#text/plain
src/mess/machine/c64_magic_formel.h svneol=native#text/plain
+src/mess/machine/c64_magic_voice.c svneol=native#text/plain
+src/mess/machine/c64_magic_voice.h svneol=native#text/plain
src/mess/machine/c64_mikro_assembler.c svneol=native#text/plain
src/mess/machine/c64_mikro_assembler.h svneol=native#text/plain
src/mess/machine/c64_multiscreen.c svneol=native#text/plain
@@ -7286,6 +7288,8 @@ src/mess/machine/mos6530.c svneol=native#text/plain
src/mess/machine/mos6530.h svneol=native#text/plain
src/mess/machine/mos6702.c svneol=native#text/plain
src/mess/machine/mos6702.h svneol=native#text/plain
+src/mess/machine/mos8706.c svneol=native#text/plain
+src/mess/machine/mos8706.h svneol=native#text/plain
src/mess/machine/mos8722.c svneol=native#text/plain
src/mess/machine/mos8722.h svneol=native#text/plain
src/mess/machine/mos8726.c svneol=native#text/plain
diff --git a/src/emu/sound/sound.mak b/src/emu/sound/sound.mak
index 50fb7872c3d..962e48fe8d6 100644
--- a/src/emu/sound/sound.mak
+++ b/src/emu/sound/sound.mak
@@ -636,6 +636,16 @@ $(SOUNDOBJ)/tms5220.o: $(SOUNDSRC)/tms5220r.c
#-------------------------------------------------
+# Toshiba T6721A voice synthesizer
+#-------------------------------------------------
+
+ifneq ($(filter T6721A,$(SOUNDS)),)
+SOUNDOBJS += $(SOUNDOBJ)/t6721a.o
+endif
+
+
+
+#-------------------------------------------------
# Toshiba TC8830F sample player/recorder
#-------------------------------------------------
diff --git a/src/emu/sound/t6721a.c b/src/emu/sound/t6721a.c
new file mode 100644
index 00000000000..4da54fca736
--- /dev/null
+++ b/src/emu/sound/t6721a.c
@@ -0,0 +1,101 @@
+/**********************************************************************
+
+ Toshiba T6721A C2MOS Voice Synthesizing LSI emulation
+
+ Copyright MESS Team.
+ Visit http://mamedev.org for licensing and usage restrictions.
+
+**********************************************************************/
+
+#include "t6721a.h"
+
+
+
+//**************************************************************************
+// MACROS / CONSTANTS
+//**************************************************************************
+
+#define LOG 0
+
+
+
+//**************************************************************************
+// DEVICE DEFINITIONS
+//**************************************************************************
+
+// device type definition
+const device_type T6721A = &device_creator<t6721a_device>;
+
+
+
+//**************************************************************************
+// LIVE DEVICE
+//**************************************************************************
+
+//-------------------------------------------------
+// t6721a_device - constructor
+//-------------------------------------------------
+
+t6721a_device::t6721a_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
+ : device_t(mconfig, T6721A, "T6721A", tag, owner, clock),
+ device_sound_interface(mconfig, *this),
+ m_eos_handler(*this),
+ m_dtrd_handler(*this),
+ m_apd_handler(*this),
+ m_stream(NULL)
+{
+}
+
+
+//-------------------------------------------------
+// device_start - device-specific startup
+//-------------------------------------------------
+
+void t6721a_device::device_start()
+{
+ // resolve callbacks
+ m_eos_handler.resolve_safe();
+ m_dtrd_handler.resolve_safe();
+ m_apd_handler.resolve_safe();
+
+ // create sound stream
+ m_stream = machine().sound().stream_alloc(*this, 0, 1, machine().sample_rate());
+}
+
+
+//-------------------------------------------------
+// sound_stream_update - handle update requests for
+// our sound stream
+//-------------------------------------------------
+
+void t6721a_device::sound_stream_update(sound_stream &stream, stream_sample_t **inputs, stream_sample_t **outputs, int samples)
+{
+}
+
+
+//-------------------------------------------------
+// read -
+//-------------------------------------------------
+
+READ8_MEMBER( t6721a_device::read )
+{
+ return 0;
+}
+
+
+//-------------------------------------------------
+// write -
+//-------------------------------------------------
+
+WRITE8_MEMBER( t6721a_device::write )
+{
+}
+
+
+//-------------------------------------------------
+// di_w - data input write
+//-------------------------------------------------
+
+WRITE_LINE_MEMBER( t6721a_device::di_w )
+{
+}
diff --git a/src/emu/sound/t6721a.h b/src/emu/sound/t6721a.h
new file mode 100644
index 00000000000..66cc6c593db
--- /dev/null
+++ b/src/emu/sound/t6721a.h
@@ -0,0 +1,101 @@
+/**********************************************************************
+
+ Toshiba T6721A C2MOS Voice Synthesizing LSI emulation
+
+ Copyright MESS Team.
+ Visit http://mamedev.org for licensing and usage restrictions.
+
+**********************************************************************
+ _____ _____
+ SP3 1 |* \_/ | 42 Vdd
+ LOSS 2 | | 41 SP2
+ TS 3 | | 40 SP1
+ TSN 4 | | 39 SP0
+ W 5 | | 38 TEM
+ TDAI 6 | | 37 FR
+ TFIO 7 | | 36 BR
+ DAO 8 | | 35 OD
+ APD 9 | | 34 REP
+ phi2 10 | | 33 EXP
+ PD 11 | T6721A | 32 CK2
+ ROM ADR RST 12 | | 31 CK1
+ ROM RST 13 | | 30 M-START
+ ALD 14 | | 29 TPN
+ DI 15 | | 28 _ACL
+ DTRD 16 | | 27 CPUM
+ D3 17 | | 26 _EOS
+ D2 18 | | 25 _BSY
+ D1 19 | | 24 _CE
+ D0 20 | | 23 _RD
+ GND 21 |_____________| 22 _WR
+
+**********************************************************************/
+
+#pragma once
+
+#ifndef __T6721__
+#define __T6721__
+
+#include "emu.h"
+
+
+
+//**************************************************************************
+// INTERFACE CONFIGURATION MACROS
+//**************************************************************************
+
+#define MCFG_T6721A_EOS_HANDLER(_devcb) \
+ devcb = &t6721a_device::set_eos_handler(*device, DEVCB2_##_devcb);
+
+#define MCFG_T6721A_DTRD_HANDLER(_devcb) \
+ devcb = &t6721a_device::set_dtrd_handler(*device, DEVCB2_##_devcb);
+
+#define MCFG_T6721A_APD_HANDLER(_devcb) \
+ devcb = &t6721a_device::set_apd_handler(*device, DEVCB2_##_devcb);
+
+
+
+//**************************************************************************
+// TYPE DEFINITIONS
+//**************************************************************************
+
+// ======================> t6721a_device
+
+class t6721a_device : public device_t,
+ public device_sound_interface
+{
+public:
+ t6721a_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+
+ // static configuration helpers
+ template<class _Object> static devcb2_base &set_eos_handler(device_t &device, _Object object) { return downcast<t6721a_device &>(device).m_eos_handler.set_callback(object); }
+ template<class _Object> static devcb2_base &set_dtrd_handler(device_t &device, _Object object) { return downcast<t6721a_device &>(device).m_dtrd_handler.set_callback(object); }
+ template<class _Object> static devcb2_base &set_apd_handler(device_t &device, _Object object) { return downcast<t6721a_device &>(device).m_apd_handler.set_callback(object); }
+
+ DECLARE_READ8_MEMBER( read );
+ DECLARE_WRITE8_MEMBER( write );
+
+ DECLARE_WRITE_LINE_MEMBER( di_w );
+
+protected:
+ // device-level overrides
+ virtual void device_start();
+
+ // device_sound_interface overrides
+ virtual void sound_stream_update(sound_stream &stream, stream_sample_t **inputs, stream_sample_t **outputs, int samples);
+
+private:
+ devcb2_write_line m_eos_handler;
+ devcb2_write_line m_dtrd_handler;
+ devcb2_write_line m_apd_handler;
+
+ sound_stream *m_stream;
+};
+
+
+// device type definition
+extern const device_type T6721A;
+
+
+
+#endif
diff --git a/src/mess/audio/t6721.c b/src/mess/audio/t6721.c
deleted file mode 100644
index 2eda8857aa5..00000000000
--- a/src/mess/audio/t6721.c
+++ /dev/null
@@ -1,320 +0,0 @@
-/***************************************************************************
-
- toshiba 6721a chip approximation
- (voice output)
-
- not really working
- communication with c364 works, no speech synthesis
- includes c364 interface hardware
-
- PeT mess@utanet.at
- documentation
- www.funet.fi
-
-***************************************************************************/
-
-/*
- c364 speech
- say 0 .. 10
- rate 0 .. 15?
- voc ?
- rdy ? (only c64)
-
- 0 bit 0..3 ???
- bit 456 0?
- bit 7 writen 0 1
- reset 9 9 b
- set playback rate
- rate 4: 2 a 4 5 4 6 0 7 a (default)
- 0 0
- 1 1
- rate 2: 2 a 4 5 2 6 0 7 a
- rate 3: 3
- rate 9:
- start: 1
- 1 bit 01 set to 1 for start ?
- bit 6 polled until set (at $80ec)
- 7 set ready to transmit new byte?
- 2 0..7 sample data
-
-seems to be a toshiba t6721a build in
-(8 kHz 9bit output)
-generates output for 20ms (or 10ms) out of 6 byte voice data!
-(P?ARCOR voice synthesizing and analyzing method
- Nippon Telegraph and Telephon Public Corporation)
-End code also in voice data
-technical info at www.funet.fi covers only the chip, not
-the synthesizing method
-
-magic voice in c64:
-The internal electronics depicted in Danny's picture above are as follows, going from the MOS chip at top and then clockwise: MOS
-6525B (4383), MOS 251476-01 (8A-06 4341) system ROM, General Instruments 8343SEA (LA05-123), Toshiba T6721A (3L)
-sound generator (?), CD40105BE (RCA H 432) and a 74LS222A logic chip.
-
-*/
-
-#include "emu.h"
-#include "audio/t6721.h"
-
-
-struct t6721_state
-{
- emu_timer *timer;
-
- int busy, end_of_sample;
- int playing;
- int rate;
-
- UINT8 command_data;
- int command_state;
-
- UINT8 sample_data[6], sample_index;
-
- UINT8 state;
-
- int sample_timeindex;
- UINT8 readindex, writeindex;
- UINT64 data[0x10];
-};
-
-/*****************************************************************************
- LOGGING
-*****************************************************************************/
-
-#define VERBOSE_LEVEL 0
-#define DBG_LOG(N,M,A) \
- do { \
- if(VERBOSE_LEVEL >= N) \
- { \
- if( M ) \
- logerror("%11.6f: %-24s", device->machine().time().as_double(), (char*) M ); \
- logerror A; \
- } \
- } while(0)
-
-
-/*****************************************************************************
- INLINE FUNCTIONS
-*****************************************************************************/
-
-INLINE t6721_state *get_safe_token( device_t *device )
-{
- assert(device != NULL);
- assert(device->type() == T6721);
-
- return (t6721_state *)downcast<t6721_device *>(device)->token();
-}
-
-/*****************************************************************************
- IMPLEMENTATION
-*****************************************************************************/
-
-static TIMER_CALLBACK( t6721_speech_timer )
-{
- t6721_state *t6721 = (t6721_state *)ptr;
-
- if (!t6721->playing)
- return;
-
- if (t6721->sample_timeindex < 8000 / 50)
- {
- t6721->sample_timeindex++;
- }
- else
- {
- t6721->end_of_sample = (memcmp(t6721->sample_data, "\xff\xff\xff\xff\xff\xff", 6) == 0);
-
- /*t6721->end_of_sample = 1; */
- t6721->busy = 0;
- }
-}
-
-WRITE8_DEVICE_HANDLER( t6721_speech_w )
-{
- t6721_state *t6721 = get_safe_token(device);
-
- DBG_LOG(2, "364", ("port write %.2x %.2x\n", offset, data));
-
- switch (offset)
- {
- case 0:
- if (data & 0x80)
- {
- switch (t6721->command_state)
- {
- case 0:
- switch (t6721->command_data)
- {
- case 9: case 0xb:
- t6721->playing = 0;
- break;
- case 1: /* start */
- t6721->timer->adjust(attotime::zero, 0, attotime::from_hz(8000));
- t6721->playing = 1;
- t6721->end_of_sample = 0;
- t6721->sample_timeindex = 0;
- break;
- case 2:
- t6721->end_of_sample = 0;
- /*t6721->busy = 0; */
- t6721->timer->reset();
- t6721->playing = 0;
- break;
- case 5: /* set rate (in next nibble) */
- t6721->command_state = 1;
- break;
- case 6: /* condition */
- t6721->command_state = 2;
- break;
- }
- break;
- case 1:
- t6721->command_state = 0;
- t6721->rate = t6721->command_data;
- break;
- case 2:
- t6721->command_state = 0;
- break;
- }
- }
- else
- {
- t6721->command_data = data;
- }
- break;
- case 1:
- t6721->state = (t6721->state & ~0x3f) | data;
- break;
- case 2:
- t6721->sample_data[t6721->sample_index++] = data;
- if (t6721->sample_index == sizeof(t6721->sample_data))
- {
- DBG_LOG(1,"t6721",("%.2x%.2x%.2x%.2x%.2x%.2x\n",
- t6721->sample_data[0],
- t6721->sample_data[1],
- t6721->sample_data[2],
- t6721->sample_data[3],
- t6721->sample_data[4],
- t6721->sample_data[5]));
- t6721->sample_index = 0;
- /*t6721->end_of_sample = false; */
- t6721->busy = 1;
- t6721->state = 0;
- }
- break;
- }
-}
-
-READ8_DEVICE_HANDLER( t6721_speech_r )
-{
- t6721_state *t6721 = get_safe_token(device);
-
- int data = 0xff;
- switch (offset)
- {
- case 1:
- data = t6721->state;
- data = 1;
- if (!t6721->end_of_sample)
- {
- data |= 0x41;
- if (!t6721->busy)
- data |= 0x81;
- }
- break;
- }
- DBG_LOG(2, "364", ("port read %.2x %.2x\n", offset, data));
-
- return data;
-}
-
-/*****************************************************************************
- DEVICE INTERFACE
-*****************************************************************************/
-
-static DEVICE_START( t6721 )
-{
- t6721_state *t6721 = get_safe_token(device);
-
- t6721->timer = device->machine().scheduler().timer_alloc(FUNC(t6721_speech_timer), t6721);
-
- device->save_item(NAME(t6721->sample_data));
- device->save_item(NAME(t6721->data));
-
- device->save_item(NAME(t6721->sample_index));
- device->save_item(NAME(t6721->busy));
-
- device->save_item(NAME(t6721->end_of_sample));
- device->save_item(NAME(t6721->playing));
- device->save_item(NAME(t6721->rate));
-
- device->save_item(NAME(t6721->command_data));
- device->save_item(NAME(t6721->command_state));
- device->save_item(NAME(t6721->state));
-
- device->save_item(NAME(t6721->sample_timeindex));
-
- device->save_item(NAME(t6721->readindex));
- device->save_item(NAME(t6721->writeindex));
-}
-
-
-static DEVICE_RESET( t6721 )
-{
- t6721_state *t6721 = get_safe_token(device);
-
- memset(t6721->sample_data, 0, ARRAY_LENGTH(t6721->sample_data));
- memset(t6721->data, 0, ARRAY_LENGTH(t6721->data));
-
- t6721->sample_index = 0;
- t6721->busy = 0;
-
- t6721->end_of_sample = 0;
- t6721->playing = 0;
- t6721->rate = 0;
-
- t6721->command_data = 0;
- t6721->command_state = 0;
- t6721->state = 0;
-
- t6721->sample_timeindex = 0;
-
- t6721->readindex = 0;
- t6721->writeindex = 0;
-}
-
-const device_type T6721 = &device_creator<t6721_device>;
-
-t6721_device::t6721_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
- : device_t(mconfig, T6721, "Toshiba 6721A", tag, owner, clock)
-{
- m_token = global_alloc_clear(t6721_state);
-}
-
-//-------------------------------------------------
-// device_config_complete - perform any
-// operations now that the configuration is
-// complete
-//-------------------------------------------------
-
-void t6721_device::device_config_complete()
-{
-}
-
-//-------------------------------------------------
-// device_start - device-specific startup
-//-------------------------------------------------
-
-void t6721_device::device_start()
-{
- DEVICE_START_NAME( t6721 )(this);
-}
-
-//-------------------------------------------------
-// device_reset - device-specific reset
-//-------------------------------------------------
-
-void t6721_device::device_reset()
-{
- DEVICE_RESET_NAME( t6721 )(this);
-}
diff --git a/src/mess/audio/t6721.h b/src/mess/audio/t6721.h
deleted file mode 100644
index cc040eb28ad..00000000000
--- a/src/mess/audio/t6721.h
+++ /dev/null
@@ -1,45 +0,0 @@
-/*****************************************************************************
- *
- * audio/t6721.h
- *
- ****************************************************************************/
-
-#ifndef __T6721_H__
-#define __T6721_H__
-
-#include "devcb.h"
-/***************************************************************************
- DEVICE CONFIGURATION MACROS
-***************************************************************************/
-
-class t6721_device : public device_t
-{
-public:
- t6721_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
- ~t6721_device() { global_free(m_token); }
-
- // access to legacy token
- void *token() const { assert(m_token != NULL); return m_token; }
-protected:
- // device-level overrides
- virtual void device_config_complete();
- virtual void device_start();
- virtual void device_reset();
-private:
- // internal state
- void *m_token;
-};
-
-extern const device_type T6721;
-
-
-#define MCFG_T6721_ADD(_tag) \
- MCFG_DEVICE_ADD(_tag, T6721, 0)
-
-/*----------- defined in audio/t6721.c -----------*/
-
-DECLARE_WRITE8_DEVICE_HANDLER(t6721_speech_w);
-DECLARE_READ8_DEVICE_HANDLER(t6721_speech_r);
-
-
-#endif /* __TED7360_H__ */
diff --git a/src/mess/drivers/plus4.c b/src/mess/drivers/plus4.c
index f5ae1e5074f..6f219081597 100644
--- a/src/mess/drivers/plus4.c
+++ b/src/mess/drivers/plus4.c
@@ -135,9 +135,9 @@ UINT8 plus4_state::read_memory(address_space &space, offs_t offset, int ba, int
//logerror("offset %04x user %u 6551 %u addr_clk %u keyport %u kernal %u cs0 %u cs1 %u\n", offset,user,_6551,addr_clk,keyport,kernal,cs0,cs1);
- if (!scs && m_t6721)
+ if (!scs && m_vslsi)
{
- data = t6721_speech_r(m_t6721, space, offset & 0x03);
+ data = m_vslsi->read(space, offset & 0x03);
}
else if (!user)
{
@@ -264,9 +264,9 @@ WRITE8_MEMBER( plus4_state::write )
//logerror("write offset %04x data %02x user %u 6551 %u addr_clk %u keyport %u kernal %u cs0 %u cs1 %u\n", offset,data,user,_6551,addr_clk,keyport,kernal,cs0,cs1);
- if (!scs && m_t6721)
+ if (!scs && m_vslsi)
{
- t6721_speech_w(m_t6721, space, offset & 0x03, data);
+ m_vslsi->write(space, offset & 0x03, data);
}
else if (!user && m_spi_user)
{
@@ -940,8 +940,10 @@ MACHINE_CONFIG_END
//-------------------------------------------------
static MACHINE_CONFIG_DERIVED( v364, ntsc )
- MCFG_T6721_ADD(T6721_TAG)
- //MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
+ MCFG_SOUND_ADD(T6721A_TAG, T6721A, XTAL_640kHz)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
+
+ MCFG_MOS8706_ADD(MOS8706_TAG, XTAL_14_31818MHz/16)
MACHINE_CONFIG_END
diff --git a/src/mess/includes/plus4.h b/src/mess/includes/plus4.h
index c04344a0784..aefa2504a2a 100644
--- a/src/mess/includes/plus4.h
+++ b/src/mess/includes/plus4.h
@@ -4,26 +4,28 @@
#define __PLUS4__
#include "emu.h"
+#include "audio/mos7360.h"
#include "cpu/m6502/m7501.h"
#include "formats/cbm_snqk.h"
-#include "audio/t6721.h"
-#include "audio/mos7360.h"
-#include "machine/mos6551.h"
-#include "machine/plus4exp.h"
-#include "machine/plus4user.h"
#include "machine/cbmiec.h"
#include "machine/cbmipt.h"
#include "machine/mos6529.h"
+#include "machine/mos6551.h"
+#include "machine/mos8706.h"
#include "machine/petcass.h"
#include "machine/pla.h"
+#include "machine/plus4exp.h"
+#include "machine/plus4user.h"
#include "machine/ram.h"
+#include "sound/t6721a.h"
#define MOS7501_TAG "u2"
#define MOS7360_TAG "u1"
#define MOS6551_TAG "u3"
#define MOS6529_USER_TAG "u5"
#define MOS6529_KB_TAG "u27"
-#define T6721_TAG "t6721"
+#define T6721A_TAG "t6721a"
+#define MOS8706_TAG "mos8706"
#define PLA_TAG "u19"
#define SCREEN_TAG "screen"
#define CONTROL1_TAG "joy1"
@@ -40,7 +42,7 @@ public:
m_acia(*this, MOS6551_TAG),
m_spi_user(*this, MOS6529_USER_TAG),
m_spi_kb(*this, MOS6529_KB_TAG),
- m_t6721(*this, T6721_TAG),
+ m_vslsi(*this, MOS8706_TAG),
m_iec(*this, CBM_IEC_TAG),
m_joy1(*this, CONTROL1_TAG),
m_joy2(*this, CONTROL2_TAG),
@@ -72,7 +74,7 @@ public:
optional_device<mos6551_device> m_acia;
optional_device<mos6529_device> m_spi_user;
required_device<mos6529_device> m_spi_kb;
- optional_device<t6721_device> m_t6721;
+ optional_device<mos8706_device> m_vslsi;
required_device<cbm_iec_device> m_iec;
required_device<vcs_control_port_device> m_joy1;
required_device<vcs_control_port_device> m_joy2;
diff --git a/src/mess/machine/c64_magic_voice.c b/src/mess/machine/c64_magic_voice.c
new file mode 100644
index 00000000000..b8629be4f5a
--- /dev/null
+++ b/src/mess/machine/c64_magic_voice.c
@@ -0,0 +1,207 @@
+/**********************************************************************
+
+ Commodore Magic Voice cartridge emulation
+
+ Copyright MESS Team.
+ Visit http://mamedev.org for licensing and usage restrictions.
+
+**********************************************************************/
+
+#include "c64_magic_voice.h"
+
+
+
+//**************************************************************************
+// MACROS / CONSTANTS
+//**************************************************************************
+
+#define T6721A_TAG "u5"
+#define MOS6525_TAG "u2"
+
+
+
+//**************************************************************************
+// DEVICE DEFINITIONS
+//**************************************************************************
+
+const device_type C64_MAGIC_VOICE = &device_creator<c64_magic_voice_cartridge_device>;
+
+
+//-------------------------------------------------
+// tpi6525_interface tpi_intf
+//-------------------------------------------------
+
+static const tpi6525_interface tpi_intf =
+{
+ DEVCB_NULL,
+ DEVCB_NULL,
+ DEVCB_NULL,
+ DEVCB_NULL,
+ DEVCB_NULL,
+ DEVCB_NULL,
+ DEVCB_NULL,
+ DEVCB_NULL,
+ DEVCB_NULL
+};
+
+
+//-------------------------------------------------
+// C64_EXPANSION_INTERFACE( expansion_intf )
+//-------------------------------------------------
+
+READ8_MEMBER( c64_magic_voice_cartridge_device::dma_cd_r )
+{
+ return m_slot->dma_cd_r(offset);
+}
+
+WRITE8_MEMBER( c64_magic_voice_cartridge_device::dma_cd_w )
+{
+ m_slot->dma_cd_w(offset, data);
+}
+
+WRITE_LINE_MEMBER( c64_magic_voice_cartridge_device::irq_w )
+{
+ m_slot->irq_w(state);
+}
+
+WRITE_LINE_MEMBER( c64_magic_voice_cartridge_device::nmi_w )
+{
+ m_slot->nmi_w(state);
+}
+
+WRITE_LINE_MEMBER( c64_magic_voice_cartridge_device::dma_w )
+{
+ m_slot->dma_w(state);
+}
+
+WRITE_LINE_MEMBER( c64_magic_voice_cartridge_device::reset_w )
+{
+ m_slot->reset_w(state);
+}
+
+static C64_EXPANSION_INTERFACE( expansion_intf )
+{
+ DEVCB_DEVICE_MEMBER(DEVICE_SELF_OWNER, c64_magic_voice_cartridge_device, dma_cd_r),
+ DEVCB_DEVICE_MEMBER(DEVICE_SELF_OWNER, c64_magic_voice_cartridge_device, dma_cd_w),
+ DEVCB_DEVICE_LINE_MEMBER(DEVICE_SELF_OWNER, c64_magic_voice_cartridge_device, irq_w),
+ DEVCB_DEVICE_LINE_MEMBER(DEVICE_SELF_OWNER, c64_magic_voice_cartridge_device, nmi_w),
+ DEVCB_DEVICE_LINE_MEMBER(DEVICE_SELF_OWNER, c64_magic_voice_cartridge_device, dma_w),
+ DEVCB_DEVICE_LINE_MEMBER(DEVICE_SELF_OWNER, c64_magic_voice_cartridge_device, reset_w)
+};
+
+
+//-------------------------------------------------
+// MACHINE_CONFIG_FRAGMENT( c64_magic_voice )
+//-------------------------------------------------
+
+static MACHINE_CONFIG_FRAGMENT( c64_magic_voice )
+ MCFG_TPI6525_ADD(MOS6525_TAG, tpi_intf)
+
+ MCFG_SPEAKER_STANDARD_MONO("mono")
+ MCFG_SOUND_ADD(T6721A_TAG, T6721A, XTAL_640kHz)
+ MCFG_T6721A_EOS_HANDLER(DEVWRITELINE(MOS6525_TAG, tpi6525_device, i2_w))
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
+
+ MCFG_C64_EXPANSION_SLOT_ADD(C64_EXPANSION_SLOT_TAG, 0, expansion_intf, c64_expansion_cards, NULL, NULL)
+MACHINE_CONFIG_END
+
+
+//-------------------------------------------------
+// machine_config_additions - device-specific
+// machine configurations
+//-------------------------------------------------
+
+machine_config_constructor c64_magic_voice_cartridge_device::device_mconfig_additions() const
+{
+ return MACHINE_CONFIG_NAME( c64_magic_voice );
+}
+
+
+
+//**************************************************************************
+// LIVE DEVICE
+//**************************************************************************
+
+//-------------------------------------------------
+// c64_magic_voice_cartridge_device - constructor
+//-------------------------------------------------
+
+c64_magic_voice_cartridge_device::c64_magic_voice_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
+ device_t(mconfig, C64_MAGIC_VOICE, "C64 Magic Voice cartridge", tag, owner, clock),
+ device_c64_expansion_card_interface(mconfig, *this),
+ m_vslsi(*this, T6721A_TAG),
+ m_tpi(*this, MOS6525_TAG),
+ m_exp(*this, C64_EXPANSION_SLOT_TAG)
+{
+}
+
+
+//-------------------------------------------------
+// device_start - device-specific startup
+//-------------------------------------------------
+
+void c64_magic_voice_cartridge_device::device_start()
+{
+}
+
+
+//-------------------------------------------------
+// device_reset - device-specific reset
+//-------------------------------------------------
+
+void c64_magic_voice_cartridge_device::device_reset()
+{
+ m_tpi->reset();
+}
+
+
+//-------------------------------------------------
+// c64_cd_r - cartridge data read
+//-------------------------------------------------
+
+UINT8 c64_magic_voice_cartridge_device::c64_cd_r(address_space &space, offs_t offset, UINT8 data, int sphi2, int ba, int roml, int romh, int io1, int io2)
+{
+ data = m_exp->cd_r(space, offset, data, sphi2, ba, roml, romh, io1, io2);
+
+ if (!io2 && BIT(offset, 7))
+ {
+ m_tpi->read(space, offset & 0x07);
+ }
+
+ return data;
+}
+
+
+//-------------------------------------------------
+// c64_cd_w - cartridge data write
+//-------------------------------------------------
+
+void c64_magic_voice_cartridge_device::c64_cd_w(address_space &space, offs_t offset, UINT8 data, int sphi2, int ba, int roml, int romh, int io1, int io2)
+{
+ if (!io2 && BIT(offset, 7))
+ {
+ m_tpi->write(space, offset & 0x07, data);
+ }
+
+ m_exp->cd_w(space, offset, data, sphi2, ba, roml, romh, io1, io2);
+}
+
+
+//-------------------------------------------------
+// c64_game_r - GAME read
+//-------------------------------------------------
+
+int c64_magic_voice_cartridge_device::c64_game_r(offs_t offset, int sphi2, int ba, int rw, int hiram)
+{
+ return m_exp->game_r(offset, sphi2, ba, rw, hiram);
+}
+
+
+//-------------------------------------------------
+// c64_exrom_r - EXROM read
+//-------------------------------------------------
+
+int c64_magic_voice_cartridge_device::c64_exrom_r(offs_t offset, int sphi2, int ba, int rw, int hiram)
+{
+ return m_exp->exrom_r(offset, sphi2, ba, rw, hiram);
+}
diff --git a/src/mess/machine/c64_magic_voice.h b/src/mess/machine/c64_magic_voice.h
new file mode 100644
index 00000000000..03bfaf44e84
--- /dev/null
+++ b/src/mess/machine/c64_magic_voice.h
@@ -0,0 +1,71 @@
+/**********************************************************************
+
+ Commodore Magic Voice cartridge emulation
+
+ Copyright MESS Team.
+ Visit http://mamedev.org for licensing and usage restrictions.
+
+**********************************************************************/
+
+#pragma once
+
+#ifndef __MAGIC_VOICE__
+#define __MAGIC_VOICE__
+
+#include "emu.h"
+#include "machine/6525tpi.h"
+#include "machine/c64exp.h"
+#include "machine/cbmipt.h"
+#include "sound/t6721a.h"
+
+
+
+//**************************************************************************
+// TYPE DEFINITIONS
+//**************************************************************************
+
+// ======================> c64_magic_voice_cartridge_device
+
+class c64_magic_voice_cartridge_device : public device_t,
+ public device_c64_expansion_card_interface
+{
+public:
+ // construction/destruction
+ c64_magic_voice_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+
+ // optional information overrides
+ virtual machine_config_constructor device_mconfig_additions() const;
+
+ // not really public
+ DECLARE_READ8_MEMBER( dma_cd_r );
+ DECLARE_WRITE8_MEMBER( dma_cd_w );
+ DECLARE_WRITE_LINE_MEMBER( irq_w );
+ DECLARE_WRITE_LINE_MEMBER( nmi_w );
+ DECLARE_WRITE_LINE_MEMBER( dma_w );
+ DECLARE_WRITE_LINE_MEMBER( reset_w );
+
+protected:
+ // device-level overrides
+ virtual void device_config_complete() { m_shortname = "c64_magic_voice"; }
+ virtual void device_start();
+ virtual void device_reset();
+
+ // device_c64_expansion_card_interface overrides
+ virtual UINT8 c64_cd_r(address_space &space, offs_t offset, UINT8 data, int sphi2, int ba, int roml, int romh, int io1, int io2);
+ virtual void c64_cd_w(address_space &space, offs_t offset, UINT8 data, int sphi2, int ba, int roml, int romh, int io1, int io2);
+ virtual int c64_game_r(offs_t offset, int sphi2, int ba, int rw, int hiram);
+ virtual int c64_exrom_r(offs_t offset, int sphi2, int ba, int rw, int hiram);
+
+private:
+ required_device<t6721a_device> m_vslsi;
+ required_device<tpi6525_device> m_tpi;
+ required_device<c64_expansion_slot_device> m_exp;
+};
+
+
+// device type definition
+extern const device_type C64_MAGIC_VOICE;
+
+
+
+#endif
diff --git a/src/mess/machine/cbmipt.c b/src/mess/machine/cbmipt.c
index 38c3431640e..e33838f726d 100644
--- a/src/mess/machine/cbmipt.c
+++ b/src/mess/machine/cbmipt.c
@@ -1152,6 +1152,7 @@ SLOT_INTERFACE_START( c64_expansion_cards )
SLOT_INTERFACE_INTERNAL("mach5", C64_MACH5)
SLOT_INTERFACE_INTERNAL("magic_desk", C64_MAGIC_DESK)
SLOT_INTERFACE_INTERNAL("magic_formel", C64_MAGIC_FORMEL)
+ SLOT_INTERFACE_INTERNAL("magic_voice", C64_MAGIC_VOICE)
SLOT_INTERFACE_INTERNAL("mikroasm", C64_MIKRO_ASSEMBLER)
SLOT_INTERFACE_INTERNAL("multiscreen", C64_MULTISCREEN)
SLOT_INTERFACE_INTERNAL("ocean", C64_OCEAN)
diff --git a/src/mess/machine/cbmipt.h b/src/mess/machine/cbmipt.h
index 0f107eec607..af45e1ab8ec 100644
--- a/src/mess/machine/cbmipt.h
+++ b/src/mess/machine/cbmipt.h
@@ -34,6 +34,7 @@
#include "machine/c64_mach5.h"
#include "machine/c64_magic_desk.h"
#include "machine/c64_magic_formel.h"
+#include "machine/c64_magic_voice.h"
#include "machine/c64_mikro_assembler.h"
#include "machine/c64_multiscreen.h"
#include "machine/c64_neoram.h"
diff --git a/src/mess/machine/mos8706.c b/src/mess/machine/mos8706.c
new file mode 100644
index 00000000000..5c83553eb80
--- /dev/null
+++ b/src/mess/machine/mos8706.c
@@ -0,0 +1,79 @@
+/**********************************************************************
+
+ MOS 8706 Speech Glue Logic ASIC emulation
+
+ Copyright MESS Team.
+ Visit http://mamedev.org for licensing and usage restrictions.
+
+**********************************************************************/
+
+#include "mos8706.h"
+
+
+
+//**************************************************************************
+// MACROS / CONSTANTS
+//**************************************************************************
+
+#define LOG 0
+
+
+
+//**************************************************************************
+// DEVICE DEFINITIONS
+//**************************************************************************
+
+// device type definition
+const device_type MOS8706 = &device_creator<mos8706_device>;
+
+
+
+//**************************************************************************
+// LIVE DEVICE
+//**************************************************************************
+
+//-------------------------------------------------
+// mos8706_device - constructor
+//-------------------------------------------------
+
+mos8706_device::mos8706_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
+ : device_t(mconfig, MOS8706, "MOS8706", tag, owner, clock)
+{
+}
+
+
+//-------------------------------------------------
+// device_start - device-specific startup
+//-------------------------------------------------
+
+void mos8706_device::device_start()
+{
+}
+
+
+//-------------------------------------------------
+// device_reset - device-specific reset
+//-------------------------------------------------
+
+void mos8706_device::device_reset()
+{
+}
+
+
+//-------------------------------------------------
+// read -
+//-------------------------------------------------
+
+READ8_MEMBER( mos8706_device::read )
+{
+ return 0;
+}
+
+
+//-------------------------------------------------
+// write -
+//-------------------------------------------------
+
+WRITE8_MEMBER( mos8706_device::write )
+{
+}
diff --git a/src/mess/machine/mos8706.h b/src/mess/machine/mos8706.h
new file mode 100644
index 00000000000..9f672979210
--- /dev/null
+++ b/src/mess/machine/mos8706.h
@@ -0,0 +1,71 @@
+/**********************************************************************
+
+ MOS 8706 Speech Glue Logic ASIC emulation
+
+ Copyright MESS Team.
+ Visit http://mamedev.org for licensing and usage restrictions.
+
+**********************************************************************
+ _____ _____
+ _RES 1 |* \_/ | 28 Vdd
+ _IRQ 2 | | 27 D0
+ R/_W 3 | | 26 T6721A D0
+ phi0 4 | | 25 D1
+ _CS 5 | | 24 T6721A D1
+ A0 6 | | 23 D2
+ A1 7 | MOS8706 | 22 T6721A D2
+ 8 | | 21 D3
+ _EOS 9 | | 20 T6721A D3
+ APD 10 | | 19 D4
+ phi2 11 | | 18 D5
+ DI 12 | | 17 D6
+ DTRD 13 | | 16 D7
+ GND 14 |_____________| 15 _WR
+
+**********************************************************************/
+
+#pragma once
+
+#ifndef __MOS8706__
+#define __MOS8706__
+
+#include "emu.h"
+
+
+
+//**************************************************************************
+// INTERFACE CONFIGURATION MACROS
+//**************************************************************************
+
+#define MCFG_MOS8706_ADD(_tag, _clock) \
+ MCFG_DEVICE_ADD((_tag), MOS8706, _clock)
+
+
+
+//**************************************************************************
+// TYPE DEFINITIONS
+//**************************************************************************
+
+// ======================> mos8706_device
+
+class mos8706_device : public device_t
+{
+public:
+ mos8706_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+
+ DECLARE_READ8_MEMBER( read );
+ DECLARE_WRITE8_MEMBER( write );
+
+protected:
+ // device-level overrides
+ virtual void device_start();
+ virtual void device_reset();
+};
+
+
+// device type definition
+extern const device_type MOS8706;
+
+
+
+#endif
diff --git a/src/mess/mess.mak b/src/mess/mess.mak
index 40907804f16..d856135ab26 100644
--- a/src/mess/mess.mak
+++ b/src/mess/mess.mak
@@ -237,6 +237,7 @@ SOUNDS += TMS5200
#SOUNDS += TMS5110A
SOUNDS += LMC1992
SOUNDS += AWACS
+SOUNDS += T6721A
#-------------------------------------------------
# this is the list of driver libraries that
@@ -865,6 +866,7 @@ $(MESSOBJ)/cbm.a: \
$(MESS_MACHINE)/c64_mach5.o \
$(MESS_MACHINE)/c64_magic_desk.o \
$(MESS_MACHINE)/c64_magic_formel.o \
+ $(MESS_MACHINE)/c64_magic_voice.o \
$(MESS_MACHINE)/c64_mikro_assembler.o \
$(MESS_MACHINE)/c64_multiscreen.o \
$(MESS_MACHINE)/c64_neoram.o \
@@ -909,13 +911,13 @@ $(MESSOBJ)/cbm.a: \
$(MESS_MACHINE)/vic1111.o \
$(MESS_MACHINE)/vic1112.o \
$(MESS_MACHINE)/vic1210.o \
- $(MESS_AUDIO)/t6721.o \
$(MESS_AUDIO)/mos7360.o \
$(MESS_DRIVERS)/plus4.o \
$(MESS_MACHINE)/plus4exp.o \
$(MESS_MACHINE)/plus4user.o \
$(MESS_MACHINE)/plus4_sid.o \
$(MESS_MACHINE)/plus4_std.o \
+ $(MESS_MACHINE)/mos8706.o \
$(MESS_MACHINE)/diag264_lb_iec.o \
$(MESS_MACHINE)/diag264_lb_tape.o \
$(MESS_MACHINE)/diag264_lb_user.o \