public static WriteHandlerPtr get_fg_tile_info = new WriteHandlerPtr() { public void handler(int col, int row){
		UShortPtr source = new UShortPtr(sys16_tileram);
	
		if( row<32 ){
			if( col<64 ){
				source.offset += (64*32*sys16_fg_page[0])*2;
			}
			else {
				source.offset += (64*32*sys16_fg_page[1])*2;
			}
		}
		else {
			if( col<64 ){
				source.offset += (64*32*sys16_fg_page[2])*2;
			}
			else {
				source.offset += (64*32*sys16_fg_page[3])*2;
			}
		}
		row = row%32;
		col = col%64;
	
		{
			int data = source.read(row*64+col);
			int tile_number = (data&0xfff) +
					0x1000*((data&sys16_tilebank_switch)!=0?sys16_tile_bank1:sys16_tile_bank0);
	
			if(sys16_textmode==0)
			{
				SET_TILE_INFO( 0, tile_number, (data>>6)&0x7f );
			}
			else
			{
				SET_TILE_INFO( 0, tile_number, (data>>5)&0x7f );
			}
			switch(sys16_fg_priority_mode)
			{
				case 1:		// alien syndrome
					tile_info.priority = (data&0x8000)!=0?(char)1:(char)0;
	//				if(READ_WORD(&paletteram[((data>>6)&0x7f)*16]) !=0 && tile_info.priority==1)
	//					tile_info.flags=TILE_IGNORE_TRANSPARENCY;
					break;
	
				case 3:
					if((data&0xff00) >= sys16_fg_priority_value)
						tile_info.priority = 1;
					else
						tile_info.priority = 0;
					break;
	
				default:
					if(sys16_fg_priority_mode>=0)
						tile_info.priority = (data&0x8000)!=0?(char)1:(char)0;
					break;
			}
		}
	} };
	
/*TODO*///	static public static WriteHandlerPtr get_bg2_tile_info = new WriteHandlerPtr() { public void handler(int col, int row){
/*TODO*///		const UINT16 *source = (const UINT16 *)sys16_tileram;
/*TODO*///	
/*TODO*///		if( row<32 ){
/*TODO*///			if( col<64 ){
/*TODO*///				source += 64*32*sys16_bg2_page[0];
/*TODO*///			}
/*TODO*///			else {
/*TODO*///				source += 64*32*sys16_bg2_page[1];
/*TODO*///			}
/*TODO*///		}
/*TODO*///		else {
/*TODO*///			if( col<64 ){
/*TODO*///				source += 64*32*sys16_bg2_page[2];
/*TODO*///			}
/*TODO*///			else {
/*TODO*///				source += 64*32*sys16_bg2_page[3];
/*TODO*///			}
/*TODO*///		}
/*TODO*///		row = row%32;
/*TODO*///		col = col%64;
/*TODO*///	
/*TODO*///		{
/*TODO*///			int data = source[row*64+col];
/*TODO*///			int tile_number = (data&0xfff) +
/*TODO*///					0x1000*((data&0x1000)?sys16_tile_bank1:sys16_tile_bank0);
/*TODO*///			if(sys16_textmode==0)
/*TODO*///			{
/*TODO*///				SET_TILE_INFO( 0, tile_number, (data>>6)&0x7f );
/*TODO*///			}
/*TODO*///			else
/*TODO*///			{
/*TODO*///				SET_TILE_INFO( 0, tile_number, (data>>5)&0x7f );
/*TODO*///			}
/*TODO*///			tile_info.priority = 0;
/*TODO*///		}
/*TODO*///	} };
/*TODO*///	
/*TODO*///	static public static WriteHandlerPtr get_fg2_tile_info = new WriteHandlerPtr() { public void handler(int col, int row){
/*TODO*///		const UINT16 *source = (const UINT16 *)sys16_tileram;
/*TODO*///	
/*TODO*///		if( row<32 ){
/*TODO*///			if( col<64 ){
/*TODO*///				source += 64*32*sys16_fg2_page[0];
/*TODO*///			}
/*TODO*///			else {
/*TODO*///				source += 64*32*sys16_fg2_page[1];
/*TODO*///			}
/*TODO*///		}
/*TODO*///		else {
/*TODO*///			if( col<64 ){
/*TODO*///				source += 64*32*sys16_fg2_page[2];
/*TODO*///			}
/*TODO*///			else {
/*TODO*///				source += 64*32*sys16_fg2_page[3];
/*TODO*///			}
/*TODO*///		}
/*TODO*///		row = row%32;
/*TODO*///		col = col%64;
/*TODO*///	
/*TODO*///		{
/*TODO*///			int data = source[row*64+col];
/*TODO*///			int tile_number = (data&0xfff) +
/*TODO*///					0x1000*((data&0x1000)?sys16_tile_bank1:sys16_tile_bank0);
/*TODO*///	
/*TODO*///			if(sys16_textmode==0)
/*TODO*///			{
/*TODO*///				SET_TILE_INFO( 0, tile_number, (data>>6)&0x7f );
/*TODO*///			}
/*TODO*///			else
/*TODO*///			{
/*TODO*///				SET_TILE_INFO( 0, tile_number, (data>>5)&0x7f );
/*TODO*///			}
/*TODO*///			if((data&0xff00) >= sys16_fg_priority_value)
/*TODO*///				tile_info.priority = 1;
/*TODO*///			else
/*TODO*///				tile_info.priority = 0;
/*TODO*///		}
/*TODO*///	} }