public static int doPixel(int x) {
		inColorWindow = Window.checkColorWindow();
		
		int mainColor = CGRAM.getColor(PPU.colorMain);
		int subColor = (PPU.prioritySub == 0 ? CGRAM.fixedColor : CGRAM.getColor(PPU.colorSub));
		
		boolean clipMain = checkWindowEffect(clipBlack);
		boolean preventSubMath = checkWindowEffect(preventMath);
		
		if (clipMain) {
			if (preventSubMath) {
				return 0;
			}
			mainColor = 0;
		}
		
		boolean colorExempt = PPU.sourceMain == PPU.SRC_OAM && PPU.colorMain < 192;
		if (!colorExempt && colorEnable[PPU.sourceMain] && !preventSubMath) {
			boolean halve = false;
			if (halfMath) {
				halve = !addSub || PPU.sourceSub == PPU.SRC_BACK;
			}
			
			return addSub(mainColor, subColor, halve);
		} else {
			return mainColor;
		}
	}