2016-07-06 18:33:05 +00:00
|
|
|
// Copyright 2016 Dolphin Emulator Project
|
2015-05-17 23:08:10 +00:00
|
|
|
// Licensed under GPLv2+
|
2013-04-18 03:09:55 +00:00
|
|
|
// Refer to the license.txt file included.
|
2009-07-03 22:51:21 +00:00
|
|
|
|
2015-04-09 15:44:53 +00:00
|
|
|
#include <map>
|
2014-02-21 00:47:53 +00:00
|
|
|
#include <string>
|
|
|
|
|
2017-12-31 19:33:36 +00:00
|
|
|
#include "Common/Assert.h"
|
|
|
|
#include "Common/Common.h"
|
2014-09-08 01:06:58 +00:00
|
|
|
#include "Common/CommonTypes.h"
|
2014-09-19 04:17:41 +00:00
|
|
|
#include "Common/Logging/Log.h"
|
2017-12-31 19:33:36 +00:00
|
|
|
#include "Common/MsgHandler.h"
|
2016-08-11 19:14:39 +00:00
|
|
|
#include "DiscIO/Enums.h"
|
2009-07-03 22:51:21 +00:00
|
|
|
|
|
|
|
namespace DiscIO
|
|
|
|
{
|
2017-12-31 19:33:36 +00:00
|
|
|
std::string GetName(Country country, bool translate)
|
|
|
|
{
|
|
|
|
std::string name;
|
|
|
|
|
|
|
|
switch (country)
|
|
|
|
{
|
2018-03-31 12:04:13 +00:00
|
|
|
case Country::Europe:
|
2017-12-31 19:33:36 +00:00
|
|
|
name = _trans("Europe");
|
|
|
|
break;
|
2018-03-31 12:04:13 +00:00
|
|
|
case Country::Japan:
|
2017-12-31 19:33:36 +00:00
|
|
|
name = _trans("Japan");
|
|
|
|
break;
|
2018-03-31 12:04:13 +00:00
|
|
|
case Country::USA:
|
2017-12-31 19:33:36 +00:00
|
|
|
name = _trans("USA");
|
|
|
|
break;
|
2018-03-31 12:04:13 +00:00
|
|
|
case Country::Australia:
|
2017-12-31 19:33:36 +00:00
|
|
|
name = _trans("Australia");
|
|
|
|
break;
|
2018-03-31 12:04:13 +00:00
|
|
|
case Country::France:
|
2017-12-31 19:33:36 +00:00
|
|
|
name = _trans("France");
|
|
|
|
break;
|
2018-03-31 12:04:13 +00:00
|
|
|
case Country::Germany:
|
2017-12-31 19:33:36 +00:00
|
|
|
name = _trans("Germany");
|
|
|
|
break;
|
2018-03-31 12:04:13 +00:00
|
|
|
case Country::Italy:
|
2017-12-31 19:33:36 +00:00
|
|
|
name = _trans("Italy");
|
|
|
|
break;
|
2018-03-31 12:04:13 +00:00
|
|
|
case Country::Korea:
|
2017-12-31 19:33:36 +00:00
|
|
|
name = _trans("Korea");
|
|
|
|
break;
|
2018-03-31 12:04:13 +00:00
|
|
|
case Country::Netherlands:
|
2017-12-31 19:33:36 +00:00
|
|
|
name = _trans("Netherlands");
|
|
|
|
break;
|
2018-03-31 12:04:13 +00:00
|
|
|
case Country::Russia:
|
2017-12-31 19:33:36 +00:00
|
|
|
name = _trans("Russia");
|
|
|
|
break;
|
2018-03-31 12:04:13 +00:00
|
|
|
case Country::Spain:
|
2017-12-31 19:33:36 +00:00
|
|
|
name = _trans("Spain");
|
|
|
|
break;
|
2018-03-31 12:04:13 +00:00
|
|
|
case Country::Taiwan:
|
2017-12-31 19:33:36 +00:00
|
|
|
name = _trans("Taiwan");
|
|
|
|
break;
|
2018-03-31 12:04:13 +00:00
|
|
|
case Country::World:
|
2017-12-31 19:33:36 +00:00
|
|
|
name = _trans("World");
|
|
|
|
break;
|
|
|
|
default:
|
|
|
|
name = _trans("Unknown");
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
2019-06-17 03:45:37 +00:00
|
|
|
return translate ? Common::GetStringT(name.c_str()) : name;
|
2017-12-31 19:33:36 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
std::string GetName(Language language, bool translate)
|
|
|
|
{
|
|
|
|
std::string name;
|
|
|
|
|
|
|
|
switch (language)
|
|
|
|
{
|
2018-03-31 12:04:13 +00:00
|
|
|
case Language::Japanese:
|
2017-12-31 19:33:36 +00:00
|
|
|
name = _trans("Japanese");
|
|
|
|
break;
|
2018-03-31 12:04:13 +00:00
|
|
|
case Language::English:
|
2017-12-31 19:33:36 +00:00
|
|
|
name = _trans("English");
|
|
|
|
break;
|
2018-03-31 12:04:13 +00:00
|
|
|
case Language::German:
|
2017-12-31 19:33:36 +00:00
|
|
|
name = _trans("German");
|
|
|
|
break;
|
2018-03-31 12:04:13 +00:00
|
|
|
case Language::French:
|
2017-12-31 19:33:36 +00:00
|
|
|
name = _trans("French");
|
|
|
|
break;
|
2018-03-31 12:04:13 +00:00
|
|
|
case Language::Spanish:
|
2017-12-31 19:33:36 +00:00
|
|
|
name = _trans("Spanish");
|
|
|
|
break;
|
2018-03-31 12:04:13 +00:00
|
|
|
case Language::Italian:
|
2017-12-31 19:33:36 +00:00
|
|
|
name = _trans("Italian");
|
|
|
|
break;
|
2018-03-31 12:04:13 +00:00
|
|
|
case Language::Dutch:
|
2017-12-31 19:33:36 +00:00
|
|
|
name = _trans("Dutch");
|
|
|
|
break;
|
2018-03-31 12:04:13 +00:00
|
|
|
case Language::SimplifiedChinese:
|
2017-12-31 19:33:36 +00:00
|
|
|
name = _trans("Simplified Chinese");
|
|
|
|
break;
|
2018-03-31 12:04:13 +00:00
|
|
|
case Language::TraditionalChinese:
|
2017-12-31 19:33:36 +00:00
|
|
|
name = _trans("Traditional Chinese");
|
|
|
|
break;
|
2018-03-31 12:04:13 +00:00
|
|
|
case Language::Korean:
|
2017-12-31 19:33:36 +00:00
|
|
|
name = _trans("Korean");
|
|
|
|
break;
|
|
|
|
default:
|
|
|
|
name = _trans("Unknown");
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
2019-06-17 03:45:37 +00:00
|
|
|
return translate ? Common::GetStringT(name.c_str()) : name;
|
2017-12-31 19:33:36 +00:00
|
|
|
}
|
|
|
|
|
2017-06-17 10:26:32 +00:00
|
|
|
bool IsDisc(Platform volume_type)
|
|
|
|
{
|
2018-03-31 12:04:13 +00:00
|
|
|
return volume_type == Platform::GameCubeDisc || volume_type == Platform::WiiDisc;
|
2017-06-17 10:26:32 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
bool IsWii(Platform volume_type)
|
|
|
|
{
|
2018-03-31 12:04:13 +00:00
|
|
|
return volume_type == Platform::WiiDisc || volume_type == Platform::WiiWAD;
|
2017-06-17 10:26:32 +00:00
|
|
|
}
|
|
|
|
|
2016-12-23 20:53:36 +00:00
|
|
|
bool IsNTSC(Region region)
|
|
|
|
{
|
|
|
|
return region == Region::NTSC_J || region == Region::NTSC_U || region == Region::NTSC_K;
|
|
|
|
}
|
|
|
|
|
2017-12-31 19:33:36 +00:00
|
|
|
// Increment CACHE_REVISION (GameFileCache.cpp) if the code below is modified
|
2015-04-10 20:10:49 +00:00
|
|
|
|
2017-03-17 20:16:59 +00:00
|
|
|
Country TypicalCountryForRegion(Region region)
|
|
|
|
{
|
|
|
|
switch (region)
|
|
|
|
{
|
|
|
|
case Region::NTSC_J:
|
2018-03-31 12:04:13 +00:00
|
|
|
return Country::Japan;
|
2017-03-17 20:16:59 +00:00
|
|
|
case Region::NTSC_U:
|
2018-03-31 12:04:13 +00:00
|
|
|
return Country::USA;
|
2017-03-17 20:16:59 +00:00
|
|
|
case Region::PAL:
|
2018-03-31 12:04:13 +00:00
|
|
|
return Country::Europe;
|
2017-03-17 20:16:59 +00:00
|
|
|
case Region::NTSC_K:
|
2018-03-31 12:04:13 +00:00
|
|
|
return Country::Korea;
|
2017-03-17 20:16:59 +00:00
|
|
|
default:
|
2018-03-31 12:04:13 +00:00
|
|
|
return Country::Unknown;
|
2017-03-17 20:16:59 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2019-06-30 10:44:38 +00:00
|
|
|
Region SysConfCountryToRegion(u8 country_code)
|
|
|
|
{
|
|
|
|
if (country_code == 0)
|
|
|
|
return Region::Unknown;
|
|
|
|
|
|
|
|
if (country_code < 0x08) // Japan
|
|
|
|
return Region::NTSC_J;
|
|
|
|
|
|
|
|
if (country_code < 0x40) // Americas
|
|
|
|
return Region::NTSC_U;
|
|
|
|
|
|
|
|
if (country_code < 0x80) // Europe, Oceania, parts of Africa
|
|
|
|
return Region::PAL;
|
|
|
|
|
|
|
|
if (country_code < 0xa8) // Southeast Asia
|
|
|
|
return country_code == 0x88 ? Region::NTSC_K : Region::NTSC_J;
|
|
|
|
|
|
|
|
if (country_code < 0xc0) // Middle East
|
|
|
|
return Region::NTSC_U;
|
|
|
|
|
|
|
|
return Region::Unknown;
|
|
|
|
}
|
|
|
|
|
2019-03-22 19:47:05 +00:00
|
|
|
Region CountryCodeToRegion(u8 country_code, Platform platform, Region expected_region,
|
|
|
|
std::optional<u16> revision)
|
2016-12-23 17:41:21 +00:00
|
|
|
{
|
|
|
|
switch (country_code)
|
|
|
|
{
|
2019-07-15 10:16:10 +00:00
|
|
|
case '\2':
|
|
|
|
return expected_region; // Wii Menu (same title ID for all regions)
|
|
|
|
|
2016-12-23 17:41:21 +00:00
|
|
|
case 'J':
|
|
|
|
return Region::NTSC_J;
|
|
|
|
|
2018-10-08 11:46:55 +00:00
|
|
|
case 'W':
|
2018-10-08 11:48:36 +00:00
|
|
|
if (expected_region == Region::PAL)
|
|
|
|
return Region::PAL; // Only the Nordic version of Ratatouille (Wii)
|
|
|
|
else
|
|
|
|
return Region::NTSC_J; // Korean GC games in English or Taiwanese Wii games
|
2018-10-08 11:46:55 +00:00
|
|
|
|
2016-12-23 17:41:21 +00:00
|
|
|
case 'E':
|
2019-03-22 19:47:05 +00:00
|
|
|
if (platform != Platform::GameCubeDisc)
|
2018-10-08 11:48:36 +00:00
|
|
|
return Region::NTSC_U; // The most common country code for NTSC-U
|
2018-10-05 18:14:23 +00:00
|
|
|
|
2019-03-22 19:47:05 +00:00
|
|
|
if (revision)
|
|
|
|
{
|
|
|
|
if (*revision >= 0x30)
|
|
|
|
return Region::NTSC_J; // Korean GC games in English
|
|
|
|
else
|
|
|
|
return Region::NTSC_U; // The most common country code for NTSC-U
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
if (expected_region == Region::NTSC_J)
|
|
|
|
return Region::NTSC_J; // Korean GC games in English
|
|
|
|
else
|
|
|
|
return Region::NTSC_U; // The most common country code for NTSC-U
|
|
|
|
}
|
|
|
|
|
2018-10-05 18:14:23 +00:00
|
|
|
case 'B':
|
2016-12-23 17:41:21 +00:00
|
|
|
case 'N':
|
|
|
|
return Region::NTSC_U;
|
|
|
|
|
2018-10-08 11:46:55 +00:00
|
|
|
case 'X':
|
|
|
|
case 'Y':
|
|
|
|
case 'Z':
|
2018-10-08 11:48:36 +00:00
|
|
|
// Additional language versions, store-exclusive versions, other special versions
|
2018-10-08 11:46:55 +00:00
|
|
|
return expected_region == Region::NTSC_U ? Region::NTSC_U : Region::PAL;
|
|
|
|
|
2016-12-23 17:41:21 +00:00
|
|
|
case 'D':
|
|
|
|
case 'F':
|
|
|
|
case 'H':
|
|
|
|
case 'I':
|
|
|
|
case 'L':
|
|
|
|
case 'M':
|
|
|
|
case 'P':
|
|
|
|
case 'R':
|
|
|
|
case 'S':
|
|
|
|
case 'U':
|
2018-10-08 11:36:06 +00:00
|
|
|
case 'V':
|
2016-12-23 17:41:21 +00:00
|
|
|
return Region::PAL;
|
|
|
|
|
|
|
|
case 'K':
|
|
|
|
case 'Q':
|
|
|
|
case 'T':
|
2018-10-08 11:48:36 +00:00
|
|
|
// All of these country codes are Korean, but the NTSC-K region doesn't exist on GC
|
2018-10-05 15:48:59 +00:00
|
|
|
return platform == Platform::GameCubeDisc ? Region::NTSC_J : Region::NTSC_K;
|
2016-12-23 17:41:21 +00:00
|
|
|
|
|
|
|
default:
|
2018-03-31 12:04:13 +00:00
|
|
|
return Region::Unknown;
|
2016-12-23 17:41:21 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2019-03-22 19:47:05 +00:00
|
|
|
Country CountryCodeToCountry(u8 country_code, Platform platform, Region region,
|
|
|
|
std::optional<u16> revision)
|
2009-07-03 22:51:21 +00:00
|
|
|
{
|
2016-06-24 08:43:46 +00:00
|
|
|
switch (country_code)
|
|
|
|
{
|
|
|
|
// Worldwide
|
|
|
|
case 'A':
|
2018-03-31 12:04:13 +00:00
|
|
|
return Country::World;
|
2013-10-29 05:23:17 +00:00
|
|
|
|
2018-10-08 11:46:55 +00:00
|
|
|
// Mixed regions
|
|
|
|
case 'X':
|
|
|
|
case 'Y':
|
|
|
|
case 'Z':
|
2018-10-08 11:48:36 +00:00
|
|
|
// Additional language versions, store-exclusive versions, other special versions
|
2018-10-08 11:46:55 +00:00
|
|
|
return region == Region::NTSC_U ? Country::USA : Country::Europe;
|
|
|
|
|
|
|
|
case 'W':
|
2019-03-22 19:47:05 +00:00
|
|
|
if (platform == Platform::GameCubeDisc)
|
2018-10-08 11:48:36 +00:00
|
|
|
return Country::Korea; // GC games in English released in Korea
|
2019-03-22 19:47:05 +00:00
|
|
|
else if (region == Region::PAL)
|
|
|
|
return Country::Europe; // Only the Nordic version of Ratatouille (Wii)
|
2018-10-08 11:46:55 +00:00
|
|
|
else
|
2018-10-08 11:48:36 +00:00
|
|
|
return Country::Taiwan; // Wii games in traditional Chinese released in Taiwan
|
2018-10-08 11:46:55 +00:00
|
|
|
|
2016-06-24 08:43:46 +00:00
|
|
|
// PAL
|
|
|
|
case 'D':
|
2018-03-31 12:04:13 +00:00
|
|
|
return Country::Germany;
|
2013-01-10 04:53:04 +00:00
|
|
|
|
2018-10-08 11:48:36 +00:00
|
|
|
case 'L': // NTSC-J games released on PAL VC
|
|
|
|
case 'M': // NTSC-U games released on PAL VC
|
2018-10-08 11:48:36 +00:00
|
|
|
case 'V': // Used by some Nordic Wii releases
|
|
|
|
case 'P': // The most common country code for PAL
|
2018-03-31 12:04:13 +00:00
|
|
|
return Country::Europe;
|
2013-10-29 05:23:17 +00:00
|
|
|
|
2016-06-24 08:43:46 +00:00
|
|
|
case 'U':
|
2018-03-31 12:04:13 +00:00
|
|
|
return Country::Australia;
|
2014-10-26 21:47:07 +00:00
|
|
|
|
2016-06-24 08:43:46 +00:00
|
|
|
case 'F':
|
2018-03-31 12:04:13 +00:00
|
|
|
return Country::France;
|
2013-10-29 05:23:17 +00:00
|
|
|
|
2016-06-24 08:43:46 +00:00
|
|
|
case 'I':
|
2018-03-31 12:04:13 +00:00
|
|
|
return Country::Italy;
|
2013-10-29 05:23:17 +00:00
|
|
|
|
2016-06-24 08:43:46 +00:00
|
|
|
case 'H':
|
2018-03-31 12:04:13 +00:00
|
|
|
return Country::Netherlands;
|
2014-10-30 14:35:46 +00:00
|
|
|
|
2016-06-24 08:43:46 +00:00
|
|
|
case 'R':
|
2018-03-31 12:04:13 +00:00
|
|
|
return Country::Russia;
|
2009-07-03 22:51:21 +00:00
|
|
|
|
2016-06-24 08:43:46 +00:00
|
|
|
case 'S':
|
2018-03-31 12:04:13 +00:00
|
|
|
return Country::Spain;
|
2014-10-30 14:35:46 +00:00
|
|
|
|
2016-06-24 08:43:46 +00:00
|
|
|
// NTSC
|
|
|
|
case 'E':
|
2019-03-22 19:47:05 +00:00
|
|
|
if (platform != Platform::GameCubeDisc)
|
2018-10-08 11:48:36 +00:00
|
|
|
return Country::USA; // The most common country code for NTSC-U
|
2018-10-05 18:14:23 +00:00
|
|
|
|
2019-03-22 19:47:05 +00:00
|
|
|
if (revision)
|
|
|
|
{
|
|
|
|
if (*revision >= 0x30)
|
|
|
|
return Country::Korea; // GC games in English released in Korea
|
|
|
|
else
|
|
|
|
return Country::USA; // The most common country code for NTSC-U
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
if (region == Region::NTSC_J)
|
|
|
|
return Country::Korea; // GC games in English released in Korea
|
|
|
|
else
|
|
|
|
return Country::USA; // The most common country code for NTSC-U
|
|
|
|
}
|
|
|
|
|
2018-10-08 11:48:36 +00:00
|
|
|
case 'B': // PAL games released on NTSC-U VC
|
|
|
|
case 'N': // NTSC-J games released on NTSC-U VC
|
2018-03-31 12:04:13 +00:00
|
|
|
return Country::USA;
|
2009-07-03 22:51:21 +00:00
|
|
|
|
2016-06-24 08:43:46 +00:00
|
|
|
case 'J':
|
2018-03-31 12:04:13 +00:00
|
|
|
return Country::Japan;
|
2009-07-03 22:51:21 +00:00
|
|
|
|
2018-10-08 11:48:36 +00:00
|
|
|
case 'K': // Games in Korean released in Korea
|
2018-10-08 11:48:36 +00:00
|
|
|
case 'Q': // NTSC-J games released on NTSC-K VC
|
|
|
|
case 'T': // NTSC-U games released on NTSC-K VC
|
2018-10-19 16:45:59 +00:00
|
|
|
return Country::Korea;
|
2009-07-03 22:51:21 +00:00
|
|
|
|
2016-06-24 08:43:46 +00:00
|
|
|
default:
|
|
|
|
if (country_code > 'A') // Silently ignore IOS wads
|
|
|
|
WARN_LOG(DISCIO, "Unknown Country Code! %c", country_code);
|
2018-03-31 12:04:13 +00:00
|
|
|
return Country::Unknown;
|
2016-06-24 08:43:46 +00:00
|
|
|
}
|
2009-07-03 22:51:21 +00:00
|
|
|
}
|
2010-12-16 07:36:26 +00:00
|
|
|
|
2017-03-17 20:16:59 +00:00
|
|
|
Region GetSysMenuRegion(u16 title_version)
|
2010-12-16 07:36:26 +00:00
|
|
|
{
|
2017-03-16 09:45:57 +00:00
|
|
|
switch (title_version & 0xf)
|
2016-06-24 08:43:46 +00:00
|
|
|
{
|
2017-03-16 09:45:57 +00:00
|
|
|
case 0:
|
2017-03-17 20:16:59 +00:00
|
|
|
return Region::NTSC_J;
|
2017-03-16 09:45:57 +00:00
|
|
|
case 1:
|
2017-03-17 20:16:59 +00:00
|
|
|
return Region::NTSC_U;
|
2017-03-16 09:45:57 +00:00
|
|
|
case 2:
|
2017-03-17 20:16:59 +00:00
|
|
|
return Region::PAL;
|
2017-03-16 09:45:57 +00:00
|
|
|
case 6:
|
2017-03-17 20:16:59 +00:00
|
|
|
return Region::NTSC_K;
|
2016-06-24 08:43:46 +00:00
|
|
|
default:
|
2018-03-31 12:04:13 +00:00
|
|
|
return Region::Unknown;
|
2016-06-24 08:43:46 +00:00
|
|
|
}
|
2010-12-16 07:36:26 +00:00
|
|
|
}
|
|
|
|
|
2017-03-17 20:01:50 +00:00
|
|
|
std::string GetSysMenuVersionString(u16 title_version)
|
|
|
|
{
|
|
|
|
std::string region_letter;
|
|
|
|
|
|
|
|
switch (GetSysMenuRegion(title_version))
|
|
|
|
{
|
2017-03-17 20:16:59 +00:00
|
|
|
case Region::NTSC_J:
|
2017-03-17 20:01:50 +00:00
|
|
|
region_letter = "J";
|
|
|
|
break;
|
2017-03-17 20:16:59 +00:00
|
|
|
case Region::NTSC_U:
|
2017-03-17 20:01:50 +00:00
|
|
|
region_letter = "U";
|
|
|
|
break;
|
2017-03-17 20:16:59 +00:00
|
|
|
case Region::PAL:
|
2017-03-17 20:01:50 +00:00
|
|
|
region_letter = "E";
|
|
|
|
break;
|
2017-03-17 20:16:59 +00:00
|
|
|
case Region::NTSC_K:
|
2017-03-17 20:01:50 +00:00
|
|
|
region_letter = "K";
|
|
|
|
break;
|
2018-03-31 12:04:13 +00:00
|
|
|
case Region::Unknown:
|
2017-03-24 15:44:38 +00:00
|
|
|
WARN_LOG(DISCIO, "Unknown region for Wii Menu version %u", title_version);
|
2017-03-22 06:42:12 +00:00
|
|
|
break;
|
2017-03-17 20:01:50 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
switch (title_version & ~0xf)
|
|
|
|
{
|
2018-10-14 07:47:47 +00:00
|
|
|
case 32:
|
|
|
|
return "1.0" + region_letter;
|
2017-03-17 20:01:50 +00:00
|
|
|
case 96:
|
|
|
|
case 128:
|
|
|
|
return "2.0" + region_letter;
|
|
|
|
case 160:
|
|
|
|
return "2.1" + region_letter;
|
|
|
|
case 192:
|
|
|
|
return "2.2" + region_letter;
|
|
|
|
case 224:
|
|
|
|
return "3.0" + region_letter;
|
|
|
|
case 256:
|
|
|
|
return "3.1" + region_letter;
|
|
|
|
case 288:
|
|
|
|
return "3.2" + region_letter;
|
|
|
|
case 320:
|
|
|
|
case 352:
|
|
|
|
return "3.3" + region_letter;
|
|
|
|
case 384:
|
|
|
|
return (region_letter != "K" ? "3.4" : "3.5") + region_letter;
|
|
|
|
case 416:
|
|
|
|
return "4.0" + region_letter;
|
|
|
|
case 448:
|
|
|
|
return "4.1" + region_letter;
|
|
|
|
case 480:
|
|
|
|
return "4.2" + region_letter;
|
|
|
|
case 512:
|
|
|
|
return "4.3" + region_letter;
|
|
|
|
default:
|
|
|
|
return "?.?" + region_letter;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2017-12-31 19:33:36 +00:00
|
|
|
const std::string& GetCompanyFromID(const std::string& company_id)
|
2015-05-24 15:41:53 +00:00
|
|
|
{
|
2016-06-24 08:43:46 +00:00
|
|
|
static const std::map<std::string, std::string> companies = {
|
|
|
|
{"01", "Nintendo"},
|
2017-10-08 23:17:06 +00:00
|
|
|
{"02", "Nintendo"},
|
2016-06-24 08:43:46 +00:00
|
|
|
{"08", "Capcom"},
|
2017-10-08 23:17:06 +00:00
|
|
|
{"0A", "Jaleco Entertainment"},
|
|
|
|
{"0M", "Entertainment Software Publishing"},
|
2016-06-24 08:43:46 +00:00
|
|
|
{"0Q", "IE Institute"},
|
2017-10-08 23:17:06 +00:00
|
|
|
{"13", "Electronic Arts / EA Sports"},
|
|
|
|
{"18", "Hudson Entertainment"},
|
|
|
|
{"1K", "Titus Software"},
|
|
|
|
{"20", "DSI Games / ZOO Digital Publishing"},
|
|
|
|
{"28", "Kemco"},
|
|
|
|
{"29", "SETA"},
|
|
|
|
{"2K", "NEC Interchannel"},
|
|
|
|
{"2L", "Agatsuma Entertainment"},
|
|
|
|
{"2M", "Jorudan"},
|
|
|
|
{"2N", "Rocket Company"},
|
|
|
|
{"2Q", "MediaKite"},
|
2016-06-24 08:43:46 +00:00
|
|
|
{"36", "Codemasters"},
|
2017-10-08 23:17:06 +00:00
|
|
|
{"41", "Ubisoft"},
|
|
|
|
{"4F", "Eidos Interactive"},
|
|
|
|
{"4Q", "Disney Interactive Studios / Buena Vista Games"},
|
|
|
|
{"4Z", "Crave Entertainment / Red Wagon Games"},
|
|
|
|
{"51", "Acclaim Entertainment"},
|
|
|
|
{"52", "Activision / Activision Value / RedOctane"},
|
|
|
|
{"54", "Rockstar Games / 2K Play / Global Star Software"},
|
|
|
|
{"5D", "Midway Games"},
|
|
|
|
{"5G", "Majesco Entertainment"},
|
|
|
|
{"5H", "3DO / Global Star Software"},
|
2016-06-24 08:43:46 +00:00
|
|
|
{"5L", "NewKidCo"},
|
2017-10-08 23:17:06 +00:00
|
|
|
{"5S", "Evolved Games / Xicat Interactive"},
|
2017-10-05 07:58:38 +00:00
|
|
|
{"5V", "Agetec"},
|
2017-10-08 23:17:06 +00:00
|
|
|
{"5Z", "Conspiracy Entertainment"},
|
|
|
|
{"60", "Titus Software"},
|
|
|
|
{"64", "LucasArts"},
|
|
|
|
{"68", "Bethesda Softworks / Mud Duck Productions / Vir2L Studios"},
|
|
|
|
{"69", "Electronic Arts / EA Sports / MTV Games"},
|
|
|
|
{"6E", "Sega"},
|
2016-06-24 08:43:46 +00:00
|
|
|
{"6K", "UFO Interactive Games"},
|
|
|
|
{"6L", "BAM! Entertainment"},
|
2017-10-08 23:17:06 +00:00
|
|
|
{"6M", "System 3"},
|
|
|
|
{"6N", "Midas Interactive Entertainment"},
|
2016-06-24 08:43:46 +00:00
|
|
|
{"6S", "TDK Mediactive"},
|
2017-10-08 23:17:06 +00:00
|
|
|
{"6U", "The Adventure Company / DreamCatcher Interactive"},
|
|
|
|
{"6V", "JoWooD Entertainment"},
|
2016-06-24 08:43:46 +00:00
|
|
|
{"6W", "Sega"},
|
2017-10-08 23:17:06 +00:00
|
|
|
{"6X", "Wanadoo Edition"},
|
|
|
|
{"6Z", "NDS Software"},
|
|
|
|
{"70", "Atari"},
|
|
|
|
{"71", "Interplay Entertainment"},
|
|
|
|
{"75", "SCi"},
|
|
|
|
{"78", "THQ / Play THQ"},
|
|
|
|
{"7D", "Sierra Entertainment / Vivendi Games / Universal Interactive Studios"},
|
2016-06-24 08:43:46 +00:00
|
|
|
{"7F", "Kemco"},
|
|
|
|
{"7G", "Rage Software"},
|
2017-10-08 23:17:06 +00:00
|
|
|
{"7H", "Encore Software"},
|
|
|
|
{"7J", "Zushi Games / ZOO Digital Publishing"},
|
|
|
|
{"7K", "Kiddinx Entertainment"},
|
2016-06-24 08:43:46 +00:00
|
|
|
{"7L", "Simon & Schuster Interactive"},
|
2017-10-08 23:17:06 +00:00
|
|
|
{"7N", "Empire Interactive / Xplosiv"},
|
2016-06-24 08:43:46 +00:00
|
|
|
{"7S", "Rockstar Games"},
|
|
|
|
{"7T", "Scholastic"},
|
|
|
|
{"7U", "Ignition Entertainment"},
|
2017-10-08 23:17:06 +00:00
|
|
|
{"82", "Namco"},
|
|
|
|
{"8G", "NEC Interchannel"},
|
|
|
|
{"8J", "Kadokawa Shoten"},
|
|
|
|
{"8M", "CyberFront"},
|
2016-06-24 08:43:46 +00:00
|
|
|
{"8N", "Success"},
|
2017-10-08 23:17:06 +00:00
|
|
|
{"8P", "Sega"},
|
2016-06-24 08:43:46 +00:00
|
|
|
{"91", "Chunsoft"},
|
2017-10-08 23:17:06 +00:00
|
|
|
{"99", "Marvelous Entertainment / Victor Entertainment / Pack-In-Video / Rising Star Games"},
|
2016-06-24 08:43:46 +00:00
|
|
|
{"9B", "Tecmo"},
|
2017-10-08 23:17:06 +00:00
|
|
|
{"9G", "Take-Two Interactive / Gotham Games / Gathering of Developers"},
|
2016-06-24 08:43:46 +00:00
|
|
|
{"A4", "Konami"},
|
2017-10-08 23:17:06 +00:00
|
|
|
{"A7", "Takara / Takara Tomy"},
|
|
|
|
{"AF", "Namco Bandai Games"},
|
|
|
|
{"AU", "Alternative Software"},
|
|
|
|
{"B0", "Acclaim Entertainment"},
|
|
|
|
{"B2", "Bandai Games"},
|
|
|
|
{"BB", "Gaijinworks"},
|
|
|
|
{"BL", "MTO"},
|
2016-06-24 08:43:46 +00:00
|
|
|
{"BN", "Sunrise Interactive"},
|
|
|
|
{"BP", "Global A Entertainment"},
|
|
|
|
{"C0", "Taito"},
|
|
|
|
{"C8", "Koei"},
|
2017-10-08 23:17:06 +00:00
|
|
|
{"CM", "Konami"},
|
2016-06-24 08:43:46 +00:00
|
|
|
{"CQ", "From Software"},
|
|
|
|
{"D9", "Banpresto"},
|
2017-10-08 23:17:06 +00:00
|
|
|
{"DA", "Takara Tomy"},
|
|
|
|
{"DQ", "Compile Heart / Idea Factory"},
|
2016-06-24 08:43:46 +00:00
|
|
|
{"E5", "Epoch"},
|
|
|
|
{"E7", "Athena"},
|
2017-10-08 23:17:06 +00:00
|
|
|
{"E8", "Asmik Ace Entertainment"},
|
2016-06-24 08:43:46 +00:00
|
|
|
{"E9", "Natsume"},
|
|
|
|
{"EB", "Atlus"},
|
|
|
|
{"EL", "Spike"},
|
2017-10-08 23:17:06 +00:00
|
|
|
{"EM", "Konami"},
|
|
|
|
{"EP", "Sting Entertainment"},
|
|
|
|
{"ES", "Starfish SD"},
|
|
|
|
{"EY", "Vblank Entertainment"},
|
|
|
|
{"FH", "Easy Interactive"},
|
|
|
|
{"FJ", "Virtual Toys"},
|
2016-06-24 08:43:46 +00:00
|
|
|
{"FK", "The Game Factory"},
|
|
|
|
{"FP", "Mastiff"},
|
|
|
|
{"FR", "Digital Tainment Pool"},
|
2017-10-08 23:17:06 +00:00
|
|
|
{"FS", "XS Games"},
|
2016-06-24 08:43:46 +00:00
|
|
|
{"G0", "Alpha Unit"},
|
2017-10-08 23:17:06 +00:00
|
|
|
{"G2", "Yuke's"},
|
2016-06-24 08:43:46 +00:00
|
|
|
{"G9", "D3 Publisher"},
|
2017-10-08 23:17:06 +00:00
|
|
|
{"GA", "PIN Change"},
|
|
|
|
{"GD", "Square Enix"},
|
|
|
|
{"GE", "Kids Station"},
|
|
|
|
{"GG", "O3 Entertainment"},
|
|
|
|
{"GJ", "Detn8"},
|
2016-06-24 08:43:46 +00:00
|
|
|
{"GL", "Gameloft / Ubisoft"},
|
|
|
|
{"GM", "Gamecock Media Group"},
|
|
|
|
{"GN", "Oxygen Games"},
|
2017-10-08 23:17:06 +00:00
|
|
|
{"GR", "GSP"},
|
2016-06-24 08:43:46 +00:00
|
|
|
{"GT", "505 Games"},
|
2017-10-05 07:58:38 +00:00
|
|
|
{"GX", "Commodore"},
|
2016-06-24 08:43:46 +00:00
|
|
|
{"GY", "The Game Factory"},
|
2017-10-08 23:17:06 +00:00
|
|
|
{"GZ", "Gammick Entertainment"},
|
|
|
|
{"H3", "Zen United"},
|
2016-06-24 08:43:46 +00:00
|
|
|
{"H4", "SNK Playmore"},
|
2017-10-08 23:17:06 +00:00
|
|
|
{"HA", "Nobilis"},
|
2016-06-24 08:43:46 +00:00
|
|
|
{"HF", "Level-5"},
|
2017-10-08 23:17:06 +00:00
|
|
|
{"HG", "Graffiti Entertainment"},
|
2017-10-05 07:58:38 +00:00
|
|
|
{"HH", "Focus Home Interactive"},
|
2016-06-24 08:43:46 +00:00
|
|
|
{"HJ", "Genius Products"},
|
2017-10-08 23:17:06 +00:00
|
|
|
{"HL", "Frontier Developments"},
|
|
|
|
{"HM", "HMH Interactive"},
|
|
|
|
{"HN", "High Voltage Software"},
|
|
|
|
{"HQ", "Abstraction Games"},
|
|
|
|
{"HS", "Tru Blu"},
|
|
|
|
{"HU", "Ghostfire Games"},
|
|
|
|
{"HW", "Incredible Technologies"},
|
2016-06-24 08:43:46 +00:00
|
|
|
{"HY", "Reef Entertainment"},
|
|
|
|
{"HZ", "Nordcurrent"},
|
2017-10-08 23:17:06 +00:00
|
|
|
{"J8", "D4 Enterprise"},
|
2016-06-24 08:43:46 +00:00
|
|
|
{"J9", "AQ Interactive"},
|
2017-10-08 23:17:06 +00:00
|
|
|
{"JD", "SKONEC Entertainment"},
|
|
|
|
{"JE", "E Frontier"},
|
2016-06-24 08:43:46 +00:00
|
|
|
{"JF", "Arc System Works"},
|
2017-10-08 23:17:06 +00:00
|
|
|
{"JG", "The Games Company"},
|
2017-10-05 07:58:38 +00:00
|
|
|
{"JH", "City Interactive"},
|
2016-06-24 08:43:46 +00:00
|
|
|
{"JJ", "Deep Silver"},
|
2017-10-08 23:17:06 +00:00
|
|
|
{"JR", "Engine Software"},
|
|
|
|
{"JS", "Digital Leisure"},
|
|
|
|
{"JT", "Empty Clip Studios"},
|
|
|
|
{"JW", "BigBen Interactive"},
|
|
|
|
{"JX", "Shin'en Multimedia"},
|
|
|
|
{"JZ", "505 Games"},
|
|
|
|
{"K3", "Yudo"},
|
2016-06-24 08:43:46 +00:00
|
|
|
{"K6", "Nihon System"},
|
2017-10-08 23:17:06 +00:00
|
|
|
{"KB", "Nippon Ichi Software America"},
|
|
|
|
{"KG", "Kando Games"},
|
|
|
|
{"KJ", "Studio Zan"},
|
|
|
|
{"KL", "Abylight"},
|
2016-06-24 08:43:46 +00:00
|
|
|
{"KM", "Deep Silver"},
|
|
|
|
{"KP", "Purple Hills"},
|
2017-10-08 23:17:06 +00:00
|
|
|
{"KQ", "Over the Top Games"},
|
|
|
|
{"KR", "KREA Medie"},
|
|
|
|
{"KW", "Semnat Studios"},
|
|
|
|
{"L3", "G-Mode"},
|
|
|
|
{"LG", "Black Bean Games"},
|
|
|
|
{"LJ", "Legendo Entertainment"},
|
|
|
|
{"LL", "HB Studios"},
|
|
|
|
{"LP", "Left Field Productions"},
|
|
|
|
{"LR", "Koch Media"},
|
2016-06-24 08:43:46 +00:00
|
|
|
{"LT", "Legacy Interactive"},
|
2017-10-08 23:17:06 +00:00
|
|
|
{"LY", "Icon Games"},
|
|
|
|
{"MD", "Ateam"},
|
|
|
|
{"MH", "Mentor Interactive"},
|
2016-06-24 08:43:46 +00:00
|
|
|
{"MJ", "Mumbo Jumbo"},
|
2017-10-08 23:17:06 +00:00
|
|
|
{"ML", "DTP Young Entertainment"},
|
|
|
|
{"MM", "Big John Games"},
|
2016-06-24 08:43:46 +00:00
|
|
|
{"MR", "Mindscape"},
|
2017-10-08 23:17:06 +00:00
|
|
|
{"MS", "Milestone / UFO Interactive Games"},
|
|
|
|
{"MT", "Blast! Entertainment"},
|
|
|
|
{"MV", "Marvelous Entertainment"},
|
|
|
|
{"MZ", "Mad Catz"},
|
|
|
|
{"N9", "Tera Box"},
|
2016-06-24 08:43:46 +00:00
|
|
|
{"NG", "Nordic Games"},
|
2017-10-08 23:17:06 +00:00
|
|
|
{"NH", "Gevo Entertainment"},
|
|
|
|
{"NJ", "Enjoy Gaming"},
|
|
|
|
{"NK", "Neko Entertainment"},
|
|
|
|
{"NL", "Nordic Softsales"},
|
2016-06-24 08:43:46 +00:00
|
|
|
{"NP", "Nobilis"},
|
2017-10-08 23:17:06 +00:00
|
|
|
{"NQ", "Namco Bandai Partners"},
|
|
|
|
{"NR", "Bold Games / Destineer Games"},
|
|
|
|
{"NS", "Nippon Ichi Software"},
|
|
|
|
{"NV", "Nicalis"},
|
|
|
|
{"NW", "Deep Fried Entertainment"},
|
|
|
|
{"NX", "Barnstorm Games"},
|
|
|
|
{"NY", "Nicalis"},
|
|
|
|
{"PH", "Playful Entertainment"},
|
|
|
|
{"PK", "Knowledge Adventure"},
|
|
|
|
{"PL", "Playlogic Entertainment"},
|
|
|
|
{"PM", "Warner Bros. Interactive Entertainment"},
|
|
|
|
{"PN", "P2 Games"},
|
|
|
|
{"PQ", "PopCap Games"},
|
|
|
|
{"PZ", "GameMill Publishing"},
|
|
|
|
{"Q4", "Hamster"},
|
|
|
|
{"QC", "Kadokawa Shoten / Enterbrain"},
|
|
|
|
{"QH", "Virtual Play Games"},
|
|
|
|
{"QK", "MACHINE Studios"},
|
|
|
|
{"QM", "Object Vision Software"},
|
|
|
|
{"QT", "CALARIS"},
|
|
|
|
{"QU", "QubicGames"},
|
|
|
|
{"QX", "Press Play"},
|
|
|
|
{"RA", "Office Create"},
|
|
|
|
{"RG", "Ronimo Games"},
|
2016-06-24 08:43:46 +00:00
|
|
|
{"RM", "Rondomedia"},
|
2017-10-08 23:17:06 +00:00
|
|
|
{"RN", "Mastiff / N3V Games"},
|
|
|
|
{"RS", "Brash Entertainment"},
|
|
|
|
{"RT", "RTL Enterprises"},
|
|
|
|
{"RV", "bitComposer Games"},
|
|
|
|
{"RW", "RealArcade"},
|
|
|
|
{"RZ", "Akaoni Studio"},
|
|
|
|
{"S5", "SouthPeak Games"},
|
|
|
|
{"SJ", "Cosmonaut Games"},
|
2016-06-24 08:43:46 +00:00
|
|
|
{"SP", "Blade Interactive Studios"},
|
2017-10-08 23:17:06 +00:00
|
|
|
{"SQ", "Sonalysts"},
|
|
|
|
{"SU", "Slitherine"},
|
|
|
|
{"SV", "7G//AMES"},
|
|
|
|
{"SZ", "Storm City Games"},
|
|
|
|
{"TJ", "Broken Rules"},
|
2017-10-01 18:53:01 +00:00
|
|
|
{"TL", "Telltale Games"},
|
|
|
|
{"TR", "Tetris Online"},
|
2016-06-24 08:43:46 +00:00
|
|
|
{"TV", "Tivola"},
|
2017-10-08 23:17:06 +00:00
|
|
|
{"TW", "Two Tribes"},
|
|
|
|
{"TY", "Teyon"},
|
|
|
|
{"UG", "Data Design Interactive / Popcorn Arcade / Metro 3D"},
|
|
|
|
{"UH", "Intenium Console"},
|
|
|
|
{"UJ", "Ghostlight"},
|
|
|
|
{"UN", "Chillingo"},
|
|
|
|
{"UP", "EnjoyUp Games"},
|
|
|
|
{"UR", "Sudden Games"},
|
|
|
|
{"UU", "Onteca"},
|
|
|
|
{"UW", "Coresoft"},
|
|
|
|
{"VL", "Eko Software"},
|
2016-06-24 08:43:46 +00:00
|
|
|
{"VN", "Valcon Games"},
|
|
|
|
{"VP", "Virgin Play"},
|
2017-10-08 23:17:06 +00:00
|
|
|
{"VS", "Korner Entertainment"},
|
|
|
|
{"VT", "Microforum Games"},
|
|
|
|
{"VV", "Pixonauts"},
|
2016-06-24 08:43:46 +00:00
|
|
|
{"VZ", "Little Orbit"},
|
2017-10-08 23:17:06 +00:00
|
|
|
{"WG", "2D Boy"},
|
|
|
|
{"WH", "NinjaBee"},
|
|
|
|
{"WJ", "Studio Walljump"},
|
|
|
|
{"WN", "tons of bits"},
|
|
|
|
{"WR", "Warner Bros. Interactive Entertainment"},
|
|
|
|
{"WS", "MonkeyPaw Games"},
|
|
|
|
{"WW", "Slang Publishing"},
|
|
|
|
{"WY", "WayForward Technologies"},
|
|
|
|
{"WZ", "Wizarbox"},
|
|
|
|
{"X3", "CK Games"},
|
|
|
|
{"X4", "Easy Interactive"},
|
|
|
|
{"XG", "XGen Studios"},
|
|
|
|
{"XJ", "XSEED Games"},
|
|
|
|
{"XK", "Exkee"},
|
|
|
|
{"XM", "DreamBox Games"},
|
2016-06-24 08:43:46 +00:00
|
|
|
{"XS", "Aksys Games"},
|
2017-10-08 23:17:06 +00:00
|
|
|
{"XT", "Funbox Media"},
|
|
|
|
{"XV", "Keystone Game Studio"},
|
|
|
|
{"XW", "Lemon Games"},
|
|
|
|
{"Y1", "Tubby Games"},
|
|
|
|
{"Y5", "Easy Interactive"},
|
|
|
|
{"Y6", "Motiviti"},
|
|
|
|
{"YC", "NECA"},
|
|
|
|
{"YD", "Infinite Dreams"},
|
|
|
|
{"YF", "Oxygene"},
|
|
|
|
{"YG", "Maximum Family Games"},
|
2016-06-24 08:43:46 +00:00
|
|
|
{"YT", "Valcon Games"},
|
2017-10-08 23:17:06 +00:00
|
|
|
{"YY", "FDG Entertainment"},
|
2016-06-24 08:43:46 +00:00
|
|
|
{"Z4", "Ntreev Soft"},
|
|
|
|
{"ZA", "WBA Interactive"},
|
2017-10-08 23:17:06 +00:00
|
|
|
{"ZG", "Zallag"},
|
2016-06-24 08:43:46 +00:00
|
|
|
{"ZH", "Internal Engine"},
|
2017-10-08 23:17:06 +00:00
|
|
|
{"ZJ", "Performance Designed Products"},
|
|
|
|
{"ZK", "Anima Game Studio"},
|
|
|
|
{"ZS", "Zinkia Entertainment"},
|
2016-06-24 08:43:46 +00:00
|
|
|
{"ZW", "Judo Baby"},
|
2017-10-08 23:17:06 +00:00
|
|
|
{"ZX", "TopWare Interactive"}};
|
2015-05-24 15:41:53 +00:00
|
|
|
|
2017-12-31 19:33:36 +00:00
|
|
|
static const std::string EMPTY_STRING;
|
2016-06-24 08:43:46 +00:00
|
|
|
auto iterator = companies.find(company_id);
|
|
|
|
if (iterator != companies.end())
|
|
|
|
return iterator->second;
|
|
|
|
else
|
2017-12-31 19:33:36 +00:00
|
|
|
return EMPTY_STRING;
|
2015-05-24 15:41:53 +00:00
|
|
|
}
|
2019-05-05 23:48:12 +00:00
|
|
|
} // namespace DiscIO
|