mirror of
https://git.ryujinx.app/ryubing/ryujinx.git
synced 2025-08-02 22:17:13 +02: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:
parent
d77d691381
commit
18ac1c4045
10 changed files with 89 additions and 188 deletions
|
@ -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);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue