Skip to content

Commit

Permalink
Bug fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
JamesCJ60 committed Sep 17, 2022
1 parent 5974f7b commit 7dfc110
Show file tree
Hide file tree
Showing 5 changed files with 62 additions and 50 deletions.
6 changes: 3 additions & 3 deletions App.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,16 @@
using System.Collections.Generic;
using System.Configuration;
using System.Data;
using System.Diagnostics;
using System.Linq;
using System.Threading.Tasks;
using System.Windows;

namespace AATUV3
{
/// <summary>
/// Lógica de interacción para App.xaml
/// </summary>

public partial class App : Application
{

}
}
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 @@
<Button Style="{DynamicResource RoundedButtonStyle}" Margin="440,397,160,33" Background="{DynamicResource PrimaryBlueColor}" 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.0.0 Beta 5.1"/>
<Run Text="Universal x86 Tuning Utility - V1.0.0 Beta 5.2"/>
<LineBreak/>
<Run Text="Created by JamesCJ, sbski, and ProjectSBC"/>
</TextBlock>
Expand Down
4 changes: 2 additions & 2 deletions Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -51,5 +51,5 @@
// Puede especificar todos los valores o usar los valores predeterminados de número de compilación y de revisión
// utilizando el carácter "*", como se muestra a continuación:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyVersion("1.0.0.1")]
[assembly: AssemblyFileVersion("1.0.0.1")]
98 changes: 55 additions & 43 deletions Scripts/SMU Backend Scripts/Addresses.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,23 +31,23 @@ public static void SetAddresses()

if (FAMID == 0 || FAMID == 1 || FAMID == 2 || FAMID == 3 || FAMID == 7)
{
RyzenSmu.Smu.MP1_ADDR_MSG = 0x03B10528;
RyzenSmu.Smu.MP1_ADDR_RSP = 0x03B10564;
RyzenSmu.Smu.MP1_ADDR_ARG = 0x03B10998;
RyzenSmu.Smu.MP1_ADDR_MSG = 0x3B10528;
RyzenSmu.Smu.MP1_ADDR_RSP = 0x3B10564;
RyzenSmu.Smu.MP1_ADDR_ARG = 0x3B10998;

RyzenSmu.Smu.PSMU_ADDR_MSG = 0x03B10A20;
RyzenSmu.Smu.PSMU_ADDR_RSP = 0x03B10A80;
RyzenSmu.Smu.PSMU_ADDR_ARG = 0x03B10A88;
RyzenSmu.Smu.PSMU_ADDR_MSG = 0x3B10A20;
RyzenSmu.Smu.PSMU_ADDR_RSP = 0x3B10A80;
RyzenSmu.Smu.PSMU_ADDR_ARG = 0x3B10A88;
}
else if (FAMID == 5 || FAMID == 8)
{
RyzenSmu.Smu.MP1_ADDR_MSG = 0x03010A08;
RyzenSmu.Smu.MP1_ADDR_RSP = 0x03010A68;
RyzenSmu.Smu.MP1_ADDR_ARG = 0x03010A48;
RyzenSmu.Smu.MP1_ADDR_MSG = 0x3010A08;
RyzenSmu.Smu.MP1_ADDR_RSP = 0x3010A68;
RyzenSmu.Smu.MP1_ADDR_ARG = 0x3010A48;

RyzenSmu.Smu.PSMU_ADDR_MSG = 0x03B10A20;
RyzenSmu.Smu.PSMU_ADDR_RSP = 0x03B10A80;
RyzenSmu.Smu.PSMU_ADDR_ARG = 0x03B10A88;
RyzenSmu.Smu.PSMU_ADDR_MSG = 0x3B10a20;
RyzenSmu.Smu.PSMU_ADDR_RSP = 0x3B10a80;
RyzenSmu.Smu.PSMU_ADDR_ARG = 0x3B10a88;
}
else if (FAMID == 4 || FAMID == 6)
{
Expand All @@ -61,9 +61,9 @@ public static void SetAddresses()
}
else if(FAMID == 10)
{
RyzenSmu.Smu.MP1_ADDR_MSG = 0x03010508;
RyzenSmu.Smu.MP1_ADDR_RSP = 0x03010988;
RyzenSmu.Smu.MP1_ADDR_ARG = 0x03010984;
RyzenSmu.Smu.MP1_ADDR_MSG = 0x3010508;
RyzenSmu.Smu.MP1_ADDR_RSP = 0x3010988;
RyzenSmu.Smu.MP1_ADDR_ARG = 0x3010984;

RyzenSmu.Smu.PSMU_ADDR_MSG = 0;
RyzenSmu.Smu.PSMU_ADDR_RSP = 0;
Expand Down Expand Up @@ -113,21 +113,28 @@ await Task.Run(() =>
uint msg3 = 0x0;

//set SMU message address
if (Families.FAMID == 0 || Families.FAMID == 1 || Families.FAMID == 2)
{
msg1 = 0xc;
msg2 = 0xb;
msg3 = 0x3d;
}
//if (Families.FAMID == 0 || Families.FAMID == 1 || Families.FAMID == 2)
//{
// msg1 = 0xc;
// msg2 = 0xb;
// msg3 = 0x3d;
//}


if (Families.FAMID == 3 || Families.FAMID == 7 || Families.FAMID == 5 || Families.FAMID == 8)
if (Families.FAMID == 3 || Families.FAMID == 7 || Families.FAMID == 8)
{
msg1 = 0x6;
msg2 = 0x66;
msg3 = 0x65;
}

if (Families.FAMID == 5)
{
msg1 = 0x14;
msg2 = 0x13;
msg3 = 0x65;
}

if (Families.FAMID == 4 || Families.FAMID == 6)
{
msg1 = 0x8;
Expand Down Expand Up @@ -173,18 +180,24 @@ public static void DumpPMTableWithSensors()
uint msg3 = 0x0;

//set SMU message address
if (Families.FAMID == 0 || Families.FAMID == 1 || Families.FAMID == 2)
{
msg1 = 0xc;
msg2 = 0xb;
msg3 = 0x3d;
}
if (Families.FAMID == 3 || Families.FAMID == 7 || Families.FAMID == 5 || Families.FAMID == 8)
//if (Families.FAMID == 0 || Families.FAMID == 1 || Families.FAMID == 2)
//{
// msg1 = 0xc;
// msg2 = 0xb;
// msg3 = 0x3d;
//}
if (Families.FAMID == 3 || Families.FAMID == 7 || Families.FAMID == 8)
{
msg1 = 0x6;
msg2 = 0x66;
msg3 = 0x65;
}
if (Families.FAMID == 5)
{
msg1 = 0x14;
msg2 = 0x13;
msg3 = 0x65;
}
if (Families.FAMID == 4 || Families.FAMID == 6)
{
msg1 = 0x8;
Expand All @@ -205,8 +218,8 @@ public static void DumpPMTableWithSensors()
{
//Set Address and reset Args[]
Address = Args[0];
if (Families.FAMID == 0 || Families.FAMID == 1 || Families.FAMID == 2) Args[0] = 3;
else Args[0] = Convert.ToUInt32(PMTLoop);
//if (Families.FAMID == 0 || Families.FAMID == 1 || Families.FAMID == 2) Args[0] = 3;
//else Args[0] = Convert.ToUInt32(PMTLoop);
//Dump the Power Monitoring Table
RyzenAccess.SendPsmu(msg3, ref Args);
//Sleep so that the SMU has time to dump the PM Table properly.
Expand Down Expand Up @@ -248,13 +261,7 @@ public static void DumpPMTableWithSensors()
}
TableDump[5 + i] = $"0x{i:X4}\t{CurrentValue:F4}";
}
File.WriteAllLines($"PMTableDumpWithSensors{PMTLoop.ToString()}.log", TableDump);

if(PMTLoop < 6 && Families.FAMID == 8)
{
PMTLoop++;
DumpPMTableWithSensors();
}
File.WriteAllLines($"PMTableDumpWithSensors.log", TableDump);
}
}

Expand All @@ -267,20 +274,25 @@ await Task.Run(() =>
uint msg3 = 0x0;

//set SMU message address
if (Families.FAMID == 0 || Families.FAMID == 1 || Families.FAMID == 2)
//if (Families.FAMID == 0 || Families.FAMID == 1 || Families.FAMID == 2)
//{
// msg3 = 0x3d;
//}
if (Families.FAMID == 3 || Families.FAMID == 7 || Families.FAMID == 8)
{
msg3 = 0x3d;
msg3 = 0x65;
}
if (Families.FAMID == 3 || Families.FAMID == 7 || Families.FAMID == 5 || Families.FAMID == 8)

if(Families.FAMID == 5)
{
msg3 = 0x65;
}

Args = new uint[6];
RyzenAccess = new Smu(EnableDebug);
RyzenAccess.Initialize();
if (Families.FAMID == 0 || Families.FAMID == 1 || Families.FAMID == 2) Args[0] = 3;
else Args[0] = 0;
//if (Families.FAMID == 0 || Families.FAMID == 1 || Families.FAMID == 2) Args[0] = 3;
//else Args[0] = 0;
RyzenAccess.SendPsmu(msg3, ref Args);
Thread.Sleep(500);
RyzenAccess.Deinitialize();
Expand Down
2 changes: 1 addition & 1 deletion Scripts/SMU Backend Scripts/RyzenSmu.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
using OpenLibSys;
using System.Reflection;
using RyzenSMUBackend;
using UXTU.Properties;

[assembly: CLSCompliant(false)]

Expand Down Expand Up @@ -78,7 +79,6 @@ public void SetBaseAddress(uint MemoryAddress)
}
class Smu
{

[DllImport("inpoutx64.dll")]
[return: MarshalAs(UnmanagedType.Bool)]
private static extern bool GetPhysLong(UIntPtr memAddress, out uint Data);
Expand Down

0 comments on commit 7dfc110

Please sign in to comment.