[][src]Struct gbafix::GBAHeader

#[repr(C)]
pub struct GBAHeader {
    pub start_code: [u8; 4],
    pub logo: [u8; 156],
    pub title: [u8; 12],
    pub game_code: [u8; 4],
    pub maker_code: [u8; 2],
    pub ninety_six: u8,
    pub main_unit: u8,
    pub device_type: u8,
    pub reserved_zeroed: [u8; 7],
    pub version: u8,
    pub checksum: u8,
    pub reserved_zeroed2: [u8; 2],
}

GBA Header struct.

For details, read GBATEK - GBA Cartridge Header.

Fields

start_code: [u8; 4]

b label

logo data, don't touch.

title: [u8; 12]

Game's uppercase ASCII title

game_code: [u8; 4]

Game's uppercase code name

maker_code: [u8; 2]

Manufacturer's uppercase shorthand

ninety_six: u8

This is just always 0x96

main_unit: u8

This is always 0 for all commercial GBA models.

device_type: u8

Generally 0, or enable bit 7 for hardware debugger support, if you have such a device.

reserved_zeroed: [u8; 7]

zeroed space

version: u8

Release version of the game, just using 0 is fine.

checksum: u8

This is set by all the other fields. Set all your fields and then call update_checksum.

reserved_zeroed2: [u8; 2]

more zeroed space

Methods

impl GBAHeader[src]

pub fn update_checksum(&mut self)[src]

pub fn calculate_checksum(&self) -> u8[src]

pub fn set_debugging(&mut self, debug: bool)[src]

Trait Implementations

impl Clone for GBAHeader[src]

impl Copy for GBAHeader[src]

impl Default for GBAHeader[src]

impl Zeroable for GBAHeader[src]

impl Pod for GBAHeader[src]

Auto Trait Implementations

Blanket Implementations

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> From<T> for T[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]