Refactoring HOS folder structure (#771)
* Refactoring HOS folder structure Refactoring HOS folder structure: - Added some subfolders when needed (Following structure decided in private). - Added some `Types` folders when needed. - Little cleanup here and there. - Add services placeholders for every HOS services (close #766 and #753). * Remove Types namespaces
This commit is contained in:
parent
4af3101b22
commit
a0720b5681
393 changed files with 2540 additions and 1299 deletions
8
Ryujinx.HLE/HOS/Services/Nv/INvDrvDebugFSServices.cs
Normal file
8
Ryujinx.HLE/HOS/Services/Nv/INvDrvDebugFSServices.cs
Normal file
|
@ -0,0 +1,8 @@
|
|||
namespace Ryujinx.HLE.HOS.Services.Nv
|
||||
{
|
||||
[Service("nvdrvdbg")]
|
||||
class INvDrvDebugFSServices : IpcService
|
||||
{
|
||||
public INvDrvDebugFSServices(ServiceCtx context) { }
|
||||
}
|
||||
}
|
|
@ -4,11 +4,11 @@ using Ryujinx.HLE.HOS.Ipc;
|
|||
using Ryujinx.HLE.HOS.Kernel.Common;
|
||||
using Ryujinx.HLE.HOS.Kernel.Process;
|
||||
using Ryujinx.HLE.HOS.Kernel.Threading;
|
||||
using Ryujinx.HLE.HOS.Services.Nv.NvGpuAS;
|
||||
using Ryujinx.HLE.HOS.Services.Nv.NvGpuGpu;
|
||||
using Ryujinx.HLE.HOS.Services.Nv.NvHostChannel;
|
||||
using Ryujinx.HLE.HOS.Services.Nv.NvHostCtrl;
|
||||
using Ryujinx.HLE.HOS.Services.Nv.NvMap;
|
||||
using Ryujinx.HLE.HOS.Services.Nv.NvDrvServices.NvGpuAS;
|
||||
using Ryujinx.HLE.HOS.Services.Nv.NvDrvServices.NvGpuGpu;
|
||||
using Ryujinx.HLE.HOS.Services.Nv.NvDrvServices.NvHostChannel;
|
||||
using Ryujinx.HLE.HOS.Services.Nv.NvDrvServices.NvHostCtrl;
|
||||
using Ryujinx.HLE.HOS.Services.Nv.NvDrvServices.NvMap;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
|
|
8
Ryujinx.HLE/HOS/Services/Nv/INvGemControl.cs
Normal file
8
Ryujinx.HLE/HOS/Services/Nv/INvGemControl.cs
Normal file
|
@ -0,0 +1,8 @@
|
|||
namespace Ryujinx.HLE.HOS.Services.Nv
|
||||
{
|
||||
[Service("nvgem:c")]
|
||||
class INvGemControl : IpcService
|
||||
{
|
||||
public INvGemControl(ServiceCtx context) { }
|
||||
}
|
||||
}
|
8
Ryujinx.HLE/HOS/Services/Nv/INvGemCoreDump.cs
Normal file
8
Ryujinx.HLE/HOS/Services/Nv/INvGemCoreDump.cs
Normal file
|
@ -0,0 +1,8 @@
|
|||
namespace Ryujinx.HLE.HOS.Services.Nv
|
||||
{
|
||||
[Service("nvgem:cd")]
|
||||
class INvGemCoreDump : IpcService
|
||||
{
|
||||
public INvGemCoreDump(ServiceCtx context) { }
|
||||
}
|
||||
}
|
|
@ -2,11 +2,11 @@ using ARMeilleure.Memory;
|
|||
using Ryujinx.Common.Logging;
|
||||
using Ryujinx.Graphics.Memory;
|
||||
using Ryujinx.HLE.HOS.Kernel.Process;
|
||||
using Ryujinx.HLE.HOS.Services.Nv.NvMap;
|
||||
using Ryujinx.HLE.HOS.Services.Nv.NvDrvServices.NvMap;
|
||||
using System;
|
||||
using System.Collections.Concurrent;
|
||||
|
||||
namespace Ryujinx.HLE.HOS.Services.Nv.NvGpuAS
|
||||
namespace Ryujinx.HLE.HOS.Services.Nv.NvDrvServices.NvGpuAS
|
||||
{
|
||||
class NvGpuASIoctl
|
||||
{
|
|
@ -1,4 +1,4 @@
|
|||
namespace Ryujinx.HLE.HOS.Services.Nv.NvGpuAS
|
||||
namespace Ryujinx.HLE.HOS.Services.Nv.NvDrvServices.NvGpuAS
|
||||
{
|
||||
struct NvGpuASAllocSpace
|
||||
{
|
|
@ -1,7 +1,7 @@
|
|||
using Ryujinx.Graphics.Memory;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Ryujinx.HLE.HOS.Services.Nv.NvGpuAS
|
||||
namespace Ryujinx.HLE.HOS.Services.Nv.NvDrvServices.NvGpuAS
|
||||
{
|
||||
class NvGpuASCtx
|
||||
{
|
|
@ -1,4 +1,4 @@
|
|||
namespace Ryujinx.HLE.HOS.Services.Nv.NvGpuAS
|
||||
namespace Ryujinx.HLE.HOS.Services.Nv.NvDrvServices.NvGpuAS
|
||||
{
|
||||
struct NvGpuASMapBufferEx
|
||||
{
|
|
@ -1,4 +1,4 @@
|
|||
namespace Ryujinx.HLE.HOS.Services.Nv.NvGpuAS
|
||||
namespace Ryujinx.HLE.HOS.Services.Nv.NvDrvServices.NvGpuAS
|
||||
{
|
||||
struct NvGpuASRemap
|
||||
{
|
|
@ -1,4 +1,4 @@
|
|||
namespace Ryujinx.HLE.HOS.Services.Nv.NvGpuAS
|
||||
namespace Ryujinx.HLE.HOS.Services.Nv.NvDrvServices.NvGpuAS
|
||||
{
|
||||
struct NvGpuASUnmapBuffer
|
||||
{
|
|
@ -3,7 +3,7 @@ using Ryujinx.Common.Logging;
|
|||
using System;
|
||||
using System.Diagnostics;
|
||||
|
||||
namespace Ryujinx.HLE.HOS.Services.Nv.NvGpuGpu
|
||||
namespace Ryujinx.HLE.HOS.Services.Nv.NvDrvServices.NvGpuGpu
|
||||
{
|
||||
class NvGpuGpuIoctl
|
||||
{
|
||||
|
@ -40,9 +40,10 @@ namespace Ryujinx.HLE.HOS.Services.Nv.NvGpuGpu
|
|||
{
|
||||
long outputPosition = context.Request.GetBufferType0x22().Position;
|
||||
|
||||
NvGpuGpuZcullGetCtxSize args = new NvGpuGpuZcullGetCtxSize();
|
||||
|
||||
args.Size = 1;
|
||||
NvGpuGpuZcullGetCtxSize args = new NvGpuGpuZcullGetCtxSize
|
||||
{
|
||||
Size = 1
|
||||
};
|
||||
|
||||
MemoryHelper.Write(context.Memory, outputPosition, args);
|
||||
|
||||
|
@ -55,18 +56,19 @@ namespace Ryujinx.HLE.HOS.Services.Nv.NvGpuGpu
|
|||
{
|
||||
long outputPosition = context.Request.GetBufferType0x22().Position;
|
||||
|
||||
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;
|
||||
NvGpuGpuZcullGetInfo args = new NvGpuGpuZcullGetInfo
|
||||
{
|
||||
WidthAlignPixels = 0x20,
|
||||
HeightAlignPixels = 0x20,
|
||||
PixelSquaresByAliquots = 0x400,
|
||||
AliquotTotal = 0x800,
|
||||
RegionByteMultiplier = 0x20,
|
||||
RegionHeaderSize = 0x20,
|
||||
SubregionHeaderSize = 0xc0,
|
||||
SubregionWidthAlignPixels = 0x20,
|
||||
SubregionHeightAlignPixels = 0x40,
|
||||
SubregionCount = 0x10
|
||||
};
|
||||
|
||||
MemoryHelper.Write(context.Memory, outputPosition, args);
|
||||
|
||||
|
@ -156,10 +158,11 @@ namespace Ryujinx.HLE.HOS.Services.Nv.NvGpuGpu
|
|||
{
|
||||
long outputPosition = context.Request.GetBufferType0x22().Position;
|
||||
|
||||
NvGpuGpuGetActiveSlotMask args = new NvGpuGpuGetActiveSlotMask();
|
||||
|
||||
args.Slot = 0x07;
|
||||
args.Mask = 0x01;
|
||||
NvGpuGpuGetActiveSlotMask args = new NvGpuGpuGetActiveSlotMask
|
||||
{
|
||||
Slot = 0x07,
|
||||
Mask = 0x01
|
||||
};
|
||||
|
||||
MemoryHelper.Write(context.Memory, outputPosition, args);
|
||||
|
|
@ -1,8 +1,8 @@
|
|||
namespace Ryujinx.HLE.HOS.Services.Nv.NvGpuGpu
|
||||
namespace Ryujinx.HLE.HOS.Services.Nv.NvDrvServices.NvGpuGpu
|
||||
{
|
||||
struct NvGpuGpuGetActiveSlotMask
|
||||
{
|
||||
public int Slot;
|
||||
public int Mask;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,4 +1,4 @@
|
|||
namespace Ryujinx.HLE.HOS.Services.Nv.NvGpuGpu
|
||||
namespace Ryujinx.HLE.HOS.Services.Nv.NvDrvServices.NvGpuGpu
|
||||
{
|
||||
struct NvGpuGpuGetCharacteristics
|
||||
{
|
|
@ -1,4 +1,4 @@
|
|||
namespace Ryujinx.HLE.HOS.Services.Nv.NvGpuGpu
|
||||
namespace Ryujinx.HLE.HOS.Services.Nv.NvDrvServices.NvGpuGpu
|
||||
{
|
||||
struct NvGpuGpuGetTpcMasks
|
||||
{
|
|
@ -1,7 +1,7 @@
|
|||
namespace Ryujinx.HLE.HOS.Services.Nv.NvGpuGpu
|
||||
namespace Ryujinx.HLE.HOS.Services.Nv.NvDrvServices.NvGpuGpu
|
||||
{
|
||||
struct NvGpuGpuZcullGetCtxSize
|
||||
{
|
||||
public int Size;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,4 +1,4 @@
|
|||
namespace Ryujinx.HLE.HOS.Services.Nv.NvGpuGpu
|
||||
namespace Ryujinx.HLE.HOS.Services.Nv.NvDrvServices.NvGpuGpu
|
||||
{
|
||||
struct NvGpuGpuZcullGetInfo
|
||||
{
|
||||
|
@ -13,4 +13,4 @@
|
|||
public int SubregionHeightAlignPixels;
|
||||
public int SubregionCount;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -2,12 +2,12 @@ using ARMeilleure.Memory;
|
|||
using Ryujinx.Common.Logging;
|
||||
using Ryujinx.Graphics.Memory;
|
||||
using Ryujinx.HLE.HOS.Kernel.Process;
|
||||
using Ryujinx.HLE.HOS.Services.Nv.NvGpuAS;
|
||||
using Ryujinx.HLE.HOS.Services.Nv.NvMap;
|
||||
using Ryujinx.HLE.HOS.Services.Nv.NvDrvServices.NvGpuAS;
|
||||
using Ryujinx.HLE.HOS.Services.Nv.NvDrvServices.NvMap;
|
||||
using System;
|
||||
using System.Collections.Concurrent;
|
||||
|
||||
namespace Ryujinx.HLE.HOS.Services.Nv.NvHostChannel
|
||||
namespace Ryujinx.HLE.HOS.Services.Nv.NvDrvServices.NvHostChannel
|
||||
{
|
||||
class NvHostChannelIoctl
|
||||
{
|
|
@ -1,4 +1,4 @@
|
|||
namespace Ryujinx.HLE.HOS.Services.Nv.NvHostChannel
|
||||
namespace Ryujinx.HLE.HOS.Services.Nv.NvDrvServices.NvHostChannel
|
||||
{
|
||||
class NvChannel
|
||||
{
|
|
@ -1,4 +1,4 @@
|
|||
namespace Ryujinx.HLE.HOS.Services.Nv.NvHostChannel
|
||||
namespace Ryujinx.HLE.HOS.Services.Nv.NvDrvServices.NvHostChannel
|
||||
{
|
||||
enum NvChannelPriority
|
||||
{
|
|
@ -1,6 +1,6 @@
|
|||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace Ryujinx.HLE.HOS.Services.Nv.NvHostChannel
|
||||
namespace Ryujinx.HLE.HOS.Services.Nv.NvDrvServices.NvHostChannel
|
||||
{
|
||||
[StructLayout(LayoutKind.Sequential, Size = 8, Pack = 4)]
|
||||
struct NvHostChannelCmdBuf
|
|
@ -1,6 +1,6 @@
|
|||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace Ryujinx.HLE.HOS.Services.Nv.NvHostChannel
|
||||
namespace Ryujinx.HLE.HOS.Services.Nv.NvDrvServices.NvHostChannel
|
||||
{
|
||||
[StructLayout(LayoutKind.Sequential, Size = 8, Pack = 4)]
|
||||
struct NvHostChannelGetParamArg
|
|
@ -1,12 +1,12 @@
|
|||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace Ryujinx.HLE.HOS.Services.Nv.NvHostChannel
|
||||
namespace Ryujinx.HLE.HOS.Services.Nv.NvDrvServices.NvHostChannel
|
||||
{
|
||||
[StructLayout(LayoutKind.Sequential, Size = 0xc, Pack = 4)]
|
||||
struct NvHostChannelMapBuffer
|
||||
{
|
||||
public int NumEntries;
|
||||
public int DataAddress; //Ignored by the driver.
|
||||
public int DataAddress; // Ignored by the driver.
|
||||
public bool AttachHostChDas;
|
||||
}
|
||||
}
|
|
@ -1,6 +1,6 @@
|
|||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace Ryujinx.HLE.HOS.Services.Nv.NvHostChannel
|
||||
namespace Ryujinx.HLE.HOS.Services.Nv.NvDrvServices.NvHostChannel
|
||||
{
|
||||
[StructLayout(LayoutKind.Sequential, Size = 8, Pack = 4)]
|
||||
struct NvHostChannelSubmit
|
|
@ -1,4 +1,4 @@
|
|||
namespace Ryujinx.HLE.HOS.Services.Nv.NvHostChannel
|
||||
namespace Ryujinx.HLE.HOS.Services.Nv.NvDrvServices.NvHostChannel
|
||||
{
|
||||
struct NvHostChannelSubmitGpfifo
|
||||
{
|
|
@ -1,12 +1,13 @@
|
|||
using ARMeilleure.Memory;
|
||||
using Ryujinx.Common.Logging;
|
||||
using Ryujinx.HLE.HOS.Kernel.Process;
|
||||
using Ryujinx.HLE.HOS.Services.Settings;
|
||||
using System;
|
||||
using System.Collections.Concurrent;
|
||||
using System.Text;
|
||||
using System.Threading;
|
||||
|
||||
namespace Ryujinx.HLE.HOS.Services.Nv.NvHostCtrl
|
||||
namespace Ryujinx.HLE.HOS.Services.Nv.NvDrvServices.NvHostCtrl
|
||||
{
|
||||
class NvHostCtrlIoctl
|
||||
{
|
||||
|
@ -18,7 +19,7 @@ namespace Ryujinx.HLE.HOS.Services.Nv.NvHostCtrl
|
|||
{
|
||||
_userCtxs = new ConcurrentDictionary<KProcess, NvHostCtrlUserCtx>();
|
||||
|
||||
if (Set.NxSettings.Settings.TryGetValue("nv!rmos_set_production_mode", out object productionModeSetting))
|
||||
if (NxSettings.Settings.TryGetValue("nv!rmos_set_production_mode", out object productionModeSetting))
|
||||
{
|
||||
_isProductionMode = ((string)productionModeSetting) != "0"; // Default value is ""
|
||||
}
|
||||
|
@ -88,7 +89,7 @@ namespace Ryujinx.HLE.HOS.Services.Nv.NvHostCtrl
|
|||
string domain = MemoryHelper.ReadAsciiString(context.Memory, inputPosition + 0, 0x41);
|
||||
string name = MemoryHelper.ReadAsciiString(context.Memory, inputPosition + 0x41, 0x41);
|
||||
|
||||
if (Set.NxSettings.Settings.TryGetValue($"{domain}!{name}", out object nvSetting))
|
||||
if (NxSettings.Settings.TryGetValue($"{domain}!{name}", out object nvSetting))
|
||||
{
|
||||
byte[] settingBuffer = new byte[0x101];
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
namespace Ryujinx.HLE.HOS.Services.Nv.NvHostCtrl
|
||||
namespace Ryujinx.HLE.HOS.Services.Nv.NvDrvServices.NvHostCtrl
|
||||
{
|
||||
struct NvHostCtrlSyncptRead
|
||||
{
|
|
@ -1,4 +1,4 @@
|
|||
namespace Ryujinx.HLE.HOS.Services.Nv.NvHostCtrl
|
||||
namespace Ryujinx.HLE.HOS.Services.Nv.NvDrvServices.NvHostCtrl
|
||||
{
|
||||
struct NvHostCtrlSyncptWait
|
||||
{
|
|
@ -1,4 +1,4 @@
|
|||
namespace Ryujinx.HLE.HOS.Services.Nv.NvHostCtrl
|
||||
namespace Ryujinx.HLE.HOS.Services.Nv.NvDrvServices.NvHostCtrl
|
||||
{
|
||||
struct NvHostCtrlSyncptWaitEx
|
||||
{
|
|
@ -1,4 +1,4 @@
|
|||
namespace Ryujinx.HLE.HOS.Services.Nv.NvHostCtrl
|
||||
namespace Ryujinx.HLE.HOS.Services.Nv.NvDrvServices.NvHostCtrl
|
||||
{
|
||||
class NvHostCtrlUserCtx
|
||||
{
|
|
@ -1,4 +1,4 @@
|
|||
namespace Ryujinx.HLE.HOS.Services.Nv.NvHostCtrl
|
||||
namespace Ryujinx.HLE.HOS.Services.Nv.NvDrvServices.NvHostCtrl
|
||||
{
|
||||
class NvHostEvent
|
||||
{
|
|
@ -1,4 +1,4 @@
|
|||
namespace Ryujinx.HLE.HOS.Services.Nv.NvHostCtrl
|
||||
namespace Ryujinx.HLE.HOS.Services.Nv.NvDrvServices.NvHostCtrl
|
||||
{
|
||||
enum NvHostEventState
|
||||
{
|
|
@ -3,7 +3,7 @@ using System.Collections.Concurrent;
|
|||
using System.Collections.Generic;
|
||||
using System.Threading;
|
||||
|
||||
namespace Ryujinx.HLE.HOS.Services.Nv.NvHostCtrl
|
||||
namespace Ryujinx.HLE.HOS.Services.Nv.NvDrvServices.NvHostCtrl
|
||||
{
|
||||
class NvHostSyncpt
|
||||
{
|
|
@ -5,7 +5,7 @@ using Ryujinx.HLE.HOS.Kernel.Process;
|
|||
using Ryujinx.HLE.Utilities;
|
||||
using System.Collections.Concurrent;
|
||||
|
||||
namespace Ryujinx.HLE.HOS.Services.Nv.NvMap
|
||||
namespace Ryujinx.HLE.HOS.Services.Nv.NvDrvServices.NvMap
|
||||
{
|
||||
class NvMapIoctl
|
||||
{
|
|
@ -1,4 +1,4 @@
|
|||
namespace Ryujinx.HLE.HOS.Services.Nv.NvMap
|
||||
namespace Ryujinx.HLE.HOS.Services.Nv.NvDrvServices.NvMap
|
||||
{
|
||||
struct NvMapAlloc
|
||||
{
|
|
@ -1,4 +1,4 @@
|
|||
namespace Ryujinx.HLE.HOS.Services.Nv.NvMap
|
||||
namespace Ryujinx.HLE.HOS.Services.Nv.NvDrvServices.NvMap
|
||||
{
|
||||
struct NvMapCreate
|
||||
{
|
|
@ -1,4 +1,4 @@
|
|||
namespace Ryujinx.HLE.HOS.Services.Nv.NvMap
|
||||
namespace Ryujinx.HLE.HOS.Services.Nv.NvDrvServices.NvMap
|
||||
{
|
||||
struct NvMapFree
|
||||
{
|
|
@ -1,4 +1,4 @@
|
|||
namespace Ryujinx.HLE.HOS.Services.Nv.NvMap
|
||||
namespace Ryujinx.HLE.HOS.Services.Nv.NvDrvServices.NvMap
|
||||
{
|
||||
struct NvMapFromId
|
||||
{
|
|
@ -1,4 +1,4 @@
|
|||
namespace Ryujinx.HLE.HOS.Services.Nv.NvMap
|
||||
namespace Ryujinx.HLE.HOS.Services.Nv.NvDrvServices.NvMap
|
||||
{
|
||||
struct NvMapGetId
|
||||
{
|
|
@ -1,6 +1,6 @@
|
|||
using System.Threading;
|
||||
|
||||
namespace Ryujinx.HLE.HOS.Services.Nv.NvMap
|
||||
namespace Ryujinx.HLE.HOS.Services.Nv.NvDrvServices.NvMap
|
||||
{
|
||||
class NvMapHandle
|
||||
{
|
|
@ -1,4 +1,4 @@
|
|||
namespace Ryujinx.HLE.HOS.Services.Nv.NvMap
|
||||
namespace Ryujinx.HLE.HOS.Services.Nv.NvDrvServices.NvMap
|
||||
{
|
||||
enum NvMapHandleParam
|
||||
{
|
|
@ -1,4 +1,4 @@
|
|||
namespace Ryujinx.HLE.HOS.Services.Nv.NvMap
|
||||
namespace Ryujinx.HLE.HOS.Services.Nv.NvDrvServices.NvMap
|
||||
{
|
||||
struct NvMapParam
|
||||
{
|
Loading…
Add table
Add a link
Reference in a new issue