systemMessage(MSG_CANNOT_OPEN_FILE, "Cannot open file %s", fileName);
systemMessage(MSG_CANNOT_OPEN_FILE, N_("Cannot open file %s"), fileName);
bool CPUWriteGSASnapshot(const char *fileName,                          const char *title,                          const char *desc,                          const char *notes){  FILE *file = fopen(fileName, "wb");      if(!file) {    systemMessage(MSG_CANNOT_OPEN_FILE, "Cannot open file %s", fileName);    return false;  }  u8 buffer[17];  utilPutDword(buffer, 0x0d); // SharkPortSave length  fwrite(buffer, 1, 4, file);  fwrite("SharkPortSave", 1, 0x0d, file);  utilPutDword(buffer, 0x000f0000);  fwrite(buffer, 1, 4, file); // save type 0x000f0000 = GBA save  utilPutDword(buffer, strlen(title));  fwrite(buffer, 1, 4, file); // title length  fwrite(title, 1, strlen(title), file);  utilPutDword(buffer, strlen(desc));  fwrite(buffer, 1, 4, file); // desc length  fwrite(desc, 1, strlen(desc), file);  utilPutDword(buffer, strlen(notes));  fwrite(buffer, 1, 4, file); // notes length  fwrite(notes, 1, strlen(notes), file);  int saveSize = 0x10000;  if(gbaSaveType == 2)    saveSize = flashSize;  int totalSize = saveSize + 0x1c;  utilPutDword(buffer, totalSize); // length of remainder of save - CRC  fwrite(buffer, 1, 4, file);  char temp[0x2001c];  memset(temp, 0, 28);  memcpy(temp, &rom[0xa0], 16); // copy internal name  temp[0x10] = rom[0xbe]; // reserved area (old checksum)  temp[0x11] = rom[0xbf]; // reserved area (old checksum)  temp[0x12] = rom[0xbd]; // complement check  temp[0x13] = rom[0xb0]; // maker  temp[0x14] = 1; // 1 save ?  memcpy(&temp[0x1c], flashSaveMemory, saveSize); // copy save  fwrite(temp, 1, totalSize, file); // write save + header  u32 crc = 0;    for(int i = 0; i < totalSize; i++) {    crc += ((u32)temp[i] << (crc % 0x18));  }    utilPutDword(buffer, crc);  fwrite(buffer, 1, 4, file); // CRC?    fclose(file);  return true;}