[−][src]Struct spectrusty_core::clock::VFrameTsCounter
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]
V: VideoFrame,
C: MemoryContention,
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]
pub fn add_assign(&mut self, delta: u32)
[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
pub fn is_past_limit(&self, limit: Self::Limit) -> bool
[src]
pub fn add_irq(&mut self, _pc: u16) -> Self::Timestamp
[src]
pub fn add_no_mreq(&mut self, address: u16, add_ts: NonZeroU8)
[src]
pub fn add_m1(&mut self, address: u16) -> Self::Timestamp
[src]
pub fn add_mreq(&mut self, address: u16) -> Self::Timestamp
[src]
pub fn add_io(&mut self, port: u16) -> Self::Timestamp
[src]
pub fn add_wait_states(&mut self, _bus: u16, wait_states: NonZeroU16)
[src]
pub fn as_timestamp(&self) -> Self::Timestamp
[src]
impl<V: Clone, C: Clone> Clone for VFrameTsCounter<V, C>
[src]
pub fn clone(&self) -> VFrameTsCounter<V, C>
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[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.
pub fn deref(&self) -> &Self::Target
[src]
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]
pub fn from(vftsc: VFrameTsCounter<V, C>) -> VideoTs
[src]
impl<V, C> From<VFrameTsCounter<V, C>> for VFrameTs<V>
[src]
pub fn from(vftsc: VFrameTsCounter<V, C>) -> VFrameTs<V>
[src]
impl<V: Hash, C: Hash> Hash for VFrameTsCounter<V, C>
[src]
pub fn hash<__H: Hasher>(&self, state: &mut __H)
[src]
pub fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
impl<V: Ord, C: Ord> Ord for VFrameTsCounter<V, C>
[src]
pub fn cmp(&self, other: &VFrameTsCounter<V, C>) -> Ordering
[src]
#[must_use]pub fn max(self, other: Self) -> Self
1.21.0[src]
#[must_use]pub fn min(self, other: Self) -> Self
1.21.0[src]
#[must_use]pub fn clamp(self, min: Self, max: Self) -> Self
1.50.0[src]
impl<V: PartialEq, C: PartialEq> PartialEq<VFrameTsCounter<V, C>> for VFrameTsCounter<V, C>
[src]
pub fn eq(&self, other: &VFrameTsCounter<V, C>) -> bool
[src]
pub fn ne(&self, other: &VFrameTsCounter<V, C>) -> bool
[src]
impl<V: PartialOrd, C: PartialOrd> PartialOrd<VFrameTsCounter<V, C>> for VFrameTsCounter<V, C>
[src]
pub fn partial_cmp(&self, other: &VFrameTsCounter<V, C>) -> Option<Ordering>
[src]
pub fn lt(&self, other: &VFrameTsCounter<V, C>) -> bool
[src]
pub fn le(&self, other: &VFrameTsCounter<V, C>) -> bool
[src]
pub fn gt(&self, other: &VFrameTsCounter<V, C>) -> bool
[src]
pub 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: VideoFrame, C> SubAssign<u32> for VFrameTsCounter<V, C>
[src]
pub fn sub_assign(&mut self, delta: u32)
[src]
Auto Trait Implementations
impl<V, C> RefUnwindSafe for VFrameTsCounter<V, C> where
C: RefUnwindSafe,
V: RefUnwindSafe,
[src]
C: RefUnwindSafe,
V: RefUnwindSafe,
impl<V, C> Send for VFrameTsCounter<V, C> where
C: Send,
V: Send,
[src]
C: Send,
V: Send,
impl<V, C> Sync for VFrameTsCounter<V, C> where
C: Sync,
V: Sync,
[src]
C: Sync,
V: Sync,
impl<V, C> Unpin for VFrameTsCounter<V, C> where
C: Unpin,
V: Unpin,
[src]
C: Unpin,
V: Unpin,
impl<V, C> UnwindSafe for VFrameTsCounter<V, C> where
C: UnwindSafe,
V: UnwindSafe,
[src]
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,
pub 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<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub 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.
pub 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>,