if (layerEnableDelay>0) { layerEnableDelay--; if (layerEnableDelay==1) layerEnable = layerSettings & DISPCNT; }
void CPUCompareVCOUNT(){  if(VCOUNT == (DISPSTAT >> 8)) {    DISPSTAT |= 4;    UPDATE_REG(0x04, DISPSTAT);    if(DISPSTAT & 0x20) {      IF |= 4;      UPDATE_REG(0x202, IF);    }  } else {    DISPSTAT &= 0xFFFB;    UPDATE_REG(0x4, DISPSTAT);  }}