diff options
Diffstat (limited to 'src/mame/drivers/mystwarr.c')
-rw-r--r-- | src/mame/drivers/mystwarr.c | 40 |
1 files changed, 24 insertions, 16 deletions
diff --git a/src/mame/drivers/mystwarr.c b/src/mame/drivers/mystwarr.c index 90b7a5060dd..5ea01e40759 100644 --- a/src/mame/drivers/mystwarr.c +++ b/src/mame/drivers/mystwarr.c @@ -793,9 +793,9 @@ static ADDRESS_MAP_START( sound_readmem, ADDRESS_SPACE_PROGRAM, 8 ) AM_RANGE(0x0000, 0x7fff) AM_READ(SMH_ROM) AM_RANGE(0x8000, 0xbfff) AM_READ(SMH_BANK2) AM_RANGE(0xc000, 0xdfff) AM_READ(SMH_RAM) - AM_RANGE(0xe000, 0xe22f) AM_READ(k054539_0_r) + AM_RANGE(0xe000, 0xe22f) AM_DEVREAD(SOUND, "konami1", k054539_r) AM_RANGE(0xe230, 0xe3ff) AM_READ(SMH_RAM) - AM_RANGE(0xe400, 0xe62f) AM_READ(k054539_1_r) + AM_RANGE(0xe400, 0xe62f) AM_DEVREAD(SOUND, "konami2", k054539_r) AM_RANGE(0xe630, 0xe7ff) AM_READ(SMH_RAM) AM_RANGE(0xf002, 0xf002) AM_READ(soundlatch_r) AM_RANGE(0xf003, 0xf003) AM_READ(soundlatch2_r) @@ -804,9 +804,9 @@ ADDRESS_MAP_END static ADDRESS_MAP_START( sound_writemem, ADDRESS_SPACE_PROGRAM, 8 ) AM_RANGE(0x0000, 0xbfff) AM_WRITE(SMH_NOP) AM_RANGE(0xc000, 0xdfff) AM_WRITE(SMH_RAM) - AM_RANGE(0xe000, 0xe22f) AM_WRITE(k054539_0_w) + AM_RANGE(0xe000, 0xe22f) AM_DEVWRITE(SOUND, "konami1", k054539_w) AM_RANGE(0xe230, 0xe3ff) AM_WRITE(SMH_RAM) - AM_RANGE(0xe400, 0xe62f) AM_WRITE(k054539_1_w) + AM_RANGE(0xe400, 0xe62f) AM_DEVWRITE(SOUND, "konami2", k054539_w) AM_RANGE(0xe630, 0xe7ff) AM_WRITE(SMH_RAM) AM_RANGE(0xf000, 0xf000) AM_WRITE(soundlatch3_w) AM_RANGE(0xf800, 0xf800) AM_WRITE(sound_bankswitch_w) @@ -870,65 +870,73 @@ static MACHINE_START( mystwarr ) static MACHINE_RESET(mystwarr) { + const device_config *k054539_1 = devtag_get_device(machine, SOUND, "konami1"); + const device_config *k054539_2 = devtag_get_device(machine, SOUND, "konami2"); int i; // soften chorus(chip 0 channel 0-3), boost voice(chip 0 channel 4-7) for (i=0; i<=3; i++) { - k054539_set_gain(0, i, 0.8); - k054539_set_gain(0, i+4, 2.0); + k054539_set_gain(k054539_1, i, 0.8); + k054539_set_gain(k054539_1, i+4, 2.0); } // soften percussions(chip 1 channel 0-7) - for (i=0; i<=7; i++) k054539_set_gain(1, i, 0.5); + for (i=0; i<=7; i++) k054539_set_gain(k054539_2, i, 0.5); } static MACHINE_RESET(dadandrn) { + const device_config *k054539_1 = devtag_get_device(machine, SOUND, "konami1"); int i; // boost voice(chip 0 channel 4-7) - for (i=4; i<=7; i++) k054539_set_gain(0, i, 2.0); + for (i=4; i<=7; i++) k054539_set_gain(k054539_1, i, 2.0); } static MACHINE_RESET(viostorm) { + const device_config *k054539_1 = devtag_get_device(machine, SOUND, "konami1"); int i; // boost voice(chip 0 channel 4-7) - for (i=4; i<=7; i++) k054539_set_gain(0, i, 2.0); + for (i=4; i<=7; i++) k054539_set_gain(k054539_1, i, 2.0); } static MACHINE_RESET(metamrph) { + const device_config *k054539_1 = devtag_get_device(machine, SOUND, "konami1"); + const device_config *k054539_2 = devtag_get_device(machine, SOUND, "konami2"); int i; // boost voice(chip 0 channel 4-7) and soften other channels for (i=0; i<=3; i++) { - k054539_set_gain(0, i, 0.8); - k054539_set_gain(0, i+4, 1.8); - k054539_set_gain(1, i, 0.8); - k054539_set_gain(1, i+4, 0.8); + k054539_set_gain(k054539_1, i, 0.8); + k054539_set_gain(k054539_1, i+4, 1.8); + k054539_set_gain(k054539_2, i, 0.8); + k054539_set_gain(k054539_2, i+4, 0.8); } } static MACHINE_RESET(martchmp) { + const device_config *k054539_1 = devtag_get_device(machine, SOUND, "konami1"); int i; - k054539_init_flags(0, K054539_REVERSE_STEREO); + k054539_init_flags(k054539_1, K054539_REVERSE_STEREO); // boost voice(chip 0 channel 4-7) - for (i=4; i<=7; i++) k054539_set_gain(0, i, 1.4); + for (i=4; i<=7; i++) k054539_set_gain(k054539_1, i, 1.4); } static MACHINE_RESET(gaiapols) { + const device_config *k054539_1 = devtag_get_device(machine, SOUND, "konami1"); int i; // boost voice(chip 0 channel 5-7) - for (i=5; i<=7; i++) k054539_set_gain(0, i, 2.0); + for (i=5; i<=7; i++) k054539_set_gain(k054539_1, i, 2.0); } static MACHINE_DRIVER_START( mystwarr ) |