int nDataSet = *((u16 *)&gbSgbPacket[3]);
int nDataSet = FROM16LE(*((u16 *)&gbSgbPacket[3]));
void gbSgbAttributeCharacter(){  u8 startH = gbSgbPacket[1] & 0x1f;  u8 startV = gbSgbPacket[2] & 0x1f;  int nDataSet = *((u16 *)&gbSgbPacket[3]);  int style = gbSgbPacket[5] & 1;  if(startH > 19)    startH = 19;  if(startV > 17)    startV = 17;  u8 s = 6;  u8 *fromAddress = &gbSgbPacket[6];  u8 v = *fromAddress++;    if(style) {    while(nDataSet) {      u8 p = (v >> s) & 3;      gbSgbATF[startV * 20 + startH] = p;      startV++;      if(startV == 18) {        startV = 0;        startH++;        if(startH == 20)          break;      }      if(s)        s -= 2;      else {        s = 6;        v = *fromAddress++;        nDataSet--;      }    }  } else {    while(nDataSet) {      u8 p = (v >> s) & 3;      gbSgbATF[startV * 20 + startH] = p;      startH++;      if(startH == 20) {        startH = 0;        startV++;        if(startV == 18)          break;      }            if(s)        s -= 2;      else {        s = 6;        v = *fromAddress++;        nDataSet--;      }          }  }}