mirror of
https://github.com/ryujinx-mirror/ryujinx.git
synced 2025-09-20 23:42:02 -05:00
Removed parts of the MMU functionality to use memory directly (faster, but potentially more dangerous, WIP), also changed the Shl/Sshr immediate instructions to use IL instead of calling the method
This commit is contained in:
@@ -3,6 +3,7 @@ namespace Ryujinx.OsHle.Handles
|
||||
class HSharedMem
|
||||
{
|
||||
public long PhysPos { get; private set; }
|
||||
public long VirtPos { get; set; }
|
||||
|
||||
public HSharedMem(long PhysPos)
|
||||
{
|
||||
|
@@ -9,15 +9,13 @@ namespace Ryujinx.OsHle.Handles
|
||||
|
||||
public long Position { get; private set; }
|
||||
public long Size { get; private set; }
|
||||
public long PhysPos { get; private set; }
|
||||
|
||||
public HTransferMem(AMemory Memory, AMemoryPerm Perm, long Position, long Size, long PhysPos)
|
||||
public HTransferMem(AMemory Memory, AMemoryPerm Perm, long Position, long Size)
|
||||
{
|
||||
this.Memory = Memory;
|
||||
this.Perm = Perm;
|
||||
this.Position = Position;
|
||||
this.Size = Size;
|
||||
this.PhysPos = PhysPos;
|
||||
}
|
||||
}
|
||||
}
|
@@ -159,5 +159,12 @@ namespace Ryujinx.OsHle
|
||||
|
||||
Handles.Delete(Handle);
|
||||
}
|
||||
|
||||
public long GetVirtHidOffset()
|
||||
{
|
||||
HSharedMem HidSharedMem = Handles.GetData<HSharedMem>(HidHandle);
|
||||
|
||||
return HidSharedMem.VirtPos;
|
||||
}
|
||||
}
|
||||
}
|
@@ -155,8 +155,7 @@ namespace Ryujinx.OsHle.Objects
|
||||
|
||||
HNvMap NvMap = Context.Ns.Os.Handles.GetData<HNvMap>(Handle);
|
||||
|
||||
Context.Ns.Gpu.Renderer.FrameBufferPtr =
|
||||
Context.Memory.Manager.GetPhys(NvMap.Address, AMemoryPerm.Read);
|
||||
Context.Ns.Gpu.Renderer.FrameBufferPtr = NvMap.Address;
|
||||
}
|
||||
|
||||
return MakeReplyParcel(Context, 0);
|
||||
|
@@ -77,6 +77,8 @@ namespace Ryujinx.OsHle.Svc
|
||||
long Src = Position;
|
||||
long Dst = HndData.PhysPos;
|
||||
|
||||
HndData.VirtPos = Src;
|
||||
|
||||
if (Memory.Manager.MapPhys(Src, Dst, Size,
|
||||
(int)MemoryType.SharedMemory, (AMemoryPerm)Perm))
|
||||
{
|
||||
@@ -113,9 +115,7 @@ namespace Ryujinx.OsHle.Svc
|
||||
|
||||
Memory.Manager.Reprotect(Position, Size, (AMemoryPerm)Perm);
|
||||
|
||||
long PhysPos = Memory.Manager.GetPhys(Position, AMemoryPerm.None);
|
||||
|
||||
HTransferMem HndData = new HTransferMem(Memory, MapInfo.Perm, Position, Size, PhysPos);
|
||||
HTransferMem HndData = new HTransferMem(Memory, MapInfo.Perm, Position, Size);
|
||||
|
||||
int Handle = Ns.Os.Handles.GenerateId(HndData);
|
||||
|
||||
|
Reference in New Issue
Block a user