diff --git a/.gitignore b/.gitignore index 82a1a791..e8e6134a 100644 --- a/.gitignore +++ b/.gitignore @@ -8,8 +8,8 @@ /SabreTools/obj/ /SabreTools/Properties/launchSettings.json /SabreTools/SabreTools.csproj.user -/SabreTools.Data/bin/ -/SabreTools.Data/obj/ +/SabreTools.Core/bin/ +/SabreTools.Core/obj/ /SabreTools.Help/bin/ /SabreTools.Help/obj/ /SabreTools.IO/bin/ diff --git a/RombaSharp/Features/Archive.cs b/RombaSharp/Features/Archive.cs index 4e0f16ff..a563aa76 100644 --- a/RombaSharp/Features/Archive.cs +++ b/RombaSharp/Features/Archive.cs @@ -2,11 +2,10 @@ using System.IO; using System.Linq; -using SabreTools.Data; +using SabreTools.Core; using SabreTools.Help; using SabreTools.Library.DatFiles; using SabreTools.Library.DatItems; -using SabreTools.Library.FileTypes; using Microsoft.Data.Sqlite; namespace RombaSharp.Features diff --git a/RombaSharp/Features/BaseFeature.cs b/RombaSharp/Features/BaseFeature.cs index 6a46fd43..27974410 100644 --- a/RombaSharp/Features/BaseFeature.cs +++ b/RombaSharp/Features/BaseFeature.cs @@ -5,13 +5,12 @@ using System.Linq; using System.Xml; using System.Xml.Schema; -using SabreTools.Data; +using SabreTools.Core; using SabreTools.Help; using SabreTools.Logging; using SabreTools.Library.DatFiles; using SabreTools.Library.DatItems; using SabreTools.Library.FileTypes; -using SabreTools.Library.Tools; using Microsoft.Data.Sqlite; namespace RombaSharp.Features diff --git a/RombaSharp/Features/Build.cs b/RombaSharp/Features/Build.cs index 0c988da8..abedbd7a 100644 --- a/RombaSharp/Features/Build.cs +++ b/RombaSharp/Features/Build.cs @@ -2,10 +2,10 @@ using System.IO; using System.Linq; +using SabreTools.Core; using SabreTools.Help; using SabreTools.IO; using SabreTools.Library.DatFiles; -using SabreTools.Library.FileTypes; namespace RombaSharp.Features { diff --git a/RombaSharp/Features/DatStats.cs b/RombaSharp/Features/DatStats.cs index 45dc8080..59bbfbfa 100644 --- a/RombaSharp/Features/DatStats.cs +++ b/RombaSharp/Features/DatStats.cs @@ -1,9 +1,9 @@ using System.Collections.Generic; using System.IO; +using SabreTools.Core; using SabreTools.Help; using SabreTools.Library.DatFiles; -using SabreTools.Library.Reports; namespace RombaSharp.Features { diff --git a/RombaSharp/Features/Dir2Dat.cs b/RombaSharp/Features/Dir2Dat.cs index e794359a..9bf56936 100644 --- a/RombaSharp/Features/Dir2Dat.cs +++ b/RombaSharp/Features/Dir2Dat.cs @@ -1,12 +1,11 @@ using System.Collections.Generic; using System.IO; -using SabreTools.Data; +using SabreTools.Core; using SabreTools.Help; using SabreTools.IO; using SabreTools.Library.DatFiles; using SabreTools.Library.Filtering; -using SabreTools.Library.Tools; namespace RombaSharp.Features { diff --git a/RombaSharp/Features/Lookup.cs b/RombaSharp/Features/Lookup.cs index a941f3a5..71f3851d 100644 --- a/RombaSharp/Features/Lookup.cs +++ b/RombaSharp/Features/Lookup.cs @@ -1,8 +1,7 @@ using System.Collections.Generic; -using SabreTools.Data; +using SabreTools.Core; using SabreTools.Help; -using SabreTools.Library.Tools; using Microsoft.Data.Sqlite; namespace RombaSharp.Features diff --git a/RombaSharp/Features/Miss.cs b/RombaSharp/Features/Miss.cs index da04df37..ba0f8226 100644 --- a/RombaSharp/Features/Miss.cs +++ b/RombaSharp/Features/Miss.cs @@ -1,7 +1,7 @@ using System.Collections.Generic; using System.IO; -using SabreTools.Data; +using SabreTools.Core; using SabreTools.Help; using SabreTools.IO; using SabreTools.Library.DatFiles; diff --git a/RombaSharp/Features/RefreshDats.cs b/RombaSharp/Features/RefreshDats.cs index 584a9358..b243b796 100644 --- a/RombaSharp/Features/RefreshDats.cs +++ b/RombaSharp/Features/RefreshDats.cs @@ -1,7 +1,7 @@ using System.Collections.Generic; using System.IO; -using SabreTools.Data; +using SabreTools.Core; using SabreTools.Help; using SabreTools.Library.DatFiles; using SabreTools.Library.DatItems; diff --git a/RombaSharp/Features/RescanDepots.cs b/RombaSharp/Features/RescanDepots.cs index af1d4259..37d7c3ae 100644 --- a/RombaSharp/Features/RescanDepots.cs +++ b/RombaSharp/Features/RescanDepots.cs @@ -1,7 +1,7 @@ using System.Collections.Generic; using System.IO; -using SabreTools.Data; +using SabreTools.Core; using SabreTools.Help; using SabreTools.Library.DatFiles; using SabreTools.Library.DatItems; diff --git a/RombaSharp/Features/Version.cs b/RombaSharp/Features/Version.cs index cf4353c8..89dc3f1a 100644 --- a/RombaSharp/Features/Version.cs +++ b/RombaSharp/Features/Version.cs @@ -1,6 +1,6 @@ using System.Collections.Generic; -using SabreTools.Data; +using SabreTools.Core; using SabreTools.Help; namespace RombaSharp.Features diff --git a/RombaSharp/Program.cs b/RombaSharp/Program.cs index 69295636..fad768ab 100644 --- a/RombaSharp/Program.cs +++ b/RombaSharp/Program.cs @@ -2,7 +2,7 @@ using System.Collections.Generic; using RombaSharp.Features; -using SabreTools.Data; +using SabreTools.Core; using SabreTools.Help; using SabreTools.Logging; diff --git a/SabreTools.Library/Tools/BaseFirstContractResolver.cs b/SabreTools.Core/BaseFirstContractResolver.cs similarity index 96% rename from SabreTools.Library/Tools/BaseFirstContractResolver.cs rename to SabreTools.Core/BaseFirstContractResolver.cs index f339d47c..40bd6293 100644 --- a/SabreTools.Library/Tools/BaseFirstContractResolver.cs +++ b/SabreTools.Core/BaseFirstContractResolver.cs @@ -5,7 +5,7 @@ using System.Linq; using Newtonsoft.Json; using Newtonsoft.Json.Serialization; -namespace SabreTools.Library.Tools +namespace SabreTools.Core { // https://github.com/dotnet/runtime/issues/728 public class BaseFirstContractResolver : DefaultContractResolver diff --git a/SabreTools.Data/Constants.cs b/SabreTools.Core/Constants.cs similarity index 99% rename from SabreTools.Data/Constants.cs rename to SabreTools.Core/Constants.cs index cccacb72..8f5026b1 100644 --- a/SabreTools.Data/Constants.cs +++ b/SabreTools.Core/Constants.cs @@ -2,7 +2,7 @@ using System.IO; using System.Reflection; -namespace SabreTools.Data +namespace SabreTools.Core { /// /// Constants that are used throughout the library diff --git a/SabreTools.Library/Tools/Converters.cs b/SabreTools.Core/Converters.cs similarity index 99% rename from SabreTools.Library/Tools/Converters.cs rename to SabreTools.Core/Converters.cs index 4d290b36..da8fec5f 100644 --- a/SabreTools.Library/Tools/Converters.cs +++ b/SabreTools.Core/Converters.cs @@ -1,13 +1,7 @@ using System.Collections.Generic; using System.Text.RegularExpressions; -using SabreTools.Data; -using SabreTools.Library.DatFiles; -using SabreTools.Library.DatItems; -using SabreTools.Library.FileTypes; -using SabreTools.Library.Reports; - -namespace SabreTools.Library.Tools +namespace SabreTools.Core { public static class Converters { diff --git a/SabreTools.Library/FileTypes/Enums.cs b/SabreTools.Core/Enums.cs similarity index 71% rename from SabreTools.Library/FileTypes/Enums.cs rename to SabreTools.Core/Enums.cs index 08f38286..3359082c 100644 --- a/SabreTools.Library/FileTypes/Enums.cs +++ b/SabreTools.Core/Enums.cs @@ -1,7 +1,1013 @@ using System; -namespace SabreTools.Library.FileTypes +// TODO: Figure out the best way to put these back in their libraries +namespace SabreTools.Core { + #region DatFiles + + /// + /// DAT output formats + /// + [Flags] + public enum DatFormat + { + #region XML Formats + + /// + /// Logiqx XML (using machine) + /// + Logiqx = 1 << 0, + + /// + /// Logiqx XML (using game) + /// + LogiqxDeprecated = 1 << 1, + + /// + /// MAME Softare List XML + /// + SoftwareList = 1 << 2, + + /// + /// MAME Listxml output + /// + Listxml = 1 << 3, + + /// + /// OfflineList XML + /// + OfflineList = 1 << 4, + + /// + /// SabreDAT XML + /// + SabreXML = 1 << 5, + + /// + /// openMSX Software List XML + /// + OpenMSX = 1 << 6, + + #endregion + + #region Propietary Formats + + /// + /// ClrMamePro custom + /// + ClrMamePro = 1 << 7, + + /// + /// RomCenter INI-based + /// + RomCenter = 1 << 8, + + /// + /// DOSCenter custom + /// + DOSCenter = 1 << 9, + + /// + /// AttractMode custom + /// + AttractMode = 1 << 10, + + #endregion + + #region Standardized Text Formats + + /// + /// ClrMamePro missfile + /// + MissFile = 1 << 11, + + /// + /// Comma-Separated Values (standardized) + /// + CSV = 1 << 12, + + /// + /// Semicolon-Separated Values (standardized) + /// + SSV = 1 << 13, + + /// + /// Tab-Separated Values (standardized) + /// + TSV = 1 << 14, + + /// + /// MAME Listrom output + /// + Listrom = 1 << 15, + + /// + /// Everdrive Packs SMDB + /// + EverdriveSMDB = 1 << 16, + + /// + /// SabreJSON + /// + SabreJSON = 1 << 17, + + #endregion + + #region SFV-similar Formats + + /// + /// CRC32 hash list + /// + RedumpSFV = 1 << 18, + + /// + /// MD5 hash list + /// + RedumpMD5 = 1 << 19, + +#if NET_FRAMEWORK + /// + /// RIPEMD160 hash list + /// + RedumpRIPEMD160 = 1 << 20, +#endif + + /// + /// SHA-1 hash list + /// + RedumpSHA1 = 1 << 21, + + /// + /// SHA-256 hash list + /// + RedumpSHA256 = 1 << 22, + + /// + /// SHA-384 hash list + /// + RedumpSHA384 = 1 << 23, + + /// + /// SHA-512 hash list + /// + RedumpSHA512 = 1 << 24, + + /// + /// SpamSum hash list + /// + RedumpSpamSum = 1 << 25, + + #endregion + + // Specialty combinations + ALL = Int32.MaxValue, + } + + /// + /// Determines the DAT deduplication type + /// + public enum DedupeType + { + None = 0, + Full, + + // Force only deduping with certain types + Game, + CRC, + MD5, +#if NET_FRAMEWORK + RIPEMD160, +#endif + SHA1, + SHA256, + SHA384, + SHA512, + } + + /// + /// List of valid field types within a DatItem/Machine + /// + public enum Field : int + { + NULL = 0, + + #region DatHeader + + #region Common + + DatHeader_FileName, + DatHeader_Name, + DatHeader_Description, + DatHeader_RootDir, + DatHeader_Category, + DatHeader_Version, + DatHeader_Date, + DatHeader_Author, + DatHeader_Email, + DatHeader_Homepage, + DatHeader_Url, + DatHeader_Comment, + DatHeader_HeaderSkipper, + DatHeader_Type, + DatHeader_ForceMerging, + DatHeader_ForceNodump, + DatHeader_ForcePacking, + + #endregion + + #region ListXML + + DatHeader_Debug, + DatHeader_MameConfig, + + #endregion + + #region Logiqx + + DatHeader_Build, + DatHeader_RomMode, + DatHeader_BiosMode, + DatHeader_SampleMode, + DatHeader_LockRomMode, + DatHeader_LockBiosMode, + DatHeader_LockSampleMode, + + #endregion + + #region OfflineList + + DatHeader_System, + DatHeader_ScreenshotsWidth, + DatHeader_ScreenshotsHeight, + DatHeader_CanOpen, + DatHeader_RomTitle, + + // Infos + DatHeader_Info_Name, + DatHeader_Info_Visible, + DatHeader_Info_IsNamingOption, + DatHeader_Info_Default, + + #endregion + + #region RomCenter + + DatHeader_RomCenterVersion, + + #endregion + + #endregion // DatHeader + + #region Machine + + #region Common + + Machine_Name, + Machine_Comment, + Machine_Description, + Machine_Year, + Machine_Manufacturer, + Machine_Publisher, + Machine_Category, + Machine_RomOf, + Machine_CloneOf, + Machine_SampleOf, + Machine_Type, + + #endregion + + #region AttractMode + + Machine_Players, + Machine_Rotation, + Machine_Control, + Machine_Status, + Machine_DisplayCount, + Machine_DisplayType, + Machine_Buttons, + + #endregion + + #region ListXML + + Machine_SourceFile, + Machine_Runnable, + + #endregion + + #region Logiqx + + Machine_Board, + Machine_RebuildTo, + + #endregion + + #region Logiqx EmuArc + + Machine_TitleID, + Machine_Developer, + Machine_Genre, + Machine_Subgenre, + Machine_Ratings, + Machine_Score, + Machine_Enabled, + Machine_CRC, + Machine_RelatedTo, + + #endregion + + #region OpenMSX + + Machine_GenMSXID, + Machine_System, + Machine_Country, + + #endregion + + #region SoftwareList + + Machine_Supported, + + #endregion + + #endregion // Machine + + #region DatItem + + #region Common + + DatItem_Type, + + #endregion + + #region Item-Specific + + #region Actionable + + // Rom + DatItem_Name, + DatItem_Bios, + DatItem_Size, + DatItem_CRC, + DatItem_MD5, +#if NET_FRAMEWORK + DatItem_RIPEMD160, +#endif + DatItem_SHA1, + DatItem_SHA256, + DatItem_SHA384, + DatItem_SHA512, + DatItem_SpamSum, + DatItem_Merge, + DatItem_Region, + DatItem_Offset, + DatItem_Date, + DatItem_Status, + DatItem_Optional, + DatItem_Inverted, + + // Rom (AttractMode) + DatItem_AltName, + DatItem_AltTitle, + + // Rom (OpenMSX) + DatItem_Original, + DatItem_OpenMSXSubType, + DatItem_OpenMSXType, + DatItem_Remark, + DatItem_Boot, + + // Rom (SoftwareList) + DatItem_LoadFlag, + DatItem_Value, + + // Disk + DatItem_Index, + DatItem_Writable, + + #endregion + + #region Auxiliary + + // Adjuster + DatItem_Default, + + // Analog + DatItem_Analog_Mask, + + // BiosSet + DatItem_Description, + + // Chip + DatItem_Tag, + DatItem_ChipType, + DatItem_Clock, + + // Condition + DatItem_Mask, + DatItem_Relation, + DatItem_Condition_Tag, + DatItem_Condition_Mask, + DatItem_Condition_Relation, + DatItem_Condition_Value, + + // Control + DatItem_Control_Type, + DatItem_Control_Player, + DatItem_Control_Buttons, + DatItem_Control_RequiredButtons, + DatItem_Control_Minimum, + DatItem_Control_Maximum, + DatItem_Control_Sensitivity, + DatItem_Control_KeyDelta, + DatItem_Control_Reverse, + DatItem_Control_Ways, + DatItem_Control_Ways2, + DatItem_Control_Ways3, + + // DataArea + DatItem_AreaName, + DatItem_AreaSize, + DatItem_AreaWidth, + DatItem_AreaEndianness, + + // Device + DatItem_DeviceType, + DatItem_FixedImage, + DatItem_Mandatory, + DatItem_Interface, + + // Display + DatItem_DisplayType, + DatItem_Rotate, + DatItem_FlipX, + DatItem_Width, + DatItem_Height, + DatItem_Refresh, + DatItem_PixClock, + DatItem_HTotal, + DatItem_HBEnd, + DatItem_HBStart, + DatItem_VTotal, + DatItem_VBEnd, + DatItem_VBStart, + + // Driver + DatItem_SupportStatus, + DatItem_EmulationStatus, + DatItem_CocktailStatus, + DatItem_SaveStateStatus, + + // Extension + DatItem_Extension_Name, + + // Feature + DatItem_FeatureType, + DatItem_FeatureStatus, + DatItem_FeatureOverall, + + // Input + DatItem_Service, + DatItem_Tilt, + DatItem_Players, + DatItem_Coins, + + // Instance + DatItem_Instance_Name, + DatItem_Instance_BriefName, + + // Location + DatItem_Location_Name, + DatItem_Location_Number, + DatItem_Location_Inverted, + + // Part + DatItem_Part_Name, + DatItem_Part_Interface, + + // PartFeature + DatItem_Part_Feature_Name, + DatItem_Part_Feature_Value, + + // RamOption + DatItem_Content, + + // Release + DatItem_Language, + + // Setting + DatItem_Setting_Name, + DatItem_Setting_Value, + DatItem_Setting_Default, + + // SlotOption + DatItem_SlotOption_Name, + DatItem_SlotOption_DeviceName, + DatItem_SlotOption_Default, + + // SoftwareList + DatItem_SoftwareListStatus, + DatItem_Filter, + + // Sound + DatItem_Channels, + + #endregion + + #endregion // Item-Specific + + #endregion // DatItem + } + + /// + /// Available hashing types + /// + [Flags] + public enum Hash + { + CRC = 1 << 0, + MD5 = 1 << 1, +#if NET_FRAMEWORK + RIPEMD160 = 1 << 2, +#endif + SHA1 = 1 << 3, + SHA256 = 1 << 4, + SHA384 = 1 << 5, + SHA512 = 1 << 6, + SpamSum = 1 << 7, + + // Special combinations + Standard = CRC | MD5 | SHA1, +#if NET_FRAMEWORK + DeepHashes = RIPEMD160 | SHA256 | SHA384 | SHA512 | SpamSum, + SecureHashes = MD5 | RIPEMD160 | SHA1 | SHA256 | SHA384 | SHA512 | SpamSum, +#else + DeepHashes = SHA256 | SHA384 | SHA512 | SpamSum, + SecureHashes = MD5 | SHA1 | SHA256 | SHA384 | SHA512 | SpamSum, +#endif + } + + /// + /// Determines merging tag handling for DAT output + /// + public enum MergingFlag + { + None = 0, + Split, + Merged, + NonMerged, + Full, + + /// This is not usually defined for Merging flags + Device, + } + + /// + /// Determines nodump tag handling for DAT output + /// + public enum NodumpFlag + { + None = 0, + Obsolete, + Required, + Ignore, + } + + /// + /// Determines packing tag handling for DAT output + /// + public enum PackingFlag + { + None = 0, + + /// + /// Force all sets to be in archives, except disk and media + /// + Zip, + + /// + /// Force all sets to be extracted into subfolders + /// + Unzip, + + /// + /// Force sets with single items to be extracted to the parent folder + /// + Partial, + + /// + /// Force all sets to be extracted to the parent folder + /// + Flat, + } + + /// + /// Determines which files should be skipped in DFD + /// + public enum SkipFileType + { + None = 0, + Archive, + File, + } + + /// + /// Determines what sort of files get externally hashed + /// + /// TODO: Can FileType be used instead? + [Flags] + public enum TreatAsFile + { + CHD = 1 << 0, + Archive = 1 << 1, + AaruFormat = 1 << 2, + + NonArchive = CHD | AaruFormat, + All = CHD | Archive | AaruFormat, + } + + #endregion + + #region DatItems + + /// + /// Determine the chip type + /// + [Flags] + public enum ChipType + { + /// + /// This is a fake flag that is used for filter only + /// + NULL = 0, + + CPU = 1 << 0, + Audio = 1 << 1, + } + + /// + /// Determine the control type + /// + [Flags] + public enum ControlType + { + /// + /// This is a fake flag that is used for filter only + /// + NULL = 0, + + Joy = 1 << 0, + Stick = 1 << 1, + Paddle = 1 << 2, + Pedal = 1 << 3, + Lightgun = 1 << 4, + Positional = 1 << 5, + Dial = 1 << 6, + Trackball = 1 << 7, + Mouse = 1 << 8, + OnlyButtons = 1 << 9, + Keypad = 1 << 10, + Keyboard = 1 << 11, + Mahjong = 1 << 12, + Hanafuda = 1 << 13, + Gambling = 1 << 14, + } + + /// + /// Determine the device type + /// + [Flags] + public enum DeviceType + { + /// + /// This is a fake flag that is used for filter only + /// + NULL = 0, + + Unknown = 1 << 0, + Cartridge = 1 << 1, + FloppyDisk = 1 << 2, + HardDisk = 1 << 3, + Cylinder = 1 << 4, + Cassette = 1 << 5, + PunchCard = 1 << 6, + PunchTape = 1 << 7, + Printout = 1 << 8, + Serial = 1 << 9, + Parallel = 1 << 10, + Snapshot = 1 << 11, + QuickLoad = 1 << 12, + MemCard = 1 << 13, + CDROM = 1 << 14, + MagTape = 1 << 15, + ROMImage = 1 << 16, + MIDIIn = 1 << 17, + MIDIOut = 1 << 18, + Picture = 1 << 19, + VidFile = 1 << 20, + } + + /// + /// Determine the display type + /// + [Flags] + public enum DisplayType + { + /// + /// This is a fake flag that is used for filter only + /// + NULL = 0, + + Raster = 1 << 0, + Vector = 1 << 1, + LCD = 1 << 2, + SVG = 1 << 3, + Unknown = 1 << 4, + } + + /// + /// Determines which type of duplicate a file is + /// + [Flags] + public enum DupeType + { + // Type of match + Hash = 1 << 0, + All = 1 << 1, + + // Location of match + Internal = 1 << 2, + External = 1 << 3, + } + + /// + /// Determine the endianness + /// + [Flags] + public enum Endianness + { + /// + /// This is a fake flag that is used for filter only + /// + NULL = 0, + + Big = 1 << 0, + Little = 1 << 1, + } + + /// + /// Determine the emulation status + /// + [Flags] + public enum FeatureStatus + { + /// + /// This is a fake flag that is used for filter only + /// + NULL = 0, + + Unemulated = 1 << 0, + Imperfect = 1 << 1, + } + + /// + /// Determine the feature type + /// + [Flags] + public enum FeatureType + { + /// + /// This is a fake flag that is used for filter only + /// + NULL = 0, + + Protection = 1 << 0, + Palette = 1 << 1, + Graphics = 1 << 2, + Sound = 1 << 3, + Controls = 1 << 4, + Keyboard = 1 << 5, + Mouse = 1 << 6, + Microphone = 1 << 7, + Camera = 1 << 8, + Disk = 1 << 9, + Printer = 1 << 10, + Lan = 1 << 11, + Wan = 1 << 12, + Timing = 1 << 13, + } + + /// + /// Determine the status of the item + /// + [Flags] + public enum ItemStatus + { + /// + /// This is a fake flag that is used for filter only + /// + NULL = 0, + + None = 1 << 0, + Good = 1 << 1, + BadDump = 1 << 2, + Nodump = 1 << 3, + Verified = 1 << 4, + } + + /// + /// Determine what type of file an item is + /// + public enum ItemType + { + // "Actionable" item types + Rom, + Disk, + Media, + + // "Auxiliary" item types + Adjuster, + Analog, + Archive, + BiosSet, + Chip, + Condition, + Configuration, + Control, + DataArea, + Device, + DeviceReference, + DipSwitch, + DiskArea, + Display, + Driver, + Extension, + Feature, + Info, + Input, + Instance, + Location, + Part, + PartFeature, + Port, + RamOption, + Release, + Sample, + Setting, + SharedFeature, + Slot, + SlotOption, + SoftwareList, + Sound, + + Blank = 99, // This is not a real type, only used internally + } + + /// + /// Determine the loadflag value + /// + [Flags] + public enum LoadFlag + { + /// + /// This is a fake flag that is used for filter only + /// + NULL = 0, + + Load16Byte = 1 << 0, + Load16Word = 1 << 1, + Load16WordSwap = 1 << 2, + Load32Byte = 1 << 3, + Load32Word = 1 << 4, + Load32WordSwap = 1 << 5, + Load32DWord = 1 << 6, + Load64Word = 1 << 7, + Load64WordSwap = 1 << 8, + Reload = 1 << 9, + Fill = 1 << 10, + Continue = 1 << 11, + ReloadPlain = 1 << 12, + Ignore = 1 << 13, + } + + /// + /// Determine what type of machine it is + /// + [Flags] + public enum MachineType + { + /// + /// This is a fake flag that is used for filter only + /// + NULL = 1 << 0, + + Bios = 1 << 1, + Device = 1 << 2, + Mechanical = 1 << 3, + } + + /// + /// Determine which OpenMSX subtype an item is + /// + [Flags] + public enum OpenMSXSubType + { + /// + /// This is a fake flag that is used for filter only + /// + NULL = 0, + + Rom = 1 << 0, + MegaRom = 1 << 1, + SCCPlusCart = 1 << 2, + } + + /// + /// Determine relation of value to condition + /// + [Flags] + public enum Relation + { + /// + /// This is a fake flag that is used for filter only + /// + NULL = 0, + + Equal = 1 << 0, + NotEqual = 1 << 1, + GreaterThan = 1 << 2, + LessThanOrEqual = 1 << 3, + LessThan = 1 << 4, + GreaterThanOrEqual = 1 << 5, + } + + /// + /// Determine machine runnable status + /// + [Flags] + public enum Runnable + { + /// + /// This is a fake flag that is used for filter only + /// + NULL = 0, + + No = 1 << 0, + Partial = 1 << 1, + Yes = 1 << 2, + } + + /// + /// Determine software list status + /// + [Flags] + public enum SoftwareListStatus + { + /// + /// This is a fake flag that is used for filter only + /// + NULL = 0, + + Original = 1 << 0, + Compatible = 1 << 1, + } + + /// + /// Determine machine support status + /// + [Flags] + public enum Supported + { + /// + /// This is a fake flag that is used for filter only + /// + NULL = 0, + + No = 1 << 0, + Partial = 1 << 1, + Yes = 1 << 2, + } + + /// + /// Determine driver support statuses + /// + [Flags] + public enum SupportStatus + { + /// + /// This is a fake flag that is used for filter only + /// + NULL = 0, + + Good = 1 << 0, + Imperfect = 1 << 1, + Preliminary = 1 << 2, + } + + #endregion + + #region FileTypes + /// /// List of known blocks types /// @@ -1252,6 +2258,30 @@ namespace SabreTools.Library.FileTypes PPMdVersionIRev1 = 98, } + /// + /// Type of file that is being looked at + /// + public enum FileType + { + // Singleton + None = 0, + AaruFormat, + CHD, + + // Can contain children + Folder, + SevenZipArchive, + GZipArchive, + LRZipArchive, + LZ4Archive, + RarArchive, + TapeArchive, + XZArchive, + ZipArchive, + ZPAQArchive, + ZstdArchive, + } + /// /// Output format for rebuilt files /// @@ -1275,4 +2305,49 @@ namespace SabreTools.Library.FileTypes TorrentZstd, TorrentZPAQ, } + + #endregion + + #region Reports + + /// + /// Determine which format to output Stats to + /// + [Flags] + public enum StatReportFormat + { + /// + /// Only output to the console + /// + None = 0x00, + + /// + /// Console-formatted + /// + Textfile = 1 << 0, + + /// + /// ClrMamePro HTML + /// + HTML = 1 << 1, + + /// + /// Comma-Separated Values (Standardized) + /// + CSV = 1 << 2, + + /// + /// Semicolon-Separated Values (Standardized) + /// + SSV = 1 << 3, + + /// + /// Tab-Separated Values (Standardized) + /// + TSV = 1 << 4, + + All = Int32.MaxValue, + } + + #endregion } diff --git a/SabreTools.Data/Globals.cs b/SabreTools.Core/Globals.cs similarity index 98% rename from SabreTools.Data/Globals.cs rename to SabreTools.Core/Globals.cs index d4469642..59c212cb 100644 --- a/SabreTools.Data/Globals.cs +++ b/SabreTools.Core/Globals.cs @@ -3,7 +3,7 @@ using System.IO; using System.Reflection; using System.Threading.Tasks; -namespace SabreTools.Data +namespace SabreTools.Core { /// /// Globally-accessible objects for the library diff --git a/SabreTools.Library/Licenses/LICENSE b/SabreTools.Core/Licenses/LICENSE similarity index 100% rename from SabreTools.Library/Licenses/LICENSE rename to SabreTools.Core/Licenses/LICENSE diff --git a/SabreTools.Library/Licenses/LICENSE.sharpcompress.txt b/SabreTools.Core/Licenses/LICENSE.sharpcompress.txt similarity index 100% rename from SabreTools.Library/Licenses/LICENSE.sharpcompress.txt rename to SabreTools.Core/Licenses/LICENSE.sharpcompress.txt diff --git a/SabreTools.Data/Prepare.cs b/SabreTools.Core/Prepare.cs similarity index 98% rename from SabreTools.Data/Prepare.cs rename to SabreTools.Core/Prepare.cs index fe339d0c..9f15b539 100644 --- a/SabreTools.Data/Prepare.cs +++ b/SabreTools.Core/Prepare.cs @@ -1,6 +1,6 @@ using System; -namespace SabreTools.Data +namespace SabreTools.Core { /// /// Generic console preparation for program output diff --git a/SabreTools.Library/README.1ST b/SabreTools.Core/README.1ST similarity index 100% rename from SabreTools.Library/README.1ST rename to SabreTools.Core/README.1ST diff --git a/SabreTools.Library/README.DEPRECIATED b/SabreTools.Core/README.DEPRECIATED similarity index 100% rename from SabreTools.Library/README.DEPRECIATED rename to SabreTools.Core/README.DEPRECIATED diff --git a/SabreTools.Core/SabreTools.Core.csproj b/SabreTools.Core/SabreTools.Core.csproj new file mode 100644 index 00000000..7badd0fb --- /dev/null +++ b/SabreTools.Core/SabreTools.Core.csproj @@ -0,0 +1,33 @@ + + + + net48;netcoreapp3.1;net5.0 + win10-x64;win7-x86 + Debug;Release + AnyCPU;x64 + + + + NET_FRAMEWORK + + + + + + + + + Always + + + Always + + + Always + + + Never + + + + diff --git a/SabreTools.Library/Tools/Sanitizer.cs b/SabreTools.Core/Sanitizer.cs similarity index 99% rename from SabreTools.Library/Tools/Sanitizer.cs rename to SabreTools.Core/Sanitizer.cs index d9d14fd3..49adda00 100644 --- a/SabreTools.Library/Tools/Sanitizer.cs +++ b/SabreTools.Core/Sanitizer.cs @@ -4,9 +4,7 @@ using System.IO; using System.Linq; using System.Text.RegularExpressions; -using SabreTools.Data; - -namespace SabreTools.Library.Tools +namespace SabreTools.Core { public static class Sanitizer { diff --git a/SabreTools.Library/Tools/Utilities.cs b/SabreTools.Core/Utilities.cs similarity index 99% rename from SabreTools.Library/Tools/Utilities.cs rename to SabreTools.Core/Utilities.cs index 99ddf694..bc5608e5 100644 --- a/SabreTools.Library/Tools/Utilities.cs +++ b/SabreTools.Core/Utilities.cs @@ -1,6 +1,6 @@ using System; -namespace SabreTools.Library.Tools +namespace SabreTools.Core { /// /// Static utility functions used throughout the library diff --git a/SabreTools.Data/Enums.cs b/SabreTools.Data/Enums.cs deleted file mode 100644 index 305d9e43..00000000 --- a/SabreTools.Data/Enums.cs +++ /dev/null @@ -1,593 +0,0 @@ -using System; - -namespace SabreTools.Data -{ - #region DatFile - - /// - /// DAT output formats - /// - [Flags] - public enum DatFormat - { - #region XML Formats - - /// - /// Logiqx XML (using machine) - /// - Logiqx = 1 << 0, - - /// - /// Logiqx XML (using game) - /// - LogiqxDeprecated = 1 << 1, - - /// - /// MAME Softare List XML - /// - SoftwareList = 1 << 2, - - /// - /// MAME Listxml output - /// - Listxml = 1 << 3, - - /// - /// OfflineList XML - /// - OfflineList = 1 << 4, - - /// - /// SabreDAT XML - /// - SabreXML = 1 << 5, - - /// - /// openMSX Software List XML - /// - OpenMSX = 1 << 6, - - #endregion - - #region Propietary Formats - - /// - /// ClrMamePro custom - /// - ClrMamePro = 1 << 7, - - /// - /// RomCenter INI-based - /// - RomCenter = 1 << 8, - - /// - /// DOSCenter custom - /// - DOSCenter = 1 << 9, - - /// - /// AttractMode custom - /// - AttractMode = 1 << 10, - - #endregion - - #region Standardized Text Formats - - /// - /// ClrMamePro missfile - /// - MissFile = 1 << 11, - - /// - /// Comma-Separated Values (standardized) - /// - CSV = 1 << 12, - - /// - /// Semicolon-Separated Values (standardized) - /// - SSV = 1 << 13, - - /// - /// Tab-Separated Values (standardized) - /// - TSV = 1 << 14, - - /// - /// MAME Listrom output - /// - Listrom = 1 << 15, - - /// - /// Everdrive Packs SMDB - /// - EverdriveSMDB = 1 << 16, - - /// - /// SabreJSON - /// - SabreJSON = 1 << 17, - - #endregion - - #region SFV-similar Formats - - /// - /// CRC32 hash list - /// - RedumpSFV = 1 << 18, - - /// - /// MD5 hash list - /// - RedumpMD5 = 1 << 19, - -#if NET_FRAMEWORK - /// - /// RIPEMD160 hash list - /// - RedumpRIPEMD160 = 1 << 20, -#endif - - /// - /// SHA-1 hash list - /// - RedumpSHA1 = 1 << 21, - - /// - /// SHA-256 hash list - /// - RedumpSHA256 = 1 << 22, - - /// - /// SHA-384 hash list - /// - RedumpSHA384 = 1 << 23, - - /// - /// SHA-512 hash list - /// - RedumpSHA512 = 1 << 24, - - /// - /// SpamSum hash list - /// - RedumpSpamSum = 1 << 25, - - #endregion - - // Specialty combinations - ALL = Int32.MaxValue, - } - - /// - /// Determines the DAT deduplication type - /// - public enum DedupeType - { - None = 0, - Full, - - // Force only deduping with certain types - Game, - CRC, - MD5, -#if NET_FRAMEWORK - RIPEMD160, -#endif - SHA1, - SHA256, - SHA384, - SHA512, - } - - /// - /// List of valid field types within a DatItem/Machine - /// - public enum Field : int - { - NULL = 0, - - #region DatHeader - - #region Common - - DatHeader_FileName, - DatHeader_Name, - DatHeader_Description, - DatHeader_RootDir, - DatHeader_Category, - DatHeader_Version, - DatHeader_Date, - DatHeader_Author, - DatHeader_Email, - DatHeader_Homepage, - DatHeader_Url, - DatHeader_Comment, - DatHeader_HeaderSkipper, - DatHeader_Type, - DatHeader_ForceMerging, - DatHeader_ForceNodump, - DatHeader_ForcePacking, - - #endregion - - #region ListXML - - DatHeader_Debug, - DatHeader_MameConfig, - - #endregion - - #region Logiqx - - DatHeader_Build, - DatHeader_RomMode, - DatHeader_BiosMode, - DatHeader_SampleMode, - DatHeader_LockRomMode, - DatHeader_LockBiosMode, - DatHeader_LockSampleMode, - - #endregion - - #region OfflineList - - DatHeader_System, - DatHeader_ScreenshotsWidth, - DatHeader_ScreenshotsHeight, - DatHeader_CanOpen, - DatHeader_RomTitle, - - // Infos - DatHeader_Info_Name, - DatHeader_Info_Visible, - DatHeader_Info_IsNamingOption, - DatHeader_Info_Default, - - #endregion - - #region RomCenter - - DatHeader_RomCenterVersion, - - #endregion - - #endregion // DatHeader - - #region Machine - - #region Common - - Machine_Name, - Machine_Comment, - Machine_Description, - Machine_Year, - Machine_Manufacturer, - Machine_Publisher, - Machine_Category, - Machine_RomOf, - Machine_CloneOf, - Machine_SampleOf, - Machine_Type, - - #endregion - - #region AttractMode - - Machine_Players, - Machine_Rotation, - Machine_Control, - Machine_Status, - Machine_DisplayCount, - Machine_DisplayType, - Machine_Buttons, - - #endregion - - #region ListXML - - Machine_SourceFile, - Machine_Runnable, - - #endregion - - #region Logiqx - - Machine_Board, - Machine_RebuildTo, - - #endregion - - #region Logiqx EmuArc - - Machine_TitleID, - Machine_Developer, - Machine_Genre, - Machine_Subgenre, - Machine_Ratings, - Machine_Score, - Machine_Enabled, - Machine_CRC, - Machine_RelatedTo, - - #endregion - - #region OpenMSX - - Machine_GenMSXID, - Machine_System, - Machine_Country, - - #endregion - - #region SoftwareList - - Machine_Supported, - - #endregion - - #endregion // Machine - - #region DatItem - - #region Common - - DatItem_Type, - - #endregion - - #region Item-Specific - - #region Actionable - - // Rom - DatItem_Name, - DatItem_Bios, - DatItem_Size, - DatItem_CRC, - DatItem_MD5, -#if NET_FRAMEWORK - DatItem_RIPEMD160, -#endif - DatItem_SHA1, - DatItem_SHA256, - DatItem_SHA384, - DatItem_SHA512, - DatItem_SpamSum, - DatItem_Merge, - DatItem_Region, - DatItem_Offset, - DatItem_Date, - DatItem_Status, - DatItem_Optional, - DatItem_Inverted, - - // Rom (AttractMode) - DatItem_AltName, - DatItem_AltTitle, - - // Rom (OpenMSX) - DatItem_Original, - DatItem_OpenMSXSubType, - DatItem_OpenMSXType, - DatItem_Remark, - DatItem_Boot, - - // Rom (SoftwareList) - DatItem_LoadFlag, - DatItem_Value, - - // Disk - DatItem_Index, - DatItem_Writable, - - #endregion - - #region Auxiliary - - // Adjuster - DatItem_Default, - - // Analog - DatItem_Analog_Mask, - - // BiosSet - DatItem_Description, - - // Chip - DatItem_Tag, - DatItem_ChipType, - DatItem_Clock, - - // Condition - DatItem_Mask, - DatItem_Relation, - DatItem_Condition_Tag, - DatItem_Condition_Mask, - DatItem_Condition_Relation, - DatItem_Condition_Value, - - // Control - DatItem_Control_Type, - DatItem_Control_Player, - DatItem_Control_Buttons, - DatItem_Control_RequiredButtons, - DatItem_Control_Minimum, - DatItem_Control_Maximum, - DatItem_Control_Sensitivity, - DatItem_Control_KeyDelta, - DatItem_Control_Reverse, - DatItem_Control_Ways, - DatItem_Control_Ways2, - DatItem_Control_Ways3, - - // DataArea - DatItem_AreaName, - DatItem_AreaSize, - DatItem_AreaWidth, - DatItem_AreaEndianness, - - // Device - DatItem_DeviceType, - DatItem_FixedImage, - DatItem_Mandatory, - DatItem_Interface, - - // Display - DatItem_DisplayType, - DatItem_Rotate, - DatItem_FlipX, - DatItem_Width, - DatItem_Height, - DatItem_Refresh, - DatItem_PixClock, - DatItem_HTotal, - DatItem_HBEnd, - DatItem_HBStart, - DatItem_VTotal, - DatItem_VBEnd, - DatItem_VBStart, - - // Driver - DatItem_SupportStatus, - DatItem_EmulationStatus, - DatItem_CocktailStatus, - DatItem_SaveStateStatus, - - // Extension - DatItem_Extension_Name, - - // Feature - DatItem_FeatureType, - DatItem_FeatureStatus, - DatItem_FeatureOverall, - - // Input - DatItem_Service, - DatItem_Tilt, - DatItem_Players, - DatItem_Coins, - - // Instance - DatItem_Instance_Name, - DatItem_Instance_BriefName, - - // Location - DatItem_Location_Name, - DatItem_Location_Number, - DatItem_Location_Inverted, - - // Part - DatItem_Part_Name, - DatItem_Part_Interface, - - // PartFeature - DatItem_Part_Feature_Name, - DatItem_Part_Feature_Value, - - // RamOption - DatItem_Content, - - // Release - DatItem_Language, - - // Setting - DatItem_Setting_Name, - DatItem_Setting_Value, - DatItem_Setting_Default, - - // SlotOption - DatItem_SlotOption_Name, - DatItem_SlotOption_DeviceName, - DatItem_SlotOption_Default, - - // SoftwareList - DatItem_SoftwareListStatus, - DatItem_Filter, - - // Sound - DatItem_Channels, - - #endregion - - #endregion // Item-Specific - - #endregion // DatItem - } - - /// - /// Available hashing types - /// - [Flags] - public enum Hash - { - CRC = 1 << 0, - MD5 = 1 << 1, -#if NET_FRAMEWORK - RIPEMD160 = 1 << 2, -#endif - SHA1 = 1 << 3, - SHA256 = 1 << 4, - SHA384 = 1 << 5, - SHA512 = 1 << 6, - SpamSum = 1 << 7, - - // Special combinations - Standard = CRC | MD5 | SHA1, -#if NET_FRAMEWORK - DeepHashes = RIPEMD160 | SHA256 | SHA384 | SHA512 | SpamSum, - SecureHashes = MD5 | RIPEMD160 | SHA1 | SHA256 | SHA384 | SHA512 | SpamSum, -#else - DeepHashes = SHA256 | SHA384 | SHA512 | SpamSum, - SecureHashes = MD5 | SHA1 | SHA256 | SHA384 | SHA512 | SpamSum, -#endif - } - - /// - /// Determines what sort of files get externally hashed - /// - /// TODO: Can FileType be used instead? - [Flags] - public enum TreatAsFile - { - CHD = 1 << 0, - Archive = 1 << 1, - AaruFormat = 1 << 2, - - NonArchive = CHD | AaruFormat, - All = CHD | Archive | AaruFormat, - } - - #endregion - - #region FileTypes - - /// - /// Type of file that is being looked at - /// - public enum FileType - { - // Singleton - None = 0, - AaruFormat, - CHD, - - // Can contain children - Folder, - SevenZipArchive, - GZipArchive, - LRZipArchive, - LZ4Archive, - RarArchive, - TapeArchive, - XZArchive, - ZipArchive, - ZPAQArchive, - ZstdArchive, - } - - #endregion -} diff --git a/SabreTools.Data/SabreTools.Data.csproj b/SabreTools.Data/SabreTools.Data.csproj deleted file mode 100644 index 42795bd9..00000000 --- a/SabreTools.Data/SabreTools.Data.csproj +++ /dev/null @@ -1,14 +0,0 @@ - - - - net48;netcoreapp3.1;net5.0 - win10-x64;win7-x86 - Debug;Release - AnyCPU;x64 - - - - NET_FRAMEWORK - - - diff --git a/SabreTools.IO/ClrMameProReader.cs b/SabreTools.IO/ClrMameProReader.cs index 754773dd..b2274403 100644 --- a/SabreTools.IO/ClrMameProReader.cs +++ b/SabreTools.IO/ClrMameProReader.cs @@ -5,7 +5,7 @@ using System.Linq; using System.Text; using System.Text.RegularExpressions; -using SabreTools.Data; +using SabreTools.Core; namespace SabreTools.IO { diff --git a/SabreTools.IO/DirectoryExtensions.cs b/SabreTools.IO/DirectoryExtensions.cs index 5e240696..ea5e75e9 100644 --- a/SabreTools.IO/DirectoryExtensions.cs +++ b/SabreTools.IO/DirectoryExtensions.cs @@ -3,7 +3,6 @@ using System.Collections.Generic; using System.IO; using System.Linq; -// TODO: Figure out a reasonable way of adding logging back to this namespace SabreTools.IO { /// @@ -92,34 +91,13 @@ namespace SabreTools.IO } // Get the parent path in case of appending - string parentPath; - try - { - parentPath = Path.GetFullPath(input); - } - catch (Exception ex) - { - //LoggerImpl.Error(ex, $"An exception occurred getting the full path for '{input}'"); - continue; - } - + string parentPath = Path.GetFullPath(input); if (Directory.Exists(input)) { List directories = GetDirectoriesOrdered(input, pattern); foreach (string dir in directories) { - try - { - outputs.Add(new ParentablePath(Path.GetFullPath(dir), appendparent ? parentPath : string.Empty)); - } - catch (PathTooLongException ex) - { - //LoggerImpl.Warning(ex, $"The path for '{dir}' was too long"); - } - catch (Exception ex) - { - //LoggerImpl.Error(ex, $"An exception occurred processing '{dir}'"); - } + outputs.Add(new ParentablePath(Path.GetFullPath(dir), appendparent ? parentPath : string.Empty)); } } } @@ -188,50 +166,18 @@ namespace SabreTools.IO } // Get the parent path in case of appending - string parentPath; - try - { - parentPath = Path.GetFullPath(input); - } - catch (Exception ex) - { - //LoggerImpl.Error(ex, $"An exception occurred getting the full path for '{input}'"); - continue; - } - + string parentPath = Path.GetFullPath(input); if (Directory.Exists(input)) { List files = GetFilesOrdered(input, pattern); foreach (string file in files) { - try - { - outputs.Add(new ParentablePath(Path.GetFullPath(file), appendparent ? parentPath : string.Empty)); - } - catch (PathTooLongException ex) - { - //LoggerImpl.Warning(ex, $"The path for '{file}' was too long"); - } - catch (Exception ex) - { - //LoggerImpl.Error(ex, $"An exception occurred processing '{file}'"); - } + outputs.Add(new ParentablePath(Path.GetFullPath(file), appendparent ? parentPath : string.Empty)); } } else if (File.Exists(input)) { - try - { - outputs.Add(new ParentablePath(Path.GetFullPath(input), appendparent ? parentPath : string.Empty)); - } - catch (PathTooLongException ex) - { - //LoggerImpl.Warning(ex, $"The path for '{input}' was too long"); - } - catch (Exception ex) - { - //LoggerImpl.Error(ex, $"An exception occurred processing '{input}'"); - } + outputs.Add(new ParentablePath(Path.GetFullPath(input), appendparent ? parentPath : string.Empty)); } } diff --git a/SabreTools.IO/Hasher.cs b/SabreTools.IO/Hasher.cs index 1a443288..fdd6931f 100644 --- a/SabreTools.IO/Hasher.cs +++ b/SabreTools.IO/Hasher.cs @@ -3,7 +3,7 @@ using System.Linq; using System.Security.Cryptography; using Aaru.Checksums; -using SabreTools.Data; +using SabreTools.Core; namespace SabreTools.IO { diff --git a/SabreTools.IO/PathExtensions.cs b/SabreTools.IO/PathExtensions.cs index 8b837644..86d69c7a 100644 --- a/SabreTools.IO/PathExtensions.cs +++ b/SabreTools.IO/PathExtensions.cs @@ -1,6 +1,6 @@ using System.IO; -using SabreTools.Data; +using SabreTools.Core; namespace SabreTools.IO { diff --git a/SabreTools.IO/SabreTools.IO.csproj b/SabreTools.IO/SabreTools.IO.csproj index 52f3272d..98554a2d 100644 --- a/SabreTools.IO/SabreTools.IO.csproj +++ b/SabreTools.IO/SabreTools.IO.csproj @@ -12,7 +12,7 @@ - + diff --git a/SabreTools.Library/DatFiles/AttractMode.cs b/SabreTools.Library/DatFiles/AttractMode.cs index b4fa6b44..7f541418 100644 --- a/SabreTools.Library/DatFiles/AttractMode.cs +++ b/SabreTools.Library/DatFiles/AttractMode.cs @@ -3,7 +3,7 @@ using System.Collections.Generic; using System.IO; using System.Text; -using SabreTools.Data; +using SabreTools.Core; using SabreTools.IO; using SabreTools.Library.DatItems; diff --git a/SabreTools.Library/DatFiles/ClrMamePro.cs b/SabreTools.Library/DatFiles/ClrMamePro.cs index 5ca24b02..e86c7231 100644 --- a/SabreTools.Library/DatFiles/ClrMamePro.cs +++ b/SabreTools.Library/DatFiles/ClrMamePro.cs @@ -3,10 +3,9 @@ using System.Collections.Generic; using System.IO; using System.Text; -using SabreTools.Data; +using SabreTools.Core; using SabreTools.IO; using SabreTools.Library.DatItems; -using SabreTools.Library.Tools; namespace SabreTools.Library.DatFiles { diff --git a/SabreTools.Library/DatFiles/DatFile.cs b/SabreTools.Library/DatFiles/DatFile.cs index 84883745..f287f828 100644 --- a/SabreTools.Library/DatFiles/DatFile.cs +++ b/SabreTools.Library/DatFiles/DatFile.cs @@ -9,7 +9,7 @@ using System.Threading; using System.Threading.Tasks; using System.Xml.Serialization; -using SabreTools.Data; +using SabreTools.Core; using SabreTools.IO; using SabreTools.Logging; using SabreTools.Library.DatItems; @@ -17,7 +17,6 @@ using SabreTools.Library.FileTypes; using SabreTools.Library.Filtering; using SabreTools.Library.IO; using SabreTools.Library.Reports; -using SabreTools.Library.Tools; using SabreTools.Skippers; using NaturalSort; using Newtonsoft.Json; diff --git a/SabreTools.Library/DatFiles/DatHeader.cs b/SabreTools.Library/DatFiles/DatHeader.cs index 8b8dcdc9..16d2c365 100644 --- a/SabreTools.Library/DatFiles/DatHeader.cs +++ b/SabreTools.Library/DatFiles/DatHeader.cs @@ -4,10 +4,8 @@ using System.IO; using System.Linq; using System.Xml.Serialization; -using SabreTools.Data; +using SabreTools.Core; using SabreTools.IO; -using SabreTools.Library.DatItems; -using SabreTools.Library.Tools; using Newtonsoft.Json; namespace SabreTools.Library.DatFiles diff --git a/SabreTools.Library/DatFiles/DepotInformation.cs b/SabreTools.Library/DatFiles/DepotInformation.cs index 5fe1364a..f0c7b72b 100644 --- a/SabreTools.Library/DatFiles/DepotInformation.cs +++ b/SabreTools.Library/DatFiles/DepotInformation.cs @@ -1,6 +1,6 @@ using System; -using SabreTools.Data; +using SabreTools.Core; namespace SabreTools.Library.DatFiles { diff --git a/SabreTools.Library/DatFiles/DosCenter.cs b/SabreTools.Library/DatFiles/DosCenter.cs index f3c2f3ab..eace6e38 100644 --- a/SabreTools.Library/DatFiles/DosCenter.cs +++ b/SabreTools.Library/DatFiles/DosCenter.cs @@ -4,9 +4,9 @@ using System.IO; using System.Linq; using System.Text; +using SabreTools.Core; using SabreTools.IO; using SabreTools.Library.DatItems; -using SabreTools.Library.Tools; namespace SabreTools.Library.DatFiles { diff --git a/SabreTools.Library/DatFiles/Enums.cs b/SabreTools.Library/DatFiles/Enums.cs deleted file mode 100644 index b0f5ce3a..00000000 --- a/SabreTools.Library/DatFiles/Enums.cs +++ /dev/null @@ -1,68 +0,0 @@ -using System; - -namespace SabreTools.Library.DatFiles -{ - /// - /// Determines merging tag handling for DAT output - /// - public enum MergingFlag - { - None = 0, - Split, - Merged, - NonMerged, - Full, - - /// This is not usually defined for Merging flags - Device, - } - - /// - /// Determines nodump tag handling for DAT output - /// - public enum NodumpFlag - { - None = 0, - Obsolete, - Required, - Ignore, - } - - /// - /// Determines packing tag handling for DAT output - /// - public enum PackingFlag - { - None = 0, - - /// - /// Force all sets to be in archives, except disk and media - /// - Zip, - - /// - /// Force all sets to be extracted into subfolders - /// - Unzip, - - /// - /// Force sets with single items to be extracted to the parent folder - /// - Partial, - - /// - /// Force all sets to be extracted to the parent folder - /// - Flat, - } - - /// - /// Determines which files should be skipped in DFD - /// - public enum SkipFileType - { - None = 0, - Archive, - File, - } -} diff --git a/SabreTools.Library/DatFiles/EverdriveSmdb.cs b/SabreTools.Library/DatFiles/EverdriveSmdb.cs index 051b76d3..1ceccc73 100644 --- a/SabreTools.Library/DatFiles/EverdriveSmdb.cs +++ b/SabreTools.Library/DatFiles/EverdriveSmdb.cs @@ -3,6 +3,7 @@ using System.Collections.Generic; using System.IO; using System.Text; +using SabreTools.Core; using SabreTools.IO; using SabreTools.Library.DatItems; diff --git a/SabreTools.Library/DatFiles/Hashfile.cs b/SabreTools.Library/DatFiles/Hashfile.cs index 87d5c27c..19f43aba 100644 --- a/SabreTools.Library/DatFiles/Hashfile.cs +++ b/SabreTools.Library/DatFiles/Hashfile.cs @@ -3,7 +3,7 @@ using System.Collections.Generic; using System.IO; using System.Text; -using SabreTools.Data; +using SabreTools.Core; using SabreTools.IO; using SabreTools.Library.DatItems; diff --git a/SabreTools.Library/DatFiles/ItemDictionary.cs b/SabreTools.Library/DatFiles/ItemDictionary.cs index 3cbec24d..f8a1a203 100644 --- a/SabreTools.Library/DatFiles/ItemDictionary.cs +++ b/SabreTools.Library/DatFiles/ItemDictionary.cs @@ -8,7 +8,7 @@ using System.Net; using System.Threading.Tasks; using System.Xml.Serialization; -using SabreTools.Data; +using SabreTools.Core; using SabreTools.IO; using SabreTools.Logging; using SabreTools.Library.DatItems; diff --git a/SabreTools.Library/DatFiles/Listrom.cs b/SabreTools.Library/DatFiles/Listrom.cs index 3b2f5043..9bed3df8 100644 --- a/SabreTools.Library/DatFiles/Listrom.cs +++ b/SabreTools.Library/DatFiles/Listrom.cs @@ -4,9 +4,9 @@ using System.IO; using System.Text; using System.Text.RegularExpressions; +using SabreTools.Core; using SabreTools.IO; using SabreTools.Library.DatItems; -using SabreTools.Library.Tools; namespace SabreTools.Library.DatFiles { diff --git a/SabreTools.Library/DatFiles/Listxml.cs b/SabreTools.Library/DatFiles/Listxml.cs index 1d1b9ac0..29235a48 100644 --- a/SabreTools.Library/DatFiles/Listxml.cs +++ b/SabreTools.Library/DatFiles/Listxml.cs @@ -6,9 +6,9 @@ using System.Text; using System.Xml; using System.Xml.Schema; +using SabreTools.Core; using SabreTools.IO; using SabreTools.Library.DatItems; -using SabreTools.Library.Tools; namespace SabreTools.Library.DatFiles { diff --git a/SabreTools.Library/DatFiles/Logiqx.cs b/SabreTools.Library/DatFiles/Logiqx.cs index e86d8748..dfc8c8be 100644 --- a/SabreTools.Library/DatFiles/Logiqx.cs +++ b/SabreTools.Library/DatFiles/Logiqx.cs @@ -7,9 +7,9 @@ using System.Text.RegularExpressions; using System.Xml; using System.Xml.Schema; +using SabreTools.Core; using SabreTools.IO; using SabreTools.Library.DatItems; -using SabreTools.Library.Tools; namespace SabreTools.Library.DatFiles { diff --git a/SabreTools.Library/DatFiles/OfflineList.cs b/SabreTools.Library/DatFiles/OfflineList.cs index f215fc5e..549fb333 100644 --- a/SabreTools.Library/DatFiles/OfflineList.cs +++ b/SabreTools.Library/DatFiles/OfflineList.cs @@ -5,9 +5,9 @@ using System.Text; using System.Xml; using System.Xml.Schema; +using SabreTools.Core; using SabreTools.IO; using SabreTools.Library.DatItems; -using SabreTools.Library.Tools; namespace SabreTools.Library.DatFiles { diff --git a/SabreTools.Library/DatFiles/OpenMSX.cs b/SabreTools.Library/DatFiles/OpenMSX.cs index f6872438..69c26d5c 100644 --- a/SabreTools.Library/DatFiles/OpenMSX.cs +++ b/SabreTools.Library/DatFiles/OpenMSX.cs @@ -5,9 +5,9 @@ using System.Text; using System.Xml; using System.Xml.Schema; +using SabreTools.Core; using SabreTools.IO; using SabreTools.Library.DatItems; -using SabreTools.Library.Tools; namespace SabreTools.Library.DatFiles { diff --git a/SabreTools.Library/DatFiles/RomCenter.cs b/SabreTools.Library/DatFiles/RomCenter.cs index d816c8c2..12f2b6af 100644 --- a/SabreTools.Library/DatFiles/RomCenter.cs +++ b/SabreTools.Library/DatFiles/RomCenter.cs @@ -3,9 +3,9 @@ using System.Collections.Generic; using System.IO; using System.Text; +using SabreTools.Core; using SabreTools.IO; using SabreTools.Library.DatItems; -using SabreTools.Library.Tools; namespace SabreTools.Library.DatFiles { diff --git a/SabreTools.Library/DatFiles/SabreJSON.cs b/SabreTools.Library/DatFiles/SabreJSON.cs index ba61f986..6efa0d46 100644 --- a/SabreTools.Library/DatFiles/SabreJSON.cs +++ b/SabreTools.Library/DatFiles/SabreJSON.cs @@ -3,8 +3,8 @@ using System.Collections.Generic; using System.IO; using System.Text; +using SabreTools.Core; using SabreTools.Library.DatItems; -using SabreTools.Library.Tools; using Newtonsoft.Json; using Newtonsoft.Json.Linq; diff --git a/SabreTools.Library/DatFiles/SeparatedValue.cs b/SabreTools.Library/DatFiles/SeparatedValue.cs index 74f53d10..6ce981ad 100644 --- a/SabreTools.Library/DatFiles/SeparatedValue.cs +++ b/SabreTools.Library/DatFiles/SeparatedValue.cs @@ -3,10 +3,9 @@ using System.Collections.Generic; using System.IO; using System.Text; -using SabreTools.Data; +using SabreTools.Core; using SabreTools.IO; using SabreTools.Library.DatItems; -using SabreTools.Library.Tools; namespace SabreTools.Library.DatFiles { diff --git a/SabreTools.Library/DatFiles/SoftwareList.cs b/SabreTools.Library/DatFiles/SoftwareList.cs index c2a48540..742b9c29 100644 --- a/SabreTools.Library/DatFiles/SoftwareList.cs +++ b/SabreTools.Library/DatFiles/SoftwareList.cs @@ -6,9 +6,9 @@ using System.Text; using System.Xml; using System.Xml.Schema; +using SabreTools.Core; using SabreTools.IO; using SabreTools.Library.DatItems; -using SabreTools.Library.Tools; // TODO: Use softwarelist.dtd and *try* to make this write more correctly namespace SabreTools.Library.DatFiles diff --git a/SabreTools.Library/DatItems/Adjuster.cs b/SabreTools.Library/DatItems/Adjuster.cs index 98631810..12f316c3 100644 --- a/SabreTools.Library/DatItems/Adjuster.cs +++ b/SabreTools.Library/DatItems/Adjuster.cs @@ -3,9 +3,8 @@ using System.IO; using System.Linq; using System.Xml.Serialization; -using SabreTools.Data; +using SabreTools.Core; using SabreTools.Library.Filtering; -using SabreTools.Library.Tools; using Newtonsoft.Json; namespace SabreTools.Library.DatItems diff --git a/SabreTools.Library/DatItems/Analog.cs b/SabreTools.Library/DatItems/Analog.cs index 77d3db0b..9535e809 100644 --- a/SabreTools.Library/DatItems/Analog.cs +++ b/SabreTools.Library/DatItems/Analog.cs @@ -2,7 +2,7 @@ using System.Linq; using System.Xml.Serialization; -using SabreTools.Data; +using SabreTools.Core; using SabreTools.Library.Filtering; using Newtonsoft.Json; diff --git a/SabreTools.Library/DatItems/Archive.cs b/SabreTools.Library/DatItems/Archive.cs index 23a8a755..58d5a2dd 100644 --- a/SabreTools.Library/DatItems/Archive.cs +++ b/SabreTools.Library/DatItems/Archive.cs @@ -3,9 +3,8 @@ using System.IO; using System.Linq; using System.Xml.Serialization; -using SabreTools.Data; +using SabreTools.Core; using SabreTools.Library.Filtering; -using SabreTools.Library.Tools; using Newtonsoft.Json; namespace SabreTools.Library.DatItems diff --git a/SabreTools.Library/DatItems/BiosSet.cs b/SabreTools.Library/DatItems/BiosSet.cs index 2279b0d3..9e63974c 100644 --- a/SabreTools.Library/DatItems/BiosSet.cs +++ b/SabreTools.Library/DatItems/BiosSet.cs @@ -3,9 +3,8 @@ using System.IO; using System.Linq; using System.Xml.Serialization; -using SabreTools.Data; +using SabreTools.Core; using SabreTools.Library.Filtering; -using SabreTools.Library.Tools; using Newtonsoft.Json; namespace SabreTools.Library.DatItems diff --git a/SabreTools.Library/DatItems/Blank.cs b/SabreTools.Library/DatItems/Blank.cs index bdd182ca..75ba04a6 100644 --- a/SabreTools.Library/DatItems/Blank.cs +++ b/SabreTools.Library/DatItems/Blank.cs @@ -1,5 +1,6 @@ using System.Xml.Serialization; +using SabreTools.Core; using Newtonsoft.Json; namespace SabreTools.Library.DatItems diff --git a/SabreTools.Library/DatItems/Chip.cs b/SabreTools.Library/DatItems/Chip.cs index de3ccf78..817cbcda 100644 --- a/SabreTools.Library/DatItems/Chip.cs +++ b/SabreTools.Library/DatItems/Chip.cs @@ -4,9 +4,8 @@ using System.IO; using System.Linq; using System.Xml.Serialization; -using SabreTools.Data; +using SabreTools.Core; using SabreTools.Library.Filtering; -using SabreTools.Library.Tools; using Newtonsoft.Json; using Newtonsoft.Json.Converters; diff --git a/SabreTools.Library/DatItems/Condition.cs b/SabreTools.Library/DatItems/Condition.cs index ce3d6f51..1f5c16ea 100644 --- a/SabreTools.Library/DatItems/Condition.cs +++ b/SabreTools.Library/DatItems/Condition.cs @@ -2,9 +2,8 @@ using System.Linq; using System.Xml.Serialization; -using SabreTools.Data; +using SabreTools.Core; using SabreTools.Library.Filtering; -using SabreTools.Library.Tools; using Newtonsoft.Json; using Newtonsoft.Json.Converters; diff --git a/SabreTools.Library/DatItems/Configuration.cs b/SabreTools.Library/DatItems/Configuration.cs index db3e2a66..8f775471 100644 --- a/SabreTools.Library/DatItems/Configuration.cs +++ b/SabreTools.Library/DatItems/Configuration.cs @@ -3,9 +3,8 @@ using System.IO; using System.Linq; using System.Xml.Serialization; -using SabreTools.Data; +using SabreTools.Core; using SabreTools.Library.Filtering; -using SabreTools.Library.Tools; using Newtonsoft.Json; namespace SabreTools.Library.DatItems diff --git a/SabreTools.Library/DatItems/Control.cs b/SabreTools.Library/DatItems/Control.cs index 98365ed7..199652c8 100644 --- a/SabreTools.Library/DatItems/Control.cs +++ b/SabreTools.Library/DatItems/Control.cs @@ -3,9 +3,8 @@ using System.Collections.Generic; using System.Linq; using System.Xml.Serialization; -using SabreTools.Data; +using SabreTools.Core; using SabreTools.Library.Filtering; -using SabreTools.Library.Tools; using Newtonsoft.Json; using Newtonsoft.Json.Converters; diff --git a/SabreTools.Library/DatItems/DatItem.cs b/SabreTools.Library/DatItems/DatItem.cs index e6115aa7..e4f1c5cb 100644 --- a/SabreTools.Library/DatItems/DatItem.cs +++ b/SabreTools.Library/DatItems/DatItem.cs @@ -4,11 +4,10 @@ using System.IO; using System.Linq; using System.Xml.Serialization; -using SabreTools.Data; +using SabreTools.Core; using SabreTools.Logging; using SabreTools.Library.FileTypes; using SabreTools.Library.Filtering; -using SabreTools.Library.Tools; using NaturalSort; using Newtonsoft.Json; using Newtonsoft.Json.Converters; @@ -1148,7 +1147,7 @@ namespace SabreTools.Library.DatItems return (norename ? nc.Compare(x.Machine.Name, y.Machine.Name) : x.Source.Index - y.Source.Index); } - catch (Exception ex) + catch { // Absorb the error return 0; diff --git a/SabreTools.Library/DatItems/DataArea.cs b/SabreTools.Library/DatItems/DataArea.cs index 8ea00a44..cd6fa3d5 100644 --- a/SabreTools.Library/DatItems/DataArea.cs +++ b/SabreTools.Library/DatItems/DataArea.cs @@ -4,9 +4,8 @@ using System.IO; using System.Linq; using System.Xml.Serialization; -using SabreTools.Data; +using SabreTools.Core; using SabreTools.Library.Filtering; -using SabreTools.Library.Tools; using Newtonsoft.Json; namespace SabreTools.Library.DatItems diff --git a/SabreTools.Library/DatItems/Device.cs b/SabreTools.Library/DatItems/Device.cs index 45a24d59..2ca3f637 100644 --- a/SabreTools.Library/DatItems/Device.cs +++ b/SabreTools.Library/DatItems/Device.cs @@ -2,9 +2,8 @@ using System.Linq; using System.Xml.Serialization; -using SabreTools.Data; +using SabreTools.Core; using SabreTools.Library.Filtering; -using SabreTools.Library.Tools; using Newtonsoft.Json; using Newtonsoft.Json.Converters; diff --git a/SabreTools.Library/DatItems/DeviceReference.cs b/SabreTools.Library/DatItems/DeviceReference.cs index 3518e6f4..615ded43 100644 --- a/SabreTools.Library/DatItems/DeviceReference.cs +++ b/SabreTools.Library/DatItems/DeviceReference.cs @@ -3,9 +3,8 @@ using System.IO; using System.Linq; using System.Xml.Serialization; -using SabreTools.Data; +using SabreTools.Core; using SabreTools.Library.Filtering; -using SabreTools.Library.Tools; using Newtonsoft.Json; namespace SabreTools.Library.DatItems diff --git a/SabreTools.Library/DatItems/DipSwitch.cs b/SabreTools.Library/DatItems/DipSwitch.cs index 7398b563..307e9e11 100644 --- a/SabreTools.Library/DatItems/DipSwitch.cs +++ b/SabreTools.Library/DatItems/DipSwitch.cs @@ -3,9 +3,8 @@ using System.IO; using System.Linq; using System.Xml.Serialization; -using SabreTools.Data; +using SabreTools.Core; using SabreTools.Library.Filtering; -using SabreTools.Library.Tools; using Newtonsoft.Json; namespace SabreTools.Library.DatItems diff --git a/SabreTools.Library/DatItems/Disk.cs b/SabreTools.Library/DatItems/Disk.cs index 00e82fa4..43c6aa9d 100644 --- a/SabreTools.Library/DatItems/Disk.cs +++ b/SabreTools.Library/DatItems/Disk.cs @@ -3,10 +3,9 @@ using System.IO; using System.Linq; using System.Xml.Serialization; -using SabreTools.Data; +using SabreTools.Core; using SabreTools.Library.FileTypes; using SabreTools.Library.Filtering; -using SabreTools.Library.Tools; using Newtonsoft.Json; using Newtonsoft.Json.Converters; diff --git a/SabreTools.Library/DatItems/DiskArea.cs b/SabreTools.Library/DatItems/DiskArea.cs index 36c69144..c1b8f439 100644 --- a/SabreTools.Library/DatItems/DiskArea.cs +++ b/SabreTools.Library/DatItems/DiskArea.cs @@ -4,9 +4,8 @@ using System.IO; using System.Linq; using System.Xml.Serialization; -using SabreTools.Data; +using SabreTools.Core; using SabreTools.Library.Filtering; -using SabreTools.Library.Tools; using Newtonsoft.Json; namespace SabreTools.Library.DatItems diff --git a/SabreTools.Library/DatItems/Display.cs b/SabreTools.Library/DatItems/Display.cs index 0f20587c..f13f0a93 100644 --- a/SabreTools.Library/DatItems/Display.cs +++ b/SabreTools.Library/DatItems/Display.cs @@ -3,9 +3,8 @@ using System.Collections.Generic; using System.Linq; using System.Xml.Serialization; -using SabreTools.Data; +using SabreTools.Core; using SabreTools.Library.Filtering; -using SabreTools.Library.Tools; using Newtonsoft.Json; using Newtonsoft.Json.Converters; diff --git a/SabreTools.Library/DatItems/Driver.cs b/SabreTools.Library/DatItems/Driver.cs index 67d63ad6..a2012b6a 100644 --- a/SabreTools.Library/DatItems/Driver.cs +++ b/SabreTools.Library/DatItems/Driver.cs @@ -2,9 +2,8 @@ using System.Linq; using System.Xml.Serialization; -using SabreTools.Data; +using SabreTools.Core; using SabreTools.Library.Filtering; -using SabreTools.Library.Tools; using Newtonsoft.Json; using Newtonsoft.Json.Converters; diff --git a/SabreTools.Library/DatItems/Enums.cs b/SabreTools.Library/DatItems/Enums.cs deleted file mode 100644 index aa2e84a3..00000000 --- a/SabreTools.Library/DatItems/Enums.cs +++ /dev/null @@ -1,378 +0,0 @@ -using System; - -namespace SabreTools.Library.DatItems -{ - /// - /// Determine the chip type - /// - [Flags] - public enum ChipType - { - /// - /// This is a fake flag that is used for filter only - /// - NULL = 0, - - CPU = 1 << 0, - Audio = 1 << 1, - } - - /// - /// Determine the control type - /// - [Flags] - public enum ControlType - { - /// - /// This is a fake flag that is used for filter only - /// - NULL = 0, - - Joy = 1 << 0, - Stick = 1 << 1, - Paddle = 1 << 2, - Pedal = 1 << 3, - Lightgun = 1 << 4, - Positional = 1 << 5, - Dial = 1 << 6, - Trackball = 1 << 7, - Mouse = 1 << 8, - OnlyButtons = 1 << 9, - Keypad = 1 << 10, - Keyboard = 1 << 11, - Mahjong = 1 << 12, - Hanafuda = 1 << 13, - Gambling = 1 << 14, - } - - /// - /// Determine the device type - /// - [Flags] - public enum DeviceType - { - /// - /// This is a fake flag that is used for filter only - /// - NULL = 0, - - Unknown = 1 << 0, - Cartridge = 1 << 1, - FloppyDisk = 1 << 2, - HardDisk = 1 << 3, - Cylinder = 1 << 4, - Cassette = 1 << 5, - PunchCard = 1 << 6, - PunchTape = 1 << 7, - Printout = 1 << 8, - Serial = 1 << 9, - Parallel = 1 << 10, - Snapshot = 1 << 11, - QuickLoad = 1 << 12, - MemCard = 1 << 13, - CDROM = 1 << 14, - MagTape = 1 << 15, - ROMImage = 1 << 16, - MIDIIn = 1 << 17, - MIDIOut = 1 << 18, - Picture = 1 << 19, - VidFile = 1 << 20, - } - - /// - /// Determine the display type - /// - [Flags] - public enum DisplayType - { - /// - /// This is a fake flag that is used for filter only - /// - NULL = 0, - - Raster = 1 << 0, - Vector = 1 << 1, - LCD = 1 << 2, - SVG = 1 << 3, - Unknown = 1 << 4, - } - - /// - /// Determines which type of duplicate a file is - /// - [Flags] - public enum DupeType - { - // Type of match - Hash = 1 << 0, - All = 1 << 1, - - // Location of match - Internal = 1 << 2, - External = 1 << 3, - } - - /// - /// Determine the endianness - /// - [Flags] - public enum Endianness - { - /// - /// This is a fake flag that is used for filter only - /// - NULL = 0, - - Big = 1 << 0, - Little = 1 << 1, - } - - /// - /// Determine the emulation status - /// - [Flags] - public enum FeatureStatus - { - /// - /// This is a fake flag that is used for filter only - /// - NULL = 0, - - Unemulated = 1 << 0, - Imperfect = 1 << 1, - } - - /// - /// Determine the feature type - /// - [Flags] - public enum FeatureType - { - /// - /// This is a fake flag that is used for filter only - /// - NULL = 0, - - Protection = 1 << 0, - Palette = 1 << 1, - Graphics = 1 << 2, - Sound = 1 << 3, - Controls = 1 << 4, - Keyboard = 1 << 5, - Mouse = 1 << 6, - Microphone = 1 << 7, - Camera = 1 << 8, - Disk = 1 << 9, - Printer = 1 << 10, - Lan = 1 << 11, - Wan = 1 << 12, - Timing = 1 << 13, - } - - /// - /// Determine the status of the item - /// - [Flags] - public enum ItemStatus - { - /// - /// This is a fake flag that is used for filter only - /// - NULL = 0, - - None = 1 << 0, - Good = 1 << 1, - BadDump = 1 << 2, - Nodump = 1 << 3, - Verified = 1 << 4, - } - - /// - /// Determine what type of file an item is - /// - public enum ItemType - { - // "Actionable" item types - Rom, - Disk, - Media, - - // "Auxiliary" item types - Adjuster, - Analog, - Archive, - BiosSet, - Chip, - Condition, - Configuration, - Control, - DataArea, - Device, - DeviceReference, - DipSwitch, - DiskArea, - Display, - Driver, - Extension, - Feature, - Info, - Input, - Instance, - Location, - Part, - PartFeature, - Port, - RamOption, - Release, - Sample, - Setting, - SharedFeature, - Slot, - SlotOption, - SoftwareList, - Sound, - - Blank = 99, // This is not a real type, only used internally - } - - /// - /// Determine the loadflag value - /// - [Flags] - public enum LoadFlag - { - /// - /// This is a fake flag that is used for filter only - /// - NULL = 0, - - Load16Byte = 1 << 0, - Load16Word = 1 << 1, - Load16WordSwap = 1 << 2, - Load32Byte = 1 << 3, - Load32Word = 1 << 4, - Load32WordSwap = 1 << 5, - Load32DWord = 1 << 6, - Load64Word = 1 << 7, - Load64WordSwap = 1 << 8, - Reload = 1 << 9, - Fill = 1 << 10, - Continue = 1 << 11, - ReloadPlain = 1 << 12, - Ignore = 1 << 13, - } - - /// - /// Determine what type of machine it is - /// - [Flags] - public enum MachineType - { - /// - /// This is a fake flag that is used for filter only - /// - NULL = 1 << 0, - - Bios = 1 << 1, - Device = 1 << 2, - Mechanical = 1 << 3, - } - - /// - /// Determine which OpenMSX subtype an item is - /// - [Flags] - public enum OpenMSXSubType - { - /// - /// This is a fake flag that is used for filter only - /// - NULL = 0, - - Rom = 1 << 0, - MegaRom = 1 << 1, - SCCPlusCart = 1 << 2, - } - - /// - /// Determine relation of value to condition - /// - [Flags] - public enum Relation - { - /// - /// This is a fake flag that is used for filter only - /// - NULL = 0, - - Equal = 1 << 0, - NotEqual = 1 << 1, - GreaterThan = 1 << 2, - LessThanOrEqual = 1 << 3, - LessThan = 1 << 4, - GreaterThanOrEqual = 1 << 5, - } - - /// - /// Determine machine runnable status - /// - [Flags] - public enum Runnable - { - /// - /// This is a fake flag that is used for filter only - /// - NULL = 0, - - No = 1 << 0, - Partial = 1 << 1, - Yes = 1 << 2, - } - - /// - /// Determine software list status - /// - [Flags] - public enum SoftwareListStatus - { - /// - /// This is a fake flag that is used for filter only - /// - NULL = 0, - - Original = 1 << 0, - Compatible = 1 << 1, - } - - /// - /// Determine machine support status - /// - [Flags] - public enum Supported - { - /// - /// This is a fake flag that is used for filter only - /// - NULL = 0, - - No = 1 << 0, - Partial = 1 << 1, - Yes = 1 << 2, - } - - /// - /// Determine driver support statuses - /// - [Flags] - public enum SupportStatus - { - /// - /// This is a fake flag that is used for filter only - /// - NULL = 0, - - Good = 1 << 0, - Imperfect = 1 << 1, - Preliminary = 1 << 2, - } -} diff --git a/SabreTools.Library/DatItems/Extension.cs b/SabreTools.Library/DatItems/Extension.cs index 0ba81c9e..8746a3e9 100644 --- a/SabreTools.Library/DatItems/Extension.cs +++ b/SabreTools.Library/DatItems/Extension.cs @@ -3,9 +3,8 @@ using System.IO; using System.Linq; using System.Xml.Serialization; -using SabreTools.Data; +using SabreTools.Core; using SabreTools.Library.Filtering; -using SabreTools.Library.Tools; using Newtonsoft.Json; namespace SabreTools.Library.DatItems diff --git a/SabreTools.Library/DatItems/Feature.cs b/SabreTools.Library/DatItems/Feature.cs index b0349e19..810b303b 100644 --- a/SabreTools.Library/DatItems/Feature.cs +++ b/SabreTools.Library/DatItems/Feature.cs @@ -2,9 +2,8 @@ using System.Linq; using System.Xml.Serialization; -using SabreTools.Data; +using SabreTools.Core; using SabreTools.Library.Filtering; -using SabreTools.Library.Tools; using Newtonsoft.Json; using Newtonsoft.Json.Converters; diff --git a/SabreTools.Library/DatItems/Info.cs b/SabreTools.Library/DatItems/Info.cs index da88d7ca..2f33efbf 100644 --- a/SabreTools.Library/DatItems/Info.cs +++ b/SabreTools.Library/DatItems/Info.cs @@ -3,9 +3,8 @@ using System.IO; using System.Linq; using System.Xml.Serialization; -using SabreTools.Data; +using SabreTools.Core; using SabreTools.Library.Filtering; -using SabreTools.Library.Tools; using Newtonsoft.Json; namespace SabreTools.Library.DatItems diff --git a/SabreTools.Library/DatItems/Input.cs b/SabreTools.Library/DatItems/Input.cs index cc0b239c..eb705b39 100644 --- a/SabreTools.Library/DatItems/Input.cs +++ b/SabreTools.Library/DatItems/Input.cs @@ -3,9 +3,8 @@ using System.Collections.Generic; using System.Linq; using System.Xml.Serialization; -using SabreTools.Data; +using SabreTools.Core; using SabreTools.Library.Filtering; -using SabreTools.Library.Tools; using Newtonsoft.Json; namespace SabreTools.Library.DatItems diff --git a/SabreTools.Library/DatItems/Instance.cs b/SabreTools.Library/DatItems/Instance.cs index 9889c163..4a956978 100644 --- a/SabreTools.Library/DatItems/Instance.cs +++ b/SabreTools.Library/DatItems/Instance.cs @@ -3,9 +3,8 @@ using System.IO; using System.Linq; using System.Xml.Serialization; -using SabreTools.Data; +using SabreTools.Core; using SabreTools.Library.Filtering; -using SabreTools.Library.Tools; using Newtonsoft.Json; namespace SabreTools.Library.DatItems diff --git a/SabreTools.Library/DatItems/Location.cs b/SabreTools.Library/DatItems/Location.cs index 22664ea4..5e49d3e3 100644 --- a/SabreTools.Library/DatItems/Location.cs +++ b/SabreTools.Library/DatItems/Location.cs @@ -3,9 +3,8 @@ using System.IO; using System.Linq; using System.Xml.Serialization; -using SabreTools.Data; +using SabreTools.Core; using SabreTools.Library.Filtering; -using SabreTools.Library.Tools; using Newtonsoft.Json; namespace SabreTools.Library.DatItems diff --git a/SabreTools.Library/DatItems/Machine.cs b/SabreTools.Library/DatItems/Machine.cs index 874c08de..8b751bb7 100644 --- a/SabreTools.Library/DatItems/Machine.cs +++ b/SabreTools.Library/DatItems/Machine.cs @@ -3,9 +3,8 @@ using System.Collections.Generic; using System.Linq; using System.Xml.Serialization; -using SabreTools.Data; +using SabreTools.Core; using SabreTools.Library.Filtering; -using SabreTools.Library.Tools; using Newtonsoft.Json; using Newtonsoft.Json.Converters; diff --git a/SabreTools.Library/DatItems/Media.cs b/SabreTools.Library/DatItems/Media.cs index eda7991e..60bca6c8 100644 --- a/SabreTools.Library/DatItems/Media.cs +++ b/SabreTools.Library/DatItems/Media.cs @@ -4,10 +4,9 @@ using System.Linq; using System.Text; using System.Xml.Serialization; -using SabreTools.Data; +using SabreTools.Core; using SabreTools.Library.FileTypes; using SabreTools.Library.Filtering; -using SabreTools.Library.Tools; using Newtonsoft.Json; namespace SabreTools.Library.DatItems diff --git a/SabreTools.Library/DatItems/Part.cs b/SabreTools.Library/DatItems/Part.cs index 6566dcb1..6478270f 100644 --- a/SabreTools.Library/DatItems/Part.cs +++ b/SabreTools.Library/DatItems/Part.cs @@ -4,9 +4,8 @@ using System.IO; using System.Linq; using System.Xml.Serialization; -using SabreTools.Data; +using SabreTools.Core; using SabreTools.Library.Filtering; -using SabreTools.Library.Tools; using Newtonsoft.Json; namespace SabreTools.Library.DatItems diff --git a/SabreTools.Library/DatItems/PartFeature.cs b/SabreTools.Library/DatItems/PartFeature.cs index 11867a0c..01d7d7ec 100644 --- a/SabreTools.Library/DatItems/PartFeature.cs +++ b/SabreTools.Library/DatItems/PartFeature.cs @@ -3,9 +3,8 @@ using System.IO; using System.Linq; using System.Xml.Serialization; -using SabreTools.Data; +using SabreTools.Core; using SabreTools.Library.Filtering; -using SabreTools.Library.Tools; using Newtonsoft.Json; namespace SabreTools.Library.DatItems diff --git a/SabreTools.Library/DatItems/Port.cs b/SabreTools.Library/DatItems/Port.cs index d3aae491..59c09783 100644 --- a/SabreTools.Library/DatItems/Port.cs +++ b/SabreTools.Library/DatItems/Port.cs @@ -2,7 +2,7 @@ using System.Linq; using System.Xml.Serialization; -using SabreTools.Data; +using SabreTools.Core; using SabreTools.Library.Filtering; using Newtonsoft.Json; diff --git a/SabreTools.Library/DatItems/RamOption.cs b/SabreTools.Library/DatItems/RamOption.cs index d6e1bd2f..d87ccb0c 100644 --- a/SabreTools.Library/DatItems/RamOption.cs +++ b/SabreTools.Library/DatItems/RamOption.cs @@ -3,9 +3,8 @@ using System.IO; using System.Linq; using System.Xml.Serialization; -using SabreTools.Data; +using SabreTools.Core; using SabreTools.Library.Filtering; -using SabreTools.Library.Tools; using Newtonsoft.Json; namespace SabreTools.Library.DatItems diff --git a/SabreTools.Library/DatItems/Release.cs b/SabreTools.Library/DatItems/Release.cs index 1ee8b8d3..51dcc9a8 100644 --- a/SabreTools.Library/DatItems/Release.cs +++ b/SabreTools.Library/DatItems/Release.cs @@ -3,9 +3,8 @@ using System.IO; using System.Linq; using System.Xml.Serialization; -using SabreTools.Data; +using SabreTools.Core; using SabreTools.Library.Filtering; -using SabreTools.Library.Tools; using Newtonsoft.Json; namespace SabreTools.Library.DatItems diff --git a/SabreTools.Library/DatItems/Rom.cs b/SabreTools.Library/DatItems/Rom.cs index 8ad7dd72..6e986a5e 100644 --- a/SabreTools.Library/DatItems/Rom.cs +++ b/SabreTools.Library/DatItems/Rom.cs @@ -5,10 +5,9 @@ using System.Linq; using System.Text; using System.Xml.Serialization; -using SabreTools.Data; +using SabreTools.Core; using SabreTools.Library.FileTypes; using SabreTools.Library.Filtering; -using SabreTools.Library.Tools; using Newtonsoft.Json; using Newtonsoft.Json.Converters; diff --git a/SabreTools.Library/DatItems/Sample.cs b/SabreTools.Library/DatItems/Sample.cs index d544cefd..41f9e50e 100644 --- a/SabreTools.Library/DatItems/Sample.cs +++ b/SabreTools.Library/DatItems/Sample.cs @@ -3,9 +3,8 @@ using System.IO; using System.Linq; using System.Xml.Serialization; -using SabreTools.Data; +using SabreTools.Core; using SabreTools.Library.Filtering; -using SabreTools.Library.Tools; using Newtonsoft.Json; namespace SabreTools.Library.DatItems diff --git a/SabreTools.Library/DatItems/Setting.cs b/SabreTools.Library/DatItems/Setting.cs index 5f0fc678..f93b1a86 100644 --- a/SabreTools.Library/DatItems/Setting.cs +++ b/SabreTools.Library/DatItems/Setting.cs @@ -3,9 +3,8 @@ using System.IO; using System.Linq; using System.Xml.Serialization; -using SabreTools.Data; +using SabreTools.Core; using SabreTools.Library.Filtering; -using SabreTools.Library.Tools; using Newtonsoft.Json; namespace SabreTools.Library.DatItems diff --git a/SabreTools.Library/DatItems/SharedFeature.cs b/SabreTools.Library/DatItems/SharedFeature.cs index 1a805348..85de4341 100644 --- a/SabreTools.Library/DatItems/SharedFeature.cs +++ b/SabreTools.Library/DatItems/SharedFeature.cs @@ -3,9 +3,8 @@ using System.IO; using System.Linq; using System.Xml.Serialization; -using SabreTools.Data; +using SabreTools.Core; using SabreTools.Library.Filtering; -using SabreTools.Library.Tools; using Newtonsoft.Json; namespace SabreTools.Library.DatItems diff --git a/SabreTools.Library/DatItems/Slot.cs b/SabreTools.Library/DatItems/Slot.cs index 3c5b9c1d..f7352b60 100644 --- a/SabreTools.Library/DatItems/Slot.cs +++ b/SabreTools.Library/DatItems/Slot.cs @@ -3,9 +3,8 @@ using System.IO; using System.Linq; using System.Xml.Serialization; -using SabreTools.Data; +using SabreTools.Core; using SabreTools.Library.Filtering; -using SabreTools.Library.Tools; using Newtonsoft.Json; namespace SabreTools.Library.DatItems diff --git a/SabreTools.Library/DatItems/SlotOption.cs b/SabreTools.Library/DatItems/SlotOption.cs index d00c7cae..6731044d 100644 --- a/SabreTools.Library/DatItems/SlotOption.cs +++ b/SabreTools.Library/DatItems/SlotOption.cs @@ -3,9 +3,8 @@ using System.IO; using System.Linq; using System.Xml.Serialization; -using SabreTools.Data; +using SabreTools.Core; using SabreTools.Library.Filtering; -using SabreTools.Library.Tools; using Newtonsoft.Json; namespace SabreTools.Library.DatItems diff --git a/SabreTools.Library/DatItems/SoftwareList.cs b/SabreTools.Library/DatItems/SoftwareList.cs index 3a49dbe0..b5d74829 100644 --- a/SabreTools.Library/DatItems/SoftwareList.cs +++ b/SabreTools.Library/DatItems/SoftwareList.cs @@ -3,9 +3,8 @@ using System.IO; using System.Linq; using System.Xml.Serialization; -using SabreTools.Data; +using SabreTools.Core; using SabreTools.Library.Filtering; -using SabreTools.Library.Tools; using Newtonsoft.Json; using Newtonsoft.Json.Converters; diff --git a/SabreTools.Library/DatItems/Sound.cs b/SabreTools.Library/DatItems/Sound.cs index 61d87b7d..5d6ba2d3 100644 --- a/SabreTools.Library/DatItems/Sound.cs +++ b/SabreTools.Library/DatItems/Sound.cs @@ -3,9 +3,8 @@ using System.Collections.Generic; using System.Linq; using System.Xml.Serialization; -using SabreTools.Data; +using SabreTools.Core; using SabreTools.Library.Filtering; -using SabreTools.Library.Tools; using Newtonsoft.Json; namespace SabreTools.Library.DatItems diff --git a/SabreTools.Library/External/Compress/ZipFile/zipFile.cs b/SabreTools.Library/External/Compress/ZipFile/zipFile.cs index 90967102..1c53eb2a 100644 --- a/SabreTools.Library/External/Compress/ZipFile/zipFile.cs +++ b/SabreTools.Library/External/Compress/ZipFile/zipFile.cs @@ -1145,7 +1145,7 @@ namespace Compress.ZipFile } else { - return SabreTools.Library.Tools.Utilities.ConvertMsDosTimeFormatToDateTime(_lastModFileDateTime.Value); + return SabreTools.Core.Utilities.ConvertMsDosTimeFormatToDateTime(_lastModFileDateTime.Value); } } catch diff --git a/SabreTools.Library/FileTypes/Aaru/ChecksumEntry.cs b/SabreTools.Library/FileTypes/Aaru/ChecksumEntry.cs index 2d7c34a1..4290cd27 100644 --- a/SabreTools.Library/FileTypes/Aaru/ChecksumEntry.cs +++ b/SabreTools.Library/FileTypes/Aaru/ChecksumEntry.cs @@ -1,6 +1,8 @@ using System.IO; using System.Text; +using SabreTools.Core; + namespace SabreTools.Library.FileTypes.Aaru { /// diff --git a/SabreTools.Library/FileTypes/Aaru/ChecksumHeader.cs b/SabreTools.Library/FileTypes/Aaru/ChecksumHeader.cs index 5527ef11..9ec65d69 100644 --- a/SabreTools.Library/FileTypes/Aaru/ChecksumHeader.cs +++ b/SabreTools.Library/FileTypes/Aaru/ChecksumHeader.cs @@ -1,6 +1,8 @@ using System.IO; using System.Text; +using SabreTools.Core; + namespace SabreTools.Library.FileTypes.Aaru { /// diff --git a/SabreTools.Library/FileTypes/Aaru/IndexEntry.cs b/SabreTools.Library/FileTypes/Aaru/IndexEntry.cs index 5e8b6bc6..e8437a20 100644 --- a/SabreTools.Library/FileTypes/Aaru/IndexEntry.cs +++ b/SabreTools.Library/FileTypes/Aaru/IndexEntry.cs @@ -1,6 +1,8 @@ using System.IO; using System.Text; +using SabreTools.Core; + namespace SabreTools.Library.FileTypes.Aaru { /// diff --git a/SabreTools.Library/FileTypes/Aaru/IndexHeader.cs b/SabreTools.Library/FileTypes/Aaru/IndexHeader.cs index 1c3fd06b..8271e7b9 100644 --- a/SabreTools.Library/FileTypes/Aaru/IndexHeader.cs +++ b/SabreTools.Library/FileTypes/Aaru/IndexHeader.cs @@ -1,6 +1,8 @@ using System.IO; using System.Text; +using SabreTools.Core; + namespace SabreTools.Library.FileTypes.Aaru { /// diff --git a/SabreTools.Library/FileTypes/AaruFormat.cs b/SabreTools.Library/FileTypes/AaruFormat.cs index 78ad3c52..6b7d195f 100644 --- a/SabreTools.Library/FileTypes/AaruFormat.cs +++ b/SabreTools.Library/FileTypes/AaruFormat.cs @@ -3,7 +3,7 @@ using System.IO; using System.Text; using SabreTools.IO; -using SabreTools.Data; +using SabreTools.Core; using SabreTools.Library.FileTypes.Aaru; namespace SabreTools.Library.FileTypes diff --git a/SabreTools.Library/FileTypes/BaseArchive.cs b/SabreTools.Library/FileTypes/BaseArchive.cs index ba2515a2..db75f143 100644 --- a/SabreTools.Library/FileTypes/BaseArchive.cs +++ b/SabreTools.Library/FileTypes/BaseArchive.cs @@ -1,7 +1,7 @@ using System.Collections.Generic; using System.IO; -using SabreTools.Data; +using SabreTools.Core; namespace SabreTools.Library.FileTypes { diff --git a/SabreTools.Library/FileTypes/BaseFile.cs b/SabreTools.Library/FileTypes/BaseFile.cs index 418daf6a..7b65ec4f 100644 --- a/SabreTools.Library/FileTypes/BaseFile.cs +++ b/SabreTools.Library/FileTypes/BaseFile.cs @@ -4,7 +4,7 @@ using System.IO; using System.Linq; using System.Threading.Tasks; -using SabreTools.Data; +using SabreTools.Core; using SabreTools.IO; using SabreTools.Library.IO; using SabreTools.Logging; diff --git a/SabreTools.Library/FileTypes/CHDFile.cs b/SabreTools.Library/FileTypes/CHDFile.cs index 5f6e62da..d68e8638 100644 --- a/SabreTools.Library/FileTypes/CHDFile.cs +++ b/SabreTools.Library/FileTypes/CHDFile.cs @@ -2,7 +2,7 @@ using System.IO; using System.Text; -using SabreTools.Data; +using SabreTools.Core; using SabreTools.IO; using SabreTools.Library.FileTypes.CHD; diff --git a/SabreTools.Library/FileTypes/Folder.cs b/SabreTools.Library/FileTypes/Folder.cs index 5dfa69cf..382fb5a3 100644 --- a/SabreTools.Library/FileTypes/Folder.cs +++ b/SabreTools.Library/FileTypes/Folder.cs @@ -3,10 +3,9 @@ using System.Collections.Generic; using System.IO; using System.Linq; -using SabreTools.Data; +using SabreTools.Core; using SabreTools.IO; using SabreTools.Logging; -using SabreTools.Library.Tools; namespace SabreTools.Library.FileTypes { diff --git a/SabreTools.Library/FileTypes/GZipArchive.cs b/SabreTools.Library/FileTypes/GZipArchive.cs index bde07f6f..072f6caa 100644 --- a/SabreTools.Library/FileTypes/GZipArchive.cs +++ b/SabreTools.Library/FileTypes/GZipArchive.cs @@ -4,9 +4,8 @@ using System.IO; using System.Linq; using System.Text.RegularExpressions; -using SabreTools.Data; +using SabreTools.Core; using SabreTools.IO; -using SabreTools.Library.Tools; using Compress; using Compress.gZip; using Compress.ZipFile.ZLib; diff --git a/SabreTools.Library/FileTypes/LRZipArchive.cs b/SabreTools.Library/FileTypes/LRZipArchive.cs index 31e3e59e..769ef5a0 100644 --- a/SabreTools.Library/FileTypes/LRZipArchive.cs +++ b/SabreTools.Library/FileTypes/LRZipArchive.cs @@ -2,7 +2,7 @@ using System.Collections.Generic; using System.IO; -using SabreTools.Data; +using SabreTools.Core; namespace SabreTools.Library.FileTypes { diff --git a/SabreTools.Library/FileTypes/LZ4Archive.cs b/SabreTools.Library/FileTypes/LZ4Archive.cs index 29d79c6e..b214c357 100644 --- a/SabreTools.Library/FileTypes/LZ4Archive.cs +++ b/SabreTools.Library/FileTypes/LZ4Archive.cs @@ -2,7 +2,7 @@ using System.Collections.Generic; using System.IO; -using SabreTools.Data; +using SabreTools.Core; namespace SabreTools.Library.FileTypes { diff --git a/SabreTools.Library/FileTypes/RarArchive.cs b/SabreTools.Library/FileTypes/RarArchive.cs index 660f99f8..bc5628ea 100644 --- a/SabreTools.Library/FileTypes/RarArchive.cs +++ b/SabreTools.Library/FileTypes/RarArchive.cs @@ -3,7 +3,7 @@ using System.Collections.Generic; using System.IO; using System.Linq; -using SabreTools.Data; +using SabreTools.Core; using SharpCompress.Archives; using SharpCompress.Archives.Rar; using SharpCompress.Readers; diff --git a/SabreTools.Library/FileTypes/SevenZipArchive.cs b/SabreTools.Library/FileTypes/SevenZipArchive.cs index 9970ab52..3d6fc394 100644 --- a/SabreTools.Library/FileTypes/SevenZipArchive.cs +++ b/SabreTools.Library/FileTypes/SevenZipArchive.cs @@ -3,8 +3,7 @@ using System.Collections.Generic; using System.IO; using System.Linq; -using SabreTools.Data; -using SabreTools.Library.Tools; +using SabreTools.Core; using Compress; using Compress.SevenZip; using Compress.ZipFile; diff --git a/SabreTools.Library/FileTypes/TapeArchive.cs b/SabreTools.Library/FileTypes/TapeArchive.cs index dc2f3361..1a2c79fc 100644 --- a/SabreTools.Library/FileTypes/TapeArchive.cs +++ b/SabreTools.Library/FileTypes/TapeArchive.cs @@ -3,8 +3,7 @@ using System.Collections.Generic; using System.IO; using System.Linq; -using SabreTools.Data; -using SabreTools.Library.Tools; +using SabreTools.Core; using Compress.ZipFile; using SharpCompress.Archives; using SharpCompress.Archives.Tar; diff --git a/SabreTools.Library/FileTypes/XZArchive.cs b/SabreTools.Library/FileTypes/XZArchive.cs index d24ef798..1a388821 100644 --- a/SabreTools.Library/FileTypes/XZArchive.cs +++ b/SabreTools.Library/FileTypes/XZArchive.cs @@ -3,9 +3,8 @@ using System.Collections.Generic; using System.IO; using System.Text.RegularExpressions; -using SabreTools.Data; +using SabreTools.Core; using SabreTools.IO; -using SabreTools.Library.Tools; using SharpCompress.Compressors.Xz; namespace SabreTools.Library.FileTypes diff --git a/SabreTools.Library/FileTypes/ZPAQArchive.cs b/SabreTools.Library/FileTypes/ZPAQArchive.cs index 009131d9..f1eb9cb3 100644 --- a/SabreTools.Library/FileTypes/ZPAQArchive.cs +++ b/SabreTools.Library/FileTypes/ZPAQArchive.cs @@ -2,7 +2,7 @@ using System.Collections.Generic; using System.IO; -using SabreTools.Data; +using SabreTools.Core; namespace SabreTools.Library.FileTypes { diff --git a/SabreTools.Library/FileTypes/ZipArchive.cs b/SabreTools.Library/FileTypes/ZipArchive.cs index 002c274f..4e3685f7 100644 --- a/SabreTools.Library/FileTypes/ZipArchive.cs +++ b/SabreTools.Library/FileTypes/ZipArchive.cs @@ -3,8 +3,7 @@ using System.Collections.Generic; using System.IO; using System.Linq; -using SabreTools.Data; -using SabreTools.Library.Tools; +using SabreTools.Core; using Compress; using Compress.ZipFile; using NaturalSort; diff --git a/SabreTools.Library/FileTypes/ZstdArchive.cs b/SabreTools.Library/FileTypes/ZstdArchive.cs index 0ccbddbe..e27e443e 100644 --- a/SabreTools.Library/FileTypes/ZstdArchive.cs +++ b/SabreTools.Library/FileTypes/ZstdArchive.cs @@ -2,7 +2,7 @@ using System.Collections.Generic; using System.IO; -using SabreTools.Data; +using SabreTools.Core; namespace SabreTools.Library.FileTypes { diff --git a/SabreTools.Library/Filtering/Cleaner.cs b/SabreTools.Library/Filtering/Cleaner.cs index cd12abb5..a81436c3 100644 --- a/SabreTools.Library/Filtering/Cleaner.cs +++ b/SabreTools.Library/Filtering/Cleaner.cs @@ -1,6 +1,6 @@ using System.Collections.Generic; -using SabreTools.Data; +using SabreTools.Core; namespace SabreTools.Library.Filtering { diff --git a/SabreTools.Library/Filtering/ExtraIni.cs b/SabreTools.Library/Filtering/ExtraIni.cs index 2709469c..39cf27e6 100644 --- a/SabreTools.Library/Filtering/ExtraIni.cs +++ b/SabreTools.Library/Filtering/ExtraIni.cs @@ -1,7 +1,7 @@ using System.Collections.Generic; +using SabreTools.Core; using SabreTools.Logging; -using SabreTools.Library.Tools; namespace SabreTools.Library.Filtering { diff --git a/SabreTools.Library/Filtering/ExtraIniItem.cs b/SabreTools.Library/Filtering/ExtraIniItem.cs index 7b9070a4..e3052660 100644 --- a/SabreTools.Library/Filtering/ExtraIniItem.cs +++ b/SabreTools.Library/Filtering/ExtraIniItem.cs @@ -1,7 +1,7 @@ using System; using System.Collections.Generic; -using SabreTools.Data; +using SabreTools.Core; using SabreTools.IO; using SabreTools.Logging; diff --git a/SabreTools.Library/Filtering/Filter.cs b/SabreTools.Library/Filtering/Filter.cs index 26ab1ab7..1975528e 100644 --- a/SabreTools.Library/Filtering/Filter.cs +++ b/SabreTools.Library/Filtering/Filter.cs @@ -1,10 +1,8 @@ using System; using System.Collections.Generic; -using SabreTools.Data; +using SabreTools.Core; using SabreTools.Logging; -using SabreTools.Library.DatItems; -using SabreTools.Library.Tools; namespace SabreTools.Library.Filtering { diff --git a/SabreTools.Library/IO/Transform.cs b/SabreTools.Library/IO/Transform.cs index 6617a70e..16b75426 100644 --- a/SabreTools.Library/IO/Transform.cs +++ b/SabreTools.Library/IO/Transform.cs @@ -2,10 +2,9 @@ using System; using System.Collections.Generic; using System.IO; -using SabreTools.Data; +using SabreTools.Core; using SabreTools.Logging; using SabreTools.Library.FileTypes; -using SabreTools.Library.Tools; using SabreTools.Skippers; using Microsoft.Data.Sqlite; diff --git a/SabreTools.Library/Reports/BaseReport.cs b/SabreTools.Library/Reports/BaseReport.cs index 944d96d8..c7c8630c 100644 --- a/SabreTools.Library/Reports/BaseReport.cs +++ b/SabreTools.Library/Reports/BaseReport.cs @@ -1,6 +1,7 @@ using System; using System.IO; +using SabreTools.Core; using SabreTools.Library.DatFiles; namespace SabreTools.Library.Reports diff --git a/SabreTools.Library/Reports/Enums.cs b/SabreTools.Library/Reports/Enums.cs deleted file mode 100644 index a3905e2e..00000000 --- a/SabreTools.Library/Reports/Enums.cs +++ /dev/null @@ -1,43 +0,0 @@ -using System; - -namespace SabreTools.Library.Reports -{ - /// - /// Determine which format to output Stats to - /// - [Flags] - public enum StatReportFormat - { - /// - /// Only output to the console - /// - None = 0x00, - - /// - /// Console-formatted - /// - Textfile = 1 << 0, - - /// - /// ClrMamePro HTML - /// - HTML = 1 << 1, - - /// - /// Comma-Separated Values (Standardized) - /// - CSV = 1 << 2, - - /// - /// Semicolon-Separated Values (Standardized) - /// - SSV = 1 << 3, - - /// - /// Tab-Separated Values (Standardized) - /// - TSV = 1 << 4, - - All = Int32.MaxValue, - } -} diff --git a/SabreTools.Library/Reports/Html.cs b/SabreTools.Library/Reports/Html.cs index 27c61fd5..4e1aee47 100644 --- a/SabreTools.Library/Reports/Html.cs +++ b/SabreTools.Library/Reports/Html.cs @@ -2,8 +2,6 @@ using System.IO; using System.Net; -using SabreTools.Library.Tools; - namespace SabreTools.Library.Reports { /// diff --git a/SabreTools.Library/Reports/SeparatedValue.cs b/SabreTools.Library/Reports/SeparatedValue.cs index e923a4ca..f4a79f55 100644 --- a/SabreTools.Library/Reports/SeparatedValue.cs +++ b/SabreTools.Library/Reports/SeparatedValue.cs @@ -7,7 +7,7 @@ namespace SabreTools.Library.Reports /// internal class SeparatedValue : BaseReport { - private char _separator; + private readonly char _separator; /// /// Create a new report from the filename diff --git a/SabreTools.Library/Reports/Textfile.cs b/SabreTools.Library/Reports/Textfile.cs index 49fa5ff6..7ebe0568 100644 --- a/SabreTools.Library/Reports/Textfile.cs +++ b/SabreTools.Library/Reports/Textfile.cs @@ -1,7 +1,5 @@ using System.IO; -using SabreTools.Library.Tools; - namespace SabreTools.Library.Reports { /// diff --git a/SabreTools.Library/SabreTools.Library.csproj b/SabreTools.Library/SabreTools.Library.csproj index 7a4cda9a..789052ed 100644 --- a/SabreTools.Library/SabreTools.Library.csproj +++ b/SabreTools.Library/SabreTools.Library.csproj @@ -12,7 +12,7 @@ - + @@ -25,16 +25,4 @@ - - - Always - - - Always - - - Always - - - diff --git a/SabreTools.Logging/LoggerImpl.cs b/SabreTools.Logging/LoggerImpl.cs index 2fa0953f..15132aed 100644 --- a/SabreTools.Logging/LoggerImpl.cs +++ b/SabreTools.Logging/LoggerImpl.cs @@ -2,7 +2,7 @@ using System.IO; using System.Text; -using SabreTools.Data; +using SabreTools.Core; using SabreTools.IO; namespace SabreTools.Logging diff --git a/SabreTools.Logging/SabreTools.Logging.csproj b/SabreTools.Logging/SabreTools.Logging.csproj index d5bd4eee..705a565a 100644 --- a/SabreTools.Logging/SabreTools.Logging.csproj +++ b/SabreTools.Logging/SabreTools.Logging.csproj @@ -12,7 +12,7 @@ - + diff --git a/SabreTools.sln b/SabreTools.sln index 76c2116a..2e819134 100644 --- a/SabreTools.sln +++ b/SabreTools.sln @@ -16,7 +16,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution README.MD = README.MD EndProjectSection EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SabreTools.Data", "SabreTools.Data\SabreTools.Data.csproj", "{66E2FB10-77C0-4589-9DCD-3CA48702C18A}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SabreTools.Core", "SabreTools.Core\SabreTools.Core.csproj", "{66E2FB10-77C0-4589-9DCD-3CA48702C18A}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SabreTools.Skippers", "SabreTools.Skippers\SabreTools.Skippers.csproj", "{D8665F27-75E6-4E3F-9F0A-286433831C69}" EndProject diff --git a/SabreTools/Features/BaseFeature.cs b/SabreTools/Features/BaseFeature.cs index 5c81375b..ae318bf7 100644 --- a/SabreTools/Features/BaseFeature.cs +++ b/SabreTools/Features/BaseFeature.cs @@ -1,15 +1,11 @@ using System; using System.Collections.Generic; -using SabreTools.Data; +using SabreTools.Core; using SabreTools.Help; using SabreTools.Logging; using SabreTools.Library.DatFiles; -using SabreTools.Library.DatItems; -using SabreTools.Library.FileTypes; using SabreTools.Library.Filtering; -using SabreTools.Library.Reports; -using SabreTools.Library.Tools; namespace SabreTools.Features { diff --git a/SabreTools/Features/Batch.cs b/SabreTools/Features/Batch.cs index 3f5dd7e3..59de3763 100644 --- a/SabreTools/Features/Batch.cs +++ b/SabreTools/Features/Batch.cs @@ -4,12 +4,11 @@ using System.IO; using System.Linq; using System.Text.RegularExpressions; -using SabreTools.Data; +using SabreTools.Core; using SabreTools.Help; using SabreTools.IO; using SabreTools.Library.DatFiles; using SabreTools.Library.Filtering; -using SabreTools.Library.Tools; namespace SabreTools.Features { diff --git a/SabreTools/Features/DatFromDir.cs b/SabreTools/Features/DatFromDir.cs index 6e1f8844..23877b8e 100644 --- a/SabreTools/Features/DatFromDir.cs +++ b/SabreTools/Features/DatFromDir.cs @@ -2,7 +2,7 @@ using System.Collections.Generic; using System.IO; -using SabreTools.Data; +using SabreTools.Core; using SabreTools.Help; using SabreTools.Library.DatFiles; using SabreTools.Library.DatItems; diff --git a/SabreTools/Features/Sort.cs b/SabreTools/Features/Sort.cs index 769ce979..dbe30d47 100644 --- a/SabreTools/Features/Sort.cs +++ b/SabreTools/Features/Sort.cs @@ -1,7 +1,7 @@ using System.Collections.Generic; using System.IO; -using SabreTools.Data; +using SabreTools.Core; using SabreTools.Help; using SabreTools.IO; using SabreTools.Library.DatFiles; diff --git a/SabreTools/Features/Split.cs b/SabreTools/Features/Split.cs index cb787513..bd7e9f41 100644 --- a/SabreTools/Features/Split.cs +++ b/SabreTools/Features/Split.cs @@ -1,7 +1,7 @@ using System.Collections.Generic; using System.Threading.Tasks; -using SabreTools.Data; +using SabreTools.Core; using SabreTools.Help; using SabreTools.IO; using SabreTools.Library.DatFiles; diff --git a/SabreTools/Features/Update.cs b/SabreTools/Features/Update.cs index 9564fdbb..72ad5a3a 100644 --- a/SabreTools/Features/Update.cs +++ b/SabreTools/Features/Update.cs @@ -3,7 +3,7 @@ using System.Collections.Generic; using System.IO; using System.Threading.Tasks; -using SabreTools.Data; +using SabreTools.Core; using SabreTools.Help; using SabreTools.IO; using SabreTools.Library.DatFiles; diff --git a/SabreTools/Features/Verify.cs b/SabreTools/Features/Verify.cs index 97c48a7d..598a3991 100644 --- a/SabreTools/Features/Verify.cs +++ b/SabreTools/Features/Verify.cs @@ -1,6 +1,6 @@ using System.Collections.Generic; -using SabreTools.Data; +using SabreTools.Core; using SabreTools.Help; using SabreTools.IO; using SabreTools.Library.DatFiles; diff --git a/SabreTools/Program.cs b/SabreTools/Program.cs index 8e0ae9d3..81573a78 100644 --- a/SabreTools/Program.cs +++ b/SabreTools/Program.cs @@ -2,7 +2,7 @@ using System.Collections.Generic; using SabreTools.Features; -using SabreTools.Data; +using SabreTools.Core; using SabreTools.Help; using SabreTools.Logging;