static void render_background(osd_bitmap bitmap, int priority )
	{
		int scrollx = 	tigeroad_scrollram.READ_WORD(0) & 0xfff; /* 0..4096 */
		int scrolly =	tigeroad_scrollram.READ_WORD(2) & 0xfff; /* 0..4096 */
	
		UBytePtr p = memory_region(REGION_GFX4);
	
		int alignx = scrollx%32;
		int aligny = scrolly%32;
	
		int row = scrolly/32;	/* 0..127 */
		int sy = 224+aligny;
	
		int transp0,transp1;
	
		if (priority != 0){ /* foreground */
			transp0 = 0xFFFF;	/* draw nothing (all pens transparent) */
			transp1 = 0x01FF;	/* high priority half of tile */
		}
		else { /* background */
			transp0 = 0;		/* NO_TRANSPARENCY */
			transp1 = 0xFE00;	/* low priority half of tile */
		}
	
		while( sy>-32 ){
			int col = scrollx/32;	/* 0..127 */
			int sx = -alignx;
	
			while( sx<256 ){
				int offset = 2*(col%8) + 16*(row%8) + 128*(col/8) + 2048*(row/8);
	
				int code = p.read(offset);
				int attr = p.read(offset+1);
	
				int flipx = attr & 0x20;
				int flipy = 0;
				int color = attr & 0x0f;
	
				if (flipscreen != 0)
					drawgfx(bitmap,Machine.gfx[1],
							code + ((attr & 0xc0) << 2) + (bgcharbank << 10),
							color,
							NOT(flipx),NOT(flipy),
							224-sx,224-sy,
							Machine.drv.visible_area,
							TRANSPARENCY_PENS,(attr & 0x10)!=0 ? transp1 : transp0);
				else
					drawgfx(bitmap,Machine.gfx[1],
							code + ((attr & 0xc0) << 2) + (bgcharbank << 10),
							color,
							flipx,flipy,
							sx,sy,
							Machine.drv.visible_area,
							TRANSPARENCY_PENS,(attr & 0x10)!=0 ? transp1 : transp0);
	
				sx+=32;
				col++;
				if( col>=128 ) col-=128;
			}
			sy-=32;
			row++;
			if( row>=128 ) row-=128;
		}
	}