[−][src]Enum z80emu::z80::any::Z80Any
Variants
Implementations
impl Z80Any
[src]
pub fn tag(&self) -> &'static str
[src]
Returns the tag of the current Z80 variant as string.
pub fn with_tag(tag: &str) -> Option<Self>
[src]
Creates a new instance of Z80Any with the given tag
on success with the state just after RESET
.
Returns None
if the provided tag
is unknown.
pub fn new_nmos() -> Z80Any
[src]
Creates a new instance of Z80Any::NMOS variant with the state just after RESET
.
pub fn new_cmos() -> Z80Any
[src]
Creates a new instance of Z80Any::CMOS variant with the state just after RESET
.
pub fn new_bm1() -> Z80Any
[src]
Creates a new instance of Z80Any::BM1 variant with the state just after RESET
.
pub fn is_nmos(&self) -> bool
[src]
Returns true
if the variant of self
is Z80Any::NMOS.
pub fn is_cmos(&self) -> bool
[src]
Returns true
if the variant of self
is Z80Any::CMOS.
pub fn is_bm1(&self) -> bool
[src]
Returns true
if the variant of self
is Z80Any::BM1.
pub fn into_nmos(self) -> Z80Any
[src]
Converts an instance of any variant of Z80Any to a Z80Any::NMOS variant.
pub fn into_cmos(self) -> Z80Any
[src]
Converts an instance of any variant of Z80Any to a Z80Any::CMOS variant.
pub fn into_bm1(self) -> Z80Any
[src]
Converts an instance of any variant of Z80Any to a Z80Any::BM1 variant.
pub fn unwrap_nmos(self) -> Z80<NMOS>
[src]
Returns the contained Z80<NMOS>
value, consuming the self value.
Panics
Panics if the self value is not a Z80Any::NMOS variant.
pub fn unwrap_cmos(self) -> Z80<CMOS>
[src]
Returns the contained Z80<CMOS>
value, consuming the self value.
Panics
Panics if the self value is not a Z80Any::CMOS variant.
pub fn unwrap_bm1(self) -> Z80<BM1>
[src]
Returns the contained Z80<BM1>
value, consuming the self value.
Panics
Panics if the self value is not a Z80Any::BM1 variant.
pub fn get_memptr(&self) -> u16
[src]
Retrieves the internal state of the MEMPTR register.
pub fn set_memptr(&mut self, memptr: u16)
[src]
Changes the internal state of the MEMPTR register.
pub fn normalize_r(&mut self)
[src]
The content of the R
register is lazy evaluated when its value is being set or retrieved.
This method normalizes the internal state of the R
register, so e.g. two instances of
Z80 can be compared if they represent the same CPU
state.
Trait Implementations
impl Clone for Z80Any
[src]
impl Cpu for Z80Any
[src]
fn reset(&mut self)
[src]
fn get_pc(&self) -> u16
[src]
fn set_pc(&mut self, pc: u16)
[src]
fn get_sp(&self) -> u16
[src]
fn set_sp(&mut self, sp: u16)
[src]
fn get_acc(&self) -> u8
[src]
fn set_acc(&mut self, val: u8)
[src]
fn get_flags(&self) -> CpuFlags
[src]
fn set_flags(&mut self, flags: CpuFlags)
[src]
fn inc_r(&mut self)
[src]
fn add_r(&mut self, delta: i32)
[src]
fn get_r(&self) -> u8
[src]
fn set_r(&mut self, r: u8)
[src]
fn get_i(&self) -> u8
[src]
fn set_i(&mut self, i: u8)
[src]
fn get_ir(&self) -> u16
[src]
fn get_iffs(&self) -> (bool, bool)
[src]
fn set_iffs(&mut self, iff1: bool, iff2: bool)
[src]
fn halt(&mut self)
[src]
fn is_halt(&self) -> bool
[src]
fn get_im(&self) -> InterruptMode
[src]
fn set_im(&mut self, im: InterruptMode)
[src]
fn ex_af_af(&mut self)
[src]
fn exx(&mut self)
[src]
fn get_reg(&self, reg: Reg8, prefix: Option<Prefix>) -> u8
[src]
fn set_reg(&mut self, dst: Reg8, prefix: Option<Prefix>, val: u8)
[src]
fn get_reg2(&self, src: StkReg16) -> (u8, u8)
[src]
fn get_alt_reg2(&self, src: StkReg16) -> (u8, u8)
[src]
fn get_reg16(&self, src: StkReg16) -> u16
[src]
fn get_alt_reg16(&self, src: StkReg16) -> u16
[src]
fn set_reg2(&mut self, src: StkReg16, hi: u8, lo: u8)
[src]
fn set_reg16(&mut self, src: StkReg16, val: u16)
[src]
fn get_index2(&self, prefix: Prefix) -> (u8, u8)
[src]
fn get_index16(&self, prefix: Prefix) -> u16
[src]
fn set_index2(&mut self, prefix: Prefix, hi: u8, lo: u8)
[src]
fn set_index16(&mut self, prefix: Prefix, val: u16)
[src]
fn is_irq_allowed(&self) -> bool
[src]
fn is_nmi_allowed(&self) -> bool
[src]
fn restore_iff1(&mut self)
[src]
fn disable_interrupts(&mut self)
[src]
fn enable_interrupts(&mut self)
[src]
fn is_after_ei(&self) -> bool
[src]
fn is_after_prefix(&self) -> bool
[src]
fn get_prefix(&self) -> Option<Prefix>
[src]
fn irq<M, T, F>(
&mut self,
control: &mut M,
tsc: &mut T,
debug: Option<F>
) -> Option<Result<M::WrIoBreak, M::RetiBreak>> where
M: Memory<Timestamp = T::Timestamp> + Io<Timestamp = T::Timestamp>,
T: Clock,
F: FnOnce(CpuDebug),
[src]
&mut self,
control: &mut M,
tsc: &mut T,
debug: Option<F>
) -> Option<Result<M::WrIoBreak, M::RetiBreak>> where
M: Memory<Timestamp = T::Timestamp> + Io<Timestamp = T::Timestamp>,
T: Clock,
F: FnOnce(CpuDebug),
fn nmi<M, T>(&mut self, control: &mut M, tsc: &mut T) -> bool where
M: Memory<Timestamp = T::Timestamp> + Io<Timestamp = T::Timestamp>,
T: Clock,
[src]
M: Memory<Timestamp = T::Timestamp> + Io<Timestamp = T::Timestamp>,
T: Clock,
fn execute_instruction<M, T, F>(
&mut self,
control: &mut M,
tsc: &mut T,
debug: Option<F>,
code: u8
) -> Result<M::WrIoBreak, M::RetiBreak> where
M: Memory<Timestamp = T::Timestamp> + Io<Timestamp = T::Timestamp>,
T: Clock,
F: FnOnce(CpuDebug),
[src]
&mut self,
control: &mut M,
tsc: &mut T,
debug: Option<F>,
code: u8
) -> Result<M::WrIoBreak, M::RetiBreak> where
M: Memory<Timestamp = T::Timestamp> + Io<Timestamp = T::Timestamp>,
T: Clock,
F: FnOnce(CpuDebug),
fn execute_next<M, T, F>(
&mut self,
control: &mut M,
tsc: &mut T,
debug: Option<F>
) -> Result<M::WrIoBreak, M::RetiBreak> where
M: Memory<Timestamp = T::Timestamp> + Io<Timestamp = T::Timestamp>,
T: Clock,
F: FnOnce(CpuDebug),
[src]
&mut self,
control: &mut M,
tsc: &mut T,
debug: Option<F>
) -> Result<M::WrIoBreak, M::RetiBreak> where
M: Memory<Timestamp = T::Timestamp> + Io<Timestamp = T::Timestamp>,
T: Clock,
F: FnOnce(CpuDebug),
fn execute_with_limit<M, T>(
&mut self,
control: &mut M,
tsc: &mut T,
vc_limit: T::Limit
) -> Result<M::WrIoBreak, M::RetiBreak> where
M: Memory<Timestamp = T::Timestamp> + Io<Timestamp = T::Timestamp>,
T: Clock,
[src]
&mut self,
control: &mut M,
tsc: &mut T,
vc_limit: T::Limit
) -> Result<M::WrIoBreak, M::RetiBreak> where
M: Memory<Timestamp = T::Timestamp> + Io<Timestamp = T::Timestamp>,
T: Clock,
impl Debug for Z80Any
[src]
impl Default for Z80Any
[src]
impl<'de> Deserialize<'de> for Z80Any
[src]
fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
[src]
impl Display for Z80Any
[src]
Displays the tag of the current Z80 variant.
impl Eq for Z80Any
[src]
impl<Q: Flavour> From<Z80<Q>> for Z80Any
[src]
impl<Q> From<Z80Any> for Z80<Q> where
Q: Flavour + From<NMOS> + From<CMOS> + From<BM1>,
[src]
Q: Flavour + From<NMOS> + From<CMOS> + From<BM1>,
impl PartialEq<Z80Any> for Z80Any
[src]
impl Serialize for Z80Any
[src]
impl StructuralEq for Z80Any
[src]
impl StructuralPartialEq for Z80Any
[src]
Auto Trait Implementations
impl RefUnwindSafe for Z80Any
impl Send for Z80Any
impl Sync for Z80Any
impl Unpin for Z80Any
impl UnwindSafe for Z80Any
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> DeserializeOwned for T where
T: for<'de> Deserialize<'de>,
[src]
T: for<'de> Deserialize<'de>,
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> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
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>,