mirror of
https://github.com/SabreTools/SabreTools.RedumpLib.git
synced 2026-11-15 17:01:37 +00:00
Remove obsolete BIOS systems
This commit is contained in:
@@ -1205,14 +1205,6 @@ namespace SabreTools.RedumpLib.Test.Data
|
||||
/// </summary>
|
||||
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
|
||||
/// </summary>
|
||||
private static readonly Dictionary<PhysicalSystem, SystemCategory> _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
|
||||
/// </summary>
|
||||
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,
|
||||
|
||||
@@ -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()
|
||||
{
|
||||
|
||||
@@ -675,18 +675,6 @@ namespace SabreTools.RedumpLib.Data
|
||||
/// <returns>True if Windows show see a disc when dumping, false otherwise</returns>
|
||||
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;
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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)
|
||||
{
|
||||
|
||||
@@ -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)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user