modified Analyzer.dof
modified AnalyzerU.dfm modified AnalyzerU.pas modified SMBus.pas + Support for VIA VT82C686A/B * moved ZlIOStarted-checking from OnFormCreate to OnPCIScanClick * changed variable names in SMBus.pas for better understanding
This commit is contained in:
parent
62aa54f77c
commit
6abf8212d6
@ -115,7 +115,7 @@ AutoIncBuild=1
|
|||||||
MajorVer=1
|
MajorVer=1
|
||||||
MinorVer=0
|
MinorVer=0
|
||||||
Release=0
|
Release=0
|
||||||
Build=4
|
Build=5
|
||||||
Debug=0
|
Debug=0
|
||||||
PreRelease=0
|
PreRelease=0
|
||||||
Special=0
|
Special=0
|
||||||
@ -126,7 +126,7 @@ CodePage=1252
|
|||||||
[Version Info Keys]
|
[Version Info Keys]
|
||||||
CompanyName=
|
CompanyName=
|
||||||
FileDescription=Parses SONY VAIO security eeprom dump and extracts some interesting information.
|
FileDescription=Parses SONY VAIO security eeprom dump and extracts some interesting information.
|
||||||
FileVersion=1.0.0.4
|
FileVersion=1.0.0.5
|
||||||
InternalName=Analyzer
|
InternalName=Analyzer
|
||||||
LegalCopyright=
|
LegalCopyright=
|
||||||
LegalTrademarks=
|
LegalTrademarks=
|
||||||
|
@ -11,7 +11,6 @@ object AForm: TAForm
|
|||||||
Font.Name = 'MS Sans Serif'
|
Font.Name = 'MS Sans Serif'
|
||||||
Font.Style = []
|
Font.Style = []
|
||||||
OldCreateOrder = False
|
OldCreateOrder = False
|
||||||
OnCreate = FormCreate
|
|
||||||
PixelsPerInch = 96
|
PixelsPerInch = 96
|
||||||
TextHeight = 13
|
TextHeight = 13
|
||||||
object LabelHeading: TLabel
|
object LabelHeading: TLabel
|
||||||
|
@ -62,7 +62,6 @@ type
|
|||||||
ComboSMB: TComboBox;
|
ComboSMB: TComboBox;
|
||||||
procedure ButtonOpenClick(Sender: TObject);
|
procedure ButtonOpenClick(Sender: TObject);
|
||||||
procedure ButtonPCIScanClick(Sender: TObject);
|
procedure ButtonPCIScanClick(Sender: TObject);
|
||||||
procedure FormCreate(Sender: TObject);
|
|
||||||
procedure ButtonSMBReadClick(Sender: TObject);
|
procedure ButtonSMBReadClick(Sender: TObject);
|
||||||
procedure ButtonSMBScanClick(Sender: TObject);
|
procedure ButtonSMBScanClick(Sender: TObject);
|
||||||
private
|
private
|
||||||
@ -261,18 +260,15 @@ end;
|
|||||||
|
|
||||||
procedure TAForm.ButtonPCIScanClick(Sender: TObject);
|
procedure TAForm.ButtonPCIScanClick(Sender: TObject);
|
||||||
begin
|
begin
|
||||||
Screen.Cursor := crHourGlass;
|
if ZlIOStarted then begin
|
||||||
MyPCI := Scan_PCI(Application, AForm.LabelStatus);
|
Screen.Cursor := crHourGlass;
|
||||||
Screen.Cursor := crDefault;
|
MyPCI := Scan_PCI(Application, AForm.LabelStatus);
|
||||||
if (MyPCI.SMB_Address <> 0) AND (MyPCI.Vendor_Name <> '') then begin
|
Screen.Cursor := crDefault;
|
||||||
AForm.LabelStatus.Caption := 'SMBus-Controller: '+MyPCI.Vendor_Name+' '+MyPCI.Device_Name+' Rev '+IntToStr(MyPCI.Rev)+' at addr 0x'+IntToHex(MyPCI.SMB_Address,4);
|
if (MyPCI.SMB_Address <> 0) AND (MyPCI.Vendor_Name <> '') then begin
|
||||||
EnableGroup(AForm.GroupSMBus, true);
|
AForm.LabelStatus.Caption := 'SMBus-Controller: '+MyPCI.Vendor_Name+' '+MyPCI.Device_Name+' Rev '+IntToStr(MyPCI.Rev)+' at addr 0x'+IntToHex(MyPCI.SMB_Address,4);
|
||||||
end;
|
EnableGroup(AForm.GroupSMBus, true);
|
||||||
end;
|
end;
|
||||||
|
end else ShowMessage('The driver ZLPORTIO.SYS could not be loaded. The program won''t be able to read out SMBus under Windows NT/2000/XP! Make sure, the file is in path or in the program directory.');
|
||||||
procedure TAForm.FormCreate(Sender: TObject);
|
|
||||||
begin
|
|
||||||
if NOT ZlIOStarted then ShowMessage('The driver ZLPORTIO.SYS could not be loaded. The program won''t be able to read out SMBus under Windows NT/2000/XP! Make sure, the file is in path or in the program directory.');
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function PowerInt(base, exp: integer): Int64;
|
function PowerInt(base, exp: integer): Int64;
|
||||||
|
13
SMBus.pas
13
SMBus.pas
@ -20,7 +20,7 @@ interface
|
|||||||
|
|
||||||
function Scan_PCI(Application: TApplication; Status: TLabel): PCI_Info;
|
function Scan_PCI(Application: TApplication; Status: TLabel): PCI_Info;
|
||||||
function smbGetReg(BaseAddr: word; Reg: byte; Slave: byte): word;
|
function smbGetReg(BaseAddr: word; Reg: byte; Slave: byte): word;
|
||||||
function smbGetArray(BaseAddr: word; Reg: byte; Slave: byte; len: byte): TSMBData;
|
function smbGetArray(BaseAddr: word; regfrom: byte; Slave: byte; regto: byte): TSMBData;
|
||||||
|
|
||||||
implementation
|
implementation
|
||||||
|
|
||||||
@ -100,6 +100,13 @@ begin
|
|||||||
PCI_Structure.Vendor_Name := 'Intel®';
|
PCI_Structure.Vendor_Name := 'Intel®';
|
||||||
PCI_Structure.Device_Name := '82801DB/DBM';
|
PCI_Structure.Device_Name := '82801DB/DBM';
|
||||||
end;
|
end;
|
||||||
|
$30571106:
|
||||||
|
begin
|
||||||
|
PCI_Structure.SMB_Address := Get_PCI_Reg(Bus, Dev, Fun, $90) and $FFF0;
|
||||||
|
PCI_Structure.Rev := Get_PCI_Reg(Bus, Dev, Fun, 8) and $FF;
|
||||||
|
PCI_Structure.Vendor_Name := 'VIA®';
|
||||||
|
PCI_Structure.Device_Name := 'VT82C686A/B';
|
||||||
|
end;
|
||||||
else
|
else
|
||||||
PCI_Structure.SMB_Address := 0;
|
PCI_Structure.SMB_Address := 0;
|
||||||
PCI_Structure.Rev := 0;
|
PCI_Structure.Rev := 0;
|
||||||
@ -211,14 +218,14 @@ begin
|
|||||||
Result := (Data and $ff);
|
Result := (Data and $ff);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function smbGetArray(BaseAddr: word; Reg: byte; Slave: byte; len: byte): TSMBData;
|
function smbGetArray(BaseAddr: word; regfrom: byte; Slave: byte; regto: byte): TSMBData;
|
||||||
var Data: cardinal;
|
var Data: cardinal;
|
||||||
i: byte;
|
i: byte;
|
||||||
begin
|
begin
|
||||||
smbWaitForFree(BaseAddr);
|
smbWaitForFree(BaseAddr);
|
||||||
PortWriteB(BaseAddr + 5, 0);
|
PortWriteB(BaseAddr + 5, 0);
|
||||||
PortWriteB(BaseAddr + 6, 0);
|
PortWriteB(BaseAddr + 6, 0);
|
||||||
for i:=reg to reg+len-1 do begin
|
for i:=regfrom to regto do begin
|
||||||
smbWaitForFree(BaseAddr);
|
smbWaitForFree(BaseAddr);
|
||||||
PortWriteB(BaseAddr + 3, i);
|
PortWriteB(BaseAddr + 3, i);
|
||||||
PortWriteB(BaseAddr + 4, (Slave shl 1) or RW_READ);
|
PortWriteB(BaseAddr + 4, (Slave shl 1) or RW_READ);
|
||||||
|
Reference in New Issue
Block a user