Example #1
0
static inline int update_scanline(void) {
	memory.vid.irq2taken = 0;

	if (memory.vid.irq2control & 0x10) {

		if (memory.vid.current_line == memory.vid.irq2start) {
			if (memory.vid.irq2control & 0x80)
				memory.vid.irq2start += (memory.vid.irq2pos + 3) / 0x180;
			memory.vid.irq2taken = 1;
		}
	}

	if (memory.vid.irq2taken) {
		if (!skip_this_frame) {
			if (last_line < 21)
				last_line = 21;
			if (memory.vid.current_line < 20)
				memory.vid.current_line = 20;
			draw_screen_scanline(last_line - 21, memory.vid.current_line - 20, 0);
		}
		last_line = memory.vid.current_line;
	}
	memory.vid.current_line++;
	return memory.vid.irq2taken;
}
Example #2
0
static inline void update_screen(void) {

	if (memory.vid.irq2control & 0x40)
		memory.vid.irq2start = (memory.vid.irq2pos + 3) / 0x180; /* ridhero gives 0x17d */
	else
		memory.vid.irq2start = 1000;

	if (!skip_this_frame) {
		if (last_line < 21) { /* there was no IRQ2 while the beam was in the
							 * visible area -> no need for scanline rendering */
			draw_screen();
		} else {
			draw_screen_scanline(last_line - 21, 262, 1);
		}
	}

	last_line = 0;

	pd4990a_addretrace();
	if (fc >= neogeo_frame_counter_speed) {
		fc = 0;
		neogeo_frame_counter++;
	}
	fc++;

	//skip_this_frame = skip_next_frame;
	//skip_next_frame = frame_skip(0);
}
Example #3
0
static inline int neo_interrupt(void)
{
/*
    static int fc;
    int skip_this_frame;
*/

    pd4990a_addretrace();
    // printf("neogeo_frame_counter_speed %d\n",neogeo_frame_counter_speed);
    if (!(irq2control & 0x8)) {
	if (fc >= neogeo_frame_counter_speed) {
	    fc = 0;
	    neogeo_frame_counter++;
	}
	fc++;
    }

    skip_this_frame = skip_next_frame;
    skip_next_frame = frame_skip(0);

    if (!skip_this_frame) {
	PROFILER_START(PROF_VIDEO);
#ifdef DEBUG_VIDEO
	draw_screen_scanline(0, 256, 1);
#else
#ifdef FULL_GL
	fgl_drawscreen();
#else
	draw_screen();
#endif
#endif
	PROFILER_STOP(PROF_VIDEO);
    }
    return 1;
}
Example #4
0
File: emu.c Project: gillotte/gxgeo
static inline int update_scanline(void) {
    /* int i; */
    irq2taken = 0;

    if (irq2control & 0x10) {
        if (current_line  == irq2start ) {
            if (irq2control & 0x80)
                irq2start += (irq2pos_value + 3) / 0x180;
            irq2taken = 1;
        }
    }


    if (irq2taken) {
        if (!skip_this_frame) {
            draw_screen_scanline(last_line-21, current_line-20, 0);
        }
        last_line = current_line;
    }
    current_line++;
    return irq2taken;
}