diff --git a/SabreTools.Core/Enums.cs b/SabreTools.Core/Enums.cs
deleted file mode 100644
index 8bd8de55..00000000
--- a/SabreTools.Core/Enums.cs
+++ /dev/null
@@ -1,653 +0,0 @@
-using System;
-
-// TODO: Figure out the best way to put these back in their libraries
-namespace SabreTools.Core
-{
- #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")]
- DeviceRef,
-
- [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")]
- SharedFeat,
-
- [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
-}
diff --git a/SabreTools.DatFiles/DatFile.FromMetadata.cs b/SabreTools.DatFiles/DatFile.FromMetadata.cs
index f8823777..65240638 100644
--- a/SabreTools.DatFiles/DatFile.FromMetadata.cs
+++ b/SabreTools.DatFiles/DatFile.FromMetadata.cs
@@ -2,6 +2,7 @@ using System.Collections.Generic;
using System.Linq;
using SabreTools.Core;
using SabreTools.Core.Tools;
+using SabreTools.DatItems;
namespace SabreTools.DatFiles
{
diff --git a/SabreTools.DatFiles/DatFile.ToMetadata.cs b/SabreTools.DatFiles/DatFile.ToMetadata.cs
index 549c9e86..cb43b95f 100644
--- a/SabreTools.DatFiles/DatFile.ToMetadata.cs
+++ b/SabreTools.DatFiles/DatFile.ToMetadata.cs
@@ -1,7 +1,7 @@
using System.Collections.Generic;
using System.Linq;
-using SabreTools.Core;
using SabreTools.Core.Tools;
+using SabreTools.DatItems;
namespace SabreTools.DatFiles
{
diff --git a/SabreTools.DatFiles/Formats/ArchiveDotOrg.cs b/SabreTools.DatFiles/Formats/ArchiveDotOrg.cs
index b65d0c81..9d34f8ae 100644
--- a/SabreTools.DatFiles/Formats/ArchiveDotOrg.cs
+++ b/SabreTools.DatFiles/Formats/ArchiveDotOrg.cs
@@ -1,4 +1,4 @@
-using SabreTools.Core;
+using SabreTools.DatItems;
namespace SabreTools.DatFiles.Formats
{
diff --git a/SabreTools.DatItems/Enums.cs b/SabreTools.DatItems/Enums.cs
index a6e782d0..a8320658 100644
--- a/SabreTools.DatItems/Enums.cs
+++ b/SabreTools.DatItems/Enums.cs
@@ -1,7 +1,185 @@
using System;
+using SabreTools.Core;
namespace SabreTools.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,
+ }
+
///
/// Determines which type of duplicate a file is
///
@@ -17,6 +195,96 @@ namespace SabreTools.DatItems
External = 1 << 3,
}
+ ///
+ /// 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,
+ }
+
///
/// A subset of fields that can be used as keys
///
@@ -34,4 +302,381 @@ namespace SabreTools.DatItems
SHA512,
SpamSum,
}
+
+ ///
+ /// 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")]
+ DeviceRef,
+
+ [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")]
+ SharedFeat,
+
+ [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,
+ }
}
\ No newline at end of file
diff --git a/SabreTools.Reports/Formats/Html.cs b/SabreTools.Reports/Formats/Html.cs
index 31788fdb..caa1d9be 100644
--- a/SabreTools.Reports/Formats/Html.cs
+++ b/SabreTools.Reports/Formats/Html.cs
@@ -4,6 +4,7 @@ using System.IO;
using System.Net;
using System.Text;
using System.Xml;
+using SabreTools.DatItems;
using SabreTools.Hashing;
using SabreTools.Logging;
@@ -237,12 +238,12 @@ body {
xtw.WriteStartElement("td");
xtw.WriteAttributeString("align", "right");
- xtw.WriteString(stat.Statistics.GetItemCount(Core.ItemType.Rom).ToString());
+ xtw.WriteString(stat.Statistics.GetItemCount(ItemType.Rom).ToString());
xtw.WriteEndElement(); // td
xtw.WriteStartElement("td");
xtw.WriteAttributeString("align", "right");
- xtw.WriteString(stat.Statistics.GetItemCount(Core.ItemType.Disk).ToString());
+ xtw.WriteString(stat.Statistics.GetItemCount(ItemType.Disk).ToString());
xtw.WriteEndElement(); // td
xtw.WriteStartElement("td");
@@ -269,7 +270,7 @@ body {
{
xtw.WriteStartElement("td");
xtw.WriteAttributeString("align", "right");
- xtw.WriteString(stat.Statistics.GetStatusCount(Core.ItemStatus.BadDump).ToString());
+ xtw.WriteString(stat.Statistics.GetStatusCount(ItemStatus.BadDump).ToString());
xtw.WriteEndElement(); // td
}
@@ -277,7 +278,7 @@ body {
{
xtw.WriteStartElement("td");
xtw.WriteAttributeString("align", "right");
- xtw.WriteString(stat.Statistics.GetStatusCount(Core.ItemStatus.Nodump).ToString());
+ xtw.WriteString(stat.Statistics.GetStatusCount(ItemStatus.Nodump).ToString());
xtw.WriteEndElement(); // td
}
diff --git a/SabreTools.Reports/Formats/SeparatedValue.cs b/SabreTools.Reports/Formats/SeparatedValue.cs
index defc649a..99dea849 100644
--- a/SabreTools.Reports/Formats/SeparatedValue.cs
+++ b/SabreTools.Reports/Formats/SeparatedValue.cs
@@ -2,6 +2,7 @@
using System.Collections.Generic;
using System.IO;
using System.Text;
+using SabreTools.DatItems;
using SabreTools.Hashing;
using SabreTools.IO.Writers;
using SabreTools.Logging;
@@ -131,16 +132,16 @@ namespace SabreTools.Reports.Formats
stat.DisplayName!,
stat.Statistics!.TotalSize.ToString(),
stat.MachineCount.ToString(),
- stat.Statistics.GetItemCount(Core.ItemType.Rom).ToString(),
- stat.Statistics.GetItemCount(Core.ItemType.Disk).ToString(),
+ stat.Statistics.GetItemCount(ItemType.Rom).ToString(),
+ stat.Statistics.GetItemCount(ItemType.Disk).ToString(),
stat.Statistics.GetHashCount(HashType.CRC32).ToString(),
stat.Statistics.GetHashCount(HashType.MD5).ToString(),
stat.Statistics.GetHashCount(HashType.SHA1).ToString(),
stat.Statistics.GetHashCount(HashType.SHA256).ToString(),
stat.Statistics.GetHashCount(HashType.SHA384).ToString(),
stat.Statistics.GetHashCount(HashType.SHA512).ToString(),
- baddumpCol ? stat.Statistics.GetStatusCount(Core.ItemStatus.BadDump).ToString() : string.Empty,
- nodumpCol ? stat.Statistics.GetStatusCount(Core.ItemStatus.Nodump).ToString() : string.Empty,
+ baddumpCol ? stat.Statistics.GetStatusCount(ItemStatus.BadDump).ToString() : string.Empty,
+ nodumpCol ? stat.Statistics.GetStatusCount(ItemStatus.Nodump).ToString() : string.Empty,
];
svw.WriteValues(values);
svw.Flush();
diff --git a/SabreTools.Reports/Formats/Textfile.cs b/SabreTools.Reports/Formats/Textfile.cs
index b41f4bd1..f2e71fee 100644
--- a/SabreTools.Reports/Formats/Textfile.cs
+++ b/SabreTools.Reports/Formats/Textfile.cs
@@ -1,6 +1,7 @@
using System;
using System.Collections.Generic;
using System.IO;
+using SabreTools.DatItems;
using SabreTools.Hashing;
using SabreTools.Logging;
@@ -93,8 +94,8 @@ namespace SabreTools.Reports.Formats
--------------------------------------------------
Uncompressed size: " + GetBytesReadable(stat.Statistics!.TotalSize) + @"
Games found: " + stat.MachineCount + @"
- Roms found: " + stat.Statistics.GetItemCount(Core.ItemType.Rom) + @"
- Disks found: " + stat.Statistics.GetItemCount(Core.ItemType.Disk) + @"
+ Roms found: " + stat.Statistics.GetItemCount(ItemType.Rom) + @"
+ Disks found: " + stat.Statistics.GetItemCount(ItemType.Disk) + @"
Roms with CRC: " + stat.Statistics.GetHashCount(HashType.CRC32) + @"
Roms with MD5: " + stat.Statistics.GetHashCount(HashType.MD5) + @"
Roms with SHA-1: " + stat.Statistics.GetHashCount(HashType.SHA1) + @"
@@ -103,10 +104,10 @@ namespace SabreTools.Reports.Formats
Roms with SHA-512: " + stat.Statistics.GetHashCount(HashType.SHA512) + "\n";
if (baddumpCol)
- line += " Roms with BadDump status: " + stat.Statistics.GetStatusCount(Core.ItemStatus.BadDump) + "\n";
+ line += " Roms with BadDump status: " + stat.Statistics.GetStatusCount(ItemStatus.BadDump) + "\n";
if (nodumpCol)
- line += " Roms with Nodump status: " + stat.Statistics.GetStatusCount(Core.ItemStatus.Nodump) + "\n";
+ line += " Roms with Nodump status: " + stat.Statistics.GetStatusCount(ItemStatus.Nodump) + "\n";
// For spacing between DATs
line += "\n\n";
diff --git a/SabreTools.Test/Core/ConvertersTests.cs b/SabreTools.Test/Core/ConvertersTests.cs
index 91f8efd9..4ef1f3d7 100644
--- a/SabreTools.Test/Core/ConvertersTests.cs
+++ b/SabreTools.Test/Core/ConvertersTests.cs
@@ -1,6 +1,6 @@
-using SabreTools.Core;
using SabreTools.Core.Tools;
using SabreTools.DatFiles;
+using SabreTools.DatItems;
using SabreTools.Logging;
using Xunit;
diff --git a/SabreTools/Features/Split.cs b/SabreTools/Features/Split.cs
index 4b4ae37d..d5e12fcd 100644
--- a/SabreTools/Features/Split.cs
+++ b/SabreTools/Features/Split.cs
@@ -2,6 +2,7 @@
using System.Threading.Tasks;
using SabreTools.Core;
using SabreTools.DatFiles;
+using SabreTools.DatItems;
using SabreTools.DatTools;
using SabreTools.Help;
using SabreTools.IO;