Merge c0e47c7bc9
into e581abb2f5
This commit is contained in:
commit
32d5bb5b30
3 changed files with 65 additions and 49 deletions
|
@ -1,47 +1,47 @@
|
|||
using Ryujinx.Graphics.Gal;
|
||||
using System.Threading;
|
||||
|
||||
namespace Ryujinx.HLE.Gpu
|
||||
{
|
||||
class NvGpu
|
||||
{
|
||||
public IGalRenderer Renderer { get; private set; }
|
||||
|
||||
public NvGpuFifo Fifo { get; private set; }
|
||||
|
||||
public NvGpuEngine2d Engine2d { get; private set; }
|
||||
public NvGpuEngine3d Engine3d { get; private set; }
|
||||
public NvGpuEngineDma EngineDma { get; private set; }
|
||||
|
||||
private Thread FifoProcessing;
|
||||
|
||||
private bool KeepRunning;
|
||||
|
||||
public NvGpu(IGalRenderer Renderer)
|
||||
{
|
||||
this.Renderer = Renderer;
|
||||
|
||||
Fifo = new NvGpuFifo(this);
|
||||
|
||||
Engine2d = new NvGpuEngine2d(this);
|
||||
Engine3d = new NvGpuEngine3d(this);
|
||||
EngineDma = new NvGpuEngineDma(this);
|
||||
|
||||
KeepRunning = true;
|
||||
|
||||
FifoProcessing = new Thread(ProcessFifo);
|
||||
|
||||
FifoProcessing.Start();
|
||||
}
|
||||
|
||||
private void ProcessFifo()
|
||||
{
|
||||
while (KeepRunning)
|
||||
{
|
||||
Fifo.DispatchCalls();
|
||||
|
||||
Thread.Yield();
|
||||
}
|
||||
}
|
||||
}
|
||||
using Ryujinx.Graphics.Gal;
|
||||
using System.Threading;
|
||||
|
||||
namespace Ryujinx.HLE.Gpu
|
||||
{
|
||||
class NvGpu
|
||||
{
|
||||
public IGalRenderer Renderer { get; private set; }
|
||||
|
||||
public NvGpuFifo Fifo { get; private set; }
|
||||
|
||||
public NvGpuEngine2d Engine2d { get; private set; }
|
||||
public NvGpuEngine3d Engine3d { get; private set; }
|
||||
public NvGpuEngineDma EngineDma { get; private set; }
|
||||
|
||||
private Thread FifoProcessing;
|
||||
|
||||
private bool KeepRunning;
|
||||
|
||||
public NvGpu(IGalRenderer Renderer)
|
||||
{
|
||||
this.Renderer = Renderer;
|
||||
|
||||
Fifo = new NvGpuFifo(this);
|
||||
|
||||
Engine2d = new NvGpuEngine2d(this);
|
||||
Engine3d = new NvGpuEngine3d(this);
|
||||
EngineDma = new NvGpuEngineDma(this);
|
||||
|
||||
KeepRunning = true;
|
||||
|
||||
FifoProcessing = new Thread(ProcessFifo);
|
||||
|
||||
FifoProcessing.Start();
|
||||
}
|
||||
|
||||
private void ProcessFifo()
|
||||
{
|
||||
while (KeepRunning)
|
||||
{
|
||||
Fifo.DispatchCalls();
|
||||
|
||||
Thread.Yield();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -177,4 +177,4 @@ namespace Ryujinx.HLE.Gpu
|
|||
Gpu.EngineDma.CallMethod(Vmm, PBEntry);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -18,7 +18,8 @@ namespace Ryujinx.HLE.OsHle.Services.Time
|
|||
{
|
||||
m_Commands = new Dictionary<int, ServiceProcessRequest>()
|
||||
{
|
||||
{ 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;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue