예제 #1
0
파일: eprom.c 프로젝트: cdrr/MAME_hack
int eprom_vh_start(void)
{
	static struct atarigen_mo_desc mo_desc =
	{
		1024,                /* maximum number of MO's */
		8,                   /* number of bytes per MO entry */
		2,                   /* number of bytes between MO words */
		0,                   /* ignore an entry if this word == 0xffff */
		0, 0, 0x3ff,         /* link = (data[linkword] >> linkshift) & linkmask */
		1                    /* reverse order */
	};

	static struct atarigen_pf_desc pf_desc =
	{
		8, 8,				/* width/height of each tile */
		64, 64				/* number of tiles in each direction */
	};

	/* reset statics */
	memset(&pf_state, 0, sizeof(pf_state));

	/* initialize the playfield */
	if (atarigen_pf_init(&pf_desc))
		return 1;

	/* initialize the motion objects */
	if (atarigen_mo_init(&mo_desc))
	{
		atarigen_pf_free();
		return 1;
	}

	return 0;
}
예제 #2
0
int xybots_vh_start(void)
{
    static struct atarigen_mo_desc mo_desc =
    {
        64,                  /* maximum number of MO's */
        8,                   /* number of bytes per MO entry */
        2,                   /* number of bytes between MO words */
        0,                   /* ignore an entry if this word == 0xffff */
        -1, 0, 0x3f,         /* link = (data[linkword] >> linkshift) & linkmask */
        0                    /* render in reverse link order */
    };

    static struct atarigen_pf_desc pf_desc =
    {
        8, 8,				/* width/height of each tile */
        64, 64,				/* number of tiles in each direction */
        1					/* non-scrolling */
    };

    /* initialize the playfield */
    if (atarigen_pf_init(&pf_desc))
        return 1;

    /* initialize the motion objects */
    if (atarigen_mo_init(&mo_desc))
    {
        atarigen_pf_free();
        return 1;
    }

    return 0;
}
예제 #3
0
int badlands_vh_start(void)
{
	static struct atarigen_mo_desc mo_desc =
	{
		32,                  /* maximum number of MO's */
		4,                   /* number of bytes per MO entry */
		0x80,                /* number of bytes between MO words */
		0,                   /* ignore an entry if this word == 0xffff */
		-1, 0, 0x3f,         /* link = (data[linkword] >> linkshift) & linkmask */
		0                    /* render in reverse link order */
	};

	static struct atarigen_pf_desc pf_desc =
	{
		8, 8,				/* width/height of each tile */
		64, 64				/* number of tiles in each direction */
	};

	/* initialize statics */
	memset(&pf_state, 0, sizeof(pf_state));

	/* initialize the playfield */
	if (atarigen_pf_init(&pf_desc))
		return 1;

	/* initialize the motion objects */
	if (atarigen_mo_init(&mo_desc))
	{
		atarigen_pf_free();
		return 1;
	}

	/*
	 * if we are palette reducing, do the simple thing by marking everything used except for
	 * the transparent sprite and alpha colors; this should give some leeway for machines
	 * that can't give up all 256 colors
	 */
	if (palette_used_colors)
	{
		int i;

		memset(palette_used_colors, PALETTE_COLOR_USED, Machine->drv->total_colors * sizeof(UINT8));
		for (i = 0; i < 8; i++)
			palette_used_colors[0x80 + i * 16] = PALETTE_COLOR_TRANSPARENT;
	}

	return 0;
}
예제 #4
0
int skullxbo_vh_start(void)
{
	static struct atarigen_mo_desc mo_desc =
	{
		256,                 /* maximum number of MO's */
		8,                   /* number of bytes per MO entry */
		2,                   /* number of bytes between MO words */
		0,                   /* ignore an entry if this word == 0xffff */
		0, 0, 0xff,          /* link = (data[linkword] >> linkshift) & linkmask */
		0                    /* reverse order */
	};

	static struct atarigen_pf_desc pf_desc =
	{
		16, 8,				/* width/height of each tile */
		64, 64				/* number of tiles in each direction */
	};

	/* reset statics */
	memset(&pf_state, 0, sizeof(pf_state));
	latch_byte = 0;
	mo_bank = 0;

	/* allocate the scroll list */
	scroll_list = malloc(sizeof(UINT16) * 2 * YDIM);
	if (!scroll_list)
		return 1;

	/* initialize the playfield */
	if (atarigen_pf_init(&pf_desc))
	{
		free(scroll_list);
		return 1;
	}

	/* initialize the motion objects */
	if (atarigen_mo_init(&mo_desc))
	{
		free(scroll_list);
		atarigen_pf_free();
		return 1;
	}

	return 0;
}
예제 #5
0
int arcadecl_vh_start(void)
{
	static struct atarigen_mo_desc mo_desc =
	{
		256,                 /* maximum number of MO's */
		8,                   /* number of bytes per MO entry */
		2,                   /* number of bytes between MO words */
		0,                   /* ignore an entry if this word == 0xffff */
		0, 0, 0xff,          /* link = (data[linkword] >> linkshift) & linkmask */
		0                    /* render in reverse link order */
	};

	static struct atarigen_pf_desc pf_desc =
	{
		8, 8,				/* width/height of each tile */
		64, 64,				/* number of tiles in each direction */
		1					/* non-scrolling */
	};

	/* allocate color usage */
	color_usage = (int*)malloc(sizeof(int) * 256);
	if (!color_usage)
		return 1;
	color_usage[0] = XDIM * YDIM;
	memset(atarigen_playfieldram, 0, 0x20000);

	/* initialize the playfield */
	if (atarigen_pf_init(&pf_desc))
	{
		free(color_usage);
		return 1;
	}

	/* initialize the motion objects */
	if (atarigen_mo_init(&mo_desc))
	{
		atarigen_pf_free();
		free(color_usage);
		return 1;
	}

	return 0;
}