Example #1
0
static INTERRUPT_GEN( c1942_interrupt )
{
	if (cpu_getiloops() != 0)
		cpunum_set_input_line_and_vector(0, 0, HOLD_LINE, 0xcf);/* RST 08h */
	else
		cpunum_set_input_line_and_vector(0, 0, HOLD_LINE, 0xd7);	/* RST 10h - vblank */
}
Example #2
0
static WRITE8_HANDLER( snd_irq_w )
{
	if(data == 1)
		cpunum_set_input_line_and_vector(1, 0, ASSERT_LINE, 0x38);
	else
		cpunum_set_input_line_and_vector(1, 0, CLEAR_LINE, 0x38);
}
Example #3
0
static INTERRUPT_GEN( m107_raster_interrupt )
{
	int line = 256 - cpu_getiloops();

	if (code_pressed_memory(KEYCODE_F1)) {
		raster_enable ^= 1;
		if (raster_enable)
			popmessage("Raster IRQ enabled");
		else
			popmessage("Raster IRQ disabled");
	}

	/* Raster interrupt */
	if (raster_enable && line==m107_raster_irq_position) {
		video_screen_update_partial(0, line);
		cpunum_set_input_line_and_vector(0, 0, HOLD_LINE, m107_IRQ_2);
	}

	/* Kludge to get Fire Barrel running */
	else if (line==118)
	{
		cpunum_set_input_line_and_vector(0, 0, HOLD_LINE, m107_IRQ_3);
	}

	/* Redraw screen, then set vblank and trigger the VBL interrupt */
	else if (line==248) {
		video_screen_update_partial(0, 248);
		m107_vblank=1;
		cpunum_set_input_line_and_vector(0, 0, HOLD_LINE, m107_IRQ_0);
	}

	/* End of vblank */
	else if (line==255)
		m107_vblank=0;
}
Example #4
0
static INTERRUPT_GEN( olibochu_interrupt )
{
	if (cpu_getiloops() == 0)
		cpunum_set_input_line_and_vector(0, 0, HOLD_LINE, 0xcf);	/* RST 08h */
	else
		cpunum_set_input_line_and_vector(0, 0, HOLD_LINE, 0xd7);	/* RST 10h */
}
Example #5
0
static INTERRUPT_GEN( lockon_irq )
{
        if(main_inten)
        	cpunum_set_input_line_and_vector(0, 0, HOLD_LINE, 0x60/4);

          // Ground CPU takes an interrupt on BUFEND - this is incorrect.
          cpunum_set_input_line_and_vector(1, 0, HOLD_LINE, 0x60/4);
}
SEIBU_SOUND_SYSTEM_YM2203_HARDWARE

SEIBU_SOUND_SYSTEM_ADPCM_HARDWARE

/* Interrupt Generators */

static INTERRUPT_GEN( deadang_interrupt )
{
	if (cpu_getiloops())
		cpunum_set_input_line_and_vector(cpu_getactivecpu(), 0, HOLD_LINE, 0xc8/4);	/* VBL */
	else
		cpunum_set_input_line_and_vector(cpu_getactivecpu(), 0, HOLD_LINE, 0xc4/4);	/* VBL */
}
Example #7
0
static INTERRUPT_GEN( yamyam_interrupt )
{
	if (cpu_getiloops() == 0)
	{
		if (input_ports_hack)
		{
			rambase[0x004] = readinputport(4);	/* COIN */
			rambase[0x005] = readinputport(3);	/* IN1 */
			rambase[0x006] = readinputport(2);	/* IN0 */
		}
		cpunum_set_input_line_and_vector(0, 0, HOLD_LINE, 0xd7);	/* RST 10h vblank */
	}
	else if ((cpu_getiloops() & 1) == 1)
		cpunum_set_input_line_and_vector(0, 0, HOLD_LINE, 0xcf);	/* RST 08h sound (hand tuned) */
}
Example #8
0
ROM_END


static void timer_callback(int param)
{
	cpunum_set_input_line_and_vector(0, 0, HOLD_LINE, 0x4c);
}
Example #9
0
MACHINE_DRIVER_END


static void galaxygn_sound_irq(int line)
{
	cpunum_set_input_line_and_vector(1, 0, line ? ASSERT_LINE : CLEAR_LINE, 0x80/4);
}
Example #10
0
INPUT_PORTS_END

/* handler called by the 2151 emulator when the internal timers cause an IRQ */
static void blockout_irq_handler(int irq)
{
	cpunum_set_input_line_and_vector(1,0,irq ? ASSERT_LINE : CLEAR_LINE,0xff);
}
Example #11
0
ROM_END


static TIMER_CALLBACK( polyplay_timer_callback )
{
	cpunum_set_input_line_and_vector(0, 0, HOLD_LINE, 0x4c);
}
Example #12
0
SEIBU_SOUND_SYSTEM_YM3812_HARDWARE

/* Interrupt Generator */

static INTERRUPT_GEN( dynduke_interrupt )
{
	cpunum_set_input_line_and_vector(cpu_getactivecpu(), 0, HOLD_LINE, 0xc8/4);	// VBL
}
Example #13
0
GFXDECODE_END

/* Interrupt Generator */

static INTERRUPT_GEN( dynduke_interrupt )
{
	cpunum_set_input_line_and_vector(machine, cpunum, 0, HOLD_LINE, 0xc8/4);	// VBL
}
Example #14
0
GFXDECODE_END



/* handler called by the 3812 emulator when the internal timers cause an IRQ */
static void irqhandler(int linestate)
{
	cpunum_set_input_line_and_vector(Machine, 1,0,linestate,0xff);
}
Example #15
0
static INTERRUPT_GEN( kopunch_interrupt )
{
	if (cpu_getiloops() == 0)
	{
		if (~input_port_read_indexed(machine, 1) & 0x80)	/* coin 1 */
		{
			cpunum_set_input_line_and_vector(machine, 0,0,HOLD_LINE,0xf7);	/* RST 30h */
			return;
		}
		else if (~input_port_read_indexed(machine, 1) & 0x08)	/* coin 2 */
		{
			cpunum_set_input_line_and_vector(machine, 0,0,HOLD_LINE,0xef);	/* RST 28h */
			return;
		}
	}

	cpunum_set_input_line_and_vector(machine, 0,0,HOLD_LINE,0xff);	/* RST 38h */
}
Example #16
0
static INTERRUPT_GEN( djboy_interrupt )
{
	/* CPU1 uses interrupt mode 2.
     * For now, just alternate the two interrupts.  It isn't known what triggers them
     */
	static int addr = 0xff;
	addr ^= 0x02;
	cpunum_set_input_line_and_vector(0, 0, HOLD_LINE, addr);
}
Example #17
0
void data_from_i8031(int data)
{
     M68681.RBB  = data<<8;                         // Put into receive buffer.
     M68681.SRB |= 0x0100;                          // Set Receiver B ready.
     if(M68681.IMR & 0x1000)
     {
     	cpunum_set_input_line_and_vector(0,3, HOLD_LINE, M68681.IVR);    // Generate a receiver interrupt.
     	printf("INTERRUPT!!!\n");
     }
   printf("8031 sent data: %x\n",data);
}
Example #18
0
static INTERRUPT_GEN( m107_raster_interrupt )
{
	static int last_line=0;
	int line = 256 - cpu_getiloops();

	if (code_pressed_memory(KEYCODE_F1)) {
		raster_enable ^= 1;
		if (raster_enable)
			usrintf_showmessage("Raster IRQ enabled");
		else
			usrintf_showmessage("Raster IRQ disabled");
	}

	/* Raster interrupt */
	if (raster_enable && line==m107_raster_irq_position) {
		if (osd_skip_this_frame()==0)
			m107_vh_raster_partial_refresh(Machine->scrbitmap,last_line,line);
		last_line=line+1;

		cpunum_set_input_line_and_vector(0, 0, HOLD_LINE, m107_IRQ_2);
	}

	/* Kludge to get Fire Barrel running */
	else if (line==118)
	{
		cpunum_set_input_line_and_vector(0, 0, HOLD_LINE, m107_IRQ_3);
	}

	/* Redraw screen, then set vblank and trigger the VBL interrupt */
	else if (line==248) {
		if (osd_skip_this_frame()==0)
			m107_vh_raster_partial_refresh(Machine->scrbitmap,last_line,248);
		last_line=0;
		m107_vblank=1;
		cpunum_set_input_line_and_vector(0, 0, HOLD_LINE, m107_IRQ_0);
	}

	/* End of vblank */
	else if (line==255)
		m107_vblank=0;
}
Example #19
0
static WRITE8_HANDLER( mikie_sh_irqtrigger_w )
{
	static int last;

	if (last == 0 && data == 1)
	{
		// setting bit 0 low then high triggers IRQ on the sound CPU
		cpunum_set_input_line_and_vector(1, 0, HOLD_LINE, 0xff);
	}

	last = data;
}
Example #20
0
ADDRESS_MAP_END


/***************************************************************************************/



/***************************************************************************************/

static INTERRUPT_GEN( gunpey_interrupt )
{
	cpunum_set_input_line_and_vector(0,0,HOLD_LINE,0x200/4);
}
Example #21
0
static INTERRUPT_GEN( chl_interrupt )
{
	int vector = video_screen_get_vblank(0) ? 0xdf : 0xcf; /* 4 irqs per frame: 3 times 0xcf, 1 time 0xdf */

//    video_screen_update_partial(0, video_screen_get_vpos(0));

	cpunum_set_input_line_and_vector(0, 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 cpu 1 here, as well.
	//but only once per frame !
	if (vector == 0xdf) /* only on vblank */
		cpunum_set_input_line(1, 0, PULSE_LINE );

}
Example #22
0
static WRITE8_HANDLER ( xxmissio_status_s_w )
{
    switch (data)
    {
    case 0x00:
        xxmissio_status |= 0x10;
        break;

    case 0x40:
        xxmissio_status |= 0x08;
        break;

    case 0x80:
        xxmissio_status &= ~0x04;
        cpunum_set_input_line_and_vector(machine, 0,0,HOLD_LINE,0x10);
        break;
    }
}
Example #23
0
static INTERRUPT_GEN( coin_interrupt )
{
	static int last = 0;

	if (readinputport(0) & 0x80)
	{
		last = 0;
	}
	else
	{
		if (last == 0)    /* coin inserted */
		{
			cpunum_set_input_line_and_vector(0, 0, HOLD_LINE, 0x50);
		}

		last = 1;
	}
}
Example #24
0
static WRITE8_HANDLER( combasc_sh_irqtrigger_w )
{
	cpunum_set_input_line_and_vector(machine, 1,0,HOLD_LINE,0xff);
}
Example #25
0
/* z80 ctc */
static void ctc_interrupt (int state)
{
    cpunum_set_input_line_and_vector(0, 0, HOLD_LINE, Z80_VECTOR(0,state));
}
Example #26
0
static WRITE8_HANDLER( crimfght_sh_irqtrigger_w )
{
	soundlatch_w(offset,data);
	cpunum_set_input_line_and_vector(1,0,HOLD_LINE,0xff);
}
Example #27
0
static INTERRUPT_GEN( periodic_interrupt )
{
	cpunum_set_input_line_and_vector(0, 0, HOLD_LINE, 0x4e);
}
Example #28
0
static INTERRUPT_GEN( m107_interrupt )
{
	m107_vblank=0;
	m107_vh_raster_partial_refresh(Machine->scrbitmap,0,248);
	cpunum_set_input_line_and_vector(0, 0, HOLD_LINE, m107_IRQ_0); /* VBL */
}
Example #29
0
static WRITE8_HANDLER( k88games_sh_irqtrigger_w )
{
	cpunum_set_input_line_and_vector(1, 0, HOLD_LINE, 0xff);
}
Example #30
0
static INTERRUPT_GEN( roundup5_interrupt )
{
	cpunum_set_input_line_and_vector(0, 0, HOLD_LINE, 0xc8/4);	/* VBL */
}