public static InterruptPtr neogeo_raster_interrupt = new InterruptPtr() { public int handler() 
	{
		
		int line = RASTER_LINES - cpu_getiloops();

		if (line == RASTER_LINES)	/* vblank */
		{
			if (keyboard_pressed_memory(KEYCODE_F1)!=0) raster_enable ^= 1;
	
			lastirq2line = 1000;
	
			/* Add a timer tick to the pd4990a */
			addretrace();
	
			/* Animation counter, 1 once per frame is too fast, every 4 seems good */
			if  (fc_r >= neogeo_frame_counter_speed)
			{
				fc_r=0;
				neogeo_frame_counter++;
			}
			fc_r++;
	
			if (osd_skip_this_frame()==0)
				neogeo_vh_raster_partial_refresh(Machine.scrbitmap,line-RASTER_VBLANK_END+FIRST_VISIBLE_LINE-1);
	
			/* return a standard vblank interrupt */
	//if (errorlog) fprintf(errorlog,"trigger IRQ1\n");
			return 1;      /* vertical blank */
		}
	
		if (irq2enable!=0)
		{
			if (line == irq2start || line == lastirq2line + irq2repeat)
			{
	//			if (errorlog) fprintf(errorlog,"trigger IRQ2 at raster line %d (screen line %d)\n",line,line-RASTER_VBLANK_END+FIRST_VISIBLE_LINE);
				if (raster_enable!=0 && osd_skip_this_frame()==0)
					neogeo_vh_raster_partial_refresh(Machine.scrbitmap,line-RASTER_VBLANK_END+FIRST_VISIBLE_LINE-1);
	
				lastirq2line = line;
	
				return 2;
			}
		}
	
		return 0;
	} }