aboutsummaryrefslogtreecommitdiff
path: root/Ryujinx.Core/OsHle/Services/Nifm
diff options
context:
space:
mode:
authorAc_K <Acoustik666@gmail.com>2018-02-28 04:31:52 +0100
committergdkchan <gab.dark.100@gmail.com>2018-02-28 00:31:52 -0300
commit7f0bee2ff8d6eca1f10a29d5c9e5e7663cb34143 (patch)
tree7a03b209834a113418030322de41579766868a27 /Ryujinx.Core/OsHle/Services/Nifm
parentf876bd2a805805d9e5dc350b65e8d02fbc5b88b5 (diff)
Stubs implementations (#45)
Services Bsd, Nifm & SSL stubs implementations Objects IGeneralService, IRequest stubs implementations. Fake-Fix GetAvailableLanguageCodes stub too ^^!
Diffstat (limited to 'Ryujinx.Core/OsHle/Services/Nifm')
-rw-r--r--Ryujinx.Core/OsHle/Services/Nifm/IGeneralService.cs34
-rw-r--r--Ryujinx.Core/OsHle/Services/Nifm/IRequest.cs49
-rw-r--r--Ryujinx.Core/OsHle/Services/Nifm/ServiceNifm.cs29
3 files changed, 112 insertions, 0 deletions
diff --git a/Ryujinx.Core/OsHle/Services/Nifm/IGeneralService.cs b/Ryujinx.Core/OsHle/Services/Nifm/IGeneralService.cs
new file mode 100644
index 00000000..c31ee36b
--- /dev/null
+++ b/Ryujinx.Core/OsHle/Services/Nifm/IGeneralService.cs
@@ -0,0 +1,34 @@
+using Ryujinx.Core.OsHle.Ipc;
+using System.Collections.Generic;
+
+using static Ryujinx.Core.OsHle.IpcServices.ObjHelper;
+
+namespace Ryujinx.Core.OsHle.IpcServices.Nifm
+{
+ class IGeneralService : IIpcService
+ {
+ private Dictionary<int, ServiceProcessRequest> m_Commands;
+
+ public IReadOnlyDictionary<int, ServiceProcessRequest> Commands => m_Commands;
+
+ public IGeneralService()
+ {
+ m_Commands = new Dictionary<int, ServiceProcessRequest>()
+ {
+ { 4, CreateRequest }
+ };
+ }
+
+ //CreateRequest(i32)
+ public long CreateRequest(ServiceCtx Context)
+ {
+ int Unknown = Context.RequestData.ReadInt32();
+
+ MakeObject(Context, new IRequest());
+
+ //Todo: Stub
+
+ return 0;
+ }
+ }
+} \ No newline at end of file
diff --git a/Ryujinx.Core/OsHle/Services/Nifm/IRequest.cs b/Ryujinx.Core/OsHle/Services/Nifm/IRequest.cs
new file mode 100644
index 00000000..6110e5fb
--- /dev/null
+++ b/Ryujinx.Core/OsHle/Services/Nifm/IRequest.cs
@@ -0,0 +1,49 @@
+using Ryujinx.Core.OsHle.Ipc;
+using System.Collections.Generic;
+
+namespace Ryujinx.Core.OsHle.IpcServices.Nifm
+{
+ class IRequest : IIpcService
+ {
+ private Dictionary<int, ServiceProcessRequest> m_Commands;
+
+ public IReadOnlyDictionary<int, ServiceProcessRequest> Commands => m_Commands;
+
+ public IRequest()
+ {
+ m_Commands = new Dictionary<int, ServiceProcessRequest>()
+ {
+ { 0, GetRequestState },
+ { 1, GetResult },
+ { 2, GetSystemEventReadableHandles }
+ };
+ }
+
+ // -> i32
+ public long GetRequestState(ServiceCtx Context)
+ {
+ Context.ResponseData.Write(0);
+
+ //Todo: Stub
+
+ return 0;
+ }
+
+ public long GetResult(ServiceCtx Context)
+ {
+ //Todo: Stub
+
+ return 0;
+ }
+
+ //GetSystemEventReadableHandles() -> (KObject, KObject)
+ public long GetSystemEventReadableHandles(ServiceCtx Context)
+ {
+ Context.Response.HandleDesc = IpcHandleDesc.MakeMove(0xbadcafe);
+
+ //Todo: Stub
+
+ return 0;
+ }
+ }
+} \ No newline at end of file
diff --git a/Ryujinx.Core/OsHle/Services/Nifm/ServiceNifm.cs b/Ryujinx.Core/OsHle/Services/Nifm/ServiceNifm.cs
new file mode 100644
index 00000000..7e183389
--- /dev/null
+++ b/Ryujinx.Core/OsHle/Services/Nifm/ServiceNifm.cs
@@ -0,0 +1,29 @@
+using Ryujinx.Core.OsHle.Ipc;
+using System.Collections.Generic;
+
+using static Ryujinx.Core.OsHle.IpcServices.ObjHelper;
+
+namespace Ryujinx.Core.OsHle.IpcServices.Nifm
+{
+ class ServiceNifm : IIpcService
+ {
+ private Dictionary<int, ServiceProcessRequest> m_Commands;
+
+ public IReadOnlyDictionary<int, ServiceProcessRequest> Commands => m_Commands;
+
+ public ServiceNifm()
+ {
+ m_Commands = new Dictionary<int, ServiceProcessRequest>()
+ {
+ { 4, CreateGeneralServiceOld }
+ };
+ }
+
+ public long CreateGeneralServiceOld(ServiceCtx Context)
+ {
+ MakeObject(Context, new IGeneralService());
+
+ return 0;
+ }
+ }
+} \ No newline at end of file