diff --git a/.github/workflows/BuildDockerOnTag-Prerelease.yml b/.github/workflows/BuildDockerOnTag-Prerelease.yml index 187037d..9c1ba62 100644 --- a/.github/workflows/BuildDockerOnTag-Prerelease.yml +++ b/.github/workflows/BuildDockerOnTag-Prerelease.yml @@ -33,6 +33,6 @@ jobs: uses: docker/build-push-action@v4 with: context: . - platforms: linux/amd64 #,linux/arm64 + platforms: linux/amd64,linux/arm64 push: true tags: gaseousgames/gaseousserver:${{ github.ref_name}} diff --git a/.github/workflows/BuildDockerOnTag-Release.yml b/.github/workflows/BuildDockerOnTag-Release.yml index 169a2b1..ffd41e2 100644 --- a/.github/workflows/BuildDockerOnTag-Release.yml +++ b/.github/workflows/BuildDockerOnTag-Release.yml @@ -32,6 +32,6 @@ jobs: uses: docker/build-push-action@v4 with: context: . - platforms: linux/amd64 #,linux/arm64 + platforms: linux/amd64,linux/arm64 push: true tags: gaseousgames/gaseousserver:latest,gaseousgames/gaseousserver:${{ github.ref_name}} diff --git a/Dockerfile b/Dockerfile index 097ec62..8cd2ecc 100644 --- a/Dockerfile +++ b/Dockerfile @@ -17,8 +17,8 @@ RUN dotnet publish "gaseous-server/gaseous-server.csproj" --use-current-runtime # download and unzip EmulatorJS from CDN RUN apt-get update && apt-get install -y p7zip-full RUN mkdir -p out/wwwroot/emulators/EmulatorJS -RUN wget https://cdn.emulatorjs.org/releases/4.0.9.7z -RUN 7z x -y -oout/wwwroot/emulators/EmulatorJS 4.0.9.7z +RUN wget https://cdn.emulatorjs.org/releases/4.0.10.7z +RUN 7z x -y -oout/wwwroot/emulators/EmulatorJS 4.0.10.7z # Build runtime image FROM mcr.microsoft.com/dotnet/aspnet:8.0 diff --git a/gaseous-server/Models/PlatformMapping.cs b/gaseous-server/Models/PlatformMapping.cs index 10732c2..88eea1f 100644 --- a/gaseous-server/Models/PlatformMapping.cs +++ b/gaseous-server/Models/PlatformMapping.cs @@ -42,6 +42,7 @@ namespace gaseous_server.Models // exists if (ResetToDefault == false) { + WriteAvailableEmulators(mapItem); Logging.Log(Logging.LogType.Information, "Platform Map", "Skipping import of " + mapItem.IGDBName + " - already in database."); } else @@ -253,6 +254,30 @@ namespace gaseous_server.Models } } + public static void WriteAvailableEmulators (PlatformMapItem item) + { + Database db = new Database(Database.databaseType.MySql, Config.DatabaseConfiguration.ConnectionString); + string sql = ""; + Dictionary dbDict = new Dictionary(); + sql = "UPDATE PlatformMap SET RetroPieDirectoryName=@RetroPieDirectoryName, WebEmulator_Type=@WebEmulator_Type, WebEmulator_Core=@WebEmulator_Core, AvailableWebEmulators=@AvailableWebEmulators WHERE Id = @Id; "; + + dbDict.Add("Id", item.IGDBId); + dbDict.Add("RetroPieDirectoryName", item.RetroPieDirectoryName); + if (item.WebEmulator != null) + { + 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); + } + static PlatformMapItem BuildPlatformMapItem(DataRow row) { long IGDBId = (long)row["Id"]; diff --git a/gaseous-server/Support/PlatformMap.json b/gaseous-server/Support/PlatformMap.json index 1e778f4..c5bda53 100644 --- a/gaseous-server/Support/PlatformMap.json +++ b/gaseous-server/Support/PlatformMap.json @@ -352,6 +352,9 @@ }, { "core": "fbalpha2012_cps2" + }, + { + "core": "mame" } ] } @@ -717,8 +720,11 @@ "availableWebEmulatorCores": [ { "core": "c64", - "alternateCoreName": "vice_x64", + "alternateCoreName": "vice_x64sc", "default": true + }, + { + "core": "vice_x64" } ] } @@ -747,6 +753,169 @@ } ] }, + { + "igdbId": 90, + "igdbName": "Commodore PET", + "igdbSlug": "cpet", + "alternateNames": [ + "cpet", + "PET", + "Commodore PET" + ], + "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": "EmulatorJS", + "core": "vice_xpet", + "availableWebEmulators": [ + { + "emulatorType": "EmulatorJS", + "availableWebEmulatorCores": [ + { + "core": "pet", + "alternateCoreName": "vice_xpet", + "default": true + } + ] + } + ] + }, + "bios": [ + ] + }, + { + "igdbId": 94, + "igdbName": "Commodore Plus/4", + "igdbSlug": "c-plus-4", + "alternateNames": [ + "C+4", + "c-plus-4", + "Plus/4", + "Commodore Plus/4" + ], + "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": "EmulatorJS", + "core": "vice_xplus4", + "availableWebEmulators": [ + { + "emulatorType": "EmulatorJS", + "availableWebEmulatorCores": [ + { + "core": "plus4", + "alternateCoreName": "vice_xplus4", + "default": true + } + ] + } + ] + }, + "bios": [ + ] + }, + { + "igdbId": 71, + "igdbName": "Commodore VIC-20", + "igdbSlug": "vic-20", + "alternateNames": [ + "VIC20", + "VIC-20", + "Commodore VIC-20" + ], + "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": "EmulatorJS", + "core": "vice_xvic", + "availableWebEmulators": [ + { + "emulatorType": "EmulatorJS", + "availableWebEmulatorCores": [ + { + "core": "vic20", + "alternateCoreName": "vice_xvic", + "default": true + } + ] + } + ] + }, + "bios": [ + ] + }, { "igdbId": 158, "igdbName": "Commodore CDTV", @@ -1428,8 +1597,11 @@ "availableWebEmulatorCores": [ { "core": "segaMS", - "alternateCoreName": "genesis_plus_gx", + "alternateCoreName": "picodrive", "default": true + }, + { + "core": "genesis_plus_gx" } ] } diff --git a/gaseous-server/Timer.cs b/gaseous-server/Timer.cs index fd91807..067a83e 100644 --- a/gaseous-server/Timer.cs +++ b/gaseous-server/Timer.cs @@ -20,7 +20,7 @@ namespace gaseous_server //_logger.LogInformation("Timed Hosted Service running."); Logging.Log(Logging.LogType.Debug, "Background", "Starting background task monitor"); - _timer = new Timer(DoWork, null, TimeSpan.FromSeconds(30), + _timer = new Timer(DoWork, null, TimeSpan.FromSeconds(10), TimeSpan.FromSeconds(30)); return Task.CompletedTask;