diff --git a/Common/ZenStates-Core.dll b/Common/ZenStates-Core.dll index 04a47be..11d8516 100644 Binary files a/Common/ZenStates-Core.dll and b/Common/ZenStates-Core.dll differ diff --git a/WPF-no-themes/MainWindow.xaml.cs b/WPF-no-themes/MainWindow.xaml.cs index 8b12b3c..f7dcec6 100644 --- a/WPF-no-themes/MainWindow.xaml.cs +++ b/WPF-no-themes/MainWindow.xaml.cs @@ -397,63 +397,62 @@ private void ReadMemoryConfig() if (MEMCFG.Type == MemType.DDR4) { - - // Get APCB config from BIOS. Holds memory parameters. - BiosACPIFunction cmd = GetFunctionByIdString("Get APCB Config"); - if (cmd == null) + // Get APCB config from BIOS. Holds memory parameters. + BiosACPIFunction cmd = GetFunctionByIdString("Get APCB Config"); + if (cmd == null) { // throw new Exception("Could not get memory controller config"); // Use AOD table as an alternative path for now - BMC.Table = cpu.info.aod.Table.rawAodTable; + BMC.Table = cpu.info.aod.Table.RawAodTable; } else { byte[] apcbConfig = WMI.RunCommand(classInstance, cmd.ID); // BiosACPIFunction cmd = new BiosACPIFunction("Get APCB Config", 0x00010001); - cmd = GetFunctionByIdString("Get memory voltages"); - if (cmd != null) - { + cmd = GetFunctionByIdString("Get memory voltages"); + if (cmd != null) + { byte[] voltages = WMI.RunCommand(classInstance, cmd.ID); - // MEM_VDDIO is ushort, offset 27 - // MEM_VTT is ushort, offset 29 + // MEM_VDDIO is ushort, offset 27 + // MEM_VTT is ushort, offset 29 for (int i = 27; i <= 30; i++) - { + { byte value = voltages[i]; - if (value > 0) - apcbConfig[i] = value; - } - } + if (value > 0) + apcbConfig[i] = value; + } + } BMC.Table = apcbConfig ?? new byte[] { }; } float vdimm = Convert.ToSingle(Convert.ToDecimal(BMC.Config.MemVddio) / 1000); - if (vdimm > 0 && vdimm < 3) - { - textBoxMemVddio.Text = $"{vdimm:F4}V"; - } - else if (AsusWmi != null && AsusWmi.Status == 1) - { - AsusSensorInfo sensor = AsusWmi.FindSensorByName("DRAM Voltage"); - float temp = 0; - bool valid = sensor != null && float.TryParse(sensor.Value, out temp); + if (vdimm > 0 && vdimm < 3) + { + textBoxMemVddio.Text = $"{vdimm:F4}V"; + } + else if (AsusWmi != null && AsusWmi.Status == 1) + { + AsusSensorInfo sensor = AsusWmi.FindSensorByName("DRAM Voltage"); + float temp = 0; + bool valid = sensor != null && float.TryParse(sensor.Value, out temp); - if (valid && temp > 0 && temp < 3) - textBoxMemVddio.Text = sensor.Value; + if (valid && temp > 0 && temp < 3) + textBoxMemVddio.Text = sensor.Value; + else + labelMemVddio.IsEnabled = false; + } else + { labelMemVddio.IsEnabled = false; - } - else - { - labelMemVddio.IsEnabled = false; - } + } float vtt = Convert.ToSingle(Convert.ToDecimal(BMC.Config.MemVtt) / 1000); - if (vtt > 0) - textBoxMemVtt.Text = $"{vtt:F4}V"; - else - labelMemVtt.IsEnabled = false; + if (vtt > 0) + textBoxMemVtt.Text = $"{vtt:F4}V"; + else + labelMemVtt.IsEnabled = false; // When ProcODT is 0, then all other resistance values are 0 // Happens when one DIMM installed in A1 or A2 slot @@ -472,27 +471,27 @@ private void ReadMemoryConfig() labelAddrCmdSetup.IsEnabled = true; labelCsOdtSetup.IsEnabled = true; labelCkeSetup.IsEnabled = true; - textBoxProcODT.Text = BMC.GetProcODTString(BMC.Config.ProcODT); + textBoxProcODT.Text = BMC.GetProcODTString(BMC.Config.ProcODT); - textBoxClkDrvStren.Text = BMC.GetDrvStrenString(BMC.Config.ClkDrvStren); - textBoxAddrCmdDrvStren.Text = BMC.GetDrvStrenString(BMC.Config.AddrCmdDrvStren); - textBoxCsOdtCmdDrvStren.Text = BMC.GetDrvStrenString(BMC.Config.CsOdtCmdDrvStren); - textBoxCkeDrvStren.Text = BMC.GetDrvStrenString(BMC.Config.CkeDrvStren); + textBoxClkDrvStren.Text = BMC.GetDrvStrenString(BMC.Config.ClkDrvStren); + textBoxAddrCmdDrvStren.Text = BMC.GetDrvStrenString(BMC.Config.AddrCmdDrvStren); + textBoxCsOdtCmdDrvStren.Text = BMC.GetDrvStrenString(BMC.Config.CsOdtCmdDrvStren); + textBoxCkeDrvStren.Text = BMC.GetDrvStrenString(BMC.Config.CkeDrvStren); - textBoxRttNom.Text = BMC.GetRttString(BMC.Config.RttNom); - textBoxRttWr.Text = BMC.GetRttWrString(BMC.Config.RttWr); - textBoxRttPark.Text = BMC.GetRttString(BMC.Config.RttPark); + textBoxRttNom.Text = BMC.GetRttString(BMC.Config.RttNom); + textBoxRttWr.Text = BMC.GetRttWrString(BMC.Config.RttWr); + textBoxRttPark.Text = BMC.GetRttString(BMC.Config.RttPark); - textBoxAddrCmdSetup.Text = $"{BMC.Config.AddrCmdSetup}"; - textBoxCsOdtSetup.Text = $"{BMC.Config.CsOdtSetup}"; - textBoxCkeSetup.Text = $"{BMC.Config.CkeSetup}"; - } + textBoxAddrCmdSetup.Text = $"{BMC.Config.AddrCmdSetup}"; + textBoxCsOdtSetup.Text = $"{BMC.Config.CsOdtSetup}"; + textBoxCkeSetup.Text = $"{BMC.Config.CkeSetup}"; + } else { - if (Utils.AllZero(cpu.info.aod.Table.rawAodTable)) + if (Utils.AllZero(cpu.info.aod.Table.RawAodTable)) return; - AOD.AodData Data = cpu.info.aod.Table.Data; + AodData Data = cpu.info.aod.Table.Data; labelMemVdd.IsEnabled = true; labelMemVddq.IsEnabled = true; @@ -893,9 +892,9 @@ private void Window_Initialized(object sender, EventArgs e) SetWindowTitle(); if (cpu != null) { - labelCPU.Text = cpu.systemInfo.CpuName; - labelMB.Text = - $"{cpu.systemInfo.MbName} | BIOS {cpu.systemInfo.BiosVersion} | SMU {cpu.systemInfo.GetSmuVersionString()}"; + labelCPU.Text = cpu.systemInfo.CpuName; + labelMB.Text = + $"{cpu.systemInfo.MbName} | BIOS {cpu.systemInfo.BiosVersion} | SMU {cpu.systemInfo.GetSmuVersionString()}"; } //ShowWindow(); diff --git a/WPF-no-themes/Properties/BuildNumberTemplate.cs b/WPF-no-themes/Properties/BuildNumberTemplate.cs index 4e5c278..5e66a86 100644 --- a/WPF-no-themes/Properties/BuildNumberTemplate.cs +++ b/WPF-no-themes/Properties/BuildNumberTemplate.cs @@ -5,5 +5,5 @@ using System.Reflection; -[assembly: AssemblyVersion("1.30.1173")] -[assembly: AssemblyFileVersion("1.30.1173")] +[assembly: AssemblyVersion("1.30.1177")] +[assembly: AssemblyFileVersion("1.30.1177")] diff --git a/WPF/MainWindow.xaml.cs b/WPF/MainWindow.xaml.cs index bc3e1df..05601b7 100644 --- a/WPF/MainWindow.xaml.cs +++ b/WPF/MainWindow.xaml.cs @@ -74,24 +74,24 @@ public MainWindow() MessageBoxImage.Warning ); } - /* else if (cpu.info.codeName.Equals(Cpu.CodeName.Rembrandt) && !settings.NotifiedRembrandt.Equals(AssemblyVersion)) - { - MessageBox.Show( - "DDR5 support is experimental and Advanced mode is not supported yet." - + Environment.NewLine - + Environment.NewLine - + "You can still enable it in Tools -> Options, but it will most probably fail." - + Environment.NewLine - + Environment.NewLine - + "If you're not able to turn off the Advanced mode from the UI, edit settings.xml manually and set AdvancedMode to 'false'. " - + "You can also delete settings.xml file and it will be regenerated on next application launch.", - "Limited Support", - MessageBoxButton.OK, - MessageBoxImage.Information); - settings.AdvancedMode = false; - settings.NotifiedRembrandt = AssemblyVersion; - settings.Save(); - }*/ + /* else if (cpu.info.codeName.Equals(Cpu.CodeName.Rembrandt) && !settings.NotifiedRembrandt.Equals(AssemblyVersion)) + { + MessageBox.Show( + "DDR5 support is experimental and Advanced mode is not supported yet." + + Environment.NewLine + + Environment.NewLine + + "You can still enable it in Tools -> Options, but it will most probably fail." + + Environment.NewLine + + Environment.NewLine + + "If you're not able to turn off the Advanced mode from the UI, edit settings.xml manually and set AdvancedMode to 'false'. " + + "You can also delete settings.xml file and it will be regenerated on next application launch.", + "Limited Support", + MessageBoxButton.OK, + MessageBoxImage.Information); + settings.AdvancedMode = false; + settings.NotifiedRembrandt = AssemblyVersion; + settings.Save(); + }*/ IconSource = GetIcon("pack://application:,,,/ZenTimings;component/Resources/ZenTimings2022.ico", 16); _notifyIcon = GetTrayIcon(); @@ -431,7 +431,7 @@ private void ReadMemoryConfig() { // throw new Exception("Could not get memory controller config"); // Use AOD table as an alternative path for now - BMC.Table = cpu.info.aod.Table.rawAodTable; + BMC.Table = cpu.info.aod.Table.RawAodTable; } else { @@ -517,10 +517,10 @@ private void ReadMemoryConfig() } else { - if (cpu.info.aod == null || Utils.AllZero(cpu.info.aod.Table.rawAodTable)) + if (cpu.info.aod == null || Utils.AllZero(cpu.info.aod.Table.RawAodTable)) return; - AOD.AodData Data = cpu.info.aod.Table.Data; + AodData Data = cpu.info.aod.Table.Data; labelMemVdd.IsEnabled = true; labelMemVddq.IsEnabled = true; @@ -750,7 +750,7 @@ private bool WaitForPowerTable() { if (cpu.powerTable == null || cpu.powerTable.DramBaseAddress == 0) { - HandleError("Could not initialize power table.\nClose the application and try again."); + HandleError("Could not initialize power table.\n\nClose the application and try again. If the issue persists, you might want to try a system restart."); return false; } diff --git a/WPF/Properties/BuildNumberTemplate.cs b/WPF/Properties/BuildNumberTemplate.cs index 4e5c278..5e66a86 100644 --- a/WPF/Properties/BuildNumberTemplate.cs +++ b/WPF/Properties/BuildNumberTemplate.cs @@ -5,5 +5,5 @@ using System.Reflection; -[assembly: AssemblyVersion("1.30.1173")] -[assembly: AssemblyFileVersion("1.30.1173")] +[assembly: AssemblyVersion("1.30.1177")] +[assembly: AssemblyFileVersion("1.30.1177")] diff --git a/WPF/Windows/Changelog.xaml b/WPF/Windows/Changelog.xaml index b157543..9b7cacc 100644 --- a/WPF/Windows/Changelog.xaml +++ b/WPF/Windows/Changelog.xaml @@ -25,17 +25,14 @@ - + - - - - - - - - - + + + + + + diff --git a/WPF/Windows/DebugDialog.xaml.cs b/WPF/Windows/DebugDialog.xaml.cs index 5e65a8a..85f6e13 100644 --- a/WPF/Windows/DebugDialog.xaml.cs +++ b/WPF/Windows/DebugDialog.xaml.cs @@ -268,8 +268,8 @@ private void Debug() AddHeading("ACPI: Raw AOD Table"); try { - for (var i = 0; i < CPU.info.aod.Table.rawAodTable.Length; ++i) - AddLine($"Index {i:D3}: {CPU.info.aod.Table.rawAodTable[i]:X2} ({CPU.info.aod.Table.rawAodTable[i]})"); + for (var i = 0; i < CPU.info.aod.Table.RawAodTable.Length; ++i) + AddLine($"Index {i:D3}: {CPU.info.aod.Table.RawAodTable[i]:X2} ({CPU.info.aod.Table.RawAodTable[i]})"); } catch { diff --git a/WPF/Windows/SystemInfoWindow.xaml.cs b/WPF/Windows/SystemInfoWindow.xaml.cs index 671edcd..590af5c 100644 --- a/WPF/Windows/SystemInfoWindow.xaml.cs +++ b/WPF/Windows/SystemInfoWindow.xaml.cs @@ -19,7 +19,7 @@ private class GridItem public string Value { get; set; } } - public SystemInfoWindow(SystemInfo si, MemoryConfig mc, Resistances mcConfig, AOD.AodData aodData, List asusSensors) + public SystemInfoWindow(SystemInfo si, MemoryConfig mc, Resistances mcConfig, AodData aodData, List asusSensors) { InitializeComponent(); Type type = si.GetType();