Skip to content

Commit

Permalink
Bug fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
JamesCJ60 committed Mar 9, 2023
1 parent 4ac8f1f commit 72ecb4a
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 34 deletions.
2 changes: 1 addition & 1 deletion Pages/HomeMenu.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@
<RadioButton Style="{DynamicResource ButtonWithIcon}" Tag="{DynamicResource GitHub}" Margin="440,397,160,33" FontSize="20" Foreground="White" Content="Latest Releases" Height="70" Width="250" Click="Releases_Click"/>
<TextBlock Foreground="White" FontSize="16" Margin="1,0,0,-1.5" HorizontalAlignment="Left" VerticalAlignment="Bottom">

<Run Text="Universal x86 Tuning Utility - V1.1.0 Beta 4"/>
<Run Text="Universal x86 Tuning Utility - V1.1.0 Beta 5"/>
<LineBreak/>
<Run Text="Created by JamesCJ, sbski, and ProjectSBC"/>
</TextBlock>
Expand Down
6 changes: 3 additions & 3 deletions Pages/ProjectSnowdrop.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -232,15 +232,15 @@ public ProjectSnowdrop()
{
APUPresetToLoad = "U";
}
if (apuname.Contains("HX"))
else if (apuname.Contains("HX"))
{
APUPresetToLoad = "HX";
}
if (apuname.Contains("H") || apuname.Contains("Z"))
else if (apuname.Contains("H") || apuname.Contains("Z"))
{
APUPresetToLoad = "H-HS";
}
if (apuname.Contains("GE"))
else if (apuname.Contains("GE"))
{
APUPresetToLoad = "GE";
imgDevice.Source = new BitmapImage(new Uri(apuPreset + "\\config-DT-AM4.png"));
Expand Down
25 changes: 16 additions & 9 deletions Scripts/SMU Backend Scripts/Addresses.cs
Original file line number Diff line number Diff line change
Expand Up @@ -125,20 +125,17 @@ public static void SetAddresses()
//PHEONIX - 9
//RAPHAEL/DRAGON RANGE - 10

public async static void GetPMTableVersion()
public static void GetPMTableVersion()
{
await Task.Run(() =>
{

DumpPMTableWithSensors();
});

}

public static void DumpPMTableWithSensors()
{
try
{


uint msg1 = 0x0;
uint msg2 = 0x0;
uint msg3 = 0x0;
Expand Down Expand Up @@ -241,7 +238,7 @@ public static void DumpPMTableWithSensors()
}
Thread.Sleep(100);
}
else { Args[0] = 0;}
else { Args[0] = 0; }
TableDump.Initialize();
TableDump[0] = ($"APU/CPU Name: {Settings.Default.APUName}");
if (Families.FAMID != 10 && Families.FAMID != 0 && Families.FAMID != 2 & Families.FAMID != 3)
Expand Down Expand Up @@ -275,9 +272,10 @@ public static void DumpPMTableWithSensors()
}
catch (Exception ex) { }
}
} catch (Exception e)
}
catch (Exception e)
{
MessageBox.Show(e.ToString());

}
}

Expand Down Expand Up @@ -470,6 +468,15 @@ await Task.Run(() =>
{
try
{
if (Families.FAMID == 8 || Families.FAMID == 9 || Families.FAMID == 11)
{
Args = new uint[6];

Args[0] = Address;
//Set Address and reset Args[]
RyzenAccess.SendMp1(0xE, ref Args);
}

uint msg3 = 0x0;

//set SMU message address
Expand Down
21 changes: 0 additions & 21 deletions Scripts/SMU Backend Scripts/RyzenSmu.cs
Original file line number Diff line number Diff line change
Expand Up @@ -44,27 +44,6 @@ public static float ReadFloat(uint Address, uint Offset)
return PmData;
}

public static float ReadFloat64(ulong Address, uint Offset)
{
uint Data = 0;
try
{
GetPhysLong((UIntPtr)(Address + Offset * 4), out Data);
}
catch (Exception e)
{
String ExeptionMSG = $"Error Reading Address 0x{Address:X8} + 0x{Offset:X4} \n{e}";
MessageBox.Show(ExeptionMSG);
}

byte[] bytes = new byte[4];
bytes = BitConverter.GetBytes(Data);

float PmData = BitConverter.ToSingle(bytes, 0);
Console.WriteLine($"0x{Address + Offset * 4,8:X8} | {PmData:F}");
return PmData;
}

public enum Status : int
{
BAD = 0x0,
Expand Down

0 comments on commit 72ecb4a

Please sign in to comment.