Remove artificial SOUND_ prefix from sound device names.

[Atari Ace]

---------- Forwarded message ----------
From: Atari Ace <atari_ace@frontier.com>
Date: Tue, Aug 31, 2010 at 5:50 AM
Subject: [patch] Despecialize legacy sound devices
To: submit@mamedev.org
Cc: atariace@hotmail.com


Hi mamedev,

While poking around in the MAME source code, I came across the odd
type snes_sound_sound_device, which led me to the fact that legacy
sound devices are named a bit differently than other legacy devices,
probably a kludge intended to be changed later but forgotten.  Anyhow,
this patch fixes it.  The first patch goes part way, changing all but
the tag (which fixes the weird type issue).  It also changes type
names in the scsp and msm5232 cores to avoid a name collision if/when
the second patch is applied.  The second patch then touches a lot of
files, mostly removing the SOUND_ prefix from type asserts, but it
also needed to change the tags for the LASERDISC, S2636 and SPEAKER
sound cores to avoid collisions with other devices with the same name.

~aa
This commit is contained in:
Aaron Giles 2010-09-02 08:14:41 +00:00
parent 066e54b69f
commit a9befd7970
129 changed files with 446 additions and 449 deletions

View File

@ -154,7 +154,7 @@ int audit_samples(core_options *options, const game_driver *gamedrv, audit_recor
/* count the number of sample records attached to this driver */
const device_config_sound_interface *sound = NULL;
for (bool gotone = config->m_devicelist.first(sound); gotone; gotone = sound->next(sound))
if (sound->devconfig().type() == SOUND_SAMPLES)
if (sound->devconfig().type() == SAMPLES)
{
const samples_interface *intf = (const samples_interface *)sound->devconfig().static_config();
@ -177,7 +177,7 @@ int audit_samples(core_options *options, const game_driver *gamedrv, audit_recor
/* now iterate over sample entries */
for (bool gotone = config->m_devicelist.first(sound); gotone; gotone = sound->next(sound))
if (sound->devconfig().type() == SOUND_SAMPLES)
if (sound->devconfig().type() == SAMPLES)
{
const samples_interface *intf = (const samples_interface *)sound->devconfig().static_config();
const char *sharedname = NULL;

View File

@ -622,7 +622,7 @@ int cli_info_listsamples(core_options *options, const char *gamename)
/* find samples interfaces */
for (bool gotone = config->m_devicelist.first(sound); gotone; gotone = sound->next(sound))
if (sound->devconfig().type() == SOUND_SAMPLES)
if (sound->devconfig().type() == SAMPLES)
{
const char *const *samplenames = ((const samples_interface *)sound->devconfig().static_config())->samplenames;
int sampnum;

View File

@ -228,13 +228,13 @@ const device_type name = configclass::static_alloc_device_config
// reduced macros that are easier to use, and map to the above two macros
#define DECLARE_LEGACY_DEVICE(name, basename) _DECLARE_LEGACY_DEVICE(name, basename, basename##_device_config, basename##_device, legacy_device_config_base, legacy_device_base)
#define DECLARE_LEGACY_SOUND_DEVICE(name, basename) _DECLARE_LEGACY_DEVICE(SOUND_##name, basename, basename##_sound_device_config, basename##_sound_device, legacy_sound_device_config_base, legacy_sound_device_base)
#define DECLARE_LEGACY_SOUND_DEVICE(name, basename) _DECLARE_LEGACY_DEVICE(name, basename, basename##_device_config, basename##_device, legacy_sound_device_config_base, legacy_sound_device_base)
#define DECLARE_LEGACY_MEMORY_DEVICE(name, basename) _DECLARE_LEGACY_DEVICE(name, basename, basename##_device_config, basename##_device, legacy_memory_device_config_base, legacy_memory_device_base)
#define DECLARE_LEGACY_NVRAM_DEVICE(name, basename) _DECLARE_LEGACY_DEVICE(name, basename, basename##_device_config, basename##_device, legacy_nvram_device_config_base, legacy_nvram_device_base)
#define DECLARE_LEGACY_IMAGE_DEVICE(name, basename) _DECLARE_LEGACY_DEVICE(name, basename, basename##_device_config, basename##_device, legacy_image_device_config_base, legacy_image_device_base)
#define DEFINE_LEGACY_DEVICE(name, basename) _DEFINE_LEGACY_DEVICE(name, basename, basename##_device_config, basename##_device, legacy_device_config_base, legacy_device_base)
#define DEFINE_LEGACY_SOUND_DEVICE(name, basename) _DEFINE_LEGACY_DEVICE(SOUND_##name, basename, basename##_sound_device_config, basename##_sound_device, legacy_sound_device_config_base, legacy_sound_device_base)
#define DEFINE_LEGACY_SOUND_DEVICE(name, basename) _DEFINE_LEGACY_DEVICE(name, basename, basename##_device_config, basename##_device, legacy_sound_device_config_base, legacy_sound_device_base)
#define DEFINE_LEGACY_MEMORY_DEVICE(name, basename) _DEFINE_LEGACY_DEVICE(name, basename, basename##_device_config, basename##_device, legacy_memory_device_config_base, legacy_memory_device_base)
#define DEFINE_LEGACY_NVRAM_DEVICE(name, basename) _DEFINE_LEGACY_DEVICE(name, basename, basename##_device_config, basename##_device, legacy_nvram_device_config_base, legacy_nvram_device_base)
#define DEFINE_LEGACY_IMAGE_DEVICE(name, basename) _DEFINE_LEGACY_DEVICE(name, basename, basename##_device_config, basename##_device, legacy_image_device_config_base, legacy_image_device_base)

View File

@ -61,7 +61,7 @@ const int ALL_OUTPUTS = MAX_OUTPUTS; // special value indicating all outputs fo
//**************************************************************************
#define MDRV_SOUND_ADD(_tag, _type, _clock) \
MDRV_DEVICE_ADD(_tag, SOUND_##_type, _clock) \
MDRV_DEVICE_ADD(_tag, _type, _clock) \
#define MDRV_SOUND_MODIFY(_tag) \
MDRV_DEVICE_MODIFY(_tag)
@ -70,7 +70,7 @@ const int ALL_OUTPUTS = MAX_OUTPUTS; // special value indicating all outputs fo
MDRV_DEVICE_CLOCK(_clock)
#define MDRV_SOUND_REPLACE(_tag, _type, _clock) \
MDRV_DEVICE_REPLACE(_tag, SOUND_##_type, _clock)
MDRV_DEVICE_REPLACE(_tag, _type, _clock)
#define MDRV_SOUND_CONFIG(_config) \
MDRV_DEVICE_CONFIG(_config)

View File

@ -616,7 +616,7 @@ static void print_game_sampleof(FILE *out, const game_driver *game, const machin
const device_config_sound_interface *sound = NULL;
for (bool gotone = config->m_devicelist.first(sound); gotone; gotone = sound->next(sound))
if (sound->devconfig().type() == SOUND_SAMPLES)
if (sound->devconfig().type() == SAMPLES)
{
const char *const *samplenames = ((const samples_interface *)sound->devconfig().static_config())->samplenames;
if (samplenames != NULL)
@ -648,7 +648,7 @@ static void print_game_sample(FILE *out, const game_driver *game, const machine_
/* iterate over sound chips looking for samples */
for (bool gotone = config->m_devicelist.first(sound); gotone; gotone = sound->next(sound))
if (sound->devconfig().type() == SOUND_SAMPLES)
if (sound->devconfig().type() == SAMPLES)
{
const char *const *samplenames = ((const samples_interface *)sound->devconfig().static_config())->samplenames;
if (samplenames != NULL)

View File

@ -216,7 +216,7 @@ void laserdisc_set_config(running_device *device, const laserdisc_config *config
DECLARE_LEGACY_DEVICE(LASERDISC, laserdisc);
/* audio get info callback */
DECLARE_LEGACY_SOUND_DEVICE(LASERDISC, laserdisc_sound);
DECLARE_LEGACY_SOUND_DEVICE(LASERDISC_SOUND, laserdisc_sound);
/* type setter */
int laserdisc_get_type(running_device *device);

View File

@ -1665,4 +1665,4 @@ DEVICE_GET_INFO( laserdisc )
DEFINE_LEGACY_DEVICE(LASERDISC, laserdisc);
DEFINE_LEGACY_SOUND_DEVICE(LASERDISC, laserdisc_sound);
DEFINE_LEGACY_SOUND_DEVICE(LASERDISC_SOUND, laserdisc_sound);

View File

@ -27,7 +27,7 @@ struct _ym2151_state
INLINE ym2151_state *get_safe_token(running_device *device)
{
assert(device != NULL);
assert(device->type() == SOUND_YM2151);
assert(device->type() == YM2151);
return (ym2151_state *)downcast<legacy_device_base *>(device)->token();
}

View File

@ -19,7 +19,7 @@ struct _ym2203_state
INLINE ym2203_state *get_safe_token(running_device *device)
{
assert(device != NULL);
assert(device->type() == SOUND_YM2203);
assert(device->type() == YM2203);
return (ym2203_state *)downcast<legacy_device_base *>(device)->token();
}
@ -131,7 +131,7 @@ static DEVICE_START( ym2203 )
info->intf = intf;
info->device = device;
info->psg = ay8910_start_ym(NULL, SOUND_YM2203, device, device->clock(), &intf->ay8910_intf);
info->psg = ay8910_start_ym(NULL, YM2203, device, device->clock(), &intf->ay8910_intf);
assert_always(info->psg != NULL, "Error creating YM2203/AY8910 chip");
/* Timer Handler set */

View File

@ -22,7 +22,7 @@ struct _ym2413_state
INLINE ym2413_state *get_safe_token(running_device *device)
{
assert(device != NULL);
assert(device->type() == SOUND_YM2413);
assert(device->type() == YM2413);
return (ym2413_state *)downcast<legacy_device_base *>(device)->token();
}

View File

@ -32,7 +32,7 @@ struct _ym2608_state
INLINE ym2608_state *get_safe_token(running_device *device)
{
assert(device != NULL);
assert(device->type() == SOUND_YM2608);
assert(device->type() == YM2608);
return (ym2608_state *)downcast<legacy_device_base *>(device)->token();
}
@ -149,7 +149,7 @@ static DEVICE_START( ym2608 )
info->device = device;
/* FIXME: Force to use simgle output */
info->psg = ay8910_start_ym(NULL, SOUND_YM2608, device, device->clock(), &intf->ay8910_intf);
info->psg = ay8910_start_ym(NULL, YM2608, device, device->clock(), &intf->ay8910_intf);
assert_always(info->psg != NULL, "Error creating YM2608/AY8910 chip");
/* Timer Handler set */

View File

@ -32,7 +32,7 @@ struct _ym2610_state
INLINE ym2610_state *get_safe_token(running_device *device)
{
assert(device != NULL);
assert(device->type() == SOUND_YM2610 || device->type() == SOUND_YM2610B);
assert(device->type() == YM2610 || device->type() == YM2610B);
return (ym2610_state *)downcast<legacy_device_base *>(device)->token();
}
@ -161,7 +161,7 @@ static DEVICE_START( ym2610 )
info->timer[1] = timer_alloc(device->machine, timer_callback_1, info);
/* stream system initialize */
info->stream = stream_create(device,0,2,rate,info,(type == SOUND_YM2610) ? ym2610_stream_update : ym2610b_stream_update);
info->stream = stream_create(device,0,2,rate,info,(type == YM2610) ? ym2610_stream_update : ym2610b_stream_update);
/* setup adpcm buffers */
pcmbufa = *device->region();
pcmsizea = device->region()->bytes();

View File

@ -31,7 +31,7 @@ struct _ym2612_state
INLINE ym2612_state *get_safe_token(running_device *device)
{
assert(device != NULL);
assert(device->type() == SOUND_YM2612 || device->type() == SOUND_YM3438);
assert(device->type() == YM2612 || device->type() == YM3438);
return (ym2612_state *)downcast<legacy_device_base *>(device)->token();
}

View File

@ -25,7 +25,7 @@ struct _ymf262_state
INLINE ymf262_state *get_safe_token(running_device *device)
{
assert(device != NULL);
assert(device->type() == SOUND_YMF262);
assert(device->type() == YMF262);
return (ymf262_state *)downcast<legacy_device_base *>(device)->token();
}

View File

@ -37,7 +37,7 @@ struct _ym3526_state
INLINE ym3526_state *get_safe_token(running_device *device)
{
assert(device != NULL);
assert(device->type() == SOUND_YM3526);
assert(device->type() == YM3526);
return (ym3526_state *)downcast<legacy_device_base *>(device)->token();
}

View File

@ -37,7 +37,7 @@ struct _ym3812_state
INLINE ym3812_state *get_safe_token(running_device *device)
{
assert(device != NULL);
assert(device->type() == SOUND_YM3812);
assert(device->type() == YM3812);
return (ym3812_state *)downcast<legacy_device_base *>(device)->token();
}

View File

@ -37,7 +37,7 @@ struct _y8950_state
INLINE y8950_state *get_safe_token(running_device *device)
{
assert(device != NULL);
assert(device->type() == SOUND_Y8950);
assert(device->type() == Y8950);
return (y8950_state *)downcast<legacy_device_base *>(device)->token();
}

View File

@ -213,7 +213,7 @@ static signed short *RBUFDST; //this points to where the sample will be stored i
INLINE aica_state *get_safe_token(running_device *device)
{
assert(device != NULL);
assert(device->type() == SOUND_AICA);
assert(device->type() == AICA);
return (aica_state *)downcast<legacy_device_base *>(device)->token();
}

View File

@ -73,7 +73,7 @@ struct _astrocade_state
INLINE astrocade_state *get_safe_token(running_device *device)
{
assert(device != NULL);
assert(device->type() == SOUND_ASTROCADE);
assert(device->type() == ASTROCADE);
return (astrocade_state *)downcast<legacy_device_base *>(device)->token();
}

View File

@ -200,14 +200,14 @@ struct _ay8910_context
INLINE ay8910_context *get_safe_token(running_device *device)
{
assert(device != NULL);
assert(device->type() == SOUND_AY8910 ||
device->type() == SOUND_AY8912 ||
device->type() == SOUND_AY8913 ||
device->type() == SOUND_AY8930 ||
device->type() == SOUND_YM2149 ||
device->type() == SOUND_YM3439 ||
device->type() == SOUND_YMZ284 ||
device->type() == SOUND_YMZ294);
assert(device->type() == AY8910 ||
device->type() == AY8912 ||
device->type() == AY8913 ||
device->type() == AY8930 ||
device->type() == YM2149 ||
device->type() == YM3439 ||
device->type() == YMZ284 ||
device->type() == YMZ294);
return (ay8910_context *)downcast<legacy_device_base *>(device)->token();
}
@ -755,7 +755,7 @@ void *ay8910_start_ym(void *infoptr, device_type chip_type, running_device *devi
else
info->streams = 3;
if (chip_type == SOUND_AY8910 || chip_type == SOUND_AY8930)
if (chip_type == AY8910 || chip_type == AY8930)
{
info->step = 2;
info->par = &ay8910_param;
@ -916,7 +916,7 @@ static DEVICE_START( ay8910 )
DEVCB_NULL, DEVCB_NULL, DEVCB_NULL, DEVCB_NULL
};
const ay8910_interface *intf = (device->baseconfig().static_config() ? (const ay8910_interface *)device->baseconfig().static_config() : &generic_ay8910);
ay8910_start_ym(get_safe_token(device), SOUND_AY8910, device, device->clock(), intf);
ay8910_start_ym(get_safe_token(device), AY8910, device, device->clock(), intf);
}
static DEVICE_START( ym2149 )
@ -928,7 +928,7 @@ static DEVICE_START( ym2149 )
DEVCB_NULL, DEVCB_NULL, DEVCB_NULL, DEVCB_NULL
};
const ay8910_interface *intf = (device->baseconfig().static_config() ? (const ay8910_interface *)device->baseconfig().static_config() : &generic_ay8910);
ay8910_start_ym(get_safe_token(device), SOUND_YM2149, device, device->clock(), intf);
ay8910_start_ym(get_safe_token(device), YM2149, device, device->clock(), intf);
}
static DEVICE_STOP( ay8910 )

View File

@ -32,7 +32,7 @@ struct _beep_state
INLINE beep_state *get_safe_token(running_device *device)
{
assert(device != NULL);
assert(device->type() == SOUND_BEEP);
assert(device->type() == BEEP);
return (beep_state *)downcast<legacy_device_base *>(device)->token();
}

View File

@ -99,7 +99,7 @@ static void set_regmap(bsmt2000_chip *chip, UINT8 posbase, UINT8 ratebase, UINT8
INLINE bsmt2000_chip *get_safe_token(running_device *device)
{
assert(device != NULL);
assert(device->type() == SOUND_BSMT2000);
assert(device->type() == BSMT2000);
return (bsmt2000_chip *)downcast<legacy_device_base *>(device)->token();
}

View File

@ -109,7 +109,7 @@ struct _c140_state
INLINE c140_state *get_safe_token(running_device *device)
{
assert(device != NULL);
assert(device->type() == SOUND_C140);
assert(device->type() == C140);
return (c140_state *)downcast<legacy_device_base *>(device)->token();
}

View File

@ -85,7 +85,7 @@ struct _c352_state
INLINE c352_state *get_safe_token(running_device *device)
{
assert(device != NULL);
assert(device->type() == SOUND_C352);
assert(device->type() == C352);
return (c352_state *)downcast<legacy_device_base *>(device)->token();
}

View File

@ -86,7 +86,7 @@ typedef struct {
INLINE c6280_t *get_safe_token(running_device *device)
{
assert(device != NULL);
assert(device->type() == SOUND_C6280);
assert(device->type() == C6280);
return (c6280_t *)downcast<legacy_device_base *>(device)->token();
}

View File

@ -25,7 +25,7 @@ struct _cdda_info
INLINE cdda_info *get_safe_token(running_device *device)
{
assert(device != NULL);
assert(device->type() == SOUND_CDDA);
assert(device->type() == CDDA);
return (cdda_info *)downcast<legacy_device_base *>(device)->token();
}
@ -94,7 +94,7 @@ running_device *cdda_from_cdrom(running_machine *machine, void *file)
device_sound_interface *sound = NULL;
for (bool gotone = machine->m_devicelist.first(sound); gotone; gotone = sound->next(sound))
if (sound->device().type() == SOUND_CDDA)
if (sound->device().type() == CDDA)
{
cdda_info *info = get_safe_token(*sound);
if (info->disc == file)

View File

@ -88,7 +88,7 @@
DECLARE_LEGACY_SOUND_DEVICE(CDP1869, cdp1869);
#define MDRV_CDP1869_ADD(_tag, _pixclock, _config) \
MDRV_DEVICE_ADD(_tag, SOUND_CDP1869, _pixclock) \
MDRV_DEVICE_ADD(_tag, CDP1869, _pixclock) \
MDRV_DEVICE_CONFIG(_config)
#define MDRV_CDP1869_SCREEN_PAL_ADD(_tag, _clock) \

View File

@ -141,7 +141,7 @@ struct _cem3394_state
INLINE cem3394_state *get_safe_token(running_device *device)
{
assert(device != NULL);
assert(device->type() == SOUND_CEM3394);
assert(device->type() == CEM3394);
return (cem3394_state *)downcast<legacy_device_base *>(device)->token();
}

View File

@ -20,7 +20,7 @@ struct _dac_state
INLINE dac_state *get_safe_token(running_device *device)
{
assert(device != NULL);
assert(device->type() == SOUND_DAC);
assert(device->type() == DAC);
return (dac_state *)downcast<legacy_device_base *>(device)->token();
}

View File

@ -288,7 +288,7 @@ static const int pitch_vals[32] = {
INLINE digitalker *get_safe_token(running_device *device)
{
assert(device != NULL);
assert(device->type() == SOUND_DIGITALKER);
assert(device->type() == DIGITALKER);
return (digitalker *)downcast<legacy_device_base *>(device)->token();
}

View File

@ -47,7 +47,7 @@ struct dss_input_context
INLINE discrete_info *get_safe_token(running_device *device)
{
assert(device != NULL);
assert(device->type() == SOUND_DISCRETE);
assert(device->type() == DISCRETE);
return (discrete_info *)downcast<legacy_device_base *>(device)->token();
}

View File

@ -59,7 +59,7 @@ struct _dmadac_state
INLINE dmadac_state *get_safe_token(running_device *device)
{
assert(device != NULL);
assert(device->type() == SOUND_DMADAC);
assert(device->type() == DMADAC);
return (dmadac_state *)downcast<legacy_device_base *>(device)->token();
}
@ -241,7 +241,7 @@ void dmadac_set_volume(dmadac_sound_device **devlist, UINT8 num_channels, UINT16
* Generic get_info
**************************************************************************/
DEVICE_GET_INFO( dmadac )
DEVICE_GET_INFO( dmadac_sound )
{
switch (state)
{
@ -263,4 +263,4 @@ DEVICE_GET_INFO( dmadac )
}
DEFINE_LEGACY_SOUND_DEVICE(DMADAC, dmadac);
DEFINE_LEGACY_SOUND_DEVICE(DMADAC, dmadac_sound);

View File

@ -12,7 +12,7 @@
#include "devlegcy.h"
DECLARE_LEGACY_SOUND_DEVICE(DMADAC, dmadac);
DECLARE_LEGACY_SOUND_DEVICE(DMADAC, dmadac_sound);
void dmadac_transfer(dmadac_sound_device **devlist, UINT8 num_channels, offs_t channel_spacing, offs_t frame_spacing, offs_t total_frames, INT16 *data);
void dmadac_enable(dmadac_sound_device **devlist, UINT8 num_channels, UINT8 enable);

View File

@ -79,7 +79,7 @@ typedef struct
INLINE ES5503Chip *get_safe_token(running_device *device)
{
assert(device != NULL);
assert(device->type() == SOUND_ES5503);
assert(device->type() == ES5503);
return (ES5503Chip *)downcast<legacy_device_base *>(device)->token();
}

View File

@ -130,7 +130,7 @@ struct _es5506_state
INLINE es5506_state *get_safe_token(running_device *device)
{
assert(device != NULL);
assert(device->type() == SOUND_ES5505 || device->type() == SOUND_ES5506);
assert(device->type() == ES5505 || device->type() == ES5506);
return (es5506_state *)downcast<legacy_device_base *>(device)->token();
}
@ -854,7 +854,7 @@ static void es5506_start_common(running_device *device, const void *config, devi
compute_tables(chip);
/* init the voices */
accum_mask = (sndtype == SOUND_ES5506) ? 0xffffffff : 0x7fffffff;
accum_mask = (sndtype == ES5506) ? 0xffffffff : 0x7fffffff;
for (j = 0; j < 32; j++)
{
chip->voice[j].index = j;
@ -915,7 +915,7 @@ static void es5506_start_common(running_device *device, const void *config, devi
static DEVICE_START( es5506 )
{
es5506_start_common(device, device->baseconfig().static_config(), SOUND_ES5506);
es5506_start_common(device, device->baseconfig().static_config(), ES5506);
}
@ -1490,7 +1490,7 @@ static DEVICE_START( es5505 )
es5506intf.irq_callback = intf->irq_callback;
es5506intf.read_port = intf->read_port;
es5506_start_common(device, &es5506intf, SOUND_ES5505);
es5506_start_common(device, &es5506intf, ES5505);
}

View File

@ -51,7 +51,7 @@ static int diff_lookup[49*16];
INLINE es8712_state *get_safe_token(running_device *device)
{
assert(device != NULL);
assert(device->type() == SOUND_ES8712);
assert(device->type() == ES8712);
return (es8712_state *)downcast<legacy_device_base *>(device)->token();
}

View File

@ -15,7 +15,7 @@ struct _filter_rc_state
INLINE filter_rc_state *get_safe_token(running_device *device)
{
assert(device != NULL);
assert(device->type() == SOUND_FILTER_RC);
assert(device->type() == FILTER_RC);
return (filter_rc_state *)downcast<legacy_device_base *>(device)->token();
}

View File

@ -13,7 +13,7 @@ struct _filter_volume_state
INLINE filter_volume_state *get_safe_token(running_device *device)
{
assert(device != NULL);
assert(device->type() == SOUND_FILTER_VOLUME);
assert(device->type() == FILTER_VOLUME);
return (filter_volume_state *)downcast<legacy_device_base *>(device)->token();
}

View File

@ -78,7 +78,7 @@ static wav_file * wavraw; /* raw waveform */
INLINE gaelco_sound_state *get_safe_token(running_device *device)
{
assert(device != NULL);
assert(device->type() == SOUND_GAELCO_GAE1 || device->type() == SOUND_GAELCO_CG1V);
assert(device->type() == GAELCO_GAE1 || device->type() == GAELCO_CG1V);
return (gaelco_sound_state *)downcast<legacy_device_base *>(device)->token();
}

View File

@ -55,9 +55,9 @@ static STREAM_UPDATE( hc55516_update );
INLINE hc55516_state *get_safe_token(running_device *device)
{
assert(device != NULL);
assert(device->type() == SOUND_HC55516 ||
device->type() == SOUND_MC3417 ||
device->type() == SOUND_MC3418);
assert(device->type() == HC55516 ||
device->type() == MC3417 ||
device->type() == MC3418);
return (hc55516_state *)downcast<legacy_device_base *>(device)->token();
}

View File

@ -68,7 +68,7 @@ struct _ics2115_state
INLINE ics2115_state *get_safe_token(running_device *device)
{
assert(device != NULL);
assert(device->type() == SOUND_ICS2115);
assert(device->type() == ICS2115);
return (ics2115_state *)downcast<legacy_device_base *>(device)->token();
}

View File

@ -60,7 +60,7 @@ struct _ga20_state
INLINE ga20_state *get_safe_token(running_device *device)
{
assert(device != NULL);
assert(device->type() == SOUND_IREMGA20);
assert(device->type() == IREMGA20);
return (ga20_state *)downcast<legacy_device_base *>(device)->token();
}

View File

@ -64,7 +64,7 @@ struct _k005289_state
INLINE k005289_state *get_safe_token(running_device *device)
{
assert(device != NULL);
assert(device->type() == SOUND_K005289);
assert(device->type() == K005289);
return (k005289_state *)downcast<legacy_device_base *>(device)->token();
}

View File

@ -58,7 +58,7 @@ typedef struct kdacApcm
INLINE KDAC_A_PCM *get_safe_token(running_device *device)
{
assert(device != NULL);
assert(device->type() == SOUND_K007232);
assert(device->type() == K007232);
return (KDAC_A_PCM *)downcast<legacy_device_base *>(device)->token();
}

View File

@ -58,7 +58,7 @@ struct _k051649_state
INLINE k051649_state *get_safe_token(running_device *device)
{
assert(device != NULL);
assert(device->type() == SOUND_K051649);
assert(device->type() == K051649);
return (k051649_state *)downcast<legacy_device_base *>(device)->token();
}

View File

@ -47,7 +47,7 @@ struct _k053260_state
INLINE k053260_state *get_safe_token(running_device *device)
{
assert(device != NULL);
assert(device->type() == SOUND_K053260);
assert(device->type() == K053260);
return (k053260_state *)downcast<legacy_device_base *>(device)->token();
}

View File

@ -94,7 +94,7 @@ struct _k054539_state {
INLINE k054539_state *get_safe_token(running_device *device)
{
assert(device != NULL);
assert(device->type() == SOUND_K054539);
assert(device->type() == K054539);
return (k054539_state *)downcast<legacy_device_base *>(device)->token();
}

View File

@ -89,14 +89,13 @@ struct _mos6560_interface
***************************************************************************/
DECLARE_LEGACY_SOUND_DEVICE(MOS656X, mos6560);
#define MOS656X SOUND_MOS656X
/***************************************************************************
DEVICE CONFIGURATION MACROS
***************************************************************************/
#define MDRV_MOS656X_ADD(_tag, _interface) \
MDRV_DEVICE_ADD(_tag, SOUND_MOS656X, 0) \
MDRV_SOUND_ADD(_tag, MOS656X, 0) \
MDRV_DEVICE_CONFIG(_interface)

View File

@ -49,7 +49,7 @@ struct _msm5205_state
INLINE msm5205_state *get_safe_token(running_device *device)
{
assert(device != NULL);
assert(device->type() == SOUND_MSM5205);
assert(device->type() == MSM5205);
return (msm5205_state *)downcast<legacy_device_base *>(device)->token();
}

View File

@ -72,14 +72,14 @@ typedef struct {
running_device *device;
void (*gate_handler)(running_device *device, int state); /* callback called when the GATE output pin changes state */
} MSM5232;
} msm5232_state;
INLINE MSM5232 *get_safe_token(running_device *device)
INLINE msm5232_state *get_safe_token(running_device *device)
{
assert(device != NULL);
assert(device->type() == SOUND_MSM5232);
return (MSM5232 *)downcast<legacy_device_base *>(device)->token();
assert(device->type() == MSM5232);
return (msm5232_state *)downcast<legacy_device_base *>(device)->token();
}
@ -172,7 +172,7 @@ static FILE *sample[9];
static void msm5232_init_tables( MSM5232 *chip )
static void msm5232_init_tables( msm5232_state *chip )
{
int i;
double scale;
@ -245,7 +245,7 @@ static void msm5232_init_tables( MSM5232 *chip )
}
static void msm5232_init_voice(MSM5232 *chip, int i)
static void msm5232_init_voice(msm5232_state *chip, int i)
{
chip->voi[i].ar_rate= chip->ar_tbl[0] * chip->external_capacity[i];
chip->voi[i].dr_rate= chip->dr_tbl[0] * chip->external_capacity[i];
@ -257,7 +257,7 @@ static void msm5232_init_voice(MSM5232 *chip, int i)
}
static void msm5232_gate_update(MSM5232 *chip)
static void msm5232_gate_update(msm5232_state *chip)
{
int new_state = (chip->control2 & 0x20) ? chip->voi[7].GF : 0;
@ -271,7 +271,7 @@ static void msm5232_gate_update(MSM5232 *chip)
static DEVICE_RESET( msm5232 )
{
MSM5232 *chip = get_safe_token(device);
msm5232_state *chip = get_safe_token(device);
int i;
for (i=0; i<8; i++)
@ -298,7 +298,7 @@ static DEVICE_RESET( msm5232 )
msm5232_gate_update(chip);
}
static void msm5232_init(MSM5232 *chip, const msm5232_interface *intf, int clock, int rate)
static void msm5232_init(msm5232_state *chip, const msm5232_interface *intf, int clock, int rate)
{
int j;
@ -340,7 +340,7 @@ static DEVICE_STOP( msm5232 )
WRITE8_DEVICE_HANDLER( msm5232_w )
{
MSM5232 *chip = get_safe_token(device);
msm5232_state *chip = get_safe_token(device);
if (offset > 0x0d)
return;
@ -477,7 +477,7 @@ WRITE8_DEVICE_HANDLER( msm5232_w )
#define VMAX 32768
INLINE void EG_voices_advance(MSM5232 *chip)
INLINE void EG_voices_advance(msm5232_state *chip)
{
VOICE *voi = &chip->voi[0];
int samplerate = chip->rate;
@ -579,7 +579,7 @@ INLINE void EG_voices_advance(MSM5232 *chip)
static int o2,o4,o8,o16,solo8,solo16;
INLINE void TG_group_advance(MSM5232 *chip, int groupidx)
INLINE void TG_group_advance(msm5232_state *chip, int groupidx)
{
VOICE *voi = &chip->voi[groupidx*4];
int i;
@ -708,7 +708,7 @@ INLINE void TG_group_advance(MSM5232 *chip, int groupidx)
static STREAM_UPDATE( MSM5232_update_one )
{
MSM5232 * chip = (MSM5232 *)param;
msm5232_state * chip = (msm5232_state *)param;
stream_sample_t *buf1 = outputs[0];
stream_sample_t *buf2 = outputs[1];
stream_sample_t *buf3 = outputs[2];
@ -782,7 +782,7 @@ static STREAM_UPDATE( MSM5232_update_one )
/* MAME Interface */
static STATE_POSTLOAD( msm5232_postload )
{
MSM5232 *chip = (MSM5232 *)param;
msm5232_state *chip = (msm5232_state *)param;
msm5232_init_tables(chip);
}
@ -790,7 +790,7 @@ static DEVICE_START( msm5232 )
{
const msm5232_interface *intf = (const msm5232_interface *)device->baseconfig().static_config();
int rate = device->clock()/CLOCK_RATE_DIVIDER;
MSM5232 *chip = get_safe_token(device);
msm5232_state *chip = get_safe_token(device);
int voicenum;
chip->device = device;
@ -840,7 +840,7 @@ static DEVICE_START( msm5232 )
void msm5232_set_clock(running_device *device, int clock)
{
MSM5232 *chip = get_safe_token(device);
msm5232_state *chip = get_safe_token(device);
if (chip->clock != clock)
{
@ -863,7 +863,7 @@ DEVICE_GET_INFO( msm5232 )
switch (state)
{
/* --- the following bits of info are returned as 64-bit signed integers --- */
case DEVINFO_INT_TOKEN_BYTES: info->i = sizeof(MSM5232); break;
case DEVINFO_INT_TOKEN_BYTES: info->i = sizeof(msm5232_state); break;
/* --- the following bits of info are returned as pointers to data or functions --- */
case DEVINFO_FCT_START: info->start = DEVICE_START_NAME( msm5232 ); break;

View File

@ -129,7 +129,7 @@ static const int val2chan[] =
INLINE MultiPCM *get_safe_token(running_device *device)
{
assert(device != NULL);
assert(device->type() == SOUND_MULTIPCM);
assert(device->type() == MULTIPCM);
return (MultiPCM *)downcast<legacy_device_base *>(device)->token();
}

View File

@ -50,7 +50,7 @@ static const int vol_table[4] = { 26, 84, 200, 258 };
INLINE namco_63701x *get_safe_token(running_device *device)
{
assert(device != NULL);
assert(device->type() == SOUND_NAMCO_63701X);
assert(device->type() == NAMCO_63701X);
return (namco_63701x *)downcast<legacy_device_base *>(device)->token();
}

View File

@ -78,9 +78,9 @@ struct _namco_sound
INLINE namco_sound *get_safe_token(running_device *device)
{
assert(device != NULL);
assert(device->type() == SOUND_NAMCO ||
device->type() == SOUND_NAMCO_15XX ||
device->type() == SOUND_NAMCO_CUS30);
assert(device->type() == NAMCO ||
device->type() == NAMCO_15XX ||
device->type() == NAMCO_CUS30);
return (namco_sound *)downcast<legacy_device_base *>(device)->token();
}

View File

@ -75,7 +75,7 @@ struct _nesapu_state
INLINE nesapu_state *get_safe_token(running_device *device)
{
assert(device != NULL);
assert(device->type() == SOUND_NES);
assert(device->type() == NES);
return (nesapu_state *)downcast<legacy_device_base *>(device)->token();
}

View File

@ -65,7 +65,7 @@ struct _nile_state
INLINE nile_state *get_safe_token(running_device *device)
{
assert(device != NULL);
assert(device->type() == SOUND_NILE);
assert(device->type() == NILE);
return (nile_state *)downcast<legacy_device_base *>(device)->token();
}

View File

@ -52,7 +52,7 @@ static int tables_computed = 0;
INLINE okim6258_state *get_safe_token(running_device *device)
{
assert(device != NULL);
assert(device->type() == SOUND_OKIM6258);
assert(device->type() == OKIM6258);
return (okim6258_state *)downcast<legacy_device_base *>(device)->token();
}

View File

@ -66,7 +66,7 @@ static int tables_computed = 0;
INLINE okim6376_state *get_safe_token(running_device *device)
{
assert(device != NULL);
assert(device->type() == SOUND_OKIM6376);
assert(device->type() == OKIM6376);
return (okim6376_state *)downcast<legacy_device_base *>(device)->token();
}

View File

@ -525,7 +525,7 @@ static TIMER_CALLBACK( pokey_pot_trigger );
INLINE pokey_state *get_safe_token(running_device *device)
{
assert(device != NULL);
assert(device->type() == SOUND_POKEY);
assert(device->type() == POKEY);
return (pokey_state *)downcast<legacy_device_base *>(device)->token();
}

View File

@ -87,7 +87,7 @@ struct psxinfo
INLINE struct psxinfo *get_safe_token(running_device *device)
{
assert(device != NULL);
assert(device->type() == SOUND_PSXSPU);
assert(device->type() == PSXSPU);
return (struct psxinfo *)downcast<legacy_device_base *>(device)->token();
}

View File

@ -91,7 +91,7 @@ struct _qsound_state
INLINE qsound_state *get_safe_token(running_device *device)
{
assert(device != NULL);
assert(device->type() == SOUND_QSOUND);
assert(device->type() == QSOUND);
return (qsound_state *)downcast<legacy_device_base *>(device)->token();
}

View File

@ -97,7 +97,7 @@ enum {
INLINE rf5c400_state *get_safe_token(running_device *device)
{
assert(device != NULL);
assert(device->type() == SOUND_RF5C400);
assert(device->type() == RF5C400);
return (rf5c400_state *)downcast<legacy_device_base *>(device)->token();
}

View File

@ -40,7 +40,7 @@ struct _rf5c68_state
INLINE rf5c68_state *get_safe_token(running_device *device)
{
assert(device != NULL);
assert(device->type() == SOUND_RF5C68);
assert(device->type() == RF5C68);
return (rf5c68_state *)downcast<legacy_device_base *>(device)->token();
}

View File

@ -268,7 +268,7 @@ typedef struct
INLINE S14001AChip *get_safe_token(running_device *device)
{
assert(device != NULL);
assert(device->type() == SOUND_S14001A);
assert(device->type() == S14001A);
return (S14001AChip *)downcast<legacy_device_base *>(device)->token();
}

View File

@ -22,7 +22,7 @@ struct _s2636_sound
static s2636_sound *get_token(running_device *device)
{
assert(device != NULL);
assert(device->type() == SOUND_S2636);
assert(device->type() == S2636_SOUND);
return (s2636_sound *) downcast<legacy_device_base *>(device)->token();
}
@ -100,4 +100,4 @@ DEVICE_GET_INFO( s2636_sound )
}
}
DEFINE_LEGACY_SOUND_DEVICE(S2636, s2636_sound);
DEFINE_LEGACY_SOUND_DEVICE(S2636_SOUND, s2636_sound);

View File

@ -9,7 +9,7 @@
DECLARE_LEGACY_SOUND_DEVICE(S2636, s2636_sound);
DECLARE_LEGACY_SOUND_DEVICE(S2636_SOUND, s2636_sound);
void s2636_soundport_w (running_device *device, int mode, int data);

View File

@ -171,7 +171,7 @@ static const UINT8 envelope[8][64] = {
INLINE saa1099_state *get_safe_token(running_device *device)
{
assert(device != NULL);
assert(device->type() == SOUND_SAA1099);
assert(device->type() == SAA1099);
return (saa1099_state *)downcast<legacy_device_base *>(device)->token();
}

View File

@ -33,7 +33,7 @@ struct _samples_info
INLINE samples_info *get_safe_token(running_device *device)
{
assert(device != NULL);
assert(device->type() == SOUND_SAMPLES);
assert(device->type() == SAMPLES);
return (samples_info *)downcast<legacy_device_base *>(device)->token();
}

File diff suppressed because it is too large Load Diff

View File

@ -21,7 +21,7 @@ struct _segapcm_state
INLINE segapcm_state *get_safe_token(running_device *device)
{
assert(device != NULL);
assert(device->type() == SOUND_SEGAPCM);
assert(device->type() == SEGAPCM);
return (segapcm_state *)downcast<legacy_device_base *>(device)->token();
}

View File

@ -15,7 +15,7 @@
static SID6581 *get_sid(running_device *device)
{
assert(device != NULL);
assert((device->type() == SOUND_SID6581) || (device->type() == SOUND_SID8580));
assert((device->type() == SID6581) || (device->type() == SID8580));
return (SID6581 *) downcast<legacy_device_base *>(device)->token();
}

View File

@ -264,7 +264,7 @@ struct _sn76477_state
INLINE sn76477_state *get_safe_token(running_device *device)
{
assert(device != NULL);
assert(device->type() == SOUND_SN76477);
assert(device->type() == SN76477);
return (sn76477_state *)downcast<legacy_device_base *>(device)->token();
}

View File

@ -138,14 +138,14 @@ struct _sn76496_state
INLINE sn76496_state *get_safe_token(running_device *device)
{
assert(device != NULL);
assert(device->type() == SOUND_SN76496 ||
device->type() == SOUND_SN76489 ||
device->type() == SOUND_SN76489A ||
device->type() == SOUND_SN76494 ||
device->type() == SOUND_SN94624 ||
device->type() == SOUND_NCR7496 ||
device->type() == SOUND_GAMEGEAR ||
device->type() == SOUND_SMSIII);
assert(device->type() == SN76496 ||
device->type() == SN76489 ||
device->type() == SN76489A ||
device->type() == SN76494 ||
device->type() == SN94624 ||
device->type() == NCR7496 ||
device->type() == GAMEGEAR ||
device->type() == SMSIII);
return (sn76496_state *)downcast<legacy_device_base *>(device)->token();
}

View File

@ -36,7 +36,7 @@ struct _snkwave_state
INLINE snkwave_state *get_safe_token(running_device *device)
{
assert(device != NULL);
assert(device->type() == SOUND_SNKWAVE);
assert(device->type() == SNKWAVE);
return (snkwave_state *)downcast<legacy_device_base *>(device)->token();
}

View File

@ -60,7 +60,7 @@ struct _sp0250_state
INLINE sp0250_state *get_safe_token(running_device *device)
{
assert(device != NULL);
assert(device->type() == SOUND_SP0250);
assert(device->type() == SP0250);
return (sp0250_state *)downcast<legacy_device_base *>(device)->token();
}

View File

@ -135,7 +135,7 @@ static const INT16 qtbl[128] =
INLINE sp0256_state *get_safe_token(running_device *device)
{
assert(device != NULL);
assert(device->type() == SOUND_SP0256);
assert(device->type() == SP0256);
return (sp0256_state *)downcast<legacy_device_base *>(device)->token();
}

View File

@ -129,7 +129,7 @@ static double get_filtered_volume(speaker_state *sp);
INLINE speaker_state *get_safe_token(running_device *device)
{
assert(device != NULL);
assert(device->type() == SOUND_SPEAKER);
assert(device->type() == SPEAKER_SOUND);
return (speaker_state *)downcast<legacy_device_base *>(device)->token();
}
@ -424,7 +424,7 @@ static double get_filtered_volume(speaker_state *sp)
* Generic get_info
**************************************************************************/
DEVICE_GET_INFO( speaker )
DEVICE_GET_INFO( speaker_sound )
{
switch (state)
{
@ -446,4 +446,4 @@ DEVICE_GET_INFO( speaker )
}
DEFINE_LEGACY_SOUND_DEVICE(SPEAKER, speaker);
DEFINE_LEGACY_SOUND_DEVICE(SPEAKER_SOUND, speaker_sound);

View File

@ -23,6 +23,6 @@ struct _speaker_interface
void speaker_level_w (running_device *device, int new_level);
DECLARE_LEGACY_SOUND_DEVICE(SPEAKER, speaker);
DECLARE_LEGACY_SOUND_DEVICE(SPEAKER_SOUND, speaker_sound);
#endif /* __SPEAKER_H__ */

View File

@ -22,7 +22,7 @@ struct _st0016_state
INLINE st0016_state *get_safe_token(running_device *device)
{
assert(device != NULL);
assert(device->type() == SOUND_ST0016);
assert(device->type() == ST0016);
return (st0016_state *)downcast<legacy_device_base *>(device)->token();
}

View File

@ -61,7 +61,7 @@ struct _t6w28_state
INLINE t6w28_state *get_safe_token(running_device *device)
{
assert(device != NULL);
assert(device->type() == SOUND_T6W28);
assert(device->type() == T6W28);
return (t6w28_state *)downcast<legacy_device_base *>(device)->token();
}

View File

@ -13,7 +13,7 @@ struct _tia_state
INLINE tia_state *get_safe_token(running_device *device)
{
assert(device != NULL);
assert(device->type() == SOUND_TIA);
assert(device->type() == TIA);
return (tia_state *)downcast<legacy_device_base *>(device)->token();
}

View File

@ -24,7 +24,7 @@ struct _tms_state {
INLINE tms_state *get_safe_token(running_device *device)
{
assert(device != NULL);
assert(device->type() == SOUND_TMS3615);
assert(device->type() == TMS3615);
return (tms_state *)downcast<legacy_device_base *>(device)->token();
}

View File

@ -344,7 +344,7 @@ static const int *const tunes[] = {NULL,tune1,tune2,tune3,tune4};
INLINE tms_state *get_safe_token(running_device *device)
{
assert(device != NULL);
assert(device->type() == SOUND_TMS36XX);
assert(device->type() == TMS36XX);
return (tms_state *)downcast<legacy_device_base *>(device)->token();
}

View File

@ -198,13 +198,13 @@ struct _tmsprom_state
INLINE tms5110_state *get_safe_token(running_device *device)
{
assert(device != NULL);
assert(device->type() == SOUND_TMS5110 ||
device->type() == SOUND_TMS5100 ||
device->type() == SOUND_TMS5110A ||
device->type() == SOUND_CD2801 ||
device->type() == SOUND_TMC0281 ||
device->type() == SOUND_CD2802 ||
device->type() == SOUND_M58817);
assert(device->type() == TMS5110 ||
device->type() == TMS5100 ||
device->type() == TMS5110A ||
device->type() == CD2801 ||
device->type() == TMC0281 ||
device->type() == CD2802 ||
device->type() == M58817);
return (tms5110_state *)downcast<legacy_device_base *>(device)->token();
}

View File

@ -441,10 +441,10 @@ struct _tms5220_state
INLINE tms5220_state *get_safe_token(running_device *device)
{
assert(device != NULL);
assert(device->type() == SOUND_TMS5220 ||
device->type() == SOUND_TMS5220C ||
device->type() == SOUND_TMC0285 ||
device->type() == SOUND_TMS5200);
assert(device->type() == TMS5220 ||
device->type() == TMS5220C ||
device->type() == TMC0285 ||
device->type() == TMS5200);
return (tms5220_state *)downcast<legacy_device_base *>(device)->token();
}

View File

@ -224,7 +224,7 @@ static const int upd7759_state_table[16] = { -1, -1, 0, 0, 1, 2, 2, 3, -1, -1, 0
INLINE upd7759_state *get_safe_token(running_device *device)
{
assert(device != NULL);
assert(device->type() == SOUND_UPD7759);
assert(device->type() == UPD7759);
return (upd7759_state *)downcast<legacy_device_base *>(device)->token();
}

View File

@ -256,7 +256,7 @@ static const INT16 K5_table[] = {
INLINE vlm5030_state *get_safe_token(running_device *device)
{
assert(device != NULL);
assert(device->type() == SOUND_VLM5030);
assert(device->type() == VLM5030);
return (vlm5030_state *)downcast<legacy_device_base *>(device)->token();
}

View File

@ -41,7 +41,7 @@ struct _votrax_state
INLINE votrax_state *get_safe_token(running_device *device)
{
assert(device != NULL);
assert(device->type() == SOUND_VOTRAX);
assert(device->type() == VOTRAX);
return (votrax_state *)downcast<legacy_device_base *>(device)->token();
}

View File

@ -26,7 +26,7 @@ struct _vr0_state
INLINE vr0_state *get_safe_token(running_device *device)
{
assert(device != NULL);
assert(device->type() == SOUND_VRENDER0);
assert(device->type() == VRENDER0);
return (vr0_state *)downcast<legacy_device_base *>(device)->token();
}

View File

@ -101,7 +101,7 @@ struct _x1_010_state
INLINE x1_010_state *get_safe_token(running_device *device)
{
assert(device != NULL);
assert(device->type() == SOUND_X1_010);
assert(device->type() == X1_010);
return (x1_010_state *)downcast<legacy_device_base *>(device)->token();
}

View File

@ -276,7 +276,7 @@ static int env_volume_table[256];
INLINE YMF271Chip *get_safe_token(running_device *device)
{
assert(device != NULL);
assert(device->type() == SOUND_YMF271);
assert(device->type() == YMF271);
return (YMF271Chip *)downcast<legacy_device_base *>(device)->token();
}

View File

@ -132,7 +132,7 @@ typedef struct
INLINE YMF278BChip *get_safe_token(running_device *device)
{
assert(device != NULL);
assert(device->type() == SOUND_YMF278B);
assert(device->type() == YMF278B);
return (YMF278BChip *)downcast<legacy_device_base *>(device)->token();
}

View File

@ -133,7 +133,7 @@ static const timer_fired_func update_irq_state_cb[] =
INLINE ymz280b_state *get_safe_token(running_device *device)
{
assert(device != NULL);
assert(device->type() == SOUND_YMZ280B);
assert(device->type() == YMZ280B);
return (ymz280b_state *)downcast<legacy_device_base *>(device)->token();
}

View File

@ -69,7 +69,7 @@ struct _zsg2_state
INLINE zsg2_state *get_safe_token(running_device *device)
{
assert(device != NULL);
assert(device->type() == SOUND_ZSG2);
assert(device->type() == ZSG2);
return (zsg2_state *)downcast<legacy_device_base *>(device)->token();
}

View File

@ -563,7 +563,7 @@ static MACHINE_CONFIG_FRAGMENT( ldplayer_core )
/* audio hardware */
MDRV_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker")
MDRV_SOUND_ADD("ldsound", LASERDISC, 0)
MDRV_SOUND_ADD("ldsound", LASERDISC_SOUND, 0)
MDRV_SOUND_ROUTE(0, "lspeaker", 1.0)
MDRV_SOUND_ROUTE(1, "rspeaker", 1.0)
MACHINE_CONFIG_END

View File

@ -57,8 +57,8 @@ static cpu_device *jsacpu;
static const char *test_port;
static UINT16 test_mask;
static pokey_sound_device *pokey;
static ym2151_sound_device *ym2151;
static pokey_device *pokey;
static ym2151_device *ym2151;
static device_t *tms5220;
static okim6295_device *oki6295;
static okim6295_device *oki6295_l, *oki6295_r;
@ -139,8 +139,8 @@ void atarijsa_init(running_machine *machine, const char *testport, int testmask)
/* determine which sound hardware is installed */
tms5220 = machine->device("tms");
ym2151 = machine->device<ym2151_sound_device>("ymsnd");
pokey = machine->device<pokey_sound_device>("pokey");
ym2151 = machine->device<ym2151_device>("ymsnd");
pokey = machine->device<pokey_device>("pokey");
oki6295 = machine->device<okim6295_device>("adpcm");
oki6295_l = machine->device<okim6295_device>("adpcml");
oki6295_r = machine->device<okim6295_device>("adpcmr");

View File

@ -213,7 +213,7 @@ void micro3d_noise_sh_w(running_machine *machine, UINT8 data)
INLINE noise_state *get_safe_token(running_device *device)
{
assert(device != NULL);
assert(device->type() == SOUND_MICRO3D);
assert(device->type() == MICRO3D);
return (noise_state *)downcast<legacy_device_base *>(device)->token();
}

View File

@ -30,8 +30,8 @@
DEVICE_GET_INFO( sega005_sound );
DECLARE_LEGACY_SOUND_DEVICE(005, sega005_sound);
DEFINE_LEGACY_SOUND_DEVICE(005, sega005_sound);
DECLARE_LEGACY_SOUND_DEVICE(SEGA005, sega005_sound);
DEFINE_LEGACY_SOUND_DEVICE(SEGA005, sega005_sound);
@ -343,7 +343,7 @@ WRITE8_HANDLER( astrob_sound_w )
*
*************************************/
static SOUND_START( 005 );
static SOUND_START( sega005 );
static STREAM_UPDATE( sega005_stream_update );
static TIMER_CALLBACK( sega005_auto_timer );
static WRITE8_DEVICE_HANDLER( sega005_sound_a_w );
@ -441,13 +441,13 @@ MACHINE_CONFIG_FRAGMENT( 005_sound_board )
MDRV_PPI8255_ADD( "ppi8255", ppi8255_005_intf )
/* sound hardware */
MDRV_SOUND_START(005)
MDRV_SOUND_START(sega005)
MDRV_SOUND_ADD("samples", SAMPLES, 0)
MDRV_SOUND_CONFIG(sega005_samples_interface)
MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
MDRV_SOUND_ADD("005", 005, 0)
MDRV_SOUND_ADD("005", SEGA005, 0)
MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
MACHINE_CONFIG_END
@ -459,7 +459,7 @@ MACHINE_CONFIG_END
*
*************************************/
static SOUND_START( 005 )
static SOUND_START( sega005 )
{
state_save_register_global_array(machine, sound_state);
state_save_register_global(machine, sound_addr);

View File

@ -51,7 +51,7 @@ Z80CTC_INTERFACE( senjyo_ctc_intf )
WRITE8_HANDLER( senjyo_volume_w )
{
samples_sound_device *samples = space->machine->device<samples_sound_device>("samples");
samples_device *samples = space->machine->device<samples_device>("samples");
single_volume = data & 0x0f;
sample_set_volume(samples,0,single_volume / 15.0);
}

View File

@ -235,7 +235,7 @@ struct _snes_sound_state
INLINE snes_sound_state *get_safe_token( running_device *device )
{
assert(device != NULL);
assert(device->type() == SNES_SPC);
assert(device->type() == SNES);
return (snes_sound_state *)downcast<legacy_device_base *>(device)->token();
}

View File

@ -17,7 +17,6 @@
***************************************************************************/
DECLARE_LEGACY_SOUND_DEVICE(SNES, snes_sound);
#define SNES_SPC SOUND_SNES
/***************************************************************************

Some files were not shown because too many files have changed in this diff Show More