From a7f08b8ded8f443c9f950a89834346fbf3bc930e Mon Sep 17 00:00:00 2001 From: Starlet Date: Sat, 2 Jun 2018 18:04:21 -0400 Subject: [PATCH] fixes? --- Ryujinx.Core/OsHle/Ipc/IpcMessage.cs | 10 +++++----- Ryujinx.Core/OsHle/Services/Aud/IAudioDevice.cs | 10 +++++----- .../OsHle/Services/FspSrv/IFileSystemProxy.cs | 4 ++-- Ryujinx.Core/OsHle/Services/Nv/INvDrvServices.cs | 2 +- .../OsHle/Services/Nv/NvGpuAS/NvGpuASIoctl.cs | 16 ++++++++-------- .../OsHle/Services/Nv/NvGpuGpu/NvGpuGpuIoctl.cs | 6 +++--- .../Nv/NvHostChannel/NvHostChannelIoctl.cs | 16 ++++++++-------- .../Services/Nv/NvHostCtrl/NvHostCtrlIoctl.cs | 12 ++++++------ .../OsHle/Services/Nv/NvMap/NvMapIoctl.cs | 12 ++++++------ 9 files changed, 44 insertions(+), 44 deletions(-) diff --git a/Ryujinx.Core/OsHle/Ipc/IpcMessage.cs b/Ryujinx.Core/OsHle/Ipc/IpcMessage.cs index afcbb3a439..200e746e84 100644 --- a/Ryujinx.Core/OsHle/Ipc/IpcMessage.cs +++ b/Ryujinx.Core/OsHle/Ipc/IpcMessage.cs @@ -174,19 +174,19 @@ namespace Ryujinx.Core.OsHle.Ipc return 0; } - public long GetBufferType0x21Position() + public (long Position, long Size) GetBufferType0x21() { - if (PtrBuff.Count > 0 && PtrBuff[0].Position != 0) + if (PtrBuff.Count > 0 && PtrBuff[0].Position != 0 && PtrBuff[0].Size != 0) { - return PtrBuff[0].Position; + return (PtrBuff[0].Position, PtrBuff[0].Size); } if (SendBuff.Count > 0) { - return SendBuff[0].Position; + return (SendBuff[0].Position, SendBuff[0].Size); } - return 0; + return (0, 0); } public long GetBufferType0x22Position() diff --git a/Ryujinx.Core/OsHle/Services/Aud/IAudioDevice.cs b/Ryujinx.Core/OsHle/Services/Aud/IAudioDevice.cs index 8ec517e06f..d2083251c0 100644 --- a/Ryujinx.Core/OsHle/Services/Aud/IAudioDevice.cs +++ b/Ryujinx.Core/OsHle/Services/Aud/IAudioDevice.cs @@ -131,8 +131,8 @@ namespace Ryujinx.Core.OsHle.Services.Aud Context.ResponseData.Write(DeviceNames.Length); - long Position = Context.Request.RecvListBuff[0].Position; - long Size = Context.Request.RecvListBuff[0].Size; + long Position = Context.Request.GetBufferType0x21().Position; + long Size = Context.Request.GetBufferType0x21().Size; long BasePosition = Position; @@ -160,7 +160,7 @@ namespace Ryujinx.Core.OsHle.Services.Aud float Volume = Context.RequestData.ReadSingle(); long Position = Context.Request.SendBuff[0].Position; - long Size = Context.Request.SendBuff[0].Size; + long Size = Context.Request.SendBuff[0].Size; byte[] DeviceNameBuffer = AMemoryHelper.ReadBytes(Context.Memory, Position, Size); @@ -173,7 +173,7 @@ namespace Ryujinx.Core.OsHle.Services.Aud public long GetAudioDeviceOutputVolumeAuto(ServiceCtx Context) { - Context.ResponseData.Write(100); + Context.ResponseData.Write(1f); Context.Ns.Log.PrintStub(LogClass.ServiceAudio, "Stubbed."); @@ -185,7 +185,7 @@ namespace Ryujinx.Core.OsHle.Services.Aud string Name = Context.Ns.Os.SystemState.ActiveAudioOutput; long Position = Context.Request.RecvListBuff[0].Position; - long Size = Context.Request.RecvListBuff[0].Size; + long Size = Context.Request.RecvListBuff[0].Size; byte[] DeviceNameBuffer = Encoding.UTF8.GetBytes(Name + '\0'); diff --git a/Ryujinx.Core/OsHle/Services/FspSrv/IFileSystemProxy.cs b/Ryujinx.Core/OsHle/Services/FspSrv/IFileSystemProxy.cs index eb16ff43e0..4fbf018a47 100644 --- a/Ryujinx.Core/OsHle/Services/FspSrv/IFileSystemProxy.cs +++ b/Ryujinx.Core/OsHle/Services/FspSrv/IFileSystemProxy.cs @@ -16,7 +16,7 @@ namespace Ryujinx.Core.OsHle.Services.FspSrv { { 1, SetCurrentProcess }, { 18, OpenSdCardFileSystem }, - { 22, CreateSaveData }, + { 22, CreateSaveDataFileSystem }, { 51, OpenSaveDataFileSystem }, { 200, OpenDataStorageByCurrentProcess }, { 203, OpenPatchDataStorageByCurrentProcess }, @@ -36,7 +36,7 @@ namespace Ryujinx.Core.OsHle.Services.FspSrv return 0; } - public long CreateSaveData(ServiceCtx Context) + public long CreateSaveDataFileSystem(ServiceCtx Context) { Context.Ns.Log.PrintStub(LogClass.ServiceFs, "Stubbed."); diff --git a/Ryujinx.Core/OsHle/Services/Nv/INvDrvServices.cs b/Ryujinx.Core/OsHle/Services/Nv/INvDrvServices.cs index aead6e04c6..ff7475dd1d 100644 --- a/Ryujinx.Core/OsHle/Services/Nv/INvDrvServices.cs +++ b/Ryujinx.Core/OsHle/Services/Nv/INvDrvServices.cs @@ -174,7 +174,7 @@ namespace Ryujinx.Core.OsHle.Services.Nv private static int ProcessIoctl(ServiceCtx Context, int Cmd, IoctlProcessor Processor) { - if (CmdIn(Cmd) && Context.Request.GetBufferType0x21Position() == 0) + if (CmdIn(Cmd) && Context.Request.GetBufferType0x21() == 0) { Context.Ns.Log.PrintError(LogClass.ServiceNv, "Input buffer is null!"); diff --git a/Ryujinx.Core/OsHle/Services/Nv/NvGpuAS/NvGpuASIoctl.cs b/Ryujinx.Core/OsHle/Services/Nv/NvGpuAS/NvGpuASIoctl.cs index 6be45d5c17..ff9a21e61e 100644 --- a/Ryujinx.Core/OsHle/Services/Nv/NvGpuAS/NvGpuASIoctl.cs +++ b/Ryujinx.Core/OsHle/Services/Nv/NvGpuAS/NvGpuASIoctl.cs @@ -37,7 +37,7 @@ namespace Ryujinx.Core.OsHle.Services.Nv.NvGpuAS private static int BindChannel(ServiceCtx Context) { - long InputPosition = Context.Request.GetBufferType0x21Position(); + long InputPosition = Context.Request.GetBufferType0x21(); long OutputPosition = Context.Request.GetBufferType0x22Position(); Context.Ns.Log.PrintStub(LogClass.ServiceNv, "Stubbed."); @@ -47,7 +47,7 @@ namespace Ryujinx.Core.OsHle.Services.Nv.NvGpuAS private static int AllocSpace(ServiceCtx Context) { - long InputPosition = Context.Request.GetBufferType0x21Position(); + long InputPosition = Context.Request.GetBufferType0x21(); long OutputPosition = Context.Request.GetBufferType0x22Position(); NvGpuASAllocSpace Args = AMemoryHelper.Read(Context.Memory, InputPosition); @@ -84,7 +84,7 @@ namespace Ryujinx.Core.OsHle.Services.Nv.NvGpuAS private static int FreeSpace(ServiceCtx Context) { - long InputPosition = Context.Request.GetBufferType0x21Position(); + long InputPosition = Context.Request.GetBufferType0x21(); long OutputPosition = Context.Request.GetBufferType0x22Position(); NvGpuASAllocSpace Args = AMemoryHelper.Read(Context.Memory, InputPosition); @@ -101,7 +101,7 @@ namespace Ryujinx.Core.OsHle.Services.Nv.NvGpuAS private static int UnmapBuffer(ServiceCtx Context) { - long InputPosition = Context.Request.GetBufferType0x21Position(); + long InputPosition = Context.Request.GetBufferType0x21(); long OutputPosition = Context.Request.GetBufferType0x22Position(); NvGpuASUnmapBuffer Args = AMemoryHelper.Read(Context.Memory, InputPosition); @@ -118,7 +118,7 @@ namespace Ryujinx.Core.OsHle.Services.Nv.NvGpuAS private static int MapBufferEx(ServiceCtx Context) { - long InputPosition = Context.Request.GetBufferType0x21Position(); + long InputPosition = Context.Request.GetBufferType0x21(); long OutputPosition = Context.Request.GetBufferType0x22Position(); NvGpuASMapBufferEx Args = AMemoryHelper.Read(Context.Memory, InputPosition); @@ -190,7 +190,7 @@ namespace Ryujinx.Core.OsHle.Services.Nv.NvGpuAS private static int GetVaRegions(ServiceCtx Context) { - long InputPosition = Context.Request.GetBufferType0x21Position(); + long InputPosition = Context.Request.GetBufferType0x21(); long OutputPosition = Context.Request.GetBufferType0x22Position(); Context.Ns.Log.PrintStub(LogClass.ServiceNv, "Stubbed."); @@ -200,7 +200,7 @@ namespace Ryujinx.Core.OsHle.Services.Nv.NvGpuAS private static int InitializeEx(ServiceCtx Context) { - long InputPosition = Context.Request.GetBufferType0x21Position(); + long InputPosition = Context.Request.GetBufferType0x21(); long OutputPosition = Context.Request.GetBufferType0x22Position(); Context.Ns.Log.PrintStub(LogClass.ServiceNv, "Stubbed."); @@ -210,7 +210,7 @@ namespace Ryujinx.Core.OsHle.Services.Nv.NvGpuAS private static int Remap(ServiceCtx Context) { - long InputPosition = Context.Request.GetBufferType0x21Position(); + long InputPosition = Context.Request.GetBufferType0x21(); NvGpuASRemap Args = AMemoryHelper.Read(Context.Memory, InputPosition); diff --git a/Ryujinx.Core/OsHle/Services/Nv/NvGpuGpu/NvGpuGpuIoctl.cs b/Ryujinx.Core/OsHle/Services/Nv/NvGpuGpu/NvGpuGpuIoctl.cs index b34d346b51..4e56c7cc3f 100644 --- a/Ryujinx.Core/OsHle/Services/Nv/NvGpuGpu/NvGpuGpuIoctl.cs +++ b/Ryujinx.Core/OsHle/Services/Nv/NvGpuGpu/NvGpuGpuIoctl.cs @@ -77,7 +77,7 @@ namespace Ryujinx.Core.OsHle.Services.Nv.NvGpuGpu private static int ZbcSetTable(ServiceCtx Context) { - long InputPosition = Context.Request.GetBufferType0x21Position(); + long InputPosition = Context.Request.GetBufferType0x21(); long OutputPosition = Context.Request.GetBufferType0x22Position(); Context.Ns.Log.PrintStub(LogClass.ServiceNv, "Stubbed."); @@ -87,7 +87,7 @@ namespace Ryujinx.Core.OsHle.Services.Nv.NvGpuGpu private static int GetCharacteristics(ServiceCtx Context) { - long InputPosition = Context.Request.GetBufferType0x21Position(); + long InputPosition = Context.Request.GetBufferType0x21(); long OutputPosition = Context.Request.GetBufferType0x22Position(); NvGpuGpuGetCharacteristics Args = AMemoryHelper.Read(Context.Memory, InputPosition); @@ -137,7 +137,7 @@ namespace Ryujinx.Core.OsHle.Services.Nv.NvGpuGpu private static int GetTpcMasks(ServiceCtx Context) { - long InputPosition = Context.Request.GetBufferType0x21Position(); + long InputPosition = Context.Request.GetBufferType0x21(); long OutputPosition = Context.Request.GetBufferType0x22Position(); NvGpuGpuGetTpcMasks Args = AMemoryHelper.Read(Context.Memory, InputPosition); diff --git a/Ryujinx.Core/OsHle/Services/Nv/NvHostChannel/NvHostChannelIoctl.cs b/Ryujinx.Core/OsHle/Services/Nv/NvHostChannel/NvHostChannelIoctl.cs index 85b4753398..960146b2b9 100644 --- a/Ryujinx.Core/OsHle/Services/Nv/NvHostChannel/NvHostChannelIoctl.cs +++ b/Ryujinx.Core/OsHle/Services/Nv/NvHostChannel/NvHostChannelIoctl.cs @@ -27,7 +27,7 @@ namespace Ryujinx.Core.OsHle.Services.Nv.NvHostChannel private static int SetUserData(ServiceCtx Context) { - long InputPosition = Context.Request.GetBufferType0x21Position(); + long InputPosition = Context.Request.GetBufferType0x21(); long OutputPosition = Context.Request.GetBufferType0x22Position(); Context.Ns.Log.PrintStub(LogClass.ServiceNv, "Stubbed."); @@ -37,7 +37,7 @@ namespace Ryujinx.Core.OsHle.Services.Nv.NvHostChannel private static int SetNvMap(ServiceCtx Context) { - long InputPosition = Context.Request.GetBufferType0x21Position(); + long InputPosition = Context.Request.GetBufferType0x21(); long OutputPosition = Context.Request.GetBufferType0x22Position(); Context.Ns.Log.PrintStub(LogClass.ServiceNv, "Stubbed."); @@ -47,7 +47,7 @@ namespace Ryujinx.Core.OsHle.Services.Nv.NvHostChannel private static int SubmitGpfifo(ServiceCtx Context) { - long InputPosition = Context.Request.GetBufferType0x21Position(); + long InputPosition = Context.Request.GetBufferType0x21(); long OutputPosition = Context.Request.GetBufferType0x22Position(); NvHostChannelSubmitGpfifo Args = AMemoryHelper.Read(Context.Memory, InputPosition); @@ -79,7 +79,7 @@ namespace Ryujinx.Core.OsHle.Services.Nv.NvHostChannel private static int AllocObjCtx(ServiceCtx Context) { - long InputPosition = Context.Request.GetBufferType0x21Position(); + long InputPosition = Context.Request.GetBufferType0x21(); long OutputPosition = Context.Request.GetBufferType0x22Position(); Context.Ns.Log.PrintStub(LogClass.ServiceNv, "Stubbed."); @@ -89,7 +89,7 @@ namespace Ryujinx.Core.OsHle.Services.Nv.NvHostChannel private static int ZcullBind(ServiceCtx Context) { - long InputPosition = Context.Request.GetBufferType0x21Position(); + long InputPosition = Context.Request.GetBufferType0x21(); long OutputPosition = Context.Request.GetBufferType0x22Position(); Context.Ns.Log.PrintStub(LogClass.ServiceNv, "Stubbed."); @@ -99,7 +99,7 @@ namespace Ryujinx.Core.OsHle.Services.Nv.NvHostChannel private static int SetErrorNotifier(ServiceCtx Context) { - long InputPosition = Context.Request.GetBufferType0x21Position(); + long InputPosition = Context.Request.GetBufferType0x21(); long OutputPosition = Context.Request.GetBufferType0x22Position(); Context.Ns.Log.PrintStub(LogClass.ServiceNv, "Stubbed."); @@ -109,7 +109,7 @@ namespace Ryujinx.Core.OsHle.Services.Nv.NvHostChannel private static int SetPriority(ServiceCtx Context) { - long InputPosition = Context.Request.GetBufferType0x21Position(); + long InputPosition = Context.Request.GetBufferType0x21(); long OutputPosition = Context.Request.GetBufferType0x22Position(); Context.Ns.Log.PrintStub(LogClass.ServiceNv, "Stubbed."); @@ -119,7 +119,7 @@ namespace Ryujinx.Core.OsHle.Services.Nv.NvHostChannel private static int AllocGpfifoEx2(ServiceCtx Context) { - long InputPosition = Context.Request.GetBufferType0x21Position(); + long InputPosition = Context.Request.GetBufferType0x21(); long OutputPosition = Context.Request.GetBufferType0x22Position(); Context.Ns.Log.PrintStub(LogClass.ServiceNv, "Stubbed."); diff --git a/Ryujinx.Core/OsHle/Services/Nv/NvHostCtrl/NvHostCtrlIoctl.cs b/Ryujinx.Core/OsHle/Services/Nv/NvHostCtrl/NvHostCtrlIoctl.cs index 8c705d7f03..19fc88a60c 100644 --- a/Ryujinx.Core/OsHle/Services/Nv/NvHostCtrl/NvHostCtrlIoctl.cs +++ b/Ryujinx.Core/OsHle/Services/Nv/NvHostCtrl/NvHostCtrlIoctl.cs @@ -40,7 +40,7 @@ namespace Ryujinx.Core.OsHle.Services.Nv.NvHostCtrl private static int SyncptIncr(ServiceCtx Context) { - long InputPosition = Context.Request.GetBufferType0x21Position(); + long InputPosition = Context.Request.GetBufferType0x21().Position; int Id = Context.Memory.ReadInt32(InputPosition); @@ -71,7 +71,7 @@ namespace Ryujinx.Core.OsHle.Services.Nv.NvHostCtrl private static int GetConfig(ServiceCtx Context) { - long InputPosition = Context.Request.GetBufferType0x21Position(); + long InputPosition = Context.Request.GetBufferType0x21().Position; long OutputPosition = Context.Request.GetBufferType0x22Position(); string Nv = AMemoryHelper.ReadAsciiString(Context.Memory, InputPosition + 0, 0x41); @@ -96,7 +96,7 @@ namespace Ryujinx.Core.OsHle.Services.Nv.NvHostCtrl private static int EventRegister(ServiceCtx Context) { - long InputPosition = Context.Request.GetBufferType0x21Position(); + long InputPosition = Context.Request.GetBufferType0x21().Position; long OutputPosition = Context.Request.GetBufferType0x22Position(); int EventId = Context.Memory.ReadInt32(InputPosition); @@ -108,7 +108,7 @@ namespace Ryujinx.Core.OsHle.Services.Nv.NvHostCtrl private static int SyncptReadMinOrMax(ServiceCtx Context, bool Max) { - long InputPosition = Context.Request.GetBufferType0x21Position(); + long InputPosition = Context.Request.GetBufferType0x21().Position; long OutputPosition = Context.Request.GetBufferType0x22Position(); NvHostCtrlSyncptRead Args = AMemoryHelper.Read(Context.Memory, InputPosition); @@ -134,7 +134,7 @@ namespace Ryujinx.Core.OsHle.Services.Nv.NvHostCtrl private static int SyncptWait(ServiceCtx Context, bool Extended) { - long InputPosition = Context.Request.GetBufferType0x21Position(); + long InputPosition = Context.Request.GetBufferType0x21().Position; long OutputPosition = Context.Request.GetBufferType0x22Position(); NvHostCtrlSyncptWait Args = AMemoryHelper.Read(Context.Memory, InputPosition); @@ -202,7 +202,7 @@ namespace Ryujinx.Core.OsHle.Services.Nv.NvHostCtrl private static int EventWait(ServiceCtx Context, bool Async) { - long InputPosition = Context.Request.GetBufferType0x21Position(); + long InputPosition = Context.Request.GetBufferType0x21().Position; long OutputPosition = Context.Request.GetBufferType0x22Position(); NvHostCtrlSyncptWaitEx Args = AMemoryHelper.Read(Context.Memory, InputPosition); diff --git a/Ryujinx.Core/OsHle/Services/Nv/NvMap/NvMapIoctl.cs b/Ryujinx.Core/OsHle/Services/Nv/NvMap/NvMapIoctl.cs index f9c1564a5a..4a18d25cef 100644 --- a/Ryujinx.Core/OsHle/Services/Nv/NvMap/NvMapIoctl.cs +++ b/Ryujinx.Core/OsHle/Services/Nv/NvMap/NvMapIoctl.cs @@ -36,7 +36,7 @@ namespace Ryujinx.Core.OsHle.Services.Nv.NvMap private static int Create(ServiceCtx Context) { - long InputPosition = Context.Request.GetBufferType0x21Position(); + long InputPosition = Context.Request.GetBufferType0x21(); long OutputPosition = Context.Request.GetBufferType0x22Position(); NvMapCreate Args = AMemoryHelper.Read(Context.Memory, InputPosition); @@ -61,7 +61,7 @@ namespace Ryujinx.Core.OsHle.Services.Nv.NvMap private static int FromId(ServiceCtx Context) { - long InputPosition = Context.Request.GetBufferType0x21Position(); + long InputPosition = Context.Request.GetBufferType0x21(); long OutputPosition = Context.Request.GetBufferType0x22Position(); NvMapFromId Args = AMemoryHelper.Read(Context.Memory, InputPosition); @@ -86,7 +86,7 @@ namespace Ryujinx.Core.OsHle.Services.Nv.NvMap private static int Alloc(ServiceCtx Context) { - long InputPosition = Context.Request.GetBufferType0x21Position(); + long InputPosition = Context.Request.GetBufferType0x21(); long OutputPosition = Context.Request.GetBufferType0x22Position(); NvMapAlloc Args = AMemoryHelper.Read(Context.Memory, InputPosition); @@ -149,7 +149,7 @@ namespace Ryujinx.Core.OsHle.Services.Nv.NvMap private static int Free(ServiceCtx Context) { - long InputPosition = Context.Request.GetBufferType0x21Position(); + long InputPosition = Context.Request.GetBufferType0x21(); long OutputPosition = Context.Request.GetBufferType0x22Position(); NvMapFree Args = AMemoryHelper.Read(Context.Memory, InputPosition); @@ -188,7 +188,7 @@ namespace Ryujinx.Core.OsHle.Services.Nv.NvMap private static int Param(ServiceCtx Context) { - long InputPosition = Context.Request.GetBufferType0x21Position(); + long InputPosition = Context.Request.GetBufferType0x21(); long OutputPosition = Context.Request.GetBufferType0x22Position(); NvMapParam Args = AMemoryHelper.Read(Context.Memory, InputPosition); @@ -222,7 +222,7 @@ namespace Ryujinx.Core.OsHle.Services.Nv.NvMap private static int GetId(ServiceCtx Context) { - long InputPosition = Context.Request.GetBufferType0x21Position(); + long InputPosition = Context.Request.GetBufferType0x21(); long OutputPosition = Context.Request.GetBufferType0x22Position(); NvMapGetId Args = AMemoryHelper.Read(Context.Memory, InputPosition);