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

513 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-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,
// DeviceReferences
Machine_DeviceReferences, // TODO: Double-check DeviceReferences usage
Machine_DeviceReference_Name,
// Displays
Machine_Displays, // TODO: Implement Displays usage
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,
// Sounds
Machine_Sounds, // TODO: Implement Sounds usage
Machine_Sound_Channels,
// Conditions
Machine_Conditions, // TODO: Implement Conditions usage
Machine_Condition_Tag,
Machine_Condition_Mask,
Machine_Condition_Relation,
Machine_Condition_Value,
// Inputs
Machine_Inputs, // TODO: Implement Inputs usage
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
// DipSwitches
Machine_DipSwitches, // TODO: Implement DipSwitches usage
Machine_DipSwitch_Name,
Machine_DipSwitch_Tag,
Machine_DipSwitch_Mask,
// DipSwitches.Locations
Machine_DipSwitch_Locations,
Machine_DipSwitch_Location_Name,
Machine_DipSwitch_Location_Number,
Machine_DipSwitch_Location_Inverted,
// DipSwitches.Values
Machine_DipSwitch_Values,
Machine_DipSwitch_Value_Name,
Machine_DipSwitch_Value_Value,
Machine_DipSwitch_Value_Default,
// Configurations
Machine_Configurations, // TODO: Implement Configurations usage
Machine_Configuration_Name,
Machine_Configuration_Tag,
Machine_Configuration_Mask,
// Configurations.Locations
Machine_Configuration_Locations,
Machine_Configuration_Location_Name,
Machine_Configuration_Location_Number,
Machine_Configuration_Location_Inverted,
// Configurations.Settings
Machine_Configuration_Settings,
Machine_Configuration_Setting_Name,
Machine_Configuration_Setting_Value,
Machine_Configuration_Setting_Default,
// Ports
Machine_Ports, // TODO: Implement Ports usage
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
// Adjusters
Machine_Adjusters, // TODO: Implement Adjusters usage
Machine_Adjuster_Name,
Machine_Adjuster_Default,
// Adjusters.Conditions
Machine_Adjuster_Conditions,
Machine_Adjuster_Condition_Tag,
Machine_Adjuster_Condition_Mask,
Machine_Adjuster_Condition_Relation,
Machine_Adjuster_Condition_Value,
// Drivers
Machine_Drivers, // TODO: Implement Drivers usage
Machine_Driver_Status,
Machine_Driver_Emulation,
Machine_Driver_Cocktail,
Machine_Driver_SaveState,
// Features
Machine_Features, // TODO: Implement Features usage
Machine_Feature_Type,
Machine_Feature_Status,
Machine_Feature_Overall,
// Devices
Machine_Devices, // TODO: Implement Devices usage
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,
// Slots
Machine_Slots, // TODO: Fix Slots usage
Machine_Slot_Name,
// Slots.SlotOptions
Machine_Slot_SlotOptions,
Machine_Slot_SlotOption_Name,
Machine_Slot_SlotOption_DeviceName,
Machine_Slot_SlotOption_Default,
// SoftwareLists
Machine_SoftwareLists, // TODO: Implement SoftwareLists usage
Machine_SoftwareList_Name,
Machine_SoftwareList_Status,
Machine_SoftwareList_Filter,
// RamOptions
Machine_RamOptions, // TODO: Implement RamOptions usage
Machine_RamOption_Default,
2020-08-01 21:42:28 -07:00
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, // TODO: Fully implement Part
DatItem_Part_Name,
DatItem_Part_Interface,
// Feature
DatItem_Features, // TODO: Fully implement Feature
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
2020-08-01 21:42:28 -07:00
// BiosSet
2020-08-25 11:20:50 -07:00
DatItem_Default,
DatItem_Description,
2020-08-01 21:42:28 -07:00
2020-08-25 22:48:46 -07:00
// Chip
DatItem_Tag,
DatItem_ChipType,
DatItem_Clock,
2020-08-01 21:42:28 -07:00
// Disk
2020-08-25 11:20:50 -07:00
DatItem_MD5,
2020-08-01 21:42:28 -07:00
#if NET_FRAMEWORK
2020-08-25 11:20:50 -07:00
DatItem_RIPEMD160,
2020-08-01 21:42:28 -07:00
#endif
2020-08-25 11:20:50 -07:00
DatItem_SHA1,
DatItem_SHA256,
DatItem_SHA384,
DatItem_SHA512,
DatItem_Merge,
DatItem_Region,
DatItem_Index,
DatItem_Writable,
DatItem_Status,
DatItem_Optional,
2020-08-01 21:42:28 -07:00
// Release
2020-08-25 11:20:50 -07:00
DatItem_Language,
DatItem_Date,
2020-08-01 21:42:28 -07:00
// Rom
2020-08-25 11:20:50 -07:00
DatItem_Bios,
DatItem_Size,
DatItem_CRC,
DatItem_Offset,
DatItem_Inverted,
#endregion
2020-08-20 14:36:36 -07:00
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 = 0x00,
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
{
Rom = 0,
Disk = 1,
Sample = 2,
Release = 3,
BiosSet = 4,
Archive = 5,
2020-08-25 22:48:46 -07:00
Chip = 6,
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
{
NULL = 0,
Rom = 1,
MegaRom = 2,
SCCPlusCart = 3,
}
2020-08-01 22:10:29 -07:00
/// <summary>
/// Determine what type of machine it is
/// </summary>
[Flags]
public enum MachineType
{
NULL = 0x00,
2020-08-24 13:53:53 -07:00
Bios = 1 << 0,
Device = 1 << 1,
Mechanical = 1 << 2,
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
{
NULL,
No,
Partial,
Yes,
}
2020-08-22 13:31:13 -07:00
/// <summary>
/// Determine machine support status
/// </summary>
[Flags]
public enum Supported
{
NULL,
No,
Partial,
Yes,
}
2020-08-01 21:42:28 -07:00
}