pub struct MemoryDump {
pub mem_type: MemoryType,
pub start_addr: u16,
pub end_addr: u16,
pub data: Vec<u8>,
pub interpreted_oam: Option<InterpretedOam>,
pub interpreted_nametables: Option<InterpretedNametables>,
}Expand description
A memory dump with metadata and optional interpreted data.
This is the common data structure passed to all formatters. For OAM and nametable dumps, interpreted data is also included.
Fields§
§mem_type: MemoryTypeType of memory (cpu, ppu, oam, nametables)
start_addr: u16Start address
end_addr: u16End address
data: Vec<u8>Raw memory bytes
interpreted_oam: Option<InterpretedOam>Interpreted OAM data (only for OAM dumps)
interpreted_nametables: Option<InterpretedNametables>Interpreted nametable data (only for nametable dumps)
Implementations§
Source§impl MemoryDump
impl MemoryDump
Sourcepub fn new(mem_type: MemoryType, start_addr: u16, data: Vec<u8>) -> Self
pub fn new(mem_type: MemoryType, start_addr: u16, data: Vec<u8>) -> Self
Create a new memory dump
Sourcepub fn nametables(data: Vec<u8>) -> Self
pub fn nametables(data: Vec<u8>) -> Self
Create nametables memory dump with interpreted data.
Sourcepub fn palette_ram(data: Vec<u8>) -> Self
pub fn palette_ram(data: Vec<u8>) -> Self
Create palette RAM memory dump. Palette RAM is 32 bytes at PPU addresses $3F00-$3F1F.
Trait Implementations§
Source§impl Clone for MemoryDump
impl Clone for MemoryDump
Source§fn clone(&self) -> MemoryDump
fn clone(&self) -> MemoryDump
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for MemoryDump
impl RefUnwindSafe for MemoryDump
impl Send for MemoryDump
impl Sync for MemoryDump
impl Unpin for MemoryDump
impl UnsafeUnpin for MemoryDump
impl UnwindSafe for MemoryDump
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more