Files
SabreTools/SabreTools.Core/Enums.cs

833 lines
15 KiB
C#
Raw Normal View History

using System;
2020-12-08 13:23:59 -08:00
// TODO: Figure out the best way to put these back in their libraries
namespace SabreTools.Core
2020-08-01 22:13:56 -07:00
{
2020-12-08 13:23:59 -08:00
#region DatFiles
/// <summary>
/// Available hashing types
/// </summary>
[Flags]
public enum Hash
{
CRC = 1 << 0,
MD5 = 1 << 1,
SHA1 = 1 << 2,
SHA256 = 1 << 3,
SHA384 = 1 << 4,
SHA512 = 1 << 5,
SpamSum = 1 << 6,
// Special combinations
Standard = CRC | MD5 | SHA1,
DeepHashes = SHA256 | SHA384 | SHA512 | SpamSum,
SecureHashes = MD5 | SHA1 | SHA256 | SHA384 | SHA512 | SpamSum,
2021-01-15 21:58:26 -08:00
All = CRC | MD5 | SHA1 | SHA256 | SHA384 | SHA512 | SpamSum,
}
/// <summary>
/// Determines merging tag handling for DAT output
/// </summary>
public enum MergingFlag
{
None = 0,
Split,
Merged,
NonMerged,
Full,
/// <remarks>This is not usually defined for Merging flags</remarks>
Device,
}
/// <summary>
/// Determines nodump tag handling for DAT output
/// </summary>
public enum NodumpFlag
{
None = 0,
Obsolete,
Required,
Ignore,
}
/// <summary>
/// Determines packing tag handling for DAT output
/// </summary>
public enum PackingFlag
{
None = 0,
/// <summary>
/// Force all sets to be in archives, except disk and media
/// </summary>
Zip,
/// <summary>
/// Force all sets to be extracted into subfolders
/// </summary>
Unzip,
/// <summary>
/// Force sets with single items to be extracted to the parent folder
/// </summary>
Partial,
/// <summary>
/// Force all sets to be extracted to the parent folder
/// </summary>
Flat,
}
#endregion
#region DatItems
/// <summary>
/// Determine the chip type
/// </summary>
[Flags]
public enum ChipType
{
/// <summary>
/// This is a fake flag that is used for filter only
/// </summary>
NULL = 0,
CPU = 1 << 0,
Audio = 1 << 1,
}
/// <summary>
/// Determine the control type
/// </summary>
[Flags]
public enum ControlType
{
/// <summary>
/// This is a fake flag that is used for filter only
/// </summary>
NULL = 0,
Joy = 1 << 0,
Stick = 1 << 1,
Paddle = 1 << 2,
Pedal = 1 << 3,
Lightgun = 1 << 4,
Positional = 1 << 5,
Dial = 1 << 6,
Trackball = 1 << 7,
Mouse = 1 << 8,
OnlyButtons = 1 << 9,
Keypad = 1 << 10,
Keyboard = 1 << 11,
Mahjong = 1 << 12,
Hanafuda = 1 << 13,
Gambling = 1 << 14,
}
/// <summary>
/// Determine the device type
/// </summary>
[Flags]
public enum DeviceType
{
/// <summary>
/// This is a fake flag that is used for filter only
/// </summary>
NULL = 0,
Unknown = 1 << 0,
Cartridge = 1 << 1,
FloppyDisk = 1 << 2,
HardDisk = 1 << 3,
Cylinder = 1 << 4,
Cassette = 1 << 5,
PunchCard = 1 << 6,
PunchTape = 1 << 7,
Printout = 1 << 8,
Serial = 1 << 9,
Parallel = 1 << 10,
Snapshot = 1 << 11,
QuickLoad = 1 << 12,
MemCard = 1 << 13,
CDROM = 1 << 14,
MagTape = 1 << 15,
ROMImage = 1 << 16,
MIDIIn = 1 << 17,
MIDIOut = 1 << 18,
Picture = 1 << 19,
VidFile = 1 << 20,
}
/// <summary>
/// Determine the display type
/// </summary>
[Flags]
public enum DisplayType
{
/// <summary>
/// This is a fake flag that is used for filter only
/// </summary>
NULL = 0,
Raster = 1 << 0,
Vector = 1 << 1,
LCD = 1 << 2,
SVG = 1 << 3,
Unknown = 1 << 4,
}
/// <summary>
/// Determine the endianness
/// </summary>
[Flags]
public enum Endianness
{
/// <summary>
/// This is a fake flag that is used for filter only
/// </summary>
NULL = 0,
Big = 1 << 0,
Little = 1 << 1,
}
/// <summary>
/// Determine the emulation status
/// </summary>
[Flags]
public enum FeatureStatus
{
/// <summary>
/// This is a fake flag that is used for filter only
/// </summary>
NULL = 0,
Unemulated = 1 << 0,
Imperfect = 1 << 1,
}
/// <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,
}
/// <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,
None = 1 << 0,
Good = 1 << 1,
BadDump = 1 << 2,
Nodump = 1 << 3,
Verified = 1 << 4,
}
/// <summary>
/// Determine what type of file an item is
/// </summary>
public enum ItemType
{
// "Actionable" item types
Rom,
Disk,
Media,
// "Auxiliary" item types
Adjuster,
Analog,
Archive,
BiosSet,
Chip,
Condition,
Configuration,
Control,
DataArea,
2023-04-07 15:25:13 -04:00
Details,
Device,
DeviceReference,
DipSwitch,
DiskArea,
Display,
Driver,
Extension,
Feature,
Info,
Input,
Instance,
Location,
Part,
PartFeature,
Port,
RamOption,
Release,
Sample,
2023-04-07 14:57:41 -04:00
Serials,
Setting,
SharedFeature,
Slot,
SlotOption,
SoftwareList,
Sound,
Blank = 99, // This is not a real type, only used internally
}
/// <summary>
/// Determine the loadflag value
/// </summary>
[Flags]
public enum LoadFlag
{
/// <summary>
/// This is a fake flag that is used for filter only
/// </summary>
NULL = 0,
Load16Byte = 1 << 0,
Load16Word = 1 << 1,
Load16WordSwap = 1 << 2,
Load32Byte = 1 << 3,
Load32Word = 1 << 4,
Load32WordSwap = 1 << 5,
Load32DWord = 1 << 6,
Load64Word = 1 << 7,
Load64WordSwap = 1 << 8,
Reload = 1 << 9,
Fill = 1 << 10,
Continue = 1 << 11,
ReloadPlain = 1 << 12,
Ignore = 1 << 13,
}
/// <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,
}
/// <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,
}
/// <summary>
/// Determine relation of value to condition
/// </summary>
[Flags]
public enum Relation
{
/// <summary>
/// This is a fake flag that is used for filter only
/// </summary>
NULL = 0,
Equal = 1 << 0,
NotEqual = 1 << 1,
GreaterThan = 1 << 2,
LessThanOrEqual = 1 << 3,
LessThan = 1 << 4,
GreaterThanOrEqual = 1 << 5,
}
/// <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,
}
/// <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,
}
/// <summary>
/// Determine driver support statuses
/// </summary>
[Flags]
public enum SupportStatus
{
/// <summary>
/// This is a fake flag that is used for filter only
/// </summary>
NULL = 0,
Good = 1 << 0,
Imperfect = 1 << 1,
Preliminary = 1 << 2,
}
#endregion
#region Fields
/// <summary>
/// List of valid field types within a DatHeader
/// </summary>
public enum DatHeaderField
{
NULL = 0,
2020-12-08 13:23:59 -08:00
#region Common
2020-12-08 13:23:59 -08:00
FileName,
Name,
Description,
RootDir,
Category,
Version,
Date,
Author,
Email,
Homepage,
Url,
Comment,
HeaderSkipper,
Type,
ForceMerging,
ForceNodump,
ForcePacking,
2020-12-08 13:23:59 -08:00
#endregion
#region ListXML
2020-12-08 13:23:59 -08:00
Debug,
MameConfig,
2020-12-08 13:23:59 -08:00
#endregion
#region Logiqx
2020-12-08 13:23:59 -08:00
2023-04-03 12:24:42 -04:00
NoIntroID,
Build,
RomMode,
BiosMode,
SampleMode,
LockRomMode,
LockBiosMode,
LockSampleMode,
2020-12-08 13:23:59 -08:00
#endregion
#region OfflineList
2020-12-08 13:23:59 -08:00
System,
ScreenshotsWidth,
ScreenshotsHeight,
CanOpen,
RomTitle,
// Infos
Info_Name,
Info_Visible,
Info_IsNamingOption,
Info_Default,
2020-12-08 13:23:59 -08:00
#endregion
#region RomCenter
2020-12-08 13:23:59 -08:00
RomCenterVersion,
2020-12-08 13:23:59 -08:00
#endregion
}
2020-12-08 13:23:59 -08:00
/// <summary>
/// List of valid field types within a DatItem
/// </summary>
public enum DatItemField
{
NULL = 0,
2020-12-08 13:23:59 -08:00
#region Common
2020-12-12 21:33:26 -08:00
Type,
2020-12-08 13:23:59 -08:00
#endregion
#region Item-Specific
#region Actionable
// Rom
2020-12-12 21:33:26 -08:00
Name,
Bios,
Size,
CRC,
MD5,
SHA1,
SHA256,
SHA384,
SHA512,
SpamSum,
Merge,
Region,
Offset,
Date,
Status,
Optional,
Inverted,
2020-12-08 13:23:59 -08:00
// Rom (Archive.org)
ArchiveDotOrgSource,
ArchiveDotOrgFormat,
OriginalFilename,
Rotation,
Summation,
2020-12-08 13:23:59 -08:00
// Rom (AttractMode)
2020-12-12 21:33:26 -08:00
AltName,
AltTitle,
2020-12-08 13:23:59 -08:00
2023-03-26 22:03:29 -04:00
// Rom (Logiqx)
MIA,
2020-12-08 13:23:59 -08:00
// Rom (OpenMSX)
2020-12-12 21:33:26 -08:00
Original,
OpenMSXSubType,
OpenMSXType,
Remark,
Boot,
2020-12-08 13:23:59 -08:00
// Rom (SoftwareList)
2020-12-12 21:33:26 -08:00
LoadFlag,
Value,
2020-12-08 13:23:59 -08:00
// Disk
2020-12-12 21:33:26 -08:00
Index,
Writable,
2020-12-08 13:23:59 -08:00
#endregion
#region Auxiliary
// Adjuster
2020-12-12 21:33:26 -08:00
Default,
2020-12-08 13:23:59 -08:00
// Analog
2020-12-12 21:33:26 -08:00
Analog_Mask,
2020-12-08 13:23:59 -08:00
2023-04-07 14:34:49 -04:00
// Archive
Number,
Clone,
RegParent,
Languages,
2023-04-07 15:47:24 -04:00
DevStatus,
Physical,
Complete,
Categories,
2023-04-07 14:34:49 -04:00
2020-12-08 13:23:59 -08:00
// BiosSet
2020-12-12 21:33:26 -08:00
Description,
2020-12-08 13:23:59 -08:00
// Chip
2020-12-12 21:33:26 -08:00
Tag,
ChipType,
Clock,
2020-12-08 13:23:59 -08:00
// Condition
2020-12-12 21:33:26 -08:00
Mask,
Relation,
Condition_Tag,
Condition_Mask,
Condition_Relation,
Condition_Value,
2020-12-08 13:23:59 -08:00
// Control
2020-12-12 21:33:26 -08:00
Control_Type,
Control_Player,
Control_Buttons,
Control_RequiredButtons,
Control_Minimum,
Control_Maximum,
Control_Sensitivity,
Control_KeyDelta,
Control_Reverse,
Control_Ways,
Control_Ways2,
Control_Ways3,
2020-12-08 13:23:59 -08:00
// DataArea
2020-12-12 21:33:26 -08:00
AreaName,
AreaSize,
AreaWidth,
AreaEndianness,
2020-12-08 13:23:59 -08:00
// Device
2020-12-12 21:33:26 -08:00
DeviceType,
FixedImage,
Mandatory,
Interface,
2020-12-08 13:23:59 -08:00
// Display
2020-12-12 21:33:26 -08:00
DisplayType,
Rotate,
FlipX,
Width,
Height,
Refresh,
PixClock,
HTotal,
HBEnd,
HBStart,
VTotal,
VBEnd,
VBStart,
2020-12-08 13:23:59 -08:00
// Driver
2020-12-12 21:33:26 -08:00
SupportStatus,
EmulationStatus,
CocktailStatus,
SaveStateStatus,
2022-11-03 11:37:55 -07:00
RequiresArtwork,
Unofficial,
NoSoundHardware,
Incomplete,
2020-12-08 13:23:59 -08:00
// Extension
2020-12-12 21:33:26 -08:00
Extension_Name,
2020-12-08 13:23:59 -08:00
// Feature
2020-12-12 21:33:26 -08:00
FeatureType,
FeatureStatus,
FeatureOverall,
2020-12-08 13:23:59 -08:00
// Input
2020-12-12 21:33:26 -08:00
Service,
Tilt,
Players,
Coins,
2020-12-08 13:23:59 -08:00
// Instance
2020-12-12 21:33:26 -08:00
Instance_Name,
Instance_BriefName,
2020-12-08 13:23:59 -08:00
// Location
2020-12-12 21:33:26 -08:00
Location_Name,
Location_Number,
Location_Inverted,
2020-12-08 13:23:59 -08:00
// Part
2020-12-12 21:33:26 -08:00
Part_Name,
Part_Interface,
2020-12-08 13:23:59 -08:00
// PartFeature
2020-12-12 21:33:26 -08:00
Part_Feature_Name,
Part_Feature_Value,
2020-12-08 13:23:59 -08:00
// RamOption
2020-12-12 21:33:26 -08:00
Content,
2020-12-08 13:23:59 -08:00
// Release
2020-12-12 21:33:26 -08:00
Language,
2020-12-08 13:23:59 -08:00
// Setting
2020-12-12 21:33:26 -08:00
Setting_Name,
Setting_Value,
Setting_Default,
2020-12-08 13:23:59 -08:00
// SlotOption
2020-12-12 21:33:26 -08:00
SlotOption_Name,
SlotOption_DeviceName,
SlotOption_Default,
2020-12-08 13:23:59 -08:00
// SoftwareList
2020-12-12 21:33:26 -08:00
SoftwareListStatus,
Filter,
2020-12-08 13:23:59 -08:00
// Sound
2020-12-12 21:33:26 -08:00
Channels,
2020-12-08 13:23:59 -08:00
#endregion
2020-12-08 13:23:59 -08:00
#endregion // Item-Specific
2020-12-08 13:23:59 -08:00
}
/// <summary>
/// List of valid field types within a Machine
2020-12-08 13:23:59 -08:00
/// </summary>
public enum MachineField
2020-12-08 13:23:59 -08:00
{
NULL = 0,
#region Common
2020-12-08 13:23:59 -08:00
Name,
Comment,
Description,
Year,
Manufacturer,
Publisher,
Category,
RomOf,
CloneOf,
SampleOf,
Type,
2020-12-08 13:23:59 -08:00
#endregion
2020-12-08 13:23:59 -08:00
#region AttractMode
2020-12-08 13:23:59 -08:00
Players,
Rotation,
2020-12-08 13:23:59 -08:00
Control,
Status,
DisplayCount,
DisplayType,
Buttons,
2020-12-08 13:23:59 -08:00
#endregion
2020-12-08 13:23:59 -08:00
#region ListXML
2020-12-08 13:23:59 -08:00
2020-12-28 10:22:40 -08:00
History,
SourceFile,
Runnable,
2020-12-08 13:23:59 -08:00
#endregion
2020-12-08 13:23:59 -08:00
#region Logiqx
2020-12-08 13:23:59 -08:00
Board,
RebuildTo,
2023-03-26 21:47:17 -04:00
NoIntroId,
2023-04-03 11:57:06 -04:00
NoIntroCloneOfId,
2020-12-08 13:23:59 -08:00
#endregion
2020-12-08 13:23:59 -08:00
#region Logiqx EmuArc
2020-12-08 13:23:59 -08:00
TitleID,
Developer,
Genre,
Subgenre,
Ratings,
Score,
Enabled,
CRC,
RelatedTo,
2020-12-08 13:23:59 -08:00
#endregion
2020-12-08 13:23:59 -08:00
#region OpenMSX
2020-12-08 13:23:59 -08:00
GenMSXID,
System,
Country,
2020-12-08 13:23:59 -08:00
#endregion
2020-12-08 13:23:59 -08:00
#region SoftwareList
2020-12-08 13:23:59 -08:00
Supported,
2020-12-08 13:23:59 -08:00
#endregion
2020-12-08 13:23:59 -08:00
}
#endregion
2021-02-03 10:09:40 -08:00
#region Logging
/// <summary>
/// Severity of the logging statement
/// </summary>
public enum LogLevel
{
VERBOSE = 0,
USER,
WARNING,
ERROR,
}
#endregion
2020-08-01 22:13:56 -07:00
}