Again, number-to-tag conversions in CPU calls

This commit is contained in:
Fabio Priuli 2009-04-30 08:17:28 +00:00
parent 1cf49c43b5
commit 706c525c72
78 changed files with 523 additions and 482 deletions

View File

@ -40,7 +40,7 @@ WRITE8_HANDLER( irem_sound_cmd_w )
if ((data & 0x80) == 0) if ((data & 0x80) == 0)
soundlatch_w(space, 0, data & 0x7f); soundlatch_w(space, 0, data & 0x7f);
else else
cpu_set_input_line(space->machine->cpu[1], 0, ASSERT_LINE); cputag_set_input_line(space->machine, "iremsound", 0, ASSERT_LINE);
} }
@ -152,7 +152,7 @@ static WRITE8_DEVICE_HANDLER( ay8910_1_porta_w )
static WRITE8_HANDLER( sound_irq_ack_w ) static WRITE8_HANDLER( sound_irq_ack_w )
{ {
cpu_set_input_line(space->machine->cpu[1], 0, CLEAR_LINE); cputag_set_input_line(space->machine, "iremsound", 0, CLEAR_LINE);
} }
@ -191,13 +191,13 @@ static void adpcm_int(const device_config *device)
{ {
const device_config *msm2 = devtag_get_device(device->machine, "msm2"); const device_config *msm2 = devtag_get_device(device->machine, "msm2");
cpu_set_input_line(device->machine->cpu[1], INPUT_LINE_NMI, PULSE_LINE); cputag_set_input_line(device->machine, "iremsound", INPUT_LINE_NMI, PULSE_LINE);
/* the first MSM5205 clocks the second */ /* the first MSM5205 clocks the second */
if (msm2 != NULL) if (msm2 != NULL)
{ {
msm5205_vclk_w(msm2,1); msm5205_vclk_w(msm2, 1);
msm5205_vclk_w(msm2,0); msm5205_vclk_w(msm2, 0);
} }
} }

View File

@ -191,13 +191,13 @@ static TIMER_CALLBACK( serial_callback );
void jaguar_dsp_suspend(running_machine *machine) void jaguar_dsp_suspend(running_machine *machine)
{ {
cpu_suspend(machine->cpu[2], SUSPEND_REASON_SPIN, 1); cputag_suspend(machine, "audiocpu", SUSPEND_REASON_SPIN, 1);
} }
void jaguar_dsp_resume(running_machine *machine) void jaguar_dsp_resume(running_machine *machine)
{ {
cpu_resume(machine->cpu[2], SUSPEND_REASON_SPIN); cputag_resume(machine, "audiocpu", SUSPEND_REASON_SPIN);
} }
@ -212,11 +212,11 @@ static void update_gpu_irq(running_machine *machine)
{ {
if (gpu_irq_state & dsp_regs[JINTCTRL] & 0x1f) if (gpu_irq_state & dsp_regs[JINTCTRL] & 0x1f)
{ {
cpu_set_input_line(machine->cpu[1], 1, ASSERT_LINE); cputag_set_input_line(machine, "gpu", 1, ASSERT_LINE);
jaguar_gpu_resume(machine); jaguar_gpu_resume(machine);
} }
else else
cpu_set_input_line(machine->cpu[1], 1, CLEAR_LINE); cputag_set_input_line(machine, "gpu", 1, CLEAR_LINE);
} }
@ -270,7 +270,7 @@ void cojag_sound_init(running_machine *machine)
} }
#if ENABLE_SPEEDUP_HACKS #if ENABLE_SPEEDUP_HACKS
memory_install_write32_handler(cpu_get_address_space(machine->cpu[2], ADDRESS_SPACE_PROGRAM), 0xf1a100, 0xf1a103, 0, 0, dsp_flags_w); memory_install_write32_handler(cputag_get_address_space(machine, "audiocpu", ADDRESS_SPACE_PROGRAM), 0xf1a100, 0xf1a103, 0, 0, dsp_flags_w);
#endif #endif
} }
@ -362,11 +362,11 @@ WRITE32_HANDLER( jaguar_jerry_regs32_w )
static WRITE32_HANDLER( dsp_flags_w ) static WRITE32_HANDLER( dsp_flags_w )
{ {
/* write the data through */ /* write the data through */
jaguardsp_ctrl_w(space->machine->cpu[2], offset, data, mem_mask); jaguardsp_ctrl_w(cputag_get_cpu(space->machine, "audiocpu"), offset, data, mem_mask);
/* if they were clearing the A2S interrupt, see if we are headed for the spin */ /* if they were clearing the A2S interrupt, see if we are headed for the spin */
/* loop with R22 != 0; if we are, just start spinning again */ /* loop with R22 != 0; if we are, just start spinning again */
if (space->cpu == space->machine->cpu[2] && ACCESSING_BITS_8_15 && (data & 0x400)) if (space->cpu == cputag_get_cpu(space->machine, "audiocpu") && ACCESSING_BITS_8_15 && (data & 0x400))
{ {
/* see if we're going back to the spin loop */ /* see if we're going back to the spin loop */
if (!(data & 0x04000) && cpu_get_reg(space->cpu, JAGUAR_R22) != 0) if (!(data & 0x04000) && cpu_get_reg(space->cpu, JAGUAR_R22) != 0)
@ -393,7 +393,7 @@ static WRITE32_HANDLER( dsp_flags_w )
static TIMER_CALLBACK( serial_chunky_callback ) static TIMER_CALLBACK( serial_chunky_callback )
{ {
/* assert the A2S IRQ on CPU #2 (DSP) */ /* assert the A2S IRQ on CPU #2 (DSP) */
cpu_set_input_line(machine->cpu[2], 1, ASSERT_LINE); cputag_set_input_line(machine, "audiocpu", 1, ASSERT_LINE);
jaguar_dsp_resume(machine); jaguar_dsp_resume(machine);
/* fix flaky code in interrupt handler which thwarts our speedup */ /* fix flaky code in interrupt handler which thwarts our speedup */
@ -412,7 +412,7 @@ static TIMER_CALLBACK( serial_chunky_callback )
static TIMER_CALLBACK( serial_callback ) static TIMER_CALLBACK( serial_callback )
{ {
/* assert the A2S IRQ on CPU #2 (DSP) */ /* assert the A2S IRQ on CPU #2 (DSP) */
cpu_set_input_line(machine->cpu[2], 1, ASSERT_LINE); cputag_set_input_line(machine, "audiocpu", 1, ASSERT_LINE);
jaguar_dsp_resume(machine); jaguar_dsp_resume(machine);
} }
@ -468,5 +468,3 @@ WRITE32_HANDLER( jaguar_serial_w )
break; break;
} }
} }

View File

@ -60,7 +60,7 @@ static SOUND_RESET( jedi )
static WRITE8_HANDLER( irq_ack_w ) static WRITE8_HANDLER( irq_ack_w )
{ {
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);
} }
@ -73,7 +73,7 @@ static WRITE8_HANDLER( irq_ack_w )
WRITE8_HANDLER( jedi_audio_reset_w ) WRITE8_HANDLER( jedi_audio_reset_w )
{ {
cpu_set_input_line(space->machine->cpu[1], INPUT_LINE_RESET, (data & 1) ? CLEAR_LINE : ASSERT_LINE); cputag_set_input_line(space->machine, "audiocpu", INPUT_LINE_RESET, (data & 1) ? CLEAR_LINE : ASSERT_LINE);
} }

View File

@ -759,7 +759,7 @@ generate_int:
/* generate the appropriate interrupt */ /* generate the appropriate interrupt */
i80186.intr.poll_status = 0x8000 | new_vector; i80186.intr.poll_status = 0x8000 | new_vector;
if (!i80186.intr.pending) if (!i80186.intr.pending)
cpu_set_input_line(machine->cpu[2], 0, ASSERT_LINE); cputag_set_input_line(machine, "audiocpu", 0, ASSERT_LINE);
i80186.intr.pending = 1; i80186.intr.pending = 1;
if (LOG_INTERRUPTS) logerror("(%f) **** Requesting interrupt vector %02X\n", attotime_to_double(timer_get_time(machine)), new_vector); if (LOG_INTERRUPTS) logerror("(%f) **** Requesting interrupt vector %02X\n", attotime_to_double(timer_get_time(machine)), new_vector);
} }
@ -1695,14 +1695,14 @@ WRITE8_HANDLER( leland_80186_control_w )
} }
/* /RESET */ /* /RESET */
cpu_set_input_line(space->machine->cpu[2], INPUT_LINE_RESET, data & 0x80 ? CLEAR_LINE : ASSERT_LINE); cputag_set_input_line(space->machine, "audiocpu", INPUT_LINE_RESET, data & 0x80 ? CLEAR_LINE : ASSERT_LINE);
/* /NMI */ /* /NMI */
/* If the master CPU doesn't get a response by the time it's ready to send /* If the master CPU doesn't get a response by the time it's ready to send
the next command, it uses an NMI to force the issue; unfortunately, this the next command, it uses an NMI to force the issue; unfortunately, this
seems to really screw up the sound system. It turns out it's better to seems to really screw up the sound system. It turns out it's better to
just wait for the original interrupt to occur naturally */ just wait for the original interrupt to occur naturally */
/* cpu_set_input_line(space->machine->cpu[2], INPUT_LINE_NMI, data & 0x40 ? CLEAR_LINE : ASSERT_LINE);*/ /* cputag_set_input_line(space->machine, "audiocpu", INPUT_LINE_NMI, data & 0x40 ? CLEAR_LINE : ASSERT_LINE);*/
/* INT0 */ /* INT0 */
if (data & 0x20) if (data & 0x20)
@ -1777,8 +1777,8 @@ static READ16_HANDLER( main_to_sound_comm_r )
static TIMER_CALLBACK( delayed_response_r ) static TIMER_CALLBACK( delayed_response_r )
{ {
int checkpc = param; int checkpc = param;
int pc = cpu_get_reg(machine->cpu[0], Z80_PC); int pc = cpu_get_reg(cputag_get_cpu(machine, "master"), Z80_PC);
int oldaf = cpu_get_reg(machine->cpu[0], Z80_AF); int oldaf = cpu_get_reg(cputag_get_cpu(machine, "master"), Z80_AF);
/* This is pretty cheesy, but necessary. Since the CPUs run in round-robin order, /* This is pretty cheesy, but necessary. Since the CPUs run in round-robin order,
synchronizing on the write to this register from the slave side does nothing. synchronizing on the write to this register from the slave side does nothing.
@ -1791,7 +1791,7 @@ static TIMER_CALLBACK( delayed_response_r )
if (LOG_COMM) logerror("(Updated sound response latch to %02X)\n", sound_response); if (LOG_COMM) logerror("(Updated sound response latch to %02X)\n", sound_response);
oldaf = (oldaf & 0x00ff) | (sound_response << 8); oldaf = (oldaf & 0x00ff) | (sound_response << 8);
cpu_set_reg(machine->cpu[0], Z80_AF, oldaf); cpu_set_reg(cputag_get_cpu(machine, "master"), Z80_AF, oldaf);
} }
else else
logerror("ERROR: delayed_response_r - current PC = %04X, checkPC = %04X\n", pc, checkpc); logerror("ERROR: delayed_response_r - current PC = %04X, checkPC = %04X\n", pc, checkpc);

View File

@ -2495,7 +2495,7 @@ MACHINE_DRIVER_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(machine->cpu[0], 3, state); // cputag_set_input_line(machine, "maincpu", 3, state);
} }
static const ics2115_interface vbowl_ics2115_interface = { static const ics2115_interface vbowl_ics2115_interface = {

View File

@ -101,7 +101,7 @@ static READ8_HANDLER( igs_irqack_r )
static WRITE8_HANDLER( igs_irqack_w ) static WRITE8_HANDLER( igs_irqack_w )
{ {
// cpu_set_input_line(space->machine->cpu[0], 0, CLEAR_LINE); // cputag_set_input_line(space->machine, "maincpu", 0, CLEAR_LINE);
} }
@ -2251,5 +2251,3 @@ GAMEL( 2000, igs_ncs2, 0, igs_ncs, igs_ncs, igs_ncs2, ROT0, "IGS", "N
GAMEL( 1998, stellecu, 0, number10, number10, 0, ROT0, "Sure", "Stelle e Cubi (Italy)", GAME_NOT_WORKING, layout_igspoker ) GAMEL( 1998, stellecu, 0, number10, number10, 0, ROT0, "Sure", "Stelle e Cubi (Italy)", GAME_NOT_WORKING, layout_igspoker )
GAMEL( 1993?, pktet346, 0, pktetris, pktet346, pktet346, ROT0, "IGS", "PK Tetris (v346I)", 0, layout_igspoker ) GAMEL( 1993?, pktet346, 0, pktetris, pktet346, pktet346, ROT0, "IGS", "PK Tetris (v346I)", 0, layout_igspoker )

View File

@ -242,7 +242,7 @@ static READ16_HANDLER( test_r )
static WRITE16_HANDLER( irq_callback_w ) static WRITE16_HANDLER( irq_callback_w )
{ {
// popmessage("%02x",data); // popmessage("%02x",data);
cpu_set_input_line(space->machine->cpu[0],3,HOLD_LINE ); cputag_set_input_line(space->machine, "maincpu", 3, HOLD_LINE );
} }
static WRITE16_HANDLER( sound_write_w ) static WRITE16_HANDLER( sound_write_w )

View File

@ -113,7 +113,7 @@ static WRITE8_HANDLER( transmit_data_w )
} }
static READ8_HANDLER( trigger_slave_nmi_r ) static READ8_HANDLER( trigger_slave_nmi_r )
{ {
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);
return 0; return 0;
} }

View File

@ -99,7 +99,7 @@ static WRITE16_HANDLER( inufuku_soundcommand_w )
pending_command = 1; pending_command = 1;
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);
} }
} }
@ -129,7 +129,7 @@ static MACHINE_RESET( inufuku )
static DRIVER_INIT( inufuku ) static DRIVER_INIT( inufuku )
{ {
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);
pending_command = 1; pending_command = 1;
inufuku_soundrombank_w(space, 0, 0); inufuku_soundrombank_w(space, 0, 0);
} }
@ -351,7 +351,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 const ym2610_interface ym2610_config = static const ym2610_interface ym2610_config =

View File

@ -85,7 +85,7 @@ static INTERRUPT_GEN( iqblock_interrupt )
static WRITE8_HANDLER( iqblock_irqack_w ) static WRITE8_HANDLER( iqblock_irqack_w )
{ {
cpu_set_input_line(space->machine->cpu[0], 0, CLEAR_LINE); cputag_set_input_line(space->machine, "maincpu", 0, CLEAR_LINE);
} }
static READ8_HANDLER( extrarom_r ) static READ8_HANDLER( extrarom_r )
@ -441,7 +441,7 @@ static DRIVER_INIT( iqblock )
paletteram_2 = rom + 0x12800; paletteram_2 = rom + 0x12800;
iqblock_fgvideoram = rom + 0x16800; iqblock_fgvideoram = rom + 0x16800;
iqblock_bgvideoram = rom + 0x17000; iqblock_bgvideoram = rom + 0x17000;
memory_install_write8_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM), 0xfe26, 0xfe26, 0, 0, iqblock_prot_w); memory_install_write8_handler(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), 0xfe26, 0xfe26, 0, 0, iqblock_prot_w);
iqblock_video_type=1; iqblock_video_type=1;
} }
@ -463,7 +463,7 @@ static DRIVER_INIT( grndtour )
paletteram_2 = rom + 0x12800; paletteram_2 = rom + 0x12800;
iqblock_fgvideoram = rom + 0x16800; iqblock_fgvideoram = rom + 0x16800;
iqblock_bgvideoram = rom + 0x17000; iqblock_bgvideoram = rom + 0x17000;
memory_install_write8_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM), 0xfe39, 0xfe39, 0, 0, grndtour_prot_w); memory_install_write8_handler(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), 0xfe39, 0xfe39, 0, 0, grndtour_prot_w);
iqblock_video_type=0; iqblock_video_type=0;
} }
@ -471,4 +471,3 @@ static DRIVER_INIT( grndtour )
GAME( 1993, iqblock, 0, iqblock, iqblock, iqblock, ROT0, "IGS", "IQ-Block", 0 ) GAME( 1993, iqblock, 0, iqblock, iqblock, iqblock, ROT0, "IGS", "IQ-Block", 0 )
GAME( 1993, grndtour, 0, iqblock, iqblock, grndtour, ROT0, "IGS", "Grand Tour", 0 ) GAME( 1993, grndtour, 0, iqblock, iqblock, grndtour, ROT0, "IGS", "Grand Tour", 0 )

View File

@ -102,13 +102,13 @@ static WRITE8_HANDLER( irobot_nvram_w )
static WRITE8_HANDLER( irobot_clearirq_w ) static WRITE8_HANDLER( irobot_clearirq_w )
{ {
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);
} }
static WRITE8_HANDLER( irobot_clearfirq_w ) static WRITE8_HANDLER( irobot_clearfirq_w )
{ {
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);
} }

View File

@ -46,7 +46,7 @@ static INTERRUPT_GEN( ironhors_interrupt )
static WRITE8_HANDLER( ironhors_sh_irqtrigger_w ) static WRITE8_HANDLER( ironhors_sh_irqtrigger_w )
{ {
cpu_set_input_line_and_vector(space->machine->cpu[1],0,HOLD_LINE,0xff); cputag_set_input_line_and_vector(space->machine, "soundcpu", 0, HOLD_LINE, 0xff);
} }
static WRITE8_DEVICE_HANDLER( ironhors_filter_w ) static WRITE8_DEVICE_HANDLER( ironhors_filter_w )
@ -390,7 +390,7 @@ static INTERRUPT_GEN( farwest_interrupt )
static READ8_DEVICE_HANDLER( farwest_soundlatch_r ) static READ8_DEVICE_HANDLER( farwest_soundlatch_r )
{ {
return soundlatch_r(cpu_get_address_space(device->machine->cpu[1], ADDRESS_SPACE_PROGRAM),0); return soundlatch_r(cputag_get_address_space(device->machine, "soundcpu", ADDRESS_SPACE_PROGRAM),0);
} }
static const ym2203_interface farwest_ym2203_config = static const ym2203_interface farwest_ym2203_config =

View File

@ -102,7 +102,7 @@ static WRITE8_HANDLER(z80_0_latch2_write)
if (z80_2_nmi_enable) if (z80_2_nmi_enable)
{ {
logerror("Executing an NMI on CPU2\n"); logerror("Executing an NMI on CPU2\n");
cpu_set_input_line(space->machine->cpu[2], INPUT_LINE_NMI, PULSE_LINE); /* Maybe this is a ASSERT_LINE, CLEAR_LINE combo? */ cputag_set_input_line(space->machine, "sub", INPUT_LINE_NMI, PULSE_LINE); /* Maybe this is a ASSERT_LINE, CLEAR_LINE combo? */
z80_2_nmi_enable = 0; z80_2_nmi_enable = 0;
} }
} }
@ -316,7 +316,7 @@ static INTERRUPT_GEN( vblank_callback_istellar )
cpu_set_input_line(device, 0, ASSERT_LINE); cpu_set_input_line(device, 0, ASSERT_LINE);
/* Interrupt presumably comes from the LDP's status strobe */ /* Interrupt presumably comes from the LDP's status strobe */
cpu_set_input_line(device->machine->cpu[2], 0, ASSERT_LINE); cputag_set_input_line(device->machine, "sub", 0, ASSERT_LINE);
} }

View File

@ -426,14 +426,17 @@ void itech32_update_interrupts(running_machine *machine, int vint, int xint, int
if (xint != -1) xint_state = xint; if (xint != -1) xint_state = xint;
if (qint != -1) qint_state = qint; if (qint != -1) qint_state = qint;
if (is_drivedge) { if (is_drivedge)
cpu_set_input_line(machine->cpu[0], 3, vint_state ? ASSERT_LINE : CLEAR_LINE); {
cpu_set_input_line(machine->cpu[0], 4, xint_state ? ASSERT_LINE : CLEAR_LINE); cputag_set_input_line(machine, "maincpu", 3, vint_state ? ASSERT_LINE : CLEAR_LINE);
cpu_set_input_line(machine->cpu[0], 5, qint_state ? ASSERT_LINE : CLEAR_LINE); cputag_set_input_line(machine, "maincpu", 4, xint_state ? ASSERT_LINE : CLEAR_LINE);
} else { cputag_set_input_line(machine, "maincpu", 5, qint_state ? ASSERT_LINE : CLEAR_LINE);
cpu_set_input_line(machine->cpu[0], 1, vint_state ? ASSERT_LINE : CLEAR_LINE); }
cpu_set_input_line(machine->cpu[0], 2, xint_state ? ASSERT_LINE : CLEAR_LINE); else
cpu_set_input_line(machine->cpu[0], 3, qint_state ? ASSERT_LINE : CLEAR_LINE); {
cputag_set_input_line(machine, "maincpu", 1, vint_state ? ASSERT_LINE : CLEAR_LINE);
cputag_set_input_line(machine, "maincpu", 2, xint_state ? ASSERT_LINE : CLEAR_LINE);
cputag_set_input_line(machine, "maincpu", 3, qint_state ? ASSERT_LINE : CLEAR_LINE);
} }
} }
@ -475,8 +478,8 @@ static MACHINE_RESET( drivedge )
{ {
MACHINE_RESET_CALL(itech32); MACHINE_RESET_CALL(itech32);
cpu_set_input_line(machine->cpu[2], INPUT_LINE_RESET, ASSERT_LINE); cputag_set_input_line(machine, "dsp1", INPUT_LINE_RESET, ASSERT_LINE);
cpu_set_input_line(machine->cpu[3], INPUT_LINE_RESET, ASSERT_LINE); cputag_set_input_line(machine, "dsp2", INPUT_LINE_RESET, ASSERT_LINE);
STOP_TMS_SPINNING(machine, 0); STOP_TMS_SPINNING(machine, 0);
STOP_TMS_SPINNING(machine, 1); STOP_TMS_SPINNING(machine, 1);
} }
@ -667,7 +670,7 @@ static TIMER_CALLBACK( delayed_sound_data_w )
{ {
sound_data = param; sound_data = param;
sound_int_state = 1; sound_int_state = 1;
cpu_set_input_line(machine->cpu[1], M6809_IRQ_LINE, ASSERT_LINE); cputag_set_input_line(machine, "soundcpu", M6809_IRQ_LINE, ASSERT_LINE);
} }
@ -693,7 +696,7 @@ static WRITE32_HANDLER( sound_data32_w )
static READ8_HANDLER( sound_data_r ) static READ8_HANDLER( sound_data_r )
{ {
cpu_set_input_line(space->machine->cpu[1], M6809_IRQ_LINE, CLEAR_LINE); cputag_set_input_line(space->machine, "soundcpu", M6809_IRQ_LINE, CLEAR_LINE);
sound_int_state = 0; sound_int_state = 0;
return sound_data; return sound_data;
} }
@ -720,7 +723,7 @@ static READ8_HANDLER( sound_data_buffer_r )
static WRITE8_DEVICE_HANDLER( drivedge_portb_out ) static WRITE8_DEVICE_HANDLER( drivedge_portb_out )
{ {
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);
// logerror("PIA port B write = %02x\n", data); // logerror("PIA port B write = %02x\n", data);
/* bit 0 controls the fan light */ /* bit 0 controls the fan light */
@ -745,7 +748,7 @@ static WRITE8_DEVICE_HANDLER( drivedge_turbo_light )
static WRITE8_DEVICE_HANDLER( pia_portb_out ) static WRITE8_DEVICE_HANDLER( pia_portb_out )
{ {
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);
// logerror("PIA port B write = %02x\n", data); // logerror("PIA port B write = %02x\n", data);
/* bit 4 controls the ticket dispenser */ /* bit 4 controls the ticket dispenser */
@ -792,7 +795,7 @@ static const via6522_interface drivedge_via_interface =
static WRITE8_HANDLER( firq_clear_w ) static WRITE8_HANDLER( firq_clear_w )
{ {
cpu_set_input_line(space->machine->cpu[1], M6809_FIRQ_LINE, CLEAR_LINE); cputag_set_input_line(space->machine, "soundcpu", M6809_FIRQ_LINE, CLEAR_LINE);
} }
@ -805,8 +808,8 @@ static WRITE8_HANDLER( firq_clear_w )
static WRITE32_HANDLER( tms_reset_assert_w ) static WRITE32_HANDLER( tms_reset_assert_w )
{ {
cpu_set_input_line(space->machine->cpu[2], INPUT_LINE_RESET, ASSERT_LINE); cputag_set_input_line(space->machine, "dsp1", INPUT_LINE_RESET, ASSERT_LINE);
cpu_set_input_line(space->machine->cpu[3], INPUT_LINE_RESET, ASSERT_LINE); cputag_set_input_line(space->machine, "dsp2", INPUT_LINE_RESET, ASSERT_LINE);
} }
@ -815,12 +818,12 @@ static WRITE32_HANDLER( tms_reset_clear_w )
/* kludge to prevent crash on first boot */ /* kludge to prevent crash on first boot */
if ((tms1_ram[0] & 0xff000000) == 0) if ((tms1_ram[0] & 0xff000000) == 0)
{ {
cpu_set_input_line(space->machine->cpu[2], INPUT_LINE_RESET, CLEAR_LINE); cputag_set_input_line(space->machine, "dsp1", INPUT_LINE_RESET, CLEAR_LINE);
STOP_TMS_SPINNING(space->machine, 0); STOP_TMS_SPINNING(space->machine, 0);
} }
if ((tms2_ram[0] & 0xff000000) == 0) if ((tms2_ram[0] & 0xff000000) == 0)
{ {
cpu_set_input_line(space->machine->cpu[3], INPUT_LINE_RESET, CLEAR_LINE); cputag_set_input_line(space->machine, "dsp2", INPUT_LINE_RESET, CLEAR_LINE);
STOP_TMS_SPINNING(space->machine, 1); STOP_TMS_SPINNING(space->machine, 1);
} }
} }
@ -3917,8 +3920,8 @@ static DRIVER_INIT( drivedge )
itech32_planes = 1; itech32_planes = 1;
is_drivedge = 1; is_drivedge = 1;
memory_install_read32_handler(cpu_get_address_space(machine->cpu[2], ADDRESS_SPACE_PROGRAM), 0x8382, 0x8382, 0, 0, drivedge_tms1_speedup_r); memory_install_read32_handler(cputag_get_address_space(machine, "dsp1", ADDRESS_SPACE_PROGRAM), 0x8382, 0x8382, 0, 0, drivedge_tms1_speedup_r);
memory_install_read32_handler(cpu_get_address_space(machine->cpu[3], ADDRESS_SPACE_PROGRAM), 0x8382, 0x8382, 0, 0, drivedge_tms2_speedup_r); memory_install_read32_handler(cputag_get_address_space(machine, "dsp2", ADDRESS_SPACE_PROGRAM), 0x8382, 0x8382, 0, 0, drivedge_tms2_speedup_r);
} }
@ -3934,10 +3937,10 @@ static DRIVER_INIT( wcbowl )
itech32_vram_height = 1024; itech32_vram_height = 1024;
itech32_planes = 1; itech32_planes = 1;
memory_install_read16_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM), 0x680000, 0x680001, 0, 0, trackball_r); memory_install_read16_handler(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), 0x680000, 0x680001, 0, 0, trackball_r);
memory_install_read16_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM), 0x578000, 0x57ffff, 0, 0, (read16_space_func)SMH_NOP); memory_install_read16_handler(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), 0x578000, 0x57ffff, 0, 0, (read16_space_func)SMH_NOP);
memory_install_readwrite16_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM), 0x680080, 0x680081, 0, 0, wcbowl_prot_result_r, (write16_space_func)SMH_NOP); memory_install_readwrite16_handler(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), 0x680080, 0x680081, 0, 0, wcbowl_prot_result_r, (write16_space_func)SMH_NOP);
} }
@ -3950,8 +3953,8 @@ static void init_sftm_common(running_machine *machine, int prot_addr)
itech020_prot_address = prot_addr; itech020_prot_address = prot_addr;
memory_install_write32_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM), 0x300000, 0x300003, 0, 0, itech020_color2_w); memory_install_write32_handler(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), 0x300000, 0x300003, 0, 0, itech020_color2_w);
memory_install_write32_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM), 0x380000, 0x380003, 0, 0, itech020_color1_w); memory_install_write32_handler(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), 0x380000, 0x380003, 0, 0, itech020_color1_w);
} }
@ -3981,10 +3984,10 @@ static void init_shuffle_bowl_common(running_machine *machine, int prot_addr)
itech020_prot_address = prot_addr; itech020_prot_address = prot_addr;
memory_install_write32_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM), 0x300000, 0x300003, 0, 0, itech020_color2_w); memory_install_write32_handler(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), 0x300000, 0x300003, 0, 0, itech020_color2_w);
memory_install_write32_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM), 0x380000, 0x380003, 0, 0, itech020_color1_w); memory_install_write32_handler(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), 0x380000, 0x380003, 0, 0, itech020_color1_w);
memory_install_read32_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM), 0x180800, 0x180803, 0, 0, trackball32_4bit_r); memory_install_read32_handler(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), 0x180800, 0x180803, 0, 0, trackball32_4bit_r);
memory_install_read32_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM), 0x181000, 0x181003, 0, 0, trackball32_4bit_p2_r); memory_install_read32_handler(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), 0x181000, 0x181003, 0, 0, trackball32_4bit_p2_r);
} }
@ -4003,7 +4006,7 @@ static DRIVER_INIT( wcbowln ) /* PIC 16C54 labeled as ITBWL-3 */
static void install_timekeeper(running_machine *machine) static void install_timekeeper(running_machine *machine)
{ {
const device_config *device = devtag_get_device(machine, "m48t02"); const device_config *device = devtag_get_device(machine, "m48t02");
memory_install_readwrite32_device_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM), device, 0x681000, 0x6817ff, 0, 0, timekeeper_32be_r, timekeeper_32be_w); memory_install_readwrite32_device_handler(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), device, 0x681000, 0x6817ff, 0, 0, timekeeper_32be_r, timekeeper_32be_w);
} }
static DRIVER_INIT( wcbowlt ) /* PIC 16C54 labeled as ITBWL-3 */ static DRIVER_INIT( wcbowlt ) /* PIC 16C54 labeled as ITBWL-3 */
@ -4034,7 +4037,7 @@ static DRIVER_INIT( gt3d )
Hacked versions of this PCB have been found with GT97 Hacked versions of this PCB have been found with GT97
through GTClassic. This is _NOT_ a factory modification through GTClassic. This is _NOT_ a factory modification
*/ */
memory_install_read32_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM), 0x200000, 0x200003, 0, 0, trackball32_8bit_r); memory_install_read32_handler(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), 0x200000, 0x200003, 0, 0, trackball32_8bit_r);
init_gt_common(machine); init_gt_common(machine);
} }
@ -4047,8 +4050,8 @@ static DRIVER_INIT( aama )
board share the same sound CPU code and sample ROMs. board share the same sound CPU code and sample ROMs.
This board has all versions of GT for it, GT3D through GTClassic This board has all versions of GT for it, GT3D through GTClassic
*/ */
memory_install_read32_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM), 0x180800, 0x180803, 0, 0, trackball32_4bit_r); memory_install_read32_handler(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), 0x180800, 0x180803, 0, 0, trackball32_4bit_r);
memory_install_read32_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM), 0x181000, 0x181003, 0, 0, trackball32_4bit_p2_r); memory_install_read32_handler(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), 0x181000, 0x181003, 0, 0, trackball32_4bit_p2_r);
init_gt_common(machine); init_gt_common(machine);
} }
@ -4072,7 +4075,7 @@ static DRIVER_INIT( s_ver )
board: GT97 v1.21S, GT98, GT99, GT2K & GT Classic Versions 1.00S board: GT97 v1.21S, GT98, GT99, GT2K & GT Classic Versions 1.00S
Trackball info is read through 200202 (actually 200203). Trackball info is read through 200202 (actually 200203).
*/ */
memory_install_read32_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM), 0x200200, 0x200203, 0, 0, trackball32_4bit_r); memory_install_read32_handler(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), 0x200200, 0x200203, 0, 0, trackball32_4bit_r);
init_gt_common(machine); init_gt_common(machine);
} }
@ -4086,7 +4089,7 @@ static DRIVER_INIT( gt3dl )
Player 1 trackball read through 200003 Player 1 trackball read through 200003
Player 2 trackball read through 200002 Player 2 trackball read through 200002
*/ */
memory_install_read32_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM), 0x200000, 0x200003, 0, 0, trackball32_4bit_combined_r); memory_install_read32_handler(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), 0x200000, 0x200003, 0, 0, trackball32_4bit_combined_r);
init_gt_common(machine); init_gt_common(machine);
} }
@ -4094,7 +4097,7 @@ static DRIVER_INIT( gt3dl )
static DRIVER_INIT( gtclassp ) static DRIVER_INIT( gtclassp )
{ {
/* a little extra protection */ /* a little extra protection */
memory_install_read32_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM), 0x680000, 0x680003, 0, 0, gtclass_prot_result_r); memory_install_read32_handler(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), 0x680000, 0x680003, 0, 0, gtclass_prot_result_r);
DRIVER_INIT_CALL(aama); DRIVER_INIT_CALL(aama);
/* The protection code is: /* The protection code is:

View File

@ -592,7 +592,7 @@ static const via6522_interface via_interface =
void itech8_update_interrupts(running_machine *machine, int periodic, int tms34061, int blitter) void itech8_update_interrupts(running_machine *machine, int periodic, int tms34061, int blitter)
{ {
cpu_type main_cpu_type = cpu_get_type(machine->cpu[0]); cpu_type main_cpu_type = cpu_get_type(cputag_get_cpu(machine, "maincpu"));
/* update the states */ /* update the states */
if (periodic != -1) periodic_int = periodic; if (periodic != -1) periodic_int = periodic;
@ -603,16 +603,16 @@ void itech8_update_interrupts(running_machine *machine, int periodic, int tms340
if (main_cpu_type == CPU_M6809 || main_cpu_type == CPU_HD6309) if (main_cpu_type == CPU_M6809 || main_cpu_type == CPU_HD6309)
{ {
/* just modify lines that have changed */ /* just modify lines that have changed */
if (periodic != -1) cpu_set_input_line(machine->cpu[0], INPUT_LINE_NMI, periodic ? ASSERT_LINE : CLEAR_LINE); if (periodic != -1) cputag_set_input_line(machine, "maincpu", INPUT_LINE_NMI, periodic ? ASSERT_LINE : CLEAR_LINE);
if (tms34061 != -1) cpu_set_input_line(machine->cpu[0], M6809_IRQ_LINE, tms34061 ? ASSERT_LINE : CLEAR_LINE); if (tms34061 != -1) cputag_set_input_line(machine, "maincpu", M6809_IRQ_LINE, tms34061 ? ASSERT_LINE : CLEAR_LINE);
if (blitter != -1) cpu_set_input_line(machine->cpu[0], M6809_FIRQ_LINE, blitter ? ASSERT_LINE : CLEAR_LINE); if (blitter != -1) cputag_set_input_line(machine, "maincpu", M6809_FIRQ_LINE, blitter ? ASSERT_LINE : CLEAR_LINE);
} }
/* handle the 68000 case */ /* handle the 68000 case */
else else
{ {
cpu_set_input_line(machine->cpu[0], 2, blitter_int ? ASSERT_LINE : CLEAR_LINE); cputag_set_input_line(machine, "maincpu", 2, blitter_int ? ASSERT_LINE : CLEAR_LINE);
cpu_set_input_line(machine->cpu[0], 3, periodic_int ? ASSERT_LINE : CLEAR_LINE); cputag_set_input_line(machine, "maincpu", 3, periodic_int ? ASSERT_LINE : CLEAR_LINE);
} }
} }
@ -643,13 +643,13 @@ static INTERRUPT_GEN( generate_nmi )
static WRITE8_HANDLER( itech8_nmi_ack_w ) static WRITE8_HANDLER( itech8_nmi_ack_w )
{ {
/* doesn't seem to hold for every game (e.g., hstennis) */ /* doesn't seem to hold for every game (e.g., hstennis) */
/* cpu_set_input_line(space->machine->cpu[0], INPUT_LINE_NMI, CLEAR_LINE);*/ /* cputag_set_input_line(space->machine, "maincpu", INPUT_LINE_NMI, CLEAR_LINE);*/
} }
static void generate_sound_irq(const device_config *device, int state) static void generate_sound_irq(const device_config *device, int state)
{ {
cpu_set_input_line(device->machine->cpu[1], M6809_FIRQ_LINE, state ? ASSERT_LINE : CLEAR_LINE); cputag_set_input_line(device->machine, "soundcpu", M6809_FIRQ_LINE, state ? ASSERT_LINE : CLEAR_LINE);
} }
@ -671,13 +671,13 @@ static MACHINE_START( sstrike )
static MACHINE_RESET( itech8 ) static MACHINE_RESET( itech8 )
{ {
cpu_type main_cpu_type = cpu_get_type(machine->cpu[0]); cpu_type main_cpu_type = cpu_get_type(cputag_get_cpu(machine, "maincpu"));
/* make sure bank 0 is selected */ /* make sure bank 0 is selected */
if (main_cpu_type == CPU_M6809 || main_cpu_type == CPU_HD6309) if (main_cpu_type == CPU_M6809 || main_cpu_type == CPU_HD6309)
{ {
memory_set_bankptr(machine, 1, &memory_region(machine, "maincpu")[0x4000]); memory_set_bankptr(machine, 1, &memory_region(machine, "maincpu")[0x4000]);
device_reset(machine->cpu[0]); device_reset(cputag_get_cpu(machine, "maincpu"));
} }
/* reset the ticket dispenser */ /* reset the ticket dispenser */
@ -793,7 +793,7 @@ static WRITE8_DEVICE_HANDLER( ym2203_portb_out )
/* bit 6 controls the diagnostic sound LED */ /* bit 6 controls the diagnostic sound LED */
/* bit 7 controls the ticket dispenser */ /* bit 7 controls the ticket dispenser */
pia_portb_data = data; pia_portb_data = data;
ticket_dispenser_w(cpu_get_address_space(device->machine->cpu[0], ADDRESS_SPACE_PROGRAM), 0, data & 0x80); ticket_dispenser_w(cputag_get_address_space(device->machine, "maincpu", ADDRESS_SPACE_PROGRAM), 0, data & 0x80);
coin_counter_w(0, (data & 0x20) >> 5); coin_counter_w(0, (data & 0x20) >> 5);
} }
@ -808,7 +808,7 @@ static WRITE8_DEVICE_HANDLER( ym2203_portb_out )
static TIMER_CALLBACK( delayed_sound_data_w ) static TIMER_CALLBACK( delayed_sound_data_w )
{ {
sound_data = param; sound_data = param;
cpu_set_input_line(machine->cpu[1], M6809_IRQ_LINE, ASSERT_LINE); cputag_set_input_line(machine, "soundcpu", M6809_IRQ_LINE, ASSERT_LINE);
} }
@ -831,7 +831,7 @@ static WRITE8_HANDLER( gtg2_sound_data_w )
static READ8_HANDLER( sound_data_r ) static READ8_HANDLER( sound_data_r )
{ {
cpu_set_input_line(space->machine->cpu[1], M6809_IRQ_LINE, CLEAR_LINE); cputag_set_input_line(space->machine, "soundcpu", M6809_IRQ_LINE, CLEAR_LINE);
return sound_data; return sound_data;
} }
@ -2660,25 +2660,25 @@ ROM_END
static DRIVER_INIT( grmatch ) static DRIVER_INIT( grmatch )
{ {
memory_install_write8_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM), 0x0160, 0x0160, 0, 0, grmatch_palette_w); memory_install_write8_handler(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), 0x0160, 0x0160, 0, 0, grmatch_palette_w);
memory_install_write8_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM), 0x0180, 0x0180, 0, 0, grmatch_xscroll_w); memory_install_write8_handler(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), 0x0180, 0x0180, 0, 0, grmatch_xscroll_w);
memory_install_write8_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM), 0x01e0, 0x01ff, 0, 0, (write8_space_func)SMH_UNMAP); memory_install_write8_handler(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), 0x01e0, 0x01ff, 0, 0, (write8_space_func)SMH_UNMAP);
} }
static DRIVER_INIT( slikshot ) static DRIVER_INIT( slikshot )
{ {
memory_install_read8_handler (cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM), 0x0180, 0x0180, 0, 0, slikshot_z80_r); memory_install_read8_handler (cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), 0x0180, 0x0180, 0, 0, slikshot_z80_r);
memory_install_read8_handler (cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM), 0x01cf, 0x01cf, 0, 0, slikshot_z80_control_r); memory_install_read8_handler (cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), 0x01cf, 0x01cf, 0, 0, slikshot_z80_control_r);
memory_install_write8_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM), 0x01cf, 0x01cf, 0, 0, slikshot_z80_control_w); memory_install_write8_handler(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), 0x01cf, 0x01cf, 0, 0, slikshot_z80_control_w);
} }
static DRIVER_INIT( sstrike ) static DRIVER_INIT( sstrike )
{ {
memory_install_read8_handler (cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM), 0x1180, 0x1180, 0, 0, slikshot_z80_r); memory_install_read8_handler (cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), 0x1180, 0x1180, 0, 0, slikshot_z80_r);
memory_install_read8_handler (cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM), 0x11cf, 0x11cf, 0, 0, slikshot_z80_control_r); memory_install_read8_handler (cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), 0x11cf, 0x11cf, 0, 0, slikshot_z80_control_r);
memory_install_write8_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM), 0x11cf, 0x11cf, 0, 0, slikshot_z80_control_w); memory_install_write8_handler(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), 0x11cf, 0x11cf, 0, 0, slikshot_z80_control_w);
} }
@ -2713,15 +2713,15 @@ static DRIVER_INIT( neckneck )
static DRIVER_INIT( rimrockn ) static DRIVER_INIT( rimrockn )
{ {
/* additional input ports */ /* additional input ports */
memory_install_read_port_handler (cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM), 0x0161, 0x0161, 0, 0, "161"); memory_install_read_port_handler (cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), 0x0161, 0x0161, 0, 0, "161");
memory_install_read_port_handler (cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM), 0x0162, 0x0162, 0, 0, "162"); memory_install_read_port_handler (cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), 0x0162, 0x0162, 0, 0, "162");
memory_install_read_port_handler (cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM), 0x0163, 0x0163, 0, 0, "163"); memory_install_read_port_handler (cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), 0x0163, 0x0163, 0, 0, "163");
memory_install_read_port_handler (cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM), 0x0164, 0x0164, 0, 0, "164"); memory_install_read_port_handler (cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), 0x0164, 0x0164, 0, 0, "164");
memory_install_read_port_handler (cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM), 0x0165, 0x0165, 0, 0, "165"); memory_install_read_port_handler (cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), 0x0165, 0x0165, 0, 0, "165");
/* different banking mechanism (disable the old one) */ /* different banking mechanism (disable the old one) */
memory_install_write8_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM), 0x01a0, 0x01a0, 0, 0, rimrockn_bank_w); memory_install_write8_handler(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), 0x01a0, 0x01a0, 0, 0, rimrockn_bank_w);
memory_install_write8_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM), 0x01c0, 0x01df, 0, 0, itech8_blitter_w); memory_install_write8_handler(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), 0x01c0, 0x01df, 0, 0, itech8_blitter_w);
} }

View File

@ -221,7 +221,7 @@ GFXDECODE_END
static MACHINE_RESET( itgambl2 ) static MACHINE_RESET( itgambl2 )
{ {
/* stop the CPU, we have no code for it anyway */ /* stop the CPU, we have no code for it anyway */
cpu_set_input_line(machine->cpu[0], INPUT_LINE_HALT, ASSERT_LINE); cputag_set_input_line(machine, "maincpu", INPUT_LINE_HALT, ASSERT_LINE);
} }
/* default 444 palette for debug purpose*/ /* default 444 palette for debug purpose*/

View File

@ -210,7 +210,7 @@ GFXDECODE_END
static MACHINE_RESET( itgambl3 ) static MACHINE_RESET( itgambl3 )
{ {
/* stop the CPU, we have no code for it anyway */ /* stop the CPU, we have no code for it anyway */
cpu_set_input_line(machine->cpu[0], INPUT_LINE_HALT, ASSERT_LINE); cputag_set_input_line(machine, "maincpu", INPUT_LINE_HALT, ASSERT_LINE);
} }
/* default 444 palette for debug purpose*/ /* default 444 palette for debug purpose*/

View File

@ -171,7 +171,7 @@ GFXDECODE_END
static MACHINE_RESET( itgamble ) static MACHINE_RESET( itgamble )
{ {
/* stop the CPU, we have no code for it anyway */ /* stop the CPU, we have no code for it anyway */
cpu_set_input_line(machine->cpu[0], INPUT_LINE_HALT, ASSERT_LINE); cputag_set_input_line(machine, "maincpu", INPUT_LINE_HALT, ASSERT_LINE);
} }

View File

@ -72,8 +72,8 @@ static READ8_DEVICE_HANDLER( timer_r )
static WRITE8_HANDLER( jack_sh_command_w ) static WRITE8_HANDLER( jack_sh_command_w )
{ {
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);
} }
@ -1436,10 +1436,10 @@ static DRIVER_INIT( striv )
} }
// Set-up the weirdest questions read ever done // Set-up the weirdest questions read ever done
memory_install_read8_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM), 0xc000, 0xcfff, 0, 0, striv_question_r); memory_install_read8_handler(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), 0xc000, 0xcfff, 0, 0, striv_question_r);
// Nop out unused sprites writes // Nop out unused sprites writes
memory_install_write8_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM), 0xb000, 0xb0ff, 0, 0, (write8_space_func)SMH_NOP); memory_install_write8_handler(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), 0xb000, 0xb0ff, 0, 0, (write8_space_func)SMH_NOP);
timer_rate = 128; timer_rate = 128;
} }

View File

@ -243,7 +243,7 @@ static INTERRUPT_GEN( jackal_interrupt )
if (irq_enable) if (irq_enable)
{ {
cpu_set_input_line(device, 0, HOLD_LINE); cpu_set_input_line(device, 0, HOLD_LINE);
cpu_set_input_line(device->machine->cpu[1], INPUT_LINE_NMI, PULSE_LINE); cputag_set_input_line(device->machine, "slave", INPUT_LINE_NMI, PULSE_LINE);
} }
} }

View File

@ -256,7 +256,7 @@ static READ8_HANDLER( igs_irqack_r )
static WRITE8_HANDLER( igs_irqack_w ) static WRITE8_HANDLER( igs_irqack_w )
{ {
// cpu_set_input_line(space->machine->cpu[0], 0, CLEAR_LINE); // cputag_set_input_line(space->machine, "maincpu", 0, CLEAR_LINE);
out[2] = data; out[2] = data;
show_out(); show_out();
} }

View File

@ -626,27 +626,27 @@ static WRITE16_HANDLER( urashima_dma_w )
if(data & 4) if(data & 4)
{ {
UINT32 i; UINT32 i;
for(i=0;i<0x200;i+=2) for(i = 0; i < 0x200; i += 2)
memory_write_word(space,0x88200+i,memory_read_word(space,0x88400+i)); memory_write_word(space, 0x88200 + i, memory_read_word(space, 0x88400 + i));
} }
} }
/*same as $f00c0 sub-routine,but with additional work-around,to remove from here...*/ /*same as $f00c0 sub-routine,but with additional work-around,to remove from here...*/
static void daireika_palette_dma(running_machine *machine,UINT16 val) static void daireika_palette_dma(running_machine *machine, UINT16 val)
{ {
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);
UINT32 index_1,index_2,src_addr,tmp_addr; UINT32 index_1, index_2, src_addr, tmp_addr;
/*a0=301c0+jm_shared_ram[0x540/2] & 0xf00 */ /*a0=301c0+jm_shared_ram[0x540/2] & 0xf00 */
/*a1=88000*/ /*a1=88000*/
src_addr = 0x301c0 + (val * 0x40); src_addr = 0x301c0 + (val * 0x40);
// popmessage("%08x",src_addr); // popmessage("%08x",src_addr);
for(index_1=0;index_1<0x200;index_1+=0x20) for(index_1 = 0; index_1 < 0x200; index_1 += 0x20)
{ {
tmp_addr = src_addr; tmp_addr = src_addr;
src_addr = memory_read_dword(space,src_addr); src_addr = memory_read_dword(space,src_addr);
for(index_2=0;index_2<0x20;index_2+=2) for(index_2 = 0; index_2 < 0x20; index_2 += 2)
memory_write_word(space,0x88000+index_2+index_1,memory_read_word(space,src_addr+index_2)); memory_write_word(space, 0x88000 + index_2 + index_1, memory_read_word(space, src_addr + index_2));
src_addr = tmp_addr + 4; src_addr = tmp_addr + 4;
} }
@ -655,7 +655,7 @@ static void daireika_palette_dma(running_machine *machine,UINT16 val)
/*RAM-based protection handlings*/ /*RAM-based protection handlings*/
static void daireika_mcu_run(running_machine *machine) static void daireika_mcu_run(running_machine *machine)
{ {
static UINT16 prg_prot,dma_old; static UINT16 prg_prot, dma_old;
if(((jm_shared_ram[0x550/2] & 0xf00) == 0x700) && ((jm_shared_ram[0x540/2] & 0xf00) != dma_old)) if(((jm_shared_ram[0x550/2] & 0xf00) == 0x700) && ((jm_shared_ram[0x540/2] & 0xf00) != dma_old))
{ {
@ -2301,45 +2301,45 @@ static READ16_HANDLER( suchipi_mcu_r )
static DRIVER_INIT( urashima ) static DRIVER_INIT( urashima )
{ {
memory_install_read16_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM), 0x80004, 0x80005, 0, 0, urashima_mcu_r ); memory_install_read16_handler(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), 0x80004, 0x80005, 0, 0, urashima_mcu_r );
memory_install_write16_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM), 0x80012, 0x80013, 0, 0, urashima_mcu_w ); memory_install_write16_handler(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), 0x80012, 0x80013, 0, 0, urashima_mcu_w );
mcu_prg = 0x12; mcu_prg = 0x12;
} }
static DRIVER_INIT( daireika ) static DRIVER_INIT( daireika )
{ {
memory_install_read16_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM), 0x80004, 0x80005, 0, 0, daireika_mcu_r ); memory_install_read16_handler(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), 0x80004, 0x80005, 0, 0, daireika_mcu_r );
memory_install_write16_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM), 0x80012, 0x80013, 0, 0, daireika_mcu_w ); memory_install_write16_handler(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), 0x80012, 0x80013, 0, 0, daireika_mcu_w );
mcu_prg = 0x11; mcu_prg = 0x11;
} }
static DRIVER_INIT( mjzoomin ) static DRIVER_INIT( mjzoomin )
{ {
memory_install_read16_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM), 0x80004, 0x80005, 0, 0, mjzoomin_mcu_r ); memory_install_read16_handler(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), 0x80004, 0x80005, 0, 0, mjzoomin_mcu_r );
memory_install_write16_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM), 0x80012, 0x80013, 0, 0, mjzoomin_mcu_w ); memory_install_write16_handler(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), 0x80012, 0x80013, 0, 0, mjzoomin_mcu_w );
mcu_prg = 0x13; mcu_prg = 0x13;
} }
static DRIVER_INIT( kakumei ) static DRIVER_INIT( kakumei )
{ {
memory_install_read16_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM), 0x80004, 0x80005, 0, 0, kakumei_mcu_r ); memory_install_read16_handler(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), 0x80004, 0x80005, 0, 0, kakumei_mcu_r );
mcu_prg = 0x21; mcu_prg = 0x21;
} }
static DRIVER_INIT( kakumei2 ) static DRIVER_INIT( kakumei2 )
{ {
memory_install_read16_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM), 0x80004, 0x80005, 0, 0, kakumei_mcu_r ); memory_install_read16_handler(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), 0x80004, 0x80005, 0, 0, kakumei_mcu_r );
mcu_prg = 0x22; mcu_prg = 0x22;
} }
static DRIVER_INIT( suchipi ) static DRIVER_INIT( suchipi )
{ {
memory_install_read16_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM), 0x80004, 0x80005, 0, 0, suchipi_mcu_r ); memory_install_read16_handler(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), 0x80004, 0x80005, 0, 0, suchipi_mcu_r );
mcu_prg = 0x23; mcu_prg = 0x23;
} }

View File

@ -269,12 +269,12 @@ static READ8_DEVICE_HANDLER( input_system_r )
static WRITE8_HANDLER( sound_latch_w ) static WRITE8_HANDLER( sound_latch_w )
{ {
soundlatch_w(space, 0, data & 0xff); soundlatch_w(space, 0, data & 0xff);
cpu_set_input_line(space->machine->cpu[1], INPUT_LINE_NMI, ASSERT_LINE); cputag_set_input_line(space->machine, "cpu1", INPUT_LINE_NMI, ASSERT_LINE);
} }
static READ8_HANDLER( sound_latch_r ) static READ8_HANDLER( sound_latch_r )
{ {
cpu_set_input_line(space->machine->cpu[1], INPUT_LINE_NMI, CLEAR_LINE); cputag_set_input_line(space->machine, "cpu1", INPUT_LINE_NMI, CLEAR_LINE);
return soundlatch_r(space, 0); return soundlatch_r(space, 0);
} }
@ -292,7 +292,7 @@ static TIMER_CALLBACK( cvsd_bit_timer_callback )
/* Trigger an IRQ for every 8 shifted bits */ /* Trigger an IRQ for every 8 shifted bits */
if ((++cvsd_shift_cnt & 7) == 0) if ((++cvsd_shift_cnt & 7) == 0)
cpu_set_input_line(machine->cpu[1], 0, HOLD_LINE); cputag_set_input_line(machine, "cpu1", 0, HOLD_LINE);
} }
@ -311,7 +311,7 @@ static void jngolady_vclk_cb(const device_config *device)
else else
{ {
msm5205_data_w(device, adpcm_byte & 0xf); msm5205_data_w(device, adpcm_byte & 0xf);
cpu_set_input_line(device->machine->cpu[1], 0, HOLD_LINE); cputag_set_input_line(device->machine, "cpu1", 0, HOLD_LINE);
} }
msm5205_vclk_toggle ^= 1; msm5205_vclk_toggle ^= 1;
@ -333,7 +333,7 @@ static READ8_HANDLER( master_com_r )
static WRITE8_HANDLER( master_com_w ) static WRITE8_HANDLER( master_com_w )
{ {
cpu_set_input_line(space->machine->cpu[2], 0, HOLD_LINE); cputag_set_input_line(space->machine, "nsc", 0, HOLD_LINE);
nsc_latch = data; nsc_latch = data;
} }
@ -1026,7 +1026,7 @@ static READ8_HANDLER( jngolady_rng_r )
static DRIVER_INIT( jngolady ) static DRIVER_INIT( jngolady )
{ {
memory_install_read8_handler(cpu_get_address_space(machine->cpu[2], ADDRESS_SPACE_PROGRAM), 0x08, 0x08, 0, 0, jngolady_rng_r ); memory_install_read8_handler(cputag_get_address_space(machine, "nsc", ADDRESS_SPACE_PROGRAM), 0x08, 0x08, 0, 0, jngolady_rng_r );
} }
static DRIVER_INIT (luckygrl) static DRIVER_INIT (luckygrl)

View File

@ -380,7 +380,7 @@ INPUT_PORTS_END
static INTERRUPT_GEN( jantotsu_irq ) static INTERRUPT_GEN( jantotsu_irq )
{ {
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 MACHINE_RESET( jantotsu ) static MACHINE_RESET( jantotsu )

View File

@ -325,15 +325,15 @@ static INTERRUPT_GEN( jchan_vblank )
{ {
case 0: case 0:
cpu_set_input_line(device->machine->cpu[1], 1, HOLD_LINE); cputag_set_input_line(device->machine, "sub", 1, HOLD_LINE);
break; break;
case 220: case 220:
cpu_set_input_line(device->machine->cpu[1], 2, HOLD_LINE); cputag_set_input_line(device->machine, "sub", 2, HOLD_LINE);
break; break;
case 100: case 100:
cpu_set_input_line(device->machine->cpu[1], 3, HOLD_LINE); cputag_set_input_line(device->machine, "sub", 3, HOLD_LINE);
break; break;
} }
@ -454,14 +454,14 @@ static READ16_HANDLER ( jchan_ctrl_r )
static WRITE16_HANDLER( main2sub_cmd_w ) static WRITE16_HANDLER( main2sub_cmd_w )
{ {
COMBINE_DATA(&mainsub_shared_ram[0x03ffe/2]); COMBINE_DATA(&mainsub_shared_ram[0x03ffe/2]);
cpu_set_input_line(space->machine->cpu[1], 4, HOLD_LINE); cputag_set_input_line(space->machine, "sub", 4, HOLD_LINE);
} }
// is this called? // is this called?
static WRITE16_HANDLER( sub2main_cmd_w ) static WRITE16_HANDLER( sub2main_cmd_w )
{ {
COMBINE_DATA(&mainsub_shared_ram[0x0000/2]); COMBINE_DATA(&mainsub_shared_ram[0x0000/2]);
cpu_set_input_line(space->machine->cpu[0], 3, HOLD_LINE); cputag_set_input_line(space->machine, "maincpu", 3, HOLD_LINE);
} }
/* ram convert for suprnova (requires 32-bit stuff) */ /* ram convert for suprnova (requires 32-bit stuff) */
@ -773,8 +773,8 @@ static DRIVER_INIT( jchan )
{ {
DRIVER_INIT_CALL( decrypt_toybox_rom ); DRIVER_INIT_CALL( decrypt_toybox_rom );
// install these here, putting them in the memory map causes issues // install these here, putting them in the memory map causes issues
memory_install_write16_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM), 0x403ffe, 0x403fff, 0, 0, main2sub_cmd_w ); memory_install_write16_handler(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), 0x403ffe, 0x403fff, 0, 0, main2sub_cmd_w );
memory_install_write16_handler(cpu_get_address_space(machine->cpu[1], ADDRESS_SPACE_PROGRAM), 0x400000, 0x400001, 0, 0, sub2main_cmd_w ); memory_install_write16_handler(cputag_get_address_space(machine, "sub", ADDRESS_SPACE_PROGRAM), 0x400000, 0x400001, 0, 0, sub2main_cmd_w );
memset(jchan_mcu_com, 0, 4 * sizeof( UINT16 ) ); memset(jchan_mcu_com, 0, 4 * sizeof( UINT16 ) );
@ -784,4 +784,3 @@ static DRIVER_INIT( jchan )
/* game drivers */ /* game drivers */
GAME( 1995, jchan, 0, jchan, jchan, jchan, ROT0, "Kaneko", "Jackie Chan - The Kung-Fu Master", GAME_IMPERFECT_GRAPHICS ) GAME( 1995, jchan, 0, jchan, jchan, jchan, ROT0, "Kaneko", "Jackie Chan - The Kung-Fu Master", GAME_IMPERFECT_GRAPHICS )
GAME( 1995, jchan2, 0, jchan, jchan2, jchan, ROT0, "Kaneko", "Jackie Chan in Fists of Fire", GAME_IMPERFECT_GRAPHICS ) GAME( 1995, jchan2, 0, jchan, jchan2, jchan, ROT0, "Kaneko", "Jackie Chan in Fists of Fire", GAME_IMPERFECT_GRAPHICS )

View File

@ -128,8 +128,8 @@ static TIMER_CALLBACK( generate_interrupt )
int scanline = param; int scanline = param;
/* IRQ is set by /32V */ /* IRQ is set by /32V */
cpu_set_input_line(machine->cpu[0], M6502_IRQ_LINE, (scanline & 32) ? CLEAR_LINE : ASSERT_LINE); cputag_set_input_line(machine, "maincpu", M6502_IRQ_LINE, (scanline & 32) ? CLEAR_LINE : ASSERT_LINE);
cpu_set_input_line(machine->cpu[1], M6502_IRQ_LINE, (scanline & 32) ? CLEAR_LINE : ASSERT_LINE); cputag_set_input_line(machine, "audiocpu", M6502_IRQ_LINE, (scanline & 32) ? CLEAR_LINE : ASSERT_LINE);
/* set up for the next */ /* set up for the next */
scanline += 32; scanline += 32;
@ -141,7 +141,7 @@ static TIMER_CALLBACK( generate_interrupt )
static WRITE8_HANDLER( main_irq_ack_w ) static WRITE8_HANDLER( main_irq_ack_w )
{ {
cpu_set_input_line(space->machine->cpu[0], M6502_IRQ_LINE, CLEAR_LINE); cputag_set_input_line(space->machine, "maincpu", M6502_IRQ_LINE, CLEAR_LINE);
} }

View File

@ -155,8 +155,8 @@ static struct
static void update_irqs(running_machine *machine) static void update_irqs(running_machine *machine)
{ {
cpu_set_input_line(machine->cpu[0], 2, tms_irq ? ASSERT_LINE : CLEAR_LINE); cputag_set_input_line(machine, "maincpu", 2, tms_irq ? ASSERT_LINE : CLEAR_LINE);
cpu_set_input_line(machine->cpu[0], 5, duart_1_irq ? ASSERT_LINE : CLEAR_LINE); cputag_set_input_line(machine, "maincpu", 5, duart_1_irq ? ASSERT_LINE : CLEAR_LINE);
} }
@ -197,12 +197,12 @@ static MACHINE_RESET( jpmimpct )
static WRITE16_HANDLER( m68k_tms_w ) static WRITE16_HANDLER( m68k_tms_w )
{ {
tms34010_host_w(space->machine->cpu[1], offset, data); tms34010_host_w(cputag_get_cpu(space->machine, "dsp"), offset, data);
} }
static READ16_HANDLER( m68k_tms_r ) static READ16_HANDLER( m68k_tms_r )
{ {
return tms34010_host_r(space->machine->cpu[1], offset); return tms34010_host_r(cputag_get_cpu(space->machine, "dsp"), offset);
} }

View File

@ -81,7 +81,7 @@ enum int_levels
static void tms_interrupt(running_machine *machine, int state) static void tms_interrupt(running_machine *machine, int state)
{ {
cpu_set_input_line(machine->cpu[0], INT_TMS34061, state); cputag_set_input_line(machine, "maincpu", INT_TMS34061, state);
} }
static const struct tms34061_interface tms34061intf = static const struct tms34061_interface tms34061intf =
@ -460,7 +460,7 @@ INPUT_PORTS_END
static void ptm_irq(running_machine *machine, int state) static void ptm_irq(running_machine *machine, int state)
{ {
cpu_set_input_line(machine->cpu[0], INT_6840PTM, state ? ASSERT_LINE : CLEAR_LINE); cputag_set_input_line(machine, "maincpu", INT_6840PTM, state ? ASSERT_LINE : CLEAR_LINE);
} }
static const ptm6840_interface ptm_intf = static const ptm6840_interface ptm_intf =
@ -480,7 +480,7 @@ static const ptm6840_interface ptm_intf =
static WRITE_LINE_DEVICE_HANDLER( acia_irq ) static WRITE_LINE_DEVICE_HANDLER( acia_irq )
{ {
cpu_set_input_line(device->machine->cpu[0], INT_6850ACIA, state ? CLEAR_LINE : ASSERT_LINE); cputag_set_input_line(device->machine, "maincpu", INT_6850ACIA, state ? CLEAR_LINE : ASSERT_LINE);
} }
/* Clocks are incorrect */ /* Clocks are incorrect */

View File

@ -106,8 +106,8 @@
static WRITE8_HANDLER( jrpacman_interrupt_vector_w ) static WRITE8_HANDLER( jrpacman_interrupt_vector_w )
{ {
cpu_set_input_line_vector(space->machine->cpu[0], 0, data); cpu_set_input_line_vector(cputag_get_cpu(space->machine, "maincpu"), 0, data);
cpu_set_input_line(space->machine->cpu[0], 0, CLEAR_LINE); cputag_set_input_line(space->machine, "maincpu", 0, CLEAR_LINE);
} }

View File

@ -141,7 +141,7 @@ static WRITE8_HANDLER( junofrst_sh_irqtrigger_w )
if (last == 0 && data == 1) if (last == 0 && data == 1)
{ {
/* setting bit 0 low then high triggers IRQ on the sound CPU */ /* setting bit 0 low then high triggers IRQ on the sound CPU */
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);
} }
last = data; last = data;
@ -150,14 +150,14 @@ static WRITE8_HANDLER( junofrst_sh_irqtrigger_w )
static WRITE8_HANDLER( junofrst_i8039_irq_w ) static WRITE8_HANDLER( junofrst_i8039_irq_w )
{ {
cpu_set_input_line(space->machine->cpu[2], 0, ASSERT_LINE); cputag_set_input_line(space->machine, "mcu", 0, ASSERT_LINE);
} }
static WRITE8_HANDLER( i8039_irqen_and_status_w ) static WRITE8_HANDLER( i8039_irqen_and_status_w )
{ {
if ((data & 0x80) == 0) if ((data & 0x80) == 0)
cpu_set_input_line(space->machine->cpu[2], 0, CLEAR_LINE); cputag_set_input_line(space->machine, "mcu", 0, CLEAR_LINE);
i8039_status = (data & 0x70) >> 4; i8039_status = (data & 0x70) >> 4;
} }

View File

@ -187,7 +187,7 @@ static MACHINE_START( kangaroo )
static MACHINE_START( kangaroo_mcu ) static MACHINE_START( kangaroo_mcu )
{ {
MACHINE_START_CALL(kangaroo); MACHINE_START_CALL(kangaroo);
memory_install_readwrite8_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM), 0xef00, 0xefff, 0, 0, mcu_sim_r, mcu_sim_w); memory_install_readwrite8_handler(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), 0xef00, 0xefff, 0, 0, mcu_sim_r, mcu_sim_w);
kangaroo_clock = 0; kangaroo_clock = 0;
} }
@ -205,7 +205,7 @@ static MACHINE_RESET( kangaroo )
/* the copy protection. */ /* the copy protection. */
/* Anyway, what I do here is just immediately generate the NMI, so the game */ /* Anyway, what I do here is just immediately generate the NMI, so the game */
/* properly starts. */ /* properly starts. */
cpu_set_input_line(machine->cpu[0], INPUT_LINE_NMI, PULSE_LINE); cputag_set_input_line(machine, "maincpu", INPUT_LINE_NMI, PULSE_LINE);
} }

View File

@ -65,7 +65,8 @@ static int microcontroller_id,coin_mask;
static void karnov_i8751_w(running_machine *machine, int data) static void karnov_i8751_w(running_machine *machine, int data)
{ {
/* Pending coin operations may cause protection commands to be queued */ /* Pending coin operations may cause protection commands to be queued */
if (i8751_needs_ack) { if (i8751_needs_ack)
{
i8751_command_queue=data; i8751_command_queue=data;
return; return;
} }
@ -88,14 +89,15 @@ static void karnov_i8751_w(running_machine *machine, int data)
// if (!i8751_return && data!=0x300) logerror("%s - Unknown Write %02x intel\n",cpuexec_describe_context(machine),data); // if (!i8751_return && data!=0x300) logerror("%s - Unknown Write %02x intel\n",cpuexec_describe_context(machine),data);
cpu_set_input_line(machine->cpu[0],6,HOLD_LINE); /* Signal main cpu task is complete */ cputag_set_input_line(machine, "maincpu", 6, HOLD_LINE); /* Signal main cpu task is complete */
i8751_needs_ack=1; i8751_needs_ack=1;
} }
static void wndrplnt_i8751_w(running_machine *machine, int data) static void wndrplnt_i8751_w(running_machine *machine, int data)
{ {
/* The last command hasn't been ACK'd (probably a conflict with coin command) */ /* The last command hasn't been ACK'd (probably a conflict with coin command) */
if (i8751_needs_ack) { if (i8751_needs_ack)
{
i8751_command_queue=data; i8751_command_queue=data;
return; return;
} }
@ -108,8 +110,10 @@ static void wndrplnt_i8751_w(running_machine *machine, int data)
/* The game writes many values in the 0x600 range, but only a specific mask /* The game writes many values in the 0x600 range, but only a specific mask
matters for the return value */ matters for the return value */
if ((data&0x600)==0x600) { if ((data&0x600)==0x600)
switch (data&0x18) { {
switch (data&0x18)
{
case 0x00: i8751_return=0x4d53; break; case 0x00: i8751_return=0x4d53; break;
case 0x08: i8751_return=0x4b54; break; case 0x08: i8751_return=0x4b54; break;
case 0x10: i8751_return=0x5453; break; case 0x10: i8751_return=0x5453; break;
@ -142,7 +146,7 @@ static void wndrplnt_i8751_w(running_machine *machine, int data)
if (data==0x501) i8751_return=0x6bf8; if (data==0x501) i8751_return=0x6bf8;
if (data==0x500) i8751_return=0x4e75; if (data==0x500) i8751_return=0x4e75;
cpu_set_input_line(machine->cpu[0],6,HOLD_LINE); /* Signal main cpu task is complete */ cputag_set_input_line(machine, "maincpu", 6, HOLD_LINE); /* Signal main cpu task is complete */
i8751_needs_ack=1; i8751_needs_ack=1;
} }
@ -151,7 +155,8 @@ static void chelnov_i8751_w(running_machine *machine, int data)
static int level; static int level;
/* Pending coin operations may cause protection commands to be queued */ /* Pending coin operations may cause protection commands to be queued */
if (i8751_needs_ack) { if (i8751_needs_ack)
{
i8751_command_queue=data; i8751_command_queue=data;
return; return;
} }
@ -167,18 +172,23 @@ static void chelnov_i8751_w(running_machine *machine, int data)
if (data>=0x6000 && data<0x8000) i8751_return=1; /* patched */ if (data>=0x6000 && data<0x8000) i8751_return=1; /* patched */
if ((data&0xf000)==0x1000) level=1; /* Level 1 */ if ((data&0xf000)==0x1000) level=1; /* Level 1 */
if ((data&0xf000)==0x2000) level++; /* Level Increment */ if ((data&0xf000)==0x2000) level++; /* Level Increment */
if ((data&0xf000)==0x3000) { /* Sprite table mapping */ if ((data&0xf000)==0x3000)
{ /* Sprite table mapping */
int b=data&0xff; int b=data&0xff;
switch (level) { switch (level)
{
case 1: /* Level 1, Sprite mapping tables */ case 1: /* Level 1, Sprite mapping tables */
if (microcontroller_id==CHELNOV) { /* USA */ if (microcontroller_id==CHELNOV)
{ /* USA */
if (b<2) i8751_return=0; if (b<2) i8751_return=0;
else if (b<6) i8751_return=1; else if (b<6) i8751_return=1;
else if (b<0xb) i8751_return=2; else if (b<0xb) i8751_return=2;
else if (b<0xf) i8751_return=3; else if (b<0xf) i8751_return=3;
else if (b<0x13) i8751_return=4; else if (b<0x13) i8751_return=4;
else i8751_return=5; else i8751_return=5;
} else { /* Japan, World */ }
else
{ /* Japan, World */
if (b<3) i8751_return=0; if (b<3) i8751_return=0;
else if (b<8) i8751_return=1; else if (b<8) i8751_return=1;
else if (b<0xc) i8751_return=2; else if (b<0xc) i8751_return=2;
@ -252,7 +262,7 @@ static void chelnov_i8751_w(running_machine *machine, int data)
// logerror("%s - Unknown Write %02x intel\n",cpuexec_describe_context(machine),data); // logerror("%s - Unknown Write %02x intel\n",cpuexec_describe_context(machine),data);
cpu_set_input_line(machine->cpu[0],6,HOLD_LINE); /* Signal main cpu task is complete */ cputag_set_input_line(machine, "maincpu", 6, HOLD_LINE); /* Signal main cpu task is complete */
i8751_needs_ack=1; i8751_needs_ack=1;
} }
@ -261,23 +271,30 @@ static void chelnov_i8751_w(running_machine *machine, int data)
static WRITE16_HANDLER( karnov_control_w ) static WRITE16_HANDLER( karnov_control_w )
{ {
/* Mnemonics filled in from the schematics, brackets are my comments */ /* Mnemonics filled in from the schematics, brackets are my comments */
switch (offset<<1) { switch (offset<<1)
{
case 0: /* SECLR (Interrupt ack for Level 6 i8751 interrupt) */ case 0: /* SECLR (Interrupt ack for Level 6 i8751 interrupt) */
cpu_set_input_line(space->machine->cpu[0],6,CLEAR_LINE); cputag_set_input_line(space->machine, "maincpu", 6, CLEAR_LINE);
if (i8751_needs_ack) { if (i8751_needs_ack)
{
/* If a command and coin insert happen at once, then the i8751 will queue the /* If a command and coin insert happen at once, then the i8751 will queue the
coin command until the previous command is ACK'd */ coin command until the previous command is ACK'd */
if (i8751_coin_pending) { if (i8751_coin_pending)
{
i8751_return=i8751_coin_pending; i8751_return=i8751_coin_pending;
cpu_set_input_line(space->machine->cpu[0],6,HOLD_LINE); cputag_set_input_line(space->machine, "maincpu", 6, HOLD_LINE);
i8751_coin_pending=0; i8751_coin_pending=0;
} else if (i8751_command_queue) { }
else if (i8751_command_queue)
{
/* Pending control command - just write it back as SECREQ */ /* Pending control command - just write it back as SECREQ */
i8751_needs_ack=0; i8751_needs_ack=0;
karnov_control_w(space,3,i8751_command_queue,0xffff); karnov_control_w(space,3,i8751_command_queue,0xffff);
i8751_command_queue=0; i8751_command_queue=0;
} else { }
else
{
i8751_needs_ack=0; i8751_needs_ack=0;
} }
} }
@ -285,7 +302,7 @@ static WRITE16_HANDLER( karnov_control_w )
case 2: /* SONREQ (Sound CPU byte) */ case 2: /* SONREQ (Sound CPU byte) */
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, "maincpu", INPUT_LINE_NMI, PULSE_LINE);
break; break;
case 4: /* DM (DMA to buffer spriteram) */ case 4: /* DM (DMA to buffer spriteram) */
@ -316,7 +333,7 @@ static WRITE16_HANDLER( karnov_control_w )
break; break;
case 0xe: /* INTCLR (Interrupt ack for Level 7 vbl interrupt) */ case 0xe: /* INTCLR (Interrupt ack for Level 7 vbl interrupt) */
cpu_set_input_line(space->machine->cpu[0],7,CLEAR_LINE); cputag_set_input_line(space->machine, "maincpu", 7, CLEAR_LINE);
break; break;
} }
} }
@ -325,7 +342,8 @@ static WRITE16_HANDLER( karnov_control_w )
static READ16_HANDLER( karnov_control_r ) static READ16_HANDLER( karnov_control_r )
{ {
switch (offset<<1) { switch (offset<<1)
{
case 0: case 0:
return input_port_read(space->machine, "P1_P2"); return input_port_read(space->machine, "P1_P2");
case 2: /* Start buttons & VBL */ case 2: /* Start buttons & VBL */
@ -673,11 +691,15 @@ static INTERRUPT_GEN( karnov_interrupt )
/* Coin input to the i8751 generates an interrupt to the main cpu */ /* Coin input to the i8751 generates an interrupt to the main cpu */
if (input_port_read(device->machine, "FAKE") == coin_mask) latch=1; if (input_port_read(device->machine, "FAKE") == coin_mask) latch=1;
if (input_port_read(device->machine, "FAKE") != coin_mask && latch) { if (input_port_read(device->machine, "FAKE") != coin_mask && latch)
if (i8751_needs_ack) { {
if (i8751_needs_ack)
{
/* i8751 is busy - queue the command */ /* i8751 is busy - queue the command */
i8751_coin_pending=input_port_read(device->machine, "FAKE") | 0x8000; i8751_coin_pending=input_port_read(device->machine, "FAKE") | 0x8000;
} else { }
else
{
i8751_return=input_port_read(device->machine, "FAKE") | 0x8000; i8751_return=input_port_read(device->machine, "FAKE") | 0x8000;
cpu_set_input_line(device,6,HOLD_LINE); cpu_set_input_line(device,6,HOLD_LINE);
i8751_needs_ack=1; i8751_needs_ack=1;
@ -690,7 +712,7 @@ static INTERRUPT_GEN( karnov_interrupt )
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 const ym3526_interface ym3526_config = static const ym3526_interface ym3526_config =

View File

@ -112,29 +112,34 @@ static ADDRESS_MAP_START( sound_writemem, ADDRESS_SPACE_PROGRAM, 8 )
AM_RANGE(0x6000, 0xffff) AM_WRITE(SMH_RAM) AM_RANGE(0x6000, 0xffff) AM_WRITE(SMH_RAM)
ADDRESS_MAP_END ADDRESS_MAP_END
static WRITE8_HANDLER( control_w ) { static WRITE8_HANDLER( control_w )
{
nmi_enable = data & 1; nmi_enable = data & 1;
} }
static WRITE8_HANDLER( sound_reset_w ) { static WRITE8_HANDLER( sound_reset_w )
{
if ( !( data & 1 ) ) if ( !( data & 1 ) )
cpu_set_input_line(space->machine->cpu[1], INPUT_LINE_RESET, PULSE_LINE); cputag_set_input_line(space->machine, "audiocpu", INPUT_LINE_RESET, PULSE_LINE);
} }
static WRITE8_DEVICE_HANDLER( sound_control_w ) { static WRITE8_DEVICE_HANDLER( sound_control_w )
{
msm5205_reset_w( device, !( data & 1 ) ); msm5205_reset_w( device, !( data & 1 ) );
sound_nmi_enable = ( ( data >> 1 ) & 1 ); sound_nmi_enable = ( ( data >> 1 ) & 1 );
} }
static WRITE8_HANDLER( sound_command_w ) { static WRITE8_HANDLER( sound_command_w )
{
soundlatch_w( space, 0, data ); soundlatch_w( space, 0, 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 int msm_data = 0; static int msm_data = 0;
static int msm_play_lo_nibble = 1; static int msm_play_lo_nibble = 1;
static WRITE8_HANDLER( sound_msm_w ) { static WRITE8_HANDLER( sound_msm_w )
{
msm_data = data; msm_data = data;
msm_play_lo_nibble = 1; msm_play_lo_nibble = 1;
} }
@ -190,12 +195,14 @@ static ADDRESS_MAP_START( kc_sound_writemem, ADDRESS_SPACE_PROGRAM, 8 )
AM_RANGE(0xe000, 0xe2ff) AM_WRITE(SMH_RAM) AM_RANGE(0xe000, 0xe2ff) AM_WRITE(SMH_RAM)
ADDRESS_MAP_END ADDRESS_MAP_END
static READ8_HANDLER( sound_reset_r ) { static READ8_HANDLER( sound_reset_r )
cpu_set_input_line(space->machine->cpu[1], INPUT_LINE_RESET, PULSE_LINE); {
cputag_set_input_line(space->machine, "audiocpu", INPUT_LINE_RESET, PULSE_LINE);
return 0; return 0;
} }
static WRITE8_HANDLER( kc_sound_control_w ) { static WRITE8_HANDLER( kc_sound_control_w )
{
if ( offset == 0 ) if ( offset == 0 )
sound_nmi_enable = ( ( data >> 7 ) & 1 ); sound_nmi_enable = ( ( data >> 7 ) & 1 );
// else // else
@ -371,13 +378,15 @@ GFXDECODE_END
static INTERRUPT_GEN( kc_interrupt ) { static INTERRUPT_GEN( kc_interrupt )
{
if ( nmi_enable ) if ( nmi_enable )
cpu_set_input_line(device, INPUT_LINE_NMI, PULSE_LINE); cpu_set_input_line(device, INPUT_LINE_NMI, PULSE_LINE);
} }
static void msmint(const device_config *device) { static void msmint(const device_config *device)
{
static int counter = 0; static int counter = 0;
@ -388,9 +397,11 @@ static void msmint(const device_config *device) {
msm_play_lo_nibble ^= 1; msm_play_lo_nibble ^= 1;
if ( !( counter ^= 1 ) ) { if ( !( counter ^= 1 ) )
if ( sound_nmi_enable ) { {
cpu_set_input_line(device->machine->cpu[1], INPUT_LINE_NMI, PULSE_LINE ); if ( sound_nmi_enable )
{
cputag_set_input_line(device->machine, "audiocpu", INPUT_LINE_NMI, PULSE_LINE );
} }
} }
} }
@ -405,7 +416,8 @@ static const msm5205_interface msm_interface =
* 1 Player Version * * 1 Player Version *
********************/ ********************/
static INTERRUPT_GEN( sound_int ) { static INTERRUPT_GEN( sound_int )
{
if ( sound_nmi_enable ) if ( sound_nmi_enable )
cpu_set_input_line(device, INPUT_LINE_NMI, PULSE_LINE); cpu_set_input_line(device, INPUT_LINE_NMI, PULSE_LINE);

View File

@ -242,7 +242,7 @@ static WRITE8_DEVICE_HANDLER( hopper_io_w )
static WRITE8_DEVICE_HANDLER( sound_cmd_w ) static WRITE8_DEVICE_HANDLER( sound_cmd_w )
{ {
cpu_set_input_line(device->machine->cpu[2], INPUT_LINE_NMI, PULSE_LINE); cputag_set_input_line(device->machine, "soundcpu", INPUT_LINE_NMI, PULSE_LINE);
sound_cmd = data; sound_cmd = data;
/* soundlatch is unneeded since we are already using perfect interleave. */ /* soundlatch is unneeded since we are already using perfect interleave. */
// soundlatch_w(space,0, data); // soundlatch_w(space,0, data);

View File

@ -44,38 +44,46 @@ static UINT8 *video_shared;
static UINT8 *sprite_shared; static UINT8 *sprite_shared;
int kingofb_nmi_enable = 0; int kingofb_nmi_enable = 0;
static READ8_HANDLER( video_shared_r ) { static READ8_HANDLER( video_shared_r )
{
return video_shared[offset]; return video_shared[offset];
} }
static WRITE8_HANDLER( video_shared_w ) { static WRITE8_HANDLER( video_shared_w )
{
video_shared[offset] = data; video_shared[offset] = data;
} }
static READ8_HANDLER( sprite_shared_r ) { static READ8_HANDLER( sprite_shared_r )
{
return sprite_shared[offset]; return sprite_shared[offset];
} }
static WRITE8_HANDLER( sprite_shared_w ) { static WRITE8_HANDLER( sprite_shared_w )
{
sprite_shared[offset] = data; sprite_shared[offset] = data;
} }
static WRITE8_HANDLER( video_interrupt_w ) { static WRITE8_HANDLER( video_interrupt_w )
cpu_set_input_line_and_vector(space->machine->cpu[1], 0, HOLD_LINE, 0xff ); {
cputag_set_input_line_and_vector(space->machine, "video", 0, HOLD_LINE, 0xff );
} }
static WRITE8_HANDLER( sprite_interrupt_w ) { static WRITE8_HANDLER( sprite_interrupt_w )
cpu_set_input_line_and_vector(space->machine->cpu[2], 0, HOLD_LINE, 0xff ); {
cputag_set_input_line_and_vector(space->machine, "sprite", 0, HOLD_LINE, 0xff );
} }
static WRITE8_HANDLER( scroll_interrupt_w ) { static WRITE8_HANDLER( scroll_interrupt_w )
{
sprite_interrupt_w( space, offset, data ); sprite_interrupt_w( space, offset, data );
*kingofb_scroll_y = data; *kingofb_scroll_y = data;
} }
static WRITE8_HANDLER( sound_command_w ) { static WRITE8_HANDLER( sound_command_w )
{
soundlatch_w( space, 0, data ); soundlatch_w( space, 0, data );
cpu_set_input_line_and_vector(space->machine->cpu[3], 0, HOLD_LINE, 0xff ); cputag_set_input_line_and_vector(space->machine, "audiocpu", 0, HOLD_LINE, 0xff );
} }
@ -534,7 +542,8 @@ static const ay8910_interface ay8910_config =
DEVCB_MEMORY_HANDLER("audiocpu", PROGRAM, soundlatch_r) DEVCB_MEMORY_HANDLER("audiocpu", PROGRAM, soundlatch_r)
}; };
static INTERRUPT_GEN( kingofb_interrupt ) { static INTERRUPT_GEN( kingofb_interrupt )
{
if ( kingofb_nmi_enable ) if ( kingofb_nmi_enable )
cpu_set_input_line(device, INPUT_LINE_NMI, PULSE_LINE); cpu_set_input_line(device, INPUT_LINE_NMI, PULSE_LINE);
@ -889,4 +898,3 @@ GAME( 1985, ringking, kingofb, ringking, ringking, 0, ROT90, "Data East U
GAME( 1985, ringkin2, kingofb, ringking, ringking, 0, ROT90, "Data East USA", "Ring King (US set 2)", 0 ) GAME( 1985, ringkin2, kingofb, ringking, ringking, 0, ROT90, "Data East USA", "Ring King (US set 2)", 0 )
GAME( 1985, ringkin3, kingofb, kingofb, kingofb, ringkin3, ROT90, "Data East USA", "Ring King (US set 3)", 0 ) GAME( 1985, ringkin3, kingofb, kingofb, kingofb, ringkin3, ROT90, "Data East USA", "Ring King (US set 3)", 0 )
GAME( 1985, ringkinw, kingofb, kingofb, kingofb, ringkinw, ROT90, "Woodplace", "Ring King (US, Woodplace license)", 0 ) GAME( 1985, ringkinw, kingofb, kingofb, kingofb, ringkinw, ROT90, "Woodplace", "Ring King (US, Woodplace license)", 0 )

View File

@ -127,7 +127,7 @@ static INTERRUPT_GEN( kingpin_video_interrupt )
static void vdp_interrupt (running_machine *machine, int state) static void vdp_interrupt (running_machine *machine, int state)
{ {
cpu_set_input_line(machine->cpu[0],0, HOLD_LINE); cputag_set_input_line(machine, "maincpu", 0, HOLD_LINE);
} }
static const TMS9928a_interface tms9928a_interface = static const TMS9928a_interface tms9928a_interface =

View File

@ -190,12 +190,12 @@ static MACHINE_START( kinst )
} }
/* set the fastest DRC options */ /* set the fastest DRC options */
mips3drc_set_options(machine->cpu[0], MIPS3DRC_FASTEST_OPTIONS); mips3drc_set_options(cputag_get_cpu(machine, "maincpu"), MIPS3DRC_FASTEST_OPTIONS);
/* configure fast RAM regions for DRC */ /* configure fast RAM regions for DRC */
mips3drc_add_fastram(machine->cpu[0], 0x08000000, 0x087fffff, FALSE, rambase2); mips3drc_add_fastram(cputag_get_cpu(machine, "maincpu"), 0x08000000, 0x087fffff, FALSE, rambase2);
mips3drc_add_fastram(machine->cpu[0], 0x00000000, 0x0007ffff, FALSE, rambase); mips3drc_add_fastram(cputag_get_cpu(machine, "maincpu"), 0x00000000, 0x0007ffff, FALSE, rambase);
mips3drc_add_fastram(machine->cpu[0], 0x1fc00000, 0x1fc7ffff, TRUE, rombase); mips3drc_add_fastram(cputag_get_cpu(machine, "maincpu"), 0x1fc00000, 0x1fc7ffff, TRUE, rombase);
} }
@ -254,7 +254,7 @@ static VIDEO_UPDATE( kinst )
static TIMER_CALLBACK( irq0_stop ) static TIMER_CALLBACK( irq0_stop )
{ {
cpu_set_input_line(machine->cpu[0], 0, CLEAR_LINE); cputag_set_input_line(machine, "maincpu", 0, CLEAR_LINE);
} }
@ -267,7 +267,7 @@ static INTERRUPT_GEN( irq0_start )
static void ide_interrupt(const device_config *device, int state) static void ide_interrupt(const device_config *device, int state)
{ {
cpu_set_input_line(device->machine->cpu[0], 1, state); cputag_set_input_line(device->machine, "maincpu", 1, state);
} }

View File

@ -33,7 +33,7 @@
static void update_interrupts(running_machine *machine) static void update_interrupts(running_machine *machine)
{ {
cpu_set_input_line(machine->cpu[0], 4, atarigen_video_int_state || atarigen_scanline_int_state ? ASSERT_LINE : CLEAR_LINE); cputag_set_input_line(machine, "maincpu", 4, atarigen_video_int_state || atarigen_scanline_int_state ? ASSERT_LINE : CLEAR_LINE);
} }
@ -41,7 +41,7 @@ static void scanline_update(const device_config *screen, int scanline)
{ {
/* generate 32V signals */ /* generate 32V signals */
if ((scanline & 32) == 0 && !(input_port_read(screen->machine, "P1") & 0x800)) if ((scanline & 32) == 0 && !(input_port_read(screen->machine, "P1") & 0x800))
atarigen_scanline_int_gen(screen->machine->cpu[0]); atarigen_scanline_int_gen(cputag_get_cpu(screen->machine, "maincpu"));
} }

View File

@ -49,7 +49,7 @@ static WRITE8_HANDLER( sound_cmd_w )
if ((data & 0x80) == 0) if ((data & 0x80) == 0)
soundlatch_w(space, 0, data & 0x7f); soundlatch_w(space, 0, data & 0x7f);
else else
cpu_set_input_line(space->machine->cpu[1], 0, ASSERT_LINE); cputag_set_input_line(space->machine, "soundcpu", 0, ASSERT_LINE);
} }
@ -104,7 +104,7 @@ static READ8_DEVICE_HANDLER( m6803_port2_r )
static WRITE8_HANDLER( sound_irq_ack_w ) static WRITE8_HANDLER( sound_irq_ack_w )
{ {
cpu_set_input_line(space->machine->cpu[1], 0, CLEAR_LINE); cputag_set_input_line(space->machine, "soundcpu", 0, CLEAR_LINE);
} }
static WRITE8_DEVICE_HANDLER(unused_w) static WRITE8_DEVICE_HANDLER(unused_w)

View File

@ -67,7 +67,7 @@ static WRITE32_HANDLER( soundr3k_w )
sndto000[ ( offset << 1 ) + 1 ] = data >> 16; sndto000[ ( offset << 1 ) + 1 ] = data >> 16;
if( offset == 3 ) if( offset == 3 )
{ {
cpu_set_input_line(space->machine->cpu[1], 1, HOLD_LINE ); cputag_set_input_line(space->machine, "soundcpu", 1, HOLD_LINE );
} }
} }
if( ACCESSING_BITS_0_15 ) if( ACCESSING_BITS_0_15 )
@ -141,7 +141,7 @@ static WRITE32_HANDLER( eeprom_w )
eeprom_write_bit( ( data & 0x01 ) ? 1 : 0 ); eeprom_write_bit( ( data & 0x01 ) ? 1 : 0 );
eeprom_set_clock_line( ( data & 0x04 ) ? ASSERT_LINE : CLEAR_LINE ); eeprom_set_clock_line( ( data & 0x04 ) ? ASSERT_LINE : CLEAR_LINE );
eeprom_set_cs_line( ( data & 0x02 ) ? CLEAR_LINE : ASSERT_LINE ); eeprom_set_cs_line( ( data & 0x02 ) ? CLEAR_LINE : ASSERT_LINE );
cpu_set_input_line(space->machine->cpu[1], INPUT_LINE_RESET, ( data & 0x40 ) ? CLEAR_LINE : ASSERT_LINE ); cputag_set_input_line(space->machine, "soundcpu", INPUT_LINE_RESET, ( data & 0x40 ) ? CLEAR_LINE : ASSERT_LINE );
} }
/* PCM RAM */ /* PCM RAM */

View File

@ -547,9 +547,9 @@ static DRIVER_INIT( simpbowl )
intelflash_init( machine, 2, FLASH_FUJITSU_29F016A, NULL ); intelflash_init( machine, 2, FLASH_FUJITSU_29F016A, NULL );
intelflash_init( machine, 3, FLASH_FUJITSU_29F016A, NULL ); intelflash_init( machine, 3, FLASH_FUJITSU_29F016A, NULL );
memory_install_readwrite32_handler( cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM), 0x1f680080, 0x1f68008f, 0, 0, flash_r, flash_w ); memory_install_readwrite32_handler( cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), 0x1f680080, 0x1f68008f, 0, 0, flash_r, flash_w );
memory_install_read32_handler ( cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM), 0x1f6800c0, 0x1f6800c7, 0, 0, trackball_r ); memory_install_read32_handler ( cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), 0x1f6800c0, 0x1f6800c7, 0, 0, trackball_r );
memory_install_read32_handler ( cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM), 0x1f6800c8, 0x1f6800cb, 0, 0, unknown_r ); /* ?? */ memory_install_read32_handler ( cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), 0x1f6800c8, 0x1f6800cb, 0, 0, unknown_r ); /* ?? */
DRIVER_INIT_CALL(konamigv); DRIVER_INIT_CALL(konamigv);
} }
@ -635,9 +635,9 @@ static DRIVER_INIT( btchamp )
{ {
intelflash_init( machine, 0, FLASH_SHARP_LH28F400, NULL ); intelflash_init( machine, 0, FLASH_SHARP_LH28F400, NULL );
memory_install_readwrite32_handler( cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM), 0x1f680080, 0x1f68008f, 0, 0, btc_trackball_r, btc_trackball_w ); memory_install_readwrite32_handler( cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), 0x1f680080, 0x1f68008f, 0, 0, btc_trackball_r, btc_trackball_w );
memory_install_write32_handler ( cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM), 0x1f6800e0, 0x1f6800e3, 0, 0, (write32_space_func)SMH_NOP ); memory_install_write32_handler ( cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), 0x1f6800e0, 0x1f6800e3, 0, 0, (write32_space_func)SMH_NOP );
memory_install_readwrite32_handler( cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM), 0x1f380000, 0x1f3fffff, 0, 0, btcflash_r, btcflash_w ); memory_install_readwrite32_handler( cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), 0x1f380000, 0x1f3fffff, 0, 0, btcflash_r, btcflash_w );
DRIVER_INIT_CALL(konamigv); DRIVER_INIT_CALL(konamigv);
} }
@ -691,8 +691,8 @@ static WRITE32_HANDLER( tokimeki_serial_w )
static DRIVER_INIT( tokimosh ) static DRIVER_INIT( tokimosh )
{ {
memory_install_read32_handler ( cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM), 0x1f680080, 0x1f680083, 0, 0, tokimeki_serial_r ); memory_install_read32_handler ( cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), 0x1f680080, 0x1f680083, 0, 0, tokimeki_serial_r );
memory_install_write32_handler( cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM), 0x1f680090, 0x1f680093, 0, 0, tokimeki_serial_w ); memory_install_write32_handler( cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), 0x1f680090, 0x1f680093, 0, 0, tokimeki_serial_w );
DRIVER_INIT_CALL(konamigv); DRIVER_INIT_CALL(konamigv);
} }
@ -722,13 +722,13 @@ static DRIVER_INIT( kdeadeye )
{ {
intelflash_init( machine, 0, FLASH_SHARP_LH28F400, NULL ); intelflash_init( machine, 0, FLASH_SHARP_LH28F400, NULL );
memory_install_read_port_handler ( cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM), 0x1f680080, 0x1f680083, 0, 0, "GUNX1" ); memory_install_read_port_handler ( cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), 0x1f680080, 0x1f680083, 0, 0, "GUNX1" );
memory_install_read_port_handler ( cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM), 0x1f680090, 0x1f680093, 0, 0, "GUNY1" ); memory_install_read_port_handler ( cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), 0x1f680090, 0x1f680093, 0, 0, "GUNY1" );
memory_install_read_port_handler ( cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM), 0x1f6800a0, 0x1f6800a3, 0, 0, "GUNX2" ); memory_install_read_port_handler ( cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), 0x1f6800a0, 0x1f6800a3, 0, 0, "GUNX2" );
memory_install_read_port_handler ( cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM), 0x1f6800b0, 0x1f6800b3, 0, 0, "GUNY2" ); memory_install_read_port_handler ( cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), 0x1f6800b0, 0x1f6800b3, 0, 0, "GUNY2" );
memory_install_read_port_handler ( cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM), 0x1f6800c0, 0x1f6800c3, 0, 0, "BUTTONS" ); memory_install_read_port_handler ( cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), 0x1f6800c0, 0x1f6800c3, 0, 0, "BUTTONS" );
memory_install_write32_handler ( cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM), 0x1f6800e0, 0x1f6800e3, 0, 0, kdeadeye_0_w ); memory_install_write32_handler ( cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), 0x1f6800e0, 0x1f6800e3, 0, 0, kdeadeye_0_w );
memory_install_readwrite32_handler( cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM), 0x1f380000, 0x1f3fffff, 0, 0, btcflash_r, btcflash_w ); memory_install_readwrite32_handler( cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), 0x1f380000, 0x1f3fffff, 0, 0, btcflash_r, btcflash_w );
DRIVER_INIT_CALL(konamigv); DRIVER_INIT_CALL(konamigv);
} }

View File

@ -441,7 +441,7 @@ static WRITE32_HANDLER( esc_w )
if (konamigx_wrport1_1 & 0x10) if (konamigx_wrport1_1 & 0x10)
{ {
gx_rdport1_3 &= ~8; gx_rdport1_3 &= ~8;
cpu_set_input_line(space->machine->cpu[0], 4, HOLD_LINE); cputag_set_input_line(space->machine, "maincpu", 4, HOLD_LINE);
} }
} }
else else
@ -553,13 +553,13 @@ static WRITE32_HANDLER( control_w )
{ {
// enable 68k // enable 68k
// clear the halt condition and reset the 68000 // clear the halt condition and reset the 68000
cpu_set_input_line(space->machine->cpu[1], INPUT_LINE_HALT, CLEAR_LINE); cputag_set_input_line(space->machine, "soundcpu", INPUT_LINE_HALT, CLEAR_LINE);
cpu_set_input_line(space->machine->cpu[1], INPUT_LINE_RESET, PULSE_LINE); cputag_set_input_line(space->machine, "soundcpu", INPUT_LINE_RESET, PULSE_LINE);
} }
else else
{ {
// disable 68k // disable 68k
cpu_set_input_line(space->machine->cpu[1], INPUT_LINE_HALT, ASSERT_LINE); cputag_set_input_line(space->machine, "soundcpu", INPUT_LINE_HALT, ASSERT_LINE);
} }
K053246_set_OBJCHA_line((data&0x100000) ? ASSERT_LINE : CLEAR_LINE); K053246_set_OBJCHA_line((data&0x100000) ? ASSERT_LINE : CLEAR_LINE);
@ -622,14 +622,14 @@ static WRITE32_HANDLER( ccu_w )
// vblank interrupt ACK // vblank interrupt ACK
if (ACCESSING_BITS_24_31) if (ACCESSING_BITS_24_31)
{ {
cpu_set_input_line(space->machine->cpu[0], 1, CLEAR_LINE); cputag_set_input_line(space->machine, "maincpu", 1, CLEAR_LINE);
gx_syncen |= 0x20; gx_syncen |= 0x20;
} }
// hblank interrupt ACK // hblank interrupt ACK
if (ACCESSING_BITS_8_15) if (ACCESSING_BITS_8_15)
{ {
cpu_set_input_line(space->machine->cpu[0], 2, CLEAR_LINE); cputag_set_input_line(space->machine, "maincpu", 2, CLEAR_LINE);
gx_syncen |= 0x40; gx_syncen |= 0x40;
} }
} }
@ -659,7 +659,7 @@ static TIMER_CALLBACK( dmaend_callback )
// lower OBJINT-REQ flag and trigger interrupt // lower OBJINT-REQ flag and trigger interrupt
gx_rdport1_3 &= ~0x80; gx_rdport1_3 &= ~0x80;
cpu_set_input_line(machine->cpu[0], 3, HOLD_LINE); cputag_set_input_line(machine, "maincpu", 3, HOLD_LINE);
} }
} }
@ -817,7 +817,7 @@ INLINE void write_snd_020(running_machine *machine, int reg, int val)
if (reg == 7) if (reg == 7)
{ {
cpu_set_input_line(machine->cpu[1], 1, HOLD_LINE); cputag_set_input_line(machine, "soundcpu", 1, HOLD_LINE);
} }
} }
@ -1090,7 +1090,7 @@ static WRITE32_HANDLER( type4_prot_w )
if (konamigx_wrport1_1 & 0x10) if (konamigx_wrport1_1 & 0x10)
{ {
gx_rdport1_3 &= ~8; gx_rdport1_3 &= ~8;
cpu_set_input_line(space->machine->cpu[0], 4, HOLD_LINE); cputag_set_input_line(space->machine, "maincpu", 4, HOLD_LINE);
} }
// don't accidentally do a phony command // don't accidentally do a phony command
@ -1234,28 +1234,28 @@ static INTERRUPT_GEN(tms_sync)
static READ16_HANDLER(tms57002_data_word_r) static READ16_HANDLER(tms57002_data_word_r)
{ {
return tms57002_data_r(space->machine->cpu[2], 0); return tms57002_data_r(cputag_get_cpu(space->machine, "dasp"), 0);
} }
static WRITE16_HANDLER(tms57002_data_word_w) static WRITE16_HANDLER(tms57002_data_word_w)
{ {
if (ACCESSING_BITS_0_7) if (ACCESSING_BITS_0_7)
tms57002_data_w(space->machine->cpu[2], 0, data); tms57002_data_w(cputag_get_cpu(space->machine, "dasp"), 0, data);
} }
static READ16_HANDLER(tms57002_status_word_r) static READ16_HANDLER(tms57002_status_word_r)
{ {
return (tms57002_dready_r(space->machine->cpu[2], 0) ? 4 : 0) | return (tms57002_dready_r(cputag_get_cpu(space->machine, "dasp"), 0) ? 4 : 0) |
(tms57002_empty_r(space->machine->cpu[2], 0) ? 1 : 0); (tms57002_empty_r(cputag_get_cpu(space->machine, "dasp"), 0) ? 1 : 0);
} }
static WRITE16_HANDLER(tms57002_control_word_w) static WRITE16_HANDLER(tms57002_control_word_w)
{ {
if (ACCESSING_BITS_0_7) if (ACCESSING_BITS_0_7)
{ {
tms57002_pload_w(space->machine->cpu[2], 0, data & 4); tms57002_pload_w(cputag_get_cpu(space->machine, "dasp"), 0, data & 4);
tms57002_cload_w(space->machine->cpu[2], 0, data & 8); tms57002_cload_w(cputag_get_cpu(space->machine, "dasp"), 0, data & 8);
cpu_set_input_line(space->machine->cpu[2], INPUT_LINE_RESET, !(data & 16) ? ASSERT_LINE : CLEAR_LINE); cputag_set_input_line(space->machine, "dasp", INPUT_LINE_RESET, !(data & 16) ? ASSERT_LINE : CLEAR_LINE);
} }
} }
@ -3332,8 +3332,8 @@ static MACHINE_RESET(konamigx)
memset(sndto020, 0, 16); memset(sndto020, 0, 16);
// sound CPU initially disabled? // sound CPU initially disabled?
cpu_set_input_line(machine->cpu[1], INPUT_LINE_HALT, ASSERT_LINE); cputag_set_input_line(machine, "sound", INPUT_LINE_HALT, ASSERT_LINE);
cpu_set_input_line(machine->cpu[2], INPUT_LINE_RESET, ASSERT_LINE); cputag_set_input_line(machine, "dasp", INPUT_LINE_RESET, ASSERT_LINE);
if (!strcmp(machine->gamedrv->name, "tkmmpzdm")) if (!strcmp(machine->gamedrv->name, "tkmmpzdm"))
{ {
@ -3431,8 +3431,8 @@ static DRIVER_INIT(konamigx)
switch (gameDefs[i].special) switch (gameDefs[i].special)
{ {
case 1: // LE2 guns case 1: // LE2 guns
memory_install_read32_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM), 0xd44000, 0xd44003, 0, 0, le2_gun_H_r ); memory_install_read32_handler(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), 0xd44000, 0xd44003, 0, 0, le2_gun_H_r );
memory_install_read32_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM), 0xd44004, 0xd44007, 0, 0, le2_gun_V_r ); memory_install_read32_handler(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), 0xd44004, 0xd44007, 0, 0, le2_gun_V_r );
break; break;
case 2: // tkmmpzdm hack case 2: // tkmmpzdm hack
@ -3468,7 +3468,7 @@ static DRIVER_INIT(konamigx)
break; break;
case 7: // install type 4 Xilinx protection for non-type 3/4 games case 7: // install type 4 Xilinx protection for non-type 3/4 games
memory_install_write32_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM), 0xcc0000, 0xcc0007, 0, 0, type4_prot_w ); memory_install_write32_handler(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), 0xcc0000, 0xcc0007, 0, 0, type4_prot_w );
break; break;
case 8: // tbyahhoo case 8: // tbyahhoo
@ -3488,14 +3488,14 @@ static DRIVER_INIT(konamigx)
switch (readback) switch (readback)
{ {
case BPP5: case BPP5:
memory_install_read32_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM), 0xd4a000, 0xd4a00f, 0, 0, gx5bppspr_r); memory_install_read32_handler(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), 0xd4a000, 0xd4a00f, 0, 0, gx5bppspr_r);
break; break;
case BPP66: case BPP66:
memory_install_read32_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM), 0xd00000, 0xd01fff, 0, 0, K056832_6bpp_rom_long_r); memory_install_read32_handler(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), 0xd00000, 0xd01fff, 0, 0, K056832_6bpp_rom_long_r);
case BPP6: case BPP6:
memory_install_read32_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM), 0xd4a000, 0xd4a00f, 0, 0, gx6bppspr_r); memory_install_read32_handler(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), 0xd4a000, 0xd4a00f, 0, 0, gx6bppspr_r);
break; break;
} }

View File

@ -318,7 +318,7 @@ static WRITE64_HANDLER(unk4_w)
if (data & 0x800000) if (data & 0x800000)
{ {
mame_printf_debug("CPU '%s': CPU1 IRQ at %08X\n", space->cpu->tag, cpu_get_pc(space->cpu)); mame_printf_debug("CPU '%s': CPU1 IRQ at %08X\n", space->cpu->tag, cpu_get_pc(space->cpu));
cpu_set_input_line(space->machine->cpu[1], INPUT_LINE_IRQ0, ASSERT_LINE); cputag_set_input_line(space->machine, "sub", INPUT_LINE_IRQ0, ASSERT_LINE);
} }
unk20004 = (UINT32)(data); unk20004 = (UINT32)(data);
@ -413,7 +413,7 @@ static WRITE64_HANDLER(reset_w)
{ {
if (data & U64(0x100000000)) if (data & U64(0x100000000))
{ {
cpu_set_input_line(space->machine->cpu[0], INPUT_LINE_RESET, PULSE_LINE); cputag_set_input_line(space->machine, "maincpu", INPUT_LINE_RESET, PULSE_LINE);
unk3 = 0; unk3 = 0;
} }
} }
@ -1075,7 +1075,7 @@ static READ64_HANDLER(cpu_r)
if (ACCESSING_BITS_32_63) if (ACCESSING_BITS_32_63)
{ {
r = (UINT64)((space->cpu != space->machine->cpu[0]) ? 0x80000000 : 0); r = (UINT64)((space->cpu != cputag_get_cpu(space->machine, "maincpu")) ? 0x80000000 : 0);
//r |= 0x40000000; // sets Video-LowRes !? //r |= 0x40000000; // sets Video-LowRes !?
return r << 32; return r << 32;
} }

View File

@ -565,7 +565,7 @@ static TIMER_CALLBACK( atapi_xfer_end )
atapi_regs[ATAPI_REG_COUNTLOW] = atapi_xferlen & 0xff; atapi_regs[ATAPI_REG_COUNTLOW] = atapi_xferlen & 0xff;
atapi_regs[ATAPI_REG_COUNTHIGH] = (atapi_xferlen>>8)&0xff; atapi_regs[ATAPI_REG_COUNTHIGH] = (atapi_xferlen>>8)&0xff;
timer_adjust_oneshot(atapi_timer, cpu_clocks_to_attotime(machine->cpu[0], (ATAPI_CYCLES_PER_SECTOR * (atapi_xferlen/2048))), 0); timer_adjust_oneshot(atapi_timer, cputag_clocks_to_attotime(machine, "maincpu", (ATAPI_CYCLES_PER_SECTOR * (atapi_xferlen/2048))), 0);
} }
else else
{ {
@ -1032,7 +1032,7 @@ static void cdrom_dma_write( running_machine *machine, UINT32 n_address, INT32 n
verboselog( machine, 2, "atapi_xfer_end: %d %d\n", atapi_xferlen, atapi_xfermod ); verboselog( machine, 2, "atapi_xfer_end: %d %d\n", atapi_xferlen, atapi_xfermod );
// set a transfer complete timer (Note: CYCLES_PER_SECTOR can't be lower than 2000 or the BIOS ends up "out of order") // set a transfer complete timer (Note: CYCLES_PER_SECTOR can't be lower than 2000 or the BIOS ends up "out of order")
timer_adjust_oneshot(atapi_timer, cpu_clocks_to_attotime(machine->cpu[0], (ATAPI_CYCLES_PER_SECTOR * (atapi_xferlen/2048))), 0); timer_adjust_oneshot(atapi_timer, cputag_clocks_to_attotime(machine, "maincpu", (ATAPI_CYCLES_PER_SECTOR * (atapi_xferlen/2048))), 0);
} }
static UINT32 m_n_security_control; static UINT32 m_n_security_control;
@ -1188,7 +1188,7 @@ static UINT64 m_p_n_root_start[ 3 ];
static UINT64 psxcpu_gettotalcycles( running_machine *machine ) static UINT64 psxcpu_gettotalcycles( running_machine *machine )
{ {
/* TODO: should return the start of the current tick. */ /* TODO: should return the start of the current tick. */
return cpu_get_total_cycles(machine->cpu[0]) * 2; return cputag_get_total_cycles(machine, "maincpu") * 2;
} }
static int root_divider( int n_counter ) static int root_divider( int n_counter )
@ -1740,7 +1740,7 @@ static DRIVER_INIT( ge765pwbba )
uPD4701_init( machine, 0 ); uPD4701_init( machine, 0 );
memory_install_readwrite32_handler( cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM), 0x1f640000, 0x1f6400ff, 0, 0, ge765pwbba_r, ge765pwbba_w ); memory_install_readwrite32_handler( cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), 0x1f640000, 0x1f6400ff, 0, 0, ge765pwbba_r, ge765pwbba_w );
} }
/* /*
@ -1851,7 +1851,7 @@ static void gx700pwfbf_init( running_machine *machine, void (*output_callback_fu
gx700pwfbf_output_callback = output_callback_func; gx700pwfbf_output_callback = output_callback_func;
memory_install_readwrite32_handler( cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM), 0x1f640000, 0x1f6400ff, 0, 0, gx700pwbf_io_r, gx700pwbf_io_w ); memory_install_readwrite32_handler( cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), 0x1f640000, 0x1f6400ff, 0, 0, gx700pwbf_io_r, gx700pwbf_io_w );
state_save_register_global_array(machine, gx700pwbf_output_data ); state_save_register_global_array(machine, gx700pwbf_output_data );
} }
@ -2094,7 +2094,7 @@ static DRIVER_INIT( gtrfrks )
{ {
DRIVER_INIT_CALL(konami573); DRIVER_INIT_CALL(konami573);
memory_install_readwrite32_handler( cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM), 0x1f600000, 0x1f6000ff, 0, 0, gtrfrks_io_r, gtrfrks_io_w ); memory_install_readwrite32_handler( cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), 0x1f600000, 0x1f6000ff, 0, 0, gtrfrks_io_r, gtrfrks_io_w );
} }
/* GX894 digital i/o */ /* GX894 digital i/o */
@ -2384,7 +2384,7 @@ static void gx894pwbba_init( running_machine *machine, void (*output_callback_fu
gx894pwbba_output_callback = output_callback_func; gx894pwbba_output_callback = output_callback_func;
memory_install_readwrite32_handler( cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM), 0x1f640000, 0x1f6400ff, 0, 0, gx894pwbba_r, gx894pwbba_w ); memory_install_readwrite32_handler( cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), 0x1f640000, 0x1f6400ff, 0, 0, gx894pwbba_r, gx894pwbba_w );
gx894_ram_write_offset = 0; gx894_ram_write_offset = 0;
gx894_ram_read_offset = 0; gx894_ram_read_offset = 0;
@ -2413,7 +2413,7 @@ static DRIVER_INIT( gtrfrkdigital )
gx894pwbba_init( machine, NULL ); gx894pwbba_init( machine, NULL );
memory_install_readwrite32_handler( cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM), 0x1f600000, 0x1f6000ff, 0, 0, gtrfrks_io_r, gtrfrks_io_w ); memory_install_readwrite32_handler( cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), 0x1f600000, 0x1f6000ff, 0, 0, gtrfrks_io_r, gtrfrks_io_w );
} }
/* ddr solo */ /* ddr solo */
@ -2706,7 +2706,7 @@ static DRIVER_INIT( dmx )
gx894pwbba_init( machine, dmx_output_callback ); gx894pwbba_init( machine, dmx_output_callback );
memory_install_write32_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM), 0x1f600000, 0x1f6000ff, 0, 0, dmx_io_w ); memory_install_write32_handler(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), 0x1f600000, 0x1f6000ff, 0, 0, dmx_io_w );
} }
/* salary man champ */ /* salary man champ */

View File

@ -327,7 +327,7 @@ static MACHINE_RESET( kungfur )
static INTERRUPT_GEN( kungfur_irq ) static INTERRUPT_GEN( kungfur_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_DRIVER_START( kungfur ) static MACHINE_DRIVER_START( kungfur )

View File

@ -39,16 +39,16 @@ static UINT8 *shared_ram;
MACHINE_RESET( kyugo ) MACHINE_RESET( kyugo )
{ {
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);
// must start with interrupts and sub CPU disabled // must start with interrupts and sub CPU disabled
cpu_interrupt_enable(machine->cpu[0], 0); cpu_interrupt_enable(cputag_get_cpu(machine, "maincpu"), 0);
kyugo_sub_cpu_control_w(space, 0, 0); kyugo_sub_cpu_control_w(space, 0, 0);
} }
WRITE8_HANDLER( kyugo_sub_cpu_control_w ) WRITE8_HANDLER( kyugo_sub_cpu_control_w )
{ {
cpu_set_input_line(space->machine->cpu[1], INPUT_LINE_HALT, data ? CLEAR_LINE : ASSERT_LINE); cputag_set_input_line(space->machine, "sub", INPUT_LINE_HALT, data ? CLEAR_LINE : ASSERT_LINE);
} }
@ -1204,18 +1204,18 @@ ROM_END
static DRIVER_INIT( gyrodine ) static DRIVER_INIT( gyrodine )
{ {
/* add watchdog */ /* add watchdog */
memory_install_write8_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM), 0xe000, 0xe000, 0, 0, watchdog_reset_w); memory_install_write8_handler(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), 0xe000, 0xe000, 0, 0, watchdog_reset_w);
} }
static DRIVER_INIT( srdmissn ) static DRIVER_INIT( srdmissn )
{ {
/* shared RAM is mapped at 0xe000 as well */ /* shared RAM is mapped at 0xe000 as well */
memory_install_readwrite8_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM), 0xe000, 0xe7ff, 0, 0, (read8_space_func)SMH_BANK(1), (write8_space_func)SMH_BANK(1)); memory_install_readwrite8_handler(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), 0xe000, 0xe7ff, 0, 0, (read8_space_func)SMH_BANK(1), (write8_space_func)SMH_BANK(1));
memory_set_bankptr(machine, 1, shared_ram); memory_set_bankptr(machine, 1, shared_ram);
/* extra RAM on sub CPU */ /* extra RAM on sub CPU */
memory_install_readwrite8_handler(cpu_get_address_space(machine->cpu[1], ADDRESS_SPACE_PROGRAM), 0x8800, 0x8fff, 0, 0, (read8_space_func)SMH_BANK(2), (write8_space_func)SMH_BANK(2)); memory_install_readwrite8_handler(cputag_get_address_space(machine, "sub", ADDRESS_SPACE_PROGRAM), 0x8800, 0x8fff, 0, 0, (read8_space_func)SMH_BANK(2), (write8_space_func)SMH_BANK(2));
memory_set_bankptr(machine, 2, auto_alloc_array(machine, UINT8, 0x800)); memory_set_bankptr(machine, 2, auto_alloc_array(machine, UINT8, 0x800));
} }

View File

@ -150,14 +150,14 @@ ADDRESS_MAP_END
static INPUT_CHANGED( coin1_inserted ) static INPUT_CHANGED( coin1_inserted )
{ {
/* left coin insertion causes an NMI */ /* left coin insertion causes an NMI */
cpu_set_input_line(field->port->machine->cpu[0], INPUT_LINE_NMI, newval ? ASSERT_LINE : CLEAR_LINE); cputag_set_input_line(field->port->machine, "maincpu", INPUT_LINE_NMI, newval ? ASSERT_LINE : CLEAR_LINE);
} }
static INPUT_CHANGED( coin2_inserted ) static INPUT_CHANGED( coin2_inserted )
{ {
/* right coin insertion causes an IRQ */ /* right coin insertion causes an IRQ */
if (newval) if (newval)
cpu_set_input_line(field->port->machine->cpu[0], 0, HOLD_LINE); cputag_set_input_line(field->port->machine, "maincpu", 0, HOLD_LINE);
} }

View File

@ -87,19 +87,19 @@ static WRITE8_HANDLER( to_main_w )
static WRITE8_HANDLER( sound_cpu_reset_w ) static WRITE8_HANDLER( sound_cpu_reset_w )
{ {
cpu_set_input_line(space->machine->cpu[1], INPUT_LINE_RESET, (data&1 )? ASSERT_LINE : CLEAR_LINE); cputag_set_input_line(space->machine, "audiocpu", INPUT_LINE_RESET, (data & 1 ) ? ASSERT_LINE : CLEAR_LINE);
} }
static TIMER_CALLBACK( nmi_callback ) static TIMER_CALLBACK( nmi_callback )
{ {
if (sound_nmi_enable) cpu_set_input_line(machine->cpu[1],INPUT_LINE_NMI,PULSE_LINE); if (sound_nmi_enable) cputag_set_input_line(machine, "audiocpu", INPUT_LINE_NMI, PULSE_LINE);
else pending_nmi = 1; else pending_nmi = 1;
} }
static WRITE8_HANDLER( sound_command_w ) static WRITE8_HANDLER( sound_command_w )
{ {
soundlatch_w(space,0,data); soundlatch_w(space, 0, data);
timer_call_after_resynch(space->machine, NULL, data,nmi_callback); timer_call_after_resynch(space->machine, NULL, data, nmi_callback);
} }
static WRITE8_HANDLER( nmi_disable_w ) static WRITE8_HANDLER( nmi_disable_w )
@ -112,7 +112,7 @@ static WRITE8_HANDLER( nmi_enable_w )
sound_nmi_enable = 1; sound_nmi_enable = 1;
if (pending_nmi) if (pending_nmi)
{ {
cpu_set_input_line(space->machine->cpu[1],INPUT_LINE_NMI,PULSE_LINE); cputag_set_input_line(space->machine, "audiocpu", INPUT_LINE_NMI, PULSE_LINE);
pending_nmi = 0; pending_nmi = 0;
} }
} }

View File

@ -595,8 +595,8 @@ static const sn76477_interface laserbat_sn76477_interface =
/* Cat'N Mouse sound ***********************************/ /* Cat'N Mouse sound ***********************************/
static WRITE_LINE_DEVICE_HANDLER( zaccaria_irq0a ) { cpu_set_input_line(device->machine->cpu[1], INPUT_LINE_NMI, state ? ASSERT_LINE : CLEAR_LINE); } static WRITE_LINE_DEVICE_HANDLER( zaccaria_irq0a ) { cputag_set_input_line(device->machine, "audiocpu", INPUT_LINE_NMI, state ? ASSERT_LINE : CLEAR_LINE); }
static WRITE_LINE_DEVICE_HANDLER( zaccaria_irq0b ) { cpu_set_input_line(device->machine->cpu[1],0,state ? ASSERT_LINE : CLEAR_LINE); } static WRITE_LINE_DEVICE_HANDLER( zaccaria_irq0b ) { cputag_set_input_line(device->machine, "audiocpu", 0, state ? ASSERT_LINE : CLEAR_LINE); }
static int active_8910,port0a; static int active_8910,port0a;

View File

@ -39,7 +39,7 @@ DIP locations verified for:
static INPUT_CHANGED( coin_inserted ) static INPUT_CHANGED( coin_inserted )
{ {
/* coin insertion causes an NMI */ /* coin insertion causes an NMI */
cpu_set_input_line(field->port->machine->cpu[0], INPUT_LINE_NMI, newval ? CLEAR_LINE : ASSERT_LINE); cputag_set_input_line(field->port->machine, "maincpu", INPUT_LINE_NMI, newval ? CLEAR_LINE : ASSERT_LINE);
} }
@ -51,13 +51,13 @@ static UINT8 *lasso_chip_data;
static WRITE8_HANDLER( sound_command_w ) static WRITE8_HANDLER( sound_command_w )
{ {
soundlatch_w(space,offset,data); soundlatch_w(space,offset,data);
generic_pulse_irq_line(space->machine->cpu[1], 0); generic_pulse_irq_line(cputag_get_cpu(space->machine, "audiocpu"), 0);
} }
static WRITE8_HANDLER( pinbo_sound_command_w ) static WRITE8_HANDLER( pinbo_sound_command_w )
{ {
soundlatch_w(space,offset,data); soundlatch_w(space,offset,data);
cpu_set_input_line(space->machine->cpu[1], 0, HOLD_LINE); cputag_set_input_line(space->machine, "audiocpu", 0, HOLD_LINE);
} }
static READ8_HANDLER( sound_status_r ) static READ8_HANDLER( sound_status_r )

View File

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

View File

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

View File

@ -1839,11 +1839,11 @@ ROM_END
static void init_master_ports(running_machine *machine, UINT8 mvram_base, UINT8 io_base) static void init_master_ports(running_machine *machine, UINT8 mvram_base, UINT8 io_base)
{ {
/* set up the master CPU VRAM I/O */ /* set up the master CPU VRAM I/O */
memory_install_readwrite8_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_IO), mvram_base, mvram_base + 0x1f, 0, 0, leland_mvram_port_r, leland_mvram_port_w); memory_install_readwrite8_handler(cputag_get_address_space(machine, "master", ADDRESS_SPACE_IO), mvram_base, mvram_base + 0x1f, 0, 0, leland_mvram_port_r, leland_mvram_port_w);
/* set up the master CPU I/O ports */ /* set up the master CPU I/O ports */
memory_install_read8_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_IO), io_base, io_base + 0x1f, 0, 0, leland_master_input_r); memory_install_read8_handler(cputag_get_address_space(machine, "master", ADDRESS_SPACE_IO), io_base, io_base + 0x1f, 0, 0, leland_master_input_r);
memory_install_write8_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_IO), io_base, io_base + 0x0f, 0, 0, leland_master_output_w); memory_install_write8_handler(cputag_get_address_space(machine, "master", ADDRESS_SPACE_IO), io_base, io_base + 0x0f, 0, 0, leland_master_output_w);
} }
@ -1878,8 +1878,8 @@ static DRIVER_INIT( cerberus )
init_master_ports(machine, 0x40, 0x80); init_master_ports(machine, 0x40, 0x80);
/* set up additional input ports */ /* set up additional input ports */
memory_install_read8_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_IO), 0x80, 0x80, 0, 0, cerberus_dial_1_r); memory_install_read8_handler(cputag_get_address_space(machine, "master", ADDRESS_SPACE_IO), 0x80, 0x80, 0, 0, cerberus_dial_1_r);
memory_install_read8_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_IO), 0x90, 0x90, 0, 0, cerberus_dial_2_r); memory_install_read8_handler(cputag_get_address_space(machine, "master", ADDRESS_SPACE_IO), 0x90, 0x90, 0, 0, cerberus_dial_2_r);
} }
@ -1998,7 +1998,7 @@ static DRIVER_INIT( alleymas )
/* kludge warning: the game uses location E0CA to determine if the joysticks are available */ /* kludge warning: the game uses location E0CA to determine if the joysticks are available */
/* it gets cleared by the code, but there is no obvious way for the value to be set to a */ /* it gets cleared by the code, but there is no obvious way for the value to be set to a */
/* non-zero value. If the value is zero, the joystick is never read. */ /* non-zero value. If the value is zero, the joystick is never read. */
alleymas_kludge_mem = memory_install_write8_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM), 0xe0ca, 0xe0ca, 0, 0, alleymas_joystick_kludge); alleymas_kludge_mem = memory_install_write8_handler(cputag_get_address_space(machine, "master", ADDRESS_SPACE_PROGRAM), 0xe0ca, 0xe0ca, 0, 0, alleymas_joystick_kludge);
} }
@ -2051,9 +2051,9 @@ static DRIVER_INIT( dangerz )
init_master_ports(machine, 0x40, 0x80); init_master_ports(machine, 0x40, 0x80);
/* set up additional input ports */ /* set up additional input ports */
memory_install_read8_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_IO), 0xf4, 0xf4, 0, 0, dangerz_input_upper_r); memory_install_read8_handler(cputag_get_address_space(machine, "master", ADDRESS_SPACE_IO), 0xf4, 0xf4, 0, 0, dangerz_input_upper_r);
memory_install_read8_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_IO), 0xf8, 0xf8, 0, 0, dangerz_input_y_r); memory_install_read8_handler(cputag_get_address_space(machine, "master", ADDRESS_SPACE_IO), 0xf8, 0xf8, 0, 0, dangerz_input_y_r);
memory_install_read8_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_IO), 0xfc, 0xfc, 0, 0, dangerz_input_x_r); memory_install_read8_handler(cputag_get_address_space(machine, "master", ADDRESS_SPACE_IO), 0xfc, 0xfc, 0, 0, dangerz_input_x_r);
} }
@ -2144,10 +2144,10 @@ static DRIVER_INIT( redlin2p )
init_master_ports(machine, 0x00, 0xc0); init_master_ports(machine, 0x00, 0xc0);
/* set up additional input ports */ /* set up additional input ports */
memory_install_read8_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_IO), 0xc0, 0xc0, 0, 0, redline_pedal_1_r); memory_install_read8_handler(cputag_get_address_space(machine, "master", ADDRESS_SPACE_IO), 0xc0, 0xc0, 0, 0, redline_pedal_1_r);
memory_install_read8_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_IO), 0xd0, 0xd0, 0, 0, redline_pedal_2_r); memory_install_read8_handler(cputag_get_address_space(machine, "master", ADDRESS_SPACE_IO), 0xd0, 0xd0, 0, 0, redline_pedal_2_r);
memory_install_read8_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_IO), 0xf8, 0xf8, 0, 0, redline_wheel_2_r); memory_install_read8_handler(cputag_get_address_space(machine, "master", ADDRESS_SPACE_IO), 0xf8, 0xf8, 0, 0, redline_wheel_2_r);
memory_install_read8_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_IO), 0xfb, 0xfb, 0, 0, redline_wheel_1_r); memory_install_read8_handler(cputag_get_address_space(machine, "master", ADDRESS_SPACE_IO), 0xfb, 0xfb, 0, 0, redline_wheel_1_r);
} }
@ -2202,9 +2202,9 @@ static DRIVER_INIT( viper )
init_master_ports(machine, 0x00, 0xc0); init_master_ports(machine, 0x00, 0xc0);
/* set up additional input ports */ /* set up additional input ports */
memory_install_read8_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_IO), 0xa4, 0xa4, 0, 0, dangerz_input_upper_r); memory_install_read8_handler(cputag_get_address_space(machine, "master", ADDRESS_SPACE_IO), 0xa4, 0xa4, 0, 0, dangerz_input_upper_r);
memory_install_read8_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_IO), 0xb8, 0xb8, 0, 0, dangerz_input_y_r); memory_install_read8_handler(cputag_get_address_space(machine, "master", ADDRESS_SPACE_IO), 0xb8, 0xb8, 0, 0, dangerz_input_y_r);
memory_install_read8_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_IO), 0xbc, 0xbc, 0, 0, dangerz_input_x_r); memory_install_read8_handler(cputag_get_address_space(machine, "master", ADDRESS_SPACE_IO), 0xbc, 0xbc, 0, 0, dangerz_input_x_r);
} }
@ -2233,8 +2233,8 @@ static DRIVER_INIT( teamqb )
init_master_ports(machine, 0x40, 0x80); init_master_ports(machine, 0x40, 0x80);
/* set up additional input ports */ /* set up additional input ports */
memory_install_read_port_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_IO), 0x7c, 0x7c, 0, 0, "IN4"); memory_install_read_port_handler(cputag_get_address_space(machine, "master", ADDRESS_SPACE_IO), 0x7c, 0x7c, 0, 0, "IN4");
memory_install_read_port_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_IO), 0x7f, 0x7f, 0, 0, "IN5"); memory_install_read_port_handler(cputag_get_address_space(machine, "master", ADDRESS_SPACE_IO), 0x7f, 0x7f, 0, 0, "IN5");
} }
@ -2263,8 +2263,8 @@ static DRIVER_INIT( aafb )
init_master_ports(machine, 0x00, 0xc0); init_master_ports(machine, 0x00, 0xc0);
/* set up additional input ports */ /* set up additional input ports */
memory_install_read_port_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_IO), 0x7c, 0x7c, 0, 0, "IN4"); memory_install_read_port_handler(cputag_get_address_space(machine, "master", ADDRESS_SPACE_IO), 0x7c, 0x7c, 0, 0, "IN4");
memory_install_read_port_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_IO), 0x7f, 0x7f, 0, 0, "IN5"); memory_install_read_port_handler(cputag_get_address_space(machine, "master", ADDRESS_SPACE_IO), 0x7f, 0x7f, 0, 0, "IN5");
} }
@ -2293,8 +2293,8 @@ static DRIVER_INIT( aafbb )
init_master_ports(machine, 0x80, 0x40); init_master_ports(machine, 0x80, 0x40);
/* set up additional input ports */ /* set up additional input ports */
memory_install_read_port_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_IO), 0x7c, 0x7c, 0, 0, "IN4"); memory_install_read_port_handler(cputag_get_address_space(machine, "master", ADDRESS_SPACE_IO), 0x7c, 0x7c, 0, 0, "IN4");
memory_install_read_port_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_IO), 0x7f, 0x7f, 0, 0, "IN5"); memory_install_read_port_handler(cputag_get_address_space(machine, "master", ADDRESS_SPACE_IO), 0x7f, 0x7f, 0, 0, "IN5");
} }
@ -2323,8 +2323,8 @@ static DRIVER_INIT( aafbd2p )
init_master_ports(machine, 0x00, 0x40); init_master_ports(machine, 0x00, 0x40);
/* set up additional input ports */ /* set up additional input ports */
memory_install_read_port_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_IO), 0x7c, 0x7c, 0, 0, "IN4"); memory_install_read_port_handler(cputag_get_address_space(machine, "master", ADDRESS_SPACE_IO), 0x7c, 0x7c, 0, 0, "IN4");
memory_install_read_port_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_IO), 0x7f, 0x7f, 0, 0, "IN5"); memory_install_read_port_handler(cputag_get_address_space(machine, "master", ADDRESS_SPACE_IO), 0x7f, 0x7f, 0, 0, "IN5");
} }
@ -2359,9 +2359,9 @@ static DRIVER_INIT( offroad )
init_master_ports(machine, 0x40, 0x80); /* yes, this is intentional */ init_master_ports(machine, 0x40, 0x80); /* yes, this is intentional */
/* set up additional input ports */ /* set up additional input ports */
memory_install_read8_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_IO), 0xf8, 0xf8, 0, 0, offroad_wheel_3_r); memory_install_read8_handler(cputag_get_address_space(machine, "master", ADDRESS_SPACE_IO), 0xf8, 0xf8, 0, 0, offroad_wheel_3_r);
memory_install_read8_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_IO), 0xf9, 0xf9, 0, 0, offroad_wheel_1_r); memory_install_read8_handler(cputag_get_address_space(machine, "master", ADDRESS_SPACE_IO), 0xf9, 0xf9, 0, 0, offroad_wheel_1_r);
memory_install_read8_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_IO), 0xfb, 0xfb, 0, 0, offroad_wheel_2_r); memory_install_read8_handler(cputag_get_address_space(machine, "master", ADDRESS_SPACE_IO), 0xfb, 0xfb, 0, 0, offroad_wheel_2_r);
} }
@ -2395,9 +2395,9 @@ static DRIVER_INIT( offroadt )
init_master_ports(machine, 0x80, 0x40); init_master_ports(machine, 0x80, 0x40);
/* set up additional input ports */ /* set up additional input ports */
memory_install_read8_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_IO), 0xf8, 0xf8, 0, 0, offroad_wheel_3_r); memory_install_read8_handler(cputag_get_address_space(machine, "master", ADDRESS_SPACE_IO), 0xf8, 0xf8, 0, 0, offroad_wheel_3_r);
memory_install_read8_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_IO), 0xf9, 0xf9, 0, 0, offroad_wheel_1_r); memory_install_read8_handler(cputag_get_address_space(machine, "master", ADDRESS_SPACE_IO), 0xf9, 0xf9, 0, 0, offroad_wheel_1_r);
memory_install_read8_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_IO), 0xfb, 0xfb, 0, 0, offroad_wheel_2_r); memory_install_read8_handler(cputag_get_address_space(machine, "master", ADDRESS_SPACE_IO), 0xfb, 0xfb, 0, 0, offroad_wheel_2_r);
} }
@ -2429,7 +2429,7 @@ static DRIVER_INIT( pigout )
init_master_ports(machine, 0x00, 0x40); init_master_ports(machine, 0x00, 0x40);
/* set up additional input ports */ /* set up additional input ports */
memory_install_read_port_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_IO), 0x7f, 0x7f, 0, 0, "IN4"); memory_install_read_port_handler(cputag_get_address_space(machine, "master", ADDRESS_SPACE_IO), 0x7f, 0x7f, 0, 0, "IN4");
} }

View File

@ -76,12 +76,12 @@ static WRITE16_HANDLER( lemmings_palette_24bit_w )
static WRITE16_HANDLER( lemmings_sound_w ) static WRITE16_HANDLER( lemmings_sound_w )
{ {
soundlatch_w(space,0,data&0xff); soundlatch_w(space,0,data&0xff);
cpu_set_input_line(space->machine->cpu[1],1,HOLD_LINE); cputag_set_input_line(space->machine, "audiocpu", 1, HOLD_LINE);
} }
static WRITE8_HANDLER( lemmings_sound_ack_w ) static WRITE8_HANDLER( lemmings_sound_ack_w )
{ {
cpu_set_input_line(space->machine->cpu[1],1,CLEAR_LINE); cputag_set_input_line(space->machine, "audiocpu", 1, CLEAR_LINE);
} }
/******************************************************************************/ /******************************************************************************/
@ -239,7 +239,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],0,state); cputag_set_input_line(device->machine, "audiocpu", 0, state);
} }
static const ym2151_interface ym2151_config = static const ym2151_interface ym2151_config =

View File

@ -259,7 +259,7 @@ static WRITE8_HANDLER( sound_cmd_w )
static WRITE8_HANDLER( sound_irq_w ) static WRITE8_HANDLER( sound_irq_w )
{ {
cpu_set_input_line(space->machine->cpu[1], 0, HOLD_LINE); cputag_set_input_line(space->machine, "soundcpu", 0, HOLD_LINE);
} }
static READ8_HANDLER( sound_status_r ) static READ8_HANDLER( sound_status_r )
@ -269,7 +269,7 @@ static READ8_HANDLER( sound_status_r )
static void sound_nmi(const device_config *device) static void sound_nmi(const device_config *device)
{ {
cpu_set_input_line(device->machine->cpu[1], INPUT_LINE_NMI, PULSE_LINE); cputag_set_input_line(device->machine, "soundcpu", INPUT_LINE_NMI, PULSE_LINE);
} }
static WRITE8_HANDLER( le_bankswitch_w ) static WRITE8_HANDLER( le_bankswitch_w )
@ -588,7 +588,7 @@ static MACHINE_RESET( lethalen )
memory_set_bankptr(machine, 1, &prgrom[0x10000]); memory_set_bankptr(machine, 1, &prgrom[0x10000]);
memory_set_bankptr(machine, 2, &prgrom[0x48000]); memory_set_bankptr(machine, 2, &prgrom[0x48000]);
/* force reset again to read proper reset vector */ /* force reset again to read proper reset vector */
device_reset(machine->cpu[0]); device_reset(cputag_get_cpu(machine, "maincpu"));
} }
static const gfx_layout lethal_6bpp = static const gfx_layout lethal_6bpp =

View File

@ -161,7 +161,7 @@ Pin #11(+) | | R |
static CUSTOM_INPUT( ticket_status ) static CUSTOM_INPUT( ticket_status )
{ {
const address_space *space = cpu_get_address_space(field->port->machine->cpu[0], ADDRESS_SPACE_PROGRAM); const address_space *space = cputag_get_address_space(field->port->machine, "maincpu", ADDRESS_SPACE_PROGRAM);
return ticket_dispenser_0_r(space, 0) >> 7; return ticket_dispenser_0_r(space, 0) >> 7;
} }
@ -907,21 +907,21 @@ ROM_END
static DRIVER_INIT( ripribit ) static DRIVER_INIT( ripribit )
{ {
ticket_dispenser_init(machine, 200, TICKET_MOTOR_ACTIVE_HIGH, TICKET_STATUS_ACTIVE_HIGH); ticket_dispenser_init(machine, 200, TICKET_MOTOR_ACTIVE_HIGH, TICKET_STATUS_ACTIVE_HIGH);
memory_install_write16_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM), 0x04100010, 0x0410001f, 0, 0, ripribit_control_w); memory_install_write16_handler(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), 0x04100010, 0x0410001f, 0, 0, ripribit_control_w);
} }
static DRIVER_INIT( cfarm ) static DRIVER_INIT( cfarm )
{ {
ticket_dispenser_init(machine, 200, TICKET_MOTOR_ACTIVE_HIGH, TICKET_STATUS_ACTIVE_HIGH); ticket_dispenser_init(machine, 200, TICKET_MOTOR_ACTIVE_HIGH, TICKET_STATUS_ACTIVE_HIGH);
memory_install_write16_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM), 0x04100010, 0x0410001f, 0, 0, cfarm_control_w); memory_install_write16_handler(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), 0x04100010, 0x0410001f, 0, 0, cfarm_control_w);
} }
static DRIVER_INIT( cclownz ) static DRIVER_INIT( cclownz )
{ {
ticket_dispenser_init(machine, 200, TICKET_MOTOR_ACTIVE_HIGH, TICKET_STATUS_ACTIVE_HIGH); ticket_dispenser_init(machine, 200, TICKET_MOTOR_ACTIVE_HIGH, TICKET_STATUS_ACTIVE_HIGH);
memory_install_write16_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM), 0x04100010, 0x0410001f, 0, 0, cclownz_control_w); memory_install_write16_handler(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), 0x04100010, 0x0410001f, 0, 0, cclownz_control_w);
} }

View File

@ -317,7 +317,7 @@ GFXDECODE_END
static TIMER_CALLBACK( irq_stop ) static TIMER_CALLBACK( irq_stop )
{ {
cpu_set_input_line(machine->cpu[0], 0, CLEAR_LINE); cputag_set_input_line(machine, "maincpu", 0, CLEAR_LINE);
} }
static INTERRUPT_GEN( vblank_callback_lgp ) static INTERRUPT_GEN( vblank_callback_lgp )

View File

@ -77,9 +77,9 @@ static WRITE8_HANDLER( deco16_bank_w )
deco16_bank = data; deco16_bank = data;
if (deco16_bank) if (deco16_bank)
memory_install_read8_handler(cpu_get_address_space(space->machine->cpu[0], ADDRESS_SPACE_PROGRAM), 0x8000, 0x800f, 0, 0, deco16_io_r); memory_install_read8_handler(cputag_get_address_space(space->machine, "maincpu", ADDRESS_SPACE_PROGRAM), 0x8000, 0x800f, 0, 0, deco16_io_r);
else else
memory_install_read8_handler(cpu_get_address_space(space->machine->cpu[0], ADDRESS_SPACE_PROGRAM), 0x8000, 0x800f, 0, 0, (read8_space_func)SMH_BANK(1)); memory_install_read8_handler(cputag_get_address_space(space->machine, "maincpu", ADDRESS_SPACE_PROGRAM), 0x8000, 0x800f, 0, 0, (read8_space_func)SMH_BANK(1));
} }
/************************************* /*************************************
@ -957,7 +957,7 @@ static DRIVER_INIT( yellowcb )
{ {
DRIVER_INIT_CALL(prosport); DRIVER_INIT_CALL(prosport);
memory_install_read_port_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM), 0xa000, 0xa000, 0, 0, "IN0"); memory_install_read_port_handler(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), 0xa000, 0xa000, 0, 0, "IN0");
} }
static DRIVER_INIT( liberate ) static DRIVER_INIT( liberate )
@ -997,4 +997,3 @@ GAME( 1984, yellowcb, kamikcab, boomrang, yellowcb, yellowcb, ROT270, "bootleg"
GAME( 1984, liberate, 0, liberate, liberate, liberate, ROT270, "Data East Corporation", "Liberation", 0 ) GAME( 1984, liberate, 0, liberate, liberate, liberate, ROT270, "Data East Corporation", "Liberation", 0 )
GAME( 1984, dualaslt, liberate, liberate, dualaslt, liberate, ROT270, "Data East USA", "Dual Assault", 0 ) GAME( 1984, dualaslt, liberate, liberate, dualaslt, liberate, ROT270, "Data East USA", "Dual Assault", 0 )
GAME( 1984, liberatb, liberate, liberatb, liberatb, prosport, ROT270, "bootleg", "Liberation (bootleg)", 0 ) GAME( 1984, liberatb, liberate, liberatb, liberatb, prosport, ROT270, "bootleg", "Liberation (bootleg)", 0 )

View File

@ -999,21 +999,21 @@ static READ32_HANDLER( spotty_speedup_r )
static DRIVER_INIT( dynabomb ) static DRIVER_INIT( dynabomb )
{ {
memory_install_read32_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM), 0xe2784, 0xe2787, 0, 0, dynabomb_speedup_r ); memory_install_read32_handler(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), 0xe2784, 0xe2787, 0, 0, dynabomb_speedup_r );
spriteram_bit = 1; spriteram_bit = 1;
} }
static DRIVER_INIT( legendoh ) static DRIVER_INIT( legendoh )
{ {
memory_install_read32_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM), 0x32ab0, 0x32ab3, 0, 0, legendoh_speedup_r ); memory_install_read32_handler(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), 0x32ab0, 0x32ab3, 0, 0, legendoh_speedup_r );
spriteram_bit = 1; spriteram_bit = 1;
} }
static DRIVER_INIT( sb2003 ) static DRIVER_INIT( sb2003 )
{ {
memory_install_read32_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM), 0x135800, 0x135803, 0, 0, sb2003_speedup_r ); memory_install_read32_handler(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), 0x135800, 0x135803, 0, 0, sb2003_speedup_r );
spriteram_bit = 1; spriteram_bit = 1;
} }
@ -1033,7 +1033,7 @@ static DRIVER_INIT( spotty )
dst[x+2] = (src[x+1]&0x0f) >> 0; dst[x+2] = (src[x+1]&0x0f) >> 0;
} }
memory_install_read32_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM), 0x6626c, 0x6626f, 0, 0, spotty_speedup_r ); memory_install_read32_handler(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), 0x6626c, 0x6626f, 0, 0, spotty_speedup_r );
spriteram_bit = 1; spriteram_bit = 1;
} }

View File

@ -89,7 +89,7 @@ static int sound_nmi_enable,pending_nmi;
static TIMER_CALLBACK( nmi_callback ) static TIMER_CALLBACK( nmi_callback )
{ {
if (sound_nmi_enable) cpu_set_input_line(machine->cpu[1],INPUT_LINE_NMI,PULSE_LINE); if (sound_nmi_enable) cputag_set_input_line(machine, "audiocpu", INPUT_LINE_NMI, PULSE_LINE);
else pending_nmi = 1; else pending_nmi = 1;
} }
@ -109,7 +109,7 @@ static WRITE8_HANDLER( lkage_sh_nmi_enable_w )
sound_nmi_enable = 1; sound_nmi_enable = 1;
if (pending_nmi) if (pending_nmi)
{ /* probably wrong but commands may go lost otherwise */ { /* probably wrong but commands may go lost otherwise */
cpu_set_input_line(space->machine->cpu[1],INPUT_LINE_NMI,PULSE_LINE); cputag_set_input_line(space->machine, "audiocpu", INPUT_LINE_NMI, PULSE_LINE);
pending_nmi = 0; pending_nmi = 0;
} }
} }
@ -356,7 +356,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 const ym2203_interface ym2203_config = static const ym2203_interface ym2203_config =
@ -662,9 +662,9 @@ static READ8_HANDLER( fake_status_r )
static DRIVER_INIT( lkageb ) static DRIVER_INIT( lkageb )
{ {
memory_install_read8_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM), 0xf062, 0xf062, 0, 0, fake_mcu_r); memory_install_read8_handler(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), 0xf062, 0xf062, 0, 0, fake_mcu_r);
memory_install_read8_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM), 0xf087, 0xf087, 0, 0, fake_status_r); memory_install_read8_handler(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), 0xf087, 0xf087, 0, 0, fake_status_r);
memory_install_write8_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM), 0xf062, 0xf062, 0, 0, fake_mcu_w ); memory_install_write8_handler(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), 0xf062, 0xf062, 0, 0, fake_mcu_w );
} }
GAME( 1984, lkage, 0, lkage, lkage, 0, ROT0, "Taito Corporation", "The Legend of Kage", GAME_NO_COCKTAIL ) GAME( 1984, lkage, 0, lkage, lkage, 0, ROT0, "Taito Corporation", "The Legend of Kage", GAME_NO_COCKTAIL )

View File

@ -66,20 +66,20 @@ static WRITE16_HANDLER( adrst_w )
lockon_ctrl_reg = data & 0xff; lockon_ctrl_reg = data & 0xff;
/* Bus mastering for shared access */ /* Bus mastering for shared access */
cpu_set_input_line(space->machine->cpu[GROUND_CPU], INPUT_LINE_HALT, data & 0x04 ? ASSERT_LINE : CLEAR_LINE); cputag_set_input_line(space->machine, "ground", INPUT_LINE_HALT, data & 0x04 ? ASSERT_LINE : CLEAR_LINE);
cpu_set_input_line(space->machine->cpu[OBJECT_CPU], INPUT_LINE_HALT, data & 0x20 ? ASSERT_LINE : CLEAR_LINE); cputag_set_input_line(space->machine, "object", INPUT_LINE_HALT, data & 0x20 ? ASSERT_LINE : CLEAR_LINE);
cpu_set_input_line(space->machine->cpu[SOUND_CPU], INPUT_LINE_HALT, data & 0x40 ? CLEAR_LINE : ASSERT_LINE); cputag_set_input_line(space->machine, "audiocpu", INPUT_LINE_HALT, data & 0x40 ? CLEAR_LINE : ASSERT_LINE);
} }
static READ16_HANDLER( main_gnd_r ) static READ16_HANDLER( main_gnd_r )
{ {
const address_space *gndspace = cpu_get_address_space(space->machine->cpu[GROUND_CPU], ADDRESS_SPACE_PROGRAM); const address_space *gndspace = cputag_get_address_space(space->machine, "ground", ADDRESS_SPACE_PROGRAM);
return memory_read_word(gndspace, V30_GND_ADDR | offset * 2); return memory_read_word(gndspace, V30_GND_ADDR | offset * 2);
} }
static WRITE16_HANDLER( main_gnd_w ) static WRITE16_HANDLER( main_gnd_w )
{ {
const address_space *gndspace = cpu_get_address_space(space->machine->cpu[GROUND_CPU], ADDRESS_SPACE_PROGRAM); const address_space *gndspace = cputag_get_address_space(space->machine, "ground", ADDRESS_SPACE_PROGRAM);
if (ACCESSING_BITS_0_7) if (ACCESSING_BITS_0_7)
memory_write_byte(gndspace, V30_GND_ADDR | (offset * 2 + 0), data); memory_write_byte(gndspace, V30_GND_ADDR | (offset * 2 + 0), data);
@ -89,13 +89,13 @@ static WRITE16_HANDLER( main_gnd_w )
static READ16_HANDLER( main_obj_r ) static READ16_HANDLER( main_obj_r )
{ {
const address_space *objspace = cpu_get_address_space(space->machine->cpu[OBJECT_CPU], ADDRESS_SPACE_PROGRAM); const address_space *objspace = cputag_get_address_space(space->machine, "object", ADDRESS_SPACE_PROGRAM);
return memory_read_word(objspace, V30_OBJ_ADDR | offset * 2); return memory_read_word(objspace, V30_OBJ_ADDR | offset * 2);
} }
static WRITE16_HANDLER( main_obj_w ) static WRITE16_HANDLER( main_obj_w )
{ {
const address_space *objspace = cpu_get_address_space(space->machine->cpu[OBJECT_CPU], ADDRESS_SPACE_PROGRAM); const address_space *objspace = cputag_get_address_space(space->machine, "object", ADDRESS_SPACE_PROGRAM);
if (ACCESSING_BITS_0_7) if (ACCESSING_BITS_0_7)
memory_write_byte(objspace, V30_OBJ_ADDR | (offset * 2 + 0), data); memory_write_byte(objspace, V30_OBJ_ADDR | (offset * 2 + 0), data);
@ -107,8 +107,8 @@ static WRITE16_HANDLER( tst_w )
{ {
if (offset < 0x800) if (offset < 0x800)
{ {
const address_space *gndspace = cpu_get_address_space(space->machine->cpu[GROUND_CPU], ADDRESS_SPACE_PROGRAM); const address_space *gndspace = cputag_get_address_space(space->machine, "ground", ADDRESS_SPACE_PROGRAM);
const address_space *objspace = cpu_get_address_space(space->machine->cpu[OBJECT_CPU], ADDRESS_SPACE_PROGRAM); const address_space *objspace = cputag_get_address_space(space->machine, "object", ADDRESS_SPACE_PROGRAM);
if (ACCESSING_BITS_0_7) if (ACCESSING_BITS_0_7)
memory_write_byte(gndspace, V30_GND_ADDR | (offset * 2 + 0), data); memory_write_byte(gndspace, V30_GND_ADDR | (offset * 2 + 0), data);
@ -124,13 +124,13 @@ static WRITE16_HANDLER( tst_w )
static READ16_HANDLER( main_z80_r ) static READ16_HANDLER( main_z80_r )
{ {
const address_space *sndspace = cpu_get_address_space(space->machine->cpu[SOUND_CPU], ADDRESS_SPACE_PROGRAM); const address_space *sndspace = cputag_get_address_space(space->machine, "audiocpu", ADDRESS_SPACE_PROGRAM);
return 0xff00 | memory_read_byte(sndspace, offset); return 0xff00 | memory_read_byte(sndspace, offset);
} }
static WRITE16_HANDLER( main_z80_w ) static WRITE16_HANDLER( main_z80_w )
{ {
const address_space *sndspace = cpu_get_address_space(space->machine->cpu[SOUND_CPU], ADDRESS_SPACE_PROGRAM); const address_space *sndspace = cputag_get_address_space(space->machine, "audiocpu", ADDRESS_SPACE_PROGRAM);
memory_write_byte(sndspace, offset, data); memory_write_byte(sndspace, offset, data);
} }
@ -425,7 +425,7 @@ static WRITE8_HANDLER( sound_vol )
static void ym2203_irq(const device_config *device, int irq) static void ym2203_irq(const device_config *device, int irq)
{ {
cpu_set_input_line(device->machine->cpu[SOUND_CPU], 0, irq ? ASSERT_LINE : CLEAR_LINE ); cputag_set_input_line(device->machine, "audiocpu", 0, irq ? ASSERT_LINE : CLEAR_LINE );
} }
static WRITE8_DEVICE_HANDLER( ym2203_out_b ) static WRITE8_DEVICE_HANDLER( ym2203_out_b )

View File

@ -314,34 +314,34 @@ static INTERRUPT_GEN( looping_interrupt )
static WRITE8_HANDLER( level2_irq_set ) static WRITE8_HANDLER( level2_irq_set )
{ {
if (!(data & 1)) if (!(data & 1))
cpu_set_input_line_and_vector(space->machine->cpu[0], 0, ASSERT_LINE, 4); cputag_set_input_line_and_vector(space->machine, "maincpu", 0, ASSERT_LINE, 4);
} }
static WRITE8_HANDLER( main_irq_ack_w ) static WRITE8_HANDLER( main_irq_ack_w )
{ {
if (data == 0) if (data == 0)
cpu_set_input_line(space->machine->cpu[0], 0, CLEAR_LINE); cputag_set_input_line(space->machine, "maincpu", 0, CLEAR_LINE);
} }
static WRITE8_HANDLER( looping_souint_clr ) static WRITE8_HANDLER( looping_souint_clr )
{ {
if (data == 0) if (data == 0)
cpu_set_input_line(space->machine->cpu[1], 0, CLEAR_LINE); cputag_set_input_line(space->machine, "audiocpu", 0, CLEAR_LINE);
} }
static void looping_spcint(const device_config *device, int state) static void looping_spcint(const device_config *device, int state)
{ {
cpu_set_input_line_and_vector(device->machine->cpu[1], 0, state, 6); cputag_set_input_line_and_vector(device->machine, "audiocpu", 0, state, 6);
} }
static WRITE8_HANDLER( looping_soundlatch_w ) static WRITE8_HANDLER( looping_soundlatch_w )
{ {
soundlatch_w(space, offset, data); soundlatch_w(space, offset, data);
cpu_set_input_line_and_vector(space->machine->cpu[1], 0, ASSERT_LINE, 4); cputag_set_input_line_and_vector(space->machine, "audiocpu", 0, ASSERT_LINE, 4);
} }
@ -794,7 +794,7 @@ static DRIVER_INIT( looping )
rom[i] = BITSWAP8(rom[i], 0,1,2,3,4,5,6,7); rom[i] = BITSWAP8(rom[i], 0,1,2,3,4,5,6,7);
/* install protection handlers */ /* install protection handlers */
memory_install_read8_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM), 0x7000, 0x7007, 0, 0, protection_r); memory_install_read8_handler(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), 0x7000, 0x7007, 0, 0, protection_r);
} }
@ -808,4 +808,3 @@ static DRIVER_INIT( looping )
GAME( 1982, looping, 0, looping, looping, looping, ROT90, "Venture Line", "Looping (set 1)", GAME_IMPERFECT_SOUND | GAME_SUPPORTS_SAVE ) GAME( 1982, looping, 0, looping, looping, looping, ROT90, "Venture Line", "Looping (set 1)", GAME_IMPERFECT_SOUND | GAME_SUPPORTS_SAVE )
GAME( 1982, loopinga, looping, looping, looping, looping, ROT90, "Venture Line", "Looping (set 2)", GAME_IMPERFECT_SOUND | GAME_SUPPORTS_SAVE ) GAME( 1982, loopinga, looping, looping, looping, looping, ROT90, "Venture Line", "Looping (set 2)", GAME_IMPERFECT_SOUND | GAME_SUPPORTS_SAVE )
GAME( 1982, skybump, 0, looping, skybump, looping, ROT90, "Venture Line", "Sky Bumper", GAME_IMPERFECT_SOUND | GAME_SUPPORTS_SAVE ) GAME( 1982, skybump, 0, looping, skybump, looping, ROT90, "Venture Line", "Sky Bumper", GAME_IMPERFECT_SOUND | GAME_SUPPORTS_SAVE )

View File

@ -140,7 +140,7 @@ static WRITE16_HANDLER( lordgun_soundlatch_w )
if (ACCESSING_BITS_0_7) soundlatch_w (space, 0, (data >> 0) & 0xff); if (ACCESSING_BITS_0_7) soundlatch_w (space, 0, (data >> 0) & 0xff);
if (ACCESSING_BITS_8_15) soundlatch2_w(space, 0, (data >> 8) & 0xff); if (ACCESSING_BITS_8_15) soundlatch2_w(space, 0, (data >> 8) & 0xff);
cpu_set_input_line(space->machine->cpu[1], INPUT_LINE_NMI, PULSE_LINE); cputag_set_input_line(space->machine, "soundcpu", INPUT_LINE_NMI, PULSE_LINE);
} }
static ADDRESS_MAP_START( lordgun_map, ADDRESS_SPACE_PROGRAM, 16 ) static ADDRESS_MAP_START( lordgun_map, ADDRESS_SPACE_PROGRAM, 16 )
@ -400,7 +400,7 @@ static const ppi8255_interface ppi8255_intf[2] =
static void soundirq(const device_config *device, int state) static void soundirq(const device_config *device, int state)
{ {
cpu_set_input_line(device->machine->cpu[1], 0, state); cputag_set_input_line(device->machine, "soundcpu", 0, state);
} }
static const ym3812_interface lordgun_ym3812_interface = static const ym3812_interface lordgun_ym3812_interface =

View File

@ -529,7 +529,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 WRITE8_DEVICE_HANDLER( unk ) static WRITE8_DEVICE_HANDLER( unk )

View File

@ -14,14 +14,6 @@
#define VBEND 0 #define VBEND 0
#define VTOTAL 280 #define VTOTAL 280
enum
{
MAIN_CPU = 0,
GROUND_CPU,
OBJECT_CPU,
SOUND_CPU
};
/*----------- defined in drivers/lockon.c -----------*/ /*----------- defined in drivers/lockon.c -----------*/
extern UINT8 lockon_ctrl_reg; extern UINT8 lockon_ctrl_reg;
extern UINT32 lockon_main_inten; extern UINT32 lockon_main_inten;

View File

@ -180,7 +180,7 @@ static TIMER_CALLBACK( scanline_callback )
if (scanline == 224) irvg_vblank=1; if (scanline == 224) irvg_vblank=1;
logerror("SCANLINE CALLBACK %d\n",scanline); logerror("SCANLINE CALLBACK %d\n",scanline);
/* set the IRQ line state based on the 32V line state */ /* set the IRQ line state based on the 32V line state */
cpu_set_input_line(machine->cpu[0], M6809_IRQ_LINE, (scanline & 32) ? ASSERT_LINE : CLEAR_LINE); cputag_set_input_line(machine, "maincpu", M6809_IRQ_LINE, (scanline & 32) ? ASSERT_LINE : CLEAR_LINE);
/* set a callback for the next 32-scanline increment */ /* set a callback for the next 32-scanline increment */
scanline += 32; scanline += 32;
@ -208,8 +208,8 @@ MACHINE_RESET( irobot )
/* set an initial timer to go off on scanline 0 */ /* set an initial timer to go off on scanline 0 */
timer_set(machine, video_screen_get_time_until_pos(machine->primary_screen, 0, 0), NULL, 0, scanline_callback); timer_set(machine, video_screen_get_time_until_pos(machine->primary_screen, 0, 0), NULL, 0, scanline_callback);
irobot_rom_banksel_w(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM),0,0); irobot_rom_banksel_w(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM),0,0);
irobot_out0_w(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM),0,0); irobot_out0_w(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM),0,0);
irobot_combase = comRAM[0]; irobot_combase = comRAM[0];
irobot_combase_mb = comRAM[1]; irobot_combase_mb = comRAM[1];
irobot_outx = 0; irobot_outx = 0;
@ -457,7 +457,7 @@ static TIMER_CALLBACK( irmb_done_callback )
{ {
logerror("mb done. "); logerror("mb done. ");
irmb_running = 0; irmb_running = 0;
cpu_set_input_line(machine->cpu[0], M6809_FIRQ_LINE, ASSERT_LINE); cputag_set_input_line(machine, "maincpu", M6809_FIRQ_LINE, ASSERT_LINE);
} }
@ -861,7 +861,7 @@ default: case 0x3f: IXOR(irmb_din(curop), 0); break;
timer_adjust_oneshot(irmb_timer, attotime_mul(ATTOTIME_IN_NSEC(200), icount), 0); timer_adjust_oneshot(irmb_timer, attotime_mul(ATTOTIME_IN_NSEC(200), icount), 0);
} }
#else #else
cpu_set_input_line(machine->cpu[0], M6809_FIRQ_LINE, ASSERT_LINE); cputag_set_input_line(machine, "maincpu", M6809_FIRQ_LINE, ASSERT_LINE);
#endif #endif
irmb_running=1; irmb_running=1;
} }

View File

@ -23,7 +23,7 @@ MACHINE_RESET( jackal )
// HACK: running at the nominal clock rate, music stops working // HACK: running at the nominal clock rate, music stops working
// at the beginning of the game. This fixes it. // at the beginning of the game. This fixes it.
cpu_set_clockscale(machine->cpu[1], 1.2f); cpu_set_clockscale(cputag_get_cpu(machine, "slave"), 1.2f);
memory_set_bankptr(machine, 1,&rgn[0x4000]); memory_set_bankptr(machine, 1,&rgn[0x4000]);
jackal_rambank = rgn; jackal_rambank = rgn;

View File

@ -2108,7 +2108,7 @@ static UINT32 fantjour_dma[8];
void fantjour_dma_install(running_machine *machine) void fantjour_dma_install(running_machine *machine)
{ {
state_save_register_global_array(machine, fantjour_dma); state_save_register_global_array(machine, fantjour_dma);
memory_install_write32_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM), 0xdb0000, 0xdb001f, 0, 0, fantjour_dma_w); memory_install_write32_handler(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), 0xdb0000, 0xdb001f, 0, 0, fantjour_dma_w);
memset(fantjour_dma, 0, sizeof(fantjour_dma)); memset(fantjour_dma, 0, sizeof(fantjour_dma));
} }

View File

@ -409,7 +409,7 @@ MACHINE_RESET( leland )
memory_set_bankptr(machine, 3, &slave_base[0x10000]); memory_set_bankptr(machine, 3, &slave_base[0x10000]);
/* if we have an I80186 CPU, reset it */ /* if we have an I80186 CPU, reset it */
if (machine->cpu[2] != NULL && cpu_get_type(machine->cpu[2]) == CPU_I80186) if (cputag_get_cpu(machine, "audiocpu") != NULL && cpu_get_type(cputag_get_cpu(machine, "audiocpu")) == CPU_I80186)
leland_80186_sound_init(); leland_80186_sound_init();
} }
@ -474,7 +474,7 @@ static TIMER_CALLBACK( leland_interrupt_callback )
/* interrupts generated on the VA10 line, which is every */ /* interrupts generated on the VA10 line, which is every */
/* 16 scanlines starting with scanline #8 */ /* 16 scanlines starting with scanline #8 */
cpu_set_input_line(machine->cpu[0], 0, HOLD_LINE); cputag_set_input_line(machine, "master", 0, HOLD_LINE);
/* set a timer for the next one */ /* set a timer for the next one */
scanline += 16; scanline += 16;
@ -489,7 +489,7 @@ static TIMER_CALLBACK( ataxx_interrupt_callback )
int scanline = param; int scanline = param;
/* interrupts generated according to the interrupt control register */ /* interrupts generated according to the interrupt control register */
cpu_set_input_line(machine->cpu[0], 0, HOLD_LINE); cputag_set_input_line(machine, "master", 0, HOLD_LINE);
/* set a timer for the next one */ /* set a timer for the next one */
timer_adjust_oneshot(master_int_timer, video_screen_get_time_until_pos(machine->primary_screen, scanline, 0), scanline); timer_adjust_oneshot(master_int_timer, video_screen_get_time_until_pos(machine->primary_screen, scanline, 0), scanline);
@ -1158,13 +1158,13 @@ READ8_HANDLER( leland_master_input_r )
case 0x01: /* /GIN1 */ case 0x01: /* /GIN1 */
result = input_port_read(space->machine, "IN1"); result = input_port_read(space->machine, "IN1");
if (cpu_get_reg(space->machine->cpu[1], Z80_HALT)) if (cpu_get_reg(cputag_get_cpu(space->machine, "slave"), Z80_HALT))
result ^= 0x01; result ^= 0x01;
break; break;
case 0x02: /* /GIN2 */ case 0x02: /* /GIN2 */
case 0x12: case 0x12:
cpu_set_input_line(space->machine->cpu[0], INPUT_LINE_NMI, CLEAR_LINE); cputag_set_input_line(space->machine, "master", INPUT_LINE_NMI, CLEAR_LINE);
break; break;
case 0x03: /* /IGID */ case 0x03: /* /IGID */
@ -1195,10 +1195,10 @@ WRITE8_HANDLER( leland_master_output_w )
switch (offset) switch (offset)
{ {
case 0x09: /* /MCONT */ case 0x09: /* /MCONT */
cpu_set_input_line(space->machine->cpu[1], INPUT_LINE_RESET, (data & 0x01) ? CLEAR_LINE : ASSERT_LINE); cputag_set_input_line(space->machine, "slave", INPUT_LINE_RESET, (data & 0x01) ? CLEAR_LINE : ASSERT_LINE);
wcol_enable = (data & 0x02); wcol_enable = (data & 0x02);
cpu_set_input_line(space->machine->cpu[1], INPUT_LINE_NMI, (data & 0x04) ? CLEAR_LINE : ASSERT_LINE); cputag_set_input_line(space->machine, "slave", INPUT_LINE_NMI, (data & 0x04) ? CLEAR_LINE : ASSERT_LINE);
cpu_set_input_line(space->machine->cpu[1], 0, (data & 0x08) ? CLEAR_LINE : ASSERT_LINE); cputag_set_input_line(space->machine, "slave", 0, (data & 0x08) ? CLEAR_LINE : ASSERT_LINE);
if (LOG_EEPROM) logerror("%04X:EE write %d%d%d\n", cpu_get_pc(space->cpu), if (LOG_EEPROM) logerror("%04X:EE write %d%d%d\n", cpu_get_pc(space->cpu),
(data >> 6) & 1, (data >> 5) & 1, (data >> 4) & 1); (data >> 6) & 1, (data >> 5) & 1, (data >> 4) & 1);
@ -1238,7 +1238,7 @@ READ8_HANDLER( ataxx_master_input_r )
case 0x07: /* /SLVBLK */ case 0x07: /* /SLVBLK */
result = input_port_read(space->machine, "IN1"); result = input_port_read(space->machine, "IN1");
if (cpu_get_reg(space->machine->cpu[1], Z80_HALT)) if (cpu_get_reg(cputag_get_cpu(space->machine, "slave"), Z80_HALT))
result ^= 0x01; result ^= 0x01;
break; break;
@ -1270,9 +1270,9 @@ WRITE8_HANDLER( ataxx_master_output_w )
break; break;
case 0x05: /* /SLV0 */ case 0x05: /* /SLV0 */
cpu_set_input_line(space->machine->cpu[1], 0, (data & 0x01) ? CLEAR_LINE : ASSERT_LINE); cputag_set_input_line(space->machine, "slave", 0, (data & 0x01) ? CLEAR_LINE : ASSERT_LINE);
cpu_set_input_line(space->machine->cpu[1], INPUT_LINE_NMI, (data & 0x04) ? CLEAR_LINE : ASSERT_LINE); cputag_set_input_line(space->machine, "slave", INPUT_LINE_NMI, (data & 0x04) ? CLEAR_LINE : ASSERT_LINE);
cpu_set_input_line(space->machine->cpu[1], INPUT_LINE_RESET, (data & 0x10) ? CLEAR_LINE : ASSERT_LINE); cputag_set_input_line(space->machine, "slave", INPUT_LINE_RESET, (data & 0x10) ? CLEAR_LINE : ASSERT_LINE);
break; break;
case 0x08: /* */ case 0x08: /* */

View File

@ -68,7 +68,7 @@ WRITE8_HANDLER( lkage_68705_portB_w )
if ((ddrB & 0x02) && (~data & 0x02) && (portB_out & 0x02)) if ((ddrB & 0x02) && (~data & 0x02) && (portB_out & 0x02))
{ {
portA_in = from_main; portA_in = from_main;
if (main_sent) cpu_set_input_line(space->machine->cpu[2],0,CLEAR_LINE); if (main_sent) cputag_set_input_line(space->machine, "mcu", 0, CLEAR_LINE);
main_sent = 0; main_sent = 0;
logerror("read command %02x from main cpu\n",portA_in); logerror("read command %02x from main cpu\n",portA_in);
} }
@ -116,7 +116,7 @@ WRITE8_HANDLER( lkage_mcu_w )
logerror("%04x: mcu_w %02x\n",cpu_get_pc(space->cpu),data); logerror("%04x: mcu_w %02x\n",cpu_get_pc(space->cpu),data);
from_main = data; from_main = data;
main_sent = 1; main_sent = 1;
cpu_set_input_line(space->machine->cpu[2],0,ASSERT_LINE); cputag_set_input_line(space->machine, "mcu", 0, ASSERT_LINE);
} }
READ8_HANDLER( lkage_mcu_r ) READ8_HANDLER( lkage_mcu_r )

View File

@ -18,7 +18,7 @@ int lsasquad_sound_pending;
static TIMER_CALLBACK( nmi_callback ) static TIMER_CALLBACK( nmi_callback )
{ {
if (sound_nmi_enable) cpu_set_input_line(machine->cpu[1],INPUT_LINE_NMI,PULSE_LINE); if (sound_nmi_enable) cputag_set_input_line(machine, "audiocpu", INPUT_LINE_NMI, PULSE_LINE);
else pending_nmi = 1; else pending_nmi = 1;
} }
@ -32,7 +32,7 @@ WRITE8_HANDLER( lsasquad_sh_nmi_enable_w )
sound_nmi_enable = 1; sound_nmi_enable = 1;
if (pending_nmi) if (pending_nmi)
{ {
cpu_set_input_line(space->machine->cpu[1],INPUT_LINE_NMI,PULSE_LINE); cputag_set_input_line(space->machine, "audiocpu", INPUT_LINE_NMI, PULSE_LINE);
pending_nmi = 0; pending_nmi = 0;
} }
} }
@ -145,7 +145,7 @@ WRITE8_HANDLER( lsasquad_68705_portB_w )
if ((ddrB & 0x02) && (~data & 0x02) && (portB_out & 0x02)) if ((ddrB & 0x02) && (~data & 0x02) && (portB_out & 0x02))
{ {
portA_in = from_main; portA_in = from_main;
if (main_sent) cpu_set_input_line(space->machine->cpu[2],0,CLEAR_LINE); if (main_sent) cputag_set_input_line(space->machine, "mcu", 0, CLEAR_LINE);
main_sent = 0; main_sent = 0;
//logerror("read command %02x from main cpu\n",portA_in); //logerror("read command %02x from main cpu\n",portA_in);
} }
@ -169,7 +169,7 @@ WRITE8_HANDLER( lsasquad_mcu_w )
//logerror("%04x: mcu_w %02x\n",cpu_get_pc(space->cpu),data); //logerror("%04x: mcu_w %02x\n",cpu_get_pc(space->cpu),data);
from_main = data; from_main = data;
main_sent = 1; main_sent = 1;
cpu_set_input_line(space->machine->cpu[2],0,ASSERT_LINE); cputag_set_input_line(space->machine, "mcu", 0, ASSERT_LINE);
} }
READ8_HANDLER( lsasquad_mcu_r ) READ8_HANDLER( lsasquad_mcu_r )

View File

@ -308,13 +308,13 @@ INLINE int adjust_object_timer(running_machine *machine, int vc)
void jaguar_gpu_suspend(running_machine *machine) void jaguar_gpu_suspend(running_machine *machine)
{ {
cpu_suspend(machine->cpu[1], SUSPEND_REASON_SPIN, 1); cputag_suspend(machine, "gpu", SUSPEND_REASON_SPIN, 1);
} }
void jaguar_gpu_resume(running_machine *machine) void jaguar_gpu_resume(running_machine *machine)
{ {
cpu_resume(machine->cpu[1], SUSPEND_REASON_SPIN); cputag_resume(machine, "gpu", SUSPEND_REASON_SPIN);
} }
@ -328,9 +328,9 @@ void jaguar_gpu_resume(running_machine *machine)
static void update_cpu_irq(running_machine *machine) static void update_cpu_irq(running_machine *machine)
{ {
if (cpu_irq_state & gpu_regs[INT1] & 0x1f) if (cpu_irq_state & gpu_regs[INT1] & 0x1f)
cpu_set_input_line(machine->cpu[0], cojag_is_r3000 ? R3000_IRQ4 : M68K_IRQ_6, ASSERT_LINE); cputag_set_input_line(machine, "maincpu", cojag_is_r3000 ? R3000_IRQ4 : M68K_IRQ_6, ASSERT_LINE);
else else
cpu_set_input_line(machine->cpu[0], cojag_is_r3000 ? R3000_IRQ4 : M68K_IRQ_6, CLEAR_LINE); cputag_set_input_line(machine, "maincpu", cojag_is_r3000 ? R3000_IRQ4 : M68K_IRQ_6, CLEAR_LINE);
} }
@ -479,7 +479,7 @@ static void jaguar_set_palette(UINT16 vmode)
static UINT8 *get_jaguar_memory(running_machine *machine, UINT32 offset) static UINT8 *get_jaguar_memory(running_machine *machine, UINT32 offset)
{ {
const address_space *space = cpu_get_address_space(machine->cpu[1], ADDRESS_SPACE_PROGRAM); const address_space *space = cputag_get_address_space(machine, "gpu", ADDRESS_SPACE_PROGRAM);
return (UINT8 *)memory_get_read_ptr(space, offset); return (UINT8 *)memory_get_read_ptr(space, offset);
} }

View File

@ -287,7 +287,7 @@ VIDEO_UPDATE( madgear )
VIDEO_EOF( lastduel ) VIDEO_EOF( lastduel )
{ {
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);
/* Spriteram is always 1 frame ahead, suggesting buffering. I can't find /* Spriteram is always 1 frame ahead, suggesting buffering. I can't find
a register to control this so I assume it happens automatically a register to control this so I assume it happens automatically

View File

@ -313,7 +313,7 @@ WRITE8_HANDLER( leland_master_video_addr_w )
static TIMER_CALLBACK( leland_delayed_mvram_w ) static TIMER_CALLBACK( leland_delayed_mvram_w )
{ {
const address_space *space = cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM); const address_space *space = cputag_get_address_space(machine, "master", ADDRESS_SPACE_PROGRAM);
int num = (param >> 16) & 1; int num = (param >> 16) & 1;
int offset = (param >> 8) & 0xff; int offset = (param >> 8) & 0xff;

View File

@ -108,7 +108,7 @@ VIDEO_START( lethalj )
static TIMER_CALLBACK( gen_ext1_int ) static TIMER_CALLBACK( gen_ext1_int )
{ {
cpu_set_input_line(machine->cpu[0], 0, ASSERT_LINE); cputag_set_input_line(machine, "maincpu", 0, ASSERT_LINE);
} }
@ -170,7 +170,7 @@ WRITE16_HANDLER( lethalj_blitter_w )
/* clear the IRQ on offset 0 */ /* clear the IRQ on offset 0 */
else if (offset == 0) else if (offset == 0)
cpu_set_input_line(space->machine->cpu[0], 0, CLEAR_LINE); cputag_set_input_line(space->machine, "maincpu", 0, CLEAR_LINE);
} }

View File

@ -12,106 +12,111 @@
#include "driver.h" #include "driver.h"
#include "cpu/m6502/m6502.h" #include "cpu/m6502/m6502.h"
static int background_color,background_disable; static int background_color, background_disable;
static tilemap *background_tilemap, *fix_tilemap; static tilemap *background_tilemap, *fix_tilemap;
static UINT8 deco16_io_ram[16]; static UINT8 deco16_io_ram[16];
#if 0 #if 0
void debug_print(bitmap_t *bitmap) void debug_print(bitmap_t *bitmap)
{ {
int i,j; int i, j;
char buf[20*16]; char buf[20 * 16];
char *bufptr = buf; char *bufptr = buf;
for (i = 0;i < 16;i+=2) for (i = 0; i < 16; i += 2)
bufptr += sprintf(bufptr,"%04X",deco16_io_ram[i+1]|(deco16_io_ram[i]<<8)); bufptr += sprintf(bufptr, "%04X", deco16_io_ram[i + 1] | (deco16_io_ram[i] << 8));
ui_draw_text(buf, 10, 6*6); ui_draw_text(buf, 10, 6 * 6);
} }
#endif #endif
static TILEMAP_MAPPER( back_scan ) static TILEMAP_MAPPER( back_scan )
{ {
/* logical (col,row) -> memory offset */ /* logical (col,row) -> memory offset */
return ((row & 0xf)) + ((15-(col &0xf))<<4) + ((row&0x10)<<5) + ((col&0x10)<<4); return ((row & 0xf)) + ((15 - (col & 0xf)) << 4) + ((row & 0x10) << 5) + ((col & 0x10) << 4);
} }
static TILEMAP_MAPPER( fix_scan ) static TILEMAP_MAPPER( fix_scan )
{ {
/* logical (col,row) -> memory offset */ /* logical (col,row) -> memory offset */
return (row & 0x1f) + ((31-(col &0x1f))<<5); return (row & 0x1f) + ((31 - (col & 0x1f)) << 5);
} }
static TILE_GET_INFO( get_back_tile_info ) static TILE_GET_INFO( get_back_tile_info )
{ {
const UINT8 *RAM = memory_region(machine, "user1"); const UINT8 *RAM = memory_region(machine, "user1");
int tile,bank; int tile, bank;
/* Convert tile index of 512x512 to paged format */ /* Convert tile index of 512x512 to paged format */
if (tile_index&0x100) { if (tile_index & 0x100)
if (tile_index&0x200) {
tile_index=(tile_index&0xff)+(deco16_io_ram[5]<<8); /* Bottom right */ if (tile_index & 0x200)
tile_index = (tile_index & 0xff) + (deco16_io_ram[5] << 8); /* Bottom right */
else else
tile_index=(tile_index&0xff)+(deco16_io_ram[4]<<8); /* Bottom left */ tile_index = (tile_index & 0xff) + (deco16_io_ram[4] << 8); /* Bottom left */
} else { }
if (tile_index&0x200) else
tile_index=(tile_index&0xff)+(deco16_io_ram[3]<<8); /* Top right */ {
if (tile_index & 0x200)
tile_index = (tile_index & 0xff) + (deco16_io_ram[3] << 8); /* Top right */
else else
tile_index=(tile_index&0xff)+(deco16_io_ram[2]<<8); /* Top left */ tile_index = (tile_index & 0xff) + (deco16_io_ram[2] << 8); /* Top left */
} }
tile=RAM[tile_index]; tile = RAM[tile_index];
if (tile>0x7f) bank=3; else bank=2; if (tile > 0x7f) bank = 3; else bank = 2;
SET_TILE_INFO(bank,tile&0x7f,background_color,0); SET_TILE_INFO(bank, tile & 0x7f, background_color, 0);
} }
static TILE_GET_INFO( get_fix_tile_info ) static TILE_GET_INFO( get_fix_tile_info )
{ {
int tile,color; int tile, color;
tile=videoram[tile_index+0x400]+((videoram[tile_index]&0x7)<<8); tile = videoram[tile_index + 0x400] + ((videoram[tile_index] & 0x7) << 8);
color=(videoram[tile_index]&0x70)>>4; color = (videoram[tile_index] & 0x70) >> 4;
//if (tile&0x300) tile-=0x000; //if (tile & 0x300) tile -= 0x000;
//else if(tile&0x200) tile-=0x100; //else if(tile & 0x200) tile -= 0x100;
//else if (tile&0x100) tile-=0x100; //else if (tile & 0x100) tile -= 0x100;
//else tile+=0x200; //else tile += 0x200;
SET_TILE_INFO(0,tile,color,0); SET_TILE_INFO(0, tile, color, 0);
} }
/***************************************************************************/ /***************************************************************************/
WRITE8_HANDLER( deco16_io_w ) WRITE8_HANDLER( deco16_io_w )
{ {
deco16_io_ram[offset]=data; deco16_io_ram[offset] = data;
if (offset>1 && offset<6) if (offset > 1 && offset < 6)
tilemap_mark_all_tiles_dirty(background_tilemap); tilemap_mark_all_tiles_dirty(background_tilemap);
switch (offset) { switch (offset)
{
case 6: /* Background colour */ case 6: /* Background colour */
if (((data>>4)&3)!=background_color) { if (((data >> 4) & 3) != background_color)
background_color=(data>>4)&3; {
background_color = (data >> 4) & 3;
tilemap_mark_all_tiles_dirty(background_tilemap); tilemap_mark_all_tiles_dirty(background_tilemap);
} }
background_disable=data&0x4; background_disable = data & 0x4;
flip_screen_set(space->machine, data&0x1); flip_screen_set(space->machine, data & 0x1);
break; break;
case 7: /* Background palette resistors? */ case 7: /* Background palette resistors? */
/* Todo */ /* Todo */
break; break;
case 8: /* Irq ack */ case 8: /* Irq ack */
cpu_set_input_line(space->machine->cpu[0],DECO16_IRQ_LINE,CLEAR_LINE); cputag_set_input_line(space->machine, "maincpu", DECO16_IRQ_LINE, CLEAR_LINE);
break; break;
case 9: /* Sound */ case 9: /* Sound */
soundlatch_w(space,0,data); soundlatch_w(space, 0, data);
cpu_set_input_line(space->machine->cpu[1],M6502_IRQ_LINE,HOLD_LINE); cputag_set_input_line(space->machine, "audiocpu", M6502_IRQ_LINE, HOLD_LINE);
break; break;
} }
} }
WRITE8_HANDLER( liberate_videoram_w ) WRITE8_HANDLER( liberate_videoram_w )
{ {
videoram[offset]=data; videoram[offset] = data;
tilemap_mark_tile_dirty(fix_tilemap,offset&0x3ff); tilemap_mark_tile_dirty(fix_tilemap, offset & 0x3ff);
} }
/***************************************************************************/ /***************************************************************************/
@ -214,7 +219,8 @@ static void liberate_draw_sprites(running_machine *machine, bitmap_t *bitmap, co
if (multi && fy==0) sy-=16; if (multi && fy==0) sy-=16;
if (flip_screen_get(machine)) { if (flip_screen_get(machine))
{
sy=240-sy; sy=240-sy;
sx=240-sx; sx=240-sx;
if (fy) if (fy)
@ -224,7 +230,8 @@ static void liberate_draw_sprites(running_machine *machine, bitmap_t *bitmap, co
if (fx) fx=0; else fx=1; if (fx) fx=0; else fx=1;
if (fy) fy=0; else fy=1; if (fy) fy=0; else fy=1;
} }
else { else
{
if (fy) if (fy)
sy2=sy-16; sy2=sy-16;
else else
@ -275,14 +282,16 @@ static void prosport_draw_sprites(running_machine *machine, bitmap_t *bitmap, co
// if (multi) sy-=16; // if (multi) sy-=16;
if (fy && multi) { code2=code; code++; } if (fy && multi) { code2=code; code++; }
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;
if (fy) fy=0; else fy=1; if (fy) fy=0; else fy=1;
sy2=sy-16; sy2=sy-16;
} }
else { else
{
sy2=sy+16; sy2=sy+16;
} }
@ -331,14 +340,16 @@ static void boomrang_draw_sprites(running_machine *machine, bitmap_t *bitmap, co
// if (multi) sy-=16; // if (multi) sy-=16;
if (fy && multi) { code2=code; code++; } if (fy && multi) { code2=code; code++; }
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;
if (fy) fy=0; else fy=1; if (fy) fy=0; else fy=1;
sy2=sy-16; sy2=sy-16;
} }
else { else
{
sy2=sy+16; sy2=sy+16;
} }
@ -382,7 +393,8 @@ VIDEO_UPDATE( prosport )
prosport_draw_sprites(screen->machine,bitmap,cliprect); prosport_draw_sprites(screen->machine,bitmap,cliprect);
for (offs = 0;offs < 0x400;offs++) { for (offs = 0;offs < 0x400;offs++)
{
tile=videoram[offs+0x400]+((videoram[offs]&0x3)<<8); tile=videoram[offs+0x400]+((videoram[offs]&0x3)<<8);
tile+=((deco16_io_ram[0]&0x30)<<6); tile+=((deco16_io_ram[0]&0x30)<<6);

View File

@ -115,7 +115,7 @@ WRITE16_HANDLER( lockon_crtc_w )
static TIMER_CALLBACK( cursor_callback ) static TIMER_CALLBACK( cursor_callback )
{ {
if (lockon_main_inten) if (lockon_main_inten)
cpu_set_input_line_and_vector(machine->cpu[MAIN_CPU], 0, HOLD_LINE, 0xff); cputag_set_input_line_and_vector(machine, "maincpu", 0, HOLD_LINE, 0xff);
timer_adjust_oneshot(cursor_timer, video_screen_get_time_until_pos(machine->primary_screen, CURSOR_YPOS, CURSOR_XPOS), 0); timer_adjust_oneshot(cursor_timer, video_screen_get_time_until_pos(machine->primary_screen, CURSOR_YPOS, CURSOR_XPOS), 0);
} }
@ -329,8 +329,8 @@ WRITE16_HANDLER( lockon_ground_ctrl_w )
static TIMER_CALLBACK( bufend_callback ) static TIMER_CALLBACK( bufend_callback )
{ {
cpu_set_input_line_and_vector(machine->cpu[GROUND_CPU], 0, HOLD_LINE, 0xff); cputag_set_input_line_and_vector(machine, "ground", 0, HOLD_LINE, 0xff);
cpu_set_input_line(machine->cpu[OBJECT_CPU], NEC_INPUT_LINE_POLL, ASSERT_LINE); cputag_set_input_line(machine, "object", NEC_INPUT_LINE_POLL, ASSERT_LINE);
} }
/* Get data for a each 8x8x3 ground tile */ /* Get data for a each 8x8x3 ground tile */
@ -658,7 +658,7 @@ WRITE16_HANDLER( lockon_tza112_w )
READ16_HANDLER( lockon_obj_4000_r ) READ16_HANDLER( lockon_obj_4000_r )
{ {
cpu_set_input_line(space->machine->cpu[OBJECT_CPU], NEC_INPUT_LINE_POLL, CLEAR_LINE); cputag_set_input_line(space->machine, "object", NEC_INPUT_LINE_POLL, CLEAR_LINE);
return 0xffff; return 0xffff;
} }

View File

@ -289,7 +289,7 @@ VIDEO_UPDATE( trojan )
VIDEO_EOF( lwings ) VIDEO_EOF( lwings )
{ {
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);
} }