[][src]Struct spectrusty::chip::ula::frame_cache::UlaFrameCache

pub struct UlaFrameCache<V> {
    pub frame_pixels: [(u32, [u8; 32]); 192],
    pub frame_colors: [(u32, [u8; 32]); 192],
    pub frame_colors_coarse: [(u32, [u8; 32]); 24],
    // some fields omitted
}

Spectrum's video data frame cache.

When a byte is being written to the video memory and the video beam position has already passed the referenced screen cell, the cell value is being cached from memory before the data in memory is being modified.

The caching is performed only once per frame for each potential cell so subsequent writes to the same memory address won't modify the cached cell value.

When a screen is being drawn the data stored in cache will override any value currently residing in video memory.

Fields

frame_pixels: [(u32, [u8; 32]); 192]frame_colors: [(u32, [u8; 32]); 192]frame_colors_coarse: [(u32, [u8; 32]); 24]

Implementations

impl<V> UlaFrameCache<V>[src]

pub fn clear(&mut self)[src]

impl<V: VideoFrame> UlaFrameCache<V>[src]

pub fn update_frame_pixels<M: ZxMemory>(
    &mut self,
    memory: &M,
    CellCoords { column, row }: CellCoords,
    addr: u16,
    ts: VideoTs
)
[src]

Compares the given bitmap cell coordinates with the video timestamp and depending on the result of that comparison caches (or not) the bitmap cell with the value from the memory at the given address.

pub fn update_frame_colors<M: ZxMemory>(
    &mut self,
    memory: &M,
    CellCoords { column, row }: CellCoords,
    addr: u16,
    ts: VideoTs
)
[src]

Compares the given attribute cell coordinates with the video timestamp and depending on the result of that comparison caches (or not) the attribute cell or cells with the value from the memory at the given address.

pub fn apply_snow_interference(
    &mut self,
    screen: &ScreenArray,
    CellCoords { column, row }: CellCoords,
    snow: u8
)
[src]

Caches the bitmap and attribute cell at the given coordinates with the snow distortion applied.

Trait Implementations

impl<V: Clone> Clone for UlaFrameCache<V>[src]

impl<V> Debug for UlaFrameCache<V>[src]

impl<V> Default for UlaFrameCache<V>[src]

Auto Trait Implementations

impl<V> RefUnwindSafe for UlaFrameCache<V> where
    V: RefUnwindSafe
[src]

impl<V> Send for UlaFrameCache<V> where
    V: Send
[src]

impl<V> Sync for UlaFrameCache<V> where
    V: Sync
[src]

impl<V> Unpin for UlaFrameCache<V> where
    V: Unpin
[src]

impl<V> UnwindSafe for UlaFrameCache<V> where
    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> Conv for T

impl<T> Conv for T

impl<T> FmtForward for T

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> Pipe for T where
    T: ?Sized

impl<T> Pipe for T

impl<T> PipeAsRef for T

impl<T> PipeBorrow for T

impl<T> PipeDeref for T

impl<T> PipeRef for T

impl<T> Tap for T

impl<T> Tap for T

impl<T, U> TapAsRef<U> for T where
    U: ?Sized

impl<T, U> TapBorrow<U> for T where
    U: ?Sized

impl<T> TapDeref for T

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

type Owned = T

The resulting type after obtaining ownership.

impl<T> TryConv for T

impl<T> TryConv for T

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