日本电子维修技术 老吴ARCO 源代码
namespace ExpandCapacity
{
using ExpandCapacity.My;
using Microsoft.VisualBasic;
using Microsoft.VisualBasic.CompilerServices;
using System;
using System.Runtime.CompilerServices;
using System.Windows.Forms;
[StandardModule]
internal sealed class ARCO
{
public static string AdjTrackWrite6BStr = "";
public static bool AltDCM;
public static byte[] ARCO46Data;
public static byte[] ARCO46Data1;
public static string[] ARCO46ParametersModuleName;
public static byte[] ARCO4AData;
public static byte[] ARCO4AData1;
public static byte[] ARCO69Data;
public static byte[] ARCO69Data1;
public static string[] ARCO69ParametersModuleName;
public static byte[] ARCO6AData;
public static byte[] ARCO6AData1;
public static string[] ARCO6AParametersModuleName;
public static byte[] ARCO6BData;
public static byte[] ARCO6BData1;
public static string[] ARCO6BParametersModuleName;
public static byte[] ARCO6FData;
public static byte[] ARCO6FData1;
public static string[] ARCO6FParametersModuleName;
public static byte[] ARCO70Data;
public static byte[] ARCO70Data1;
public static CheckBox[] ArcoCounter = new CheckBox[] { MyProject.Forms.CacheOverlay.Ahead0Cbx, MyProject.Forms.CacheOverlay.Ahead1Cbx, MyProject.Forms.CacheOverlay.Ahead2Cbx, MyProject.Forms.CacheOverlay.Ahead3Cbx, MyProject.Forms.CacheOverlay.Ahead4Cbx, MyProject.Forms.CacheOverlay.Ahead5Cbx, MyProject.Forms.CacheOverlay.Ahead6Cbx, MyProject.Forms.CacheOverlay.Ahead7Cbx };
public static string ARCOFilePath = "";
public static string ARCOParameters = "";
public static string[] ARCOSearchParamters;
public static string CalibrateCodeName = "";
public static string CalibrateCommand = "";
public static string CalibrateHeadDCMStr = "";
public static string CalibrateMediaDCMStr = "";
public static string CalibrateName = "";
public static string ChamberTemp6AStr = "";
public static string ChamberTemp6BStr = "";
public static string ChampTempStr = "";
public static string CurrentARCOTestNameStr = "";
public static byte[] DCMData;
public static byte[] DCMFrom47;
public static string DirveTemp6AStr = "";
public static string DriveTemp6BStr = "";
public static string EccMode6BStr = "";
public static string ErrorCode6AStr = "";
public static string ErrorCode6BStr = "";
public static string ErrorCountExit6BStr = "";
public static string ERRThersh116BStr = "";
public static string ERRThersh126BStr = "";
public static string Flags6BStr = "";
public static bool Found46Parameters;
public static bool Found4AParameters;
public static bool Found69Parameters;
public static bool Found6AParameters;
public static bool Found6BParameters;
public static bool Found6FParameters;
public static bool Found70Parameters;
public static bool Get69LogOK;
public static bool Get6ALogOK;
public static bool Get6BLogOK;
public static string Head0GAPValue6A = "";
public static string Head0OverShoot6BStr = "";
public static string Head0SPTMMSResult6BStr = "";
public static string Head0TPIAfter16BStr = "";
public static string Head0TPIAfter26BStr = "";
public static string Head0TPIAfter36BStr = "";
public static string Head0TPIAfter46BStr = "";
public static string Head0TPIAfter56BStr = "";
public static string Head0TPIAfter66BStr = "";
public static string Head0TPIAfter76BStr = "";
public static string Head0TPIBefore16BStr = "";
public static string Head0TPIBefore26BStr = "";
public static string Head0TPIBefore36BStr = "";
public static string Head0TPIBefore46BStr = "";
public static string Head0TPIBefore56BStr = "";
public static string Head0TPIBefore66BStr = "";
public static string Head0TPIBefore76BStr = "";
public static string Head0TPICode6BStr = "";
public static string Head0ZoneValue6A = "";
public static string Head1GAPValue6A = "";
public static string Head1OverShoot6BStr = "";
public static string Head1SPTMMSResult6BStr = "";
public static string Head1TPIAfter16BStr = "";
public static string Head1TPIAfter26BStr = "";
public static string Head1TPIAfter36BStr = "";
public static string Head1TPIAfter46BStr = "";
public static string Head1TPIAfter56BStr = "";
public static string Head1TPIAfter66BStr = "";
public static string Head1TPIAfter76BStr = "";
public static string Head1TPIBefore16BStr = "";
public static string Head1TPIBefore26BStr = "";
public static string Head1TPIBefore36BStr = "";
public static string Head1TPIBefore46BStr = "";
public static string Head1TPIBefore56BStr = "";
public static string Head1TPIBefore66BStr = "";
public static string Head1TPIBefore76BStr = "";
public static string Head1TPICode6BStr = "";
public static string Head1ZoneValue6A = "";
public static string Head2GAPValue6A = "";
public static string Head2OverShoot6BStr = "";
public static string Head2SPTMMSResult6BStr = "";
public static string Head2TPIAfter16BStr = "";
public static string Head2TPIAfter26BStr = "";
public static string Head2TPIAfter36BStr = "";
public static string Head2TPIAfter46BStr = "";
public static string Head2TPIAfter56BStr = "";
public static string Head2TPIAfter66BStr = "";
public static string Head2TPIAfter76BStr = "";
public static string Head2TPIBefore16BStr = "";
public static string Head2TPIBefore26BStr = "";
public static string Head2TPIBefore36BStr = "";
public static string Head2TPIBefore46BStr = "";
public static string Head2TPIBefore56BStr = "";
public static string Head2TPIBefore66BStr = "";
public static string Head2TPIBefore76BStr = "";
public static string Head2TPICode6BStr = "";
public static string Head2ZoneValue6A = "";
public static string Head3GAPValue6A = "";
public static string Head3OverShoot6BStr = "";
public static string Head3SPTMMSResult6BStr = "";
public static string Head3TPIAfter16BStr = "";
public static string Head3TPIAfter26BStr = "";
public static string Head3TPIAfter36BStr = "";
public static string Head3TPIAfter46BStr = "";
public static string Head3TPIAfter56BStr = "";
public static string Head3TPIAfter66BStr = "";
public static string Head3TPIAfter76BStr = "";
public static string Head3TPIBefore16BStr = "";
public static string Head3TPIBefore26BStr = "";
public static string Head3TPIBefore36BStr = "";
public static string Head3TPIBefore46BStr = "";
public static string Head3TPIBefore56BStr = "";
public static string Head3TPIBefore66BStr = "";
public static string Head3TPIBefore76BStr = "";
public static string Head3TPICode6BStr = "";
public static string Head3ZoneValue6A = "";
public static string Head4GAPValue6A = "";
public static string Head4OverShoot6BStr = "";
public static string Head4SPTMMSResult6BStr = "";
public static string Head4TPIAfter16BStr = "";
public static string Head4TPIAfter26BStr = "";
public static string Head4TPIAfter36BStr = "";
public static string Head4TPIAfter46BStr = "";
public static string Head4TPIAfter56BStr = "";
public static string Head4TPIAfter66BStr = "";
public static string Head4TPIAfter76BStr = "";
public static string Head4TPIBefore16BStr = "";
public static string Head4TPIBefore26BStr = "";
public static string Head4TPIBefore36BStr = "";
public static string Head4TPIBefore46BStr = "";
public static string Head4TPIBefore56BStr = "";
public static string Head4TPIBefore66BStr = "";
public static string Head4TPIBefore76BStr = "";
public static string Head4TPICode6BStr = "";
public static string Head4ZoneValue6A = "";
public static string Head5GAPValue6A = "";
public static string Head5OverShoot6BStr = "";
public static string Head5SPTMMSResult6BStr = "";
public static string Head5TPIAfter16BStr = "";
public static string Head5TPIAfter26BStr = "";
public static string Head5TPIAfter36BStr = "";
public static string Head5TPIAfter46BStr = "";
public static string Head5TPIAfter56BStr = "";
public static string Head5TPIAfter66BStr = "";
public static string Head5TPIAfter76BStr = "";
public static string Head5TPIBefore16BStr = "";
public static string Head5TPIBefore26BStr = "";
public static string Head5TPIBefore36BStr = "";
public static string Head5TPIBefore46BStr = "";
public static string Head5TPIBefore56BStr = "";
public static string Head5TPIBefore66BStr = "";
public static string Head5TPIBefore76BStr = "";
public static string Head5TPICode6BStr = "";
public static string Head5ZoneValue6A = "";
public static string Head6GAPValue6A = "";
public static string Head6OverShoot6BStr = "";
public static string Head6SPTMMSResult6BStr = "";
public static string Head6TPIAfter16BStr = "";
public static string Head6TPIAfter26BStr = "";
public static string Head6TPIAfter36BStr = "";
public static string Head6TPIAfter46BStr = "";
public static string Head6TPIAfter56BStr = "";
public static string Head6TPIAfter66BStr = "";
public static string Head6TPIAfter76BStr = "";
public static string Head6TPIBefore16BStr = "";
public static string Head6TPIBefore26BStr = "";
public static string Head6TPIBefore36BStr = "";
public static string Head6TPIBefore46BStr = "";
public static string Head6TPIBefore56BStr = "";
public static string Head6TPIBefore66BStr = "";
public static string Head6TPIBefore76BStr = "";
public static string Head6TPICode6BStr = "";
public static string Head6ZoneValue6A = "";
public static string Head7GAPValue6A = "";
public static string Head7OverShoot6BStr = "";
public static string Head7SPTMMSResult6BStr = "";
public static string Head7TPIAfter16BStr = "";
public static string Head7TPIAfter26BStr = "";
public static string Head7TPIAfter36BStr = "";
public static string Head7TPIAfter46BStr = "";
public static string Head7TPIAfter56BStr = "";
public static string Head7TPIAfter66BStr = "";
public static string Head7TPIAfter76BStr = "";
public static string Head7TPIBefore16BStr = "";
public static string Head7TPIBefore26BStr = "";
public static string Head7TPIBefore36BStr = "";
public static string Head7TPIBefore46BStr = "";
public static string Head7TPIBefore56BStr = "";
public static string Head7TPIBefore66BStr = "";
public static string Head7TPIBefore76BStr = "";
public static string Head7TPICode6BStr = "";
public static string Head7ZoneValue6A = "";
public static string HeadDCM6AStr = "";
public static string HeadDCM6BStr = "";
public static byte[] Hexdata;
public static string HexDialogNameStr = "";
public static string HQFormatCapcityStr = "";
public static string[] LogsName;
public static string MaxCyl6BStr = "";
public static string MediaDCM6AStr = "";
public static string MediaDCM6BStr = "";
public static string Parm14DFHStr = "";
public static string Parm86BStr = "";
public static string[] ReadLogNameStatus;
public static string Reserved06AStr = "";
public static string Reserved106AStr = "";
public static string Reserved16AStr = "";
public static string Reserved16bStr = "";
public static string Reserved26AStr = "";
public static string Reserved26BStr = "";
public static string Reserved36AStr = "";
public static string Reserved46AStr = "";
public static string Reserved56AStr = "";
public static string Reserved66AStr = "";
public static string Reserved76AStr = "";
public static string Reserved86AStr = "";
public static string Reserved96AStr = "";
public static string SelectedZoneIndex6BStr = "";
public static string[] ShowBuildARCOParamtersNameStr;
public static byte[] StandardARC0PSTProcessData;
public static byte[] StandardARCOProcessData;
public static byte[] StandardPSTProcessData;
public static string StarttingTPI6BStr = "";
public static string TargeMaxFormatCapacityStr = "";
public static string TestCMD6BStr = "";
public static string TestCommand6AStr = "";
public static string TestState6BStr = "";
public static string TestZones6BStr = "";
public static string VKFCIHeadQualificationTestErrorCodeStr = "";
public static string VKFCIHeadQualificationTestErrorCountHead0 = "";
public static string VKFCIHeadQualificationTestErrorCountHead1 = "";
public static string VKFCIHeadQualificationTestErrorCountHead2 = "";
public static string VKFCIHeadQualificationTestErrorCountHead3 = "";
public static string VKFCIHeadQualificationTestErrorCountHead4 = "";
public static string VKFCIHeadQualificationTestErrorCountHead5 = "";
public static string VKFCIHeadQualificationTestErrorCountHead6 = "";
public static string VKFCIHeadQualificationTestErrorCountHead7 = "";
public static string VKFCIHeadQualificationTestFormatCodeHead0 = "";
public static string VKFCIHeadQualificationTestFormatCodeHead1 = "";
public static string VKFCIHeadQualificationTestFormatCodeHead2 = "";
public static string VKFCIHeadQualificationTestFormatCodeHead3 = "";
public static string VKFCIHeadQualificationTestFormatCodeHead4 = "";
public static string VKFCIHeadQualificationTestFormatCodeHead5 = "";
public static string VKFCIHeadQualificationTestFormatCodeHead6 = "";
public static string VKFCIHeadQualificationTestFormatCodeHead7 = "";
public static string VKFCIHeadQualificationTestSelectCapacityStr = "";
public static string VKFCIHeadQualificationTestStatusStr = "";
public static string VSCErrorInfo6BStr = "";
public static string VSCSwitchFmtExtError6BStr = "";
public static string ZoneMap6AStr = "";
public static string ZoneMap6BStr = "";
public static void ARCOMonitor()
{
int num9 = 0;
string str7 = "";
string str6 = "";
string str = "";
string str5 = "";
string str4 = "";
string str8 = "";
string str3 = "";
string str10 = "";
string str9 = "";
long num = 0L;
long num2 = 0L;
long num3 = 0L;
long num4 = 0L;
long num5 = 0L;
long num6 = 0L;
long num7 = 0L;
long num8 = 0L;
MyProject.Forms.CacheOverlay.CurState1lbl.Text = "CurState:";
MyProject.Forms.CacheOverlay.CurWedgeStart1lbl.Text = "CurWedgeStart:";
MyProject.Forms.CacheOverlay.CurState21lbl.Text = "CurState2:";
MyProject.Forms.CacheOverlay.CurWedegeSize1lbl.Text = "CurWedgeSize:";
MyProject.Forms.CacheOverlay.CurStateMeans1lbl.Text = "CurStateMeans:";
MyProject.Forms.CacheOverlay.CurState2Means1lbl.Text = "CurState2Means:";
MyProject.Forms.CacheOverlay.ActionMeans1lbl.Text = "Action:";
MyProject.Forms.CacheOverlay.ActionStatusMeans1lbl.Text = "Status:";
MyProject.Forms.CacheOverlay.CurLBA1lbl.Text = "CurLBA:";
MyProject.Forms.CacheOverlay.CurVirHd1lbl.Text = "CurVirHd:";
MyProject.Forms.CacheOverlay.CurVirCyl1lbl.Text = "CurVirCyl:";
MyProject.Forms.CacheOverlay.CurZone1lbl.Text = "CurZone:";
MyProject.Forms.CacheOverlay.CurTrkoft1lbl.Text = "CurTrkOft:";
MyProject.Forms.CacheOverlay.PTMID1lbl.Text = "TMID:";
MyProject.Forms.CacheOverlay.ActionCode1lbl.Text = "ActionCode:";
MyProject.Forms.CacheOverlay.TestID1lbl.Text = "TestID:";
MyProject.Forms.CacheOverlay.ExErrCode1lbl.Text = "ExtErrCode:";
MyProject.Forms.CacheOverlay.SenseCode1lbl.Text = "SenseCode:";
MyProject.Forms.CacheOverlay.ActionStatus1lbl.Text = "ActionStatus:";
MyProject.Forms.CacheOverlay.SenseMeans1lbl.Text = "SenseMeans:";
WDSelfscan.SelfscanCodeName = "";
PublicDefine.TaskStop = false;
PublicDefine.TaskStop = true;
if (MyProject.Forms.CacheOverlay.HeadNumlbl.Text != "HeadNum:")
{
num9 = (int) Conversions.ToLong(Strings.Mid(MyProject.Forms.CacheOverlay.HeadNumlbl.Text, 9, Strings.InStr(MyProject.Forms.CacheOverlay.HeadNumlbl.Text, "[", CompareMethod.Binary) - 10));
int num17 = num9 - 1;
for (int i = 0; i <= num17; i++)
{
ArcoCounter[i].Text = "Head:" + Conversions.ToString(i);
ArcoCounter[i].Visible = true;
}
}
while (true)
{
byte[] buffer;
bool flag = false;
WDPassport.SendCommandStr = "";
WDPassport.SendCommandStr = "2780B0D5BE4FC2A0BE4FC2D501000000";
WDPassport.SetSamsungRegVal();
WDPassport.i = 0;
while (ATA.inportbyteVB(ATA.BasePort + 7) != 0x58L)
{
if (WDPassport.i > 0xbb8)
{
flag = false;
break;
}
if (ATA.inportbyteVB(ATA.BasePort + 7) == 0x51L)
{
flag = false;
break;
}
MyProject.Application.DoEvents();
ATA.Sleep(2);
WDPassport.i++;
}
if (ATA.inportbyteVB(ATA.BasePort + 7) == 0x58L)
{
flag = true;
}
else
{
flag = false;
}
if (flag)
{
buffer = new byte[0x200];
WDPassport.i = 0;
do
{
WDPassport.j = ATA.inportwordVB(ATA.BasePort);
buffer[WDPassport.i + 1] = (byte) Math.Round(Conversion.Val("&H" + Strings.Mid(Strings.Right("00000000" + Conversion.Hex(WDPassport.j), 8), 5, 2)));
buffer[WDPassport.i] = (byte) (WDPassport.j & 0xffL);
WDPassport.i += 2;
}
while (WDPassport.i < 0x200);
}
else
{
buffer = new byte[0x200];
}
WDPassport.i = 0;
while (ATA.inportbyteVB(ATA.BasePort + 7) != 80L)
{
if (WDPassport.i > 0xbb8)
{
flag = false;
break;
}
if (ATA.inportbyteVB(ATA.BasePort + 7) == 0x51L)
{
flag = false;
break;
}
MyProject.Application.DoEvents();
ATA.Sleep(2);
WDPassport.i++;
}
if (ATA.inportbyteVB(ATA.BasePort + 7) == 80L)
{
flag = true;
}
else
{
flag = false;
}
if (flag)
{
WDSelfscan.CurStateStr = "";
str7 = "";
WDSelfscan.CurState2Str = "";
str6 = "";
str = "";
str5 = "";
str4 = "";
str8 = "";
str3 = "";
WDSelfscan.PTMIDStr = "";
WDSelfscan.ActionCodeStr = "";
str10 = "";
str9 = "";
WDSelfscan.SenseCodeStr = "";
WDSelfscan.ActionStatusStr = "";
WDSelfscan.SenseMeansStr = "";
WDSelfscan.ActionCodeMeansStr = "";
WDSelfscan.ActionStatusMeansStr = "";
WDSelfscan.CurStateStr = Strings.Right("00" + Conversion.Hex(buffer[0x36]), 2);
MyProject.Forms.CacheOverlay.CurState1lbl.Text = "CurState:" + WDSelfscan.CurStateStr;
str7 = Strings.Right("00" + Conversion.Hex(buffer[0x47]), 2) + Strings.Right("00" + Conversion.Hex(buffer[70]), 2);
MyProject.Forms.CacheOverlay.CurWedgeStart1lbl.Text = "CurWedgeStart:" + str7;
WDSelfscan.CurState2Str = Strings.Right("00" + Conversion.Hex(buffer[0x37]), 2);
MyProject.Forms.CacheOverlay.CurState21lbl.Text = "CurState2:" + WDSelfscan.CurState2Str;
INIFileOperations.GetCurStateMeans();
MyProject.Forms.CacheOverlay.CurStateMeans1lbl.Text = "CurStateMeans:" + WDSelfscan.CurStateMeansStr;
MyProject.Forms.CacheOverlay.CurState2Means1lbl.Text = "CurState2Means:" + WDSelfscan.CurState2MeansStr;
str6 = Strings.Right("00" + Conversion.Hex(buffer[0x49]), 2) + Strings.Right("00" + Conversion.Hex(buffer[0x48]), 2);
MyProject.Forms.CacheOverlay.CurWedegeSize1lbl.Text = "CurWedgeSize:" + str6;
str = Conversions.ToString(Conversions.ToLong("&h" + Strings.Right("00" + Conversion.Hex(buffer[0x3b]), 2) + Strings.Right("00" + Conversion.Hex(buffer[0x3a]), 2) + Strings.Right("00" + Conversion.Hex(buffer[0x39]), 2) + Strings.Right("00" + Conversion.Hex(buffer[0x38]), 2)));
MyProject.Forms.CacheOverlay.CurLBA1lbl.Text = "CurLBA:" + str;
str5 = Conversions.ToString(Conversions.ToLong("&h" + Strings.Right("00" + Conversion.Hex(buffer[0x44]), 2)));
MyProject.Forms.CacheOverlay.CurVirHd1lbl.Text = "CurVirHd:" + str5;
if (MyProject.Forms.CacheOverlay.HeadNumlbl.Text != "HeadNum:")
{
int index = 0;
do
{
if (((index == 0) & (Conversions.ToLong(str5) == index)) & ArcoCounter[index].Visible)
{
num += 1L;
ArcoCounter[index].Text = "Head:" + Conversions.ToString(index) + "=" + Conversions.ToString(num);
}
else if (((index == 1) & (Conversions.ToLong(str5) == index)) & ArcoCounter[index].Visible)
{
num2 += 1L;
ArcoCounter[index].Text = "Head:" + Conversions.ToString(index) + "=" + Conversions.ToString(num2);
}
else if (((index == 2) & (Conversions.ToLong(str5) == index)) & ArcoCounter[index].Visible)
{
num3 += 1L;
ArcoCounter[index].Text = "Head:" + Conversions.ToString(index) + "=" + Conversions.ToString(num3);
}
else if (((index == 3) & (Conversions.ToLong(str5) == index)) & ArcoCounter[index].Visible)
{
num4 += 1L;
ArcoCounter[index].Text = "Head:" + Conversions.ToString(index) + "=" + Conversions.ToString(num4);
}
else if (((index == 4) & (Conversions.ToLong(str5) == index)) & ArcoCounter[index].Visible)
{
num5 += 1L;
ArcoCounter[index].Text = "Head:" + Conversions.ToString(index) + "=" + Conversions.ToString(num5);
}
else if (((index == 5) & (Conversions.ToLong(str5) == index)) & ArcoCounter[index].Visible)
{
num6 += 1L;
ArcoCounter[index].Text = "Head:" + Conversions.ToString(index) + "=" + Conversions.ToString(num6);
}
else if (((index == 6) & (Conversions.ToLong(str5) == index)) & ArcoCounter[index].Visible)
{
num7 += 1L;
ArcoCounter[index].Text = "Head:" + Conversions.ToString(index) + "=" + Conversions.ToString(num7);
}
else if (((index == 7) & (Conversions.ToLong(str5) == index)) & ArcoCounter[index].Visible)
{
num8 += 1L;
ArcoCounter[index].Text = "Head:" + Conversions.ToString(index) + "=" + Conversions.ToString(num8);
}
MyProject.Application.DoEvents();
index++;
}
while (index <= 7);
}
str4 = Strings.Right("00" + Conversion.Hex(buffer[0x43]), 2) + Strings.Right("00" + Conversion.Hex(buffer[0x42]), 2) + Strings.Right("00" + Conversion.Hex(buffer[0x41]), 2) + Strings.Right("00" + Conversion.Hex(buffer[0x40]), 2);
if ((Strings.Mid(str4, 7, 2) != "FF") & (Strings.Mid(str4, 1, 6) == "FFFFFF"))
{
str4 = "-" + Conversions.ToString((long) ((0xffL - Conversions.ToLong("&h" + Strings.Mid(str4, 7, 2))) + 1L));
}
else if (Strings.Mid(str4, 1, 8) == "FFFFFFFF")
{
str4 = "-1";
}
else
{
str4 = Conversions.ToString(Conversions.ToLong("&H" + str4));
}
MyProject.Forms.CacheOverlay.CurVirCyl1lbl.Text = "CurVirCyl:" + str4;
str8 = Conversions.ToString(Conversions.ToLong("&h" + Strings.Right("00" + Conversion.Hex(buffer[0x45]), 2)));
MyProject.Forms.CacheOverlay.CurZone1lbl.Text = "CurZone:" + str8;
str3 = Conversions.ToString(Conversions.ToLong("&h" + Strings.Right("00" + Conversion.Hex(buffer[0x3f]), 2) + Strings.Right("00" + Conversion.Hex(buffer[0x3e]), 2)));
MyProject.Forms.CacheOverlay.CurTrkoft1lbl.Text = "CurTrkOft:" + str3;
WDSelfscan.PTMIDStr = Strings.Right("00" + Conversion.Hex(buffer[0x191]), 2) + Strings.Right("00" + Conversion.Hex(buffer[400]), 2);
MyProject.Forms.CacheOverlay.PTMID1lbl.Text = "TMID:" + WDSelfscan.PTMIDStr;
WDSelfscan.ActionCodeStr = Strings.Right("00" + Conversion.Hex(buffer[0x195]), 2) + Strings.Right("00" + Conversion.Hex(buffer[0x194]), 2);
WDSelfscan.ActionCodeStr = Strings.Right("0000&h" + WDSelfscan.ActionCodeStr, 4);
MyProject.Forms.CacheOverlay.ActionCode1lbl.Text = "ActionCode:" + WDSelfscan.ActionCodeStr;
WDSelfscan.ActionStatusStr = Strings.Right("00" + Conversion.Hex(buffer[0x19b]), 2) + Strings.Right("00" + Conversion.Hex(buffer[410]), 2) + Strings.Right("00" + Conversion.Hex(buffer[0x199]), 2) + Strings.Right("00" + Conversion.Hex(buffer[0x198]), 2);
MyProject.Forms.CacheOverlay.ActionStatus1lbl.Text = "ActionStatus:" + WDSelfscan.ActionStatusStr;
INIFileOperations.GetActionCodeAndActionStatusMeans();
MyProject.Forms.CacheOverlay.ActionMeans1lbl.Text = "Action:" + WDSelfscan.ActionCodeMeansStr;
if (Strings.Trim(WDSelfscan.ActionStatusMeansStr) == "")
{
MyProject.Forms.CacheOverlay.ActionStatusMeans1lbl.Text = "StatusCode Not Defined)";
}
else
{
MyProject.Forms.CacheOverlay.ActionStatusMeans1lbl.Text = "Status:" + WDSelfscan.ActionStatusMeansStr;
}
str10 = Strings.Right("00" + Conversion.Hex(buffer[0x193]), 2) + Strings.Right("00" + Conversion.Hex(buffer[0x192]), 2);
MyProject.Forms.CacheOverlay.TestID1lbl.Text = "TestID:" + str10;
str9 = Strings.Right("00" + Conversion.Hex(buffer[0x197]), 2) + Strings.Right("00" + Conversion.Hex(buffer[0x196]), 2);
MyProject.Forms.CacheOverlay.ExErrCode1lbl.Text = "ExtErrCode:" + str9;
WDSelfscan.SenseCodeStr = Strings.Right("00" + Conversion.Hex(buffer[0x19]), 2) + Strings.Right("00" + Conversion.Hex(buffer[0x18]), 2);
MyProject.Forms.CacheOverlay.SenseCode1lbl.Text = "SenseCode:" + WDSelfscan.SenseCodeStr;
INIFileOperations.GetSenseCodeMeans();
MyProject.Forms.CacheOverlay.SenseMeans1lbl.Text = "SenseMeans:" + WDSelfscan.SenseMeansStr;
if (PublicDefine.UserStop)
{
PublicDefine.UserStop = false;
PublicDefine.TaskStop = false;
Interaction.MsgBox("ARCO 监控被终止!", MsgBoxStyle.Information, PublicDefine.ShowMsgTitle);
WDModules.ShowStr = "";
WDModules.ShowStr = CurrentARCOTestNameStr;
WDModules.ShowStr2 = "";
int num18 = 0x26 - Strings.Len(WDModules.ShowStr);
for (int j = 1; j <= num18; j++)
{
WDModules.ShowStr1 = "";
WDModules.ShowStr1 = ".";
WDModules.ShowStr2 = WDModules.ShowStr2 + WDModules.ShowStr1;
MyProject.Application.DoEvents();
}
MyProject.Forms.CacheOverlay.ARCOLogTxt.Text = MyProject.Forms.CacheOverlay.ARCOLogTxt.Text + WDSelfscan.CurrentSystemDateStr + "" + WDModules.ShowStr + WDModules.ShowStr2 + ":用户终止监控(硬盘仍在执行中)\r\n";
return;
}
if (((WDSelfscan.CurStateStr == "00") & (WDSelfscan.CurState2Str == "00")) & (WDSelfscan.SenseCodeStr == "0000"))
{
WDModules.ShowStr = "";
WDModules.ShowStr = CurrentARCOTestNameStr;
WDModules.ShowStr2 = "";
int num19 = 0x26 - Strings.Len(WDModules.ShowStr);
for (int k = 1; k <= num19; k++)
{
WDModules.ShowStr1 = "";
WDModules.ShowStr1 = ".";
WDModules.ShowStr2 = WDModules.ShowStr2 + WDModules.ShowStr1;
MyProject.Application.DoEvents();
}
WDErrorCode.GetWDErrorCode();
WDSelfscan.CurrentSystemDateStr = "";
WDSelfscan.CurrentSystemDateStr = Conversions.ToString(DateTime.Now);
MyProject.Forms.CacheOverlay.ARCOLogTxt.Text = MyProject.Forms.CacheOverlay.ARCOLogTxt.Text + WDSelfscan.CurrentSystemDateStr + "" + WDModules.ShowStr + WDModules.ShowStr2 + ":结束(" + WDErrorCode.WDErrorCodeMenas + ")\r\n";
PublicDefine.TaskStop = false;
return;
}
if (((WDSelfscan.CurStateStr == "00") & (WDSelfscan.CurState2Str == "00")) & (WDSelfscan.SenseCodeStr != "0000"))
{
WDErrorCode.GetWDErrorCode();
WDModules.ShowStr = "";
WDModules.ShowStr = CurrentARCOTestNameStr;
WDModules.ShowStr2 = "";
int num20 = 0x26 - Strings.Len(WDModules.ShowStr);
for (int m = 1; m <= num20; m++)
{
WDModules.ShowStr1 = "";
WDModules.ShowStr1 = ".";
WDModules.ShowStr2 = WDModules.ShowStr2 + WDModules.ShowStr1;
MyProject.Application.DoEvents();
}
WDSelfscan.CurrentSystemDateStr = "";
WDSelfscan.CurrentSystemDateStr = Conversions.ToString(DateTime.Now);
MyProject.Forms.CacheOverlay.ARCOLogTxt.Text = MyProject.Forms.CacheOverlay.ARCOLogTxt.Text + WDSelfscan.CurrentSystemDateStr + "" + WDModules.ShowStr + WDModules.ShowStr2 + ":失败.(" + WDErrorCode.WDErrorCodeMenas + ")\r\n";
PublicDefine.TaskStop = false;
return;
}
if ((WDSelfscan.CurStateStr == "04") & (WDSelfscan.SenseCodeStr == "0000"))
{
WDModules.ShowStr = "";
WDModules.ShowStr = CurrentARCOTestNameStr;
WDModules.ShowStr2 = "";
int num21 = 0x26 - Strings.Len(WDModules.ShowStr);
for (int n = 1; n <= num21; n++)
{
WDModules.ShowStr1 = "";
WDModules.ShowStr1 = ".";
WDModules.ShowStr2 = WDModules.ShowStr2 + WDModules.ShowStr1;
MyProject.Application.DoEvents();
}
WDErrorCode.GetWDErrorCode();
WDSelfscan.CurrentSystemDateStr = "";
WDSelfscan.CurrentSystemDateStr = Conversions.ToString(DateTime.Now);
MyProject.Forms.CacheOverlay.ARCOLogTxt.Text = MyProject.Forms.CacheOverlay.ARCOLogTxt.Text + WDSelfscan.CurrentSystemDateStr + "" + WDModules.ShowStr + WDModules.ShowStr2 + ":结束.(" + WDErrorCode.WDErrorCodeMenas + ")\r\n";
PublicDefine.TaskStop = false;
return;
}
if (WDSelfscan.SenseCodeStr != "0000")
{
WDModules.ShowStr = "";
WDModules.ShowStr = CurrentARCOTestNameStr;
WDModules.ShowStr2 = "";
int num22 = 0x26 - Strings.Len(WDModules.ShowStr);
for (int num16 = 1; num16 <= num22; num16++)
{
WDModules.ShowStr1 = "";
WDModules.ShowStr1 = ".";
WDModules.ShowStr2 = WDModules.ShowStr2 + WDModules.ShowStr1;
MyProject.Application.DoEvents();
}
WDErrorCode.GetWDErrorCode();
WDSelfscan.CurrentSystemDateStr = "";
WDSelfscan.CurrentSystemDateStr = Conversions.ToString(DateTime.Now);
MyProject.Forms.CacheOverlay.ARCOLogTxt.Text = MyProject.Forms.CacheOverlay.ARCOLogTxt.Text + WDSelfscan.CurrentSystemDateStr + "" + WDModules.ShowStr + WDModules.ShowStr2 + ":失败.(" + WDErrorCode.WDErrorCodeMenas + ")\r\n";
PublicDefine.TaskStop = false;
return;
}
}
ATA.Sleep(1);
MyProject.Application.DoEvents();
}
}
public static void ARCOMonitorAdjust4F()
{
string str7 = "";
string str6 = "";
string str = "";
string str5 = "";
string str4 = "";
string str8 = "";
string str3 = "";
string str10 = "";
string str9 = "";
MyProject.Forms.CacheOverlay.CurState1lbl.Text = "CurState:";
MyProject.Forms.CacheOverlay.CurWedgeStart1lbl.Text = "CurWedgeStart:";
MyProject.Forms.CacheOverlay.CurState21lbl.Text = "CurState2:";
MyProject.Forms.CacheOverlay.CurWedegeSize1lbl.Text = "CurWedgeSize:";
MyProject.Forms.CacheOverlay.CurStateMeans1lbl.Text = "CurStateMeans:";
MyProject.Forms.CacheOverlay.CurState2Means1lbl.Text = "CurState2Means:";
MyProject.Forms.CacheOverlay.ActionMeans1lbl.Text = "Action:";
MyProject.Forms.CacheOverlay.ActionStatusMeans1lbl.Text = "Status:";
MyProject.Forms.CacheOverlay.CurLBA1lbl.Text = "CurLBA:";
MyProject.Forms.CacheOverlay.CurVirHd1lbl.Text = "CurVirHd:";
MyProject.Forms.CacheOverlay.CurVirCyl1lbl.Text = "CurVirCyl:";
MyProject.Forms.CacheOverlay.CurZone1lbl.Text = "CurZone:";
MyProject.Forms.CacheOverlay.CurTrkoft1lbl.Text = "CurTrkOft:";
MyProject.Forms.CacheOverlay.PTMID1lbl.Text = "TMID:";
MyProject.Forms.CacheOverlay.ActionCode1lbl.Text = "ActionCode:";
MyProject.Forms.CacheOverlay.TestID1lbl.Text = "TestID:";
MyProject.Forms.CacheOverlay.ExErrCode1lbl.Text = "ExtErrCode:";
MyProject.Forms.CacheOverlay.SenseCode1lbl.Text = "SenseCode:";
MyProject.Forms.CacheOverlay.ActionStatus1lbl.Text = "ActionStatus:";
MyProject.Forms.CacheOverlay.SenseMeans1lbl.Text = "SenseMeans:";
WDSelfscan.SelfscanCodeName = "";
PublicDefine.TaskStop = false;
PublicDefine.TaskStop = true;
while (true)
{
byte[] buffer;
bool flag = false;
WDPassport.SendCommandStr = "";
WDPassport.SendCommandStr = "2780B0D5BE4FC2A0BE4FC2D501000000";
WDPassport.SetSamsungRegVal();
WDPassport.i = 0;
while (ATA.inportbyteVB(ATA.BasePort + 7) != 0x58L)
{
if (WDPassport.i > 0xbb8)
{
flag = false;
break;
}
if (ATA.inportbyteVB(ATA.BasePort + 7) == 0x51L)
{
flag = false;
break;
}
MyProject.Application.DoEvents();
ATA.Sleep(2);
WDPassport.i++;
}
if (ATA.inportbyteVB(ATA.BasePort + 7) == 0x58L)
{
flag = true;
}
else
{
flag = false;
}
if (flag)
{
buffer = new byte[0x200];
WDPassport.i = 0;
do
{
WDPassport.j = ATA.inportwordVB(ATA.BasePort);
buffer[WDPassport.i + 1] = (byte) Math.Round(Conversion.Val("&H" + Strings.Mid(Strings.Right("00000000" + Conversion.Hex(WDPassport.j), 8), 5, 2)));
buffer[WDPassport.i] = (byte) (WDPassport.j & 0xffL);
WDPassport.i += 2;
}
while (WDPassport.i < 0x200);
}
else
{
buffer = new byte[0x200];
}
WDPassport.i = 0;
while (ATA.inportbyteVB(ATA.BasePort + 7) != 80L)
{
if (WDPassport.i > 0xbb8)
{
flag = false;
break;
}
if (ATA.inportbyteVB(ATA.BasePort + 7) == 0x51L)
{
flag = false;
break;
}
MyProject.Application.DoEvents();
ATA.Sleep(2);
WDPassport.i++;
}
if (ATA.inportbyteVB(ATA.BasePort + 7) == 80L)
{
flag = true;
}
else
{
flag = false;
}
if (flag)
{
WDSelfscan.CurStateStr = "";
str7 = "";
WDSelfscan.CurState2Str = "";
str6 = "";
str = "";
str5 = "";
str4 = "";
str8 = "";
str3 = "";
WDSelfscan.PTMIDStr = "";
WDSelfscan.ActionCodeStr = "";
str10 = "";
str9 = "";
WDSelfscan.SenseCodeStr = "";
WDSelfscan.ActionStatusStr = "";
WDSelfscan.SenseMeansStr = "";
WDSelfscan.ActionCodeMeansStr = "";
WDSelfscan.ActionStatusMeansStr = "";
WDSelfscan.CurStateStr = Strings.Right("00" + Conversion.Hex(buffer[0x36]), 2);
MyProject.Forms.CacheOverlay.CurState1lbl.Text = "CurState:" + WDSelfscan.CurStateStr;
str7 = Strings.Right("00" + Conversion.Hex(buffer[0x47]), 2) + Strings.Right("00" + Conversion.Hex(buffer[70]), 2);
MyProject.Forms.CacheOverlay.CurWedgeStart1lbl.Text = "CurWedgeStart:" + str7;
WDSelfscan.CurState2Str = Strings.Right("00" + Conversion.Hex(buffer[0x37]), 2);
MyProject.Forms.CacheOverlay.CurState21lbl.Text = "CurState2:" + WDSelfscan.CurState2Str;
INIFileOperations.GetCurStateMeans();
MyProject.Forms.CacheOverlay.CurStateMeans1lbl.Text = "CurStateMeans:" + WDSelfscan.CurStateMeansStr;
MyProject.Forms.CacheOverlay.CurState2Means1lbl.Text = "CurState2Means:" + WDSelfscan.CurState2MeansStr;
str6 = Strings.Right("00" + Conversion.Hex(buffer[0x49]), 2) + Strings.Right("00" + Conversion.Hex(buffer[0x48]), 2);
MyProject.Forms.CacheOverlay.CurWedegeSize1lbl.Text = "CurWedgeSize:" + str6;
str = Conversions.ToString(Conversions.ToLong("&h" + Strings.Right("00" + Conversion.Hex(buffer[0x3b]), 2) + Strings.Right("00" + Conversion.Hex(buffer[0x3a]), 2) + Strings.Right("00" + Conversion.Hex(buffer[0x39]), 2) + Strings.Right("00" + Conversion.Hex(buffer[0x38]), 2)));
MyProject.Forms.CacheOverlay.CurLBA1lbl.Text = "CurLBA:" + str;
str5 = Conversions.ToString(Conversions.ToLong("&h" + Strings.Right("00" + Conversion.Hex(buffer[0x44]), 2)));
MyProject.Forms.CacheOverlay.CurVirHd1lbl.Text = "CurVirHd:" + str5;
str4 = Strings.Right("00" + Conversion.Hex(buffer[0x43]), 2) + Strings.Right("00" + Conversion.Hex(buffer[0x42]), 2) + Strings.Right("00" + Conversion.Hex(buffer[0x41]), 2) + Strings.Right("00" + Conversion.Hex(buffer[0x40]), 2);
if ((Strings.Mid(str4, 7, 2) != "FF") & (Strings.Mid(str4, 1, 6) == "FFFFFF"))
{
str4 = "-" + Conversions.ToString((long) ((0xffL - Conversions.ToLong("&h" + Strings.Mid(str4, 7, 2))) + 1L));
}
else if (Strings.Mid(str4, 1, 8) == "FFFFFFFF")
{
str4 = "-1";
}
else
{
str4 = Conversions.ToString(Conversions.ToLong("&H" + str4));
}
MyProject.Forms.CacheOverlay.CurVirCyl1lbl.Text = "CurVirCyl:" + str4;
str8 = Conversions.ToString(Conversions.ToLong("&h" + Strings.Right("00" + Conversion.Hex(buffer[0x45]), 2)));
MyProject.Forms.CacheOverlay.CurZone1lbl.Text = "CurZone:" + str8;
str3 = Conversions.ToString(Conversions.ToLong("&h" + Strings.Right("00" + Conversion.Hex(buffer[0x3f]), 2) + Strings.Right("00" + Conversion.Hex(buffer[0x3e]), 2)));
MyProject.Forms.CacheOverlay.CurTrkoft1lbl.Text = "CurTrkOft:" + str3;
WDSelfscan.PTMIDStr = Strings.Right("00" + Conversion.Hex(buffer[0x191]), 2) + Strings.Right("00" + Conversion.Hex(buffer[400]), 2);
if (WDSelfscan.PTMIDStr == "00B1")
{
WDSelfscan.PTMIDStr = "Adj 0x4F";
}
MyProject.Forms.CacheOverlay.PTMID1lbl.Text = "PTMID:" + WDSelfscan.PTMIDStr;
WDSelfscan.ActionCodeStr = Strings.Right("00" + Conversion.Hex(buffer[0x195]), 2) + Strings.Right("00" + Conversion.Hex(buffer[0x194]), 2);
WDSelfscan.ActionCodeStr = Strings.Right("0000&h" + WDSelfscan.ActionCodeStr, 4);
MyProject.Forms.CacheOverlay.ActionCode1lbl.Text = "ActionCode:" + WDSelfscan.ActionCodeStr;
WDSelfscan.ActionStatusStr = Strings.Right("00" + Conversion.Hex(buffer[0x19b]), 2) + Strings.Right("00" + Conversion.Hex(buffer[410]), 2) + Strings.Right("00" + Conversion.Hex(buffer[0x199]), 2) + Strings.Right("00" + Conversion.Hex(buffer[0x198]), 2);
MyProject.Forms.CacheOverlay.ActionStatus1lbl.Text = "ActionStatus:" + WDSelfscan.ActionStatusStr;
INIFileOperations.GetActionCodeAndActionStatusMeans();
MyProject.Forms.CacheOverlay.ActionMeans1lbl.Text = "Action:" + WDSelfscan.ActionCodeMeansStr;
if (Strings.Trim(WDSelfscan.ActionStatusMeansStr) == "")
{
MyProject.Forms.CacheOverlay.ActionStatusMeans1lbl.Text = "StatusCode Not Defined)";
}
else
{
MyProject.Forms.CacheOverlay.ActionStatusMeans1lbl.Text = "Status:" + WDSelfscan.ActionStatusMeansStr;
}
str10 = Strings.Right("00" + Conversion.Hex(buffer[0x193]), 2) + Strings.Right("00" + Conversion.Hex(buffer[0x192]), 2);
if (str10 == "04E0")
{
str10 = "0000";
}
MyProject.Forms.CacheOverlay.TestID1lbl.Text = "TestID:" + str10;
str9 = Strings.Right("00" + Conversion.Hex(buffer[0x197]), 2) + Strings.Right("00" + Conversion.Hex(buffer[0x196]), 2);
MyProject.Forms.CacheOverlay.ExErrCode1lbl.Text = "ExtErrCode:" + str9;
WDSelfscan.SenseCodeStr = Strings.Right("00" + Conversion.Hex(buffer[0x19]), 2) + Strings.Right("00" + Conversion.Hex(buffer[0x18]), 2);
MyProject.Forms.CacheOverlay.SenseCode1lbl.Text = "SenseCode:" + WDSelfscan.SenseCodeStr;
INIFileOperations.GetSenseCodeMeans();
MyProject.Forms.CacheOverlay.SenseMeans1lbl.Text = "SenseMeans:" + WDSelfscan.SenseMeansStr;
if (PublicDefine.UserStop)
{
PublicDefine.UserStop = false;
PublicDefine.TaskStop = false;
Interaction.MsgBox("ARCO 监控被终止!", MsgBoxStyle.Information, PublicDefine.ShowMsgTitle);
WDModules.ShowStr = "";
WDModules.ShowStr = CurrentARCOTestNameStr;
WDModules.ShowStr2 = "";
int num6 = 0x26 - Strings.Len(WDModules.ShowStr);
for (int i = 1; i <= num6; i++)
{
WDModules.ShowStr1 = "";
WDModules.ShowStr1 = ".";
WDModules.ShowStr2 = WDModules.ShowStr2 + WDModules.ShowStr1;
MyProject.Application.DoEvents();
}
MyProject.Forms.CacheOverlay.ARCOLogTxt.Text = MyProject.Forms.CacheOverlay.ARCOLogTxt.Text + WDSelfscan.CurrentSystemDateStr + "" + WDModules.ShowStr + WDModules.ShowStr2 + ":用户终止监控(硬盘仍在执行中)\r\n";
return;
}
if (((WDSelfscan.CurStateStr == "00") & (WDSelfscan.CurState2Str == "00")) & (WDSelfscan.SenseCodeStr == "0000"))
{
WDModules.ShowStr = "";
WDModules.ShowStr = CurrentARCOTestNameStr;
WDModules.ShowStr2 = "";
int num7 = 0x26 - Strings.Len(WDModules.ShowStr);
for (int j = 1; j <= num7; j++)
{
WDModules.ShowStr1 = "";
WDModules.ShowStr1 = ".";
WDModules.ShowStr2 = WDModules.ShowStr2 + WDModules.ShowStr1;
MyProject.Application.DoEvents();
}
WDErrorCode.GetWDErrorCode();
WDSelfscan.CurrentSystemDateStr = "";
WDSelfscan.CurrentSystemDateStr = Conversions.ToString(DateTime.Now);
MyProject.Forms.CacheOverlay.ARCOLogTxt.Text = MyProject.Forms.CacheOverlay.ARCOLogTxt.Text + WDSelfscan.CurrentSystemDateStr + "" + WDModules.ShowStr + WDModules.ShowStr2 + ":结束(" + WDErrorCode.WDErrorCodeMenas + ")\r\n";
PublicDefine.TaskStop = false;
return;
}
if (((WDSelfscan.CurStateStr == "00") & (WDSelfscan.CurState2Str == "00")) & (WDSelfscan.SenseCodeStr != "0000"))
{
WDErrorCode.GetWDErrorCode();
WDModules.ShowStr = "";
WDModules.ShowStr = CurrentARCOTestNameStr;
WDModules.ShowStr2 = "";
int num8 = 0x26 - Strings.Len(WDModules.ShowStr);
for (int k = 1; k <= num8; k++)
{
WDModules.ShowStr1 = "";
WDModules.ShowStr1 = ".";
WDModules.ShowStr2 = WDModules.ShowStr2 + WDModules.ShowStr1;
MyProject.Application.DoEvents();
}
WDSelfscan.CurrentSystemDateStr = "";
WDSelfscan.CurrentSystemDateStr = Conversions.ToString(DateTime.Now);
MyProject.Forms.CacheOverlay.ARCOLogTxt.Text = MyProject.Forms.CacheOverlay.ARCOLogTxt.Text + WDSelfscan.CurrentSystemDateStr + "" + WDModules.ShowStr + WDModules.ShowStr2 + ":失败.(" + WDErrorCode.WDErrorCodeMenas + ")\r\n";
PublicDefine.TaskStop = false;
return;
}
if ((WDSelfscan.CurStateStr == "04") & (WDSelfscan.SenseCodeStr == "0000"))
{
WDModules.ShowStr = "";
WDModules.ShowStr = CurrentARCOTestNameStr;
WDModules.ShowStr2 = "";
int num9 = 0x26 - Strings.Len(WDModules.ShowStr);
for (int m = 1; m <= num9; m++)
{
WDModules.ShowStr1 = "";
WDModules.ShowStr1 = ".";
WDModules.ShowStr2 = WDModules.ShowStr2 + WDModules.ShowStr1;
MyProject.Application.DoEvents();
}
WDErrorCode.GetWDErrorCode();
WDSelfscan.CurrentSystemDateStr = "";
WDSelfscan.CurrentSystemDateStr = Conversions.ToString(DateTime.Now);
MyProject.Forms.CacheOverlay.ARCOLogTxt.Text = MyProject.Forms.CacheOverlay.ARCOLogTxt.Text + WDSelfscan.CurrentSystemDateStr + "" + WDModules.ShowStr + WDModules.ShowStr2 + ":结束.(" + WDErrorCode.WDErrorCodeMenas + ")\r\n";
PublicDefine.TaskStop = false;
return;
}
if (WDSelfscan.SenseCodeStr != "0000")
{
WDModules.ShowStr = "";
WDModules.ShowStr = CurrentARCOTestNameStr;
WDModules.ShowStr2 = "";
int num10 = 0x26 - Strings.Len(WDModules.ShowStr);
for (int n = 1; n <= num10; n++)
{
WDModules.ShowStr1 = "";
WDModules.ShowStr1 = ".";
WDModules.ShowStr2 = WDModules.ShowStr2 + WDModules.ShowStr1;
MyProject.Application.DoEvents();
}
WDErrorCode.GetWDErrorCode();
WDSelfscan.CurrentSystemDateStr = "";
WDSelfscan.CurrentSystemDateStr = Conversions.ToString(DateTime.Now);
MyProject.Forms.CacheOverlay.ARCOLogTxt.Text = MyProject.Forms.CacheOverlay.ARCOLogTxt.Text + WDSelfscan.CurrentSystemDateStr + "" + WDModules.ShowStr + WDModules.ShowStr2 + ":失败.(" + WDErrorCode.WDErrorCodeMenas + ")\r\n";
PublicDefine.TaskStop = false;
return;
}
}
ATA.Sleep(1);
MyProject.Application.DoEvents();
}
}
public static void AutoLoadCalibrationCodeToRAM()
{
string memoryAdress = "";
string str = "";
CalibrateName = "";
CalibrateName = "00C4";
WDModules.ShowStr = "";
WDModules.ShowStr = "加载校准代码 ";
WDModules.ShowStr2 = "";
int num2 = 50 - Strings.Len(WDModules.ShowStr);
for (int i = 1; i <= num2; i++)
{
WDModules.ShowStr1 = "";
WDModules.ShowStr1 = ".";
WDModules.ShowStr2 = WDModules.ShowStr2 + WDModules.ShowStr1;
MyProject.Application.DoEvents();
}
WDPassport.AppendARCOLogTxt(WDModules.ShowStr + WDModules.ShowStr2);
if (WDPassport.WDFWRead(ref WDModules.WDModuleData, 1, CalibrateName))
{
if (WDPassport.HDDTypeMavell)
{
DetectFWParameters.ModuleLength = Conversions.ToLong("&h" + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x17]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x16]), 2));
}
else
{
DetectFWParameters.ModuleLength = Conversions.ToLong("&h" + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[11]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[10]), 2));
}
if (WDPassport.WDFWRead(ref WDModules.WDModuleData, (int) DetectFWParameters.ModuleLength, CalibrateName))
{
str = "";
str = Strings.Right("0000" + Conversion.Hex(DetectFWParameters.ModuleLength), 4);
str = Strings.Mid(str, 3, 2) + Strings.Mid(str, 1, 2);
memoryAdress = "";
memoryAdress = "14000A0000000000" + str + "000000000000";
if (WriteWDMemory(ref WDModules.WDModuleData, (int) DetectFWParameters.ModuleLength, memoryAdress))
{
WDPassport.i = 0;
while (ATA.inportbyteVB(ATA.BasePort + 7) != 80L)
{
if (WDPassport.i > 50)
{
WDPassport.AppendTxt(":失败 (硬盘超时)\r\n");
return;
}
if (ATA.inportbyteVB(ATA.BasePort + 7) == 0x51L)
{
WDErrorCode.GetWDErrorCode();
WDPassport.AppendARCOLogTxt(":失败.(" + WDErrorCode.WDErrorCodeMenas + ")\r\n");
return;
}
MyProject.Application.DoEvents();
ATA.Sleep(2);
WDPassport.i++;
}
WDPassport.AppendARCOLogTxt(":成功.\r\n");
}
else if (WDPassport.HDDError)
{
WDErrorCode.GetWDErrorCode();
WDPassport.AppendARCOLogTxt(":失败.(" + WDErrorCode.WDErrorCodeMenas + ")\r\n");
}
else
{
WDPassport.AppendARCOLogTxt(":失败.\r\n");
}
}
else if (WDPassport.HDDError)
{
WDErrorCode.GetWDErrorCode();
WDPassport.AppendARCOLogTxt(":失败.(" + WDErrorCode.WDErrorCodeMenas + ")\r\n");
}
else
{
WDPassport.AppendARCOLogTxt(":失败.\r\n");
}
}
else if (WDPassport.HDDError)
{
WDErrorCode.GetWDErrorCode();
WDPassport.AppendARCOLogTxt(":失败.(" + WDErrorCode.WDErrorCodeMenas + ")\r\n");
}
else
{
WDPassport.AppendARCOLogTxt(":失败.\r\n");
}
}
[MethodImpl(MethodImplOptions.NoOptimization | MethodImplOptions.NoInlining)]
public static void AutoLoadCalibrationCodeToRAMFromFile()
{
string memoryAdress = "";
string str = "";
FileControl control = new FileControl();
CalibrateName = "";
CalibrateName = "00C4";
WDModules.ShowStr = "";
WDModules.ShowStr = "加载校准代码 ";
WDModules.ShowStr2 = "";
int num2 = 50 - Strings.Len(WDModules.ShowStr);
for (int i = 1; i <= num2; i++)
{
WDModules.ShowStr1 = "";
WDModules.ShowStr1 = ".";
WDModules.ShowStr2 = WDModules.ShowStr2 + WDModules.ShowStr1;
MyProject.Application.DoEvents();
}
WDPassport.AppendARCOLogTxt(WDModules.ShowStr + WDModules.ShowStr2);
if (FileSystem.Dir(ARCOFilePath + @"\00C4.rpm", FileAttribute.Normal) == "")
{
WDPassport.AppendARCOLogTxt(":FAIL(没有发现文件)\r\n");
}
else if ((FileSystem.FileLen(ARCOFilePath + @"\00C4.rpm") < 0x200L) | ((FileSystem.FileLen(ARCOFilePath + @"\00C4.rpm") % 0x200L) != 0L))
{
WDPassport.AppendARCOLogTxt(":FAIL(文件大小错误)\r\n");
}
else
{
FileControl.ReadFile(ref WDModules.WDModuleData, ARCOFilePath + @"\00C4.rpm");
if (WDPassport.HDDTypeMavell)
{
DetectFWParameters.ModuleLength = Conversions.ToLong("&h" + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x17]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x16]), 2));
}
else
{
DetectFWParameters.ModuleLength = Conversions.ToLong("&h" + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[11]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[10]), 2));
}
str = "";
str = Strings.Right("0000" + Conversion.Hex(DetectFWParameters.ModuleLength), 4);
str = Strings.Mid(str, 3, 2) + Strings.Mid(str, 1, 2);
memoryAdress = "";
memoryAdress = "14000A0000000000" + str + "000000000000";
if (WriteWDMemory(ref WDModules.WDModuleData, (int) DetectFWParameters.ModuleLength, memoryAdress))
{
WDPassport.i = 0;
while (ATA.inportbyteVB(ATA.BasePort + 7) != 80L)
{
if (WDPassport.i > 50)
{
WDPassport.AppendTxt(":失败 (硬盘超时)\r\n");
return;
}
if (ATA.inportbyteVB(ATA.BasePort + 7) == 0x51L)
{
WDErrorCode.GetWDErrorCode();
WDPassport.AppendARCOLogTxt(":失败.(" + WDErrorCode.WDErrorCodeMenas + ")\r\n");
return;
}
MyProject.Application.DoEvents();
ATA.Sleep(2);
WDPassport.i++;
}
WDPassport.AppendARCOLogTxt(":成功.\r\n");
}
else if (WDPassport.HDDError)
{
WDErrorCode.GetWDErrorCode();
WDPassport.AppendARCOLogTxt(":失败.(" + WDErrorCode.WDErrorCodeMenas + ")\r\n");
}
else
{
WDPassport.AppendARCOLogTxt(":失败.\r\n");
}
}
}
public static void AutoLoadDCMCodeToRAM()
{
string memoryAdress = "";
string str = "";
CalibrateName = "";
CalibrateName = "00C5";
WDModules.ShowStr = "";
WDModules.ShowStr = "加载DCM ";
WDModules.ShowStr2 = "";
int num2 = 0x36 - Strings.Len(WDModules.ShowStr);
for (int i = 1; i <= num2; i++)
{
WDModules.ShowStr1 = "";
WDModules.ShowStr1 = ".";
WDModules.ShowStr2 = WDModules.ShowStr2 + WDModules.ShowStr1;
MyProject.Application.DoEvents();
}
WDPassport.AppendARCOLogTxt(WDModules.ShowStr + WDModules.ShowStr2);
if (WDPassport.WDFWRead(ref WDModules.WDModuleData, 1, CalibrateName))
{
if (WDPassport.HDDTypeMavell)
{
DetectFWParameters.ModuleLength = Conversions.ToLong("&h" + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x17]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x16]), 2));
}
else
{
DetectFWParameters.ModuleLength = Conversions.ToLong("&h" + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[11]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[10]), 2));
}
if (WDPassport.WDFWRead(ref WDModules.WDModuleData, (int) DetectFWParameters.ModuleLength, CalibrateName))
{
str = "";
str = Strings.Right("0000" + Conversion.Hex(DetectFWParameters.ModuleLength), 4);
str = Strings.Mid(str, 3, 2) + Strings.Mid(str, 1, 2);
if (!MyProject.Forms.CacheOverlay.AltAdressCbx.Checked)
{
memoryAdress = "";
memoryAdress = "14000A0000010000" + str + "000000000000";
}
else
{
memoryAdress = "";
memoryAdress = "14000A0000020000" + str + "000000000000";
}
if (WriteWDMemory(ref WDModules.WDModuleData, (int) DetectFWParameters.ModuleLength, memoryAdress))
{
WDPassport.i = 0;
while (ATA.inportbyteVB(ATA.BasePort + 7) != 80L)
{
if (WDPassport.i > 50)
{
WDPassport.AppendTxt(":失败 (硬盘超时)\r\n");
return;
}
if (ATA.inportbyteVB(ATA.BasePort + 7) == 0x51L)
{
WDErrorCode.GetWDErrorCode();
WDPassport.AppendARCOLogTxt(":失败.(" + WDErrorCode.WDErrorCodeMenas + ")\r\n");
return;
}
MyProject.Application.DoEvents();
ATA.Sleep(2);
WDPassport.i++;
}
WDPassport.AppendARCOLogTxt(":成功.\r\n");
}
else if (WDPassport.HDDError)
{
WDErrorCode.GetWDErrorCode();
WDPassport.AppendARCOLogTxt(":失败.(" + WDErrorCode.WDErrorCodeMenas + ")\r\n");
}
else
{
WDPassport.AppendARCOLogTxt(":失败.\r\n");
}
}
else if (WDPassport.HDDError)
{
WDErrorCode.GetWDErrorCode();
WDPassport.AppendARCOLogTxt(":失败.(" + WDErrorCode.WDErrorCodeMenas + ")\r\n");
}
else
{
WDPassport.AppendARCOLogTxt(":失败.\r\n");
}
}
else if (WDPassport.HDDError)
{
WDErrorCode.GetWDErrorCode();
WDPassport.AppendARCOLogTxt(":失败.(" + WDErrorCode.WDErrorCodeMenas + ")\r\n");
}
else
{
WDPassport.AppendARCOLogTxt(":失败.\r\n");
}
}
[MethodImpl(MethodImplOptions.NoOptimization | MethodImplOptions.NoInlining)]
public static void AutoLoadDCMCodeToRAMFromFile()
{
string memoryAdress = "";
string str = "";
FileControl control = new FileControl();
CalibrateName = "";
CalibrateName = "00C5";
WDModules.ShowStr = "";
WDModules.ShowStr = "加载DCM ";
WDModules.ShowStr2 = "";
int num2 = 0x36 - Strings.Len(WDModules.ShowStr);
for (int i = 1; i <= num2; i++)
{
WDModules.ShowStr1 = "";
WDModules.ShowStr1 = ".";
WDModules.ShowStr2 = WDModules.ShowStr2 + WDModules.ShowStr1;
MyProject.Application.DoEvents();
}
WDPassport.AppendARCOLogTxt(WDModules.ShowStr + WDModules.ShowStr2);
if (FileSystem.Dir(ARCOFilePath + @"\00C5.rpm", FileAttribute.Normal) == "")
{
WDPassport.AppendARCOLogTxt(":FAIL(没有发现文件)\r\n");
}
else if ((FileSystem.FileLen(ARCOFilePath + @"\00C5.rpm") < 0x200L) | ((FileSystem.FileLen(ARCOFilePath + @"\00C5.rpm") % 0x200L) != 0L))
{
WDPassport.AppendARCOLogTxt(":FAIL(文件大小错误)\r\n");
}
else
{
FileControl.ReadFile(ref WDModules.WDModuleData, ARCOFilePath + @"\00C5.rpm");
if (WDPassport.HDDTypeMavell)
{
DetectFWParameters.ModuleLength = Conversions.ToLong("&h" + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x17]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x16]), 2));
}
else
{
DetectFWParameters.ModuleLength = Conversions.ToLong("&h" + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[11]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[10]), 2));
}
str = "";
str = Strings.Right("0000" + Conversion.Hex(DetectFWParameters.ModuleLength), 4);
str = Strings.Mid(str, 3, 2) + Strings.Mid(str, 1, 2);
if (!MyProject.Forms.CacheOverlay.AltAdressCbx.Checked)
{
memoryAdress = "";
memoryAdress = "14000A0000010000" + str + "000000000000";
}
else
{
memoryAdress = "";
memoryAdress = "14000A0000020000" + str + "000000000000";
}
if (WriteWDMemory(ref WDModules.WDModuleData, (int) DetectFWParameters.ModuleLength, memoryAdress))
{
WDPassport.i = 0;
while (ATA.inportbyteVB(ATA.BasePort + 7) != 80L)
{
if (WDPassport.i > 50)
{
WDPassport.AppendTxt(":失败 (硬盘超时)\r\n");
return;
}
if (ATA.inportbyteVB(ATA.BasePort + 7) == 0x51L)
{
WDErrorCode.GetWDErrorCode();
WDPassport.AppendARCOLogTxt(":失败.(" + WDErrorCode.WDErrorCodeMenas + ")\r\n");
return;
}
MyProject.Application.DoEvents();
ATA.Sleep(2);
WDPassport.i++;
}
WDPassport.AppendARCOLogTxt(":成功.\r\n");
}
else if (WDPassport.HDDError)
{
WDErrorCode.GetWDErrorCode();
WDPassport.AppendARCOLogTxt(":失败.(" + WDErrorCode.WDErrorCodeMenas + ")\r\n");
}
else
{
WDPassport.AppendARCOLogTxt(":失败.\r\n");
}
}
}
public static void AutoLoadDCMCodeToRAMNew()
{
string memoryAdress = "";
string str = "";
CalibrateName = "";
CalibrateName = "00C5";
WDModules.ShowStr = "";
WDModules.ShowStr = "加载DCM ";
WDModules.ShowStr2 = "";
int num2 = 0x36 - Strings.Len(WDModules.ShowStr);
for (int i = 1; i <= num2; i++)
{
WDModules.ShowStr1 = "";
WDModules.ShowStr1 = ".";
WDModules.ShowStr2 = WDModules.ShowStr2 + WDModules.ShowStr1;
MyProject.Application.DoEvents();
}
WDPassport.AppendARCOLogTxt(WDModules.ShowStr + WDModules.ShowStr2);
if (WDPassport.WDFWRead(ref WDModules.WDModuleData, 1, CalibrateName))
{
if (WDPassport.HDDTypeMavell)
{
DetectFWParameters.ModuleLength = Conversions.ToLong("&h" + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x17]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x16]), 2));
}
else
{
DetectFWParameters.ModuleLength = Conversions.ToLong("&h" + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[11]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[10]), 2));
}
if (WDPassport.WDFWRead(ref WDModules.WDModuleData, (int) DetectFWParameters.ModuleLength, CalibrateName))
{
str = "";
str = Strings.Right("0000" + Conversion.Hex(DetectFWParameters.ModuleLength), 4);
str = Strings.Mid(str, 3, 2) + Strings.Mid(str, 1, 2);
if (!AltDCM)
{
memoryAdress = "";
memoryAdress = "14000A0000010000" + str + "000000000000";
}
else
{
memoryAdress = "";
memoryAdress = "14000A0000020000" + str + "000000000000";
}
if (WriteWDMemory(ref WDModules.WDModuleData, (int) DetectFWParameters.ModuleLength, memoryAdress))
{
WDPassport.i = 0;
while (ATA.inportbyteVB(ATA.BasePort + 7) != 80L)
{
if (WDPassport.i > 50)
{
WDPassport.AppendTxt(":失败 (硬盘超时)\r\n");
return;
}
if (ATA.inportbyteVB(ATA.BasePort + 7) == 0x51L)
{
WDErrorCode.GetWDErrorCode();
WDPassport.AppendARCOLogTxt(":失败.(" + WDErrorCode.WDErrorCodeMenas + ")\r\n");
return;
}
MyProject.Application.DoEvents();
ATA.Sleep(2);
WDPassport.i++;
}
WDPassport.AppendARCOLogTxt(":成功.\r\n");
}
else if (WDPassport.HDDError)
{
WDErrorCode.GetWDErrorCode();
WDPassport.AppendARCOLogTxt(":失败.(" + WDErrorCode.WDErrorCodeMenas + ")\r\n");
}
else
{
WDPassport.AppendARCOLogTxt(":失败.\r\n");
}
}
else if (WDPassport.HDDError)
{
WDErrorCode.GetWDErrorCode();
WDPassport.AppendARCOLogTxt(":失败.(" + WDErrorCode.WDErrorCodeMenas + ")\r\n");
}
else
{
WDPassport.AppendARCOLogTxt(":失败.\r\n");
}
}
else if (WDPassport.HDDError)
{
WDErrorCode.GetWDErrorCode();
WDPassport.AppendARCOLogTxt(":失败.(" + WDErrorCode.WDErrorCodeMenas + ")\r\n");
}
else
{
WDPassport.AppendARCOLogTxt(":失败.\r\n");
}
}
public static void BuildARCOProcess()
{
string str = "";
string str2 = "";
string str3 = "";
string str4 = "";
string str5 = "";
ARCOSearchParamters = new string[5];
ShowBuildARCOParamtersNameStr = new string[5];
ARCOSearchParamters[0] = "6F";
ARCOSearchParamters[1] = "6A";
ARCOSearchParamters[2] = "6B";
ARCOSearchParamters[3] = "69";
ARCOSearchParamters[4] = "46";
ShowBuildARCOParamtersNameStr[0] = "TouchDown Calibration 0x6F";
ShowBuildARCOParamtersNameStr[1] = "Writer-Reader Calibration 0x6A";
ShowBuildARCOParamtersNameStr[2] = "TPI Calibration 0x6B";
ShowBuildARCOParamtersNameStr[3] = "VKFCI Head Qualification Test 0x69";
ShowBuildARCOParamtersNameStr[4] = "Full-ARCO 0x46";
Found6FParameters = false;
Found6AParameters = false;
Found6BParameters = false;
Found69Parameters = false;
Found46Parameters = false;
int index = 0;
Label_00CE:
WDModules.ShowStr = "";
WDModules.ShowStr = "建立 " + ShowBuildARCOParamtersNameStr[index] + " Paramters";
WDModules.ShowStr2 = "";
int num29 = 0x34 - Strings.Len(WDModules.ShowStr);
for (int i = 1; i <= num29; i++)
{
WDModules.ShowStr1 = "";
WDModules.ShowStr1 = ".";
WDModules.ShowStr2 = WDModules.ShowStr2 + WDModules.ShowStr1;
MyProject.Application.DoEvents();
}
WDPassport.AppendSelfcanTxt(WDModules.ShowStr + WDModules.ShowStr2);
if (index != 0)
{
if (index != 1)
{
if (index == 2)
{
int num13 = 0;
do
{
if (num13 != 0)
{
int num35 = Information.UBound(ARCO6BData, 1);
for (int k = 0; k <= num35; k++)
{
str = "";
str2 = "";
str3 = "";
str4 = "";
str5 = "";
str = Strings.Right("00" + Conversion.Hex(ARCO6BData[k]), 2);
if ((k + 11) > Information.UBound(ARCO6BData, 1))
{
break;
}
str2 = Strings.Right("00" + Conversion.Hex(ARCO6BData[k + 1]), 2) + Strings.Right("00" + Conversion.Hex(ARCO6BData[k + 2]), 2) + Strings.Right("00" + Conversion.Hex(ARCO6BData[k + 3]), 2);
str3 = Strings.Right("00" + Conversion.Hex(ARCO6BData[k + 5]), 2) + Strings.Right("00" + Conversion.Hex(ARCO6BData[k + 6]), 2) + Strings.Right("00" + Conversion.Hex(ARCO6BData[k + 7]), 2);
str4 = Strings.Right("00" + Conversion.Hex(ARCO6BData[k + 8]), 2);
str5 = Strings.Right("00" + Conversion.Hex(ARCO6BData[k + 9]), 2) + Strings.Right("00" + Conversion.Hex(ARCO6BData[k + 10]), 2) + Strings.Right("00" + Conversion.Hex(ARCO6BData[k + 11]), 2);
if (((((ARCOSearchParamters[index] == str) & (str2 == "000000")) & (str3 == "000000")) & (str4 != "00")) & (str5 == "000000"))
{
Found6BParameters = true;
int num17 = 0;
do
{
StandardARCOProcessData[(((index * 0x88) + 0x38) + 4) + num17] = ARCO6BData[k + num17];
num17++;
}
while (num17 <= 0x3f);
break;
}
}
}
else
{
int num34 = Information.UBound(ARCO6BData1, 1);
for (int m = 0; m <= num34; m++)
{
str = "";
str2 = "";
str3 = "";
str = Strings.Right("00" + Conversion.Hex(ARCO6BData1[m]), 2);
str4 = "";
str5 = "";
if ((m + 11) > Information.UBound(ARCO6BData1, 1))
{
break;
}
str2 = Strings.Right("00" + Conversion.Hex(ARCO6BData1[m + 1]), 2) + Strings.Right("00" + Conversion.Hex(ARCO6BData1[m + 2]), 2) + Strings.Right("00" + Conversion.Hex(ARCO6BData1[m + 3]), 2);
str3 = Strings.Right("00" + Conversion.Hex(ARCO6BData1[m + 5]), 2) + Strings.Right("00" + Conversion.Hex(ARCO6BData1[m + 6]), 2) + Strings.Right("00" + Conversion.Hex(ARCO6BData1[m + 7]), 2);
str4 = Strings.Right("00" + Conversion.Hex(ARCO6BData1[m + 8]), 2);
str5 = Strings.Right("00" + Conversion.Hex(ARCO6BData1[m + 9]), 2) + Strings.Right("00" + Conversion.Hex(ARCO6BData1[m + 10]), 2) + Strings.Right("00" + Conversion.Hex(ARCO6BData1[m + 11]), 2);
if (((((ARCOSearchParamters[index] == str) & (str2 == "000000")) & (str3 == "000000")) & (str4 != "00")) & (str5 == "000000"))
{
Found6BParameters = true;
int num15 = 0;
do
{
StandardARCOProcessData[(((index * 0x88) + 0x38) + 4) + num15] = ARCO6BData1[m + num15];
num15++;
}
while (num15 <= 0x3f);
break;
}
}
if (Found6BParameters)
{
break;
}
}
num13++;
}
while (num13 <= 1);
if (Found6BParameters)
{
WDPassport.AppendSelfcanTxt(":成功. ( 发现 6B 参数 )\r\n");
}
else
{
WDPassport.AppendSelfcanTxt(":失败. ( 没有发现 6B 参数 )\r\n");
}
}
else if (index == 3)
{
int num18 = 0;
do
{
if (num18 != 0)
{
int num37 = Information.UBound(ARCO69Data, 1);
for (int n = 0; n <= num37; n++)
{
str = "";
str2 = "";
str3 = "";
str4 = "";
str5 = "";
str = Strings.Right("00" + Conversion.Hex(ARCO69Data[n]), 2);
if ((n + 60) > Information.UBound(ARCO69Data, 1))
{
break;
}
str2 = Strings.Right("00" + Conversion.Hex(ARCO69Data[n + 1]), 2) + Strings.Right("00" + Conversion.Hex(ARCO69Data[n + 2]), 2) + Strings.Right("00" + Conversion.Hex(ARCO69Data[n + 3]), 2);
str3 = Strings.Right("00" + Conversion.Hex(ARCO69Data[n + 5]), 2) + Strings.Right("00" + Conversion.Hex(ARCO69Data[n + 6]), 2) + Strings.Right("00" + Conversion.Hex(ARCO69Data[n + 7]), 2);
str4 = Strings.Right("00" + Conversion.Hex(ARCO69Data[n + 8]), 2);
str5 = Strings.Right("00" + Conversion.Hex(ARCO69Data[n + 9]), 2) + Strings.Right("00" + Conversion.Hex(ARCO69Data[n + 10]), 2) + Strings.Right("00" + Conversion.Hex(ARCO69Data[n + 11]), 2);
if (((((ARCOSearchParamters[index] == str) & (str2 == "000000")) & (str3 == "000000")) & (str4 != "00")) & (str5 == "000000"))
{
Found69Parameters = true;
int num22 = 0;
do
{
StandardARCOProcessData[(((index * 0x88) + 0x38) + 4) + num22] = ARCO69Data[n + num22];
num22++;
}
while (num22 <= 0x3f);
break;
}
}
}
else
{
int num36 = Information.UBound(ARCO69Data1, 1);
for (int num19 = 0; num19 <= num36; num19++)
{
str = "";
str2 = "";
str3 = "";
str4 = "";
str5 = "";
str = Strings.Right("00" + Conversion.Hex(ARCO69Data1[num19]), 2);
if ((num19 + 60) > Information.UBound(ARCO69Data1, 1))
{
break;
}
str2 = Strings.Right("00" + Conversion.Hex(ARCO69Data1[num19 + 1]), 2) + Strings.Right("00" + Conversion.Hex(ARCO69Data1[num19 + 2]), 2) + Strings.Right("00" + Conversion.Hex(ARCO69Data1[num19 + 3]), 2);
str3 = Strings.Right("00" + Conversion.Hex(ARCO69Data1[num19 + 5]), 2) + Strings.Right("00" + Conversion.Hex(ARCO69Data1[num19 + 6]), 2) + Strings.Right("00" + Conversion.Hex(ARCO69Data1[num19 + 7]), 2);
str4 = Strings.Right("00" + Conversion.Hex(ARCO69Data1[num19 + 8]), 2);
str5 = Strings.Right("00" + Conversion.Hex(ARCO69Data1[num19 + 9]), 2) + Strings.Right("00" + Conversion.Hex(ARCO69Data1[num19 + 10]), 2) + Strings.Right("00" + Conversion.Hex(ARCO69Data1[num19 + 11]), 2);
if (((((ARCOSearchParamters[index] == str) & (str2 == "000000")) & (str3 == "000000")) & (str4 != "00")) & (str5 == "000000"))
{
Found69Parameters = true;
int num20 = 0;
do
{
StandardARCOProcessData[(((index * 0x88) + 0x38) + 4) + num20] = ARCO69Data1[num19 + num20];
num20++;
}
while (num20 <= 0x3f);
break;
}
}
if (Found69Parameters)
{
break;
}
}
num18++;
}
while (num18 <= 1);
if (Found69Parameters)
{
WDPassport.AppendSelfcanTxt(":成功. ( 发现 69 参数 )\r\n");
}
else
{
WDPassport.AppendSelfcanTxt(":失败. ( 没有发现 69 参数 )\r\n");
}
}
else if (index == 4)
{
int num23 = 0;
do
{
if (num23 != 0)
{
int num39 = Information.UBound(ARCO46Data1, 1);
for (int num26 = 0; num26 <= num39; num26++)
{
str = "";
str2 = "";
str3 = "";
str = Strings.Right("00" + Conversion.Hex(ARCO46Data1[num26]), 2);
str4 = "";
str5 = "";
if ((num26 + 11) > Information.UBound(ARCO46Data1, 1))
{
break;
}
str2 = Strings.Right("00" + Conversion.Hex(ARCO46Data1[num26 + 1]), 2) + Strings.Right("00" + Conversion.Hex(ARCO46Data1[num26 + 2]), 2) + Strings.Right("00" + Conversion.Hex(ARCO46Data1[num26 + 3]), 2);
str3 = Strings.Right("00" + Conversion.Hex(ARCO46Data1[num26 + 5]), 2) + Strings.Right("00" + Conversion.Hex(ARCO46Data1[num26 + 6]), 2) + Strings.Right("00" + Conversion.Hex(ARCO46Data1[num26 + 7]), 2);
str4 = Strings.Right("00" + Conversion.Hex(ARCO46Data1[num26 + 8]), 2);
str5 = Strings.Right("00" + Conversion.Hex(ARCO46Data1[num26 + 9]), 2) + Strings.Right("00" + Conversion.Hex(ARCO46Data1[num26 + 10]), 2) + Strings.Right("00" + Conversion.Hex(ARCO46Data1[num26 + 11]), 2);
if (((((ARCOSearchParamters[index] == str) & (str2 == "000000")) & (str3 == "000000")) & (str4 != "00")) & (str5 == "000000"))
{
Found46Parameters = true;
int num27 = 0;
do
{
StandardARCOProcessData[(((index * 0x88) + 0x38) + 4) + num27] = ARCO46Data1[num26 + num27];
num27++;
}
while (num27 <= 0x17);
break;
}
}
}
else
{
int num38 = Information.UBound(ARCO46Data, 1);
for (int num24 = 0; num24 <= num38; num24++)
{
str = "";
str2 = "";
str3 = "";
str = Strings.Right("00" + Conversion.Hex(ARCO46Data[num24]), 2);
str4 = "";
str5 = "";
if ((num24 + 11) > Information.UBound(ARCO46Data, 1))
{
break;
}
str2 = Strings.Right("00" + Conversion.Hex(ARCO46Data[num24 + 1]), 2) + Strings.Right("00" + Conversion.Hex(ARCO46Data[num24 + 2]), 2) + Strings.Right("00" + Conversion.Hex(ARCO46Data[num24 + 3]), 2);
str3 = Strings.Right("00" + Conversion.Hex(ARCO46Data[num24 + 5]), 2) + Strings.Right("00" + Conversion.Hex(ARCO46Data[num24 + 6]), 2) + Strings.Right("00" + Conversion.Hex(ARCO46Data[num24 + 7]), 2);
str4 = Strings.Right("00" + Conversion.Hex(ARCO46Data[num24 + 8]), 2);
str5 = Strings.Right("00" + Conversion.Hex(ARCO46Data[num24 + 9]), 2) + Strings.Right("00" + Conversion.Hex(ARCO46Data[num24 + 10]), 2) + Strings.Right("00" + Conversion.Hex(ARCO46Data[num24 + 11]), 2);
if (((((ARCOSearchParamters[index] == str) & (str2 == "000000")) & (str3 == "000000")) & (str4 != "00")) & (str5 == "000000"))
{
Found46Parameters = true;
int num25 = 0;
do
{
StandardARCOProcessData[(((index * 0x88) + 0x38) + 4) + num25] = ARCO46Data[num24 + num25];
num25++;
}
while (num25 <= 0x17);
break;
}
}
if (Found46Parameters)
{
break;
}
}
num23++;
}
while (num23 <= 1);
if (Found46Parameters)
{
WDPassport.AppendSelfcanTxt(":成功. ( 发现 46 参数 )\r\n");
}
else
{
WDPassport.AppendSelfcanTxt(":失败. ( 没有发现 46 参数 )\r\n");
}
}
goto Label_1A43;
}
int num8 = 0;
do
{
if (num8 != 0)
{
int num33 = Information.UBound(ARCO6AData1, 1);
for (int num11 = 0; num11 <= num33; num11++)
{
str = "";
str2 = "";
str3 = "";
str4 = "";
str5 = "";
str = Strings.Right("00" + Conversion.Hex(ARCO6AData1[num11]), 2);
if ((num11 + 11) > Information.UBound(ARCO6AData1, 1))
{
break;
}
str2 = Strings.Right("00" + Conversion.Hex(ARCO6AData1[num11 + 1]), 2) + Strings.Right("00" + Conversion.Hex(ARCO6AData1[num11 + 2]), 2) + Strings.Right("00" + Conversion.Hex(ARCO6AData1[num11 + 3]), 2);
str3 = Strings.Right("00" + Conversion.Hex(ARCO6AData1[num11 + 5]), 2) + Strings.Right("00" + Conversion.Hex(ARCO6AData1[num11 + 6]), 2) + Strings.Right("00" + Conversion.Hex(ARCO6AData1[num11 + 7]), 2);
str4 = Strings.Right("00" + Conversion.Hex(ARCO6AData1[num11 + 8]), 2);
str5 = Strings.Right("00" + Conversion.Hex(ARCO6AData1[num11 + 9]), 2) + Strings.Right("00" + Conversion.Hex(ARCO6AData1[num11 + 10]), 2) + Strings.Right("00" + Conversion.Hex(ARCO6AData1[num11 + 11]), 2);
if (((((ARCOSearchParamters[index] == str) & (str2 == "000000")) & (str3 == "000000")) & (str4 != "00")) & (str5 == "000000"))
{
Found6AParameters = true;
int num12 = 0;
do
{
StandardARCOProcessData[(((index * 0x88) + 0x38) + 4) + num12] = ARCO6AData1[num11 + num12];
num12++;
}
while (num12 <= 0x17);
break;
}
}
}
else
{
int num32 = Information.UBound(ARCO6AData, 1);
for (int num9 = 0; num9 <= num32; num9++)
{
str = "";
str2 = "";
str3 = "";
str4 = "";
str5 = "";
str = Strings.Right("00" + Conversion.Hex(ARCO6AData[num9]), 2);
if ((num9 + 11) > Information.UBound(ARCO6AData, 1))
{
break;
}
str2 = Strings.Right("00" + Conversion.Hex(ARCO6AData[num9 + 1]), 2) + Strings.Right("00" + Conversion.Hex(ARCO6AData[num9 + 2]), 2) + Strings.Right("00" + Conversion.Hex(ARCO6AData[num9 + 3]), 2);
str3 = Strings.Right("00" + Conversion.Hex(ARCO6AData[num9 + 5]), 2) + Strings.Right("00" + Conversion.Hex(ARCO6AData[num9 + 6]), 2) + Strings.Right("00" + Conversion.Hex(ARCO6AData[num9 + 7]), 2);
str4 = Strings.Right("00" + Conversion.Hex(ARCO6AData[num9 + 8]), 2);
str5 = Strings.Right("00" + Conversion.Hex(ARCO6AData[num9 + 9]), 2) + Strings.Right("00" + Conversion.Hex(ARCO6AData[num9 + 10]), 2) + Strings.Right("00" + Conversion.Hex(ARCO6AData[num9 + 11]), 2);
if (((((ARCOSearchParamters[index] == str) & (str2 == "000000")) & (str3 == "000000")) & (str4 != "00")) & (str5 == "000000"))
{
Found6AParameters = true;
int num10 = 0;
do
{
StandardARCOProcessData[(((index * 0x88) + 0x38) + 4) + num10] = ARCO6AData[num9 + num10];
num10++;
}
while (num10 <= 0x17);
break;
}
}
if (Found6AParameters)
{
break;
}
}
num8++;
}
while (num8 <= 1);
}
else
{
int num3 = 0;
do
{
if (num3 != 0)
{
int num31 = Information.UBound(ARCO6FData1, 1);
for (int num6 = 0; num6 <= num31; num6++)
{
str = "";
str2 = "";
str3 = "";
str4 = "";
str5 = "";
str = Strings.Right("00" + Conversion.Hex(ARCO6FData1[num6]), 2);
if ((num6 + 11) > Information.UBound(ARCO6FData1, 1))
{
break;
}
str2 = Strings.Right("00" + Conversion.Hex(ARCO6FData1[num6 + 1]), 2) + Strings.Right("00" + Conversion.Hex(ARCO6FData1[num6 + 2]), 2) + Strings.Right("00" + Conversion.Hex(ARCO6FData1[num6 + 3]), 2);
str3 = Strings.Right("00" + Conversion.Hex(ARCO6FData1[num6 + 5]), 2) + Strings.Right("00" + Conversion.Hex(ARCO6FData1[num6 + 6]), 2) + Strings.Right("00" + Conversion.Hex(ARCO6FData1[num6 + 7]), 2);
str4 = Strings.Right("00" + Conversion.Hex(ARCO6FData1[num6 + 8]), 2);
str5 = Strings.Right("00" + Conversion.Hex(ARCO6FData1[num6 + 9]), 2) + Strings.Right("00" + Conversion.Hex(ARCO6FData1[num6 + 10]), 2) + Strings.Right("00" + Conversion.Hex(ARCO6FData1[num6 + 11]), 2);
if (((((ARCOSearchParamters[index] == str) & (str2 == "000000")) & (str3 == "000000")) & (str4 != "00")) & (str5 == "000000"))
{
Found6FParameters = true;
int num7 = 0;
do
{
StandardARCOProcessData[(((index * 0x88) + 0x38) + 4) + num7] = ARCO6FData1[num6 + num7];
num7++;
}
while (num7 <= 0x17);
break;
}
}
}
else
{
int num30 = Information.UBound(ARCO6FData, 1);
for (int num4 = 0; num4 <= num30; num4++)
{
str = "";
str2 = "";
str3 = "";
str4 = "";
str5 = "";
str = Strings.Right("00" + Conversion.Hex(ARCO6FData[num4]), 2);
if ((num4 + 11) > Information.UBound(ARCO6FData, 1))
{
break;
}
str2 = Strings.Right("00" + Conversion.Hex(ARCO6FData[num4 + 1]), 2) + Strings.Right("00" + Conversion.Hex(ARCO6FData[num4 + 2]), 2) + Strings.Right("00" + Conversion.Hex(ARCO6FData[num4 + 3]), 2);
str3 = Strings.Right("00" + Conversion.Hex(ARCO6FData[num4 + 5]), 2) + Strings.Right("00" + Conversion.Hex(ARCO6FData[num4 + 6]), 2) + Strings.Right("00" + Conversion.Hex(ARCO6FData[num4 + 7]), 2);
str4 = Strings.Right("00" + Conversion.Hex(ARCO6FData[num4 + 8]), 2);
str5 = Strings.Right("00" + Conversion.Hex(ARCO6FData[num4 + 9]), 2) + Strings.Right("00" + Conversion.Hex(ARCO6FData[num4 + 10]), 2) + Strings.Right("00" + Conversion.Hex(ARCO6FData[num4 + 11]), 2);
if (((((ARCOSearchParamters[index] == str) & (str2 == "000000")) & (str3 == "000000")) & (str4 != "00")) & (str5 == "000000"))
{
Found6FParameters = true;
int num5 = 0;
do
{
StandardARCOProcessData[(((index * 0x88) + 0x38) + 4) + num5] = ARCO6FData[num4 + num5];
num5++;
}
while (num5 <= 0x17);
break;
}
}
if (Found6FParameters)
{
break;
}
}
num3++;
}
while (num3 <= 1);
if (Found6FParameters)
{
WDPassport.AppendSelfcanTxt(":成功. ( 发现 6F 参数 )\r\n");
}
else
{
WDPassport.AppendSelfcanTxt(":失败. ( 没有发现 6F 参数 )\r\n");
}
goto Label_1A43;
}
if (Found6AParameters)
{
WDPassport.AppendSelfcanTxt(":成功. ( 发现 6A 参数 )\r\n");
}
else
{
WDPassport.AppendSelfcanTxt(":失败. ( 没有发现 6A 参数 )\r\n");
}
Label_1A43:
index++;
if (index <= 4)
{
goto Label_00CE;
}
WDSelfscan.SelfscanModuleData = new byte[Information.UBound(StandardARCOProcessData, 1) + 1];
int num40 = Information.UBound(StandardARCOProcessData, 1);
for (int j = 0; j <= num40; j++)
{
WDSelfscan.SelfscanModuleData[j] = StandardARCOProcessData[j];
}
WDSelfscan.SelfscanModuleReadLength = (int) Conversions.ToLong("&h" + Strings.Right("00" + Conversion.Hex(WDSelfscan.SelfscanModuleData[11]), 2) + Strings.Right("00" + Conversion.Hex(WDSelfscan.SelfscanModuleData[10]), 2));
if (WDSelfscan.SelfscanModuleReadLength != 0)
{
WDSelfscan.ShowRolySelfscnScritpNew();
}
}
public static void BuildARCOPSTProcess1()
{
string str = "";
string str2 = "";
string str3 = "";
string str4 = "";
string str5 = "";
ARCOSearchParamters = new string[5];
ShowBuildARCOParamtersNameStr = new string[5];
ARCOSearchParamters[0] = "6F";
ARCOSearchParamters[1] = "6A";
ARCOSearchParamters[2] = "6B";
ARCOSearchParamters[3] = "69";
ARCOSearchParamters[4] = "46";
ShowBuildARCOParamtersNameStr[0] = "TouchDown Calibration 0x6F";
ShowBuildARCOParamtersNameStr[1] = "Writer-Reader Calibration 0x6A";
ShowBuildARCOParamtersNameStr[2] = "TPI Calibration 0x6B";
ShowBuildARCOParamtersNameStr[3] = "VKFCI Head Qualification Test 0x69";
ShowBuildARCOParamtersNameStr[4] = "Full-ARCO 0x46";
Found6FParameters = false;
Found6AParameters = false;
Found6BParameters = false;
Found69Parameters = false;
Found46Parameters = false;
int index = 0;
Label_00CE:
WDModules.ShowStr = "";
WDModules.ShowStr = "建立 " + ShowBuildARCOParamtersNameStr[index] + " Paramters";
WDModules.ShowStr2 = "";
int num31 = 0x34 - Strings.Len(WDModules.ShowStr);
for (int i = 1; i <= num31; i++)
{
WDModules.ShowStr1 = "";
WDModules.ShowStr1 = ".";
WDModules.ShowStr2 = WDModules.ShowStr2 + WDModules.ShowStr1;
MyProject.Application.DoEvents();
}
WDPassport.AppendSelfcanTxt(WDModules.ShowStr + WDModules.ShowStr2);
if (index != 0)
{
if (index != 1)
{
if (index == 2)
{
int num13 = 0;
do
{
if (num13 != 0)
{
int num37 = Information.UBound(ARCO6BData, 1);
for (int k = 0; k <= num37; k++)
{
str = "";
str2 = "";
str3 = "";
str4 = "";
str5 = "";
str = Strings.Right("00" + Conversion.Hex(ARCO6BData[k]), 2);
if ((k + 11) > Information.UBound(ARCO6BData, 1))
{
break;
}
str2 = Strings.Right("00" + Conversion.Hex(ARCO6BData[k + 1]), 2) + Strings.Right("00" + Conversion.Hex(ARCO6BData[k + 2]), 2) + Strings.Right("00" + Conversion.Hex(ARCO6BData[k + 3]), 2);
str3 = Strings.Right("00" + Conversion.Hex(ARCO6BData[k + 5]), 2) + Strings.Right("00" + Conversion.Hex(ARCO6BData[k + 6]), 2) + Strings.Right("00" + Conversion.Hex(ARCO6BData[k + 7]), 2);
str4 = Strings.Right("00" + Conversion.Hex(ARCO6BData[k + 8]), 2);
str5 = Strings.Right("00" + Conversion.Hex(ARCO6BData[k + 9]), 2) + Strings.Right("00" + Conversion.Hex(ARCO6BData[k + 10]), 2) + Strings.Right("00" + Conversion.Hex(ARCO6BData[k + 11]), 2);
if (((((ARCOSearchParamters[index] == str) & (str2 == "000000")) & (str3 == "000000")) & (str4 != "00")) & (str5 == "000000"))
{
Found6BParameters = true;
int num17 = 0;
do
{
StandardARCOProcessData[(((index * 0x88) + 0x38) + 4) + num17] = ARCO6BData[k + num17];
num17++;
}
while (num17 <= 0x3f);
break;
}
}
}
else
{
int num36 = Information.UBound(ARCO6BData1, 1);
for (int m = 0; m <= num36; m++)
{
str = "";
str2 = "";
str3 = "";
str = Strings.Right("00" + Conversion.Hex(ARCO6BData1[m]), 2);
str4 = "";
str5 = "";
if ((m + 11) > Information.UBound(ARCO6BData1, 1))
{
break;
}
str2 = Strings.Right("00" + Conversion.Hex(ARCO6BData1[m + 1]), 2) + Strings.Right("00" + Conversion.Hex(ARCO6BData1[m + 2]), 2) + Strings.Right("00" + Conversion.Hex(ARCO6BData1[m + 3]), 2);
str3 = Strings.Right("00" + Conversion.Hex(ARCO6BData1[m + 5]), 2) + Strings.Right("00" + Conversion.Hex(ARCO6BData1[m + 6]), 2) + Strings.Right("00" + Conversion.Hex(ARCO6BData1[m + 7]), 2);
str4 = Strings.Right("00" + Conversion.Hex(ARCO6BData1[m + 8]), 2);
str5 = Strings.Right("00" + Conversion.Hex(ARCO6BData1[m + 9]), 2) + Strings.Right("00" + Conversion.Hex(ARCO6BData1[m + 10]), 2) + Strings.Right("00" + Conversion.Hex(ARCO6BData1[m + 11]), 2);
if (((((ARCOSearchParamters[index] == str) & (str2 == "000000")) & (str3 == "000000")) & (str4 != "00")) & (str5 == "000000"))
{
Found6BParameters = true;
int num15 = 0;
do
{
StandardARCOProcessData[(((index * 0x88) + 0x38) + 4) + num15] = ARCO6BData1[m + num15];
num15++;
}
while (num15 <= 0x3f);
break;
}
}
if (Found6BParameters)
{
break;
}
}
num13++;
}
while (num13 <= 1);
if (Found6BParameters)
{
WDPassport.AppendSelfcanTxt(":成功. ( 发现 6B 参数 )\r\n");
}
else
{
WDPassport.AppendSelfcanTxt(":失败. ( 没有发现 6B 参数 )\r\n");
}
}
else if (index == 3)
{
int num18 = 0;
do
{
if (num18 != 0)
{
int num39 = Information.UBound(ARCO69Data, 1);
for (int n = 0; n <= num39; n++)
{
str = "";
str2 = "";
str3 = "";
str4 = "";
str5 = "";
str = Strings.Right("00" + Conversion.Hex(ARCO69Data[n]), 2);
if ((n + 60) > Information.UBound(ARCO69Data, 1))
{
break;
}
str2 = Strings.Right("00" + Conversion.Hex(ARCO69Data[n + 1]), 2) + Strings.Right("00" + Conversion.Hex(ARCO69Data[n + 2]), 2) + Strings.Right("00" + Conversion.Hex(ARCO69Data[n + 3]), 2);
str3 = Strings.Right("00" + Conversion.Hex(ARCO69Data[n + 5]), 2) + Strings.Right("00" + Conversion.Hex(ARCO69Data[n + 6]), 2) + Strings.Right("00" + Conversion.Hex(ARCO69Data[n + 7]), 2);
str4 = Strings.Right("00" + Conversion.Hex(ARCO69Data[n + 8]), 2);
str5 = Strings.Right("00" + Conversion.Hex(ARCO69Data[n + 9]), 2) + Strings.Right("00" + Conversion.Hex(ARCO69Data[n + 10]), 2) + Strings.Right("00" + Conversion.Hex(ARCO69Data[n + 11]), 2);
if (((((ARCOSearchParamters[index] == str) & (str2 == "000000")) & (str3 == "000000")) & (str4 != "00")) & (str5 == "000000"))
{
Found69Parameters = true;
int num22 = 0;
do
{
StandardARCOProcessData[(((index * 0x88) + 0x38) + 4) + num22] = ARCO69Data[n + num22];
num22++;
}
while (num22 <= 0x3f);
break;
}
}
}
else
{
int num38 = Information.UBound(ARCO69Data1, 1);
for (int num19 = 0; num19 <= num38; num19++)
{
str = "";
str2 = "";
str3 = "";
str4 = "";
str5 = "";
str = Strings.Right("00" + Conversion.Hex(ARCO69Data1[num19]), 2);
if ((num19 + 60) > Information.UBound(ARCO69Data1, 1))
{
break;
}
str2 = Strings.Right("00" + Conversion.Hex(ARCO69Data1[num19 + 1]), 2) + Strings.Right("00" + Conversion.Hex(ARCO69Data1[num19 + 2]), 2) + Strings.Right("00" + Conversion.Hex(ARCO69Data1[num19 + 3]), 2);
str3 = Strings.Right("00" + Conversion.Hex(ARCO69Data1[num19 + 5]), 2) + Strings.Right("00" + Conversion.Hex(ARCO69Data1[num19 + 6]), 2) + Strings.Right("00" + Conversion.Hex(ARCO69Data1[num19 + 7]), 2);
str4 = Strings.Right("00" + Conversion.Hex(ARCO69Data1[num19 + 8]), 2);
str5 = Strings.Right("00" + Conversion.Hex(ARCO69Data1[num19 + 9]), 2) + Strings.Right("00" + Conversion.Hex(ARCO69Data1[num19 + 10]), 2) + Strings.Right("00" + Conversion.Hex(ARCO69Data1[num19 + 11]), 2);
if (((((ARCOSearchParamters[index] == str) & (str2 == "000000")) & (str3 == "000000")) & (str4 != "00")) & (str5 == "000000"))
{
Found69Parameters = true;
int num20 = 0;
do
{
StandardARCOProcessData[(((index * 0x88) + 0x38) + 4) + num20] = ARCO69Data1[num19 + num20];
num20++;
}
while (num20 <= 0x3f);
break;
}
}
if (Found69Parameters)
{
break;
}
}
num18++;
}
while (num18 <= 1);
if (Found69Parameters)
{
WDPassport.AppendSelfcanTxt(":成功. ( 发现 69 参数 )\r\n");
}
else
{
WDPassport.AppendSelfcanTxt(":失败. ( 没有发现 69 参数 )\r\n");
}
}
else if (index == 4)
{
int num23 = 0;
do
{
if (num23 != 0)
{
int num41 = Information.UBound(ARCO46Data1, 1);
for (int num26 = 0; num26 <= num41; num26++)
{
str = "";
str2 = "";
str3 = "";
str = Strings.Right("00" + Conversion.Hex(ARCO46Data1[num26]), 2);
str4 = "";
str5 = "";
if ((num26 + 11) > Information.UBound(ARCO46Data1, 1))
{
break;
}
str2 = Strings.Right("00" + Conversion.Hex(ARCO46Data1[num26 + 1]), 2) + Strings.Right("00" + Conversion.Hex(ARCO46Data1[num26 + 2]), 2) + Strings.Right("00" + Conversion.Hex(ARCO46Data1[num26 + 3]), 2);
str3 = Strings.Right("00" + Conversion.Hex(ARCO46Data1[num26 + 5]), 2) + Strings.Right("00" + Conversion.Hex(ARCO46Data1[num26 + 6]), 2) + Strings.Right("00" + Conversion.Hex(ARCO46Data1[num26 + 7]), 2);
str4 = Strings.Right("00" + Conversion.Hex(ARCO46Data1[num26 + 8]), 2);
str5 = Strings.Right("00" + Conversion.Hex(ARCO46Data1[num26 + 9]), 2) + Strings.Right("00" + Conversion.Hex(ARCO46Data1[num26 + 10]), 2) + Strings.Right("00" + Conversion.Hex(ARCO46Data1[num26 + 11]), 2);
if (((((ARCOSearchParamters[index] == str) & (str2 == "000000")) & (str3 == "000000")) & (str4 != "00")) & (str5 == "000000"))
{
Found46Parameters = true;
int num27 = 0;
do
{
StandardARCOProcessData[(((index * 0x88) + 0x38) + 4) + num27] = ARCO46Data1[num26 + num27];
num27++;
}
while (num27 <= 0x17);
break;
}
}
}
else
{
int num40 = Information.UBound(ARCO46Data, 1);
for (int num24 = 0; num24 <= num40; num24++)
{
str = "";
str2 = "";
str3 = "";
str = Strings.Right("00" + Conversion.Hex(ARCO46Data[num24]), 2);
str4 = "";
str5 = "";
if ((num24 + 11) > Information.UBound(ARCO46Data, 1))
{
break;
}
str2 = Strings.Right("00" + Conversion.Hex(ARCO46Data[num24 + 1]), 2) + Strings.Right("00" + Conversion.Hex(ARCO46Data[num24 + 2]), 2) + Strings.Right("00" + Conversion.Hex(ARCO46Data[num24 + 3]), 2);
str3 = Strings.Right("00" + Conversion.Hex(ARCO46Data[num24 + 5]), 2) + Strings.Right("00" + Conversion.Hex(ARCO46Data[num24 + 6]), 2) + Strings.Right("00" + Conversion.Hex(ARCO46Data[num24 + 7]), 2);
str4 = Strings.Right("00" + Conversion.Hex(ARCO46Data[num24 + 8]), 2);
str5 = Strings.Right("00" + Conversion.Hex(ARCO46Data[num24 + 9]), 2) + Strings.Right("00" + Conversion.Hex(ARCO46Data[num24 + 10]), 2) + Strings.Right("00" + Conversion.Hex(ARCO46Data[num24 + 11]), 2);
if (((((ARCOSearchParamters[index] == str) & (str2 == "000000")) & (str3 == "000000")) & (str4 != "00")) & (str5 == "000000"))
{
Found46Parameters = true;
int num25 = 0;
do
{
StandardARCOProcessData[(((index * 0x88) + 0x38) + 4) + num25] = ARCO46Data[num24 + num25];
num25++;
}
while (num25 <= 0x17);
break;
}
}
if (Found46Parameters)
{
break;
}
}
num23++;
}
while (num23 <= 1);
if (Found46Parameters)
{
WDPassport.AppendSelfcanTxt(":成功. ( 发现 46 参数 )\r\n");
}
else
{
WDPassport.AppendSelfcanTxt(":失败. ( 没有发现 46 参数 )\r\n");
}
}
goto Label_1A43;
}
int num8 = 0;
do
{
if (num8 != 0)
{
int num35 = Information.UBound(ARCO6AData1, 1);
for (int num11 = 0; num11 <= num35; num11++)
{
str = "";
str2 = "";
str3 = "";
str4 = "";
str5 = "";
str = Strings.Right("00" + Conversion.Hex(ARCO6AData1[num11]), 2);
if ((num11 + 11) > Information.UBound(ARCO6AData1, 1))
{
break;
}
str2 = Strings.Right("00" + Conversion.Hex(ARCO6AData1[num11 + 1]), 2) + Strings.Right("00" + Conversion.Hex(ARCO6AData1[num11 + 2]), 2) + Strings.Right("00" + Conversion.Hex(ARCO6AData1[num11 + 3]), 2);
str3 = Strings.Right("00" + Conversion.Hex(ARCO6AData1[num11 + 5]), 2) + Strings.Right("00" + Conversion.Hex(ARCO6AData1[num11 + 6]), 2) + Strings.Right("00" + Conversion.Hex(ARCO6AData1[num11 + 7]), 2);
str4 = Strings.Right("00" + Conversion.Hex(ARCO6AData1[num11 + 8]), 2);
str5 = Strings.Right("00" + Conversion.Hex(ARCO6AData1[num11 + 9]), 2) + Strings.Right("00" + Conversion.Hex(ARCO6AData1[num11 + 10]), 2) + Strings.Right("00" + Conversion.Hex(ARCO6AData1[num11 + 11]), 2);
if (((((ARCOSearchParamters[index] == str) & (str2 == "000000")) & (str3 == "000000")) & (str4 != "00")) & (str5 == "000000"))
{
Found6AParameters = true;
int num12 = 0;
do
{
StandardARCOProcessData[(((index * 0x88) + 0x38) + 4) + num12] = ARCO6AData1[num11 + num12];
num12++;
}
while (num12 <= 0x17);
break;
}
}
}
else
{
int num34 = Information.UBound(ARCO6AData, 1);
for (int num9 = 0; num9 <= num34; num9++)
{
str = "";
str2 = "";
str3 = "";
str4 = "";
str5 = "";
str = Strings.Right("00" + Conversion.Hex(ARCO6AData[num9]), 2);
if ((num9 + 11) > Information.UBound(ARCO6AData, 1))
{
break;
}
str2 = Strings.Right("00" + Conversion.Hex(ARCO6AData[num9 + 1]), 2) + Strings.Right("00" + Conversion.Hex(ARCO6AData[num9 + 2]), 2) + Strings.Right("00" + Conversion.Hex(ARCO6AData[num9 + 3]), 2);
str3 = Strings.Right("00" + Conversion.Hex(ARCO6AData[num9 + 5]), 2) + Strings.Right("00" + Conversion.Hex(ARCO6AData[num9 + 6]), 2) + Strings.Right("00" + Conversion.Hex(ARCO6AData[num9 + 7]), 2);
str4 = Strings.Right("00" + Conversion.Hex(ARCO6AData[num9 + 8]), 2);
str5 = Strings.Right("00" + Conversion.Hex(ARCO6AData[num9 + 9]), 2) + Strings.Right("00" + Conversion.Hex(ARCO6AData[num9 + 10]), 2) + Strings.Right("00" + Conversion.Hex(ARCO6AData[num9 + 11]), 2);
if (((((ARCOSearchParamters[index] == str) & (str2 == "000000")) & (str3 == "000000")) & (str4 != "00")) & (str5 == "000000"))
{
Found6AParameters = true;
int num10 = 0;
do
{
StandardARCOProcessData[(((index * 0x88) + 0x38) + 4) + num10] = ARCO6AData[num9 + num10];
num10++;
}
while (num10 <= 0x17);
break;
}
}
if (Found6AParameters)
{
break;
}
}
num8++;
}
while (num8 <= 1);
}
else
{
int num3 = 0;
do
{
if (num3 != 0)
{
int num33 = Information.UBound(ARCO6FData1, 1);
for (int num6 = 0; num6 <= num33; num6++)
{
str = "";
str2 = "";
str3 = "";
str4 = "";
str5 = "";
str = Strings.Right("00" + Conversion.Hex(ARCO6FData1[num6]), 2);
if ((num6 + 11) > Information.UBound(ARCO6FData1, 1))
{
break;
}
str2 = Strings.Right("00" + Conversion.Hex(ARCO6FData1[num6 + 1]), 2) + Strings.Right("00" + Conversion.Hex(ARCO6FData1[num6 + 2]), 2) + Strings.Right("00" + Conversion.Hex(ARCO6FData1[num6 + 3]), 2);
str3 = Strings.Right("00" + Conversion.Hex(ARCO6FData1[num6 + 5]), 2) + Strings.Right("00" + Conversion.Hex(ARCO6FData1[num6 + 6]), 2) + Strings.Right("00" + Conversion.Hex(ARCO6FData1[num6 + 7]), 2);
str4 = Strings.Right("00" + Conversion.Hex(ARCO6FData1[num6 + 8]), 2);
str5 = Strings.Right("00" + Conversion.Hex(ARCO6FData1[num6 + 9]), 2) + Strings.Right("00" + Conversion.Hex(ARCO6FData1[num6 + 10]), 2) + Strings.Right("00" + Conversion.Hex(ARCO6FData1[num6 + 11]), 2);
if (((((ARCOSearchParamters[index] == str) & (str2 == "000000")) & (str3 == "000000")) & (str4 != "00")) & (str5 == "000000"))
{
Found6FParameters = true;
int num7 = 0;
do
{
StandardARCOProcessData[(((index * 0x88) + 0x38) + 4) + num7] = ARCO6FData1[num6 + num7];
num7++;
}
while (num7 <= 0x17);
break;
}
}
}
else
{
int num32 = Information.UBound(ARCO6FData, 1);
for (int num4 = 0; num4 <= num32; num4++)
{
str = "";
str2 = "";
str3 = "";
str4 = "";
str5 = "";
str = Strings.Right("00" + Conversion.Hex(ARCO6FData[num4]), 2);
if ((num4 + 11) > Information.UBound(ARCO6FData, 1))
{
break;
}
str2 = Strings.Right("00" + Conversion.Hex(ARCO6FData[num4 + 1]), 2) + Strings.Right("00" + Conversion.Hex(ARCO6FData[num4 + 2]), 2) + Strings.Right("00" + Conversion.Hex(ARCO6FData[num4 + 3]), 2);
str3 = Strings.Right("00" + Conversion.Hex(ARCO6FData[num4 + 5]), 2) + Strings.Right("00" + Conversion.Hex(ARCO6FData[num4 + 6]), 2) + Strings.Right("00" + Conversion.Hex(ARCO6FData[num4 + 7]), 2);
str4 = Strings.Right("00" + Conversion.Hex(ARCO6FData[num4 + 8]), 2);
str5 = Strings.Right("00" + Conversion.Hex(ARCO6FData[num4 + 9]), 2) + Strings.Right("00" + Conversion.Hex(ARCO6FData[num4 + 10]), 2) + Strings.Right("00" + Conversion.Hex(ARCO6FData[num4 + 11]), 2);
if (((((ARCOSearchParamters[index] == str) & (str2 == "000000")) & (str3 == "000000")) & (str4 != "00")) & (str5 == "000000"))
{
Found6FParameters = true;
int num5 = 0;
do
{
StandardARCOProcessData[(((index * 0x88) + 0x38) + 4) + num5] = ARCO6FData[num4 + num5];
num5++;
}
while (num5 <= 0x17);
break;
}
}
if (Found6FParameters)
{
break;
}
}
num3++;
}
while (num3 <= 1);
if (Found6FParameters)
{
WDPassport.AppendSelfcanTxt(":成功. ( 发现 6F 参数 )\r\n");
}
else
{
WDPassport.AppendSelfcanTxt(":失败. ( 没有发现 6F 参数 )\r\n");
}
goto Label_1A43;
}
if (Found6AParameters)
{
WDPassport.AppendSelfcanTxt(":成功. ( 发现 6A 参数 )\r\n");
}
else
{
WDPassport.AppendSelfcanTxt(":失败. ( 没有发现 6A 参数 )\r\n");
}
Label_1A43:
index++;
if (index <= 4)
{
goto Label_00CE;
}
WDModules.ShowStr = "";
WDModules.ShowStr = "建立 PST 流程";
WDModules.ShowStr2 = "";
int num42 = 50 - Strings.Len(WDModules.ShowStr);
for (int j = 1; j <= num42; j++)
{
WDModules.ShowStr1 = "";
WDModules.ShowStr1 = ".";
WDModules.ShowStr2 = WDModules.ShowStr2 + WDModules.ShowStr1;
MyProject.Application.DoEvents();
}
WDPassport.AppendSelfcanTxt(WDModules.ShowStr + WDModules.ShowStr2);
if (WDPassport.WDFWRead(ref Flash.TempData, 1, "0028"))
{
DetectFWParameters.ModuleLength = Conversions.ToLong("&h" + Strings.Right("00" + Conversion.Hex(Flash.TempData[11]), 2) + Strings.Right("00" + Conversion.Hex(Flash.TempData[10]), 2));
if (WDPassport.WDFWRead(ref StandardPSTProcessData, (int) DetectFWParameters.ModuleLength, "0028"))
{
WDSelfscan.SelfscanModuleReadLength = (int) Conversions.ToLong("&h" + Strings.Right("00" + Conversion.Hex(StandardPSTProcessData[11]), 2) + Strings.Right("00" + Conversion.Hex(StandardPSTProcessData[10]), 2));
WDSelfscan.SelfscanModuleData = new byte[((WDSelfscan.SelfscanModuleReadLength * 0x200) - 1) + 1];
int num43 = ((WDSelfscan.SelfscanModuleReadLength * 0x200) - 1) - 0x2e0;
for (int num29 = 0; num29 <= num43; num29++)
{
WDSelfscan.SelfscanModuleData[0x2e0 + num29] = StandardPSTProcessData[0x38 + num29];
}
int num30 = 0;
do
{
WDSelfscan.SelfscanModuleData[num30] = StandardARCOProcessData[num30];
num30++;
}
while (num30 <= 0x2df);
WDSelfscan.ShowRolySelfscnScritpNew();
WDPassport.AppendSelfcanTxt(":成功.\r\n");
}
else if (WDPassport.HDDError)
{
WDErrorCode.GetWDErrorCode();
WDPassport.AppendSelfcanTxt(":失败.(" + WDErrorCode.WDErrorCodeMenas + ")\r\n");
}
else
{
WDPassport.AppendSelfcanTxt(":失败.\r\n");
}
}
else if (WDPassport.HDDError)
{
WDErrorCode.GetWDErrorCode();
WDPassport.AppendSelfcanTxt(":失败.(" + WDErrorCode.WDErrorCodeMenas + ")\r\n");
}
else
{
WDPassport.AppendSelfcanTxt(":失败.\r\n");
}
}
public static void BuildARCOPSTProcessHengholy()
{
string str2 = "";
string str3 = "";
string str4 = "";
string str5 = "";
string str6 = "";
FileControl control = new FileControl();
if ((WDPassport.ProductID == "0125") & SpecialFunctions.LTHaveB2)
{
FileControl.ReadFile(ref StandardARC0PSTProcessData, Application.StartupPath + @"\PST\" + WDPassport.ProductID + @"\APB.BIN");
}
else if ((WDPassport.ProductID == "16EC") & SpecialFunctions.PLHaveB2)
{
FileControl.ReadFile(ref StandardARC0PSTProcessData, Application.StartupPath + @"\PST\" + WDPassport.ProductID + @"\APB.BIN");
}
else if ((WDPassport.ProductID == "16EC") & !SpecialFunctions.PLHaveB2)
{
FileControl.ReadFile(ref StandardARC0PSTProcessData, Application.StartupPath + @"\PST\" + WDPassport.ProductID + @"\AP.BIN");
}
else if ((WDPassport.ProductID == "0179") & SpecialFunctions.XL5XX)
{
FileControl.ReadFile(ref StandardARC0PSTProcessData, Application.StartupPath + @"\PST\" + WDPassport.ProductID + @"\APB.BIN");
}
else if ((WDPassport.ProductID == "16CB") & SpecialFunctions.PinnacleLite320GB)
{
FileControl.ReadFile(ref StandardARC0PSTProcessData, Application.StartupPath + @"\PST\" + WDPassport.ProductID + @"\AP3.BIN");
}
else if ((WDPassport.ProductID == "169F") & SpecialFunctions.Pinnacle320GB)
{
FileControl.ReadFile(ref StandardARC0PSTProcessData, Application.StartupPath + @"\PST\" + WDPassport.ProductID + @"\AP3.BIN");
}
else
{
FileControl.ReadFile(ref StandardARC0PSTProcessData, Application.StartupPath + @"\PST\" + WDPassport.ProductID + @"\AP.BIN");
}
ARCOSearchParamters = new string[5];
ShowBuildARCOParamtersNameStr = new string[5];
ARCOSearchParamters[0] = "6F";
ARCOSearchParamters[1] = "6A";
ARCOSearchParamters[2] = "6B";
ARCOSearchParamters[3] = "69";
ARCOSearchParamters[4] = "46";
ShowBuildARCOParamtersNameStr[0] = "TouchDown Calibration 0x6F";
ShowBuildARCOParamtersNameStr[1] = "Writer-Reader Calibration 0x6A";
ShowBuildARCOParamtersNameStr[2] = "TPI Calibration 0x6B";
ShowBuildARCOParamtersNameStr[3] = "VKFCI Head Qualification Test 0x69";
ShowBuildARCOParamtersNameStr[4] = "Full-ARCO 0x46";
Found6FParameters = false;
Found6AParameters = false;
Found6BParameters = false;
Found69Parameters = false;
Found46Parameters = false;
int index = 0;
Label_028F:
WDModules.ShowStr = "";
WDModules.ShowStr = "建立 " + ShowBuildARCOParamtersNameStr[index] + " Paramters";
WDModules.ShowStr2 = "";
int num33 = 0x34 - Strings.Len(WDModules.ShowStr);
for (int i = 1; i <= num33; i++)
{
WDModules.ShowStr1 = "";
WDModules.ShowStr1 = ".";
WDModules.ShowStr2 = WDModules.ShowStr2 + WDModules.ShowStr1;
MyProject.Application.DoEvents();
}
WDPassport.AppendSelfcanTxt(WDModules.ShowStr + WDModules.ShowStr2);
if (index != 0)
{
if (index != 1)
{
if (index == 2)
{
int num13 = 0;
do
{
if (num13 != 0)
{
int num39 = Information.UBound(ARCO6BData, 1);
for (int j = 0; j <= num39; j++)
{
str2 = "";
str3 = "";
str4 = "";
str5 = "";
str6 = "";
str2 = Strings.Right("00" + Conversion.Hex(ARCO6BData[j]), 2);
if ((j + 11) > Information.UBound(ARCO6BData, 1))
{
break;
}
str3 = Strings.Right("00" + Conversion.Hex(ARCO6BData[j + 1]), 2) + Strings.Right("00" + Conversion.Hex(ARCO6BData[j + 2]), 2) + Strings.Right("00" + Conversion.Hex(ARCO6BData[j + 3]), 2);
str4 = Strings.Right("00" + Conversion.Hex(ARCO6BData[j + 5]), 2) + Strings.Right("00" + Conversion.Hex(ARCO6BData[j + 6]), 2) + Strings.Right("00" + Conversion.Hex(ARCO6BData[j + 7]), 2);
str5 = Strings.Right("00" + Conversion.Hex(ARCO6BData[j + 8]), 2);
str6 = Strings.Right("00" + Conversion.Hex(ARCO6BData[j + 9]), 2) + Strings.Right("00" + Conversion.Hex(ARCO6BData[j + 10]), 2) + Strings.Right("00" + Conversion.Hex(ARCO6BData[j + 11]), 2);
if (((((ARCOSearchParamters[index] == str2) & (str3 == "000000")) & (str4 == "000000")) & (str5 != "00")) & (str6 == "000000"))
{
Found6BParameters = true;
int num17 = 0;
do
{
StandardARC0PSTProcessData[(((index * 0x88) + 0x38) + 4) + num17] = ARCO6BData[j + num17];
num17++;
}
while (num17 <= 0x3f);
break;
}
}
}
else
{
int num38 = Information.UBound(ARCO6BData1, 1);
for (int k = 0; k <= num38; k++)
{
str2 = "";
str3 = "";
str4 = "";
str2 = Strings.Right("00" + Conversion.Hex(ARCO6BData1[k]), 2);
str5 = "";
str6 = "";
if ((k + 11) > Information.UBound(ARCO6BData1, 1))
{
break;
}
str3 = Strings.Right("00" + Conversion.Hex(ARCO6BData1[k + 1]), 2) + Strings.Right("00" + Conversion.Hex(ARCO6BData1[k + 2]), 2) + Strings.Right("00" + Conversion.Hex(ARCO6BData1[k + 3]), 2);
str4 = Strings.Right("00" + Conversion.Hex(ARCO6BData1[k + 5]), 2) + Strings.Right("00" + Conversion.Hex(ARCO6BData1[k + 6]), 2) + Strings.Right("00" + Conversion.Hex(ARCO6BData1[k + 7]), 2);
str5 = Strings.Right("00" + Conversion.Hex(ARCO6BData1[k + 8]), 2);
str6 = Strings.Right("00" + Conversion.Hex(ARCO6BData1[k + 9]), 2) + Strings.Right("00" + Conversion.Hex(ARCO6BData1[k + 10]), 2) + Strings.Right("00" + Conversion.Hex(ARCO6BData1[k + 11]), 2);
if (((((ARCOSearchParamters[index] == str2) & (str3 == "000000")) & (str4 == "000000")) & (str5 != "00")) & (str6 == "000000"))
{
Found6BParameters = true;
int num15 = 0;
do
{
StandardARC0PSTProcessData[(((index * 0x88) + 0x38) + 4) + num15] = ARCO6BData1[k + num15];
num15++;
}
while (num15 <= 0x3f);
break;
}
}
if (Found6BParameters)
{
break;
}
}
num13++;
}
while (num13 <= 1);
if (Found6BParameters)
{
WDPassport.AppendSelfcanTxt(":成功. ( 发现 6B 参数 )\r\n");
}
else
{
WDPassport.AppendSelfcanTxt(":失败. ( 没有发现 6B 参数 )\r\n");
}
}
else if (index == 3)
{
int num18 = 0;
do
{
if (num18 != 0)
{
int num41 = Information.UBound(ARCO69Data, 1);
for (int m = 0; m <= num41; m++)
{
str2 = "";
str3 = "";
str4 = "";
str5 = "";
str6 = "";
str2 = Strings.Right("00" + Conversion.Hex(ARCO69Data[m]), 2);
if ((m + 60) > Information.UBound(ARCO69Data, 1))
{
break;
}
str3 = Strings.Right("00" + Conversion.Hex(ARCO69Data[m + 1]), 2) + Strings.Right("00" + Conversion.Hex(ARCO69Data[m + 2]), 2) + Strings.Right("00" + Conversion.Hex(ARCO69Data[m + 3]), 2);
str4 = Strings.Right("00" + Conversion.Hex(ARCO69Data[m + 5]), 2) + Strings.Right("00" + Conversion.Hex(ARCO69Data[m + 6]), 2) + Strings.Right("00" + Conversion.Hex(ARCO69Data[m + 7]), 2);
str5 = Strings.Right("00" + Conversion.Hex(ARCO69Data[m + 8]), 2);
str6 = Strings.Right("00" + Conversion.Hex(ARCO69Data[m + 9]), 2) + Strings.Right("00" + Conversion.Hex(ARCO69Data[m + 10]), 2) + Strings.Right("00" + Conversion.Hex(ARCO69Data[m + 11]), 2);
if (((((ARCOSearchParamters[index] == str2) & (str3 == "000000")) & (str4 == "000000")) & (str5 != "00")) & (str6 == "000000"))
{
Found69Parameters = true;
int num22 = 0;
do
{
StandardARC0PSTProcessData[(((index * 0x88) + 0x38) + 4) + num22] = ARCO69Data[m + num22];
num22++;
}
while (num22 <= 0x3f);
break;
}
}
}
else
{
int num40 = Information.UBound(ARCO69Data1, 1);
for (int n = 0; n <= num40; n++)
{
str2 = "";
str3 = "";
str4 = "";
str5 = "";
str6 = "";
str2 = Strings.Right("00" + Conversion.Hex(ARCO69Data1[n]), 2);
if ((n + 60) > Information.UBound(ARCO69Data1, 1))
{
break;
}
str3 = Strings.Right("00" + Conversion.Hex(ARCO69Data1[n + 1]), 2) + Strings.Right("00" + Conversion.Hex(ARCO69Data1[n + 2]), 2) + Strings.Right("00" + Conversion.Hex(ARCO69Data1[n + 3]), 2);
str4 = Strings.Right("00" + Conversion.Hex(ARCO69Data1[n + 5]), 2) + Strings.Right("00" + Conversion.Hex(ARCO69Data1[n + 6]), 2) + Strings.Right("00" + Conversion.Hex(ARCO69Data1[n + 7]), 2);
str5 = Strings.Right("00" + Conversion.Hex(ARCO69Data1[n + 8]), 2);
str6 = Strings.Right("00" + Conversion.Hex(ARCO69Data1[n + 9]), 2) + Strings.Right("00" + Conversion.Hex(ARCO69Data1[n + 10]), 2) + Strings.Right("00" + Conversion.Hex(ARCO69Data1[n + 11]), 2);
if (((((ARCOSearchParamters[index] == str2) & (str3 == "000000")) & (str4 == "000000")) & (str5 != "00")) & (str6 == "000000"))
{
Found69Parameters = true;
int num20 = 0;
do
{
StandardARC0PSTProcessData[(((index * 0x88) + 0x38) + 4) + num20] = ARCO69Data1[n + num20];
num20++;
}
while (num20 <= 0x3f);
break;
}
}
if (Found69Parameters)
{
break;
}
}
num18++;
}
while (num18 <= 1);
if (Found69Parameters)
{
WDPassport.AppendSelfcanTxt(":成功. ( 发现 69 参数 )\r\n");
}
else
{
WDPassport.AppendSelfcanTxt(":失败. ( 没有发现 69 参数 )\r\n");
}
}
else if (index == 4)
{
int num23 = 0;
do
{
if (num23 != 0)
{
int num43 = Information.UBound(ARCO46Data1, 1);
for (int num26 = 0; num26 <= num43; num26++)
{
str2 = "";
str3 = "";
str4 = "";
str2 = Strings.Right("00" + Conversion.Hex(ARCO46Data1[num26]), 2);
str5 = "";
str6 = "";
if ((num26 + 11) > Information.UBound(ARCO46Data1, 1))
{
break;
}
str3 = Strings.Right("00" + Conversion.Hex(ARCO46Data1[num26 + 1]), 2) + Strings.Right("00" + Conversion.Hex(ARCO46Data1[num26 + 2]), 2) + Strings.Right("00" + Conversion.Hex(ARCO46Data1[num26 + 3]), 2);
str4 = Strings.Right("00" + Conversion.Hex(ARCO46Data1[num26 + 5]), 2) + Strings.Right("00" + Conversion.Hex(ARCO46Data1[num26 + 6]), 2) + Strings.Right("00" + Conversion.Hex(ARCO46Data1[num26 + 7]), 2);
str5 = Strings.Right("00" + Conversion.Hex(ARCO46Data1[num26 + 8]), 2);
str6 = Strings.Right("00" + Conversion.Hex(ARCO46Data1[num26 + 9]), 2) + Strings.Right("00" + Conversion.Hex(ARCO46Data1[num26 + 10]), 2) + Strings.Right("00" + Conversion.Hex(ARCO46Data1[num26 + 11]), 2);
if (((((ARCOSearchParamters[index] == str2) & (str3 == "000000")) & (str4 == "000000")) & (str5 != "00")) & (str6 == "000000"))
{
Found46Parameters = true;
int num27 = 0;
do
{
StandardARC0PSTProcessData[((((index + 1) * 0x88) + 0x38) + 4) + num27] = ARCO46Data1[num26 + num27];
num27++;
}
while (num27 <= 0x17);
break;
}
}
}
else
{
int num42 = Information.UBound(ARCO46Data, 1);
for (int num24 = 0; num24 <= num42; num24++)
{
str2 = "";
str3 = "";
str4 = "";
str2 = Strings.Right("00" + Conversion.Hex(ARCO46Data[num24]), 2);
str5 = "";
str6 = "";
if ((num24 + 11) > Information.UBound(ARCO46Data, 1))
{
break;
}
str3 = Strings.Right("00" + Conversion.Hex(ARCO46Data[num24 + 1]), 2) + Strings.Right("00" + Conversion.Hex(ARCO46Data[num24 + 2]), 2) + Strings.Right("00" + Conversion.Hex(ARCO46Data[num24 + 3]), 2);
str4 = Strings.Right("00" + Conversion.Hex(ARCO46Data[num24 + 5]), 2) + Strings.Right("00" + Conversion.Hex(ARCO46Data[num24 + 6]), 2) + Strings.Right("00" + Conversion.Hex(ARCO46Data[num24 + 7]), 2);
str5 = Strings.Right("00" + Conversion.Hex(ARCO46Data[num24 + 8]), 2);
str6 = Strings.Right("00" + Conversion.Hex(ARCO46Data[num24 + 9]), 2) + Strings.Right("00" + Conversion.Hex(ARCO46Data[num24 + 10]), 2) + Strings.Right("00" + Conversion.Hex(ARCO46Data[num24 + 11]), 2);
if (((((ARCOSearchParamters[index] == str2) & (str3 == "000000")) & (str4 == "000000")) & (str5 != "00")) & (str6 == "000000"))
{
Found46Parameters = true;
int num25 = 0;
do
{
StandardARC0PSTProcessData[((((index + 1) * 0x88) + 0x38) + 4) + num25] = ARCO46Data[num24 + num25];
num25++;
}
while (num25 <= 0x17);
break;
}
}
if (Found46Parameters)
{
break;
}
}
num23++;
}
while (num23 <= 1);
if (Found46Parameters)
{
WDPassport.AppendSelfcanTxt(":成功. ( 发现 46 参数 )\r\n");
}
else
{
WDPassport.AppendSelfcanTxt(":失败. ( 没有发现 46 参数 )\r\n");
}
}
goto Label_1C44;
}
int num8 = 0;
do
{
if (num8 != 0)
{
int num37 = Information.UBound(ARCO6AData1, 1);
for (int num11 = 0; num11 <= num37; num11++)
{
str2 = "";
str3 = "";
str4 = "";
str5 = "";
str6 = "";
str2 = Strings.Right("00" + Conversion.Hex(ARCO6AData1[num11]), 2);
if ((num11 + 11) > Information.UBound(ARCO6AData1, 1))
{
break;
}
str3 = Strings.Right("00" + Conversion.Hex(ARCO6AData1[num11 + 1]), 2) + Strings.Right("00" + Conversion.Hex(ARCO6AData1[num11 + 2]), 2) + Strings.Right("00" + Conversion.Hex(ARCO6AData1[num11 + 3]), 2);
str4 = Strings.Right("00" + Conversion.Hex(ARCO6AData1[num11 + 5]), 2) + Strings.Right("00" + Conversion.Hex(ARCO6AData1[num11 + 6]), 2) + Strings.Right("00" + Conversion.Hex(ARCO6AData1[num11 + 7]), 2);
str5 = Strings.Right("00" + Conversion.Hex(ARCO6AData1[num11 + 8]), 2);
str6 = Strings.Right("00" + Conversion.Hex(ARCO6AData1[num11 + 9]), 2) + Strings.Right("00" + Conversion.Hex(ARCO6AData1[num11 + 10]), 2) + Strings.Right("00" + Conversion.Hex(ARCO6AData1[num11 + 11]), 2);
if (((((ARCOSearchParamters[index] == str2) & (str3 == "000000")) & (str4 == "000000")) & (str5 != "00")) & (str6 == "000000"))
{
Found6AParameters = true;
int num12 = 0;
do
{
StandardARC0PSTProcessData[(((index * 0x88) + 0x38) + 4) + num12] = ARCO6AData1[num11 + num12];
num12++;
}
while (num12 <= 0x17);
break;
}
}
}
else
{
int num36 = Information.UBound(ARCO6AData, 1);
for (int num9 = 0; num9 <= num36; num9++)
{
str2 = "";
str3 = "";
str4 = "";
str5 = "";
str6 = "";
str2 = Strings.Right("00" + Conversion.Hex(ARCO6AData[num9]), 2);
if ((num9 + 11) > Information.UBound(ARCO6AData, 1))
{
break;
}
str3 = Strings.Right("00" + Conversion.Hex(ARCO6AData[num9 + 1]), 2) + Strings.Right("00" + Conversion.Hex(ARCO6AData[num9 + 2]), 2) + Strings.Right("00" + Conversion.Hex(ARCO6AData[num9 + 3]), 2);
str4 = Strings.Right("00" + Conversion.Hex(ARCO6AData[num9 + 5]), 2) + Strings.Right("00" + Conversion.Hex(ARCO6AData[num9 + 6]), 2) + Strings.Right("00" + Conversion.Hex(ARCO6AData[num9 + 7]), 2);
str5 = Strings.Right("00" + Conversion.Hex(ARCO6AData[num9 + 8]), 2);
str6 = Strings.Right("00" + Conversion.Hex(ARCO6AData[num9 + 9]), 2) + Strings.Right("00" + Conversion.Hex(ARCO6AData[num9 + 10]), 2) + Strings.Right("00" + Conversion.Hex(ARCO6AData[num9 + 11]), 2);
if (((((ARCOSearchParamters[index] == str2) & (str3 == "000000")) & (str4 == "000000")) & (str5 != "00")) & (str6 == "000000"))
{
Found6AParameters = true;
int num10 = 0;
do
{
StandardARC0PSTProcessData[(((index * 0x88) + 0x38) + 4) + num10] = ARCO6AData[num9 + num10];
num10++;
}
while (num10 <= 0x17);
break;
}
}
if (Found6AParameters)
{
break;
}
}
num8++;
}
while (num8 <= 1);
}
else
{
int num3 = 0;
do
{
if (num3 != 0)
{
int num35 = Information.UBound(ARCO6FData1, 1);
for (int num6 = 0; num6 <= num35; num6++)
{
str2 = "";
str3 = "";
str4 = "";
str5 = "";
str6 = "";
str2 = Strings.Right("00" + Conversion.Hex(ARCO6FData1[num6]), 2);
if ((num6 + 11) > Information.UBound(ARCO6FData1, 1))
{
break;
}
str3 = Strings.Right("00" + Conversion.Hex(ARCO6FData1[num6 + 1]), 2) + Strings.Right("00" + Conversion.Hex(ARCO6FData1[num6 + 2]), 2) + Strings.Right("00" + Conversion.Hex(ARCO6FData1[num6 + 3]), 2);
str4 = Strings.Right("00" + Conversion.Hex(ARCO6FData1[num6 + 5]), 2) + Strings.Right("00" + Conversion.Hex(ARCO6FData1[num6 + 6]), 2) + Strings.Right("00" + Conversion.Hex(ARCO6FData1[num6 + 7]), 2);
str5 = Strings.Right("00" + Conversion.Hex(ARCO6FData1[num6 + 8]), 2);
str6 = Strings.Right("00" + Conversion.Hex(ARCO6FData1[num6 + 9]), 2) + Strings.Right("00" + Conversion.Hex(ARCO6FData1[num6 + 10]), 2) + Strings.Right("00" + Conversion.Hex(ARCO6FData1[num6 + 11]), 2);
if (((((ARCOSearchParamters[index] == str2) & (str3 == "000000")) & (str4 == "000000")) & (str5 != "00")) & (str6 == "000000"))
{
Found6FParameters = true;
int num7 = 0;
do
{
StandardARC0PSTProcessData[(((index * 0x88) + 0x38) + 4) + num7] = ARCO6FData1[num6 + num7];
num7++;
}
while (num7 <= 0x17);
break;
}
}
}
else
{
int num34 = Information.UBound(ARCO6FData, 1);
for (int num4 = 0; num4 <= num34; num4++)
{
str2 = "";
str3 = "";
str4 = "";
str5 = "";
str6 = "";
str2 = Strings.Right("00" + Conversion.Hex(ARCO6FData[num4]), 2);
if ((num4 + 11) > Information.UBound(ARCO6FData, 1))
{
break;
}
str3 = Strings.Right("00" + Conversion.Hex(ARCO6FData[num4 + 1]), 2) + Strings.Right("00" + Conversion.Hex(ARCO6FData[num4 + 2]), 2) + Strings.Right("00" + Conversion.Hex(ARCO6FData[num4 + 3]), 2);
str4 = Strings.Right("00" + Conversion.Hex(ARCO6FData[num4 + 5]), 2) + Strings.Right("00" + Conversion.Hex(ARCO6FData[num4 + 6]), 2) + Strings.Right("00" + Conversion.Hex(ARCO6FData[num4 + 7]), 2);
str5 = Strings.Right("00" + Conversion.Hex(ARCO6FData[num4 + 8]), 2);
str6 = Strings.Right("00" + Conversion.Hex(ARCO6FData[num4 + 9]), 2) + Strings.Right("00" + Conversion.Hex(ARCO6FData[num4 + 10]), 2) + Strings.Right("00" + Conversion.Hex(ARCO6FData[num4 + 11]), 2);
if (((((ARCOSearchParamters[index] == str2) & (str3 == "000000")) & (str4 == "000000")) & (str5 != "00")) & (str6 == "000000"))
{
Found6FParameters = true;
int num5 = 0;
do
{
StandardARC0PSTProcessData[(((index * 0x88) + 0x38) + 4) + num5] = ARCO6FData[num4 + num5];
num5++;
}
while (num5 <= 0x17);
break;
}
}
if (Found6FParameters)
{
break;
}
}
num3++;
}
while (num3 <= 1);
if (Found6FParameters)
{
WDPassport.AppendSelfcanTxt(":成功. ( 发现 6F 参数 )\r\n");
}
else
{
WDPassport.AppendSelfcanTxt(":失败. ( 没有发现 6F 参数 )\r\n");
}
goto Label_1C44;
}
if (Found6AParameters)
{
WDPassport.AppendSelfcanTxt(":成功. ( 发现 6A 参数 )\r\n");
}
else
{
WDPassport.AppendSelfcanTxt(":失败. ( 没有发现 6A 参数 )\r\n");
}
Label_1C44:
index++;
if (index <= 4)
{
goto Label_028F;
}
WDSelfscan.SelfscanModuleReadLength = 0;
WDSelfscan.SelfscanModuleReadLength = (int) Conversions.ToLong("&h" + Strings.Right("00" + Conversion.Hex(StandardARC0PSTProcessData[11]), 2) + Strings.Right("00" + Conversion.Hex(StandardARC0PSTProcessData[10]), 2));
if (((WDPassport.ProductID != "0125") && (WDPassport.ProductID != "16E5")) && ((WDPassport.ProductID != "16EC") && (WDPassport.ProductID != "0179")))
{
if (WDPassport.ProductID == "16CB")
{
int num28 = 0;
do
{
StandardARC0PSTProcessData[0x164 + num28] = 0;
num28++;
}
while (num28 <= 0x2b);
int num29 = 0;
do
{
StandardARC0PSTProcessData[0x1ec + num29] = 0;
num29++;
}
while (num29 <= 3);
}
else if (WDPassport.ProductID == "169F")
{
int num30 = 0;
do
{
StandardARC0PSTProcessData[0x164 + num30] = 0;
num30++;
}
while (num30 <= 0x2b);
int num31 = 0;
do
{
StandardARC0PSTProcessData[0x1ec + num31] = 0;
num31++;
}
while (num31 <= 3);
}
else
{
int num32 = 0;
do
{
StandardARC0PSTProcessData[0x480 + num32] = StandardARC0PSTProcessData[0x40 + num32];
num32++;
}
while (num32 <= 11);
}
}
string str = "";
str = ChecsumCalc.Roly32BitCheckSumCalcFile(StandardARC0PSTProcessData, (long) WDSelfscan.SelfscanModuleReadLength);
StandardARC0PSTProcessData[12] = (byte) Conversions.ToLong("&h" + Strings.Mid(str, 1, 2));
StandardARC0PSTProcessData[13] = (byte) Conversions.ToLong("&h" + Strings.Mid(str, 3, 2));
StandardARC0PSTProcessData[14] = (byte) Conversions.ToLong("&h" + Strings.Mid(str, 5, 2));
StandardARC0PSTProcessData[15] = (byte) Conversions.ToLong("&h" + Strings.Mid(str, 7, 2));
WDPassport.AppendSelfcanTxt("Saving Script To Disc ........................");
if (WDPassport.WDFWWrite(ref StandardARC0PSTProcessData, WDSelfscan.SelfscanModuleReadLength, "0028"))
{
WDPassport.AppendSelfcanTxt(":Success.\r\n");
if (WDPassport.ProductID == "169F")
{
WDSelfscan.Change6F6ALocationMew();
}
ShowRolySelfscnScritpNew1();
}
else if (WDPassport.HDDError)
{
WDErrorCode.GetWDErrorCode();
WDPassport.AppendSelfcanTxt(":FAIL.(" + WDErrorCode.WDErrorCodeMenas + ")\r\n");
}
else
{
WDPassport.AppendSelfcanTxt(":FAIL.\r\n");
}
}
public static void Clear0x30()
{
string str = "";
if (WDPassport.WDFWRead(ref Flash.TempData, 1, "0030"))
{
DetectFWParameters.ModuleLength = Conversions.ToLong("&h" + Strings.Right("00" + Conversion.Hex(Flash.TempData[11]), 2) + Strings.Right("00" + Conversion.Hex(Flash.TempData[10]), 2));
WDModules.WDModuleData = new byte[((int) ((DetectFWParameters.ModuleLength * 0x200L) - 1L)) + 1];
int index = 0;
do
{
WDModules.WDModuleData[index] = Flash.TempData[index];
index++;
}
while (index <= 0x17);
str = "";
str = ChecsumCalc.Roly32BitCheckSumCalcFile(WDModules.WDModuleData, DetectFWParameters.ModuleLength);
WDModules.WDModuleData[12] = (byte) Conversions.ToLong("&h" + Strings.Mid(str, 1, 2));
WDModules.WDModuleData[13] = (byte) Conversions.ToLong("&h" + Strings.Mid(str, 3, 2));
WDModules.WDModuleData[14] = (byte) Conversions.ToLong("&h" + Strings.Mid(str, 5, 2));
WDModules.WDModuleData[15] = (byte) Conversions.ToLong("&h" + Strings.Mid(str, 7, 2));
if (WDPassport.WDFWWrite(ref WDModules.WDModuleData, (int) DetectFWParameters.ModuleLength, "0030"))
{
Interaction.MsgBox("清除30成功!\r\n", MsgBoxStyle.ApplicationModal, null);
}
else if (WDPassport.HDDError)
{
WDErrorCode.GetWDErrorCode();
Interaction.MsgBox("清除30失败!(" + WDErrorCode.WDErrorCodeMenas + ")\r\n", MsgBoxStyle.ApplicationModal, null);
}
else
{
Interaction.MsgBox("清除30失败!\r\n", MsgBoxStyle.ApplicationModal, null);
}
}
else if (WDPassport.HDDError)
{
WDErrorCode.GetWDErrorCode();
Interaction.MsgBox("清除30失败!(" + WDErrorCode.WDErrorCodeMenas + ")\r\n", MsgBoxStyle.ApplicationModal, null);
}
else
{
Interaction.MsgBox("清除30失败!\r\n", MsgBoxStyle.ApplicationModal, null);
}
}
public static void Clear0x35()
{
string str = "";
if (WDPassport.WDFWRead(ref Flash.TempData, 1, "0035"))
{
DetectFWParameters.ModuleLength = Conversions.ToLong("&h" + Strings.Right("00" + Conversion.Hex(Flash.TempData[11]), 2) + Strings.Right("00" + Conversion.Hex(Flash.TempData[10]), 2));
WDModules.WDModuleData = new byte[((int) ((DetectFWParameters.ModuleLength * 0x200L) - 1L)) + 1];
int index = 0;
do
{
WDModules.WDModuleData[index] = Flash.TempData[index];
index++;
}
while (index <= 0x17);
str = "";
str = ChecsumCalc.Roly32BitCheckSumCalcFile(WDModules.WDModuleData, DetectFWParameters.ModuleLength);
WDModules.WDModuleData[12] = (byte) Conversions.ToLong("&h" + Strings.Mid(str, 1, 2));
WDModules.WDModuleData[13] = (byte) Conversions.ToLong("&h" + Strings.Mid(str, 3, 2));
WDModules.WDModuleData[14] = (byte) Conversions.ToLong("&h" + Strings.Mid(str, 5, 2));
WDModules.WDModuleData[15] = (byte) Conversions.ToLong("&h" + Strings.Mid(str, 7, 2));
if (WDPassport.WDFWWrite(ref WDModules.WDModuleData, (int) DetectFWParameters.ModuleLength, "0035"))
{
Interaction.MsgBox("清除35成功!\r\n", MsgBoxStyle.ApplicationModal, null);
}
else if (WDPassport.HDDError)
{
WDErrorCode.GetWDErrorCode();
Interaction.MsgBox("清除35失败!(" + WDErrorCode.WDErrorCodeMenas + ")\r\n", MsgBoxStyle.ApplicationModal, null);
}
else
{
Interaction.MsgBox("清除35失败!\r\n", MsgBoxStyle.ApplicationModal, null);
}
}
else if (WDPassport.HDDError)
{
WDErrorCode.GetWDErrorCode();
Interaction.MsgBox("清除35失败!(" + WDErrorCode.WDErrorCodeMenas + ")\r\n", MsgBoxStyle.ApplicationModal, null);
}
else
{
Interaction.MsgBox("清除35失败!\r\n", MsgBoxStyle.ApplicationModal, null);
}
}
public static void Clear0x350x30()
{
string[] strArray = new string[] { "0035", "0030" };
int index = 0;
do
{
string str = "";
if (WDPassport.WDFWRead(ref Flash.TempData, 1, strArray[index]))
{
DetectFWParameters.ModuleLength = Conversions.ToLong("&h" + Strings.Right("00" + Conversion.Hex(Flash.TempData[11]), 2) + Strings.Right("00" + Conversion.Hex(Flash.TempData[10]), 2));
WDModules.WDModuleData = new byte[((int) ((DetectFWParameters.ModuleLength * 0x200L) - 1L)) + 1];
int num2 = 0;
do
{
WDModules.WDModuleData[num2] = Flash.TempData[num2];
num2++;
}
while (num2 <= 0x17);
str = "";
str = ChecsumCalc.Roly32BitCheckSumCalcFile(WDModules.WDModuleData, DetectFWParameters.ModuleLength);
WDModules.WDModuleData[12] = (byte) Conversions.ToLong("&h" + Strings.Mid(str, 1, 2));
WDModules.WDModuleData[13] = (byte) Conversions.ToLong("&h" + Strings.Mid(str, 3, 2));
WDModules.WDModuleData[14] = (byte) Conversions.ToLong("&h" + Strings.Mid(str, 5, 2));
WDModules.WDModuleData[15] = (byte) Conversions.ToLong("&h" + Strings.Mid(str, 7, 2));
if (!WDPassport.WDFWWrite(ref WDModules.WDModuleData, (int) DetectFWParameters.ModuleLength, strArray[index]))
{
if (index == 0)
{
if (WDPassport.HDDError)
{
WDErrorCode.GetWDErrorCode();
Interaction.MsgBox("清除35失败!(" + WDErrorCode.WDErrorCodeMenas + ")\r\n", MsgBoxStyle.ApplicationModal, null);
}
else
{
Interaction.MsgBox("清除35失败!\r\n", MsgBoxStyle.ApplicationModal, null);
}
}
else if (WDPassport.HDDError)
{
WDErrorCode.GetWDErrorCode();
Interaction.MsgBox("清除30失败!(" + WDErrorCode.WDErrorCodeMenas + ")\r\n", MsgBoxStyle.ApplicationModal, null);
}
else
{
Interaction.MsgBox("清除30失败!\r\n", MsgBoxStyle.ApplicationModal, null);
}
}
}
else if (index == 0)
{
if (WDPassport.HDDError)
{
WDErrorCode.GetWDErrorCode();
Interaction.MsgBox("清除35失败!(" + WDErrorCode.WDErrorCodeMenas + ")\r\n", MsgBoxStyle.ApplicationModal, null);
}
else
{
Interaction.MsgBox("清除35失败!\r\n", MsgBoxStyle.ApplicationModal, null);
}
}
else if (WDPassport.HDDError)
{
WDErrorCode.GetWDErrorCode();
Interaction.MsgBox("清除30失败!(" + WDErrorCode.WDErrorCodeMenas + ")\r\n", MsgBoxStyle.ApplicationModal, null);
}
else
{
Interaction.MsgBox("清除30失败!\r\n", MsgBoxStyle.ApplicationModal, null);
}
index++;
}
while (index <= 1);
Interaction.MsgBox("清除35+30,动作完成!\r\n", MsgBoxStyle.ApplicationModal, null);
}
public static void Clear0x47()
{
string str = "";
if (WDPassport.WDFWRead(ref Flash.TempData, 1, "0047"))
{
DetectFWParameters.ModuleLength = Conversions.ToLong("&h" + Strings.Right("00" + Conversion.Hex(Flash.TempData[11]), 2) + Strings.Right("00" + Conversion.Hex(Flash.TempData[10]), 2));
WDModules.WDModuleData = new byte[((int) ((DetectFWParameters.ModuleLength * 0x200L) - 1L)) + 1];
int index = 0;
do
{
WDModules.WDModuleData[index] = Flash.TempData[index];
index++;
}
while (index <= 0x17);
str = "";
str = ChecsumCalc.Roly32BitCheckSumCalcFile(WDModules.WDModuleData, DetectFWParameters.ModuleLength);
WDModules.WDModuleData[12] = (byte) Conversions.ToLong("&h" + Strings.Mid(str, 1, 2));
WDModules.WDModuleData[13] = (byte) Conversions.ToLong("&h" + Strings.Mid(str, 3, 2));
WDModules.WDModuleData[14] = (byte) Conversions.ToLong("&h" + Strings.Mid(str, 5, 2));
WDModules.WDModuleData[15] = (byte) Conversions.ToLong("&h" + Strings.Mid(str, 7, 2));
if (WDPassport.WDFWWrite(ref WDModules.WDModuleData, (int) DetectFWParameters.ModuleLength, "0047"))
{
Interaction.MsgBox("清除47成功!\r\n", MsgBoxStyle.ApplicationModal, null);
}
else if (WDPassport.HDDError)
{
WDErrorCode.GetWDErrorCode();
Interaction.MsgBox("清除47失败!(" + WDErrorCode.WDErrorCodeMenas + ")\r\n", MsgBoxStyle.ApplicationModal, null);
}
else
{
Interaction.MsgBox("清除47失败!\r\n", MsgBoxStyle.ApplicationModal, null);
}
}
else if (WDPassport.HDDError)
{
WDErrorCode.GetWDErrorCode();
Interaction.MsgBox("清除47失败!(" + WDErrorCode.WDErrorCodeMenas + ")\r\n", MsgBoxStyle.ApplicationModal, null);
}
else
{
Interaction.MsgBox("清除47失败!\r\n", MsgBoxStyle.ApplicationModal, null);
}
}
public static void Clear0x4F()
{
string str = "";
if (WDPassport.WDFWRead(ref Flash.TempData, 1, "004F"))
{
DetectFWParameters.ModuleLength = Conversions.ToLong("&h" + Strings.Right("00" + Conversion.Hex(Flash.TempData[11]), 2) + Strings.Right("00" + Conversion.Hex(Flash.TempData[10]), 2));
WDModules.WDModuleData = new byte[((int) ((DetectFWParameters.ModuleLength * 0x200L) - 1L)) + 1];
int index = 0;
do
{
WDModules.WDModuleData[index] = Flash.TempData[index];
index++;
}
while (index <= 0x17);
str = "";
str = ChecsumCalc.Roly32BitCheckSumCalcFile(WDModules.WDModuleData, DetectFWParameters.ModuleLength);
WDModules.WDModuleData[12] = (byte) Conversions.ToLong("&h" + Strings.Mid(str, 1, 2));
WDModules.WDModuleData[13] = (byte) Conversions.ToLong("&h" + Strings.Mid(str, 3, 2));
WDModules.WDModuleData[14] = (byte) Conversions.ToLong("&h" + Strings.Mid(str, 5, 2));
WDModules.WDModuleData[15] = (byte) Conversions.ToLong("&h" + Strings.Mid(str, 7, 2));
if (WDPassport.WDFWWrite(ref WDModules.WDModuleData, (int) DetectFWParameters.ModuleLength, "004F"))
{
Interaction.MsgBox("清除4F成功!\r\n", MsgBoxStyle.ApplicationModal, null);
}
else if (WDPassport.HDDError)
{
WDErrorCode.GetWDErrorCode();
Interaction.MsgBox("清除4F失败!(" + WDErrorCode.WDErrorCodeMenas + ")\r\n", MsgBoxStyle.ApplicationModal, null);
}
else
{
Interaction.MsgBox("清除4F失败!\r\n", MsgBoxStyle.ApplicationModal, null);
}
}
else if (WDPassport.HDDError)
{
WDErrorCode.GetWDErrorCode();
Interaction.MsgBox("清除4F失败!(" + WDErrorCode.WDErrorCodeMenas + ")\r\n", MsgBoxStyle.ApplicationModal, null);
}
else
{
Interaction.MsgBox("清除4F失败!\r\n", MsgBoxStyle.ApplicationModal, null);
}
}
public static void GetCalibrateCodeName()
{
CalibrateCommand = "";
if (Strings.Trim(MyProject.Forms.CacheOverlay.TaskTxt.Text) == "D")
{
CalibrateCommand = "44";
}
else if (Strings.Trim(MyProject.Forms.CacheOverlay.TaskTxt.Text) == "F")
{
CalibrateCommand = "46";
}
else if (Strings.Trim(MyProject.Forms.CacheOverlay.TaskTxt.Text) == "J")
{
CalibrateCommand = "4A";
}
else if (Strings.Trim(MyProject.Forms.CacheOverlay.TaskTxt.Text) == "O")
{
CalibrateCommand = "6F";
}
else if (Strings.Trim(MyProject.Forms.CacheOverlay.TaskTxt.Text) == "K")
{
CalibrateCommand = "6B";
}
else if (Strings.Trim(MyProject.Forms.CacheOverlay.TaskTxt.Text) == "I")
{
CalibrateCommand = "6A";
}
else if (Strings.Trim(MyProject.Forms.CacheOverlay.TaskTxt.Text) == "P")
{
CalibrateCommand = "70";
}
else if (Strings.Trim(MyProject.Forms.CacheOverlay.TaskTxt.Text) == "C")
{
CalibrateCommand = "69";
}
}
public static void GetCurrentTestName()
{
CurrentARCOTestNameStr = "";
if (CalibrateCommand == "44")
{
CurrentARCOTestNameStr = " Mini-ARCO Test";
}
else if (CalibrateCommand == "46")
{
CurrentARCOTestNameStr = " Full ARCO Test";
}
else if (CalibrateCommand == "4A")
{
CurrentARCOTestNameStr = " Full-ARCO Test";
}
else if (CalibrateCommand == "6F")
{
CurrentARCOTestNameStr = " TouchDown Calibration";
}
else if (CalibrateCommand == "6B")
{
CurrentARCOTestNameStr = " TPI Calibration";
}
else if (CalibrateCommand == "6A")
{
CurrentARCOTestNameStr = " Writer-Reader Gap Test";
}
else if (CalibrateCommand == "70")
{
CurrentARCOTestNameStr = " Target Search Calibration";
}
else if (CalibrateCommand == "69")
{
CurrentARCOTestNameStr = " VKFCI Head Qualification Test";
}
}
public static void GETDCMFrom47()
{
WDModules.ShowStr = "";
WDModules.ShowStr = "从ROM模块47获取DCM参数 ";
WDModules.ShowStr2 = "";
int num2 = 0x31 - Strings.Len(WDModules.ShowStr);
for (int i = 1; i <= num2; i++)
{
WDModules.ShowStr1 = "";
WDModules.ShowStr1 = ".";
WDModules.ShowStr2 = WDModules.ShowStr2 + WDModules.ShowStr1;
MyProject.Application.DoEvents();
}
WDPassport.AppendARCOLogTxt(WDModules.ShowStr + WDModules.ShowStr2);
WDPassport.SendCommandStr = "";
WDPassport.SendCommandStr = "27808045004457A0BF0000D500000000";
WDPassport.SetSamsungRegVal();
WDPassport.i = 0;
while (ATA.inportbyteVB(ATA.BasePort + 7) != 80L)
{
if (WDPassport.i > 50)
{
WDPassport.AppendARCOLogTxt(":失败 (硬盘超时)\r\n");
return;
}
if (ATA.inportbyteVB(ATA.BasePort + 7) == 0x51L)
{
WDPassport.AppendARCOLogTxt(":失败 (硬盘错误)\r\n");
ATA.SoftReset();
return;
}
if (ATA.inportbyteVB(ATA.BasePort + 7) == 0x10L)
{
WDPassport.AppendARCOLogTxt(":失败 (硬盘错误)\r\n");
return;
}
MyProject.Application.DoEvents();
ATA.Sleep(2);
WDPassport.i++;
}
WDPassport.SendCommandStr = "";
WDPassport.SendCommandStr = "2780B0D6BE4FC2A00000000001000000";
WDPassport.SetSamsungRegVal();
WDPassport.i = 0;
while (ATA.inportbyteVB(ATA.BasePort + 7) != 0x58L)
{
if (WDPassport.i > 50)
{
WDPassport.AppendARCOLogTxt(":失败 (硬盘超时)\r\n");
return;
}
if (ATA.inportbyteVB(ATA.BasePort + 7) == 0x51L)
{
WDPassport.AppendARCOLogTxt(":失败 (硬盘错误)\r\n");
ATA.SoftReset();
return;
}
if (ATA.inportbyteVB(ATA.BasePort + 7) == 0x18L)
{
WDPassport.AppendARCOLogTxt(":失败 (硬盘错误)\r\n");
return;
}
MyProject.Application.DoEvents();
ATA.Sleep(2);
WDPassport.i++;
}
ATA.SendByteStrFirst = "";
ATA.SendByteStrFirst = "08000100470000000000000000000000";
WDPassport.WDDataOneSector();
WDPassport.i = 0;
while (ATA.inportbyteVB(ATA.BasePort + 7) != 80L)
{
if (WDPassport.i > 0xbb8)
{
WDPassport.AppendARCOLogTxt(":失败 (硬盘超时)\r\n");
return;
}
if (ATA.inportbyteVB(ATA.BasePort + 7) == 0x51L)
{
WDErrorCode.GetWDErrorCode();
WDPassport.AppendARCOLogTxt(":失败 (" + WDErrorCode.WDErrorCodeMenas + ")\r\n");
return;
}
if (ATA.inportbyteVB(ATA.BasePort + 7) == 0x10L)
{
WDPassport.AppendARCOLogTxt(":失败 (硬盘错误)\r\n");
return;
}
MyProject.Application.DoEvents();
ATA.Sleep(2);
WDPassport.i++;
}
WDPassport.SendCommandStr = "";
WDPassport.SendCommandStr = "2780B0D5BF4FC2A00000000001000000";
WDPassport.SetSamsungRegVal();
WDPassport.i = 0;
while (ATA.inportbyteVB(ATA.BasePort + 7) != 0x58L)
{
if (WDPassport.i > 50)
{
WDPassport.AppendARCOLogTxt(":失败 (硬盘超时)\r\n");
return;
}
if (ATA.inportbyteVB(ATA.BasePort + 7) == 0x51L)
{
WDPassport.AppendARCOLogTxt(":失败 (硬盘错误)\r\n");
ATA.SoftReset();
return;
}
if (ATA.inportbyteVB(ATA.BasePort + 7) == 0x18L)
{
WDPassport.AppendARCOLogTxt(":失败 (硬盘错误)\r\n");
return;
}
MyProject.Application.DoEvents();
ATA.Sleep(2);
WDPassport.i++;
}
DCMFrom47 = new byte[0x200];
WDPassport.i = 0;
do
{
WDPassport.j = ATA.inportwordVB(ATA.BasePort);
DCMFrom47[WDPassport.i + 1] = (byte) Math.Round(Conversion.Val("&H" + Strings.Mid(Strings.Right("00000000" + Conversion.Hex(WDPassport.j), 8), 5, 2)));
DCMFrom47[WDPassport.i] = (byte) (WDPassport.j & 0xffL);
WDPassport.i += 2;
}
while (WDPassport.i < 0x200);
if (WDPassport.HDDTypeMavell)
{
MyProject.Forms.CacheOverlay.MediaDCMTxt.Text = Conversions.ToString(Strings.Chr((int) Conversions.ToLong("&h" + Strings.Right("00" + Conversion.Hex(DCMFrom47[0x15]), 2))));
MyProject.Forms.CacheOverlay.HeadDCMTxt.Text = Conversions.ToString(Strings.Chr((int) Conversions.ToLong("&h" + Strings.Right("00" + Conversion.Hex(DCMFrom47[20]), 2))));
SpecialFunctions.DCMStr = "";
SpecialFunctions.DCMStr = "M" + (Conversions.ToString(Strings.Chr((int) Conversions.ToLong("&h" + Strings.Right("00" + Conversion.Hex(DCMFrom47[0x15]), 2)))) + "H" + Conversions.ToString(Strings.Chr((int) Conversions.ToLong("&h" + Strings.Right("00" + Conversion.Hex(DCMFrom47[20]), 2)))));
MyProject.Forms.CacheOverlay.ARCODCMTxt.Text = "";
MyProject.Forms.CacheOverlay.ARCODCMTxt.Text = SpecialFunctions.DCMStr;
WDPassport.AppendARCOLogTxt(":成功.\r\n");
}
else
{
MyProject.Forms.CacheOverlay.MediaDCMTxt.Text = Conversions.ToString(Strings.Chr((int) Conversions.ToLong("&h" + Strings.Right("00" + Conversion.Hex(DCMFrom47[0x2f]), 2))));
MyProject.Forms.CacheOverlay.HeadDCMTxt.Text = Conversions.ToString(Strings.Chr((int) Conversions.ToLong("&h" + Strings.Right("00" + Conversion.Hex(DCMFrom47[0x2e]), 2))));
SpecialFunctions.DCMStr = "";
SpecialFunctions.DCMStr = "M" + Conversions.ToString(Strings.ChrW(DCMFrom47[0x2f])) + "H" + Conversions.ToString(Strings.ChrW(DCMFrom47[0x2e]));
MyProject.Forms.CacheOverlay.ARCODCMTxt.Text = "";
MyProject.Forms.CacheOverlay.ARCODCMTxt.Text = SpecialFunctions.DCMStr;
WDPassport.AppendARCOLogTxt(":成功.\r\n");
}
}
public static void GETDCMFromConfigSector()
{
WDModules.ShowStr = "";
WDModules.ShowStr = "获取DCM参数 ";
WDModules.ShowStr2 = "";
int num3 = 0x34 - Strings.Len(WDModules.ShowStr);
for (int i = 1; i <= num3; i++)
{
WDModules.ShowStr1 = "";
WDModules.ShowStr1 = ".";
WDModules.ShowStr2 = WDModules.ShowStr2 + WDModules.ShowStr1;
MyProject.Application.DoEvents();
}
WDPassport.AppendARCOLogTxt(WDModules.ShowStr + WDModules.ShowStr2);
WDPassport.SendCommandStr = "";
WDPassport.SendCommandStr = "27808045004457A0BF0000D500000000";
WDPassport.SetSamsungRegVal();
WDPassport.i = 0;
while (ATA.inportbyteVB(ATA.BasePort + 7) != 80L)
{
if (WDPassport.i > 50)
{
WDPassport.AppendARCOLogTxt(":失败 (硬盘超时)\r\n");
return;
}
if (ATA.inportbyteVB(ATA.BasePort + 7) == 0x51L)
{
WDPassport.AppendARCOLogTxt(":失败 (硬盘错误)\r\n");
ATA.SoftReset();
return;
}
if (ATA.inportbyteVB(ATA.BasePort + 7) == 0x10L)
{
WDPassport.AppendARCOLogTxt(":失败 (硬盘错误)\r\n");
return;
}
MyProject.Application.DoEvents();
ATA.Sleep(2);
WDPassport.i++;
}
WDPassport.SendCommandStr = "";
WDPassport.SendCommandStr = "2780B0D6BE4FC2A00000000001000000";
WDPassport.SetSamsungRegVal();
WDPassport.i = 0;
while (ATA.inportbyteVB(ATA.BasePort + 7) != 0x58L)
{
if (WDPassport.i > 50)
{
WDPassport.AppendARCOLogTxt(":失败 (硬盘超时)\r\n");
return;
}
if (ATA.inportbyteVB(ATA.BasePort + 7) == 0x51L)
{
WDPassport.AppendARCOLogTxt(":失败 (硬盘错误)\r\n");
ATA.SoftReset();
return;
}
if (ATA.inportbyteVB(ATA.BasePort + 7) == 0x18L)
{
WDPassport.AppendARCOLogTxt(":失败 (硬盘错误)\r\n");
return;
}
MyProject.Application.DoEvents();
ATA.Sleep(2);
WDPassport.i++;
}
ATA.SendByteStrFirst = "";
ATA.SendByteStrFirst = "2A000100020012000000000000000000";
WDPassport.WDDataOneSector();
WDPassport.i = 0;
while (ATA.inportbyteVB(ATA.BasePort + 7) != 80L)
{
if (WDPassport.i > 0xbb8)
{
WDPassport.AppendARCOLogTxt(":失败 (硬盘超时)\r\n");
return;
}
if (ATA.inportbyteVB(ATA.BasePort + 7) == 0x51L)
{
WDErrorCode.GetWDErrorCode();
WDPassport.AppendARCOLogTxt(":失败 (" + WDErrorCode.WDErrorCodeMenas + ")\r\n");
return;
}
if (ATA.inportbyteVB(ATA.BasePort + 7) == 0x10L)
{
WDPassport.AppendARCOLogTxt(":失败 (硬盘错误)\r\n");
return;
}
MyProject.Application.DoEvents();
ATA.Sleep(2);
WDPassport.i++;
}
WDPassport.SendCommandStr = "";
WDPassport.SendCommandStr = "2780B0D5BF4FC2A00000000001000000";
WDPassport.SetSamsungRegVal();
WDPassport.i = 0;
while (ATA.inportbyteVB(ATA.BasePort + 7) != 0x58L)
{
if (WDPassport.i > 50)
{
WDPassport.AppendARCOLogTxt(":失败 (硬盘超时)\r\n");
return;
}
if (ATA.inportbyteVB(ATA.BasePort + 7) == 0x51L)
{
WDPassport.AppendARCOLogTxt(":失败 (硬盘错误)\r\n");
ATA.SoftReset();
return;
}
if (ATA.inportbyteVB(ATA.BasePort + 7) == 0x18L)
{
WDPassport.AppendARCOLogTxt(":失败 (硬盘错误)\r\n");
return;
}
MyProject.Application.DoEvents();
ATA.Sleep(2);
WDPassport.i++;
}
DCMData = new byte[0x200];
WDPassport.i = 0;
do
{
WDPassport.j = ATA.inportwordVB(ATA.BasePort);
DCMData[WDPassport.i + 1] = (byte) Math.Round(Conversion.Val("&H" + Strings.Mid(Strings.Right("00000000" + Conversion.Hex(WDPassport.j), 8), 5, 2)));
DCMData[WDPassport.i] = (byte) (WDPassport.j & 0xffL);
WDPassport.i += 2;
}
while (WDPassport.i < 0x200);
SpecialFunctions.DCMStr = "";
int num2 = 0;
do
{
string str = "";
str = Conversions.ToString(Strings.Chr((int) Conversions.ToLong("&h" + Strings.Right("00" + Conversion.Hex(DCMData[2 + num2]), 2))));
SpecialFunctions.DCMStr = SpecialFunctions.DCMStr + str;
MyProject.Application.DoEvents();
num2++;
}
while (num2 <= 0x16);
MyProject.Forms.CacheOverlay.ARCODCMTxt.Text = "";
MyProject.Forms.CacheOverlay.ARCODCMTxt.Text = SpecialFunctions.DCMStr;
WDPassport.HeadDCMStr = "";
WDPassport.MediaDCMStr = "";
WDPassport.HeadDCMStr = Conversions.ToString(Strings.Chr((int) Conversions.ToLong("&h" + Strings.Right("00" + Conversion.Hex(DCMData[13]), 2))));
WDPassport.MediaDCMStr = Conversions.ToString(Strings.Chr((int) Conversions.ToLong("&h" + Strings.Right("00" + Conversion.Hex(DCMData[11]), 2))));
MyProject.Forms.CacheOverlay.HeadDCMTxt.Text = "";
MyProject.Forms.CacheOverlay.MediaDCMTxt.Text = "";
MyProject.Forms.CacheOverlay.HeadDCMTxt.Text = WDPassport.HeadDCMStr;
MyProject.Forms.CacheOverlay.MediaDCMTxt.Text = WDPassport.MediaDCMStr;
WDPassport.AppendARCOLogTxt(":成功.\r\n");
}
public static void GetTPICalibrationLogs()
{
Get6BLogOK = false;
if (WDPassport.WDFWRead(ref Flash.TempData, 1, "00C6"))
{
DetectFWParameters.ModuleLength = Conversions.ToLong("&h" + Strings.Right("00" + Conversion.Hex(Flash.TempData[11]), 2) + Strings.Right("00" + Conversion.Hex(Flash.TempData[10]), 2));
if (WDPassport.WDFWRead(ref WDModules.WDModuleData, (int) DetectFWParameters.ModuleLength, "00C6"))
{
Get6BLogOK = true;
ErrorCode6BStr = "";
TestCMD6BStr = "";
ChamberTemp6BStr = "";
HeadDCM6BStr = "";
MediaDCM6BStr = "";
ZoneMap6BStr = "";
StarttingTPI6BStr = "";
Flags6BStr = "";
Parm86BStr = "";
AdjTrackWrite6BStr = "";
ErrorCountExit6BStr = "";
EccMode6BStr = "";
ERRThersh116BStr = "";
ERRThersh126BStr = "";
Parm14DFHStr = "";
Reserved16bStr = "";
Reserved26BStr = "";
TestState6BStr = "";
DriveTemp6BStr = "";
VSCSwitchFmtExtError6BStr = "";
VSCErrorInfo6BStr = "";
MaxCyl6BStr = "";
TestZones6BStr = "";
SelectedZoneIndex6BStr = "";
Head0TPICode6BStr = "";
Head1TPICode6BStr = "";
Head2TPICode6BStr = "";
Head3TPICode6BStr = "";
Head4TPICode6BStr = "";
Head5TPICode6BStr = "";
Head6TPICode6BStr = "";
Head7TPICode6BStr = "";
Head0SPTMMSResult6BStr = "";
Head1SPTMMSResult6BStr = "";
Head2SPTMMSResult6BStr = "";
Head3SPTMMSResult6BStr = "";
Head4SPTMMSResult6BStr = "";
Head5SPTMMSResult6BStr = "";
Head6SPTMMSResult6BStr = "";
Head7SPTMMSResult6BStr = "";
Head0OverShoot6BStr = "";
Head1OverShoot6BStr = "";
Head2OverShoot6BStr = "";
Head3OverShoot6BStr = "";
Head4OverShoot6BStr = "";
Head5OverShoot6BStr = "";
Head6OverShoot6BStr = "";
Head7OverShoot6BStr = "";
Head0TPIBefore16BStr = "";
Head0TPIBefore26BStr = "";
Head0TPIBefore36BStr = "";
Head0TPIBefore46BStr = "";
Head0TPIBefore56BStr = "";
Head0TPIBefore66BStr = "";
Head0TPIBefore76BStr = "";
Head0TPIAfter16BStr = "";
Head0TPIAfter26BStr = "";
Head0TPIAfter36BStr = "";
Head0TPIAfter46BStr = "";
Head0TPIAfter56BStr = "";
Head0TPIAfter66BStr = "";
Head0TPIAfter76BStr = "";
Head1TPIBefore16BStr = "";
Head1TPIBefore26BStr = "";
Head1TPIBefore36BStr = "";
Head1TPIBefore46BStr = "";
Head1TPIBefore56BStr = "";
Head1TPIBefore66BStr = "";
Head1TPIBefore76BStr = "";
Head1TPIAfter16BStr = "";
Head1TPIAfter26BStr = "";
Head1TPIAfter36BStr = "";
Head1TPIAfter46BStr = "";
Head1TPIAfter56BStr = "";
Head1TPIAfter66BStr = "";
Head1TPIAfter76BStr = "";
Head2TPIBefore16BStr = "";
Head2TPIBefore26BStr = "";
Head2TPIBefore36BStr = "";
Head2TPIBefore46BStr = "";
Head2TPIBefore56BStr = "";
Head2TPIBefore66BStr = "";
Head2TPIBefore76BStr = "";
Head2TPIAfter16BStr = "";
Head2TPIAfter26BStr = "";
Head2TPIAfter36BStr = "";
Head2TPIAfter46BStr = "";
Head2TPIAfter56BStr = "";
Head2TPIAfter66BStr = "";
Head2TPIAfter76BStr = "";
Head3TPIBefore16BStr = "";
Head3TPIBefore26BStr = "";
Head3TPIBefore36BStr = "";
Head3TPIBefore46BStr = "";
Head3TPIBefore56BStr = "";
Head3TPIBefore66BStr = "";
Head3TPIBefore76BStr = "";
Head3TPIAfter16BStr = "";
Head3TPIAfter26BStr = "";
Head3TPIAfter36BStr = "";
Head3TPIAfter46BStr = "";
Head3TPIAfter56BStr = "";
Head3TPIAfter66BStr = "";
Head3TPIAfter76BStr = "";
Head4TPIBefore16BStr = "";
Head4TPIBefore26BStr = "";
Head4TPIBefore36BStr = "";
Head4TPIBefore46BStr = "";
Head4TPIBefore56BStr = "";
Head4TPIBefore66BStr = "";
Head4TPIBefore76BStr = "";
Head4TPIAfter16BStr = "";
Head4TPIAfter26BStr = "";
Head4TPIAfter36BStr = "";
Head4TPIAfter46BStr = "";
Head4TPIAfter56BStr = "";
Head4TPIAfter66BStr = "";
Head4TPIAfter76BStr = "";
Head5TPIBefore16BStr = "";
Head5TPIBefore26BStr = "";
Head5TPIBefore36BStr = "";
Head5TPIBefore46BStr = "";
Head5TPIBefore56BStr = "";
Head5TPIBefore66BStr = "";
Head5TPIBefore76BStr = "";
Head5TPIAfter16BStr = "";
Head5TPIAfter26BStr = "";
Head5TPIAfter36BStr = "";
Head5TPIAfter46BStr = "";
Head5TPIAfter56BStr = "";
Head5TPIAfter66BStr = "";
Head5TPIAfter76BStr = "";
Head6TPIBefore16BStr = "";
Head6TPIBefore26BStr = "";
Head6TPIBefore36BStr = "";
Head6TPIBefore46BStr = "";
Head6TPIBefore56BStr = "";
Head6TPIBefore66BStr = "";
Head6TPIBefore76BStr = "";
Head6TPIAfter16BStr = "";
Head6TPIAfter26BStr = "";
Head6TPIAfter36BStr = "";
Head6TPIAfter46BStr = "";
Head6TPIAfter56BStr = "";
Head6TPIAfter66BStr = "";
Head6TPIAfter76BStr = "";
Head7TPIBefore16BStr = "";
Head7TPIBefore26BStr = "";
Head7TPIBefore36BStr = "";
Head7TPIBefore46BStr = "";
Head7TPIBefore56BStr = "";
Head7TPIBefore66BStr = "";
Head7TPIBefore76BStr = "";
Head7TPIAfter16BStr = "";
Head7TPIAfter26BStr = "";
Head7TPIAfter36BStr = "";
Head7TPIAfter46BStr = "";
Head7TPIAfter56BStr = "";
Head7TPIAfter66BStr = "";
Head7TPIAfter76BStr = "";
ErrorCode6BStr = Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x33]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[50]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x31]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x30]), 2);
TestCMD6BStr = Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x37]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x36]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x35]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x34]), 2);
ChamberTemp6BStr = Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x3b]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x3a]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x39]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x38]), 2);
HeadDCM6BStr = Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x3f]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x3e]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x3d]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[60]), 2);
MediaDCM6BStr = Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x43]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x42]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x41]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x40]), 2);
ZoneMap6BStr = Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x47]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[70]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x45]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x44]), 2);
StarttingTPI6BStr = Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x4b]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x4a]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x49]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x48]), 2);
Flags6BStr = Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x4f]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x4e]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x4d]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x4c]), 2);
Parm86BStr = Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x53]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x52]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x51]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[80]), 2);
AdjTrackWrite6BStr = Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x57]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x56]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x55]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x54]), 2);
ErrorCountExit6BStr = Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x5b]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[90]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x59]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x58]), 2);
EccMode6BStr = Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x5f]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x5e]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x5d]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x5c]), 2);
ERRThersh116BStr = Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x63]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x62]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x61]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x60]), 2);
ERRThersh126BStr = Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x67]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x66]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x65]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[100]), 2);
Parm14DFHStr = Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x6b]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x6a]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x69]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x68]), 2);
Reserved16bStr = Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x6f]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[110]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x6d]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x6c]), 2);
Reserved26BStr = Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x73]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x72]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x71]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x70]), 2);
TestState6BStr = Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x5f9]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x5f8]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x5f7]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x5f6]), 2);
DriveTemp6BStr = Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x5fd]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x5fc]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x5fb]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x5fa]), 2);
VSCSwitchFmtExtError6BStr = Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x601]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x600]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x5ff]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x5fe]), 2);
VSCErrorInfo6BStr = Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x605]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x604]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x603]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x602]), 2);
MaxCyl6BStr = Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x615]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x614]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x613]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x612]), 2);
TestZones6BStr = Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x616]), 2);
SelectedZoneIndex6BStr = Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x619]), 2);
Head0TPICode6BStr = Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x75]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x74]), 2);
Head1TPICode6BStr = Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x77]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x76]), 2);
Head2TPICode6BStr = Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x79]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[120]), 2);
Head3TPICode6BStr = Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x7b]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x7a]), 2);
Head4TPICode6BStr = Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x7d]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x7c]), 2);
Head5TPICode6BStr = Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x7f]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x7e]), 2);
Head6TPICode6BStr = Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x81]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x80]), 2);
Head7TPICode6BStr = Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x83]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[130]), 2);
Head0SPTMMSResult6BStr = Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x86]), 2);
Head1SPTMMSResult6BStr = Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0xc0]), 2);
Head2SPTMMSResult6BStr = Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[250]), 2);
Head3SPTMMSResult6BStr = Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x134]), 2);
Head4SPTMMSResult6BStr = Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x16e]), 2);
Head5SPTMMSResult6BStr = Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x1a8]), 2);
Head6SPTMMSResult6BStr = Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x1e2]), 2);
Head7SPTMMSResult6BStr = Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[540]), 2);
Head0OverShoot6BStr = Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x87]), 2);
Head1OverShoot6BStr = Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0xc1]), 2);
Head2OverShoot6BStr = Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0xfb]), 2);
Head3OverShoot6BStr = Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x135]), 2);
Head4OverShoot6BStr = Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x16f]), 2);
Head5OverShoot6BStr = Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x1a9]), 2);
Head6OverShoot6BStr = Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x1e3]), 2);
Head7OverShoot6BStr = Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x21d]), 2);
Head0TPIBefore16BStr = Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x8b]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x8a]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x89]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x88]), 2);
Head0TPIBefore26BStr = Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x93]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x92]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x91]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x90]), 2);
Head0TPIBefore36BStr = Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x9b]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x9a]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x99]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x98]), 2);
Head0TPIBefore46BStr = Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0xa3]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0xa2]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0xa1]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[160]), 2);
Head0TPIBefore56BStr = Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0xab]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[170]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0xa9]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0xa8]), 2);
Head0TPIBefore66BStr = Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0xb3]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0xb2]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0xb1]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0xb0]), 2);
Head0TPIBefore76BStr = Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0xbb]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0xba]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0xb9]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0xb8]), 2);
Head0TPIAfter16BStr = Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x8f]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x8e]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x8d]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[140]), 2);
Head0TPIAfter26BStr = Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x97]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[150]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x95]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x94]), 2);
Head0TPIAfter36BStr = Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x9f]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x9e]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x9d]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x9c]), 2);
Head0TPIAfter46BStr = Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0xa7]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0xa6]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0xa5]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0xa4]), 2);
Head0TPIAfter56BStr = Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0xaf]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0xae]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0xad]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0xac]), 2);
Head0TPIAfter66BStr = Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0xb7]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0xb6]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0xb5]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[180]), 2);
Head0TPIAfter76BStr = Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0xbf]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[190]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0xbd]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0xbc]), 2);
Head1TPIBefore16BStr = Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0xc5]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0xc4]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0xc3]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0xc2]), 2);
Head1TPIBefore26BStr = Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0xcd]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0xcc]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0xcb]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0xca]), 2);
Head1TPIBefore36BStr = Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0xd5]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0xd4]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0xd3]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[210]), 2);
Head1TPIBefore46BStr = Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0xdd]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[220]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0xdb]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0xda]), 2);
Head1TPIBefore56BStr = Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0xe5]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0xe4]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0xe3]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0xe2]), 2);
Head1TPIBefore66BStr = Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0xed]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0xec]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0xeb]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0xea]), 2);
Head1TPIBefore76BStr = Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0xf5]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0xf4]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0xf3]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0xf2]), 2);
Head1TPIAfter16BStr = Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0xc9]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[200]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0xc7]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0xc6]), 2);
Head1TPIAfter26BStr = Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0xd1]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0xd0]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0xcf]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0xce]), 2);
Head1TPIAfter36BStr = Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0xd9]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0xd8]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0xd7]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0xd6]), 2);
Head1TPIAfter46BStr = Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0xe1]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0xe0]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0xdf]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0xde]), 2);
Head1TPIAfter56BStr = Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0xe9]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0xe8]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0xe7]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[230]), 2);
Head1TPIAfter66BStr = Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0xf1]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[240]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0xef]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0xee]), 2);
Head1TPIAfter76BStr = Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0xf9]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0xf8]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0xf7]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0xf6]), 2);
Head2TPIBefore16BStr = Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0xff]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0xfe]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0xfd]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0xfc]), 2);
Head2TPIBefore26BStr = Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x107]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x106]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x105]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[260]), 2);
Head2TPIBefore36BStr = Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x10f]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[270]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x10d]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x10c]), 2);
Head2TPIBefore46BStr = Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x117]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x116]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x115]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x114]), 2);
Head2TPIBefore56BStr = Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x11f]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x11e]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x11d]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x11c]), 2);
Head2TPIBefore66BStr = Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x127]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x126]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x125]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x124]), 2);
Head2TPIBefore76BStr = Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x12f]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x12e]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x12d]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[300]), 2);
Head2TPIAfter16BStr = Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x103]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x102]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x101]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x100]), 2);
Head2TPIAfter26BStr = Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x10b]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x10a]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x109]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x108]), 2);
Head2TPIAfter36BStr = Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x113]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x112]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x111]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x110]), 2);
Head2TPIAfter46BStr = Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x11b]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x11a]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x119]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[280]), 2);
Head2TPIAfter56BStr = Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x123]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[290]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x121]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x120]), 2);
Head2TPIAfter66BStr = Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x12b]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x12a]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x129]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x128]), 2);
Head2TPIAfter76BStr = Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x133]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x132]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x131]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x130]), 2);
Head3TPIBefore16BStr = Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x139]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x138]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x137]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[310]), 2);
Head3TPIBefore26BStr = Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x141]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[320]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x13f]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x13e]), 2);
Head3TPIBefore36BStr = Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x149]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x148]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x147]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x146]), 2);
Head3TPIBefore46BStr = Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x151]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x150]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x14f]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x14e]), 2);
Head3TPIBefore56BStr = Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x159]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x158]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x157]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x156]), 2);
Head3TPIBefore66BStr = Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x161]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x192]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x191]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[400]), 2);
Head3TPIBefore76BStr = Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x169]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[410]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x199]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x198]), 2);
Head3TPIAfter16BStr = Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x13d]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x13c]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x13b]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x13a]), 2);
Head3TPIAfter26BStr = Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x145]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x144]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x143]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x142]), 2);
Head3TPIAfter36BStr = Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x14d]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x14c]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x14b]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[330]), 2);
Head3TPIAfter46BStr = Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x155]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[340]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x153]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x152]), 2);
Head3TPIAfter56BStr = Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x15d]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x15c]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x15b]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x15a]), 2);
Head3TPIAfter66BStr = Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x165]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x196]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x195]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x194]), 2);
Head3TPIAfter76BStr = Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x16d]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x19e]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x19d]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x19c]), 2);
Head4TPIBefore16BStr = Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x173]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[370]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x171]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x170]), 2);
Head4TPIBefore26BStr = Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x17b]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x17a]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x179]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x178]), 2);
Head4TPIBefore36BStr = Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x183]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x182]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x181]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x180]), 2);
Head4TPIBefore46BStr = Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x18b]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x18a]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x189]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x188]), 2);
Head4TPIBefore56BStr = Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x193]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x192]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x191]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[400]), 2);
Head4TPIBefore66BStr = Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x19b]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[410]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x199]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x198]), 2);
Head4TPIBefore76BStr = Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x1a3]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x1a2]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x1a1]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x1a0]), 2);
Head4TPIAfter16BStr = Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x177]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x176]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x175]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x174]), 2);
Head4TPIAfter26BStr = Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x17f]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x17e]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x17d]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[380]), 2);
Head4TPIAfter36BStr = Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x187]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[390]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x185]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x184]), 2);
Head4TPIAfter46BStr = Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x18f]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x18e]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x18d]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x18c]), 2);
Head4TPIAfter56BStr = Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x197]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x196]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x195]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x194]), 2);
Head4TPIAfter66BStr = Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x19f]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x19e]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x19d]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x19c]), 2);
Head4TPIAfter76BStr = Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x1a7]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x1a6]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x1a5]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[420]), 2);
Head5TPIBefore16BStr = Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x1ad]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x1ac]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x1ab]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x1aa]), 2);
Head5TPIBefore26BStr = Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x1b5]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x1b4]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x1b3]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x1b2]), 2);
Head5TPIBefore36BStr = Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x1bd]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x1bc]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x1bb]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x1ba]), 2);
Head5TPIBefore46BStr = Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x1c5]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x1c4]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x1c3]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[450]), 2);
Head5TPIBefore56BStr = Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x1cd]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[460]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x1cb]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x1ca]), 2);
Head5TPIBefore66BStr = Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x1d5]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x1d4]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x1d3]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x1d2]), 2);
Head5TPIBefore76BStr = Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x1dd]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x1dc]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x1db]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x1da]), 2);
Head5TPIAfter16BStr = Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x1b1]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x1b0]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x1af]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[430]), 2);
Head5TPIAfter26BStr = Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x1b9]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[440]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x1b7]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x1b6]), 2);
Head5TPIAfter36BStr = Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x1c1]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x1c0]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x1bf]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x1be]), 2);
Head5TPIAfter46BStr = Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x1c9]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x1c8]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x1c7]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x1c6]), 2);
Head5TPIAfter56BStr = Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x1d1]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x1d0]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x1cf]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x1ce]), 2);
Head5TPIAfter66BStr = Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x1d9]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x1d8]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x1d7]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[470]), 2);
Head5TPIAfter76BStr = Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x1e1]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[480]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x1df]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x1de]), 2);
Head6TPIBefore16BStr = Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x1e7]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x1e6]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x1e5]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x1e4]), 2);
Head6TPIBefore26BStr = Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x1ef]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x1ee]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x1ed]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x1ec]), 2);
Head6TPIBefore36BStr = Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x1f7]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x1f6]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x1f5]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[500]), 2);
Head6TPIBefore46BStr = Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x1ff]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[510]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x1fd]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x1fc]), 2);
Head6TPIBefore56BStr = Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x207]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x206]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x205]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x204]), 2);
Head6TPIBefore66BStr = Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x20f]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x20e]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x20d]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x20c]), 2);
Head6TPIBefore76BStr = Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x217]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x216]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x215]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x214]), 2);
Head6TPIAfter16BStr = Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x1eb]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[490]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x1e9]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x1e8]), 2);
Head6TPIAfter26BStr = Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x1f3]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x1f2]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x1f1]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x1f0]), 2);
Head6TPIAfter36BStr = Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x1fb]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x1fa]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x1f9]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x1f8]), 2);
Head6TPIAfter46BStr = Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x203]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x202]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x201]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x200]), 2);
Head6TPIAfter56BStr = Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x20b]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x20a]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x209]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[520]), 2);
Head6TPIAfter66BStr = Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x213]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[530]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x211]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x210]), 2);
Head6TPIAfter76BStr = Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x21b]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x21a]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x219]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x218]), 2);
Head7TPIBefore16BStr = Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x221]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x220]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x21f]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x21e]), 2);
Head7TPIBefore26BStr = Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x229]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x228]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x227]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[550]), 2);
Head7TPIBefore36BStr = Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x231]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[560]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x22f]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x22e]), 2);
Head7TPIBefore46BStr = Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x239]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x238]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x237]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x236]), 2);
Head7TPIBefore56BStr = Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x241]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x240]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x23f]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x23e]), 2);
Head7TPIBefore66BStr = Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x249]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x248]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x247]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x246]), 2);
Head7TPIBefore76BStr = Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x251]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x250]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x24f]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[590]), 2);
Head7TPIAfter16BStr = Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x225]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x224]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x223]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x222]), 2);
Head7TPIAfter26BStr = Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x22d]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x22c]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x22b]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x22a]), 2);
Head7TPIAfter36BStr = Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x235]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x234]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x233]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x232]), 2);
Head7TPIAfter46BStr = Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x23d]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x23c]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x23b]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[570]), 2);
Head7TPIAfter56BStr = Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x245]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[580]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x243]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x242]), 2);
Head7TPIAfter66BStr = Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x24d]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x24c]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x24b]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x24a]), 2);
Head7TPIAfter76BStr = Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x255]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x254]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x253]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x252]), 2);
}
else if (WDPassport.HDDError)
{
WDErrorCode.GetWDErrorCode();
Interaction.MsgBox("读6B Log失败!(" + WDErrorCode.WDErrorCodeMenas + ")", MsgBoxStyle.Exclamation, PublicDefine.ShowMsgTitle);
}
else
{
Interaction.MsgBox("读6B Log失败!\r\n", MsgBoxStyle.ApplicationModal, null);
}
}
else if (WDPassport.HDDError)
{
WDErrorCode.GetWDErrorCode();
Interaction.MsgBox("读6B Log失败!(" + WDErrorCode.WDErrorCodeMenas + ")", MsgBoxStyle.Exclamation, PublicDefine.ShowMsgTitle);
}
else
{
Interaction.MsgBox("读6B Log失败!", MsgBoxStyle.Exclamation, PublicDefine.ShowMsgTitle);
}
}
public static void initialCaliCodeCombox()
{
MyProject.Forms.CacheOverlay.CaliCodeCombox.Items.Clear();
MyProject.Forms.CacheOverlay.CaliCodeCombox.Text = "";
MyProject.Forms.CacheOverlay.CaliCodeCombox.Items.AddRange(new object[] {
"C3", "C4", "C8", "A1", "A2", "A8", "AA", "AC", "AE", "2802", "2900", "2901", "2903", "2904", "2906", "2908",
"2909", "290A", "2A00", "2A02", "2F00"
});
MyProject.Forms.CacheOverlay.CaliCodeCombox.SelectedIndex = 1;
}
public static void initialTaskCombox()
{
MyProject.Forms.CacheOverlay.TaskCombox.Items.Clear();
MyProject.Forms.CacheOverlay.TaskCombox.Text = "";
MyProject.Forms.CacheOverlay.TaskCombox.Items.AddRange(new object[] { "D - 44", "F - 46", "J - 4A", "O - 6F", "K - 6B", "I - 6A", "P - 70", "C - 69" });
MyProject.Forms.CacheOverlay.TaskCombox.SelectedIndex = 0;
MyProject.Forms.CacheOverlay.TaskTxt.Text = "";
MyProject.Forms.CacheOverlay.TaskTxt.Text = Strings.Mid(MyProject.Forms.CacheOverlay.TaskCombox.Text, 1, Strings.InStr(MyProject.Forms.CacheOverlay.TaskCombox.Text, "-", CompareMethod.Binary) - 1);
}
public static void initilaARCOMethodCombox()
{
MyProject.Forms.CacheOverlay.ARCOMethodCombox.Items.Clear();
MyProject.Forms.CacheOverlay.ARCOMethodCombox.Text = "";
MyProject.Forms.CacheOverlay.ARCOMethodCombox.Items.AddRange(new object[] { "From MainFlag", "From 47" });
MyProject.Forms.CacheOverlay.ARCOMethodCombox.SelectedIndex = 0;
MyProject.Forms.CacheOverlay.HexTxt.Text = "";
MyProject.Forms.CacheOverlay.HexTxt.Text = "19";
}
public static void LoadCacheOverlayToRAMNew()
{
string memoryAdress = "";
string str = "";
string str3 = "";
string str4 = "";
CalibrateName = "";
CalibrateName = "0013";
WDModules.ShowStr = "";
WDModules.ShowStr = "加载 Cache Overlay ";
WDModules.ShowStr2 = "";
int num2 = 0x36 - Strings.Len(WDModules.ShowStr);
for (int i = 1; i <= num2; i++)
{
WDModules.ShowStr1 = "";
WDModules.ShowStr1 = ".";
WDModules.ShowStr2 = WDModules.ShowStr2 + WDModules.ShowStr1;
MyProject.Application.DoEvents();
}
WDPassport.AppendARCOLogTxt(WDModules.ShowStr + WDModules.ShowStr2);
if (WDPassport.WDFWRead(ref WDModules.WDModuleData, 1, CalibrateName))
{
if (WDPassport.HDDTypeMavell)
{
DetectFWParameters.ModuleLength = Conversions.ToLong("&h" + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x17]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x16]), 2));
}
else
{
DetectFWParameters.ModuleLength = Conversions.ToLong("&h" + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[11]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[10]), 2));
}
if (WDPassport.WDFWRead(ref WDModules.WDModuleData, (int) DetectFWParameters.ModuleLength, CalibrateName))
{
str = "";
str = Strings.Right("0000" + Conversion.Hex(DetectFWParameters.ModuleLength), 4);
str = Strings.Mid(str, 3, 2) + Strings.Mid(str, 1, 2);
str3 = "";
str3 = Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x38]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x39]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x3a]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x3b]), 2);
WDLDROP.CahceOverlayLength = Conversions.ToLong("&h" + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[11]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[10]), 2));
str4 = "";
str4 = Strings.Right("00" + Conversion.Hex((long) (WDLDROP.CahceOverlayLength * 2L)), 2);
memoryAdress = "";
memoryAdress = "13000200" + str3 + "00" + str4 + "000000000000";
if (WriteWDMemory(ref WDModules.WDModuleData, (int) DetectFWParameters.ModuleLength, memoryAdress))
{
WDPassport.i = 0;
while (ATA.inportbyteVB(ATA.BasePort + 7) != 80L)
{
if (WDPassport.i > 50)
{
WDPassport.AppendTxt(":失败 (硬盘超时)\r\n");
return;
}
if (ATA.inportbyteVB(ATA.BasePort + 7) == 0x51L)
{
WDErrorCode.GetWDErrorCode();
WDPassport.AppendARCOLogTxt(":失败.(" + WDErrorCode.WDErrorCodeMenas + ")\r\n");
return;
}
MyProject.Application.DoEvents();
ATA.Sleep(2);
WDPassport.i++;
}
WDPassport.AppendARCOLogTxt(":成功.\r\n");
}
else if (WDPassport.HDDError)
{
WDErrorCode.GetWDErrorCode();
WDPassport.AppendARCOLogTxt(":失败.(" + WDErrorCode.WDErrorCodeMenas + ")\r\n");
}
else
{
WDPassport.AppendARCOLogTxt(":失败.\r\n");
}
}
else if (WDPassport.HDDError)
{
WDErrorCode.GetWDErrorCode();
WDPassport.AppendARCOLogTxt(":失败.(" + WDErrorCode.WDErrorCodeMenas + ")\r\n");
}
else
{
WDPassport.AppendARCOLogTxt(":失败.\r\n");
}
}
else if (WDPassport.HDDError)
{
WDErrorCode.GetWDErrorCode();
WDPassport.AppendARCOLogTxt(":失败.(" + WDErrorCode.WDErrorCodeMenas + ")\r\n");
}
else
{
WDPassport.AppendARCOLogTxt(":失败.\r\n");
}
}
[MethodImpl(MethodImplOptions.NoOptimization | MethodImplOptions.NoInlining)]
public static void LoadMainCodeFromFile()
{
FileControl control = new FileControl();
CalibrateName = "";
CalibrateName = "0040";
WDModules.ShowStr = "";
WDModules.ShowStr = "加载 MainCode ";
WDModules.ShowStr2 = "";
int num2 = 0x36 - Strings.Len(WDModules.ShowStr);
for (int i = 1; i <= num2; i++)
{
WDModules.ShowStr1 = "";
WDModules.ShowStr1 = ".";
WDModules.ShowStr2 = WDModules.ShowStr2 + WDModules.ShowStr1;
MyProject.Application.DoEvents();
}
WDPassport.AppendARCOLogTxt(WDModules.ShowStr + WDModules.ShowStr2);
if (FileSystem.Dir(ARCOFilePath + @"\0040.rpm", FileAttribute.Normal) == "")
{
WDPassport.AppendARCOLogTxt(":FAIL(没有发现文件)\r\n");
}
else if ((FileSystem.FileLen(ARCOFilePath + @"\0040.rpm") < 0x200L) | ((FileSystem.FileLen(ARCOFilePath + @"\0040.rpm") % 0x200L) != 0L))
{
WDPassport.AppendARCOLogTxt(":FAIL(文件大小错误)\r\n");
}
else
{
FileControl.ReadFile(ref WDModules.WDModuleData, ARCOFilePath + @"\0040.rpm");
if (WDPassport.HDDTypeMavell)
{
DetectFWParameters.ModuleLength = Conversions.ToLong("&h" + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x17]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x16]), 2));
}
else
{
DetectFWParameters.ModuleLength = Conversions.ToLong("&h" + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[11]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[10]), 2));
}
if (WDPassport.WDFWWrite(ref WDModules.WDModuleData, (int) DetectFWParameters.ModuleLength, CalibrateName))
{
WDPassport.i = 0;
while (ATA.inportbyteVB(ATA.BasePort + 7) != 80L)
{
if (WDPassport.i > 50)
{
WDPassport.AppendTxt(":失败 (硬盘超时)\r\n");
return;
}
if (ATA.inportbyteVB(ATA.BasePort + 7) == 0x51L)
{
WDErrorCode.GetWDErrorCode();
WDPassport.AppendARCOLogTxt(":失败.(" + WDErrorCode.WDErrorCodeMenas + ")\r\n");
return;
}
MyProject.Application.DoEvents();
ATA.Sleep(2);
WDPassport.i++;
}
WDPassport.AppendARCOLogTxt(":成功.\r\n");
WDPassport.SendCommandStr = "";
WDPassport.SendCommandStr = "27808045004457A0001800D600000000";
WDPassport.SetSamsungRegVal();
WDPassport.i = 0;
while (ATA.inportbyteVB(ATA.BasePort + 7) != 80L)
{
if (WDPassport.i > 0xbb8)
{
Interaction.MsgBox("初始化46,失败! (硬盘超时)", MsgBoxStyle.Exclamation, PublicDefine.ShowMsgTitle);
return;
}
if (ATA.inportbyteVB(ATA.BasePort + 7) == 0x51L)
{
WDErrorCode.GetWDErrorCode();
Interaction.MsgBox("初始化46,失败! 错误码:(" + WDErrorCode.WDErrorCodeMenas + ")", MsgBoxStyle.Exclamation, PublicDefine.ShowMsgTitle);
return;
}
MyProject.Application.DoEvents();
ATA.Sleep(2);
WDPassport.i++;
}
WDPassport.SendCommandStr = "";
WDPassport.SendCommandStr = "2780B0D6BE4FC2A00044574501000000";
WDPassport.SetSamsungRegVal();
WDPassport.i = 0;
while (ATA.inportbyteVB(ATA.BasePort + 7) != 0x58L)
{
if (WDPassport.i > 0xbb8)
{
Interaction.MsgBox("初始化46,失败! (硬盘超时)", MsgBoxStyle.Exclamation, PublicDefine.ShowMsgTitle);
return;
}
if (ATA.inportbyteVB(ATA.BasePort + 7) == 0x51L)
{
WDErrorCode.GetWDErrorCode();
Interaction.MsgBox("初始化46,失败! 错误码:(" + WDErrorCode.WDErrorCodeMenas + ")", MsgBoxStyle.Exclamation, PublicDefine.ShowMsgTitle);
return;
}
MyProject.Application.DoEvents();
ATA.Sleep(2);
WDPassport.i++;
}
ATA.SendByteStrFirst = "";
ATA.SendByteStrFirst = "08000500400000000000000000000000";
WDPassport.WDDataOneSector();
WDPassport.i = 0;
while (ATA.inportbyteVB(ATA.BasePort + 7) != 80L)
{
if (WDPassport.i > 0xbb8)
{
Interaction.MsgBox("初始化46,失败! (硬盘超时)", MsgBoxStyle.Exclamation, PublicDefine.ShowMsgTitle);
return;
}
if (ATA.inportbyteVB(ATA.BasePort + 7) == 0x51L)
{
WDErrorCode.GetWDErrorCode();
Interaction.MsgBox("初始化46,失败! 错误码:(" + WDErrorCode.WDErrorCodeMenas + ")", MsgBoxStyle.Exclamation, PublicDefine.ShowMsgTitle);
return;
}
MyProject.Application.DoEvents();
ATA.Sleep(2);
WDPassport.i++;
}
}
else if (WDPassport.HDDError)
{
WDErrorCode.GetWDErrorCode();
WDPassport.AppendARCOLogTxt(":失败.(" + WDErrorCode.WDErrorCodeMenas + ")\r\n");
}
else
{
WDPassport.AppendARCOLogTxt(":失败.\r\n");
}
}
}
public static void LoadPermaentOverlayToRAMNew()
{
string memoryAdress = "";
string str = "";
CalibrateName = "";
CalibrateName = "0011";
WDModules.ShowStr = "";
WDModules.ShowStr = "加载 Permanent Overlay ";
WDModules.ShowStr2 = "";
int num2 = 0x36 - Strings.Len(WDModules.ShowStr);
for (int i = 1; i <= num2; i++)
{
WDModules.ShowStr1 = "";
WDModules.ShowStr1 = ".";
WDModules.ShowStr2 = WDModules.ShowStr2 + WDModules.ShowStr1;
MyProject.Application.DoEvents();
}
WDPassport.AppendARCOLogTxt(WDModules.ShowStr + WDModules.ShowStr2);
if (WDPassport.WDFWRead(ref WDModules.WDModuleData, 1, CalibrateName))
{
if (WDPassport.HDDTypeMavell)
{
DetectFWParameters.ModuleLength = Conversions.ToLong("&h" + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x17]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x16]), 2));
}
else
{
DetectFWParameters.ModuleLength = Conversions.ToLong("&h" + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[11]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[10]), 2));
}
if (WDPassport.WDFWRead(ref WDModules.WDModuleData, (int) DetectFWParameters.ModuleLength, CalibrateName))
{
str = "";
str = Strings.Right("0000" + Conversion.Hex(DetectFWParameters.ModuleLength), 4);
str = Strings.Mid(str, 3, 2) + Strings.Mid(str, 1, 2);
memoryAdress = "";
memoryAdress = "1400080000000000" + str + "000000000000";
if (WriteWDMemory(ref WDModules.WDModuleData, (int) DetectFWParameters.ModuleLength, memoryAdress))
{
WDPassport.i = 0;
while (ATA.inportbyteVB(ATA.BasePort + 7) != 80L)
{
if (WDPassport.i > 50)
{
WDPassport.AppendTxt(":失败 (硬盘超时)\r\n");
return;
}
if (ATA.inportbyteVB(ATA.BasePort + 7) == 0x51L)
{
WDErrorCode.GetWDErrorCode();
WDPassport.AppendARCOLogTxt(":失败.(" + WDErrorCode.WDErrorCodeMenas + ")\r\n");
return;
}
MyProject.Application.DoEvents();
ATA.Sleep(2);
WDPassport.i++;
}
WDPassport.AppendARCOLogTxt(":成功.\r\n");
}
else if (WDPassport.HDDError)
{
WDErrorCode.GetWDErrorCode();
WDPassport.AppendARCOLogTxt(":失败.(" + WDErrorCode.WDErrorCodeMenas + ")\r\n");
}
else
{
WDPassport.AppendARCOLogTxt(":失败.\r\n");
}
}
else if (WDPassport.HDDError)
{
WDErrorCode.GetWDErrorCode();
WDPassport.AppendARCOLogTxt(":失败.(" + WDErrorCode.WDErrorCodeMenas + ")\r\n");
}
else
{
WDPassport.AppendARCOLogTxt(":失败.\r\n");
}
}
else if (WDPassport.HDDError)
{
WDErrorCode.GetWDErrorCode();
WDPassport.AppendARCOLogTxt(":失败.(" + WDErrorCode.WDErrorCodeMenas + ")\r\n");
}
else
{
WDPassport.AppendARCOLogTxt(":失败.\r\n");
}
}
[MethodImpl(MethodImplOptions.NoOptimization | MethodImplOptions.NoInlining)]
public static void LoadPermaentOverlayToRAMNewFromFile()
{
string memoryAdress = "";
string str = "";
FileControl control = new FileControl();
CalibrateName = "";
CalibrateName = "0011";
WDModules.ShowStr = "";
WDModules.ShowStr = "加载 Permanent Overlay ";
WDModules.ShowStr2 = "";
int num2 = 0x36 - Strings.Len(WDModules.ShowStr);
for (int i = 1; i <= num2; i++)
{
WDModules.ShowStr1 = "";
WDModules.ShowStr1 = ".";
WDModules.ShowStr2 = WDModules.ShowStr2 + WDModules.ShowStr1;
MyProject.Application.DoEvents();
}
WDPassport.AppendARCOLogTxt(WDModules.ShowStr + WDModules.ShowStr2);
if (FileSystem.Dir(ARCOFilePath + @"\0011.rpm", FileAttribute.Normal) == "")
{
WDPassport.AppendARCOLogTxt(":FAIL(没有发现文件)\r\n");
}
else if ((FileSystem.FileLen(ARCOFilePath + @"\0011.rpm") < 0x200L) | ((FileSystem.FileLen(ARCOFilePath + @"\0011.rpm") % 0x200L) != 0L))
{
WDPassport.AppendARCOLogTxt(":FAIL(文件大小错误)\r\n");
}
else
{
FileControl.ReadFile(ref WDModules.WDModuleData, ARCOFilePath + @"\0011.rpm");
if (WDPassport.HDDTypeMavell)
{
DetectFWParameters.ModuleLength = Conversions.ToLong("&h" + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x17]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x16]), 2));
}
else
{
DetectFWParameters.ModuleLength = Conversions.ToLong("&h" + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[11]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[10]), 2));
}
str = "";
str = Strings.Right("0000" + Conversion.Hex(DetectFWParameters.ModuleLength), 4);
str = Strings.Mid(str, 3, 2) + Strings.Mid(str, 1, 2);
memoryAdress = "";
memoryAdress = "1400080000000000" + str + "000000000000";
if (WriteWDMemory(ref WDModules.WDModuleData, (int) DetectFWParameters.ModuleLength, memoryAdress))
{
while (ATA.inportbyteVB(ATA.BasePort + 7) != 80L)
{
if (ATA.inportbyteVB(ATA.BasePort + 7) == 0x51L)
{
WDErrorCode.GetWDErrorCode();
WDPassport.AppendARCOLogTxt(":失败.(" + WDErrorCode.WDErrorCodeMenas + ")\r\n");
return;
}
MyProject.Application.DoEvents();
ATA.Sleep(2);
WDPassport.i++;
}
WDPassport.AppendARCOLogTxt(":成功.\r\n");
}
else if (WDPassport.HDDError)
{
WDErrorCode.GetWDErrorCode();
WDPassport.AppendARCOLogTxt(":失败.(" + WDErrorCode.WDErrorCodeMenas + ")\r\n");
}
else
{
WDPassport.AppendARCOLogTxt(":失败.\r\n");
}
}
}
public static void LoadTransidentOverlayToRAMNew()
{
string memoryAdress = "";
string str = "";
CalibrateName = "";
CalibrateName = "001B";
WDModules.ShowStr = "";
WDModules.ShowStr = "加载 Transient Overlay ";
WDModules.ShowStr2 = "";
int num2 = 0x36 - Strings.Len(WDModules.ShowStr);
for (int i = 1; i <= num2; i++)
{
WDModules.ShowStr1 = "";
WDModules.ShowStr1 = ".";
WDModules.ShowStr2 = WDModules.ShowStr2 + WDModules.ShowStr1;
MyProject.Application.DoEvents();
}
WDPassport.AppendARCOLogTxt(WDModules.ShowStr + WDModules.ShowStr2);
if (WDPassport.WDFWRead(ref WDModules.WDModuleData, 1, CalibrateName))
{
if (WDPassport.HDDTypeMavell)
{
DetectFWParameters.ModuleLength = Conversions.ToLong("&h" + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x17]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x16]), 2));
}
else
{
DetectFWParameters.ModuleLength = Conversions.ToLong("&h" + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[11]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[10]), 2));
}
if (WDPassport.WDFWRead(ref WDModules.WDModuleData, (int) DetectFWParameters.ModuleLength, CalibrateName))
{
str = "";
str = Strings.Right("0000" + Conversion.Hex(DetectFWParameters.ModuleLength), 4);
str = Strings.Mid(str, 3, 2) + Strings.Mid(str, 1, 2);
memoryAdress = "";
memoryAdress = "1400060000000000" + str + "000000000000";
if (WriteWDMemory(ref WDModules.WDModuleData, (int) DetectFWParameters.ModuleLength, memoryAdress))
{
WDPassport.i = 0;
while (ATA.inportbyteVB(ATA.BasePort + 7) != 80L)
{
if (WDPassport.i > 50)
{
WDPassport.AppendTxt(":失败 (硬盘超时)\r\n");
return;
}
if (ATA.inportbyteVB(ATA.BasePort + 7) == 0x51L)
{
WDErrorCode.GetWDErrorCode();
WDPassport.AppendARCOLogTxt(":失败.(" + WDErrorCode.WDErrorCodeMenas + ")\r\n");
return;
}
MyProject.Application.DoEvents();
ATA.Sleep(2);
WDPassport.i++;
}
WDPassport.AppendARCOLogTxt(":成功.\r\n");
}
else if (WDPassport.HDDError)
{
WDErrorCode.GetWDErrorCode();
WDPassport.AppendARCOLogTxt(":失败.(" + WDErrorCode.WDErrorCodeMenas + ")\r\n");
}
else
{
WDPassport.AppendARCOLogTxt(":失败.\r\n");
}
}
else if (WDPassport.HDDError)
{
WDErrorCode.GetWDErrorCode();
WDPassport.AppendARCOLogTxt(":失败.(" + WDErrorCode.WDErrorCodeMenas + ")\r\n");
}
else
{
WDPassport.AppendARCOLogTxt(":失败.\r\n");
}
}
else if (WDPassport.HDDError)
{
WDErrorCode.GetWDErrorCode();
WDPassport.AppendARCOLogTxt(":失败.(" + WDErrorCode.WDErrorCodeMenas + ")\r\n");
}
else
{
WDPassport.AppendARCOLogTxt(":失败.\r\n");
}
}
[MethodImpl(MethodImplOptions.NoOptimization | MethodImplOptions.NoInlining)]
public static void LoadTransidentOverlayToRAMNewFromFile()
{
string memoryAdress = "";
string str = "";
FileControl control = new FileControl();
CalibrateName = "";
CalibrateName = "001B";
WDModules.ShowStr = "";
WDModules.ShowStr = "加载 Transient Overlay ";
WDModules.ShowStr2 = "";
int num2 = 0x36 - Strings.Len(WDModules.ShowStr);
for (int i = 1; i <= num2; i++)
{
WDModules.ShowStr1 = "";
WDModules.ShowStr1 = ".";
WDModules.ShowStr2 = WDModules.ShowStr2 + WDModules.ShowStr1;
MyProject.Application.DoEvents();
}
WDPassport.AppendARCOLogTxt(WDModules.ShowStr + WDModules.ShowStr2);
if (FileSystem.Dir(ARCOFilePath + @"\001B.rpm", FileAttribute.Normal) == "")
{
WDPassport.AppendARCOLogTxt(":FAIL(没有发现文件)\r\n");
}
else if ((FileSystem.FileLen(ARCOFilePath + @"\001B.rpm") < 0x200L) | ((FileSystem.FileLen(ARCOFilePath + @"\001B.rpm") % 0x200L) != 0L))
{
WDPassport.AppendARCOLogTxt(":FAIL(文件大小错误)\r\n");
}
else
{
FileControl.ReadFile(ref WDModules.WDModuleData, ARCOFilePath + @"\001B.rpm");
if (WDPassport.HDDTypeMavell)
{
DetectFWParameters.ModuleLength = Conversions.ToLong("&h" + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x17]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x16]), 2));
}
else
{
DetectFWParameters.ModuleLength = Conversions.ToLong("&h" + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[11]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[10]), 2));
}
str = "";
str = Strings.Right("0000" + Conversion.Hex(DetectFWParameters.ModuleLength), 4);
str = Strings.Mid(str, 3, 2) + Strings.Mid(str, 1, 2);
memoryAdress = "";
memoryAdress = "1400060000000000" + str + "000000000000";
if (WriteWDMemory(ref WDModules.WDModuleData, (int) DetectFWParameters.ModuleLength, memoryAdress))
{
WDPassport.i = 0;
while (ATA.inportbyteVB(ATA.BasePort + 7) != 80L)
{
if (WDPassport.i > 50)
{
WDPassport.AppendTxt(":失败 (硬盘超时)\r\n");
return;
}
if (ATA.inportbyteVB(ATA.BasePort + 7) == 0x51L)
{
WDErrorCode.GetWDErrorCode();
WDPassport.AppendARCOLogTxt(":失败.(" + WDErrorCode.WDErrorCodeMenas + ")\r\n");
return;
}
MyProject.Application.DoEvents();
ATA.Sleep(2);
WDPassport.i++;
}
WDPassport.AppendARCOLogTxt(":成功.\r\n");
}
else if (WDPassport.HDDError)
{
WDErrorCode.GetWDErrorCode();
WDPassport.AppendARCOLogTxt(":失败.(" + WDErrorCode.WDErrorCodeMenas + ")\r\n");
}
else
{
WDPassport.AppendARCOLogTxt(":失败.\r\n");
}
}
}
public static void MiniTest()
{
WDSelfscan.CurrentSystemDateStr = "";
WDSelfscan.CurrentSystemDateStr = Conversions.ToString(DateTime.Now);
CurrentARCOTestNameStr = "";
WDModules.ShowStr = "";
WDModules.ShowStr = "启动 MINI TEST";
CurrentARCOTestNameStr = "MINI TEST";
WDModules.ShowStr2 = "";
int num2 = 0x34 - Strings.Len(WDModules.ShowStr);
for (int i = 1; i <= num2; i++)
{
WDModules.ShowStr1 = "";
WDModules.ShowStr1 = ".";
WDModules.ShowStr2 = WDModules.ShowStr2 + WDModules.ShowStr1;
MyProject.Application.DoEvents();
}
WDPassport.AppendARCOLogTxt(WDSelfscan.CurrentSystemDateStr + " " + WDModules.ShowStr + WDModules.ShowStr2);
WDPassport.SendCommandStr = "";
WDPassport.SendCommandStr = "27808045004457A0BF0000D500000000";
WDPassport.SetSamsungRegVal();
WDPassport.i = 0;
while (ATA.inportbyteVB(ATA.BasePort + 7) != 80L)
{
if (WDPassport.i > 0xbb8)
{
WDPassport.AppendARCOLogTxt(":失败. (硬盘超时)\r\n");
return;
}
if (ATA.inportbyteVB(ATA.BasePort + 7) == 0x51L)
{
WDErrorCode.GetWDErrorCode();
WDPassport.AppendARCOLogTxt(":失败. (" + WDErrorCode.WDErrorCodeMenas + ")\r\n");
}
else if (ATA.inportbyteVB(ATA.BasePort + 7) == 0x10L)
{
WDPassport.AppendARCOLogTxt(":失败. (硬盘错误)\r\n");
return;
}
MyProject.Application.DoEvents();
ATA.Sleep(2);
WDPassport.i++;
}
WDPassport.SendCommandStr = "";
WDPassport.SendCommandStr = "2780B0D6BE4FC2A00044574501000000";
WDPassport.SetSamsungRegVal();
WDPassport.i = 0;
while (ATA.inportbyteVB(ATA.BasePort + 7) != 0x58L)
{
if (WDPassport.i > 0xbb8)
{
WDPassport.AppendARCOLogTxt(":失败. (硬盘超时)\r\n");
return;
}
if (ATA.inportbyteVB(ATA.BasePort + 7) == 0x51L)
{
WDErrorCode.GetWDErrorCode();
WDPassport.AppendARCOLogTxt(":失败. (" + WDErrorCode.WDErrorCodeMenas + ")\r\n");
return;
}
if (ATA.inportbyteVB(ATA.BasePort + 7) == 0x18L)
{
WDPassport.AppendARCOLogTxt(":失败. (硬盘错误)\r\n");
return;
}
MyProject.Application.DoEvents();
ATA.Sleep(2);
WDPassport.i++;
}
ATA.SendByteStrFirst = "";
ATA.SendByteStrFirst = "19000300DF0001000000000000000000";
WDPassport.WDDataOneSector();
WDPassport.i = 0;
while (ATA.inportbyteVB(ATA.BasePort + 7) != 80L)
{
if (WDPassport.i > 0xbb8)
{
WDPassport.AppendARCOLogTxt(":失败 (硬盘超时)\r\n");
return;
}
if (ATA.inportbyteVB(ATA.BasePort + 7) == 0x51L)
{
WDErrorCode.GetWDErrorCode();
WDPassport.AppendARCOLogTxt(":失败. (" + WDErrorCode.WDErrorCodeMenas + ")\r\n");
return;
}
if (ATA.inportbyteVB(ATA.BasePort + 7) == 0x10L)
{
WDPassport.AppendARCOLogTxt(":失败. (硬盘错误)\r\n");
return;
}
MyProject.Application.DoEvents();
ATA.Sleep(2);
WDPassport.i++;
}
WDPassport.AppendARCOLogTxt(":成功.\r\n");
ARCOMonitor();
}
public static void MiniTestNotMonitor()
{
WDSelfscan.CurrentSystemDateStr = "";
WDSelfscan.CurrentSystemDateStr = Conversions.ToString(DateTime.Now);
CurrentARCOTestNameStr = "";
WDModules.ShowStr = "";
WDModules.ShowStr = "Adjust 0x30";
WDModules.ShowStr2 = "";
int num2 = 0x25 - Strings.Len(WDModules.ShowStr);
for (int i = 1; i <= num2; i++)
{
WDModules.ShowStr1 = "";
WDModules.ShowStr1 = ".";
WDModules.ShowStr2 = WDModules.ShowStr2 + WDModules.ShowStr1;
MyProject.Application.DoEvents();
}
WDPassport.AppendARCOLogTxt(WDSelfscan.CurrentSystemDateStr + " " + WDModules.ShowStr + WDModules.ShowStr2);
WDPassport.SendCommandStr = "";
WDPassport.SendCommandStr = "27808045004457A0BF0000D500000000";
WDPassport.SetSamsungRegVal();
WDPassport.i = 0;
while (ATA.inportbyteVB(ATA.BasePort + 7) != 80L)
{
if (WDPassport.i > 0xbb8)
{
WDPassport.AppendARCOLogTxt(":失败. (硬盘超时)\r\n");
return;
}
if (ATA.inportbyteVB(ATA.BasePort + 7) == 0x51L)
{
WDErrorCode.GetWDErrorCode();
WDPassport.AppendARCOLogTxt(":失败. (" + WDErrorCode.WDErrorCodeMenas + ")\r\n");
}
else if (ATA.inportbyteVB(ATA.BasePort + 7) == 0x10L)
{
WDPassport.AppendARCOLogTxt(":失败. (硬盘错误)\r\n");
return;
}
MyProject.Application.DoEvents();
ATA.Sleep(2);
WDPassport.i++;
}
WDPassport.SendCommandStr = "";
WDPassport.SendCommandStr = "2780B0D6BE4FC2A00044574501000000";
WDPassport.SetSamsungRegVal();
WDPassport.i = 0;
while (ATA.inportbyteVB(ATA.BasePort + 7) != 0x58L)
{
if (WDPassport.i > 0xbb8)
{
WDPassport.AppendARCOLogTxt(":失败. (硬盘超时)\r\n");
return;
}
if (ATA.inportbyteVB(ATA.BasePort + 7) == 0x51L)
{
WDErrorCode.GetWDErrorCode();
WDPassport.AppendARCOLogTxt(":失败. (" + WDErrorCode.WDErrorCodeMenas + ")\r\n");
return;
}
if (ATA.inportbyteVB(ATA.BasePort + 7) == 0x18L)
{
WDPassport.AppendARCOLogTxt(":失败. (硬盘错误)\r\n");
return;
}
MyProject.Application.DoEvents();
ATA.Sleep(2);
WDPassport.i++;
}
ATA.SendByteStrFirst = "";
ATA.SendByteStrFirst = "19000400DF0001000000000000000000";
WDPassport.WDDataOneSector();
WDPassport.AppendARCOLogTxt(":Start\r\n");
WDPassport.i = 0;
while (ATA.inportbyteVB(ATA.BasePort + 7) != 80L)
{
if (ATA.inportbyteVB(ATA.BasePort + 7) == 0x51L)
{
WDErrorCode.GetWDErrorCode();
WDPassport.AppendARCOLogTxt("Adjust 0x30.............................................:FAIL. (" + WDErrorCode.WDErrorCodeMenas + ")\r\n");
Interaction.MsgBox("MINI Test Excute FAIL!(" + WDErrorCode.WDErrorCodeMenas + ")", MsgBoxStyle.Information, PublicDefine.ShowMsgTitle);
return;
}
if (ATA.inportbyteVB(ATA.BasePort + 7) == 0x10L)
{
WDPassport.AppendARCOLogTxt("Adjust 0x30.............................................:FAIL. (硬盘错误)\r\n");
return;
}
MyProject.Application.DoEvents();
ATA.Sleep(2);
WDPassport.i++;
}
WDPassport.AppendARCOLogTxt("Adjust 0x30.............................................:End(SUCCESS).\r\n");
Interaction.MsgBox("MINI Test Excute Success!", MsgBoxStyle.Information, PublicDefine.ShowMsgTitle);
}
public static void ReadARCOLog()
{
FileControl control = new FileControl();
LogsName = new string[13];
ReadLogNameStatus = new string[13];
LogsName[0] = "2020";
LogsName[1] = "2050";
LogsName[2] = "2030";
LogsName[3] = "2010";
LogsName[4] = "2000";
LogsName[5] = "2040";
LogsName[6] = "2060";
LogsName[7] = "0096";
LogsName[8] = "009C";
LogsName[9] = "00C6";
LogsName[10] = "00C9";
LogsName[11] = "00C1";
LogsName[12] = "00A0";
FileControl.ReadFile(ref StandardARCOProcessData, Application.StartupPath + @"\PST\" + WDPassport.ProductID + @"\A.BIN");
int num = 0;
do
{
WDModules.ShowStr = "";
WDModules.ShowStr = "读 Log " + Conversions.ToString(num);
WDModules.ShowStr1 = "";
WDModules.ShowStr2 = "";
int num3 = 0x35 - Strings.Len(WDModules.ShowStr);
for (int i = 1; i <= num3; i++)
{
WDModules.ShowStr1 = "";
WDModules.ShowStr1 = ".";
WDModules.ShowStr2 = WDModules.ShowStr2 + WDModules.ShowStr1;
MyProject.Application.DoEvents();
}
WDPassport.AppendSelfcanTxt(WDModules.ShowStr + WDModules.ShowStr2);
if (WDPassport.WDFWRead(ref Flash.TempData, 1, LogsName[num]))
{
DetectFWParameters.ModuleLength = Conversions.ToLong("&h" + Strings.Right("00" + Conversion.Hex(Flash.TempData[11]), 2) + Strings.Right("00" + Conversion.Hex(Flash.TempData[10]), 2));
switch (num)
{
case 0:
if (WDPassport.WDFWRead(ref ARCO6FData, (int) DetectFWParameters.ModuleLength, LogsName[num]))
{
ReadLogNameStatus[num] = "True";
WDPassport.AppendSelfcanTxt(":成功.\r\n");
}
else
{
ReadLogNameStatus[num] = "False";
if (WDPassport.HDDError)
{
WDErrorCode.GetWDErrorCode();
WDPassport.AppendSelfcanTxt(":失败.(" + WDErrorCode.WDErrorCodeMenas + ")\r\n");
}
else
{
WDPassport.AppendSelfcanTxt(":失败.\r\n");
}
}
break;
case 1:
if (WDPassport.WDFWRead(ref ARCO6AData, (int) DetectFWParameters.ModuleLength, LogsName[num]))
{
ReadLogNameStatus[num] = "True";
WDPassport.AppendSelfcanTxt(":成功.\r\n");
}
else
{
ReadLogNameStatus[num] = "False";
if (WDPassport.HDDError)
{
WDErrorCode.GetWDErrorCode();
WDPassport.AppendSelfcanTxt(":失败.(" + WDErrorCode.WDErrorCodeMenas + ")\r\n");
}
else
{
WDPassport.AppendSelfcanTxt(":失败.\r\n");
}
}
break;
case 2:
if (WDPassport.WDFWRead(ref ARCO6BData, (int) DetectFWParameters.ModuleLength, LogsName[num]))
{
ReadLogNameStatus[num] = "True";
WDPassport.AppendSelfcanTxt(":成功.\r\n");
}
else
{
ReadLogNameStatus[num] = "False";
if (WDPassport.HDDError)
{
WDErrorCode.GetWDErrorCode();
WDPassport.AppendSelfcanTxt(":失败.(" + WDErrorCode.WDErrorCodeMenas + ")\r\n");
}
else
{
WDPassport.AppendSelfcanTxt(":失败.\r\n");
}
}
break;
case 3:
if (WDPassport.WDFWRead(ref ARCO69Data, (int) DetectFWParameters.ModuleLength, LogsName[num]))
{
ReadLogNameStatus[num] = "True";
WDPassport.AppendSelfcanTxt(":成功.\r\n");
}
else
{
ReadLogNameStatus[num] = "False";
if (WDPassport.HDDError)
{
WDErrorCode.GetWDErrorCode();
WDPassport.AppendSelfcanTxt(":失败.(" + WDErrorCode.WDErrorCodeMenas + ")\r\n");
}
else
{
WDPassport.AppendSelfcanTxt(":失败.\r\n");
}
}
break;
case 4:
if (WDPassport.WDFWRead(ref ARCO46Data, (int) DetectFWParameters.ModuleLength, LogsName[num]))
{
ReadLogNameStatus[num] = "True";
WDPassport.AppendSelfcanTxt(":成功.\r\n");
}
else
{
ReadLogNameStatus[num] = "False";
if (WDPassport.HDDError)
{
WDErrorCode.GetWDErrorCode();
WDPassport.AppendSelfcanTxt(":失败.(" + WDErrorCode.WDErrorCodeMenas + ")\r\n");
}
else
{
WDPassport.AppendSelfcanTxt(":失败.\r\n");
}
}
break;
case 5:
if (WDPassport.WDFWRead(ref ARCO4AData, (int) DetectFWParameters.ModuleLength, LogsName[num]))
{
ReadLogNameStatus[num] = "True";
WDPassport.AppendSelfcanTxt(":成功.\r\n");
}
else
{
ReadLogNameStatus[num] = "False";
if (WDPassport.HDDError)
{
WDErrorCode.GetWDErrorCode();
WDPassport.AppendSelfcanTxt(":失败.(" + WDErrorCode.WDErrorCodeMenas + ")\r\n");
}
else
{
WDPassport.AppendSelfcanTxt(":失败.\r\n");
}
}
break;
case 6:
if (WDPassport.WDFWRead(ref ARCO70Data, (int) DetectFWParameters.ModuleLength, LogsName[num]))
{
ReadLogNameStatus[num] = "True";
WDPassport.AppendSelfcanTxt(":成功.\r\n");
}
else
{
ReadLogNameStatus[num] = "False";
if (WDPassport.HDDError)
{
WDErrorCode.GetWDErrorCode();
WDPassport.AppendSelfcanTxt(":失败.(" + WDErrorCode.WDErrorCodeMenas + ")\r\n");
}
else
{
WDPassport.AppendSelfcanTxt(":失败.\r\n");
}
}
break;
case 7:
if (WDPassport.WDFWRead(ref ARCO6FData1, (int) DetectFWParameters.ModuleLength, LogsName[num]))
{
ReadLogNameStatus[num] = "True";
WDPassport.AppendSelfcanTxt(":成功.\r\n");
}
else
{
ReadLogNameStatus[num] = "False";
if (WDPassport.HDDError)
{
WDErrorCode.GetWDErrorCode();
WDPassport.AppendSelfcanTxt(":失败.(" + WDErrorCode.WDErrorCodeMenas + ")\r\n");
}
else
{
WDPassport.AppendSelfcanTxt(":失败.\r\n");
}
}
break;
case 8:
if (WDPassport.WDFWRead(ref ARCO6AData1, (int) DetectFWParameters.ModuleLength, LogsName[num]))
{
ReadLogNameStatus[num] = "True";
WDPassport.AppendSelfcanTxt(":成功.\r\n");
}
else
{
ReadLogNameStatus[num] = "False";
if (WDPassport.HDDError)
{
WDErrorCode.GetWDErrorCode();
WDPassport.AppendSelfcanTxt(":失败.(" + WDErrorCode.WDErrorCodeMenas + ")\r\n");
}
else
{
WDPassport.AppendSelfcanTxt(":失败.\r\n");
}
}
break;
case 9:
if (WDPassport.WDFWRead(ref ARCO6BData1, (int) DetectFWParameters.ModuleLength, LogsName[num]))
{
ReadLogNameStatus[num] = "True";
WDPassport.AppendSelfcanTxt(":成功.\r\n");
}
else
{
ReadLogNameStatus[num] = "False";
if (WDPassport.HDDError)
{
WDErrorCode.GetWDErrorCode();
WDPassport.AppendSelfcanTxt(":失败.(" + WDErrorCode.WDErrorCodeMenas + ")\r\n");
}
else
{
WDPassport.AppendSelfcanTxt(":失败.\r\n");
}
}
break;
case 10:
if (WDPassport.WDFWRead(ref ARCO69Data1, (int) DetectFWParameters.ModuleLength, LogsName[num]))
{
ReadLogNameStatus[num] = "True";
WDPassport.AppendSelfcanTxt(":成功.\r\n");
}
else
{
ReadLogNameStatus[num] = "False";
if (WDPassport.HDDError)
{
WDErrorCode.GetWDErrorCode();
WDPassport.AppendSelfcanTxt(":失败.(" + WDErrorCode.WDErrorCodeMenas + ")\r\n");
}
else
{
WDPassport.AppendSelfcanTxt(":失败.\r\n");
}
}
break;
case 11:
if (WDPassport.WDFWRead(ref ARCO46Data1, (int) DetectFWParameters.ModuleLength, LogsName[num]))
{
ReadLogNameStatus[num] = "True";
WDPassport.AppendSelfcanTxt(":成功.\r\n");
}
else
{
ReadLogNameStatus[num] = "False";
if (WDPassport.HDDError)
{
WDErrorCode.GetWDErrorCode();
WDPassport.AppendSelfcanTxt(":失败.(" + WDErrorCode.WDErrorCodeMenas + ")\r\n");
}
else
{
WDPassport.AppendSelfcanTxt(":失败.\r\n");
}
}
break;
case 12:
if (WDPassport.WDFWRead(ref ARCO70Data1, (int) DetectFWParameters.ModuleLength, LogsName[num]))
{
ReadLogNameStatus[num] = "True";
WDPassport.AppendSelfcanTxt(":成功.\r\n");
break;
}
ReadLogNameStatus[num] = "False";
if (WDPassport.HDDError)
{
WDErrorCode.GetWDErrorCode();
WDPassport.AppendSelfcanTxt(":失败.(" + WDErrorCode.WDErrorCodeMenas + ")\r\n");
}
else
{
WDPassport.AppendSelfcanTxt(":失败.\r\n");
}
break;
}
}
else if (num == 0)
{
ReadLogNameStatus[num] = "False";
if (WDPassport.HDDError)
{
WDErrorCode.GetWDErrorCode();
WDPassport.AppendSelfcanTxt(":失败.(" + WDErrorCode.WDErrorCodeMenas + ")\r\n");
}
else
{
WDPassport.AppendSelfcanTxt(":失败.\r\n");
}
}
else if (num == 1)
{
ReadLogNameStatus[num] = "False";
if (WDPassport.HDDError)
{
WDErrorCode.GetWDErrorCode();
WDPassport.AppendSelfcanTxt(":失败.(" + WDErrorCode.WDErrorCodeMenas + ")\r\n");
}
else
{
WDPassport.AppendSelfcanTxt(":失败.\r\n");
}
}
else if (num == 2)
{
ReadLogNameStatus[num] = "False";
if (WDPassport.HDDError)
{
WDErrorCode.GetWDErrorCode();
WDPassport.AppendSelfcanTxt(":失败.(" + WDErrorCode.WDErrorCodeMenas + ")\r\n");
}
else
{
WDPassport.AppendSelfcanTxt(":失败.\r\n");
}
}
else if (num == 3)
{
ReadLogNameStatus[num] = "False";
if (WDPassport.HDDError)
{
WDErrorCode.GetWDErrorCode();
WDPassport.AppendSelfcanTxt(":失败.(" + WDErrorCode.WDErrorCodeMenas + ")\r\n");
}
else
{
WDPassport.AppendSelfcanTxt(":失败.\r\n");
}
}
else if (num == 4)
{
ReadLogNameStatus[num] = "False";
if (WDPassport.HDDError)
{
WDErrorCode.GetWDErrorCode();
WDPassport.AppendSelfcanTxt(":失败.(" + WDErrorCode.WDErrorCodeMenas + ")\r\n");
}
else
{
WDPassport.AppendSelfcanTxt(":失败.\r\n");
}
}
else if (num == 5)
{
ReadLogNameStatus[num] = "False";
if (WDPassport.HDDError)
{
WDErrorCode.GetWDErrorCode();
WDPassport.AppendSelfcanTxt(":失败.(" + WDErrorCode.WDErrorCodeMenas + ")\r\n");
}
else
{
WDPassport.AppendSelfcanTxt(":失败.\r\n");
}
}
else if (num == 6)
{
ReadLogNameStatus[num] = "False";
if (WDPassport.HDDError)
{
WDErrorCode.GetWDErrorCode();
WDPassport.AppendSelfcanTxt(":失败.(" + WDErrorCode.WDErrorCodeMenas + ")\r\n");
}
else
{
WDPassport.AppendSelfcanTxt(":失败.\r\n");
}
}
else if (num == 7)
{
ReadLogNameStatus[num] = "False";
if (WDPassport.HDDError)
{
WDErrorCode.GetWDErrorCode();
WDPassport.AppendSelfcanTxt(":失败.(" + WDErrorCode.WDErrorCodeMenas + ")\r\n");
}
else
{
WDPassport.AppendSelfcanTxt(":失败.\r\n");
}
}
else if (num == 8)
{
ReadLogNameStatus[num] = "False";
if (WDPassport.HDDError)
{
WDErrorCode.GetWDErrorCode();
WDPassport.AppendSelfcanTxt(":失败.(" + WDErrorCode.WDErrorCodeMenas + ")\r\n");
}
else
{
WDPassport.AppendSelfcanTxt(":失败.\r\n");
}
}
else if (num == 9)
{
ReadLogNameStatus[num] = "False";
if (WDPassport.HDDError)
{
WDErrorCode.GetWDErrorCode();
WDPassport.AppendSelfcanTxt(":失败.(" + WDErrorCode.WDErrorCodeMenas + ")\r\n");
}
else
{
WDPassport.AppendSelfcanTxt(":失败.\r\n");
}
}
else if (num == 10)
{
ReadLogNameStatus[num] = "False";
if (WDPassport.HDDError)
{
WDErrorCode.GetWDErrorCode();
WDPassport.AppendSelfcanTxt(":失败.(" + WDErrorCode.WDErrorCodeMenas + ")\r\n");
}
else
{
WDPassport.AppendSelfcanTxt(":失败.\r\n");
}
}
else if (num == 11)
{
ReadLogNameStatus[num] = "False";
if (WDPassport.HDDError)
{
WDErrorCode.GetWDErrorCode();
WDPassport.AppendSelfcanTxt(":失败.(" + WDErrorCode.WDErrorCodeMenas + ")\r\n");
}
else
{
WDPassport.AppendSelfcanTxt(":失败.\r\n");
}
}
else if (num == 12)
{
ReadLogNameStatus[num] = "False";
if (WDPassport.HDDError)
{
WDErrorCode.GetWDErrorCode();
WDPassport.AppendSelfcanTxt(":失败.(" + WDErrorCode.WDErrorCodeMenas + ")\r\n");
}
else
{
WDPassport.AppendSelfcanTxt(":失败.\r\n");
}
}
num++;
}
while (num <= 12);
}
public static bool ReadWDMemory(ref byte[] MemoryData, int MemoryLength, string MemoryAdress)
{
string str = "";
int num = 0;
int num2 = 0;
string str2 = "";
MemoryData = new byte[((MemoryLength * 0x200) - 1) + 1];
bool flag = false;
MyProject.Forms.CacheOverlay.ProgressBar2.Value = 0;
if (!WDPassport.VSCON())
{
if (ATA.inportbyteVB(ATA.BasePort + 7) == 0x51L)
{
WDPassport.HDDError = true;
return false;
}
return false;
}
if (!WDPassport.WDWriteCommand1())
{
if (ATA.inportbyteVB(ATA.BasePort + 7) == 0x51L)
{
WDPassport.HDDError = true;
return false;
}
return false;
}
ATA.SendByteStrFirst = "";
ATA.SendByteStrFirst = MemoryAdress;
WDPassport.WDDataOneSector();
WDPassport.i = 0;
while (ATA.inportbyteVB(ATA.BasePort + 7) != 80L)
{
if (WDPassport.i > 0xbb8)
{
return false;
}
if (ATA.inportbyteVB(ATA.BasePort + 7) == 0x51L)
{
flag = false;
WDPassport.HDDError = true;
return flag;
}
if (ATA.inportbyteVB(ATA.BasePort + 7) == 0x10L)
{
break;
}
MyProject.Application.DoEvents();
ATA.Sleep(2);
WDPassport.i++;
}
if (MemoryLength <= 0x100)
{
MyProject.Forms.CacheOverlay.ProgressBar2.Maximum = MemoryLength;
MyProject.Forms.CacheOverlay.ProgressBar2.Value = 0;
str = Strings.Right("0000" + Conversion.Hex(MemoryLength), 4);
str = Strings.Mid(str, 3, 2) + Strings.Mid(str, 1, 2);
WDPassport.SendCommandStr = "";
WDPassport.SendCommandStr = "2780B0D5BF4FC2A000000000" + str + "0000";
WDPassport.SetSamsungRegVal();
int num8 = MemoryLength - 1;
for (int j = 0; j <= num8; j++)
{
WDPassport.i = 0;
while (ATA.inportbyteVB(ATA.BasePort + 7) != 0x58L)
{
if (WDPassport.i > 0xbb8)
{
flag = false;
MyProject.Forms.CacheOverlay.ProgressBar2.Value = 0;
return flag;
}
if (ATA.inportbyteVB(ATA.BasePort + 7) == 0x51L)
{
flag = false;
WDPassport.HDDError = true;
MyProject.Forms.CacheOverlay.ProgressBar2.Value = 0;
return flag;
}
if (ATA.inportbyteVB(ATA.BasePort + 7) == 0x18L)
{
break;
}
MyProject.Application.DoEvents();
ATA.Sleep(2);
WDPassport.i++;
}
WDPassport.i = 0;
do
{
WDPassport.j = ATA.inportwordVB(ATA.BasePort);
MemoryData[((j * 0x200) + WDPassport.i) + 1] = (byte) Math.Round(Conversion.Val("&H" + Strings.Mid(Strings.Right("00000000" + Conversion.Hex(WDPassport.j), 8), 5, 2)));
MemoryData[(j * 0x200) + WDPassport.i] = (byte) (WDPassport.j & 0xffL);
WDPassport.i += 2;
MyProject.Application.DoEvents();
}
while (WDPassport.i < 0x200);
num++;
MyProject.Forms.CacheOverlay.ProgressBar2.Value = num;
MyProject.Application.DoEvents();
}
MyProject.Forms.CacheOverlay.ProgressBar2.Value = 0;
return true;
}
if (MemoryLength <= 0x100)
{
return flag;
}
if ((MemoryLength > 0x100) & ((MemoryLength % 0x100) == 0))
{
num2 = (MemoryLength / 0x100) - 1;
}
else if ((MemoryLength > 0x100) & ((MemoryLength % 0x100) != 0))
{
num2 = MemoryLength / 0x100;
}
MyProject.Forms.CacheOverlay.ProgressBar2.Maximum = MemoryLength;
MyProject.Forms.CacheOverlay.ProgressBar2.Value = 0;
int num9 = num2;
for (int i = 0; i <= num9; i++)
{
if ((i == num2) & ((MemoryLength % 0x100) == 0))
{
WDPassport.SendCommandStr = "";
WDPassport.SendCommandStr = "2780B0D5BF4FC2A00000000000010000";
WDPassport.SetSamsungRegVal();
int num5 = 0;
do
{
WDPassport.i = 0;
while (ATA.inportbyteVB(ATA.BasePort + 7) != 0x58L)
{
if (WDPassport.i > 0xbb8)
{
flag = false;
MyProject.Forms.CacheOverlay.ProgressBar2.Value = 0;
return flag;
}
if (ATA.inportbyteVB(ATA.BasePort + 7) == 0x51L)
{
flag = false;
WDPassport.HDDError = true;
MyProject.Forms.CacheOverlay.ProgressBar2.Value = 0;
return flag;
}
if (ATA.inportbyteVB(ATA.BasePort + 7) == 0x18L)
{
break;
}
MyProject.Application.DoEvents();
ATA.Sleep(2);
WDPassport.i++;
}
WDPassport.i = 0;
do
{
WDPassport.j = ATA.inportwordVB(ATA.BasePort);
MemoryData[((((i * 0x100) * 0x200) + (num5 * 0x200)) + WDPassport.i) + 1] = (byte) Math.Round(Conversion.Val("&H" + Strings.Mid(Strings.Right("00000000" + Conversion.Hex(WDPassport.j), 8), 5, 2)));
MemoryData[(((i * 0x100) * 0x200) + (num5 * 0x200)) + WDPassport.i] = (byte) (WDPassport.j & 0xffL);
WDPassport.i += 2;
MyProject.Application.DoEvents();
}
while (WDPassport.i < 0x200);
MyProject.Application.DoEvents();
num++;
MyProject.Forms.CacheOverlay.ProgressBar2.Value = num;
num5++;
}
while (num5 <= 0xff);
WDPassport.i = 0;
while (ATA.inportbyteVB(ATA.BasePort + 7) != 80L)
{
if (WDPassport.i > 0xbb8)
{
flag = false;
MyProject.Forms.CacheOverlay.ProgressBar2.Value = 0;
return flag;
}
if (ATA.inportbyteVB(ATA.BasePort + 7) == 0x51L)
{
flag = false;
WDPassport.HDDError = true;
MyProject.Forms.CacheOverlay.ProgressBar2.Value = 0;
return flag;
}
if (ATA.inportbyteVB(ATA.BasePort + 7) == 0x10L)
{
break;
}
MyProject.Application.DoEvents();
ATA.Sleep(2);
WDPassport.i++;
}
continue;
}
if ((i == num2) & ((MemoryLength % 0x100) != 0))
{
str2 = "";
str2 = Strings.Right("0000" + Conversion.Hex((int) (MemoryLength % 0x100)), 4);
str2 = Strings.Mid(str2, 3, 2) + Strings.Mid(str2, 1, 2);
WDPassport.SendCommandStr = "";
WDPassport.SendCommandStr = "2780B0D5BF4FC2A000000000" + str2 + "0000";
WDPassport.SetSamsungRegVal();
int num10 = (MemoryLength % 0x100) - 1;
for (int k = 0; k <= num10; k++)
{
WDPassport.i = 0;
while (ATA.inportbyteVB(ATA.BasePort + 7) != 0x58L)
{
if (WDPassport.i > 0xbb8)
{
flag = false;
MyProject.Forms.CacheOverlay.ProgressBar2.Value = 0;
return flag;
}
if (ATA.inportbyteVB(ATA.BasePort + 7) == 0x51L)
{
flag = false;
WDPassport.HDDError = true;
MyProject.Forms.CacheOverlay.ProgressBar2.Value = 0;
return flag;
}
if (ATA.inportbyteVB(ATA.BasePort + 7) == 0x18L)
{
break;
}
MyProject.Application.DoEvents();
ATA.Sleep(2);
WDPassport.i++;
}
WDPassport.i = 0;
do
{
WDPassport.j = ATA.inportwordVB(ATA.BasePort);
MemoryData[((((i * 0x100) * 0x200) + (k * 0x200)) + WDPassport.i) + 1] = (byte) Math.Round(Conversion.Val("&H" + Strings.Mid(Strings.Right("00000000" + Conversion.Hex(WDPassport.j), 8), 5, 2)));
MemoryData[(((i * 0x100) * 0x200) + (k * 0x200)) + WDPassport.i] = (byte) (WDPassport.j & 0xffL);
WDPassport.i += 2;
MyProject.Application.DoEvents();
}
while (WDPassport.i < 0x200);
MyProject.Application.DoEvents();
num++;
MyProject.Forms.CacheOverlay.ProgressBar2.Value = num;
}
WDPassport.i = 0;
while (ATA.inportbyteVB(ATA.BasePort + 7) != 80L)
{
if (WDPassport.i > 0xbb8)
{
flag = false;
MyProject.Forms.CacheOverlay.ProgressBar2.Value = 0;
return flag;
}
if (ATA.inportbyteVB(ATA.BasePort + 7) == 0x51L)
{
flag = false;
WDPassport.HDDError = true;
MyProject.Forms.CacheOverlay.ProgressBar2.Value = 0;
return flag;
}
if (ATA.inportbyteVB(ATA.BasePort + 7) == 0x10L)
{
break;
}
MyProject.Application.DoEvents();
ATA.Sleep(2);
WDPassport.i++;
}
continue;
}
WDPassport.SendCommandStr = "";
WDPassport.SendCommandStr = "2780B0D5BF4FC2A00000000000010000";
WDPassport.SetSamsungRegVal();
int num7 = 0;
do
{
WDPassport.i = 0;
while (ATA.inportbyteVB(ATA.BasePort + 7) != 0x58L)
{
if (WDPassport.i > 0xbb8)
{
flag = false;
MyProject.Forms.CacheOverlay.ProgressBar2.Value = 0;
return flag;
}
if (ATA.inportbyteVB(ATA.BasePort + 7) == 0x51L)
{
flag = false;
WDPassport.HDDError = true;
MyProject.Forms.CacheOverlay.ProgressBar2.Value = 0;
return flag;
}
if (ATA.inportbyteVB(ATA.BasePort + 7) == 0x18L)
{
break;
}
MyProject.Application.DoEvents();
ATA.Sleep(2);
WDPassport.i++;
}
WDPassport.i = 0;
do
{
WDPassport.j = ATA.inportwordVB(ATA.BasePort);
MemoryData[((((i * 0x100) * 0x200) + (num7 * 0x200)) + WDPassport.i) + 1] = (byte) Math.Round(Conversion.Val("&H" + Strings.Mid(Strings.Right("00000000" + Conversion.Hex(WDPassport.j), 8), 5, 2)));
MemoryData[(((i * 0x100) * 0x200) + (num7 * 0x200)) + WDPassport.i] = (byte) (WDPassport.j & 0xffL);
WDPassport.i += 2;
MyProject.Application.DoEvents();
}
while (WDPassport.i < 0x200);
MyProject.Application.DoEvents();
num++;
MyProject.Forms.CacheOverlay.ProgressBar2.Value = num;
num7++;
}
while (num7 <= 0xff);
WDPassport.i = 0;
while (ATA.inportbyteVB(ATA.BasePort + 7) != 80L)
{
if (WDPassport.i > 0xbb8)
{
flag = false;
MyProject.Forms.CacheOverlay.ProgressBar2.Value = 0;
return flag;
}
if (ATA.inportbyteVB(ATA.BasePort + 7) == 0x51L)
{
flag = false;
WDPassport.HDDError = true;
MyProject.Forms.CacheOverlay.ProgressBar2.Value = 0;
return flag;
}
if (ATA.inportbyteVB(ATA.BasePort + 7) == 0x10L)
{
break;
}
MyProject.Application.DoEvents();
ATA.Sleep(2);
WDPassport.i++;
}
}
WDPassport.i = 0;
while (ATA.inportbyteVB(ATA.BasePort + 7) != 80L)
{
if (WDPassport.i > 0xbb8)
{
flag = false;
MyProject.Forms.CacheOverlay.ProgressBar2.Value = 0;
return flag;
}
if (ATA.inportbyteVB(ATA.BasePort + 7) == 0x51L)
{
flag = false;
WDPassport.HDDError = true;
MyProject.Forms.CacheOverlay.ProgressBar2.Value = 0;
return flag;
}
if (ATA.inportbyteVB(ATA.BasePort + 7) == 0x10L)
{
break;
}
MyProject.Application.DoEvents();
ATA.Sleep(2);
WDPassport.i++;
}
MyProject.Forms.CacheOverlay.ProgressBar2.Value = 0;
return true;
}
public static void ShowRolySelfscnScritpNew1()
{
string str3 = "";
int number = 0;
MyProject.Forms.CacheOverlay.SelfScanListView.Items.Clear();
WDSelfscan.ScriptStartFlag = "";
WDSelfscan.ScriptStartFlag = Strings.Right("00" + Conversion.Hex(StandardARC0PSTProcessData[0x31]), 2) + Strings.Right("00" + Conversion.Hex(StandardARC0PSTProcessData[0x30]), 2);
int num5 = ((((WDSelfscan.SelfscanModuleReadLength * 0x200) - 0x38) / 0x88) * 0x88) - 1;
for (int i = 0; i <= num5; i += 0x88)
{
WDSelfscan.TestID = "";
str3 = "";
WDSelfscan.Describe = "";
WDSelfscan.PTMID = "";
WDSelfscan.Param1 = "";
WDSelfscan.Param2 = "";
WDSelfscan.Param3 = "";
WDSelfscan.Param4 = "";
WDSelfscan.Param5 = "";
WDSelfscan.Param6 = "";
WDSelfscan.NextID = "";
WDSelfscan.ErrorSkipID = "";
WDSelfscan.Fatal = "";
string str2 = "";
string str = "";
long num = 0L;
num = 0L;
do
{
str2 = Strings.Right("00" + Conversion.Hex(StandardARC0PSTProcessData[((int) (0x38L + num)) + i]), 2) + Strings.Right("00" + Conversion.Hex(StandardARC0PSTProcessData[(int) (((0x38L + num) + i) + 1L)]), 2);
str = str + str2;
num += 2L;
}
while (num <= 0x87L);
WDSelfscan.TestID = Strings.Mid(str, 3, 2) + Strings.Mid(str, 1, 2);
str3 = Strings.Right("00" + Conversion.Hex(StandardARC0PSTProcessData[(0x38 + i) + 4]), 2);
if ((WDSelfscan.TestID == "00C4") & (str3 == "6F"))
{
WDSelfscan.Describe = "功率校准";
}
else if ((WDSelfscan.TestID == "00C4") & (str3 == "6A"))
{
WDSelfscan.Describe = "调整读写差距参数";
}
else if ((WDSelfscan.TestID == "00C4") & (str3 == "46"))
{
WDSelfscan.Describe = "全面高级通道参数优化";
}
else if ((WDSelfscan.TestID == "00C4") & (str3 == "63"))
{
WDSelfscan.Describe = "OTC Test";
}
else if ((WDSelfscan.TestID == "00C4") & (str3 == "70"))
{
WDSelfscan.Describe = "Target Search Calibration";
}
else if ((WDSelfscan.TestID == "00C4") & (str3 == "4A"))
{
WDSelfscan.Describe = "全面高级通道参数优化";
}
else
{
INIFileOperations.GetTestIDDescribe();
}
WDSelfscan.PTMID = Strings.Mid(str, 7, 2) + Strings.Mid(str, 5, 2);
WDSelfscan.Param1 = Strings.Mid(str, 15, 2) + Strings.Mid(str, 13, 2) + Strings.Mid(str, 11, 2) + Strings.Mid(str, 9, 2);
WDSelfscan.Param2 = Strings.Mid(str, 0x17, 2) + Strings.Mid(str, 0x15, 2) + Strings.Mid(str, 0x13, 2) + Strings.Mid(str, 0x11, 2);
WDSelfscan.Param3 = Strings.Mid(str, 0x1f, 2) + Strings.Mid(str, 0x1d, 2) + Strings.Mid(str, 0x1b, 2) + Strings.Mid(str, 0x19, 2);
WDSelfscan.Param4 = Strings.Mid(str, 0x27, 2) + Strings.Mid(str, 0x25, 2) + Strings.Mid(str, 0x23, 2) + Strings.Mid(str, 0x21, 2);
WDSelfscan.Param5 = Strings.Mid(str, 0x2f, 2) + Strings.Mid(str, 0x2d, 2) + Strings.Mid(str, 0x2b, 2) + Strings.Mid(str, 0x29, 2);
WDSelfscan.Param6 = Strings.Mid(str, 0x37, 2) + Strings.Mid(str, 0x35, 2) + Strings.Mid(str, 0x33, 2) + Strings.Mid(str, 0x31, 2);
WDSelfscan.NextID = Strings.Mid(str, 0x93, 2) + Strings.Mid(str, 0x91, 2);
if (WDSelfscan.NextID == "FFFF")
{
WDSelfscan.NextID = "Stop";
}
else
{
WDSelfscan.NextID = WDSelfscan.NextID;
}
WDSelfscan.ErrorSkipID = Strings.Mid(str, 0x97, 2) + Strings.Mid(str, 0x95, 2);
if (WDSelfscan.ErrorSkipID == "FFFF")
{
WDSelfscan.ErrorSkipID = "Stop";
}
else
{
WDSelfscan.ErrorSkipID = WDSelfscan.ErrorSkipID;
}
WDSelfscan.Fatal = Strings.Mid(str, 0x9b, 2) + Strings.Mid(str, 0x99, 2);
if (WDSelfscan.Fatal == "FFFF")
{
WDSelfscan.Fatal = "Stop";
}
else
{
WDSelfscan.Fatal = WDSelfscan.Fatal;
}
if (WDSelfscan.TestID == "0000")
{
break;
}
number++;
if (Conversions.ToLong("&h" + WDSelfscan.ScriptStartFlag) == number)
{
MyProject.Forms.CacheOverlay.SelfScanListView.Items.Add(Conversion.Hex(number), 0).SubItems.AddRange(new string[] { WDSelfscan.TestID, WDSelfscan.Describe, WDSelfscan.PTMID, WDSelfscan.Param1, WDSelfscan.Param2, WDSelfscan.Param3, WDSelfscan.Param4, WDSelfscan.Param5, WDSelfscan.Param6, WDSelfscan.NextID, WDSelfscan.ErrorSkipID, WDSelfscan.Fatal });
}
else
{
MyProject.Forms.CacheOverlay.SelfScanListView.Items.Add(Conversion.Hex(number)).SubItems.AddRange(new string[] { WDSelfscan.TestID, WDSelfscan.Describe, WDSelfscan.PTMID, WDSelfscan.Param1, WDSelfscan.Param2, WDSelfscan.Param3, WDSelfscan.Param4, WDSelfscan.Param5, WDSelfscan.Param6, WDSelfscan.NextID, WDSelfscan.ErrorSkipID, WDSelfscan.Fatal });
}
}
try
{
int num3 = (int) (Conversions.ToLong("&h" + WDSelfscan.ScriptStartFlag) - 1L);
if (num3 <= (((WDSelfscan.ScriptReadCount * 0x200L) - 0x38L) / 0x88L))
{
MyProject.Forms.CacheOverlay.SelfScanListView.Items[num3].Selected = true;
MyProject.Forms.CacheOverlay.SelfScanListView.Focus();
}
}
catch (Exception exception1)
{
ProjectData.SetProjectError(exception1);
ProjectData.ClearProjectError();
}
MyProject.Forms.CacheOverlay.SelfScanListView.Focus();
}
public static void ShowRolySelfscnScritpNew2()
{
string str3 = "";
int number = 0;
MyProject.Forms.CacheOverlay.SelfScanListView.Items.Clear();
WDSelfscan.ScriptStartFlag = "";
WDSelfscan.ScriptStartFlag = Strings.Right("00" + Conversion.Hex(StandardARC0PSTProcessData[0x31]), 2) + Strings.Right("00" + Conversion.Hex(StandardARC0PSTProcessData[0x30]), 2);
int num5 = ((((WDSelfscan.SelfscanModuleReadLength * 0x200) - 0x38) / 0x88) * 0x88) - 1;
for (int i = 0; i <= num5; i += 0x88)
{
WDSelfscan.TestID = "";
str3 = "";
WDSelfscan.Describe = "";
WDSelfscan.PTMID = "";
WDSelfscan.Param1 = "";
WDSelfscan.Param2 = "";
WDSelfscan.Param3 = "";
WDSelfscan.Param4 = "";
WDSelfscan.Param5 = "";
WDSelfscan.Param6 = "";
WDSelfscan.NextID = "";
WDSelfscan.ErrorSkipID = "";
WDSelfscan.Fatal = "";
string str2 = "";
string str = "";
long num = 0L;
num = 0L;
do
{
str2 = Strings.Right("00" + Conversion.Hex(StandardARC0PSTProcessData[((int) (0x38L + num)) + i]), 2) + Strings.Right("00" + Conversion.Hex(StandardARC0PSTProcessData[(int) (((0x38L + num) + i) + 1L)]), 2);
str = str + str2;
num += 2L;
}
while (num <= 0x87L);
WDSelfscan.TestID = Strings.Mid(str, 3, 2) + Strings.Mid(str, 1, 2);
str3 = Strings.Right("00" + Conversion.Hex(StandardARC0PSTProcessData[(0x38 + i) + 4]), 2);
if ((WDSelfscan.TestID == "00C4") & (str3 == "6F"))
{
WDSelfscan.Describe = "功率校准";
}
else if ((WDSelfscan.TestID == "00C4") & (str3 == "6A"))
{
WDSelfscan.Describe = "调整读写差距参数";
}
else if ((WDSelfscan.TestID == "00C4") & (str3 == "46"))
{
WDSelfscan.Describe = "全面高级通道参数优化";
}
else if ((WDSelfscan.TestID == "00C4") & (str3 == "63"))
{
WDSelfscan.Describe = "OTC Test";
}
else if ((WDSelfscan.TestID == "00C4") & (str3 == "70"))
{
WDSelfscan.Describe = "Target Search Calibration";
}
else if ((WDSelfscan.TestID == "00C4") & (str3 == "4A"))
{
WDSelfscan.Describe = "全面高级通道参数优化";
}
else
{
INIFileOperations.GetTestIDDescribe();
}
WDSelfscan.PTMID = Strings.Mid(str, 7, 2) + Strings.Mid(str, 5, 2);
WDSelfscan.Param1 = Strings.Mid(str, 15, 2) + Strings.Mid(str, 13, 2) + Strings.Mid(str, 11, 2) + Strings.Mid(str, 9, 2);
WDSelfscan.Param2 = Strings.Mid(str, 0x17, 2) + Strings.Mid(str, 0x15, 2) + Strings.Mid(str, 0x13, 2) + Strings.Mid(str, 0x11, 2);
WDSelfscan.Param3 = Strings.Mid(str, 0x1f, 2) + Strings.Mid(str, 0x1d, 2) + Strings.Mid(str, 0x1b, 2) + Strings.Mid(str, 0x19, 2);
WDSelfscan.Param4 = Strings.Mid(str, 0x27, 2) + Strings.Mid(str, 0x25, 2) + Strings.Mid(str, 0x23, 2) + Strings.Mid(str, 0x21, 2);
WDSelfscan.Param5 = Strings.Mid(str, 0x2f, 2) + Strings.Mid(str, 0x2d, 2) + Strings.Mid(str, 0x2b, 2) + Strings.Mid(str, 0x29, 2);
WDSelfscan.Param6 = Strings.Mid(str, 0x37, 2) + Strings.Mid(str, 0x35, 2) + Strings.Mid(str, 0x33, 2) + Strings.Mid(str, 0x31, 2);
WDSelfscan.NextID = Strings.Mid(str, 0x93, 2) + Strings.Mid(str, 0x91, 2);
if (WDSelfscan.NextID == "FFFF")
{
WDSelfscan.NextID = "Stop";
}
else
{
WDSelfscan.NextID = WDSelfscan.NextID;
}
WDSelfscan.ErrorSkipID = Strings.Mid(str, 0x97, 2) + Strings.Mid(str, 0x95, 2);
if (WDSelfscan.ErrorSkipID == "FFFF")
{
WDSelfscan.ErrorSkipID = "Stop";
}
else
{
WDSelfscan.ErrorSkipID = WDSelfscan.ErrorSkipID;
}
WDSelfscan.Fatal = Strings.Mid(str, 0x9b, 2) + Strings.Mid(str, 0x99, 2);
if (WDSelfscan.Fatal == "FFFF")
{
WDSelfscan.Fatal = "Stop";
}
else
{
WDSelfscan.Fatal = WDSelfscan.Fatal;
}
if (WDSelfscan.TestID == "0000")
{
break;
}
number++;
if (Conversions.ToLong("&h" + WDSelfscan.ScriptStartFlag) == number)
{
MyProject.Forms.CacheOverlay.SelfScanListView.Items.Add(Conversion.Hex(number), 0).SubItems.AddRange(new string[] { WDSelfscan.TestID, WDSelfscan.Describe, WDSelfscan.PTMID, WDSelfscan.Param1, WDSelfscan.Param2, WDSelfscan.Param3, WDSelfscan.Param4, WDSelfscan.Param5, WDSelfscan.Param6, WDSelfscan.NextID, WDSelfscan.ErrorSkipID, WDSelfscan.Fatal });
}
else
{
MyProject.Forms.CacheOverlay.SelfScanListView.Items.Add(Conversion.Hex(number)).SubItems.AddRange(new string[] { WDSelfscan.TestID, WDSelfscan.Describe, WDSelfscan.PTMID, WDSelfscan.Param1, WDSelfscan.Param2, WDSelfscan.Param3, WDSelfscan.Param4, WDSelfscan.Param5, WDSelfscan.Param6, WDSelfscan.NextID, WDSelfscan.ErrorSkipID, WDSelfscan.Fatal });
}
}
try
{
int num3 = (int) (Conversions.ToLong("&h" + WDSelfscan.ScriptStartFlag) - 1L);
if (num3 <= (((WDSelfscan.ScriptReadCount * 0x200L) - 0x38L) / 0x88L))
{
MyProject.Forms.CacheOverlay.SelfScanListView.Items[num3].Selected = true;
MyProject.Forms.CacheOverlay.SelfScanListView.Focus();
}
}
catch (Exception exception1)
{
ProjectData.SetProjectError(exception1);
ProjectData.ClearProjectError();
}
MyProject.Forms.CacheOverlay.SelfScanListView.Focus();
}
public static void ShowVKFCIHeadQualificationTestResult()
{
Get69LogOK = false;
if (WDPassport.WDFWRead(ref Flash.TempData, 1, "00C9"))
{
DetectFWParameters.ModuleLength = Conversions.ToLong("&h" + Strings.Right("00" + Conversion.Hex(Flash.TempData[11]), 2) + Strings.Right("00" + Conversion.Hex(Flash.TempData[10]), 2));
if (WDPassport.WDFWRead(ref WDModules.WDModuleData, (int) DetectFWParameters.ModuleLength, "00C9"))
{
Get69LogOK = true;
VKFCIHeadQualificationTestStatusStr = "";
VKFCIHeadQualificationTestErrorCodeStr = "";
VKFCIHeadQualificationTestSelectCapacityStr = "";
VKFCIHeadQualificationTestFormatCodeHead0 = "";
VKFCIHeadQualificationTestFormatCodeHead1 = "";
VKFCIHeadQualificationTestFormatCodeHead2 = "";
VKFCIHeadQualificationTestFormatCodeHead3 = "";
VKFCIHeadQualificationTestFormatCodeHead4 = "";
VKFCIHeadQualificationTestFormatCodeHead5 = "";
VKFCIHeadQualificationTestFormatCodeHead6 = "";
VKFCIHeadQualificationTestFormatCodeHead7 = "";
VKFCIHeadQualificationTestErrorCountHead0 = "";
VKFCIHeadQualificationTestErrorCountHead1 = "";
VKFCIHeadQualificationTestErrorCountHead2 = "";
VKFCIHeadQualificationTestErrorCountHead3 = "";
VKFCIHeadQualificationTestErrorCountHead4 = "";
VKFCIHeadQualificationTestErrorCountHead5 = "";
VKFCIHeadQualificationTestErrorCountHead6 = "";
VKFCIHeadQualificationTestErrorCountHead7 = "";
TargeMaxFormatCapacityStr = "";
HQFormatCapcityStr = "";
VKFCIHeadQualificationTestStatusStr = Conversions.ToString(Strings.ChrW(WDModules.WDModuleData[0x33])) + Conversions.ToString(Strings.ChrW(WDModules.WDModuleData[50])) + Conversions.ToString(Strings.ChrW(WDModules.WDModuleData[0x31])) + Conversions.ToString(Strings.ChrW(WDModules.WDModuleData[0x30]));
if (VKFCIHeadQualificationTestStatusStr == "COMP")
{
VKFCIHeadQualificationTestStatusStr = "Completed";
}
else
{
VKFCIHeadQualificationTestStatusStr = VKFCIHeadQualificationTestStatusStr;
}
VKFCIHeadQualificationTestErrorCodeStr = Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x37]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x36]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x35]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x34]), 2);
if (VKFCIHeadQualificationTestErrorCodeStr == "00000000")
{
VKFCIHeadQualificationTestErrorCodeStr = VKFCIHeadQualificationTestErrorCodeStr + "( NO Error )";
}
else
{
VKFCIHeadQualificationTestErrorCodeStr = VKFCIHeadQualificationTestErrorCodeStr + "( Not Define )";
}
VKFCIHeadQualificationTestSelectCapacityStr = Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x3b]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x3a]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x39]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x38]), 2);
VKFCIHeadQualificationTestFormatCodeHead0 = Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x3f]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x3e]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x3d]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[60]), 2);
VKFCIHeadQualificationTestFormatCodeHead1 = Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x43]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x42]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x41]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x40]), 2);
VKFCIHeadQualificationTestFormatCodeHead2 = Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x47]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[70]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x45]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x44]), 2);
VKFCIHeadQualificationTestFormatCodeHead3 = Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x4b]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x4a]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x49]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x48]), 2);
VKFCIHeadQualificationTestFormatCodeHead4 = Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x4f]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x4e]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x4d]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x4c]), 2);
VKFCIHeadQualificationTestFormatCodeHead5 = Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x53]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x52]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x51]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[80]), 2);
VKFCIHeadQualificationTestFormatCodeHead6 = Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x57]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x56]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x55]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x54]), 2);
VKFCIHeadQualificationTestFormatCodeHead7 = Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x5b]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[90]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x59]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x58]), 2);
VKFCIHeadQualificationTestErrorCountHead0 = Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x5f]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x5e]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x5d]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x5c]), 2);
VKFCIHeadQualificationTestErrorCountHead1 = Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x63]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x62]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x61]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x60]), 2);
VKFCIHeadQualificationTestErrorCountHead2 = Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x67]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x66]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x65]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[100]), 2);
VKFCIHeadQualificationTestErrorCountHead3 = Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x6b]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x6a]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x69]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x68]), 2);
VKFCIHeadQualificationTestErrorCountHead4 = Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x6f]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[110]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x6d]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x6c]), 2);
VKFCIHeadQualificationTestErrorCountHead5 = Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x73]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x72]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x71]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x70]), 2);
VKFCIHeadQualificationTestErrorCountHead6 = Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x77]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x76]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x75]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x74]), 2);
VKFCIHeadQualificationTestErrorCountHead7 = Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x7b]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x7a]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x79]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[120]), 2);
TargeMaxFormatCapacityStr = Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x26f]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x26e]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x26d]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[620]), 2);
TargeMaxFormatCapacityStr = TargeMaxFormatCapacityStr + "(" + Conversions.ToString(Conversions.ToLong("&h" + TargeMaxFormatCapacityStr)) + ")";
HQFormatCapcityStr = Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x30f]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x30e]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x30d]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[780]), 2);
HQFormatCapcityStr = HQFormatCapcityStr + "(" + Conversions.ToString(Conversions.ToLong("&h" + HQFormatCapcityStr)) + ")";
int num = 0;
do
{
string str = "";
str = Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x21f + num]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x21e + num]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x21d + num]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[540 + num]), 2);
ARCOParameters = ARCOParameters + str + ",";
num += 4;
}
while (num <= 0x1b);
ARCOParameters = Strings.Mid(ARCOParameters, 1, Strings.Len(ARCOParameters) - 1);
}
else if (WDPassport.HDDError)
{
WDErrorCode.GetWDErrorCode();
Interaction.MsgBox("读69 Log失败!(" + WDErrorCode.WDErrorCodeMenas + ")", MsgBoxStyle.Exclamation, PublicDefine.ShowMsgTitle);
}
else
{
Interaction.MsgBox("读69 Log失败!\r\n", MsgBoxStyle.ApplicationModal, null);
}
}
else if (WDPassport.HDDError)
{
WDErrorCode.GetWDErrorCode();
Interaction.MsgBox("读69 Log失败!(" + WDErrorCode.WDErrorCodeMenas + ")", MsgBoxStyle.Exclamation, PublicDefine.ShowMsgTitle);
}
else
{
Interaction.MsgBox("读69 Log失败!", MsgBoxStyle.Exclamation, PublicDefine.ShowMsgTitle);
}
}
public static void StartARCO()
{
CalibrateCodeName = "";
CalibrateHeadDCMStr = "";
CalibrateMediaDCMStr = "";
ChampTempStr = "";
GetCalibrateCodeName();
CalibrateCodeName = Strings.Trim(MyProject.Forms.CacheOverlay.CaliCodeCombox.Text);
CalibrateHeadDCMStr = Strings.Right("00" + Conversion.Hex((long) Strings.AscW(MyProject.Forms.CacheOverlay.HeadDCMTxt.Text)), 2);
CalibrateMediaDCMStr = Strings.Right("00" + Conversion.Hex((long) Strings.AscW(MyProject.Forms.CacheOverlay.MediaDCMTxt.Text)), 2);
ChampTempStr = Strings.Right("00" + Strings.Trim(MyProject.Forms.CacheOverlay.HexTxt.Text), 2);
WDModules.ShowStr = "";
WDModules.ShowStr = "启动校准 ";
WDModules.ShowStr2 = "";
int num3 = 0x34 - Strings.Len(WDModules.ShowStr);
for (int i = 1; i <= num3; i++)
{
WDModules.ShowStr1 = "";
WDModules.ShowStr1 = ".";
WDModules.ShowStr2 = WDModules.ShowStr2 + WDModules.ShowStr1;
MyProject.Application.DoEvents();
}
WDPassport.AppendARCOLogTxt(WDModules.ShowStr + WDModules.ShowStr2);
WDPassport.SendCommandStr = "";
WDPassport.SendCommandStr = "27808045004457A0BF0000D500000000";
WDPassport.SetSamsungRegVal();
WDPassport.i = 0;
while (ATA.inportbyteVB(ATA.BasePort + 7) != 80L)
{
if (WDPassport.i > 50)
{
WDPassport.AppendARCOLogTxt(":失败. (硬盘超时)\r\n");
return;
}
if (ATA.inportbyteVB(ATA.BasePort + 7) == 0x51L)
{
WDErrorCode.GetWDErrorCode();
WDPassport.AppendARCOLogTxt(":失败. (" + WDErrorCode.WDErrorCodeMenas + ")\r\n");
return;
}
if (ATA.inportbyteVB(ATA.BasePort + 7) == 0x10L)
{
WDPassport.AppendARCOLogTxt(":失败. (硬盘错误)\r\n");
return;
}
MyProject.Application.DoEvents();
ATA.Sleep(2);
WDPassport.i++;
}
WDPassport.SendCommandStr = "";
WDPassport.SendCommandStr = "2780B0D6BE4FC2A00044574501000000";
WDPassport.SetSamsungRegVal();
WDPassport.i = 0;
while (ATA.inportbyteVB(ATA.BasePort + 7) != 0x58L)
{
if (WDPassport.i > 50)
{
WDPassport.AppendARCOLogTxt(":失败. (硬盘超时)\r\n");
return;
}
if (ATA.inportbyteVB(ATA.BasePort + 7) == 0x51L)
{
WDErrorCode.GetWDErrorCode();
WDPassport.AppendARCOLogTxt(":失败. (" + WDErrorCode.WDErrorCodeMenas + ")\r\n");
return;
}
if (ATA.inportbyteVB(ATA.BasePort + 7) == 0x18L)
{
WDPassport.AppendARCOLogTxt(":失败. (硬盘错误)\r\n");
return;
}
MyProject.Application.DoEvents();
ATA.Sleep(2);
WDPassport.i++;
}
ATA.SendByteStrFirst = "";
ATA.SendByteStrFirst = "19000300" + CalibrateCodeName + "000100" + CalibrateCommand + "000000" + ChampTempStr + "000000" + CalibrateHeadDCMStr + "000000" + CalibrateMediaDCMStr + "0000000000000000000000";
WDPassport.WDDataOneSector1();
WDPassport.i = 0;
while (ATA.inportbyteVB(ATA.BasePort + 7) != 80L)
{
if (WDPassport.i > 0xbb8)
{
WDPassport.AppendARCOLogTxt(":失败. (硬盘超时)\r\n");
WDPassport.VSCONON();
return;
}
if (ATA.inportbyteVB(ATA.BasePort + 7) == 0x51L)
{
WDErrorCode.GetWDErrorCode();
WDPassport.AppendARCOLogTxt(":失败.(" + WDErrorCode.WDErrorCodeMenas + ")\r\n");
return;
}
if (ATA.inportbyteVB(ATA.BasePort + 7) == 0x10L)
{
WDPassport.AppendARCOLogTxt(":失败. (硬盘错误)\r\n");
return;
}
MyProject.Application.DoEvents();
ATA.Sleep(2);
WDPassport.i++;
}
WDPassport.AppendARCOLogTxt(":成功.\r\n");
GetCurrentTestName();
WDModules.ShowStr = "";
WDModules.ShowStr = CurrentARCOTestNameStr;
WDModules.ShowStr2 = "";
int num4 = 0x26 - Strings.Len(WDModules.ShowStr);
for (int j = 1; j <= num4; j++)
{
WDModules.ShowStr1 = "";
WDModules.ShowStr1 = ".";
WDModules.ShowStr2 = WDModules.ShowStr2 + WDModules.ShowStr1;
MyProject.Application.DoEvents();
}
WDSelfscan.CurrentSystemDateStr = "";
WDSelfscan.CurrentSystemDateStr = Conversions.ToString(DateTime.Now);
WDPassport.AppendARCOLogTxt("\r\n" + WDSelfscan.CurrentSystemDateStr + WDModules.ShowStr + WDModules.ShowStr2 + ":Start\r\n");
ARCOMonitor();
}
public static void StartARCOAdjust4F()
{
WDPassport.SendCommandStr = "";
WDPassport.SendCommandStr = "27808045004457A0BF0000D500000000";
WDPassport.SetSamsungRegVal();
WDPassport.i = 0;
while (ATA.inportbyteVB(ATA.BasePort + 7) != 80L)
{
if (WDPassport.i > 50)
{
Interaction.MsgBox("Start Adjust 4F FAIL(HDD Timeout)", MsgBoxStyle.Information, PublicDefine.ShowMsgTitle);
return;
}
if (ATA.inportbyteVB(ATA.BasePort + 7) == 0x51L)
{
WDErrorCode.GetWDErrorCode();
Interaction.MsgBox("Start Adjust 4F FAIL(" + WDErrorCode.WDErrorCodeMenas + ")", MsgBoxStyle.Information, PublicDefine.ShowMsgTitle);
return;
}
if (ATA.inportbyteVB(ATA.BasePort + 7) == 0x10L)
{
Interaction.MsgBox("Start Adjust 4F FAIL(HDD Error)", MsgBoxStyle.Information, PublicDefine.ShowMsgTitle);
return;
}
MyProject.Application.DoEvents();
ATA.Sleep(2);
WDPassport.i++;
}
WDPassport.SendCommandStr = "";
WDPassport.SendCommandStr = "2780B0D6BE4FC2A00044574501000000";
WDPassport.SetSamsungRegVal();
WDPassport.i = 0;
while (ATA.inportbyteVB(ATA.BasePort + 7) != 0x58L)
{
if (WDPassport.i > 50)
{
Interaction.MsgBox("Start Adjust 4F FAIL(HDD Timeout)", MsgBoxStyle.Information, PublicDefine.ShowMsgTitle);
return;
}
if (ATA.inportbyteVB(ATA.BasePort + 7) == 0x51L)
{
WDErrorCode.GetWDErrorCode();
Interaction.MsgBox("Start Adjust 4F FAIL(" + WDErrorCode.WDErrorCodeMenas + ")", MsgBoxStyle.Information, PublicDefine.ShowMsgTitle);
return;
}
if (ATA.inportbyteVB(ATA.BasePort + 7) == 0x18L)
{
Interaction.MsgBox("Start Adjust 4F FAIL(HDD Error)", MsgBoxStyle.Information, PublicDefine.ShowMsgTitle);
return;
}
MyProject.Application.DoEvents();
ATA.Sleep(2);
WDPassport.i++;
}
ATA.SendByteStrFirst = "";
ATA.SendByteStrFirst = "19000300B100E004000000000000000000000000000000000000000000000000";
WDPassport.WDDataOneSector1();
WDPassport.i = 0;
while (ATA.inportbyteVB(ATA.BasePort + 7) != 80L)
{
if (WDPassport.i > 0xbb8)
{
Interaction.MsgBox("Start Adjust 4F FAIL(HDD Timeout)", MsgBoxStyle.Information, PublicDefine.ShowMsgTitle);
WDPassport.VSCONON();
return;
}
if (ATA.inportbyteVB(ATA.BasePort + 7) == 0x51L)
{
WDErrorCode.GetWDErrorCode();
Interaction.MsgBox("Start Adjust 4F FAIL(" + WDErrorCode.WDErrorCodeMenas + ")", MsgBoxStyle.Information, PublicDefine.ShowMsgTitle);
return;
}
if (ATA.inportbyteVB(ATA.BasePort + 7) == 0x10L)
{
Interaction.MsgBox("Start Adjust 4F FAIL(HDD Error)", MsgBoxStyle.Information, PublicDefine.ShowMsgTitle);
return;
}
MyProject.Application.DoEvents();
ATA.Sleep(2);
WDPassport.i++;
}
CurrentARCOTestNameStr = "";
CurrentARCOTestNameStr = " Adjust 0x4F";
WDModules.ShowStr = "";
WDModules.ShowStr = CurrentARCOTestNameStr;
WDModules.ShowStr2 = "";
int num2 = 0x26 - Strings.Len(WDModules.ShowStr);
for (int i = 1; i <= num2; i++)
{
WDModules.ShowStr1 = "";
WDModules.ShowStr1 = ".";
WDModules.ShowStr2 = WDModules.ShowStr2 + WDModules.ShowStr1;
MyProject.Application.DoEvents();
}
WDSelfscan.CurrentSystemDateStr = "";
WDSelfscan.CurrentSystemDateStr = Conversions.ToString(DateTime.Now);
WDPassport.AppendARCOLogTxt("\r\n" + WDSelfscan.CurrentSystemDateStr + WDModules.ShowStr + WDModules.ShowStr2 + ":Start\r\n");
ARCOMonitorAdjust4F();
}
public static void StartARCONew()
{
CalibrateHeadDCMStr = "";
CalibrateMediaDCMStr = "";
WDModules.ShowStr = "";
WDModules.ShowStr = "启动校准 ";
WDModules.ShowStr2 = "";
int num3 = 0x34 - Strings.Len(WDModules.ShowStr);
for (int i = 1; i <= num3; i++)
{
WDModules.ShowStr1 = "";
WDModules.ShowStr1 = ".";
WDModules.ShowStr2 = WDModules.ShowStr2 + WDModules.ShowStr1;
MyProject.Application.DoEvents();
}
WDPassport.AppendARCOLogTxt(WDModules.ShowStr + WDModules.ShowStr2);
if (WDPassport.WDFWRead(ref Hexdata, 1, "0047"))
{
CalibrateHeadDCMStr = Strings.Right("00" + Conversion.Hex(Hexdata[0x2e]), 2);
CalibrateMediaDCMStr = Strings.Right("00" + Conversion.Hex(Hexdata[0x2f]), 2);
}
else
{
if (WDPassport.HDDError)
{
WDErrorCode.GetWDErrorCode();
WDPassport.AppendARCOLogTxt(":失败(加载DCM失败)");
return;
}
WDPassport.AppendARCOLogTxt(":失败(加载DCM失败)");
return;
}
WDPassport.SendCommandStr = "";
WDPassport.SendCommandStr = "27808045004457A0BF0000D500000000";
WDPassport.SetSamsungRegVal();
WDPassport.i = 0;
while (ATA.inportbyteVB(ATA.BasePort + 7) != 80L)
{
if (WDPassport.i > 50)
{
WDPassport.AppendARCOLogTxt(":失败. (硬盘超时)\r\n");
return;
}
if (ATA.inportbyteVB(ATA.BasePort + 7) == 0x51L)
{
WDErrorCode.GetWDErrorCode();
WDPassport.AppendARCOLogTxt(":失败. (" + WDErrorCode.WDErrorCodeMenas + ")\r\n");
return;
}
if (ATA.inportbyteVB(ATA.BasePort + 7) == 0x10L)
{
WDPassport.AppendARCOLogTxt(":失败. (硬盘错误)\r\n");
return;
}
MyProject.Application.DoEvents();
ATA.Sleep(2);
WDPassport.i++;
}
WDPassport.SendCommandStr = "";
WDPassport.SendCommandStr = "2780B0D6BE4FC2A00044574501000000";
WDPassport.SetSamsungRegVal();
WDPassport.i = 0;
while (ATA.inportbyteVB(ATA.BasePort + 7) != 0x58L)
{
if (WDPassport.i > 50)
{
WDPassport.AppendARCOLogTxt(":失败. (硬盘超时)\r\n");
return;
}
if (ATA.inportbyteVB(ATA.BasePort + 7) == 0x51L)
{
WDErrorCode.GetWDErrorCode();
WDPassport.AppendARCOLogTxt(":失败. (" + WDErrorCode.WDErrorCodeMenas + ")\r\n");
return;
}
if (ATA.inportbyteVB(ATA.BasePort + 7) == 0x18L)
{
WDPassport.AppendARCOLogTxt(":失败. (硬盘错误)\r\n");
return;
}
MyProject.Application.DoEvents();
ATA.Sleep(2);
WDPassport.i++;
}
ATA.SendByteStrFirst = "";
ATA.SendByteStrFirst = "19000300C40001004400000019000000" + CalibrateHeadDCMStr + "000000" + CalibrateMediaDCMStr + "0000000000000000000000";
WDPassport.WDDataOneSector1();
WDPassport.i = 0;
while (ATA.inportbyteVB(ATA.BasePort + 7) != 80L)
{
if (WDPassport.i > 0xbb8)
{
WDPassport.AppendARCOLogTxt(":失败. (硬盘超时)\r\n");
WDPassport.VSCONON();
return;
}
if (ATA.inportbyteVB(ATA.BasePort + 7) == 0x51L)
{
WDErrorCode.GetWDErrorCode();
WDPassport.AppendARCOLogTxt(":失败.(" + WDErrorCode.WDErrorCodeMenas + ")\r\n");
return;
}
if (ATA.inportbyteVB(ATA.BasePort + 7) == 0x10L)
{
WDPassport.AppendARCOLogTxt(":失败. (硬盘错误)\r\n");
return;
}
MyProject.Application.DoEvents();
ATA.Sleep(2);
WDPassport.i++;
}
WDPassport.AppendARCOLogTxt(":成功.\r\n");
CurrentARCOTestNameStr = "";
CurrentARCOTestNameStr = " Mini-ARCO Test";
WDModules.ShowStr = "";
WDModules.ShowStr = CurrentARCOTestNameStr;
WDModules.ShowStr2 = "";
int num4 = 0x26 - Strings.Len(WDModules.ShowStr);
for (int j = 1; j <= num4; j++)
{
WDModules.ShowStr1 = "";
WDModules.ShowStr1 = ".";
WDModules.ShowStr2 = WDModules.ShowStr2 + WDModules.ShowStr1;
MyProject.Application.DoEvents();
}
WDSelfscan.CurrentSystemDateStr = "";
WDSelfscan.CurrentSystemDateStr = Conversions.ToString(DateTime.Now);
WDPassport.AppendARCOLogTxt("\r\n" + WDSelfscan.CurrentSystemDateStr + WDModules.ShowStr + WDModules.ShowStr2 + ":Start\r\n");
ARCOMonitor();
}
public static void View0x30()
{
string str = "";
string str2 = "";
if (WDPassport.WDFWRead(ref Hexdata, 1, "0030"))
{
MyProject.Forms.Hex_Data.TextBox1.Text = "";
int num3 = Information.UBound(Hexdata, 1);
for (int i = 0; i <= num3; i += 0x10)
{
str = "";
int num2 = 0;
do
{
str2 = "";
str2 = Strings.Right("00" + Conversion.Hex(Hexdata[i + num2]), 2);
str = str + str2 + " ";
num2++;
}
while (num2 <= 15);
MyProject.Forms.Hex_Data.TextBox1.Text = MyProject.Forms.Hex_Data.TextBox1.Text + Strings.Right("00000000" + Conversion.Hex(i), 8) + " " + str + "\r\n";
if (((i + 0x10) % 0x200) == 0)
{
MyProject.Forms.Hex_Data.TextBox1.Text = MyProject.Forms.Hex_Data.TextBox1.Text + "---------------------------------------------------------\r\n";
}
}
HexDialogNameStr = "";
HexDialogNameStr = "Flash Module 0x30 Content";
MyProject.Forms.Hex_Data.Text = "Flash Module 0x30 Content";
MyProject.Forms.Hex_Data.ShowDialog();
}
else if (WDPassport.HDDError)
{
WDErrorCode.GetWDErrorCode();
Interaction.MsgBox("读取0x30失败!(" + WDErrorCode.WDErrorCodeMenas + ")\r\n", MsgBoxStyle.ApplicationModal, null);
}
else
{
Interaction.MsgBox("读取0x30失败!\r\n", MsgBoxStyle.ApplicationModal, null);
}
}
public static void View0x47()
{
string str = "";
string str2 = "";
if (WDPassport.WDFWRead(ref Hexdata, 1, "0047"))
{
MyProject.Forms.Hex_Data.TextBox1.Text = "";
int num3 = Information.UBound(Hexdata, 1);
for (int i = 0; i <= num3; i += 0x10)
{
str = "";
int num2 = 0;
do
{
str2 = "";
str2 = Strings.Right("00" + Conversion.Hex(Hexdata[i + num2]), 2);
str = str + str2 + " ";
num2++;
}
while (num2 <= 15);
MyProject.Forms.Hex_Data.TextBox1.Text = MyProject.Forms.Hex_Data.TextBox1.Text + Strings.Right("00000000" + Conversion.Hex(i), 8) + " " + str + "\r\n";
if (((i + 0x10) % 0x200) == 0)
{
MyProject.Forms.Hex_Data.TextBox1.Text = MyProject.Forms.Hex_Data.TextBox1.Text + "---------------------------------------------------------\r\n";
}
}
HexDialogNameStr = "";
HexDialogNameStr = "Flash Module 0x47 Content";
MyProject.Forms.Hex_Data.Text = "Flash Module 0x47 Content";
MyProject.Forms.Hex_Data.ShowDialog();
}
else if (WDPassport.HDDError)
{
WDErrorCode.GetWDErrorCode();
Interaction.MsgBox("读取0x47失败!(" + WDErrorCode.WDErrorCodeMenas + ")\r\n", MsgBoxStyle.ApplicationModal, null);
}
else
{
Interaction.MsgBox("读取0x47失败!\r\n", MsgBoxStyle.ApplicationModal, null);
}
}
public static void View0x4F()
{
string str = "";
string str2 = "";
if (WDPassport.WDFWRead(ref Hexdata, 1, "004F"))
{
MyProject.Forms.Hex_Data.TextBox1.Text = "";
int num3 = Information.UBound(Hexdata, 1);
for (int i = 0; i <= num3; i += 0x10)
{
str = "";
int num2 = 0;
do
{
str2 = "";
str2 = Strings.Right("00" + Conversion.Hex(Hexdata[i + num2]), 2);
str = str + str2 + " ";
num2++;
}
while (num2 <= 15);
MyProject.Forms.Hex_Data.TextBox1.Text = MyProject.Forms.Hex_Data.TextBox1.Text + Strings.Right("00000000" + Conversion.Hex(i), 8) + " " + str + "\r\n";
if (((i + 0x10) % 0x200) == 0)
{
MyProject.Forms.Hex_Data.TextBox1.Text = MyProject.Forms.Hex_Data.TextBox1.Text + "---------------------------------------------------------\r\n";
}
}
HexDialogNameStr = "";
HexDialogNameStr = "Flash Module 0x4F Content";
MyProject.Forms.Hex_Data.Text = "Flash Module 0x4F Content";
MyProject.Forms.Hex_Data.ShowDialog();
}
else if (WDPassport.HDDError)
{
WDErrorCode.GetWDErrorCode();
Interaction.MsgBox("读取0x4F失败!(" + WDErrorCode.WDErrorCodeMenas + ")\r\n", MsgBoxStyle.ApplicationModal, null);
}
else
{
Interaction.MsgBox("读取0x4F失败!\r\n", MsgBoxStyle.ApplicationModal, null);
}
}
public static void WriterReaderGapCalibration()
{
Get6ALogOK = false;
if (WDPassport.WDFWRead(ref Flash.TempData, 1, "009C"))
{
DetectFWParameters.ModuleLength = Conversions.ToLong("&h" + Strings.Right("00" + Conversion.Hex(Flash.TempData[11]), 2) + Strings.Right("00" + Conversion.Hex(Flash.TempData[10]), 2));
if (WDPassport.WDFWRead(ref WDModules.WDModuleData, (int) DetectFWParameters.ModuleLength, "009C"))
{
Get6ALogOK = true;
ErrorCode6AStr = "";
TestCommand6AStr = "";
ChamberTemp6AStr = "";
HeadDCM6AStr = "";
MediaDCM6AStr = "";
ZoneMap6AStr = "";
DirveTemp6AStr = "";
Reserved06AStr = "";
Reserved16AStr = "";
Reserved26AStr = "";
Reserved36AStr = "";
Reserved46AStr = "";
Reserved56AStr = "";
Reserved66AStr = "";
Reserved76AStr = "";
Reserved86AStr = "";
Reserved96AStr = "";
Reserved106AStr = "";
Head0ZoneValue6A = "";
Head1ZoneValue6A = "";
Head2ZoneValue6A = "";
Head3ZoneValue6A = "";
Head4ZoneValue6A = "";
Head5ZoneValue6A = "";
Head6ZoneValue6A = "";
Head7ZoneValue6A = "";
Head0GAPValue6A = "";
Head1GAPValue6A = "";
Head2GAPValue6A = "";
Head3GAPValue6A = "";
Head4GAPValue6A = "";
Head5GAPValue6A = "";
Head6GAPValue6A = "";
Head7GAPValue6A = "";
ErrorCode6AStr = Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x33]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[50]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x31]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x30]), 2);
TestCommand6AStr = Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x37]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x36]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x35]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x34]), 2);
ChamberTemp6AStr = Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x3b]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x3a]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x39]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x38]), 2);
HeadDCM6AStr = Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x3f]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x3a]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x39]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x38]), 2);
MediaDCM6AStr = Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x43]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x42]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x41]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x40]), 2);
ZoneMap6AStr = Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x47]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[70]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x45]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x44]), 2);
DirveTemp6AStr = Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x4b]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x4a]), 2);
Reserved06AStr = Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x4b]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x4a]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x49]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x48]), 2);
Reserved16AStr = Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x4f]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x4e]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x4d]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x4c]), 2);
Reserved26AStr = Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x53]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x52]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x51]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[80]), 2);
Reserved36AStr = Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x57]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x56]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x55]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x54]), 2);
Reserved46AStr = Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x5b]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[90]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x59]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x58]), 2);
Reserved56AStr = Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x5f]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x5e]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x5d]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x5c]), 2);
Reserved66AStr = Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x63]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x62]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x61]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x60]), 2);
Reserved76AStr = Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x67]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x66]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x65]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[100]), 2);
Reserved86AStr = Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x6b]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x6a]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x69]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x68]), 2);
Reserved96AStr = Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x6f]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[110]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x6d]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x6c]), 2);
Reserved106AStr = Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x73]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x72]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x71]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x70]), 2);
Head0ZoneValue6A = Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x77]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x76]), 2);
Head0GAPValue6A = Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x79]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[120]), 2);
Head1ZoneValue6A = Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x7b]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x7a]), 2);
Head1GAPValue6A = Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x7d]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x7c]), 2);
Head2ZoneValue6A = Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x7f]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x7e]), 2);
Head2GAPValue6A = Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x81]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x80]), 2);
Head3ZoneValue6A = Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x83]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[130]), 2);
Head3GAPValue6A = Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x85]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x84]), 2);
Head4ZoneValue6A = Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x87]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x86]), 2);
Head4GAPValue6A = Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x89]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x88]), 2);
Head5ZoneValue6A = Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x8b]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x8a]), 2);
Head5GAPValue6A = Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x8d]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[140]), 2);
Head6ZoneValue6A = Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x8f]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x8e]), 2);
Head6GAPValue6A = Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x91]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x90]), 2);
Head7ZoneValue6A = Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x93]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x92]), 2);
Head7GAPValue6A = Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x95]), 2) + Strings.Right("00" + Conversion.Hex(WDModules.WDModuleData[0x94]), 2);
}
else if (WDPassport.HDDError)
{
WDErrorCode.GetWDErrorCode();
Interaction.MsgBox("读6A Log失败!(" + WDErrorCode.WDErrorCodeMenas + ")", MsgBoxStyle.Exclamation, PublicDefine.ShowMsgTitle);
}
else
{
Interaction.MsgBox("读6A Log失败!", MsgBoxStyle.Exclamation, PublicDefine.ShowMsgTitle);
}
}
else if (WDPassport.HDDError)
{
WDErrorCode.GetWDErrorCode();
Interaction.MsgBox("读6A Log失败!(" + WDErrorCode.WDErrorCodeMenas + ")", MsgBoxStyle.Exclamation, PublicDefine.ShowMsgTitle);
}
else
{
Interaction.MsgBox("读6A Log失败!", MsgBoxStyle.Exclamation, PublicDefine.ShowMsgTitle);
}
}
public static bool WriteWDMemory(ref byte[] MemoryData, int MemoryLength, string MemoryAdress)
{
int num2;
string str4;
FileControl control = new FileControl();
string str = "";
int num = 0;
int num3 = 0;
string str2 = "";
bool flag = false;
MyProject.Forms.CacheOverlay.ProgressBar2.Value = 0;
if (!WDPassport.VSCON())
{
if (ATA.inportbyteVB(ATA.BasePort + 7) == 0x51L)
{
WDPassport.HDDError = true;
return false;
}
return false;
}
if (!WDPassport.WDWriteCommand1())
{
if (ATA.inportbyteVB(ATA.BasePort + 7) == 0x51L)
{
WDPassport.HDDError = true;
return false;
}
return false;
}
ATA.SendByteStrFirst = "";
ATA.SendByteStrFirst = MemoryAdress;
WDPassport.WDDataOneSector();
WDPassport.i = 0;
while (ATA.inportbyteVB(ATA.BasePort + 7) != 80L)
{
if (WDPassport.i > 0xbb8)
{
return false;
}
if (ATA.inportbyteVB(ATA.BasePort + 7) == 0x51L)
{
flag = false;
WDPassport.HDDError = true;
return flag;
}
if (ATA.inportbyteVB(ATA.BasePort + 7) == 0x10L)
{
break;
}
MyProject.Application.DoEvents();
ATA.Sleep(2);
WDPassport.i++;
}
if (MemoryLength <= 0x100)
{
MyProject.Forms.CacheOverlay.ProgressBar2.Maximum = MemoryLength;
MyProject.Forms.CacheOverlay.ProgressBar2.Value = 0;
str = Strings.Right("0000" + Conversion.Hex(MemoryLength), 4);
str = Strings.Mid(str, 3, 2) + Strings.Mid(str, 1, 2);
WDPassport.SendCommandStr = "";
WDPassport.SendCommandStr = "2780B0D6BF4FC2A0000000D6" + str + "0000";
WDPassport.SetSamsungRegVal();
int num13 = MemoryLength - 1;
for (int j = 0; j <= num13; j++)
{
WDPassport.i = 0;
while (ATA.inportbyteVB(ATA.BasePort + 7) != 0x58L)
{
if (WDPassport.i > 0xbb8)
{
flag = false;
MyProject.Forms.CacheOverlay.ProgressBar2.Value = 0;
return flag;
}
if (ATA.inportbyteVB(ATA.BasePort + 7) == 0x51L)
{
flag = false;
WDPassport.HDDError = true;
MyProject.Forms.CacheOverlay.ProgressBar2.Value = 0;
return flag;
}
if (ATA.inportbyteVB(ATA.BasePort + 7) == 0x18L)
{
break;
}
MyProject.Application.DoEvents();
ATA.Sleep(2);
WDPassport.i++;
}
WDPassport.j = 0L;
int num5 = 0;
do
{
str4 = "";
str4 = Strings.Right("00" + Conversion.Hex(MemoryData[((j * 0x200) + num5) + 1]), 2) + Strings.Right("00" + Conversion.Hex(MemoryData[(j * 0x200) + num5]), 2);
num2 = (int) Conversions.ToLong("&h" + str4);
ATA.outportwordVB(ATA.BasePort, num2);
MyProject.Application.DoEvents();
num5 += 2;
}
while (num5 <= 0x1ff);
num++;
MyProject.Forms.CacheOverlay.ProgressBar2.Value = num;
MyProject.Application.DoEvents();
}
MyProject.Forms.CacheOverlay.ProgressBar2.Value = 0;
return true;
}
if (MemoryLength <= 0x100)
{
return flag;
}
if ((MemoryLength > 0x100) & ((MemoryLength % 0x100) == 0))
{
num3 = (MemoryLength / 0x100) - 1;
}
else if ((MemoryLength > 0x100) & ((MemoryLength % 0x100) != 0))
{
num3 = MemoryLength / 0x100;
}
MyProject.Forms.CacheOverlay.ProgressBar2.Maximum = MemoryLength;
MyProject.Forms.CacheOverlay.ProgressBar2.Value = 0;
int num14 = num3;
for (int i = 0; i <= num14; i++)
{
if ((i == num3) & ((MemoryLength % 0x100) == 0))
{
WDPassport.SendCommandStr = "";
WDPassport.SendCommandStr = "2780B0D6BF4FC2A00000000000010000";
WDPassport.SetSamsungRegVal();
int num7 = 0;
do
{
WDPassport.i = 0;
while (ATA.inportbyteVB(ATA.BasePort + 7) != 0x58L)
{
if (WDPassport.i > 0xbb8)
{
flag = false;
MyProject.Forms.CacheOverlay.ProgressBar2.Value = 0;
return flag;
}
if (ATA.inportbyteVB(ATA.BasePort + 7) == 0x51L)
{
flag = false;
WDPassport.HDDError = true;
MyProject.Forms.CacheOverlay.ProgressBar2.Value = 0;
return flag;
}
if (ATA.inportbyteVB(ATA.BasePort + 7) == 0x18L)
{
break;
}
MyProject.Application.DoEvents();
ATA.Sleep(2);
WDPassport.i++;
}
WDPassport.j = 0L;
int num8 = 0;
do
{
str4 = "";
str4 = Strings.Right("00" + Conversion.Hex(MemoryData[((((i * 0x100) * 0x200) + (num7 * 0x200)) + num8) + 1]), 2) + Strings.Right("00" + Conversion.Hex(MemoryData[(((i * 0x100) * 0x200) + (num7 * 0x200)) + num8]), 2);
num2 = (int) Conversions.ToLong("&h" + str4);
ATA.outportwordVB(ATA.BasePort, num2);
MyProject.Application.DoEvents();
num8 += 2;
}
while (num8 <= 0x1ff);
MyProject.Application.DoEvents();
num++;
MyProject.Forms.CacheOverlay.ProgressBar2.Value = num;
num7++;
}
while (num7 <= 0xff);
WDPassport.i = 0;
while (ATA.inportbyteVB(ATA.BasePort + 7) != 80L)
{
if (WDPassport.i > 0xbb8)
{
flag = false;
MyProject.Forms.CacheOverlay.ProgressBar2.Value = 0;
return flag;
}
if (ATA.inportbyteVB(ATA.BasePort + 7) == 0x51L)
{
flag = false;
WDPassport.HDDError = true;
MyProject.Forms.CacheOverlay.ProgressBar2.Value = 0;
return flag;
}
if (ATA.inportbyteVB(ATA.BasePort + 7) == 0x10L)
{
break;
}
MyProject.Application.DoEvents();
ATA.Sleep(2);
WDPassport.i++;
}
continue;
}
if ((i == num3) & ((MemoryLength % 0x100) != 0))
{
str2 = "";
str2 = Strings.Right("0000" + Conversion.Hex((int) (MemoryLength % 0x100)), 4);
str2 = Strings.Mid(str2, 3, 2) + Strings.Mid(str2, 1, 2);
WDPassport.SendCommandStr = "";
WDPassport.SendCommandStr = "2780B0D6BF4FC2A000000000" + str2 + "0000";
WDPassport.SetSamsungRegVal();
int num15 = (MemoryLength % 0x100) - 1;
for (int k = 0; k <= num15; k++)
{
WDPassport.i = 0;
while (ATA.inportbyteVB(ATA.BasePort + 7) != 0x58L)
{
if (WDPassport.i > 0xbb8)
{
flag = false;
MyProject.Forms.CacheOverlay.ProgressBar2.Value = 0;
return flag;
}
if (ATA.inportbyteVB(ATA.BasePort + 7) == 0x51L)
{
flag = false;
WDPassport.HDDError = true;
MyProject.Forms.CacheOverlay.ProgressBar2.Value = 0;
return flag;
}
if (ATA.inportbyteVB(ATA.BasePort + 7) == 0x18L)
{
break;
}
MyProject.Application.DoEvents();
ATA.Sleep(2);
WDPassport.i++;
}
WDPassport.j = 0L;
int num10 = 0;
do
{
str4 = "";
str4 = Strings.Right("00" + Conversion.Hex(MemoryData[((((i * 0x100) * 0x200) + (k * 0x200)) + num10) + 1]), 2) + Strings.Right("00" + Conversion.Hex(MemoryData[(((i * 0x100) * 0x200) + (k * 0x200)) + num10]), 2);
num2 = (int) Conversions.ToLong("&h" + str4);
ATA.outportwordVB(ATA.BasePort, num2);
MyProject.Application.DoEvents();
num10 += 2;
}
while (num10 <= 0x1ff);
MyProject.Application.DoEvents();
num++;
MyProject.Forms.CacheOverlay.ProgressBar2.Value = num;
}
WDPassport.i = 0;
while (ATA.inportbyteVB(ATA.BasePort + 7) != 80L)
{
if (WDPassport.i > 0xbb8)
{
flag = false;
MyProject.Forms.CacheOverlay.ProgressBar2.Value = 0;
return flag;
}
if (ATA.inportbyteVB(ATA.BasePort + 7) == 0x51L)
{
flag = false;
WDPassport.HDDError = true;
MyProject.Forms.CacheOverlay.ProgressBar2.Value = 0;
return flag;
}
if (ATA.inportbyteVB(ATA.BasePort + 7) == 0x10L)
{
break;
}
MyProject.Application.DoEvents();
ATA.Sleep(2);
WDPassport.i++;
}
continue;
}
WDPassport.SendCommandStr = "";
WDPassport.SendCommandStr = "2780B0D6BF4FC2A00000000000010000";
WDPassport.SetSamsungRegVal();
int num11 = 0;
do
{
WDPassport.i = 0;
while (ATA.inportbyteVB(ATA.BasePort + 7) != 0x58L)
{
if (WDPassport.i > 0xbb8)
{
flag = false;
MyProject.Forms.CacheOverlay.ProgressBar2.Value = 0;
return flag;
}
if (ATA.inportbyteVB(ATA.BasePort + 7) == 0x51L)
{
flag = false;
WDPassport.HDDError = true;
MyProject.Forms.CacheOverlay.ProgressBar2.Value = 0;
return flag;
}
if (ATA.inportbyteVB(ATA.BasePort + 7) == 0x18L)
{
break;
}
MyProject.Application.DoEvents();
ATA.Sleep(2);
WDPassport.i++;
}
WDPassport.j = 0L;
int num12 = 0;
do
{
str4 = "";
str4 = Strings.Right("00" + Conversion.Hex(MemoryData[((((i * 0x100) * 0x200) + (num11 * 0x200)) + num12) + 1]), 2) + Strings.Right("00" + Conversion.Hex(MemoryData[(((i * 0x100) * 0x200) + (num11 * 0x200)) + num12]), 2);
num2 = (int) Conversions.ToLong("&h" + str4);
ATA.outportwordVB(ATA.BasePort, num2);
MyProject.Application.DoEvents();
num12 += 2;
}
while (num12 <= 0x1ff);
MyProject.Application.DoEvents();
num++;
MyProject.Forms.CacheOverlay.ProgressBar2.Value = num;
num11++;
}
while (num11 <= 0xff);
WDPassport.i = 0;
while (ATA.inportbyteVB(ATA.BasePort + 7) != 80L)
{
if (WDPassport.i > 0xbb8)
{
flag = false;
MyProject.Forms.CacheOverlay.ProgressBar2.Value = 0;
return flag;
}
if (ATA.inportbyteVB(ATA.BasePort + 7) == 0x51L)
{
flag = false;
WDPassport.HDDError = true;
MyProject.Forms.CacheOverlay.ProgressBar2.Value = 0;
return flag;
}
if (ATA.inportbyteVB(ATA.BasePort + 7) == 0x10L)
{
break;
}
MyProject.Application.DoEvents();
ATA.Sleep(2);
WDPassport.i++;
}
}
WDPassport.i = 0;
while (ATA.inportbyteVB(ATA.BasePort + 7) != 80L)
{
if (WDPassport.i > 0xbb8)
{
flag = false;
MyProject.Forms.CacheOverlay.ProgressBar2.Value = 0;
return flag;
}
if (ATA.inportbyteVB(ATA.BasePort + 7) == 0x51L)
{
flag = false;
WDPassport.HDDError = true;
MyProject.Forms.CacheOverlay.ProgressBar2.Value = 0;
return flag;
}
if (ATA.inportbyteVB(ATA.BasePort + 7) == 0x10L)
{
break;
}
MyProject.Application.DoEvents();
ATA.Sleep(2);
WDPassport.i++;
}
MyProject.Forms.CacheOverlay.ProgressBar2.Value = 0;
return true;
}
}
}
评论
这!!!里面还有表情符号!!!!完全看不懂
评论
C#语言写的程序 楼主最好把整个程序代码发出来咱们重新编译一下就可以使用了
评论
顶一下!!!!
评论
这都是什么东西呀,根本看不懂,,希望多解释一下
评论
???全英文的 啊 我们山沟沟出来的怎么看的懂 啊
评论
这个维修一般谁看的懂。。。
评论
这个代码不全面的
评论
这个 真心没看懂
评论
有个蛋用,这个是逆向的呀,又不是真正的源码,坑人的
评论
这个要程序员才看得懂吧,一般维修的 看不懂 啊 电路 电子 维修 我现在把定影部分拆出来了。想换下滚,因为卡纸。但是我发现灯管挡住了。拆不了。不会拆。论坛里的高手拆解过吗? 评论 认真看,认真瞧。果然有收 电路 电子 维修 求创维42c08RD电路图 评论 电视的图纸很少见 评论 电视的图纸很少见 评论 创维的图纸你要说 版号,不然无能为力 评论 板号5800-p42ALM-0050 168P-P42CLM-01
·日本中文新闻 唐田绘里香为新剧《极恶女王》剃光头 展现演员决心
·日本中文新闻 真子小室夫妇新居引发隐私担忧
·日本中文新闻 前AKB48成员柏木由纪与搞笑艺人交往曝光
·日本学校 {日本国际学校}梅田インターナショナルスクール
·日本学校 LINE:sm287 陳雨菲、20歳、台湾からの留学生、東京に来たばかり
·日本留学生活 出售平成22年走行48000km 代步小车
·日本华人网络交流 円相場 一時1ドル=140円台まで上昇?
·日本华人网络交流 问日本华人一个问题
·日本旅游代购 富山接机
·生活百科 英国转澳大利亚转换插头
·汽车 【求助】修车遇到困难怎么办?