mirror of
https://git.743378673.xyz/MeloNX/MeloNX.git
synced 2025-08-03 01:57:11 +02:00
Improved logging (#103)
This commit is contained in:
parent
4e24866b47
commit
a8ba340dde
57 changed files with 555 additions and 870 deletions
|
@ -1,3 +1,4 @@
|
|||
using Ryujinx.Core.Logging;
|
||||
using System;
|
||||
using System.Collections.Concurrent;
|
||||
using System.Collections.Generic;
|
||||
|
@ -124,8 +125,12 @@ namespace Ryujinx.Core.OsHle.Handles
|
|||
|
||||
private object SchedLock;
|
||||
|
||||
public KProcessScheduler()
|
||||
private Logger Log;
|
||||
|
||||
public KProcessScheduler(Logger Log)
|
||||
{
|
||||
this.Log = Log;
|
||||
|
||||
AllThreads = new ConcurrentDictionary<KThread, SchedulerThread>();
|
||||
|
||||
WaitingToRun = new ThreadQueue[4];
|
||||
|
@ -183,7 +188,7 @@ namespace Ryujinx.Core.OsHle.Handles
|
|||
|
||||
if (NewThread == null)
|
||||
{
|
||||
Logging.Debug(LogClass.KernelScheduler, $"Nothing to run on core {Thread.ProcessorId}!");
|
||||
Log.PrintDebug(LogClass.KernelScheduler, $"Nothing to run on core {Thread.ProcessorId}!");
|
||||
|
||||
ActiveProcessors.Remove(Thread.ProcessorId);
|
||||
|
||||
|
@ -276,7 +281,7 @@ namespace Ryujinx.Core.OsHle.Handles
|
|||
}
|
||||
else
|
||||
{
|
||||
Logging.Debug(LogClass.KernelScheduler, $"Nothing to run on core {ProcessorId}!");
|
||||
Log.PrintDebug(LogClass.KernelScheduler, $"Nothing to run on core {ProcessorId}!");
|
||||
|
||||
ActiveProcessors.Remove(ProcessorId);
|
||||
}
|
||||
|
@ -385,7 +390,7 @@ namespace Ryujinx.Core.OsHle.Handles
|
|||
|
||||
private void PrintDbgThreadInfo(KThread Thread, string Message)
|
||||
{
|
||||
Logging.Debug(LogClass.KernelScheduler, "(" +
|
||||
Log.PrintDebug(LogClass.KernelScheduler, "(" +
|
||||
"ThreadId: " + Thread.ThreadId + ", " +
|
||||
"ProcessorId: " + Thread.ProcessorId + ", " +
|
||||
"ActualPriority: " + Thread.ActualPriority + ", " +
|
||||
|
|
|
@ -7,13 +7,13 @@ namespace Ryujinx.Core.OsHle.Handles
|
|||
{
|
||||
public AThread Thread { get; private set; }
|
||||
|
||||
public KThread MutexOwner { get; set; }
|
||||
public long MutexAddress { get; set; }
|
||||
public long CondVarAddress { get; set; }
|
||||
|
||||
public KThread NextMutexThread { get; set; }
|
||||
public KThread NextCondVarThread { get; set; }
|
||||
|
||||
public long MutexAddress { get; set; }
|
||||
public long CondVarAddress { get; set; }
|
||||
public KThread MutexOwner { get; set; }
|
||||
|
||||
public int ActualPriority { get; private set; }
|
||||
public int WantedPriority { get; private set; }
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
using Ryujinx.Core.Loaders.Executables;
|
||||
using Ryujinx.Core.Logging;
|
||||
using Ryujinx.Core.OsHle.Handles;
|
||||
using System;
|
||||
using System.Collections.Concurrent;
|
||||
|
@ -26,7 +27,7 @@ namespace Ryujinx.Core.OsHle
|
|||
{
|
||||
this.Ns = Ns;
|
||||
|
||||
Scheduler = new KProcessScheduler();
|
||||
Scheduler = new KProcessScheduler(Ns.Log);
|
||||
|
||||
Processes = new ConcurrentDictionary<int, Process>();
|
||||
|
||||
|
@ -54,7 +55,7 @@ namespace Ryujinx.Core.OsHle
|
|||
continue;
|
||||
}
|
||||
|
||||
Logging.Info(LogClass.Loader, $"Loading {Path.GetFileNameWithoutExtension(File)}...");
|
||||
Ns.Log.PrintInfo(LogClass.Loader, $"Loading {Path.GetFileNameWithoutExtension(File)}...");
|
||||
|
||||
using (FileStream Input = new FileStream(File, FileMode.Open))
|
||||
{
|
||||
|
@ -133,7 +134,7 @@ namespace Ryujinx.Core.OsHle
|
|||
{
|
||||
string NextNro = Homebrew.ReadHbAbiNextLoadPath(Process.Memory, Process.HbAbiDataPosition);
|
||||
|
||||
Logging.Info(LogClass.Loader, $"HbAbi NextLoadPath {NextNro}");
|
||||
Ns.Log.PrintInfo(LogClass.Loader, $"HbAbi NextLoadPath {NextNro}");
|
||||
|
||||
if (NextNro == string.Empty)
|
||||
{
|
||||
|
|
|
@ -1,178 +0,0 @@
|
|||
using System;
|
||||
using System.IO;
|
||||
|
||||
namespace Ryujinx.Core.OsHle.Ipc
|
||||
{
|
||||
public static class IpcLog
|
||||
{
|
||||
public static string Message(byte[] Data, long CmdPtr, bool Domain)
|
||||
{
|
||||
string IpcMessage = "";
|
||||
|
||||
using (MemoryStream MS = new MemoryStream(Data))
|
||||
{
|
||||
BinaryReader Reader = new BinaryReader(MS);
|
||||
|
||||
int Word0 = Reader.ReadInt32();
|
||||
int Word1 = Reader.ReadInt32();
|
||||
|
||||
int Type = (Word0 & 0xffff);
|
||||
|
||||
int PtrBuffCount = (Word0 >> 16) & 0xf;
|
||||
int SendBuffCount = (Word0 >> 20) & 0xf;
|
||||
int RecvBuffCount = (Word0 >> 24) & 0xf;
|
||||
int XchgBuffCount = (Word0 >> 28) & 0xf;
|
||||
|
||||
int RawDataSize = (Word1 >> 0) & 0x3ff;
|
||||
int RecvListFlags = (Word1 >> 10) & 0xf;
|
||||
bool HndDescEnable = ((Word1 >> 31) & 0x1) != 0;
|
||||
|
||||
IpcMessage += Environment.NewLine + $" {Logging.GetExecutionTime()} | IpcMessage >" + Environment.NewLine +
|
||||
$" Type: {Enum.GetName(typeof(IpcMessageType), Type)}" + Environment.NewLine +
|
||||
|
||||
$" PtrBuffCount: {PtrBuffCount.ToString()}" + Environment.NewLine +
|
||||
$" SendBuffCount: {SendBuffCount.ToString()}" + Environment.NewLine +
|
||||
$" RecvBuffCount: {RecvBuffCount.ToString()}" + Environment.NewLine +
|
||||
$" XchgBuffCount: {XchgBuffCount.ToString()}" + Environment.NewLine +
|
||||
|
||||
$" RawDataSize: {RawDataSize.ToString()}" + Environment.NewLine +
|
||||
$" RecvListFlags: {RecvListFlags.ToString()}" + Environment.NewLine +
|
||||
$" HndDescEnable: {HndDescEnable.ToString()}" + Environment.NewLine;
|
||||
|
||||
if (HndDescEnable)
|
||||
{
|
||||
int Word = Reader.ReadInt32();
|
||||
|
||||
bool HasPId = (Word & 1) != 0;
|
||||
|
||||
int[] ToCopy = new int[(Word >> 1) & 0xf];
|
||||
int[] ToMove = new int[(Word >> 5) & 0xf];
|
||||
|
||||
long PId = HasPId ? Reader.ReadInt64() : 0;
|
||||
|
||||
for (int Index = 0; Index < ToCopy.Length; Index++)
|
||||
{
|
||||
ToCopy[Index] = Reader.ReadInt32();
|
||||
}
|
||||
|
||||
for (int Index = 0; Index < ToMove.Length; Index++)
|
||||
{
|
||||
ToMove[Index] = Reader.ReadInt32();
|
||||
}
|
||||
|
||||
IpcMessage += Environment.NewLine + " HndDesc:" + Environment.NewLine +
|
||||
$" PId: {PId.ToString()}" + Environment.NewLine +
|
||||
$" ToCopy.Length: {ToCopy.Length.ToString()}" + Environment.NewLine +
|
||||
$" ToMove.Length: {ToMove.Length.ToString()}" + Environment.NewLine;
|
||||
}
|
||||
|
||||
for (int Index = 0; Index < PtrBuffCount; Index++)
|
||||
{
|
||||
long IpcPtrBuffDescWord0 = Reader.ReadUInt32();
|
||||
long IpcPtrBuffDescWord1 = Reader.ReadUInt32();
|
||||
|
||||
long Position = IpcPtrBuffDescWord1;
|
||||
Position |= (IpcPtrBuffDescWord0 << 20) & 0x0f00000000;
|
||||
Position |= (IpcPtrBuffDescWord0 << 30) & 0x7000000000;
|
||||
|
||||
int IpcPtrBuffDescIndex = ((int)IpcPtrBuffDescWord0 >> 0) & 0x03f;
|
||||
IpcPtrBuffDescIndex |= ((int)IpcPtrBuffDescWord0 >> 3) & 0x1c0;
|
||||
|
||||
short Size = (short)(IpcPtrBuffDescWord0 >> 16);
|
||||
|
||||
IpcMessage += Environment.NewLine + $" PtrBuff[{Index}]:" + Environment.NewLine +
|
||||
$" Position: {Position.ToString()}" + Environment.NewLine +
|
||||
$" IpcPtrBuffDescIndex: {IpcPtrBuffDescIndex.ToString()}" + Environment.NewLine +
|
||||
$" Size: {Size.ToString()}" + Environment.NewLine;
|
||||
}
|
||||
|
||||
ReadIpcBuffValues(Reader, SendBuffCount, IpcMessage, "SendBuff");
|
||||
ReadIpcBuffValues(Reader, RecvBuffCount, IpcMessage, "RecvBuff");
|
||||
ReadIpcBuffValues(Reader, XchgBuffCount, IpcMessage, "XchgBuff");
|
||||
|
||||
RawDataSize *= 4;
|
||||
|
||||
long RecvListPos = Reader.BaseStream.Position + RawDataSize;
|
||||
long Pad0 = 0;
|
||||
|
||||
if ((Reader.BaseStream.Position + CmdPtr & 0xf) != 0)
|
||||
{
|
||||
Pad0 = 0x10 - (Reader.BaseStream.Position + CmdPtr & 0xf);
|
||||
}
|
||||
|
||||
Reader.BaseStream.Seek(Pad0, SeekOrigin.Current);
|
||||
|
||||
int RecvListCount = RecvListFlags - 2;
|
||||
|
||||
if (RecvListCount == 0)
|
||||
{
|
||||
RecvListCount = 1;
|
||||
}
|
||||
else if (RecvListCount < 0)
|
||||
{
|
||||
RecvListCount = 0;
|
||||
}
|
||||
|
||||
if (Domain && (IpcMessageType)Type == IpcMessageType.Request)
|
||||
{
|
||||
int DomWord0 = Reader.ReadInt32();
|
||||
|
||||
int DomCmd = (DomWord0 & 0xff);
|
||||
|
||||
RawDataSize = (DomWord0 >> 16) & 0xffff;
|
||||
|
||||
int DomObjId = Reader.ReadInt32();
|
||||
|
||||
Reader.ReadInt64(); //Padding
|
||||
|
||||
IpcMessage += Environment.NewLine + $" Domain:" + Environment.NewLine + Environment.NewLine +
|
||||
$" DomObjId: {DomObjId.ToString()}" + Environment.NewLine;
|
||||
}
|
||||
|
||||
byte[] RawData = Reader.ReadBytes(RawDataSize);
|
||||
|
||||
IpcMessage += Environment.NewLine + $" RawData:" + Environment.NewLine + Logging.HexDump(RawData);
|
||||
|
||||
Reader.BaseStream.Seek(RecvListPos, SeekOrigin.Begin);
|
||||
|
||||
for (int Index = 0; Index < RecvListCount; Index++)
|
||||
{
|
||||
long RecvListBuffValue = Reader.ReadInt64();
|
||||
long RecvListBuffPosition = RecvListBuffValue & 0xffffffffffff;
|
||||
long RecvListBuffSize = (short)(RecvListBuffValue >> 48);
|
||||
|
||||
IpcMessage += Environment.NewLine + $" RecvList[{Index}]:" + Environment.NewLine +
|
||||
$" Value: {RecvListBuffValue.ToString()}" + Environment.NewLine +
|
||||
$" Position: {RecvListBuffPosition.ToString()}" + Environment.NewLine +
|
||||
$" Size: {RecvListBuffSize.ToString()}" + Environment.NewLine;
|
||||
}
|
||||
}
|
||||
|
||||
return IpcMessage;
|
||||
}
|
||||
|
||||
private static void ReadIpcBuffValues(BinaryReader Reader, int Count, string IpcMessage, string BufferName)
|
||||
{
|
||||
for (int Index = 0; Index < Count; Index++)
|
||||
{
|
||||
long Word0 = Reader.ReadUInt32();
|
||||
long Word1 = Reader.ReadUInt32();
|
||||
long Word2 = Reader.ReadUInt32();
|
||||
|
||||
long Position = Word1;
|
||||
Position |= (Word2 << 4) & 0x0f00000000;
|
||||
Position |= (Word2 << 34) & 0x7000000000;
|
||||
|
||||
long Size = Word0;
|
||||
Size |= (Word2 << 8) & 0xf00000000;
|
||||
|
||||
int Flags = (int)Word2 & 3;
|
||||
|
||||
IpcMessage += Environment.NewLine + $" {BufferName}[{Index}]:" + Environment.NewLine +
|
||||
$" Position: {Position.ToString()}" + Environment.NewLine +
|
||||
$" Flags: {Flags.ToString()}" + Environment.NewLine +
|
||||
$" Size: {Size.ToString()}" + Environment.NewLine;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -15,7 +15,7 @@ namespace Ryujinx.Core.OsHle.Ipc
|
|||
public List<IpcBuffDesc> ExchangeBuff { get; private set; }
|
||||
public List<IpcRecvListBuffDesc> RecvListBuff { get; private set; }
|
||||
|
||||
public List<int> ResponseObjIds { get; private set; }
|
||||
public List<int> ResponseObjIds { get; private set; }
|
||||
|
||||
public byte[] RawData { get; set; }
|
||||
|
||||
|
@ -84,7 +84,7 @@ namespace Ryujinx.Core.OsHle.Ipc
|
|||
|
||||
long Pad0 = GetPadSize16(Reader.BaseStream.Position + CmdPtr);
|
||||
|
||||
Reader.BaseStream.Seek(Pad0, SeekOrigin.Current);
|
||||
Reader.BaseStream.Seek(Pad0, SeekOrigin.Current);
|
||||
|
||||
int RecvListCount = RecvListFlags - 2;
|
||||
|
||||
|
@ -109,7 +109,6 @@ namespace Ryujinx.Core.OsHle.Ipc
|
|||
|
||||
public byte[] GetBytes(long CmdPtr)
|
||||
{
|
||||
//todo
|
||||
using (MemoryStream MS = new MemoryStream())
|
||||
{
|
||||
BinaryWriter Writer = new BinaryWriter(MS);
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
using ChocolArm64.Events;
|
||||
using ChocolArm64.Memory;
|
||||
using ChocolArm64.State;
|
||||
using Ryujinx.Core.Logging;
|
||||
using Ryujinx.Core.OsHle.Handles;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
@ -85,11 +86,9 @@ namespace Ryujinx.Core.OsHle.Kernel
|
|||
|
||||
if (SvcFuncs.TryGetValue(e.Id, out SvcFunc Func))
|
||||
{
|
||||
Logging.Trace(LogClass.KernelSvc, $"(Thread {ThreadState.ThreadId}) {Func.Method.Name} called.");
|
||||
|
||||
Func(ThreadState);
|
||||
|
||||
Logging.Trace(LogClass.KernelSvc, $"(Thread {ThreadState.ThreadId}) {Func.Method.Name} ended.");
|
||||
Ns.Log.PrintDebug(LogClass.KernelSvc, $"{Func.Method.Name} ended.");
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
using ChocolArm64.Memory;
|
||||
using ChocolArm64.State;
|
||||
using Ryujinx.Core.Logging;
|
||||
using Ryujinx.Core.OsHle.Handles;
|
||||
|
||||
using static Ryujinx.Core.OsHle.ErrorCode;
|
||||
|
@ -57,7 +58,7 @@ namespace Ryujinx.Core.OsHle.Kernel
|
|||
|
||||
if (!IsValidPosition(Src))
|
||||
{
|
||||
Logging.Warn(LogClass.KernelSvc, $"Tried to map Memory at invalid src address {Src:x16}!");
|
||||
Ns.Log.PrintWarning(LogClass.KernelSvc, $"Invalid src address {Src:x16}!");
|
||||
|
||||
ThreadState.X0 = MakeError(ErrorModule.Kernel, KernelErr.InvalidMemRange);
|
||||
|
||||
|
@ -66,7 +67,7 @@ namespace Ryujinx.Core.OsHle.Kernel
|
|||
|
||||
if (!IsValidMapPosition(Dst))
|
||||
{
|
||||
Logging.Warn(LogClass.KernelSvc, $"Tried to map Memory at invalid dst address {Dst:x16}!");
|
||||
Ns.Log.PrintWarning(LogClass.KernelSvc, $"Invalid dst address {Dst:x16}!");
|
||||
|
||||
ThreadState.X0 = MakeError(ErrorModule.Kernel, KernelErr.InvalidMemRange);
|
||||
|
||||
|
@ -92,7 +93,7 @@ namespace Ryujinx.Core.OsHle.Kernel
|
|||
|
||||
if (!IsValidPosition(Src))
|
||||
{
|
||||
Logging.Warn(LogClass.KernelSvc, $"Tried to unmap Memory at invalid src address {Src:x16}!");
|
||||
Ns.Log.PrintWarning(LogClass.KernelSvc, $"Invalid src address {Src:x16}!");
|
||||
|
||||
ThreadState.X0 = MakeError(ErrorModule.Kernel, KernelErr.InvalidMemRange);
|
||||
|
||||
|
@ -101,7 +102,7 @@ namespace Ryujinx.Core.OsHle.Kernel
|
|||
|
||||
if (!IsValidMapPosition(Dst))
|
||||
{
|
||||
Logging.Warn(LogClass.KernelSvc, $"Tried to unmap Memory at invalid dst address {Dst:x16}!");
|
||||
Ns.Log.PrintWarning(LogClass.KernelSvc, $"Invalid dst address {Dst:x16}!");
|
||||
|
||||
ThreadState.X0 = MakeError(ErrorModule.Kernel, KernelErr.InvalidMemRange);
|
||||
|
||||
|
@ -158,7 +159,7 @@ namespace Ryujinx.Core.OsHle.Kernel
|
|||
|
||||
if (!IsValidPosition(Src))
|
||||
{
|
||||
Logging.Warn(LogClass.KernelSvc, $"Tried to map SharedMemory at invalid address {Src:x16}!");
|
||||
Ns.Log.PrintWarning(LogClass.KernelSvc, $"Invalid address {Src:x16}!");
|
||||
|
||||
ThreadState.X0 = MakeError(ErrorModule.Kernel, KernelErr.InvalidMemRange);
|
||||
|
||||
|
@ -196,7 +197,7 @@ namespace Ryujinx.Core.OsHle.Kernel
|
|||
|
||||
if (!IsValidPosition(Src))
|
||||
{
|
||||
Logging.Warn(LogClass.KernelSvc, $"Tried to unmap SharedMemory at invalid address {Src:x16}!");
|
||||
Ns.Log.PrintWarning(LogClass.KernelSvc, $"Invalid address {Src:x16}!");
|
||||
|
||||
ThreadState.X0 = MakeError(ErrorModule.Kernel, KernelErr.InvalidMemRange);
|
||||
|
||||
|
@ -230,7 +231,7 @@ namespace Ryujinx.Core.OsHle.Kernel
|
|||
|
||||
if (!IsValidPosition(Src))
|
||||
{
|
||||
Logging.Warn(LogClass.KernelSvc, $"Tried to create TransferMemory at invalid address {Src:x16}!");
|
||||
Ns.Log.PrintWarning(LogClass.KernelSvc, $"Invalid address {Src:x16}!");
|
||||
|
||||
ThreadState.X0 = MakeError(ErrorModule.Kernel, KernelErr.InvalidMemRange);
|
||||
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
using ChocolArm64.Memory;
|
||||
using ChocolArm64.State;
|
||||
using Ryujinx.Core.Logging;
|
||||
using Ryujinx.Core.OsHle.Exceptions;
|
||||
using Ryujinx.Core.OsHle.Handles;
|
||||
using Ryujinx.Core.OsHle.Ipc;
|
||||
|
@ -39,7 +40,7 @@ namespace Ryujinx.Core.OsHle.Kernel
|
|||
|
||||
if (Obj == null)
|
||||
{
|
||||
Logging.Warn(LogClass.KernelSvc, $"Tried to CloseHandle on invalid handle 0x{Handle:x8}!");
|
||||
Ns.Log.PrintWarning(LogClass.KernelSvc, $"Tried to CloseHandle on invalid handle 0x{Handle:x8}!");
|
||||
|
||||
ThreadState.X0 = MakeError(ErrorModule.Kernel, KernelErr.InvalidHandle);
|
||||
|
||||
|
@ -75,7 +76,7 @@ namespace Ryujinx.Core.OsHle.Kernel
|
|||
}
|
||||
else
|
||||
{
|
||||
Logging.Warn(LogClass.KernelSvc, $"Tried to ResetSignal on invalid event handle 0x{Handle:x8}!");
|
||||
Ns.Log.PrintWarning(LogClass.KernelSvc, $"Invalid event handle 0x{Handle:x8}!");
|
||||
|
||||
ThreadState.X0 = MakeError(ErrorModule.Kernel, KernelErr.InvalidHandle);
|
||||
}
|
||||
|
@ -99,7 +100,7 @@ namespace Ryujinx.Core.OsHle.Kernel
|
|||
|
||||
if (SyncObj == null)
|
||||
{
|
||||
Logging.Warn(LogClass.KernelSvc, $"Tried to WaitSynchronization on invalid handle 0x{Handle:x8}!");
|
||||
Ns.Log.PrintWarning(LogClass.KernelSvc, $"Invalid handle 0x{Handle:x8}!");
|
||||
|
||||
ThreadState.X0 = MakeError(ErrorModule.Kernel, KernelErr.InvalidHandle);
|
||||
|
||||
|
@ -199,7 +200,7 @@ namespace Ryujinx.Core.OsHle.Kernel
|
|||
}
|
||||
else
|
||||
{
|
||||
Logging.Warn(LogClass.KernelSvc, $"Tried to SendSyncRequest on invalid session handle 0x{Handle:x8}!");
|
||||
Ns.Log.PrintWarning(LogClass.KernelSvc, $"Invalid session handle 0x{Handle:x8}!");
|
||||
|
||||
ThreadState.X0 = MakeError(ErrorModule.Kernel, KernelErr.InvalidHandle);
|
||||
}
|
||||
|
@ -223,7 +224,7 @@ namespace Ryujinx.Core.OsHle.Kernel
|
|||
|
||||
string Str = AMemoryHelper.ReadAsciiString(Memory, Position, Size);
|
||||
|
||||
Logging.Info(LogClass.KernelSvc, Str);
|
||||
Ns.Log.PrintWarning(LogClass.KernelSvc, Str);
|
||||
|
||||
ThreadState.X0 = 0;
|
||||
}
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
using ChocolArm64.State;
|
||||
using Ryujinx.Core.Logging;
|
||||
using Ryujinx.Core.OsHle.Handles;
|
||||
using System.Threading;
|
||||
|
||||
|
@ -49,7 +50,7 @@ namespace Ryujinx.Core.OsHle.Kernel
|
|||
}
|
||||
else
|
||||
{
|
||||
Logging.Warn(LogClass.KernelSvc, $"Invalid thread handle 0x{Handle:x8}!");
|
||||
Ns.Log.PrintWarning(LogClass.KernelSvc, $"Invalid thread handle 0x{Handle:x8}!");
|
||||
|
||||
ThreadState.X0 = MakeError(ErrorModule.Kernel, KernelErr.InvalidHandle);
|
||||
}
|
||||
|
@ -95,7 +96,7 @@ namespace Ryujinx.Core.OsHle.Kernel
|
|||
}
|
||||
else
|
||||
{
|
||||
Logging.Warn(LogClass.KernelSvc, $"Invalid thread handle 0x{Handle:x8}!");
|
||||
Ns.Log.PrintWarning(LogClass.KernelSvc, $"Invalid thread handle 0x{Handle:x8}!");
|
||||
|
||||
ThreadState.X0 = MakeError(ErrorModule.Kernel, KernelErr.InvalidHandle);
|
||||
}
|
||||
|
@ -116,7 +117,7 @@ namespace Ryujinx.Core.OsHle.Kernel
|
|||
}
|
||||
else
|
||||
{
|
||||
Logging.Warn(LogClass.KernelSvc, $"Invalid thread handle 0x{Handle:x8}!");
|
||||
Ns.Log.PrintWarning(LogClass.KernelSvc, $"Invalid thread handle 0x{Handle:x8}!");
|
||||
|
||||
ThreadState.X0 = MakeError(ErrorModule.Kernel, KernelErr.InvalidHandle);
|
||||
}
|
||||
|
@ -147,7 +148,7 @@ namespace Ryujinx.Core.OsHle.Kernel
|
|||
}
|
||||
else
|
||||
{
|
||||
Logging.Warn(LogClass.KernelSvc, $"Invalid thread handle 0x{Handle:x8}!");
|
||||
Ns.Log.PrintWarning(LogClass.KernelSvc, $"Invalid thread handle 0x{Handle:x8}!");
|
||||
|
||||
ThreadState.X0 = MakeError(ErrorModule.Kernel, KernelErr.InvalidHandle);
|
||||
}
|
||||
|
@ -168,7 +169,7 @@ namespace Ryujinx.Core.OsHle.Kernel
|
|||
}
|
||||
else
|
||||
{
|
||||
Logging.Warn(LogClass.KernelSvc, $"Invalid thread handle 0x{Handle:x8}!");
|
||||
Ns.Log.PrintWarning(LogClass.KernelSvc, $"Invalid thread handle 0x{Handle:x8}!");
|
||||
|
||||
ThreadState.X0 = MakeError(ErrorModule.Kernel, KernelErr.InvalidHandle);
|
||||
}
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
using ChocolArm64.State;
|
||||
using Ryujinx.Core.Logging;
|
||||
using Ryujinx.Core.OsHle.Handles;
|
||||
using System;
|
||||
using System.Threading;
|
||||
|
@ -19,7 +20,7 @@ namespace Ryujinx.Core.OsHle.Kernel
|
|||
|
||||
if (IsPointingInsideKernel(MutexAddress))
|
||||
{
|
||||
Logging.Warn(LogClass.KernelSvc, $"Invalid mutex address 0x{MutexAddress:x16}!");
|
||||
Ns.Log.PrintWarning(LogClass.KernelSvc, $"Invalid mutex address 0x{MutexAddress:x16}!");
|
||||
|
||||
ThreadState.X0 = MakeError(ErrorModule.Kernel, KernelErr.InvalidAddress);
|
||||
|
||||
|
@ -28,7 +29,7 @@ namespace Ryujinx.Core.OsHle.Kernel
|
|||
|
||||
if (IsWordAddressUnaligned(MutexAddress))
|
||||
{
|
||||
Logging.Warn(LogClass.KernelSvc, $"Unaligned mutex address 0x{MutexAddress:x16}!");
|
||||
Ns.Log.PrintWarning(LogClass.KernelSvc, $"Unaligned mutex address 0x{MutexAddress:x16}!");
|
||||
|
||||
ThreadState.X0 = MakeError(ErrorModule.Kernel, KernelErr.InvalidAlignment);
|
||||
|
||||
|
@ -39,7 +40,7 @@ namespace Ryujinx.Core.OsHle.Kernel
|
|||
|
||||
if (OwnerThread == null)
|
||||
{
|
||||
Logging.Warn(LogClass.KernelSvc, $"Invalid owner thread handle 0x{OwnerThreadHandle:x8}!");
|
||||
Ns.Log.PrintWarning(LogClass.KernelSvc, $"Invalid owner thread handle 0x{OwnerThreadHandle:x8}!");
|
||||
|
||||
ThreadState.X0 = MakeError(ErrorModule.Kernel, KernelErr.InvalidHandle);
|
||||
|
||||
|
@ -50,7 +51,7 @@ namespace Ryujinx.Core.OsHle.Kernel
|
|||
|
||||
if (WaitThread == null)
|
||||
{
|
||||
Logging.Warn(LogClass.KernelSvc, $"Invalid requesting thread handle 0x{WaitThreadHandle:x8}!");
|
||||
Ns.Log.PrintWarning(LogClass.KernelSvc, $"Invalid requesting thread handle 0x{WaitThreadHandle:x8}!");
|
||||
|
||||
ThreadState.X0 = MakeError(ErrorModule.Kernel, KernelErr.InvalidHandle);
|
||||
|
||||
|
@ -70,7 +71,7 @@ namespace Ryujinx.Core.OsHle.Kernel
|
|||
|
||||
if (IsPointingInsideKernel(MutexAddress))
|
||||
{
|
||||
Logging.Warn(LogClass.KernelSvc, $"Invalid mutex address 0x{MutexAddress:x16}!");
|
||||
Ns.Log.PrintWarning(LogClass.KernelSvc, $"Invalid mutex address 0x{MutexAddress:x16}!");
|
||||
|
||||
ThreadState.X0 = MakeError(ErrorModule.Kernel, KernelErr.InvalidAddress);
|
||||
|
||||
|
@ -79,7 +80,7 @@ namespace Ryujinx.Core.OsHle.Kernel
|
|||
|
||||
if (IsWordAddressUnaligned(MutexAddress))
|
||||
{
|
||||
Logging.Warn(LogClass.KernelSvc, $"Unaligned mutex address 0x{MutexAddress:x16}!");
|
||||
Ns.Log.PrintWarning(LogClass.KernelSvc, $"Unaligned mutex address 0x{MutexAddress:x16}!");
|
||||
|
||||
ThreadState.X0 = MakeError(ErrorModule.Kernel, KernelErr.InvalidAlignment);
|
||||
|
||||
|
@ -103,7 +104,7 @@ namespace Ryujinx.Core.OsHle.Kernel
|
|||
|
||||
if (IsPointingInsideKernel(MutexAddress))
|
||||
{
|
||||
Logging.Warn(LogClass.KernelSvc, $"Invalid mutex address 0x{MutexAddress:x16}!");
|
||||
Ns.Log.PrintWarning(LogClass.KernelSvc, $"Invalid mutex address 0x{MutexAddress:x16}!");
|
||||
|
||||
ThreadState.X0 = MakeError(ErrorModule.Kernel, KernelErr.InvalidAddress);
|
||||
|
||||
|
@ -112,7 +113,7 @@ namespace Ryujinx.Core.OsHle.Kernel
|
|||
|
||||
if (IsWordAddressUnaligned(MutexAddress))
|
||||
{
|
||||
Logging.Warn(LogClass.KernelSvc, $"Unaligned mutex address 0x{MutexAddress:x16}!");
|
||||
Ns.Log.PrintWarning(LogClass.KernelSvc, $"Unaligned mutex address 0x{MutexAddress:x16}!");
|
||||
|
||||
ThreadState.X0 = MakeError(ErrorModule.Kernel, KernelErr.InvalidAlignment);
|
||||
|
||||
|
@ -123,7 +124,7 @@ namespace Ryujinx.Core.OsHle.Kernel
|
|||
|
||||
if (Thread == null)
|
||||
{
|
||||
Logging.Warn(LogClass.KernelSvc, $"Invalid thread handle 0x{ThreadHandle:x8}!");
|
||||
Ns.Log.PrintWarning(LogClass.KernelSvc, $"Invalid thread handle 0x{ThreadHandle:x8}!");
|
||||
|
||||
ThreadState.X0 = MakeError(ErrorModule.Kernel, KernelErr.InvalidHandle);
|
||||
|
||||
|
@ -182,7 +183,7 @@ namespace Ryujinx.Core.OsHle.Kernel
|
|||
{
|
||||
if (CurrThread == null)
|
||||
{
|
||||
Logging.Warn(LogClass.KernelSvc, $"Invalid mutex 0x{MutexAddress:x16}!");
|
||||
Ns.Log.PrintWarning(LogClass.KernelSvc, $"Invalid mutex 0x{MutexAddress:x16}!");
|
||||
|
||||
return false;
|
||||
}
|
||||
|
@ -357,7 +358,7 @@ namespace Ryujinx.Core.OsHle.Kernel
|
|||
|
||||
if (OwnerThread == null)
|
||||
{
|
||||
Logging.Warn(LogClass.KernelSvc, $"Invalid thread handle 0x{OwnerThreadHandle:x8}!");
|
||||
Ns.Log.PrintWarning(LogClass.KernelSvc, $"Invalid thread handle 0x{OwnerThreadHandle:x8}!");
|
||||
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -4,6 +4,7 @@ using ChocolArm64.Memory;
|
|||
using ChocolArm64.State;
|
||||
using Ryujinx.Core.Loaders;
|
||||
using Ryujinx.Core.Loaders.Executables;
|
||||
using Ryujinx.Core.Logging;
|
||||
using Ryujinx.Core.OsHle.Exceptions;
|
||||
using Ryujinx.Core.OsHle.Handles;
|
||||
using Ryujinx.Core.OsHle.Kernel;
|
||||
|
@ -96,7 +97,7 @@ namespace Ryujinx.Core.OsHle
|
|||
throw new ObjectDisposedException(nameof(Process));
|
||||
}
|
||||
|
||||
Logging.Info(LogClass.Loader, $"Image base at 0x{ImageBase:x16}.");
|
||||
Ns.Log.PrintInfo(LogClass.Loader, $"Image base at 0x{ImageBase:x16}.");
|
||||
|
||||
Executable Executable = new Executable(Program, Memory, ImageBase);
|
||||
|
||||
|
@ -282,7 +283,7 @@ namespace Ryujinx.Core.OsHle
|
|||
}
|
||||
}
|
||||
|
||||
Logging.Trace(LogClass.CPU, $"Executing at 0x{e.Position:x16} {e.SubName} {NsoName}");
|
||||
Ns.Log.PrintDebug(LogClass.Cpu, $"Executing at 0x{e.Position:x16} {e.SubName} {NsoName}");
|
||||
}
|
||||
|
||||
public void PrintStackTrace(AThreadState ThreadState)
|
||||
|
@ -303,7 +304,7 @@ namespace Ryujinx.Core.OsHle
|
|||
Trace.AppendLine(" " + SubName + " (" + GetNsoNameAndAddress(Position) + ")");
|
||||
}
|
||||
|
||||
Logging.Info(LogClass.CPU, Trace.ToString());
|
||||
Ns.Log.PrintInfo(LogClass.Cpu, Trace.ToString());
|
||||
}
|
||||
|
||||
private string GetNsoNameAndAddress(long Position)
|
||||
|
@ -342,8 +343,6 @@ namespace Ryujinx.Core.OsHle
|
|||
{
|
||||
if (sender is AThread Thread)
|
||||
{
|
||||
Logging.Info(LogClass.KernelScheduler, $"Thread {Thread.ThreadId} exiting...");
|
||||
|
||||
TlsSlots.TryRemove(GetTlsSlot(Thread.ThreadState.Tpidr), out _);
|
||||
|
||||
KThread KernelThread = GetThread(Thread.ThreadState.Tpidr);
|
||||
|
@ -360,8 +359,6 @@ namespace Ryujinx.Core.OsHle
|
|||
Dispose();
|
||||
}
|
||||
|
||||
Logging.Info(LogClass.KernelScheduler, $"No threads running, now exiting Process {ProcessId}...");
|
||||
|
||||
Ns.Os.ExitProcess(ProcessId);
|
||||
}
|
||||
}
|
||||
|
@ -375,7 +372,7 @@ namespace Ryujinx.Core.OsHle
|
|||
{
|
||||
if (!Threads.TryGetValue(Tpidr, out KThread Thread))
|
||||
{
|
||||
Logging.Error(LogClass.KernelScheduler, $"Thread with TPIDR 0x{Tpidr:x16} not found!");
|
||||
throw new InvalidOperationException();
|
||||
}
|
||||
|
||||
return Thread;
|
||||
|
@ -398,7 +395,7 @@ namespace Ryujinx.Core.OsHle
|
|||
{
|
||||
ShouldDispose = true;
|
||||
|
||||
Logging.Info(LogClass.KernelScheduler, $"Process {ProcessId} waiting all threads terminate...");
|
||||
Ns.Log.PrintInfo(LogClass.Loader, $"Process {ProcessId} waiting all threads terminate...");
|
||||
|
||||
return;
|
||||
}
|
||||
|
@ -425,7 +422,7 @@ namespace Ryujinx.Core.OsHle
|
|||
|
||||
Memory.Dispose();
|
||||
|
||||
Logging.Info(LogClass.KernelScheduler, $"Process {ProcessId} exiting...");
|
||||
Ns.Log.PrintInfo(LogClass.Loader, $"Process {ProcessId} exiting...");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
using Ryujinx.Core.Logging;
|
||||
using Ryujinx.Core.OsHle.Ipc;
|
||||
using System.Collections.Generic;
|
||||
|
||||
|
@ -13,9 +14,9 @@ namespace Ryujinx.Core.OsHle.Services.Acc
|
|||
{
|
||||
m_Commands = new Dictionary<int, ServiceProcessRequest>()
|
||||
{
|
||||
{ 0, GetUserCount },
|
||||
{ 3, ListOpenUsers },
|
||||
{ 5, GetProfile },
|
||||
{ 0, GetUserCount },
|
||||
{ 3, ListOpenUsers },
|
||||
{ 5, GetProfile },
|
||||
{ 100, InitializeApplicationInfo },
|
||||
{ 101, GetBaasAccountManagerForApplication }
|
||||
};
|
||||
|
@ -25,14 +26,14 @@ namespace Ryujinx.Core.OsHle.Services.Acc
|
|||
{
|
||||
Context.ResponseData.Write(0);
|
||||
|
||||
Logging.Stub(LogClass.ServiceAcc, "Stubbed");
|
||||
Context.Ns.Log.PrintStub(LogClass.ServiceAcc, "Stubbed.");
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
public long ListOpenUsers(ServiceCtx Context)
|
||||
{
|
||||
Logging.Stub(LogClass.ServiceAcc, "Stubbed");
|
||||
Context.Ns.Log.PrintStub(LogClass.ServiceAcc, "Stubbed.");
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -46,7 +47,7 @@ namespace Ryujinx.Core.OsHle.Services.Acc
|
|||
|
||||
public long InitializeApplicationInfo(ServiceCtx Context)
|
||||
{
|
||||
Logging.Stub(LogClass.ServiceAcc, "Stubbed");
|
||||
Context.Ns.Log.PrintStub(LogClass.ServiceAcc, "Stubbed.");
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
using Ryujinx.Core.Logging;
|
||||
using Ryujinx.Core.OsHle.Ipc;
|
||||
using System.Collections.Generic;
|
||||
|
||||
|
@ -20,14 +21,14 @@ namespace Ryujinx.Core.OsHle.Services.Acc
|
|||
|
||||
public long CheckAvailability(ServiceCtx Context)
|
||||
{
|
||||
Logging.Stub(LogClass.ServiceAcc, "Stubbed");
|
||||
Context.Ns.Log.PrintStub(LogClass.ServiceAcc, "Stubbed.");
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
public long GetAccountId(ServiceCtx Context)
|
||||
{
|
||||
Logging.Stub(LogClass.ServiceAcc, "AccountId = 0xcafeL");
|
||||
Context.Ns.Log.PrintStub(LogClass.ServiceAcc, "Stubbed.");
|
||||
|
||||
Context.ResponseData.Write(0xcafeL);
|
||||
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
using Ryujinx.Core.Logging;
|
||||
using Ryujinx.Core.OsHle.Ipc;
|
||||
using System.Collections.Generic;
|
||||
|
||||
|
@ -19,7 +20,7 @@ namespace Ryujinx.Core.OsHle.Services.Acc
|
|||
|
||||
public long GetBase(ServiceCtx Context)
|
||||
{
|
||||
Logging.Stub(LogClass.ServiceAcc, "Stubbed");
|
||||
Context.Ns.Log.PrintStub(LogClass.ServiceAcc, "Stubbed.");
|
||||
|
||||
Context.ResponseData.Write(0L);
|
||||
Context.ResponseData.Write(0L);
|
||||
|
@ -28,7 +29,7 @@ namespace Ryujinx.Core.OsHle.Services.Acc
|
|||
Context.ResponseData.Write(0L);
|
||||
Context.ResponseData.Write(0L);
|
||||
Context.ResponseData.Write(0L);
|
||||
|
||||
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
using Ryujinx.Core.Logging;
|
||||
using Ryujinx.Core.OsHle.Ipc;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
|
@ -14,7 +15,7 @@ namespace Ryujinx.Core.OsHle.Services.Am
|
|||
{
|
||||
m_Commands = new Dictionary<int, ServiceProcessRequest>()
|
||||
{
|
||||
{ 1, PopLaunchParameter },
|
||||
{ 1, PopLaunchParameter },
|
||||
{ 20, EnsureSaveData },
|
||||
{ 21, GetDesiredLanguage },
|
||||
{ 22, SetTerminateResult },
|
||||
|
@ -38,7 +39,7 @@ namespace Ryujinx.Core.OsHle.Services.Am
|
|||
long UIdLow = Context.RequestData.ReadInt64();
|
||||
long UIdHigh = Context.RequestData.ReadInt64();
|
||||
|
||||
Logging.Stub(LogClass.ServiceAm, $"UidLow = {UIdLow}, UidHigh = {UIdHigh}");
|
||||
Context.Ns.Log.PrintStub(LogClass.ServiceAm, "Stubbed.");
|
||||
|
||||
Context.ResponseData.Write(0L);
|
||||
|
||||
|
@ -47,7 +48,7 @@ namespace Ryujinx.Core.OsHle.Services.Am
|
|||
|
||||
public long GetDesiredLanguage(ServiceCtx Context)
|
||||
{
|
||||
Logging.Stub(LogClass.ServiceAm, "LanguageId = 1");
|
||||
Context.Ns.Log.PrintStub(LogClass.ServiceAm, "Stubbed.");
|
||||
|
||||
//This is an enumerator where each number is a differnet language.
|
||||
//0 is Japanese and 1 is English, need to figure out the other codes.
|
||||
|
@ -60,14 +61,21 @@ namespace Ryujinx.Core.OsHle.Services.Am
|
|||
{
|
||||
int ErrorCode = Context.RequestData.ReadInt32();
|
||||
|
||||
int Module = ErrorCode & 0xFF;
|
||||
int Description = (ErrorCode >> 9) & 0xFFF;
|
||||
string Result = GetFormattedErrorCode(ErrorCode);
|
||||
|
||||
Logging.Info(LogClass.ServiceAm, $"({(ErrorModule)Module}){2000 + Module}-{Description}");
|
||||
Context.Ns.Log.PrintInfo(LogClass.ServiceAm, $"Result = 0x{ErrorCode:x8} ({Result}).");
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
private string GetFormattedErrorCode(int ErrorCode)
|
||||
{
|
||||
int Module = (ErrorCode >> 0) & 0x1ff;
|
||||
int Description = (ErrorCode >> 9) & 0x1fff;
|
||||
|
||||
return $"{(2000 + Module):d4}-{Description:d4}";
|
||||
}
|
||||
|
||||
public long GetDisplayVersion(ServiceCtx Context)
|
||||
{
|
||||
//FIXME: Need to check correct version on a switch.
|
||||
|
|
|
@ -13,13 +13,13 @@ namespace Ryujinx.Core.OsHle.Services.Am
|
|||
{
|
||||
m_Commands = new Dictionary<int, ServiceProcessRequest>()
|
||||
{
|
||||
{ 0, GetCommonStateGetter },
|
||||
{ 1, GetSelfController },
|
||||
{ 2, GetWindowController },
|
||||
{ 3, GetAudioController },
|
||||
{ 4, GetDisplayController },
|
||||
{ 11, GetLibraryAppletCreator },
|
||||
{ 20, GetApplicationFunctions },
|
||||
{ 0, GetCommonStateGetter },
|
||||
{ 1, GetSelfController },
|
||||
{ 2, GetWindowController },
|
||||
{ 3, GetAudioController },
|
||||
{ 4, GetDisplayController },
|
||||
{ 11, GetLibraryAppletCreator },
|
||||
{ 20, GetApplicationFunctions },
|
||||
{ 1000, GetDebugFunctions }
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
using Ryujinx.Core.Logging;
|
||||
using Ryujinx.Core.OsHle.Ipc;
|
||||
using System.Collections.Generic;
|
||||
|
||||
|
@ -16,7 +17,7 @@ namespace Ryujinx.Core.OsHle.Services.Am
|
|||
{ 0, SetExpectedMasterVolume },
|
||||
{ 1, GetMainAppletExpectedMasterVolume },
|
||||
{ 2, GetLibraryAppletExpectedMasterVolume },
|
||||
{ 3, ChangeMainAppletMasterVolume },
|
||||
{ 3, ChangeMainAppletMasterVolume },
|
||||
{ 4, SetTransparentVolumeRate }
|
||||
};
|
||||
}
|
||||
|
@ -26,7 +27,7 @@ namespace Ryujinx.Core.OsHle.Services.Am
|
|||
float AppletVolume = Context.RequestData.ReadSingle();
|
||||
float LibraryAppletVolume = Context.RequestData.ReadSingle();
|
||||
|
||||
Logging.Stub(LogClass.ServiceAm, "Stubbed");
|
||||
Context.Ns.Log.PrintStub(LogClass.ServiceAm, "Stubbed.");
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -35,7 +36,7 @@ namespace Ryujinx.Core.OsHle.Services.Am
|
|||
{
|
||||
Context.ResponseData.Write(1f);
|
||||
|
||||
Logging.Stub(LogClass.ServiceAm, "Stubbed");
|
||||
Context.Ns.Log.PrintStub(LogClass.ServiceAm, "Stubbed.");
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -44,7 +45,7 @@ namespace Ryujinx.Core.OsHle.Services.Am
|
|||
{
|
||||
Context.ResponseData.Write(1f);
|
||||
|
||||
Logging.Stub(LogClass.ServiceAm, "Stubbed");
|
||||
Context.Ns.Log.PrintStub(LogClass.ServiceAm, "Stubbed.");
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -54,7 +55,7 @@ namespace Ryujinx.Core.OsHle.Services.Am
|
|||
float Unknown0 = Context.RequestData.ReadSingle();
|
||||
long Unknown1 = Context.RequestData.ReadInt64();
|
||||
|
||||
Logging.Stub(LogClass.ServiceAm, "Stubbed");
|
||||
Context.Ns.Log.PrintStub(LogClass.ServiceAm, "Stubbed.");
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -63,7 +64,7 @@ namespace Ryujinx.Core.OsHle.Services.Am
|
|||
{
|
||||
float Unknown0 = Context.RequestData.ReadSingle();
|
||||
|
||||
Logging.Stub(LogClass.ServiceAm, "Stubbed");
|
||||
Context.Ns.Log.PrintStub(LogClass.ServiceAm, "Stubbed.");
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
using Ryujinx.Core.Logging;
|
||||
using Ryujinx.Core.OsHle.Handles;
|
||||
using Ryujinx.Core.OsHle.Ipc;
|
||||
using System.Collections.Generic;
|
||||
|
@ -66,7 +67,7 @@ namespace Ryujinx.Core.OsHle.Services.Am
|
|||
{
|
||||
Context.ResponseData.Write((byte)0); //Unknown value.
|
||||
|
||||
Logging.Stub(LogClass.ServiceAm, "Stubbed");
|
||||
Context.Ns.Log.PrintStub(LogClass.ServiceAm, "Stubbed.");
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
using Ryujinx.Core.Logging;
|
||||
using Ryujinx.Core.OsHle.Handles;
|
||||
using Ryujinx.Core.OsHle.Ipc;
|
||||
using System.Collections.Generic;
|
||||
|
@ -26,7 +27,7 @@ namespace Ryujinx.Core.OsHle.Services.Am
|
|||
|
||||
public long RequestToGetForeground(ServiceCtx Context)
|
||||
{
|
||||
Logging.Stub(LogClass.ServiceAm, "Stubbed");
|
||||
Context.Ns.Log.PrintStub(LogClass.ServiceAm, "Stubbed.");
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -37,7 +38,7 @@ namespace Ryujinx.Core.OsHle.Services.Am
|
|||
|
||||
Context.Response.HandleDesc = IpcHandleDesc.MakeCopy(Handle);
|
||||
|
||||
Logging.Stub(LogClass.ServiceAm, "Stubbed");
|
||||
Context.Ns.Log.PrintStub(LogClass.ServiceAm, "Stubbed.");
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
using Ryujinx.Core.Logging;
|
||||
using Ryujinx.Core.OsHle.Ipc;
|
||||
using System.Collections.Generic;
|
||||
|
||||
|
@ -33,7 +34,7 @@ namespace Ryujinx.Core.OsHle.Services.Am
|
|||
{
|
||||
bool Enable = Context.RequestData.ReadByte() != 0 ? true : false;
|
||||
|
||||
Logging.Stub(LogClass.ServiceAm, $"ScreenShot Allowed = {Enable}");
|
||||
Context.Ns.Log.PrintStub(LogClass.ServiceAm, "Stubbed.");
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -42,7 +43,7 @@ namespace Ryujinx.Core.OsHle.Services.Am
|
|||
{
|
||||
bool Enable = Context.RequestData.ReadByte() != 0 ? true : false;
|
||||
|
||||
Logging.Stub(LogClass.ServiceAm, $"OperationMode Changed = {Enable}");
|
||||
Context.Ns.Log.PrintStub(LogClass.ServiceAm, "Stubbed.");
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -51,7 +52,7 @@ namespace Ryujinx.Core.OsHle.Services.Am
|
|||
{
|
||||
bool Enable = Context.RequestData.ReadByte() != 0 ? true : false;
|
||||
|
||||
Logging.Stub(LogClass.ServiceAm, $"PerformanceMode Changed = {Enable}");
|
||||
Context.Ns.Log.PrintStub(LogClass.ServiceAm, "Stubbed.");
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -62,7 +63,7 @@ namespace Ryujinx.Core.OsHle.Services.Am
|
|||
bool Flag2 = Context.RequestData.ReadByte() != 0 ? true : false;
|
||||
bool Flag3 = Context.RequestData.ReadByte() != 0 ? true : false;
|
||||
|
||||
Logging.Stub(LogClass.ServiceAm, $"Focus Handling Mode Flags = {{{Flag1}|{Flag2}|{Flag3}}}");
|
||||
Context.Ns.Log.PrintStub(LogClass.ServiceAm, "Stubbed.");
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -71,7 +72,7 @@ namespace Ryujinx.Core.OsHle.Services.Am
|
|||
{
|
||||
bool Enable = Context.RequestData.ReadByte() != 0 ? true : false;
|
||||
|
||||
Logging.Stub(LogClass.ServiceAm, $"Restart Message Enabled = {Enable}");
|
||||
Context.Ns.Log.PrintStub(LogClass.ServiceAm, "Stubbed.");
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -80,7 +81,7 @@ namespace Ryujinx.Core.OsHle.Services.Am
|
|||
{
|
||||
bool Enable = Context.RequestData.ReadByte() != 0 ? true : false;
|
||||
|
||||
Logging.Stub(LogClass.ServiceAm, $"Out Of Focus Suspending Enabled = {Enable}");
|
||||
Context.Ns.Log.PrintStub(LogClass.ServiceAm, "Stubbed.");
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -89,7 +90,7 @@ namespace Ryujinx.Core.OsHle.Services.Am
|
|||
{
|
||||
bool Enable = Context.RequestData.ReadByte() != 0 ? true : false;
|
||||
|
||||
Logging.Stub(LogClass.ServiceAm, $"HandlesRequestToDisplay Allowed = {Enable}");
|
||||
Context.Ns.Log.PrintStub(LogClass.ServiceAm, "Stubbed.");
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -17,7 +17,7 @@ namespace Ryujinx.Core.OsHle.Services.Am
|
|||
{
|
||||
m_Commands = new Dictionary<int, ServiceProcessRequest>()
|
||||
{
|
||||
{ 0, GetSize },
|
||||
{ 0, GetSize },
|
||||
{ 11, Read }
|
||||
};
|
||||
|
||||
|
@ -45,7 +45,7 @@ namespace Ryujinx.Core.OsHle.Services.Am
|
|||
if (Storage.Data.Length > Size)
|
||||
{
|
||||
Data = new byte[Size];
|
||||
|
||||
|
||||
Buffer.BlockCopy(Storage.Data, 0, Data, 0, Size);
|
||||
}
|
||||
else
|
||||
|
|
|
@ -13,15 +13,15 @@ namespace Ryujinx.Core.OsHle.Services.Am
|
|||
{
|
||||
m_Commands = new Dictionary<int, ServiceProcessRequest>()
|
||||
{
|
||||
{ 0, GetCommonStateGetter },
|
||||
{ 1, GetSelfController },
|
||||
{ 2, GetWindowController },
|
||||
{ 3, GetAudioController },
|
||||
{ 4, GetDisplayController },
|
||||
{ 11, GetLibraryAppletCreator },
|
||||
{ 20, GetHomeMenuFunctions },
|
||||
{ 21, GetGlobalStateController },
|
||||
{ 22, GetApplicationCreator },
|
||||
{ 0, GetCommonStateGetter },
|
||||
{ 1, GetSelfController },
|
||||
{ 2, GetWindowController },
|
||||
{ 3, GetAudioController },
|
||||
{ 4, GetDisplayController },
|
||||
{ 11, GetLibraryAppletCreator },
|
||||
{ 20, GetHomeMenuFunctions },
|
||||
{ 21, GetGlobalStateController },
|
||||
{ 22, GetApplicationCreator },
|
||||
{ 1000, GetDebugFunctions }
|
||||
};
|
||||
}
|
||||
|
@ -45,8 +45,8 @@ namespace Ryujinx.Core.OsHle.Services.Am
|
|||
MakeObject(Context, new IWindowController());
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public long GetAudioController(ServiceCtx Context)
|
||||
{
|
||||
MakeObject(Context, new IAudioController());
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
using Ryujinx.Core.Logging;
|
||||
using Ryujinx.Core.OsHle.Ipc;
|
||||
using System.Collections.Generic;
|
||||
|
||||
|
@ -13,14 +14,14 @@ namespace Ryujinx.Core.OsHle.Services.Am
|
|||
{
|
||||
m_Commands = new Dictionary<int, ServiceProcessRequest>()
|
||||
{
|
||||
{ 1, GetAppletResourceUserId },
|
||||
{ 1, GetAppletResourceUserId },
|
||||
{ 10, AcquireForegroundRights }
|
||||
};
|
||||
}
|
||||
|
||||
public long GetAppletResourceUserId(ServiceCtx Context)
|
||||
{
|
||||
Logging.Stub(LogClass.ServiceAm, $"Applet Resource Id = 0");
|
||||
Context.Ns.Log.PrintStub(LogClass.ServiceAm, "Stubbed.");
|
||||
|
||||
Context.ResponseData.Write(0L);
|
||||
|
||||
|
@ -29,7 +30,7 @@ namespace Ryujinx.Core.OsHle.Services.Am
|
|||
|
||||
public long AcquireForegroundRights(ServiceCtx Context)
|
||||
{
|
||||
Logging.Stub(LogClass.ServiceAm, "Stubbed");
|
||||
Context.Ns.Log.PrintStub(LogClass.ServiceAm, "Stubbed.");
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
using Ryujinx.Core.Logging;
|
||||
using Ryujinx.Core.OsHle.Ipc;
|
||||
using System.Collections.Generic;
|
||||
|
||||
|
@ -32,8 +33,7 @@ namespace Ryujinx.Core.OsHle.Services.Apm
|
|||
|
||||
Context.ResponseData.Write((uint)PerformanceConfiguration.PerformanceConfiguration1);
|
||||
|
||||
Logging.Stub(LogClass.ServiceApm, $"PerformanceMode = {PerfMode}, PerformanceConfiguration =" +
|
||||
$" {PerformanceConfiguration.PerformanceConfiguration1}");
|
||||
Context.Ns.Log.PrintStub(LogClass.ServiceApm, "Stubbed.");
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
using ChocolArm64.Memory;
|
||||
using Ryujinx.Core.Logging;
|
||||
using Ryujinx.Core.OsHle.Handles;
|
||||
using Ryujinx.Core.OsHle.Ipc;
|
||||
using System.Collections.Generic;
|
||||
|
@ -68,7 +69,7 @@ namespace Ryujinx.Core.OsHle.Services.Aud
|
|||
|
||||
string Name = AMemoryHelper.ReadAsciiString(Context.Memory, Position, Size);
|
||||
|
||||
Logging.Stub(LogClass.ServiceAudio, $"Volume = {Volume}, Position = {Position}, Size = {Size}");
|
||||
Context.Ns.Log.PrintStub(LogClass.ServiceAudio, "Stubbed.");
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -93,7 +94,7 @@ namespace Ryujinx.Core.OsHle.Services.Aud
|
|||
|
||||
Context.Response.HandleDesc = IpcHandleDesc.MakeCopy(Handle);
|
||||
|
||||
Logging.Stub(LogClass.ServiceAudio, "Stubbed");
|
||||
Context.Ns.Log.PrintStub(LogClass.ServiceAudio, "Stubbed.");
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -102,7 +103,7 @@ namespace Ryujinx.Core.OsHle.Services.Aud
|
|||
{
|
||||
Context.ResponseData.Write(2);
|
||||
|
||||
Logging.Stub(LogClass.ServiceAudio, "Stubbed");
|
||||
Context.Ns.Log.PrintStub(LogClass.ServiceAudio, "Stubbed.");
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
using ChocolArm64.Memory;
|
||||
using Ryujinx.Audio;
|
||||
using Ryujinx.Core.Logging;
|
||||
using Ryujinx.Core.OsHle.Handles;
|
||||
using Ryujinx.Core.OsHle.Ipc;
|
||||
using System;
|
||||
|
@ -67,7 +68,7 @@ namespace Ryujinx.Core.OsHle.Services.Aud
|
|||
AudioOutData Data = AMemoryHelper.Read<AudioOutData>(
|
||||
Context.Memory,
|
||||
Context.Request.SendBuff[0].Position);
|
||||
|
||||
|
||||
byte[] Buffer = AMemoryHelper.ReadBytes(
|
||||
Context.Memory,
|
||||
Data.SampleBufferPtr,
|
||||
|
@ -124,14 +125,14 @@ namespace Ryujinx.Core.OsHle.Services.Aud
|
|||
|
||||
public long AppendAudioOutBufferEx(ServiceCtx Context)
|
||||
{
|
||||
Logging.Stub(LogClass.ServiceAudio, "Stubbed");
|
||||
Context.Ns.Log.PrintStub(LogClass.ServiceAudio, "Stubbed.");
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
public long GetReleasedAudioOutBufferEx(ServiceCtx Context)
|
||||
{
|
||||
Logging.Stub(LogClass.ServiceAudio, "Stubbed");
|
||||
Context.Ns.Log.PrintStub(LogClass.ServiceAudio, "Stubbed.");
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
using Ryujinx.Core.Logging;
|
||||
using Ryujinx.Core.OsHle.Handles;
|
||||
using Ryujinx.Core.OsHle.Ipc;
|
||||
using System;
|
||||
|
@ -54,14 +55,14 @@ namespace Ryujinx.Core.OsHle.Services.Aud
|
|||
|
||||
public long StartAudioRenderer(ServiceCtx Context)
|
||||
{
|
||||
Logging.Stub(LogClass.ServiceAudio, "Stubbed");
|
||||
Context.Ns.Log.PrintStub(LogClass.ServiceAudio, "Stubbed.");
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
public long StopAudioRenderer(ServiceCtx Context)
|
||||
{
|
||||
Logging.Stub(LogClass.ServiceAudio, "Stubbed");
|
||||
Context.Ns.Log.PrintStub(LogClass.ServiceAudio, "Stubbed.");
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
using Ryujinx.Core.Logging;
|
||||
using Ryujinx.Core.OsHle.Ipc;
|
||||
using System.Collections.Generic;
|
||||
|
||||
|
@ -42,7 +43,7 @@ namespace Ryujinx.Core.OsHle.Services.Aud
|
|||
int Unknown2c = Context.RequestData.ReadInt32();
|
||||
int Rev1Magic = Context.RequestData.ReadInt32();
|
||||
|
||||
Logging.Stub(LogClass.ServiceAudio, "BufferSize = 0x400L");
|
||||
Context.Ns.Log.PrintStub(LogClass.ServiceAudio, "Stubbed.");
|
||||
|
||||
Context.ResponseData.Write(0x400L);
|
||||
|
||||
|
|
|
@ -21,11 +21,11 @@ namespace Ryujinx.Core.OsHle.Services.Bsd
|
|||
{
|
||||
m_Commands = new Dictionary<int, ServiceProcessRequest>()
|
||||
{
|
||||
{ 0, Initialize },
|
||||
{ 1, StartMonitoring },
|
||||
{ 2, Socket },
|
||||
{ 6, Poll },
|
||||
{ 8, Recv },
|
||||
{ 0, Initialize },
|
||||
{ 1, StartMonitoring },
|
||||
{ 2, Socket },
|
||||
{ 6, Poll },
|
||||
{ 8, Recv },
|
||||
{ 10, Send },
|
||||
{ 11, SendTo },
|
||||
{ 12, Accept },
|
||||
|
@ -428,9 +428,8 @@ namespace Ryujinx.Core.OsHle.Services.Bsd
|
|||
Reader.ReadByte().ToString() + "." +
|
||||
Reader.ReadByte().ToString();
|
||||
|
||||
Logging.Debug(LogClass.ServiceBsd, $"Try to connect to {IpAddress}:{Port}");
|
||||
|
||||
Sockets[SocketId].IpAddress = IPAddress.Parse(IpAddress);
|
||||
|
||||
Sockets[SocketId].RemoteEP = new IPEndPoint(Sockets[SocketId].IpAddress, Port);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -22,16 +22,16 @@ namespace Ryujinx.Core.OsHle.Services.FspSrv
|
|||
{
|
||||
m_Commands = new Dictionary<int, ServiceProcessRequest>()
|
||||
{
|
||||
{ 0, CreateFile },
|
||||
{ 1, DeleteFile },
|
||||
{ 2, CreateDirectory },
|
||||
{ 3, DeleteDirectory },
|
||||
{ 4, DeleteDirectoryRecursively },
|
||||
{ 5, RenameFile },
|
||||
{ 6, RenameDirectory },
|
||||
{ 7, GetEntryType },
|
||||
{ 8, OpenFile },
|
||||
{ 9, OpenDirectory },
|
||||
{ 0, CreateFile },
|
||||
{ 1, DeleteFile },
|
||||
{ 2, CreateDirectory },
|
||||
{ 3, DeleteDirectory },
|
||||
{ 4, DeleteDirectoryRecursively },
|
||||
{ 5, RenameFile },
|
||||
{ 6, RenameDirectory },
|
||||
{ 7, GetEntryType },
|
||||
{ 8, OpenFile },
|
||||
{ 9, OpenDirectory },
|
||||
{ 10, Commit },
|
||||
{ 11, GetFreeSpaceSize },
|
||||
{ 12, GetTotalSpaceSize },
|
||||
|
|
|
@ -13,11 +13,11 @@ namespace Ryujinx.Core.OsHle.Services.FspSrv
|
|||
{
|
||||
m_Commands = new Dictionary<int, ServiceProcessRequest>()
|
||||
{
|
||||
{ 1, SetCurrentProcess },
|
||||
{ 18, OpenSdCardFileSystem },
|
||||
{ 51, OpenSaveDataFileSystem },
|
||||
{ 200, OpenDataStorageByCurrentProcess },
|
||||
{ 203, OpenPatchDataStorageByCurrentProcess },
|
||||
{ 1, SetCurrentProcess },
|
||||
{ 18, OpenSdCardFileSystem },
|
||||
{ 51, OpenSaveDataFileSystem },
|
||||
{ 200, OpenDataStorageByCurrentProcess },
|
||||
{ 203, OpenPatchDataStorageByCurrentProcess },
|
||||
{ 1005, GetGlobalAccessLogMode }
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
using Ryujinx.Core.Input;
|
||||
using Ryujinx.Core.Logging;
|
||||
using Ryujinx.Core.OsHle.Ipc;
|
||||
using System.Collections.Generic;
|
||||
|
||||
|
@ -14,13 +15,13 @@ namespace Ryujinx.Core.OsHle.Services.Hid
|
|||
{
|
||||
m_Commands = new Dictionary<int, ServiceProcessRequest>()
|
||||
{
|
||||
{ 0, CreateAppletResource },
|
||||
{ 1, ActivateDebugPad },
|
||||
{ 11, ActivateTouchScreen },
|
||||
{ 21, ActivateMouse },
|
||||
{ 31, ActivateKeyboard },
|
||||
{ 66, StartSixAxisSensor },
|
||||
{ 79, SetGyroscopeZeroDriftMode },
|
||||
{ 0, CreateAppletResource },
|
||||
{ 1, ActivateDebugPad },
|
||||
{ 11, ActivateTouchScreen },
|
||||
{ 21, ActivateMouse },
|
||||
{ 31, ActivateKeyboard },
|
||||
{ 66, StartSixAxisSensor },
|
||||
{ 79, SetGyroscopeZeroDriftMode },
|
||||
{ 100, SetSupportedNpadStyleSet },
|
||||
{ 101, GetSupportedNpadStyleSet },
|
||||
{ 102, SetSupportedNpadIdType },
|
||||
|
@ -49,7 +50,7 @@ namespace Ryujinx.Core.OsHle.Services.Hid
|
|||
|
||||
public long ActivateDebugPad(ServiceCtx Context)
|
||||
{
|
||||
Logging.Stub(LogClass.ServiceHid, "Stubbed");
|
||||
Context.Ns.Log.PrintStub(LogClass.ServiceHid, "Stubbed.");
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -58,7 +59,7 @@ namespace Ryujinx.Core.OsHle.Services.Hid
|
|||
{
|
||||
long AppletResourceUserId = Context.RequestData.ReadInt64();
|
||||
|
||||
Logging.Stub(LogClass.ServiceHid, "Stubbed");
|
||||
Context.Ns.Log.PrintStub(LogClass.ServiceHid, "Stubbed.");
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -67,7 +68,7 @@ namespace Ryujinx.Core.OsHle.Services.Hid
|
|||
{
|
||||
long AppletResourceUserId = Context.RequestData.ReadInt64();
|
||||
|
||||
Logging.Stub(LogClass.ServiceHid, "Stubbed");
|
||||
Context.Ns.Log.PrintStub(LogClass.ServiceHid, "Stubbed.");
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -76,7 +77,7 @@ namespace Ryujinx.Core.OsHle.Services.Hid
|
|||
{
|
||||
long AppletResourceUserId = Context.RequestData.ReadInt64();
|
||||
|
||||
Logging.Stub(LogClass.ServiceHid, "Stubbed");
|
||||
Context.Ns.Log.PrintStub(LogClass.ServiceHid, "Stubbed.");
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -87,18 +88,18 @@ namespace Ryujinx.Core.OsHle.Services.Hid
|
|||
|
||||
long AppletResourceUserId = Context.RequestData.ReadInt64();
|
||||
|
||||
Logging.Stub(LogClass.ServiceHid, "Stubbed");
|
||||
Context.Ns.Log.PrintStub(LogClass.ServiceHid, "Stubbed.");
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
public long SetGyroscopeZeroDriftMode(ServiceCtx Context)
|
||||
{
|
||||
int Handle = Context.RequestData.ReadInt32();
|
||||
int Unknown = Context.RequestData.ReadInt32();
|
||||
int Handle = Context.RequestData.ReadInt32();
|
||||
int Unknown = Context.RequestData.ReadInt32();
|
||||
long AppletResourceUserId = Context.RequestData.ReadInt64();
|
||||
|
||||
Logging.Stub(LogClass.ServiceHid, "Stubbed");
|
||||
Context.Ns.Log.PrintStub(LogClass.ServiceHid, "Stubbed.");
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -107,7 +108,7 @@ namespace Ryujinx.Core.OsHle.Services.Hid
|
|||
{
|
||||
Context.ResponseData.Write(0);
|
||||
|
||||
Logging.Stub(LogClass.ServiceHid, "Stubbed");
|
||||
Context.Ns.Log.PrintStub(LogClass.ServiceHid, "Stubbed.");
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -117,7 +118,7 @@ namespace Ryujinx.Core.OsHle.Services.Hid
|
|||
long Unknown0 = Context.RequestData.ReadInt64();
|
||||
long Unknown8 = Context.RequestData.ReadInt64();
|
||||
|
||||
Logging.Stub(LogClass.ServiceHid, "Stubbed");
|
||||
Context.Ns.Log.PrintStub(LogClass.ServiceHid, "Stubbed.");
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -126,7 +127,7 @@ namespace Ryujinx.Core.OsHle.Services.Hid
|
|||
{
|
||||
long Unknown = Context.RequestData.ReadInt64();
|
||||
|
||||
Logging.Stub(LogClass.ServiceHid, "Stubbed");
|
||||
Context.Ns.Log.PrintStub(LogClass.ServiceHid, "Stubbed.");
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -135,7 +136,7 @@ namespace Ryujinx.Core.OsHle.Services.Hid
|
|||
{
|
||||
long Unknown = Context.RequestData.ReadInt64();
|
||||
|
||||
Logging.Stub(LogClass.ServiceHid, "Stubbed");
|
||||
Context.Ns.Log.PrintStub(LogClass.ServiceHid, "Stubbed.");
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -146,7 +147,7 @@ namespace Ryujinx.Core.OsHle.Services.Hid
|
|||
|
||||
Context.ResponseData.Write(0L);
|
||||
|
||||
Logging.Stub(LogClass.ServiceHid, "Stubbed");
|
||||
Context.Ns.Log.PrintStub(LogClass.ServiceHid, "Stubbed.");
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -156,7 +157,7 @@ namespace Ryujinx.Core.OsHle.Services.Hid
|
|||
long Unknown0 = Context.RequestData.ReadInt64();
|
||||
long Unknown8 = Context.RequestData.ReadInt64();
|
||||
|
||||
Logging.Stub(LogClass.ServiceHid, "Stubbed");
|
||||
Context.Ns.Log.PrintStub(LogClass.ServiceHid, "Stubbed.");
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -165,7 +166,7 @@ namespace Ryujinx.Core.OsHle.Services.Hid
|
|||
{
|
||||
Context.ResponseData.Write(0L);
|
||||
|
||||
Logging.Stub(LogClass.ServiceHid, "Stubbed");
|
||||
Context.Ns.Log.PrintStub(LogClass.ServiceHid, "Stubbed.");
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -173,9 +174,10 @@ namespace Ryujinx.Core.OsHle.Services.Hid
|
|||
public long SetNpadJoyAssignmentModeSingleByDefault(ServiceCtx Context)
|
||||
{
|
||||
HidControllerId HidControllerId = (HidControllerId)Context.RequestData.ReadInt32();
|
||||
|
||||
long AppletUserResourceId = Context.RequestData.ReadInt64();
|
||||
|
||||
Logging.Stub(LogClass.ServiceHid, "Stubbed");
|
||||
Context.Ns.Log.PrintStub(LogClass.ServiceHid, "Stubbed.");
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -183,10 +185,11 @@ namespace Ryujinx.Core.OsHle.Services.Hid
|
|||
public long SetNpadJoyAssignmentModeSingle(ServiceCtx Context)
|
||||
{
|
||||
HidControllerId HidControllerId = (HidControllerId)Context.RequestData.ReadInt32();
|
||||
long AppletUserResourceId = Context.RequestData.ReadInt64();
|
||||
long NpadJoyDeviceType = Context.RequestData.ReadInt64();
|
||||
|
||||
Logging.Stub(LogClass.ServiceHid, "Stubbed");
|
||||
long AppletUserResourceId = Context.RequestData.ReadInt64();
|
||||
long NpadJoyDeviceType = Context.RequestData.ReadInt64();
|
||||
|
||||
Context.Ns.Log.PrintStub(LogClass.ServiceHid, "Stubbed.");
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -194,20 +197,21 @@ namespace Ryujinx.Core.OsHle.Services.Hid
|
|||
public long SetNpadJoyAssignmentModeDual(ServiceCtx Context)
|
||||
{
|
||||
HidControllerId HidControllerId = (HidControllerId)Context.RequestData.ReadInt32();
|
||||
|
||||
long AppletUserResourceId = Context.RequestData.ReadInt64();
|
||||
|
||||
Logging.Stub(LogClass.ServiceHid, "Stubbed");
|
||||
Context.Ns.Log.PrintStub(LogClass.ServiceHid, "Stubbed.");
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
public long MergeSingleJoyAsDualJoy(ServiceCtx Context)
|
||||
{
|
||||
long Unknown0 = Context.RequestData.ReadInt32();
|
||||
long Unknown8 = Context.RequestData.ReadInt32();
|
||||
long Unknown0 = Context.RequestData.ReadInt32();
|
||||
long Unknown8 = Context.RequestData.ReadInt32();
|
||||
long AppletUserResourceId = Context.RequestData.ReadInt64();
|
||||
|
||||
Logging.Stub(LogClass.ServiceHid, "Stubbed");
|
||||
Context.Ns.Log.PrintStub(LogClass.ServiceHid, "Stubbed.");
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -215,9 +219,9 @@ namespace Ryujinx.Core.OsHle.Services.Hid
|
|||
public long SetNpadHandheldActivationMode(ServiceCtx Context)
|
||||
{
|
||||
long AppletUserResourceId = Context.RequestData.ReadInt64();
|
||||
long Unknown = Context.RequestData.ReadInt64();
|
||||
long Unknown = Context.RequestData.ReadInt64();
|
||||
|
||||
Logging.Stub(LogClass.ServiceHid, "Stubbed");
|
||||
Context.Ns.Log.PrintStub(LogClass.ServiceHid, "Stubbed.");
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -226,7 +230,7 @@ namespace Ryujinx.Core.OsHle.Services.Hid
|
|||
{
|
||||
int VibrationDeviceHandle = Context.RequestData.ReadInt32();
|
||||
|
||||
Logging.Stub(LogClass.ServiceHid, $"VibrationDeviceHandle = {VibrationDeviceHandle}, VibrationDeviceInfo = 0");
|
||||
Context.Ns.Log.PrintStub(LogClass.ServiceHid, "Stubbed.");
|
||||
|
||||
Context.ResponseData.Write(0L); //VibrationDeviceInfoForIpc
|
||||
|
||||
|
@ -244,7 +248,7 @@ namespace Ryujinx.Core.OsHle.Services.Hid
|
|||
|
||||
long AppletUserResourceId = Context.RequestData.ReadInt64();
|
||||
|
||||
Logging.Stub(LogClass.ServiceHid, "Stubbed");
|
||||
Context.Ns.Log.PrintStub(LogClass.ServiceHid, "Stubbed.");
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -258,7 +262,7 @@ namespace Ryujinx.Core.OsHle.Services.Hid
|
|||
|
||||
public long SendVibrationValues(ServiceCtx Context)
|
||||
{
|
||||
Logging.Stub(LogClass.ServiceHid, "Stubbed");
|
||||
Context.Ns.Log.PrintStub(LogClass.ServiceHid, "Stubbed.");
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
using Ryujinx.Core.Logging;
|
||||
using Ryujinx.Core.OsHle.Handles;
|
||||
using Ryujinx.Core.OsHle.Ipc;
|
||||
using System;
|
||||
|
@ -81,7 +82,7 @@ namespace Ryujinx.Core.OsHle.Services
|
|||
{
|
||||
Context.ResponseData.BaseStream.Seek(IsDomain ? 0x20 : 0x10, SeekOrigin.Begin);
|
||||
|
||||
Logging.Trace(LogClass.KernelIpc, $"{Service.GetType().Name}: {ProcessRequest.Method.Name}");
|
||||
Context.Ns.Log.PrintDebug(LogClass.KernelIpc, $"{Service.GetType().Name}: {ProcessRequest.Method.Name}");
|
||||
|
||||
long Result = ProcessRequest(Context);
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
using ChocolArm64.Memory;
|
||||
using Ryujinx.Core.Logging;
|
||||
using Ryujinx.Core.OsHle.Ipc;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Text;
|
||||
|
@ -21,123 +21,68 @@ namespace Ryujinx.Core.OsHle.Services.Lm
|
|||
};
|
||||
}
|
||||
|
||||
enum Flags
|
||||
{
|
||||
Padding,
|
||||
IsHead,
|
||||
IsTail
|
||||
}
|
||||
|
||||
enum Severity
|
||||
{
|
||||
Trace,
|
||||
Info,
|
||||
Warning,
|
||||
Error,
|
||||
Critical
|
||||
}
|
||||
|
||||
enum Field
|
||||
{
|
||||
Padding,
|
||||
Skip,
|
||||
Message,
|
||||
Line,
|
||||
Filename,
|
||||
Function,
|
||||
Module,
|
||||
Thread
|
||||
}
|
||||
|
||||
public long Log(ServiceCtx Context)
|
||||
{
|
||||
long BufferPosition = Context.Request.PtrBuff[0].Position;
|
||||
long BufferLen = Context.Request.PtrBuff[0].Size;
|
||||
byte[] LogBuffer = AMemoryHelper.ReadBytes(
|
||||
Context.Memory,
|
||||
Context.Request.PtrBuff[0].Position,
|
||||
Context.Request.PtrBuff[0].Size);
|
||||
|
||||
byte[] LogBuffer = AMemoryHelper.ReadBytes(Context.Memory, BufferPosition, BufferLen);
|
||||
|
||||
MemoryStream LogMessage = new MemoryStream(LogBuffer);
|
||||
BinaryReader bReader = new BinaryReader(LogMessage);
|
||||
|
||||
//Header reading.
|
||||
long Pid = bReader.ReadInt64();
|
||||
long ThreadCxt = bReader.ReadInt64();
|
||||
int Infos = bReader.ReadInt32();
|
||||
int PayloadLen = bReader.ReadInt32();
|
||||
|
||||
int iFlags = Infos & 0xFFFF;
|
||||
int iSeverity = (Infos >> 17) & 0x7F;
|
||||
int iVerbosity = (Infos >> 25) & 0x7F;
|
||||
|
||||
//ToDo: For now we don't care about Head or Tail Log.
|
||||
bool IsHeadLog = Convert.ToBoolean(iFlags & (int)Flags.IsHead);
|
||||
bool IsTailLog = Convert.ToBoolean(iFlags & (int)Flags.IsTail);
|
||||
|
||||
string LogString = "nn::diag::detail::LogImpl()" + Environment.NewLine + Environment.NewLine +
|
||||
"Header:" + Environment.NewLine +
|
||||
$" Pid: {Pid}" + Environment.NewLine +
|
||||
$" ThreadContext: {ThreadCxt}" + Environment.NewLine +
|
||||
$" Flags: {IsHeadLog}/{IsTailLog}" + Environment.NewLine +
|
||||
$" Severity: {Enum.GetName(typeof(Severity), iSeverity)}" + Environment.NewLine +
|
||||
$" Verbosity: {iVerbosity}";
|
||||
|
||||
LogString += Environment.NewLine + Environment.NewLine + "Message:" + Environment.NewLine;
|
||||
|
||||
string StrMessage = "", StrLine = "", StrFilename = "", StrFunction = "",
|
||||
StrModule = "", StrThread = "";
|
||||
|
||||
do
|
||||
using (MemoryStream MS = new MemoryStream(LogBuffer))
|
||||
{
|
||||
byte FieldType = bReader.ReadByte();
|
||||
byte FieldSize = bReader.ReadByte();
|
||||
BinaryReader Reader = new BinaryReader(MS);
|
||||
|
||||
if ((Field)FieldType != Field.Skip || FieldSize != 0)
|
||||
long Pid = Reader.ReadInt64();
|
||||
long ThreadContext = Reader.ReadInt64();
|
||||
short Flags = Reader.ReadInt16();
|
||||
byte Level = Reader.ReadByte();
|
||||
byte Verbosity = Reader.ReadByte();
|
||||
int PayloadLength = Reader.ReadInt32();
|
||||
|
||||
StringBuilder SB = new StringBuilder();
|
||||
|
||||
SB.AppendLine("Guest log:");
|
||||
|
||||
while (MS.Position < MS.Length)
|
||||
{
|
||||
byte[] Message = bReader.ReadBytes(FieldSize);
|
||||
switch ((Field)FieldType)
|
||||
byte Type = Reader.ReadByte();
|
||||
byte Size = Reader.ReadByte();
|
||||
|
||||
LmLogField Field = (LmLogField)Type;
|
||||
|
||||
string FieldStr = string.Empty;
|
||||
|
||||
if (Field == LmLogField.Skip)
|
||||
{
|
||||
case Field.Message:
|
||||
StrMessage = Encoding.UTF8.GetString(Message);
|
||||
break;
|
||||
Reader.ReadByte();
|
||||
|
||||
case Field.Line:
|
||||
StrLine = BitConverter.ToInt32(Message, 0).ToString();
|
||||
break;
|
||||
|
||||
case Field.Filename:
|
||||
StrFilename = Encoding.UTF8.GetString(Message);
|
||||
break;
|
||||
|
||||
case Field.Function:
|
||||
StrFunction = Encoding.UTF8.GetString(Message);
|
||||
break;
|
||||
|
||||
case Field.Module:
|
||||
StrModule = Encoding.UTF8.GetString(Message);
|
||||
break;
|
||||
|
||||
case Field.Thread:
|
||||
StrThread = Encoding.UTF8.GetString(Message);
|
||||
break;
|
||||
continue;
|
||||
}
|
||||
else if (Field == LmLogField.Line)
|
||||
{
|
||||
FieldStr = Field + ": " + Reader.ReadInt32();
|
||||
}
|
||||
else
|
||||
{
|
||||
FieldStr = Field + ": \"" + Encoding.UTF8.GetString(Reader.ReadBytes(Size)) + "\"";
|
||||
}
|
||||
|
||||
SB.AppendLine(" " + FieldStr);
|
||||
}
|
||||
|
||||
}
|
||||
while (LogMessage.Position != PayloadLen + 0x18); // 0x18 - Size of Header LogMessage.
|
||||
|
||||
LogString += StrModule + " > " + StrThread + ": " + StrFilename + "@" + StrFunction + "(" + StrLine + ") '" + StrMessage + "'" + Environment.NewLine;
|
||||
string Text = SB.ToString();
|
||||
|
||||
switch((Severity)iSeverity)
|
||||
{
|
||||
case Severity.Trace: Logging.Trace(LogClass.ServiceLm, LogString); break;
|
||||
case Severity.Info: Logging.Info(LogClass.ServiceLm, LogString); break;
|
||||
case Severity.Warning: Logging.Warn(LogClass.ServiceLm, LogString); break;
|
||||
case Severity.Error: Logging.Error(LogClass.ServiceLm, LogString); break;
|
||||
case Severity.Critical: Logging.Fatal(LogClass.ServiceLm, LogString); break;
|
||||
switch((LmLogLevel)Level)
|
||||
{
|
||||
case LmLogLevel.Trace: Context.Ns.Log.PrintDebug (LogClass.ServiceLm, Text); break;
|
||||
case LmLogLevel.Info: Context.Ns.Log.PrintInfo (LogClass.ServiceLm, Text); break;
|
||||
case LmLogLevel.Warning: Context.Ns.Log.PrintWarning(LogClass.ServiceLm, Text); break;
|
||||
case LmLogLevel.Error: Context.Ns.Log.PrintError (LogClass.ServiceLm, Text); break;
|
||||
case LmLogLevel.Critical: Context.Ns.Log.PrintError (LogClass.ServiceLm, Text); break;
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
13
Ryujinx.Core/OsHle/Services/Lm/LmLogField.cs
Normal file
13
Ryujinx.Core/OsHle/Services/Lm/LmLogField.cs
Normal file
|
@ -0,0 +1,13 @@
|
|||
namespace Ryujinx.Core.OsHle.Services.Lm
|
||||
{
|
||||
enum LmLogField
|
||||
{
|
||||
Skip = 1,
|
||||
Message = 2,
|
||||
Line = 3,
|
||||
Filename = 4,
|
||||
Function = 5,
|
||||
Module = 6,
|
||||
Thread = 7
|
||||
}
|
||||
}
|
11
Ryujinx.Core/OsHle/Services/Lm/LmLogLevel.cs
Normal file
11
Ryujinx.Core/OsHle/Services/Lm/LmLogLevel.cs
Normal file
|
@ -0,0 +1,11 @@
|
|||
namespace Ryujinx.Core.OsHle.Services.Lm
|
||||
{
|
||||
enum LmLogLevel
|
||||
{
|
||||
Trace,
|
||||
Info,
|
||||
Warning,
|
||||
Error,
|
||||
Critical
|
||||
}
|
||||
}
|
|
@ -1,3 +1,4 @@
|
|||
using Ryujinx.Core.Logging;
|
||||
using Ryujinx.Core.OsHle.Ipc;
|
||||
using System.Collections.Generic;
|
||||
|
||||
|
@ -24,7 +25,7 @@ namespace Ryujinx.Core.OsHle.Services.Nifm
|
|||
|
||||
MakeObject(Context, new IRequest());
|
||||
|
||||
Logging.Stub(LogClass.ServiceNifm, "Stubbed");
|
||||
Context.Ns.Log.PrintStub(LogClass.ServiceNifm, "Stubbed.");
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
using Ryujinx.Core.Logging;
|
||||
using Ryujinx.Core.OsHle.Handles;
|
||||
using Ryujinx.Core.OsHle.Ipc;
|
||||
using System;
|
||||
|
@ -31,14 +32,14 @@ namespace Ryujinx.Core.OsHle.Services.Nifm
|
|||
{
|
||||
Context.ResponseData.Write(0);
|
||||
|
||||
Logging.Stub(LogClass.ServiceNifm, "Stubbed");
|
||||
Context.Ns.Log.PrintStub(LogClass.ServiceNifm, "Stubbed.");
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
public long GetResult(ServiceCtx Context)
|
||||
{
|
||||
Logging.Stub(LogClass.ServiceNifm, "Stubbed");
|
||||
Context.Ns.Log.PrintStub(LogClass.ServiceNifm, "Stubbed.");
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -56,14 +57,14 @@ namespace Ryujinx.Core.OsHle.Services.Nifm
|
|||
|
||||
public long Cancel(ServiceCtx Context)
|
||||
{
|
||||
Logging.Stub(LogClass.ServiceNifm, "Stubbed");
|
||||
Context.Ns.Log.PrintStub(LogClass.ServiceNifm, "Stubbed.");
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
public long Submit(ServiceCtx Context)
|
||||
{
|
||||
Logging.Stub(LogClass.ServiceNifm, "Stubbed");
|
||||
Context.Ns.Log.PrintStub(LogClass.ServiceNifm, "Stubbed.");
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
using Ryujinx.Core.Logging;
|
||||
using Ryujinx.Core.OsHle.Ipc;
|
||||
using System.Collections.Generic;
|
||||
|
||||
|
@ -22,14 +23,14 @@ namespace Ryujinx.Core.OsHle.Services.Ns
|
|||
{
|
||||
Context.ResponseData.Write(0);
|
||||
|
||||
Logging.Stub(LogClass.ServiceNs, "Stubbed");
|
||||
Context.Ns.Log.PrintStub(LogClass.ServiceNs, "Stubbed.");
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
public static long ListAddOnContent(ServiceCtx Context)
|
||||
{
|
||||
Logging.Stub(LogClass.ServiceNs, "Stubbed");
|
||||
Context.Ns.Log.PrintStub(LogClass.ServiceNs, "Stubbed.");
|
||||
|
||||
//TODO: This is supposed to write a u32 array aswell.
|
||||
//It's unknown what it contains.
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
using ChocolArm64.Memory;
|
||||
using Ryujinx.Core.Logging;
|
||||
using Ryujinx.Core.OsHle.Handles;
|
||||
using Ryujinx.Core.OsHle.Ipc;
|
||||
using Ryujinx.Core.OsHle.Utilities;
|
||||
|
@ -228,7 +229,7 @@ namespace Ryujinx.Core.OsHle.Services.Nv
|
|||
|
||||
if (Map == null)
|
||||
{
|
||||
Logging.Warn(LogClass.ServiceNv, $"Trying to use invalid NvMap Handle {Handle}!");
|
||||
Context.Ns.Log.PrintWarning(LogClass.ServiceNv, $"invalid NvMap Handle {Handle}!");
|
||||
|
||||
return -1; //TODO: Corrent error code.
|
||||
}
|
||||
|
@ -634,7 +635,7 @@ namespace Ryujinx.Core.OsHle.Services.Nv
|
|||
|
||||
Context.Memory.WriteInt32(Position + 4, Map.Handle);
|
||||
|
||||
Logging.Info(LogClass.ServiceNv, $"NvMap {Map.Id} created with size {Size:x8}!");
|
||||
Context.Ns.Log.PrintInfo(LogClass.ServiceNv, $"NvMap {Map.Id} created with size {Size:x8}!");
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -649,7 +650,7 @@ namespace Ryujinx.Core.OsHle.Services.Nv
|
|||
|
||||
if (Map == null)
|
||||
{
|
||||
Logging.Warn(LogClass.ServiceNv, $"Trying to use invalid NvMap Id {Id}!");
|
||||
Context.Ns.Log.PrintWarning(LogClass.ServiceNv, $"Invalid NvMap Id {Id}!");
|
||||
|
||||
return -1; //TODO: Corrent error code.
|
||||
}
|
||||
|
@ -676,7 +677,7 @@ namespace Ryujinx.Core.OsHle.Services.Nv
|
|||
|
||||
if (Map == null)
|
||||
{
|
||||
Logging.Warn(LogClass.ServiceNv, $"Trying to use invalid NvMap Handle {Handle}!");
|
||||
Context.Ns.Log.PrintWarning(LogClass.ServiceNv, $"Invalid NvMap Handle {Handle}!");
|
||||
|
||||
return -1; //TODO: Corrent error code.
|
||||
}
|
||||
|
@ -695,14 +696,14 @@ namespace Ryujinx.Core.OsHle.Services.Nv
|
|||
MemReader Reader = new MemReader(Context.Memory, Position);
|
||||
MemWriter Writer = new MemWriter(Context.Memory, Position + 8);
|
||||
|
||||
int Handle = Reader.ReadInt32();
|
||||
int Padding = Reader.ReadInt32();
|
||||
int Handle = Reader.ReadInt32();
|
||||
int Padding = Reader.ReadInt32();
|
||||
|
||||
NvMap Map = NvMaps.GetData<NvMap>(Context.Process, Handle);
|
||||
|
||||
if (Map == null)
|
||||
{
|
||||
Logging.Warn(LogClass.ServiceNv, $"Trying to use invalid NvMap Handle {Handle}!");
|
||||
Context.Ns.Log.PrintWarning(LogClass.ServiceNv, $"Invalid NvMap Handle {Handle}!");
|
||||
|
||||
return -1; //TODO: Corrent error code.
|
||||
}
|
||||
|
@ -727,7 +728,7 @@ namespace Ryujinx.Core.OsHle.Services.Nv
|
|||
|
||||
if (Map == null)
|
||||
{
|
||||
Logging.Warn(LogClass.ServiceNv, $"Trying to use invalid NvMap Handle {Handle}!");
|
||||
Context.Ns.Log.PrintWarning(LogClass.ServiceNv, $"Invalid NvMap Handle {Handle}!");
|
||||
|
||||
return -1; //TODO: Corrent error code.
|
||||
}
|
||||
|
@ -757,7 +758,7 @@ namespace Ryujinx.Core.OsHle.Services.Nv
|
|||
|
||||
if (Map == null)
|
||||
{
|
||||
Logging.Warn(LogClass.ServiceNv, $"Trying to use invalid NvMap Handle {Handle}!");
|
||||
Context.Ns.Log.PrintWarning(LogClass.ServiceNv, $"Invalid NvMap Handle {Handle}!");
|
||||
|
||||
return -1; //TODO: Corrent error code.
|
||||
}
|
||||
|
|
|
@ -103,6 +103,9 @@ namespace Ryujinx.Core.OsHle.Services
|
|||
case "pl:u":
|
||||
return new ISharedFontManager();
|
||||
|
||||
case "prepo:a":
|
||||
return new IPrepoService();
|
||||
|
||||
case "prepo:u":
|
||||
return new IPrepoService();
|
||||
|
||||
|
|
|
@ -17,7 +17,7 @@ namespace Ryujinx.Core.OsHle.Services.Set
|
|||
{
|
||||
m_Commands = new Dictionary<int, ServiceProcessRequest>()
|
||||
{
|
||||
{ 4, GetFirmwareVersion2 },
|
||||
{ 4, GetFirmwareVersion2 },
|
||||
{ 23, GetColorSetId },
|
||||
{ 24, SetColorSetId }
|
||||
};
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
using Ryujinx.Core.Logging;
|
||||
using Ryujinx.Core.OsHle.Ipc;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
@ -16,14 +17,14 @@ namespace Ryujinx.Core.OsHle.Services.Time
|
|||
{
|
||||
m_Commands = new Dictionary<int, ServiceProcessRequest>()
|
||||
{
|
||||
{ 0, GetDeviceLocationName },
|
||||
{ 0, GetDeviceLocationName },
|
||||
{ 101, ToCalendarTimeWithMyRule }
|
||||
};
|
||||
}
|
||||
|
||||
public long GetDeviceLocationName(ServiceCtx Context)
|
||||
{
|
||||
Logging.Stub(LogClass.ServiceTime, "Stubbed");
|
||||
Context.Ns.Log.PrintStub(LogClass.ServiceTime, "Stubbed.");
|
||||
|
||||
for (int Index = 0; Index < 0x24; Index++)
|
||||
{
|
||||
|
@ -60,7 +61,7 @@ namespace Ryujinx.Core.OsHle.Services.Time
|
|||
*/
|
||||
Context.ResponseData.Write((int)CurrentTime.DayOfWeek);
|
||||
|
||||
Context.ResponseData.Write(CurrentTime.DayOfYear);
|
||||
Context.ResponseData.Write(CurrentTime.DayOfYear - 1);
|
||||
|
||||
//TODO: Find out the names used.
|
||||
Context.ResponseData.Write(new byte[8]);
|
||||
|
|
|
@ -19,10 +19,10 @@ namespace Ryujinx.Core.OsHle.Services.Vi
|
|||
{
|
||||
m_Commands = new Dictionary<int, ServiceProcessRequest>()
|
||||
{
|
||||
{ 100, GetRelayService },
|
||||
{ 101, GetSystemDisplayService },
|
||||
{ 102, GetManagerDisplayService },
|
||||
{ 103, GetIndirectDisplayTransactionService },
|
||||
{ 100, GetRelayService },
|
||||
{ 101, GetSystemDisplayService },
|
||||
{ 102, GetManagerDisplayService },
|
||||
{ 103, GetIndirectDisplayTransactionService },
|
||||
{ 1010, OpenDisplay },
|
||||
{ 1020, CloseDisplay },
|
||||
{ 1102, GetDisplayResolution },
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
using ChocolArm64.Memory;
|
||||
using Ryujinx.Core.Logging;
|
||||
using Ryujinx.Core.OsHle.Handles;
|
||||
using Ryujinx.Core.OsHle.Services.Nv;
|
||||
using Ryujinx.Graphics.Gal;
|
||||
|
@ -112,7 +113,7 @@ namespace Ryujinx.Core.OsHle.Services.Android
|
|||
|
||||
if (Commands.TryGetValue((InterfaceName, Code), out ServiceProcessParcel ProcReq))
|
||||
{
|
||||
Logging.Debug(LogClass.ServiceNv, $"{InterfaceName} {ProcReq.Method.Name}");
|
||||
Context.Ns.Log.PrintDebug(LogClass.ServiceVi, $"{InterfaceName} {ProcReq.Method.Name}");
|
||||
|
||||
return ProcReq(Context, Reader);
|
||||
}
|
||||
|
@ -412,8 +413,6 @@ namespace Ryujinx.Core.OsHle.Services.Android
|
|||
break;
|
||||
}
|
||||
|
||||
Logging.Debug(LogClass.ServiceNv, "Waiting for a free BufferQueue slot...");
|
||||
|
||||
if (Disposed)
|
||||
{
|
||||
break;
|
||||
|
@ -426,8 +425,6 @@ namespace Ryujinx.Core.OsHle.Services.Android
|
|||
}
|
||||
while (!Disposed);
|
||||
|
||||
Logging.Debug(LogClass.ServiceNv, $"Found free BufferQueue slot {Slot}!");
|
||||
|
||||
return Slot;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue