[−][src]Struct gameboy_rom::data::RomHeader
Metadata about the ROM
Fields
begin_code_execution_point: &'a [u8]
scrolling_graphic: &'a [u8]
Logo at the start, should match Nintendo Logo
game_title: &'a str
up to 10 ASCII characters
gameboy_color: bool
gbc bit
licensee_code_new: [u8; 2]
2 ASCII hex digits or zeros
super_gameboy: bool
sgb bit
rom_type: RomType
how the data after the header will be parsed
rom_size: u16
How many 16KB ROM banks to use
ram_banks: u8
How many RAM banks are available on the cart
ram_bank_size: u16
The size of the RAM bank in bytes (normal values are 2kB and 8kB)
japanese: bool
jp bit
licensee_code: u8
mask_rom_version: u8
complement: u8
checksum: u16
the sum of all bytes in the ROM except these two bytes, truncated to 2 bytes
Methods
impl<'a> RomHeader<'a>
[src]
pub fn validate(&self) -> Result<(), HeaderValidationError>
[src]
checks that the ROM header is internally consistent. warning: this doesn't guarantee that the entire ROM header is well formed TODO: consider parsing into unvalidated form (just segmented bytes and then doing a translation step...)
Trait Implementations
impl<'a> Eq for RomHeader<'a>
[src]
impl<'a> PartialEq<RomHeader<'a>> for RomHeader<'a>
[src]
impl<'a> Debug for RomHeader<'a>
[src]
impl<'a> Serialize for RomHeader<'a>
[src]
fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error> where
__S: Serializer,
[src]
__S: Serializer,
impl<'de: 'a, 'a> Deserialize<'de> for RomHeader<'a>
[src]
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
__D: Deserializer<'de>,
Auto Trait Implementations
impl<'a> Sync for RomHeader<'a>
impl<'a> Send for RomHeader<'a>
impl<'a> Unpin for RomHeader<'a>
impl<'a> RefUnwindSafe for RomHeader<'a>
impl<'a> UnwindSafe for RomHeader<'a>
Blanket Implementations
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for T
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> DeserializeOwned for T where
T: Deserialize<'de>,
[src]
T: Deserialize<'de>,