More number-to-tag conversions in CPU calls. As a result, simplified dec8.c removing game specific irqhandler and ym3526_interface (previously only needed because of different "audiocpu" number)

This commit is contained in:
Fabio Priuli 2009-04-28 07:40:05 +00:00
parent 484b50dc42
commit 4576576204
43 changed files with 457 additions and 451 deletions

View File

@ -1135,9 +1135,9 @@ static WRITE8_DEVICE_HANDLER( dkong_p1_w )
WRITE8_HANDLER( dkong_audio_irq_w ) WRITE8_HANDLER( dkong_audio_irq_w )
{ {
if (data) if (data)
cpu_set_input_line(space->machine->cpu[1], 0, ASSERT_LINE); cputag_set_input_line(space->machine, "soundcpu", 0, ASSERT_LINE);
else else
cpu_set_input_line(space->machine->cpu[1], 0, CLEAR_LINE); cputag_set_input_line(space->machine, "soundcpu", 0, CLEAR_LINE);
} }

View File

@ -71,7 +71,7 @@ static WRITE8_HANDLER( coins_w )
static WRITE8_HANDLER(snd_w) static WRITE8_HANDLER(snd_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 ADDRESS_MAP_START( main_map, ADDRESS_SPACE_PROGRAM, 8 ) static ADDRESS_MAP_START( main_map, ADDRESS_SPACE_PROGRAM, 8 )
@ -386,7 +386,7 @@ static void adpcm_int(const device_config *device)
msm_toggle ^= 1; msm_toggle ^= 1;
if (msm_toggle == 0) if (msm_toggle == 0)
{ {
cpu_set_input_line_and_vector(device->machine->cpu[1], 0, HOLD_LINE, 0x38); cputag_set_input_line_and_vector(device->machine, "audiocpu", 0, HOLD_LINE, 0x38);
} }
} }
} }

View File

@ -156,7 +156,7 @@ static void parse_control( running_machine *machine ) /* assumes Z80 sandwiched
/* bit 0 enables cpu B */ /* bit 0 enables cpu B */
/* however this fails when recovering from a save state /* however this fails when recovering from a save state
if cpu B is disabled !! */ if cpu B is disabled !! */
cpu_set_input_line(machine->cpu[2], INPUT_LINE_RESET, (cpua_ctrl &0x1) ? CLEAR_LINE : ASSERT_LINE); cputag_set_input_line(machine, "cpub", INPUT_LINE_RESET, (cpua_ctrl &0x1) ? CLEAR_LINE : ASSERT_LINE);
} }
@ -498,7 +498,7 @@ ADDRESS_MAP_END
static void darius_adpcm_int (const device_config *device) static void darius_adpcm_int (const device_config *device)
{ {
if (nmi_enable) if (nmi_enable)
cpu_set_input_line(device->machine->cpu[3], INPUT_LINE_NMI, PULSE_LINE); cputag_set_input_line(device->machine, "adpcm", INPUT_LINE_NMI, PULSE_LINE);
} }
static const msm5205_interface msm5205_config = static const msm5205_interface msm5205_config =
@ -775,7 +775,7 @@ GFXDECODE_END
/* handler called by the YM2203 emulator when the internal timers cause an IRQ */ /* handler called by the YM2203 emulator when the internal timers cause an IRQ */
static void irqhandler(const device_config *device, int irq) /* assumes Z80 sandwiched between 68Ks */ static void irqhandler(const device_config *device, int irq) /* assumes Z80 sandwiched between 68Ks */
{ {
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_interface_1 = static const ym2203_interface ym2203_interface_1 =
@ -1222,4 +1222,3 @@ GAME( 1986, darius, 0, darius, darius, darius, ROT0, "Taito Corpo
GAME( 1986, dariusj, darius, darius, dariusj, darius, ROT0, "Taito Corporation", "Darius (Japan)", 0 ) GAME( 1986, dariusj, darius, darius, dariusj, darius, ROT0, "Taito Corporation", "Darius (Japan)", 0 )
GAME( 1986, dariuso, darius, darius, dariusj, darius, ROT0, "Taito Corporation", "Darius (Japan old version)", 0 ) GAME( 1986, dariuso, darius, darius, dariusj, darius, ROT0, "Taito Corporation", "Darius (Japan old version)", 0 )
GAME( 1986, dariuse, darius, darius, dariuse, darius, ROT0, "Taito Corporation", "Darius (Extra) (Japan)", 0 ) GAME( 1986, dariuse, darius, darius, dariuse, darius, ROT0, "Taito Corporation", "Darius (Extra) (Japan)", 0 )

View File

@ -45,7 +45,7 @@ static WRITE16_HANDLER( darkseal_control_w )
return; return;
case 8: /* Sound CPU write */ case 8: /* Sound CPU write */
soundlatch_w(space, 0, data & 0xff); soundlatch_w(space, 0, data & 0xff);
cpu_set_input_line(space->machine->cpu[1],0,HOLD_LINE); cputag_set_input_line(space->machine, "audiocpu", 0, HOLD_LINE);
return; return;
case 0xa: /* IRQ Ack (VBL) */ case 0xa: /* IRQ Ack (VBL) */
return; return;
@ -231,7 +231,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 const ym2151_interface ym2151_config = static const ym2151_interface ym2151_config =

View File

@ -174,15 +174,15 @@ static READ16_HANDLER( dassault_sub_control_r )
static WRITE16_HANDLER( dassault_sound_w ) static WRITE16_HANDLER( dassault_sound_w )
{ {
soundlatch_w(space, 0, data & 0xff); soundlatch_w(space, 0, data & 0xff);
cpu_set_input_line(space->machine->cpu[2],0,HOLD_LINE); /* IRQ1 */ cputag_set_input_line(space->machine, "audiocpu", 0, HOLD_LINE); /* IRQ1 */
} }
/* The CPU-CPU irq controller is overlaid onto the end of the shared memory */ /* The CPU-CPU irq controller is overlaid onto the end of the shared memory */
static READ16_HANDLER( dassault_irq_r ) static READ16_HANDLER( dassault_irq_r )
{ {
switch (offset) { switch (offset) {
case 0: cpu_set_input_line(space->machine->cpu[0], 5, CLEAR_LINE); break; case 0: cputag_set_input_line(space->machine, "maincpu", 5, CLEAR_LINE); break;
case 1: cpu_set_input_line(space->machine->cpu[1], 6, CLEAR_LINE); break; case 1: cputag_set_input_line(space->machine, "sub", 6, CLEAR_LINE); break;
} }
return shared_ram[(0xffc/2)+offset]; /* The values probably don't matter */ return shared_ram[(0xffc/2)+offset]; /* The values probably don't matter */
} }
@ -190,8 +190,8 @@ static READ16_HANDLER( dassault_irq_r )
static WRITE16_HANDLER( dassault_irq_w ) static WRITE16_HANDLER( dassault_irq_w )
{ {
switch (offset) { switch (offset) {
case 0: cpu_set_input_line(space->machine->cpu[0], 5, ASSERT_LINE); break; case 0: cpu_set_input_line(space->machine, "maincpu", 5, ASSERT_LINE); break;
case 1: cpu_set_input_line(space->machine->cpu[1], 6, ASSERT_LINE); break; case 1: cpu_set_input_line(space->machine, "sub", 6, ASSERT_LINE); break;
} }
COMBINE_DATA(&shared_ram[(0xffc / 2) + offset]); /* The values probably don't matter */ COMBINE_DATA(&shared_ram[(0xffc / 2) + offset]); /* The values probably don't matter */
@ -509,7 +509,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[2],1,state); cputag_set_input_line(device->machine, "audiocpu", 1, state);
} }
static WRITE8_DEVICE_HANDLER( sound_bankswitch_w ) static WRITE8_DEVICE_HANDLER( sound_bankswitch_w )
@ -820,7 +820,7 @@ static DRIVER_INIT( dassault )
free(tmp); free(tmp);
/* Save time waiting on vblank bit */ /* Save time waiting on vblank bit */
memory_install_read16_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM), 0x3f8000, 0x3f8001, 0, 0, dassault_main_skip); memory_install_read16_handler(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), 0x3f8000, 0x3f8001, 0, 0, dassault_main_skip);
} }
static DRIVER_INIT( thndzone ) static DRIVER_INIT( thndzone )
@ -840,7 +840,7 @@ static DRIVER_INIT( thndzone )
free(tmp); free(tmp);
/* Save time waiting on vblank bit */ /* Save time waiting on vblank bit */
memory_install_read16_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM), 0x3f8000, 0x3f8001, 0, 0, thndzone_main_skip); memory_install_read16_handler(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), 0x3f8000, 0x3f8001, 0, 0, thndzone_main_skip);
} }
/**********************************************************************************/ /**********************************************************************************/

View File

@ -366,7 +366,7 @@ static WRITE16_HANDLER( dblewing_prot_w )
case 0x380: // sound write case 0x380: // sound write
soundlatch_w(space, 0, data & 0xff); soundlatch_w(space, 0, data & 0xff);
dblewing_sound_irq |= 0x02; dblewing_sound_irq |= 0x02;
cpu_set_input_line(space->machine->cpu[1],0,(dblewing_sound_irq != 0) ? ASSERT_LINE : CLEAR_LINE); cputag_set_input_line(space->machine, "audiocpu", 0, (dblewing_sound_irq != 0) ? ASSERT_LINE : CLEAR_LINE);
return; return;
case 0x384: case 0x384:
dblwings_384_data = data; dblwings_384_data = data;
@ -461,7 +461,7 @@ static READ8_HANDLER(irq_latch_r)
{ {
/* bit 1 of dblewing_sound_irq specifies IRQ command writes */ /* bit 1 of dblewing_sound_irq specifies IRQ command writes */
dblewing_sound_irq &= ~0x02; dblewing_sound_irq &= ~0x02;
cpu_set_input_line(space->machine->cpu[1], 0, (dblewing_sound_irq != 0) ? ASSERT_LINE : CLEAR_LINE); cputag_set_input_line(space->machine, "audiocpu", 0, (dblewing_sound_irq != 0) ? ASSERT_LINE : CLEAR_LINE);
return dblewing_sound_irq; return dblewing_sound_irq;
} }
@ -654,7 +654,7 @@ static void sound_irq(const device_config *device, int state)
dblewing_sound_irq |= 0x01; dblewing_sound_irq |= 0x01;
else else
dblewing_sound_irq &= ~0x01; dblewing_sound_irq &= ~0x01;
cpu_set_input_line(device->machine->cpu[1], 0, (dblewing_sound_irq != 0) ? ASSERT_LINE : CLEAR_LINE); cputag_set_input_line(device->machine, "audiocpu", 0, (dblewing_sound_irq != 0) ? ASSERT_LINE : CLEAR_LINE);
} }
static const ym2151_interface ym2151_config = static const ym2151_interface ym2151_config =

View File

@ -120,15 +120,15 @@ static WRITE16_HANDLER( dbz_sound_command_w )
static WRITE16_HANDLER( dbz_sound_cause_nmi ) static WRITE16_HANDLER( dbz_sound_cause_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);
} }
static void dbz_sound_irq(const device_config *device, int irq) static void dbz_sound_irq(const device_config *device, int irq)
{ {
if (irq) if (irq)
cpu_set_input_line(device->machine->cpu[1], 0, ASSERT_LINE); cputag_set_input_line(device->machine, "audiocpu", 0, ASSERT_LINE);
else else
cpu_set_input_line(device->machine->cpu[1], 0, CLEAR_LINE); cputag_set_input_line(device->machine, "audiocpu", 0, CLEAR_LINE);
} }
static ADDRESS_MAP_START( dbz_map, ADDRESS_SPACE_PROGRAM, 16 ) static ADDRESS_MAP_START( dbz_map, ADDRESS_SPACE_PROGRAM, 16 )

View File

@ -83,7 +83,7 @@ static IRQ_CALLBACK(irq_callback)
void dcheese_signal_irq(running_machine *machine, int which) void dcheese_signal_irq(running_machine *machine, int which)
{ {
irq_state[which] = 1; irq_state[which] = 1;
update_irq_state(machine->cpu[0]); update_irq_state(cputag_get_cpu(machine, "maincpu"));
} }
@ -103,7 +103,7 @@ static INTERRUPT_GEN( dcheese_vblank )
static MACHINE_START( dcheese ) static MACHINE_START( dcheese )
{ {
cpu_set_irq_callback(machine->cpu[0], irq_callback); cpu_set_irq_callback(cputag_get_cpu(machine, "maincpu"), irq_callback);
state_save_register_global_array(machine, irq_state); state_save_register_global_array(machine, irq_state);
state_save_register_global(machine, soundlatch_full); state_save_register_global(machine, soundlatch_full);
@ -145,7 +145,7 @@ static WRITE16_HANDLER( sound_command_w )
{ {
/* write the latch and set the IRQ */ /* write the latch and set the IRQ */
soundlatch_full = 1; soundlatch_full = 1;
cpu_set_input_line(space->machine->cpu[1], 0, ASSERT_LINE); cputag_set_input_line(space->machine, "audiocpu", 0, ASSERT_LINE);
soundlatch_w(space, 0, data & 0xff); soundlatch_w(space, 0, data & 0xff);
} }
} }
@ -162,7 +162,7 @@ static READ8_HANDLER( sound_command_r )
{ {
/* read the latch and clear the IRQ */ /* read the latch and clear the IRQ */
soundlatch_full = 0; soundlatch_full = 0;
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, 0); return soundlatch_r(space, 0);
} }
@ -805,4 +805,3 @@ GAME( 1994, fredmeuk, fredmem, fredmem, fredmem, dcheese, ROT0, "Coastal Amusem
GAME( 1994, fredmemj, fredmem, fredmem, fredmem, dcheese, ROT0, "Coastal Amusements", "Fred Flintstones' Memory Match (Japan, High Score version, 3/20/95)", GAME_SUPPORTS_SAVE ) GAME( 1994, fredmemj, fredmem, fredmem, fredmem, dcheese, ROT0, "Coastal Amusements", "Fred Flintstones' Memory Match (Japan, High Score version, 3/20/95)", GAME_SUPPORTS_SAVE )
GAME( 1994, fredmemc, fredmem, fredmem, fredmem, dcheese, ROT0, "Coastal Amusements", "Fred Flintstones' Memory Match (Mandarin Chinese, 3/17/95)", GAME_SUPPORTS_SAVE ) GAME( 1994, fredmemc, fredmem, fredmem, fredmem, dcheese, ROT0, "Coastal Amusements", "Fred Flintstones' Memory Match (Mandarin Chinese, 3/17/95)", GAME_SUPPORTS_SAVE )
GAME( 1994, fredmesp, fredmem, fredmem, fredmem, dcheese, ROT0, "Coastal Amusements", "Fred Flintstones' Memory Match (Spanish, 3/17/95)", GAME_SUPPORTS_SAVE ) GAME( 1994, fredmesp, fredmem, fredmem, fredmem, dcheese, ROT0, "Coastal Amusements", "Fred Flintstones' Memory Match (Spanish, 3/17/95)", GAME_SUPPORTS_SAVE )

View File

@ -173,7 +173,7 @@ static WRITE8_HANDLER(bg2_w)
static WRITE8_HANDLER( sound_w ) static WRITE8_HANDLER( sound_w )
{ {
soundlatch_w(space,offset,data); soundlatch_w(space,offset,data);
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( i8257_CH0_w ) static WRITE8_HANDLER( i8257_CH0_w )

View File

@ -627,7 +627,7 @@ static READ16_HANDLER( ddealer_mcu_r )
static DRIVER_INIT( ddealer ) static DRIVER_INIT( ddealer )
{ {
memory_install_read16_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM), 0xfe01c, 0xfe01d, 0, 0, ddealer_mcu_r ); memory_install_read16_handler(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), 0xfe01c, 0xfe01d, 0, 0, ddealer_mcu_r );
} }
ROM_START( ddealer ) ROM_START( ddealer )

View File

@ -908,7 +908,7 @@ profiler_mark(PROFILER_VIDEO);
#endif #endif
} }
cpu_set_input_line_and_vector(machine->cpu[0], 0, HOLD_LINE, irq_vector); cputag_set_input_line_and_vector(machine, "maincpu", 0, HOLD_LINE, irq_vector);
break; break;
default: default:
@ -1974,7 +1974,7 @@ static WRITE8_HANDLER( mmpanic_rombank_w )
static WRITE8_HANDLER( mmpanic_soundlatch_w ) static WRITE8_HANDLER( mmpanic_soundlatch_w )
{ {
soundlatch_w(space,0,data); soundlatch_w(space,0,data);
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);
} }
static WRITE8_HANDLER( mmpanic_blitter_w ) static WRITE8_HANDLER( mmpanic_blitter_w )
@ -7896,7 +7896,7 @@ static DRIVER_INIT( rongrong )
version of the game might be a bootleg with the protection version of the game might be a bootleg with the protection
patched. (both sets need this) patched. (both sets need this)
*/ */
memory_install_read8_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM), 0x60d4, 0x60d4, 0, 0, (read8_space_func)SMH_NOP); memory_install_read8_handler(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), 0x60d4, 0x60d4, 0, 0, (read8_space_func)SMH_NOP);
} }
/*************************************************************************** /***************************************************************************

View File

@ -153,11 +153,11 @@ static TIMER_DEVICE_CALLBACK( ddragon_scanline )
/* on the rising edge of VBLK (vcount == F8), signal an NMI */ /* on the rising edge of VBLK (vcount == F8), signal an NMI */
if (vcount == 0xf8) if (vcount == 0xf8)
cpu_set_input_line(timer->machine->cpu[0], INPUT_LINE_NMI, ASSERT_LINE); cputag_set_input_line(timer->machine, "maincpu", INPUT_LINE_NMI, ASSERT_LINE);
/* set 1ms signal on rising edge of vcount & 8 */ /* set 1ms signal on rising edge of vcount & 8 */
if (!(vcount_old & 8) && (vcount & 8)) if (!(vcount_old & 8) && (vcount & 8))
cpu_set_input_line(timer->machine->cpu[0], M6809_FIRQ_LINE, ASSERT_LINE); cputag_set_input_line(timer->machine, "maincpu", M6809_FIRQ_LINE, ASSERT_LINE);
} }
@ -212,7 +212,7 @@ static WRITE8_HANDLER( ddragon_bankswitch_w )
if (data & 0x10) if (data & 0x10)
dd_sub_cpu_busy = 0; dd_sub_cpu_busy = 0;
else if (dd_sub_cpu_busy == 0) else if (dd_sub_cpu_busy == 0)
cpu_set_input_line(space->machine->cpu[1], sprite_irq, (sprite_irq == INPUT_LINE_NMI) ? PULSE_LINE : HOLD_LINE); cputag_set_input_line(space->machine, "sub", sprite_irq, (sprite_irq == INPUT_LINE_NMI) ? PULSE_LINE : HOLD_LINE);
memory_set_bank(space->machine, 1, (data & 0xe0) >> 5); memory_set_bank(space->machine, 1, (data & 0xe0) >> 5);
} }
@ -287,7 +287,7 @@ static WRITE8_HANDLER( darktowr_bankswitch_w )
if (data & 0x10) if (data & 0x10)
dd_sub_cpu_busy = 0; dd_sub_cpu_busy = 0;
else if (dd_sub_cpu_busy == 0) else if (dd_sub_cpu_busy == 0)
cpu_set_input_line(space->machine->cpu[1], sprite_irq, (sprite_irq == INPUT_LINE_NMI) ? PULSE_LINE : HOLD_LINE); cputag_set_input_line(space->machine, "sub", sprite_irq, (sprite_irq == INPUT_LINE_NMI) ? PULSE_LINE : HOLD_LINE);
memory_set_bank(space->machine, 1, newbank); memory_set_bank(space->machine, 1, newbank);
if (newbank == 4 && oldbank != 4) if (newbank == 4 && oldbank != 4)
@ -309,15 +309,15 @@ static WRITE8_HANDLER( ddragon_interrupt_w )
switch (offset) switch (offset)
{ {
case 0: /* 380b - NMI ack */ case 0: /* 380b - NMI ack */
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);
break; break;
case 1: /* 380c - FIRQ ack */ case 1: /* 380c - FIRQ ack */
cpu_set_input_line(space->machine->cpu[0], M6809_FIRQ_LINE, CLEAR_LINE); cputag_set_input_line(space->machine, "maincpu", M6809_FIRQ_LINE, CLEAR_LINE);
break; break;
case 2: /* 380d - IRQ ack */ case 2: /* 380d - IRQ ack */
cpu_set_input_line(space->machine->cpu[0], M6809_IRQ_LINE, CLEAR_LINE); cputag_set_input_line(space->machine, "maincpu", M6809_IRQ_LINE, CLEAR_LINE);
break; break;
case 3: /* 380e - SND irq */ case 3: /* 380e - SND irq */
@ -334,13 +334,13 @@ static WRITE8_HANDLER( ddragon_interrupt_w )
static WRITE8_HANDLER( ddragon2_sub_irq_ack_w ) static WRITE8_HANDLER( ddragon2_sub_irq_ack_w )
{ {
cpu_set_input_line(space->machine->cpu[1], sprite_irq, CLEAR_LINE ); cputag_set_input_line(space->machine, "sub", sprite_irq, CLEAR_LINE );
} }
static WRITE8_HANDLER( ddragon2_sub_irq_w ) static WRITE8_HANDLER( ddragon2_sub_irq_w )
{ {
cpu_set_input_line(space->machine->cpu[0], M6809_IRQ_LINE, ASSERT_LINE); cputag_set_input_line(space->machine, "maincpu", M6809_IRQ_LINE, ASSERT_LINE);
} }
@ -387,8 +387,8 @@ static WRITE8_HANDLER( ddragon_hd63701_internal_registers_w )
it's quite obvious from the Double Dragon 2 code, below). */ it's quite obvious from the Double Dragon 2 code, below). */
if (data & 3) if (data & 3)
{ {
cpu_set_input_line(space->machine->cpu[0], M6809_IRQ_LINE, ASSERT_LINE); cputag_set_input_line(space->machine, "maincpu", M6809_IRQ_LINE, ASSERT_LINE);
cpu_set_input_line(space->machine->cpu[1], sprite_irq, CLEAR_LINE); cputag_set_input_line(space->machine, "sub", sprite_irq, CLEAR_LINE);
} }
} }
} }
@ -413,7 +413,7 @@ static READ8_HANDLER( ddragon_spriteram_r )
static WRITE8_HANDLER( ddragon_spriteram_w ) static WRITE8_HANDLER( ddragon_spriteram_w )
{ {
if (space->cpu == space->machine->cpu[1] && offset == 0) if (space->cpu == cputag_get_cpu(space->machine, "sub") && offset == 0)
dd_sub_cpu_busy = 1; dd_sub_cpu_busy = 1;
ddragon_spriteram[offset] = data; ddragon_spriteram[offset] = data;
@ -566,8 +566,8 @@ ADDRESS_MAP_END
/* might not be 100% accurate, check bits written */ /* might not be 100% accurate, check bits written */
static WRITE8_HANDLER( ddragnba_port_w ) static WRITE8_HANDLER( ddragnba_port_w )
{ {
cpu_set_input_line(space->machine->cpu[0],M6809_IRQ_LINE,ASSERT_LINE); cputag_set_input_line(space->machine, "maincpu", M6809_IRQ_LINE, ASSERT_LINE);
cpu_set_input_line(space->machine->cpu[1],sprite_irq, CLEAR_LINE ); cputag_set_input_line(space->machine, "sub", sprite_irq, CLEAR_LINE );
} }
static ADDRESS_MAP_START( ddragnba_sub_portmap, ADDRESS_SPACE_IO, 8 ) static ADDRESS_MAP_START( ddragnba_sub_portmap, ADDRESS_SPACE_IO, 8 )
@ -1965,7 +1965,7 @@ static DRIVER_INIT( darktowr )
sound_irq = M6809_IRQ_LINE; sound_irq = M6809_IRQ_LINE;
ym_irq = M6809_FIRQ_LINE; ym_irq = M6809_FIRQ_LINE;
technos_video_hw = 0; technos_video_hw = 0;
memory_install_write8_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM), 0x3808, 0x3808, 0, 0, darktowr_bankswitch_w); memory_install_write8_handler(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), 0x3808, 0x3808, 0, 0, darktowr_bankswitch_w);
} }
@ -1977,7 +1977,7 @@ static DRIVER_INIT( toffy )
sound_irq = M6809_IRQ_LINE; sound_irq = M6809_IRQ_LINE;
ym_irq = M6809_FIRQ_LINE; ym_irq = M6809_FIRQ_LINE;
technos_video_hw = 0; technos_video_hw = 0;
memory_install_write8_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM), 0x3808, 0x3808, 0, 0, toffy_bankswitch_w); memory_install_write8_handler(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), 0x3808, 0x3808, 0, 0, toffy_bankswitch_w);
/* the program rom has a simple bitswap encryption */ /* the program rom has a simple bitswap encryption */
rom = memory_region(machine, "maincpu"); rom = memory_region(machine, "maincpu");

View File

@ -184,25 +184,25 @@ static WRITE16_HANDLER( ddragon3_io16_w )
case 1: /* soundlatch_w */ case 1: /* soundlatch_w */
soundlatch_w(space, 1, reg[1] & 0xff); soundlatch_w(space, 1, reg[1] & 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 );
break; break;
case 2: case 2:
/* this gets written to on startup and at the end of IRQ6 /* this gets written to on startup and at the end of IRQ6
** possibly trigger IRQ on sound CPU ** possibly trigger IRQ on sound CPU
*/ */
cpu_set_input_line(space->machine->cpu[0], 6, CLEAR_LINE); cputag_set_input_line(space->machine, "maincpu", 6, CLEAR_LINE);
break; break;
case 3: case 3:
/* this gets written to on startup, /* this gets written to on startup,
** and at the end of IRQ5 (input port read) */ ** and at the end of IRQ5 (input port read) */
cpu_set_input_line(space->machine->cpu[0], 5, CLEAR_LINE); cputag_set_input_line(space->machine, "maincpu", 5, CLEAR_LINE);
break; break;
case 4: case 4:
/* this gets written to at the end of IRQ6 only */ /* this gets written to at the end of IRQ6 only */
cpu_set_input_line(space->machine->cpu[0], 6, CLEAR_LINE); cputag_set_input_line(space->machine, "maincpu", 6, CLEAR_LINE);
break; break;
default: default:
@ -526,7 +526,7 @@ GFXDECODE_END
static void dd3_ymirq_handler(const device_config *device, int irq) static void dd3_ymirq_handler(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 ym2151_interface ym2151_config = static const ym2151_interface ym2151_config =
@ -549,14 +549,14 @@ static TIMER_DEVICE_CALLBACK( ddragon3_scanline )
{ {
if (scanline > 0) if (scanline > 0)
video_screen_update_partial(timer->machine->primary_screen, scanline - 1); video_screen_update_partial(timer->machine->primary_screen, scanline - 1);
cpu_set_input_line(timer->machine->cpu[0], 5, ASSERT_LINE); cputag_set_input_line(timer->machine, "maincpu", 5, ASSERT_LINE);
} }
/* Vblank is raised on scanline 248 */ /* Vblank is raised on scanline 248 */
if (scanline == 248) if (scanline == 248)
{ {
video_screen_update_partial(timer->machine->primary_screen, scanline - 1); video_screen_update_partial(timer->machine->primary_screen, scanline - 1);
cpu_set_input_line(timer->machine->cpu[0], 6, ASSERT_LINE); cputag_set_input_line(timer->machine, "maincpu", 6, ASSERT_LINE);
} }
} }

View File

@ -411,8 +411,8 @@ static DRIVER_INIT( ghunter )
seibu_sound_decrypt(machine, "audiocpu", 0x2000); seibu_sound_decrypt(machine, "audiocpu", 0x2000);
seibu_adpcm_decrypt(machine, "adpcm"); seibu_adpcm_decrypt(machine, "adpcm");
memory_install_read16_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM), 0x80000, 0x80001, 0, 0, ghunter_trackball_low_r); memory_install_read16_handler(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), 0x80000, 0x80001, 0, 0, ghunter_trackball_low_r);
memory_install_read16_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM), 0xb0000, 0xb0001, 0, 0, ghunter_trackball_high_r); memory_install_read16_handler(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), 0xb0000, 0xb0001, 0, 0, ghunter_trackball_high_r);
} }
/* Game Drivers */ /* Game Drivers */

View File

@ -78,7 +78,7 @@ static WRITE16_HANDLER( dec0_control_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);
} }
break; break;
@ -116,7 +116,7 @@ static WRITE16_HANDLER( automat_control_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], 0 ,HOLD_LINE); cputag_set_input_line(space->machine, "audiocpu", 0, HOLD_LINE);
} }
break; break;
@ -143,12 +143,13 @@ static WRITE16_HANDLER( automat_control_w )
static WRITE16_HANDLER( slyspy_control_w ) static WRITE16_HANDLER( slyspy_control_w )
{ {
switch (offset<<1) { switch (offset << 1)
{
case 0: case 0:
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);
} }
break; break;
case 2: case 2:
@ -162,7 +163,7 @@ static WRITE16_HANDLER( midres_sound_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);
} }
} }
@ -944,12 +945,12 @@ GFXDECODE_END
static void sound_irq(const device_config *device, int linestate) static void sound_irq(const device_config *device, int linestate)
{ {
cpu_set_input_line(device->machine->cpu[1],0,linestate); /* IRQ */ cputag_set_input_line(device->machine, "audiocpu", 0, linestate); /* IRQ */
} }
static void sound_irq2(const device_config *device, int linestate) static void sound_irq2(const device_config *device, int linestate)
{ {
cpu_set_input_line(device->machine->cpu[1],1,linestate); /* IRQ2 */ cputag_set_input_line(device->machine, "audiocpu", 1, linestate); /* IRQ2 */
} }
static const ym3812_interface ym3812_config = static const ym3812_interface ym3812_config =
@ -974,7 +975,7 @@ static void automat_vclk_cb(const device_config *device)
else else
{ {
msm5205_data_w(device, automat_adpcm_byte >> 4); msm5205_data_w(device, automat_adpcm_byte >> 4);
cpu_set_input_line(device->machine->cpu[1], INPUT_LINE_NMI, PULSE_LINE); cputag_set_input_line(device->machine, "maincpu", INPUT_LINE_NMI, PULSE_LINE);
} }
automat_msm5205_vclk_toggle ^= 1; automat_msm5205_vclk_toggle ^= 1;

View File

@ -56,7 +56,7 @@ static int msm5205next;
/* Only used by ghostb, gondo, garyoret, other games can control buffering */ /* Only used by ghostb, gondo, garyoret, other games can control buffering */
static VIDEO_EOF( dec8 ) static VIDEO_EOF( dec8 )
{ {
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);
} }
@ -81,7 +81,8 @@ static READ8_HANDLER( gondo_player_1_r )
{ {
int val = 1 << input_port_read(space->machine, "AN0"); int val = 1 << input_port_read(space->machine, "AN0");
switch (offset) { switch (offset)
{
case 0: /* Rotary low byte */ case 0: /* Rotary low byte */
return ~(val & 0xff); return ~(val & 0xff);
case 1: /* Joystick = bottom 4 bits, rotary = top 4 */ case 1: /* Joystick = bottom 4 bits, rotary = top 4 */
@ -94,7 +95,8 @@ static READ8_HANDLER( gondo_player_2_r )
{ {
int val = 1 << input_port_read(space->machine, "AN1"); int val = 1 << input_port_read(space->machine, "AN1");
switch (offset) { switch (offset)
{
case 0: /* Rotary low byte */ case 0: /* Rotary low byte */
return ~(val & 0xff); return ~(val & 0xff);
case 1: /* Joystick = bottom 4 bits, rotary = top 4 */ case 1: /* Joystick = bottom 4 bits, rotary = top 4 */
@ -109,7 +111,8 @@ static WRITE8_HANDLER( ghostb_i8751_w )
{ {
i8751_return = 0; i8751_return = 0;
switch (offset) { switch (offset)
{
case 0: /* High byte */ case 0: /* High byte */
i8751_value = (i8751_value & 0xff) | (data << 8); i8751_value = (i8751_value & 0xff) | (data << 8);
break; break;
@ -128,7 +131,8 @@ static WRITE8_HANDLER( srdarwin_i8751_w )
static int coins, latch; static int coins, latch;
i8751_return = 0; i8751_return = 0;
switch (offset) { switch (offset)
{
case 0: /* High byte */ case 0: /* High byte */
i8751_value = (i8751_value & 0xff) | (data << 8); i8751_value = (i8751_value & 0xff) | (data << 8);
break; break;
@ -201,10 +205,12 @@ static WRITE8_HANDLER( gondo_i8751_w )
static int coin1, coin2, latch,snd; static int coin1, coin2, latch,snd;
i8751_return = 0; i8751_return = 0;
switch (offset) { switch (offset)
{
case 0: /* High byte */ case 0: /* High byte */
i8751_value = (i8751_value & 0xff) | (data << 8); i8751_value = (i8751_value & 0xff) | (data << 8);
if (int_enable) cpu_set_input_line (space->machine->cpu[0], M6809_IRQ_LINE, HOLD_LINE); /* IRQ on *high* byte only */ if (int_enable)
cputag_set_input_line (space->machine, "maincpu", M6809_IRQ_LINE, HOLD_LINE); /* IRQ on *high* byte only */
break; break;
case 1: /* Low byte */ case 1: /* Low byte */
i8751_value = (i8751_value & 0xff00) | data; i8751_value = (i8751_value & 0xff00) | data;
@ -234,10 +240,11 @@ static WRITE8_HANDLER( shackled_i8751_w )
static int coin1, coin2, latch = 0; static int coin1, coin2, latch = 0;
i8751_return = 0; i8751_return = 0;
switch (offset) { switch (offset)
{
case 0: /* High byte */ case 0: /* High byte */
i8751_value = (i8751_value & 0xff) | (data << 8); i8751_value = (i8751_value & 0xff) | (data << 8);
cpu_set_input_line (space->machine->cpu[1], M6809_FIRQ_LINE, HOLD_LINE); /* Signal main cpu */ cputag_set_input_line(space->machine, "sub", M6809_FIRQ_LINE, HOLD_LINE); /* Signal main cpu */
break; break;
case 1: /* Low byte */ case 1: /* Low byte */
i8751_value = (i8751_value & 0xff00) | data; i8751_value = (i8751_value & 0xff00) | data;
@ -262,10 +269,11 @@ static WRITE8_HANDLER( lastmiss_i8751_w )
static int coin, latch = 0, snd; static int coin, latch = 0, snd;
i8751_return = 0; i8751_return = 0;
switch (offset) { switch (offset)
{
case 0: /* High byte */ case 0: /* High byte */
i8751_value = (i8751_value & 0xff) | (data << 8); i8751_value = (i8751_value & 0xff) | (data << 8);
cpu_set_input_line (space->machine->cpu[0], M6809_FIRQ_LINE, HOLD_LINE); /* Signal main cpu */ cputag_set_input_line(space->machine, "maincpu", M6809_FIRQ_LINE, HOLD_LINE); /* Signal main cpu */
break; break;
case 1: /* Low byte */ case 1: /* Low byte */
i8751_value = (i8751_value & 0xff00) | data; i8751_value = (i8751_value & 0xff00) | data;
@ -293,10 +301,11 @@ static WRITE8_HANDLER( csilver_i8751_w )
static int coin, latch = 0, snd; static int coin, latch = 0, snd;
i8751_return = 0; i8751_return = 0;
switch (offset) { switch (offset)
{
case 0: /* High byte */ case 0: /* High byte */
i8751_value = (i8751_value & 0xff) | (data << 8); i8751_value = (i8751_value & 0xff) | (data << 8);
cpu_set_input_line (space->machine->cpu[0], M6809_FIRQ_LINE, HOLD_LINE); /* Signal main cpu */ cputag_set_input_line (space->machine, "maincpu", M6809_FIRQ_LINE, HOLD_LINE); /* Signal main cpu */
break; break;
case 1: /* Low byte */ case 1: /* Low byte */
i8751_value = (i8751_value & 0xff00) | data; i8751_value = (i8751_value & 0xff00) | data;
@ -322,7 +331,8 @@ static WRITE8_HANDLER( garyoret_i8751_w )
static int coin1, coin2, latch; static int coin1, coin2, latch;
i8751_return = 0; i8751_return = 0;
switch (offset) { switch (offset)
{
case 0: /* High byte */ case 0: /* High byte */
i8751_value = (i8751_value & 0xff) | (data << 8); i8751_value = (i8751_value & 0xff) | (data << 8);
break; break;
@ -393,13 +403,7 @@ static WRITE8_HANDLER( csilver_control_w )
static WRITE8_HANDLER( dec8_sound_w ) static WRITE8_HANDLER( dec8_sound_w )
{ {
soundlatch_w(space, 0, data); soundlatch_w(space, 0, 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( oscar_sound_w )
{
soundlatch_w(space,0,data);
cpu_set_input_line(space->machine->cpu[2],INPUT_LINE_NMI,PULSE_LINE);
} }
static void csilver_adpcm_int(const device_config *device) static void csilver_adpcm_int(const device_config *device)
@ -408,7 +412,7 @@ static void csilver_adpcm_int(const device_config *device)
toggle ^= 1; toggle ^= 1;
if (toggle) if (toggle)
cpu_set_input_line(device->machine->cpu[2],M6502_IRQ_LINE,HOLD_LINE); cpu_set_input_line(device->machine, "audiocpu", M6502_IRQ_LINE, HOLD_LINE);
msm5205_data_w(device, msm5205next >> 4); msm5205_data_w(device, msm5205next >> 4);
msm5205next <<= 4; msm5205next <<= 4;
@ -429,8 +433,10 @@ static WRITE8_HANDLER( csilver_sound_bank_w )
{ {
UINT8 *RAM = memory_region(space->machine, "audiocpu"); UINT8 *RAM = memory_region(space->machine, "audiocpu");
if (data&8) { memory_set_bankptr(space->machine, 3,&RAM[0x14000]); } if (data & 8)
else { memory_set_bankptr(space->machine, 3,&RAM[0x10000]); } memory_set_bankptr(space->machine, 3, &RAM[0x14000]);
else
memory_set_bankptr(space->machine, 3, &RAM[0x10000]);
} }
/******************************************************************************/ /******************************************************************************/
@ -438,18 +444,19 @@ static WRITE8_HANDLER( csilver_sound_bank_w )
static WRITE8_HANDLER( oscar_int_w ) static WRITE8_HANDLER( oscar_int_w )
{ {
/* Deal with interrupts, coins also generate NMI to CPU 0 */ /* Deal with interrupts, coins also generate NMI to CPU 0 */
switch (offset) { switch (offset)
{
case 0: /* IRQ2 */ case 0: /* IRQ2 */
cpu_set_input_line(space->machine->cpu[1],M6809_IRQ_LINE,ASSERT_LINE); cputag_set_input_line(space->machine, "sub", M6809_IRQ_LINE, ASSERT_LINE);
return; return;
case 1: /* IRC 1 */ case 1: /* IRC 1 */
cpu_set_input_line(space->machine->cpu[0],M6809_IRQ_LINE,CLEAR_LINE); cputag_set_input_line(space->machine, "maincpu", M6809_IRQ_LINE, CLEAR_LINE);
return; return;
case 2: /* IRQ 1 */ case 2: /* IRQ 1 */
cpu_set_input_line(space->machine->cpu[0],M6809_IRQ_LINE,ASSERT_LINE); cputag_set_input_line(space->machine, "maincpu", M6809_IRQ_LINE, ASSERT_LINE);
return; return;
case 3: /* IRC 2 */ case 3: /* IRC 2 */
cpu_set_input_line(space->machine->cpu[1],M6809_IRQ_LINE,CLEAR_LINE); cputag_set_input_line(space->machine, "sub", M6809_IRQ_LINE, CLEAR_LINE);
return; return;
} }
} }
@ -461,25 +468,27 @@ static WRITE8_HANDLER( shackled_int_w )
/* This is correct, but the cpus in Shackled need an interleave of about 5000! /* This is correct, but the cpus in Shackled need an interleave of about 5000!
With lower interleave CPU 0 misses an interrupt at the start of the game With lower interleave CPU 0 misses an interrupt at the start of the game
(The last interrupt has not finished and been ack'd when the new one occurs */ (The last interrupt has not finished and been ack'd when the new one occurs */
switch (offset) { switch (offset)
{
case 0: /* CPU 2 - IRQ acknowledge */ case 0: /* CPU 2 - IRQ acknowledge */
cpu_set_input_line(space->machine->cpu[1],M6809_IRQ_LINE,CLEAR_LINE); cputag_set_input_line(space->machine, "sub", M6809_IRQ_LINE, CLEAR_LINE);
return; return;
case 1: /* CPU 1 - IRQ acknowledge */ case 1: /* CPU 1 - IRQ acknowledge */
cpu_set_input_line(space->machine->cpu[0],M6809_IRQ_LINE,CLEAR_LINE); cputag_set_input_line(space->machine, "maincpu", M6809_IRQ_LINE, CLEAR_LINE);
return; return;
case 2: /* i8751 - FIRQ acknowledge */ case 2: /* i8751 - FIRQ acknowledge */
return; return;
case 3: /* IRQ 1 */ case 3: /* IRQ 1 */
cpu_set_input_line(space->machine->cpu[0],M6809_IRQ_LINE,ASSERT_LINE); cputag_set_input_line(space->machine, "maincpu", M6809_IRQ_LINE, ASSERT_LINE);
return; return;
case 4: /* IRQ 2 */ case 4: /* IRQ 2 */
cpu_set_input_line(space->machine->cpu[1],M6809_IRQ_LINE,ASSERT_LINE); cputag_set_input_line(space->machine, "sub", M6809_IRQ_LINE, ASSERT_LINE);
return; return;
} }
#endif #endif
switch (offset) { switch (offset)
{
case 0: /* CPU 2 - IRQ acknowledge */ case 0: /* CPU 2 - IRQ acknowledge */
return; return;
case 1: /* CPU 1 - IRQ acknowledge */ case 1: /* CPU 1 - IRQ acknowledge */
@ -487,10 +496,10 @@ static WRITE8_HANDLER( shackled_int_w )
case 2: /* i8751 - FIRQ acknowledge */ case 2: /* i8751 - FIRQ acknowledge */
return; return;
case 3: /* IRQ 1 */ case 3: /* IRQ 1 */
cpu_set_input_line (space->machine->cpu[0], M6809_IRQ_LINE, HOLD_LINE); cputag_set_input_line (space->machine, "maincpu", M6809_IRQ_LINE, HOLD_LINE);
return; return;
case 4: /* IRQ 2 */ case 4: /* IRQ 2 */
cpu_set_input_line (space->machine->cpu[1], M6809_IRQ_LINE, HOLD_LINE); cputag_set_input_line (space->machine, "sub", M6809_IRQ_LINE, HOLD_LINE);
return; return;
} }
} }
@ -612,7 +621,7 @@ static ADDRESS_MAP_START( oscar_map, ADDRESS_SPACE_PROGRAM, 8 )
AM_RANGE(0x3c00, 0x3c1f) AM_WRITE(dec8_bac06_0_w) AM_RANGE(0x3c00, 0x3c1f) AM_WRITE(dec8_bac06_0_w)
AM_RANGE(0x3c80, 0x3c80) AM_WRITE(buffer_spriteram_w) /* DMA */ AM_RANGE(0x3c80, 0x3c80) AM_WRITE(buffer_spriteram_w) /* DMA */
AM_RANGE(0x3d00, 0x3d00) AM_WRITE(dec8_bank_w) /* BNKS */ AM_RANGE(0x3d00, 0x3d00) AM_WRITE(dec8_bank_w) /* BNKS */
AM_RANGE(0x3d80, 0x3d80) AM_WRITE(oscar_sound_w) /* SOUN */ AM_RANGE(0x3d80, 0x3d80) AM_WRITE(dec8_sound_w) /* SOUN */
AM_RANGE(0x3e00, 0x3e00) AM_WRITENOP /* COINCL */ AM_RANGE(0x3e00, 0x3e00) AM_WRITENOP /* COINCL */
AM_RANGE(0x3e80, 0x3e83) AM_WRITE(oscar_int_w) AM_RANGE(0x3e80, 0x3e83) AM_WRITE(oscar_int_w)
AM_RANGE(0x4000, 0x7fff) AM_ROMBANK(1) AM_RANGE(0x4000, 0x7fff) AM_ROMBANK(1)
@ -642,7 +651,7 @@ static ADDRESS_MAP_START( lastmiss_map, ADDRESS_SPACE_PROGRAM, 8 )
AM_RANGE(0x1807, 0x1807) AM_READWRITE(i8751_l_r, flip_screen_w) AM_RANGE(0x1807, 0x1807) AM_READWRITE(i8751_l_r, flip_screen_w)
AM_RANGE(0x1809, 0x1809) AM_WRITE(lastmiss_scrollx_w) /* Scroll LSB */ AM_RANGE(0x1809, 0x1809) AM_WRITE(lastmiss_scrollx_w) /* Scroll LSB */
AM_RANGE(0x180b, 0x180b) AM_WRITE(lastmiss_scrolly_w) /* Scroll LSB */ AM_RANGE(0x180b, 0x180b) AM_WRITE(lastmiss_scrolly_w) /* Scroll LSB */
AM_RANGE(0x180c, 0x180c) AM_WRITE(oscar_sound_w) AM_RANGE(0x180c, 0x180c) AM_WRITE(dec8_sound_w)
AM_RANGE(0x180d, 0x180d) AM_WRITE(lastmiss_control_w) /* Bank switch + Scroll MSB */ AM_RANGE(0x180d, 0x180d) AM_WRITE(lastmiss_control_w) /* Bank switch + Scroll MSB */
AM_RANGE(0x180e, 0x180f) AM_WRITE(lastmiss_i8751_w) AM_RANGE(0x180e, 0x180f) AM_WRITE(lastmiss_i8751_w)
AM_RANGE(0x2000, 0x27ff) AM_RAM_WRITE(dec8_videoram_w) AM_BASE(&videoram) AM_SIZE(&videoram_size) AM_RANGE(0x2000, 0x27ff) AM_RAM_WRITE(dec8_videoram_w) AM_BASE(&videoram) AM_SIZE(&videoram_size)
@ -665,7 +674,7 @@ static ADDRESS_MAP_START( lastmiss_sub_map, ADDRESS_SPACE_PROGRAM, 8 )
AM_RANGE(0x1800, 0x1804) AM_WRITE(shackled_int_w) AM_RANGE(0x1800, 0x1804) AM_WRITE(shackled_int_w)
AM_RANGE(0x1805, 0x1805) AM_WRITE(buffer_spriteram_w) /* DMA */ AM_RANGE(0x1805, 0x1805) AM_WRITE(buffer_spriteram_w) /* DMA */
AM_RANGE(0x1807, 0x1807) AM_WRITE(flip_screen_w) AM_RANGE(0x1807, 0x1807) AM_WRITE(flip_screen_w)
AM_RANGE(0x180c, 0x180c) AM_WRITE(oscar_sound_w) AM_RANGE(0x180c, 0x180c) AM_WRITE(dec8_sound_w)
AM_RANGE(0x2000, 0x27ff) AM_READ(SMH_RAM) AM_WRITE(dec8_videoram_w) AM_RANGE(0x2000, 0x27ff) AM_READ(SMH_RAM) AM_WRITE(dec8_videoram_w)
AM_RANGE(0x2800, 0x2fff) AM_WRITE(shackled_sprite_w) AM_RANGE(0x2800, 0x2fff) AM_WRITE(shackled_sprite_w)
AM_RANGE(0x3000, 0x37ff) AM_RAM AM_SHARE(2) AM_RANGE(0x3000, 0x37ff) AM_RAM AM_SHARE(2)
@ -687,7 +696,7 @@ static ADDRESS_MAP_START( shackled_map, ADDRESS_SPACE_PROGRAM, 8 )
AM_RANGE(0x1807, 0x1807) AM_WRITE(flip_screen_w) AM_RANGE(0x1807, 0x1807) AM_WRITE(flip_screen_w)
AM_RANGE(0x1809, 0x1809) AM_WRITE(lastmiss_scrollx_w) /* Scroll LSB */ AM_RANGE(0x1809, 0x1809) AM_WRITE(lastmiss_scrollx_w) /* Scroll LSB */
AM_RANGE(0x180b, 0x180b) AM_WRITE(lastmiss_scrolly_w) /* Scroll LSB */ AM_RANGE(0x180b, 0x180b) AM_WRITE(lastmiss_scrolly_w) /* Scroll LSB */
AM_RANGE(0x180c, 0x180c) AM_WRITE(oscar_sound_w) AM_RANGE(0x180c, 0x180c) AM_WRITE(dec8_sound_w)
AM_RANGE(0x180d, 0x180d) AM_WRITE(shackled_control_w) /* Bank switch + Scroll MSB */ AM_RANGE(0x180d, 0x180d) AM_WRITE(shackled_control_w) /* Bank switch + Scroll MSB */
AM_RANGE(0x2000, 0x27ff) AM_READ(SMH_RAM) AM_WRITE(dec8_videoram_w) AM_RANGE(0x2000, 0x27ff) AM_READ(SMH_RAM) AM_WRITE(dec8_videoram_w)
AM_RANGE(0x2800, 0x2fff) AM_READWRITE(shackled_sprite_r, shackled_sprite_w) AM_RANGE(0x2800, 0x2fff) AM_READWRITE(shackled_sprite_r, shackled_sprite_w)
@ -712,7 +721,7 @@ static ADDRESS_MAP_START( shackled_sub_map, ADDRESS_SPACE_PROGRAM, 8 )
AM_RANGE(0x1807, 0x1807) AM_READWRITE(i8751_l_r, flip_screen_w) AM_RANGE(0x1807, 0x1807) AM_READWRITE(i8751_l_r, flip_screen_w)
AM_RANGE(0x1809, 0x1809) AM_WRITE(lastmiss_scrollx_w) /* Scroll LSB */ AM_RANGE(0x1809, 0x1809) AM_WRITE(lastmiss_scrollx_w) /* Scroll LSB */
AM_RANGE(0x180b, 0x180b) AM_WRITE(lastmiss_scrolly_w) /* Scroll LSB */ AM_RANGE(0x180b, 0x180b) AM_WRITE(lastmiss_scrolly_w) /* Scroll LSB */
AM_RANGE(0x180c, 0x180c) AM_WRITE(oscar_sound_w) AM_RANGE(0x180c, 0x180c) AM_WRITE(dec8_sound_w)
AM_RANGE(0x180d, 0x180d) AM_WRITE(shackled_control_w) /* Bank switch + Scroll MSB */ AM_RANGE(0x180d, 0x180d) AM_WRITE(shackled_control_w) /* Bank switch + Scroll MSB */
AM_RANGE(0x180e, 0x180f) AM_WRITE(shackled_i8751_w) AM_RANGE(0x180e, 0x180f) AM_WRITE(shackled_i8751_w)
AM_RANGE(0x2000, 0x27ff) AM_RAM_WRITE(dec8_videoram_w) AM_BASE(&videoram) AM_SIZE(&videoram_size) AM_RANGE(0x2000, 0x27ff) AM_RAM_WRITE(dec8_videoram_w) AM_BASE(&videoram) AM_SIZE(&videoram_size)
@ -734,7 +743,7 @@ static ADDRESS_MAP_START( csilver_map, ADDRESS_SPACE_PROGRAM, 8 )
AM_RANGE(0x1805, 0x1805) AM_READ_PORT("DSW0") AM_WRITE(buffer_spriteram_w) /* Dip 1, DMA */ AM_RANGE(0x1805, 0x1805) AM_READ_PORT("DSW0") AM_WRITE(buffer_spriteram_w) /* Dip 1, DMA */
AM_RANGE(0x1807, 0x1807) AM_WRITE(flip_screen_w) AM_RANGE(0x1807, 0x1807) AM_WRITE(flip_screen_w)
AM_RANGE(0x1808, 0x180b) AM_WRITE(dec8_scroll2_w) AM_RANGE(0x1808, 0x180b) AM_WRITE(dec8_scroll2_w)
AM_RANGE(0x180c, 0x180c) AM_WRITE(oscar_sound_w) AM_RANGE(0x180c, 0x180c) AM_WRITE(dec8_sound_w)
AM_RANGE(0x180d, 0x180d) AM_WRITE(csilver_control_w) AM_RANGE(0x180d, 0x180d) AM_WRITE(csilver_control_w)
AM_RANGE(0x180e, 0x180f) AM_WRITE(csilver_i8751_w) AM_RANGE(0x180e, 0x180f) AM_WRITE(csilver_i8751_w)
AM_RANGE(0x1c00, 0x1c00) AM_READ(i8751_h_r) AM_RANGE(0x1c00, 0x1c00) AM_READ(i8751_h_r)
@ -755,7 +764,7 @@ static ADDRESS_MAP_START( csilver_sub_map, ADDRESS_SPACE_PROGRAM, 8 )
AM_RANGE(0x1804, 0x1804) AM_READ_PORT("DSW1") AM_RANGE(0x1804, 0x1804) AM_READ_PORT("DSW1")
AM_RANGE(0x1800, 0x1804) AM_WRITE(shackled_int_w) AM_RANGE(0x1800, 0x1804) AM_WRITE(shackled_int_w)
AM_RANGE(0x1805, 0x1805) AM_READ_PORT("DSW0") AM_WRITE(buffer_spriteram_w) /* DMA */ AM_RANGE(0x1805, 0x1805) AM_READ_PORT("DSW0") AM_WRITE(buffer_spriteram_w) /* DMA */
AM_RANGE(0x180c, 0x180c) AM_WRITE(oscar_sound_w) AM_RANGE(0x180c, 0x180c) AM_WRITE(dec8_sound_w)
AM_RANGE(0x2000, 0x27ff) AM_RAM_WRITE(dec8_videoram_w) AM_BASE(&videoram) AM_SIZE(&videoram_size) AM_RANGE(0x2000, 0x27ff) AM_RAM_WRITE(dec8_videoram_w) AM_BASE(&videoram) AM_SIZE(&videoram_size)
AM_RANGE(0x2800, 0x2fff) AM_RAM AM_BASE(&spriteram) AM_SIZE(&spriteram_size) AM_RANGE(0x2800, 0x2fff) AM_RAM AM_BASE(&spriteram) AM_SIZE(&spriteram_size)
AM_RANGE(0x3000, 0x37ff) AM_RAM AM_SHARE(2) AM_RANGE(0x3000, 0x37ff) AM_RAM AM_SHARE(2)
@ -1823,12 +1832,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],0,linestate); /* M6502_IRQ_LINE */ cputag_set_input_line(device->machine, "audiocpu", 0, linestate); /* M6502_IRQ_LINE */
}
static void oscar_irqhandler(const device_config *device, int linestate)
{
cpu_set_input_line(device->machine->cpu[2],0,linestate); /* M6502_IRQ_LINE */
} }
static const ym3526_interface ym3526_config = static const ym3526_interface ym3526_config =
@ -1836,11 +1840,6 @@ static const ym3526_interface ym3526_config =
irqhandler irqhandler
}; };
static const ym3526_interface oscar_ym3526_interface =
{
oscar_irqhandler
};
static const ym3812_interface ym3812_config = static const ym3812_interface ym3812_config =
{ {
irqhandler irqhandler
@ -1885,7 +1884,8 @@ static INTERRUPT_GEN( oscar_interrupt )
static int latch = 1; static int latch = 1;
if ((input_port_read(device->machine, "IN2") & 0x7) == 0x7) latch = 1; if ((input_port_read(device->machine, "IN2") & 0x7) == 0x7) latch = 1;
if (latch && (input_port_read(device->machine, "IN2") & 0x7) != 0x7) { if (latch && (input_port_read(device->machine, "IN2") & 0x7) != 0x7)
{
latch = 0; latch = 0;
cpu_set_input_line(device, INPUT_LINE_NMI, PULSE_LINE); cpu_set_input_line(device, INPUT_LINE_NMI, PULSE_LINE);
} }
@ -2101,7 +2101,7 @@ static MACHINE_DRIVER_START( oscar )
MDRV_SOUND_ROUTE(3, "mono", 0.20) MDRV_SOUND_ROUTE(3, "mono", 0.20)
MDRV_SOUND_ADD("ym2", YM3526, XTAL_12MHz/4) /* verified on pcb */ MDRV_SOUND_ADD("ym2", YM3526, XTAL_12MHz/4) /* verified on pcb */
MDRV_SOUND_CONFIG(oscar_ym3526_interface) MDRV_SOUND_CONFIG(ym3526_interface)
MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.70) MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.70)
MACHINE_DRIVER_END MACHINE_DRIVER_END
@ -2145,7 +2145,7 @@ static MACHINE_DRIVER_START( lastmiss )
MDRV_SOUND_ROUTE(3, "mono", 0.20) MDRV_SOUND_ROUTE(3, "mono", 0.20)
MDRV_SOUND_ADD("ym2", YM3526, 3000000) MDRV_SOUND_ADD("ym2", YM3526, 3000000)
MDRV_SOUND_CONFIG(oscar_ym3526_interface) MDRV_SOUND_CONFIG(ym3526_interface)
MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.70) MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.70)
MACHINE_DRIVER_END MACHINE_DRIVER_END
@ -2189,7 +2189,7 @@ static MACHINE_DRIVER_START( shackled )
MDRV_SOUND_ROUTE(3, "mono", 0.20) MDRV_SOUND_ROUTE(3, "mono", 0.20)
MDRV_SOUND_ADD("ym2", YM3526, 3000000) MDRV_SOUND_ADD("ym2", YM3526, 3000000)
MDRV_SOUND_CONFIG(oscar_ym3526_interface) MDRV_SOUND_CONFIG(ym3526_interface)
MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.70) MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.70)
MACHINE_DRIVER_END MACHINE_DRIVER_END
@ -2234,7 +2234,7 @@ static MACHINE_DRIVER_START( csilver )
MDRV_SOUND_ROUTE(3, "mono", 0.20) MDRV_SOUND_ROUTE(3, "mono", 0.20)
MDRV_SOUND_ADD("ym2", YM3526, XTAL_12MHz/4) /* verified on pcb */ MDRV_SOUND_ADD("ym2", YM3526, XTAL_12MHz/4) /* verified on pcb */
MDRV_SOUND_CONFIG(oscar_ym3526_interface) MDRV_SOUND_CONFIG(ym3526_interface)
MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.70) MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.70)
MDRV_SOUND_ADD("msm", MSM5205, XTAL_384kHz) /* verified on pcb */ MDRV_SOUND_ADD("msm", MSM5205, XTAL_384kHz) /* verified on pcb */

View File

@ -253,16 +253,17 @@ static TIMER_CALLBACK( interrupt_gen )
deco32_raster_display_list[deco32_raster_display_position++]=deco32_pf12_control[3]&0xffff; deco32_raster_display_list[deco32_raster_display_position++]=deco32_pf12_control[3]&0xffff;
deco32_raster_display_list[deco32_raster_display_position++]=deco32_pf12_control[4]&0xffff; deco32_raster_display_list[deco32_raster_display_position++]=deco32_pf12_control[4]&0xffff;
cpu_set_input_line(machine->cpu[0], ARM_IRQ_LINE, HOLD_LINE); cputag_set_input_line(machine, "maincpu", ARM_IRQ_LINE, HOLD_LINE);
} }
static READ32_HANDLER( deco32_irq_controller_r ) static READ32_HANDLER( deco32_irq_controller_r )
{ {
int vblank; int vblank;
switch (offset) { switch (offset)
{
case 2: /* Raster IRQ ACK - value read is not used */ case 2: /* Raster IRQ ACK - value read is not used */
cpu_set_input_line(space->machine->cpu[0], ARM_IRQ_LINE, CLEAR_LINE); cputag_set_input_line(space->machine, "maincpu", ARM_IRQ_LINE, CLEAR_LINE);
return 0; return 0;
case 3: /* Irq controller case 3: /* Irq controller
@ -316,7 +317,7 @@ static WRITE32_HANDLER( deco32_irq_controller_w )
static WRITE32_HANDLER( deco32_sound_w ) static WRITE32_HANDLER( deco32_sound_w )
{ {
soundlatch_w(space,0,data & 0xff); soundlatch_w(space,0,data & 0xff);
cpu_set_input_line(space->machine->cpu[1],0,HOLD_LINE); cputag_set_input_line(space->machine, "audiocpu", 0, HOLD_LINE);
} }
static READ32_HANDLER( deco32_71_r ) static READ32_HANDLER( deco32_71_r )
@ -598,9 +599,9 @@ static WRITE32_HANDLER( tattass_control_w )
/* Sound board reset control */ /* Sound board reset control */
if (data&0x80) if (data&0x80)
cpu_set_input_line(space->machine->cpu[1], INPUT_LINE_RESET, CLEAR_LINE); cputag_set_input_line(space->machine, "audiocpu", 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, "audiocpu", INPUT_LINE_RESET, ASSERT_LINE);
/* bit 0x4 fade cancel? */ /* bit 0x4 fade cancel? */
/* bit 0x8 ?? */ /* bit 0x8 ?? */
@ -647,7 +648,7 @@ static WRITE32_HANDLER( nslasher_prot_w )
/* bit 1 of nslasher_sound_irq specifies IRQ command writes */ /* bit 1 of nslasher_sound_irq specifies IRQ command writes */
soundlatch_w(space,0,(data>>16)&0xff); soundlatch_w(space,0,(data>>16)&0xff);
nslasher_sound_irq |= 0x02; nslasher_sound_irq |= 0x02;
cpu_set_input_line(space->machine->cpu[1], 0, (nslasher_sound_irq != 0) ? ASSERT_LINE : CLEAR_LINE); cputag_set_input_line(space->machine, "audiocpu", 0, (nslasher_sound_irq != 0) ? ASSERT_LINE : CLEAR_LINE);
} }
} }
@ -941,7 +942,7 @@ static WRITE8_HANDLER(deco32_bsmt0_w)
static WRITE8_DEVICE_HANDLER(deco32_bsmt1_w) static WRITE8_DEVICE_HANDLER(deco32_bsmt1_w)
{ {
bsmt2000_data_w(device, offset^ 0xff, ((bsmt_latch << 8) | data), 0xffff); bsmt2000_data_w(device, offset^ 0xff, ((bsmt_latch << 8) | data), 0xffff);
cpu_set_input_line(device->machine->cpu[1], M6809_IRQ_LINE, HOLD_LINE); /* BSMT is ready */ cputag_set_input_line(device->machine, "audiocpu", M6809_IRQ_LINE, HOLD_LINE); /* BSMT is ready */
} }
static READ8_HANDLER(deco32_bsmt_status_r) static READ8_HANDLER(deco32_bsmt_status_r)
@ -974,7 +975,7 @@ static READ8_HANDLER(latch_r)
{ {
/* bit 1 of nslasher_sound_irq specifies IRQ command writes */ /* bit 1 of nslasher_sound_irq specifies IRQ command writes */
nslasher_sound_irq &= ~0x02; nslasher_sound_irq &= ~0x02;
cpu_set_input_line(space->machine->cpu[1], 0, (nslasher_sound_irq != 0) ? ASSERT_LINE : CLEAR_LINE); cputag_set_input_line(space->machine, "audiocpu", 0, (nslasher_sound_irq != 0) ? ASSERT_LINE : CLEAR_LINE);
return soundlatch_r(space,0); return soundlatch_r(space,0);
} }
@ -1572,7 +1573,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 void sound_irq_nslasher(const device_config *device, int state) static void sound_irq_nslasher(const device_config *device, int state)
@ -1582,7 +1583,7 @@ static void sound_irq_nslasher(const device_config *device, int state)
nslasher_sound_irq |= 0x01; nslasher_sound_irq |= 0x01;
else else
nslasher_sound_irq &= ~0x01; nslasher_sound_irq &= ~0x01;
cpu_set_input_line(device->machine->cpu[1], 0, (nslasher_sound_irq != 0) ? ASSERT_LINE : CLEAR_LINE); cputag_set_input_line(device->machine, "audiocpu", 0, (nslasher_sound_irq != 0) ? ASSERT_LINE : CLEAR_LINE);
} }
static WRITE8_DEVICE_HANDLER( sound_bankswitch_w ) static WRITE8_DEVICE_HANDLER( sound_bankswitch_w )

View File

@ -177,7 +177,7 @@ static READ32_HANDLER( mlc_scanline_r )
static TIMER_CALLBACK( interrupt_gen ) static TIMER_CALLBACK( interrupt_gen )
{ {
// logerror("hit scanline IRQ %d (%08x)\n", video_screen_get_vpos(machine->primary_screen), info.i); // logerror("hit scanline IRQ %d (%08x)\n", video_screen_get_vpos(machine->primary_screen), info.i);
cpu_set_input_line(machine->cpu[0], mainCpuIsArm ? ARM_IRQ_LINE : 1, HOLD_LINE); cputag_set_input_line(machine, "maincpu", mainCpuIsArm ? ARM_IRQ_LINE : 1, HOLD_LINE);
} }
static WRITE32_HANDLER( mlc_irq_w ) static WRITE32_HANDLER( mlc_irq_w )
@ -189,7 +189,7 @@ static WRITE32_HANDLER( mlc_irq_w )
switch (offset*4) switch (offset*4)
{ {
case 0x10: /* IRQ ack. Value written doesn't matter */ case 0x10: /* IRQ ack. Value written doesn't matter */
cpu_set_input_line(space->machine->cpu[0], mainCpuIsArm ? ARM_IRQ_LINE : 1, CLEAR_LINE); cputag_set_input_line(space->machine, "maincpu", mainCpuIsArm ? ARM_IRQ_LINE : 1, CLEAR_LINE);
return; return;
case 0x14: /* Prepare scanline interrupt */ case 0x14: /* Prepare scanline interrupt */
timer_adjust_oneshot(raster_irq_timer,video_screen_get_time_until_pos(space->machine->primary_screen, irq_ram[0x14/4], 0),0); timer_adjust_oneshot(raster_irq_timer,video_screen_get_time_until_pos(space->machine->primary_screen, irq_ram[0x14/4], 0),0);
@ -733,14 +733,14 @@ static READ32_HANDLER( avengrgs_speedup_r )
static DRIVER_INIT( avengrgs ) static DRIVER_INIT( avengrgs )
{ {
// init options // init options
sh2drc_set_options(machine->cpu[0], SH2DRC_FASTEST_OPTIONS); sh2drc_set_options(cputag_get_cpu(machine, "maincpu"), SH2DRC_FASTEST_OPTIONS);
// set up speed cheat // set up speed cheat
sh2drc_add_pcflush(machine->cpu[0], 0x3234); sh2drc_add_pcflush(cputag_get_cpu(machine, "maincpu"), 0x3234);
sh2drc_add_pcflush(machine->cpu[0], 0x32dc); sh2drc_add_pcflush(cputag_get_cpu(machine, "maincpu"), 0x32dc);
mainCpuIsArm = 0; mainCpuIsArm = 0;
memory_install_read32_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM), 0x01089a0, 0x01089a3, 0, 0, avengrgs_speedup_r ); memory_install_read32_handler(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), 0x01089a0, 0x01089a3, 0, 0, avengrgs_speedup_r );
descramble_sound(machine); descramble_sound(machine);
} }
@ -749,7 +749,7 @@ static DRIVER_INIT( mlc )
/* The timing in the ARM core isn't as accurate as it should be, so bump up the /* The timing in the ARM core isn't as accurate as it should be, so bump up the
effective clock rate here to compensate otherwise we have slowdowns in effective clock rate here to compensate otherwise we have slowdowns in
Skull Fung where there probably shouldn't be. */ Skull Fung where there probably shouldn't be. */
cpu_set_clockscale(machine->cpu[0], 2.0f); cpu_set_clockscale(cputag_get_cpu(machine, "maincpu"), 2.0f);
mainCpuIsArm = 1; mainCpuIsArm = 1;
deco156_decrypt(machine); deco156_decrypt(machine);
descramble_sound(machine); descramble_sound(machine);

View File

@ -1078,7 +1078,7 @@ static DRIVER_INIT( decocrom )
decrypted2[i] = swap_bits_5_6(rom[i]); decrypted2[i] = swap_bits_5_6(rom[i]);
/* convert charram to a banked ROM */ /* convert charram to a banked ROM */
memory_install_readwrite8_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM), 0x6000, 0xafff, 0, 0, (read8_space_func)SMH_BANK(1), decocass_de0091_w); memory_install_readwrite8_handler(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), 0x6000, 0xafff, 0, 0, (read8_space_func)SMH_BANK(1), decocass_de0091_w);
memory_configure_bank(machine, 1, 0, 1, decocass_charram, 0); memory_configure_bank(machine, 1, 0, 1, decocass_charram, 0);
memory_configure_bank(machine, 1, 1, 1, memory_region(machine, "user3"), 0); memory_configure_bank(machine, 1, 1, 1, memory_region(machine, "user3"), 0);
memory_configure_bank_decrypted(machine, 1, 0, 1, &decrypted[0x6000], 0); memory_configure_bank_decrypted(machine, 1, 0, 1, &decrypted[0x6000], 0);
@ -1086,7 +1086,7 @@ static DRIVER_INIT( decocrom )
memory_set_bank(machine, 1, 0); memory_set_bank(machine, 1, 0);
/* install the bank selector */ /* install the bank selector */
memory_install_write8_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM), 0xe900, 0xe900, 0, 0, decocass_e900_w); memory_install_write8_handler(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), 0xe900, 0xe900, 0, 0, decocass_e900_w);
} }

View File

@ -57,7 +57,7 @@ static WRITE16_HANDLER( sound_command_w )
if (ACCESSING_BITS_8_15) if (ACCESSING_BITS_8_15)
{ {
soundlatch_w(space,offset,(data >> 8) & 0xff); soundlatch_w(space,offset,(data >> 8) & 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);
} }
} }
@ -223,8 +223,8 @@ GFXDECODE_END
static void irqhandler(const device_config *device, int linestate) static void irqhandler(const device_config *device, int linestate)
{ {
/* system 16c doesn't have the sound CPU */ /* system 16c doesn't have the sound CPU */
if (device->machine->cpu[1] != NULL) if (cputag_get_cpu(device->machine, "audiocpu") != NULL)
cpu_set_input_line(device->machine->cpu[1],0,linestate); cputag_set_input_line(device->machine, "audiocpu", 0, linestate);
} }
static const ym3812_interface ym3812_config = static const ym3812_interface ym3812_config =
@ -406,4 +406,3 @@ GAME( 1996, logicpro, 0, deniam16b, logicpr2, logicpro, ROT0, "Deniam", "
GAME( 1996, croquis, logicpro, deniam16b, logicpr2, logicpro, ROT0, "Deniam", "Croquis (Germany)", 0 ) GAME( 1996, croquis, logicpro, deniam16b, logicpr2, logicpro, ROT0, "Deniam", "Croquis (Germany)", 0 )
GAME( 1996, karianx, 0, deniam16b, karianx, karianx, ROT0, "Deniam", "Karian Cross (Rev. 1.0)", 0 ) GAME( 1996, karianx, 0, deniam16b, karianx, karianx, ROT0, "Deniam", "Karian Cross (Rev. 1.0)", 0 )
GAME( 1997, logicpr2, 0, deniam16c, logicpr2, logicpro, ROT0, "Deniam", "Logic Pro 2 (Japan)", GAME_IMPERFECT_SOUND ) GAME( 1997, logicpr2, 0, deniam16c, logicpr2, logicpro, ROT0, "Deniam", "Logic Pro 2 (Japan)", GAME_IMPERFECT_SOUND )

View File

@ -146,7 +146,7 @@ INPUT_PORTS_END
/*Is it there an IRQ mask?*/ /*Is it there an IRQ mask?*/
static INTERRUPT_GEN( deshoros_irq ) static INTERRUPT_GEN( deshoros_irq )
{ {
cpu_set_input_line(device->machine->cpu[0], M6809_IRQ_LINE, HOLD_LINE); cputag_set_input_line(device->machine, "maincpu", M6809_IRQ_LINE, HOLD_LINE);
} }
static MACHINE_RESET( deshoros ) static MACHINE_RESET( deshoros )

View File

@ -39,7 +39,7 @@ static TIMER_CALLBACK( destroyr_dial_callback )
if (destroyr_potmask[dial]) if (destroyr_potmask[dial])
{ {
cpu_set_input_line(machine->cpu[0], INPUT_LINE_NMI, PULSE_LINE); cputag_set_input_line(machine, "maincpu", INPUT_LINE_NMI, PULSE_LINE);
} }
} }
@ -88,7 +88,7 @@ static WRITE8_HANDLER( destroyr_cursor_load_w )
static WRITE8_HANDLER( destroyr_interrupt_ack_w ) static WRITE8_HANDLER( destroyr_interrupt_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

@ -566,7 +566,7 @@ static DRIVER_INIT( xfiles )
rom[BYTE4_XOR_BE(0x3aa933)] = 0; rom[BYTE4_XOR_BE(0x3aa933)] = 0;
// protection related ? // protection related ?
// memory_install_read32_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM), 0xf0c8b440, 0xf0c8b447, 0, 0, (read32_space_func)SMH_NOP ); // memory_install_read32_handler(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), 0xf0c8b440, 0xf0c8b447, 0, 0, (read32_space_func)SMH_NOP );
flash_roms = 2; flash_roms = 2;
} }
@ -586,7 +586,7 @@ static DRIVER_INIT( kdynastg )
rom[BYTE4_XOR_BE(0x3a45c9)] = 0; rom[BYTE4_XOR_BE(0x3a45c9)] = 0;
// protection related ? // protection related ?
// memory_install_read32_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM), 0x12341234, 0x12341243, 0, 0, (read32_space_func)SMH_NOP ); // memory_install_read32_handler(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), 0x12341234, 0x12341243, 0, 0, (read32_space_func)SMH_NOP );
flash_roms = 4; flash_roms = 4;
} }

View File

@ -164,7 +164,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 const ym2151_interface ym2151_config = static const ym2151_interface ym2151_config =

View File

@ -204,9 +204,9 @@ static WRITE8_HANDLER( discoboy_port_01_w )
static WRITE8_HANDLER( discoboy_port_03_w ) // sfx? (to sound cpu) static WRITE8_HANDLER( discoboy_port_03_w ) // sfx? (to sound cpu)
{ {
// printf("unk discoboy_port_03_w %02x\n", data); // printf("unk discoboy_port_03_w %02x\n", data);
// cpu_set_input_line(space->machine->cpu[1],INPUT_LINE_NMI,HOLD_LINE); // cputag_set_input_line(space->machine, "audiocpu", INPUT_LINE_NMI, HOLD_LINE);
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);
} }
static WRITE8_HANDLER( discoboy_port_06_w ) static WRITE8_HANDLER( discoboy_port_06_w )
@ -542,4 +542,3 @@ ROM_END
GAME( 1993, discoboy, 0, discoboy, discoboy, discoboy, ROT270, "Soft Art Co.", "Disco Boy", 0 ) GAME( 1993, discoboy, 0, discoboy, discoboy, discoboy, ROT270, "Soft Art Co.", "Disco Boy", 0 )

View File

@ -63,7 +63,7 @@ static WRITE16_HANDLER( soundcmd_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],0,HOLD_LINE); cputag_set_input_line(space->machine, "audiocpu", 0, HOLD_LINE);
} }
} }

View File

@ -657,7 +657,7 @@ static DRIVER_INIT( djboyj )
static WRITE8_HANDLER( trigger_nmi_on_cpu0 ) static WRITE8_HANDLER( trigger_nmi_on_cpu0 )
{ {
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);
} }
static WRITE8_HANDLER( cpu0_bankswitch_w ) static WRITE8_HANDLER( cpu0_bankswitch_w )
@ -716,7 +716,7 @@ static WRITE8_HANDLER( cpu1_bankswitch_w )
static WRITE8_HANDLER( trigger_nmi_on_sound_cpu2 ) static WRITE8_HANDLER( trigger_nmi_on_sound_cpu2 )
{ {
soundlatch_w(space, 0, data); soundlatch_w(space, 0, data);
cpu_set_input_line(space->machine->cpu[2], INPUT_LINE_NMI, PULSE_LINE); cputag_set_input_line(space->machine, "cpu2", INPUT_LINE_NMI, PULSE_LINE);
} /* trigger_nmi_on_sound_cpu2 */ } /* trigger_nmi_on_sound_cpu2 */
static WRITE8_HANDLER( cpu2_bankswitch_w ) static WRITE8_HANDLER( cpu2_bankswitch_w )
@ -1052,4 +1052,3 @@ INPUT_PORTS_END
GAME( 1989, djboy, 0, djboy, djboy, djboy, ROT0, "Kaneko (American Sammy license)", "DJ Boy (set 1)", 0) // Sammy & Williams logos in FG ROM GAME( 1989, djboy, 0, djboy, djboy, djboy, ROT0, "Kaneko (American Sammy license)", "DJ Boy (set 1)", 0) // Sammy & Williams logos in FG ROM
GAME( 1989, djboya, djboy, djboy, djboy, djboy, ROT0, "Kaneko (American Sammy license)", "DJ Boy (set 2)", 0) // Sammy & Williams logos in FG ROM GAME( 1989, djboya, djboy, djboy, djboy, djboy, ROT0, "Kaneko (American Sammy license)", "DJ Boy (set 2)", 0) // Sammy & Williams logos in FG ROM
GAME( 1989, djboyj, djboy, djboy, djboy, djboyj, ROT0, "Kaneko (Sega license)", "DJ Boy (Japan)", 0 ) // Sega logo in FG ROM GAME( 1989, djboyj, djboy, djboy, djboy, djboyj, ROT0, "Kaneko (Sega license)", "DJ Boy (Japan)", 0 ) // Sega logo in FG ROM

View File

@ -238,7 +238,7 @@ static WRITE32_HANDLER( v_ctrl_w )
if (pending_vb_int && !DISABLE_VB_INT) if (pending_vb_int && !DISABLE_VB_INT)
{ {
pending_vb_int = 0; pending_vb_int = 0;
cpu_set_input_line(space->machine->cpu[0], M68K_IRQ_4, HOLD_LINE); cputag_set_input_line(space->machine, "maincpu", M68K_IRQ_4, HOLD_LINE);
} }
} }
} }
@ -450,12 +450,12 @@ static void ide_interrupt(const device_config *device, int state)
if (state != CLEAR_LINE) if (state != CLEAR_LINE)
{ {
//logerror("IDE interrupt asserted\n"); //logerror("IDE interrupt asserted\n");
cpu_set_input_line(device->machine->cpu[0], M68K_IRQ_1, HOLD_LINE); cputag_set_input_line(device->machine, "maincpu", M68K_IRQ_1, HOLD_LINE);
} }
else else
{ {
//logerror("IDE interrupt cleared\n"); //logerror("IDE interrupt cleared\n");
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);
} }
} }

View File

@ -494,19 +494,19 @@ static MACHINE_RESET( drakton )
static READ8_DEVICE_HANDLER( dk_dma_read_byte ) static READ8_DEVICE_HANDLER( dk_dma_read_byte )
{ {
const address_space *space = cpu_get_address_space(device->machine->cpu[0], ADDRESS_SPACE_PROGRAM); const address_space *space = cputag_get_address_space(device->machine, "maincpu", ADDRESS_SPACE_PROGRAM);
return memory_read_byte(space, offset); return memory_read_byte(space, offset);
} }
static WRITE8_DEVICE_HANDLER( dk_dma_write_byte ) static WRITE8_DEVICE_HANDLER( dk_dma_write_byte )
{ {
const address_space *space = cpu_get_address_space(device->machine->cpu[0], ADDRESS_SPACE_PROGRAM); const address_space *space = cputag_get_address_space(device->machine, "maincpu", ADDRESS_SPACE_PROGRAM);
memory_write_byte(space, offset, data); memory_write_byte(space, offset, data);
} }
static READ8_DEVICE_HANDLER( hb_dma_read_byte ) static READ8_DEVICE_HANDLER( hb_dma_read_byte )
{ {
const address_space *space = cpu_get_address_space(device->machine->cpu[0], ADDRESS_SPACE_PROGRAM); const address_space *space = cputag_get_address_space(device->machine, "maincpu", ADDRESS_SPACE_PROGRAM);
dkong_state *state = (dkong_state *)device->machine->driver_data; dkong_state *state = (dkong_state *)device->machine->driver_data;
int bucket = state->rev_map[(offset>>10) & 0x1ff]; int bucket = state->rev_map[(offset>>10) & 0x1ff];
int addr; int addr;
@ -521,7 +521,7 @@ static READ8_DEVICE_HANDLER( hb_dma_read_byte )
static WRITE8_DEVICE_HANDLER( hb_dma_write_byte ) static WRITE8_DEVICE_HANDLER( hb_dma_write_byte )
{ {
const address_space *space = cpu_get_address_space(device->machine->cpu[0], ADDRESS_SPACE_PROGRAM); const address_space *space = cputag_get_address_space(device->machine, "maincpu", ADDRESS_SPACE_PROGRAM);
dkong_state *state = (dkong_state *)device->machine->driver_data; dkong_state *state = (dkong_state *)device->machine->driver_data;
int bucket = state->rev_map[(offset>>10) & 0x1ff]; int bucket = state->rev_map[(offset>>10) & 0x1ff];
int addr; int addr;
@ -699,13 +699,13 @@ static WRITE8_HANDLER( dkong3_2a03_reset_w )
{ {
if (data & 1) if (data & 1)
{ {
cpu_set_input_line(space->machine->cpu[1], INPUT_LINE_RESET, CLEAR_LINE); cputag_set_input_line(space->machine, "n2a03a", INPUT_LINE_RESET, CLEAR_LINE);
cpu_set_input_line(space->machine->cpu[2], INPUT_LINE_RESET, CLEAR_LINE); cputag_set_input_line(space->machine, "n2a03b", 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, "n2a03a", INPUT_LINE_RESET, ASSERT_LINE);
cpu_set_input_line(space->machine->cpu[2], INPUT_LINE_RESET, ASSERT_LINE); cputag_set_input_line(space->machine, "n2a03b", INPUT_LINE_RESET, ASSERT_LINE);
} }
} }
@ -2899,7 +2899,7 @@ static DRIVER_INIT( drakton )
{7,1,4,0,3,6,2,5}, {7,1,4,0,3,6,2,5},
}; };
memory_install_read8_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM), 0x0000, 0x3fff, 0, 0, (read8_space_func)SMH_BANK(1) ); memory_install_read8_handler(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), 0x0000, 0x3fff, 0, 0, (read8_space_func)SMH_BANK(1) );
/* While the PAL supports up to 16 decryption methods, only four /* While the PAL supports up to 16 decryption methods, only four
are actually used in the PAL. Therefore, we'll take a little are actually used in the PAL. Therefore, we'll take a little
@ -2921,7 +2921,7 @@ static DRIVER_INIT( strtheat )
{6,3,4,1,0,7,2,5}, {6,3,4,1,0,7,2,5},
}; };
memory_install_read8_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM), 0x0000, 0x3fff, 0, 0, (read8_space_func)SMH_BANK(1) ); memory_install_read8_handler(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), 0x0000, 0x3fff, 0, 0, (read8_space_func)SMH_BANK(1) );
/* While the PAL supports up to 16 decryption methods, only four /* While the PAL supports up to 16 decryption methods, only four
are actually used in the PAL. Therefore, we'll take a little are actually used in the PAL. Therefore, we'll take a little
@ -2932,8 +2932,8 @@ static DRIVER_INIT( strtheat )
drakton_decrypt_rom(machine, 0x88, 0x1c000, bs[3]); drakton_decrypt_rom(machine, 0x88, 0x1c000, bs[3]);
/* custom handlers supporting Joystick or Steering Wheel */ /* custom handlers supporting Joystick or Steering Wheel */
memory_install_read8_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM), 0x7c00, 0x7c00, 0, 0, strtheat_inputport_0_r); memory_install_read8_handler(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), 0x7c00, 0x7c00, 0, 0, strtheat_inputport_0_r);
memory_install_read8_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM), 0x7c80, 0x7c80, 0, 0, strtheat_inputport_1_r); memory_install_read8_handler(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), 0x7c80, 0x7c80, 0, 0, strtheat_inputport_1_r);
} }
/************************************* /*************************************

View File

@ -84,7 +84,7 @@ static const UINT8 led_map[16] =
static void dleuro_interrupt(const device_config *device, int state) static void dleuro_interrupt(const device_config *device, int state)
{ {
cpu_set_input_line(device->machine->cpu[0], 0, state); cputag_set_input_line(device->machine, "maincpu", 0, state);
} }

View File

@ -32,12 +32,12 @@ static WRITE8_HANDLER( subirqtrigger_w )
/* bit 0 used but unknown */ /* bit 0 used but unknown */
if (data & 0x04) if (data & 0x04)
cpu_set_input_line(space->machine->cpu[1],0,ASSERT_LINE); cputag_set_input_line(space->machine, "sub", 0, ASSERT_LINE);
} }
static WRITE8_HANDLER( sub_irqack_w ) static WRITE8_HANDLER( sub_irqack_w )
{ {
cpu_set_input_line(space->machine->cpu[1],0,CLEAR_LINE); cputag_set_input_line(space->machine, "sub", 0, CLEAR_LINE);
} }

View File

@ -734,7 +734,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[1],0,irq ? ASSERT_LINE : CLEAR_LINE); cputag_set_input_line(device->machine, "audiocpu", 0, irq ? ASSERT_LINE : CLEAR_LINE);
} }
static READ8_DEVICE_HANDLER( unk_r ) static READ8_DEVICE_HANDLER( unk_r )

View File

@ -32,14 +32,14 @@ static CUSTOM_INPUT( dorachan_protection_r )
{ {
UINT8 ret = 0; UINT8 ret = 0;
switch (cpu_get_previouspc(field->port->machine->cpu[0])) switch (cpu_get_previouspc(cputag_get_cpu(field->port->machine, "maincpu")))
{ {
case 0x70ce: ret = 0xf2; break; case 0x70ce: ret = 0xf2; break;
case 0x72a2: ret = 0xd5; break; case 0x72a2: ret = 0xd5; break;
case 0x72b5: ret = 0xcb; break; case 0x72b5: ret = 0xcb; break;
default: default:
mame_printf_debug("unhandled $2400 read @ %x\n",cpu_get_previouspc(field->port->machine->cpu[0])); mame_printf_debug("unhandled $2400 read @ %x\n", cpu_get_previouspc(cputag_get_cpu(field->port->machine, "maincpu")));
break; break;
} }

View File

@ -99,7 +99,7 @@ static WRITE8_DEVICE_HANDLER( misc_w )
/* bit 7 = di */ /* bit 7 = di */
di = (data >> 7) & 1; di = (data >> 7) & 1;
if (!di) if (!di)
cpu_set_input_line(device->machine->cpu[0], 0, CLEAR_LINE); cputag_set_input_line(device->machine, "maincpu", 0, CLEAR_LINE);
/* bit 6 = parata */ /* bit 6 = parata */
@ -369,4 +369,3 @@ ROM_END
GAME( 1983, dribling, 0, dribling, dribling, 0, ROT0, "Model Racing", "Dribbling", GAME_NO_SOUND ) GAME( 1983, dribling, 0, dribling, dribling, 0, ROT0, "Model Racing", "Dribbling", GAME_NO_SOUND )
GAME( 1983, driblino, dribling, dribling, dribling, 0, ROT0, "Model Racing (Olympia license)", "Dribbling (Olympia)", GAME_NO_SOUND ) GAME( 1983, driblino, dribling, dribling, dribling, 0, ROT0, "Model Racing (Olympia license)", "Dribbling (Olympia)", GAME_NO_SOUND )

View File

@ -105,7 +105,7 @@ void sprtmtch_update_irq(running_machine *machine)
int irq = ((dynax_sound_irq) ? 0x08 : 0) | int irq = ((dynax_sound_irq) ? 0x08 : 0) |
((dynax_vblank_irq) ? 0x10 : 0) | ((dynax_vblank_irq) ? 0x10 : 0) |
((dynax_blitter_irq) ? 0x20 : 0) ; ((dynax_blitter_irq) ? 0x20 : 0) ;
cpu_set_input_line_and_vector(machine->cpu[0], 0, irq ? ASSERT_LINE : CLEAR_LINE, 0xc7 | irq); /* rst $xx */ cputag_set_input_line_and_vector(machine, "maincpu", 0, irq ? ASSERT_LINE : CLEAR_LINE, 0xc7 | irq); /* rst $xx */
} }
static WRITE8_HANDLER( dynax_vblank_ack_w ) static WRITE8_HANDLER( dynax_vblank_ack_w )
@ -145,7 +145,7 @@ void jantouki_update_irq(running_machine *machine)
int irq = ((dynax_blitter_irq) ? 0x08 : 0) | int irq = ((dynax_blitter_irq) ? 0x08 : 0) |
((dynax_blitter2_irq) ? 0x10 : 0) | ((dynax_blitter2_irq) ? 0x10 : 0) |
((dynax_vblank_irq) ? 0x20 : 0) ; ((dynax_vblank_irq) ? 0x20 : 0) ;
cpu_set_input_line_and_vector(machine->cpu[0], 0, irq ? ASSERT_LINE : CLEAR_LINE, 0xc7 | irq); /* rst $xx */ cputag_set_input_line_and_vector(machine, "maincpu", 0, irq ? ASSERT_LINE : CLEAR_LINE, 0xc7 | irq); /* rst $xx */
} }
static WRITE8_HANDLER( jantouki_vblank_ack_w ) static WRITE8_HANDLER( jantouki_vblank_ack_w )
@ -185,7 +185,7 @@ static void jantouki_sound_update_irq(running_machine *machine)
int irq = ((dynax_sound_irq) ? 0x08 : 0) | int irq = ((dynax_sound_irq) ? 0x08 : 0) |
((dynax_soundlatch_irq) ? 0x10 : 0) | ((dynax_soundlatch_irq) ? 0x10 : 0) |
((dynax_sound_vblank_irq) ? 0x20 : 0) ; ((dynax_sound_vblank_irq) ? 0x20 : 0) ;
cpu_set_input_line_and_vector(machine->cpu[1], 0, irq ? ASSERT_LINE : CLEAR_LINE, 0xc7 | irq); /* rst $xx */ cputag_set_input_line_and_vector(machine, "soundcpu", 0, irq ? ASSERT_LINE : CLEAR_LINE, 0xc7 | irq); /* rst $xx */
} }
static INTERRUPT_GEN( jantouki_sound_vblank_interrupt ) static INTERRUPT_GEN( jantouki_sound_vblank_interrupt )
@ -408,7 +408,7 @@ static void adpcm_int(const device_config *device)
if (toggle) if (toggle)
{ {
if (resetkludge) // don't know what's wrong, but NMIs when the 5205 is reset make the game crash if (resetkludge) // don't know what's wrong, but NMIs when the 5205 is reset make the game crash
cpu_set_input_line(device->machine->cpu[0], INPUT_LINE_NMI, PULSE_LINE); cputag_set_input_line(device->machine, "maincpu", INPUT_LINE_NMI, PULSE_LINE);
} }
} }
static void adpcm_int_cpu1(const device_config *device) static void adpcm_int_cpu1(const device_config *device)
@ -422,7 +422,7 @@ static void adpcm_int_cpu1(const device_config *device)
if (toggle) if (toggle)
{ {
if (resetkludge) // don't know what's wrong, but NMIs when the 5205 is reset make the game crash if (resetkludge) // don't know what's wrong, but NMIs when the 5205 is reset make the game crash
cpu_set_input_line(device->machine->cpu[1], INPUT_LINE_NMI, PULSE_LINE); // cpu1 cputag_set_input_line(device->machine, "soundcpu", INPUT_LINE_NMI, PULSE_LINE); // cpu1
} }
} }
@ -3980,7 +3980,7 @@ MACHINE_DRIVER_END
void mjelctrn_update_irq(running_machine *machine) void mjelctrn_update_irq(running_machine *machine)
{ {
dynax_blitter_irq = 1; dynax_blitter_irq = 1;
cpu_set_input_line_and_vector(machine->cpu[0], 0, HOLD_LINE, 0xfa); cputag_set_input_line_and_vector(machine, "maincpu", 0, HOLD_LINE, 0xfa);
} }
static INTERRUPT_GEN( mjelctrn_vblank_interrupt ) static INTERRUPT_GEN( mjelctrn_vblank_interrupt )
@ -4014,7 +4014,7 @@ MACHINE_DRIVER_END
void neruton_update_irq(running_machine *machine) void neruton_update_irq(running_machine *machine)
{ {
dynax_blitter_irq = 1; dynax_blitter_irq = 1;
cpu_set_input_line_and_vector(machine->cpu[0], 0, HOLD_LINE, 0x42); cputag_set_input_line_and_vector(machine, "maincpu", 0, HOLD_LINE, 0x42);
} }
static INTERRUPT_GEN( neruton_vblank_interrupt ) static INTERRUPT_GEN( neruton_vblank_interrupt )
@ -5600,7 +5600,7 @@ ROM_END
static DRIVER_INIT( mjreach ) static DRIVER_INIT( mjreach )
{ {
memory_install_write8_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM), 0x10060, 0x10060, 0, 0, yarunara_flipscreen_w); memory_install_write8_handler(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), 0x10060, 0x10060, 0, 0, yarunara_flipscreen_w);
} }
/*************************************************************************** /***************************************************************************

View File

@ -463,7 +463,7 @@ static emu_timer *i8751_timer;
static TIMER_CALLBACK( i8751_callback ) static TIMER_CALLBACK( i8751_callback )
{ {
/* Signal main cpu microcontroller task is complete */ /* Signal main cpu microcontroller task is complete */
cpu_set_input_line(machine->cpu[0],5,HOLD_LINE); cputag_set_input_line(machine, "maincpu", 5, HOLD_LINE);
i8751_timer = NULL; i8751_timer = NULL;
logerror("i8751: Timer called!!!\n"); logerror("i8751: Timer called!!!\n");
@ -477,7 +477,7 @@ void dec0_i8751_write(running_machine *machine, int data)
if (GAME == 2) baddudes_i8751_write(machine, data); if (GAME == 2) baddudes_i8751_write(machine, data);
if (GAME == 3) birdtry_i8751_write(machine, data); if (GAME == 3) birdtry_i8751_write(machine, data);
cpu_set_input_line(machine->cpu[0],5,HOLD_LINE); cputag_set_input_line(machine, "maincpu", 5, HOLD_LINE);
/* Simulate the processing time of the i8751, time value is guessed /* Simulate the processing time of the i8751, time value is guessed
if (i8751_timer) if (i8751_timer)
@ -526,7 +526,7 @@ static WRITE16_HANDLER( robocop_68000_share_w )
robocop_shared_ram[offset]=data&0xff; robocop_shared_ram[offset]=data&0xff;
if (offset == 0x7ff) /* A control address - not standard ram */ if (offset == 0x7ff) /* A control address - not standard ram */
cpu_set_input_line(space->machine->cpu[2],0,HOLD_LINE); cputag_set_input_line(space->machine, "sub", 0, HOLD_LINE);
} }
/******************************************************************************/ /******************************************************************************/
@ -545,8 +545,8 @@ DRIVER_INIT( hippodrm )
{ {
UINT8 *RAM = memory_region(machine, "sub"); UINT8 *RAM = memory_region(machine, "sub");
memory_install_readwrite16_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM), 0x180000, 0x180fff, 0, 0, hippodrm_68000_share_r, hippodrm_68000_share_w); memory_install_readwrite16_handler(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), 0x180000, 0x180fff, 0, 0, hippodrm_68000_share_r, hippodrm_68000_share_w);
memory_install_write16_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM), 0xffc800, 0xffcfff, 0, 0, sprite_mirror_w); memory_install_write16_handler(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), 0xffc800, 0xffcfff, 0, 0, sprite_mirror_w);
h6280_decrypt(machine, "sub"); h6280_decrypt(machine, "sub");
@ -570,7 +570,7 @@ DRIVER_INIT( slyspy )
DRIVER_INIT( robocop ) DRIVER_INIT( robocop )
{ {
memory_install_readwrite16_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM), 0x180000, 0x180fff, 0, 0, robocop_68000_share_r, robocop_68000_share_w); memory_install_readwrite16_handler(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), 0x180000, 0x180fff, 0, 0, robocop_68000_share_r, robocop_68000_share_w);
} }
DRIVER_INIT( baddudes ) DRIVER_INIT( baddudes )

View File

@ -103,7 +103,7 @@ WRITE8_HANDLER( decocass_sound_command_w )
decocass_sound_ack |= 0x80; decocass_sound_ack |= 0x80;
/* remove snd cpu data ack bit. i don't see it in the schems, but... */ /* remove snd cpu data ack bit. i don't see it in the schems, but... */
decocass_sound_ack &= ~0x40; decocass_sound_ack &= ~0x40;
cpu_set_input_line(space->machine->cpu[1], M6502_IRQ_LINE, ASSERT_LINE); cputag_set_input_line(space->machine, "audiocpu", M6502_IRQ_LINE, ASSERT_LINE);
} }
READ8_HANDLER( decocass_sound_data_r ) READ8_HANDLER( decocass_sound_data_r )
@ -131,7 +131,7 @@ READ8_HANDLER( decocass_sound_command_r )
{ {
UINT8 data = soundlatch_r(space, 0); UINT8 data = soundlatch_r(space, 0);
LOG(4,("CPU %s sound command <- $%02x\n", space->cpu->tag, data)); LOG(4,("CPU %s sound command <- $%02x\n", space->cpu->tag, data));
cpu_set_input_line(space->machine->cpu[1], M6502_IRQ_LINE, CLEAR_LINE); cputag_set_input_line(space->machine, "audiocpu", M6502_IRQ_LINE, CLEAR_LINE);
decocass_sound_ack &= ~0x80; decocass_sound_ack &= ~0x80;
return data; return data;
} }
@ -140,19 +140,19 @@ TIMER_DEVICE_CALLBACK( decocass_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);
} }
WRITE8_HANDLER( decocass_sound_nmi_enable_w ) WRITE8_HANDLER( decocass_sound_nmi_enable_w )
{ {
audio_nmi_enabled = 1; audio_nmi_enabled = 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);
} }
READ8_HANDLER( decocass_sound_nmi_enable_r ) READ8_HANDLER( decocass_sound_nmi_enable_r )
{ {
audio_nmi_enabled = 1; audio_nmi_enabled = 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);
return 0xff; return 0xff;
} }
@ -172,7 +172,7 @@ WRITE8_HANDLER( decocass_sound_data_ack_reset_w )
WRITE8_HANDLER( decocass_nmi_reset_w ) WRITE8_HANDLER( decocass_nmi_reset_w )
{ {
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 );
} }
WRITE8_HANDLER( decocass_quadrature_decoder_reset_w ) WRITE8_HANDLER( decocass_quadrature_decoder_reset_w )
@ -246,17 +246,17 @@ WRITE8_HANDLER( decocass_reset_w )
decocass_reset = data; decocass_reset = data;
/* CPU #1 active high reset */ /* CPU #1 active high reset */
cpu_set_input_line(space->machine->cpu[1], INPUT_LINE_RESET, data & 0x01); cputag_set_input_line(space->machine, "audiocpu", INPUT_LINE_RESET, data & 0x01);
/* on reset also disable audio NMI */ /* on reset also disable audio NMI */
if (data & 1) if (data & 1)
{ {
audio_nmi_enabled = 0; audio_nmi_enabled = 0;
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);
} }
/* 8041 active low reset */ /* 8041 active low reset */
cpu_set_input_line(space->machine->cpu[2], INPUT_LINE_RESET, (data & 0x08) ^ 0x08); cputag_set_input_line(space->machine, "mcu", INPUT_LINE_RESET, (data & 0x08) ^ 0x08);
} }
@ -314,7 +314,7 @@ static READ8_HANDLER( decocass_type1_latch_26_pass_3_inv_2_r )
if (1 == (offset & 1)) if (1 == (offset & 1))
{ {
if (0 == (offset & E5XX_MASK)) if (0 == (offset & E5XX_MASK))
data = upi41_master_r(space->machine->cpu[2], 1); data = upi41_master_r(cputag_get_cpu(space->machine, "mcu"), 1);
else else
data = 0xff; data = 0xff;
@ -344,7 +344,7 @@ static READ8_HANDLER( decocass_type1_latch_26_pass_3_inv_2_r )
} }
if (0 == (offset & E5XX_MASK)) if (0 == (offset & E5XX_MASK))
data = upi41_master_r(space->machine->cpu[2], 0); data = upi41_master_r(cputag_get_cpu(space->machine, "mcu"), 0);
else else
data = 0xff; data = 0xff;
@ -393,7 +393,7 @@ static READ8_HANDLER( decocass_type1_pass_136_r )
if (1 == (offset & 1)) if (1 == (offset & 1))
{ {
if (0 == (offset & E5XX_MASK)) if (0 == (offset & E5XX_MASK))
data = upi41_master_r(space->machine->cpu[2], 1); data = upi41_master_r(cputag_get_cpu(space->machine, "mcu"), 1);
else else
data = 0xff; data = 0xff;
@ -423,7 +423,7 @@ static READ8_HANDLER( decocass_type1_pass_136_r )
} }
if (0 == (offset & E5XX_MASK)) if (0 == (offset & E5XX_MASK))
data = upi41_master_r(space->machine->cpu[2], 0); data = upi41_master_r(cputag_get_cpu(space->machine, "mcu"), 0);
else else
data = 0xff; data = 0xff;
@ -472,7 +472,7 @@ static READ8_HANDLER( decocass_type1_latch_27_pass_3_inv_2_r )
if (1 == (offset & 1)) if (1 == (offset & 1))
{ {
if (0 == (offset & E5XX_MASK)) if (0 == (offset & E5XX_MASK))
data = upi41_master_r(space->machine->cpu[2], 1); data = upi41_master_r(cputag_get_cpu(space->machine, "mcu"), 1);
else else
data = 0xff; data = 0xff;
@ -502,7 +502,7 @@ static READ8_HANDLER( decocass_type1_latch_27_pass_3_inv_2_r )
} }
if (0 == (offset & E5XX_MASK)) if (0 == (offset & E5XX_MASK))
data = upi41_master_r(space->machine->cpu[2], 0); data = upi41_master_r(cputag_get_cpu(space->machine, "mcu"), 0);
else else
data = 0xff; data = 0xff;
@ -551,7 +551,7 @@ static READ8_HANDLER( decocass_type1_latch_26_pass_5_inv_2_r )
if (1 == (offset & 1)) if (1 == (offset & 1))
{ {
if (0 == (offset & E5XX_MASK)) if (0 == (offset & E5XX_MASK))
data = upi41_master_r(space->machine->cpu[2], 1); data = upi41_master_r(cputag_get_cpu(space->machine, "mcu"), 1);
else else
data = 0xff; data = 0xff;
@ -581,7 +581,7 @@ static READ8_HANDLER( decocass_type1_latch_26_pass_5_inv_2_r )
} }
if (0 == (offset & E5XX_MASK)) if (0 == (offset & E5XX_MASK))
data = upi41_master_r(space->machine->cpu[2], 0); data = upi41_master_r(cputag_get_cpu(space->machine, "mcu"), 0);
else else
data = 0xff; data = 0xff;
@ -632,7 +632,7 @@ static READ8_HANDLER( decocass_type1_latch_16_pass_3_inv_1_r )
if (1 == (offset & 1)) if (1 == (offset & 1))
{ {
if (0 == (offset & E5XX_MASK)) if (0 == (offset & E5XX_MASK))
data = upi41_master_r(space->machine->cpu[2], 1); data = upi41_master_r(cputag_get_cpu(space->machine, "mcu"), 1);
else else
data = 0xff; data = 0xff;
@ -662,7 +662,7 @@ static READ8_HANDLER( decocass_type1_latch_16_pass_3_inv_1_r )
} }
if (0 == (offset & E5XX_MASK)) if (0 == (offset & E5XX_MASK))
data = upi41_master_r(space->machine->cpu[2], 0); data = upi41_master_r(cputag_get_cpu(space->machine, "mcu"), 0);
else else
data = 0xff; data = 0xff;
@ -725,7 +725,7 @@ static READ8_HANDLER( decocass_type2_r )
else else
{ {
if (0 == (offset & E5XX_MASK)) if (0 == (offset & E5XX_MASK))
data = upi41_master_r(space->machine->cpu[2], offset); data = upi41_master_r(cputag_get_cpu(space->machine, "mcu"), offset);
else else
data = offset & 0xff; data = offset & 0xff;
@ -762,7 +762,7 @@ static WRITE8_HANDLER( decocass_type2_w )
LOG(3,("PROM:%s D2:%d", type2_xx_latch ? "on" : "off", type2_d2_latch)); LOG(3,("PROM:%s D2:%d", type2_xx_latch ? "on" : "off", type2_d2_latch));
} }
} }
upi41_master_w(space->machine->cpu[2], offset & 1, data); upi41_master_w(cputag_get_cpu(space->machine, "mcu"), offset & 1, data);
#ifdef MAME_DEBUG #ifdef MAME_DEBUG
decocass_fno(offset, data); decocass_fno(offset, data);
@ -803,7 +803,7 @@ static READ8_HANDLER( decocass_type3_r )
{ {
if (0 == (offset & E5XX_MASK)) if (0 == (offset & E5XX_MASK))
{ {
data = upi41_master_r(space->machine->cpu[2], 1); data = upi41_master_r(cputag_get_cpu(space->machine, "mcu"), 1);
LOG(4,("%10s 6502-PC: %04x decocass_type3_r(%02x): $%02x <- 8041 STATUS\n", attotime_string(timer_get_time(space->machine), 6), cpu_get_previouspc(space->cpu), offset, data)); LOG(4,("%10s 6502-PC: %04x decocass_type3_r(%02x): $%02x <- 8041 STATUS\n", attotime_string(timer_get_time(space->machine), 6), cpu_get_previouspc(space->cpu), offset, data));
} }
else else
@ -824,7 +824,7 @@ static READ8_HANDLER( decocass_type3_r )
{ {
if (0 == (offset & E5XX_MASK)) if (0 == (offset & E5XX_MASK))
{ {
save = upi41_master_r(space->machine->cpu[2], 0); save = upi41_master_r(cputag_get_cpu(space->machine, "mcu"), 0);
switch (type3_swap) switch (type3_swap)
{ {
case TYPE3_SWAP_01: case TYPE3_SWAP_01:
@ -996,7 +996,7 @@ static WRITE8_HANDLER( decocass_type3_w )
} }
} }
LOG(3,("%10s 6502-PC: %04x decocass_e5xx_w(%02x): $%02x -> %s\n", attotime_string(timer_get_time(space->machine), 6), cpu_get_previouspc(space->cpu), offset, data, offset & 1 ? "8041-CMND" : "8041-DATA")); LOG(3,("%10s 6502-PC: %04x decocass_e5xx_w(%02x): $%02x -> %s\n", attotime_string(timer_get_time(space->machine), 6), cpu_get_previouspc(space->cpu), offset, data, offset & 1 ? "8041-CMND" : "8041-DATA"));
upi41_master_w(space->machine->cpu[2], offset, data); upi41_master_w(cputag_get_cpu(space->machine, "mcu"), offset, data);
} }
/*************************************************************************** /***************************************************************************
@ -1019,7 +1019,7 @@ static READ8_HANDLER( decocass_type4_r )
{ {
if (0 == (offset & E5XX_MASK)) if (0 == (offset & E5XX_MASK))
{ {
data = upi41_master_r(space->machine->cpu[2], 1); data = upi41_master_r(cputag_get_cpu(space->machine, "mcu"), 1);
LOG(4,("%10s 6502-PC: %04x decocass_type4_r(%02x): $%02x <- 8041 STATUS\n", attotime_string(timer_get_time(space->machine), 6), cpu_get_previouspc(space->cpu), offset, data)); LOG(4,("%10s 6502-PC: %04x decocass_type4_r(%02x): $%02x <- 8041 STATUS\n", attotime_string(timer_get_time(space->machine), 6), cpu_get_previouspc(space->cpu), offset, data));
} }
else else
@ -1042,7 +1042,7 @@ static READ8_HANDLER( decocass_type4_r )
{ {
if (0 == (offset & E5XX_MASK)) if (0 == (offset & E5XX_MASK))
{ {
data = upi41_master_r(space->machine->cpu[2], 0); data = upi41_master_r(cputag_get_cpu(space->machine, "mcu"), 0);
LOG(3,("%10s 6502-PC: %04x decocass_type4_r(%02x): $%02x '%c' <- open bus (D0 replaced with latch)\n", attotime_string(timer_get_time(space->machine), 6), cpu_get_previouspc(space->cpu), offset, data, (data >= 32) ? data : '.')); LOG(3,("%10s 6502-PC: %04x decocass_type4_r(%02x): $%02x '%c' <- open bus (D0 replaced with latch)\n", attotime_string(timer_get_time(space->machine), 6), cpu_get_previouspc(space->cpu), offset, data, (data >= 32) ? data : '.'));
} }
else else
@ -1082,7 +1082,7 @@ static WRITE8_HANDLER( decocass_type4_w )
} }
} }
LOG(3,("%10s 6502-PC: %04x decocass_e5xx_w(%02x): $%02x -> %s\n", attotime_string(timer_get_time(space->machine), 6), cpu_get_previouspc(space->cpu), offset, data, offset & 1 ? "8041-CMND" : "8041-DATA")); LOG(3,("%10s 6502-PC: %04x decocass_e5xx_w(%02x): $%02x -> %s\n", attotime_string(timer_get_time(space->machine), 6), cpu_get_previouspc(space->cpu), offset, data, offset & 1 ? "8041-CMND" : "8041-DATA"));
upi41_master_w(space->machine->cpu[2], offset, data); upi41_master_w(cputag_get_cpu(space->machine, "mcu"), offset, data);
} }
/*************************************************************************** /***************************************************************************
@ -1102,7 +1102,7 @@ static READ8_HANDLER( decocass_type5_r )
{ {
if (0 == (offset & E5XX_MASK)) if (0 == (offset & E5XX_MASK))
{ {
data = upi41_master_r(space->machine->cpu[2], 1); data = upi41_master_r(cputag_get_cpu(space->machine, "mcu"), 1);
LOG(4,("%10s 6502-PC: %04x decocass_type5_r(%02x): $%02x <- 8041 STATUS\n", attotime_string(timer_get_time(space->machine), 6), cpu_get_previouspc(space->cpu), offset, data)); LOG(4,("%10s 6502-PC: %04x decocass_type5_r(%02x): $%02x <- 8041 STATUS\n", attotime_string(timer_get_time(space->machine), 6), cpu_get_previouspc(space->cpu), offset, data));
} }
else else
@ -1122,7 +1122,7 @@ static READ8_HANDLER( decocass_type5_r )
{ {
if (0 == (offset & E5XX_MASK)) if (0 == (offset & E5XX_MASK))
{ {
data = upi41_master_r(space->machine->cpu[2], 0); data = upi41_master_r(cputag_get_cpu(space->machine, "mcu"), 0);
LOG(3,("%10s 6502-PC: %04x decocass_type5_r(%02x): $%02x '%c' <- open bus (D0 replaced with latch)\n", attotime_string(timer_get_time(space->machine), 6), cpu_get_previouspc(space->cpu), offset, data, (data >= 32) ? data : '.')); LOG(3,("%10s 6502-PC: %04x decocass_type5_r(%02x): $%02x '%c' <- open bus (D0 replaced with latch)\n", attotime_string(timer_get_time(space->machine), 6), cpu_get_previouspc(space->cpu), offset, data, (data >= 32) ? data : '.'));
} }
else else
@ -1159,7 +1159,7 @@ static WRITE8_HANDLER( decocass_type5_w )
} }
} }
LOG(3,("%10s 6502-PC: %04x decocass_e5xx_w(%02x): $%02x -> %s\n", attotime_string(timer_get_time(space->machine), 6), cpu_get_previouspc(space->cpu), offset, data, offset & 1 ? "8041-CMND" : "8041-DATA")); LOG(3,("%10s 6502-PC: %04x decocass_e5xx_w(%02x): $%02x -> %s\n", attotime_string(timer_get_time(space->machine), 6), cpu_get_previouspc(space->cpu), offset, data, offset & 1 ? "8041-CMND" : "8041-DATA"));
upi41_master_w(space->machine->cpu[2], offset, data); upi41_master_w(cputag_get_cpu(space->machine, "mcu"), offset, data);
} }
/*************************************************************************** /***************************************************************************
@ -1178,7 +1178,7 @@ static READ8_HANDLER( decocass_nodong_r )
{ {
if (0 == (offset & E5XX_MASK)) if (0 == (offset & E5XX_MASK))
{ {
data = upi41_master_r(space->machine->cpu[2], 1); data = upi41_master_r(cputag_get_cpu(space->machine, "mcu"), 1);
LOG(4,("%10s 6502-PC: %04x decocass_nodong_r(%02x): $%02x <- 8041 STATUS\n", attotime_string(timer_get_time(space->machine), 6), cpu_get_previouspc(space->cpu), offset, data)); LOG(4,("%10s 6502-PC: %04x decocass_nodong_r(%02x): $%02x <- 8041 STATUS\n", attotime_string(timer_get_time(space->machine), 6), cpu_get_previouspc(space->cpu), offset, data));
} }
else else
@ -1191,7 +1191,7 @@ static READ8_HANDLER( decocass_nodong_r )
{ {
if (0 == (offset & E5XX_MASK)) if (0 == (offset & E5XX_MASK))
{ {
data = upi41_master_r(space->machine->cpu[2], 0); data = upi41_master_r(cputag_get_cpu(space->machine, "mcu"), 0);
LOG(3,("%10s 6502-PC: %04x decocass_nodong_r(%02x): $%02x '%c' <- open bus (D0 replaced with latch)\n", attotime_string(timer_get_time(space->machine), 6), cpu_get_previouspc(space->cpu), offset, data, (data >= 32) ? data : '.')); LOG(3,("%10s 6502-PC: %04x decocass_nodong_r(%02x): $%02x '%c' <- open bus (D0 replaced with latch)\n", attotime_string(timer_get_time(space->machine), 6), cpu_get_previouspc(space->cpu), offset, data, (data >= 32) ? data : '.'));
} }
else else
@ -1263,7 +1263,7 @@ WRITE8_HANDLER( decocass_e5xx_w )
if (0 == (offset & E5XX_MASK)) if (0 == (offset & E5XX_MASK))
{ {
LOG(3,("%10s 6502-PC: %04x decocass_e5xx_w(%02x): $%02x -> %s\n", attotime_string(timer_get_time(space->machine), 6), cpu_get_previouspc(space->cpu), offset, data, offset & 1 ? "8041-CMND" : "8041-DATA")); LOG(3,("%10s 6502-PC: %04x decocass_e5xx_w(%02x): $%02x -> %s\n", attotime_string(timer_get_time(space->machine), 6), cpu_get_previouspc(space->cpu), offset, data, offset & 1 ? "8041-CMND" : "8041-DATA"));
upi41_master_w(space->machine->cpu[2], offset & 1, data); upi41_master_w(cputag_get_cpu(space->machine, "mcu"), offset & 1, data);
#ifdef MAME_DEBUG #ifdef MAME_DEBUG
decocass_fno(offset, data); decocass_fno(offset, data);
#endif #endif

View File

@ -81,5 +81,5 @@ WRITE8_HANDLER( docastle_shared1_w )
WRITE8_HANDLER( docastle_nmitrigger_w ) WRITE8_HANDLER( docastle_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);
} }

View File

@ -166,7 +166,8 @@ WRITE8_HANDLER( srdarwin_control_w )
int bankaddress; int bankaddress;
UINT8 *RAM = memory_region(space->machine, "maincpu"); UINT8 *RAM = memory_region(space->machine, "maincpu");
switch (offset) { switch (offset)
{
case 0: /* Top 3 bits - bank switch, bottom 4 - scroll MSB */ case 0: /* Top 3 bits - bank switch, bottom 4 - scroll MSB */
bankaddress = 0x10000 + (data >> 5) * 0x4000; bankaddress = 0x10000 + (data >> 5) * 0x4000;
memory_set_bankptr(space->machine, 1, &RAM[bankaddress]); memory_set_bankptr(space->machine, 1, &RAM[bankaddress]);
@ -196,9 +197,9 @@ WRITE8_HANDLER( lastmiss_control_w )
scroll2[2] = (data >> 6) & 1; scroll2[2] = (data >> 6) & 1;
if (data & 0x80) if (data & 0x80)
cpu_set_input_line(space->machine->cpu[1], INPUT_LINE_RESET, CLEAR_LINE); cputag_set_input_line(space->machine, "sub", 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, "sub", INPUT_LINE_RESET, ASSERT_LINE);
} }
WRITE8_HANDLER( shackled_control_w ) WRITE8_HANDLER( shackled_control_w )
@ -226,7 +227,8 @@ WRITE8_HANDLER( lastmiss_scrolly_w )
WRITE8_HANDLER( gondo_scroll_w ) WRITE8_HANDLER( gondo_scroll_w )
{ {
switch (offset) { switch (offset)
{
case 0x0: case 0x0:
scroll2[1] = data; /* X LSB */ scroll2[1] = data; /* X LSB */
break; break;
@ -276,7 +278,8 @@ static void draw_sprites1(running_machine* machine, bitmap_t *bitmap, const rect
y=(y+16)%0x200; y=(y+16)%0x200;
x=256 - x; x=256 - x;
y=256 - y; y=256 - y;
if (flip_screen_get(machine)) { if (flip_screen_get(machine))
{
y=240-y; y=240-y;
x=240-x; x=240-x;
if (fx) fx=0; else fx=1; if (fx) fx=0; else fx=1;
@ -285,7 +288,8 @@ static void draw_sprites1(running_machine* machine, bitmap_t *bitmap, const rect
} }
/* Y Flip determines order of multi-sprite */ /* Y Flip determines order of multi-sprite */
if (extra && fy) { if (extra && fy)
{
sprite2=sprite; sprite2=sprite;
sprite++; sprite++;
} }
@ -348,7 +352,8 @@ static void draw_sprites2(running_machine* machine, bitmap_t *bitmap, const rect
inc = 1; inc = 1;
} }
if (flip_screen_get(machine)) { if (flip_screen_get(machine))
{
y=240-y; y=240-y;
x=240-x; x=240-x;
if (fx) fx=0; else fx=1; if (fx) fx=0; else fx=1;
@ -394,7 +399,8 @@ static void srdarwin_draw_sprites(running_machine* machine, bitmap_t *bitmap, co
fx = buffered_spriteram[offs+1] & 0x04; fx = buffered_spriteram[offs+1] & 0x04;
multi = buffered_spriteram[offs+1] & 0x10; multi = buffered_spriteram[offs+1] & 0x10;
if (flip_screen_get(machine)) { if (flip_screen_get(machine))
{
sy=240-sy; sy=240-sy;
sx=240-sx; sx=240-sx;
if (fx) fx=0; else fx=1; if (fx) fx=0; else fx=1;
@ -424,7 +430,8 @@ static void draw_characters(running_machine* machine, bitmap_t *bitmap, const re
{ {
int mx,my,tile,color,offs; int mx,my,tile,color,offs;
for (offs = 0x800 - 2;offs >= 0;offs -= 2) { for (offs = 0x800 - 2;offs >= 0;offs -= 2)
{
tile=videoram[offs+1]+((videoram[offs]&0xf)<<8); tile=videoram[offs+1]+((videoram[offs]&0xf)<<8);
if (!tile) continue; if (!tile) continue;
@ -526,13 +533,16 @@ VIDEO_START( cobracom )
VIDEO_UPDATE( ghostb ) VIDEO_UPDATE( ghostb )
{ {
if (dec8_pf0_control[0]&0x4) { /* Rowscroll */ if (dec8_pf0_control[0]&0x4)
{ /* Rowscroll */
int offs; int offs;
tilemap_set_scroll_rows(dec8_pf0_tilemap,512); tilemap_set_scroll_rows(dec8_pf0_tilemap,512);
for (offs = 0;offs < 512;offs+=2) for (offs = 0;offs < 512;offs+=2)
tilemap_set_scrollx( dec8_pf0_tilemap,offs/2, (dec8_pf0_control[0x10]<<8)+dec8_pf0_control[0x11] + (dec8_row[offs]<<8)+dec8_row[offs+1] ); tilemap_set_scrollx( dec8_pf0_tilemap,offs/2, (dec8_pf0_control[0x10]<<8)+dec8_pf0_control[0x11] + (dec8_row[offs]<<8)+dec8_row[offs+1] );
} else { }
else
{
tilemap_set_scroll_rows(dec8_pf0_tilemap,1); tilemap_set_scroll_rows(dec8_pf0_tilemap,1);
tilemap_set_scrollx( dec8_pf0_tilemap,0, (dec8_pf0_control[0x10]<<8)+dec8_pf0_control[0x11] ); tilemap_set_scrollx( dec8_pf0_tilemap,0, (dec8_pf0_control[0x10]<<8)+dec8_pf0_control[0x11] );
} }

View File

@ -529,7 +529,7 @@ VIDEO_UPDATE( decocass )
rectangle clip; rectangle clip;
if (0xc0 != (input_port_read(screen->machine, "IN2") & 0xc0)) /* coin slots assert an NMI */ if (0xc0 != (input_port_read(screen->machine, "IN2") & 0xc0)) /* coin slots assert an NMI */
cpu_set_input_line(screen->machine->cpu[0], INPUT_LINE_NMI, ASSERT_LINE); cputag_set_input_line(screen->machine, "maincpu", INPUT_LINE_NMI, ASSERT_LINE);
if (0 == (watchdog_flip & 0x04)) if (0 == (watchdog_flip & 0x04))
watchdog_reset(screen->machine); watchdog_reset(screen->machine);

View File

@ -226,7 +226,7 @@ VIDEO_UPDATE( dogfgt )
if (lastflip != flip_screen_get(screen->machine) || lastpixcolor != pixcolor) if (lastflip != flip_screen_get(screen->machine) || lastpixcolor != pixcolor)
{ {
const address_space *space = cpu_get_address_space(screen->machine->cpu[0], ADDRESS_SPACE_PROGRAM); const address_space *space = cputag_get_address_space(screen->machine, "maincpu", ADDRESS_SPACE_PROGRAM);
lastflip = flip_screen_get(screen->machine); lastflip = flip_screen_get(screen->machine);
lastpixcolor = pixcolor; lastpixcolor = pixcolor;

View File

@ -904,14 +904,14 @@ VIDEO_START( popbingo )
VIDEO_EOF( dooyong ) VIDEO_EOF( dooyong )
{ {
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);
} }
VIDEO_EOF( rshark ) VIDEO_EOF( rshark )
{ {
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

@ -244,7 +244,7 @@ VIDEO_UPDATE( dynduke )
VIDEO_EOF( dynduke ) VIDEO_EOF( dynduke )
{ {
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); // Could be a memory location instead buffer_spriteram16_w(space, 0, 0, 0xffff); // Could be a memory location instead
} }