Skip to main content

GsuMem

Struct GsuMem 

Source
pub struct GsuMem<'a> {
    pub rom: &'a [u8],
    pub rom_mask: u32,
    pub ram: &'a mut [u8],
    pub ram_mask: u32,
}
Expand description

The Game Pak ROM/RAM the GSU reads and plots into, with the GSU-internal 24-bit decode.

The board constructs this each run, borrowing its ROM (shared, read-only) and its Game Pak RAM (the plot target). The address map is the GSU’s own view (ares SuperFX::read/write): banks $00-$3F fold LoROM-style, $40-$5F are linear ROM, $70-$71 are the RAM bitmap.

Fields§

§rom: &'a [u8]

Game Pak ROM image (already mirror-rounded to a power-of-two rom_mask + 1).

§rom_mask: u32

rom.len().next_power_of_two() - 1 (ares romSizeRound(rom.size()) - 1).

§ram: &'a mut [u8]

Game Pak RAM (the GSU plot bitmap), ram_mask + 1 bytes.

§ram_mask: u32

ram.len() - 1 (RAM is always a power of two).

Auto Trait Implementations§

§

impl<'a> Freeze for GsuMem<'a>

§

impl<'a> RefUnwindSafe for GsuMem<'a>

§

impl<'a> Send for GsuMem<'a>

§

impl<'a> Sync for GsuMem<'a>

§

impl<'a> Unpin for GsuMem<'a>

§

impl<'a> UnsafeUnpin for GsuMem<'a>

§

impl<'a> !UnwindSafe for GsuMem<'a>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.