[][src]Struct spectrusty::clock::VFrameTsCounter

pub struct VFrameTsCounter<V, C> {
    pub vts: VFrameTs<V>,
    pub contention: C,
}

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]

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]

impl<V, C> Clock for VFrameTsCounter<V, C> where
    C: MemoryContention,
    V: VideoFrame
[src]

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

impl<V, C> Clone for VFrameTsCounter<V, C> where
    C: Clone,
    V: Clone
[src]

impl<V, C> Copy for VFrameTsCounter<V, C> where
    C: Copy,
    V: Copy
[src]

impl<V, C> Debug for VFrameTsCounter<V, C> where
    C: Debug,
    V: Debug
[src]

impl<V, C> Deref for VFrameTsCounter<V, C>[src]

type Target = VFrameTs<V>

The resulting type after dereferencing.

impl<V, C> DerefMut for VFrameTsCounter<V, C>[src]

impl<V, C> Eq for VFrameTsCounter<V, C> where
    C: Eq,
    V: Eq
[src]

impl<V, C> From<VFrameTsCounter<V, C>> for VFrameTs<V>[src]

impl<V, C> From<VFrameTsCounter<V, C>> for VideoTs[src]

impl<V, C> Hash for VFrameTsCounter<V, C> where
    C: Hash,
    V: Hash
[src]

impl<V, C> Ord for VFrameTsCounter<V, C> where
    C: Ord,
    V: Ord
[src]

impl<V, C> PartialEq<VFrameTsCounter<V, C>> for VFrameTsCounter<V, C> where
    C: PartialEq<C>,
    V: PartialEq<V>, 
[src]

impl<V, C> PartialOrd<VFrameTsCounter<V, C>> for VFrameTsCounter<V, C> where
    C: PartialOrd<C>,
    V: PartialOrd<V>, 
[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]

Auto Trait Implementations

impl<V, C> RefUnwindSafe for VFrameTsCounter<V, C> where
    C: RefUnwindSafe,
    V: RefUnwindSafe

impl<V, C> Send for VFrameTsCounter<V, C> where
    C: Send,
    V: Send

impl<V, C> Sync for VFrameTsCounter<V, C> where
    C: Sync,
    V: Sync

impl<V, C> Unpin for VFrameTsCounter<V, C> where
    C: Unpin,
    V: Unpin

impl<V, C> UnwindSafe for VFrameTsCounter<V, C> where
    C: UnwindSafe,
    V: UnwindSafe

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<S, T> IntoSample<S> for T where
    S: FromSample<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,