Beispiel #1
0
static READ8_HANDLER( dunhuang_service_r )
{
	return input_port_read_indexed(machine, 5)
	 | ((dunhuang_hopper && !(video_screen_get_frame_number(machine->primary_screen)%10)) ? 0x00 : 0x08)	// bit 3: hopper sensor
	 | 0x80																// bit 7 low -> tiles block transferrer busy
	;
}
Beispiel #2
0
static void draw_sprites( running_machine* machine, bitmap_t *bitmap, const rectangle *cliprect )
{
	diverboy_state *state = (diverboy_state *)machine->driver_data;
	UINT16 *source = state->spriteram;
	UINT16 *finish = source + (state->spriteram_size / 2);

	while (source < finish)
	{
		INT16 xpos, ypos, number, colr, bank, flash;

		ypos = source[4];
		xpos = source[0];
		colr = (source[1] & 0x00f0) >> 4;
		number = source[3];
		flash = source[1] & 0x1000;

		colr |= ((source[1] & 0x000c) << 2);

		ypos = 0x100 - ypos;

		bank = (source[1] & 0x0002) >> 1;

		if (!flash || (video_screen_get_frame_number(machine->primary_screen) & 1))
		{
			drawgfx_transpen(bitmap,cliprect,machine->gfx[bank],
					number,
					colr,
					0,0,
					xpos,ypos,
					(source[1] & 0x0008) ? -1 : 0);
		}

		source += 8;
	}
}
Beispiel #3
0
static void draw_sprites(running_machine* machine, bitmap_t *bitmap, const rectangle *cliprect )
{
    UINT16 *source = diverboy_spriteram;
    UINT16 *finish = source + (diverboy_spriteram_size/2);

    while (source < finish)
    {
        INT16 xpos,ypos,number,colr,bank,flash;

        ypos = source[4];
        xpos = source[0];
        colr = (source[1]& 0x00f0) >> 4;
        number = source[3];
        flash = source[1] & 0x1000;

        colr |= ((source[1] & 0x000c) << 2);

        ypos = 0x100 - ypos;

        bank = (source[1]&0x0002) >> 1;

        if (!flash || (video_screen_get_frame_number(machine->primary_screen) & 1))
        {
            drawgfx(bitmap,machine->gfx[bank],
                    number,
                    colr,
                    0,0,
                    xpos,ypos,
                    cliprect,(source[1] & 0x0008) ? TRANSPARENCY_NONE : TRANSPARENCY_PEN,0);
        }

        source+=8;
    }
}
Beispiel #4
0
static CUSTOM_INPUT( hopper_r )
{
	return hopper && !(video_screen_get_frame_number(field->port->machine->primary_screen)%10);
}