static void draw_chars(osd_bitmap _tmpbitmap, osd_bitmap bitmap,
	                       int scroll_cols)
	{
		int offs;
	
	
		/* for every character in the Video RAM, check if it has been modified */
		/* since last time and update it accordingly. */
		for (offs = videoram_size[0] - 1;offs >= 0;offs--)
		{
			if (dirtybuffer[offs]!=0)
			{
				int sx,sy,flipx,flipy;
	
	
				dirtybuffer[offs] = 0;
	
				sx = offs % 32;
				sy = offs / 32;
	
				flipx = colorram.read(offs) & 0x20;
				flipy = colorram.read(offs) & 0x10;
	
				if (flipscreen_y != 0)
				{
					sy = 31 - sy;
					flipy = NOT(flipy);
				}
	
				if (flipscreen_x != 0)
				{
					sx = 31 - sx;
					flipx = NOT(flipx);
				}
	
				drawgfx(_tmpbitmap,Machine.gfx[0],
						videoram.read(offs) | ((colorram.read(offs) & 0xc0) << 2),
						(colorram.read(offs) & 0x0f) + 16 * palbank,
						flipx,flipy,
						8*sx,8*sy,
						null,TRANSPARENCY_NONE,0);
			}
		}
	
	
		/* copy the temporary bitmap to the screen */
		{
			int[] scroll=new int[32];
	
	
			if (flipscreen_y != 0)
			{
				for (offs = 0;offs < 32 - scroll_cols;offs++)
					scroll[offs] = 0;
	
				for (;offs < 32;offs++)
					scroll[offs] = marineb_column_scroll.read(0);
			}
			else
			{
				for (offs = 0;offs < scroll_cols;offs++)
					scroll[offs] = -marineb_column_scroll.read(0);
	
				for (;offs < 32;offs++)
					scroll[offs] = 0;
			}
			copyscrollbitmap(bitmap,tmpbitmap,0,null,32,scroll,Machine.drv.visible_area,TRANSPARENCY_NONE,0);
		}
	}