| 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 |
| r4365 | r4366 | |
|---|---|---|
| 106 | 106 | for (devptr = listheadptr; *devptr != NULL; devptr = &(*devptr)->next) |
| 107 | 107 | if (strcmp(tag, (*devptr)->tag) == 0) |
| 108 | 108 | { |
| 109 | #ifndef MESS | |
| 110 | 109 | fatalerror("Attempted to add duplicate device: type=%s tag=%s\n", device_get_name(*devptr), tag); |
| 111 | #endif /* MESS */ | |
| 112 | 110 | } |
| 113 | 111 | |
| 114 | 112 | /* get the size of the inline config */ |
| r4365 | r4366 | |
|---|---|---|
| 59 | 59 | { |
| 60 | 60 | const device_config *image = NULL; |
| 61 | 61 | |
| 62 | assert( device != NULL ); | |
| 63 | assert( device->static_config != NULL ); | |
| 64 | ||
| 62 | 65 | #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 ); | |
| 64 | 67 | #endif |
| 65 | 68 | stream_create(device, 0, 1, device->machine->sample_rate, (void *)image, wave_sound_update); |
| 66 | 69 | } |
| r4365 | r4366 | |
| 76 | 79 | switch (state) |
| 77 | 80 | { |
| 78 | 81 | /* --- the following bits of info are returned as 64-bit signed integers --- */ |
| 79 | case DEVINFO_INT_TOKEN_BYTES: info->i = | |
| 82 | case DEVINFO_INT_TOKEN_BYTES: info->i = 0; break; | |
| 80 | 83 | |
| 81 | 84 | /* --- the following bits of info are returned as pointers to data or functions --- */ |
| 82 | 85 | case DEVINFO_FCT_START: info->start = DEVICE_START_NAME( wave ); break; |
| r4365 | r4366 | |
|---|---|---|
| 14 | 14 | DEVICE_GET_INFO( wave ); |
| 15 | 15 | #define SOUND_WAVE DEVICE_GET_INFO_NAME( wave ) |
| 16 | 16 | |
| 17 | ||
| 18 | #define MDRV_SOUND_WAVE_ADD(_tag, _cass_tag) \ | |
| 19 | MDRV_SOUND_ADD( _tag, WAVE, 0 ) \ | |
| 20 | MDRV_DEVICE_CONFIG( _cass_tag ) | |
| 21 | ||
| 17 | 22 | #endif /* __WAVE_H__ */ |
| r4365 | r4366 | |
|---|---|---|
| 170 | 170 | strcmp(tag, "left") == 0 || |
| 171 | 171 | strcmp(tag, "right") == 0) |
| 172 | 172 | { |
| 173 | #ifndef MESS | |
| 174 | 173 | mame_printf_error("%s: %s has invalid generic tag '%s'\n", driver->source_file, driver->name, tag); |
| 175 | 174 | error = TRUE; |
| 176 | #endif /* MESS */ | |
| 177 | 175 | } |
| 178 | 176 | |
| 179 | 177 | for (p = tag; *p != 0; p++) |
| Previous | 15994 Revisions | Next |