mirror of
https://github.com/aaru-dps/Aaru.Decoders.git
synced 2025-12-16 19:24:32 +00:00
* DiscImageChef.Devices/Command.cs:
* DiscImageChef.Decoders/ATA/Errors.cs: * DiscImageChef/Commands/DeviceInfo.cs: * DiscImageChef.Devices/Linux/Command.cs: * DiscImageChef.Devices/Device/Commands.cs: * DiscImageChef.Devices/Device/AtaCommands.cs: * DiscImageChef.Devices/Device/Constructor.cs: * DiscImageChef.Devices/Device/AtapiCommands.cs: * DiscImageChef.Devices/DiscImageChef.Devices.csproj: * DiscImageChef.Decoders/DiscImageChef.Decoders.csproj: Moved ATA register definition to a more common place. * DiscImageChef.Decoders/SCSI/Sense.cs: Added information from SAT-4.
This commit is contained in:
111
ATA/Errors.cs
Normal file
111
ATA/Errors.cs
Normal file
@@ -0,0 +1,111 @@
|
|||||||
|
// /***************************************************************************
|
||||||
|
// The Disc Image Chef
|
||||||
|
// ----------------------------------------------------------------------------
|
||||||
|
//
|
||||||
|
// Filename : Errors.cs
|
||||||
|
// Version : 1.0
|
||||||
|
// Author(s) : Natalia Portillo
|
||||||
|
//
|
||||||
|
// Component : Component
|
||||||
|
//
|
||||||
|
// Revision : $Revision$
|
||||||
|
// Last change by : $Author$
|
||||||
|
// Date : $Date$
|
||||||
|
//
|
||||||
|
// --[ Description ] ----------------------------------------------------------
|
||||||
|
//
|
||||||
|
// Description
|
||||||
|
//
|
||||||
|
// --[ License ] --------------------------------------------------------------
|
||||||
|
//
|
||||||
|
// This program is free software: you can redistribute it and/or modify
|
||||||
|
// it under the terms of the GNU General Public License as
|
||||||
|
// published by the Free Software Foundation, either version 3 of the
|
||||||
|
// License, or (at your option) any later version.
|
||||||
|
//
|
||||||
|
// This program 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 General Public License for more details.
|
||||||
|
//
|
||||||
|
// You should have received a copy of the GNU General Public License
|
||||||
|
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
//
|
||||||
|
// ----------------------------------------------------------------------------
|
||||||
|
// Copyright (C) 2011-2015 Claunia.com
|
||||||
|
// ****************************************************************************/
|
||||||
|
// //$Id$
|
||||||
|
using System;
|
||||||
|
|
||||||
|
namespace DiscImageChef.Decoders.ATA
|
||||||
|
{
|
||||||
|
public struct AtaRegistersCHS
|
||||||
|
{
|
||||||
|
public byte feature;
|
||||||
|
public byte sectorCount;
|
||||||
|
public byte sector;
|
||||||
|
public byte cylinderLow;
|
||||||
|
public byte cylinderHigh;
|
||||||
|
public byte deviceHead;
|
||||||
|
public byte command;
|
||||||
|
}
|
||||||
|
|
||||||
|
public struct AtaRegistersLBA28
|
||||||
|
{
|
||||||
|
public byte feature;
|
||||||
|
public byte sectorCount;
|
||||||
|
public byte lbaLow;
|
||||||
|
public byte lbaMid;
|
||||||
|
public byte lbaHigh;
|
||||||
|
public byte deviceHead;
|
||||||
|
public byte command;
|
||||||
|
}
|
||||||
|
|
||||||
|
public struct AtaRegistersLBA48
|
||||||
|
{
|
||||||
|
public ushort feature;
|
||||||
|
public ushort sectorCount;
|
||||||
|
public ushort lbaLow;
|
||||||
|
public ushort lbaMid;
|
||||||
|
public ushort lbaHigh;
|
||||||
|
public byte deviceHead;
|
||||||
|
public byte command;
|
||||||
|
}
|
||||||
|
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@@ -1,3 +1,12 @@
|
|||||||
|
2015-11-23 Natalia Portillo <claunia@claunia.com>
|
||||||
|
|
||||||
|
* ATA/Errors.cs:
|
||||||
|
* DiscImageChef.Decoders.csproj:
|
||||||
|
Moved ATA register definition to a more common place.
|
||||||
|
|
||||||
|
* SCSI/Sense.cs:
|
||||||
|
Added information from SAT-4.
|
||||||
|
|
||||||
2015-11-23 Natalia Portillo <claunia@claunia.com>
|
2015-11-23 Natalia Portillo <claunia@claunia.com>
|
||||||
|
|
||||||
* SCSI/Sense.cs:
|
* SCSI/Sense.cs:
|
||||||
|
|||||||
@@ -83,6 +83,7 @@
|
|||||||
<Compile Include="SCSI\MMC\Features.cs" />
|
<Compile Include="SCSI\MMC\Features.cs" />
|
||||||
<Compile Include="SCSI\DiscStructureCapabilities.cs" />
|
<Compile Include="SCSI\DiscStructureCapabilities.cs" />
|
||||||
<Compile Include="SCSI\Sense.cs" />
|
<Compile Include="SCSI\Sense.cs" />
|
||||||
|
<Compile Include="ATA\Errors.cs" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
|
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|||||||
@@ -38,6 +38,7 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using DiscImageChef.Decoders.ATA;
|
||||||
|
|
||||||
namespace DiscImageChef.Decoders.SCSI
|
namespace DiscImageChef.Decoders.SCSI
|
||||||
{
|
{
|
||||||
@@ -621,9 +622,19 @@ namespace DiscImageChef.Decoders.SCSI
|
|||||||
throw new NotImplementedException("Check OSD");
|
throw new NotImplementedException("Check OSD");
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void DecodeDescriptor09(byte[] descriptor)
|
public static AtaErrorRegistersLBA48 DecodeDescriptor09(byte[] descriptor)
|
||||||
{
|
{
|
||||||
throw new NotImplementedException("Check SAT-3");
|
AtaErrorRegistersLBA48 errorRegisters = new AtaErrorRegistersLBA48();
|
||||||
|
|
||||||
|
errorRegisters.error = descriptor[3];
|
||||||
|
errorRegisters.sectorCount = (ushort)((descriptor[4] << 8) + descriptor[5]);
|
||||||
|
errorRegisters.lbaLow = (ushort)((descriptor[6] << 8) + descriptor[7]);
|
||||||
|
errorRegisters.lbaMid = (ushort)((descriptor[8] << 8) + descriptor[9]);
|
||||||
|
errorRegisters.lbaHigh = (ushort)((descriptor[10] << 8) + descriptor[11]);
|
||||||
|
errorRegisters.deviceHead = descriptor[12];
|
||||||
|
errorRegisters.status = descriptor[13];
|
||||||
|
|
||||||
|
return errorRegisters;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void DecodeDescriptor0B(byte[] descriptor)
|
public static void DecodeDescriptor0B(byte[] descriptor)
|
||||||
|
|||||||
Reference in New Issue
Block a user