pub struct NullBus;Expand description
A no-op Bus (all reads open, writes dropped) for unit-testing the CPU in isolation.
Trait Implementations§
Source§impl Bus for NullBus
impl Bus for NullBus
Source§fn read24(&mut self, _addr24: u32) -> u8
fn read24(&mut self, _addr24: u32) -> u8
Read a byte at a 24-bit address (no clock advance — the CPU sequences timing via
Bus::advance around this call).Source§fn write24(&mut self, _addr24: u32, _val: u8)
fn write24(&mut self, _addr24: u32, _val: u8)
Write a byte at a 24-bit address (no clock advance — see
Bus::read24).Source§fn access_cycles(&self, _addr24: u32) -> u32
fn access_cycles(&self, _addr24: u32) -> u32
Master clocks this access costs (ares
CPU::wait): the region-variable access speed
(FastROM vs SlowROM, WRAM, I/O). Defaults to the SlowROM/internal-cycle cost of 6.Source§fn advance(&mut self, _clocks: u32)
fn advance(&mut self, _clocks: u32)
Advance the system clock by
clocks master ticks (ares CPU::step), ticking the
PPU/APU/coprocessor and HDMA in lockstep. Default no-op for buses whose timebase is
charged elsewhere (the SA-1 second CPU) or that don’t model timing (unit-test buses).Auto Trait Implementations§
impl Freeze for NullBus
impl RefUnwindSafe for NullBus
impl Send for NullBus
impl Sync for NullBus
impl Unpin for NullBus
impl UnsafeUnpin for NullBus
impl UnwindSafe for NullBus
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more