A few more number-to-tag conversions in CPU calls

This commit is contained in:
Fabio Priuli 2009-04-27 09:16:08 +00:00
parent 64a5e34b3f
commit 5d4816b665
54 changed files with 206 additions and 209 deletions

View File

@ -100,11 +100,11 @@ static WRITE8_DEVICE_HANDLER( arcadia_cia_0_porta_w )
/* swap the write handlers between ROM and bank 1 based on the bit */ /* swap the write handlers between ROM and bank 1 based on the bit */
if ((data & 1) == 0) if ((data & 1) == 0)
/* overlay disabled, map RAM on 0x000000 */ /* overlay disabled, map RAM on 0x000000 */
memory_install_write16_handler(cpu_get_address_space(device->machine->cpu[0], ADDRESS_SPACE_PROGRAM), 0x000000, 0x07ffff, 0, 0, (write16_space_func)SMH_BANK(1)); memory_install_write16_handler(cputag_get_address_space(device->machine, "maincpu", ADDRESS_SPACE_PROGRAM), 0x000000, 0x07ffff, 0, 0, (write16_space_func)SMH_BANK(1));
else else
/* overlay enabled, map Amiga system ROM on 0x000000 */ /* overlay enabled, map Amiga system ROM on 0x000000 */
memory_install_write16_handler(cpu_get_address_space(device->machine->cpu[0], ADDRESS_SPACE_PROGRAM), 0x000000, 0x07ffff, 0, 0, (write16_space_func)SMH_UNMAP); memory_install_write16_handler(cputag_get_address_space(device->machine, "maincpu", ADDRESS_SPACE_PROGRAM), 0x000000, 0x07ffff, 0, 0, (write16_space_func)SMH_UNMAP);
/* bit 2 = Power Led on Amiga */ /* bit 2 = Power Led on Amiga */
set_led_status(0, (data & 2) ? 0 : 1); set_led_status(0, (data & 2) ? 0 : 1);

View File

@ -651,7 +651,7 @@ static DRIVER_INIT( ataxx )
leland_rotate_memory(machine, "slave"); leland_rotate_memory(machine, "slave");
/* set up additional input ports */ /* set up additional input ports */
memory_install_read8_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_IO), 0x00, 0x03, 0, 0, ataxx_trackball_r); memory_install_read8_handler(cputag_get_address_space(machine, "master", ADDRESS_SPACE_IO), 0x00, 0x03, 0, 0, ataxx_trackball_r);
} }
@ -674,7 +674,7 @@ static DRIVER_INIT( ataxxj )
leland_rotate_memory(machine, "slave"); leland_rotate_memory(machine, "slave");
/* set up additional input ports */ /* set up additional input ports */
memory_install_read8_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_IO), 0x00, 0x03, 0, 0, ataxx_trackball_r); memory_install_read8_handler(cputag_get_address_space(machine, "master", ADDRESS_SPACE_IO), 0x00, 0x03, 0, 0, ataxx_trackball_r);
} }
@ -697,9 +697,9 @@ static DRIVER_INIT( wsf )
leland_rotate_memory(machine, "slave"); leland_rotate_memory(machine, "slave");
/* set up additional input ports */ /* set up additional input ports */
memory_install_read_port_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_IO), 0x0d, 0x0d, 0, 0, "P1_P2"); memory_install_read_port_handler(cputag_get_address_space(machine, "master", ADDRESS_SPACE_IO), 0x0d, 0x0d, 0, 0, "P1_P2");
memory_install_read_port_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_IO), 0x0e, 0x0e, 0, 0, "P3_P4"); memory_install_read_port_handler(cputag_get_address_space(machine, "master", ADDRESS_SPACE_IO), 0x0e, 0x0e, 0, 0, "P3_P4");
memory_install_read_port_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_IO), 0x0f, 0x0f, 0, 0, "BUTTONS"); memory_install_read_port_handler(cputag_get_address_space(machine, "master", ADDRESS_SPACE_IO), 0x0f, 0x0f, 0, 0, "BUTTONS");
} }
@ -722,14 +722,14 @@ static DRIVER_INIT( indyheat )
leland_rotate_memory(machine, "slave"); leland_rotate_memory(machine, "slave");
/* set up additional input ports */ /* set up additional input ports */
memory_install_read8_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_IO), 0x00, 0x02, 0, 0, indyheat_wheel_r); memory_install_read8_handler(cputag_get_address_space(machine, "master", ADDRESS_SPACE_IO), 0x00, 0x02, 0, 0, indyheat_wheel_r);
memory_install_read8_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_IO), 0x08, 0x0b, 0, 0, indyheat_analog_r); memory_install_read8_handler(cputag_get_address_space(machine, "master", ADDRESS_SPACE_IO), 0x08, 0x0b, 0, 0, indyheat_analog_r);
memory_install_read_port_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_IO), 0x0d, 0x0d, 0, 0, "P1"); memory_install_read_port_handler(cputag_get_address_space(machine, "master", ADDRESS_SPACE_IO), 0x0d, 0x0d, 0, 0, "P1");
memory_install_read_port_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_IO), 0x0e, 0x0e, 0, 0, "P2"); memory_install_read_port_handler(cputag_get_address_space(machine, "master", ADDRESS_SPACE_IO), 0x0e, 0x0e, 0, 0, "P2");
memory_install_read_port_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_IO), 0x0f, 0x0f, 0, 0, "P3"); memory_install_read_port_handler(cputag_get_address_space(machine, "master", ADDRESS_SPACE_IO), 0x0f, 0x0f, 0, 0, "P3");
/* set up additional output ports */ /* set up additional output ports */
memory_install_write8_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_IO), 0x08, 0x0b, 0, 0, indyheat_analog_w); memory_install_write8_handler(cputag_get_address_space(machine, "master", ADDRESS_SPACE_IO), 0x08, 0x0b, 0, 0, indyheat_analog_w);
} }
@ -752,9 +752,9 @@ static DRIVER_INIT( brutforc )
leland_rotate_memory(machine, "slave"); leland_rotate_memory(machine, "slave");
/* set up additional input ports */ /* set up additional input ports */
memory_install_read_port_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_IO), 0x0d, 0x0d, 0, 0, "P2"); memory_install_read_port_handler(cputag_get_address_space(machine, "master", ADDRESS_SPACE_IO), 0x0d, 0x0d, 0, 0, "P2");
memory_install_read_port_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_IO), 0x0e, 0x0e, 0, 0, "P1"); memory_install_read_port_handler(cputag_get_address_space(machine, "master", ADDRESS_SPACE_IO), 0x0e, 0x0e, 0, 0, "P1");
memory_install_read_port_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_IO), 0x0f, 0x0f, 0, 0, "P3"); memory_install_read_port_handler(cputag_get_address_space(machine, "master", ADDRESS_SPACE_IO), 0x0f, 0x0f, 0, 0, "P3");
} }
@ -777,13 +777,13 @@ static DRIVER_INIT( asylum )
leland_rotate_memory(machine, "slave"); leland_rotate_memory(machine, "slave");
/* asylum appears to have some extra RAM for the slave CPU */ /* asylum appears to have some extra RAM for the slave CPU */
memory_install_readwrite8_handler(cpu_get_address_space(machine->cpu[1], ADDRESS_SPACE_PROGRAM), 0xf000, 0xfffb, 0, 0, (read8_space_func)SMH_BANK(4), (write8_space_func)SMH_BANK(4)); memory_install_readwrite8_handler(cputag_get_address_space(machine, "slave", ADDRESS_SPACE_PROGRAM), 0xf000, 0xfffb, 0, 0, (read8_space_func)SMH_BANK(4), (write8_space_func)SMH_BANK(4));
memory_set_bankptr(machine, 4, auto_alloc_array(machine, UINT8, 0x1000)); memory_set_bankptr(machine, 4, auto_alloc_array(machine, UINT8, 0x1000));
/* set up additional input ports */ /* set up additional input ports */
memory_install_read_port_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_IO), 0x0d, 0x0d, 0, 0, "P2"); memory_install_read_port_handler(cputag_get_address_space(machine, "master", ADDRESS_SPACE_IO), 0x0d, 0x0d, 0, 0, "P2");
memory_install_read_port_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_IO), 0x0e, 0x0e, 0, 0, "P1"); memory_install_read_port_handler(cputag_get_address_space(machine, "master", ADDRESS_SPACE_IO), 0x0e, 0x0e, 0, 0, "P1");
memory_install_read_port_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_IO), 0x0f, 0x0f, 0, 0, "P3"); memory_install_read_port_handler(cputag_get_address_space(machine, "master", ADDRESS_SPACE_IO), 0x0f, 0x0f, 0, 0, "P3");
} }

View File

@ -666,9 +666,9 @@ static DRIVER_INIT( backfire )
deco56_decrypt_gfx(machine, "gfx1"); /* 141 */ deco56_decrypt_gfx(machine, "gfx1"); /* 141 */
deco56_decrypt_gfx(machine, "gfx2"); /* 141 */ deco56_decrypt_gfx(machine, "gfx2"); /* 141 */
deco156_decrypt(machine); deco156_decrypt(machine);
cpu_set_clockscale(machine->cpu[0], 4.0f); /* core timings aren't accurate */ cpu_set_clockscale(cputag_get_cpu(machine, "maincpu"), 4.0f); /* core timings aren't accurate */
descramble_sound(machine); descramble_sound(machine);
memory_install_read32_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM), 0x0170018, 0x017001b, 0, 0, backfire_speedup_r ); memory_install_read32_handler(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), 0x0170018, 0x017001b, 0, 0, backfire_speedup_r );
} }
GAME( 1995, backfire, 0, backfire, backfire, backfire, ROT0, "Data East Corporation", "Backfire! (set 1)", 0 ) GAME( 1995, backfire, 0, backfire, backfire, backfire, ROT0, "Data East Corporation", "Backfire! (set 1)", 0 )

View File

@ -2068,48 +2068,48 @@ static DRIVER_INIT( minigol2 ) { expand_roms(machine, 0x0c); balsente_sho
static DRIVER_INIT( toggle ) { expand_roms(machine, EXPAND_ALL); balsente_shooter = 0; /* noanalog */ } static DRIVER_INIT( toggle ) { expand_roms(machine, EXPAND_ALL); balsente_shooter = 0; /* noanalog */ }
static DRIVER_INIT( nametune ) static DRIVER_INIT( nametune )
{ {
const address_space *space = cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM); const address_space *space = cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM);
memory_install_write8_handler(space, 0x9f00, 0x9f00, 0, 0, balsente_rombank2_select_w); memory_install_write8_handler(space, 0x9f00, 0x9f00, 0, 0, balsente_rombank2_select_w);
expand_roms(machine, EXPAND_NONE | SWAP_HALVES); balsente_shooter = 0; /* noanalog */ expand_roms(machine, EXPAND_NONE | SWAP_HALVES); balsente_shooter = 0; /* noanalog */
} }
static DRIVER_INIT( nstocker ) static DRIVER_INIT( nstocker )
{ {
const address_space *space = cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM); const address_space *space = cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM);
memory_install_write8_handler(space, 0x9f00, 0x9f00, 0, 0, balsente_rombank2_select_w); memory_install_write8_handler(space, 0x9f00, 0x9f00, 0, 0, balsente_rombank2_select_w);
expand_roms(machine, EXPAND_NONE | SWAP_HALVES); balsente_shooter = 1; balsente_adc_shift = 1; expand_roms(machine, EXPAND_NONE | SWAP_HALVES); balsente_shooter = 1; balsente_adc_shift = 1;
} }
static DRIVER_INIT( sfootbal ) static DRIVER_INIT( sfootbal )
{ {
const address_space *space = cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM); const address_space *space = cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM);
memory_install_write8_handler(space, 0x9f00, 0x9f00, 0, 0, balsente_rombank2_select_w); memory_install_write8_handler(space, 0x9f00, 0x9f00, 0, 0, balsente_rombank2_select_w);
expand_roms(machine, EXPAND_ALL | SWAP_HALVES); balsente_shooter = 0; balsente_adc_shift = 0; expand_roms(machine, EXPAND_ALL | SWAP_HALVES); balsente_shooter = 0; balsente_adc_shift = 0;
} }
static DRIVER_INIT( spiker ) static DRIVER_INIT( spiker )
{ {
const address_space *space = cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM); const address_space *space = cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM);
memory_install_readwrite8_handler(space, 0x9f80, 0x9f8f, 0, 0, spiker_expand_r, spiker_expand_w); memory_install_readwrite8_handler(space, 0x9f80, 0x9f8f, 0, 0, spiker_expand_r, spiker_expand_w);
memory_install_write8_handler(space, 0x9f00, 0x9f00, 0, 0, balsente_rombank2_select_w); memory_install_write8_handler(space, 0x9f00, 0x9f00, 0, 0, balsente_rombank2_select_w);
expand_roms(machine, EXPAND_ALL | SWAP_HALVES); balsente_shooter = 0; balsente_adc_shift = 1; expand_roms(machine, EXPAND_ALL | SWAP_HALVES); balsente_shooter = 0; balsente_adc_shift = 1;
} }
static DRIVER_INIT( stompin ) static DRIVER_INIT( stompin )
{ {
const address_space *space = cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM); const address_space *space = cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM);
memory_install_write8_handler(space, 0x9f00, 0x9f00, 0, 0, balsente_rombank2_select_w); memory_install_write8_handler(space, 0x9f00, 0x9f00, 0, 0, balsente_rombank2_select_w);
expand_roms(machine, 0x0c | SWAP_HALVES); balsente_shooter = 0; balsente_adc_shift = 32; expand_roms(machine, 0x0c | SWAP_HALVES); balsente_shooter = 0; balsente_adc_shift = 32;
} }
static DRIVER_INIT( rescraid ) { expand_roms(machine, EXPAND_NONE); balsente_shooter = 0; /* noanalog */ } static DRIVER_INIT( rescraid ) { expand_roms(machine, EXPAND_NONE); balsente_shooter = 0; /* noanalog */ }
static DRIVER_INIT( grudge ) static DRIVER_INIT( grudge )
{ {
const address_space *space = cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM); const address_space *space = cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM);
memory_install_read8_handler(space, 0x9400, 0x9400, 0, 0, grudge_steering_r); memory_install_read8_handler(space, 0x9400, 0x9400, 0, 0, grudge_steering_r);
expand_roms(machine, EXPAND_NONE); balsente_shooter = 0; expand_roms(machine, EXPAND_NONE); balsente_shooter = 0;
} }
static DRIVER_INIT( shrike ) static DRIVER_INIT( shrike )
{ {
const address_space *space = cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM); const address_space *space = cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM);
memory_install_readwrite8_handler(space, 0x9e00, 0x9fff, 0, 0, shrike_shared_6809_r, shrike_shared_6809_w); memory_install_readwrite8_handler(space, 0x9e00, 0x9fff, 0, 0, shrike_shared_6809_r, shrike_shared_6809_w);
memory_install_write8_handler(space, 0x9e01, 0x9e01, 0, 0, shrike_sprite_select_w ); memory_install_write8_handler(space, 0x9e01, 0x9e01, 0, 0, shrike_sprite_select_w );
memory_install_readwrite16_handler(cpu_get_address_space(machine->cpu[2], ADDRESS_SPACE_PROGRAM), 0x10000, 0x1001f, 0, 0, shrike_io_68k_r, shrike_io_68k_w); memory_install_readwrite16_handler(cputag_get_address_space(machine, "68k", ADDRESS_SPACE_PROGRAM), 0x10000, 0x1001f, 0, 0, shrike_io_68k_r, shrike_io_68k_w);
expand_roms(machine, EXPAND_ALL); balsente_shooter = 0; balsente_adc_shift = 32; expand_roms(machine, EXPAND_ALL); balsente_shooter = 0; balsente_adc_shift = 32;
} }

View File

@ -170,7 +170,7 @@ static WRITE8_HANDLER( baraduke_lamps_w )
static WRITE8_HANDLER( baraduke_irq_ack_w ) static WRITE8_HANDLER( baraduke_irq_ack_w )
{ {
cpu_set_input_line(space->machine->cpu[0], 0, CLEAR_LINE); cputag_set_input_line(space->machine, "maincpu", 0, CLEAR_LINE);
} }

View File

@ -43,8 +43,8 @@ static UINT16 latch_data;
static void update_interrupts(running_machine *machine) static void update_interrupts(running_machine *machine)
{ {
cpu_set_input_line(machine->cpu[0], 4, atarigen_scanline_int_state ? ASSERT_LINE : CLEAR_LINE); cputag_set_input_line(machine, "maincpu", 4, atarigen_scanline_int_state ? ASSERT_LINE : CLEAR_LINE);
cpu_set_input_line(machine->cpu[0], 6, atarigen_sound_int_state ? ASSERT_LINE : CLEAR_LINE); cputag_set_input_line(machine, "maincpu", 6, atarigen_sound_int_state ? ASSERT_LINE : CLEAR_LINE);
} }
@ -103,9 +103,9 @@ static WRITE16_HANDLER( latch_w )
/* bit 4 is connected to the /RESET pin on the 6502 */ /* bit 4 is connected to the /RESET pin on the 6502 */
if (latch_data & 0x0010) if (latch_data & 0x0010)
cpu_set_input_line(space->machine->cpu[1], INPUT_LINE_RESET, CLEAR_LINE); cputag_set_input_line(space->machine, "jsa", INPUT_LINE_RESET, CLEAR_LINE);
else else
cpu_set_input_line(space->machine->cpu[1], INPUT_LINE_RESET, ASSERT_LINE); cputag_set_input_line(space->machine, "jsa", INPUT_LINE_RESET, ASSERT_LINE);
/* alpha bank is selected by the upper 4 bits */ /* alpha bank is selected by the upper 4 bits */
if ((oldword ^ latch_data) & 0x7000) if ((oldword ^ latch_data) & 0x7000)

View File

@ -59,8 +59,8 @@ static WRITE8_HANDLER( battlane_cpu_command_w )
/* /*
if (~battlane_cpu_control & 0x08) if (~battlane_cpu_control & 0x08)
{ {
cpu_set_input_line(space->machine->cpu[0], INPUT_LINE_NMI, PULSE_LINE); cputag_set_input_line(space->machine, "maincpu", INPUT_LINE_NMI, PULSE_LINE);
cpu_set_input_line(space->machine->cpu[1], INPUT_LINE_NMI, PULSE_LINE); cputag_set_input_line(space->machine, "sub", INPUT_LINE_NMI, PULSE_LINE);
} }
*/ */
@ -68,7 +68,7 @@ static WRITE8_HANDLER( battlane_cpu_command_w )
CPU2's SWI will trigger an 6809 IRQ on the master by resetting 0x04 CPU2's SWI will trigger an 6809 IRQ on the master by resetting 0x04
Master will respond by setting the bit back again Master will respond by setting the bit back again
*/ */
cpu_set_input_line(space->machine->cpu[0], M6809_IRQ_LINE, data & 0x04 ? CLEAR_LINE : HOLD_LINE); cputag_set_input_line(space->machine, "maincpu", M6809_IRQ_LINE, data & 0x04 ? CLEAR_LINE : HOLD_LINE);
/* /*
Slave function call (e.g. ROM test): Slave function call (e.g. ROM test):
@ -86,7 +86,7 @@ static WRITE8_HANDLER( battlane_cpu_command_w )
FA96: 27 FA BEQ $FA92 ; Wait for bit to be set FA96: 27 FA BEQ $FA92 ; Wait for bit to be set
*/ */
cpu_set_input_line(space->machine->cpu[1], M6809_IRQ_LINE, data & 0x02 ? CLEAR_LINE : HOLD_LINE); cputag_set_input_line(space->machine, "sub", M6809_IRQ_LINE, data & 0x02 ? CLEAR_LINE : HOLD_LINE);
} }
static ADDRESS_MAP_START( battlane_map, ADDRESS_SPACE_PROGRAM, 8 ) static ADDRESS_MAP_START( battlane_map, ADDRESS_SPACE_PROGRAM, 8 )
@ -110,7 +110,7 @@ static INTERRUPT_GEN( battlane_cpu1_interrupt )
if (~battlane_cpu_control & 0x08) if (~battlane_cpu_control & 0x08)
{ {
cpu_set_input_line(device, INPUT_LINE_NMI, PULSE_LINE); cpu_set_input_line(device, INPUT_LINE_NMI, PULSE_LINE);
cpu_set_input_line(device->machine->cpu[1], INPUT_LINE_NMI, PULSE_LINE); cputag_set_input_line(device->machine, "sub", INPUT_LINE_NMI, PULSE_LINE);
} }
} }
@ -242,7 +242,7 @@ GFXDECODE_END
static void irqhandler(const device_config *device, int irq) static void irqhandler(const device_config *device, int irq)
{ {
cpu_set_input_line(device->machine->cpu[0], M6809_FIRQ_LINE, irq ? ASSERT_LINE : CLEAR_LINE); cputag_set_input_line(device->machine, "maincpu", M6809_FIRQ_LINE, irq ? ASSERT_LINE : CLEAR_LINE);
} }
static const ym3526_interface ym3526_config = static const ym3526_interface ym3526_config =

View File

@ -46,9 +46,10 @@ static int control_port_select;
static WRITE8_HANDLER( battlera_sound_w ) static WRITE8_HANDLER( battlera_sound_w )
{ {
if (offset==0) { if (offset == 0)
{
soundlatch_w(space,0,data); soundlatch_w(space,0,data);
cpu_set_input_line(space->machine->cpu[1], 0, HOLD_LINE); cputag_set_input_line(space->machine, "audiocpu", 0, HOLD_LINE);
} }
} }
@ -61,7 +62,8 @@ static WRITE8_HANDLER( control_data_w )
static READ8_HANDLER( control_data_r ) static READ8_HANDLER( control_data_r )
{ {
switch (control_port_select) { switch (control_port_select)
{
case 0xfe: return input_port_read(space->machine, "IN0"); /* Player 1 */ case 0xfe: return input_port_read(space->machine, "IN0"); /* Player 1 */
case 0xfd: return input_port_read(space->machine, "IN1"); /* Player 2 */ case 0xfd: return input_port_read(space->machine, "IN1"); /* Player 2 */
case 0xfb: return input_port_read(space->machine, "IN2"); /* Coins */ case 0xfb: return input_port_read(space->machine, "IN2"); /* Coins */
@ -100,21 +102,21 @@ static void battlera_adpcm_int(const device_config *device)
static int toggle; static int toggle;
msm5205_data_w(device,msm5205next >> 4); msm5205_data_w(device,msm5205next >> 4);
msm5205next<<=4; msm5205next <<= 4;
toggle = 1 - toggle; toggle = 1 - toggle;
if (toggle) if (toggle)
cpu_set_input_line(device->machine->cpu[1], 1, HOLD_LINE); cputag_set_input_line(device->machine, "audiocpu", 1, HOLD_LINE);
} }
static WRITE8_HANDLER( battlera_adpcm_data_w ) static WRITE8_HANDLER( battlera_adpcm_data_w )
{ {
msm5205next=data; msm5205next = data;
} }
static WRITE8_DEVICE_HANDLER( battlera_adpcm_reset_w ) static WRITE8_DEVICE_HANDLER( battlera_adpcm_reset_w )
{ {
msm5205_reset_w(device,0); msm5205_reset_w(device, 0);
} }
static ADDRESS_MAP_START( sound_map, ADDRESS_SPACE_PROGRAM, 8 ) static ADDRESS_MAP_START( sound_map, ADDRESS_SPACE_PROGRAM, 8 )

View File

@ -30,7 +30,7 @@ static INTERRUPT_GEN( battlnts_interrupt )
static WRITE8_HANDLER( battlnts_sh_irqtrigger_w ) static WRITE8_HANDLER( battlnts_sh_irqtrigger_w )
{ {
cpu_set_input_line_and_vector(space->machine->cpu[1], 0, HOLD_LINE, 0xff); cputag_set_input_line_and_vector(space->machine, "audiocpu", 0, HOLD_LINE, 0xff);
} }
static WRITE8_HANDLER( battlnts_bankswitch_w ) static WRITE8_HANDLER( battlnts_bankswitch_w )

View File

@ -264,7 +264,7 @@ static WRITE16_HANDLER( sound_cpu_w )
if (ACCESSING_BITS_0_7) if (ACCESSING_BITS_0_7)
{ {
soundlatch_w(space, 0, data&0xff); soundlatch_w(space, 0, data&0xff);
cpu_set_input_line(space->machine->cpu[1], INPUT_LINE_NMI, PULSE_LINE); cputag_set_input_line(space->machine, "audiocpu", INPUT_LINE_NMI, PULSE_LINE);
} }
} }
@ -636,7 +636,7 @@ GFXDECODE_END
static void sound_irq( const device_config *device, int irq ) static void sound_irq( const device_config *device, int irq )
{ {
cpu_set_input_line(device->machine->cpu[1],0,irq ? ASSERT_LINE : CLEAR_LINE); cputag_set_input_line(device->machine, "audiocpu", 0, irq ? ASSERT_LINE : CLEAR_LINE);
} }
static const ym2608_interface ym2608_config = static const ym2608_interface ym2608_config =
@ -692,7 +692,7 @@ static NVRAM_HANDLER( bbusters )
static VIDEO_EOF( bbuster ) static VIDEO_EOF( bbuster )
{ {
const address_space *space = cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM); const address_space *space = cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM);
buffer_spriteram16_w(space,0,0,0xffff); buffer_spriteram16_w(space,0,0,0xffff);
buffer_spriteram16_2_w(space,0,0,0xffff); buffer_spriteram16_2_w(space,0,0,0xffff);
@ -700,7 +700,7 @@ static VIDEO_EOF( bbuster )
static VIDEO_EOF( mechatt ) static VIDEO_EOF( mechatt )
{ {
const address_space *space = cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM); const address_space *space = cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM);
buffer_spriteram16_w(space,0,0,0xffff); buffer_spriteram16_w(space,0,0,0xffff);
} }

View File

@ -82,7 +82,7 @@ static TIMER_CALLBACK( interrupt_callback )
int next_interrupt_number; int next_interrupt_number;
int next_vpos; int next_vpos;
cpu_set_input_line(machine->cpu[0], 0, HOLD_LINE); cputag_set_input_line(machine, "maincpu", 0, HOLD_LINE);
/* set up for next interrupt */ /* set up for next interrupt */
next_interrupt_number = (interrupt_number + 1) % INTERRUPTS_PER_FRAME; next_interrupt_number = (interrupt_number + 1) % INTERRUPTS_PER_FRAME;

View File

@ -144,7 +144,7 @@ static TIMER_CALLBACK( scanline_callback )
/* on scanline zero, clear any halt condition */ /* on scanline zero, clear any halt condition */
if (scanline == 0) if (scanline == 0)
cpu_set_input_line(machine->cpu[0], INPUT_LINE_HALT, CLEAR_LINE); cputag_set_input_line(machine, "maincpu", INPUT_LINE_HALT, CLEAR_LINE);
/* wrap around at 262 */ /* wrap around at 262 */
scanline++; scanline++;
@ -204,7 +204,7 @@ static void update_interrupts(running_machine *machine)
{ {
irq_line_state = gen_int; irq_line_state = gen_int;
// if (irq_line_state != CLEAR_LINE) // if (irq_line_state != CLEAR_LINE)
cpu_set_input_line(machine->cpu[0], ASAP_IRQ0, irq_line_state); cputag_set_input_line(machine, "maincpu", ASAP_IRQ0, irq_line_state);
// else // else
// asap_set_irq_line(ASAP_IRQ0, irq_line_state); // asap_set_irq_line(ASAP_IRQ0, irq_line_state);
} }
@ -299,7 +299,7 @@ static WRITE32_HANDLER( sound_data_w )
static WRITE32_HANDLER( sound_reset_w ) static WRITE32_HANDLER( sound_reset_w )
{ {
logerror("Sound reset = %d\n", !offset); logerror("Sound reset = %d\n", !offset);
cpu_set_input_line(space->machine->cpu[1], INPUT_LINE_RESET, offset ? CLEAR_LINE : ASSERT_LINE); cputag_set_input_line(space->machine, "jsa", INPUT_LINE_RESET, offset ? CLEAR_LINE : ASSERT_LINE);
} }
@ -514,8 +514,8 @@ static DRIVER_INIT( beathead )
atarijsa_init(machine, "IN2", 0x0040); atarijsa_init(machine, "IN2", 0x0040);
/* prepare the speedups */ /* prepare the speedups */
speedup_data = memory_install_read32_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM), 0x00000ae8, 0x00000aeb, 0, 0, speedup_r); speedup_data = memory_install_read32_handler(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), 0x00000ae8, 0x00000aeb, 0, 0, speedup_r);
movie_speedup_data = memory_install_read32_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM), 0x00000804, 0x00000807, 0, 0, movie_speedup_r); movie_speedup_data = memory_install_read32_handler(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), 0x00000804, 0x00000807, 0, 0, movie_speedup_r);
} }

View File

@ -160,7 +160,7 @@ static TIMER_CALLBACK( irq_callback )
/* set the IRQ line if enabled */ /* set the IRQ line if enabled */
if (irq_enabled) if (irq_enabled)
cpu_set_input_line_and_vector(machine->cpu[0], 0, HOLD_LINE, 0xfc); cputag_set_input_line_and_vector(machine, "maincpu", 0, HOLD_LINE, 0xfc);
/* set up for next interrupt */ /* set up for next interrupt */
next_irq_number = (irq_number + 1) % IRQS_PER_FRAME; next_irq_number = (irq_number + 1) % IRQS_PER_FRAME;
@ -237,7 +237,7 @@ static TIMER_CALLBACK( nmi_callback )
/* pulse the NMI line if enabled */ /* pulse the NMI line if enabled */
if (nmi_enabled) if (nmi_enabled)
cpu_set_input_line(machine->cpu[0], INPUT_LINE_NMI, PULSE_LINE); cputag_set_input_line(machine, "maincpu", INPUT_LINE_NMI, PULSE_LINE);
/* set up for next interrupt */ /* set up for next interrupt */
next_nmi_number = (nmi_number + 1) % NMIS_PER_FRAME; next_nmi_number = (nmi_number + 1) % NMIS_PER_FRAME;
@ -533,7 +533,7 @@ static READ8_HANDLER( berzerk_audio_r )
static SOUND_RESET(berzerk) static SOUND_RESET(berzerk)
{ {
const address_space *space = cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_IO); const address_space *space = cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_IO);
/* clears the flip-flop controlling the volume and freq on the speech chip */ /* clears the flip-flop controlling the volume and freq on the speech chip */
berzerk_audio_w(space, 4, 0x40); berzerk_audio_w(space, 4, 0x40);
} }

View File

@ -131,7 +131,7 @@ static void update_irqs(running_machine *machine)
if (newstate != irq_state) if (newstate != irq_state)
{ {
irq_state = newstate; irq_state = newstate;
cpu_set_input_line(machine->cpu[0], 0, irq_state ? ASSERT_LINE : CLEAR_LINE); cputag_set_input_line(machine, "maincpu", 0, irq_state ? ASSERT_LINE : CLEAR_LINE);
} }
} }
@ -1617,7 +1617,7 @@ static WRITE_LINE_DEVICE_HANDLER( m6809_acia_tx_w )
static WRITE_LINE_DEVICE_HANDLER( m6809_data_irq ) static WRITE_LINE_DEVICE_HANDLER( m6809_data_irq )
{ {
cpu_set_input_line(device->machine->cpu[1], M6809_IRQ_LINE, state ? CLEAR_LINE : ASSERT_LINE); cputag_set_input_line(device->machine, "audiocpu", M6809_IRQ_LINE, state ? CLEAR_LINE : ASSERT_LINE);
} }
static ACIA6850_INTERFACE( m6809_acia_if ) static ACIA6850_INTERFACE( m6809_acia_if )

View File

@ -180,7 +180,7 @@ static INTERRUPT_GEN( timer_irq )
sc1_Inputs[2] = input_port_read(device->machine,"STROBE0"); sc1_Inputs[2] = input_port_read(device->machine,"STROBE0");
generic_pulse_irq_line(device->machine->cpu[0], M6809_IRQ_LINE); generic_pulse_irq_line(cputag_get_cpu(device->machine, "maincpu"), M6809_IRQ_LINE);
} }
} }
@ -277,7 +277,7 @@ static WRITE8_HANDLER( mmtr_w )
if ( changed & (1 << i) ) if ( changed & (1 << i) )
{ {
Mechmtr_update(i, cycles, data & (1 << i) ); Mechmtr_update(i, cycles, data & (1 << i) );
generic_pulse_irq_line(space->machine->cpu[0], M6809_FIRQ_LINE); generic_pulse_irq_line(cputag_get_cpu(space->machine, "maincpu"), M6809_FIRQ_LINE);
} }
} }
} }
@ -371,7 +371,7 @@ static void send_to_adder(running_machine *machine, int data)
adder2_sc2data = data; // store data adder2_sc2data = data; // store data
adder2_acia_triggered = 1; // set flag, acia IRQ triggered adder2_acia_triggered = 1; // set flag, acia IRQ triggered
cpu_set_input_line(machine->cpu[1], M6809_IRQ_LINE, ASSERT_LINE );//HOLD_LINE);// trigger IRQ cputag_set_input_line(machine, "adder2", M6809_IRQ_LINE, ASSERT_LINE );//HOLD_LINE);// trigger IRQ
} }
/////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////

View File

@ -266,7 +266,7 @@ static void send_to_adder(running_machine *machine, int data)
adder2_sc2data = data; adder2_sc2data = data;
adder2_acia_triggered = 1; adder2_acia_triggered = 1;
cpu_set_input_line(machine->cpu[1], M6809_IRQ_LINE, HOLD_LINE ); cputag_set_input_line(machine, "adder2", M6809_IRQ_LINE, HOLD_LINE );
LOG_SERIAL(("sadder %02X (%c)\n",data, data )); LOG_SERIAL(("sadder %02X (%c)\n",data, data ));
} }
@ -614,7 +614,7 @@ static WRITE8_HANDLER( mmtr_w )
} }
} }
} }
if ( data & 0x1F ) cpu_set_input_line(space->machine->cpu[0], M6809_FIRQ_LINE, ASSERT_LINE ); if ( data & 0x1F ) cputag_set_input_line(space->machine, "maincpu", M6809_FIRQ_LINE, ASSERT_LINE );
} }
/////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////

View File

@ -226,7 +226,7 @@ static WRITE8_HANDLER( mmtr_w )
for (i=0; i<8; i++) for (i=0; i<8; i++)
if ( changed & (1 << i) ) Mechmtr_update(i, cycles, data & (1 << i) ); if ( changed & (1 << i) ) Mechmtr_update(i, cycles, data & (1 << i) );
if ( data ) generic_pulse_irq_line(space->machine->cpu[0], M6809_FIRQ_LINE); if ( data ) generic_pulse_irq_line(cputag_get_cpu(space->machine, "maincpu"), M6809_FIRQ_LINE);
} }
/////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////

View File

@ -71,7 +71,7 @@
static void big10_vdp_interrupt(running_machine *machine, int i) static void big10_vdp_interrupt(running_machine *machine, int i)
{ {
cpu_set_input_line (machine->cpu[0], 0, (i ? HOLD_LINE : CLEAR_LINE)); cputag_set_input_line (machine, "maincpu", 0, (i ? HOLD_LINE : CLEAR_LINE));
} }
static INTERRUPT_GEN( big10_interrupt ) static INTERRUPT_GEN( big10_interrupt )

View File

@ -117,14 +117,14 @@ static READ8_HANDLER(soundstate_r)
static TIMER_CALLBACK( nmi_callback ) static TIMER_CALLBACK( nmi_callback )
{ {
if (sound_nmi_enable) cpu_set_input_line(machine->cpu[2],INPUT_LINE_NMI,PULSE_LINE); if (sound_nmi_enable) cputag_set_input_line(machine, "audiocpu", INPUT_LINE_NMI, PULSE_LINE);
else pending_nmi = 1; else pending_nmi = 1;
sound_state &= ~1; sound_state &= ~1;
} }
static WRITE8_HANDLER( sound_command_w ) /* write to port 20 clears bit 0 in status */ static WRITE8_HANDLER( sound_command_w ) /* write to port 20 clears bit 0 in status */
{ {
for_sound = data; for_sound = data;
timer_call_after_resynch(space->machine, NULL, data,nmi_callback); timer_call_after_resynch(space->machine, NULL, data, nmi_callback);
} }
static READ8_HANDLER( sound_command_r ) /* read from D800 sets bit 0 in status */ static READ8_HANDLER( sound_command_r ) /* read from D800 sets bit 0 in status */
@ -143,7 +143,7 @@ static WRITE8_HANDLER( nmi_enable_w )
sound_nmi_enable = 1; sound_nmi_enable = 1;
if (pending_nmi) if (pending_nmi)
{ {
cpu_set_input_line(space->machine->cpu[2],INPUT_LINE_NMI,PULSE_LINE); cputag_set_input_line(space->machine, "audiocpu", INPUT_LINE_NMI, PULSE_LINE);
pending_nmi = 0; pending_nmi = 0;
} }
} }

View File

@ -274,8 +274,8 @@ static VIDEO_UPDATE( bigfghtr )
static VIDEO_EOF( bigfghtr ) static VIDEO_EOF( bigfghtr )
{ {
const address_space *space = cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM); const address_space *space = cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM);
buffer_spriteram16_w(space,0,0,0xffff); buffer_spriteram16_w(space, 0, 0, 0xffff);
} }
@ -624,4 +624,3 @@ ROM_END
GAME( 1989, skyrobo, 0, bigfghtr, bigfghtr, skyrobo, ROT0, "Nichibutsu", "Sky Robo",GAME_NOT_WORKING | GAME_UNEMULATED_PROTECTION) GAME( 1989, skyrobo, 0, bigfghtr, bigfghtr, skyrobo, ROT0, "Nichibutsu", "Sky Robo",GAME_NOT_WORKING | GAME_UNEMULATED_PROTECTION)
GAME( 1989, bigfghtr, skyrobo, bigfghtr, bigfghtr, bigfghtr, ROT0, "Nichibutsu", "Tatakae! Big Fighter",GAME_NOT_WORKING | GAME_UNEMULATED_PROTECTION) GAME( 1989, bigfghtr, skyrobo, bigfghtr, bigfghtr, bigfghtr, ROT0, "Nichibutsu", "Tatakae! Big Fighter",GAME_NOT_WORKING | GAME_UNEMULATED_PROTECTION)

View File

@ -77,7 +77,7 @@ static READ8_HANDLER( sound_test_r )
static WRITE16_HANDLER( main_sound_latch_w ) static WRITE16_HANDLER( main_sound_latch_w )
{ {
soundlatch_w(space,0,data&0xff); soundlatch_w(space,0,data&0xff);
cpu_set_input_line(space->machine->cpu[1],INPUT_LINE_NMI,PULSE_LINE); cputag_set_input_line(space->machine, "soundcpu", INPUT_LINE_NMI, PULSE_LINE);
} }
#endif #endif
@ -180,4 +180,3 @@ ROM_START( bingoc )
ROM_END ROM_END
GAME( 1989, bingoc, 0, bingoc, bingoc, 0, ROT0, "Sega", "Bingo Circus (Rev. A 891001)", GAME_NOT_WORKING ) GAME( 1989, bingoc, 0, bingoc, bingoc, 0, ROT0, "Sega", "Bingo Circus (Rev. A 891001)", GAME_NOT_WORKING )

View File

@ -285,9 +285,9 @@ static MACHINE_RESET( bishi )
static void sound_irq_gen(const device_config *device, int state) static void sound_irq_gen(const device_config *device, int state)
{ {
if (state) if (state)
cpu_set_input_line(device->machine->cpu[0], M68K_IRQ_1, ASSERT_LINE); cputag_set_input_line(device->machine, "maincpu", M68K_IRQ_1, ASSERT_LINE);
else else
cpu_set_input_line(device->machine->cpu[0], M68K_IRQ_1, CLEAR_LINE); cputag_set_input_line(device->machine, "maincpu", M68K_IRQ_1, CLEAR_LINE);
} }
static const ymz280b_interface ymz280b_intf = static const ymz280b_interface ymz280b_intf =

View File

@ -818,7 +818,7 @@ static INTERRUPT_GEN( bishjan_interrupt )
generic_pulse_irq_line(device, 0); generic_pulse_irq_line(device, 0);
break; break;
default: default:
cpu_set_input_line(device->machine->cpu[0], H8_METRO_TIMER_HACK, HOLD_LINE); cputag_set_input_line(device->machine, "maincpu", H8_METRO_TIMER_HACK, HOLD_LINE);
break; break;
} }
} }

View File

@ -70,7 +70,7 @@ static WRITE8_HANDLER( bking_soundlatch_w )
if (data & (1 << i)) code |= 0x80 >> i; if (data & (1 << i)) code |= 0x80 >> i;
soundlatch_w(space,offset,code); soundlatch_w(space,offset,code);
if (sndnmi_enable) cpu_set_input_line(space->machine->cpu[1], INPUT_LINE_NMI, PULSE_LINE); if (sndnmi_enable) cputag_set_input_line(space->machine, "audiocpu", INPUT_LINE_NMI, PULSE_LINE);
} }
static WRITE8_HANDLER( bking3_addr_l_w ) static WRITE8_HANDLER( bking3_addr_l_w )
@ -199,7 +199,7 @@ static WRITE8_HANDLER( bking3_68705_portB_w )
if (~data & 0x02) if (~data & 0x02)
{ {
portA_in = from_main; portA_in = from_main;
if (main_sent) cpu_set_input_line(space->machine->cpu[2],0,CLEAR_LINE); if (main_sent) cputag_set_input_line(space->machine, "mcu", 0, CLEAR_LINE);
main_sent = 0; main_sent = 0;
} }

View File

@ -91,7 +91,7 @@ static WRITE8_HANDLER( bladestl_bankswitch_w )
static WRITE8_HANDLER( bladestl_sh_irqtrigger_w ) static WRITE8_HANDLER( bladestl_sh_irqtrigger_w )
{ {
soundlatch_w(space, offset, data); soundlatch_w(space, offset, data);
cpu_set_input_line(space->machine->cpu[1], M6809_IRQ_LINE, HOLD_LINE); cputag_set_input_line(space->machine, "audiocpu", M6809_IRQ_LINE, HOLD_LINE);
//logerror("(sound) write %02x\n", data); //logerror("(sound) write %02x\n", data);
} }

View File

@ -228,7 +228,7 @@ GFXDECODE_END
/* handler called by the 2203 emulator when the internal timers cause an IRQ */ /* handler called by the 2203 emulator when the internal timers cause an IRQ */
static void irqhandler(const device_config *device, int irq) static void irqhandler(const device_config *device, int irq)
{ {
cpu_set_input_line(device->machine->cpu[1],0,irq ? ASSERT_LINE : CLEAR_LINE); cputag_set_input_line(device->machine, "audiocpu", 0, irq ? ASSERT_LINE : CLEAR_LINE);
} }
static const ym2203_interface ym2203_config = static const ym2203_interface ym2203_config =

View File

@ -62,7 +62,7 @@ static WRITE8_HANDLER( bankedram_w )
static WRITE8_HANDLER( blockhl_sh_irqtrigger_w ) static WRITE8_HANDLER( blockhl_sh_irqtrigger_w )
{ {
cpu_set_input_line_and_vector(space->machine->cpu[1], 0, HOLD_LINE, 0xff); cputag_set_input_line_and_vector(space->machine, "audiocpu", 0, HOLD_LINE, 0xff);
} }
@ -274,7 +274,7 @@ static MACHINE_RESET( blockhl )
{ {
UINT8 *RAM = memory_region(machine, "maincpu"); UINT8 *RAM = memory_region(machine, "maincpu");
konami_configure_set_lines(machine->cpu[0], blockhl_banking); konami_configure_set_lines(cputag_get_cpu(machine, "maincpu"), blockhl_banking);
paletteram = &RAM[0x18000]; paletteram = &RAM[0x18000];
} }

View File

@ -41,7 +41,7 @@ static WRITE16_HANDLER( blockout_sound_command_w )
if (ACCESSING_BITS_0_7) if (ACCESSING_BITS_0_7)
{ {
soundlatch_w(space,offset,data & 0xff); soundlatch_w(space,offset,data & 0xff);
cpu_set_input_line(space->machine->cpu[1], INPUT_LINE_NMI, PULSE_LINE); cputag_set_input_line(space->machine, "audiocpu", INPUT_LINE_NMI, PULSE_LINE);
} }
} }
@ -171,7 +171,7 @@ INPUT_PORTS_END
/* handler called by the 2151 emulator when the internal timers cause an IRQ */ /* handler called by the 2151 emulator when the internal timers cause an IRQ */
static void blockout_irq_handler(const device_config *device, int irq) static void blockout_irq_handler(const device_config *device, int irq)
{ {
cpu_set_input_line_and_vector(device->machine->cpu[1],0,irq ? ASSERT_LINE : CLEAR_LINE,0xff); cputag_set_input_line_and_vector(device->machine, "audiocpu", 0, irq ? ASSERT_LINE : CLEAR_LINE, 0xff);
} }
static const ym2151_interface ym2151_config = static const ym2151_interface ym2151_config =

View File

@ -33,9 +33,9 @@
static void update_interrupts(running_machine *machine) static void update_interrupts(running_machine *machine)
{ {
cpu_set_input_line(machine->cpu[0], 1, atarigen_scanline_int_state ? ASSERT_LINE : CLEAR_LINE); cputag_set_input_line(machine, "maincpu", 1, atarigen_scanline_int_state ? ASSERT_LINE : CLEAR_LINE);
cpu_set_input_line(machine->cpu[0], 2, atarigen_video_int_state ? ASSERT_LINE : CLEAR_LINE); cputag_set_input_line(machine, "maincpu", 2, atarigen_video_int_state ? ASSERT_LINE : CLEAR_LINE);
cpu_set_input_line(machine->cpu[0], 4, atarigen_sound_int_state ? ASSERT_LINE : CLEAR_LINE); cputag_set_input_line(machine, "maincpu", 4, atarigen_sound_int_state ? ASSERT_LINE : CLEAR_LINE);
} }

View File

@ -86,7 +86,7 @@ static READ8_HANDLER( blueprnt_sh_dipsw_r )
static WRITE8_HANDLER( blueprnt_sound_command_w ) static WRITE8_HANDLER( blueprnt_sound_command_w )
{ {
soundlatch_w(space, offset, data); soundlatch_w(space, offset, data);
cpu_set_input_line(space->machine->cpu[1], INPUT_LINE_NMI, PULSE_LINE); cputag_set_input_line(space->machine, "audiocpu", INPUT_LINE_NMI, PULSE_LINE);
} }
static WRITE8_HANDLER( blueprnt_coin_counter_w ) static WRITE8_HANDLER( blueprnt_coin_counter_w )

View File

@ -1290,14 +1290,14 @@ static IRQ_CALLBACK(irq_callback)
static void irq_init(running_machine *machine) static void irq_init(running_machine *machine)
{ {
irqreq = 0; irqreq = 0;
cpu_set_input_line(machine->cpu[0], 0, CLEAR_LINE); cputag_set_input_line(machine, "maincpu", 0, CLEAR_LINE);
cpu_set_irq_callback(machine->cpu[0], irq_callback); cpu_set_irq_callback(cputag_get_cpu(machine, "maincpu"), irq_callback);
} }
static void irq_raise(running_machine *machine, int level) static void irq_raise(running_machine *machine, int level)
{ {
irqreq |= (1<<level); irqreq |= (1<<level);
cpu_set_input_line(machine->cpu[0], 0, ASSERT_LINE); cputag_set_input_line(machine, "maincpu", 0, ASSERT_LINE);
} }

View File

@ -279,7 +279,7 @@ GFXDECODE_END
static void sound_irq(const device_config *device, int state) static void sound_irq(const device_config *device, int state)
{ {
cpu_set_input_line(device->machine->cpu[1],1,state); /* IRQ 2 */ cputag_set_input_line(device->machine, "audiocpu", 1, state); /* IRQ 2 */
} }
static WRITE8_DEVICE_HANDLER( sound_bankswitch_w ) static WRITE8_DEVICE_HANDLER( sound_bankswitch_w )

View File

@ -102,7 +102,7 @@ static WRITE8_HANDLER( bottom9_1f90_w )
static WRITE8_HANDLER( bottom9_sh_irqtrigger_w ) static WRITE8_HANDLER( bottom9_sh_irqtrigger_w )
{ {
cpu_set_input_line_and_vector(space->machine->cpu[1],0,HOLD_LINE,0xff); cputag_set_input_line_and_vector(space->machine, "audiocpu", 0, HOLD_LINE, 0xff);
} }
static int nmienable; static int nmienable;

View File

@ -27,7 +27,7 @@ static TIMER_CALLBACK( pot_interrupt )
int mask = param; int mask = param;
if (pot_latch & mask) if (pot_latch & mask)
cpu_set_input_line(machine->cpu[0], INPUT_LINE_NMI, ASSERT_LINE); cputag_set_input_line(machine, "maincpu", INPUT_LINE_NMI, ASSERT_LINE);
pot_state |= mask; pot_state |= mask;
} }
@ -37,7 +37,7 @@ static TIMER_CALLBACK( periodic_callback )
{ {
int scanline = param; int scanline = param;
cpu_set_input_line(machine->cpu[0], 0, ASSERT_LINE); cputag_set_input_line(machine, "maincpu", 0, ASSERT_LINE);
if (scanline == 0) if (scanline == 0)
{ {
@ -149,13 +149,13 @@ static WRITE8_HANDLER( boxer_pot_w )
pot_latch = data & 0x3f; pot_latch = data & 0x3f;
cpu_set_input_line(space->machine->cpu[0], INPUT_LINE_NMI, CLEAR_LINE); cputag_set_input_line(space->machine, "maincpu", INPUT_LINE_NMI, CLEAR_LINE);
} }
static WRITE8_HANDLER( boxer_irq_reset_w ) static WRITE8_HANDLER( boxer_irq_reset_w )
{ {
cpu_set_input_line(space->machine->cpu[0], 0, CLEAR_LINE); cputag_set_input_line(space->machine, "maincpu", 0, CLEAR_LINE);
} }

View File

@ -72,29 +72,29 @@ VIDEO_UPDATE( brkthru );
static WRITE8_HANDLER( brkthru_1803_w ) static WRITE8_HANDLER( brkthru_1803_w )
{ {
/* bit 0 = NMI enable */ /* bit 0 = NMI enable */
cpu_interrupt_enable(space->machine->cpu[0], ~data & 1); cpu_interrupt_enable(cputag_get_cpu(space->machine, "maincpu"), ~data & 1);
/* bit 1 = ? maybe IRQ acknowledge */ /* bit 1 = ? maybe IRQ acknowledge */
} }
static WRITE8_HANDLER( darwin_0803_w ) static WRITE8_HANDLER( darwin_0803_w )
{ {
/* bit 0 = NMI enable */ /* bit 0 = NMI enable */
/*cpu_interrupt_enable(space->machine->cpu[1], ~data & 1);*/ /*cpu_interrupt_enable(cputag_get_cpu(space->machine, "audiocpu"), ~data & 1);*/
logerror("0803 %02X\n",data); logerror("0803 %02X\n",data);
cpu_interrupt_enable(space->machine->cpu[0], data & 1); cpu_interrupt_enable(cputag_get_cpu(space->machine, "maincpu"), data & 1);
/* bit 1 = ? maybe IRQ acknowledge */ /* bit 1 = ? maybe IRQ acknowledge */
} }
static WRITE8_HANDLER( brkthru_soundlatch_w ) static WRITE8_HANDLER( brkthru_soundlatch_w )
{ {
soundlatch_w(space,offset,data); soundlatch_w(space,offset,data);
cpu_set_input_line(space->machine->cpu[1],INPUT_LINE_NMI,PULSE_LINE); cputag_set_input_line(space->machine, "audiocpu", INPUT_LINE_NMI, PULSE_LINE);
} }
static INPUT_CHANGED( coin_inserted ) static INPUT_CHANGED( coin_inserted )
{ {
/* coin insertion causes an IRQ */ /* coin insertion causes an IRQ */
cpu_set_input_line(field->port->machine->cpu[0], 0, newval ? CLEAR_LINE : ASSERT_LINE); cputag_set_input_line(field->port->machine, "maincpu", 0, newval ? CLEAR_LINE : ASSERT_LINE);
} }
@ -324,7 +324,7 @@ GFXDECODE_END
/* handler called by the 3812 emulator when the internal timers cause an IRQ */ /* handler called by the 3812 emulator when the internal timers cause an IRQ */
static void irqhandler(const device_config *device, int linestate) static void irqhandler(const device_config *device, int linestate)
{ {
cpu_set_input_line(device->machine->cpu[1],M6809_IRQ_LINE,linestate); cputag_set_input_line(device->machine, "audiocpu", M6809_IRQ_LINE, linestate);
} }
static const ym3526_interface ym3526_config = static const ym3526_interface ym3526_config =

View File

@ -185,7 +185,7 @@ static WRITE8_HANDLER( audio_nmi_enable_w )
if (audio_nmi_enable_type == AUDIO_ENABLE_DIRECT) if (audio_nmi_enable_type == AUDIO_ENABLE_DIRECT)
{ {
audio_nmi_enabled = data & 1; audio_nmi_enabled = data & 1;
cpu_set_input_line(space->machine->cpu[1], INPUT_LINE_NMI, (audio_nmi_enabled && audio_nmi_state) ? ASSERT_LINE : CLEAR_LINE); cputag_set_input_line(space->machine, "audiocpu", INPUT_LINE_NMI, (audio_nmi_enabled && audio_nmi_state) ? ASSERT_LINE : CLEAR_LINE);
} }
} }
@ -195,7 +195,7 @@ static WRITE8_DEVICE_HANDLER( ay_audio_nmi_enable_w )
if (audio_nmi_enable_type == AUDIO_ENABLE_AY8910) if (audio_nmi_enable_type == AUDIO_ENABLE_AY8910)
{ {
audio_nmi_enabled = ~data & 1; audio_nmi_enabled = ~data & 1;
cpu_set_input_line(device->machine->cpu[1], INPUT_LINE_NMI, (audio_nmi_enabled && audio_nmi_state) ? ASSERT_LINE : CLEAR_LINE); cputag_set_input_line(device->machine, "audiocpu", INPUT_LINE_NMI, (audio_nmi_enabled && audio_nmi_state) ? ASSERT_LINE : CLEAR_LINE);
} }
} }
@ -203,7 +203,7 @@ static TIMER_DEVICE_CALLBACK( audio_nmi_gen )
{ {
int scanline = param; int scanline = param;
audio_nmi_state = scanline & 8; audio_nmi_state = scanline & 8;
cpu_set_input_line(timer->machine->cpu[1], INPUT_LINE_NMI, (audio_nmi_enabled && audio_nmi_state) ? ASSERT_LINE : CLEAR_LINE); cputag_set_input_line(timer->machine, "audiocpu", INPUT_LINE_NMI, (audio_nmi_enabled && audio_nmi_state) ? ASSERT_LINE : CLEAR_LINE);
} }
@ -524,30 +524,30 @@ ADDRESS_MAP_END
static INPUT_CHANGED( coin_inserted_irq_hi ) static INPUT_CHANGED( coin_inserted_irq_hi )
{ {
if (newval) if (newval)
cpu_set_input_line(field->port->machine->cpu[0], 0, HOLD_LINE); cputag_set_input_line(field->port->machine, "maincpu", 0, HOLD_LINE);
} }
static INPUT_CHANGED( coin_inserted_irq_lo ) static INPUT_CHANGED( coin_inserted_irq_lo )
{ {
if (!newval) if (!newval)
cpu_set_input_line(field->port->machine->cpu[0], 0, HOLD_LINE); cputag_set_input_line(field->port->machine, "maincpu", 0, HOLD_LINE);
} }
static INPUT_CHANGED( coin_inserted_nmi_lo ) static INPUT_CHANGED( coin_inserted_nmi_lo )
{ {
cpu_set_input_line(field->port->machine->cpu[0], INPUT_LINE_NMI, newval ? CLEAR_LINE : ASSERT_LINE); cputag_set_input_line(field->port->machine, "maincpu", INPUT_LINE_NMI, newval ? CLEAR_LINE : ASSERT_LINE);
} }
static WRITE8_HANDLER( audio_command_w ) static WRITE8_HANDLER( audio_command_w )
{ {
soundlatch_w(space,offset,data); soundlatch_w(space,offset,data);
cpu_set_input_line(space->machine->cpu[1], 0, ASSERT_LINE); cputag_set_input_line(space->machine, "audiocpu", 0, ASSERT_LINE);
} }
static READ8_HANDLER( audio_command_r ) static READ8_HANDLER( audio_command_r )
{ {
cpu_set_input_line(space->machine->cpu[1], 0, CLEAR_LINE); cputag_set_input_line(space->machine, "audiocpu", 0, CLEAR_LINE);
return soundlatch_r(space,offset); return soundlatch_r(space,offset);
} }
@ -1991,7 +1991,7 @@ static void decrypt_C10707_cpu(running_machine *machine, const char *cputag)
for (addr = 0; addr < 0x10000; addr++) for (addr = 0; addr < 0x10000; addr++)
decrypt[addr] = swap_bits_5_6(rom[addr]); decrypt[addr] = swap_bits_5_6(rom[addr]);
if (space->cpu == machine->cpu[0]) if (space->cpu == cputag_get_cpu(machine, "maincpu"))
decrypted = decrypt; decrypted = decrypt;
} }
@ -2078,7 +2078,7 @@ static DRIVER_INIT( cookrace )
{ {
decrypt_C10707_cpu(machine, "maincpu"); decrypt_C10707_cpu(machine, "maincpu");
memory_install_read8_handler(cpu_get_address_space(machine->cpu[1], ADDRESS_SPACE_PROGRAM), 0x0200, 0x0fff, 0, 0, (read8_space_func)SMH_BANK(10)); memory_install_read8_handler(cputag_get_address_space(machine, "audiocpu", ADDRESS_SPACE_PROGRAM), 0x0200, 0x0fff, 0, 0, (read8_space_func)SMH_BANK(10));
memory_set_bankptr(machine, 10, memory_region(machine, "audiocpu") + 0xe200); memory_set_bankptr(machine, 10, memory_region(machine, "audiocpu") + 0xe200);
audio_nmi_enable_type = AUDIO_ENABLE_DIRECT; audio_nmi_enable_type = AUDIO_ENABLE_DIRECT;
} }
@ -2093,9 +2093,9 @@ static DRIVER_INIT( wtennis )
{ {
decrypt_C10707_cpu(machine, "maincpu"); decrypt_C10707_cpu(machine, "maincpu");
memory_install_read8_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM), 0xc15f, 0xc15f, 0, 0, wtennis_reset_hack_r); memory_install_read8_handler(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), 0xc15f, 0xc15f, 0, 0, wtennis_reset_hack_r);
memory_install_read8_handler(cpu_get_address_space(machine->cpu[1], ADDRESS_SPACE_PROGRAM), 0x0200, 0x0fff, 0, 0, (read8_space_func)SMH_BANK(10)); memory_install_read8_handler(cputag_get_address_space(machine, "audiocpu", ADDRESS_SPACE_PROGRAM), 0x0200, 0x0fff, 0, 0, (read8_space_func)SMH_BANK(10));
memory_set_bankptr(machine, 10, memory_region(machine, "audiocpu") + 0xe200); memory_set_bankptr(machine, 10, memory_region(machine, "audiocpu") + 0xe200);
audio_nmi_enable_type = AUDIO_ENABLE_DIRECT; audio_nmi_enable_type = AUDIO_ENABLE_DIRECT;
} }

View File

@ -68,7 +68,7 @@ static TIMER_CALLBACK( delayed_sound_w )
{ {
main_to_sound_data = param; main_to_sound_data = param;
main_to_sound_ready = 1; main_to_sound_ready = 1;
cpu_triggerint(machine->cpu[1]); cpu_triggerint(cputag_get_cpu(machine, "audiocpu"));
/* use a timer to make long transfers faster */ /* use a timer to make long transfers faster */
timer_set(machine, ATTOTIME_IN_USEC(50), NULL, 0, 0); timer_set(machine, ATTOTIME_IN_USEC(50), NULL, 0, 0);
@ -149,7 +149,7 @@ static WRITE8_HANDLER( sound_int_state_w )
devtag_reset(space->machine, "bsmt"); devtag_reset(space->machine, "bsmt");
/* also clears interrupts */ /* also clears interrupts */
cpu_set_input_line(space->machine->cpu[1], 0, CLEAR_LINE); cputag_set_input_line(space->machine, "audiocpu", 0, CLEAR_LINE);
sound_int_state = data; sound_int_state = data;
} }

View File

@ -658,7 +658,7 @@ GFXDECODE_END
// handler called by the 2203 emulator when the internal timers cause an IRQ // handler called by the 2203 emulator when the internal timers cause an IRQ
static void irqhandler(const device_config *device, int irq) static void irqhandler(const device_config *device, int irq)
{ {
cpu_set_input_line(device->machine->cpu[2], 0, irq ? ASSERT_LINE : CLEAR_LINE); cputag_set_input_line(device->machine, "audiocpu", 0, irq ? ASSERT_LINE : CLEAR_LINE);
} }
static const ym2203_interface ym2203_config = static const ym2203_interface ym2203_config =
@ -1275,7 +1275,7 @@ static DRIVER_INIT( tokiob )
{ {
DRIVER_INIT_CALL(tokio); DRIVER_INIT_CALL(tokio);
memory_install_read8_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM), 0xfe00, 0xfe00, 0, 0, tokiob_mcu_r ); memory_install_read8_handler(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), 0xfe00, 0xfe00, 0, 0, tokiob_mcu_r );
} }

View File

@ -100,14 +100,14 @@ static int sound_nmi_enable,pending_nmi;
static TIMER_CALLBACK( nmi_callback ) static TIMER_CALLBACK( nmi_callback )
{ {
if (sound_nmi_enable) cpu_set_input_line(machine->cpu[1],INPUT_LINE_NMI,PULSE_LINE); if (sound_nmi_enable) cputag_set_input_line(machine, "audiocpu", INPUT_LINE_NMI, PULSE_LINE);
else pending_nmi = 1; else pending_nmi = 1;
} }
static WRITE8_HANDLER( sound_command_w ) static WRITE8_HANDLER( sound_command_w )
{ {
soundlatch_w(space,0,data); soundlatch_w(space, 0, data);
timer_call_after_resynch(space->machine, NULL, data,nmi_callback); timer_call_after_resynch(space->machine, NULL, data, nmi_callback);
} }
static WRITE8_HANDLER( nmi_disable_w ) static WRITE8_HANDLER( nmi_disable_w )
@ -120,7 +120,7 @@ static WRITE8_HANDLER( nmi_enable_w )
sound_nmi_enable = 1; sound_nmi_enable = 1;
if (pending_nmi) if (pending_nmi)
{ {
cpu_set_input_line(space->machine->cpu[1],INPUT_LINE_NMI,PULSE_LINE); cputag_set_input_line(space->machine, "audiocpu", INPUT_LINE_NMI, PULSE_LINE);
pending_nmi = 0; pending_nmi = 0;
} }
} }

View File

@ -305,7 +305,7 @@ static READ8_HANDLER( spacduel_IN3_r )
static CUSTOM_INPUT( clock_r ) static CUSTOM_INPUT( clock_r )
{ {
return (cpu_get_total_cycles(field->port->machine->cpu[0]) & 0x100) ? 1 : 0; return (cputag_get_total_cycles(field->port->machine, "maincpu") & 0x100) ? 1 : 0;
} }
@ -341,7 +341,7 @@ static WRITE8_HANDLER( bwidow_misc_w )
static WRITE8_HANDLER( irq_ack_w ) static WRITE8_HANDLER( irq_ack_w )
{ {
cpu_set_input_line(space->machine->cpu[0], 0, CLEAR_LINE); cputag_set_input_line(space->machine, "maincpu", 0, CLEAR_LINE);
} }

View File

@ -73,7 +73,7 @@ static INTERRUPT_GEN ( bwp1_interrupt )
latch_data = sound_fifo[fftail]; latch_data = sound_fifo[fftail];
fftail = (fftail + 1) & (MAX_SOUNDS - 1); fftail = (fftail + 1) & (MAX_SOUNDS - 1);
soundlatch_w(cpu_get_address_space(device, ADDRESS_SPACE_PROGRAM), 0, latch_data); soundlatch_w(cpu_get_address_space(device, ADDRESS_SPACE_PROGRAM), 0, latch_data);
cpu_set_input_line(device->machine->cpu[2], DECO16_IRQ_LINE, HOLD_LINE); // SNDREQ cputag_set_input_line(device->machine, "audiocpu", DECO16_IRQ_LINE, HOLD_LINE); // SNDREQ
} }
break; break;
@ -98,7 +98,7 @@ static INTERRUPT_GEN ( bwp3_interrupt ) { if (!bwp3_nmimask) cpu_set_input_line(
static WRITE8_HANDLER( bwp12_sharedram1_w ) { bwp1_sharedram1[offset] = bwp2_sharedram1[offset] = data; } static WRITE8_HANDLER( bwp12_sharedram1_w ) { bwp1_sharedram1[offset] = bwp2_sharedram1[offset] = data; }
static WRITE8_HANDLER( bwp3_u8F_w ) { bwp3_u8F_d = data; } // prepares custom chip for various operations static WRITE8_HANDLER( bwp3_u8F_w ) { bwp3_u8F_d = data; } // prepares custom chip for various operations
static WRITE8_HANDLER( bwp3_nmiack_w ) { cpu_set_input_line(space->machine->cpu[2], INPUT_LINE_NMI, CLEAR_LINE); } static WRITE8_HANDLER( bwp3_nmiack_w ) { cputag_set_input_line(space->machine, "audiocpu", INPUT_LINE_NMI, CLEAR_LINE); }
static WRITE8_HANDLER( bwp3_nmimask_w ) { bwp3_nmimask = data & 0x80; } static WRITE8_HANDLER( bwp3_nmimask_w ) { bwp3_nmimask = data & 0x80; }
@ -119,16 +119,16 @@ static WRITE8_HANDLER( bwp1_ctrl_w )
switch (offset) switch (offset)
{ {
// MSSTB // MSSTB
case 0: cpu_set_input_line(space->machine->cpu[1], M6809_IRQ_LINE, ASSERT_LINE); break; case 0: cputag_set_input_line(space->machine, "sub", M6809_IRQ_LINE, ASSERT_LINE); break;
// IRQACK // IRQACK
case 1: cpu_set_input_line(space->machine->cpu[0], M6809_IRQ_LINE, CLEAR_LINE); break; case 1: cputag_set_input_line(space->machine, "maincpu", M6809_IRQ_LINE, CLEAR_LINE); break;
// FIRQACK // FIRQACK
case 2: cpu_set_input_line(space->machine->cpu[0], M6809_FIRQ_LINE, CLEAR_LINE); break; case 2: cputag_set_input_line(space->machine, "maincpu", M6809_FIRQ_LINE, CLEAR_LINE); break;
// NMIACK // NMIACK
case 3: cpu_set_input_line(space->machine->cpu[0], INPUT_LINE_NMI, CLEAR_LINE); break; case 3: cputag_set_input_line(space->machine, "maincpu", INPUT_LINE_NMI, CLEAR_LINE); break;
// SWAP(bank-swaps sprite RAM between 1800 & 1900; ignored bc. they're treated as a single chunk.) // SWAP(bank-swaps sprite RAM between 1800 & 1900; ignored bc. they're treated as a single chunk.)
case 4: break; case 4: break;
@ -136,7 +136,7 @@ static WRITE8_HANDLER( bwp1_ctrl_w )
// SNDREQ // SNDREQ
case 5: case 5:
if (data == 0x80) // protection trick to screw CPU1 & 3 if (data == 0x80) // protection trick to screw CPU1 & 3
cpu_set_input_line(space->machine->cpu[1], INPUT_LINE_NMI, ASSERT_LINE); // SNMI cputag_set_input_line(space->machine, "sub", INPUT_LINE_NMI, ASSERT_LINE); // SNMI
else else
if (ffcount < MAX_SOUNDS) if (ffcount < MAX_SOUNDS)
{ {
@ -163,13 +163,13 @@ static WRITE8_HANDLER( bwp2_ctrl_w )
{ {
switch (offset) switch (offset)
{ {
case 0: cpu_set_input_line(space->machine->cpu[0], M6809_IRQ_LINE, ASSERT_LINE); break; // SMSTB case 0: cputag_set_input_line(space->machine, "maincpu", M6809_IRQ_LINE, ASSERT_LINE); break; // SMSTB
case 1: cpu_set_input_line(space->machine->cpu[1], M6809_FIRQ_LINE, CLEAR_LINE); break; case 1: cputag_set_input_line(space->machine, "sub", M6809_FIRQ_LINE, CLEAR_LINE); break;
case 2: cpu_set_input_line(space->machine->cpu[1], M6809_IRQ_LINE, CLEAR_LINE); break; case 2: cputag_set_input_line(space->machine, "sub", M6809_IRQ_LINE, CLEAR_LINE); break;
case 3: cpu_set_input_line(space->machine->cpu[1], INPUT_LINE_NMI, CLEAR_LINE); break; case 3: cputag_set_input_line(space->machine, "sub", INPUT_LINE_NMI, CLEAR_LINE); break;
} }
#if BW_DEBUG #if BW_DEBUG
@ -609,4 +609,3 @@ GAME( 1984, bwingsa, bwings, bwing, bwing, bwing, ROT90, "Data East Corporation"
GAME( 1984, zaviga, 0, bwing, bwing, bwing, ROT90, "Data East Corporation", "Zaviga", 0 ) GAME( 1984, zaviga, 0, bwing, bwing, bwing, ROT90, "Data East Corporation", "Zaviga", 0 )
GAME( 1984, zavigaj, zaviga, bwing, bwing, bwing, ROT90, "Data East Corporation", "Zaviga (Japan)", 0 ) GAME( 1984, zavigaj, zaviga, bwing, bwing, bwing, ROT90, "Data East Corporation", "Zaviga (Japan)", 0 )

View File

@ -264,7 +264,7 @@ static INTERRUPT_GEN( bzone_interrupt )
static CUSTOM_INPUT( clock_r ) static CUSTOM_INPUT( clock_r )
{ {
return (cpu_get_total_cycles(field->port->machine->cpu[0]) & 0x100) ? 1 : 0; return (cputag_get_total_cycles(field->port->machine, "maincpu") & 0x100) ? 1 : 0;
} }
@ -787,13 +787,13 @@ static WRITE8_HANDLER( analog_select_w )
static DRIVER_INIT( bradley ) static DRIVER_INIT( bradley )
{ {
memory_install_readwrite8_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM), 0x400, 0x7ff, 0, 0, (read8_space_func)SMH_BANK(1), (write8_space_func)SMH_BANK(1)); memory_install_readwrite8_handler(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), 0x400, 0x7ff, 0, 0, (read8_space_func)SMH_BANK(1), (write8_space_func)SMH_BANK(1));
memory_set_bankptr(machine, 1, auto_alloc_array(machine, UINT8, 0x400)); memory_set_bankptr(machine, 1, auto_alloc_array(machine, UINT8, 0x400));
memory_install_read_port_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM), 0x1808, 0x1808, 0, 0, "1808"); memory_install_read_port_handler(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), 0x1808, 0x1808, 0, 0, "1808");
memory_install_read_port_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM), 0x1809, 0x1809, 0, 0, "1809"); memory_install_read_port_handler(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), 0x1809, 0x1809, 0, 0, "1809");
memory_install_read8_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM), 0x180a, 0x180a, 0, 0, analog_data_r); memory_install_read8_handler(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), 0x180a, 0x180a, 0, 0, analog_data_r);
memory_install_write8_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM), 0x1848, 0x1850, 0, 0, analog_select_w); memory_install_write8_handler(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), 0x1848, 0x1850, 0, 0, analog_select_w);
} }

View File

@ -212,30 +212,30 @@ WRITE8_HANDLER( bagman_pal16r6_w )
{ {
UINT8 line; UINT8 line;
line = offset*4; line = offset * 4;
columnvalue[line ] = data&1; columnvalue[line ] = data & 1;
columnvalue[line+1] = 1-(data&1); columnvalue[line + 1] = 1 - (data & 1);
} }
MACHINE_RESET( bagman ) MACHINE_RESET( bagman )
{ {
const address_space *space = cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM); const address_space *space = cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM);
bagman_pal16r6_w(space,0,1); /*pin 2*/ bagman_pal16r6_w(space, 0, 1); /*pin 2*/
bagman_pal16r6_w(space,1,1); /*pin 3*/ bagman_pal16r6_w(space, 1, 1); /*pin 3*/
bagman_pal16r6_w(space,2,1); /*pin 4*/ bagman_pal16r6_w(space, 2, 1); /*pin 4*/
bagman_pal16r6_w(space,3,1); /*pin 5*/ bagman_pal16r6_w(space, 3, 1); /*pin 5*/
bagman_pal16r6_w(space,4,1); /*pin 6*/ bagman_pal16r6_w(space, 4, 1); /*pin 6*/
bagman_pal16r6_w(space,5,1); /*pin 7*/ bagman_pal16r6_w(space, 5, 1); /*pin 7*/
bagman_pal16r6_w(space,6,1); /*pin 8*/ bagman_pal16r6_w(space, 6, 1); /*pin 8*/
bagman_pal16r6_w(space,7,1); /*pin 9*/ bagman_pal16r6_w(space, 7, 1); /*pin 9*/
update_pal(); update_pal();
} }
READ8_HANDLER( bagman_pal16r6_r ) READ8_HANDLER( bagman_pal16r6_r )
{ {
update_pal(); update_pal();
return (outvalue[6]) + (outvalue[5]<<1) + (outvalue[4]<<2) + return (outvalue[6]) + (outvalue[5] << 1) + (outvalue[4] << 2) +
(outvalue[3]<<3) + (outvalue[2]<<4) + (outvalue[1]<<5); (outvalue[3] << 3) + (outvalue[2] << 4) + (outvalue[1] << 5);
/* Bagman schematics show that this is right mapping order of PAL outputs to bits. /* Bagman schematics show that this is right mapping order of PAL outputs to bits.
** This is the PAL 16R6 shown almost in the middle of the schematics. ** This is the PAL 16R6 shown almost in the middle of the schematics.

View File

@ -103,7 +103,7 @@ static UINT8 grudge_last_steering[3];
static TIMER_CALLBACK( irq_off ) static TIMER_CALLBACK( irq_off )
{ {
cpu_set_input_line(machine->cpu[0], M6809_IRQ_LINE, CLEAR_LINE); cputag_set_input_line(machine, "maincpu", M6809_IRQ_LINE, CLEAR_LINE);
} }
@ -116,7 +116,7 @@ static TIMER_CALLBACK( interrupt_timer )
timer_adjust_oneshot(scanline_timer, video_screen_get_time_until_pos(machine->primary_screen, param + 64, 0), param + 64); timer_adjust_oneshot(scanline_timer, video_screen_get_time_until_pos(machine->primary_screen, param + 64, 0), param + 64);
/* IRQ starts on scanline 0, 64, 128, etc. */ /* IRQ starts on scanline 0, 64, 128, etc. */
cpu_set_input_line(machine->cpu[0], M6809_IRQ_LINE, ASSERT_LINE); cputag_set_input_line(machine, "maincpu", M6809_IRQ_LINE, ASSERT_LINE);
/* it will turn off on the next HBLANK */ /* it will turn off on the next HBLANK */
timer_set(machine, video_screen_get_time_until_pos(machine->primary_screen, param, BALSENTE_HBSTART), NULL, 0, irq_off); timer_set(machine, video_screen_get_time_until_pos(machine->primary_screen, param, BALSENTE_HBSTART), NULL, 0, irq_off);
@ -148,7 +148,7 @@ static TIMER_CALLBACK( interrupt_timer )
MACHINE_RESET( balsente ) MACHINE_RESET( balsente )
{ {
const address_space *space = cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM); const address_space *space = cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM);
int numbanks, i; int numbanks, i;
/* create the polynomial tables */ /* create the polynomial tables */
@ -199,7 +199,7 @@ MACHINE_RESET( balsente )
memory_configure_bank(machine, 2, 0, numbanks, &memory_region(machine, "maincpu")[0x12000], 0x6000); memory_configure_bank(machine, 2, 0, numbanks, &memory_region(machine, "maincpu")[0x12000], 0x6000);
memory_set_bank(space->machine, 1, 0); memory_set_bank(space->machine, 1, 0);
memory_set_bank(space->machine, 2, 0); memory_set_bank(space->machine, 2, 0);
device_reset(machine->cpu[0]); device_reset(cputag_get_cpu(machine, "maincpu"));
/* start a timer to generate interrupts */ /* start a timer to generate interrupts */
scanline_timer = timer_alloc(machine, interrupt_timer, NULL); scanline_timer = timer_alloc(machine, interrupt_timer, NULL);
@ -475,12 +475,12 @@ static void m6850_update_io(running_machine *machine)
/* apply the change */ /* apply the change */
if (new_state && !(m6850_status & 0x80)) if (new_state && !(m6850_status & 0x80))
{ {
cpu_set_input_line(machine->cpu[0], M6809_FIRQ_LINE, ASSERT_LINE); cputag_set_input_line(machine, "maincpu", M6809_FIRQ_LINE, ASSERT_LINE);
m6850_status |= 0x80; m6850_status |= 0x80;
} }
else if (!new_state && (m6850_status & 0x80)) else if (!new_state && (m6850_status & 0x80))
{ {
cpu_set_input_line(machine->cpu[0], M6809_FIRQ_LINE, CLEAR_LINE); cputag_set_input_line(machine, "maincpu", M6809_FIRQ_LINE, CLEAR_LINE);
m6850_status &= ~0x80; m6850_status &= ~0x80;
} }
@ -493,12 +493,12 @@ static void m6850_update_io(running_machine *machine)
/* apply the change */ /* apply the change */
if (new_state && !(m6850_sound_status & 0x80)) if (new_state && !(m6850_sound_status & 0x80))
{ {
cpu_set_input_line(machine->cpu[1], INPUT_LINE_NMI, ASSERT_LINE); cputag_set_input_line(machine, "audiocpu", INPUT_LINE_NMI, ASSERT_LINE);
m6850_sound_status |= 0x80; m6850_sound_status |= 0x80;
} }
else if (!new_state && (m6850_sound_status & 0x80)) else if (!new_state && (m6850_sound_status & 0x80))
{ {
cpu_set_input_line(machine->cpu[1], INPUT_LINE_NMI, CLEAR_LINE); cputag_set_input_line(machine, "audiocpu", INPUT_LINE_NMI, CLEAR_LINE);
m6850_sound_status &= ~0x80; m6850_sound_status &= ~0x80;
} }
} }
@ -784,7 +784,7 @@ static void counter_set_out(running_machine *machine, int which, int out)
{ {
/* OUT on counter 2 is hooked to the /INT line on the Z80 */ /* OUT on counter 2 is hooked to the /INT line on the Z80 */
if (which == 2) if (which == 2)
cpu_set_input_line(machine->cpu[1], 0, out ? ASSERT_LINE : CLEAR_LINE); cputag_set_input_line(machine, "audiocpu", 0, out ? ASSERT_LINE : CLEAR_LINE);
/* OUT on counter 0 is hooked to the GATE line on counter 1 */ /* OUT on counter 0 is hooked to the GATE line on counter 1 */
else if (which == 0) else if (which == 0)

View File

@ -51,9 +51,9 @@ static READ8_DEVICE_HANDLER( b_via_0_pb_r )
static WRITE8_DEVICE_HANDLER( b_via_0_pa_w ) static WRITE8_DEVICE_HANDLER( b_via_0_pa_w )
{ {
if ((data & 0x08) == 0) if ((data & 0x08) == 0)
cpu_set_input_line(device->machine->cpu[1], INPUT_LINE_RESET, ASSERT_LINE); cputag_set_input_line(device->machine, "audiocpu", INPUT_LINE_RESET, ASSERT_LINE);
else else
cpu_set_input_line(device->machine->cpu[1], INPUT_LINE_RESET, CLEAR_LINE); cputag_set_input_line(device->machine, "audiocpu", INPUT_LINE_RESET, CLEAR_LINE);
if ((data & 0x04) == 0) if ((data & 0x04) == 0)
{ {
@ -121,5 +121,3 @@ WRITE8_HANDLER( beezer_bankswitch_w )
memory_set_bankptr(space->machine, 1, rom + (data & 0x07) * 0x2000 + ((data & 0x08) ? 0x1000: 0)); memory_set_bankptr(space->machine, 1, rom + (data & 0x07) * 0x2000 + ((data & 0x08) ? 0x1000: 0));
} }
} }

View File

@ -45,7 +45,7 @@ WRITE8_HANDLER( bigevglf_68705_portB_w )
if ((ddrB & 0x02) && (~portB_out & 0x02) && (data & 0x02)) /* positive going transition of the clock */ if ((ddrB & 0x02) && (~portB_out & 0x02) && (data & 0x02)) /* positive going transition of the clock */
{ {
cpu_set_input_line(space->machine->cpu[3],0,CLEAR_LINE); cputag_set_input_line(space->machine, "mcu", 0, CLEAR_LINE);
main_sent = 0; main_sent = 0;
} }
@ -86,7 +86,7 @@ WRITE8_HANDLER( bigevglf_mcu_w )
{ {
portA_in = data; portA_in = data;
main_sent = 1; main_sent = 1;
cpu_set_input_line(space->machine->cpu[3],0,ASSERT_LINE); cputag_set_input_line(space->machine, "mcu", 0, ASSERT_LINE);
} }

View File

@ -24,11 +24,11 @@ WRITE8_HANDLER( bublbobl_bankswitch_w )
/* bit 3 n.c. */ /* bit 3 n.c. */
/* bit 4 resets second Z80 */ /* bit 4 resets second Z80 */
cpu_set_input_line(space->machine->cpu[1], INPUT_LINE_RESET, (data & 0x10) ? CLEAR_LINE : ASSERT_LINE); cputag_set_input_line(space->machine, "slave", INPUT_LINE_RESET, (data & 0x10) ? CLEAR_LINE : ASSERT_LINE);
/* bit 5 resets mcu */ /* bit 5 resets mcu */
if (space->machine->cpu[3] != NULL) // only if we have a MCU if (cputag_get_cpu(space->machine, "mcu") != NULL) // only if we have a MCU
cpu_set_input_line(space->machine->cpu[3], INPUT_LINE_RESET, (data & 0x20) ? CLEAR_LINE : ASSERT_LINE); cputag_set_input_line(space->machine, "mcu", INPUT_LINE_RESET, (data & 0x20) ? CLEAR_LINE : ASSERT_LINE);
/* bit 6 enables display */ /* bit 6 enables display */
bublbobl_video_enable = data & 0x40; bublbobl_video_enable = data & 0x40;
@ -55,7 +55,7 @@ WRITE8_HANDLER( tokio_videoctrl_w )
WRITE8_HANDLER( bublbobl_nmitrigger_w ) WRITE8_HANDLER( bublbobl_nmitrigger_w )
{ {
cpu_set_input_line(space->machine->cpu[1],INPUT_LINE_NMI,PULSE_LINE); cputag_set_input_line(space->machine, "slave", INPUT_LINE_NMI, PULSE_LINE);
} }
@ -94,7 +94,7 @@ static int sound_nmi_enable,pending_nmi,sound_status;
static TIMER_CALLBACK( nmi_callback ) static TIMER_CALLBACK( nmi_callback )
{ {
if (sound_nmi_enable) cpu_set_input_line(machine->cpu[2],INPUT_LINE_NMI,PULSE_LINE); if (sound_nmi_enable) cputag_set_input_line(machine, "audiocpu", INPUT_LINE_NMI, PULSE_LINE);
else pending_nmi = 1; else pending_nmi = 1;
} }
@ -114,14 +114,14 @@ WRITE8_HANDLER( bublbobl_sh_nmi_enable_w )
sound_nmi_enable = 1; sound_nmi_enable = 1;
if (pending_nmi) if (pending_nmi)
{ {
cpu_set_input_line(space->machine->cpu[2],INPUT_LINE_NMI,PULSE_LINE); cputag_set_input_line(space->machine, "audiocpu", INPUT_LINE_NMI, PULSE_LINE);
pending_nmi = 0; pending_nmi = 0;
} }
} }
WRITE8_HANDLER(soundcpu_reset_w) WRITE8_HANDLER(soundcpu_reset_w)
{ {
cpu_set_input_line(space->machine->cpu[2], INPUT_LINE_RESET, data ? ASSERT_LINE : CLEAR_LINE); cputag_set_input_line(space->machine, "audiocpu", INPUT_LINE_RESET, data ? ASSERT_LINE : CLEAR_LINE);
} }
READ8_HANDLER( sound_status_r ) READ8_HANDLER( sound_status_r )
@ -207,8 +207,8 @@ WRITE8_HANDLER( bublbobl_mcu_port1_w )
if ((port1_out & 0x40) && (~data & 0x40)) if ((port1_out & 0x40) && (~data & 0x40))
{ {
// logerror("triggering IRQ on main CPU\n"); // logerror("triggering IRQ on main CPU\n");
cpu_set_input_line_vector(space->machine->cpu[0],0,bublbobl_mcu_sharedram[0]); cpu_set_input_line_vector(cputag_get_cpu(space->machine, "maincpu"), 0, bublbobl_mcu_sharedram[0]);
cpu_set_input_line(space->machine->cpu[0],0,HOLD_LINE); cputag_set_input_line(space->machine, "maincpu", 0, HOLD_LINE);
} }
// bit 7: select read or write shared RAM // bit 7: select read or write shared RAM
@ -487,8 +487,8 @@ logerror("%04x: 68705 unknown write to address %04x\n",cpu_get_pc(space->cpu),ad
/* hack to get random EXTEND letters (who is supposed to do this? 68705? PAL?) */ /* hack to get random EXTEND letters (who is supposed to do this? 68705? PAL?) */
bublbobl_mcu_sharedram[0x7c] = mame_rand(space->machine)%6; bublbobl_mcu_sharedram[0x7c] = mame_rand(space->machine)%6;
cpu_set_input_line_vector(space->machine->cpu[0],0,bublbobl_mcu_sharedram[0]); cpu_set_input_line_vector(cputag_get_cpu(space->machine, "maincpu"), 0, bublbobl_mcu_sharedram[0]);
cpu_set_input_line(space->machine->cpu[0],0,HOLD_LINE); cputag_set_input_line(space->machine, "maincpu", 0, HOLD_LINE);
} }
if ((ddrB & 0x40) && (~data & 0x40) && (portB_out & 0x40)) if ((ddrB & 0x40) && (~data & 0x40) && (portB_out & 0x40))
{ {

View File

@ -10,7 +10,7 @@ MACHINE_RESET( buggychl )
{ {
mcu_sent = 0; mcu_sent = 0;
main_sent = 0; main_sent = 0;
cpu_set_input_line(machine->cpu[2],0,CLEAR_LINE); cputag_set_input_line(machine, "mcu", 0, CLEAR_LINE);
} }
@ -70,18 +70,18 @@ READ8_HANDLER( buggychl_68705_portB_r )
WRITE8_HANDLER( buggychl_68705_portB_w ) WRITE8_HANDLER( buggychl_68705_portB_w )
{ {
logerror("%04x: 68705 port B write %02x\n",cpu_get_pc(space->cpu),data); logerror("%04x: 68705 port B write %02x\n", cpu_get_pc(space->cpu), data);
if ((ddrB & 0x02) && (~data & 0x02) && (portB_out & 0x02)) if ((ddrB & 0x02) && (~data & 0x02) && (portB_out & 0x02))
{ {
portA_in = from_main; portA_in = from_main;
if (main_sent) cpu_set_input_line(space->machine->cpu[2],0,CLEAR_LINE); if (main_sent) cputag_set_input_line(space->machine, "mcu", 0, CLEAR_LINE);
main_sent = 0; main_sent = 0;
logerror("read command %02x from main cpu\n",portA_in); logerror("read command %02x from main cpu\n", portA_in);
} }
if ((ddrB & 0x04) && (data & 0x04) && (~portB_out & 0x04)) if ((ddrB & 0x04) && (data & 0x04) && (~portB_out & 0x04))
{ {
logerror("send command %02x to main cpu\n",portA_out); logerror("send command %02x to main cpu\n", portA_out);
from_mcu = portA_out; from_mcu = portA_out;
mcu_sent = 1; mcu_sent = 1;
} }
@ -111,13 +111,13 @@ READ8_HANDLER( buggychl_68705_portC_r )
portC_in = 0; portC_in = 0;
if (main_sent) portC_in |= 0x01; if (main_sent) portC_in |= 0x01;
if (!mcu_sent) portC_in |= 0x02; if (!mcu_sent) portC_in |= 0x02;
logerror("%04x: 68705 port C read %02x\n",cpu_get_pc(space->cpu),portC_in); logerror("%04x: 68705 port C read %02x\n", cpu_get_pc(space->cpu), portC_in);
return (portC_out & ddrC) | (portC_in & ~ddrC); return (portC_out & ddrC) | (portC_in & ~ddrC);
} }
WRITE8_HANDLER( buggychl_68705_portC_w ) WRITE8_HANDLER( buggychl_68705_portC_w )
{ {
logerror("%04x: 68705 port C write %02x\n",cpu_get_pc(space->cpu),data); logerror("%04x: 68705 port C write %02x\n", cpu_get_pc(space->cpu), data);
portC_out = data; portC_out = data;
} }
@ -129,15 +129,15 @@ WRITE8_HANDLER( buggychl_68705_ddrC_w )
WRITE8_HANDLER( buggychl_mcu_w ) WRITE8_HANDLER( buggychl_mcu_w )
{ {
logerror("%04x: mcu_w %02x\n",cpu_get_pc(space->cpu),data); logerror("%04x: mcu_w %02x\n", cpu_get_pc(space->cpu), data);
from_main = data; from_main = data;
main_sent = 1; main_sent = 1;
cpu_set_input_line(space->machine->cpu[2],0,ASSERT_LINE); cputag_set_input_line(space->machine, "mcu", 0, ASSERT_LINE);
} }
READ8_HANDLER( buggychl_mcu_r ) READ8_HANDLER( buggychl_mcu_r )
{ {
logerror("%04x: mcu_r %02x\n",cpu_get_pc(space->cpu),from_mcu); logerror("%04x: mcu_r %02x\n", cpu_get_pc(space->cpu), from_mcu);
mcu_sent = 0; mcu_sent = 0;
return from_mcu; return from_mcu;
} }

View File

@ -114,7 +114,7 @@ WRITE32_HANDLER( beathead_finescroll_w )
if ((oldword & 8) && !(newword & 8) && video_screen_get_vpos(space->machine->primary_screen) != 261) if ((oldword & 8) && !(newword & 8) && video_screen_get_vpos(space->machine->primary_screen) != 261)
{ {
logerror("Suspending time! (scanline = %d)\n", video_screen_get_vpos(space->machine->primary_screen)); logerror("Suspending time! (scanline = %d)\n", video_screen_get_vpos(space->machine->primary_screen));
cpu_set_input_line(space->machine->cpu[0], INPUT_LINE_HALT, ASSERT_LINE); cputag_set_input_line(space->machine, "maincpu", INPUT_LINE_HALT, ASSERT_LINE);
} }
} }

View File

@ -204,7 +204,7 @@ static READ8_HANDLER( unknown_r )
static WRITE8_HANDLER( unknown_w ) static WRITE8_HANDLER( unknown_w )
{ {
cpu_set_input_line(space->machine->cpu[1], INPUT_LINE_NMI, CLEAR_LINE ); //? cputag_set_input_line(space->machine, "matrix", INPUT_LINE_NMI, CLEAR_LINE ); //?
} }
/////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////
@ -226,7 +226,7 @@ void BFM_dm01_writedata(running_machine *machine, UINT8 data)
data_avail = 1; data_avail = 1;
//pulse IRQ line //pulse IRQ line
cpu_set_input_line(machine->cpu[1], M6809_IRQ_LINE, HOLD_LINE ); // trigger IRQ cputag_set_input_line(machine, "matrix", M6809_IRQ_LINE, HOLD_LINE ); // trigger IRQ
} }
/////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////

View File

@ -243,7 +243,7 @@ VIDEO_UPDATE( bionicc )
VIDEO_EOF( bionicc ) VIDEO_EOF( bionicc )
{ {
const address_space *space = cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM); const address_space *space = cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM);
buffer_spriteram16_w(space,0,0,0xffff); buffer_spriteram16_w(space, 0, 0, 0xffff);
} }

View File

@ -160,7 +160,7 @@ WRITE8_HANDLER( blktiger_video_control_w )
coin_counter_w(1,data & 2); coin_counter_w(1,data & 2);
/* bit 5 resets the sound CPU */ /* bit 5 resets the sound CPU */
cpu_set_input_line(space->machine->cpu[1], INPUT_LINE_RESET, (data & 0x20) ? ASSERT_LINE : CLEAR_LINE); cputag_set_input_line(space->machine, "audiocpu", INPUT_LINE_RESET, (data & 0x20) ? ASSERT_LINE : CLEAR_LINE);
/* bit 6 flips screen */ /* bit 6 flips screen */
flip_screen_set(space->machine, data & 0x40); flip_screen_set(space->machine, data & 0x40);
@ -244,7 +244,7 @@ VIDEO_UPDATE( blktiger )
VIDEO_EOF( blktiger ) VIDEO_EOF( blktiger )
{ {
const address_space *space = cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM); const address_space *space = cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM);
buffer_spriteram_w(space, 0, 0); buffer_spriteram_w(space, 0, 0);
} }

View File

@ -98,7 +98,7 @@ VIDEO_START( blstroid )
static TIMER_CALLBACK( irq_off ) static TIMER_CALLBACK( irq_off )
{ {
const address_space *space = cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM); const address_space *space = cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM);
/* clear the interrupt */ /* clear the interrupt */
atarigen_scanline_int_ack_w(space, 0, 0, 0xffff); atarigen_scanline_int_ack_w(space, 0, 0, 0xffff);
@ -108,7 +108,7 @@ static TIMER_CALLBACK( irq_off )
static TIMER_CALLBACK( irq_on ) static TIMER_CALLBACK( irq_on )
{ {
/* generate the interrupt */ /* generate the interrupt */
atarigen_scanline_int_gen(machine->cpu[0]); atarigen_scanline_int_gen(cputag_get_cpu(machine, "maincpu"));
atarigen_update_interrupts(machine); atarigen_update_interrupts(machine);
} }

View File

@ -77,7 +77,7 @@ WRITE16_HANDLER( btoads_misc_control_w )
COMBINE_DATA(&misc_control); COMBINE_DATA(&misc_control);
/* bit 3 controls sound reset line */ /* bit 3 controls sound reset line */
cpu_set_input_line(space->machine->cpu[1], INPUT_LINE_RESET, (misc_control & 8) ? CLEAR_LINE : ASSERT_LINE); cputag_set_input_line(space->machine, "audiocpu", INPUT_LINE_RESET, (misc_control & 8) ? CLEAR_LINE : ASSERT_LINE);
} }