Previous 199869 Revisions Next

r20799 Thursday 7th February, 2013 at 14:55:59 UTC by Curt Coder
(MESS) plus4: Speech WIP. (nw)
[src/emu/sound]sound.mak t6721a.c* t6721a.h*
[src/mess]mess.mak
[src/mess/audio]t6721.c t6721.h
[src/mess/drivers]plus4.c
[src/mess/includes]plus4.h
[src/mess/machine]c64_magic_voice.c* c64_magic_voice.h* cbmipt.c cbmipt.h mos8706.c* mos8706.h*

trunk/src/emu/sound/t6721a.c
r0r20799
1/**********************************************************************
2
3    Toshiba T6721A C2MOS Voice Synthesizing LSI emulation
4
5    Copyright MESS Team.
6    Visit http://mamedev.org for licensing and usage restrictions.
7
8**********************************************************************/
9
10#include "t6721a.h"
11
12
13
14//**************************************************************************
15//  MACROS / CONSTANTS
16//**************************************************************************
17
18#define LOG 0
19
20
21
22//**************************************************************************
23//  DEVICE DEFINITIONS
24//**************************************************************************
25
26// device type definition
27const device_type T6721A = &device_creator<t6721a_device>;
28
29
30
31//**************************************************************************
32//  LIVE DEVICE
33//**************************************************************************
34
35//-------------------------------------------------
36//  t6721a_device - constructor
37//-------------------------------------------------
38
39t6721a_device::t6721a_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
40   : device_t(mconfig, T6721A, "T6721A", tag, owner, clock),
41      device_sound_interface(mconfig, *this),
42      m_eos_handler(*this),
43      m_dtrd_handler(*this),
44      m_apd_handler(*this),
45      m_stream(NULL)
46{
47}
48
49
50//-------------------------------------------------
51//  device_start - device-specific startup
52//-------------------------------------------------
53
54void t6721a_device::device_start()
55{
56   // resolve callbacks
57   m_eos_handler.resolve_safe();
58   m_dtrd_handler.resolve_safe();
59   m_apd_handler.resolve_safe();
60
61   // create sound stream
62   m_stream = machine().sound().stream_alloc(*this, 0, 1, machine().sample_rate());
63}
64
65
66//-------------------------------------------------
67//  sound_stream_update - handle update requests for
68//  our sound stream
69//-------------------------------------------------
70
71void t6721a_device::sound_stream_update(sound_stream &stream, stream_sample_t **inputs, stream_sample_t **outputs, int samples)
72{
73}
74
75
76//-------------------------------------------------
77//  read -
78//-------------------------------------------------
79
80READ8_MEMBER( t6721a_device::read )
81{
82   return 0;
83}
84
85
86//-------------------------------------------------
87//  write -
88//-------------------------------------------------
89
90WRITE8_MEMBER( t6721a_device::write )
91{
92}
93
94
95//-------------------------------------------------
96//  di_w - data input write
97//-------------------------------------------------
98
99WRITE_LINE_MEMBER( t6721a_device::di_w )
100{
101}
Property changes on: trunk/src/emu/sound/t6721a.c
Added: svn:mime-type
   + text/plain
Added: svn:eol-style
   + native
trunk/src/emu/sound/t6721a.h
r0r20799
1/**********************************************************************
2
3    Toshiba T6721A C2MOS Voice Synthesizing LSI emulation
4
5    Copyright MESS Team.
6    Visit http://mamedev.org for licensing and usage restrictions.
7
8**********************************************************************
9                            _____   _____
10                   SP3   1 |*    \_/     | 42  Vdd
11                  LOSS   2 |             | 41  SP2
12                    TS   3 |             | 40  SP1
13                   TSN   4 |             | 39  SP0
14                     W   5 |             | 38  TEM
15                  TDAI   6 |             | 37  FR
16                  TFIO   7 |             | 36  BR
17                   DAO   8 |             | 35  OD
18                   APD   9 |             | 34  REP
19                  phi2  10 |             | 33  EXP
20                    PD  11 |    T6721A   | 32  CK2
21           ROM ADR RST  12 |             | 31  CK1
22               ROM RST  13 |             | 30  M-START
23                   ALD  14 |             | 29  TPN
24                    DI  15 |             | 28  _ACL
25                  DTRD  16 |             | 27  CPUM
26                    D3  17 |             | 26  _EOS
27                    D2  18 |             | 25  _BSY
28                    D1  19 |             | 24  _CE
29                    D0  20 |             | 23  _RD
30                   GND  21 |_____________| 22  _WR
31
32**********************************************************************/
33
34#pragma once
35
36#ifndef __T6721__
37#define __T6721__
38
39#include "emu.h"
40
41
42
43//**************************************************************************
44//  INTERFACE CONFIGURATION MACROS
45//**************************************************************************
46
47#define MCFG_T6721A_EOS_HANDLER(_devcb) \
48   devcb = &t6721a_device::set_eos_handler(*device, DEVCB2_##_devcb);
49
50#define MCFG_T6721A_DTRD_HANDLER(_devcb) \
51   devcb = &t6721a_device::set_dtrd_handler(*device, DEVCB2_##_devcb);
52
53#define MCFG_T6721A_APD_HANDLER(_devcb) \
54   devcb = &t6721a_device::set_apd_handler(*device, DEVCB2_##_devcb);
55
56
57
58//**************************************************************************
59//  TYPE DEFINITIONS
60//**************************************************************************
61
62// ======================> t6721a_device
63
64class t6721a_device : public device_t,
65                 public device_sound_interface
66{
67public:
68   t6721a_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
69
70   // static configuration helpers
71   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); }
72   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); }
73   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); }
74
75   DECLARE_READ8_MEMBER( read );
76   DECLARE_WRITE8_MEMBER( write );
77
78   DECLARE_WRITE_LINE_MEMBER( di_w );
79
80protected:
81   // device-level overrides
82   virtual void device_start();
83
84   // device_sound_interface overrides
85   virtual void sound_stream_update(sound_stream &stream, stream_sample_t **inputs, stream_sample_t **outputs, int samples);
86
87private:
88   devcb2_write_line m_eos_handler;
89   devcb2_write_line m_dtrd_handler;
90   devcb2_write_line m_apd_handler;
91
92   sound_stream *m_stream;
93};
94
95
96// device type definition
97extern const device_type T6721A;
98
99
100
101#endif
Property changes on: trunk/src/emu/sound/t6721a.h
Added: svn:eol-style
   + native
Added: svn:mime-type
   + text/plain
trunk/src/emu/sound/sound.mak
r20798r20799
636636
637637
638638#-------------------------------------------------
639# Toshiba T6721A voice synthesizer
640#-------------------------------------------------
641
642ifneq ($(filter T6721A,$(SOUNDS)),)
643SOUNDOBJS += $(SOUNDOBJ)/t6721a.o
644endif
645
646
647
648#-------------------------------------------------
639649# Toshiba TC8830F sample player/recorder
640650#-------------------------------------------------
641651
trunk/src/mess/audio/t6721.c
r20798r20799
1/***************************************************************************
2
3    toshiba 6721a chip approximation
4    (voice output)
5
6    not really working
7     communication with c364 works, no speech synthesis
8    includes c364 interface hardware
9
10    PeT mess@utanet.at
11    documentation
12     www.funet.fi
13
14***************************************************************************/
15
16/*
17 c364 speech
18 say 0 .. 10
19 rate 0 .. 15?
20 voc ?
21 rdy ? (only c64)
22
23 0 bit 0..3 ???
24   bit 456 0?
25   bit 7 writen 0 1
26   reset 9 9 b
27   set playback rate
28    rate 4: 2 a 4 5 4 6 0 7 a (default)
29         0          0
30         1          1
31    rate 2: 2 a 4 5 2 6 0 7 a
32    rate 3:         3
33    rate 9:
34   start: 1
35 1 bit 01 set to 1 for start ?
36   bit 6 polled until set (at $80ec)
37       7 set ready to transmit new byte?
38 2 0..7 sample data
39
40seems to be a toshiba t6721a build in
41(8 kHz 9bit output)
42generates output for 20ms (or 10ms) out of 6 byte voice data!
43(P?ARCOR voice synthesizing and analyzing method
44 Nippon Telegraph and Telephon Public Corporation)
45End code also in voice data
46technical info at www.funet.fi covers only the chip, not
47the synthesizing method
48
49magic voice in c64:
50The internal electronics depicted in Danny's picture above are as follows, going from the MOS chip at top and then clockwise: MOS
516525B (4383), MOS 251476-01 (8A-06 4341) system ROM, General Instruments 8343SEA (LA05-123), Toshiba T6721A (3L)
52sound generator (?), CD40105BE (RCA H 432) and a 74LS222A logic chip.
53
54*/
55
56#include "emu.h"
57#include "audio/t6721.h"
58
59
60struct t6721_state
61{
62   emu_timer *timer;
63
64   int busy, end_of_sample;
65   int playing;
66   int rate;
67
68   UINT8 command_data;
69   int command_state;
70
71   UINT8 sample_data[6], sample_index;
72
73   UINT8 state;
74
75   int sample_timeindex;
76   UINT8 readindex, writeindex;
77   UINT64 data[0x10];
78};
79
80/*****************************************************************************
81    LOGGING
82*****************************************************************************/
83
84#define VERBOSE_LEVEL 0
85#define DBG_LOG(N,M,A) \
86   do { \
87      if(VERBOSE_LEVEL >= N) \
88      { \
89         if( M ) \
90            logerror("%11.6f: %-24s", device->machine().time().as_double(), (char*) M ); \
91         logerror A; \
92      } \
93   } while(0)
94
95
96/*****************************************************************************
97    INLINE FUNCTIONS
98*****************************************************************************/
99
100INLINE t6721_state *get_safe_token( device_t *device )
101{
102   assert(device != NULL);
103   assert(device->type() == T6721);
104
105   return (t6721_state *)downcast<t6721_device *>(device)->token();
106}
107
108/*****************************************************************************
109    IMPLEMENTATION
110*****************************************************************************/
111
112static TIMER_CALLBACK( t6721_speech_timer )
113{
114   t6721_state *t6721 = (t6721_state *)ptr;
115
116   if (!t6721->playing)
117      return;
118
119   if (t6721->sample_timeindex < 8000 / 50)
120   {
121      t6721->sample_timeindex++;
122   }
123   else
124   {
125      t6721->end_of_sample = (memcmp(t6721->sample_data, "\xff\xff\xff\xff\xff\xff", 6) == 0);
126
127      /*t6721->end_of_sample = 1; */
128      t6721->busy = 0;
129   }
130}
131
132WRITE8_DEVICE_HANDLER( t6721_speech_w )
133{
134   t6721_state *t6721 = get_safe_token(device);
135
136   DBG_LOG(2, "364", ("port write %.2x %.2x\n", offset, data));
137
138   switch (offset)
139   {
140   case 0:
141      if (data & 0x80)
142      {
143         switch (t6721->command_state)
144         {
145         case 0:
146            switch (t6721->command_data)
147            {
148            case 9: case 0xb:
149               t6721->playing = 0;
150               break;
151            case 1: /* start */
152               t6721->timer->adjust(attotime::zero, 0, attotime::from_hz(8000));
153               t6721->playing = 1;
154               t6721->end_of_sample = 0;
155               t6721->sample_timeindex = 0;
156               break;
157            case 2:
158               t6721->end_of_sample = 0;
159               /*t6721->busy = 0; */
160               t6721->timer->reset();
161               t6721->playing = 0;
162               break;
163            case 5: /* set rate (in next nibble) */
164               t6721->command_state = 1;
165               break;
166            case 6: /* condition */
167               t6721->command_state = 2;
168               break;
169            }
170            break;
171         case 1:
172            t6721->command_state = 0;
173            t6721->rate = t6721->command_data;
174            break;
175         case 2:
176            t6721->command_state = 0;
177            break;
178         }
179      }
180      else
181      {
182         t6721->command_data = data;
183      }
184      break;
185   case 1:
186      t6721->state = (t6721->state & ~0x3f) | data;
187      break;
188   case 2:
189      t6721->sample_data[t6721->sample_index++] = data;
190      if (t6721->sample_index == sizeof(t6721->sample_data))
191      {
192         DBG_LOG(1,"t6721",("%.2x%.2x%.2x%.2x%.2x%.2x\n",
193                        t6721->sample_data[0],
194                        t6721->sample_data[1],
195                        t6721->sample_data[2],
196                        t6721->sample_data[3],
197                        t6721->sample_data[4],
198                        t6721->sample_data[5]));
199         t6721->sample_index = 0;
200         /*t6721->end_of_sample = false; */
201         t6721->busy = 1;
202         t6721->state = 0;
203      }
204      break;
205   }
206}
207
208READ8_DEVICE_HANDLER( t6721_speech_r )
209{
210   t6721_state *t6721 = get_safe_token(device);
211
212   int data = 0xff;
213   switch (offset)
214   {
215   case 1:
216      data = t6721->state;
217      data = 1;
218      if (!t6721->end_of_sample)
219      {
220            data |= 0x41;
221            if (!t6721->busy)
222               data |= 0x81;
223      }
224      break;
225   }
226   DBG_LOG(2, "364", ("port read %.2x %.2x\n", offset, data));
227
228   return data;
229}
230
231/*****************************************************************************
232    DEVICE INTERFACE
233*****************************************************************************/
234
235static DEVICE_START( t6721 )
236{
237   t6721_state *t6721 = get_safe_token(device);
238
239   t6721->timer = device->machine().scheduler().timer_alloc(FUNC(t6721_speech_timer), t6721);
240
241   device->save_item(NAME(t6721->sample_data));
242   device->save_item(NAME(t6721->data));
243
244   device->save_item(NAME(t6721->sample_index));
245   device->save_item(NAME(t6721->busy));
246
247   device->save_item(NAME(t6721->end_of_sample));
248   device->save_item(NAME(t6721->playing));
249   device->save_item(NAME(t6721->rate));
250
251   device->save_item(NAME(t6721->command_data));
252   device->save_item(NAME(t6721->command_state));
253   device->save_item(NAME(t6721->state));
254
255   device->save_item(NAME(t6721->sample_timeindex));
256
257   device->save_item(NAME(t6721->readindex));
258   device->save_item(NAME(t6721->writeindex));
259}
260
261
262static DEVICE_RESET( t6721 )
263{
264   t6721_state *t6721 = get_safe_token(device);
265
266   memset(t6721->sample_data, 0, ARRAY_LENGTH(t6721->sample_data));
267   memset(t6721->data, 0, ARRAY_LENGTH(t6721->data));
268
269   t6721->sample_index = 0;
270   t6721->busy = 0;
271
272   t6721->end_of_sample = 0;
273   t6721->playing = 0;
274   t6721->rate = 0;
275
276   t6721->command_data = 0;
277   t6721->command_state = 0;
278   t6721->state = 0;
279
280   t6721->sample_timeindex = 0;
281
282   t6721->readindex = 0;
283   t6721->writeindex = 0;
284}
285
286const device_type T6721 = &device_creator<t6721_device>;
287
288t6721_device::t6721_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
289   : device_t(mconfig, T6721, "Toshiba 6721A", tag, owner, clock)
290{
291   m_token = global_alloc_clear(t6721_state);
292}
293
294//-------------------------------------------------
295//  device_config_complete - perform any
296//  operations now that the configuration is
297//  complete
298//-------------------------------------------------
299
300void t6721_device::device_config_complete()
301{
302}
303
304//-------------------------------------------------
305//  device_start - device-specific startup
306//-------------------------------------------------
307
308void t6721_device::device_start()
309{
310   DEVICE_START_NAME( t6721 )(this);
311}
312
313//-------------------------------------------------
314//  device_reset - device-specific reset
315//-------------------------------------------------
316
317void t6721_device::device_reset()
318{
319   DEVICE_RESET_NAME( t6721 )(this);
320}
trunk/src/mess/audio/t6721.h
r20798r20799
1/*****************************************************************************
2 *
3 * audio/t6721.h
4 *
5 ****************************************************************************/
6
7#ifndef __T6721_H__
8#define __T6721_H__
9
10#include "devcb.h"
11/***************************************************************************
12    DEVICE CONFIGURATION MACROS
13***************************************************************************/
14
15class t6721_device : public device_t
16{
17public:
18   t6721_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
19   ~t6721_device() { global_free(m_token); }
20
21   // access to legacy token
22   void *token() const { assert(m_token != NULL); return m_token; }
23protected:
24   // device-level overrides
25   virtual void device_config_complete();
26   virtual void device_start();
27   virtual void device_reset();
28private:
29   // internal state
30   void *m_token;
31};
32
33extern const device_type T6721;
34
35
36#define MCFG_T6721_ADD(_tag) \
37   MCFG_DEVICE_ADD(_tag, T6721, 0)
38
39/*----------- defined in audio/t6721.c -----------*/
40
41DECLARE_WRITE8_DEVICE_HANDLER(t6721_speech_w);
42DECLARE_READ8_DEVICE_HANDLER(t6721_speech_r);
43
44
45#endif /* __TED7360_H__ */
trunk/src/mess/machine/c64_magic_voice.c
r0r20799
1/**********************************************************************
2
3    Commodore Magic Voice cartridge emulation
4
5    Copyright MESS Team.
6    Visit http://mamedev.org for licensing and usage restrictions.
7
8**********************************************************************/
9
10#include "c64_magic_voice.h"
11
12
13
14//**************************************************************************
15//  MACROS / CONSTANTS
16//**************************************************************************
17
18#define T6721A_TAG   "u5"
19#define MOS6525_TAG   "u2"
20
21
22
23//**************************************************************************
24//  DEVICE DEFINITIONS
25//**************************************************************************
26
27const device_type C64_MAGIC_VOICE = &device_creator<c64_magic_voice_cartridge_device>;
28
29
30//-------------------------------------------------
31//  tpi6525_interface tpi_intf
32//-------------------------------------------------
33
34static const tpi6525_interface tpi_intf =
35{
36   DEVCB_NULL,
37   DEVCB_NULL,
38   DEVCB_NULL,
39   DEVCB_NULL,
40   DEVCB_NULL,
41   DEVCB_NULL,
42   DEVCB_NULL,
43   DEVCB_NULL,
44   DEVCB_NULL
45};
46
47
48//-------------------------------------------------
49//  C64_EXPANSION_INTERFACE( expansion_intf )
50//-------------------------------------------------
51
52READ8_MEMBER( c64_magic_voice_cartridge_device::dma_cd_r )
53{
54   return m_slot->dma_cd_r(offset);
55}
56
57WRITE8_MEMBER( c64_magic_voice_cartridge_device::dma_cd_w )
58{
59   m_slot->dma_cd_w(offset, data);
60}
61
62WRITE_LINE_MEMBER( c64_magic_voice_cartridge_device::irq_w )
63{
64   m_slot->irq_w(state);
65}
66
67WRITE_LINE_MEMBER( c64_magic_voice_cartridge_device::nmi_w )
68{
69   m_slot->nmi_w(state);
70}
71
72WRITE_LINE_MEMBER( c64_magic_voice_cartridge_device::dma_w )
73{
74   m_slot->dma_w(state);
75}
76
77WRITE_LINE_MEMBER( c64_magic_voice_cartridge_device::reset_w )
78{
79   m_slot->reset_w(state);
80}
81
82static C64_EXPANSION_INTERFACE( expansion_intf )
83{
84   DEVCB_DEVICE_MEMBER(DEVICE_SELF_OWNER, c64_magic_voice_cartridge_device, dma_cd_r),
85   DEVCB_DEVICE_MEMBER(DEVICE_SELF_OWNER, c64_magic_voice_cartridge_device, dma_cd_w),
86   DEVCB_DEVICE_LINE_MEMBER(DEVICE_SELF_OWNER, c64_magic_voice_cartridge_device, irq_w),
87   DEVCB_DEVICE_LINE_MEMBER(DEVICE_SELF_OWNER, c64_magic_voice_cartridge_device, nmi_w),
88   DEVCB_DEVICE_LINE_MEMBER(DEVICE_SELF_OWNER, c64_magic_voice_cartridge_device, dma_w),
89   DEVCB_DEVICE_LINE_MEMBER(DEVICE_SELF_OWNER, c64_magic_voice_cartridge_device, reset_w)
90};
91
92
93//-------------------------------------------------
94//  MACHINE_CONFIG_FRAGMENT( c64_magic_voice )
95//-------------------------------------------------
96
97static MACHINE_CONFIG_FRAGMENT( c64_magic_voice )
98   MCFG_TPI6525_ADD(MOS6525_TAG, tpi_intf)
99
100   MCFG_SPEAKER_STANDARD_MONO("mono")
101   MCFG_SOUND_ADD(T6721A_TAG, T6721A, XTAL_640kHz)
102   MCFG_T6721A_EOS_HANDLER(DEVWRITELINE(MOS6525_TAG, tpi6525_device, i2_w))
103   MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
104
105   MCFG_C64_EXPANSION_SLOT_ADD(C64_EXPANSION_SLOT_TAG, 0, expansion_intf, c64_expansion_cards, NULL, NULL)
106MACHINE_CONFIG_END
107
108
109//-------------------------------------------------
110//  machine_config_additions - device-specific
111//  machine configurations
112//-------------------------------------------------
113
114machine_config_constructor c64_magic_voice_cartridge_device::device_mconfig_additions() const
115{
116   return MACHINE_CONFIG_NAME( c64_magic_voice );
117}
118
119
120
121//**************************************************************************
122//  LIVE DEVICE
123//**************************************************************************
124
125//-------------------------------------------------
126//  c64_magic_voice_cartridge_device - constructor
127//-------------------------------------------------
128
129c64_magic_voice_cartridge_device::c64_magic_voice_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
130   device_t(mconfig, C64_MAGIC_VOICE, "C64 Magic Voice cartridge", tag, owner, clock),
131   device_c64_expansion_card_interface(mconfig, *this),
132   m_vslsi(*this, T6721A_TAG),
133   m_tpi(*this, MOS6525_TAG),
134   m_exp(*this, C64_EXPANSION_SLOT_TAG)
135{
136}
137
138
139//-------------------------------------------------
140//  device_start - device-specific startup
141//-------------------------------------------------
142
143void c64_magic_voice_cartridge_device::device_start()
144{
145}
146
147
148//-------------------------------------------------
149//  device_reset - device-specific reset
150//-------------------------------------------------
151
152void c64_magic_voice_cartridge_device::device_reset()
153{
154   m_tpi->reset();
155}
156
157
158//-------------------------------------------------
159//  c64_cd_r - cartridge data read
160//-------------------------------------------------
161
162UINT8 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)
163{
164   data = m_exp->cd_r(space, offset, data, sphi2, ba, roml, romh, io1, io2);
165
166   if (!io2 && BIT(offset, 7))
167   {
168      m_tpi->read(space, offset & 0x07);
169   }
170
171   return data;
172}
173
174
175//-------------------------------------------------
176//  c64_cd_w - cartridge data write
177//-------------------------------------------------
178
179void 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)
180{
181   if (!io2 && BIT(offset, 7))
182   {
183      m_tpi->write(space, offset & 0x07, data);
184   }
185
186   m_exp->cd_w(space, offset, data, sphi2, ba, roml, romh, io1, io2);
187}
188
189
190//-------------------------------------------------
191//  c64_game_r - GAME read
192//-------------------------------------------------
193
194int c64_magic_voice_cartridge_device::c64_game_r(offs_t offset, int sphi2, int ba, int rw, int hiram)
195{
196   return m_exp->game_r(offset, sphi2, ba, rw, hiram);
197}
198
199
200//-------------------------------------------------
201//  c64_exrom_r - EXROM read
202//-------------------------------------------------
203
204int c64_magic_voice_cartridge_device::c64_exrom_r(offs_t offset, int sphi2, int ba, int rw, int hiram)
205{
206   return m_exp->exrom_r(offset, sphi2, ba, rw, hiram);
207}
Property changes on: trunk/src/mess/machine/c64_magic_voice.c
Added: svn:eol-style
   + native
Added: svn:mime-type
   + text/plain
trunk/src/mess/machine/c64_magic_voice.h
r0r20799
1/**********************************************************************
2
3    Commodore Magic Voice cartridge emulation
4
5    Copyright MESS Team.
6    Visit http://mamedev.org for licensing and usage restrictions.
7
8**********************************************************************/
9
10#pragma once
11
12#ifndef __MAGIC_VOICE__
13#define __MAGIC_VOICE__
14
15#include "emu.h"
16#include "machine/6525tpi.h"
17#include "machine/c64exp.h"
18#include "machine/cbmipt.h"
19#include "sound/t6721a.h"
20
21
22
23//**************************************************************************
24//  TYPE DEFINITIONS
25//**************************************************************************
26
27// ======================> c64_magic_voice_cartridge_device
28
29class c64_magic_voice_cartridge_device : public device_t,
30                               public device_c64_expansion_card_interface
31{
32public:
33   // construction/destruction
34   c64_magic_voice_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
35
36   // optional information overrides
37   virtual machine_config_constructor device_mconfig_additions() const;
38
39   // not really public
40   DECLARE_READ8_MEMBER( dma_cd_r );
41   DECLARE_WRITE8_MEMBER( dma_cd_w );
42   DECLARE_WRITE_LINE_MEMBER( irq_w );
43   DECLARE_WRITE_LINE_MEMBER( nmi_w );
44   DECLARE_WRITE_LINE_MEMBER( dma_w );
45   DECLARE_WRITE_LINE_MEMBER( reset_w );
46
47protected:
48   // device-level overrides
49   virtual void device_config_complete() { m_shortname = "c64_magic_voice"; }
50   virtual void device_start();
51   virtual void device_reset();
52
53   // device_c64_expansion_card_interface overrides
54   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);
55   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);
56   virtual int c64_game_r(offs_t offset, int sphi2, int ba, int rw, int hiram);
57   virtual int c64_exrom_r(offs_t offset, int sphi2, int ba, int rw, int hiram);
58
59private:
60   required_device<t6721a_device> m_vslsi;
61   required_device<tpi6525_device> m_tpi;
62   required_device<c64_expansion_slot_device> m_exp;
63};
64
65
66// device type definition
67extern const device_type C64_MAGIC_VOICE;
68
69
70
71#endif
Property changes on: trunk/src/mess/machine/c64_magic_voice.h
Added: svn:eol-style
   + native
Added: svn:mime-type
   + text/plain
trunk/src/mess/machine/mos8706.c
r0r20799
1/**********************************************************************
2
3    MOS 8706 Speech Glue Logic ASIC emulation
4
5    Copyright MESS Team.
6    Visit http://mamedev.org for licensing and usage restrictions.
7
8**********************************************************************/
9
10#include "mos8706.h"
11
12
13
14//**************************************************************************
15//  MACROS / CONSTANTS
16//**************************************************************************
17
18#define LOG 0
19
20
21
22//**************************************************************************
23//  DEVICE DEFINITIONS
24//**************************************************************************
25
26// device type definition
27const device_type MOS8706 = &device_creator<mos8706_device>;
28
29
30
31//**************************************************************************
32//  LIVE DEVICE
33//**************************************************************************
34
35//-------------------------------------------------
36//  mos8706_device - constructor
37//-------------------------------------------------
38
39mos8706_device::mos8706_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
40   : device_t(mconfig, MOS8706, "MOS8706", tag, owner, clock)
41{
42}
43
44
45//-------------------------------------------------
46//  device_start - device-specific startup
47//-------------------------------------------------
48
49void mos8706_device::device_start()
50{
51}
52
53
54//-------------------------------------------------
55//  device_reset - device-specific reset
56//-------------------------------------------------
57
58void mos8706_device::device_reset()
59{
60}
61
62
63//-------------------------------------------------
64//  read -
65//-------------------------------------------------
66
67READ8_MEMBER( mos8706_device::read )
68{
69   return 0;
70}
71
72
73//-------------------------------------------------
74//  write -
75//-------------------------------------------------
76
77WRITE8_MEMBER( mos8706_device::write )
78{
79}
Property changes on: trunk/src/mess/machine/mos8706.c
Added: svn:mime-type
   + text/plain
Added: svn:eol-style
   + native
trunk/src/mess/machine/mos8706.h
r0r20799
1/**********************************************************************
2
3    MOS 8706 Speech Glue Logic ASIC emulation
4
5    Copyright MESS Team.
6    Visit http://mamedev.org for licensing and usage restrictions.
7
8**********************************************************************
9                            _____   _____
10                  _RES   1 |*    \_/     | 28  Vdd
11                  _IRQ   2 |             | 27  D0
12                  R/_W   3 |             | 26  T6721A D0
13                  phi0   4 |             | 25  D1
14                   _CS   5 |             | 24  T6721A D1
15                    A0   6 |             | 23  D2
16                    A1   7 |   MOS8706   | 22  T6721A D2
17                         8 |             | 21  D3
18                  _EOS   9 |             | 20  T6721A D3
19                   APD  10 |             | 19  D4
20                  phi2  11 |             | 18  D5
21                    DI  12 |             | 17  D6
22                  DTRD  13 |             | 16  D7
23                   GND  14 |_____________| 15  _WR
24
25**********************************************************************/
26
27#pragma once
28
29#ifndef __MOS8706__
30#define __MOS8706__
31
32#include "emu.h"
33
34
35
36//**************************************************************************
37//  INTERFACE CONFIGURATION MACROS
38//**************************************************************************
39
40#define MCFG_MOS8706_ADD(_tag, _clock) \
41   MCFG_DEVICE_ADD((_tag), MOS8706, _clock)
42
43
44
45//**************************************************************************
46//  TYPE DEFINITIONS
47//**************************************************************************
48
49// ======================> mos8706_device
50
51class mos8706_device : public device_t
52{
53public:
54   mos8706_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
55
56   DECLARE_READ8_MEMBER( read );
57   DECLARE_WRITE8_MEMBER( write );
58
59protected:
60   // device-level overrides
61   virtual void device_start();
62   virtual void device_reset();
63};
64
65
66// device type definition
67extern const device_type MOS8706;
68
69
70
71#endif
Property changes on: trunk/src/mess/machine/mos8706.h
Added: svn:eol-style
   + native
Added: svn:mime-type
   + text/plain
trunk/src/mess/machine/cbmipt.c
r20798r20799
11521152   SLOT_INTERFACE_INTERNAL("mach5", C64_MACH5)
11531153   SLOT_INTERFACE_INTERNAL("magic_desk", C64_MAGIC_DESK)
11541154   SLOT_INTERFACE_INTERNAL("magic_formel", C64_MAGIC_FORMEL)
1155   SLOT_INTERFACE_INTERNAL("magic_voice", C64_MAGIC_VOICE)
11551156   SLOT_INTERFACE_INTERNAL("mikroasm", C64_MIKRO_ASSEMBLER)
11561157   SLOT_INTERFACE_INTERNAL("multiscreen", C64_MULTISCREEN)
11571158   SLOT_INTERFACE_INTERNAL("ocean", C64_OCEAN)
trunk/src/mess/machine/cbmipt.h
r20798r20799
3434#include "machine/c64_mach5.h"
3535#include "machine/c64_magic_desk.h"
3636#include "machine/c64_magic_formel.h"
37#include "machine/c64_magic_voice.h"
3738#include "machine/c64_mikro_assembler.h"
3839#include "machine/c64_multiscreen.h"
3940#include "machine/c64_neoram.h"
trunk/src/mess/includes/plus4.h
r20798r20799
44#define __PLUS4__
55
66#include "emu.h"
7#include "audio/mos7360.h"
78#include "cpu/m6502/m7501.h"
89#include "formats/cbm_snqk.h"
9#include "audio/t6721.h"
10#include "audio/mos7360.h"
11#include "machine/mos6551.h"
12#include "machine/plus4exp.h"
13#include "machine/plus4user.h"
1410#include "machine/cbmiec.h"
1511#include "machine/cbmipt.h"
1612#include "machine/mos6529.h"
13#include "machine/mos6551.h"
14#include "machine/mos8706.h"
1715#include "machine/petcass.h"
1816#include "machine/pla.h"
17#include "machine/plus4exp.h"
18#include "machine/plus4user.h"
1919#include "machine/ram.h"
20#include "sound/t6721a.h"
2021
2122#define MOS7501_TAG         "u2"
2223#define MOS7360_TAG         "u1"
2324#define MOS6551_TAG         "u3"
2425#define MOS6529_USER_TAG    "u5"
2526#define MOS6529_KB_TAG      "u27"
26#define T6721_TAG           "t6721"
27#define T6721A_TAG          "t6721a"
28#define MOS8706_TAG         "mos8706"
2729#define PLA_TAG             "u19"
2830#define SCREEN_TAG          "screen"
2931#define CONTROL1_TAG       "joy1"
r20798r20799
4042         m_acia(*this, MOS6551_TAG),
4143         m_spi_user(*this, MOS6529_USER_TAG),
4244         m_spi_kb(*this, MOS6529_KB_TAG),
43         m_t6721(*this, T6721_TAG),
45         m_vslsi(*this, MOS8706_TAG),
4446         m_iec(*this, CBM_IEC_TAG),
4547         m_joy1(*this, CONTROL1_TAG),
4648         m_joy2(*this, CONTROL2_TAG),
r20798r20799
7274   optional_device<mos6551_device> m_acia;
7375   optional_device<mos6529_device> m_spi_user;
7476   required_device<mos6529_device> m_spi_kb;
75   optional_device<t6721_device> m_t6721;
77   optional_device<mos8706_device> m_vslsi;
7678   required_device<cbm_iec_device> m_iec;
7779   required_device<vcs_control_port_device> m_joy1;
7880   required_device<vcs_control_port_device> m_joy2;
trunk/src/mess/drivers/plus4.c
r20798r20799
135135
136136   //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);
137137
138   if (!scs && m_t6721)
138   if (!scs && m_vslsi)
139139   {
140      data = t6721_speech_r(m_t6721, space, offset & 0x03);
140      data = m_vslsi->read(space, offset & 0x03);
141141   }
142142   else if (!user)
143143   {
r20798r20799
264264
265265   //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);
266266
267   if (!scs && m_t6721)
267   if (!scs && m_vslsi)
268268   {
269      t6721_speech_w(m_t6721, space, offset & 0x03, data);
269      m_vslsi->write(space, offset & 0x03, data);
270270   }
271271   else if (!user && m_spi_user)
272272   {
r20798r20799
940940//-------------------------------------------------
941941
942942static MACHINE_CONFIG_DERIVED( v364, ntsc )
943   MCFG_T6721_ADD(T6721_TAG)
944   //MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
943   MCFG_SOUND_ADD(T6721A_TAG, T6721A, XTAL_640kHz)
944   MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
945
946   MCFG_MOS8706_ADD(MOS8706_TAG, XTAL_14_31818MHz/16)
945947MACHINE_CONFIG_END
946948
947949
trunk/src/mess/mess.mak
r20798r20799
237237#SOUNDS += TMS5110A
238238SOUNDS += LMC1992
239239SOUNDS += AWACS
240SOUNDS += T6721A
240241
241242#-------------------------------------------------
242243# this is the list of driver libraries that
r20798r20799
865866   $(MESS_MACHINE)/c64_mach5.o \
866867   $(MESS_MACHINE)/c64_magic_desk.o    \
867868   $(MESS_MACHINE)/c64_magic_formel.o  \
869   $(MESS_MACHINE)/c64_magic_voice.o    \
868870   $(MESS_MACHINE)/c64_mikro_assembler.o   \
869871   $(MESS_MACHINE)/c64_multiscreen.o   \
870872   $(MESS_MACHINE)/c64_neoram.o    \
r20798r20799
909911   $(MESS_MACHINE)/vic1111.o   \
910912   $(MESS_MACHINE)/vic1112.o   \
911913   $(MESS_MACHINE)/vic1210.o   \
912   $(MESS_AUDIO)/t6721.o       \
913914   $(MESS_AUDIO)/mos7360.o     \
914915   $(MESS_DRIVERS)/plus4.o     \
915916   $(MESS_MACHINE)/plus4exp.o  \
916917   $(MESS_MACHINE)/plus4user.o \
917918   $(MESS_MACHINE)/plus4_sid.o \
918919   $(MESS_MACHINE)/plus4_std.o \
920   $(MESS_MACHINE)/mos8706.o   \
919921   $(MESS_MACHINE)/diag264_lb_iec.o    \
920922   $(MESS_MACHINE)/diag264_lb_tape.o   \
921923   $(MESS_MACHINE)/diag264_lb_user.o   \

Previous 199869 Revisions Next


© 1997-2024 The MAME Team