Struct spectrusty::chip::ula::Ula
source · pub struct Ula<M, B, X, V> { /* private fields */ }
Expand description
Generic 16k/48k Ferranti ULA (Uncommitted Logic Array).
M
- ZxMemoryB
- BusDeviceX
- MemoryExtensionV
- VideoFrame
The type used for <B as BusDevice>::Timestamp
should at least
satisfy the condition: From<VFrameTs<V>>
.
Trait Implementations§
source§impl<A, M, B, X, V> AudioFrame<A> for Ula<M, B, X, V>where
A: Blep,
V: VideoFrame,
impl<A, M, B, X, V> AudioFrame<A> for Ula<M, B, X, V>where
A: Blep,
V: VideoFrame,
source§fn get_audio_frame_end_time(&self) -> FTs
fn get_audio_frame_end_time(&self) -> FTs
source§fn end_audio_frame(&self, blep: &mut B) -> usize
fn end_audio_frame(&self, blep: &mut B) -> usize
Calls Blep::end_frame to finalize the frame and prepare it for rendition. Read more
source§impl<B, M, D, X, V> AyAudioFrame<B> for Ula<M, D, X, V>where
B: Blep,
D: AyAudioBusDevice + BusDevice,
D::Timestamp: From<VFrameTs<V>>,
V: VideoFrame,
impl<B, M, D, X, V> AyAudioFrame<B> for Ula<M, D, X, V>where
B: Blep,
D: AyAudioBusDevice + BusDevice,
D::Timestamp: From<VFrameTs<V>>,
V: VideoFrame,
source§fn render_ay_audio_frame<L: AmpLevels<B::SampleDelta>>(
&mut self,
blep: &mut B,
chans: [usize; 3]
)
fn render_ay_audio_frame<L: AmpLevels<B::SampleDelta>>(
&mut self,
blep: &mut B,
chans: [usize; 3]
)
source§impl<M, B, X, V> ControlUnit for Ula<M, B, X, V>where
M: ZxMemory,
B: BusDevice,
B::Timestamp: From<VFrameTs<V>>,
X: MemoryExtension,
V: VideoFrame,
impl<M, B, X, V> ControlUnit for Ula<M, B, X, V>where
M: ZxMemory,
B: BusDevice,
B::Timestamp: From<VFrameTs<V>>,
X: MemoryExtension,
V: VideoFrame,
§type BusDevice = B
type BusDevice = B
A type of a chain of emulated peripheral devices should be declared here. Read more
source§fn bus_device_mut(&mut self) -> &mut Self::BusDevice
fn bus_device_mut(&mut self) -> &mut Self::BusDevice
Returns a mutable reference to the instance of the first bus device in the device chain.
source§fn bus_device_ref(&self) -> &Self::BusDevice
fn bus_device_ref(&self) -> &Self::BusDevice
Returns a reference to the the instance of the first bus device in the device chain.
source§fn into_bus_device(self) -> Self::BusDevice
fn into_bus_device(self) -> Self::BusDevice
Destructs self and returns the instance of the bus device.
source§fn nmi<C: Cpu>(&mut self, cpu: &mut C) -> bool
fn nmi<C: Cpu>(&mut self, cpu: &mut C) -> bool
Triggers a non-maskable interrupt. Returns
true
if NMI was accepted. Read moresource§fn execute_next_frame<C: Cpu>(&mut self, cpu: &mut C)
fn execute_next_frame<C: Cpu>(&mut self, cpu: &mut C)
Conditionally prepares the internal state for the next frame and executes instructions on the
cpu
as fast as possible, until the near end of that frame. Read moresource§fn ensure_next_frame(&mut self)
fn ensure_next_frame(&mut self)
Conditionally prepares the internal state for the next frame, advances the frame counter, and wraps
the T-state counter if it is near the end of a frame. Read more
source§impl<M, B, X, V> Debug for Ula<M, B, X, V>where
M: ZxMemory,
B: BusDevice,
X: MemoryExtension,
V: VideoFrame,
impl<M, B, X, V> Debug for Ula<M, B, X, V>where
M: ZxMemory,
B: BusDevice,
X: MemoryExtension,
V: VideoFrame,
source§impl<'de, M, B, X, V> Deserialize<'de> for Ula<M, B, X, V>where
V: VideoFrame + Default,
M: Deserialize<'de>,
B: Deserialize<'de>,
X: Deserialize<'de>,
impl<'de, M, B, X, V> Deserialize<'de> for Ula<M, B, X, V>where
V: VideoFrame + Default,
M: Deserialize<'de>,
B: Deserialize<'de>,
X: Deserialize<'de>,
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl<M, B, X, V> EarIn for Ula<M, B, X, V>where
V: VideoFrame,
impl<M, B, X, V> EarIn for Ula<M, B, X, V>where
V: VideoFrame,
source§fn feed_ear_in<I>(&mut self, fts_deltas: I, max_frames_threshold: Option<usize>)where
I: Iterator<Item = NonZeroU32>,
fn feed_ear_in<I>(&mut self, fts_deltas: I, max_frames_threshold: Option<usize>)where
I: Iterator<Item = NonZeroU32>,
It’s most optimal to be done after ensure_next_frame is called, but is not necessary.
Panics
Panics if adding the delta would exceed the TsCounter max_value (Ts::max_value() as u32 * V::HTS_COUNT as u32).
source§fn set_ear_in(&mut self, ear_in: bool, delta_fts: u32)
fn set_ear_in(&mut self, ear_in: bool, delta_fts: u32)
Sets
EAR IN
bit state after the provided interval in ∆ T-states counted from the last recorded change.source§fn purge_ear_in_changes(&mut self, ear_in: bool)
fn purge_ear_in_changes(&mut self, ear_in: bool)
Removes all buffered so far
EAR IN
changes. Read moresource§fn read_ear_in_count(&self) -> u32
fn read_ear_in_count(&self) -> u32
Returns the counter of how many times the EAR input line was read since the beginning of the current frame. Read more
source§fn read_ear_mode(&self) -> ReadEarMode
fn read_ear_mode(&self) -> ReadEarMode
Returns the current mode.
source§fn set_read_ear_mode(&mut self, mode: ReadEarMode)
fn set_read_ear_mode(&mut self, mode: ReadEarMode)
Changes the current mode.
source§impl<A, M, B, X, V> EarInAudioFrame<A> for Ula<M, B, X, V>where
A: Blep,
V: VideoFrame,
impl<A, M, B, X, V> EarInAudioFrame<A> for Ula<M, B, X, V>where
A: Blep,
V: VideoFrame,
source§fn render_ear_in_audio_frame<L: AmpLevels<A::SampleDelta>>(
&self,
blep: &mut A,
channel: usize
)
fn render_ear_in_audio_frame<L: AmpLevels<A::SampleDelta>>(
&self,
blep: &mut A,
channel: usize
)
source§impl<A, M, B, X, V> EarMicOutAudioFrame<A> for Ula<M, B, X, V>where
A: Blep,
V: VideoFrame,
impl<A, M, B, X, V> EarMicOutAudioFrame<A> for Ula<M, B, X, V>where
A: Blep,
V: VideoFrame,
source§fn render_earmic_out_audio_frame<L: AmpLevels<A::SampleDelta>>(
&self,
blep: &mut A,
channel: usize
)
fn render_earmic_out_audio_frame<L: AmpLevels<A::SampleDelta>>(
&self,
blep: &mut A,
channel: usize
)
source§impl<M, B, X, V: VideoFrame> FrameState for Ula<M, B, X, V>
impl<M, B, X, V: VideoFrame> FrameState for Ula<M, B, X, V>
source§fn current_frame(&self) -> u64
fn current_frame(&self) -> u64
Returns the value of the current execution frame counter. The FrameState implementation should
count passing frames infinitely wrapping at 2^64. Read more
source§fn set_frame_counter(&mut self, fc: u64)
fn set_frame_counter(&mut self, fc: u64)
Sets the frame counter to the specified value.
source§fn frame_tstate(&self) -> (u64, FTs)
fn frame_tstate(&self) -> (u64, FTs)
Returns a normalized frame counter and a T-state counter as a tuple. Read more
source§fn current_tstate(&self) -> FTs
fn current_tstate(&self) -> FTs
Returns the current value of the T-state counter. Read more
source§fn set_frame_tstate(&mut self, ts: FTs)
fn set_frame_tstate(&mut self, ts: FTs)
Sets the T-state counter to the specified value modulo
<Self as Video>::FRAME_TSTATES_COUNT
.source§fn is_frame_over(&self) -> bool
fn is_frame_over(&self) -> bool
Returns
true
if the value of the current T-state counter has reached a certain arbitrary limit which
is very close to the maximum number of T-states per frame. Read moresource§impl<M: ZxMemory, B, X> HostConfig for Ula<M, B, X, UlaVideoFrame>
impl<M: ZxMemory, B, X> HostConfig for Ula<M, B, X, UlaVideoFrame>
source§const FRAME_TSTATES: FTs = 69_888i32
const FRAME_TSTATES: FTs = 69_888i32
The number of CPU cycles (T-states) in a single execution frame.
source§fn effective_cpu_rate(multiplier: f64) -> f64
fn effective_cpu_rate(multiplier: f64) -> f64
Returns the CPU rate (T-states / second) after multiplying it by the
multiplier
.source§fn effective_frame_duration_nanos(multiplier: f64) -> u32
fn effective_frame_duration_nanos(multiplier: f64) -> u32
Returns the duration of a single execution frame in nanoseconds after multiplying
the CPU rate by the
multiplier
. Read moresource§fn effective_frame_duration(multiplier: f64) -> Duration
fn effective_frame_duration(multiplier: f64) -> Duration
Returns the duration of a single execution frame after multiplying the CPU rate by
the
multiplier
. Read moresource§fn frame_duration_nanos() -> u32
fn frame_duration_nanos() -> u32
Returns the duration of a single execution frame in nanoseconds.
source§fn frame_duration() -> Duration
fn frame_duration() -> Duration
Returns the duration of a single execution frame.
source§impl<M, B, X, V> Io for Ula<M, B, X, V>where
M: ZxMemory,
B: BusDevice,
B::Timestamp: From<VFrameTs<V>>,
V: VideoFrame,
impl<M, B, X, V> Io for Ula<M, B, X, V>where
M: ZxMemory,
B: BusDevice,
B::Timestamp: From<VFrameTs<V>>,
V: VideoFrame,
§type Timestamp = VideoTs
type Timestamp = VideoTs
This type is being used for timestamping I/O operations. See also [Clock::Timestamp].
§type WrIoBreak = ()
type WrIoBreak = ()
A value of this type is returned when a break is being requested by [Io::write_io].
source§fn write_io(
&mut self,
port: u16,
data: u8,
ts: VideoTs
) -> (Option<()>, Option<NonZeroU16>)
fn write_io(
&mut self,
port: u16,
data: u8,
ts: VideoTs
) -> (Option<()>, Option<NonZeroU16>)
source§impl<M, B, X, V> KeyboardInterface for Ula<M, B, X, V>
impl<M, B, X, V> KeyboardInterface for Ula<M, B, X, V>
source§fn get_key_state(&self) -> ZXKeyboardMap
fn get_key_state(&self) -> ZXKeyboardMap
Reads the current state of the keyboard.
source§fn set_key_state(&mut self, keymap: ZXKeyboardMap)
fn set_key_state(&mut self, keymap: ZXKeyboardMap)
Sets the state of the keyboard.
source§impl<M, B, X, V> Memory for Ula<M, B, X, V>where
M: ZxMemory,
X: MemoryExtension,
V: VideoFrame,
impl<M, B, X, V> Memory for Ula<M, B, X, V>where
M: ZxMemory,
X: MemoryExtension,
V: VideoFrame,
§type Timestamp = VideoTs
type Timestamp = VideoTs
This type is being used for timestamping memory operations. See also [Clock::Timestamp].
source§fn read_debug(&self, addr: u16) -> u8
fn read_debug(&self, addr: u16) -> u8
Should return a single byte read from the memory present at the given
address
. Read moresource§fn read_mem(&self, addr: u16, _ts: VideoTs) -> u8
fn read_mem(&self, addr: u16, _ts: VideoTs) -> u8
Should return a single byte read from the memory present at the given
address
. Read moresource§fn read_mem16(&self, addr: u16, _ts: VideoTs) -> u16
fn read_mem16(&self, addr: u16, _ts: VideoTs) -> u16
Should return the unaligned, 2 consecutive bytes from the memory present at the given
address
as a 16-bit unsigned integer in a LE
(least significant byte first) order. Read moresource§impl<M, B, X, V> MemoryAccess for Ula<M, B, X, V>where
M: ZxMemory,
X: MemoryExtension,
impl<M, B, X, V> MemoryAccess for Ula<M, B, X, V>where
M: ZxMemory,
X: MemoryExtension,
type Memory = M
type MemoryExt = X
source§fn memory_ext_ref(&self) -> &Self::MemoryExt
fn memory_ext_ref(&self) -> &Self::MemoryExt
Returns a read-only reference to the memory extension.
source§fn memory_ext_mut(&mut self) -> &mut Self::MemoryExt
fn memory_ext_mut(&mut self) -> &mut Self::MemoryExt
Returns a mutable reference to the memory extension.
source§fn memory_mut(&mut self) -> &mut Self::Memory
fn memory_mut(&mut self) -> &mut Self::Memory
Returns a mutable reference to the memory.
source§fn memory_ref(&self) -> &Self::Memory
fn memory_ref(&self) -> &Self::Memory
Returns a reference to the memory.
source§fn memory_with_ext_mut(&mut self) -> (&mut Self::Memory, &mut Self::MemoryExt)
fn memory_with_ext_mut(&mut self) -> (&mut Self::Memory, &mut Self::MemoryExt)
Returns mutable references to both the memory and the memory extension.
source§impl<'a, M: 'a, B: 'a, X: 'a, F> MicOut<'a> for Ula<M, B, X, F>where
F: VideoFrame + 'a,
impl<'a, M: 'a, B: 'a, X: 'a, F> MicOut<'a> for Ula<M, B, X, F>where
F: VideoFrame + 'a,
type PulseIter = MicPulseIter<Iter<'a, VideoTsData2>, F>
source§fn mic_out_pulse_iter(&'a self) -> Self::PulseIter
fn mic_out_pulse_iter(&'a self) -> Self::PulseIter
Returns a frame buffered MIC output as a pulse iterator.
source§impl<M, B, X, V> ScreenDataProvider for Ula<M, B, X, V>where
M: ZxMemory,
X: MemoryExtension,
impl<M, B, X, V> ScreenDataProvider for Ula<M, B, X, V>where
M: ZxMemory,
X: MemoryExtension,
source§fn get_screen_mode(&self) -> ScrMode
fn get_screen_mode(&self) -> ScrMode
Should return a currently selected screen mode.
source§fn set_screen_mode(&mut self, mode: ScrMode) -> bool
fn set_screen_mode(&mut self, mode: ScrMode) -> bool
Should set a requested screen
mode
and return true
.
If the provided mode
can not be set this method should return false
. Read moresource§fn screen_primary_ref(&self) -> &ScreenArray
fn screen_primary_ref(&self) -> &ScreenArray
Should return a reference to the primary screen data.
source§fn screen_primary_mut(&mut self) -> &mut ScreenArray
fn screen_primary_mut(&mut self) -> &mut ScreenArray
Should return a mutable reference to the primary screen data.
source§fn screen_secondary_ref(&self) -> &[u8; 6912]
fn screen_secondary_ref(&self) -> &[u8; 6912]
Should return a reference to the secondary screen data. Read more
source§fn screen_secondary_mut(&mut self) -> &mut [u8; 6912]
fn screen_secondary_mut(&mut self) -> &mut [u8; 6912]
Should return a mutable reference to the secondary screen data. Read more
source§impl<M, B, X, V> Serialize for Ula<M, B, X, V>where
V: VideoFrame,
M: Serialize,
B: Serialize,
X: Serialize,
impl<M, B, X, V> Serialize for Ula<M, B, X, V>where
V: VideoFrame,
M: Serialize,
B: Serialize,
X: Serialize,
source§impl<M, B, X, V> UlaControl for Ula<M, B, X, V>
impl<M, B, X, V> UlaControl for Ula<M, B, X, V>
source§fn has_late_timings(&self) -> bool
fn has_late_timings(&self) -> bool
Returns the state of the “late timings” mode.
source§fn set_late_timings(&mut self, late_timings: bool)
fn set_late_timings(&mut self, late_timings: bool)
Sets the “late timings” mode on or off. Read more
source§fn ula128_mem_port_value(&self) -> Option<Ula128MemFlags>
fn ula128_mem_port_value(&self) -> Option<Ula128MemFlags>
Returns the last value sent to the memory port
0x7FFD
if supported.source§fn set_ula128_mem_port_value(&mut self, _value: Ula128MemFlags) -> bool
fn set_ula128_mem_port_value(&mut self, _value: Ula128MemFlags) -> bool
Sets the current value of the memory port
0x7FFD
. Returns true
if supported.
Otherwise, returns false
and no writing is performed. Read moresource§fn ula3_ctrl_port_value(&self) -> Option<Ula3CtrlFlags>
fn ula3_ctrl_port_value(&self) -> Option<Ula3CtrlFlags>
Returns the last value sent to the memory port
0x1FFD
if supported.source§fn set_ula3_ctrl_port_value(&mut self, _value: Ula3CtrlFlags) -> bool
fn set_ula3_ctrl_port_value(&mut self, _value: Ula3CtrlFlags) -> bool
Sets the current value of the memory port
0x1FFD
. Returns true
if supported.
Otherwise, returns false
and no writing is performed. Read moresource§fn scld_ctrl_port_value(&self) -> Option<ScldCtrlFlags>
fn scld_ctrl_port_value(&self) -> Option<ScldCtrlFlags>
Returns the last value sent to the memory port
0xFF
.source§fn set_scld_ctrl_port_value(&mut self, _value: ScldCtrlFlags) -> bool
fn set_scld_ctrl_port_value(&mut self, _value: ScldCtrlFlags) -> bool
Sets the current value of the memory port
0xFF
. Returns true
if supported.
Otherwise, returns false
and no writing is performed. Read moresource§fn scld_mmu_port_value(&self) -> Option<u8>
fn scld_mmu_port_value(&self) -> Option<u8>
Returns the last value sent to the memory port
0xF4
.source§fn set_scld_mmu_port_value(&mut self, _value: u8) -> bool
fn set_scld_mmu_port_value(&mut self, _value: u8) -> bool
Sets the current value of the memory port
0xF4
. Returns true
if supported.
Otherwise, returns false
and no writing is performed. Read moresource§fn ulaplus_reg_port_value(&self) -> Option<UlaPlusRegFlags>
fn ulaplus_reg_port_value(&self) -> Option<UlaPlusRegFlags>
Returns the last value sent to the register port
0xBF3B
.source§fn set_ulaplus_reg_port_value(&mut self, _value: UlaPlusRegFlags) -> bool
fn set_ulaplus_reg_port_value(&mut self, _value: UlaPlusRegFlags) -> bool
Sets the current value of the memory port
0xBF3B
. Returns true
if supported.
Otherwise, returns false
and no writing is performed. Read moresource§fn ulaplus_data_port_value(&self) -> Option<u8>
fn ulaplus_data_port_value(&self) -> Option<u8>
Returns the last value sent to the data port
0xFF3B
.source§impl<M, B, X, V> UlaControlExt for Ula<M, B, X, V>where
M: ZxMemory,
B: BusDevice,
B::Timestamp: From<VFrameTs<V>>,
V: VideoFrame,
impl<M, B, X, V> UlaControlExt for Ula<M, B, X, V>where
M: ZxMemory,
B: BusDevice,
B::Timestamp: From<VFrameTs<V>>,
V: VideoFrame,
source§fn prepare_next_frame<C: MemoryContention>(
&mut self,
vtsc: VFrameTsCounter<V, C>
) -> VFrameTsCounter<V, C>
fn prepare_next_frame<C: MemoryContention>(
&mut self,
vtsc: VFrameTsCounter<V, C>
) -> VFrameTsCounter<V, C>
This method is used by wrappers with a different contention scheme.
fn ensure_next_frame_vtsc(
&mut self
) -> VFrameTsCounter<Self::VideoFrame, Self::Contention>
source§impl<'a, M, B, X, V> UlaPlusInner<'a> for Ula<M, B, X, V>where
M: ZxMemory,
X: MemoryExtension,
V: VideoFrame,
impl<'a, M, B, X, V> UlaPlusInner<'a> for Ula<M, B, X, V>where
M: ZxMemory,
X: MemoryExtension,
V: VideoFrame,
type ScreenSwapIter = Empty<VideoTs>
source§fn is_ula_port(port: u16) -> bool
fn is_ula_port(port: u16) -> bool
Returns
true
if port
matches the ULA port.source§fn ula_write_earmic(&mut self, flags: UlaPortFlags, ts: VideoTs)
fn ula_write_earmic(&mut self, flags: UlaPortFlags, ts: VideoTs)
Sets the state of EarMic flags and optionally records an EarMic change.
source§fn push_screen_change(&mut self, _ts: VideoTs)
fn push_screen_change(&mut self, _ts: VideoTs)
Records a shadow screen swap.
source§fn update_last_border_color(&mut self, border: BorderColor) -> bool
fn update_last_border_color(&mut self, border: BorderColor) -> bool
Updates the border color, returns
true
if the border color has changed.source§fn page1_screen0_shadow_bank(&self) -> Option<bool>
fn page1_screen0_shadow_bank(&self) -> Option<bool>
Returns
Some(is_shadow)
if a screen memory is accessible at page address: 0x4000-0x5FFF.source§fn page1_screen1_shadow_bank(&self) -> Option<bool>
fn page1_screen1_shadow_bank(&self) -> Option<bool>
Returns
Some(is_shadow)
if a screen memory is accessible at page address: 0x6000-0x7FFF.source§fn page3_screen0_shadow_bank(&self) -> Option<bool>
fn page3_screen0_shadow_bank(&self) -> Option<bool>
Returns
Some(is_shadow)
if a screen memory is accessible at page address: 0xC000-0xDFFF.source§fn page3_screen1_shadow_bank(&self) -> Option<bool>
fn page3_screen1_shadow_bank(&self) -> Option<bool>
Returns
Some(is_shadow)
if a screen memory is accessible at page address: 0xE000-0xFFFF.source§fn frame_cache_mut_mem_ref(
&mut self
) -> (&mut UlaFrameCache<Self::VideoFrame>, &Self::Memory)
fn frame_cache_mut_mem_ref(
&mut self
) -> (&mut UlaFrameCache<Self::VideoFrame>, &Self::Memory)
Returns a mutable reference to the normal frame cache and a memory reference.
source§fn shadow_frame_cache_mut_mem_ref(
&mut self
) -> (&mut UlaFrameCache<Self::VideoFrame>, &Self::Memory)
fn shadow_frame_cache_mut_mem_ref(
&mut self
) -> (&mut UlaFrameCache<Self::VideoFrame>, &Self::Memory)
Returns a mutable reference to the shadow frame cache and a memory reference.
source§fn beg_screen_shadow(&self) -> bool
fn beg_screen_shadow(&self) -> bool
Returns true if the shadow screen is displayed at the beginning of the video frame.
source§fn cur_screen_shadow(&self) -> bool
fn cur_screen_shadow(&self) -> bool
Returns true if the shadow screen is currently being displayed.
source§fn video_render_data_view(
&mut self
) -> VideoRenderDataView<'_, Self::ScreenSwapIter, Self::Memory, Self::VideoFrame>
fn video_render_data_view(
&mut self
) -> VideoRenderDataView<'_, Self::ScreenSwapIter, Self::Memory, Self::VideoFrame>
Returns references to components necessary for video rendering.
source§impl<M: ZxMemory, D, X, V: VideoFrame> Video for Ula<M, D, X, V>
impl<M: ZxMemory, D, X, V: VideoFrame> Video for Ula<M, D, X, V>
§type VideoFrame = V
type VideoFrame = V
The type implementing VideoFrame, that is being used by the chipset emulator.
§type Contention = UlaMemoryContention
type Contention = UlaMemoryContention
The type implementing MemoryContention, that is being used by the chipset emulator.
source§fn border_color(&self) -> BorderColor
fn border_color(&self) -> BorderColor
Returns the current border color.
source§fn set_border_color(&mut self, border: BorderColor)
fn set_border_color(&mut self, border: BorderColor)
Force sets the border area to the given color.
source§fn render_video_frame<'a, B: PixelBuffer<'a>, P: Palette<Pixel = B::Pixel>>(
&mut self,
buffer: &'a mut [u8],
pitch: usize,
border_size: BorderSize
)
fn render_video_frame<'a, B: PixelBuffer<'a>, P: Palette<Pixel = B::Pixel>>(
&mut self,
buffer: &'a mut [u8],
pitch: usize,
border_size: BorderSize
)
Renders last emulated frame’s video data into the provided pixel
buffer
. Read moresource§fn current_video_ts(&self) -> VideoTs
fn current_video_ts(&self) -> VideoTs
Returns the current value of the video T-state counter.
source§fn current_video_clock(&self) -> VFrameTsCounter<V, UlaMemoryContention>
fn current_video_clock(&self) -> VFrameTsCounter<V, UlaMemoryContention>
Returns the current value of the video T-state clock.
source§fn set_video_ts(&mut self, vts: VideoTs)
fn set_video_ts(&mut self, vts: VideoTs)
Modifies the current value of the video T-state counter.
source§fn flash_state(&self) -> bool
fn flash_state(&self) -> bool
Returns the temporary video flash attribute state.
source§const PIXEL_DENSITY: u32 = 1u32
const PIXEL_DENSITY: u32 = 1u32
The horizontal pixel density. Read more
source§fn render_size_pixels(border_size: BorderSize) -> (u32, u32)
fn render_size_pixels(border_size: BorderSize) -> (u32, u32)
Returns rendered screen pixel size (horizontal, vertical), including the border area, measured
in pixels depending on Video::PIXEL_DENSITY. Read more
source§fn pixel_density() -> u32
fn pixel_density() -> u32
Returns the horizontal pixel density.
source§fn visible_screen_bank(&self) -> usize
fn visible_screen_bank(&self) -> usize
Returns the screen bank index of the currently visible screen. Read more
Auto Trait Implementations§
impl<M, B, X, V> RefUnwindSafe for Ula<M, B, X, V>where
B: RefUnwindSafe,
M: RefUnwindSafe,
V: RefUnwindSafe,
X: RefUnwindSafe,
impl<M, B, X, V> Send for Ula<M, B, X, V>where
B: Send,
M: Send,
V: Send,
X: Send,
impl<M, B, X, V> Sync for Ula<M, B, X, V>where
B: Sync,
M: Sync,
V: Sync,
X: Sync,
impl<M, B, X, V> Unpin for Ula<M, B, X, V>where
B: Unpin,
M: Unpin,
V: Unpin,
X: Unpin,
impl<M, B, X, V> UnwindSafe for Ula<M, B, X, V>where
B: UnwindSafe,
M: UnwindSafe,
V: UnwindSafe,
X: UnwindSafe,
Blanket Implementations§
§impl<T> Conv for T
impl<T> Conv for T
§impl<T> FmtForward for T
impl<T> FmtForward for T
§fn fmt_binary(self) -> FmtBinary<Self>where
Self: Binary,
fn fmt_binary(self) -> FmtBinary<Self>where
Self: Binary,
Causes
self
to use its Binary
implementation when Debug
-formatted.§fn fmt_display(self) -> FmtDisplay<Self>where
Self: Display,
fn fmt_display(self) -> FmtDisplay<Self>where
Self: Display,
§fn fmt_lower_exp(self) -> FmtLowerExp<Self>where
Self: LowerExp,
fn fmt_lower_exp(self) -> FmtLowerExp<Self>where
Self: LowerExp,
§fn fmt_lower_hex(self) -> FmtLowerHex<Self>where
Self: LowerHex,
fn fmt_lower_hex(self) -> FmtLowerHex<Self>where
Self: LowerHex,
§fn fmt_octal(self) -> FmtOctal<Self>where
Self: Octal,
fn fmt_octal(self) -> FmtOctal<Self>where
Self: Octal,
Causes
self
to use its Octal
implementation when Debug
-formatted.§fn fmt_pointer(self) -> FmtPointer<Self>where
Self: Pointer,
fn fmt_pointer(self) -> FmtPointer<Self>where
Self: Pointer,
§fn fmt_upper_exp(self) -> FmtUpperExp<Self>where
Self: UpperExp,
fn fmt_upper_exp(self) -> FmtUpperExp<Self>where
Self: UpperExp,
§fn fmt_upper_hex(self) -> FmtUpperHex<Self>where
Self: UpperHex,
fn fmt_upper_hex(self) -> FmtUpperHex<Self>where
Self: UpperHex,
§fn fmt_list(self) -> FmtList<Self>where
&'a Self: for<'a> IntoIterator,
fn fmt_list(self) -> FmtList<Self>where
&'a Self: for<'a> IntoIterator,
Formats each item in a sequence. Read more
source§impl<S, T> IntoSample<S> for Twhere
S: FromSample<T>,
impl<S, T> IntoSample<S> for Twhere
S: FromSample<T>,
source§fn into_sample(self) -> S
fn into_sample(self) -> S
Convert to
S
a sample type from self
.source§impl<T> LoadScr for Twhere
T: ScreenDataProvider,
impl<T> LoadScr for Twhere
T: ScreenDataProvider,
§impl<T> Pipe for Twhere
T: ?Sized,
impl<T> Pipe for Twhere
T: ?Sized,
§fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
Pipes by value. This is generally the method you want to use. Read more
§fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
Borrows
self
and passes that borrow into the pipe function. Read more§fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
Mutably borrows
self
and passes that borrow into the pipe function. Read more§fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> Rwhere
Self: Borrow<B>,
B: 'a + ?Sized,
R: 'a,
fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> Rwhere
Self: Borrow<B>,
B: 'a + ?Sized,
R: 'a,
§fn pipe_borrow_mut<'a, B, R>(
&'a mut self,
func: impl FnOnce(&'a mut B) -> R
) -> Rwhere
Self: BorrowMut<B>,
B: 'a + ?Sized,
R: 'a,
fn pipe_borrow_mut<'a, B, R>(
&'a mut self,
func: impl FnOnce(&'a mut B) -> R
) -> Rwhere
Self: BorrowMut<B>,
B: 'a + ?Sized,
R: 'a,
§fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> Rwhere
Self: AsRef<U>,
U: 'a + ?Sized,
R: 'a,
fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> Rwhere
Self: AsRef<U>,
U: 'a + ?Sized,
R: 'a,
Borrows
self
, then passes self.as_ref()
into the pipe function.§fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> Rwhere
Self: AsMut<U>,
U: 'a + ?Sized,
R: 'a,
fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> Rwhere
Self: AsMut<U>,
U: 'a + ?Sized,
R: 'a,
§impl<T> Tap for T
impl<T> Tap for T
§fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Selfwhere
Self: Borrow<B>,
B: ?Sized,
fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Selfwhere
Self: Borrow<B>,
B: ?Sized,
Immutable access to the
Borrow<B>
of a value. Read more§fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Selfwhere
Self: BorrowMut<B>,
B: ?Sized,
fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Selfwhere
Self: BorrowMut<B>,
B: ?Sized,
Mutable access to the
BorrowMut<B>
of a value. Read more§fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Selfwhere
Self: AsRef<R>,
R: ?Sized,
fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Selfwhere
Self: AsRef<R>,
R: ?Sized,
Immutable access to the
AsRef<R>
view of a value. Read more§fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Selfwhere
Self: AsMut<R>,
R: ?Sized,
fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Selfwhere
Self: AsMut<R>,
R: ?Sized,
Mutable access to the
AsMut<R>
view of a value. Read more§fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Selfwhere
Self: Deref<Target = T>,
T: ?Sized,
fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Selfwhere
Self: Deref<Target = T>,
T: ?Sized,
Immutable access to the
Deref::Target
of a value. Read more§fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Selfwhere
Self: DerefMut<Target = T> + Deref,
T: ?Sized,
fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Selfwhere
Self: DerefMut<Target = T> + Deref,
T: ?Sized,
Mutable access to the
Deref::Target
of a value. Read more§fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
Calls
.tap()
only in debug builds, and is erased in release builds.§fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
Calls
.tap_mut()
only in debug builds, and is erased in release
builds. Read more§fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Selfwhere
Self: Borrow<B>,
B: ?Sized,
fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Selfwhere
Self: Borrow<B>,
B: ?Sized,
Calls
.tap_borrow()
only in debug builds, and is erased in release
builds. Read more§fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Selfwhere
Self: BorrowMut<B>,
B: ?Sized,
fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Selfwhere
Self: BorrowMut<B>,
B: ?Sized,
Calls
.tap_borrow_mut()
only in debug builds, and is erased in release
builds. Read more§fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Selfwhere
Self: AsRef<R>,
R: ?Sized,
fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Selfwhere
Self: AsRef<R>,
R: ?Sized,
Calls
.tap_ref()
only in debug builds, and is erased in release
builds. Read more§fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Selfwhere
Self: AsMut<R>,
R: ?Sized,
fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Selfwhere
Self: AsMut<R>,
R: ?Sized,
Calls
.tap_ref_mut()
only in debug builds, and is erased in release
builds. Read more