diff options
Diffstat (limited to 'src/mame/drivers/thief.c')
-rw-r--r-- | src/mame/drivers/thief.c | 46 |
1 files changed, 23 insertions, 23 deletions
diff --git a/src/mame/drivers/thief.c b/src/mame/drivers/thief.c index 0afeb4404cc..bd8b841f8fe 100644 --- a/src/mame/drivers/thief.c +++ b/src/mame/drivers/thief.c @@ -76,35 +76,35 @@ enum kTalkTrack, kCrashTrack }; -static void tape_set_audio( int track, int bOn ) +static void tape_set_audio( const device_config *samples, int track, int bOn ) { - sample_set_volume( track, bOn ? 1.0 : 0.0 ); + sample_set_volume(samples, track, bOn ? 1.0 : 0.0 ); } -static void tape_set_motor( int bOn ) +static void tape_set_motor( const device_config *samples, int bOn ) { if( bOn ) { /* If talk track is not playing, start it. */ - if (! sample_playing( kTalkTrack )) - sample_start( 0, kTalkTrack, 1 ); + if (! sample_playing(samples, kTalkTrack )) + sample_start( samples, 0, kTalkTrack, 1 ); /* Resume playback of talk track. */ - sample_set_pause( kTalkTrack, 0); + sample_set_pause( samples, kTalkTrack, 0); /* If crash track is not playing, start it. */ - if (! sample_playing( kCrashTrack )) - sample_start( 1, kCrashTrack, 1 ); + if (! sample_playing(samples, kCrashTrack )) + sample_start( samples, 1, kCrashTrack, 1 ); /* Resume playback of crash track. */ - sample_set_pause( kCrashTrack, 0); + sample_set_pause( samples, kCrashTrack, 0); } else { /* Pause both the talk and crash tracks. */ - sample_set_pause( kTalkTrack, 1 ); - sample_set_pause( kCrashTrack, 1 ); + sample_set_pause( samples, kTalkTrack, 1 ); + sample_set_pause( samples, kCrashTrack, 1 ); } } @@ -115,7 +115,7 @@ static WRITE8_HANDLER( thief_input_select_w ) thief_input_select = data; } -static WRITE8_HANDLER( tape_control_w ) +static WRITE8_DEVICE_HANDLER( tape_control_w ) { switch( data ) { @@ -129,27 +129,27 @@ static WRITE8_HANDLER( tape_control_w ) break; case 0x08: /* talk track on */ - tape_set_audio( kTalkTrack, 1 ); + tape_set_audio( device, kTalkTrack, 1 ); break; case 0x09: /* talk track off */ - tape_set_audio( kTalkTrack, 0 ); + tape_set_audio( device, kTalkTrack, 0 ); break; case 0x0a: /* motor on */ - tape_set_motor( 1 ); + tape_set_motor( device, 1 ); break; case 0x0b: /* motor off */ - tape_set_motor( 0 ); + tape_set_motor( device, 0 ); break; case 0x0c: /* crash track on */ - tape_set_audio( kCrashTrack, 1 ); + tape_set_audio( device, kCrashTrack, 1 ); break; case 0x0d: /* crash track off */ - tape_set_audio( kCrashTrack, 0 ); + tape_set_audio( device, kCrashTrack, 0 ); break; } } @@ -192,11 +192,11 @@ static ADDRESS_MAP_START( io_map, ADDRESS_SPACE_IO, 8 ) AM_RANGE(0x10, 0x10) AM_WRITE(thief_video_control_w) AM_RANGE(0x30, 0x30) AM_WRITE(thief_input_select_w) /* 8255 */ AM_RANGE(0x31, 0x31) AM_READ(thief_io_r) /* 8255 */ - AM_RANGE(0x33, 0x33) AM_WRITE(tape_control_w) - AM_RANGE(0x40, 0x40) AM_WRITE(ay8910_control_port_0_w) - AM_RANGE(0x41, 0x41) AM_READWRITE(ay8910_read_port_0_r, ay8910_write_port_0_w) - AM_RANGE(0x42, 0x42) AM_WRITE(ay8910_control_port_1_w) - AM_RANGE(0x43, 0x43) AM_READWRITE(ay8910_read_port_1_r, ay8910_write_port_1_w) + AM_RANGE(0x33, 0x33) AM_DEVWRITE(SOUND, "samples", tape_control_w) + AM_RANGE(0x40, 0x41) AM_DEVWRITE(SOUND, "ay1", ay8910_address_data_w) + AM_RANGE(0x41, 0x41) AM_DEVREAD(SOUND, "ay1", ay8910_r) + AM_RANGE(0x42, 0x43) AM_DEVWRITE(SOUND, "ay2", ay8910_address_data_w) + AM_RANGE(0x43, 0x43) AM_DEVREAD(SOUND, "ay2", ay8910_r) AM_RANGE(0x50, 0x50) AM_WRITE(thief_color_plane_w) AM_RANGE(0x60, 0x6f) AM_WRITE(thief_vtcsel_w) AM_RANGE(0x70, 0x7f) AM_WRITE(thief_color_map_w) |