Files
SabreTools/SabreTools.Library/DatItems/Enums.cs

559 lines
12 KiB
C#
Raw Normal View History

2020-08-01 22:10:29 -07:00
using System;
namespace SabreTools.Library.DatItems
2020-08-01 21:42:28 -07:00
{
2020-08-01 22:10:29 -07:00
/// <summary>
/// Determines which type of duplicate a file is
/// </summary>
[Flags]
public enum DupeType
{
// Type of match
Hash = 1 << 0,
All = 1 << 1,
// Location of match
Internal = 1 << 2,
External = 1 << 3,
}
2020-09-02 14:04:02 -07:00
/// <summary>
/// Determine the feature type
/// </summary>
[Flags]
public enum FeatureType
{
/// <summary>
/// This is a fake flag that is used for filter only
/// </summary>
NULL = 0,
Protection = 1 << 0,
Palette = 1 << 1,
Graphics = 1 << 2,
Sound = 1 << 3,
Controls = 1 << 4,
Keyboard = 1 << 5,
Mouse = 1 << 6,
Microphone = 1 << 7,
Camera = 1 << 8,
Disk = 1 << 9,
Printer = 1 << 10,
Lan = 1 << 11,
Wan = 1 << 12,
Timing = 1 << 13,
}
2020-08-01 21:42:28 -07:00
/// <summary>
/// List of valid field types within a DatItem/Machine
/// </summary>
2020-08-24 22:25:47 -07:00
/// TODO: Move this to a more common location
/// TODO: Should this be split into separate enums?
2020-08-01 21:42:28 -07:00
public enum Field : int
{
NULL = 0,
2020-08-24 22:25:47 -07:00
#region DatHeader
#region Common
DatHeader_FileName,
DatHeader_Name,
DatHeader_Description,
DatHeader_RootDir,
DatHeader_Category,
DatHeader_Version,
DatHeader_Date,
DatHeader_Author,
DatHeader_Email,
DatHeader_Homepage,
DatHeader_Url,
DatHeader_Comment,
DatHeader_HeaderSkipper,
DatHeader_Type,
DatHeader_ForceMerging,
DatHeader_ForceNodump,
DatHeader_ForcePacking,
#endregion
#region ListXML
DatHeader_Debug,
DatHeader_MameConfig,
#endregion
#region Logiqx
DatHeader_Build,
DatHeader_RomMode,
DatHeader_BiosMode,
DatHeader_SampleMode,
DatHeader_LockRomMode,
DatHeader_LockBiosMode,
DatHeader_LockSampleMode,
#endregion
#region OfflineList
DatHeader_System,
DatHeader_ScreenshotsWidth,
DatHeader_ScreenshotsHeight,
DatHeader_CanOpen,
DatHeader_RomTitle,
// Infos
DatHeader_Infos,
DatHeader_Info_Name,
DatHeader_Info_Visible,
DatHeader_Info_IsNamingOption,
DatHeader_Info_Default,
#endregion
#region RomCenter
DatHeader_RomCenterVersion,
#endregion
#endregion // DatHeader
2020-08-20 14:36:36 -07:00
#region Machine
2020-08-01 21:42:28 -07:00
2020-08-20 22:42:04 -07:00
#region Common
2020-08-24 22:25:47 -07:00
Machine_Name,
Machine_Comment,
Machine_Description,
Machine_Year,
Machine_Manufacturer,
Machine_Publisher,
Machine_Category,
Machine_RomOf,
Machine_CloneOf,
Machine_SampleOf,
Machine_Type,
2020-08-20 14:36:36 -07:00
2020-08-20 22:42:04 -07:00
#endregion
#region AttractMode
2020-08-24 22:25:47 -07:00
Machine_Players,
Machine_Rotation,
Machine_Control,
2020-08-25 11:20:50 -07:00
Machine_Status,
2020-08-24 22:25:47 -07:00
Machine_DisplayCount,
Machine_DisplayType,
Machine_Buttons,
2020-08-20 14:36:36 -07:00
2020-08-20 22:42:04 -07:00
#endregion
#region ListXML
2020-08-24 22:25:47 -07:00
Machine_SourceFile,
Machine_Runnable,
// Displays
Machine_Displays,
2020-08-24 22:25:47 -07:00
Machine_Display_Tag,
Machine_Display_Type,
Machine_Display_Rotate,
Machine_Display_FlipX,
Machine_Display_Width,
Machine_Display_Height,
Machine_Display_Refresh,
Machine_Display_PixClock,
Machine_Display_HTotal,
Machine_Display_HBEnd,
Machine_Display_HBStart,
Machine_Display_VTotal,
Machine_Display_VBEnd,
Machine_Display_VBStart,
// Conditions
Machine_Conditions,
2020-08-24 22:25:47 -07:00
Machine_Condition_Tag,
Machine_Condition_Mask,
Machine_Condition_Relation,
Machine_Condition_Value,
// Inputs
Machine_Inputs,
2020-08-25 12:15:28 -07:00
Machine_Input_Service,
Machine_Input_Tilt,
Machine_Input_Players,
Machine_Input_Coins,
2020-08-24 22:25:47 -07:00
// Inputs.Controls
2020-08-25 12:15:28 -07:00
Machine_Input_Controls,
Machine_Input_Control_Type,
Machine_Input_Control_Player,
Machine_Input_Control_Buttons,
Machine_Input_Control_RegButtons,
Machine_Input_Control_Minimum,
Machine_Input_Control_Maximum,
Machine_Input_Control_Sensitivity,
Machine_Input_Control_KeyDelta,
Machine_Input_Control_Reverse,
Machine_Input_Control_Ways,
Machine_Input_Control_Ways2,
Machine_Input_Control_Ways3,
2020-08-24 22:25:47 -07:00
// Ports
Machine_Ports,
2020-08-25 12:15:28 -07:00
Machine_Port_Tag,
2020-08-24 22:25:47 -07:00
// Ports.Analogs
2020-08-25 12:15:28 -07:00
Machine_Port_Analogs,
Machine_Port_Analog_Mask,
2020-08-24 22:25:47 -07:00
// Drivers
Machine_Drivers,
2020-08-24 22:25:47 -07:00
Machine_Driver_Status,
Machine_Driver_Emulation,
Machine_Driver_Cocktail,
Machine_Driver_SaveState,
// Devices
Machine_Devices,
2020-08-24 22:25:47 -07:00
Machine_Device_Type,
Machine_Device_Tag,
Machine_Device_FixedImage,
Machine_Device_Mandatory,
Machine_Device_Interface,
// Devices.Instances
Machine_Device_Instances,
Machine_Device_Instance_Name,
Machine_Device_Instance_BriefName,
// Devices.Extensions
Machine_Device_Extensions,
Machine_Device_Extension_Name,
2020-08-20 22:42:04 -07:00
#endregion
#region Logiqx
2020-08-24 22:25:47 -07:00
Machine_Board,
Machine_RebuildTo,
2020-08-20 14:36:36 -07:00
2020-08-20 22:42:04 -07:00
#endregion
#region Logiqx EmuArc
2020-08-24 22:25:47 -07:00
Machine_TitleID,
Machine_Developer,
Machine_Genre,
Machine_Subgenre,
Machine_Ratings,
Machine_Score,
Machine_Enabled,
2020-08-25 12:15:28 -07:00
Machine_CRC,
2020-08-24 22:25:47 -07:00
Machine_RelatedTo,
2020-08-20 22:42:04 -07:00
#endregion
#region OpenMSX
2020-08-24 22:25:47 -07:00
Machine_GenMSXID,
Machine_System,
Machine_Country,
#endregion
2020-08-20 22:42:04 -07:00
#region SoftwareList
2020-08-24 22:25:47 -07:00
Machine_Supported,
// Infos
Machine_Infos, // TODO: Fix usage of Infos
Machine_Info_Name,
Machine_Info_Value,
// SharedFeatures
Machine_SharedFeatures, // TODO: Fix usage of SharedFeatures
Machine_SharedFeature_Name,
Machine_SharedFeature_Value,
2020-08-20 14:36:36 -07:00
#endregion
2020-08-20 22:42:04 -07:00
#endregion // Machine
2020-08-20 14:36:36 -07:00
#region DatItem
2020-08-20 22:42:04 -07:00
#region Common
2020-08-24 22:25:47 -07:00
DatItem_Name,
DatItem_Type,
2020-08-20 21:15:37 -07:00
2020-08-20 22:42:04 -07:00
#endregion
#region AttractMode
2020-08-24 22:25:47 -07:00
DatItem_AltName,
DatItem_AltTitle,
2020-08-20 21:15:37 -07:00
2020-08-20 22:42:04 -07:00
#endregion
#region OpenMSX
2020-08-24 22:25:47 -07:00
DatItem_Original,
DatItem_OpenMSXSubType,
DatItem_OpenMSXType,
DatItem_Remark,
DatItem_Boot,
#endregion
2020-08-20 22:42:04 -07:00
#region SoftwareList
2020-08-25 11:20:50 -07:00
// Part
DatItem_Part,
2020-08-25 11:20:50 -07:00
DatItem_Part_Name,
DatItem_Part_Interface,
// Feature
DatItem_Features,
2020-08-25 11:20:50 -07:00
DatItem_Feature_Name,
DatItem_Feature_Value,
DatItem_AreaName,
DatItem_AreaSize,
DatItem_AreaWidth,
DatItem_AreaEndianness,
DatItem_Value,
DatItem_LoadFlag,
2020-08-20 14:36:36 -07:00
2020-08-20 22:42:04 -07:00
#endregion
2020-08-25 11:20:50 -07:00
#region Item-Specific
#region Actionable
2020-08-01 21:42:28 -07:00
// Rom
2020-08-25 11:20:50 -07:00
DatItem_Bios,
DatItem_Size,
DatItem_CRC,
DatItem_MD5,
#if NET_FRAMEWORK
DatItem_RIPEMD160,
#endif
DatItem_SHA1,
DatItem_SHA256,
DatItem_SHA384,
DatItem_SHA512,
DatItem_Merge,
DatItem_Region,
2020-08-25 11:20:50 -07:00
DatItem_Offset,
DatItem_Date,
DatItem_Status,
DatItem_Optional,
2020-08-25 11:20:50 -07:00
DatItem_Inverted,
// Disk
DatItem_Index,
DatItem_Writable,
#endregion
#region Auxiliary
2020-09-01 11:34:52 -07:00
// Adjuster
DatItem_Default,
DatItem_Conditions,
DatItem_Condition_Tag,
DatItem_Condition_Mask,
DatItem_Condition_Relation,
DatItem_Condition_Value,
// BiosSet
DatItem_Description,
// Chip
DatItem_Tag,
DatItem_ChipType,
DatItem_Clock,
2020-09-01 11:55:11 -07:00
// Configuration
DatItem_Mask,
// 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,
2020-09-01 13:36:32 -07:00
// DIP Switch.Values
DatItem_Values,
DatItem_Value_Name,
DatItem_Value_Value,
DatItem_Value_Default,
2020-09-02 13:31:50 -07:00
// Feature
DatItem_FeatureType,
DatItem_FeatureStatus,
DatItem_FeatureOverall,
2020-09-01 11:34:52 -07:00
// Ram Option
DatItem_Content,
// Release
DatItem_Language,
2020-09-01 16:21:55 -07:00
// Slot.SlotOptions
DatItem_SlotOptions,
DatItem_SlotOption_Name,
DatItem_SlotOption_DeviceName,
DatItem_SlotOption_Default,
2020-08-31 23:26:07 -07:00
// Software List
DatItem_SoftwareListStatus,
DatItem_Filter,
2020-09-02 12:51:21 -07:00
// Sounds
DatItem_Channels,
2020-08-25 11:20:50 -07:00
#endregion
2020-08-20 14:36:36 -07:00
#endregion // Item-Specific
2020-08-20 22:42:04 -07:00
#endregion // DatItem
2020-08-01 21:42:28 -07:00
}
2020-08-01 22:10:29 -07:00
/// <summary>
/// Determine the status of the item
/// </summary>
[Flags]
public enum ItemStatus
{
/// <summary>
/// This is a fake flag that is used for filter only
/// </summary>
NULL = 0,
2020-08-01 22:10:29 -07:00
None = 1 << 0,
Good = 1 << 1,
BadDump = 1 << 2,
Nodump = 1 << 3,
Verified = 1 << 4,
}
2020-08-01 21:42:28 -07:00
/// <summary>
/// Determine what type of file an item is
/// </summary>
public enum ItemType
{
2020-08-31 16:46:04 -07:00
// "Actionable" item types
Rom,
Disk,
Media,
2020-08-31 16:46:04 -07:00
// "Auxiliary" item types
2020-09-01 11:34:52 -07:00
Adjuster,
Archive,
BiosSet,
Chip,
2020-09-01 11:55:11 -07:00
Configuration,
DeviceReference,
2020-09-01 13:36:32 -07:00
DipSwitch,
2020-09-02 13:31:50 -07:00
Feature,
2020-09-01 11:34:52 -07:00
RamOption,
Release,
Sample,
2020-09-01 16:21:55 -07:00
Slot,
2020-08-31 23:26:07 -07:00
SoftwareList,
2020-09-02 12:51:21 -07:00
Sound,
2020-08-01 21:42:28 -07:00
Blank = 99, // This is not a real type, only used internally
}
2020-08-01 22:10:29 -07:00
/// <summary>
/// Determine which OpenMSX subtype an item is
/// </summary>
[Flags]
public enum OpenMSXSubType
{
/// <summary>
/// This is a fake flag that is used for filter only
/// </summary>
NULL = 0,
Rom = 1 << 0,
MegaRom = 1 << 1,
SCCPlusCart = 1 << 2,
}
2020-08-01 22:10:29 -07:00
/// <summary>
/// Determine what type of machine it is
/// </summary>
[Flags]
public enum MachineType
{
/// <summary>
/// This is a fake flag that is used for filter only
/// </summary>
NULL = 1 << 0,
Bios = 1 << 1,
Device = 1 << 2,
Mechanical = 1 << 3,
2020-08-01 22:10:29 -07:00
}
2020-08-22 13:31:13 -07:00
/// <summary>
/// Determine machine runnable status
/// </summary>
[Flags]
public enum Runnable
{
/// <summary>
/// This is a fake flag that is used for filter only
/// </summary>
NULL = 0,
No = 1 << 0,
Partial = 1 << 1,
Yes = 1 << 2,
}
/// <summary>
/// Determine software list status
/// </summary>
[Flags]
public enum SoftwareListStatus
{
/// <summary>
/// This is a fake flag that is used for filter only
/// </summary>
NULL = 0,
Original = 1 << 0,
Compatible = 1 << 1,
}
2020-08-22 13:31:13 -07:00
/// <summary>
/// Determine machine support status
/// </summary>
[Flags]
public enum Supported
{
/// <summary>
/// This is a fake flag that is used for filter only
/// </summary>
NULL = 0,
No = 1 << 0,
Partial = 1 << 1,
Yes = 1 << 2,
2020-08-22 13:31:13 -07:00
}
2020-08-01 21:42:28 -07:00
}