aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStarlet <gpyron@mail.com>2018-05-10 23:19:51 -0400
committergdkchan <gab.dark.100@gmail.com>2018-05-11 00:19:51 -0300
commit8e306b3ac14f93ef4e77210c2a23a219760bb55c (patch)
tree3367d478bbe060ed9778abe9e70e285419977ee1
parent0979426e63516d9eaff8f7bf99f5ff814d8747f9 (diff)
Fix NV stubs (#124)
* Fix NV stubs * Compliant with feedback * Oops, Compliant with feedback #2
-rw-r--r--Ryujinx.Core/OsHle/Services/Nv/NvGpuGpu/NvGpuGpuGetActiveSlotMask.cs8
-rw-r--r--Ryujinx.Core/OsHle/Services/Nv/NvGpuGpu/NvGpuGpuGetTpcMasks.cs10
-rw-r--r--Ryujinx.Core/OsHle/Services/Nv/NvGpuGpu/NvGpuGpuIoctl.cs31
-rw-r--r--Ryujinx.Core/OsHle/Services/Nv/NvGpuGpu/NvGpuGpuZcullGetCtxSize.cs7
-rw-r--r--Ryujinx.Core/OsHle/Services/Nv/NvGpuGpu/NvGpuGpuZcullGetInfo.cs16
5 files changed, 69 insertions, 3 deletions
diff --git a/Ryujinx.Core/OsHle/Services/Nv/NvGpuGpu/NvGpuGpuGetActiveSlotMask.cs b/Ryujinx.Core/OsHle/Services/Nv/NvGpuGpu/NvGpuGpuGetActiveSlotMask.cs
new file mode 100644
index 00000000..3294f513
--- /dev/null
+++ b/Ryujinx.Core/OsHle/Services/Nv/NvGpuGpu/NvGpuGpuGetActiveSlotMask.cs
@@ -0,0 +1,8 @@
+namespace Ryujinx.Core.OsHle.Services.Nv.NvGpuGpu
+{
+ struct NvGpuGpuGetActiveSlotMask
+ {
+ public int Slot;
+ public int Mask;
+ }
+}
diff --git a/Ryujinx.Core/OsHle/Services/Nv/NvGpuGpu/NvGpuGpuGetTpcMasks.cs b/Ryujinx.Core/OsHle/Services/Nv/NvGpuGpu/NvGpuGpuGetTpcMasks.cs
new file mode 100644
index 00000000..68664912
--- /dev/null
+++ b/Ryujinx.Core/OsHle/Services/Nv/NvGpuGpu/NvGpuGpuGetTpcMasks.cs
@@ -0,0 +1,10 @@
+namespace Ryujinx.Core.OsHle.Services.Nv.NvGpuGpu
+{
+ struct NvGpuGpuGetTpcMasks
+ {
+ public int MaskBufferSize;
+ public int Reserved;
+ public long MaskBufferAddress;
+ public long Unk;
+ }
+}
diff --git a/Ryujinx.Core/OsHle/Services/Nv/NvGpuGpu/NvGpuGpuIoctl.cs b/Ryujinx.Core/OsHle/Services/Nv/NvGpuGpu/NvGpuGpuIoctl.cs
index 772b6786..9af9ad59 100644
--- a/Ryujinx.Core/OsHle/Services/Nv/NvGpuGpu/NvGpuGpuIoctl.cs
+++ b/Ryujinx.Core/OsHle/Services/Nv/NvGpuGpu/NvGpuGpuIoctl.cs
@@ -38,9 +38,14 @@ namespace Ryujinx.Core.OsHle.Services.Nv.NvGpuGpu
private static int ZcullGetCtxSize(ServiceCtx Context)
{
- long InputPosition = Context.Request.GetBufferType0x21Position();
long OutputPosition = Context.Request.GetBufferType0x22Position();
+ NvGpuGpuZcullGetCtxSize Args = new NvGpuGpuZcullGetCtxSize();
+
+ Args.Size = 1;
+
+ AMemoryHelper.Write(Context.Memory, OutputPosition, Args);
+
Context.Ns.Log.PrintStub(LogClass.ServiceNv, "Stubbed.");
return NvResult.Success;
@@ -48,9 +53,23 @@ namespace Ryujinx.Core.OsHle.Services.Nv.NvGpuGpu
private static int ZcullGetInfo(ServiceCtx Context)
{
- long InputPosition = Context.Request.GetBufferType0x21Position();
long OutputPosition = Context.Request.GetBufferType0x22Position();
+ NvGpuGpuZcullGetInfo Args = new NvGpuGpuZcullGetInfo();
+
+ Args.WidthAlignPixels = 0x20;
+ Args.HeightAlignPixels = 0x20;
+ Args.PixelSquaresByAliquots = 0x400;
+ Args.AliquotTotal = 0x800;
+ Args.RegionByteMultiplier = 0x20;
+ Args.RegionHeaderSize = 0x20;
+ Args.SubregionHeaderSize = 0xc0;
+ Args.SubregionWidthAlignPixels = 0x20;
+ Args.SubregionHeightAlignPixels = 0x40;
+ Args.SubregionCount = 0x10;
+
+ AMemoryHelper.Write(Context.Memory, OutputPosition, Args);
+
Context.Ns.Log.PrintStub(LogClass.ServiceNv, "Stubbed.");
return NvResult.Success;
@@ -128,9 +147,15 @@ namespace Ryujinx.Core.OsHle.Services.Nv.NvGpuGpu
private static int GetActiveSlotMask(ServiceCtx Context)
{
- long InputPosition = Context.Request.GetBufferType0x21Position();
long OutputPosition = Context.Request.GetBufferType0x22Position();
+ NvGpuGpuGetActiveSlotMask Args = new NvGpuGpuGetActiveSlotMask();
+
+ Args.Slot = 0x07;
+ Args.Mask = 0x01;
+
+ AMemoryHelper.Write(Context.Memory, OutputPosition, Args);
+
Context.Ns.Log.PrintStub(LogClass.ServiceNv, "Stubbed.");
return NvResult.Success;
diff --git a/Ryujinx.Core/OsHle/Services/Nv/NvGpuGpu/NvGpuGpuZcullGetCtxSize.cs b/Ryujinx.Core/OsHle/Services/Nv/NvGpuGpu/NvGpuGpuZcullGetCtxSize.cs
new file mode 100644
index 00000000..997cd42f
--- /dev/null
+++ b/Ryujinx.Core/OsHle/Services/Nv/NvGpuGpu/NvGpuGpuZcullGetCtxSize.cs
@@ -0,0 +1,7 @@
+namespace Ryujinx.Core.OsHle.Services.Nv.NvGpuGpu
+{
+ struct NvGpuGpuZcullGetCtxSize
+ {
+ public int Size;
+ }
+}
diff --git a/Ryujinx.Core/OsHle/Services/Nv/NvGpuGpu/NvGpuGpuZcullGetInfo.cs b/Ryujinx.Core/OsHle/Services/Nv/NvGpuGpu/NvGpuGpuZcullGetInfo.cs
new file mode 100644
index 00000000..c4c5036d
--- /dev/null
+++ b/Ryujinx.Core/OsHle/Services/Nv/NvGpuGpu/NvGpuGpuZcullGetInfo.cs
@@ -0,0 +1,16 @@
+namespace Ryujinx.Core.OsHle.Services.Nv.NvGpuGpu
+{
+ struct NvGpuGpuZcullGetInfo
+ {
+ public int WidthAlignPixels;
+ public int HeightAlignPixels;
+ public int PixelSquaresByAliquots;
+ public int AliquotTotal;
+ public int RegionByteMultiplier;
+ public int RegionHeaderSize;
+ public int SubregionHeaderSize;
+ public int SubregionWidthAlignPixels;
+ public int SubregionHeightAlignPixels;
+ public int SubregionCount;
+ }
+}