static void mark_sprites_palette()
	{
		//UBytePtr umap = &palette_used_colors[Machine.drv.gfxdecodeinfo[2].color_codes_start];
                UBytePtr umap = new UBytePtr(palette_used_colors,Machine.drv.gfxdecodeinfo[2].color_codes_start);
		/*unsigned*/ int cmap = 0;
		UBytePtr pt = new UBytePtr(sf1_objectram , 0x2000-0x40);
		int i, j;
	
		while(pt.offset>=sf1_objectram.offset)
		{
			int at = pt.READ_WORD(2);
			int y = pt.READ_WORD(4);
			int x = pt.READ_WORD(6);
	
			if(x>32 && x<415 && y>0 && y<256)
				cmap |= (1<<(at & 0x0f));
	
			pt.offset -= 0x40;
		}
	
		for(i=0;i<16;i++)
		{
			if((cmap & (1<<i))!=0)
			{
				for(j=0;j<15;j++)
					umap.writeinc(PALETTE_COLOR_USED);
				umap.writeinc(PALETTE_COLOR_TRANSPARENT);
			}
			else
			{
				for(j=0;j<16;j++)
					umap.writeinc(PALETTE_COLOR_UNUSED);
			}
		}
	}