# HG changeset patch # User moel.mich # Date 1300575305 0 # Node ID 961c07a3bd7861f88e0b8da63f0896b92369a5a4 # Parent 7185554829899c0b86a5f2782bf46a7640a8c3e2 Fixed Issue 156. diff -r 718555482989 -r 961c07a3bd78 GUI/MainForm.cs --- a/GUI/MainForm.cs Sat Mar 19 16:13:49 2011 +0000 +++ b/GUI/MainForm.cs Sat Mar 19 22:55:05 2011 +0000 @@ -91,7 +91,7 @@ this.Font = SystemFonts.MessageBoxFont; treeView.Font = SystemFonts.MessageBoxFont; plotPanel.Font = SystemFonts.MessageBoxFont; - treeView.RowHeight = treeView.Font.Height + 1; + treeView.RowHeight = Math.Max(treeView.Font.Height + 1, 17); nodeCheckBox.IsVisibleValueNeeded += nodeCheckBox_IsVisibleValueNeeded; nodeCheckBox.CheckStateChanged += UpdatePlotSelection; diff -r 718555482989 -r 961c07a3bd78 Hardware/LPC/Chip.cs --- a/Hardware/LPC/Chip.cs Sat Mar 19 16:13:49 2011 +0000 +++ b/Hardware/LPC/Chip.cs Sat Mar 19 22:55:05 2011 +0000 @@ -16,7 +16,7 @@ The Initial Developer of the Original Code is Michael Möller . - Portions created by the Initial Developer are Copyright (C) 2009-2010 + Portions created by the Initial Developer are Copyright (C) 2009-2011 the Initial Developer. All Rights Reserved. Contributor(s): @@ -54,6 +54,7 @@ W83667HGB = 0xB350, W83687THF = 0x8541, NCT6771F = 0xB470, + NCT6776F = 0xC330, F71858 = 0x0507, F71862 = 0x0601, F71869 = 0x0814, @@ -89,6 +90,7 @@ case Chip.W83667HGB: return "Winbond W83667HG-B"; case Chip.W83687THF: return "Winbond W83687THF"; case Chip.NCT6771F: return "Nuvoton NCT6771F"; + case Chip.NCT6776F: return "Nuvoton NCT6776F"; case Chip.Unknown: return "Unkown"; default: return "Unknown"; } diff -r 718555482989 -r 961c07a3bd78 Hardware/LPC/LPCIO.cs --- a/Hardware/LPC/LPCIO.cs Sat Mar 19 16:13:49 2011 +0000 +++ b/Hardware/LPC/LPCIO.cs Sat Mar 19 22:55:05 2011 +0000 @@ -16,7 +16,7 @@ The Initial Developer of the Original Code is Michael Möller . - Portions created by the Initial Developer are Copyright (C) 2009-2010 + Portions created by the Initial Developer are Copyright (C) 2009-2011 the Initial Developer. All Rights Reserved. Contributor(s): @@ -220,6 +220,13 @@ logicalDeviceNumber = WINBOND_NUVOTON_HARDWARE_MONITOR_LDN; break; } break; + case 0xC3: + switch (revision & 0xF0) { + case 0x30: + chip = Chip.NCT6776F; + logicalDeviceNumber = WINBOND_NUVOTON_HARDWARE_MONITOR_LDN; + break; + } break; } if (chip == Chip.Unknown) { if (id != 0 && id != 0xff) { @@ -279,6 +286,7 @@ superIOs.Add(new W836XX(chip, revision, address)); break; case Chip.NCT6771F: + case Chip.NCT6776F: superIOs.Add(new NCT677X(chip, revision, address)); break; case Chip.F71858: diff -r 718555482989 -r 961c07a3bd78 Hardware/LPC/NCT677X.cs --- a/Hardware/LPC/NCT677X.cs Sat Mar 19 16:13:49 2011 +0000 +++ b/Hardware/LPC/NCT677X.cs Sat Mar 19 22:55:05 2011 +0000 @@ -16,7 +16,7 @@ The Initial Developer of the Original Code is Michael Möller . - Portions created by the Initial Developer are Copyright (C) 2010 + Portions created by the Initial Developer are Copyright (C) 2010-2011 the Initial Developer. All Rights Reserved. Contributor(s): @@ -48,7 +48,7 @@ private readonly float?[] voltages = new float?[9]; private readonly float?[] temperatures = new float?[3]; - private readonly float?[] fans = new float?[4]; + private readonly float?[] fans = new float?[0]; // Hardware Monitor private const uint ADDRESS_REGISTER_OFFSET = 0x05; @@ -81,7 +81,10 @@ private readonly int[] TEMPERATURE_HALF_BIT = { 7, 7, -1, 0, 1, 2 }; private readonly ushort[] VOLTAGE_REG = { 0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x550, 0x551 }; - private readonly ushort[] FAN_RPM_REG = { 0x656, 0x658, 0x65A, 0x65C}; + private readonly ushort[] FAN_RPM_REG = + { 0x656, 0x658, 0x65A, 0x65C, 0x65E}; + + private readonly int minFanRPM; private enum TemperatureSource : byte { SYSTIN = 1, @@ -112,7 +115,20 @@ this.port = port; if (!IsNuvotonVendor()) - return; + return; + + switch (chip) { + case LPC.Chip.NCT6771F: + fans = new float?[4]; + // min value RPM value with 16-bit fan counter + minFanRPM = (int)(1.35e6 / 0xFFFF); + break; + case LPC.Chip.NCT6776F: + fans = new float?[5]; + // min value RPM value with 13-bit fan counter + minFanRPM = (int)(1.35e6 / 0x1FFF); + break; + } } private bool IsNuvotonVendor() { @@ -170,7 +186,9 @@ for (int i = 0; i < fans.Length; i++) { byte high = ReadByte(FAN_RPM_REG[i]); byte low = ReadByte((ushort)(FAN_RPM_REG[i] + 1)); - fans[i] = (high << 8) | low; + int value = (high << 8) | low; + + fans[i] = value > minFanRPM ? value : 0; } Ring0.ReleaseIsaBusMutex(); diff -r 718555482989 -r 961c07a3bd78 Hardware/Mainboard/Model.cs --- a/Hardware/Mainboard/Model.cs Sat Mar 19 16:13:49 2011 +0000 +++ b/Hardware/Mainboard/Model.cs Sat Mar 19 22:55:05 2011 +0000 @@ -16,7 +16,7 @@ The Initial Developer of the Original Code is Michael Möller . - Portions created by the Initial Developer are Copyright (C) 2009-2010 + Portions created by the Initial Developer are Copyright (C) 2009-2011 the Initial Developer. All Rights Reserved. Contributor(s): @@ -49,6 +49,7 @@ M4A79XTD_EVO, P5W_DH_Deluxe, P6X58D_E, + P8P67_PRO, Rampage_Extreme, Rampage_II_GENE, diff -r 718555482989 -r 961c07a3bd78 Hardware/Mainboard/SMBIOS.cs --- a/Hardware/Mainboard/SMBIOS.cs Sat Mar 19 16:13:49 2011 +0000 +++ b/Hardware/Mainboard/SMBIOS.cs Sat Mar 19 22:55:05 2011 +0000 @@ -16,7 +16,7 @@ The Initial Developer of the Original Code is Michael Möller . - Portions created by the Initial Developer are Copyright (C) 2009-2010 + Portions created by the Initial Developer are Copyright (C) 2009-2011 the Initial Developer. All Rights Reserved. Contributor(s): @@ -322,6 +322,8 @@ return Model.P5W_DH_Deluxe; case "P6X58D-E": return Model.P6X58D_E; + case "P8P67 PRO": + return Model.P8P67_PRO; case "Rampage Extreme": return Model.Rampage_Extreme; case "Rampage II GENE": diff -r 718555482989 -r 961c07a3bd78 Hardware/Mainboard/SuperIOHardware.cs --- a/Hardware/Mainboard/SuperIOHardware.cs Sat Mar 19 16:13:49 2011 +0000 +++ b/Hardware/Mainboard/SuperIOHardware.cs Sat Mar 19 22:55:05 2011 +0000 @@ -16,7 +16,7 @@ The Initial Developer of the Original Code is Michael Möller . - Portions created by the Initial Developer are Copyright (C) 2009-2010 + Portions created by the Initial Developer are Copyright (C) 2009-2011 the Initial Developer. All Rights Reserved. Contributor(s): @@ -742,22 +742,64 @@ f.Add(new Fan("Auxiliary Fan", 2)); break; case Chip.NCT6771F: - v.Add(new Voltage("CPU VCore", 0)); - v.Add(new Voltage("Voltage #2", 1, true)); - v.Add(new Voltage("AVCC", 2, 34, 34)); - v.Add(new Voltage("3VCC", 3, 34, 34)); - v.Add(new Voltage("Voltage #5", 4, true)); - v.Add(new Voltage("Voltage #6", 5, true)); - v.Add(new Voltage("Voltage #7", 6, true)); - v.Add(new Voltage("3VSB", 7, 34, 34)); - v.Add(new Voltage("VBAT", 8, 34, 34)); - t.Add(new Temperature("CPU", 0)); - t.Add(new Temperature("Auxiliary", 1)); - t.Add(new Temperature("System", 2)); - f.Add(new Fan("System Fan", 0)); - f.Add(new Fan("CPU Fan", 1)); - f.Add(new Fan("Auxiliary Fan", 2)); - f.Add(new Fan("Auxiliary Fan #2", 4)); + case Chip.NCT6776F: + switch (manufacturer) { + case Manufacturer.ASUS: + switch (model) { + case Model.P8P67_PRO: // NCT6776F + v.Add(new Voltage("CPU VCore", 0)); + v.Add(new Voltage("Voltage #2", 1, true)); + v.Add(new Voltage("AVCC", 2, 34, 34)); + v.Add(new Voltage("3VCC", 3, 34, 34)); + v.Add(new Voltage("Voltage #5", 4, true)); + v.Add(new Voltage("Voltage #6", 5, true)); + v.Add(new Voltage("Voltage #7", 6, true)); + v.Add(new Voltage("3VSB", 7, 34, 34)); + v.Add(new Voltage("VBAT", 8, 34, 34)); + t.Add(new Temperature("CPU", 0)); + t.Add(new Temperature("Auxiliary", 1)); + t.Add(new Temperature("System", 2)); + f.Add(new Fan("System Fan", 0)); + f.Add(new Fan("CPU Fan", 1)); + f.Add(new Fan("Auxiliary Fan", 2)); + f.Add(new Fan("Auxiliary Fan #2", 3)); + f.Add(new Fan("Auxiliary Fan #3", 4)); + break; + default: + v.Add(new Voltage("CPU VCore", 0)); + v.Add(new Voltage("Voltage #2", 1, true)); + v.Add(new Voltage("AVCC", 2, 34, 34)); + v.Add(new Voltage("3VCC", 3, 34, 34)); + v.Add(new Voltage("Voltage #5", 4, true)); + v.Add(new Voltage("Voltage #6", 5, true)); + v.Add(new Voltage("Voltage #7", 6, true)); + v.Add(new Voltage("3VSB", 7, 34, 34)); + v.Add(new Voltage("VBAT", 8, 34, 34)); + t.Add(new Temperature("CPU", 0)); + t.Add(new Temperature("Auxiliary", 1)); + t.Add(new Temperature("System", 2)); + for (int i = 0; i < superIO.Fans.Length; i++) + f.Add(new Fan("Fan #" + (i + 1), i)); + break; + } + break; + default: + v.Add(new Voltage("CPU VCore", 0)); + v.Add(new Voltage("Voltage #2", 1, true)); + v.Add(new Voltage("AVCC", 2, 34, 34)); + v.Add(new Voltage("3VCC", 3, 34, 34)); + v.Add(new Voltage("Voltage #5", 4, true)); + v.Add(new Voltage("Voltage #6", 5, true)); + v.Add(new Voltage("Voltage #7", 6, true)); + v.Add(new Voltage("3VSB", 7, 34, 34)); + v.Add(new Voltage("VBAT", 8, 34, 34)); + t.Add(new Temperature("CPU", 0)); + t.Add(new Temperature("Auxiliary", 1)); + t.Add(new Temperature("System", 2)); + for (int i = 0; i < superIO.Fans.Length; i++) + f.Add(new Fan("Fan #" + (i + 1), i)); + break; + } break; default: for (int i = 0; i < superIO.Voltages.Length; i++)