REFACTOR: Fixed MOST name inconsistencies.

This commit is contained in:
2017-12-20 17:15:26 +00:00
parent 542520f5cd
commit a4650c61aa
428 changed files with 16205 additions and 16320 deletions

View File

@@ -69,7 +69,7 @@ namespace DiscImageChef.Devices
senseBuffer = new byte[32];
bool sense;
cdb[0] = (byte)ScsiCommands.Adaptec_Translate;
cdb[0] = (byte)ScsiCommands.AdaptecTranslate;
cdb[1] = (byte)((lba & 0x1F0000) >> 16);
cdb[2] = (byte)((lba & 0xFF00) >> 8);
cdb[3] = (byte)(lba & 0xFF);
@@ -115,7 +115,7 @@ namespace DiscImageChef.Devices
senseBuffer = new byte[32];
bool sense;
cdb[0] = (byte)ScsiCommands.Adaptec_SetErrorThreshold;
cdb[0] = (byte)ScsiCommands.AdaptecSetErrorThreshold;
if(drive1) cdb[1] += 0x20;
cdb[4] = 1;
@@ -157,7 +157,7 @@ namespace DiscImageChef.Devices
senseBuffer = new byte[32];
bool sense;
cdb[0] = (byte)ScsiCommands.Adaptec_Translate;
cdb[0] = (byte)ScsiCommands.AdaptecTranslate;
if(drive1) cdb[1] += 0x20;
cdb[4] = (byte)buffer.Length;
@@ -187,7 +187,7 @@ namespace DiscImageChef.Devices
senseBuffer = new byte[32];
bool sense;
cdb[0] = (byte)ScsiCommands.Adaptec_WriteBuffer;
cdb[0] = (byte)ScsiCommands.AdaptecWriteBuffer;
lastError = SendScsiCommand(cdb, ref oneKBuffer, out senseBuffer, timeout, ScsiDirection.Out, out duration,
out sense);
@@ -212,7 +212,7 @@ namespace DiscImageChef.Devices
senseBuffer = new byte[32];
bool sense;
cdb[0] = (byte)ScsiCommands.Adaptec_ReadBuffer;
cdb[0] = (byte)ScsiCommands.AdaptecReadBuffer;
lastError = SendScsiCommand(cdb, ref buffer, out senseBuffer, timeout, ScsiDirection.In, out duration,
out sense);

View File

@@ -51,7 +51,7 @@ namespace DiscImageChef.Devices
senseBuffer = new byte[32];
bool sense;
cdb[0] = (byte)ScsiCommands.Archive_RequestBlockAddress;
cdb[0] = (byte)ScsiCommands.ArchiveRequestBlockAddress;
cdb[1] = (byte)((lba & 0x1F0000) >> 16);
cdb[2] = (byte)((lba & 0xFF00) >> 8);
cdb[3] = (byte)(lba & 0xFF);
@@ -94,7 +94,7 @@ namespace DiscImageChef.Devices
senseBuffer = new byte[32];
bool sense;
cdb[0] = (byte)ScsiCommands.Archive_SeekBlock;
cdb[0] = (byte)ScsiCommands.ArchiveSeekBlock;
cdb[1] = (byte)((lba & 0x1F0000) >> 16);
cdb[2] = (byte)((lba & 0xFF00) >> 8);
cdb[3] = (byte)(lba & 0xFF);

View File

@@ -72,7 +72,7 @@ namespace DiscImageChef.Devices
senseBuffer = new byte[32];
bool sense;
cdb[0] = (byte)ScsiCommands.Certance_ParkUnpark;
cdb[0] = (byte)ScsiCommands.CertanceParkUnpark;
if(park) cdb[4] = 1;
lastError = SendScsiCommand(cdb, ref buffer, out senseBuffer, timeout, ScsiDirection.None, out duration,

View File

@@ -96,7 +96,7 @@ namespace DiscImageChef.Devices
Array.Copy(firstHalfBytes, 0, buffer, 1, 8);
Array.Copy(secondHalfBytes, 0, buffer, 9, 8);
cdb[0] = (byte)ScsiCommands.Fujitsu_Display;
cdb[0] = (byte)ScsiCommands.FujitsuDisplay;
cdb[6] = (byte)buffer.Length;
lastError = SendScsiCommand(cdb, ref buffer, out senseBuffer, timeout, ScsiDirection.Out, out duration,

View File

@@ -54,7 +54,7 @@ namespace DiscImageChef.Devices
buffer = new byte[2064 * transferLength];
bool sense;
cdb[0] = (byte)ScsiCommands.HlDtSt_Vendor;
cdb[0] = (byte)ScsiCommands.HlDtStVendor;
cdb[1] = 0x48;
cdb[2] = 0x49;
cdb[3] = 0x54;

View File

@@ -48,10 +48,10 @@ namespace DiscImageChef.Devices
/// <param name="pba">If set to <c>true</c> address contain physical block address.</param>
/// <param name="timeout">Timeout in seconds.</param>
/// <param name="duration">Duration in milliseconds it took for the device to execute the command.</param>
public bool HPReadLong(out byte[] buffer, out byte[] senseBuffer, bool relAddr, uint address, ushort blockBytes,
public bool HpReadLong(out byte[] buffer, out byte[] senseBuffer, bool relAddr, uint address, ushort blockBytes,
bool pba, uint timeout, out double duration)
{
return HPReadLong(out buffer, out senseBuffer, relAddr, address, 0, blockBytes, pba, false, timeout,
return HpReadLong(out buffer, out senseBuffer, relAddr, address, 0, blockBytes, pba, false, timeout,
out duration);
}
@@ -69,7 +69,7 @@ namespace DiscImageChef.Devices
/// <param name="sectorCount">If set to <c>true</c> <paramref name="transferLen"/> is a count of secors to read. Otherwise it will be ignored</param>
/// <param name="timeout">Timeout in seconds.</param>
/// <param name="duration">Duration in milliseconds it took for the device to execute the command.</param>
public bool HPReadLong(out byte[] buffer, out byte[] senseBuffer, bool relAddr, uint address,
public bool HpReadLong(out byte[] buffer, out byte[] senseBuffer, bool relAddr, uint address,
ushort transferLen, ushort blockBytes, bool pba, bool sectorCount, uint timeout,
out double duration)
{

View File

@@ -51,7 +51,7 @@ namespace DiscImageChef.Devices
byte[] buffer = new byte[0];
bool sense;
cdb[0] = (byte)ScsiCommands.Kreon_Command;
cdb[0] = (byte)ScsiCommands.KreonCommand;
cdb[1] = 0x08;
cdb[2] = 0x01;
cdb[3] = 0x01;
@@ -116,7 +116,7 @@ namespace DiscImageChef.Devices
byte[] buffer = new byte[0];
bool sense;
cdb[0] = (byte)ScsiCommands.Kreon_Command;
cdb[0] = (byte)ScsiCommands.KreonCommand;
cdb[1] = 0x08;
cdb[2] = 0x01;
cdb[3] = 0x11;
@@ -148,7 +148,7 @@ namespace DiscImageChef.Devices
bool sense;
features = 0;
cdb[0] = (byte)ScsiCommands.Kreon_Command;
cdb[0] = (byte)ScsiCommands.KreonCommand;
cdb[1] = 0x08;
cdb[2] = 0x01;
cdb[3] = 0x10;
@@ -178,7 +178,7 @@ namespace DiscImageChef.Devices
features |= KreonFeatures.WxripperUnlock360;
break;
case 0x2001:
features |= KreonFeatures.DecryptSS360;
features |= KreonFeatures.DecryptSs360;
break;
case 0x2101:
features |= KreonFeatures.ChallengeResponse360;
@@ -190,7 +190,7 @@ namespace DiscImageChef.Devices
features |= KreonFeatures.WxripperUnlock;
break;
case 0x2002:
features |= KreonFeatures.DecryptSS;
features |= KreonFeatures.DecryptSs;
break;
case 0x2102:
features |= KreonFeatures.ChallengeResponse;
@@ -215,7 +215,7 @@ namespace DiscImageChef.Devices
/// <param name="timeout">Timeout.</param>
/// <param name="duration">Duration.</param>
/// <param name="buffer">The SS sector.</param>
public bool KreonExtractSS(out byte[] buffer, out byte[] senseBuffer, uint timeout, out double duration,
public bool KreonExtractSs(out byte[] buffer, out byte[] senseBuffer, uint timeout, out double duration,
byte requestNumber = 0x00)
{
buffer = new byte[2048];
@@ -223,7 +223,7 @@ namespace DiscImageChef.Devices
senseBuffer = new byte[32];
bool sense;
cdb[0] = (byte)ScsiCommands.Kreon_SS_Command;
cdb[0] = (byte)ScsiCommands.KreonSsCommand;
cdb[1] = 0x00;
cdb[2] = 0xFF;
cdb[3] = 0x02;

View File

@@ -76,9 +76,9 @@ namespace DiscImageChef.Devices
/// <param name="timeout">Timeout in seconds.</param>
/// <param name="duration">Duration in milliseconds it took for the device to execute the command.</param>
/// <param name="startingFeatureNumber">Starting Feature number.</param>
/// <param name="RT">Return type, <see cref="MmcGetConfigurationRt"/>.</param>
/// <param name="rt">Return type, <see cref="MmcGetConfigurationRt"/>.</param>
public bool GetConfiguration(out byte[] buffer, out byte[] senseBuffer, ushort startingFeatureNumber,
MmcGetConfigurationRt RT, uint timeout, out double duration)
MmcGetConfigurationRt rt, uint timeout, out double duration)
{
senseBuffer = new byte[32];
byte[] cdb = new byte[10];
@@ -86,7 +86,7 @@ namespace DiscImageChef.Devices
bool sense;
cdb[0] = (byte)ScsiCommands.GetConfiguration;
cdb[1] = (byte)((byte)RT & 0x03);
cdb[1] = (byte)((byte)rt & 0x03);
cdb[2] = (byte)((startingFeatureNumber & 0xFF00) >> 8);
cdb[3] = (byte)(startingFeatureNumber & 0xFF);
cdb[7] = (byte)((buffer.Length & 0xFF00) >> 8);
@@ -127,10 +127,10 @@ namespace DiscImageChef.Devices
/// <param name="layerNumber">Medium layer for requested disc structure</param>
/// <param name="timeout">Timeout in seconds.</param>
/// <param name="format">Which disc structure are we requesting</param>
/// <param name="AGID">AGID used in medium copy protection</param>
/// <param name="agid">AGID used in medium copy protection</param>
/// <param name="duration">Duration in milliseconds it took for the device to execute the command.</param>
public bool ReadDiscStructure(out byte[] buffer, out byte[] senseBuffer, MmcDiscStructureMediaType mediaType,
uint address, byte layerNumber, MmcDiscStructureFormat format, byte AGID,
uint address, byte layerNumber, MmcDiscStructureFormat format, byte agid,
uint timeout, out double duration)
{
senseBuffer = new byte[32];
@@ -148,7 +148,7 @@ namespace DiscImageChef.Devices
cdb[7] = (byte)format;
cdb[8] = (byte)((buffer.Length & 0xFF00) >> 8);
cdb[9] = (byte)(buffer.Length & 0xFF);
cdb[10] = (byte)((AGID & 0x03) << 6);
cdb[10] = (byte)((agid & 0x03) << 6);
lastError = SendScsiCommand(cdb, ref buffer, out senseBuffer, timeout, ScsiDirection.In, out duration,
out sense);
@@ -193,14 +193,14 @@ namespace DiscImageChef.Devices
/// <returns><c>true</c> if the command failed and <paramref name="senseBuffer"/> contains the sense buffer.</returns>
/// <param name="buffer">Buffer where the SCSI READ TOC/PMA/ATIP response will be stored</param>
/// <param name="senseBuffer">Sense buffer.</param>
/// <param name="MSF">If <c>true</c>, request data in MM:SS:FF units, otherwise, in blocks</param>
/// <param name="msf">If <c>true</c>, request data in MM:SS:FF units, otherwise, in blocks</param>
/// <param name="track">Start TOC from this track</param>
/// <param name="timeout">Timeout in seconds.</param>
/// <param name="duration">Duration in milliseconds it took for the device to execute the command.</param>
public bool ReadToc(out byte[] buffer, out byte[] senseBuffer, bool MSF, byte track, uint timeout,
public bool ReadToc(out byte[] buffer, out byte[] senseBuffer, bool msf, byte track, uint timeout,
out double duration)
{
return ReadTocPmaAtip(out buffer, out senseBuffer, MSF, 0, track, timeout, out duration);
return ReadTocPmaAtip(out buffer, out senseBuffer, msf, 0, track, timeout, out duration);
}
/// <summary>
@@ -222,13 +222,13 @@ namespace DiscImageChef.Devices
/// <returns><c>true</c> if the command failed and <paramref name="senseBuffer"/> contains the sense buffer.</returns>
/// <param name="buffer">Buffer where the SCSI READ TOC/PMA/ATIP response will be stored</param>
/// <param name="senseBuffer">Sense buffer.</param>
/// <param name="MSF">If <c>true</c>, request data in MM:SS:FF units, otherwise, in blocks</param>
/// <param name="msf">If <c>true</c>, request data in MM:SS:FF units, otherwise, in blocks</param>
/// <param name="timeout">Timeout in seconds.</param>
/// <param name="duration">Duration in milliseconds it took for the device to execute the command.</param>
public bool ReadSessionInfo(out byte[] buffer, out byte[] senseBuffer, bool MSF, uint timeout,
public bool ReadSessionInfo(out byte[] buffer, out byte[] senseBuffer, bool msf, uint timeout,
out double duration)
{
return ReadTocPmaAtip(out buffer, out senseBuffer, MSF, 1, 0, timeout, out duration);
return ReadTocPmaAtip(out buffer, out senseBuffer, msf, 1, 0, timeout, out duration);
}
/// <summary>
@@ -291,12 +291,12 @@ namespace DiscImageChef.Devices
/// <returns><c>true</c> if the command failed and <paramref name="senseBuffer"/> contains the sense buffer.</returns>
/// <param name="buffer">Buffer where the SCSI READ TOC/PMA/ATIP response will be stored</param>
/// <param name="senseBuffer">Sense buffer.</param>
/// <param name="MSF">If <c>true</c>, request data in MM:SS:FF units, otherwise, in blocks</param>
/// <param name="msf">If <c>true</c>, request data in MM:SS:FF units, otherwise, in blocks</param>
/// <param name="format">What structure is requested</param>
/// <param name="trackSessionNumber">Track/Session number</param>
/// <param name="timeout">Timeout in seconds.</param>
/// <param name="duration">Duration in milliseconds it took for the device to execute the command.</param>
public bool ReadTocPmaAtip(out byte[] buffer, out byte[] senseBuffer, bool MSF, byte format,
public bool ReadTocPmaAtip(out byte[] buffer, out byte[] senseBuffer, bool msf, byte format,
byte trackSessionNumber, uint timeout, out double duration)
{
senseBuffer = new byte[32];
@@ -308,7 +308,7 @@ namespace DiscImageChef.Devices
else tmpBuffer = new byte[1024];
cdb[0] = (byte)ScsiCommands.ReadTocPmaAtip;
if(MSF) cdb[1] = 0x02;
if(msf) cdb[1] = 0x02;
cdb[2] = (byte)(format & 0x0F);
cdb[6] = trackSessionNumber;
cdb[7] = (byte)((tmpBuffer.Length & 0xFF00) >> 8);
@@ -404,17 +404,17 @@ namespace DiscImageChef.Devices
/// <param name="transferLength">How many blocks to read.</param>
/// <param name="blockSize">Block size.</param>
/// <param name="expectedSectorType">Expected sector type.</param>
/// <param name="DAP">If set to <c>true</c> CD-DA should be modified by mute and interpolation</param>
/// <param name="dap">If set to <c>true</c> CD-DA should be modified by mute and interpolation</param>
/// <param name="relAddr">If set to <c>true</c> address is relative to current position.</param>
/// <param name="sync">If set to <c>true</c> we request the sync bytes for data sectors.</param>
/// <param name="headerCodes">Header codes.</param>
/// <param name="userData">If set to <c>true</c> we request the user data.</param>
/// <param name="edcEcc">If set to <c>true</c> we request the EDC/ECC fields for data sectors.</param>
/// <param name="C2Error">C2 error options.</param>
/// <param name="c2Error">C2 error options.</param>
/// <param name="subchannel">Subchannel selection.</param>
public bool ReadCd(out byte[] buffer, out byte[] senseBuffer, uint lba, uint blockSize, uint transferLength,
MmcSectorTypes expectedSectorType, bool DAP, bool relAddr, bool sync,
MmcHeaderCodes headerCodes, bool userData, bool edcEcc, MmcErrorField C2Error,
MmcSectorTypes expectedSectorType, bool dap, bool relAddr, bool sync,
MmcHeaderCodes headerCodes, bool userData, bool edcEcc, MmcErrorField c2Error,
MmcSubchannel subchannel, uint timeout, out double duration)
{
senseBuffer = new byte[32];
@@ -423,7 +423,7 @@ namespace DiscImageChef.Devices
cdb[0] = (byte)ScsiCommands.ReadCd;
cdb[1] = (byte)((byte)expectedSectorType << 2);
if(DAP) cdb[1] += 0x02;
if(dap) cdb[1] += 0x02;
if(relAddr) cdb[1] += 0x01;
cdb[2] = (byte)((lba & 0xFF000000) >> 24);
cdb[3] = (byte)((lba & 0xFF0000) >> 16);
@@ -432,7 +432,7 @@ namespace DiscImageChef.Devices
cdb[6] = (byte)((transferLength & 0xFF0000) >> 16);
cdb[7] = (byte)((transferLength & 0xFF00) >> 8);
cdb[8] = (byte)(transferLength & 0xFF);
cdb[9] = (byte)((byte)C2Error << 1);
cdb[9] = (byte)((byte)c2Error << 1);
cdb[9] += (byte)((byte)headerCodes << 5);
if(sync) cdb[9] += 0x80;
if(userData) cdb[9] += 0x10;
@@ -462,16 +462,16 @@ namespace DiscImageChef.Devices
/// <param name="endMsf">End MM:SS:FF of read encoded as 0x00MMSSFF.</param>
/// <param name="blockSize">Block size.</param>
/// <param name="expectedSectorType">Expected sector type.</param>
/// <param name="DAP">If set to <c>true</c> CD-DA should be modified by mute and interpolation</param>
/// <param name="dap">If set to <c>true</c> CD-DA should be modified by mute and interpolation</param>
/// <param name="sync">If set to <c>true</c> we request the sync bytes for data sectors.</param>
/// <param name="headerCodes">Header codes.</param>
/// <param name="userData">If set to <c>true</c> we request the user data.</param>
/// <param name="edcEcc">If set to <c>true</c> we request the EDC/ECC fields for data sectors.</param>
/// <param name="C2Error">C2 error options.</param>
/// <param name="c2Error">C2 error options.</param>
/// <param name="subchannel">Subchannel selection.</param>
public bool ReadCdMsf(out byte[] buffer, out byte[] senseBuffer, uint startMsf, uint endMsf, uint blockSize,
MmcSectorTypes expectedSectorType, bool DAP, bool sync, MmcHeaderCodes headerCodes,
bool userData, bool edcEcc, MmcErrorField C2Error, MmcSubchannel subchannel, uint timeout,
MmcSectorTypes expectedSectorType, bool dap, bool sync, MmcHeaderCodes headerCodes,
bool userData, bool edcEcc, MmcErrorField c2Error, MmcSubchannel subchannel, uint timeout,
out double duration)
{
senseBuffer = new byte[32];
@@ -480,14 +480,14 @@ namespace DiscImageChef.Devices
cdb[0] = (byte)ScsiCommands.ReadCdMsf;
cdb[1] = (byte)((byte)expectedSectorType << 2);
if(DAP) cdb[1] += 0x02;
if(dap) cdb[1] += 0x02;
cdb[3] = (byte)((startMsf & 0xFF0000) >> 16);
cdb[4] = (byte)((startMsf & 0xFF00) >> 8);
cdb[5] = (byte)(startMsf & 0xFF);
cdb[6] = (byte)((endMsf & 0xFF0000) >> 16);
cdb[7] = (byte)((endMsf & 0xFF00) >> 8);
cdb[8] = (byte)(endMsf & 0xFF);
cdb[9] = (byte)((byte)C2Error << 1);
cdb[9] = (byte)((byte)c2Error << 1);
cdb[9] += (byte)((byte)headerCodes << 5);
if(sync) cdb[9] += 0x80;
if(userData) cdb[9] += 0x10;

View File

@@ -53,7 +53,7 @@ namespace DiscImageChef.Devices
byte[] cdb = new byte[10];
bool sense;
cdb[0] = (byte)ScsiCommands.NEC_ReadCdDa;
cdb[0] = (byte)ScsiCommands.NecReadCdDa;
cdb[2] = (byte)((lba & 0xFF000000) >> 24);
cdb[3] = (byte)((lba & 0xFF0000) >> 16);
cdb[4] = (byte)((lba & 0xFF00) >> 8);

View File

@@ -51,7 +51,7 @@ namespace DiscImageChef.Devices
public bool PlasmonReadLong(out byte[] buffer, out byte[] senseBuffer, bool relAddr, uint address,
ushort blockBytes, bool pba, uint timeout, out double duration)
{
return HPReadLong(out buffer, out senseBuffer, relAddr, address, 0, blockBytes, pba, false, timeout,
return HpReadLong(out buffer, out senseBuffer, relAddr, address, 0, blockBytes, pba, false, timeout,
out duration);
}
@@ -73,7 +73,7 @@ namespace DiscImageChef.Devices
ushort transferLen, ushort blockBytes, bool pba, bool sectorCount, uint timeout,
out double duration)
{
return HPReadLong(out buffer, out senseBuffer, relAddr, address, transferLen, blockBytes, pba, sectorCount,
return HpReadLong(out buffer, out senseBuffer, relAddr, address, transferLen, blockBytes, pba, sectorCount,
timeout, out duration);
}
@@ -94,7 +94,7 @@ namespace DiscImageChef.Devices
byte[] cdb = new byte[10];
bool sense;
cdb[0] = (byte)ScsiCommands.Plasmon_ReadSectorLocation;
cdb[0] = (byte)ScsiCommands.PlasmonReadSectorLocation;
cdb[2] = (byte)((address & 0xFF000000) >> 24);
cdb[3] = (byte)((address & 0xFF0000) >> 16);
cdb[4] = (byte)((address & 0xFF00) >> 8);

View File

@@ -123,14 +123,14 @@ namespace DiscImageChef.Devices
/// <param name="senseBuffer">Sense buffer.</param>
/// <param name="timeout">Timeout.</param>
/// <param name="duration">Duration.</param>
public bool PlextorReadEepromCDR(out byte[] buffer, out byte[] senseBuffer, uint timeout, out double duration)
public bool PlextorReadEepromCdr(out byte[] buffer, out byte[] senseBuffer, uint timeout, out double duration)
{
buffer = new byte[256];
senseBuffer = new byte[32];
byte[] cdb = new byte[12];
bool sense;
cdb[0] = (byte)ScsiCommands.Plextor_ReadEeprom;
cdb[0] = (byte)ScsiCommands.PlextorReadEeprom;
cdb[8] = 1;
lastError = SendScsiCommand(cdb, ref buffer, out senseBuffer, timeout, ScsiDirection.In, out duration,
@@ -157,7 +157,7 @@ namespace DiscImageChef.Devices
byte[] cdb = new byte[12];
bool sense;
cdb[0] = (byte)ScsiCommands.Plextor_ReadEeprom;
cdb[0] = (byte)ScsiCommands.PlextorReadEeprom;
cdb[8] = 2;
lastError = SendScsiCommand(cdb, ref buffer, out senseBuffer, timeout, ScsiDirection.In, out duration,
@@ -187,7 +187,7 @@ namespace DiscImageChef.Devices
byte[] cdb = new byte[12];
bool sense;
cdb[0] = (byte)ScsiCommands.Plextor_ReadEeprom;
cdb[0] = (byte)ScsiCommands.PlextorReadEeprom;
cdb[1] = 1;
cdb[7] = block;
cdb[8] = (byte)((blockSize & 0xFF00) >> 8);
@@ -224,7 +224,7 @@ namespace DiscImageChef.Devices
max = 0;
last = 0;
cdb[0] = (byte)ScsiCommands.Plextor_PoweRec;
cdb[0] = (byte)ScsiCommands.PlextorPoweRec;
cdb[9] = (byte)buf.Length;
lastError = SendScsiCommand(cdb, ref buf, out senseBuffer, timeout, ScsiDirection.In, out duration,
@@ -264,7 +264,7 @@ namespace DiscImageChef.Devices
enabled = false;
speed = 0;
cdb[0] = (byte)ScsiCommands.Plextor_Extend2;
cdb[0] = (byte)ScsiCommands.PlextorExtend2;
cdb[1] = (byte)PlextorSubCommands.GetMode;
cdb[9] = (byte)buf.Length;
@@ -299,7 +299,7 @@ namespace DiscImageChef.Devices
byte[] cdb = new byte[12];
bool sense;
cdb[0] = (byte)ScsiCommands.Plextor_Extend;
cdb[0] = (byte)ScsiCommands.PlextorExtend;
cdb[1] = (byte)PlextorSubCommands.GetMode;
cdb[2] = (byte)PlextorSubCommands.Silent;
cdb[3] = 4;
@@ -329,7 +329,7 @@ namespace DiscImageChef.Devices
byte[] cdb = new byte[12];
bool sense;
cdb[0] = (byte)ScsiCommands.Plextor_Extend;
cdb[0] = (byte)ScsiCommands.PlextorExtend;
cdb[1] = (byte)PlextorSubCommands.GetMode;
cdb[2] = (byte)PlextorSubCommands.GigaRec;
cdb[10] = (byte)buffer.Length;
@@ -359,7 +359,7 @@ namespace DiscImageChef.Devices
byte[] cdb = new byte[12];
bool sense;
cdb[0] = (byte)ScsiCommands.Plextor_Extend;
cdb[0] = (byte)ScsiCommands.PlextorExtend;
cdb[1] = (byte)PlextorSubCommands.GetMode;
cdb[2] = (byte)PlextorSubCommands.VariRec;
cdb[10] = (byte)buffer.Length;
@@ -391,7 +391,7 @@ namespace DiscImageChef.Devices
byte[] cdb = new byte[12];
bool sense;
cdb[0] = (byte)ScsiCommands.Plextor_Extend;
cdb[0] = (byte)ScsiCommands.PlextorExtend;
cdb[2] = (byte)PlextorSubCommands.SecuRec;
cdb[10] = (byte)buffer.Length;
@@ -419,7 +419,7 @@ namespace DiscImageChef.Devices
byte[] cdb = new byte[12];
bool sense;
cdb[0] = (byte)ScsiCommands.Plextor_Extend;
cdb[0] = (byte)ScsiCommands.PlextorExtend;
cdb[1] = (byte)PlextorSubCommands.GetMode;
cdb[2] = (byte)PlextorSubCommands.SpeedRead;
cdb[10] = (byte)buffer.Length;
@@ -448,7 +448,7 @@ namespace DiscImageChef.Devices
byte[] cdb = new byte[12];
bool sense;
cdb[0] = (byte)ScsiCommands.Plextor_Extend;
cdb[0] = (byte)ScsiCommands.PlextorExtend;
cdb[1] = (byte)PlextorSubCommands.GetMode;
cdb[2] = (byte)PlextorSubCommands.SessionHide;
cdb[9] = (byte)buffer.Length;
@@ -478,12 +478,12 @@ namespace DiscImageChef.Devices
byte[] cdb = new byte[12];
bool sense;
cdb[0] = (byte)ScsiCommands.Plextor_Extend;
cdb[0] = (byte)ScsiCommands.PlextorExtend;
cdb[1] = (byte)PlextorSubCommands.GetMode;
cdb[2] = (byte)PlextorSubCommands.BitSet;
cdb[9] = (byte)buffer.Length;
if(dualLayer) cdb[3] = (byte)PlextorSubCommands.BitSetRDL;
if(dualLayer) cdb[3] = (byte)PlextorSubCommands.BitSetRdl;
else cdb[3] = (byte)PlextorSubCommands.BitSetR;
lastError = SendScsiCommand(cdb, ref buffer, out senseBuffer, timeout, ScsiDirection.In, out duration,
@@ -511,7 +511,7 @@ namespace DiscImageChef.Devices
byte[] cdb = new byte[12];
bool sense;
cdb[0] = (byte)ScsiCommands.Plextor_Extend;
cdb[0] = (byte)ScsiCommands.PlextorExtend;
cdb[1] = (byte)PlextorSubCommands.GetMode;
cdb[2] = (byte)PlextorSubCommands.TestWriteDvdPlus;
cdb[10] = (byte)buffer.Length;

View File

@@ -233,13 +233,13 @@ namespace DiscImageChef.Devices
/// <param name="senseBuffer">Sense buffer.</param>
/// <param name="timeout">Timeout in seconds.</param>
/// <param name="duration">Duration in milliseconds it took for the device to execute the command.</param>
/// <param name="DBD">If set to <c>true</c> device MUST not return any block descriptor.</param>
/// <param name="dbd">If set to <c>true</c> device MUST not return any block descriptor.</param>
/// <param name="pageControl">Page control.</param>
/// <param name="pageCode">Page code.</param>
public bool ModeSense6(out byte[] buffer, out byte[] senseBuffer, bool DBD,
public bool ModeSense6(out byte[] buffer, out byte[] senseBuffer, bool dbd,
ScsiModeSensePageControl pageControl, byte pageCode, uint timeout, out double duration)
{
return ModeSense6(out buffer, out senseBuffer, DBD, pageControl, pageCode, 0, timeout, out duration);
return ModeSense6(out buffer, out senseBuffer, dbd, pageControl, pageCode, 0, timeout, out duration);
}
/// <summary>
@@ -250,11 +250,11 @@ namespace DiscImageChef.Devices
/// <param name="senseBuffer">Sense buffer.</param>
/// <param name="timeout">Timeout in seconds.</param>
/// <param name="duration">Duration in milliseconds it took for the device to execute the command.</param>
/// <param name="DBD">If set to <c>true</c> device MUST not return any block descriptor.</param>
/// <param name="dbd">If set to <c>true</c> device MUST not return any block descriptor.</param>
/// <param name="pageControl">Page control.</param>
/// <param name="pageCode">Page code.</param>
/// <param name="subPageCode">Sub-page code.</param>
public bool ModeSense6(out byte[] buffer, out byte[] senseBuffer, bool DBD,
public bool ModeSense6(out byte[] buffer, out byte[] senseBuffer, bool dbd,
ScsiModeSensePageControl pageControl, byte pageCode, byte subPageCode, uint timeout,
out double duration)
{
@@ -264,7 +264,7 @@ namespace DiscImageChef.Devices
bool sense;
cdb[0] = (byte)ScsiCommands.ModeSense;
if(DBD) cdb[1] = 0x08;
if(dbd) cdb[1] = 0x08;
cdb[2] |= (byte)pageControl;
cdb[2] |= (byte)(pageCode & 0x3F);
cdb[3] = subPageCode;
@@ -299,13 +299,13 @@ namespace DiscImageChef.Devices
/// <param name="senseBuffer">Sense buffer.</param>
/// <param name="timeout">Timeout in seconds.</param>
/// <param name="duration">Duration in milliseconds it took for the device to execute the command.</param>
/// <param name="DBD">If set to <c>true</c> device MUST not return any block descriptor.</param>
/// <param name="dbd">If set to <c>true</c> device MUST not return any block descriptor.</param>
/// <param name="pageControl">Page control.</param>
/// <param name="pageCode">Page code.</param>
public bool ModeSense10(out byte[] buffer, out byte[] senseBuffer, bool DBD,
public bool ModeSense10(out byte[] buffer, out byte[] senseBuffer, bool dbd,
ScsiModeSensePageControl pageControl, byte pageCode, uint timeout, out double duration)
{
return ModeSense10(out buffer, out senseBuffer, false, DBD, pageControl, pageCode, 0, timeout,
return ModeSense10(out buffer, out senseBuffer, false, dbd, pageControl, pageCode, 0, timeout,
out duration);
}
@@ -317,14 +317,14 @@ namespace DiscImageChef.Devices
/// <param name="senseBuffer">Sense buffer.</param>
/// <param name="timeout">Timeout in seconds.</param>
/// <param name="duration">Duration in milliseconds it took for the device to execute the command.</param>
/// <param name="DBD">If set to <c>true</c> device MUST not return any block descriptor.</param>
/// <param name="dbd">If set to <c>true</c> device MUST not return any block descriptor.</param>
/// <param name="pageControl">Page control.</param>
/// <param name="pageCode">Page code.</param>
/// <param name="LLBAA">If set means 64-bit LBAs are accepted by the caller.</param>
public bool ModeSense10(out byte[] buffer, out byte[] senseBuffer, bool LLBAA, bool DBD,
/// <param name="llbaa">If set means 64-bit LBAs are accepted by the caller.</param>
public bool ModeSense10(out byte[] buffer, out byte[] senseBuffer, bool llbaa, bool dbd,
ScsiModeSensePageControl pageControl, byte pageCode, uint timeout, out double duration)
{
return ModeSense10(out buffer, out senseBuffer, LLBAA, DBD, pageControl, pageCode, 0, timeout,
return ModeSense10(out buffer, out senseBuffer, llbaa, dbd, pageControl, pageCode, 0, timeout,
out duration);
}
@@ -336,12 +336,12 @@ namespace DiscImageChef.Devices
/// <param name="senseBuffer">Sense buffer.</param>
/// <param name="timeout">Timeout in seconds.</param>
/// <param name="duration">Duration in milliseconds it took for the device to execute the command.</param>
/// <param name="DBD">If set to <c>true</c> device MUST not return any block descriptor.</param>
/// <param name="dbd">If set to <c>true</c> device MUST not return any block descriptor.</param>
/// <param name="pageControl">Page control.</param>
/// <param name="pageCode">Page code.</param>
/// <param name="subPageCode">Sub-page code.</param>
/// <param name="LLBAA">If set means 64-bit LBAs are accepted by the caller.</param>
public bool ModeSense10(out byte[] buffer, out byte[] senseBuffer, bool LLBAA, bool DBD,
/// <param name="llbaa">If set means 64-bit LBAs are accepted by the caller.</param>
public bool ModeSense10(out byte[] buffer, out byte[] senseBuffer, bool llbaa, bool dbd,
ScsiModeSensePageControl pageControl, byte pageCode, byte subPageCode, uint timeout,
out double duration)
{
@@ -351,8 +351,8 @@ namespace DiscImageChef.Devices
bool sense;
cdb[0] = (byte)ScsiCommands.ModeSense10;
if(LLBAA) cdb[1] |= 0x10;
if(DBD) cdb[1] |= 0x08;
if(llbaa) cdb[1] |= 0x10;
if(dbd) cdb[1] |= 0x08;
cdb[2] |= (byte)pageControl;
cdb[2] |= (byte)(pageCode & 0x3F);
cdb[3] = subPageCode;
@@ -472,12 +472,12 @@ namespace DiscImageChef.Devices
/// <returns><c>true</c> if the command failed and <paramref name="senseBuffer"/> contains the sense buffer.</returns>
/// <param name="buffer">Buffer where the SCSI READ CAPACITY response will be stored</param>
/// <param name="senseBuffer">Sense buffer.</param>
/// <param name="RelAddr">Indicates that <paramref name="address"/> is relative to current medium position</param>
/// <param name="address">Address where information is requested from, only valid if <paramref name="PMI"/> is set</param>
/// <param name="PMI">If set, it is requesting partial media capacity</param>
/// <param name="relAddr">Indicates that <paramref name="address"/> is relative to current medium position</param>
/// <param name="address">Address where information is requested from, only valid if <paramref name="pmi"/> is set</param>
/// <param name="pmi">If set, it is requesting partial media capacity</param>
/// <param name="timeout">Timeout in seconds.</param>
/// <param name="duration">Duration in milliseconds it took for the device to execute the command.</param>
public bool ReadCapacity(out byte[] buffer, out byte[] senseBuffer, bool RelAddr, uint address, bool PMI,
public bool ReadCapacity(out byte[] buffer, out byte[] senseBuffer, bool relAddr, uint address, bool pmi,
uint timeout, out double duration)
{
senseBuffer = new byte[32];
@@ -487,10 +487,10 @@ namespace DiscImageChef.Devices
cdb[0] = (byte)ScsiCommands.ReadCapacity;
if(PMI)
if(pmi)
{
cdb[8] = 0x01;
if(RelAddr) cdb[1] = 0x01;
if(relAddr) cdb[1] = 0x01;
cdb[2] = (byte)((address & 0xFF000000) >> 24);
cdb[3] = (byte)((address & 0xFF0000) >> 16);
@@ -526,11 +526,11 @@ namespace DiscImageChef.Devices
/// <returns><c>true</c> if the command failed and <paramref name="senseBuffer"/> contains the sense buffer.</returns>
/// <param name="buffer">Buffer where the SCSI READ CAPACITY(16) response will be stored</param>
/// <param name="senseBuffer">Sense buffer.</param>
/// <param name="address">Address where information is requested from, only valid if <paramref name="PMI"/> is set</param>
/// <param name="PMI">If set, it is requesting partial media capacity</param>
/// <param name="address">Address where information is requested from, only valid if <paramref name="pmi"/> is set</param>
/// <param name="pmi">If set, it is requesting partial media capacity</param>
/// <param name="timeout">Timeout in seconds.</param>
/// <param name="duration">Duration in milliseconds it took for the device to execute the command.</param>
public bool ReadCapacity16(out byte[] buffer, out byte[] senseBuffer, ulong address, bool PMI, uint timeout,
public bool ReadCapacity16(out byte[] buffer, out byte[] senseBuffer, ulong address, bool pmi, uint timeout,
out double duration)
{
senseBuffer = new byte[32];
@@ -541,7 +541,7 @@ namespace DiscImageChef.Devices
cdb[0] = (byte)ScsiCommands.ServiceActionIn;
cdb[1] = (byte)ScsiServiceActions.ReadCapacity16;
if(PMI)
if(pmi)
{
cdb[14] = 0x01;
byte[] temp = BitConverter.GetBytes(address);
@@ -738,10 +738,10 @@ namespace DiscImageChef.Devices
// Prevent overflows
if(buffer.Length > 255)
{
if(platformID != Interop.PlatformID.Win32NT && platformID != Interop.PlatformID.Win32S &&
platformID != Interop.PlatformID.Win32Windows && platformID != Interop.PlatformID.WinCE &&
platformID != Interop.PlatformID.WindowsPhone &&
platformID != Interop.PlatformID.Xbox) lastError = 75;
if(platformId != Interop.PlatformID.Win32NT && platformId != Interop.PlatformID.Win32S &&
platformId != Interop.PlatformID.Win32Windows && platformId != Interop.PlatformID.WinCE &&
platformId != Interop.PlatformID.WindowsPhone &&
platformId != Interop.PlatformID.Xbox) lastError = 75;
else lastError = 111;
error = true;
duration = 0;
@@ -781,10 +781,10 @@ namespace DiscImageChef.Devices
// Prevent overflows
if(buffer.Length > 65535)
{
if(platformID != Interop.PlatformID.Win32NT && platformID != Interop.PlatformID.Win32S &&
platformID != Interop.PlatformID.Win32Windows && platformID != Interop.PlatformID.WinCE &&
platformID != Interop.PlatformID.WindowsPhone &&
platformID != Interop.PlatformID.Xbox) lastError = 75;
if(platformId != Interop.PlatformID.Win32NT && platformId != Interop.PlatformID.Win32S &&
platformId != Interop.PlatformID.Win32Windows && platformId != Interop.PlatformID.WinCE &&
platformId != Interop.PlatformID.WindowsPhone &&
platformId != Interop.PlatformID.Xbox) lastError = 75;
else lastError = 111;
error = true;
duration = 0;

View File

@@ -1004,13 +1004,13 @@ namespace DiscImageChef.Devices
byte[] cdb = new byte[6];
byte[] buffer = new byte[0];
bool sense;
byte[] count_b = BitConverter.GetBytes(count);
byte[] countB = BitConverter.GetBytes(count);
cdb[0] = (byte)ScsiCommands.Space;
cdb[1] = (byte)((byte)code & 0x0F);
cdb[2] = count_b[2];
cdb[3] = count_b[1];
cdb[4] = count_b[0];
cdb[2] = countB[2];
cdb[3] = countB[1];
cdb[4] = countB[0];
lastError = SendScsiCommand(cdb, ref buffer, out senseBuffer, timeout, ScsiDirection.None, out duration,
out sense);