diff options
Diffstat (limited to 'src/mame/drivers/warriorb.c')
-rw-r--r-- | src/mame/drivers/warriorb.c | 33 |
1 files changed, 18 insertions, 15 deletions
diff --git a/src/mame/drivers/warriorb.c b/src/mame/drivers/warriorb.c index 532462cd129..d8bad641edf 100644 --- a/src/mame/drivers/warriorb.c +++ b/src/mame/drivers/warriorb.c @@ -198,12 +198,14 @@ static int ninjaw_pandata[4]; /**** sound pan control ****/ static WRITE8_HANDLER( warriorb_pancontrol ) { + static const char *fltname[] = { "2610.1.l", "2610.1.r", "2610.2.l", "2610.2.r" }; + offset = offset&3; ninjaw_pandata[offset] = (data<<1) + data; /* original volume*3 */ // popmessage(" pan %02x %02x %02x %02x", ninjaw_pandata[0], ninjaw_pandata[1], ninjaw_pandata[2], ninjaw_pandata[3] ); - flt_volume_set_volume(offset, ninjaw_pandata[offset] / 100.0); + flt_volume_set_volume(devtag_get_device(space->machine, SOUND, fltname[offset & 3]), ninjaw_pandata[offset] / 100.0); } @@ -249,10 +251,7 @@ static ADDRESS_MAP_START( z80_sound_map, ADDRESS_SPACE_PROGRAM, 8 ) AM_RANGE(0x0000, 0x3fff) AM_ROM AM_RANGE(0x4000, 0x7fff) AM_READWRITE(SMH_BANK10, SMH_ROM) AM_RANGE(0xc000, 0xdfff) AM_RAM - AM_RANGE(0xe000, 0xe000) AM_READWRITE(ym2610_status_port_0_a_r, ym2610_control_port_0_a_w) - AM_RANGE(0xe001, 0xe001) AM_READWRITE(ym2610_read_port_0_r, ym2610_data_port_0_a_w) - AM_RANGE(0xe002, 0xe002) AM_READWRITE(ym2610_status_port_0_b_r, ym2610_control_port_0_b_w) - AM_RANGE(0xe003, 0xe003) AM_WRITE(ym2610_data_port_0_b_w) + AM_RANGE(0xe000, 0xe003) AM_DEVREADWRITE(SOUND, "ym", ym2610_r, ym2610_w) AM_RANGE(0xe200, 0xe200) AM_READWRITE(SMH_NOP, taitosound_slave_port_w) AM_RANGE(0xe201, 0xe201) AM_READWRITE(taitosound_slave_comm_r, taitosound_slave_comm_w) AM_RANGE(0xe400, 0xe403) AM_WRITE(warriorb_pancontrol) /* pan */ @@ -401,9 +400,9 @@ GFXDECODE_END **************************************************************/ /* handler called by the YM2610 emulator when the internal timers cause an IRQ */ -static void irqhandler(running_machine *machine, int irq) +static void irqhandler(const device_config *device, int irq) { - cpu_set_input_line(machine->cpu[1],0,irq ? ASSERT_LINE : CLEAR_LINE); + cpu_set_input_line(device->machine->cpu[1],0,irq ? ASSERT_LINE : CLEAR_LINE); } static const ym2610_interface ym2610_config = @@ -417,23 +416,27 @@ static const ym2610_interface ym2610_config = **************************************************************/ #if 0 -static int subwoofer_sh_start(const sound_config *msound) +static DEVICE_START( subwoofer ) { /* Adjust the lowpass filter of the first three YM2610 channels */ mixer_set_lowpass_frequency(0,20); mixer_set_lowpass_frequency(1,20); mixer_set_lowpass_frequency(2,20); - - return 0; } -static const custom_sound_interface subwoofer_interface = +static DEVICE_GET_INFO( subwoofer ) { - subwoofer_sh_start, - 0, /* none */ - 0 /* none */ -}; + switch (state) + { + /* --- the following bits of info are returned as pointers to data or functions --- */ + case DEVINFO_FCT_START: info->start = DEVICE_START_NAME(subwoofer); break; + + /* --- the following bits of info are returned as NULL-terminated strings --- */ + case DEVINFO_STR_NAME: strcpy(info->s, "Subwoofer"); break; + case DEVINFO_STR_SOURCE_FILE: strcpy(info->s, __FILE__); break; + } +} #endif |