2015-10-14 02:53:46 +01:00
|
|
|
|
// /***************************************************************************
|
|
|
|
|
|
// The Disc Image Chef
|
|
|
|
|
|
// ----------------------------------------------------------------------------
|
|
|
|
|
|
//
|
2015-11-23 04:26:53 +00:00
|
|
|
|
// Filename : Errors.cs
|
2016-07-28 18:13:49 +01:00
|
|
|
|
// Author(s) : Natalia Portillo <claunia@claunia.com>
|
2015-10-14 02:53:46 +01:00
|
|
|
|
//
|
2016-07-28 18:13:49 +01:00
|
|
|
|
// Component : Device structures decoders.
|
2015-10-14 02:53:46 +01:00
|
|
|
|
//
|
|
|
|
|
|
// --[ Description ] ----------------------------------------------------------
|
|
|
|
|
|
//
|
2016-07-28 18:13:49 +01:00
|
|
|
|
// Decodes ATA error registers.
|
2015-10-14 02:53:46 +01:00
|
|
|
|
//
|
|
|
|
|
|
// --[ License ] --------------------------------------------------------------
|
|
|
|
|
|
//
|
2016-07-28 18:13:49 +01:00
|
|
|
|
// 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
|
2015-10-14 02:53:46 +01:00
|
|
|
|
// License, or (at your option) any later version.
|
|
|
|
|
|
//
|
2016-07-28 18:13:49 +01:00
|
|
|
|
// 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.
|
2015-10-14 02:53:46 +01:00
|
|
|
|
//
|
2016-07-28 18:13:49 +01:00
|
|
|
|
// You should have received a copy of the GNU Lesser General Public
|
|
|
|
|
|
// License along with this library; if not, see <http://www.gnu.org/licenses/>.
|
2015-10-14 02:53:46 +01:00
|
|
|
|
//
|
|
|
|
|
|
// ----------------------------------------------------------------------------
|
2016-07-28 18:13:49 +01:00
|
|
|
|
// Copyright © 2011-2016 Natalia Portillo
|
2015-10-14 02:53:46 +01:00
|
|
|
|
// ****************************************************************************/
|
2016-07-28 18:13:49 +01:00
|
|
|
|
|
2015-10-14 02:53:46 +01:00
|
|
|
|
using System;
|
|
|
|
|
|
|
2015-11-23 04:26:53 +00:00
|
|
|
|
namespace DiscImageChef.Decoders.ATA
|
2015-10-14 02:53:46 +01:00
|
|
|
|
{
|
2015-10-19 04:39:39 +01:00
|
|
|
|
public struct AtaRegistersCHS
|
2015-10-14 02:53:46 +01:00
|
|
|
|
{
|
2015-10-19 04:39:39 +01:00
|
|
|
|
public byte feature;
|
|
|
|
|
|
public byte sectorCount;
|
|
|
|
|
|
public byte sector;
|
|
|
|
|
|
public byte cylinderLow;
|
|
|
|
|
|
public byte cylinderHigh;
|
|
|
|
|
|
public byte deviceHead;
|
|
|
|
|
|
public byte command;
|
|
|
|
|
|
}
|
2015-10-14 02:53:46 +01:00
|
|
|
|
|
2015-10-19 04:39:39 +01:00
|
|
|
|
public struct AtaRegistersLBA28
|
|
|
|
|
|
{
|
|
|
|
|
|
public byte feature;
|
|
|
|
|
|
public byte sectorCount;
|
|
|
|
|
|
public byte lbaLow;
|
|
|
|
|
|
public byte lbaMid;
|
|
|
|
|
|
public byte lbaHigh;
|
|
|
|
|
|
public byte deviceHead;
|
|
|
|
|
|
public byte command;
|
|
|
|
|
|
}
|
2015-10-14 02:53:46 +01:00
|
|
|
|
|
2015-10-19 04:39:39 +01:00
|
|
|
|
public struct AtaRegistersLBA48
|
|
|
|
|
|
{
|
|
|
|
|
|
public ushort feature;
|
|
|
|
|
|
public ushort sectorCount;
|
|
|
|
|
|
public ushort lbaLow;
|
|
|
|
|
|
public ushort lbaMid;
|
|
|
|
|
|
public ushort lbaHigh;
|
|
|
|
|
|
public byte deviceHead;
|
|
|
|
|
|
public byte command;
|
|
|
|
|
|
}
|
2015-10-14 02:53:46 +01:00
|
|
|
|
|
2015-10-19 04:39:39 +01:00
|
|
|
|
public struct AtaErrorRegistersCHS
|
|
|
|
|
|
{
|
|
|
|
|
|
public byte status;
|
|
|
|
|
|
public byte error;
|
|
|
|
|
|
public byte sectorCount;
|
|
|
|
|
|
public byte sector;
|
|
|
|
|
|
public byte cylinderLow;
|
|
|
|
|
|
public byte cylinderHigh;
|
|
|
|
|
|
public byte deviceHead;
|
|
|
|
|
|
public byte command;
|
|
|
|
|
|
}
|
2015-10-14 02:53:46 +01:00
|
|
|
|
|
2015-10-19 04:39:39 +01:00
|
|
|
|
public struct AtaErrorRegistersLBA28
|
|
|
|
|
|
{
|
|
|
|
|
|
public byte status;
|
|
|
|
|
|
public byte error;
|
|
|
|
|
|
public byte sectorCount;
|
|
|
|
|
|
public byte lbaLow;
|
|
|
|
|
|
public byte lbaMid;
|
|
|
|
|
|
public byte lbaHigh;
|
|
|
|
|
|
public byte deviceHead;
|
|
|
|
|
|
public byte command;
|
|
|
|
|
|
}
|
2015-10-14 02:53:46 +01:00
|
|
|
|
|
2015-10-19 04:39:39 +01:00
|
|
|
|
public struct AtaErrorRegistersLBA48
|
|
|
|
|
|
{
|
|
|
|
|
|
public byte status;
|
|
|
|
|
|
public byte error;
|
|
|
|
|
|
public ushort sectorCount;
|
|
|
|
|
|
public ushort lbaLow;
|
|
|
|
|
|
public ushort lbaMid;
|
|
|
|
|
|
public ushort lbaHigh;
|
|
|
|
|
|
public byte deviceHead;
|
|
|
|
|
|
public byte command;
|
2015-10-14 02:53:46 +01:00
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|