static void spacefev_sound_pins_changed( running_machine &machine ) { device_t *sn = machine.device("snsnd"); n8080_state *state = machine.driver_data<n8080_state>(); UINT16 changes = ~state->m_curr_sound_pins & state->m_prev_sound_pins; if (changes & (1 << 0x3)) { stop_mono_flop(sn, 1); } if (changes & ((1 << 0x3) | (1 << 0x6))) { stop_mono_flop(sn, 2); } if (changes & (1 << 0x3)) { start_mono_flop(sn, 0, attotime::from_usec(550 * 36 * 100)); } if (changes & (1 << 0x6)) { start_mono_flop(sn, 1, attotime::from_usec(550 * 22 * 33)); } if (changes & (1 << 0x4)) { start_mono_flop(sn, 2, attotime::from_usec(550 * 22 * 33)); } if (changes & ((1 << 0x2) | (1 << 0x3) | (1 << 0x5))) { generic_pulse_irq_line(machine.device("audiocpu"), 0, 2); } }
void n8080_state::spacefev_sound_pins_changed() { UINT16 changes = ~m_curr_sound_pins & m_prev_sound_pins; if (changes & (1 << 0x3)) { stop_mono_flop(1); } if (changes & ((1 << 0x3) | (1 << 0x6))) { stop_mono_flop(2); } if (changes & (1 << 0x3)) { start_mono_flop(0, attotime::from_usec(550 * 36 * 100)); } if (changes & (1 << 0x6)) { start_mono_flop(1, attotime::from_usec(550 * 22 * 33)); } if (changes & (1 << 0x4)) { start_mono_flop(2, attotime::from_usec(550 * 22 * 33)); } if (changes & ((1 << 0x2) | (1 << 0x3) | (1 << 0x5))) { generic_pulse_irq_line(m_audiocpu, 0, 2); } }
// GFXDECODE_ENTRY( "gfx2", 0, gfxlayout_16x16x16, 0, 16 ) GFXDECODE_END INTERRUPT_GEN_MEMBER(igs_m027_state::igs_majhong_interrupt) { generic_pulse_irq_line(device.execute(), ARM7_FIRQ_LINE, 1); }
void archimedes_request_fiq(running_machine &machine, int mask) { ioc_regs[FIQ_STATUS] |= mask; if (ioc_regs[FIQ_MASK] & mask) { generic_pulse_irq_line(machine.device("maincpu"), ARM_FIRQ_LINE); } }
static TIMER_CALLBACK( flyball_joystick_callback ) { int potsense = param; if (potsense & ~flyball_potmask) generic_pulse_irq_line(cputag_get_cpu(machine, "maincpu"), 0); flyball_potsense |= potsense; }
static INTERRUPT_GEN( timer_irq ) { bfmsys85_state *state = device->machine().driver_data<bfmsys85_state>(); if ( state->m_is_timer_enabled ) { state->m_irq_status = 0x01 |0x02; //0xff; generic_pulse_irq_line(device, M6809_IRQ_LINE, 1); } }
static TIMER_CALLBACK( IOMD_timer1_callback ) { a7000_state *state = machine.driver_data<a7000_state>(); state->m_IRQ_status_A|=0x40; if(state->m_IRQ_mask_A&0x40) { generic_pulse_irq_line(machine.device("maincpu"), ARM7_IRQ_LINE,1); } }
AM_RANGE(H8_ADC_0_L, H8_ADC_3_H) AM_NOP // MCU reads these, but the games have no analog controls ADDRESS_MAP_END static INTERRUPT_GEN( mcu_interrupt ) { if( namcond1_h8_irq5_enabled ) { generic_pulse_irq_line(device, H8_IRQ5); } }
AM_RANGE(H8_ADC_0_L, H8_ADC_3_H) AM_NOP // MCU reads these, but the games have no analog controls ADDRESS_MAP_END INTERRUPT_GEN_MEMBER(namcond1_state::mcu_interrupt) { if( m_h8_irq5_enabled ) { generic_pulse_irq_line(device.execute(), H8_IRQ5, 1); } }
static TIMER_CALLBACK( flyball_joystick_callback ) { flyball_state *state = machine.driver_data<flyball_state>(); int potsense = param; if (potsense & ~state->m_potmask) generic_pulse_irq_line(state->m_maincpu, 0); state->m_potsense |= potsense; }
static TIMER_CALLBACK( flyback_timer_callback ) { a7000_state *state = machine.driver_data<a7000_state>(); state->m_IRQ_status_A|=0x08; if(state->m_IRQ_mask_A&0x08) { generic_pulse_irq_line(machine.device("maincpu"), ARM7_IRQ_LINE,1); } state->m_flyback_timer->adjust(machine.primary_screen->time_until_pos(state->m_vidc20_vert_reg[VDER])); }
AM_RANGE(H8_ADC_0_L, H8_ADC_3_H) AM_NOP // MCU reads these, but the games have no analog controls ADDRESS_MAP_END static INTERRUPT_GEN( mcu_interrupt ) { namcond1_state *state = device->machine().driver_data<namcond1_state>(); if( state->m_h8_irq5_enabled ) { generic_pulse_irq_line(device, H8_IRQ5); } }
static void multigam3_mmc3_scanline_cb( device_t *device, int scanline, int vblank, int blanked ) { if (!vblank && !blanked) { if (--multigam3_mmc3_scanline_counter == -1) { multigam3_mmc3_scanline_counter = multigam3_mmc3_scanline_latch; generic_pulse_irq_line(device->machine->device("maincpu"), 0); } } }
void n8080_state::helifire_sound_pins_changed() { UINT16 changes = ~m_curr_sound_pins & m_prev_sound_pins; /* ((m_curr_sound_pins >> 0xa) & 1) not emulated */ /* ((m_curr_sound_pins >> 0xb) & 1) not emulated */ /* ((m_curr_sound_pins >> 0xc) & 1) not emulated */ if (changes & (1 << 6)) { generic_pulse_irq_line(m_audiocpu, 0, 2); } }
static TIMER_CALLBACK( interrupt_callback ) { cball_state *state = machine.driver_data<cball_state>(); int scanline = param; generic_pulse_irq_line(state->m_maincpu, 0); scanline = scanline + 32; if (scanline >= 262) scanline = 16; machine.scheduler().timer_set(machine.primary_screen->time_until_pos(scanline), FUNC(interrupt_callback), scanline); }
static TIMER_CALLBACK( periodic_callback ) { int scanline = param; generic_pulse_irq_line(machine.device("maincpu"), 0); /* IRQs are generated by inverse 16V signal */ scanline += 32; if (scanline > 262) scanline = 0; machine.scheduler().timer_set(machine.primary_screen->time_until_pos(scanline), FUNC(periodic_callback), scanline); }
static void helifire_sound_pins_changed( running_machine &machine ) { n8080_state *state = machine.driver_data<n8080_state>(); UINT16 changes = ~state->m_curr_sound_pins & state->m_prev_sound_pins; /* ((state->m_curr_sound_pins >> 0xa) & 1) not emulated */ /* ((state->m_curr_sound_pins >> 0xb) & 1) not emulated */ /* ((state->m_curr_sound_pins >> 0xc) & 1) not emulated */ if (changes & (1 << 6)) { generic_pulse_irq_line(machine.device("audiocpu"), 0, 2); } }
static TIMER_CALLBACK( interrupt_callback ) { int scanline = param; update_plunger(machine); generic_pulse_irq_line(cputag_get_cpu(machine, "maincpu"), 0); scanline = scanline + 32; if (scanline >= 262) scanline = 16; timer_set(machine, video_screen_get_time_until_pos(machine->primary_screen, scanline, 0), NULL, scanline, interrupt_callback); }
static INTERRUPT_GEN( truco_interrupt ) { truco_state *state = device->machine().driver_data<truco_state>(); /* coinup */ if ( state->ioport("COIN")->read() & 1 ) { if ( state->m_trigger == 0 ) { generic_pulse_irq_line(device, M6809_IRQ_LINE, 1); state->m_trigger++; } } else state->m_trigger = 0; }
static INTERRUPT_GEN( chl_interrupt ) { int vector = video_screen_get_vblank(device->machine->primary_screen) ? 0xdf : 0xcf; /* 4 irqs per frame: 3 times 0xcf, 1 time 0xdf */ // video_screen_update_partial(device->machine->primary_screen, video_screen_get_vpos(device->machine->primary_screen)); cpu_set_input_line_and_vector(device, 0, HOLD_LINE, vector); /* it seems the V8 == Vblank and it is connected to the INT on the 68705 */ //so we should cause an INT on the MCU cpu here, as well. //but only once per frame ! if (vector == 0xdf) /* only on vblank */ generic_pulse_irq_line(cputag_get_cpu(device->machine, "mcu"), 0); }
static TIMER_CALLBACK( interrupt_callback ) { mgolf_state *state = machine->driver_data<mgolf_state>(); int scanline = param; update_plunger(machine); generic_pulse_irq_line(state->maincpu, 0); scanline = scanline + 32; if (scanline >= 262) scanline = 16; timer_set(machine, machine->primary_screen->time_until_pos(scanline), NULL, scanline, interrupt_callback); }
static INTERRUPT_GEN( chl_interrupt ) { changela_state *state = (changela_state *)device->machine->driver_data; int vector = device->machine->primary_screen->vblank() ? 0xdf : 0xcf; /* 4 irqs per frame: 3 times 0xcf, 1 time 0xdf */ // device->machine->primary_screen->update_partial(device->machine->primary_screen->vpos()); cpu_set_input_line_and_vector(device, 0, HOLD_LINE, vector); /* it seems the V8 == Vblank and it is connected to the INT on the 68705 */ //so we should cause an INT on the MCU cpu here, as well. //but only once per frame ! if (vector == 0xdf) /* only on vblank */ generic_pulse_irq_line(state->mcu, 0); }
INPUT_PORTS_END /*************************************************************************** Machine Drivers ***************************************************************************/ INTERRUPT_GEN_MEMBER(igs_m027_state::igs_majhong_interrupt) { generic_pulse_irq_line(device.execute(), ARM7_FIRQ_LINE, 1); }
static INTERRUPT_GEN( toratora_timer ) { toratora_state *state = device->machine().driver_data<toratora_state>(); state->m_timer++; /* timer counting at 16 Hz */ /* also, when the timer overflows (16 seconds) watchdog would kick in */ if (state->m_timer & 0x100) popmessage("watchdog!"); if (state->m_last != (state->ioport("INPUT")->read() & 0x0f)) { state->m_last = state->ioport("INPUT")->read() & 0x0f; generic_pulse_irq_line(device, 0, 1); } state->m_pia_u1->set_a_input(device->machine().root_device().ioport("INPUT")->read() & 0x0f, 0); state->m_pia_u1->ca1_w(device->machine().root_device().ioport("INPUT")->read() & 0x10); state->m_pia_u1->ca2_w(device->machine().root_device().ioport("INPUT")->read() & 0x20); }
/* IRQ0 0x80000000 Second Priority 0x40000000 SW irq 0x20000000 DMA<->EXP 0x1fff0000 DMA RAM->DSPP * 0x0000f000 DMA DSPP->RAM * 0x00000800 DSPP 0x00000400 Timer 1 0x00000200 Timer 3 <- needed to surpass current hang point 0x00000100 Timer 5 0x00000080 Timer 7 0x00000040 Timer 9 0x00000020 Timer 11 0x00000010 Timer 13 0x00000008 Timer 15 0x00000004 Expansion Bus 0x00000002 Vertical 1 0x00000001 Vertical 0 --- IRQ1 0x00000400 DSPPOVER (Red rev. only) 0x00000200 DSPPUNDER (Red rev. only) 0x00000100 BadBits 0x00000080 DMA<-External 0x00000040 DMA->External 0x00000020 DMA<-Uncle 0x00000010 DMA->Uncle 0x00000008 DMA RAM->DSPP N 0x00000004 SlowBus 0x00000002 Disk Inserted 0x00000001 DMA Player bus */ void _3do_state::m_3do_request_fiq(UINT32 irq_req, UINT8 type) { if(type) m_clio.irq1 |= irq_req; else m_clio.irq0 |= irq_req; if(m_clio.irq1) m_clio.irq0 |= 1 << 31; // Second Priority else m_clio.irq0 &= ~(1 << 31); if((m_clio.irq0 & m_clio.irq0_enable) || (m_clio.irq1 & m_clio.irq1_enable)) { //printf("Go irq %08x & %08x %08x & %08x\n",m_clio.irq0, m_clio.irq0_enable, m_clio.irq1, m_clio.irq1_enable); generic_pulse_irq_line(m_maincpu, ARM7_FIRQ_LINE, 1); } }
ADDRESS_MAP_END /****************************************************** MMC3 (Multi Game III) *******************************************************/ void multigam_state::multigam3_mmc3_scanline_cb( int scanline, int vblank, int blanked ) { if (!vblank && !blanked) { if (--m_multigam3_mmc3_scanline_counter == -1) { m_multigam3_mmc3_scanline_counter = m_multigam3_mmc3_scanline_latch; generic_pulse_irq_line(m_maincpu, 0, 1); } } }
ADDRESS_MAP_END /****************************************************** MMC3 (Multi Game III) *******************************************************/ static void multigam3_mmc3_scanline_cb( device_t *device, int scanline, int vblank, int blanked ) { multigam_state *state = device->machine().driver_data<multigam_state>(); if (!vblank && !blanked) { if (--state->m_multigam3_mmc3_scanline_counter == -1) { state->m_multigam3_mmc3_scanline_counter = state->m_multigam3_mmc3_scanline_latch; generic_pulse_irq_line(device->machine().device("maincpu"), 0); } } }
static INTERRUPT_GEN( starshp1_interrupt ) { if ((input_port_read(device->machine(), "SYSTEM") & 0x90) != 0x90) generic_pulse_irq_line(device, 0); }
static INTERRUPT_GEN( chl_mcu_irq ) { changela_state *state = device->machine().driver_data<changela_state>(); generic_pulse_irq_line(state->m_mcu, 0, 1); }
ADDRESS_MAP_END INTERRUPT_GEN_MEMBER(fitfight_state::snd_irq) { generic_pulse_irq_line(device.execute(), UPD7810_INTF2, 1); }