if(gbBorderOn)
if(gbBorderOn && gbSgbCGBSupport > 4)
void gbSgbChrTransfer(){  gbSgbRenderScreenToBuffer();    int address = (gbSgbPacket[1] & 1) * (128*32);  if(gbSgbPacket[1] & 1)    gbSgbCGBSupport |= 2;  else    gbSgbCGBSupport |= 1;    memcpy(&gbSgbBorderChar[address], gbSgbScreenBuffer, 128 * 32);  if(gbBorderAutomatic && !gbBorderOn) {    gbBorderOn = 1;    systemGbBorderOn();  }  if(gbBorderOn)    gbSgbRenderBorder();  if(gbSgbMode && gbCgbMode && gbSgbCGBSupport == 7) {    gbSgbCGBSupport = 0;    gbSgbMode = 0;    gbSgbMask = 0;    gbReset();  }  }