Split main project into core,graphics and chocolarm4 subproject (#29)
This commit is contained in:
parent
cb665bb715
commit
62b827f474
257 changed files with 415 additions and 285 deletions
44
Ryujinx.Core/OsHle/Utilities/MemReader.cs
Normal file
44
Ryujinx.Core/OsHle/Utilities/MemReader.cs
Normal file
|
@ -0,0 +1,44 @@
|
|||
using ChocolArm64.Memory;
|
||||
|
||||
namespace Ryujinx.Core.OsHle.Utilities
|
||||
{
|
||||
class MemReader
|
||||
{
|
||||
private AMemory Memory;
|
||||
|
||||
public long Position { get; private set; }
|
||||
|
||||
public MemReader(AMemory Memory, long Position)
|
||||
{
|
||||
this.Memory = Memory;
|
||||
this.Position = Position;
|
||||
}
|
||||
|
||||
public byte ReadByte()
|
||||
{
|
||||
byte Value = Memory.ReadByte(Position);
|
||||
|
||||
Position++;
|
||||
|
||||
return Value;
|
||||
}
|
||||
|
||||
public int ReadInt32()
|
||||
{
|
||||
int Value = Memory.ReadInt32(Position);
|
||||
|
||||
Position += 4;
|
||||
|
||||
return Value;
|
||||
}
|
||||
|
||||
public long ReadInt64()
|
||||
{
|
||||
long Value = Memory.ReadInt64(Position);
|
||||
|
||||
Position += 8;
|
||||
|
||||
return Value;
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue