[−][src]Struct gc_nes_core::nes::Nes
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]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
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>,