C# Class NesHd.Core.Memory.Memory

The main class for memory including RAM, IO, SRAM and PRG
Show file Open project: afonsof/nes-hd Class Usage Examples

Public Properties

Property Type Description
JoyData1 int
JoyData2 int
JoyStrobe byte
WriteOnRam bool
Zapper NesHd.Core.Input.Zapper

Public Methods

Method Description
LoadCart ( string romPath ) : bool
Memory ( NesEngine engine ) : NesHd.Core.Debugger
Read ( ushort address ) : byte

Read a value from the memory at a specific address

Read16 ( ushort address ) : ushort

Read an address from the memory

Write ( ushort address, byte value ) : byte

Write a value into the memory at the specific address

Private Methods

Method Description
InitializeMemory ( ) : void

Initialize and clear the memory

Method Details

LoadCart() public method

public LoadCart ( string romPath ) : bool
romPath string
return bool

Memory() public method

public Memory ( NesEngine engine ) : NesHd.Core.Debugger
engine NesEngine
return NesHd.Core.Debugger

Read() public method

Read a value from the memory at a specific address
public Read ( ushort address ) : byte
address ushort The address to read from
return byte

Read16() public method

Read an address from the memory
public Read16 ( ushort address ) : ushort
address ushort
return ushort

Write() public method

Write a value into the memory at the specific address
public Write ( ushort address, byte value ) : byte
address ushort
value byte
return byte

Property Details

JoyData1 public property

public int JoyData1
return int

JoyData2 public property

public int JoyData2
return int

JoyStrobe public property

public byte JoyStrobe
return byte

WriteOnRam public property

public bool WriteOnRam
return bool

Zapper public property

public Zapper,NesHd.Core.Input Zapper
return NesHd.Core.Input.Zapper