[−][src]Struct spectrusty::clock::VFrameTsCounter
A generic VideoTs based T-states counter.
Implements [Clock] for counting T-states when code is being executed by [z80emu::Cpu].
Counts additional T-states according to contention specified by generic parameters:
V:
VideoFrame and C:
MemoryContention.
Fields
vts: VFrameTs<V>
The current timestamp value of this counter.
contention: C
An instance implementing a MemoryContention trait.
Implementations
impl<V, C> VFrameTsCounter<V, C> where
C: MemoryContention,
V: VideoFrame,
[src]
C: MemoryContention,
V: VideoFrame,
pub fn new(vc: i16, hc: i16, contention: C) -> VFrameTsCounter<V, C>
[src]
Constructs a new and normalized VFrameTsCounter
from the given vertical and horizontal counter values.
Panics
Panics when the given values lead to an overflow of the capacity of VideoTs.
pub fn from_tstates(ts: i32, contention: C) -> VFrameTsCounter<V, C>
[src]
Builds a normalized VFrameTsCounter from the given count of T-states.
Panics
Panics when the given ts
overflows the capacity of VideoTs.
pub fn from_video_ts(vts: VideoTs, contention: C) -> VFrameTsCounter<V, C>
[src]
Builds a normalized VFrameTsCounter from the given count of T-states.
Panics
Panics when the given ts
overflows the capacity of VideoTs.
pub fn from_vframe_ts(vfts: VFrameTs<V>, contention: C) -> VFrameTsCounter<V, C>
[src]
Builds a normalized VFrameTsCounter from the given count of T-states.
Panics
Panics when the given ts
overflows the capacity of VideoTs.
pub fn is_contended_address(self, address: u16) -> bool
[src]
Methods from Deref<Target = VFrameTs<V>>
Trait Implementations
impl<V, C> AddAssign<u32> for VFrameTsCounter<V, C> where
V: VideoFrame,
[src]
V: VideoFrame,
fn add_assign(&mut self, delta: u32)
[src]
impl<V, C> Clock for VFrameTsCounter<V, C> where
C: MemoryContention,
V: VideoFrame,
[src]
C: MemoryContention,
V: VideoFrame,
type Limit = i16
This type is being used for an arbitrary representation of the limit
argument when executing
instructions. See Cpu::execute_with_limit for an explanation. Read more
type Timestamp = VideoTs
This type is being used for timestamping the interactions between Cpu, [Io] and [Memory] implementations. Read more
fn is_past_limit(&self, limit: <VFrameTsCounter<V, C> as Clock>::Limit) -> bool
[src]
fn add_irq(&mut self, _pc: u16) -> <VFrameTsCounter<V, C> as Clock>::Timestamp
[src]
fn add_no_mreq(&mut self, address: u16, add_ts: NonZeroU8)
[src]
fn add_m1(
&mut self,
address: u16
) -> <VFrameTsCounter<V, C> as Clock>::Timestamp
[src]
&mut self,
address: u16
) -> <VFrameTsCounter<V, C> as Clock>::Timestamp
fn add_mreq(
&mut self,
address: u16
) -> <VFrameTsCounter<V, C> as Clock>::Timestamp
[src]
&mut self,
address: u16
) -> <VFrameTsCounter<V, C> as Clock>::Timestamp
fn add_io(&mut self, port: u16) -> <VFrameTsCounter<V, C> as Clock>::Timestamp
[src]
fn add_wait_states(&mut self, _bus: u16, wait_states: NonZeroU16)
[src]
fn as_timestamp(&self) -> <VFrameTsCounter<V, C> as Clock>::Timestamp
[src]
impl<V, C> Clone for VFrameTsCounter<V, C> where
C: Clone,
V: Clone,
[src]
C: Clone,
V: Clone,
fn clone(&self) -> VFrameTsCounter<V, C>
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl<V, C> Copy for VFrameTsCounter<V, C> where
C: Copy,
V: Copy,
[src]
C: Copy,
V: Copy,
impl<V, C> Debug for VFrameTsCounter<V, C> where
C: Debug,
V: Debug,
[src]
C: Debug,
V: Debug,
impl<V, C> Deref for VFrameTsCounter<V, C>
[src]
type Target = VFrameTs<V>
The resulting type after dereferencing.
fn deref(&self) -> &<VFrameTsCounter<V, C> as Deref>::Target
[src]
impl<V, C> DerefMut for VFrameTsCounter<V, C>
[src]
fn deref_mut(&mut self) -> &mut <VFrameTsCounter<V, C> as Deref>::Target
[src]
impl<V, C> Eq for VFrameTsCounter<V, C> where
C: Eq,
V: Eq,
[src]
C: Eq,
V: Eq,
impl<V, C> From<VFrameTsCounter<V, C>> for VFrameTs<V>
[src]
fn from(vftsc: VFrameTsCounter<V, C>) -> VFrameTs<V>
[src]
impl<V, C> From<VFrameTsCounter<V, C>> for VideoTs
[src]
fn from(vftsc: VFrameTsCounter<V, C>) -> VideoTs
[src]
impl<V, C> Hash for VFrameTsCounter<V, C> where
C: Hash,
V: Hash,
[src]
C: Hash,
V: Hash,
fn hash<__H>(&self, state: &mut __H) where
__H: Hasher,
[src]
__H: Hasher,
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
impl<V, C> Ord for VFrameTsCounter<V, C> where
C: Ord,
V: Ord,
[src]
C: Ord,
V: Ord,
fn cmp(&self, other: &VFrameTsCounter<V, C>) -> Ordering
[src]
#[must_use]fn max(self, other: Self) -> Self
1.21.0[src]
#[must_use]fn min(self, other: Self) -> Self
1.21.0[src]
#[must_use]fn clamp(self, min: Self, max: Self) -> Self
[src]
impl<V, C> PartialEq<VFrameTsCounter<V, C>> for VFrameTsCounter<V, C> where
C: PartialEq<C>,
V: PartialEq<V>,
[src]
C: PartialEq<C>,
V: PartialEq<V>,
fn eq(&self, other: &VFrameTsCounter<V, C>) -> bool
[src]
fn ne(&self, other: &VFrameTsCounter<V, C>) -> bool
[src]
impl<V, C> PartialOrd<VFrameTsCounter<V, C>> for VFrameTsCounter<V, C> where
C: PartialOrd<C>,
V: PartialOrd<V>,
[src]
C: PartialOrd<C>,
V: PartialOrd<V>,
fn partial_cmp(&self, other: &VFrameTsCounter<V, C>) -> Option<Ordering>
[src]
fn lt(&self, other: &VFrameTsCounter<V, C>) -> bool
[src]
fn le(&self, other: &VFrameTsCounter<V, C>) -> bool
[src]
fn gt(&self, other: &VFrameTsCounter<V, C>) -> bool
[src]
fn ge(&self, other: &VFrameTsCounter<V, C>) -> bool
[src]
impl<V, C> StructuralEq for VFrameTsCounter<V, C>
[src]
impl<V, C> StructuralPartialEq for VFrameTsCounter<V, C>
[src]
impl<V, C> SubAssign<u32> for VFrameTsCounter<V, C> where
V: VideoFrame,
[src]
V: VideoFrame,
fn sub_assign(&mut self, delta: u32)
[src]
Auto Trait Implementations
impl<V, C> RefUnwindSafe for VFrameTsCounter<V, C> where
C: RefUnwindSafe,
V: RefUnwindSafe,
C: RefUnwindSafe,
V: RefUnwindSafe,
impl<V, C> Send for VFrameTsCounter<V, C> where
C: Send,
V: Send,
C: Send,
V: Send,
impl<V, C> Sync for VFrameTsCounter<V, C> where
C: Sync,
V: Sync,
C: Sync,
V: Sync,
impl<V, C> Unpin for VFrameTsCounter<V, C> where
C: Unpin,
V: Unpin,
C: Unpin,
V: Unpin,
impl<V, C> UnwindSafe for VFrameTsCounter<V, C> where
C: UnwindSafe,
V: UnwindSafe,
C: UnwindSafe,
V: UnwindSafe,
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<S, T> IntoSample<S> for T where
S: FromSample<T>,
[src]
S: FromSample<T>,
fn into_sample(self) -> S
[src]
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>,