Struct faucon_emu::memory::Memory [−][src]
Expand description
Representation of the Falcon memory space.
It consists of separate memory spaces for data and code, where data is stored in a flat piece of memory and code in virtual memory pages, translated by a hidden TLB.
Fields
data: Vec<u8>
Representation of the Falcon data space.
This is a linear piece of memory with byte-oriented addressing, used for variables and stack memory. It can be addressed in 8-bit, 16-bit and 32-bit quantities where unaligned memory access leads to data corruption.
code: Vec<u8>
Representation of the Falcon code space.
Code segment uses primitive paging in 0x100 byte pages. Address translation is done in hidden TLB memory, with one entry for each physical page.
tlb: Tlb
Representation of the hidden Falcon TLB.
The TLB is used for address translation via an array of entries, each representing a physical page index.
Implementations
Creates a new instance of the memory, initialized to all zeroes by default.
Reads a byte from a given address in Falcon data space.
Reads a halfword from a given address in Falcon data space.
Reads a word from a given address in Falcon data space.
Reads a word from a given physical address in code space.
Writes a byte to a given address in Falcon data space.
Writes a halfword to a given address in Falcon data space.
Writes a word to a given address in Falcon data space.
Writes a word to a given physical address in code space.
Auto Trait Implementations
impl RefUnwindSafe for Memory
impl UnwindSafe for Memory
Blanket Implementations
Mutably borrows from an owned value. Read more
Set the foreground color generically Read more
Set the background color generically. Read more
Change the foreground color to black
Change the background color to black
Change the foreground color to red
Change the background color to red
Change the foreground color to green
Change the background color to green
Change the foreground color to yellow
Change the background color to yellow
Change the foreground color to blue
Change the background color to blue
Change the foreground color to magenta
Change the background color to magenta
Change the foreground color to purple
Change the background color to purple
Change the foreground color to cyan
Change the background color to cyan
Change the foreground color to white
Change the background color to white
Change the foreground color to the terminal default
Change the background color to the terminal default
Change the foreground color to bright black
Change the background color to bright black
Change the foreground color to bright red
Change the background color to bright red
Change the foreground color to bright green
Change the background color to bright green
Change the foreground color to bright yellow
Change the background color to bright yellow
Change the foreground color to bright blue
Change the background color to bright blue
Change the foreground color to bright magenta
Change the background color to bright magenta
Change the foreground color to bright purple
Change the background color to bright purple
Change the foreground color to bright cyan
Change the background color to bright cyan
Change the foreground color to bright white
Change the background color to bright white
Make the text bold
Make the text dim
Make the text italicized
Make the text italicized
Make the text blink
Make the text blink (but fast!)
Swap the foreground and background colors
Hide the text
Cross out the text
fn color<Color>(&self, color: Color) -> FgDynColorDisplay<'_, Color, Self> where
Color: DynColor,
fn color<Color>(&self, color: Color) -> FgDynColorDisplay<'_, Color, Self> where
Color: DynColor,
Set the foreground color at runtime. Only use if you do not know which color will be used at
compile-time. If the color is constant, use either OwoColorize::fg
or
a color-specific method, such as OwoColorize::green
, Read more
fn on_color<Color>(&self, color: Color) -> BgDynColorDisplay<'_, Color, Self> where
Color: DynColor,
fn on_color<Color>(&self, color: Color) -> BgDynColorDisplay<'_, Color, Self> where
Color: DynColor,
Set the background color at runtime. Only use if you do not know what color to use at
compile-time. If the color is constant, use either OwoColorize::bg
or
a color-specific method, such as OwoColorize::on_yellow
, Read more
fn fg_rgb<const R: u8, const G: u8, const B: u8>(
&self
) -> FgColorDisplay<'_, CustomColor<R, G, B>, Self>
fn fg_rgb<const R: u8, const G: u8, const B: u8>(
&self
) -> FgColorDisplay<'_, CustomColor<R, G, B>, Self>
Set the foreground color to a specific RGB value.
fn bg_rgb<const R: u8, const G: u8, const B: u8>(
&self
) -> BgColorDisplay<'_, CustomColor<R, G, B>, Self>
fn bg_rgb<const R: u8, const G: u8, const B: u8>(
&self
) -> BgColorDisplay<'_, CustomColor<R, G, B>, Self>
Set the background color to a specific RGB value.
Sets the foreground color to an RGB value.
Sets the background color to an RGB value.