pub struct Nes<'a, I> where
I: NesIo, {
pub io: &'a I,
pub mapper: Mapper,
pub ram: Cell<[u8; 2048]>,
pub cpu: Cpu,
pub ppu: Ppu,
/* private fields */
}
Fields
io: &'a I
mapper: Mapper
ram: Cell<[u8; 2048]>
cpu: Cpu
ppu: Ppu
Implementations
sourceimpl<'a, I> Nes<'a, I> where
I: NesIo,
impl<'a, I> Nes<'a, I> where
I: NesIo,
pub fn new(io: &'a I, rom: Rom) -> Self
pub fn read_u8(&self, addr: u16) -> u8
pub fn read_u16(&self, addr: u16) -> u16
pub fn write_u8(&self, addr: u16, value: u8)
pub fn read_ppu_u8(&self, addr: u16) -> u8
pub fn write_ppu_u8(&self, addr: u16, value: u8)
pub fn run(&'a self) -> impl Generator<Yield = NesStep, Return = !> + 'a
Trait Implementations
Auto Trait Implementations
impl<'a, I> !RefUnwindSafe for Nes<'a, I>
impl<'a, I> Send for Nes<'a, I> where
I: Sync,
<I as NesIo>::Input: Sync,
impl<'a, I> !Sync for Nes<'a, I>
impl<'a, I> Unpin for Nes<'a, I>
impl<'a, I> UnwindSafe for Nes<'a, I> where
I: RefUnwindSafe,
<I as NesIo>::Input: RefUnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more