From 034f44e0cb4c8e3c34ff7ea9f86a887fc82b76a6 Mon Sep 17 00:00:00 2001 From: Matt Nadareski Date: Fri, 16 Oct 2026 19:39:09 -0400 Subject: [PATCH] Remove obsolete BIOS systems --- .../Data/ExtensionsTests.cs | 24 ---------- .../Endpoints/DownloadsTests.cs | 42 ------------------ SabreTools.RedumpLib/Data/Extensions.cs | 12 ----- SabreTools.RedumpLib/Data/PhysicalSystem.cs | 44 ------------------- SabreTools.RedumpLib/Endpoints/Downloads.cs | 24 ---------- SabreTools.RedumpLib/Web/Packs.cs | 5 +-- 6 files changed, 2 insertions(+), 149 deletions(-) diff --git a/SabreTools.RedumpLib.Test/Data/ExtensionsTests.cs b/SabreTools.RedumpLib.Test/Data/ExtensionsTests.cs index dcacf58..a2972ff 100644 --- a/SabreTools.RedumpLib.Test/Data/ExtensionsTests.cs +++ b/SabreTools.RedumpLib.Test/Data/ExtensionsTests.cs @@ -1205,14 +1205,6 @@ namespace SabreTools.RedumpLib.Test.Data /// private static readonly PhysicalSystem?[] _availableSystems = [ - // BIOS Sets -#pragma warning disable CS0618 // Type or member is obsolete - PhysicalSystem.MicrosoftXboxBIOS, - PhysicalSystem.NintendoGameCubeBIOS, - PhysicalSystem.SonyPlayStationBIOS, - PhysicalSystem.SonyPlayStation2BIOS, -#pragma warning restore CS0618 // Type or member is obsolete - // Disc-Based Consoles PhysicalSystem.AtariJaguarCDInteractiveMultimediaSystem, PhysicalSystem.BandaiPlaydiaQuickInteractiveSystem, @@ -1347,14 +1339,6 @@ namespace SabreTools.RedumpLib.Test.Data /// private static readonly Dictionary _systemCategoryMap = new() { - // BIOS -#pragma warning disable CS0618 // Type or member is obsolete - [PhysicalSystem.MicrosoftXboxBIOS] = SystemCategory.NONE, - [PhysicalSystem.NintendoGameCubeBIOS] = SystemCategory.NONE, - [PhysicalSystem.SonyPlayStationBIOS] = SystemCategory.NONE, - [PhysicalSystem.SonyPlayStation2BIOS] = SystemCategory.NONE, -#pragma warning restore CS0618 // Type or member is obsolete - // Disc-Based Consoles [PhysicalSystem.AppleBandaiPippin] = SystemCategory.DiscBasedConsole, [PhysicalSystem.AtariJaguarCDInteractiveMultimediaSystem] = SystemCategory.DiscBasedConsole, @@ -1625,14 +1609,6 @@ namespace SabreTools.RedumpLib.Test.Data /// private static readonly PhysicalSystem?[] _systemsWithDats = [ - // BIOS Sets -#pragma warning disable CS0618 // Type or member is obsolete - PhysicalSystem.MicrosoftXboxBIOS, - PhysicalSystem.NintendoGameCubeBIOS, - PhysicalSystem.SonyPlayStationBIOS, - PhysicalSystem.SonyPlayStation2BIOS, -#pragma warning restore CS0618 // Type or member is obsolete - // Disc-Based Consoles PhysicalSystem.AppleBandaiPippin, PhysicalSystem.AtariJaguarCDInteractiveMultimediaSystem, diff --git a/SabreTools.RedumpLib.Test/Endpoints/DownloadsTests.cs b/SabreTools.RedumpLib.Test/Endpoints/DownloadsTests.cs index 8cde180..fac37cd 100644 --- a/SabreTools.RedumpLib.Test/Endpoints/DownloadsTests.cs +++ b/SabreTools.RedumpLib.Test/Endpoints/DownloadsTests.cs @@ -70,48 +70,6 @@ namespace SabreTools.RedumpLib.Test.Endpoints Assert.Equal(expected, actual); } - [Fact] - public void BuildUrl_BIOSDatfile_Old() - { - var endpoint = new RedumpLib.Endpoints.Downloads { Pack = PackType.Datfile }; - - // Microsoft Xbox -#pragma warning disable CS0618 // Type or member is obsolete - endpoint.System = PhysicalSystem.MicrosoftXboxBIOS; -#pragma warning restore CS0618 // Type or member is obsolete - string expected = "https://redump.info/bios/XBOX"; - - string actual = endpoint.BuildUrl(); - Assert.Equal(expected, actual); - - // Nintendo GameCube -#pragma warning disable CS0618 // Type or member is obsolete - endpoint.System = PhysicalSystem.NintendoGameCubeBIOS; -#pragma warning restore CS0618 // Type or member is obsolete - expected = "https://redump.info/bios/GC"; - - actual = endpoint.BuildUrl(); - Assert.Equal(expected, actual); - - // Sony PlayStation -#pragma warning disable CS0618 // Type or member is obsolete - endpoint.System = PhysicalSystem.SonyPlayStationBIOS; -#pragma warning restore CS0618 // Type or member is obsolete - expected = "https://redump.info/bios/PSX"; - - actual = endpoint.BuildUrl(); - Assert.Equal(expected, actual); - - // Sony PlayStation 2 -#pragma warning disable CS0618 // Type or member is obsolete - endpoint.System = PhysicalSystem.SonyPlayStation2BIOS; -#pragma warning restore CS0618 // Type or member is obsolete - expected = "https://redump.info/bios/PS2"; - - actual = endpoint.BuildUrl(); - Assert.Equal(expected, actual); - } - [Fact] public void BuildUrl_InvalidPackType_Throws() { diff --git a/SabreTools.RedumpLib/Data/Extensions.cs b/SabreTools.RedumpLib/Data/Extensions.cs index 4a0450c..e5a1f9d 100644 --- a/SabreTools.RedumpLib/Data/Extensions.cs +++ b/SabreTools.RedumpLib/Data/Extensions.cs @@ -675,18 +675,6 @@ namespace SabreTools.RedumpLib.Data /// True if Windows show see a disc when dumping, false otherwise public static bool DetectedByWindows(this PhysicalSystem? system) { - // BIOS Sets -#pragma warning disable CS0618 // Type or member is obsolete - if (system == PhysicalSystem.MicrosoftXboxBIOS) - return false; - else if (system == PhysicalSystem.NintendoGameCubeBIOS) - return false; - else if (system == PhysicalSystem.SonyPlayStationBIOS) - return false; - else if (system == PhysicalSystem.SonyPlayStation2BIOS) - return false; -#pragma warning restore CS0618 // Type or member is obsolete - // Disc-Based Consoles if (system == PhysicalSystem.AppleBandaiPippin) return false; diff --git a/SabreTools.RedumpLib/Data/PhysicalSystem.cs b/SabreTools.RedumpLib/Data/PhysicalSystem.cs index 650289a..70fb768 100644 --- a/SabreTools.RedumpLib/Data/PhysicalSystem.cs +++ b/SabreTools.RedumpLib/Data/PhysicalSystem.cs @@ -1,4 +1,3 @@ -using System; using System.Collections.Generic; namespace SabreTools.RedumpLib.Data @@ -97,38 +96,6 @@ namespace SabreTools.RedumpLib.Data #region Static Instances - #region BIOS Sets - - [Obsolete("PhysicalSystem.MicrosoftXbox should be used instead")] - public static readonly PhysicalSystem MicrosoftXboxBIOS = new("Microsoft Xbox (BIOS)", - SystemCategory.NONE, - code: "xbox-bios", - hasDat: true, - hasBios: true); - - [Obsolete("PhysicalSystem.NintendoGameCube should be used instead")] - public static readonly PhysicalSystem NintendoGameCubeBIOS = new("Nintendo GameCube (BIOS)", - SystemCategory.NONE, - code: "gc-bios", - hasDat: true, - hasBios: true); - - [Obsolete("PhysicalSystem.SonyPlayStation should be used instead")] - public static readonly PhysicalSystem SonyPlayStationBIOS = new("Sony PlayStation (BIOS)", - SystemCategory.NONE, - code: "psx-bios", - hasDat: true, - hasBios: true); - - [Obsolete("PhysicalSystem.SonyPlayStation2 should be used instead")] - public static readonly PhysicalSystem SonyPlayStation2BIOS = new("Sony PlayStation 2 (BIOS)", - SystemCategory.NONE, - code: "ps2-bios", - hasDat: true, - hasBios: true); - - #endregion - #region Disc-Based Consoles // https://en.wikipedia.org/wiki/Apple_Bandai_Pippin @@ -1588,17 +1555,6 @@ namespace SabreTools.RedumpLib.Data /// TODO: Figure out how to remove delimiters public static readonly PhysicalSystem[] AllSystems = [ - #region BIOS Sets - -#pragma warning disable CS0618 // Type or member is obsolete - MicrosoftXboxBIOS, - NintendoGameCubeBIOS, - SonyPlayStationBIOS, - SonyPlayStation2BIOS, -#pragma warning restore CS0618 // Type or member is obsolete - - #endregion - #region Disc-Based Consoles AppleBandaiPippin, diff --git a/SabreTools.RedumpLib/Endpoints/Downloads.cs b/SabreTools.RedumpLib/Endpoints/Downloads.cs index 1b4cc60..4a1f2e0 100644 --- a/SabreTools.RedumpLib/Endpoints/Downloads.cs +++ b/SabreTools.RedumpLib/Endpoints/Downloads.cs @@ -35,30 +35,6 @@ namespace SabreTools.RedumpLib.Endpoints var pack = Pack; var system = System; - // HACK: Normalize old BIOS systems -#pragma warning disable CS0618 // Type or member is obsolete - if (Pack == PackType.Datfile && System == PhysicalSystem.MicrosoftXboxBIOS) - { - pack = PackType.BiosDatfile; - system = PhysicalSystem.MicrosoftXbox; - } - else if (Pack == PackType.Datfile && System == PhysicalSystem.NintendoGameCubeBIOS) - { - pack = PackType.BiosDatfile; - system = PhysicalSystem.NintendoGameCube; - } - else if (Pack == PackType.Datfile && System == PhysicalSystem.SonyPlayStationBIOS) - { - pack = PackType.BiosDatfile; - system = PhysicalSystem.SonyPlayStation; - } - else if (Pack == PackType.Datfile && System == PhysicalSystem.SonyPlayStation2BIOS) - { - pack = PackType.BiosDatfile; - system = PhysicalSystem.SonyPlayStation2; - } -#pragma warning restore CS0618 // Type or member is obsolete - string systemName = system?.Code ?? string.Empty; switch (pack) { diff --git a/SabreTools.RedumpLib/Web/Packs.cs b/SabreTools.RedumpLib/Web/Packs.cs index ecb7ccf..60ae4c9 100644 --- a/SabreTools.RedumpLib/Web/Packs.cs +++ b/SabreTools.RedumpLib/Web/Packs.cs @@ -74,9 +74,8 @@ namespace SabreTools.RedumpLib.Web Console.WriteLine("Downloading SBIs"); _ = await client.DownloadPacks(PackType.Sbis, systems, outDir, useSubfolders ? "sbi" : null); - // TODO: Enable when old BIOS systems are removed - // Console.WriteLine("Downloading BIOS DATs"); - // _ = await client.DownloadPacks(PackType.BiosDatfile, systems, outDir, useSubfolders ? "bios" : null); + Console.WriteLine("Downloading BIOS DATs"); + _ = await client.DownloadPacks(PackType.BiosDatfile, systems, outDir, useSubfolders ? "bios" : null); if (includeDatabase) {