Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
7938882
Added support for Nuvoton NCT6793D chip. Tested on Asus ASUS Z170 Pro…
dernerv Dec 6, 2016
ba57a73
Added support for Apollo Lake Intel processors family
akc-kyiv Jan 27, 2017
b158aba
add temp support for the AMD Athlon X4 845
rmattuschka Mar 6, 2017
2406fb0
Add Gigabyte X79-UD3 rev 1.0 support
MinerCrafter Jul 13, 2017
6c0e00b
Add support for Nuvoton NCT6795D
valpackett Jul 16, 2017
687745d
Adjust +3v SB for X79-UD3
MinerCrafter Jul 17, 2017
29b5aa8
Update SuperIOHardware.cs
MinerCrafter Jul 17, 2017
90b7fa0
Merge pull request #1 from myfreeweb/nct6795d
dernerv Jul 17, 2017
38d6779
Merge pull request #1 from cobrafast/master
Phyxion Aug 7, 2017
6ad9b79
Merge pull request #2 from MinerCrafter/Patch
Phyxion Aug 7, 2017
182e0b6
Merge pull request #3 from rmattuschka/patch-2
Phyxion Aug 7, 2017
37f7f87
Merge pull request #4 from akc-kyiv/master
Phyxion Aug 7, 2017
6e74850
Merge branch 'pr/5'
PhyxionNL Aug 7, 2017
94d306f
Merge branch 'pr/6'
PhyxionNL Aug 7, 2017
9c5d1ed
P8P67 REV 3.1 support
PhyxionNL Aug 7, 2017
dd653c6
Updated .gitignore.
PhyxionNL Aug 8, 2017
027f355
Merge branch 'pr/7'
PhyxionNL Aug 8, 2017
c8e545a
Merge pull request #1 from Phyxion/master
Aug 10, 2017
6f4fb5f
Create README.md
Aug 10, 2017
31dd8dc
Create travis.yml
Aug 10, 2017
a734a30
Rename travis.yml to .travis.yml
Aug 10, 2017
3b3f1b3
Update OpenHardwareMonitor.csproj
Phyxion Aug 10, 2017
85edd08
Ignore Bin and Obj in subdirectories
dwilhelm Aug 10, 2017
3fa5a5d
Build on appveyor
DDRBoxman Aug 10, 2017
f37821b
Fix case for paths in Resources
dwilhelm Aug 10, 2017
d1de4a1
Use project references instead of tracking binaries
dwilhelm Aug 10, 2017
8a24e36
Merge pull request #2 from DDRBoxman/appveyor
Aug 12, 2017
ed1b20f
Update README.md
Aug 12, 2017
140b168
Merge pull request #3 from dwilhelm/external
Phyxion Aug 12, 2017
ff37c9f
Scale TreeViewAdv elements based on DPI
dwilhelm Aug 10, 2017
bbed59a
Merge pull request #4 from dwilhelm/libre
Phyxion Aug 17, 2017
8b7e55c
Adding support for Fan control on IT8260E
Maddimax Sep 16, 2017
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
*.user
*.suo
/Bin
/Obj
Bin/
Obj/
.vs/
2 changes: 2 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
language: csharp
solution: OpenHardwareMonitor.sln
Binary file removed External/Aga.Controls.dll
Binary file not shown.
6 changes: 3 additions & 3 deletions External/Aga.Controls/Properties/Resources.resx
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@
<value>..\Resources\check.bmp;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="DVSplit" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\resources\dvsplit.cur;System.Byte[], mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
<value>..\Resources\DVSplit.cur;System.Byte[], mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="Folder" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\Folder.bmp;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
Expand All @@ -131,7 +131,7 @@
<value>..\Resources\FolderClosed.bmp;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="Leaf" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\resources\leaf.bmp;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
<value>..\Resources\Leaf.bmp;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="loading_icon" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\loading_icon;System.Byte[], mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
Expand All @@ -146,6 +146,6 @@
<value>..\Resources\uncheck.bmp;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="unknown" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\resources\unknown.bmp;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
<value>..\Resources\unknown.bmp;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
</root>
8 changes: 6 additions & 2 deletions External/Aga.Controls/Tree/NodeControls/NodeCheckBox.cs
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,9 @@ public NodeCheckBox(string propertyName)

public override Size MeasureSize(TreeNodeAdv node, DrawContext context)
{
return new Size(ImageSize, ImageSize);
int scaledX = node.Tree.GetScaledSize(ImageSize, false);
int scaledY = node.Tree.GetScaledSize(ImageSize);
return new Size(scaledX, scaledY);
}

public override void Draw(TreeNodeAdv node, DrawContext context)
Expand All @@ -56,13 +58,15 @@ public override void Draw(TreeNodeAdv node, DrawContext context)
if (Application.RenderWithVisualStyles)
{
VisualStyleRenderer renderer;
int scaledX = node.Tree.GetScaledSize(ImageSize, false);
int scaledY = node.Tree.GetScaledSize(ImageSize);
if (state == CheckState.Indeterminate)
renderer = new VisualStyleRenderer(VisualStyleElement.Button.CheckBox.MixedNormal);
else if (state == CheckState.Checked)
renderer = new VisualStyleRenderer(VisualStyleElement.Button.CheckBox.CheckedNormal);
else
renderer = new VisualStyleRenderer(VisualStyleElement.Button.CheckBox.UncheckedNormal);
renderer.DrawBackground(context.Graphics, new Rectangle(bounds.X, bounds.Y, ImageSize, ImageSize));
renderer.DrawBackground(context.Graphics, new Rectangle(bounds.X, bounds.Y, scaledX, scaledY));
}
else
{
Expand Down
8 changes: 7 additions & 1 deletion External/Aga.Controls/Tree/NodeControls/NodeIcon.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,15 @@ public override Size MeasureSize(TreeNodeAdv node, DrawContext context)
{
Image image = GetIcon(node);
if (image != null)
return image.Size;
{
int scaledX = node.Tree.GetScaledSize(image.Size.Width, false);
int scaledY = node.Tree.GetScaledSize(image.Size.Height);
return new Size(scaledX, scaledY); ;
}
else
{
return Size.Empty;
}
}


Expand Down
10 changes: 7 additions & 3 deletions External/Aga.Controls/Tree/NodeControls/NodePlusMinus.cs
Original file line number Diff line number Diff line change
Expand Up @@ -46,23 +46,27 @@ public NodePlusMinus()

public override Size MeasureSize(TreeNodeAdv node, DrawContext context)
{
return new Size(Width, Width);
int scaledX = node.Tree.GetScaledSize(Width, false);
int scaledY = node.Tree.GetScaledSize(Width);
return new Size(scaledX, scaledY);
}

public override void Draw(TreeNodeAdv node, DrawContext context)
{
if (node.CanExpand)
{
Rectangle r = context.Bounds;
int dy = (int)Math.Round((float)(r.Height - ImageSize) / 2);
int scaledX = node.Tree.GetScaledSize(ImageSize, false);
int scaledY = node.Tree.GetScaledSize(ImageSize);
int dy = (int)Math.Round((float)(r.Height - scaledY) / 2);
if (Application.RenderWithVisualStyles)
{
VisualStyleRenderer renderer;
if (node.IsExpanded)
renderer = OpenedRenderer;
else
renderer = ClosedRenderer;
renderer.DrawBackground(context.Graphics, new Rectangle(r.X, r.Y + dy, ImageSize, ImageSize));
renderer.DrawBackground(context.Graphics, new Rectangle(r.X, r.Y + dy, scaledX, scaledY));
}
else
{
Expand Down
5 changes: 3 additions & 2 deletions External/Aga.Controls/Tree/TreeViewAdv.Draw.cs
Original file line number Diff line number Diff line change
Expand Up @@ -259,8 +259,9 @@ private void DrawLines(Graphics gr, TreeNodeAdv node, Rectangle rowRect)
while (curNode != _root && curNode != null)
{
int level = curNode.Level;
int x = (level - 1) * _indent + NodePlusMinus.ImageSize / 2 + LeftMargin;
int width = NodePlusMinus.Width - NodePlusMinus.ImageSize / 2;
int scaledIndent = node.Tree.GetScaledSize(_indent, false);
int x = (level - 1) * scaledIndent + NodePlusMinus.ImageSize / 2 + LeftMargin;
int width = node.Tree.GetScaledSize(NodePlusMinus.Width - NodePlusMinus.ImageSize / 2, false);
int y = rowRect.Y;
int y2 = y + rowRect.Height;

Expand Down
52 changes: 50 additions & 2 deletions External/Aga.Controls/Tree/TreeViewAdv.cs
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,11 @@ public partial class TreeViewAdv : Control
private List<TreeNodeAdv> _expandingNodes = new List<TreeNodeAdv>();
private AbortableThreadPool _threadPool = new AbortableThreadPool();

private float dpiX;
private float dpiY;
private float dpiXscale = 1;
private float dpiYscale = 1;

#region Public Events

[Category("Action")]
Expand Down Expand Up @@ -204,6 +209,7 @@ protected virtual void OnDropNodeValidating(Point point, ref TreeNodeAdv node)
public TreeViewAdv()
{
InitializeComponent();
SetDPI();
SetStyle(ControlStyles.AllPaintingInWmPaint
| ControlStyles.UserPaint
| ControlStyles.OptimizedDoubleBuffer
Expand All @@ -216,6 +222,7 @@ public TreeViewAdv()
_columnHeaderHeight = 20;
else
_columnHeaderHeight = 17;
_columnHeaderHeight = GetScaledSize(_columnHeaderHeight);

//BorderStyle = BorderStyle.Fixed3D;
_hScrollBar.Height = SystemInformation.HorizontalScrollBarHeight;
Expand Down Expand Up @@ -245,6 +252,46 @@ public TreeViewAdv()
ExpandingIcon.IconChanged += ExpandingIconChanged;
}

public void SetDPI()
{
// https://msdn.microsoft.com/en-us/library/windows/desktop/dn469266(v=vs.85).aspx
const int _default_dpi = 96;
Graphics g = this.CreateGraphics();

try
{
this.dpiX = g.DpiX;
this.dpiY = g.DpiY;
}
finally
{
g.Dispose();
}
if (dpiX > 0)
{
this.dpiXscale = dpiX / _default_dpi;
}
if (dpiY > 0)
{
this.dpiYscale = dpiY / _default_dpi;
}
}

public int GetScaledSize(int size, bool useY = true)
{
int scaledsize = size;

if (useY && this.dpiYscale > 1)
{
scaledsize = (int)(this.dpiYscale * size);
}
else if (this.dpiXscale > 1)
{
scaledsize = (int)(this.dpiXscale * size);
}
return scaledsize;
}

void ExpandingIconChanged(object sender, EventArgs e)
{
if (IsHandleCreated && !IsDisposed)
Expand Down Expand Up @@ -543,11 +590,12 @@ internal IEnumerable<NodeControlInfo> GetNodeControls(TreeNodeAdv node, Rectangl
if (node == null)
yield break;

int scaledIndent = node.Tree.GetScaledSize(_indent, false);
int y = rowRect.Y;
int x = (node.Level - 1) * _indent + LeftMargin;
int x = (node.Level - 1) * scaledIndent + LeftMargin;
int width = 0;
if (node.Row == 0 && ShiftFirstNode)
x -= _indent;
x -= scaledIndent;
Rectangle rect = Rectangle.Empty;

if (ShowPlusMinus)
Expand Down
Binary file removed External/OxyPlot.WindowsForms.dll
Binary file not shown.
Binary file removed External/OxyPlot.dll
Binary file not shown.
17 changes: 17 additions & 0 deletions Hardware/CPU/AMD10CPU.cs
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,16 @@ internal sealed class AMD10CPU : AMDCPU {
private const ushort FAMILY_15H_MODEL_00_MISC_CONTROL_DEVICE_ID = 0x1603;
private const ushort FAMILY_15H_MODEL_10_MISC_CONTROL_DEVICE_ID = 0x1403;
private const ushort FAMILY_15H_MODEL_30_MISC_CONTROL_DEVICE_ID = 0x141D;
private const ushort FAMILY_15H_MODEL_60_MISC_CONTROL_DEVICE_ID = 0x1573;
private const ushort FAMILY_16H_MODEL_00_MISC_CONTROL_DEVICE_ID = 0x1533;
private const ushort FAMILY_16H_MODEL_30_MISC_CONTROL_DEVICE_ID = 0x1583;
private const ushort FAMILY_17H_MODEL_00_MISC_CONTROL_DEVICE_ID = 0x1577;

private const uint REPORTED_TEMPERATURE_CONTROL_REGISTER = 0xA4;
private const uint CLOCK_POWER_TIMING_CONTROL_0_REGISTER = 0xD4;

private const uint F15H_M60H_REPORTED_TEMP_CTRL_OFFSET = 0xD8200CA4;

private readonly uint miscellaneousControlAddress;
private readonly ushort miscellaneousControlDeviceId;

Expand Down Expand Up @@ -79,6 +83,8 @@ public AMD10CPU(int processorIndex, CPUID[][] cpuid, ISettings settings)
FAMILY_15H_MODEL_10_MISC_CONTROL_DEVICE_ID; break;
case 0x30: miscellaneousControlDeviceId =
FAMILY_15H_MODEL_30_MISC_CONTROL_DEVICE_ID; break;
case 0x60: miscellaneousControlDeviceId =
FAMILY_15H_MODEL_60_MISC_CONTROL_DEVICE_ID; break;
default: miscellaneousControlDeviceId = 0; break;
} break;
case 0x16:
Expand All @@ -89,6 +95,8 @@ public AMD10CPU(int processorIndex, CPUID[][] cpuid, ISettings settings)
FAMILY_16H_MODEL_30_MISC_CONTROL_DEVICE_ID; break;
default: miscellaneousControlDeviceId = 0; break;
} break;
case 0x17: miscellaneousControlDeviceId =
FAMILY_17H_MODEL_00_MISC_CONTROL_DEVICE_ID; break;
default: miscellaneousControlDeviceId = 0; break;
}

Expand Down Expand Up @@ -304,6 +312,15 @@ public override void Update() {
if (temperatureStream == null) {
if (miscellaneousControlAddress != Ring0.InvalidPciAddress) {
uint value;
if (miscellaneousControlAddress == FAMILY_15H_MODEL_60_MISC_CONTROL_DEVICE_ID) {
value = F15H_M60H_REPORTED_TEMP_CTRL_OFFSET;
Ring0.WritePciConfig(Ring0.GetPciAddress(0, 0, 0), 0xB8, value);
Ring0.ReadPciConfig(Ring0.GetPciAddress(0, 0, 0), 0xBC, out value);
coreTemperature.Value = ((value >> 21) & 0x7FF) * 0.125f +
coreTemperature.Parameters[0].Value;
ActivateSensor(coreTemperature);
return;
}
if (Ring0.ReadPciConfig(miscellaneousControlAddress,
REPORTED_TEMPERATURE_CONTROL_REGISTER, out value)) {
if (family == 0x15 && (value & 0x30000) == 0x30000) {
Expand Down
1 change: 1 addition & 0 deletions Hardware/CPU/CPUGroup.cs
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@ public CPUGroup(ISettings settings) {
case 0x14:
case 0x15:
case 0x16:
case 0x17:
hardware.Add(new AMD10CPU(index, coreThreads, settings));
break;
default:
Expand Down
12 changes: 10 additions & 2 deletions Hardware/CPU/IntelCPU.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@ private enum Microarchitecture {
Silvermont,
Skylake,
Airmont,
KabyLake
KabyLake,
ApolloLake
}

private readonly Sensor[] coreTemperatures;
Expand Down Expand Up @@ -183,6 +184,10 @@ public IntelCPU(int processorIndex, CPUID[][] cpuid, ISettings settings)
microarchitecture = Microarchitecture.KabyLake;
tjMax = GetTjMaxFromMSR();
break;
case 0x5C: // Intel ApolloLake
microarchitecture = Microarchitecture.ApolloLake;
tjMax = GetTjMaxFromMSR();
break;
default:
microarchitecture = Microarchitecture.Unknown;
tjMax = Floats(100);
Expand Down Expand Up @@ -231,6 +236,7 @@ public IntelCPU(int processorIndex, CPUID[][] cpuid, ISettings settings)
case Microarchitecture.Silvermont:
case Microarchitecture.Skylake:
case Microarchitecture.Airmont:
case Microarchitecture.ApolloLake:
case Microarchitecture.KabyLake: {
uint eax, edx;
if (Ring0.Rdmsr(MSR_PLATFORM_INFO, out eax, out edx)) {
Expand Down Expand Up @@ -295,7 +301,8 @@ public IntelCPU(int processorIndex, CPUID[][] cpuid, ISettings settings)
microarchitecture == Microarchitecture.Skylake ||
microarchitecture == Microarchitecture.Silvermont ||
microarchitecture == Microarchitecture.Airmont ||
microarchitecture == Microarchitecture.KabyLake)
microarchitecture == Microarchitecture.KabyLake ||
microarchitecture == Microarchitecture.ApolloLake)
{
powerSensors = new Sensor[energyStatusMSRs.Length];
lastEnergyTime = new DateTime[energyStatusMSRs.Length];
Expand Down Expand Up @@ -413,6 +420,7 @@ public override void Update() {
case Microarchitecture.Broadwell:
case Microarchitecture.Silvermont:
case Microarchitecture.Skylake:
case Microarchitecture.ApolloLake:
case Microarchitecture.KabyLake: {
uint multiplier = (eax >> 8) & 0xff;
coreClocks[i].Value = (float)(multiplier * newBusClock);
Expand Down
6 changes: 6 additions & 0 deletions Hardware/LPC/Chip.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ internal enum Chip : ushort {

IT8620E = 0x8620,
IT8628E = 0x8628,
IT8686E = 0x8686,
IT8705F = 0x8705,
IT8712F = 0x8712,
IT8716F = 0x8716,
Expand All @@ -43,6 +44,8 @@ internal enum Chip : ushort {
NCT610X = 0xC452,
NCT6779D = 0xC560,
NCT6791D = 0xC803,
NCT6793D = 0xD121,
NCT6795D = 0xD352,
NCT6796D = 0xD423,

W83627DHG = 0xA020,
Expand Down Expand Up @@ -75,6 +78,7 @@ public static string GetName(Chip chip) {

case Chip.IT8620E: return "ITE IT8620E";
case Chip.IT8628E: return "ITE IT8628E";
case Chip.IT8686E: return "ITE IT8686E";
case Chip.IT8705F: return "ITE IT8705F";
case Chip.IT8712F: return "ITE IT8712F";
case Chip.IT8716F: return "ITE IT8716F";
Expand All @@ -92,6 +96,8 @@ public static string GetName(Chip chip) {
case Chip.NCT6776F: return "Nuvoton NCT6776F";
case Chip.NCT6779D: return "Nuvoton NCT6779D";
case Chip.NCT6791D: return "Nuvoton NCT6791D";
case Chip.NCT6793D: return "Nuvoton NCT6793D";
case Chip.NCT6795D: return "Nuvoton NCT6795D";
case Chip.NCT6796D: return "Nuvoton NCT6796D";

case Chip.W83627DHG: return "Winbond W83627DHG";
Expand Down
Loading