Skip to main content

Crate rustynes_cpu

Crate rustynes_cpu 

Source
Expand description

Cycle-accurate Ricoh 2A03 CPU core (6502 derivative without BCD mode).

See docs/cpu-6502.md in the workspace root for the implementation specification, and ref-docs/research-report.md §CPU for the source material this is derived from.

All 151 documented 6502 opcodes plus the 105 unofficial / undocumented ones are implemented at per-cycle granularity, including the JAM/KIL/STP halt opcodes, NMI / IRQ / BRK handling, and the page-crossing dummy reads that the test ROMs check for.

Re-exports§

pub use disasm::DisasmLine;
pub use disasm::disassemble_at;
pub use scheduler::M2Phase;

Modules§

disasm
6502 disassembler — used by the debugger UI.
scheduler
Scheduler-facing types the CPU crate exposes to its bus host.

Structs§

Cpu
6502 CPU core.
Status
Processor status flags. Bits match the layout pushed onto the stack.

Enums§

CpuSnapshotError
Errors returned by Cpu::restore.

Constants§

CPU_SNAPSHOT_VERSION
Schema version for the CPU snapshot blob.

Traits§

Bus
Address-space bus seen by the CPU.

Functions§

version
Returns the crate version string.