using System; // TODO: Figure out the best way to put these back in their libraries namespace SabreTools.Core { #region DatFiles /// /// Determines merging tag handling for DAT output /// public enum MergingFlag { [Mapping("none")] None = 0, [Mapping("split")] Split, [Mapping("merged")] Merged, [Mapping("nonmerged", "unmerged")] NonMerged, /// This is not usually defined for Merging flags [Mapping("fullmerged")] FullMerged, /// This is not usually defined for Merging flags [Mapping("device", "deviceunmerged", "devicenonmerged")] DeviceNonMerged, /// This is not usually defined for Merging flags [Mapping("full", "fullunmerged", "fullnonmerged")] FullNonMerged, } /// /// Determines nodump tag handling for DAT output /// public enum NodumpFlag { [Mapping("none")] None = 0, [Mapping("obsolete")] Obsolete, [Mapping("required")] Required, [Mapping("ignore")] Ignore, } /// /// Determines packing tag handling for DAT output /// public enum PackingFlag { [Mapping("none")] None = 0, /// /// Force all sets to be in archives, except disk and media /// [Mapping("zip", "yes")] Zip, /// /// Force all sets to be extracted into subfolders /// [Mapping("unzip", "no")] Unzip, /// /// Force sets with single items to be extracted to the parent folder /// [Mapping("partial")] Partial, /// /// Force all sets to be extracted to the parent folder /// [Mapping("flat")] Flat, } #endregion #region DatItems /// /// Determine the chip type /// [Flags] public enum ChipType { /// /// This is a fake flag that is used for filter only /// NULL = 0, [Mapping("cpu")] CPU = 1 << 0, [Mapping("audio")] Audio = 1 << 1, } /// /// Determine the control type /// [Flags] public enum ControlType { /// /// This is a fake flag that is used for filter only /// NULL = 0, [Mapping("joy")] Joy = 1 << 0, [Mapping("stick")] Stick = 1 << 1, [Mapping("paddle")] Paddle = 1 << 2, [Mapping("pedal")] Pedal = 1 << 3, [Mapping("lightgun")] Lightgun = 1 << 4, [Mapping("positional")] Positional = 1 << 5, [Mapping("dial")] Dial = 1 << 6, [Mapping("trackball")] Trackball = 1 << 7, [Mapping("mouse")] Mouse = 1 << 8, [Mapping("only_buttons")] OnlyButtons = 1 << 9, [Mapping("keypad")] Keypad = 1 << 10, [Mapping("keyboard")] Keyboard = 1 << 11, [Mapping("mahjong")] Mahjong = 1 << 12, [Mapping("hanafuda")] Hanafuda = 1 << 13, [Mapping("gambling")] Gambling = 1 << 14, } /// /// Determine the device type /// [Flags] public enum DeviceType { /// /// This is a fake flag that is used for filter only /// NULL = 0, [Mapping("unknown")] Unknown = 1 << 0, [Mapping("cartridge")] Cartridge = 1 << 1, [Mapping("floppydisk")] FloppyDisk = 1 << 2, [Mapping("harddisk")] HardDisk = 1 << 3, [Mapping("cylinder")] Cylinder = 1 << 4, [Mapping("cassette")] Cassette = 1 << 5, [Mapping("punchcard")] PunchCard = 1 << 6, [Mapping("punchtape")] PunchTape = 1 << 7, [Mapping("printout")] Printout = 1 << 8, [Mapping("serial")] Serial = 1 << 9, [Mapping("parallel")] Parallel = 1 << 10, [Mapping("snapshot")] Snapshot = 1 << 11, [Mapping("quickload")] QuickLoad = 1 << 12, [Mapping("memcard")] MemCard = 1 << 13, [Mapping("cdrom")] CDROM = 1 << 14, [Mapping("magtape")] MagTape = 1 << 15, [Mapping("romimage")] ROMImage = 1 << 16, [Mapping("midiin")] MIDIIn = 1 << 17, [Mapping("midiout")] MIDIOut = 1 << 18, [Mapping("picture")] Picture = 1 << 19, [Mapping("vidfile")] VidFile = 1 << 20, } /// /// Determine the display type /// [Flags] public enum DisplayType { /// /// This is a fake flag that is used for filter only /// NULL = 0, [Mapping("raster")] Raster = 1 << 0, [Mapping("vector")] Vector = 1 << 1, [Mapping("lcd")] LCD = 1 << 2, [Mapping("svg")] SVG = 1 << 3, [Mapping("unknown")] Unknown = 1 << 4, } /// /// Determine the endianness /// [Flags] public enum Endianness { /// /// This is a fake flag that is used for filter only /// NULL = 0, [Mapping("big")] Big = 1 << 0, [Mapping("little")] Little = 1 << 1, } /// /// Determine the emulation status /// [Flags] public enum FeatureStatus { /// /// This is a fake flag that is used for filter only /// NULL = 0, [Mapping("unemulated")] Unemulated = 1 << 0, [Mapping("imperfect")] Imperfect = 1 << 1, } /// /// Determine the feature type /// [Flags] public enum FeatureType { /// /// This is a fake flag that is used for filter only /// NULL = 0, [Mapping("protection")] Protection = 1 << 0, [Mapping("palette")] Palette = 1 << 1, [Mapping("graphics")] Graphics = 1 << 2, [Mapping("sound")] Sound = 1 << 3, [Mapping("controls")] Controls = 1 << 4, [Mapping("keyboard")] Keyboard = 1 << 5, [Mapping("mouse")] Mouse = 1 << 6, [Mapping("microphone")] Microphone = 1 << 7, [Mapping("camera")] Camera = 1 << 8, [Mapping("disk")] Disk = 1 << 9, [Mapping("printer")] Printer = 1 << 10, [Mapping("lan")] Lan = 1 << 11, [Mapping("wan")] Wan = 1 << 12, [Mapping("timing")] 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, [Mapping("none", "no")] None = 1 << 0, [Mapping("good")] Good = 1 << 1, [Mapping("baddump")] BadDump = 1 << 2, [Mapping("nodump", "yes")] Nodump = 1 << 3, [Mapping("verified")] Verified = 1 << 4, } /// /// Determine what type of file an item is /// public enum ItemType { /// /// This is a fake flag that is used for filter only /// NULL = 0, // "Actionable" item types [Mapping("rom")] Rom, [Mapping("disk")] Disk, [Mapping("file")] File, [Mapping("media")] Media, // "Auxiliary" item types [Mapping("adjuster")] Adjuster, [Mapping("analog")] Analog, [Mapping("archive")] Archive, [Mapping("biosset")] BiosSet, [Mapping("chip")] Chip, [Mapping("condition")] Condition, [Mapping("configuration")] Configuration, [Mapping("conflocation")] ConfLocation, [Mapping("confsetting")] ConfSetting, [Mapping("control")] Control, [Mapping("dataarea")] DataArea, [Mapping("device")] Device, [Mapping("device_ref", "deviceref")] DeviceReference, [Mapping("diplocation")] DipLocation, [Mapping("dipswitch")] DipSwitch, [Mapping("dipvalue")] DipValue, [Mapping("diskarea")] DiskArea, [Mapping("display")] Display, [Mapping("driver")] Driver, [Mapping("extension")] Extension, [Mapping("feature")] Feature, [Mapping("info")] Info, [Mapping("input")] Input, [Mapping("instance")] Instance, [Mapping("original")] Original, [Mapping("part")] Part, [Mapping("part_feature", "partfeature")] PartFeature, [Mapping("port")] Port, [Mapping("ramoption", "ram_option")] RamOption, [Mapping("release")] Release, [Mapping("release_details", "releasedetails")] ReleaseDetails, [Mapping("sample")] Sample, [Mapping("serials")] Serials, [Mapping("sharedfeat", "shared_feat", "sharedfeature", "shared_feature")] SharedFeature, [Mapping("slot")] Slot, [Mapping("slotoption", "slot_option")] SlotOption, [Mapping("softwarelist", "software_list")] SoftwareList, [Mapping("sound")] Sound, [Mapping("source_details", "sourcedetails")] SourceDetails, [Mapping("blank")] 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, [Mapping("load16_byte")] Load16Byte = 1 << 0, [Mapping("load16_word")] Load16Word = 1 << 1, [Mapping("load16_word_swap")] Load16WordSwap = 1 << 2, [Mapping("load32_byte")] Load32Byte = 1 << 3, [Mapping("load32_word")] Load32Word = 1 << 4, [Mapping("load32_word_swap")] Load32WordSwap = 1 << 5, [Mapping("load32_dword")] Load32DWord = 1 << 6, [Mapping("load64_word")] Load64Word = 1 << 7, [Mapping("load64_word_swap")] Load64WordSwap = 1 << 8, [Mapping("reload")] Reload = 1 << 9, [Mapping("fill")] Fill = 1 << 10, [Mapping("continue")] Continue = 1 << 11, [Mapping("reload_plain")] ReloadPlain = 1 << 12, [Mapping("ignore")] Ignore = 1 << 13, } /// /// Determine what type of machine it is /// [Flags] public enum MachineType { [Mapping("none")] None = 0, [Mapping("bios")] Bios = 1 << 0, [Mapping("device", "dev")] Device = 1 << 1, [Mapping("mechanical", "mech")] Mechanical = 1 << 2, } /// /// Determine which OpenMSX subtype an item is /// [Flags] public enum OpenMSXSubType { /// /// This is a fake flag that is used for filter only /// NULL = 0, [Mapping("rom")] Rom = 1 << 0, [Mapping("megarom")] MegaRom = 1 << 1, [Mapping("sccpluscart")] 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, [Mapping("eq")] Equal = 1 << 0, [Mapping("ne")] NotEqual = 1 << 1, [Mapping("gt")] GreaterThan = 1 << 2, [Mapping("le")] LessThanOrEqual = 1 << 3, [Mapping("lt")] LessThan = 1 << 4, [Mapping("ge")] GreaterThanOrEqual = 1 << 5, } /// /// Determine machine runnable status /// [Flags] public enum Runnable { /// /// This is a fake flag that is used for filter only /// NULL = 0, [Mapping("no")] No = 1 << 0, [Mapping("partial")] Partial = 1 << 1, [Mapping("yes")] Yes = 1 << 2, } /// /// Determine software list status /// [Flags] public enum SoftwareListStatus { [Mapping("none")] None = 0, [Mapping("original")] Original = 1 << 0, [Mapping("compatible")] Compatible = 1 << 1, } /// /// Determine machine support status /// [Flags] public enum Supported { /// /// This is a fake flag that is used for filter only /// NULL = 0, [Mapping("no", "unsupported")] No = 1 << 0, [Mapping("partial")] Partial = 1 << 1, [Mapping("yes", "supported")] Yes = 1 << 2, } /// /// Determine driver support statuses /// [Flags] public enum SupportStatus { /// /// This is a fake flag that is used for filter only /// NULL = 0, [Mapping("good")] Good = 1 << 0, [Mapping("imperfect")] Imperfect = 1 << 1, [Mapping("preliminary")] Preliminary = 1 << 2, } #endregion #region Fields /// /// List of valid field types within a DatHeader /// public enum DatHeaderField { /// /// This is a fake flag that is used for filter only /// NULL = 0, /// Used in ClrMamePro, DOSCenter, Logiqx, and RomCenter [Mapping("author")] Author, /// Used in Logiqx [Mapping("biosmode", "bios_mode")] BiosMode, /// Used in Logiqx [Mapping("build")] Build, /// Used with OfflineList [Mapping("canopen", "can_open")] CanOpen, /// Used in ClrMamePro and Logiqx [Mapping("category")] Category, /// Used in ClrMamePro, DOSCenter, Logiqx, and RomCenter [Mapping("comment")] Comment, /// Used in ClrMamePro, DOSCenter, Logiqx, OpenMSX, and RomCenter [Mapping("date", "timestamp", "time_stamp")] Date, /// Used in Logiqx and ListXML [Mapping("debug")] Debug, /// Used in ClrMamePro, DOSCenter, ListXML, Logiqx, OpenMSX, RomCenter, Separated Value, and Software List [Mapping("desc", "description")] Description, /// Used in ClrMamePro, Logiqx, and RomCenter [Mapping("email", "e_mail")] Email, /// Used in AttractMode, OfflineList, and Separated Value [Mapping("file", "filename", "file_name")] FileName, /// Used in ClrMamePro, Logiqx, and RomCenter [Mapping("forcemerging", "force_merging")] ForceMerging, /// Used in Logiqx [Mapping("forcenodump", "force_nodump")] ForceNodump, /// Used in ClrMamePro and Logiqx [Mapping("forcepacking", "force_packing")] ForcePacking, /// Used in ClrMamePro and Logiqx [Mapping("header", "headerskipper", "header_skipper", "skipper")] HeaderSkipper, /// Used in ClrMamePro, DOSCenter, Logiqx, and RomCenter [Mapping("homepage", "home_page")] Homepage, /// Used in Logiqx [Mapping("id", "nointroid", "no_intro_id")] ID, /// Used with OfflineList; Part of "Info" object [Mapping("info_default", "infos_default")] Info_Default, /// Used with OfflineList; Part of "Info" object [Mapping("info_isnamingoption", "info_is_naming_option", "infos_isnamingoption", "infos_is_naming_option")] Info_IsNamingOption, /// Used with OfflineList; Part of "Info" object [Mapping("info_name", "infos_name")] Info_Name, /// Used with OfflineList; Part of "Info" object [Mapping("info_visible", "infos_visible")] Info_Visible, /// Used in Logiqx [Mapping("lockbiosmode", "lockbios_mode", "lock_biosmode", "lock_bios_mode")] LockBiosMode, /// Used in Logiqx [Mapping("lockrommode", "lockrom_mode", "lock_rommode", "lock_rom_mode")] LockRomMode, /// Used in Logiqx [Mapping("locksamplemode", "locksample_mode", "lock_samplemode", "lock_sample_mode")] LockSampleMode, /// Used in ListXML [Mapping("mameconfig", "mame_config")] MameConfig, /// Used in ClrMamePro, DOSCenter, ListXML, Logiqx, OfflineList, OpenMSX, RomCenter, Separated Value, and Software List [Mapping("dat", "datname", "dat_name", "internalname", "internal_name")] Name, /// Used with RomCenter [Mapping("rcversion", "rc_version", "romcenterversion", "romcenter_version", "rom_center_version")] RomCenterVersion, /// Used in Logiqx [Mapping("rommode", "rom_mode")] RomMode, /// Used with OfflineList [Mapping("romtitle", "rom_title")] RomTitle, /// Used with ClrMamePro and Logiqx [Mapping("root", "rootdir", "root_dir", "rootdirectory", "root_directory")] RootDir, /// Used in Logiqx [Mapping("samplemode", "sample_mode")] SampleMode, /// Used with OfflineList [Mapping("screenshotheight", "screenshotsheight", "screenshot_height", "screenshots_height")] ScreenshotsHeight, /// Used with OfflineList [Mapping("screenshotwidth", "screenshotswidth", "screenshot_width", "screenshots_width")] ScreenshotsWidth, /// Used with Logiqx, OfflineList, and RomCenter; "plugin" is used for RomCenter [Mapping("system", "plugin")] System, /// Used with ClrMamePro, Logiqx, and OfflineList [Mapping("dattype", "type", "superdat")] Type, /// Used with ClrMamePro, Logiqx, OfflineList, and RomCenter [Mapping("url")] Url, /// Used with ClrMamePro, DOSCenter, ListXML, Logiqx, OfflineList, and RomCenter [Mapping("version")] Version, } #endregion #region Logging /// /// Severity of the logging statement /// public enum LogLevel { [Mapping("verbose")] VERBOSE = 0, [Mapping("user")] USER, [Mapping("warning")] WARNING, [Mapping("error")] ERROR, } #endregion }