// /*************************************************************************** // Aaru Data Preservation Suite // ---------------------------------------------------------------------------- // // Filename : Enums.cs // Author(s) : Natalia Portillo // // Component : Direct device access. // // --[ Description ] ---------------------------------------------------------- // // Contains enumerations that are common to all operating systems. // // --[ License ] -------------------------------------------------------------- // // This library is free software; you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as // published by the Free Software Foundation; either version 2.1 of the // License, or (at your option) any later version. // // This library is distributed in the hope that it will be useful, but // WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, see . // // ---------------------------------------------------------------------------- // Copyright © 2011-2025 Natalia Portillo // ****************************************************************************/ using System; using System.Diagnostics.CodeAnalysis; #pragma warning disable 1591 // ReSharper disable UnusedType.Global // ReSharper disable UnusedMember.Global // ReSharper disable MemberCanBeInternal // ReSharper disable InconsistentNaming namespace Aaru.Devices; #region ATA Commands /// All known ATA commands public enum AtaCommands : byte { #region Commands defined on Western Digital WD1000 Winchester Disk Controller /// Formats a track FormatTrack = 0x50, /// Reads sectors ReadOld = 0x20, /// Reads sectors using DMA ReadDmaOld = 0x28, /// Calibrates the position of the heads Includes all commands from 0x10 to 0x1F Restore = 0x10, /// Seeks to a certain cylinder Seek = 0x70, /// Writes sectors WriteOld = 0x30, #endregion Commands defined on Western Digital WD1000 Winchester Disk Controller #region Commands defined on ATA rev. 4c /// Acknowledges media change AckMediaChange = 0xDB, /// Sends vendor-specific information that may be required in order to pass diagnostics PostBoot = 0xDC, /// Prepares a removable drive to respond to boot PreBoot = 0xDD, /// Checks drive power mode CheckPowerMode = 0xE5, /// Checks drive power mode CheckPowerModeAlternate = 0x98, /// Locks the door of the drive DoorLock = 0xDE, /// Unlocks the door of the drive DoorUnLock = 0xDF, /// Executes internal drive diagnostics ExecuteDriveDiagnostic = 0x90, /// Gets a sector containing drive identification and capabilities IdentifyDrive = 0xEC, /// Requests the drive to enter idle status Idle = 0xE3, /// Requests the drive to enter idle status IdleAlternate = 0x97, /// Requests the drive to enter idle status immediately IdleImmediate = 0xE1, /// Requests the drive to enter idle status immediately IdleImmediateAlternate = 0x95, /// Changes heads and sectors per cylinder for the drive InitializeDriveParameters = 0x91, /// Does nothing Nop = 0x00, /// Reads sectors using PIO transfer Read = 0x21, /// Reads the content of the drive's buffer ReadBuffer = 0xE4, /// Reads sectors using DMA transfer ReadDma = 0xC9, /// Reads sectors using DMA transfer, retrying on error ReadDmaRetry = 0xC8, /// Reads a sector including ECC bytes without checking them ReadLong = 0x23, /// Reads a sector including ECC bytes without checking them, retrying on error ReadLongRetry = 0x22, /// Reads multiple sectors generating interrupts at block transfers ReadMultiple = 0xC4, /// Reads sectors using PIO transfer, retrying on error ReadRetry = 0x20, /// Verifies sectors readability without transferring them ReadVerify = 0x41, /// Verifies sectors readability without transferring them, retrying on error ReadVerifyRetry = 0x40, /// Moves the heads to cylinder 0 Recalibrate = Restore, /// Sets drive parameters SetFeatures = 0xEF, /// /// Enables and and sets the block length for these /// commands /// SetMultipleMode = 0xC6, /// Causes the drive to stop and sleep until a hardware or software reset Sleep = 0xE6, /// Causes the drive to stop and sleep until a hardware or software reset SleepAlternate = 0x99, /// Sets the drive to enter Standby mode Standby = 0xE2, /// Sets the drive to enter Standby mode StandbyAlternate = 0x96, /// Sets the drive to enter Standby mode, immediately StandbyImmediate = 0xE0, /// Sets the drive to enter Standby mode, immediately StandbyImmediateAlternate = 0x94, /// Writes sectors using PIO transfer Write = 0x31, /// Writes data to the drive's sector buffer WriteBuffer = 0xE8, /// Writes sectors using DMA transfer WriteDma = 0xCB, /// Writes sectors using DMA transfer, retrying on error WriteDmaRetry = 0xCA, /// Writes sectors with custom ECC WriteLong = 0x33, /// Writes sectors with custom ECC, retrying on error WriteLongRetry = 0x32, /// Writes several sectors at once setting interrupts on end of block WriteMultiple = 0xC5, /// Writes the same data to several sector WriteSame = 0xE9, /// Writes sectors using PIO transfer, retrying on error WriteRetry = 0x30, /// Writes sectors verifying them immediately after write WriteVerify = 0x3C, /// Unknown vendor command Vendor_8X = 0x80, /// Unknown vendor command Vendor_9A = 0x9A, /// Unknown vendor command VendorC0 = 0xC0, /// Unknown vendor command VendorC1 = 0xC1, /// Unknown vendor command VendorC2 = 0xC2, /// Unknown vendor command VendorC3 = 0xC3, /// Unknown vendor command VendorF0 = 0xF0, /// Unknown vendor command VendorF1 = 0xF1, /// Unknown vendor command VendorF2 = 0xF2, /// Unknown vendor command VendorF3 = 0xF3, /// Unknown vendor command VendorF4 = 0xF4, /// Unknown vendor command VendorF5 = 0xF5, /// Unknown vendor command VendorF6 = 0xF6, /// Unknown vendor command VendorF7 = 0xF7, /// Unknown vendor command VendorF8 = 0xF8, /// Unknown vendor command VendorF9 = 0xF9, /// Unknown vendor command VendorFa = 0xFA, /// Unknown vendor command VendorFb = 0xFB, /// Unknown vendor command VendorFc = 0xFC, /// Unknown vendor command VendorFd = 0xFD, /// Unknown vendor command VendorFe = 0xFE, /// Unknown vendor command VendorFf = 0xFF, #endregion Commands defined on ATA rev. 4c #region Commands defined on ATA-2 rev. 4c /// Alters the device microcode DownloadMicrocode = 0x92, /// Ejects the removable medium on the device MediaEject = 0xED, #endregion Commands defined on ATA-2 rev. 4c #region Commands defined on ATA-3 rev. 7b /// Gets a sector containing drive identification and capabilities IdentifyDriveDma = 0xEE, /// Disables the security lock SecurityDisablePassword = 0xF6, /// Enables usage of command SecurityErasePrepare = 0xF3, /// Erases all user data and disables the security lock SecurityEraseUnit = 0xF4, /// Sets the security freeze lock preventing any security command from working until hardware reset SecurityFreezeLock = 0xF5, /// Sets the device user or master password SecuritySetPassword = 0xF1, /// Unlocks device SecurityUnlock = 0xF2, /// SMART operations Smart = 0xB0, #endregion Commands defined on ATA-3 rev. 7b #region Commands defined on CompactFlash Specification /// Pre-erases and conditions data sectors EraseSectors = 0xC0, /// Requests extended error information RequestSense = 0x03, /// Provides a way to determine the exact number of times a sector has been erases and programmed TranslateSector = 0x87, /// /// For CompactFlash cards that do not support security mode, this commands is equal to For /// those that do, this command is equal to /// WearLevel = 0xF5, /// Writes a block of sectors without erasing them previously WriteMultipleWithoutErase = 0xCD, /// Writes sectors without erasing them previously WriteWithoutErase = 0x38, #endregion Commands defined on CompactFlash Specification #region Commands defined on ATA/ATAPI-4 rev. 18 /// Resets a device DeviceReset = 0x08, /// Requests the device to flush the write cache and write it to the media FlushCache = 0xE7, /// Gets media status GetMediaStatus = 0xDA, /// Gets a sector containing drive identification and capabilities, for ATA devices IdentifyDevice = IdentifyDrive, /// Gets a sector containing drive identification and capabilities, for ATAPI devices IdentifyPacketDevice = 0xA1, /// Locks the media on the device MediaLock = DoorLock, /// Unlocks the media on the device MediaUnLock = DoorUnLock, /// Sends a command packet Packet = 0xA0, /// Queues a read of sectors ReadDmaQueued = 0xC7, /// Returns the native maximum address in factory default condition ReadNativeMaxAddress = 0xF8, /// Used to provide data transfer and/or status of a previous command (queue or packet) Service = 0xA2, /// Redefines the maximum user-accessible address space SetMaxAddress = 0xF9, /// Queues a write of sectors WriteDmaQueued = 0xCC, #endregion Commands defined on ATA/ATAPI-4 rev. 18 #region Commands defined on ATA/ATAPI-6 rev. 3b /// Determines if the device supports the Media Card Pass Through Command feature set CheckMediaCardType = 0xD1, /// Device Configuration Overlay feature set DeviceConfiguration = 0xB1, /// Requests the device to flush the write cache and write it to the media (48-bit) FlushCacheExt = 0xEA, /// Reads sectors using DMA transfer, retrying on error (48-bit) ReadDmaExt = 0x25, /// (48-bit) Queues a read of sectors ReadDmaQueuedExt = 0x26, /// Reads sectors using PIO transfer, retrying on error (48-bit) ReadExt = 0x24, /// Returns the indicated log to the host (48-bit) ReadLogExt = 0x2F, /// Reads multiple sectors generating interrupts at block transfers (48-bit) ReadMultipleExt = 0x29, /// Returns the native maximum address in factory default condition (48-bit) ReadNativeMaxAddressExt = 0x27, /// Verifies sectors readability without transferring them, retrying on error (48-bit) ReadVerifyExt = 0x42, /// Sends a SET MAX subcommand, SetMaxCommands = 0xF9, /// Redefines the maximum user-accessible address space (48-bit) SetMaxAddressExt = 0x37, /// Writes sectors using DMA transfer, retrying on error (48-bit) WriteDmaExt = 0x35, /// Queues a write of sectors (48-bit) WriteDmaQueuedExt = 0x36, /// Writes sectors using PIO transfer, retrying on error (48-bit) WriteExt = 0x34, /// Writes data to the indicated log (48-bit) WriteLogExt = 0x3F, /// Writes several sectors at once setting interrupts on end of block (48-bit) WriteMultipleExt = 0x39, #endregion Commands defined on ATA/ATAPI-6 rev. 3b #region Commands defined on ATA/ATAPI-7 rev. 4b /// Configures the operating parameters for a stream ConfigureStream = 0x51, /// Reads data on an allotted time using DMA ReadStreamDmaExt = 0x2A, /// Reads data on an allotted time using PIO ReadStreamExt = 0x2B, /// Writes data on an allotted time using DMA WriteStreamDmaExt = 0x3A, /// Writes data on an allotted time using PIO WriteStreamExt = 0x3B, #endregion Commands defined on ATA/ATAPI-7 rev. 4b #region Commands defined on ATA/ATAPI-8 rev. 3f /// Sends a Non Volatile Cache subcommand. NonVolatileCacheCommand = 0xB6, /// Retrieves security protocol information or the results from commands TrustedReceive = 0x5C, /// /// Retrieves security protocol information or the results from commands, using DMA /// transfers /// TrustedReceiveDma = 0x5D, /// Sends one or more Security Protocol commands TrustedSend = 0x5E, /// Sends one or more Security Protocol commands, using DMA transfers TrustedSendDma = 0x5F, /// Writes sectors using DMA transfer, retrying on error (48-bit), not returning until the operation is complete WriteDmaFuaExt = 0x3D, /// Queues a write of sectors (48-bit), not returning until the operation is complete WriteDmaQueuedFuaExt = 0x3E, /// /// Writes several sectors at once setting interrupts on end of block (48-bit), not returning until the operation /// is complete /// WriteMultipleFuaExt = 0xCE, /// Writes a sector that will give an uncorrectable error on any read operation WriteUncorrectableExt = 0x45, #endregion Commands defined on ATA/ATAPI-8 rev. 3f #region Commands defined on ATA/ATAPI Command Set 2 (ACS-2) rev. 2 /// Provides information for device optimization In SSDs, this contains trimming DataSetManagement = 0x06, /// Alters the device microcode, using DMA transfers DownloadMicrocodeDma = 0x93, /// Reads the content of the drive's buffer, using DMA transfers ReadBufferDma = 0xE9, /// Reads sectors using NCQ ReadFpDmaQueued = 0x60, /// Returns the indicated log to the host (48-bit) ReadLogDmaExt = 0x47, /// Requests SPC-4 style error data RequestSenseDataExt = 0x0B, SanitizeCommands = 0xB4, /// Executes a Security Protocol command that does not require a transfer of data TrustedNonData = 0x5B, /// Writes data to the drive's sector buffer, using DMA transfers WriteBufferDma = 0xE8, /// Writes sectors using NCQ WriteFpDmaQueued = 0x61, #endregion Commands defined on ATA/ATAPI Command Set 2 (ACS-2) rev. 2 #region Commands defined on ATA/ATAPI Command Set 3 (ACS-3) rev. 5 /// Sends NcqQueueManagement = 0x63, /// Sets the device date and time SetDateAndTimeExt = 0x77, #endregion Commands defined on ATA/ATAPI Command Set 3 (ACS-3) rev. 5 #region Commands defined on ATA/ATAPI Command Set 3 (ACS-3) rev. 6 NativeMaxAddress = 0x78 #endregion Commands defined on ATA/ATAPI Command Set 3 (ACS-3) rev. 6 } #endregion ATA Commands #region ATA SMART SubCommands /// All known ATA SMART sub-commands public enum AtaSmartSubCommands : byte { #region Commands defined on ATA-3 rev. 7b /// Disables all SMART capabilities Disable = 0xD9, /// Enables/disables SMART attribute autosaving EnableDisableAttributeAutosave = 0xD2, /// Enables all SMART capabilities Enable = 0xD8, /// Returns the device's SMART attributes thresholds ReadAttributeThresholds = 0xD1, /// Returns the device's SMART attributes values ReadAttributeValues = 0xD0, /// Communicates device reliability status ReturnStatus = 0xDA, /// Saves any attribute values immediately SaveAttributeValues = 0xD3, #endregion Commands defined on ATA-3 rev. 7b #region Commands defined on ATA/ATAPI-4 rev. 18 /// Causes the device to immediately initiate a SMART data collection and saves it to the device ExecuteOfflineImmediate = 0xD4, /// Returns the device's SMART attributes values ReadData = ReadAttributeValues, #endregion Commands defined on ATA/ATAPI-4 rev. 18 #region Commands defined on ATA/ATAPI-5 rev. 3 /// Returns the indicated log to the host ReadLog = 0xD5, /// Writes data to the indicated log WriteLog = 0xD6 #endregion Commands defined on ATA/ATAPI-5 rev. 3 } #endregion ATA SMART SubCommands #region ATA Device Configuration Overlay SubCommands /// All known ATA DEVICE CONFIGURATION sub-commands public enum AtaDeviceConfigurationSubCommands : byte { #region Commands defined on ATA/ATAPI-6 rev. 3b /// Disables any change made by Restore = 0xC0, /// Prevents any from working until a power down cycle. FreezeLock = 0xC1, /// Indicates the selectable commands, modes, and feature sets the device supports Identify = 0xC2, /// Modifies the commands, modes and features sets the device will obey to Set = 0xC3 #endregion Commands defined on ATA/ATAPI-6 rev. 3b } #endregion ATA Device Configuration Overlay SubCommands #region ATA SET MAX SubCommands /// All known ATA SET MAX sub-commands public enum AtaSetMaxSubCommands : byte { #region Commands defined on ATA/ATAPI-6 rev. 3b /// Redefines the maximum user-accessible address space Address = 0x00, /// Disables any other until power cycle FreezeLock = 0x04, /// /// Disables any other except and /// until power cycle /// Lock = 0x02, /// Sets the device password SetPassword = 0x01, /// Disables UnLock = 0x03, #endregion Commands defined on ATA/ATAPI-6 rev. 3b } #endregion ATA SET MAX SubCommands #region ATA Non Volatile Cache SubCommands /// All known ATA NV CACHE sub-commands public enum AtaNonVolatileCacheSubCommands : byte { #region Commands defined on ATA/ATAPI-8 rev. 3f /// Adds the specified LBA to the Non Volatile Cache AddLbaToNvCache = 0x10, /// Ensures there is enough free space in the Non Volatile Cache FlushNvCache = 0x14, /// Requests a list of LBAs actually stored in the Non Volatile Cache QueryNvCachePinnedSet = 0x12, /// Requests a list of LBAs accessed but not in the Non Volatile Cache QueryNvCacheMisses = 0x13, /// Removes the specified LBA from the Non Volatile Cache Pinned Set RemoveLbaFromNvCache = 0x11, /// Disables the Non Volatile Cache Power Mode ReturnFromNvCachePowerMode = 0x01, /// /// Enables the Non Volatile Cache Power Mode, so the device tries to serve all accesses from the Non Volatile /// Cache /// SetNvCachePowerMode = 0x00 #endregion Commands defined on ATA/ATAPI-8 rev. 3f } #endregion ATA Non Volatile Cache SubCommands #region ATA Sanitize SubCommands /// All known ATA SANITIZE sub-commands public enum AtaSanitizeSubCommands : ushort { #region Commands defined on ATA/ATAPI Command Set 2 (ACS-2) rev. 2 /// Causes a block erase on all user data BlockEraseExt = 0x0012, /// Changes the internal encryption keys. Renders user data unusable CryptoScrambleExt = 0x0011, /// Fills user data with specified pattern OverwriteExt = 0x0014, /// Disables all except FreezeLockExt = 0x0020, /// Gets the status of the sanitizing Status = 0x0000, #endregion Commands defined on ATA/ATAPI Command Set 2 (ACS-2) rev. 2 #region Commands defined on ATA/ATAPI Command Set 3 (ACS-3) rev. 5 /// Disables the command AntiFreezeLockExt = 0x0040 #endregion Commands defined on ATA/ATAPI Command Set 3 (ACS-3) rev. 5 } #endregion ATA Sanitize SubCommands #region ATA NCQ Queue Management SubCommands /// All known ATA NCQ QUEUE MANAGEMENT sub-commands public enum AtaNcqQueueManagementSubcommands : byte { #region Commands defined on ATA/ATAPI Command Set 3 (ACS-3) rev. 5 /// Aborts pending NCQ commands AbortNcqQueue = 0x00, /// Controls how NCQ Streaming commands are processed by the device DeadlineHandling = 0x01, #endregion Commands defined on ATA/ATAPI Command Set 3 (ACS-3) rev. 5 } #endregion ATA NCQ Queue Management SubCommands /// /// All known SASI commands Commands 0x00 to 0x1F are 6-byte Commands 0x20 to 0x3F are 10-byte Commands 0x40 to /// 0x5F are 8-byte Commands 0xA0 to 0xBF are 12-byte /// #region SASI Commands public enum SasiCommands : byte { #region SASI Class 0 commands /// Returns zero status if requested unit is on and ready. SASI rev. 0a TestUnitReady = 0x00, /// Sets the unit to a specific known state. SASI rev. 0a RezeroUnit = 0x01, /// Unknown SASI rev. 0a RequestSyndrome = 0x02, /// Returns unit sense. SASI rev. 0a RequestSense = 0x03, /// Formats the entire media. SASI rev. 0a FormatUnit = 0x04, /// Unknown SASI rev. 0a CheckTrackFormat = 0x05, /// Unknown SASI rev. 0a FormatTrack = 0x06, /// Unknown SASI rev. 0a FormatBadTrack = 0x06, /// Reads a block from the device. SASI rev. 0a Read = 0x08, /// SASI rev. 0a Unknown WriteProtectSector = 0x09, /// Writes a block to the device. SASI rev. 0a Write = 0x0A, /// Moves the device reading mechanism to the specified block. SASI rev. 0a Seek = 0x0B, /// Found on a vendor source code InitDriveCharacteristics = 0x0C, /// Unknown SASI rev. 0a VerifyRestore = 0x0D, /// Unknown SASI rev. 0a AssignAlternateDiskTrack = 0x0E, /// Writes a File Mark on the device. SASI rev. 0c WriteFileMark = 0x0F, /// Reserves the device for use by the initiator. SASI rev. 0a ReserveUnitOld = 0x12, /// Gets information about a device ANSI X3T9.3 No. 185 (SASI) Inquiry = 0x12, /// Release the device from the reservation. SASI rev. 0a ReleaseUnitOld = 0x13, /// Unknown SASI rev. 0a WriteProtectDrive = 0x14, /// Writes and verifies blocks to the device. SASI rev. 0c WriteAndVerifyOld = 0x14, /// Unknown SASI rev. 0a ReleaseWriteProtect = 0x15, /// Verifies blocks. SASI rev. 0c VerifyOld = 0x15, /// Unknown SASI rev. 0a ReadNoSeek = 0x16, /// Gets the number of blocks in device. SASI rev. 0c ReadCapacityOld = 0x16, /// Reserves the device for use by the initiator. ANSI X3T9.3 No. 185 (SASI) ReserveUnit = 0x16, /// Release the device from the reservation. ANSI X3T9.3 No. 185 (SASI) ReleaseUnit = 0x17, /// Searches data on blocks SASI rev. 0a SearchDataEqualOld = 0x17, /// Searches data on blocks using major than or equal comparison SASI rev. 0a SearchDataHighOld = 0x18, /// Searches data on blocks using minor than or equal comparison SASI rev. 0a SearchDataLowOld = 0x19, /// Reads analysis data from a device SASI rev. 0a ReadDiagnosticOld = 0x1A, /// Unknown SASI rev. 0a VerifyData = 0x1B, /// Requests a device to run a diagnostic SASI rev. 0c WriteDiagnosticOld = 0x1B, /// Requests the data after completion of a ANSI X3T9.3 No. 185 (SASI) ReadDiagnostic = 0x1C, /// Requests the device to perform diagnostics ANSI X3T9.3 No. 185 (SASI) WriteDiagnostic = 0x1D, /// Gets information about a device SASI rev. 0c InquiryOld = 0x1F, #endregion SASI Class 0 commands #region SASI Class 1 commands /// SASI rev. 0a Unknown Copy = 0x20, /// SASI rev. 0a Unknown Restore = 0x21, /// SASI rev. 0a Unknown Backup = 0x22, /// SASI rev. 0a Unknown SetBlockLimitsOlder = 0x26, /// Sets write or read limits from a specified block SASI rev. 0c SetBlockLimitsOld = 0x28, /// Reads blocks from device ANSI X3T9.3 No. 185 (SASI) ExtendedAddressRead = 0x28, /// Writes blocks to the device ANSI X3T9.3 No. 185 (SASI) ExtendedAddressWrite = 0x2A, /// Writes blocks to the device and then verifies them ANSI X3T9.3 No. 185 (SASI) WriteAndVerify = 0x2E, /// Verifies blocks on the device ANSI X3T9.3 No. 185 (SASI) Verify = 0x2F, /// Searches data on blocks ANSI X3T9.3 No. 185 (SASI) SearchDataEqual = 0x31, /// Searches data on blocks using major than or equal comparison ANSI X3T9.3 No. 185 (SASI) SearchDataHigh = 0x30, /// Searches data on blocks using minor than or equal comparison ANSI X3T9.3 No. 185 (SASI) SearchDataLow = 0x32, #endregion SASI Class 1 commands #region SASI Class 2 commands /// Unknown SASI rev. 0a Load = 0x40, /// Unknown SASI rev. 0a Unload = 0x41, /// Unknown SASI rev. 0a Rewind = 0x42, /// Unknown SASI rev. 0a SpaceForward = 0x43, /// Unknown SASI rev. 0a SpaceForwardFileMark = 0x44, /// Unknown SASI rev. 0a SpaceReverse = 0x45, /// Unknown SASI rev. 0a SpaceReverseFileMark = 0x46, /// Unknown SASI rev. 0a TrackSelect = 0x47, /// Reads blocks from device SASI rev. 0a Read8 = 0x48, /// Unknown SASI rev. 0a ReadVerify = 0x49, /// Unknown SASI rev. 0a ReadDiagnosticClass2 = 0x4A, /// Writes blocks to device SASI rev. 0a Write8 = 0x4B, /// Unknown SASI rev. 0a WriteFileMarkClass2 = 0x4C, /// Unknown SASI rev. 0a WriteExtended = 0x4D, /// Unknown SASI rev. 0a WriteExtendedFileMark = 0x4E, /// Unknown SASI rev. 0a WriteErase = 0x4F, /// Writes and verifies blocks to the device. SASI rev. 0c WriteVerify8 = 0x54, /// Verifies blocks. SASI rev. 0c Verify8 = 0x55, /// Searches data on blocks using major than or equal comparison SASI rev. 0c SearchDataHigh8 = 0x57, /// Searches data on blocks SASI rev. 0c SearchDataEqual8 = 0x58, /// Searches data on blocks using minor than or equal comparison SASI rev. 0c SearchDataLow8 = 0x59, #endregion SASI Class 2 commands #region SASI Class 3 commands /// SASI rev. 0a Skip = 0x60, /// SASI rev. 0a Space = 0x61, /// SASI rev. 0a Return = 0x62, /// SASI rev. 0a Tab = 0x63, /// SASI rev. 0a ReadControl = 0x64, /// SASI rev. 0a Write3 = 0x65, /// SASI rev. 0a WriteControl = 0x66, #endregion SASI Class 3 commands #region SASI Class 5 commands /// Gets the number of blocks in device. ANSI X3T9.3 No. 185 (SASI) ReadCapacity = 0xA5, /// Sets write or read limits from a specified block ANSI X3T9.3 No. 185 (SASI) SetBlockLimits = 0xA9, #endregion SASI Class 5 commands #region SASI Class 6 commands /// SASI rev. 0a DefineFloppyDiskTrackFormat = 0xC0, /// Unknown vendor command in X68000 Specify = 0xC2, /// SASI rev. 0a FormatDriveErrorMap = 0xC4, /// SASI rev. 0a ReadErrorMap = 0xC5, /// SASI rev. 0a ReadDriveType = 0xC6, #endregion SASI Class 6 commands #region SASI Class 7 commands /// SASI rev. 0a RamDiagnostic = 0xE0, /// SASI rev. 0a WriteEcc = 0xE1, /// SASI rev. 0a ReadId = 0xE2, /// SASI rev. 0a DriveDiagnostic = 0xE3, /// Found on a vendor source code ControllerDiagnostic = 0xE4, /// Found on a vendor document ReadLong = 0xE5, /// Found on a vendor document WriteLong = 0xE6 #endregion SASI Class 7 commands } #endregion SASI Commands #region SCSI Commands /// All known SCSI and ATAPI commands public enum ScsiCommands : byte { #region SCSI Primary Commands (SPC) /// Commands used to obtain information about the access controls that are active SPC-4 rev. 16 AccessControlIn = 0x86, /// Commands used to limit or grant access to LUNs SPC-4 rev. 16 AccessControlOut = 0x87, /// Modifies the operating definition of the device with respect to commands. SCSI-2 X3T9.2/375R rev. 10l ChangeDefinition = 0x40, /// Compares data between two devices ECMA-111 (SCSI-1) Compare = 0x39, /// Copies data between two devices ECMA-111 (SCSI-1) Copy = 0x18, /// Copies data between two devices and verifies the copy is correct. ECMA-111 (SCSI-1) CopyAndVerify = 0x3A, /// Copies data between two devices SPC-2 rev. 20 ExtendedCopy = 0x83, /// Requests information about the device ECMA-111 (SCSI-1) Inquiry = SasiCommands.Inquiry, /// Manages device statistics SCSI-2 X3T9.2/375R rev. 10l LogSelect = 0x4C, /// Gets device statistics SCSI-2 X3T9.2/375R rev. 10l LogSense = 0x4D, /// Retrieves management protocol information SPC-2 rev. 20 ManagementProtocolIn = 0xA3, /// Transfers management protocol information SPC-2 rev. 20 ManagementProtocolOut = 0xA4, /// Sets device parameters ECMA-111 (SCSI-1) ModeSelect = 0x15, /// Sets device parameters SCSI-2 X3T9.2/375R rev. 10l ModeSelect10 = 0x55, /// Gets device parameters ECMA-111 (SCSI-1) ModeSense = 0x1A, /// Gets device parameters SCSI-2 X3T9.2/375R rev. 10l ModeSense10 = 0x5A, /// Obtains information about persistent reservations and reservation keys SPC-1 rev. 10 PersistentReserveIn = 0x5E, /// Reserves a LUN or an extent within a LUN for exclusive or shared use SPC-1 rev. 10 PersistentReserveOut = 0x5F, /// Requests the device to disable or enable the removal of the medium inside it ECMA-111 (SCSI-1) PreventAllowMediumRemoval = 0x1E, /// Reads attribute values from medium auxiliary memory SPC-3 rev. 21b ReadAttribute = 0x8C, /// Reads the device buffer SCSI-2 X3T9.2/375R rev. 10l ReadBuffer = 0x3C, /// Reads the media serial number SPC-3 rev. 21b ReadSerialNumber = 0xAB, /// Receives information about a previous or current SPC-2 rev. 20 ReceiveCopyResults = 0x84, /// Requests the data after completion of a ECMA-111 (SCSI-1) ReceiveDiagnostic = SasiCommands.ReadDiagnostic, /// Releases a previously reserved LUN or extents ECMA-111 (SCSI-1) Release = SasiCommands.ReleaseUnit, /// Releases a previously reserved LUN or extents SPC-1 rev. 10 Release10 = 0x57, /// Requests the LUNs that are present on the device SPC-1 rev. 10 ReportLuns = 0xA0, /// Requests the device's sense ECMA-111 (SCSI-1) RequestSense = SasiCommands.RequestSense, /// Reserves a LUN or extent ECMA-111 (SCSI-1) Reserve = SasiCommands.ReserveUnit, /// Reserves a LUN or extent SPC-1 rev. 10 Reserve10 = 0x56, /// Retrieves security protocol information SPC-4 rev. 16 SecurityProtocolIn = 0xA2, /// Transfers security protocol information SPC-4 rev. 16 SecurityProtocolOut = 0xB5, /// Requests the device to perform diagnostics ECMA-111 (SCSI-1) SendDiagnostic = SasiCommands.WriteDiagnostic, /// Extended commands SPC-4 ServiceActionIn = 0x9E, /// Extended commands SPC-4 ServiceActionOut = 0x9F, /// Checks if a LUN is ready to access its medium ECMA-111 (SCSI-1) TestUnitReady = SasiCommands.TestUnitReady, /// Writes attribute values to medium auxiliary memory SPC-3 rev. 21b WriteAttribute = 0x8D, /// Writes to the device's buffer SCSI-2 X3T9.2/375R rev. 10l WriteBuffer = 0x3B, #endregion SCSI Primary Commands (SPC) #region SCSI Block Commands (SBC) /// Compares blocks with sent data, and if equal, writes those block to device, atomically SBC-3 rev. 25 CompareAndWrite = 0x89, /// Formats the medium into addressable logical blocks ECMA-111 (SCSI-1) FormatUnit = SasiCommands.FormatUnit, FormatWithPreset = 0x38, /// Locks blocks from eviction of device's cache SCSI-2 X3T9.2/375R rev. 10l LockUnlockCache = 0x36, /// Locks blocks from eviction of device's cache SBC-2 rev. 4 LockUnlockCache16 = 0x92, /// /// Requests the device to perform the following uninterrupted series of actions: 1.- Read the specified blocks /// 2.- Transfer blocks from the data out buffer 3.- Perform an OR operation between the read blocks and the buffer 4.- /// Write the buffer to the blocks SBC-3 rev. 16 /// OrWrite = 0x8B, /// Transfers requested blocks to devices' cache SCSI-2 X3T9.2/375R rev. 10l PreFetch = 0x34, /// Transfers requested blocks to devices' cache SBC-3 rev. 16 PreFetch16 = 0x90, /// Reads blocks from device ECMA-111 (SCSI-1) Read = SasiCommands.Read, /// Reads blocks from device ECMA-111 (SCSI-1) Read10 = SasiCommands.ExtendedAddressRead, /// Reads blocks from device SBC-2 rev. 4 Read16 = 0x88, /// Gets device capacity ECMA-111 (SCSI-1) ReadCapacity = 0x25, /// Gets device's defect data SCSI-2 X3T9.2/375R rev. 10l ReadDefectData = 0x37, /// /// Reads blocks from device in a vendor-specific way that should include the ECC alongside the data SCSI-2 /// X3T9.2/375R rev. 10l /// ReadLong = 0x3E, /// Requests the device to reassign the defective blocks to another area of the medium ECMA-111 (SCSI-1) ReassignBlocks = 0x07, /// Requests the target write to the medium the XOR data generated from the specified source devices SBC-1 rev. 8c Rebuild = 0x81, /// /// Requests the target write to the buffer the XOR data from its own medium and the specified source devices /// SBC-1 rev. 8c /// Regenerate = 0x82, /// Requests the device to set the LUN in a vendor specific state ECMA-111 (SCSI-1) RezeroUnit = SasiCommands.RezeroUnit, Sanitize = 0x48, /// Searches data on blocks ECMA-111 (SCSI-1) SearchDataEqual = SasiCommands.SearchDataEqual, /// Searches data on blocks using major than or equal comparison ECMA-111 (SCSI-1) SearchDataHigh = SasiCommands.SearchDataHigh, /// Searches data on blocks using minor than or equal comparison ECMA-111 (SCSI-1) SearchDataLow = SasiCommands.SearchDataLow, /// Requests the device to seek to a specified blocks ECMA-111 (SCSI-1) Seek = SasiCommands.Seek, /// Requests the device to seek to a specified blocks ECMA-111 (SCSI-1) Seek10 = 0x2B, /// Defines the range within which subsequent linked commands may operate ECMA-111 (SCSI-1) SetLimits = 0x33, /// Requests the device to enable or disable the LUN for media access operations ECMA-111 (SCSI-1) StartStopUnit = 0x1B, /// Ensures that the blocks in the cache are written to the medium SCSI-2 X3T9.2/375R rev. 10l SynchronizeCache = 0x35, /// Ensures that the blocks in the cache are written to the medium SBC-2 rev. 4 SynchronizeCache16 = 0x91, /// Unmaps one or more LBAs In SSDs, this is trimming SBC-3 rev. 25 Unmap = 0x42, /// Verifies blocks on the device ECMA-111 (SCSI-1) Verify10 = SasiCommands.Verify, /// Verifies blocks on the device SBC-2 rev. 4 Verify16 = 0x8F, /// Writes blocks to the device ECMA-111 (SCSI-1) Write = SasiCommands.Write, /// Writes blocks to the device ECMA-111 (SCSI-1) Write10 = SasiCommands.ExtendedAddressWrite, /// Writes blocks to the device SBC-2 rev. 4 Write16 = 0x8A, /// Writes blocks to the device and then verifies them ECMA-111 (SCSI-1) WriteAndVerify = SasiCommands.WriteAndVerify, /// Writes blocks to the device and then verifies them SBC-2 rev. 4 WriteAndVerify16 = 0x8E, /// /// Writes blocks to the device with a vendor specified format that shall include the ECC alongside the data /// SCSI-2 X3T9.2/375R rev. 10l /// WriteLong = 0x3F, /// Writes a single block several times SCSI-2 X3T9.2/375R rev. 10l WriteSame = 0x41, /// Writes a single block several times SBC-2 rev. 4 WriteSame16 = 0x93, /// Requests XOR data generated by an or command SBC-1 rev. 8c XdRead = 0x52, /// /// XORs the data sent with data on the medium and stores it until an is issued SBC-1 rev. /// 8c /// XdWrite = 0x50, /// /// XORs the data sent with data on the medium and stores it until an is issued SBC-1 rev. /// 8c /// XdWrite16 = 0x80, /// Requests the target to XOR the sent data with the data on the medium and return the results XdWriteRead = 0x53, /// /// Requests the target to XOR the data transferred with the data on the medium and writes it to the medium SBC-1 /// rev. 8c /// XpWrite = 0x51, #endregion SCSI Block Commands (SBC) #region SCSI Streaming Commands (SSC) /// Prepares the medium for use by the LUN SSC-1 rev. 22 FormatMedium = 0x04, /// Erases part of all of the medium from the current position ECMA-111 (SCSI-1) Erase = 0x19, /// Enables or disables the LUN for further operations ECMA-111 (SCSI-1) LoadUnload = 0x1B, /// Positions the LUN to a specified block in a specified partition SCSI-2 X3T9.2/375R rev. 10l Locate = 0x2B, /// Positions the LUN to a specified block in a specified partition SSC-2 rev. 09 Locate16 = 0x92, /// Requests the block length limits capability ECMA-111 (SCSI-1) ReadBlockLimits = 0x05, /// Reads the current position SCSI-2 X3T9.2/375R rev. 10l ReadPosition = 0x34, /// Reads blocks from the device, in reverse order ECMA-111 (SCSI-1) ReadReverse = 0x0F, /// /// Retrieves data from the device buffer that has not been successfully written to the medium (or printed) /// ECMA-111 (SCSI-1) /// RecoverBufferedData = 0x14, /// Requests information regarding the supported densities for the logical unit SSC-1 rev. 22 ReportDensitySupport = 0x44, /// Seeks the medium to the beginning of partition in current partition ECMA-111 (SCSI-1) Rewind = 0x01, /// A variety of positioning functions ECMA-111 (SCSI-1) Space = 0x11, /// A variety of positioning functions SSC-2 rev. 09 Space16 = 0x91, /// Selects the specified track ECMA-111 (SCSI-1) TrackSelect = 0x0B, /// Verifies one or more blocks from the next one ECMA-111 (SCSI-1) Verify = 0x13, /// Writes the specified number of filemarks or setmarks in the current position ECMA-111 (SCSI-1) WriteFileMarks = 0x10, #endregion SCSI Streaming Commands (SSC) #region SCSI Streaming Commands for Printers (SSC) /// /// Assures that the data in the buffer has been printed, or, for other devices, written to media ECMA-111 /// (SCSI-1) /// FlushBuffer = 0x10, /// Specifies forms or fronts ECMA-111 (SCSI-1) Format = 0x04, /// Transfers data to be printed ECMA-111 (SCSI-1) Print = 0x0A, /// Transfers data to be printed with a slew value ECMA-111 (SCSI-1) SlewAndPrint = 0x0B, /// Halts printing ECMA-111 (SCSI-1) StopPrint = 0x1B, /// /// Assures that the data in the buffer has been printed, or, for other devices, written to media SCSI-2 /// X3T9.2/375R rev. 10l /// SynchronizeBuffer = FlushBuffer, #endregion SCSI Streaming Commands for Printers (SSC) #region SCSI Processor Commands /// Transfers data from the device ECMA-111 (SCSI-1) Receive = 0x08, /// Sends data to the device ECMA-111 (SCSI-1) Send = 0x0A, #endregion SCSI Processor Commands #region SCSI Multimedia Commands (MMC) /// Erases any part of a CD-RW MMC-1 rev. 9 Blank = 0xA1, /// Closes a track or session MMC-1 rev. 9 CloseTrackSession = 0x5B, /// /// Gets information about the overall capabilities of the device and the current capabilities of the device MMC-2 /// rev. 11a /// GetConfiguration = 0x46, /// Requests the LUN to report events and statuses MMC-2 rev. 11a GetEventStatusNotification = 0x4A, /// Provides a method to profile the performance of the drive MMC-2 rev. 11a GetPerformance = 0xAC, /// Requests the device changer to load or unload a disc MMC-1 rev. 9 LoadUnloadCd = 0xA6, /// Requests the device changer to load or unload a disc MMC-2 rev. 11a LoadUnloadMedium = 0xA6, /// Requests information about the current status of the CD device, including any changer mechanism MMC-1 rev. 9 MechanicalStatus = 0xBD, /// Requests the device to start or stop an audio play operation SCSI-2 X3T9.2/375R rev. 10l PauseResume = 0x4B, /// Begins an audio playback SCSI-2 X3T9.2/375R rev. 10l PlayAudio = 0x45, /// Begins an audio playback SCSI-2 X3T9.2/375R rev. 10l PlayAudio12 = 0xA5, /// Begins an audio playback using MSF addressing SCSI-2 X3T9.2/375R rev. 10l PlayAudioMsf = 0x47, /// Begins an audio playback from the specified index of the specified track SCSI-2 X3T9.2/375R rev. 10l PlayAudioTrackIndex = 0x48, /// Begins an audio playback from the position relative of a track SCSI-2 X3T9.2/375R rev. 10l PlayTrackRelative = 0x49, /// Begins an audio playback from the position relative of a track SCSI-2 X3T9.2/375R rev. 10l PlayTrackRelative12 = 0xA9, /// Reports the total and blank area of the device buffer MMC-1 rev. 9 ReadBufferCapacity = 0x5C, /// Reads a block from a CD with any of the requested CD data streams MMC-1 rev. 9 ReadCd = 0xBE, /// Reads a block from a CD with any of the requested CD data streams using MSF addressing MMC-1 rev. 9 ReadCdMsf = 0xB9, /// Returns the recorded size of the CD MMC-1 rev. 9 ReadCdRecordedCapacity = 0x25, /// Gets information about all discs: CD-ROM, CD-R and CD-RW MMC-1 rev. 9 ReadDiscInformation = 0x51, /// Reads areas from the DVD or BD media MMC-5 rev. 2c ReadDiscStructure = 0xAD, /// Reads areas from the DVD media MMC-2 rev. 11a ReadDvdStructure = 0xAD, /// Requests a list of the possible format capacities for an installed random-writable media MMC-2 rev. 11a ReadFormatCapacities = 0x23, /// Reads the data block header of the specified CD-ROM block SCSI-2 X3T9.2/375R rev. 10l ReadHeader = 0x44, /// Reads the mastering information from a Master CD. MMC-1 rev. 9 ReadMasterCue = 0x59, /// Requests the Q subchannel and the current audio playback status SCSI-2 X3T9.2/375R rev. 10l ReadSubChannel = 0x42, /// Requests the medium TOC, PMA or ATIP from the device SCSI-2 X3T9.2/375R rev. 10l ReadTocPmaAtip = 0x43, /// Gets information about a track regardless of its status MMC-1 rev. 9 ReadTrackInformation = 0x52, /// Repairs an incomplete ECC block at the end of an RZone Mt. Fuji ver. 7 rev. 1.21 RepairRZone = 0x58, /// Repairs an incomplete packet at the end of a packet writing track MMC-1 rev. 9 RepairTrack = 0x58, /// /// Requests the start of the authentication process and provides data necessary for authentication and for /// generating a Bus Key MMC-2 rev. 11a /// ReportKey = 0xA4, /// Reserves disc space for a track MMC-1 rev. 9 ReserveTrack = 0x53, /// /// Fast-forwards or fast-reverses the audio playback to the specified block. Stops if it encounters a data track /// MMC-1 rev. 9 /// ScanMmc = 0xBA, /// Sends a cue sheet for session-at-once recording MMC-1 rev. 9 SendCueSheet = 0x5D, /// Transfer a DVD or BD structure for media writing MMC-5 rev. 2c SendDiscStructure = 0xAD, /// Transfer a DVD structure for media writing MMC-2 rev. 11a SendDvdStructure = 0xAD, /// Requests the LUN to process an event MMC-2 rev. 11a SendEvent = 0xA2, /// Provides data necessary for authentication and for generating a Bus Key MMC-2 rev. 11a SendKey = 0xA3, /// Restores the Optimum Power Calibration values to the drive for a specific disc MMC-1 rev. 9 SendOpcInformation = 0x54, /// Sets the spindle speed to be used while reading/writing data to a CD MMC-1 rev. 9 SetCdRomSpeed = 0xBB, /// Requests the LUN to perform read ahead caching operations from the specified block MMC-2 rev. 11a SetReadAhead = 0xA7, /// Indicates the LUN to try to achieve a specified performance MMC-2 rev. 11a SetStreaming = 0xB6, /// Stops a scan and continues audio playback from current scanning position MMC-1 rev. 9 StopPlayScan = 0x4E, #endregion SCSI Multimedia Commands (MMC) #region SCSI Scanner Commands /// Gets information about the data buffer SCSI-2 X3T9.2/375R rev. 10l GetDataBufferStatus = 0x34, /// Gets information about previously defined windows SCSI-2 X3T9.2/375R rev. 10l GetWindow = 0x25, /// Provides positioning functions SCSI-2 X3T9.2/375R rev. 10l ObjectPosition = 0x31, /// Begins a scan operation SCSI-2 X3T9.2/375R rev. 10l Scan = 0x1B, /// Specifies one or more windows within the device's scanning range SCSI-2 X3T9.2/375R rev. 10l SetWindow = 0x24, /// Sends data to the device SCSI-2 X3T9.2/375R rev. 10l Send10 = 0x2A, #endregion SCSI Scanner Commands #region SCSI Block Commands for Optical Media (SBC) /// Erases the specified number of blocks Erase10 = 0x2C, /// Erases the specified number of blocks Erase12 = 0xAC, /// Searches the medium for a contiguous set of written or blank blocks MediumScan = 0x38, /// Reads blocks from device SCSI-2 X3T9.2/375R rev. 10l Read12 = 0xA8, /// Gets medium's defect data SCSI-2 X3T9.2/375R rev. 10l ReadDefectData12 = 0xB7, /// Gets the maximum generation address for the specified block ReadGeneration = 0x29, /// Reads a specified generation of a specified block ReadUpdatedBlock = 0x2D, /// Searches data on blocks SCSI-2 X3T9.2/375R rev. 10l SearchDataEqual12 = 0xB1, /// Searches data on blocks using major than or equal comparison SCSI-2 X3T9.2/375R rev. 10l SearchDataHigh12 = 0xB0, /// Searches data on blocks using minor than or equal comparison SCSI-2 X3T9.2/375R rev. 10l SearchDataLow12 = 0xB2, /// Defines the range within which subsequent linked commands may operate SCSI-2 X3T9.2/375R rev. 10l SetLimits12 = 0xB3, /// Replaces a block with data UpdateBlock = 0x3D, /// Verifies blocks on the device SCSI-2 X3T9.2/375R rev. 10l Verify12 = 0xAF, /// Writes blocks to the device SCSI-2 X3T9.2/375R rev. 10l Write12 = 0xAA, /// Writes blocks to the device and then verifies them SCSI-2 X3T9.2/375R rev. 10l WriteAndVerify12 = 0xAE, #endregion SCSI Block Commands for Optical Media (SBC) #region SCSI Medium Changer Commands (SMC) /// /// Provides a means to exchange the medium in the source element with the medium at destination element SCSI-2 /// X3T9.2/375R rev. 10l /// ExchangeMedium = 0xA6, /// Checks all elements for medium and any other relevant status SCSI-2 X3T9.2/375R rev. 10l InitializeElementStatus = 0x07, /// Checks all elements for medium and any other relevant status in the specified range of elements SMC-2 rev. 7 InitializeElementStatusWithRange = 0x37, /// Moves a medium from an element to another SCSI-2 X3T9.2/375R rev. 10l MoveMedium = 0xA5, /// Moves a medium that's currently attached to another element SPC-1 rev. 10 MoveMediumAttached = 0xA7, /// Provides a method to change the open/closed state of the specified import/export element SMC-3 rev. 12 OpenCloseImportExportElement = 0x1B, /// Positions the transport element in front of the destination element SCSI-2 X3T9.2/375R rev. 10l PositionToElement = 0x2B, /// Requests the status of the elements SCSI-2 X3T9.2/375R rev. 10l ReadElementStatus = 0xB8, /// Requests the status of the attached element SPC-1 rev. 10 ReadElementStatusAttached = 0xB4, /// Releases a reserved LUN SCSI-2 X3T9.2/375R rev. 10l ReleaseElement = 0x17, /// Releases a reserved LUN SMC-1 rev. 10a ReleaseElement10 = 0x57, /// Requests information regarding the supported volume types for the device SMC-3 rev. 12 ReportVolumeTypesSupported = 0x44, /// Gets the results of SCSI-2 X3T9.2/375R rev. 10l RequestVolumeElementAddress = 0xB5, /// Reserves a LUN SCSI-2 X3T9.2/375R rev. 10l ReserveElement = 0x16, /// Reserves a LUN SMC-1 rev. 10a ReserveElement10 = 0x56, /// /// Transfers a volume tag template to be searched or new volume tag information for one or more elements SCSI-2 /// X3T9.2/375R rev. 10l /// SendVolumeTag = 0xB6, #endregion SCSI Medium Changer Commands (SMC) #region SCSI Communication Commands /// Gets data from the device SCSI-2 X3T9.2/375R rev. 10l GetMessage = 0x08, /// Gets data from the device SCSI-2 X3T9.2/375R rev. 10l GetMessage10 = 0x28, /// Gets data from the device SCSI-2 X3T9.2/375R rev. 10l GetMessage12 = 0xA8, /// Sends data to the device SCSI-2 X3T9.2/375R rev. 10l SendMessage = 0x0A, /// Sends data to the device SCSI-2 X3T9.2/375R rev. 10l SendMessage10 = 0x2A, /// Sends data to the device SCSI-2 X3T9.2/375R rev. 10l SendMessage12 = 0xAA, #endregion SCSI Communication Commands #region SCSI Controller Commands /// Commands that get information about redundancy groups SCC-2 rev. 4 RedundancyGroupIn = 0xBA, /// Commands that set information about redundancy groups SCC-2 rev. 4 RedundancyGroupOut = 0xBB, /// Commands that get information about volume sets SCC-2 rev. 4 VolumeSetIn = 0xBE, /// Commands that set information about volume sets SCC-2 rev. 4 VolumeSetOut = 0xBF, #endregion SCSI Controller Commands #region Pioneer CD-ROM SCSI-2 Command Set /// Scans for a block playing a block on each track cross AudioScan = 0xCD, /// Requests the drive the status from the previous WriteCDP command. ReadCdp = 0xE4, /// Requests status from the drive ReadDriveStatus = 0xE0, /// Reads CD-DA data and/or subcode data ReadCdDa = 0xD8, /// Reads CD-DA data and/or subcode data using MSF addressing ReadCdDaMsf = 0xD9, /// Reads CD-XA data ReadCdXa = 0xDB, /// Reads all subcode data ReadAllSubCode = 0xDF, /// Sets the spindle speed to be used while reading/writing data to a CD SetCdSpeed = 0xDA, WriteCdp = 0xE3, #endregion #region ATA Command Pass-Through /// Sends a 24-bit ATA command to the device Clashes with ATA CPT rev. 8a AtaPassThrough = 0xA1, /// Sends a 48-bit ATA command to the device ATA CPT rev. 8a AtaPassThrough16 = 0x85, #endregion ATA Command Pass-Through #region 6-byte CDB aliases ModeSelect6 = ModeSelect, ModeSense6 = ModeSense, Read6 = Read, Seek6 = Seek, Write6 = Write, #endregion 6-byte CDB aliases #region SCSI Zoned Block Commands /// ZBC commands with host->device information ZbcOut = 0x94, /// ZBC commands with device->host information ZbcIn = 0x95, #endregion #region SCSI Commands with unknown meaning, mostly vendor specific SetCdSpeedUnk = 0xB8, WriteCdMsf = 0xA2, WriteCd = 0xAA, ReadDefectTag = 0xB7, PlayCd = 0xBC, SpareIn = 0xBC, SpareOut = 0xBD, WriteStream16 = 0x9A, WriteAtomic = 0x9C, ServiceActionBidirectional = 0x9D, WriteLong2 = 0xEA, UnknownCdCommand = 0xD4, UnknownCdCommand2 = 0xD5, #endregion SCSI Commands with unknown meaning, mostly vendor specific #region SEGA Packet Interface (all are 12-byte CDB) /// Verifies that the device can be accessed Sega SPI ver. 1.30 SegaTestUnit = TestUnitReady, /// Gets current CD status Sega SPI ver. 1.30 SegaRequestStatus = 0x10, /// Gets CD block mode info Sega SPI ver. 1.30 SegaRequestMode = 0x11, /// Sets CD block mode Sega SPI ver. 1.30 SegaSetMode = 0x12, /// Requests device error info Sega SPI ver. 1.30 SegaRequestError = 0x13, /// Gets disc TOC Sega SPI ver. 1.30 SegaGetToc = 0x14, /// Gets specified session data Sega SPI ver. 1.30 SegaRequestSession = 0x15, /// /// Stops the drive and opens the drive tray, or, on manual trays, stays busy until it is opened Sega SPI ver. /// 1.30 /// SegaOpenTray = 0x16, /// Starts audio playback Sega SPI ver. 1.30 SegaPlayCd = 0x20, /// Moves drive pickup to specified block Sega SPI ver. 1.30 SegaSeek = 0x21, /// /// Fast-forwards or fast-reverses until Lead-In or Lead-Out arrive, or until another command is issued Sega SPI /// ver. 1.30 /// SegaScan = 0x22, /// Reads blocks from the disc Sega SPI ver. 1.30 SegaRead = 0x30, /// Reads blocks from the disc seeking to another position at end Sega SPI ver. 1.30 SegaRead2 = 0x31, /// Reads disc subcode Sega SPI ver. 1.30 SegaGetSubcode = 0x40, #endregion SEGA Packet Interface (all are 12-byte CDB) /// Variable sized Command Description Block SPC-4 rev. 16 VariableSizedCdb = 0x7F, #region Plextor vendor commands /// Sends extended commands (like SpeedRead) to Plextor drives PlextorExtend = 0xE9, /// Command for Plextor PoweRec PlextorPoweRec = 0xEB, /// Sends extended commands (like PoweRec) to Plextor drives PlextorExtend2 = 0xED, /// Resets Plextor drives PlextorReset = 0xEE, /// Reads drive statistics from Plextor drives EEPROM PlextorReadEeprom = 0xF1, #endregion Plextor vendor commands #region HL-DT-ST vendor commands /// Sends debugging commands to HL-DT-ST DVD drives HlDtStVendor = 0xE7, #endregion HL-DT-ST vendor commands #region NEC vendor commands /// Reads CD-DA data NecReadCdDa = 0xD4, #endregion NEC vendor commands #region Adaptec vendor commands /// Translates a SCSI LBA to a drive's CHS AdaptecTranslate = 0x0F, /// Configures Adaptec controller error threshold AdaptecSetErrorThreshold = 0x10, /// Reads and resets error and statistical counters AdaptecReadCounters = 0x11, /// Writes to controller's RAM AdaptecWriteBuffer = 0x13, /// Reads controller's RAM AdaptecReadBuffer = 0x14, #endregion Adaptec vendor commands #region Archive Corp. vendor commands /// Gets current position's block address ArchiveRequestBlockAddress = 0x02, /// Seeks to specified block address ArchiveSeekBlock = 0x0C, #endregion Archive Corp. vendor commands #region Certance vendor commands /// Parks the load arm in preparation for transport CertanceParkUnpark = 0x06, #endregion Certance vendor commands #region Fujitsu vendor commands /// Used to check the controller's data and control path FujitsuLoopWriteToRead = 0xC1, /// Used to display a message on the operator panel FujitsuDisplay = 0xCF, #endregion Fujitsu vendor commands #region M-Systems vendor commands /// Securely erases all flash blocks, including defective, spared and unused MSystemsSecurityErase = 0xFF, /// Securely erases all flash blocks, including defective, spared and unused MSystemsSecurityEraseOld = 0xDF, #endregion M-Systems vendor commands #region Plasmon vendor commands /// Retrieves sector address PlasmonReadSectorLocation = 0xE6, /// Makes a Compliant WORM block completely unreadable PlasmonShred = 0xEE, #endregion Plasmon vendor commands #region Kreon vendor commands /// Most Kreon commands start with this KreonCommand = 0xFF, /// Kreon extract Security Sectors command start with this KreonSsCommand = 0xAD, #endregion Kreon vendor commands #region MiniDisc vendor commands /// Gets some list of pointers only present on MD-DATA discs MiniDiscReadDTOC = 0xD1, /// Writes some list of pointers only present on MD-DATA discs MiniDiscWriteDTOC = 0xD2, /// Reads UTOC MiniDiscReadUTOC = 0xD4, /// Unknown, returns 4 empty bytes MiniDiscD5 = 0xD5, /// Stops playing audio MiniDiscStopPlay = 0xD6, /// Gets current audio playing position MiniDiscReadPosition = 0xD7, /// Gets some values that are identical amongst audio discs and data discs, different between them MiniDiscGetType = 0xD8, #endregion #region MediaTek vendor commands MediaTekVendorCommand = 0xF1 #endregion } #endregion SCSI Commands /// SCSI command transfer direction public enum ScsiDirection { /// No data transfer happens None = 0, /// From host to device Out = 1, /// From device to host In = 2, /// Bidirectional device/host Bidirectional = 3, /// Unspecified Unspecified = -1 } #region SCSI's ATA Command Pass-Through public enum AtaProtocol : byte { /// Requests a device hard reset (pin 1) HardReset = 0, /// Requests a device soft reset (COMRESET issue) SoftReset = 1, /// No data is to be transferred NonData = 3, /// Requests a device->host transfer using PIO PioIn = 4, /// Requests a host->device transfer using PIO PioOut = 5, /// Requests a DMA transfer Dma = 6, /// Requests to queue a DMA transfer DmaQueued = 7, /// Requests device diagnostics DeviceDiagnostic = 8, /// Requests device reset DeviceReset = 9, /// Requests a device->host transfer using UltraDMA UDmaIn = 10, /// Requests a host->device transfer using UltraDMA UDmaOut = 11, /// Unknown Serial ATA FpDma = 12, /// Requests the Extended ATA Status Return Descriptor ReturnResponse = 15 } /// Indicates the STL which ATA register contains the length of data to be transferred public enum AtaTransferRegister : byte { /// There is no transfer NoTransfer = 0, /// FEATURE register contains the data length Feature = 1, /// SECTOR_COUNT register contains the data length SectorCount = 2, /// The STPSIU contains the data length Sptsiu = 3 } #endregion SCSI's ATA Command Pass-Through /// ZBC sub-commands, mask 0x1F public enum ZbcSubCommands : byte { /// Returns list with zones of specified types ReportZones = 0x00, /// Closes a zone CloseZone = 0x01, /// Finishes a zone FinishZone = 0x02, /// Opens a zone OpenZone = 0x03, /// Resets zone's write pointer to zone start ResetWritePointer = 0x04, /// Requests device to transfer parameters describing realms ReportRealms = 0x06, /// Requests device to transfer parameters describing the zone domains structure ReportZoneDomains = 0x07, /// Requests device to perform a zone activation operation ZoneActivate = 0x08, /// Requests information about a zone ZoneQuery = 0x09, /// Requests device to perform sequentialize zone operations SequentializeZone = 0x10 } /// MODE SENSE page control, mask 0xC0 public enum ScsiModeSensePageControl : byte { /// Current values Current = 0x00, /// Changeable values Changeable = 0x40, /// Default values Default = 0x80, /// Saved values Saved = 0xC0 } public enum ScsiPreventAllowMode : byte { /// Allows medium removal from data transport and from medium changer Allow = 0x00, /// Prevents medium removal from data transport but allows it from medium changer Prevent = 0x01, /// Allows medium removal from data transport but prevents it from medium changer PreventChanger = 0x02, /// Prevents medium removal from both data transport and medium changer PreventAll = 0x03 } public enum MmcGetConfigurationRt : byte { /// Drive shall return the Feature Header and all Feature Descriptors All = 0x00, /// Drive shall return the Feature Header and current Feature Descriptors Current = 0x01, /// Drive shall return only the Feature Header with the chosen Feature Descriptor Single = 0x02, Reserved = 0x03 } public enum MmcDiscStructureMediaType : byte { /// Disc Structures for DVD and HD DVD Dvd = 0x00, /// Disc Structures for BD Bd = 0x01 } public enum MmcDiscStructureFormat : byte { // Generic Format Codes /// AACS Volume Identifier AacsVolId = 0x80, /// AACS Pre-recorded Media Serial Number AacsMediaSerial = 0x81, /// AACS Media Identifier AacsMediaId = 0x82, /// AACS Lead-in Media Key Block Aacsmkb = 0x83, /// AACS Data Keys AacsDataKeys = 0x84, /// AACS LBA extents AacslbaExtents = 0x85, /// CPRM Media Key Block specified by AACS Aacsmkbcprm = 0x86, /// Recognized format layers RecognizedFormatLayers = 0x90, /// Write protection status WriteProtectionStatus = 0xC0, /// READ/SEND DISC STRUCTURE capability list CapabilityList = 0xFF, // DVD Disc Structures /// DVD Lead-in Physical Information PhysicalInformation = 0x00, /// DVD Lead-in Copyright Information CopyrightInformation = 0x01, /// CSS/CPPM Disc key DiscKey = 0x02, /// DVD Burst Cutting Area BurstCuttingArea = 0x03, /// DVD Lead-in Disc Manufacturing Information DiscManufacturingInformation = 0x04, /// DVD Copyright Information from specified sector SectorCopyrightInformation = 0x05, /// CSS/CPPM Media Identifier MediaIdentifier = 0x06, /// CSS/CPPM Media Key Block MediaKeyBlock = 0x07, /// DDS from DVD-RAM DvdramDds = 0x08, /// DVD-RAM Medium Status DvdramMediumStatus = 0x09, /// DVD-RAM Spare Area Information DvdramSpareAreaInformation = 0x0A, /// DVD-RAM Recording Type Information DvdramRecordingType = 0x0B, /// DVD-R/-RW RMD in last Border-out LastBorderOutRmd = 0x0C, /// Specified RMD from last recorded Border-out SpecifiedRmd = 0x0D, /// DVD-R/-RW Lead-in pre-recorded information PreRecordedInfo = 0x0E, /// DVD-R/-RW Media Identifier DvdrMediaIdentifier = 0x0F, /// DVD-R/-RW Physical Format Information DvdrPhysicalInformation = 0x10, /// ADIP Adip = 0x11, /// HD DVD Lead-in Copyright Protection Information HddvdCopyrightInformation = 0x12, /// AACS Lead-in Copyright Data Section DvdAacs = 0x15, /// HD DVD-R Medium Status HddvdrMediumStatus = 0x19, /// HD DVD-R Last recorded RMD in the latest RMZ HddvdrLastRmd = 0x1A, /// DVD+/-R DL and DVD-Download DL layer capacity DvdrLayerCapacity = 0x20, /// DVD-R DL Middle Zone start address MiddleZoneStart = 0x21, /// DVD-R DL Jump Interval Size JumpIntervalSize = 0x22, /// DVD-R DL Start LBA of the manual layer jump ManualLayerJumpStartLba = 0x23, /// DVD-R DL Remapping information of the specified Anchor Point RemapAnchorPoint = 0x24, /// Disc Control Block Dcb = 0x30, // BD Disc Structures /// Blu-ray Disc Information DiscInformation = 0x00, /// Blu-ray Burst Cutting Area BdBurstCuttingArea = 0x03, /// Blu-ray DDS BdDds = 0x08, /// Blu-ray Cartridge Status CartridgeStatus = 0x09, /// Blu-ray Spare Area Information BdSpareAreaInformation = 0x0A, /// Unmodified DFL RawDfl = 0x12, /// Physical Access Control Pac = 0x30 } public enum ScsiServiceActions : byte { // SERVICE ACTION IN /// Requests parameter data describing provisioning status for the specified LBA SBC-3 rev. 25 GetLbaStatus = 0x12, /// Gets device capacity SBC-2 rev. 4 ReadCapacity16 = 0x10, /// Reads blocks from device in a vendor-specific way that should include the ECC alongside the data SBC-2 rev. 4 ReadLong16 = 0x11, /// Requests information indicating the user data segments on the ports and LUNs to access them SBC-3 rev. 25 ReportReferrals = 0x13, // SERVICE ACTION OUT /// /// Writes blocks to the device with a vendor specified format that shall include the ECC alongside the data SBC-2 /// rev. 4 /// WriteLong16 = ReadLong16 } public enum MmcDiscInformationDataTypes : byte { /// Standard Disc Information DiscInformation = 0x00, /// Track Resources Information TrackResources = 0x01, /// POW Resources Information PowResources = 0x02 } public enum MmcSectorTypes : byte { /// No checking of data type is performed AllTypes = 0x00, /// Only CD-DA sectors shall be returned Cdda = 0x01, /// Only Mode 1 sectors shall be returned Mode1 = 0x02, /// Only Mode 2 formless sectors shall be returned Mode2 = 0x03, /// Only Mode 2 Form 1 sectors shall be returned Mode2Form1 = 0x04, /// Only Mode 2 Form 2 sectors shall be returned Mode2Form2 = 0x05 } public enum MmcHeaderCodes : byte { /// No header information shall be returned None = 0x00, /// Only the four byte header shall be returned HeaderOnly = 0x01, /// Only the mode 2 form x subheader shall be returned SubHeaderOnly = 0x02, /// Return both header and subheader AllHeaders = 0x03 } public enum MmcErrorField : byte { /// No error information is returned None = 0x00, /// The C2 pointer bits will be included C2Pointers = 0x01, /// The C2 pointer bits will be included as well as the block error byte with a padding byte C2PointersAndBlock = 0x02 } public enum MmcSubchannel : byte { /// No subchannel shall be returned None = 0x00, /// The raw P to W subchannel data shall be transferred Raw = 0x01, /// Q data shall be transferred Q16 = 0x02, /// De-interleaved and error-corrected R to W subchannel data shall be transferred Rw = 0x04 } public enum PioneerSubchannel : byte { /// No subchannel shall be returned None = 0x00, /// Q data shall be transferred Q16 = 0x01, /// The raw P to W subchannel data shall be transferred All = 0x02, /// The raw P to W subchannel data shall be transferred WITHOUT user data Only = 0x03 } public enum PlextorSubchannel : byte { /// No subchannel shall be returned None = 0x00, /// Q data shall be transferred Q16 = 0x01, /// The packed and corrected P to W subchannel data shall be transferred Pack = 0x02, /// The raw P to W subchannel data shall be transferred All = 0x03, /// The raw P to W subchannel data, plus C2 error data shall be transferred RawC2 = 0x08 } public enum PlextorSubCommands : byte { /// Gets Plextor mode GetMode = 0x00, /// Sets Plextor mode SetMode = 0x10, /// Plextor force single session or hide CD-R SessionHide = 0x01, /// Plextor VariRec VariRec = 0x02, /// Plextor GigaRec GigaRec = 0x04, /// Plextor acoustic management (disc related) SilentDisc = 0x06, /// Plextor acoustic management (tra related) SilentTray = 0x07, /// Plextor acoustic management Silent = 0x08, /// Plextor test write DVD+ TestWriteDvdPlus = 0x21, /// Plextor book setting BitSet = 0x22, /// Plextor SecuRec SecuRec = 0xD5, /// Book setting for DVD+R BitSetR = 0x0A, /// Book setting for DVD+R DL BitSetRdl = 0x0E, /// Plextor SpeedRead SpeedRead = 0xBB } public enum SscLogicalIdTypes : byte { /// Logical object identifier ObjectId = 0, /// Logical file identifier FileId = 1, /// Logical set identifier SetId = 2, /// Reserved Reserved = 3 } public enum SscPositionForms : byte { /// 20 bytes using logical block addresses Short = 0, /// 20 bytes using vendor-specified values VendorShort = 1, /// Equivalent to on SSC-1 OldLong = 2, /// Invalid: Equivalent to LONG + BT on SSC-1 OldLongVendor = 3, /// Invalid: Equivalent to TCLP on SSC-1 OldTclp = 4, /// Invalid: Equivalent to TCLP + BT on SSC-1 OldTclpVendor = 5, /// 32 bytes Long = 6, /// Invalid: Equivalent to TCLP + LONG + BT on SSC-1 OldLongTclpVendor = 7, /// From 28 bytes to allocation length Extended = 8 } public enum ScsiAttributeAction : byte { /// Return attribute values Values = 0, /// Return a list of available attributes List = 1, /// Returns a list of known logical volume numbers VolumeList = 2, /// Returns a list of known partition numbers PartitionList = 3, /// Returns a list of elements containing volumes with MAM ElementList = 4, /// Returns a list of supported attribute identifiers Supported = 5 } public enum FujitsuDisplayModes : byte { /// Message is displayed until next tape operation starts Idle = 0, /// Message is displayed only if a cartridge is inserted, until its removal Cart = 1, /// Message is only displayed when drive is ready Ready = 2, /// Cancels current display Cancel = 3, /// /// Message is displayed only if a cartridge is inserted. When removed, only second half of the message is /// displayed. /// Half = 7 } // TODO: Check obsoletes public enum SscSpaceCodes : byte { /// Logical blocks LogicalBlock = 0, /// Filemarks Filemark = 1, /// Sequential filemarks SequentialFilemark = 2, /// End-of-data EndOfData = 3, Obsolete1 = 4, Obsolete2 = 5 } /// MMC / SecureDigital commands public enum MmcCommands : byte { #region Class 1 MMC Commands (Basic and read-stream) /// Resets device to idle (BC) GoIdle = 0, /// Resets the device to pre-idle (BC) GoPreIdleState = 0, /// Initiate alternative boot operation BootInitiation = 0, /// Asks device in idle state to send their operation conditions in response (BCR, R3) SendOpCond = 1, /// Asks device to send their CID numbers (BCR, R2) AllSendCid = 2, /// Assigns a relative address to the device (AC, R1) SetRelativeAddress = 3, /// Programs the DSR of the device (BC) SetDsr = 4, /// Toggles the device between sleep and standby (AC, R1b) SleepAwake = 5, /// Switches device mode of operation (AC, R1b) Switch = 6, /// /// Toggles a device between the stand-by and transfer stats or between the programming and disconnect states (AC, /// R1b) /// SelectCard = 7, /// Asks device to send its extended card-specific data (ExtCSD) (ADTC, R1) SendExtCsd = 8, /// Asks device to send its card-specific data (CSD) (AC, R2) SendCsd = 9, /// Asks device to send its card identification (CID) (AC, R2) SendCid = 10, /// /// Reads data stream from device, starting at given address, until a follows /// (ADTC, R1) /// [Obsolete] ReadDatUntilStop = 11, /// Terminates a read/write stream/multiple block operation (AC, R1 / R1b) StopTransmission = 12, /// Asks device to send its status register (AC, R1) SendStatus = 13, /// The host reads the reversed bus testing data pattern from a device (ADTC, R1) BusTestRead = 14, /// Sets the card to inactive state (AC) GoInactiveState = 15, /// The host sends the bus testing data pattern to a device (ADTC, R1) BusTestWrite = 19, SpiReadOcr = 58, SpicrcOnOff = 59, #endregion Class 1 MMC Commands (Basic and read-stream) #region Class 2 MMC Commands (Block-oriented read) /// Sets the block length in bytes (AC, R1) SetBlocklen = 16, /// Reads a block (ADTC, R1) ReadSingleBlock = 17, /// Transfers data blocks from card to host until interrupted (ADTC, R1) ReadMultipleBlock = 18, /// 128 blocks of tuning pattern is sent for HS200 optimal sampling point detection (ADTC, R1) SendTuningBlockHs200 = 21, #endregion Class 2 MMC Commands (Block-oriented read) #region Class 3 MMC Commands (Stream write) /// Writes data stream from host until a follows (ADTC, R1) [Obsolete] WriteDatUntilStop = 20, #endregion Class 3 MMC Commands (Stream write) #region Class 4 MMC Commands (Block-oriented write) /// /// Defines the number of blocks which are going to be transferred in the immediately succeeding multiple block /// command (AC, R1) /// SetBlockCount = 23, /// Writes a block (ADTC, R1) WriteBlock = 24, /// Continuously writes blocks until interrupted (ADTC, R1) WriteMultipleBlock = 25, /// Programs the Card Information register (ADTC, R1) ProgramCid = 26, /// Programs the programmable bits of the CSD (ADTC, R1) ProgramCsd = 27, /// Sets the real time clock according to information in block (ADTC, R1) SetTime = 49, #endregion Class 4 MMC Commands (Block-oriented write) #region Class 5 MMC Commands (Erase) /// Sets the address of the first erase group (AC, R1) EraseGroupStart = 35, /// Sets the address of the last erase group (AC, R1) EraseGroupEnd = 36, /// Erases previously selected write blocks (AC, R1b) Erase = 38, #endregion Class 5 MMC Commands (Erase) #region Class 6 MMC Commands (Block-oriented write protection) /// Sets the write protection bit (AC, R1b) SetWriteProtect = 28, /// Clears the write protection bit (AC, R1b) ClearWriteProtect = 29, /// Asks the device to send the status of the write protection bit (ADTC, R1) SendWriteProtect = 30, /// Sends the type of write protection that is set for the different write protection groups (ADTC, R1) SentWriteProtectType = 31, #endregion Class 6 MMC Commands (Block-oriented write protection) #region Class 7 MMC Commands (Lock) /// Used to set/reset the password or lock/unlock the card (ADTC, R1b) LockUnlock = 42, #endregion Class 7 MMC Commands (Lock) #region Class 8 MMC Commands (Application-specific) /// Indicates the card that the next command is an application specific command (AC, R1) ApplicationCommand = 55, /// Transfers a data block to/from the card for general purpose / application specific commands (ADTC, R1b) GenericCommand = 56, #endregion Class 8 MMC Commands (Application-specific) #region Class 9 MMC Commands (I/O mode) /// /// Used to write and read 8 bit data field, used to access application dependent registers not defined in MMC /// standard (AC, R4) /// FastIo = 39, /// Sets the system into interrupt mode (BCR, R5) GoIrqState = 40, #endregion Class 9 MMC Commands (I/O mode) #region Class 10 MMC Commands (Security Protocols) /// Reads data blocks (ADTC, R1) ProtocolRead = 53, /// Writes data blocks (ADTC, R1) ProtocolWrite = 54, #endregion Class 10 MMC Commands (Security Protocols) #region Class 11 MMC Commands (Command Queue) /// Defines data direction, priority, task ID and block count of queued task (AC, R1) QueuedTaskParameters = 44, /// Defines the block address of queued task (AC, R1) QueuedTaskAddress = 45, /// Executes the task queue for reading (ADTC, R1) ExecuteTaskRead = 46, /// Executes the task queue for writing (ADTC, R1) ExecuteTaskWrite = 47, /// Manages queues and tasks (AC, R1b) CmdQTaskManagement = 48, #endregion Class 11 MMC Commands (Command Queue) #region Class 1 SecureDigital Commands (Basic) /// Sends SD interface condition (BCR, R7) SendInterfaceCondition = 8, /// Switch to 1.8V bus signaling level (AC, R1) VoltageSwitch = 11, #endregion Class 1 SecureDigital Commands (Basic) #region Class 2 SecureDigital Commands (Block-oriented read) /// 64 bytes of tuning pattern is sent for SDR50 and SDR104 optimal sampling point detection (ADTC, R1) SendTuningBlock = 19, /// Speed class control command (AC, R1b) SpeedClassControl = 20, #endregion Class 2 SecureDigital Commands (Block-oriented read) #region Class 11 SecureDigital Commands (Function Extension) /// Single block read type (ADTC, R1) ReadExtraSingle = 48, /// Single block write type (ADTC, R1) WriteExtraSingle = 49, /// Multiple block read type (ADTC, R1) ReadExtraMulti = 58, /// Multiple block write type (ADTC, R1) WriteExtraMulti = 59, #endregion Class 11 SecureDigital Commands (Function Extension) } /// SecureDigital application-specific commands public enum SecureDigitalCommands : byte { /// Defines the data bus width to be used for data transfer (AC, R1) SetBusWidth = 6, /// Sends the SD status register (ADTC, R1) SendStatus = 13, /// Send the number of the written write blocks (ADTC, R1) SendNumWriteBlocks = 22, /// Set the number of write blocks to be pre-erased before writing (AC, R1) SetWriteBlockEraseCount = 23, /// Sends host capacity support information and asks the card to send its operating condition register (BCR, R3) SendOperatingCondition = 41, /// Connects/Disconnects the 50 kOhm pull-up resistor on CD/DAT3 pin of card (AC, R1) SetClearCardDetect = 42, /// Reads the SD Configuration Register SCR (ADTC, R1) SendScr = 51 } [Flags] [SuppressMessage("ReSharper", "ShiftExpressionZeroLeftOperand")] public enum MmcFlags : uint { ResponsePresent = 1 << 0, Response136 = 1 << 1, ResponseCrc = 1 << 2, ResponseBusy = 1 << 3, ResponseOpcode = 1 << 4, CommandMask = 3 << 5, CommandAc = 0 << 5, CommandAdtc = 1 << 5, CommandBc = 2 << 5, CommandBcr = 3 << 5, ResponseSpiS1 = 1 << 7, ResponseSpiS2 = 1 << 8, ResponseSpiB4 = 1 << 9, ResponseSpiBusy = 1 << 10, ResponseNone = 0, ResponseR1 = ResponsePresent | ResponseCrc | ResponseOpcode, ResponseR1B = ResponsePresent | ResponseCrc | ResponseOpcode | ResponseBusy, ResponseR2 = ResponsePresent | Response136 | ResponseCrc, ResponseR3 = ResponsePresent, ResponseR4 = ResponsePresent, ResponseR5 = ResponsePresent | ResponseCrc | ResponseOpcode, ResponseR6 = ResponsePresent | ResponseCrc | ResponseOpcode, ResponseR7 = ResponsePresent | ResponseCrc | ResponseOpcode, ResponseSpiR1 = ResponseSpiS1, ResponseSpiR1B = ResponseSpiS1 | ResponseSpiBusy, ResponseSpiR2 = ResponseSpiS1 | ResponseSpiS2, ResponseSpiR3 = ResponseSpiS1 | ResponseSpiB4, ResponseSpiR4 = ResponseSpiS1 | ResponseSpiB4, ResponseSpiR5 = ResponseSpiS1 | ResponseSpiS2, ResponseSpiR7 = ResponseSpiS1 | ResponseSpiB4 } [Flags] public enum KreonFeatures { /// Drive can set the xtreme unlock state with Xbox 360 discs XtremeUnlock360, /// Drive can set the wxripper unlock state with Xbox 360 discs WxripperUnlock360, /// Drive can read and decrypt the SS from Xbox 360 discs DecryptSs360, /// Drive has full challenge response capabilities with Xbox 360 discs ChallengeResponse360, /// Drive can set the xtreme unlock state with Xbox discs XtremeUnlock, /// Drive can set the wxripper unlock state with Xbox discs WxripperUnlock, /// Drive can read and decrypt the SS from Xbox discs DecryptSs, /// Drive has full challenge response capabilities with Xbox discs ChallengeResponse, /// Drive supports the locked state Lock, /// Drive supports skipping read errors ErrorSkipping } public enum AtaFeatures : byte { /// Enable 8-bit data transfers Enable8Bit = 0x01, /// Enable write cache EnableWriteCache = 0x02, /// Set transfer mode based on value in sector count register SetTransferMode = 0x03, /// Enable all automatic defect reassignment EnableDefectReassignment = 0x04, /// Enable advanced power management EnableApm = 0x05, /// Enable Power-Up In Standby feature set EnablePowerUpInStandby = 0x06, /// Power-Up In Standby feature set device spin-up PowerUpInStandByFeature = 0x07, /// Reserved for Address offset reserved area boot method technical report AddressOffsetReserved = 0x09, /// Enable CFA power mode 1 EnableCfaPowerMode1 = 0x0A, /// Enable Write-Read-Verify feature set EnableWriteReadVerify = 0x0B, /// Enable use of SATA feature EnableSataFeature = 0x10, /// Disable Media Status Notification DisableMediaStatusNotification = 0x31, /// Disable retry DisableRetry = 0x33, /// Enable Free-fall Control EnableFreeFall = 0x41, /// Enable Automatic Acoustic Management feature set EnableAam = 0x42, /// Set Maximum Host Interface Sector Times SetMaximumHostInterfaceSectorTimes = 0x43, /// Vendor unique length of ECC on read long/write long commands EnableReadLongVendorLength = 0x44, /// Extended Power conditions ExtendedPowerConditions = 0x4A, /// Set cache segments to sector count register value SetCacheSegments = 0x54, /// Disable read look-ahead feature DisableReadLookAhead = 0x55, /// Enable release interrupt EnableReleaseInterrupt = 0x5D, /// Enable SERVICE interrupt EnableServiceInterrupt = 0x5E, /// Long Physical Sector Alignment Error Reporting Control LongPhysicalSectorErrorControl = 0x62, /// Enable/Disable the DSN feature set DsnFeature = 0x63, /// Disable reverting to power on defaults DisableRevertToDefaults = 0x66, /// Disable ECC DisableEcc = 0x77, /// Disable 8-bit data transfers Disable8Bit = 0x81, /// Disable write cache DisableWriteCache = 0x82, /// Disable all automatic defect reassignment DisableDefectReassignment = 0x84, /// Disable advanced power management DisableApm = 0x85, /// Disable Power-Up In Standby feature set DisablePowerUpInStandby = 0x86, /// Enable ECC EnableEcc = 0x88, /// Reserved for Address offset reserved area boot method technical report AddressOffsetReserved2 = 0x89, /// Disable CFA power mode 1 DisableCfaPowerMode1 = 0x8A, /// Disable Write-Read-Verify feature set DisableWriteReadVerify = 0x8B, /// Disable use of SATA feature DisableSataFeature = 0x90, /// Enable Media Status Notification EnableMediaStatusNotification = 0x95, /// Enable retries EnableRetries = 0x99, /// Set device maximum average current SetMaximumAverageCurrent = 0x9A, /// Enable read look-ahead feature EnableReadLookAhead = 0xAA, /// Set maximum prefetch using sector count register value SetMaximumPrefetch = 0xAB, /// 4 bytes of ECC apply on read long/write long commands DisableReadLongVendorLength = 0xBB, /// Disable Free-fall Control DisableFreeFall = 0xC1, /// Disable Automatic Acoustic Management feature set DisableAam = 0xC2, /// Enable/Disable the Sense Data Reporting feature set SenseDataReporting = 0xC3, /// Enable reverting to power on defaults EnableRevertToDefaults = 0xCC, /// Disable release interrupt DisableReleaseInterrupt = 0xDD, /// Disable SERVICE interrupt DisableServiceInterrupt = 0xDE, VendorSpecific = 0xE0 } public enum KreonLockStates : byte { Locked = 0, Xtreme = 1, Wxripper = 2 } public enum RotationalControl : byte { ClvAndImpureCav = 0, PureCav = 1 } public enum TrackInformationType : byte { LogicalBlockAddress = 0, LogicalTrackNumber = 1, SessionNumber = 2 } public enum CssReportKeyFormat : byte { AgidForCssCppm = 0x00, ChallengeKey = 0x01, Key1 = 0x02, TitleKey = 0x04, Asf = 0x05, RpcState = 0x08, AgidForCprm = 0x11, InvalidateAgid = 0x3f } public enum CssSendKeyFormat : byte { ChallengeKey = 0x01, Key2 = 0x03, RpcStructure = 0x06, InvalidateAgid = 0x3f }