Z80

Struct Z80 

Source
pub struct Z80<T: Z80_io> {
Show 16 fields pub io: T, pub pc: u16, pub sp: u16, pub ix: u16, pub iy: u16, pub mem_ptr: u16, pub i: u8, pub r: u8, pub iff_delay: u8, pub interrupt_mode: u8, pub irq_data: u8, pub irq_pending: u8, pub nmi_pending: u8, pub halted: bool, pub iff1: bool, pub iff2: bool, /* private fields */
}
Expand description

Z80 CPU

Fields§

§io: T§pc: u16§sp: u16§ix: u16§iy: u16§mem_ptr: u16§i: u8§r: u8§iff_delay: u8§interrupt_mode: u8§irq_data: u8§irq_pending: u8§nmi_pending: u8§halted: bool§iff1: bool§iff2: bool

Implementations§

Source§

impl<T: Z80_io> Z80<T>

Source

pub fn new(io: T) -> Self

Source

pub fn init(&mut self)

Source

pub fn step(&mut self) -> u32

Source

pub fn reset(&mut self)

Source

pub fn assert_irq(&mut self, data: u8)

Source

pub fn assert_nmi(&mut self)

Source

pub fn pulse_nmi(&mut self)

Source

pub fn clr_nmi(&mut self)

Source

pub fn pulse_irq(&mut self, data: u8)

Source

pub fn clr_irq(&mut self)

Auto Trait Implementations§

§

impl<T> Freeze for Z80<T>
where T: Freeze,

§

impl<T> RefUnwindSafe for Z80<T>
where T: RefUnwindSafe,

§

impl<T> Send for Z80<T>
where T: Send,

§

impl<T> Sync for Z80<T>
where T: Sync,

§

impl<T> Unpin for Z80<T>
where T: Unpin,

§

impl<T> UnwindSafe for Z80<T>
where T: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.