Exemple #1
0
int GsGifPacketsExecute(GS_PACKET_TABLE *table, u16 wait)
{
	GS_GIF_PACKET *packet;

	if(table->packet_offset==0    &&   table->qword_offset==0)
		return 0;

	if(table->packets == NULL)
		return -1;

	//close the current pocket
	packet=(GS_GIF_PACKET*)UNCACHED_SEG(&table->packets[table->packet_offset]);
	packet->tag.qwc		=table->qword_offset;
	packet->tag.pad1	=0;
	packet->tag.pce		=0;
	packet->tag.id		=0x07; //end
	packet->tag.irq		=0;
	packet->tag.addr	=(u32)0;
	packet->tag.spr		=0;
	packet->tag.pad2	=0;

	GsDmaSend_tag(0, 0, &table->packets[0].tag);
	if(wait)
		GsDmaWait();

	return 0;
}
Exemple #2
0
void GsPutZBufferEnv2(GS_ZENV *zenv)
{
	QWORD *p;
	p=UNCACHED_SEG(GsPrimWorkArea);
	gs_setGIF_TAG(((GS_GIF_TAG *)&p[0]), 4,1,0,0,GS_GIF_PACKED,1,gif_rd_ad);
	gs_setR_ZBUF_2(((GS_R_ZBUF *)&p[1]), zenv->vram_addr, zenv->psm, zenv->update_mask);

	GsDmaSend(GsPrimWorkArea, 2);
	GsDmaWait();
}