Struct faucon_emu::memory::Memory[][src]

pub struct Memory {
    pub data: Vec<u8>,
    pub code: Vec<u8>,
    pub tlb: Tlb,
}
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

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

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

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

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

Set the foreground color to a specific RGB value.

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.

Apply a runtime-determined style

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.