Fintek super I/O chips with base address 0x..5 are detected now as well. Set Pack = 1 for NVAPI struct interop (should fix GPU enumeration).
authormoel.mich
Mon, 22 Feb 2010 09:57:02 +0000
changeset 600e62c377c08c
parent 59 8e2563e2ee69
child 61 cffcbf8a1401
Fintek super I/O chips with base address 0x..5 are detected now as well. Set Pack = 1 for NVAPI struct interop (should fix GPU enumeration).
Hardware/LPC/LPCGroup.cs
Hardware/Nvidia/NVAPI.cs
OpenHardwareMonitor.csproj
Properties/AssemblyInfo.cs
     1.1 --- a/Hardware/LPC/LPCGroup.cs	Sun Feb 21 21:41:22 2010 +0000
     1.2 +++ b/Hardware/LPC/LPCGroup.cs	Mon Feb 22 09:57:02 2010 +0000
     1.3 @@ -206,17 +206,24 @@
     1.4          if (chip != Chip.Unknown) {
     1.5  
     1.6            Select(logicalDeviceNumber);
     1.7 -          ushort address = ReadWord(BASE_ADDRESS_REGISTER);
     1.8 +          ushort address = ReadWord(BASE_ADDRESS_REGISTER);          
     1.9            Thread.Sleep(1);
    1.10            ushort verify = ReadWord(BASE_ADDRESS_REGISTER);
    1.11 -
    1.12 +          
    1.13            ushort vendorID = 0;
    1.14            if (chip == Chip.F71862 || chip == Chip.F71882 || chip == Chip.F71889)
    1.15              vendorID = ReadWord(FINTEK_VENDOR_ID_REGISTER);
    1.16  
    1.17            WinbondFintekExit();
    1.18  
    1.19 -          if (address != verify || address < 0x100 || (address & 0xF007) != 0)
    1.20 +          if (address != verify)
    1.21 +            return;
    1.22 +
    1.23 +          // some Fintek chips have address register offset 0x05 added already
    1.24 +          if ((address & 0x07) == 0x05)
    1.25 +            address &= 0xFFF8;
    1.26 +
    1.27 +          if (address < 0x100 || (address & 0xF007) != 0)
    1.28              return;
    1.29            
    1.30            switch (chip) {
     2.1 --- a/Hardware/Nvidia/NVAPI.cs	Sun Feb 21 21:41:22 2010 +0000
     2.2 +++ b/Hardware/Nvidia/NVAPI.cs	Mon Feb 22 09:57:02 2010 +0000
     2.3 @@ -122,7 +122,7 @@
     2.4      UNKNOWN = -1
     2.5    };
     2.6  
     2.7 -  [StructLayout(LayoutKind.Sequential)]
     2.8 +  [StructLayout(LayoutKind.Sequential, Pack = 1)]
     2.9    public struct NvSensor {
    2.10      public NvThermalController Controller;
    2.11      public int DefaultMinTemp;
    2.12 @@ -131,7 +131,7 @@
    2.13      public NvThermalTarget Target;     
    2.14    }
    2.15  
    2.16 -  [StructLayout(LayoutKind.Sequential)]
    2.17 +  [StructLayout(LayoutKind.Sequential, Pack = 1)]
    2.18    public struct NvGPUThermalSettings {
    2.19      public int Version;
    2.20      public int Count;
    2.21 @@ -140,12 +140,12 @@
    2.22      public NvSensor[] Sensor;
    2.23    }
    2.24  
    2.25 -  [StructLayout(LayoutKind.Sequential)]
    2.26 +  [StructLayout(LayoutKind.Sequential, Pack = 1)]
    2.27    public struct NvDisplayHandle {
    2.28      private int handle;
    2.29    }
    2.30  
    2.31 -  [StructLayout(LayoutKind.Sequential)]
    2.32 +  [StructLayout(LayoutKind.Sequential, Pack = 1)]
    2.33    public struct NvPhysicalGpuHandle {
    2.34      private int handle;
    2.35    }
     3.1 --- a/OpenHardwareMonitor.csproj	Sun Feb 21 21:41:22 2010 +0000
     3.2 +++ b/OpenHardwareMonitor.csproj	Mon Feb 22 09:57:02 2010 +0000
     3.3 @@ -4,7 +4,7 @@
     3.4      <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
     3.5      <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
     3.6      <ProjectGuid>{F5E0C1F7-9E9B-46F2-AC88-8C9C1C923880}</ProjectGuid>
     3.7 -    <ProductVersion>9.0.30729</ProductVersion>
     3.8 +    <ProductVersion>9.0.21022</ProductVersion>
     3.9      <SchemaVersion>2.0</SchemaVersion>
    3.10      <OutputType>WinExe</OutputType>
    3.11      <NoStandardLibraries>false</NoStandardLibraries>
    3.12 @@ -68,7 +68,6 @@
    3.13      <Compile Include="Hardware\HDD\HDD.cs" />
    3.14      <Compile Include="Hardware\HDD\HDDGroup.cs" />
    3.15      <Compile Include="Hardware\HDD\SMART.cs" />
    3.16 -    <Compile Include="Hardware\IParameter.cs" />
    3.17      <Compile Include="Hardware\LPC\Chip.cs" />
    3.18      <Compile Include="Hardware\LPC\F718XX.cs" />
    3.19      <Compile Include="Hardware\LPC\LPCHardware.cs" />
    3.20 @@ -124,12 +123,15 @@
    3.21    <ItemGroup>
    3.22      <EmbeddedResource Include="GUI\AboutBox.resx">
    3.23        <DependentUpon>AboutBox.cs</DependentUpon>
    3.24 +      <SubType>Designer</SubType>
    3.25      </EmbeddedResource>
    3.26      <EmbeddedResource Include="GUI\MainForm.resx">
    3.27        <DependentUpon>MainForm.cs</DependentUpon>
    3.28 +      <SubType>Designer</SubType>
    3.29      </EmbeddedResource>
    3.30      <EmbeddedResource Include="GUI\PlotPanel.resx">
    3.31        <DependentUpon>PlotPanel.cs</DependentUpon>
    3.32 +      <SubType>Designer</SubType>
    3.33      </EmbeddedResource>
    3.34      <EmbeddedResource Include="Resources\ati.png">
    3.35      </EmbeddedResource>
     4.1 --- a/Properties/AssemblyInfo.cs	Sun Feb 21 21:41:22 2010 +0000
     4.2 +++ b/Properties/AssemblyInfo.cs	Mon Feb 22 09:57:02 2010 +0000
     4.3 @@ -69,5 +69,5 @@
     4.4  // You can specify all the values or you can default the Build and Revision Numbers 
     4.5  // by using the '*' as shown below:
     4.6  // [assembly: AssemblyVersion("1.0.*")]
     4.7 -[assembly: AssemblyVersion("0.1.23.0")]
     4.8 -[assembly: AssemblyFileVersion("0.1.23.0")]
     4.9 +[assembly: AssemblyVersion("0.1.23.1")]
    4.10 +[assembly: AssemblyFileVersion("0.1.23.1")]