Archived
1
0

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:
mbirth 2004-12-08 09:54:31 +00:00
parent 62aa54f77c
commit 6abf8212d6
4 changed files with 21 additions and 19 deletions

View File

@ -115,7 +115,7 @@ AutoIncBuild=1
MajorVer=1
MinorVer=0
Release=0
Build=4
Build=5
Debug=0
PreRelease=0
Special=0
@ -126,7 +126,7 @@ CodePage=1252
[Version Info Keys]
CompanyName=
FileDescription=Parses SONY VAIO security eeprom dump and extracts some interesting information.
FileVersion=1.0.0.4
FileVersion=1.0.0.5
InternalName=Analyzer
LegalCopyright=
LegalTrademarks=

View File

@ -11,7 +11,6 @@ object AForm: TAForm
Font.Name = 'MS Sans Serif'
Font.Style = []
OldCreateOrder = False
OnCreate = FormCreate
PixelsPerInch = 96
TextHeight = 13
object LabelHeading: TLabel

View File

@ -62,7 +62,6 @@ type
ComboSMB: TComboBox;
procedure ButtonOpenClick(Sender: TObject);
procedure ButtonPCIScanClick(Sender: TObject);
procedure FormCreate(Sender: TObject);
procedure ButtonSMBReadClick(Sender: TObject);
procedure ButtonSMBScanClick(Sender: TObject);
private
@ -261,18 +260,15 @@ end;
procedure TAForm.ButtonPCIScanClick(Sender: TObject);
begin
Screen.Cursor := crHourGlass;
MyPCI := Scan_PCI(Application, AForm.LabelStatus);
Screen.Cursor := crDefault;
if (MyPCI.SMB_Address <> 0) AND (MyPCI.Vendor_Name <> '') then begin
AForm.LabelStatus.Caption := 'SMBus-Controller: '+MyPCI.Vendor_Name+' '+MyPCI.Device_Name+' Rev '+IntToStr(MyPCI.Rev)+' at addr 0x'+IntToHex(MyPCI.SMB_Address,4);
EnableGroup(AForm.GroupSMBus, true);
end;
end;
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.');
if ZlIOStarted then begin
Screen.Cursor := crHourGlass;
MyPCI := Scan_PCI(Application, AForm.LabelStatus);
Screen.Cursor := crDefault;
if (MyPCI.SMB_Address <> 0) AND (MyPCI.Vendor_Name <> '') then begin
AForm.LabelStatus.Caption := 'SMBus-Controller: '+MyPCI.Vendor_Name+' '+MyPCI.Device_Name+' Rev '+IntToStr(MyPCI.Rev)+' at addr 0x'+IntToHex(MyPCI.SMB_Address,4);
EnableGroup(AForm.GroupSMBus, true);
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.');
end;
function PowerInt(base, exp: integer): Int64;

View File

@ -20,7 +20,7 @@ interface
function Scan_PCI(Application: TApplication; Status: TLabel): PCI_Info;
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
@ -100,6 +100,13 @@ begin
PCI_Structure.Vendor_Name := 'Intel®';
PCI_Structure.Device_Name := '82801DB/DBM';
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
PCI_Structure.SMB_Address := 0;
PCI_Structure.Rev := 0;
@ -211,14 +218,14 @@ begin
Result := (Data and $ff);
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;
i: byte;
begin
smbWaitForFree(BaseAddr);
PortWriteB(BaseAddr + 5, 0);
PortWriteB(BaseAddr + 6, 0);
for i:=reg to reg+len-1 do begin
for i:=regfrom to regto do begin
smbWaitForFree(BaseAddr);
PortWriteB(BaseAddr + 3, i);
PortWriteB(BaseAddr + 4, (Slave shl 1) or RW_READ);