Previous 199869 Revisions Next

r29572 Saturday 12th April, 2014 at 16:47:40 UTC by Fabio Priuli
cvs.c: updated the driver to use modern speech rom reading. [Fabio Priuli]
tms5110.c: removed legacy handlers, now that no drivers use them anymore. [Fabio Priuli]

tms5110: updated to use devcb2. nw.
[src/emu/machine]tms6100.c
[src/emu/sound]tms36xx.c tms36xx.h tms5110.c tms5110.h
[src/mame/audio]dkong.c phoenix.c pleiads.c scramble.c
[src/mame/drivers]bagman.c cvs.c
[src/mame/includes]cvs.h

trunk/src/mame/audio/pleiads.c
r29571r29572
99#include "emu.h"
1010#include "audio/pleiads.h"
1111
12#undef VMIN
13#undef VMAX
14
1512#define VMIN    0
1613#define VMAX    32767
1714
trunk/src/mame/audio/dkong.c
r29571r29572
13301330
13311331/*************************************
13321332 *
1333 *  Sound interfaces
1334 *
1335 *************************************/
1336
1337const tms5110_interface tms_interface = {
1338   NULL,
1339   NULL,
1340   DEVCB_DEVICE_LINE_MEMBER("m58819", tms6100_device, tms6100_m0_w),
1341   DEVCB_DEVICE_LINE_MEMBER("m58819", tms6100_device, tms6100_m1_w),
1342   DEVCB_DEVICE_MEMBER("m58819", tms6100_device, tms6100_addr_w),
1343   DEVCB_DEVICE_LINE_MEMBER("m58819", tms6100_device, tms6100_data_r),
1344   DEVCB_DEVICE_LINE_MEMBER("m58819", tms6100_device, tms6100_romclock_w)
1345};
1346
1347/*************************************
1348 *
13491333 *  Machine driver
13501334 *
13511335 *************************************/
r29571r29572
14081392   MCFG_DEVICE_ADD("m58819", M58819, 0)
14091393
14101394   MCFG_SOUND_ADD("tms", M58817, XTAL_640kHz)
1411   MCFG_DEVICE_CONFIG(tms_interface)
1395   MCFG_TMS5110_M0_CB(DEVWRITELINE("m58819", tms6100_device, tms6100_m0_w))
1396   MCFG_TMS5110_M1_CB(DEVWRITELINE("m58819", tms6100_device, tms6100_m1_w))
1397   MCFG_TMS5110_ADDR_CB(DEVWRITE8("m58819", tms6100_device, tms6100_addr_w))
1398   MCFG_TMS5110_DATA_CB(DEVREADLINE("m58819", tms6100_device, tms6100_data_r))
1399   MCFG_TMS5110_ROMCLK_CB(DEVWRITELINE("m58819", tms6100_device, tms6100_romclock_w))
14121400   MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
1413
14141401MACHINE_CONFIG_END
14151402
14161403MACHINE_CONFIG_FRAGMENT( dkongjr_audio )
trunk/src/mame/audio/phoenix.c
r29571r29572
4141 *
4242 ****************************************************************************/
4343
44#undef VMIN
45#undef VMAX
46
4744#define VMIN    0
4845#define VMAX    32767
4946
trunk/src/mame/audio/scramble.c
r29571r29572
325325   DEVCB_DEVICE_MEMBER("tms", tms5110_device, ctl_w)      /* tms ctl func */
326326};
327327
328static const tms5110_interface ad2083_tms5110_interface =
329{
330   /* legacy interface */
331   NULL,                                           /* function to be called when chip requests another bit */
332   NULL,                                           /* speech ROM load address callback */
333   /* new rom controller interface */
334   DEVCB_DEVICE_LINE_MEMBER("tmsprom", tmsprom_device, m0_w),     /* the M0 line */
335   DEVCB_NULL,                                     /* the M1 line */
336   DEVCB_NULL,                                     /* Write to ADD1,2,4,8 - 4 address bits */
337   DEVCB_DEVICE_LINE_MEMBER("tmsprom", tmsprom_device, data_r),   /* Read one bit from ADD8/Data - voice data */
338   DEVCB_NULL                                      /* rom clock - Only used to drive the data lines */
339};
340328
341
342
343329MACHINE_CONFIG_FRAGMENT( ad2083_audio )
344330
345331   MCFG_CPU_ADD("audiocpu", Z80, 14318000/8)   /* 1.78975 MHz */
r29571r29572
359345   MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.00)
360346
361347   MCFG_SOUND_ADD("tms", TMS5110A, AD2083_TMS5110_CLOCK)
362   MCFG_SOUND_CONFIG(ad2083_tms5110_interface)
348   MCFG_TMS5110_M0_CB(DEVWRITELINE("tmsprom", tmsprom_device, m0_w))
349   MCFG_TMS5110_DATA_CB(DEVREADLINE("tmsprom", tmsprom_device, data_r))
363350   MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
364351MACHINE_CONFIG_END
trunk/src/mame/includes/cvs.h
r29571r29572
8888   UINT8      m_character_ram[3 * 0x800];  /* only half is used, but
8989                                               by allocating twice the amount,
9090                                               we can use the same gfx_layout */
91   DECLARE_READ_LINE_MEMBER(speech_rom_read_bit);
9192   DECLARE_WRITE_LINE_MEMBER(write_s2650_flag);
9293   DECLARE_READ8_MEMBER(cvs_input_r);
9394   DECLARE_READ8_MEMBER(cvs_393hz_clock_r);
trunk/src/mame/drivers/bagman.c
r29571r29572
448448   DEVCB_DEVICE_MEMBER("tms", tms5110_device, ctl_w)      /* tms ctl func */
449449};
450450
451static const tms5110_interface bagman_tms5110_interface =
452{
453   /* legacy interface */
454   NULL,                                           /* function to be called when chip requests another bit */
455   NULL,                                           /* speech ROM load address callback */
456   /* new rom controller interface */
457   DEVCB_DEVICE_LINE_MEMBER("tmsprom", tmsprom_device, m0_w),     /* the M0 line */
458   DEVCB_NULL,                                     /* the M1 line */
459   DEVCB_NULL,                                     /* Write to ADD1,2,4,8 - 4 address bits */
460   DEVCB_DEVICE_LINE_MEMBER("tmsprom", tmsprom_device, data_r),   /* Read one bit from ADD8/Data - voice data */
461   DEVCB_NULL                                      /* rom clock - Only used to drive the data lines */
462};
463
464451INTERRUPT_GEN_MEMBER(bagman_state::vblank_irq)
465452{
466453   if(m_irq_mask)
r29571r29572
501488   MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.40)
502489
503490   MCFG_SOUND_ADD("tms", TMS5110A, 640000)
504   MCFG_SOUND_CONFIG(bagman_tms5110_interface)
491   MCFG_TMS5110_M0_CB(DEVWRITELINE("tmsprom", tmsprom_device, m0_w))
492   MCFG_TMS5110_DATA_CB(DEVREADLINE("tmsprom", tmsprom_device, data_r))
505493   MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
506494MACHINE_CONFIG_END
507495
trunk/src/mame/drivers/cvs.c
r29571r29572
406406}
407407
408408
409static int speech_rom_read_bit( device_t *device )
409READ_LINE_MEMBER(cvs_state::speech_rom_read_bit)
410410{
411   cvs_state *state = device->machine().driver_data<cvs_state>();
412   UINT8 *ROM = state->memregion("speechdata")->base();
413411   int bit;
412   UINT8 *ROM = memregion("speechdata")->base();
414413
415414   /* before reading the bit, clamp the address to the region length */
416   state->m_speech_rom_bit_address = state->m_speech_rom_bit_address & ((state->memregion("speechdata")->bytes() * 8) - 1);
417   bit = (ROM[state->m_speech_rom_bit_address >> 3] >> (state->m_speech_rom_bit_address & 0x07)) & 0x01;
415   m_speech_rom_bit_address &= ((memregion("speechdata")->bytes() * 8) - 1);
416   bit = BIT(ROM[m_speech_rom_bit_address >> 3], m_speech_rom_bit_address & 0x07);
418417
419418   /* prepare for next bit */
420   state->m_speech_rom_bit_address = state->m_speech_rom_bit_address + 1;
419   m_speech_rom_bit_address++;
421420
422421   return bit;
423422}
424423
425424
426static const tms5110_interface tms5100_interface =
427{
428   speech_rom_read_bit, /* M0 callback function. Called whenever chip requests a single bit of data */
429   NULL
430};
431
432
433
434425/*************************************
435426 *
436427 *  Inter-CPU communications
r29571r29572
10611052   MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
10621053
10631054   MCFG_SOUND_ADD("tms", TMS5100, XTAL_640kHz)
1064   MCFG_SOUND_CONFIG(tms5100_interface)
1055   MCFG_TMS5110_DATA_CB(READLINE(cvs_state, speech_rom_read_bit))
10651056   MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
10661057MACHINE_CONFIG_END
10671058
trunk/src/emu/machine/tms6100.c
r29571r29572
109109
110110void tms6100_device::device_start()
111111{
112   //static const tms5110_interface dummy = { 0 };
113
114   //tms->intf = device->static_config ? (const tms5110_interface *)device->static_config : &dummy;
115112   m_rom = *region();
116113
117114   // save device variables
trunk/src/emu/sound/tms36xx.c
r29571r29572
265265static const int *const tunes[] = {NULL,tune1,tune2,tune3,tune4};
266266
267267#define DECAY(voice)                                            \
268   if( m_vol[voice] > VMIN )                                   \
268   if( m_vol[voice] > TMS36XX_VMIN )                                   \
269269   {                                                           \
270270      /* decay of first voice */                              \
271271      m_vol_counter[voice] -= m_decay[voice];                 \
272272      while( m_vol_counter[voice] <= 0 )                      \
273273      {                                                       \
274274         m_vol_counter[voice] += samplerate;                 \
275         if( m_vol[voice]-- <= VMIN )                        \
275         if( m_vol[voice]-- <= TMS36XX_VMIN )                        \
276276         {                                                   \
277277            m_frequency[voice] = 0;                         \
278            m_vol[voice] = VMIN;                            \
278            m_vol[voice] = TMS36XX_VMIN;                            \
279279            break;                                          \
280280         }                                                   \
281281      }                                                       \
r29571r29572
287287      m_frequency[m_shift+voice] =                            \
288288         tunes[m_tune_num][m_tune_ofs*6+voice] *             \
289289         (m_basefreq << m_octave) / FSCALE;                  \
290      m_vol[m_shift+voice] = VMAX;                            \
290      m_vol[m_shift+voice] = TMS36XX_VMAX;                            \
291291   }
292292
293293#define TONE(voice)                                             \
r29571r29572
361361   {
362362      if (m_decay_time[j] > 0)
363363      {
364         m_decay[j+0] = m_decay[j+6] = VMAX / m_decay_time[j];
364         m_decay[j+0] = m_decay[j+6] = TMS36XX_VMAX / m_decay_time[j];
365365         enable |= 0x41 << j;
366366      }
367367   }
r29571r29572
410410
411411         if( (m_note_counter -= n) <= 0 )
412412         {
413            m_note_counter += VMAX;
413            m_note_counter += TMS36XX_VMAX;
414414            if (m_tune_ofs < m_tune_max)
415415            {
416416               /* shift to the other 'bank' of voices */
trunk/src/emu/sound/tms36xx.h
r29571r29572
3131#define TMS3615     15      // Naughty Boy, Pleiads (13 notes, one output)
3232#define TMS3617     17      // Monster Bash (13 notes, six outputs)
3333
34#undef VMIN
35#undef VMAX
34#define TMS36XX_VMIN    0x0000
35#define TMS36XX_VMAX    0x7fff
3636
37#define VMIN    0x0000
38#define VMAX    0x7fff
3937
40
4138// ======================> tms36xx_device
4239
4340class tms36xx_device : public device_t,
r29571r29572
6865   }
6966   static void set_tune_speed(device_t &device, double speed)
7067   {
71      downcast<tms36xx_device &>(device).m_speed = (speed > 0) ? VMAX / speed : VMAX;
68      downcast<tms36xx_device &>(device).m_speed = (speed > 0) ? TMS36XX_VMAX / speed : TMS36XX_VMAX;
7269   }
7370   static void set_decays(device_t &device, double decay_0, double decay_1, double decay_2, double decay_3, double decay_4, double decay_5)
7471   {
trunk/src/emu/sound/tms5110.c
r29571r29572
110110
111111void tms5110_device::new_int_write(UINT8 rc, UINT8 m0, UINT8 m1, UINT8 addr)
112112{
113   if (!m_m0_func.isnull())
114      m_m0_func(m0);
115   if (!m_m1_func.isnull())
116      m_m1_func(m1);
117   if (!m_addr_func.isnull())
118      m_addr_func(0, addr);
119   if (!m_romclk_func.isnull())
113   if (!m_m0_cb.isnull())
114      m_m0_cb(m0);
115   if (!m_m1_cb.isnull())
116      m_m1_cb(m1);
117   if (!m_addr_cb.isnull())
118      m_addr_cb((offs_t)0, addr);
119   if (!m_romclk_cb.isnull())
120120   {
121121      //printf("rc %d\n", rc);
122      m_romclk_func(rc);
122      m_romclk_cb(rc);
123123   }
124124}
125125
r29571r29572
137137   new_int_write(0, 1, 0, 0);
138138   new_int_write(1, 0, 0, 0);
139139   new_int_write(0, 0, 0, 0);
140   if (!m_data_func.isnull())
141      return m_data_func();
140   if (!m_data_cb.isnull())
141      return m_data_cb();
142142   return 0;
143143}
144144
r29571r29572
232232
233233void tms5110_device::request_bits(int no)
234234{
235   for (int i=0; i<no; i++)
235   for (int i = 0; i < no; i++)
236236   {
237      if (m_M0_callback)
238      {
239         int data = (*m_M0_callback)(this);
240         FIFO_data_write(data);
241      }
242      else
243      {
244         //if (DEBUG_5110) logerror("-->ERROR: TMS5110 missing M0 callback function\n");
245         UINT8 data = new_int_read();
246         FIFO_data_write(data);
247      }
237      UINT8 data = new_int_read();
238      FIFO_data_write(data);
248239   }
249240}
250241
r29571r29572
252243{
253244   if (m_schedule_dummy_read)
254245   {
255      if (m_M0_callback)
256      {
257         int data = (*m_M0_callback)(this);
258
259         if (DEBUG_5110) logerror("TMS5110 performing dummy read; value read = %1i\n", data&1);
260      }
261      else
262      {
263         int data = new_int_read();
264
265         if (DEBUG_5110) logerror("TMS5110 performing dummy read; value read = %1i\n", data&1);
266         //if (DEBUG_5110) logerror("-->ERROR: TMS5110 missing M0 callback function\n");
267      }
246      int data = new_int_read();
247      if (DEBUG_5110) logerror("TMS5110 performing dummy read; value read = %1i\n", data & 1);
268248      m_schedule_dummy_read = FALSE;
269249   }
270250}
r29571r29572
621601            m_address = m_address | ((m_CTL_pins & 0x0F)<<m_addr_bit);
622602            m_addr_bit = (m_addr_bit + 4) % 12;
623603            m_schedule_dummy_read = TRUE;
624            if (m_set_load_address)
625               m_set_load_address(this, m_address);
626604            new_int_write_addr(m_CTL_pins & 0x0F);
627605         }
628606         else
r29571r29572
838816#endif
839817
840818
841static int speech_rom_read_bit(device_t *device)
842{
843   tms5110_device *tms5110 = (tms5110_device *) device;
844   return tms5110->_speech_rom_read_bit();
845}
846
847int tms5110_device::_speech_rom_read_bit()
848{
849   int r;
850
851   if (m_speech_rom_bitnum<0)
852      r = 0;
853   else
854      r = (m_table[m_speech_rom_bitnum >> 3] >> (0x07 - (m_speech_rom_bitnum & 0x07))) & 1;
855
856   m_speech_rom_bitnum++;
857
858   return r;
859}
860
861static void speech_rom_set_addr(device_t *device, int addr)
862{
863   tms5110_device *tms5110 = (tms5110_device *) device;
864   tms5110->_speech_rom_set_addr(addr);
865}
866
867void tms5110_device::_speech_rom_set_addr(int addr)
868{
869   m_speech_rom_bitnum = addr * 8 - 1;
870}
871
872819//-------------------------------------------------
873820//  device_start - device-specific startup
874821//-------------------------------------------------
875822
876823void tms5110_device::device_start()
877824{
878   static const tms5110_interface dummy = { NULL, NULL, DEVCB_NULL, DEVCB_NULL, DEVCB_NULL, DEVCB_NULL, DEVCB_NULL};
879
880   assert_always(static_config() != NULL, "No config");
881
882   m_intf = static_config() ? (const tms5110_interface *)static_config() : &dummy;
883825   m_table = *region();
884826
885827   set_variant(TMS5110_IS_5110A);
886828
887829   /* resolve lines */
888   m_m0_func.resolve(m_intf->m0_func, *this);
889   m_m1_func.resolve(m_intf->m1_func, *this);
890   m_romclk_func.resolve(m_intf->romclk_func, *this);
891   m_addr_func.resolve(m_intf->addr_func, *this);
892   m_data_func.resolve(m_intf->data_func, *this);
830   m_m0_cb.resolve();
831   m_m1_cb.resolve();
832   m_romclk_cb.resolve();
833   m_addr_cb.resolve();
834   m_data_cb.resolve();
893835
894836   /* initialize a stream */
895837   m_stream = machine().sound().stream_alloc(*this, 0, 1, clock() / 80);
896838
897   if (m_table == NULL)
898   {
899#if 0
900      assert_always(m_intf->M0_callback != NULL, "Missing _mandatory_ 'M0_callback' function pointer in the TMS5110 interface\n  This function is used by TMS5110 to call for a single bits\n  needed to generate the speech\n  Aborting startup...\n");
901#endif
902      m_M0_callback = m_intf->M0_callback;
903      m_set_load_address = m_intf->load_address;
904   }
905   else
906   {
907      m_M0_callback = speech_rom_read_bit;
908      m_set_load_address = speech_rom_set_addr;
909   }
910
911839   m_state = CTL_STATE_INPUT; /* most probably not defined */
912840   m_romclk_hack_timer = timer_alloc(0);
913841
r29571r29572
1003931   memset(m_x, 0, sizeof(m_x));
1004932   m_next_is_address = FALSE;
1005933   m_address = 0;
1006   if (m_table != NULL || m_M0_callback != NULL)
934   if (m_table != NULL)
1007935   {
1008936      /* legacy interface */
1009937      m_schedule_dummy_read = TRUE;
r29571r29572
13561284
13571285tms5110_device::tms5110_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
13581286   : device_t(mconfig, TMS5110, "TMS5110", tag, owner, clock, "tms5110", __FILE__),
1359      device_sound_interface(mconfig, *this)
1287      device_sound_interface(mconfig, *this),
1288      m_m0_cb(*this),
1289      m_m1_cb(*this),
1290      m_addr_cb(*this),
1291      m_data_cb(*this),
1292      m_romclk_cb(*this)
13601293{
13611294}
13621295
13631296tms5110_device::tms5110_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source)
13641297   : device_t(mconfig, type, name, tag, owner, clock, shortname, source),
1365      device_sound_interface(mconfig, *this)
1298      device_sound_interface(mconfig, *this),
1299      m_m0_cb(*this),
1300      m_m1_cb(*this),
1301      m_addr_cb(*this),
1302      m_data_cb(*this),
1303      m_romclk_cb(*this)
13661304{
13671305}
13681306
1369//-------------------------------------------------
1370//  device_config_complete - perform any
1371//  operations now that the configuration is
1372//  complete
1373//-------------------------------------------------
13741307
1375void tms5110_device::device_config_complete()
1376{
1377}
1378
13791308const device_type TMS5100 = &device_creator<tms5100_device>;
13801309
13811310
trunk/src/emu/sound/tms5110.h
r29571r29572
2323/* usually 640000 for 8000 Hz sample rate or */
2424/* usually 800000 for 10000 Hz sample rate.  */
2525
26struct tms5110_interface
27{
28   /* legacy interface */
29   int (*M0_callback)(device_t *device);   /* function to be called when chip requests another bit */
30   void (*load_address)(device_t *device, int addr);   /* speech ROM load address callback */
31   /* new rom controller interface */
32   devcb_write_line m0_func;       /* the M0 line */
33   devcb_write_line m1_func;       /* the M1 line */
34   devcb_write8 addr_func;         /* Write to ADD1,2,4,8 - 4 address bits */
35   devcb_read_line data_func;      /* Read one bit from ADD8/Data - voice data */
36   /* on a real chip rom_clk is running all the time
37    * Here, we only use it to properly emulate the protocol.
38    * Do not rely on it to be a timed signal.
39    */
40   devcb_write_line romclk_func;   /* rom clock - Only used to drive the data lines */
41};
26#define MCFG_TMS5110_M0_CB(_devcb) \
27   devcb = &tms5110_device::set_m0_callback(*device, DEVCB2_##_devcb);
4228
29#define MCFG_TMS5110_M1_CB(_devcb) \
30   devcb = &tms5110_device::set_m1_callback(*device, DEVCB2_##_devcb);
31
32#define MCFG_TMS5110_ADDR_CB(_devcb) \
33   devcb = &tms5110_device::set_addr_callback(*device, DEVCB2_##_devcb);
34
35#define MCFG_TMS5110_DATA_CB(_devcb) \
36   devcb = &tms5110_device::set_data_callback(*device, DEVCB2_##_devcb);
37
38#define MCFG_TMS5110_ROMCLK_CB(_devcb) \
39   devcb = &tms5110_device::set_romclk_callback(*device, DEVCB2_##_devcb);
40
41
4342class tms5110_device : public device_t,
44                           public device_sound_interface
43                  public device_sound_interface
4544{
4645public:
4746   tms5110_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
4847   tms5110_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source);
4948
49   template<class _Object> static devcb2_base &set_m0_callback(device_t &device, _Object object) { return downcast<tms5110_device &>(device).m_m0_cb.set_callback(object); }
50   template<class _Object> static devcb2_base &set_m1_callback(device_t &device, _Object object) { return downcast<tms5110_device &>(device).m_m1_cb.set_callback(object); }
51   template<class _Object> static devcb2_base &set_addr_callback(device_t &device, _Object object) { return downcast<tms5110_device &>(device).m_addr_cb.set_callback(object); }
52   template<class _Object> static devcb2_base &set_data_callback(device_t &device, _Object object) { return downcast<tms5110_device &>(device).m_data_cb.set_callback(object); }
53   template<class _Object> static devcb2_base &set_romclk_callback(device_t &device, _Object object) { return downcast<tms5110_device &>(device).m_romclk_cb.set_callback(object); }
54
5055   DECLARE_WRITE8_MEMBER( ctl_w );
5156   DECLARE_READ8_MEMBER( ctl_r );
5257   DECLARE_WRITE_LINE_MEMBER( pdc_w );
r29571r29572
6570
6671protected:
6772   // device-level overrides
68   virtual void device_config_complete();
6973   virtual void device_start();
7074   virtual void device_reset();
7175
r29571r29572
7680
7781   void set_variant(int variant);
7882
83   UINT8 m_talk_status;
84   sound_stream *m_stream;
85
7986private:
8087   void new_int_write(UINT8 rc, UINT8 m0, UINT8 m1, UINT8 addr);
8188   void new_int_write_addr(UINT8 addr);
r29571r29572
99106   UINT8 m_PDC;
100107   UINT8 m_CTL_pins;
101108   UINT8 m_speaking_now;
102protected:  UINT8 m_talk_status; private:
109
110   
103111   UINT8 m_state;
104112
105113   /* Rom interface */
r29571r29572
108116   UINT8  m_schedule_dummy_read;
109117   UINT8  m_addr_bit;
110118
111   /* external callback */
112   int (*m_M0_callback)(device_t *);
113   void (*m_set_load_address)(device_t *, int);
114
115119   /* callbacks */
116   devcb_resolved_write_line m_m0_func;      /* the M0 line */
117   devcb_resolved_write_line m_m1_func;      /* the M1 line */
118   devcb_resolved_write8 m_addr_func;        /* Write to ADD1,2,4,8 - 4 address bits */
119   devcb_resolved_read_line m_data_func;     /* Read one bit from ADD8/Data - voice data */
120   devcb_resolved_write_line m_romclk_func;  /* rom clock - Only used to drive the data lines */
120   devcb2_write_line   m_m0_cb;      // the M0 line
121   devcb2_write_line   m_m1_cb;      // the M1 line
122   devcb2_write8       m_addr_cb;    // Write to ADD1,2,4,8 - 4 address bits
123   devcb2_read_line    m_data_cb;    // Read one bit from ADD8/Data - voice data
124   // On a real chip rom_clk is running all the time
125   // Here, we only use it to properly emulate the protocol.
126   // Do not rely on it to be a timed signal.
127   devcb2_write_line   m_romclk_cb;  // rom clock - Only used to drive the data lines
121128
122129   /* these contain data describing the current and previous voice frames */
123130   UINT16 m_old_energy;
r29571r29572
157164   /* coefficient tables */
158165   const struct tms5100_coeffs *m_coeff;
159166
160protected: sound_stream *m_stream; private:
161167   emu_timer *m_romclk_hack_timer;
162   const tms5110_interface *m_intf;
163168   const UINT8 *m_table;
164169};
165170

Previous 199869 Revisions Next


© 1997-2024 The MAME Team