mirror of
https://github.com/holub/mame
synced 2025-06-26 22:29:10 +03:00
Clear out remaining global inlines in diexec.h.
This commit is contained in:
parent
0ef1e6deb4
commit
17e66e39fd
@ -1561,7 +1561,7 @@ static void cp1610_xori(cp1610_state *cpustate, int d)
|
||||
static CPU_RESET( cp1610 )
|
||||
{
|
||||
/* This is how we set the reset vector */
|
||||
device_set_input_line(device, CP1610_RESET, PULSE_LINE);
|
||||
device->set_input_line(CP1610_RESET, PULSE_LINE);
|
||||
}
|
||||
|
||||
/***************************************************
|
||||
|
@ -646,7 +646,7 @@ static void i386_trap(i386_state *cpustate,int irq, int irq_gate, int trap_level
|
||||
if(trap_level >= 3)
|
||||
{
|
||||
logerror("IRQ: Triple fault. CPU reset.\n");
|
||||
device_set_input_line(cpustate->device, INPUT_LINE_RESET, PULSE_LINE);
|
||||
cpustate->device->set_input_line(INPUT_LINE_RESET, PULSE_LINE);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -292,7 +292,7 @@ int x87_check_exceptions(i386_state *cpustate)
|
||||
|
||||
if ((cpustate->x87_sw & ~cpustate->x87_cw) & 0x3f)
|
||||
{
|
||||
// device_set_input_line(cpustate->device, INPUT_LINE_FERR, RAISE_LINE);
|
||||
// cpustate->device->execute().set_input_line(INPUT_LINE_FERR, RAISE_LINE);
|
||||
logerror("Unmasked x87 exception (CW:%.4x, SW:%.4x)\n", cpustate->x87_cw, cpustate->x87_sw);
|
||||
if (cpustate->cr[0] & 0x20) // FIXME: 486 and up only
|
||||
{
|
||||
|
@ -111,7 +111,7 @@ static void i80286_trap2(i80286_state *cpustate,UINT32 error)
|
||||
// this is supposed to triggered by support hardware
|
||||
// create a shutdown output line that causes a reset
|
||||
// NMI can wake processor without reset
|
||||
device_set_input_line(cpustate->device, INPUT_LINE_RESET, PULSE_LINE);
|
||||
cpustate->device->set_input_line(INPUT_LINE_RESET, PULSE_LINE);
|
||||
cpustate->trap_level = 0;
|
||||
}
|
||||
|
||||
|
@ -479,7 +479,7 @@ static CPU_EXECUTE( jaguargpu )
|
||||
/* if we're halted, we shouldn't be here */
|
||||
if (!(jaguar->ctrl[G_CTRL] & 1))
|
||||
{
|
||||
//device_set_input_line(device, INPUT_LINE_HALT, ASSERT_LINE);
|
||||
//device->execute().set_input_line(INPUT_LINE_HALT, ASSERT_LINE);
|
||||
jaguar->icount = 0;
|
||||
return;
|
||||
}
|
||||
@ -518,7 +518,7 @@ static CPU_EXECUTE( jaguardsp )
|
||||
/* if we're halted, we shouldn't be here */
|
||||
if (!(jaguar->ctrl[G_CTRL] & 1))
|
||||
{
|
||||
//device_set_input_line(device, INPUT_LINE_HALT, ASSERT_LINE);
|
||||
//device->execute().set_input_line(INPUT_LINE_HALT, ASSERT_LINE);
|
||||
jaguar->icount = 0;
|
||||
return;
|
||||
}
|
||||
@ -1296,8 +1296,8 @@ void jaguargpu_ctrl_w(device_t *device, offs_t offset, UINT32 data, UINT32 mem_m
|
||||
jaguar->ctrl[offset] = newval;
|
||||
if ((oldval ^ newval) & 0x01)
|
||||
{
|
||||
device_set_input_line(device, INPUT_LINE_HALT, (newval & 1) ? CLEAR_LINE : ASSERT_LINE);
|
||||
device_yield(device);
|
||||
device->execute().set_input_line(INPUT_LINE_HALT, (newval & 1) ? CLEAR_LINE : ASSERT_LINE);
|
||||
device->execute().yield();
|
||||
}
|
||||
if (newval & 0x02)
|
||||
{
|
||||
@ -1395,8 +1395,8 @@ void jaguardsp_ctrl_w(device_t *device, offs_t offset, UINT32 data, UINT32 mem_m
|
||||
jaguar->ctrl[offset] = newval;
|
||||
if ((oldval ^ newval) & 0x01)
|
||||
{
|
||||
device_set_input_line(device, INPUT_LINE_HALT, (newval & 1) ? CLEAR_LINE : ASSERT_LINE);
|
||||
device_yield(device);
|
||||
device->execute().set_input_line(INPUT_LINE_HALT, (newval & 1) ? CLEAR_LINE : ASSERT_LINE);
|
||||
device->execute().yield();
|
||||
}
|
||||
if (newval & 0x02)
|
||||
{
|
||||
|
@ -269,7 +269,7 @@ static TIMER_CALLBACK( m37710_timer_cb )
|
||||
cpustate->timers[which]->adjust(cpustate->reload[which], param);
|
||||
|
||||
m37710_set_irq_line(cpustate, curirq, HOLD_LINE);
|
||||
device_triggerint(cpustate->device);
|
||||
cpustate->device->signal_interrupt_trigger();
|
||||
}
|
||||
|
||||
static void m37710_external_tick(m37710i_cpu_struct *cpustate, int timer, int state)
|
||||
|
@ -46,7 +46,7 @@ enum
|
||||
};
|
||||
|
||||
#define M6502_IRQ_LINE 0
|
||||
/* use device_set_input_line(cpudevice, M6502_SET_OVERFLOW, level)
|
||||
/* use cpudevice->execute().set_input_line(M6502_SET_OVERFLOW, level)
|
||||
to change level of the so input line
|
||||
positiv edge sets overflow flag */
|
||||
#define M6502_SET_OVERFLOW 1
|
||||
|
@ -34,7 +34,7 @@ enum
|
||||
};
|
||||
|
||||
#define M6509_IRQ_LINE M6502_IRQ_LINE
|
||||
/* use device_set_input_line(cpudevice, M6509_SET_OVERFLOW, level)
|
||||
/* use cpudevice->execute().set_input_line(M6509_SET_OVERFLOW, level)
|
||||
to change level of the so input line
|
||||
positiv edge sets overflow flag */
|
||||
#define M6509_SET_OVERFLOW 3
|
||||
|
@ -1994,7 +1994,7 @@ CPU_GET_INFO( m68301 )
|
||||
|
||||
void m68307_set_interrupt(device_t *device, int level, int vector)
|
||||
{
|
||||
device_set_input_line_and_vector(device, level, HOLD_LINE, vector);
|
||||
device->execute().set_input_line_and_vector(level, HOLD_LINE, vector);
|
||||
}
|
||||
|
||||
void m68307_timer0_interrupt(legacy_cpu_device *cpudev)
|
||||
|
@ -753,7 +753,7 @@ void mips3com_get_info(mips3_state *mips, UINT32 state, cpuinfo *info)
|
||||
static TIMER_CALLBACK( compare_int_callback )
|
||||
{
|
||||
legacy_cpu_device *device = (legacy_cpu_device *)ptr;
|
||||
device_set_input_line(device, MIPS3_IRQ5, ASSERT_LINE);
|
||||
device->set_input_line(MIPS3_IRQ5, ASSERT_LINE);
|
||||
}
|
||||
|
||||
|
||||
|
@ -1041,8 +1041,8 @@ void sh4_set_irln_input(device_t *device, int value)
|
||||
if (sh4->irln == value)
|
||||
return;
|
||||
sh4->irln = value;
|
||||
device_set_input_line(device, SH4_IRLn, ASSERT_LINE);
|
||||
device_set_input_line(device, SH4_IRLn, CLEAR_LINE);
|
||||
device->execute().set_input_line(SH4_IRLn, ASSERT_LINE);
|
||||
device->execute().set_input_line(SH4_IRLn, CLEAR_LINE);
|
||||
}
|
||||
|
||||
void sh4_set_irq_line(sh4_state *sh4, int irqline, int state) // set state of external interrupt line
|
||||
|
@ -96,7 +96,7 @@ static void unimpl(tms34010_state *tms, UINT16 op)
|
||||
/* extra check to prevent bad things */
|
||||
if (tms->pc == 0 || opcode_table[tms->direct->read_decrypted_word(TOBYTE(tms->pc)) >> 4] == unimpl)
|
||||
{
|
||||
device_set_input_line(tms->device, INPUT_LINE_HALT, ASSERT_LINE);
|
||||
tms->device->set_input_line(INPUT_LINE_HALT, ASSERT_LINE);
|
||||
debugger_break(tms->device->machine());
|
||||
}
|
||||
}
|
||||
|
@ -769,7 +769,7 @@ static TIMER_CALLBACK( internal_interrupt_callback )
|
||||
LOG(("TMS34010 '%s' set internal interrupt $%04x\n", tms->device->tag(), type));
|
||||
|
||||
/* generate triggers so that spin loops can key off them */
|
||||
device_triggerint(tms->device);
|
||||
tms->device->signal_interrupt_trigger();
|
||||
}
|
||||
|
||||
|
||||
@ -1235,7 +1235,7 @@ WRITE16_HANDLER( tms34010_io_register_w )
|
||||
/* if the CPU is halting itself, stop execution right away */
|
||||
if ((data & 0x8000) && !tms->external_host_access)
|
||||
tms->icount = 0;
|
||||
device_set_input_line(tms->device, INPUT_LINE_HALT, (data & 0x8000) ? ASSERT_LINE : CLEAR_LINE);
|
||||
tms->device->set_input_line(INPUT_LINE_HALT, (data & 0x8000) ? ASSERT_LINE : CLEAR_LINE);
|
||||
|
||||
/* NMI issued? */
|
||||
if (data & 0x0100)
|
||||
@ -1386,7 +1386,7 @@ WRITE16_HANDLER( tms34020_io_register_w )
|
||||
/* if the CPU is halting itself, stop execution right away */
|
||||
if ((data & 0x8000) && !tms->external_host_access)
|
||||
tms->icount = 0;
|
||||
device_set_input_line(tms->device, INPUT_LINE_HALT, (data & 0x8000) ? ASSERT_LINE : CLEAR_LINE);
|
||||
tms->device->set_input_line(INPUT_LINE_HALT, (data & 0x8000) ? ASSERT_LINE : CLEAR_LINE);
|
||||
|
||||
/* NMI issued? */
|
||||
if (data & 0x0100)
|
||||
|
@ -545,7 +545,7 @@ static void tms7000_service_timer1( device_t *device )
|
||||
if( --cpustate->t1_decrementer < 0 ) /* Decrement timer1 register and check for underflow */
|
||||
{
|
||||
cpustate->t1_decrementer = cpustate->pf[2]; /* Reload decrementer (8 bit) */
|
||||
device_set_input_line(device, TMS7000_IRQ2_LINE, HOLD_LINE);
|
||||
device->execute().set_input_line(TMS7000_IRQ2_LINE, HOLD_LINE);
|
||||
//LOG( ("tms7000: trigger int2 (cycles: %d)\t%d\tdelta %d\n", cpustate->device->total_cycles(), cpustate->device->total_cycles() - tick, cpustate->cycles_per_INT2-(cpustate->device->total_cycles() - tick) );
|
||||
//tick = cpustate->device->total_cycles() );
|
||||
/* Also, cascade out to timer 2 - timer 2 unimplemented */
|
||||
|
@ -643,7 +643,7 @@ void device_execute_interface::interface_clock_changed()
|
||||
|
||||
IRQ_CALLBACK( device_execute_interface::static_standard_irq_callback )
|
||||
{
|
||||
return device_execute(device)->standard_irq_callback(irqline);
|
||||
return device->execute().standard_irq_callback(irqline);
|
||||
}
|
||||
|
||||
int device_execute_interface::standard_irq_callback(int irqline)
|
||||
|
140
src/emu/diexec.h
140
src/emu/diexec.h
@ -341,144 +341,4 @@ private:
|
||||
typedef device_interface_iterator<device_execute_interface> execute_interface_iterator;
|
||||
|
||||
|
||||
|
||||
//**************************************************************************
|
||||
// INLINE HELPERS
|
||||
//**************************************************************************
|
||||
|
||||
//-------------------------------------------------
|
||||
// device_execute - return a pointer to the device
|
||||
// execute interface for this device
|
||||
//-------------------------------------------------
|
||||
|
||||
inline device_execute_interface *device_execute(device_t *device)
|
||||
{
|
||||
device_execute_interface *intf;
|
||||
if (!device->interface(intf))
|
||||
throw emu_fatalerror("Device '%s' does not have execute interface", device->tag());
|
||||
return intf;
|
||||
}
|
||||
|
||||
|
||||
|
||||
// ======================> device scheduling
|
||||
|
||||
// suspend the given device for a specific reason
|
||||
inline void device_suspend(device_t *device, int reason, bool eatcycles)
|
||||
{
|
||||
device_execute(device)->suspend(reason, eatcycles);
|
||||
}
|
||||
|
||||
// resume the given device for a specific reason
|
||||
inline void device_resume(device_t *device, int reason)
|
||||
{
|
||||
device_execute(device)->resume(reason);
|
||||
}
|
||||
|
||||
|
||||
|
||||
// ======================> synchronization helpers
|
||||
|
||||
// yield the given device until the end of the current timeslice
|
||||
inline void device_yield(device_t *device)
|
||||
{
|
||||
device_execute(device)->yield();
|
||||
}
|
||||
|
||||
// burn device cycles until the end of the current timeslice
|
||||
inline void device_spin(device_t *device)
|
||||
{
|
||||
device_execute(device)->spin();
|
||||
}
|
||||
|
||||
// burn specified device cycles until a trigger
|
||||
inline void device_spin_until_trigger(device_t *device, int trigger)
|
||||
{
|
||||
device_execute(device)->spin_until_trigger(trigger);
|
||||
}
|
||||
|
||||
// burn device cycles for a specific period of time
|
||||
inline void device_spin_until_time(device_t *device, attotime duration)
|
||||
{
|
||||
device_execute(device)->spin_until_time(duration);
|
||||
}
|
||||
|
||||
|
||||
|
||||
// ======================> device timing
|
||||
|
||||
// returns the current local time for a device
|
||||
inline attotime device_get_local_time(device_t *device)
|
||||
{
|
||||
return device_execute(device)->local_time();
|
||||
}
|
||||
|
||||
// safely eats cycles so we don't cross a timeslice boundary
|
||||
inline void device_eat_cycles(device_t *device, int cycles)
|
||||
{
|
||||
device_execute(device)->eat_cycles(cycles);
|
||||
}
|
||||
|
||||
// apply a +/- to the current icount
|
||||
inline void device_adjust_icount(device_t *device, int delta)
|
||||
{
|
||||
device_execute(device)->adjust_icount(delta);
|
||||
}
|
||||
|
||||
// abort execution for the current timeslice, allowing other devices to run before we run again
|
||||
inline void device_abort_timeslice(device_t *device)
|
||||
{
|
||||
device_execute(device)->abort_timeslice();
|
||||
}
|
||||
|
||||
|
||||
|
||||
// ======================> triggers
|
||||
|
||||
// generate a trigger corresponding to an interrupt on the given device
|
||||
inline void device_triggerint(device_t *device)
|
||||
{
|
||||
device_execute(device)->signal_interrupt_trigger();
|
||||
}
|
||||
|
||||
|
||||
|
||||
// ======================> interrupts
|
||||
|
||||
// set the logical state (ASSERT_LINE/CLEAR_LINE) of the an input line on a device
|
||||
inline void device_set_input_line(device_t *device, int line, int state)
|
||||
{
|
||||
device_execute(device)->set_input_line(line, state);
|
||||
}
|
||||
|
||||
// set the vector to be returned during a device's interrupt acknowledge cycle
|
||||
inline void device_set_input_line_vector(device_t *device, int line, int vector)
|
||||
{
|
||||
device_execute(device)->set_input_line_vector(line, vector);
|
||||
}
|
||||
|
||||
// set the logical state (ASSERT_LINE/CLEAR_LINE) of the an input line on a device and its associated vector
|
||||
inline void device_set_input_line_and_vector(device_t *device, int line, int state, int vector)
|
||||
{
|
||||
device_execute(device)->set_input_line_and_vector(line, state, vector);
|
||||
}
|
||||
|
||||
// install a driver-specific callback for IRQ acknowledge
|
||||
inline void device_set_irq_callback(device_t *device, device_irq_acknowledge_callback callback)
|
||||
{
|
||||
device_execute(device)->set_irq_acknowledge_callback(callback);
|
||||
}
|
||||
|
||||
|
||||
|
||||
// ======================> additional helpers
|
||||
|
||||
// burn device cycles until the next interrupt
|
||||
inline void device_spin_until_interrupt(device_t *device)
|
||||
{
|
||||
device_execute(device)->spin_until_interrupt();
|
||||
}
|
||||
|
||||
|
||||
|
||||
#endif /* __DIEXEC_H__ */
|
||||
|
@ -597,7 +597,7 @@ WRITE8_HANDLER(kbdc8042_8_w)
|
||||
* the bits low set in the command byte. The only pulse that has
|
||||
* an effect currently is bit 0, which pulses the CPU's reset line
|
||||
*/
|
||||
device_set_input_line(space->machine().firstcpu, INPUT_LINE_RESET, PULSE_LINE);
|
||||
space->machine().firstcpu->set_input_line(INPUT_LINE_RESET, PULSE_LINE);
|
||||
at_8042_set_outport(space->machine(), kbdc8042.outport | 0x02, 0);
|
||||
break;
|
||||
}
|
||||
|
@ -96,7 +96,7 @@ void k056230_device::network_irq_clear()
|
||||
{
|
||||
if(m_cpu)
|
||||
{
|
||||
device_set_input_line(m_cpu, INPUT_LINE_IRQ2, CLEAR_LINE);
|
||||
m_cpu->execute().set_input_line(INPUT_LINE_IRQ2, CLEAR_LINE);
|
||||
}
|
||||
}
|
||||
|
||||
@ -118,13 +118,13 @@ WRITE8_DEVICE_HANDLER_TRAMPOLINE(k056230, k056230_w)
|
||||
{
|
||||
if(m_cpu)
|
||||
{
|
||||
device_set_input_line(m_cpu, INPUT_LINE_IRQ2, ASSERT_LINE);
|
||||
m_cpu->execute().set_input_line(INPUT_LINE_IRQ2, ASSERT_LINE);
|
||||
}
|
||||
machine().scheduler().timer_set(attotime::from_usec(10), FUNC(network_irq_clear_callback), 0, (void*)this);
|
||||
}
|
||||
}
|
||||
// else
|
||||
// device_set_input_line(k056230->cpu, INPUT_LINE_IRQ2, CLEAR_LINE);
|
||||
// k056230->cpu->execute().set_input_line(INPUT_LINE_IRQ2, CLEAR_LINE);
|
||||
break;
|
||||
}
|
||||
case 2: // Sub ID register
|
||||
|
@ -47,7 +47,7 @@ static TIMER_CALLBACK( tmp68301_timer_callback )
|
||||
tmp68301_irq_vector[level] = IVNR & 0x00e0;
|
||||
tmp68301_irq_vector[level] += 4+i;
|
||||
|
||||
device_set_input_line(machine.firstcpu,level,HOLD_LINE);
|
||||
machine.firstcpu->set_input_line(level,HOLD_LINE);
|
||||
}
|
||||
|
||||
if (TCR & 0x0080) // N/1
|
||||
@ -120,7 +120,7 @@ MACHINE_RESET( tmp68301 )
|
||||
for (i = 0; i < 3; i++)
|
||||
tmp68301_IE[i] = 0;
|
||||
|
||||
device_set_irq_callback(machine.firstcpu, tmp68301_irq_callback);
|
||||
machine.firstcpu->set_irq_acknowledge_callback(tmp68301_irq_callback);
|
||||
}
|
||||
|
||||
/* Update the IRQ state based on all possible causes */
|
||||
@ -150,7 +150,7 @@ static void update_irq_state(running_machine &machine)
|
||||
|
||||
tmp68301_IE[i] = 0; // Interrupts are edge triggerred
|
||||
|
||||
device_set_input_line(machine.firstcpu,level,HOLD_LINE);
|
||||
machine.firstcpu->set_input_line(level,HOLD_LINE);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1241,7 +1241,7 @@ static void dma_scsp(address_space *space, scsp_state *scsp)
|
||||
if(scsp->udata.data[0x1e/2] & 0x10)
|
||||
{
|
||||
popmessage("SCSP DMA IRQ triggered, contact MAMEdev");
|
||||
device_set_input_line(space->machine().device("audiocpu"),DecodeSCI(scsp,SCIDMA),HOLD_LINE);
|
||||
space->machine().device("audiocpu")->execute().set_input_line(DecodeSCI(scsp,SCIDMA),HOLD_LINE);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2159,7 +2159,7 @@ static void stall_cpu(voodoo_state *v, int state, attotime current_time)
|
||||
if (v->pci.stall_callback)
|
||||
(*v->pci.stall_callback)(v->device, TRUE);
|
||||
else
|
||||
device_spin_until_trigger(v->cpu, v->trigger);
|
||||
v->cpu->execute().spin_until_trigger(v->trigger);
|
||||
|
||||
/* set a timer to clear the stall */
|
||||
v->pci.continue_timer->adjust(v->pci.op_end_time - current_time);
|
||||
@ -3800,7 +3800,7 @@ static UINT32 register_r(voodoo_state *v, offs_t offset)
|
||||
/* bit 31 is not used */
|
||||
|
||||
/* eat some cycles since people like polling here */
|
||||
device_eat_cycles(v->cpu, 1000);
|
||||
v->cpu->execute().eat_cycles(1000);
|
||||
break;
|
||||
|
||||
/* bit 2 of the initEnable register maps this to dacRead */
|
||||
@ -3813,7 +3813,7 @@ static UINT32 register_r(voodoo_state *v, offs_t offset)
|
||||
case vRetrace:
|
||||
|
||||
/* eat some cycles since people like polling here */
|
||||
device_eat_cycles(v->cpu, 10);
|
||||
v->cpu->execute().eat_cycles(10);
|
||||
result = v->screen->vpos();
|
||||
break;
|
||||
|
||||
@ -3828,7 +3828,7 @@ static UINT32 register_r(voodoo_state *v, offs_t offset)
|
||||
result = v->fbi.cmdfifo[0].rdptr;
|
||||
|
||||
/* eat some cycles since people like polling here */
|
||||
device_eat_cycles(v->cpu, 1000);
|
||||
v->cpu->execute().eat_cycles(1000);
|
||||
break;
|
||||
|
||||
case cmdFifoAMin:
|
||||
|
@ -49,5 +49,5 @@ INTERRUPT_GEN( aztarac_snd_timed_irq )
|
||||
state->m_sound_status ^= 0x10;
|
||||
|
||||
if (state->m_sound_status & 0x10)
|
||||
device_set_input_line(device,0,HOLD_LINE);
|
||||
device->execute().set_input_line(0,HOLD_LINE);
|
||||
}
|
||||
|
@ -95,7 +95,7 @@ struct sh6840_timer_channel
|
||||
typedef struct _beezer_sound_state beezer_sound_state;
|
||||
struct _beezer_sound_state
|
||||
{
|
||||
device_t *m_maincpu;
|
||||
cpu_device *m_maincpu;
|
||||
|
||||
/* IRQ variable */
|
||||
UINT8 m_ptm_irq_state;
|
||||
@ -384,7 +384,7 @@ static DEVICE_START( common_sh_start )
|
||||
|
||||
/* allocate the stream */
|
||||
state->m_stream = device->machine().sound().stream_alloc(*device, 0, 1, sample_rate, NULL, beezer_stream_update);
|
||||
state->m_maincpu = device->machine().device("maincpu");
|
||||
state->m_maincpu = device->machine().device<cpu_device>("maincpu");
|
||||
|
||||
sh6840_register_state_globals(device);
|
||||
}
|
||||
@ -499,7 +499,7 @@ READ8_DEVICE_HANDLER( beezer_sh6840_r )
|
||||
return 0;
|
||||
/* offset 1 reads the status register: bits 2 1 0 correspond to ints on channels 2,1,0, and bit 7 is an 'OR' of bits 2,1,0 */
|
||||
case 1:
|
||||
logerror("%04X:beezer_sh6840_r - unexpected read, status register is TODO!\n", state->m_maincpu->safe_pc());
|
||||
logerror("%04X:beezer_sh6840_r - unexpected read, status register is TODO!\n", state->m_maincpu->pc());
|
||||
return 0;
|
||||
/* offsets 2,4,6 read channel 0,1,2 MSBs and latch the LSB*/
|
||||
case 2: case 4: case 6:
|
||||
|
@ -209,7 +209,7 @@ void cage_reset_w(address_space *space, int state)
|
||||
cage_t *sndstate = &cage;
|
||||
if (state)
|
||||
cage_control_w(space->machine(), 0);
|
||||
device_set_input_line(sndstate->cpu, INPUT_LINE_RESET, state ? ASSERT_LINE : CLEAR_LINE);
|
||||
sndstate->cpu->set_input_line(INPUT_LINE_RESET, state ? ASSERT_LINE : CLEAR_LINE);
|
||||
}
|
||||
|
||||
|
||||
@ -241,7 +241,7 @@ static TIMER_DEVICE_CALLBACK( dma_timer_callback )
|
||||
tms32031_io_regs[DMA_SOURCE_ADDR] = param;
|
||||
|
||||
/* set the interrupt */
|
||||
device_set_input_line(state->cpu, TMS3203X_DINT, ASSERT_LINE);
|
||||
state->cpu->set_input_line(TMS3203X_DINT, ASSERT_LINE);
|
||||
state->dma_enabled = 0;
|
||||
}
|
||||
|
||||
@ -314,7 +314,7 @@ static TIMER_DEVICE_CALLBACK( cage_timer_callback )
|
||||
int which = param;
|
||||
|
||||
/* set the interrupt */
|
||||
device_set_input_line(state->cpu, TMS3203X_TINT0 + which, ASSERT_LINE);
|
||||
state->cpu->set_input_line(TMS3203X_TINT0 + which, ASSERT_LINE);
|
||||
state->timer_enabled[which] = 0;
|
||||
update_timer(which);
|
||||
}
|
||||
@ -509,7 +509,7 @@ static READ32_HANDLER( cage_from_main_r )
|
||||
logerror("%06X:CAGE read command = %04X\n", space->device().safe_pc(), state->from_main);
|
||||
state->cpu_to_cage_ready = 0;
|
||||
update_control_lines(space->machine());
|
||||
device_set_input_line(state->cpu, TMS3203X_IRQ0, CLEAR_LINE);
|
||||
state->cpu->set_input_line(TMS3203X_IRQ0, CLEAR_LINE);
|
||||
return state->from_main;
|
||||
}
|
||||
|
||||
@ -566,7 +566,7 @@ static TIMER_CALLBACK( cage_deferred_w )
|
||||
state->from_main = param;
|
||||
state->cpu_to_cage_ready = 1;
|
||||
update_control_lines(machine);
|
||||
device_set_input_line(state->cpu, TMS3203X_IRQ0, ASSERT_LINE);
|
||||
state->cpu->set_input_line(TMS3203X_IRQ0, ASSERT_LINE);
|
||||
}
|
||||
|
||||
|
||||
@ -602,7 +602,7 @@ void cage_control_w(running_machine &machine, UINT16 data)
|
||||
/* CPU is reset if both control lines are 0 */
|
||||
if (!(state->control & 3))
|
||||
{
|
||||
device_set_input_line(state->cpu, INPUT_LINE_RESET, ASSERT_LINE);
|
||||
state->cpu->set_input_line(INPUT_LINE_RESET, ASSERT_LINE);
|
||||
|
||||
state->dma_enabled = 0;
|
||||
state->dma_timer_enabled = 0;
|
||||
@ -619,7 +619,7 @@ void cage_control_w(running_machine &machine, UINT16 data)
|
||||
state->cage_to_cpu_ready = 0;
|
||||
}
|
||||
else
|
||||
device_set_input_line(state->cpu, INPUT_LINE_RESET, CLEAR_LINE);
|
||||
state->cpu->set_input_line(INPUT_LINE_RESET, CLEAR_LINE);
|
||||
|
||||
/* update the control state */
|
||||
update_control_lines(machine);
|
||||
@ -637,7 +637,7 @@ static WRITE32_HANDLER( speedup_w )
|
||||
{
|
||||
cage_t *state = &cage;
|
||||
|
||||
device_eat_cycles(&space->device(), 100);
|
||||
space->device().execute().eat_cycles(100);
|
||||
COMBINE_DATA(&state->speedup_ram[offset]);
|
||||
}
|
||||
|
||||
|
@ -796,7 +796,7 @@ static void dcs_boot(running_machine &machine)
|
||||
/* rev 3/4: HALT the ADSP-2181 until program is downloaded via IDMA */
|
||||
case 3:
|
||||
case 4:
|
||||
device_set_input_line(dcs.cpu, INPUT_LINE_HALT, ASSERT_LINE);
|
||||
dcs.cpu->set_input_line(INPUT_LINE_HALT, ASSERT_LINE);
|
||||
dcs.dsio.start_on_next_write = 0;
|
||||
break;
|
||||
}
|
||||
@ -849,9 +849,9 @@ static TIMER_CALLBACK( dcs_reset )
|
||||
memset(dcs.control_regs, 0, sizeof(dcs.control_regs));
|
||||
|
||||
/* clear all interrupts */
|
||||
device_set_input_line(dcs.cpu, ADSP2105_IRQ0, CLEAR_LINE);
|
||||
device_set_input_line(dcs.cpu, ADSP2105_IRQ1, CLEAR_LINE);
|
||||
device_set_input_line(dcs.cpu, ADSP2105_IRQ2, CLEAR_LINE);
|
||||
dcs.cpu->set_input_line(ADSP2105_IRQ0, CLEAR_LINE);
|
||||
dcs.cpu->set_input_line(ADSP2105_IRQ1, CLEAR_LINE);
|
||||
dcs.cpu->set_input_line(ADSP2105_IRQ2, CLEAR_LINE);
|
||||
|
||||
/* initialize the comm bits */
|
||||
SET_INPUT_EMPTY();
|
||||
@ -1477,7 +1477,7 @@ WRITE32_HANDLER( dsio_idma_data_w )
|
||||
if (dsio.start_on_next_write && --dsio.start_on_next_write == 0)
|
||||
{
|
||||
logerror("Starting DSIO CPU\n");
|
||||
device_set_input_line(dcs.cpu, INPUT_LINE_HALT, CLEAR_LINE);
|
||||
dcs.cpu->set_input_line(INPUT_LINE_HALT, CLEAR_LINE);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1529,12 +1529,12 @@ void dcs_reset_w(running_machine &machine, int state)
|
||||
|
||||
/* just run through the init code again */
|
||||
machine.scheduler().synchronize(FUNC(dcs_reset));
|
||||
device_set_input_line(dcs.cpu, INPUT_LINE_RESET, ASSERT_LINE);
|
||||
dcs.cpu->set_input_line(INPUT_LINE_RESET, ASSERT_LINE);
|
||||
}
|
||||
|
||||
/* going low resets and reactivates the CPU */
|
||||
else
|
||||
device_set_input_line(dcs.cpu, INPUT_LINE_RESET, CLEAR_LINE);
|
||||
dcs.cpu->set_input_line(INPUT_LINE_RESET, CLEAR_LINE);
|
||||
}
|
||||
|
||||
|
||||
@ -1576,7 +1576,7 @@ static void dcs_delayed_data_w(running_machine &machine, int data)
|
||||
machine.scheduler().boost_interleave(attotime::from_nsec(500), attotime::from_usec(5));
|
||||
|
||||
/* set the IRQ line on the ADSP */
|
||||
device_set_input_line(dcs.cpu, ADSP2105_IRQ2, ASSERT_LINE);
|
||||
dcs.cpu->set_input_line(ADSP2105_IRQ2, ASSERT_LINE);
|
||||
|
||||
/* indicate we are no longer empty */
|
||||
if (dcs.last_input_empty && dcs.input_empty_cb)
|
||||
@ -1613,7 +1613,7 @@ static WRITE16_HANDLER( input_latch_ack_w )
|
||||
if (!dcs.last_input_empty && dcs.input_empty_cb)
|
||||
(*dcs.input_empty_cb)(space->machine(), dcs.last_input_empty = 1);
|
||||
SET_INPUT_EMPTY();
|
||||
device_set_input_line(dcs.cpu, ADSP2105_IRQ2, CLEAR_LINE);
|
||||
dcs.cpu->set_input_line(ADSP2105_IRQ2, CLEAR_LINE);
|
||||
}
|
||||
|
||||
|
||||
@ -1767,8 +1767,8 @@ static TIMER_DEVICE_CALLBACK( internal_timer_callback )
|
||||
timer.adjust(dcs.cpu->cycles_to_attotime(target_cycles));
|
||||
|
||||
/* the IRQ line is edge triggered */
|
||||
device_set_input_line(dcs.cpu, ADSP2105_TIMER, ASSERT_LINE);
|
||||
device_set_input_line(dcs.cpu, ADSP2105_TIMER, CLEAR_LINE);
|
||||
dcs.cpu->set_input_line(ADSP2105_TIMER, ASSERT_LINE);
|
||||
dcs.cpu->set_input_line(ADSP2105_TIMER, CLEAR_LINE);
|
||||
}
|
||||
|
||||
|
||||
@ -1885,7 +1885,7 @@ static WRITE16_HANDLER( adsp_control_w )
|
||||
if (data & 0x0200)
|
||||
{
|
||||
logerror("%04X:Rebooting DCS due to SYSCONTROL write\n", space->device().safe_pc());
|
||||
device_set_input_line(dcs.cpu, INPUT_LINE_RESET, PULSE_LINE);
|
||||
dcs.cpu->set_input_line(INPUT_LINE_RESET, PULSE_LINE);
|
||||
dcs_boot(space->machine());
|
||||
dcs.control_regs[SYSCONTROL_REG] = 0;
|
||||
}
|
||||
@ -1993,8 +1993,8 @@ static TIMER_DEVICE_CALLBACK( sport0_irq )
|
||||
/* so we skip the SPORT interrupt if we read with output_control within the last 5 cycles */
|
||||
if ((dcs.cpu->total_cycles() - dcs.output_control_cycles) > 5)
|
||||
{
|
||||
device_set_input_line(dcs.cpu, ADSP2115_SPORT0_RX, ASSERT_LINE);
|
||||
device_set_input_line(dcs.cpu, ADSP2115_SPORT0_RX, CLEAR_LINE);
|
||||
dcs.cpu->set_input_line(ADSP2115_SPORT0_RX, ASSERT_LINE);
|
||||
dcs.cpu->set_input_line(ADSP2115_SPORT0_RX, CLEAR_LINE);
|
||||
}
|
||||
}
|
||||
|
||||
@ -2080,7 +2080,7 @@ static void sound_tx_callback(adsp21xx_device &device, int port, INT32 data)
|
||||
static READ16_HANDLER( dcs_polling_r )
|
||||
{
|
||||
if (dcs.polling_count++ > 5)
|
||||
device_eat_cycles(&space->device(), 10000);
|
||||
space->device().execute().eat_cycles(10000);
|
||||
return *dcs.polling_base;
|
||||
}
|
||||
|
||||
|
@ -29,13 +29,13 @@ ADDRESS_MAP_END
|
||||
|
||||
static INTERRUPT_GEN( decobsmt_firq_interrupt )
|
||||
{
|
||||
device_set_input_line(device, M6809_FIRQ_LINE, HOLD_LINE);
|
||||
device->execute().set_input_line(M6809_FIRQ_LINE, HOLD_LINE);
|
||||
}
|
||||
|
||||
static void bsmt_ready_callback(bsmt2000_device &device)
|
||||
{
|
||||
decobsmt_device *decobsmt = device.machine().device<decobsmt_device>(DECOBSMT_TAG);
|
||||
device_set_input_line(decobsmt->m_ourcpu, M6809_IRQ_LINE, ASSERT_LINE); /* BSMT is ready */
|
||||
decobsmt->m_ourcpu->set_input_line(M6809_IRQ_LINE, ASSERT_LINE); /* BSMT is ready */
|
||||
}
|
||||
|
||||
MACHINE_CONFIG_FRAGMENT( decobsmt )
|
||||
@ -119,7 +119,7 @@ WRITE8_MEMBER(decobsmt_device::bsmt1_w)
|
||||
{
|
||||
m_bsmt->write_reg(offset ^ 0xff);
|
||||
m_bsmt->write_data((m_bsmt_latch << 8) | data);
|
||||
device_set_input_line(m_ourcpu, M6809_IRQ_LINE, CLEAR_LINE); /* BSMT is not ready */
|
||||
m_ourcpu->set_input_line(M6809_IRQ_LINE, CLEAR_LINE); /* BSMT is not ready */
|
||||
}
|
||||
|
||||
READ8_MEMBER(decobsmt_device::bsmt_status_r)
|
||||
@ -139,6 +139,6 @@ WRITE8_MEMBER(decobsmt_device::bsmt_comms_w)
|
||||
|
||||
WRITE_LINE_MEMBER(decobsmt_device::bsmt_reset_line)
|
||||
{
|
||||
device_set_input_line(m_ourcpu, INPUT_LINE_RESET, state);
|
||||
m_ourcpu->set_input_line(INPUT_LINE_RESET, state);
|
||||
}
|
||||
|
||||
|
@ -94,7 +94,7 @@ void dsbz80_device::device_reset()
|
||||
|
||||
WRITE8_MEMBER(dsbz80_device::latch_w)
|
||||
{
|
||||
device_set_input_line(m_ourcpu, INPUT_LINE_IRQ0, ASSERT_LINE);
|
||||
m_ourcpu->set_input_line(INPUT_LINE_IRQ0, ASSERT_LINE);
|
||||
m_dsb_latch = data;
|
||||
status |= 2;
|
||||
// printf("%02x to DSB latch\n", data);
|
||||
@ -102,7 +102,7 @@ WRITE8_MEMBER(dsbz80_device::latch_w)
|
||||
|
||||
READ8_MEMBER(dsbz80_device::latch_r)
|
||||
{
|
||||
device_set_input_line(m_ourcpu, INPUT_LINE_IRQ0, CLEAR_LINE);
|
||||
m_ourcpu->set_input_line(INPUT_LINE_IRQ0, CLEAR_LINE);
|
||||
// printf("DSB Z80 read %02x\n", m_dsb_latch);
|
||||
status &= ~2;
|
||||
return m_dsb_latch;
|
||||
|
@ -76,7 +76,7 @@ struct sh8253_timer_channel
|
||||
typedef struct _exidy_sound_state exidy_sound_state;
|
||||
struct _exidy_sound_state
|
||||
{
|
||||
device_t *m_maincpu;
|
||||
cpu_device *m_maincpu;
|
||||
|
||||
/* IRQ variable */
|
||||
UINT8 m_riot_irq_state;
|
||||
@ -402,7 +402,7 @@ static DEVICE_START( common_sh_start )
|
||||
|
||||
/* allocate the stream */
|
||||
state->m_stream = device->machine().sound().stream_alloc(*device, 0, 1, sample_rate, NULL, exidy_stream_update);
|
||||
state->m_maincpu = device->machine().device("maincpu");
|
||||
state->m_maincpu = device->machine().device<cpu_device>("maincpu");
|
||||
|
||||
sh6840_register_state_globals(device);
|
||||
}
|
||||
@ -686,7 +686,7 @@ READ8_DEVICE_HANDLER( exidy_sh6840_r )
|
||||
return 0;
|
||||
/* offset 1 reads the status register: bits 2 1 0 correspond to ints on channels 2,1,0, and bit 7 is an 'OR' of bits 2,1,0 */
|
||||
case 1:
|
||||
logerror("%04X:exidy_sh6840_r - unexpected read, status register is TODO!\n", state->m_maincpu->safe_pc());
|
||||
logerror("%04X:exidy_sh6840_r - unexpected read, status register is TODO!\n", state->m_maincpu->pc());
|
||||
return 0;
|
||||
/* offsets 2,4,6 read channel 0,1,2 MSBs and latch the LSB*/
|
||||
case 2: case 4: case 6:
|
||||
@ -1043,7 +1043,7 @@ READ8_DEVICE_HANDLER( victory_sound_response_r )
|
||||
exidy_sound_state *state = get_safe_token(device);
|
||||
UINT8 ret = state->m_pia1->b_output();
|
||||
|
||||
if (VICTORY_LOG_SOUND) logerror("%04X:!!!! Sound response read = %02X\n", state->m_maincpu->safe_pcbase(), ret);
|
||||
if (VICTORY_LOG_SOUND) logerror("%04X:!!!! Sound response read = %02X\n", state->m_maincpu->pcbase(), ret);
|
||||
|
||||
state->m_pia1->cb1_w(0);
|
||||
|
||||
@ -1056,7 +1056,7 @@ READ8_DEVICE_HANDLER( victory_sound_status_r )
|
||||
exidy_sound_state *state = get_safe_token(device);
|
||||
UINT8 ret = (state->m_pia1->ca1_r() << 7) | (state->m_pia1->cb1_r() << 6);
|
||||
|
||||
if (VICTORY_LOG_SOUND) logerror("%04X:!!!! Sound status read = %02X\n", state->m_maincpu->safe_pcbase(), ret);
|
||||
if (VICTORY_LOG_SOUND) logerror("%04X:!!!! Sound status read = %02X\n", state->m_maincpu->pcbase(), ret);
|
||||
|
||||
return ret;
|
||||
}
|
||||
@ -1073,7 +1073,7 @@ WRITE8_DEVICE_HANDLER( victory_sound_command_w )
|
||||
{
|
||||
exidy_sound_state *state = get_safe_token(device);
|
||||
|
||||
if (VICTORY_LOG_SOUND) logerror("%04X:!!!! Sound command = %02X\n", state->m_maincpu->safe_pcbase(), data);
|
||||
if (VICTORY_LOG_SOUND) logerror("%04X:!!!! Sound command = %02X\n", state->m_maincpu->pcbase(), data);
|
||||
|
||||
device->machine().scheduler().synchronize(FUNC(delayed_command_w), data, state->m_pia1);
|
||||
}
|
||||
|
@ -39,8 +39,8 @@ void hdsnd_init(running_machine &machine)
|
||||
static void update_68k_interrupts(running_machine &machine)
|
||||
{
|
||||
harddriv_state *state = machine.driver_data<harddriv_state>();
|
||||
device_set_input_line(state->m_soundcpu, 1, state->m_mainflag ? ASSERT_LINE : CLEAR_LINE);
|
||||
device_set_input_line(state->m_soundcpu, 3, state->m_irq68k ? ASSERT_LINE : CLEAR_LINE);
|
||||
state->m_soundcpu->set_input_line(1, state->m_mainflag ? ASSERT_LINE : CLEAR_LINE);
|
||||
state->m_soundcpu->set_input_line(3, state->m_irq68k ? ASSERT_LINE : CLEAR_LINE);
|
||||
}
|
||||
|
||||
|
||||
@ -83,8 +83,8 @@ WRITE16_MEMBER(harddriv_state::hd68k_snd_data_w)
|
||||
|
||||
WRITE16_MEMBER(harddriv_state::hd68k_snd_reset_w)
|
||||
{
|
||||
device_set_input_line(m_soundcpu, INPUT_LINE_RESET, ASSERT_LINE);
|
||||
device_set_input_line(m_soundcpu, INPUT_LINE_RESET, CLEAR_LINE);
|
||||
m_soundcpu->set_input_line(INPUT_LINE_RESET, ASSERT_LINE);
|
||||
m_soundcpu->set_input_line(INPUT_LINE_RESET, CLEAR_LINE);
|
||||
m_mainflag = m_soundflag = 0;
|
||||
update_68k_interrupts(machine());
|
||||
logerror("%06X:Reset sound\n", space.device().safe_pcbase());
|
||||
@ -188,7 +188,7 @@ WRITE16_MEMBER(harddriv_state::hdsnd68k_latches_w)
|
||||
case 4: /* RES320 */
|
||||
logerror("%06X:RES320=%d\n", space.device().safe_pcbase(), data);
|
||||
if (m_sounddsp != NULL)
|
||||
device_set_input_line(m_sounddsp, INPUT_LINE_HALT, data ? CLEAR_LINE : ASSERT_LINE);
|
||||
m_sounddsp->set_input_line(INPUT_LINE_HALT, data ? CLEAR_LINE : ASSERT_LINE);
|
||||
break;
|
||||
|
||||
case 7: /* LED */
|
||||
@ -277,7 +277,7 @@ READ16_MEMBER(harddriv_state::hdsnddsp_get_bio)
|
||||
/* if we're not at the next BIO yet, advance us there */
|
||||
if (cycles_until_bio > 0)
|
||||
{
|
||||
device_adjust_icount(&space.device(), -cycles_until_bio);
|
||||
space.device().execute().adjust_icount(-cycles_until_bio);
|
||||
m_last_bio_cycles += CYCLES_PER_BIO;
|
||||
}
|
||||
else
|
||||
|
@ -778,7 +778,7 @@ static IRQ_CALLBACK( int_callback )
|
||||
if (LOG_INTERRUPTS) logerror("(%f) **** Acknowledged interrupt vector %02X\n", device->machine().time().as_double(), state->m_i80186.intr.poll_status & 0x1f);
|
||||
|
||||
/* clear the interrupt */
|
||||
device_set_input_line(state->m_i80186.cpu, 0, CLEAR_LINE);
|
||||
state->m_i80186.cpu->execute().set_input_line(0, CLEAR_LINE);
|
||||
state->m_i80186.intr.pending = 0;
|
||||
|
||||
/* clear the request and set the in-service bit */
|
||||
@ -1603,7 +1603,7 @@ static WRITE16_DEVICE_HANDLER( i80186_internal_port_w )
|
||||
/* we need to do this at a time when the 80186 context is swapped in */
|
||||
/* this register is generally set once at startup and never again, so it's a good */
|
||||
/* time to set it up */
|
||||
device_set_irq_callback(state->m_i80186.cpu, int_callback);
|
||||
state->m_i80186.cpu->execute().set_irq_acknowledge_callback(int_callback);
|
||||
break;
|
||||
|
||||
case 0xc0/2:
|
||||
|
@ -135,7 +135,7 @@ static WRITE8_HANDLER( namco_52xx_O_w )
|
||||
static TIMER_CALLBACK( namco_52xx_irq_clear )
|
||||
{
|
||||
namco_52xx_state *state = get_safe_token((device_t *)ptr);
|
||||
device_set_input_line(state->m_cpu, 0, CLEAR_LINE);
|
||||
state->m_cpu->execute().set_input_line(0, CLEAR_LINE);
|
||||
}
|
||||
|
||||
WRITE8_DEVICE_HANDLER( namco_52xx_write )
|
||||
@ -144,7 +144,7 @@ WRITE8_DEVICE_HANDLER( namco_52xx_write )
|
||||
|
||||
device->machine().scheduler().synchronize(FUNC(namco_52xx_latch_callback), data, (void *)device);
|
||||
|
||||
device_set_input_line(state->m_cpu, 0, ASSERT_LINE);
|
||||
state->m_cpu->execute().set_input_line(0, ASSERT_LINE);
|
||||
|
||||
// The execution time of one instruction is ~4us, so we must make sure to
|
||||
// give the cpu time to poll the /IRQ input before we clear it.
|
||||
|
@ -113,7 +113,7 @@ static WRITE8_HANDLER( namco_54xx_R1_w )
|
||||
static TIMER_CALLBACK( namco_54xx_irq_clear )
|
||||
{
|
||||
namco_54xx_state *state = get_safe_token((device_t *)ptr);
|
||||
device_set_input_line(state->m_cpu, 0, CLEAR_LINE);
|
||||
state->m_cpu->execute().set_input_line(0, CLEAR_LINE);
|
||||
}
|
||||
|
||||
WRITE8_DEVICE_HANDLER( namco_54xx_write )
|
||||
@ -122,7 +122,7 @@ WRITE8_DEVICE_HANDLER( namco_54xx_write )
|
||||
|
||||
device->machine().scheduler().synchronize(FUNC(namco_54xx_latch_callback), data, (void *)device);
|
||||
|
||||
device_set_input_line(state->m_cpu, 0, ASSERT_LINE);
|
||||
state->m_cpu->execute().set_input_line(0, ASSERT_LINE);
|
||||
|
||||
// The execution time of one instruction is ~4us, so we must make sure to
|
||||
// give the cpu time to poll the /IRQ input before we clear it.
|
||||
|
@ -163,7 +163,7 @@ WRITE8_MEMBER(scramble_state::frogger_filter_w)
|
||||
|
||||
void scramble_sh_init(running_machine &machine)
|
||||
{
|
||||
device_set_irq_callback(machine.device("audiocpu"), scramble_sh_irq_callback);
|
||||
machine.device("audiocpu")->execute().set_irq_acknowledge_callback(scramble_sh_irq_callback);
|
||||
|
||||
/* PR is always 0, D is always 1 */
|
||||
machine.device<ttl7474_device>("konami_7474")->d_w(1);
|
||||
|
@ -447,7 +447,7 @@ static DEVICE_RESET( usb_sound )
|
||||
usb_state *usb = get_safe_token(device);
|
||||
|
||||
/* halt the USB CPU at reset time */
|
||||
device_set_input_line(usb->cpu, INPUT_LINE_RESET, ASSERT_LINE);
|
||||
usb->cpu->execute().set_input_line(INPUT_LINE_RESET, ASSERT_LINE);
|
||||
|
||||
/* start the clock timer */
|
||||
usb->t1_clock_mask = 0x10;
|
||||
@ -467,7 +467,7 @@ READ8_DEVICE_HANDLER( sega_usb_status_r )
|
||||
|
||||
LOG(("%04X:usb_data_r = %02X\n", usb->maincpu->safe_pc(), (usb->out_latch & 0x81) | (usb->in_latch & 0x7e)));
|
||||
|
||||
device_adjust_icount(usb->maincpu, -200);
|
||||
usb->maincpu->execute().adjust_icount(-200);
|
||||
|
||||
/* only bits 0 and 7 are controlled by the I8035; the remaining */
|
||||
/* bits 1-6 reflect the current input latch values */
|
||||
@ -481,7 +481,7 @@ static TIMER_CALLBACK( delayed_usb_data_w )
|
||||
int data = param;
|
||||
|
||||
/* look for rising/falling edges of bit 7 to control the RESET line */
|
||||
device_set_input_line(usb->cpu, INPUT_LINE_RESET, (data & 0x80) ? ASSERT_LINE : CLEAR_LINE);
|
||||
usb->cpu->execute().set_input_line(INPUT_LINE_RESET, (data & 0x80) ? ASSERT_LINE : CLEAR_LINE);
|
||||
|
||||
/* if the CLEAR line is set, the low 7 bits of the input are ignored */
|
||||
if ((usb->last_p2_value & 0x40) == 0)
|
||||
|
@ -289,9 +289,9 @@ static void update_irq_lines(running_machine &machine, int param)
|
||||
}
|
||||
|
||||
if ((irq1 & irq2) == 0xff) /* no IRQs pending */
|
||||
device_set_input_line(sound_cpu,0,CLEAR_LINE);
|
||||
sound_cpu->execute().set_input_line(0,CLEAR_LINE);
|
||||
else /* IRQ pending */
|
||||
device_set_input_line_and_vector(sound_cpu,0,ASSERT_LINE,irq1 & irq2);
|
||||
sound_cpu->execute().set_input_line_and_vector(0,ASSERT_LINE,irq1 & irq2);
|
||||
}
|
||||
|
||||
WRITE8_HANDLER( seibu_irq_clear_w )
|
||||
|
@ -205,9 +205,9 @@ static TIMER_CALLBACK( setirq_callback )
|
||||
return;
|
||||
|
||||
if (irqstate == 0) /* no IRQs pending */
|
||||
device_set_input_line(cpu,0,CLEAR_LINE);
|
||||
cpu->execute().set_input_line(0,CLEAR_LINE);
|
||||
else /* IRQ pending */
|
||||
device_set_input_line(cpu,0,ASSERT_LINE);
|
||||
cpu->execute().set_input_line(0,ASSERT_LINE);
|
||||
}
|
||||
|
||||
|
||||
|
@ -267,12 +267,12 @@ static void taito_en_duart_irq_handler(device_t *device, int state, UINT8 vector
|
||||
{
|
||||
if (state == ASSERT_LINE)
|
||||
{
|
||||
device_set_input_line_vector(device->machine().device("audiocpu"), M68K_IRQ_6, vector);
|
||||
device_set_input_line(device->machine().device("audiocpu"), M68K_IRQ_6, ASSERT_LINE);
|
||||
device->machine().device("audiocpu")->execute().set_input_line_vector(M68K_IRQ_6, vector);
|
||||
device->machine().device("audiocpu")->execute().set_input_line(M68K_IRQ_6, ASSERT_LINE);
|
||||
}
|
||||
else
|
||||
{
|
||||
device_set_input_line(device->machine().device("audiocpu"), M68K_IRQ_6, CLEAR_LINE);
|
||||
device->machine().device("audiocpu")->execute().set_input_line(M68K_IRQ_6, CLEAR_LINE);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -59,7 +59,7 @@ static void interrupt_controller( device_t *device )
|
||||
|
||||
if (tc0140syt->nmi_req && tc0140syt->nmi_enabled)
|
||||
{
|
||||
device_set_input_line(tc0140syt->slavecpu, INPUT_LINE_NMI, PULSE_LINE);
|
||||
tc0140syt->slavecpu->execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE);
|
||||
tc0140syt->nmi_req = 0;
|
||||
}
|
||||
}
|
||||
@ -113,11 +113,11 @@ WRITE8_DEVICE_HANDLER( tc0140syt_comm_w )
|
||||
//logerror("taitosnd: Master issued control value %02x (PC = %08x) \n",data, space->device().safe_pc() );
|
||||
/* this does a hi-lo transition to reset the sound cpu */
|
||||
if (data)
|
||||
device_set_input_line(tc0140syt->slavecpu, INPUT_LINE_RESET, ASSERT_LINE);
|
||||
tc0140syt->slavecpu->execute().set_input_line(INPUT_LINE_RESET, ASSERT_LINE);
|
||||
else
|
||||
{
|
||||
device_set_input_line(tc0140syt->slavecpu, INPUT_LINE_RESET, CLEAR_LINE);
|
||||
device_spin(tc0140syt->mastercpu); /* otherwise no sound in driftout */
|
||||
tc0140syt->slavecpu->execute().set_input_line(INPUT_LINE_RESET, CLEAR_LINE);
|
||||
tc0140syt->mastercpu->execute().spin(); /* otherwise no sound in driftout */
|
||||
}
|
||||
break;
|
||||
|
||||
@ -191,7 +191,7 @@ WRITE8_DEVICE_HANDLER( tc0140syt_slave_comm_w )
|
||||
tc0140syt->masterdata[tc0140syt->submode ++] = data;
|
||||
tc0140syt->status |= TC0140SYT_PORT01_FULL_MASTER;
|
||||
//logerror("taitosnd: Slave cpu sends 0/1 : %01x%01x\n" , tc0140syt->masterdata[1] , tc0140syt->masterdata[0]);
|
||||
device_spin(tc0140syt->slavecpu); /* writing should take longer than emulated, so spin */
|
||||
tc0140syt->slavecpu->execute().spin(); /* writing should take longer than emulated, so spin */
|
||||
break;
|
||||
|
||||
case 0x02: // mode #2
|
||||
@ -203,7 +203,7 @@ WRITE8_DEVICE_HANDLER( tc0140syt_slave_comm_w )
|
||||
tc0140syt->masterdata[tc0140syt->submode ++] = data;
|
||||
tc0140syt->status |= TC0140SYT_PORT23_FULL_MASTER;
|
||||
//logerror("taitosnd: Slave cpu sends 2/3 : %01x%01x\n" , tc0140syt->masterdata[3] , tc0140syt->masterdata[2]);
|
||||
device_spin(tc0140syt->slavecpu); /* writing should take longer than emulated, so spin */
|
||||
tc0140syt->slavecpu->execute().spin(); /* writing should take longer than emulated, so spin */
|
||||
break;
|
||||
|
||||
case 0x04: // port status
|
||||
|
@ -151,7 +151,7 @@ WRITE8_HANDLER( timeplt_sh_irqtrigger_w )
|
||||
if (state->m_last_irq_state == 0 && data)
|
||||
{
|
||||
/* setting bit 0 low then high triggers IRQ on the sound CPU */
|
||||
device_set_input_line_and_vector(state->m_soundcpu, 0, HOLD_LINE, 0xff);
|
||||
state->m_soundcpu->set_input_line_and_vector(0, HOLD_LINE, 0xff);
|
||||
}
|
||||
|
||||
state->m_last_irq_state = data;
|
||||
|
@ -148,7 +148,7 @@ WRITE8_HANDLER( konami_sh_irqtrigger_w )
|
||||
if (state->m_last_irq == 0 && data)
|
||||
{
|
||||
/* setting bit 0 low then high triggers IRQ on the sound CPU */
|
||||
device_set_input_line_and_vector(state->m_audiocpu, 0, HOLD_LINE, 0xff);
|
||||
state->m_audiocpu->set_input_line_and_vector(0, HOLD_LINE, 0xff);
|
||||
}
|
||||
|
||||
state->m_last_irq = data;
|
||||
|
@ -240,7 +240,7 @@ static MACHINE_START( 1942 )
|
||||
{
|
||||
_1942_state *state = machine.driver_data<_1942_state>();
|
||||
|
||||
state->m_audiocpu = machine.device("audiocpu");
|
||||
state->m_audiocpu = machine.device<cpu_device>("audiocpu");
|
||||
|
||||
state->save_item(NAME(state->m_palette_bank));
|
||||
state->save_item(NAME(state->m_scroll));
|
||||
|
@ -113,7 +113,7 @@ WRITE8_MEMBER(_20pacgal_state::irqack_w)
|
||||
m_irq_mask = data & 1;
|
||||
|
||||
if (!m_irq_mask)
|
||||
device_set_input_line(m_maincpu, 0, CLEAR_LINE);
|
||||
m_maincpu->set_input_line(0, CLEAR_LINE);
|
||||
}
|
||||
|
||||
WRITE8_MEMBER(_20pacgal_state::timer_pulse_w)
|
||||
@ -345,7 +345,7 @@ static MACHINE_START( 20pacgal )
|
||||
{
|
||||
_20pacgal_state *state = machine.driver_data<_20pacgal_state>();
|
||||
|
||||
state->m_maincpu = machine.device("maincpu");
|
||||
state->m_maincpu = machine.device<cpu_device>("maincpu");
|
||||
state->m_eeprom = machine.device("eeprom");
|
||||
|
||||
state->save_item(NAME(state->m_game_selected));
|
||||
@ -367,7 +367,7 @@ static INTERRUPT_GEN( vblank_irq )
|
||||
_20pacgal_state *state = device->machine().driver_data<_20pacgal_state>();
|
||||
|
||||
if(state->m_irq_mask)
|
||||
device_set_input_line(device, 0, HOLD_LINE); // TODO: assert breaks the inputs in 25pacman test mode
|
||||
device->execute().set_input_line(0, HOLD_LINE); // TODO: assert breaks the inputs in 25pacman test mode
|
||||
}
|
||||
|
||||
static MACHINE_CONFIG_START( 20pacgal, _20pacgal_state )
|
||||
|
@ -54,7 +54,7 @@ public:
|
||||
UINT16 irq_reg;
|
||||
|
||||
/* devices */
|
||||
device_t *m_maincpu;
|
||||
cpu_device *m_maincpu;
|
||||
DECLARE_READ16_MEMBER(drill_io_r);
|
||||
DECLARE_WRITE16_MEMBER(drill_io_w);
|
||||
DECLARE_WRITE16_MEMBER(sensors_w);
|
||||
@ -399,13 +399,13 @@ GFXDECODE_END
|
||||
|
||||
static INTERRUPT_GEN( drill_vblank_irq )
|
||||
{
|
||||
device_set_input_line(device, 4, ASSERT_LINE);
|
||||
device->execute().set_input_line(4, ASSERT_LINE);
|
||||
}
|
||||
|
||||
#if 0
|
||||
static INTERRUPT_GEN( drill_device_irq )
|
||||
{
|
||||
device_set_input_line(device, 5, ASSERT_LINE);
|
||||
device->execute().set_input_line(5, ASSERT_LINE);
|
||||
}
|
||||
#endif
|
||||
|
||||
@ -413,7 +413,7 @@ static INTERRUPT_GEN( drill_device_irq )
|
||||
static void irqhandler(device_t *device, int irq)
|
||||
{
|
||||
// _2mindril_state *state = machine.driver_data<_2mindril_state>();
|
||||
// device_set_input_line(state->m_maincpu, 5, irq ? ASSERT_LINE : CLEAR_LINE);
|
||||
// state->m_maincpu->set_input_line(5, irq ? ASSERT_LINE : CLEAR_LINE);
|
||||
}
|
||||
|
||||
static const ym2610_interface ym2610_config =
|
||||
@ -426,7 +426,7 @@ static MACHINE_START( drill )
|
||||
{
|
||||
_2mindril_state *state = machine.driver_data<_2mindril_state>();
|
||||
|
||||
state->m_maincpu = machine.device("maincpu");
|
||||
state->m_maincpu = machine.device<cpu_device>("maincpu");
|
||||
|
||||
state->save_item(NAME(state->m_defender_sensor));
|
||||
state->save_item(NAME(state->m_shutter_sensor));
|
||||
|
@ -133,7 +133,7 @@ static MACHINE_RESET( 3do )
|
||||
{
|
||||
_3do_state *state = machine.driver_data<_3do_state>();
|
||||
|
||||
state->m_maincpu = downcast<legacy_cpu_device*>( machine.device("maincpu") );
|
||||
state->m_maincpu = downcast<legacy_cpu_device*>( machine.device<cpu_device>("maincpu") );
|
||||
|
||||
state->membank("bank2")->set_base(state->memregion("user1")->base());
|
||||
|
||||
|
@ -235,7 +235,7 @@ static TIMER_CALLBACK( nmi_callback )
|
||||
{
|
||||
fortyl_state *state = machine.driver_data<fortyl_state>();
|
||||
if (state->m_sound_nmi_enable)
|
||||
device_set_input_line(state->m_audiocpu, INPUT_LINE_NMI, PULSE_LINE);
|
||||
state->m_audiocpu->set_input_line(INPUT_LINE_NMI, PULSE_LINE);
|
||||
else
|
||||
state->m_pending_nmi = 1;
|
||||
}
|
||||
@ -256,7 +256,7 @@ WRITE8_MEMBER(fortyl_state::nmi_enable_w)
|
||||
m_sound_nmi_enable = 1;
|
||||
if (m_pending_nmi)
|
||||
{
|
||||
device_set_input_line(m_audiocpu, INPUT_LINE_NMI, PULSE_LINE);
|
||||
m_audiocpu->set_input_line(INPUT_LINE_NMI, PULSE_LINE);
|
||||
m_pending_nmi = 0;
|
||||
}
|
||||
}
|
||||
@ -978,7 +978,7 @@ static MACHINE_START( 40love )
|
||||
{
|
||||
fortyl_state *state = machine.driver_data<fortyl_state>();
|
||||
|
||||
state->m_audiocpu = machine.device("audiocpu");
|
||||
state->m_audiocpu = machine.device<cpu_device>("audiocpu");
|
||||
|
||||
/* video */
|
||||
state->save_item(NAME(state->m_pix1));
|
||||
|
@ -70,7 +70,7 @@ WRITE8_MEMBER(_88games_state::k88games_5f84_w)
|
||||
|
||||
WRITE8_MEMBER(_88games_state::k88games_sh_irqtrigger_w)
|
||||
{
|
||||
device_set_input_line_and_vector(m_audiocpu, 0, HOLD_LINE, 0xff);
|
||||
m_audiocpu->set_input_line_and_vector(0, HOLD_LINE, 0xff);
|
||||
}
|
||||
|
||||
|
||||
@ -309,7 +309,7 @@ static MACHINE_START( 88games )
|
||||
{
|
||||
_88games_state *state = machine.driver_data<_88games_state>();
|
||||
|
||||
state->m_audiocpu = machine.device("audiocpu");
|
||||
state->m_audiocpu = machine.device<cpu_device>("audiocpu");
|
||||
state->m_k052109 = machine.device("k052109");
|
||||
state->m_k051960 = machine.device("k051960");
|
||||
state->m_k051316 = machine.device("k051316");
|
||||
|
@ -84,7 +84,7 @@ static VIDEO_START( acefruit )
|
||||
static INTERRUPT_GEN( acefruit_vblank )
|
||||
{
|
||||
acefruit_state *state = device->machine().driver_data<acefruit_state>();
|
||||
device_set_input_line(device, 0, HOLD_LINE );
|
||||
device->execute().set_input_line(0, HOLD_LINE );
|
||||
state->m_refresh_timer->adjust( attotime::zero );
|
||||
}
|
||||
|
||||
|
@ -154,7 +154,7 @@ static TIMER_CALLBACK( m_aces1_irq_timer_callback )
|
||||
{
|
||||
aces1_state *state = machine.driver_data<aces1_state>();
|
||||
// printf("irq\n");
|
||||
device_set_input_line(state->m_maincpu, INPUT_LINE_IRQ0, HOLD_LINE);
|
||||
state->m_maincpu->set_input_line(INPUT_LINE_IRQ0, HOLD_LINE);
|
||||
state->aces1_reset_irq_timer();
|
||||
}
|
||||
|
||||
@ -162,7 +162,7 @@ static TIMER_CALLBACK( m_aces1_nmi_timer_callback )
|
||||
{
|
||||
aces1_state *state = machine.driver_data<aces1_state>();
|
||||
// printf("nmi\n");
|
||||
device_set_input_line(state->m_maincpu, INPUT_LINE_NMI, PULSE_LINE);
|
||||
state->m_maincpu->set_input_line(INPUT_LINE_NMI, PULSE_LINE);
|
||||
state->aces1_reset_nmi_timer();
|
||||
}
|
||||
|
||||
|
@ -56,7 +56,7 @@ READ8_MEMBER(actfancr_state::triothep_control_r)
|
||||
WRITE8_MEMBER(actfancr_state::actfancr_sound_w)
|
||||
{
|
||||
soundlatch_byte_w(space, 0, data & 0xff);
|
||||
device_set_input_line(m_audiocpu, INPUT_LINE_NMI, PULSE_LINE);
|
||||
m_audiocpu->set_input_line(INPUT_LINE_NMI, PULSE_LINE);
|
||||
}
|
||||
|
||||
/******************************************************************************/
|
||||
@ -279,7 +279,7 @@ GFXDECODE_END
|
||||
static void sound_irq(device_t *device, int linestate)
|
||||
{
|
||||
actfancr_state *state = device->machine().driver_data<actfancr_state>();
|
||||
device_set_input_line(state->m_audiocpu, 0, linestate); /* IRQ */
|
||||
state->m_audiocpu->set_input_line(0, linestate); /* IRQ */
|
||||
}
|
||||
|
||||
static const ym3812_interface ym3812_config =
|
||||
@ -293,8 +293,8 @@ static MACHINE_START( actfancr )
|
||||
{
|
||||
actfancr_state *state = machine.driver_data<actfancr_state>();
|
||||
|
||||
state->m_maincpu = machine.device("maincpu");
|
||||
state->m_audiocpu = machine.device("audiocpu");
|
||||
state->m_maincpu = machine.device<cpu_device>("maincpu");
|
||||
state->m_audiocpu = machine.device<cpu_device>("audiocpu");
|
||||
}
|
||||
|
||||
static MACHINE_START( triothep )
|
||||
|
@ -173,7 +173,7 @@ public:
|
||||
struct { int r,g,b,offs,offs_internal; } m_pal;
|
||||
|
||||
/* devices */
|
||||
device_t *m_maincpu;
|
||||
cpu_device *m_maincpu;
|
||||
device_t *m_duart;
|
||||
DECLARE_READ16_MEMBER(test_r);
|
||||
DECLARE_WRITE16_MEMBER(wh2_w);
|
||||
@ -269,7 +269,7 @@ if (!screen.machine().input().code_pressed(KEYCODE_O)) // debug: toggle window
|
||||
static void duart_irq_handler( device_t *device, int state, UINT8 vector )
|
||||
{
|
||||
adp_state *adp = device->machine().driver_data<adp_state>();
|
||||
device_set_input_line_and_vector(adp->m_maincpu, 4, state, vector);
|
||||
adp->m_maincpu->set_input_line_and_vector(4, state, vector);
|
||||
}
|
||||
|
||||
static void duart_tx( device_t *device, int channel, UINT8 data )
|
||||
@ -301,7 +301,7 @@ static MACHINE_START( skattv )
|
||||
{
|
||||
adp_state *state = machine.driver_data<adp_state>();
|
||||
|
||||
state->m_maincpu = machine.device("maincpu");
|
||||
state->m_maincpu = machine.device<cpu_device>("maincpu");
|
||||
state->m_duart = machine.device("duart68681");
|
||||
//state->m_h63484 = machine.device("h63484");
|
||||
|
||||
@ -623,7 +623,7 @@ INPUT_PORTS_END
|
||||
/*
|
||||
static INTERRUPT_GEN( adp_int )
|
||||
{
|
||||
device_set_input_line(device, 1, HOLD_LINE); // ??? All irqs have the same vector, and the mask used is 0 or 7
|
||||
device->execute().set_input_line(1, HOLD_LINE); // ??? All irqs have the same vector, and the mask used is 0 or 7
|
||||
}
|
||||
*/
|
||||
static const ay8910_interface ay8910_config =
|
||||
|
@ -44,7 +44,7 @@ static INTERRUPT_GEN( aeroboto_interrupt )
|
||||
aeroboto_state *state = device->machine().driver_data<aeroboto_state>();
|
||||
|
||||
if (!state->m_disable_irq)
|
||||
device_set_input_line(device, 0, ASSERT_LINE);
|
||||
device->execute().set_input_line(0, ASSERT_LINE);
|
||||
else
|
||||
state->m_disable_irq--;
|
||||
}
|
||||
|
@ -72,7 +72,7 @@ WRITE16_MEMBER(aerofgt_state::sound_command_w)
|
||||
{
|
||||
m_pending_command = 1;
|
||||
soundlatch_byte_w(space, offset, data & 0xff);
|
||||
device_set_input_line(m_audiocpu, INPUT_LINE_NMI, PULSE_LINE);
|
||||
m_audiocpu->set_input_line(INPUT_LINE_NMI, PULSE_LINE);
|
||||
}
|
||||
}
|
||||
|
||||
@ -82,7 +82,7 @@ WRITE16_MEMBER(aerofgt_state::turbofrc_sound_command_w)
|
||||
{
|
||||
m_pending_command = 1;
|
||||
soundlatch_byte_w(space, offset, (data >> 8) & 0xff);
|
||||
device_set_input_line(m_audiocpu, INPUT_LINE_NMI, PULSE_LINE);
|
||||
m_audiocpu->set_input_line(INPUT_LINE_NMI, PULSE_LINE);
|
||||
}
|
||||
}
|
||||
|
||||
@ -91,7 +91,7 @@ WRITE16_MEMBER(aerofgt_state::aerfboot_soundlatch_w)
|
||||
if(ACCESSING_BITS_8_15)
|
||||
{
|
||||
soundlatch_byte_w(space, 0, (data >> 8) & 0xff);
|
||||
device_set_input_line(m_audiocpu, INPUT_LINE_NMI, PULSE_LINE);
|
||||
m_audiocpu->set_input_line(INPUT_LINE_NMI, PULSE_LINE);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1280,7 +1280,7 @@ GFXDECODE_END
|
||||
static void irqhandler( device_t *device, int irq )
|
||||
{
|
||||
aerofgt_state *state = device->machine().driver_data<aerofgt_state>();
|
||||
device_set_input_line(state->m_audiocpu, 0, irq ? ASSERT_LINE : CLEAR_LINE);
|
||||
state->m_audiocpu->set_input_line(0, irq ? ASSERT_LINE : CLEAR_LINE);
|
||||
}
|
||||
|
||||
static const ym2610_interface ym2610_config =
|
||||
@ -1298,7 +1298,7 @@ static MACHINE_START( common )
|
||||
{
|
||||
aerofgt_state *state = machine.driver_data<aerofgt_state>();
|
||||
|
||||
state->m_audiocpu = machine.device("audiocpu");
|
||||
state->m_audiocpu = machine.device<cpu_device>("audiocpu");
|
||||
state->save_item(NAME(state->m_pending_command));
|
||||
}
|
||||
|
||||
|
@ -261,7 +261,7 @@ READ8_MEMBER(airbustr_state::devram_r)
|
||||
|
||||
WRITE8_MEMBER(airbustr_state::master_nmi_trigger_w)
|
||||
{
|
||||
device_set_input_line(m_slave, INPUT_LINE_NMI, PULSE_LINE);
|
||||
m_slave->execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE);
|
||||
}
|
||||
|
||||
WRITE8_MEMBER(airbustr_state::master_bankswitch_w)
|
||||
@ -308,7 +308,7 @@ WRITE8_MEMBER(airbustr_state::soundcommand_w)
|
||||
{
|
||||
soundlatch_byte_w(space, 0, data);
|
||||
m_soundlatch_status = 1; // soundlatch has been written
|
||||
device_set_input_line(m_audiocpu, INPUT_LINE_NMI, PULSE_LINE); // cause a nmi to sub cpu
|
||||
m_audiocpu->set_input_line(INPUT_LINE_NMI, PULSE_LINE); // cause a nmi to sub cpu
|
||||
}
|
||||
|
||||
WRITE8_MEMBER(airbustr_state::soundcommand2_w)
|
||||
@ -563,7 +563,7 @@ static TIMER_DEVICE_CALLBACK( airbustr_scanline )
|
||||
/* Sub Z80 uses IM2 too, but 0xff irq routine just contains an irq ack in it */
|
||||
static INTERRUPT_GEN( slave_interrupt )
|
||||
{
|
||||
device_set_input_line_and_vector(device, 0, HOLD_LINE, 0xfd);
|
||||
device->execute().set_input_line_and_vector(0, HOLD_LINE, 0xfd);
|
||||
}
|
||||
|
||||
/* Machine Initialization */
|
||||
@ -584,7 +584,7 @@ static MACHINE_START( airbustr )
|
||||
|
||||
state->m_master = machine.device("master");
|
||||
state->m_slave = machine.device("slave");
|
||||
state->m_audiocpu = machine.device("audiocpu");
|
||||
state->m_audiocpu = machine.device<cpu_device>("audiocpu");
|
||||
state->m_pandora = machine.device("pandora");
|
||||
|
||||
state->save_item(NAME(state->m_soundlatch_status));
|
||||
|
@ -24,7 +24,7 @@ static INTERRUPT_GEN( aliens_interrupt )
|
||||
aliens_state *state = device->machine().driver_data<aliens_state>();
|
||||
|
||||
if (k051960_is_irq_enabled(state->m_k051960))
|
||||
device_set_input_line(device, KONAMI_IRQ_LINE, HOLD_LINE);
|
||||
device->execute().set_input_line(KONAMI_IRQ_LINE, HOLD_LINE);
|
||||
}
|
||||
|
||||
READ8_MEMBER(aliens_state::bankedram_r)
|
||||
@ -70,7 +70,7 @@ WRITE8_MEMBER(aliens_state::aliens_sh_irqtrigger_w)
|
||||
{
|
||||
|
||||
soundlatch_byte_w(space, offset, data);
|
||||
device_set_input_line(m_audiocpu, 0, HOLD_LINE);
|
||||
m_audiocpu->set_input_line(0, HOLD_LINE);
|
||||
}
|
||||
|
||||
WRITE8_MEMBER(aliens_state::aliens_snd_bankswitch_w)
|
||||
@ -234,8 +234,8 @@ static MACHINE_START( aliens )
|
||||
state->membank("bank1")->configure_entries(0, 20, &ROM[0x10000], 0x2000);
|
||||
state->membank("bank1")->set_entry(0);
|
||||
|
||||
state->m_maincpu = machine.device("maincpu");
|
||||
state->m_audiocpu = machine.device("audiocpu");
|
||||
state->m_maincpu = machine.device<cpu_device>("maincpu");
|
||||
state->m_audiocpu = machine.device<cpu_device>("audiocpu");
|
||||
state->m_k007232 = machine.device("k007232");
|
||||
state->m_k052109 = machine.device("k052109");
|
||||
state->m_k051960 = machine.device("k051960");
|
||||
|
@ -315,7 +315,7 @@ WRITE16_MEMBER(alpha68k_state::paddlema_soundlatch_w)
|
||||
if (ACCESSING_BITS_0_7)
|
||||
{
|
||||
soundlatch_byte_w(space, 0, data);
|
||||
device_set_input_line(m_audiocpu, 0, HOLD_LINE);
|
||||
m_audiocpu->set_input_line(0, HOLD_LINE);
|
||||
}
|
||||
}
|
||||
|
||||
@ -324,7 +324,7 @@ WRITE16_MEMBER(alpha68k_state::tnextspc_soundlatch_w)
|
||||
if (ACCESSING_BITS_0_7)
|
||||
{
|
||||
soundlatch_byte_w(space, 0, data);
|
||||
device_set_input_line(m_audiocpu, INPUT_LINE_NMI, PULSE_LINE);
|
||||
m_audiocpu->set_input_line(INPUT_LINE_NMI, PULSE_LINE);
|
||||
}
|
||||
}
|
||||
//ZT
|
||||
@ -1851,7 +1851,7 @@ static const ym2203_interface ym2203_config =
|
||||
static void YM3812_irq( device_t *device, int param )
|
||||
{
|
||||
alpha68k_state *state = device->machine().driver_data<alpha68k_state>();
|
||||
device_set_input_line(state->m_audiocpu, 0, (param) ? HOLD_LINE : CLEAR_LINE);
|
||||
state->m_audiocpu->set_input_line(0, (param) ? HOLD_LINE : CLEAR_LINE);
|
||||
}
|
||||
|
||||
static const ym3812_interface ym3812_config =
|
||||
@ -1867,7 +1867,7 @@ static MACHINE_START( common )
|
||||
{
|
||||
alpha68k_state *state = machine.driver_data<alpha68k_state>();
|
||||
|
||||
state->m_audiocpu = machine.device("audiocpu");
|
||||
state->m_audiocpu = machine.device<cpu_device>("audiocpu");
|
||||
|
||||
state->save_item(NAME(state->m_trigstate));
|
||||
state->save_item(NAME(state->m_deposits1));
|
||||
@ -2128,7 +2128,7 @@ static INTERRUPT_GEN( alpha68k_sound_nmi )
|
||||
alpha68k_state *state = device->machine().driver_data<alpha68k_state>();
|
||||
|
||||
if(state->m_sound_nmi_mask)
|
||||
device_set_input_line(device, INPUT_LINE_NMI, PULSE_LINE);
|
||||
device->execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE);
|
||||
}
|
||||
|
||||
static MACHINE_CONFIG_START( alpha68k_II, alpha68k_state )
|
||||
|
@ -908,7 +908,7 @@ static INTERRUPT_GEN( amaticmg2_irq )
|
||||
amaticmg_state *state = device->machine().driver_data<amaticmg_state>();
|
||||
|
||||
if(state->m_nmi_mask)
|
||||
device_set_input_line(device, INPUT_LINE_NMI, PULSE_LINE);
|
||||
device->execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE);
|
||||
}
|
||||
|
||||
|
||||
|
@ -71,7 +71,7 @@ READ8_MEMBER(amspdwy_state::amspdwy_sound_r)
|
||||
WRITE8_MEMBER(amspdwy_state::amspdwy_sound_w)
|
||||
{
|
||||
soundlatch_byte_w(space, 0, data);
|
||||
device_set_input_line(m_audiocpu, INPUT_LINE_NMI, PULSE_LINE);
|
||||
m_audiocpu->set_input_line(INPUT_LINE_NMI, PULSE_LINE);
|
||||
}
|
||||
|
||||
static ADDRESS_MAP_START( amspdwy_map, AS_PROGRAM, 8, amspdwy_state )
|
||||
@ -242,7 +242,7 @@ GFXDECODE_END
|
||||
static void irq_handler( device_t *device, int irq )
|
||||
{
|
||||
amspdwy_state *state = device->machine().driver_data<amspdwy_state>();
|
||||
device_set_input_line(state->m_audiocpu, 0, irq ? ASSERT_LINE : CLEAR_LINE);
|
||||
state->m_audiocpu->set_input_line(0, irq ? ASSERT_LINE : CLEAR_LINE);
|
||||
}
|
||||
|
||||
static const ym2151_interface amspdwy_ym2151_interface =
|
||||
@ -254,7 +254,7 @@ static MACHINE_START( amspdwy )
|
||||
{
|
||||
amspdwy_state *state = machine.driver_data<amspdwy_state>();
|
||||
|
||||
state->m_audiocpu = machine.device("audiocpu");
|
||||
state->m_audiocpu = machine.device<cpu_device>("audiocpu");
|
||||
|
||||
state->save_item(NAME(state->m_flipscreen));
|
||||
state->save_item(NAME(state->m_wheel_old));
|
||||
|
@ -510,7 +510,7 @@ READ8_MEMBER(angelkds_state::angelkds_sub_sound_r)
|
||||
static void irqhandler( device_t *device, int irq )
|
||||
{
|
||||
angelkds_state *state = device->machine().driver_data<angelkds_state>();
|
||||
device_set_input_line(state->m_subcpu, 0, irq ? ASSERT_LINE : CLEAR_LINE);
|
||||
state->m_subcpu->set_input_line(0, irq ? ASSERT_LINE : CLEAR_LINE);
|
||||
}
|
||||
|
||||
static const ym2203_interface ym2203_config =
|
||||
@ -572,7 +572,7 @@ static MACHINE_START( angelkds )
|
||||
{
|
||||
angelkds_state *state = machine.driver_data<angelkds_state>();
|
||||
|
||||
state->m_subcpu = machine.device("sub");
|
||||
state->m_subcpu = machine.device<cpu_device>("sub");
|
||||
|
||||
state->save_item(NAME(state->m_layer_ctrl));
|
||||
state->save_item(NAME(state->m_txbank));
|
||||
|
@ -436,7 +436,7 @@ static INTERRUPT_GEN( vblank_irq )
|
||||
appoooh_state *state = device->machine().driver_data<appoooh_state>();
|
||||
|
||||
if(state->m_nmi_mask)
|
||||
device_set_input_line(device, INPUT_LINE_NMI, PULSE_LINE);
|
||||
device->execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE);
|
||||
}
|
||||
|
||||
static MACHINE_CONFIG_START( appoooh_common, appoooh_state )
|
||||
|
@ -63,7 +63,7 @@ WRITE16_MEMBER(aquarium_state::aquarium_sound_w)
|
||||
// popmessage("sound write %04x",data);
|
||||
|
||||
soundlatch_byte_w(space, 1, data & 0xff);
|
||||
device_set_input_line(m_audiocpu, INPUT_LINE_NMI, PULSE_LINE );
|
||||
m_audiocpu->set_input_line(INPUT_LINE_NMI, PULSE_LINE );
|
||||
}
|
||||
|
||||
WRITE8_MEMBER(aquarium_state::aquarium_z80_bank_w)
|
||||
@ -291,7 +291,7 @@ GFXDECODE_END
|
||||
static void irq_handler( device_t *device, int irq )
|
||||
{
|
||||
aquarium_state *state = device->machine().driver_data<aquarium_state>();
|
||||
device_set_input_line(state->m_audiocpu, 0 , irq ? ASSERT_LINE : CLEAR_LINE);
|
||||
state->m_audiocpu->set_input_line(0 , irq ? ASSERT_LINE : CLEAR_LINE);
|
||||
}
|
||||
|
||||
static const ym2151_interface ym2151_config =
|
||||
@ -304,7 +304,7 @@ static MACHINE_START( aquarium )
|
||||
{
|
||||
aquarium_state *state = machine.driver_data<aquarium_state>();
|
||||
|
||||
state->m_audiocpu = machine.device("audiocpu");
|
||||
state->m_audiocpu = machine.device<cpu_device>("audiocpu");
|
||||
|
||||
state->save_item(NAME(state->m_aquarium_snd_ack));
|
||||
}
|
||||
|
@ -273,7 +273,7 @@ GFXDECODE_END
|
||||
static void ym2203_irq_handler( device_t *device, int irq )
|
||||
{
|
||||
ashnojoe_state *state = device->machine().driver_data<ashnojoe_state>();
|
||||
device_set_input_line(state->m_audiocpu, 0, irq ? ASSERT_LINE : CLEAR_LINE);
|
||||
state->m_audiocpu->set_input_line(0, irq ? ASSERT_LINE : CLEAR_LINE);
|
||||
}
|
||||
|
||||
WRITE8_MEMBER(ashnojoe_state::ym2203_write_a)
|
||||
@ -314,7 +314,7 @@ static void ashnojoe_vclk_cb( device_t *device )
|
||||
else
|
||||
{
|
||||
msm5205_data_w(device, state->m_adpcm_byte & 0xf);
|
||||
device_set_input_line(state->m_audiocpu, INPUT_LINE_NMI, PULSE_LINE);
|
||||
state->m_audiocpu->set_input_line(INPUT_LINE_NMI, PULSE_LINE);
|
||||
}
|
||||
|
||||
state->m_msm5205_vclk_toggle ^= 1;
|
||||
@ -331,7 +331,7 @@ static MACHINE_START( ashnojoe )
|
||||
{
|
||||
ashnojoe_state *state = machine.driver_data<ashnojoe_state>();
|
||||
|
||||
state->m_audiocpu = machine.device("audiocpu");
|
||||
state->m_audiocpu = machine.device<cpu_device>("audiocpu");
|
||||
|
||||
state->save_item(NAME(state->m_adpcm_byte));
|
||||
state->save_item(NAME(state->m_soundlatch_status));
|
||||
|
@ -61,7 +61,7 @@ static INTERRUPT_GEN( asterix_interrupt )
|
||||
if (!k056832_is_irq_enabled(state->m_k056832, 0))
|
||||
return;
|
||||
|
||||
device_set_input_line(device, 5, HOLD_LINE); /* ??? All irqs have the same vector, and the mask used is 0 or 7 */
|
||||
device->execute().set_input_line(5, HOLD_LINE); /* ??? All irqs have the same vector, and the mask used is 0 or 7 */
|
||||
}
|
||||
|
||||
READ8_MEMBER(asterix_state::asterix_sound_r)
|
||||
@ -73,19 +73,19 @@ READ8_MEMBER(asterix_state::asterix_sound_r)
|
||||
static TIMER_CALLBACK( nmi_callback )
|
||||
{
|
||||
asterix_state *state = machine.driver_data<asterix_state>();
|
||||
device_set_input_line(state->m_audiocpu, INPUT_LINE_NMI, ASSERT_LINE);
|
||||
state->m_audiocpu->set_input_line(INPUT_LINE_NMI, ASSERT_LINE);
|
||||
}
|
||||
|
||||
WRITE8_MEMBER(asterix_state::sound_arm_nmi_w)
|
||||
{
|
||||
|
||||
device_set_input_line(m_audiocpu, INPUT_LINE_NMI, CLEAR_LINE);
|
||||
m_audiocpu->set_input_line(INPUT_LINE_NMI, CLEAR_LINE);
|
||||
machine().scheduler().timer_set(attotime::from_usec(5), FUNC(nmi_callback));
|
||||
}
|
||||
|
||||
WRITE16_MEMBER(asterix_state::sound_irq_w)
|
||||
{
|
||||
device_set_input_line(m_audiocpu, 0, HOLD_LINE);
|
||||
m_audiocpu->set_input_line(0, HOLD_LINE);
|
||||
}
|
||||
|
||||
// Check the routine at 7f30 in the ead version.
|
||||
@ -247,8 +247,8 @@ static MACHINE_START( asterix )
|
||||
{
|
||||
asterix_state *state = machine.driver_data<asterix_state>();
|
||||
|
||||
state->m_maincpu = machine.device("maincpu");
|
||||
state->m_audiocpu = machine.device("audiocpu");
|
||||
state->m_maincpu = machine.device<cpu_device>("maincpu");
|
||||
state->m_audiocpu = machine.device<cpu_device>("audiocpu");
|
||||
state->m_k053260 = machine.device("k053260");
|
||||
state->m_k056832 = machine.device("k056832");
|
||||
state->m_k053244 = machine.device("k053244");
|
||||
|
@ -218,7 +218,7 @@ static SCREEN_UPDATE_RGB32( spaceint )
|
||||
static TIMER_CALLBACK( kamikaze_int_off )
|
||||
{
|
||||
astinvad_state *state = machine.driver_data<astinvad_state>();
|
||||
device_set_input_line(state->m_maincpu, 0, CLEAR_LINE);
|
||||
state->m_maincpu->set_input_line(0, CLEAR_LINE);
|
||||
}
|
||||
|
||||
|
||||
@ -226,7 +226,7 @@ static TIMER_CALLBACK( kamizake_int_gen )
|
||||
{
|
||||
astinvad_state *state = machine.driver_data<astinvad_state>();
|
||||
/* interrupts are asserted on every state change of the 128V line */
|
||||
device_set_input_line(state->m_maincpu, 0, ASSERT_LINE);
|
||||
state->m_maincpu->set_input_line(0, ASSERT_LINE);
|
||||
param ^= 128;
|
||||
state->m_int_timer->adjust(machine.primary_screen->time_until_pos(param), param);
|
||||
|
||||
@ -284,7 +284,7 @@ static MACHINE_RESET( spaceint )
|
||||
INPUT_CHANGED_MEMBER(astinvad_state::spaceint_coin_inserted)
|
||||
{
|
||||
/* coin insertion causes an NMI */
|
||||
device_set_input_line(m_maincpu, INPUT_LINE_NMI, newval ? ASSERT_LINE : CLEAR_LINE);
|
||||
m_maincpu->set_input_line(INPUT_LINE_NMI, newval ? ASSERT_LINE : CLEAR_LINE);
|
||||
}
|
||||
|
||||
|
||||
|
@ -81,7 +81,7 @@
|
||||
|
||||
READ8_MEMBER(astrof_state::irq_clear_r)
|
||||
{
|
||||
device_set_input_line(m_maincpu, 0, CLEAR_LINE);
|
||||
m_maincpu->set_input_line(0, CLEAR_LINE);
|
||||
|
||||
return 0;
|
||||
}
|
||||
@ -90,7 +90,7 @@ READ8_MEMBER(astrof_state::irq_clear_r)
|
||||
static TIMER_DEVICE_CALLBACK( irq_callback )
|
||||
{
|
||||
astrof_state *state = timer.machine().driver_data<astrof_state>();
|
||||
device_set_input_line(state->m_maincpu, 0, ASSERT_LINE);
|
||||
state->m_maincpu->set_input_line(0, ASSERT_LINE);
|
||||
}
|
||||
|
||||
|
||||
@ -105,7 +105,7 @@ INPUT_CHANGED_MEMBER(astrof_state::coin_inserted)
|
||||
{
|
||||
|
||||
/* coin insertion causes an NMI */
|
||||
device_set_input_line(m_maincpu, INPUT_LINE_NMI, newval ? ASSERT_LINE : CLEAR_LINE);
|
||||
m_maincpu->set_input_line(INPUT_LINE_NMI, newval ? ASSERT_LINE : CLEAR_LINE);
|
||||
coin_counter_w(machine(), 0, newval);
|
||||
}
|
||||
|
||||
@ -114,7 +114,7 @@ INPUT_CHANGED_MEMBER(astrof_state::service_coin_inserted)
|
||||
{
|
||||
|
||||
/* service coin insertion causes an NMI */
|
||||
device_set_input_line(m_maincpu, INPUT_LINE_NMI, newval ? ASSERT_LINE : CLEAR_LINE);
|
||||
m_maincpu->set_input_line(INPUT_LINE_NMI, newval ? ASSERT_LINE : CLEAR_LINE);
|
||||
}
|
||||
|
||||
|
||||
@ -490,7 +490,7 @@ static MACHINE_START( astrof )
|
||||
/* the 74175 outputs all HI's if not otherwise set */
|
||||
astrof_set_video_control_2(machine, 0xff);
|
||||
|
||||
state->m_maincpu = machine.device("maincpu");
|
||||
state->m_maincpu = machine.device<cpu_device>("maincpu");
|
||||
state->m_samples = machine.device<samples_device>("samples");
|
||||
|
||||
/* register for state saving */
|
||||
@ -524,7 +524,7 @@ static MACHINE_START( spfghmk2 )
|
||||
/* the 74175 outputs all HI's if not otherwise set */
|
||||
spfghmk2_set_video_control_2(machine, 0xff);
|
||||
|
||||
state->m_maincpu = machine.device("maincpu");
|
||||
state->m_maincpu = machine.device<cpu_device>("maincpu");
|
||||
|
||||
/* the red background circuit is disabled */
|
||||
state->m_red_on = FALSE;
|
||||
@ -543,7 +543,7 @@ static MACHINE_START( tomahawk )
|
||||
/* the 74175 outputs all HI's if not otherwise set */
|
||||
tomahawk_set_video_control_2(machine, 0xff);
|
||||
|
||||
state->m_maincpu = machine.device("maincpu");
|
||||
state->m_maincpu = machine.device<cpu_device>("maincpu");
|
||||
state->m_sn = machine.device("snsnd");
|
||||
|
||||
/* register for state saving */
|
||||
|
@ -233,13 +233,13 @@ DIP locations verified for:
|
||||
static TIMER_CALLBACK( cadash_interrupt5 )
|
||||
{
|
||||
asuka_state *state = machine.driver_data<asuka_state>();
|
||||
device_set_input_line(state->m_maincpu, 5, HOLD_LINE);
|
||||
state->m_maincpu->set_input_line(5, HOLD_LINE);
|
||||
}
|
||||
|
||||
static INTERRUPT_GEN( cadash_interrupt )
|
||||
{
|
||||
device->machine().scheduler().timer_set(downcast<cpu_device *>(device)->cycles_to_attotime(500), FUNC(cadash_interrupt5));
|
||||
device_set_input_line(device, 4, HOLD_LINE); /* interrupt vector 4 */
|
||||
device->execute().set_input_line(4, HOLD_LINE); /* interrupt vector 4 */
|
||||
}
|
||||
|
||||
|
||||
@ -837,8 +837,8 @@ static MACHINE_START( asuka )
|
||||
{
|
||||
asuka_state *state = machine.driver_data<asuka_state>();
|
||||
|
||||
state->m_maincpu = machine.device("maincpu");
|
||||
state->m_audiocpu = machine.device("audiocpu");
|
||||
state->m_maincpu = machine.device<cpu_device>("maincpu");
|
||||
state->m_audiocpu = machine.device<cpu_device>("audiocpu");
|
||||
state->m_pc090oj = machine.device("pc090oj");
|
||||
state->m_tc0100scn = machine.device("tc0100scn");
|
||||
|
||||
|
@ -508,7 +508,7 @@ static MACHINE_START( atarifb )
|
||||
{
|
||||
atarifb_state *state = machine.driver_data<atarifb_state>();
|
||||
|
||||
state->m_maincpu = machine.device("maincpu");
|
||||
state->m_maincpu = machine.device<cpu_device>("maincpu");
|
||||
|
||||
state->save_item(NAME(state->m_CTRLD));
|
||||
state->save_item(NAME(state->m_sign_x_1));
|
||||
|
@ -884,7 +884,7 @@ static INTERRUPT_GEN( avt_vblank_irq )
|
||||
{
|
||||
avt_state *state = device->machine().driver_data<avt_state>();
|
||||
|
||||
device_set_input_line_and_vector(state->m_maincpu, 0, HOLD_LINE, 0x06);
|
||||
state->m_maincpu->set_input_line_and_vector(0, HOLD_LINE, 0x06);
|
||||
}
|
||||
|
||||
static MACHINE_CONFIG_START( avt, avt_state )
|
||||
|
@ -37,7 +37,7 @@ static IRQ_CALLBACK(aztarac_irq_callback)
|
||||
|
||||
static MACHINE_RESET( aztarac )
|
||||
{
|
||||
device_set_irq_callback(machine.device("maincpu"), aztarac_irq_callback);
|
||||
machine.device("maincpu")->execute().set_irq_acknowledge_callback(aztarac_irq_callback);
|
||||
}
|
||||
|
||||
|
||||
|
@ -42,7 +42,7 @@ public:
|
||||
bitmap_ind16 *m_right;
|
||||
|
||||
/* devices */
|
||||
device_t *m_maincpu;
|
||||
cpu_device *m_maincpu;
|
||||
device_t *m_deco_tilegen1;
|
||||
device_t *m_deco_tilegen2;
|
||||
|
||||
@ -433,7 +433,7 @@ static const ymz280b_interface ymz280b_intf =
|
||||
|
||||
static INTERRUPT_GEN( deco32_vbl_interrupt )
|
||||
{
|
||||
device_set_input_line(device, ARM_IRQ_LINE, HOLD_LINE);
|
||||
device->execute().set_input_line(ARM_IRQ_LINE, HOLD_LINE);
|
||||
}
|
||||
|
||||
|
||||
@ -475,7 +475,7 @@ static MACHINE_START( backfire )
|
||||
{
|
||||
backfire_state *state = machine.driver_data<backfire_state>();
|
||||
|
||||
state->m_maincpu = machine.device("maincpu");
|
||||
state->m_maincpu = machine.device<cpu_device>("maincpu");
|
||||
state->m_deco_tilegen1 = machine.device("tilegen1");
|
||||
state->m_deco_tilegen2 = machine.device("tilegen2");
|
||||
state->m_lscreen = machine.device("lscreen");
|
||||
@ -701,8 +701,8 @@ READ32_MEMBER(backfire_state::backfire_speedup_r)
|
||||
|
||||
//mame_printf_debug( "%08x\n",space.device().safe_pc());
|
||||
|
||||
if (space.device() .safe_pc()== 0xce44) device_spin_until_time(&space.device(), attotime::from_usec(400)); // backfire
|
||||
if (space.device().safe_pc() == 0xcee4) device_spin_until_time(&space.device(), attotime::from_usec(400)); // backfirea
|
||||
if (space.device() .safe_pc()== 0xce44) space.device().execute().spin_until_time(attotime::from_usec(400)); // backfire
|
||||
if (space.device().safe_pc() == 0xcee4) space.device().execute().spin_until_time(attotime::from_usec(400)); // backfirea
|
||||
|
||||
return m_mainram[0x18/4];
|
||||
}
|
||||
|
@ -467,7 +467,7 @@ static INTERRUPT_GEN( vblank_irq )
|
||||
bagman_state *state = device->machine().driver_data<bagman_state>();
|
||||
|
||||
if(state->m_irq_mask)
|
||||
device_set_input_line(device, 0, HOLD_LINE);
|
||||
device->execute().set_input_line(0, HOLD_LINE);
|
||||
}
|
||||
|
||||
|
||||
|
@ -295,7 +295,7 @@ static INTERRUPT_GEN( vblank_irq )
|
||||
bankp_state *state = device->machine().driver_data<bankp_state>();
|
||||
|
||||
if(state->m_nmi_mask)
|
||||
device_set_input_line(device, INPUT_LINE_NMI, PULSE_LINE);
|
||||
device->execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE);
|
||||
}
|
||||
|
||||
static MACHINE_CONFIG_START( bankp, bankp_state )
|
||||
|
@ -48,8 +48,8 @@ WRITE8_MEMBER(battlane_state::battlane_cpu_command_w)
|
||||
/*
|
||||
if (~m_cpu_control & 0x08)
|
||||
{
|
||||
device_set_input_line(m_maincpu, INPUT_LINE_NMI, PULSE_LINE);
|
||||
device_set_input_line(m_subcpu, INPUT_LINE_NMI, PULSE_LINE);
|
||||
m_maincpu->set_input_line(INPUT_LINE_NMI, PULSE_LINE);
|
||||
m_subcpu->set_input_line(INPUT_LINE_NMI, PULSE_LINE);
|
||||
}
|
||||
*/
|
||||
|
||||
@ -57,7 +57,7 @@ WRITE8_MEMBER(battlane_state::battlane_cpu_command_w)
|
||||
CPU2's SWI will trigger an 6809 IRQ on the master by resetting 0x04
|
||||
Master will respond by setting the bit back again
|
||||
*/
|
||||
device_set_input_line(m_maincpu, M6809_IRQ_LINE, data & 0x04 ? CLEAR_LINE : HOLD_LINE);
|
||||
m_maincpu->set_input_line(M6809_IRQ_LINE, data & 0x04 ? CLEAR_LINE : HOLD_LINE);
|
||||
|
||||
/*
|
||||
Slave function call (e.g. ROM test):
|
||||
@ -75,7 +75,7 @@ WRITE8_MEMBER(battlane_state::battlane_cpu_command_w)
|
||||
FA96: 27 FA BEQ $FA92 ; Wait for bit to be set
|
||||
*/
|
||||
|
||||
device_set_input_line(m_subcpu, M6809_IRQ_LINE, data & 0x02 ? CLEAR_LINE : HOLD_LINE);
|
||||
m_subcpu->set_input_line(M6809_IRQ_LINE, data & 0x02 ? CLEAR_LINE : HOLD_LINE);
|
||||
}
|
||||
|
||||
static INTERRUPT_GEN( battlane_cpu1_interrupt )
|
||||
@ -85,8 +85,8 @@ static INTERRUPT_GEN( battlane_cpu1_interrupt )
|
||||
/* See note in battlane_cpu_command_w */
|
||||
if (~state->m_cpu_control & 0x08)
|
||||
{
|
||||
device_set_input_line(device, INPUT_LINE_NMI, PULSE_LINE);
|
||||
device_set_input_line(state->m_subcpu, INPUT_LINE_NMI, PULSE_LINE);
|
||||
device->execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE);
|
||||
state->m_subcpu->set_input_line(INPUT_LINE_NMI, PULSE_LINE);
|
||||
}
|
||||
}
|
||||
|
||||
@ -271,8 +271,8 @@ static MACHINE_START( battlane )
|
||||
{
|
||||
battlane_state *state = machine.driver_data<battlane_state>();
|
||||
|
||||
state->m_maincpu = machine.device("maincpu");
|
||||
state->m_subcpu = machine.device("sub");
|
||||
state->m_maincpu = machine.device<cpu_device>("maincpu");
|
||||
state->m_subcpu = machine.device<cpu_device>("sub");
|
||||
|
||||
state->save_item(NAME(state->m_video_ctrl));
|
||||
state->save_item(NAME(state->m_cpu_control));
|
||||
|
@ -52,7 +52,7 @@ static INTERRUPT_GEN( battlex_interrupt )
|
||||
{
|
||||
battlex_state *state = device->machine().driver_data<battlex_state>();
|
||||
state->m_in0_b4 = 1;
|
||||
device_set_input_line(device, 0, ASSERT_LINE);
|
||||
device->execute().set_input_line(0, ASSERT_LINE);
|
||||
}
|
||||
|
||||
CUSTOM_INPUT_MEMBER(battlex_state::battlex_in0_b4_r)
|
||||
|
@ -29,12 +29,12 @@ static INTERRUPT_GEN( battlnts_interrupt )
|
||||
{
|
||||
battlnts_state *state = device->machine().driver_data<battlnts_state>();
|
||||
if (k007342_is_int_enabled(state->m_k007342))
|
||||
device_set_input_line(device, HD6309_IRQ_LINE, HOLD_LINE);
|
||||
device->execute().set_input_line(HD6309_IRQ_LINE, HOLD_LINE);
|
||||
}
|
||||
|
||||
WRITE8_MEMBER(battlnts_state::battlnts_sh_irqtrigger_w)
|
||||
{
|
||||
device_set_input_line_and_vector(m_audiocpu, 0, HOLD_LINE, 0xff);
|
||||
m_audiocpu->set_input_line_and_vector(0, HOLD_LINE, 0xff);
|
||||
}
|
||||
|
||||
WRITE8_MEMBER(battlnts_state::battlnts_bankswitch_w)
|
||||
@ -228,7 +228,7 @@ static MACHINE_START( battlnts )
|
||||
|
||||
state->membank("bank1")->configure_entries(0, 4, &ROM[0x10000], 0x4000);
|
||||
|
||||
state->m_audiocpu = machine.device("audiocpu");
|
||||
state->m_audiocpu = machine.device<cpu_device>("audiocpu");
|
||||
state->m_k007342 = machine.device("k007342");
|
||||
state->m_k007420 = machine.device("k007420");
|
||||
|
||||
|
@ -281,7 +281,7 @@ WRITE16_MEMBER(bbusters_state::gun_select_w)
|
||||
|
||||
logerror("%08x: gun r\n",space.device().safe_pc());
|
||||
|
||||
device_set_input_line(&space.device(), 2, HOLD_LINE);
|
||||
space.device().execute().set_input_line(2, HOLD_LINE);
|
||||
|
||||
m_gun_select = data & 0xff;
|
||||
}
|
||||
|
@ -73,7 +73,7 @@ public:
|
||||
UINT8 m_controller_select;
|
||||
|
||||
/* devices */
|
||||
device_t *m_maincpu;
|
||||
cpu_device *m_maincpu;
|
||||
DECLARE_READ8_MEMBER(v128_r);
|
||||
DECLARE_WRITE8_MEMBER(controller_select_w);
|
||||
DECLARE_READ8_MEMBER(controller_r);
|
||||
@ -101,7 +101,7 @@ static TIMER_CALLBACK( interrupt_callback )
|
||||
int next_interrupt_number;
|
||||
int next_vpos;
|
||||
|
||||
device_set_input_line(state->m_maincpu, 0, HOLD_LINE);
|
||||
state->m_maincpu->set_input_line(0, HOLD_LINE);
|
||||
|
||||
/* set up for next interrupt */
|
||||
next_interrupt_number = (interrupt_number + 1) % INTERRUPTS_PER_FRAME;
|
||||
@ -138,7 +138,7 @@ static MACHINE_START( beaminv )
|
||||
beaminv_state *state = machine.driver_data<beaminv_state>();
|
||||
create_interrupt_timer(machine);
|
||||
|
||||
state->m_maincpu = machine.device("maincpu");
|
||||
state->m_maincpu = machine.device<cpu_device>("maincpu");
|
||||
|
||||
/* setup for save states */
|
||||
state->save_item(NAME(state->m_controller_select));
|
||||
|
@ -499,7 +499,7 @@ READ32_MEMBER( beathead_state::speedup_r )
|
||||
{
|
||||
int result = *m_speedup_data;
|
||||
if ((space.device().safe_pcbase() & 0xfffff) == 0x006f0 && result == space.device().state().state_int(ASAP_R3))
|
||||
device_spin_until_interrupt(&space.device());
|
||||
space.device().execute().spin_until_interrupt();
|
||||
return result;
|
||||
}
|
||||
|
||||
@ -512,7 +512,7 @@ READ32_MEMBER( beathead_state::movie_speedup_r )
|
||||
{
|
||||
UINT32 temp = (INT16)result + m_movie_speedup_data[4] * 262;
|
||||
if (temp - (UINT32)space.device().state().state_int(ASAP_R15) < (UINT32)space.device().state().state_int(ASAP_R23))
|
||||
device_spin_until_interrupt(&space.device());
|
||||
space.device().execute().spin_until_interrupt();
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
@ -81,7 +81,7 @@ static MACHINE_START(beezer)
|
||||
{
|
||||
beezer_state *state = machine.driver_data<beezer_state>();
|
||||
|
||||
state->m_maincpu = machine.device("maincpu");
|
||||
state->m_maincpu = machine.device<cpu_device>("maincpu");
|
||||
}
|
||||
|
||||
static MACHINE_CONFIG_START( beezer, beezer_state )
|
||||
|
@ -740,7 +740,7 @@ static void RunBlit(address_space *space)
|
||||
} while (blitter.command & CMD_RUN);
|
||||
|
||||
/* Burn Z80 cycles while blitter is in operation */
|
||||
device_spin_until_time(&space->device(), attotime::from_nsec( (1000000000 / Z80_XTAL)*cycles_used * 2 ) );
|
||||
space->device().execute().spin_until_time(attotime::from_nsec( (1000000000 / Z80_XTAL)*cycles_used * 2 ) );
|
||||
}
|
||||
|
||||
|
||||
|
@ -48,7 +48,7 @@ INPUT_PORTS_END
|
||||
static INTERRUPT_GEN( sc5_fake_timer_int )
|
||||
{
|
||||
// this should be coming from the Timer / SIM modules of the Coldfire
|
||||
device_set_input_line_and_vector((legacy_cpu_device*)device->machine().device("maincpu"), 5, HOLD_LINE, 0x8c);
|
||||
device->machine().device("maincpu")->execute().set_input_line_and_vector(5, HOLD_LINE, 0x8c);
|
||||
}
|
||||
|
||||
static MACHINE_CONFIG_START( sc5, sc5_state )
|
||||
|
@ -112,7 +112,7 @@ static TIMER_CALLBACK( nmi_callback )
|
||||
bigevglf_state *state = machine.driver_data<bigevglf_state>();
|
||||
|
||||
if (state->m_sound_nmi_enable)
|
||||
device_set_input_line(state->m_audiocpu, INPUT_LINE_NMI, PULSE_LINE);
|
||||
state->m_audiocpu->set_input_line(INPUT_LINE_NMI, PULSE_LINE);
|
||||
else
|
||||
state->m_pending_nmi = 1;
|
||||
state->m_sound_state &= ~1;
|
||||
@ -140,7 +140,7 @@ WRITE8_MEMBER(bigevglf_state::nmi_enable_w)
|
||||
m_sound_nmi_enable = 1;
|
||||
if (m_pending_nmi)
|
||||
{
|
||||
device_set_input_line(m_audiocpu, INPUT_LINE_NMI, PULSE_LINE);
|
||||
m_audiocpu->set_input_line(INPUT_LINE_NMI, PULSE_LINE);
|
||||
m_pending_nmi = 0;
|
||||
}
|
||||
}
|
||||
@ -420,7 +420,7 @@ static MACHINE_START( bigevglf )
|
||||
{
|
||||
bigevglf_state *state = machine.driver_data<bigevglf_state>();
|
||||
|
||||
state->m_audiocpu = machine.device("audiocpu");
|
||||
state->m_audiocpu = machine.device<cpu_device>("audiocpu");
|
||||
state->m_mcu = machine.device("mcu");
|
||||
|
||||
state->save_item(NAME(state->m_vidram_bank));
|
||||
|
@ -588,13 +588,13 @@ INPUT_PORTS_END
|
||||
|
||||
static INTERRUPT_GEN( vblank_irq )
|
||||
{
|
||||
// device_set_input_line_and_vector(device,0,HOLD_LINE,0x08/4); // reads i/o 0x200 and puts the result in ram, pic irq?
|
||||
device_set_input_line_and_vector(device,0,HOLD_LINE,0x4c/4); // ?
|
||||
// device->execute().set_input_line_and_vector(0,HOLD_LINE,0x08/4); // reads i/o 0x200 and puts the result in ram, pic irq?
|
||||
device->execute().set_input_line_and_vector(0,HOLD_LINE,0x4c/4); // ?
|
||||
}
|
||||
|
||||
static INTERRUPT_GEN( unk_irq )
|
||||
{
|
||||
device_set_input_line_and_vector(device,0,HOLD_LINE,0x48/4); // ?
|
||||
device->execute().set_input_line_and_vector(0,HOLD_LINE,0x48/4); // ?
|
||||
}
|
||||
|
||||
|
||||
|
@ -363,7 +363,7 @@ static void sound_irq_gen(device_t *device, int state)
|
||||
{
|
||||
bishi_state *bishi = device->machine().driver_data<bishi_state>();
|
||||
|
||||
device_set_input_line(bishi->m_maincpu, M68K_IRQ_1, (state) ? ASSERT_LINE : CLEAR_LINE);
|
||||
bishi->m_maincpu->set_input_line(M68K_IRQ_1, (state) ? ASSERT_LINE : CLEAR_LINE);
|
||||
}
|
||||
|
||||
static const ymz280b_interface ymz280b_intf =
|
||||
@ -392,7 +392,7 @@ static MACHINE_START( bishi )
|
||||
{
|
||||
bishi_state *state = machine.driver_data<bishi_state>();
|
||||
|
||||
state->m_maincpu = machine.device("maincpu");
|
||||
state->m_maincpu = machine.device<cpu_device>("maincpu");
|
||||
state->m_k056832 = machine.device("k056832");
|
||||
state->m_k054338 = machine.device("k054338");
|
||||
state->m_k055555 = machine.device("k055555");
|
||||
|
@ -44,7 +44,7 @@ WRITE8_MEMBER(bking_state::bking_soundlatch_w)
|
||||
|
||||
soundlatch_byte_w(space, offset, code);
|
||||
if (m_sound_nmi_enable)
|
||||
device_set_input_line(m_audiocpu, INPUT_LINE_NMI, PULSE_LINE);
|
||||
m_audiocpu->set_input_line(INPUT_LINE_NMI, PULSE_LINE);
|
||||
}
|
||||
|
||||
WRITE8_MEMBER(bking_state::bking3_addr_l_w)
|
||||
@ -392,7 +392,7 @@ static MACHINE_START( bking )
|
||||
{
|
||||
bking_state *state = machine.driver_data<bking_state>();
|
||||
|
||||
state->m_audiocpu = machine.device("audiocpu");
|
||||
state->m_audiocpu = machine.device<cpu_device>("audiocpu");
|
||||
|
||||
/* video */
|
||||
state->save_item(NAME(state->m_pc3259_output));
|
||||
|
@ -91,7 +91,7 @@ WRITE8_MEMBER(bladestl_state::bladestl_sh_irqtrigger_w)
|
||||
{
|
||||
|
||||
soundlatch_byte_w(space, offset, data);
|
||||
device_set_input_line(m_audiocpu, M6809_IRQ_LINE, HOLD_LINE);
|
||||
m_audiocpu->set_input_line(M6809_IRQ_LINE, HOLD_LINE);
|
||||
//logerror("(sound) write %02x\n", data);
|
||||
}
|
||||
|
||||
@ -308,7 +308,7 @@ static MACHINE_START( bladestl )
|
||||
|
||||
state->membank("bank1")->configure_entries(0, 4, &ROM[0x10000], 0x2000);
|
||||
|
||||
state->m_audiocpu = machine.device("audiocpu");
|
||||
state->m_audiocpu = machine.device<cpu_device>("audiocpu");
|
||||
state->m_k007342 = machine.device("k007342");
|
||||
state->m_k007420 = machine.device("k007420");
|
||||
|
||||
|
@ -33,13 +33,13 @@ READ8_MEMBER(blktiger_state::blktiger_from_mcu_r)
|
||||
|
||||
WRITE8_MEMBER(blktiger_state::blktiger_to_mcu_w)
|
||||
{
|
||||
device_set_input_line(m_mcu, MCS51_INT1_LINE, ASSERT_LINE);
|
||||
m_mcu->execute().set_input_line(MCS51_INT1_LINE, ASSERT_LINE);
|
||||
m_z80_latch = data;
|
||||
}
|
||||
|
||||
READ8_MEMBER(blktiger_state::blktiger_from_main_r)
|
||||
{
|
||||
device_set_input_line(m_mcu, MCS51_INT1_LINE, CLEAR_LINE);
|
||||
m_mcu->execute().set_input_line(MCS51_INT1_LINE, CLEAR_LINE);
|
||||
//printf("%02x read\n",latch);
|
||||
return m_z80_latch;
|
||||
}
|
||||
@ -262,7 +262,7 @@ GFXDECODE_END
|
||||
static void irqhandler( device_t *device, int irq )
|
||||
{
|
||||
blktiger_state *state = device->machine().driver_data<blktiger_state>();
|
||||
device_set_input_line(state->m_audiocpu, 0, irq ? ASSERT_LINE : CLEAR_LINE);
|
||||
state->m_audiocpu->set_input_line(0, irq ? ASSERT_LINE : CLEAR_LINE);
|
||||
}
|
||||
|
||||
static const ym2203_interface ym2203_config =
|
||||
@ -279,7 +279,7 @@ static MACHINE_START( blktiger )
|
||||
{
|
||||
blktiger_state *state = machine.driver_data<blktiger_state>();
|
||||
|
||||
state->m_audiocpu = machine.device("audiocpu");
|
||||
state->m_audiocpu = machine.device<cpu_device>("audiocpu");
|
||||
state->m_mcu = machine.device("mcu");
|
||||
|
||||
/* configure bankswitching */
|
||||
|
@ -61,12 +61,12 @@
|
||||
static INTERRUPT_GEN( blockade_interrupt )
|
||||
{
|
||||
blockade_state *state = device->machine().driver_data<blockade_state>();
|
||||
device_resume(device, SUSPEND_ANY_REASON);
|
||||
device->execute().resume(SUSPEND_ANY_REASON);
|
||||
|
||||
if ((state->ioport("IN0")->read() & 0x80) == 0)
|
||||
{
|
||||
state->m_just_been_reset = 1;
|
||||
device_set_input_line(device, INPUT_LINE_RESET, PULSE_LINE);
|
||||
device->execute().set_input_line(INPUT_LINE_RESET, PULSE_LINE);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -35,7 +35,7 @@ static INTERRUPT_GEN( blockhl_interrupt )
|
||||
blockhl_state *state = device->machine().driver_data<blockhl_state>();
|
||||
|
||||
if (k052109_is_irq_enabled(state->m_k052109) && state->m_rombank == 0) /* kludge to prevent crashes */
|
||||
device_set_input_line(device, KONAMI_IRQ_LINE, HOLD_LINE);
|
||||
device->execute().set_input_line(KONAMI_IRQ_LINE, HOLD_LINE);
|
||||
}
|
||||
|
||||
READ8_MEMBER(blockhl_state::bankedram_r)
|
||||
@ -58,7 +58,7 @@ WRITE8_MEMBER(blockhl_state::bankedram_w)
|
||||
|
||||
WRITE8_MEMBER(blockhl_state::blockhl_sh_irqtrigger_w)
|
||||
{
|
||||
device_set_input_line_and_vector(m_audiocpu, 0, HOLD_LINE, 0xff);
|
||||
m_audiocpu->set_input_line_and_vector(0, HOLD_LINE, 0xff);
|
||||
}
|
||||
|
||||
|
||||
@ -193,8 +193,8 @@ static MACHINE_START( blockhl )
|
||||
|
||||
state->membank("bank1")->configure_entries(0, 4, &ROM[0x10000], 0x2000);
|
||||
|
||||
state->m_maincpu = machine.device("maincpu");
|
||||
state->m_audiocpu = machine.device("audiocpu");
|
||||
state->m_maincpu = machine.device<cpu_device>("maincpu");
|
||||
state->m_audiocpu = machine.device<cpu_device>("audiocpu");
|
||||
state->m_k052109 = machine.device("k052109");
|
||||
state->m_k051960 = machine.device("k051960");
|
||||
|
||||
|
@ -80,20 +80,20 @@ WRITE16_MEMBER(blockout_state::blockout_sound_command_w)
|
||||
if (ACCESSING_BITS_0_7)
|
||||
{
|
||||
soundlatch_byte_w(space, offset, data & 0xff);
|
||||
device_set_input_line(m_audiocpu, INPUT_LINE_NMI, PULSE_LINE);
|
||||
m_audiocpu->set_input_line(INPUT_LINE_NMI, PULSE_LINE);
|
||||
}
|
||||
}
|
||||
|
||||
WRITE16_MEMBER(blockout_state::blockout_irq6_ack_w)
|
||||
{
|
||||
|
||||
device_set_input_line(m_maincpu, 6, CLEAR_LINE);
|
||||
m_maincpu->set_input_line(6, CLEAR_LINE);
|
||||
}
|
||||
|
||||
WRITE16_MEMBER(blockout_state::blockout_irq5_ack_w)
|
||||
{
|
||||
|
||||
device_set_input_line(m_maincpu, 5, CLEAR_LINE);
|
||||
m_maincpu->set_input_line(5, CLEAR_LINE);
|
||||
}
|
||||
|
||||
/*************************************
|
||||
@ -263,7 +263,7 @@ INPUT_PORTS_END
|
||||
static void blockout_irq_handler(device_t *device, int irq)
|
||||
{
|
||||
blockout_state *state = device->machine().driver_data<blockout_state>();
|
||||
device_set_input_line_and_vector(state->m_audiocpu, 0, irq ? ASSERT_LINE : CLEAR_LINE, 0xff);
|
||||
state->m_audiocpu->set_input_line_and_vector(0, irq ? ASSERT_LINE : CLEAR_LINE, 0xff);
|
||||
}
|
||||
|
||||
static const ym2151_interface ym2151_config =
|
||||
@ -282,8 +282,8 @@ static MACHINE_START( blockout )
|
||||
{
|
||||
blockout_state *state = machine.driver_data<blockout_state>();
|
||||
|
||||
state->m_maincpu = machine.device("maincpu");
|
||||
state->m_audiocpu = machine.device("audiocpu");
|
||||
state->m_maincpu = machine.device<cpu_device>("maincpu");
|
||||
state->m_audiocpu = machine.device<cpu_device>("audiocpu");
|
||||
|
||||
state->save_item(NAME(state->m_color));
|
||||
}
|
||||
@ -301,10 +301,10 @@ static TIMER_DEVICE_CALLBACK( blockout_scanline )
|
||||
int scanline = param;
|
||||
|
||||
if(scanline == 248) // vblank-out irq
|
||||
device_set_input_line(state->m_maincpu, 6, ASSERT_LINE);
|
||||
state->m_maincpu->set_input_line(6, ASSERT_LINE);
|
||||
|
||||
if(scanline == 0) // vblank-in irq or directly tied to coin inputs (TODO: check)
|
||||
device_set_input_line(state->m_maincpu, 5, ASSERT_LINE);
|
||||
state->m_maincpu->set_input_line(5, ASSERT_LINE);
|
||||
}
|
||||
|
||||
static MACHINE_CONFIG_START( blockout, blockout_state )
|
||||
|
@ -70,7 +70,7 @@ READ8_MEMBER(blueprnt_state::blueprnt_sh_dipsw_r)
|
||||
WRITE8_MEMBER(blueprnt_state::blueprnt_sound_command_w)
|
||||
{
|
||||
soundlatch_byte_w(space, offset, data);
|
||||
device_set_input_line(m_audiocpu, INPUT_LINE_NMI, PULSE_LINE);
|
||||
m_audiocpu->set_input_line(INPUT_LINE_NMI, PULSE_LINE);
|
||||
}
|
||||
|
||||
WRITE8_MEMBER(blueprnt_state::blueprnt_coin_counter_w)
|
||||
@ -279,7 +279,7 @@ static MACHINE_START( blueprnt )
|
||||
{
|
||||
blueprnt_state *state = machine.driver_data<blueprnt_state>();
|
||||
|
||||
state->m_audiocpu = machine.device("audiocpu");
|
||||
state->m_audiocpu = machine.device<cpu_device>("audiocpu");
|
||||
|
||||
state->save_item(NAME(state->m_dipsw));
|
||||
}
|
||||
|
@ -1330,7 +1330,7 @@ static IRQ_CALLBACK(irq_callback)
|
||||
for(i=15; i>=0 && !(state->m_irqreq & (1<<i)); i--);
|
||||
state->m_irqreq &= ~(1<<i);
|
||||
if(!state->m_irqreq)
|
||||
device_set_input_line(device, 0, CLEAR_LINE);
|
||||
device->execute().set_input_line(0, CLEAR_LINE);
|
||||
return i;
|
||||
}
|
||||
|
||||
@ -1339,7 +1339,7 @@ static void irq_init(running_machine &machine)
|
||||
bnstars_state *state = machine.driver_data<bnstars_state>();
|
||||
state->m_irqreq = 0;
|
||||
machine.device("maincpu")->execute().set_input_line(0, CLEAR_LINE);
|
||||
device_set_irq_callback(machine.device("maincpu"), irq_callback);
|
||||
machine.device("maincpu")->execute().set_irq_acknowledge_callback(irq_callback);
|
||||
}
|
||||
|
||||
static void irq_raise(running_machine &machine, int level)
|
||||
|
@ -354,7 +354,7 @@ static INTERRUPT_GEN( vblank_irq )
|
||||
bombjack_state *state = device->machine().driver_data<bombjack_state>();
|
||||
|
||||
if(state->m_nmi_mask)
|
||||
device_set_input_line(device, INPUT_LINE_NMI, PULSE_LINE);
|
||||
device->execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE);
|
||||
}
|
||||
|
||||
static MACHINE_CONFIG_START( bombjack, bombjack_state )
|
||||
|
@ -278,7 +278,7 @@ GFXDECODE_END
|
||||
static void sound_irq(device_t *device, int state)
|
||||
{
|
||||
boogwing_state *driver_state = device->machine().driver_data<boogwing_state>();
|
||||
device_set_input_line(driver_state->m_audiocpu, 1, state); /* IRQ 2 */
|
||||
driver_state->m_audiocpu->set_input_line(1, state); /* IRQ 2 */
|
||||
}
|
||||
|
||||
WRITE8_MEMBER(boogwing_state::sound_bankswitch_w)
|
||||
|
@ -25,7 +25,7 @@ static INTERRUPT_GEN( bottom9_interrupt )
|
||||
bottom9_state *state = device->machine().driver_data<bottom9_state>();
|
||||
|
||||
if (k052109_is_irq_enabled(state->m_k052109))
|
||||
device_set_input_line(device, 0, HOLD_LINE);
|
||||
device->execute().set_input_line(0, HOLD_LINE);
|
||||
}
|
||||
|
||||
READ8_MEMBER(bottom9_state::k052109_051960_r)
|
||||
@ -135,14 +135,14 @@ WRITE8_MEMBER(bottom9_state::bottom9_1f90_w)
|
||||
|
||||
WRITE8_MEMBER(bottom9_state::bottom9_sh_irqtrigger_w)
|
||||
{
|
||||
device_set_input_line_and_vector(m_audiocpu, 0, HOLD_LINE, 0xff);
|
||||
m_audiocpu->set_input_line_and_vector(0, HOLD_LINE, 0xff);
|
||||
}
|
||||
|
||||
static INTERRUPT_GEN( bottom9_sound_interrupt )
|
||||
{
|
||||
bottom9_state *state = device->machine().driver_data<bottom9_state>();
|
||||
if (state->m_nmienable)
|
||||
device_set_input_line(device, INPUT_LINE_NMI, PULSE_LINE);
|
||||
device->execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE);
|
||||
}
|
||||
|
||||
WRITE8_MEMBER(bottom9_state::nmi_enable_w)
|
||||
@ -326,8 +326,8 @@ static MACHINE_START( bottom9 )
|
||||
|
||||
state->membank("bank1")->configure_entries(0, 12, &ROM[0x10000], 0x2000);
|
||||
|
||||
state->m_maincpu = machine.device("maincpu");
|
||||
state->m_audiocpu = machine.device("audiocpu");
|
||||
state->m_maincpu = machine.device<cpu_device>("maincpu");
|
||||
state->m_audiocpu = machine.device<cpu_device>("audiocpu");
|
||||
state->m_k052109 = machine.device("k052109");
|
||||
state->m_k051960 = machine.device("k051960");
|
||||
state->m_k051316 = machine.device("k051316");
|
||||
|
@ -37,7 +37,7 @@ public:
|
||||
UINT8 m_pot_latch;
|
||||
|
||||
/* devices */
|
||||
device_t *m_maincpu;
|
||||
cpu_device *m_maincpu;
|
||||
DECLARE_READ8_MEMBER(boxer_input_r);
|
||||
DECLARE_READ8_MEMBER(boxer_misc_r);
|
||||
DECLARE_WRITE8_MEMBER(boxer_bell_w);
|
||||
@ -60,7 +60,7 @@ static TIMER_CALLBACK( pot_interrupt )
|
||||
int mask = param;
|
||||
|
||||
if (state->m_pot_latch & mask)
|
||||
device_set_input_line(state->m_maincpu, INPUT_LINE_NMI, ASSERT_LINE);
|
||||
state->m_maincpu->set_input_line(INPUT_LINE_NMI, ASSERT_LINE);
|
||||
|
||||
state->m_pot_state |= mask;
|
||||
}
|
||||
@ -71,7 +71,7 @@ static TIMER_CALLBACK( periodic_callback )
|
||||
boxer_state *state = machine.driver_data<boxer_state>();
|
||||
int scanline = param;
|
||||
|
||||
device_set_input_line(state->m_maincpu, 0, ASSERT_LINE);
|
||||
state->m_maincpu->set_input_line(0, ASSERT_LINE);
|
||||
|
||||
if (scanline == 0)
|
||||
{
|
||||
@ -262,13 +262,13 @@ WRITE8_MEMBER(boxer_state::boxer_pot_w)
|
||||
|
||||
m_pot_latch = data & 0x3f;
|
||||
|
||||
device_set_input_line(m_maincpu, INPUT_LINE_NMI, CLEAR_LINE);
|
||||
m_maincpu->set_input_line(INPUT_LINE_NMI, CLEAR_LINE);
|
||||
}
|
||||
|
||||
|
||||
WRITE8_MEMBER(boxer_state::boxer_irq_reset_w)
|
||||
{
|
||||
device_set_input_line(m_maincpu, 0, CLEAR_LINE);
|
||||
m_maincpu->set_input_line(0, CLEAR_LINE);
|
||||
}
|
||||
|
||||
|
||||
@ -426,7 +426,7 @@ static MACHINE_START( boxer )
|
||||
{
|
||||
boxer_state *state = machine.driver_data<boxer_state>();
|
||||
|
||||
state->m_maincpu = machine.device("maincpu");
|
||||
state->m_maincpu = machine.device<cpu_device>("maincpu");
|
||||
|
||||
state->save_item(NAME(state->m_pot_state));
|
||||
state->save_item(NAME(state->m_pot_latch));
|
||||
|
@ -72,7 +72,7 @@ WRITE8_MEMBER(brkthru_state::brkthru_1803_w)
|
||||
m_nmi_mask = ~data & 1;
|
||||
|
||||
if(data & 2)
|
||||
device_set_input_line(m_maincpu, 0, CLEAR_LINE);
|
||||
m_maincpu->set_input_line(0, CLEAR_LINE);
|
||||
|
||||
/* bit 1 = ? maybe IRQ acknowledge */
|
||||
}
|
||||
@ -84,7 +84,7 @@ WRITE8_MEMBER(brkthru_state::darwin_0803_w)
|
||||
logerror("0803 %02X\n",data);
|
||||
|
||||
if(data & 2)
|
||||
device_set_input_line(m_maincpu, 0, CLEAR_LINE);
|
||||
m_maincpu->set_input_line(0, CLEAR_LINE);
|
||||
|
||||
|
||||
/* bit 1 = ? maybe IRQ acknowledge */
|
||||
@ -93,14 +93,14 @@ WRITE8_MEMBER(brkthru_state::darwin_0803_w)
|
||||
WRITE8_MEMBER(brkthru_state::brkthru_soundlatch_w)
|
||||
{
|
||||
soundlatch_byte_w(space, offset, data);
|
||||
device_set_input_line(m_audiocpu, INPUT_LINE_NMI, PULSE_LINE);
|
||||
m_audiocpu->set_input_line(INPUT_LINE_NMI, PULSE_LINE);
|
||||
}
|
||||
|
||||
INPUT_CHANGED_MEMBER(brkthru_state::coin_inserted)
|
||||
{
|
||||
/* coin insertion causes an IRQ */
|
||||
if (oldval)
|
||||
device_set_input_line(m_maincpu, 0, ASSERT_LINE);
|
||||
m_maincpu->set_input_line(0, ASSERT_LINE);
|
||||
}
|
||||
|
||||
|
||||
@ -366,8 +366,8 @@ static MACHINE_START( brkthru )
|
||||
{
|
||||
brkthru_state *state = machine.driver_data<brkthru_state>();
|
||||
|
||||
state->m_maincpu = machine.device("maincpu");
|
||||
state->m_audiocpu = machine.device("audiocpu");
|
||||
state->m_maincpu = machine.device<cpu_device>("maincpu");
|
||||
state->m_audiocpu = machine.device<cpu_device>("audiocpu");
|
||||
|
||||
state->save_item(NAME(state->m_bgscroll));
|
||||
state->save_item(NAME(state->m_bgbasecolor));
|
||||
@ -388,7 +388,7 @@ static INTERRUPT_GEN( vblank_irq )
|
||||
brkthru_state *state = device->machine().driver_data<brkthru_state>();
|
||||
|
||||
if(state->m_nmi_mask)
|
||||
device_set_input_line(device, INPUT_LINE_NMI, PULSE_LINE);
|
||||
device->execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE);
|
||||
}
|
||||
|
||||
static MACHINE_CONFIG_START( brkthru, brkthru_state )
|
||||
|
@ -169,7 +169,7 @@ WRITE8_MEMBER(btime_state::audio_nmi_enable_w)
|
||||
if (m_audio_nmi_enable_type == AUDIO_ENABLE_DIRECT)
|
||||
{
|
||||
m_audio_nmi_enabled = data & 1;
|
||||
device_set_input_line(m_audiocpu, INPUT_LINE_NMI, (m_audio_nmi_enabled && m_audio_nmi_state) ? ASSERT_LINE : CLEAR_LINE);
|
||||
m_audiocpu->set_input_line(INPUT_LINE_NMI, (m_audio_nmi_enabled && m_audio_nmi_state) ? ASSERT_LINE : CLEAR_LINE);
|
||||
}
|
||||
}
|
||||
|
||||
@ -179,7 +179,7 @@ WRITE8_MEMBER(btime_state::ay_audio_nmi_enable_w)
|
||||
if (m_audio_nmi_enable_type == AUDIO_ENABLE_AY8910)
|
||||
{
|
||||
m_audio_nmi_enabled = ~data & 1;
|
||||
device_set_input_line(m_audiocpu, INPUT_LINE_NMI, (m_audio_nmi_enabled && m_audio_nmi_state) ? ASSERT_LINE : CLEAR_LINE);
|
||||
m_audiocpu->set_input_line(INPUT_LINE_NMI, (m_audio_nmi_enabled && m_audio_nmi_state) ? ASSERT_LINE : CLEAR_LINE);
|
||||
}
|
||||
}
|
||||
|
||||
@ -188,7 +188,7 @@ static TIMER_DEVICE_CALLBACK( audio_nmi_gen )
|
||||
btime_state *state = timer.machine().driver_data<btime_state>();
|
||||
int scanline = param;
|
||||
state->m_audio_nmi_state = scanline & 8;
|
||||
device_set_input_line(state->m_audiocpu, INPUT_LINE_NMI, (state->m_audio_nmi_enabled && state->m_audio_nmi_state) ? ASSERT_LINE : CLEAR_LINE);
|
||||
state->m_audiocpu->set_input_line(INPUT_LINE_NMI, (state->m_audio_nmi_enabled && state->m_audio_nmi_state) ? ASSERT_LINE : CLEAR_LINE);
|
||||
}
|
||||
|
||||
|
||||
@ -506,30 +506,30 @@ ADDRESS_MAP_END
|
||||
INPUT_CHANGED_MEMBER(btime_state::coin_inserted_irq_hi)
|
||||
{
|
||||
if (newval)
|
||||
device_set_input_line(m_maincpu, 0, HOLD_LINE);
|
||||
m_maincpu->set_input_line(0, HOLD_LINE);
|
||||
}
|
||||
|
||||
INPUT_CHANGED_MEMBER(btime_state::coin_inserted_irq_lo)
|
||||
{
|
||||
if (!newval)
|
||||
device_set_input_line(m_maincpu, 0, HOLD_LINE);
|
||||
m_maincpu->set_input_line(0, HOLD_LINE);
|
||||
}
|
||||
|
||||
INPUT_CHANGED_MEMBER(btime_state::coin_inserted_nmi_lo)
|
||||
{
|
||||
device_set_input_line(m_maincpu, INPUT_LINE_NMI, newval ? CLEAR_LINE : ASSERT_LINE);
|
||||
m_maincpu->set_input_line(INPUT_LINE_NMI, newval ? CLEAR_LINE : ASSERT_LINE);
|
||||
}
|
||||
|
||||
|
||||
WRITE8_MEMBER(btime_state::audio_command_w)
|
||||
{
|
||||
soundlatch_byte_w(space, offset, data);
|
||||
device_set_input_line(m_audiocpu, 0, ASSERT_LINE);
|
||||
m_audiocpu->set_input_line(0, ASSERT_LINE);
|
||||
}
|
||||
|
||||
READ8_MEMBER(btime_state::audio_command_r)
|
||||
{
|
||||
device_set_input_line(m_audiocpu, 0, CLEAR_LINE);
|
||||
m_audiocpu->set_input_line(0, CLEAR_LINE);
|
||||
return soundlatch_byte_r(space, offset);
|
||||
}
|
||||
|
||||
@ -1400,8 +1400,8 @@ static MACHINE_START( btime )
|
||||
{
|
||||
btime_state *state = machine.driver_data<btime_state>();
|
||||
|
||||
state->m_maincpu = machine.device("maincpu");
|
||||
state->m_audiocpu = machine.device("audiocpu");
|
||||
state->m_maincpu = machine.device<cpu_device>("maincpu");
|
||||
state->m_audiocpu = machine.device<cpu_device>("audiocpu");
|
||||
|
||||
state->save_item(NAME(state->m_btime_palette));
|
||||
state->save_item(NAME(state->m_bnj_scroll1));
|
||||
|
@ -699,7 +699,7 @@ GFXDECODE_END
|
||||
static void irqhandler(device_t *device, int irq)
|
||||
{
|
||||
bublbobl_state *state = device->machine().driver_data<bublbobl_state>();
|
||||
device_set_input_line(state->m_audiocpu, 0, irq ? ASSERT_LINE : CLEAR_LINE);
|
||||
state->m_audiocpu->set_input_line(0, irq ? ASSERT_LINE : CLEAR_LINE);
|
||||
}
|
||||
|
||||
static const ym2203_interface ym2203_config =
|
||||
@ -724,9 +724,9 @@ static MACHINE_START( common )
|
||||
{
|
||||
bublbobl_state *state = machine.driver_data<bublbobl_state>();
|
||||
|
||||
state->m_maincpu = machine.device("maincpu");
|
||||
state->m_maincpu = machine.device<cpu_device>("maincpu");
|
||||
state->m_mcu = machine.device("mcu");
|
||||
state->m_audiocpu = machine.device("audiocpu");
|
||||
state->m_audiocpu = machine.device<cpu_device>("audiocpu");
|
||||
state->m_slave = machine.device("slave");
|
||||
|
||||
state->save_item(NAME(state->m_sound_nmi_enable));
|
||||
|
@ -96,7 +96,7 @@ static TIMER_CALLBACK( nmi_callback )
|
||||
buggychl_state *state = machine.driver_data<buggychl_state>();
|
||||
|
||||
if (state->m_sound_nmi_enable)
|
||||
device_set_input_line(state->m_audiocpu, INPUT_LINE_NMI, PULSE_LINE);
|
||||
state->m_audiocpu->set_input_line(INPUT_LINE_NMI, PULSE_LINE);
|
||||
else
|
||||
state->m_pending_nmi = 1;
|
||||
}
|
||||
@ -117,7 +117,7 @@ WRITE8_MEMBER(buggychl_state::nmi_enable_w)
|
||||
m_sound_nmi_enable = 1;
|
||||
if (m_pending_nmi)
|
||||
{
|
||||
device_set_input_line(m_audiocpu, INPUT_LINE_NMI, PULSE_LINE);
|
||||
m_audiocpu->set_input_line(INPUT_LINE_NMI, PULSE_LINE);
|
||||
m_pending_nmi = 0;
|
||||
}
|
||||
}
|
||||
@ -363,7 +363,7 @@ static MACHINE_START( buggychl )
|
||||
|
||||
state->membank("bank1")->configure_entries(0, 6, &ROM[0x10000], 0x2000);
|
||||
|
||||
state->m_audiocpu = machine.device("audiocpu");
|
||||
state->m_audiocpu = machine.device<cpu_device>("audiocpu");
|
||||
|
||||
state->save_item(NAME(state->m_sound_nmi_enable));
|
||||
state->save_item(NAME(state->m_pending_nmi));
|
||||
|
@ -37,7 +37,7 @@ static INTERRUPT_GEN ( bwp3_interrupt )
|
||||
bwing_state *state = device->machine().driver_data<bwing_state>();
|
||||
|
||||
if (!state->m_bwp3_nmimask)
|
||||
device_set_input_line(device, INPUT_LINE_NMI, ASSERT_LINE);
|
||||
device->execute().set_input_line(INPUT_LINE_NMI, ASSERT_LINE);
|
||||
}
|
||||
|
||||
//****************************************************************************
|
||||
@ -60,7 +60,7 @@ WRITE8_MEMBER(bwing_state::bwp3_nmimask_w)
|
||||
|
||||
WRITE8_MEMBER(bwing_state::bwp3_nmiack_w)
|
||||
{
|
||||
device_set_input_line(m_audiocpu, INPUT_LINE_NMI, CLEAR_LINE);
|
||||
m_audiocpu->set_input_line(INPUT_LINE_NMI, CLEAR_LINE);
|
||||
}
|
||||
|
||||
|
||||
@ -83,16 +83,16 @@ WRITE8_MEMBER(bwing_state::bwp1_ctrl_w)
|
||||
switch (offset)
|
||||
{
|
||||
// MSSTB
|
||||
case 0: device_set_input_line(m_subcpu, M6809_IRQ_LINE, ASSERT_LINE); break;
|
||||
case 0: m_subcpu->set_input_line(M6809_IRQ_LINE, ASSERT_LINE); break;
|
||||
|
||||
// IRQACK
|
||||
case 1: device_set_input_line(m_maincpu, M6809_IRQ_LINE, CLEAR_LINE); break;
|
||||
case 1: m_maincpu->set_input_line(M6809_IRQ_LINE, CLEAR_LINE); break;
|
||||
|
||||
// FIRQACK
|
||||
case 2: device_set_input_line(m_maincpu, M6809_FIRQ_LINE, CLEAR_LINE); break;
|
||||
case 2: m_maincpu->set_input_line(M6809_FIRQ_LINE, CLEAR_LINE); break;
|
||||
|
||||
// NMIACK
|
||||
case 3: device_set_input_line(m_maincpu, INPUT_LINE_NMI, CLEAR_LINE); break;
|
||||
case 3: m_maincpu->set_input_line(INPUT_LINE_NMI, CLEAR_LINE); break;
|
||||
|
||||
// SWAP(bank-swaps sprite RAM between 1800 & 1900; ignored bc. they're treated as a single chunk.)
|
||||
case 4: break;
|
||||
@ -100,11 +100,11 @@ WRITE8_MEMBER(bwing_state::bwp1_ctrl_w)
|
||||
// SNDREQ
|
||||
case 5:
|
||||
if (data == 0x80) // protection trick to screw CPU1 & 3
|
||||
device_set_input_line(m_subcpu, INPUT_LINE_NMI, ASSERT_LINE); // SNMI
|
||||
m_subcpu->set_input_line(INPUT_LINE_NMI, ASSERT_LINE); // SNMI
|
||||
else
|
||||
{
|
||||
soundlatch_byte_w(space, 0, data);
|
||||
device_set_input_line(m_audiocpu, DECO16_IRQ_LINE, HOLD_LINE); // SNDREQ
|
||||
m_audiocpu->set_input_line(DECO16_IRQ_LINE, HOLD_LINE); // SNDREQ
|
||||
}
|
||||
break;
|
||||
|
||||
@ -125,13 +125,13 @@ WRITE8_MEMBER(bwing_state::bwp2_ctrl_w)
|
||||
{
|
||||
switch (offset)
|
||||
{
|
||||
case 0: device_set_input_line(m_maincpu, M6809_IRQ_LINE, ASSERT_LINE); break; // SMSTB
|
||||
case 0: m_maincpu->set_input_line(M6809_IRQ_LINE, ASSERT_LINE); break; // SMSTB
|
||||
|
||||
case 1: device_set_input_line(m_subcpu, M6809_FIRQ_LINE, CLEAR_LINE); break;
|
||||
case 1: m_subcpu->set_input_line(M6809_FIRQ_LINE, CLEAR_LINE); break;
|
||||
|
||||
case 2: device_set_input_line(m_subcpu, M6809_IRQ_LINE, CLEAR_LINE); break;
|
||||
case 2: m_subcpu->set_input_line(M6809_IRQ_LINE, CLEAR_LINE); break;
|
||||
|
||||
case 3: device_set_input_line(m_subcpu, INPUT_LINE_NMI, CLEAR_LINE); break;
|
||||
case 3: m_subcpu->set_input_line(INPUT_LINE_NMI, CLEAR_LINE); break;
|
||||
}
|
||||
|
||||
#if BW_DEBUG
|
||||
@ -337,9 +337,9 @@ static MACHINE_START( bwing )
|
||||
{
|
||||
bwing_state *state = machine.driver_data<bwing_state>();
|
||||
|
||||
state->m_maincpu = machine.device("maincpu");
|
||||
state->m_subcpu = machine.device("sub");
|
||||
state->m_audiocpu = machine.device("audiocpu");
|
||||
state->m_maincpu = machine.device<cpu_device>("maincpu");
|
||||
state->m_subcpu = machine.device<cpu_device>("sub");
|
||||
state->m_audiocpu = machine.device<cpu_device>("audiocpu");
|
||||
|
||||
state->save_item(NAME(state->m_palatch));
|
||||
state->save_item(NAME(state->m_srbank));
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user