using System; namespace SabreTools.Library.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, } /// /// 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, } }