C# Class DotNES.Core.Memory

Datei anzeigen Open project: brandonpelfrey/dotnes

Public Methods

Method Description
Memory ( NESConsole console ) : System
read16 ( ushort addr, bool pageWrap = false ) : ushort

Upper and lower bytes of val are swapped after reading.

read8 ( ushort addr ) : byte
write16 ( ushort addr, ushort val ) : void

Upper and lower bytes of val are swapped before writing.

write8 ( ushort addr, byte val ) : void

Write a byte to system memory. This might be internal RAM ($0000-$07FF), or could refer to memory-mapped devices, e.g. mappers, APU, PPU, etc.

Method Details

Memory() public method

public Memory ( NESConsole console ) : System
console NESConsole
return System

read16() public method

Upper and lower bytes of val are swapped after reading.
public read16 ( ushort addr, bool pageWrap = false ) : ushort
addr ushort
pageWrap bool
return ushort

read8() public method

public read8 ( ushort addr ) : byte
addr ushort
return byte

write16() public method

Upper and lower bytes of val are swapped before writing.
public write16 ( ushort addr, ushort val ) : void
addr ushort
val ushort
return void

write8() public method

Write a byte to system memory. This might be internal RAM ($0000-$07FF), or could refer to memory-mapped devices, e.g. mappers, APU, PPU, etc.
public write8 ( ushort addr, byte val ) : void
addr ushort The 16-bit address at which to set a value.
val byte The byte to write at the given location.
return void