From 5f3ed6dfc0439f243b1becbc99c63781aa436fb9 Mon Sep 17 00:00:00 2001 From: Isaac Marovitz Date: Thu, 15 Feb 2024 12:15:17 -0500 Subject: [PATCH] =?UTF-8?q?Signatures=E2=80=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Ipc/Controllers/CradleFirmwareUpdater.cs | 60 +++++++++++++++++++ .../Am/Ipc/Controllers/SelfController.cs | 9 +-- .../SystemAppletControllerForDebug.cs | 42 +++++++++++++ src/Ryujinx.Horizon/Am/Ipc/ProxiesService.cs | 14 ++--- .../IAllSystemAppletProxiesService.cs | 6 +- .../Am/Controllers/ICradleFirmwareUpdater.cs | 15 +++++ .../Sdk/Am/Controllers/ISelfController.cs | 8 +-- .../ISystemAppletControllerForDebug.cs | 13 ++++ .../Sdk/Am/CradleDeviceInfo.cs | 10 ++++ .../Sdk/Am/UpdateProgressInfo.cs | 10 ++++ 10 files changed, 169 insertions(+), 18 deletions(-) create mode 100644 src/Ryujinx.Horizon/Am/Ipc/Controllers/CradleFirmwareUpdater.cs create mode 100644 src/Ryujinx.Horizon/Am/Ipc/Controllers/SystemAppletControllerForDebug.cs create mode 100644 src/Ryujinx.Horizon/Sdk/Am/Controllers/ICradleFirmwareUpdater.cs create mode 100644 src/Ryujinx.Horizon/Sdk/Am/Controllers/ISystemAppletControllerForDebug.cs create mode 100644 src/Ryujinx.Horizon/Sdk/Am/CradleDeviceInfo.cs create mode 100644 src/Ryujinx.Horizon/Sdk/Am/UpdateProgressInfo.cs diff --git a/src/Ryujinx.Horizon/Am/Ipc/Controllers/CradleFirmwareUpdater.cs b/src/Ryujinx.Horizon/Am/Ipc/Controllers/CradleFirmwareUpdater.cs new file mode 100644 index 000000000..7d5144cf1 --- /dev/null +++ b/src/Ryujinx.Horizon/Am/Ipc/Controllers/CradleFirmwareUpdater.cs @@ -0,0 +1,60 @@ +using Ryujinx.Common.Logging; +using Ryujinx.Horizon.Common; +using Ryujinx.Horizon.Sdk.Am; +using Ryujinx.Horizon.Sdk.Am.Controllers; +using Ryujinx.Horizon.Sdk.Sf; + +namespace Ryujinx.Horizon.Am.Ipc.Controllers +{ + partial class CradleFirmwareUpdater : ICradleFirmwareUpdater + { + [CmifCommand(0)] + public Result StartUpdate() + { + Logger.Stub?.PrintStub(LogClass.ServiceAm); + + return Result.Success; + } + + [CmifCommand(1)] + public Result FinishUpdate() + { + Logger.Stub?.PrintStub(LogClass.ServiceAm); + + return Result.Success; + } + + [CmifCommand(2)] + public Result GetCradleDeviceInfo(out CradleDeviceInfo arg0) + { + Logger.Stub?.PrintStub(LogClass.ServiceAm); + + return Result.Success; + } + + [CmifCommand(3)] + public Result GetCradleDeviceInfoChangeEvent(out int arg0) + { + arg0 = 0; + Logger.Stub?.PrintStub(LogClass.ServiceAm); + + return Result.Success; + } + + [CmifCommand(4)] + public Result GetUpdateProgressInfo(out UpdateProgressInfo arg0) + { + Logger.Stub?.PrintStub(LogClass.ServiceAm); + + return Result.Success; + } + + [CmifCommand(5)] + public Result GetLastInternalResult() + { + Logger.Stub?.PrintStub(LogClass.ServiceAm); + + return Result.Success; + } + } +} diff --git a/src/Ryujinx.Horizon/Am/Ipc/Controllers/SelfController.cs b/src/Ryujinx.Horizon/Am/Ipc/Controllers/SelfController.cs index 30e28ab40..81545b22c 100644 --- a/src/Ryujinx.Horizon/Am/Ipc/Controllers/SelfController.cs +++ b/src/Ryujinx.Horizon/Am/Ipc/Controllers/SelfController.cs @@ -48,15 +48,16 @@ namespace Ryujinx.Horizon.Am.Ipc.Controllers } [CmifCommand(9)] - public Result GetLibraryAppletLaunchableEvent() + public Result GetLibraryAppletLaunchableEvent(out int arg0) { + arg0 = 0; Logger.Stub?.PrintStub(LogClass.ServiceAm); return Result.Success; } [CmifCommand(10)] - public Result SetScreenShotPermission() + public Result SetScreenShotPermission(int arg0) { Logger.Stub?.PrintStub(LogClass.ServiceAm); @@ -64,7 +65,7 @@ namespace Ryujinx.Horizon.Am.Ipc.Controllers } [CmifCommand(11)] - public Result SetOperationModeChangedNotification() + public Result SetOperationModeChangedNotification(bool arg0) { Logger.Stub?.PrintStub(LogClass.ServiceAm); @@ -72,7 +73,7 @@ namespace Ryujinx.Horizon.Am.Ipc.Controllers } [CmifCommand(12)] - public Result SetPerformanceModeChangedNotification() + public Result SetPerformanceModeChangedNotification(bool arg0) { Logger.Stub?.PrintStub(LogClass.ServiceAm); diff --git a/src/Ryujinx.Horizon/Am/Ipc/Controllers/SystemAppletControllerForDebug.cs b/src/Ryujinx.Horizon/Am/Ipc/Controllers/SystemAppletControllerForDebug.cs new file mode 100644 index 000000000..c55b67db1 --- /dev/null +++ b/src/Ryujinx.Horizon/Am/Ipc/Controllers/SystemAppletControllerForDebug.cs @@ -0,0 +1,42 @@ +using Ryujinx.Common.Logging; +using Ryujinx.Horizon.Common; +using Ryujinx.Horizon.Sdk.Am.Controllers; +using Ryujinx.Horizon.Sdk.Sf; + +namespace Ryujinx.Horizon.Am.Ipc.Controllers +{ + partial class SystemAppletControllerForDebug : ISystemAppletControllerForDebug + { + [CmifCommand(1)] + public Result RequestLaunchApplicationForDebug() + { + Logger.Stub?.PrintStub(LogClass.ServiceAm); + + return Result.Success; + } + + [CmifCommand(2)] + public Result GetDebugStorageChannel() + { + Logger.Stub?.PrintStub(LogClass.ServiceAm); + + return Result.Success; + } + + [CmifCommand(3)] + public Result CreateStorageForDebug() + { + Logger.Stub?.PrintStub(LogClass.ServiceAm); + + return Result.Success; + } + + [CmifCommand(4)] + public Result CreateCradleFirmwareUpdaterForDebug() + { + Logger.Stub?.PrintStub(LogClass.ServiceAm); + + return Result.Success; + } + } +} diff --git a/src/Ryujinx.Horizon/Am/Ipc/ProxiesService.cs b/src/Ryujinx.Horizon/Am/Ipc/ProxiesService.cs index e123a2a57..0f262b3fc 100644 --- a/src/Ryujinx.Horizon/Am/Ipc/ProxiesService.cs +++ b/src/Ryujinx.Horizon/Am/Ipc/ProxiesService.cs @@ -1,4 +1,4 @@ -using Ryujinx.Common.Logging; +using Ryujinx.Horizon.Am.Ipc.Controllers; using Ryujinx.Horizon.Am.Ipc.Proxies; using Ryujinx.Horizon.Common; using Ryujinx.Horizon.Sdk.Am.Controllers; @@ -52,25 +52,25 @@ namespace Ryujinx.Horizon.Am.Ipc } [CmifCommand(400)] - public Result CreateSelfLibraryAppletCreatorForDevelop() + public Result CreateSelfLibraryAppletCreatorForDevelop(out ILibraryAppletCreator libraryAppletCreator, ulong unknown, [ClientProcessId] ulong pid) { - Logger.Stub?.PrintStub(LogClass.ServiceAm); + libraryAppletCreator = new LibraryAppletCreator(); return Result.Success; } [CmifCommand(410)] - public Result GetSystemAppletControllerForDebug() + public Result GetSystemAppletControllerForDebug(out ISystemAppletControllerForDebug systemAppletControllerForDebug) { - Logger.Stub?.PrintStub(LogClass.ServiceAm); + systemAppletControllerForDebug = new SystemAppletControllerForDebug(); return Result.Success; } [CmifCommand(1000)] - public Result GetDebugFunctions() + public Result GetDebugFunctions(out IDebugFunctions debugFunctions) { - Logger.Stub?.PrintStub(LogClass.ServiceAm); + debugFunctions = new DebugFunctions(); return Result.Success; } diff --git a/src/Ryujinx.Horizon/Sdk/Am/Controllers/IAllSystemAppletProxiesService.cs b/src/Ryujinx.Horizon/Sdk/Am/Controllers/IAllSystemAppletProxiesService.cs index 7c7179b12..608dd90d1 100644 --- a/src/Ryujinx.Horizon/Sdk/Am/Controllers/IAllSystemAppletProxiesService.cs +++ b/src/Ryujinx.Horizon/Sdk/Am/Controllers/IAllSystemAppletProxiesService.cs @@ -12,8 +12,8 @@ namespace Ryujinx.Horizon.Sdk.Am.Controllers Result OpenLibraryAppletProxy(out ILibraryAppletProxy libraryAppletProxy, ulong unknown1, int unknown2, ReadOnlySpan appletAttribute, ulong pid); Result OpenOverlayAppletProxy(out IOverlayAppletProxy overlayAppletProxy, ulong unknown1, int unknown2, ulong pid); Result OpenSystemApplicationProxy(out IApplicationProxy applicationProxy, ulong unknown1, int unknown2, ulong pid); - Result CreateSelfLibraryAppletCreatorForDevelop(); - Result GetSystemAppletControllerForDebug(); - Result GetDebugFunctions(); + Result CreateSelfLibraryAppletCreatorForDevelop(out ILibraryAppletCreator libraryAppletCreator, ulong unknown, ulong pid); + Result GetSystemAppletControllerForDebug(out ISystemAppletControllerForDebug systemAppletControllerForDebug); + Result GetDebugFunctions(out IDebugFunctions debugFunctions); } } diff --git a/src/Ryujinx.Horizon/Sdk/Am/Controllers/ICradleFirmwareUpdater.cs b/src/Ryujinx.Horizon/Sdk/Am/Controllers/ICradleFirmwareUpdater.cs new file mode 100644 index 000000000..10f0f8ecb --- /dev/null +++ b/src/Ryujinx.Horizon/Sdk/Am/Controllers/ICradleFirmwareUpdater.cs @@ -0,0 +1,15 @@ +using Ryujinx.Horizon.Common; +using Ryujinx.Horizon.Sdk.Sf; + +namespace Ryujinx.Horizon.Sdk.Am.Controllers +{ + interface ICradleFirmwareUpdater : IServiceObject + { + Result StartUpdate(); + Result FinishUpdate(); + Result GetCradleDeviceInfo(out CradleDeviceInfo arg0); + Result GetCradleDeviceInfoChangeEvent(out int arg0); + Result GetUpdateProgressInfo(out UpdateProgressInfo arg0); + Result GetLastInternalResult(); + } +} diff --git a/src/Ryujinx.Horizon/Sdk/Am/Controllers/ISelfController.cs b/src/Ryujinx.Horizon/Sdk/Am/Controllers/ISelfController.cs index 83fa9299c..9f90029be 100644 --- a/src/Ryujinx.Horizon/Sdk/Am/Controllers/ISelfController.cs +++ b/src/Ryujinx.Horizon/Sdk/Am/Controllers/ISelfController.cs @@ -9,10 +9,10 @@ namespace Ryujinx.Horizon.Sdk.Am.Controllers Result UnlockExit(); Result EnterFatalSection(); Result LeaveFatalSection(); - Result GetLibraryAppletLaunchableEvent(); - Result SetScreenShotPermission(); - Result SetOperationModeChangedNotification(); - Result SetPerformanceModeChangedNotification(); + Result GetLibraryAppletLaunchableEvent(out int arg0); + Result SetScreenShotPermission(int arg0); + Result SetOperationModeChangedNotification(bool arg0); + Result SetPerformanceModeChangedNotification(bool arg0); Result SetFocusHandlingMode(); Result SetRestartMessageEnabled(); Result SetScreenShotAppletIdentityInfo(); diff --git a/src/Ryujinx.Horizon/Sdk/Am/Controllers/ISystemAppletControllerForDebug.cs b/src/Ryujinx.Horizon/Sdk/Am/Controllers/ISystemAppletControllerForDebug.cs new file mode 100644 index 000000000..0f020342d --- /dev/null +++ b/src/Ryujinx.Horizon/Sdk/Am/Controllers/ISystemAppletControllerForDebug.cs @@ -0,0 +1,13 @@ +using Ryujinx.Horizon.Common; +using Ryujinx.Horizon.Sdk.Sf; + +namespace Ryujinx.Horizon.Sdk.Am.Controllers +{ + interface ISystemAppletControllerForDebug : IServiceObject + { + Result RequestLaunchApplicationForDebug(); + Result GetDebugStorageChannel(); + Result CreateStorageForDebug(); + Result CreateCradleFirmwareUpdaterForDebug(); + } +} diff --git a/src/Ryujinx.Horizon/Sdk/Am/CradleDeviceInfo.cs b/src/Ryujinx.Horizon/Sdk/Am/CradleDeviceInfo.cs new file mode 100644 index 000000000..a8c80faaf --- /dev/null +++ b/src/Ryujinx.Horizon/Sdk/Am/CradleDeviceInfo.cs @@ -0,0 +1,10 @@ +using System.Runtime.InteropServices; + +namespace Ryujinx.Horizon.Sdk.Am +{ + [StructLayout(LayoutKind.Sequential, Size = 0x10, Pack = 0x4)] + public struct CradleDeviceInfo + { + + } +} diff --git a/src/Ryujinx.Horizon/Sdk/Am/UpdateProgressInfo.cs b/src/Ryujinx.Horizon/Sdk/Am/UpdateProgressInfo.cs new file mode 100644 index 000000000..0d5652a95 --- /dev/null +++ b/src/Ryujinx.Horizon/Sdk/Am/UpdateProgressInfo.cs @@ -0,0 +1,10 @@ +using System.Runtime.InteropServices; + +namespace Ryujinx.Horizon.Sdk.Am +{ + [StructLayout(LayoutKind.Sequential, Size = 0x10, Pack = 0x4)] + public struct UpdateProgressInfo + { + + } +}