示例#1
0
        public RMT()
        {
            InitializeComponent();
            upDownTctlTemp.Enabled        = false;
            upDownStapmLimit.Enabled      = false;
            upDownSlowTime.Enabled        = false;
            upDownStapmTime.Enabled       = false;
            upDownCurrentLimit.Enabled    = false;
            upDownSlowLimit.Enabled       = false;
            upDownFastLimit.Enabled       = false;
            upDownMaxCurrentLimit.Enabled = false;

            labelRenoirMobileTuning.Text = "RMT v0.3.0-A";

            if (true)
            {
                Args        = new uint[6];
                RyzenAccess = new Smu();
                RyzenAccess.Initialize();
                labelRenoirMobileTuning.Text += " - " + RyzenAccess.GetCpuName();

                if (RyzenAccess.SendPsmu(0x66, ref Args) == Smu.Status.OK)
                {
                    Address = Args[0];
                    Args[0] = 0;
                    if (RyzenAccess.SendPsmu(0x65, ref Args) == Smu.Status.OK)
                    {
                        upDownStapmLimit.Value = (decimal)(Smu.ReadFloat(Address, 0x0));
                        upDownFastLimit.Value  = (decimal)(Smu.ReadFloat(Address, 0x2));
                        upDownSlowLimit.Value  = (decimal)(Smu.ReadFloat(Address, 0x4));

                        upDownSlowTime.Value  = (decimal)(Smu.ReadFloat(Address, 0x221));
                        upDownStapmTime.Value = (decimal)(Smu.ReadFloat(Address, 0x220));

                        upDownTctlTemp.Value        = (decimal)(Smu.ReadFloat(Address, 0x10));
                        upDownCurrentLimit.Value    = (decimal)(Smu.ReadFloat(Address, 0x8));
                        upDownMaxCurrentLimit.Value = (decimal)(Smu.ReadFloat(Address, 0xC));

                        //upDownSocCurrentLimit.Value = (decimal)(Smu.ReadFloat(Address, 0xA));
                        //upDownSocMaxCurrentLimit.Value = (decimal)(Smu.ReadFloat(Address, 0xE));
                    }
                }
            }
        }
示例#2
0
        public RMT()
        {
            EnableDebug = false;
            LoadValues  = true;
            InitializeComponent();
            upDownTctlTemp.Enabled        = false;
            upDownStapmLimit.Enabled      = false;
            upDownSlowTime.Enabled        = false;
            upDownStapmTime.Enabled       = false;
            upDownCurrentLimit.Enabled    = false;
            upDownSlowLimit.Enabled       = false;
            upDownFastLimit.Enabled       = false;
            upDownMaxCurrentLimit.Enabled = false;


            labelRenoirMobileTuning.Text = "RMT v1.0.4";



            if (LoadValues)
            {
                Args        = new uint[6];
                RyzenAccess = new Smu(EnableDebug);
                RyzenAccess.Initialize();
                labelRenoirMobileTuning.Text += " - " + RyzenAccess.GetCpuName();

                if (RyzenAccess.SendPsmu(0x66, ref Args) == Smu.Status.OK)
                {
                    Address = Args[0];
                    Args[0] = 0;
                    RyzenAccess.SendPsmu(0x65, ref Args);
                    float TestValue = ReadFloat(Address, (uint)768);
                    if (TestValue == 0.0)
                    {
                        PMTableVersion = 0x00370005;
                        if (RyzenAccess.SendPsmu(0x65, ref Args) == Smu.Status.OK)
                        {
                            if (EnableDebug)
                            {
                                MessageBox.Show($"Address: 0x{Address:X8} -> {TestValue:F}", "Version 0x00370005");
                            }
                            upDownStapmLimit.Value = (decimal)(Smu.ReadFloat(Address, 0x0));
                            if (EnableDebug)
                            {
                                MessageBox.Show("Loaded STAPM Limit", "1/8");
                            }

                            upDownFastLimit.Value = (decimal)(Smu.ReadFloat(Address, 0x2));
                            if (EnableDebug)
                            {
                                MessageBox.Show("Loaded Fast Limit", "2/8");
                            }

                            upDownSlowLimit.Value = (decimal)(Smu.ReadFloat(Address, 0x4));
                            if (EnableDebug)
                            {
                                MessageBox.Show("Loaded Slow Limit", "3/8");
                            }

                            upDownSlowTime.Value = (decimal)(Smu.ReadFloat(Address, 0x228));
                            if (EnableDebug)
                            {
                                MessageBox.Show("Loaded Slow PPT Time", "4/8");
                            }

                            upDownStapmTime.Value = (decimal)(Smu.ReadFloat(Address, 0x227));
                            if (EnableDebug)
                            {
                                MessageBox.Show("Loaded STAPM Time", "5/8");
                            }


                            upDownTctlTemp.Value = (decimal)(Smu.ReadFloat(Address, 0x10));
                            if (EnableDebug)
                            {
                                MessageBox.Show("Loaded Tctl Temp", "6/8");
                            }

                            upDownCurrentLimit.Value = (decimal)(Smu.ReadFloat(Address, 0x8));
                            if (EnableDebug)
                            {
                                MessageBox.Show("Loaded Current Limit", "7/8");
                            }

                            upDownMaxCurrentLimit.Value = (decimal)(Smu.ReadFloat(Address, 0xC));
                            if (EnableDebug)
                            {
                                MessageBox.Show("Loaded Max Current Limit Time", "8/8");
                            }
                        }
                        else
                        {
                            MessageBox.Show("Failed to communicate with SMU");
                        }
                    }
                    else
                    {
                        PMTableVersion = 0x00370004;
                        if (RyzenAccess.SendPsmu(0x65, ref Args) == Smu.Status.OK)
                        {
                            if (EnableDebug)
                            {
                                MessageBox.Show($"Address: 0x{Address:X8} -> {TestValue:F}", "Version 0x00370005");
                            }
                            upDownStapmLimit.Value = (decimal)(Smu.ReadFloat(Address, 0x0));
                            if (EnableDebug)
                            {
                                MessageBox.Show("Loaded STAPM Limit", "1/8");
                            }

                            upDownFastLimit.Value = (decimal)(Smu.ReadFloat(Address, 0x2));
                            if (EnableDebug)
                            {
                                MessageBox.Show("Loaded Fast Limit", "2/8");
                            }

                            upDownSlowLimit.Value = (decimal)(Smu.ReadFloat(Address, 0x4));
                            if (EnableDebug)
                            {
                                MessageBox.Show("Loaded Slow Limit", "3/8");
                            }

                            upDownSlowTime.Value = (decimal)(Smu.ReadFloat(Address, 0x221));
                            if (EnableDebug)
                            {
                                MessageBox.Show("Loaded Slow PPT Time", "4/8");
                            }

                            upDownStapmTime.Value = (decimal)(Smu.ReadFloat(Address, 0x220));
                            if (EnableDebug)
                            {
                                MessageBox.Show("Loaded STAPM Time", "5/8");
                            }


                            upDownTctlTemp.Value = (decimal)(Smu.ReadFloat(Address, 0x10));
                            if (EnableDebug)
                            {
                                MessageBox.Show("Loaded Tctl Temp", "6/8");
                            }

                            upDownCurrentLimit.Value = (decimal)(Smu.ReadFloat(Address, 0x8));
                            if (EnableDebug)
                            {
                                MessageBox.Show("Loaded Current Limit", "7/8");
                            }

                            upDownMaxCurrentLimit.Value = (decimal)(Smu.ReadFloat(Address, 0xC));
                            if (EnableDebug)
                            {
                                MessageBox.Show("Loaded Max Current Limit Time", "8/8");
                            }
                        }
                        else
                        {
                            MessageBox.Show("Failed to communicate with SMU");
                        }
                    }
                    //upDownSocCurrentLimit.Value = (decimal)(Smu.ReadFloat(Address, 0xA));
                    //upDownSocMaxCurrentLimit.Value = (decimal)(Smu.ReadFloat(Address, 0xE));
                }
            }
        }