pub struct Cpu {
pub pc: Address,
pub sp: u8,
pub acc: u8,
pub x: u8,
pub y: u8,
pub status: StatusRegister,
}Fields§
§pc: Address§sp: u8§acc: u8§x: u8§y: u8§status: StatusRegisterImplementations§
Source§impl Cpu
impl Cpu
pub fn new() -> Self
pub fn retrieve_nmi_return_address_during_nmi<MRO: MemoryReadOnly>( &self, memory: &MRO, ) -> Option<Address>
pub fn nmi<M: Memory>(&mut self, memory: &mut M)
pub fn push_stack_u8<M: Memory>(&mut self, memory: &mut M, value: u8)
pub fn pop_stack_u8<M: Memory>(&mut self, memory: &mut M) -> u8
pub fn start<M: Memory>(&mut self, memory: &mut M)
pub fn run_for_cycles<M: Memory>( &mut self, memory: &mut M, num_cycles: usize, ) -> Result<usize, UnknownOpcode>
pub fn step<M: Memory>(&mut self, memory: &mut M) -> Result<u8, UnknownOpcode>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Cpu
impl RefUnwindSafe for Cpu
impl Send for Cpu
impl Sync for Cpu
impl Unpin for Cpu
impl UnwindSafe for Cpu
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more