local M = {}

M.all = {
    {
        ["key"] = "3do", -- reference
        ["name"] = "Panasonic 3DO", -- bb name
        ["dat"] = {
            { "libretro/metadat/redump/", "The 3DO Company" },
        },
        ["libretroThumbFolder"] = "The 3DO Company - 3DO", -- folder name in libretro-thumbs repo
        ["muos"] = "The 3DO Company - 3DO", -- name of the catalog folder in muos also assign.ini
        ["extensions"] = { "chd", "cue", "iso" },
        ["ssId"] = 29,
        ["tgdbId"] = 25,
    },
    {
        ["key"] = "a800",
        ["name"] = "Atari 8-bit Family",
        ["dat"] = {
            { "libretro/metadat/no-intro/", "Atari - 8-bit" },
            { "libretro/metadat/tosec/", "Atari - 8-bit" },
        },
        ["prefer"] = { "no-intro" },
        ["libretroThumbFolder"] = "Atari - 8-bit",
        ["muos"] = nil,
        ["extensions"] = {
            "a52",
            "atr",
            "atr.gz",
            "atx",
            "bas",
            "bin",
            "car",
            "cas",
            "com",
            "dcm",
            "rom",
            "xex",
            "xfd",
            "xfd.gz",
        },
        ["ssId"] = 43,
        ["tgdbId"] = 4943,
    },
    {
        ["key"] = "atari2600",
        ["name"] = "Atari 2600",
        ["dat"] = {
            { "libretro/metadat/no-intro/", "Atari - 2600" },
            { "libretro/metadat/tosec/", "Atari - 2600" },
        },
        ["prefer"] = { "no-intro" },
        ["libretroThumbFolder"] = "Atari - 2600",
        ["muos"] = "Atari 2600",
        ["extensions"] = { "a26", "bin", "gz", "rom" },
        ["ssId"] = 26,
        ["tgdbId"] = 22,
    },
    {
        ["key"] = "atari5200",
        ["name"] = "Atari 5200",
        ["dat"] = {
            { "libretro/metadat/no-intro/", "Atari - 5200" },
            { "libretro/metadat/tosec/", "Atari - 5200" },
        },
        ["prefer"] = { "no-intro" },
        ["libretroThumbFolder"] = "Atari - 5200",
        ["muos"] = "Atari 5200",
        ["extensions"] = { "a52", "atr", "atr.gz", "bas", "bin", "car", "dcm", "xex", "xfd", "xfd.gz" },
        ["ssId"] = 40,
        ["tgdbId"] = 26,
    },
    {
        ["key"] = "atari7800",
        ["name"] = "Atari 7800",
        ["dat"] = {
            { "libretro/metadat/no-intro/", "Atari - 7800" },
            { "libretro/metadat/tosec/", "Atari - 7800" },
            { "libretro/metadat/headered/", "Atari - 7800" },
        },
        ["prefer"] = { "no-intro", "headered" },
        ["libretroThumbFolder"] = "Atari - 7800",
        ["muos"] = "Atari 7800",
        ["extensions"] = { "a78", "bin" },
        ["ssId"] = 41,
        ["tgdbId"] = 27,
    },
    {
        ["key"] = "amiga",
        ["name"] = "Commodore Amiga",
        ["dat"] = {
            { "libretro/metadat/no-intro/", "Commodore - Amiga" },
            { "libretro/metadat/tosec/", "Commodore - Amiga" },
            { "libretro/dat/", "Commodore - Amiga" },
            { "whdload/", "Commodore - Amiga" },
        },
        ["prefer"] = { "whdload", "libretro-dats", "no-intro" },
        ["libretroThumbFolder"] = "Commodore - Amiga",
        ["muos"] = "Commodore Amiga",
        ["extensions"] = { "adf", "adz", "chd", "cue", "dms", "hdf", "img", "ipf", "iso", "lha", "m3u", "rp9", "uae" },
        ["ssId"] = 64,
        ["tgdbId"] = 4911,
    },
    {
        ["key"] = "arcade",
        ["name"] = "Arcade",
        ["dat"] = {
            { "libretro/metadat/mame/", "MAME 2000 BIOS" },
            -- {"libretro/metadat/mame/", "MAME 2000 XML"},
            { "libretro/metadat/mame/", "MAME BIOS" },
            { "libretro/metadat/mame/", "MAME.dat" },
            { "libretro/metadat/mame-member/", "MAME" },
            { "libretro/metadat/mame-nonmerged/", "MAME 2000" },
            { "libretro/metadat/mame-nonmerged/", "MAME 2003-Plus.dat" },
            { "libretro/metadat/mame-nonmerged/", "MAME 2003" },
            { "libretro/metadat/mame-nonmerged/", "MAME 2010" },
            { "libretro/metadat/mame-nonmerged/", "MAME 2015" },
            { "libretro/metadat/mame-nonmerged/", "MAME 2016" },
            { "libretro/metadat/mame-split/", "MAME 2000" },
            { "libretro/metadat/mame-split/", "MAME 2003" },
            { "libretro/metadat/mame-split/", "MAME 2010" },
            { "libretro/metadat/mame-split/", "MAME 2015" },
            -- {"libretro/dat/", "HBMAME"}, -- contains a bad token?
        },
        ["libretroThumbFolder"] = "MAME",
        ["muos"] = "Arcade",
        ["alternate"] = { "fbneo" },
        ["extensions"] = { "bin", "cue", "dat", "fba", "iso", "zip" }, -- zip
        ["ssId"] = 75,
        ["tgdbId"] = 23,
    },
    {
        ["key"] = "fbneo",
        ["name"] = "Arcade (FB NEO)",
        ["dat"] = {
            { "libretro/metadat/fbneo-split/", "FBNeo - Arcade Games" },
            { "no-intro/Non-Redump/fbneo-split/", "Non-Redump - Capcom - Play System" },
            -- {"libretro/metadat/fbneo-split/", "FinalBurn Neo (ClrMame Pro XML, Arcade only)"}, -- xml
        },
        ["libretroThumbFolder"] = "FBNeo - Arcade Games",
        ["muos"] = "Arcade",
        ["alternate"] = { "arcade" },
        ["extensions"] = { "bin", "cue", "dat", "fba", "iso", "zip" }, -- zip
        ["ssId"] = 75,
        ["tgdbId"] = 23,
    },
    {
        ["key"] = "arduboy",
        ["name"] = "Arduboy",
        ["dat"] = {
            { "libretro/metadat/no-intro/", "Arduboy Inc - Arduboy" },
            { "libretro/dat/", "Arduboy Inc - Arduboy" },
        },
        ["prefer"] = { "libretro-dats" },
        ["libretroThumbFolder"] = "Arduboy Inc - Arduboy",
        ["muos"] = "Arduboy",
        ["extensions"] = { "hex", "arduboy" },
        ["ssId"] = 263,
        ["tgdbId"] = nil,
    },
    {
        ["key"] = "atomiswave",
        ["name"] = "Atomiswave",
        ["dat"] = {
            { "libretro/dat", "Atomiswave" },
        },
        ["libretroThumbFolder"] = "Atomiswave",
        ["alternate"] = { "arcade", "fbneo", "naomi" },
        ["muos"] = "Sega Atomiswave Naomi",
        ["extensions"] = { "bin", "chd", "dat", "zip" }, -- zip
        ["ssId"] = 53,
        ["ssParentId"] = 75,
        ["tgdbId"] = nil,
    },
    {
        ["key"] = "c64",
        ["name"] = "Commodore 64",
        ["dat"] = {
            { "libretro/metadat/no-intro", "Commodore - 64" },
        },
        ["libretroThumbFolder"] = "Commodore - 64",
        ["muos"] = "Commodore C64",
        ["extensions"] = { "cmd", "crt", "d64", "d71", "d80", "d81", "g64", "m3u", "prg", "t64", "tap", "vsf", "x64" },
        ["ssId"] = 66,
        ["tgdbId"] = 40,
    },
    {
        ["key"] = "channelf",
        ["name"] = "Fairchild ChannelF",
        ["dat"] = {
            { "libretro/metadat/no-intro", "Fairchild - Channel F" },
        },
        ["libretroThumbFolder"] = "Fairchild - Channel F",
        ["muos"] = "Fairchild Channel F",
        ["extensions"] = { "bin", "rom" },
        ["ssId"] = 80,
        ["tgdbId"] = 4928,
    },
    {
        ["key"] = "cdi",
        ["name"] = "Philips CD-i",
        ["dat"] = {
            { "libretro/metadat/redump", "Philips - CD-i" },
        },
        ["libretroThumbFolder"] = "Philips - CD-i",
        ["muos"] = "Philips CDi",
        ["extensions"] = { "chd" },
        ["ssId"] = 133,
        ["tgdbId"] = 4917,
    },
    -- {
    --     ["key"] = "cps1",
    --     ["name"] = "Capcom Play System 1",
    --     ["datFolder"] = nil,
    --     ["dat"] = nil,                                -- @todo
    --     ["libretroThumbFolder"] = "FBNeo - Arcade Games", -- ?? @todo: check this
    --     ["muos"] = nil,
    -- },
    -- {
    --     ["key"] = "cps2",
    --     ["name"] = "Capcom Play System 2",
    --     ["datFolder"] = nil,
    --     ["dat"] = nil, -- @todo
    --     ["libretroThumbFolder"] = "FBNeo - Arcade Games",
    --     ["muos"] = nil,
    -- },
    -- {
    --     ["key"] = "cps3",
    --     ["name"] = "Capcom Play System 3",
    --     ["datFolder"] = {"no-intro", "Non-Redump"},
    --     ["dat"] = "Non-Redump - Capcom - Play System III",
    --     ["libretroThumbFolder"] = "FBNeo - Arcade Games",
    --     ["muos"] = nil,
    -- },
    {
        ["key"] = "cpc",
        ["name"] = "Amstrad CPC",
        ["dat"] = {
            { "libretro/dat", "Amstrad - CPC" },
            { "libretro/metadat/tosec", "Amstrad - CPC" },
        },
        ["prefer"] = { "libretro-dats" },
        ["libretroThumbFolder"] = "Amstrad - CPC",
        ["muos"] = "Amstrad",
        ["extensions"] = { "cdt", "cpc", "cpr", "dsk", "m3u", "tap" },
        ["ssId"] = 65,
        ["tgdbId"] = 4914,
    },
    {
        ["key"] = "dreamcast",
        ["name"] = "SEGA Dreamcast",
        ["dat"] = {
            { "libretro/metadat/redump", "Sega - Dreamcast" },
            { "libretro/metadat/homebrew", "Sega - Dreamcast" },
        },
        ["prefer"] = { "redump" },
        ["libretroThumbFolder"] = "Sega - Dreamcast",
        ["muos"] = "Sega Dreamcast",
        ["extensions"] = { "cdi", "chd", "cue", "gdi", "iso", "m3u" },
        ["ssId"] = 23,
        ["tgdbId"] = 16,
    },
    {
        ["key"] = "fds",
        ["name"] = "Nintendo - Famicom Disk System",
        ["dat"] = {
            { "libretro/metadat/libretro-dats", "Nintendo - Family Computer Disk System" },
            { "libretro/metadat/no-intro", "Nintendo - Family Computer Disk System" },
        },
        ["libretroThumbFolder"] = "Nintendo - Family Computer Disk System",
        ["muos"] = "Nintendo Famicon Disk System",
        ["extensions"] = { "fds", "nes" },
        ["ssId"] = 106,
        ["ssParentId"] = 3,
        ["tgdbId"] = 4936,
    },
    {
        ["key"] = "gb",
        ["name"] = "Nintendo - Gameboy",
        ["dat"] = {
            { "libretro/metadat/hacks", "Nintendo - Game Boy.dat" },
            { "libretro/metadat/homebrew", "Nintendo - Game Boy.dat" },
            { "libretro/metadat/no-intro", "Nintendo - Game Boy.dat" },
            { "libretro/metadat/tosec", "Nintendo - Game Boy.dat" },
        },
        ["prefer"] = { "no-intro" },
        ["libretroThumbFolder"] = "Nintendo - Game Boy",
        ["muos"] = "Nintendo Game Boy",
        ["extensions"] = { "gb" },
        ["ssId"] = 9,
        ["tgdbId"] = 4,
    },
    {
        ["key"] = "gba",
        ["name"] = "Nintendo - Game Boy Advance",
        ["dat"] = {
            { "libretro/metadat/hacks", "Nintendo - Game Boy Advance" },
            { "libretro/metadat/homebrew", "Nintendo - Game Boy Advance" },
            { "libretro/metadat/no-intro", "Nintendo - Game Boy Advance" },
            { "libretro/metadat/tosec", "Nintendo - Game Boy Advance" },
        },
        ["prefer"] = { "no-intro" },
        ["libretroThumbFolder"] = "Nintendo - Game Boy Advance",
        ["muos"] = "Nintendo Game Boy Advance",
        ["extensions"] = { "gba" },
        ["ssId"] = 12,
        ["tgdbId"] = 5,
    },
    {
        ["key"] = "gbc",
        ["name"] = "Nintendo - Game Boy Color",
        ["dat"] = {
            { "libretro/metadat/hacks", "Nintendo - Game Boy Color" },
            { "libretro/metadat/no-intro", "Nintendo - Game Boy Color" },
            { "libretro/metadat/tosec", "Nintendo - Game Boy Color" },
        },
        ["prefer"] = { "no-intro" },
        ["libretroThumbFolder"] = "Nintendo - Game Boy Color",
        ["muos"] = "Nintendo Game Boy Color",
        ["extensions"] = { "gbc", "gb" },
        ["ssId"] = 10,
        ["ssParentId"] = 9,
        ["tgdbId"] = 41,
    },
    {
        ["key"] = "gg",
        ["name"] = "SEGA Game Gear",
        ["dat"] = {
            { "libretro/metadat/hacks", "Sega - Game Gear" },
            { "libretro/metadat/no-intro", "Sega - Game Gear" },
            { "libretro/metadat/tosec", "Sega - Game Gear" },
        },
        ["prefer"] = { "no-intro" },
        ["libretroThumbFolder"] = "Sega - Game Gear",
        ["muos"] = "Sega Game Gear",
        ["extensions"] = { "bin", "gg", "sms" },
        ["ssId"] = 21,
        ["tgdbId"] = 20,
    },
    {
        ["key"] = "gw",
        ["name"] = "Nintendo - Game & Watch",
        ["dat"] = {
            { "no-intro/No-Intro", "Nintendo - Game & Watch" },
        },
        ["libretroThumbFolder"] = nil,
        ["muos"] = "Handheld Electronic - Game and Watch",
        ["extensions"] = { "mgw" },
        ["ssId"] = 52,
        ["tgdbId"] = 4950,
    },
    {
        ["key"] = "gx4000",
        ["name"] = "Amstrad GX4000",
        ["dat"] = {
            { "libretro/metadat/tosec", "Amstrad - GX4000" },
        },
        ["libretroThumbFolder"] = "Amstrad - GX4000",
        ["muos"] = "Amstrad",
        ["extensions"] = { "cpr", "bin" },
        ["ssId"] = 87,
        ["ssParentId"] = 65,
        ["tgdbId"] = 4999,
    },
    {
        ["key"] = "intv",
        ["name"] = "Mattel Intellivision",
        ["dat"] = {
            { "libretro/metadat/homebrew", "Mattel - Intellivision" },
            { "libretro/metadat/no-intro", "Mattel - Intellivision" },
            { "libretro/metadat/tosec", "Mattel - Intellivision" },
        },
        ["prefer"] = { "no-intro" },
        ["libretroThumbFolder"] = "Mattel - Intellivision",
        ["muos"] = "Mattel - Intellivision",
        ["extensions"] = { "bin", "int", "itv", "rom" },
        ["ssId"] = 115,
        ["tgdbId"] = 32,
    },
    {
        ["key"] = "jaguar",
        ["name"] = "Atari Jaguar",
        ["dat"] = {
            { "libretro/metadat/magazine/edge/", "Atari - Jaguar" },
            { "libretro/metadat/no-intro", "Atari - Jaguar" },
            { "libretro/metadat/tosec", "Atari - Jaguar" },
        },
        ["prefer"] = { "no-intro" },
        ["libretroThumbFolder"] = "Atari - Jaguar",
        ["muos"] = "Atari Jaguar",
        ["extensions"] = { "chd", "cue", "j64", "jag" },
        ["ssId"] = 27,
        ["tgdbId"] = 28,
    },
    {
        ["key"] = "j2me",
        ["name"] = "Java J2ME-Platform",
        -- skipping due to size,
        -- ["dat"] = {
        --     {"libretro/dat", "Mobile - J2ME"},
        -- },
        ["libretroThumbFolder"] = nil,
        ["muos"] = "Java J2ME",
        ["extensions"] = { "jar" },
        ["tgdbId"] = 5018,
    },
    {
        ["key"] = "lynx",
        ["name"] = "Atari Lynx",
        ["dat"] = {
            { "libretro/metadat/headered", "Atari - Lynx" },
            { "libretro/metadat/no-intro", "Atari - Lynx" },
            { "libretro/metadat/tosec", "Atari - Lynx" },
        },
        ["prefer"] = { "no-intro" },
        ["libretroThumbFolder"] = "Atari - Lynx",
        ["muos"] = "Atari Lynx",
        ["extensions"] = { "lnx" },
        ["ssId"] = 28,
        ["tgdbId"] = 4924,
    },
    {
        ["key"] = "md",
        ["name"] = "SEGA Megadrive",
        ["dat"] = {
            { "libretro/metadat/hacks", "Sega - Mega Drive - Genesis" },
            { "libretro/metadat/homebrew", "Sega - Mega Drive - Genesis" },
            { "libretro/metadat/no-intro", "Sega - Mega Drive - Genesis" },
            { "libretro/metadat/tosec", "Sega - Mega Drive - Genesis" },
        },
        ["prefer"] = { "no-intro" },
        ["libretroThumbFolder"] = "Sega - Mega Drive - Genesis",
        ["muos"] = "Sega Mega Drive - Genesis",
        ["extensions"] = { "bin", "gen", "md", "sg", "smd" },
        ["ssId"] = 1,
        ["tgdbId"] = { 36, 18 },
    },
    {
        ["key"] = "mdcd",
        ["name"] = "SEGA Mega-CD",
        ["dat"] = {
            { "libretro/metadat/redump", "Sega - Mega-CD - Sega CD" },
        },
        ["libretroThumbFolder"] = "Sega - Mega-CD - Sega CD",
        ["muos"] = "Sega Mega CD - Sega CD",
        ["extensions"] = { "chd", "cue", "iso", "m3u" },
        ["ssId"] = 20,
        ["tgdbId"] = 21,
    },
    {
        ["key"] = "megaduck",
        ["name"] = "Mega Duck",
        ["dat"] = nil,
        ["libretroThumbFolder"] = nil,
        ["muos"] = "Mega Duck - Cougar Boy",
        ["extensions"] = { "bin" },
        ["ssId"] = 90,
        ["tgdbId"] = 4948,
    },
    {
        ["key"] = "msx",
        ["name"] = "MSX Computer",
        ["dat"] = {
            { "libretro/metadat/no-intro", "Microsoft - MSX.dat" },
        },
        ["libretroThumbFolder"] = "Microsoft - MSX",
        ["muos"] = "Microsoft MSX",
        ["alternate"] = { "msx2" },
        ["extensions"] = { "cas", "col", "dsk", "m3u", "mx1", "mx2", "rom" },
        ["ssId"] = 113,
        ["tgdbId"] = 4929,
    },
    {
        ["key"] = "msx2",
        ["name"] = "MSX2 Computer",
        ["dat"] = {
            { "libretro/metadat/no-intro", "Microsoft - MSX2.dat" },
        },
        ["libretroThumbFolder"] = "Microsoft - MSX2",
        ["muos"] = "Microsoft - MSX",
        ["alternate"] = { "msx" },
        ["extensions"] = { "col", "dsk", "mx1", "mx2", "rom" },
        ["ssId"] = 116,
        ["ssParentId"] = 113,
        ["tgdbId"] = 4929,
    },
    {
        ["key"] = "n64",
        ["name"] = "Nintendo - 64",
        ["dat"] = {
            { "libretro/metadat/hacks", "Nintendo - Nintendo 64" },
            { "libretro/metadat/magazine/edge", "Nintendo - Nintendo 64" },
            { "libretro/metadat/magazine/famitsu", "Nintendo - Nintendo 64" },
            { "libretro/metadat/no-intro", "Nintendo - Nintendo 64" },
        },
        ["prefer"] = { "no-intro" },
        ["libretroThumbFolder"] = "Nintendo - Nintendo 64",
        ["muos"] = "Nintendo N64",
        ["extensions"] = { "n64", "v64", "z64" },
        ["ssId"] = 14,
        ["tgdbId"] = 3,
    },
    {
        ["key"] = "naomi",
        ["name"] = "SEGA Naomi",
        ["dat"] = {
            { "libretro/metadat/redump", "Sega - Naomi.dat" },
        },
        ["libretroThumbFolder"] = "Sega - Naomi",
        ["muos"] = "Naomi", -- fake key/ not really a muos key
        ["alternate"] = { "naomi2" },
        ["extensions"] = { "bin", "chd", "dat" },
        ["ssId"] = 56,
        ["ssParentId"] = 75,
        ["tgdbId"] = nil,
    },
    {
        ["key"] = "naomi2",
        ["name"] = "SEGA Naomi 2",
        ["dat"] = {
            { "libretro/metadat/redump", "Sega - Naomi 2.dat" },
        },
        ["libretroThumbFolder"] = "Sega - Naomi 2",
        ["muos"] = "Naomi 2", -- fake key/ not really a muos key
        ["alternate"] = { "naomi" },
        ["extensions"] = { "bin", "chd", "dat" },
        ["ssId"] = 230,
        ["ssParentId"] = 75,
        ["tgdbId"] = nil,
    },
    {
        ["key"] = "nds",
        ["name"] = "Nintendo - DS",
        ["dat"] = {
            { "libretro/metadat/hacks", "Nintendo - Nintendo DS.dat" },
            { "libretro/metadat/no-intro", "Nintendo - Nintendo DS.dat" },
        },
        ["prefer"] = { "no-intro" },
        ["libretroThumbFolder"] = "Nintendo - Nintendo DS",
        ["muos"] = "Nintendo DS",
        ["alternate"] = { "ndsi" },
        ["extensions"] = { "nds" },
        ["ssId"] = 15,
        ["tgdbId"] = 8,
    },
    {
        ["key"] = "ndsi",
        ["name"] = "Nintendo - DSi",
        ["dat"] = {
            { "libretro/metadat/no-intro", "/Nintendo - Nintendo DSi.dat" },
        },
        ["libretroThumbFolder"] = "Nintendo - Nintendo DSi",
        ["muos"] = "Nintendo DS",
        ["alternate"] = { "nds" },
        ["extensions"] = { "nds" },
        ["ssId"] = 15,
        ["tgdbId"] = 8,
    },
    {
        ["key"] = "neogeo",
        ["name"] = "SNK Neo Geo",
        ["dat"] = {
            { "libretro/dat", "SNK - Neo Geo.dat" },
        },
        ["libretroThumbFolder"] = "SNK - Neo Geo",
        ["muos"] = "SNK Neo Geo",
        ["extensions"] = { "chd", "cue", "fba", "iso", "zip" }, -- zip
        ["ssId"] = 142,
        ["ssParentId"] = 75,
        ["tgdbId"] = 24,
    },
    {
        ["key"] = "neocd",
        ["name"] = "SNK Neo Geo CD",
        ["dat"] = {
            { "libretro/metadat/redump", "SNK - Neo Geo CD" },
        },
        ["libretroThumbFolder"] = "SNK - Neo Geo CD",
        ["muos"] = "SNK Neo Geo CD",
        ["extensions"] = { "chd", "cue", "fba", "iso" },
        ["ssId"] = 70,
        ["tgdbId"] = 4956,
    },
    {
        ["key"] = "nes",
        ["name"] = "Nintendo - Entertainment System",
        ["dat"] = {
            { "libretro/dat", "Nintendo - Nintendo Entertainment System" },
            { "libretro/metadat/hacks", "Nintendo - Nintendo Entertainment System" },
            { "libretro/metadat/headered", "Nintendo - Nintendo Entertainment System" },
            { "libretro/metadat/homebrew", "Nintendo - Nintendo Entertainment System" },
            { "libretro/metadat/no-intro", "Nintendo - Nintendo Entertainment System" },
            { "libretro/metadat/tosec", "Nintendo - Nintendo Entertainment System" },
        },
        ["prefer"] = { "no-intro", "libretro-dats" },
        ["libretroThumbFolder"] = "Nintendo - Nintendo Entertainment System",
        ["muos"] = "Nintendo NES - Famicom",
        ["extensions"] = { "fig", "mgd", "nes", "sfc", "smc", "swc" },
        ["ssId"] = 3,
        ["tgdbId"] = 7,
    },
    {
        ["key"] = "ngp",
        ["name"] = "Neo Geo Pocket",
        ["dat"] = {
            { "libretro/metadat/no-intro", "SNK - Neo Geo Pocket.dat" },
        },
        ["libretroThumbFolder"] = "SNK - Neo Geo Pocket",
        ["muos"] = "SNK Neo Geo Pocket - Color",
        ["alternate"] = { "ngpc" },
        ["extensions"] = { "ngp" },
        ["ssId"] = 25,
        ["ssParentId"] = 82,
        ["tgdbId"] = 4922,
    },
    {
        ["key"] = "ngpc",
        ["name"] = "Neo Geo Pocket Color",
        ["dat"] = {
            { "libretro/metadat/no-intro", "SNK - Neo Geo Pocket Color.dat" },
        },
        ["libretroThumbFolder"] = "SNK - Neo Geo Pocket Color",
        ["muos"] = "SNK Neo Geo Pocket - Color",
        ["alternate"] = { "ngpc" },
        ["extensions"] = { "ngc" },
        ["ssId"] = 82,
        ["tgdbId"] = 4923,
    },
    {
        ["key"] = "openbor",
        ["name"] = "OpenBOR",
        ["dat"] = nil,
        ["libretroThumbFolder"] = nil,
        ["muos"] = "OpenBOR",
        ["extensions"] = { "bor", "pak" },
        ["ssId"] = 214,
        ["tgdbId"] = nil,
    },
    {
        ["key"] = "odyssey2",
        ["name"] = "Magnavox Odyssey - Videopac",
        ["dat"] = {
            { "libretro/metadat/no-intro", "Magnavox - Odyssey2.dat" },
        },
        ["libretroThumbFolder"] = "Magnavox - Odyssey2",
        ["muos"] = "Odyssey2 - VideoPac",
        ["extensions"] = { "bin" },
        ["ssId"] = 104,
        ["tgdbId"] = { 4961, 4927 },
    },
    {
        ["key"] = "pce",
        ["name"] = "PC Engine",
        ["dat"] = {
            { "libretro/metadat/hacks", "NEC - PC Engine - TurboGrafx 16" },
            { "libretro/metadat/no-intro", "NEC - PC Engine - TurboGrafx 16" },
        },
        ["prefer"] = { "no-intro" },
        ["libretroThumbFolder"] = "NEC - PC Engine - TurboGrafx 16",
        ["muos"] = "NEC PC Engine",
        ["extensions"] = { "ccd", "chd", "cue", "pce" },
        ["ssId"] = 31,
        ["tgdbId"] = 34,
    },
    {
        ["key"] = "pces",
        ["name"] = "PC Engine SuperGrafx",
        ["dat"] = {
            { "libretro/metadat/no-intro", "NEC - PC Engine SuperGrafx" },
        },
        ["libretroThumbFolder"] = "NEC - PC Engine SuperGrafx",
        ["muos"] = "NEC PC Engine SuperGrafx",
        ["extensions"] = { "ccd", "chd", "cue", "pce" },
        ["ssId"] = 105,
        ["ssParentId"] = 31,
        ["tgdbId"] = nil,
    },
    {
        ["key"] = "pcecd",
        ["name"] = "PC Engine CD-ROM²",
        ["dat"] = {
            { "libretro/metadat/redump", "NEC - PC Engine CD - TurboGrafx-CD" },
        },
        ["libretroThumbFolder"] = "NEC - PC Engine CD - TurboGrafx-CD",
        ["muos"] = "NEC PC Engine CD",
        ["extensions"] = { "ccd", "chd", "cue", "pce" },
        ["ssId"] = 114,
        ["ssParentId"] = 31,
        ["tgdbId"] = 4955,
    },
    {
        ["key"] = "pico8",
        ["name"] = "Pico-8",
        ["dat"] = {
            { "libretro/dat", "PICO-8" },
        },
        ["libretroThumbFolder"] = nil,
        ["muos"] = "PICO-8",
        ["extensions"] = { "p8", "png" },
        ["ssParentId"] = 234,
        ["tgdbId"] = nil,
    },
    {
        ["key"] = "pokemini",
        ["name"] = "Nintendo - Pokemon Mini",
        ["dat"] = {
            { "libretro/metadat/homebrew", "Nintendo - Pokemon Mini.dat" },
            { "libretro/metadat/no-intro", "Nintendo - Pokemon Mini.dat" },
        },
        ["libretroThumbFolder"] = "Nintendo - Pokemon Mini",
        ["muos"] = "Nintendo Pokemon Mini",
        ["extensions"] = { "min" },
        ["ssId"] = 211,
        ["tgdbId"] = 4957,
    },
    {
        ["key"] = "psx",
        ["name"] = "Sony PlayStation",
        ["dat"] = {
            { "libretro/metadat/redump", "Sony - PlayStation.dat" },
            { "libretro/metadat/hacks", "Sony - PlayStation.dat" },
            { "libretro/metadat/magazine/edge", "Sony - PlayStation.dat" },
        },
        ["prefer"] = { "redump" },
        ["libretroThumbFolder"] = "Sony - PlayStation",
        ["muos"] = "Sony PlayStation",
        ["extensions"] = { "cbn", "chd", "cue", "img", "iso", "m3u", "mdf", "pbp", "toc", "z", "znx" },
        ["ssId"] = 57,
        ["tgdbId"] = 10,
    },
    {
        ["key"] = "psp",
        ["name"] = "Sony PlayStation Portable",
        ["dat"] = {
            { "libretro/metadat/no-intro", "Sony - PlayStation Portable (PSN)" },
            { "libretro/metadat/no-intro", "Sony - PlayStation Portable (PSX2PSP)" },
            { "libretro/metadat/no-intro", "Sony - PlayStation Portable (UMD Music)" },
            { "libretro/metadat/no-intro", "Sony - PlayStation Portable (UMD Video)" },
        },
        ["libretroThumbFolder"] = "Sony - PlayStation Portable",
        ["muos"] = "Sony PlayStation Portable",
        ["extensions"] = { "chd", "cso", "iso", "pbp" },
        ["ssId"] = 61,
        ["tgdbId"] = 13,
    },
    {
        ["key"] = "saturn",
        ["name"] = "SEGA Saturn",
        ["dat"] = {
            { "libretro/metadat/redump", "Sega - Saturn" },
        },
        ["libretroThumbFolder"] = "Sega - Saturn",
        ["muos"] = "Sega Saturn",
        ["extensions"] = { "chd", "cue", "iso", "m3u", "mdf" },
        ["ssId"] = 22,
        ["tgdbId"] = 17,
    },
    {
        ["key"] = "scummvm",
        ["name"] = "ScummVM",
        ["dat"] = {
            { "libretro/dat", "ScummVM" },
            { "libretro/metadat/magazine/edge", "ScummVM" },
        },
        ["libretroThumbFolder"] = "ScummVM",
        ["muos"] = "ScummVM",
        ["extensions"] = { "scummvm", "svm" },
        ["ssId"] = 123,
        ["ssParentId"] = 135,
        ["tgdbId"] = nil,
    },
    {
        ["key"] = "sega32x",
        ["name"] = "SEGA 32X",
        ["dat"] = {
            { "libretro/metadat/hacks", "Sega - 32X" },
            { "libretro/metadat/no-intro", "Sega - 32X" },
            { "libretro/metadat/tosec", "Sega - 32X" },
        },
        ["prefer"] = { "no-intro" },
        ["libretroThumbFolder"] = "Sega - 32X",
        ["muos"] = "Sega 32X",
        ["extensions"] = { "32x", "bin", "md", "smd" },
        ["ssId"] = 19,
        ["ssParentId"] = 1,
        ["tgdbId"] = 33,
    },
    {
        ["key"] = "sg1000",
        ["name"] = "SEGA SG-1000",
        ["dat"] = {
            { "libretro/metadat/no-intro", "Sega - SG-1000" },
            { "libretro/metadat/tosec", "Sega - SG-1000" },
        },
        ["libretroThumbFolder"] = "Sega - SG-1000",
        ["muos"] = "Sega SG-1000",
        ["extensions"] = { "bin", "sg" },
        ["ssId"] = 109,
        ["ssParentId"] = 2,
        ["tgdbId"] = 4949,
    },
    {
        ["key"] = "sms",
        ["name"] = "SEGA Master System",
        ["dat"] = {
            { "libretro/metadat/no-intro", "Sega - Master System - Mark III" },
        },
        ["libretroThumbFolder"] = "Sega - Master System - Mark III",
        ["muos"] = "Sega Master System",
        ["extensions"] = { "bin", "sms" },
        ["ssId"] = 2,
        ["tgdbId"] = 35,
    },
    {
        ["key"] = "snes",
        ["name"] = "Nintendo - SNES",
        ["dat"] = {
            { "libretro/dat", "Nintendo - Super Nintendo Entertainment System" },
            { "libretro/metadat/hacks", "Nintendo - Super Nintendo Entertainment System" },
            { "libretro/metadat/homebrew", "Nintendo - Super Nintendo Entertainment System" },
            { "libretro/metadat/libretro-dats", "Nintendo - Super Nintendo Entertainment System" },
            { "libretro/metadat/magazine/edge", "Nintendo - Super Nintendo Entertainment System" },
            { "libretro/metadat/no-intro", "Nintendo - Super Nintendo Entertainment System" },
            { "libretro/metadat/tosec", "Nintendo - Super Nintendo Entertainment System" },
        },
        ["libretroThumbFolder"] = "Nintendo - Super Nintendo Entertainment System",
        ["muos"] = "Nintendo SNES - SFC",
        ["extensions"] = { "bin", "bs", "fig", "mgd", "sfc", "smc", "swc" },
        ["ssId"] = 4,
        ["tgdbId"] = 6,
    },
    {
        ["key"] = "spectrum",
        ["name"] = "ZX Spectrum",
        ["dat"] = {
            { "libretro/dat", "Sinclair - ZX Spectrum" },
            { "libretro/metadat/tosec", "Sinclair - ZX Spectrum.dat" },
            { "libretro/metadat/no-intro", "Sinclair - ZX Spectrum +3" },
        },
        ["libretroThumbFolder"] = "Sinclair - ZX Spectrum",
        ["muos"] = "Sinclair ZX Spectrum",
        ["extensions"] = { "dsk", "gz", "img", "mgt", "rzx", "scl", "sna", "szx", "tap", "trd", "tzx", "udi", "z80" },
        ["ssId"] = 76,
        ["tgdbId"] = 4913,
    },
    {
        ["key"] = "supervision",
        ["name"] = "Watara Supervision",
        ["dat"] = {
            { "libretro/metadat/no-intro", "Watara - Supervision" },
        },
        ["libretroThumbFolder"] = "Watara - Supervision",
        ["muos"] = "Watara Supervision",
        ["extensions"] = { "bin", "sv" },
        ["ssId"] = 207,
        ["tgdbId"] = 4959,
    },
    {
        ["key"] = "tic80",
        ["name"] = "TIC-80 Tiny Computer",
        ["dat"] = {
            { "libretro/dat", "TIC-80" },
        },
        ["libretroThumbFolder"] = "TIC-80",
        ["muos"] = "TIC-80",
        ["extensions"] = { "tic" },
        ["ssId"] = 222,
        ["tgdbId"] = nil,
    },
    {
        ["key"] = "vb",
        ["name"] = "Nintendo - Virtual Boy",
        ["dat"] = {
            { "libretro/metadat/no-intro", "Nintendo - Virtual Boy" },
        },
        ["libretroThumbFolder"] = "Nintendo - Virtual Boy",
        ["muos"] = "Nintendo Virtual Boy",
        ["extensions"] = { "vb" },
        ["ssId"] = 11,
        ["tgdbId"] = 4918,
    },
    {
        ["key"] = "vectrex",
        ["name"] = "GCE Vectrex",
        ["dat"] = {
            { "libretro/metadat/no-intro", "GCE - Vectrex" },
        },
        ["libretroThumbFolder"] = "GCE - Vectrex",
        ["muos"] = "GCE Vectrex",
        ["extensions"] = { "bin", "gam", "vec" },
        ["ssId"] = 102,
        ["tgdbId"] = 4939,
    },
    {
        ["key"] = "ws",
        ["name"] = "WonderSwan",
        ["dat"] = {
            { "libretro/metadat/no-intro", "Bandai - WonderSwan.dat" },
            { "libretro/metadat/hacks", "Bandai - WonderSwan.dat" },
        },
        ["libretroThumbFolder"] = "Bandai - WonderSwan",
        ["muos"] = "Bandai WonderSwan Color",
        ["extensions"] = { "ws" },
        ["ssId"] = 45,
        ["tgdbId"] = 4925,
    },
    {
        ["key"] = "wsc",
        ["name"] = "WonderSwan Color",
        ["dat"] = {
            { "libretro/metadat/no-intro", "Bandai - WonderSwan Color" },
            { "libretro/metadat/hacks", "Bandai - WonderSwan Color" },
        },
        ["libretroThumbFolder"] = "Bandai - WonderSwan Color",
        ["muos"] = "Bandai WonderSwan Color",
        ["extensions"] = { "wsc" },
        ["ssId"] = 46,
        ["ssParentId"] = 45,
        ["tgdbId"] = 4926,
    },
    {
        ["key"] = "x1",
        ["name"] = "Sharp X1",
        ["dat"] = {
            { "libretro/metadat/no-intro", "Sharp - X1" },
            { "libretro/metadat/tosec", "Sharp - X1" },
        },
        ["prefer"] = { "no-intro" },
        ["libretroThumbFolder"] = "Sharp - X1",
        ["muos"] = "Sharp X1",
        ["extensions"] = { "2d", "2hd", "88d", "cmd", "d88", "dup", "dx1", "hdm", "tfd", "xdf" },
        ["ssId"] = 220,
        ["tgdbId"] = 4977,
    },
    {
        ["key"] = "x68000",
        ["name"] = "Sharp X68000",
        ["dat"] = {
            { "libretro/metadat/no-intro", "Sharp - X68000" },
            { "libretro/metadat/tosec", "Sharp - X68000" },
        },
        ["prefer"] = { "no-intro" },
        ["libretroThumbFolder"] = "Sharp - X68000",
        ["muos"] = "Sharp X68000",
        ["extensions"] = { "2hd", "d88", "dim", "hdf", "hdm", "m3u", "xdf" },
        ["ssId"] = 79,
        ["tgdbId"] = 4931,
    },
    {
        ["key"] = "zx81",
        ["name"] = "Sinclair ZX81",
        ["dat"] = {
            { "libretro/dat", "Sinclair - ZX 81" },
        },
        ["libretroThumbFolder"] = "Sinclair - ZX 81",
        ["muos"] = "Sinclair ZX 81",
        ["extensions"] = { "p", "t81", "tzx" },
        ["ssId"] = 77,
        ["tgdbId"] = 5010,
    },
    -- TBC,
    -- PORTS (github?)
    -- uzebox (libretro),
    -- vircon32 (igdb?),
    -- wasm4 (igdb?)
}

return M
