From 0746b83edf49d1fd668dd337264e942f361b675c Mon Sep 17 00:00:00 2001 From: Mary Date: Wed, 14 Apr 2021 00:01:24 +0200 Subject: Initial support for the new 12.x IPC system (#2182) * Rename CommandAttribute as CommandHIpcAttribute to prepare for 12.x changes * Implement inital support for TIPC and adds SM command ids * *Ipc to *ipc * Missed a ref in last commit... * CommandAttributeTIpc to CommandAttributeTipc * Addresses comment and fixes some bugs around TIPC doesn't have any padding requirements as buffer C isn't a thing Fix for RegisterService inverting two argument only on TIPC --- .../ApplicationProxy/IApplicationFunctions.cs | 58 +++++++++++----------- 1 file changed, 29 insertions(+), 29 deletions(-) (limited to 'Ryujinx.HLE/HOS/Services/Am/AppletOE/ApplicationProxyService/ApplicationProxy') diff --git a/Ryujinx.HLE/HOS/Services/Am/AppletOE/ApplicationProxyService/ApplicationProxy/IApplicationFunctions.cs b/Ryujinx.HLE/HOS/Services/Am/AppletOE/ApplicationProxyService/ApplicationProxy/IApplicationFunctions.cs index 257f1cb0..770d4a40 100644 --- a/Ryujinx.HLE/HOS/Services/Am/AppletOE/ApplicationProxyService/ApplicationProxy/IApplicationFunctions.cs +++ b/Ryujinx.HLE/HOS/Services/Am/AppletOE/ApplicationProxyService/ApplicationProxy/IApplicationFunctions.cs @@ -43,7 +43,7 @@ namespace Ryujinx.HLE.HOS.Services.Am.AppletOE.ApplicationProxyService.Applicati _healthWarningDisappearedSystemEvent = new KEvent(system.KernelContext); } - [Command(1)] + [CommandHipc(1)] // PopLaunchParameter(LaunchParameterKind kind) -> object public ResultCode PopLaunchParameter(ServiceCtx context) { @@ -76,7 +76,7 @@ namespace Ryujinx.HLE.HOS.Services.Am.AppletOE.ApplicationProxyService.Applicati return ResultCode.Success; } - [Command(20)] + [CommandHipc(20)] // EnsureSaveData(nn::account::Uid) -> u64 public ResultCode EnsureSaveData(ServiceCtx context) { @@ -108,7 +108,7 @@ namespace Ryujinx.HLE.HOS.Services.Am.AppletOE.ApplicationProxyService.Applicati return (ResultCode)result.Value; } - [Command(21)] + [CommandHipc(21)] // GetDesiredLanguage() -> nn::settings::LanguageCode public ResultCode GetDesiredLanguage(ServiceCtx context) { @@ -145,7 +145,7 @@ namespace Ryujinx.HLE.HOS.Services.Am.AppletOE.ApplicationProxyService.Applicati return ResultCode.Success; } - [Command(22)] + [CommandHipc(22)] // SetTerminateResult(u32) public ResultCode SetTerminateResult(ServiceCtx context) { @@ -156,7 +156,7 @@ namespace Ryujinx.HLE.HOS.Services.Am.AppletOE.ApplicationProxyService.Applicati return ResultCode.Success; } - [Command(23)] + [CommandHipc(23)] // GetDisplayVersion() -> nn::oe::DisplayVersion public ResultCode GetDisplayVersion(ServiceCtx context) { @@ -167,7 +167,7 @@ namespace Ryujinx.HLE.HOS.Services.Am.AppletOE.ApplicationProxyService.Applicati return ResultCode.Success; } - [Command(26)] // 3.0.0+ + [CommandHipc(26)] // 3.0.0+ // GetSaveDataSize(u8 save_data_type, nn::account::Uid) -> (u64 save_size, u64 journal_size) public ResultCode GetSaveDataSize(ServiceCtx context) { @@ -186,7 +186,7 @@ namespace Ryujinx.HLE.HOS.Services.Am.AppletOE.ApplicationProxyService.Applicati return ResultCode.Success; } - [Command(30)] + [CommandHipc(30)] // BeginBlockingHomeButtonShortAndLongPressed() public ResultCode BeginBlockingHomeButtonShortAndLongPressed(ServiceCtx context) { @@ -197,7 +197,7 @@ namespace Ryujinx.HLE.HOS.Services.Am.AppletOE.ApplicationProxyService.Applicati return ResultCode.Success; } - [Command(31)] + [CommandHipc(31)] // EndBlockingHomeButtonShortAndLongPressed() public ResultCode EndBlockingHomeButtonShortAndLongPressed(ServiceCtx context) { @@ -208,7 +208,7 @@ namespace Ryujinx.HLE.HOS.Services.Am.AppletOE.ApplicationProxyService.Applicati return ResultCode.Success; } - [Command(32)] // 2.0.0+ + [CommandHipc(32)] // 2.0.0+ // BeginBlockingHomeButton(u64 nano_second) public ResultCode BeginBlockingHomeButton(ServiceCtx context) { @@ -221,7 +221,7 @@ namespace Ryujinx.HLE.HOS.Services.Am.AppletOE.ApplicationProxyService.Applicati return ResultCode.Success; } - [Command(33)] // 2.0.0+ + [CommandHipc(33)] // 2.0.0+ // EndBlockingHomeButton() public ResultCode EndBlockingHomeButton(ServiceCtx context) { @@ -232,7 +232,7 @@ namespace Ryujinx.HLE.HOS.Services.Am.AppletOE.ApplicationProxyService.Applicati return ResultCode.Success; } - [Command(40)] + [CommandHipc(40)] // NotifyRunning() -> b8 public ResultCode NotifyRunning(ServiceCtx context) { @@ -241,7 +241,7 @@ namespace Ryujinx.HLE.HOS.Services.Am.AppletOE.ApplicationProxyService.Applicati return ResultCode.Success; } - [Command(50)] // 2.0.0+ + [CommandHipc(50)] // 2.0.0+ // GetPseudoDeviceId() -> nn::util::Uuid public ResultCode GetPseudoDeviceId(ServiceCtx context) { @@ -253,7 +253,7 @@ namespace Ryujinx.HLE.HOS.Services.Am.AppletOE.ApplicationProxyService.Applicati return ResultCode.Success; } - [Command(66)] // 3.0.0+ + [CommandHipc(66)] // 3.0.0+ // InitializeGamePlayRecording(u64, handle) public ResultCode InitializeGamePlayRecording(ServiceCtx context) { @@ -262,7 +262,7 @@ namespace Ryujinx.HLE.HOS.Services.Am.AppletOE.ApplicationProxyService.Applicati return ResultCode.Success; } - [Command(67)] // 3.0.0+ + [CommandHipc(67)] // 3.0.0+ // SetGamePlayRecordingState(u32) public ResultCode SetGamePlayRecordingState(ServiceCtx context) { @@ -273,7 +273,7 @@ namespace Ryujinx.HLE.HOS.Services.Am.AppletOE.ApplicationProxyService.Applicati return ResultCode.Success; } - [Command(90)] // 4.0.0+ + [CommandHipc(90)] // 4.0.0+ // EnableApplicationCrashReport(u8) public ResultCode EnableApplicationCrashReport(ServiceCtx context) { @@ -284,7 +284,7 @@ namespace Ryujinx.HLE.HOS.Services.Am.AppletOE.ApplicationProxyService.Applicati return ResultCode.Success; } - [Command(100)] // 5.0.0+ + [CommandHipc(100)] // 5.0.0+ // InitializeApplicationCopyrightFrameBuffer(s32 width, s32 height, handle transfer_memory, u64 transfer_memory_size) public ResultCode InitializeApplicationCopyrightFrameBuffer(ServiceCtx context) { @@ -330,7 +330,7 @@ namespace Ryujinx.HLE.HOS.Services.Am.AppletOE.ApplicationProxyService.Applicati return resultCode; } - [Command(101)] // 5.0.0+ + [CommandHipc(101)] // 5.0.0+ // SetApplicationCopyrightImage(buffer frame_buffer, s32 x, s32 y, s32 width, s32 height, s32 window_origin_mode) public ResultCode SetApplicationCopyrightImage(ServiceCtx context) { @@ -377,7 +377,7 @@ namespace Ryujinx.HLE.HOS.Services.Am.AppletOE.ApplicationProxyService.Applicati return ResultCode.Success; } - [Command(102)] // 5.0.0+ + [CommandHipc(102)] // 5.0.0+ // SetApplicationCopyrightVisibility(bool visible) public ResultCode SetApplicationCopyrightVisibility(ServiceCtx context) { @@ -390,7 +390,7 @@ namespace Ryujinx.HLE.HOS.Services.Am.AppletOE.ApplicationProxyService.Applicati return ResultCode.Success; } - [Command(110)] // 5.0.0+ + [CommandHipc(110)] // 5.0.0+ // QueryApplicationPlayStatistics(buffer title_id_list) -> (buffer entries, s32 entries_count) public ResultCode QueryApplicationPlayStatistics(ServiceCtx context) { @@ -398,7 +398,7 @@ namespace Ryujinx.HLE.HOS.Services.Am.AppletOE.ApplicationProxyService.Applicati return (ResultCode)QueryPlayStatisticsManager.GetPlayStatistics(context); } - [Command(111)] // 6.0.0+ + [CommandHipc(111)] // 6.0.0+ // QueryApplicationPlayStatisticsByUid(nn::account::Uid, buffer title_id_list) -> (buffer entries, s32 entries_count) public ResultCode QueryApplicationPlayStatisticsByUid(ServiceCtx context) { @@ -406,7 +406,7 @@ namespace Ryujinx.HLE.HOS.Services.Am.AppletOE.ApplicationProxyService.Applicati return (ResultCode)QueryPlayStatisticsManager.GetPlayStatistics(context, true); } - [Command(120)] // 5.0.0+ + [CommandHipc(120)] // 5.0.0+ // ExecuteProgram(ProgramSpecifyKind kind, u64 value) public ResultCode ExecuteProgram(ServiceCtx context) { @@ -424,7 +424,7 @@ namespace Ryujinx.HLE.HOS.Services.Am.AppletOE.ApplicationProxyService.Applicati return ResultCode.Success; } - [Command(121)] // 5.0.0+ + [CommandHipc(121)] // 5.0.0+ // ClearUserChannel() public ResultCode ClearUserChannel(ServiceCtx context) { @@ -433,7 +433,7 @@ namespace Ryujinx.HLE.HOS.Services.Am.AppletOE.ApplicationProxyService.Applicati return ResultCode.Success; } - [Command(122)] // 5.0.0+ + [CommandHipc(122)] // 5.0.0+ // UnpopToUserChannel(object input_storage) public ResultCode UnpopToUserChannel(ServiceCtx context) { @@ -444,7 +444,7 @@ namespace Ryujinx.HLE.HOS.Services.Am.AppletOE.ApplicationProxyService.Applicati return ResultCode.Success; } - [Command(123)] // 5.0.0+ + [CommandHipc(123)] // 5.0.0+ // GetPreviousProgramIndex() -> s32 program_index public ResultCode GetPreviousProgramIndex(ServiceCtx context) { @@ -457,7 +457,7 @@ namespace Ryujinx.HLE.HOS.Services.Am.AppletOE.ApplicationProxyService.Applicati return ResultCode.Success; } - [Command(130)] // 8.0.0+ + [CommandHipc(130)] // 8.0.0+ // GetGpuErrorDetectedSystemEvent() -> handle public ResultCode GetGpuErrorDetectedSystemEvent(ServiceCtx context) { @@ -478,7 +478,7 @@ namespace Ryujinx.HLE.HOS.Services.Am.AppletOE.ApplicationProxyService.Applicati return ResultCode.Success; } - [Command(140)] // 9.0.0+ + [CommandHipc(140)] // 9.0.0+ // GetFriendInvitationStorageChannelEvent() -> handle public ResultCode GetFriendInvitationStorageChannelEvent(ServiceCtx context) { @@ -495,7 +495,7 @@ namespace Ryujinx.HLE.HOS.Services.Am.AppletOE.ApplicationProxyService.Applicati return ResultCode.Success; } - [Command(141)] // 9.0.0+ + [CommandHipc(141)] // 9.0.0+ // TryPopFromFriendInvitationStorageChannel() -> object public ResultCode TryPopFromFriendInvitationStorageChannel(ServiceCtx context) { @@ -509,7 +509,7 @@ namespace Ryujinx.HLE.HOS.Services.Am.AppletOE.ApplicationProxyService.Applicati return ResultCode.NotAvailable; } - [Command(150)] // 9.0.0+ + [CommandHipc(150)] // 9.0.0+ // GetNotificationStorageChannelEvent() -> handle public ResultCode GetNotificationStorageChannelEvent(ServiceCtx context) { @@ -526,7 +526,7 @@ namespace Ryujinx.HLE.HOS.Services.Am.AppletOE.ApplicationProxyService.Applicati return ResultCode.Success; } - [Command(160)] // 9.0.0+ + [CommandHipc(160)] // 9.0.0+ // GetHealthWarningDisappearedSystemEvent() -> handle public ResultCode GetHealthWarningDisappearedSystemEvent(ServiceCtx context) { -- cgit v1.2.3