Fixed Issue 156.
authormoel.mich
Sat, 19 Mar 2011 22:55:05 +0000
changeset 265961c07a3bd78
parent 264 718555482989
child 266 2687ac753d90
Fixed Issue 156.
GUI/MainForm.cs
Hardware/LPC/Chip.cs
Hardware/LPC/LPCIO.cs
Hardware/LPC/NCT677X.cs
Hardware/Mainboard/Model.cs
Hardware/Mainboard/SMBIOS.cs
Hardware/Mainboard/SuperIOHardware.cs
     1.1 --- a/GUI/MainForm.cs	Sat Mar 19 16:13:49 2011 +0000
     1.2 +++ b/GUI/MainForm.cs	Sat Mar 19 22:55:05 2011 +0000
     1.3 @@ -91,7 +91,7 @@
     1.4        this.Font = SystemFonts.MessageBoxFont;
     1.5        treeView.Font = SystemFonts.MessageBoxFont;
     1.6        plotPanel.Font = SystemFonts.MessageBoxFont;
     1.7 -      treeView.RowHeight = treeView.Font.Height + 1;      
     1.8 +      treeView.RowHeight = Math.Max(treeView.Font.Height + 1, 17);      
     1.9        
    1.10        nodeCheckBox.IsVisibleValueNeeded += nodeCheckBox_IsVisibleValueNeeded;
    1.11        nodeCheckBox.CheckStateChanged += UpdatePlotSelection;
     2.1 --- a/Hardware/LPC/Chip.cs	Sat Mar 19 16:13:49 2011 +0000
     2.2 +++ b/Hardware/LPC/Chip.cs	Sat Mar 19 22:55:05 2011 +0000
     2.3 @@ -16,7 +16,7 @@
     2.4  
     2.5    The Initial Developer of the Original Code is 
     2.6    Michael Möller <m.moeller@gmx.ch>.
     2.7 -  Portions created by the Initial Developer are Copyright (C) 2009-2010
     2.8 +  Portions created by the Initial Developer are Copyright (C) 2009-2011
     2.9    the Initial Developer. All Rights Reserved.
    2.10  
    2.11    Contributor(s):
    2.12 @@ -54,6 +54,7 @@
    2.13      W83667HGB = 0xB350,
    2.14      W83687THF = 0x8541,
    2.15      NCT6771F = 0xB470,
    2.16 +    NCT6776F = 0xC330,
    2.17      F71858 = 0x0507,
    2.18      F71862 = 0x0601, 
    2.19      F71869 = 0x0814,
    2.20 @@ -89,6 +90,7 @@
    2.21          case Chip.W83667HGB: return "Winbond W83667HG-B";
    2.22          case Chip.W83687THF: return "Winbond W83687THF";
    2.23          case Chip.NCT6771F: return "Nuvoton NCT6771F";
    2.24 +        case Chip.NCT6776F: return "Nuvoton NCT6776F";
    2.25          case Chip.Unknown: return "Unkown";
    2.26          default: return "Unknown";
    2.27        }
     3.1 --- a/Hardware/LPC/LPCIO.cs	Sat Mar 19 16:13:49 2011 +0000
     3.2 +++ b/Hardware/LPC/LPCIO.cs	Sat Mar 19 22:55:05 2011 +0000
     3.3 @@ -16,7 +16,7 @@
     3.4  
     3.5    The Initial Developer of the Original Code is 
     3.6    Michael Möller <m.moeller@gmx.ch>.
     3.7 -  Portions created by the Initial Developer are Copyright (C) 2009-2010
     3.8 +  Portions created by the Initial Developer are Copyright (C) 2009-2011
     3.9    the Initial Developer. All Rights Reserved.
    3.10  
    3.11    Contributor(s):
    3.12 @@ -220,6 +220,13 @@
    3.13                logicalDeviceNumber = WINBOND_NUVOTON_HARDWARE_MONITOR_LDN;
    3.14                break;
    3.15            } break;
    3.16 +        case 0xC3:
    3.17 +          switch (revision & 0xF0) {
    3.18 +            case 0x30:
    3.19 +              chip = Chip.NCT6776F;
    3.20 +              logicalDeviceNumber = WINBOND_NUVOTON_HARDWARE_MONITOR_LDN;
    3.21 +              break;
    3.22 +          } break;
    3.23        }
    3.24        if (chip == Chip.Unknown) {
    3.25          if (id != 0 && id != 0xff) {
    3.26 @@ -279,6 +286,7 @@
    3.27              superIOs.Add(new W836XX(chip, revision, address));
    3.28              break;
    3.29            case Chip.NCT6771F:
    3.30 +          case Chip.NCT6776F:
    3.31              superIOs.Add(new NCT677X(chip, revision, address));
    3.32              break;
    3.33            case Chip.F71858:
     4.1 --- a/Hardware/LPC/NCT677X.cs	Sat Mar 19 16:13:49 2011 +0000
     4.2 +++ b/Hardware/LPC/NCT677X.cs	Sat Mar 19 22:55:05 2011 +0000
     4.3 @@ -16,7 +16,7 @@
     4.4  
     4.5    The Initial Developer of the Original Code is 
     4.6    Michael Möller <m.moeller@gmx.ch>.
     4.7 -  Portions created by the Initial Developer are Copyright (C) 2010
     4.8 +  Portions created by the Initial Developer are Copyright (C) 2010-2011
     4.9    the Initial Developer. All Rights Reserved.
    4.10  
    4.11    Contributor(s):
    4.12 @@ -48,7 +48,7 @@
    4.13  
    4.14      private readonly float?[] voltages = new float?[9];
    4.15      private readonly float?[] temperatures = new float?[3];
    4.16 -    private readonly float?[] fans = new float?[4];
    4.17 +    private readonly float?[] fans = new float?[0];
    4.18  
    4.19      // Hardware Monitor
    4.20      private const uint ADDRESS_REGISTER_OFFSET = 0x05;
    4.21 @@ -81,7 +81,10 @@
    4.22      private readonly int[] TEMPERATURE_HALF_BIT = { 7, 7, -1, 0, 1, 2 };
    4.23      private readonly ushort[] VOLTAGE_REG = 
    4.24        { 0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x550, 0x551 };
    4.25 -    private readonly ushort[] FAN_RPM_REG = { 0x656, 0x658, 0x65A, 0x65C};
    4.26 +    private readonly ushort[] FAN_RPM_REG = 
    4.27 +      { 0x656, 0x658, 0x65A, 0x65C, 0x65E};
    4.28 +
    4.29 +    private readonly int minFanRPM;
    4.30  
    4.31      private enum TemperatureSource : byte {
    4.32        SYSTIN = 1,
    4.33 @@ -112,7 +115,20 @@
    4.34        this.port = port;
    4.35  
    4.36        if (!IsNuvotonVendor())
    4.37 -        return;      
    4.38 +        return;
    4.39 +
    4.40 +      switch (chip) {
    4.41 +        case LPC.Chip.NCT6771F:
    4.42 +          fans = new float?[4];
    4.43 +          // min value RPM value with 16-bit fan counter
    4.44 +          minFanRPM = (int)(1.35e6 / 0xFFFF);
    4.45 +          break;
    4.46 +        case LPC.Chip.NCT6776F:
    4.47 +          fans = new float?[5];
    4.48 +          // min value RPM value with 13-bit fan counter
    4.49 +          minFanRPM = (int)(1.35e6 / 0x1FFF);
    4.50 +          break;        
    4.51 +      }
    4.52      }
    4.53  
    4.54      private bool IsNuvotonVendor() {
    4.55 @@ -170,7 +186,9 @@
    4.56        for (int i = 0; i < fans.Length; i++) {
    4.57          byte high = ReadByte(FAN_RPM_REG[i]);
    4.58          byte low = ReadByte((ushort)(FAN_RPM_REG[i] + 1));
    4.59 -        fans[i] = (high << 8) | low;
    4.60 +        int value = (high << 8) | low;
    4.61 +
    4.62 +        fans[i] = value > minFanRPM ? value : 0;
    4.63        }
    4.64  
    4.65        Ring0.ReleaseIsaBusMutex();
     5.1 --- a/Hardware/Mainboard/Model.cs	Sat Mar 19 16:13:49 2011 +0000
     5.2 +++ b/Hardware/Mainboard/Model.cs	Sat Mar 19 22:55:05 2011 +0000
     5.3 @@ -16,7 +16,7 @@
     5.4  
     5.5    The Initial Developer of the Original Code is 
     5.6    Michael Möller <m.moeller@gmx.ch>.
     5.7 -  Portions created by the Initial Developer are Copyright (C) 2009-2010
     5.8 +  Portions created by the Initial Developer are Copyright (C) 2009-2011
     5.9    the Initial Developer. All Rights Reserved.
    5.10  
    5.11    Contributor(s):
    5.12 @@ -49,6 +49,7 @@
    5.13      M4A79XTD_EVO,
    5.14      P5W_DH_Deluxe,    
    5.15      P6X58D_E,
    5.16 +    P8P67_PRO,
    5.17      Rampage_Extreme,
    5.18      Rampage_II_GENE,
    5.19  
     6.1 --- a/Hardware/Mainboard/SMBIOS.cs	Sat Mar 19 16:13:49 2011 +0000
     6.2 +++ b/Hardware/Mainboard/SMBIOS.cs	Sat Mar 19 22:55:05 2011 +0000
     6.3 @@ -16,7 +16,7 @@
     6.4  
     6.5    The Initial Developer of the Original Code is 
     6.6    Michael Möller <m.moeller@gmx.ch>.
     6.7 -  Portions created by the Initial Developer are Copyright (C) 2009-2010
     6.8 +  Portions created by the Initial Developer are Copyright (C) 2009-2011
     6.9    the Initial Developer. All Rights Reserved.
    6.10  
    6.11    Contributor(s):
    6.12 @@ -322,6 +322,8 @@
    6.13              return Model.P5W_DH_Deluxe;
    6.14            case "P6X58D-E":
    6.15              return Model.P6X58D_E;
    6.16 +          case "P8P67 PRO":
    6.17 +            return Model.P8P67_PRO;
    6.18            case "Rampage Extreme":
    6.19              return Model.Rampage_Extreme;
    6.20            case "Rampage II GENE":
     7.1 --- a/Hardware/Mainboard/SuperIOHardware.cs	Sat Mar 19 16:13:49 2011 +0000
     7.2 +++ b/Hardware/Mainboard/SuperIOHardware.cs	Sat Mar 19 22:55:05 2011 +0000
     7.3 @@ -16,7 +16,7 @@
     7.4  
     7.5    The Initial Developer of the Original Code is 
     7.6    Michael Möller <m.moeller@gmx.ch>.
     7.7 -  Portions created by the Initial Developer are Copyright (C) 2009-2010
     7.8 +  Portions created by the Initial Developer are Copyright (C) 2009-2011
     7.9    the Initial Developer. All Rights Reserved.
    7.10  
    7.11    Contributor(s):
    7.12 @@ -742,22 +742,64 @@
    7.13            f.Add(new Fan("Auxiliary Fan", 2));
    7.14            break;
    7.15          case Chip.NCT6771F:
    7.16 -          v.Add(new Voltage("CPU VCore", 0));
    7.17 -          v.Add(new Voltage("Voltage #2", 1, true));
    7.18 -          v.Add(new Voltage("AVCC", 2, 34, 34));
    7.19 -          v.Add(new Voltage("3VCC", 3, 34, 34));
    7.20 -          v.Add(new Voltage("Voltage #5", 4, true));
    7.21 -          v.Add(new Voltage("Voltage #6", 5, true));
    7.22 -          v.Add(new Voltage("Voltage #7", 6, true));
    7.23 -          v.Add(new Voltage("3VSB", 7, 34, 34));
    7.24 -          v.Add(new Voltage("VBAT", 8, 34, 34));
    7.25 -          t.Add(new Temperature("CPU", 0));
    7.26 -          t.Add(new Temperature("Auxiliary", 1));
    7.27 -          t.Add(new Temperature("System", 2));
    7.28 -          f.Add(new Fan("System Fan", 0));
    7.29 -          f.Add(new Fan("CPU Fan", 1));
    7.30 -          f.Add(new Fan("Auxiliary Fan", 2));
    7.31 -          f.Add(new Fan("Auxiliary Fan #2", 4));
    7.32 +        case Chip.NCT6776F:
    7.33 +          switch (manufacturer) {
    7.34 +            case Manufacturer.ASUS:
    7.35 +              switch (model) {
    7.36 +                case Model.P8P67_PRO: // NCT6776F
    7.37 +                  v.Add(new Voltage("CPU VCore", 0));
    7.38 +                  v.Add(new Voltage("Voltage #2", 1, true));
    7.39 +                  v.Add(new Voltage("AVCC", 2, 34, 34));
    7.40 +                  v.Add(new Voltage("3VCC", 3, 34, 34));
    7.41 +                  v.Add(new Voltage("Voltage #5", 4, true));
    7.42 +                  v.Add(new Voltage("Voltage #6", 5, true));
    7.43 +                  v.Add(new Voltage("Voltage #7", 6, true));
    7.44 +                  v.Add(new Voltage("3VSB", 7, 34, 34));
    7.45 +                  v.Add(new Voltage("VBAT", 8, 34, 34));
    7.46 +                  t.Add(new Temperature("CPU", 0));
    7.47 +                  t.Add(new Temperature("Auxiliary", 1));
    7.48 +                  t.Add(new Temperature("System", 2));
    7.49 +                  f.Add(new Fan("System Fan", 0));
    7.50 +                  f.Add(new Fan("CPU Fan", 1));
    7.51 +                  f.Add(new Fan("Auxiliary Fan", 2));
    7.52 +                  f.Add(new Fan("Auxiliary Fan #2", 3));
    7.53 +                  f.Add(new Fan("Auxiliary Fan #3", 4));
    7.54 +                  break;
    7.55 +                default:
    7.56 +                  v.Add(new Voltage("CPU VCore", 0));
    7.57 +                  v.Add(new Voltage("Voltage #2", 1, true));
    7.58 +                  v.Add(new Voltage("AVCC", 2, 34, 34));
    7.59 +                  v.Add(new Voltage("3VCC", 3, 34, 34));
    7.60 +                  v.Add(new Voltage("Voltage #5", 4, true));
    7.61 +                  v.Add(new Voltage("Voltage #6", 5, true));
    7.62 +                  v.Add(new Voltage("Voltage #7", 6, true));
    7.63 +                  v.Add(new Voltage("3VSB", 7, 34, 34));
    7.64 +                  v.Add(new Voltage("VBAT", 8, 34, 34));
    7.65 +                  t.Add(new Temperature("CPU", 0));
    7.66 +                  t.Add(new Temperature("Auxiliary", 1));
    7.67 +                  t.Add(new Temperature("System", 2));
    7.68 +                  for (int i = 0; i < superIO.Fans.Length; i++)
    7.69 +                    f.Add(new Fan("Fan #" + (i + 1), i));
    7.70 +                  break;
    7.71 +              }
    7.72 +              break;
    7.73 +            default:
    7.74 +              v.Add(new Voltage("CPU VCore", 0));
    7.75 +              v.Add(new Voltage("Voltage #2", 1, true));
    7.76 +              v.Add(new Voltage("AVCC", 2, 34, 34));
    7.77 +              v.Add(new Voltage("3VCC", 3, 34, 34));
    7.78 +              v.Add(new Voltage("Voltage #5", 4, true));
    7.79 +              v.Add(new Voltage("Voltage #6", 5, true));
    7.80 +              v.Add(new Voltage("Voltage #7", 6, true));
    7.81 +              v.Add(new Voltage("3VSB", 7, 34, 34));
    7.82 +              v.Add(new Voltage("VBAT", 8, 34, 34));
    7.83 +              t.Add(new Temperature("CPU", 0));
    7.84 +              t.Add(new Temperature("Auxiliary", 1));
    7.85 +              t.Add(new Temperature("System", 2));
    7.86 +              for (int i = 0; i < superIO.Fans.Length; i++)
    7.87 +                f.Add(new Fan("Fan #" + (i + 1), i));
    7.88 +              break;
    7.89 +          }
    7.90            break;
    7.91          default:
    7.92            for (int i = 0; i < superIO.Voltages.Length; i++)