diff --git a/Memory/AMemory.cs b/Memory/AMemory.cs index da5cf00..054277b 100644 --- a/Memory/AMemory.cs +++ b/Memory/AMemory.cs @@ -204,6 +204,13 @@ namespace ChocolArm64.Memory return Modified; } + public IntPtr GetHostAddress(long Position, long Size) + { + EnsureRangeIsValid(Position, Size, AMemoryPerm.Read); + + return (IntPtr)(RamPtr + (ulong)Position); + } + public sbyte ReadSByte(long Position) { return (sbyte)ReadByte(Position);