mirror of
https://github.com/claunia/SabreTools.git
synced 2025-12-16 19:14:27 +00:00
Finish string -> Field
This commit is contained in:
@@ -101,311 +101,6 @@ namespace SabreTools.Library.DatFiles
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Get normalized header value for a given separated value header field
|
|
||||||
/// </summary>
|
|
||||||
private string GetNormalizedHeader(string header)
|
|
||||||
{
|
|
||||||
switch (header.ToLowerInvariant())
|
|
||||||
{
|
|
||||||
#region Machine
|
|
||||||
|
|
||||||
#region Logiqx
|
|
||||||
|
|
||||||
case "board":
|
|
||||||
return "Machine.Board";
|
|
||||||
|
|
||||||
case "rebuildto":
|
|
||||||
case "rebuild to":
|
|
||||||
case "rebuild-to":
|
|
||||||
return "Machine.RebuildTo";
|
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region Logiqx EmuArc
|
|
||||||
|
|
||||||
case "titleid":
|
|
||||||
case "title id":
|
|
||||||
case "title-id":
|
|
||||||
return "Machine.TitleID";
|
|
||||||
|
|
||||||
case "developer":
|
|
||||||
return "Machine.Developer";
|
|
||||||
|
|
||||||
case "genre":
|
|
||||||
return "Machine.Genre";
|
|
||||||
|
|
||||||
case "subgenre":
|
|
||||||
return "Machine.Subgenre";
|
|
||||||
|
|
||||||
case "ratings":
|
|
||||||
return "Machine.Ratings";
|
|
||||||
|
|
||||||
case "score":
|
|
||||||
return "Machine.Score";
|
|
||||||
|
|
||||||
case "enabled":
|
|
||||||
return "Machine.Enabled";
|
|
||||||
|
|
||||||
case "hascrc":
|
|
||||||
case "has crc":
|
|
||||||
case "has-crc":
|
|
||||||
return "Machine.HasCrc";
|
|
||||||
|
|
||||||
case "relatedto":
|
|
||||||
case "related to":
|
|
||||||
case "related-to":
|
|
||||||
return "Machine.RelatedTo";
|
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region OpenMSX
|
|
||||||
|
|
||||||
case "genmsxid":
|
|
||||||
case "genmsx id":
|
|
||||||
case "genmsx-id":
|
|
||||||
case "gen msx id":
|
|
||||||
case "gen-msx-id":
|
|
||||||
return "Machine.GenMSXID";
|
|
||||||
|
|
||||||
case "msxsystem":
|
|
||||||
case "msx system":
|
|
||||||
case "msx-system":
|
|
||||||
return "Machine.System";
|
|
||||||
|
|
||||||
case "country":
|
|
||||||
return "Machine.Country";
|
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region SoftwareList
|
|
||||||
|
|
||||||
case "supported":
|
|
||||||
return "Machine.Supported";
|
|
||||||
|
|
||||||
case "sharedfeat":
|
|
||||||
case "shared feat":
|
|
||||||
case "shared-feat":
|
|
||||||
case "sharedfeature":
|
|
||||||
case "shared feature":
|
|
||||||
case "shared-feature":
|
|
||||||
case "sharedfeatures":
|
|
||||||
case "shared features":
|
|
||||||
case "shared-features":
|
|
||||||
return "Machine.SharedFeatures";
|
|
||||||
case "dipswitch":
|
|
||||||
case "dip switch":
|
|
||||||
case "dip-switch":
|
|
||||||
case "dipswitches":
|
|
||||||
case "dip switches":
|
|
||||||
case "dip-switches":
|
|
||||||
return "Machine.DipSwitches";
|
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#endregion // Machine
|
|
||||||
|
|
||||||
#region DatItem
|
|
||||||
|
|
||||||
#region Common
|
|
||||||
|
|
||||||
case "itemtype":
|
|
||||||
case "item type":
|
|
||||||
case "type":
|
|
||||||
return "DatItem.Type";
|
|
||||||
|
|
||||||
case "disk":
|
|
||||||
case "diskname":
|
|
||||||
case "disk name":
|
|
||||||
case "item":
|
|
||||||
case "itemname":
|
|
||||||
case "item name":
|
|
||||||
case "name":
|
|
||||||
case "rom":
|
|
||||||
case "romname":
|
|
||||||
case "rom name":
|
|
||||||
return "DatItem.Name";
|
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region AttractMode
|
|
||||||
|
|
||||||
case "altname":
|
|
||||||
case "alt name":
|
|
||||||
case "alt-name":
|
|
||||||
case "altromname":
|
|
||||||
case "alt romname":
|
|
||||||
case "alt-romname":
|
|
||||||
return "DatItem.AltName";
|
|
||||||
|
|
||||||
case "alttitle":
|
|
||||||
case "alt title":
|
|
||||||
case "alt-title":
|
|
||||||
case "altromtitle":
|
|
||||||
case "alt romtitle":
|
|
||||||
case "alt-romtitle":
|
|
||||||
return "DatItem.AltTitle";
|
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region OpenMSX
|
|
||||||
|
|
||||||
case "original":
|
|
||||||
return "DatItem.Original";
|
|
||||||
case "subtype":
|
|
||||||
case "sub type":
|
|
||||||
case "sub-type":
|
|
||||||
case "openmsx_subtype":
|
|
||||||
return "DatItem.OpenMSXSubType";
|
|
||||||
case "openmsx_type":
|
|
||||||
return "DatItem.OpenMSXType";
|
|
||||||
case "remark":
|
|
||||||
return "DatItem.Remark";
|
|
||||||
case "boot":
|
|
||||||
return "DatItem.Boot";
|
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region SoftwareList
|
|
||||||
|
|
||||||
case "partname":
|
|
||||||
case "part name":
|
|
||||||
case "part-name":
|
|
||||||
return "DatItem.PartName";
|
|
||||||
|
|
||||||
case "partinterface":
|
|
||||||
case "part interface":
|
|
||||||
case "part-interface":
|
|
||||||
return "DatItem.PartInterface";
|
|
||||||
|
|
||||||
case "features":
|
|
||||||
return "DatItem.Features";
|
|
||||||
|
|
||||||
case "areaname":
|
|
||||||
case "area name":
|
|
||||||
case "area-name":
|
|
||||||
return "DatItem.AreaName";
|
|
||||||
|
|
||||||
case "areasize":
|
|
||||||
case "area size":
|
|
||||||
case "area-size":
|
|
||||||
return "DatItem.AreaSize";
|
|
||||||
|
|
||||||
case "areawidth":
|
|
||||||
case "area width":
|
|
||||||
case "area-width":
|
|
||||||
return "DatItem.AreaWidth";
|
|
||||||
|
|
||||||
case "areaendinanness":
|
|
||||||
case "area endianness":
|
|
||||||
case "area-endianness":
|
|
||||||
return "DatItem.AreaEndianness";
|
|
||||||
|
|
||||||
case "value":
|
|
||||||
return "DatItem.Value";
|
|
||||||
|
|
||||||
case "loadflag":
|
|
||||||
case "load flag":
|
|
||||||
case "load-flag":
|
|
||||||
return "DatItem.LoadFlag";
|
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
case "default":
|
|
||||||
return "DatItem.Default";
|
|
||||||
|
|
||||||
case "biosdescription":
|
|
||||||
case "bios description":
|
|
||||||
return "DatItem.Description";
|
|
||||||
|
|
||||||
case "itemsize":
|
|
||||||
case "item size":
|
|
||||||
case "size":
|
|
||||||
return "DatItem.Size";
|
|
||||||
|
|
||||||
case "crc":
|
|
||||||
case "crc hash":
|
|
||||||
return "DatItem.CRC";
|
|
||||||
|
|
||||||
case "md5":
|
|
||||||
case "md5 hash":
|
|
||||||
return "DatItem.MD5";
|
|
||||||
|
|
||||||
case "ripemd":
|
|
||||||
case "ripemd160":
|
|
||||||
case "ripemd hash":
|
|
||||||
case "ripemd160 hash":
|
|
||||||
return "DatItem.RIPEMD160";
|
|
||||||
|
|
||||||
case "sha1":
|
|
||||||
case "sha-1":
|
|
||||||
case "sha1 hash":
|
|
||||||
case "sha-1 hash":
|
|
||||||
return "DatItem.SHA1";
|
|
||||||
|
|
||||||
case "sha256":
|
|
||||||
case "sha-256":
|
|
||||||
case "sha256 hash":
|
|
||||||
case "sha-256 hash":
|
|
||||||
return "DatItem.SHA256";
|
|
||||||
|
|
||||||
case "sha384":
|
|
||||||
case "sha-384":
|
|
||||||
case "sha384 hash":
|
|
||||||
case "sha-384 hash":
|
|
||||||
return "DatItem.SHA384";
|
|
||||||
|
|
||||||
case "sha512":
|
|
||||||
case "sha-512":
|
|
||||||
case "sha512 hash":
|
|
||||||
case "sha-512 hash":
|
|
||||||
return "DatItem.SHA512";
|
|
||||||
|
|
||||||
case "merge":
|
|
||||||
case "mergetag":
|
|
||||||
case "merge tag":
|
|
||||||
return "DatItem.Merge";
|
|
||||||
|
|
||||||
case "region":
|
|
||||||
return "DatItem.Region";
|
|
||||||
|
|
||||||
case "index":
|
|
||||||
return "DatItem.Index";
|
|
||||||
|
|
||||||
case "writable":
|
|
||||||
return "DatItem.Writable";
|
|
||||||
|
|
||||||
case "optional":
|
|
||||||
return "DatItem.Optional";
|
|
||||||
|
|
||||||
case "nodump":
|
|
||||||
case "no dump":
|
|
||||||
case "status":
|
|
||||||
case "item status":
|
|
||||||
return "DatItem.Status";
|
|
||||||
|
|
||||||
case "language":
|
|
||||||
return "DatItem.Language";
|
|
||||||
|
|
||||||
case "date":
|
|
||||||
return "DatItem.Date";
|
|
||||||
|
|
||||||
case "bios":
|
|
||||||
return "DatItem.Bios";
|
|
||||||
|
|
||||||
case "offset":
|
|
||||||
return "DatItem.Offset";
|
|
||||||
|
|
||||||
case "inverted":
|
|
||||||
return "DatItem.Inverted";
|
|
||||||
|
|
||||||
#endregion // DatItem
|
|
||||||
|
|
||||||
default:
|
|
||||||
return "INVALID";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Create and open an output file for writing direct from a dictionary
|
/// Create and open an output file for writing direct from a dictionary
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|||||||
@@ -291,7 +291,7 @@ namespace SabreTools.Library.DatItems
|
|||||||
Field.Machine_Ratings,
|
Field.Machine_Ratings,
|
||||||
Field.Machine_Score,
|
Field.Machine_Score,
|
||||||
Field.Machine_Enabled,
|
Field.Machine_Enabled,
|
||||||
Field.Machine_HasCrc,
|
Field.Machine_CRC,
|
||||||
Field.Machine_RelatedTo,
|
Field.Machine_RelatedTo,
|
||||||
|
|
||||||
// OpenMSX
|
// OpenMSX
|
||||||
|
|||||||
@@ -170,25 +170,25 @@ namespace SabreTools.Library.DatItems
|
|||||||
|
|
||||||
// Inputs
|
// Inputs
|
||||||
Machine_Inputs, // TODO: Implement Inputs usage
|
Machine_Inputs, // TODO: Implement Inputs usage
|
||||||
Machine_InputService,
|
Machine_Input_Service,
|
||||||
Machine_InputTilt,
|
Machine_Input_Tilt,
|
||||||
Machine_InputPlayers,
|
Machine_Input_Players,
|
||||||
Machine_InputCoins,
|
Machine_Input_Coins,
|
||||||
|
|
||||||
// Inputs.Controls
|
// Inputs.Controls
|
||||||
Machine_InputControls,
|
Machine_Input_Controls,
|
||||||
Machine_InputControl_Type,
|
Machine_Input_Control_Type,
|
||||||
Machine_InputControl_Player,
|
Machine_Input_Control_Player,
|
||||||
Machine_InputControl_Buttons,
|
Machine_Input_Control_Buttons,
|
||||||
Machine_InputControl_RegButtons,
|
Machine_Input_Control_RegButtons,
|
||||||
Machine_InputControl_Minimum,
|
Machine_Input_Control_Minimum,
|
||||||
Machine_InputControl_Maximum,
|
Machine_Input_Control_Maximum,
|
||||||
Machine_InputControl_Sensitivity,
|
Machine_Input_Control_Sensitivity,
|
||||||
Machine_InputControl_KeyDelta,
|
Machine_Input_Control_KeyDelta,
|
||||||
Machine_InputControl_Reverse,
|
Machine_Input_Control_Reverse,
|
||||||
Machine_InputControl_Ways,
|
Machine_Input_Control_Ways,
|
||||||
Machine_InputControl_Ways2,
|
Machine_Input_Control_Ways2,
|
||||||
Machine_InputControl_Ways3,
|
Machine_Input_Control_Ways3,
|
||||||
|
|
||||||
// DipSwitches
|
// DipSwitches
|
||||||
Machine_DipSwitches, // TODO: Implement DipSwitches usage
|
Machine_DipSwitches, // TODO: Implement DipSwitches usage
|
||||||
@@ -228,11 +228,11 @@ namespace SabreTools.Library.DatItems
|
|||||||
|
|
||||||
// Ports
|
// Ports
|
||||||
Machine_Ports, // TODO: Implement Ports usage
|
Machine_Ports, // TODO: Implement Ports usage
|
||||||
Machine_Ports_Tag,
|
Machine_Port_Tag,
|
||||||
|
|
||||||
// Ports.Analogs
|
// Ports.Analogs
|
||||||
Machine_Ports_Analogs,
|
Machine_Port_Analogs,
|
||||||
Machine_Ports_Analog_Mask,
|
Machine_Port_Analog_Mask,
|
||||||
|
|
||||||
// Adjusters
|
// Adjusters
|
||||||
Machine_Adjusters, // TODO: Implement Adjusters usage
|
Machine_Adjusters, // TODO: Implement Adjusters usage
|
||||||
@@ -314,7 +314,7 @@ namespace SabreTools.Library.DatItems
|
|||||||
Machine_Ratings,
|
Machine_Ratings,
|
||||||
Machine_Score,
|
Machine_Score,
|
||||||
Machine_Enabled,
|
Machine_Enabled,
|
||||||
Machine_HasCrc,
|
Machine_CRC,
|
||||||
Machine_RelatedTo,
|
Machine_RelatedTo,
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|||||||
@@ -506,8 +506,8 @@ namespace SabreTools.Library.DatItems
|
|||||||
if (mappings.Keys.Contains(Field.Machine_Enabled))
|
if (mappings.Keys.Contains(Field.Machine_Enabled))
|
||||||
Enabled = mappings[Field.Machine_Enabled];
|
Enabled = mappings[Field.Machine_Enabled];
|
||||||
|
|
||||||
if (mappings.Keys.Contains(Field.Machine_HasCrc))
|
if (mappings.Keys.Contains(Field.Machine_CRC))
|
||||||
HasCrc = mappings[Field.Machine_HasCrc].AsYesNo();
|
HasCrc = mappings[Field.Machine_CRC].AsYesNo();
|
||||||
|
|
||||||
if (mappings.Keys.Contains(Field.Machine_RelatedTo))
|
if (mappings.Keys.Contains(Field.Machine_RelatedTo))
|
||||||
RelatedTo = mappings[Field.Machine_RelatedTo];
|
RelatedTo = mappings[Field.Machine_RelatedTo];
|
||||||
@@ -1049,7 +1049,7 @@ namespace SabreTools.Library.DatItems
|
|||||||
if (fields.Contains(Field.Machine_Enabled))
|
if (fields.Contains(Field.Machine_Enabled))
|
||||||
Enabled = null;
|
Enabled = null;
|
||||||
|
|
||||||
if (fields.Contains(Field.Machine_HasCrc))
|
if (fields.Contains(Field.Machine_CRC))
|
||||||
HasCrc = null;
|
HasCrc = null;
|
||||||
|
|
||||||
if (fields.Contains(Field.Machine_RelatedTo))
|
if (fields.Contains(Field.Machine_RelatedTo))
|
||||||
@@ -1213,7 +1213,7 @@ namespace SabreTools.Library.DatItems
|
|||||||
if (fields.Contains(Field.Machine_Enabled))
|
if (fields.Contains(Field.Machine_Enabled))
|
||||||
Enabled = machine.Enabled;
|
Enabled = machine.Enabled;
|
||||||
|
|
||||||
if (fields.Contains(Field.Machine_HasCrc))
|
if (fields.Contains(Field.Machine_CRC))
|
||||||
HasCrc = machine.HasCrc;
|
HasCrc = machine.HasCrc;
|
||||||
|
|
||||||
if (fields.Contains(Field.Machine_RelatedTo))
|
if (fields.Contains(Field.Machine_RelatedTo))
|
||||||
|
|||||||
@@ -795,7 +795,7 @@ namespace SabreTools.Library.Filtering
|
|||||||
Enabled.PositiveSet.Add(value);
|
Enabled.PositiveSet.Add(value);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case Field.Machine_HasCrc:
|
case Field.Machine_CRC:
|
||||||
if (negate || value.Equals("false", StringComparison.OrdinalIgnoreCase))
|
if (negate || value.Equals("false", StringComparison.OrdinalIgnoreCase))
|
||||||
HasCrc.Neutral = false;
|
HasCrc.Neutral = false;
|
||||||
else
|
else
|
||||||
|
|||||||
@@ -413,7 +413,6 @@ namespace SabreTools.Library.Tools
|
|||||||
return Field.Machine_Status;
|
return Field.Machine_Status;
|
||||||
|
|
||||||
case "displaycount":
|
case "displaycount":
|
||||||
case "displays":
|
|
||||||
return Field.Machine_DisplayCount;
|
return Field.Machine_DisplayCount;
|
||||||
|
|
||||||
case "displaytype":
|
case "displaytype":
|
||||||
@@ -456,6 +455,420 @@ namespace SabreTools.Library.Tools
|
|||||||
case "chip_clock":
|
case "chip_clock":
|
||||||
return Field.Machine_Chip_Clock;
|
return Field.Machine_Chip_Clock;
|
||||||
|
|
||||||
|
case "displays":
|
||||||
|
return Field.Machine_Displays;
|
||||||
|
|
||||||
|
case "display_tag":
|
||||||
|
return Field.Machine_Display_Tag;
|
||||||
|
|
||||||
|
case "display_type":
|
||||||
|
return Field.Machine_Display_Type;
|
||||||
|
|
||||||
|
case "display_rotate":
|
||||||
|
return Field.Machine_Display_Rotate;
|
||||||
|
|
||||||
|
case "display_flipx":
|
||||||
|
return Field.Machine_Display_FlipX;
|
||||||
|
|
||||||
|
case "display_width":
|
||||||
|
return Field.Machine_Display_Width;
|
||||||
|
|
||||||
|
case "display_height":
|
||||||
|
return Field.Machine_Display_Height;
|
||||||
|
|
||||||
|
case "display_refresh":
|
||||||
|
return Field.Machine_Display_Refresh;
|
||||||
|
|
||||||
|
case "display_pixclock":
|
||||||
|
return Field.Machine_Display_PixClock;
|
||||||
|
|
||||||
|
case "display_htotal":
|
||||||
|
return Field.Machine_Display_HTotal;
|
||||||
|
|
||||||
|
case "display_hbend":
|
||||||
|
return Field.Machine_Display_HBEnd;
|
||||||
|
|
||||||
|
case "display_hbstart":
|
||||||
|
return Field.Machine_Display_HBStart;
|
||||||
|
|
||||||
|
case "display_vtotal":
|
||||||
|
return Field.Machine_Display_VTotal;
|
||||||
|
|
||||||
|
case "display_vbend":
|
||||||
|
return Field.Machine_Display_VBEnd;
|
||||||
|
|
||||||
|
case "display_vbstart":
|
||||||
|
return Field.Machine_Display_VBStart;
|
||||||
|
|
||||||
|
case "sounds":
|
||||||
|
return Field.Machine_Sounds;
|
||||||
|
|
||||||
|
case "sound_channels":
|
||||||
|
return Field.Machine_Sound_Channels;
|
||||||
|
|
||||||
|
case "conditions":
|
||||||
|
return Field.Machine_Conditions;
|
||||||
|
|
||||||
|
case "condition_tag":
|
||||||
|
return Field.Machine_Condition_Tag;
|
||||||
|
|
||||||
|
case "condition_mask":
|
||||||
|
return Field.Machine_Condition_Mask;
|
||||||
|
|
||||||
|
case "condition_relation":
|
||||||
|
return Field.Machine_Condition_Relation;
|
||||||
|
|
||||||
|
case "condition_value":
|
||||||
|
return Field.Machine_Condition_Value;
|
||||||
|
|
||||||
|
case "inputs":
|
||||||
|
return Field.Machine_Inputs;
|
||||||
|
|
||||||
|
case "input_service":
|
||||||
|
return Field.Machine_Input_Service;
|
||||||
|
|
||||||
|
case "input_tilt":
|
||||||
|
return Field.Machine_Input_Tilt;
|
||||||
|
|
||||||
|
case "input_players":
|
||||||
|
return Field.Machine_Input_Players;
|
||||||
|
|
||||||
|
case "input_coins":
|
||||||
|
return Field.Machine_Input_Coins;
|
||||||
|
|
||||||
|
case "input_controls":
|
||||||
|
return Field.Machine_Input_Controls;
|
||||||
|
|
||||||
|
case "input_control_type":
|
||||||
|
return Field.Machine_Input_Control_Type;
|
||||||
|
|
||||||
|
case "input_control_player":
|
||||||
|
return Field.Machine_Input_Control_Player;
|
||||||
|
|
||||||
|
case "input_control_buttons":
|
||||||
|
return Field.Machine_Input_Control_Buttons;
|
||||||
|
|
||||||
|
case "input_control_regbuttons":
|
||||||
|
return Field.Machine_Input_Control_RegButtons;
|
||||||
|
|
||||||
|
case "input_control_minimum":
|
||||||
|
return Field.Machine_Input_Control_Minimum;
|
||||||
|
|
||||||
|
case "input_control_maximum":
|
||||||
|
return Field.Machine_Input_Control_Maximum;
|
||||||
|
|
||||||
|
case "input_control_sensitivity":
|
||||||
|
return Field.Machine_Input_Control_Sensitivity;
|
||||||
|
|
||||||
|
case "input_control_keydelta":
|
||||||
|
return Field.Machine_Input_Control_KeyDelta;
|
||||||
|
|
||||||
|
case "input_control_reverse":
|
||||||
|
return Field.Machine_Input_Control_Reverse;
|
||||||
|
|
||||||
|
case "input_control_ways":
|
||||||
|
return Field.Machine_Input_Control_Ways;
|
||||||
|
|
||||||
|
case "input_control_ways2":
|
||||||
|
return Field.Machine_Input_Control_Ways2;
|
||||||
|
|
||||||
|
case "input_control_ways3":
|
||||||
|
return Field.Machine_Input_Control_Ways3;
|
||||||
|
|
||||||
|
case "dipswitches":
|
||||||
|
return Field.Machine_DipSwitches;
|
||||||
|
|
||||||
|
case "dipswitch_name":
|
||||||
|
return Field.Machine_DipSwitch_Name;
|
||||||
|
|
||||||
|
case "dipswitch_tag":
|
||||||
|
return Field.Machine_DipSwitch_Tag;
|
||||||
|
|
||||||
|
case "dipswitch_mask":
|
||||||
|
return Field.Machine_DipSwitch_Mask;
|
||||||
|
|
||||||
|
case "dipswitch_locations":
|
||||||
|
return Field.Machine_DipSwitch_Locations;
|
||||||
|
|
||||||
|
case "dipswitch_location_name":
|
||||||
|
return Field.Machine_DipSwitch_Location_Name;
|
||||||
|
|
||||||
|
case "dipswitch_location_number":
|
||||||
|
return Field.Machine_DipSwitch_Location_Number;
|
||||||
|
|
||||||
|
case "dipswitch_location_inverted":
|
||||||
|
return Field.Machine_DipSwitch_Location_Inverted;
|
||||||
|
|
||||||
|
case "dipswitch_values":
|
||||||
|
return Field.Machine_DipSwitch_Values;
|
||||||
|
|
||||||
|
case "dipswitch_value_name":
|
||||||
|
return Field.Machine_DipSwitch_Value_Name;
|
||||||
|
|
||||||
|
case "dipswitch_value_value":
|
||||||
|
return Field.Machine_DipSwitch_Value_Value;
|
||||||
|
|
||||||
|
case "dipswitch_value_default":
|
||||||
|
return Field.Machine_DipSwitch_Value_Default;
|
||||||
|
|
||||||
|
case "configurations":
|
||||||
|
return Field.Machine_Configurations;
|
||||||
|
|
||||||
|
case "configuration_name":
|
||||||
|
return Field.Machine_Configuration_Name;
|
||||||
|
|
||||||
|
case "configuration_tag":
|
||||||
|
return Field.Machine_Configuration_Tag;
|
||||||
|
|
||||||
|
case "configuration_mask":
|
||||||
|
return Field.Machine_Configuration_Mask;
|
||||||
|
|
||||||
|
case "configuration_locations":
|
||||||
|
return Field.Machine_Configuration_Locations;
|
||||||
|
|
||||||
|
case "configuration_location_name":
|
||||||
|
return Field.Machine_Configuration_Location_Name;
|
||||||
|
|
||||||
|
case "configuration_location_number":
|
||||||
|
return Field.Machine_Configuration_Location_Number;
|
||||||
|
|
||||||
|
case "configuration_location_inverted":
|
||||||
|
return Field.Machine_Configuration_Location_Inverted;
|
||||||
|
|
||||||
|
case "configuration_settings":
|
||||||
|
return Field.Machine_Configuration_Settings;
|
||||||
|
|
||||||
|
case "configuration_setting_name":
|
||||||
|
return Field.Machine_Configuration_Setting_Name;
|
||||||
|
|
||||||
|
case "configuration_setting_value":
|
||||||
|
return Field.Machine_Configuration_Setting_Value;
|
||||||
|
|
||||||
|
case "configuration_setting_default":
|
||||||
|
return Field.Machine_Configuration_Setting_Default;
|
||||||
|
|
||||||
|
case "ports":
|
||||||
|
return Field.Machine_Ports;
|
||||||
|
|
||||||
|
case "port_tag":
|
||||||
|
return Field.Machine_Port_Tag;
|
||||||
|
|
||||||
|
case "port_analogs":
|
||||||
|
return Field.Machine_Port_Analogs;
|
||||||
|
|
||||||
|
case "port_analog_mask":
|
||||||
|
return Field.Machine_Port_Analog_Mask;
|
||||||
|
|
||||||
|
case "adjusters":
|
||||||
|
return Field.Machine_Adjusters;
|
||||||
|
|
||||||
|
case "adjuster_name":
|
||||||
|
return Field.Machine_Adjuster_Name;
|
||||||
|
|
||||||
|
case "adjuster_default":
|
||||||
|
return Field.Machine_Adjuster_Default;
|
||||||
|
|
||||||
|
case "adjuster_conditions":
|
||||||
|
return Field.Machine_Adjuster_Conditions;
|
||||||
|
|
||||||
|
case "adjuster_condition_tag":
|
||||||
|
return Field.Machine_Adjuster_Condition_Tag;
|
||||||
|
|
||||||
|
case "adjuster_condition_mask":
|
||||||
|
return Field.Machine_Adjuster_Condition_Mask;
|
||||||
|
|
||||||
|
case "adjuster_condition_relation":
|
||||||
|
return Field.Machine_Adjuster_Condition_Relation;
|
||||||
|
|
||||||
|
case "adjuster_condition_value":
|
||||||
|
return Field.Machine_Adjuster_Condition_Value;
|
||||||
|
|
||||||
|
case "drivers":
|
||||||
|
return Field.Machine_Drivers;
|
||||||
|
|
||||||
|
case "driver_status":
|
||||||
|
return Field.Machine_Driver_Status;
|
||||||
|
|
||||||
|
case "driver_emulation":
|
||||||
|
return Field.Machine_Driver_Emulation;
|
||||||
|
|
||||||
|
case "driver_cocktail":
|
||||||
|
return Field.Machine_Driver_Cocktail;
|
||||||
|
|
||||||
|
case "driver_savestate":
|
||||||
|
return Field.Machine_Driver_SaveState;
|
||||||
|
|
||||||
|
case "features":
|
||||||
|
return Field.Machine_Features;
|
||||||
|
|
||||||
|
case "feature_type":
|
||||||
|
return Field.Machine_Feature_Type;
|
||||||
|
|
||||||
|
case "feature_status":
|
||||||
|
return Field.Machine_Feature_Status;
|
||||||
|
|
||||||
|
case "feature_overall":
|
||||||
|
return Field.Machine_Feature_Overall;
|
||||||
|
|
||||||
|
case "devices":
|
||||||
|
return Field.Machine_Devices;
|
||||||
|
|
||||||
|
case "device_type":
|
||||||
|
return Field.Machine_Device_Type;
|
||||||
|
|
||||||
|
case "device_tag":
|
||||||
|
return Field.Machine_Device_Tag;
|
||||||
|
|
||||||
|
case "device_fixedimage":
|
||||||
|
return Field.Machine_Device_FixedImage;
|
||||||
|
|
||||||
|
case "device_mandatory":
|
||||||
|
return Field.Machine_Device_Mandatory;
|
||||||
|
|
||||||
|
case "device_interface":
|
||||||
|
return Field.Machine_Device_Interface;
|
||||||
|
|
||||||
|
case "device_instances":
|
||||||
|
return Field.Machine_Device_Instances;
|
||||||
|
|
||||||
|
case "device_instance_name":
|
||||||
|
return Field.Machine_Device_Instance_Name;
|
||||||
|
|
||||||
|
case "device_instance_briefname":
|
||||||
|
return Field.Machine_Device_Instance_BriefName;
|
||||||
|
|
||||||
|
case "device_extensions":
|
||||||
|
return Field.Machine_Device_Extensions;
|
||||||
|
|
||||||
|
case "device_extension_name":
|
||||||
|
return Field.Machine_Device_Extension_Name;
|
||||||
|
|
||||||
|
case "slots":
|
||||||
|
return Field.Machine_Slots;
|
||||||
|
|
||||||
|
case "slot_name":
|
||||||
|
return Field.Machine_Slot_Name;
|
||||||
|
|
||||||
|
case "slot_slotoptions":
|
||||||
|
return Field.Machine_Slot_SlotOptions;
|
||||||
|
|
||||||
|
case "slot_slotoption_name":
|
||||||
|
return Field.Machine_Slot_SlotOption_Name;
|
||||||
|
|
||||||
|
case "slot_slotoption_devicename":
|
||||||
|
return Field.Machine_Slot_SlotOption_DeviceName;
|
||||||
|
|
||||||
|
case "slot_slotoption_default":
|
||||||
|
return Field.Machine_Slot_SlotOption_Default;
|
||||||
|
|
||||||
|
case "softwarelists":
|
||||||
|
return Field.Machine_SoftwareLists;
|
||||||
|
|
||||||
|
case "softwarelist_name":
|
||||||
|
return Field.Machine_SoftwareList_Name;
|
||||||
|
|
||||||
|
case "softwarelist_status":
|
||||||
|
return Field.Machine_SoftwareList_Status;
|
||||||
|
|
||||||
|
case "softwarelist_filter":
|
||||||
|
return Field.Machine_SoftwareList_Filter;
|
||||||
|
|
||||||
|
case "ramoptions":
|
||||||
|
return Field.Machine_RamOptions;
|
||||||
|
|
||||||
|
case "ramoption_default":
|
||||||
|
return Field.Machine_RamOption_Default;
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Logiqx
|
||||||
|
|
||||||
|
case "board":
|
||||||
|
return Field.Machine_Board;
|
||||||
|
|
||||||
|
case "rebuildto":
|
||||||
|
case "rebuild_to":
|
||||||
|
return Field.Machine_RebuildTo;
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Logiqx EmuArc
|
||||||
|
|
||||||
|
case "titleid":
|
||||||
|
case "title_id":
|
||||||
|
return Field.Machine_TitleID;
|
||||||
|
|
||||||
|
case "developer":
|
||||||
|
return Field.Machine_Developer;
|
||||||
|
|
||||||
|
case "genre":
|
||||||
|
return Field.Machine_Genre;
|
||||||
|
|
||||||
|
case "subgenre":
|
||||||
|
case "sub_genre":
|
||||||
|
return Field.Machine_Subgenre;
|
||||||
|
|
||||||
|
case "ratings":
|
||||||
|
return Field.Machine_Ratings;
|
||||||
|
|
||||||
|
case "score":
|
||||||
|
return Field.Machine_Score;
|
||||||
|
|
||||||
|
case "enabled":
|
||||||
|
return Field.Machine_Enabled;
|
||||||
|
|
||||||
|
case "crc":
|
||||||
|
case "hascrc":
|
||||||
|
case "has_crc":
|
||||||
|
return Field.Machine_CRC;
|
||||||
|
|
||||||
|
case "relatedto":
|
||||||
|
case "related_to":
|
||||||
|
return Field.Machine_RelatedTo;
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region OpenMSX
|
||||||
|
|
||||||
|
case "genmsxid":
|
||||||
|
case "genmsx_id":
|
||||||
|
case "gen_msxid":
|
||||||
|
case "gen_msx_id":
|
||||||
|
return Field.Machine_GenMSXID;
|
||||||
|
|
||||||
|
case "system":
|
||||||
|
case "msxsystem":
|
||||||
|
case "msx_system":
|
||||||
|
return Field.Machine_System;
|
||||||
|
|
||||||
|
case "country":
|
||||||
|
return Field.Machine_Country;
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region SoftwareList
|
||||||
|
|
||||||
|
case "supported":
|
||||||
|
return Field.Machine_Supported;
|
||||||
|
|
||||||
|
case "infos":
|
||||||
|
return Field.Machine_Infos;
|
||||||
|
|
||||||
|
case "info_name":
|
||||||
|
return Field.Machine_Info_Name;
|
||||||
|
|
||||||
|
case "info_value":
|
||||||
|
return Field.Machine_Info_Value;
|
||||||
|
|
||||||
|
case "sharedfeatures":
|
||||||
|
return Field.Machine_SharedFeatures;
|
||||||
|
|
||||||
|
case "sharedfeature_name":
|
||||||
|
return Field.Machine_SharedFeature_Name;
|
||||||
|
|
||||||
|
case "sharedfeature_value":
|
||||||
|
return Field.Machine_SharedFeature_Value;
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -473,12 +886,206 @@ namespace SabreTools.Library.Tools
|
|||||||
{
|
{
|
||||||
#region Common
|
#region Common
|
||||||
|
|
||||||
|
case "name":
|
||||||
|
return Field.DatItem_Name;
|
||||||
|
|
||||||
|
case "type":
|
||||||
|
return Field.DatItem_Type;
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region AttractMode
|
||||||
|
|
||||||
|
case "altname":
|
||||||
|
case "alt name":
|
||||||
|
case "alt-name":
|
||||||
|
case "altromname":
|
||||||
|
case "alt romname":
|
||||||
|
case "alt-romname":
|
||||||
|
return Field.DatItem_AltName;
|
||||||
|
|
||||||
|
case "alttitle":
|
||||||
|
case "alt title":
|
||||||
|
case "alt-title":
|
||||||
|
case "altromtitle":
|
||||||
|
case "alt romtitle":
|
||||||
|
case "alt-romtitle":
|
||||||
|
return Field.DatItem_AltTitle;
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region OpenMSX
|
||||||
|
|
||||||
|
case "original":
|
||||||
|
return Field.DatItem_Original;
|
||||||
|
|
||||||
|
case "subtype":
|
||||||
|
case "sub_type":
|
||||||
|
case "openmsxsubtype":
|
||||||
|
case "openmsx_subtype":
|
||||||
|
return Field.DatItem_OpenMSXSubType;
|
||||||
|
|
||||||
|
case "openmsxtype":
|
||||||
|
case "openmsx_type":
|
||||||
|
return Field.DatItem_OpenMSXType;
|
||||||
|
|
||||||
|
case "remark":
|
||||||
|
return Field.DatItem_Remark;
|
||||||
|
|
||||||
|
case "boot":
|
||||||
|
return Field.DatItem_Boot;
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region SoftwareList
|
||||||
|
|
||||||
|
case "part":
|
||||||
|
return Field.DatItem_Part;
|
||||||
|
|
||||||
|
case "partname":
|
||||||
|
case "part_name":
|
||||||
|
return Field.DatItem_Part_Name;
|
||||||
|
|
||||||
|
case "partinterface":
|
||||||
|
case "part_interface":
|
||||||
|
return Field.DatItem_Part_Interface;
|
||||||
|
|
||||||
|
case "features":
|
||||||
|
return Field.DatItem_Features;
|
||||||
|
|
||||||
|
case "feature_name":
|
||||||
|
return Field.DatItem_Feature_Name;
|
||||||
|
|
||||||
|
case "feature_value":
|
||||||
|
return Field.DatItem_Feature_Value;
|
||||||
|
|
||||||
|
case "areaname":
|
||||||
|
case "area_name":
|
||||||
|
return Field.DatItem_AreaName;
|
||||||
|
|
||||||
|
case "areasize":
|
||||||
|
case "area_size":
|
||||||
|
return Field.DatItem_AreaSize;
|
||||||
|
|
||||||
|
case "areawidth":
|
||||||
|
case "area_width":
|
||||||
|
return Field.DatItem_AreaWidth;
|
||||||
|
|
||||||
|
case "areaendinanness":
|
||||||
|
case "area_endianness":
|
||||||
|
return Field.DatItem_AreaEndianness;
|
||||||
|
|
||||||
|
case "value":
|
||||||
|
return Field.DatItem_Value;
|
||||||
|
|
||||||
|
case "loadflag":
|
||||||
|
case "load_flag":
|
||||||
|
return Field.DatItem_LoadFlag;
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Item-Specific
|
||||||
|
|
||||||
|
// BiosSet
|
||||||
|
case "default":
|
||||||
|
return Field.DatItem_Default;
|
||||||
|
|
||||||
|
case "description":
|
||||||
|
case "biosdescription":
|
||||||
|
case "bios_description":
|
||||||
|
return Field.DatItem_Description;
|
||||||
|
|
||||||
|
// Disk
|
||||||
|
case "md5":
|
||||||
|
case "md5_hash":
|
||||||
|
return Field.DatItem_MD5;
|
||||||
|
#if NET_FRAMEWORK
|
||||||
|
case "ripemd160":
|
||||||
|
case "ripemd160_hash":
|
||||||
|
return Field.DatItem_RIPEMD160;
|
||||||
|
#endif
|
||||||
|
case "sha1":
|
||||||
|
case "sha_1":
|
||||||
|
case "sha1hash":
|
||||||
|
case "sha1_hash":
|
||||||
|
case "sha_1hash":
|
||||||
|
case "sha_1_hash":
|
||||||
|
return Field.DatItem_SHA1;
|
||||||
|
|
||||||
|
case "sha256":
|
||||||
|
case "sha_256":
|
||||||
|
case "sha256hash":
|
||||||
|
case "sha256_hash":
|
||||||
|
case "sha_256hash":
|
||||||
|
case "sha_256_hash":
|
||||||
|
return Field.DatItem_SHA256;
|
||||||
|
|
||||||
|
case "sha384":
|
||||||
|
case "sha_384":
|
||||||
|
case "sha384hash":
|
||||||
|
case "sha384_hash":
|
||||||
|
case "sha_384hash":
|
||||||
|
case "sha_384_hash":
|
||||||
|
return Field.DatItem_SHA384;
|
||||||
|
|
||||||
|
case "sha512":
|
||||||
|
case "sha_512":
|
||||||
|
case "sha512hash":
|
||||||
|
case "sha512_hash":
|
||||||
|
case "sha_512hash":
|
||||||
|
case "sha_512_hash":
|
||||||
|
return Field.DatItem_SHA512;
|
||||||
|
|
||||||
|
case "merge":
|
||||||
|
case "mergetag":
|
||||||
|
case "merge_tag":
|
||||||
|
return Field.DatItem_Merge;
|
||||||
|
|
||||||
|
case "region":
|
||||||
|
return Field.DatItem_Region;
|
||||||
|
|
||||||
|
case "index":
|
||||||
|
return Field.DatItem_Index;
|
||||||
|
|
||||||
|
case "writable":
|
||||||
|
return Field.DatItem_Writable;
|
||||||
|
|
||||||
|
case "status":
|
||||||
|
return Field.DatItem_Status;
|
||||||
|
|
||||||
|
case "optional":
|
||||||
|
return Field.DatItem_Optional;
|
||||||
|
|
||||||
|
// Release
|
||||||
|
case "language":
|
||||||
|
return Field.DatItem_Language;
|
||||||
|
|
||||||
|
case "date":
|
||||||
|
return Field.DatItem_Date;
|
||||||
|
|
||||||
|
// Rom
|
||||||
|
case "bios":
|
||||||
|
return Field.DatItem_Bios;
|
||||||
|
|
||||||
|
case "size":
|
||||||
|
return Field.DatItem_Size;
|
||||||
|
|
||||||
|
case "crc":
|
||||||
|
return Field.DatItem_CRC;
|
||||||
|
|
||||||
|
case "offset":
|
||||||
|
return Field.DatItem_Offset;
|
||||||
|
|
||||||
|
case "inverted":
|
||||||
|
return Field.DatItem_Inverted;
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Else, we fall back on the old matching
|
// Else, we fall back on the old matching
|
||||||
switch (input?.ToLowerInvariant())
|
// TODO: Remove this entirely
|
||||||
|
switch (input)
|
||||||
{
|
{
|
||||||
#region Machine
|
#region Machine
|
||||||
|
|
||||||
@@ -641,7 +1248,7 @@ namespace SabreTools.Library.Tools
|
|||||||
case "hascrc":
|
case "hascrc":
|
||||||
case "has crc":
|
case "has crc":
|
||||||
case "has-crc":
|
case "has-crc":
|
||||||
return Field.Machine_HasCrc;
|
return Field.Machine_CRC;
|
||||||
|
|
||||||
case "relatedto":
|
case "relatedto":
|
||||||
case "related to":
|
case "related to":
|
||||||
|
|||||||
Reference in New Issue
Block a user