[][src]Struct chipo::Chip8

pub struct Chip8 { /* fields omitted */ }

A chip-8 emulator.

Methods

impl Chip8
[src]

Constructs a new Chip8.

Loads a rom and sets the drawing mode of the emulator. If should_wrap is true, then all pixels drawn outside of the drawable area will wrap to the other side, else they will be ignored.

Runs one fetch-decode-execute cycle.

Decrement the delay and sound timer by one tick.

Returns a pointer to a byte array that represents the screen. The screen will have screen_width * screen_height / 8 bytes in row-major order. Each byte represents 8 bits in little-endian. 1 represents that the pixel is black, while 0 represents that the pixel is white.

Returns the width of the screen in pixels.

Returns the height of the screen in pixels.

Sets the state of a key to be pressed. index is the index of the key in row-major order.

Sets the state of a key to be released. index is the index of the key in row-major order.

Returns true if the screen has been updated and should be redrawn.

Returns true if the a beep should be made.

Returns the value of the program counter register.

Returns the value of the index register.

Returns a pointer to a byte array that represents the 16 data registers.

Trait Implementations

impl Default for Chip8
[src]

Returns the "default value" for a type. Read more

Auto Trait Implementations

impl Send for Chip8

impl Sync for Chip8

Blanket Implementations

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

Performs the conversion.

impl<T> From for T
[src]

Performs the conversion.

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

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

🔬 This is a nightly-only experimental API. (try_from)

Performs the conversion.

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

Immutably borrows from an owned value. Read more

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

Mutably borrows from an owned value. Read more

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

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

🔬 This is a nightly-only experimental API. (try_from)

Performs the conversion.

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

🔬 This is a nightly-only experimental API. (get_type_id)

this method will likely be replaced by an associated static

Gets the TypeId of self. Read more