Release version 0.1.2. First implementation for Fintek F71882FG chips. Fixed Intel Core i7 temperature reading. Changed Nvidia GPU enumeration.
authormoel.mich
Thu, 28 Jan 2010 23:29:39 +0000
changeset 79523a3322777
parent 6 56c9d6c8c08b
child 8 39067efce486
Release version 0.1.2. First implementation for Fintek F71882FG chips. Fixed Intel Core i7 temperature reading. Changed Nvidia GPU enumeration.
GUI/AboutBox.Designer.cs
Hardware/CPU/IntelCPU.cs
Hardware/LPC/Chip.cs
Hardware/LPC/F71882FG.cs
Hardware/LPC/IT87.cs
Hardware/LPC/LPCGroup.cs
Hardware/LPC/W83627DHG.cs
Hardware/Nvidia/NvidiaGroup.cs
OpenHardwareMonitor.csproj
Properties/AssemblyInfo.cs
     1.1 --- a/GUI/AboutBox.Designer.cs	Thu Jan 28 19:31:10 2010 +0000
     1.2 +++ b/GUI/AboutBox.Designer.cs	Thu Jan 28 23:29:39 2010 +0000
     1.3 @@ -124,7 +124,7 @@
     1.4        this.label3.Name = "label3";
     1.5        this.label3.Size = new System.Drawing.Size(99, 15);
     1.6        this.label3.TabIndex = 4;
     1.7 -      this.label3.Text = "Version 0.1.1 Beta";
     1.8 +      this.label3.Text = "Version " + System.Windows.Forms.Application.ProductVersion + " Beta";
     1.9        // 
    1.10        // label4
    1.11        // 
     2.1 --- a/Hardware/CPU/IntelCPU.cs	Thu Jan 28 19:31:10 2010 +0000
     2.2 +++ b/Hardware/CPU/IntelCPU.cs	Thu Jan 28 23:29:39 2010 +0000
     2.3 @@ -49,7 +49,8 @@
     2.4  
     2.5      private Sensor[] coreTemperatures;
     2.6  
     2.7 -    private float tjMax = 0;   
     2.8 +    private float tjMax = 0;
     2.9 +    private uint logicalProcessorsPerCore;
    2.10  
    2.11      private const uint IA32_THERM_STATUS_MSR = 0x019C;
    2.12      private const uint IA32_TEMPERATURE_TARGET = 0x01A2;
    2.13 @@ -64,7 +65,7 @@
    2.14        if (cpuidData.GetLength(0) > 0x04)
    2.15          logicalProcessors = ((cpuidData[4, 0] >> 26) & 0x3F) + 1;
    2.16  
    2.17 -      uint logicalProcessorsPerCore = 1;
    2.18 +      logicalProcessorsPerCore = 1;
    2.19        if (cpuidData.GetLength(0) > 0x0B)
    2.20          logicalProcessorsPerCore = cpuidData[0x0B, 1] & 0xFF;
    2.21        if (logicalProcessorsPerCore == 0)
    2.22 @@ -159,7 +160,8 @@
    2.23        uint eax = 0, edx = 0;      
    2.24        for (int i = 0; i < coreTemperatures.Length; i++) {
    2.25          if (WinRing0.RdmsrPx(
    2.26 -          IA32_THERM_STATUS_MSR, ref eax, ref edx, (UIntPtr)(1 << i))) 
    2.27 +          IA32_THERM_STATUS_MSR, ref eax, ref edx, 
    2.28 +            (UIntPtr)(logicalProcessorsPerCore << i))) 
    2.29          {
    2.30            // if reading is valid
    2.31            if ((eax & 0x80000000) != 0) {
     3.1 --- a/Hardware/LPC/Chip.cs	Thu Jan 28 19:31:10 2010 +0000
     3.2 +++ b/Hardware/LPC/Chip.cs	Thu Jan 28 23:29:39 2010 +0000
     3.3 @@ -11,7 +11,8 @@
     3.4      IT8718F = 0x8718,
     3.5      IT8720F = 0x8720,
     3.6      IT8726F = 0x8726,
     3.7 -    W83627DHG = 0xA020
     3.8 +    W83627DHG = 0xA020,
     3.9 +    F71882FG = 0x0541
    3.10    }
    3.11  
    3.12  }
     4.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     4.2 +++ b/Hardware/LPC/F71882FG.cs	Thu Jan 28 23:29:39 2010 +0000
     4.3 @@ -0,0 +1,188 @@
     4.4 +/*
     4.5 +  
     4.6 +  Version: MPL 1.1/GPL 2.0/LGPL 2.1
     4.7 +
     4.8 +  The contents of this file are subject to the Mozilla Public License Version
     4.9 +  1.1 (the "License"); you may not use this file except in compliance with
    4.10 +  the License. You may obtain a copy of the License at
    4.11 + 
    4.12 +  http://www.mozilla.org/MPL/
    4.13 +
    4.14 +  Software distributed under the License is distributed on an "AS IS" basis,
    4.15 +  WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
    4.16 +  for the specific language governing rights and limitations under the License.
    4.17 +
    4.18 +  The Original Code is the Open Hardware Monitor code.
    4.19 +
    4.20 +  The Initial Developer of the Original Code is 
    4.21 +  Michael Möller <m.moeller@gmx.ch>.
    4.22 +  Portions created by the Initial Developer are Copyright (C) 2009-2010
    4.23 +  the Initial Developer. All Rights Reserved.
    4.24 +
    4.25 +  Contributor(s):
    4.26 +
    4.27 +  Alternatively, the contents of this file may be used under the terms of
    4.28 +  either the GNU General Public License Version 2 or later (the "GPL"), or
    4.29 +  the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
    4.30 +  in which case the provisions of the GPL or the LGPL are applicable instead
    4.31 +  of those above. If you wish to allow use of your version of this file only
    4.32 +  under the terms of either the GPL or the LGPL, and not to allow others to
    4.33 +  use your version of this file under the terms of the MPL, indicate your
    4.34 +  decision by deleting the provisions above and replace them with the notice
    4.35 +  and other provisions required by the GPL or the LGPL. If you do not delete
    4.36 +  the provisions above, a recipient may use your version of this file under
    4.37 +  the terms of any one of the MPL, the GPL or the LGPL.
    4.38 + 
    4.39 +*/
    4.40 +
    4.41 +using System;
    4.42 +using System.Collections.Generic;
    4.43 +using System.Drawing;
    4.44 +using System.Text;
    4.45 +
    4.46 +namespace OpenHardwareMonitor.Hardware.LPC {
    4.47 +  public class F71882FG  : IHardware {
    4.48 +
    4.49 +    private string name;
    4.50 +    private Image icon;
    4.51 +
    4.52 +    private ushort address;
    4.53 +
    4.54 +    private List<ISensor> active = new List<ISensor>();
    4.55 +
    4.56 +    private Sensor[] temperatures;
    4.57 +    private Sensor[] fans;
    4.58 +    private Sensor[] voltages;
    4.59 +    private float[] voltageGains;
    4.60 +
    4.61 +    // Hardware Monitor
    4.62 +    private const byte ADDRESS_REGISTER_OFFSET = 0x05;
    4.63 +    private const byte DATA_REGISTER_OFFSET = 0x06;
    4.64 +
    4.65 +    // Hardware Monitor Registers
    4.66 +    private const byte VOLTAGE_BASE_REG = 0x20;
    4.67 +    private const byte TEMPERATURE_BASE_REG = 0x72;
    4.68 +    private byte[] FAN_TACHOMETER_REG = new byte[] { 0xA0, 0xB0, 0xC0, 0xD0 };
    4.69 +    
    4.70 +    private byte ReadByte(byte register) {
    4.71 +      WinRing0.WriteIoPortByte(
    4.72 +        (ushort)(address + ADDRESS_REGISTER_OFFSET), register);
    4.73 +      return WinRing0.ReadIoPortByte((ushort)(address + DATA_REGISTER_OFFSET));
    4.74 +    }
    4.75 +
    4.76 +    public F71882FG(ushort address) {
    4.77 +      this.address = address;
    4.78 +
    4.79 +      this.name = "Fintek F71882FG";
    4.80 +
    4.81 +      temperatures = new Sensor[3];
    4.82 +      for (int i = 0; i < temperatures.Length; i++)
    4.83 +        temperatures[i] = new Sensor("Temperature #" + (i + 1), i,
    4.84 +          SensorType.Temperature, this);
    4.85 +
    4.86 +      fans = new Sensor[4];
    4.87 +      for (int i = 0; i < fans.Length; i++)
    4.88 +        fans[i] = new Sensor("Fan #" + (i + 1), i, SensorType.Fan, this);
    4.89 +
    4.90 +      voltageGains = new float[] { 1, 0.5f, 1, 1, 1, 1, 1, 1, 1 };
    4.91 +      voltages = new Sensor[4];
    4.92 +      voltages[0] = new Sensor("VCC3V", 0, SensorType.Voltage, this);
    4.93 +      voltages[1] = new Sensor("CPU VCore", 1, SensorType.Voltage, this);      
    4.94 +      voltages[2] = new Sensor("VSB3V", 7, SensorType.Voltage, this);
    4.95 +      voltages[3] = new Sensor("Battery", 8, SensorType.Voltage, this);
    4.96 +
    4.97 +      this.icon = Utilities.EmbeddedResources.GetImage("chip.png");
    4.98 +    }
    4.99 +
   4.100 +    public string Name {
   4.101 +      get { return name; }
   4.102 +    }
   4.103 +
   4.104 +    public string Identifier {
   4.105 +      get { return "/lpc/f71882fg"; }
   4.106 +    }
   4.107 +
   4.108 +    public Image Icon {
   4.109 +      get { return icon; }
   4.110 +    }
   4.111 +
   4.112 +    public ISensor[] Sensors {
   4.113 +      get { return active.ToArray(); }
   4.114 +    }
   4.115 +
   4.116 +    public string GetReport() {
   4.117 +      StringBuilder r = new StringBuilder();
   4.118 +
   4.119 +      r.AppendLine("LPC F71882FG");
   4.120 +      r.AppendLine();
   4.121 +      r.Append("Base Adress: 0x"); r.AppendLine(address.ToString("X4"));
   4.122 +      r.AppendLine();
   4.123 +      r.AppendLine("Hardware Monitor Registers");
   4.124 +      r.AppendLine();
   4.125 +
   4.126 +      r.AppendLine("      00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F");
   4.127 +      r.AppendLine();
   4.128 +      for (int i = 0; i <= 0xF; i++) {
   4.129 +        r.Append(" "); r.Append((i << 4).ToString("X2")); r.Append("  ");
   4.130 +        for (int j = 0; j <= 0xF; j++) {
   4.131 +          r.Append(" ");
   4.132 +          r.Append(ReadByte((byte)((i << 4) | j)).ToString("X2"));
   4.133 +        }
   4.134 +        r.AppendLine();
   4.135 +      }
   4.136 +      r.AppendLine();
   4.137 +      return r.ToString();
   4.138 +    }
   4.139 +
   4.140 +    public void Update() {
   4.141 +
   4.142 +      foreach (Sensor sensor in voltages) {
   4.143 +        int value = ReadByte((byte)(VOLTAGE_BASE_REG + sensor.Index));
   4.144 +        sensor.Value = voltageGains[sensor.Index] * 0.001f * (value << 4);
   4.145 +        if (sensor.Value > 0)
   4.146 +          ActivateSensor(sensor);
   4.147 +        else
   4.148 +          DeactivateSensor(sensor);
   4.149 +      }
   4.150 +
   4.151 +      foreach (Sensor sensor in temperatures) {
   4.152 +        int value = ReadByte((byte)(TEMPERATURE_BASE_REG + 2 * sensor.Index));
   4.153 +        sensor.Value = value;
   4.154 +        if (value < 254)
   4.155 +          ActivateSensor(sensor);
   4.156 +        else
   4.157 +          DeactivateSensor(sensor);
   4.158 +      }
   4.159 +
   4.160 +      foreach (Sensor sensor in fans) {
   4.161 +        int value = ReadByte(FAN_TACHOMETER_REG[sensor.Index]) << 8;
   4.162 +        value |= ReadByte((byte)(FAN_TACHOMETER_REG[sensor.Index] + 1));
   4.163 +
   4.164 +        if (value > 0) {
   4.165 +          sensor.Value = (value < 0x0fff) ? 1.5e6f / value : 0;
   4.166 +          ActivateSensor(sensor);
   4.167 +        } else {
   4.168 +          DeactivateSensor(sensor);
   4.169 +        }
   4.170 +      }      
   4.171 +    }
   4.172 +
   4.173 +    private void ActivateSensor(Sensor sensor) {
   4.174 +      if (!active.Contains(sensor)) {
   4.175 +        active.Add(sensor);
   4.176 +        SensorAdded(sensor);
   4.177 +      }
   4.178 +    }
   4.179 +
   4.180 +    private void DeactivateSensor(Sensor sensor) {
   4.181 +      if (active.Contains(sensor)) {
   4.182 +        active.Remove(sensor);
   4.183 +        SensorRemoved(sensor);
   4.184 +      }
   4.185 +    }
   4.186 +
   4.187 +    public event SensorEventHandler SensorAdded;
   4.188 +    public event SensorEventHandler SensorRemoved;
   4.189 +
   4.190 +  }
   4.191 +}
     5.1 --- a/Hardware/LPC/IT87.cs	Thu Jan 28 19:31:10 2010 +0000
     5.2 +++ b/Hardware/LPC/IT87.cs	Thu Jan 28 23:29:39 2010 +0000
     5.3 @@ -55,7 +55,6 @@
     5.4      private Sensor[] voltages;
     5.5      private List<ISensor> active = new List<ISensor>();
     5.6      private float[] voltageGains;
     5.7 -
     5.8     
     5.9      // Consts
    5.10      private const byte ITE_VENDOR_ID = 0x90;
    5.11 @@ -75,7 +74,6 @@
    5.12        new byte[] { 0x18, 0x19, 0x1a, 0x81, 0x83 };
    5.13      private const byte VOLTAGE_BASE_REG = 0x20;  
    5.14      
    5.15 -
    5.16      private byte ReadByte(byte register) {
    5.17        WinRing0.WriteIoPortByte(
    5.18          (ushort)(address + ADDRESS_REGISTER_OFFSET), register);
    5.19 @@ -151,7 +149,7 @@
    5.20        r.AppendLine();
    5.21        r.Append("Chip ID: 0x"); r.AppendLine(chip.ToString("X"));
    5.22        r.Append("Chip Name: "); r.AppendLine(name);
    5.23 -      r.Append("Base Address: 0x"); r.AppendLine(address.ToString("X"));
    5.24 +      r.Append("Base Address: 0x"); r.AppendLine(address.ToString("X4"));
    5.25        r.AppendLine();
    5.26        r.AppendLine("Environment Controller Registers");
    5.27        r.AppendLine();
     6.1 --- a/Hardware/LPC/LPCGroup.cs	Thu Jan 28 19:31:10 2010 +0000
     6.2 +++ b/Hardware/LPC/LPCGroup.cs	Thu Jan 28 23:29:39 2010 +0000
     6.3 @@ -47,32 +47,32 @@
     6.4      private Chip chip = Chip.Unknown;
     6.5  
     6.6      // I/O Ports
     6.7 -    private const ushort REGISTER_PORT = 0x2e;
     6.8 -    private const ushort VALUE_PORT = 0x2f;
     6.9 +    private ushort[] REGISTER_PORTS = new ushort[] { 0x2e, 0x4e };
    6.10 +    private ushort[] VALUE_PORTS = new ushort[] { 0x2f, 0x4f };
    6.11 +
    6.12 +    private ushort registerPort;
    6.13 +    private ushort valuePort;
    6.14  
    6.15      // Registers
    6.16      private const byte CONFIGURATION_CONTROL_REGISTER = 0x02;
    6.17      private const byte DEVCIE_SELECT_REGISTER = 0x07;
    6.18      private const byte CHIP_ID_REGISTER = 0x20;
    6.19      private const byte CHIP_REVISION_REGISTER = 0x21;
    6.20 +    private const byte BASE_ADDRESS_REGISTER = 0x60;
    6.21  
    6.22 -    private static byte ReadByte(byte register) {
    6.23 -      WinRing0.WriteIoPortByte(REGISTER_PORT, register);
    6.24 -      return WinRing0.ReadIoPortByte(VALUE_PORT);
    6.25 +    private byte ReadByte(byte register) {
    6.26 +      WinRing0.WriteIoPortByte(registerPort, register);
    6.27 +      return WinRing0.ReadIoPortByte(valuePort);
    6.28      }
    6.29  
    6.30 -    private static ushort ReadWord(byte register) {
    6.31 -      ushort value;
    6.32 -      WinRing0.WriteIoPortByte(REGISTER_PORT, register);
    6.33 -      value = (ushort)(((ushort)WinRing0.ReadIoPortByte(VALUE_PORT)) << 8);
    6.34 -      WinRing0.WriteIoPortByte(REGISTER_PORT, (byte)(register + 1));
    6.35 -      value |= (ushort)WinRing0.ReadIoPortByte(VALUE_PORT);
    6.36 -      return value;
    6.37 +    private ushort ReadWord(byte register) {
    6.38 +      return (ushort)((ReadByte(register) << 8) | 
    6.39 +        ReadByte((byte)(register + 1)));
    6.40      }
    6.41  
    6.42 -    private static void Select(byte logicalDeviceNumber) {
    6.43 -      WinRing0.WriteIoPortByte(REGISTER_PORT, DEVCIE_SELECT_REGISTER);
    6.44 -      WinRing0.WriteIoPortByte(VALUE_PORT, logicalDeviceNumber);
    6.45 +    private void Select(byte logicalDeviceNumber) {
    6.46 +      WinRing0.WriteIoPortByte(registerPort, DEVCIE_SELECT_REGISTER);
    6.47 +      WinRing0.WriteIoPortByte(valuePort, logicalDeviceNumber);
    6.48      }
    6.49  
    6.50      // IT87
    6.51 @@ -81,84 +81,137 @@
    6.52      private const ushort IT8720F_CHIP_ID = 0x8720;
    6.53      private const ushort IT8726F_CHIP_ID = 0x8726;
    6.54  
    6.55 -    private const byte IT87_ENVIRONMENT_CONTROLLER_LDN = 0x04;
    6.56 -    private const byte IT87_ENVIRONMENT_CONTROLLER_BASE_ADDR_REG = 0x60;
    6.57 +    private const byte IT87_ENVIRONMENT_CONTROLLER_LDN = 0x04;    
    6.58  
    6.59 -    private static void IT87Enter() {
    6.60 -      WinRing0.WriteIoPortByte(REGISTER_PORT, 0x87);
    6.61 -      WinRing0.WriteIoPortByte(REGISTER_PORT, 0x01);
    6.62 -      WinRing0.WriteIoPortByte(REGISTER_PORT, 0x55);
    6.63 -      WinRing0.WriteIoPortByte(REGISTER_PORT, 0x55);
    6.64 +    private void IT87Enter() {
    6.65 +      WinRing0.WriteIoPortByte(registerPort, 0x87);
    6.66 +      WinRing0.WriteIoPortByte(registerPort, 0x01);
    6.67 +      WinRing0.WriteIoPortByte(registerPort, 0x55);
    6.68 +      WinRing0.WriteIoPortByte(registerPort, 0x55);
    6.69      }
    6.70  
    6.71 -    internal static void IT87Exit() {
    6.72 -      WinRing0.WriteIoPortByte(REGISTER_PORT, CONFIGURATION_CONTROL_REGISTER);
    6.73 -      WinRing0.WriteIoPortByte(VALUE_PORT, 0x02);
    6.74 +    internal void IT87Exit() {
    6.75 +      WinRing0.WriteIoPortByte(registerPort, CONFIGURATION_CONTROL_REGISTER);
    6.76 +      WinRing0.WriteIoPortByte(valuePort, 0x02);
    6.77      }
    6.78  
    6.79 -    // Winbond
    6.80 -    private static void WinbondEnter() {
    6.81 -      WinRing0.WriteIoPortByte(REGISTER_PORT, 0x87);
    6.82 -      WinRing0.WriteIoPortByte(REGISTER_PORT, 0x87);
    6.83 +    // Winbond, Fintek
    6.84 +    private const byte FINTEK_VENDOR_ID_REGISTER = 0x23;
    6.85 +    private const ushort FINTEK_VENDOR_ID = 0x1934;
    6.86 +
    6.87 +    private const byte W83627DHG_HARDWARE_MONITOR_LDN = 0x0B;
    6.88 +    private const byte F71882FG_HARDWARE_MONITOR_LDN = 0x04;
    6.89 +
    6.90 +    private void WinbondFintekEnter() {
    6.91 +      WinRing0.WriteIoPortByte(registerPort, 0x87);
    6.92 +      WinRing0.WriteIoPortByte(registerPort, 0x87);
    6.93      }
    6.94  
    6.95 -    private static void WinbondExit() {
    6.96 -      WinRing0.WriteIoPortByte(REGISTER_PORT, 0xAA);      
    6.97 +    private void WinbondFintekExit() {
    6.98 +      WinRing0.WriteIoPortByte(registerPort, 0xAA);      
    6.99      }
   6.100  
   6.101      public LPCGroup() {
   6.102        if (!WinRing0.IsAvailable)
   6.103          return;
   6.104  
   6.105 -      WinbondEnter();
   6.106 +      for (int i = 0; i < REGISTER_PORTS.Length; i++) {
   6.107 +        registerPort = REGISTER_PORTS[i];
   6.108 +        valuePort = VALUE_PORTS[i];
   6.109  
   6.110 -      byte id = ReadByte(CHIP_ID_REGISTER);
   6.111 -      byte revision = ReadByte(CHIP_REVISION_REGISTER);
   6.112 -      switch (id) {
   6.113 -        case 0xA0:
   6.114 -          switch (revision & 0xF0) {
   6.115 -            case 0x20: chip = Chip.W83627DHG; break;
   6.116 -            default: chip = Chip.Unknown; break;
   6.117 -          } break;
   6.118 -        default: chip = Chip.Unknown; break;
   6.119 -      }
   6.120 -      if (chip != Chip.Unknown) {
   6.121 +        WinbondFintekEnter();
   6.122  
   6.123 -        WinbondExit();
   6.124 +        byte hardwareMonitorLDN;
   6.125 +        byte id = ReadByte(CHIP_ID_REGISTER);
   6.126 +        byte revision = ReadByte(CHIP_REVISION_REGISTER);
   6.127 +        switch (id) {
   6.128 +          case 0xA0:
   6.129 +            switch (revision & 0xF0) {
   6.130 +              case 0x20: 
   6.131 +                chip = Chip.W83627DHG;
   6.132 +                hardwareMonitorLDN = W83627DHG_HARDWARE_MONITOR_LDN;  
   6.133 +                break;
   6.134 +              default: 
   6.135 +                chip = Chip.Unknown;
   6.136 +                hardwareMonitorLDN = 0;
   6.137 +                break;
   6.138 +            } break;
   6.139 +          case 0x05:
   6.140 +            switch (revision) {
   6.141 +              case 0x41: 
   6.142 +                chip = Chip.F71882FG;
   6.143 +                hardwareMonitorLDN = F71882FG_HARDWARE_MONITOR_LDN; 
   6.144 +                break;
   6.145 +              default: 
   6.146 +                chip = Chip.Unknown; 
   6.147 +                hardwareMonitorLDN = 0;
   6.148 +                break;
   6.149 +            } break;
   6.150 +          default:
   6.151 +            chip = Chip.Unknown; 
   6.152 +            hardwareMonitorLDN = 0;
   6.153 +            break;
   6.154 +        }
   6.155 +        if (chip != Chip.Unknown) {
   6.156  
   6.157 -        W83627DHG w83627dhg = new W83627DHG(revision);
   6.158 -        if (w83627dhg.IsAvailable)
   6.159 -          hardware.Add(w83627dhg);
   6.160 -        return;
   6.161 -      }
   6.162 +          Select(hardwareMonitorLDN);
   6.163 +          ushort address = ReadWord(BASE_ADDRESS_REGISTER);
   6.164 +          Thread.Sleep(1);
   6.165 +          ushort verify = ReadWord(BASE_ADDRESS_REGISTER);
   6.166  
   6.167 -      IT87Enter();
   6.168 +          ushort vendorID = 0;
   6.169 +          if (chip == Chip.F71882FG)
   6.170 +            vendorID = ReadWord(FINTEK_VENDOR_ID_REGISTER);
   6.171  
   6.172 -      switch (ReadWord(CHIP_ID_REGISTER)) {
   6.173 -        case 0x8716: chip = Chip.IT8716F; break;
   6.174 -        case 0x8718: chip = Chip.IT8718F; break;
   6.175 -        case 0x8720: chip = Chip.IT8720F; break;
   6.176 -        case 0x8726: chip = Chip.IT8726F; break;
   6.177 -        default: chip = Chip.Unknown; break;
   6.178 -      }
   6.179 +          WinbondFintekExit();
   6.180  
   6.181 -      if (chip != Chip.Unknown) {        
   6.182 -        Select(IT87_ENVIRONMENT_CONTROLLER_LDN);
   6.183 -        ushort address = ReadWord(IT87_ENVIRONMENT_CONTROLLER_BASE_ADDR_REG);
   6.184 -        Thread.Sleep(1);
   6.185 -        ushort verify = ReadWord(IT87_ENVIRONMENT_CONTROLLER_BASE_ADDR_REG);
   6.186 +          if (address != verify || address == 0 || (address & 0xF007) != 0)
   6.187 +            return;
   6.188 +          
   6.189 +          switch (chip) {
   6.190 +            case Chip.W83627DHG:
   6.191 +              W83627DHG w83627dhg = new W83627DHG(revision, address);
   6.192 +              if (w83627dhg.IsAvailable)
   6.193 +                hardware.Add(w83627dhg);
   6.194 +              break;
   6.195 +            case Chip.F71882FG:  
   6.196 +              if (vendorID == FINTEK_VENDOR_ID)
   6.197 +                hardware.Add(new F71882FG(address));
   6.198 +              break;
   6.199 +            default: break;
   6.200 +          }
   6.201 +          
   6.202 +          return;
   6.203 +        }
   6.204  
   6.205 -        IT87Exit();
   6.206 +        IT87Enter();
   6.207  
   6.208 -        if (address != verify || address == 0 || (address & 0xF007) != 0)
   6.209 +        switch (ReadWord(CHIP_ID_REGISTER)) {
   6.210 +          case 0x8716: chip = Chip.IT8716F; break;
   6.211 +          case 0x8718: chip = Chip.IT8718F; break;
   6.212 +          case 0x8720: chip = Chip.IT8720F; break;
   6.213 +          case 0x8726: chip = Chip.IT8726F; break;
   6.214 +          default: chip = Chip.Unknown; break;
   6.215 +        }
   6.216 +
   6.217 +        if (chip != Chip.Unknown) {
   6.218 +          Select(IT87_ENVIRONMENT_CONTROLLER_LDN);
   6.219 +          ushort address = ReadWord(BASE_ADDRESS_REGISTER);
   6.220 +          Thread.Sleep(1);
   6.221 +          ushort verify = ReadWord(BASE_ADDRESS_REGISTER);
   6.222 +
   6.223 +          IT87Exit();
   6.224 +
   6.225 +          if (address != verify || address == 0 || (address & 0xF007) != 0)
   6.226 +            return;
   6.227 +
   6.228 +          IT87 it87 = new IT87(chip, address);
   6.229 +          if (it87.IsAvailable)
   6.230 +            hardware.Add(it87);
   6.231 +
   6.232            return;
   6.233 -
   6.234 -        IT87 it87 = new IT87(chip, address);
   6.235 -        if (it87.IsAvailable)
   6.236 -          hardware.Add(it87);
   6.237 -        
   6.238 -        return;
   6.239 -      }                
   6.240 +        }
   6.241 +      }   
   6.242      }
   6.243  
   6.244      public IHardware[] Hardware {
     7.1 --- a/Hardware/LPC/W83627DHG.cs	Thu Jan 28 19:31:10 2010 +0000
     7.2 +++ b/Hardware/LPC/W83627DHG.cs	Thu Jan 28 23:29:39 2010 +0000
     7.3 @@ -12,9 +12,11 @@
     7.4      private Image icon;
     7.5  
     7.6      private bool available = false;
     7.7 +    private ushort address;
     7.8  
     7.9 -    public W83627DHG(byte revision) {      
    7.10 +    public W83627DHG(byte revision, ushort address) {      
    7.11        this.revision = revision;
    7.12 +      this.address = address;
    7.13  
    7.14        this.name = "Winbond W83627DHG";
    7.15        this.icon = Utilities.EmbeddedResources.GetImage("chip.png");
    7.16 @@ -45,7 +47,9 @@
    7.17  
    7.18        r.AppendLine("LPC W83627DHG");
    7.19        r.AppendLine();
    7.20 -      r.Append("Chip revision: 0x"); r.AppendLine(revision.ToString("X"));     
    7.21 +      r.Append("Chip revision: 0x"); r.AppendLine(revision.ToString("X"));
    7.22 +      r.Append("Base Adress: 0x"); r.AppendLine(address.ToString("X4"));
    7.23 +      r.AppendLine();
    7.24  
    7.25        return r.ToString();
    7.26      }
     8.1 --- a/Hardware/Nvidia/NvidiaGroup.cs	Thu Jan 28 19:31:10 2010 +0000
     8.2 +++ b/Hardware/Nvidia/NvidiaGroup.cs	Thu Jan 28 23:29:39 2010 +0000
     8.3 @@ -54,8 +54,12 @@
     8.4        if (NVAPI.NvAPI_EnumPhysicalGPUs(handles, out count) != NvStatus.OK)
     8.5          return;
     8.6  
     8.7 -      for (int i = 0; i < count; i++)         
     8.8 -        hardware.Add(new NvidiaGPU(i, handles[i]));   
     8.9 +      for (int i = 0; i < count; i++) {
    8.10 +        string gpuName;
    8.11 +        NVAPI.NvAPI_GPU_GetFullName(handles[i], out gpuName);
    8.12 +        if (gpuName != null && gpuName.Trim() != "")
    8.13 +          hardware.Add(new NvidiaGPU(i, handles[i]));
    8.14 +      }
    8.15      }
    8.16  
    8.17      public IHardware[] Hardware {
     9.1 --- a/OpenHardwareMonitor.csproj	Thu Jan 28 19:31:10 2010 +0000
     9.2 +++ b/OpenHardwareMonitor.csproj	Thu Jan 28 23:29:39 2010 +0000
     9.3 @@ -62,6 +62,7 @@
     9.4      <Compile Include="Hardware\HDD\HDDGroup.cs" />
     9.5      <Compile Include="Hardware\HDD\SMART.cs" />
     9.6      <Compile Include="Hardware\LPC\Chip.cs" />
     9.7 +    <Compile Include="Hardware\LPC\F71882FG.cs" />
     9.8      <Compile Include="Hardware\SMBIOS\SMBIOSGroup.cs" />
     9.9      <Compile Include="Hardware\LPC\W83627DHG.cs" />
    9.10      <Compile Include="Hardware\ReportWriter.cs" />
    10.1 --- a/Properties/AssemblyInfo.cs	Thu Jan 28 19:31:10 2010 +0000
    10.2 +++ b/Properties/AssemblyInfo.cs	Thu Jan 28 23:29:39 2010 +0000
    10.3 @@ -32,5 +32,5 @@
    10.4  // You can specify all the values or you can default the Build and Revision Numbers 
    10.5  // by using the '*' as shown below:
    10.6  // [assembly: AssemblyVersion("1.0.*")]
    10.7 -[assembly: AssemblyVersion("0.1.1.0")]
    10.8 -[assembly: AssemblyFileVersion("0.1.1.0")]
    10.9 +[assembly: AssemblyVersion("0.1.2.0")]
   10.10 +[assembly: AssemblyFileVersion("0.1.2.0")]