Fix a few regressions due to the audio devic-ification.

This commit is contained in:
Aaron Giles 2009-02-17 06:08:25 +00:00
parent 500f6def5a
commit 0ca5402b1e
7 changed files with 15 additions and 12 deletions

View File

@ -177,7 +177,7 @@ void cage_init(running_machine *machine, offs_t speedup)
for (chan = 0; chan < DAC_BUFFER_CHANNELS; chan++)
{
char buffer[10];
sprintf(buffer, "dac%d", chan);
sprintf(buffer, "dac%d", chan + 1);
dmadac[chan] = devtag_get_device(machine, SOUND, buffer);
}

View File

@ -1397,7 +1397,7 @@ static WRITE16_HANDLER( denver_w )
for (chan = 0; chan < dcs.channels; chan++)
{
char buffer[10];
sprintf(buffer, "dac%d", chan);
sprintf(buffer, "dac%d", chan + 1);
dcs.dmadac[chan] = devtag_get_device(space->machine, SOUND, buffer);
}
dmadac_enable(&dcs.dmadac[0], dcs.channels, enable);

View File

@ -107,21 +107,21 @@ static READ8_HANDLER( cheat2_r )
return res;
}
static char speech_chip[8];
static UINT8 speech_chip[8];
static WRITE8_HANDLER( speech_control_w )
{
const device_config *upd;
strcpy(speech_chip, ( data & 4 ) ? "upd2" : "upd1");
strcpy((char *)speech_chip, ( data & 4 ) ? "upd2" : "upd1");
upd = devtag_get_device(space->machine, SOUND, speech_chip);
upd = devtag_get_device(space->machine, SOUND, (char *)speech_chip);
upd7759_reset_w( upd, data & 2 );
upd7759_start_w( upd, data & 1 );
}
static WRITE8_HANDLER( speech_msg_w )
{
upd7759_port_w( devtag_get_device(space->machine, SOUND, speech_chip), 0, data );
upd7759_port_w( devtag_get_device(space->machine, SOUND, (char *)speech_chip), 0, data );
}
static ADDRESS_MAP_START( main_map, ADDRESS_SPACE_PROGRAM, 8 )

View File

@ -720,6 +720,9 @@ static INPUT_PORTS_START( tetrsark )
// PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_COIN2 ) // WTF? it does't work
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(1)
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2)
PORT_START("UNUSED") /* This is read by input_port_4_r in ay8910_interface */
PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED )
INPUT_PORTS_END

View File

@ -138,13 +138,13 @@ static WRITE8_HANDLER(circusc_sound_w)
/* CS5 */
case 3:
device = devtag_get_device(space->machine, SOUND, "discrete");
device = devtag_get_device(space->machine, SOUND, "fltdisc");
discrete_sound_w(device, NODE_03, data);
break;
/* CS6 */
case 4:
device = devtag_get_device(space->machine, SOUND, "discrete");
device = devtag_get_device(space->machine, SOUND, "fltdisc");
discrete_sound_w(device, NODE_05, (offset & 0x20) >> 5);
discrete_sound_w(device, NODE_06, (offset & 0x18) >> 3);
discrete_sound_w(device, NODE_07, (offset & 0x40) >> 6);

View File

@ -333,7 +333,7 @@ static INPUT_PORTS_START( quizmstr )
PORT_DIPSETTING( 0x80, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_START("IN4")
PORT_START("DSW1")
PORT_DIPNAME( 0x01, 0x01, DEF_STR( Coin_A ) )
PORT_DIPSETTING( 0x00, DEF_STR( 2C_1C ) )
PORT_DIPSETTING( 0x01, DEF_STR( 1C_1C ) )
@ -445,7 +445,7 @@ static INPUT_PORTS_START( trailblz )
PORT_DIPSETTING( 0x80, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_START("IN4")
PORT_START("DSW1")
PORT_DIPNAME( 0x01, 0x01, "4" )
PORT_DIPSETTING( 0x01, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
@ -557,7 +557,7 @@ static INPUT_PORTS_START( supnudg2 )
PORT_DIPSETTING( 0x80, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_START("IN4")
PORT_START("DSW1")
PORT_DIPNAME( 0x01, 0x01, "4" )
PORT_DIPSETTING( 0x01, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )

View File

@ -182,7 +182,7 @@ static WRITE8_HANDLER( sound_control_w )
/* bit 0x20 = LED */
/* bit 0x40 = BSMT2000 reset */
if ((diff & 0x40) && (data & 0x40))
devtag_reset(space->machine, SOUND, "bmst");
devtag_reset(space->machine, SOUND, "bsmt");
if (data != 0x40 && data != 0x60)
logerror("%04X:sound_control_w = %02X\n", cpu_get_pc(space->cpu), data);
}