pub trait VideoFrame: Copy + Debug {
type BorderHtsIter: Iterator<Item = Ts>;
const HTS_RANGE: Range<Ts>;
const VSL_BORDER_TOP: Ts;
const VSL_PIXELS: Range<Ts>;
const VSL_BORDER_BOT: Ts;
const VSL_COUNT: Ts;
const HTS_COUNT: Ts = _;
const FRAME_TSTATES_COUNT: FTs = _;
Show 14 methods
// Required methods
fn border_whole_line_hts_iter(
border_size: BorderSize,
) -> Self::BorderHtsIter;
fn border_left_hts_iter(border_size: BorderSize) -> Self::BorderHtsIter;
fn border_right_hts_iter(border_size: BorderSize) -> Self::BorderHtsIter;
fn contention(hc: Ts) -> Ts;
// Provided methods
fn border_size_pixels(border_size: BorderSize) -> u32 { ... }
fn screen_size_pixels(border_size: BorderSize) -> (u32, u32) { ... }
fn border_top_vsl_iter(border_size: BorderSize) -> Range<Ts> { ... }
fn border_bot_vsl_iter(border_size: BorderSize) -> Range<Ts> { ... }
fn floating_bus_offset(_hc: Ts) -> Option<u16> { ... }
fn floating_bus_screen_address(_: VideoTs) -> Option<u16> { ... }
fn snow_interference_coords(_ts: VideoTs) -> Option<CellCoords> { ... }
fn is_contended_line_mreq(vsl: Ts) -> bool { ... }
fn is_contended_line_no_mreq(vsl: Ts) -> bool { ... }
fn vc_hc_to_tstates(vc: Ts, hc: Ts) -> FTs { ... }
}Expand description
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 |Required Associated Constants§
Sourceconst VSL_BORDER_TOP: Ts
const VSL_BORDER_TOP: Ts
The first visible video scan line index of the top border.
Sourceconst VSL_PIXELS: Range<Ts>
const VSL_PIXELS: Range<Ts>
A range of video scan line indexes where pixel data is being drawn.
Sourceconst VSL_BORDER_BOT: Ts
const VSL_BORDER_BOT: Ts
The last visible video scan line index of the bottom border.
Provided Associated Constants§
Sourceconst FRAME_TSTATES_COUNT: FTs = _
const FRAME_TSTATES_COUNT: FTs = _
The total number of T-states per frame.
Required Associated Types§
Sourcetype BorderHtsIter: Iterator<Item = Ts>
type BorderHtsIter: Iterator<Item = Ts>
An iterator for rendering borders.
Required Methods§
Sourcefn border_whole_line_hts_iter(border_size: BorderSize) -> Self::BorderHtsIter
fn border_whole_line_hts_iter(border_size: BorderSize) -> Self::BorderHtsIter
Returns an iterator of border latch horizontal T-states.
Sourcefn border_left_hts_iter(border_size: BorderSize) -> Self::BorderHtsIter
fn border_left_hts_iter(border_size: BorderSize) -> Self::BorderHtsIter
Returns an iterator of left border latch horizontal T-states.
Sourcefn border_right_hts_iter(border_size: BorderSize) -> Self::BorderHtsIter
fn border_right_hts_iter(border_size: BorderSize) -> Self::BorderHtsIter
Returns an iterator of right border latch horizontal T-states.
Sourcefn contention(hc: Ts) -> Ts
fn contention(hc: Ts) -> Ts
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.
Provided Methods§
Sourcefn border_size_pixels(border_size: BorderSize) -> u32
fn border_size_pixels(border_size: BorderSize) -> u32
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.
Sourcefn screen_size_pixels(border_size: BorderSize) -> (u32, u32)
fn screen_size_pixels(border_size: BorderSize) -> (u32, u32)
Returns output screen pixel size (horizontal, vertical), including the border area, measured in low-resolution pixels.
The size depends on the given border_size.
Sourcefn border_top_vsl_iter(border_size: BorderSize) -> Range<Ts>
fn border_top_vsl_iter(border_size: BorderSize) -> Range<Ts>
Returns an iterator of the top border low-resolution scan line indexes.
Sourcefn border_bot_vsl_iter(border_size: BorderSize) -> Range<Ts>
fn border_bot_vsl_iter(border_size: BorderSize) -> Range<Ts>
Returns an iterator of the bottom border low-resolution scan line indexes.
Sourcefn floating_bus_offset(_hc: Ts) -> Option<u16>
fn floating_bus_offset(_hc: Ts) -> Option<u16>
Returns an optional floating bus horizontal offset for the given horizontal timestamp.
Sourcefn floating_bus_screen_address(_: VideoTs) -> Option<u16>
fn floating_bus_screen_address(_: VideoTs) -> Option<u16>
Returns an optional floating bus screen address (in the screen address space) for the given timestamp.
The returned screen address range is: [0x0000, 0x1B00).
Sourcefn snow_interference_coords(_ts: VideoTs) -> Option<CellCoords>
fn snow_interference_coords(_ts: VideoTs) -> Option<CellCoords>
Returns an optional cell coordinates of a “snow effect” interference.
Sourcefn is_contended_line_mreq(vsl: Ts) -> bool
fn is_contended_line_mreq(vsl: Ts) -> bool
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.
Sourcefn is_contended_line_no_mreq(vsl: Ts) -> bool
fn is_contended_line_no_mreq(vsl: Ts) -> bool
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.
Sourcefn vc_hc_to_tstates(vc: Ts, hc: Ts) -> FTs
fn vc_hc_to_tstates(vc: Ts, hc: Ts) -> FTs
Converts video scan line and horizontal T-state counters to the frame T-state count without any normalization.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.