From d94c92181500b4604eb240e4c0b4e7a97bcea6d8 Mon Sep 17 00:00:00 2001 From: Michael Green <84688932+michael-j-green@users.noreply.github.com> Date: Sat, 23 Sep 2023 16:14:04 -0700 Subject: [PATCH] Add a list of available cores for each platform to the platform map (#130) --- gaseous-server/Classes/Metadata/Platforms.cs | 2 +- .../Controllers/PlatformMapsController.cs | 52 +- gaseous-server/Models/PlatformMapping.cs | 46 +- gaseous-server/Program.cs | 3 + gaseous-server/Support/PlatformMap.json | 1456 ++++++++++++++++- .../pages/dialogs/platformmapedit.html | 110 +- gaseous-server/wwwroot/pages/game.html | 6 +- gaseous-tools/Database/MySQL/gaseous-1003.sql | 2 + gaseous-tools/Logging.cs | 7 + gaseous-tools/gaseous-tools.csproj | 2 + 10 files changed, 1635 insertions(+), 51 deletions(-) create mode 100644 gaseous-tools/Database/MySQL/gaseous-1003.sql diff --git a/gaseous-server/Classes/Metadata/Platforms.cs b/gaseous-server/Classes/Metadata/Platforms.cs index 3934c56..c360e3d 100644 --- a/gaseous-server/Classes/Metadata/Platforms.cs +++ b/gaseous-server/Classes/Metadata/Platforms.cs @@ -156,7 +156,7 @@ namespace gaseous_server.Classes.Metadata IGDBSlug = platform.Slug, AlternateNames = new List{ platform.AlternativeName } }; - Models.PlatformMapping.WritePlatformMap(item, false); + Models.PlatformMapping.WritePlatformMap(item, false, true); } } diff --git a/gaseous-server/Controllers/PlatformMapsController.cs b/gaseous-server/Controllers/PlatformMapsController.cs index f14b82d..cfaecc8 100644 --- a/gaseous-server/Controllers/PlatformMapsController.cs +++ b/gaseous-server/Controllers/PlatformMapsController.cs @@ -110,32 +110,32 @@ namespace gaseous_server.Controllers return Ok(new { count = files.Count, size }); } - [HttpPost] - [Route("{PlatformId}")] - [ProducesResponseType(typeof(PlatformMapping.PlatformMapItem), StatusCodes.Status200OK)] - [ProducesResponseType(StatusCodes.Status404NotFound)] - [ProducesResponseType(StatusCodes.Status409Conflict)] - public ActionResult NewPlatformMap(long PlatformId, PlatformMapping.PlatformMapItem Map) - { - try - { - PlatformMapping.PlatformMapItem platformMapItem = PlatformMapping.GetPlatformMap(PlatformId); + // [HttpPost] + // [Route("{PlatformId}")] + // [ProducesResponseType(typeof(PlatformMapping.PlatformMapItem), StatusCodes.Status200OK)] + // [ProducesResponseType(StatusCodes.Status404NotFound)] + // [ProducesResponseType(StatusCodes.Status409Conflict)] + // public ActionResult NewPlatformMap(long PlatformId, PlatformMapping.PlatformMapItem Map) + // { + // try + // { + // PlatformMapping.PlatformMapItem platformMapItem = PlatformMapping.GetPlatformMap(PlatformId); - if (platformMapItem != null) - { - return Conflict(); - } - else - { - PlatformMapping.WritePlatformMap(Map, false); - return Ok(PlatformMapping.GetPlatformMap(PlatformId)); - } - } - catch - { - return NotFound(); - } - } + // if (platformMapItem != null) + // { + // return Conflict(); + // } + // else + // { + // PlatformMapping.WritePlatformMap(Map, false, false); + // return Ok(PlatformMapping.GetPlatformMap(PlatformId)); + // } + // } + // catch + // { + // return NotFound(); + // } + // } [HttpPatch] [Route("{PlatformId}")] @@ -149,7 +149,7 @@ namespace gaseous_server.Controllers if (platformMapItem != null) { - PlatformMapping.WritePlatformMap(Map, true); + PlatformMapping.WritePlatformMap(Map, true, false); return Ok(PlatformMapping.GetPlatformMap(PlatformId)); } else diff --git a/gaseous-server/Models/PlatformMapping.cs b/gaseous-server/Models/PlatformMapping.cs index 2871ee1..e7fd6ad 100644 --- a/gaseous-server/Models/PlatformMapping.cs +++ b/gaseous-server/Models/PlatformMapping.cs @@ -25,7 +25,10 @@ namespace gaseous_server.Models { string rawJson = reader.ReadToEnd(); List platforms = new List(); - platforms = Newtonsoft.Json.JsonConvert.DeserializeObject>(rawJson); + Newtonsoft.Json.JsonSerializerSettings jsonSerializerSettings = new JsonSerializerSettings{ + MaxDepth = 64 + }; + platforms = Newtonsoft.Json.JsonConvert.DeserializeObject>(rawJson, jsonSerializerSettings); foreach (PlatformMapItem mapItem in platforms) { @@ -41,7 +44,7 @@ namespace gaseous_server.Models } else { - WritePlatformMap(mapItem, true); + WritePlatformMap(mapItem, true, true); Logging.Log(Logging.LogType.Information, "Platform Map", "Overwriting " + mapItem.IGDBName + " with default values."); } } @@ -49,7 +52,7 @@ namespace gaseous_server.Models { Logging.Log(Logging.LogType.Information, "Platform Map", "Importing " + mapItem.IGDBName + " from predefined data."); // doesn't exist - add it - WritePlatformMap(mapItem, false); + WritePlatformMap(mapItem, false, true); } } } @@ -73,13 +76,13 @@ namespace gaseous_server.Models // still here? we must have found the item we're looking for! overwrite it Logging.Log(Logging.LogType.Information, "Platform Map", "Replacing " + mapItem.IGDBName + " from external JSON file."); - WritePlatformMap(mapItem, true); + WritePlatformMap(mapItem, true, true); } catch { // we caught a not found error, insert a new record Logging.Log(Logging.LogType.Information, "Platform Map", "Importing " + mapItem.IGDBName + " from external JSON file."); - WritePlatformMap(mapItem, false); + WritePlatformMap(mapItem, false, true); } } } @@ -126,7 +129,7 @@ namespace gaseous_server.Models } } - public static void WritePlatformMap(PlatformMapItem item, bool Update) + public static void WritePlatformMap(PlatformMapItem item, bool Update, bool AllowAvailableEmulatorOverwrite) { Database db = new gaseous_tools.Database(Database.databaseType.MySql, Config.DatabaseConfiguration.ConnectionString); string sql = ""; @@ -134,12 +137,19 @@ namespace gaseous_server.Models if (Update == false) { // insert - sql = "INSERT INTO PlatformMap (Id, RetroPieDirectoryName, WebEmulator_Type, WebEmulator_Core) VALUES (@Id, @RetroPieDirectoryName, @WebEmulator_Type, @WebEmulator_Core)"; + sql = "INSERT INTO PlatformMap (Id, RetroPieDirectoryName, WebEmulator_Type, WebEmulator_Core, AvailableWebEmulators) VALUES (@Id, @RetroPieDirectoryName, @WebEmulator_Type, @WebEmulator_Core, @AvailableWebEmulators)"; } else { // update - sql = "UPDATE PlatformMap SET RetroPieDirectoryName=@RetroPieDirectoryName, WebEmulator_Type=@WebEmulator_Type, WebEmulator_Core=@WebEmulator_Core WHERE Id = @Id"; + if (AllowAvailableEmulatorOverwrite == true) + { + sql = "UPDATE PlatformMap SET RetroPieDirectoryName=@RetroPieDirectoryName, WebEmulator_Type=@WebEmulator_Type, WebEmulator_Core=@WebEmulator_Core, AvailableWebEmulators=@AvailableWebEmulators WHERE Id = @Id"; + } + else + { + sql = "UPDATE PlatformMap SET RetroPieDirectoryName=@RetroPieDirectoryName, WebEmulator_Type=@WebEmulator_Type, WebEmulator_Core=@WebEmulator_Core WHERE Id = @Id"; + } } dbDict.Add("Id", item.IGDBId); dbDict.Add("RetroPieDirectoryName", item.RetroPieDirectoryName); @@ -147,11 +157,13 @@ namespace gaseous_server.Models { dbDict.Add("WebEmulator_Type", item.WebEmulator.Type); dbDict.Add("WebEmulator_Core", item.WebEmulator.Core); + dbDict.Add("AvailableWebEmulators", Newtonsoft.Json.JsonConvert.SerializeObject(item.WebEmulator.AvailableWebEmulators)); } else { dbDict.Add("WebEmulator_Type", ""); dbDict.Add("WebEmulator_Core", ""); + dbDict.Add("AvailableWebEmulators", ""); } db.ExecuteCMD(sql, dbDict); @@ -304,7 +316,8 @@ namespace gaseous_server.Models mapItem.RetroPieDirectoryName = (string)Common.ReturnValueIfNull(row["RetroPieDirectoryName"], ""); mapItem.WebEmulator = new PlatformMapItem.WebEmulatorItem{ Type = (string)Common.ReturnValueIfNull(row["WebEmulator_Type"], ""), - Core = (string)Common.ReturnValueIfNull(row["WebEmulator_Core"], "") + Core = (string)Common.ReturnValueIfNull(row["WebEmulator_Core"], ""), + AvailableWebEmulators = Newtonsoft.Json.JsonConvert.DeserializeObject>((string)Common.ReturnValueIfNull(row["AvailableWebEmulators"], "[]")) }; mapItem.Bios = bioss; @@ -378,6 +391,21 @@ namespace gaseous_server.Models { public string Type { get; set; } public string Core { get; set; } + + public List AvailableWebEmulators { get; set; } = new List(); + + public class AvailableWebEmulatorItem + { + public string EmulatorType { get; set; } + public List AvailableWebEmulatorCores { get; set; } = new List(); + + public class AvailableWebEmulatorCoreItem + { + public string Core { get; set; } + public string? AlternateCoreName { get; set; } = ""; + public bool Default { get; set; } = false; + } + } } public List Bios { get; set; } diff --git a/gaseous-server/Program.cs b/gaseous-server/Program.cs index 5e817a1..14a76c0 100644 --- a/gaseous-server/Program.cs +++ b/gaseous-server/Program.cs @@ -9,6 +9,7 @@ using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Server.Kestrel.Core; using Microsoft.OpenApi.Models; +Logging.WriteToDiskOnly = true; Logging.Log(Logging.LogType.Information, "Startup", "Starting Gaseous Server " + Assembly.GetExecutingAssembly().GetName().Version); // set up db @@ -188,5 +189,7 @@ ProcessQueue.QueueItems.Add(new ProcessQueue.QueueItem( }) ); +Logging.WriteToDiskOnly = false; + // start the app app.Run(); diff --git a/gaseous-server/Support/PlatformMap.json b/gaseous-server/Support/PlatformMap.json index 8bc39f1..48627de 100644 --- a/gaseous-server/Support/PlatformMap.json +++ b/gaseous-server/Support/PlatformMap.json @@ -1 +1,1455 @@ -[{"igdbId":50,"igdbName":"3DO Interactive Multiplayer","igdbSlug":"3do","alternateNames":["3DO","3DO Interactive Multiplayer"],"extensions":{"supportedFileExtensions":[".CHD",".CUE",".ISO",".ZIP"],"uniqueFileExtensions":[]},"retroPieDirectoryName":"3do","webEmulator":{"type":"EmulatorJS","core":"3do"},"bios":[{"hash":"8970fc987ab89a7f64da9f8a8c4333ff","description":"Shootout At Old Tucson","filename":"3do_arcade_saot.bin"},{"hash":"8639fd5e549bd6238cfee79e3e749114","description":"Goldstar GDO-101M","filename":"goldstar.bin"},{"hash":"f47264dd47fe30f73ab3c010015c155b","description":"Panasonic FZ-1","filename":"panafz1.bin"},{"hash":"1477bda80dc33731a65468c1f5bcbee9","description":"Panasonic FZ-10 [RSA Patch]","filename":"panafz10-norsa.bin"},{"hash":"51f2f43ae2f3508a14d9f56597e2d3ce","description":"Panasonic FZ-10","filename":"panafz10.bin"},{"hash":"cf11bbb5a16d7af9875cca9de9a15e09","description":"Panasonic FZ-10-E [Anvil RSA Patch]","filename":"panafz10e-anvil-norsa.bin"},{"hash":"a48e6746bd7edec0f40cff078f0bb19f","description":"Panasonic FZ-10-E [Anvil]","filename":"panafz10e-anvil.bin"},{"hash":"f6c71de7470d16abe4f71b1444883dc8","description":"Panasonic FZ-1J [RSA Patch]","filename":"panafz1j-norsa.bin"},{"hash":"a496cfdded3da562759be3561317b605","description":"Panasonic FZ-1J","filename":"panafz1j.bin"},{"hash":"35fa1a1ebaaeea286dc5cd15487c13ea","description":"Sanyo IMP-21J TRY","filename":"sanyotry.bin"}]},{"igdbId":16,"igdbName":"Amiga","igdbSlug":"amiga","alternateNames":["Amiga","Commodore Amiga"],"extensions":{"supportedFileExtensions":[".ADF",".ADZ",".DMS",".FDI",".HDF",".HDZ",".IPF",".LHA",".UAE",".ZIP"],"uniqueFileExtensions":[".ADF",".ADZ",".DMS",".FDI",".HDF",".HDZ",".LHA",".UAE"]},"retroPieDirectoryName":"amiga","webEmulator":{"type":"","core":""},"bios":[{"hash":"85ad74194e87c08904327de1a9443b7a","description":"Kickstart v1.2 rev 33.180","filename":"kick33180.A500"},{"hash":"82a21c1890cae844b3df741f2762d48d","description":"Kickstart v1.3 rev 34.005","filename":"kick34005.A500"},{"hash":"89da1838a24460e4b93f4f0c5d92d48d","description":"CDTV extended ROM v1.00","filename":"kick34005.CDTV"},{"hash":"dc10d7bdd1b6f450773dfb558477c230","description":"Kickstart v2.04 rev 37.175","filename":"kick37175.A500"},{"hash":"5f8924d013dd57a89cf349f4cdedc6b1","description":"CD32 Kickstart v3.1 rev 40.060","filename":"kick40060.CD32"},{"hash":"f2f241bf094168cfb9e7805dc2856433","description":"CD32 KS + extended v3.1 rev 40.060","filename":"kick40060.CD32"},{"hash":"bb72565701b1b6faece07d68ea5da639","description":"CD32 extended ROM rev 40.060","filename":"kick40060.CD32.ext"},{"hash":"e40a5dfb3d017ba8779faba30cbd1c8e","description":"Kickstart v3.1 rev 40.063","filename":"kick40063.A600"},{"hash":"646773759326fbac3b2311fd8c8793ee","description":"Kickstart v3.1 rev 40.068","filename":"kick40068.A1200"},{"hash":"9bdedde6a4f33555b4a270c8ca53297d","description":"Kickstart v3.1 rev 40.068","filename":"kick40068.A4000"}]},{"igdbId":25,"igdbName":"Amstrad CPC","igdbSlug":"acpc","alternateNames":["acpc","Amstrad CPC","Colour Personal Computer"],"extensions":{"supportedFileExtensions":[".CPC",".DSK"],"uniqueFileExtensions":[".CPC"]},"retroPieDirectoryName":"amstradcpc","webEmulator":{"type":"","core":""},"bios":[]},{"igdbId":75,"igdbName":"Apple II","igdbSlug":"appleii","alternateNames":["Apple ][","Apple 2","Apple II","appleii"],"extensions":{"supportedFileExtensions":[".DSK"],"uniqueFileExtensions":[]},"retroPieDirectoryName":"apple2","webEmulator":{"type":"","core":""},"bios":[]},{"igdbId":52,"igdbName":"Arcade","igdbSlug":"arcade","alternateNames":["Arcade"],"extensions":{"supportedFileExtensions":[".ZIP"],"uniqueFileExtensions":[]},"retroPieDirectoryName":"","webEmulator":{"type":"EmulatorJS","core":"arcade"},"bios":[]},{"igdbId":59,"igdbName":"Atari 2600","igdbSlug":"atari2600","alternateNames":["Atari 2600","Atari VCS","atari2600"],"extensions":{"supportedFileExtensions":[".7Z",".A26",".BIN",".GZ",".ROM",".ZIP"],"uniqueFileExtensions":[".A26"]},"retroPieDirectoryName":"atari2600","webEmulator":{"type":"EmulatorJS","core":"atari2600"},"bios":[]},{"igdbId":66,"igdbName":"Atari 5200","igdbSlug":"atari5200","alternateNames":["Atari 5200","Atari 5200 SuperSystem","atari5200"],"extensions":{"supportedFileExtensions":[".A52",".ATR",".ATR.GZ",".BAS",".BIN",".CAR",".DCM",".XEX",".XFD",".XFD.GZ"],"uniqueFileExtensions":[".A52",".ATR",".ATR.GZ",".BAS",".CAR",".DCM",".XEX",".XFD",".XFD.GZ"]},"retroPieDirectoryName":"atari5200","webEmulator":{"type":"EmulatorJS","core":"a5200"},"bios":[{"hash":"281f20ea4320404ec820fb7ec0693b38","description":"BIOS for the Atari 5200","filename":"5200.rom"}]},{"igdbId":60,"igdbName":"Atari 7800","igdbSlug":"atari7800","alternateNames":["Atari 7800","Atari 7800 ProSystem","Atari VCS","atari7800"],"extensions":{"supportedFileExtensions":[".7Z",".A78",".BIN",".ZIP"],"uniqueFileExtensions":[".A78"]},"retroPieDirectoryName":"atari7800","webEmulator":{"type":"EmulatorJS","core":"atari7800"},"bios":[{"hash":"0763f1ffb006ddbe32e52d497ee848ae","description":"7800 BIOS - Optional","filename":"7800 BIOS (U).rom"}]},{"igdbId":62,"igdbName":"Atari Jaguar","igdbSlug":"jaguar","alternateNames":["Atari Jaguar","Jaguar"],"extensions":{"supportedFileExtensions":[".J64",".JAG"],"uniqueFileExtensions":[".J64",".JAG"]},"retroPieDirectoryName":"atarijaguar","webEmulator":{"type":"EmulatorJS","core":"jaguar"},"bios":[]},{"igdbId":61,"igdbName":"Atari Lynx","igdbSlug":"lynx","alternateNames":["Atari Lynx","Lynx"],"extensions":{"supportedFileExtensions":[".7Z",".LNX",".ZIP"],"uniqueFileExtensions":[".LNX"]},"retroPieDirectoryName":"atarilynx","webEmulator":{"type":"EmulatorJS","core":"lynx"},"bios":[{"hash":"fcd403db69f54290b51035d82f835e7b","description":"BIOS for the Atari Lynx","filename":"lynxboot.img"}]},{"igdbId":63,"igdbName":"Atari ST/STE","igdbSlug":"atari-st","alternateNames":["Atari ST","Atari ST/STE","Atari STE","atari-st"],"extensions":{"supportedFileExtensions":[".CTR",".IMG",".IPF",".MSA",".RAW",".ROM",".ST",".STX",".ZIP"],"uniqueFileExtensions":[".CTR",".MSA",".RAW",".ST",".STX"]},"retroPieDirectoryName":"atarist","webEmulator":{"type":"","core":""},"bios":[{"hash":"C1C57CE48E8EE4135885CEE9E63A68A2","description":"TOS","filename":"tos.img"}]},{"igdbId":15,"igdbName":"Commodore C64/128/MAX","igdbSlug":"c64","alternateNames":["C64","C64/C128/MAX","Commodore C128","Commodore C64","Commodore C64/128/MAX","Commodore C64DTV"],"extensions":{"supportedFileExtensions":[".CRT",".D64",".D80",".D81",".G64",".M3U",".PRG",".T64",".TAP",".X64",".ZIP"],"uniqueFileExtensions":[".CRT",".D64",".D80",".D81",".G64",".PRG",".T64",".X64"]},"retroPieDirectoryName":"c64","webEmulator":{"type":"","core":""},"bios":[{"hash":"1b1e985ea5325a1f46eb7fd9681707bf","description":"JiffyDOS 1541 drive BIOS","filename":"JiffyDOS_1541-II.bin"},{"hash":"41c6cc528e9515ffd0ed9b180f8467c0","description":"JiffyDOS 1571 drive BIOS","filename":"JiffyDOS_1571_repl310654.bin"},{"hash":"20b6885c6dc2d42c38754a365b043d71","description":"JiffyDOS 1581 drive BIOS","filename":"JiffyDOS_1581.bin"},{"hash":"be09394f0576cf81fa8bacf634daf9a2","description":"JiffyDOS C64 Kernal","filename":"JiffyDOS_C64.bin"}]},{"igdbId":33,"igdbName":"Game Boy","igdbSlug":"gb","alternateNames":["Game Boy","GB"],"extensions":{"supportedFileExtensions":[".7Z",".GB",".ZIP"],"uniqueFileExtensions":[".GB"]},"retroPieDirectoryName":"gb","webEmulator":{"type":"EmulatorJS","core":"gb"},"bios":[{"hash":"32fbbd84168d3482956eb3c5051637f5","description":"BIOS for Game Boy","filename":"gb_bios.bin"},{"hash":"d574d4f9c12f305074798f54c091a8b4","description":"Super Game Boy","filename":"sgb_bios.bin"}]},{"igdbId":24,"igdbName":"Game Boy Advance","igdbSlug":"gba","alternateNames":["Game Boy Advance","GBA"],"extensions":{"supportedFileExtensions":[".7Z",".GBA",".ZIP"],"uniqueFileExtensions":[".GBA"]},"retroPieDirectoryName":"gba","webEmulator":{"type":"EmulatorJS","core":"gba"},"bios":[{"hash":"32FBBD84168D3482956EB3C5051637F5","description":"[BIOS] Nintendo Game Boy Boot ROM (World) (Rev 1).gb","filename":"gb_bios.bin"},{"hash":"a860e8c0b6d573d191e4ec7db1b1e4f6","description":"[BIOS] Game Boy Advance (World).gba","filename":"gba_bios.bin"},{"hash":"DBFCE9DB9DEAA2567F6A84FDE55F9680","description":"[BIOS] Nintendo Game Boy Color Boot ROM (World).gbc","filename":"gbc_bios.bin"},{"hash":"D574D4F9C12F305074798F54C091A8B4","description":"SGB-CPU (World) (Enhancement Chip).bin","filename":"sgb_bios.bin"}]},{"igdbId":22,"igdbName":"Game Boy Color","igdbSlug":"gbc","alternateNames":["Game Boy Color","GBC"],"extensions":{"supportedFileExtensions":[".7Z",".GBC",".ZIP"],"uniqueFileExtensions":[".GBC"]},"retroPieDirectoryName":"gbc","webEmulator":{"type":"EmulatorJS","core":"gb"},"bios":[{"hash":"dbfce9db9deaa2567f6a84fde55f9680","description":"BIOS for Game Boy Color","filename":"gbc_bios.bin"},{"hash":"d574d4f9c12f305074798f54c091a8b4","description":"Super Game Boy","filename":"sgb_bios.bin"}]},{"igdbId":4,"igdbName":"Nintendo 64","igdbSlug":"n64","alternateNames":["N64","Nintendo 64"],"extensions":{"supportedFileExtensions":[".N64",".V64",".Z64",".ZIP"],"uniqueFileExtensions":[".N64",".V64",".Z64"]},"retroPieDirectoryName":"n64","webEmulator":{"type":"EmulatorJS","core":"n64"},"bios":[]},{"igdbId":20,"igdbName":"Nintendo DS","igdbSlug":"nds","alternateNames":["NDS"],"extensions":{"supportedFileExtensions":[".BIN",".NDS",".ZIP"],"uniqueFileExtensions":[".NDS"]},"retroPieDirectoryName":"nds","webEmulator":{"type":"EmulatorJS","core":"nds"},"bios":[{"hash":"df692a80a5b1bc90728bc3dfc76cd948","description":"ARM7 BIOS","filename":"bios7.bin"},{"hash":"a392174eb3e572fed6447e956bde4b25","description":"ARM9 BIOS","filename":"bios9.bin"},{"hash":"145eaef5bd3037cbc247c213bb3da1b3","description":"NDS Firmware","filename":"firmware.bin"}]},{"igdbId":18,"igdbName":"Nintendo Entertainment System","igdbSlug":"nes","alternateNames":["NES","Nintendo Entertainment System","Nintendo Famicom &amp; Entertainment System"],"extensions":{"supportedFileExtensions":[".7Z",".FDS",".NES",".NEZ",".UNF",".UNIF",".ZIP"],"uniqueFileExtensions":[".FDS",".NES",".NEZ",".UNF",".UNIF"]},"retroPieDirectoryName":"nes","webEmulator":{"type":"EmulatorJS","core":"nes"},"bios":[{"hash":"ca30b50f880eb660a320674ed365ef7a","description":"Family Computer Disk System BIOS - Required for Famicom Disk System emulation","filename":"disksys.rom"},{"hash":"7f98d77d7a094ad7d069b74bd553ec98","description":"Game Genie add-on cartridge - Required for Game Genei Add-on emulation (Only supported on the fceumm core)","filename":"gamegenie.nes"}]},{"igdbId":21,"igdbName":"Nintendo GameCube","igdbSlug":"ngc","alternateNames":["GameCube","GC","GCN","ngc","Nintendo GameCube"],"extensions":{"supportedFileExtensions":[".CISO",".GC",".GCM",".GCZ",".ISO",".RVZ"],"uniqueFileExtensions":[".CISO",".GC",".GCM",".GCZ",".RVZ"]},"retroPieDirectoryName":"gc","webEmulator":{"type":"","core":""},"bios":[]},{"igdbId":7,"igdbName":"PlayStation","igdbSlug":"ps","alternateNames":["PlayStation","PS","PS1","PSOne","PSX","PSX, PSOne, PS","Sony PlayStation"],"extensions":{"supportedFileExtensions":[".CCD",".CHD",".CUE",".EXE",".ISO",".M3U",".PBP",".TOC"],"uniqueFileExtensions":[".CCD",".EXE",".PBP",".TOC"]},"retroPieDirectoryName":"psx","webEmulator":{"type":"EmulatorJS","core":"psx"},"bios":[{"hash":"8dd7d5296a650fac7319bce665a6a53c","description":"PS1 JP BIOS - Required for JP games","filename":"scph5500.bin"},{"hash":"490f666e1afb15b7362b406ed1cea246","description":"PS1 US BIOS - Required for US games","filename":"scph5501.bin"},{"hash":"32736f17079d0b2b7024407c39bd3050","description":"PS1 EU BIOS - Required for EU games","filename":"scph5502.bin"}]},{"igdbId":30,"igdbName":"Sega 32X","igdbSlug":"sega32","alternateNames":["Sega 32X","Sega32","Sega32X"],"extensions":{"supportedFileExtensions":[".32X",".7Z",".BIN",".MD",".ZIP"],"uniqueFileExtensions":[".32X"]},"retroPieDirectoryName":"sega32x","webEmulator":{"type":"EmulatorJS","core":"sega32x"},"bios":[]},{"igdbId":78,"igdbName":"Sega CD","igdbSlug":"segacd","alternateNames":["Mega CD","Sega CD","Sega Mega-CD &amp; Sega CD","segacd"],"extensions":{"supportedFileExtensions":[".BIN",".CHD",".CUE",".ISO",".M3U"],"uniqueFileExtensions":[]},"retroPieDirectoryName":"segacd","webEmulator":{"type":"EmulatorJS","core":"segaCD"},"bios":[{"hash":"e66fa1dc5820d254611fdcdba0662372","description":"MegaCD EU BIOS - Required","filename":"bios_CD_E.bin"},{"hash":"278a9397d192149e84e820ac621a8edd","description":"MegaCD JP BIOS - Required","filename":"bios_CD_J.bin"},{"hash":"2efd74e3232ff260e371b99f84024f7f","description":"SegaCD US BIOS - Required","filename":"bios_CD_U.bin"}]},{"igdbId":35,"igdbName":"Sega Game Gear","igdbSlug":"gamegear","alternateNames":["Game Gear","gamegear","GG","Sega Game Gear"],"extensions":{"supportedFileExtensions":[".7Z",".BIN",".GG",".ZIP"],"uniqueFileExtensions":[".GG"]},"retroPieDirectoryName":"gamegear","webEmulator":{"type":"EmulatorJS","core":"segaGG"},"bios":[{"hash":"672e104c3be3a238301aceffc3b23fd6","description":"GameGear BIOS (bootrom) - Optional","filename":"bios.gg"}]},{"igdbId":64,"igdbName":"Sega Master System/Mark III","igdbSlug":"sms","alternateNames":["Sega Mark III &amp; Master System","Sega Master System","Sega Master System/Mark III","sms","SMS, Mark III"],"extensions":{"supportedFileExtensions":[".7Z",".BIN",".SMS",".ZIP"],"uniqueFileExtensions":[".SMS"]},"retroPieDirectoryName":"mastersystem","webEmulator":{"type":"EmulatorJS","core":"segaMS"},"bios":[{"hash":"840481177270d5642a14ca71ee72844c","description":"MasterSystem EU BIOS","filename":"bios_E.sms"},{"hash":"24a519c53f67b00640d0048ef7089105","description":"MasterSystem JP BIOS","filename":"bios_J.sms"},{"hash":"840481177270d5642a14ca71ee72844c","description":"MasterSystem US BIOS","filename":"bios_U.sms"}]},{"igdbId":29,"igdbName":"Sega Mega Drive/Genesis","igdbSlug":"genesis-slash-megadrive","alternateNames":["genesis-slash-megadrive","Sega Genesis","Sega Mega Drive","Sega Mega Drive & Genesis","Sega Mega Drive/Genesis"],"extensions":{"supportedFileExtensions":[".7Z",".BIN",".GEN",".MD",".SG",".SMD",".ZIP"],"uniqueFileExtensions":[".GEN",".SG"]},"retroPieDirectoryName":"megadrive","webEmulator":{"type":"EmulatorJS","core":"segaMD"},"bios":[{"hash":"45e298905a08f9cfb38fd504cd6dbc84","description":"MegaDrive TMSS startup ROM","filename":"bios_MD.bin"}]},{"igdbId":32,"igdbName":"Sega Saturn","igdbSlug":"saturn","alternateNames":["Hi-Saturn","JVC Saturn","JVC Saturn, Hi-Saturn, Samsung Saturn, V-Saturn","Samsung Saturn","Saturn","Sega Saturn","V-Saturn"],"extensions":{"supportedFileExtensions":[".BIN",".CUE",".ISO",".MDF"],"uniqueFileExtensions":[".MDF"]},"retroPieDirectoryName":"saturn","webEmulator":{"type":"EmulatorJS","core":"segaSaturn"},"bios":[{"hash":"af5828fdff51384f99b3c4926be27762","description":"Saturn BIOS","filename":"saturn_bios.bin"}]},{"igdbId":19,"igdbName":"Super Nintendo Entertainment System","igdbSlug":"snes","alternateNames":["Nintendo Super Famicom &amp; Super Entertainment System","SNES","SNES, Super Nintendo","Super Nintendo","Super Nintendo Entertainment System"],"extensions":{"supportedFileExtensions":[".7Z",".BIN",".BS",".FIG",".MGD",".SFC",".SMC",".SWC",".ZIP"],"uniqueFileExtensions":[".BS",".FIG",".MGD",".SFC",".SMC",".SWC"]},"retroPieDirectoryName":"snes","webEmulator":{"type":"EmulatorJS","core":"snes"},"bios":[]},{"igdbId":87,"igdbName":"Virtual Boy","igdbSlug":"virtualboy","alternateNames":["VB"],"extensions":{"supportedFileExtensions":[".7Z",".VB",".ZIP"],"uniqueFileExtensions":[".VB"]},"retroPieDirectoryName":"vb","webEmulator":{"type":"EmulatorJS","core":"vb"},"bios":[]},{"igdbId":26,"igdbName":"ZX Spectrum","igdbSlug":"zxs","alternateNames":["Sinclair ZX","Sinclair ZX Spectrum","ZX Spectrum","zxs"],"extensions":{"supportedFileExtensions":[".DSK",".GZ",".IMG",".MGT",".SCL",".SNA",".SZX",".TAP",".TRD",".TZX",".UDI",".Z80"],"uniqueFileExtensions":[".MGT",".SCL",".SNA",".SZX",".TRD",".TZX",".UDI",".Z80"]},"retroPieDirectoryName":"zxspectrum","webEmulator":{"type":"","core":""},"bios":[]}] +[ + { + "igdbId": 50, + "igdbName": "3DO Interactive Multiplayer", + "igdbSlug": "3do", + "alternateNames": [ + "3DO", + "3DO Interactive Multiplayer" + ], + "extensions": { + "supportedFileExtensions": [ + ".CHD", + ".CUE", + ".ISO", + ".ZIP" + ], + "uniqueFileExtensions": [] + }, + "retroPieDirectoryName": "3do", + "webEmulator": { + "type": "EmulatorJS", + "core": "3do", + "availableWebEmulators": [ + { + "emulatorType": "EmulatorJS", + "availableWebEmulatorCores": [ + { + "core": "3do", + "alternateCoreName": "opera", + "default": true + } + ] + } + ] + }, + "bios": [ + { + "hash": "8970fc987ab89a7f64da9f8a8c4333ff", + "description": "Shootout At Old Tucson", + "filename": "3do_arcade_saot.bin" + }, + { + "hash": "8639fd5e549bd6238cfee79e3e749114", + "description": "Goldstar GDO-101M", + "filename": "goldstar.bin" + }, + { + "hash": "f47264dd47fe30f73ab3c010015c155b", + "description": "Panasonic FZ-1", + "filename": "panafz1.bin" + }, + { + "hash": "1477bda80dc33731a65468c1f5bcbee9", + "description": "Panasonic FZ-10 [RSA Patch]", + "filename": "panafz10-norsa.bin" + }, + { + "hash": "51f2f43ae2f3508a14d9f56597e2d3ce", + "description": "Panasonic FZ-10", + "filename": "panafz10.bin" + }, + { + "hash": "cf11bbb5a16d7af9875cca9de9a15e09", + "description": "Panasonic FZ-10-E [Anvil RSA Patch]", + "filename": "panafz10e-anvil-norsa.bin" + }, + { + "hash": "a48e6746bd7edec0f40cff078f0bb19f", + "description": "Panasonic FZ-10-E [Anvil]", + "filename": "panafz10e-anvil.bin" + }, + { + "hash": "f6c71de7470d16abe4f71b1444883dc8", + "description": "Panasonic FZ-1J [RSA Patch]", + "filename": "panafz1j-norsa.bin" + }, + { + "hash": "a496cfdded3da562759be3561317b605", + "description": "Panasonic FZ-1J", + "filename": "panafz1j.bin" + }, + { + "hash": "35fa1a1ebaaeea286dc5cd15487c13ea", + "description": "Sanyo IMP-21J TRY", + "filename": "sanyotry.bin" + } + ] + }, + { + "igdbId": 16, + "igdbName": "Amiga", + "igdbSlug": "amiga", + "alternateNames": [ + "Amiga", + "Commodore Amiga" + ], + "extensions": { + "supportedFileExtensions": [ + ".ADF", + ".ADZ", + ".DMS", + ".FDI", + ".HDF", + ".HDZ", + ".IPF", + ".LHA", + ".UAE", + ".ZIP" + ], + "uniqueFileExtensions": [ + ".ADF", + ".ADZ", + ".DMS", + ".FDI", + ".HDF", + ".HDZ", + ".LHA", + ".UAE" + ] + }, + "retroPieDirectoryName": "amiga", + "webEmulator": { + "type": "", + "core": "" + }, + "bios": [ + { + "hash": "85ad74194e87c08904327de1a9443b7a", + "description": "Kickstart v1.2 rev 33.180", + "filename": "kick33180.A500" + }, + { + "hash": "82a21c1890cae844b3df741f2762d48d", + "description": "Kickstart v1.3 rev 34.005", + "filename": "kick34005.A500" + }, + { + "hash": "89da1838a24460e4b93f4f0c5d92d48d", + "description": "CDTV extended ROM v1.00", + "filename": "kick34005.CDTV" + }, + { + "hash": "dc10d7bdd1b6f450773dfb558477c230", + "description": "Kickstart v2.04 rev 37.175", + "filename": "kick37175.A500" + }, + { + "hash": "5f8924d013dd57a89cf349f4cdedc6b1", + "description": "CD32 Kickstart v3.1 rev 40.060", + "filename": "kick40060.CD32" + }, + { + "hash": "f2f241bf094168cfb9e7805dc2856433", + "description": "CD32 KS + extended v3.1 rev 40.060", + "filename": "kick40060.CD32" + }, + { + "hash": "bb72565701b1b6faece07d68ea5da639", + "description": "CD32 extended ROM rev 40.060", + "filename": "kick40060.CD32.ext" + }, + { + "hash": "e40a5dfb3d017ba8779faba30cbd1c8e", + "description": "Kickstart v3.1 rev 40.063", + "filename": "kick40063.A600" + }, + { + "hash": "646773759326fbac3b2311fd8c8793ee", + "description": "Kickstart v3.1 rev 40.068", + "filename": "kick40068.A1200" + }, + { + "hash": "9bdedde6a4f33555b4a270c8ca53297d", + "description": "Kickstart v3.1 rev 40.068", + "filename": "kick40068.A4000" + } + ] + }, + { + "igdbId": 25, + "igdbName": "Amstrad CPC", + "igdbSlug": "acpc", + "alternateNames": [ + "acpc", + "Amstrad CPC", + "Colour Personal Computer" + ], + "extensions": { + "supportedFileExtensions": [ + ".CPC", + ".DSK" + ], + "uniqueFileExtensions": [ + ".CPC" + ] + }, + "retroPieDirectoryName": "amstradcpc", + "webEmulator": { + "type": "", + "core": "" + }, + "bios": [] + }, + { + "igdbId": 75, + "igdbName": "Apple II", + "igdbSlug": "appleii", + "alternateNames": [ + "Apple ][", + "Apple 2", + "Apple II", + "appleii" + ], + "extensions": { + "supportedFileExtensions": [ + ".DSK" + ], + "uniqueFileExtensions": [] + }, + "retroPieDirectoryName": "apple2", + "webEmulator": { + "type": "", + "core": "" + }, + "bios": [] + }, + { + "igdbId": 52, + "igdbName": "Arcade", + "igdbSlug": "arcade", + "alternateNames": [ + "Arcade" + ], + "extensions": { + "supportedFileExtensions": [ + ".ZIP" + ], + "uniqueFileExtensions": [] + }, + "retroPieDirectoryName": "", + "webEmulator": { + "type": "EmulatorJS", + "core": "arcade", + "availableWebEmulators": [ + { + "emulatorType": "EmulatorJS", + "availableWebEmulatorCores": [ + { + "core": "arcade", + "alternateCoreName": "fbneo", + "default": true + }, + { + "core": "fbalpha2012_cps1" + }, + { + "core": "fbalpha2012_cps2" + } + ] + } + ] + }, + "bios": [] + }, + { + "igdbId": 59, + "igdbName": "Atari 2600", + "igdbSlug": "atari2600", + "alternateNames": [ + "Atari 2600", + "Atari VCS", + "atari2600" + ], + "extensions": { + "supportedFileExtensions": [ + ".7Z", + ".A26", + ".BIN", + ".GZ", + ".ROM", + ".ZIP" + ], + "uniqueFileExtensions": [ + ".A26" + ] + }, + "retroPieDirectoryName": "atari2600", + "webEmulator": { + "type": "EmulatorJS", + "core": "atari2600", + "availableWebEmulators": [ + { + "emulatorType": "EmulatorJS", + "availableWebEmulatorCores": [ + { + "core": "atari2600", + "alternateCoreName": "stella2014", + "default": true + } + ] + } + ] + }, + "bios": [] + }, + { + "igdbId": 66, + "igdbName": "Atari 5200", + "igdbSlug": "atari5200", + "alternateNames": [ + "Atari 5200", + "Atari 5200 SuperSystem", + "atari5200" + ], + "extensions": { + "supportedFileExtensions": [ + ".A52", + ".ATR", + ".ATR.GZ", + ".BAS", + ".BIN", + ".CAR", + ".DCM", + ".XEX", + ".XFD", + ".XFD.GZ" + ], + "uniqueFileExtensions": [ + ".A52", + ".ATR", + ".ATR.GZ", + ".BAS", + ".CAR", + ".DCM", + ".XEX", + ".XFD", + ".XFD.GZ" + ] + }, + "retroPieDirectoryName": "atari5200", + "webEmulator": { + "type": "EmulatorJS", + "core": "atari5200", + "availableWebEmulators": [ + { + "emulatorType": "EmulatorJS", + "availableWebEmulatorCores": [ + { + "core": "atari5200", + "alternateCoreName": "a5200", + "default": true + } + ] + } + ] + }, + "bios": [ + { + "hash": "281f20ea4320404ec820fb7ec0693b38", + "description": "BIOS for the Atari 5200", + "filename": "5200.rom" + } + ] + }, + { + "igdbId": 60, + "igdbName": "Atari 7800", + "igdbSlug": "atari7800", + "alternateNames": [ + "Atari 7800", + "Atari 7800 ProSystem", + "Atari VCS", + "atari7800" + ], + "extensions": { + "supportedFileExtensions": [ + ".7Z", + ".A78", + ".BIN", + ".ZIP" + ], + "uniqueFileExtensions": [ + ".A78" + ] + }, + "retroPieDirectoryName": "atari7800", + "webEmulator": { + "type": "EmulatorJS", + "core": "atari7800", + "availableWebEmulators": [ + { + "emulatorType": "EmulatorJS", + "availableWebEmulatorCores": [ + { + "core": "atari7800", + "alternateCoreName": "prosystem", + "default": true + } + ] + } + ] + }, + "bios": [ + { + "hash": "0763f1ffb006ddbe32e52d497ee848ae", + "description": "7800 BIOS - Optional", + "filename": "7800 BIOS (U).rom" + } + ] + }, + { + "igdbId": 62, + "igdbName": "Atari Jaguar", + "igdbSlug": "jaguar", + "alternateNames": [ + "Atari Jaguar", + "Jaguar" + ], + "extensions": { + "supportedFileExtensions": [ + ".J64", + ".JAG" + ], + "uniqueFileExtensions": [ + ".J64", + ".JAG" + ] + }, + "retroPieDirectoryName": "atarijaguar", + "webEmulator": { + "type": "EmulatorJS", + "core": "jaguar", + "availableWebEmulators": [ + { + "emulatorType": "EmulatorJS", + "availableWebEmulatorCores": [ + { + "core": "jaguar", + "alternateCoreName": "virtualjaguar", + "default": true + } + ] + } + ] + }, + "bios": [] + }, + { + "igdbId": 61, + "igdbName": "Atari Lynx", + "igdbSlug": "lynx", + "alternateNames": [ + "Atari Lynx", + "Lynx" + ], + "extensions": { + "supportedFileExtensions": [ + ".7Z", + ".LNX", + ".ZIP" + ], + "uniqueFileExtensions": [ + ".LNX" + ] + }, + "retroPieDirectoryName": "atarilynx", + "webEmulator": { + "type": "EmulatorJS", + "core": "lynx", + "availableWebEmulators": [ + { + "emulatorType": "EmulatorJS", + "availableWebEmulatorCores": [ + { + "core": "lynx", + "alternateCoreName": "handy", + "default": true + } + ] + } + ] + }, + "bios": [ + { + "hash": "fcd403db69f54290b51035d82f835e7b", + "description": "BIOS for the Atari Lynx", + "filename": "lynxboot.img" + } + ] + }, + { + "igdbId": 63, + "igdbName": "Atari ST/STE", + "igdbSlug": "atari-st", + "alternateNames": [ + "Atari ST", + "Atari ST/STE", + "Atari STE", + "atari-st" + ], + "extensions": { + "supportedFileExtensions": [ + ".CTR", + ".IMG", + ".IPF", + ".MSA", + ".RAW", + ".ROM", + ".ST", + ".STX", + ".ZIP" + ], + "uniqueFileExtensions": [ + ".CTR", + ".MSA", + ".RAW", + ".ST", + ".STX" + ] + }, + "retroPieDirectoryName": "atarist", + "webEmulator": { + "type": "", + "core": "" + }, + "bios": [ + { + "hash": "C1C57CE48E8EE4135885CEE9E63A68A2", + "description": "TOS", + "filename": "tos.img" + } + ] + }, + { + "igdbId": 15, + "igdbName": "Commodore C64/128/MAX", + "igdbSlug": "c64", + "alternateNames": [ + "C64", + "C64/C128/MAX", + "Commodore C128", + "Commodore C64", + "Commodore C64/128/MAX", + "Commodore C64DTV" + ], + "extensions": { + "supportedFileExtensions": [ + ".CRT", + ".D64", + ".D80", + ".D81", + ".G64", + ".M3U", + ".PRG", + ".T64", + ".TAP", + ".X64", + ".ZIP" + ], + "uniqueFileExtensions": [ + ".CRT", + ".D64", + ".D80", + ".D81", + ".G64", + ".PRG", + ".T64", + ".X64" + ] + }, + "retroPieDirectoryName": "c64", + "webEmulator": { + "type": "", + "core": "" + }, + "bios": [ + { + "hash": "1b1e985ea5325a1f46eb7fd9681707bf", + "description": "JiffyDOS 1541 drive BIOS", + "filename": "JiffyDOS_1541-II.bin" + }, + { + "hash": "41c6cc528e9515ffd0ed9b180f8467c0", + "description": "JiffyDOS 1571 drive BIOS", + "filename": "JiffyDOS_1571_repl310654.bin" + }, + { + "hash": "20b6885c6dc2d42c38754a365b043d71", + "description": "JiffyDOS 1581 drive BIOS", + "filename": "JiffyDOS_1581.bin" + }, + { + "hash": "be09394f0576cf81fa8bacf634daf9a2", + "description": "JiffyDOS C64 Kernal", + "filename": "JiffyDOS_C64.bin" + } + ] + }, + { + "igdbId": 33, + "igdbName": "Game Boy", + "igdbSlug": "gb", + "alternateNames": [ + "Game Boy", + "GB" + ], + "extensions": { + "supportedFileExtensions": [ + ".7Z", + ".GB", + ".ZIP" + ], + "uniqueFileExtensions": [ + ".GB" + ] + }, + "retroPieDirectoryName": "gb", + "webEmulator": { + "type": "EmulatorJS", + "core": "gb", + "availableWebEmulators": [ + { + "emulatorType": "EmulatorJS", + "availableWebEmulatorCores": [ + { + "core": "gb", + "alternateCoreName": "gambatte", + "default": true + }, + { + "core": "mgba" + } + ] + } + ] + }, + "bios": [ + { + "hash": "32fbbd84168d3482956eb3c5051637f5", + "description": "BIOS for Game Boy", + "filename": "gb_bios.bin" + }, + { + "hash": "d574d4f9c12f305074798f54c091a8b4", + "description": "Super Game Boy", + "filename": "sgb_bios.bin" + } + ] + }, + { + "igdbId": 24, + "igdbName": "Game Boy Advance", + "igdbSlug": "gba", + "alternateNames": [ + "Game Boy Advance", + "GBA" + ], + "extensions": { + "supportedFileExtensions": [ + ".7Z", + ".GBA", + ".ZIP" + ], + "uniqueFileExtensions": [ + ".GBA" + ] + }, + "retroPieDirectoryName": "gba", + "webEmulator": { + "type": "EmulatorJS", + "core": "gba", + "availableWebEmulators": [ + { + "emulatorType": "EmulatorJS", + "availableWebEmulatorCores": [ + { + "core": "gb", + "alternateCoreName": "mgba", + "default": true + } + ] + } + ] + }, + "bios": [ + { + "hash": "32FBBD84168D3482956EB3C5051637F5", + "description": "[BIOS] Nintendo Game Boy Boot ROM (World) (Rev 1).gb", + "filename": "gb_bios.bin" + }, + { + "hash": "a860e8c0b6d573d191e4ec7db1b1e4f6", + "description": "[BIOS] Game Boy Advance (World).gba", + "filename": "gba_bios.bin" + }, + { + "hash": "DBFCE9DB9DEAA2567F6A84FDE55F9680", + "description": "[BIOS] Nintendo Game Boy Color Boot ROM (World).gbc", + "filename": "gbc_bios.bin" + }, + { + "hash": "D574D4F9C12F305074798F54C091A8B4", + "description": "SGB-CPU (World) (Enhancement Chip).bin", + "filename": "sgb_bios.bin" + } + ] + }, + { + "igdbId": 22, + "igdbName": "Game Boy Color", + "igdbSlug": "gbc", + "alternateNames": [ + "Game Boy Color", + "GBC" + ], + "extensions": { + "supportedFileExtensions": [ + ".7Z", + ".GBC", + ".ZIP" + ], + "uniqueFileExtensions": [ + ".GBC" + ] + }, + "retroPieDirectoryName": "gbc", + "webEmulator": { + "type": "EmulatorJS", + "core": "gb", + "availableWebEmulators": [ + { + "emulatorType": "EmulatorJS", + "availableWebEmulatorCores": [ + { + "core": "gb", + "alternateCoreName": "gambatte", + "default": true + }, + { + "core": "mgba" + } + ] + } + ] + }, + "bios": [ + { + "hash": "dbfce9db9deaa2567f6a84fde55f9680", + "description": "BIOS for Game Boy Color", + "filename": "gbc_bios.bin" + }, + { + "hash": "d574d4f9c12f305074798f54c091a8b4", + "description": "Super Game Boy", + "filename": "sgb_bios.bin" + } + ] + }, + { + "igdbId": 4, + "igdbName": "Nintendo 64", + "igdbSlug": "n64", + "alternateNames": [ + "N64", + "Nintendo 64" + ], + "extensions": { + "supportedFileExtensions": [ + ".N64", + ".V64", + ".Z64", + ".ZIP" + ], + "uniqueFileExtensions": [ + ".N64", + ".V64", + ".Z64" + ] + }, + "retroPieDirectoryName": "n64", + "webEmulator": { + "type": "EmulatorJS", + "core": "n64", + "availableWebEmulators": [ + { + "emulatorType": "EmulatorJS", + "availableWebEmulatorCores": [ + { + "core": "n64", + "alternateCoreName": "mupen64plus_next", + "default": true + } + ] + } + ] + }, + "bios": [] + }, + { + "igdbId": 20, + "igdbName": "Nintendo DS", + "igdbSlug": "nds", + "alternateNames": [ + "NDS" + ], + "extensions": { + "supportedFileExtensions": [ + ".BIN", + ".NDS", + ".ZIP" + ], + "uniqueFileExtensions": [ + ".NDS" + ] + }, + "retroPieDirectoryName": "nds", + "webEmulator": { + "type": "EmulatorJS", + "core": "nds", + "availableWebEmulators": [ + { + "emulatorType": "EmulatorJS", + "availableWebEmulatorCores": [ + { + "core": "nds", + "alternateCoreName": "melonds", + "default": true + }, + { + "core": "desmume2015" + } + ] + } + ] + }, + "bios": [ + { + "hash": "df692a80a5b1bc90728bc3dfc76cd948", + "description": "ARM7 BIOS", + "filename": "bios7.bin" + }, + { + "hash": "a392174eb3e572fed6447e956bde4b25", + "description": "ARM9 BIOS", + "filename": "bios9.bin" + }, + { + "hash": "145eaef5bd3037cbc247c213bb3da1b3", + "description": "NDS Firmware", + "filename": "firmware.bin" + } + ] + }, + { + "igdbId": 18, + "igdbName": "Nintendo Entertainment System", + "igdbSlug": "nes", + "alternateNames": [ + "NES", + "Nintendo Entertainment System", + "Nintendo Famicom &amp; Entertainment System" + ], + "extensions": { + "supportedFileExtensions": [ + ".7Z", + ".FDS", + ".NES", + ".NEZ", + ".UNF", + ".UNIF", + ".ZIP" + ], + "uniqueFileExtensions": [ + ".FDS", + ".NES", + ".NEZ", + ".UNF", + ".UNIF" + ] + }, + "retroPieDirectoryName": "nes", + "webEmulator": { + "type": "EmulatorJS", + "core": "nes", + "availableWebEmulators": [ + { + "emulatorType": "EmulatorJS", + "availableWebEmulatorCores": [ + { + "core": "nes", + "alternateCoreName": "fceumm", + "default": true + }, + { + "core": "nestopia" + } + ] + } + ] + }, + "bios": [ + { + "hash": "ca30b50f880eb660a320674ed365ef7a", + "description": "Family Computer Disk System BIOS - Required for Famicom Disk System emulation", + "filename": "disksys.rom" + }, + { + "hash": "7f98d77d7a094ad7d069b74bd553ec98", + "description": "Game Genie add-on cartridge - Required for Game Genei Add-on emulation (Only supported on the fceumm core)", + "filename": "gamegenie.nes" + } + ] + }, + { + "igdbId": 21, + "igdbName": "Nintendo GameCube", + "igdbSlug": "ngc", + "alternateNames": [ + "GameCube", + "GC", + "GCN", + "ngc", + "Nintendo GameCube" + ], + "extensions": { + "supportedFileExtensions": [ + ".CISO", + ".GC", + ".GCM", + ".GCZ", + ".ISO", + ".RVZ" + ], + "uniqueFileExtensions": [ + ".CISO", + ".GC", + ".GCM", + ".GCZ", + ".RVZ" + ] + }, + "retroPieDirectoryName": "gc", + "webEmulator": { + "type": "", + "core": "" + }, + "bios": [] + }, + { + "igdbId": 7, + "igdbName": "PlayStation", + "igdbSlug": "ps", + "alternateNames": [ + "PlayStation", + "PS", + "PS1", + "PSOne", + "PSX", + "PSX, PSOne, PS", + "Sony PlayStation" + ], + "extensions": { + "supportedFileExtensions": [ + ".CCD", + ".CHD", + ".CUE", + ".EXE", + ".ISO", + ".M3U", + ".PBP", + ".TOC" + ], + "uniqueFileExtensions": [ + ".CCD", + ".EXE", + ".PBP", + ".TOC" + ] + }, + "retroPieDirectoryName": "psx", + "webEmulator": { + "type": "EmulatorJS", + "core": "psx", + "availableWebEmulators": [ + { + "emulatorType": "EmulatorJS", + "availableWebEmulatorCores": [ + { + "core": "psx", + "alternateCoreName": "pcsx_rearmed", + "default": true + }, + { + "core": "mednafen_psx" + } + ] + } + ] + }, + "bios": [ + { + "hash": "8dd7d5296a650fac7319bce665a6a53c", + "description": "PS1 JP BIOS - Required for JP games", + "filename": "scph5500.bin" + }, + { + "hash": "490f666e1afb15b7362b406ed1cea246", + "description": "PS1 US BIOS - Required for US games", + "filename": "scph5501.bin" + }, + { + "hash": "32736f17079d0b2b7024407c39bd3050", + "description": "PS1 EU BIOS - Required for EU games", + "filename": "scph5502.bin" + } + ] + }, + { + "igdbId": 30, + "igdbName": "Sega 32X", + "igdbSlug": "sega32", + "alternateNames": [ + "Sega 32X", + "Sega32", + "Sega32X" + ], + "extensions": { + "supportedFileExtensions": [ + ".32X", + ".7Z", + ".BIN", + ".MD", + ".ZIP" + ], + "uniqueFileExtensions": [ + ".32X" + ] + }, + "retroPieDirectoryName": "sega32x", + "webEmulator": { + "type": "EmulatorJS", + "core": "sega32x", + "availableWebEmulators": [ + { + "emulatorType": "EmulatorJS", + "availableWebEmulatorCores": [ + { + "core": "sega32x", + "alternateCoreName": "picodrive", + "default": true + } + ] + } + ] + }, + "bios": [] + }, + { + "igdbId": 78, + "igdbName": "Sega CD", + "igdbSlug": "segacd", + "alternateNames": [ + "Mega CD", + "Sega CD", + "Sega Mega-CD &amp; Sega CD", + "segacd" + ], + "extensions": { + "supportedFileExtensions": [ + ".BIN", + ".CHD", + ".CUE", + ".ISO", + ".M3U" + ], + "uniqueFileExtensions": [] + }, + "retroPieDirectoryName": "segacd", + "webEmulator": { + "type": "EmulatorJS", + "core": "segaCD", + "availableWebEmulators": [ + { + "emulatorType": "EmulatorJS", + "availableWebEmulatorCores": [ + { + "core": "segaCD", + "alternateCoreName": "genesis_plus_gx", + "default": true + }, + { + "core": "picodrive" + } + ] + } + ] + }, + "bios": [ + { + "hash": "e66fa1dc5820d254611fdcdba0662372", + "description": "MegaCD EU BIOS - Required", + "filename": "bios_CD_E.bin" + }, + { + "hash": "278a9397d192149e84e820ac621a8edd", + "description": "MegaCD JP BIOS - Required", + "filename": "bios_CD_J.bin" + }, + { + "hash": "2efd74e3232ff260e371b99f84024f7f", + "description": "SegaCD US BIOS - Required", + "filename": "bios_CD_U.bin" + } + ] + }, + { + "igdbId": 35, + "igdbName": "Sega Game Gear", + "igdbSlug": "gamegear", + "alternateNames": [ + "Game Gear", + "gamegear", + "GG", + "Sega Game Gear" + ], + "extensions": { + "supportedFileExtensions": [ + ".7Z", + ".BIN", + ".GG", + ".ZIP" + ], + "uniqueFileExtensions": [ + ".GG" + ] + }, + "retroPieDirectoryName": "gamegear", + "webEmulator": { + "type": "EmulatorJS", + "core": "segaGG", + "availableWebEmulators": [ + { + "emulatorType": "EmulatorJS", + "availableWebEmulatorCores": [ + { + "core": "segaGG", + "alternateCoreName": "genesis_plus_gx", + "default": true + } + ] + } + ] + }, + "bios": [ + { + "hash": "672e104c3be3a238301aceffc3b23fd6", + "description": "GameGear BIOS (bootrom) - Optional", + "filename": "bios.gg" + } + ] + }, + { + "igdbId": 64, + "igdbName": "Sega Master System/Mark III", + "igdbSlug": "sms", + "alternateNames": [ + "Sega Mark III &amp; Master System", + "Sega Master System", + "Sega Master System/Mark III", + "sms", + "SMS, Mark III" + ], + "extensions": { + "supportedFileExtensions": [ + ".7Z", + ".BIN", + ".SMS", + ".ZIP" + ], + "uniqueFileExtensions": [ + ".SMS" + ] + }, + "retroPieDirectoryName": "mastersystem", + "webEmulator": { + "type": "EmulatorJS", + "core": "segaMS", + "availableWebEmulators": [ + { + "emulatorType": "EmulatorJS", + "availableWebEmulatorCores": [ + { + "core": "segaMS", + "alternateCoreName": "genesis_plus_gx", + "default": true + } + ] + } + ] + }, + "bios": [ + { + "hash": "840481177270d5642a14ca71ee72844c", + "description": "MasterSystem EU BIOS", + "filename": "bios_E.sms" + }, + { + "hash": "24a519c53f67b00640d0048ef7089105", + "description": "MasterSystem JP BIOS", + "filename": "bios_J.sms" + }, + { + "hash": "840481177270d5642a14ca71ee72844c", + "description": "MasterSystem US BIOS", + "filename": "bios_U.sms" + } + ] + }, + { + "igdbId": 29, + "igdbName": "Sega Mega Drive/Genesis", + "igdbSlug": "genesis-slash-megadrive", + "alternateNames": [ + "genesis-slash-megadrive", + "Sega Genesis", + "Sega Mega Drive", + "Sega Mega Drive & Genesis", + "Sega Mega Drive/Genesis" + ], + "extensions": { + "supportedFileExtensions": [ + ".7Z", + ".BIN", + ".GEN", + ".MD", + ".SG", + ".SMD", + ".ZIP" + ], + "uniqueFileExtensions": [ + ".GEN", + ".SG" + ] + }, + "retroPieDirectoryName": "megadrive", + "webEmulator": { + "type": "EmulatorJS", + "core": "segaMD", + "availableWebEmulators": [ + { + "emulatorType": "EmulatorJS", + "availableWebEmulatorCores": [ + { + "core": "segaMD", + "alternateCoreName": "genesis_plus_gx", + "default": true + }, + { + "core": "picodrive" + } + ] + } + ] + }, + "bios": [ + { + "hash": "45e298905a08f9cfb38fd504cd6dbc84", + "description": "MegaDrive TMSS startup ROM", + "filename": "bios_MD.bin" + } + ] + }, + { + "igdbId": 32, + "igdbName": "Sega Saturn", + "igdbSlug": "saturn", + "alternateNames": [ + "Hi-Saturn", + "JVC Saturn", + "JVC Saturn, Hi-Saturn, Samsung Saturn, V-Saturn", + "Samsung Saturn", + "Saturn", + "Sega Saturn", + "V-Saturn" + ], + "extensions": { + "supportedFileExtensions": [ + ".BIN", + ".CUE", + ".ISO", + ".MDF" + ], + "uniqueFileExtensions": [ + ".MDF" + ] + }, + "retroPieDirectoryName": "saturn", + "webEmulator": { + "type": "EmulatorJS", + "core": "segaSaturn", + "availableWebEmulators": [ + { + "emulatorType": "EmulatorJS", + "availableWebEmulatorCores": [ + { + "core": "segaSaturn", + "alternateCoreName": "yabause", + "default": true + }, + { + "core": "mgba" + } + ] + } + ] + }, + "bios": [ + { + "hash": "af5828fdff51384f99b3c4926be27762", + "description": "Saturn BIOS", + "filename": "saturn_bios.bin" + } + ] + }, + { + "igdbId": 19, + "igdbName": "Super Nintendo Entertainment System", + "igdbSlug": "snes", + "alternateNames": [ + "Nintendo Super Famicom &amp; Super Entertainment System", + "SNES", + "SNES, Super Nintendo", + "Super Nintendo", + "Super Nintendo Entertainment System" + ], + "extensions": { + "supportedFileExtensions": [ + ".7Z", + ".BIN", + ".BS", + ".FIG", + ".MGD", + ".SFC", + ".SMC", + ".SWC", + ".ZIP" + ], + "uniqueFileExtensions": [ + ".BS", + ".FIG", + ".MGD", + ".SFC", + ".SMC", + ".SWC" + ] + }, + "retroPieDirectoryName": "snes", + "webEmulator": { + "type": "EmulatorJS", + "core": "snes", + "availableWebEmulators": [ + { + "emulatorType": "EmulatorJS", + "availableWebEmulatorCores": [ + { + "core": "snes", + "alternateCoreName": "snes9x", + "default": true + } + ] + } + ] + }, + "bios": [] + }, + { + "igdbId": 87, + "igdbName": "Virtual Boy", + "igdbSlug": "virtualboy", + "alternateNames": [ + "VB" + ], + "extensions": { + "supportedFileExtensions": [ + ".7Z", + ".VB", + ".ZIP" + ], + "uniqueFileExtensions": [ + ".VB" + ] + }, + "retroPieDirectoryName": "vb", + "webEmulator": { + "type": "EmulatorJS", + "core": "vb", + "availableWebEmulators": [ + { + "emulatorType": "EmulatorJS", + "availableWebEmulatorCores": [ + { + "core": "vb", + "alternateCoreName": "beetle_vb", + "default": true + } + ] + } + ] + }, + "bios": [] + }, + { + "igdbId": 26, + "igdbName": "ZX Spectrum", + "igdbSlug": "zxs", + "alternateNames": [ + "Sinclair ZX", + "Sinclair ZX Spectrum", + "ZX Spectrum", + "zxs" + ], + "extensions": { + "supportedFileExtensions": [ + ".DSK", + ".GZ", + ".IMG", + ".MGT", + ".SCL", + ".SNA", + ".SZX", + ".TAP", + ".TRD", + ".TZX", + ".UDI", + ".Z80" + ], + "uniqueFileExtensions": [ + ".MGT", + ".SCL", + ".SNA", + ".SZX", + ".TRD", + ".TZX", + ".UDI", + ".Z80" + ] + }, + "retroPieDirectoryName": "zxspectrum", + "webEmulator": { + "type": "", + "core": "" + }, + "bios": [] + } +] \ No newline at end of file diff --git a/gaseous-server/wwwroot/pages/dialogs/platformmapedit.html b/gaseous-server/wwwroot/pages/dialogs/platformmapedit.html index a4153ee..73c5a54 100644 --- a/gaseous-server/wwwroot/pages/dialogs/platformmapedit.html +++ b/gaseous-server/wwwroot/pages/dialogs/platformmapedit.html @@ -59,8 +59,7 @@ @@ -68,8 +67,10 @@

Core

- - + + @@ -99,6 +100,10 @@ modalContent[0].classList.add('collections_modal'); } + var availableWebEmulators = []; + + DisplayWebEmulatorContent(false); + ajaxCall( '/api/v1/PlatformMaps/' + modalVariables, 'GET', @@ -133,18 +138,47 @@ document.getElementById('mapping_edit_igdbslug').value = result.igdbSlug; document.getElementById('mapping_edit_retropie').value = result.retroPieDirectoryName; + // set up web emulator drop downs $('#mapping_edit_webemulatorengine').select2(); - if (result.webEmulator.type.length > 0) { - document.getElementById('mapping_edit_enablewebemulator').checked = true; - $('#mapping_edit_webemulatorengine').val(result.webEmulator.type); - DisplayWebEmulatorHelp(result.webEmulator.type); - $('#mapping_edit_webemulatorengine').trigger('change'); - document.getElementById('mapping_edit_webemulatorcore').value = result.webEmulator.core; + $('#mapping_edit_webemulatorcore').select2(); - DisplayWebEmulatorContent(true); + // start populating drop downs + if (result.webEmulator) { + if (result.webEmulator.availableWebEmulators.length > 0) { + availableWebEmulators = result.webEmulator.availableWebEmulators; + + var offOption = new Option("-", "", false, false); + $('#mapping_edit_webemulatorengine').append(offOption).trigger('change'); + for (var e = 0; e < result.webEmulator.availableWebEmulators.length; e++) { + var newOption = new Option(result.webEmulator.availableWebEmulators[e].emulatorType, result.webEmulator.availableWebEmulators[e].emulatorType, false, false); + $('#mapping_edit_webemulatorengine').append(newOption).trigger('change'); + } + $('#mapping_edit_webemulatorengine').val(result.webEmulator.type); + $('#mapping_edit_webemulatorengine').trigger('change'); + + // select cores + RenderWebEmulatorCores(result.webEmulator.core); + + if (result.webEmulator.type.length > 0) { + document.getElementById('mapping_edit_enablewebemulator').checked = true; + } + + DisplayWebEmulatorHelp(result.webEmulator.type); + + $('#mapping_edit_webemulatorengine').on('change', function(e) { + RenderWebEmulatorCores(); + }); + if (result.webEmulator.type.length > 0) { + DisplayWebEmulatorContent(true); + } else { + DisplayWebEmulatorContent(false); + } + } else { + // no emulators available + DisplayWebEmulatorContent(false); + } } else { - document.getElementById('mapping_edit_enablewebemulator').checked = false; - + // no emulators available DisplayWebEmulatorContent(false); } @@ -173,6 +207,55 @@ } ); + function RenderWebEmulatorCores(preSelectCore) { + var selectedEngine = document.getElementById('mapping_edit_webemulatorengine').value; + console.log("Engine: " + selectedEngine); + console.log("Preselect: " + preSelectCore); + console.log(JSON.stringify(availableWebEmulators)); + $('#mapping_edit_webemulatorcore').empty().trigger("change"); + + // get cores for currently selected emulator + if (availableWebEmulators && (selectedEngine != undefined && selectedEngine != "")) { + if (availableWebEmulators.length > 0) { + var emuFound = false; + for (var e = 0; e < availableWebEmulators.length; e++) { + if (availableWebEmulators[e].emulatorType == selectedEngine) { + emuFound = true; + for (var c = 0; c < availableWebEmulators[e].availableWebEmulatorCores.length; c++) { + var coreName = availableWebEmulators[e].availableWebEmulatorCores[c].core; + if (availableWebEmulators[e].availableWebEmulatorCores[c].alternateCoreName) { + coreName += " (Maps to core: " + availableWebEmulators[e].availableWebEmulatorCores[c].alternateCoreName + ")"; + } + if (availableWebEmulators[e].availableWebEmulatorCores[c].default == true) { + coreName += " (Default)"; + } + console.log(coreName); + + var newOption; + if (availableWebEmulators[e].availableWebEmulatorCores[c].core == preSelectCore) { + newOption = new Option(coreName, availableWebEmulators[e].availableWebEmulatorCores[c].core, true, true); + } else { + newOption = new Option(coreName, availableWebEmulators[e].availableWebEmulatorCores[c].core, false, false); + } + $('#mapping_edit_webemulatorcore').append(newOption).trigger('change'); + } + } + } + + if (emuFound == false) { + var newOption = new Option("-", "", true, true); + $('#mapping_edit_webemulatorcore').append(newOption).trigger('change'); + } + } else { + var newOption = new Option("-", "", true, true); + $('#mapping_edit_webemulatorcore').append(newOption).trigger('change'); + } + } else { + var newOption = new Option("-", "", true, true); + $('#mapping_edit_webemulatorcore').append(newOption).trigger('change'); + } + } + function AddTokensFromList(selectObj, tagList) { for (var i = 0; i < tagList.length; i++) { var data = { @@ -291,6 +374,7 @@ }); function DisplayWebEmulatorContent(showContent) { + console.log(showContent); var webEmulatorRows = document.getElementsByName('mapping_edit_webemulator'); for (var i = 0; i < webEmulatorRows.length; i++) { diff --git a/gaseous-server/wwwroot/pages/game.html b/gaseous-server/wwwroot/pages/game.html index 9edcbda..1302f51 100644 --- a/gaseous-server/wwwroot/pages/game.html +++ b/gaseous-server/wwwroot/pages/game.html @@ -375,7 +375,11 @@ var launchButton = ''; if (result[i].emulator) { - launchButton = 'Launch'; + if (result[i].emulator.type) { + if (result[i].emulator.type.length > 0) { + launchButton = 'Launch'; + } + } } var newRow = [ diff --git a/gaseous-tools/Database/MySQL/gaseous-1003.sql b/gaseous-tools/Database/MySQL/gaseous-1003.sql new file mode 100644 index 0000000..5892083 --- /dev/null +++ b/gaseous-tools/Database/MySQL/gaseous-1003.sql @@ -0,0 +1,2 @@ +ALTER TABLE `PlatformMap` +ADD COLUMN `AvailableWebEmulators` JSON NULL; \ No newline at end of file diff --git a/gaseous-tools/Logging.cs b/gaseous-tools/Logging.cs index dca94f0..849d113 100644 --- a/gaseous-tools/Logging.cs +++ b/gaseous-tools/Logging.cs @@ -8,6 +8,8 @@ namespace gaseous_tools { public class Logging { + public static bool WriteToDiskOnly { get; set; } = false; + static public void Log(LogType EventType, string ServerProcess, string Message, Exception? ExceptionValue = null, bool LogToDiskOnly = false) { LogItem logItem = new LogItem @@ -61,6 +63,11 @@ namespace gaseous_tools Console.WriteLine(TraceOutput); Console.ResetColor(); + if (WriteToDiskOnly == true) + { + LogToDiskOnly = true; + } + if (LogToDiskOnly == false) { Database db = new gaseous_tools.Database(Database.databaseType.MySql, Config.DatabaseConfiguration.ConnectionString); diff --git a/gaseous-tools/gaseous-tools.csproj b/gaseous-tools/gaseous-tools.csproj index c1d4f33..7c6a2e7 100644 --- a/gaseous-tools/gaseous-tools.csproj +++ b/gaseous-tools/gaseous-tools.csproj @@ -18,6 +18,7 @@ + @@ -27,5 +28,6 @@ +