[−][src]Struct tetanes::cpu::Cpu
The Central Processing Unit status and registers
Fields
cycle_count: usize
step: usize
pc: Addr
sp: Byte
acc: Byte
x: Byte
y: Byte
status: Byte
bus: Bus
pc_log: VecDeque<Addr>
stall: usize
instr: Instr
abs_addr: Addr
rel_addr: Addr
fetched_data: Byte
irq_pending: u8
nmi_pending: bool
Implementations
impl Cpu
[src]
pub fn init(bus: Bus) -> Self
[src]
pub fn next_instr(&self) -> Instr
[src]
pub fn set_irq(&mut self, irq: Irq, val: bool)
[src]
Sends an IRQ Interrupt to the CPU
http://wiki.nesdev.com/w/index.php/IRQ
pub fn has_irq(&mut self, irq: Irq) -> bool
[src]
Checks if a a given IRQ is active
pub fn irq(&mut self)
[src]
pub fn set_nmi(&mut self, val: bool)
[src]
Sends a NMI Interrupt to the CPU
http://wiki.nesdev.com/w/index.php/NMI
pub fn peek_stackb(&self) -> Byte
[src]
pub fn peek_stackw(&self) -> Addr
[src]
pub fn readw(&mut self, addr: Addr) -> Addr
[src]
pub fn peekw(&self, addr: Addr) -> Addr
[src]
pub fn disassemble(&self, pc: &mut Addr) -> String
[src]
pub fn print_instruction(&mut self, pc: Addr)
[src]
Trait Implementations
impl Clocked for Cpu
[src]
impl Clone for Cpu
[src]
impl Debug for Cpu
[src]
impl MemRead for Cpu
[src]
impl MemWrite for Cpu
[src]
impl Powered for Cpu
[src]
fn power_on(&mut self)
[src]
Powers on the CPU
fn reset(&mut self)
[src]
Resets the CPU
Updates the PC, SP, and Status values to defined constants.
These operations take the CPU 7 cycle.
fn power_cycle(&mut self)
[src]
Power cycle the CPU
Updates all status as if powered on for the first time
These operations take the CPU 7 cycle.
fn power_off(&mut self)
[src]
impl Savable for Cpu
[src]
Auto Trait Implementations
impl RefUnwindSafe for Cpu
impl !Send for Cpu
impl !Sync for Cpu
impl Unpin for Cpu
impl UnwindSafe for Cpu
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,