diff --git a/src/BizHawk.Client.Common/Api/BizHawkSystemIdToCoreSystemEnumConverter.cs b/src/BizHawk.Client.Common/Api/BizHawkSystemIdToCoreSystemEnumConverter.cs deleted file mode 100644 index 4776ff0de6c..00000000000 --- a/src/BizHawk.Client.Common/Api/BizHawkSystemIdToCoreSystemEnumConverter.cs +++ /dev/null @@ -1,150 +0,0 @@ -using System; -using System.Globalization; - -using BizHawk.Emulation.Common; - -namespace BizHawk.Client.Common -{ - /// - /// This class holds a converter for BizHawk SystemId (which is a simple - /// It allows you to convert it to a value and vice versa - /// - /// I made it this way just in case one day we need it for WPF (DependencyProperty binding). Just uncomment :IValueConverter implementation - /// I didn't implemented it because of mono compatibility - /// - public sealed class BizHawkSystemIdToEnumConverter //:IValueConverter - { - /// - /// Convert BizHawk SystemId to value - /// - /// you want to convert - /// The type of the binding target property - /// The converter parameter to use; null in our case - /// The culture to use in the converter - /// A that is equivalent to BizHawk SystemId - /// Thrown when SystemId hasn't been found - public object Convert(object value, Type targetType, object parameter, CultureInfo cultureInfo) - { - return (string) value switch - { - VSystemID.Raw.AppleII => CoreSystem.AppleII, - VSystemID.Raw.A26 => CoreSystem.Atari2600, - VSystemID.Raw.A78 => CoreSystem.Atari7800, - VSystemID.Raw.Arcade => CoreSystem.Arcade, - VSystemID.Raw.Coleco => CoreSystem.ColecoVision, - VSystemID.Raw.C64 => CoreSystem.Commodore64, - VSystemID.Raw.GBL => CoreSystem.GameBoyLink, - VSystemID.Raw.GB => CoreSystem.GameBoy, - VSystemID.Raw.GBA => CoreSystem.GameBoyAdvance, - VSystemID.Raw.GEN => CoreSystem.Genesis, - VSystemID.Raw.INTV => CoreSystem.Intellivision, - VSystemID.Raw.Libretro => CoreSystem.Libretro, - VSystemID.Raw.Lynx => CoreSystem.Lynx, - VSystemID.Raw.SMS => CoreSystem.MasterSystem, - VSystemID.Raw.NDS => CoreSystem.NintendoDS, - VSystemID.Raw.NES => CoreSystem.NES, - VSystemID.Raw.N64 => CoreSystem.Nintendo64, - VSystemID.Raw.NULL => CoreSystem.Null, - VSystemID.Raw.PCE => CoreSystem.PCEngine, - VSystemID.Raw.PCECD => CoreSystem.PCEngine, - VSystemID.Raw.SGX => CoreSystem.PCEngine, - VSystemID.Raw.PSX => CoreSystem.Playstation, - VSystemID.Raw.SAT => CoreSystem.Saturn, - VSystemID.Raw.SNES => CoreSystem.SNES, - VSystemID.Raw.TI83 => CoreSystem.TI83, - VSystemID.Raw.VEC => CoreSystem.Vectrex, - VSystemID.Raw.WSWAN => CoreSystem.WonderSwan, - VSystemID.Raw.ZXSpectrum => CoreSystem.ZXSpectrum, - VSystemID.Raw.AmstradCPC => CoreSystem.AmstradCPC, - VSystemID.Raw.GGL => CoreSystem.GGL, - VSystemID.Raw.ChannelF => CoreSystem.ChannelF, - VSystemID.Raw.O2 => CoreSystem.Odyssey2, - VSystemID.Raw.MSX => CoreSystem.MSX, - VSystemID.Raw.VB => CoreSystem.VirtualBoy, - VSystemID.Raw.NGP => CoreSystem.NeoGeoPocket, - VSystemID.Raw.SGB => CoreSystem.SuperGameBoy, - VSystemID.Raw.UZE => CoreSystem.UzeBox, - VSystemID.Raw.PCFX => CoreSystem.PcFx, - _ => throw new InvalidOperationException($"{value} is missing in convert list") - }; - } - - - /// - /// Convert BizHawk SystemId to value - /// - /// you want to convert - /// A that is equivalent to BizHawk SystemId - /// Thrown when SystemId hasn't been found - public CoreSystem Convert(string value) - { - return (CoreSystem)Convert(value, null, null, CultureInfo.CurrentCulture); - } - - - /// - /// Convert a value to BizHawk SystemId - /// - /// you want to convert - /// The type of the binding target property - /// The converter parameter to use; null in our case - /// The culture to use in the converter - /// A that is used by BizHawk SystemId - /// Thrown when hasn't been found - public object ConvertBack(object value, Type targetType, object parameter, CultureInfo cultureInfo) - { - return (CoreSystem) value switch - { - CoreSystem.AppleII => VSystemID.Raw.AppleII, - CoreSystem.Atari2600 => VSystemID.Raw.A26, - CoreSystem.Atari7800 => VSystemID.Raw.A78, - CoreSystem.Arcade => VSystemID.Raw.Arcade, - CoreSystem.ChannelF => VSystemID.Raw.ChannelF, - CoreSystem.ColecoVision => VSystemID.Raw.Coleco, - CoreSystem.Commodore64 => VSystemID.Raw.C64, - CoreSystem.GameBoyLink => VSystemID.Raw.GBL, - CoreSystem.GameBoy => VSystemID.Raw.GB, - CoreSystem.GameBoyAdvance => VSystemID.Raw.GBA, - CoreSystem.Genesis => VSystemID.Raw.GEN, - CoreSystem.GGL => VSystemID.Raw.GGL, - CoreSystem.Intellivision => VSystemID.Raw.INTV, - CoreSystem.Libretro => VSystemID.Raw.Libretro, - CoreSystem.Lynx => VSystemID.Raw.Lynx, - CoreSystem.MasterSystem => VSystemID.Raw.SMS, - CoreSystem.MSX => VSystemID.Raw.MSX, - CoreSystem.NeoGeoPocket => VSystemID.Raw.NGP, - CoreSystem.NES => VSystemID.Raw.NES, - CoreSystem.Nintendo64 => VSystemID.Raw.N64, - CoreSystem.NintendoDS => VSystemID.Raw.NDS, - CoreSystem.Null => VSystemID.Raw.NULL, - CoreSystem.PCEngine => VSystemID.Raw.PCE, - CoreSystem.PcFx => VSystemID.Raw.PCFX, - CoreSystem.Playstation => VSystemID.Raw.PSX, - CoreSystem.Saturn => VSystemID.Raw.SAT, - CoreSystem.SNES => VSystemID.Raw.SNES, - CoreSystem.SuperGameBoy => VSystemID.Raw.SGB, - CoreSystem.TI83 => VSystemID.Raw.TI83, - CoreSystem.UzeBox => VSystemID.Raw.UZE, - CoreSystem.Vectrex => VSystemID.Raw.VEC, - CoreSystem.VirtualBoy => VSystemID.Raw.VB, - CoreSystem.WonderSwan => VSystemID.Raw.WSWAN, - CoreSystem.ZXSpectrum => VSystemID.Raw.ZXSpectrum, - CoreSystem.AmstradCPC => VSystemID.Raw.AmstradCPC, - CoreSystem.Odyssey2 => VSystemID.Raw.O2, - _ => throw new InvalidOperationException($"{value} is missing in convert list") - }; - } - - - /// - /// Convert a value to BizHawk SystemId - /// - /// you want to convert - /// A that is used by BizHawk SystemId - /// Thrown when hasn't been found - public string ConvertBack(CoreSystem value) - { - return (string)ConvertBack(value, null, null, CultureInfo.CurrentCulture); - } - } -} diff --git a/src/BizHawk.Client.Common/Api/CoreSystem.cs b/src/BizHawk.Client.Common/Api/CoreSystem.cs deleted file mode 100644 index c35e36f73a3..00000000000 --- a/src/BizHawk.Client.Common/Api/CoreSystem.cs +++ /dev/null @@ -1,45 +0,0 @@ -namespace BizHawk.Client.Common -{ - /// - /// Enumeration of each system emulated by BizHawk - /// - public enum CoreSystem - { - Null = 0, - TI83, - AppleII, - Commodore64, - Atari2600, - Atari7800, - Lynx, - ColecoVision, - Intellivision, - GameBoy, - GameBoyLink, - GameBoyAdvance, - NintendoDS, - Nintendo64, - NES, - SNES, - PCEngine, - Genesis, - Saturn, - MasterSystem, - Playstation, - WonderSwan, - Libretro, - VirtualBoy, - Vectrex, - NeoGeoPocket, - ZXSpectrum, - AmstradCPC, - GGL, - ChannelF, - Odyssey2, - Arcade, - MSX, - SuperGameBoy, - UzeBox, - PcFx - } -}