Просмотр исходного кода

Refactoring HOS folder structure (#771)

* Refactoring HOS folder structure

Refactoring HOS folder structure:

- Added some subfolders when needed (Following structure decided in private).
- Added some `Types` folders when needed.
- Little cleanup here and there.
- Add services placeholders for every HOS services (close #766 and #753).

* Remove Types namespaces
Ac_K 6 лет назад
Родитель
Сommit
a0720b5681
100 измененных файлов с 716 добавлено и 343 удалено
  1. 2 1
      Ryujinx.HLE/HOS/Horizon.cs
  2. 2 3
      Ryujinx.HLE/HOS/Services/Account/Acc/AccountService/AccountUtils.cs
  3. 8 0
      Ryujinx.HLE/HOS/Services/Account/Acc/IAccountServiceForAdministrator.cs
  4. 4 8
      Ryujinx.HLE/HOS/Services/Account/Acc/IAccountServiceForApplication.cs
  5. 8 0
      Ryujinx.HLE/HOS/Services/Account/Acc/IAccountServiceForSystemService.cs
  6. 8 0
      Ryujinx.HLE/HOS/Services/Account/Acc/IBaasAccessTokenAccessor.cs
  7. 2 2
      Ryujinx.HLE/HOS/Services/Account/Acc/IManagerForApplication.cs
  8. 1 2
      Ryujinx.HLE/HOS/Services/Account/Acc/IProfile.cs
  9. 1 1
      Ryujinx.HLE/HOS/Services/Account/Acc/Types/AccountState.cs
  10. 1 1
      Ryujinx.HLE/HOS/Services/Account/Acc/Types/UserProfile.cs
  11. 8 0
      Ryujinx.HLE/HOS/Services/Account/Dauth/IService.cs
  12. 1 1
      Ryujinx.HLE/HOS/Services/Account/ResultCode.cs
  13. 3 1
      Ryujinx.HLE/HOS/Services/Am/AppletAE/AllSystemAppletProxiesService/ISystemAppletProxy.cs
  14. 2 1
      Ryujinx.HLE/HOS/Services/Am/AppletAE/AllSystemAppletProxiesService/LibraryAppletCreator/ILibraryAppletAccessor.cs
  15. 1 1
      Ryujinx.HLE/HOS/Services/Am/AppletAE/AllSystemAppletProxiesService/SystemAppletProxy/IApplicationCreator.cs
  16. 1 1
      Ryujinx.HLE/HOS/Services/Am/AppletAE/AllSystemAppletProxiesService/SystemAppletProxy/IAudioController.cs
  17. 7 6
      Ryujinx.HLE/HOS/Services/Am/AppletAE/AllSystemAppletProxiesService/SystemAppletProxy/ICommonStateGetter.cs
  18. 7 0
      Ryujinx.HLE/HOS/Services/Am/AppletAE/AllSystemAppletProxiesService/SystemAppletProxy/IDebugFunctions.cs
  19. 1 1
      Ryujinx.HLE/HOS/Services/Am/AppletAE/AllSystemAppletProxiesService/SystemAppletProxy/IDisplayController.cs
  20. 1 1
      Ryujinx.HLE/HOS/Services/Am/AppletAE/AllSystemAppletProxiesService/SystemAppletProxy/IGlobalStateController.cs
  21. 1 1
      Ryujinx.HLE/HOS/Services/Am/AppletAE/AllSystemAppletProxiesService/SystemAppletProxy/IHomeMenuFunctions.cs
  22. 3 1
      Ryujinx.HLE/HOS/Services/Am/AppletAE/AllSystemAppletProxiesService/SystemAppletProxy/ILibraryAppletCreator.cs
  23. 1 1
      Ryujinx.HLE/HOS/Services/Am/AppletAE/AllSystemAppletProxiesService/SystemAppletProxy/ISelfController.cs
  24. 1 1
      Ryujinx.HLE/HOS/Services/Am/AppletAE/AllSystemAppletProxiesService/SystemAppletProxy/IWindowController.cs
  25. 8 0
      Ryujinx.HLE/HOS/Services/Am/AppletAE/AllSystemAppletProxiesService/SystemAppletProxy/Types/FocusState.cs
  26. 1 1
      Ryujinx.HLE/HOS/Services/Am/AppletAE/AllSystemAppletProxiesService/SystemAppletProxy/Types/MessageInfo.cs
  27. 8 0
      Ryujinx.HLE/HOS/Services/Am/AppletAE/AllSystemAppletProxiesService/SystemAppletProxy/Types/OperationMode.cs
  28. 3 1
      Ryujinx.HLE/HOS/Services/Am/AppletAE/IAllSystemAppletProxiesService.cs
  29. 1 1
      Ryujinx.HLE/HOS/Services/Am/AppletAE/IStorage.cs
  30. 1 1
      Ryujinx.HLE/HOS/Services/Am/AppletAE/IStorageAccessor.cs
  31. 4 4
      Ryujinx.HLE/HOS/Services/Am/AppletAE/Storage/StorageHelper.cs
  32. 3 1
      Ryujinx.HLE/HOS/Services/Am/AppletOE/ApplicationProxyService/ApplicationProxy/IApplicationFunctions.cs
  33. 4 1
      Ryujinx.HLE/HOS/Services/Am/AppletOE/ApplicationProxyService/IApplicationProxy.cs
  34. 3 0
      Ryujinx.HLE/HOS/Services/Am/AppletOE/IApplicationProxyService.cs
  35. 0 8
      Ryujinx.HLE/HOS/Services/Am/FocusState.cs
  36. 0 7
      Ryujinx.HLE/HOS/Services/Am/IDebugFunctions.cs
  37. 8 0
      Ryujinx.HLE/HOS/Services/Am/Idle/IPolicyManagerSystem.cs
  38. 8 0
      Ryujinx.HLE/HOS/Services/Am/Omm/IOperationModeManager.cs
  39. 0 8
      Ryujinx.HLE/HOS/Services/Am/OperationMode.cs
  40. 8 0
      Ryujinx.HLE/HOS/Services/Am/Spsm/IPowerStateInterface.cs
  41. 8 0
      Ryujinx.HLE/HOS/Services/Am/Tcap/IManager.cs
  42. 2 97
      Ryujinx.HLE/HOS/Services/Android/NvFlinger.cs
  43. 0 0
      Ryujinx.HLE/HOS/Services/Android/Parcel.cs
  44. 13 0
      Ryujinx.HLE/HOS/Services/Android/Types/BufferEntry.cs
  45. 10 0
      Ryujinx.HLE/HOS/Services/Android/Types/BufferState.cs
  46. 17 0
      Ryujinx.HLE/HOS/Services/Android/Types/Color/ColorBytePerPixel.cs
  47. 42 0
      Ryujinx.HLE/HOS/Services/Android/Types/Color/ColorComponent.cs
  48. 9 0
      Ryujinx.HLE/HOS/Services/Android/Types/Color/ColorDataType.cs
  49. 1 132
      Ryujinx.HLE/HOS/Services/Android/Types/Color/ColorFormat.cs
  50. 10 0
      Ryujinx.HLE/HOS/Services/Android/Types/Color/ColorShift.cs
  51. 33 0
      Ryujinx.HLE/HOS/Services/Android/Types/Color/ColorSpace.cs
  52. 31 0
      Ryujinx.HLE/HOS/Services/Android/Types/Color/ColorSwizzle.cs
  53. 11 0
      Ryujinx.HLE/HOS/Services/Android/Types/Fence.cs
  54. 37 0
      Ryujinx.HLE/HOS/Services/Android/Types/GbpBuffer.cs
  55. 21 0
      Ryujinx.HLE/HOS/Services/Android/Types/GraphicBufferHeader.cs
  56. 14 0
      Ryujinx.HLE/HOS/Services/Android/Types/HalTransform.cs
  57. 23 0
      Ryujinx.HLE/HOS/Services/Android/Types/MultiFence.cs
  58. 41 0
      Ryujinx.HLE/HOS/Services/Android/Types/NvGraphicBuffer.cs
  59. 44 0
      Ryujinx.HLE/HOS/Services/Android/Types/NvGraphicBufferSurface.cs
  60. 39 0
      Ryujinx.HLE/HOS/Services/Android/Types/NvGraphicBufferSurfaceArray.cs
  61. 35 0
      Ryujinx.HLE/HOS/Services/Android/Types/QueueBufferObject.cs
  62. 13 0
      Ryujinx.HLE/HOS/Services/Android/Types/Rect.cs
  63. 1 2
      Ryujinx.HLE/HOS/Services/Apm/IManager.cs
  64. 0 0
      Ryujinx.HLE/HOS/Services/Apm/Types/CpuBoostMode.cs
  65. 0 0
      Ryujinx.HLE/HOS/Services/Apm/Types/PerformanceConfiguration.cs
  66. 0 0
      Ryujinx.HLE/HOS/Services/Apm/Types/PerformanceMode.cs
  67. 1 1
      Ryujinx.HLE/HOS/Services/Arp/ApplicationLaunchProperty.cs
  68. 8 0
      Ryujinx.HLE/HOS/Services/Arp/IReader.cs
  69. 8 0
      Ryujinx.HLE/HOS/Services/Arp/IWriter.cs
  70. 1 1
      Ryujinx.HLE/HOS/Services/Audio/AudioOutManager/IAudioOut.cs
  71. 1 1
      Ryujinx.HLE/HOS/Services/Audio/AudioOutManager/Types/AudioOutData.cs
  72. 1 1
      Ryujinx.HLE/HOS/Services/Audio/AudioRendererManager/IAudioDevice.cs
  73. 5 4
      Ryujinx.HLE/HOS/Services/Audio/AudioRendererManager/IAudioRenderer.cs
  74. 1 1
      Ryujinx.HLE/HOS/Services/Audio/AudioRendererManager/MemoryPoolContext.cs
  75. 1 1
      Ryujinx.HLE/HOS/Services/Audio/AudioRendererManager/Resampler.cs
  76. 1 1
      Ryujinx.HLE/HOS/Services/Audio/AudioRendererManager/Types/AudioConsts.cs
  77. 1 1
      Ryujinx.HLE/HOS/Services/Audio/AudioRendererManager/Types/AudioRendererParameter.cs
  78. 1 1
      Ryujinx.HLE/HOS/Services/Audio/AudioRendererManager/Types/BehaviorIn.cs
  79. 1 1
      Ryujinx.HLE/HOS/Services/Audio/AudioRendererManager/Types/BiquadFilter.cs
  80. 1 1
      Ryujinx.HLE/HOS/Services/Audio/AudioRendererManager/Types/MemoryPoolIn.cs
  81. 1 1
      Ryujinx.HLE/HOS/Services/Audio/AudioRendererManager/Types/MemoryPoolOut.cs
  82. 1 1
      Ryujinx.HLE/HOS/Services/Audio/AudioRendererManager/Types/MemoryPoolState.cs
  83. 1 1
      Ryujinx.HLE/HOS/Services/Audio/AudioRendererManager/Types/PlayState.cs
  84. 1 1
      Ryujinx.HLE/HOS/Services/Audio/AudioRendererManager/Types/UpdateDataHeader.cs
  85. 1 1
      Ryujinx.HLE/HOS/Services/Audio/AudioRendererManager/Types/VoiceChannelResourceIn.cs
  86. 1 1
      Ryujinx.HLE/HOS/Services/Audio/AudioRendererManager/Types/VoiceIn.cs
  87. 1 1
      Ryujinx.HLE/HOS/Services/Audio/AudioRendererManager/Types/VoiceOut.cs
  88. 1 1
      Ryujinx.HLE/HOS/Services/Audio/AudioRendererManager/Types/WaveBuffer.cs
  89. 1 1
      Ryujinx.HLE/HOS/Services/Audio/AudioRendererManager/VoiceContext.cs
  90. 1 1
      Ryujinx.HLE/HOS/Services/Audio/HardwareOpusDecoderManager/IHardwareOpusDecoder.cs
  91. 8 0
      Ryujinx.HLE/HOS/Services/Audio/IAudioController.cs
  92. 8 0
      Ryujinx.HLE/HOS/Services/Audio/IAudioInManager.cs
  93. 8 0
      Ryujinx.HLE/HOS/Services/Audio/IAudioInManagerForApplet.cs
  94. 8 0
      Ryujinx.HLE/HOS/Services/Audio/IAudioInManagerForDebugger.cs
  95. 2 2
      Ryujinx.HLE/HOS/Services/Audio/IAudioOutManager.cs
  96. 8 0
      Ryujinx.HLE/HOS/Services/Audio/IAudioOutManagerForApplet.cs
  97. 8 0
      Ryujinx.HLE/HOS/Services/Audio/IAudioOutManagerForDebugger.cs
  98. 18 17
      Ryujinx.HLE/HOS/Services/Audio/IAudioRendererManager.cs
  99. 8 0
      Ryujinx.HLE/HOS/Services/Audio/IAudioRendererManagerForApplet.cs
  100. 8 0
      Ryujinx.HLE/HOS/Services/Audio/IAudioRendererManagerForDebugger.cs

+ 2 - 1
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);
 

+ 2 - 3
Ryujinx.HLE/HOS/Services/Acc/Account/AccountUtils.cs → 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
     {

+ 8 - 0
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) { }
+    }
+}

+ 4 - 8
Ryujinx.HLE/HOS/Services/Acc/IAccountService.cs → 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

+ 8 - 0
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) { }
+    }
+}

+ 8 - 0
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) { }
+    }
+}

+ 2 - 2
Ryujinx.HLE/HOS/Services/Acc/IManagerForApplication.cs → 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
     {

+ 1 - 2
Ryujinx.HLE/HOS/Services/Acc/IProfile.cs → 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
     {

+ 1 - 1
Ryujinx.HLE/HOS/Services/Acc/Account/AccountState.cs → 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
     {

+ 1 - 1
Ryujinx.HLE/HOS/Services/Acc/Account/UserProfile.cs → 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
     {

+ 8 - 0
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) { }
+    }
+}

+ 1 - 1
Ryujinx.HLE/HOS/Services/Acc/ResultCode.cs → 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
     {

+ 3 - 1
Ryujinx.HLE/HOS/Services/Am/ISystemAppletProxy.cs → 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
     {

+ 2 - 1
Ryujinx.HLE/HOS/Services/Am/ILibraryAppletAccessor.cs → 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
     {

+ 1 - 1
Ryujinx.HLE/HOS/Services/Am/IApplicationCreator.cs → 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
     {

+ 1 - 1
Ryujinx.HLE/HOS/Services/Am/IAudioController.cs → 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
     {

+ 7 - 6
Ryujinx.HLE/HOS/Services/Am/ICommonStateGetter.cs → 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.

+ 7 - 0
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() { }
+    }
+}

+ 1 - 1
Ryujinx.HLE/HOS/Services/Am/IDisplayController.cs → 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
     {

+ 1 - 1
Ryujinx.HLE/HOS/Services/Am/IGlobalStateController.cs → 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
     {

+ 1 - 1
Ryujinx.HLE/HOS/Services/Am/IHomeMenuFunctions.cs → 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
     {

+ 3 - 1
Ryujinx.HLE/HOS/Services/Am/ILibraryAppletCreator.cs → 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
     {

+ 1 - 1
Ryujinx.HLE/HOS/Services/Am/ISelfController.cs → 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
     {

+ 1 - 1
Ryujinx.HLE/HOS/Services/Am/IWindowController.cs → 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
     {

+ 8 - 0
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
+    }
+}

+ 1 - 1
Ryujinx.HLE/HOS/Services/Am/MessageInfo.cs → 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
     {

+ 8 - 0
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
+    }
+}

+ 3 - 1
Ryujinx.HLE/HOS/Services/Am/IAllSystemAppletProxiesService.cs → 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

+ 1 - 1
Ryujinx.HLE/HOS/Services/Am/IStorage.cs → 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
     {

+ 1 - 1
Ryujinx.HLE/HOS/Services/Am/IStorageAccessor.cs → 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
     {

+ 4 - 4
Ryujinx.HLE/HOS/Services/Am/StorageHelper.cs → 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();
             }

+ 3 - 1
Ryujinx.HLE/HOS/Services/Am/IApplicationFunctions.cs → 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
     {

+ 4 - 1
Ryujinx.HLE/HOS/Services/Am/IApplicationProxy.cs → 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
     {

+ 3 - 0
Ryujinx.HLE/HOS/Services/Am/IApplicationProxyService.cs → 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")]

+ 0 - 8
Ryujinx.HLE/HOS/Services/Am/FocusState.cs

@@ -1,8 +0,0 @@
-namespace Ryujinx.HLE.HOS.Services.Am
-{
-    enum FocusState
-    {
-        InFocus    = 1,
-        OutOfFocus = 2
-    }
-}

+ 0 - 7
Ryujinx.HLE/HOS/Services/Am/IDebugFunctions.cs

@@ -1,7 +0,0 @@
-namespace Ryujinx.HLE.HOS.Services.Am
-{
-    class IDebugFunctions : IpcService
-    {
-        public IDebugFunctions() { }
-    }
-}

+ 8 - 0
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) { }
+    }
+}

+ 8 - 0
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) { }
+    }
+}

+ 0 - 8
Ryujinx.HLE/HOS/Services/Am/OperationMode.cs

@@ -1,8 +0,0 @@
-namespace Ryujinx.HLE.HOS.Services.Am
-{
-    enum OperationMode
-    {
-        Handheld = 0,
-        Docked   = 1
-    }
-}

+ 8 - 0
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) { }
+    }
+}

+ 8 - 0
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) { }
+    }
+}

+ 2 - 97
Ryujinx.HLE/HOS/Services/Vi/NvFlinger.cs → 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;

+ 0 - 0
Ryujinx.HLE/HOS/Services/Vi/Parcel.cs → Ryujinx.HLE/HOS/Services/Android/Parcel.cs


+ 13 - 0
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;
+    }
+}

+ 10 - 0
Ryujinx.HLE/HOS/Services/Android/Types/BufferState.cs

@@ -0,0 +1,10 @@
+namespace Ryujinx.HLE.HOS.Services.Android
+{
+    enum BufferState
+    {
+        Free,
+        Dequeued,
+        Queued,
+        Acquired
+    }
+}

+ 17 - 0
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
+    }
+}

+ 42 - 0
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,
+    }
+}

+ 9 - 0
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
+    }
+}

+ 1 - 132
Ryujinx.HLE/HOS/Services/Vi/ColorFormat.cs → 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,

+ 10 - 0
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;
+    }
+}

+ 33 - 0
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,
+    }
+}

+ 31 - 0
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
+    }
+}

+ 11 - 0
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;
+    }
+}

+ 37 - 0
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<NvGraphicBuffer>() + Marshal.SizeOf<GraphicBufferHeader>();
+
+        public GbpBuffer(BinaryReader reader)
+        {
+            Header = reader.ReadStruct<GraphicBufferHeader>();
+
+            // 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<NvGraphicBuffer>();
+        }
+
+        public void Write(BinaryWriter writer)
+        {
+            writer.WriteStruct(Header);
+            writer.WriteStruct(Buffer);
+        }
+    }
+}

+ 21 - 0
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;
+    }
+}

+ 14 - 0
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
+    }
+}

+ 23 - 0
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;
+    }
+}

+ 41 - 0
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;
+    }
+}

+ 44 - 0
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;
+    }
+}

+ 39 - 0
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();
+            }
+        }
+    }
+}

+ 35 - 0
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;
+    }
+}

+ 13 - 0
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;
+    }
+}

+ 1 - 2
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) { }

+ 0 - 0
Ryujinx.HLE/HOS/Services/Apm/CpuBoostMode.cs → Ryujinx.HLE/HOS/Services/Apm/Types/CpuBoostMode.cs


+ 0 - 0
Ryujinx.HLE/HOS/Services/Apm/PerformanceConfiguration.cs → Ryujinx.HLE/HOS/Services/Apm/Types/PerformanceConfiguration.cs


+ 0 - 0
Ryujinx.HLE/HOS/Services/Apm/PerformanceMode.cs → Ryujinx.HLE/HOS/Services/Apm/Types/PerformanceMode.cs


+ 1 - 1
Ryujinx.HLE/HOS/Services/Glue/ApplicationLaunchProperty.cs → 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
     {

+ 8 - 0
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) { }
+    }
+}

+ 8 - 0
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) { }
+    }
+}

+ 1 - 1
Ryujinx.HLE/HOS/Services/Aud/AudioOut/IAudioOut.cs → 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
     {

+ 1 - 1
Ryujinx.HLE/HOS/Services/Aud/AudioOut/AudioOutData.cs → 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

+ 1 - 1
Ryujinx.HLE/HOS/Services/Aud/IAudioDevice.cs → 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
     {

+ 5 - 4
Ryujinx.HLE/HOS/Services/Aud/AudioRenderer/IAudioRenderer.cs → 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)
             {

+ 1 - 1
Ryujinx.HLE/HOS/Services/Aud/AudioRenderer/MemoryPoolContext.cs → 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
     {

+ 1 - 1
Ryujinx.HLE/HOS/Services/Aud/AudioRenderer/Resampler.cs → 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
     {

+ 1 - 1
Ryujinx.HLE/HOS/Services/Aud/AudioRenderer/AudioConsts.cs → 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
     {

+ 1 - 1
Ryujinx.HLE/HOS/Services/Aud/AudioRendererParameter.cs → 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

+ 1 - 1
Ryujinx.HLE/HOS/Services/Aud/AudioRenderer/BehaviorIn.cs → 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

+ 1 - 1
Ryujinx.HLE/HOS/Services/Aud/AudioRenderer/BiquadFilter.cs → 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

+ 1 - 1
Ryujinx.HLE/HOS/Services/Aud/AudioRenderer/MemoryPoolIn.cs → 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

+ 1 - 1
Ryujinx.HLE/HOS/Services/Aud/AudioRenderer/MemoryPoolOut.cs → 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

+ 1 - 1
Ryujinx.HLE/HOS/Services/Aud/AudioRenderer/MemoryPoolState.cs → 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
     {

+ 1 - 1
Ryujinx.HLE/HOS/Services/Aud/AudioRenderer/PlayState.cs → 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
     {

+ 1 - 1
Ryujinx.HLE/HOS/Services/Aud/AudioRenderer/UpdateDataHeader.cs → 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
     {

+ 1 - 1
Ryujinx.HLE/HOS/Services/Aud/AudioRenderer/VoiceChannelResourceIn.cs → 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

+ 1 - 1
Ryujinx.HLE/HOS/Services/Aud/AudioRenderer/VoiceIn.cs → 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

+ 1 - 1
Ryujinx.HLE/HOS/Services/Aud/AudioRenderer/VoiceOut.cs → 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

+ 1 - 1
Ryujinx.HLE/HOS/Services/Aud/AudioRenderer/WaveBuffer.cs → 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

+ 1 - 1
Ryujinx.HLE/HOS/Services/Aud/AudioRenderer/VoiceContext.cs → 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
     {

+ 1 - 1
Ryujinx.HLE/HOS/Services/Aud/IHardwareOpusDecoder.cs → 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
     {

+ 8 - 0
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) { }
+    }
+}

+ 8 - 0
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) { }
+    }
+}

+ 8 - 0
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) { }
+    }
+}

+ 8 - 0
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) { }
+    }
+}

+ 2 - 2
Ryujinx.HLE/HOS/Services/Aud/IAudioOutManager.cs → 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

+ 8 - 0
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) { }
+    }
+}

+ 8 - 0
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) { }
+    }
+}

+ 18 - 17
Ryujinx.HLE/HOS/Services/Aud/IAudioRendererManager.cs → 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;
         }

+ 8 - 0
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) { }
+    }
+}

+ 8 - 0
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) { }
+    }
+}

Некоторые файлы не были показаны из-за большого количества измененных файлов