diff options
108 files changed, 260 insertions, 790 deletions
diff --git a/src/emu/mconfig.c b/src/emu/mconfig.c index 7ba4cff9917..b3c3e5ff332 100644 --- a/src/emu/mconfig.c +++ b/src/emu/mconfig.c @@ -160,9 +160,10 @@ static void machine_config_detokenize(machine_config *config, const machine_conf /* loop over tokens until we hit the end */ while (entrytype != MCONFIG_TOKEN_END) { - int size, offset, type, bits, in, out; + int size, offset, bits, in, out; UINT32 data32, clock, gain; device_type devtype; + sound_type type; const char *tag; UINT64 data64; @@ -360,7 +361,8 @@ static void machine_config_detokenize(machine_config *config, const machine_conf /* add/remove/replace sounds */ case MCONFIG_TOKEN_SOUND_ADD: TOKEN_UNGET_UINT32(tokens); - TOKEN_GET_UINT64_UNPACK3(tokens, entrytype, 8, type, 24, clock, 32); + TOKEN_GET_UINT64_UNPACK2(tokens, entrytype, 8, clock, 32); + type = TOKEN_GET_PTR(tokens, sndtype); tag = TOKEN_GET_STRING(tokens); sound = sound_add(config, device_build_tag(tempstring, owner, tag), type, clock); break; @@ -384,7 +386,8 @@ static void machine_config_detokenize(machine_config *config, const machine_conf case MCONFIG_TOKEN_SOUND_REPLACE: TOKEN_UNGET_UINT32(tokens); - TOKEN_GET_UINT64_UNPACK3(tokens, entrytype, 8, type, 24, clock, 32); + TOKEN_GET_UINT64_UNPACK2(tokens, entrytype, 8, clock, 32); + type = TOKEN_GET_PTR(tokens, sndtype); tag = TOKEN_GET_STRING(tokens); sound = sound_find(config, device_build_tag(tempstring, owner, tag)); if (sound == NULL) diff --git a/src/emu/mconfig.h b/src/emu/mconfig.h index 70a2471f34a..c5228374dde 100644 --- a/src/emu/mconfig.h +++ b/src/emu/mconfig.h @@ -16,6 +16,7 @@ #include "devintrf.h" #include "cpuexec.h" +#include "sndintrf.h" #include <stddef.h> @@ -132,7 +133,7 @@ struct _machine_config palette_init_func init_palette; /* one-time palette init callback */ video_start_func video_start; /* one-time video start callback */ - sound_reset_func video_reset; /* video reset callback */ + video_reset_func video_reset; /* video reset callback */ video_eof_func video_eof; /* end-of-frame video callback */ video_update_func video_update; /* video update callback */ @@ -172,6 +173,7 @@ union _machine_config_token palette_init_func palette_init; video_eof_func video_eof; video_update_func video_update; + sound_type sndtype; }; @@ -375,7 +377,8 @@ union _machine_config_token /* add/remove/replace sounds */ #define MDRV_SOUND_ADD(_tag, _type, _clock) \ - TOKEN_UINT64_PACK3(MCONFIG_TOKEN_SOUND_ADD, 8, SOUND_##_type, 24, _clock, 32), \ + TOKEN_UINT64_PACK2(MCONFIG_TOKEN_SOUND_ADD, 8, _clock, 32), \ + TOKEN_PTR(sndtype, SOUND_##_type), \ TOKEN_STRING(_tag), #define MDRV_SOUND_REMOVE(_tag) \ @@ -391,7 +394,8 @@ union _machine_config_token TOKEN_PTR(voidptr, &(_config)), #define MDRV_SOUND_REPLACE(_tag, _type, _clock) \ - TOKEN_UINT64_PACK3(MCONFIG_TOKEN_SOUND_REPLACE, 8, SOUND_##_type, 24, _clock, 32), \ + TOKEN_UINT64_PACK2(MCONFIG_TOKEN_SOUND_REPLACE, 8, _clock, 32), \ + TOKEN_PTR(sndtype, SOUND_##_type), \ TOKEN_STRING(_tag), #define MDRV_SOUND_ROUTE_EX(_output, _target, _gain, _input) \ diff --git a/src/emu/sndintrf.c b/src/emu/sndintrf.c index d0c906b434b..465f2a1ec68 100644 --- a/src/emu/sndintrf.c +++ b/src/emu/sndintrf.c @@ -41,447 +41,7 @@ struct _sndintrf_data sound_type sndtype; /* type index of this sound chip */ sound_type aliastype; /* aliased type index of this sound chip */ device_config * device; /* dummy device for now */ - const char * tag; /* tag this sound chip */ int index; /* index of this sound chip */ - int clock; /* clock for this sound chip */ -}; - - - -/*************************************************************************** - PROTOTYPES FOR ALL SND ENTRY POINTS -***************************************************************************/ - -static SND_GET_INFO( dummy_sound ); -SND_GET_INFO( custom ); -SND_GET_INFO( samples ); -SND_GET_INFO( dac ); -SND_GET_INFO( dmadac ); -SND_GET_INFO( discrete ); -SND_GET_INFO( ay8910 ); -SND_GET_INFO( ay8912 ); -SND_GET_INFO( ay8913 ); -SND_GET_INFO( ay8930 ); -SND_GET_INFO( ym2149 ); -SND_GET_INFO( ym3439 ); -SND_GET_INFO( ymz284 ); -SND_GET_INFO( ymz294 ); -SND_GET_INFO( ym2203 ); -SND_GET_INFO( ym2151 ); -SND_GET_INFO( ym2608 ); -SND_GET_INFO( ym2610 ); -SND_GET_INFO( ym2610b ); -SND_GET_INFO( ym2612 ); -SND_GET_INFO( ym3438 ); -SND_GET_INFO( ym2413 ); -SND_GET_INFO( ym3812 ); -SND_GET_INFO( ym3526 ); -SND_GET_INFO( ymz280b ); -SND_GET_INFO( y8950 ); -SND_GET_INFO( sn76477 ); -SND_GET_INFO( sn76489 ); -SND_GET_INFO( sn76489a ); -SND_GET_INFO( sn76494 ); -SND_GET_INFO( sn76496 ); -SND_GET_INFO( gamegear ); -SND_GET_INFO( smsiii ); -SND_GET_INFO( pokey ); -SND_GET_INFO( nesapu ); -SND_GET_INFO( astrocade ); -SND_GET_INFO( namco ); -SND_GET_INFO( namco_15xx ); -SND_GET_INFO( namco_cus30 ); -SND_GET_INFO( namco_52xx ); -SND_GET_INFO( namco_63701x ); -SND_GET_INFO( snkwave ); -SND_GET_INFO( tms36xx ); -SND_GET_INFO( tms3615 ); -SND_GET_INFO( tms5100 ); -SND_GET_INFO( tms5110 ); -SND_GET_INFO( tms5110a ); -SND_GET_INFO( cd2801 ); -SND_GET_INFO( tmc0281 ); -SND_GET_INFO( cd2802 ); -SND_GET_INFO( m58817 ); -SND_GET_INFO( tmc0285 ); -SND_GET_INFO( tms5200 ); -SND_GET_INFO( tms5220 ); -SND_GET_INFO( vlm5030 ); -SND_GET_INFO( adpcm ); -SND_GET_INFO( okim6376 ); -SND_GET_INFO( okim6295 ); -SND_GET_INFO( okim6258 ); -SND_GET_INFO( msm5205 ); -SND_GET_INFO( msm5232 ); -SND_GET_INFO( upd7759 ); -SND_GET_INFO( hc55516 ); -SND_GET_INFO( mc3417 ); -SND_GET_INFO( mc3418 ); -SND_GET_INFO( k005289 ); -SND_GET_INFO( k007232 ); -SND_GET_INFO( k051649 ); -SND_GET_INFO( k053260 ); -SND_GET_INFO( k054539 ); -SND_GET_INFO( segapcm ); -SND_GET_INFO( rf5c68 ); -SND_GET_INFO( cem3394 ); -SND_GET_INFO( c140 ); -SND_GET_INFO( qsound ); -SND_GET_INFO( saa1099 ); -SND_GET_INFO( iremga20 ); -SND_GET_INFO( es5503 ); -SND_GET_INFO( es5505 ); -SND_GET_INFO( es5506 ); -SND_GET_INFO( bsmt2000 ); -SND_GET_INFO( ymf262 ); -SND_GET_INFO( ymf278b ); -SND_GET_INFO( gaelco_cg1v ); -SND_GET_INFO( gaelco_gae1 ); -SND_GET_INFO( x1_010 ); -SND_GET_INFO( multipcm ); -SND_GET_INFO( c6280 ); -SND_GET_INFO( tia ); -SND_GET_INFO( sp0250 ); -SND_GET_INFO( scsp ); -SND_GET_INFO( psxspu ); -SND_GET_INFO( ymf271 ); -SND_GET_INFO( cdda ); -SND_GET_INFO( ics2115 ); -SND_GET_INFO( st0016 ); -SND_GET_INFO( nile ); -SND_GET_INFO( c352 ); -SND_GET_INFO( vrender0 ); -SND_GET_INFO( votrax ); -SND_GET_INFO( es8712 ); -SND_GET_INFO( rf5c400 ); -SND_GET_INFO( speaker ); -SND_GET_INFO( cdp1869 ); -SND_GET_INFO( beep ); -SND_GET_INFO( wave ); -SND_GET_INFO( sid6581 ); -SND_GET_INFO( sid8580 ); -SND_GET_INFO( sp0256 ); -SND_GET_INFO( s14001a ); -SND_GET_INFO( aica ); - -SND_GET_INFO( filter_volume ); -SND_GET_INFO( filter_rc ); - - - -/*************************************************************************** - MASTER SND LIST -***************************************************************************/ - -static const struct -{ - sound_type sndtype; - snd_get_info_func get_info; -} sndintrf_map[] = -{ - { SOUND_DUMMY, SND_GET_INFO_NAME( dummy_sound ) }, -#if (HAS_CUSTOM) - { SOUND_CUSTOM, SND_GET_INFO_NAME( custom ) }, -#endif -#if (HAS_SAMPLES) - { SOUND_SAMPLES, SND_GET_INFO_NAME( samples ) }, -#endif -#if (HAS_DAC) - { SOUND_DAC, SND_GET_INFO_NAME( dac ) }, -#endif -#if (HAS_DMADAC) - { SOUND_DMADAC, SND_GET_INFO_NAME( dmadac ) }, -#endif -#if (HAS_DISCRETE) - { SOUND_DISCRETE, SND_GET_INFO_NAME( discrete ) }, -#endif -#if (HAS_AY8910) - { SOUND_AY8910, SND_GET_INFO_NAME( ay8910 ) }, - { SOUND_AY8912, SND_GET_INFO_NAME( ay8912 ) }, - { SOUND_AY8913, SND_GET_INFO_NAME( ay8913 ) }, - { SOUND_AY8930, SND_GET_INFO_NAME( ay8930 ) }, - { SOUND_YM2149, SND_GET_INFO_NAME( ym2149 ) }, - { SOUND_YM3439, SND_GET_INFO_NAME( ym3439 ) }, - { SOUND_YMZ284, SND_GET_INFO_NAME( ymz284 ) }, - { SOUND_YMZ294, SND_GET_INFO_NAME( ymz294 ) }, -#endif -#if (HAS_YM2203) - { SOUND_YM2203, SND_GET_INFO_NAME( ym2203 ) }, -#endif -#if (HAS_YM2151) - { SOUND_YM2151, SND_GET_INFO_NAME( ym2151 ) }, -#endif -#if (HAS_YM2608) - { SOUND_YM2608, SND_GET_INFO_NAME( ym2608 ) }, -#endif -#if (HAS_YM2610) - { SOUND_YM2610, SND_GET_INFO_NAME( ym2610 ) }, -#endif -#if (HAS_YM2610B) - { SOUND_YM2610B, SND_GET_INFO_NAME( ym2610b ) }, -#endif -#if (HAS_YM2612) - { SOUND_YM2612, SND_GET_INFO_NAME( ym2612 ) }, -#endif -#if (HAS_YM3438) - { SOUND_YM3438, SND_GET_INFO_NAME( ym3438 ) }, -#endif -#if (HAS_YM2413) - { SOUND_YM2413, SND_GET_INFO_NAME( ym2413 ) }, -#endif -#if (HAS_YM3812) - { SOUND_YM3812, SND_GET_INFO_NAME( ym3812 ) }, -#endif -#if (HAS_YM3526) - { SOUND_YM3526, SND_GET_INFO_NAME( ym3526 ) }, -#endif -#if (HAS_YMZ280B) - { SOUND_YMZ280B, SND_GET_INFO_NAME( ymz280b ) }, -#endif -#if (HAS_Y8950) - { SOUND_Y8950, SND_GET_INFO_NAME( y8950 ) }, -#endif -#if (HAS_SN76477) - { SOUND_SN76477, SND_GET_INFO_NAME( sn76477 ) }, -#endif -#if (HAS_SN76496) - { SOUND_SN76489, SND_GET_INFO_NAME( sn76489 ) }, - { SOUND_SN76489A, SND_GET_INFO_NAME( sn76489a ) }, - { SOUND_SN76494, SND_GET_INFO_NAME( sn76494 ) }, - { SOUND_SN76496, SND_GET_INFO_NAME( sn76496 ) }, - { SOUND_GAMEGEAR, SND_GET_INFO_NAME( gamegear ) }, - { SOUND_SMSIII, SND_GET_INFO_NAME( smsiii ) }, -#endif -#if (HAS_POKEY) - { SOUND_POKEY, SND_GET_INFO_NAME( pokey ) }, -#endif -#if (HAS_NES) - { SOUND_NES, SND_GET_INFO_NAME( nesapu ) }, -#endif -#if (HAS_ASTROCADE) - { SOUND_ASTROCADE, SND_GET_INFO_NAME( astrocade ) }, -#endif -#if (HAS_NAMCO) - { SOUND_NAMCO, SND_GET_INFO_NAME( namco ) }, -#endif -#if (HAS_NAMCO_15XX) - { SOUND_NAMCO_15XX, SND_GET_INFO_NAME( namco_15xx ) }, -#endif -#if (HAS_NAMCO_CUS30) - { SOUND_NAMCO_CUS30, SND_GET_INFO_NAME( namco_cus30 ) }, -#endif -#if (HAS_NAMCO_52XX) - { SOUND_NAMCO_52XX, SND_GET_INFO_NAME( namco_52xx ) }, -#endif -#if (HAS_NAMCO_63701X) - { SOUND_NAMCO_63701X, SND_GET_INFO_NAME( namco_63701x ) }, -#endif -#if (HAS_SNKWAVE) - { SOUND_SNKWAVE, SND_GET_INFO_NAME( snkwave ) }, -#endif -#if (HAS_TMS36XX) - { SOUND_TMS36XX, SND_GET_INFO_NAME( tms36xx ) }, -#endif -#if (HAS_TMS3615) - { SOUND_TMS3615, SND_GET_INFO_NAME( tms3615 ) }, -#endif -#if (HAS_TMS5100) - { SOUND_TMS5100, SND_GET_INFO_NAME( tms5100 ) }, -#endif -#if (HAS_TMS5110) - { SOUND_TMS5110, SND_GET_INFO_NAME( tms5110 ) }, -#endif -#if (HAS_TMS5110A) - { SOUND_TMS5110A, SND_GET_INFO_NAME( tms5110a ) }, -#endif -#if (HAS_CD2801) - { SOUND_CD2801, SND_GET_INFO_NAME( cd2801 ) }, -#endif -#if (HAS_TMC0281) - { SOUND_TMC0281, SND_GET_INFO_NAME( tmc0281 ) }, -#endif -#if (HAS_CD2802) - { SOUND_CD2802, SND_GET_INFO_NAME( cd2802 ) }, -#endif -#if (HAS_M58817) - { SOUND_M58817, SND_GET_INFO_NAME( m58817 ) }, -#endif -#if (HAS_TMC0285) - { SOUND_TMC0285, SND_GET_INFO_NAME( tmc0285 ) }, -#endif -#if (HAS_TMS5200) - { SOUND_TMS5200, SND_GET_INFO_NAME( tms5200 ) }, -#endif -#if (HAS_TMS5220) - { SOUND_TMS5220, SND_GET_INFO_NAME( tms5220 ) }, -#endif -#if (HAS_VLM5030) - { SOUND_VLM5030, SND_GET_INFO_NAME( vlm5030 ) }, -#endif -#if (HAS_OKIM6376) - { SOUND_OKIM6376, SND_GET_INFO_NAME( okim6376 ) }, -#endif -#if (HAS_OKIM6295) - { SOUND_OKIM6295, SND_GET_INFO_NAME( okim6295 ) }, -#endif -#if (HAS_OKIM6258) - { SOUND_OKIM6258, SND_GET_INFO_NAME( okim6258 ) }, -#endif -#if (HAS_MSM5205) - { SOUND_MSM5205, SND_GET_INFO_NAME( msm5205 ) }, -#endif -#if (HAS_MSM5232) - { SOUND_MSM5232, SND_GET_INFO_NAME( msm5232 ) }, -#endif -#if (HAS_UPD7759) - { SOUND_UPD7759, SND_GET_INFO_NAME( upd7759 ) }, -#endif -#if (HAS_HC55516) - { SOUND_HC55516, SND_GET_INFO_NAME( hc55516 ) }, - { SOUND_MC3417, SND_GET_INFO_NAME( mc3417 ) }, - { SOUND_MC3418, SND_GET_INFO_NAME( mc3418 ) }, -#endif -#if (HAS_K005289) - { SOUND_K005289, SND_GET_INFO_NAME( k005289 ) }, -#endif -#if (HAS_K007232) - { SOUND_K007232, SND_GET_INFO_NAME( k007232 ) }, -#endif -#if (HAS_K051649) - { SOUND_K051649, SND_GET_INFO_NAME( k051649 ) }, -#endif -#if (HAS_K053260) - { SOUND_K053260, SND_GET_INFO_NAME( k053260 ) }, -#endif -#if (HAS_K054539) - { SOUND_K054539, SND_GET_INFO_NAME( k054539 ) }, -#endif -#if (HAS_SEGAPCM) - { SOUND_SEGAPCM, SND_GET_INFO_NAME( segapcm ) }, -#endif -#if (HAS_RF5C68) - { SOUND_RF5C68, SND_GET_INFO_NAME( rf5c68 ) }, -#endif -#if (HAS_CEM3394) - { SOUND_CEM3394, SND_GET_INFO_NAME( cem3394 ) }, -#endif -#if (HAS_C140) - { SOUND_C140, SND_GET_INFO_NAME( c140 ) }, -#endif -#if (HAS_QSOUND) - { SOUND_QSOUND, SND_GET_INFO_NAME( qsound ) }, -#endif -#if (HAS_SAA1099) - { SOUND_SAA1099, SND_GET_INFO_NAME( saa1099 ) }, -#endif -#if (HAS_IREMGA20) - { SOUND_IREMGA20, SND_GET_INFO_NAME( iremga20 ) }, -#endif -#if (HAS_ES5503) - { SOUND_ES5503, SND_GET_INFO_NAME( es5503 ) }, -#endif -#if (HAS_ES5505) - { SOUND_ES5505, SND_GET_INFO_NAME( es5505 ) }, -#endif -#if (HAS_ES5506) - { SOUND_ES5506, SND_GET_INFO_NAME( es5506 ) }, -#endif -#if (HAS_BSMT2000) - { SOUND_BSMT2000, SND_GET_INFO_NAME( bsmt2000 ) }, -#endif -#if (HAS_YMF262) - { SOUND_YMF262, SND_GET_INFO_NAME( ymf262 ) }, -#endif -#if (HAS_YMF278B) - { SOUND_YMF278B, SND_GET_INFO_NAME( ymf278b ) }, -#endif -#if (HAS_GAELCO_CG1V) - { SOUND_GAELCO_CG1V, SND_GET_INFO_NAME( gaelco_cg1v ) }, -#endif -#if (HAS_GAELCO_GAE1) - { SOUND_GAELCO_GAE1, SND_GET_INFO_NAME( gaelco_gae1 ) }, -#endif -#if (HAS_X1_010) - { SOUND_X1_010, SND_GET_INFO_NAME( x1_010 ) }, -#endif -#if (HAS_MULTIPCM) - { SOUND_MULTIPCM, SND_GET_INFO_NAME( multipcm ) }, -#endif -#if (HAS_C6280) - { SOUND_C6280, SND_GET_INFO_NAME( c6280 ) }, -#endif -#if (HAS_TIA) - { SOUND_TIA, SND_GET_INFO_NAME( tia ) }, -#endif -#if (HAS_SP0250) - { SOUND_SP0250, SND_GET_INFO_NAME( sp0250 ) }, -#endif -#if (HAS_SCSP) - { SOUND_SCSP, SND_GET_INFO_NAME( scsp ) }, -#endif -#if (HAS_PSXSPU) - { SOUND_PSXSPU, SND_GET_INFO_NAME( psxspu ) }, -#endif -#if (HAS_YMF271) - { SOUND_YMF271, SND_GET_INFO_NAME( ymf271 ) }, -#endif -#if (HAS_CDDA) - { SOUND_CDDA, SND_GET_INFO_NAME( cdda ) }, -#endif -#if (HAS_ICS2115) - { SOUND_ICS2115, SND_GET_INFO_NAME( ics2115 ) }, -#endif -#if (HAS_ST0016) - { SOUND_ST0016, SND_GET_INFO_NAME( st0016 ) }, -#endif -#if (HAS_NILE) - { SOUND_NILE, SND_GET_INFO_NAME( nile ) }, -#endif -#if (HAS_C352) - { SOUND_C352, SND_GET_INFO_NAME( c352 ) }, -#endif -#if (HAS_VRENDER0) - { SOUND_VRENDER0, SND_GET_INFO_NAME( vrender0 ) }, -#endif -#if (HAS_VOTRAX) - { SOUND_VOTRAX, SND_GET_INFO_NAME( votrax ) }, -#endif -#if (HAS_ES8712) - { SOUND_ES8712, SND_GET_INFO_NAME( es8712 ) }, -#endif -#if (HAS_RF5C400) - { SOUND_RF5C400, SND_GET_INFO_NAME( rf5c400 ) }, -#endif -#if (HAS_SPEAKER) - { SOUND_SPEAKER, SND_GET_INFO_NAME( speaker ) }, -#endif -#if (HAS_CDP1869) - { SOUND_CDP1869, SND_GET_INFO_NAME( cdp1869 ) }, -#endif -#if (HAS_S14001A) - { SOUND_S14001A, SND_GET_INFO_NAME( s14001a ) }, -#endif -#if (HAS_BEEP) - { SOUND_BEEP, SND_GET_INFO_NAME( beep ) }, -#endif -#if (HAS_WAVE) - { SOUND_WAVE, SND_GET_INFO_NAME( wave ) }, -#endif -#if (HAS_SID6581) - { SOUND_SID6581, SND_GET_INFO_NAME( sid6581 ) }, -#endif -#if (HAS_SID8580) - { SOUND_SID8580, SND_GET_INFO_NAME( sid8580 ) }, -#endif -#if (HAS_SP0256) - { SOUND_SP0256, SND_GET_INFO_NAME( sp0256 ) }, -#endif -#if (HAS_AICA) - { SOUND_AICA, SND_GET_INFO_NAME( aica ) }, -#endif - - { SOUND_FILTER_VOLUME, SND_GET_INFO_NAME( filter_volume ) }, - { SOUND_FILTER_RC, SND_GET_INFO_NAME( filter_rc ) }, }; @@ -494,11 +54,10 @@ static const struct assert_always(sndnum >= 0 && sndnum < totalsnd, #name "() called with invalid sound num!") #define VERIFY_SNDTI(name) \ - assert_always(sndtype >= 0 && sndtype < SOUND_COUNT, #name "() called with invalid sound type!"); \ - assert_always(sndindex >= 0 && sndindex < totalsnd && sound_matrix[sndtype][sndindex] != 0, #name "() called with invalid (type,index) pair!") + int sndnum = sndti_to_sndnum(sndtype, sndindex); \ + assert_always(sndindex >= 0 && sndindex < totalsnd && sndnum != -1, #name "() called with invalid (type,index) pair!") #define VERIFY_SNDTYPE(name) \ - assert_always(sndtype >= 0 && sndtype < SOUND_COUNT, #name "() called with invalid sound type!") @@ -506,11 +65,8 @@ static const struct GLOBAL VARIABLES ***************************************************************************/ -static snd_class_header snd_type_header[SOUND_COUNT]; - static sndintrf_data sound[MAX_SOUND]; static sndintrf_data *current_sound_start; -static UINT8 sound_matrix[SOUND_COUNT][MAX_SOUND]; static int totalsnd; @@ -527,51 +83,9 @@ static int totalsnd; void sndintrf_init(running_machine *machine) { - int mapindex; - - /* reset the sndintrf array */ - memset(snd_type_header, 0, sizeof(snd_type_header)); - - /* build the sndintrf array */ - for (mapindex = 0; mapindex < ARRAY_LENGTH(sndintrf_map); mapindex++) - { - sound_type sndtype = sndintrf_map[mapindex].sndtype; - snd_class_header *header = &snd_type_header[sndtype]; - sndinfo info; - - /* start with the get_info routine */ - header->sndtype = sndtype; - header->get_info = sndintrf_map[mapindex].get_info; - - /* bootstrap the rest of the function pointers */ - info.set_info = NULL; - (*header->get_info)(NULL, SNDINFO_PTR_SET_INFO, &info); - header->set_info = info.set_info; - - info.start = NULL; - (*header->get_info)(NULL, SNDINFO_PTR_START, &info); - header->start = info.start; - - info.stop = NULL; - (*header->get_info)(NULL, SNDINFO_PTR_STOP, &info); - header->stop = info.stop; - - info.reset = NULL; - (*header->get_info)(NULL, SNDINFO_PTR_RESET, &info); - header->reset = info.reset; - } - - /* fill in any empty entries with the dummy sound */ - for (mapindex = 0; mapindex < SOUND_COUNT; mapindex++) - if (snd_type_header[mapindex].get_info == NULL) - snd_type_header[mapindex] = snd_type_header[SOUND_DUMMY]; - /* zap the sound data structures */ memset(sound, 0, sizeof(sound)); totalsnd = 0; - - /* reset the (type,index) matrix */ - memset(sound_matrix, 0, sizeof(sound_matrix)); } @@ -588,8 +102,10 @@ static DEVICE_GET_INFO( sndclass ) int sndintrf_init_sound(running_machine *machine, int sndnum, const char *tag, sound_type sndtype, int clock, const void *config) { + snd_start_func start; sndintrf_data *info = &sound[sndnum]; int index; + int sndidx; info->device = auto_malloc(sizeof(*info->device) + strlen(tag)); memset(info->device, 0, sizeof(*info->device) + strlen(tag)); @@ -604,27 +120,25 @@ int sndintrf_init_sound(running_machine *machine, int sndnum, const char *tag, s info->device->inline_config = info; /* fill in the type and interface */ - info->intf = snd_type_header[sndtype]; - info->tag = tag; + info->intf.get_info = sndtype; + info->intf.set_info = (snd_set_info_func)sndtype_get_info_fct(sndtype, SNDINFO_PTR_SET_INFO); info->sndtype = sndtype; - info->aliastype = sndtype_get_info_int(sndtype, SNDINFO_INT_ALIAS); + info->aliastype = (sound_type)sndtype_get_info_fct(sndtype, SNDINFO_FCT_ALIAS); if (info->aliastype == 0) info->aliastype = sndtype; - info->clock = clock; + info->device->clock = clock; - /* find an empty slot in the matrix and add it */ + /* compute the index */ totalsnd++; - for (index = 0; index < MAX_SOUND; index++) - if (sound_matrix[info->aliastype][index] == 0) - { - sound_matrix[info->aliastype][index] = totalsnd; - break; - } + for (index = 0, sndidx = 0; sndidx < totalsnd; sndidx++) + if (sound[sndidx].sndtype == sndtype) + index++; info->index = index; /* start the chip, tagging all its streams */ current_sound_start = &sound[sndnum]; - info->device->token = (*info->intf.start)(info->device, clock, config, info->index); + start = (snd_start_func)sndtype_get_info_fct(sndtype, SNDINFO_PTR_START); + info->device->token = (*start)(info->device, clock, config, info->index); current_sound_start = NULL; VPRINTF((" token = %p\n", info->device->token)); @@ -643,9 +157,14 @@ int sndintrf_init_sound(running_machine *machine, int sndnum, const char *tag, s void sndintrf_exit_sound(int sndnum) { + sndinfo info; + + info.stop = NULL; + (*sound[sndnum].intf.get_info)(NULL, SNDINFO_PTR_STOP, &info); + /* stop the chip */ - if (sound[sndnum].intf.stop) - (*sound[sndnum].intf.stop)(sound[sndnum].device); + if (info.stop) + (*info.stop)(sound[sndnum].device); } @@ -673,7 +192,7 @@ void sndintrf_register_token(void *token) int sndti_exists(sound_type type, int index) { - return (sound_matrix[type][index] != 0); + return (sndti_to_sndnum(type, index) != -1); } @@ -684,7 +203,12 @@ int sndti_exists(sound_type type, int index) int sndti_to_sndnum(sound_type type, int index) { - return sound_matrix[type][index] - 1; + int sndnum; + for (sndnum = 0; sndnum < totalsnd; sndnum++) + if (sound[sndnum].aliastype == type) + if (index-- == 0) + return sndnum; + return -1; } @@ -805,15 +329,19 @@ void sndnum_set_info_fct(int sndnum, UINT32 state, genf *data) void sndnum_reset(int sndnum) { + sndinfo info; + VERIFY_SNDNUM(sndnum_reset); - if (sound[sndnum].intf.reset) - (*sound[sndnum].intf.reset)(sound[sndnum].device); + info.reset = NULL; + (*sound[sndnum].intf.get_info)(NULL, SNDINFO_PTR_RESET, &info); + if (info.reset) + (info.reset)(sound[sndnum].device); } int sndnum_clock(int sndnum) { VERIFY_SNDNUM(sndnum_clock); - return sound[sndnum].clock; + return sound[sndnum].device->clock; } void *sndnum_token(int sndnum) @@ -835,10 +363,8 @@ void *sndnum_token(int sndnum) INT64 sndti_get_info_int(sound_type sndtype, int sndindex, UINT32 state) { sndinfo info; - int sndnum; VERIFY_SNDTI(sndti_get_info_int); - sndnum = sound_matrix[sndtype][sndindex] - 1; info.i = 0; (*sound[sndnum].intf.get_info)(sound[sndnum].device, state, &info); return info.i; @@ -847,10 +373,8 @@ INT64 sndti_get_info_int(sound_type sndtype, int sndindex, UINT32 state) void *sndti_get_info_ptr(sound_type sndtype, int sndindex, UINT32 state) { sndinfo info; - int sndnum; VERIFY_SNDTI(sndti_get_info_ptr); - sndnum = sound_matrix[sndtype][sndindex] - 1; info.p = NULL; (*sound[sndnum].intf.get_info)(sound[sndnum].device, state, &info); return info.p; @@ -859,10 +383,8 @@ void *sndti_get_info_ptr(sound_type sndtype, int sndindex, UINT32 state) genf *sndti_get_info_fct(sound_type sndtype, int sndindex, UINT32 state) { sndinfo info; - int sndnum; VERIFY_SNDTI(sndti_get_info_fct); - sndnum = sound_matrix[sndtype][sndindex] - 1; info.f = NULL; (*sound[sndnum].intf.get_info)(sound[sndnum].device, state, &info); return info.f; @@ -872,10 +394,8 @@ const char *sndti_get_info_string(sound_type sndtype, int sndindex, UINT32 state { extern char *get_temp_string_buffer(void); sndinfo info; - int sndnum; VERIFY_SNDTI(sndti_get_info_string); - sndnum = sound_matrix[sndtype][sndindex] - 1; info.s = get_temp_string_buffer(); (*sound[sndnum].intf.get_info)(sound[sndnum].device, state, &info); return info.s; @@ -889,10 +409,8 @@ const char *sndti_get_info_string(sound_type sndtype, int sndindex, UINT32 state void sndti_set_info_int(sound_type sndtype, int sndindex, UINT32 state, INT64 data) { sndinfo info; - int sndnum; VERIFY_SNDTI(sndti_set_info_int); - sndnum = sound_matrix[sndtype][sndindex] - 1; info.i = data; (*sound[sndnum].intf.set_info)(sound[sndnum].device, state, &info); } @@ -900,10 +418,8 @@ void sndti_set_info_int(sound_type sndtype, int sndindex, UINT32 state, INT64 da void sndti_set_info_ptr(sound_type sndtype, int sndindex, UINT32 state, void *data) { sndinfo info; - int sndnum; VERIFY_SNDTI(sndti_set_info_ptr); - sndnum = sound_matrix[sndtype][sndindex] - 1; info.p = data; (*sound[sndnum].intf.set_info)(sound[sndnum].device, state, &info); } @@ -911,10 +427,8 @@ void sndti_set_info_ptr(sound_type sndtype, int sndindex, UINT32 state, void *da void sndti_set_info_fct(sound_type sndtype, int sndindex, UINT32 state, genf *data) { sndinfo info; - int sndnum; VERIFY_SNDTI(sndti_set_info_ptr); - sndnum = sound_matrix[sndtype][sndindex] - 1; info.f = data; (*sound[sndnum].intf.set_info)(sound[sndnum].device, state, &info); } @@ -926,27 +440,25 @@ void sndti_set_info_fct(sound_type sndtype, int sndindex, UINT32 state, genf *da void sndti_reset(sound_type sndtype, int sndindex) { - int sndnum; + sndinfo info; VERIFY_SNDTI(sndti_reset); - sndnum = sound_matrix[sndtype][sndindex] - 1; - if (sound[sndnum].intf.reset) - (*sound[sndnum].intf.reset)(sound[sndnum].device); + info.reset = NULL; + (*sound[sndnum].intf.get_info)(NULL, SNDINFO_PTR_RESET, &info); + + if (info.reset) + (*info.reset)(sound[sndnum].device); } int sndti_clock(sound_type sndtype, int sndindex) { - int sndnum; VERIFY_SNDTI(sndti_clock); - sndnum = sound_matrix[sndtype][sndindex] - 1; - return sound[sndnum].clock; + return sound[sndnum].device->clock; } void *sndti_token(sound_type sndtype, int sndindex) { - int sndnum; VERIFY_SNDTI(sndti_token); - sndnum = sound_matrix[sndtype][sndindex] - 1; return sound[sndnum].device->token; } @@ -962,88 +474,45 @@ void *sndti_token(sound_type sndtype, int sndindex) INT64 sndtype_get_info_int(sound_type sndtype, UINT32 state) { - snd_class_header *classheader = &snd_type_header[sndtype]; + snd_get_info_func get_info = sndtype; sndinfo info; VERIFY_SNDTYPE(sndtype_get_info_int); info.i = 0; - (*classheader->get_info)(NULL, state, &info); + (*get_info)(NULL, state, &info); return info.i; } void *sndtype_get_info_ptr(sound_type sndtype, UINT32 state) { - snd_class_header *classheader = &snd_type_header[sndtype]; + snd_get_info_func get_info = sndtype; sndinfo info; VERIFY_SNDTYPE(sndtype_get_info_ptr); info.p = NULL; - (*classheader->get_info)(NULL, state, &info); + (*get_info)(NULL, state, &info); return info.p; } genf *sndtype_get_info_fct(sound_type sndtype, UINT32 state) { - snd_class_header *classheader = &snd_type_header[sndtype]; + snd_get_info_func get_info = sndtype; sndinfo info; VERIFY_SNDTYPE(sndtype_get_info_fct); info.f = NULL; - (*classheader->get_info)(NULL, state, &info); + (*get_info)(NULL, state, &info); return info.f; } const char *sndtype_get_info_string(sound_type sndtype, UINT32 state) { extern char *get_temp_string_buffer(void); - snd_class_header *classheader = &snd_type_header[sndtype]; + snd_get_info_func get_info = sndtype; sndinfo info; VERIFY_SNDTYPE(sndtype_get_info_string); info.s = get_temp_string_buffer(); - (*classheader->get_info)(NULL, state, &info); + (*get_info)(NULL, state, &info); return info.s; } - - - -/*************************************************************************** - DUMMY INTERFACES -***************************************************************************/ - -static SND_START( dummy_sound ) -{ - logerror("Warning: starting a dummy sound core -- you are missing a hookup in sndintrf.c!\n"); - return auto_malloc(1); -} - - -static SND_SET_INFO( dummy_sound ) -{ - switch (state) - { - /* no parameters to set */ - } -} - - -static SND_GET_INFO( dummy_sound ) -{ - switch (state) - { - /* --- the following bits of info are returned as 64-bit signed integers --- */ - - /* --- the following bits of info are returned as pointers to data or functions --- */ - case SNDINFO_PTR_SET_INFO: info->set_info = SND_SET_INFO_NAME( dummy_sound ); break; - case SNDINFO_PTR_START: info->start = SND_START_NAME( dummy_sound ); break; - case SNDINFO_PTR_STOP: /* Nothing */ break; - case SNDINFO_PTR_RESET: /* Nothing */ break; - - /* --- the following bits of info are returned as NULL-terminated strings --- */ - case SNDINFO_STR_NAME: strcpy(info->s, "Dummy"); break; - case SNDINFO_STR_CORE_FAMILY: strcpy(info->s, "Dummy"); break; - case SNDINFO_STR_CORE_VERSION: strcpy(info->s, "1.0"); break; - case SNDINFO_STR_CORE_FILE: strcpy(info->s, __FILE__); break; - case SNDINFO_STR_CORE_CREDITS: strcpy(info->s, "Copyright Nicola Salmoria and the MAME Team"); break; - } -} diff --git a/src/emu/sndintrf.h b/src/emu/sndintrf.h index 3fcd63c01b8..939d5d348cc 100644 --- a/src/emu/sndintrf.h +++ b/src/emu/sndintrf.h @@ -25,129 +25,6 @@ #define MAX_SOUND 32 -/* Enum listing all the sound chips */ -enum _sound_type -{ - SOUND_DUMMY, - SOUND_CUSTOM, - SOUND_SAMPLES, - SOUND_DAC, - SOUND_DMADAC, - SOUND_DISCRETE, - SOUND_AY8910, - SOUND_AY8912, - SOUND_AY8913, - SOUND_AY8930, - SOUND_YM2149, - SOUND_YM3439, - SOUND_YMZ284, - SOUND_YMZ294, - SOUND_YM2203, - SOUND_YM2151, - SOUND_YM2608, - SOUND_YM2610, - SOUND_YM2610B, - SOUND_YM2612, - SOUND_YM3438, - SOUND_YM2413, - SOUND_YM3812, - SOUND_YM3526, - SOUND_YMZ280B, - SOUND_Y8950, - SOUND_SN76477, - SOUND_SN76489, - SOUND_SN76489A, - SOUND_SN76494, - SOUND_SN76496, - SOUND_GAMEGEAR, - SOUND_SMSIII, - SOUND_POKEY, - SOUND_NES, - SOUND_ASTROCADE, - SOUND_NAMCO, - SOUND_NAMCO_15XX, - SOUND_NAMCO_CUS30, - SOUND_NAMCO_52XX, - SOUND_NAMCO_63701X, - SOUND_SNKWAVE, - SOUND_TMS36XX, - SOUND_TMS3615, - SOUND_TMS5100, - SOUND_TMS5110, - SOUND_TMS5110A, - SOUND_CD2801, - SOUND_TMC0281, - SOUND_CD2802, - SOUND_M58817, - SOUND_TMC0285, - SOUND_TMS5200, - SOUND_TMS5220, - SOUND_VLM5030, - SOUND_OKIM6376, - SOUND_OKIM6295, - SOUND_OKIM6258, - SOUND_MSM5205, - SOUND_MSM5232, - SOUND_UPD7759, - SOUND_HC55516, - SOUND_MC3417, - SOUND_MC3418, - SOUND_K005289, - SOUND_K007232, - SOUND_K051649, - SOUND_K053260, - SOUND_K054539, - SOUND_SEGAPCM, - SOUND_RF5C68, - SOUND_CEM3394, - SOUND_C140, - SOUND_QSOUND, - SOUND_SAA1099, - SOUND_IREMGA20, - SOUND_ES5503, - SOUND_ES5505, - SOUND_ES5506, - SOUND_BSMT2000, - SOUND_YMF262, - SOUND_YMF278B, - SOUND_GAELCO_CG1V, - SOUND_GAELCO_GAE1, - SOUND_X1_010, - SOUND_MULTIPCM, - SOUND_C6280, - SOUND_TIA, - SOUND_SP0250, - SOUND_SCSP, - SOUND_PSXSPU, - SOUND_YMF271, - SOUND_CDDA, - SOUND_ICS2115, - SOUND_ST0016, - SOUND_NILE, - SOUND_C352, - SOUND_VRENDER0, - SOUND_VOTRAX, - SOUND_ES8712, - SOUND_RF5C400, - SOUND_SPEAKER, - SOUND_CDP1869, - SOUND_BEEP, - SOUND_WAVE, - SOUND_SID6581, - SOUND_SID8580, - SOUND_SP0256, - SOUND_S14001A, - SOUND_AICA, - - /* filters start here */ - SOUND_FILTER_VOLUME, - SOUND_FILTER_RC, - SOUND_FILTER_LOWPASS, - - SOUND_COUNT -}; -typedef enum _sound_type sound_type; - /* Sound information constants */ enum @@ -155,8 +32,6 @@ enum /* --- the following bits of info are returned as 64-bit signed integers --- */ SNDINFO_INT_FIRST = DEVINFO_INT_FIRST, - SNDINFO_INT_ALIAS = DEVINFO_INT_CLASS_SPECIFIC, /* R/O: alias to sound type for (type,index) identification */ - SNDINFO_INT_CORE_SPECIFIC = DEVINFO_INT_DEVICE_SPECIFIC, /* R/W: core-specific values start here */ /* --- the following bits of info are returned as pointers to data or functions --- */ @@ -172,6 +47,7 @@ enum SNDINFO_PTR_SET_INFO = DEVINFO_FCT_CLASS_SPECIFIC, /* R/O: void (*set_info)(const device_config *device, UINT32 state, sndinfo *info) */ SNDINFO_PTR_START, /* R/O: void *(*start)(const device_config *device, int clock, const void *config, int sndindex) */ + SNDINFO_FCT_ALIAS, /* R/O: alias to sound type for (type,index) identification */ SNDINFO_FCT_CORE_SPECIFIC = DEVINFO_FCT_DEVICE_SPECIFIC, /* R/W: core-specific values start here */ @@ -229,6 +105,8 @@ typedef void *(*snd_start_func)(const device_config *device, int clock, const vo typedef void (*snd_stop_func)(const device_config *device); typedef void (*snd_reset_func)(const device_config *device); +typedef snd_get_info_func sound_type; + /* sndinfo union used to pass data to/from the get_info/set_info functions */ union _sndinfo @@ -237,6 +115,7 @@ union _sndinfo void * p; /* generic pointers */ genf * f; /* generic function pointers */ char * s; /* generic strings */ + sound_type type; /* generic type */ snd_set_info_func set_info; /* SNDINFO_PTR_SET_INFO */ snd_start_func start; /* SNDINFO_PTR_START */ @@ -247,15 +126,9 @@ union _sndinfo typedef struct _snd_class_header snd_class_header; struct _snd_class_header { - int index; /* index of this SND */ - sound_type sndtype; /* type index of this SND */ - /* table of core functions */ snd_get_info_func get_info; snd_set_info_func set_info; - snd_start_func start; - snd_stop_func stop; - snd_reset_func reset; }; @@ -352,5 +225,7 @@ int sndti_to_sndnum(sound_type type, int index); sound_type sndnum_to_sndti(int sndnum, int *index); int sndtype_count(sound_type sndtype); +#define SOUND_DUMMY NULL + #endif /* __SNDINTRF_H__ */ diff --git a/src/emu/sound.c b/src/emu/sound.c index e4e687af078..eaa8d640650 100644 --- a/src/emu/sound.c +++ b/src/emu/sound.c @@ -291,7 +291,7 @@ static void start_sound_chips(running_machine *machine) info->sound = msound; /* start the chip, tagging all its streams */ - VPRINTF(("sndnum = %d -- sound_type = %d\n", sndnum, msound->type)); + VPRINTF(("sndnum = %d -- sound_type = %s\n", sndnum, sndtype_get_name(msound->type))); num_regs = state_save_get_reg_count(machine); streams_set_tag(machine, info); if (sndintrf_init_sound(machine, sndnum, msound->tag, msound->type, msound->clock, msound->config) != 0) @@ -903,12 +903,12 @@ void sndti_set_output_gain(sound_type type, int index, int output, float gain) if (sndnum < 0) { - logerror("sndti_set_output_gain called for invalid sound type %d, index %d\n", type, index); + logerror("sndti_set_output_gain called for invalid sound type %s, index %d\n", sndtype_get_name(type), index); return; } if (output >= sound[sndnum].outputs) { - logerror("sndti_set_output_gain called for invalid sound output %d (type %d, index %d)\n", output, type, index); + logerror("sndti_set_output_gain called for invalid sound output %d (type %s, index %d)\n", output, sndtype_get_name(type), index); return; } stream_set_output_gain(sound[sndnum].output[output].stream, sound[sndnum].output[output].output, gain); diff --git a/src/emu/sound/2151intf.h b/src/emu/sound/2151intf.h index 78484f1bfc1..f05bc35ce71 100644 --- a/src/emu/sound/2151intf.h +++ b/src/emu/sound/2151intf.h @@ -38,6 +38,7 @@ WRITE16_HANDLER( ym2151_data_port_1_lsb_w ); WRITE16_HANDLER( ym2151_data_port_2_lsb_w ); SND_GET_INFO( ym2151 ); +#define SOUND_YM2151 SND_GET_INFO_NAME( ym2151 ) #endif /* __2151INTF_H__ */ diff --git a/src/emu/sound/2203intf.h b/src/emu/sound/2203intf.h index 55640042271..cd34a9cde26 100644 --- a/src/emu/sound/2203intf.h +++ b/src/emu/sound/2203intf.h @@ -67,5 +67,6 @@ WRITE8_HANDLER( ym2203_word_0_w ); WRITE8_HANDLER( ym2203_word_1_w ); SND_GET_INFO( ym2203 ); +#define SOUND_YM2203 SND_GET_INFO_NAME( ym2203 ) #endif /* __2203INTF_H__ */ diff --git a/src/emu/sound/2413intf.h b/src/emu/sound/2413intf.h index 8520f3ffcd6..d63be022024 100644 --- a/src/emu/sound/2413intf.h +++ b/src/emu/sound/2413intf.h @@ -25,5 +25,6 @@ WRITE16_HANDLER( ym2413_data_port_2_lsb_w ); WRITE16_HANDLER( ym2413_data_port_3_lsb_w ); SND_GET_INFO( ym2413 ); +#define SOUND_YM2413 SND_GET_INFO_NAME( ym2413 ) #endif /* __2413INTF_H__ */ diff --git a/src/emu/sound/2608intf.h b/src/emu/sound/2608intf.h index 97023733969..b3a9b8ec3f6 100644 --- a/src/emu/sound/2608intf.h +++ b/src/emu/sound/2608intf.h @@ -38,5 +38,6 @@ WRITE8_HANDLER( ym2608_data_port_1_a_w ); WRITE8_HANDLER( ym2608_data_port_1_b_w ); SND_GET_INFO( ym2608 ); +#define SOUND_YM2608 SND_GET_INFO_NAME( ym2608 ) #endif /* __2608INTF_H__ */ diff --git a/src/emu/sound/2610intf.h b/src/emu/sound/2610intf.h index 801dd745ae5..39050bf5af2 100644 --- a/src/emu/sound/2610intf.h +++ b/src/emu/sound/2610intf.h @@ -53,5 +53,7 @@ WRITE16_HANDLER( ym2610_data_port_1_b_lsb_w ); SND_GET_INFO( ym2610 ); SND_GET_INFO( ym2610b ); +#define SOUND_YM2610 SND_GET_INFO_NAME( ym2610 ) +#define SOUND_YM2610B SND_GET_INFO_NAME( ym2610b ) #endif /* __2610INTF_H__ */ diff --git a/src/emu/sound/2612intf.h b/src/emu/sound/2612intf.h index 39ec7906a3e..16eb800a16d 100644 --- a/src/emu/sound/2612intf.h +++ b/src/emu/sound/2612intf.h @@ -35,6 +35,7 @@ WRITE8_HANDLER( ym2612_data_port_1_a_w ); WRITE8_HANDLER( ym2612_data_port_1_b_w ); SND_GET_INFO( ym2612 ); +#define SOUND_YM2612 SND_GET_INFO_NAME( ym2612 ) typedef struct _ym3438_interface ym3438_interface; @@ -67,5 +68,6 @@ WRITE8_HANDLER( ym3438_data_port_1_a_w ); WRITE8_HANDLER( ym3438_data_port_1_b_w ); SND_GET_INFO( ym3438 ); +#define SOUND_YM3438 SND_GET_INFO_NAME( ym3438 ) #endif /* __2612INTF_H__ */ diff --git a/src/emu/sound/262intf.h b/src/emu/sound/262intf.h index 2b29584eff0..10818a575df 100644 --- a/src/emu/sound/262intf.h +++ b/src/emu/sound/262intf.h @@ -27,5 +27,6 @@ WRITE8_HANDLER( ymf262_data_a_1_w ); WRITE8_HANDLER( ymf262_data_b_1_w ); SND_GET_INFO( ymf262 ); +#define SOUND_YMF262 SND_GET_INFO_NAME( ymf262 ) #endif /* __262INTF_H__ */ diff --git a/src/emu/sound/3812intf.h b/src/emu/sound/3812intf.h index d635eee652b..62f06e861a2 100644 --- a/src/emu/sound/3812intf.h +++ b/src/emu/sound/3812intf.h @@ -36,6 +36,7 @@ READ8_HANDLER( ym3812_read_port_1_r ); WRITE8_HANDLER( ym3812_write_port_1_w ); SND_GET_INFO( ym3812 ); +#define SOUND_YM3812 SND_GET_INFO_NAME( ym3812 ) /* YM3526 */ READ8_HANDLER ( ym3526_status_port_0_r ); @@ -49,6 +50,7 @@ READ8_HANDLER( ym3526_read_port_1_r ); WRITE8_HANDLER( ym3526_write_port_1_w ); SND_GET_INFO( ym3526 ); +#define SOUND_YM3526 SND_GET_INFO_NAME( ym3526 ) /* Y8950 */ READ8_HANDLER ( y8950_status_port_0_r ); @@ -62,5 +64,6 @@ READ8_HANDLER ( y8950_read_port_1_r ); WRITE8_HANDLER( y8950_write_port_1_w ); SND_GET_INFO( y8950 ); +#define SOUND_Y8950 SND_GET_INFO_NAME( y8950 ) #endif /* __3812INTF_H__ */ diff --git a/src/emu/sound/5110intf.c b/src/emu/sound/5110intf.c index 53f4065abf3..c44fa8e6147 100644 --- a/src/emu/sound/5110intf.c +++ b/src/emu/sound/5110intf.c @@ -298,7 +298,7 @@ SND_GET_INFO( tms5110 ) switch (state) { /* --- the following bits of info are returned as 64-bit signed integers --- */ - case SNDINFO_INT_ALIAS: info->i = SOUND_TMS5110; break; + case SNDINFO_FCT_ALIAS: info->type = SOUND_TMS5110; break; /* --- the following bits of info are returned as pointers to data or functions --- */ case SNDINFO_PTR_SET_INFO: info->set_info = SND_SET_INFO_NAME( tms5110 ); break; diff --git a/src/emu/sound/5110intf.h b/src/emu/sound/5110intf.h index 3489814e49d..8ec02891475 100644 --- a/src/emu/sound/5110intf.h +++ b/src/emu/sound/5110intf.h @@ -30,4 +30,12 @@ SND_GET_INFO( tmc0281 ); SND_GET_INFO( cd2802 ); SND_GET_INFO( m58817 ); +#define SOUND_TMS5110 SND_GET_INFO_NAME( tms5110 ) +#define SOUND_TMS5100 SND_GET_INFO_NAME( tms5100 ) +#define SOUND_TMS5110A SND_GET_INFO_NAME( tms5110a ) +#define SOUND_CD2801 SND_GET_INFO_NAME( cd2801 ) +#define SOUND_TMC0281 SND_GET_INFO_NAME( tmc0281 ) +#define SOUND_CD2802 SND_GET_INFO_NAME( cd2802 ) +#define SOUND_M58817 SND_GET_INFO_NAME( m58817 ) + #endif /* __5110INTF_H__ */ diff --git a/src/emu/sound/5220intf.c b/src/emu/sound/5220intf.c index 4586b423937..af0288a87b2 100644 --- a/src/emu/sound/5220intf.c +++ b/src/emu/sound/5220intf.c @@ -254,7 +254,7 @@ SND_GET_INFO( tms5220 ) switch (state) { /* --- the following bits of info are returned as 64-bit signed integers --- */ - case SNDINFO_INT_ALIAS: info->i = SOUND_TMS5220; break; + case SNDINFO_FCT_ALIAS: info->type = SOUND_TMS5220; break; /* --- the following bits of info are returned as pointers to data or functions --- */ case SNDINFO_PTR_SET_INFO: info->set_info = SND_SET_INFO_NAME( tms5220 ); break; diff --git a/src/emu/sound/5220intf.h b/src/emu/sound/5220intf.h index 25dd9449952..d52b89373de 100644 --- a/src/emu/sound/5220intf.h +++ b/src/emu/sound/5220intf.h @@ -34,4 +34,8 @@ SND_GET_INFO( tms5220 ); SND_GET_INFO( tmc0285 ); SND_GET_INFO( tms5200 ); +#define SOUND_TMS5220 SND_GET_INFO_NAME( tms5220 ) +#define SOUND_TMC0285 SND_GET_INFO_NAME( tmc0285 ) +#define SOUND_TMS5200 SND_GET_INFO_NAME( tms5200 ) + #endif /* __5200INTF_H__ */ diff --git a/src/emu/sound/aica.h b/src/emu/sound/aica.h index 109a7f72a52..db7bbaccf4b 100644 --- a/src/emu/sound/aica.h +++ b/src/emu/sound/aica.h @@ -26,5 +26,6 @@ WRITE16_HANDLER( aica_midi_in ); READ16_HANDLER( aica_midi_out_r ); SND_GET_INFO( aica ); +#define SOUND_AICA SND_GET_INFO_NAME( aica ) #endif /* __AICA_H__ */ diff --git a/src/emu/sound/astrocde.h b/src/emu/sound/astrocde.h index 9ac8695f32d..e5363176862 100644 --- a/src/emu/sound/astrocde.h +++ b/src/emu/sound/astrocde.h @@ -7,5 +7,6 @@ WRITE8_HANDLER( astrocade_sound1_w ); WRITE8_HANDLER( astrocade_sound2_w ); SND_GET_INFO( astrocade ); +#define SOUND_ASTROCADE SND_GET_INFO_NAME( astrocade ) #endif /* __ASTROCDE_H__ */ diff --git a/src/emu/sound/ay8910.c b/src/emu/sound/ay8910.c index c4a60573943..25594666c8e 100644 --- a/src/emu/sound/ay8910.c +++ b/src/emu/sound/ay8910.c @@ -675,31 +675,21 @@ void *ay8910_start_ym(sound_type chip_type, const device_config *device, int clo else info->streams = 3; - switch (chip_type) + if (chip_type == SOUND_AY8910 || chip_type == SOUND_AY8930) { - case SOUND_AY8910: - case SOUND_AY8930: - info->step = 2; - info->par = &ay8910_param; - info->par_env = &ay8910_param; - info->zero_is_off = 1; - info->env_step_mask = 0x0F; - break; - case SOUND_YM2149: - case SOUND_YM2203: - case SOUND_YM2610: - case SOUND_YM2610B: - case SOUND_YM2608: - case SOUND_YMZ284: - case SOUND_YMZ294: - case SOUND_YM3439: - default: - info->step = 1; - info->par = &ym2149_param; - info->par_env = &ym2149_param_env; - info->zero_is_off = 0; - info->env_step_mask = 0x1F; - break; + info->step = 2; + info->par = &ay8910_param; + info->par_env = &ay8910_param; + info->zero_is_off = 1; + info->env_step_mask = 0x0F; + } + else + { + info->step = 1; + info->par = &ym2149_param; + info->par_env = &ym2149_param_env; + info->zero_is_off = 0; + info->env_step_mask = 0x1F; } build_mixer_table(info); @@ -867,7 +857,7 @@ SND_GET_INFO( ay8910 ) switch (state) { /* --- the following bits of info are returned as 64-bit signed integers --- */ - case SNDINFO_INT_ALIAS: info->i = SOUND_AY8910; break; + case SNDINFO_FCT_ALIAS: info->type = SOUND_AY8910; break; /* --- the following bits of info are returned as pointers to data or functions --- */ case SNDINFO_PTR_SET_INFO: info->set_info = SND_SET_INFO_NAME( ay8910 ); break; diff --git a/src/emu/sound/ay8910.h b/src/emu/sound/ay8910.h index 57ee0599cfb..d8ceaccb1c9 100644 --- a/src/emu/sound/ay8910.h +++ b/src/emu/sound/ay8910.h @@ -143,4 +143,13 @@ SND_GET_INFO( ym3439 ); SND_GET_INFO( ymz284 ); SND_GET_INFO( ymz294 ); +#define SOUND_AY8910 SND_GET_INFO_NAME( ay8910 ) +#define SOUND_AY8912 SND_GET_INFO_NAME( ay8912 ) +#define SOUND_AY8913 SND_GET_INFO_NAME( ay8913 ) +#define SOUND_AY8930 SND_GET_INFO_NAME( ay8930 ) +#define SOUND_YM2149 SND_GET_INFO_NAME( ym2149 ) +#define SOUND_YM3439 SND_GET_INFO_NAME( ym3439 ) +#define SOUND_YMZ284 SND_GET_INFO_NAME( ymz284 ) +#define SOUND_YMZ294 SND_GET_INFO_NAME( ymz294 ) + #endif /* __AY8910_H__ */ diff --git a/src/emu/sound/beep.h b/src/emu/sound/beep.h index 506435fd012..2b01ed48dbb 100644 --- a/src/emu/sound/beep.h +++ b/src/emu/sound/beep.h @@ -12,6 +12,7 @@ void beep_set_frequency(int,int); void beep_set_volume(int,int); SND_GET_INFO( beep ); +#define SOUND_BEEP SND_GET_INFO_NAME( beep ) #ifdef __cplusplus } diff --git a/src/emu/sound/bsmt2000.h b/src/emu/sound/bsmt2000.h index 7cf963cb90c..cc3fc2d12a4 100644 --- a/src/emu/sound/bsmt2000.h +++ b/src/emu/sound/bsmt2000.h @@ -13,5 +13,6 @@ WRITE16_HANDLER( bsmt2000_data_0_w ); SND_GET_INFO( bsmt2000 ); +#define SOUND_BSMT2000 SND_GET_INFO_NAME( bsmt2000 ) #endif /* __BSMT2000_H__ */ diff --git a/src/emu/sound/c140.h b/src/emu/sound/c140.h index d487acb8c8b..5d78c7eb264 100644 --- a/src/emu/sound/c140.h +++ b/src/emu/sound/c140.h @@ -24,5 +24,6 @@ struct _c140_interface { }; SND_GET_INFO( c140 ); +#define SOUND_C140 SND_GET_INFO_NAME( c140 ) #endif /* __C140_H__ */ diff --git a/src/emu/sound/c352.h b/src/emu/sound/c352.h index 0f933155d21..71c284c2f99 100644 --- a/src/emu/sound/c352.h +++ b/src/emu/sound/c352.h @@ -7,6 +7,7 @@ READ16_HANDLER( c352_0_r ); WRITE16_HANDLER( c352_0_w ); SND_GET_INFO( c352 ); +#define SOUND_C352 SND_GET_INFO_NAME( c352 ) #endif /* __C352_H__ */ diff --git a/src/emu/sound/c6280.h b/src/emu/sound/c6280.h index 4a6adec7a80..737f2b89c55 100644 --- a/src/emu/sound/c6280.h +++ b/src/emu/sound/c6280.h @@ -9,5 +9,6 @@ WRITE8_HANDLER( c6280_1_w ); READ8_HANDLER( c6280_r ); SND_GET_INFO( c6280 ); +#define SOUND_C6280 SND_GET_INFO_NAME( c6280 ) #endif /* __C6280_H__ */ diff --git a/src/emu/sound/cdda.h b/src/emu/sound/cdda.h index 032a010ed1c..411813090ea 100644 --- a/src/emu/sound/cdda.h +++ b/src/emu/sound/cdda.h @@ -16,5 +16,6 @@ int cdda_audio_paused(int num); int cdda_audio_ended(int num); SND_GET_INFO( cdda ); +#define SOUND_CDDA SND_GET_INFO_NAME( cdda ) #endif /* __CDDA_H__ */ diff --git a/src/emu/sound/cdp1869.h b/src/emu/sound/cdp1869.h index 463443f83aa..54e604fcd36 100644 --- a/src/emu/sound/cdp1869.h +++ b/src/emu/sound/cdp1869.h @@ -41,5 +41,6 @@ void cdp1869_set_wnfreq(int which, int value); void cdp1869_set_wnoff(int which, int value); SND_GET_INFO( cdp1869 ); +#define SOUND_CDP1869 SND_GET_INFO_NAME( cdp1869 ) #endif /* __CDP1869_H__ */ diff --git a/src/emu/sound/cem3394.h b/src/emu/sound/cem3394.h index 3a44057ab57..8faea098746 100644 --- a/src/emu/sound/cem3394.h +++ b/src/emu/sound/cem3394.h @@ -44,5 +44,6 @@ void cem3394_set_voltage(int chip, int input, double voltage); double cem3394_get_parameter(int chip, int input); SND_GET_INFO( cem3394 ); +#define SOUND_CEM3394 SND_GET_INFO_NAME( cem3394 ) #endif /* __CEM3394_H__ */ diff --git a/src/emu/sound/custom.h b/src/emu/sound/custom.h index 013bdecf109..78dcacf553f 100644 --- a/src/emu/sound/custom.h +++ b/src/emu/sound/custom.h @@ -19,5 +19,6 @@ void *custom_get_token(int index); #define CUSTOM_RESET(name) void name(const device_config *device, void *token) SND_GET_INFO( custom ); +#define SOUND_CUSTOM SND_GET_INFO_NAME( custom ) #endif /* __CUSTOM_H__ */ diff --git a/src/emu/sound/dac.h b/src/emu/sound/dac.h index ab21a20977a..75577e98205 100644 --- a/src/emu/sound/dac.h +++ b/src/emu/sound/dac.h @@ -16,5 +16,6 @@ WRITE8_HANDLER( dac_1_signed_data_w ); WRITE8_HANDLER( dac_2_signed_data_w ); SND_GET_INFO( dac ); +#define SOUND_DAC SND_GET_INFO_NAME( dac ) #endif /* __DAC_H__ */ diff --git a/src/emu/sound/discrete.h b/src/emu/sound/discrete.h index a0a2e6cb54a..dd476a260c5 100644 --- a/src/emu/sound/discrete.h +++ b/src/emu/sound/discrete.h @@ -4306,5 +4306,6 @@ READ8_HANDLER(discrete_sound_2_r); READ8_HANDLER(discrete_sound_3_r); SND_GET_INFO( discrete ); +#define SOUND_DISCRETE SND_GET_INFO_NAME( discrete ) #endif /* __DISCRETE_H__ */ diff --git a/src/emu/sound/dmadac.h b/src/emu/sound/dmadac.h index 47f9ec6a190..1f0eed3cb78 100644 --- a/src/emu/sound/dmadac.h +++ b/src/emu/sound/dmadac.h @@ -16,5 +16,6 @@ void dmadac_set_frequency(UINT8 first_channel, UINT8 num_channels, double freque void dmadac_set_volume(UINT8 first_channel, UINT8 num_channels, UINT16 volume); SND_GET_INFO( dmadac ); +#define SOUND_DMADAC SND_GET_INFO_NAME( dmadac ) #endif /* __DMADAC_H__ */ diff --git a/src/emu/sound/es5503.h b/src/emu/sound/es5503.h index 1e4e95f98d1..d7e6e454f87 100644 --- a/src/emu/sound/es5503.h +++ b/src/emu/sound/es5503.h @@ -16,5 +16,6 @@ WRITE8_HANDLER(es5503_reg_0_w); void es5503_set_base_0(UINT8 *wavemem); SND_GET_INFO( es5503 ); +#define SOUND_ES5503 SND_GET_INFO_NAME( es5503 ) #endif /* __ES5503_H__ */ diff --git a/src/emu/sound/es5506.h b/src/emu/sound/es5506.h index d5a94b58072..13deb9e827c 100644 --- a/src/emu/sound/es5506.h +++ b/src/emu/sound/es5506.h @@ -28,6 +28,7 @@ void es5505_voice_bank_0_w(int voice, int bank); void es5505_voice_bank_1_w(int voice, int bank); SND_GET_INFO( es5505 ); +#define SOUND_ES5505 SND_GET_INFO_NAME( es5505 ) typedef struct _es5506_interface es5506_interface; @@ -55,5 +56,6 @@ void es5506_voice_bank_0_w(int voice, int bank); void es5506_voice_bank_1_w(int voice, int bank); SND_GET_INFO( es5506 ); +#define SOUND_ES5506 SND_GET_INFO_NAME( es5506 ) #endif /* __ES5506_H__ */ diff --git a/src/emu/sound/es8712.h b/src/emu/sound/es8712.h index 76683c6e0a9..b61ae742074 100644 --- a/src/emu/sound/es8712.h +++ b/src/emu/sound/es8712.h @@ -20,5 +20,6 @@ WRITE16_HANDLER( es8712_data_1_msb_w ); WRITE16_HANDLER( es8712_data_2_msb_w ); SND_GET_INFO( es8712 ); +#define SOUND_ES8712 SND_GET_INFO_NAME( es8712 ) #endif /* __ES8712_H__ */ diff --git a/src/emu/sound/flt_rc.h b/src/emu/sound/flt_rc.h index 47313a66846..3bed9401430 100644 --- a/src/emu/sound/flt_rc.h +++ b/src/emu/sound/flt_rc.h @@ -59,5 +59,6 @@ extern const flt_rc_config flt_rc_ac_default; void filter_rc_set_RC(int num, int type, double R1, double R2, double R3, double C); SND_GET_INFO( filter_rc ); +#define SOUND_FILTER_RC SND_GET_INFO_NAME( filter_rc ) #endif /* __FLT_RC_H__ */ diff --git a/src/emu/sound/flt_vol.h b/src/emu/sound/flt_vol.h index ab3af68b28e..f1b2e8c1bb1 100644 --- a/src/emu/sound/flt_vol.h +++ b/src/emu/sound/flt_vol.h @@ -6,5 +6,6 @@ void flt_volume_set_volume(int num, float volume); SND_GET_INFO( filter_volume ); +#define SOUND_FILTER_VOLUME SND_GET_INFO_NAME( filter_volume ) #endif /* __FLT_VOL_H__ */ diff --git a/src/emu/sound/gaelco.h b/src/emu/sound/gaelco.h index 792032e92b0..76787b9d909 100644 --- a/src/emu/sound/gaelco.h +++ b/src/emu/sound/gaelco.h @@ -18,4 +18,7 @@ READ16_HANDLER( gaelcosnd_r ); SND_GET_INFO( gaelco_gae1 ); SND_GET_INFO( gaelco_cg1v ); +#define SOUND_GAELCO_GAE1 SND_GET_INFO_NAME( gaelco_gae1 ) +#define SOUND_GAELCO_CG1V SND_GET_INFO_NAME( gaelco_cg1v ) + #endif /* __GALELCO_H__ */ diff --git a/src/emu/sound/hc55516.c b/src/emu/sound/hc55516.c index 41d1d4abc1b..c687f56e598 100644 --- a/src/emu/sound/hc55516.c +++ b/src/emu/sound/hc55516.c @@ -339,7 +339,7 @@ SND_GET_INFO( hc55516 ) switch (state) { /* --- the following bits of info are returned as 64-bit signed integers --- */ - case SNDINFO_INT_ALIAS: info->i = SOUND_HC55516; break; + case SNDINFO_FCT_ALIAS: info->type = SOUND_HC55516; break; /* --- the following bits of info are returned as pointers to data or functions --- */ case SNDINFO_PTR_START: info->start = SND_START_NAME( hc55516 ); break; diff --git a/src/emu/sound/hc55516.h b/src/emu/sound/hc55516.h index bc315dcf403..634a8c36329 100644 --- a/src/emu/sound/hc55516.h +++ b/src/emu/sound/hc55516.h @@ -38,4 +38,8 @@ SND_GET_INFO( hc55516 ); SND_GET_INFO( mc3417 ); SND_GET_INFO( mc3418 ); +#define SOUND_HC55516 SND_GET_INFO_NAME( hc55516 ) +#define SOUND_MC3417 SND_GET_INFO_NAME( mc3417 ) +#define SOUND_MC3418 SND_GET_INFO_NAME( mc3418 ) + #endif /* __HC55516_H__ */ diff --git a/src/emu/sound/ics2115.h b/src/emu/sound/ics2115.h index 53562ae2e4a..544efc13b85 100644 --- a/src/emu/sound/ics2115.h +++ b/src/emu/sound/ics2115.h @@ -12,5 +12,6 @@ READ8_HANDLER( ics2115_r ); WRITE8_HANDLER( ics2115_w ); SND_GET_INFO( ics2115 ); +#define SOUND_ICS2115 SND_GET_INFO_NAME( ics2115 ) #endif /* __ICS2115_H__ */ diff --git a/src/emu/sound/iremga20.h b/src/emu/sound/iremga20.h index e80174f47c1..352864f4e7e 100644 --- a/src/emu/sound/iremga20.h +++ b/src/emu/sound/iremga20.h @@ -12,5 +12,6 @@ WRITE16_HANDLER( irem_ga20_w ); READ16_HANDLER( irem_ga20_r ); SND_GET_INFO( iremga20 ); +#define SOUND_IREMGA20 SND_GET_INFO_NAME( iremga20 ) #endif /* __IREMGA20_H__ */ diff --git a/src/emu/sound/k005289.h b/src/emu/sound/k005289.h index 4a07cb24d6f..44edd0efd2c 100644 --- a/src/emu/sound/k005289.h +++ b/src/emu/sound/k005289.h @@ -11,5 +11,6 @@ WRITE8_HANDLER( k005289_keylatch_A_w ); WRITE8_HANDLER( k005289_keylatch_B_w ); SND_GET_INFO( k005289 ); +#define SOUND_K005289 SND_GET_INFO_NAME( k005289 ) #endif /* __K005289_H__ */ diff --git a/src/emu/sound/k007232.h b/src/emu/sound/k007232.h index bd259f295f3..fbb2150ddcb 100644 --- a/src/emu/sound/k007232.h +++ b/src/emu/sound/k007232.h @@ -33,5 +33,6 @@ void k007232_set_bank( int chip, int chABank, int chBBank ); void k007232_set_volume(int chip,int channel,int volumeA,int volumeB); SND_GET_INFO( k007232 ); +#define SOUND_K007232 SND_GET_INFO_NAME( k007232 ) #endif /* __K007232_H__ */ diff --git a/src/emu/sound/k051649.h b/src/emu/sound/k051649.h index 30d48db5d84..b784f757e08 100644 --- a/src/emu/sound/k051649.h +++ b/src/emu/sound/k051649.h @@ -11,5 +11,6 @@ WRITE8_HANDLER( k051649_keyonoff_w ); WRITE8_HANDLER( k052539_waveform_w ); SND_GET_INFO( k051649 ); +#define SOUND_K051649 SND_GET_INFO_NAME( k051649 ) #endif /* __K051649_H__ */ diff --git a/src/emu/sound/k053260.h b/src/emu/sound/k053260.h index 2e6f3fc5d5a..03e65dbd9f0 100644 --- a/src/emu/sound/k053260.h +++ b/src/emu/sound/k053260.h @@ -26,5 +26,6 @@ WRITE16_HANDLER( k053260_1_lsb_w ); READ16_HANDLER( k053260_1_lsb_r ); SND_GET_INFO( k053260 ); +#define SOUND_K053260 SND_GET_INFO_NAME( k053260 ) #endif /* __K053260_H__ */ diff --git a/src/emu/sound/k054539.h b/src/emu/sound/k054539.h index e46fd962bd7..39db47db6f7 100644 --- a/src/emu/sound/k054539.h +++ b/src/emu/sound/k054539.h @@ -46,5 +46,6 @@ void k054539_init_flags(int chip, int flags); void k054539_set_gain(int chip, int channel, double gain); SND_GET_INFO( k054539 ); +#define SOUND_K054539 SND_GET_INFO_NAME( k054539 ) #endif /* __K054539_H__ */ diff --git a/src/emu/sound/msm5205.h b/src/emu/sound/msm5205.h index 53afcf99697..d5d97e97f6b 100644 --- a/src/emu/sound/msm5205.h +++ b/src/emu/sound/msm5205.h @@ -37,5 +37,6 @@ void msm5205_playmode_w(int num,int _select); void msm5205_set_volume(int num,int volume); SND_GET_INFO( msm5205 ); +#define SOUND_MSM5205 SND_GET_INFO_NAME( msm5205 ) #endif /* __MSM5205_H__ */ diff --git a/src/emu/sound/msm5232.h b/src/emu/sound/msm5232.h index c69c15eb505..474cbb1fae6 100644 --- a/src/emu/sound/msm5232.h +++ b/src/emu/sound/msm5232.h @@ -16,5 +16,6 @@ WRITE8_HANDLER( msm5232_1_w ); void msm5232_set_clock(void *chip, int clock); SND_GET_INFO( msm5232 ); +#define SOUND_MSM5232 SND_GET_INFO_NAME( msm5232 ) #endif /* __MSM5232_H__ */ diff --git a/src/emu/sound/multipcm.h b/src/emu/sound/multipcm.h index 14a209dad70..c1637f0b969 100644 --- a/src/emu/sound/multipcm.h +++ b/src/emu/sound/multipcm.h @@ -11,5 +11,6 @@ READ8_HANDLER( multi_pcm_reg_1_r); void multi_pcm_set_bank(int which, UINT32 leftoffs, UINT32 rightoffs); SND_GET_INFO( multipcm ); +#define SOUND_MULTIPCM SND_GET_INFO_NAME( multipcm ) #endif /* __MULTIPCM_H__ */ diff --git a/src/emu/sound/n63701x.h b/src/emu/sound/n63701x.h index d2f85da6627..d13884b2830 100644 --- a/src/emu/sound/n63701x.h +++ b/src/emu/sound/n63701x.h @@ -6,5 +6,6 @@ void namco_63701x_write(int offset,int data); SND_GET_INFO( namco_63701x ); +#define SOUND_NAMCO_63701X SND_GET_INFO_NAME( namco_63701x ) #endif /* __N63701X_H__ */ diff --git a/src/emu/sound/namco.h b/src/emu/sound/namco.h index 4797b4fdd28..b80250d5eb7 100644 --- a/src/emu/sound/namco.h +++ b/src/emu/sound/namco.h @@ -34,5 +34,10 @@ SND_GET_INFO( namco ); SND_GET_INFO( namco_15xx ); SND_GET_INFO( namco_cus30 ); +#define SOUND_NAMCO SND_GET_INFO_NAME( namco ) +#define SOUND_NAMCO_15XX SND_GET_INFO_NAME( namco_15xx ) +#define SOUND_NAMCO_CUS30 SND_GET_INFO_NAME( namco_cus30 ) + + #endif /* __NAMCO_H__ */ diff --git a/src/emu/sound/namco52.h b/src/emu/sound/namco52.h index 04d30b28732..b19720451e0 100644 --- a/src/emu/sound/namco52.h +++ b/src/emu/sound/namco52.h @@ -31,6 +31,7 @@ struct _namco_52xx_interface void namcoio_52xx_write(int data); SND_GET_INFO( namco_52xx ); +#define SOUND_NAMCO_52XX SND_GET_INFO_NAME( namco_52xx ) #endif /* __NAMCO52_H__ */ diff --git a/src/emu/sound/nes_apu.h b/src/emu/sound/nes_apu.h index c32b5b37db8..38447cf3b26 100644 --- a/src/emu/sound/nes_apu.h +++ b/src/emu/sound/nes_apu.h @@ -48,5 +48,6 @@ WRITE8_HANDLER( nes_psg_0_w ); WRITE8_HANDLER( nes_psg_1_w ); SND_GET_INFO( nesapu ); +#define SOUND_NES SND_GET_INFO_NAME( nesapu ) #endif /* __NES_APU_H__ */ diff --git a/src/emu/sound/nile.h b/src/emu/sound/nile.h index 6b8cf44538a..2f79eb0352e 100644 --- a/src/emu/sound/nile.h +++ b/src/emu/sound/nile.h @@ -11,5 +11,6 @@ WRITE16_HANDLER(nile_sndctrl_w); READ16_HANDLER(nile_sndctrl_r); SND_GET_INFO( nile ); +#define SOUND_NILE SND_GET_INFO_NAME( nile ) #endif /* __NILE_H__ */ diff --git a/src/emu/sound/okim6258.h b/src/emu/sound/okim6258.h index 0a1c352559a..786ac7cc452 100644 --- a/src/emu/sound/okim6258.h +++ b/src/emu/sound/okim6258.h @@ -46,5 +46,6 @@ WRITE16_HANDLER( okim6258_data_2_msb_w ); WRITE16_HANDLER( okim6258_ctrl_0_lsb_w ); SND_GET_INFO( okim6258 ); +#define SOUND_OKIM6258 SND_GET_INFO_NAME( okim6258 ) #endif /* __OKIM6258_H__ */ diff --git a/src/emu/sound/okim6295.h b/src/emu/sound/okim6295.h index 67282caebc6..b52e6aa0887 100644 --- a/src/emu/sound/okim6295.h +++ b/src/emu/sound/okim6295.h @@ -56,5 +56,6 @@ void reset_adpcm(struct adpcm_state *state); INT16 clock_adpcm(struct adpcm_state *state, UINT8 nibble); SND_GET_INFO( okim6295 ); +#define SOUND_OKIM6295 SND_GET_INFO_NAME( okim6295 ) #endif /* __OKIM6295_H__ */ diff --git a/src/emu/sound/okim6376.h b/src/emu/sound/okim6376.h index 6fe7221d831..2554ab0e37f 100644 --- a/src/emu/sound/okim6376.h +++ b/src/emu/sound/okim6376.h @@ -25,5 +25,6 @@ WRITE16_HANDLER( okim6376_data_1_msb_w ); WRITE16_HANDLER( okim6376_data_2_msb_w ); SND_GET_INFO( okim6376 ); +#define SOUND_OKIM6376 SND_GET_INFO_NAME( okim6376 ) #endif /* __OKIM6376_H__ */ diff --git a/src/emu/sound/pokey.h b/src/emu/sound/pokey.h index 19f50b26ac4..c8d4f3aab9f 100644 --- a/src/emu/sound/pokey.h +++ b/src/emu/sound/pokey.h @@ -107,5 +107,6 @@ void pokey3_kbcode_w (int kbcode, int make); void pokey4_kbcode_w (int kbcode, int make); SND_GET_INFO( pokey ); +#define SOUND_POKEY SND_GET_INFO_NAME( pokey ) #endif /* __POKEY_H__ */ diff --git a/src/emu/sound/psx.h b/src/emu/sound/psx.h index e358ef94fc8..081f808dfff 100644 --- a/src/emu/sound/psx.h +++ b/src/emu/sound/psx.h @@ -28,5 +28,6 @@ struct _psx_spu_interface }; SND_GET_INFO( psxspu ); +#define SOUND_PSXSPU SND_GET_INFO_NAME( psxspu ) #endif /* __SOUND_PSX_H__ */ diff --git a/src/emu/sound/qsound.h b/src/emu/sound/qsound.h index 9f432ca4367..a4ae2e615af 100644 --- a/src/emu/sound/qsound.h +++ b/src/emu/sound/qsound.h @@ -17,5 +17,6 @@ WRITE8_HANDLER( qsound_cmd_w ); READ8_HANDLER( qsound_status_r ); SND_GET_INFO( qsound ); +#define SOUND_QSOUND SND_GET_INFO_NAME( qsound ) #endif /* __QSOUND_H__ */ diff --git a/src/emu/sound/rf5c400.h b/src/emu/sound/rf5c400.h index f5a79887078..1a61725642e 100644 --- a/src/emu/sound/rf5c400.h +++ b/src/emu/sound/rf5c400.h @@ -9,5 +9,6 @@ READ16_HANDLER( rf5c400_0_r ); WRITE16_HANDLER( rf5c400_0_w ); SND_GET_INFO( rf5c400 ); +#define SOUND_RF5C400 SND_GET_INFO_NAME( rf5c400 ) #endif /* __RF5C400_H__ */ diff --git a/src/emu/sound/rf5c68.h b/src/emu/sound/rf5c68.h index 1d6741f97b7..3b38d4b41ee 100644 --- a/src/emu/sound/rf5c68.h +++ b/src/emu/sound/rf5c68.h @@ -14,5 +14,6 @@ READ8_HANDLER( rf5c68_r ); WRITE8_HANDLER( rf5c68_w ); SND_GET_INFO( rf5c68 ); +#define SOUND_RF5C68 SND_GET_INFO_NAME( rf5c68 ) #endif /* __RF5C68_H__ */ diff --git a/src/emu/sound/s14001a.h b/src/emu/sound/s14001a.h index 11bda5fd361..d05f776c1e7 100644 --- a/src/emu/sound/s14001a.h +++ b/src/emu/sound/s14001a.h @@ -10,6 +10,7 @@ void s14001a_set_clock(int clock); /* set VSU-1000 clock */ void s14001a_set_volume(int volume); /* set VSU-1000 volume control */ SND_GET_INFO( s14001a ); +#define SOUND_S14001A SND_GET_INFO_NAME( s14001a ) #endif /* __S14001A_H__ */ diff --git a/src/emu/sound/saa1099.h b/src/emu/sound/saa1099.h index 1c1a47fbd73..474ed4cf5e8 100644 --- a/src/emu/sound/saa1099.h +++ b/src/emu/sound/saa1099.h @@ -18,5 +18,6 @@ WRITE16_HANDLER( saa1099_control_port_1_lsb_w ); WRITE16_HANDLER( saa1099_write_port_1_lsb_w ); SND_GET_INFO( saa1099 ); +#define SOUND_SAA1099 SND_GET_INFO_NAME( saa1099 ) #endif /* __SAA1099_H__ */ diff --git a/src/emu/sound/samples.h b/src/emu/sound/samples.h index e1261d2ec06..73ce770ff70 100644 --- a/src/emu/sound/samples.h +++ b/src/emu/sound/samples.h @@ -53,5 +53,6 @@ int sample_loaded(int samplenum); struct loaded_samples *readsamples(const char *const *samplenames, const char *name); SND_GET_INFO( samples ); +#define SOUND_SAMPLES SND_GET_INFO_NAME( samples ) #endif /* __SAMPLES_H__ */ diff --git a/src/emu/sound/scsp.h b/src/emu/sound/scsp.h index 31d0456f203..889a8d0995b 100644 --- a/src/emu/sound/scsp.h +++ b/src/emu/sound/scsp.h @@ -29,5 +29,6 @@ READ16_HANDLER( scsp_midi_out_r ); extern UINT32* stv_scu; SND_GET_INFO( scsp ); +#define SOUND_SCSP SND_GET_INFO_NAME( scsp ) #endif /* __SCSP_H__ */ diff --git a/src/emu/sound/segapcm.h b/src/emu/sound/segapcm.h index 5a8e7eb53f7..bc4e7b3b16d 100644 --- a/src/emu/sound/segapcm.h +++ b/src/emu/sound/segapcm.h @@ -24,5 +24,6 @@ WRITE8_HANDLER( sega_pcm_w ); READ8_HANDLER( sega_pcm_r ); SND_GET_INFO( segapcm ); +#define SOUND_SEGAPCM SND_GET_INFO_NAME( segapcm ) #endif /* __SEGAPCM_H__ */ diff --git a/src/emu/sound/sid6581.h b/src/emu/sound/sid6581.h index 84986f4ca7b..17bfb4d7f51 100644 --- a/src/emu/sound/sid6581.h +++ b/src/emu/sound/sid6581.h @@ -34,5 +34,7 @@ WRITE8_HANDLER ( sid6581_1_port_w ); SND_GET_INFO( sid6581 ); SND_GET_INFO( sid8580 ); +#define SOUND_SID6581 SND_GET_INFO_NAME( sid6581 ) +#define SOUND_SID8580 SND_GET_INFO_NAME( sid8580 ) #endif /* __SID6581_H__ */ diff --git a/src/emu/sound/sn76477.h b/src/emu/sound/sn76477.h index bf1d7992903..63ef9f74433 100644 --- a/src/emu/sound/sn76477.h +++ b/src/emu/sound/sn76477.h @@ -125,5 +125,6 @@ void sn76477_vco_voltage_w(int chip, double data); void sn76477_pitch_voltage_w(int chip, double data); SND_GET_INFO( sn76477 ); +#define SOUND_SN76477 SND_GET_INFO_NAME( sn76477 ) #endif/* __SN76477_H__ */ diff --git a/src/emu/sound/sn76496.c b/src/emu/sound/sn76496.c index 7b8819269b4..3a1ed9077bf 100644 --- a/src/emu/sound/sn76496.c +++ b/src/emu/sound/sn76496.c @@ -392,7 +392,7 @@ SND_GET_INFO( sn76496 ) switch (state) { /* --- the following bits of info are returned as 64-bit signed integers --- */ - case SNDINFO_INT_ALIAS: info->i = SOUND_SN76496; break; + case SNDINFO_FCT_ALIAS: info->type = SOUND_SN76496; break; /* --- the following bits of info are returned as pointers to data or functions --- */ case SNDINFO_PTR_SET_INFO: info->set_info = SND_SET_INFO_NAME( sn76496 ); break; diff --git a/src/emu/sound/sn76496.h b/src/emu/sound/sn76496.h index 4a123d1e2ff..0b41fd307a5 100644 --- a/src/emu/sound/sn76496.h +++ b/src/emu/sound/sn76496.h @@ -16,4 +16,11 @@ SND_GET_INFO( sn76494 ); SND_GET_INFO( gamegear ); SND_GET_INFO( smsiii ); +#define SOUND_SN76496 SND_GET_INFO_NAME( sn76496 ) +#define SOUND_SN76489 SND_GET_INFO_NAME( sn76489 ) +#define SOUND_SN76489A SND_GET_INFO_NAME( sn76489a ) +#define SOUND_SN76494 SND_GET_INFO_NAME( sn76494 ) +#define SOUND_GAMEGEAR SND_GET_INFO_NAME( gamegear ) +#define SOUND_SMSIII SND_GET_INFO_NAME( smsiii ) + #endif /* __SN76496_H__ */ diff --git a/src/emu/sound/snkwave.h b/src/emu/sound/snkwave.h index 0813319c3a1..f3a1c9a7b0b 100644 --- a/src/emu/sound/snkwave.h +++ b/src/emu/sound/snkwave.h @@ -6,6 +6,6 @@ WRITE8_HANDLER( snkwave_w ); SND_GET_INFO( snkwave ); +#define SOUND_SNKWAVE SND_GET_INFO_NAME( snkwave ) #endif /* __SNKWAVE_H__ */ - diff --git a/src/emu/sound/sp0250.h b/src/emu/sound/sp0250.h index 1795eff655a..30074422e16 100644 --- a/src/emu/sound/sp0250.h +++ b/src/emu/sound/sp0250.h @@ -11,5 +11,6 @@ WRITE8_HANDLER( sp0250_w ); UINT8 sp0250_drq_r(void); SND_GET_INFO( sp0250 ); +#define SOUND_SP0250 SND_GET_INFO_NAME( sp0250 ) #endif /* __SP0250_H__ */ diff --git a/src/emu/sound/sp0256.h b/src/emu/sound/sp0256.h index 1a5abec7205..72eea5530f4 100644 --- a/src/emu/sound/sp0256.h +++ b/src/emu/sound/sp0256.h @@ -37,5 +37,6 @@ READ16_HANDLER( spb640_r ); WRITE16_HANDLER( spb640_w ); SND_GET_INFO( sp0256 ); +#define SOUND_SP0256 SND_GET_INFO_NAME( sp0256 ) #endif /* __SP0256_H__ */ diff --git a/src/emu/sound/speaker.h b/src/emu/sound/speaker.h index f963d61f175..66a2e659c80 100644 --- a/src/emu/sound/speaker.h +++ b/src/emu/sound/speaker.h @@ -26,6 +26,7 @@ struct _speaker_interface void speaker_level_w (int which, int new_level); SND_GET_INFO( speaker ); +#define SOUND_SPEAKER SND_GET_INFO_NAME( speaker ) #ifdef __cplusplus } diff --git a/src/emu/sound/st0016.h b/src/emu/sound/st0016.h index 7d65eb66427..8c1b01d3a5f 100644 --- a/src/emu/sound/st0016.h +++ b/src/emu/sound/st0016.h @@ -14,5 +14,6 @@ extern UINT8 *st0016_sound_regs; WRITE8_HANDLER(st0016_snd_w); SND_GET_INFO( st0016 ); +#define SOUND_ST0016 SND_GET_INFO_NAME( st0016 ) #endif /* __ST0016_H__ */ diff --git a/src/emu/sound/tiaintf.h b/src/emu/sound/tiaintf.h index 63dc980a144..118da9f7557 100644 --- a/src/emu/sound/tiaintf.h +++ b/src/emu/sound/tiaintf.h @@ -6,5 +6,6 @@ WRITE8_HANDLER( tia_sound_w ); SND_GET_INFO( tia ); +#define SOUND_TIA SND_GET_INFO_NAME( tia ) #endif /* __TIAINTF_H__ */ diff --git a/src/emu/sound/tms3615.h b/src/emu/sound/tms3615.h index 3223941cfcb..abc9c65728a 100644 --- a/src/emu/sound/tms3615.h +++ b/src/emu/sound/tms3615.h @@ -9,5 +9,6 @@ extern void tms3615_enable_w(int chip, int enable); #define TMS3615_FOOTAGE_16 1 SND_GET_INFO( tms3615 ); +#define SOUND_TMS3615 SND_GET_INFO_NAME( tms3615 ) #endif /* __TMS3615_H__ */ diff --git a/src/emu/sound/tms36xx.h b/src/emu/sound/tms36xx.h index 901eebd9351..17df0dcf72c 100644 --- a/src/emu/sound/tms36xx.h +++ b/src/emu/sound/tms36xx.h @@ -27,5 +27,6 @@ extern void tms36xx_note_w(int chip, int octave, int note); extern void tms3617_enable_w(int chip, int enable); SND_GET_INFO( tms36xx ); +#define SOUND_TMS36XX SND_GET_INFO_NAME( tms36xx ) #endif /* __TMS36XX_H__ */ diff --git a/src/emu/sound/upd7759.h b/src/emu/sound/upd7759.h index 79ea2e9abff..b0c7c969592 100644 --- a/src/emu/sound/upd7759.h +++ b/src/emu/sound/upd7759.h @@ -30,5 +30,6 @@ WRITE8_HANDLER( upd7759_0_start_w ); READ8_HANDLER( upd7759_0_busy_r ); SND_GET_INFO( upd7759 ); +#define SOUND_UPD7759 SND_GET_INFO_NAME( upd7759 ) #endif /* __UPD7759_H__ */ diff --git a/src/emu/sound/vlm5030.h b/src/emu/sound/vlm5030.h index 24f867b13ec..401ed9d6eeb 100644 --- a/src/emu/sound/vlm5030.h +++ b/src/emu/sound/vlm5030.h @@ -24,5 +24,6 @@ void vlm5030_vcu(int pin ); void vlm5030_st(int pin ); SND_GET_INFO( vlm5030 ); +#define SOUND_VLM5030 SND_GET_INFO_NAME( vlm5030 ) #endif /* __VLM5030_H__ */ diff --git a/src/emu/sound/votrax.h b/src/emu/sound/votrax.h index 6e59616e56e..4a8000f399c 100644 --- a/src/emu/sound/votrax.h +++ b/src/emu/sound/votrax.h @@ -7,5 +7,6 @@ void votrax_w(int data); int votrax_status_r(void); SND_GET_INFO( votrax ); +#define SOUND_VOTRAX SND_GET_INFO_NAME( votrax ) #endif /* __VOTRAX_H__ */ diff --git a/src/emu/sound/vrender0.h b/src/emu/sound/vrender0.h index 258475b5b1a..fcf69e0bcd9 100644 --- a/src/emu/sound/vrender0.h +++ b/src/emu/sound/vrender0.h @@ -16,5 +16,6 @@ READ32_HANDLER(vr0_snd_read); WRITE32_HANDLER(vr0_snd_write); SND_GET_INFO( vrender0 ); +#define SOUND_VRENDER0 SND_GET_INFO_NAME( vrender0 ) #endif /* __VRENDER0_H__ */ diff --git a/src/emu/sound/wave.h b/src/emu/sound/wave.h index c94acdc97c6..166c1c0d955 100644 --- a/src/emu/sound/wave.h +++ b/src/emu/sound/wave.h @@ -12,6 +12,6 @@ #endif SND_GET_INFO( wave ); - +#define SOUND_WAVE SND_GET_INFO_NAME( wave ) #endif /* __WAVE_H__ */ diff --git a/src/emu/sound/x1_010.h b/src/emu/sound/x1_010.h index ba14ea91fef..bef66892beb 100644 --- a/src/emu/sound/x1_010.h +++ b/src/emu/sound/x1_010.h @@ -20,5 +20,6 @@ WRITE16_HANDLER( seta_sound_word_w ); void seta_sound_enable_w(int); SND_GET_INFO( x1_010 ); +#define SOUND_X1_010 SND_GET_INFO_NAME( x1_010 ) #endif /* __X1_010_H__ */ diff --git a/src/emu/sound/ymf271.h b/src/emu/sound/ymf271.h index 259aa8d5e93..617320c1e1a 100644 --- a/src/emu/sound/ymf271.h +++ b/src/emu/sound/ymf271.h @@ -17,5 +17,6 @@ READ8_HANDLER( ymf271_1_r ); WRITE8_HANDLER( ymf271_1_w ); SND_GET_INFO( ymf271 ); +#define SOUND_YMF271 SND_GET_INFO_NAME( ymf271 ) #endif /* __YMF271_H__ */ diff --git a/src/emu/sound/ymf278b.h b/src/emu/sound/ymf278b.h index 2c7e1397965..b5f91ca26f6 100644 --- a/src/emu/sound/ymf278b.h +++ b/src/emu/sound/ymf278b.h @@ -31,5 +31,6 @@ WRITE8_HANDLER( ymf278b_control_port_1_c_w ); WRITE8_HANDLER( ymf278b_data_port_1_c_w ); SND_GET_INFO( ymf278b ); +#define SOUND_YMF278B SND_GET_INFO_NAME( ymf278b ) #endif /* __YMF278B_H__ */ diff --git a/src/emu/sound/ymz280b.h b/src/emu/sound/ymz280b.h index 4964ab38eeb..60f1a45e4dd 100644 --- a/src/emu/sound/ymz280b.h +++ b/src/emu/sound/ymz280b.h @@ -44,5 +44,6 @@ WRITE16_HANDLER( ymz280b_data_1_lsb_w ); WRITE16_HANDLER( ymz280b_data_1_msb_w ); SND_GET_INFO( ymz280b ); +#define SOUND_YMZ280B SND_GET_INFO_NAME( ymz280b ) #endif /* __YMZ280B_H__ */ diff --git a/src/mame/audio/atarijsa.c b/src/mame/audio/atarijsa.c index 50b2cba37e8..0de0f662560 100644 --- a/src/mame/audio/atarijsa.c +++ b/src/mame/audio/atarijsa.c @@ -124,23 +124,15 @@ void atarijsa_init(running_machine *machine, const char *testport, int testmask) has_tms5220 = has_oki6295 = has_pokey = has_ym2151 = 0; for (i = 0; i < MAX_SOUND; i++) { - switch (machine->config->sound[i].type) - { - case SOUND_TMS5220: - has_tms5220 = 1; - break; - case SOUND_OKIM6295: - has_oki6295 = 1; - break; - case SOUND_POKEY: - has_pokey = 1; - break; - case SOUND_YM2151: - has_ym2151 = 1; - break; - default: - break; - } + sound_type type = machine->config->sound[i].type; + if (type == SOUND_TMS5220) + has_tms5220 = 1; + if (type == SOUND_OKIM6295) + has_oki6295 = 1; + if (type == SOUND_POKEY) + has_pokey = 1; + if (type == SOUND_YM2151) + has_ym2151 = 1; } /* install POKEY memory handlers */ diff --git a/src/mame/audio/cyberbal.c b/src/mame/audio/cyberbal.c index 880eca45f16..f4c06f736e5 100644 --- a/src/mame/audio/cyberbal.c +++ b/src/mame/audio/cyberbal.c @@ -5,8 +5,9 @@ ****************************************************************************/ #include "driver.h" -#include "machine/atarigen.h" #include "sound/dac.h" +#include "sound/2151intf.h" +#include "machine/atarigen.h" #include "includes/cyberbal.h" diff --git a/src/mame/audio/tx1.c b/src/mame/audio/tx1.c index 8726160e845..ceec51bd03d 100644 --- a/src/mame/audio/tx1.c +++ b/src/mame/audio/tx1.c @@ -6,9 +6,10 @@ #include "driver.h" #include "streams.h" -#include "includes/tx1.h" -#include "video/resnet.h" +#include "sound/ay8910.h" #include "sound/custom.h" +#include "video/resnet.h" +#include "includes/tx1.h" /************************************* diff --git a/src/mame/drivers/8080bw.c b/src/mame/drivers/8080bw.c index 98ff878fce3..8420a726fc7 100644 --- a/src/mame/drivers/8080bw.c +++ b/src/mame/drivers/8080bw.c @@ -89,6 +89,7 @@ #include "driver.h" #include "cpu/m6800/m6800.h" #include "cpu/i8085/i8085.h" +#include "sound/speaker.h" #include "deprecat.h" #include "8080bw.h" #include "mw8080bw.h" diff --git a/src/mame/drivers/aleck64.c b/src/mame/drivers/aleck64.c index a59745919de..7ec3e6a5132 100644 --- a/src/mame/drivers/aleck64.c +++ b/src/mame/drivers/aleck64.c @@ -166,10 +166,11 @@ Notes: */ #include "driver.h" +#include "streams.h" #include "cpu/rsp/rsp.h" #include "cpu/mips/mips3.h" -#include "streams.h" #include "sound/custom.h" +#include "sound/dmadac.h" #include "includes/n64.h" static READ32_HANDLER( aleck_dips_r ) diff --git a/src/mame/drivers/cchasm.c b/src/mame/drivers/cchasm.c index 2718936c82b..de4886b5368 100644 --- a/src/mame/drivers/cchasm.c +++ b/src/mame/drivers/cchasm.c @@ -14,14 +14,15 @@ #include "driver.h" #include "cpu/z80/z80.h" +#include "cpu/z80/z80daisy.h" #include "cpu/m68000/m68000.h" +#include "sound/ay8910.h" +#include "sound/custom.h" +#include "sound/dac.h" #include "video/vector.h" #include "machine/6840ptm.h" #include "machine/z80ctc.h" #include "cchasm.h" -#include "sound/custom.h" -#include "sound/ay8910.h" -#include "cpu/z80/z80daisy.h" #define CCHASM_68K_CLOCK (XTAL_8MHz) diff --git a/src/mame/drivers/cham24.c b/src/mame/drivers/cham24.c index 716e86f89a4..2b3872170c0 100644 --- a/src/mame/drivers/cham24.c +++ b/src/mame/drivers/cham24.c @@ -55,9 +55,10 @@ Notes: */ #include "driver.h" -#include "video/ppu2c0x.h" -#include "sound/nes_apu.h" #include "cpu/m6502/m6502.h" +#include "sound/dac.h" +#include "sound/nes_apu.h" +#include "video/ppu2c0x.h" static WRITE8_HANDLER( sprite_dma_w ) { diff --git a/src/mame/drivers/cubocd32.c b/src/mame/drivers/cubocd32.c index 10ee30cb2d6..9395db605ad 100644 --- a/src/mame/drivers/cubocd32.c +++ b/src/mame/drivers/cubocd32.c @@ -47,6 +47,7 @@ #include "driver.h" #include "cpu/m68000/m68000.h" #include "sound/custom.h" +#include "sound/cdda.h" #include "includes/amiga.h" #include "includes/cubocd32.h" #include "machine/6526cia.h" diff --git a/src/mame/drivers/cyberbal.c b/src/mame/drivers/cyberbal.c index aef39444c3f..39f9d6dda45 100644 --- a/src/mame/drivers/cyberbal.c +++ b/src/mame/drivers/cyberbal.c @@ -22,12 +22,12 @@ #include "driver.h" #include "cpu/m68000/m68000.h" #include "cpu/m6502/m6502.h" +#include "sound/2151intf.h" +#include "sound/dac.h" #include "rendlay.h" #include "machine/atarigen.h" #include "audio/atarijsa.h" #include "cyberbal.h" -#include "sound/2151intf.h" - /************************************* diff --git a/src/mame/drivers/hyperspt.c b/src/mame/drivers/hyperspt.c index 9f122989eb7..c3dce62779a 100644 --- a/src/mame/drivers/hyperspt.c +++ b/src/mame/drivers/hyperspt.c @@ -6,10 +6,11 @@ Based on drivers from Juno First emulator by Chris Hardy (chrish@kcbbs.gen.nz) #include "driver.h" #include "cpu/z80/z80.h" -#include "machine/konami1.h" #include "cpu/m6809/m6809.h" -#include "sound/vlm5030.h" #include "sound/dac.h" +#include "sound/sn76496.h" +#include "sound/vlm5030.h" +#include "machine/konami1.h" extern UINT8 *hyperspt_scroll; diff --git a/src/mame/drivers/multigam.c b/src/mame/drivers/multigam.c index 0197afc0d00..ad7e0b0a531 100644 --- a/src/mame/drivers/multigam.c +++ b/src/mame/drivers/multigam.c @@ -40,9 +40,10 @@ */ #include "driver.h" -#include "video/ppu2c0x.h" -#include "sound/nes_apu.h" #include "cpu/m6502/m6502.h" +#include "sound/dac.h" +#include "sound/nes_apu.h" +#include "video/ppu2c0x.h" /****************************************************** diff --git a/src/mame/drivers/sbasketb.c b/src/mame/drivers/sbasketb.c index b8b53990551..3fc13cc7629 100644 --- a/src/mame/drivers/sbasketb.c +++ b/src/mame/drivers/sbasketb.c @@ -40,10 +40,11 @@ CPU/Video Board Parts: #include "driver.h" #include "cpu/z80/z80.h" -#include "machine/konami1.h" #include "cpu/m6809/m6809.h" -#include "sound/vlm5030.h" #include "sound/dac.h" +#include "sound/sn76496.h" +#include "sound/vlm5030.h" +#include "machine/konami1.h" extern UINT8 *sbasketb_scroll; diff --git a/src/mame/drivers/scramble.c b/src/mame/drivers/scramble.c index 8a1413d875f..49731a4c143 100644 --- a/src/mame/drivers/scramble.c +++ b/src/mame/drivers/scramble.c @@ -28,9 +28,10 @@ Notes: #include "driver.h" #include "cpu/z80/z80.h" #include "cpu/s2650/s2650.h" -#include "machine/8255ppi.h" #include "sound/ay8910.h" #include "sound/dac.h" +#include "sound/flt_rc.h" +#include "machine/8255ppi.h" #include "galaxold.h" diff --git a/src/mame/drivers/williams.c b/src/mame/drivers/williams.c index 829758e20bc..2cb350c674b 100644 --- a/src/mame/drivers/williams.c +++ b/src/mame/drivers/williams.c @@ -494,10 +494,11 @@ #include "driver.h" #include "cpu/m6809/m6809.h" #include "cpu/m6800/m6800.h" +#include "sound/dac.h" +#include "sound/hc55516.h" #include "machine/6821new.h" #include "audio/williams.h" #include "williams.h" -#include "sound/dac.h" #define MASTER_CLOCK (12000000) diff --git a/src/mame/machine/atarigen.c b/src/mame/machine/atarigen.c index d43501ab52b..043d4d76293 100644 --- a/src/mame/machine/atarigen.c +++ b/src/mame/machine/atarigen.c @@ -8,9 +8,14 @@ #include "driver.h" -#include "atarigen.h" -#include "slapstic.h" #include "cpu/m6502/m6502.h" +#include "sound/2151intf.h" +#include "sound/2413intf.h" +#include "sound/5220intf.h" +#include "sound/okim6295.h" +#include "sound/pokey.h" +#include "slapstic.h" +#include "atarigen.h" diff --git a/src/mame/machine/toaplan1.c b/src/mame/machine/toaplan1.c index d702ed5a617..6b3698ce985 100644 --- a/src/mame/machine/toaplan1.c +++ b/src/mame/machine/toaplan1.c @@ -7,6 +7,7 @@ #include "cpu/z80/z80.h" #include "cpu/m68000/m68000.h" #include "cpu/tms32010/tms32010.h" +#include "sound/3812intf.h" #include "includes/toaplan1.h" #define CLEAR 0 diff --git a/src/mame/video/dday.c b/src/mame/video/dday.c index 13f98fb6a61..4c9ed45b683 100644 --- a/src/mame/video/dday.c +++ b/src/mame/video/dday.c @@ -9,6 +9,7 @@ ***************************************************************************/ #include "driver.h" +#include "sound/ay8910.h" UINT8 *dday_bgvideoram; diff --git a/src/mame/video/toaplan2.c b/src/mame/video/toaplan2.c index a4ece96fd6c..de15e0fec7b 100644 --- a/src/mame/video/toaplan2.c +++ b/src/mame/video/toaplan2.c @@ -146,6 +146,7 @@ Pipi & Bibis | Fix Eight | V-Five | Snow Bros. 2 | #include "driver.h" #include "cpu/m68000/m68000.h" +#include "sound/3812intf.h" #include "includes/toaplan2.h" |