From 7f0bee2ff8d6eca1f10a29d5c9e5e7663cb34143 Mon Sep 17 00:00:00 2001 From: Ac_K Date: Wed, 28 Feb 2018 04:31:52 +0100 Subject: Stubs implementations (#45) Services Bsd, Nifm & SSL stubs implementations Objects IGeneralService, IRequest stubs implementations. Fake-Fix GetAvailableLanguageCodes stub too ^^! --- Ryujinx.Core/OsHle/Services/Bsd/ServiceBsd.cs | 60 +++++++++++++++++++++++++++ 1 file changed, 60 insertions(+) create mode 100644 Ryujinx.Core/OsHle/Services/Bsd/ServiceBsd.cs (limited to 'Ryujinx.Core/OsHle/Services/Bsd') diff --git a/Ryujinx.Core/OsHle/Services/Bsd/ServiceBsd.cs b/Ryujinx.Core/OsHle/Services/Bsd/ServiceBsd.cs new file mode 100644 index 00000000..fa47d944 --- /dev/null +++ b/Ryujinx.Core/OsHle/Services/Bsd/ServiceBsd.cs @@ -0,0 +1,60 @@ +using Ryujinx.Core.OsHle.Ipc; +using System.Collections.Generic; + +namespace Ryujinx.Core.OsHle.IpcServices.Bsd +{ + class ServiceBsd : IIpcService + { + private Dictionary m_Commands; + + public IReadOnlyDictionary Commands => m_Commands; + + public ServiceBsd() + { + m_Commands = new Dictionary() + { + { 0, Initialize }, + { 1, StartMonitoring } + }; + } + + //Initialize(u32, u32, u32, u32, u32, u32, u32, u32, u64 pid, u64 transferMemorySize, pid, KObject) -> u32 bsd_errno + public long Initialize(ServiceCtx Context) + { + /* + typedef struct { + u32 version; // Observed 1 on 2.0 LibAppletWeb, 2 on 3.0. + + u32 tcp_tx_buf_size; // Size of the TCP transfer (send) buffer (initial or fixed). + u32 tcp_rx_buf_size; // Size of the TCP recieve buffer (initial or fixed). + u32 tcp_tx_buf_max_size; // Maximum size of the TCP transfer (send) buffer. If it is 0, the size of the buffer is fixed to its initial value. + u32 tcp_rx_buf_max_size; // Maximum size of the TCP receive buffer. If it is 0, the size of the buffer is fixed to its initial value. + + u32 udp_tx_buf_size; // Size of the UDP transfer (send) buffer (typically 0x2400 bytes). + u32 udp_rx_buf_size; // Size of the UDP receive buffer (typically 0xA500 bytes). + + u32 sb_efficiency; // Number of buffers for each socket (standard values range from 1 to 8). + } BsdBufferConfig; + */ + + long Pid = Context.RequestData.ReadInt64(); + long TransferMemorySize = Context.RequestData.ReadInt64(); + + // Two other args are unknown! + + Context.ResponseData.Write(0); + + //Todo: Stub + + return 0; + } + + //StartMonitoring(u64, pid) + public long StartMonitoring(ServiceCtx Context) + { + //Todo: Stub + + return 0; + } + } +} \ No newline at end of file -- cgit v1.2.3