Archived
1
0
Fork 0
forked from Mirror/Ryujinx
This commit is contained in:
emmauss 2018-04-05 01:16:59 +03:00 committed by gdkchan
parent e16ca561cb
commit 836a003c8e
8 changed files with 59 additions and 4 deletions

View file

@ -56,7 +56,7 @@ namespace Ryujinx.Core.OsHle.Services.Am
public long GetPerformanceMode(ServiceCtx Context)
{
Context.ResponseData.Write((byte)0);
Context.ResponseData.Write((byte)Apm.PerformanceMode.Handheld);
return 0;
}

View file

@ -15,6 +15,7 @@ namespace Ryujinx.Core.OsHle.Services.Hid
m_Commands = new Dictionary<int, ServiceProcessRequest>()
{
{ 0, CreateAppletResource },
{ 1, ActivateDebugPad },
{ 11, ActivateTouchScreen },
{ 66, StartSixAxisSensor },
{ 100, SetSupportedNpadStyleSet },
@ -22,6 +23,7 @@ namespace Ryujinx.Core.OsHle.Services.Hid
{ 102, SetSupportedNpadIdType },
{ 103, ActivateNpad },
{ 120, SetNpadJoyHoldType },
{ 121, GetNpadJoyHoldType },
{ 122, SetNpadJoyAssignmentModeSingleByDefault },
{ 123, SetNpadJoyAssignmentModeSingle },
{ 124, SetNpadJoyAssignmentModeDual },
@ -39,6 +41,11 @@ namespace Ryujinx.Core.OsHle.Services.Hid
return 0;
}
public long ActivateDebugPad(ServiceCtx Context)
{
return 0;
}
public long ActivateTouchScreen(ServiceCtx Context)
{
long Unknown = Context.RequestData.ReadInt64();

View file

@ -19,7 +19,9 @@ namespace Ryujinx.Core.OsHle.Services.Nifm
{
{ 0, GetRequestState },
{ 1, GetResult },
{ 2, GetSystemEventReadableHandles }
{ 2, GetSystemEventReadableHandles },
{ 3, Cancel },
{ 4, Submit },
};
Event = new KEvent();
@ -52,6 +54,20 @@ namespace Ryujinx.Core.OsHle.Services.Nifm
return 0;
}
public long Cancel(ServiceCtx Context)
{
//Todo: Stub
return 0;
}
public long Submit(ServiceCtx Context)
{
//Todo: Stub
return 0;
}
public void Dispose()
{
Dispose(true);

View file

@ -13,8 +13,15 @@ namespace Ryujinx.Core.OsHle.Services.Ns
{
m_Commands = new Dictionary<int, ServiceProcessRequest>()
{
//{ 1, Function }
{ 2, CountAddOnContent }
};
}
public static long CountAddOnContent(ServiceCtx Context)
{
Context.ResponseData.Write(0);
return 0;
}
}
}

View file

@ -25,6 +25,7 @@ namespace Ryujinx.Core.OsHle.Services.Vi
{ 103, GetIndirectDisplayTransactionService },
{ 1010, OpenDisplay },
{ 1020, CloseDisplay },
{ 1102, GetDisplayResolution },
{ 2020, OpenLayer },
{ 2021, CloseLayer },
{ 2030, CreateStrayLayer },
@ -84,6 +85,16 @@ namespace Ryujinx.Core.OsHle.Services.Vi
return 0;
}
public long GetDisplayResolution(ServiceCtx Context)
{
long DisplayId = Context.RequestData.ReadInt32();
Context.ResponseData.Write(1280);
Context.ResponseData.Write(720);
return 0;
}
public long OpenLayer(ServiceCtx Context)
{
long LayerId = Context.RequestData.ReadInt64();

View file

@ -13,7 +13,8 @@ namespace Ryujinx.Core.OsHle.Services.Vi
{
m_Commands = new Dictionary<int, ServiceProcessRequest>()
{
{ 2205, SetLayerZ }
{ 2205, SetLayerZ },
{ 2207, SetLayerVisibility }
};
}
@ -21,5 +22,10 @@ namespace Ryujinx.Core.OsHle.Services.Vi
{
return 0;
}
public static long SetLayerVisibility(ServiceCtx Context)
{
return 0;
}
}
}

View file

@ -40,6 +40,7 @@ namespace Ryujinx.Core.OsHle.Svc
{ 0x0c, SvcGetThreadPriority },
{ 0x0d, SvcSetThreadPriority },
{ 0x0f, SvcSetThreadCoreMask },
{ 0x10, SvcGetCurrentProcessorNumber },
{ 0x12, SvcClearEvent },
{ 0x13, SvcMapSharedMemory },
{ 0x14, SvcUnmapSharedMemory },

View file

@ -117,6 +117,13 @@ namespace Ryujinx.Core.OsHle.Svc
//TODO: Error codes.
}
private void SvcGetCurrentProcessorNumber(AThreadState ThreadState)
{
KThread CurrThread = Process.GetThread(ThreadState.Tpidr);
ThreadState.X0 = (ulong)CurrThread.ProcessorId;
}
private void SvcGetThreadId(AThreadState ThreadState)
{
int Handle = (int)ThreadState.X1;