From 0e11c0c85cce587b588ec2af9cd5b1897e36b636 Mon Sep 17 00:00:00 2001 From: greggameplayer <33609333+greggameplayer@users.noreply.github.com> Date: Tue, 12 Jun 2018 18:45:39 +0200 Subject: [PATCH 1/8] add Commands in IApplicationCreator --- .../OsHle/Services/Am/IApplicationCreator.cs | 35 +++++++++++++++++-- 1 file changed, 33 insertions(+), 2 deletions(-) diff --git a/Ryujinx.HLE/OsHle/Services/Am/IApplicationCreator.cs b/Ryujinx.HLE/OsHle/Services/Am/IApplicationCreator.cs index 6ee5b5c2e..e0aec6b2c 100644 --- a/Ryujinx.HLE/OsHle/Services/Am/IApplicationCreator.cs +++ b/Ryujinx.HLE/OsHle/Services/Am/IApplicationCreator.cs @@ -13,8 +13,39 @@ namespace Ryujinx.HLE.OsHle.Services.Am { m_Commands = new Dictionary() { - //... + { 0, CreateApplication }, + { 1, PopLaunchRequestedApplication }, + { 10, CreateSystemApplication }, + { 100, PopFloatingApplicationForDevelopment } }; } + + public long CreateApplication(ServiceCtx Context) + { + MakeObject(Context, new IApplicationAccessor()); + + return 0; + } + + public long PopLaunchRequestedApplication(ServiceCtx Context) + { + MakeObject(Context, new IApplicationAccessor()); + + return 0; + } + + public long CreateSystemApplication(ServiceCtx Context) + { + MakeObject(Context, new IApplicationAccessor()); + + return 0; + } + + public long PopFloatingApplicationForDevelopment(ServiceCtx Context) + { + MakeObject(Context, new IApplicationAccessor()); + + return 0; + } } -} \ No newline at end of file +} From 4736e9f60e4fdebd9cd583a16e4e3c9cf189076c Mon Sep 17 00:00:00 2001 From: greggameplayer <33609333+greggameplayer@users.noreply.github.com> Date: Tue, 12 Jun 2018 18:46:31 +0200 Subject: [PATCH 2/8] Create IApplicationAccessor.cs --- .../OsHle/Services/Am/IApplicationAccessor.cs | 36 +++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 Ryujinx.HLE/OsHle/Services/Am/IApplicationAccessor.cs diff --git a/Ryujinx.HLE/OsHle/Services/Am/IApplicationAccessor.cs b/Ryujinx.HLE/OsHle/Services/Am/IApplicationAccessor.cs new file mode 100644 index 000000000..85c081d10 --- /dev/null +++ b/Ryujinx.HLE/OsHle/Services/Am/IApplicationAccessor.cs @@ -0,0 +1,36 @@ +using Ryujinx.Core.Logging; +using Ryujinx.Core.OsHle.Ipc; +using System.Collections.Generic; + +namespace Ryujinx.Core.OsHle.Services.Am +{ + class IApplicationAccessor : IpcService + { + private Dictionary m_Commands; + + public override IReadOnlyDictionary Commands => m_Commands; + + public IApplicationAccessor() + { + m_Commands = new Dictionary() + { + { 112, GetCurrentLibraryApplet }, + { 121, PushLaunchParameter } + }; + } + + public long GetCurrentLibraryApplet(ServiceCtx Context) + { + MakeObject(Context, new IAppletAccessor()); + + return 0; + } + + public long PushLaunchParameter(ServiceCtx Context) + { + Context.Ns.Log.PrintStub(LogClass.ServiceAm, "Stubbed."); + + return 0; + } + } +} From 0d066d98c96aa60c5869f6b13f6fd14f5ae98a69 Mon Sep 17 00:00:00 2001 From: greggameplayer <33609333+greggameplayer@users.noreply.github.com> Date: Tue, 12 Jun 2018 18:46:58 +0200 Subject: [PATCH 3/8] Create IAppletAccessor.cs --- .../OsHle/Services/Am/IAppletAccessor.cs | 68 +++++++++++++++++++ 1 file changed, 68 insertions(+) create mode 100644 Ryujinx.HLE/OsHle/Services/Am/IAppletAccessor.cs diff --git a/Ryujinx.HLE/OsHle/Services/Am/IAppletAccessor.cs b/Ryujinx.HLE/OsHle/Services/Am/IAppletAccessor.cs new file mode 100644 index 000000000..fdfa1bc98 --- /dev/null +++ b/Ryujinx.HLE/OsHle/Services/Am/IAppletAccessor.cs @@ -0,0 +1,68 @@ +using Ryujinx.Core.Logging; +using Ryujinx.Core.OsHle.Ipc; +using System.Collections.Generic; + +namespace Ryujinx.Core.OsHle.Services.Am +{ + class IAppletAccessor : IpcService + { + private Dictionary m_Commands; + + public override IReadOnlyDictionary Commands => m_Commands; + + public IAppletAccessor() + { + m_Commands = new Dictionary() + { + { 0, GetAppletStateChangedEvent }, + { 1, IsCompleted }, + { 10, Start }, + { 20, RequestExit }, + { 25, Terminate }, + { 30, GetResult } + }; + } + + public long GetAppletStateChangedEvent(ServiceCtx Context) + { + Context.Ns.Log.PrintStub(LogClass.ServiceAm, "Stubbed."); + + return 0; + } + + public long IsCompleted(ServiceCtx Context) + { + Context.Ns.Log.PrintStub(LogClass.ServiceAm, "Stubbed."); + + return 0; + } + + public long Start(ServiceCtx Context) + { + Context.Ns.Log.PrintStub(LogClass.ServiceAm, "Stubbed."); + + return 0; + } + + public long RequestExit(ServiceCtx Context) + { + Context.Ns.Log.PrintStub(LogClass.ServiceAm, "Stubbed."); + + return 0; + } + + public long Terminate(ServiceCtx Context) + { + Context.Ns.Log.PrintStub(LogClass.ServiceAm, "Stubbed."); + + return 0; + } + + public long GetResult(ServiceCtx Context) + { + Context.Ns.Log.PrintStub(LogClass.ServiceAm, "Stubbed."); + + return 0; + } + } +} From fe410219c62dce011f147a64b2826728212c7239 Mon Sep 17 00:00:00 2001 From: greggameplayer <33609333+greggameplayer@users.noreply.github.com> Date: Tue, 12 Jun 2018 18:47:55 +0200 Subject: [PATCH 4/8] add params of InitializeGamePlayRecording --- Ryujinx.HLE/OsHle/Services/Am/IApplicationFunctions.cs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Ryujinx.HLE/OsHle/Services/Am/IApplicationFunctions.cs b/Ryujinx.HLE/OsHle/Services/Am/IApplicationFunctions.cs index e25b524ab..ba700a8ae 100644 --- a/Ryujinx.HLE/OsHle/Services/Am/IApplicationFunctions.cs +++ b/Ryujinx.HLE/OsHle/Services/Am/IApplicationFunctions.cs @@ -100,6 +100,9 @@ namespace Ryujinx.HLE.OsHle.Services.Am public long InitializeGamePlayRecording(ServiceCtx Context) { + //TODO: add a TransferMemory Handle + long Size = Context.RequestData.ReadInt64(); + Context.Ns.Log.PrintStub(LogClass.ServiceAm, "Stubbed."); return 0; From 735ebe577d8b760c8544f4534467aa90c56a229a Mon Sep 17 00:00:00 2001 From: greggameplayer <33609333+greggameplayer@users.noreply.github.com> Date: Tue, 12 Jun 2018 18:49:47 +0200 Subject: [PATCH 5/8] correct mistakes --- Ryujinx.HLE/OsHle/Services/Am/IAppletAccessor.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Ryujinx.HLE/OsHle/Services/Am/IAppletAccessor.cs b/Ryujinx.HLE/OsHle/Services/Am/IAppletAccessor.cs index fdfa1bc98..3d8ac9141 100644 --- a/Ryujinx.HLE/OsHle/Services/Am/IAppletAccessor.cs +++ b/Ryujinx.HLE/OsHle/Services/Am/IAppletAccessor.cs @@ -1,8 +1,8 @@ -using Ryujinx.Core.Logging; -using Ryujinx.Core.OsHle.Ipc; +using Ryujinx.HLE.Logging; +using Ryujinx.HLE.OsHle.Ipc; using System.Collections.Generic; -namespace Ryujinx.Core.OsHle.Services.Am +namespace Ryujinx.HLE.OsHle.Services.Am { class IAppletAccessor : IpcService { From aa1920f9bba42f99e2eda7da00f1f09f1c9fed01 Mon Sep 17 00:00:00 2001 From: greggameplayer <33609333+greggameplayer@users.noreply.github.com> Date: Tue, 12 Jun 2018 18:50:14 +0200 Subject: [PATCH 6/8] correct mistakes #2 --- Ryujinx.HLE/OsHle/Services/Am/IApplicationAccessor.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Ryujinx.HLE/OsHle/Services/Am/IApplicationAccessor.cs b/Ryujinx.HLE/OsHle/Services/Am/IApplicationAccessor.cs index 85c081d10..2c93ef703 100644 --- a/Ryujinx.HLE/OsHle/Services/Am/IApplicationAccessor.cs +++ b/Ryujinx.HLE/OsHle/Services/Am/IApplicationAccessor.cs @@ -1,5 +1,5 @@ -using Ryujinx.Core.Logging; -using Ryujinx.Core.OsHle.Ipc; +using Ryujinx.HLE.Logging; +using Ryujinx.HLE.OsHle.Ipc; using System.Collections.Generic; namespace Ryujinx.Core.OsHle.Services.Am From 5346a0e077fb2a70d0c5f999848e1438bff7848c Mon Sep 17 00:00:00 2001 From: greggameplayer <33609333+greggameplayer@users.noreply.github.com> Date: Tue, 12 Jun 2018 18:50:38 +0200 Subject: [PATCH 7/8] correct mistakes --- Ryujinx.HLE/OsHle/Services/Am/IApplicationAccessor.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Ryujinx.HLE/OsHle/Services/Am/IApplicationAccessor.cs b/Ryujinx.HLE/OsHle/Services/Am/IApplicationAccessor.cs index 2c93ef703..450c5836f 100644 --- a/Ryujinx.HLE/OsHle/Services/Am/IApplicationAccessor.cs +++ b/Ryujinx.HLE/OsHle/Services/Am/IApplicationAccessor.cs @@ -2,7 +2,7 @@ using Ryujinx.HLE.Logging; using Ryujinx.HLE.OsHle.Ipc; using System.Collections.Generic; -namespace Ryujinx.Core.OsHle.Services.Am +namespace Ryujinx.HLE.OsHle.Services.Am { class IApplicationAccessor : IpcService { From 205b5976893756ce1e9647a7ac0e8a3ba7615f58 Mon Sep 17 00:00:00 2001 From: greggameplayer <33609333+greggameplayer@users.noreply.github.com> Date: Tue, 12 Jun 2018 18:50:14 +0200 Subject: [PATCH 8/8] correct mistakes #2 correct mistakes correct mistakes --- Ryujinx.HLE/OsHle/Services/Am/IApplicationAccessor.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Ryujinx.HLE/OsHle/Services/Am/IApplicationAccessor.cs b/Ryujinx.HLE/OsHle/Services/Am/IApplicationAccessor.cs index 85c081d10..450c5836f 100644 --- a/Ryujinx.HLE/OsHle/Services/Am/IApplicationAccessor.cs +++ b/Ryujinx.HLE/OsHle/Services/Am/IApplicationAccessor.cs @@ -1,8 +1,8 @@ -using Ryujinx.Core.Logging; -using Ryujinx.Core.OsHle.Ipc; +using Ryujinx.HLE.Logging; +using Ryujinx.HLE.OsHle.Ipc; using System.Collections.Generic; -namespace Ryujinx.Core.OsHle.Services.Am +namespace Ryujinx.HLE.OsHle.Services.Am { class IApplicationAccessor : IpcService {