From 63d87783de51d1f229e5e69439a43db35dc862a1 Mon Sep 17 00:00:00 2001 From: greggameplayer <33609333+greggameplayer@users.noreply.github.com> Date: Sat, 16 Jun 2018 03:36:12 +0200 Subject: [PATCH] Implement GetSystemClockContext --- .../OsHle/Services/Time/ISystemClock.cs | 20 +++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/Ryujinx.HLE/OsHle/Services/Time/ISystemClock.cs b/Ryujinx.HLE/OsHle/Services/Time/ISystemClock.cs index 787f86c22..07b726768 100644 --- a/Ryujinx.HLE/OsHle/Services/Time/ISystemClock.cs +++ b/Ryujinx.HLE/OsHle/Services/Time/ISystemClock.cs @@ -18,7 +18,8 @@ namespace Ryujinx.HLE.OsHle.Services.Time { m_Commands = new Dictionary() { - { 0, GetCurrentTime } + { 0, GetCurrentTime }, + { 2, GetSystemClockContext } }; this.ClockType = ClockType; @@ -38,5 +39,20 @@ namespace Ryujinx.HLE.OsHle.Services.Time return 0; } + + public long GetSystemClockContext(ServiceCtx Context) + { + //Raw data dumped from real switch via pegaswitch + byte[] SystemClockContext = { 0x07, 0x00, 0x19, 0x00, 0x0d, 0xd2, 0xb2, 0x80}; + + Array.Resize(ref SystemClockContext, 0x20); + + for (int Index = 0; Index < 0x20; Index++) + { + Context.ResponseData.Write(SystemClockContext[Index]); + } + + return 0; + } } -} \ No newline at end of file +}