diff --git a/Ryujinx.HLE/HOS/Horizon.cs b/Ryujinx.HLE/HOS/Horizon.cs index 334cba1260..86b2832054 100644 --- a/Ryujinx.HLE/HOS/Horizon.cs +++ b/Ryujinx.HLE/HOS/Horizon.cs @@ -8,6 +8,7 @@ using Ryujinx.HLE.HOS.Kernel.Common; using Ryujinx.HLE.HOS.Kernel.Memory; using Ryujinx.HLE.HOS.Kernel.Process; using Ryujinx.HLE.HOS.Kernel.Threading; +using Ryujinx.HLE.HOS.Services.Settings; using Ryujinx.HLE.HOS.Services.Sm; using Ryujinx.HLE.HOS.Services.Time.Clock; using Ryujinx.HLE.HOS.SystemState; @@ -203,7 +204,7 @@ namespace Ryujinx.HLE.HOS // TODO: use "time!standard_steady_clock_rtc_update_interval_minutes" and implement a worker thread to be accurate. StandardSteadyClockCore.Instance.ConfigureSetupValue(); - if (Services.Set.NxSettings.Settings.TryGetValue("time!standard_network_clock_sufficient_accuracy_minutes", out object standardNetworkClockSufficientAccuracyMinutes)) + if (NxSettings.Settings.TryGetValue("time!standard_network_clock_sufficient_accuracy_minutes", out object standardNetworkClockSufficientAccuracyMinutes)) { TimeSpanType standardNetworkClockSufficientAccuracy = new TimeSpanType((int)standardNetworkClockSufficientAccuracyMinutes * 60000000000); diff --git a/Ryujinx.HLE/HOS/Services/Acc/Account/AccountUtils.cs b/Ryujinx.HLE/HOS/Services/Account/Acc/AccountService/AccountUtils.cs similarity index 94% rename from Ryujinx.HLE/HOS/Services/Acc/Account/AccountUtils.cs rename to Ryujinx.HLE/HOS/Services/Account/Acc/AccountService/AccountUtils.cs index 5e7f4dac3b..7a70025ad0 100644 --- a/Ryujinx.HLE/HOS/Services/Acc/Account/AccountUtils.cs +++ b/Ryujinx.HLE/HOS/Services/Account/Acc/AccountService/AccountUtils.cs @@ -1,10 +1,9 @@ -using Ryujinx.HLE.HOS.SystemState; -using Ryujinx.HLE.Utilities; +using Ryujinx.HLE.Utilities; using System.Collections.Concurrent; using System.Collections.Generic; using System.Linq; -namespace Ryujinx.HLE.HOS.Services.Acc +namespace Ryujinx.HLE.HOS.Services.Account.Acc { public class AccountUtils { diff --git a/Ryujinx.HLE/HOS/Services/Account/Acc/IAccountServiceForAdministrator.cs b/Ryujinx.HLE/HOS/Services/Account/Acc/IAccountServiceForAdministrator.cs new file mode 100644 index 0000000000..9fb3fb9ba4 --- /dev/null +++ b/Ryujinx.HLE/HOS/Services/Account/Acc/IAccountServiceForAdministrator.cs @@ -0,0 +1,8 @@ +namespace Ryujinx.HLE.HOS.Services.Account.Acc +{ + [Service("acc:su")] + class IAccountServiceForAdministrator : IpcService + { + public IAccountServiceForAdministrator(ServiceCtx context) { } + } +} \ No newline at end of file diff --git a/Ryujinx.HLE/HOS/Services/Acc/IAccountService.cs b/Ryujinx.HLE/HOS/Services/Account/Acc/IAccountServiceForApplication.cs similarity index 97% rename from Ryujinx.HLE/HOS/Services/Acc/IAccountService.cs rename to Ryujinx.HLE/HOS/Services/Account/Acc/IAccountServiceForApplication.cs index 23f3eec79c..8423953995 100644 --- a/Ryujinx.HLE/HOS/Services/Acc/IAccountService.cs +++ b/Ryujinx.HLE/HOS/Services/Account/Acc/IAccountServiceForApplication.cs @@ -1,22 +1,18 @@ using Ryujinx.Common.Logging; -using Ryujinx.HLE.FileSystem; -using Ryujinx.HLE.HOS.Services.Glue; -using Ryujinx.HLE.HOS.SystemState; +using Ryujinx.HLE.HOS.Services.Arp; using Ryujinx.HLE.Utilities; -using System; using System.Collections.Generic; -namespace Ryujinx.HLE.HOS.Services.Acc +namespace Ryujinx.HLE.HOS.Services.Account.Acc { [Service("acc:u0")] - [Service("acc:u1")] - class IAccountService : IpcService + class IAccountServiceForApplication : IpcService { private bool _userRegistrationRequestPermitted = false; private ApplicationLaunchProperty _applicationLaunchProperty; - public IAccountService(ServiceCtx context) { } + public IAccountServiceForApplication(ServiceCtx context) { } [Command(0)] // GetUserCount() -> i32 diff --git a/Ryujinx.HLE/HOS/Services/Account/Acc/IAccountServiceForSystemService.cs b/Ryujinx.HLE/HOS/Services/Account/Acc/IAccountServiceForSystemService.cs new file mode 100644 index 0000000000..f1972f6386 --- /dev/null +++ b/Ryujinx.HLE/HOS/Services/Account/Acc/IAccountServiceForSystemService.cs @@ -0,0 +1,8 @@ +namespace Ryujinx.HLE.HOS.Services.Account.Acc +{ + [Service("acc:u1")] + class IAccountServiceForSystemService : IpcService + { + public IAccountServiceForSystemService(ServiceCtx context) { } + } +} \ No newline at end of file diff --git a/Ryujinx.HLE/HOS/Services/Account/Acc/IBaasAccessTokenAccessor.cs b/Ryujinx.HLE/HOS/Services/Account/Acc/IBaasAccessTokenAccessor.cs new file mode 100644 index 0000000000..d28ea2753f --- /dev/null +++ b/Ryujinx.HLE/HOS/Services/Account/Acc/IBaasAccessTokenAccessor.cs @@ -0,0 +1,8 @@ +namespace Ryujinx.HLE.HOS.Services.Account.Acc +{ + [Service("acc:aa")] + class IBaasAccessTokenAccessor : IpcService + { + public IBaasAccessTokenAccessor(ServiceCtx context) { } + } +} \ No newline at end of file diff --git a/Ryujinx.HLE/HOS/Services/Acc/IManagerForApplication.cs b/Ryujinx.HLE/HOS/Services/Account/Acc/IManagerForApplication.cs similarity index 93% rename from Ryujinx.HLE/HOS/Services/Acc/IManagerForApplication.cs rename to Ryujinx.HLE/HOS/Services/Account/Acc/IManagerForApplication.cs index 8fb901c5b7..aa9e07bde6 100644 --- a/Ryujinx.HLE/HOS/Services/Acc/IManagerForApplication.cs +++ b/Ryujinx.HLE/HOS/Services/Account/Acc/IManagerForApplication.cs @@ -1,8 +1,8 @@ using Ryujinx.Common.Logging; -using Ryujinx.HLE.HOS.Services.Glue; +using Ryujinx.HLE.HOS.Services.Arp; using Ryujinx.HLE.Utilities; -namespace Ryujinx.HLE.HOS.Services.Acc +namespace Ryujinx.HLE.HOS.Services.Account.Acc { class IManagerForApplication : IpcService { diff --git a/Ryujinx.HLE/HOS/Services/Acc/IProfile.cs b/Ryujinx.HLE/HOS/Services/Account/Acc/IProfile.cs similarity index 97% rename from Ryujinx.HLE/HOS/Services/Acc/IProfile.cs rename to Ryujinx.HLE/HOS/Services/Account/Acc/IProfile.cs index 10210afed5..0470832b1a 100644 --- a/Ryujinx.HLE/HOS/Services/Acc/IProfile.cs +++ b/Ryujinx.HLE/HOS/Services/Account/Acc/IProfile.cs @@ -1,12 +1,11 @@ using ARMeilleure.Memory; using Ryujinx.Common.Logging; -using Ryujinx.HLE.HOS.SystemState; using Ryujinx.HLE.Utilities; using System.IO; using System.Reflection; using System.Text; -namespace Ryujinx.HLE.HOS.Services.Acc +namespace Ryujinx.HLE.HOS.Services.Account.Acc { class IProfile : IpcService { diff --git a/Ryujinx.HLE/HOS/Services/Acc/Account/AccountState.cs b/Ryujinx.HLE/HOS/Services/Account/Acc/Types/AccountState.cs similarity index 60% rename from Ryujinx.HLE/HOS/Services/Acc/Account/AccountState.cs rename to Ryujinx.HLE/HOS/Services/Account/Acc/Types/AccountState.cs index 7ed3c26ef4..2382a25546 100644 --- a/Ryujinx.HLE/HOS/Services/Acc/Account/AccountState.cs +++ b/Ryujinx.HLE/HOS/Services/Account/Acc/Types/AccountState.cs @@ -1,4 +1,4 @@ -namespace Ryujinx.HLE.HOS.SystemState +namespace Ryujinx.HLE.HOS.Services.Account.Acc { public enum AccountState { diff --git a/Ryujinx.HLE/HOS/Services/Acc/Account/UserProfile.cs b/Ryujinx.HLE/HOS/Services/Account/Acc/Types/UserProfile.cs similarity index 95% rename from Ryujinx.HLE/HOS/Services/Acc/Account/UserProfile.cs rename to Ryujinx.HLE/HOS/Services/Account/Acc/Types/UserProfile.cs index d201d6e75d..25004c2435 100644 --- a/Ryujinx.HLE/HOS/Services/Acc/Account/UserProfile.cs +++ b/Ryujinx.HLE/HOS/Services/Account/Acc/Types/UserProfile.cs @@ -1,7 +1,7 @@ using Ryujinx.HLE.Utilities; using System; -namespace Ryujinx.HLE.HOS.SystemState +namespace Ryujinx.HLE.HOS.Services.Account.Acc { class UserProfile { diff --git a/Ryujinx.HLE/HOS/Services/Account/Dauth/IService.cs b/Ryujinx.HLE/HOS/Services/Account/Dauth/IService.cs new file mode 100644 index 0000000000..7230134929 --- /dev/null +++ b/Ryujinx.HLE/HOS/Services/Account/Dauth/IService.cs @@ -0,0 +1,8 @@ +namespace Ryujinx.HLE.HOS.Services.Account.Dauth +{ + [Service("dauth:0")] // 5.0.0+ + class IService : IpcService + { + public IService(ServiceCtx context) { } + } +} \ No newline at end of file diff --git a/Ryujinx.HLE/HOS/Services/Acc/ResultCode.cs b/Ryujinx.HLE/HOS/Services/Account/ResultCode.cs similarity index 95% rename from Ryujinx.HLE/HOS/Services/Acc/ResultCode.cs rename to Ryujinx.HLE/HOS/Services/Account/ResultCode.cs index 3991875adb..e56732ab17 100644 --- a/Ryujinx.HLE/HOS/Services/Acc/ResultCode.cs +++ b/Ryujinx.HLE/HOS/Services/Account/ResultCode.cs @@ -1,4 +1,4 @@ -namespace Ryujinx.HLE.HOS.Services.Acc +namespace Ryujinx.HLE.HOS.Services.Account { enum ResultCode { diff --git a/Ryujinx.HLE/HOS/Services/Am/ISystemAppletProxy.cs b/Ryujinx.HLE/HOS/Services/Am/AppletAE/AllSystemAppletProxiesService/ISystemAppletProxy.cs similarity index 94% rename from Ryujinx.HLE/HOS/Services/Am/ISystemAppletProxy.cs rename to Ryujinx.HLE/HOS/Services/Am/AppletAE/AllSystemAppletProxiesService/ISystemAppletProxy.cs index 1aa4285783..ecd5076f46 100644 --- a/Ryujinx.HLE/HOS/Services/Am/ISystemAppletProxy.cs +++ b/Ryujinx.HLE/HOS/Services/Am/AppletAE/AllSystemAppletProxiesService/ISystemAppletProxy.cs @@ -1,4 +1,6 @@ -namespace Ryujinx.HLE.HOS.Services.Am +using Ryujinx.HLE.HOS.Services.Am.AppletAE.AllSystemAppletProxiesService.SystemAppletProxy; + +namespace Ryujinx.HLE.HOS.Services.Am.AppletAE.AllSystemAppletProxiesService { class ISystemAppletProxy : IpcService { diff --git a/Ryujinx.HLE/HOS/Services/Am/ILibraryAppletAccessor.cs b/Ryujinx.HLE/HOS/Services/Am/AppletAE/AllSystemAppletProxiesService/LibraryAppletCreator/ILibraryAppletAccessor.cs similarity index 92% rename from Ryujinx.HLE/HOS/Services/Am/ILibraryAppletAccessor.cs rename to Ryujinx.HLE/HOS/Services/Am/AppletAE/AllSystemAppletProxiesService/LibraryAppletCreator/ILibraryAppletAccessor.cs index ec4e23ec83..9d8e2a96f0 100644 --- a/Ryujinx.HLE/HOS/Services/Am/ILibraryAppletAccessor.cs +++ b/Ryujinx.HLE/HOS/Services/Am/AppletAE/AllSystemAppletProxiesService/LibraryAppletCreator/ILibraryAppletAccessor.cs @@ -2,9 +2,10 @@ using Ryujinx.HLE.HOS.Ipc; using Ryujinx.HLE.HOS.Kernel.Common; using Ryujinx.HLE.HOS.Kernel.Threading; +using Ryujinx.HLE.HOS.Services.Am.AppletAE.Storage; using System; -namespace Ryujinx.HLE.HOS.Services.Am +namespace Ryujinx.HLE.HOS.Services.Am.AppletAE.AllSystemAppletProxiesService.LibraryAppletCreator { class ILibraryAppletAccessor : IpcService { diff --git a/Ryujinx.HLE/HOS/Services/Am/IApplicationCreator.cs b/Ryujinx.HLE/HOS/Services/Am/AppletAE/AllSystemAppletProxiesService/SystemAppletProxy/IApplicationCreator.cs similarity index 51% rename from Ryujinx.HLE/HOS/Services/Am/IApplicationCreator.cs rename to Ryujinx.HLE/HOS/Services/Am/AppletAE/AllSystemAppletProxiesService/SystemAppletProxy/IApplicationCreator.cs index e4c6615f07..79e5b05075 100644 --- a/Ryujinx.HLE/HOS/Services/Am/IApplicationCreator.cs +++ b/Ryujinx.HLE/HOS/Services/Am/AppletAE/AllSystemAppletProxiesService/SystemAppletProxy/IApplicationCreator.cs @@ -1,4 +1,4 @@ -namespace Ryujinx.HLE.HOS.Services.Am +namespace Ryujinx.HLE.HOS.Services.Am.AppletAE.AllSystemAppletProxiesService.SystemAppletProxy { class IApplicationCreator : IpcService { diff --git a/Ryujinx.HLE/HOS/Services/Am/IAudioController.cs b/Ryujinx.HLE/HOS/Services/Am/AppletAE/AllSystemAppletProxiesService/SystemAppletProxy/IAudioController.cs similarity index 95% rename from Ryujinx.HLE/HOS/Services/Am/IAudioController.cs rename to Ryujinx.HLE/HOS/Services/Am/AppletAE/AllSystemAppletProxiesService/SystemAppletProxy/IAudioController.cs index f41ed6a0e1..e630c80d94 100644 --- a/Ryujinx.HLE/HOS/Services/Am/IAudioController.cs +++ b/Ryujinx.HLE/HOS/Services/Am/AppletAE/AllSystemAppletProxiesService/SystemAppletProxy/IAudioController.cs @@ -1,6 +1,6 @@ using Ryujinx.Common.Logging; -namespace Ryujinx.HLE.HOS.Services.Am +namespace Ryujinx.HLE.HOS.Services.Am.AppletAE.AllSystemAppletProxiesService.SystemAppletProxy { class IAudioController : IpcService { diff --git a/Ryujinx.HLE/HOS/Services/Am/ICommonStateGetter.cs b/Ryujinx.HLE/HOS/Services/Am/AppletAE/AllSystemAppletProxiesService/SystemAppletProxy/ICommonStateGetter.cs similarity index 90% rename from Ryujinx.HLE/HOS/Services/Am/ICommonStateGetter.cs rename to Ryujinx.HLE/HOS/Services/Am/AppletAE/AllSystemAppletProxiesService/SystemAppletProxy/ICommonStateGetter.cs index 44421b302b..085d9fe600 100644 --- a/Ryujinx.HLE/HOS/Services/Am/ICommonStateGetter.cs +++ b/Ryujinx.HLE/HOS/Services/Am/AppletAE/AllSystemAppletProxiesService/SystemAppletProxy/ICommonStateGetter.cs @@ -2,15 +2,16 @@ using Ryujinx.Common.Logging; using Ryujinx.HLE.HOS.Ipc; using Ryujinx.HLE.HOS.Kernel.Common; using Ryujinx.HLE.HOS.Kernel.Threading; +using Ryujinx.HLE.HOS.Services.Apm; using System; -namespace Ryujinx.HLE.HOS.Services.Am +namespace Ryujinx.HLE.HOS.Services.Am.AppletAE.AllSystemAppletProxiesService.SystemAppletProxy { class ICommonStateGetter : IpcService { private KEvent _displayResolutionChangeEvent; - private Apm.CpuBoostMode _cpuBoostMode = Apm.CpuBoostMode.Disabled; + private CpuBoostMode _cpuBoostMode = CpuBoostMode.Disabled; public ICommonStateGetter(Horizon system) { @@ -64,9 +65,9 @@ namespace Ryujinx.HLE.HOS.Services.Am // GetPerformanceMode() -> u32 public ResultCode GetPerformanceMode(ServiceCtx context) { - Apm.PerformanceMode mode = context.Device.System.State.DockedMode - ? Apm.PerformanceMode.Docked - : Apm.PerformanceMode.Handheld; + PerformanceMode mode = context.Device.System.State.DockedMode + ? PerformanceMode.Docked + : PerformanceMode.Handheld; context.ResponseData.Write((int)mode); @@ -130,7 +131,7 @@ namespace Ryujinx.HLE.HOS.Services.Am return ResultCode.CpuBoostModeInvalid; } - _cpuBoostMode = (Apm.CpuBoostMode)cpuBoostMode; + _cpuBoostMode = (CpuBoostMode)cpuBoostMode; // NOTE: There is a condition variable after the assignment, probably waiting something with apm:sys service (SetCpuBoostMode call?). // Since we will probably never support CPU boost things, it's not needed to implement more. diff --git a/Ryujinx.HLE/HOS/Services/Am/AppletAE/AllSystemAppletProxiesService/SystemAppletProxy/IDebugFunctions.cs b/Ryujinx.HLE/HOS/Services/Am/AppletAE/AllSystemAppletProxiesService/SystemAppletProxy/IDebugFunctions.cs new file mode 100644 index 0000000000..51a112fd06 --- /dev/null +++ b/Ryujinx.HLE/HOS/Services/Am/AppletAE/AllSystemAppletProxiesService/SystemAppletProxy/IDebugFunctions.cs @@ -0,0 +1,7 @@ +namespace Ryujinx.HLE.HOS.Services.Am.AppletAE.AllSystemAppletProxiesService.SystemAppletProxy +{ + class IDebugFunctions : IpcService + { + public IDebugFunctions() { } + } +} \ No newline at end of file diff --git a/Ryujinx.HLE/HOS/Services/Am/IDisplayController.cs b/Ryujinx.HLE/HOS/Services/Am/AppletAE/AllSystemAppletProxiesService/SystemAppletProxy/IDisplayController.cs similarity index 50% rename from Ryujinx.HLE/HOS/Services/Am/IDisplayController.cs rename to Ryujinx.HLE/HOS/Services/Am/AppletAE/AllSystemAppletProxiesService/SystemAppletProxy/IDisplayController.cs index de3313c642..2b04dbb5ac 100644 --- a/Ryujinx.HLE/HOS/Services/Am/IDisplayController.cs +++ b/Ryujinx.HLE/HOS/Services/Am/AppletAE/AllSystemAppletProxiesService/SystemAppletProxy/IDisplayController.cs @@ -1,4 +1,4 @@ -namespace Ryujinx.HLE.HOS.Services.Am +namespace Ryujinx.HLE.HOS.Services.Am.AppletAE.AllSystemAppletProxiesService.SystemAppletProxy { class IDisplayController : IpcService { diff --git a/Ryujinx.HLE/HOS/Services/Am/IGlobalStateController.cs b/Ryujinx.HLE/HOS/Services/Am/AppletAE/AllSystemAppletProxiesService/SystemAppletProxy/IGlobalStateController.cs similarity index 52% rename from Ryujinx.HLE/HOS/Services/Am/IGlobalStateController.cs rename to Ryujinx.HLE/HOS/Services/Am/AppletAE/AllSystemAppletProxiesService/SystemAppletProxy/IGlobalStateController.cs index 9172e094b0..24eeefb988 100644 --- a/Ryujinx.HLE/HOS/Services/Am/IGlobalStateController.cs +++ b/Ryujinx.HLE/HOS/Services/Am/AppletAE/AllSystemAppletProxiesService/SystemAppletProxy/IGlobalStateController.cs @@ -1,4 +1,4 @@ -namespace Ryujinx.HLE.HOS.Services.Am +namespace Ryujinx.HLE.HOS.Services.Am.AppletAE.AllSystemAppletProxiesService.SystemAppletProxy { class IGlobalStateController : IpcService { diff --git a/Ryujinx.HLE/HOS/Services/Am/IHomeMenuFunctions.cs b/Ryujinx.HLE/HOS/Services/Am/AppletAE/AllSystemAppletProxiesService/SystemAppletProxy/IHomeMenuFunctions.cs similarity index 92% rename from Ryujinx.HLE/HOS/Services/Am/IHomeMenuFunctions.cs rename to Ryujinx.HLE/HOS/Services/Am/AppletAE/AllSystemAppletProxiesService/SystemAppletProxy/IHomeMenuFunctions.cs index 01a684752d..a5819132db 100644 --- a/Ryujinx.HLE/HOS/Services/Am/IHomeMenuFunctions.cs +++ b/Ryujinx.HLE/HOS/Services/Am/AppletAE/AllSystemAppletProxiesService/SystemAppletProxy/IHomeMenuFunctions.cs @@ -4,7 +4,7 @@ using Ryujinx.HLE.HOS.Kernel.Common; using Ryujinx.HLE.HOS.Kernel.Threading; using System; -namespace Ryujinx.HLE.HOS.Services.Am +namespace Ryujinx.HLE.HOS.Services.Am.AppletAE.AllSystemAppletProxiesService.SystemAppletProxy { class IHomeMenuFunctions : IpcService { diff --git a/Ryujinx.HLE/HOS/Services/Am/ILibraryAppletCreator.cs b/Ryujinx.HLE/HOS/Services/Am/AppletAE/AllSystemAppletProxiesService/SystemAppletProxy/ILibraryAppletCreator.cs similarity index 79% rename from Ryujinx.HLE/HOS/Services/Am/ILibraryAppletCreator.cs rename to Ryujinx.HLE/HOS/Services/Am/AppletAE/AllSystemAppletProxiesService/SystemAppletProxy/ILibraryAppletCreator.cs index 27ae947ef0..8b0b225bd9 100644 --- a/Ryujinx.HLE/HOS/Services/Am/ILibraryAppletCreator.cs +++ b/Ryujinx.HLE/HOS/Services/Am/AppletAE/AllSystemAppletProxiesService/SystemAppletProxy/ILibraryAppletCreator.cs @@ -1,4 +1,6 @@ -namespace Ryujinx.HLE.HOS.Services.Am +using Ryujinx.HLE.HOS.Services.Am.AppletAE.AllSystemAppletProxiesService.LibraryAppletCreator; + +namespace Ryujinx.HLE.HOS.Services.Am.AppletAE.AllSystemAppletProxiesService.SystemAppletProxy { class ILibraryAppletCreator : IpcService { diff --git a/Ryujinx.HLE/HOS/Services/Am/ISelfController.cs b/Ryujinx.HLE/HOS/Services/Am/AppletAE/AllSystemAppletProxiesService/SystemAppletProxy/ISelfController.cs similarity index 98% rename from Ryujinx.HLE/HOS/Services/Am/ISelfController.cs rename to Ryujinx.HLE/HOS/Services/Am/AppletAE/AllSystemAppletProxiesService/SystemAppletProxy/ISelfController.cs index b256e59fae..62f1beec23 100644 --- a/Ryujinx.HLE/HOS/Services/Am/ISelfController.cs +++ b/Ryujinx.HLE/HOS/Services/Am/AppletAE/AllSystemAppletProxiesService/SystemAppletProxy/ISelfController.cs @@ -4,7 +4,7 @@ using Ryujinx.HLE.HOS.Kernel.Common; using Ryujinx.HLE.HOS.Kernel.Threading; using System; -namespace Ryujinx.HLE.HOS.Services.Am +namespace Ryujinx.HLE.HOS.Services.Am.AppletAE.AllSystemAppletProxiesService.SystemAppletProxy { class ISelfController : IpcService { diff --git a/Ryujinx.HLE/HOS/Services/Am/IWindowController.cs b/Ryujinx.HLE/HOS/Services/Am/AppletAE/AllSystemAppletProxiesService/SystemAppletProxy/IWindowController.cs similarity index 87% rename from Ryujinx.HLE/HOS/Services/Am/IWindowController.cs rename to Ryujinx.HLE/HOS/Services/Am/AppletAE/AllSystemAppletProxiesService/SystemAppletProxy/IWindowController.cs index 68d0954dd3..449658cfed 100644 --- a/Ryujinx.HLE/HOS/Services/Am/IWindowController.cs +++ b/Ryujinx.HLE/HOS/Services/Am/AppletAE/AllSystemAppletProxiesService/SystemAppletProxy/IWindowController.cs @@ -1,6 +1,6 @@ using Ryujinx.Common.Logging; -namespace Ryujinx.HLE.HOS.Services.Am +namespace Ryujinx.HLE.HOS.Services.Am.AppletAE.AllSystemAppletProxiesService.SystemAppletProxy { class IWindowController : IpcService { diff --git a/Ryujinx.HLE/HOS/Services/Am/AppletAE/AllSystemAppletProxiesService/SystemAppletProxy/Types/FocusState.cs b/Ryujinx.HLE/HOS/Services/Am/AppletAE/AllSystemAppletProxiesService/SystemAppletProxy/Types/FocusState.cs new file mode 100644 index 0000000000..dfd7d7f2c2 --- /dev/null +++ b/Ryujinx.HLE/HOS/Services/Am/AppletAE/AllSystemAppletProxiesService/SystemAppletProxy/Types/FocusState.cs @@ -0,0 +1,8 @@ +namespace Ryujinx.HLE.HOS.Services.Am.AppletAE.AllSystemAppletProxiesService.SystemAppletProxy +{ + enum FocusState + { + InFocus = 1, + OutOfFocus = 2 + } +} \ No newline at end of file diff --git a/Ryujinx.HLE/HOS/Services/Am/MessageInfo.cs b/Ryujinx.HLE/HOS/Services/Am/AppletAE/AllSystemAppletProxiesService/SystemAppletProxy/Types/MessageInfo.cs similarity index 61% rename from Ryujinx.HLE/HOS/Services/Am/MessageInfo.cs rename to Ryujinx.HLE/HOS/Services/Am/AppletAE/AllSystemAppletProxiesService/SystemAppletProxy/Types/MessageInfo.cs index 65fddbedc2..ff699315a1 100644 --- a/Ryujinx.HLE/HOS/Services/Am/MessageInfo.cs +++ b/Ryujinx.HLE/HOS/Services/Am/AppletAE/AllSystemAppletProxiesService/SystemAppletProxy/Types/MessageInfo.cs @@ -1,4 +1,4 @@ -namespace Ryujinx.HLE.HOS.Services.Am +namespace Ryujinx.HLE.HOS.Services.Am.AppletAE.AllSystemAppletProxiesService.SystemAppletProxy { enum MessageInfo { diff --git a/Ryujinx.HLE/HOS/Services/Am/AppletAE/AllSystemAppletProxiesService/SystemAppletProxy/Types/OperationMode.cs b/Ryujinx.HLE/HOS/Services/Am/AppletAE/AllSystemAppletProxiesService/SystemAppletProxy/Types/OperationMode.cs new file mode 100644 index 0000000000..a82ed476ef --- /dev/null +++ b/Ryujinx.HLE/HOS/Services/Am/AppletAE/AllSystemAppletProxiesService/SystemAppletProxy/Types/OperationMode.cs @@ -0,0 +1,8 @@ +namespace Ryujinx.HLE.HOS.Services.Am.AppletAE.AllSystemAppletProxiesService.SystemAppletProxy +{ + enum OperationMode + { + Handheld = 0, + Docked = 1 + } +} \ No newline at end of file diff --git a/Ryujinx.HLE/HOS/Services/Am/IAllSystemAppletProxiesService.cs b/Ryujinx.HLE/HOS/Services/Am/AppletAE/IAllSystemAppletProxiesService.cs similarity index 79% rename from Ryujinx.HLE/HOS/Services/Am/IAllSystemAppletProxiesService.cs rename to Ryujinx.HLE/HOS/Services/Am/AppletAE/IAllSystemAppletProxiesService.cs index 0b6673474c..d29a8da443 100644 --- a/Ryujinx.HLE/HOS/Services/Am/IAllSystemAppletProxiesService.cs +++ b/Ryujinx.HLE/HOS/Services/Am/AppletAE/IAllSystemAppletProxiesService.cs @@ -1,4 +1,6 @@ -namespace Ryujinx.HLE.HOS.Services.Am +using Ryujinx.HLE.HOS.Services.Am.AppletAE.AllSystemAppletProxiesService; + +namespace Ryujinx.HLE.HOS.Services.Am.AppletAE { [Service("appletAE")] class IAllSystemAppletProxiesService : IpcService diff --git a/Ryujinx.HLE/HOS/Services/Am/IStorage.cs b/Ryujinx.HLE/HOS/Services/Am/AppletAE/IStorage.cs similarity index 90% rename from Ryujinx.HLE/HOS/Services/Am/IStorage.cs rename to Ryujinx.HLE/HOS/Services/Am/AppletAE/IStorage.cs index 3d351fc115..37514275db 100644 --- a/Ryujinx.HLE/HOS/Services/Am/IStorage.cs +++ b/Ryujinx.HLE/HOS/Services/Am/AppletAE/IStorage.cs @@ -1,4 +1,4 @@ -namespace Ryujinx.HLE.HOS.Services.Am +namespace Ryujinx.HLE.HOS.Services.Am.AppletAE { class IStorage : IpcService { diff --git a/Ryujinx.HLE/HOS/Services/Am/IStorageAccessor.cs b/Ryujinx.HLE/HOS/Services/Am/AppletAE/IStorageAccessor.cs similarity index 97% rename from Ryujinx.HLE/HOS/Services/Am/IStorageAccessor.cs rename to Ryujinx.HLE/HOS/Services/Am/AppletAE/IStorageAccessor.cs index 76f6caf527..90eb13ce00 100644 --- a/Ryujinx.HLE/HOS/Services/Am/IStorageAccessor.cs +++ b/Ryujinx.HLE/HOS/Services/Am/AppletAE/IStorageAccessor.cs @@ -1,6 +1,6 @@ using System; -namespace Ryujinx.HLE.HOS.Services.Am +namespace Ryujinx.HLE.HOS.Services.Am.AppletAE { class IStorageAccessor : IpcService { diff --git a/Ryujinx.HLE/HOS/Services/Am/StorageHelper.cs b/Ryujinx.HLE/HOS/Services/Am/AppletAE/Storage/StorageHelper.cs similarity index 66% rename from Ryujinx.HLE/HOS/Services/Am/StorageHelper.cs rename to Ryujinx.HLE/HOS/Services/Am/AppletAE/Storage/StorageHelper.cs index a3dbbeb765..9c96221e2e 100644 --- a/Ryujinx.HLE/HOS/Services/Am/StorageHelper.cs +++ b/Ryujinx.HLE/HOS/Services/Am/AppletAE/Storage/StorageHelper.cs @@ -1,6 +1,6 @@ using System.IO; -namespace Ryujinx.HLE.HOS.Services.Am +namespace Ryujinx.HLE.HOS.Services.Am.AppletAE.Storage { class StorageHelper { @@ -16,9 +16,9 @@ namespace Ryujinx.HLE.HOS.Services.Am ms.SetLength(0x88); writer.Write(LaunchParamsMagic); - writer.Write(1); //IsAccountSelected? Only lower 8 bits actually used. - writer.Write(1L); //User Id Low (note: User Id needs to be != 0) - writer.Write(0L); //User Id High + writer.Write(1); // IsAccountSelected? Only lower 8 bits actually used. + writer.Write(1L); // User Id Low (note: User Id needs to be != 0) + writer.Write(0L); // User Id High return ms.ToArray(); } diff --git a/Ryujinx.HLE/HOS/Services/Am/IApplicationFunctions.cs b/Ryujinx.HLE/HOS/Services/Am/AppletOE/ApplicationProxyService/ApplicationProxy/IApplicationFunctions.cs similarity index 94% rename from Ryujinx.HLE/HOS/Services/Am/IApplicationFunctions.cs rename to Ryujinx.HLE/HOS/Services/Am/AppletOE/ApplicationProxyService/ApplicationProxy/IApplicationFunctions.cs index 03e97dfe02..798316bea1 100644 --- a/Ryujinx.HLE/HOS/Services/Am/IApplicationFunctions.cs +++ b/Ryujinx.HLE/HOS/Services/Am/AppletOE/ApplicationProxyService/ApplicationProxy/IApplicationFunctions.cs @@ -1,6 +1,8 @@ using Ryujinx.Common.Logging; +using Ryujinx.HLE.HOS.Services.Am.AppletAE; +using Ryujinx.HLE.HOS.Services.Am.AppletAE.Storage; -namespace Ryujinx.HLE.HOS.Services.Am +namespace Ryujinx.HLE.HOS.Services.Am.AppletOE.ApplicationProxyService.ApplicationProxy { class IApplicationFunctions : IpcService { diff --git a/Ryujinx.HLE/HOS/Services/Am/IApplicationProxy.cs b/Ryujinx.HLE/HOS/Services/Am/AppletOE/ApplicationProxyService/IApplicationProxy.cs similarity index 90% rename from Ryujinx.HLE/HOS/Services/Am/IApplicationProxy.cs rename to Ryujinx.HLE/HOS/Services/Am/AppletOE/ApplicationProxyService/IApplicationProxy.cs index 0e8e342316..29ee214190 100644 --- a/Ryujinx.HLE/HOS/Services/Am/IApplicationProxy.cs +++ b/Ryujinx.HLE/HOS/Services/Am/AppletOE/ApplicationProxyService/IApplicationProxy.cs @@ -1,4 +1,7 @@ -namespace Ryujinx.HLE.HOS.Services.Am +using Ryujinx.HLE.HOS.Services.Am.AppletAE.AllSystemAppletProxiesService.SystemAppletProxy; +using Ryujinx.HLE.HOS.Services.Am.AppletOE.ApplicationProxyService.ApplicationProxy; + +namespace Ryujinx.HLE.HOS.Services.Am.AppletOE.ApplicationProxyService { class IApplicationProxy : IpcService { diff --git a/Ryujinx.HLE/HOS/Services/Am/IApplicationProxyService.cs b/Ryujinx.HLE/HOS/Services/Am/AppletOE/IApplicationProxyService.cs similarity index 81% rename from Ryujinx.HLE/HOS/Services/Am/IApplicationProxyService.cs rename to Ryujinx.HLE/HOS/Services/Am/AppletOE/IApplicationProxyService.cs index e0e1e10795..fc74aa1f3d 100644 --- a/Ryujinx.HLE/HOS/Services/Am/IApplicationProxyService.cs +++ b/Ryujinx.HLE/HOS/Services/Am/AppletOE/IApplicationProxyService.cs @@ -1,3 +1,6 @@ +using Ryujinx.HLE.HOS.Services.Am.AppletAE; +using Ryujinx.HLE.HOS.Services.Am.AppletOE.ApplicationProxyService; + namespace Ryujinx.HLE.HOS.Services.Am { [Service("appletOE")] diff --git a/Ryujinx.HLE/HOS/Services/Am/FocusState.cs b/Ryujinx.HLE/HOS/Services/Am/FocusState.cs deleted file mode 100644 index e8ae722369..0000000000 --- a/Ryujinx.HLE/HOS/Services/Am/FocusState.cs +++ /dev/null @@ -1,8 +0,0 @@ -namespace Ryujinx.HLE.HOS.Services.Am -{ - enum FocusState - { - InFocus = 1, - OutOfFocus = 2 - } -} \ No newline at end of file diff --git a/Ryujinx.HLE/HOS/Services/Am/IDebugFunctions.cs b/Ryujinx.HLE/HOS/Services/Am/IDebugFunctions.cs deleted file mode 100644 index ebde33f4ce..0000000000 --- a/Ryujinx.HLE/HOS/Services/Am/IDebugFunctions.cs +++ /dev/null @@ -1,7 +0,0 @@ -namespace Ryujinx.HLE.HOS.Services.Am -{ - class IDebugFunctions : IpcService - { - public IDebugFunctions() { } - } -} \ No newline at end of file diff --git a/Ryujinx.HLE/HOS/Services/Am/Idle/IPolicyManagerSystem.cs b/Ryujinx.HLE/HOS/Services/Am/Idle/IPolicyManagerSystem.cs new file mode 100644 index 0000000000..8c72319c3e --- /dev/null +++ b/Ryujinx.HLE/HOS/Services/Am/Idle/IPolicyManagerSystem.cs @@ -0,0 +1,8 @@ +namespace Ryujinx.HLE.HOS.Services.Am.Idle +{ + [Service("idle:sys")] + class IPolicyManagerSystem : IpcService + { + public IPolicyManagerSystem(ServiceCtx context) { } + } +} \ No newline at end of file diff --git a/Ryujinx.HLE/HOS/Services/Am/Omm/IOperationModeManager.cs b/Ryujinx.HLE/HOS/Services/Am/Omm/IOperationModeManager.cs new file mode 100644 index 0000000000..2856e6d7b3 --- /dev/null +++ b/Ryujinx.HLE/HOS/Services/Am/Omm/IOperationModeManager.cs @@ -0,0 +1,8 @@ +namespace Ryujinx.HLE.HOS.Services.Am.Omm +{ + [Service("omm")] + class IOperationModeManager : IpcService + { + public IOperationModeManager(ServiceCtx context) { } + } +} \ No newline at end of file diff --git a/Ryujinx.HLE/HOS/Services/Am/OperationMode.cs b/Ryujinx.HLE/HOS/Services/Am/OperationMode.cs deleted file mode 100644 index cb11fff97d..0000000000 --- a/Ryujinx.HLE/HOS/Services/Am/OperationMode.cs +++ /dev/null @@ -1,8 +0,0 @@ -namespace Ryujinx.HLE.HOS.Services.Am -{ - enum OperationMode - { - Handheld = 0, - Docked = 1 - } -} \ No newline at end of file diff --git a/Ryujinx.HLE/HOS/Services/Am/Spsm/IPowerStateInterface.cs b/Ryujinx.HLE/HOS/Services/Am/Spsm/IPowerStateInterface.cs new file mode 100644 index 0000000000..a393f76be4 --- /dev/null +++ b/Ryujinx.HLE/HOS/Services/Am/Spsm/IPowerStateInterface.cs @@ -0,0 +1,8 @@ +namespace Ryujinx.HLE.HOS.Services.Am.Spsm +{ + [Service("spsm")] + class IPowerStateInterface : IpcService + { + public IPowerStateInterface(ServiceCtx context) { } + } +} \ No newline at end of file diff --git a/Ryujinx.HLE/HOS/Services/Am/Tcap/IManager.cs b/Ryujinx.HLE/HOS/Services/Am/Tcap/IManager.cs new file mode 100644 index 0000000000..b31ccf8a36 --- /dev/null +++ b/Ryujinx.HLE/HOS/Services/Am/Tcap/IManager.cs @@ -0,0 +1,8 @@ +namespace Ryujinx.HLE.HOS.Services.Am.Tcap +{ + [Service("tcap")] + class IManager : IpcService + { + public IManager(ServiceCtx context) { } + } +} \ No newline at end of file diff --git a/Ryujinx.HLE/HOS/Services/Vi/NvFlinger.cs b/Ryujinx.HLE/HOS/Services/Android/NvFlinger.cs similarity index 85% rename from Ryujinx.HLE/HOS/Services/Vi/NvFlinger.cs rename to Ryujinx.HLE/HOS/Services/Android/NvFlinger.cs index 5db028cc9a..5580c3be4e 100644 --- a/Ryujinx.HLE/HOS/Services/Vi/NvFlinger.cs +++ b/Ryujinx.HLE/HOS/Services/Android/NvFlinger.cs @@ -2,8 +2,8 @@ using Ryujinx.Common.Logging; using Ryujinx.Graphics.Gal; using Ryujinx.Graphics.Memory; using Ryujinx.HLE.HOS.Kernel.Threading; -using Ryujinx.HLE.HOS.Services.Nv.NvGpuAS; -using Ryujinx.HLE.HOS.Services.Nv.NvMap; +using Ryujinx.HLE.HOS.Services.Nv.NvDrvServices.NvGpuAS; +using Ryujinx.HLE.HOS.Services.Nv.NvDrvServices.NvMap; using System; using System.Collections.Generic; using System.IO; @@ -28,101 +28,6 @@ namespace Ryujinx.HLE.HOS.Services.Android private const int BufferQueueCount = 0x40; private const int BufferQueueMask = BufferQueueCount - 1; - [Flags] - private enum HalTransform - { - FlipX = 1, - FlipY = 2, - Rotate90 = 4, - Rotate180 = FlipX | FlipY, - Rotate270 = Rotate90 | Rotate180, - } - - private enum BufferState - { - Free, - Dequeued, - Queued, - Acquired - } - - [StructLayout(LayoutKind.Sequential, Size = 0x8)] - private struct Fence - { - public int id; - public int value; - } - - [StructLayout(LayoutKind.Explicit, Size = 0x24)] - private struct MultiFence - { - [FieldOffset(0x0)] - public int FenceCount; - - [FieldOffset(0x4)] - public Fence Fence0; - - [FieldOffset(0xC)] - public Fence Fence1; - - [FieldOffset(0x14)] - public Fence Fence2; - - [FieldOffset(0x1C)] - public Fence Fence3; - } - - [StructLayout(LayoutKind.Sequential, Size = 0x10)] - private struct Rect - { - public int Top; - public int Left; - public int Right; - public int Bottom; - } - - [StructLayout(LayoutKind.Explicit)] - private struct QueueBufferObject - { - [FieldOffset(0x0)] - public long Timestamp; - - [FieldOffset(0x8)] - public int IsAutoTimestamp; - - [FieldOffset(0xC)] - public Rect Crop; - - [FieldOffset(0x1C)] - public int ScalingMode; - - [FieldOffset(0x20)] - public HalTransform Transform; - - [FieldOffset(0x24)] - public int StickyTransform; - - [FieldOffset(0x28)] - public int Unknown; - - [FieldOffset(0x2C)] - public int SwapInterval; - - [FieldOffset(0x30)] - public MultiFence Fence; - } - - private struct BufferEntry - { - public BufferState State; - - public HalTransform Transform; - - public Rect Crop; - - public GbpBuffer Data; - } - private BufferEntry[] _bufferQueue; private AutoResetEvent _waitBufferFree; diff --git a/Ryujinx.HLE/HOS/Services/Vi/Parcel.cs b/Ryujinx.HLE/HOS/Services/Android/Parcel.cs similarity index 100% rename from Ryujinx.HLE/HOS/Services/Vi/Parcel.cs rename to Ryujinx.HLE/HOS/Services/Android/Parcel.cs diff --git a/Ryujinx.HLE/HOS/Services/Android/Types/BufferEntry.cs b/Ryujinx.HLE/HOS/Services/Android/Types/BufferEntry.cs new file mode 100644 index 0000000000..91744859b1 --- /dev/null +++ b/Ryujinx.HLE/HOS/Services/Android/Types/BufferEntry.cs @@ -0,0 +1,13 @@ +namespace Ryujinx.HLE.HOS.Services.Android +{ + struct BufferEntry + { + public BufferState State; + + public HalTransform Transform; + + public Rect Crop; + + public GbpBuffer Data; + } +} \ No newline at end of file diff --git a/Ryujinx.HLE/HOS/Services/Android/Types/BufferState.cs b/Ryujinx.HLE/HOS/Services/Android/Types/BufferState.cs new file mode 100644 index 0000000000..e79d5d8f77 --- /dev/null +++ b/Ryujinx.HLE/HOS/Services/Android/Types/BufferState.cs @@ -0,0 +1,10 @@ +namespace Ryujinx.HLE.HOS.Services.Android +{ + enum BufferState + { + Free, + Dequeued, + Queued, + Acquired + } +} \ No newline at end of file diff --git a/Ryujinx.HLE/HOS/Services/Android/Types/Color/ColorBytePerPixel.cs b/Ryujinx.HLE/HOS/Services/Android/Types/Color/ColorBytePerPixel.cs new file mode 100644 index 0000000000..a937f15fc9 --- /dev/null +++ b/Ryujinx.HLE/HOS/Services/Android/Types/Color/ColorBytePerPixel.cs @@ -0,0 +1,17 @@ +namespace Ryujinx.HLE.HOS.Services.Android +{ + enum ColorBytePerPixel + { + Bpp1 = 1, + Bpp2 = 2, + Bpp4 = 4, + Bpp8 = 8, + Bpp16 = 16, + Bpp24 = 24, + Bpp32 = 32, + Bpp48 = 48, + Bpp64 = 64, + Bpp96 = 96, + Bpp128 = 128 + } +} \ No newline at end of file diff --git a/Ryujinx.HLE/HOS/Services/Android/Types/Color/ColorComponent.cs b/Ryujinx.HLE/HOS/Services/Android/Types/Color/ColorComponent.cs new file mode 100644 index 0000000000..7ea20df719 --- /dev/null +++ b/Ryujinx.HLE/HOS/Services/Android/Types/Color/ColorComponent.cs @@ -0,0 +1,42 @@ +namespace Ryujinx.HLE.HOS.Services.Android +{ + enum ColorComponent : uint + { + X1 = (0x01 << ColorShift.Component) | ColorBytePerPixel.Bpp1, + X2 = (0x02 << ColorShift.Component) | ColorBytePerPixel.Bpp2, + X4 = (0x03 << ColorShift.Component) | ColorBytePerPixel.Bpp4, + X8 = (0x04 << ColorShift.Component) | ColorBytePerPixel.Bpp8, + Y4X4 = (0x05 << ColorShift.Component) | ColorBytePerPixel.Bpp8, + X3Y3Z2 = (0x06 << ColorShift.Component) | ColorBytePerPixel.Bpp8, + X8Y8 = (0x07 << ColorShift.Component) | ColorBytePerPixel.Bpp16, + X8Y8X8Z8 = (0x08 << ColorShift.Component) | ColorBytePerPixel.Bpp16, + Y8X8Z8X8 = (0x09 << ColorShift.Component) | ColorBytePerPixel.Bpp16, + X16 = (0x0A << ColorShift.Component) | ColorBytePerPixel.Bpp16, + Y2X14 = (0x0B << ColorShift.Component) | ColorBytePerPixel.Bpp16, + Y4X12 = (0x0C << ColorShift.Component) | ColorBytePerPixel.Bpp16, + Y6X10 = (0x0D << ColorShift.Component) | ColorBytePerPixel.Bpp16, + Y8X8 = (0x0E << ColorShift.Component) | ColorBytePerPixel.Bpp16, + X10 = (0x0F << ColorShift.Component) | ColorBytePerPixel.Bpp16, + X12 = (0x10 << ColorShift.Component) | ColorBytePerPixel.Bpp16, + Z5Y5X6 = (0x11 << ColorShift.Component) | ColorBytePerPixel.Bpp16, + X5Y6Z5 = (0x12 << ColorShift.Component) | ColorBytePerPixel.Bpp16, + X6Y5Z5 = (0x13 << ColorShift.Component) | ColorBytePerPixel.Bpp16, + X1Y5Z5W5 = (0x14 << ColorShift.Component) | ColorBytePerPixel.Bpp16, + X4Y4Z4W4 = (0x15 << ColorShift.Component) | ColorBytePerPixel.Bpp16, + X5Y1Z5W5 = (0x16 << ColorShift.Component) | ColorBytePerPixel.Bpp16, + X5Y5Z1W5 = (0x17 << ColorShift.Component) | ColorBytePerPixel.Bpp16, + X5Y5Z5W1 = (0x18 << ColorShift.Component) | ColorBytePerPixel.Bpp16, + X8Y8Z8 = (0x19 << ColorShift.Component) | ColorBytePerPixel.Bpp24, + X24 = (0x1A << ColorShift.Component) | ColorBytePerPixel.Bpp24, + X32 = (0x1C << ColorShift.Component) | ColorBytePerPixel.Bpp32, + X16Y16 = (0x1D << ColorShift.Component) | ColorBytePerPixel.Bpp32, + X11Y11Z10 = (0x1E << ColorShift.Component) | ColorBytePerPixel.Bpp32, + X2Y10Z10W10 = (0x20 << ColorShift.Component) | ColorBytePerPixel.Bpp32, + X8Y8Z8W8 = (0x21 << ColorShift.Component) | ColorBytePerPixel.Bpp32, + Y10X10 = (0x22 << ColorShift.Component) | ColorBytePerPixel.Bpp32, + X10Y10Z10W2 = (0x23 << ColorShift.Component) | ColorBytePerPixel.Bpp32, + Y12X12 = (0x24 << ColorShift.Component) | ColorBytePerPixel.Bpp32, + X20Y20Z20 = (0x26 << ColorShift.Component) | ColorBytePerPixel.Bpp64, + X16Y16Z16W16 = (0x27 << ColorShift.Component) | ColorBytePerPixel.Bpp64, + } +} \ No newline at end of file diff --git a/Ryujinx.HLE/HOS/Services/Android/Types/Color/ColorDataType.cs b/Ryujinx.HLE/HOS/Services/Android/Types/Color/ColorDataType.cs new file mode 100644 index 0000000000..c380cb1b72 --- /dev/null +++ b/Ryujinx.HLE/HOS/Services/Android/Types/Color/ColorDataType.cs @@ -0,0 +1,9 @@ +namespace Ryujinx.HLE.HOS.Services.Android +{ + enum ColorDataType + { + Integer = 0x0 << ColorShift.DataType, + Float = 0x1 << ColorShift.DataType, + Stencil = 0x2 << ColorShift.DataType + } +} \ No newline at end of file diff --git a/Ryujinx.HLE/HOS/Services/Vi/ColorFormat.cs b/Ryujinx.HLE/HOS/Services/Android/Types/Color/ColorFormat.cs similarity index 84% rename from Ryujinx.HLE/HOS/Services/Vi/ColorFormat.cs rename to Ryujinx.HLE/HOS/Services/Android/Types/Color/ColorFormat.cs index 2522dffcb6..1aed4d5827 100644 --- a/Ryujinx.HLE/HOS/Services/Vi/ColorFormat.cs +++ b/Ryujinx.HLE/HOS/Services/Android/Types/Color/ColorFormat.cs @@ -1,136 +1,5 @@ -// ReSharper disable InconsistentNaming -namespace Ryujinx.HLE.HOS.Services.Android +namespace Ryujinx.HLE.HOS.Services.Android { - class ColorShift - { - public const int Swizzle = 16; - public const int DataType = 14; - public const int Space = 32; - public const int Component = 8; - } - - enum ColorSwizzle - { - XYZW = 0x688 << ColorShift.Swizzle, - ZYXW = 0x60a << ColorShift.Swizzle, - WZYX = 0x053 << ColorShift.Swizzle, - YZWX = 0x0d1 << ColorShift.Swizzle, - XYZ1 = 0xa88 << ColorShift.Swizzle, - YZW1 = 0xad1 << ColorShift.Swizzle, - XXX1 = 0xa00 << ColorShift.Swizzle, - XZY1 = 0xa50 << ColorShift.Swizzle, - ZYX1 = 0xa0a << ColorShift.Swizzle, - WZY1 = 0xa53 << ColorShift.Swizzle, - X000 = 0x920 << ColorShift.Swizzle, - Y000 = 0x921 << ColorShift.Swizzle, - XY01 = 0xb08 << ColorShift.Swizzle, - X001 = 0xb20 << ColorShift.Swizzle, - X00X = 0x121 << ColorShift.Swizzle, - X00Y = 0x320 << ColorShift.Swizzle, - _0YX0 = 0x80c << ColorShift.Swizzle, - _0ZY0 = 0x814 << ColorShift.Swizzle, - _0XZ0 = 0x884 << ColorShift.Swizzle, - _0X00 = 0x904 << ColorShift.Swizzle, - _00X0 = 0x824 << ColorShift.Swizzle, - _000X = 0x124 << ColorShift.Swizzle, - _0XY0 = 0x844 << ColorShift.Swizzle, - XXXY = 0x200 << ColorShift.Swizzle, - YYYX = 0x049 << ColorShift.Swizzle - } - - enum ColorBytePerPixel - { - Bpp1 = 1, - Bpp2 = 2, - Bpp4 = 4, - Bpp8 = 8, - Bpp16 = 16, - Bpp24 = 24, - Bpp32 = 32, - Bpp48 = 48, - Bpp64 = 64, - Bpp96 = 96, - Bpp128 = 128 - } - - enum ColorComponent : uint - { - X1 = (0x01 << ColorShift.Component) | ColorBytePerPixel.Bpp1, - X2 = (0x02 << ColorShift.Component) | ColorBytePerPixel.Bpp2, - X4 = (0x03 << ColorShift.Component) | ColorBytePerPixel.Bpp4, - X8 = (0x04 << ColorShift.Component) | ColorBytePerPixel.Bpp8, - Y4X4 = (0x05 << ColorShift.Component) | ColorBytePerPixel.Bpp8, - X3Y3Z2 = (0x06 << ColorShift.Component) | ColorBytePerPixel.Bpp8, - X8Y8 = (0x07 << ColorShift.Component) | ColorBytePerPixel.Bpp16, - X8Y8X8Z8 = (0x08 << ColorShift.Component) | ColorBytePerPixel.Bpp16, - Y8X8Z8X8 = (0x09 << ColorShift.Component) | ColorBytePerPixel.Bpp16, - X16 = (0x0A << ColorShift.Component) | ColorBytePerPixel.Bpp16, - Y2X14 = (0x0B << ColorShift.Component) | ColorBytePerPixel.Bpp16, - Y4X12 = (0x0C << ColorShift.Component) | ColorBytePerPixel.Bpp16, - Y6X10 = (0x0D << ColorShift.Component) | ColorBytePerPixel.Bpp16, - Y8X8 = (0x0E << ColorShift.Component) | ColorBytePerPixel.Bpp16, - X10 = (0x0F << ColorShift.Component) | ColorBytePerPixel.Bpp16, - X12 = (0x10 << ColorShift.Component) | ColorBytePerPixel.Bpp16, - Z5Y5X6 = (0x11 << ColorShift.Component) | ColorBytePerPixel.Bpp16, - X5Y6Z5 = (0x12 << ColorShift.Component) | ColorBytePerPixel.Bpp16, - X6Y5Z5 = (0x13 << ColorShift.Component) | ColorBytePerPixel.Bpp16, - X1Y5Z5W5 = (0x14 << ColorShift.Component) | ColorBytePerPixel.Bpp16, - X4Y4Z4W4 = (0x15 << ColorShift.Component) | ColorBytePerPixel.Bpp16, - X5Y1Z5W5 = (0x16 << ColorShift.Component) | ColorBytePerPixel.Bpp16, - X5Y5Z1W5 = (0x17 << ColorShift.Component) | ColorBytePerPixel.Bpp16, - X5Y5Z5W1 = (0x18 << ColorShift.Component) | ColorBytePerPixel.Bpp16, - X8Y8Z8 = (0x19 << ColorShift.Component) | ColorBytePerPixel.Bpp24, - X24 = (0x1A << ColorShift.Component) | ColorBytePerPixel.Bpp24, - X32 = (0x1C << ColorShift.Component) | ColorBytePerPixel.Bpp32, - X16Y16 = (0x1D << ColorShift.Component) | ColorBytePerPixel.Bpp32, - X11Y11Z10 = (0x1E << ColorShift.Component) | ColorBytePerPixel.Bpp32, - X2Y10Z10W10 = (0x20 << ColorShift.Component) | ColorBytePerPixel.Bpp32, - X8Y8Z8W8 = (0x21 << ColorShift.Component) | ColorBytePerPixel.Bpp32, - Y10X10 = (0x22 << ColorShift.Component) | ColorBytePerPixel.Bpp32, - X10Y10Z10W2 = (0x23 << ColorShift.Component) | ColorBytePerPixel.Bpp32, - Y12X12 = (0x24 << ColorShift.Component) | ColorBytePerPixel.Bpp32, - X20Y20Z20 = (0x26 << ColorShift.Component) | ColorBytePerPixel.Bpp64, - X16Y16Z16W16 = (0x27 << ColorShift.Component) | ColorBytePerPixel.Bpp64, - } - - enum ColorDataType - { - Integer = 0x0 << ColorShift.DataType, - Float = 0x1 << ColorShift.DataType, - Stencil = 0x2 << ColorShift.DataType - } - - enum ColorSpace : ulong - { - NonColor = 0x0L << ColorShift.Space, - LinearRGBA = 0x1L << ColorShift.Space, - SRGB = 0x2L << ColorShift.Space, - - RGB709 = 0x3L << ColorShift.Space, - LinearRGB709 = 0x4L << ColorShift.Space, - - LinearScRGB = 0x5L << ColorShift.Space, - - RGB2020 = 0x6L << ColorShift.Space, - LinearRGB2020 = 0x7L << ColorShift.Space, - RGB2020_PQ = 0x8L << ColorShift.Space, - - ColorIndex = 0x9L << ColorShift.Space, - - YCbCr601 = 0xAL << ColorShift.Space, - YCbCr601_RR = 0xBL << ColorShift.Space, - YCbCr601_ER = 0xCL << ColorShift.Space, - YCbCr709 = 0xDL << ColorShift.Space, - YCbCr709_ER = 0xEL << ColorShift.Space, - - BayerRGGB = 0x10L << ColorShift.Space, - BayerBGGR = 0x11L << ColorShift.Space, - BayerGRBG = 0x12L << ColorShift.Space, - BayerGBRG = 0x13L << ColorShift.Space, - - XYZ = 0x14L << ColorShift.Space, - } - enum ColorFormat : ulong { NonColor8 = ColorSpace.NonColor | ColorSwizzle.X000 | ColorComponent.X8 | ColorDataType.Integer, diff --git a/Ryujinx.HLE/HOS/Services/Android/Types/Color/ColorShift.cs b/Ryujinx.HLE/HOS/Services/Android/Types/Color/ColorShift.cs new file mode 100644 index 0000000000..827e044538 --- /dev/null +++ b/Ryujinx.HLE/HOS/Services/Android/Types/Color/ColorShift.cs @@ -0,0 +1,10 @@ +namespace Ryujinx.HLE.HOS.Services.Android +{ + class ColorShift + { + public const int Swizzle = 16; + public const int DataType = 14; + public const int Space = 32; + public const int Component = 8; + } +} \ No newline at end of file diff --git a/Ryujinx.HLE/HOS/Services/Android/Types/Color/ColorSpace.cs b/Ryujinx.HLE/HOS/Services/Android/Types/Color/ColorSpace.cs new file mode 100644 index 0000000000..6ee6f428b1 --- /dev/null +++ b/Ryujinx.HLE/HOS/Services/Android/Types/Color/ColorSpace.cs @@ -0,0 +1,33 @@ +namespace Ryujinx.HLE.HOS.Services.Android +{ + enum ColorSpace : ulong + { + NonColor = 0x0L << ColorShift.Space, + LinearRGBA = 0x1L << ColorShift.Space, + SRGB = 0x2L << ColorShift.Space, + + RGB709 = 0x3L << ColorShift.Space, + LinearRGB709 = 0x4L << ColorShift.Space, + + LinearScRGB = 0x5L << ColorShift.Space, + + RGB2020 = 0x6L << ColorShift.Space, + LinearRGB2020 = 0x7L << ColorShift.Space, + RGB2020_PQ = 0x8L << ColorShift.Space, + + ColorIndex = 0x9L << ColorShift.Space, + + YCbCr601 = 0xAL << ColorShift.Space, + YCbCr601_RR = 0xBL << ColorShift.Space, + YCbCr601_ER = 0xCL << ColorShift.Space, + YCbCr709 = 0xDL << ColorShift.Space, + YCbCr709_ER = 0xEL << ColorShift.Space, + + BayerRGGB = 0x10L << ColorShift.Space, + BayerBGGR = 0x11L << ColorShift.Space, + BayerGRBG = 0x12L << ColorShift.Space, + BayerGBRG = 0x13L << ColorShift.Space, + + XYZ = 0x14L << ColorShift.Space, + } +} \ No newline at end of file diff --git a/Ryujinx.HLE/HOS/Services/Android/Types/Color/ColorSwizzle.cs b/Ryujinx.HLE/HOS/Services/Android/Types/Color/ColorSwizzle.cs new file mode 100644 index 0000000000..f82d5a565d --- /dev/null +++ b/Ryujinx.HLE/HOS/Services/Android/Types/Color/ColorSwizzle.cs @@ -0,0 +1,31 @@ +namespace Ryujinx.HLE.HOS.Services.Android +{ + enum ColorSwizzle + { + XYZW = 0x688 << ColorShift.Swizzle, + ZYXW = 0x60a << ColorShift.Swizzle, + WZYX = 0x053 << ColorShift.Swizzle, + YZWX = 0x0d1 << ColorShift.Swizzle, + XYZ1 = 0xa88 << ColorShift.Swizzle, + YZW1 = 0xad1 << ColorShift.Swizzle, + XXX1 = 0xa00 << ColorShift.Swizzle, + XZY1 = 0xa50 << ColorShift.Swizzle, + ZYX1 = 0xa0a << ColorShift.Swizzle, + WZY1 = 0xa53 << ColorShift.Swizzle, + X000 = 0x920 << ColorShift.Swizzle, + Y000 = 0x921 << ColorShift.Swizzle, + XY01 = 0xb08 << ColorShift.Swizzle, + X001 = 0xb20 << ColorShift.Swizzle, + X00X = 0x121 << ColorShift.Swizzle, + X00Y = 0x320 << ColorShift.Swizzle, + _0YX0 = 0x80c << ColorShift.Swizzle, + _0ZY0 = 0x814 << ColorShift.Swizzle, + _0XZ0 = 0x884 << ColorShift.Swizzle, + _0X00 = 0x904 << ColorShift.Swizzle, + _00X0 = 0x824 << ColorShift.Swizzle, + _000X = 0x124 << ColorShift.Swizzle, + _0XY0 = 0x844 << ColorShift.Swizzle, + XXXY = 0x200 << ColorShift.Swizzle, + YYYX = 0x049 << ColorShift.Swizzle + } +} \ No newline at end of file diff --git a/Ryujinx.HLE/HOS/Services/Android/Types/Fence.cs b/Ryujinx.HLE/HOS/Services/Android/Types/Fence.cs new file mode 100644 index 0000000000..a09b7948a3 --- /dev/null +++ b/Ryujinx.HLE/HOS/Services/Android/Types/Fence.cs @@ -0,0 +1,11 @@ +using System.Runtime.InteropServices; + +namespace Ryujinx.HLE.HOS.Services.Android +{ + [StructLayout(LayoutKind.Sequential, Size = 0x8)] + struct Fence + { + public int Id; + public int Value; + } +} \ No newline at end of file diff --git a/Ryujinx.HLE/HOS/Services/Android/Types/GbpBuffer.cs b/Ryujinx.HLE/HOS/Services/Android/Types/GbpBuffer.cs new file mode 100644 index 0000000000..766806f039 --- /dev/null +++ b/Ryujinx.HLE/HOS/Services/Android/Types/GbpBuffer.cs @@ -0,0 +1,37 @@ +using Ryujinx.Common; +using System; +using System.IO; +using System.Runtime.InteropServices; + +namespace Ryujinx.HLE.HOS.Services.Android +{ + struct GbpBuffer + { + public GraphicBufferHeader Header { get; private set; } + public NvGraphicBuffer Buffer { get; private set; } + + public int Size => Marshal.SizeOf() + Marshal.SizeOf(); + + public GbpBuffer(BinaryReader reader) + { + Header = reader.ReadStruct(); + + // ignore fds + // TODO: check if that is used in official implementation + reader.BaseStream.Position += Header.FdsCount * 4; + + if (Header.IntsCount != 0x51) + { + throw new NotImplementedException($"Unexpected Graphic Buffer ints count (expected 0x51, found 0x{Header.IntsCount:x}"); + } + + Buffer = reader.ReadStruct(); + } + + public void Write(BinaryWriter writer) + { + writer.WriteStruct(Header); + writer.WriteStruct(Buffer); + } + } +} \ No newline at end of file diff --git a/Ryujinx.HLE/HOS/Services/Android/Types/GraphicBufferHeader.cs b/Ryujinx.HLE/HOS/Services/Android/Types/GraphicBufferHeader.cs new file mode 100644 index 0000000000..d82523dbcb --- /dev/null +++ b/Ryujinx.HLE/HOS/Services/Android/Types/GraphicBufferHeader.cs @@ -0,0 +1,21 @@ +using System.Runtime.InteropServices; + +namespace Ryujinx.HLE.HOS.Services.Android +{ + [StructLayout(LayoutKind.Sequential, Size = 0x28)] + struct GraphicBufferHeader + { + public int Magic; + public int Width; + public int Height; + public int Stride; + public int Format; + public int Usage; + + public int Pid; + public int RefCount; + + public int FdsCount; + public int IntsCount; + } +} \ No newline at end of file diff --git a/Ryujinx.HLE/HOS/Services/Android/Types/HalTransform.cs b/Ryujinx.HLE/HOS/Services/Android/Types/HalTransform.cs new file mode 100644 index 0000000000..fd2710635d --- /dev/null +++ b/Ryujinx.HLE/HOS/Services/Android/Types/HalTransform.cs @@ -0,0 +1,14 @@ +using System; + +namespace Ryujinx.HLE.HOS.Services.Android +{ + [Flags] + enum HalTransform + { + FlipX = 1, + FlipY = 2, + Rotate90 = 4, + Rotate180 = FlipX | FlipY, + Rotate270 = Rotate90 | Rotate180 + } +} \ No newline at end of file diff --git a/Ryujinx.HLE/HOS/Services/Android/Types/MultiFence.cs b/Ryujinx.HLE/HOS/Services/Android/Types/MultiFence.cs new file mode 100644 index 0000000000..a50eea892b --- /dev/null +++ b/Ryujinx.HLE/HOS/Services/Android/Types/MultiFence.cs @@ -0,0 +1,23 @@ +using System.Runtime.InteropServices; + +namespace Ryujinx.HLE.HOS.Services.Android +{ + [StructLayout(LayoutKind.Explicit, Size = 0x24)] + struct MultiFence + { + [FieldOffset(0x0)] + public int FenceCount; + + [FieldOffset(0x4)] + public Fence Fence0; + + [FieldOffset(0xC)] + public Fence Fence1; + + [FieldOffset(0x14)] + public Fence Fence2; + + [FieldOffset(0x1C)] + public Fence Fence3; + } +} \ No newline at end of file diff --git a/Ryujinx.HLE/HOS/Services/Android/Types/NvGraphicBuffer.cs b/Ryujinx.HLE/HOS/Services/Android/Types/NvGraphicBuffer.cs new file mode 100644 index 0000000000..90c449975e --- /dev/null +++ b/Ryujinx.HLE/HOS/Services/Android/Types/NvGraphicBuffer.cs @@ -0,0 +1,41 @@ +using System.Runtime.InteropServices; + +namespace Ryujinx.HLE.HOS.Services.Android +{ + [StructLayout(LayoutKind.Explicit, Size = 0x144)] + struct NvGraphicBuffer + { + [FieldOffset(0x4)] + public int NvMapId; + + [FieldOffset(0xC)] + public int Magic; + + [FieldOffset(0x10)] + public int Pid; + + [FieldOffset(0x14)] + public int Type; + + [FieldOffset(0x18)] + public int Usage; + + [FieldOffset(0x1C)] + public int PixelFormat; + + [FieldOffset(0x20)] + public int ExternalPixelFormat; + + [FieldOffset(0x24)] + public int Stride; + + [FieldOffset(0x28)] + public int FrameBufferSize; + + [FieldOffset(0x2C)] + public int PlanesCount; + + [FieldOffset(0x34)] + public NvGraphicBufferSurfaceArray Surfaces; + } +} \ No newline at end of file diff --git a/Ryujinx.HLE/HOS/Services/Android/Types/NvGraphicBufferSurface.cs b/Ryujinx.HLE/HOS/Services/Android/Types/NvGraphicBufferSurface.cs new file mode 100644 index 0000000000..d5dd682c80 --- /dev/null +++ b/Ryujinx.HLE/HOS/Services/Android/Types/NvGraphicBufferSurface.cs @@ -0,0 +1,44 @@ +using System.Runtime.InteropServices; + +namespace Ryujinx.HLE.HOS.Services.Android +{ + [StructLayout(LayoutKind.Explicit, Size = 0x58)] + struct NvGraphicBufferSurface + { + [FieldOffset(0)] + public uint Width; + + [FieldOffset(0x4)] + public uint Height; + + [FieldOffset(0x8)] + public ColorFormat ColorFormat; + + [FieldOffset(0x10)] + public int Layout; + + [FieldOffset(0x14)] + public int Pitch; + + [FieldOffset(0x18)] + public int NvMapHandle; + + [FieldOffset(0x1C)] + public int Offset; + + [FieldOffset(0x20)] + public int Kind; + + [FieldOffset(0x24)] + public int BlockHeightLog2; + + [FieldOffset(0x28)] + public int ScanFormat; + + [FieldOffset(0x30)] + public long Flags; + + [FieldOffset(0x38)] + public long Size; + } +} \ No newline at end of file diff --git a/Ryujinx.HLE/HOS/Services/Android/Types/NvGraphicBufferSurfaceArray.cs b/Ryujinx.HLE/HOS/Services/Android/Types/NvGraphicBufferSurfaceArray.cs new file mode 100644 index 0000000000..be2855ffcb --- /dev/null +++ b/Ryujinx.HLE/HOS/Services/Android/Types/NvGraphicBufferSurfaceArray.cs @@ -0,0 +1,39 @@ +using System; +using System.Runtime.InteropServices; + +namespace Ryujinx.HLE.HOS.Services.Android +{ + [StructLayout(LayoutKind.Explicit)] + struct NvGraphicBufferSurfaceArray + { + [FieldOffset(0x0)] + private NvGraphicBufferSurface Surface0; + + [FieldOffset(0x58)] + private NvGraphicBufferSurface Surface1; + + [FieldOffset(0xb0)] + private NvGraphicBufferSurface Surface2; + + public NvGraphicBufferSurface this[int index] + { + get + { + if (index == 0) + { + return Surface0; + } + else if (index == 1) + { + return Surface1; + } + else if (index == 2) + { + return Surface2; + } + + throw new IndexOutOfRangeException(); + } + } + } +} \ No newline at end of file diff --git a/Ryujinx.HLE/HOS/Services/Android/Types/QueueBufferObject.cs b/Ryujinx.HLE/HOS/Services/Android/Types/QueueBufferObject.cs new file mode 100644 index 0000000000..4112da0753 --- /dev/null +++ b/Ryujinx.HLE/HOS/Services/Android/Types/QueueBufferObject.cs @@ -0,0 +1,35 @@ +using System.Runtime.InteropServices; + +namespace Ryujinx.HLE.HOS.Services.Android +{ + [StructLayout(LayoutKind.Explicit)] + struct QueueBufferObject + { + [FieldOffset(0x0)] + public long Timestamp; + + [FieldOffset(0x8)] + public int IsAutoTimestamp; + + [FieldOffset(0xC)] + public Rect Crop; + + [FieldOffset(0x1C)] + public int ScalingMode; + + [FieldOffset(0x20)] + public HalTransform Transform; + + [FieldOffset(0x24)] + public int StickyTransform; + + [FieldOffset(0x28)] + public int Unknown; + + [FieldOffset(0x2C)] + public int SwapInterval; + + [FieldOffset(0x30)] + public MultiFence Fence; + } +} \ No newline at end of file diff --git a/Ryujinx.HLE/HOS/Services/Android/Types/Rect.cs b/Ryujinx.HLE/HOS/Services/Android/Types/Rect.cs new file mode 100644 index 0000000000..abe81abd3a --- /dev/null +++ b/Ryujinx.HLE/HOS/Services/Android/Types/Rect.cs @@ -0,0 +1,13 @@ +using System.Runtime.InteropServices; + +namespace Ryujinx.HLE.HOS.Services.Android +{ + [StructLayout(LayoutKind.Sequential, Size = 0x10)] + struct Rect + { + public int Top; + public int Left; + public int Right; + public int Bottom; + } +} \ No newline at end of file diff --git a/Ryujinx.HLE/HOS/Services/Apm/IManager.cs b/Ryujinx.HLE/HOS/Services/Apm/IManager.cs index 1458ac58f0..19fbcd44b8 100644 --- a/Ryujinx.HLE/HOS/Services/Apm/IManager.cs +++ b/Ryujinx.HLE/HOS/Services/Apm/IManager.cs @@ -1,7 +1,6 @@ namespace Ryujinx.HLE.HOS.Services.Apm { - [Service("apm")] - [Service("apm:p")] + [Service("apm")] // 8.0.0+ class IManager : IpcService { public IManager(ServiceCtx context) { } diff --git a/Ryujinx.HLE/HOS/Services/Apm/CpuBoostMode.cs b/Ryujinx.HLE/HOS/Services/Apm/Types/CpuBoostMode.cs similarity index 100% rename from Ryujinx.HLE/HOS/Services/Apm/CpuBoostMode.cs rename to Ryujinx.HLE/HOS/Services/Apm/Types/CpuBoostMode.cs diff --git a/Ryujinx.HLE/HOS/Services/Apm/PerformanceConfiguration.cs b/Ryujinx.HLE/HOS/Services/Apm/Types/PerformanceConfiguration.cs similarity index 100% rename from Ryujinx.HLE/HOS/Services/Apm/PerformanceConfiguration.cs rename to Ryujinx.HLE/HOS/Services/Apm/Types/PerformanceConfiguration.cs diff --git a/Ryujinx.HLE/HOS/Services/Apm/PerformanceMode.cs b/Ryujinx.HLE/HOS/Services/Apm/Types/PerformanceMode.cs similarity index 100% rename from Ryujinx.HLE/HOS/Services/Apm/PerformanceMode.cs rename to Ryujinx.HLE/HOS/Services/Apm/Types/PerformanceMode.cs diff --git a/Ryujinx.HLE/HOS/Services/Glue/ApplicationLaunchProperty.cs b/Ryujinx.HLE/HOS/Services/Arp/ApplicationLaunchProperty.cs similarity index 97% rename from Ryujinx.HLE/HOS/Services/Glue/ApplicationLaunchProperty.cs rename to Ryujinx.HLE/HOS/Services/Arp/ApplicationLaunchProperty.cs index b96f0d0549..c1c6d26dc9 100644 --- a/Ryujinx.HLE/HOS/Services/Glue/ApplicationLaunchProperty.cs +++ b/Ryujinx.HLE/HOS/Services/Arp/ApplicationLaunchProperty.cs @@ -2,7 +2,7 @@ using Ryujinx.HLE.Utilities; using System; -namespace Ryujinx.HLE.HOS.Services.Glue +namespace Ryujinx.HLE.HOS.Services.Arp { class ApplicationLaunchProperty { diff --git a/Ryujinx.HLE/HOS/Services/Arp/IReader.cs b/Ryujinx.HLE/HOS/Services/Arp/IReader.cs new file mode 100644 index 0000000000..5d1e2fff23 --- /dev/null +++ b/Ryujinx.HLE/HOS/Services/Arp/IReader.cs @@ -0,0 +1,8 @@ +namespace Ryujinx.HLE.HOS.Services.Hid +{ + [Service("arp:r")] + class IReader : IpcService + { + public IReader(ServiceCtx context) { } + } +} \ No newline at end of file diff --git a/Ryujinx.HLE/HOS/Services/Arp/IWriter.cs b/Ryujinx.HLE/HOS/Services/Arp/IWriter.cs new file mode 100644 index 0000000000..8d13f0fb8d --- /dev/null +++ b/Ryujinx.HLE/HOS/Services/Arp/IWriter.cs @@ -0,0 +1,8 @@ +namespace Ryujinx.HLE.HOS.Services.Arp +{ + [Service("arp:w")] + class IWriter : IpcService + { + public IWriter(ServiceCtx context) { } + } +} \ No newline at end of file diff --git a/Ryujinx.HLE/HOS/Services/Aud/AudioOut/IAudioOut.cs b/Ryujinx.HLE/HOS/Services/Audio/AudioOutManager/IAudioOut.cs similarity index 98% rename from Ryujinx.HLE/HOS/Services/Aud/AudioOut/IAudioOut.cs rename to Ryujinx.HLE/HOS/Services/Audio/AudioOutManager/IAudioOut.cs index 751d3f704a..5b6983d651 100644 --- a/Ryujinx.HLE/HOS/Services/Aud/AudioOut/IAudioOut.cs +++ b/Ryujinx.HLE/HOS/Services/Audio/AudioOutManager/IAudioOut.cs @@ -5,7 +5,7 @@ using Ryujinx.HLE.HOS.Kernel.Common; using Ryujinx.HLE.HOS.Kernel.Threading; using System; -namespace Ryujinx.HLE.HOS.Services.Aud.AudioOut +namespace Ryujinx.HLE.HOS.Services.Audio.AudioOutManager { class IAudioOut : IpcService, IDisposable { diff --git a/Ryujinx.HLE/HOS/Services/Aud/AudioOut/AudioOutData.cs b/Ryujinx.HLE/HOS/Services/Audio/AudioOutManager/Types/AudioOutData.cs similarity index 84% rename from Ryujinx.HLE/HOS/Services/Aud/AudioOut/AudioOutData.cs rename to Ryujinx.HLE/HOS/Services/Audio/AudioOutManager/Types/AudioOutData.cs index e25ebe6640..2598d0f8b0 100644 --- a/Ryujinx.HLE/HOS/Services/Aud/AudioOut/AudioOutData.cs +++ b/Ryujinx.HLE/HOS/Services/Audio/AudioOutManager/Types/AudioOutData.cs @@ -1,6 +1,6 @@ using System.Runtime.InteropServices; -namespace Ryujinx.HLE.HOS.Services.Aud.AudioOut +namespace Ryujinx.HLE.HOS.Services.Audio.AudioOutManager { [StructLayout(LayoutKind.Sequential)] struct AudioOutData diff --git a/Ryujinx.HLE/HOS/Services/Aud/IAudioDevice.cs b/Ryujinx.HLE/HOS/Services/Audio/AudioRendererManager/IAudioDevice.cs similarity index 99% rename from Ryujinx.HLE/HOS/Services/Aud/IAudioDevice.cs rename to Ryujinx.HLE/HOS/Services/Audio/AudioRendererManager/IAudioDevice.cs index 48a2fb7452..ab4aee7638 100644 --- a/Ryujinx.HLE/HOS/Services/Aud/IAudioDevice.cs +++ b/Ryujinx.HLE/HOS/Services/Audio/AudioRendererManager/IAudioDevice.cs @@ -6,7 +6,7 @@ using Ryujinx.HLE.HOS.SystemState; using System; using System.Text; -namespace Ryujinx.HLE.HOS.Services.Aud +namespace Ryujinx.HLE.HOS.Services.Audio.AudioRendererManager { class IAudioDevice : IpcService { diff --git a/Ryujinx.HLE/HOS/Services/Aud/AudioRenderer/IAudioRenderer.cs b/Ryujinx.HLE/HOS/Services/Audio/AudioRendererManager/IAudioRenderer.cs similarity index 98% rename from Ryujinx.HLE/HOS/Services/Aud/AudioRenderer/IAudioRenderer.cs rename to Ryujinx.HLE/HOS/Services/Audio/AudioRendererManager/IAudioRenderer.cs index e8baf8192f..975992aa9e 100644 --- a/Ryujinx.HLE/HOS/Services/Aud/AudioRenderer/IAudioRenderer.cs +++ b/Ryujinx.HLE/HOS/Services/Audio/AudioRendererManager/IAudioRenderer.cs @@ -11,7 +11,7 @@ using System.Runtime.InteropServices; using System.Runtime.Intrinsics; using System.Runtime.Intrinsics.X86; -namespace Ryujinx.HLE.HOS.Services.Aud.AudioRenderer +namespace Ryujinx.HLE.HOS.Services.Audio.AudioRendererManager { class IAudioRenderer : IpcService, IDisposable { @@ -280,9 +280,10 @@ namespace Ryujinx.HLE.HOS.Services.Aud.AudioRenderer return null; } - AdpcmDecoderContext context = new AdpcmDecoderContext(); - - context.Coefficients = new short[size >> 1]; + AdpcmDecoderContext context = new AdpcmDecoderContext + { + Coefficients = new short[size >> 1] + }; for (int offset = 0; offset < size; offset += 2) { diff --git a/Ryujinx.HLE/HOS/Services/Aud/AudioRenderer/MemoryPoolContext.cs b/Ryujinx.HLE/HOS/Services/Audio/AudioRendererManager/MemoryPoolContext.cs similarity index 75% rename from Ryujinx.HLE/HOS/Services/Aud/AudioRenderer/MemoryPoolContext.cs rename to Ryujinx.HLE/HOS/Services/Audio/AudioRendererManager/MemoryPoolContext.cs index c1646065de..3f48114c69 100644 --- a/Ryujinx.HLE/HOS/Services/Aud/AudioRenderer/MemoryPoolContext.cs +++ b/Ryujinx.HLE/HOS/Services/Audio/AudioRendererManager/MemoryPoolContext.cs @@ -1,4 +1,4 @@ -namespace Ryujinx.HLE.HOS.Services.Aud.AudioRenderer +namespace Ryujinx.HLE.HOS.Services.Audio.AudioRendererManager { class MemoryPoolContext { diff --git a/Ryujinx.HLE/HOS/Services/Aud/AudioRenderer/Resampler.cs b/Ryujinx.HLE/HOS/Services/Audio/AudioRendererManager/Resampler.cs similarity index 99% rename from Ryujinx.HLE/HOS/Services/Aud/AudioRenderer/Resampler.cs rename to Ryujinx.HLE/HOS/Services/Audio/AudioRendererManager/Resampler.cs index 9714f6d8b9..936e7f506b 100644 --- a/Ryujinx.HLE/HOS/Services/Aud/AudioRenderer/Resampler.cs +++ b/Ryujinx.HLE/HOS/Services/Audio/AudioRendererManager/Resampler.cs @@ -1,6 +1,6 @@ using System; -namespace Ryujinx.HLE.HOS.Services.Aud.AudioRenderer +namespace Ryujinx.HLE.HOS.Services.Audio.AudioRendererManager { static class Resampler { diff --git a/Ryujinx.HLE/HOS/Services/Aud/AudioRenderer/AudioConsts.cs b/Ryujinx.HLE/HOS/Services/Audio/AudioRendererManager/Types/AudioConsts.cs similarity index 69% rename from Ryujinx.HLE/HOS/Services/Aud/AudioRenderer/AudioConsts.cs rename to Ryujinx.HLE/HOS/Services/Audio/AudioRendererManager/Types/AudioConsts.cs index 40788ff3b8..f3b6995c7b 100644 --- a/Ryujinx.HLE/HOS/Services/Aud/AudioRenderer/AudioConsts.cs +++ b/Ryujinx.HLE/HOS/Services/Audio/AudioRendererManager/Types/AudioConsts.cs @@ -1,4 +1,4 @@ -namespace Ryujinx.HLE.HOS.Services.Aud.AudioRenderer +namespace Ryujinx.HLE.HOS.Services.Audio.AudioRendererManager { static class AudioConsts { diff --git a/Ryujinx.HLE/HOS/Services/Aud/AudioRendererParameter.cs b/Ryujinx.HLE/HOS/Services/Audio/AudioRendererManager/Types/AudioRendererParameter.cs similarity index 90% rename from Ryujinx.HLE/HOS/Services/Aud/AudioRendererParameter.cs rename to Ryujinx.HLE/HOS/Services/Audio/AudioRendererManager/Types/AudioRendererParameter.cs index 812ef8cf32..9772f786ac 100644 --- a/Ryujinx.HLE/HOS/Services/Aud/AudioRendererParameter.cs +++ b/Ryujinx.HLE/HOS/Services/Audio/AudioRendererManager/Types/AudioRendererParameter.cs @@ -1,6 +1,6 @@ using System.Runtime.InteropServices; -namespace Ryujinx.HLE.HOS.Services.Aud +namespace Ryujinx.HLE.HOS.Services.Audio.AudioRendererManager { [StructLayout(LayoutKind.Sequential)] struct AudioRendererParameter diff --git a/Ryujinx.HLE/HOS/Services/Aud/AudioRenderer/BehaviorIn.cs b/Ryujinx.HLE/HOS/Services/Audio/AudioRendererManager/Types/BehaviorIn.cs similarity index 76% rename from Ryujinx.HLE/HOS/Services/Aud/AudioRenderer/BehaviorIn.cs rename to Ryujinx.HLE/HOS/Services/Audio/AudioRendererManager/Types/BehaviorIn.cs index 69b6d52247..953b4ce3ab 100644 --- a/Ryujinx.HLE/HOS/Services/Aud/AudioRenderer/BehaviorIn.cs +++ b/Ryujinx.HLE/HOS/Services/Audio/AudioRendererManager/Types/BehaviorIn.cs @@ -1,6 +1,6 @@ using System.Runtime.InteropServices; -namespace Ryujinx.HLE.HOS.Services.Aud.AudioRenderer +namespace Ryujinx.HLE.HOS.Services.Audio.AudioRendererManager { [StructLayout(LayoutKind.Sequential, Size = 0x10, Pack = 4)] struct BehaviorIn diff --git a/Ryujinx.HLE/HOS/Services/Aud/AudioRenderer/BiquadFilter.cs b/Ryujinx.HLE/HOS/Services/Audio/AudioRendererManager/Types/BiquadFilter.cs similarity index 84% rename from Ryujinx.HLE/HOS/Services/Aud/AudioRenderer/BiquadFilter.cs rename to Ryujinx.HLE/HOS/Services/Audio/AudioRendererManager/Types/BiquadFilter.cs index 4e0c7c4fd5..d0d8ed9bb7 100644 --- a/Ryujinx.HLE/HOS/Services/Aud/AudioRenderer/BiquadFilter.cs +++ b/Ryujinx.HLE/HOS/Services/Audio/AudioRendererManager/Types/BiquadFilter.cs @@ -1,6 +1,6 @@ using System.Runtime.InteropServices; -namespace Ryujinx.HLE.HOS.Services.Aud.AudioRenderer +namespace Ryujinx.HLE.HOS.Services.Audio.AudioRendererManager { [StructLayout(LayoutKind.Sequential, Size = 0xc, Pack = 1)] struct BiquadFilter diff --git a/Ryujinx.HLE/HOS/Services/Aud/AudioRenderer/MemoryPoolIn.cs b/Ryujinx.HLE/HOS/Services/Audio/AudioRendererManager/Types/MemoryPoolIn.cs similarity index 84% rename from Ryujinx.HLE/HOS/Services/Aud/AudioRenderer/MemoryPoolIn.cs rename to Ryujinx.HLE/HOS/Services/Audio/AudioRendererManager/Types/MemoryPoolIn.cs index b4e6594c97..8dc53929a8 100644 --- a/Ryujinx.HLE/HOS/Services/Aud/AudioRenderer/MemoryPoolIn.cs +++ b/Ryujinx.HLE/HOS/Services/Audio/AudioRendererManager/Types/MemoryPoolIn.cs @@ -1,6 +1,6 @@ using System.Runtime.InteropServices; -namespace Ryujinx.HLE.HOS.Services.Aud.AudioRenderer +namespace Ryujinx.HLE.HOS.Services.Audio.AudioRendererManager { [StructLayout(LayoutKind.Sequential, Size = 0x20, Pack = 4)] struct MemoryPoolIn diff --git a/Ryujinx.HLE/HOS/Services/Aud/AudioRenderer/MemoryPoolOut.cs b/Ryujinx.HLE/HOS/Services/Audio/AudioRendererManager/Types/MemoryPoolOut.cs similarity index 81% rename from Ryujinx.HLE/HOS/Services/Aud/AudioRenderer/MemoryPoolOut.cs rename to Ryujinx.HLE/HOS/Services/Audio/AudioRendererManager/Types/MemoryPoolOut.cs index 6ae583b883..7581e8a756 100644 --- a/Ryujinx.HLE/HOS/Services/Aud/AudioRenderer/MemoryPoolOut.cs +++ b/Ryujinx.HLE/HOS/Services/Audio/AudioRendererManager/Types/MemoryPoolOut.cs @@ -1,6 +1,6 @@ using System.Runtime.InteropServices; -namespace Ryujinx.HLE.HOS.Services.Aud.AudioRenderer +namespace Ryujinx.HLE.HOS.Services.Audio.AudioRendererManager { [StructLayout(LayoutKind.Sequential, Size = 0x10, Pack = 4)] struct MemoryPoolOut diff --git a/Ryujinx.HLE/HOS/Services/Aud/AudioRenderer/MemoryPoolState.cs b/Ryujinx.HLE/HOS/Services/Audio/AudioRendererManager/Types/MemoryPoolState.cs similarity index 77% rename from Ryujinx.HLE/HOS/Services/Aud/AudioRenderer/MemoryPoolState.cs rename to Ryujinx.HLE/HOS/Services/Audio/AudioRendererManager/Types/MemoryPoolState.cs index 7b672dc95d..a82747b829 100644 --- a/Ryujinx.HLE/HOS/Services/Aud/AudioRenderer/MemoryPoolState.cs +++ b/Ryujinx.HLE/HOS/Services/Audio/AudioRendererManager/Types/MemoryPoolState.cs @@ -1,4 +1,4 @@ -namespace Ryujinx.HLE.HOS.Services.Aud.AudioRenderer +namespace Ryujinx.HLE.HOS.Services.Audio.AudioRendererManager { enum MemoryPoolState { diff --git a/Ryujinx.HLE/HOS/Services/Aud/AudioRenderer/PlayState.cs b/Ryujinx.HLE/HOS/Services/Audio/AudioRendererManager/Types/PlayState.cs similarity index 62% rename from Ryujinx.HLE/HOS/Services/Aud/AudioRenderer/PlayState.cs rename to Ryujinx.HLE/HOS/Services/Audio/AudioRendererManager/Types/PlayState.cs index 922a9dc2e3..d63df971dc 100644 --- a/Ryujinx.HLE/HOS/Services/Aud/AudioRenderer/PlayState.cs +++ b/Ryujinx.HLE/HOS/Services/Audio/AudioRendererManager/Types/PlayState.cs @@ -1,4 +1,4 @@ -namespace Ryujinx.HLE.HOS.Services.Aud.AudioRenderer +namespace Ryujinx.HLE.HOS.Services.Audio.AudioRendererManager { enum PlayState : byte { diff --git a/Ryujinx.HLE/HOS/Services/Aud/AudioRenderer/UpdateDataHeader.cs b/Ryujinx.HLE/HOS/Services/Audio/AudioRendererManager/Types/UpdateDataHeader.cs similarity index 89% rename from Ryujinx.HLE/HOS/Services/Aud/AudioRenderer/UpdateDataHeader.cs rename to Ryujinx.HLE/HOS/Services/Audio/AudioRendererManager/Types/UpdateDataHeader.cs index 04fe422c8d..b1f1498430 100644 --- a/Ryujinx.HLE/HOS/Services/Aud/AudioRenderer/UpdateDataHeader.cs +++ b/Ryujinx.HLE/HOS/Services/Audio/AudioRendererManager/Types/UpdateDataHeader.cs @@ -1,4 +1,4 @@ -namespace Ryujinx.HLE.HOS.Services.Aud.AudioRenderer +namespace Ryujinx.HLE.HOS.Services.Audio.AudioRendererManager { struct UpdateDataHeader { diff --git a/Ryujinx.HLE/HOS/Services/Aud/AudioRenderer/VoiceChannelResourceIn.cs b/Ryujinx.HLE/HOS/Services/Audio/AudioRendererManager/Types/VoiceChannelResourceIn.cs similarity index 73% rename from Ryujinx.HLE/HOS/Services/Aud/AudioRenderer/VoiceChannelResourceIn.cs rename to Ryujinx.HLE/HOS/Services/Audio/AudioRendererManager/Types/VoiceChannelResourceIn.cs index 124d31bec9..4871713e9d 100644 --- a/Ryujinx.HLE/HOS/Services/Aud/AudioRenderer/VoiceChannelResourceIn.cs +++ b/Ryujinx.HLE/HOS/Services/Audio/AudioRendererManager/Types/VoiceChannelResourceIn.cs @@ -1,6 +1,6 @@ using System.Runtime.InteropServices; -namespace Ryujinx.HLE.HOS.Services.Aud.AudioRenderer +namespace Ryujinx.HLE.HOS.Services.Audio.AudioRendererManager { [StructLayout(LayoutKind.Sequential, Size = 0x70, Pack = 1)] struct VoiceChannelResourceIn diff --git a/Ryujinx.HLE/HOS/Services/Aud/AudioRenderer/VoiceIn.cs b/Ryujinx.HLE/HOS/Services/Audio/AudioRendererManager/Types/VoiceIn.cs similarity index 94% rename from Ryujinx.HLE/HOS/Services/Aud/AudioRenderer/VoiceIn.cs rename to Ryujinx.HLE/HOS/Services/Audio/AudioRendererManager/Types/VoiceIn.cs index 143cf4d882..dbcd55586d 100644 --- a/Ryujinx.HLE/HOS/Services/Aud/AudioRenderer/VoiceIn.cs +++ b/Ryujinx.HLE/HOS/Services/Audio/AudioRendererManager/Types/VoiceIn.cs @@ -1,6 +1,6 @@ using System.Runtime.InteropServices; -namespace Ryujinx.HLE.HOS.Services.Aud.AudioRenderer +namespace Ryujinx.HLE.HOS.Services.Audio.AudioRendererManager { [StructLayout(LayoutKind.Sequential, Size = 0x170, Pack = 1)] struct VoiceIn diff --git a/Ryujinx.HLE/HOS/Services/Aud/AudioRenderer/VoiceOut.cs b/Ryujinx.HLE/HOS/Services/Audio/AudioRendererManager/Types/VoiceOut.cs similarity index 80% rename from Ryujinx.HLE/HOS/Services/Aud/AudioRenderer/VoiceOut.cs rename to Ryujinx.HLE/HOS/Services/Audio/AudioRendererManager/Types/VoiceOut.cs index 5332631d44..3a295971ee 100644 --- a/Ryujinx.HLE/HOS/Services/Aud/AudioRenderer/VoiceOut.cs +++ b/Ryujinx.HLE/HOS/Services/Audio/AudioRendererManager/Types/VoiceOut.cs @@ -1,6 +1,6 @@ using System.Runtime.InteropServices; -namespace Ryujinx.HLE.HOS.Services.Aud.AudioRenderer +namespace Ryujinx.HLE.HOS.Services.Audio.AudioRendererManager { [StructLayout(LayoutKind.Sequential, Size = 0x10, Pack = 4)] struct VoiceOut diff --git a/Ryujinx.HLE/HOS/Services/Aud/AudioRenderer/WaveBuffer.cs b/Ryujinx.HLE/HOS/Services/Audio/AudioRendererManager/Types/WaveBuffer.cs similarity index 89% rename from Ryujinx.HLE/HOS/Services/Aud/AudioRenderer/WaveBuffer.cs rename to Ryujinx.HLE/HOS/Services/Audio/AudioRendererManager/Types/WaveBuffer.cs index 89137ec045..1c0d5630b0 100644 --- a/Ryujinx.HLE/HOS/Services/Aud/AudioRenderer/WaveBuffer.cs +++ b/Ryujinx.HLE/HOS/Services/Audio/AudioRendererManager/Types/WaveBuffer.cs @@ -1,6 +1,6 @@ using System.Runtime.InteropServices; -namespace Ryujinx.HLE.HOS.Services.Aud.AudioRenderer +namespace Ryujinx.HLE.HOS.Services.Audio.AudioRendererManager { [StructLayout(LayoutKind.Sequential, Size = 0x38, Pack = 1)] struct WaveBuffer diff --git a/Ryujinx.HLE/HOS/Services/Aud/AudioRenderer/VoiceContext.cs b/Ryujinx.HLE/HOS/Services/Audio/AudioRendererManager/VoiceContext.cs similarity index 98% rename from Ryujinx.HLE/HOS/Services/Aud/AudioRenderer/VoiceContext.cs rename to Ryujinx.HLE/HOS/Services/Audio/AudioRendererManager/VoiceContext.cs index aaff20a5b4..c9fb850289 100644 --- a/Ryujinx.HLE/HOS/Services/Aud/AudioRenderer/VoiceContext.cs +++ b/Ryujinx.HLE/HOS/Services/Audio/AudioRendererManager/VoiceContext.cs @@ -2,7 +2,7 @@ using ARMeilleure.Memory; using Ryujinx.Audio.Adpcm; using System; -namespace Ryujinx.HLE.HOS.Services.Aud.AudioRenderer +namespace Ryujinx.HLE.HOS.Services.Audio.AudioRendererManager { class VoiceContext { diff --git a/Ryujinx.HLE/HOS/Services/Aud/IHardwareOpusDecoder.cs b/Ryujinx.HLE/HOS/Services/Audio/HardwareOpusDecoderManager/IHardwareOpusDecoder.cs similarity index 97% rename from Ryujinx.HLE/HOS/Services/Aud/IHardwareOpusDecoder.cs rename to Ryujinx.HLE/HOS/Services/Audio/HardwareOpusDecoderManager/IHardwareOpusDecoder.cs index 148a69a81a..e23398dfe8 100644 --- a/Ryujinx.HLE/HOS/Services/Aud/IHardwareOpusDecoder.cs +++ b/Ryujinx.HLE/HOS/Services/Audio/HardwareOpusDecoderManager/IHardwareOpusDecoder.cs @@ -1,6 +1,6 @@ using Concentus.Structs; -namespace Ryujinx.HLE.HOS.Services.Aud +namespace Ryujinx.HLE.HOS.Services.Audio.HardwareOpusDecoderManager { class IHardwareOpusDecoder : IpcService { diff --git a/Ryujinx.HLE/HOS/Services/Audio/IAudioController.cs b/Ryujinx.HLE/HOS/Services/Audio/IAudioController.cs new file mode 100644 index 0000000000..1bd2e31deb --- /dev/null +++ b/Ryujinx.HLE/HOS/Services/Audio/IAudioController.cs @@ -0,0 +1,8 @@ +namespace Ryujinx.HLE.HOS.Services.Audio +{ + [Service("audctl")] + class IAudioController : IpcService + { + public IAudioController(ServiceCtx context) { } + } +} \ No newline at end of file diff --git a/Ryujinx.HLE/HOS/Services/Audio/IAudioInManager.cs b/Ryujinx.HLE/HOS/Services/Audio/IAudioInManager.cs new file mode 100644 index 0000000000..d8e1f468e2 --- /dev/null +++ b/Ryujinx.HLE/HOS/Services/Audio/IAudioInManager.cs @@ -0,0 +1,8 @@ +namespace Ryujinx.HLE.HOS.Services.Audio +{ + [Service("audin:u")] + class IAudioInManager : IpcService + { + public IAudioInManager(ServiceCtx context) { } + } +} \ No newline at end of file diff --git a/Ryujinx.HLE/HOS/Services/Audio/IAudioInManagerForApplet.cs b/Ryujinx.HLE/HOS/Services/Audio/IAudioInManagerForApplet.cs new file mode 100644 index 0000000000..37d9a8fe8c --- /dev/null +++ b/Ryujinx.HLE/HOS/Services/Audio/IAudioInManagerForApplet.cs @@ -0,0 +1,8 @@ +namespace Ryujinx.HLE.HOS.Services.Audio +{ + [Service("audin:a")] + class IAudioInManagerForApplet : IpcService + { + public IAudioInManagerForApplet(ServiceCtx context) { } + } +} \ No newline at end of file diff --git a/Ryujinx.HLE/HOS/Services/Audio/IAudioInManagerForDebugger.cs b/Ryujinx.HLE/HOS/Services/Audio/IAudioInManagerForDebugger.cs new file mode 100644 index 0000000000..1a497efb62 --- /dev/null +++ b/Ryujinx.HLE/HOS/Services/Audio/IAudioInManagerForDebugger.cs @@ -0,0 +1,8 @@ +namespace Ryujinx.HLE.HOS.Services.Audio +{ + [Service("audin:d")] + class IAudioInManagerForDebugger : IpcService + { + public IAudioInManagerForDebugger(ServiceCtx context) { } + } +} \ No newline at end of file diff --git a/Ryujinx.HLE/HOS/Services/Aud/IAudioOutManager.cs b/Ryujinx.HLE/HOS/Services/Audio/IAudioOutManager.cs similarity index 98% rename from Ryujinx.HLE/HOS/Services/Aud/IAudioOutManager.cs rename to Ryujinx.HLE/HOS/Services/Audio/IAudioOutManager.cs index bea0f3f20d..19ee806745 100644 --- a/Ryujinx.HLE/HOS/Services/Aud/IAudioOutManager.cs +++ b/Ryujinx.HLE/HOS/Services/Audio/IAudioOutManager.cs @@ -2,10 +2,10 @@ using ARMeilleure.Memory; using Ryujinx.Audio; using Ryujinx.Common.Logging; using Ryujinx.HLE.HOS.Kernel.Threading; -using Ryujinx.HLE.HOS.Services.Aud.AudioOut; +using Ryujinx.HLE.HOS.Services.Audio.AudioOutManager; using System.Text; -namespace Ryujinx.HLE.HOS.Services.Aud +namespace Ryujinx.HLE.HOS.Services.Audio { [Service("audout:u")] class IAudioOutManager : IpcService diff --git a/Ryujinx.HLE/HOS/Services/Audio/IAudioOutManagerForApplet.cs b/Ryujinx.HLE/HOS/Services/Audio/IAudioOutManagerForApplet.cs new file mode 100644 index 0000000000..4b41b0cfcf --- /dev/null +++ b/Ryujinx.HLE/HOS/Services/Audio/IAudioOutManagerForApplet.cs @@ -0,0 +1,8 @@ +namespace Ryujinx.HLE.HOS.Services.Audio +{ + [Service("audout:a")] + class IAudioOutManagerForApplet : IpcService + { + public IAudioOutManagerForApplet(ServiceCtx context) { } + } +} \ No newline at end of file diff --git a/Ryujinx.HLE/HOS/Services/Audio/IAudioOutManagerForDebugger.cs b/Ryujinx.HLE/HOS/Services/Audio/IAudioOutManagerForDebugger.cs new file mode 100644 index 0000000000..41cde97269 --- /dev/null +++ b/Ryujinx.HLE/HOS/Services/Audio/IAudioOutManagerForDebugger.cs @@ -0,0 +1,8 @@ +namespace Ryujinx.HLE.HOS.Services.Audio +{ + [Service("audout:d")] + class IAudioOutManagerForDebugger : IpcService + { + public IAudioOutManagerForDebugger(ServiceCtx context) { } + } +} \ No newline at end of file diff --git a/Ryujinx.HLE/HOS/Services/Aud/IAudioRendererManager.cs b/Ryujinx.HLE/HOS/Services/Audio/IAudioRendererManager.cs similarity index 84% rename from Ryujinx.HLE/HOS/Services/Aud/IAudioRendererManager.cs rename to Ryujinx.HLE/HOS/Services/Audio/IAudioRendererManager.cs index 29bf8320e8..de1c35b5cb 100644 --- a/Ryujinx.HLE/HOS/Services/Aud/IAudioRendererManager.cs +++ b/Ryujinx.HLE/HOS/Services/Audio/IAudioRendererManager.cs @@ -1,9 +1,9 @@ using Ryujinx.Audio; using Ryujinx.Common.Logging; -using Ryujinx.HLE.HOS.Services.Aud.AudioRenderer; +using Ryujinx.HLE.HOS.Services.Audio.AudioRendererManager; using Ryujinx.HLE.Utilities; -namespace Ryujinx.HLE.HOS.Services.Aud +namespace Ryujinx.HLE.HOS.Services.Audio { [Service("audren:u")] class IAudioRendererManager : IpcService @@ -123,21 +123,22 @@ namespace Ryujinx.HLE.HOS.Services.Aud private AudioRendererParameter GetAudioRendererParameter(ServiceCtx context) { - AudioRendererParameter Params = new AudioRendererParameter(); - - Params.SampleRate = context.RequestData.ReadInt32(); - Params.SampleCount = context.RequestData.ReadInt32(); - Params.Unknown8 = context.RequestData.ReadInt32(); - Params.MixCount = context.RequestData.ReadInt32(); - Params.VoiceCount = context.RequestData.ReadInt32(); - Params.SinkCount = context.RequestData.ReadInt32(); - Params.EffectCount = context.RequestData.ReadInt32(); - Params.PerformanceManagerCount = context.RequestData.ReadInt32(); - Params.VoiceDropEnable = context.RequestData.ReadInt32(); - Params.SplitterCount = context.RequestData.ReadInt32(); - Params.SplitterDestinationDataCount = context.RequestData.ReadInt32(); - Params.Unknown2C = context.RequestData.ReadInt32(); - Params.Revision = context.RequestData.ReadInt32(); + AudioRendererParameter Params = new AudioRendererParameter + { + SampleRate = context.RequestData.ReadInt32(), + SampleCount = context.RequestData.ReadInt32(), + Unknown8 = context.RequestData.ReadInt32(), + MixCount = context.RequestData.ReadInt32(), + VoiceCount = context.RequestData.ReadInt32(), + SinkCount = context.RequestData.ReadInt32(), + EffectCount = context.RequestData.ReadInt32(), + PerformanceManagerCount = context.RequestData.ReadInt32(), + VoiceDropEnable = context.RequestData.ReadInt32(), + SplitterCount = context.RequestData.ReadInt32(), + SplitterDestinationDataCount = context.RequestData.ReadInt32(), + Unknown2C = context.RequestData.ReadInt32(), + Revision = context.RequestData.ReadInt32() + }; return Params; } diff --git a/Ryujinx.HLE/HOS/Services/Audio/IAudioRendererManagerForApplet.cs b/Ryujinx.HLE/HOS/Services/Audio/IAudioRendererManagerForApplet.cs new file mode 100644 index 0000000000..ca5768ccaf --- /dev/null +++ b/Ryujinx.HLE/HOS/Services/Audio/IAudioRendererManagerForApplet.cs @@ -0,0 +1,8 @@ +namespace Ryujinx.HLE.HOS.Services.Audio +{ + [Service("audren:a")] + class IAudioRendererManagerForApplet : IpcService + { + public IAudioRendererManagerForApplet(ServiceCtx context) { } + } +} \ No newline at end of file diff --git a/Ryujinx.HLE/HOS/Services/Audio/IAudioRendererManagerForDebugger.cs b/Ryujinx.HLE/HOS/Services/Audio/IAudioRendererManagerForDebugger.cs new file mode 100644 index 0000000000..a970ae45cc --- /dev/null +++ b/Ryujinx.HLE/HOS/Services/Audio/IAudioRendererManagerForDebugger.cs @@ -0,0 +1,8 @@ +namespace Ryujinx.HLE.HOS.Services.Audio +{ + [Service("audren:d")] + class IAudioRendererManagerForDebugger : IpcService + { + public IAudioRendererManagerForDebugger(ServiceCtx context) { } + } +} \ No newline at end of file diff --git a/Ryujinx.HLE/HOS/Services/Audio/IAudioSnoopManager.cs b/Ryujinx.HLE/HOS/Services/Audio/IAudioSnoopManager.cs new file mode 100644 index 0000000000..59e3ad09b1 --- /dev/null +++ b/Ryujinx.HLE/HOS/Services/Audio/IAudioSnoopManager.cs @@ -0,0 +1,8 @@ +namespace Ryujinx.HLE.HOS.Services.Audio +{ + [Service("auddev")] // 6.0.0+ + class IAudioSnoopManager : IpcService + { + public IAudioSnoopManager(ServiceCtx context) { } + } +} \ No newline at end of file diff --git a/Ryujinx.HLE/HOS/Services/Audio/IFinalOutputRecorderManager.cs b/Ryujinx.HLE/HOS/Services/Audio/IFinalOutputRecorderManager.cs new file mode 100644 index 0000000000..0143500811 --- /dev/null +++ b/Ryujinx.HLE/HOS/Services/Audio/IFinalOutputRecorderManager.cs @@ -0,0 +1,8 @@ +namespace Ryujinx.HLE.HOS.Services.Audio +{ + [Service("audrec:u")] + class IFinalOutputRecorderManager : IpcService + { + public IFinalOutputRecorderManager(ServiceCtx context) { } + } +} \ No newline at end of file diff --git a/Ryujinx.HLE/HOS/Services/Audio/IFinalOutputRecorderManagerForApplet.cs b/Ryujinx.HLE/HOS/Services/Audio/IFinalOutputRecorderManagerForApplet.cs new file mode 100644 index 0000000000..d8fd270d50 --- /dev/null +++ b/Ryujinx.HLE/HOS/Services/Audio/IFinalOutputRecorderManagerForApplet.cs @@ -0,0 +1,8 @@ +namespace Ryujinx.HLE.HOS.Services.Audio +{ + [Service("audrec:a")] + class IFinalOutputRecorderManagerForApplet : IpcService + { + public IFinalOutputRecorderManagerForApplet(ServiceCtx context) { } + } +} \ No newline at end of file diff --git a/Ryujinx.HLE/HOS/Services/Audio/IFinalOutputRecorderManagerForDebugger.cs b/Ryujinx.HLE/HOS/Services/Audio/IFinalOutputRecorderManagerForDebugger.cs new file mode 100644 index 0000000000..a8ec51ee50 --- /dev/null +++ b/Ryujinx.HLE/HOS/Services/Audio/IFinalOutputRecorderManagerForDebugger.cs @@ -0,0 +1,8 @@ +namespace Ryujinx.HLE.HOS.Services.Audio +{ + [Service("audrec:d")] + class IFinalOutputRecorderManagerForDebugger : IpcService + { + public IFinalOutputRecorderManagerForDebugger(ServiceCtx context) { } + } +} \ No newline at end of file diff --git a/Ryujinx.HLE/HOS/Services/Aud/IHardwareOpusDecoderManager.cs b/Ryujinx.HLE/HOS/Services/Audio/IHardwareOpusDecoderManager.cs similarity index 95% rename from Ryujinx.HLE/HOS/Services/Aud/IHardwareOpusDecoderManager.cs rename to Ryujinx.HLE/HOS/Services/Audio/IHardwareOpusDecoderManager.cs index 042be626f3..ed40cdadb9 100644 --- a/Ryujinx.HLE/HOS/Services/Aud/IHardwareOpusDecoderManager.cs +++ b/Ryujinx.HLE/HOS/Services/Audio/IHardwareOpusDecoderManager.cs @@ -1,4 +1,6 @@ -namespace Ryujinx.HLE.HOS.Services.Aud +using Ryujinx.HLE.HOS.Services.Audio.HardwareOpusDecoderManager; + +namespace Ryujinx.HLE.HOS.Services.Audio { [Service("hwopus")] class IHardwareOpusDecoderManager : IpcService diff --git a/Ryujinx.HLE/HOS/Services/Aud/ResultCode.cs b/Ryujinx.HLE/HOS/Services/Audio/ResultCode.cs similarity index 90% rename from Ryujinx.HLE/HOS/Services/Aud/ResultCode.cs rename to Ryujinx.HLE/HOS/Services/Audio/ResultCode.cs index d49964d638..5bba3582fb 100644 --- a/Ryujinx.HLE/HOS/Services/Aud/ResultCode.cs +++ b/Ryujinx.HLE/HOS/Services/Audio/ResultCode.cs @@ -1,4 +1,4 @@ -namespace Ryujinx.HLE.HOS.Services.Aud +namespace Ryujinx.HLE.HOS.Services.Audio { enum ResultCode { diff --git a/Ryujinx.HLE/HOS/Services/Aud/SampleFormat.cs b/Ryujinx.HLE/HOS/Services/Audio/Types/SampleFormat.cs similarity index 82% rename from Ryujinx.HLE/HOS/Services/Aud/SampleFormat.cs rename to Ryujinx.HLE/HOS/Services/Audio/Types/SampleFormat.cs index 8da8038178..654436e458 100644 --- a/Ryujinx.HLE/HOS/Services/Aud/SampleFormat.cs +++ b/Ryujinx.HLE/HOS/Services/Audio/Types/SampleFormat.cs @@ -1,4 +1,4 @@ -namespace Ryujinx.HLE.HOS.Services.Aud +namespace Ryujinx.HLE.HOS.Services.Audio { enum SampleFormat : byte { diff --git a/Ryujinx.HLE/HOS/Services/Bcat/IServiceCreator.cs b/Ryujinx.HLE/HOS/Services/Bcat/IServiceCreator.cs index 4e9d36563d..ec34f5407e 100644 --- a/Ryujinx.HLE/HOS/Services/Bcat/IServiceCreator.cs +++ b/Ryujinx.HLE/HOS/Services/Bcat/IServiceCreator.cs @@ -1,4 +1,5 @@ -using Ryujinx.HLE.HOS.Services.Glue; +using Ryujinx.HLE.HOS.Services.Bcat.ServiceCreator; +using Ryujinx.HLE.HOS.Services.Arp; namespace Ryujinx.HLE.HOS.Services.Bcat { diff --git a/Ryujinx.HLE/HOS/Services/Bcat/IBcatService.cs b/Ryujinx.HLE/HOS/Services/Bcat/ServiceCreator/IBcatService.cs similarity index 60% rename from Ryujinx.HLE/HOS/Services/Bcat/IBcatService.cs rename to Ryujinx.HLE/HOS/Services/Bcat/ServiceCreator/IBcatService.cs index 030f9110b0..1b32756a25 100644 --- a/Ryujinx.HLE/HOS/Services/Bcat/IBcatService.cs +++ b/Ryujinx.HLE/HOS/Services/Bcat/ServiceCreator/IBcatService.cs @@ -1,6 +1,6 @@ -using Ryujinx.HLE.HOS.Services.Glue; +using Ryujinx.HLE.HOS.Services.Arp; -namespace Ryujinx.HLE.HOS.Services.Bcat +namespace Ryujinx.HLE.HOS.Services.Bcat.ServiceCreator { class IBcatService : IpcService { diff --git a/Ryujinx.HLE/HOS/Services/Bcat/IDeliveryCacheStorageService.cs b/Ryujinx.HLE/HOS/Services/Bcat/ServiceCreator/IDeliveryCacheStorageService.cs similarity index 94% rename from Ryujinx.HLE/HOS/Services/Bcat/IDeliveryCacheStorageService.cs rename to Ryujinx.HLE/HOS/Services/Bcat/ServiceCreator/IDeliveryCacheStorageService.cs index 1c9aed1183..cad4437052 100644 --- a/Ryujinx.HLE/HOS/Services/Bcat/IDeliveryCacheStorageService.cs +++ b/Ryujinx.HLE/HOS/Services/Bcat/ServiceCreator/IDeliveryCacheStorageService.cs @@ -1,8 +1,8 @@ -using Ryujinx.HLE.HOS.Services.Glue; +using Ryujinx.HLE.HOS.Services.Arp; using System; using System.Text; -namespace Ryujinx.HLE.HOS.Services.Bcat +namespace Ryujinx.HLE.HOS.Services.Bcat.ServiceCreator { class IDeliveryCacheStorageService : IpcService { diff --git a/Ryujinx.HLE/HOS/Services/Bgtc/IStateControlService.cs b/Ryujinx.HLE/HOS/Services/Bgtc/IStateControlService.cs new file mode 100644 index 0000000000..4926d4d829 --- /dev/null +++ b/Ryujinx.HLE/HOS/Services/Bgtc/IStateControlService.cs @@ -0,0 +1,8 @@ +namespace Ryujinx.HLE.HOS.Services.Bgct +{ + [Service("bgtc:sc")] + class IStateControlService : IpcService + { + public IStateControlService(ServiceCtx context) { } + } +} \ No newline at end of file diff --git a/Ryujinx.HLE/HOS/Services/Bgtc/ITaskService.cs b/Ryujinx.HLE/HOS/Services/Bgtc/ITaskService.cs new file mode 100644 index 0000000000..a032c3809d --- /dev/null +++ b/Ryujinx.HLE/HOS/Services/Bgtc/ITaskService.cs @@ -0,0 +1,8 @@ +namespace Ryujinx.HLE.HOS.Services.Bgct +{ + [Service("bgtc:t")] + class ITaskService : IpcService + { + public ITaskService(ServiceCtx context) { } + } +} \ No newline at end of file diff --git a/Ryujinx.HLE/HOS/Services/Bluetooth/BluetoothEventManager.cs b/Ryujinx.HLE/HOS/Services/Bluetooth/BluetoothDriver/BluetoothEventManager.cs similarity index 92% rename from Ryujinx.HLE/HOS/Services/Bluetooth/BluetoothEventManager.cs rename to Ryujinx.HLE/HOS/Services/Bluetooth/BluetoothDriver/BluetoothEventManager.cs index 9b7ca4c1dd..81f4a7d292 100644 --- a/Ryujinx.HLE/HOS/Services/Bluetooth/BluetoothEventManager.cs +++ b/Ryujinx.HLE/HOS/Services/Bluetooth/BluetoothDriver/BluetoothEventManager.cs @@ -1,6 +1,6 @@ using Ryujinx.HLE.HOS.Kernel.Threading; -namespace Ryujinx.HLE.HOS.Services.Bluetooth +namespace Ryujinx.HLE.HOS.Services.Bluetooth.BluetoothDriver { static class BluetoothEventManager { diff --git a/Ryujinx.HLE/HOS/Services/Bluetooth/IBluetoothDriver.cs b/Ryujinx.HLE/HOS/Services/Bluetooth/IBluetoothDriver.cs index 4cee67cddf..fc20ec3086 100644 --- a/Ryujinx.HLE/HOS/Services/Bluetooth/IBluetoothDriver.cs +++ b/Ryujinx.HLE/HOS/Services/Bluetooth/IBluetoothDriver.cs @@ -1,6 +1,7 @@ using Ryujinx.HLE.HOS.Kernel.Common; using Ryujinx.HLE.HOS.Kernel.Threading; -using Ryujinx.HLE.HOS.Services.Set; +using Ryujinx.HLE.HOS.Services.Bluetooth.BluetoothDriver; +using Ryujinx.HLE.HOS.Services.Settings; using System; namespace Ryujinx.HLE.HOS.Services.Bluetooth diff --git a/Ryujinx.HLE/HOS/Services/Bluetooth/IBluetoothUser.cs b/Ryujinx.HLE/HOS/Services/Bluetooth/IBluetoothUser.cs index d070e18f87..c5693c5724 100644 --- a/Ryujinx.HLE/HOS/Services/Bluetooth/IBluetoothUser.cs +++ b/Ryujinx.HLE/HOS/Services/Bluetooth/IBluetoothUser.cs @@ -1,5 +1,6 @@ using Ryujinx.HLE.HOS.Ipc; -using Ryujinx.HLE.HOS.Services.Set; +using Ryujinx.HLE.HOS.Services.Bluetooth.BluetoothDriver; +using Ryujinx.HLE.HOS.Services.Settings; namespace Ryujinx.HLE.HOS.Services.Bluetooth { diff --git a/Ryujinx.HLE/HOS/Services/Btm/IBtmUserCore.cs b/Ryujinx.HLE/HOS/Services/Btm/BtmUser/IBtmUserCore.cs similarity index 99% rename from Ryujinx.HLE/HOS/Services/Btm/IBtmUserCore.cs rename to Ryujinx.HLE/HOS/Services/Btm/BtmUser/IBtmUserCore.cs index 14b7b5f35d..0ab9a3ef1c 100644 --- a/Ryujinx.HLE/HOS/Services/Btm/IBtmUserCore.cs +++ b/Ryujinx.HLE/HOS/Services/Btm/BtmUser/IBtmUserCore.cs @@ -3,7 +3,7 @@ using Ryujinx.HLE.HOS.Ipc; using Ryujinx.HLE.HOS.Kernel.Common; using Ryujinx.HLE.HOS.Kernel.Threading; -namespace Ryujinx.HLE.HOS.Services.Btm +namespace Ryujinx.HLE.HOS.Services.Btm.BtmUser { class IBtmUserCore : IpcService { diff --git a/Ryujinx.HLE/HOS/Services/Btm/IBtmDebug.cs b/Ryujinx.HLE/HOS/Services/Btm/IBtmDebug.cs new file mode 100644 index 0000000000..a55b7da875 --- /dev/null +++ b/Ryujinx.HLE/HOS/Services/Btm/IBtmDebug.cs @@ -0,0 +1,8 @@ +namespace Ryujinx.HLE.HOS.Services.Btm +{ + [Service("btm:dbg")] + class IBtmDebug : IpcService + { + public IBtmDebug(ServiceCtx context) { } + } +} \ No newline at end of file diff --git a/Ryujinx.HLE/HOS/Services/Btm/IBtmSystem.cs b/Ryujinx.HLE/HOS/Services/Btm/IBtmSystem.cs new file mode 100644 index 0000000000..9120762caf --- /dev/null +++ b/Ryujinx.HLE/HOS/Services/Btm/IBtmSystem.cs @@ -0,0 +1,8 @@ +namespace Ryujinx.HLE.HOS.Services.Btm +{ + [Service("btm:sys")] + class IBtmSystem : IpcService + { + public IBtmSystem(ServiceCtx context) { } + } +} \ No newline at end of file diff --git a/Ryujinx.HLE/HOS/Services/Btm/IBtmUser.cs b/Ryujinx.HLE/HOS/Services/Btm/IBtmUser.cs index 133ef0cc2c..68694187bc 100644 --- a/Ryujinx.HLE/HOS/Services/Btm/IBtmUser.cs +++ b/Ryujinx.HLE/HOS/Services/Btm/IBtmUser.cs @@ -1,6 +1,8 @@ -namespace Ryujinx.HLE.HOS.Services.Btm +using Ryujinx.HLE.HOS.Services.Btm.BtmUser; + +namespace Ryujinx.HLE.HOS.Services.Btm { - [Service("btm:u")] + [Service("btm:u")] // 5.0.0+ class IBtmUser : IpcService { public IBtmUser(ServiceCtx context) { } diff --git a/Ryujinx.HLE/HOS/Services/Caps/IAlbumApplicationService.cs b/Ryujinx.HLE/HOS/Services/Caps/IAlbumApplicationService.cs new file mode 100644 index 0000000000..199d6aa350 --- /dev/null +++ b/Ryujinx.HLE/HOS/Services/Caps/IAlbumApplicationService.cs @@ -0,0 +1,8 @@ +namespace Ryujinx.HLE.HOS.Services.Caps +{ + [Service("caps:u")] + class IAlbumApplicationService : IpcService + { + public IAlbumApplicationService(ServiceCtx context) { } + } +} \ No newline at end of file diff --git a/Ryujinx.HLE/HOS/Services/Caps/IAlbumControlService.cs b/Ryujinx.HLE/HOS/Services/Caps/IAlbumControlService.cs new file mode 100644 index 0000000000..de880153b3 --- /dev/null +++ b/Ryujinx.HLE/HOS/Services/Caps/IAlbumControlService.cs @@ -0,0 +1,8 @@ +namespace Ryujinx.HLE.HOS.Services.Caps +{ + [Service("caps:c")] + class IAlbumControlService : IpcService + { + public IAlbumControlService(ServiceCtx context) { } + } +} \ No newline at end of file diff --git a/Ryujinx.HLE/HOS/Services/Caps/IScreenShotApplicationService.cs b/Ryujinx.HLE/HOS/Services/Caps/IScreenShotApplicationService.cs new file mode 100644 index 0000000000..209bfd3d77 --- /dev/null +++ b/Ryujinx.HLE/HOS/Services/Caps/IScreenShotApplicationService.cs @@ -0,0 +1,8 @@ +namespace Ryujinx.HLE.HOS.Services.Caps +{ + [Service("caps:su")] // 6.0.0+ + class IScreenShotApplicationService : IpcService + { + public IScreenShotApplicationService(ServiceCtx context) { } + } +} \ No newline at end of file diff --git a/Ryujinx.HLE/HOS/Services/Caps/IScreenShotControlService.cs b/Ryujinx.HLE/HOS/Services/Caps/IScreenShotControlService.cs new file mode 100644 index 0000000000..337fa9eec1 --- /dev/null +++ b/Ryujinx.HLE/HOS/Services/Caps/IScreenShotControlService.cs @@ -0,0 +1,8 @@ +namespace Ryujinx.HLE.HOS.Services.Caps +{ + [Service("caps:sc")] + class IScreenShotControlService : IpcService + { + public IScreenShotControlService(ServiceCtx context) { } + } +} \ No newline at end of file diff --git a/Ryujinx.HLE/HOS/Services/Caps/IScreenshotService.cs b/Ryujinx.HLE/HOS/Services/Caps/IScreenshotService.cs index 6c34f2a074..03703e05d7 100644 --- a/Ryujinx.HLE/HOS/Services/Caps/IScreenshotService.cs +++ b/Ryujinx.HLE/HOS/Services/Caps/IScreenshotService.cs @@ -1,6 +1,6 @@ namespace Ryujinx.HLE.HOS.Services.Caps { - [Service("caps:ss")] + [Service("caps:ss")] // 2.0.0+ class IScreenshotService : IpcService { public IScreenshotService(ServiceCtx context) { } diff --git a/Ryujinx.HLE/HOS/Services/Cec/ICecManager.cs b/Ryujinx.HLE/HOS/Services/Cec/ICecManager.cs new file mode 100644 index 0000000000..71c267868b --- /dev/null +++ b/Ryujinx.HLE/HOS/Services/Cec/ICecManager.cs @@ -0,0 +1,8 @@ +namespace Ryujinx.HLE.HOS.Services.Cec +{ + [Service("cec-mgr")] + class ICecManager : IpcService + { + public ICecManager(ServiceCtx context) { } + } +} \ No newline at end of file diff --git a/Ryujinx.HLE/HOS/Services/Erpt/IContext.cs b/Ryujinx.HLE/HOS/Services/Erpt/IContext.cs new file mode 100644 index 0000000000..9a689172bf --- /dev/null +++ b/Ryujinx.HLE/HOS/Services/Erpt/IContext.cs @@ -0,0 +1,8 @@ +namespace Ryujinx.HLE.HOS.Services.Erpt +{ + [Service("erpt:c")] + class IContext : IpcService + { + public IContext(ServiceCtx context) { } + } +} \ No newline at end of file diff --git a/Ryujinx.HLE/HOS/Services/Erpt/ISession.cs b/Ryujinx.HLE/HOS/Services/Erpt/ISession.cs new file mode 100644 index 0000000000..6397afae8d --- /dev/null +++ b/Ryujinx.HLE/HOS/Services/Erpt/ISession.cs @@ -0,0 +1,8 @@ +namespace Ryujinx.HLE.HOS.Services.Erpt +{ + [Service("erpt:r")] + class ISession : IpcService + { + public ISession(ServiceCtx context) { } + } +} \ No newline at end of file diff --git a/Ryujinx.HLE/HOS/Services/Es/IETicketService.cs b/Ryujinx.HLE/HOS/Services/Es/IETicketService.cs index f8ecb85cad..34be7bdd87 100644 --- a/Ryujinx.HLE/HOS/Services/Es/IETicketService.cs +++ b/Ryujinx.HLE/HOS/Services/Es/IETicketService.cs @@ -1,8 +1,8 @@ namespace Ryujinx.HLE.HOS.Services.Es { [Service("es")] - class IeTicketService : IpcService + class IETicketService : IpcService { - public IeTicketService(ServiceCtx context) { } + public IETicketService(ServiceCtx context) { } } } \ No newline at end of file diff --git a/Ryujinx.HLE/HOS/Services/Eupld/IControl.cs b/Ryujinx.HLE/HOS/Services/Eupld/IControl.cs new file mode 100644 index 0000000000..dd8705e66d --- /dev/null +++ b/Ryujinx.HLE/HOS/Services/Eupld/IControl.cs @@ -0,0 +1,8 @@ +namespace Ryujinx.HLE.HOS.Services.Eupld +{ + [Service("eupld:c")] + class IControl : IpcService + { + public IControl(ServiceCtx context) { } + } +} \ No newline at end of file diff --git a/Ryujinx.HLE/HOS/Services/Eupld/IRequest.cs b/Ryujinx.HLE/HOS/Services/Eupld/IRequest.cs new file mode 100644 index 0000000000..8509787892 --- /dev/null +++ b/Ryujinx.HLE/HOS/Services/Eupld/IRequest.cs @@ -0,0 +1,8 @@ +namespace Ryujinx.HLE.HOS.Services.Eupld +{ + [Service("eupld:r")] + class IRequest : IpcService + { + public IRequest(ServiceCtx context) { } + } +} \ No newline at end of file diff --git a/Ryujinx.HLE/HOS/Services/Fatal/IPrivateService.cs b/Ryujinx.HLE/HOS/Services/Fatal/IPrivateService.cs new file mode 100644 index 0000000000..eb2c955345 --- /dev/null +++ b/Ryujinx.HLE/HOS/Services/Fatal/IPrivateService.cs @@ -0,0 +1,8 @@ +namespace Ryujinx.HLE.HOS.Services.Fatal +{ + [Service("fatal:p")] + class IPrivateService : IpcService + { + public IPrivateService(ServiceCtx context) { } + } +} \ No newline at end of file diff --git a/Ryujinx.HLE/HOS/Services/Fatal/IService.cs b/Ryujinx.HLE/HOS/Services/Fatal/IService.cs new file mode 100644 index 0000000000..692d2b0b7d --- /dev/null +++ b/Ryujinx.HLE/HOS/Services/Fatal/IService.cs @@ -0,0 +1,8 @@ +namespace Ryujinx.HLE.HOS.Services.Fatal +{ + [Service("fatal:u")] + class IService : IpcService + { + public IService(ServiceCtx context) { } + } +} \ No newline at end of file diff --git a/Ryujinx.HLE/HOS/Services/Friend/IFriendServiceTypes.cs b/Ryujinx.HLE/HOS/Services/Friend/IFriendServiceTypes.cs deleted file mode 100644 index 5a5238f59d..0000000000 --- a/Ryujinx.HLE/HOS/Services/Friend/IFriendServiceTypes.cs +++ /dev/null @@ -1,104 +0,0 @@ -using Ryujinx.HLE.Utilities; -using System.Runtime.InteropServices; - -namespace Ryujinx.HLE.HOS.Services.Friend -{ - enum PresenceStatusFilter : uint - { - None, - Online, - OnlinePlay, - OnlineOrOnlinePlay - } - - enum PresenceStatus : uint - { - Offline, - Online, - OnlinePlay, - } - - [StructLayout(LayoutKind.Sequential)] - struct FriendFilter - { - public PresenceStatusFilter PresenceStatus; - - [MarshalAs(UnmanagedType.I1)] - public bool IsFavoriteOnly; - - [MarshalAs(UnmanagedType.I1)] - public bool IsSameAppPresenceOnly; - - [MarshalAs(UnmanagedType.I1)] - public bool IsSameAppPlayedOnly; - - [MarshalAs(UnmanagedType.I1)] - public bool IsArbitraryAppPlayedOnly; - - public long PresenceGroupId; - } - - [StructLayout(LayoutKind.Sequential, Pack = 0x8, CharSet = CharSet.Ansi)] - struct UserPresence - { - public UInt128 UserId; - public long LastTimeOnlineTimestamp; - public PresenceStatus Status; - - [MarshalAs(UnmanagedType.I1)] - public bool SamePresenceGroupApplication; - - [MarshalAs(UnmanagedType.ByValArray, SizeConst = 0x3)] - char[] Unknown; - - [MarshalAs(UnmanagedType.ByValArray, SizeConst = 0xC0)] - public char[] AppKeyValueStorage; - - public override string ToString() - { - return $"UserPresence {{ UserId: {UserId}, LastTimeOnlineTimestamp: {LastTimeOnlineTimestamp}, Status: {Status}, AppKeyValueStorage: {AppKeyValueStorage} }}"; - } - } - - [StructLayout(LayoutKind.Sequential, Pack = 0x8, Size = 0x200, CharSet = CharSet.Ansi)] - struct Friend - { - public UInt128 UserId; - public long NetworkUserId; - - [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 0x21)] - public string Nickname; - - public UserPresence presence; - - [MarshalAs(UnmanagedType.I1)] - public bool IsFavourite; - - [MarshalAs(UnmanagedType.I1)] - public bool IsNew; - - [MarshalAs(UnmanagedType.ByValArray, SizeConst = 0x6)] - char[] Unknown; - - [MarshalAs(UnmanagedType.I1)] - public bool IsValid; - } - - enum NotificationEventType : uint - { - Invalid = 0x0, - FriendListUpdate = 0x1, - NewFriendRequest = 0x65, - } - - [StructLayout(LayoutKind.Sequential, Pack = 0x8, Size = 0x10)] - struct NotificationInfo - { - public NotificationEventType Type; - - [MarshalAs(UnmanagedType.ByValArray, SizeConst = 0x4)] - char[] Padding; - - public long NetworkUserIdPlaceholder; - } -} \ No newline at end of file diff --git a/Ryujinx.HLE/HOS/Services/Friend/IServiceCreator.cs b/Ryujinx.HLE/HOS/Services/Friend/IServiceCreator.cs index c907a2ed57..cec3c422ad 100644 --- a/Ryujinx.HLE/HOS/Services/Friend/IServiceCreator.cs +++ b/Ryujinx.HLE/HOS/Services/Friend/IServiceCreator.cs @@ -1,4 +1,5 @@ using Ryujinx.Common; +using Ryujinx.HLE.HOS.Services.Friend.ServiceCreator; using Ryujinx.HLE.Utilities; namespace Ryujinx.HLE.HOS.Services.Friend diff --git a/Ryujinx.HLE/HOS/Services/Friend/ServiceCreator/FriendService/Types/Friend.cs b/Ryujinx.HLE/HOS/Services/Friend/ServiceCreator/FriendService/Types/Friend.cs new file mode 100644 index 0000000000..4947a5ce95 --- /dev/null +++ b/Ryujinx.HLE/HOS/Services/Friend/ServiceCreator/FriendService/Types/Friend.cs @@ -0,0 +1,29 @@ +using Ryujinx.HLE.Utilities; +using System.Runtime.InteropServices; + +namespace Ryujinx.HLE.HOS.Services.Friend.ServiceCreator.FriendService +{ + [StructLayout(LayoutKind.Sequential, Pack = 0x8, Size = 0x200, CharSet = CharSet.Ansi)] + struct Friend + { + public UInt128 UserId; + public long NetworkUserId; + + [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 0x21)] + public string Nickname; + + public UserPresence presence; + + [MarshalAs(UnmanagedType.I1)] + public bool IsFavourite; + + [MarshalAs(UnmanagedType.I1)] + public bool IsNew; + + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 0x6)] + char[] Unknown; + + [MarshalAs(UnmanagedType.I1)] + public bool IsValid; + } +} \ No newline at end of file diff --git a/Ryujinx.HLE/HOS/Services/Friend/ServiceCreator/FriendService/Types/FriendFilter.cs b/Ryujinx.HLE/HOS/Services/Friend/ServiceCreator/FriendService/Types/FriendFilter.cs new file mode 100644 index 0000000000..261bf7bf0c --- /dev/null +++ b/Ryujinx.HLE/HOS/Services/Friend/ServiceCreator/FriendService/Types/FriendFilter.cs @@ -0,0 +1,24 @@ +using System.Runtime.InteropServices; + +namespace Ryujinx.HLE.HOS.Services.Friend.ServiceCreator.FriendService +{ + [StructLayout(LayoutKind.Sequential)] + struct FriendFilter + { + public PresenceStatusFilter PresenceStatus; + + [MarshalAs(UnmanagedType.I1)] + public bool IsFavoriteOnly; + + [MarshalAs(UnmanagedType.I1)] + public bool IsSameAppPresenceOnly; + + [MarshalAs(UnmanagedType.I1)] + public bool IsSameAppPlayedOnly; + + [MarshalAs(UnmanagedType.I1)] + public bool IsArbitraryAppPlayedOnly; + + public long PresenceGroupId; + } +} \ No newline at end of file diff --git a/Ryujinx.HLE/HOS/Services/Friend/ServiceCreator/FriendService/Types/PresenceStatus.cs b/Ryujinx.HLE/HOS/Services/Friend/ServiceCreator/FriendService/Types/PresenceStatus.cs new file mode 100644 index 0000000000..df2e65257f --- /dev/null +++ b/Ryujinx.HLE/HOS/Services/Friend/ServiceCreator/FriendService/Types/PresenceStatus.cs @@ -0,0 +1,9 @@ +namespace Ryujinx.HLE.HOS.Services.Friend.ServiceCreator.FriendService +{ + enum PresenceStatus : uint + { + Offline, + Online, + OnlinePlay + } +} \ No newline at end of file diff --git a/Ryujinx.HLE/HOS/Services/Friend/ServiceCreator/FriendService/Types/PresenceStatusFilter.cs b/Ryujinx.HLE/HOS/Services/Friend/ServiceCreator/FriendService/Types/PresenceStatusFilter.cs new file mode 100644 index 0000000000..24da7fd33f --- /dev/null +++ b/Ryujinx.HLE/HOS/Services/Friend/ServiceCreator/FriendService/Types/PresenceStatusFilter.cs @@ -0,0 +1,10 @@ +namespace Ryujinx.HLE.HOS.Services.Friend.ServiceCreator.FriendService +{ + enum PresenceStatusFilter : uint + { + None, + Online, + OnlinePlay, + OnlineOrOnlinePlay + } +} \ No newline at end of file diff --git a/Ryujinx.HLE/HOS/Services/Friend/ServiceCreator/FriendService/Types/UserPresence.cs b/Ryujinx.HLE/HOS/Services/Friend/ServiceCreator/FriendService/Types/UserPresence.cs new file mode 100644 index 0000000000..5fe8bfd727 --- /dev/null +++ b/Ryujinx.HLE/HOS/Services/Friend/ServiceCreator/FriendService/Types/UserPresence.cs @@ -0,0 +1,27 @@ +using Ryujinx.HLE.Utilities; +using System.Runtime.InteropServices; + +namespace Ryujinx.HLE.HOS.Services.Friend.ServiceCreator.FriendService +{ + [StructLayout(LayoutKind.Sequential, Pack = 0x8, CharSet = CharSet.Ansi)] + struct UserPresence + { + public UInt128 UserId; + public long LastTimeOnlineTimestamp; + public PresenceStatus Status; + + [MarshalAs(UnmanagedType.I1)] + public bool SamePresenceGroupApplication; + + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 0x3)] + public char[] Unknown; + + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 0xC0)] + public char[] AppKeyValueStorage; + + public override string ToString() + { + return $"UserPresence {{ UserId: {UserId}, LastTimeOnlineTimestamp: {LastTimeOnlineTimestamp}, Status: {Status}, AppKeyValueStorage: {AppKeyValueStorage} }}"; + } + } +} \ No newline at end of file diff --git a/Ryujinx.HLE/HOS/Services/Friend/IDaemonSuspendSessionService.cs b/Ryujinx.HLE/HOS/Services/Friend/ServiceCreator/IDaemonSuspendSessionService.cs similarity index 83% rename from Ryujinx.HLE/HOS/Services/Friend/IDaemonSuspendSessionService.cs rename to Ryujinx.HLE/HOS/Services/Friend/ServiceCreator/IDaemonSuspendSessionService.cs index 0156e0b73f..42b34312c1 100644 --- a/Ryujinx.HLE/HOS/Services/Friend/IDaemonSuspendSessionService.cs +++ b/Ryujinx.HLE/HOS/Services/Friend/ServiceCreator/IDaemonSuspendSessionService.cs @@ -1,4 +1,4 @@ -namespace Ryujinx.HLE.HOS.Services.Friend +namespace Ryujinx.HLE.HOS.Services.Friend.ServiceCreator { class IDaemonSuspendSessionService : IpcService { diff --git a/Ryujinx.HLE/HOS/Services/Friend/IFriendService.cs b/Ryujinx.HLE/HOS/Services/Friend/ServiceCreator/IFriendService.cs similarity index 97% rename from Ryujinx.HLE/HOS/Services/Friend/IFriendService.cs rename to Ryujinx.HLE/HOS/Services/Friend/ServiceCreator/IFriendService.cs index ed3bc284aa..7492c5a72d 100644 --- a/Ryujinx.HLE/HOS/Services/Friend/IFriendService.cs +++ b/Ryujinx.HLE/HOS/Services/Friend/ServiceCreator/IFriendService.cs @@ -1,11 +1,12 @@ using Ryujinx.Common; using Ryujinx.Common.Logging; -using Ryujinx.HLE.HOS.SystemState; +using Ryujinx.HLE.HOS.Services.Account.Acc; +using Ryujinx.HLE.HOS.Services.Friend.ServiceCreator.FriendService; using Ryujinx.HLE.Utilities; using System.IO; using System.Runtime.InteropServices; -namespace Ryujinx.HLE.HOS.Services.Friend +namespace Ryujinx.HLE.HOS.Services.Friend.ServiceCreator { class IFriendService : IpcService { diff --git a/Ryujinx.HLE/HOS/Services/Friend/INotificationService.cs b/Ryujinx.HLE/HOS/Services/Friend/ServiceCreator/INotificationService.cs similarity index 97% rename from Ryujinx.HLE/HOS/Services/Friend/INotificationService.cs rename to Ryujinx.HLE/HOS/Services/Friend/ServiceCreator/INotificationService.cs index 7cff84bd4f..1ff37442c1 100644 --- a/Ryujinx.HLE/HOS/Services/Friend/INotificationService.cs +++ b/Ryujinx.HLE/HOS/Services/Friend/ServiceCreator/INotificationService.cs @@ -2,11 +2,12 @@ using Ryujinx.Common; using Ryujinx.HLE.HOS.Ipc; using Ryujinx.HLE.HOS.Kernel.Common; using Ryujinx.HLE.HOS.Kernel.Threading; +using Ryujinx.HLE.HOS.Services.Friend.ServiceCreator.NotificationService; using Ryujinx.HLE.Utilities; using System; using System.Collections.Generic; -namespace Ryujinx.HLE.HOS.Services.Friend +namespace Ryujinx.HLE.HOS.Services.Friend.ServiceCreator { class INotificationService : IpcService, IDisposable { diff --git a/Ryujinx.HLE/HOS/Services/Friend/NotificationEventHandler.cs b/Ryujinx.HLE/HOS/Services/Friend/ServiceCreator/NotificationService/NotificationEventHandler.cs similarity index 96% rename from Ryujinx.HLE/HOS/Services/Friend/NotificationEventHandler.cs rename to Ryujinx.HLE/HOS/Services/Friend/ServiceCreator/NotificationService/NotificationEventHandler.cs index 8582a074bb..19b15416a0 100644 --- a/Ryujinx.HLE/HOS/Services/Friend/NotificationEventHandler.cs +++ b/Ryujinx.HLE/HOS/Services/Friend/ServiceCreator/NotificationService/NotificationEventHandler.cs @@ -1,6 +1,6 @@ using Ryujinx.HLE.Utilities; -namespace Ryujinx.HLE.HOS.Services.Friend +namespace Ryujinx.HLE.HOS.Services.Friend.ServiceCreator.NotificationService { public sealed class NotificationEventHandler { diff --git a/Ryujinx.HLE/HOS/Services/Friend/ServiceCreator/NotificationService/Types/NotificationEventType.cs b/Ryujinx.HLE/HOS/Services/Friend/ServiceCreator/NotificationService/Types/NotificationEventType.cs new file mode 100644 index 0000000000..5136ae8a63 --- /dev/null +++ b/Ryujinx.HLE/HOS/Services/Friend/ServiceCreator/NotificationService/Types/NotificationEventType.cs @@ -0,0 +1,9 @@ +namespace Ryujinx.HLE.HOS.Services.Friend.ServiceCreator.NotificationService +{ + enum NotificationEventType : uint + { + Invalid = 0x0, + FriendListUpdate = 0x1, + NewFriendRequest = 0x65 + } +} \ No newline at end of file diff --git a/Ryujinx.HLE/HOS/Services/Friend/ServiceCreator/NotificationService/Types/NotificationInfo.cs b/Ryujinx.HLE/HOS/Services/Friend/ServiceCreator/NotificationService/Types/NotificationInfo.cs new file mode 100644 index 0000000000..1bd6f01189 --- /dev/null +++ b/Ryujinx.HLE/HOS/Services/Friend/ServiceCreator/NotificationService/Types/NotificationInfo.cs @@ -0,0 +1,15 @@ +using System.Runtime.InteropServices; + +namespace Ryujinx.HLE.HOS.Services.Friend.ServiceCreator.NotificationService +{ + [StructLayout(LayoutKind.Sequential, Pack = 0x8, Size = 0x10)] + struct NotificationInfo + { + public NotificationEventType Type; + + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 0x4)] + public char[] Padding; + + public long NetworkUserIdPlaceholder; + } +} \ No newline at end of file diff --git a/Ryujinx.HLE/HOS/Services/Friend/FriendServicePermissionLevel.cs b/Ryujinx.HLE/HOS/Services/Friend/ServiceCreator/Types/FriendServicePermissionLevel.cs similarity index 86% rename from Ryujinx.HLE/HOS/Services/Friend/FriendServicePermissionLevel.cs rename to Ryujinx.HLE/HOS/Services/Friend/ServiceCreator/Types/FriendServicePermissionLevel.cs index a2a4031a51..9c81136581 100644 --- a/Ryujinx.HLE/HOS/Services/Friend/FriendServicePermissionLevel.cs +++ b/Ryujinx.HLE/HOS/Services/Friend/ServiceCreator/Types/FriendServicePermissionLevel.cs @@ -1,6 +1,6 @@ using System; -namespace Ryujinx.HLE.HOS.Services.Friend +namespace Ryujinx.HLE.HOS.Services.Friend.ServiceCreator { [Flags] enum FriendServicePermissionLevel diff --git a/Ryujinx.HLE/HOS/Services/FspSrv/FileSystemHelper.cs b/Ryujinx.HLE/HOS/Services/Fs/FileSystemProxy/FileSystemProxyHelper.cs similarity index 98% rename from Ryujinx.HLE/HOS/Services/FspSrv/FileSystemHelper.cs rename to Ryujinx.HLE/HOS/Services/Fs/FileSystemProxy/FileSystemProxyHelper.cs index d2e157f5a1..04b87b57f1 100644 --- a/Ryujinx.HLE/HOS/Services/FspSrv/FileSystemHelper.cs +++ b/Ryujinx.HLE/HOS/Services/Fs/FileSystemProxy/FileSystemProxyHelper.cs @@ -6,9 +6,9 @@ using Ryujinx.HLE.FileSystem; using Ryujinx.HLE.Utilities; using System.IO; -namespace Ryujinx.HLE.HOS.Services.FspSrv +namespace Ryujinx.HLE.HOS.Services.Fs.FileSystemProxy { - static class FileSystemHelper + static class FileSystemProxyHelper { public static ResultCode LoadSaveDataFileSystem(ServiceCtx context, bool readOnly, out IFileSystem loadedFileSystem) { diff --git a/Ryujinx.HLE/HOS/Services/FspSrv/IDirectory.cs b/Ryujinx.HLE/HOS/Services/Fs/FileSystemProxy/IDirectory.cs similarity index 97% rename from Ryujinx.HLE/HOS/Services/FspSrv/IDirectory.cs rename to Ryujinx.HLE/HOS/Services/Fs/FileSystemProxy/IDirectory.cs index 57d9142cbb..4fc8a68735 100644 --- a/Ryujinx.HLE/HOS/Services/FspSrv/IDirectory.cs +++ b/Ryujinx.HLE/HOS/Services/Fs/FileSystemProxy/IDirectory.cs @@ -2,7 +2,7 @@ using LibHac; using System.Collections.Generic; using System.Text; -namespace Ryujinx.HLE.HOS.Services.FspSrv +namespace Ryujinx.HLE.HOS.Services.Fs.FileSystemProxy { class IDirectory : IpcService { diff --git a/Ryujinx.HLE/HOS/Services/FspSrv/IFile.cs b/Ryujinx.HLE/HOS/Services/Fs/FileSystemProxy/IFile.cs similarity index 98% rename from Ryujinx.HLE/HOS/Services/FspSrv/IFile.cs rename to Ryujinx.HLE/HOS/Services/Fs/FileSystemProxy/IFile.cs index 7200611bce..df9209e60b 100644 --- a/Ryujinx.HLE/HOS/Services/FspSrv/IFile.cs +++ b/Ryujinx.HLE/HOS/Services/Fs/FileSystemProxy/IFile.cs @@ -2,7 +2,7 @@ using LibHac; using LibHac.Fs; using System; -namespace Ryujinx.HLE.HOS.Services.FspSrv +namespace Ryujinx.HLE.HOS.Services.Fs.FileSystemProxy { class IFile : IpcService, IDisposable { diff --git a/Ryujinx.HLE/HOS/Services/FspSrv/IFileSystem.cs b/Ryujinx.HLE/HOS/Services/Fs/FileSystemProxy/IFileSystem.cs similarity index 99% rename from Ryujinx.HLE/HOS/Services/FspSrv/IFileSystem.cs rename to Ryujinx.HLE/HOS/Services/Fs/FileSystemProxy/IFileSystem.cs index bcdc6fc3ef..7a7fdbaf12 100644 --- a/Ryujinx.HLE/HOS/Services/FspSrv/IFileSystem.cs +++ b/Ryujinx.HLE/HOS/Services/Fs/FileSystemProxy/IFileSystem.cs @@ -3,7 +3,7 @@ using LibHac.Fs; using static Ryujinx.HLE.Utilities.StringUtils; -namespace Ryujinx.HLE.HOS.Services.FspSrv +namespace Ryujinx.HLE.HOS.Services.Fs.FileSystemProxy { class IFileSystem : IpcService { diff --git a/Ryujinx.HLE/HOS/Services/FspSrv/IStorage.cs b/Ryujinx.HLE/HOS/Services/Fs/FileSystemProxy/IStorage.cs similarity index 96% rename from Ryujinx.HLE/HOS/Services/FspSrv/IStorage.cs rename to Ryujinx.HLE/HOS/Services/Fs/FileSystemProxy/IStorage.cs index d13a12db88..107599a47f 100644 --- a/Ryujinx.HLE/HOS/Services/FspSrv/IStorage.cs +++ b/Ryujinx.HLE/HOS/Services/Fs/FileSystemProxy/IStorage.cs @@ -1,7 +1,7 @@ using LibHac; using Ryujinx.HLE.HOS.Ipc; -namespace Ryujinx.HLE.HOS.Services.FspSrv +namespace Ryujinx.HLE.HOS.Services.Fs.FileSystemProxy { class IStorage : IpcService { diff --git a/Ryujinx.HLE/HOS/Services/FspSrv/IFileSystemProxy.cs b/Ryujinx.HLE/HOS/Services/Fs/IFileSystemProxy.cs similarity index 86% rename from Ryujinx.HLE/HOS/Services/FspSrv/IFileSystemProxy.cs rename to Ryujinx.HLE/HOS/Services/Fs/IFileSystemProxy.cs index 43f5d64779..a0d22595aa 100644 --- a/Ryujinx.HLE/HOS/Services/FspSrv/IFileSystemProxy.cs +++ b/Ryujinx.HLE/HOS/Services/Fs/IFileSystemProxy.cs @@ -3,12 +3,13 @@ using LibHac.Fs; using LibHac.Fs.NcaUtils; using Ryujinx.Common.Logging; using Ryujinx.HLE.FileSystem; +using Ryujinx.HLE.HOS.Services.Fs.FileSystemProxy; using System.IO; using static Ryujinx.HLE.FileSystem.VirtualFileSystem; using static Ryujinx.HLE.Utilities.StringUtils; -namespace Ryujinx.HLE.HOS.Services.FspSrv +namespace Ryujinx.HLE.HOS.Services.Fs { [Service("fsp-srv")] class IFileSystemProxy : IpcService @@ -36,7 +37,7 @@ namespace Ryujinx.HLE.HOS.Services.FspSrv { if (fullPath.Contains(".")) { - ResultCode result = FileSystemHelper.OpenFileSystemFromInternalFile(context, fullPath, out IFileSystem fileSystem); + ResultCode result = FileSystemProxyHelper.OpenFileSystemFromInternalFile(context, fullPath, out FileSystemProxy.IFileSystem fileSystem); if (result == ResultCode.Success) { @@ -54,7 +55,7 @@ namespace Ryujinx.HLE.HOS.Services.FspSrv if (extension == ".nca") { - ResultCode result = FileSystemHelper.OpenNcaFs(context, fullPath, fileStream.AsStorage(), out IFileSystem fileSystem); + ResultCode result = FileSystemProxyHelper.OpenNcaFs(context, fullPath, fileStream.AsStorage(), out FileSystemProxy.IFileSystem fileSystem); if (result == ResultCode.Success) { @@ -65,7 +66,7 @@ namespace Ryujinx.HLE.HOS.Services.FspSrv } else if (extension == ".nsp") { - ResultCode result = FileSystemHelper.OpenNsp(context, fullPath, out IFileSystem fileSystem); + ResultCode result = FileSystemProxyHelper.OpenNsp(context, fullPath, out FileSystemProxy.IFileSystem fileSystem); if (result == ResultCode.Success) { @@ -106,7 +107,7 @@ namespace Ryujinx.HLE.HOS.Services.FspSrv LocalFileSystem fileSystem = new LocalFileSystem(fullPath); - MakeObject(context, new IFileSystem(fileSystem)); + MakeObject(context, new FileSystemProxy.IFileSystem(fileSystem)); return ResultCode.Success; } @@ -119,7 +120,7 @@ namespace Ryujinx.HLE.HOS.Services.FspSrv LocalFileSystem fileSystem = new LocalFileSystem(sdCardPath); - MakeObject(context, new IFileSystem(fileSystem)); + MakeObject(context, new FileSystemProxy.IFileSystem(fileSystem)); return ResultCode.Success; } @@ -128,7 +129,7 @@ namespace Ryujinx.HLE.HOS.Services.FspSrv // OpenSaveDataFileSystem(u8 save_data_space_id, nn::fssrv::sf::SaveStruct saveStruct) -> object saveDataFs public ResultCode OpenSaveDataFileSystem(ServiceCtx context) { - ResultCode result = FileSystemHelper.LoadSaveDataFileSystem(context, false, out IFileSystem fileSystem); + ResultCode result = FileSystemProxyHelper.LoadSaveDataFileSystem(context, false, out FileSystemProxy.IFileSystem fileSystem); if (result == ResultCode.Success) { @@ -142,7 +143,7 @@ namespace Ryujinx.HLE.HOS.Services.FspSrv // OpenSaveDataFileSystemBySystemSaveDataId(u8 save_data_space_id, nn::fssrv::sf::SaveStruct saveStruct) -> object systemSaveDataFs public ResultCode OpenSaveDataFileSystemBySystemSaveDataId(ServiceCtx context) { - ResultCode result = FileSystemHelper.LoadSaveDataFileSystem(context, false, out IFileSystem fileSystem); + ResultCode result = FileSystemProxyHelper.LoadSaveDataFileSystem(context, false, out FileSystemProxy.IFileSystem fileSystem); if (result == ResultCode.Success) { @@ -156,7 +157,7 @@ namespace Ryujinx.HLE.HOS.Services.FspSrv // OpenReadOnlySaveDataFileSystem(u8 save_data_space_id, nn::fssrv::sf::SaveStruct save_struct) -> object public ResultCode OpenReadOnlySaveDataFileSystem(ServiceCtx context) { - ResultCode result = FileSystemHelper.LoadSaveDataFileSystem(context, true, out IFileSystem fileSystem); + ResultCode result = FileSystemProxyHelper.LoadSaveDataFileSystem(context, true, out FileSystemProxy.IFileSystem fileSystem); if (result == ResultCode.Success) { @@ -170,7 +171,7 @@ namespace Ryujinx.HLE.HOS.Services.FspSrv // OpenDataStorageByCurrentProcess() -> object dataStorage public ResultCode OpenDataStorageByCurrentProcess(ServiceCtx context) { - MakeObject(context, new IStorage(context.Device.FileSystem.RomFs.AsStorage())); + MakeObject(context, new FileSystemProxy.IStorage(context.Device.FileSystem.RomFs.AsStorage())); return 0; } @@ -213,7 +214,7 @@ namespace Ryujinx.HLE.HOS.Services.FspSrv Nca nca = new Nca(context.Device.System.KeySet, ncaStorage); LibHac.Fs.IStorage romfsStorage = nca.OpenStorage(NcaSectionType.Data, context.Device.System.FsIntegrityCheckLevel); - MakeObject(context, new IStorage(romfsStorage)); + MakeObject(context, new FileSystemProxy.IStorage(romfsStorage)); } catch (HorizonResultException ex) { @@ -240,7 +241,7 @@ namespace Ryujinx.HLE.HOS.Services.FspSrv // OpenPatchDataStorageByCurrentProcess() -> object public ResultCode OpenPatchDataStorageByCurrentProcess(ServiceCtx context) { - MakeObject(context, new IStorage(context.Device.FileSystem.RomFs.AsStorage())); + MakeObject(context, new FileSystemProxy.IStorage(context.Device.FileSystem.RomFs.AsStorage())); return ResultCode.Success; } diff --git a/Ryujinx.HLE/HOS/Services/Fs/IFileSystemProxyForLoader.cs b/Ryujinx.HLE/HOS/Services/Fs/IFileSystemProxyForLoader.cs new file mode 100644 index 0000000000..a40821b931 --- /dev/null +++ b/Ryujinx.HLE/HOS/Services/Fs/IFileSystemProxyForLoader.cs @@ -0,0 +1,8 @@ +namespace Ryujinx.HLE.HOS.Services.Fs +{ + [Service("fsp-ldr")] + class IFileSystemProxyForLoader : IpcService + { + public IFileSystemProxyForLoader(ServiceCtx context) { } + } +} \ No newline at end of file diff --git a/Ryujinx.HLE/HOS/Services/Fs/IProgramRegistry.cs b/Ryujinx.HLE/HOS/Services/Fs/IProgramRegistry.cs new file mode 100644 index 0000000000..e11eadf53f --- /dev/null +++ b/Ryujinx.HLE/HOS/Services/Fs/IProgramRegistry.cs @@ -0,0 +1,8 @@ +namespace Ryujinx.HLE.HOS.Services.Fs +{ + [Service("fsp-pr")] + class IProgramRegistry : IpcService + { + public IProgramRegistry(ServiceCtx context) { } + } +} \ No newline at end of file diff --git a/Ryujinx.HLE/HOS/Services/FspSrv/ResultCode.cs b/Ryujinx.HLE/HOS/Services/Fs/ResultCode.cs similarity index 91% rename from Ryujinx.HLE/HOS/Services/FspSrv/ResultCode.cs rename to Ryujinx.HLE/HOS/Services/Fs/ResultCode.cs index b2be9293e4..8f87142b19 100644 --- a/Ryujinx.HLE/HOS/Services/FspSrv/ResultCode.cs +++ b/Ryujinx.HLE/HOS/Services/Fs/ResultCode.cs @@ -1,4 +1,4 @@ -namespace Ryujinx.HLE.HOS.Services.FspSrv +namespace Ryujinx.HLE.HOS.Services.Fs { enum ResultCode { diff --git a/Ryujinx.HLE/HOS/Services/FspSrv/FileSystemType.cs b/Ryujinx.HLE/HOS/Services/Fs/Types/FileSystemType.cs similarity index 83% rename from Ryujinx.HLE/HOS/Services/FspSrv/FileSystemType.cs rename to Ryujinx.HLE/HOS/Services/Fs/Types/FileSystemType.cs index 4b2d0ccd6e..f12c1661d8 100644 --- a/Ryujinx.HLE/HOS/Services/FspSrv/FileSystemType.cs +++ b/Ryujinx.HLE/HOS/Services/Fs/Types/FileSystemType.cs @@ -1,4 +1,4 @@ -namespace Ryujinx.HLE.HOS.Services.FspSrv +namespace Ryujinx.HLE.HOS.Services.Fs { enum FileSystemType { diff --git a/Ryujinx.HLE/HOS/Services/Grc/IGrcService.cs b/Ryujinx.HLE/HOS/Services/Grc/IGrcService.cs new file mode 100644 index 0000000000..90646b4068 --- /dev/null +++ b/Ryujinx.HLE/HOS/Services/Grc/IGrcService.cs @@ -0,0 +1,8 @@ +namespace Ryujinx.HLE.HOS.Services.Grc +{ + [Service("grc:c")] // 4.0.0+ + class IGrcService : IpcService + { + public IGrcService(ServiceCtx context) { } + } +} \ No newline at end of file diff --git a/Ryujinx.HLE/HOS/Services/Grc/IRemoteVideoTransfer.cs b/Ryujinx.HLE/HOS/Services/Grc/IRemoteVideoTransfer.cs new file mode 100644 index 0000000000..edb1d64e14 --- /dev/null +++ b/Ryujinx.HLE/HOS/Services/Grc/IRemoteVideoTransfer.cs @@ -0,0 +1,8 @@ +namespace Ryujinx.HLE.HOS.Services.Grc +{ + [Service("grc:d")] // 6.0.0+ + class IRemoteVideoTransfer : IpcService + { + public IRemoteVideoTransfer(ServiceCtx context) { } + } +} \ No newline at end of file diff --git a/Ryujinx.HLE/HOS/Services/Hid/HidNpad.cs b/Ryujinx.HLE/HOS/Services/Hid/HidNpad.cs deleted file mode 100644 index b258120234..0000000000 --- a/Ryujinx.HLE/HOS/Services/Hid/HidNpad.cs +++ /dev/null @@ -1,41 +0,0 @@ -using System; - -namespace Ryujinx.HLE.HOS.Services.Hid -{ - public enum HidNpadJoyAssignmentMode - { - Dual, - Single - } - - public enum HidNpadHandheldActivationMode - { - Dual, - Single, - None - } - - public enum HidNpadJoyDeviceType - { - Left, - Right - } - - public enum HidNpadJoyHoldType - { - Vertical, - Horizontal - } - - [Flags] - public enum HidNpadStyle - { - None, - FullKey = 1 << 0, - Handheld = 1 << 1, - Dual = 1 << 2, - Left = 1 << 3, - Right = 1 << 4, - Invalid = 1 << 5 - } -} \ No newline at end of file diff --git a/Ryujinx.HLE/HOS/Services/Hid/HidServer/HidUtils.cs b/Ryujinx.HLE/HOS/Services/Hid/HidServer/HidUtils.cs new file mode 100644 index 0000000000..c89ea3067b --- /dev/null +++ b/Ryujinx.HLE/HOS/Services/Hid/HidServer/HidUtils.cs @@ -0,0 +1,46 @@ +using Ryujinx.HLE.Input; +using System; + +namespace Ryujinx.HLE.HOS.Services.Hid.HidServer +{ + static class HidUtils + { + public static ControllerId GetIndexFromNpadIdType(HidNpadIdType npadIdType) + { + switch (npadIdType) + { + case HidNpadIdType.Player1: return ControllerId.ControllerPlayer1; + case HidNpadIdType.Player2: return ControllerId.ControllerPlayer2; + case HidNpadIdType.Player3: return ControllerId.ControllerPlayer3; + case HidNpadIdType.Player4: return ControllerId.ControllerPlayer4; + case HidNpadIdType.Player5: return ControllerId.ControllerPlayer5; + case HidNpadIdType.Player6: return ControllerId.ControllerPlayer6; + case HidNpadIdType.Player7: return ControllerId.ControllerPlayer7; + case HidNpadIdType.Player8: return ControllerId.ControllerPlayer8; + case HidNpadIdType.Handheld: return ControllerId.ControllerHandheld; + case HidNpadIdType.Unknown: return ControllerId.ControllerUnknown; + + default: throw new ArgumentOutOfRangeException(nameof(npadIdType)); + } + } + + public static HidNpadIdType GetNpadIdTypeFromIndex(ControllerId index) + { + switch (index) + { + case ControllerId.ControllerPlayer1: return HidNpadIdType.Player1; + case ControllerId.ControllerPlayer2: return HidNpadIdType.Player2; + case ControllerId.ControllerPlayer3: return HidNpadIdType.Player3; + case ControllerId.ControllerPlayer4: return HidNpadIdType.Player4; + case ControllerId.ControllerPlayer5: return HidNpadIdType.Player5; + case ControllerId.ControllerPlayer6: return HidNpadIdType.Player6; + case ControllerId.ControllerPlayer7: return HidNpadIdType.Player7; + case ControllerId.ControllerPlayer8: return HidNpadIdType.Player8; + case ControllerId.ControllerHandheld: return HidNpadIdType.Handheld; + case ControllerId.ControllerUnknown: return HidNpadIdType.Unknown; + + default: throw new ArgumentOutOfRangeException(nameof(index)); + } + } + } +} \ No newline at end of file diff --git a/Ryujinx.HLE/HOS/Services/Hid/IActiveVibrationDeviceList.cs b/Ryujinx.HLE/HOS/Services/Hid/HidServer/IActiveVibrationDeviceList.cs similarity index 89% rename from Ryujinx.HLE/HOS/Services/Hid/IActiveVibrationDeviceList.cs rename to Ryujinx.HLE/HOS/Services/Hid/HidServer/IActiveVibrationDeviceList.cs index 8aa623ee4a..4c2050f1c2 100644 --- a/Ryujinx.HLE/HOS/Services/Hid/IActiveVibrationDeviceList.cs +++ b/Ryujinx.HLE/HOS/Services/Hid/HidServer/IActiveVibrationDeviceList.cs @@ -1,4 +1,4 @@ -namespace Ryujinx.HLE.HOS.Services.Hid +namespace Ryujinx.HLE.HOS.Services.Hid.HidServer { class IActiveApplicationDeviceList : IpcService { diff --git a/Ryujinx.HLE/HOS/Services/Hid/IAppletResource.cs b/Ryujinx.HLE/HOS/Services/Hid/HidServer/IAppletResource.cs similarity index 94% rename from Ryujinx.HLE/HOS/Services/Hid/IAppletResource.cs rename to Ryujinx.HLE/HOS/Services/Hid/HidServer/IAppletResource.cs index 437ef082d6..2c3a6500a3 100644 --- a/Ryujinx.HLE/HOS/Services/Hid/IAppletResource.cs +++ b/Ryujinx.HLE/HOS/Services/Hid/HidServer/IAppletResource.cs @@ -3,7 +3,7 @@ using Ryujinx.HLE.HOS.Kernel.Common; using Ryujinx.HLE.HOS.Kernel.Memory; using System; -namespace Ryujinx.HLE.HOS.Services.Hid +namespace Ryujinx.HLE.HOS.Services.Hid.HidServer { class IAppletResource : IpcService { diff --git a/Ryujinx.HLE/HOS/Services/Hid/HidSixAxis.cs b/Ryujinx.HLE/HOS/Services/Hid/HidSixAxis.cs deleted file mode 100644 index 7c7ebcc4c8..0000000000 --- a/Ryujinx.HLE/HOS/Services/Hid/HidSixAxis.cs +++ /dev/null @@ -1,21 +0,0 @@ -namespace Ryujinx.HLE.HOS.Services.Hid -{ - public struct HidSensorFusionParameters - { - public float RevisePower; - public float ReviseRange; - } - - public struct HidAccelerometerParameters - { - public float X; - public float Y; - } - - public enum HidGyroscopeZeroDriftMode - { - Loose, - Standard, - Tight - } -} \ No newline at end of file diff --git a/Ryujinx.HLE/HOS/Services/Hid/HidUtils.cs b/Ryujinx.HLE/HOS/Services/Hid/HidUtils.cs deleted file mode 100644 index fd540c7c86..0000000000 --- a/Ryujinx.HLE/HOS/Services/Hid/HidUtils.cs +++ /dev/null @@ -1,46 +0,0 @@ -using Ryujinx.HLE.Input; -using System; - -namespace Ryujinx.HLE.HOS.Services.Hid -{ - static class HidUtils - { - public static ControllerId GetIndexFromNpadIdType(NpadIdType npadIdType) - { - switch (npadIdType) - { - case NpadIdType.Player1: return ControllerId.ControllerPlayer1; - case NpadIdType.Player2: return ControllerId.ControllerPlayer2; - case NpadIdType.Player3: return ControllerId.ControllerPlayer3; - case NpadIdType.Player4: return ControllerId.ControllerPlayer4; - case NpadIdType.Player5: return ControllerId.ControllerPlayer5; - case NpadIdType.Player6: return ControllerId.ControllerPlayer6; - case NpadIdType.Player7: return ControllerId.ControllerPlayer7; - case NpadIdType.Player8: return ControllerId.ControllerPlayer8; - case NpadIdType.Handheld: return ControllerId.ControllerHandheld; - case NpadIdType.Unknown: return ControllerId.ControllerUnknown; - - default: throw new ArgumentOutOfRangeException(nameof(npadIdType)); - } - } - - public static NpadIdType GetNpadIdTypeFromIndex(ControllerId index) - { - switch (index) - { - case ControllerId.ControllerPlayer1: return NpadIdType.Player1; - case ControllerId.ControllerPlayer2: return NpadIdType.Player2; - case ControllerId.ControllerPlayer3: return NpadIdType.Player3; - case ControllerId.ControllerPlayer4: return NpadIdType.Player4; - case ControllerId.ControllerPlayer5: return NpadIdType.Player5; - case ControllerId.ControllerPlayer6: return NpadIdType.Player6; - case ControllerId.ControllerPlayer7: return NpadIdType.Player7; - case ControllerId.ControllerPlayer8: return NpadIdType.Player8; - case ControllerId.ControllerHandheld: return NpadIdType.Handheld; - case ControllerId.ControllerUnknown: return NpadIdType.Unknown; - - default: throw new ArgumentOutOfRangeException(nameof(index)); - } - } - } -} \ No newline at end of file diff --git a/Ryujinx.HLE/HOS/Services/Hid/HidVibration.cs b/Ryujinx.HLE/HOS/Services/Hid/HidVibration.cs deleted file mode 100644 index 635c356cad..0000000000 --- a/Ryujinx.HLE/HOS/Services/Hid/HidVibration.cs +++ /dev/null @@ -1,29 +0,0 @@ -namespace Ryujinx.HLE.HOS.Services.Hid -{ - public enum HidVibrationDeviceType - { - None, - LinearResonantActuator - } - - public enum HidVibrationDevicePosition - { - None, - Left, - Right - } - - public struct HidVibrationDeviceValue - { - public HidVibrationDeviceType DeviceType; - public HidVibrationDevicePosition Position; - } - - public struct HidVibrationValue - { - public float AmplitudeLow; - public float FrequencyLow; - public float AmplitudeHigh; - public float FrequencyHigh; - } -} \ No newline at end of file diff --git a/Ryujinx.HLE/HOS/Services/Hid/IHidDebugServer.cs b/Ryujinx.HLE/HOS/Services/Hid/IHidDebugServer.cs new file mode 100644 index 0000000000..adaaa0123e --- /dev/null +++ b/Ryujinx.HLE/HOS/Services/Hid/IHidDebugServer.cs @@ -0,0 +1,8 @@ +namespace Ryujinx.HLE.HOS.Services.Hid +{ + [Service("hid:dbg")] + class IHidDebugServer : IpcService + { + public IHidDebugServer(ServiceCtx context) { } + } +} \ No newline at end of file diff --git a/Ryujinx.HLE/HOS/Services/Hid/IHidServer.cs b/Ryujinx.HLE/HOS/Services/Hid/IHidServer.cs index 9adc08c190..1af9baf872 100644 --- a/Ryujinx.HLE/HOS/Services/Hid/IHidServer.cs +++ b/Ryujinx.HLE/HOS/Services/Hid/IHidServer.cs @@ -2,6 +2,7 @@ using Ryujinx.Common.Logging; using Ryujinx.HLE.HOS.Ipc; using Ryujinx.HLE.HOS.Kernel.Common; using Ryujinx.HLE.HOS.Kernel.Threading; +using Ryujinx.HLE.HOS.Services.Hid.HidServer; using Ryujinx.HLE.Input; using System; diff --git a/Ryujinx.HLE/HOS/Services/Hid/IHidSystemServer.cs b/Ryujinx.HLE/HOS/Services/Hid/IHidSystemServer.cs new file mode 100644 index 0000000000..019e995440 --- /dev/null +++ b/Ryujinx.HLE/HOS/Services/Hid/IHidSystemServer.cs @@ -0,0 +1,8 @@ +namespace Ryujinx.HLE.HOS.Services.Hid +{ + [Service("hid:sys")] + class IHidSystemServer : IpcService + { + public IHidSystemServer(ServiceCtx context) { } + } +} \ No newline at end of file diff --git a/Ryujinx.HLE/HOS/Services/Hid/IHidbusServer.cs b/Ryujinx.HLE/HOS/Services/Hid/IHidbusServer.cs new file mode 100644 index 0000000000..bfd1d4dcdf --- /dev/null +++ b/Ryujinx.HLE/HOS/Services/Hid/IHidbusServer.cs @@ -0,0 +1,8 @@ +namespace Ryujinx.HLE.HOS.Services.Hid +{ + [Service("hidbus")] + class IHidbusServer : IpcService + { + public IHidbusServer(ServiceCtx context) { } + } +} \ No newline at end of file diff --git a/Ryujinx.HLE/HOS/Services/Hid/ISystemServer.cs b/Ryujinx.HLE/HOS/Services/Hid/ISystemServer.cs new file mode 100644 index 0000000000..7135334420 --- /dev/null +++ b/Ryujinx.HLE/HOS/Services/Hid/ISystemServer.cs @@ -0,0 +1,8 @@ +namespace Ryujinx.HLE.HOS.Services.Hid +{ + [Service("xcd:sys")] + class ISystemServer : IpcService + { + public ISystemServer(ServiceCtx context) { } + } +} \ No newline at end of file diff --git a/Ryujinx.HLE/HOS/Services/Hid/Irs/IIrSensorServer.cs b/Ryujinx.HLE/HOS/Services/Hid/Irs/IIrSensorServer.cs index d2991d0fd0..cd571f11e4 100644 --- a/Ryujinx.HLE/HOS/Services/Hid/Irs/IIrSensorServer.cs +++ b/Ryujinx.HLE/HOS/Services/Hid/Irs/IIrSensorServer.cs @@ -1,6 +1,7 @@ using Ryujinx.Common.Logging; using Ryujinx.HLE.HOS.Ipc; using Ryujinx.HLE.HOS.Kernel.Common; +using Ryujinx.HLE.HOS.Services.Hid.HidServer; using Ryujinx.HLE.Input; using System; @@ -56,11 +57,11 @@ namespace Ryujinx.HLE.HOS.Services.Hid.Irs // GetNpadIrCameraHandle(u32) -> nn::irsensor::IrCameraHandle public ResultCode GetNpadIrCameraHandle(ServiceCtx context) { - NpadIdType npadIdType = (NpadIdType)context.RequestData.ReadUInt32(); + HidNpadIdType npadIdType = (HidNpadIdType)context.RequestData.ReadUInt32(); - if (npadIdType > NpadIdType.Player8 && - npadIdType != NpadIdType.Unknown && - npadIdType != NpadIdType.Handheld) + if (npadIdType > HidNpadIdType.Player8 && + npadIdType != HidNpadIdType.Unknown && + npadIdType != HidNpadIdType.Handheld) { return ResultCode.NpadIdOutOfRange; } diff --git a/Ryujinx.HLE/HOS/Services/Hid/Irs/IIrSensorSystemServer.cs b/Ryujinx.HLE/HOS/Services/Hid/Irs/IIrSensorSystemServer.cs new file mode 100644 index 0000000000..99fcd5415d --- /dev/null +++ b/Ryujinx.HLE/HOS/Services/Hid/Irs/IIrSensorSystemServer.cs @@ -0,0 +1,8 @@ +namespace Ryujinx.HLE.HOS.Services.Hid.Irs +{ + [Service("irs:sys")] + class IIrSensorSystemServer : IpcService + { + public IIrSensorSystemServer(ServiceCtx context) { } + } +} \ No newline at end of file diff --git a/Ryujinx.HLE/HOS/Services/Hid/Types/Npad/HidNpadHandheldActivationMode.cs b/Ryujinx.HLE/HOS/Services/Hid/Types/Npad/HidNpadHandheldActivationMode.cs new file mode 100644 index 0000000000..0aa8334d82 --- /dev/null +++ b/Ryujinx.HLE/HOS/Services/Hid/Types/Npad/HidNpadHandheldActivationMode.cs @@ -0,0 +1,9 @@ +namespace Ryujinx.HLE.HOS.Services.Hid +{ + public enum HidNpadHandheldActivationMode + { + Dual, + Single, + None + } +} \ No newline at end of file diff --git a/Ryujinx.HLE/HOS/Services/Hid/NpadIdType.cs b/Ryujinx.HLE/HOS/Services/Hid/Types/Npad/HidNpadIdType.cs similarity index 90% rename from Ryujinx.HLE/HOS/Services/Hid/NpadIdType.cs rename to Ryujinx.HLE/HOS/Services/Hid/Types/Npad/HidNpadIdType.cs index 5f6a68cb05..9a3989de66 100644 --- a/Ryujinx.HLE/HOS/Services/Hid/NpadIdType.cs +++ b/Ryujinx.HLE/HOS/Services/Hid/Types/Npad/HidNpadIdType.cs @@ -1,6 +1,6 @@ namespace Ryujinx.HLE.HOS.Services.Hid { - public enum NpadIdType + public enum HidNpadIdType { Player1 = 0, Player2 = 1, diff --git a/Ryujinx.HLE/HOS/Services/Hid/Types/Npad/HidNpadJoyAssignmentMode.cs b/Ryujinx.HLE/HOS/Services/Hid/Types/Npad/HidNpadJoyAssignmentMode.cs new file mode 100644 index 0000000000..a2e22661de --- /dev/null +++ b/Ryujinx.HLE/HOS/Services/Hid/Types/Npad/HidNpadJoyAssignmentMode.cs @@ -0,0 +1,8 @@ +namespace Ryujinx.HLE.HOS.Services.Hid +{ + public enum HidNpadJoyAssignmentMode + { + Dual, + Single + } +} \ No newline at end of file diff --git a/Ryujinx.HLE/HOS/Services/Hid/Types/Npad/HidNpadJoyDeviceType.cs b/Ryujinx.HLE/HOS/Services/Hid/Types/Npad/HidNpadJoyDeviceType.cs new file mode 100644 index 0000000000..d0b34def2e --- /dev/null +++ b/Ryujinx.HLE/HOS/Services/Hid/Types/Npad/HidNpadJoyDeviceType.cs @@ -0,0 +1,8 @@ +namespace Ryujinx.HLE.HOS.Services.Hid +{ + public enum HidNpadJoyDeviceType + { + Left, + Right + } +} \ No newline at end of file diff --git a/Ryujinx.HLE/HOS/Services/Hid/Types/Npad/HidNpadJoyHoldType.cs b/Ryujinx.HLE/HOS/Services/Hid/Types/Npad/HidNpadJoyHoldType.cs new file mode 100644 index 0000000000..3bd3aa914d --- /dev/null +++ b/Ryujinx.HLE/HOS/Services/Hid/Types/Npad/HidNpadJoyHoldType.cs @@ -0,0 +1,8 @@ +namespace Ryujinx.HLE.HOS.Services.Hid +{ + public enum HidNpadJoyHoldType + { + Vertical, + Horizontal + } +} \ No newline at end of file diff --git a/Ryujinx.HLE/HOS/Services/Hid/Types/Npad/HidNpadStyle.cs b/Ryujinx.HLE/HOS/Services/Hid/Types/Npad/HidNpadStyle.cs new file mode 100644 index 0000000000..93717acf16 --- /dev/null +++ b/Ryujinx.HLE/HOS/Services/Hid/Types/Npad/HidNpadStyle.cs @@ -0,0 +1,16 @@ +using System; + +namespace Ryujinx.HLE.HOS.Services.Hid +{ + [Flags] + public enum HidNpadStyle + { + None, + FullKey = 1 << 0, + Handheld = 1 << 1, + Dual = 1 << 2, + Left = 1 << 3, + Right = 1 << 4, + Invalid = 1 << 5 + } +} \ No newline at end of file diff --git a/Ryujinx.HLE/HOS/Services/Hid/Types/SixAxis/HidAccelerometerParameters.cs b/Ryujinx.HLE/HOS/Services/Hid/Types/SixAxis/HidAccelerometerParameters.cs new file mode 100644 index 0000000000..fe7e4cc938 --- /dev/null +++ b/Ryujinx.HLE/HOS/Services/Hid/Types/SixAxis/HidAccelerometerParameters.cs @@ -0,0 +1,8 @@ +namespace Ryujinx.HLE.HOS.Services.Hid +{ + public struct HidAccelerometerParameters + { + public float X; + public float Y; + } +} \ No newline at end of file diff --git a/Ryujinx.HLE/HOS/Services/Hid/Types/SixAxis/HidGyroscopeZeroDriftMode.cs b/Ryujinx.HLE/HOS/Services/Hid/Types/SixAxis/HidGyroscopeZeroDriftMode.cs new file mode 100644 index 0000000000..cd3aa3180c --- /dev/null +++ b/Ryujinx.HLE/HOS/Services/Hid/Types/SixAxis/HidGyroscopeZeroDriftMode.cs @@ -0,0 +1,9 @@ +namespace Ryujinx.HLE.HOS.Services.Hid +{ + public enum HidGyroscopeZeroDriftMode + { + Loose, + Standard, + Tight + } +} \ No newline at end of file diff --git a/Ryujinx.HLE/HOS/Services/Hid/Types/SixAxis/HidSensorFusionParameters.cs b/Ryujinx.HLE/HOS/Services/Hid/Types/SixAxis/HidSensorFusionParameters.cs new file mode 100644 index 0000000000..cadf5ec021 --- /dev/null +++ b/Ryujinx.HLE/HOS/Services/Hid/Types/SixAxis/HidSensorFusionParameters.cs @@ -0,0 +1,8 @@ +namespace Ryujinx.HLE.HOS.Services.Hid +{ + public struct HidSensorFusionParameters + { + public float RevisePower; + public float ReviseRange; + } +} \ No newline at end of file diff --git a/Ryujinx.HLE/HOS/Services/Hid/Types/Vibration/HidVibrationDevicePosition.cs b/Ryujinx.HLE/HOS/Services/Hid/Types/Vibration/HidVibrationDevicePosition.cs new file mode 100644 index 0000000000..0ab84af3d6 --- /dev/null +++ b/Ryujinx.HLE/HOS/Services/Hid/Types/Vibration/HidVibrationDevicePosition.cs @@ -0,0 +1,9 @@ +namespace Ryujinx.HLE.HOS.Services.Hid +{ + public enum HidVibrationDevicePosition + { + None, + Left, + Right + } +} \ No newline at end of file diff --git a/Ryujinx.HLE/HOS/Services/Hid/Types/Vibration/HidVibrationDeviceType.cs b/Ryujinx.HLE/HOS/Services/Hid/Types/Vibration/HidVibrationDeviceType.cs new file mode 100644 index 0000000000..cf9e64985c --- /dev/null +++ b/Ryujinx.HLE/HOS/Services/Hid/Types/Vibration/HidVibrationDeviceType.cs @@ -0,0 +1,8 @@ +namespace Ryujinx.HLE.HOS.Services.Hid +{ + public enum HidVibrationDeviceType + { + None, + LinearResonantActuator + } +} \ No newline at end of file diff --git a/Ryujinx.HLE/HOS/Services/Hid/Types/Vibration/HidVibrationDeviceValue.cs b/Ryujinx.HLE/HOS/Services/Hid/Types/Vibration/HidVibrationDeviceValue.cs new file mode 100644 index 0000000000..7905ecfdc0 --- /dev/null +++ b/Ryujinx.HLE/HOS/Services/Hid/Types/Vibration/HidVibrationDeviceValue.cs @@ -0,0 +1,8 @@ +namespace Ryujinx.HLE.HOS.Services.Hid +{ + public struct HidVibrationDeviceValue + { + public HidVibrationDeviceType DeviceType; + public HidVibrationDevicePosition Position; + } +} \ No newline at end of file diff --git a/Ryujinx.HLE/HOS/Services/Hid/Types/Vibration/HidVibrationValue.cs b/Ryujinx.HLE/HOS/Services/Hid/Types/Vibration/HidVibrationValue.cs new file mode 100644 index 0000000000..7211396e42 --- /dev/null +++ b/Ryujinx.HLE/HOS/Services/Hid/Types/Vibration/HidVibrationValue.cs @@ -0,0 +1,10 @@ +namespace Ryujinx.HLE.HOS.Services.Hid +{ + public struct HidVibrationValue + { + public float AmplitudeLow; + public float FrequencyLow; + public float AmplitudeHigh; + public float FrequencyHigh; + } +} \ No newline at end of file diff --git a/Ryujinx.HLE/HOS/Services/Ins/IReceiverManager.cs b/Ryujinx.HLE/HOS/Services/Ins/IReceiverManager.cs new file mode 100644 index 0000000000..34d4bdfd78 --- /dev/null +++ b/Ryujinx.HLE/HOS/Services/Ins/IReceiverManager.cs @@ -0,0 +1,8 @@ +namespace Ryujinx.HLE.HOS.Services.Ins +{ + [Service("ins:r")] + class IReceiverManager : IpcService + { + public IReceiverManager(ServiceCtx context) { } + } +} \ No newline at end of file diff --git a/Ryujinx.HLE/HOS/Services/Ins/ISenderManager.cs b/Ryujinx.HLE/HOS/Services/Ins/ISenderManager.cs new file mode 100644 index 0000000000..38a95ee7b1 --- /dev/null +++ b/Ryujinx.HLE/HOS/Services/Ins/ISenderManager.cs @@ -0,0 +1,8 @@ +namespace Ryujinx.HLE.HOS.Services.Ins +{ + [Service("ins:s")] + class ISenderManager : IpcService + { + public ISenderManager(ServiceCtx context) { } + } +} \ No newline at end of file diff --git a/Ryujinx.HLE/HOS/Services/Lbl/ILblController.cs b/Ryujinx.HLE/HOS/Services/Lbl/ILblController.cs new file mode 100644 index 0000000000..de84095ee9 --- /dev/null +++ b/Ryujinx.HLE/HOS/Services/Lbl/ILblController.cs @@ -0,0 +1,8 @@ +namespace Ryujinx.HLE.HOS.Services.Lbl +{ + [Service("lbl")] + class ILblController : IpcService + { + public ILblController(ServiceCtx context) { } + } +} \ No newline at end of file diff --git a/Ryujinx.HLE/HOS/Services/Ldn/IMonitorServiceCreator.cs b/Ryujinx.HLE/HOS/Services/Ldn/IMonitorServiceCreator.cs new file mode 100644 index 0000000000..09dfa78faa --- /dev/null +++ b/Ryujinx.HLE/HOS/Services/Ldn/IMonitorServiceCreator.cs @@ -0,0 +1,8 @@ +namespace Ryujinx.HLE.HOS.Services.Ldn +{ + [Service("ldn:m")] + class IMonitorServiceCreator : IpcService + { + public IMonitorServiceCreator(ServiceCtx context) { } + } +} \ No newline at end of file diff --git a/Ryujinx.HLE/HOS/Services/Ldn/ISystemServiceCreator.cs b/Ryujinx.HLE/HOS/Services/Ldn/ISystemServiceCreator.cs new file mode 100644 index 0000000000..b4dac449e7 --- /dev/null +++ b/Ryujinx.HLE/HOS/Services/Ldn/ISystemServiceCreator.cs @@ -0,0 +1,8 @@ +namespace Ryujinx.HLE.HOS.Services.Ldn +{ + [Service("ldn:s")] + class ISystemServiceCreator : IpcService + { + public ISystemServiceCreator(ServiceCtx context) { } + } +} \ No newline at end of file diff --git a/Ryujinx.HLE/HOS/Services/Ldn/IUserServiceCreator.cs b/Ryujinx.HLE/HOS/Services/Ldn/IUserServiceCreator.cs new file mode 100644 index 0000000000..052727dd34 --- /dev/null +++ b/Ryujinx.HLE/HOS/Services/Ldn/IUserServiceCreator.cs @@ -0,0 +1,8 @@ +namespace Ryujinx.HLE.HOS.Services.Ldn +{ + [Service("ldn:u")] + class IUserServiceCreator : IpcService + { + public IUserServiceCreator(ServiceCtx context) { } + } +} \ No newline at end of file diff --git a/Ryujinx.HLE/HOS/Services/Ldn/Lp2p/IServiceCreator.cs b/Ryujinx.HLE/HOS/Services/Ldn/Lp2p/IServiceCreator.cs new file mode 100644 index 0000000000..9c9ee3be2e --- /dev/null +++ b/Ryujinx.HLE/HOS/Services/Ldn/Lp2p/IServiceCreator.cs @@ -0,0 +1,9 @@ +namespace Ryujinx.HLE.HOS.Services.Ldn.Lp2p +{ + [Service("lp2p:app")] // 9.0.0+ + [Service("lp2p:sys")] // 9.0.0+ + class IServiceCreator : IpcService + { + public IServiceCreator(ServiceCtx context) { } + } +} \ No newline at end of file diff --git a/Ryujinx.HLE/HOS/Services/Ldr/IDebugMonitorInterface.cs b/Ryujinx.HLE/HOS/Services/Ldr/IDebugMonitorInterface.cs new file mode 100644 index 0000000000..d87234da5e --- /dev/null +++ b/Ryujinx.HLE/HOS/Services/Ldr/IDebugMonitorInterface.cs @@ -0,0 +1,8 @@ +namespace Ryujinx.HLE.HOS.Services.Ldr +{ + [Service("ldr:dmnt")] + class IDebugMonitorInterface : IpcService + { + public IDebugMonitorInterface(ServiceCtx context) { } + } +} \ No newline at end of file diff --git a/Ryujinx.HLE/HOS/Services/Ldr/IProcessManagerInterface.cs b/Ryujinx.HLE/HOS/Services/Ldr/IProcessManagerInterface.cs new file mode 100644 index 0000000000..9f5b5e357c --- /dev/null +++ b/Ryujinx.HLE/HOS/Services/Ldr/IProcessManagerInterface.cs @@ -0,0 +1,8 @@ +namespace Ryujinx.HLE.HOS.Services.Ldr +{ + [Service("ldr:pm")] + class IProcessManagerInterface : IpcService + { + public IProcessManagerInterface(ServiceCtx context) { } + } +} \ No newline at end of file diff --git a/Ryujinx.HLE/HOS/Services/Ldr/IRoInterface.cs b/Ryujinx.HLE/HOS/Services/Ldr/IRoInterface.cs index 748a600d51..b5ef0f07e6 100644 --- a/Ryujinx.HLE/HOS/Services/Ldr/IRoInterface.cs +++ b/Ryujinx.HLE/HOS/Services/Ldr/IRoInterface.cs @@ -1,6 +1,5 @@ using ARMeilleure.Memory; using Ryujinx.Common; -using Ryujinx.HLE.HOS.Ipc; using Ryujinx.HLE.HOS.Kernel.Common; using Ryujinx.HLE.HOS.Kernel.Memory; using Ryujinx.HLE.HOS.Kernel.Process; @@ -9,91 +8,12 @@ using Ryujinx.HLE.Utilities; using System.Collections.Generic; using System.IO; using System.Linq; -using System.Runtime.InteropServices; using System.Security.Cryptography; namespace Ryujinx.HLE.HOS.Services.Ldr { - [StructLayout(LayoutKind.Explicit, Size = 0x350)] - unsafe struct NrrHeader - { - [FieldOffset(0)] - public uint Magic; - - [FieldOffset(0x10)] - public ulong TitleIdMask; - - [FieldOffset(0x18)] - public ulong TitleIdPattern; - - [FieldOffset(0x30)] - public fixed byte Modulus[0x100]; - - [FieldOffset(0x130)] - public fixed byte FixedKeySignature[0x100]; - - [FieldOffset(0x230)] - public fixed byte NrrSignature[0x100]; - - [FieldOffset(0x330)] - public ulong TitleIdMin; - - [FieldOffset(0x338)] - public uint NrrSize; - - [FieldOffset(0x340)] - public uint HashOffset; - - [FieldOffset(0x344)] - public uint HashCount; - } - - class NrrInfo - { - public NrrHeader Header { get; private set; } - public List Hashes { get; private set; } - public long NrrAddress { get; private set; } - - public NrrInfo(long nrrAddress, NrrHeader header, List hashes) - { - NrrAddress = nrrAddress; - Header = header; - Hashes = hashes; - } - } - - class NroInfo - { - public NxRelocatableObject Executable { get; private set; } - - public byte[] Hash { get; private set; } - public ulong NroAddress { get; private set; } - public ulong NroSize { get; private set; } - public ulong BssAddress { get; private set; } - public ulong BssSize { get; private set; } - public ulong TotalSize { get; private set; } - public ulong NroMappedAddress { get; set; } - - public NroInfo( - NxRelocatableObject executable, - byte[] hash, - ulong nroAddress, - ulong nroSize, - ulong bssAddress, - ulong bssSize, - ulong totalSize) - { - Executable = executable; - Hash = hash; - NroAddress = nroAddress; - NroSize = nroSize; - BssAddress = bssAddress; - BssSize = bssSize; - TotalSize = totalSize; - } - } - [Service("ldr:ro")] + [Service("ro:1")] // 7.0.0+ class IRoInterface : IpcService { private const int MaxNrr = 0x40; diff --git a/Ryujinx.HLE/HOS/Services/Ldr/IShellInterface.cs b/Ryujinx.HLE/HOS/Services/Ldr/IShellInterface.cs new file mode 100644 index 0000000000..856aec5216 --- /dev/null +++ b/Ryujinx.HLE/HOS/Services/Ldr/IShellInterface.cs @@ -0,0 +1,8 @@ +namespace Ryujinx.HLE.HOS.Services.Ldr +{ + [Service("ldr:shel")] + class IShellInterface : IpcService + { + public IShellInterface(ServiceCtx context) { } + } +} \ No newline at end of file diff --git a/Ryujinx.HLE/HOS/Services/Ldr/Types/NroInfo.cs b/Ryujinx.HLE/HOS/Services/Ldr/Types/NroInfo.cs new file mode 100644 index 0000000000..c65d54134e --- /dev/null +++ b/Ryujinx.HLE/HOS/Services/Ldr/Types/NroInfo.cs @@ -0,0 +1,35 @@ +using Ryujinx.HLE.Loaders.Executables; + +namespace Ryujinx.HLE.HOS.Services.Ldr +{ + class NroInfo + { + public NxRelocatableObject Executable { get; private set; } + + public byte[] Hash { get; private set; } + public ulong NroAddress { get; private set; } + public ulong NroSize { get; private set; } + public ulong BssAddress { get; private set; } + public ulong BssSize { get; private set; } + public ulong TotalSize { get; private set; } + public ulong NroMappedAddress { get; set; } + + public NroInfo( + NxRelocatableObject executable, + byte[] hash, + ulong nroAddress, + ulong nroSize, + ulong bssAddress, + ulong bssSize, + ulong totalSize) + { + Executable = executable; + Hash = hash; + NroAddress = nroAddress; + NroSize = nroSize; + BssAddress = bssAddress; + BssSize = bssSize; + TotalSize = totalSize; + } + } +} \ No newline at end of file diff --git a/Ryujinx.HLE/HOS/Services/Ldr/Types/NrrHeader.cs b/Ryujinx.HLE/HOS/Services/Ldr/Types/NrrHeader.cs new file mode 100644 index 0000000000..a0764d1fd5 --- /dev/null +++ b/Ryujinx.HLE/HOS/Services/Ldr/Types/NrrHeader.cs @@ -0,0 +1,38 @@ +using System.Runtime.InteropServices; + +namespace Ryujinx.HLE.HOS.Services.Ldr +{ + [StructLayout(LayoutKind.Explicit, Size = 0x350)] + unsafe struct NrrHeader + { + [FieldOffset(0)] + public uint Magic; + + [FieldOffset(0x10)] + public ulong TitleIdMask; + + [FieldOffset(0x18)] + public ulong TitleIdPattern; + + [FieldOffset(0x30)] + public fixed byte Modulus[0x100]; + + [FieldOffset(0x130)] + public fixed byte FixedKeySignature[0x100]; + + [FieldOffset(0x230)] + public fixed byte NrrSignature[0x100]; + + [FieldOffset(0x330)] + public ulong TitleIdMin; + + [FieldOffset(0x338)] + public uint NrrSize; + + [FieldOffset(0x340)] + public uint HashOffset; + + [FieldOffset(0x344)] + public uint HashCount; + } +} \ No newline at end of file diff --git a/Ryujinx.HLE/HOS/Services/Ldr/Types/NrrInfo.cs b/Ryujinx.HLE/HOS/Services/Ldr/Types/NrrInfo.cs new file mode 100644 index 0000000000..3636ce3397 --- /dev/null +++ b/Ryujinx.HLE/HOS/Services/Ldr/Types/NrrInfo.cs @@ -0,0 +1,18 @@ +using System.Collections.Generic; + +namespace Ryujinx.HLE.HOS.Services.Ldr +{ + class NrrInfo + { + public NrrHeader Header { get; private set; } + public List Hashes { get; private set; } + public long NrrAddress { get; private set; } + + public NrrInfo(long nrrAddress, NrrHeader header, List hashes) + { + NrrAddress = nrrAddress; + Header = header; + Hashes = hashes; + } + } +} \ No newline at end of file diff --git a/Ryujinx.HLE/HOS/Services/Lm/ILogService.cs b/Ryujinx.HLE/HOS/Services/Lm/ILogService.cs index 019cd7d41a..9fc467663a 100644 --- a/Ryujinx.HLE/HOS/Services/Lm/ILogService.cs +++ b/Ryujinx.HLE/HOS/Services/Lm/ILogService.cs @@ -1,3 +1,5 @@ +using Ryujinx.HLE.HOS.Services.Lm.LogService; + namespace Ryujinx.HLE.HOS.Services.Lm { [Service("lm")] diff --git a/Ryujinx.HLE/HOS/Services/Lm/ILogger.cs b/Ryujinx.HLE/HOS/Services/Lm/LogService/ILogger.cs similarity index 98% rename from Ryujinx.HLE/HOS/Services/Lm/ILogger.cs rename to Ryujinx.HLE/HOS/Services/Lm/LogService/ILogger.cs index 4b297760fd..357a13324a 100644 --- a/Ryujinx.HLE/HOS/Services/Lm/ILogger.cs +++ b/Ryujinx.HLE/HOS/Services/Lm/LogService/ILogger.cs @@ -2,7 +2,7 @@ using Ryujinx.Common.Logging; using System.IO; using System.Text; -namespace Ryujinx.HLE.HOS.Services.Lm +namespace Ryujinx.HLE.HOS.Services.Lm.LogService { class ILogger : IpcService { diff --git a/Ryujinx.HLE/HOS/Services/Lm/LmLogField.cs b/Ryujinx.HLE/HOS/Services/Lm/LogService/Types/LmLogField.cs similarity index 86% rename from Ryujinx.HLE/HOS/Services/Lm/LmLogField.cs rename to Ryujinx.HLE/HOS/Services/Lm/LogService/Types/LmLogField.cs index 9547463466..3f93e16761 100644 --- a/Ryujinx.HLE/HOS/Services/Lm/LmLogField.cs +++ b/Ryujinx.HLE/HOS/Services/Lm/LogService/Types/LmLogField.cs @@ -1,4 +1,4 @@ -namespace Ryujinx.HLE.HOS.Services.Lm +namespace Ryujinx.HLE.HOS.Services.Lm.LogService { enum LmLogField { diff --git a/Ryujinx.HLE/HOS/Services/Lm/LmLogLevel.cs b/Ryujinx.HLE/HOS/Services/Lm/LogService/Types/LmLogLevel.cs similarity index 69% rename from Ryujinx.HLE/HOS/Services/Lm/LmLogLevel.cs rename to Ryujinx.HLE/HOS/Services/Lm/LogService/Types/LmLogLevel.cs index 70554c42c0..ee1a8396ab 100644 --- a/Ryujinx.HLE/HOS/Services/Lm/LmLogLevel.cs +++ b/Ryujinx.HLE/HOS/Services/Lm/LogService/Types/LmLogLevel.cs @@ -1,4 +1,4 @@ -namespace Ryujinx.HLE.HOS.Services.Lm +namespace Ryujinx.HLE.HOS.Services.Lm.LogService { enum LmLogLevel { diff --git a/Ryujinx.HLE/HOS/Services/Mig/IService.cs b/Ryujinx.HLE/HOS/Services/Mig/IService.cs new file mode 100644 index 0000000000..2f6eb99eeb --- /dev/null +++ b/Ryujinx.HLE/HOS/Services/Mig/IService.cs @@ -0,0 +1,8 @@ +namespace Ryujinx.HLE.HOS.Services.Mig +{ + [Service("mig:usr")] // 4.0.0+ + class IService : IpcService + { + public IService(ServiceCtx context) { } + } +} \ No newline at end of file diff --git a/Ryujinx.HLE/HOS/Services/Ncm/IContentStorage.cs b/Ryujinx.HLE/HOS/Services/Ncm/IContentStorage.cs deleted file mode 100644 index 5bfbe4db8f..0000000000 --- a/Ryujinx.HLE/HOS/Services/Ncm/IContentStorage.cs +++ /dev/null @@ -1,7 +0,0 @@ -namespace Ryujinx.HLE.HOS.Services.Ncm -{ - class IContentStorage : IpcService - { - public IContentStorage() { } - } -} \ No newline at end of file diff --git a/Ryujinx.HLE/HOS/Services/Lr/ILocationResolverManager.cs b/Ryujinx.HLE/HOS/Services/Ncm/Lr/ILocationResolverManager.cs similarity index 82% rename from Ryujinx.HLE/HOS/Services/Lr/ILocationResolverManager.cs rename to Ryujinx.HLE/HOS/Services/Ncm/Lr/ILocationResolverManager.cs index 14ed0ca787..44b8272b13 100644 --- a/Ryujinx.HLE/HOS/Services/Lr/ILocationResolverManager.cs +++ b/Ryujinx.HLE/HOS/Services/Ncm/Lr/ILocationResolverManager.cs @@ -1,6 +1,7 @@ using Ryujinx.HLE.FileSystem; +using Ryujinx.HLE.HOS.Services.Ncm.Lr.LocationResolverManager; -namespace Ryujinx.HLE.HOS.Services.Lr +namespace Ryujinx.HLE.HOS.Services.Ncm.Lr { [Service("lr")] class ILocationResolverManager : IpcService diff --git a/Ryujinx.HLE/HOS/Services/Lr/ILocationResolver.cs b/Ryujinx.HLE/HOS/Services/Ncm/Lr/LocationResolverManager/ILocationResolver.cs similarity index 99% rename from Ryujinx.HLE/HOS/Services/Lr/ILocationResolver.cs rename to Ryujinx.HLE/HOS/Services/Ncm/Lr/LocationResolverManager/ILocationResolver.cs index 1eb38d0565..d77bac7383 100644 --- a/Ryujinx.HLE/HOS/Services/Lr/ILocationResolver.cs +++ b/Ryujinx.HLE/HOS/Services/Ncm/Lr/LocationResolverManager/ILocationResolver.cs @@ -5,7 +5,7 @@ using System.Text; using static Ryujinx.HLE.Utilities.StringUtils; -namespace Ryujinx.HLE.HOS.Services.Lr +namespace Ryujinx.HLE.HOS.Services.Ncm.Lr.LocationResolverManager { class ILocationResolver : IpcService { diff --git a/Ryujinx.HLE/HOS/Services/Lr/ResultCode.cs b/Ryujinx.HLE/HOS/Services/Ncm/Lr/ResultCode.cs similarity index 85% rename from Ryujinx.HLE/HOS/Services/Lr/ResultCode.cs rename to Ryujinx.HLE/HOS/Services/Ncm/Lr/ResultCode.cs index 10c42cd653..5ff7e46621 100644 --- a/Ryujinx.HLE/HOS/Services/Lr/ResultCode.cs +++ b/Ryujinx.HLE/HOS/Services/Ncm/Lr/ResultCode.cs @@ -1,4 +1,4 @@ -namespace Ryujinx.HLE.HOS.Services.Lr +namespace Ryujinx.HLE.HOS.Services.Ncm.Lr { enum ResultCode { diff --git a/Ryujinx.HLE/HOS/Services/News/IServiceCreator.cs b/Ryujinx.HLE/HOS/Services/News/IServiceCreator.cs new file mode 100644 index 0000000000..7ea89b20d0 --- /dev/null +++ b/Ryujinx.HLE/HOS/Services/News/IServiceCreator.cs @@ -0,0 +1,12 @@ +namespace Ryujinx.HLE.HOS.Services.News +{ + [Service("news:a")] + [Service("news:c")] + [Service("news:m")] + [Service("news:p")] + [Service("news:v")] + class IServiceCreator : IpcService + { + public IServiceCreator(ServiceCtx context) { } + } +} \ No newline at end of file diff --git a/Ryujinx.HLE/HOS/Services/Nfc/IAmManager.cs b/Ryujinx.HLE/HOS/Services/Nfc/IAmManager.cs new file mode 100644 index 0000000000..33932568df --- /dev/null +++ b/Ryujinx.HLE/HOS/Services/Nfc/IAmManager.cs @@ -0,0 +1,8 @@ +namespace Ryujinx.HLE.HOS.Services.Nfc +{ + [Service("nfc:am")] + class IAmManager : IpcService + { + public IAmManager(ServiceCtx context) { } + } +} \ No newline at end of file diff --git a/Ryujinx.HLE/HOS/Services/Nfc/ISystemManager.cs b/Ryujinx.HLE/HOS/Services/Nfc/ISystemManager.cs new file mode 100644 index 0000000000..0bab0b79a4 --- /dev/null +++ b/Ryujinx.HLE/HOS/Services/Nfc/ISystemManager.cs @@ -0,0 +1,8 @@ +namespace Ryujinx.HLE.HOS.Services.Nfc +{ + [Service("nfc:sys")] + class ISystemManager : IpcService + { + public ISystemManager(ServiceCtx context) { } + } +} \ No newline at end of file diff --git a/Ryujinx.HLE/HOS/Services/Nfc/IUserManager.cs b/Ryujinx.HLE/HOS/Services/Nfc/IUserManager.cs new file mode 100644 index 0000000000..048adf8ce7 --- /dev/null +++ b/Ryujinx.HLE/HOS/Services/Nfc/IUserManager.cs @@ -0,0 +1,8 @@ +namespace Ryujinx.HLE.HOS.Services.Nfc +{ + [Service("nfc:user")] + class IUserManager : IpcService + { + public IUserManager(ServiceCtx context) { } + } +} \ No newline at end of file diff --git a/Ryujinx.HLE/HOS/Services/Nfc/Mifare/IUserManager.cs b/Ryujinx.HLE/HOS/Services/Nfc/Mifare/IUserManager.cs new file mode 100644 index 0000000000..cc3cd3aa90 --- /dev/null +++ b/Ryujinx.HLE/HOS/Services/Nfc/Mifare/IUserManager.cs @@ -0,0 +1,8 @@ +namespace Ryujinx.HLE.HOS.Services.Nfc.Mifare +{ + [Service("nfc:mf:u")] + class IUserManager : IpcService + { + public IUserManager(ServiceCtx context) { } + } +} \ No newline at end of file diff --git a/Ryujinx.HLE/HOS/Services/Nfc/Nfp/IDebugManager.cs b/Ryujinx.HLE/HOS/Services/Nfc/Nfp/IDebugManager.cs new file mode 100644 index 0000000000..c5da8da9a1 --- /dev/null +++ b/Ryujinx.HLE/HOS/Services/Nfc/Nfp/IDebugManager.cs @@ -0,0 +1,8 @@ +namespace Ryujinx.HLE.HOS.Services.Nfc.Nfp +{ + [Service("nfp:dbg")] + class IAmManager : IpcService + { + public IAmManager(ServiceCtx context) { } + } +} \ No newline at end of file diff --git a/Ryujinx.HLE/HOS/Services/Nfc/Nfp/ISystemManager.cs b/Ryujinx.HLE/HOS/Services/Nfc/Nfp/ISystemManager.cs new file mode 100644 index 0000000000..78ea4896c5 --- /dev/null +++ b/Ryujinx.HLE/HOS/Services/Nfc/Nfp/ISystemManager.cs @@ -0,0 +1,8 @@ +namespace Ryujinx.HLE.HOS.Services.Nfc.Nfp +{ + [Service("nfp:sys")] + class ISystemManager : IpcService + { + public ISystemManager(ServiceCtx context) { } + } +} \ No newline at end of file diff --git a/Ryujinx.HLE/HOS/Services/Nfc/Nfp/State.cs b/Ryujinx.HLE/HOS/Services/Nfc/Nfp/State.cs deleted file mode 100644 index 166e5d7e73..0000000000 --- a/Ryujinx.HLE/HOS/Services/Nfc/Nfp/State.cs +++ /dev/null @@ -1,8 +0,0 @@ -namespace Ryujinx.HLE.HOS.Services.Nfc.Nfp -{ - enum State - { - NonInitialized = 0, - Initialized = 1 - } -} \ No newline at end of file diff --git a/Ryujinx.HLE/HOS/Services/Nfc/Nfp/IUser.cs b/Ryujinx.HLE/HOS/Services/Nfc/Nfp/UserManager/IUser.cs similarity index 97% rename from Ryujinx.HLE/HOS/Services/Nfc/Nfp/IUser.cs rename to Ryujinx.HLE/HOS/Services/Nfc/Nfp/UserManager/IUser.cs index c8a7ae4b16..d26b4eb943 100644 --- a/Ryujinx.HLE/HOS/Services/Nfc/Nfp/IUser.cs +++ b/Ryujinx.HLE/HOS/Services/Nfc/Nfp/UserManager/IUser.cs @@ -3,6 +3,8 @@ using Ryujinx.HLE.HOS.Ipc; using Ryujinx.HLE.HOS.Kernel.Common; using Ryujinx.HLE.HOS.Kernel.Threading; using Ryujinx.HLE.HOS.Services.Hid; +using Ryujinx.HLE.HOS.Services.Hid.HidServer; +using Ryujinx.HLE.HOS.Services.Nfc.Nfp.UserManager; using System; using System.Collections.Generic; @@ -41,8 +43,8 @@ namespace Ryujinx.HLE.HOS.Services.Nfc.Nfp // TODO: When we will be able to add multiple controllers add one entry by controller here. Device device1 = new Device { - NpadIdType = NpadIdType.Player1, - Handle = HidUtils.GetIndexFromNpadIdType(NpadIdType.Player1), + NpadIdType = HidNpadIdType.Player1, + Handle = HidUtils.GetIndexFromNpadIdType(HidNpadIdType.Player1), State = DeviceState.Initialized }; diff --git a/Ryujinx.HLE/HOS/Services/Nfc/Nfp/Device.cs b/Ryujinx.HLE/HOS/Services/Nfc/Nfp/UserManager/Types/Device.cs similarity index 73% rename from Ryujinx.HLE/HOS/Services/Nfc/Nfp/Device.cs rename to Ryujinx.HLE/HOS/Services/Nfc/Nfp/UserManager/Types/Device.cs index 3c49ee5109..40e7c8808b 100644 --- a/Ryujinx.HLE/HOS/Services/Nfc/Nfp/Device.cs +++ b/Ryujinx.HLE/HOS/Services/Nfc/Nfp/UserManager/Types/Device.cs @@ -2,7 +2,7 @@ using Ryujinx.HLE.HOS.Services.Hid; using Ryujinx.HLE.Input; -namespace Ryujinx.HLE.HOS.Services.Nfc.Nfp +namespace Ryujinx.HLE.HOS.Services.Nfc.Nfp.UserManager { class Device { @@ -14,7 +14,7 @@ namespace Ryujinx.HLE.HOS.Services.Nfc.Nfp public DeviceState State = DeviceState.Unavailable; - public ControllerId Handle; - public NpadIdType NpadIdType; + public ControllerId Handle; + public HidNpadIdType NpadIdType; } } \ No newline at end of file diff --git a/Ryujinx.HLE/HOS/Services/Nfc/Nfp/DeviceState.cs b/Ryujinx.HLE/HOS/Services/Nfc/Nfp/UserManager/Types/DeviceState.cs similarity index 80% rename from Ryujinx.HLE/HOS/Services/Nfc/Nfp/DeviceState.cs rename to Ryujinx.HLE/HOS/Services/Nfc/Nfp/UserManager/Types/DeviceState.cs index 09cff5f8d2..7e37349411 100644 --- a/Ryujinx.HLE/HOS/Services/Nfc/Nfp/DeviceState.cs +++ b/Ryujinx.HLE/HOS/Services/Nfc/Nfp/UserManager/Types/DeviceState.cs @@ -1,4 +1,4 @@ -namespace Ryujinx.HLE.HOS.Services.Nfc.Nfp +namespace Ryujinx.HLE.HOS.Services.Nfc.Nfp.UserManager { enum DeviceState { diff --git a/Ryujinx.HLE/HOS/Services/Nfc/Nfp/UserManager/Types/State.cs b/Ryujinx.HLE/HOS/Services/Nfc/Nfp/UserManager/Types/State.cs new file mode 100644 index 0000000000..8d141f0b78 --- /dev/null +++ b/Ryujinx.HLE/HOS/Services/Nfc/Nfp/UserManager/Types/State.cs @@ -0,0 +1,8 @@ +namespace Ryujinx.HLE.HOS.Services.Nfc.Nfp.UserManager +{ + enum State + { + NonInitialized = 0, + Initialized = 1 + } +} \ No newline at end of file diff --git a/Ryujinx.HLE/HOS/Services/Ngct/IUnknown1.cs b/Ryujinx.HLE/HOS/Services/Ngct/IUnknown1.cs new file mode 100644 index 0000000000..2baec58561 --- /dev/null +++ b/Ryujinx.HLE/HOS/Services/Ngct/IUnknown1.cs @@ -0,0 +1,9 @@ +namespace Ryujinx.HLE.HOS.Services.Ngct +{ + [Service("ngct:s")] // 9.0.0+ + [Service("ngct:u")] // 9.0.0+ + class IUnknown1 : IpcService + { + public IUnknown1(ServiceCtx context) { } + } +} \ No newline at end of file diff --git a/Ryujinx.HLE/HOS/Services/Nifm/IStaticService.cs b/Ryujinx.HLE/HOS/Services/Nifm/IStaticService.cs index eaecc3d327..0cf6a43c42 100644 --- a/Ryujinx.HLE/HOS/Services/Nifm/IStaticService.cs +++ b/Ryujinx.HLE/HOS/Services/Nifm/IStaticService.cs @@ -1,3 +1,5 @@ +using Ryujinx.HLE.HOS.Services.Nifm.StaticService; + namespace Ryujinx.HLE.HOS.Services.Nifm { [Service("nifm:a")] // Max sessions: 2 diff --git a/Ryujinx.HLE/HOS/Services/Nifm/GeneralServiceManager.cs b/Ryujinx.HLE/HOS/Services/Nifm/StaticService/GeneralService/GeneralServiceManager.cs similarity index 91% rename from Ryujinx.HLE/HOS/Services/Nifm/GeneralServiceManager.cs rename to Ryujinx.HLE/HOS/Services/Nifm/StaticService/GeneralService/GeneralServiceManager.cs index 1b49229e39..bbb218bbea 100644 --- a/Ryujinx.HLE/HOS/Services/Nifm/GeneralServiceManager.cs +++ b/Ryujinx.HLE/HOS/Services/Nifm/StaticService/GeneralService/GeneralServiceManager.cs @@ -1,7 +1,7 @@ using System.Collections.Generic; using System.Linq; -namespace Ryujinx.HLE.HOS.Services.Nifm +namespace Ryujinx.HLE.HOS.Services.Nifm.StaticService.GeneralService { static class GeneralServiceManager { diff --git a/Ryujinx.HLE/HOS/Services/Nifm/GeneralServiceDetail.cs b/Ryujinx.HLE/HOS/Services/Nifm/StaticService/GeneralService/Types/GeneralServiceDetail.cs similarity index 63% rename from Ryujinx.HLE/HOS/Services/Nifm/GeneralServiceDetail.cs rename to Ryujinx.HLE/HOS/Services/Nifm/StaticService/GeneralService/Types/GeneralServiceDetail.cs index 3be5fbeba9..3cf55345ca 100644 --- a/Ryujinx.HLE/HOS/Services/Nifm/GeneralServiceDetail.cs +++ b/Ryujinx.HLE/HOS/Services/Nifm/StaticService/GeneralService/Types/GeneralServiceDetail.cs @@ -1,4 +1,4 @@ -namespace Ryujinx.HLE.HOS.Services.Nifm +namespace Ryujinx.HLE.HOS.Services.Nifm.StaticService.GeneralService { class GeneralServiceDetail { diff --git a/Ryujinx.HLE/HOS/Services/Nifm/IGeneralService.cs b/Ryujinx.HLE/HOS/Services/Nifm/StaticService/IGeneralService.cs similarity index 96% rename from Ryujinx.HLE/HOS/Services/Nifm/IGeneralService.cs rename to Ryujinx.HLE/HOS/Services/Nifm/StaticService/IGeneralService.cs index a47e73002d..4a07b2986d 100644 --- a/Ryujinx.HLE/HOS/Services/Nifm/IGeneralService.cs +++ b/Ryujinx.HLE/HOS/Services/Nifm/StaticService/IGeneralService.cs @@ -1,11 +1,12 @@ using Ryujinx.Common.Logging; +using Ryujinx.HLE.HOS.Services.Nifm.StaticService.GeneralService; using System; using System.Linq; using System.Net; using System.Net.NetworkInformation; using System.Net.Sockets; -namespace Ryujinx.HLE.HOS.Services.Nifm +namespace Ryujinx.HLE.HOS.Services.Nifm.StaticService { class IGeneralService : IpcService, IDisposable { diff --git a/Ryujinx.HLE/HOS/Services/Nifm/IRequest.cs b/Ryujinx.HLE/HOS/Services/Nifm/StaticService/IRequest.cs similarity index 97% rename from Ryujinx.HLE/HOS/Services/Nifm/IRequest.cs rename to Ryujinx.HLE/HOS/Services/Nifm/StaticService/IRequest.cs index b2884f913b..c878c2d6a8 100644 --- a/Ryujinx.HLE/HOS/Services/Nifm/IRequest.cs +++ b/Ryujinx.HLE/HOS/Services/Nifm/StaticService/IRequest.cs @@ -4,7 +4,7 @@ using Ryujinx.HLE.HOS.Kernel.Common; using Ryujinx.HLE.HOS.Kernel.Threading; using System; -namespace Ryujinx.HLE.HOS.Services.Nifm +namespace Ryujinx.HLE.HOS.Services.Nifm.StaticService { class IRequest : IpcService { diff --git a/Ryujinx.HLE/HOS/Services/Nim/INetworkInstallManager.cs b/Ryujinx.HLE/HOS/Services/Nim/INetworkInstallManager.cs new file mode 100644 index 0000000000..ad79ca0de1 --- /dev/null +++ b/Ryujinx.HLE/HOS/Services/Nim/INetworkInstallManager.cs @@ -0,0 +1,8 @@ +namespace Ryujinx.HLE.HOS.Services.Nim +{ + [Service("nim")] + class INetworkInstallManager : IpcService + { + public INetworkInstallManager(ServiceCtx context) { } + } +} \ No newline at end of file diff --git a/Ryujinx.HLE/HOS/Services/Nim/IShopServiceAccessServerInterface.cs b/Ryujinx.HLE/HOS/Services/Nim/IShopServiceAccessServerInterface.cs new file mode 100644 index 0000000000..9be84393fc --- /dev/null +++ b/Ryujinx.HLE/HOS/Services/Nim/IShopServiceAccessServerInterface.cs @@ -0,0 +1,8 @@ +namespace Ryujinx.HLE.HOS.Services.Nim +{ + [Service("nim:eca")] // 5.0.0+ + class IShopServiceAccessServerInterface : IpcService + { + public IShopServiceAccessServerInterface(ServiceCtx context) { } + } +} \ No newline at end of file diff --git a/Ryujinx.HLE/HOS/Services/Nim/IShopServiceAccessSystemInterface.cs b/Ryujinx.HLE/HOS/Services/Nim/IShopServiceAccessSystemInterface.cs new file mode 100644 index 0000000000..ab7bcaca96 --- /dev/null +++ b/Ryujinx.HLE/HOS/Services/Nim/IShopServiceAccessSystemInterface.cs @@ -0,0 +1,8 @@ +namespace Ryujinx.HLE.HOS.Services.Ldr +{ + [Service("nim:ecas")] // 7.0.0+ + class IShopServiceAccessSystemInterface : IpcService + { + public IShopServiceAccessSystemInterface(ServiceCtx context) { } + } +} \ No newline at end of file diff --git a/Ryujinx.HLE/HOS/Services/Nim/IShopServiceManager.cs b/Ryujinx.HLE/HOS/Services/Nim/IShopServiceManager.cs new file mode 100644 index 0000000000..2420615a60 --- /dev/null +++ b/Ryujinx.HLE/HOS/Services/Nim/IShopServiceManager.cs @@ -0,0 +1,8 @@ +namespace Ryujinx.HLE.HOS.Services.Nim +{ + [Service("nim:shp")] + class IShopServiceManager : IpcService + { + public IShopServiceManager(ServiceCtx context) { } + } +} \ No newline at end of file diff --git a/Ryujinx.HLE/HOS/Services/Nim/Ntc/IStaticService.cs b/Ryujinx.HLE/HOS/Services/Nim/Ntc/IStaticService.cs new file mode 100644 index 0000000000..f5a3bc7b45 --- /dev/null +++ b/Ryujinx.HLE/HOS/Services/Nim/Ntc/IStaticService.cs @@ -0,0 +1,8 @@ +namespace Ryujinx.HLE.HOS.Services.Nim.Ntc +{ + [Service("ntc")] + class IStaticService : IpcService + { + public IStaticService(ServiceCtx context) { } + } +} \ No newline at end of file diff --git a/Ryujinx.HLE/HOS/Services/Notification/INotificationServicesForApplication.cs b/Ryujinx.HLE/HOS/Services/Notification/INotificationServicesForApplication.cs new file mode 100644 index 0000000000..c4a35b291e --- /dev/null +++ b/Ryujinx.HLE/HOS/Services/Notification/INotificationServicesForApplication.cs @@ -0,0 +1,8 @@ +namespace Ryujinx.HLE.HOS.Services.Notification +{ + [Service("notif:a")] // 9.0.0+ + class INotificationServicesForApplication : IpcService + { + public INotificationServicesForApplication(ServiceCtx context) { } + } +} \ No newline at end of file diff --git a/Ryujinx.HLE/HOS/Services/Notification/INotificationServicesForSystem.cs b/Ryujinx.HLE/HOS/Services/Notification/INotificationServicesForSystem.cs new file mode 100644 index 0000000000..0939dff621 --- /dev/null +++ b/Ryujinx.HLE/HOS/Services/Notification/INotificationServicesForSystem.cs @@ -0,0 +1,8 @@ +namespace Ryujinx.HLE.HOS.Services.Notification +{ + [Service("notif:s")] // 9.0.0+ + class INotificationServicesForSystem : IpcService + { + public INotificationServicesForSystem(ServiceCtx context) { } + } +} \ No newline at end of file diff --git a/Ryujinx.HLE/HOS/Services/Npns/INpnsSystem.cs b/Ryujinx.HLE/HOS/Services/Npns/INpnsSystem.cs new file mode 100644 index 0000000000..fd8ccfb585 --- /dev/null +++ b/Ryujinx.HLE/HOS/Services/Npns/INpnsSystem.cs @@ -0,0 +1,8 @@ +namespace Ryujinx.HLE.HOS.Services.Npns +{ + [Service("npns:s")] + class INpnsSystem : IpcService + { + public INpnsSystem(ServiceCtx context) { } + } +} \ No newline at end of file diff --git a/Ryujinx.HLE/HOS/Services/Npns/INpnsUser.cs b/Ryujinx.HLE/HOS/Services/Npns/INpnsUser.cs new file mode 100644 index 0000000000..68e769385a --- /dev/null +++ b/Ryujinx.HLE/HOS/Services/Npns/INpnsUser.cs @@ -0,0 +1,8 @@ +namespace Ryujinx.HLE.HOS.Services.Npns +{ + [Service("npns:u")] + class INpnsUser : IpcService + { + public INpnsUser(ServiceCtx context) { } + } +} \ No newline at end of file diff --git a/Ryujinx.HLE/HOS/Services/Ns/IDevelopInterface.cs b/Ryujinx.HLE/HOS/Services/Ns/IDevelopInterface.cs new file mode 100644 index 0000000000..c74ebd691d --- /dev/null +++ b/Ryujinx.HLE/HOS/Services/Ns/IDevelopInterface.cs @@ -0,0 +1,8 @@ +namespace Ryujinx.HLE.HOS.Services.Ns +{ + [Service("ns:dev")] + class IDevelopInterface : IpcService + { + public IDevelopInterface(ServiceCtx context) { } + } +} \ No newline at end of file diff --git a/Ryujinx.HLE/HOS/Services/Ns/IServiceGetterInterface.cs b/Ryujinx.HLE/HOS/Services/Ns/IServiceGetterInterface.cs index a8c9ff9a84..7133166723 100644 --- a/Ryujinx.HLE/HOS/Services/Ns/IServiceGetterInterface.cs +++ b/Ryujinx.HLE/HOS/Services/Ns/IServiceGetterInterface.cs @@ -2,6 +2,9 @@ namespace Ryujinx.HLE.HOS.Services.Ns { [Service("ns:am2")] [Service("ns:ec")] + [Service("ns:rid")] + [Service("ns:rt")] + [Service("ns:web")] class IServiceGetterInterface : IpcService { public IServiceGetterInterface(ServiceCtx context) { } diff --git a/Ryujinx.HLE/HOS/Services/Nv/INvDrvDebugFSServices.cs b/Ryujinx.HLE/HOS/Services/Nv/INvDrvDebugFSServices.cs new file mode 100644 index 0000000000..dffe8783d5 --- /dev/null +++ b/Ryujinx.HLE/HOS/Services/Nv/INvDrvDebugFSServices.cs @@ -0,0 +1,8 @@ +namespace Ryujinx.HLE.HOS.Services.Nv +{ + [Service("nvdrvdbg")] + class INvDrvDebugFSServices : IpcService + { + public INvDrvDebugFSServices(ServiceCtx context) { } + } +} \ No newline at end of file diff --git a/Ryujinx.HLE/HOS/Services/Nv/INvDrvServices.cs b/Ryujinx.HLE/HOS/Services/Nv/INvDrvServices.cs index 261c1c5aeb..da34421b74 100644 --- a/Ryujinx.HLE/HOS/Services/Nv/INvDrvServices.cs +++ b/Ryujinx.HLE/HOS/Services/Nv/INvDrvServices.cs @@ -4,11 +4,11 @@ using Ryujinx.HLE.HOS.Ipc; using Ryujinx.HLE.HOS.Kernel.Common; using Ryujinx.HLE.HOS.Kernel.Process; using Ryujinx.HLE.HOS.Kernel.Threading; -using Ryujinx.HLE.HOS.Services.Nv.NvGpuAS; -using Ryujinx.HLE.HOS.Services.Nv.NvGpuGpu; -using Ryujinx.HLE.HOS.Services.Nv.NvHostChannel; -using Ryujinx.HLE.HOS.Services.Nv.NvHostCtrl; -using Ryujinx.HLE.HOS.Services.Nv.NvMap; +using Ryujinx.HLE.HOS.Services.Nv.NvDrvServices.NvGpuAS; +using Ryujinx.HLE.HOS.Services.Nv.NvDrvServices.NvGpuGpu; +using Ryujinx.HLE.HOS.Services.Nv.NvDrvServices.NvHostChannel; +using Ryujinx.HLE.HOS.Services.Nv.NvDrvServices.NvHostCtrl; +using Ryujinx.HLE.HOS.Services.Nv.NvDrvServices.NvMap; using System; using System.Collections.Generic; diff --git a/Ryujinx.HLE/HOS/Services/Nv/INvGemControl.cs b/Ryujinx.HLE/HOS/Services/Nv/INvGemControl.cs new file mode 100644 index 0000000000..7bf99ed1a4 --- /dev/null +++ b/Ryujinx.HLE/HOS/Services/Nv/INvGemControl.cs @@ -0,0 +1,8 @@ +namespace Ryujinx.HLE.HOS.Services.Nv +{ + [Service("nvgem:c")] + class INvGemControl : IpcService + { + public INvGemControl(ServiceCtx context) { } + } +} \ No newline at end of file diff --git a/Ryujinx.HLE/HOS/Services/Nv/INvGemCoreDump.cs b/Ryujinx.HLE/HOS/Services/Nv/INvGemCoreDump.cs new file mode 100644 index 0000000000..ff3774da1a --- /dev/null +++ b/Ryujinx.HLE/HOS/Services/Nv/INvGemCoreDump.cs @@ -0,0 +1,8 @@ +namespace Ryujinx.HLE.HOS.Services.Nv +{ + [Service("nvgem:cd")] + class INvGemCoreDump : IpcService + { + public INvGemCoreDump(ServiceCtx context) { } + } +} \ No newline at end of file diff --git a/Ryujinx.HLE/HOS/Services/Nv/NvGpuAS/NvGpuASIoctl.cs b/Ryujinx.HLE/HOS/Services/Nv/NvDrvServices/NvGpuAS/NvGpuASIoctl.cs similarity index 98% rename from Ryujinx.HLE/HOS/Services/Nv/NvGpuAS/NvGpuASIoctl.cs rename to Ryujinx.HLE/HOS/Services/Nv/NvDrvServices/NvGpuAS/NvGpuASIoctl.cs index 47d15a7e52..5c8d1fe0d6 100644 --- a/Ryujinx.HLE/HOS/Services/Nv/NvGpuAS/NvGpuASIoctl.cs +++ b/Ryujinx.HLE/HOS/Services/Nv/NvDrvServices/NvGpuAS/NvGpuASIoctl.cs @@ -2,11 +2,11 @@ using ARMeilleure.Memory; using Ryujinx.Common.Logging; using Ryujinx.Graphics.Memory; using Ryujinx.HLE.HOS.Kernel.Process; -using Ryujinx.HLE.HOS.Services.Nv.NvMap; +using Ryujinx.HLE.HOS.Services.Nv.NvDrvServices.NvMap; using System; using System.Collections.Concurrent; -namespace Ryujinx.HLE.HOS.Services.Nv.NvGpuAS +namespace Ryujinx.HLE.HOS.Services.Nv.NvDrvServices.NvGpuAS { class NvGpuASIoctl { diff --git a/Ryujinx.HLE/HOS/Services/Nv/NvGpuAS/NvGpuASAllocSpace.cs b/Ryujinx.HLE/HOS/Services/Nv/NvDrvServices/NvGpuAS/Types/NvGpuASAllocSpace.cs similarity index 75% rename from Ryujinx.HLE/HOS/Services/Nv/NvGpuAS/NvGpuASAllocSpace.cs rename to Ryujinx.HLE/HOS/Services/Nv/NvDrvServices/NvGpuAS/Types/NvGpuASAllocSpace.cs index bca2f9f4a1..f0a0db35e7 100644 --- a/Ryujinx.HLE/HOS/Services/Nv/NvGpuAS/NvGpuASAllocSpace.cs +++ b/Ryujinx.HLE/HOS/Services/Nv/NvDrvServices/NvGpuAS/Types/NvGpuASAllocSpace.cs @@ -1,4 +1,4 @@ -namespace Ryujinx.HLE.HOS.Services.Nv.NvGpuAS +namespace Ryujinx.HLE.HOS.Services.Nv.NvDrvServices.NvGpuAS { struct NvGpuASAllocSpace { diff --git a/Ryujinx.HLE/HOS/Services/Nv/NvGpuAS/NvGpuASCtx.cs b/Ryujinx.HLE/HOS/Services/Nv/NvDrvServices/NvGpuAS/Types/NvGpuASCtx.cs similarity index 98% rename from Ryujinx.HLE/HOS/Services/Nv/NvGpuAS/NvGpuASCtx.cs rename to Ryujinx.HLE/HOS/Services/Nv/NvDrvServices/NvGpuAS/Types/NvGpuASCtx.cs index e3cdf2f8f1..315fe353ee 100644 --- a/Ryujinx.HLE/HOS/Services/Nv/NvGpuAS/NvGpuASCtx.cs +++ b/Ryujinx.HLE/HOS/Services/Nv/NvDrvServices/NvGpuAS/Types/NvGpuASCtx.cs @@ -1,7 +1,7 @@ using Ryujinx.Graphics.Memory; using System.Collections.Generic; -namespace Ryujinx.HLE.HOS.Services.Nv.NvGpuAS +namespace Ryujinx.HLE.HOS.Services.Nv.NvDrvServices.NvGpuAS { class NvGpuASCtx { diff --git a/Ryujinx.HLE/HOS/Services/Nv/NvGpuAS/NvGpuASMapBufferEx.cs b/Ryujinx.HLE/HOS/Services/Nv/NvDrvServices/NvGpuAS/Types/NvGpuASMapBufferEx.cs similarity index 81% rename from Ryujinx.HLE/HOS/Services/Nv/NvGpuAS/NvGpuASMapBufferEx.cs rename to Ryujinx.HLE/HOS/Services/Nv/NvDrvServices/NvGpuAS/Types/NvGpuASMapBufferEx.cs index 4bdb4bf7ce..6ef803774a 100644 --- a/Ryujinx.HLE/HOS/Services/Nv/NvGpuAS/NvGpuASMapBufferEx.cs +++ b/Ryujinx.HLE/HOS/Services/Nv/NvDrvServices/NvGpuAS/Types/NvGpuASMapBufferEx.cs @@ -1,4 +1,4 @@ -namespace Ryujinx.HLE.HOS.Services.Nv.NvGpuAS +namespace Ryujinx.HLE.HOS.Services.Nv.NvDrvServices.NvGpuAS { struct NvGpuASMapBufferEx { diff --git a/Ryujinx.HLE/HOS/Services/Nv/NvGpuAS/NvGpuASRemap.cs b/Ryujinx.HLE/HOS/Services/Nv/NvDrvServices/NvGpuAS/Types/NvGpuASRemap.cs similarity index 78% rename from Ryujinx.HLE/HOS/Services/Nv/NvGpuAS/NvGpuASRemap.cs rename to Ryujinx.HLE/HOS/Services/Nv/NvDrvServices/NvGpuAS/Types/NvGpuASRemap.cs index a24221bac5..0a6f8003ea 100644 --- a/Ryujinx.HLE/HOS/Services/Nv/NvGpuAS/NvGpuASRemap.cs +++ b/Ryujinx.HLE/HOS/Services/Nv/NvDrvServices/NvGpuAS/Types/NvGpuASRemap.cs @@ -1,4 +1,4 @@ -namespace Ryujinx.HLE.HOS.Services.Nv.NvGpuAS +namespace Ryujinx.HLE.HOS.Services.Nv.NvDrvServices.NvGpuAS { struct NvGpuASRemap { diff --git a/Ryujinx.HLE/HOS/Services/Nv/NvGpuAS/NvGpuASUnmapBuffer.cs b/Ryujinx.HLE/HOS/Services/Nv/NvDrvServices/NvGpuAS/Types/NvGpuASUnmapBuffer.cs similarity index 54% rename from Ryujinx.HLE/HOS/Services/Nv/NvGpuAS/NvGpuASUnmapBuffer.cs rename to Ryujinx.HLE/HOS/Services/Nv/NvDrvServices/NvGpuAS/Types/NvGpuASUnmapBuffer.cs index beb07fe2e8..63476b2fe1 100644 --- a/Ryujinx.HLE/HOS/Services/Nv/NvGpuAS/NvGpuASUnmapBuffer.cs +++ b/Ryujinx.HLE/HOS/Services/Nv/NvDrvServices/NvGpuAS/Types/NvGpuASUnmapBuffer.cs @@ -1,4 +1,4 @@ -namespace Ryujinx.HLE.HOS.Services.Nv.NvGpuAS +namespace Ryujinx.HLE.HOS.Services.Nv.NvDrvServices.NvGpuAS { struct NvGpuASUnmapBuffer { diff --git a/Ryujinx.HLE/HOS/Services/Nv/NvGpuGpu/NvGpuGpuIoctl.cs b/Ryujinx.HLE/HOS/Services/Nv/NvDrvServices/NvGpuGpu/NvGpuGpuIoctl.cs similarity index 88% rename from Ryujinx.HLE/HOS/Services/Nv/NvGpuGpu/NvGpuGpuIoctl.cs rename to Ryujinx.HLE/HOS/Services/Nv/NvDrvServices/NvGpuGpu/NvGpuGpuIoctl.cs index 04b0c63cda..12f131539a 100644 --- a/Ryujinx.HLE/HOS/Services/Nv/NvGpuGpu/NvGpuGpuIoctl.cs +++ b/Ryujinx.HLE/HOS/Services/Nv/NvDrvServices/NvGpuGpu/NvGpuGpuIoctl.cs @@ -3,7 +3,7 @@ using Ryujinx.Common.Logging; using System; using System.Diagnostics; -namespace Ryujinx.HLE.HOS.Services.Nv.NvGpuGpu +namespace Ryujinx.HLE.HOS.Services.Nv.NvDrvServices.NvGpuGpu { class NvGpuGpuIoctl { @@ -40,9 +40,10 @@ namespace Ryujinx.HLE.HOS.Services.Nv.NvGpuGpu { long outputPosition = context.Request.GetBufferType0x22().Position; - NvGpuGpuZcullGetCtxSize args = new NvGpuGpuZcullGetCtxSize(); - - args.Size = 1; + NvGpuGpuZcullGetCtxSize args = new NvGpuGpuZcullGetCtxSize + { + Size = 1 + }; MemoryHelper.Write(context.Memory, outputPosition, args); @@ -55,18 +56,19 @@ namespace Ryujinx.HLE.HOS.Services.Nv.NvGpuGpu { long outputPosition = context.Request.GetBufferType0x22().Position; - NvGpuGpuZcullGetInfo args = new NvGpuGpuZcullGetInfo(); - - args.WidthAlignPixels = 0x20; - args.HeightAlignPixels = 0x20; - args.PixelSquaresByAliquots = 0x400; - args.AliquotTotal = 0x800; - args.RegionByteMultiplier = 0x20; - args.RegionHeaderSize = 0x20; - args.SubregionHeaderSize = 0xc0; - args.SubregionWidthAlignPixels = 0x20; - args.SubregionHeightAlignPixels = 0x40; - args.SubregionCount = 0x10; + NvGpuGpuZcullGetInfo args = new NvGpuGpuZcullGetInfo + { + WidthAlignPixels = 0x20, + HeightAlignPixels = 0x20, + PixelSquaresByAliquots = 0x400, + AliquotTotal = 0x800, + RegionByteMultiplier = 0x20, + RegionHeaderSize = 0x20, + SubregionHeaderSize = 0xc0, + SubregionWidthAlignPixels = 0x20, + SubregionHeightAlignPixels = 0x40, + SubregionCount = 0x10 + }; MemoryHelper.Write(context.Memory, outputPosition, args); @@ -156,10 +158,11 @@ namespace Ryujinx.HLE.HOS.Services.Nv.NvGpuGpu { long outputPosition = context.Request.GetBufferType0x22().Position; - NvGpuGpuGetActiveSlotMask args = new NvGpuGpuGetActiveSlotMask(); - - args.Slot = 0x07; - args.Mask = 0x01; + NvGpuGpuGetActiveSlotMask args = new NvGpuGpuGetActiveSlotMask + { + Slot = 0x07, + Mask = 0x01 + }; MemoryHelper.Write(context.Memory, outputPosition, args); diff --git a/Ryujinx.HLE/HOS/Services/Nv/NvGpuGpu/NvGpuGpuGetActiveSlotMask.cs b/Ryujinx.HLE/HOS/Services/Nv/NvDrvServices/NvGpuGpu/Types/NvGpuGpuGetActiveSlotMask.cs similarity index 60% rename from Ryujinx.HLE/HOS/Services/Nv/NvGpuGpu/NvGpuGpuGetActiveSlotMask.cs rename to Ryujinx.HLE/HOS/Services/Nv/NvDrvServices/NvGpuGpu/Types/NvGpuGpuGetActiveSlotMask.cs index e20d21f967..1b4c53451f 100644 --- a/Ryujinx.HLE/HOS/Services/Nv/NvGpuGpu/NvGpuGpuGetActiveSlotMask.cs +++ b/Ryujinx.HLE/HOS/Services/Nv/NvDrvServices/NvGpuGpu/Types/NvGpuGpuGetActiveSlotMask.cs @@ -1,8 +1,8 @@ -namespace Ryujinx.HLE.HOS.Services.Nv.NvGpuGpu +namespace Ryujinx.HLE.HOS.Services.Nv.NvDrvServices.NvGpuGpu { struct NvGpuGpuGetActiveSlotMask { public int Slot; public int Mask; } -} +} \ No newline at end of file diff --git a/Ryujinx.HLE/HOS/Services/Nv/NvGpuGpu/NvGpuGpuGetCharacteristics.cs b/Ryujinx.HLE/HOS/Services/Nv/NvDrvServices/NvGpuGpu/Types/NvGpuGpuGetCharacteristics.cs similarity index 95% rename from Ryujinx.HLE/HOS/Services/Nv/NvGpuGpu/NvGpuGpuGetCharacteristics.cs rename to Ryujinx.HLE/HOS/Services/Nv/NvDrvServices/NvGpuGpu/Types/NvGpuGpuGetCharacteristics.cs index 9a925138ed..76aef2a782 100644 --- a/Ryujinx.HLE/HOS/Services/Nv/NvGpuGpu/NvGpuGpuGetCharacteristics.cs +++ b/Ryujinx.HLE/HOS/Services/Nv/NvDrvServices/NvGpuGpu/Types/NvGpuGpuGetCharacteristics.cs @@ -1,4 +1,4 @@ -namespace Ryujinx.HLE.HOS.Services.Nv.NvGpuGpu +namespace Ryujinx.HLE.HOS.Services.Nv.NvDrvServices.NvGpuGpu { struct NvGpuGpuGetCharacteristics { diff --git a/Ryujinx.HLE/HOS/Services/Nv/NvGpuGpu/NvGpuGpuGetTpcMasks.cs b/Ryujinx.HLE/HOS/Services/Nv/NvDrvServices/NvGpuGpu/Types/NvGpuGpuGetTpcMasks.cs similarity index 76% rename from Ryujinx.HLE/HOS/Services/Nv/NvGpuGpu/NvGpuGpuGetTpcMasks.cs rename to Ryujinx.HLE/HOS/Services/Nv/NvDrvServices/NvGpuGpu/Types/NvGpuGpuGetTpcMasks.cs index 751363c60e..bc0966da18 100644 --- a/Ryujinx.HLE/HOS/Services/Nv/NvGpuGpu/NvGpuGpuGetTpcMasks.cs +++ b/Ryujinx.HLE/HOS/Services/Nv/NvDrvServices/NvGpuGpu/Types/NvGpuGpuGetTpcMasks.cs @@ -1,4 +1,4 @@ -namespace Ryujinx.HLE.HOS.Services.Nv.NvGpuGpu +namespace Ryujinx.HLE.HOS.Services.Nv.NvDrvServices.NvGpuGpu { struct NvGpuGpuGetTpcMasks { diff --git a/Ryujinx.HLE/HOS/Services/Nv/NvGpuGpu/NvGpuGpuZcullGetCtxSize.cs b/Ryujinx.HLE/HOS/Services/Nv/NvDrvServices/NvGpuGpu/Types/NvGpuGpuZcullGetCtxSize.cs similarity index 53% rename from Ryujinx.HLE/HOS/Services/Nv/NvGpuGpu/NvGpuGpuZcullGetCtxSize.cs rename to Ryujinx.HLE/HOS/Services/Nv/NvDrvServices/NvGpuGpu/Types/NvGpuGpuZcullGetCtxSize.cs index 3ac9f92b60..8706d51dae 100644 --- a/Ryujinx.HLE/HOS/Services/Nv/NvGpuGpu/NvGpuGpuZcullGetCtxSize.cs +++ b/Ryujinx.HLE/HOS/Services/Nv/NvDrvServices/NvGpuGpu/Types/NvGpuGpuZcullGetCtxSize.cs @@ -1,7 +1,7 @@ -namespace Ryujinx.HLE.HOS.Services.Nv.NvGpuGpu +namespace Ryujinx.HLE.HOS.Services.Nv.NvDrvServices.NvGpuGpu { struct NvGpuGpuZcullGetCtxSize { public int Size; } -} +} \ No newline at end of file diff --git a/Ryujinx.HLE/HOS/Services/Nv/NvGpuGpu/NvGpuGpuZcullGetInfo.cs b/Ryujinx.HLE/HOS/Services/Nv/NvDrvServices/NvGpuGpu/Types/NvGpuGpuZcullGetInfo.cs similarity index 87% rename from Ryujinx.HLE/HOS/Services/Nv/NvGpuGpu/NvGpuGpuZcullGetInfo.cs rename to Ryujinx.HLE/HOS/Services/Nv/NvDrvServices/NvGpuGpu/Types/NvGpuGpuZcullGetInfo.cs index 4a7cafd544..ab17ca8b9c 100644 --- a/Ryujinx.HLE/HOS/Services/Nv/NvGpuGpu/NvGpuGpuZcullGetInfo.cs +++ b/Ryujinx.HLE/HOS/Services/Nv/NvDrvServices/NvGpuGpu/Types/NvGpuGpuZcullGetInfo.cs @@ -1,4 +1,4 @@ -namespace Ryujinx.HLE.HOS.Services.Nv.NvGpuGpu +namespace Ryujinx.HLE.HOS.Services.Nv.NvDrvServices.NvGpuGpu { struct NvGpuGpuZcullGetInfo { @@ -13,4 +13,4 @@ public int SubregionHeightAlignPixels; public int SubregionCount; } -} +} \ No newline at end of file diff --git a/Ryujinx.HLE/HOS/Services/Nv/NvHostChannel/NvHostChannelIoctl.cs b/Ryujinx.HLE/HOS/Services/Nv/NvDrvServices/NvHostChannel/NvHostChannelIoctl.cs similarity index 98% rename from Ryujinx.HLE/HOS/Services/Nv/NvHostChannel/NvHostChannelIoctl.cs rename to Ryujinx.HLE/HOS/Services/Nv/NvDrvServices/NvHostChannel/NvHostChannelIoctl.cs index fdfb3fa5cf..0d06e7e419 100644 --- a/Ryujinx.HLE/HOS/Services/Nv/NvHostChannel/NvHostChannelIoctl.cs +++ b/Ryujinx.HLE/HOS/Services/Nv/NvDrvServices/NvHostChannel/NvHostChannelIoctl.cs @@ -2,12 +2,12 @@ using ARMeilleure.Memory; using Ryujinx.Common.Logging; using Ryujinx.Graphics.Memory; using Ryujinx.HLE.HOS.Kernel.Process; -using Ryujinx.HLE.HOS.Services.Nv.NvGpuAS; -using Ryujinx.HLE.HOS.Services.Nv.NvMap; +using Ryujinx.HLE.HOS.Services.Nv.NvDrvServices.NvGpuAS; +using Ryujinx.HLE.HOS.Services.Nv.NvDrvServices.NvMap; using System; using System.Collections.Concurrent; -namespace Ryujinx.HLE.HOS.Services.Nv.NvHostChannel +namespace Ryujinx.HLE.HOS.Services.Nv.NvDrvServices.NvHostChannel { class NvHostChannelIoctl { diff --git a/Ryujinx.HLE/HOS/Services/Nv/NvHostChannel/NvChannel.cs b/Ryujinx.HLE/HOS/Services/Nv/NvDrvServices/NvHostChannel/Types/NvChannel.cs similarity index 65% rename from Ryujinx.HLE/HOS/Services/Nv/NvHostChannel/NvChannel.cs rename to Ryujinx.HLE/HOS/Services/Nv/NvDrvServices/NvHostChannel/Types/NvChannel.cs index 74d27a7594..22cfba3d6c 100644 --- a/Ryujinx.HLE/HOS/Services/Nv/NvHostChannel/NvChannel.cs +++ b/Ryujinx.HLE/HOS/Services/Nv/NvDrvServices/NvHostChannel/Types/NvChannel.cs @@ -1,4 +1,4 @@ -namespace Ryujinx.HLE.HOS.Services.Nv.NvHostChannel +namespace Ryujinx.HLE.HOS.Services.Nv.NvDrvServices.NvHostChannel { class NvChannel { diff --git a/Ryujinx.HLE/HOS/Services/Nv/NvHostChannel/NvChannelPriority.cs b/Ryujinx.HLE/HOS/Services/Nv/NvDrvServices/NvHostChannel/Types/NvChannelPriority.cs similarity index 60% rename from Ryujinx.HLE/HOS/Services/Nv/NvHostChannel/NvChannelPriority.cs rename to Ryujinx.HLE/HOS/Services/Nv/NvDrvServices/NvHostChannel/Types/NvChannelPriority.cs index d41e7609de..148a640b51 100644 --- a/Ryujinx.HLE/HOS/Services/Nv/NvHostChannel/NvChannelPriority.cs +++ b/Ryujinx.HLE/HOS/Services/Nv/NvDrvServices/NvHostChannel/Types/NvChannelPriority.cs @@ -1,4 +1,4 @@ -namespace Ryujinx.HLE.HOS.Services.Nv.NvHostChannel +namespace Ryujinx.HLE.HOS.Services.Nv.NvDrvServices.NvHostChannel { enum NvChannelPriority { diff --git a/Ryujinx.HLE/HOS/Services/Nv/NvHostChannel/NvHostChannelCmdBuf.cs b/Ryujinx.HLE/HOS/Services/Nv/NvDrvServices/NvHostChannel/Types/NvHostChannelCmdBuf.cs similarity index 78% rename from Ryujinx.HLE/HOS/Services/Nv/NvHostChannel/NvHostChannelCmdBuf.cs rename to Ryujinx.HLE/HOS/Services/Nv/NvDrvServices/NvHostChannel/Types/NvHostChannelCmdBuf.cs index 44949597c8..0308912b88 100644 --- a/Ryujinx.HLE/HOS/Services/Nv/NvHostChannel/NvHostChannelCmdBuf.cs +++ b/Ryujinx.HLE/HOS/Services/Nv/NvDrvServices/NvHostChannel/Types/NvHostChannelCmdBuf.cs @@ -1,6 +1,6 @@ using System.Runtime.InteropServices; -namespace Ryujinx.HLE.HOS.Services.Nv.NvHostChannel +namespace Ryujinx.HLE.HOS.Services.Nv.NvDrvServices.NvHostChannel { [StructLayout(LayoutKind.Sequential, Size = 8, Pack = 4)] struct NvHostChannelCmdBuf diff --git a/Ryujinx.HLE/HOS/Services/Nv/NvHostChannel/NvHostChannelGetParamArg.cs b/Ryujinx.HLE/HOS/Services/Nv/NvDrvServices/NvHostChannel/Types/NvHostChannelGetParamArg.cs similarity index 75% rename from Ryujinx.HLE/HOS/Services/Nv/NvHostChannel/NvHostChannelGetParamArg.cs rename to Ryujinx.HLE/HOS/Services/Nv/NvDrvServices/NvHostChannel/Types/NvHostChannelGetParamArg.cs index 5c04e5d4b3..7294648469 100644 --- a/Ryujinx.HLE/HOS/Services/Nv/NvHostChannel/NvHostChannelGetParamArg.cs +++ b/Ryujinx.HLE/HOS/Services/Nv/NvDrvServices/NvHostChannel/Types/NvHostChannelGetParamArg.cs @@ -1,6 +1,6 @@ using System.Runtime.InteropServices; -namespace Ryujinx.HLE.HOS.Services.Nv.NvHostChannel +namespace Ryujinx.HLE.HOS.Services.Nv.NvDrvServices.NvHostChannel { [StructLayout(LayoutKind.Sequential, Size = 8, Pack = 4)] struct NvHostChannelGetParamArg diff --git a/Ryujinx.HLE/HOS/Services/Nv/NvHostChannel/NvHostChannelMapBuffer.cs b/Ryujinx.HLE/HOS/Services/Nv/NvDrvServices/NvHostChannel/Types/NvHostChannelMapBuffer.cs similarity index 63% rename from Ryujinx.HLE/HOS/Services/Nv/NvHostChannel/NvHostChannelMapBuffer.cs rename to Ryujinx.HLE/HOS/Services/Nv/NvDrvServices/NvHostChannel/Types/NvHostChannelMapBuffer.cs index 1dfedf2db5..f516588e89 100644 --- a/Ryujinx.HLE/HOS/Services/Nv/NvHostChannel/NvHostChannelMapBuffer.cs +++ b/Ryujinx.HLE/HOS/Services/Nv/NvDrvServices/NvHostChannel/Types/NvHostChannelMapBuffer.cs @@ -1,12 +1,12 @@ using System.Runtime.InteropServices; -namespace Ryujinx.HLE.HOS.Services.Nv.NvHostChannel +namespace Ryujinx.HLE.HOS.Services.Nv.NvDrvServices.NvHostChannel { [StructLayout(LayoutKind.Sequential, Size = 0xc, Pack = 4)] struct NvHostChannelMapBuffer { public int NumEntries; - public int DataAddress; //Ignored by the driver. + public int DataAddress; // Ignored by the driver. public bool AttachHostChDas; } } \ No newline at end of file diff --git a/Ryujinx.HLE/HOS/Services/Nv/NvHostChannel/NvHostChannelSubmit.cs b/Ryujinx.HLE/HOS/Services/Nv/NvDrvServices/NvHostChannel/Types/NvHostChannelSubmit.cs similarity index 81% rename from Ryujinx.HLE/HOS/Services/Nv/NvHostChannel/NvHostChannelSubmit.cs rename to Ryujinx.HLE/HOS/Services/Nv/NvDrvServices/NvHostChannel/Types/NvHostChannelSubmit.cs index f776ad8734..ef2f24e789 100644 --- a/Ryujinx.HLE/HOS/Services/Nv/NvHostChannel/NvHostChannelSubmit.cs +++ b/Ryujinx.HLE/HOS/Services/Nv/NvDrvServices/NvHostChannel/Types/NvHostChannelSubmit.cs @@ -1,6 +1,6 @@ using System.Runtime.InteropServices; -namespace Ryujinx.HLE.HOS.Services.Nv.NvHostChannel +namespace Ryujinx.HLE.HOS.Services.Nv.NvDrvServices.NvHostChannel { [StructLayout(LayoutKind.Sequential, Size = 8, Pack = 4)] struct NvHostChannelSubmit diff --git a/Ryujinx.HLE/HOS/Services/Nv/NvHostChannel/NvHostChannelSubmitGpfifo.cs b/Ryujinx.HLE/HOS/Services/Nv/NvDrvServices/NvHostChannel/Types/NvHostChannelSubmitGpfifo.cs similarity index 75% rename from Ryujinx.HLE/HOS/Services/Nv/NvHostChannel/NvHostChannelSubmitGpfifo.cs rename to Ryujinx.HLE/HOS/Services/Nv/NvDrvServices/NvHostChannel/Types/NvHostChannelSubmitGpfifo.cs index edebcfeb28..e8cb5f0f51 100644 --- a/Ryujinx.HLE/HOS/Services/Nv/NvHostChannel/NvHostChannelSubmitGpfifo.cs +++ b/Ryujinx.HLE/HOS/Services/Nv/NvDrvServices/NvHostChannel/Types/NvHostChannelSubmitGpfifo.cs @@ -1,4 +1,4 @@ -namespace Ryujinx.HLE.HOS.Services.Nv.NvHostChannel +namespace Ryujinx.HLE.HOS.Services.Nv.NvDrvServices.NvHostChannel { struct NvHostChannelSubmitGpfifo { diff --git a/Ryujinx.HLE/HOS/Services/Nv/NvHostCtrl/NvHostCtrlIoctl.cs b/Ryujinx.HLE/HOS/Services/Nv/NvDrvServices/NvHostCtrl/NvHostCtrlIoctl.cs similarity index 97% rename from Ryujinx.HLE/HOS/Services/Nv/NvHostCtrl/NvHostCtrlIoctl.cs rename to Ryujinx.HLE/HOS/Services/Nv/NvDrvServices/NvHostCtrl/NvHostCtrlIoctl.cs index 2a84b677f4..346e2dc769 100644 --- a/Ryujinx.HLE/HOS/Services/Nv/NvHostCtrl/NvHostCtrlIoctl.cs +++ b/Ryujinx.HLE/HOS/Services/Nv/NvDrvServices/NvHostCtrl/NvHostCtrlIoctl.cs @@ -1,12 +1,13 @@ using ARMeilleure.Memory; using Ryujinx.Common.Logging; using Ryujinx.HLE.HOS.Kernel.Process; +using Ryujinx.HLE.HOS.Services.Settings; using System; using System.Collections.Concurrent; using System.Text; using System.Threading; -namespace Ryujinx.HLE.HOS.Services.Nv.NvHostCtrl +namespace Ryujinx.HLE.HOS.Services.Nv.NvDrvServices.NvHostCtrl { class NvHostCtrlIoctl { @@ -18,7 +19,7 @@ namespace Ryujinx.HLE.HOS.Services.Nv.NvHostCtrl { _userCtxs = new ConcurrentDictionary(); - if (Set.NxSettings.Settings.TryGetValue("nv!rmos_set_production_mode", out object productionModeSetting)) + if (NxSettings.Settings.TryGetValue("nv!rmos_set_production_mode", out object productionModeSetting)) { _isProductionMode = ((string)productionModeSetting) != "0"; // Default value is "" } @@ -88,7 +89,7 @@ namespace Ryujinx.HLE.HOS.Services.Nv.NvHostCtrl string domain = MemoryHelper.ReadAsciiString(context.Memory, inputPosition + 0, 0x41); string name = MemoryHelper.ReadAsciiString(context.Memory, inputPosition + 0x41, 0x41); - if (Set.NxSettings.Settings.TryGetValue($"{domain}!{name}", out object nvSetting)) + if (NxSettings.Settings.TryGetValue($"{domain}!{name}", out object nvSetting)) { byte[] settingBuffer = new byte[0x101]; diff --git a/Ryujinx.HLE/HOS/Services/Nv/NvHostCtrl/NvHostCtrlSyncPtRead.cs b/Ryujinx.HLE/HOS/Services/Nv/NvDrvServices/NvHostCtrl/Types/NvHostCtrlSyncPtRead.cs similarity index 60% rename from Ryujinx.HLE/HOS/Services/Nv/NvHostCtrl/NvHostCtrlSyncPtRead.cs rename to Ryujinx.HLE/HOS/Services/Nv/NvDrvServices/NvHostCtrl/Types/NvHostCtrlSyncPtRead.cs index 275b613255..8cfac5719c 100644 --- a/Ryujinx.HLE/HOS/Services/Nv/NvHostCtrl/NvHostCtrlSyncPtRead.cs +++ b/Ryujinx.HLE/HOS/Services/Nv/NvDrvServices/NvHostCtrl/Types/NvHostCtrlSyncPtRead.cs @@ -1,4 +1,4 @@ -namespace Ryujinx.HLE.HOS.Services.Nv.NvHostCtrl +namespace Ryujinx.HLE.HOS.Services.Nv.NvDrvServices.NvHostCtrl { struct NvHostCtrlSyncptRead { diff --git a/Ryujinx.HLE/HOS/Services/Nv/NvHostCtrl/NvHostCtrlSyncPtWait.cs b/Ryujinx.HLE/HOS/Services/Nv/NvDrvServices/NvHostCtrl/Types/NvHostCtrlSyncPtWait.cs similarity index 66% rename from Ryujinx.HLE/HOS/Services/Nv/NvHostCtrl/NvHostCtrlSyncPtWait.cs rename to Ryujinx.HLE/HOS/Services/Nv/NvDrvServices/NvHostCtrl/Types/NvHostCtrlSyncPtWait.cs index 96e2f968cd..401884c46f 100644 --- a/Ryujinx.HLE/HOS/Services/Nv/NvHostCtrl/NvHostCtrlSyncPtWait.cs +++ b/Ryujinx.HLE/HOS/Services/Nv/NvDrvServices/NvHostCtrl/Types/NvHostCtrlSyncPtWait.cs @@ -1,4 +1,4 @@ -namespace Ryujinx.HLE.HOS.Services.Nv.NvHostCtrl +namespace Ryujinx.HLE.HOS.Services.Nv.NvDrvServices.NvHostCtrl { struct NvHostCtrlSyncptWait { diff --git a/Ryujinx.HLE/HOS/Services/Nv/NvHostCtrl/NvHostCtrlSyncPtWaitEx.cs b/Ryujinx.HLE/HOS/Services/Nv/NvDrvServices/NvHostCtrl/Types/NvHostCtrlSyncPtWaitEx.cs similarity index 70% rename from Ryujinx.HLE/HOS/Services/Nv/NvHostCtrl/NvHostCtrlSyncPtWaitEx.cs rename to Ryujinx.HLE/HOS/Services/Nv/NvDrvServices/NvHostCtrl/Types/NvHostCtrlSyncPtWaitEx.cs index 6aaa471831..49f573e267 100644 --- a/Ryujinx.HLE/HOS/Services/Nv/NvHostCtrl/NvHostCtrlSyncPtWaitEx.cs +++ b/Ryujinx.HLE/HOS/Services/Nv/NvDrvServices/NvHostCtrl/Types/NvHostCtrlSyncPtWaitEx.cs @@ -1,4 +1,4 @@ -namespace Ryujinx.HLE.HOS.Services.Nv.NvHostCtrl +namespace Ryujinx.HLE.HOS.Services.Nv.NvDrvServices.NvHostCtrl { struct NvHostCtrlSyncptWaitEx { diff --git a/Ryujinx.HLE/HOS/Services/Nv/NvHostCtrl/NvHostCtrlUserCtx.cs b/Ryujinx.HLE/HOS/Services/Nv/NvDrvServices/NvHostCtrl/Types/NvHostCtrlUserCtx.cs similarity index 86% rename from Ryujinx.HLE/HOS/Services/Nv/NvHostCtrl/NvHostCtrlUserCtx.cs rename to Ryujinx.HLE/HOS/Services/Nv/NvDrvServices/NvHostCtrl/Types/NvHostCtrlUserCtx.cs index fcb8083692..0b9d85cf92 100644 --- a/Ryujinx.HLE/HOS/Services/Nv/NvHostCtrl/NvHostCtrlUserCtx.cs +++ b/Ryujinx.HLE/HOS/Services/Nv/NvDrvServices/NvHostCtrl/Types/NvHostCtrlUserCtx.cs @@ -1,4 +1,4 @@ -namespace Ryujinx.HLE.HOS.Services.Nv.NvHostCtrl +namespace Ryujinx.HLE.HOS.Services.Nv.NvDrvServices.NvHostCtrl { class NvHostCtrlUserCtx { diff --git a/Ryujinx.HLE/HOS/Services/Nv/NvHostCtrl/NvHostEvent.cs b/Ryujinx.HLE/HOS/Services/Nv/NvDrvServices/NvHostCtrl/Types/NvHostEvent.cs similarity index 66% rename from Ryujinx.HLE/HOS/Services/Nv/NvHostCtrl/NvHostEvent.cs rename to Ryujinx.HLE/HOS/Services/Nv/NvDrvServices/NvHostCtrl/Types/NvHostEvent.cs index 71e5f1e63b..c10e256ec2 100644 --- a/Ryujinx.HLE/HOS/Services/Nv/NvHostCtrl/NvHostEvent.cs +++ b/Ryujinx.HLE/HOS/Services/Nv/NvDrvServices/NvHostCtrl/Types/NvHostEvent.cs @@ -1,4 +1,4 @@ -namespace Ryujinx.HLE.HOS.Services.Nv.NvHostCtrl +namespace Ryujinx.HLE.HOS.Services.Nv.NvDrvServices.NvHostCtrl { class NvHostEvent { diff --git a/Ryujinx.HLE/HOS/Services/Nv/NvHostCtrl/NvHostEventState.cs b/Ryujinx.HLE/HOS/Services/Nv/NvDrvServices/NvHostCtrl/Types/NvHostEventState.cs similarity index 68% rename from Ryujinx.HLE/HOS/Services/Nv/NvHostCtrl/NvHostEventState.cs rename to Ryujinx.HLE/HOS/Services/Nv/NvDrvServices/NvHostCtrl/Types/NvHostEventState.cs index 61870c7f92..521ae9addb 100644 --- a/Ryujinx.HLE/HOS/Services/Nv/NvHostCtrl/NvHostEventState.cs +++ b/Ryujinx.HLE/HOS/Services/Nv/NvDrvServices/NvHostCtrl/Types/NvHostEventState.cs @@ -1,4 +1,4 @@ -namespace Ryujinx.HLE.HOS.Services.Nv.NvHostCtrl +namespace Ryujinx.HLE.HOS.Services.Nv.NvDrvServices.NvHostCtrl { enum NvHostEventState { diff --git a/Ryujinx.HLE/HOS/Services/Nv/NvHostCtrl/NvHostSyncPt.cs b/Ryujinx.HLE/HOS/Services/Nv/NvDrvServices/NvHostCtrl/Types/NvHostSyncPt.cs similarity index 97% rename from Ryujinx.HLE/HOS/Services/Nv/NvHostCtrl/NvHostSyncPt.cs rename to Ryujinx.HLE/HOS/Services/Nv/NvDrvServices/NvHostCtrl/Types/NvHostSyncPt.cs index d27f7c5348..8ef45043ff 100644 --- a/Ryujinx.HLE/HOS/Services/Nv/NvHostCtrl/NvHostSyncPt.cs +++ b/Ryujinx.HLE/HOS/Services/Nv/NvDrvServices/NvHostCtrl/Types/NvHostSyncPt.cs @@ -3,7 +3,7 @@ using System.Collections.Concurrent; using System.Collections.Generic; using System.Threading; -namespace Ryujinx.HLE.HOS.Services.Nv.NvHostCtrl +namespace Ryujinx.HLE.HOS.Services.Nv.NvDrvServices.NvHostCtrl { class NvHostSyncpt { diff --git a/Ryujinx.HLE/HOS/Services/Nv/NvMap/NvMapIoctl.cs b/Ryujinx.HLE/HOS/Services/Nv/NvDrvServices/NvMap/NvMapIoctl.cs similarity index 99% rename from Ryujinx.HLE/HOS/Services/Nv/NvMap/NvMapIoctl.cs rename to Ryujinx.HLE/HOS/Services/Nv/NvDrvServices/NvMap/NvMapIoctl.cs index d9c579a2ad..0b5be6e8a4 100644 --- a/Ryujinx.HLE/HOS/Services/Nv/NvMap/NvMapIoctl.cs +++ b/Ryujinx.HLE/HOS/Services/Nv/NvDrvServices/NvMap/NvMapIoctl.cs @@ -5,7 +5,7 @@ using Ryujinx.HLE.HOS.Kernel.Process; using Ryujinx.HLE.Utilities; using System.Collections.Concurrent; -namespace Ryujinx.HLE.HOS.Services.Nv.NvMap +namespace Ryujinx.HLE.HOS.Services.Nv.NvDrvServices.NvMap { class NvMapIoctl { diff --git a/Ryujinx.HLE/HOS/Services/Nv/NvMap/NvMapAlloc.cs b/Ryujinx.HLE/HOS/Services/Nv/NvDrvServices/NvMap/Types/NvMapAlloc.cs similarity index 77% rename from Ryujinx.HLE/HOS/Services/Nv/NvMap/NvMapAlloc.cs rename to Ryujinx.HLE/HOS/Services/Nv/NvDrvServices/NvMap/Types/NvMapAlloc.cs index bc61baade7..f449b60675 100644 --- a/Ryujinx.HLE/HOS/Services/Nv/NvMap/NvMapAlloc.cs +++ b/Ryujinx.HLE/HOS/Services/Nv/NvDrvServices/NvMap/Types/NvMapAlloc.cs @@ -1,4 +1,4 @@ -namespace Ryujinx.HLE.HOS.Services.Nv.NvMap +namespace Ryujinx.HLE.HOS.Services.Nv.NvDrvServices.NvMap { struct NvMapAlloc { diff --git a/Ryujinx.HLE/HOS/Services/Nv/NvMap/NvMapCreate.cs b/Ryujinx.HLE/HOS/Services/Nv/NvDrvServices/NvMap/Types/NvMapCreate.cs similarity index 60% rename from Ryujinx.HLE/HOS/Services/Nv/NvMap/NvMapCreate.cs rename to Ryujinx.HLE/HOS/Services/Nv/NvDrvServices/NvMap/Types/NvMapCreate.cs index dd4bff9890..b1ccf1bc9a 100644 --- a/Ryujinx.HLE/HOS/Services/Nv/NvMap/NvMapCreate.cs +++ b/Ryujinx.HLE/HOS/Services/Nv/NvDrvServices/NvMap/Types/NvMapCreate.cs @@ -1,4 +1,4 @@ -namespace Ryujinx.HLE.HOS.Services.Nv.NvMap +namespace Ryujinx.HLE.HOS.Services.Nv.NvDrvServices.NvMap { struct NvMapCreate { diff --git a/Ryujinx.HLE/HOS/Services/Nv/NvMap/NvMapFree.cs b/Ryujinx.HLE/HOS/Services/Nv/NvDrvServices/NvMap/Types/NvMapFree.cs similarity index 75% rename from Ryujinx.HLE/HOS/Services/Nv/NvMap/NvMapFree.cs rename to Ryujinx.HLE/HOS/Services/Nv/NvDrvServices/NvMap/Types/NvMapFree.cs index d946987ef9..1d17c3a7d4 100644 --- a/Ryujinx.HLE/HOS/Services/Nv/NvMap/NvMapFree.cs +++ b/Ryujinx.HLE/HOS/Services/Nv/NvDrvServices/NvMap/Types/NvMapFree.cs @@ -1,4 +1,4 @@ -namespace Ryujinx.HLE.HOS.Services.Nv.NvMap +namespace Ryujinx.HLE.HOS.Services.Nv.NvDrvServices.NvMap { struct NvMapFree { diff --git a/Ryujinx.HLE/HOS/Services/Nv/NvMap/NvMapFromId.cs b/Ryujinx.HLE/HOS/Services/Nv/NvDrvServices/NvMap/Types/NvMapFromId.cs similarity index 60% rename from Ryujinx.HLE/HOS/Services/Nv/NvMap/NvMapFromId.cs rename to Ryujinx.HLE/HOS/Services/Nv/NvDrvServices/NvMap/Types/NvMapFromId.cs index e49257ea6d..7f7f83ab87 100644 --- a/Ryujinx.HLE/HOS/Services/Nv/NvMap/NvMapFromId.cs +++ b/Ryujinx.HLE/HOS/Services/Nv/NvDrvServices/NvMap/Types/NvMapFromId.cs @@ -1,4 +1,4 @@ -namespace Ryujinx.HLE.HOS.Services.Nv.NvMap +namespace Ryujinx.HLE.HOS.Services.Nv.NvDrvServices.NvMap { struct NvMapFromId { diff --git a/Ryujinx.HLE/HOS/Services/Nv/NvMap/NvMapGetId.cs b/Ryujinx.HLE/HOS/Services/Nv/NvDrvServices/NvMap/Types/NvMapGetId.cs similarity index 60% rename from Ryujinx.HLE/HOS/Services/Nv/NvMap/NvMapGetId.cs rename to Ryujinx.HLE/HOS/Services/Nv/NvDrvServices/NvMap/Types/NvMapGetId.cs index 1f4f32900f..df8fff5385 100644 --- a/Ryujinx.HLE/HOS/Services/Nv/NvMap/NvMapGetId.cs +++ b/Ryujinx.HLE/HOS/Services/Nv/NvDrvServices/NvMap/Types/NvMapGetId.cs @@ -1,4 +1,4 @@ -namespace Ryujinx.HLE.HOS.Services.Nv.NvMap +namespace Ryujinx.HLE.HOS.Services.Nv.NvDrvServices.NvMap { struct NvMapGetId { diff --git a/Ryujinx.HLE/HOS/Services/Nv/NvMap/NvMapHandle.cs b/Ryujinx.HLE/HOS/Services/Nv/NvDrvServices/NvMap/Types/NvMapHandle.cs similarity index 92% rename from Ryujinx.HLE/HOS/Services/Nv/NvMap/NvMapHandle.cs rename to Ryujinx.HLE/HOS/Services/Nv/NvDrvServices/NvMap/Types/NvMapHandle.cs index 31bf8329bd..3903b77c02 100644 --- a/Ryujinx.HLE/HOS/Services/Nv/NvMap/NvMapHandle.cs +++ b/Ryujinx.HLE/HOS/Services/Nv/NvDrvServices/NvMap/Types/NvMapHandle.cs @@ -1,6 +1,6 @@ using System.Threading; -namespace Ryujinx.HLE.HOS.Services.Nv.NvMap +namespace Ryujinx.HLE.HOS.Services.Nv.NvDrvServices.NvMap { class NvMapHandle { diff --git a/Ryujinx.HLE/HOS/Services/Nv/NvMap/NvMapHandleParam.cs b/Ryujinx.HLE/HOS/Services/Nv/NvDrvServices/NvMap/Types/NvMapHandleParam.cs similarity index 72% rename from Ryujinx.HLE/HOS/Services/Nv/NvMap/NvMapHandleParam.cs rename to Ryujinx.HLE/HOS/Services/Nv/NvDrvServices/NvMap/Types/NvMapHandleParam.cs index b360343cd1..9eb7efff95 100644 --- a/Ryujinx.HLE/HOS/Services/Nv/NvMap/NvMapHandleParam.cs +++ b/Ryujinx.HLE/HOS/Services/Nv/NvDrvServices/NvMap/Types/NvMapHandleParam.cs @@ -1,4 +1,4 @@ -namespace Ryujinx.HLE.HOS.Services.Nv.NvMap +namespace Ryujinx.HLE.HOS.Services.Nv.NvDrvServices.NvMap { enum NvMapHandleParam { diff --git a/Ryujinx.HLE/HOS/Services/Nv/NvMap/NvMapParam.cs b/Ryujinx.HLE/HOS/Services/Nv/NvDrvServices/NvMap/Types/NvMapParam.cs similarity index 66% rename from Ryujinx.HLE/HOS/Services/Nv/NvMap/NvMapParam.cs rename to Ryujinx.HLE/HOS/Services/Nv/NvDrvServices/NvMap/Types/NvMapParam.cs index b5213efe59..c873a0d24b 100644 --- a/Ryujinx.HLE/HOS/Services/Nv/NvMap/NvMapParam.cs +++ b/Ryujinx.HLE/HOS/Services/Nv/NvDrvServices/NvMap/Types/NvMapParam.cs @@ -1,4 +1,4 @@ -namespace Ryujinx.HLE.HOS.Services.Nv.NvMap +namespace Ryujinx.HLE.HOS.Services.Nv.NvDrvServices.NvMap { struct NvMapParam { diff --git a/Ryujinx.HLE/HOS/Services/Nv/NvFd.cs b/Ryujinx.HLE/HOS/Services/Nv/Types/NvFd.cs similarity index 100% rename from Ryujinx.HLE/HOS/Services/Nv/NvFd.cs rename to Ryujinx.HLE/HOS/Services/Nv/Types/NvFd.cs diff --git a/Ryujinx.HLE/HOS/Services/Nv/NvResult.cs b/Ryujinx.HLE/HOS/Services/Nv/Types/NvResult.cs similarity index 100% rename from Ryujinx.HLE/HOS/Services/Nv/NvResult.cs rename to Ryujinx.HLE/HOS/Services/Nv/Types/NvResult.cs diff --git a/Ryujinx.HLE/HOS/Services/Olsc/IOlscServiceForSystemService.cs b/Ryujinx.HLE/HOS/Services/Olsc/IOlscServiceForSystemService.cs new file mode 100644 index 0000000000..52f74da929 --- /dev/null +++ b/Ryujinx.HLE/HOS/Services/Olsc/IOlscServiceForSystemService.cs @@ -0,0 +1,8 @@ +namespace Ryujinx.HLE.HOS.Services.Olsc +{ + [Service("olsc:s")] // 4.0.0+ + class IOlscServiceForSystemService : IpcService + { + public IOlscServiceForSystemService(ServiceCtx context) { } + } +} \ No newline at end of file diff --git a/Ryujinx.HLE/HOS/Services/Ovln/IReceiverService.cs b/Ryujinx.HLE/HOS/Services/Ovln/IReceiverService.cs new file mode 100644 index 0000000000..67b82e4248 --- /dev/null +++ b/Ryujinx.HLE/HOS/Services/Ovln/IReceiverService.cs @@ -0,0 +1,8 @@ +namespace Ryujinx.HLE.HOS.Services.Ovln +{ + [Service("ovln:rcv")] + class IReceiverService : IpcService + { + public IReceiverService(ServiceCtx context) { } + } +} \ No newline at end of file diff --git a/Ryujinx.HLE/HOS/Services/Ovln/ISenderService.cs b/Ryujinx.HLE/HOS/Services/Ovln/ISenderService.cs new file mode 100644 index 0000000000..70c860e1c4 --- /dev/null +++ b/Ryujinx.HLE/HOS/Services/Ovln/ISenderService.cs @@ -0,0 +1,8 @@ +namespace Ryujinx.HLE.HOS.Services.Ovln +{ + [Service("ovln:snd")] + class ISenderService : IpcService + { + public ISenderService(ServiceCtx context) { } + } +} \ No newline at end of file diff --git a/Ryujinx.HLE/HOS/Services/Pcie/ILogManager.cs b/Ryujinx.HLE/HOS/Services/Pcie/ILogManager.cs new file mode 100644 index 0000000000..9c6387e15f --- /dev/null +++ b/Ryujinx.HLE/HOS/Services/Pcie/ILogManager.cs @@ -0,0 +1,8 @@ +namespace Ryujinx.HLE.HOS.Services.Pcie +{ + [Service("pcie:log")] + class ILogManager : IpcService + { + public ILogManager(ServiceCtx context) { } + } +} \ No newline at end of file diff --git a/Ryujinx.HLE/HOS/Services/Pcie/IManager.cs b/Ryujinx.HLE/HOS/Services/Pcie/IManager.cs new file mode 100644 index 0000000000..f189dc8c8a --- /dev/null +++ b/Ryujinx.HLE/HOS/Services/Pcie/IManager.cs @@ -0,0 +1,8 @@ +namespace Ryujinx.HLE.HOS.Services.Pcie +{ + [Service("pcie")] + class IManager : IpcService + { + public IManager(ServiceCtx context) { } + } +} \ No newline at end of file diff --git a/Ryujinx.HLE/HOS/Services/Pctl/IParentalControlServiceFactory.cs b/Ryujinx.HLE/HOS/Services/Pctl/IParentalControlServiceFactory.cs index b67543dd88..678279f934 100644 --- a/Ryujinx.HLE/HOS/Services/Pctl/IParentalControlServiceFactory.cs +++ b/Ryujinx.HLE/HOS/Services/Pctl/IParentalControlServiceFactory.cs @@ -1,3 +1,5 @@ +using Ryujinx.HLE.HOS.Services.Pctl.ParentalControlServiceFactory; + namespace Ryujinx.HLE.HOS.Services.Pctl { [Service("pctl")] diff --git a/Ryujinx.HLE/HOS/Services/Pctl/IParentalControlService.cs b/Ryujinx.HLE/HOS/Services/Pctl/ParentalControlServiceFactory/IParentalControlService.cs similarity index 93% rename from Ryujinx.HLE/HOS/Services/Pctl/IParentalControlService.cs rename to Ryujinx.HLE/HOS/Services/Pctl/ParentalControlServiceFactory/IParentalControlService.cs index e9cc72c158..0e7c8432bc 100644 --- a/Ryujinx.HLE/HOS/Services/Pctl/IParentalControlService.cs +++ b/Ryujinx.HLE/HOS/Services/Pctl/ParentalControlServiceFactory/IParentalControlService.cs @@ -1,6 +1,6 @@ using Ryujinx.Common.Logging; -namespace Ryujinx.HLE.HOS.Services.Pctl +namespace Ryujinx.HLE.HOS.Services.Pctl.ParentalControlServiceFactory { class IParentalControlService : IpcService { diff --git a/Ryujinx.HLE/HOS/Services/Pcv/Bpc/IBoardPowerControlManager.cs b/Ryujinx.HLE/HOS/Services/Pcv/Bpc/IBoardPowerControlManager.cs new file mode 100644 index 0000000000..7d0222d551 --- /dev/null +++ b/Ryujinx.HLE/HOS/Services/Pcv/Bpc/IBoardPowerControlManager.cs @@ -0,0 +1,8 @@ +namespace Ryujinx.HLE.HOS.Services.Pcv.Bpc +{ + [Service("bpc")] + class IBoardPowerControlManager : IpcService + { + public IBoardPowerControlManager(ServiceCtx context) { } + } +} \ No newline at end of file diff --git a/Ryujinx.HLE/HOS/Services/Bpc/IRtcManager.cs b/Ryujinx.HLE/HOS/Services/Pcv/Bpc/IRtcManager.cs similarity index 90% rename from Ryujinx.HLE/HOS/Services/Bpc/IRtcManager.cs rename to Ryujinx.HLE/HOS/Services/Pcv/Bpc/IRtcManager.cs index 5ff9410a26..3b775da82f 100644 --- a/Ryujinx.HLE/HOS/Services/Bpc/IRtcManager.cs +++ b/Ryujinx.HLE/HOS/Services/Pcv/Bpc/IRtcManager.cs @@ -1,8 +1,8 @@ using System; -namespace Ryujinx.HLE.HOS.Services.Bpc +namespace Ryujinx.HLE.HOS.Services.Pcv.Bpc { - [Service("bpc:r")] + [Service("bpc:r")] // 1.0.0 - 8.1.0 class IRtcManager : IpcService { public IRtcManager(ServiceCtx context) { } diff --git a/Ryujinx.HLE/HOS/Services/Pcv/Clkrst/IArbitrationManager.cs b/Ryujinx.HLE/HOS/Services/Pcv/Clkrst/IArbitrationManager.cs new file mode 100644 index 0000000000..6f1e5d25d5 --- /dev/null +++ b/Ryujinx.HLE/HOS/Services/Pcv/Clkrst/IArbitrationManager.cs @@ -0,0 +1,8 @@ +namespace Ryujinx.HLE.HOS.Services.Pcv.Clkrst +{ + [Service("clkrst:a")] // 8.0.0+ + class IArbitrationManager : IpcService + { + public IArbitrationManager(ServiceCtx context) { } + } +} \ No newline at end of file diff --git a/Ryujinx.HLE/HOS/Services/Pcv/Clkrst/IClkrstManager.cs b/Ryujinx.HLE/HOS/Services/Pcv/Clkrst/IClkrstManager.cs new file mode 100644 index 0000000000..a82e8a94f8 --- /dev/null +++ b/Ryujinx.HLE/HOS/Services/Pcv/Clkrst/IClkrstManager.cs @@ -0,0 +1,9 @@ +namespace Ryujinx.HLE.HOS.Services.Pcv.Clkrst +{ + [Service("clkrst")] // 8.0.0+ + [Service("clkrst:i")] // 8.0.0+ + class IClkrstManager : IpcService + { + public IClkrstManager(ServiceCtx context) { } + } +} \ No newline at end of file diff --git a/Ryujinx.HLE/HOS/Services/Pcv/IPcvService.cs b/Ryujinx.HLE/HOS/Services/Pcv/IPcvService.cs new file mode 100644 index 0000000000..0e74dc3e5a --- /dev/null +++ b/Ryujinx.HLE/HOS/Services/Pcv/IPcvService.cs @@ -0,0 +1,8 @@ +namespace Ryujinx.HLE.HOS.Services.Pcv +{ + [Service("pcv")] + class IPcvService : IpcService + { + public IPcvService(ServiceCtx context) { } + } +} \ No newline at end of file diff --git a/Ryujinx.HLE/HOS/Services/Pcv/Rgltr/IRegulatorManager.cs b/Ryujinx.HLE/HOS/Services/Pcv/Rgltr/IRegulatorManager.cs new file mode 100644 index 0000000000..f7834777e7 --- /dev/null +++ b/Ryujinx.HLE/HOS/Services/Pcv/Rgltr/IRegulatorManager.cs @@ -0,0 +1,8 @@ +namespace Ryujinx.HLE.HOS.Services.Pcv.Rgltr +{ + [Service("rgltr")] // 8.0.0+ + class IRegulatorManager : IpcService + { + public IRegulatorManager(ServiceCtx context) { } + } +} \ No newline at end of file diff --git a/Ryujinx.HLE/HOS/Services/Pcv/Rtc/IUnknown1.cs b/Ryujinx.HLE/HOS/Services/Pcv/Rtc/IUnknown1.cs new file mode 100644 index 0000000000..0f73f9501e --- /dev/null +++ b/Ryujinx.HLE/HOS/Services/Pcv/Rtc/IUnknown1.cs @@ -0,0 +1,8 @@ +namespace Ryujinx.HLE.HOS.Services.Pcv.Rtc +{ + [Service("rtc")] // 8.0.0+ + class IUnknown1 : IpcService + { + public IUnknown1(ServiceCtx context) { } + } +} \ No newline at end of file diff --git a/Ryujinx.HLE/HOS/Services/Pm/IBootModeInterface.cs b/Ryujinx.HLE/HOS/Services/Pm/IBootModeInterface.cs new file mode 100644 index 0000000000..45771db6bd --- /dev/null +++ b/Ryujinx.HLE/HOS/Services/Pm/IBootModeInterface.cs @@ -0,0 +1,8 @@ +namespace Ryujinx.HLE.HOS.Services.Pm +{ + [Service("pm:bm")] + class IBootModeInterface : IpcService + { + public IBootModeInterface(ServiceCtx context) { } + } +} \ No newline at end of file diff --git a/Ryujinx.HLE/HOS/Services/Pm/IDebugMonitorInterface.cs b/Ryujinx.HLE/HOS/Services/Pm/IDebugMonitorInterface.cs new file mode 100644 index 0000000000..06c1194367 --- /dev/null +++ b/Ryujinx.HLE/HOS/Services/Pm/IDebugMonitorInterface.cs @@ -0,0 +1,8 @@ +namespace Ryujinx.HLE.HOS.Services.Pm +{ + [Service("pm:dmnt")] + class IDebugMonitorInterface : IpcService + { + public IDebugMonitorInterface(ServiceCtx context) { } + } +} \ No newline at end of file diff --git a/Ryujinx.HLE/HOS/Services/Prepo/IPrepoService.cs b/Ryujinx.HLE/HOS/Services/Prepo/IPrepoService.cs index 9fc9c115d2..94c027ab3b 100644 --- a/Ryujinx.HLE/HOS/Services/Prepo/IPrepoService.cs +++ b/Ryujinx.HLE/HOS/Services/Prepo/IPrepoService.cs @@ -3,6 +3,7 @@ using Ryujinx.Common.Logging; namespace Ryujinx.HLE.HOS.Services.Prepo { [Service("prepo:a")] + [Service("prepo:a2")] [Service("prepo:u")] class IPrepoService : IpcService { diff --git a/Ryujinx.HLE/HOS/Services/Psc/IPmControl.cs b/Ryujinx.HLE/HOS/Services/Psc/IPmControl.cs new file mode 100644 index 0000000000..3810c28262 --- /dev/null +++ b/Ryujinx.HLE/HOS/Services/Psc/IPmControl.cs @@ -0,0 +1,8 @@ +namespace Ryujinx.HLE.HOS.Services.Psc +{ + [Service("psc:c")] + class IPmControl : IpcService + { + public IPmControl(ServiceCtx context) { } + } +} \ No newline at end of file diff --git a/Ryujinx.HLE/HOS/Services/Psc/IPmService.cs b/Ryujinx.HLE/HOS/Services/Psc/IPmService.cs new file mode 100644 index 0000000000..c8dfb32e01 --- /dev/null +++ b/Ryujinx.HLE/HOS/Services/Psc/IPmService.cs @@ -0,0 +1,8 @@ +namespace Ryujinx.HLE.HOS.Services.Psc +{ + [Service("psc:m")] + class IPmService : IpcService + { + public IPmService(ServiceCtx context) { } + } +} \ No newline at end of file diff --git a/Ryujinx.HLE/HOS/Services/Psc/IPmUnknown.cs b/Ryujinx.HLE/HOS/Services/Psc/IPmUnknown.cs new file mode 100644 index 0000000000..ef48fa41ee --- /dev/null +++ b/Ryujinx.HLE/HOS/Services/Psc/IPmUnknown.cs @@ -0,0 +1,8 @@ +namespace Ryujinx.HLE.HOS.Services.Psc +{ + [Service("psc:l")] // 9.0.0+ + class IPmUnknown : IpcService + { + public IPmUnknown(ServiceCtx context) { } + } +} \ No newline at end of file diff --git a/Ryujinx.HLE/HOS/Services/Ptm/Fan/IManager.cs b/Ryujinx.HLE/HOS/Services/Ptm/Fan/IManager.cs new file mode 100644 index 0000000000..e2fe223569 --- /dev/null +++ b/Ryujinx.HLE/HOS/Services/Ptm/Fan/IManager.cs @@ -0,0 +1,8 @@ +namespace Ryujinx.HLE.HOS.Services.Ptm.Fan +{ + [Service("fan")] + class IManager : IpcService + { + public IManager(ServiceCtx context) { } + } +} \ No newline at end of file diff --git a/Ryujinx.HLE/HOS/Services/Ptm/Fgm/IDebugger.cs b/Ryujinx.HLE/HOS/Services/Ptm/Fgm/IDebugger.cs new file mode 100644 index 0000000000..a93f528301 --- /dev/null +++ b/Ryujinx.HLE/HOS/Services/Ptm/Fgm/IDebugger.cs @@ -0,0 +1,8 @@ +namespace Ryujinx.HLE.HOS.Services.Ptm.Fgm +{ + [Service("fgm:dbg")] // 9.0.0+ + class IDebugger : IpcService + { + public IDebugger(ServiceCtx context) { } + } +} \ No newline at end of file diff --git a/Ryujinx.HLE/HOS/Services/Ptm/Fgm/ISession.cs b/Ryujinx.HLE/HOS/Services/Ptm/Fgm/ISession.cs new file mode 100644 index 0000000000..0e3f965b34 --- /dev/null +++ b/Ryujinx.HLE/HOS/Services/Ptm/Fgm/ISession.cs @@ -0,0 +1,10 @@ +namespace Ryujinx.HLE.HOS.Services.Ptm.Fgm +{ + [Service("fgm")] // 9.0.0+ + [Service("fgm:0")] // 9.0.0+ + [Service("fgm:9")] // 9.0.0+ + class ISession : IpcService + { + public ISession(ServiceCtx context) { } + } +} \ No newline at end of file diff --git a/Ryujinx.HLE/HOS/Services/Ptm/Pcm/IManager.cs b/Ryujinx.HLE/HOS/Services/Ptm/Pcm/IManager.cs new file mode 100644 index 0000000000..0bec45fa38 --- /dev/null +++ b/Ryujinx.HLE/HOS/Services/Ptm/Pcm/IManager.cs @@ -0,0 +1,8 @@ +namespace Ryujinx.HLE.HOS.Services.Ptm.Pcm +{ + [Service("pcm")] + class IManager : IpcService + { + public IManager(ServiceCtx context) { } + } +} \ No newline at end of file diff --git a/Ryujinx.HLE/HOS/Services/Psm/IPsmServer.cs b/Ryujinx.HLE/HOS/Services/Ptm/Psm/IPsmServer.cs similarity index 88% rename from Ryujinx.HLE/HOS/Services/Psm/IPsmServer.cs rename to Ryujinx.HLE/HOS/Services/Ptm/Psm/IPsmServer.cs index 8dab66a19a..9511e79d33 100644 --- a/Ryujinx.HLE/HOS/Services/Psm/IPsmServer.cs +++ b/Ryujinx.HLE/HOS/Services/Ptm/Psm/IPsmServer.cs @@ -1,17 +1,10 @@ using Ryujinx.Common.Logging; -namespace Ryujinx.HLE.HOS.Services.Psm +namespace Ryujinx.HLE.HOS.Services.Ptm.Psm { [Service("psm")] class IPsmServer : IpcService { - enum ChargerType - { - None, - ChargerOrDock, - UsbC - } - public IPsmServer(ServiceCtx context) { } [Command(0)] diff --git a/Ryujinx.HLE/HOS/Services/Psm/IPsmSession.cs b/Ryujinx.HLE/HOS/Services/Ptm/Psm/IPsmSession.cs similarity index 98% rename from Ryujinx.HLE/HOS/Services/Psm/IPsmSession.cs rename to Ryujinx.HLE/HOS/Services/Ptm/Psm/IPsmSession.cs index db4e0b7568..e41d6c376f 100644 --- a/Ryujinx.HLE/HOS/Services/Psm/IPsmSession.cs +++ b/Ryujinx.HLE/HOS/Services/Ptm/Psm/IPsmSession.cs @@ -3,7 +3,7 @@ using Ryujinx.HLE.HOS.Ipc; using Ryujinx.HLE.HOS.Kernel.Common; using Ryujinx.HLE.HOS.Kernel.Threading; -namespace Ryujinx.HLE.HOS.Services.Psm +namespace Ryujinx.HLE.HOS.Services.Ptm.Psm { class IPsmSession : IpcService { diff --git a/Ryujinx.HLE/HOS/Services/Ptm/Psm/Types/ChargerType.cs b/Ryujinx.HLE/HOS/Services/Ptm/Psm/Types/ChargerType.cs new file mode 100644 index 0000000000..3e239711d9 --- /dev/null +++ b/Ryujinx.HLE/HOS/Services/Ptm/Psm/Types/ChargerType.cs @@ -0,0 +1,9 @@ +namespace Ryujinx.HLE.HOS.Services.Ptm.Psm +{ + enum ChargerType + { + None, + ChargerOrDock, + UsbC + } +} \ No newline at end of file diff --git a/Ryujinx.HLE/HOS/Services/Ptm/Tc/IManager.cs b/Ryujinx.HLE/HOS/Services/Ptm/Tc/IManager.cs new file mode 100644 index 0000000000..1daa4f5e82 --- /dev/null +++ b/Ryujinx.HLE/HOS/Services/Ptm/Tc/IManager.cs @@ -0,0 +1,8 @@ +namespace Ryujinx.HLE.HOS.Services.Ptm.Tc +{ + [Service("tc")] + class IManager : IpcService + { + public IManager(ServiceCtx context) { } + } +} \ No newline at end of file diff --git a/Ryujinx.HLE/HOS/Services/Ptm/Ts/IMeasurementServer.cs b/Ryujinx.HLE/HOS/Services/Ptm/Ts/IMeasurementServer.cs new file mode 100644 index 0000000000..f3b37d67df --- /dev/null +++ b/Ryujinx.HLE/HOS/Services/Ptm/Ts/IMeasurementServer.cs @@ -0,0 +1,8 @@ +namespace Ryujinx.HLE.HOS.Services.Ptm.Ts +{ + [Service("ts")] + class IMeasurementServer : IpcService + { + public IMeasurementServer(ServiceCtx context) { } + } +} \ No newline at end of file diff --git a/Ryujinx.HLE/HOS/Services/Sdb/Avm/IAvmService.cs b/Ryujinx.HLE/HOS/Services/Sdb/Avm/IAvmService.cs new file mode 100644 index 0000000000..d65c8bbae4 --- /dev/null +++ b/Ryujinx.HLE/HOS/Services/Sdb/Avm/IAvmService.cs @@ -0,0 +1,8 @@ +namespace Ryujinx.HLE.HOS.Services.Am.Tcap +{ + [Service("avm")] // 6.0.0+ + class IAvmService : IpcService + { + public IAvmService(ServiceCtx context) { } + } +} \ No newline at end of file diff --git a/Ryujinx.HLE/HOS/Services/Sdb/Mii/IImageDatabaseService.cs b/Ryujinx.HLE/HOS/Services/Sdb/Mii/IImageDatabaseService.cs new file mode 100644 index 0000000000..b084714c5a --- /dev/null +++ b/Ryujinx.HLE/HOS/Services/Sdb/Mii/IImageDatabaseService.cs @@ -0,0 +1,8 @@ +namespace Ryujinx.HLE.HOS.Services.Sdb.Mii +{ + [Service("miiimg")] // 5.0.0+ + class IImageDatabaseService : IpcService + { + public IImageDatabaseService(ServiceCtx context) { } + } +} \ No newline at end of file diff --git a/Ryujinx.HLE/HOS/Services/Sdb/Mii/IStaticService.cs b/Ryujinx.HLE/HOS/Services/Sdb/Mii/IStaticService.cs new file mode 100644 index 0000000000..6c156d9421 --- /dev/null +++ b/Ryujinx.HLE/HOS/Services/Sdb/Mii/IStaticService.cs @@ -0,0 +1,9 @@ +namespace Ryujinx.HLE.HOS.Services.Sdb.Mii +{ + [Service("mii:e")] + [Service("mii:u")] + class IStaticService : IpcService + { + public IStaticService(ServiceCtx context) { } + } +} \ No newline at end of file diff --git a/Ryujinx.HLE/HOS/Services/Sdb/Pdm/INotifyService.cs b/Ryujinx.HLE/HOS/Services/Sdb/Pdm/INotifyService.cs new file mode 100644 index 0000000000..5247a238db --- /dev/null +++ b/Ryujinx.HLE/HOS/Services/Sdb/Pdm/INotifyService.cs @@ -0,0 +1,8 @@ +namespace Ryujinx.HLE.HOS.Services.Sdb.Pdm +{ + [Service("pdm:ntfy")] + class INotifyService : IpcService + { + public INotifyService(ServiceCtx context) { } + } +} \ No newline at end of file diff --git a/Ryujinx.HLE/HOS/Services/Sdb/Pdm/IQueryService.cs b/Ryujinx.HLE/HOS/Services/Sdb/Pdm/IQueryService.cs new file mode 100644 index 0000000000..61b26b8c1f --- /dev/null +++ b/Ryujinx.HLE/HOS/Services/Sdb/Pdm/IQueryService.cs @@ -0,0 +1,8 @@ +namespace Ryujinx.HLE.HOS.Services.Sdb.Pdm +{ + [Service("pdm:qry")] + class IQueryService : IpcService + { + public IQueryService(ServiceCtx context) { } + } +} \ No newline at end of file diff --git a/Ryujinx.HLE/HOS/Services/Pl/ISharedFontManager.cs b/Ryujinx.HLE/HOS/Services/Sdb/Pl/ISharedFontManager.cs similarity index 98% rename from Ryujinx.HLE/HOS/Services/Pl/ISharedFontManager.cs rename to Ryujinx.HLE/HOS/Services/Sdb/Pl/ISharedFontManager.cs index a5e3e52a05..4560d9545c 100644 --- a/Ryujinx.HLE/HOS/Services/Pl/ISharedFontManager.cs +++ b/Ryujinx.HLE/HOS/Services/Sdb/Pl/ISharedFontManager.cs @@ -3,9 +3,10 @@ using Ryujinx.HLE.HOS.Ipc; using Ryujinx.HLE.HOS.Kernel.Common; using System; -namespace Ryujinx.HLE.HOS.Services.Pl +namespace Ryujinx.HLE.HOS.Services.Sdb.Pl { [Service("pl:u")] + [Service("pl:s")] // 9.0.0+ class ISharedFontManager : IpcService { public ISharedFontManager(ServiceCtx context) { } diff --git a/Ryujinx.HLE/HOS/Services/Settings/IFactorySettingsServer.cs b/Ryujinx.HLE/HOS/Services/Settings/IFactorySettingsServer.cs new file mode 100644 index 0000000000..4dd344f8e2 --- /dev/null +++ b/Ryujinx.HLE/HOS/Services/Settings/IFactorySettingsServer.cs @@ -0,0 +1,8 @@ +namespace Ryujinx.HLE.HOS.Services.Am.Tcap +{ + [Service("set:cal")] + class IFactorySettingsServer : IpcService + { + public IFactorySettingsServer(ServiceCtx context) { } + } +} \ No newline at end of file diff --git a/Ryujinx.HLE/HOS/Services/Settings/IFirmwareDebugSettingsServer.cs b/Ryujinx.HLE/HOS/Services/Settings/IFirmwareDebugSettingsServer.cs new file mode 100644 index 0000000000..3b7e1af2d9 --- /dev/null +++ b/Ryujinx.HLE/HOS/Services/Settings/IFirmwareDebugSettingsServer.cs @@ -0,0 +1,8 @@ +namespace Ryujinx.HLE.HOS.Services.Settings +{ + [Service("set:fd")] + class IFirmwareDebugSettingsServer : IpcService + { + public IFirmwareDebugSettingsServer(ServiceCtx context) { } + } +} \ No newline at end of file diff --git a/Ryujinx.HLE/HOS/Services/Set/ISettingsServer.cs b/Ryujinx.HLE/HOS/Services/Settings/ISettingsServer.cs similarity index 98% rename from Ryujinx.HLE/HOS/Services/Set/ISettingsServer.cs rename to Ryujinx.HLE/HOS/Services/Settings/ISettingsServer.cs index 6fb923cc23..2d2512dff3 100644 --- a/Ryujinx.HLE/HOS/Services/Set/ISettingsServer.cs +++ b/Ryujinx.HLE/HOS/Services/Settings/ISettingsServer.cs @@ -2,7 +2,7 @@ using Ryujinx.Common.Logging; using Ryujinx.HLE.HOS.SystemState; using System; -namespace Ryujinx.HLE.HOS.Services.Set +namespace Ryujinx.HLE.HOS.Services.Settings { [Service("set")] class ISettingsServer : IpcService diff --git a/Ryujinx.HLE/HOS/Services/Set/ISystemSettingsServer.cs b/Ryujinx.HLE/HOS/Services/Settings/ISystemSettingsServer.cs similarity index 99% rename from Ryujinx.HLE/HOS/Services/Set/ISystemSettingsServer.cs rename to Ryujinx.HLE/HOS/Services/Settings/ISystemSettingsServer.cs index 7a2f0672cf..7af78dbf26 100644 --- a/Ryujinx.HLE/HOS/Services/Set/ISystemSettingsServer.cs +++ b/Ryujinx.HLE/HOS/Services/Settings/ISystemSettingsServer.cs @@ -7,7 +7,7 @@ using System; using System.IO; using System.Text; -namespace Ryujinx.HLE.HOS.Services.Set +namespace Ryujinx.HLE.HOS.Services.Settings { [Service("set:sys")] class ISystemSettingsServer : IpcService diff --git a/Ryujinx.HLE/HOS/Services/Set/NxSettings.cs b/Ryujinx.HLE/HOS/Services/Settings/NxSettings.cs similarity index 99% rename from Ryujinx.HLE/HOS/Services/Set/NxSettings.cs rename to Ryujinx.HLE/HOS/Services/Settings/NxSettings.cs index 4635074342..b679005e6b 100644 --- a/Ryujinx.HLE/HOS/Services/Set/NxSettings.cs +++ b/Ryujinx.HLE/HOS/Services/Settings/NxSettings.cs @@ -1,6 +1,6 @@ using System.Collections.Generic; -namespace Ryujinx.HLE.HOS.Services.Set +namespace Ryujinx.HLE.HOS.Services.Settings { static class NxSettings { diff --git a/Ryujinx.HLE/HOS/Services/Set/ResultCode.cs b/Ryujinx.HLE/HOS/Services/Settings/ResultCode.cs similarity index 79% rename from Ryujinx.HLE/HOS/Services/Set/ResultCode.cs rename to Ryujinx.HLE/HOS/Services/Settings/ResultCode.cs index 60d3e69070..6d4d578fdf 100644 --- a/Ryujinx.HLE/HOS/Services/Set/ResultCode.cs +++ b/Ryujinx.HLE/HOS/Services/Settings/ResultCode.cs @@ -1,4 +1,4 @@ -namespace Ryujinx.HLE.HOS.Services.Set +namespace Ryujinx.HLE.HOS.Services.Settings { enum ResultCode { diff --git a/Ryujinx.HLE/HOS/Services/Sm/IManagerInterface.cs b/Ryujinx.HLE/HOS/Services/Sm/IManagerInterface.cs new file mode 100644 index 0000000000..f867f23a47 --- /dev/null +++ b/Ryujinx.HLE/HOS/Services/Sm/IManagerInterface.cs @@ -0,0 +1,8 @@ +namespace Ryujinx.HLE.HOS.Services.Sm +{ + [Service("sm:m")] + class IManagerInterface : IpcService + { + public IManagerInterface(ServiceCtx context) { } + } +} \ No newline at end of file diff --git a/Ryujinx.HLE/HOS/Services/Bsd/IClient.cs b/Ryujinx.HLE/HOS/Services/Sockets/Bsd/IClient.cs similarity index 99% rename from Ryujinx.HLE/HOS/Services/Bsd/IClient.cs rename to Ryujinx.HLE/HOS/Services/Sockets/Bsd/IClient.cs index 0339937268..3a02e06c05 100644 --- a/Ryujinx.HLE/HOS/Services/Bsd/IClient.cs +++ b/Ryujinx.HLE/HOS/Services/Sockets/Bsd/IClient.cs @@ -5,7 +5,7 @@ using System.Net; using System.Net.Sockets; using System.Text; -namespace Ryujinx.HLE.HOS.Services.Bsd +namespace Ryujinx.HLE.HOS.Services.Sockets.Bsd { [Service("bsd:s", true)] [Service("bsd:u", false)] diff --git a/Ryujinx.HLE/HOS/Services/Sockets/Bsd/ServerInterface.cs b/Ryujinx.HLE/HOS/Services/Sockets/Bsd/ServerInterface.cs new file mode 100644 index 0000000000..798fc0157d --- /dev/null +++ b/Ryujinx.HLE/HOS/Services/Sockets/Bsd/ServerInterface.cs @@ -0,0 +1,8 @@ +namespace Ryujinx.HLE.HOS.Services.Sockets.Bsd +{ + [Service("bsdcfg")] + class ServerInterface : IpcService + { + public ServerInterface(ServiceCtx context) { } + } +} \ No newline at end of file diff --git a/Ryujinx.HLE/HOS/Services/Bsd/BsdIoctl.cs b/Ryujinx.HLE/HOS/Services/Sockets/Bsd/Types/BsdIoctl.cs similarity index 54% rename from Ryujinx.HLE/HOS/Services/Bsd/BsdIoctl.cs rename to Ryujinx.HLE/HOS/Services/Sockets/Bsd/Types/BsdIoctl.cs index 76713b253b..421a255ccb 100644 --- a/Ryujinx.HLE/HOS/Services/Bsd/BsdIoctl.cs +++ b/Ryujinx.HLE/HOS/Services/Sockets/Bsd/Types/BsdIoctl.cs @@ -1,4 +1,4 @@ -namespace Ryujinx.HLE.HOS.Services.Bsd +namespace Ryujinx.HLE.HOS.Services.Sockets.Bsd { enum BsdIoctl { diff --git a/Ryujinx.HLE/HOS/Services/Bsd/BsdSocket.cs b/Ryujinx.HLE/HOS/Services/Sockets/Bsd/Types/BsdSocket.cs similarity index 78% rename from Ryujinx.HLE/HOS/Services/Bsd/BsdSocket.cs rename to Ryujinx.HLE/HOS/Services/Sockets/Bsd/Types/BsdSocket.cs index 2786da1364..2d5bf42902 100644 --- a/Ryujinx.HLE/HOS/Services/Bsd/BsdSocket.cs +++ b/Ryujinx.HLE/HOS/Services/Sockets/Bsd/Types/BsdSocket.cs @@ -1,6 +1,6 @@ using System.Net.Sockets; -namespace Ryujinx.HLE.HOS.Services.Bsd +namespace Ryujinx.HLE.HOS.Services.Sockets.Bsd { class BsdSocket { diff --git a/Ryujinx.HLE/HOS/Services/Bsd/PollEvent.cs b/Ryujinx.HLE/HOS/Services/Sockets/Bsd/Types/PollEvent.cs similarity index 94% rename from Ryujinx.HLE/HOS/Services/Bsd/PollEvent.cs rename to Ryujinx.HLE/HOS/Services/Sockets/Bsd/Types/PollEvent.cs index b1e6ccc749..ff47a4c70c 100644 --- a/Ryujinx.HLE/HOS/Services/Bsd/PollEvent.cs +++ b/Ryujinx.HLE/HOS/Services/Sockets/Bsd/Types/PollEvent.cs @@ -1,4 +1,4 @@ -namespace Ryujinx.HLE.HOS.Services.Bsd +namespace Ryujinx.HLE.HOS.Services.Sockets.Bsd { class PollEvent { diff --git a/Ryujinx.HLE/HOS/Services/Sockets/Ethc/IEthInterface.cs b/Ryujinx.HLE/HOS/Services/Sockets/Ethc/IEthInterface.cs new file mode 100644 index 0000000000..f58776977e --- /dev/null +++ b/Ryujinx.HLE/HOS/Services/Sockets/Ethc/IEthInterface.cs @@ -0,0 +1,8 @@ +namespace Ryujinx.HLE.HOS.Services.Sockets.Ethc +{ + [Service("ethc:c")] + class IEthInterface : IpcService + { + public IEthInterface(ServiceCtx context) { } + } +} \ No newline at end of file diff --git a/Ryujinx.HLE/HOS/Services/Sockets/Ethc/IEthInterfaceGroup.cs b/Ryujinx.HLE/HOS/Services/Sockets/Ethc/IEthInterfaceGroup.cs new file mode 100644 index 0000000000..9832e44831 --- /dev/null +++ b/Ryujinx.HLE/HOS/Services/Sockets/Ethc/IEthInterfaceGroup.cs @@ -0,0 +1,8 @@ +namespace Ryujinx.HLE.HOS.Services.Sockets.Ethc +{ + [Service("ethc:i")] + class IEthInterfaceGroup : IpcService + { + public IEthInterfaceGroup(ServiceCtx context) { } + } +} \ No newline at end of file diff --git a/Ryujinx.HLE/HOS/Services/Nsd/IManager.cs b/Ryujinx.HLE/HOS/Services/Sockets/Nsd/IManager.cs similarity index 98% rename from Ryujinx.HLE/HOS/Services/Nsd/IManager.cs rename to Ryujinx.HLE/HOS/Services/Sockets/Nsd/IManager.cs index 5dac7cf449..277bc374f5 100644 --- a/Ryujinx.HLE/HOS/Services/Nsd/IManager.cs +++ b/Ryujinx.HLE/HOS/Services/Sockets/Nsd/IManager.cs @@ -1,9 +1,10 @@ using Ryujinx.Common.Logging; using Ryujinx.HLE.Exceptions; -using Ryujinx.HLE.HOS.Services.Set; +using Ryujinx.HLE.HOS.Services.Settings; +using Ryujinx.HLE.HOS.Services.Sockets.Nsd.Manager; using System.Text; -namespace Ryujinx.HLE.HOS.Services.Nsd +namespace Ryujinx.HLE.HOS.Services.Sockets.Nsd { [Service("nsd:a")] // Max sessions: 5 [Service("nsd:u")] // Max sessions: 20 diff --git a/Ryujinx.HLE/HOS/Services/Nsd/FqdnResolver.cs b/Ryujinx.HLE/HOS/Services/Sockets/Nsd/Manager/FqdnResolver.cs similarity index 98% rename from Ryujinx.HLE/HOS/Services/Nsd/FqdnResolver.cs rename to Ryujinx.HLE/HOS/Services/Sockets/Nsd/Manager/FqdnResolver.cs index 10b6433a20..aaab7b3b8a 100644 --- a/Ryujinx.HLE/HOS/Services/Nsd/FqdnResolver.cs +++ b/Ryujinx.HLE/HOS/Services/Sockets/Nsd/Manager/FqdnResolver.cs @@ -1,6 +1,6 @@ using System.Text; -namespace Ryujinx.HLE.HOS.Services.Nsd +namespace Ryujinx.HLE.HOS.Services.Sockets.Nsd.Manager { class FqdnResolver { diff --git a/Ryujinx.HLE/HOS/Services/Nsd/ResultCode.cs b/Ryujinx.HLE/HOS/Services/Sockets/Nsd/ResultCode.cs similarity index 93% rename from Ryujinx.HLE/HOS/Services/Nsd/ResultCode.cs rename to Ryujinx.HLE/HOS/Services/Sockets/Nsd/ResultCode.cs index 27584eb1a2..0e636f9ae8 100644 --- a/Ryujinx.HLE/HOS/Services/Nsd/ResultCode.cs +++ b/Ryujinx.HLE/HOS/Services/Sockets/Nsd/ResultCode.cs @@ -1,4 +1,4 @@ -namespace Ryujinx.HLE.HOS.Services.Nsd +namespace Ryujinx.HLE.HOS.Services.Sockets.Nsd { enum ResultCode { diff --git a/Ryujinx.HLE/HOS/Services/Nsd/NsdSettings.cs b/Ryujinx.HLE/HOS/Services/Sockets/Nsd/Types/NsdSettings.cs similarity index 77% rename from Ryujinx.HLE/HOS/Services/Nsd/NsdSettings.cs rename to Ryujinx.HLE/HOS/Services/Sockets/Nsd/Types/NsdSettings.cs index 42739df02c..2b31cb1d20 100644 --- a/Ryujinx.HLE/HOS/Services/Nsd/NsdSettings.cs +++ b/Ryujinx.HLE/HOS/Services/Sockets/Nsd/Types/NsdSettings.cs @@ -1,4 +1,4 @@ -namespace Ryujinx.HLE.HOS.Services.Nsd +namespace Ryujinx.HLE.HOS.Services.Sockets.Nsd { class NsdSettings { diff --git a/Ryujinx.HLE/HOS/Services/Sfdnsres/IResolver.cs b/Ryujinx.HLE/HOS/Services/Sockets/Sfdnsres/IResolver.cs similarity index 99% rename from Ryujinx.HLE/HOS/Services/Sfdnsres/IResolver.cs rename to Ryujinx.HLE/HOS/Services/Sockets/Sfdnsres/IResolver.cs index 0e42ee3b71..1cf2aa1c65 100644 --- a/Ryujinx.HLE/HOS/Services/Sfdnsres/IResolver.cs +++ b/Ryujinx.HLE/HOS/Services/Sockets/Sfdnsres/IResolver.cs @@ -5,7 +5,7 @@ using System.Net; using System.Net.Sockets; using System.Text; -namespace Ryujinx.HLE.HOS.Services.Sfdnsres +namespace Ryujinx.HLE.HOS.Services.Sockets.Sfdnsres { [Service("sfdnsres")] class IResolver : IpcService diff --git a/Ryujinx.HLE/HOS/Services/Sfdnsres/GaiError.cs b/Ryujinx.HLE/HOS/Services/Sockets/Sfdnsres/Types/GaiError.cs similarity index 84% rename from Ryujinx.HLE/HOS/Services/Sfdnsres/GaiError.cs rename to Ryujinx.HLE/HOS/Services/Sockets/Sfdnsres/Types/GaiError.cs index dc724b4d10..f9f28b44cf 100644 --- a/Ryujinx.HLE/HOS/Services/Sfdnsres/GaiError.cs +++ b/Ryujinx.HLE/HOS/Services/Sockets/Sfdnsres/Types/GaiError.cs @@ -1,4 +1,4 @@ -namespace Ryujinx.HLE.HOS.Services.Sfdnsres +namespace Ryujinx.HLE.HOS.Services.Sockets.Sfdnsres { enum GaiError { diff --git a/Ryujinx.HLE/HOS/Services/Sfdnsres/NetDBError.cs b/Ryujinx.HLE/HOS/Services/Sockets/Sfdnsres/Types/NetDBError.cs similarity index 76% rename from Ryujinx.HLE/HOS/Services/Sfdnsres/NetDBError.cs rename to Ryujinx.HLE/HOS/Services/Sockets/Sfdnsres/Types/NetDBError.cs index 95ef741918..3c04c049a6 100644 --- a/Ryujinx.HLE/HOS/Services/Sfdnsres/NetDBError.cs +++ b/Ryujinx.HLE/HOS/Services/Sockets/Sfdnsres/Types/NetDBError.cs @@ -1,4 +1,4 @@ -namespace Ryujinx.HLE.HOS.Services.Sfdnsres +namespace Ryujinx.HLE.HOS.Services.Sockets.Sfdnsres { enum NetDbError { diff --git a/Ryujinx.HLE/HOS/Services/Spl/IGeneralInterface.cs b/Ryujinx.HLE/HOS/Services/Spl/IGeneralInterface.cs new file mode 100644 index 0000000000..b4aebc7ea7 --- /dev/null +++ b/Ryujinx.HLE/HOS/Services/Spl/IGeneralInterface.cs @@ -0,0 +1,13 @@ +namespace Ryujinx.HLE.HOS.Services.Sm +{ + [Service("spl:")] + [Service("spl:es")] + [Service("spl:fs")] + [Service("spl:manu")] + [Service("spl:mig")] + [Service("spl:ssl")] + class IGeneralInterface : IpcService + { + public IGeneralInterface(ServiceCtx context) { } + } +} \ No newline at end of file diff --git a/Ryujinx.HLE/HOS/Services/Srepo/ISrepoService.cs b/Ryujinx.HLE/HOS/Services/Srepo/ISrepoService.cs new file mode 100644 index 0000000000..167dea6772 --- /dev/null +++ b/Ryujinx.HLE/HOS/Services/Srepo/ISrepoService.cs @@ -0,0 +1,9 @@ +namespace Ryujinx.HLE.HOS.Services.Srepo +{ + [Service("srepo:a")] // 5.0.0+ + [Service("srepo:u")] // 5.0.0+ + class ISrepoService : IpcService + { + public ISrepoService(ServiceCtx context) { } + } +} \ No newline at end of file diff --git a/Ryujinx.HLE/HOS/Services/Ssl/ISslService.cs b/Ryujinx.HLE/HOS/Services/Ssl/ISslService.cs index 43e4bc7f28..2f4b93ca21 100644 --- a/Ryujinx.HLE/HOS/Services/Ssl/ISslService.cs +++ b/Ryujinx.HLE/HOS/Services/Ssl/ISslService.cs @@ -1,4 +1,5 @@ using Ryujinx.Common.Logging; +using Ryujinx.HLE.HOS.Services.Ssl.SslService; namespace Ryujinx.HLE.HOS.Services.Ssl { diff --git a/Ryujinx.HLE/HOS/Services/Ssl/ISslContext.cs b/Ryujinx.HLE/HOS/Services/Ssl/SslService/ISslContext.cs similarity index 62% rename from Ryujinx.HLE/HOS/Services/Ssl/ISslContext.cs rename to Ryujinx.HLE/HOS/Services/Ssl/SslService/ISslContext.cs index e70c24218c..ef78817568 100644 --- a/Ryujinx.HLE/HOS/Services/Ssl/ISslContext.cs +++ b/Ryujinx.HLE/HOS/Services/Ssl/SslService/ISslContext.cs @@ -1,4 +1,4 @@ -namespace Ryujinx.HLE.HOS.Services.Ssl +namespace Ryujinx.HLE.HOS.Services.Ssl.SslService { class ISslContext : IpcService { diff --git a/Ryujinx.HLE/HOS/Services/Time/Clock/ClockTypes.cs b/Ryujinx.HLE/HOS/Services/Time/Clock/ClockTypes.cs deleted file mode 100644 index c70819c003..0000000000 --- a/Ryujinx.HLE/HOS/Services/Time/Clock/ClockTypes.cs +++ /dev/null @@ -1,105 +0,0 @@ -using Ryujinx.HLE.Utilities; -using System; -using System.Runtime.InteropServices; - -namespace Ryujinx.HLE.HOS.Services.Time.Clock -{ - [StructLayout(LayoutKind.Sequential)] - struct TimeSpanType - { - private const long NanoSecondsPerSecond = 1000000000; - - public long NanoSeconds; - - public TimeSpanType(long nanoSeconds) - { - NanoSeconds = nanoSeconds; - } - - public long ToSeconds() - { - return NanoSeconds / NanoSecondsPerSecond; - } - - public static TimeSpanType FromSeconds(long seconds) - { - return new TimeSpanType(seconds * NanoSecondsPerSecond); - } - - public static TimeSpanType FromTicks(ulong ticks, ulong frequency) - { - return FromSeconds((long)ticks / (long)frequency); - } - } - - [StructLayout(LayoutKind.Sequential)] - struct SteadyClockTimePoint - { - public long TimePoint; - public UInt128 ClockSourceId; - - public ResultCode GetSpanBetween(SteadyClockTimePoint other, out long outSpan) - { - outSpan = 0; - - if (ClockSourceId == other.ClockSourceId) - { - try - { - outSpan = checked(other.TimePoint - TimePoint); - - return ResultCode.Success; - } - catch (OverflowException) - { - return ResultCode.Overflow; - } - } - - return ResultCode.Overflow; - } - } - - [StructLayout(LayoutKind.Sequential)] - struct SystemClockContext - { - public long Offset; - public SteadyClockTimePoint SteadyTimePoint; - } - - [StructLayout(LayoutKind.Sequential, Size = 0xD0)] - struct ClockSnapshot - { - public SystemClockContext UserContext; - public SystemClockContext NetworkContext; - public long UserTime; - public long NetworkTime; - public CalendarTime UserCalendarTime; - public CalendarTime NetworkCalendarTime; - public CalendarAdditionalInfo UserCalendarAdditionalTime; - public CalendarAdditionalInfo NetworkCalendarAdditionalTime; - public SteadyClockTimePoint SteadyClockTimePoint; - - [MarshalAs(UnmanagedType.ByValArray, SizeConst = 0x24)] - public char[] LocationName; - - [MarshalAs(UnmanagedType.I1)] - public bool IsAutomaticCorrectionEnabled; - public byte Type; - public ushort Unknown; - - public static ResultCode GetCurrentTime(out long currentTime, SteadyClockTimePoint steadyClockTimePoint, SystemClockContext context) - { - currentTime = 0; - - if (steadyClockTimePoint.ClockSourceId == context.SteadyTimePoint.ClockSourceId) - { - currentTime = steadyClockTimePoint.TimePoint + context.Offset; - - return ResultCode.Success; - } - - return ResultCode.TimeMismatch; - } - } -} diff --git a/Ryujinx.HLE/HOS/Services/Time/Clock/StandardNetworkSystemClockCore.cs b/Ryujinx.HLE/HOS/Services/Time/Clock/StandardNetworkSystemClockCore.cs index 5037fb6006..cc21dd9a5f 100644 --- a/Ryujinx.HLE/HOS/Services/Time/Clock/StandardNetworkSystemClockCore.cs +++ b/Ryujinx.HLE/HOS/Services/Time/Clock/StandardNetworkSystemClockCore.cs @@ -4,7 +4,7 @@ namespace Ryujinx.HLE.HOS.Services.Time.Clock { class StandardNetworkSystemClockCore : SystemClockCore { - private TimeSpanType _standardNetworkClockSufficientAccuracy; + private TimeSpanType _standardNetworkClockSufficientAccuracy; private static StandardNetworkSystemClockCore _instance; diff --git a/Ryujinx.HLE/HOS/Services/Time/Clock/StandardSteadyClockCore.cs b/Ryujinx.HLE/HOS/Services/Time/Clock/StandardSteadyClockCore.cs index 5b2d6c84ef..1bc5bee784 100644 --- a/Ryujinx.HLE/HOS/Services/Time/Clock/StandardSteadyClockCore.cs +++ b/Ryujinx.HLE/HOS/Services/Time/Clock/StandardSteadyClockCore.cs @@ -1,5 +1,5 @@ using Ryujinx.HLE.HOS.Kernel.Threading; -using Ryujinx.HLE.HOS.Services.Bpc; +using Ryujinx.HLE.HOS.Services.Pcv.Bpc; namespace Ryujinx.HLE.HOS.Services.Time.Clock { diff --git a/Ryujinx.HLE/HOS/Services/Time/Clock/TickBasedSteadyClockCore.cs b/Ryujinx.HLE/HOS/Services/Time/Clock/TickBasedSteadyClockCore.cs index 6cd4c80b47..e5baba25d9 100644 --- a/Ryujinx.HLE/HOS/Services/Time/Clock/TickBasedSteadyClockCore.cs +++ b/Ryujinx.HLE/HOS/Services/Time/Clock/TickBasedSteadyClockCore.cs @@ -1,5 +1,4 @@ -using Ryujinx.Common; -using Ryujinx.HLE.HOS.Kernel.Threading; +using Ryujinx.HLE.HOS.Kernel.Threading; namespace Ryujinx.HLE.HOS.Services.Time.Clock { diff --git a/Ryujinx.HLE/HOS/Services/Time/Clock/Types/ClockSnapshot.cs b/Ryujinx.HLE/HOS/Services/Time/Clock/Types/ClockSnapshot.cs new file mode 100644 index 0000000000..df1f151fe7 --- /dev/null +++ b/Ryujinx.HLE/HOS/Services/Time/Clock/Types/ClockSnapshot.cs @@ -0,0 +1,41 @@ +using Ryujinx.HLE.HOS.Services.Time.TimeZone; +using System.Runtime.InteropServices; + +namespace Ryujinx.HLE.HOS.Services.Time.Clock +{ + [StructLayout(LayoutKind.Sequential, Size = 0xD0)] + struct ClockSnapshot + { + public SystemClockContext UserContext; + public SystemClockContext NetworkContext; + public long UserTime; + public long NetworkTime; + public CalendarTime UserCalendarTime; + public CalendarTime NetworkCalendarTime; + public CalendarAdditionalInfo UserCalendarAdditionalTime; + public CalendarAdditionalInfo NetworkCalendarAdditionalTime; + public SteadyClockTimePoint SteadyClockTimePoint; + + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 0x24)] + public char[] LocationName; + + [MarshalAs(UnmanagedType.I1)] + public bool IsAutomaticCorrectionEnabled; + public byte Type; + public ushort Unknown; + + public static ResultCode GetCurrentTime(out long currentTime, SteadyClockTimePoint steadyClockTimePoint, SystemClockContext context) + { + currentTime = 0; + + if (steadyClockTimePoint.ClockSourceId == context.SteadyTimePoint.ClockSourceId) + { + currentTime = steadyClockTimePoint.TimePoint + context.Offset; + + return ResultCode.Success; + } + + return ResultCode.TimeMismatch; + } + } +} \ No newline at end of file diff --git a/Ryujinx.HLE/HOS/Services/Time/Clock/Types/SteadyClockTimePoint.cs b/Ryujinx.HLE/HOS/Services/Time/Clock/Types/SteadyClockTimePoint.cs new file mode 100644 index 0000000000..0055b5ead5 --- /dev/null +++ b/Ryujinx.HLE/HOS/Services/Time/Clock/Types/SteadyClockTimePoint.cs @@ -0,0 +1,34 @@ +using Ryujinx.HLE.Utilities; +using System; +using System.Runtime.InteropServices; + +namespace Ryujinx.HLE.HOS.Services.Time.Clock +{ + [StructLayout(LayoutKind.Sequential)] + struct SteadyClockTimePoint + { + public long TimePoint; + public UInt128 ClockSourceId; + + public ResultCode GetSpanBetween(SteadyClockTimePoint other, out long outSpan) + { + outSpan = 0; + + if (ClockSourceId == other.ClockSourceId) + { + try + { + outSpan = checked(other.TimePoint - TimePoint); + + return ResultCode.Success; + } + catch (OverflowException) + { + return ResultCode.Overflow; + } + } + + return ResultCode.Overflow; + } + } +} \ No newline at end of file diff --git a/Ryujinx.HLE/HOS/Services/Time/Clock/Types/SystemClockContext.cs b/Ryujinx.HLE/HOS/Services/Time/Clock/Types/SystemClockContext.cs new file mode 100644 index 0000000000..38e10480ef --- /dev/null +++ b/Ryujinx.HLE/HOS/Services/Time/Clock/Types/SystemClockContext.cs @@ -0,0 +1,11 @@ +using System.Runtime.InteropServices; + +namespace Ryujinx.HLE.HOS.Services.Time.Clock +{ + [StructLayout(LayoutKind.Sequential)] + struct SystemClockContext + { + public long Offset; + public SteadyClockTimePoint SteadyTimePoint; + } +} \ No newline at end of file diff --git a/Ryujinx.HLE/HOS/Services/Time/Clock/Types/TimeSpanType.cs b/Ryujinx.HLE/HOS/Services/Time/Clock/Types/TimeSpanType.cs new file mode 100644 index 0000000000..93579709f0 --- /dev/null +++ b/Ryujinx.HLE/HOS/Services/Time/Clock/Types/TimeSpanType.cs @@ -0,0 +1,32 @@ +using System.Runtime.InteropServices; + +namespace Ryujinx.HLE.HOS.Services.Time.Clock +{ + [StructLayout(LayoutKind.Sequential)] + struct TimeSpanType + { + private const long NanoSecondsPerSecond = 1000000000; + + public long NanoSeconds; + + public TimeSpanType(long nanoSeconds) + { + NanoSeconds = nanoSeconds; + } + + public long ToSeconds() + { + return NanoSeconds / NanoSecondsPerSecond; + } + + public static TimeSpanType FromSeconds(long seconds) + { + return new TimeSpanType(seconds * NanoSecondsPerSecond); + } + + public static TimeSpanType FromTicks(ulong ticks, ulong frequency) + { + return FromSeconds((long)ticks / (long)frequency); + } + } +} \ No newline at end of file diff --git a/Ryujinx.HLE/HOS/Services/Time/IAlarmService.cs b/Ryujinx.HLE/HOS/Services/Time/IAlarmService.cs new file mode 100644 index 0000000000..092fa8ce5e --- /dev/null +++ b/Ryujinx.HLE/HOS/Services/Time/IAlarmService.cs @@ -0,0 +1,8 @@ +namespace Ryujinx.HLE.HOS.Services.Time +{ + [Service("time:al")] // 9.0.0+ + class IAlarmService : IpcService + { + public IAlarmService(ServiceCtx context) { } + } +} \ No newline at end of file diff --git a/Ryujinx.HLE/HOS/Services/Time/IPowerStateRequestHandler.cs b/Ryujinx.HLE/HOS/Services/Time/IPowerStateRequestHandler.cs new file mode 100644 index 0000000000..cb10da47bb --- /dev/null +++ b/Ryujinx.HLE/HOS/Services/Time/IPowerStateRequestHandler.cs @@ -0,0 +1,8 @@ +namespace Ryujinx.HLE.HOS.Services.Time +{ + [Service("time:m")] // 9.0.0+ + class IPowerStateRequestHandler : IpcService + { + public IPowerStateRequestHandler(ServiceCtx context) { } + } +} \ No newline at end of file diff --git a/Ryujinx.HLE/HOS/Services/Time/IStaticService.cs b/Ryujinx.HLE/HOS/Services/Time/IStaticService.cs index d9c5b4f258..0cfdebcfbe 100644 --- a/Ryujinx.HLE/HOS/Services/Time/IStaticService.cs +++ b/Ryujinx.HLE/HOS/Services/Time/IStaticService.cs @@ -3,6 +3,7 @@ using Ryujinx.HLE.HOS.Ipc; using Ryujinx.HLE.HOS.Kernel.Common; using Ryujinx.HLE.HOS.Kernel.Threading; using Ryujinx.HLE.HOS.Services.Time.Clock; +using Ryujinx.HLE.HOS.Services.Time.StaticService; using Ryujinx.HLE.HOS.Services.Time.TimeZone; using System; using System.Diagnostics; @@ -14,6 +15,7 @@ namespace Ryujinx.HLE.HOS.Services.Time [Service("time:a", TimePermissions.Applet)] [Service("time:s", TimePermissions.System)] [Service("time:u", TimePermissions.User)] + [Service("time:p", TimePermissions.System)] // 9.0.0+ - TODO: Fix the permission. class IStaticService : IpcService { private TimePermissions _permissions; diff --git a/Ryujinx.HLE/HOS/Services/Time/ITimeServiceManager.cs b/Ryujinx.HLE/HOS/Services/Time/ITimeServiceManager.cs new file mode 100644 index 0000000000..514e901ea9 --- /dev/null +++ b/Ryujinx.HLE/HOS/Services/Time/ITimeServiceManager.cs @@ -0,0 +1,8 @@ +namespace Ryujinx.HLE.HOS.Services.Time +{ + [Service("time:su")] // 9.0.0+ + class ITimeServiceManager : IpcService + { + public ITimeServiceManager(ServiceCtx context) { } + } +} \ No newline at end of file diff --git a/Ryujinx.HLE/HOS/Services/Time/ITimeZoneServiceTypes.cs b/Ryujinx.HLE/HOS/Services/Time/ITimeZoneServiceTypes.cs deleted file mode 100644 index 9a83b82b0b..0000000000 --- a/Ryujinx.HLE/HOS/Services/Time/ITimeZoneServiceTypes.cs +++ /dev/null @@ -1,128 +0,0 @@ -using System.Runtime.InteropServices; - -namespace Ryujinx.HLE.HOS.Services.Time -{ - [StructLayout(LayoutKind.Sequential, Size = 0x10, Pack = 4)] - struct TimeTypeInfo - { - public int GmtOffset; - - [MarshalAs(UnmanagedType.I1)] - public bool IsDaySavingTime; - - [MarshalAs(UnmanagedType.ByValArray, SizeConst = 3)] - char[] Padding1; - - public int AbbreviationListIndex; - - [MarshalAs(UnmanagedType.I1)] - public bool IsStandardTimeDaylight; - - [MarshalAs(UnmanagedType.I1)] - public bool IsGMT; - - [MarshalAs(UnmanagedType.ByValArray, SizeConst = 2)] - char[] Padding2; - } - - [StructLayout(LayoutKind.Sequential, Pack = 4, Size = 0x4000, CharSet = CharSet.Ansi)] - struct TimeZoneRule - { - public const int TzMaxTypes = 128; - public const int TzMaxChars = 50; - public const int TzMaxLeaps = 50; - public const int TzMaxTimes = 1000; - public const int TzNameMax = 255; - public const int TzCharsArraySize = 2 * (TzNameMax + 1); - - public int TimeCount; - public int TypeCount; - public int CharCount; - - [MarshalAs(UnmanagedType.I1)] - public bool GoBack; - - [MarshalAs(UnmanagedType.I1)] - public bool GoAhead; - - [MarshalAs(UnmanagedType.ByValArray, SizeConst = TzMaxTimes)] - public long[] Ats; - - [MarshalAs(UnmanagedType.ByValArray, SizeConst = TzMaxTimes)] - public byte[] Types; - - [MarshalAs(UnmanagedType.ByValArray, SizeConst = TzMaxTypes)] - public TimeTypeInfo[] Ttis; - - [MarshalAs(UnmanagedType.ByValArray, SizeConst = TzCharsArraySize)] - public char[] Chars; - - public int DefaultType; - } - - [StructLayout(LayoutKind.Sequential, Pack = 0x4, Size = 0x2C)] - struct TzifHeader - { - [MarshalAs(UnmanagedType.ByValArray, SizeConst = 4)] - public char[] Magic; - - public char Version; - - [MarshalAs(UnmanagedType.ByValArray, SizeConst = 15)] - public byte[] Reserved; - - [MarshalAs(UnmanagedType.ByValArray, SizeConst = 4)] - public byte[] TtisGMTCount; - - [MarshalAs(UnmanagedType.ByValArray, SizeConst = 4)] - public byte[] TtisSTDCount; - - [MarshalAs(UnmanagedType.ByValArray, SizeConst = 4)] - public byte[] LeapCount; - - [MarshalAs(UnmanagedType.ByValArray, SizeConst = 4)] - public byte[] TimeCount; - - [MarshalAs(UnmanagedType.ByValArray, SizeConst = 4)] - public byte[] TypeCount; - - [MarshalAs(UnmanagedType.ByValArray, SizeConst = 4)] - public byte[] CharCount; - } - - [StructLayout(LayoutKind.Sequential, Pack = 0x4, Size = 0x8)] - struct CalendarTime - { - public short Year; - public sbyte Month; - public sbyte Day; - public sbyte Hour; - public sbyte Minute; - public sbyte Second; - } - - [StructLayout(LayoutKind.Sequential, Pack = 0x4, Size = 0x18, CharSet = CharSet.Ansi)] - struct CalendarAdditionalInfo - { - public uint DayOfWeek; - public uint DayOfYear; - - [MarshalAs(UnmanagedType.ByValArray, SizeConst = 8)] - public char[] TimezoneName; - - [MarshalAs(UnmanagedType.I1)] - public bool IsDaySavingTime; - - [MarshalAs(UnmanagedType.ByValArray, SizeConst = 3)] - char[] Padding; - - public int GmtOffset; - } - - [StructLayout(LayoutKind.Sequential, Pack = 0x4, Size = 0x20, CharSet = CharSet.Ansi)] - struct CalendarInfo - { - public CalendarTime Time; - public CalendarAdditionalInfo AdditionalInfo; - } -} \ No newline at end of file diff --git a/Ryujinx.HLE/HOS/Services/Time/ISteadyClock.cs b/Ryujinx.HLE/HOS/Services/Time/StaticService/ISteadyClock.cs similarity index 98% rename from Ryujinx.HLE/HOS/Services/Time/ISteadyClock.cs rename to Ryujinx.HLE/HOS/Services/Time/StaticService/ISteadyClock.cs index 7e3edcef9b..31f119df54 100644 --- a/Ryujinx.HLE/HOS/Services/Time/ISteadyClock.cs +++ b/Ryujinx.HLE/HOS/Services/Time/StaticService/ISteadyClock.cs @@ -1,7 +1,7 @@ using Ryujinx.Common; using Ryujinx.HLE.HOS.Services.Time.Clock; -namespace Ryujinx.HLE.HOS.Services.Time +namespace Ryujinx.HLE.HOS.Services.Time.StaticService { class ISteadyClock : IpcService { diff --git a/Ryujinx.HLE/HOS/Services/Time/ISystemClock.cs b/Ryujinx.HLE/HOS/Services/Time/StaticService/ISystemClock.cs similarity index 98% rename from Ryujinx.HLE/HOS/Services/Time/ISystemClock.cs rename to Ryujinx.HLE/HOS/Services/Time/StaticService/ISystemClock.cs index d496dcdc39..0d86617759 100644 --- a/Ryujinx.HLE/HOS/Services/Time/ISystemClock.cs +++ b/Ryujinx.HLE/HOS/Services/Time/StaticService/ISystemClock.cs @@ -1,7 +1,7 @@ using Ryujinx.Common; using Ryujinx.HLE.HOS.Services.Time.Clock; -namespace Ryujinx.HLE.HOS.Services.Time +namespace Ryujinx.HLE.HOS.Services.Time.StaticService { class ISystemClock : IpcService { diff --git a/Ryujinx.HLE/HOS/Services/Time/ITimeZoneService.cs b/Ryujinx.HLE/HOS/Services/Time/StaticService/ITimeZoneService.cs similarity index 99% rename from Ryujinx.HLE/HOS/Services/Time/ITimeZoneService.cs rename to Ryujinx.HLE/HOS/Services/Time/StaticService/ITimeZoneService.cs index b820de38f3..c65107dfe4 100644 --- a/Ryujinx.HLE/HOS/Services/Time/ITimeZoneService.cs +++ b/Ryujinx.HLE/HOS/Services/Time/StaticService/ITimeZoneService.cs @@ -5,7 +5,7 @@ using Ryujinx.HLE.HOS.Services.Time.TimeZone; using System; using System.Text; -namespace Ryujinx.HLE.HOS.Services.Time +namespace Ryujinx.HLE.HOS.Services.Time.StaticService { class ITimeZoneService : IpcService { diff --git a/Ryujinx.HLE/HOS/Services/Time/TimeZone/TimeZone.cs b/Ryujinx.HLE/HOS/Services/Time/TimeZone/TimeZone.cs index 4b48268966..3a98013e11 100644 --- a/Ryujinx.HLE/HOS/Services/Time/TimeZone/TimeZone.cs +++ b/Ryujinx.HLE/HOS/Services/Time/TimeZone/TimeZone.cs @@ -1,10 +1,11 @@ -using System; +using Ryujinx.Common; +using Ryujinx.HLE.Utilities; +using System; using System.IO; using System.Runtime.InteropServices; using System.Text; -using Ryujinx.Common; -using Ryujinx.HLE.Utilities; -using static Ryujinx.HLE.HOS.Services.Time.TimeZoneRule; + +using static Ryujinx.HLE.HOS.Services.Time.TimeZone.TimeZoneRule; namespace Ryujinx.HLE.HOS.Services.Time.TimeZone { @@ -238,9 +239,8 @@ namespace Ryujinx.HLE.HOS.Services.Time.TimeZone { seconds = 0; - int num; - bool isValid = GetNum(name, ref namePosition, out num, 0, HoursPerDays * DaysPerWekk - 1); + bool isValid = GetNum(name, ref namePosition, out int num, 0, HoursPerDays * DaysPerWekk - 1); if (!isValid) { return false; diff --git a/Ryujinx.HLE/HOS/Services/Time/TimeZone/TimeZoneManager.cs b/Ryujinx.HLE/HOS/Services/Time/TimeZone/TimeZoneManager.cs index cf27639b9d..2497f6a375 100644 --- a/Ryujinx.HLE/HOS/Services/Time/TimeZone/TimeZoneManager.cs +++ b/Ryujinx.HLE/HOS/Services/Time/TimeZone/TimeZoneManager.cs @@ -1,15 +1,15 @@ -using LibHac.Fs.NcaUtils; +using LibHac.Fs; +using LibHac.Fs.NcaUtils; using Ryujinx.Common.Logging; using Ryujinx.HLE.FileSystem; using System; -using System.Collections.ObjectModel; -using LibHac.Fs; -using System.IO; using System.Collections.Generic; -using TimeZoneConverter.Posix; +using System.Collections.ObjectModel; +using System.IO; using TimeZoneConverter; +using TimeZoneConverter.Posix; -using static Ryujinx.HLE.HOS.Services.Time.TimeZoneRule; +using static Ryujinx.HLE.HOS.Services.Time.TimeZone.TimeZoneRule; namespace Ryujinx.HLE.HOS.Services.Time.TimeZone { diff --git a/Ryujinx.HLE/HOS/Services/Time/TimeZone/Types/CalendarAdditionalInfo.cs b/Ryujinx.HLE/HOS/Services/Time/TimeZone/Types/CalendarAdditionalInfo.cs new file mode 100644 index 0000000000..ef9b87e794 --- /dev/null +++ b/Ryujinx.HLE/HOS/Services/Time/TimeZone/Types/CalendarAdditionalInfo.cs @@ -0,0 +1,22 @@ +using System.Runtime.InteropServices; + +namespace Ryujinx.HLE.HOS.Services.Time.TimeZone +{ + [StructLayout(LayoutKind.Sequential, Pack = 0x4, Size = 0x18, CharSet = CharSet.Ansi)] + struct CalendarAdditionalInfo + { + public uint DayOfWeek; + public uint DayOfYear; + + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 8)] + public char[] TimezoneName; + + [MarshalAs(UnmanagedType.I1)] + public bool IsDaySavingTime; + + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 3)] + public char[] Padding; + + public int GmtOffset; + } +} \ No newline at end of file diff --git a/Ryujinx.HLE/HOS/Services/Time/TimeZone/Types/CalendarInfo.cs b/Ryujinx.HLE/HOS/Services/Time/TimeZone/Types/CalendarInfo.cs new file mode 100644 index 0000000000..68e6245b37 --- /dev/null +++ b/Ryujinx.HLE/HOS/Services/Time/TimeZone/Types/CalendarInfo.cs @@ -0,0 +1,11 @@ +using System.Runtime.InteropServices; + +namespace Ryujinx.HLE.HOS.Services.Time.TimeZone +{ + [StructLayout(LayoutKind.Sequential, Pack = 0x4, Size = 0x20, CharSet = CharSet.Ansi)] + struct CalendarInfo + { + public CalendarTime Time; + public CalendarAdditionalInfo AdditionalInfo; + } +} \ No newline at end of file diff --git a/Ryujinx.HLE/HOS/Services/Time/TimeZone/Types/CalendarTime.cs b/Ryujinx.HLE/HOS/Services/Time/TimeZone/Types/CalendarTime.cs new file mode 100644 index 0000000000..d594223d4d --- /dev/null +++ b/Ryujinx.HLE/HOS/Services/Time/TimeZone/Types/CalendarTime.cs @@ -0,0 +1,15 @@ +using System.Runtime.InteropServices; + +namespace Ryujinx.HLE.HOS.Services.Time.TimeZone +{ + [StructLayout(LayoutKind.Sequential, Pack = 0x4, Size = 0x8)] + struct CalendarTime + { + public short Year; + public sbyte Month; + public sbyte Day; + public sbyte Hour; + public sbyte Minute; + public sbyte Second; + } +} \ No newline at end of file diff --git a/Ryujinx.HLE/HOS/Services/Time/TimeZone/Types/TimeTypeInfo.cs b/Ryujinx.HLE/HOS/Services/Time/TimeZone/Types/TimeTypeInfo.cs new file mode 100644 index 0000000000..399e070077 --- /dev/null +++ b/Ryujinx.HLE/HOS/Services/Time/TimeZone/Types/TimeTypeInfo.cs @@ -0,0 +1,27 @@ +using System.Runtime.InteropServices; + +namespace Ryujinx.HLE.HOS.Services.Time.TimeZone +{ + [StructLayout(LayoutKind.Sequential, Size = 0x10, Pack = 4)] + struct TimeTypeInfo + { + public int GmtOffset; + + [MarshalAs(UnmanagedType.I1)] + public bool IsDaySavingTime; + + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 3)] + public char[] Padding1; + + public int AbbreviationListIndex; + + [MarshalAs(UnmanagedType.I1)] + public bool IsStandardTimeDaylight; + + [MarshalAs(UnmanagedType.I1)] + public bool IsGMT; + + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 2)] + public char[] Padding2; + } +} \ No newline at end of file diff --git a/Ryujinx.HLE/HOS/Services/Time/TimeZone/Types/TimeZoneRule.cs b/Ryujinx.HLE/HOS/Services/Time/TimeZone/Types/TimeZoneRule.cs new file mode 100644 index 0000000000..1af7a81acd --- /dev/null +++ b/Ryujinx.HLE/HOS/Services/Time/TimeZone/Types/TimeZoneRule.cs @@ -0,0 +1,39 @@ +using System.Runtime.InteropServices; + +namespace Ryujinx.HLE.HOS.Services.Time.TimeZone +{ + [StructLayout(LayoutKind.Sequential, Pack = 4, Size = 0x4000, CharSet = CharSet.Ansi)] + struct TimeZoneRule + { + public const int TzMaxTypes = 128; + public const int TzMaxChars = 50; + public const int TzMaxLeaps = 50; + public const int TzMaxTimes = 1000; + public const int TzNameMax = 255; + public const int TzCharsArraySize = 2 * (TzNameMax + 1); + + public int TimeCount; + public int TypeCount; + public int CharCount; + + [MarshalAs(UnmanagedType.I1)] + public bool GoBack; + + [MarshalAs(UnmanagedType.I1)] + public bool GoAhead; + + [MarshalAs(UnmanagedType.ByValArray, SizeConst = TzMaxTimes)] + public long[] Ats; + + [MarshalAs(UnmanagedType.ByValArray, SizeConst = TzMaxTimes)] + public byte[] Types; + + [MarshalAs(UnmanagedType.ByValArray, SizeConst = TzMaxTypes)] + public TimeTypeInfo[] Ttis; + + [MarshalAs(UnmanagedType.ByValArray, SizeConst = TzCharsArraySize)] + public char[] Chars; + + public int DefaultType; + } +} \ No newline at end of file diff --git a/Ryujinx.HLE/HOS/Services/Time/TimeZone/Types/TzifHeader.cs b/Ryujinx.HLE/HOS/Services/Time/TimeZone/Types/TzifHeader.cs new file mode 100644 index 0000000000..1a033c33ec --- /dev/null +++ b/Ryujinx.HLE/HOS/Services/Time/TimeZone/Types/TzifHeader.cs @@ -0,0 +1,34 @@ +using System.Runtime.InteropServices; + +namespace Ryujinx.HLE.HOS.Services.Time.TimeZone +{ + [StructLayout(LayoutKind.Sequential, Pack = 0x4, Size = 0x2C)] + struct TzifHeader + { + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 4)] + public char[] Magic; + + public char Version; + + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 15)] + public byte[] Reserved; + + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 4)] + public byte[] TtisGMTCount; + + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 4)] + public byte[] TtisSTDCount; + + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 4)] + public byte[] LeapCount; + + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 4)] + public byte[] TimeCount; + + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 4)] + public byte[] TypeCount; + + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 4)] + public byte[] CharCount; + } +} \ No newline at end of file diff --git a/Ryujinx.HLE/HOS/Services/Time/TimePermissions.cs b/Ryujinx.HLE/HOS/Services/Time/Types/TimePermissions.cs similarity index 100% rename from Ryujinx.HLE/HOS/Services/Time/TimePermissions.cs rename to Ryujinx.HLE/HOS/Services/Time/Types/TimePermissions.cs diff --git a/Ryujinx.HLE/HOS/Services/Usb/IClientRootSession.cs b/Ryujinx.HLE/HOS/Services/Usb/IClientRootSession.cs new file mode 100644 index 0000000000..56b12af084 --- /dev/null +++ b/Ryujinx.HLE/HOS/Services/Usb/IClientRootSession.cs @@ -0,0 +1,9 @@ +namespace Ryujinx.HLE.HOS.Services.Usb +{ + [Service("usb:hs")] + [Service("usb:hs:a")] // 7.0.0+ + class IClientRootSession : IpcService + { + public IClientRootSession(ServiceCtx context) { } + } +} \ No newline at end of file diff --git a/Ryujinx.HLE/HOS/Services/Usb/IDsService.cs b/Ryujinx.HLE/HOS/Services/Usb/IDsService.cs new file mode 100644 index 0000000000..4dbb6fc1d4 --- /dev/null +++ b/Ryujinx.HLE/HOS/Services/Usb/IDsService.cs @@ -0,0 +1,8 @@ +namespace Ryujinx.HLE.HOS.Services.Usb +{ + [Service("usb:ds")] + class IDsService : IpcService + { + public IDsService(ServiceCtx context) { } + } +} \ No newline at end of file diff --git a/Ryujinx.HLE/HOS/Services/Usb/IPdCradleManager.cs b/Ryujinx.HLE/HOS/Services/Usb/IPdCradleManager.cs new file mode 100644 index 0000000000..cecdbc313f --- /dev/null +++ b/Ryujinx.HLE/HOS/Services/Usb/IPdCradleManager.cs @@ -0,0 +1,8 @@ +namespace Ryujinx.HLE.HOS.Services.Usb +{ + [Service("usb:pd:c")] + class IPdCradleManager : IpcService + { + public IPdCradleManager(ServiceCtx context) { } + } +} \ No newline at end of file diff --git a/Ryujinx.HLE/HOS/Services/Usb/IPdManager.cs b/Ryujinx.HLE/HOS/Services/Usb/IPdManager.cs new file mode 100644 index 0000000000..1fb574d29a --- /dev/null +++ b/Ryujinx.HLE/HOS/Services/Usb/IPdManager.cs @@ -0,0 +1,8 @@ +namespace Ryujinx.HLE.HOS.Services.Usb +{ + [Service("usb:pd")] + class IPdManager : IpcService + { + public IPdManager(ServiceCtx context) { } + } +} \ No newline at end of file diff --git a/Ryujinx.HLE/HOS/Services/Usb/IPmService.cs b/Ryujinx.HLE/HOS/Services/Usb/IPmService.cs new file mode 100644 index 0000000000..38beee079b --- /dev/null +++ b/Ryujinx.HLE/HOS/Services/Usb/IPmService.cs @@ -0,0 +1,8 @@ +namespace Ryujinx.HLE.HOS.Services.Usb +{ + [Service("usb:pm")] + class IPmService : IpcService + { + public IPmService(ServiceCtx context) { } + } +} \ No newline at end of file diff --git a/Ryujinx.HLE/HOS/Services/Usb/IUnknown1.cs b/Ryujinx.HLE/HOS/Services/Usb/IUnknown1.cs new file mode 100644 index 0000000000..0981e4ff4b --- /dev/null +++ b/Ryujinx.HLE/HOS/Services/Usb/IUnknown1.cs @@ -0,0 +1,8 @@ +namespace Ryujinx.HLE.HOS.Services.Usb +{ + [Service("usb:qdb")] // 7.0.0+ + class IUnknown1 : IpcService + { + public IUnknown1(ServiceCtx context) { } + } +} \ No newline at end of file diff --git a/Ryujinx.HLE/HOS/Services/Usb/IUnknown2.cs b/Ryujinx.HLE/HOS/Services/Usb/IUnknown2.cs new file mode 100644 index 0000000000..563696bb8e --- /dev/null +++ b/Ryujinx.HLE/HOS/Services/Usb/IUnknown2.cs @@ -0,0 +1,8 @@ +namespace Ryujinx.HLE.HOS.Services.Usb +{ + [Service("usb:obsv")] // 8.0.0+ + class IUnknown2 : IpcService + { + public IUnknown2(ServiceCtx context) { } + } +} \ No newline at end of file diff --git a/Ryujinx.HLE/HOS/Services/Vi/GbpBuffer.cs b/Ryujinx.HLE/HOS/Services/Vi/GbpBuffer.cs deleted file mode 100644 index 75b543b82e..0000000000 --- a/Ryujinx.HLE/HOS/Services/Vi/GbpBuffer.cs +++ /dev/null @@ -1,165 +0,0 @@ -using Ryujinx.Common; -using System; -using System.IO; -using System.Runtime.InteropServices; - -namespace Ryujinx.HLE.HOS.Services.Android -{ - [StructLayout(LayoutKind.Sequential, Size = 0x28)] - struct GraphicBufferHeader - { - public int Magic; - public int Width; - public int Height; - public int Stride; - public int Format; - public int Usage; - - public int Pid; - public int RefCount; - - public int FdsCount; - public int IntsCount; - } - - [StructLayout(LayoutKind.Explicit, Size = 0x58)] - struct NvGraphicBufferSurface - { - [FieldOffset(0)] - public uint Width; - - [FieldOffset(0x4)] - public uint Height; - - [FieldOffset(0x8)] - public ColorFormat ColorFormat; - - [FieldOffset(0x10)] - public int Layout; - - [FieldOffset(0x14)] - public int Pitch; - - [FieldOffset(0x18)] - public int NvMapHandle; - - [FieldOffset(0x1C)] - public int Offset; - - [FieldOffset(0x20)] - public int Kind; - - [FieldOffset(0x24)] - public int BlockHeightLog2; - - [FieldOffset(0x28)] - public int ScanFormat; - - [FieldOffset(0x30)] - public long Flags; - - [FieldOffset(0x38)] - public long Size; - } - - [StructLayout(LayoutKind.Explicit)] - struct NvGraphicBufferSurfaceArray - { - [FieldOffset(0x0)] - private NvGraphicBufferSurface Surface0; - - [FieldOffset(0x58)] - private NvGraphicBufferSurface Surface1; - - [FieldOffset(0xb0)] - private NvGraphicBufferSurface Surface2; - - public NvGraphicBufferSurface this[int index] - { - get - { - if (index == 0) - { - return Surface0; - } - else if (index == 1) - { - return Surface1; - } - else if (index == 2) - { - return Surface2; - } - - throw new IndexOutOfRangeException(); - } - } - } - - [StructLayout(LayoutKind.Explicit, Size = 0x144)] - struct NvGraphicBuffer - { - [FieldOffset(0x4)] - public int NvMapId; - - [FieldOffset(0xC)] - public int Magic; - - [FieldOffset(0x10)] - public int Pid; - - [FieldOffset(0x14)] - public int Type; - - [FieldOffset(0x18)] - public int Usage; - - [FieldOffset(0x1C)] - public int PixelFormat; - - [FieldOffset(0x20)] - public int ExternalPixelFormat; - - [FieldOffset(0x24)] - public int Stride; - - [FieldOffset(0x28)] - public int FrameBufferSize; - - [FieldOffset(0x2C)] - public int PlanesCount; - - [FieldOffset(0x34)] - public NvGraphicBufferSurfaceArray Surfaces; - } - - struct GbpBuffer - { - public GraphicBufferHeader Header { get; private set; } - public NvGraphicBuffer Buffer { get; private set; } - - public int Size => Marshal.SizeOf() + Marshal.SizeOf(); - - public GbpBuffer(BinaryReader reader) - { - Header = reader.ReadStruct(); - - // ignore fds - // TODO: check if that is used in official implementation - reader.BaseStream.Position += Header.FdsCount * 4; - - if (Header.IntsCount != 0x51) - { - throw new NotImplementedException($"Unexpected Graphic Buffer ints count (expected 0x51, found 0x{Header.IntsCount:x}"); - } - - Buffer = reader.ReadStruct(); - } - - public void Write(BinaryWriter writer) - { - writer.WriteStruct(Header); - writer.WriteStruct(Buffer); - } - } -} \ No newline at end of file diff --git a/Ryujinx.HLE/HOS/Services/Vi/IApplicationRootService.cs b/Ryujinx.HLE/HOS/Services/Vi/IApplicationRootService.cs index e0f71d0fcc..dbadd90b70 100644 --- a/Ryujinx.HLE/HOS/Services/Vi/IApplicationRootService.cs +++ b/Ryujinx.HLE/HOS/Services/Vi/IApplicationRootService.cs @@ -1,3 +1,5 @@ +using Ryujinx.HLE.HOS.Services.Vi.RootService; + namespace Ryujinx.HLE.HOS.Services.Vi { [Service("vi:u")] diff --git a/Ryujinx.HLE/HOS/Services/Vi/IManagerRootService.cs b/Ryujinx.HLE/HOS/Services/Vi/IManagerRootService.cs index feaf461287..31996ff1ed 100644 --- a/Ryujinx.HLE/HOS/Services/Vi/IManagerRootService.cs +++ b/Ryujinx.HLE/HOS/Services/Vi/IManagerRootService.cs @@ -1,3 +1,5 @@ +using Ryujinx.HLE.HOS.Services.Vi.RootService; + namespace Ryujinx.HLE.HOS.Services.Vi { [Service("vi:m")] diff --git a/Ryujinx.HLE/HOS/Services/Vi/ISystemRootService.cs b/Ryujinx.HLE/HOS/Services/Vi/ISystemRootService.cs index 09d604c15c..8d64e47548 100644 --- a/Ryujinx.HLE/HOS/Services/Vi/ISystemRootService.cs +++ b/Ryujinx.HLE/HOS/Services/Vi/ISystemRootService.cs @@ -1,3 +1,5 @@ +using Ryujinx.HLE.HOS.Services.Vi.RootService; + namespace Ryujinx.HLE.HOS.Services.Vi { [Service("vi:s")] diff --git a/Ryujinx.HLE/HOS/Services/Vi/Display.cs b/Ryujinx.HLE/HOS/Services/Vi/RootService/ApplicationDisplayService/Display.cs similarity index 100% rename from Ryujinx.HLE/HOS/Services/Vi/Display.cs rename to Ryujinx.HLE/HOS/Services/Vi/RootService/ApplicationDisplayService/Display.cs diff --git a/Ryujinx.HLE/HOS/Services/Vi/IHOSBinderDriver.cs b/Ryujinx.HLE/HOS/Services/Vi/RootService/ApplicationDisplayService/IHOSBinderDriver.cs similarity index 97% rename from Ryujinx.HLE/HOS/Services/Vi/IHOSBinderDriver.cs rename to Ryujinx.HLE/HOS/Services/Vi/RootService/ApplicationDisplayService/IHOSBinderDriver.cs index 4da0e2ff29..3ac1c27052 100644 --- a/Ryujinx.HLE/HOS/Services/Vi/IHOSBinderDriver.cs +++ b/Ryujinx.HLE/HOS/Services/Vi/RootService/ApplicationDisplayService/IHOSBinderDriver.cs @@ -5,7 +5,7 @@ using Ryujinx.HLE.HOS.Kernel.Threading; using Ryujinx.HLE.HOS.Services.Android; using System; -namespace Ryujinx.HLE.HOS.Services.Vi +namespace Ryujinx.HLE.HOS.Services.Vi.RootService.ApplicationDisplayService { class IHOSBinderDriver : IpcService, IDisposable { diff --git a/Ryujinx.HLE/HOS/Services/Vi/IManagerDisplayService.cs b/Ryujinx.HLE/HOS/Services/Vi/RootService/ApplicationDisplayService/IManagerDisplayService.cs similarity index 95% rename from Ryujinx.HLE/HOS/Services/Vi/IManagerDisplayService.cs rename to Ryujinx.HLE/HOS/Services/Vi/RootService/ApplicationDisplayService/IManagerDisplayService.cs index 3a64be15d9..24e73244ff 100644 --- a/Ryujinx.HLE/HOS/Services/Vi/IManagerDisplayService.cs +++ b/Ryujinx.HLE/HOS/Services/Vi/RootService/ApplicationDisplayService/IManagerDisplayService.cs @@ -1,6 +1,6 @@ using Ryujinx.Common.Logging; -namespace Ryujinx.HLE.HOS.Services.Vi +namespace Ryujinx.HLE.HOS.Services.Vi.RootService.ApplicationDisplayService { class IManagerDisplayService : IpcService { diff --git a/Ryujinx.HLE/HOS/Services/Vi/ISystemDisplayService.cs b/Ryujinx.HLE/HOS/Services/Vi/RootService/ApplicationDisplayService/ISystemDisplayService.cs similarity index 95% rename from Ryujinx.HLE/HOS/Services/Vi/ISystemDisplayService.cs rename to Ryujinx.HLE/HOS/Services/Vi/RootService/ApplicationDisplayService/ISystemDisplayService.cs index dc0430f60d..1e615bd233 100644 --- a/Ryujinx.HLE/HOS/Services/Vi/ISystemDisplayService.cs +++ b/Ryujinx.HLE/HOS/Services/Vi/RootService/ApplicationDisplayService/ISystemDisplayService.cs @@ -1,6 +1,6 @@ using Ryujinx.Common.Logging; -namespace Ryujinx.HLE.HOS.Services.Vi +namespace Ryujinx.HLE.HOS.Services.Vi.RootService.ApplicationDisplayService { class ISystemDisplayService : IpcService { diff --git a/Ryujinx.HLE/HOS/Services/Vi/RootService/ApplicationDisplayService/Types/DestinationScalingMode.cs b/Ryujinx.HLE/HOS/Services/Vi/RootService/ApplicationDisplayService/Types/DestinationScalingMode.cs new file mode 100644 index 0000000000..cf459cb2e4 --- /dev/null +++ b/Ryujinx.HLE/HOS/Services/Vi/RootService/ApplicationDisplayService/Types/DestinationScalingMode.cs @@ -0,0 +1,11 @@ +namespace Ryujinx.HLE.HOS.Services.Vi.RootService.ApplicationDisplayService +{ + enum DestinationScalingMode + { + Freeze, + ScaleToWindow, + ScaleAndCrop, + None, + PreserveAspectRatio + } +} \ No newline at end of file diff --git a/Ryujinx.HLE/HOS/Services/Vi/RootService/ApplicationDisplayService/Types/SourceScalingMode.cs b/Ryujinx.HLE/HOS/Services/Vi/RootService/ApplicationDisplayService/Types/SourceScalingMode.cs new file mode 100644 index 0000000000..ac8c3e0275 --- /dev/null +++ b/Ryujinx.HLE/HOS/Services/Vi/RootService/ApplicationDisplayService/Types/SourceScalingMode.cs @@ -0,0 +1,11 @@ +namespace Ryujinx.HLE.HOS.Services.Vi.RootService.ApplicationDisplayService +{ + enum SourceScalingMode + { + None, + Freeze, + ScaleToWindow, + ScaleAndCrop, + PreserveAspectRatio + } +} \ No newline at end of file diff --git a/Ryujinx.HLE/HOS/Services/Vi/IApplicationDisplayService.cs b/Ryujinx.HLE/HOS/Services/Vi/RootService/IApplicationDisplayService.cs similarity index 89% rename from Ryujinx.HLE/HOS/Services/Vi/IApplicationDisplayService.cs rename to Ryujinx.HLE/HOS/Services/Vi/RootService/IApplicationDisplayService.cs index 15db6ff2b3..fba250544d 100644 --- a/Ryujinx.HLE/HOS/Services/Vi/IApplicationDisplayService.cs +++ b/Ryujinx.HLE/HOS/Services/Vi/RootService/IApplicationDisplayService.cs @@ -1,13 +1,14 @@ using ARMeilleure.Memory; using Ryujinx.HLE.HOS.Ipc; using Ryujinx.HLE.HOS.Kernel.Common; +using Ryujinx.HLE.HOS.Services.Vi.RootService.ApplicationDisplayService; using System; using System.IO; using System.Text; using static Ryujinx.HLE.HOS.Services.Android.Parcel; -namespace Ryujinx.HLE.HOS.Services.Vi +namespace Ryujinx.HLE.HOS.Services.Vi.RootService { class IApplicationDisplayService : IpcService { @@ -183,9 +184,9 @@ namespace Ryujinx.HLE.HOS.Services.Vi // ConvertScalingMode(unknown) -> unknown public ResultCode ConvertScalingMode(ServiceCtx context) { - SrcScalingMode scalingMode = (SrcScalingMode)context.RequestData.ReadInt32(); + SourceScalingMode scalingMode = (SourceScalingMode)context.RequestData.ReadInt32(); - DstScalingMode? convertedScalingMode = ConvertScalingMode(scalingMode); + DestinationScalingMode? convertedScalingMode = ConvertScalingMode(scalingMode); if (!convertedScalingMode.HasValue) { @@ -193,8 +194,8 @@ namespace Ryujinx.HLE.HOS.Services.Vi return ResultCode.InvalidArguments; } - if (scalingMode != SrcScalingMode.ScaleToWindow && - scalingMode != SrcScalingMode.PreserveAspectRatio) + if (scalingMode != SourceScalingMode.ScaleToWindow && + scalingMode != SourceScalingMode.PreserveAspectRatio) { // Invalid scaling mode specified. return ResultCode.InvalidScalingMode; @@ -205,15 +206,15 @@ namespace Ryujinx.HLE.HOS.Services.Vi return ResultCode.Success; } - private DstScalingMode? ConvertScalingMode(SrcScalingMode source) + private DestinationScalingMode? ConvertScalingMode(SourceScalingMode source) { switch (source) { - case SrcScalingMode.None: return DstScalingMode.None; - case SrcScalingMode.Freeze: return DstScalingMode.Freeze; - case SrcScalingMode.ScaleAndCrop: return DstScalingMode.ScaleAndCrop; - case SrcScalingMode.ScaleToWindow: return DstScalingMode.ScaleToWindow; - case SrcScalingMode.PreserveAspectRatio: return DstScalingMode.PreserveAspectRatio; + case SourceScalingMode.None: return DestinationScalingMode.None; + case SourceScalingMode.Freeze: return DestinationScalingMode.Freeze; + case SourceScalingMode.ScaleAndCrop: return DestinationScalingMode.ScaleAndCrop; + case SourceScalingMode.ScaleToWindow: return DestinationScalingMode.ScaleToWindow; + case SourceScalingMode.PreserveAspectRatio: return DestinationScalingMode.PreserveAspectRatio; } return null; diff --git a/Ryujinx.HLE/HOS/Services/Vi/ScalingMode.cs b/Ryujinx.HLE/HOS/Services/Vi/ScalingMode.cs deleted file mode 100644 index 3adf1d333a..0000000000 --- a/Ryujinx.HLE/HOS/Services/Vi/ScalingMode.cs +++ /dev/null @@ -1,20 +0,0 @@ -namespace Ryujinx.HLE.HOS.Services.Vi -{ - enum SrcScalingMode - { - None = 0, - Freeze = 1, - ScaleToWindow = 2, - ScaleAndCrop = 3, - PreserveAspectRatio = 4 - } - - enum DstScalingMode - { - Freeze = 0, - ScaleToWindow = 1, - ScaleAndCrop = 2, - None = 3, - PreserveAspectRatio = 4 - } -} \ No newline at end of file diff --git a/Ryujinx.HLE/HOS/Services/Wlan/IInfraManager.cs b/Ryujinx.HLE/HOS/Services/Wlan/IInfraManager.cs new file mode 100644 index 0000000000..0416868a8e --- /dev/null +++ b/Ryujinx.HLE/HOS/Services/Wlan/IInfraManager.cs @@ -0,0 +1,8 @@ +namespace Ryujinx.HLE.HOS.Services.Wlan +{ + [Service("wlan:inf")] + class IInfraManager : IpcService + { + public IInfraManager(ServiceCtx context) { } + } +} \ No newline at end of file diff --git a/Ryujinx.HLE/HOS/Services/Wlan/ILocalGetActionFrame.cs b/Ryujinx.HLE/HOS/Services/Wlan/ILocalGetActionFrame.cs new file mode 100644 index 0000000000..6c2e20a452 --- /dev/null +++ b/Ryujinx.HLE/HOS/Services/Wlan/ILocalGetActionFrame.cs @@ -0,0 +1,8 @@ +namespace Ryujinx.HLE.HOS.Services.Wlan +{ + [Service("wlan:lga")] + class ILocalGetActionFrame : IpcService + { + public ILocalGetActionFrame(ServiceCtx context) { } + } +} \ No newline at end of file diff --git a/Ryujinx.HLE/HOS/Services/Wlan/ILocalGetFrame.cs b/Ryujinx.HLE/HOS/Services/Wlan/ILocalGetFrame.cs new file mode 100644 index 0000000000..a224a192d4 --- /dev/null +++ b/Ryujinx.HLE/HOS/Services/Wlan/ILocalGetFrame.cs @@ -0,0 +1,8 @@ +namespace Ryujinx.HLE.HOS.Services.Wlan +{ + [Service("wlan:lg")] + class ILocalGetFrame : IpcService + { + public ILocalGetFrame(ServiceCtx context) { } + } +} \ No newline at end of file diff --git a/Ryujinx.HLE/HOS/Services/Wlan/ILocalManager.cs b/Ryujinx.HLE/HOS/Services/Wlan/ILocalManager.cs new file mode 100644 index 0000000000..4cc2c4b2e7 --- /dev/null +++ b/Ryujinx.HLE/HOS/Services/Wlan/ILocalManager.cs @@ -0,0 +1,8 @@ +namespace Ryujinx.HLE.HOS.Services.Wlan +{ + [Service("wlan:lcl")] + class ILocalManager : IpcService + { + public ILocalManager(ServiceCtx context) { } + } +} \ No newline at end of file diff --git a/Ryujinx.HLE/HOS/Services/Wlan/ISocketGetFrame.cs b/Ryujinx.HLE/HOS/Services/Wlan/ISocketGetFrame.cs new file mode 100644 index 0000000000..ab5b21933d --- /dev/null +++ b/Ryujinx.HLE/HOS/Services/Wlan/ISocketGetFrame.cs @@ -0,0 +1,8 @@ +namespace Ryujinx.HLE.HOS.Services.Wlan +{ + [Service("wlan:sg")] + class ISocketGetFrame : IpcService + { + public ISocketGetFrame(ServiceCtx context) { } + } +} \ No newline at end of file diff --git a/Ryujinx.HLE/HOS/Services/Wlan/ISocketManager.cs b/Ryujinx.HLE/HOS/Services/Wlan/ISocketManager.cs new file mode 100644 index 0000000000..afa1bede2c --- /dev/null +++ b/Ryujinx.HLE/HOS/Services/Wlan/ISocketManager.cs @@ -0,0 +1,8 @@ +namespace Ryujinx.HLE.HOS.Services.Wlan +{ + [Service("wlan:soc")] + class ISocketManager : IpcService + { + public ISocketManager(ServiceCtx context) { } + } +} \ No newline at end of file diff --git a/Ryujinx.HLE/HOS/Services/Wlan/IUnknown1.cs b/Ryujinx.HLE/HOS/Services/Wlan/IUnknown1.cs new file mode 100644 index 0000000000..dfae18e5d3 --- /dev/null +++ b/Ryujinx.HLE/HOS/Services/Wlan/IUnknown1.cs @@ -0,0 +1,8 @@ +namespace Ryujinx.HLE.HOS.Services.Wlan +{ + [Service("wlan:dtc")] // 6.0.0+ + class IUnknown1 : IpcService + { + public IUnknown1(ServiceCtx context) { } + } +} \ No newline at end of file diff --git a/Ryujinx.HLE/HOS/SystemState/AppletStateMgr.cs b/Ryujinx.HLE/HOS/SystemState/AppletStateMgr.cs index 1fd27505cc..341f2a31b4 100644 --- a/Ryujinx.HLE/HOS/SystemState/AppletStateMgr.cs +++ b/Ryujinx.HLE/HOS/SystemState/AppletStateMgr.cs @@ -1,5 +1,5 @@ using Ryujinx.HLE.HOS.Kernel.Threading; -using Ryujinx.HLE.HOS.Services.Am; +using Ryujinx.HLE.HOS.Services.Am.AppletAE.AllSystemAppletProxiesService.SystemAppletProxy; using System.Collections.Concurrent; namespace Ryujinx.HLE.HOS.SystemState diff --git a/Ryujinx.HLE/HOS/SystemState/SystemStateMgr.cs b/Ryujinx.HLE/HOS/SystemState/SystemStateMgr.cs index 97fa1d74b6..2c3b188fe7 100644 --- a/Ryujinx.HLE/HOS/SystemState/SystemStateMgr.cs +++ b/Ryujinx.HLE/HOS/SystemState/SystemStateMgr.cs @@ -1,4 +1,4 @@ -using Ryujinx.HLE.HOS.Services.Acc; +using Ryujinx.HLE.HOS.Services.Account.Acc; using Ryujinx.HLE.Utilities; using System;