diff options
| author | gdkchan <gab.dark.100@gmail.com> | 2018-04-22 01:21:49 -0300 |
|---|---|---|
| committer | gdkchan <gab.dark.100@gmail.com> | 2018-04-22 01:22:46 -0300 |
| commit | bd9b1e2c6b912c7cdab55ec6acc063c88a59cff1 (patch) | |
| tree | 077ab8da47828f9fd23893eeefa54c7d8fb2a314 /Ryujinx.Core/OsHle/Services | |
| parent | 4906acdde96c09b4e12a3801a4bacd5233a2f8e6 (diff) | |
Stub a few services, add support for generating call stacks on the CPU
Diffstat (limited to 'Ryujinx.Core/OsHle/Services')
| -rw-r--r-- | Ryujinx.Core/OsHle/Services/Am/IApplicationFunctions.cs | 10 | ||||
| -rw-r--r-- | Ryujinx.Core/OsHle/Services/Aud/IAudioDevice.cs (renamed from Ryujinx.Core/OsHle/Services/Aud/IAudioDeviceService.cs) | 19 | ||||
| -rw-r--r-- | Ryujinx.Core/OsHle/Services/Aud/IAudioRendererManager.cs | 2 | ||||
| -rw-r--r-- | Ryujinx.Core/OsHle/Services/Caps/IAlbumAccessorService.cs | 20 | ||||
| -rw-r--r-- | Ryujinx.Core/OsHle/Services/Caps/IScreenshotService.cs | 20 | ||||
| -rw-r--r-- | Ryujinx.Core/OsHle/Services/ServiceFactory.cs | 10 | ||||
| -rw-r--r-- | Ryujinx.Core/OsHle/Services/Time/ITimeZoneService.cs | 15 |
7 files changed, 92 insertions, 4 deletions
diff --git a/Ryujinx.Core/OsHle/Services/Am/IApplicationFunctions.cs b/Ryujinx.Core/OsHle/Services/Am/IApplicationFunctions.cs index ca4e368a..f1c63fac 100644 --- a/Ryujinx.Core/OsHle/Services/Am/IApplicationFunctions.cs +++ b/Ryujinx.Core/OsHle/Services/Am/IApplicationFunctions.cs @@ -18,6 +18,7 @@ namespace Ryujinx.Core.OsHle.Services.Am { 20, EnsureSaveData }, { 21, GetDesiredLanguage }, { 22, SetTerminateResult }, + { 23, GetDisplayVersion }, { 40, NotifyRunning } }; } @@ -67,6 +68,15 @@ namespace Ryujinx.Core.OsHle.Services.Am return 0; } + public long GetDisplayVersion(ServiceCtx Context) + { + //FIXME: Need to check correct version on a switch. + Context.ResponseData.Write(1L); + Context.ResponseData.Write(0L); + + return 0; + } + public long NotifyRunning(ServiceCtx Context) { Context.ResponseData.Write(1); diff --git a/Ryujinx.Core/OsHle/Services/Aud/IAudioDeviceService.cs b/Ryujinx.Core/OsHle/Services/Aud/IAudioDevice.cs index b27d1448..039a4413 100644 --- a/Ryujinx.Core/OsHle/Services/Aud/IAudioDeviceService.cs +++ b/Ryujinx.Core/OsHle/Services/Aud/IAudioDevice.cs @@ -6,7 +6,7 @@ using System.Text; namespace Ryujinx.Core.OsHle.Services.Aud { - class IAudioDeviceService : IpcService + class IAudioDevice : IpcService { private Dictionary<int, ServiceProcessRequest> m_Commands; @@ -14,12 +14,13 @@ namespace Ryujinx.Core.OsHle.Services.Aud private KEvent SystemEvent; - public IAudioDeviceService() + public IAudioDevice() { m_Commands = new Dictionary<int, ServiceProcessRequest>() { { 0, ListAudioDeviceName }, { 1, SetAudioDeviceOutputVolume }, + { 3, GetActiveAudioDeviceName }, { 4, QueryAudioDeviceSystemEvent }, { 5, GetActiveChannelCount } }; @@ -72,6 +73,20 @@ namespace Ryujinx.Core.OsHle.Services.Aud return 0; } + public long GetActiveAudioDeviceName(ServiceCtx Context) + { + string Name = "FIXME"; + + long Position = Context.Request.ReceiveBuff[0].Position; + long Size = Context.Request.ReceiveBuff[0].Size; + + byte[] Buffer = Encoding.ASCII.GetBytes(Name + '\0'); + + AMemoryHelper.WriteBytes(Context.Memory, Position, Buffer); + + return 0; + } + public long QueryAudioDeviceSystemEvent(ServiceCtx Context) { int Handle = Context.Process.HandleTable.OpenHandle(SystemEvent); diff --git a/Ryujinx.Core/OsHle/Services/Aud/IAudioRendererManager.cs b/Ryujinx.Core/OsHle/Services/Aud/IAudioRendererManager.cs index eee47089..dcf3c7b7 100644 --- a/Ryujinx.Core/OsHle/Services/Aud/IAudioRendererManager.cs +++ b/Ryujinx.Core/OsHle/Services/Aud/IAudioRendererManager.cs @@ -53,7 +53,7 @@ namespace Ryujinx.Core.OsHle.Services.Aud { long UserId = Context.RequestData.ReadInt64(); - MakeObject(Context, new IAudioDeviceService()); + MakeObject(Context, new IAudioDevice()); return 0; } diff --git a/Ryujinx.Core/OsHle/Services/Caps/IAlbumAccessorService.cs b/Ryujinx.Core/OsHle/Services/Caps/IAlbumAccessorService.cs new file mode 100644 index 00000000..d92f3e53 --- /dev/null +++ b/Ryujinx.Core/OsHle/Services/Caps/IAlbumAccessorService.cs @@ -0,0 +1,20 @@ +using Ryujinx.Core.OsHle.Ipc; +using System.Collections.Generic; + +namespace Ryujinx.Core.OsHle.Services.Caps +{ + class IAlbumAccessorService : IpcService + { + private Dictionary<int, ServiceProcessRequest> m_Commands; + + public override IReadOnlyDictionary<int, ServiceProcessRequest> Commands => m_Commands; + + public IAlbumAccessorService() + { + m_Commands = new Dictionary<int, ServiceProcessRequest>() + { + //... + }; + } + } +}
\ No newline at end of file diff --git a/Ryujinx.Core/OsHle/Services/Caps/IScreenshotService.cs b/Ryujinx.Core/OsHle/Services/Caps/IScreenshotService.cs new file mode 100644 index 00000000..af9b53a8 --- /dev/null +++ b/Ryujinx.Core/OsHle/Services/Caps/IScreenshotService.cs @@ -0,0 +1,20 @@ +using Ryujinx.Core.OsHle.Ipc; +using System.Collections.Generic; + +namespace Ryujinx.Core.OsHle.Services.Caps +{ + class IScreenshotService : IpcService + { + private Dictionary<int, ServiceProcessRequest> m_Commands; + + public override IReadOnlyDictionary<int, ServiceProcessRequest> Commands => m_Commands; + + public IScreenshotService() + { + m_Commands = new Dictionary<int, ServiceProcessRequest>() + { + //... + }; + } + } +}
\ No newline at end of file diff --git a/Ryujinx.Core/OsHle/Services/ServiceFactory.cs b/Ryujinx.Core/OsHle/Services/ServiceFactory.cs index 11a5e46a..8e639b94 100644 --- a/Ryujinx.Core/OsHle/Services/ServiceFactory.cs +++ b/Ryujinx.Core/OsHle/Services/ServiceFactory.cs @@ -3,6 +3,7 @@ using Ryujinx.Core.OsHle.Services.Am; using Ryujinx.Core.OsHle.Services.Apm; using Ryujinx.Core.OsHle.Services.Aud; using Ryujinx.Core.OsHle.Services.Bsd; +using Ryujinx.Core.OsHle.Services.Caps; using Ryujinx.Core.OsHle.Services.Friend; using Ryujinx.Core.OsHle.Services.FspSrv; using Ryujinx.Core.OsHle.Services.Hid; @@ -57,9 +58,18 @@ namespace Ryujinx.Core.OsHle.Services case "bsd:u": return new IClient(); + case "caps:a": + return new IAlbumAccessorService(); + + case "caps:ss": + return new IScreenshotService(); + case "friend:a": return new IServiceCreator(); + case "friend:u": + return new IServiceCreator(); + case "fsp-srv": return new IFileSystemProxy(); diff --git a/Ryujinx.Core/OsHle/Services/Time/ITimeZoneService.cs b/Ryujinx.Core/OsHle/Services/Time/ITimeZoneService.cs index 767d3cc7..ec50c82f 100644 --- a/Ryujinx.Core/OsHle/Services/Time/ITimeZoneService.cs +++ b/Ryujinx.Core/OsHle/Services/Time/ITimeZoneService.cs @@ -16,10 +16,23 @@ namespace Ryujinx.Core.OsHle.Services.Time { m_Commands = new Dictionary<int, ServiceProcessRequest>() { - { 101, ToCalendarTimeWithMyRule } + { 0, GetDeviceLocationName }, + { 101, ToCalendarTimeWithMyRule } }; } + public long GetDeviceLocationName(ServiceCtx Context) + { + Logging.Stub(LogClass.ServiceTime, "Stubbed"); + + for (int Index = 0; Index < 0x24; Index++) + { + Context.ResponseData.Write((byte)0); + } + + return 0; + } + public long ToCalendarTimeWithMyRule(ServiceCtx Context) { long PosixTime = Context.RequestData.ReadInt64(); |
