diff --git a/SabreTools.Library/DatItems/Adjuster.cs b/SabreTools.Library/DatItems/Adjuster.cs
index a42ceddb..3f24ecec 100644
--- a/SabreTools.Library/DatItems/Adjuster.cs
+++ b/SabreTools.Library/DatItems/Adjuster.cs
@@ -189,10 +189,6 @@ namespace SabreTools.Library.DatItems
if (filter.DatItem_Default.MatchesNeutral(null, Default) == false)
return false;
- // Filter on conditions
- if (filter.DatItem_Conditions.MatchesNeutral(null, Conditions != null ? (bool?)(Conditions.Count > 0) : null) == false)
- return false;
-
// Filter on individual conditions
if (Conditions != null)
{
@@ -222,9 +218,6 @@ namespace SabreTools.Library.DatItems
if (fields.Contains(Field.DatItem_Default))
Default = null;
- if (fields.Contains(Field.DatItem_Conditions))
- Conditions = null;
-
if (Conditions != null)
{
foreach (Condition condition in Conditions)
@@ -272,9 +265,6 @@ namespace SabreTools.Library.DatItems
if (fields.Contains(Field.DatItem_Default))
Default = newItem.Default;
- if (fields.Contains(Field.DatItem_Conditions))
- Conditions = newItem.Conditions;
-
// Field replacement doesn't make sense for DatItem_Condition*
}
diff --git a/SabreTools.Library/DatItems/Configuration.cs b/SabreTools.Library/DatItems/Configuration.cs
index 02d0b747..933560fd 100644
--- a/SabreTools.Library/DatItems/Configuration.cs
+++ b/SabreTools.Library/DatItems/Configuration.cs
@@ -257,10 +257,6 @@ namespace SabreTools.Library.DatItems
if (filter.DatItem_Mask.MatchesNegativeSet(Mask) == true)
return false;
- // Filter on conditions
- if (filter.DatItem_Conditions.MatchesNeutral(null, Conditions != null ? (bool?)(Conditions.Count > 0) : null) == false)
- return false;
-
// Filter on individual conditions
if (Conditions != null)
{
@@ -271,10 +267,6 @@ namespace SabreTools.Library.DatItems
}
}
- // Filter on locations
- if (filter.DatItem_Locations.MatchesNeutral(null, Locations != null ? (bool?)(Locations.Count > 0) : null) == false)
- return false;
-
// Filter on individual locations
if (Locations != null)
{
@@ -285,10 +277,6 @@ namespace SabreTools.Library.DatItems
}
}
- // Filter on settings
- if (filter.DatItem_Settings.MatchesNeutral(null, Settings != null ? (bool?)(Settings.Count > 0) : null) == false)
- return false;
-
// Filter on individual conditions
if (Settings != null)
{
@@ -321,9 +309,6 @@ namespace SabreTools.Library.DatItems
if (fields.Contains(Field.DatItem_Mask))
Mask = null;
- if (fields.Contains(Field.DatItem_Conditions))
- Conditions = null;
-
if (Conditions != null)
{
foreach (Condition condition in Conditions)
@@ -332,9 +317,6 @@ namespace SabreTools.Library.DatItems
}
}
- if (fields.Contains(Field.DatItem_Locations))
- Locations = null;
-
if (Locations != null)
{
foreach (Location location in Locations)
@@ -343,9 +325,6 @@ namespace SabreTools.Library.DatItems
}
}
- if (fields.Contains(Field.DatItem_Settings))
- Settings = null;
-
if (Settings != null)
{
foreach (Setting setting in Settings)
@@ -396,19 +375,8 @@ namespace SabreTools.Library.DatItems
if (fields.Contains(Field.DatItem_Mask))
Mask = newItem.Mask;
- if (fields.Contains(Field.DatItem_Conditions))
- Conditions = newItem.Conditions;
-
// Field replacement doesn't make sense for DatItem_Condition*
-
- if (fields.Contains(Field.DatItem_Locations))
- Locations = newItem.Locations;
-
// Field replacement doesn't make sense for DatItem_Location*
-
- if (fields.Contains(Field.DatItem_Settings))
- Settings = newItem.Settings;
-
// Field replacement doesn't make sense for DatItem_Setting*
}
diff --git a/SabreTools.Library/DatItems/DatItem.cs b/SabreTools.Library/DatItems/DatItem.cs
index 7e581abb..0cf87719 100644
--- a/SabreTools.Library/DatItems/DatItem.cs
+++ b/SabreTools.Library/DatItems/DatItem.cs
@@ -69,54 +69,20 @@ namespace SabreTools.Library.DatItems
///
/// Fields unique to a DatItem
///
- /// TODO: Update this once reshuffling is done
public static readonly List DatItemFields = new List()
{
#region Common
- Field.DatItem_Name,
Field.DatItem_Type,
#endregion
- #region AttractMode
-
- Field.DatItem_AltName,
- Field.DatItem_AltTitle,
-
- #endregion
-
- #region OpenMSX
-
- Field.DatItem_Original,
- Field.DatItem_OpenMSXSubType,
- Field.DatItem_OpenMSXType,
- Field.DatItem_Remark,
- Field.DatItem_Boot,
-
- #endregion
-
- #region SoftwareList
-
- // Part
- Field.DatItem_Part,
- Field.DatItem_Part_Name,
- Field.DatItem_Part_Interface,
-
- // Feature
- Field.DatItem_Features,
- Field.DatItem_Feature_Name,
- Field.DatItem_Feature_Value,
-
- Field.DatItem_LoadFlag,
-
- #endregion
-
#region Item-Specific
#region Actionable
// Rom
+ Field.DatItem_Name,
Field.DatItem_Bios,
Field.DatItem_Size,
Field.DatItem_CRC,
@@ -136,11 +102,27 @@ namespace SabreTools.Library.DatItems
Field.DatItem_Optional,
Field.DatItem_Inverted,
+ // Rom (AttractMode)
+ Field.DatItem_AltName,
+ Field.DatItem_AltTitle,
+
+ // Rom (OpenMSX)
+ Field.DatItem_Original,
+ Field.DatItem_OpenMSXSubType,
+ Field.DatItem_OpenMSXType,
+ Field.DatItem_Remark,
+ Field.DatItem_Boot,
+
// Rom (SoftwareList)
Field.DatItem_AreaName,
Field.DatItem_AreaSize,
Field.DatItem_AreaWidth,
Field.DatItem_AreaEndianness,
+ Field.DatItem_LoadFlag,
+ Field.DatItem_Part_Name,
+ Field.DatItem_Part_Interface,
+ Field.DatItem_Part_Feature_Name,
+ Field.DatItem_Part_Feature_Value,
Field.DatItem_Value,
// Disk
@@ -153,11 +135,9 @@ namespace SabreTools.Library.DatItems
// Adjuster
Field.DatItem_Default,
- Field.DatItem_Conditions,
- Field.DatItem_Condition_Tag,
- Field.DatItem_Condition_Mask,
- Field.DatItem_Condition_Relation,
- Field.DatItem_Condition_Value,
+
+ // Analog
+ Field.DatItem_Analog_Mask,
// BiosSet
Field.DatItem_Description,
@@ -166,24 +146,101 @@ namespace SabreTools.Library.DatItems
Field.DatItem_Tag,
Field.DatItem_ChipType,
Field.DatItem_Clock,
-
- // DIP Switch.Values
- Field.DatItem_Values,
- Field.DatItem_Value_Name,
- Field.DatItem_Value_Value,
- Field.DatItem_Value_Default,
- // Ram Option
+ // Condition
+ Field.DatItem_Mask,
+ Field.DatItem_Relation,
+ Field.DatItem_Condition_Tag,
+ Field.DatItem_Condition_Mask,
+ Field.DatItem_Condition_Relation,
+ Field.DatItem_Condition_Value,
+
+ // Control
+ Field.DatItem_Control_Type,
+ Field.DatItem_Control_Player,
+ Field.DatItem_Control_Buttons,
+ Field.DatItem_Control_RegButtons,
+ Field.DatItem_Control_Minimum,
+ Field.DatItem_Control_Maximum,
+ Field.DatItem_Control_Sensitivity,
+ Field.DatItem_Control_KeyDelta,
+ Field.DatItem_Control_Reverse,
+ Field.DatItem_Control_Ways,
+ Field.DatItem_Control_Ways2,
+ Field.DatItem_Control_Ways3,
+
+ // Device
+ Field.DatItem_DeviceType,
+ Field.DatItem_FixedImage,
+ Field.DatItem_Mandatory,
+ Field.DatItem_Interface,
+
+ // Display
+ Field.DatItem_DisplayType,
+ Field.DatItem_Rotate,
+ Field.DatItem_FlipX,
+ Field.DatItem_Width,
+ Field.DatItem_Height,
+ Field.DatItem_Refresh,
+ Field.DatItem_PixClock,
+ Field.DatItem_HTotal,
+ Field.DatItem_HBEnd,
+ Field.DatItem_HBStart,
+ Field.DatItem_VTotal,
+ Field.DatItem_VBEnd,
+ Field.DatItem_VBStart,
+
+ // Driver
+ Field.DatItem_SupportStatus,
+ Field.DatItem_EmulationStatus,
+ Field.DatItem_CocktailStatus,
+ Field.DatItem_SaveStateStatus,
+
+ // Extension
+ Field.DatItem_Extension_Name,
+
+ // Feature
+ Field.DatItem_FeatureType,
+ Field.DatItem_FeatureStatus,
+ Field.DatItem_FeatureOverall,
+
+ // Input
+ Field.DatItem_Service,
+ Field.DatItem_Tilt,
+ Field.DatItem_Players,
+ Field.DatItem_Coins,
+
+ // Instance
+ Field.DatItem_Instance_Name,
+ Field.DatItem_Instance_BriefName,
+
+ // Location
+ Field.DatItem_Location_Name,
+ Field.DatItem_Location_Number,
+ Field.DatItem_Location_Inverted,
+
+ // RamOption
Field.DatItem_Content,
- // Slot.SlotOptions
- Field.DatItem_SlotOptions,
+ // Release
+ Field.DatItem_Language,
+
+ // Setting
+ Field.DatItem_Setting_Name,
+ Field.DatItem_Setting_Value,
+ Field.DatItem_Setting_Default,
+
+ // SlotOption
Field.DatItem_SlotOption_Name,
Field.DatItem_SlotOption_DeviceName,
Field.DatItem_SlotOption_Default,
- // Release
- Field.DatItem_Language,
+ // SoftwareList
+ Field.DatItem_SoftwareListStatus,
+ Field.DatItem_Filter,
+
+ // Sound
+ Field.DatItem_Channels,
#endregion
@@ -193,22 +250,26 @@ namespace SabreTools.Library.DatItems
///
/// Fields unique to a Machine
///
- /// TODO: Update this once reshuffling is done
public static readonly List MachineFields = new List()
{
- // Common
+ #region Common
+
Field.Machine_Name,
Field.Machine_Comment,
Field.Machine_Description,
Field.Machine_Year,
Field.Machine_Manufacturer,
Field.Machine_Publisher,
+ Field.Machine_Category,
Field.Machine_RomOf,
Field.Machine_CloneOf,
Field.Machine_SampleOf,
Field.Machine_Type,
- // AttractMode
+ #endregion
+
+ #region AttractMode
+
Field.Machine_Players,
Field.Machine_Rotation,
Field.Machine_Control,
@@ -217,15 +278,24 @@ namespace SabreTools.Library.DatItems
Field.Machine_DisplayType,
Field.Machine_Buttons,
- // ListXML
+ #endregion
+
+ #region ListXML
+
Field.Machine_SourceFile,
Field.Machine_Runnable,
- // Logiqx
+ #endregion
+
+ #region Logiqx
+
Field.Machine_Board,
Field.Machine_RebuildTo,
- // Logiqx EmuArc
+ #endregion
+
+ #region Logiqx EmuArc
+
Field.Machine_TitleID,
Field.Machine_Developer,
Field.Machine_Genre,
@@ -236,13 +306,21 @@ namespace SabreTools.Library.DatItems
Field.Machine_CRC,
Field.Machine_RelatedTo,
- // OpenMSX
+ #endregion
+
+ #region OpenMSX
+
Field.Machine_GenMSXID,
Field.Machine_System,
Field.Machine_Country,
- // SoftwareList
+ #endregion
+
+ #region SoftwareList
+
Field.Machine_Supported,
+
+ #endregion
};
#endregion
diff --git a/SabreTools.Library/DatItems/DipSwitch.cs b/SabreTools.Library/DatItems/DipSwitch.cs
index a3e9dd13..bb4b942d 100644
--- a/SabreTools.Library/DatItems/DipSwitch.cs
+++ b/SabreTools.Library/DatItems/DipSwitch.cs
@@ -301,15 +301,6 @@ namespace SabreTools.Library.DatItems
if (fields.Contains(Field.DatItem_Mask))
Mask = null;
- if (fields.Contains(Field.DatItem_Conditions))
- Conditions = null;
-
- if (fields.Contains(Field.DatItem_Locations))
- Locations = null;
-
- if (fields.Contains(Field.DatItem_Values))
- Values = null;
-
// TODO: Handle DatItem_Condition*
// TODO: Handle DatItem_Location*
// TODO: Handle DatItem_Value*
@@ -324,9 +315,6 @@ namespace SabreTools.Library.DatItems
if (fields.Contains(Field.DatItem_Part_Interface) && Part != null)
Part.Interface = null;
- if (fields.Contains(Field.DatItem_Features) && Part != null)
- Part.Features = null;
-
// TODO: Handle DatItem_Feature*
#endregion
@@ -376,15 +364,6 @@ namespace SabreTools.Library.DatItems
if (fields.Contains(Field.DatItem_Mask))
Mask = newItem.Mask;
- if (fields.Contains(Field.DatItem_Conditions))
- Conditions = newItem.Conditions;
-
- if (fields.Contains(Field.DatItem_Locations))
- Locations = newItem.Locations;
-
- if (fields.Contains(Field.DatItem_Values))
- Values = newItem.Values;
-
// TODO: Handle DatItem_Condition*
// TODO: Handle DatItem_Location*
// TODO: Handle DatItem_Value*
@@ -409,13 +388,7 @@ namespace SabreTools.Library.DatItems
Part.Interface = newItem.Part?.Interface;
}
- if (fields.Contains(Field.DatItem_Features))
- {
- if (Part == null)
- Part = new Part();
-
- Part.Features = newItem.Part?.Features;
- }
+ // TODO: Handle DatItem_Part_Feature*
#endregion
}
diff --git a/SabreTools.Library/DatItems/Disk.cs b/SabreTools.Library/DatItems/Disk.cs
index 370f3f27..123e630a 100644
--- a/SabreTools.Library/DatItems/Disk.cs
+++ b/SabreTools.Library/DatItems/Disk.cs
@@ -555,9 +555,6 @@ namespace SabreTools.Library.DatItems
if (fields.Contains(Field.DatItem_Part_Interface) && Part != null)
Part.Interface = null;
- if (fields.Contains(Field.DatItem_Features) && Part != null)
- Part.Features = null;
-
// TODO: Handle DatItem_Feature*
#endregion
@@ -694,13 +691,7 @@ namespace SabreTools.Library.DatItems
Part.Interface = newItem.Part?.Interface;
}
- if (fields.Contains(Field.DatItem_Features))
- {
- if (Part == null)
- Part = new Part();
-
- Part.Features = newItem.Part?.Features;
- }
+ // TODO: Handle DatItem_Part_Feature*
#endregion
}
diff --git a/SabreTools.Library/DatItems/Enums.cs b/SabreTools.Library/DatItems/Enums.cs
index a3630729..21ba5dbe 100644
--- a/SabreTools.Library/DatItems/Enums.cs
+++ b/SabreTools.Library/DatItems/Enums.cs
@@ -229,39 +229,16 @@ namespace SabreTools.Library.DatItems
#region Common
- DatItem_Name,
DatItem_Type,
#endregion
- #region AttractMode
-
- DatItem_AltName,
- DatItem_AltTitle,
-
- #endregion
-
- #region SoftwareList
-
- // Part
- DatItem_Part,
- DatItem_Part_Name,
- DatItem_Part_Interface,
-
- // Feature
- DatItem_Features,
- DatItem_Feature_Name,
- DatItem_Feature_Value,
-
- DatItem_LoadFlag,
-
- #endregion
-
#region Item-Specific
#region Actionable
// Rom
+ DatItem_Name,
DatItem_Bios,
DatItem_Size,
DatItem_CRC,
@@ -281,6 +258,10 @@ namespace SabreTools.Library.DatItems
DatItem_Optional,
DatItem_Inverted,
+ // Rom (AttractMode)
+ DatItem_AltName,
+ DatItem_AltTitle,
+
// Rom (OpenMSX)
DatItem_Original,
DatItem_OpenMSXSubType,
@@ -289,10 +270,15 @@ namespace SabreTools.Library.DatItems
DatItem_Boot,
// Rom (SoftwareList)
- DatItem_AreaName,
- DatItem_AreaSize,
- DatItem_AreaWidth,
- DatItem_AreaEndianness,
+ DatItem_AreaName, // TODO: DataArea/DiskArea?
+ DatItem_AreaSize, // TODO: DataArea?
+ DatItem_AreaWidth, // TODO: DataArea?
+ DatItem_AreaEndianness, // TODO: DataArea?
+ DatItem_LoadFlag,
+ DatItem_Part_Name, // TODO: Part?
+ DatItem_Part_Interface, // TODO: Part?
+ DatItem_Part_Feature_Name, // TODO: PartFeature?
+ DatItem_Part_Feature_Value, // TODO: PartFeature?
DatItem_Value,
// Disk
@@ -305,14 +291,9 @@ namespace SabreTools.Library.DatItems
// Adjuster
DatItem_Default,
- DatItem_Conditions,
- DatItem_Condition_Tag,
- DatItem_Condition_Mask,
- DatItem_Condition_Relation,
- DatItem_Condition_Value,
// Analog
- DatItem_Mask,
+ DatItem_Analog_Mask,
// BiosSet
DatItem_Description,
@@ -323,19 +304,26 @@ namespace SabreTools.Library.DatItems
DatItem_Clock,
// Condition
+ DatItem_Mask,
DatItem_Relation,
+ DatItem_Condition_Tag,
+ DatItem_Condition_Mask,
+ DatItem_Condition_Relation,
+ DatItem_Condition_Value,
- // Configuration.Locations
- DatItem_Locations,
- DatItem_Location_Name,
- DatItem_Location_Number,
- DatItem_Location_Inverted,
-
- // Configuration.Settings
- DatItem_Settings,
- DatItem_Setting_Name,
- DatItem_Setting_Value,
- DatItem_Setting_Default,
+ // Control
+ DatItem_Control_Type,
+ DatItem_Control_Player,
+ DatItem_Control_Buttons,
+ DatItem_Control_RegButtons,
+ DatItem_Control_Minimum,
+ DatItem_Control_Maximum,
+ DatItem_Control_Sensitivity,
+ DatItem_Control_KeyDelta,
+ DatItem_Control_Reverse,
+ DatItem_Control_Ways,
+ DatItem_Control_Ways2,
+ DatItem_Control_Ways3,
// Device
DatItem_DeviceType,
@@ -343,21 +331,6 @@ namespace SabreTools.Library.DatItems
DatItem_Mandatory,
DatItem_Interface,
- // Device.Instances
- DatItem_Instances,
- DatItem_Instance_Name,
- DatItem_Instance_BriefName,
-
- // Device.Extensions
- DatItem_Extensions,
- DatItem_Extension_Name,
-
- // DipSwitch.Values
- DatItem_Values,
- DatItem_Value_Name,
- DatItem_Value_Value,
- DatItem_Value_Default,
-
// Display
DatItem_DisplayType,
DatItem_Rotate,
@@ -379,53 +352,50 @@ namespace SabreTools.Library.DatItems
DatItem_CocktailStatus,
DatItem_SaveStateStatus,
+ // Extension
+ DatItem_Extension_Name,
+
// Feature
DatItem_FeatureType,
DatItem_FeatureStatus,
DatItem_FeatureOverall,
- // Inputs
+ // Input
DatItem_Service,
DatItem_Tilt,
DatItem_Players,
DatItem_Coins,
- // Inputs.Controls
- DatItem_Controls,
- DatItem_Control_Type,
- DatItem_Control_Player,
- DatItem_Control_Buttons,
- DatItem_Control_RegButtons,
- DatItem_Control_Minimum,
- DatItem_Control_Maximum,
- DatItem_Control_Sensitivity,
- DatItem_Control_KeyDelta,
- DatItem_Control_Reverse,
- DatItem_Control_Ways,
- DatItem_Control_Ways2,
- DatItem_Control_Ways3,
+ // Instance
+ DatItem_Instance_Name,
+ DatItem_Instance_BriefName,
- // Port.Analogs
- DatItem_Analogs,
- DatItem_Analog_Mask,
+ // Location
+ DatItem_Location_Name,
+ DatItem_Location_Number,
+ DatItem_Location_Inverted,
- // Ram Option
+ // RamOption
DatItem_Content,
// Release
DatItem_Language,
- // Slot.SlotOptions
- DatItem_SlotOptions,
+ // Setting
+ DatItem_Setting_Name,
+ DatItem_Setting_Value,
+ DatItem_Setting_Default,
+
+ // SlotOption
DatItem_SlotOption_Name,
DatItem_SlotOption_DeviceName,
DatItem_SlotOption_Default,
- // Software List
+ // SoftwareList
DatItem_SoftwareListStatus,
DatItem_Filter,
- // Sounds
+ // Sound
DatItem_Channels,
#endregion
diff --git a/SabreTools.Library/DatItems/Input.cs b/SabreTools.Library/DatItems/Input.cs
index 545db0bf..dd637092 100644
--- a/SabreTools.Library/DatItems/Input.cs
+++ b/SabreTools.Library/DatItems/Input.cs
@@ -193,9 +193,6 @@ namespace SabreTools.Library.DatItems
if (fields.Contains(Field.DatItem_Coins))
Coins = null;
- if (fields.Contains(Field.DatItem_Controls))
- Controls = null;
-
// TODO: Handle DatItem_Control*
}
@@ -233,9 +230,6 @@ namespace SabreTools.Library.DatItems
if (fields.Contains(Field.DatItem_Coins))
Coins = newItem.Coins;
- if (fields.Contains(Field.DatItem_Controls))
- Controls = newItem.Controls;
-
// TODO: Handle DatItem_Control*
}
diff --git a/SabreTools.Library/DatItems/Port.cs b/SabreTools.Library/DatItems/Port.cs
index 29dbdfe4..c2f6cba8 100644
--- a/SabreTools.Library/DatItems/Port.cs
+++ b/SabreTools.Library/DatItems/Port.cs
@@ -134,9 +134,6 @@ namespace SabreTools.Library.DatItems
if (fields.Contains(Field.DatItem_Tag))
Tag = null;
- if (fields.Contains(Field.DatItem_Analogs))
- Analogs = null;
-
// TODO: Handle DatItem_Analog*
}
@@ -165,9 +162,6 @@ namespace SabreTools.Library.DatItems
if (fields.Contains(Field.DatItem_Name))
Tag = newItem.Tag;
- if (fields.Contains(Field.DatItem_Analogs))
- Analogs = newItem.Analogs;
-
// TODO: Handle DatItem_Analog*
}
diff --git a/SabreTools.Library/DatItems/Rom.cs b/SabreTools.Library/DatItems/Rom.cs
index 08a51a39..cb28b6c7 100644
--- a/SabreTools.Library/DatItems/Rom.cs
+++ b/SabreTools.Library/DatItems/Rom.cs
@@ -1081,9 +1081,6 @@ namespace SabreTools.Library.DatItems
if (fields.Contains(Field.DatItem_Part_Interface) && Part != null)
Part.Interface = null;
- if (fields.Contains(Field.DatItem_Features) && Part != null)
- Part.Features = null;
-
// TODO: Handle DatItem_Feature*
if (fields.Contains(Field.DatItem_Value))
@@ -1342,13 +1339,7 @@ namespace SabreTools.Library.DatItems
Part.Interface = newItem.Part?.Interface;
}
- if (fields.Contains(Field.DatItem_Features))
- {
- if (Part == null)
- Part = new Part();
-
- Part.Features = newItem.Part?.Features;
- }
+ // TODO: Handle DatItem_Part_Feature*
#endregion
}
diff --git a/SabreTools.Library/DatItems/Setting.cs b/SabreTools.Library/DatItems/Setting.cs
index 3f58fba8..7ea98282 100644
--- a/SabreTools.Library/DatItems/Setting.cs
+++ b/SabreTools.Library/DatItems/Setting.cs
@@ -207,10 +207,6 @@ namespace SabreTools.Library.DatItems
if (filter.DatItem_Setting_Default.MatchesNeutral(null, Default) == false)
return false;
- // Filter on conditions
- if (filter.DatItem_Conditions.MatchesNeutral(null, Conditions != null ? (bool?)(Conditions.Count > 0) : null) == false)
- return false;
-
// Filter on individual conditions
if (Conditions != null)
{
@@ -243,9 +239,6 @@ namespace SabreTools.Library.DatItems
if (fields.Contains(Field.DatItem_Setting_Default))
Default = null;
- if (fields.Contains(Field.DatItem_Conditions))
- Conditions = null;
-
if (Conditions != null)
{
foreach (Condition condition in Conditions)
diff --git a/SabreTools.Library/DatItems/Slot.cs b/SabreTools.Library/DatItems/Slot.cs
index db568443..7bb0da41 100644
--- a/SabreTools.Library/DatItems/Slot.cs
+++ b/SabreTools.Library/DatItems/Slot.cs
@@ -173,9 +173,6 @@ namespace SabreTools.Library.DatItems
if (fields.Contains(Field.DatItem_Name))
Name = null;
- if (fields.Contains(Field.DatItem_SlotOptions))
- SlotOptions = null;
-
// TODO: Handle DatItem_SlotOption*
}
@@ -214,9 +211,6 @@ namespace SabreTools.Library.DatItems
if (fields.Contains(Field.DatItem_Name))
Name = newItem.Name;
- if (fields.Contains(Field.DatItem_SlotOptions))
- SlotOptions = newItem.SlotOptions;
-
// TODO: Handle DatItem_SlotOption*
}
diff --git a/SabreTools.Library/DatItems/Sound.cs b/SabreTools.Library/DatItems/Sound.cs
index 40013ef9..513559d8 100644
--- a/SabreTools.Library/DatItems/Sound.cs
+++ b/SabreTools.Library/DatItems/Sound.cs
@@ -33,7 +33,7 @@ namespace SabreTools.Library.DatItems
// Set base fields
base.SetFields(mappings);
- // Handle Sample-specific fields
+ // Handle Sound-specific fields
if (mappings.Keys.Contains(Field.DatItem_Channels))
Channels = mappings[Field.DatItem_Channels];
}
diff --git a/SabreTools.Library/Filtering/Filter.cs b/SabreTools.Library/Filtering/Filter.cs
index ab34a114..8fc10cfe 100644
--- a/SabreTools.Library/Filtering/Filter.cs
+++ b/SabreTools.Library/Filtering/Filter.cs
@@ -13,7 +13,6 @@ namespace SabreTools.Library.Filtering
/// TODO: Can clever use of Filtering allow for easier external splitting methods?
public class Filter
{
- // TODO: Reorder once all reorganization is done
#region Fields
#region Machine Filters
@@ -94,49 +93,16 @@ namespace SabreTools.Library.Filtering
#region Common
- public FilterItem DatItem_Name { get; private set; } = new FilterItem();
public FilterItem DatItem_Type { get; private set; } = new FilterItem();
#endregion
- #region AttractMode
-
- public FilterItem DatItem_AltName { get; private set; } = new FilterItem();
- public FilterItem DatItem_AltTitle { get; private set; } = new FilterItem();
-
- #endregion
-
- #region OpenMSX
-
- public FilterItem DatItem_Original { get; private set; } = new FilterItem();
- public FilterItem DatItem_OpenMSXSubType { get; private set; } = new FilterItem() { Positive = OpenMSXSubType.NULL, Negative = OpenMSXSubType.NULL };
- public FilterItem DatItem_OpenMSXType { get; private set; } = new FilterItem();
- public FilterItem DatItem_Remark { get; private set; } = new FilterItem();
- public FilterItem DatItem_Boot { get; private set; } = new FilterItem();
-
- #endregion
-
- #region SoftwareList
-
- // Part
- public FilterItem DatItem_Part { get; private set; } = new FilterItem() { Neutral = null };
- public FilterItem DatItem_Part_Name { get; private set; } = new FilterItem();
- public FilterItem DatItem_Part_Interface { get; private set; } = new FilterItem();
-
- // Feature
- public FilterItem DatItem_Features { get; private set; } = new FilterItem() { Neutral = null };
- public FilterItem DatItem_Feature_Name { get; private set; } = new FilterItem();
- public FilterItem DatItem_Feature_Value { get; private set; } = new FilterItem();
-
- public FilterItem DatItem_LoadFlag { get; private set; } = new FilterItem();
-
- #endregion
-
#region Item-Specific
#region Actionable
// Rom
+ public FilterItem DatItem_Name { get; private set; } = new FilterItem();
public FilterItem DatItem_Bios { get; private set; } = new FilterItem();
public FilterItem DatItem_Size { get; private set; } = new FilterItem() { Positive = -1, Negative = -1, Neutral = -1 };
public FilterItem DatItem_CRC { get; private set; } = new FilterItem();
@@ -156,11 +122,27 @@ namespace SabreTools.Library.Filtering
public FilterItem DatItem_Optional { get; private set; } = new FilterItem() { Neutral = null };
public FilterItem DatItem_Inverted { get; private set; } = new FilterItem();
+ // Rom (AttractMode)
+ public FilterItem DatItem_AltName { get; private set; } = new FilterItem();
+ public FilterItem DatItem_AltTitle { get; private set; } = new FilterItem();
+
+ // Rom (OpenMSX)
+ public FilterItem DatItem_Original { get; private set; } = new FilterItem();
+ public FilterItem DatItem_OpenMSXSubType { get; private set; } = new FilterItem() { Positive = OpenMSXSubType.NULL, Negative = OpenMSXSubType.NULL };
+ public FilterItem DatItem_OpenMSXType { get; private set; } = new FilterItem();
+ public FilterItem DatItem_Remark { get; private set; } = new FilterItem();
+ public FilterItem DatItem_Boot { get; private set; } = new FilterItem();
+
// Rom (SoftwareList)
public FilterItem DatItem_AreaName { get; private set; } = new FilterItem();
public FilterItem DatItem_AreaSize { get; private set; } = new FilterItem() { Positive = null, Negative = null, Neutral = null };
public FilterItem DatItem_AreaWidth { get; private set; } = new FilterItem();
public FilterItem DatItem_AreaEndianness { get; private set; } = new FilterItem();
+ public FilterItem DatItem_LoadFlag { get; private set; } = new FilterItem();
+ public FilterItem DatItem_Part_Name { get; private set; } = new FilterItem();
+ public FilterItem DatItem_Part_Interface { get; private set; } = new FilterItem();
+ public FilterItem DatItem_Part_Feature_Name { get; private set; } = new FilterItem();
+ public FilterItem DatItem_Part_Feature_Value { get; private set; } = new FilterItem();
public FilterItem DatItem_Value { get; private set; } = new FilterItem();
// Disk
@@ -172,18 +154,13 @@ namespace SabreTools.Library.Filtering
#region Auxiliary
// Adjuster
- public FilterItem DatItem_Conditions { get; private set; } = new FilterItem() { Neutral = null };
- public FilterItem DatItem_Condition_Tag { get; private set; } = new FilterItem();
- public FilterItem DatItem_Condition_Mask { get; private set; } = new FilterItem();
- public FilterItem DatItem_Condition_Relation { get; private set; } = new FilterItem();
- public FilterItem DatItem_Condition_Value { get; private set; } = new FilterItem();
+ public FilterItem DatItem_Default { get; private set; } = new FilterItem() { Neutral = null };
// Analog
- public FilterItem DatItem_Mask { get; private set; } = new FilterItem();
+ public FilterItem DatItem_Analog_Mask { get; private set; } = new FilterItem();
// BiosSet
public FilterItem DatItem_Description { get; private set; } = new FilterItem();
- public FilterItem DatItem_Default { get; private set; } = new FilterItem() { Neutral = null };
// Chip
public FilterItem DatItem_Tag { get; private set; } = new FilterItem();
@@ -191,19 +168,26 @@ namespace SabreTools.Library.Filtering
public FilterItem DatItem_Clock { get; private set; } = new FilterItem();
// Condition
+ public FilterItem DatItem_Mask { get; private set; } = new FilterItem();
public FilterItem DatItem_Relation { get; private set; } = new FilterItem();
+ public FilterItem DatItem_Condition_Tag { get; private set; } = new FilterItem();
+ public FilterItem DatItem_Condition_Mask { get; private set; } = new FilterItem();
+ public FilterItem DatItem_Condition_Relation { get; private set; } = new FilterItem();
+ public FilterItem DatItem_Condition_Value { get; private set; } = new FilterItem();
- // Configuration.Locations
- public FilterItem DatItem_Locations { get; private set; } = new FilterItem() { Neutral = null };
- public FilterItem DatItem_Location_Name { get; private set; } = new FilterItem();
- public FilterItem DatItem_Location_Number { get; private set; } = new FilterItem();
- public FilterItem DatItem_Location_Inverted { get; private set; } = new FilterItem() { Neutral = null };
-
- // Configuration.Settings
- public FilterItem DatItem_Settings { get; private set; } = new FilterItem() { Neutral = null };
- public FilterItem DatItem_Setting_Name { get; private set; } = new FilterItem();
- public FilterItem DatItem_Setting_Value { get; private set; } = new FilterItem();
- public FilterItem DatItem_Setting_Default { get; private set; } = new FilterItem() { Neutral = null };
+ // Control
+ public FilterItem DatItem_Control_Type { get; private set; } = new FilterItem();
+ public FilterItem DatItem_Control_Player { get; private set; } = new FilterItem();
+ public FilterItem DatItem_Control_Buttons { get; private set; } = new FilterItem();
+ public FilterItem DatItem_Control_RegButtons { get; private set; } = new FilterItem();
+ public FilterItem DatItem_Control_Minimum { get; private set; } = new FilterItem();
+ public FilterItem DatItem_Control_Maximum { get; private set; } = new FilterItem();
+ public FilterItem DatItem_Control_Sensitivity { get; private set; } = new FilterItem();
+ public FilterItem DatItem_Control_KeyDelta { get; private set; } = new FilterItem();
+ public FilterItem DatItem_Control_Reverse { get; private set; } = new FilterItem() { Neutral = null };
+ public FilterItem DatItem_Control_Ways { get; private set; } = new FilterItem();
+ public FilterItem DatItem_Control_Ways2 { get; private set; } = new FilterItem();
+ public FilterItem DatItem_Control_Ways3 { get; private set; } = new FilterItem();
// Device
public FilterItem DatItem_DeviceType { get; private set; } = new FilterItem();
@@ -211,21 +195,6 @@ namespace SabreTools.Library.Filtering
public FilterItem DatItem_Mandatory { get; private set; } = new FilterItem();
public FilterItem DatItem_Interface { get; private set; } = new FilterItem();
- // Device.Instances
- public FilterItem DatItem_Instances { get; private set; } = new FilterItem() { Neutral = null };
- public FilterItem DatItem_Instance_Name { get; private set; } = new FilterItem();
- public FilterItem DatItem_Instance_BriefName { get; private set; } = new FilterItem();
-
- // Device.Extensions
- public FilterItem DatItem_Extensions { get; private set; } = new FilterItem() { Neutral = null };
- public FilterItem DatItem_Extension_Name { get; private set; } = new FilterItem();
-
- // DipSwitch.Values
- public FilterItem DatItem_Values { get; private set; } = new FilterItem() { Neutral = null };
- public FilterItem DatItem_Value_Name { get; private set; } = new FilterItem();
- public FilterItem DatItem_Value_Value { get; private set; } = new FilterItem();
- public FilterItem DatItem_Value_Default { get; private set; } = new FilterItem() { Neutral = null };
-
// Display
public FilterItem DatItem_DisplayType { get; private set; } = new FilterItem();
public FilterItem DatItem_Rotate { get; private set; } = new FilterItem();
@@ -247,6 +216,9 @@ namespace SabreTools.Library.Filtering
public FilterItem DatItem_CocktailStatus { get; private set; } = new FilterItem() { Positive = SupportStatus.NULL, Negative = SupportStatus.NULL };
public FilterItem DatItem_SaveStateStatus { get; private set; } = new FilterItem() { Positive = Supported.NULL, Negative = Supported.NULL };
+ // Extension
+ public FilterItem DatItem_Extension_Name { get; private set; } = new FilterItem();
+
// Feature
public FilterItem DatItem_FeatureType { get; private set; } = new FilterItem() { Positive = FeatureType.NULL, Negative = FeatureType.NULL };
public FilterItem DatItem_FeatureStatus { get; private set; } = new FilterItem() { Positive = FeatureStatus.NULL, Negative = FeatureStatus.NULL };
@@ -258,38 +230,32 @@ namespace SabreTools.Library.Filtering
public FilterItem DatItem_Players { get; private set; } = new FilterItem();
public FilterItem DatItem_Coins { get; private set; } = new FilterItem();
- // Input.Controls
- public FilterItem DatItem_Controls { get; private set; } = new FilterItem() { Neutral = null };
- public FilterItem DatItem_Control_Type { get; private set; } = new FilterItem();
- public FilterItem DatItem_Control_Player { get; private set; } = new FilterItem();
- public FilterItem DatItem_Control_Buttons { get; private set; } = new FilterItem();
- public FilterItem DatItem_Control_RegButtons { get; private set; } = new FilterItem();
- public FilterItem DatItem_Control_Minimum { get; private set; } = new FilterItem();
- public FilterItem DatItem_Control_Maximum { get; private set; } = new FilterItem();
- public FilterItem DatItem_Control_Sensitivity { get; private set; } = new FilterItem();
- public FilterItem DatItem_Control_KeyDelta { get; private set; } = new FilterItem();
- public FilterItem DatItem_Control_Reverse { get; private set; } = new FilterItem() { Neutral = null };
- public FilterItem DatItem_Control_Ways { get; private set; } = new FilterItem();
- public FilterItem DatItem_Control_Ways2 { get; private set; } = new FilterItem();
- public FilterItem DatItem_Control_Ways3 { get; private set; } = new FilterItem();
+ // Instance
+ public FilterItem DatItem_Instance_Name { get; private set; } = new FilterItem();
+ public FilterItem DatItem_Instance_BriefName { get; private set; } = new FilterItem();
- // Port.Analogs
- public FilterItem DatItem_Analogs { get; private set; } = new FilterItem() { Neutral = null };
- public FilterItem DatItem_Analog_Mask { get; private set; } = new FilterItem();
+ // Location
+ public FilterItem DatItem_Location_Name { get; private set; } = new FilterItem();
+ public FilterItem DatItem_Location_Number { get; private set; } = new FilterItem();
+ public FilterItem DatItem_Location_Inverted { get; private set; } = new FilterItem() { Neutral = null };
- // Ram Option
+ // RamOption
public FilterItem DatItem_Content { get; private set; } = new FilterItem();
// Release
public FilterItem DatItem_Language { get; private set; } = new FilterItem();
- // Slots.SlotOptions
- public FilterItem DatItem_SlotOptions { get; private set; } = new FilterItem() { Neutral = null };
+ // Setting
+ public FilterItem DatItem_Setting_Name { get; private set; } = new FilterItem();
+ public FilterItem DatItem_Setting_Value { get; private set; } = new FilterItem();
+ public FilterItem DatItem_Setting_Default { get; private set; } = new FilterItem() { Neutral = null };
+
+ // SlotOption
public FilterItem DatItem_SlotOption_Name { get; private set; } = new FilterItem();
public FilterItem