Interface IMemoryAccess
- Namespace
 - RetroEditor.Plugins
 
- Assembly
 - RetroEditor.dll
 
Interface for accessing memory
public interface IMemoryAccess
  Properties
Endian
Memory Endian of the system
MemoryEndian Endian { get; }
  Property Value
- MemoryEndian
 Endianess of memory
RomSize
Size of the loaded rom (only applies to cartridge based systems)
int RomSize { get; }
  Property Value
- int
 Size of rom in bytes
Methods
FetchMachineOrder16(int, ReadOnlySpan<byte>)
Given a byte array and offset, returns a 16 bit value in machine order
ushort FetchMachineOrder16(int offset, ReadOnlySpan<byte> bytes)
  Parameters
offsetintoffset in bytes
bytesReadOnlySpan<byte>array of bytes
Returns
- ushort
 16 bit value from requested offset
FetchMachineOrder32(int, ReadOnlySpan<byte>)
Given a byte array and offset, returns a 32 bit value in machine order
uint FetchMachineOrder32(int offset, ReadOnlySpan<byte> bytes)
  Parameters
offsetintoffset in bytes
bytesReadOnlySpan<byte>array of bytes
Returns
- uint
 32 bit value from requested offset
FetchOppositeMachineOrder16(int, ReadOnlySpan<byte>)
Given a byte array and offset, returns a 16 bit value in opposite machine order
ushort FetchOppositeMachineOrder16(int offset, ReadOnlySpan<byte> bytes)
  Parameters
offsetintoffset in bytes
bytesReadOnlySpan<byte>array of bytes
Returns
- ushort
 16 bit value from requested offset
FetchOppositeMachineOrder32(int, ReadOnlySpan<byte>)
Given a byte array and offset, returns a 32 bit value in opposite machine order
uint FetchOppositeMachineOrder32(int offset, ReadOnlySpan<byte> bytes)
  Parameters
offsetintoffset in bytes
bytesReadOnlySpan<byte>array of bytes
Returns
- uint
 32 bit value from requested offset
ReadBytes(ReadKind, uint, uint)
Read a number of bytes from the specified memory area
ReadOnlySpan<byte> ReadBytes(ReadKind kind, uint address, uint length)
  Parameters
kindReadKindMemory kind
addressuintAddress of first byte
lengthuintNumber of bytes to retrieve
Returns
WriteBytes(WriteKind, uint, ReadOnlySpan<byte>)
Write a number of bytes to the specified memory area
void WriteBytes(WriteKind kind, uint address, ReadOnlySpan<byte> bytes)
  Parameters
kindWriteKindMemory kind
addressuintAddress to write to
bytesReadOnlySpan<byte>Bytes to write to address
WriteMachineOrder16(int, Span<byte>, ushort)
Given a byte array and offset, writes a 16bit value in machine order
void WriteMachineOrder16(int offset, Span<byte> bytes, ushort value)
  Parameters
WriteMachineOrder32(int, Span<byte>, uint)
Given a byte array and offset, writes a 32bit value in machine order
void WriteMachineOrder32(int offset, Span<byte> bytes, uint value)
  Parameters
WriteOppositeMachineOrder16(int, Span<byte>, ushort)
Given a byte array and offset, writes a 16bit value in opposite machine order
void WriteOppositeMachineOrder16(int offset, Span<byte> bytes, ushort value)
  Parameters
WriteOppositeMachineOrder32(int, Span<byte>, uint)
Given a byte array and offset, writes a 32bit value in opposite machine order
void WriteOppositeMachineOrder32(int offset, Span<byte> bytes, uint value)