Again, number-to-tag conversions in CPU calls

This commit is contained in:
Fabio Priuli 2009-04-27 14:20:12 +00:00
parent fc59ddc7a0
commit 74551d702d
51 changed files with 329 additions and 349 deletions

View File

@ -44,7 +44,6 @@
#define PSG_CLOCK (3579545 / 3) /* Hz */ #define PSG_CLOCK (3579545 / 3) /* Hz */
#define CPU_MUSIC_ID (1) /* music CPU id number */
/* output port 0x01 definitions - sound effect drive outputs */ /* output port 0x01 definitions - sound effect drive outputs */
@ -237,7 +236,7 @@ WRITE8_HANDLER( carnival_audio_2_w )
if ( bitsGoneHigh & OUT_PORT_2_MUSIC_RESET ) if ( bitsGoneHigh & OUT_PORT_2_MUSIC_RESET )
/* reset output is no longer asserted active low */ /* reset output is no longer asserted active low */
cpu_set_input_line(space->machine->cpu[CPU_MUSIC_ID], INPUT_LINE_RESET, PULSE_LINE ); cputag_set_input_line(space->machine, "audiocpu", INPUT_LINE_RESET, PULSE_LINE );
} }

View File

@ -33,7 +33,7 @@ WRITE8_HANDLER( cchasm_soundlatch4_w )
{ {
sound_flags |= 0x40; sound_flags |= 0x40;
soundlatch4_w(space, offset, data); soundlatch4_w(space, offset, data);
cpu_set_input_line(space->machine->cpu[0], 1, HOLD_LINE); cputag_set_input_line(space->machine, "maincpu", 1, HOLD_LINE);
} }
WRITE16_HANDLER( cchasm_io_w ) WRITE16_HANDLER( cchasm_io_w )
@ -52,7 +52,7 @@ WRITE16_HANDLER( cchasm_io_w )
sound_flags |= 0x80; sound_flags |= 0x80;
soundlatch2_w (space, offset, data); soundlatch2_w (space, offset, data);
z80ctc_trg2_w (ctc, 0, 1); z80ctc_trg2_w (ctc, 0, 1);
cpu_set_input_line(space->machine->cpu[1], INPUT_LINE_NMI, PULSE_LINE); cputag_set_input_line(space->machine, "audiocpu", INPUT_LINE_NMI, PULSE_LINE);
break; break;
case 2: case 2:
led = data; led = data;
@ -86,7 +86,7 @@ static int output[2];
static void ctc_interrupt (const device_config *device, int state) static void ctc_interrupt (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 WRITE8_DEVICE_HANDLER( ctc_timer_1_w ) static WRITE8_DEVICE_HANDLER( ctc_timer_1_w )

View File

@ -118,7 +118,7 @@ static WRITE16_HANDLER( cabal_sound_irq_trigger_word_w )
static WRITE16_HANDLER( cabalbl_sound_irq_trigger_word_w ) static WRITE16_HANDLER( cabalbl_sound_irq_trigger_word_w )
{ {
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 );
} }
@ -464,7 +464,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 ym2151_interface cabalbl_ym2151_interface = static const ym2151_interface cabalbl_ym2151_interface =

View File

@ -215,7 +215,7 @@ static WRITE8_HANDLER(at_page8_w)
static DMA8237_MEM_READ( pc_dma_read_byte ) static DMA8237_MEM_READ( pc_dma_read_byte )
{ {
const address_space *space = cpu_get_address_space(device->machine->cpu[0], ADDRESS_SPACE_PROGRAM); const address_space *space = cputag_get_address_space(device->machine, "maincpu", ADDRESS_SPACE_PROGRAM);
offs_t page_offset = (((offs_t) dma_offset[0][channel]) << 16) offs_t page_offset = (((offs_t) dma_offset[0][channel]) << 16)
& 0xFF0000; & 0xFF0000;
@ -225,7 +225,7 @@ static DMA8237_MEM_READ( pc_dma_read_byte )
static DMA8237_MEM_WRITE( pc_dma_write_byte ) static DMA8237_MEM_WRITE( pc_dma_write_byte )
{ {
const address_space *space = cpu_get_address_space(device->machine->cpu[0], ADDRESS_SPACE_PROGRAM); const address_space *space = cputag_get_address_space(device->machine, "maincpu", ADDRESS_SPACE_PROGRAM);
offs_t page_offset = (((offs_t) dma_offset[0][channel]) << 16) offs_t page_offset = (((offs_t) dma_offset[0][channel]) << 16)
& 0xFF0000; & 0xFF0000;
@ -546,7 +546,7 @@ static IRQ_CALLBACK(irq_callback)
static MACHINE_START(calchase) static MACHINE_START(calchase)
{ {
cpu_set_irq_callback(machine->cpu[0], irq_callback); cpu_set_irq_callback(cputag_get_cpu(machine, "maincpu"), irq_callback);
calchase_devices.pit8254 = devtag_get_device( machine, "pit8254" ); calchase_devices.pit8254 = devtag_get_device( machine, "pit8254" );
calchase_devices.pic8259_1 = devtag_get_device( machine, "pic8259_1" ); calchase_devices.pic8259_1 = devtag_get_device( machine, "pic8259_1" );
@ -562,7 +562,7 @@ static MACHINE_START(calchase)
*************************************************************/ *************************************************************/
static PIC8259_SET_INT_LINE( calchase_pic8259_1_set_int_line ) { static PIC8259_SET_INT_LINE( calchase_pic8259_1_set_int_line ) {
cpu_set_input_line(device->machine->cpu[0], 0, interrupt ? HOLD_LINE : CLEAR_LINE); cputag_set_input_line(device->machine, "maincpu", 0, interrupt ? HOLD_LINE : CLEAR_LINE);
} }
@ -615,7 +615,7 @@ static MACHINE_RESET(calchase)
static void set_gate_a20(running_machine *machine, int a20) static void set_gate_a20(running_machine *machine, int a20)
{ {
cpu_set_input_line(machine->cpu[0], INPUT_LINE_A20, a20); cputag_set_input_line(machine, "maincpu", INPUT_LINE_A20, a20);
} }
static void keyboard_interrupt(running_machine *machine, int state) static void keyboard_interrupt(running_machine *machine, int state)

View File

@ -191,7 +191,7 @@ static WRITE8_HANDLER( track_reset_w )
static WRITE8_HANDLER( capbowl_sndcmd_w ) static WRITE8_HANDLER( capbowl_sndcmd_w )
{ {
cpu_set_input_line(space->machine->cpu[1], M6809_IRQ_LINE, HOLD_LINE); cputag_set_input_line(space->machine, "audiocpu", M6809_IRQ_LINE, HOLD_LINE);
soundlatch_w(space, offset, data); soundlatch_w(space, offset, data);
} }
@ -206,7 +206,7 @@ static WRITE8_HANDLER( capbowl_sndcmd_w )
static void firqhandler(const device_config *device, int irq) static void firqhandler(const device_config *device, int irq)
{ {
cpu_set_input_line(device->machine->cpu[1], 1, irq ? ASSERT_LINE : CLEAR_LINE); cputag_set_input_line(device->machine, "audiocpu", 1, irq ? ASSERT_LINE : CLEAR_LINE);
} }

View File

@ -99,9 +99,9 @@ static UINT8 agallet_vblank_irq;
static void update_irq_state(running_machine *machine) static void update_irq_state(running_machine *machine)
{ {
if (vblank_irq || sound_irq || unknown_irq) if (vblank_irq || sound_irq || unknown_irq)
cpu_set_input_line(machine->cpu[0], irq_level, ASSERT_LINE); cputag_set_input_line(machine, "maincpu", irq_level, ASSERT_LINE);
else else
cpu_set_input_line(machine->cpu[0], irq_level, CLEAR_LINE); cputag_set_input_line(machine, "maincpu", irq_level, CLEAR_LINE);
} }
static TIMER_CALLBACK( cave_vblank_start ) static TIMER_CALLBACK( cave_vblank_start )
@ -223,7 +223,7 @@ static WRITE16_HANDLER( sound_cmd_w )
// sound_flag1 = 1; // sound_flag1 = 1;
// sound_flag2 = 1; // sound_flag2 = 1;
soundlatch_word_w(space,offset,data,mem_mask); soundlatch_word_w(space,offset,data,mem_mask);
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);
cpu_spinuntil_time(space->cpu, ATTOTIME_IN_USEC(50)); // Allow the other cpu to reply cpu_spinuntil_time(space->cpu, ATTOTIME_IN_USEC(50)); // Allow the other cpu to reply
} }
@ -1681,7 +1681,7 @@ static const ymz280b_interface ymz280b_intf =
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 ym2151_interface ym2151_config = static const ym2151_interface ym2151_config =
@ -3828,7 +3828,7 @@ static DRIVER_INIT( agallet )
unpack_sprites(machine); unpack_sprites(machine);
// Speed Hack // Speed Hack
memory_install_read16_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM), 0xb80000, 0xb80001, 0, 0, agallet_irq_cause_r); memory_install_read16_handler(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), 0xb80000, 0xb80001, 0, 0, agallet_irq_cause_r);
} }
static DRIVER_INIT( dfeveron ) static DRIVER_INIT( dfeveron )

View File

@ -39,17 +39,18 @@ static UINT16 prot;
static WRITE16_HANDLER( twocrude_control_w ) static WRITE16_HANDLER( twocrude_control_w )
{ {
switch (offset<<1) { switch (offset << 1)
{
case 0: /* DMA flag */ case 0: /* DMA flag */
buffer_spriteram16_w(space,0,0,0xffff); buffer_spriteram16_w(space, 0, 0, 0xffff);
return; return;
case 6: /* IRQ ack */ case 6: /* IRQ ack */
return; return;
case 2: /* Sound CPU write */ case 2: /* Sound CPU write */
soundlatch_w(space,0,data & 0xff); soundlatch_w(space, 0, data & 0xff);
cpu_set_input_line(space->machine->cpu[1],0,HOLD_LINE); cputag_set_input_line(space->machine, "audiocpu", 0, HOLD_LINE);
return; return;
case 4: /* Protection, maybe this is a PAL on the board? case 4: /* Protection, maybe this is a PAL on the board?
@ -69,22 +70,22 @@ static WRITE16_HANDLER( twocrude_control_w )
protection?! protection?!
*/ */
if ((data&0xffff)==0x9a00) prot=0; if ((data & 0xffff) == 0x9a00) prot = 0;
if ((data&0xffff)==0xaa) prot=0x74; if ((data & 0xffff) == 0xaa) prot = 0x74;
if ((data&0xffff)==0x0200) prot=0x63<<8; if ((data & 0xffff) == 0x0200) prot = 0x63 << 8;
if ((data&0xffff)==0x9a) prot=0xe; if ((data & 0xffff) == 0x9a) prot = 0xe;
if ((data&0xffff)==0x55) prot=0x1e; if ((data & 0xffff) == 0x55) prot = 0x1e;
if ((data&0xffff)==0x0e) {prot=0x0e;twocrude_pri_w(0);} /* start */ if ((data & 0xffff) == 0x0e) {prot = 0x0e; twocrude_pri_w(0);} /* start */
if ((data&0xffff)==0x00) {prot=0x0e;twocrude_pri_w(0);} /* level 0 */ if ((data & 0xffff) == 0x00) {prot = 0x0e; twocrude_pri_w(0);} /* level 0 */
if ((data&0xffff)==0xf1) {prot=0x36;twocrude_pri_w(1);} /* level 1 */ if ((data & 0xffff) == 0xf1) {prot = 0x36; twocrude_pri_w(1);} /* level 1 */
if ((data&0xffff)==0x80) {prot=0x2e;twocrude_pri_w(1);} /* level 2 */ if ((data & 0xffff) == 0x80) {prot = 0x2e; twocrude_pri_w(1);} /* level 2 */
if ((data&0xffff)==0x40) {prot=0x1e;twocrude_pri_w(1);} /* level 3 */ if ((data & 0xffff) == 0x40) {prot = 0x1e; twocrude_pri_w(1);} /* level 3 */
if ((data&0xffff)==0xc0) {prot=0x3e;twocrude_pri_w(0);} /* level 4 */ if ((data & 0xffff) == 0xc0) {prot = 0x3e; twocrude_pri_w(0);} /* level 4 */
if ((data&0xffff)==0xff) {prot=0x76;twocrude_pri_w(1);} /* level 5 */ if ((data & 0xffff) == 0xff) {prot = 0x76; twocrude_pri_w(1);} /* level 5 */
break; break;
} }
logerror("Warning %04x- %02x written to control %02x\n",cpu_get_pc(space->cpu),data,offset); logerror("Warning %04x- %02x written to control %02x\n", cpu_get_pc(space->cpu), data, offset);
} }
static READ16_HANDLER( twocrude_control_r ) static READ16_HANDLER( twocrude_control_r )
@ -272,7 +273,7 @@ GFXDECODE_END
static void sound_irq(const device_config *device, int state) static void sound_irq(const device_config *device, int state)
{ {
cpu_set_input_line(device->machine->cpu[1],1,state); /* IRQ 2 */ cputag_set_input_line(device->machine, "audiocpu", 1, state); /* IRQ 2 */
} }
static const ym2151_interface ym2151_config = static const ym2151_interface ym2151_config =

View File

@ -174,7 +174,7 @@ static TIMER_CALLBACK( clock_irq )
/* assert the IRQ if not already asserted */ /* assert the IRQ if not already asserted */
if (!irq_state) if (!irq_state)
{ {
cpu_set_input_line(machine->cpu[0], 0, ASSERT_LINE); cputag_set_input_line(machine, "maincpu", 0, ASSERT_LINE);
irq_state = 1; irq_state = 1;
} }
@ -249,7 +249,7 @@ static MACHINE_START( ccastles )
static MACHINE_RESET( ccastles ) static MACHINE_RESET( ccastles )
{ {
cpu_set_input_line(machine->cpu[0], 0, CLEAR_LINE); cputag_set_input_line(machine, "maincpu", 0, CLEAR_LINE);
irq_state = 0; irq_state = 0;
} }
@ -265,7 +265,7 @@ static WRITE8_HANDLER( irq_ack_w )
{ {
if (irq_state) if (irq_state)
{ {
cpu_set_input_line(space->machine->cpu[0], 0, CLEAR_LINE); cputag_set_input_line(space->machine, "maincpu", 0, CLEAR_LINE);
irq_state = 0; irq_state = 0;
} }
} }

View File

@ -68,7 +68,7 @@ ADDRESS_MAP_END
static void cchasm_6840_irq(running_machine *machine, int state) static void cchasm_6840_irq(running_machine *machine, int state)
{ {
cpu_set_input_line(machine->cpu[0], 4, state?ASSERT_LINE:CLEAR_LINE); cputag_set_input_line(machine, "maincpu", 4, state ? ASSERT_LINE : CLEAR_LINE);
} }
static const ptm6840_interface cchasm_6840_intf = static const ptm6840_interface cchasm_6840_intf =
{ {

View File

@ -211,7 +211,7 @@ static UINT8 toprollr_rombank;
static WRITE8_HANDLER( swimmer_sh_soundlatch_w ) static WRITE8_HANDLER( swimmer_sh_soundlatch_w )
{ {
soundlatch_w(space,offset,data); soundlatch_w(space,offset,data);
cpu_set_input_line_and_vector(space->machine->cpu[1],0,HOLD_LINE,0xff); cputag_set_input_line_and_vector(space->machine, "audiocpu", 0, HOLD_LINE, 0xff);
} }
@ -248,7 +248,7 @@ static WRITE8_HANDLER(toprollr_rombank_w)
static TIMER_CALLBACK( disable_interrupts ) static TIMER_CALLBACK( disable_interrupts )
{ {
cpu_interrupt_enable(machine->cpu[0],0); cpu_interrupt_enable(cputag_get_cpu(machine, "maincpu"), 0);
} }

View File

@ -446,7 +446,7 @@ static TIMER_DEVICE_CALLBACK( generate_interrupt )
/* IRQ is clocked on the rising edge of 16V, equal to the previous 32V */ /* IRQ is clocked on the rising edge of 16V, equal to the previous 32V */
if (scanline & 16) if (scanline & 16)
cpu_set_input_line(timer->machine->cpu[0], 0, ((scanline - 1) & 32) ? ASSERT_LINE : CLEAR_LINE); cputag_set_input_line(timer->machine, "maincpu", 0, ((scanline - 1) & 32) ? ASSERT_LINE : CLEAR_LINE);
/* do a partial update now to handle sprite multiplexing (Maze Invaders) */ /* do a partial update now to handle sprite multiplexing (Maze Invaders) */
video_screen_update_partial(timer->machine->primary_screen, scanline); video_screen_update_partial(timer->machine->primary_screen, scanline);
@ -463,7 +463,7 @@ static MACHINE_START( centiped )
static MACHINE_RESET( centiped ) static MACHINE_RESET( centiped )
{ {
cpu_set_input_line(machine->cpu[0], 0, CLEAR_LINE); cputag_set_input_line(machine, "maincpu", 0, CLEAR_LINE);
dsw_select = 0; dsw_select = 0;
control_select = 0; control_select = 0;
} }
@ -480,7 +480,7 @@ static MACHINE_RESET( magworm )
static WRITE8_HANDLER( irq_ack_w ) static WRITE8_HANDLER( irq_ack_w )
{ {
cpu_set_input_line(space->machine->cpu[0], 0, CLEAR_LINE); cputag_set_input_line(space->machine, "maincpu", 0, CLEAR_LINE);
} }
@ -1976,7 +1976,7 @@ ROM_END
static DRIVER_INIT( caterplr ) static DRIVER_INIT( caterplr )
{ {
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);
const device_config *device = devtag_get_device(machine, "pokey"); const device_config *device = devtag_get_device(machine, "pokey");
memory_install_readwrite8_device_handler(space, device, 0x1000, 0x100f, 0, 0, caterplr_AY8910_r, caterplr_AY8910_w); memory_install_readwrite8_device_handler(space, device, 0x1000, 0x100f, 0, 0, caterplr_AY8910_r, caterplr_AY8910_w);
memory_install_read8_device_handler(space, device, 0x1780, 0x1780, 0, 0, caterplr_rand_r); memory_install_read8_device_handler(space, device, 0x1780, 0x1780, 0, 0, caterplr_rand_r);
@ -1985,7 +1985,7 @@ static DRIVER_INIT( caterplr )
static DRIVER_INIT( magworm ) static DRIVER_INIT( magworm )
{ {
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);
const device_config *device = devtag_get_device(machine, "pokey"); const device_config *device = devtag_get_device(machine, "pokey");
memory_install_write8_device_handler(space, device, 0x1001, 0x1001, 0, 0, ay8910_address_w); memory_install_write8_device_handler(space, device, 0x1001, 0x1001, 0, 0, ay8910_address_w);
memory_install_readwrite8_device_handler(space, device, 0x1003, 0x1003, 0, 0, ay8910_r, ay8910_data_w); memory_install_readwrite8_device_handler(space, device, 0x1003, 0x1003, 0, 0, ay8910_r, ay8910_data_w);

View File

@ -213,7 +213,7 @@ static PALETTE_INIT( cham24 )
static void ppu_irq( const device_config *device, int *ppu_regs ) static void ppu_irq( const device_config *device, int *ppu_regs )
{ {
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 );
} }
/* our ppu interface */ /* our ppu interface */

View File

@ -130,15 +130,15 @@ static WRITE8_HANDLER( irq_enable_w )
{ {
int bit = data & 1; int bit = data & 1;
cpu_interrupt_enable(space->machine->cpu[0],bit); cpu_interrupt_enable(cputag_get_cpu(space->machine, "maincpu"), bit);
if (!bit) if (!bit)
cpu_set_input_line(space->machine->cpu[0], 0, CLEAR_LINE); cputag_set_input_line(space->machine, "maincpu", 0, CLEAR_LINE);
} }
static TIMER_CALLBACK( exctsccr_fm_callback ) static TIMER_CALLBACK( exctsccr_fm_callback )
{ {
cpu_set_input_line_and_vector(machine->cpu[1], 0, HOLD_LINE, 0xff ); cputag_set_input_line_and_vector(machine, "audiocpu", 0, HOLD_LINE, 0xff);
} }
static MACHINE_START( exctsccr ) static MACHINE_START( exctsccr )

View File

@ -312,7 +312,7 @@ static WRITE8_DEVICE_HANDLER(chanbara_ay_out_1_w)
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[0],0,linestate); cputag_set_input_line(device->machine, "maincpu", 0, linestate);
} }

View File

@ -451,10 +451,10 @@ static INTERRUPT_GEN( chl_interrupt )
cpu_set_input_line_and_vector(device, 0, HOLD_LINE, vector); cpu_set_input_line_and_vector(device, 0, HOLD_LINE, vector);
/* it seems the V8 == Vblank and it is connected to the INT on the 68705 */ /* it seems the V8 == Vblank and it is connected to the INT on the 68705 */
//so we should cause an INT on the cpu 1 here, as well. //so we should cause an INT on the MCU cpu here, as well.
//but only once per frame ! //but only once per frame !
if (vector == 0xdf) /* only on vblank */ if (vector == 0xdf) /* only on vblank */
generic_pulse_irq_line(device->machine->cpu[1], 0); generic_pulse_irq_line(cputag_get_cpu(device->machine, "mcu"), 0);
} }

View File

@ -27,7 +27,7 @@ static INPUT_CHANGED( coin_inserted )
{ {
/* this starts a 556 one-shot timer (and triggers a sound effect) */ /* this starts a 556 one-shot timer (and triggers a sound effect) */
if (newval) if (newval)
cpu_set_input_line(field->port->machine->cpu[0], INPUT_LINE_NMI, PULSE_LINE); cputag_set_input_line(field->port->machine, "maincpu", INPUT_LINE_NMI, PULSE_LINE);
} }

View File

@ -150,13 +150,13 @@ static TIMER_DEVICE_CALLBACK( chinagat_scanline )
/* on the rising edge of VBLK (vcount == F8), signal an NMI */ /* on the rising edge of VBLK (vcount == F8), signal an NMI */
if (vcount == 0xf8) if (vcount == 0xf8)
{ {
cpu_set_input_line(timer->machine->cpu[0], INPUT_LINE_NMI, ASSERT_LINE); cputag_set_input_line(timer->machine, "maincpu", INPUT_LINE_NMI, ASSERT_LINE);
} }
/* set 1ms signal on rising edge of vcount & 8 */ /* set 1ms signal on rising edge of vcount & 8 */
if (!(vcount_old & 8) && (vcount & 8)) if (!(vcount_old & 8) && (vcount & 8))
{ {
cpu_set_input_line(timer->machine->cpu[0], M6809_FIRQ_LINE, ASSERT_LINE); cputag_set_input_line(timer->machine, "maincpu", M6809_FIRQ_LINE, ASSERT_LINE);
} }
/* adjust for next scanline */ /* adjust for next scanline */
@ -172,23 +172,23 @@ static WRITE8_HANDLER( chinagat_interrupt_w )
{ {
case 0: /* 3e00 - SND irq */ case 0: /* 3e00 - SND irq */
soundlatch_w( space, 0, data ); soundlatch_w( space, 0, data );
cpu_set_input_line(space->machine->cpu[2], sound_irq, (sound_irq == INPUT_LINE_NMI) ? PULSE_LINE : HOLD_LINE ); cputag_set_input_line(space->machine, "audiocpu", sound_irq, (sound_irq == INPUT_LINE_NMI) ? PULSE_LINE : HOLD_LINE );
break; break;
case 1: /* 3e01 - NMI ack */ case 1: /* 3e01 - NMI ack */
cpu_set_input_line(space->machine->cpu[0], INPUT_LINE_NMI, CLEAR_LINE); cputag_set_input_line(space->machine, "maincpu", INPUT_LINE_NMI, CLEAR_LINE);
break; break;
case 2: /* 3e02 - FIRQ ack */ case 2: /* 3e02 - FIRQ ack */
cpu_set_input_line(space->machine->cpu[0], M6809_FIRQ_LINE, CLEAR_LINE); cputag_set_input_line(space->machine, "maincpu", M6809_FIRQ_LINE, CLEAR_LINE);
break; break;
case 3: /* 3e03 - IRQ ack */ case 3: /* 3e03 - IRQ ack */
cpu_set_input_line(space->machine->cpu[0], M6809_IRQ_LINE, CLEAR_LINE); cputag_set_input_line(space->machine, "maincpu", M6809_IRQ_LINE, CLEAR_LINE);
break; break;
case 4: /* 3e04 - sub CPU IRQ ack */ case 4: /* 3e04 - sub CPU IRQ ack */
cpu_set_input_line(space->machine->cpu[1], sprite_irq, (sprite_irq == INPUT_LINE_NMI) ? PULSE_LINE : HOLD_LINE ); cputag_set_input_line(space->machine, "sub", sprite_irq, (sprite_irq == INPUT_LINE_NMI) ? PULSE_LINE : HOLD_LINE );
break; break;
} }
} }
@ -225,7 +225,7 @@ static READ8_HANDLER( saiyugb1_mcu_command_r )
#if 0 #if 0
if (saiyugb1_mcu_command == 0x78) if (saiyugb1_mcu_command == 0x78)
{ {
cpu_suspend(space->machine->cpu[3], SUSPEND_REASON_HALT, 1); /* Suspend (speed up) */ cputag_suspend(space->machine, "mcu", SUSPEND_REASON_HALT, 1); /* Suspend (speed up) */
} }
#endif #endif
return saiyugb1_mcu_command; return saiyugb1_mcu_command;
@ -237,7 +237,7 @@ static WRITE8_HANDLER( saiyugb1_mcu_command_w )
#if 0 #if 0
if (data != 0x78) if (data != 0x78)
{ {
cpu_resume(space->machine->cpu[3], SUSPEND_REASON_HALT); /* Wake up */ cputag_resume(space->machine, "mcu", SUSPEND_REASON_HALT); /* Wake up */
} }
#endif #endif
} }
@ -520,7 +520,7 @@ GFXDECODE_END
static void chinagat_irq_handler(const device_config *device, int irq) static void chinagat_irq_handler(const device_config *device, int irq)
{ {
cpu_set_input_line(device->machine->cpu[2], 0, irq ? ASSERT_LINE : CLEAR_LINE ); cputag_set_input_line(device->machine, "audiocpu", 0, irq ? ASSERT_LINE : CLEAR_LINE );
} }
static const ym2151_interface ym2151_config = static const ym2151_interface ym2151_config =

View File

@ -140,7 +140,7 @@ static READ8_HANDLER( analog_read_r )
static WRITE8_HANDLER( chqflag_sh_irqtrigger_w ) static WRITE8_HANDLER( chqflag_sh_irqtrigger_w )
{ {
cpu_set_input_line(space->machine->cpu[1],0,HOLD_LINE); cputag_set_input_line(space->machine, "audiocpu", 0, HOLD_LINE);
} }
@ -289,7 +289,7 @@ INPUT_PORTS_END
static void chqflag_ym2151_irq_w(const device_config *device, int data) static void chqflag_ym2151_irq_w(const device_config *device, int data)
{ {
cpu_set_input_line(device->machine->cpu[1],INPUT_LINE_NMI,PULSE_LINE); cputag_set_input_line(device->machine, "audiocpu", INPUT_LINE_NMI, PULSE_LINE);
} }

View File

@ -280,7 +280,7 @@ static READ8_HANDLER( qb3_frame_r )
static WRITE8_HANDLER( qb3_ram_bank_w ) static WRITE8_HANDLER( qb3_ram_bank_w )
{ {
memory_set_bank(space->machine, 1, cpu_get_reg(space->machine->cpu[0], CCPU_P) & 3); memory_set_bank(space->machine, 1, cpu_get_reg(cputag_get_cpu(space->machine, "maincpu"), CCPU_P) & 3);
} }
@ -1437,34 +1437,34 @@ ROM_END
static DRIVER_INIT( speedfrk ) static DRIVER_INIT( speedfrk )
{ {
memory_install_read8_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_IO), 0x00, 0x03, 0, 0, speedfrk_wheel_r); memory_install_read8_handler(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_IO), 0x00, 0x03, 0, 0, speedfrk_wheel_r);
memory_install_read8_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_IO), 0x04, 0x06, 0, 0, speedfrk_gear_r); memory_install_read8_handler(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_IO), 0x04, 0x06, 0, 0, speedfrk_gear_r);
} }
static DRIVER_INIT( sundance ) static DRIVER_INIT( sundance )
{ {
memory_install_read8_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_IO), 0x00, 0x0f, 0, 0, sundance_inputs_r); memory_install_read8_handler(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_IO), 0x00, 0x0f, 0, 0, sundance_inputs_r);
} }
static DRIVER_INIT( tailg ) static DRIVER_INIT( tailg )
{ {
memory_install_write8_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_IO), 0x07, 0x07, 0, 0, mux_select_w); memory_install_write8_handler(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_IO), 0x07, 0x07, 0, 0, mux_select_w);
} }
static DRIVER_INIT( boxingb ) static DRIVER_INIT( boxingb )
{ {
memory_install_read8_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_IO), 0x0c, 0x0f, 0, 0, boxingb_dial_r); memory_install_read8_handler(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_IO), 0x0c, 0x0f, 0, 0, boxingb_dial_r);
memory_install_write8_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_IO), 0x07, 0x07, 0, 0, mux_select_w); memory_install_write8_handler(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_IO), 0x07, 0x07, 0, 0, mux_select_w);
} }
static DRIVER_INIT( qb3 ) static DRIVER_INIT( qb3 )
{ {
memory_install_read8_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_IO), 0x0f, 0x0f, 0, 0, qb3_frame_r); memory_install_read8_handler(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_IO), 0x0f, 0x0f, 0, 0, qb3_frame_r);
memory_install_write8_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_IO), 0x00, 0x00, 0, 0, qb3_ram_bank_w); memory_install_write8_handler(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_IO), 0x00, 0x00, 0, 0, qb3_ram_bank_w);
memory_configure_bank(machine, 1, 0, 4, rambase, 0x100*2); memory_configure_bank(machine, 1, 0, 4, rambase, 0x100*2);
} }

View File

@ -104,7 +104,7 @@ static READ8_HANDLER( circusc_sh_timer_r )
static WRITE8_HANDLER( circusc_sh_irqtrigger_w ) static WRITE8_HANDLER( circusc_sh_irqtrigger_w )
{ {
cpu_set_input_line_and_vector(space->machine->cpu[1],0,HOLD_LINE,0xff); cputag_set_input_line_and_vector(space->machine, "audiocpu", 0, HOLD_LINE, 0xff);
} }
static WRITE8_HANDLER( circusc_coin_counter_w ) static WRITE8_HANDLER( circusc_coin_counter_w )

View File

@ -2520,7 +2520,7 @@ ROM_END
static DRIVER_INIT( wildplt ) static DRIVER_INIT( wildplt )
{ {
memory_install_read16_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM), 0x080000, 0x087fff, 0, 0, wildplt_vregs_r ); memory_install_read16_handler(cputag_get_address_space(machine, "cpu1", ADDRESS_SPACE_PROGRAM), 0x080000, 0x087fff, 0, 0, wildplt_vregs_r );
DRIVER_INIT_CALL(f1gpstar); DRIVER_INIT_CALL(f1gpstar);
} }

View File

@ -137,7 +137,7 @@ static WRITE8_HANDLER( cliff_coin_counter_w )
static READ8_HANDLER( cliff_irq_ack_r ) static READ8_HANDLER( cliff_irq_ack_r )
{ {
/* deassert IRQ on the CPU */ /* deassert IRQ on the CPU */
cpu_set_input_line(space->machine->cpu[0], 0, CLEAR_LINE); cputag_set_input_line(space->machine, "maincpu", 0, CLEAR_LINE);
return 0x00; return 0x00;
} }
@ -197,14 +197,14 @@ static TIMER_CALLBACK( cliff_irq_callback )
/* if we have a valid code, trigger an IRQ */ /* if we have a valid code, trigger an IRQ */
if ( phillips_code & 0x800000 ) if ( phillips_code & 0x800000 )
cpu_set_input_line(machine->cpu[0], 0, ASSERT_LINE); cputag_set_input_line(machine, "maincpu", 0, ASSERT_LINE);
timer_adjust_oneshot(irq_timer, video_screen_get_time_until_pos(machine->primary_screen, param, 0), param); timer_adjust_oneshot(irq_timer, video_screen_get_time_until_pos(machine->primary_screen, param, 0), param);
} }
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], INPUT_LINE_NMI, state ? ASSERT_LINE : CLEAR_LINE ); cputag_set_input_line(machine, "maincpu", INPUT_LINE_NMI, state ? ASSERT_LINE : CLEAR_LINE );
} }

View File

@ -144,12 +144,12 @@ static WRITE8_HANDLER( cloak_custom_w )
static WRITE8_HANDLER( cloak_irq_reset_0_w ) static WRITE8_HANDLER( cloak_irq_reset_0_w )
{ {
cpu_set_input_line(space->machine->cpu[0], 0, CLEAR_LINE); cputag_set_input_line(space->machine, "maincpu", 0, CLEAR_LINE);
} }
static WRITE8_HANDLER( cloak_irq_reset_1_w ) static WRITE8_HANDLER( cloak_irq_reset_1_w )
{ {
cpu_set_input_line(space->machine->cpu[1], 0, CLEAR_LINE); cputag_set_input_line(space->machine, "slave", 0, CLEAR_LINE);
} }
static WRITE8_HANDLER( cloak_nvram_enable_w ) static WRITE8_HANDLER( cloak_nvram_enable_w )

View File

@ -141,7 +141,7 @@ static TIMER_CALLBACK( clock_irq )
/* assert the IRQ if not already asserted */ /* assert the IRQ if not already asserted */
if (!irq_state) if (!irq_state)
{ {
cpu_set_input_line(machine->cpu[0], 0, ASSERT_LINE); cputag_set_input_line(machine, "maincpu", 0, ASSERT_LINE);
irq_state = 1; irq_state = 1;
} }
@ -212,7 +212,7 @@ static MACHINE_START( cloud9 )
static MACHINE_RESET( cloud9 ) static MACHINE_RESET( cloud9 )
{ {
cpu_set_input_line(machine->cpu[0], 0, CLEAR_LINE); cputag_set_input_line(machine, "maincpu", 0, CLEAR_LINE);
irq_state = 0; irq_state = 0;
} }
@ -228,7 +228,7 @@ static WRITE8_HANDLER( irq_ack_w )
{ {
if (irq_state) if (irq_state)
{ {
cpu_set_input_line(space->machine->cpu[0], 0, CLEAR_LINE); cputag_set_input_line(space->machine, "maincpu", 0, CLEAR_LINE);
irq_state = 0; irq_state = 0;
} }
} }

View File

@ -61,13 +61,13 @@ static UINT16 *cninja_ram;
static WRITE16_HANDLER( cninja_sound_w ) static WRITE16_HANDLER( cninja_sound_w )
{ {
soundlatch_w(space,0,data&0xff); soundlatch_w(space,0,data&0xff);
cpu_set_input_line(space->machine->cpu[1],0,HOLD_LINE); cputag_set_input_line(space->machine, "audiocpu", 0, HOLD_LINE);
} }
static WRITE16_HANDLER( stoneage_sound_w ) static WRITE16_HANDLER( stoneage_sound_w )
{ {
soundlatch_w(space,0,data&0xff); soundlatch_w(space,0,data&0xff);
cpu_set_input_line(space->machine->cpu[1],INPUT_LINE_NMI,PULSE_LINE); cputag_set_input_line(space->machine, "audiocpu", INPUT_LINE_NMI, PULSE_LINE);
} }
static TIMER_CALLBACK( interrupt_gen ) static TIMER_CALLBACK( interrupt_gen )
@ -75,18 +75,18 @@ static TIMER_CALLBACK( interrupt_gen )
int scanline = param; int scanline = param;
/* Save state of scroll registers before the IRQ */ /* Save state of scroll registers before the IRQ */
deco16_raster_display_list[deco16_raster_display_position++]=scanline; deco16_raster_display_list[deco16_raster_display_position++] = scanline;
deco16_raster_display_list[deco16_raster_display_position++]=deco16_pf12_control[1]&0xffff; deco16_raster_display_list[deco16_raster_display_position++] = deco16_pf12_control[1] & 0xffff;
deco16_raster_display_list[deco16_raster_display_position++]=deco16_pf12_control[2]&0xffff; deco16_raster_display_list[deco16_raster_display_position++] = deco16_pf12_control[2] & 0xffff;
deco16_raster_display_list[deco16_raster_display_position++]=deco16_pf12_control[3]&0xffff; deco16_raster_display_list[deco16_raster_display_position++] = deco16_pf12_control[3] & 0xffff;
deco16_raster_display_list[deco16_raster_display_position++]=deco16_pf12_control[4]&0xffff; deco16_raster_display_list[deco16_raster_display_position++] = deco16_pf12_control[4] & 0xffff;
deco16_raster_display_list[deco16_raster_display_position++]=deco16_pf34_control[1]&0xffff; deco16_raster_display_list[deco16_raster_display_position++] = deco16_pf34_control[1] & 0xffff;
deco16_raster_display_list[deco16_raster_display_position++]=deco16_pf34_control[2]&0xffff; deco16_raster_display_list[deco16_raster_display_position++] = deco16_pf34_control[2] & 0xffff;
deco16_raster_display_list[deco16_raster_display_position++]=deco16_pf34_control[3]&0xffff; deco16_raster_display_list[deco16_raster_display_position++] = deco16_pf34_control[3] & 0xffff;
deco16_raster_display_list[deco16_raster_display_position++]=deco16_pf34_control[4]&0xffff; deco16_raster_display_list[deco16_raster_display_position++] = deco16_pf34_control[4] & 0xffff;
cpu_set_input_line(machine->cpu[0], (cninja_irq_mask&0x10) ? 3 : 4, ASSERT_LINE); cputag_set_input_line(machine, "maincpu", (cninja_irq_mask&0x10) ? 3 : 4, ASSERT_LINE);
timer_adjust_oneshot(raster_irq_timer,attotime_never,0); timer_adjust_oneshot(raster_irq_timer, attotime_never, 0);
} }
static READ16_HANDLER( cninja_irq_r ) static READ16_HANDLER( cninja_irq_r )
@ -97,8 +97,8 @@ static READ16_HANDLER( cninja_irq_r )
return cninja_scanline; return cninja_scanline;
case 2: /* Raster IRQ ACK - value read is not used */ case 2: /* Raster IRQ ACK - value read is not used */
cpu_set_input_line(space->machine->cpu[0], 3, CLEAR_LINE); cputag_set_input_line(space->machine, "maincpu", 3, CLEAR_LINE);
cpu_set_input_line(space->machine->cpu[0], 4, CLEAR_LINE); cputag_set_input_line(space->machine, "maincpu", 4, CLEAR_LINE);
return 0; return 0;
} }
@ -661,12 +661,12 @@ static MACHINE_RESET( cninja )
static void sound_irq(const device_config *device, int state) static void sound_irq(const device_config *device, int state)
{ {
cpu_set_input_line(device->machine->cpu[1],1,state); /* IRQ 2 */ cputag_set_input_line(device->machine, "audiocpu", 1, state); /* IRQ 2 */
} }
static void sound_irq2(const device_config *device, int state) static void sound_irq2(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 WRITE8_DEVICE_HANDLER( sound_bankswitch_w ) static WRITE8_DEVICE_HANDLER( sound_bankswitch_w )
@ -1681,13 +1681,13 @@ static void cninja_patch(running_machine *machine)
static DRIVER_INIT( cninja ) static DRIVER_INIT( cninja )
{ {
memory_install_write16_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM), 0x1bc0a8, 0x1bc0a9, 0, 0, cninja_sound_w); memory_install_write16_handler(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), 0x1bc0a8, 0x1bc0a9, 0, 0, cninja_sound_w);
cninja_patch(machine); cninja_patch(machine);
} }
static DRIVER_INIT( stoneage ) static DRIVER_INIT( stoneage )
{ {
memory_install_write16_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM), 0x1bc0a8, 0x1bc0a9, 0, 0, stoneage_sound_w); memory_install_write16_handler(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), 0x1bc0a8, 0x1bc0a9, 0, 0, stoneage_sound_w);
} }
static DRIVER_INIT( mutantf ) static DRIVER_INIT( mutantf )

View File

@ -386,42 +386,42 @@ static WRITE8_HANDLER( cntsteer_background_w )
static WRITE8_HANDLER( gekitsui_sub_irq_ack ) static WRITE8_HANDLER( gekitsui_sub_irq_ack )
{ {
cpu_set_input_line(space->machine->cpu[1], M6809_IRQ_LINE, CLEAR_LINE); cputag_set_input_line(space->machine, "sub", M6809_IRQ_LINE, CLEAR_LINE);
} }
static WRITE8_HANDLER( cntsteer_sound_w ) static WRITE8_HANDLER( cntsteer_sound_w )
{ {
soundlatch_w(space,0,data); soundlatch_w(space,0,data);
cpu_set_input_line(space->machine->cpu[2], 0, HOLD_LINE); cputag_set_input_line(space->machine, "audiocpu", 0, HOLD_LINE);
} }
static WRITE8_HANDLER( zerotrgt_ctrl_w ) static WRITE8_HANDLER( zerotrgt_ctrl_w )
{ {
/*TODO: check this.*/ /*TODO: check this.*/
logerror("CTRL: %04x: %04x: %04x\n",cpu_get_pc(space->cpu),offset,data); logerror("CTRL: %04x: %04x: %04x\n",cpu_get_pc(space->cpu),offset,data);
// if (offset==0) cpu_set_input_line(space->machine->cpu[1], INPUT_LINE_RESET, ASSERT_LINE); // if (offset==0) cputag_set_input_line(space->machine, "audiocpu", INPUT_LINE_RESET, ASSERT_LINE);
// Wrong - bits 0 & 1 used on this // Wrong - bits 0 & 1 used on this
if (offset==1) cpu_set_input_line(space->machine->cpu[1], M6809_IRQ_LINE, ASSERT_LINE); if (offset==1) cputag_set_input_line(space->machine, "audiocpu", M6809_IRQ_LINE, ASSERT_LINE);
// if (offset==2) cpu_set_input_line(space->machine->cpu[1], INPUT_LINE_RESET, CLEAR_LINE); // if (offset==2) cputag_set_input_line(space->machine, "audiocpu", INPUT_LINE_RESET, CLEAR_LINE);
} }
static WRITE8_HANDLER( cntsteer_sub_irq_w ) static WRITE8_HANDLER( cntsteer_sub_irq_w )
{ {
cpu_set_input_line(space->machine->cpu[1], M6809_IRQ_LINE, ASSERT_LINE); cputag_set_input_line(space->machine, "audiocpu", M6809_IRQ_LINE, ASSERT_LINE);
// printf("%02x IRQ\n",data); // printf("%02x IRQ\n",data);
} }
static WRITE8_HANDLER( cntsteer_sub_nmi_w ) static WRITE8_HANDLER( cntsteer_sub_nmi_w )
{ {
// if(data) // if(data)
// cpu_set_input_line(space->machine->cpu[1], INPUT_LINE_NMI, PULSE_LINE); // cputag_set_input_line(space->machine, "audiocpu", INPUT_LINE_NMI, PULSE_LINE);
// popmessage("%02x",data); // popmessage("%02x",data);
} }
static WRITE8_HANDLER( cntsteer_main_irq_w ) static WRITE8_HANDLER( cntsteer_main_irq_w )
{ {
cpu_set_input_line(space->machine->cpu[0], M6809_IRQ_LINE, HOLD_LINE); cputag_set_input_line(space->machine, "maincpu", M6809_IRQ_LINE, HOLD_LINE);
} }
/* Convert weird input handling with MAME standards.*/ /* Convert weird input handling with MAME standards.*/
@ -588,7 +588,7 @@ INPUT_PORTS_END
static INPUT_CHANGED( coin_inserted ) static INPUT_CHANGED( coin_inserted )
{ {
cpu_set_input_line(field->port->machine->cpu[1], INPUT_LINE_NMI, newval ? CLEAR_LINE : PULSE_LINE); cputag_set_input_line(field->port->machine, "audiocpu", INPUT_LINE_NMI, newval ? CLEAR_LINE : PULSE_LINE);
} }
static INPUT_PORTS_START( cntsteer ) static INPUT_PORTS_START( cntsteer )

View File

@ -369,8 +369,8 @@ static MACHINE_RESET( cojag )
jaguar_dsp_resume(machine); jaguar_dsp_resume(machine);
/* halt the CPUs */ /* halt the CPUs */
jaguargpu_ctrl_w(machine->cpu[1], G_CTRL, 0, 0xffffffff); jaguargpu_ctrl_w(cputag_get_cpu(machine, "gpu"), G_CTRL, 0, 0xffffffff);
jaguardsp_ctrl_w(machine->cpu[2], D_CTRL, 0, 0xffffffff); jaguardsp_ctrl_w(cputag_get_cpu(machine, "audiocpu"), D_CTRL, 0, 0xffffffff);
/* init the sound system */ /* init the sound system */
cojag_sound_reset(machine); cojag_sound_reset(machine);
@ -419,8 +419,8 @@ static WRITE32_HANDLER( misc_control_w )
jaguar_dsp_resume(space->machine); jaguar_dsp_resume(space->machine);
/* halt the CPUs */ /* halt the CPUs */
jaguargpu_ctrl_w(space->machine->cpu[1], G_CTRL, 0, 0xffffffff); jaguargpu_ctrl_w(cputag_get_cpu(space->machine, "gpu"), G_CTRL, 0, 0xffffffff);
jaguardsp_ctrl_w(space->machine->cpu[2], D_CTRL, 0, 0xffffffff); jaguardsp_ctrl_w(cputag_get_cpu(space->machine, "audiocpu"), D_CTRL, 0, 0xffffffff);
} }
/* adjust banking */ /* adjust banking */
@ -443,13 +443,13 @@ static WRITE32_HANDLER( misc_control_w )
static READ32_HANDLER( gpuctrl_r ) static READ32_HANDLER( gpuctrl_r )
{ {
return jaguargpu_ctrl_r(space->machine->cpu[1], offset); return jaguargpu_ctrl_r(cputag_get_cpu(space->machine, "gpu"), offset);
} }
static WRITE32_HANDLER( gpuctrl_w ) static WRITE32_HANDLER( gpuctrl_w )
{ {
jaguargpu_ctrl_w(space->machine->cpu[1], offset, data, mem_mask); jaguargpu_ctrl_w(cputag_get_cpu(space->machine, "gpu"), offset, data, mem_mask);
} }
@ -462,13 +462,13 @@ static WRITE32_HANDLER( gpuctrl_w )
static READ32_HANDLER( dspctrl_r ) static READ32_HANDLER( dspctrl_r )
{ {
return jaguardsp_ctrl_r(space->machine->cpu[2], offset); return jaguardsp_ctrl_r(cputag_get_cpu(space->machine, "audiocpu"), offset);
} }
static WRITE32_HANDLER( dspctrl_w ) static WRITE32_HANDLER( dspctrl_w )
{ {
jaguardsp_ctrl_w(space->machine->cpu[2], offset, data, mem_mask); jaguardsp_ctrl_w(cputag_get_cpu(space->machine, "audiocpu"), offset, data, mem_mask);
} }
@ -1505,14 +1505,14 @@ ROM_END
static void cojag_common_init(running_machine *machine, UINT16 gpu_jump_offs, UINT16 spin_pc) static void cojag_common_init(running_machine *machine, UINT16 gpu_jump_offs, UINT16 spin_pc)
{ {
/* copy over the ROM */ /* copy over the ROM */
cojag_is_r3000 = (cpu_get_type(machine->cpu[0]) == CPU_R3041BE); cojag_is_r3000 = (cpu_get_type(cputag_get_cpu(machine, "maincpu")) == CPU_R3041BE);
/* install synchronization hooks for GPU */ /* install synchronization hooks for GPU */
if (cojag_is_r3000) if (cojag_is_r3000)
memory_install_write32_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM), 0x04f0b000 + gpu_jump_offs, 0x04f0b003 + gpu_jump_offs, 0, 0, gpu_jump_w); memory_install_write32_handler(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), 0x04f0b000 + gpu_jump_offs, 0x04f0b003 + gpu_jump_offs, 0, 0, gpu_jump_w);
else else
memory_install_write32_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM), 0xf0b000 + gpu_jump_offs, 0xf0b003 + gpu_jump_offs, 0, 0, gpu_jump_w); memory_install_write32_handler(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), 0xf0b000 + gpu_jump_offs, 0xf0b003 + gpu_jump_offs, 0, 0, gpu_jump_w);
memory_install_read32_handler(cpu_get_address_space(machine->cpu[1], ADDRESS_SPACE_PROGRAM), 0xf03000 + gpu_jump_offs, 0xf03003 + gpu_jump_offs, 0, 0, gpu_jump_r); memory_install_read32_handler(cputag_get_address_space(machine, "gpu", ADDRESS_SPACE_PROGRAM), 0xf03000 + gpu_jump_offs, 0xf03003 + gpu_jump_offs, 0, 0, gpu_jump_r);
gpu_jump_address = &jaguar_gpu_ram[gpu_jump_offs/4]; gpu_jump_address = &jaguar_gpu_ram[gpu_jump_offs/4];
gpu_spin_pc = 0xf03000 + spin_pc; gpu_spin_pc = 0xf03000 + spin_pc;
@ -1527,7 +1527,7 @@ static DRIVER_INIT( area51a )
#if ENABLE_SPEEDUP_HACKS #if ENABLE_SPEEDUP_HACKS
/* install speedup for main CPU */ /* install speedup for main CPU */
main_speedup = memory_install_write32_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM), 0xa02030, 0xa02033, 0, 0, area51_main_speedup_w); main_speedup = memory_install_write32_handler(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), 0xa02030, 0xa02033, 0, 0, area51_main_speedup_w);
#endif #endif
} }
@ -1539,7 +1539,7 @@ static DRIVER_INIT( area51 )
#if ENABLE_SPEEDUP_HACKS #if ENABLE_SPEEDUP_HACKS
/* install speedup for main CPU */ /* install speedup for main CPU */
main_speedup_max_cycles = 120; main_speedup_max_cycles = 120;
main_speedup = memory_install_read32_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM), 0x100062e8, 0x100062eb, 0, 0, cojagr3k_main_speedup_r); main_speedup = memory_install_read32_handler(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), 0x100062e8, 0x100062eb, 0, 0, cojagr3k_main_speedup_r);
#endif #endif
} }
@ -1553,7 +1553,7 @@ static DRIVER_INIT( maxforce )
#if ENABLE_SPEEDUP_HACKS #if ENABLE_SPEEDUP_HACKS
/* install speedup for main CPU */ /* install speedup for main CPU */
main_speedup_max_cycles = 120; main_speedup_max_cycles = 120;
main_speedup = memory_install_read32_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM), 0x1000865c, 0x1000865f, 0, 0, cojagr3k_main_speedup_r); main_speedup = memory_install_read32_handler(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), 0x1000865c, 0x1000865f, 0, 0, cojagr3k_main_speedup_r);
#endif #endif
} }
@ -1567,7 +1567,7 @@ static DRIVER_INIT( area51mx )
#if ENABLE_SPEEDUP_HACKS #if ENABLE_SPEEDUP_HACKS
/* install speedup for main CPU */ /* install speedup for main CPU */
main_speedup = memory_install_write32_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM), 0xa19550, 0xa19557, 0, 0, area51mx_main_speedup_w); main_speedup = memory_install_write32_handler(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), 0xa19550, 0xa19557, 0, 0, area51mx_main_speedup_w);
#endif #endif
} }
@ -1582,7 +1582,7 @@ static DRIVER_INIT( a51mxr3k )
#if ENABLE_SPEEDUP_HACKS #if ENABLE_SPEEDUP_HACKS
/* install speedup for main CPU */ /* install speedup for main CPU */
main_speedup_max_cycles = 120; main_speedup_max_cycles = 120;
main_speedup = memory_install_read32_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM), 0x10006f0c, 0x10006f0f, 0, 0, cojagr3k_main_speedup_r); main_speedup = memory_install_read32_handler(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), 0x10006f0c, 0x10006f0f, 0, 0, cojagr3k_main_speedup_r);
#endif #endif
} }
@ -1594,7 +1594,7 @@ static DRIVER_INIT( fishfren )
#if ENABLE_SPEEDUP_HACKS #if ENABLE_SPEEDUP_HACKS
/* install speedup for main CPU */ /* install speedup for main CPU */
main_speedup_max_cycles = 200; main_speedup_max_cycles = 200;
main_speedup = memory_install_read32_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM), 0x10021b60, 0x10021b63, 0, 0, cojagr3k_main_speedup_r); main_speedup = memory_install_read32_handler(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), 0x10021b60, 0x10021b63, 0, 0, cojagr3k_main_speedup_r);
#endif #endif
} }
@ -1607,8 +1607,8 @@ static void init_freeze_common(running_machine *machine, offs_t main_speedup_add
/* install speedup for main CPU */ /* install speedup for main CPU */
main_speedup_max_cycles = 200; main_speedup_max_cycles = 200;
if (main_speedup_addr != 0) if (main_speedup_addr != 0)
main_speedup = memory_install_read32_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM), main_speedup_addr, main_speedup_addr + 3, 0, 0, cojagr3k_main_speedup_r); main_speedup = memory_install_read32_handler(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), main_speedup_addr, main_speedup_addr + 3, 0, 0, cojagr3k_main_speedup_r);
main_gpu_wait = memory_install_read32_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM), 0x0400d900, 0x0400d900 + 3, 0, 0, main_gpu_wait_r); main_gpu_wait = memory_install_read32_handler(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), 0x0400d900, 0x0400d900 + 3, 0, 0, main_gpu_wait_r);
#endif #endif
} }
@ -1627,7 +1627,7 @@ static DRIVER_INIT( vcircle )
#if ENABLE_SPEEDUP_HACKS #if ENABLE_SPEEDUP_HACKS
/* install speedup for main CPU */ /* install speedup for main CPU */
main_speedup_max_cycles = 50; main_speedup_max_cycles = 50;
main_speedup = memory_install_read32_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM), 0x12005b34, 0x12005b37, 0, 0, cojagr3k_main_speedup_r); main_speedup = memory_install_read32_handler(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), 0x12005b34, 0x12005b37, 0, 0, cojagr3k_main_speedup_r);
#endif #endif
} }

View File

@ -219,7 +219,7 @@ static WRITE8_HANDLER( protection_clock_w )
static WRITE8_HANDLER( combasc_sh_irqtrigger_w ) static WRITE8_HANDLER( combasc_sh_irqtrigger_w )
{ {
cpu_set_input_line_and_vector(space->machine->cpu[1],0,HOLD_LINE,0xff); cputag_set_input_line_and_vector(space->machine, "audiocpu", 0, HOLD_LINE, 0xff);
} }
static READ8_DEVICE_HANDLER( combasc_busy_r ) static READ8_DEVICE_HANDLER( combasc_busy_r )
@ -249,12 +249,12 @@ static READ8_DEVICE_HANDLER ( combasc_ym2203_r )
static int boost = 1; static int boost = 1;
int status = ym2203_r(device,offset); int status = ym2203_r(device,offset);
if (cpu_get_pc(device->machine->cpu[1]) == 0x334) if (cpu_get_pc(cputag_get_cpu(device->machine, "audiocpu")) == 0x334)
{ {
if (boost) if (boost)
{ {
boost = 0; boost = 0;
timer_adjust_periodic(combasc_interleave_timer, attotime_zero, 0, cpu_clocks_to_attotime(device->machine->cpu[1],80)); timer_adjust_periodic(combasc_interleave_timer, attotime_zero, 0, cputag_clocks_to_attotime(device->machine, "audiocpu", 80));
} }
else if (status & 2) else if (status & 2)
{ {
@ -801,7 +801,7 @@ static DRIVER_INIT( combasct )
static DRIVER_INIT( combasc ) static DRIVER_INIT( combasc )
{ {
/* joystick instead of trackball */ /* joystick instead of trackball */
memory_install_read_port_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM), 0x0404, 0x0404, 0, 0, "IN1"); memory_install_read_port_handler(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), 0x0404, 0x0404, 0, 0, "IN1");
combasc_init_common(machine); combasc_init_common(machine);
} }

View File

@ -181,7 +181,7 @@ GFXDECODE_END
static void sound_irq(const device_config *device, int linestate) static void sound_irq(const device_config *device, int linestate)
{ {
cpu_set_input_line(device->machine->cpu[0],0,linestate); cputag_set_input_line(device->machine, "maincpu", 0, linestate);
} }
static const ym2203_interface ym2203_config = static const ym2203_interface ym2203_config =

View File

@ -53,7 +53,7 @@ static WRITE8_HANDLER( contra_bankswitch_w )
static WRITE8_HANDLER( contra_sh_irqtrigger_w ) static WRITE8_HANDLER( contra_sh_irqtrigger_w )
{ {
cpu_set_input_line(space->machine->cpu[1],M6809_IRQ_LINE,HOLD_LINE); cputag_set_input_line(space->machine, "audiocpu", M6809_IRQ_LINE, HOLD_LINE);
} }
static WRITE8_HANDLER( contra_coin_counter_w ) static WRITE8_HANDLER( contra_coin_counter_w )

View File

@ -220,7 +220,7 @@ static WRITE16_HANDLER( amerdart_misc_w )
coin_counter_w(0, ~data & 0x0001); coin_counter_w(0, ~data & 0x0001);
coin_counter_w(1, ~data & 0x0002); coin_counter_w(1, ~data & 0x0002);
cpu_set_input_line(space->machine->cpu[1], INPUT_LINE_RESET, (data & 0x0400) ? ASSERT_LINE : CLEAR_LINE); cputag_set_input_line(space->machine, "dsp", INPUT_LINE_RESET, (data & 0x0400) ? ASSERT_LINE : CLEAR_LINE);
/* bits 10-15 are counted down over time */ /* bits 10-15 are counted down over time */
if (data & 0x0400) amerdart_iop_echo = 1; if (data & 0x0400) amerdart_iop_echo = 1;
@ -233,7 +233,7 @@ static TIMER_CALLBACK( amerdart_iop_response )
iop_answer = iop_cmd; iop_answer = iop_cmd;
if (amerdart_iop_echo && iop_cmd != 0x19) if (amerdart_iop_echo && iop_cmd != 0x19)
{ {
cpu_set_input_line(machine->cpu[0], 1, ASSERT_LINE); cputag_set_input_line(machine, "maincpu", 1, ASSERT_LINE);
return; return;
} }
amerdart_iop_echo = 0; amerdart_iop_echo = 0;
@ -271,7 +271,7 @@ static TIMER_CALLBACK( amerdart_iop_response )
break; break;
} }
cpu_set_input_line(machine->cpu[0], 1, ASSERT_LINE); cputag_set_input_line(machine, "maincpu", 1, ASSERT_LINE);
} }
@ -297,7 +297,7 @@ static WRITE16_HANDLER( coolpool_misc_w )
coin_counter_w(0, ~data & 0x0001); coin_counter_w(0, ~data & 0x0001);
coin_counter_w(1, ~data & 0x0002); coin_counter_w(1, ~data & 0x0002);
cpu_set_input_line(space->machine->cpu[1], INPUT_LINE_RESET, (data & 0x0400) ? ASSERT_LINE : CLEAR_LINE); cputag_set_input_line(space->machine, "dsp", INPUT_LINE_RESET, (data & 0x0400) ? ASSERT_LINE : CLEAR_LINE);
} }
@ -313,9 +313,9 @@ static TIMER_CALLBACK( deferred_iop_w )
{ {
iop_cmd = param; iop_cmd = param;
cmd_pending = 1; cmd_pending = 1;
cpu_set_input_line(machine->cpu[1], 0, HOLD_LINE); /* ??? I have no idea who should generate this! */ cputag_set_input_line(machine, "dsp", 0, HOLD_LINE); /* ??? I have no idea who should generate this! */
/* the DSP polls the status bit so it isn't strictly */ /* the DSP polls the status bit so it isn't strictly */
/* necessary to also have an IRQ */ /* necessary to also have an IRQ */
cpuexec_boost_interleave(machine, attotime_zero, ATTOTIME_IN_USEC(50)); cpuexec_boost_interleave(machine, attotime_zero, ATTOTIME_IN_USEC(50));
} }
@ -330,7 +330,7 @@ static WRITE16_HANDLER( coolpool_iop_w )
static READ16_HANDLER( coolpool_iop_r ) static READ16_HANDLER( coolpool_iop_r )
{ {
logerror("%08x:IOP read %04x\n",cpu_get_pc(space->cpu),iop_answer); logerror("%08x:IOP read %04x\n",cpu_get_pc(space->cpu),iop_answer);
cpu_set_input_line(space->machine->cpu[0], 1, CLEAR_LINE); cputag_set_input_line(space->machine, "maincpu", 1, CLEAR_LINE);
return iop_answer; return iop_answer;
} }
@ -347,16 +347,16 @@ static READ16_HANDLER( coolpool_iop_r )
static READ16_HANDLER( dsp_cmd_r ) static READ16_HANDLER( dsp_cmd_r )
{ {
cmd_pending = 0; cmd_pending = 0;
logerror("%08x:IOP cmd_r %04x\n",cpu_get_pc(space->cpu),iop_cmd); logerror("%08x:IOP cmd_r %04x\n", cpu_get_pc(space->cpu), iop_cmd);
return iop_cmd; return iop_cmd;
} }
static WRITE16_HANDLER( dsp_answer_w ) static WRITE16_HANDLER( dsp_answer_w )
{ {
logerror("%08x:IOP answer %04x\n",cpu_get_pc(space->cpu),data); logerror("%08x:IOP answer %04x\n", cpu_get_pc(space->cpu), data);
iop_answer = data; iop_answer = data;
cpu_set_input_line(space->machine->cpu[0], 1, ASSERT_LINE); cputag_set_input_line(space->machine, "maincpu", 1, ASSERT_LINE);
} }
@ -955,7 +955,7 @@ ROM_END
static DRIVER_INIT( coolpool ) static DRIVER_INIT( coolpool )
{ {
memory_install_read16_handler(cpu_get_address_space(machine->cpu[1], ADDRESS_SPACE_IO), 0x07, 0x07, 0, 0, coolpool_input_r); memory_install_read16_handler(cputag_get_address_space(machine, "dsp", ADDRESS_SPACE_IO), 0x07, 0x07, 0, 0, coolpool_input_r);
} }

View File

@ -239,8 +239,8 @@ static INTERRUPT_GEN( system_h1_sub )
static MACHINE_RESET ( coolridr ) static MACHINE_RESET ( coolridr )
{ {
// cpu_set_input_line(machine->cpu[0], INPUT_LINE_HALT, ASSERT_LINE); // cputag_set_input_line(machine, "maincpu", INPUT_LINE_HALT, ASSERT_LINE);
cpu_set_input_line(machine->cpu[1], INPUT_LINE_HALT, ASSERT_LINE); cputag_set_input_line(machine, "soundcpu", INPUT_LINE_HALT, ASSERT_LINE);
} }
@ -322,7 +322,7 @@ static READ32_HANDLER( coolridr_hack_r )
static DRIVER_INIT( coolridr ) static DRIVER_INIT( coolridr )
{ {
memory_install_read32_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM), 0x60d88a4, 0x060d88a7, 0, 0, coolridr_hack_r ); memory_install_read32_handler(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), 0x60d88a4, 0x060d88a7, 0, 0, coolridr_hack_r );
} }
GAME( 1995, coolridr, 0, coolridr, 0, coolridr, ROT0, "Sega", "Cool Riders",GAME_NOT_WORKING|GAME_NO_SOUND ) GAME( 1995, coolridr, 0, coolridr, 0, coolridr, ROT0, "Sega", "Cool Riders",GAME_NOT_WORKING|GAME_NO_SOUND )

View File

@ -70,7 +70,7 @@ WRITE8_HANDLER( cop01_vreg_w );
static WRITE8_HANDLER( cop01_sound_command_w ) static WRITE8_HANDLER( cop01_sound_command_w )
{ {
soundlatch_w(space,offset,data); soundlatch_w(space,offset,data);
cpu_set_input_line_and_vector(space->machine->cpu[1],0,HOLD_LINE,0xff); cputag_set_input_line_and_vector(space->machine, "audiocpu", 0, HOLD_LINE, 0xff);
} }
static READ8_HANDLER( cop01_sound_command_r ) static READ8_HANDLER( cop01_sound_command_r )

View File

@ -1570,17 +1570,17 @@ static DRIVER_INIT( cosmicg )
static DRIVER_INIT( devzone ) static DRIVER_INIT( devzone )
{ {
memory_install_write8_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM), 0x4807, 0x4807, 0, 0, cosmic_background_enable_w); memory_install_write8_handler(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), 0x4807, 0x4807, 0, 0, cosmic_background_enable_w);
} }
static DRIVER_INIT( nomnlnd ) static DRIVER_INIT( nomnlnd )
{ {
const device_config *dac = devtag_get_device(machine, "dac"); const device_config *dac = devtag_get_device(machine, "dac");
memory_install_read8_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM), 0x5000, 0x5001, 0, 0, nomnlnd_port_0_1_r); memory_install_read8_handler(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), 0x5000, 0x5001, 0, 0, nomnlnd_port_0_1_r);
memory_install_write8_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM), 0x4800, 0x4800, 0, 0, (write8_space_func)SMH_NOP); memory_install_write8_handler(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), 0x4800, 0x4800, 0, 0, (write8_space_func)SMH_NOP);
memory_install_write8_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM), 0x4807, 0x4807, 0, 0, cosmic_background_enable_w); memory_install_write8_handler(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), 0x4807, 0x4807, 0, 0, cosmic_background_enable_w);
memory_install_write8_device_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM), dac, 0x480a, 0x480a, 0, 0, dac_w); memory_install_write8_device_handler(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), dac, 0x480a, 0x480a, 0, 0, dac_w);
} }
@ -1598,4 +1598,3 @@ GAME( 1980, panich, panic, panic, panic, 0, ROT270, "Universal",
GAME( 1980, panicger, panic, panic, panic, 0, ROT270, "Universal (ADP Automaten license)", "Space Panic (German)", 0 ) GAME( 1980, panicger, panic, panic, panic, 0, ROT270, "Universal (ADP Automaten license)", "Space Panic (German)", 0 )
GAME( 1980, devzone, 0, devzone, devzone, devzone, ROT270, "Universal", "Devil Zone", GAME_IMPERFECT_SOUND ) GAME( 1980, devzone, 0, devzone, devzone, devzone, ROT270, "Universal", "Devil Zone", GAME_IMPERFECT_SOUND )
GAME( 1980, devzone2, devzone, devzone, devzone2, devzone, ROT270, "Universal", "Devil Zone (easier)", GAME_IMPERFECT_SOUND ) GAME( 1980, devzone2, devzone, devzone, devzone2, devzone, ROT270, "Universal", "Devil Zone (easier)", GAME_IMPERFECT_SOUND )

View File

@ -43,7 +43,7 @@ static VIDEO_START( cowrace )
static VIDEO_UPDATE( cowrace ) static VIDEO_UPDATE( cowrace )
{ {
tilemap_draw(bitmap,cliprect, tmap, 0, 0); tilemap_draw(bitmap, cliprect, tmap, 0, 0);
return 0; return 0;
} }
@ -51,7 +51,7 @@ static VIDEO_UPDATE( cowrace )
static WRITE8_HANDLER( cowrace_soundlatch_w ) static WRITE8_HANDLER( cowrace_soundlatch_w )
{ {
soundlatch_w(0, data); soundlatch_w(0, data);
cpu_set_input_line(space->machine->cpu[1], INPUT_LINE_NMI, PULSE_LINE); cputag_set_input_line(space->machine, "audiocpu", INPUT_LINE_NMI, PULSE_LINE);
} }
#endif #endif

View File

@ -2736,7 +2736,7 @@ GFXDECODE_END
static void cps1_irq_handler_mus(const device_config *device, int irq) static void cps1_irq_handler_mus(const device_config *device, int irq)
{ {
cpu_set_input_line(device->machine->cpu[1],0,irq ? ASSERT_LINE : CLEAR_LINE); cputag_set_input_line(device->machine, "audiocpu", 0, irq ? ASSERT_LINE : CLEAR_LINE);
} }
static const ym2151_interface ym2151_config = static const ym2151_interface ym2151_config =
@ -2892,7 +2892,7 @@ static void m5205_int1(const device_config *device)
// sample_buffer1 >>= 4; // sample_buffer1 >>= 4;
// sample_select1 ^= 1; // sample_select1 ^= 1;
// if (sample_select1 == 0) // if (sample_select1 == 0)
// cpu_set_input_line(machine->cpu[1], INPUT_LINE_NMI, PULSE_LINE); // cputag_set_input_line(machine, "audiocpu", INPUT_LINE_NMI, PULSE_LINE);
} }
static void m5205_int2(const device_config *device) static void m5205_int2(const device_config *device)
@ -8268,10 +8268,10 @@ static DRIVER_INIT( forgottn )
{ {
/* Forgotten Worlds has a NEC uPD4701AC on the B-board handling dial inputs from the CN-MOWS connector. */ /* Forgotten Worlds has a NEC uPD4701AC on the B-board handling dial inputs from the CN-MOWS connector. */
/* The memory mapping is handled by PAL LWIO */ /* The memory mapping is handled by PAL LWIO */
memory_install_write16_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM), 0x800040, 0x800041, 0, 0, forgottn_dial_0_reset_w); memory_install_write16_handler(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), 0x800040, 0x800041, 0, 0, forgottn_dial_0_reset_w);
memory_install_write16_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM), 0x800048, 0x800049, 0, 0, forgottn_dial_1_reset_w); memory_install_write16_handler(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), 0x800048, 0x800049, 0, 0, forgottn_dial_1_reset_w);
memory_install_read16_handler (cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM), 0x800052, 0x800055, 0, 0, forgottn_dial_0_r); memory_install_read16_handler (cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), 0x800052, 0x800055, 0, 0, forgottn_dial_0_r);
memory_install_read16_handler (cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM), 0x80005a, 0x80005d, 0, 0, forgottn_dial_1_r); memory_install_read16_handler (cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), 0x80005a, 0x80005d, 0, 0, forgottn_dial_1_r);
DRIVER_INIT_CALL(cps1); DRIVER_INIT_CALL(cps1);
} }
@ -8280,8 +8280,8 @@ static DRIVER_INIT( sf2ue )
{ {
/* This specific version of SF2 has the CPS-B custom mapped at a different address. */ /* This specific version of SF2 has the CPS-B custom mapped at a different address. */
/* The mapping is handled by a PAL on the B-board */ /* The mapping is handled by a PAL on the B-board */
memory_install_readwrite16_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM), 0x800140, 0x80017f, 0, 0, (read16_space_func)SMH_UNMAP, (write16_space_func)SMH_UNMAP); memory_install_readwrite16_handler(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), 0x800140, 0x80017f, 0, 0, (read16_space_func)SMH_UNMAP, (write16_space_func)SMH_UNMAP);
memory_install_readwrite16_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM), 0x8001c0, 0x8001ff, 0, 0, cps1_cps_b_r, cps1_cps_b_w); memory_install_readwrite16_handler(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), 0x8001c0, 0x8001ff, 0, 0, cps1_cps_b_r, cps1_cps_b_w);
DRIVER_INIT_CALL(cps1); DRIVER_INIT_CALL(cps1);
} }
@ -8289,7 +8289,7 @@ static DRIVER_INIT( sf2ue )
static DRIVER_INIT( sf2hack ) static DRIVER_INIT( sf2hack )
{ {
/* some SF2 hacks have some inputs wired to the LSB instead of MSB */ /* some SF2 hacks have some inputs wired to the LSB instead of MSB */
memory_install_read16_handler (cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM), 0x800018, 0x80001f, 0, 0, cps1_hack_dsw_r); memory_install_read16_handler (cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), 0x800018, 0x80001f, 0, 0, cps1_hack_dsw_r);
DRIVER_INIT_CALL(cps1); DRIVER_INIT_CALL(cps1);
} }
@ -8322,7 +8322,7 @@ static DRIVER_INIT( pang3 )
{ {
/* Pang 3 is the only non-QSound game to have an EEPROM. */ /* Pang 3 is the only non-QSound game to have an EEPROM. */
/* It is mapped in the CPS-B address range so probably is on the C-board. */ /* It is mapped in the CPS-B address range so probably is on the C-board. */
memory_install_readwrite16_handler (cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM), 0x80017a, 0x80017b, 0, 0, cps1_eeprom_port_r, cps1_eeprom_port_w); memory_install_readwrite16_handler (cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), 0x80017a, 0x80017b, 0, 0, cps1_eeprom_port_r, cps1_eeprom_port_w);
DRIVER_INIT_CALL(cps1); DRIVER_INIT_CALL(cps1);
} }
@ -8373,11 +8373,11 @@ static DRIVER_INIT( sf2mdt )
rom[i+3] = rom[i+6]; rom[i+3] = rom[i+6];
rom[i+6] = tmp; rom[i+6] = tmp;
} }
memory_install_read16_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM), 0x70c01a, 0x70c01b, 0, 0, sf2mdt_r); memory_install_read16_handler(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), 0x70c01a, 0x70c01b, 0, 0, sf2mdt_r);
memory_install_read16_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM), 0x70c01c, 0x70c01d, 0, 0, sf2mdt_r); memory_install_read16_handler(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), 0x70c01c, 0x70c01d, 0, 0, sf2mdt_r);
memory_install_read16_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM), 0x70c01e, 0x70c01f, 0, 0, sf2mdt_r); memory_install_read16_handler(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), 0x70c01e, 0x70c01f, 0, 0, sf2mdt_r);
memory_install_read16_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM), 0x70c010, 0x70c011, 0, 0, sf2mdt_r); memory_install_read16_handler(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), 0x70c010, 0x70c011, 0, 0, sf2mdt_r);
memory_install_read16_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM), 0x70c018, 0x70c019, 0, 0, sf2mdt_r); memory_install_read16_handler(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), 0x70c018, 0x70c019, 0, 0, sf2mdt_r);
DRIVER_INIT_CALL(cps1); DRIVER_INIT_CALL(cps1);
} }

View File

@ -753,7 +753,8 @@ static WRITE16_HANDLER( cps2_eeprom_port_w )
/* bit 7 - */ /* bit 7 - */
/* Z80 Reset */ /* Z80 Reset */
if (space->machine->cpu[1]) cpu_set_input_line(space->machine->cpu[1], INPUT_LINE_RESET, (data & 0x0008) ? CLEAR_LINE : ASSERT_LINE); if (cputag_get_cpu(space->machine, "audiocpu"))
cputag_set_input_line(space->machine, "audiocpu", INPUT_LINE_RESET, (data & 0x0008) ? CLEAR_LINE : ASSERT_LINE);
coin_counter_w(0, data & 0x0001); coin_counter_w(0, data & 0x0001);
if( (strncmp(space->machine->gamedrv->name,"pzloop2",8)==0) || if( (strncmp(space->machine->gamedrv->name,"pzloop2",8)==0) ||
@ -7403,7 +7404,7 @@ static DRIVER_INIT( cps2 )
DRIVER_INIT_CALL(cps2crpt); DRIVER_INIT_CALL(cps2crpt);
cps2networkpresent = 0; cps2networkpresent = 0;
cpu_set_clockscale(machine->cpu[0], 0.7375f); /* RAM access waitstates etc. aren't emulated - slow the CPU to compensate */ cpu_set_clockscale(cputag_get_cpu(machine, "maincpu"), 0.7375f); /* RAM access waitstates etc. aren't emulated - slow the CPU to compensate */
} }
static DRIVER_INIT( ssf2tb ) static DRIVER_INIT( ssf2tb )
@ -7420,7 +7421,7 @@ static DRIVER_INIT( ssf2tb )
static DRIVER_INIT ( pzloop2 ) static DRIVER_INIT ( pzloop2 )
{ {
DRIVER_INIT_CALL(cps2); DRIVER_INIT_CALL(cps2);
memory_install_read16_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM), 0x804000, 0x804001, 0, 0, joy_or_paddle_r); memory_install_read16_handler(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), 0x804000, 0x804001, 0, 0, joy_or_paddle_r);
} }
static UINT16* gigamn2_dummyqsound_ram; static UINT16* gigamn2_dummyqsound_ram;
@ -7436,9 +7437,9 @@ static DRIVER_INIT( gigamn2 )
DRIVER_INIT_CALL(cps2); DRIVER_INIT_CALL(cps2);
gigamn2_dummyqsound_ram = auto_alloc_array(machine, UINT16, 0x20000/2); gigamn2_dummyqsound_ram = auto_alloc_array(machine, UINT16, 0x20000/2);
memory_install_readwrite16_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM), 0x618000, 0x619fff, 0, 0, gigamn2_dummyqsound_r, gigamn2_dummyqsound_w); // no qsound.. memory_install_readwrite16_handler(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), 0x618000, 0x619fff, 0, 0, gigamn2_dummyqsound_r, gigamn2_dummyqsound_w); // no qsound..
memory_set_decrypted_region(space, 0x000000, (length) - 1, &rom[length/4]); memory_set_decrypted_region(space, 0x000000, (length) - 1, &rom[length/4]);
m68k_set_encrypted_opcode_range(machine->cpu[0],0,length); m68k_set_encrypted_opcode_range(cputag_get_cpu(machine, "maincpu"), 0, length);
} }

View File

@ -694,7 +694,7 @@ static DRIVER_INIT( cps3 )
if (!cps3_user5region) cps3_user5region = auto_alloc_array(machine, UINT8, USER5REGION_LENGTH); if (!cps3_user5region) cps3_user5region = auto_alloc_array(machine, UINT8, USER5REGION_LENGTH);
// set strict verify // set strict verify
sh2drc_set_options(machine->cpu[0], SH2DRC_STRICT_VERIFY); sh2drc_set_options(cputag_get_cpu(machine, "maincpu"), SH2DRC_STRICT_VERIFY);
cps3_decrypt_bios(machine); cps3_decrypt_bios(machine);
decrypted_gamerom = auto_alloc_array(machine, UINT32, 0x1000000/4); decrypted_gamerom = auto_alloc_array(machine, UINT32, 0x1000000/4);
@ -706,7 +706,7 @@ static DRIVER_INIT( cps3 )
cps3_0xc0000000_ram_decrypted = auto_alloc_array(machine, UINT32, 0x400/4); cps3_0xc0000000_ram_decrypted = auto_alloc_array(machine, UINT32, 0x400/4);
memory_set_direct_update_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM), cps3_direct_handler); memory_set_direct_update_handler(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), cps3_direct_handler);
// flash roms // flash roms
@ -1806,7 +1806,7 @@ static WRITE32_HANDLER( cps3_palettedma_w )
} }
cpu_set_input_line(space->machine->cpu[0],10, ASSERT_LINE); cputag_set_input_line(space->machine, "maincpu", 10, ASSERT_LINE);
} }
@ -2002,43 +2002,43 @@ static void cps3_process_character_dma(running_machine *machine, UINT32 address)
//printf("charDMA start:\n"); //printf("charDMA start:\n");
for (i=0;i<0x1000;i+=3) for (i = 0; i < 0x1000; i += 3)
{ {
UINT32 dat1 = LITTLE_ENDIANIZE_INT32(cps3_char_ram[i+0+(address)]); UINT32 dat1 = LITTLE_ENDIANIZE_INT32(cps3_char_ram[i + 0 + (address)]);
UINT32 dat2 = LITTLE_ENDIANIZE_INT32(cps3_char_ram[i+1+(address)]); UINT32 dat2 = LITTLE_ENDIANIZE_INT32(cps3_char_ram[i + 1 + (address)]);
UINT32 dat3 = LITTLE_ENDIANIZE_INT32(cps3_char_ram[i+2+(address)]); UINT32 dat3 = LITTLE_ENDIANIZE_INT32(cps3_char_ram[i + 2 + (address)]);
UINT32 real_source = (dat3<<1)-0x400000; UINT32 real_source = (dat3 << 1) - 0x400000;
UINT32 real_destination = dat2<<3; UINT32 real_destination = dat2 << 3;
UINT32 real_length = (((dat1&0x001fffff)+1)<<3); UINT32 real_length = (((dat1 & 0x001fffff) + 1) << 3);
/* 0x01000000 is the end of list marker, 0x13131313 is our default fill */ /* 0x01000000 is the end of list marker, 0x13131313 is our default fill */
if ((dat1==0x01000000) || (dat1==0x13131313)) break; if ((dat1 == 0x01000000) || (dat1 == 0x13131313)) break;
//printf("%08x %08x %08x real_source %08x (rom %d offset %08x) real_destination %08x, real_length %08x\n", dat1, dat2, dat3, real_source, real_source/0x800000, real_source%0x800000, real_destination, real_length); //printf("%08x %08x %08x real_source %08x (rom %d offset %08x) real_destination %08x, real_length %08x\n", dat1, dat2, dat3, real_source, real_source/0x800000, real_source%0x800000, real_destination, real_length);
if ( (dat1&0x00e00000) ==0x00800000 ) if ((dat1 & 0x00e00000) == 0x00800000)
{ {
/* Sets a table used by the decompression routines */ /* Sets a table used by the decompression routines */
{ {
/* We should probably copy this, but a pointer to it is fine for our purposes as the data doesn't change */ /* We should probably copy this, but a pointer to it is fine for our purposes as the data doesn't change */
current_table_address = real_source; current_table_address = real_source;
} }
cpu_set_input_line(machine->cpu[0],10, ASSERT_LINE); cputag_set_input_line(machine, "maincpu", 10, ASSERT_LINE);
} }
else if ( (dat1&0x00e00000) ==0x00400000 ) else if ((dat1 & 0x00e00000) == 0x00400000)
{ {
/* 6bpp DMA decompression /* 6bpp DMA decompression
- this is used for the majority of sprites and backgrounds */ - this is used for the majority of sprites and backgrounds */
cps3_do_char_dma( machine, real_source, real_destination, real_length ); cps3_do_char_dma( machine, real_source, real_destination, real_length );
cpu_set_input_line(machine->cpu[0],10, ASSERT_LINE); cputag_set_input_line(machine, "maincpu", 10, ASSERT_LINE);
} }
else if ( (dat1&0x00e00000) ==0x00600000 ) else if ((dat1 & 0x00e00000) == 0x00600000)
{ {
/* 8bpp DMA decompression /* 8bpp DMA decompression
- this is used on SFIII NG Sean's Stage ONLY */ - this is used on SFIII NG Sean's Stage ONLY */
cps3_do_alt_char_dma( machine, real_source, real_destination, real_length); cps3_do_alt_char_dma( machine, real_source, real_destination, real_length);
cpu_set_input_line(machine->cpu[0],10, ASSERT_LINE); cputag_set_input_line(machine, "maincpu", 10, ASSERT_LINE);
} }
else else
{ {
@ -2095,12 +2095,12 @@ static WRITE32_HANDLER( cps3_characterdma_w )
static WRITE32_HANDLER( cps3_irq10_ack_w ) static WRITE32_HANDLER( cps3_irq10_ack_w )
{ {
cpu_set_input_line(space->machine->cpu[0],10, CLEAR_LINE); return; cputag_set_input_line(space->machine, "maincpu", 10, CLEAR_LINE); return;
} }
static WRITE32_HANDLER( cps3_irq12_ack_w ) static WRITE32_HANDLER( cps3_irq12_ack_w )
{ {
cpu_set_input_line(space->machine->cpu[0],12, CLEAR_LINE); return; cputag_set_input_line(space->machine, "maincpu", 12, CLEAR_LINE); return;
} }
static WRITE32_HANDLER( cps3_unk_vidregs_w ) static WRITE32_HANDLER( cps3_unk_vidregs_w )

View File

@ -163,7 +163,7 @@ static WRITE8_HANDLER( port_sound_w )
const device_config *sn = devtag_get_device(space->machine, "sn"); const device_config *sn = devtag_get_device(space->machine, "sn");
/* D0 - interrupt enable - also goes to PC3259 as /HTCTRL */ /* D0 - interrupt enable - also goes to PC3259 as /HTCTRL */
cpu_interrupt_enable(space->machine->cpu[0], (data & 0x01) ? TRUE : FALSE); cpu_interrupt_enable(cputag_get_cpu(space->machine, "maincpu"), (data & 0x01) ? TRUE : FALSE);
crbaloon_set_clear_collision_address((data & 0x01) ? TRUE : FALSE); crbaloon_set_clear_collision_address((data & 0x01) ? TRUE : FALSE);
/* D1 - SOUND STOP */ /* D1 - SOUND STOP */
@ -342,7 +342,7 @@ GFXDECODE_END
static MACHINE_RESET( crballoon ) static MACHINE_RESET( crballoon )
{ {
const address_space *space = cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_IO); const address_space *space = cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_IO);
const device_config *discrete = devtag_get_device(machine, "discrete"); const device_config *discrete = devtag_get_device(machine, "discrete");
pc3092_reset(); pc3092_reset();

View File

@ -123,7 +123,7 @@ static WRITE8_HANDLER( unknown_w )
static TIMER_CALLBACK( main_to_sound_callback ) static TIMER_CALLBACK( main_to_sound_callback )
{ {
cpu_set_input_line(machine->cpu[1], INPUT_LINE_NMI, ASSERT_LINE); cputag_set_input_line(machine, "audiocpu", INPUT_LINE_NMI, ASSERT_LINE);
main_to_sound_data = param; main_to_sound_data = param;
} }
@ -136,7 +136,7 @@ static WRITE8_HANDLER( main_to_sound_w )
static READ8_HANDLER( main_to_sound_r ) static READ8_HANDLER( main_to_sound_r )
{ {
cpu_set_input_line(space->machine->cpu[1], INPUT_LINE_NMI, CLEAR_LINE); cputag_set_input_line(space->machine, "audiocpu", INPUT_LINE_NMI, CLEAR_LINE);
return main_to_sound_data; return main_to_sound_data;
} }
@ -150,7 +150,7 @@ static READ8_HANDLER( main_to_sound_r )
static TIMER_CALLBACK( sound_to_main_callback ) static TIMER_CALLBACK( sound_to_main_callback )
{ {
cpu_set_input_line(machine->cpu[0], INPUT_LINE_NMI, ASSERT_LINE); cputag_set_input_line(machine, "maincpu", INPUT_LINE_NMI, ASSERT_LINE);
sound_to_main_data = param; sound_to_main_data = param;
} }
@ -163,7 +163,7 @@ static WRITE8_HANDLER( sound_to_main_w )
static READ8_HANDLER( sound_to_main_r ) static READ8_HANDLER( sound_to_main_r )
{ {
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);
return sound_to_main_data; return sound_to_main_data;
} }
@ -581,7 +581,7 @@ ROM_END
static DRIVER_INIT( crgolfhi ) static DRIVER_INIT( crgolfhi )
{ {
const device_config *msm = devtag_get_device(machine, "msm"); const device_config *msm = devtag_get_device(machine, "msm");
memory_install_write8_device_handler(cpu_get_address_space(machine->cpu[1], ADDRESS_SPACE_PROGRAM), msm, 0xa000, 0xa003, 0, 0, crgolfhi_sample_w); memory_install_write8_device_handler(cputag_get_address_space(machine, "audiocpu", ADDRESS_SPACE_PROGRAM), msm, 0xa000, 0xa003, 0, 0, crgolfhi_sample_w);
} }

View File

@ -36,7 +36,7 @@ static WRITE8_HANDLER( crimfght_coin_w )
static WRITE8_HANDLER( crimfght_sh_irqtrigger_w ) static WRITE8_HANDLER( crimfght_sh_irqtrigger_w )
{ {
soundlatch_w(space,offset,data); soundlatch_w(space,offset,data);
cpu_set_input_line_and_vector(space->machine->cpu[1],0,HOLD_LINE,0xff); cputag_set_input_line_and_vector(space->machine, "audiocpu", 0, HOLD_LINE, 0xff);
} }
static WRITE8_DEVICE_HANDLER( crimfght_snd_bankswitch_w ) static WRITE8_DEVICE_HANDLER( crimfght_snd_bankswitch_w )
@ -361,7 +361,7 @@ static MACHINE_RESET( crimfght )
{ {
UINT8 *RAM = memory_region(machine, "maincpu"); UINT8 *RAM = memory_region(machine, "maincpu");
konami_configure_set_lines(machine->cpu[0], crimfght_banking); konami_configure_set_lines(cputag_get_cpu(machine, "maincpu"), crimfght_banking);
/* init the default bank */ /* init the default bank */
memory_set_bankptr(machine, 2, &RAM[0x10000] ); memory_set_bankptr(machine, 2, &RAM[0x10000] );

View File

@ -292,7 +292,7 @@ GFXDECODE_END
static void irqhandler(const device_config *device, int linestate) static void irqhandler(const device_config *device, int linestate)
{ {
cpu_set_input_line(device->machine->cpu[1],0,linestate); cputag_set_input_line(device->machine, "audiocpu", 0, linestate);
} }
static const ym3812_interface ym3812_config = static const ym3812_interface ym3812_config =

View File

@ -171,7 +171,7 @@ static WRITE16_HANDLER( sound_command_w )
{ {
pending_command = 1; pending_command = 1;
soundlatch_w(space,offset,data & 0xff); soundlatch_w(space,offset,data & 0xff);
cpu_set_input_line(space->machine->cpu[1], INPUT_LINE_NMI, PULSE_LINE); cputag_set_input_line(space->machine, "audiocpu", INPUT_LINE_NMI, PULSE_LINE);
} }
} }
@ -428,7 +428,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

@ -141,41 +141,41 @@ static UINT32 *ResetPatch;
static void IntReq(running_machine *machine, int num) static void IntReq(running_machine *machine, int num)
{ {
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 IntEn=memory_read_dword(space, 0x01800c08); UINT32 IntEn=memory_read_dword(space, 0x01800c08);
UINT32 IntPend=memory_read_dword(space, 0x01800c0c); UINT32 IntPend=memory_read_dword(space, 0x01800c0c);
if(IntEn&(1<<num)) if(IntEn & (1 << num))
{ {
IntPend|=(1<<num); IntPend |= (1 << num);
memory_write_dword(space,0x01800c0c,IntPend); memory_write_dword(space, 0x01800c0c, IntPend);
cpu_set_input_line(machine->cpu[0],SE3208_INT,ASSERT_LINE); cputag_set_input_line(machine, "maincpu", SE3208_INT, ASSERT_LINE);
} }
#ifdef IDLE_LOOP_SPEEDUP #ifdef IDLE_LOOP_SPEEDUP
FlipCntRead=0; FlipCntRead = 0;
cpu_resume(machine->cpu[0],SUSPEND_REASON_SPIN); cputag_resume(machine, "maincpu", SUSPEND_REASON_SPIN);
#endif #endif
} }
static READ32_HANDLER(FlipCount_r) static READ32_HANDLER(FlipCount_r)
{ {
#ifdef IDLE_LOOP_SPEEDUP #ifdef IDLE_LOOP_SPEEDUP
UINT32 IntPend=memory_read_dword(space, 0x01800c0c); UINT32 IntPend = memory_read_dword(space, 0x01800c0c);
FlipCntRead++; FlipCntRead++;
if(FlipCntRead>=16 && !IntPend && FlipCount!=0) if(FlipCntRead >= 16 && !IntPend && FlipCount != 0)
cpu_suspend(space->machine->cpu[0],SUSPEND_REASON_SPIN,1); cputag_suspend(space->machine, "maincpu", SUSPEND_REASON_SPIN, 1);
#endif #endif
return ((UINT32) FlipCount)<<16; return ((UINT32) FlipCount)<<16;
} }
static WRITE32_HANDLER(FlipCount_w) static WRITE32_HANDLER(FlipCount_w)
{ {
if(mem_mask&0x00ff0000) if(mem_mask & 0x00ff0000)
{ {
int fc=(data>>16)&0xff; int fc = (data >> 16) & 0xff;
if(fc==1) if(fc == 1)
FlipCount++; FlipCount++;
else if(fc==0) else if(fc == 0)
FlipCount=0; FlipCount = 0;
} }
} }
@ -193,36 +193,36 @@ static READ32_HANDLER(Input_r)
if(!(Port4 & 0x20) && ((OldPort4^Port4) & 0x20)) if(!(Port4 & 0x20) && ((OldPort4^Port4) & 0x20))
IntReq(space->machine, 19); IntReq(space->machine, 19);
OldPort4 = Port4; OldPort4 = Port4;
return /*dips*/input_port_read(space->machine, "DSW")|(Port4<<16); return /*dips*/input_port_read(space->machine, "DSW") | (Port4 << 16);
} }
return 0; return 0;
} }
static WRITE32_HANDLER(IntAck_w) static WRITE32_HANDLER(IntAck_w)
{ {
UINT32 IntPend=memory_read_dword(space, 0x01800c0c); UINT32 IntPend = memory_read_dword(space, 0x01800c0c);
if(mem_mask&0xff) if(mem_mask & 0xff)
{ {
IntPend&=~(1<<(data&0x1f)); IntPend &= ~(1 << (data & 0x1f));
memory_write_dword(space, 0x01800c0c,IntPend); memory_write_dword(space, 0x01800c0c, IntPend);
if(!IntPend) if(!IntPend)
cpu_set_input_line(space->machine->cpu[0],SE3208_INT,CLEAR_LINE); cputag_set_input_line(space->machine, "maincpu", SE3208_INT, CLEAR_LINE);
} }
if(mem_mask&0xff00) if(mem_mask & 0xff00)
IntHigh=(data>>8)&7; IntHigh = (data >> 8) & 7;
} }
static IRQ_CALLBACK(icallback) static IRQ_CALLBACK(icallback)
{ {
const address_space *space = cpu_get_address_space(device, ADDRESS_SPACE_PROGRAM); const address_space *space = cpu_get_address_space(device, ADDRESS_SPACE_PROGRAM);
UINT32 IntPend=memory_read_dword(space, 0x01800c0c); UINT32 IntPend = memory_read_dword(space, 0x01800c0c);
int i; int i;
for(i=0;i<32;++i) for(i = 0; i < 32; ++i)
{ {
if(IntPend&(1<<i)) if(IntPend & (1 << i))
{ {
return (IntHigh<<5)|i; return (IntHigh << 5) | i;
} }
} }
return 0; //This should never happen return 0; //This should never happen
@ -501,8 +501,8 @@ static MACHINE_START(crystal)
{ {
int i; int i;
cpu_set_irq_callback(machine->cpu[0],icallback); cpu_set_irq_callback(cputag_get_cpu(machine, "maincpu"), icallback);
for (i=0; i<4; i++) for (i = 0; i < 4; i++)
Timer[i] = timer_alloc(machine, Timercb, (void*)(FPTR)i); Timer[i] = timer_alloc(machine, Timercb, (void*)(FPTR)i);
PatchReset(); PatchReset();
@ -512,28 +512,28 @@ static MACHINE_RESET(crystal)
{ {
int i; int i;
memset(sysregs,0,0x10000); memset(sysregs, 0, 0x10000);
memset(vidregs,0,0x10000); memset(vidregs, 0, 0x10000);
FlipCount=0; FlipCount = 0;
IntHigh=0; IntHigh = 0;
cpu_set_irq_callback(machine->cpu[0],icallback); cpu_set_irq_callback(cputag_get_cpu(machine, "maincpu"), icallback);
Bank=0; Bank = 0;
memory_set_bankptr(machine, 1,memory_region(machine, "user1")+0); memory_set_bankptr(machine, 1, memory_region(machine, "user1") + 0);
FlashCmd=0xff; FlashCmd = 0xff;
OldPort4=0; OldPort4 = 0;
DMActrl[0]=0; DMActrl[0] = 0;
DMActrl[1]=0; DMActrl[1] = 0;
for (i=0; i<4; i++) for (i = 0; i < 4; i++)
{ {
Timerctrl[i]=0; Timerctrl[i] = 0;
timer_adjust_oneshot(Timer[i],attotime_never,0); timer_adjust_oneshot(Timer[i], attotime_never, 0);
} }
vr0_snd_set_areas(devtag_get_device(machine, "vrender"), textureram,frameram); vr0_snd_set_areas(devtag_get_device(machine, "vrender"), textureram, frameram);
#ifdef IDLE_LOOP_SPEEDUP #ifdef IDLE_LOOP_SPEEDUP
FlipCntRead=0; FlipCntRead = 0;
#endif #endif
PatchReset(); PatchReset();
@ -545,95 +545,95 @@ static VIDEO_START(crystal)
static UINT16 GetVidReg(const address_space *space, UINT16 reg) static UINT16 GetVidReg(const address_space *space, UINT16 reg)
{ {
return memory_read_word(space,0x03000000+reg); return memory_read_word(space, 0x03000000 + reg);
} }
static void SetVidReg(const address_space *space, UINT16 reg,UINT16 val) static void SetVidReg(const address_space *space, UINT16 reg, UINT16 val)
{ {
memory_write_word(space,0x03000000+reg,val); memory_write_word(space, 0x03000000 + reg, val);
} }
static VIDEO_UPDATE(crystal) static VIDEO_UPDATE(crystal)
{ {
const address_space *space = cpu_get_address_space(screen->machine->cpu[0], ADDRESS_SPACE_PROGRAM); const address_space *space = cputag_get_address_space(screen->machine, "maincpu", ADDRESS_SPACE_PROGRAM);
int DoFlip; int DoFlip;
UINT32 B0=0x0; UINT32 B0 = 0x0;
UINT32 B1=(GetVidReg(space,0x90)&0x8000)?0x400000:0x100000; UINT32 B1 = (GetVidReg(space, 0x90) & 0x8000) ? 0x400000 : 0x100000;
UINT16 *Front,*Back; UINT16 *Front, *Back;
UINT16 *Visible,*DrawDest; UINT16 *Visible, *DrawDest;
UINT16 *srcline; UINT16 *srcline;
int y; int y;
UINT16 head,tail; UINT16 head, tail;
UINT32 width=video_screen_get_width(screen); UINT32 width = video_screen_get_width(screen);
if(GetVidReg(space,0x8e)&1) if(GetVidReg(space, 0x8e) & 1)
{ {
Front=(UINT16*) (frameram+B1/4); Front = (UINT16*) (frameram + B1 / 4);
Back=(UINT16*) (frameram+B0/4); Back = (UINT16*) (frameram + B0 / 4);
} }
else else
{ {
Front=(UINT16*) (frameram+B0/4); Front = (UINT16*) (frameram + B0 / 4);
Back=(UINT16*) (frameram+B1/4); Back = (UINT16*) (frameram + B1 / 4);
} }
Visible=(UINT16*) Front; Visible = (UINT16*) Front;
DrawDest=(UINT16 *) frameram; DrawDest = (UINT16 *) frameram;
if(GetVidReg(space,0x8c)&0x80) if(GetVidReg(space, 0x8c) & 0x80)
DrawDest=Front; DrawDest = Front;
else else
DrawDest=Back; DrawDest = Back;
// DrawDest=Visible; // DrawDest = Visible;
srcline=(UINT16 *) DrawDest; srcline = (UINT16 *) DrawDest;
DoFlip=0; DoFlip = 0;
head=GetVidReg(space,0x82); head = GetVidReg(space, 0x82);
tail=GetVidReg(space,0x80); tail = GetVidReg(space, 0x80);
while((head&0x7ff)!=(tail&0x7ff)) while((head & 0x7ff) != (tail & 0x7ff))
{ {
DoFlip=vrender0_ProcessPacket(space,0x03800000+head*64,DrawDest,(UINT8*)textureram); DoFlip = vrender0_ProcessPacket(space, 0x03800000 + head * 64, DrawDest, (UINT8*)textureram);
head++; head++;
head&=0x7ff; head &= 0x7ff;
if(DoFlip) if(DoFlip)
break; break;
} }
if(DoFlip) if(DoFlip)
SetVidReg(space,0x8e,GetVidReg(space,0x8e)^1); SetVidReg(space, 0x8e, GetVidReg(space, 0x8e) ^ 1);
srcline=(UINT16 *) Visible; srcline=(UINT16 *) Visible;
for(y=0;y<240;y++) for(y = 0; y < 240; y++)
memcpy(BITMAP_ADDR16(bitmap, y, 0), &srcline[y*512], width*2); memcpy(BITMAP_ADDR16(bitmap, y, 0), &srcline[y * 512], width * 2);
return 0; return 0;
} }
static VIDEO_EOF(crystal) static VIDEO_EOF(crystal)
{ {
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);
UINT16 head,tail; UINT16 head, tail;
int DoFlip=0; int DoFlip = 0;
head=GetVidReg(space,0x82); head = GetVidReg(space, 0x82);
tail=GetVidReg(space,0x80); tail = GetVidReg(space, 0x80);
while((head&0x7ff)!=(tail&0x7ff)) while((head & 0x7ff) != (tail & 0x7ff))
{ {
UINT16 Packet0=memory_read_word(space,0x03800000+head*64); UINT16 Packet0 = memory_read_word(space, 0x03800000 + head * 64);
if(Packet0&0x81) if(Packet0 & 0x81)
DoFlip=1; DoFlip = 1;
head++; head++;
head&=0x7ff; head &= 0x7ff;
if(DoFlip) if(DoFlip)
break; break;
} }
SetVidReg(space,0x82,head); SetVidReg(space, 0x82, head);
if(DoFlip) if(DoFlip)
{ {
if(FlipCount) if(FlipCount)
@ -914,4 +914,3 @@ GAME( 2001, crysking, crysbios, crystal, crystal, crysking, ROT0, "Brezzasoft",
GAME( 2001, evosocc, crysbios, crystal, crystal, evosocc, ROT0, "Evoga", "Evolution Soccer", 0 ) GAME( 2001, evosocc, crysbios, crystal, crystal, evosocc, ROT0, "Evoga", "Evolution Soccer", 0 )
GAME( 2003, topbladv, crysbios, topbladv,crystal, topbladv, ROT0, "SonoKong / Expotato", "Top Blade V", GAME_NOT_WORKING ) // protection GAME( 2003, topbladv, crysbios, topbladv,crystal, topbladv, ROT0, "SonoKong / Expotato", "Top Blade V", GAME_NOT_WORKING ) // protection
GAME( 2001, officeye, 0, crystal, crystal, officeye, ROT0, "Danbi", "Office Yeo In Cheon Ha (version 1.2)", GAME_NOT_WORKING ) // protection GAME( 2001, officeye, 0, crystal, crystal, officeye, ROT0, "Danbi", "Office Yeo In Cheon Ha (version 1.2)", GAME_NOT_WORKING ) // protection

View File

@ -35,14 +35,6 @@
#define CUBEQST_HBLANK 320 #define CUBEQST_HBLANK 320
#define CUBEQST_VCOUNT 280 #define CUBEQST_VCOUNT 280
enum cpu_indices
{
MAIN_CPU = 0,
ROTATE_CPU = 1,
LINE_CPU = 2,
SOUND_CPU = 3,
};
/************************************* /*************************************
* *
@ -118,8 +110,8 @@ static VIDEO_UPDATE( cubeqst )
for (y = cliprect->min_y; y <= cliprect->max_y; ++y) for (y = cliprect->min_y; y <= cliprect->max_y; ++y)
{ {
int i; int i;
int num_entries = cubeqcpu_get_ptr_ram_val(screen->machine->cpu[LINE_CPU], y); int num_entries = cubeqcpu_get_ptr_ram_val(cputag_get_cpu(screen->machine, "line_cpu"), y);
UINT32 *stk_ram = cubeqcpu_get_stack_ram(screen->machine->cpu[LINE_CPU]); UINT32 *stk_ram = cubeqcpu_get_stack_ram(cputag_get_cpu(screen->machine, "line_cpu"));
UINT32 *dest = BITMAP_ADDR32(bitmap, y, 0); UINT32 *dest = BITMAP_ADDR32(bitmap, y, 0);
UINT32 pen; UINT32 pen;
@ -248,10 +240,10 @@ static WRITE16_HANDLER( control_w )
static TIMER_CALLBACK( delayed_bank_swap ) static TIMER_CALLBACK( delayed_bank_swap )
{ {
cubeqcpu_swap_line_banks(machine->cpu[LINE_CPU]); cubeqcpu_swap_line_banks(cputag_get_cpu(machine, "line_cpu"));
/* TODO: This is a little dubious */ /* TODO: This is a little dubious */
cubeqcpu_clear_stack(machine->cpu[LINE_CPU]); cubeqcpu_clear_stack(cputag_get_cpu(machine, "line_cpu"));
} }
@ -383,22 +375,22 @@ INPUT_PORTS_END
static READ16_HANDLER( read_rotram ) static READ16_HANDLER( read_rotram )
{ {
return cubeqcpu_rotram_r(space->machine->cpu[ROTATE_CPU], offset, mem_mask); return cubeqcpu_rotram_r(cputag_get_cpu(space->machine, "rotate_cpu"), offset, mem_mask);
} }
static WRITE16_HANDLER( write_rotram ) static WRITE16_HANDLER( write_rotram )
{ {
cubeqcpu_rotram_w(space->machine->cpu[ROTATE_CPU], offset, data, mem_mask); cubeqcpu_rotram_w(cputag_get_cpu(space->machine, "rotate_cpu"), offset, data, mem_mask);
} }
static READ16_HANDLER( read_sndram ) static READ16_HANDLER( read_sndram )
{ {
return cubeqcpu_sndram_r(space->machine->cpu[SOUND_CPU], offset, mem_mask); return cubeqcpu_sndram_r(cputag_get_cpu(space->machine, "sound_cpu"), offset, mem_mask);
} }
static WRITE16_HANDLER( write_sndram ) static WRITE16_HANDLER( write_sndram )
{ {
cubeqcpu_sndram_w(space->machine->cpu[SOUND_CPU], offset, data, mem_mask); cubeqcpu_sndram_w(cputag_get_cpu(space->machine, "sound_cpu"), offset, data, mem_mask);
} }
static ADDRESS_MAP_START( m68k_program_map, ADDRESS_SPACE_PROGRAM, 16 ) static ADDRESS_MAP_START( m68k_program_map, ADDRESS_SPACE_PROGRAM, 16 )

View File

@ -100,17 +100,6 @@ Hardware Info
/*************************************
*
* Constants
*
*************************************/
#define CVS_MAIN_CPU_INDEX (0)
#define CVS_DAC_CPU_INDEX (1)
/************************************* /*************************************
* *
* Global variables * Global variables
@ -265,8 +254,8 @@ static INTERRUPT_GEN( cvs_main_cpu_interrupt )
static void cvs_dac_cpu_interrupt(running_machine *machine) static void cvs_dac_cpu_interrupt(running_machine *machine)
{ {
cpu_set_input_line_vector(machine->cpu[CVS_DAC_CPU_INDEX], 0, 0x03); cpu_set_input_line_vector(cputag_get_cpu(machine, "audiocpu"), 0, 0x03);
cpu_set_input_line(machine->cpu[CVS_DAC_CPU_INDEX], 0, HOLD_LINE); cputag_set_input_line(machine, "audiocpu", 0, HOLD_LINE);
} }

View File

@ -38,8 +38,8 @@
static void update_interrupts(running_machine *machine) static void update_interrupts(running_machine *machine)
{ {
cpu_set_input_line(machine->cpu[0], 1, atarigen_sound_int_state ? ASSERT_LINE : CLEAR_LINE); cputag_set_input_line(machine, "maincpu", 1, atarigen_sound_int_state ? ASSERT_LINE : CLEAR_LINE);
cpu_set_input_line(machine->cpu[2], 1, atarigen_video_int_state ? ASSERT_LINE : CLEAR_LINE); cputag_set_input_line(machine, "extra", 1, atarigen_video_int_state ? ASSERT_LINE : CLEAR_LINE);
} }
@ -49,19 +49,19 @@ static MACHINE_RESET( cyberbal )
atarigen_slapstic_reset(); atarigen_slapstic_reset();
atarigen_interrupt_reset(update_interrupts); atarigen_interrupt_reset(update_interrupts);
atarigen_scanline_timer_reset(machine->primary_screen, cyberbal_scanline_update, 8); atarigen_scanline_timer_reset(machine->primary_screen, cyberbal_scanline_update, 8);
atarigen_sound_io_reset(machine->cpu[1]); atarigen_sound_io_reset(cputag_get_cpu(machine, "audiocpu"));
cyberbal_sound_reset(machine); cyberbal_sound_reset(machine);
/* CPU 2 doesn't run until reset */ /* Extra CPU (second M68k) doesn't run until reset */
cpu_set_input_line(machine->cpu[2], INPUT_LINE_RESET, ASSERT_LINE); cputag_set_input_line(machine, "extra", INPUT_LINE_RESET, ASSERT_LINE);
} }
static void cyberb2p_update_interrupts(running_machine *machine) static void cyberb2p_update_interrupts(running_machine *machine)
{ {
cpu_set_input_line(machine->cpu[0], 1, atarigen_video_int_state ? ASSERT_LINE : CLEAR_LINE); cputag_set_input_line(machine, "maincpu", 1, atarigen_video_int_state ? ASSERT_LINE : CLEAR_LINE);
cpu_set_input_line(machine->cpu[0], 3, atarigen_sound_int_state ? ASSERT_LINE : CLEAR_LINE); cputag_set_input_line(machine, "maincpu", 3, atarigen_sound_int_state ? ASSERT_LINE : CLEAR_LINE);
} }
@ -114,7 +114,7 @@ static READ16_HANDLER( sound_state_r )
static WRITE16_HANDLER( p2_reset_w ) static WRITE16_HANDLER( p2_reset_w )
{ {
cpu_set_input_line(space->machine->cpu[2], INPUT_LINE_RESET, CLEAR_LINE); cputag_set_input_line(space->machine, "extra", INPUT_LINE_RESET, CLEAR_LINE);
} }
@ -972,14 +972,14 @@ static const UINT16 default_eeprom[] =
static DRIVER_INIT( cyberbal ) static DRIVER_INIT( cyberbal )
{ {
atarigen_eeprom_default = default_eeprom; atarigen_eeprom_default = default_eeprom;
atarigen_slapstic_init(machine->cpu[0], 0x018000, 0, 0); atarigen_slapstic_init(cputag_get_cpu(machine, "maincpu"), 0x018000, 0, 0);
} }
static DRIVER_INIT( cyberbt ) static DRIVER_INIT( cyberbt )
{ {
atarigen_eeprom_default = default_eeprom; atarigen_eeprom_default = default_eeprom;
atarigen_slapstic_init(machine->cpu[0], 0x018000, 0, 116); atarigen_slapstic_init(cputag_get_cpu(machine, "maincpu"), 0x018000, 0, 116);
} }

View File

@ -304,7 +304,7 @@ static WRITE16_HANDLER( io_w )
case 0: case 0:
// sound data // sound data
if (ACCESSING_BITS_0_7) if (ACCESSING_BITS_0_7)
cpu_set_input_line(space->machine->cpu[2], 0, HOLD_LINE); cputag_set_input_line(space->machine, "audiocpu", 0, HOLD_LINE);
else else
LOG_UNKNOWN_WRITE LOG_UNKNOWN_WRITE
break; break;

View File

@ -89,7 +89,7 @@ static UINT8 last_wheel_value[4];
static void TTL74148_3S_cb(running_machine *machine) static void TTL74148_3S_cb(running_machine *machine)
{ {
cpu_set_input_line(machine->cpu[0], M6502_IRQ_LINE, TTL74148_output_valid_r(TTL74148_3S) ? CLEAR_LINE : ASSERT_LINE); cputag_set_input_line(machine, "maincpu", M6502_IRQ_LINE, TTL74148_output_valid_r(TTL74148_3S) ? CLEAR_LINE : ASSERT_LINE);
} }

View File

@ -23,7 +23,7 @@ static offs_t blitter_addr;
static void generate_interrupt(running_machine *machine, int state) static void generate_interrupt(running_machine *machine, int state)
{ {
cpu_set_input_line(machine->cpu[0], M6809_FIRQ_LINE, state); cputag_set_input_line(machine, "maincpu", M6809_FIRQ_LINE, state);
} }
static const struct tms34061_interface tms34061intf = static const struct tms34061_interface tms34061intf =

View File

@ -23,7 +23,7 @@ static int xcenter, ycenter;
static TIMER_CALLBACK( cchasm_refresh_end ) static TIMER_CALLBACK( cchasm_refresh_end )
{ {
cpu_set_input_line (machine->cpu[0], 2, ASSERT_LINE); cputag_set_input_line (machine, "maincpu", 2, ASSERT_LINE);
} }
static void cchasm_refresh (running_machine *machine) static void cchasm_refresh (running_machine *machine)
@ -114,7 +114,7 @@ WRITE16_HANDLER( cchasm_refresh_control_w )
cchasm_refresh(space->machine); cchasm_refresh(space->machine);
break; break;
case 0xf7: case 0xf7:
cpu_set_input_line (space->machine->cpu[0], 2, CLEAR_LINE); cputag_set_input_line (space->machine, "maincpu", 2, CLEAR_LINE);
break; break;
} }
} }