Fix more warnings drivers[s-z]*

This commit is contained in:
Couriersud 2008-11-15 00:29:23 +00:00
parent 1527ec9b1e
commit a62a727e52
50 changed files with 189 additions and 152 deletions

View File

@ -125,7 +125,8 @@ static PALETTE_INIT( safarir )
static TILE_GET_INFO( get_bg_tile_info ) static TILE_GET_INFO( get_bg_tile_info )
{ {
int color; int color;
UINT8 code = ram_r(machine,tile_index | 0x400); const address_space *space = cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM);
UINT8 code = ram_r(space,tile_index | 0x400);
/* this is wrong */ /* this is wrong */
if (code & 0x80) if (code & 0x80)
@ -140,7 +141,9 @@ static TILE_GET_INFO( get_bg_tile_info )
static TILE_GET_INFO( get_fg_tile_info ) static TILE_GET_INFO( get_fg_tile_info )
{ {
int color, flags; int color, flags;
UINT8 code = ram_r(machine,tile_index); const address_space *space = cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM);
UINT8 code = ram_r(space,tile_index);
if (code & 0x80) if (code & 0x80)
color = 7; /* white */ color = 7; /* white */

View File

@ -1121,15 +1121,15 @@ static READ32_HANDLER( galileo_r )
/* unit 0 is the PCI bridge */ /* unit 0 is the PCI bridge */
if (unit == 0 && func == 0) if (unit == 0 && func == 0)
result = pci_bridge_r(space, reg, type); result = pci_bridge_r(space->machine, reg, type);
/* unit 8 is the 3dfx card */ /* unit 8 is the 3dfx card */
else if (unit == 8 && func == 0) else if (unit == 8 && func == 0)
result = pci_3dfx_r(space, reg, type); result = pci_3dfx_r(space->machine, reg, type);
/* unit 9 is the IDE controller */ /* unit 9 is the IDE controller */
else if (unit == 9 && func == 0) else if (unit == 9 && func == 0)
result = pci_ide_r(space, reg, type); result = pci_ide_r(space->machine, reg, type);
/* anything else, just log */ /* anything else, just log */
else else
@ -1259,15 +1259,15 @@ static WRITE32_HANDLER( galileo_w )
/* unit 0 is the PCI bridge */ /* unit 0 is the PCI bridge */
if (unit == 0 && func == 0) if (unit == 0 && func == 0)
pci_bridge_w(space, reg, type, data); pci_bridge_w(space->machine, reg, type, data);
/* unit 8 is the 3dfx card */ /* unit 8 is the 3dfx card */
else if (unit == 8 && func == 0) else if (unit == 8 && func == 0)
pci_3dfx_w(space, reg, type, data); pci_3dfx_w(space->machine, reg, type, data);
/* unit 9 is the IDE controller */ /* unit 9 is the IDE controller */
else if (unit == 9 && func == 0) else if (unit == 9 && func == 0)
pci_ide_w(space, reg, type, data); pci_ide_w(space->machine, reg, type, data);
/* anything else, just log */ /* anything else, just log */
else else
@ -1628,7 +1628,7 @@ static WRITE32_HANDLER( asic_reset_w )
static WRITE32_HANDLER( asic_fifo_w ) static WRITE32_HANDLER( asic_fifo_w )
{ {
midway_ioasic_fifo_w(space, data); midway_ioasic_fifo_w(space->machine, data);
} }

View File

@ -761,7 +761,7 @@ static UINT8 vdp_data_r(struct sms_vdp *chip)
return retdata; return retdata;
} }
static void vdp_data_w(running_machine *machine, UINT8 data, struct sms_vdp* chip) static void vdp_data_w(const address_space *space, UINT8 data, struct sms_vdp* chip)
{ {
/* data writes clear the pending flag */ /* data writes clear the pending flag */
chip->cmd_pend = 0; chip->cmd_pend = 0;
@ -797,7 +797,7 @@ static void vdp_data_w(running_machine *machine, UINT8 data, struct sms_vdp* chi
r = (palword & 0x000f)>>0; r = (palword & 0x000f)>>0;
g = (palword & 0x00f0)>>4; g = (palword & 0x00f0)>>4;
b = (palword & 0x0f00)>>8; b = (palword & 0x0f00)>>8;
palette_set_color_rgb(machine,(chip->addr_reg&0x3e)/2, pal4bit(r), pal4bit(g), pal4bit(b)); palette_set_color_rgb(space->machine,(chip->addr_reg&0x3e)/2, pal4bit(r), pal4bit(g), pal4bit(b));
chip->cram_mamecolours[(chip->addr_reg&0x3e)/2]=(b<<1)|(g<<6)|(r<<11); chip->cram_mamecolours[(chip->addr_reg&0x3e)/2]=(b<<1)|(g<<6)|(r<<11);
} }
} }
@ -812,7 +812,7 @@ static void vdp_data_w(running_machine *machine, UINT8 data, struct sms_vdp* chi
r = (data & 0x03)>>0; r = (data & 0x03)>>0;
g = (data & 0x0c)>>2; g = (data & 0x0c)>>2;
b = (data & 0x30)>>4; b = (data & 0x30)>>4;
palette_set_color_rgb(machine,chip->addr_reg&0x1f, pal2bit(r), pal2bit(g), pal2bit(b)); palette_set_color_rgb(space->machine,chip->addr_reg&0x1f, pal2bit(r), pal2bit(g), pal2bit(b));
chip->cram_mamecolours[chip->addr_reg&0x1f]=(b<<3)|(g<<8)|(r<<13); chip->cram_mamecolours[chip->addr_reg&0x1f]=(b<<3)|(g<<8)|(r<<13);
} }

View File

@ -302,7 +302,8 @@ static WRITE8_HANDLER( coin_count_w )
static WRITE8_DEVICE_HANDLER( sindbadm_soundport_w ) static WRITE8_DEVICE_HANDLER( sindbadm_soundport_w )
{ {
soundlatch_w(device->machine,0,data); const address_space *space = cpu_get_address_space(device->machine->cpu[0], ADDRESS_SPACE_PROGRAM);
soundlatch_w(space,0,data);
cpu_set_input_line(device->machine->cpu[1], INPUT_LINE_NMI, PULSE_LINE); cpu_set_input_line(device->machine->cpu[1], INPUT_LINE_NMI, PULSE_LINE);
cpuexec_boost_interleave(device->machine, attotime_zero, ATTOTIME_IN_USEC(50)); cpuexec_boost_interleave(device->machine, attotime_zero, ATTOTIME_IN_USEC(50));
} }

View File

@ -262,7 +262,8 @@ static WRITE16_HANDLER( sharrier_io_w )
static WRITE8_DEVICE_HANDLER( sound_latch_w ) static WRITE8_DEVICE_HANDLER( sound_latch_w )
{ {
soundlatch_w(device->machine, offset, data); const address_space *space = cpu_get_address_space(device->machine->cpu[0], ADDRESS_SPACE_PROGRAM);
soundlatch_w(space, offset, data);
} }

View File

@ -119,7 +119,8 @@ static const struct segaic16_memory_map_entry outrun_info[] =
static TIMER_CALLBACK( delayed_sound_data_w ) static TIMER_CALLBACK( delayed_sound_data_w )
{ {
soundlatch_w(machine, 0, param); const address_space *space = cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM);
soundlatch_w(space, 0, param);
cpu_set_input_line(machine->cpu[2], INPUT_LINE_NMI, ASSERT_LINE); cpu_set_input_line(machine->cpu[2], INPUT_LINE_NMI, ASSERT_LINE);
} }

View File

@ -305,7 +305,7 @@ static WRITE16_HANDLER( standard_io_w )
static READ16_HANDLER( misc_io_r ) static READ16_HANDLER( misc_io_r )
{ {
if (custom_io_r) if (custom_io_r)
return (*custom_io_r)(space->machine, offset, mem_mask); return (*custom_io_r)(space, offset, mem_mask);
else else
return standard_io_r(space, offset, mem_mask); return standard_io_r(space, offset, mem_mask);
} }
@ -314,7 +314,7 @@ static READ16_HANDLER( misc_io_r )
static WRITE16_HANDLER( misc_io_w ) static WRITE16_HANDLER( misc_io_w )
{ {
if (custom_io_w) if (custom_io_w)
(*custom_io_w)(space->machine, offset, data, mem_mask); (*custom_io_w)(space, offset, data, mem_mask);
else else
standard_io_w(space, offset, data, mem_mask); standard_io_w(space, offset, data, mem_mask);
} }
@ -363,7 +363,8 @@ static WRITE8_DEVICE_HANDLER( video_control_w )
static WRITE8_DEVICE_HANDLER( sound_latch_w ) static WRITE8_DEVICE_HANDLER( sound_latch_w )
{ {
soundlatch_w(device->machine, offset, data); const address_space *space = cpu_get_address_space(device->machine->cpu[0], ADDRESS_SPACE_PROGRAM);
soundlatch_w(space, offset, data);
} }
@ -552,16 +553,17 @@ static void bodyslam_i8751_sim(running_machine *machine)
static void quartet_i8751_sim(running_machine *machine) static void quartet_i8751_sim(running_machine *machine)
{ {
const address_space *space = cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM);
/* signal a VBLANK to the main CPU */ /* signal a VBLANK to the main CPU */
cpu_set_input_line(machine->cpu[0], 4, HOLD_LINE); cpu_set_input_line(machine->cpu[0], 4, HOLD_LINE);
/* X scroll values */ /* X scroll values */
segaic16_textram_0_w(machine, 0xff8/2, workram[0x0d14/2], 0xffff); segaic16_textram_0_w(space, 0xff8/2, workram[0x0d14/2], 0xffff);
segaic16_textram_0_w(machine, 0xffa/2, workram[0x0d18/2], 0xffff); segaic16_textram_0_w(space, 0xffa/2, workram[0x0d18/2], 0xffff);
/* page values */ /* page values */
segaic16_textram_0_w(machine, 0xe9e/2, workram[0x0d1c/2], 0xffff); segaic16_textram_0_w(space, 0xe9e/2, workram[0x0d1c/2], 0xffff);
segaic16_textram_0_w(machine, 0xe9c/2, workram[0x0d1e/2], 0xffff); segaic16_textram_0_w(space, 0xe9c/2, workram[0x0d1e/2], 0xffff);
} }

View File

@ -1181,7 +1181,7 @@ static WRITE16_HANDLER( standard_io_w )
static READ16_HANDLER( misc_io_r ) static READ16_HANDLER( misc_io_r )
{ {
if (custom_io_r) if (custom_io_r)
return (*custom_io_r)(space->machine, offset, mem_mask); return (*custom_io_r)(space, offset, mem_mask);
else else
return standard_io_r(space, offset, mem_mask); return standard_io_r(space, offset, mem_mask);
} }
@ -1190,7 +1190,7 @@ static READ16_HANDLER( misc_io_r )
static WRITE16_HANDLER( misc_io_w ) static WRITE16_HANDLER( misc_io_w )
{ {
if (custom_io_w) if (custom_io_w)
(*custom_io_w)(space->machine, offset, data, mem_mask); (*custom_io_w)(space, offset, data, mem_mask);
else else
standard_io_w(space, offset, data, mem_mask); standard_io_w(space, offset, data, mem_mask);
} }

View File

@ -445,7 +445,7 @@ static TIMER_CALLBACK( signal_v60_irq_callback )
} }
static void int_control_w(running_machine *machine, int offset, UINT8 data) static void int_control_w(const address_space *space, int offset, UINT8 data)
{ {
int duration; int duration;
@ -466,12 +466,12 @@ static void int_control_w(running_machine *machine, int offset, UINT8 data)
case 6: /* mask */ case 6: /* mask */
v60_irq_control[offset] = data; v60_irq_control[offset] = data;
update_irq_state(machine); update_irq_state(space->machine);
break; break;
case 7: /* acknowledge */ case 7: /* acknowledge */
v60_irq_control[offset] &= data; v60_irq_control[offset] &= data;
update_irq_state(machine); update_irq_state(space->machine);
break; break;
case 8: case 8:
@ -500,7 +500,7 @@ static void int_control_w(running_machine *machine, int offset, UINT8 data)
case 13: case 13:
case 14: case 14:
case 15: /* signal IRQ to sound CPU */ case 15: /* signal IRQ to sound CPU */
signal_sound_irq(machine, SOUND_IRQ_V60); signal_sound_irq(space->machine, SOUND_IRQ_V60);
break; break;
} }
} }
@ -584,7 +584,7 @@ static INTERRUPT_GEN( start_of_vblank_int )
* *
*************************************/ *************************************/
static UINT16 common_io_chip_r(running_machine *machine, int which, offs_t offset, UINT16 mem_mask) static UINT16 common_io_chip_r(const address_space *space, int which, offs_t offset, UINT16 mem_mask)
{ {
static const char *const portnames[2][8] = static const char *const portnames[2][8] =
{ {
@ -609,7 +609,7 @@ static UINT16 common_io_chip_r(running_machine *machine, int which, offs_t offse
return misc_io_data[which][offset]; return misc_io_data[which][offset];
/* otherwise, return an input port */ /* otherwise, return an input port */
return input_port_read_safe(machine, portnames[which][offset], 0xffff); return input_port_read_safe(space->machine, portnames[which][offset], 0xffff);
/* 'SEGA' protection */ /* 'SEGA' protection */
case 0x10/2: case 0x10/2:
@ -635,7 +635,7 @@ static UINT16 common_io_chip_r(running_machine *machine, int which, offs_t offse
} }
static void common_io_chip_w(running_machine *machine, int which, offs_t offset, UINT16 data, UINT16 mem_mask) static void common_io_chip_w(const address_space *space, int which, offs_t offset, UINT16 data, UINT16 mem_mask)
{ {
UINT8 old; UINT8 old;
@ -690,7 +690,7 @@ static void common_io_chip_w(running_machine *machine, int which, offs_t offset,
case 0x1c/2: case 0x1c/2:
system32_displayenable[which] = (data & 0x02); system32_displayenable[which] = (data & 0x02);
if (which == 0) if (which == 0)
cpu_set_input_line(machine->cpu[1], INPUT_LINE_RESET, (data & 0x04) ? CLEAR_LINE : ASSERT_LINE); cpu_set_input_line(space->machine->cpu[1], INPUT_LINE_RESET, (data & 0x04) ? CLEAR_LINE : ASSERT_LINE);
break; break;
} }
} }
@ -750,7 +750,7 @@ static WRITE32_HANDLER( io_chip_1_w )
static READ16_HANDLER( io_expansion_r ) static READ16_HANDLER( io_expansion_r )
{ {
if (custom_io_r[0]) if (custom_io_r[0])
return (*custom_io_r[0])(space->machine, offset, mem_mask); return (*custom_io_r[0])(space, offset, mem_mask);
else else
logerror("%06X:io_expansion_r(%X)\n", cpu_get_pc(space->cpu), offset); logerror("%06X:io_expansion_r(%X)\n", cpu_get_pc(space->cpu), offset);
return 0xffff; return 0xffff;
@ -764,7 +764,7 @@ static WRITE16_HANDLER( io_expansion_w )
return; return;
if (custom_io_w[0]) if (custom_io_w[0])
(*custom_io_w[0])(space->machine, offset, data, mem_mask); (*custom_io_w[0])(space, offset, data, mem_mask);
else else
logerror("%06X:io_expansion_w(%X) = %02X\n", cpu_get_pc(space->cpu), offset, data & 0xff); logerror("%06X:io_expansion_w(%X) = %02X\n", cpu_get_pc(space->cpu), offset, data & 0xff);
} }
@ -773,8 +773,8 @@ static WRITE16_HANDLER( io_expansion_w )
static READ32_HANDLER( io_expansion_0_r ) static READ32_HANDLER( io_expansion_0_r )
{ {
if (custom_io_r[0]) if (custom_io_r[0])
return (*custom_io_r[0])(space->machine, offset*2+0, mem_mask) | return (*custom_io_r[0])(space, offset*2+0, mem_mask) |
((*custom_io_r[0])(space->machine, offset*2+1, mem_mask >> 16) << 16); ((*custom_io_r[0])(space, offset*2+1, mem_mask >> 16) << 16);
else else
logerror("%06X:io_expansion_r(%X)\n", cpu_get_pc(space->cpu), offset); logerror("%06X:io_expansion_r(%X)\n", cpu_get_pc(space->cpu), offset);
return 0xffffffff; return 0xffffffff;
@ -787,14 +787,14 @@ static WRITE32_HANDLER( io_expansion_0_w )
if (ACCESSING_BITS_0_7) if (ACCESSING_BITS_0_7)
{ {
if (custom_io_w[0]) if (custom_io_w[0])
(*custom_io_w[0])(space->machine, offset*2+0, data, mem_mask); (*custom_io_w[0])(space, offset*2+0, data, mem_mask);
else else
logerror("%06X:io_expansion_w(%X) = %02X\n", cpu_get_pc(space->cpu), offset, data & 0xff); logerror("%06X:io_expansion_w(%X) = %02X\n", cpu_get_pc(space->cpu), offset, data & 0xff);
} }
if (ACCESSING_BITS_16_23) if (ACCESSING_BITS_16_23)
{ {
if (custom_io_w[0]) if (custom_io_w[0])
(*custom_io_w[0])(space->machine, offset*2+1, data >> 16, mem_mask >> 16); (*custom_io_w[0])(space, offset*2+1, data >> 16, mem_mask >> 16);
else else
logerror("%06X:io_expansion_w(%X) = %02X\n", cpu_get_pc(space->cpu), offset, data & 0xff); logerror("%06X:io_expansion_w(%X) = %02X\n", cpu_get_pc(space->cpu), offset, data & 0xff);
} }
@ -804,8 +804,8 @@ static WRITE32_HANDLER( io_expansion_0_w )
static READ32_HANDLER( io_expansion_1_r ) static READ32_HANDLER( io_expansion_1_r )
{ {
if (custom_io_r[1]) if (custom_io_r[1])
return (*custom_io_r[1])(space->machine, offset*2+0, mem_mask) | return (*custom_io_r[1])(space, offset*2+0, mem_mask) |
((*custom_io_r[1])(space->machine, offset*2+1, mem_mask >> 16) << 16); ((*custom_io_r[1])(space, offset*2+1, mem_mask >> 16) << 16);
else else
logerror("%06X:io_expansion_r(%X)\n", cpu_get_pc(space->cpu), offset); logerror("%06X:io_expansion_r(%X)\n", cpu_get_pc(space->cpu), offset);
return 0xffffffff; return 0xffffffff;
@ -818,14 +818,14 @@ static WRITE32_HANDLER( io_expansion_1_w )
if (ACCESSING_BITS_0_7) if (ACCESSING_BITS_0_7)
{ {
if (custom_io_w[1]) if (custom_io_w[1])
(*custom_io_w[1])(space->machine, offset*2+0, data, mem_mask); (*custom_io_w[1])(space, offset*2+0, data, mem_mask);
else else
logerror("%06X:io_expansion_w(%X) = %02X\n", cpu_get_pc(space->cpu), offset, data & 0xff); logerror("%06X:io_expansion_w(%X) = %02X\n", cpu_get_pc(space->cpu), offset, data & 0xff);
} }
if (ACCESSING_BITS_16_23) if (ACCESSING_BITS_16_23)
{ {
if (custom_io_w[1]) if (custom_io_w[1])
(*custom_io_w[1])(space->machine, offset*2+1, data >> 16, mem_mask >> 16); (*custom_io_w[1])(space, offset*2+1, data >> 16, mem_mask >> 16);
else else
logerror("%06X:io_expansion_w(%X) = %02X\n", cpu_get_pc(space->cpu), offset, data & 0xff); logerror("%06X:io_expansion_w(%X) = %02X\n", cpu_get_pc(space->cpu), offset, data & 0xff);
} }

View File

@ -1774,7 +1774,7 @@ static WRITE16_HANDLER( usclssic_lockout_w )
if (old_tiles_offset != seta_tiles_offset) tilemap_mark_all_tiles_dirty(ALL_TILEMAPS); if (old_tiles_offset != seta_tiles_offset) tilemap_mark_all_tiles_dirty(ALL_TILEMAPS);
old_tiles_offset = seta_tiles_offset; old_tiles_offset = seta_tiles_offset;
seta_coin_lockout_w(space, data); seta_coin_lockout_w(space->machine, data);
} }
} }
@ -2602,7 +2602,7 @@ static WRITE16_HANDLER( kiwame_nvram_w )
static READ16_HANDLER( kiwame_input_r ) static READ16_HANDLER( kiwame_input_r )
{ {
int row_select = kiwame_nvram_r( space->machine,0x10a/2,0x00ff ) & 0x1f; int row_select = kiwame_nvram_r( space, 0x10a/2,0x00ff ) & 0x1f;
int i; int i;
static const char *const keynames[] = { "KEY0", "KEY1", "KEY2", "KEY3", "KEY4" }; static const char *const keynames[] = { "KEY0", "KEY1", "KEY2", "KEY3", "KEY4" };
@ -2824,7 +2824,7 @@ static WRITE8_HANDLER( sub_bankswitch_w )
static WRITE8_HANDLER( sub_bankswitch_lockout_w ) static WRITE8_HANDLER( sub_bankswitch_lockout_w )
{ {
sub_bankswitch_w(space,offset,data); sub_bankswitch_w(space,offset,data);
seta_coin_lockout_w(space, data); seta_coin_lockout_w(space->machine, data);
} }
@ -2937,7 +2937,8 @@ ADDRESS_MAP_END
static MACHINE_RESET(calibr50) static MACHINE_RESET(calibr50)
{ {
sub_bankswitch_w(machine, 0, 0); const address_space *space = cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM);
sub_bankswitch_w(space, 0, 0);
} }
static WRITE8_HANDLER( calibr50_soundlatch2_w ) static WRITE8_HANDLER( calibr50_soundlatch2_w )

View File

@ -102,7 +102,7 @@ static WRITE8_HANDLER( shangkid_sound_enable_w )
static WRITE8_HANDLER( shangkid_bbx_AY8910_control_w ) static WRITE8_HANDLER( shangkid_bbx_AY8910_control_w )
{ {
bbx_AY8910_control = data; bbx_AY8910_control = data;
ay8910_control_port_0_w( space->machine, offset, data ); ay8910_control_port_0_w( space, offset, data );
} }
static WRITE8_HANDLER( chinhero_bbx_AY8910_write_w ) static WRITE8_HANDLER( chinhero_bbx_AY8910_write_w )
@ -123,7 +123,7 @@ static WRITE8_HANDLER( chinhero_bbx_AY8910_write_w )
break; break;
default: default:
ay8910_write_port_0_w( space->machine, offset, data ); ay8910_write_port_0_w( space, offset, data );
break; break;
} }
} }
@ -148,7 +148,7 @@ static WRITE8_HANDLER( shangkid_bbx_AY8910_write_w )
break; break;
default: default:
ay8910_write_port_0_w( space->machine, offset, data ); ay8910_write_port_0_w( space, offset, data );
break; break;
} }
} }

View File

@ -60,7 +60,7 @@ static WRITE8_HANDLER( shootout_bankswitch_w )
static WRITE8_HANDLER( sound_cpu_command_w ) static WRITE8_HANDLER( sound_cpu_command_w )
{ {
soundlatch_w( space->machine, offset, data ); soundlatch_w( space, offset, data );
cpu_set_input_line(space->machine->cpu[1], INPUT_LINE_NMI, PULSE_LINE ); cpu_set_input_line(space->machine->cpu[1], INPUT_LINE_NMI, PULSE_LINE );
} }

View File

@ -916,7 +916,8 @@ static const ay8910_interface ay8910_interface_2 =
static VIDEO_EOF( perfrman ) static VIDEO_EOF( perfrman )
{ {
buffer_spriteram_w(machine,0,0); const address_space *space = cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM);
buffer_spriteram_w(space,0,0);
} }
static MACHINE_DRIVER_START( perfrman ) static MACHINE_DRIVER_START( perfrman )

View File

@ -255,9 +255,9 @@ static WRITE8_HANDLER( sound_bankswitch_w )
static WRITE16_HANDLER( slapshot_msb_sound_w ) static WRITE16_HANDLER( slapshot_msb_sound_w )
{ {
if (offset == 0) if (offset == 0)
taitosound_port_w (space->machine,0,(data >> 8) & 0xff); taitosound_port_w (space,0,(data >> 8) & 0xff);
else if (offset == 1) else if (offset == 1)
taitosound_comm_w (space->machine,0,(data >> 8) & 0xff); taitosound_comm_w (space,0,(data >> 8) & 0xff);
#ifdef MAME_DEBUG #ifdef MAME_DEBUG
if (data & 0xff) if (data & 0xff)
@ -268,7 +268,7 @@ static WRITE16_HANDLER( slapshot_msb_sound_w )
static READ16_HANDLER( slapshot_msb_sound_r ) static READ16_HANDLER( slapshot_msb_sound_r )
{ {
if (offset == 1) if (offset == 1)
return ((taitosound_comm_r (space->machine, 0) & 0xff) << 8); return ((taitosound_comm_r (space, 0) & 0xff) << 8);
else return 0; else return 0;
} }

View File

@ -111,7 +111,8 @@ static INTERRUPT_GEN( snowbros_interrupt )
static INTERRUPT_GEN( snowbro3_interrupt ) static INTERRUPT_GEN( snowbro3_interrupt )
{ {
int status = okim6295_status_0_r(device->machine,0); const address_space *space = cpu_get_address_space(device, ADDRESS_SPACE_PROGRAM);
int status = okim6295_status_0_r(space,0);
cpu_set_input_line(device, cpu_getiloops(device) + 2, HOLD_LINE); /* IRQs 4, 3, and 2 */ cpu_set_input_line(device, cpu_getiloops(device) + 2, HOLD_LINE); /* IRQs 4, 3, and 2 */
@ -119,8 +120,8 @@ static INTERRUPT_GEN( snowbro3_interrupt )
{ {
if ((status&0x08)==0x00) if ((status&0x08)==0x00)
{ {
okim6295_data_0_w(device->machine,0,0x80|sb3_music); okim6295_data_0_w(space,0,0x80|sb3_music);
okim6295_data_0_w(device->machine,0,0x00|0x82); okim6295_data_0_w(space,0,0x00|0x82);
} }
} }
@ -128,7 +129,7 @@ static INTERRUPT_GEN( snowbro3_interrupt )
{ {
if ((status&0x08)==0x08) if ((status&0x08)==0x08)
{ {
okim6295_data_0_w(device->machine,0,0x40); /* Stop playing music */ okim6295_data_0_w(space,0,0x40); /* Stop playing music */
} }
} }
@ -432,24 +433,24 @@ static void sb3_play_music(running_machine *machine, int data)
} }
} }
static void sb3_play_sound (running_machine *machine, int data) static void sb3_play_sound (const address_space *space, int data)
{ {
int status = okim6295_status_0_r(machine,0); int status = okim6295_status_0_r(space,0);
if ((status&0x01)==0x00) if ((status&0x01)==0x00)
{ {
okim6295_data_0_w(machine,0,0x80|data); okim6295_data_0_w(space,0,0x80|data);
okim6295_data_0_w(machine,0,0x00|0x12); okim6295_data_0_w(space,0,0x00|0x12);
} }
else if ((status&0x02)==0x00) else if ((status&0x02)==0x00)
{ {
okim6295_data_0_w(machine,0,0x80|data); okim6295_data_0_w(space,0,0x80|data);
okim6295_data_0_w(machine,0,0x00|0x22); okim6295_data_0_w(space,0,0x00|0x22);
} }
else if ((status&0x04)==0x00) else if ((status&0x04)==0x00)
{ {
okim6295_data_0_w(machine,0,0x80|data); okim6295_data_0_w(space,0,0x80|data);
okim6295_data_0_w(machine,0,0x00|0x42); okim6295_data_0_w(space,0,0x00|0x42);
} }
@ -468,7 +469,7 @@ static WRITE16_HANDLER( sb3_sound_w )
if (data <= 0x21) if (data <= 0x21)
{ {
sb3_play_sound(space->machine, data); sb3_play_sound(space, data);
} }
if (data>=0x22 && data<=0x31) if (data>=0x22 && data<=0x31)
@ -478,7 +479,7 @@ static WRITE16_HANDLER( sb3_sound_w )
if ((data>=0x30) && (data<=0x51)) if ((data>=0x30) && (data<=0x51))
{ {
sb3_play_sound(space->machine, data-0x30); sb3_play_sound(space, data-0x30);
} }
if (data>=0x52 && data<=0x5f) if (data>=0x52 && data<=0x5f)

View File

@ -173,10 +173,11 @@ static MACHINE_START( spacefb )
static MACHINE_RESET( spacefb ) static MACHINE_RESET( spacefb )
{ {
const address_space *space = cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_IO);
/* the 3 output ports are cleared on reset */ /* the 3 output ports are cleared on reset */
spacefb_port_0_w(machine, 0, 0); spacefb_port_0_w(space, 0, 0);
spacefb_port_1_w(machine, 0, 0); spacefb_port_1_w(space, 0, 0);
spacefb_port_2_w(machine, 0, 0); spacefb_port_2_w(space, 0, 0);
start_interrupt_timer(machine); start_interrupt_timer(machine);
} }

View File

@ -268,16 +268,17 @@ static const pia6821_interface pia_1_intf =
static INTERRUPT_GEN( update_pia_1 ) static INTERRUPT_GEN( update_pia_1 )
{ {
const address_space *space = cpu_get_address_space(device, ADDRESS_SPACE_PROGRAM);
/* update the different PIA pins from the input ports */ /* update the different PIA pins from the input ports */
/* CA1 - copy of PA1 (COIN1) */ /* CA1 - copy of PA1 (COIN1) */
pia_1_ca1_w(device->machine, 0, input_port_read(device->machine, "IN0") & 0x02); pia_1_ca1_w(space, 0, input_port_read(device->machine, "IN0") & 0x02);
/* CA2 - copy of PA0 (SERVICE1) */ /* CA2 - copy of PA0 (SERVICE1) */
pia_1_ca2_w(device->machine, 0, input_port_read(device->machine, "IN0") & 0x01); pia_1_ca2_w(space, 0, input_port_read(device->machine, "IN0") & 0x01);
/* CB1 - (crosshatch) */ /* CB1 - (crosshatch) */
pia_1_cb1_w(device->machine, 0, input_port_read(device->machine, "XHATCH")); pia_1_cb1_w(space, 0, input_port_read(device->machine, "XHATCH"));
/* CB2 - NOT CONNECTED */ /* CB2 - NOT CONNECTED */
} }
@ -343,7 +344,8 @@ static const pia6821_interface pia_4_intf =
static WRITE8_DEVICE_HANDLER( ic60_74123_output_changed) static WRITE8_DEVICE_HANDLER( ic60_74123_output_changed)
{ {
pia_2_ca1_w(device->machine, 0, data); const address_space *space = cpu_get_address_space(device->machine->cpu[0], ADDRESS_SPACE_PROGRAM);
pia_2_ca1_w(space, 0, data);
} }

View File

@ -52,8 +52,9 @@ static WRITE8_HANDLER( srumbler_bankswitch_w )
static MACHINE_RESET( srumbler ) static MACHINE_RESET( srumbler )
{ {
const address_space *space = cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM);
/* initialize banked ROM pointers */ /* initialize banked ROM pointers */
srumbler_bankswitch_w(machine,0,0); srumbler_bankswitch_w(space,0,0);
} }
static INTERRUPT_GEN( srumbler_interrupt ) static INTERRUPT_GEN( srumbler_interrupt )

View File

@ -135,13 +135,14 @@ static READ16_HANDLER( deco_71_r )
static MACHINE_RESET( sshangha ) static MACHINE_RESET( sshangha )
{ {
const address_space *space = cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM);
/* Such thing is needed as there is no code to turn the screen /* Such thing is needed as there is no code to turn the screen
to normal orientation when the game is reset. to normal orientation when the game is reset.
I'm using the value that forces the screen to be in normal I'm using the value that forces the screen to be in normal
orientation when entering the "test mode" orientation when entering the "test mode"
(check the game code from 0x0006b8 to 0x0006f0). (check the game code from 0x0006b8 to 0x0006f0).
I can't tell however if this is accurate or not. */ I can't tell however if this is accurate or not. */
sshangha_control_0_w(machine, 0, 0x10, 0x00ff); sshangha_control_0_w(space, 0, 0x10, 0x00ff);
} }
/******************************************************************************/ /******************************************************************************/

View File

@ -86,7 +86,7 @@ static READ8_HANDLER( starfire_scratch_r )
{ {
/* A11 selects input ports */ /* A11 selects input ports */
if (offset & 0x800) if (offset & 0x800)
return (*input_read)(space->machine, offset); return (*input_read)(space, offset);
/* convert to a videoram offset */ /* convert to a videoram offset */
offset = (offset & 0x31f) | ((offset & 0xe0) << 5); offset = (offset & 0x31f) | ((offset & 0xe0) << 5);

View File

@ -53,7 +53,7 @@ static WRITE16_HANDLER( suna16_soundlatch_w )
{ {
if (ACCESSING_BITS_0_7) if (ACCESSING_BITS_0_7)
{ {
soundlatch_w( space->machine, 0, data & 0xff ); soundlatch_w( space, 0, data & 0xff );
} }
if (data & ~0xff) logerror("CPU#0 PC %06X - Sound latch unknown bits: %04X\n", cpu_get_pc(space->cpu), data); if (data & ~0xff) logerror("CPU#0 PC %06X - Sound latch unknown bits: %04X\n", cpu_get_pc(space->cpu), data);
} }
@ -434,7 +434,8 @@ ADDRESS_MAP_END
static MACHINE_RESET(uballoon) static MACHINE_RESET(uballoon)
{ {
uballoon_pcm_1_bankswitch_w(machine, 0, 0); const address_space *space = cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM);
uballoon_pcm_1_bankswitch_w(space, 0, 0);
} }

View File

@ -1657,7 +1657,8 @@ static INTERRUPT_GEN( hardhea2_interrupt )
static MACHINE_RESET( hardhea2 ) static MACHINE_RESET( hardhea2 )
{ {
hardhea2_rambank_0_w(machine,0,0); const address_space *space = cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM);
hardhea2_rambank_0_w(space,0,0);
} }
static MACHINE_DRIVER_START( hardhea2 ) static MACHINE_DRIVER_START( hardhea2 )

View File

@ -273,11 +273,12 @@ static VIDEO_UPDATE( supertnk )
static MACHINE_RESET( supertnk ) static MACHINE_RESET( supertnk )
{ {
supertnk_bankswitch_0_w(machine, 0, 0); const address_space *space = cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM);
supertnk_bankswitch_1_w(machine, 0, 0); supertnk_bankswitch_0_w(space, 0, 0);
supertnk_bankswitch_1_w(space, 0, 0);
supertnk_bitplane_select_0_w(machine, 0, 0); supertnk_bitplane_select_0_w(space, 0, 0);
supertnk_bitplane_select_1_w(machine, 0, 0); supertnk_bitplane_select_1_w(space, 0, 0);
} }

View File

@ -391,7 +391,7 @@ static WRITE16_HANDLER( sound_command_w )
{ {
if( ACCESSING_BITS_0_7 ) if( ACCESSING_BITS_0_7 )
{ {
soundlatch_w( space->machine,0,data&0xff ); soundlatch_w( space,0,data&0xff );
cpu_set_input_line(space->machine->cpu[1], 0, HOLD_LINE ); cpu_set_input_line(space->machine->cpu[1], 0, HOLD_LINE );
} }
} }
@ -400,7 +400,7 @@ static WRITE16_HANDLER( sound_command_nmi_w )
{ {
if( ACCESSING_BITS_0_7 ) if( ACCESSING_BITS_0_7 )
{ {
soundlatch_w( space->machine,0,data&0xff ); soundlatch_w( space,0,data&0xff );
cpu_set_input_line(space->machine->cpu[1], INPUT_LINE_NMI, PULSE_LINE); cpu_set_input_line(space->machine->cpu[1], INPUT_LINE_NMI, PULSE_LINE);
} }
} }
@ -1197,7 +1197,7 @@ static WRITE16_HANDLER( ga_sound_command_w )
COMBINE_DATA( &sys16_workingram[(0xecfc-0xc000)/2] ); COMBINE_DATA( &sys16_workingram[(0xecfc-0xc000)/2] );
if( ACCESSING_BITS_8_15 ) if( ACCESSING_BITS_8_15 )
{ {
soundlatch_w( space->machine,0,data>>8 ); soundlatch_w( space,0,data>>8 );
cpu_set_input_line(space->machine->cpu[1], 0, HOLD_LINE ); cpu_set_input_line(space->machine->cpu[1], 0, HOLD_LINE );
} }
} }

View File

@ -187,7 +187,7 @@ static UINT8* shdancbl_soundbank_ptr = NULL; /* Pointer to currently selected p
static WRITE16_HANDLER( sound_command_irq_w ){ static WRITE16_HANDLER( sound_command_irq_w ){
if( ACCESSING_BITS_0_7 ){ if( ACCESSING_BITS_0_7 ){
soundlatch_w( space->machine,0,data&0xff ); soundlatch_w( space,0,data&0xff );
cpu_set_input_line(space->machine->cpu[1], 0, HOLD_LINE ); cpu_set_input_line(space->machine->cpu[1], 0, HOLD_LINE );
} }
} }
@ -321,7 +321,7 @@ ADDRESS_MAP_END
static WRITE16_HANDLER( sound_command_nmi_w ){ static WRITE16_HANDLER( sound_command_nmi_w ){
if( ACCESSING_BITS_0_7 ){ if( ACCESSING_BITS_0_7 ){
soundlatch_w( space->machine,0,data&0xff ); soundlatch_w( space,0,data&0xff );
cpu_set_input_line(space->machine->cpu[1], INPUT_LINE_NMI, PULSE_LINE); cpu_set_input_line(space->machine->cpu[1], INPUT_LINE_NMI, PULSE_LINE);
} }
} }

View File

@ -231,7 +231,7 @@ static READ16_HANDLER( syvalion_input_bypass_r )
return 0x00; return 0x00;
default: default:
return TC0220IOC_portreg_r( space->machine,offset ); return TC0220IOC_portreg_r( space,offset );
} }
} }

View File

@ -1428,9 +1428,9 @@ static WRITE8_HANDLER( sound_bankswitch_w )
static WRITE16_HANDLER( taitoz_sound_w ) static WRITE16_HANDLER( taitoz_sound_w )
{ {
if (offset == 0) if (offset == 0)
taitosound_port_w (space->machine, 0, data & 0xff); taitosound_port_w (space, 0, data & 0xff);
else if (offset == 1) else if (offset == 1)
taitosound_comm_w (space->machine, 0, data & 0xff); taitosound_comm_w (space, 0, data & 0xff);
#ifdef MAME_DEBUG #ifdef MAME_DEBUG
// if (data & 0xff00) // if (data & 0xff00)
@ -1446,7 +1446,7 @@ static WRITE16_HANDLER( taitoz_sound_w )
static READ16_HANDLER( taitoz_sound_r ) static READ16_HANDLER( taitoz_sound_r )
{ {
if (offset == 1) if (offset == 1)
return ((taitosound_comm_r (space->machine,0) & 0xff)); return ((taitosound_comm_r (space,0) & 0xff));
else return 0; else return 0;
} }
@ -1494,7 +1494,7 @@ static WRITE8_HANDLER( taitoz_pancontrol )
static WRITE16_HANDLER( spacegun_pancontrol ) static WRITE16_HANDLER( spacegun_pancontrol )
{ {
if (ACCESSING_BITS_0_7) if (ACCESSING_BITS_0_7)
taitoz_pancontrol(space->machine, offset, data & 0xff); taitoz_pancontrol(space, offset, data & 0xff);
} }

View File

@ -418,13 +418,13 @@ static const struct dma8237_interface dma8237_2_config =
static READ32_HANDLER(at_page32_r) static READ32_HANDLER(at_page32_r)
{ {
return read32le_with_read8_handler(at_page8_r, space->machine, offset, mem_mask); return read32le_with_read8_handler(at_page8_r, space, offset, mem_mask);
} }
static WRITE32_HANDLER(at_page32_w) static WRITE32_HANDLER(at_page32_w)
{ {
write32le_with_write8_handler(at_page8_w, space->machine, offset, data, mem_mask); write32le_with_write8_handler(at_page8_w, space, offset, data, mem_mask);
} }

View File

@ -11,15 +11,15 @@ Taxi Driver (c) 1984 Graphic Techno
static WRITE8_DEVICE_HANDLER( p2a_w ) { taxidrvr_spritectrl_w(device->machine,0,data); } static WRITE8_DEVICE_HANDLER( p2a_w ) { taxidrvr_spritectrl_w(device,0,data); }
static WRITE8_DEVICE_HANDLER( p2b_w ) { taxidrvr_spritectrl_w(device->machine,1,data); } static WRITE8_DEVICE_HANDLER( p2b_w ) { taxidrvr_spritectrl_w(device,1,data); }
static WRITE8_DEVICE_HANDLER( p2c_w ) { taxidrvr_spritectrl_w(device->machine,2,data); } static WRITE8_DEVICE_HANDLER( p2c_w ) { taxidrvr_spritectrl_w(device,2,data); }
static WRITE8_DEVICE_HANDLER( p3a_w ) { taxidrvr_spritectrl_w(device->machine,3,data); } static WRITE8_DEVICE_HANDLER( p3a_w ) { taxidrvr_spritectrl_w(device,3,data); }
static WRITE8_DEVICE_HANDLER( p3b_w ) { taxidrvr_spritectrl_w(device->machine,4,data); } static WRITE8_DEVICE_HANDLER( p3b_w ) { taxidrvr_spritectrl_w(device,4,data); }
static WRITE8_DEVICE_HANDLER( p3c_w ) { taxidrvr_spritectrl_w(device->machine,5,data); } static WRITE8_DEVICE_HANDLER( p3c_w ) { taxidrvr_spritectrl_w(device,5,data); }
static WRITE8_DEVICE_HANDLER( p4a_w ) { taxidrvr_spritectrl_w(device->machine,6,data); } static WRITE8_DEVICE_HANDLER( p4a_w ) { taxidrvr_spritectrl_w(device,6,data); }
static WRITE8_DEVICE_HANDLER( p4b_w ) { taxidrvr_spritectrl_w(device->machine,7,data); } static WRITE8_DEVICE_HANDLER( p4b_w ) { taxidrvr_spritectrl_w(device,7,data); }
static WRITE8_DEVICE_HANDLER( p4c_w ) { taxidrvr_spritectrl_w(device->machine,8,data); } static WRITE8_DEVICE_HANDLER( p4c_w ) { taxidrvr_spritectrl_w(device,8,data); }

View File

@ -288,7 +288,7 @@ static READ16_HANDLER( sound_r )
{ {
if (ACCESSING_BITS_0_7) if (ACCESSING_BITS_0_7)
{ {
return soundlatch2_r( space->machine, 0 ); return soundlatch2_r( space, 0 );
} }
return 0; return 0;

View File

@ -112,8 +112,8 @@ static WRITE16_HANDLER( tetrisp2_sound_w )
{ {
if (ACCESSING_BITS_0_7) if (ACCESSING_BITS_0_7)
{ {
if (offset) ymz280b_data_0_w (space->machine, offset, data & 0xff); if (offset) ymz280b_data_0_w (space, offset, data & 0xff);
else ymz280b_register_0_w (space->machine, offset, data & 0xff); else ymz280b_register_0_w (space, offset, data & 0xff);
} }
} }

View File

@ -126,6 +126,8 @@ static DRIVER_INIT( tiamc1 )
static MACHINE_RESET( tiamc1 ) static MACHINE_RESET( tiamc1 )
{ {
const address_space *space = cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM);
memset(video_ram, 0, 0x3040); memset(video_ram, 0, 0x3040);
tiamc1_charram = video_ram + 0x0800; /* Ram is banked */ tiamc1_charram = video_ram + 0x0800; /* Ram is banked */
@ -136,7 +138,7 @@ static MACHINE_RESET( tiamc1 )
tiamc1_spriteram_n = video_ram + 0x3020; tiamc1_spriteram_n = video_ram + 0x3020;
tiamc1_spriteram_a = video_ram + 0x3030; tiamc1_spriteram_a = video_ram + 0x3030;
tiamc1_bankswitch_w(machine, 0, 0); tiamc1_bankswitch_w(space, 0, 0);
state_save_register_global_pointer(video_ram, 0x3040); state_save_register_global_pointer(video_ram, 0x3040);
} }

View File

@ -86,11 +86,11 @@ static const int f1dream_2450_lookup[32] = {
0x0003, 0x0080, 0x0006, 0x0060, 0x0000, 0x00e0, 0x000a, 0x00c0, 0x0003, 0x0080, 0x0006, 0x0060, 0x0000, 0x00e0, 0x000a, 0x00c0, 0x0003, 0x0080, 0x0006, 0x0060, 0x0000, 0x00e0, 0x000a, 0x00c0, 0x0003, 0x0080, 0x0006, 0x0060, 0x0000, 0x00e0, 0x000a, 0x00c0,
0x0003, 0x0080, 0x0006, 0x0060, 0x0000, 0x00e0, 0x000a, 0x00c0, 0x0003, 0x0080, 0x0006, 0x0060, 0x0000, 0x00e0, 0x000a, 0x00c0 }; 0x0003, 0x0080, 0x0006, 0x0060, 0x0000, 0x00e0, 0x000a, 0x00c0, 0x0003, 0x0080, 0x0006, 0x0060, 0x0000, 0x00e0, 0x000a, 0x00c0 };
static void f1dream_protection_w(running_machine *machine) static void f1dream_protection_w(const address_space *space)
{ {
int indx; int indx;
int value = 255; int value = 255;
int prevpc = cpu_get_previouspc(machine->activecpu); int prevpc = cpu_get_previouspc(space->machine->activecpu);
if (prevpc == 0x244c) if (prevpc == 0x244c)
{ {
@ -145,7 +145,7 @@ static void f1dream_protection_w(running_machine *machine)
else if ((prevpc == 0x27f8) || (prevpc == 0x511a) || (prevpc == 0x5142) || (prevpc == 0x516a)) else if ((prevpc == 0x27f8) || (prevpc == 0x511a) || (prevpc == 0x5142) || (prevpc == 0x516a))
{ {
/* The main CPU stuffs the byte for the soundlatch into 0xfffffd.*/ /* The main CPU stuffs the byte for the soundlatch into 0xfffffd.*/
soundlatch_w(machine,2,ram16[0x3ffc/2]); soundlatch_w(space->machine,2,ram16[0x3ffc/2]);
} }
} }

View File

@ -860,7 +860,7 @@ INLINE UINT32 tmnt2_get_word(UINT32 addr)
return(0); return(0);
} }
static void tmnt2_put_word(running_machine *machine, UINT32 addr, UINT16 data) static void tmnt2_put_word(const address_space *space, UINT32 addr, UINT16 data)
{ {
UINT32 offs; UINT32 offs;
if (addr >= 0x180000/2 && addr <= 0x183fff/2) if (addr >= 0x180000/2 && addr <= 0x183fff/2)
@ -870,7 +870,7 @@ static void tmnt2_put_word(running_machine *machine, UINT32 addr, UINT16 data)
if (!(offs & 0x0031)) if (!(offs & 0x0031))
{ {
offs = ((offs & 0x000e) >> 1) | ((offs & 0x1fc0) >> 3); offs = ((offs & 0x000e) >> 1) | ((offs & 0x1fc0) >> 3);
K053245_word_w(machine, offs, data, 0xffff); K053245_word_w(space->machine, offs, data, 0xffff);
} }
} }
else if (addr >= 0x104000/2 && addr <= 0x107fff/2) sunset_104000[addr-0x104000/2] = data; else if (addr >= 0x104000/2 && addr <= 0x107fff/2) sunset_104000[addr-0x104000/2] = data;
@ -985,11 +985,11 @@ static WRITE16_HANDLER( tmnt2_1c0800_w )
xoffs += xmod; xoffs += xmod;
yoffs += ymod; yoffs += ymod;
tmnt2_put_word(space->machine, dst_addr + 0, attr1); tmnt2_put_word(space, dst_addr + 0, attr1);
tmnt2_put_word(space->machine, dst_addr + 2, code); tmnt2_put_word(space, dst_addr + 2, code);
tmnt2_put_word(space->machine, dst_addr + 4, (UINT32)yoffs); tmnt2_put_word(space, dst_addr + 4, (UINT32)yoffs);
tmnt2_put_word(space->machine, dst_addr + 6, (UINT32)xoffs); tmnt2_put_word(space, dst_addr + 6, (UINT32)xoffs);
tmnt2_put_word(space->machine, dst_addr + 12, attr2 | color); tmnt2_put_word(space, dst_addr + 12, attr2 | color);
} }
#else // for reference; do not remove #else // for reference; do not remove
static WRITE16_HANDLER( tmnt2_1c0800_w ) static WRITE16_HANDLER( tmnt2_1c0800_w )
@ -2356,9 +2356,10 @@ MACHINE_DRIVER_END
static MACHINE_RESET( tmnt ) static MACHINE_RESET( tmnt )
{ {
const address_space *space = cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM);
/* the UPD7759 control flip-flops are cleared: /ST is 1, /RESET is 0 */ /* the UPD7759 control flip-flops are cleared: /ST is 1, /RESET is 0 */
upd7759_0_start_w(machine, 0, 0); upd7759_0_start_w(space, 0, 0);
upd7759_0_reset_w(machine, 0, 1); upd7759_0_reset_w(space, 0, 1);
} }
static MACHINE_DRIVER_START( tmnt ) static MACHINE_DRIVER_START( tmnt )

View File

@ -843,7 +843,7 @@ static WRITE16_HANDLER( dogyuun_snd_cpu_w )
if (ACCESSING_BITS_0_7) if (ACCESSING_BITS_0_7)
{ {
mcu_data = data; mcu_data = data;
dogyuun_okisnd_w(space, data); dogyuun_okisnd_w(space->machine, data);
} }
logerror("PC:%06x Writing command (%04x) to the NEC V25+ secondary CPU port\n",cpu_get_previouspc(space->cpu),mcu_data); logerror("PC:%06x Writing command (%04x) to the NEC V25+ secondary CPU port\n",cpu_get_previouspc(space->cpu),mcu_data);
} }
@ -862,7 +862,7 @@ static WRITE16_HANDLER( kbash_snd_cpu_w )
{ {
if (ACCESSING_BITS_0_7) if (ACCESSING_BITS_0_7)
{ {
kbash_okisnd_w(space, data); kbash_okisnd_w(space->machine, data);
} }
logerror("PC:%06x Writing Sound command (%04x) to the NEC V25+ secondary CPU\n",cpu_get_previouspc(space->cpu),data); logerror("PC:%06x Writing Sound command (%04x) to the NEC V25+ secondary CPU\n",cpu_get_previouspc(space->cpu),data);
} }
@ -899,7 +899,7 @@ static WRITE16_HANDLER( fixeight_sec_cpu_w )
if (mcu_data & 0xff00) if (mcu_data & 0xff00)
{ {
mcu_data = (mcu_data & 0xff00) | (data & 0xff); mcu_data = (mcu_data & 0xff00) | (data & 0xff);
fixeight_okisnd_w(space, data); fixeight_okisnd_w(space->machine, data);
} }
else if (mcu_data == 0xff00) else if (mcu_data == 0xff00)
{ {
@ -943,7 +943,7 @@ static WRITE16_HANDLER( batsugun_snd_cpu_w )
if (ACCESSING_BITS_0_7) if (ACCESSING_BITS_0_7)
{ {
mcu_data = data; mcu_data = data;
batsugun_okisnd_w(space, data); batsugun_okisnd_w(space->machine, data);
} }
logerror("PC:%06x Writing command (%04x) to the NEC V25+ secondary CPU port %02x\n",cpu_get_previouspc(space->cpu),mcu_data,(offset*2)); logerror("PC:%06x Writing command (%04x) to the NEC V25+ secondary CPU port %02x\n",cpu_get_previouspc(space->cpu),mcu_data,(offset*2));
} }

View File

@ -45,7 +45,7 @@ VIDEO_UPDATE( trucocl );
static WRITE8_HANDLER( irq_enable_w) static WRITE8_HANDLER( irq_enable_w)
{ {
interrupt_enable_w( space->machine, 0, (~data) & 1 ); interrupt_enable_w( space, 0, (~data) & 1 );
} }
static int cur_dac_address = -1; static int cur_dac_address = -1;

View File

@ -195,8 +195,9 @@ static MACHINE_RESET( trvquest )
static INTERRUPT_GEN( trvquest_interrupt ) static INTERRUPT_GEN( trvquest_interrupt )
{ {
via_2_ca1_w(device->machine,0,1); const address_space *space = cpu_get_address_space(device, ADDRESS_SPACE_PROGRAM);
via_2_ca1_w(device->machine,0,0); via_2_ca1_w(space,0,1);
via_2_ca1_w(space,0,0);
} }
static MACHINE_DRIVER_START( trvquest ) static MACHINE_DRIVER_START( trvquest )

View File

@ -382,7 +382,7 @@ static READ8_HANDLER( vsgongf_a100_r ){
} }
static WRITE8_HANDLER( vsgongf_sound_command_w ){ static WRITE8_HANDLER( vsgongf_sound_command_w ){
soundlatch_w( space->machine, offset, data ); soundlatch_w( space, offset, data );
cpu_set_input_line(space->machine->cpu[1], INPUT_LINE_NMI, PULSE_LINE ); cpu_set_input_line(space->machine->cpu[1], INPUT_LINE_NMI, PULSE_LINE );
} }

View File

@ -126,7 +126,7 @@ static READ16_HANDLER( twin16_gfx_rom2_r )
static WRITE16_HANDLER( sound_command_w ) static WRITE16_HANDLER( sound_command_w )
{ {
COMBINE_DATA(&twin16_sound_command); COMBINE_DATA(&twin16_sound_command);
soundlatch_w( space->machine, 0, twin16_sound_command&0xff ); soundlatch_w( space, 0, twin16_sound_command&0xff );
} }
static READ16_HANDLER( twin16_sprite_status_r ) static READ16_HANDLER( twin16_sprite_status_r )

View File

@ -121,7 +121,7 @@ static WRITE8_HANDLER( vb_bankswitch_w )
static WRITE8_HANDLER( cpu_sound_command_w ) { static WRITE8_HANDLER( cpu_sound_command_w ) {
soundlatch_w( space->machine, offset, data ); soundlatch_w( space, offset, data );
cpu_set_input_line(space->machine->cpu[1], INPUT_LINE_NMI, PULSE_LINE ); cpu_set_input_line(space->machine->cpu[1], INPUT_LINE_NMI, PULSE_LINE );
} }
@ -139,8 +139,8 @@ static WRITE8_HANDLER( vb_scrollx_hi_w )
{ {
flip_screen_set(~data&1); flip_screen_set(~data&1);
vb_scrollx_hi = (data & 0x02) << 7; vb_scrollx_hi = (data & 0x02) << 7;
vb_bgprombank_w(space, (data >> 2)&0x07); vb_bgprombank_w(space->machine, (data >> 2)&0x07);
vb_spprombank_w(space, (data >> 5)&0x07); vb_spprombank_w(space->machine, (data >> 5)&0x07);
//logerror("%04x: vb_scrollx_hi = %d\n",cpu_get_previouspc(space->cpu), vb_scrollx_hi); //logerror("%04x: vb_scrollx_hi = %d\n",cpu_get_previouspc(space->cpu), vb_scrollx_hi);
} }

View File

@ -1465,7 +1465,7 @@ static WRITE32_HANDLER( vegas_watchdog_w )
static WRITE32_HANDLER( asic_fifo_w ) static WRITE32_HANDLER( asic_fifo_w )
{ {
midway_ioasic_fifo_w(space, data); midway_ioasic_fifo_w(space->machine, data);
} }
@ -1515,7 +1515,7 @@ static WRITE32_DEVICE_HANDLER( ethernet_w )
static WRITE32_HANDLER( dcs3_fifo_full_w ) static WRITE32_HANDLER( dcs3_fifo_full_w )
{ {
midway_ioasic_fifo_full_w(space, data); midway_ioasic_fifo_full_w(space->machine, data);
} }

View File

@ -186,15 +186,20 @@ static WRITE8_HANDLER( vendetta_eeprom_w )
/********************************************/ /********************************************/
static READ8_HANDLER( vendetta_K052109_r ) { return K052109_r( space->machine, offset + 0x2000 ); } static READ8_HANDLER( vendetta_K052109_r )
{
return K052109_r( space, offset + 0x2000 );
}
//static WRITE8_HANDLER( vendetta_K052109_w ) { K052109_w( machine, offset + 0x2000, data ); } //static WRITE8_HANDLER( vendetta_K052109_w ) { K052109_w( machine, offset + 0x2000, data ); }
static WRITE8_HANDLER( vendetta_K052109_w ) { static WRITE8_HANDLER( vendetta_K052109_w )
{
// ************************************************************************************* // *************************************************************************************
// * Escape Kids uses 052109's mirrored Tilemap ROM bank selector, but only during * // * Escape Kids uses 052109's mirrored Tilemap ROM bank selector, but only during *
// * Tilemap MASK-ROM Test (0x1d80<->0x3d80, 0x1e00<->0x3e00, 0x1f00<->0x3f00) * // * Tilemap MASK-ROM Test (0x1d80<->0x3d80, 0x1e00<->0x3e00, 0x1f00<->0x3f00) *
// ************************************************************************************* // *************************************************************************************
if ( ( offset == 0x1d80 ) || ( offset == 0x1e00 ) || ( offset == 0x1f00 ) ) K052109_w( space->machine, offset, data ); if ( ( offset == 0x1d80 ) || ( offset == 0x1e00 ) || ( offset == 0x1f00 ) )
K052109_w( space->machine, offset + 0x2000, data ); K052109_w( space, offset, data );
K052109_w( space, offset + 0x2000, data );
} }
static offs_t video_banking_base; static offs_t video_banking_base;

View File

@ -141,11 +141,11 @@ static WRITE32_HANDLER( epic_w )
static READ64_HANDLER(epic_64be_r) static READ64_HANDLER(epic_64be_r)
{ {
return read64be_with_32le_handler(epic_r, space->machine, offset, mem_mask); return read64be_with_32le_handler(epic_r, space, offset, mem_mask);
} }
static WRITE64_HANDLER(epic_64be_w) static WRITE64_HANDLER(epic_64be_w)
{ {
write64be_with_32le_handler(epic_w, space->machine, offset, data, mem_mask); write64be_with_32le_handler(epic_w, space, offset, data, mem_mask);
} }

View File

@ -450,9 +450,10 @@ static const ym2203_interface ym2203_config =
static MACHINE_START( xsleena ) static MACHINE_START( xsleena )
{ {
const address_space *space = cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM);
/* initialize the bank pointers */ /* initialize the bank pointers */
xainCPUA_bankswitch_w(machine,0,0); xainCPUA_bankswitch_w(space,0,0);
xainCPUB_bankswitch_w(machine,0,0); xainCPUB_bankswitch_w(space,0,0);
} }

View File

@ -55,11 +55,12 @@ VIDEO_UPDATE( yunsung8 );
static MACHINE_RESET( yunsung8 ) static MACHINE_RESET( yunsung8 )
{ {
const address_space *space = cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM);
UINT8 *RAM = memory_region(machine, "main") + 0x24000; UINT8 *RAM = memory_region(machine, "main") + 0x24000;
yunsung8_videoram_0 = RAM + 0x0000; // Ram is banked yunsung8_videoram_0 = RAM + 0x0000; // Ram is banked
yunsung8_videoram_1 = RAM + 0x2000; yunsung8_videoram_1 = RAM + 0x2000;
yunsung8_videobank_w(machine,0,0); yunsung8_videobank_w(space,0,0);
} }

View File

@ -160,9 +160,10 @@ static WRITE8_HANDLER( zaccaria_port0b_w )
static INTERRUPT_GEN( zaccaria_cb1_toggle ) static INTERRUPT_GEN( zaccaria_cb1_toggle )
{ {
const address_space *space = cpu_get_address_space(device, ADDRESS_SPACE_PROGRAM);
static int toggle; static int toggle;
pia_0_cb1_w(device->machine,0,toggle & 1); pia_0_cb1_w(space,0, toggle & 1);
toggle ^= 1; toggle ^= 1;
} }
@ -211,7 +212,8 @@ return counter;
static void tms5220_irq_handler(running_machine *machine, int state) static void tms5220_irq_handler(running_machine *machine, int state)
{ {
pia_1_cb1_w(machine,0,state ? 0 : 1); const address_space *space = cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM);
pia_1_cb1_w(space,0,state ? 0 : 1);
} }

View File

@ -933,7 +933,12 @@ static const ppi8255_interface zaxxon_ppi_intf =
}; };
static READ8_DEVICE_HANDLER( sound_latch_r ) { return soundlatch_r(device->machine, offset); } static READ8_DEVICE_HANDLER( sound_latch_r )
{
const address_space *space = cpu_get_address_space(device->machine->cpu[0], ADDRESS_SPACE_PROGRAM);
return soundlatch_r(space, offset);
}
static const ppi8255_interface congo_ppi_intf = static const ppi8255_interface congo_ppi_intf =
{ {

View File

@ -1811,7 +1811,7 @@ Notes:
static WRITE32_HANDLER( coh1002e_bank_w ) static WRITE32_HANDLER( coh1002e_bank_w )
{ {
znsecsel_w( space->machine, offset, data, mem_mask ); znsecsel_w( space, offset, data, mem_mask );
memory_set_bankptr( 1, memory_region( space->machine, "user2" ) + ( ( data & 3 ) * 0x800000 ) ); memory_set_bankptr( 1, memory_region( space->machine, "user2" ) + ( ( data & 3 ) * 0x800000 ) );
} }
@ -1916,7 +1916,7 @@ MTR-BAM* - DIP42 32MBit maskROMs
static WRITE32_HANDLER( bam2_sec_w ) static WRITE32_HANDLER( bam2_sec_w )
{ {
znsecsel_w( space->machine, offset, data, mem_mask ); znsecsel_w( space, offset, data, mem_mask );
} }
/* /*

View File

@ -5,6 +5,6 @@ extern UINT8 *taxidrvr_vram4,*taxidrvr_vram5,*taxidrvr_vram6,*taxidrvr_vram7;
extern UINT8 *taxidrvr_scroll; extern UINT8 *taxidrvr_scroll;
extern int taxidrvr_bghide; extern int taxidrvr_bghide;
WRITE8_HANDLER( taxidrvr_spritectrl_w ); WRITE8_DEVICE_HANDLER( taxidrvr_spritectrl_w );
VIDEO_UPDATE( taxidrvr ); VIDEO_UPDATE( taxidrvr );

View File

@ -9,7 +9,7 @@ int taxidrvr_bghide;
static int spritectrl[9]; static int spritectrl[9];
WRITE8_HANDLER( taxidrvr_spritectrl_w ) WRITE8_DEVICE_HANDLER( taxidrvr_spritectrl_w )
{ {
spritectrl[offset] = data; spritectrl[offset] = data;
} }