Enums.cpp 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886
  1. // Copyright 2016 Dolphin Emulator Project
  2. // SPDX-License-Identifier: GPL-2.0-or-later
  3. #include "DiscIO/Enums.h"
  4. #include <map>
  5. #include <string>
  6. #include "Common/Assert.h"
  7. #include "Common/Common.h"
  8. #include "Common/CommonTypes.h"
  9. #include "Common/Logging/Log.h"
  10. #include "Common/MsgHandler.h"
  11. namespace DiscIO
  12. {
  13. std::string GetName(Country country, bool translate)
  14. {
  15. std::string name;
  16. switch (country)
  17. {
  18. case Country::Europe:
  19. name = _trans("Europe");
  20. break;
  21. case Country::Japan:
  22. name = _trans("Japan");
  23. break;
  24. case Country::USA:
  25. name = _trans("USA");
  26. break;
  27. case Country::Australia:
  28. name = _trans("Australia");
  29. break;
  30. case Country::France:
  31. name = _trans("France");
  32. break;
  33. case Country::Germany:
  34. name = _trans("Germany");
  35. break;
  36. case Country::Italy:
  37. name = _trans("Italy");
  38. break;
  39. case Country::Korea:
  40. name = _trans("Korea");
  41. break;
  42. case Country::Netherlands:
  43. name = _trans("Netherlands");
  44. break;
  45. case Country::Russia:
  46. name = _trans("Russia");
  47. break;
  48. case Country::Spain:
  49. name = _trans("Spain");
  50. break;
  51. case Country::Taiwan:
  52. name = _trans("Taiwan");
  53. break;
  54. case Country::World:
  55. name = _trans("World");
  56. break;
  57. default:
  58. name = _trans("Unknown");
  59. break;
  60. }
  61. return translate ? Common::GetStringT(name.c_str()) : name;
  62. }
  63. std::string GetName(Language language, bool translate)
  64. {
  65. std::string name;
  66. switch (language)
  67. {
  68. case Language::Japanese:
  69. name = _trans("Japanese");
  70. break;
  71. case Language::English:
  72. name = _trans("English");
  73. break;
  74. case Language::German:
  75. name = _trans("German");
  76. break;
  77. case Language::French:
  78. name = _trans("French");
  79. break;
  80. case Language::Spanish:
  81. name = _trans("Spanish");
  82. break;
  83. case Language::Italian:
  84. name = _trans("Italian");
  85. break;
  86. case Language::Dutch:
  87. name = _trans("Dutch");
  88. break;
  89. case Language::SimplifiedChinese:
  90. name = _trans("Simplified Chinese");
  91. break;
  92. case Language::TraditionalChinese:
  93. name = _trans("Traditional Chinese");
  94. break;
  95. case Language::Korean:
  96. name = _trans("Korean");
  97. break;
  98. default:
  99. name = _trans("Unknown");
  100. break;
  101. }
  102. return translate ? Common::GetStringT(name.c_str()) : name;
  103. }
  104. std::string GetName(Region region, bool translate)
  105. {
  106. std::string name;
  107. switch (region)
  108. {
  109. case Region::NTSC_J:
  110. name = _trans("NTSC-J");
  111. break;
  112. case Region::NTSC_U:
  113. name = _trans("NTSC-U");
  114. break;
  115. case Region::PAL:
  116. name = _trans("PAL");
  117. break;
  118. case Region::NTSC_K:
  119. name = _trans("NTSC-K");
  120. break;
  121. default:
  122. name = _trans("Unknown");
  123. break;
  124. }
  125. return translate ? Common::GetStringT(name.c_str()) : name;
  126. }
  127. bool IsDisc(Platform volume_type)
  128. {
  129. return volume_type == Platform::GameCubeDisc || volume_type == Platform::Triforce ||
  130. volume_type == Platform::WiiDisc;
  131. }
  132. bool IsWii(Platform volume_type)
  133. {
  134. return volume_type == Platform::WiiDisc || volume_type == Platform::WiiWAD;
  135. }
  136. bool IsNTSC(Region region)
  137. {
  138. return region == Region::NTSC_J || region == Region::NTSC_U || region == Region::NTSC_K;
  139. }
  140. int ToGameCubeLanguage(Language language)
  141. {
  142. if (language < Language::English || language > Language::Dutch)
  143. return 0;
  144. else
  145. return static_cast<int>(language) - 1;
  146. }
  147. Language FromGameCubeLanguage(int language)
  148. {
  149. if (language < 0 || language > 5)
  150. return Language::Unknown;
  151. else
  152. return static_cast<Language>(language + 1);
  153. }
  154. // Increment CACHE_REVISION (GameFileCache.cpp) if the code below is modified
  155. Country TypicalCountryForRegion(Region region)
  156. {
  157. switch (region)
  158. {
  159. case Region::NTSC_J:
  160. return Country::Japan;
  161. case Region::NTSC_U:
  162. return Country::USA;
  163. case Region::PAL:
  164. return Country::Europe;
  165. case Region::NTSC_K:
  166. return Country::Korea;
  167. default:
  168. return Country::Unknown;
  169. }
  170. }
  171. Region SysConfCountryToRegion(u8 country_code)
  172. {
  173. if (country_code == 0)
  174. return Region::Unknown;
  175. if (country_code < 0x08) // Japan
  176. return Region::NTSC_J;
  177. if (country_code < 0x40) // Americas
  178. return Region::NTSC_U;
  179. if (country_code < 0x80) // Europe, Oceania, parts of Africa
  180. return Region::PAL;
  181. if (country_code < 0xa8) // Southeast Asia
  182. return country_code == 0x88 ? Region::NTSC_K : Region::NTSC_J;
  183. if (country_code < 0xc0) // Middle East
  184. return Region::NTSC_U;
  185. return Region::Unknown;
  186. }
  187. Region CountryCodeToRegion(u8 country_code, Platform platform, Region expected_region,
  188. std::optional<u16> revision)
  189. {
  190. switch (country_code)
  191. {
  192. case '\2':
  193. return expected_region; // Wii Menu (same title ID for all regions)
  194. case 'J':
  195. return Region::NTSC_J;
  196. case 'W':
  197. if (expected_region == Region::PAL)
  198. return Region::PAL; // Only the Nordic version of Ratatouille (Wii)
  199. else
  200. return Region::NTSC_J; // Korean GC games in English or Taiwanese Wii games
  201. case 'E':
  202. if (platform != Platform::GameCubeDisc)
  203. return Region::NTSC_U; // The most common country code for NTSC-U
  204. if (revision)
  205. {
  206. if (*revision >= 0x30)
  207. return Region::NTSC_J; // Korean GC games in English
  208. else
  209. return Region::NTSC_U; // The most common country code for NTSC-U
  210. }
  211. else
  212. {
  213. if (expected_region == Region::NTSC_J)
  214. return Region::NTSC_J; // Korean GC games in English
  215. else
  216. return Region::NTSC_U; // The most common country code for NTSC-U
  217. }
  218. case 'B':
  219. case 'N':
  220. return Region::NTSC_U;
  221. case 'X':
  222. case 'Y':
  223. case 'Z':
  224. // Additional language versions, store-exclusive versions, other special versions
  225. return expected_region == Region::NTSC_U ? Region::NTSC_U : Region::PAL;
  226. case 'D':
  227. case 'F':
  228. case 'H':
  229. case 'I':
  230. case 'L':
  231. case 'M':
  232. case 'P':
  233. case 'R':
  234. case 'S':
  235. case 'U':
  236. case 'V':
  237. return Region::PAL;
  238. case 'K':
  239. case 'Q':
  240. case 'T':
  241. // All of these country codes are Korean, but the NTSC-K region doesn't exist on GC
  242. return platform == Platform::GameCubeDisc ? Region::NTSC_J : Region::NTSC_K;
  243. default:
  244. return Region::Unknown;
  245. }
  246. }
  247. Country CountryCodeToCountry(u8 country_code, Platform platform, Region region,
  248. std::optional<u16> revision)
  249. {
  250. switch (country_code)
  251. {
  252. // Worldwide
  253. case 'A':
  254. return Country::World;
  255. // Mixed regions
  256. case 'X':
  257. case 'Y':
  258. case 'Z':
  259. // Additional language versions, store-exclusive versions, other special versions
  260. return region == Region::NTSC_U ? Country::USA : Country::Europe;
  261. case 'W':
  262. if (platform == Platform::GameCubeDisc)
  263. return Country::Korea; // GC games in English released in Korea
  264. else if (region == Region::PAL)
  265. return Country::Europe; // Only the Nordic version of Ratatouille (Wii)
  266. else
  267. return Country::Taiwan; // Wii games in traditional Chinese released in Taiwan
  268. // PAL
  269. case 'D':
  270. return Country::Germany;
  271. case 'L': // NTSC-J games released on PAL VC
  272. case 'M': // NTSC-U games released on PAL VC
  273. case 'V': // Used by some Nordic Wii releases
  274. case 'P': // The most common country code for PAL
  275. return Country::Europe;
  276. case 'U':
  277. return Country::Australia;
  278. case 'F':
  279. return Country::France;
  280. case 'I':
  281. return Country::Italy;
  282. case 'H':
  283. return Country::Netherlands;
  284. case 'R':
  285. return Country::Russia;
  286. case 'S':
  287. return Country::Spain;
  288. // NTSC
  289. case 'E':
  290. if (platform != Platform::GameCubeDisc)
  291. return Country::USA; // The most common country code for NTSC-U
  292. if (revision)
  293. {
  294. if (*revision >= 0x30)
  295. return Country::Korea; // GC games in English released in Korea
  296. else
  297. return Country::USA; // The most common country code for NTSC-U
  298. }
  299. else
  300. {
  301. if (region == Region::NTSC_J)
  302. return Country::Korea; // GC games in English released in Korea
  303. else
  304. return Country::USA; // The most common country code for NTSC-U
  305. }
  306. case 'B': // PAL games released on NTSC-U VC
  307. case 'N': // NTSC-J games released on NTSC-U VC
  308. return Country::USA;
  309. case 'J':
  310. return Country::Japan;
  311. case 'K': // Games in Korean released in Korea
  312. case 'Q': // NTSC-J games released on NTSC-K VC
  313. case 'T': // NTSC-U games released on NTSC-K VC
  314. return Country::Korea;
  315. default:
  316. if (country_code > 'A') // Silently ignore IOS wads
  317. WARN_LOG_FMT(DISCIO, "Unknown Country Code! {}", static_cast<char>(country_code));
  318. return Country::Unknown;
  319. }
  320. }
  321. Region GetSysMenuRegion(u16 title_version)
  322. {
  323. switch (title_version & 0xf)
  324. {
  325. case 0:
  326. return Region::NTSC_J;
  327. case 1:
  328. return Region::NTSC_U;
  329. case 2:
  330. return Region::PAL;
  331. case 6:
  332. return Region::NTSC_K;
  333. default:
  334. return Region::Unknown;
  335. }
  336. }
  337. std::string GetSysMenuVersionString(u16 title_version, bool is_vwii)
  338. {
  339. std::string version;
  340. char region_letter = '\0';
  341. switch (GetSysMenuRegion(title_version))
  342. {
  343. case Region::NTSC_J:
  344. region_letter = 'J';
  345. break;
  346. case Region::NTSC_U:
  347. region_letter = 'U';
  348. break;
  349. case Region::PAL:
  350. region_letter = 'E';
  351. break;
  352. case Region::NTSC_K:
  353. region_letter = 'K';
  354. break;
  355. case Region::Unknown:
  356. WARN_LOG_FMT(DISCIO, "Unknown region for Wii Menu version {}", title_version);
  357. break;
  358. }
  359. if (is_vwii)
  360. {
  361. // For vWii return the Wii U version which installed the menu
  362. switch (title_version & 0xff0)
  363. {
  364. case 512:
  365. version = "1.0.0";
  366. break;
  367. case 544:
  368. version = "4.0.0";
  369. break;
  370. case 608:
  371. version = "5.2.0";
  372. break;
  373. default:
  374. version = "?.?.?";
  375. break;
  376. }
  377. }
  378. else
  379. {
  380. switch (title_version & 0xff0)
  381. {
  382. case 32:
  383. version = "1.0";
  384. break;
  385. case 96:
  386. case 128:
  387. version = "2.0";
  388. break;
  389. case 160:
  390. version = "2.1";
  391. break;
  392. case 192:
  393. version = "2.2";
  394. break;
  395. case 224:
  396. version = "3.0";
  397. break;
  398. case 256:
  399. version = "3.1";
  400. break;
  401. case 288:
  402. version = "3.2";
  403. break;
  404. case 320:
  405. case 352:
  406. version = "3.3";
  407. break;
  408. case 384:
  409. version = (region_letter != 'K' ? "3.4" : "3.5");
  410. break;
  411. case 416:
  412. version = "4.0";
  413. break;
  414. case 448:
  415. version = "4.1";
  416. break;
  417. case 480:
  418. version = "4.2";
  419. break;
  420. case 512:
  421. version = "4.3";
  422. break;
  423. default:
  424. version = "?.?";
  425. break;
  426. }
  427. }
  428. if (region_letter != '\0')
  429. version += region_letter;
  430. return version;
  431. }
  432. const std::string& GetCompanyFromID(const std::string& company_id)
  433. {
  434. static const std::map<std::string, std::string> companies = {
  435. {"01", "Nintendo"},
  436. {"02", "Nintendo"},
  437. {"08", "Capcom"},
  438. {"0A", "Jaleco / Jaleco Entertainment"},
  439. {"0L", "Warashi"},
  440. {"0M", "Entertainment Software Publishing"},
  441. {"0Q", "IE Institute"},
  442. {"13", "Electronic Arts Japan"},
  443. {"18", "Hudson Soft / Hudson Entertainment"},
  444. {"1K", "Titus Software"},
  445. {"20", "DSI Games / ZOO Digital Publishing"},
  446. {"28", "Kemco Japan"},
  447. {"29", "SETA Corporation"},
  448. {"2K", "NEC Interchannel"},
  449. {"2L", "Agatsuma Entertainment"},
  450. {"2M", "Jorudan"},
  451. {"2N", "Smilesoft / Rocket Company"},
  452. {"2Q", "MediaKite"},
  453. {"36", "Codemasters"},
  454. {"41", "Ubisoft"},
  455. {"4F", "Eidos Interactive"},
  456. {"4Q", "Disney Interactive Studios / Buena Vista Games"},
  457. {"4Z", "Crave Entertainment / Red Wagon Games"},
  458. {"51", "Acclaim Entertainment"},
  459. {"52", "Activision"},
  460. {"54", "Take-Two Interactive / GameTek / Rockstar Games / Global Star Software"},
  461. {"5D", "Midway Games / Tradewest"},
  462. {"5G", "Majesco Entertainment"},
  463. {"5H", "3DO / Global Star Software"},
  464. {"5L", "NewKidCo"},
  465. {"5S", "Evolved Games / Xicat Interactive"},
  466. {"5V", "Agetec"},
  467. {"5Z", "Data Design / Conspiracy Entertainment"},
  468. {"60", "Titus Interactive / Titus Software"},
  469. {"64", "LucasArts"},
  470. {"68", "Bethesda Softworks / Mud Duck Productions / Vir2L Studios"},
  471. {"69", "Electronic Arts"},
  472. {"6E", "Sega"},
  473. {"6K", "UFO Interactive Games"},
  474. {"6L", "BAM! Entertainment"},
  475. {"6M", "System 3"},
  476. {"6N", "Midas Interactive Entertainment"},
  477. {"6S", "TDK Mediactive"},
  478. {"6U", "The Adventure Company / DreamCatcher Interactive"},
  479. {"6V", "JoWooD Entertainment"},
  480. {"6W", "Sega"},
  481. {"6X", "Wanadoo Edition"},
  482. {"6Z", "NDS Software"},
  483. {"70", "Atari (Infogrames)"},
  484. {"71", "Interplay Entertainment"},
  485. {"75", "SCi Games"},
  486. {"78", "THQ / Play THQ"},
  487. {"7D", "Sierra Entertainment / Vivendi Games / Universal Interactive Studios"},
  488. {"7F", "Kemco"},
  489. {"7G", "Rage Software"},
  490. {"7H", "Encore Software"},
  491. {"7J", "Zushi Games / ZOO Digital Publishing"},
  492. {"7K", "Kiddinx Entertainment"},
  493. {"7L", "Simon & Schuster Interactive"},
  494. {"7M", "Badland Games"},
  495. {"7N", "Empire Interactive / Xplosiv"},
  496. {"7S", "Rockstar Games"},
  497. {"7T", "Scholastic"},
  498. {"7U", "Ignition Entertainment"},
  499. {"82", "Namco"},
  500. {"8G", "NEC Interchannel"},
  501. {"8J", "Kadokawa Shoten"},
  502. {"8M", "CyberFront"},
  503. {"8N", "Success"},
  504. {"8P", "Sega"},
  505. {"91", "Chunsoft"},
  506. {"99", "Marvelous Entertainment / Victor Entertainment / Pack-In-Video / Rising Star Games"},
  507. {"9B", "Tecmo"},
  508. {"9G",
  509. "Take-Two Interactive / Global Star Software / Gotham Games / Gathering of Developers"},
  510. {"9S", "Brother International"},
  511. {"9Z", "Crunchyroll"},
  512. {"A4", "Konami"},
  513. {"A7", "Takara"},
  514. {"AF", "Namco Bandai Games"},
  515. {"AU", "Alternative Software"},
  516. {"AX", "Vivendi"},
  517. {"B0", "Acclaim Japan"},
  518. {"B2", "Bandai Games"},
  519. {"BB", "Sunsoft"},
  520. {"BL", "MTO"},
  521. {"BM", "XING"},
  522. {"BN", "Sunrise Interactive"},
  523. {"BP", "Global A Entertainment"},
  524. {"C0", "Taito"},
  525. {"C8", "Koei"},
  526. {"CM", "Konami Computer Entertainment Osaka"},
  527. {"CQ", "From Software"},
  528. {"D9", "Banpresto"},
  529. {"DA", "Tomy / Takara Tomy"},
  530. {"DQ", "Compile Heart / Idea Factory"},
  531. {"E5", "Epoch"},
  532. {"E6", "Game Arts"},
  533. {"E7", "Athena"},
  534. {"E8", "Asmik Ace Entertainment"},
  535. {"E9", "Natsume"},
  536. {"EB", "Atlus"},
  537. {"EL", "Spike"},
  538. {"EM", "Konami Computer Entertainment Tokyo"},
  539. {"EP", "Sting Entertainment"},
  540. {"ES", "Starfish-SD"},
  541. {"EY", "Vblank Entertainment"},
  542. {"FH", "Easy Interactive"},
  543. {"FJ", "Virtual Toys"},
  544. {"FK", "The Game Factory"},
  545. {"FP", "Mastiff"},
  546. {"FR", "Digital Tainment Pool"},
  547. {"FS", "XS Games"},
  548. {"G0", "Alpha Unit"},
  549. {"G2", "Yuke's"},
  550. {"G6", "SIMS"},
  551. {"G9", "D3 Publisher"},
  552. {"GA", "PIN Change"},
  553. {"GD", "Square Enix"},
  554. {"GE", "Kids Station"},
  555. {"GG", "O3 Entertainment"},
  556. {"GJ", "Detn8 Games"},
  557. {"GK", "Genki"},
  558. {"GL", "Gameloft / Ubisoft"},
  559. {"GM", "Gamecock Media Group"},
  560. {"GN", "Oxygen Games"},
  561. {"GR", "GSP"},
  562. {"GT", "505 Games"},
  563. {"GX", "Commodore"},
  564. {"GY", "The Game Factory"},
  565. {"GZ", "Gammick Entertainment"},
  566. {"H3", "Zen United"},
  567. {"H4", "SNK Playmore"},
  568. {"HA", "Nobilis"},
  569. {"HE", "Gust"},
  570. {"HF", "Level-5"},
  571. {"HG", "Graffiti Entertainment"},
  572. {"HH", "Focus Home Interactive"},
  573. {"HJ", "Genius Products"},
  574. {"HK", "D2C Games"},
  575. {"HL", "Frontier Developments"},
  576. {"HM", "HMH Interactive"},
  577. {"HN", "High Voltage Software"},
  578. {"HQ", "Abstraction Games"},
  579. {"HS", "Tru Blu"},
  580. {"HT", "Big Blue Bubble"},
  581. {"HU", "Ghostfire Games"},
  582. {"HW", "Incredible Technologies"},
  583. {"HY", "Reef Entertainment"},
  584. {"HZ", "Nordcurrent"},
  585. {"J8", "D4 Enterprise"},
  586. {"J9", "AQ Interactive"},
  587. {"JD", "SKONEC Entertainment"},
  588. {"JE", "E Frontier"},
  589. {"JF", "Arc System Works"},
  590. {"JG", "The Games Company"},
  591. {"JH", "City Interactive"},
  592. {"JJ", "Deep Silver"},
  593. {"JP", "redspotgames"},
  594. {"JR", "Engine Software"},
  595. {"JS", "Digital Leisure"},
  596. {"JT", "Empty Clip Studios"},
  597. {"JU", "Riverman Media"},
  598. {"JV", "JV Games"},
  599. {"JW", "BigBen Interactive"},
  600. {"JX", "Shin'en Multimedia"},
  601. {"JY", "Steel Penny Games"},
  602. {"JZ", "505 Games"},
  603. {"K2", "Coca-Cola (Japan) Company"},
  604. {"K3", "Yudo"},
  605. {"K6", "Nihon System"},
  606. {"KB", "Nippon Ichi Software"},
  607. {"KG", "Kando Games"},
  608. {"KH", "Joju Games"},
  609. {"KJ", "Studio Zan"},
  610. {"KK", "DK Games"},
  611. {"KL", "Abylight"},
  612. {"KM", "Deep Silver"},
  613. {"KN", "Gameshastra"},
  614. {"KP", "Purple Hills"},
  615. {"KQ", "Over the Top Games"},
  616. {"KR", "KREA Medie"},
  617. {"KT", "The Code Monkeys"},
  618. {"KW", "Semnat Studios"},
  619. {"KY", "Medaverse Studios"},
  620. {"L3", "G-Mode"},
  621. {"L8", "FujiSoft"},
  622. {"LB", "Tryfirst"},
  623. {"LD", "Studio Zan"},
  624. {"LF", "Kemco"},
  625. {"LG", "Black Bean Games"},
  626. {"LJ", "Legendo Entertainment"},
  627. {"LL", "HB Studios"},
  628. {"LN", "GameOn"},
  629. {"LP", "Left Field Productions"},
  630. {"LR", "Koch Media"},
  631. {"LT", "Legacy Interactive"},
  632. {"LU", "Lexis Num\xc3\xa9rique"}, // We can't use a u8 prefix due to C++20's u8string
  633. {"LW", "Grendel Games"},
  634. {"LY", "Icon Games / Super Icon"},
  635. {"M0", "Studio Zan"},
  636. {"M1", "Grand Prix Games"},
  637. {"M2", "HomeMedia"},
  638. {"M4", "Cybird"},
  639. {"M6", "Perpetuum"},
  640. {"MB", "Agenda"},
  641. {"MD", "Ateam"},
  642. {"ME", "Silver Star Japan"},
  643. {"MF", "Yamasa"},
  644. {"MH", "Mentor Interactive"},
  645. {"MJ", "Mumbo Jumbo"},
  646. {"ML", "DTP Young Entertainment"},
  647. {"MM", "Big John Games"},
  648. {"MN", "Mindscape"},
  649. {"MR", "Mindscape"},
  650. {"MS", "Milestone / UFO Interactive Games"},
  651. {"MT", "Blast! Entertainment"},
  652. {"MV", "Marvelous Entertainment"},
  653. {"MZ", "Mad Catz"},
  654. {"N0", "Exkee"},
  655. {"N4", "Zoom"},
  656. {"N7", "T&S"},
  657. {"N9", "Tera Box"},
  658. {"NA", "Tom Create"},
  659. {"NB", "HI Games & Publishing"},
  660. {"NE", "Kosaido"},
  661. {"NF", "Peakvox"},
  662. {"NG", "Nordic Games"},
  663. {"NH", "Gevo Entertainment"},
  664. {"NJ", "Enjoy Gaming"},
  665. {"NK", "Neko Entertainment"},
  666. {"NL", "Nordic Softsales"},
  667. {"NN", "Nnooo"},
  668. {"NP", "Nobilis"},
  669. {"NQ", "Namco Bandai Partners"},
  670. {"NR", "Destineer Publishing / Bold Games"},
  671. {"NS", "Nippon Ichi Software America"},
  672. {"NT", "Nocturnal Entertainment"},
  673. {"NV", "Nicalis"},
  674. {"NW", "Deep Fried Entertainment"},
  675. {"NX", "Barnstorm Games"},
  676. {"NY", "Nicalis"},
  677. {"P1", "Poisoft"},
  678. {"PH", "Playful Entertainment"},
  679. {"PK", "Knowledge Adventure"},
  680. {"PL", "Playlogic Entertainment"},
  681. {"PM", "Warner Bros. Interactive Entertainment"},
  682. {"PN", "P2 Games"},
  683. {"PQ", "PopCap Games"},
  684. {"PS", "Bplus"},
  685. {"PT", "Firemint"},
  686. {"PU", "Pub Company"},
  687. {"PV", "Pan Vision"},
  688. {"PY", "Playstos Entertainment"},
  689. {"PZ", "GameMill Publishing"},
  690. {"Q2", "Santa Entertainment"},
  691. {"Q3", "Asterizm"},
  692. {"Q4", "Hamster"},
  693. {"Q5", "Recom"},
  694. {"QA", "Miracle Kidz"},
  695. {"QC", "Kadokawa Shoten / Enterbrain"},
  696. {"QH", "Virtual Play Games"},
  697. {"QK", "MACHINE Studios"},
  698. {"QM", "Object Vision Software"},
  699. {"QQ", "Gamelion"},
  700. {"QR", "Lapland Studio"},
  701. {"QT", "CALARIS"},
  702. {"QU", "QubicGames"},
  703. {"QV", "Ludia"},
  704. {"QW", "Kaasa Solution"},
  705. {"QX", "Press Play"},
  706. {"QZ", "Hands-On Mobile"},
  707. {"RA", "Office Create"},
  708. {"RG", "Ronimo Games"},
  709. {"RH", "h2f Games"},
  710. {"RM", "Rondomedia"},
  711. {"RN", "Mastiff / N3V Games"},
  712. {"RQ", "GolemLabs & Zoozen"},
  713. {"RS", "Brash Entertainment"},
  714. {"RT", "RTL Enterprises"},
  715. {"RV", "bitComposer Games"},
  716. {"RW", "RealArcade"},
  717. {"RX", "Reflexive Entertainment"},
  718. {"RZ", "Akaoni Studio"},
  719. {"S5", "SouthPeak Games"},
  720. {"SH", "Sabarasa"},
  721. {"SJ", "Cosmonaut Games"},
  722. {"SP", "Blade Interactive Studios"},
  723. {"SQ", "Sonalysts"},
  724. {"SR", "SnapDragon Games"},
  725. {"SS", "Sanuk Games"},
  726. {"ST", "Stickmen Studios"},
  727. {"SU", "Slitherine"},
  728. {"SV", "SevenOne Intermedia"},
  729. {"SZ", "Storm City Games"},
  730. {"TH", "Kolkom"},
  731. {"TJ", "Broken Rules"},
  732. {"TL", "Telltale Games"},
  733. {"TR", "Tetris Online"},
  734. {"TS", "Triangle Studios"},
  735. {"TV", "Tivola"},
  736. {"TW", "Two Tribes"},
  737. {"TY", "Teyon"},
  738. {"UG", "Data Design Interactive / Popcorn Arcade / Metro 3D"},
  739. {"UH", "Intenium Console"},
  740. {"UJ", "Ghostlight"},
  741. {"UK", "iFun4all"},
  742. {"UN", "Chillingo"},
  743. {"UP", "EnjoyUp Games"},
  744. {"UR", "Sudden Games"},
  745. {"US", "USM"},
  746. {"UU", "Onteca"},
  747. {"UV", "Fugazo"},
  748. {"UW", "Coresoft"},
  749. {"VG", "Vogster Entertainment"},
  750. {"VK", "Sandlot Games"},
  751. {"VL", "Eko Software"},
  752. {"VN", "Valcon Games"},
  753. {"VP", "Virgin Play"},
  754. {"VS", "Korner Entertainment"},
  755. {"VT", "Microforum Games"},
  756. {"VU", "Double Jungle"},
  757. {"VV", "Pixonauts"},
  758. {"VX", "Frontline Studios"},
  759. {"VZ", "Little Orbit"},
  760. {"WD", "Amazon"},
  761. {"WG", "2D Boy"},
  762. {"WH", "NinjaBee"},
  763. {"WJ", "Studio Walljump"},
  764. {"WL", "Wired Productions"},
  765. {"WN", "tons of bits"},
  766. {"WP", "White Park Bay Software"},
  767. {"WQ", "Revistronic"},
  768. {"WR", "Warner Bros. Interactive Entertainment"},
  769. {"WS", "MonkeyPaw Games"},
  770. {"WW", "Slang Publishing"},
  771. {"WY", "WayForward Technologies"},
  772. {"WZ", "Wizarbox"},
  773. {"X0", "SDP Games"},
  774. {"X3", "CK Games"},
  775. {"X4", "Easy Interactive"},
  776. {"XB", "Hulu"},
  777. {"XG", "XGen Studios"},
  778. {"XJ", "XSEED Games"},
  779. {"XK", "Exkee"},
  780. {"XM", "DreamBox Games"},
  781. {"XN", "Netflix"},
  782. {"XS", "Aksys Games"},
  783. {"XT", "Funbox Media"},
  784. {"XU", "Shanblue Interactive"},
  785. {"XV", "Keystone Game Studio"},
  786. {"XW", "Lemon Games"},
  787. {"XY", "Gaijin Games"},
  788. {"Y1", "Tubby Games"},
  789. {"Y5", "Easy Interactive"},
  790. {"Y6", "Motiviti"},
  791. {"Y7", "The Learning Company"},
  792. {"Y9", "RadiationBurn"},
  793. {"YC", "NECA"},
  794. {"YD", "Infinite Dreams"},
  795. {"YF", "O2 Games"},
  796. {"YG", "Maximum Family Games"},
  797. {"YJ", "Frozen Codebase"},
  798. {"YK", "MAD Multimedia"},
  799. {"YN", "Game Factory"},
  800. {"YS", "Yullaby"},
  801. {"YT", "Corecell Technology"},
  802. {"YV", "KnapNok Games"},
  803. {"YX", "Selectsoft"},
  804. {"YY", "FDG Entertainment"},
  805. {"Z4", "Ntreev Soft"},
  806. {"Z5", "Shinsegae I&C"},
  807. {"ZA", "WBA Interactive"},
  808. {"ZG", "Zallag"},
  809. {"ZH", "Internal Engine"},
  810. {"ZJ", "Performance Designed Products"},
  811. {"ZK", "Anima Game Studio"},
  812. {"ZP", "Fishing Cactus"},
  813. {"ZS", "Zinkia Entertainment"},
  814. {"ZV", "RedLynx"},
  815. {"ZW", "Judo Baby"},
  816. {"ZX", "TopWare Interactive"}};
  817. static const std::string EMPTY_STRING;
  818. auto iterator = companies.find(company_id);
  819. if (iterator != companies.end())
  820. return iterator->second;
  821. else
  822. return EMPTY_STRING;
  823. }
  824. } // namespace DiscIO