diff options
Diffstat (limited to 'src/mame/drivers/wolfpack.c')
-rw-r--r-- | src/mame/drivers/wolfpack.c | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/src/mame/drivers/wolfpack.c b/src/mame/drivers/wolfpack.c index 83d1c512f16..f4c318653f5 100644 --- a/src/mame/drivers/wolfpack.c +++ b/src/mame/drivers/wolfpack.c @@ -61,6 +61,7 @@ static CUSTOM_INPUT( wolfpack_dial_r ) static READ8_HANDLER( wolfpack_misc_r ) { + const device_config *device = devtag_get_device(space->machine, SOUND, "speech"); UINT8 val = 0; /* BIT0 => SPEECH BUSY */ @@ -72,7 +73,7 @@ static READ8_HANDLER( wolfpack_misc_r ) /* BIT6 => UNUSED */ /* BIT7 => VBLANK */ - if (!s14001a_bsy_0_r()) + if (!s14001a_bsy_r(device)) val |= 0x01; if (!wolfpack_collision) @@ -96,17 +97,17 @@ static WRITE8_HANDLER( wolfpack_lamp_flash_w ) {} static WRITE8_HANDLER( wolfpack_warning_light_w ) {} static WRITE8_HANDLER( wolfpack_audamp_w ) {} -static WRITE8_HANDLER( wolfpack_word_w ) +static WRITE8_DEVICE_HANDLER( wolfpack_word_w ) { /* latch word from bus into temp register, and place on s14001a input bus */ /* there is no real need for a temp register at all, since the bus 'register' acts as one */ - s14001a_reg_0_w(data & 0x1f); /* SA0 (IN5) is pulled low according to the schematic, so its 0x1f and not 0x3f as one would expect */ + s14001a_reg_w(device, data & 0x1f); /* SA0 (IN5) is pulled low according to the schematic, so its 0x1f and not 0x3f as one would expect */ } -static WRITE8_HANDLER( wolfpack_start_speech_w ) +static WRITE8_DEVICE_HANDLER( wolfpack_start_speech_w ) { - s14001a_set_volume(15); /* hack, should be executed just once during game init, or defaulted to this in the s14001a core */ - s14001a_rst_0_w(data&1); + s14001a_set_volume(device, 15); /* hack, should be executed just once during game init, or defaulted to this in the s14001a core */ + s14001a_rst_w(device, data&1); } @@ -137,7 +138,7 @@ static ADDRESS_MAP_START( main_map, ADDRESS_SPACE_PROGRAM, 8 ) AM_RANGE(0x2001, 0x2001) AM_WRITE(wolfpack_sonar_ping_w) AM_RANGE(0x2002, 0x2002) AM_WRITE(wolfpack_sirlat_w) AM_RANGE(0x2003, 0x2003) AM_WRITE(wolfpack_pt_sound_w) - AM_RANGE(0x2004, 0x2004) AM_WRITE(wolfpack_start_speech_w) + AM_RANGE(0x2004, 0x2004) AM_DEVWRITE(SOUND, "speech", wolfpack_start_speech_w) AM_RANGE(0x2005, 0x2005) AM_WRITE(wolfpack_launch_torpedo_w) AM_RANGE(0x2006, 0x2006) AM_WRITE(wolfpack_low_explo_w) AM_RANGE(0x2007, 0x2007) AM_WRITE(wolfpack_screw_cont_w) @@ -152,7 +153,7 @@ static ADDRESS_MAP_START( main_map, ADDRESS_SPACE_PROGRAM, 8 ) AM_RANGE(0x3000, 0x3000) AM_WRITE(wolfpack_audamp_w) AM_RANGE(0x3001, 0x3001) AM_WRITE(wolfpack_pt_horz_w) AM_RANGE(0x3003, 0x3003) AM_WRITE(wolfpack_pt_pic_w) - AM_RANGE(0x3004, 0x3004) AM_WRITE(wolfpack_word_w) + AM_RANGE(0x3004, 0x3004) AM_DEVWRITE(SOUND, "speech", wolfpack_word_w) AM_RANGE(0x3007, 0x3007) AM_WRITE(wolfpack_coldetres_w) AM_RANGE(0x4000, 0x4000) AM_WRITE(wolfpack_ship_h_w) AM_RANGE(0x4001, 0x4001) AM_WRITE(wolfpack_torpedo_pic_w) |