"Unknown cartridge type %02x", type);
N_("Unknown cartridge type %02x"), type);
bool gbUpdateSizes(){  if(gbRom[0x148] > 8) {    systemMessage(MSG_UNSUPPORTED_ROM_SIZE,                  "Unsupported rom size %02x", gbRom[0x148]);    return false;  }  if(gbRomSize < gbRomSizes[gbRom[0x148]]) {    gbRom = (u8 *)realloc(gbRom, gbRomSizes[gbRom[0x148]]);  }  gbRomSize = gbRomSizes[gbRom[0x148]];  gbRomSizeMask = gbRomSizesMasks[gbRom[0x148]];  if(gbRom[0x149] > 5) {    systemMessage(MSG_UNSUPPORTED_RAM_SIZE,                  "Unsupported ram size %02x", gbRom[0x149]);    return false;  }  gbRamSize = gbRamSizes[gbRom[0x149]];  gbRamSizeMask = gbRamSizesMasks[gbRom[0x149]];  if(gbRamSize) {    gbRam = (u8 *)malloc(gbRamSize);    memset(gbRam, 0xFF, gbRamSize);  }  int type = gbRom[0x147];  mapperReadRAM = NULL;    switch(type) {  case 0x00:  case 0x01:  case 0x02:  case 0x03:    // MBC 1    mapper = mapperMBC1ROM;    mapperRAM = mapperMBC1RAM;    break;  case 0x05:  case 0x06:    // MBC2    mapper = mapperMBC2ROM;    mapperRAM = mapperMBC2RAM;    gbRamSize = 0x200;    gbRamSizeMask = 0x1ff;    break;  case 0x0f:  case 0x10:  case 0x11:  case 0x12:  case 0x13:    // MBC 3    mapper = mapperMBC3ROM;    mapperRAM = mapperMBC3RAM;    mapperReadRAM = mapperMBC3ReadRAM;    break;  case 0x19:  case 0x1a:  case 0x1b:    // MBC5    mapper = mapperMBC5ROM;    mapperRAM = mapperMBC5RAM;    break;  case 0x1c:  case 0x1d:  case 0x1e:    // MBC 5 Rumble    mapper = mapperMBC5ROM;    mapperRAM = mapperMBC5RAM;    break;  case 0x22:    // MBC 7    mapper = mapperMBC7ROM;    mapperRAM = mapperMBC7RAM;    mapperReadRAM = mapperMBC7ReadRAM;    break;  case 0xfe:    // HuC3    mapper = mapperHuC3ROM;    mapperRAM = mapperHuC3RAM;    mapperReadRAM = mapperHuC3ReadRAM;    break;  case 0xff:    // HuC1    mapper = mapperHuC1ROM;    mapperRAM = mapperHuC1RAM;    break;  default:    systemMessage(MSG_UNKNOWN_CARTRIDGE_TYPE,                  "Unknown cartridge type %02x", type);    return false;  }  switch(type) {  case 0x03:  case 0x06:  case 0x0f:  case 0x10:  case 0x13:  case 0x1b:  case 0x1d:  case 0x1e:  case 0x22:  case 0xff:    gbBattery = 1;    break;  }  if(gbRom[0x146] == 0x03) {    if(gbEmulatorType == 0 ||       gbEmulatorType == 2 ||       gbEmulatorType == 5)      gbSgbMode = 1;    else      gbSgbMode = 0;  } else    gbSgbMode = 0;    if(gbRom[0x143] & 0x80) {    if(gbEmulatorType == 0 ||       gbEmulatorType == 1 ||       gbEmulatorType == 4 ||       gbEmulatorType == 5) {      gbCgbMode = 1;      gbVram = (u8 *)malloc(0x4000);      gbWram = (u8 *)malloc(0x8000);      memset(gbVram,0,0x4000);      memset(gbWram,0,0x8000);      memset(gbPalette,0, 2*128);    } else {      gbCgbMode = 0;    }  } else    gbCgbMode = 0;  gbInit();  gbReset();  switch(type) {  case 0x1c:  case 0x1d:  case 0x1e:    gbDataMBC5.isRumbleCartridge = 1;  }  return true;}