Adjust naming conventions for Ryujinx and ChocolArm64 projects (#484)
* Change naming convention for Ryujinx project * Change naming convention for ChocolArm64 project * Fix NaN * Remove unneeded this. from Ryujinx project * Adjust naming from new PRs * Name changes based on feedback * How did this get removed? * Rebasing fix * Change FP enum case * Remove prefix from ChocolArm64 classes - Part 1 * Remove prefix from ChocolArm64 classes - Part 2 * Fix alignment from last commit's renaming * Rename namespaces * Rename stragglers * Fix alignment * Rename OpCode class * Missed a few * Adjust alignment
This commit is contained in:
parent
5a87e58183
commit
9cb57fb4bb
314 changed files with 19456 additions and 19456 deletions
|
@ -8,7 +8,7 @@ namespace Ryujinx.HLE.HOS
|
|||
public const string TemporaryNroSuffix = ".ryu_tmp.nro";
|
||||
|
||||
//http://switchbrew.org/index.php?title=Homebrew_ABI
|
||||
public static void WriteHbAbiData(AMemory Memory, long Position, int MainThreadHandle, string SwitchPath)
|
||||
public static void WriteHbAbiData(MemoryManager Memory, long Position, int MainThreadHandle, string SwitchPath)
|
||||
{
|
||||
//MainThreadHandle.
|
||||
WriteConfigEntry(Memory, ref Position, 1, 0, MainThreadHandle);
|
||||
|
@ -31,12 +31,12 @@ namespace Ryujinx.HLE.HOS
|
|||
}
|
||||
|
||||
private static void WriteConfigEntry(
|
||||
AMemory Memory,
|
||||
ref long Position,
|
||||
int Key,
|
||||
int Flags = 0,
|
||||
long Value0 = 0,
|
||||
long Value1 = 0)
|
||||
MemoryManager Memory,
|
||||
ref long Position,
|
||||
int Key,
|
||||
int Flags = 0,
|
||||
long Value0 = 0,
|
||||
long Value1 = 0)
|
||||
{
|
||||
Memory.WriteInt32(Position + 0x00, Key);
|
||||
Memory.WriteInt32(Position + 0x04, Flags);
|
||||
|
@ -46,7 +46,7 @@ namespace Ryujinx.HLE.HOS
|
|||
Position += 0x18;
|
||||
}
|
||||
|
||||
public static string ReadHbAbiNextLoadPath(AMemory Memory, long Position)
|
||||
public static string ReadHbAbiNextLoadPath(MemoryManager Memory, long Position)
|
||||
{
|
||||
string FileName = null;
|
||||
|
||||
|
@ -59,7 +59,7 @@ namespace Ryujinx.HLE.HOS
|
|||
long Value0 = Memory.ReadInt64(Position + 0x08);
|
||||
long Value1 = Memory.ReadInt64(Position + 0x10);
|
||||
|
||||
FileName = AMemoryHelper.ReadAsciiString(Memory, Value0, Value1 - Value0);
|
||||
FileName = MemoryHelper.ReadAsciiString(Memory, Value0, Value1 - Value0);
|
||||
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -8,12 +8,12 @@ namespace Ryujinx.HLE.HOS.Ipc
|
|||
static class IpcHandler
|
||||
{
|
||||
public static long IpcCall(
|
||||
Switch Ns,
|
||||
Process Process,
|
||||
AMemory Memory,
|
||||
KSession Session,
|
||||
IpcMessage Request,
|
||||
long CmdPtr)
|
||||
Switch Ns,
|
||||
Process Process,
|
||||
MemoryManager Memory,
|
||||
KSession Session,
|
||||
IpcMessage Request,
|
||||
long CmdPtr)
|
||||
{
|
||||
IpcMessage Response = new IpcMessage();
|
||||
|
||||
|
|
|
@ -24,11 +24,11 @@ namespace Ryujinx.HLE.HOS.Kernel
|
|||
}
|
||||
|
||||
public long ArbitrateLock(
|
||||
Process Process,
|
||||
AMemory Memory,
|
||||
int OwnerHandle,
|
||||
long MutexAddress,
|
||||
int RequesterHandle)
|
||||
Process Process,
|
||||
MemoryManager Memory,
|
||||
int OwnerHandle,
|
||||
long MutexAddress,
|
||||
int RequesterHandle)
|
||||
{
|
||||
System.CriticalSectionLock.Lock();
|
||||
|
||||
|
@ -80,7 +80,7 @@ namespace Ryujinx.HLE.HOS.Kernel
|
|||
return (uint)CurrentThread.ObjSyncResult;
|
||||
}
|
||||
|
||||
public long ArbitrateUnlock(AMemory Memory, long MutexAddress)
|
||||
public long ArbitrateUnlock(MemoryManager Memory, long MutexAddress)
|
||||
{
|
||||
System.CriticalSectionLock.Lock();
|
||||
|
||||
|
@ -100,11 +100,11 @@ namespace Ryujinx.HLE.HOS.Kernel
|
|||
}
|
||||
|
||||
public long WaitProcessWideKeyAtomic(
|
||||
AMemory Memory,
|
||||
long MutexAddress,
|
||||
long CondVarAddress,
|
||||
int ThreadHandle,
|
||||
long Timeout)
|
||||
MemoryManager Memory,
|
||||
long MutexAddress,
|
||||
long CondVarAddress,
|
||||
int ThreadHandle,
|
||||
long Timeout)
|
||||
{
|
||||
System.CriticalSectionLock.Lock();
|
||||
|
||||
|
@ -167,7 +167,7 @@ namespace Ryujinx.HLE.HOS.Kernel
|
|||
return (uint)CurrentThread.ObjSyncResult;
|
||||
}
|
||||
|
||||
private (long, KThread) MutexUnlock(AMemory Memory, KThread CurrentThread, long MutexAddress)
|
||||
private (long, KThread) MutexUnlock(MemoryManager Memory, KThread CurrentThread, long MutexAddress)
|
||||
{
|
||||
KThread NewOwnerThread = CurrentThread.RelinquishMutex(MutexAddress, out int Count);
|
||||
|
||||
|
@ -198,7 +198,7 @@ namespace Ryujinx.HLE.HOS.Kernel
|
|||
return (Result, NewOwnerThread);
|
||||
}
|
||||
|
||||
public void SignalProcessWideKey(Process Process, AMemory Memory, long Address, int Count)
|
||||
public void SignalProcessWideKey(Process Process, MemoryManager Memory, long Address, int Count)
|
||||
{
|
||||
Queue<KThread> SignaledThreads = new Queue<KThread>();
|
||||
|
||||
|
@ -227,7 +227,7 @@ namespace Ryujinx.HLE.HOS.Kernel
|
|||
System.CriticalSectionLock.Unlock();
|
||||
}
|
||||
|
||||
private KThread TryAcquireMutex(Process Process, AMemory Memory, KThread Requester)
|
||||
private KThread TryAcquireMutex(Process Process, MemoryManager Memory, KThread Requester)
|
||||
{
|
||||
long Address = Requester.MutexAddress;
|
||||
|
||||
|
@ -301,7 +301,7 @@ namespace Ryujinx.HLE.HOS.Kernel
|
|||
return MutexOwner;
|
||||
}
|
||||
|
||||
public long WaitForAddressIfEqual(AMemory Memory, long Address, int Value, long Timeout)
|
||||
public long WaitForAddressIfEqual(MemoryManager Memory, long Address, int Value, long Timeout)
|
||||
{
|
||||
KThread CurrentThread = System.Scheduler.GetCurrentThread();
|
||||
|
||||
|
@ -373,11 +373,11 @@ namespace Ryujinx.HLE.HOS.Kernel
|
|||
}
|
||||
|
||||
public long WaitForAddressIfLessThan(
|
||||
AMemory Memory,
|
||||
long Address,
|
||||
int Value,
|
||||
bool ShouldDecrement,
|
||||
long Timeout)
|
||||
MemoryManager Memory,
|
||||
long Address,
|
||||
int Value,
|
||||
bool ShouldDecrement,
|
||||
long Timeout)
|
||||
{
|
||||
KThread CurrentThread = System.Scheduler.GetCurrentThread();
|
||||
|
||||
|
@ -507,7 +507,7 @@ namespace Ryujinx.HLE.HOS.Kernel
|
|||
return 0;
|
||||
}
|
||||
|
||||
public long SignalAndIncrementIfEqual(AMemory Memory, long Address, int Value, int Count)
|
||||
public long SignalAndIncrementIfEqual(MemoryManager Memory, long Address, int Value, int Count)
|
||||
{
|
||||
System.CriticalSectionLock.Lock();
|
||||
|
||||
|
@ -552,7 +552,7 @@ namespace Ryujinx.HLE.HOS.Kernel
|
|||
return 0;
|
||||
}
|
||||
|
||||
public long SignalAndModifyIfEqual(AMemory Memory, long Address, int Value, int Count)
|
||||
public long SignalAndModifyIfEqual(MemoryManager Memory, long Address, int Value, int Count)
|
||||
{
|
||||
System.CriticalSectionLock.Lock();
|
||||
|
||||
|
@ -649,7 +649,7 @@ namespace Ryujinx.HLE.HOS.Kernel
|
|||
}
|
||||
}
|
||||
|
||||
private bool UserToKernelInt32(AMemory Memory, long Address, out int Value)
|
||||
private bool UserToKernelInt32(MemoryManager Memory, long Address, out int Value)
|
||||
{
|
||||
if (Memory.IsMapped(Address))
|
||||
{
|
||||
|
@ -663,7 +663,7 @@ namespace Ryujinx.HLE.HOS.Kernel
|
|||
return false;
|
||||
}
|
||||
|
||||
private bool KernelToUserInt32(AMemory Memory, long Address, int Value)
|
||||
private bool KernelToUserInt32(MemoryManager Memory, long Address, int Value)
|
||||
{
|
||||
if (Memory.IsMapped(Address))
|
||||
{
|
||||
|
|
|
@ -13,7 +13,7 @@ namespace Ryujinx.HLE.HOS.Kernel
|
|||
|
||||
private LinkedList<KMemoryBlock> Blocks;
|
||||
|
||||
private AMemory CpuMemory;
|
||||
private MemoryManager CpuMemory;
|
||||
|
||||
private ArenaAllocator Allocator;
|
||||
|
||||
|
|
|
@ -53,7 +53,7 @@ namespace Ryujinx.HLE.HOS.Kernel
|
|||
|
||||
if (CoreContext.ContextSwitchNeeded)
|
||||
{
|
||||
AThread CurrentHleThread = CoreContext.CurrentThread?.Context;
|
||||
CpuThread CurrentHleThread = CoreContext.CurrentThread?.Context;
|
||||
|
||||
if (CurrentHleThread == null)
|
||||
{
|
||||
|
|
|
@ -9,7 +9,7 @@ namespace Ryujinx.HLE.HOS.Kernel
|
|||
{
|
||||
class KThread : KSynchronizationObject, IKFutureSchedulerObject
|
||||
{
|
||||
public AThread Context { get; private set; }
|
||||
public CpuThread Context { get; private set; }
|
||||
|
||||
public long AffinityMask { get; set; }
|
||||
|
||||
|
@ -66,12 +66,12 @@ namespace Ryujinx.HLE.HOS.Kernel
|
|||
public long LastPc { get; set; }
|
||||
|
||||
public KThread(
|
||||
AThread Thread,
|
||||
Process Process,
|
||||
Horizon System,
|
||||
int ProcessorId,
|
||||
int Priority,
|
||||
int ThreadId) : base(System)
|
||||
CpuThread Thread,
|
||||
Process Process,
|
||||
Horizon System,
|
||||
int ProcessorId,
|
||||
int Priority,
|
||||
int ThreadId) : base(System)
|
||||
{
|
||||
this.ThreadId = ThreadId;
|
||||
|
||||
|
|
|
@ -10,14 +10,14 @@ namespace Ryujinx.HLE.HOS.Kernel
|
|||
{
|
||||
partial class SvcHandler
|
||||
{
|
||||
private delegate void SvcFunc(AThreadState ThreadState);
|
||||
private delegate void SvcFunc(CpuThreadState ThreadState);
|
||||
|
||||
private Dictionary<int, SvcFunc> SvcFuncs;
|
||||
|
||||
private Switch Device;
|
||||
private Process Process;
|
||||
private Horizon System;
|
||||
private AMemory Memory;
|
||||
private Switch Device;
|
||||
private Process Process;
|
||||
private Horizon System;
|
||||
private MemoryManager Memory;
|
||||
|
||||
private struct HleIpcMessage
|
||||
{
|
||||
|
@ -101,9 +101,9 @@ namespace Ryujinx.HLE.HOS.Kernel
|
|||
Rng = new Random();
|
||||
}
|
||||
|
||||
public void SvcCall(object sender, AInstExceptionEventArgs e)
|
||||
public void SvcCall(object sender, InstExceptionEventArgs e)
|
||||
{
|
||||
AThreadState ThreadState = (AThreadState)sender;
|
||||
CpuThreadState ThreadState = (CpuThreadState)sender;
|
||||
|
||||
Process.GetThread(ThreadState.Tpidr).LastPc = e.Position;
|
||||
|
||||
|
|
|
@ -7,7 +7,7 @@ namespace Ryujinx.HLE.HOS.Kernel
|
|||
{
|
||||
partial class SvcHandler
|
||||
{
|
||||
private void SvcSetHeapSize(AThreadState ThreadState)
|
||||
private void SvcSetHeapSize(CpuThreadState ThreadState)
|
||||
{
|
||||
ulong Size = ThreadState.X1;
|
||||
|
||||
|
@ -34,7 +34,7 @@ namespace Ryujinx.HLE.HOS.Kernel
|
|||
}
|
||||
}
|
||||
|
||||
private void SvcSetMemoryAttribute(AThreadState ThreadState)
|
||||
private void SvcSetMemoryAttribute(CpuThreadState ThreadState)
|
||||
{
|
||||
long Position = (long)ThreadState.X0;
|
||||
long Size = (long)ThreadState.X1;
|
||||
|
@ -90,7 +90,7 @@ namespace Ryujinx.HLE.HOS.Kernel
|
|||
ThreadState.X0 = (ulong)Result;
|
||||
}
|
||||
|
||||
private void SvcMapMemory(AThreadState ThreadState)
|
||||
private void SvcMapMemory(CpuThreadState ThreadState)
|
||||
{
|
||||
long Dst = (long)ThreadState.X0;
|
||||
long Src = (long)ThreadState.X1;
|
||||
|
@ -151,7 +151,7 @@ namespace Ryujinx.HLE.HOS.Kernel
|
|||
ThreadState.X0 = (ulong)Result;
|
||||
}
|
||||
|
||||
private void SvcUnmapMemory(AThreadState ThreadState)
|
||||
private void SvcUnmapMemory(CpuThreadState ThreadState)
|
||||
{
|
||||
long Dst = (long)ThreadState.X0;
|
||||
long Src = (long)ThreadState.X1;
|
||||
|
@ -212,7 +212,7 @@ namespace Ryujinx.HLE.HOS.Kernel
|
|||
ThreadState.X0 = (ulong)Result;
|
||||
}
|
||||
|
||||
private void SvcQueryMemory(AThreadState ThreadState)
|
||||
private void SvcQueryMemory(CpuThreadState ThreadState)
|
||||
{
|
||||
long InfoPtr = (long)ThreadState.X0;
|
||||
long Position = (long)ThreadState.X2;
|
||||
|
@ -232,7 +232,7 @@ namespace Ryujinx.HLE.HOS.Kernel
|
|||
ThreadState.X1 = 0;
|
||||
}
|
||||
|
||||
private void SvcMapSharedMemory(AThreadState ThreadState)
|
||||
private void SvcMapSharedMemory(CpuThreadState ThreadState)
|
||||
{
|
||||
int Handle = (int)ThreadState.X0;
|
||||
long Position = (long)ThreadState.X1;
|
||||
|
@ -315,7 +315,7 @@ namespace Ryujinx.HLE.HOS.Kernel
|
|||
ThreadState.X0 = (ulong)Result;
|
||||
}
|
||||
|
||||
private void SvcUnmapSharedMemory(AThreadState ThreadState)
|
||||
private void SvcUnmapSharedMemory(CpuThreadState ThreadState)
|
||||
{
|
||||
int Handle = (int)ThreadState.X0;
|
||||
long Position = (long)ThreadState.X1;
|
||||
|
@ -378,7 +378,7 @@ namespace Ryujinx.HLE.HOS.Kernel
|
|||
ThreadState.X0 = (ulong)Result;
|
||||
}
|
||||
|
||||
private void SvcCreateTransferMemory(AThreadState ThreadState)
|
||||
private void SvcCreateTransferMemory(CpuThreadState ThreadState)
|
||||
{
|
||||
long Position = (long)ThreadState.X1;
|
||||
long Size = (long)ThreadState.X2;
|
||||
|
@ -431,7 +431,7 @@ namespace Ryujinx.HLE.HOS.Kernel
|
|||
ThreadState.X1 = (ulong)Handle;
|
||||
}
|
||||
|
||||
private void SvcMapPhysicalMemory(AThreadState ThreadState)
|
||||
private void SvcMapPhysicalMemory(CpuThreadState ThreadState)
|
||||
{
|
||||
long Position = (long)ThreadState.X0;
|
||||
long Size = (long)ThreadState.X1;
|
||||
|
@ -482,7 +482,7 @@ namespace Ryujinx.HLE.HOS.Kernel
|
|||
ThreadState.X0 = (ulong)Result;
|
||||
}
|
||||
|
||||
private void SvcUnmapPhysicalMemory(AThreadState ThreadState)
|
||||
private void SvcUnmapPhysicalMemory(CpuThreadState ThreadState)
|
||||
{
|
||||
long Position = (long)ThreadState.X0;
|
||||
long Size = (long)ThreadState.X1;
|
||||
|
|
|
@ -17,12 +17,12 @@ namespace Ryujinx.HLE.HOS.Kernel
|
|||
|
||||
private const bool EnableProcessDebugging = false;
|
||||
|
||||
private void SvcExitProcess(AThreadState ThreadState)
|
||||
private void SvcExitProcess(CpuThreadState ThreadState)
|
||||
{
|
||||
Device.System.ExitProcess(Process.ProcessId);
|
||||
}
|
||||
|
||||
private void SignalEvent64(AThreadState ThreadState)
|
||||
private void SignalEvent64(CpuThreadState ThreadState)
|
||||
{
|
||||
ThreadState.X0 = (ulong)SignalEvent((int)ThreadState.X0);
|
||||
}
|
||||
|
@ -52,7 +52,7 @@ namespace Ryujinx.HLE.HOS.Kernel
|
|||
return Result;
|
||||
}
|
||||
|
||||
private void ClearEvent64(AThreadState ThreadState)
|
||||
private void ClearEvent64(CpuThreadState ThreadState)
|
||||
{
|
||||
ThreadState.X0 = (ulong)ClearEvent((int)ThreadState.X0);
|
||||
}
|
||||
|
@ -82,7 +82,7 @@ namespace Ryujinx.HLE.HOS.Kernel
|
|||
return Result;
|
||||
}
|
||||
|
||||
private void SvcCloseHandle(AThreadState ThreadState)
|
||||
private void SvcCloseHandle(CpuThreadState ThreadState)
|
||||
{
|
||||
int Handle = (int)ThreadState.X0;
|
||||
|
||||
|
@ -113,7 +113,7 @@ namespace Ryujinx.HLE.HOS.Kernel
|
|||
ThreadState.X0 = 0;
|
||||
}
|
||||
|
||||
private void ResetSignal64(AThreadState ThreadState)
|
||||
private void ResetSignal64(CpuThreadState ThreadState)
|
||||
{
|
||||
ThreadState.X0 = (ulong)ResetSignal((int)ThreadState.X0);
|
||||
}
|
||||
|
@ -146,17 +146,17 @@ namespace Ryujinx.HLE.HOS.Kernel
|
|||
return Result;
|
||||
}
|
||||
|
||||
private void SvcGetSystemTick(AThreadState ThreadState)
|
||||
private void SvcGetSystemTick(CpuThreadState ThreadState)
|
||||
{
|
||||
ThreadState.X0 = ThreadState.CntpctEl0;
|
||||
}
|
||||
|
||||
private void SvcConnectToNamedPort(AThreadState ThreadState)
|
||||
private void SvcConnectToNamedPort(CpuThreadState ThreadState)
|
||||
{
|
||||
long StackPtr = (long)ThreadState.X0;
|
||||
long NamePtr = (long)ThreadState.X1;
|
||||
|
||||
string Name = AMemoryHelper.ReadAsciiString(Memory, NamePtr, 8);
|
||||
string Name = MemoryHelper.ReadAsciiString(Memory, NamePtr, 8);
|
||||
|
||||
//TODO: Validate that app has perms to access the service, and that the service
|
||||
//actually exists, return error codes otherwise.
|
||||
|
@ -171,12 +171,12 @@ namespace Ryujinx.HLE.HOS.Kernel
|
|||
ThreadState.X1 = (uint)Handle;
|
||||
}
|
||||
|
||||
private void SvcSendSyncRequest(AThreadState ThreadState)
|
||||
private void SvcSendSyncRequest(CpuThreadState ThreadState)
|
||||
{
|
||||
SendSyncRequest(ThreadState, ThreadState.Tpidr, 0x100, (int)ThreadState.X0);
|
||||
}
|
||||
|
||||
private void SvcSendSyncRequestWithUserBuffer(AThreadState ThreadState)
|
||||
private void SvcSendSyncRequestWithUserBuffer(CpuThreadState ThreadState)
|
||||
{
|
||||
SendSyncRequest(
|
||||
ThreadState,
|
||||
|
@ -185,7 +185,7 @@ namespace Ryujinx.HLE.HOS.Kernel
|
|||
(int)ThreadState.X2);
|
||||
}
|
||||
|
||||
private void SendSyncRequest(AThreadState ThreadState, long MessagePtr, long Size, int Handle)
|
||||
private void SendSyncRequest(CpuThreadState ThreadState, long MessagePtr, long Size, int Handle)
|
||||
{
|
||||
KThread CurrThread = Process.GetThread(ThreadState.Tpidr);
|
||||
|
||||
|
@ -241,7 +241,7 @@ namespace Ryujinx.HLE.HOS.Kernel
|
|||
IpcMessage.Thread.Reschedule(ThreadSchedState.Running);
|
||||
}
|
||||
|
||||
private void SvcBreak(AThreadState ThreadState)
|
||||
private void SvcBreak(CpuThreadState ThreadState)
|
||||
{
|
||||
long Reason = (long)ThreadState.X0;
|
||||
long Unknown = (long)ThreadState.X1;
|
||||
|
@ -260,19 +260,19 @@ namespace Ryujinx.HLE.HOS.Kernel
|
|||
}
|
||||
}
|
||||
|
||||
private void SvcOutputDebugString(AThreadState ThreadState)
|
||||
private void SvcOutputDebugString(CpuThreadState ThreadState)
|
||||
{
|
||||
long Position = (long)ThreadState.X0;
|
||||
long Size = (long)ThreadState.X1;
|
||||
|
||||
string Str = AMemoryHelper.ReadAsciiString(Memory, Position, Size);
|
||||
string Str = MemoryHelper.ReadAsciiString(Memory, Position, Size);
|
||||
|
||||
Logger.PrintWarning(LogClass.KernelSvc, Str);
|
||||
|
||||
ThreadState.X0 = 0;
|
||||
}
|
||||
|
||||
private void SvcGetInfo(AThreadState ThreadState)
|
||||
private void SvcGetInfo(CpuThreadState ThreadState)
|
||||
{
|
||||
long StackPtr = (long)ThreadState.X0;
|
||||
int InfoType = (int)ThreadState.X1;
|
||||
|
@ -366,7 +366,7 @@ namespace Ryujinx.HLE.HOS.Kernel
|
|||
ThreadState.X0 = 0;
|
||||
}
|
||||
|
||||
private void CreateEvent64(AThreadState State)
|
||||
private void CreateEvent64(CpuThreadState State)
|
||||
{
|
||||
KernelResult Result = CreateEvent(out int WEventHandle, out int REventHandle);
|
||||
|
||||
|
|
|
@ -7,7 +7,7 @@ namespace Ryujinx.HLE.HOS.Kernel
|
|||
{
|
||||
partial class SvcHandler
|
||||
{
|
||||
private void SvcCreateThread(AThreadState ThreadState)
|
||||
private void SvcCreateThread(CpuThreadState ThreadState)
|
||||
{
|
||||
long EntryPoint = (long)ThreadState.X1;
|
||||
long ArgsPtr = (long)ThreadState.X2;
|
||||
|
@ -49,7 +49,7 @@ namespace Ryujinx.HLE.HOS.Kernel
|
|||
ThreadState.X1 = (ulong)Handle;
|
||||
}
|
||||
|
||||
private void SvcStartThread(AThreadState ThreadState)
|
||||
private void SvcStartThread(CpuThreadState ThreadState)
|
||||
{
|
||||
int Handle = (int)ThreadState.X0;
|
||||
|
||||
|
@ -74,7 +74,7 @@ namespace Ryujinx.HLE.HOS.Kernel
|
|||
}
|
||||
}
|
||||
|
||||
private void SvcExitThread(AThreadState ThreadState)
|
||||
private void SvcExitThread(CpuThreadState ThreadState)
|
||||
{
|
||||
KThread CurrentThread = System.Scheduler.GetCurrentThread();
|
||||
|
||||
|
@ -83,7 +83,7 @@ namespace Ryujinx.HLE.HOS.Kernel
|
|||
System.Scheduler.StopThread(CurrentThread);
|
||||
}
|
||||
|
||||
private void SvcSleepThread(AThreadState ThreadState)
|
||||
private void SvcSleepThread(CpuThreadState ThreadState)
|
||||
{
|
||||
long Timeout = (long)ThreadState.X0;
|
||||
|
||||
|
@ -108,7 +108,7 @@ namespace Ryujinx.HLE.HOS.Kernel
|
|||
}
|
||||
}
|
||||
|
||||
private void SvcGetThreadPriority(AThreadState ThreadState)
|
||||
private void SvcGetThreadPriority(CpuThreadState ThreadState)
|
||||
{
|
||||
int Handle = (int)ThreadState.X1;
|
||||
|
||||
|
@ -127,7 +127,7 @@ namespace Ryujinx.HLE.HOS.Kernel
|
|||
}
|
||||
}
|
||||
|
||||
private void SvcSetThreadPriority(AThreadState ThreadState)
|
||||
private void SvcSetThreadPriority(CpuThreadState ThreadState)
|
||||
{
|
||||
int Handle = (int)ThreadState.X0;
|
||||
int Priority = (int)ThreadState.X1;
|
||||
|
@ -154,7 +154,7 @@ namespace Ryujinx.HLE.HOS.Kernel
|
|||
ThreadState.X0 = 0;
|
||||
}
|
||||
|
||||
private void SvcGetThreadCoreMask(AThreadState ThreadState)
|
||||
private void SvcGetThreadCoreMask(CpuThreadState ThreadState)
|
||||
{
|
||||
int Handle = (int)ThreadState.X2;
|
||||
|
||||
|
@ -176,7 +176,7 @@ namespace Ryujinx.HLE.HOS.Kernel
|
|||
}
|
||||
}
|
||||
|
||||
private void SvcSetThreadCoreMask(AThreadState ThreadState)
|
||||
private void SvcSetThreadCoreMask(CpuThreadState ThreadState)
|
||||
{
|
||||
int Handle = (int)ThreadState.X0;
|
||||
int PrefferedCore = (int)ThreadState.X1;
|
||||
|
@ -240,12 +240,12 @@ namespace Ryujinx.HLE.HOS.Kernel
|
|||
ThreadState.X0 = (ulong)Result;
|
||||
}
|
||||
|
||||
private void SvcGetCurrentProcessorNumber(AThreadState ThreadState)
|
||||
private void SvcGetCurrentProcessorNumber(CpuThreadState ThreadState)
|
||||
{
|
||||
ThreadState.X0 = (ulong)Process.GetThread(ThreadState.Tpidr).CurrentCore;
|
||||
}
|
||||
|
||||
private void SvcGetThreadId(AThreadState ThreadState)
|
||||
private void SvcGetThreadId(CpuThreadState ThreadState)
|
||||
{
|
||||
int Handle = (int)ThreadState.X1;
|
||||
|
||||
|
@ -264,7 +264,7 @@ namespace Ryujinx.HLE.HOS.Kernel
|
|||
}
|
||||
}
|
||||
|
||||
private void SvcSetThreadActivity(AThreadState ThreadState)
|
||||
private void SvcSetThreadActivity(CpuThreadState ThreadState)
|
||||
{
|
||||
int Handle = (int)ThreadState.X0;
|
||||
bool Pause = (int)ThreadState.X1 == 1;
|
||||
|
@ -299,7 +299,7 @@ namespace Ryujinx.HLE.HOS.Kernel
|
|||
ThreadState.X0 = (ulong)Result;
|
||||
}
|
||||
|
||||
private void SvcGetThreadContext3(AThreadState ThreadState)
|
||||
private void SvcGetThreadContext3(CpuThreadState ThreadState)
|
||||
{
|
||||
long Position = (long)ThreadState.X0;
|
||||
int Handle = (int)ThreadState.X1;
|
||||
|
|
|
@ -8,7 +8,7 @@ namespace Ryujinx.HLE.HOS.Kernel
|
|||
{
|
||||
partial class SvcHandler
|
||||
{
|
||||
private void SvcWaitSynchronization(AThreadState ThreadState)
|
||||
private void SvcWaitSynchronization(CpuThreadState ThreadState)
|
||||
{
|
||||
long HandlesPtr = (long)ThreadState.X1;
|
||||
int HandlesCount = (int)ThreadState.X2;
|
||||
|
@ -65,7 +65,7 @@ namespace Ryujinx.HLE.HOS.Kernel
|
|||
ThreadState.X1 = (uint)HndIndex | High;
|
||||
}
|
||||
|
||||
private void SvcCancelSynchronization(AThreadState ThreadState)
|
||||
private void SvcCancelSynchronization(CpuThreadState ThreadState)
|
||||
{
|
||||
int ThreadHandle = (int)ThreadState.X0;
|
||||
|
||||
|
@ -87,7 +87,7 @@ namespace Ryujinx.HLE.HOS.Kernel
|
|||
ThreadState.X0 = 0;
|
||||
}
|
||||
|
||||
private void SvcArbitrateLock(AThreadState ThreadState)
|
||||
private void SvcArbitrateLock(CpuThreadState ThreadState)
|
||||
{
|
||||
int OwnerHandle = (int)ThreadState.X0;
|
||||
long MutexAddress = (long)ThreadState.X1;
|
||||
|
@ -131,7 +131,7 @@ namespace Ryujinx.HLE.HOS.Kernel
|
|||
ThreadState.X0 = (ulong)Result;
|
||||
}
|
||||
|
||||
private void SvcArbitrateUnlock(AThreadState ThreadState)
|
||||
private void SvcArbitrateUnlock(CpuThreadState ThreadState)
|
||||
{
|
||||
long MutexAddress = (long)ThreadState.X0;
|
||||
|
||||
|
@ -165,7 +165,7 @@ namespace Ryujinx.HLE.HOS.Kernel
|
|||
ThreadState.X0 = (ulong)Result;
|
||||
}
|
||||
|
||||
private void SvcWaitProcessWideKeyAtomic(AThreadState ThreadState)
|
||||
private void SvcWaitProcessWideKeyAtomic(CpuThreadState ThreadState)
|
||||
{
|
||||
long MutexAddress = (long)ThreadState.X0;
|
||||
long CondVarAddress = (long)ThreadState.X1;
|
||||
|
@ -218,7 +218,7 @@ namespace Ryujinx.HLE.HOS.Kernel
|
|||
ThreadState.X0 = (ulong)Result;
|
||||
}
|
||||
|
||||
private void SvcSignalProcessWideKey(AThreadState ThreadState)
|
||||
private void SvcSignalProcessWideKey(CpuThreadState ThreadState)
|
||||
{
|
||||
long Address = (long)ThreadState.X0;
|
||||
int Count = (int)ThreadState.X1;
|
||||
|
@ -232,7 +232,7 @@ namespace Ryujinx.HLE.HOS.Kernel
|
|||
ThreadState.X0 = 0;
|
||||
}
|
||||
|
||||
private void SvcWaitForAddress(AThreadState ThreadState)
|
||||
private void SvcWaitForAddress(CpuThreadState ThreadState)
|
||||
{
|
||||
long Address = (long)ThreadState.X0;
|
||||
ArbitrationType Type = (ArbitrationType)ThreadState.X1;
|
||||
|
@ -292,7 +292,7 @@ namespace Ryujinx.HLE.HOS.Kernel
|
|||
ThreadState.X0 = (ulong)Result;
|
||||
}
|
||||
|
||||
private void SvcSignalToAddress(AThreadState ThreadState)
|
||||
private void SvcSignalToAddress(CpuThreadState ThreadState)
|
||||
{
|
||||
long Address = (long)ThreadState.X0;
|
||||
SignalType Type = (SignalType)ThreadState.X1;
|
||||
|
|
|
@ -33,9 +33,9 @@ namespace Ryujinx.HLE.HOS
|
|||
|
||||
public int ProcessId { get; private set; }
|
||||
|
||||
private ATranslator Translator;
|
||||
private Translator Translator;
|
||||
|
||||
public AMemory Memory { get; private set; }
|
||||
public MemoryManager Memory { get; private set; }
|
||||
|
||||
public KMemoryManager MemoryManager { get; private set; }
|
||||
|
||||
|
@ -65,7 +65,7 @@ namespace Ryujinx.HLE.HOS
|
|||
this.MetaData = MetaData;
|
||||
this.ProcessId = ProcessId;
|
||||
|
||||
Memory = new AMemory(Device.Memory.RamPointer);
|
||||
Memory = new MemoryManager(Device.Memory.RamPointer);
|
||||
|
||||
Memory.InvalidAccess += CpuInvalidAccessHandler;
|
||||
|
||||
|
@ -221,7 +221,7 @@ namespace Ryujinx.HLE.HOS
|
|||
throw new ObjectDisposedException(nameof(Process));
|
||||
}
|
||||
|
||||
AThread CpuThread = new AThread(GetTranslator(), Memory, EntryPoint);
|
||||
CpuThread CpuThread = new CpuThread(GetTranslator(), Memory, EntryPoint);
|
||||
|
||||
long Tpidr = GetFreeTls();
|
||||
|
||||
|
@ -283,14 +283,14 @@ namespace Ryujinx.HLE.HOS
|
|||
Device.System.Scheduler.ContextSwitch();
|
||||
}
|
||||
|
||||
private void BreakHandler(object sender, AInstExceptionEventArgs e)
|
||||
private void BreakHandler(object sender, InstExceptionEventArgs e)
|
||||
{
|
||||
PrintStackTraceForCurrentThread();
|
||||
|
||||
throw new GuestBrokeExecutionException();
|
||||
}
|
||||
|
||||
private void UndefinedHandler(object sender, AInstUndefinedEventArgs e)
|
||||
private void UndefinedHandler(object sender, InstUndefinedEventArgs e)
|
||||
{
|
||||
PrintStackTraceForCurrentThread();
|
||||
|
||||
|
@ -307,7 +307,7 @@ namespace Ryujinx.HLE.HOS
|
|||
Translator.EnableCpuTrace = false;
|
||||
}
|
||||
|
||||
private void CpuTraceHandler(object sender, ACpuTraceEventArgs e)
|
||||
private void CpuTraceHandler(object sender, CpuTraceEventArgs e)
|
||||
{
|
||||
Executable Exe = GetExecutable(e.Position);
|
||||
|
||||
|
@ -328,11 +328,11 @@ namespace Ryujinx.HLE.HOS
|
|||
Logger.PrintDebug(LogClass.Cpu, ExeNameWithAddr + " " + SubName);
|
||||
}
|
||||
|
||||
private ATranslator GetTranslator()
|
||||
private Translator GetTranslator()
|
||||
{
|
||||
if (Translator == null)
|
||||
{
|
||||
Translator = new ATranslator();
|
||||
Translator = new Translator();
|
||||
|
||||
Translator.CpuTrace += CpuTraceHandler;
|
||||
}
|
||||
|
@ -340,7 +340,7 @@ namespace Ryujinx.HLE.HOS
|
|||
return Translator;
|
||||
}
|
||||
|
||||
private void CpuInvalidAccessHandler(object sender, AInvalidAccessEventArgs e)
|
||||
private void CpuInvalidAccessHandler(object sender, InvalidAccessEventArgs e)
|
||||
{
|
||||
PrintStackTraceForCurrentThread();
|
||||
}
|
||||
|
@ -358,7 +358,7 @@ namespace Ryujinx.HLE.HOS
|
|||
}
|
||||
}
|
||||
|
||||
public void PrintStackTrace(AThreadState ThreadState)
|
||||
public void PrintStackTrace(CpuThreadState ThreadState)
|
||||
{
|
||||
StringBuilder Trace = new StringBuilder();
|
||||
|
||||
|
@ -457,7 +457,7 @@ namespace Ryujinx.HLE.HOS
|
|||
|
||||
private void ThreadFinished(object sender, EventArgs e)
|
||||
{
|
||||
if (sender is AThread Thread)
|
||||
if (sender is CpuThread Thread)
|
||||
{
|
||||
if (Threads.TryRemove(Thread.ThreadState.Tpidr, out KThread KernelThread))
|
||||
{
|
||||
|
|
|
@ -7,24 +7,24 @@ namespace Ryujinx.HLE.HOS
|
|||
{
|
||||
class ServiceCtx
|
||||
{
|
||||
public Switch Device { get; private set; }
|
||||
public Process Process { get; private set; }
|
||||
public AMemory Memory { get; private set; }
|
||||
public KSession Session { get; private set; }
|
||||
public IpcMessage Request { get; private set; }
|
||||
public IpcMessage Response { get; private set; }
|
||||
public BinaryReader RequestData { get; private set; }
|
||||
public BinaryWriter ResponseData { get; private set; }
|
||||
public Switch Device { get; private set; }
|
||||
public Process Process { get; private set; }
|
||||
public MemoryManager Memory { get; private set; }
|
||||
public KSession Session { get; private set; }
|
||||
public IpcMessage Request { get; private set; }
|
||||
public IpcMessage Response { get; private set; }
|
||||
public BinaryReader RequestData { get; private set; }
|
||||
public BinaryWriter ResponseData { get; private set; }
|
||||
|
||||
public ServiceCtx(
|
||||
Switch Device,
|
||||
Process Process,
|
||||
AMemory Memory,
|
||||
KSession Session,
|
||||
IpcMessage Request,
|
||||
IpcMessage Response,
|
||||
BinaryReader RequestData,
|
||||
BinaryWriter ResponseData)
|
||||
Switch Device,
|
||||
Process Process,
|
||||
MemoryManager Memory,
|
||||
KSession Session,
|
||||
IpcMessage Request,
|
||||
IpcMessage Response,
|
||||
BinaryReader RequestData,
|
||||
BinaryWriter ResponseData)
|
||||
{
|
||||
this.Device = Device;
|
||||
this.Process = Process;
|
||||
|
|
|
@ -41,7 +41,7 @@ namespace Ryujinx.HLE.HOS.Services.Acc
|
|||
|
||||
long Position = Context.Request.ReceiveBuff[0].Position;
|
||||
|
||||
AMemoryHelper.FillWithZeros(Context.Memory, Position, 0x80);
|
||||
MemoryHelper.FillWithZeros(Context.Memory, Position, 0x80);
|
||||
|
||||
Context.Memory.WriteInt32(Position, 0);
|
||||
Context.Memory.WriteInt32(Position + 4, 1);
|
||||
|
|
|
@ -105,7 +105,7 @@ namespace Ryujinx.HLE.HOS.Services.Aud.AudioOut
|
|||
{
|
||||
long Tag = Context.RequestData.ReadInt64();
|
||||
|
||||
AudioOutData Data = AMemoryHelper.Read<AudioOutData>(
|
||||
AudioOutData Data = MemoryHelper.Read<AudioOutData>(
|
||||
Context.Memory,
|
||||
Position);
|
||||
|
||||
|
|
|
@ -26,7 +26,7 @@ namespace Ryujinx.HLE.HOS.Services.Aud.AudioRenderer
|
|||
|
||||
private KEvent UpdateEvent;
|
||||
|
||||
private AMemory Memory;
|
||||
private MemoryManager Memory;
|
||||
|
||||
private IAalOutput AudioOut;
|
||||
|
||||
|
@ -42,7 +42,7 @@ namespace Ryujinx.HLE.HOS.Services.Aud.AudioRenderer
|
|||
|
||||
public IAudioRenderer(
|
||||
Horizon System,
|
||||
AMemory Memory,
|
||||
MemoryManager Memory,
|
||||
IAalOutput AudioOut,
|
||||
AudioRendererParameter Params)
|
||||
{
|
||||
|
@ -143,7 +143,7 @@ namespace Ryujinx.HLE.HOS.Services.Aud.AudioRenderer
|
|||
long OutputPosition = Context.Request.ReceiveBuff[0].Position;
|
||||
long OutputSize = Context.Request.ReceiveBuff[0].Size;
|
||||
|
||||
AMemoryHelper.FillWithZeros(Context.Memory, OutputPosition, (int)OutputSize);
|
||||
MemoryHelper.FillWithZeros(Context.Memory, OutputPosition, (int)OutputSize);
|
||||
|
||||
long InputPosition = Context.Request.SendBuff[0].Position;
|
||||
|
||||
|
|
|
@ -61,7 +61,7 @@ namespace Ryujinx.HLE.HOS.Services.Aud.AudioRenderer
|
|||
OutStatus.VoiceDropsCount = 0;
|
||||
}
|
||||
|
||||
public int[] GetBufferData(AMemory Memory, int MaxSamples, out int SamplesCount)
|
||||
public int[] GetBufferData(MemoryManager Memory, int MaxSamples, out int SamplesCount)
|
||||
{
|
||||
if (!Playing)
|
||||
{
|
||||
|
@ -118,7 +118,7 @@ namespace Ryujinx.HLE.HOS.Services.Aud.AudioRenderer
|
|||
return Output;
|
||||
}
|
||||
|
||||
private void UpdateBuffer(AMemory Memory)
|
||||
private void UpdateBuffer(MemoryManager Memory)
|
||||
{
|
||||
//TODO: Implement conversion for formats other
|
||||
//than interleaved stereo (2 channels).
|
||||
|
|
|
@ -96,7 +96,7 @@ namespace Ryujinx.HLE.HOS.Services.Aud
|
|||
|
||||
private long OpenAudioOutImpl(ServiceCtx Context, long SendPosition, long SendSize, long ReceivePosition, long ReceiveSize)
|
||||
{
|
||||
string DeviceName = AMemoryHelper.ReadAsciiString(
|
||||
string DeviceName = MemoryHelper.ReadAsciiString(
|
||||
Context.Memory,
|
||||
SendPosition,
|
||||
SendSize);
|
||||
|
|
|
@ -60,7 +60,7 @@ namespace Ryujinx.HLE.HOS.Services.Nv
|
|||
{
|
||||
long NamePtr = Context.Request.SendBuff[0].Position;
|
||||
|
||||
string Name = AMemoryHelper.ReadAsciiString(Context.Memory, NamePtr);
|
||||
string Name = MemoryHelper.ReadAsciiString(Context.Memory, NamePtr);
|
||||
|
||||
int Fd = Fds.Add(Context.Process, new NvFd(Name));
|
||||
|
||||
|
|
|
@ -52,7 +52,7 @@ namespace Ryujinx.HLE.HOS.Services.Nv.NvGpuAS
|
|||
long InputPosition = Context.Request.GetBufferType0x21().Position;
|
||||
long OutputPosition = Context.Request.GetBufferType0x22().Position;
|
||||
|
||||
NvGpuASAllocSpace Args = AMemoryHelper.Read<NvGpuASAllocSpace>(Context.Memory, InputPosition);
|
||||
NvGpuASAllocSpace Args = MemoryHelper.Read<NvGpuASAllocSpace>(Context.Memory, InputPosition);
|
||||
|
||||
NvGpuASCtx ASCtx = GetASCtx(Context);
|
||||
|
||||
|
@ -88,7 +88,7 @@ namespace Ryujinx.HLE.HOS.Services.Nv.NvGpuAS
|
|||
}
|
||||
}
|
||||
|
||||
AMemoryHelper.Write(Context.Memory, OutputPosition, Args);
|
||||
MemoryHelper.Write(Context.Memory, OutputPosition, Args);
|
||||
|
||||
return Result;
|
||||
}
|
||||
|
@ -98,7 +98,7 @@ namespace Ryujinx.HLE.HOS.Services.Nv.NvGpuAS
|
|||
long InputPosition = Context.Request.GetBufferType0x21().Position;
|
||||
long OutputPosition = Context.Request.GetBufferType0x22().Position;
|
||||
|
||||
NvGpuASAllocSpace Args = AMemoryHelper.Read<NvGpuASAllocSpace>(Context.Memory, InputPosition);
|
||||
NvGpuASAllocSpace Args = MemoryHelper.Read<NvGpuASAllocSpace>(Context.Memory, InputPosition);
|
||||
|
||||
NvGpuASCtx ASCtx = GetASCtx(Context);
|
||||
|
||||
|
@ -130,7 +130,7 @@ namespace Ryujinx.HLE.HOS.Services.Nv.NvGpuAS
|
|||
long InputPosition = Context.Request.GetBufferType0x21().Position;
|
||||
long OutputPosition = Context.Request.GetBufferType0x22().Position;
|
||||
|
||||
NvGpuASUnmapBuffer Args = AMemoryHelper.Read<NvGpuASUnmapBuffer>(Context.Memory, InputPosition);
|
||||
NvGpuASUnmapBuffer Args = MemoryHelper.Read<NvGpuASUnmapBuffer>(Context.Memory, InputPosition);
|
||||
|
||||
NvGpuASCtx ASCtx = GetASCtx(Context);
|
||||
|
||||
|
@ -159,7 +159,7 @@ namespace Ryujinx.HLE.HOS.Services.Nv.NvGpuAS
|
|||
long InputPosition = Context.Request.GetBufferType0x21().Position;
|
||||
long OutputPosition = Context.Request.GetBufferType0x22().Position;
|
||||
|
||||
NvGpuASMapBufferEx Args = AMemoryHelper.Read<NvGpuASMapBufferEx>(Context.Memory, InputPosition);
|
||||
NvGpuASMapBufferEx Args = MemoryHelper.Read<NvGpuASMapBufferEx>(Context.Memory, InputPosition);
|
||||
|
||||
NvGpuASCtx ASCtx = GetASCtx(Context);
|
||||
|
||||
|
@ -255,7 +255,7 @@ namespace Ryujinx.HLE.HOS.Services.Nv.NvGpuAS
|
|||
}
|
||||
}
|
||||
|
||||
AMemoryHelper.Write(Context.Memory, OutputPosition, Args);
|
||||
MemoryHelper.Write(Context.Memory, OutputPosition, Args);
|
||||
|
||||
return Result;
|
||||
}
|
||||
|
@ -288,7 +288,7 @@ namespace Ryujinx.HLE.HOS.Services.Nv.NvGpuAS
|
|||
|
||||
for (int Index = 0; Index < Count; Index++, InputPosition += 0x14)
|
||||
{
|
||||
NvGpuASRemap Args = AMemoryHelper.Read<NvGpuASRemap>(Context.Memory, InputPosition);
|
||||
NvGpuASRemap Args = MemoryHelper.Read<NvGpuASRemap>(Context.Memory, InputPosition);
|
||||
|
||||
NvGpuVmm Vmm = GetASCtx(Context).Vmm;
|
||||
|
||||
|
|
|
@ -44,7 +44,7 @@ namespace Ryujinx.HLE.HOS.Services.Nv.NvGpuGpu
|
|||
|
||||
Args.Size = 1;
|
||||
|
||||
AMemoryHelper.Write(Context.Memory, OutputPosition, Args);
|
||||
MemoryHelper.Write(Context.Memory, OutputPosition, Args);
|
||||
|
||||
Logger.PrintStub(LogClass.ServiceNv, "Stubbed.");
|
||||
|
||||
|
@ -68,7 +68,7 @@ namespace Ryujinx.HLE.HOS.Services.Nv.NvGpuGpu
|
|||
Args.SubregionHeightAlignPixels = 0x40;
|
||||
Args.SubregionCount = 0x10;
|
||||
|
||||
AMemoryHelper.Write(Context.Memory, OutputPosition, Args);
|
||||
MemoryHelper.Write(Context.Memory, OutputPosition, Args);
|
||||
|
||||
Logger.PrintStub(LogClass.ServiceNv, "Stubbed.");
|
||||
|
||||
|
@ -90,7 +90,7 @@ namespace Ryujinx.HLE.HOS.Services.Nv.NvGpuGpu
|
|||
long InputPosition = Context.Request.GetBufferType0x21().Position;
|
||||
long OutputPosition = Context.Request.GetBufferType0x22().Position;
|
||||
|
||||
NvGpuGpuGetCharacteristics Args = AMemoryHelper.Read<NvGpuGpuGetCharacteristics>(Context.Memory, InputPosition);
|
||||
NvGpuGpuGetCharacteristics Args = MemoryHelper.Read<NvGpuGpuGetCharacteristics>(Context.Memory, InputPosition);
|
||||
|
||||
Args.BufferSize = 0xa0;
|
||||
|
||||
|
@ -130,7 +130,7 @@ namespace Ryujinx.HLE.HOS.Services.Nv.NvGpuGpu
|
|||
Args.ChipName = 0x6230326d67;
|
||||
Args.GrCompbitStoreBaseHw = 0x0;
|
||||
|
||||
AMemoryHelper.Write(Context.Memory, OutputPosition, Args);
|
||||
MemoryHelper.Write(Context.Memory, OutputPosition, Args);
|
||||
|
||||
return NvResult.Success;
|
||||
}
|
||||
|
@ -140,14 +140,14 @@ namespace Ryujinx.HLE.HOS.Services.Nv.NvGpuGpu
|
|||
long InputPosition = Context.Request.GetBufferType0x21().Position;
|
||||
long OutputPosition = Context.Request.GetBufferType0x22().Position;
|
||||
|
||||
NvGpuGpuGetTpcMasks Args = AMemoryHelper.Read<NvGpuGpuGetTpcMasks>(Context.Memory, InputPosition);
|
||||
NvGpuGpuGetTpcMasks Args = MemoryHelper.Read<NvGpuGpuGetTpcMasks>(Context.Memory, InputPosition);
|
||||
|
||||
if (Args.MaskBufferSize != 0)
|
||||
{
|
||||
Args.TpcMask = 3;
|
||||
}
|
||||
|
||||
AMemoryHelper.Write(Context.Memory, OutputPosition, Args);
|
||||
MemoryHelper.Write(Context.Memory, OutputPosition, Args);
|
||||
|
||||
return NvResult.Success;
|
||||
}
|
||||
|
@ -161,7 +161,7 @@ namespace Ryujinx.HLE.HOS.Services.Nv.NvGpuGpu
|
|||
Args.Slot = 0x07;
|
||||
Args.Mask = 0x01;
|
||||
|
||||
AMemoryHelper.Write(Context.Memory, OutputPosition, Args);
|
||||
MemoryHelper.Write(Context.Memory, OutputPosition, Args);
|
||||
|
||||
Logger.PrintStub(LogClass.ServiceNv, "Stubbed.");
|
||||
|
||||
|
|
|
@ -86,7 +86,7 @@ namespace Ryujinx.HLE.HOS.Services.Nv.NvHostChannel
|
|||
long InputPosition = Context.Request.GetBufferType0x21().Position;
|
||||
long OutputPosition = Context.Request.GetBufferType0x22().Position;
|
||||
|
||||
NvHostChannelSubmitGpfifo Args = AMemoryHelper.Read<NvHostChannelSubmitGpfifo>(Context.Memory, InputPosition);
|
||||
NvHostChannelSubmitGpfifo Args = MemoryHelper.Read<NvHostChannelSubmitGpfifo>(Context.Memory, InputPosition);
|
||||
|
||||
NvGpuVmm Vmm = NvGpuASIoctl.GetASCtx(Context).Vmm;;
|
||||
|
||||
|
@ -100,7 +100,7 @@ namespace Ryujinx.HLE.HOS.Services.Nv.NvHostChannel
|
|||
Args.SyncptId = 0;
|
||||
Args.SyncptValue = 0;
|
||||
|
||||
AMemoryHelper.Write(Context.Memory, OutputPosition, Args);
|
||||
MemoryHelper.Write(Context.Memory, OutputPosition, Args);
|
||||
|
||||
return NvResult.Success;
|
||||
}
|
||||
|
@ -160,7 +160,7 @@ namespace Ryujinx.HLE.HOS.Services.Nv.NvHostChannel
|
|||
long InputPosition = Context.Request.GetBufferType0x21().Position;
|
||||
long OutputPosition = Context.Request.GetBufferType0x22().Position;
|
||||
|
||||
NvHostChannelSubmitGpfifo Args = AMemoryHelper.Read<NvHostChannelSubmitGpfifo>(Context.Memory, InputPosition);
|
||||
NvHostChannelSubmitGpfifo Args = MemoryHelper.Read<NvHostChannelSubmitGpfifo>(Context.Memory, InputPosition);
|
||||
|
||||
NvGpuVmm Vmm = NvGpuASIoctl.GetASCtx(Context).Vmm;;
|
||||
|
||||
|
@ -174,7 +174,7 @@ namespace Ryujinx.HLE.HOS.Services.Nv.NvHostChannel
|
|||
Args.SyncptId = 0;
|
||||
Args.SyncptValue = 0;
|
||||
|
||||
AMemoryHelper.Write(Context.Memory, OutputPosition, Args);
|
||||
MemoryHelper.Write(Context.Memory, OutputPosition, Args);
|
||||
|
||||
return NvResult.Success;
|
||||
}
|
||||
|
|
|
@ -84,8 +84,8 @@ namespace Ryujinx.HLE.HOS.Services.Nv.NvHostCtrl
|
|||
long InputPosition = Context.Request.GetBufferType0x21().Position;
|
||||
long OutputPosition = Context.Request.GetBufferType0x22().Position;
|
||||
|
||||
string Domain = AMemoryHelper.ReadAsciiString(Context.Memory, InputPosition + 0, 0x41);
|
||||
string Name = AMemoryHelper.ReadAsciiString(Context.Memory, InputPosition + 0x41, 0x41);
|
||||
string Domain = MemoryHelper.ReadAsciiString(Context.Memory, InputPosition + 0, 0x41);
|
||||
string Name = MemoryHelper.ReadAsciiString(Context.Memory, InputPosition + 0x41, 0x41);
|
||||
|
||||
if (Set.NxSettings.Settings.TryGetValue($"{Domain}!{Name}", out object NvSetting))
|
||||
{
|
||||
|
@ -154,7 +154,7 @@ namespace Ryujinx.HLE.HOS.Services.Nv.NvHostCtrl
|
|||
long InputPosition = Context.Request.GetBufferType0x21().Position;
|
||||
long OutputPosition = Context.Request.GetBufferType0x22().Position;
|
||||
|
||||
NvHostCtrlSyncptRead Args = AMemoryHelper.Read<NvHostCtrlSyncptRead>(Context.Memory, InputPosition);
|
||||
NvHostCtrlSyncptRead Args = MemoryHelper.Read<NvHostCtrlSyncptRead>(Context.Memory, InputPosition);
|
||||
|
||||
if ((uint)Args.Id >= NvHostSyncpt.SyncptsCount)
|
||||
{
|
||||
|
@ -170,7 +170,7 @@ namespace Ryujinx.HLE.HOS.Services.Nv.NvHostCtrl
|
|||
Args.Value = GetUserCtx(Context).Syncpt.GetMin(Args.Id);
|
||||
}
|
||||
|
||||
AMemoryHelper.Write(Context.Memory, OutputPosition, Args);
|
||||
MemoryHelper.Write(Context.Memory, OutputPosition, Args);
|
||||
|
||||
return NvResult.Success;
|
||||
}
|
||||
|
@ -180,7 +180,7 @@ namespace Ryujinx.HLE.HOS.Services.Nv.NvHostCtrl
|
|||
long InputPosition = Context.Request.GetBufferType0x21().Position;
|
||||
long OutputPosition = Context.Request.GetBufferType0x22().Position;
|
||||
|
||||
NvHostCtrlSyncptWait Args = AMemoryHelper.Read<NvHostCtrlSyncptWait>(Context.Memory, InputPosition);
|
||||
NvHostCtrlSyncptWait Args = MemoryHelper.Read<NvHostCtrlSyncptWait>(Context.Memory, InputPosition);
|
||||
|
||||
NvHostSyncpt Syncpt = GetUserCtx(Context).Syncpt;
|
||||
|
||||
|
@ -248,7 +248,7 @@ namespace Ryujinx.HLE.HOS.Services.Nv.NvHostCtrl
|
|||
long InputPosition = Context.Request.GetBufferType0x21().Position;
|
||||
long OutputPosition = Context.Request.GetBufferType0x22().Position;
|
||||
|
||||
NvHostCtrlSyncptWaitEx Args = AMemoryHelper.Read<NvHostCtrlSyncptWaitEx>(Context.Memory, InputPosition);
|
||||
NvHostCtrlSyncptWaitEx Args = MemoryHelper.Read<NvHostCtrlSyncptWaitEx>(Context.Memory, InputPosition);
|
||||
|
||||
if ((uint)Args.Id >= NvHostSyncpt.SyncptsCount)
|
||||
{
|
||||
|
@ -257,7 +257,7 @@ namespace Ryujinx.HLE.HOS.Services.Nv.NvHostCtrl
|
|||
|
||||
void WriteArgs()
|
||||
{
|
||||
AMemoryHelper.Write(Context.Memory, OutputPosition, Args);
|
||||
MemoryHelper.Write(Context.Memory, OutputPosition, Args);
|
||||
}
|
||||
|
||||
NvHostSyncpt Syncpt = GetUserCtx(Context).Syncpt;
|
||||
|
|
|
@ -39,7 +39,7 @@ namespace Ryujinx.HLE.HOS.Services.Nv.NvMap
|
|||
long InputPosition = Context.Request.GetBufferType0x21().Position;
|
||||
long OutputPosition = Context.Request.GetBufferType0x22().Position;
|
||||
|
||||
NvMapCreate Args = AMemoryHelper.Read<NvMapCreate>(Context.Memory, InputPosition);
|
||||
NvMapCreate Args = MemoryHelper.Read<NvMapCreate>(Context.Memory, InputPosition);
|
||||
|
||||
if (Args.Size == 0)
|
||||
{
|
||||
|
@ -54,7 +54,7 @@ namespace Ryujinx.HLE.HOS.Services.Nv.NvMap
|
|||
|
||||
Logger.PrintInfo(LogClass.ServiceNv, $"Created map {Args.Handle} with size 0x{Size:x8}!");
|
||||
|
||||
AMemoryHelper.Write(Context.Memory, OutputPosition, Args);
|
||||
MemoryHelper.Write(Context.Memory, OutputPosition, Args);
|
||||
|
||||
return NvResult.Success;
|
||||
}
|
||||
|
@ -64,7 +64,7 @@ namespace Ryujinx.HLE.HOS.Services.Nv.NvMap
|
|||
long InputPosition = Context.Request.GetBufferType0x21().Position;
|
||||
long OutputPosition = Context.Request.GetBufferType0x22().Position;
|
||||
|
||||
NvMapFromId Args = AMemoryHelper.Read<NvMapFromId>(Context.Memory, InputPosition);
|
||||
NvMapFromId Args = MemoryHelper.Read<NvMapFromId>(Context.Memory, InputPosition);
|
||||
|
||||
NvMapHandle Map = GetNvMap(Context, Args.Id);
|
||||
|
||||
|
@ -79,7 +79,7 @@ namespace Ryujinx.HLE.HOS.Services.Nv.NvMap
|
|||
|
||||
Args.Handle = Args.Id;
|
||||
|
||||
AMemoryHelper.Write(Context.Memory, OutputPosition, Args);
|
||||
MemoryHelper.Write(Context.Memory, OutputPosition, Args);
|
||||
|
||||
return NvResult.Success;
|
||||
}
|
||||
|
@ -89,7 +89,7 @@ namespace Ryujinx.HLE.HOS.Services.Nv.NvMap
|
|||
long InputPosition = Context.Request.GetBufferType0x21().Position;
|
||||
long OutputPosition = Context.Request.GetBufferType0x22().Position;
|
||||
|
||||
NvMapAlloc Args = AMemoryHelper.Read<NvMapAlloc>(Context.Memory, InputPosition);
|
||||
NvMapAlloc Args = MemoryHelper.Read<NvMapAlloc>(Context.Memory, InputPosition);
|
||||
|
||||
NvMapHandle Map = GetNvMap(Context, Args.Handle);
|
||||
|
||||
|
@ -143,7 +143,7 @@ namespace Ryujinx.HLE.HOS.Services.Nv.NvMap
|
|||
}
|
||||
}
|
||||
|
||||
AMemoryHelper.Write(Context.Memory, OutputPosition, Args);
|
||||
MemoryHelper.Write(Context.Memory, OutputPosition, Args);
|
||||
|
||||
return Result;
|
||||
}
|
||||
|
@ -153,7 +153,7 @@ namespace Ryujinx.HLE.HOS.Services.Nv.NvMap
|
|||
long InputPosition = Context.Request.GetBufferType0x21().Position;
|
||||
long OutputPosition = Context.Request.GetBufferType0x22().Position;
|
||||
|
||||
NvMapFree Args = AMemoryHelper.Read<NvMapFree>(Context.Memory, InputPosition);
|
||||
NvMapFree Args = MemoryHelper.Read<NvMapFree>(Context.Memory, InputPosition);
|
||||
|
||||
NvMapHandle Map = GetNvMap(Context, Args.Handle);
|
||||
|
||||
|
@ -181,7 +181,7 @@ namespace Ryujinx.HLE.HOS.Services.Nv.NvMap
|
|||
|
||||
Args.Size = Map.Size;
|
||||
|
||||
AMemoryHelper.Write(Context.Memory, OutputPosition, Args);
|
||||
MemoryHelper.Write(Context.Memory, OutputPosition, Args);
|
||||
|
||||
return NvResult.Success;
|
||||
}
|
||||
|
@ -191,7 +191,7 @@ namespace Ryujinx.HLE.HOS.Services.Nv.NvMap
|
|||
long InputPosition = Context.Request.GetBufferType0x21().Position;
|
||||
long OutputPosition = Context.Request.GetBufferType0x22().Position;
|
||||
|
||||
NvMapParam Args = AMemoryHelper.Read<NvMapParam>(Context.Memory, InputPosition);
|
||||
NvMapParam Args = MemoryHelper.Read<NvMapParam>(Context.Memory, InputPosition);
|
||||
|
||||
NvMapHandle Map = GetNvMap(Context, Args.Handle);
|
||||
|
||||
|
@ -215,7 +215,7 @@ namespace Ryujinx.HLE.HOS.Services.Nv.NvMap
|
|||
default: return NvResult.InvalidInput;
|
||||
}
|
||||
|
||||
AMemoryHelper.Write(Context.Memory, OutputPosition, Args);
|
||||
MemoryHelper.Write(Context.Memory, OutputPosition, Args);
|
||||
|
||||
return NvResult.Success;
|
||||
}
|
||||
|
@ -225,7 +225,7 @@ namespace Ryujinx.HLE.HOS.Services.Nv.NvMap
|
|||
long InputPosition = Context.Request.GetBufferType0x21().Position;
|
||||
long OutputPosition = Context.Request.GetBufferType0x22().Position;
|
||||
|
||||
NvMapGetId Args = AMemoryHelper.Read<NvMapGetId>(Context.Memory, InputPosition);
|
||||
NvMapGetId Args = MemoryHelper.Read<NvMapGetId>(Context.Memory, InputPosition);
|
||||
|
||||
NvMapHandle Map = GetNvMap(Context, Args.Handle);
|
||||
|
||||
|
@ -238,7 +238,7 @@ namespace Ryujinx.HLE.HOS.Services.Nv.NvMap
|
|||
|
||||
Args.Id = Args.Handle;
|
||||
|
||||
AMemoryHelper.Write(Context.Memory, OutputPosition, Args);
|
||||
MemoryHelper.Write(Context.Memory, OutputPosition, Args);
|
||||
|
||||
return NvResult.Success;
|
||||
}
|
||||
|
|
|
@ -77,7 +77,7 @@ namespace Ryujinx.HLE.HOS.Services.Vi
|
|||
{
|
||||
long RecBuffPtr = Context.Request.ReceiveBuff[0].Position;
|
||||
|
||||
AMemoryHelper.FillWithZeros(Context.Memory, RecBuffPtr, 0x60);
|
||||
MemoryHelper.FillWithZeros(Context.Memory, RecBuffPtr, 0x60);
|
||||
|
||||
//Add only the default display to buffer
|
||||
Context.Memory.WriteBytes(RecBuffPtr, Encoding.ASCII.GetBytes("Default"));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue