[][src]Struct spectrusty_core::clock::VFrameTsCounter

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

A generic VFrameTs<V> based T-states counter.

Implements Clock for counting cycles when code is being executed by z80emu::Cpu.

Inserts additional T-states according to the contention model specified by generic parameters: V: VideoFrame and C: MemoryContention.

Fields

vts: VFrameTs<V>

The current value of the counter.

contention: C

An instance implementing a MemoryContention trait.

Implementations

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

pub fn new(vc: Ts, hc: Ts, contention: C) -> Self[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: FTs, contention: C) -> Self[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) -> Self[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) -> Self[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>>

pub const EOF: VFrameTs<V>[src]

pub fn wrap_frame(&mut self)[src]

Ensures the vertical counter is in the range: (-VSL_COUNT, VSL_COUNT) by calculating a remainder of the division of the vertical counter by VideoFrame::VSL_COUNT.

Methods from Deref<Target = VideoTs>

Trait Implementations

impl<V: VideoFrame, C> AddAssign<u32> for VFrameTsCounter<V, C>[src]

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

type Limit = Ts

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: Clone, C: Clone> Clone for VFrameTsCounter<V, C>[src]

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

impl<V: Debug, C: Debug> Debug for VFrameTsCounter<V, C>[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: Eq, C: Eq> Eq for VFrameTsCounter<V, C>[src]

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

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

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

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

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

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

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

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

impl<V: VideoFrame, C> SubAssign<u32> for VFrameTsCounter<V, C>[src]

Auto Trait Implementations

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

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

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

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

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

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<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.