type = 1;
type = 114;
bool cheatsVerifyCheatCode(const char *code, const char *desc){  int len = strlen(code);  if(len != 11 && len != 13 && len != 17) {    systemMessage(MSG_INVALID_CHEAT_CODE, N_("Invalid cheat code '%s'"), code);    return false;  }  if(code[8] != ':') {    systemMessage(MSG_INVALID_CHEAT_CODE, N_("Invalid cheat code '%s'"), code);    return false;      }  int i;  for(i = 0; i < 8; i++) {    if(!CHEAT_IS_HEX(code[i])) {      // wrong cheat      systemMessage(MSG_INVALID_CHEAT_CODE,                    N_("Invalid cheat code '%s'"), code);      return false;    }  }  for(i = 9; i < len; i++) {    if(!CHEAT_IS_HEX(code[i])) {      // wrong cheat      systemMessage(MSG_INVALID_CHEAT_CODE,                    N_("Invalid cheat code '%s'"), code);      return false;    }  }    u32 address = 0;  u32 value = 0;    char buffer[10];  strncpy(buffer, code, 8);  buffer[8] = 0;  sscanf(buffer, "%x", &address);  switch(address >> 24) {  case 2:  case 3:    break;  default:    systemMessage(MSG_INVALID_CHEAT_CODE_ADDRESS,                  N_("Invalid cheat code address: %08x"),                  address);    return false;  }    strncpy(buffer, &code[9], 8);    sscanf(buffer, "%x", &value);  int type = 0;  if(len == 13)    type = 1;  if(len == 17)    type = 2;  cheatsAdd(code, desc, address, address, value, type, type);  return true;}