cheatsAdd(code, desc, 0, 0, 512, 0, false);
cheatsAdd(code, desc, address & 0x0FFFFFFF, value, 512, UNKNOWN_CODE, false);
void cheatsAddCBACode(char *code, char *desc){  if(strlen(code) != 13) {    // wrong cheat    systemMessage(MSG_INVALID_CBA_CODE,                  "Invalid CBA code. Format is XXXXXXXX YYYY.");    return;  }    cheatsToUpper(code);    int i;  for(i = 0; i < 8; i++) {    if(!CHEAT_IS_HEX(code[i])) {      // wrong cheat      systemMessage(MSG_INVALID_CBA_CODE,                    "Invalid CBA code. Format is XXXXXXXX YYYY.");      return;    }  }  if(code[8] != ' ') {    systemMessage(MSG_INVALID_CBA_CODE,                  "Invalid CBA code. Format is XXXXXXXX YYYY.");    return;      }    for(i = 9; i < 13; i++) {    if(!CHEAT_IS_HEX(code[i])) {      // wrong cheat      systemMessage(MSG_INVALID_CBA_CODE,                    "Invalid CBA code. Format is XXXXXXXX YYYY.");      return;    }  }      char buffer[10];  strncpy(buffer, code, 8);  buffer[8] = 0;  u32 address;  sscanf(buffer, "%x", &address);  strncpy(buffer, &code[9], 4);  buffer[4] = 0;  u32 value;  sscanf(buffer, "%x", &value);  u8 array[8] = {    address & 255,    (address >> 8) & 255,    (address >> 16) & 255,    (address >> 24) & 255,    (value & 255),    (value >> 8) & 255,    0,    0  };  if(cheatsCBAGetCount() == 0 &&     (address >> 28) == 9) {    u32 seed[8];    cheatsCBAParseSeedCode(address, value, seed);    cheatsCBAChangeEncryption(seed);    cheatsAdd(code, desc, 0, 0, 512, 0, false);  } else {    if(cheatsCBAShouldDecrypt())      cheatsCBADecrypt(array);    address = *((u32 *)array);    value = *((u16 *)&array[4]);        int type = (address >> 28) & 15;    if(isMultilineCode(cheatsNumber-1)) {      cheatsAdd(code, desc, address, value, 512, UNKNOWN_CODE, false);      return;    }        switch(type) {    case 0x00:      {        if(!cheatsCBATableGenerated)          cheatsCBAGenTable();        u32 crc = cheatsCBACalcCRC(rom, 0x10000);        if(crc != address) {          systemMessage(MSG_CBA_CODE_WARNING,                        "Warning: Codes seem to be for a different game.\nCodes may not work correctly.");        }        cheatsAdd(code, desc, address & 0x0FFFFFFF, value, 512,                   UNKNOWN_CODE, false);      }      break;    case 0x03:      cheatsAdd(code, desc, address & 0x0FFFFFFF, value, 512,                 INT_8_BIT_WRITE, true);      break;    case 0x04:      cheatsAdd(code, desc, address & 0x0FFFFFFF, value, 512,                 CBA_SLIDE_CODE, true);      break;    case 0x06:      cheatsAdd(code, desc, address & 0x0FFFFFFF, value, 512,                 CBA_AND, true);      break;    case 0x07:      cheatsAdd(code, desc, address & 0x0FFFFFFF, value, 512,                 CBA_IF_TRUE, true);      break;    case 0x08:      cheatsAdd(code, desc, address & 0x0FFFFFFF, value, 512,                 INT_16_BIT_WRITE, true);      break;    case 0x0a:      cheatsAdd(code, desc, address & 0x0FFFFFFF, value, 512,                 CBA_IF_FALSE, true);      break;    case 0x0d:      cheatsAdd(code, desc, address & 0x0FFFFFFF, value, 512,                 CBA_IF_KEYS_PRESSED, true);      break;    default:      // unsupported code      cheatsAdd(code, desc, address & 0x0FFFFFFF, value, 512,                 UNKNOWN_CODE, false);      break;    }  }}