mirror of
https://github.com/holub/mame
synced 2025-05-20 20:58:51 +03:00
Fix more warnings drivers[s-z]*
This commit is contained in:
parent
1527ec9b1e
commit
a62a727e52
@ -125,7 +125,8 @@ static PALETTE_INIT( safarir )
|
||||
static TILE_GET_INFO( get_bg_tile_info )
|
||||
{
|
||||
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 */
|
||||
if (code & 0x80)
|
||||
@ -140,7 +141,9 @@ static TILE_GET_INFO( get_bg_tile_info )
|
||||
static TILE_GET_INFO( get_fg_tile_info )
|
||||
{
|
||||
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)
|
||||
color = 7; /* white */
|
||||
|
@ -1121,15 +1121,15 @@ static READ32_HANDLER( galileo_r )
|
||||
|
||||
/* unit 0 is the PCI bridge */
|
||||
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 */
|
||||
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 */
|
||||
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 */
|
||||
else
|
||||
@ -1259,15 +1259,15 @@ static WRITE32_HANDLER( galileo_w )
|
||||
|
||||
/* unit 0 is the PCI bridge */
|
||||
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 */
|
||||
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 */
|
||||
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 */
|
||||
else
|
||||
@ -1628,7 +1628,7 @@ static WRITE32_HANDLER( asic_reset_w )
|
||||
|
||||
static WRITE32_HANDLER( asic_fifo_w )
|
||||
{
|
||||
midway_ioasic_fifo_w(space, data);
|
||||
midway_ioasic_fifo_w(space->machine, data);
|
||||
}
|
||||
|
||||
|
||||
|
@ -761,7 +761,7 @@ static UINT8 vdp_data_r(struct sms_vdp *chip)
|
||||
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 */
|
||||
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;
|
||||
g = (palword & 0x00f0)>>4;
|
||||
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);
|
||||
}
|
||||
}
|
||||
@ -812,7 +812,7 @@ static void vdp_data_w(running_machine *machine, UINT8 data, struct sms_vdp* chi
|
||||
r = (data & 0x03)>>0;
|
||||
g = (data & 0x0c)>>2;
|
||||
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);
|
||||
}
|
||||
|
||||
|
@ -302,7 +302,8 @@ static WRITE8_HANDLER( coin_count_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);
|
||||
cpuexec_boost_interleave(device->machine, attotime_zero, ATTOTIME_IN_USEC(50));
|
||||
}
|
||||
|
@ -262,7 +262,8 @@ static WRITE16_HANDLER( sharrier_io_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);
|
||||
}
|
||||
|
||||
|
||||
|
@ -119,7 +119,8 @@ static const struct segaic16_memory_map_entry outrun_info[] =
|
||||
|
||||
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);
|
||||
}
|
||||
|
||||
|
@ -305,7 +305,7 @@ static WRITE16_HANDLER( standard_io_w )
|
||||
static READ16_HANDLER( misc_io_r )
|
||||
{
|
||||
if (custom_io_r)
|
||||
return (*custom_io_r)(space->machine, offset, mem_mask);
|
||||
return (*custom_io_r)(space, offset, mem_mask);
|
||||
else
|
||||
return standard_io_r(space, offset, mem_mask);
|
||||
}
|
||||
@ -314,7 +314,7 @@ static READ16_HANDLER( misc_io_r )
|
||||
static WRITE16_HANDLER( misc_io_w )
|
||||
{
|
||||
if (custom_io_w)
|
||||
(*custom_io_w)(space->machine, offset, data, mem_mask);
|
||||
(*custom_io_w)(space, offset, data, mem_mask);
|
||||
else
|
||||
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 )
|
||||
{
|
||||
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)
|
||||
{
|
||||
const address_space *space = cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM);
|
||||
/* signal a VBLANK to the main CPU */
|
||||
cpu_set_input_line(machine->cpu[0], 4, HOLD_LINE);
|
||||
|
||||
/* X scroll values */
|
||||
segaic16_textram_0_w(machine, 0xff8/2, workram[0x0d14/2], 0xffff);
|
||||
segaic16_textram_0_w(machine, 0xffa/2, workram[0x0d18/2], 0xffff);
|
||||
segaic16_textram_0_w(space, 0xff8/2, workram[0x0d14/2], 0xffff);
|
||||
segaic16_textram_0_w(space, 0xffa/2, workram[0x0d18/2], 0xffff);
|
||||
|
||||
/* page values */
|
||||
segaic16_textram_0_w(machine, 0xe9e/2, workram[0x0d1c/2], 0xffff);
|
||||
segaic16_textram_0_w(machine, 0xe9c/2, workram[0x0d1e/2], 0xffff);
|
||||
segaic16_textram_0_w(space, 0xe9e/2, workram[0x0d1c/2], 0xffff);
|
||||
segaic16_textram_0_w(space, 0xe9c/2, workram[0x0d1e/2], 0xffff);
|
||||
}
|
||||
|
||||
|
||||
|
@ -1181,7 +1181,7 @@ static WRITE16_HANDLER( standard_io_w )
|
||||
static READ16_HANDLER( misc_io_r )
|
||||
{
|
||||
if (custom_io_r)
|
||||
return (*custom_io_r)(space->machine, offset, mem_mask);
|
||||
return (*custom_io_r)(space, offset, mem_mask);
|
||||
else
|
||||
return standard_io_r(space, offset, mem_mask);
|
||||
}
|
||||
@ -1190,7 +1190,7 @@ static READ16_HANDLER( misc_io_r )
|
||||
static WRITE16_HANDLER( misc_io_w )
|
||||
{
|
||||
if (custom_io_w)
|
||||
(*custom_io_w)(space->machine, offset, data, mem_mask);
|
||||
(*custom_io_w)(space, offset, data, mem_mask);
|
||||
else
|
||||
standard_io_w(space, offset, data, mem_mask);
|
||||
}
|
||||
|
@ -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;
|
||||
|
||||
@ -466,12 +466,12 @@ static void int_control_w(running_machine *machine, int offset, UINT8 data)
|
||||
|
||||
case 6: /* mask */
|
||||
v60_irq_control[offset] = data;
|
||||
update_irq_state(machine);
|
||||
update_irq_state(space->machine);
|
||||
break;
|
||||
|
||||
case 7: /* acknowledge */
|
||||
v60_irq_control[offset] &= data;
|
||||
update_irq_state(machine);
|
||||
update_irq_state(space->machine);
|
||||
break;
|
||||
|
||||
case 8:
|
||||
@ -500,7 +500,7 @@ static void int_control_w(running_machine *machine, int offset, UINT8 data)
|
||||
case 13:
|
||||
case 14:
|
||||
case 15: /* signal IRQ to sound CPU */
|
||||
signal_sound_irq(machine, SOUND_IRQ_V60);
|
||||
signal_sound_irq(space->machine, SOUND_IRQ_V60);
|
||||
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] =
|
||||
{
|
||||
@ -609,7 +609,7 @@ static UINT16 common_io_chip_r(running_machine *machine, int which, offs_t offse
|
||||
return misc_io_data[which][offset];
|
||||
|
||||
/* 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 */
|
||||
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;
|
||||
|
||||
@ -690,7 +690,7 @@ static void common_io_chip_w(running_machine *machine, int which, offs_t offset,
|
||||
case 0x1c/2:
|
||||
system32_displayenable[which] = (data & 0x02);
|
||||
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;
|
||||
}
|
||||
}
|
||||
@ -750,7 +750,7 @@ static WRITE32_HANDLER( io_chip_1_w )
|
||||
static READ16_HANDLER( io_expansion_r )
|
||||
{
|
||||
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
|
||||
logerror("%06X:io_expansion_r(%X)\n", cpu_get_pc(space->cpu), offset);
|
||||
return 0xffff;
|
||||
@ -764,7 +764,7 @@ static WRITE16_HANDLER( io_expansion_w )
|
||||
return;
|
||||
|
||||
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
|
||||
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 )
|
||||
{
|
||||
if (custom_io_r[0])
|
||||
return (*custom_io_r[0])(space->machine, offset*2+0, mem_mask) |
|
||||
((*custom_io_r[0])(space->machine, offset*2+1, mem_mask >> 16) << 16);
|
||||
return (*custom_io_r[0])(space, offset*2+0, mem_mask) |
|
||||
((*custom_io_r[0])(space, offset*2+1, mem_mask >> 16) << 16);
|
||||
else
|
||||
logerror("%06X:io_expansion_r(%X)\n", cpu_get_pc(space->cpu), offset);
|
||||
return 0xffffffff;
|
||||
@ -787,14 +787,14 @@ static WRITE32_HANDLER( io_expansion_0_w )
|
||||
if (ACCESSING_BITS_0_7)
|
||||
{
|
||||
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
|
||||
logerror("%06X:io_expansion_w(%X) = %02X\n", cpu_get_pc(space->cpu), offset, data & 0xff);
|
||||
}
|
||||
if (ACCESSING_BITS_16_23)
|
||||
{
|
||||
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
|
||||
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 )
|
||||
{
|
||||
if (custom_io_r[1])
|
||||
return (*custom_io_r[1])(space->machine, offset*2+0, mem_mask) |
|
||||
((*custom_io_r[1])(space->machine, offset*2+1, mem_mask >> 16) << 16);
|
||||
return (*custom_io_r[1])(space, offset*2+0, mem_mask) |
|
||||
((*custom_io_r[1])(space, offset*2+1, mem_mask >> 16) << 16);
|
||||
else
|
||||
logerror("%06X:io_expansion_r(%X)\n", cpu_get_pc(space->cpu), offset);
|
||||
return 0xffffffff;
|
||||
@ -818,14 +818,14 @@ static WRITE32_HANDLER( io_expansion_1_w )
|
||||
if (ACCESSING_BITS_0_7)
|
||||
{
|
||||
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
|
||||
logerror("%06X:io_expansion_w(%X) = %02X\n", cpu_get_pc(space->cpu), offset, data & 0xff);
|
||||
}
|
||||
if (ACCESSING_BITS_16_23)
|
||||
{
|
||||
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
|
||||
logerror("%06X:io_expansion_w(%X) = %02X\n", cpu_get_pc(space->cpu), offset, data & 0xff);
|
||||
}
|
||||
|
@ -1774,7 +1774,7 @@ static WRITE16_HANDLER( usclssic_lockout_w )
|
||||
if (old_tiles_offset != seta_tiles_offset) tilemap_mark_all_tiles_dirty(ALL_TILEMAPS);
|
||||
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 )
|
||||
{
|
||||
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;
|
||||
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 )
|
||||
{
|
||||
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)
|
||||
{
|
||||
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 )
|
||||
|
@ -102,7 +102,7 @@ static WRITE8_HANDLER( shangkid_sound_enable_w )
|
||||
static WRITE8_HANDLER( shangkid_bbx_AY8910_control_w )
|
||||
{
|
||||
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 )
|
||||
@ -123,7 +123,7 @@ static WRITE8_HANDLER( chinhero_bbx_AY8910_write_w )
|
||||
break;
|
||||
|
||||
default:
|
||||
ay8910_write_port_0_w( space->machine, offset, data );
|
||||
ay8910_write_port_0_w( space, offset, data );
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -148,7 +148,7 @@ static WRITE8_HANDLER( shangkid_bbx_AY8910_write_w )
|
||||
break;
|
||||
|
||||
default:
|
||||
ay8910_write_port_0_w( space->machine, offset, data );
|
||||
ay8910_write_port_0_w( space, offset, data );
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -60,7 +60,7 @@ static WRITE8_HANDLER( shootout_bankswitch_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 );
|
||||
}
|
||||
|
||||
|
@ -916,7 +916,8 @@ static const ay8910_interface ay8910_interface_2 =
|
||||
|
||||
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 )
|
||||
|
@ -255,9 +255,9 @@ static WRITE8_HANDLER( sound_bankswitch_w )
|
||||
static WRITE16_HANDLER( slapshot_msb_sound_w )
|
||||
{
|
||||
if (offset == 0)
|
||||
taitosound_port_w (space->machine,0,(data >> 8) & 0xff);
|
||||
taitosound_port_w (space,0,(data >> 8) & 0xff);
|
||||
else if (offset == 1)
|
||||
taitosound_comm_w (space->machine,0,(data >> 8) & 0xff);
|
||||
taitosound_comm_w (space,0,(data >> 8) & 0xff);
|
||||
|
||||
#ifdef MAME_DEBUG
|
||||
if (data & 0xff)
|
||||
@ -268,7 +268,7 @@ static WRITE16_HANDLER( slapshot_msb_sound_w )
|
||||
static READ16_HANDLER( slapshot_msb_sound_r )
|
||||
{
|
||||
if (offset == 1)
|
||||
return ((taitosound_comm_r (space->machine, 0) & 0xff) << 8);
|
||||
return ((taitosound_comm_r (space, 0) & 0xff) << 8);
|
||||
else return 0;
|
||||
}
|
||||
|
||||
|
@ -111,7 +111,8 @@ static INTERRUPT_GEN( snowbros_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 */
|
||||
|
||||
@ -119,8 +120,8 @@ static INTERRUPT_GEN( snowbro3_interrupt )
|
||||
{
|
||||
if ((status&0x08)==0x00)
|
||||
{
|
||||
okim6295_data_0_w(device->machine,0,0x80|sb3_music);
|
||||
okim6295_data_0_w(device->machine,0,0x00|0x82);
|
||||
okim6295_data_0_w(space,0,0x80|sb3_music);
|
||||
okim6295_data_0_w(space,0,0x00|0x82);
|
||||
}
|
||||
|
||||
}
|
||||
@ -128,7 +129,7 @@ static INTERRUPT_GEN( snowbro3_interrupt )
|
||||
{
|
||||
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)
|
||||
{
|
||||
okim6295_data_0_w(machine,0,0x80|data);
|
||||
okim6295_data_0_w(machine,0,0x00|0x12);
|
||||
okim6295_data_0_w(space,0,0x80|data);
|
||||
okim6295_data_0_w(space,0,0x00|0x12);
|
||||
}
|
||||
else if ((status&0x02)==0x00)
|
||||
{
|
||||
okim6295_data_0_w(machine,0,0x80|data);
|
||||
okim6295_data_0_w(machine,0,0x00|0x22);
|
||||
okim6295_data_0_w(space,0,0x80|data);
|
||||
okim6295_data_0_w(space,0,0x00|0x22);
|
||||
}
|
||||
else if ((status&0x04)==0x00)
|
||||
{
|
||||
okim6295_data_0_w(machine,0,0x80|data);
|
||||
okim6295_data_0_w(machine,0,0x00|0x42);
|
||||
okim6295_data_0_w(space,0,0x80|data);
|
||||
okim6295_data_0_w(space,0,0x00|0x42);
|
||||
}
|
||||
|
||||
|
||||
@ -468,7 +469,7 @@ static WRITE16_HANDLER( sb3_sound_w )
|
||||
|
||||
if (data <= 0x21)
|
||||
{
|
||||
sb3_play_sound(space->machine, data);
|
||||
sb3_play_sound(space, data);
|
||||
}
|
||||
|
||||
if (data>=0x22 && data<=0x31)
|
||||
@ -478,7 +479,7 @@ static WRITE16_HANDLER( sb3_sound_w )
|
||||
|
||||
if ((data>=0x30) && (data<=0x51))
|
||||
{
|
||||
sb3_play_sound(space->machine, data-0x30);
|
||||
sb3_play_sound(space, data-0x30);
|
||||
}
|
||||
|
||||
if (data>=0x52 && data<=0x5f)
|
||||
|
@ -173,10 +173,11 @@ static MACHINE_START( 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 */
|
||||
spacefb_port_0_w(machine, 0, 0);
|
||||
spacefb_port_1_w(machine, 0, 0);
|
||||
spacefb_port_2_w(machine, 0, 0);
|
||||
spacefb_port_0_w(space, 0, 0);
|
||||
spacefb_port_1_w(space, 0, 0);
|
||||
spacefb_port_2_w(space, 0, 0);
|
||||
|
||||
start_interrupt_timer(machine);
|
||||
}
|
||||
|
@ -268,16 +268,17 @@ static const pia6821_interface pia_1_intf =
|
||||
|
||||
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 */
|
||||
|
||||
/* 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) */
|
||||
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) */
|
||||
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 */
|
||||
}
|
||||
@ -343,7 +344,8 @@ static const pia6821_interface pia_4_intf =
|
||||
|
||||
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);
|
||||
}
|
||||
|
||||
|
||||
|
@ -52,8 +52,9 @@ static WRITE8_HANDLER( srumbler_bankswitch_w )
|
||||
|
||||
static MACHINE_RESET( srumbler )
|
||||
{
|
||||
const address_space *space = cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM);
|
||||
/* initialize banked ROM pointers */
|
||||
srumbler_bankswitch_w(machine,0,0);
|
||||
srumbler_bankswitch_w(space,0,0);
|
||||
}
|
||||
|
||||
static INTERRUPT_GEN( srumbler_interrupt )
|
||||
|
@ -135,13 +135,14 @@ static READ16_HANDLER( deco_71_r )
|
||||
|
||||
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
|
||||
to normal orientation when the game is reset.
|
||||
I'm using the value that forces the screen to be in normal
|
||||
orientation when entering the "test mode"
|
||||
(check the game code from 0x0006b8 to 0x0006f0).
|
||||
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);
|
||||
}
|
||||
|
||||
/******************************************************************************/
|
||||
|
@ -86,7 +86,7 @@ static READ8_HANDLER( starfire_scratch_r )
|
||||
{
|
||||
/* A11 selects input ports */
|
||||
if (offset & 0x800)
|
||||
return (*input_read)(space->machine, offset);
|
||||
return (*input_read)(space, offset);
|
||||
|
||||
/* convert to a videoram offset */
|
||||
offset = (offset & 0x31f) | ((offset & 0xe0) << 5);
|
||||
|
@ -53,7 +53,7 @@ static WRITE16_HANDLER( suna16_soundlatch_w )
|
||||
{
|
||||
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);
|
||||
}
|
||||
@ -434,7 +434,8 @@ ADDRESS_MAP_END
|
||||
|
||||
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);
|
||||
}
|
||||
|
||||
|
||||
|
@ -1657,7 +1657,8 @@ static INTERRUPT_GEN( hardhea2_interrupt )
|
||||
|
||||
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 )
|
||||
|
@ -273,11 +273,12 @@ static VIDEO_UPDATE( supertnk )
|
||||
|
||||
static MACHINE_RESET( supertnk )
|
||||
{
|
||||
supertnk_bankswitch_0_w(machine, 0, 0);
|
||||
supertnk_bankswitch_1_w(machine, 0, 0);
|
||||
const address_space *space = cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM);
|
||||
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_1_w(machine, 0, 0);
|
||||
supertnk_bitplane_select_0_w(space, 0, 0);
|
||||
supertnk_bitplane_select_1_w(space, 0, 0);
|
||||
}
|
||||
|
||||
|
||||
|
@ -391,7 +391,7 @@ static WRITE16_HANDLER( sound_command_w )
|
||||
{
|
||||
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 );
|
||||
}
|
||||
}
|
||||
@ -400,7 +400,7 @@ static WRITE16_HANDLER( sound_command_nmi_w )
|
||||
{
|
||||
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);
|
||||
}
|
||||
}
|
||||
@ -1197,7 +1197,7 @@ static WRITE16_HANDLER( ga_sound_command_w )
|
||||
COMBINE_DATA( &sys16_workingram[(0xecfc-0xc000)/2] );
|
||||
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 );
|
||||
}
|
||||
}
|
||||
|
@ -187,7 +187,7 @@ static UINT8* shdancbl_soundbank_ptr = NULL; /* Pointer to currently selected p
|
||||
|
||||
static WRITE16_HANDLER( sound_command_irq_w ){
|
||||
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 );
|
||||
}
|
||||
}
|
||||
@ -321,7 +321,7 @@ ADDRESS_MAP_END
|
||||
|
||||
static WRITE16_HANDLER( sound_command_nmi_w ){
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
@ -231,7 +231,7 @@ static READ16_HANDLER( syvalion_input_bypass_r )
|
||||
return 0x00;
|
||||
|
||||
default:
|
||||
return TC0220IOC_portreg_r( space->machine,offset );
|
||||
return TC0220IOC_portreg_r( space,offset );
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1428,9 +1428,9 @@ static WRITE8_HANDLER( sound_bankswitch_w )
|
||||
static WRITE16_HANDLER( taitoz_sound_w )
|
||||
{
|
||||
if (offset == 0)
|
||||
taitosound_port_w (space->machine, 0, data & 0xff);
|
||||
taitosound_port_w (space, 0, data & 0xff);
|
||||
else if (offset == 1)
|
||||
taitosound_comm_w (space->machine, 0, data & 0xff);
|
||||
taitosound_comm_w (space, 0, data & 0xff);
|
||||
|
||||
#ifdef MAME_DEBUG
|
||||
// if (data & 0xff00)
|
||||
@ -1446,7 +1446,7 @@ static WRITE16_HANDLER( taitoz_sound_w )
|
||||
static READ16_HANDLER( taitoz_sound_r )
|
||||
{
|
||||
if (offset == 1)
|
||||
return ((taitosound_comm_r (space->machine,0) & 0xff));
|
||||
return ((taitosound_comm_r (space,0) & 0xff));
|
||||
else return 0;
|
||||
}
|
||||
|
||||
@ -1494,7 +1494,7 @@ static WRITE8_HANDLER( taitoz_pancontrol )
|
||||
static WRITE16_HANDLER( spacegun_pancontrol )
|
||||
{
|
||||
if (ACCESSING_BITS_0_7)
|
||||
taitoz_pancontrol(space->machine, offset, data & 0xff);
|
||||
taitoz_pancontrol(space, offset, data & 0xff);
|
||||
}
|
||||
|
||||
|
||||
|
@ -418,13 +418,13 @@ static const struct dma8237_interface dma8237_2_config =
|
||||
|
||||
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)
|
||||
{
|
||||
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);
|
||||
}
|
||||
|
||||
|
||||
|
@ -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( p2b_w ) { taxidrvr_spritectrl_w(device->machine,1,data); }
|
||||
static WRITE8_DEVICE_HANDLER( p2c_w ) { taxidrvr_spritectrl_w(device->machine,2,data); }
|
||||
static WRITE8_DEVICE_HANDLER( p3a_w ) { taxidrvr_spritectrl_w(device->machine,3,data); }
|
||||
static WRITE8_DEVICE_HANDLER( p3b_w ) { taxidrvr_spritectrl_w(device->machine,4,data); }
|
||||
static WRITE8_DEVICE_HANDLER( p3c_w ) { taxidrvr_spritectrl_w(device->machine,5,data); }
|
||||
static WRITE8_DEVICE_HANDLER( p4a_w ) { taxidrvr_spritectrl_w(device->machine,6,data); }
|
||||
static WRITE8_DEVICE_HANDLER( p4b_w ) { taxidrvr_spritectrl_w(device->machine,7,data); }
|
||||
static WRITE8_DEVICE_HANDLER( p4c_w ) { taxidrvr_spritectrl_w(device->machine,8,data); }
|
||||
static WRITE8_DEVICE_HANDLER( p2a_w ) { taxidrvr_spritectrl_w(device,0,data); }
|
||||
static WRITE8_DEVICE_HANDLER( p2b_w ) { taxidrvr_spritectrl_w(device,1,data); }
|
||||
static WRITE8_DEVICE_HANDLER( p2c_w ) { taxidrvr_spritectrl_w(device,2,data); }
|
||||
static WRITE8_DEVICE_HANDLER( p3a_w ) { taxidrvr_spritectrl_w(device,3,data); }
|
||||
static WRITE8_DEVICE_HANDLER( p3b_w ) { taxidrvr_spritectrl_w(device,4,data); }
|
||||
static WRITE8_DEVICE_HANDLER( p3c_w ) { taxidrvr_spritectrl_w(device,5,data); }
|
||||
static WRITE8_DEVICE_HANDLER( p4a_w ) { taxidrvr_spritectrl_w(device,6,data); }
|
||||
static WRITE8_DEVICE_HANDLER( p4b_w ) { taxidrvr_spritectrl_w(device,7,data); }
|
||||
static WRITE8_DEVICE_HANDLER( p4c_w ) { taxidrvr_spritectrl_w(device,8,data); }
|
||||
|
||||
|
||||
|
||||
|
@ -288,7 +288,7 @@ static READ16_HANDLER( sound_r )
|
||||
{
|
||||
if (ACCESSING_BITS_0_7)
|
||||
{
|
||||
return soundlatch2_r( space->machine, 0 );
|
||||
return soundlatch2_r( space, 0 );
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
@ -112,8 +112,8 @@ static WRITE16_HANDLER( tetrisp2_sound_w )
|
||||
{
|
||||
if (ACCESSING_BITS_0_7)
|
||||
{
|
||||
if (offset) ymz280b_data_0_w (space->machine, offset, data & 0xff);
|
||||
else ymz280b_register_0_w (space->machine, offset, data & 0xff);
|
||||
if (offset) ymz280b_data_0_w (space, offset, data & 0xff);
|
||||
else ymz280b_register_0_w (space, offset, data & 0xff);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -126,6 +126,8 @@ static DRIVER_INIT( tiamc1 )
|
||||
|
||||
static MACHINE_RESET( tiamc1 )
|
||||
{
|
||||
const address_space *space = cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM);
|
||||
|
||||
memset(video_ram, 0, 0x3040);
|
||||
|
||||
tiamc1_charram = video_ram + 0x0800; /* Ram is banked */
|
||||
@ -136,7 +138,7 @@ static MACHINE_RESET( tiamc1 )
|
||||
tiamc1_spriteram_n = video_ram + 0x3020;
|
||||
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);
|
||||
}
|
||||
|
@ -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 };
|
||||
|
||||
static void f1dream_protection_w(running_machine *machine)
|
||||
static void f1dream_protection_w(const address_space *space)
|
||||
{
|
||||
int indx;
|
||||
int value = 255;
|
||||
int prevpc = cpu_get_previouspc(machine->activecpu);
|
||||
int prevpc = cpu_get_previouspc(space->machine->activecpu);
|
||||
|
||||
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))
|
||||
{
|
||||
/* 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]);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -860,7 +860,7 @@ INLINE UINT32 tmnt2_get_word(UINT32 addr)
|
||||
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;
|
||||
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))
|
||||
{
|
||||
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;
|
||||
@ -985,11 +985,11 @@ static WRITE16_HANDLER( tmnt2_1c0800_w )
|
||||
xoffs += xmod;
|
||||
yoffs += ymod;
|
||||
|
||||
tmnt2_put_word(space->machine, dst_addr + 0, attr1);
|
||||
tmnt2_put_word(space->machine, dst_addr + 2, code);
|
||||
tmnt2_put_word(space->machine, dst_addr + 4, (UINT32)yoffs);
|
||||
tmnt2_put_word(space->machine, dst_addr + 6, (UINT32)xoffs);
|
||||
tmnt2_put_word(space->machine, dst_addr + 12, attr2 | color);
|
||||
tmnt2_put_word(space, dst_addr + 0, attr1);
|
||||
tmnt2_put_word(space, dst_addr + 2, code);
|
||||
tmnt2_put_word(space, dst_addr + 4, (UINT32)yoffs);
|
||||
tmnt2_put_word(space, dst_addr + 6, (UINT32)xoffs);
|
||||
tmnt2_put_word(space, dst_addr + 12, attr2 | color);
|
||||
}
|
||||
#else // for reference; do not remove
|
||||
static WRITE16_HANDLER( tmnt2_1c0800_w )
|
||||
@ -2356,9 +2356,10 @@ MACHINE_DRIVER_END
|
||||
|
||||
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 */
|
||||
upd7759_0_start_w(machine, 0, 0);
|
||||
upd7759_0_reset_w(machine, 0, 1);
|
||||
upd7759_0_start_w(space, 0, 0);
|
||||
upd7759_0_reset_w(space, 0, 1);
|
||||
}
|
||||
|
||||
static MACHINE_DRIVER_START( tmnt )
|
||||
|
@ -843,7 +843,7 @@ static WRITE16_HANDLER( dogyuun_snd_cpu_w )
|
||||
if (ACCESSING_BITS_0_7)
|
||||
{
|
||||
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);
|
||||
}
|
||||
@ -862,7 +862,7 @@ static WRITE16_HANDLER( kbash_snd_cpu_w )
|
||||
{
|
||||
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);
|
||||
}
|
||||
@ -899,7 +899,7 @@ static WRITE16_HANDLER( fixeight_sec_cpu_w )
|
||||
if (mcu_data & 0xff00)
|
||||
{
|
||||
mcu_data = (mcu_data & 0xff00) | (data & 0xff);
|
||||
fixeight_okisnd_w(space, data);
|
||||
fixeight_okisnd_w(space->machine, data);
|
||||
}
|
||||
else if (mcu_data == 0xff00)
|
||||
{
|
||||
@ -943,7 +943,7 @@ static WRITE16_HANDLER( batsugun_snd_cpu_w )
|
||||
if (ACCESSING_BITS_0_7)
|
||||
{
|
||||
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));
|
||||
}
|
||||
|
@ -45,7 +45,7 @@ VIDEO_UPDATE( trucocl );
|
||||
|
||||
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;
|
||||
|
@ -195,8 +195,9 @@ static MACHINE_RESET( trvquest )
|
||||
|
||||
static INTERRUPT_GEN( trvquest_interrupt )
|
||||
{
|
||||
via_2_ca1_w(device->machine,0,1);
|
||||
via_2_ca1_w(device->machine,0,0);
|
||||
const address_space *space = cpu_get_address_space(device, ADDRESS_SPACE_PROGRAM);
|
||||
via_2_ca1_w(space,0,1);
|
||||
via_2_ca1_w(space,0,0);
|
||||
}
|
||||
|
||||
static MACHINE_DRIVER_START( trvquest )
|
||||
|
@ -382,7 +382,7 @@ static READ8_HANDLER( vsgongf_a100_r ){
|
||||
}
|
||||
|
||||
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 );
|
||||
}
|
||||
|
||||
|
@ -126,7 +126,7 @@ static READ16_HANDLER( twin16_gfx_rom2_r )
|
||||
static WRITE16_HANDLER( sound_command_w )
|
||||
{
|
||||
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 )
|
||||
|
@ -121,7 +121,7 @@ static WRITE8_HANDLER( vb_bankswitch_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 );
|
||||
}
|
||||
|
||||
@ -139,8 +139,8 @@ static WRITE8_HANDLER( vb_scrollx_hi_w )
|
||||
{
|
||||
flip_screen_set(~data&1);
|
||||
vb_scrollx_hi = (data & 0x02) << 7;
|
||||
vb_bgprombank_w(space, (data >> 2)&0x07);
|
||||
vb_spprombank_w(space, (data >> 5)&0x07);
|
||||
vb_bgprombank_w(space->machine, (data >> 2)&0x07);
|
||||
vb_spprombank_w(space->machine, (data >> 5)&0x07);
|
||||
//logerror("%04x: vb_scrollx_hi = %d\n",cpu_get_previouspc(space->cpu), vb_scrollx_hi);
|
||||
}
|
||||
|
||||
|
@ -1465,7 +1465,7 @@ static WRITE32_HANDLER( vegas_watchdog_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 )
|
||||
{
|
||||
midway_ioasic_fifo_full_w(space, data);
|
||||
midway_ioasic_fifo_full_w(space->machine, data);
|
||||
}
|
||||
|
||||
|
||||
|
@ -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 ) {
|
||||
static WRITE8_HANDLER( vendetta_K052109_w )
|
||||
{
|
||||
// *************************************************************************************
|
||||
// * Escape Kids uses 052109's mirrored Tilemap ROM bank selector, but only during *
|
||||
// * Tilemap MASK-ROM Test (0x1d80<->0x3d80, 0x1e00<->0x3e00, 0x1f00<->0x3f00) *
|
||||
// *************************************************************************************
|
||||
if ( ( offset == 0x1d80 ) || ( offset == 0x1e00 ) || ( offset == 0x1f00 ) ) K052109_w( space->machine, offset, data );
|
||||
K052109_w( space->machine, offset + 0x2000, data );
|
||||
if ( ( offset == 0x1d80 ) || ( offset == 0x1e00 ) || ( offset == 0x1f00 ) )
|
||||
K052109_w( space, offset, data );
|
||||
K052109_w( space, offset + 0x2000, data );
|
||||
}
|
||||
|
||||
static offs_t video_banking_base;
|
||||
|
@ -141,11 +141,11 @@ static WRITE32_HANDLER( epic_w )
|
||||
|
||||
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)
|
||||
{
|
||||
write64be_with_32le_handler(epic_w, space->machine, offset, data, mem_mask);
|
||||
write64be_with_32le_handler(epic_w, space, offset, data, mem_mask);
|
||||
}
|
||||
|
||||
|
||||
|
@ -450,9 +450,10 @@ static const ym2203_interface ym2203_config =
|
||||
|
||||
static MACHINE_START( xsleena )
|
||||
{
|
||||
const address_space *space = cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM);
|
||||
/* initialize the bank pointers */
|
||||
xainCPUA_bankswitch_w(machine,0,0);
|
||||
xainCPUB_bankswitch_w(machine,0,0);
|
||||
xainCPUA_bankswitch_w(space,0,0);
|
||||
xainCPUB_bankswitch_w(space,0,0);
|
||||
}
|
||||
|
||||
|
||||
|
@ -55,11 +55,12 @@ VIDEO_UPDATE( 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;
|
||||
|
||||
yunsung8_videoram_0 = RAM + 0x0000; // Ram is banked
|
||||
yunsung8_videoram_1 = RAM + 0x2000;
|
||||
yunsung8_videobank_w(machine,0,0);
|
||||
yunsung8_videobank_w(space,0,0);
|
||||
}
|
||||
|
||||
|
||||
|
@ -160,9 +160,10 @@ static WRITE8_HANDLER( zaccaria_port0b_w )
|
||||
|
||||
static INTERRUPT_GEN( zaccaria_cb1_toggle )
|
||||
{
|
||||
const address_space *space = cpu_get_address_space(device, ADDRESS_SPACE_PROGRAM);
|
||||
static int toggle;
|
||||
|
||||
pia_0_cb1_w(device->machine,0,toggle & 1);
|
||||
pia_0_cb1_w(space,0, toggle & 1);
|
||||
toggle ^= 1;
|
||||
}
|
||||
|
||||
@ -211,7 +212,8 @@ return counter;
|
||||
|
||||
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);
|
||||
}
|
||||
|
||||
|
||||
|
@ -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 =
|
||||
{
|
||||
|
@ -1811,7 +1811,7 @@ Notes:
|
||||
|
||||
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 ) );
|
||||
}
|
||||
@ -1916,7 +1916,7 @@ MTR-BAM* - DIP42 32MBit maskROMs
|
||||
|
||||
static WRITE32_HANDLER( bam2_sec_w )
|
||||
{
|
||||
znsecsel_w( space->machine, offset, data, mem_mask );
|
||||
znsecsel_w( space, offset, data, mem_mask );
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -5,6 +5,6 @@ extern UINT8 *taxidrvr_vram4,*taxidrvr_vram5,*taxidrvr_vram6,*taxidrvr_vram7;
|
||||
extern UINT8 *taxidrvr_scroll;
|
||||
extern int taxidrvr_bghide;
|
||||
|
||||
WRITE8_HANDLER( taxidrvr_spritectrl_w );
|
||||
WRITE8_DEVICE_HANDLER( taxidrvr_spritectrl_w );
|
||||
|
||||
VIDEO_UPDATE( taxidrvr );
|
||||
|
@ -9,7 +9,7 @@ int taxidrvr_bghide;
|
||||
static int spritectrl[9];
|
||||
|
||||
|
||||
WRITE8_HANDLER( taxidrvr_spritectrl_w )
|
||||
WRITE8_DEVICE_HANDLER( taxidrvr_spritectrl_w )
|
||||
{
|
||||
spritectrl[offset] = data;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user