static void draw_sprites(osd_bitmap bitmap,int pri)
	{
		int offs,fx,fy,x,y,color,sprite;
	
		if (sprite_enable==0) return;
	
		for (offs = 0x1000-8;offs >= 0;offs -= 8)
		{
			/* Don't draw empty sprite table entries */
			if (buffered_spriteram.read(offs+7)!=0xf) continue;
			if (buffered_spriteram.read(offs+0)==0xf0f) continue;
			if (((buffered_spriteram.read(offs+5)>>5)&3)!=pri) continue;
	
			fx= buffered_spriteram.read(offs+1)&0x20;
			fy= buffered_spriteram.read(offs+1)&0x40;
			y = buffered_spriteram.read(offs+0);
			x = buffered_spriteram.read(offs+4);
	
			if ((buffered_spriteram.read(offs+5)&1)!=0) x=0-(0x100-x);
	
			color = buffered_spriteram.read(offs+1)&0x1f;
			sprite = buffered_spriteram.read(offs+2)+(buffered_spriteram.read(offs+3)<<8);
			sprite &= 0x3fff;
	
			if (flipscreen != 0) {
				x=240-x;
				y=240-y;
				if (fx != 0) fx=0; else fx=1;
				if (fy != 0) fy=0; else fy=1;
			}
	
			drawgfx(bitmap,Machine.gfx[3],
					sprite,
					color,fx,fy,x,y,
					Machine.drv.visible_area,TRANSPARENCY_PEN,15);
		}
	}