Add VangoghGPU SMU controller with CPU and GPU clock frequency control

This commit is contained in:
Kamil Trzciński 2022-11-15 15:42:05 +01:00
parent 9eba0239a1
commit a3a25bfb4e
11 changed files with 816 additions and 39 deletions

View file

@ -7,7 +7,7 @@ using System.Threading.Tasks;
namespace CommonHelpers
{
internal class InpOut
public class InpOut
{
[DllImport("inpoutx64.dll", EntryPoint = "MapPhysToLin", CallingConvention = CallingConvention.StdCall)]
public static extern IntPtr MapPhysToLin(IntPtr pbPhysAddr, uint dwPhysSize, out IntPtr pPhysicalMemoryHandle);
@ -23,6 +23,12 @@ namespace CommonHelpers
[DllImport("inpoutx64.dll", EntryPoint = "DlPortWritePortUchar", CallingConvention = CallingConvention.StdCall)]
public static extern byte DlPortWritePortUchar(ushort port, byte vlaue);
[DllImport("inpoutx64.dll", CallingConvention = CallingConvention.StdCall)]
public static extern bool GetPhysLong(IntPtr pbPhysAddr, out uint physValue);
[DllImport("inpoutx64.dll", CallingConvention = CallingConvention.StdCall)]
public static extern bool SetPhysLong(IntPtr pbPhysAddr, uint physValue);
public static byte[] ReadMemory(IntPtr baseAddress, uint size)
{
IntPtr pdwLinAddr = MapPhysToLin(baseAddress, size, out IntPtr pPhysicalMemoryHandle);