aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAc_K <Acoustik666@gmail.com>2018-02-28 21:58:04 +0100
committergdkchan <gab.dark.100@gmail.com>2018-02-28 17:58:04 -0300
commit424e0459403fd7ffeb8980b16a6a9e3a1201c5e6 (patch)
tree7eb62befb670246d89cfcfa19c01c5e61add4ca7
parent7f0bee2ff8d6eca1f10a29d5c9e5e7663cb34143 (diff)
More stubs (#47)
* Stubs implementations Services Bsd, Nifm & SSL stubs implementations Objects IGeneralService, IRequest stubs implementations. Fake-Fix GetAvailableLanguageCodes stub too ^^! * More stubs - Fix SvcGetInfo loops by gdkchan. - Implement stub for Sfdnsres service. - Add more stubs for Bsd service. * Update ServiceSfdnsres.cs
-rw-r--r--Ryujinx.Core/OsHle/MemoryRegions.cs2
-rw-r--r--Ryujinx.Core/OsHle/Services/Bsd/ServiceBsd.cs40
-rw-r--r--Ryujinx.Core/OsHle/Services/ServiceFactory.cs2
-rw-r--r--Ryujinx.Core/OsHle/Services/Sfdnsres/ServiceSfdnsres.cs20
4 files changed, 61 insertions, 3 deletions
diff --git a/Ryujinx.Core/OsHle/MemoryRegions.cs b/Ryujinx.Core/OsHle/MemoryRegions.cs
index 3b690426..e362ba9f 100644
--- a/Ryujinx.Core/OsHle/MemoryRegions.cs
+++ b/Ryujinx.Core/OsHle/MemoryRegions.cs
@@ -7,7 +7,7 @@ namespace Ryujinx.Core.OsHle
public const long AddrSpaceStart = 0x08000000;
public const long MapRegionAddress = 0x10000000;
- public const long MapRegionSize = 0x40000000;
+ public const long MapRegionSize = 0x10000000;
public const long MainStackSize = 0x100000;
diff --git a/Ryujinx.Core/OsHle/Services/Bsd/ServiceBsd.cs b/Ryujinx.Core/OsHle/Services/Bsd/ServiceBsd.cs
index fa47d944..b5944412 100644
--- a/Ryujinx.Core/OsHle/Services/Bsd/ServiceBsd.cs
+++ b/Ryujinx.Core/OsHle/Services/Bsd/ServiceBsd.cs
@@ -13,8 +13,11 @@ namespace Ryujinx.Core.OsHle.IpcServices.Bsd
{
m_Commands = new Dictionary<int, ServiceProcessRequest>()
{
- { 0, Initialize },
- { 1, StartMonitoring }
+ { 0, Initialize },
+ { 1, StartMonitoring },
+ { 2, Socket },
+ { 10, Send },
+ { 14, Connect }
};
}
@@ -56,5 +59,38 @@ namespace Ryujinx.Core.OsHle.IpcServices.Bsd
return 0;
}
+
+ //Socket(u32 domain, u32 type, u32 protocol) -> (i32 ret, u32 bsd_errno)
+ public long Socket(ServiceCtx Context)
+ {
+ Context.ResponseData.Write(0);
+ Context.ResponseData.Write(0);
+
+ //Todo: Stub
+
+ return 0;
+ }
+
+ //Connect(u32 socket, buffer<sockaddr, 0x21, 0>) -> (i32 ret, u32 bsd_errno)
+ public long Connect(ServiceCtx Context)
+ {
+ Context.ResponseData.Write(0);
+ Context.ResponseData.Write(0);
+
+ //Todo: Stub
+
+ return 0;
+ }
+
+ //Send(u32 socket, u32 flags, buffer<i8, 0x21, 0>) -> (i32 ret, u32 bsd_errno)
+ public long Send(ServiceCtx Context)
+ {
+ Context.ResponseData.Write(0);
+ Context.ResponseData.Write(0);
+
+ //Todo: Stub
+
+ return 0;
+ }
}
} \ No newline at end of file
diff --git a/Ryujinx.Core/OsHle/Services/ServiceFactory.cs b/Ryujinx.Core/OsHle/Services/ServiceFactory.cs
index aae62453..c5da717e 100644
--- a/Ryujinx.Core/OsHle/Services/ServiceFactory.cs
+++ b/Ryujinx.Core/OsHle/Services/ServiceFactory.cs
@@ -13,6 +13,7 @@ using Ryujinx.Core.OsHle.IpcServices.NvServices;
using Ryujinx.Core.OsHle.IpcServices.Pctl;
using Ryujinx.Core.OsHle.IpcServices.Pl;
using Ryujinx.Core.OsHle.IpcServices.Set;
+using Ryujinx.Core.OsHle.IpcServices.Sfdnsres;
using Ryujinx.Core.OsHle.IpcServices.Sm;
using Ryujinx.Core.OsHle.IpcServices.Ssl;
using Ryujinx.Core.OsHle.IpcServices.Time;
@@ -45,6 +46,7 @@ namespace Ryujinx.Core.OsHle.IpcServices
case "pctl:a": return new ServicePctl();
case "pl:u": return new ServicePl();
case "set": return new ServiceSet();
+ case "sfdnsres": return new ServiceSfdnsres();
case "sm:": return new ServiceSm();
case "ssl": return new ServiceSsl();
case "time:s": return new ServiceTime();
diff --git a/Ryujinx.Core/OsHle/Services/Sfdnsres/ServiceSfdnsres.cs b/Ryujinx.Core/OsHle/Services/Sfdnsres/ServiceSfdnsres.cs
new file mode 100644
index 00000000..f110ae73
--- /dev/null
+++ b/Ryujinx.Core/OsHle/Services/Sfdnsres/ServiceSfdnsres.cs
@@ -0,0 +1,20 @@
+using Ryujinx.Core.OsHle.Ipc;
+using System.Collections.Generic;
+
+namespace Ryujinx.Core.OsHle.IpcServices.Sfdnsres
+{
+ class ServiceSfdnsres : IIpcService
+ {
+ private Dictionary<int, ServiceProcessRequest> m_Commands;
+
+ public IReadOnlyDictionary<int, ServiceProcessRequest> Commands => m_Commands;
+
+ public ServiceSfdnsres()
+ {
+ m_Commands = new Dictionary<int, ServiceProcessRequest>()
+ {
+ //{ 0, Function }
+ };
+ }
+ }
+}