[][src]Struct gc_nes_core::nes::Nes

pub struct Nes { /* fields omitted */ }

Struct that represents the NES itself

Implementations

impl Nes[src]

pub fn new(cartridge: Cartridge) -> Self[src]

Creates a new NES instance with no connected controllers

pub fn cycle(&mut self)[src]

Executes a single cycle of the NES

pub fn frame(&mut self) -> &[u32; 61440][src]

Runs as many cycles as necessary to complete the current frame. Returns the frame as an of 32 bit colour ARGB colour values.

pub fn update_controller_one(&mut self, input_state: Option<u8>)[src]

Updates the state of the input device connected to the first port

pub fn update_controller_two(&mut self, input_state: Option<u8>)[src]

Updates the state of the input device connected to the first port

pub fn get_screen(&mut self) -> &[u32; 61440][src]

Gets the current state of the screen from the PPU's screen buffer as an array of 32 bit colour values.

pub fn reset(&mut self)[src]

Resets the state of the console

Auto Trait Implementations

impl !RefUnwindSafe for Nes

impl !Send for Nes

impl !Sync for Nes

impl Unpin for Nes

impl !UnwindSafe for Nes

Blanket Implementations

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

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

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

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

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

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.