log.debug("size=" + size + ", pal.mapsize=" + palette.getMapSize());
	protected void restorePalette(VgaIO io) {		if (palette != null) {			final int size = Math.min(256, palette.getMapSize());			final byte[] r = new byte[size];			final byte[] g = new byte[size];			final byte[] b = new byte[size];			palette.getReds(r);			palette.getGreens(g);			palette.getBlues(b);			//log.debug("Restore-Size:" + size + ", R=" + NumberUtils.hex(r));			for (int i = size - 1; i >= 0; i--) {				setPaletteEntry(io, i, r[i] & 0xff, g[i] & 0xff, b[i] & 0xff);			}		}	}