[][src]Trait spectrusty::video::VideoFrame

pub trait VideoFrame: Copy + Debug {
    type BorderHtsIter: Iterator;

    pub const HTS_RANGE: Range<i16>;
    pub const HTS_COUNT: i16;
    pub const VSL_BORDER_TOP: i16;
    pub const VSL_PIXELS: Range<i16>;
    pub const VSL_BORDER_BOT: i16;
    pub const VSL_COUNT: i16;
    pub const FRAME_TSTATES_COUNT: i32;

    pub fn border_whole_line_hts_iter(
        border_size: BorderSize
    ) -> Self::BorderHtsIter;
pub fn border_left_hts_iter(border_size: BorderSize) -> Self::BorderHtsIter;
pub fn border_right_hts_iter(border_size: BorderSize) -> Self::BorderHtsIter;
pub fn contention(hc: i16) -> i16; pub fn border_size_pixels(border_size: BorderSize) -> u32 { ... }
pub fn screen_size_pixels(border_size: BorderSize) -> (u32, u32) { ... }
pub fn border_top_vsl_iter(border_size: BorderSize) -> Range<i16> { ... }
pub fn border_bot_vsl_iter(border_size: BorderSize) -> Range<i16> { ... }
pub fn floating_bus_offset(_hc: i16) -> Option<u16> { ... }
pub fn floating_bus_screen_address(VideoTs) -> Option<u16> { ... }
pub fn snow_interference_coords(_ts: VideoTs) -> Option<CellCoords> { ... }
pub fn is_contended_line_mreq(vsl: i16) -> bool { ... }
pub fn is_contended_line_no_mreq(vsl: i16) -> bool { ... }
pub fn vc_hc_to_tstates(vc: i16, hc: i16) -> i32 { ... } }

A collection of static methods and constants related to video parameters.

                              - 0
    +-------------------------+ VSL_BORDER_TOP
    |                         |
    |  +-------------------+  | -
    |  |                   |  | |
    |  |                   |  |  
    |  |                   |  | VSL_PIXELS
    |  |                   |  |  
    |  |                   |  | |
    |  +-------------------+  | -
    |                         |
    +-------------------------+ VSL_BORDER_BOT
                              - VSL_COUNT
|----- 0 -- HTS_RANGE ---------|
|           HTS_COUNT          |

Associated Types

type BorderHtsIter: Iterator[src]

An iterator for rendering borders.

Loading content...

Associated Constants

pub const HTS_RANGE: Range<i16>[src]

A range of horizontal T-states, 0 should be where the frame starts.

pub const HTS_COUNT: i16[src]

The number of horizontal T-states.

pub const VSL_BORDER_TOP: i16[src]

The first visible video scan line index of the top border.

pub const VSL_PIXELS: Range<i16>[src]

A range of video scan line indexes where pixel data is being drawn.

pub const VSL_BORDER_BOT: i16[src]

The last visible video scan line index of the bottom border.

pub const VSL_COUNT: i16[src]

The total number of video scan lines including the beam retrace.

pub const FRAME_TSTATES_COUNT: i32[src]

The total number of T-states per frame.

Loading content...

Required methods

pub fn border_whole_line_hts_iter(
    border_size: BorderSize
) -> Self::BorderHtsIter
[src]

Returns an iterator of border latch horizontal T-states.

pub fn border_left_hts_iter(border_size: BorderSize) -> Self::BorderHtsIter[src]

Returns an iterator of left border latch horizontal T-states.

pub fn border_right_hts_iter(border_size: BorderSize) -> Self::BorderHtsIter[src]

Returns an iterator of right border latch horizontal T-states.

pub fn contention(hc: i16) -> i16[src]

Returns a horizontal T-state counter after adding an additional T-states required for emulating a memory contention, while rendering lines that require reading video memory.

Loading content...

Provided methods

pub fn border_size_pixels(border_size: BorderSize) -> u32[src]

A rendered screen border size in pixels depending on the border size selection.

NOTE: The upper and lower border size may be lower than the value returned here e.g. in the NTSC video frame.

pub fn screen_size_pixels(border_size: BorderSize) -> (u32, u32)[src]

Returns output screen pixel size (horizontal, vertical), including the border area, measured in low-resolution pixels.

The size depends on the given border_size.

pub fn border_top_vsl_iter(border_size: BorderSize) -> Range<i16>[src]

Returns an iterator of the top border low-resolution scan line indexes.

pub fn border_bot_vsl_iter(border_size: BorderSize) -> Range<i16>[src]

Returns an iterator of the bottom border low-resolution scan line indexes.

pub fn floating_bus_offset(_hc: i16) -> Option<u16>[src]

Returns an optional floating bus horizontal offset for the given horizontal timestamp.

pub fn floating_bus_screen_address(VideoTs) -> Option<u16>[src]

Returns an optional floating bus screen address (in the screen address space) for the given timestamp.

The returned screen address range is: [0x0000, 0x1B00).

pub fn snow_interference_coords(_ts: VideoTs) -> Option<CellCoords>[src]

Returns an optional cell coordinates of a "snow effect" interference.

pub fn is_contended_line_mreq(vsl: i16) -> bool[src]

Returns true if the given scan line index is contended for MREQ (memory request) access.

This indicates if the contention should be applied during the indicated video scan line.

pub fn is_contended_line_no_mreq(vsl: i16) -> bool[src]

Returns true if the given scan line index is contended for other than MREQ (memory request) access.

This indicates if the contention should be applied during the indicated video scan line. Other accesses include IORQ and instruction cycles not requiring memory access.

pub fn vc_hc_to_tstates(vc: i16, hc: i16) -> i32[src]

Converts video scan line and horizontal T-state counters to the frame T-state count without any normalization.

Loading content...

Implementors

impl VideoFrame for Ula3VidFrame[src]

pub const HTS_RANGE: Range<Ts>[src]

A range of horizontal T-states, 0 should be where the frame starts.

pub const VSL_BORDER_TOP: Ts[src]

The first video scan line index of the top border.

pub const VSL_PIXELS: Range<Ts>[src]

A range of video scan line indexes for the pixel area.

pub const VSL_BORDER_BOT: Ts[src]

The last video scan line index of the bottom border.

pub const VSL_COUNT: Ts[src]

A total number of video scan lines.

type BorderHtsIter = StepBy<Range<Ts>>

impl VideoFrame for Ula128VidFrame[src]

pub const HTS_RANGE: Range<Ts>[src]

A range of horizontal T-states, 0 should be where the frame starts.

pub const VSL_BORDER_TOP: Ts[src]

The first video scan line index of the top border.

pub const VSL_PIXELS: Range<Ts>[src]

A range of video scan line indexes for the pixel area.

pub const VSL_BORDER_BOT: Ts[src]

The last video scan line index of the bottom border.

pub const VSL_COUNT: Ts[src]

A total number of video scan lines.

type BorderHtsIter = StepBy<Range<Ts>>

impl VideoFrame for UlaNTSCVidFrame[src]

pub const HTS_RANGE: Range<Ts>[src]

A range of horizontal T-states, 0 should be when the frame starts.

pub const VSL_BORDER_TOP: Ts[src]

The first video scan line index of the top border.

pub const VSL_PIXELS: Range<Ts>[src]

A range of video scan line indexes for the pixel area.

pub const VSL_BORDER_BOT: Ts[src]

The last video scan line index of the bottom border.

pub const VSL_COUNT: Ts[src]

A total number of video scan lines.

type BorderHtsIter = StepBy<Range<Ts>>

impl VideoFrame for UlaVideoFrame[src]

pub const HTS_RANGE: Range<Ts>[src]

A range of horizontal T-states, 0 should be when the frame starts.

pub const VSL_BORDER_TOP: Ts[src]

The first video scan line index of the top border.

pub const VSL_PIXELS: Range<Ts>[src]

A range of video scan line indexes for the pixel area.

pub const VSL_BORDER_BOT: Ts[src]

The last video scan line index of the bottom border.

pub const VSL_COUNT: Ts[src]

A total number of video scan lines.

type BorderHtsIter = StepBy<Range<Ts>>

Loading content...