Skip to content

Latest commit

History

History

XamariNES.CPU

Folders and files

NameName
Last commit message
Last commit date

parent directory

..

XamariNES.CPU - MOS 6502 Processor

XamariNES.CPU is a cross-plaform MOS 6502 Emulator written in C# using .Net Standard. The CPU was the first component of the NES that I started with, as the project initially stated with me wanting to write a simple 8-bit emulated CPU.

Overview

The actual NES CPU itself was a Ricoh 2A03, which included a variation of the MOS 6502 processor (More Information).

This implementation of the 6502 not only supports the official MOS 6502 opcodes, but also several of the undocumented opcodes specific to the Ricoh 2A03 CPU mariant in the NES.

public int Tick()

Increments the CPU one instruction. A single instruction can take N cycles, so the return value represents the number of cycles passed. We need to know the number of cycles that pass for each CPU instruction so we can increment the PPU the correct number of cycles.

public void Reset()

Reset the CPU back to a startup state, clearing RAM and register values