mirror of
https://github.com/ryujinx-mirror/ryujinx.git
synced 2025-11-07 09:48:58 -06:00
Add SHRN instruction, and fix ADDV
This commit is contained in:
@@ -62,10 +62,12 @@ namespace Ryujinx.OsHle.Ipc
|
||||
{ ( "time:u", 1), Service.TimeGetStandardNetworkSystemClock },
|
||||
{ ( "time:u", 2), Service.TimeGetStandardSteadyClock },
|
||||
{ ( "time:u", 3), Service.TimeGetTimeZoneService },
|
||||
{ ( "time:u", 4), Service.TimeGetStandardLocalSystemClock },
|
||||
{ ( "time:s", 0), Service.TimeGetStandardUserSystemClock },
|
||||
{ ( "time:s", 1), Service.TimeGetStandardNetworkSystemClock },
|
||||
{ ( "time:s", 2), Service.TimeGetStandardSteadyClock },
|
||||
{ ( "time:s", 3), Service.TimeGetTimeZoneService },
|
||||
{ ( "time:s", 4), Service.TimeGetStandardLocalSystemClock },
|
||||
{ ( "vi:m", 2), Service.ViGetDisplayService },
|
||||
};
|
||||
|
||||
|
||||
@@ -12,16 +12,28 @@ namespace Ryujinx.OsHle.Objects.Time
|
||||
|
||||
private static DateTime Epoch = new DateTime(1970, 1, 1, 0, 0, 0, DateTimeKind.Utc);
|
||||
|
||||
public ISystemClock()
|
||||
private SystemClockType ClockType;
|
||||
|
||||
public ISystemClock(SystemClockType ClockType)
|
||||
{
|
||||
m_Commands = new Dictionary<int, ServiceProcessRequest>()
|
||||
{
|
||||
{ 0, GetCurrentTime }
|
||||
};
|
||||
|
||||
this.ClockType = ClockType;
|
||||
}
|
||||
|
||||
public long GetCurrentTime(ServiceCtx Context)
|
||||
{
|
||||
DateTime CurrentTime = DateTime.Now;
|
||||
|
||||
if (ClockType == SystemClockType.Standard ||
|
||||
ClockType == SystemClockType.Network)
|
||||
{
|
||||
CurrentTime = CurrentTime.ToUniversalTime();
|
||||
}
|
||||
|
||||
Context.ResponseData.Write((long)(DateTime.Now - Epoch).TotalSeconds);
|
||||
|
||||
return 0;
|
||||
|
||||
9
Ryujinx/OsHle/Objects/Time/SystemClockType.cs
Normal file
9
Ryujinx/OsHle/Objects/Time/SystemClockType.cs
Normal file
@@ -0,0 +1,9 @@
|
||||
namespace Ryujinx.OsHle.Objects.Time
|
||||
{
|
||||
enum SystemClockType
|
||||
{
|
||||
Standard,
|
||||
Network,
|
||||
Local
|
||||
}
|
||||
}
|
||||
@@ -30,7 +30,7 @@ namespace Ryujinx.OsHle
|
||||
|
||||
public KProcessScheduler Scheduler { get; private set; }
|
||||
|
||||
private SvcHandler SvcHandler;
|
||||
private SvcHandler SvcHandler;
|
||||
|
||||
private ConcurrentDictionary<int, AThread> TlsSlots;
|
||||
|
||||
|
||||
@@ -8,14 +8,14 @@ namespace Ryujinx.OsHle.Services
|
||||
{
|
||||
public static long TimeGetStandardUserSystemClock(ServiceCtx Context)
|
||||
{
|
||||
MakeObject(Context, new ISystemClock());
|
||||
MakeObject(Context, new ISystemClock(SystemClockType.Standard));
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
public static long TimeGetStandardNetworkSystemClock(ServiceCtx Context)
|
||||
{
|
||||
MakeObject(Context, new ISystemClock());
|
||||
MakeObject(Context, new ISystemClock(SystemClockType.Network));
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -33,5 +33,13 @@ namespace Ryujinx.OsHle.Services
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
public static long TimeGetStandardLocalSystemClock(ServiceCtx Context)
|
||||
{
|
||||
MakeObject(Context, new ISystemClock(SystemClockType.Local));
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user