2020-09-21 17:17:34 +00:00
|
|
|
// SPDX-License-Identifier: MIT
|
2020-06-21 12:25:28 +00:00
|
|
|
//
|
2020-09-21 17:17:34 +00:00
|
|
|
// EmulationStation Desktop Edition
|
2020-06-25 17:52:38 +00:00
|
|
|
// PlatformId.cpp
|
2020-06-21 12:25:28 +00:00
|
|
|
//
|
2020-06-23 18:07:00 +00:00
|
|
|
// Index of all supported systems/platforms.
|
2020-06-21 12:25:28 +00:00
|
|
|
//
|
|
|
|
|
2014-06-25 16:29:58 +00:00
|
|
|
#include "PlatformId.h"
|
2017-11-01 22:21:10 +00:00
|
|
|
|
2014-06-25 16:29:58 +00:00
|
|
|
#include <string.h>
|
|
|
|
|
|
|
|
namespace PlatformIds
|
|
|
|
{
|
2020-06-21 12:25:28 +00:00
|
|
|
const char* PlatformNames[PLATFORM_COUNT + 1] = {
|
|
|
|
"unknown", // Nothing set.
|
2014-06-25 16:29:58 +00:00
|
|
|
|
2020-06-21 12:25:28 +00:00
|
|
|
"3do",
|
|
|
|
"amiga",
|
2020-08-05 08:45:27 +00:00
|
|
|
"amigacd32",
|
2020-06-21 12:25:28 +00:00
|
|
|
"amstradcpc",
|
2020-08-05 08:45:27 +00:00
|
|
|
"gx4000",
|
2020-06-21 12:25:28 +00:00
|
|
|
"apple2",
|
2020-08-05 08:45:27 +00:00
|
|
|
"apple2gs",
|
2020-06-21 12:25:28 +00:00
|
|
|
"arcade",
|
|
|
|
"atari800",
|
|
|
|
"atari2600",
|
|
|
|
"atari5200",
|
|
|
|
"atari7800",
|
|
|
|
"atarilynx",
|
|
|
|
"atarist",
|
|
|
|
"atarijaguar",
|
|
|
|
"atarijaguarcd",
|
|
|
|
"atarixe",
|
2020-08-05 08:45:27 +00:00
|
|
|
"atomiswave",
|
2020-06-21 12:25:28 +00:00
|
|
|
"colecovision",
|
|
|
|
"c64", // Commodore 64
|
2020-08-05 08:45:27 +00:00
|
|
|
"cdtv",
|
2020-06-21 12:25:28 +00:00
|
|
|
"intellivision",
|
|
|
|
"macintosh",
|
|
|
|
"xbox",
|
|
|
|
"xbox360",
|
|
|
|
"msx",
|
|
|
|
"neogeo",
|
2020-08-05 08:45:27 +00:00
|
|
|
"neogeocd",
|
2020-06-21 12:25:28 +00:00
|
|
|
"ngp", // Neo Geo Pocket
|
|
|
|
"ngpc", // Neo Geo Pocket Color
|
|
|
|
"n3ds", // Nintendo 3DS
|
|
|
|
"n64", // Nintendo 64
|
|
|
|
"nds", // Nintendo DS
|
|
|
|
"fds", // Famicom Disk System
|
|
|
|
"nes", // Nintendo Entertainment System
|
|
|
|
"channelf", // Fairchild Channel F
|
|
|
|
"gb", // Game Boy
|
|
|
|
"gba", // Game Boy Advance
|
|
|
|
"gbc", // Game Boy Color
|
2020-07-25 14:18:41 +00:00
|
|
|
"gamecube", // GameCube
|
2020-06-21 12:25:28 +00:00
|
|
|
"wii",
|
|
|
|
"wiiu",
|
|
|
|
"virtualboy",
|
|
|
|
"gameandwatch",
|
2020-08-05 08:45:27 +00:00
|
|
|
"pokemini",
|
|
|
|
"satellaview",
|
|
|
|
"sufami",
|
2020-06-21 12:25:28 +00:00
|
|
|
"openbor",
|
2020-07-29 09:19:26 +00:00
|
|
|
"dos",
|
2020-07-30 20:19:12 +00:00
|
|
|
"pc",
|
2020-06-21 12:25:28 +00:00
|
|
|
"sega32x",
|
|
|
|
"segacd",
|
|
|
|
"dreamcast",
|
|
|
|
"gamegear",
|
|
|
|
"genesis", // Sega Genesis
|
|
|
|
"mastersystem", // Sega Master System
|
|
|
|
"megadrive", // Sega Mega Drive
|
|
|
|
"saturn", // Sega Saturn
|
|
|
|
"sg-1000",
|
|
|
|
"psx",
|
|
|
|
"ps2",
|
|
|
|
"ps3",
|
|
|
|
"ps4",
|
|
|
|
"psvita",
|
|
|
|
"psp", // PlayStation Portable
|
|
|
|
"snes", // Super Nintendo Entertainment System
|
|
|
|
"scummvm",
|
2020-07-25 14:18:41 +00:00
|
|
|
"x68000",
|
2020-06-21 12:25:28 +00:00
|
|
|
"solarus",
|
|
|
|
"pcengine", // (Aka turbografx-16), HuCards only
|
|
|
|
"pcenginecd", // (Aka turbografx-16), CD-ROMs only
|
|
|
|
"wonderswan",
|
|
|
|
"wonderswancolor",
|
|
|
|
"zxspectrum",
|
|
|
|
"zx81",
|
2020-07-25 14:18:41 +00:00
|
|
|
"odyssey2",
|
2020-06-21 12:25:28 +00:00
|
|
|
"vectrex",
|
|
|
|
"trs-80",
|
|
|
|
"coco",
|
2020-07-25 14:18:41 +00:00
|
|
|
"ags",
|
|
|
|
"astrocade",
|
|
|
|
"bbcmicro",
|
|
|
|
"cavestory",
|
|
|
|
"daphne",
|
|
|
|
"dragon32",
|
|
|
|
"famicom",
|
|
|
|
"love",
|
|
|
|
"lutro",
|
|
|
|
"mess",
|
|
|
|
"moonlight",
|
|
|
|
"oric",
|
|
|
|
"pcfx",
|
|
|
|
"residualvm",
|
|
|
|
"samcoupe",
|
|
|
|
"supergrafx",
|
|
|
|
"stratagus",
|
|
|
|
"videopac",
|
|
|
|
"zmachine",
|
|
|
|
"ti99",
|
2020-08-05 08:45:27 +00:00
|
|
|
"naomi",
|
|
|
|
"thomson",
|
|
|
|
"uzebox",
|
|
|
|
"spectravideo",
|
|
|
|
"palm",
|
2014-06-25 16:29:58 +00:00
|
|
|
|
2020-06-21 12:25:28 +00:00
|
|
|
"ignore", // Do not allow scraping for this system.
|
|
|
|
"invalid"
|
|
|
|
};
|
2014-06-25 16:29:58 +00:00
|
|
|
|
2020-06-21 12:25:28 +00:00
|
|
|
PlatformId getPlatformId(const char* str)
|
|
|
|
{
|
2020-06-23 18:07:00 +00:00
|
|
|
if (str == nullptr)
|
2020-06-21 12:25:28 +00:00
|
|
|
return PLATFORM_UNKNOWN;
|
2014-06-25 16:29:58 +00:00
|
|
|
|
2020-06-21 12:25:28 +00:00
|
|
|
for (unsigned int i = 1; i < PLATFORM_COUNT; i++) {
|
|
|
|
if (strcmp(PlatformNames[i], str) == 0)
|
|
|
|
return (PlatformId)i;
|
|
|
|
}
|
2014-06-25 16:29:58 +00:00
|
|
|
|
2020-06-21 12:25:28 +00:00
|
|
|
return PLATFORM_UNKNOWN;
|
|
|
|
}
|
2014-06-25 16:29:58 +00:00
|
|
|
|
2020-06-21 12:25:28 +00:00
|
|
|
const char* getPlatformName(PlatformId id)
|
|
|
|
{
|
|
|
|
return PlatformNames[id];
|
|
|
|
}
|
2014-06-25 16:29:58 +00:00
|
|
|
}
|