private void ApplyVoltage(decimal vol, decimal min, decimal max) { int val = (int)((vol - (decimal)1.55) / (decimal) - 0.00625); decimal voltage = vol; if (val < min || val > max) { return; } if (ValueSaver.GetValue("voltage") == val) { return; } if (ApplySMUCommand(0x12, Convert.ToUInt32(val), smu.SMU_PCI_ADDR) == SMU.Status.OK) { ValueSaver.AddValue("voltage", val); SetStatus($"Set Voltage to {voltage} V.", 1); } if (dualsocketCheck.Checked) { if (ApplySMUCommand(0x12, Convert.ToUInt32(val), smu.SMU_PCI_ADDR_2) == SMU.Status.OK) { SetStatus($"Set Voltage to {voltage} V.", 2); } } }
private void ApplyFreqLock(bool check) { if (check) { if (ValueSaver.GetValue("FREQ_LOCK") == 1) { return; } if (ApplySMUCommand(0x24, 1, smu.SMU_PCI_ADDR) == SMU.Status.OK) { ValueSaver.AddValue("FREQ_LOCK", 1); SetStatus("Locked frequencies."); } if (dualsocketCheck.Checked) { if (ApplySMUCommand(0x24, 1, smu.SMU_PCI_ADDR_2) == SMU.Status.OK) { SetStatus("Locked frequencies.", 2); } } } else { if (ValueSaver.GetValue("FREQ_LOCK") == 0) { return; } if (ApplySMUCommand(0x25, 1, smu.SMU_PCI_ADDR) == SMU.Status.OK) { ValueSaver.AddValue("FREQ_LOCK", 0); SetStatus("Unlocked frequencies."); } if (dualsocketCheck.Checked) { if (ApplySMUCommand(0x25, 1, smu.SMU_PCI_ADDR_2) == SMU.Status.OK) { SetStatus("Unlocked frequencies.", 2); } } } }
/** * DO NOT USE, COULD BE DANGEROUS */ private void ApplyFullPerfSetting(int apply = 1) // 0 = false, 1 = true { if (ValueSaver.GetValue("FullPerf") == apply) { return; } if (ApplySMUCommand(0xA, Convert.ToUInt32(400), smu.SMU_PCI_ADDR) == SMU.Status.OK) { ValueSaver.AddValue("FullPerf", apply); SetStatus("Unlocked full performance."); } if (dualsocketCheck.Checked) { if (ApplySMUCommand(0xA, Convert.ToUInt32(400), smu.SMU_PCI_ADDR_2) == SMU.Status.OK) { SetStatus("Unlocked full performance.", 2); } } }
private void ApplyEDCSetting(int val, decimal min, decimal max) { if (val < min || val > max) { return; } //if (ValueSaver.GetValue("EDC") == val) return; if (ApplySMUCommand(0x55, Convert.ToUInt32(val * 1000), smu.SMU_PCI_ADDR) == SMU.Status.OK) { ValueSaver.AddValue("EDC", val); SetStatus($"Set EDC limit to {val} A."); } if (dualsocketCheck.Checked) { if (ApplySMUCommand(0x55, Convert.ToUInt32(val * 1000), smu.SMU_PCI_ADDR_2) == SMU.Status.OK) { SetStatus($"Set EDC limit to {val} A.", 2); } } }