modified AnalyzerU.dfm
modified AnalyzerU.pas + Save dump now possible - removed "UNDER CONSTRUCTION" label
This commit is contained in:
parent
2429b13b9d
commit
2f919306eb
@ -11,6 +11,7 @@ object AForm: TAForm
|
||||
Font.Name = 'MS Sans Serif'
|
||||
Font.Style = []
|
||||
OldCreateOrder = False
|
||||
OnShow = FormShow
|
||||
PixelsPerInch = 96
|
||||
TextHeight = 13
|
||||
object LabelHeading: TLabel
|
||||
@ -396,23 +397,19 @@ object AForm: TAForm
|
||||
ParentFont = False
|
||||
TabOrder = 0
|
||||
end
|
||||
object ButtonSaveDump: TButton
|
||||
Left = 192
|
||||
Top = 248
|
||||
Width = 89
|
||||
Height = 25
|
||||
Caption = 'Save dump...'
|
||||
TabOrder = 1
|
||||
OnClick = ButtonSaveDumpClick
|
||||
end
|
||||
end
|
||||
object SheetSMBus: TTabSheet
|
||||
Caption = 'SMBus'
|
||||
ImageIndex = 3
|
||||
object Label1: TLabel
|
||||
Left = 96
|
||||
Top = 272
|
||||
Width = 306
|
||||
Height = 29
|
||||
Caption = 'UNDER CONSTRUCTION'
|
||||
Font.Charset = DEFAULT_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -24
|
||||
Font.Name = 'MS Sans Serif'
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object GroupBox5: TGroupBox
|
||||
Left = 0
|
||||
Top = 0
|
||||
@ -606,10 +603,18 @@ object AForm: TAForm
|
||||
end
|
||||
object OpenDialog1: TOpenDialog
|
||||
Filter =
|
||||
'Sony 0x57 dump|SMBUS57.DAT|Other dumps (SMBUS*.DAT)|SMBUS*.DAT|A' +
|
||||
'll files (*.*)|*.*'
|
||||
'Sony 0x57 dump|SMBUS57.DAT|Other dumps (*.DAT)|*.DAT|All files (' +
|
||||
'*.*)|*.*'
|
||||
Options = [ofHideReadOnly, ofPathMustExist, ofFileMustExist, ofEnableSizing, ofDontAddToRecent]
|
||||
Left = 336
|
||||
Top = 8
|
||||
end
|
||||
object SaveDialog1: TSaveDialog
|
||||
Filter =
|
||||
'Sony 0x57 dump|SMBUS57.DAT|Other dumps (*.DAT)|*.DAT|All files (' +
|
||||
'*.*)|*.*'
|
||||
Options = [ofOverwritePrompt, ofHideReadOnly, ofPathMustExist, ofEnableSizing]
|
||||
Left = 288
|
||||
Top = 8
|
||||
end
|
||||
end
|
||||
|
@ -54,16 +54,19 @@ type
|
||||
LabelStatus: TLabel;
|
||||
GroupSMBus: TGroupBox;
|
||||
ButtonSMBScan: TButton;
|
||||
Label1: TLabel;
|
||||
ButtonSMBRead: TButton;
|
||||
LabelSMBStatus: TLabel;
|
||||
LabelSMBScan: TLabel;
|
||||
Label13: TLabel;
|
||||
ComboSMB: TComboBox;
|
||||
ButtonSaveDump: TButton;
|
||||
SaveDialog1: TSaveDialog;
|
||||
procedure ButtonOpenClick(Sender: TObject);
|
||||
procedure ButtonPCIScanClick(Sender: TObject);
|
||||
procedure ButtonSMBReadClick(Sender: TObject);
|
||||
procedure ButtonSMBScanClick(Sender: TObject);
|
||||
procedure ButtonSaveDumpClick(Sender: TObject);
|
||||
procedure FormShow(Sender: TObject);
|
||||
private
|
||||
{ Private declarations }
|
||||
public
|
||||
@ -79,6 +82,7 @@ uses SMBus, ZLPortIO;
|
||||
|
||||
var
|
||||
MyPCI: PCI_Info;
|
||||
raw: array[0..255] of byte;
|
||||
|
||||
{$R *.dfm}
|
||||
|
||||
@ -230,7 +234,6 @@ end;
|
||||
|
||||
procedure DoAnalysis(d: array of byte);
|
||||
begin
|
||||
ShowRAW(d);
|
||||
CheckPwd(d);
|
||||
CheckUUID(d);
|
||||
CheckOEM(d);
|
||||
@ -245,8 +248,12 @@ begin
|
||||
if OpenDialog1.Execute then begin
|
||||
AssignFile(f, OpenDialog1.FileName);
|
||||
Reset(f);
|
||||
for i:=0 to 255 do Read(f,d[i]);
|
||||
for i:=0 to 255 do begin
|
||||
Read(f,d[i]);
|
||||
raw[i] := d[i];
|
||||
end;
|
||||
CloseFile(f);
|
||||
ShowRAW(d);
|
||||
DoAnalysis(d);
|
||||
AForm.PageControl1.ActivePageIndex := 0;
|
||||
end;
|
||||
@ -305,17 +312,21 @@ var i: integer;
|
||||
d: TSMBData;
|
||||
begin
|
||||
dev := HexToInt(AForm.ComboSMB.Text);
|
||||
if dev=$57 then begin
|
||||
Screen.Cursor := crHourGlass;
|
||||
for i:=0 to 255 do begin
|
||||
AForm.LabelSMBStatus.Caption := 'Now reading offset 0x'+IntToHex(i,2)+' ...';
|
||||
Application.ProcessMessages;
|
||||
d[i] := smbGetReg(MyPCI.SMB_Address, i, dev);
|
||||
end;
|
||||
Screen.Cursor := crDefault;
|
||||
Screen.Cursor := crHourGlass;
|
||||
for i:=0 to 255 do begin
|
||||
AForm.LabelSMBStatus.Caption := 'Now reading offset 0x'+IntToHex(i,2)+' ...';
|
||||
Application.ProcessMessages;
|
||||
d[i] := smbGetReg(MyPCI.SMB_Address, i, dev);
|
||||
raw[i] := d[i];
|
||||
end;
|
||||
Screen.Cursor := crDefault;
|
||||
ShowRAW(d);
|
||||
if dev=$57 then begin
|
||||
DoAnalysis(d);
|
||||
AForm.PageControl1.ActivePageIndex := 0;
|
||||
end else begin
|
||||
AForm.PageControl1.ActivePageIndex := 1;
|
||||
end;
|
||||
DoAnalysis(d);
|
||||
AForm.PageControl1.ActivePageIndex := 0;
|
||||
end;
|
||||
|
||||
procedure TAForm.ButtonSMBScanClick(Sender: TObject);
|
||||
@ -323,4 +334,22 @@ begin
|
||||
AForm.LabelSMBScan.Caption := 'Not yet functioning';
|
||||
end;
|
||||
|
||||
procedure TAForm.ButtonSaveDumpClick(Sender: TObject);
|
||||
var f: file of byte;
|
||||
i: integer;
|
||||
begin
|
||||
if SaveDialog1.Execute then begin
|
||||
AssignFile(f, SaveDialog1.FileName);
|
||||
Rewrite(f);
|
||||
for i:=0 to 255 do Write(f,raw[i]);
|
||||
CloseFile(f);
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TAForm.FormShow(Sender: TObject);
|
||||
var i: integer;
|
||||
begin
|
||||
for i:=0 to 255 do raw[i] := 0;
|
||||
end;
|
||||
|
||||
end.
|
||||
|
Reference in New Issue
Block a user