Previous 15994 Revisions Next

r4366 Monday 2nd March, 2009 at 20:35:13 UTC by Wilbert Pol
Made the cassette device configurable for the WAVE sound device.
Re-enabled validity checks.
[src/emu]devintrf.c validity.c
[src/emu/sound]wave.c wave.h

src/emu/devintrf.c
r4365r4366
106106   for (devptr = listheadptr; *devptr != NULL; devptr = &(*devptr)->next)
107107      if (strcmp(tag, (*devptr)->tag) == 0)
108108      {
109#ifndef MESS
110109         fatalerror("Attempted to add duplicate device: type=%s tag=%s\n", device_get_name(*devptr), tag);
111#endif /* MESS */
112110      }
113111
114112   /* get the size of the inline config */
src/emu/sound/wave.c
r4365r4366
5959{
6060   const device_config *image = NULL;
6161
62   assert( device != NULL );
63   assert( device->static_config != NULL );
64
6265#ifdef MESS
63   image = device_list_find_by_tag( device->machine->config->devicelist, CASSETTE, device->tag );
66   image = device_list_find_by_tag( device->machine->config->devicelist, CASSETTE, (const char *)device->static_config );
6467#endif
6568   stream_create(device, 0, 1, device->machine->sample_rate, (void *)image, wave_sound_update);
6669}
r4365r4366
7679   switch (state)
7780   {
7881      /* --- the following bits of info are returned as 64-bit signed integers --- */
79      case DEVINFO_INT_TOKEN_BYTES:               info->i = 1;                         break;
82      case DEVINFO_INT_TOKEN_BYTES:               info->i = 0;                         break;
8083
8184      /* --- the following bits of info are returned as pointers to data or functions --- */
8285      case DEVINFO_FCT_START:                     info->start = DEVICE_START_NAME( wave );      break;
src/emu/sound/wave.h
r4365r4366
1414DEVICE_GET_INFO( wave );
1515#define SOUND_WAVE DEVICE_GET_INFO_NAME( wave )
1616
17
18#define MDRV_SOUND_WAVE_ADD(_tag, _cass_tag) \
19   MDRV_SOUND_ADD( _tag, WAVE, 0 ) \
20   MDRV_DEVICE_CONFIG( _cass_tag )
21
1722#endif /* __WAVE_H__ */
src/emu/validity.c
r4365r4366
170170      strcmp(tag, "left") == 0 ||
171171      strcmp(tag, "right") == 0)
172172   {
173#ifndef MESS
174173      mame_printf_error("%s: %s has invalid generic tag '%s'\n", driver->source_file, driver->name, tag);
175174      error = TRUE;
176#endif /* MESS */
177175   }
178176
179177   for (p = tag; *p != 0; p++)

Previous 15994 Revisions Next


© 1998-2018 The MESS Team