More warning fixes for mame/audio

This commit is contained in:
Couriersud 2008-11-15 01:58:22 +00:00
parent cdd245a3a6
commit 20ffe03685
11 changed files with 39 additions and 37 deletions

View File

@ -890,10 +890,11 @@ MACHINE_START( schaser )
MACHINE_RESET( schaser )
{
const address_space *space = cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM);
schaser_effect_555_is_low = 0;
timer_adjust_oneshot(schaser_effect_555_timer, attotime_never, 0);
schaser_sh_port_1_w(machine, 0, 0);
schaser_sh_port_2_w(machine, 0, 0);
schaser_sh_port_1_w(space, 0, 0);
schaser_sh_port_2_w(space, 0, 0);
schaser_effect_555_time_remain = attotime_zero;
MACHINE_RESET_CALL(mw8080bw);

View File

@ -273,11 +273,11 @@ static WRITE8_HANDLER( carnival_music_port_2_w )
break;
case PSG_BC_WRITE:
ay8910_write_port_0_w( space->machine, 0, psgData );
ay8910_write_port_0_w( space, 0, psgData );
break;
case PSG_BC_LATCH_ADDRESS:
ay8910_control_port_0_w( space->machine, 0, psgData );
ay8910_control_port_0_w( space, 0, psgData );
break;
}
}

View File

@ -27,18 +27,18 @@ READ8_HANDLER( cchasm_snd_io_r )
return sound_flags | coin;
case 0x01:
return ay8910_read_port_0_r (space->machine, offset);
return ay8910_read_port_0_r (space, offset);
case 0x21:
return ay8910_read_port_1_r (space->machine, offset);
return ay8910_read_port_1_r (space, offset);
case 0x40:
return soundlatch_r (space->machine, offset);
return soundlatch_r (space, offset);
case 0x41:
sound_flags &= ~0x80;
z80ctc_trg2_w(ctc, 0, 0);
return soundlatch2_r (space->machine, offset);
return soundlatch2_r (space, offset);
default:
logerror("Read from unmapped internal IO device at 0x%x\n", offset + 0x6000);
return 0;
@ -50,28 +50,28 @@ WRITE8_HANDLER( cchasm_snd_io_w )
switch (offset & 0x61 )
{
case 0x00:
ay8910_control_port_0_w (space->machine, offset, data);
ay8910_control_port_0_w (space, offset, data);
break;
case 0x01:
ay8910_write_port_0_w (space->machine, offset, data);
ay8910_write_port_0_w (space, offset, data);
break;
case 0x20:
ay8910_control_port_1_w (space->machine, offset, data);
ay8910_control_port_1_w (space, offset, data);
break;
case 0x21:
ay8910_write_port_1_w (space->machine, offset, data);
ay8910_write_port_1_w (space, offset, data);
break;
case 0x40:
soundlatch3_w (space->machine, offset, data);
soundlatch3_w (space, offset, data);
break;
case 0x41:
sound_flags |= 0x40;
soundlatch4_w (space->machine, offset, data);
soundlatch4_w (space, offset, data);
cpu_set_input_line(space->machine->cpu[0], 1, HOLD_LINE);
break;
@ -94,11 +94,11 @@ WRITE16_HANDLER( cchasm_io_w )
switch (offset & 0xf)
{
case 0:
soundlatch_w (space->machine, offset, data);
soundlatch_w (space, offset, data);
break;
case 1:
sound_flags |= 0x80;
soundlatch2_w (space->machine, offset, data);
soundlatch2_w (space, offset, data);
z80ctc_trg2_w (ctc, 0, 1);
cpu_set_input_line(space->machine->cpu[1], INPUT_LINE_NMI, PULSE_LINE);
break;
@ -114,10 +114,10 @@ READ16_HANDLER( cchasm_io_r )
switch (offset & 0xf)
{
case 0x0:
return soundlatch3_r (space->machine, offset) << 8;
return soundlatch3_r (space, offset) << 8;
case 0x1:
sound_flags &= ~0x40;
return soundlatch4_r (space->machine,offset) << 8;
return soundlatch4_r (space,offset) << 8;
case 0x2:
return (sound_flags| (input_port_read(space->machine, "IN3") & 0x07) | 0x08) << 8;
case 0x5:

View File

@ -1320,7 +1320,7 @@ static WRITE16_HANDLER( dsio_w )
dmadac_enable(0, dcs.channels, DSIO_MUTE);
/* bit 0 resets the FIFO */
midway_ioasic_fifo_reset_w(space, DSIO_EMPTY_FIFO ^ 1);
midway_ioasic_fifo_reset_w(space->machine, DSIO_EMPTY_FIFO ^ 1);
break;
/* offset 2 controls RAM pages */
@ -1391,7 +1391,7 @@ static WRITE16_HANDLER( denver_w )
/* offset 3 controls FIFO reset */
case 3:
midway_ioasic_fifo_reset_w(space, 1);
midway_ioasic_fifo_reset_w(space->machine, 1);
break;
}
}

View File

@ -405,17 +405,18 @@ static void r6532_porta_w(const device_config *device, UINT8 newdata, UINT8 oldd
static void r6532_portb_w(const device_config *device, UINT8 newdata, UINT8 olddata)
{
const address_space *space = cpu_get_address_space(device->machine->cpu[0], ADDRESS_SPACE_PROGRAM);
if (has_tms5220)
{
if ((olddata & 0x01) && !(newdata & 0x01))
{
riot6532_porta_in_set(riot, tms5220_status_r(device->machine, 0), 0xff);
logerror("(%f)%04X:TMS5220 status read = %02X\n", attotime_to_double(timer_get_time()), cpu_get_previouspc(device->machine->activecpu), tms5220_status_r(device->machine, 0));
riot6532_porta_in_set(riot, tms5220_status_r(space, 0), 0xff);
logerror("(%f)%04X:TMS5220 status read = %02X\n", attotime_to_double(timer_get_time()), cpu_get_previouspc(device->machine->activecpu), tms5220_status_r(space, 0));
}
if ((olddata & 0x02) && !(newdata & 0x02))
{
logerror("(%f)%04X:TMS5220 data write = %02X\n", attotime_to_double(timer_get_time()), cpu_get_previouspc(device->machine->activecpu), riot6532_porta_out_get(riot));
tms5220_data_w(device->machine, 0, riot6532_porta_out_get(riot));
tms5220_data_w(space, 0, riot6532_porta_out_get(riot));
}
}
}

View File

@ -43,7 +43,7 @@ static int random_offset;
static void gottlieb1_sh_w(const device_config *riot, UINT8 data);
static void gottlieb2_sh_w(running_machine *machine, UINT8 data);
static void gottlieb2_sh_w(const address_space *space, UINT8 data);
static void trigger_sample(running_machine *machine, UINT8 data);
@ -373,20 +373,20 @@ INPUT_PORTS_END
*
*************************************/
static void gottlieb2_sh_w(running_machine *machine, UINT8 data)
static void gottlieb2_sh_w(const address_space *space, UINT8 data)
{
/* when data is not 0xff, the transparent latch at A3 allows it to pass through unmolested */
if (data != 0xff)
{
/* each CPU has its own latch */
soundlatch_w(machine, 0, data);
soundlatch2_w(machine, 0, data);
soundlatch_w(space, 0, data);
soundlatch2_w(space, 0, data);
/* if the previous data was 0xff, clock an IRQ on each */
if (last_command == 0xff)
{
cputag_set_input_line(machine, "audio", M6502_IRQ_LINE, ASSERT_LINE);
cputag_set_input_line(machine, "speech", M6502_IRQ_LINE, ASSERT_LINE);
cputag_set_input_line(space->machine, "audio", M6502_IRQ_LINE, ASSERT_LINE);
cputag_set_input_line(space->machine, "speech", M6502_IRQ_LINE, ASSERT_LINE);
}
}
last_command = data;

View File

@ -341,13 +341,13 @@ WRITE16_HANDLER( jaguar_jerry_regs_w )
READ32_HANDLER( jaguar_jerry_regs32_r )
{
return read32be_with_16be_handler(jaguar_jerry_regs_r, space->machine, offset, mem_mask);
return read32be_with_16be_handler(jaguar_jerry_regs_r, space, offset, mem_mask);
}
WRITE32_HANDLER( jaguar_jerry_regs32_w )
{
write32be_with_16be_handler(jaguar_jerry_regs_w, space->machine, offset, data, mem_mask);
write32be_with_16be_handler(jaguar_jerry_regs_w, space, offset, data, mem_mask);
}

View File

@ -2057,7 +2057,7 @@ static WRITE16_HANDLER( peripheral_w )
break;
case 5: /* Ataxx/WSF/Indy Heat only */
ataxx_dac_control(space->machine, offset, data, mem_mask);
ataxx_dac_control(space, offset, data, mem_mask);
break;
default:

View File

@ -1228,7 +1228,7 @@ READ8_HANDLER( spc_io_r )
case 0x2: /* Register address */
return spc_ram[0xf2];
case 0x3: /* Register data */
return snes_dsp_io_r( space->machine, spc_ram[0xf2] );
return snes_dsp_io_r( space, spc_ram[0xf2] );
case 0x4: /* Port 0 */
case 0x5: /* Port 1 */
case 0x6: /* Port 2 */
@ -1303,7 +1303,7 @@ WRITE8_HANDLER( spc_io_w )
case 0x2: /* Register address */
break;
case 0x3: /* Register data */
snes_dsp_io_w( space->machine, spc_ram[0xf2], data );
snes_dsp_io_w( space, spc_ram[0xf2], data );
break;
case 0x4: /* Port 0 */
case 0x5: /* Port 1 */

View File

@ -73,7 +73,7 @@ WRITE8_HANDLER( shuttlei_sh_port_2_w );
extern UINT8 *c8080bw_colorram;
void c8080bw_flip_screen_w(running_machine *machine, int data);
void c8080bw_flip_screen_w(const address_space *space, int data);
void c8080bw_screen_red_w(int data);
void schaser_background_control_w(int data);

View File

@ -24,10 +24,10 @@ static UINT8 schaser_background_select;
void c8080bw_flip_screen_w(running_machine *machine, int data)
void c8080bw_flip_screen_w(const address_space *space, int data)
{
color_map = data;
c8080bw_flip_screen = data && (input_port_read(machine, CABINET_PORT_TAG) & 0x01);
c8080bw_flip_screen = data && (input_port_read(space->machine, CABINET_PORT_TAG) & 0x01);
}