pub trait ArmBus {
// Required methods
fn read_code(&mut self, addr: u32) -> u32;
fn read(&mut self, addr: u32, byte: bool) -> u32;
fn write(&mut self, addr: u32, value: u32, byte: bool);
fn idle(&mut self);
}Expand description
A 24-bit-ish ARM-side address space accessor.
The concrete board wrapper (not yet built, docs/st018-arm-notes.md step 9) implements this
over PRG ROM / data ROM / work RAM / the SNES-side handshake registers, and is also where the
ARM’s own cycle counter advances (every method call here corresponds to one real bus cycle on
real hardware).
Required Methods§
Sourcefn read_code(&mut self, addr: u32) -> u32
fn read_code(&mut self, addr: u32) -> u32
Fetch one instruction word (an aligned, sequential-or-not code read).
Sourcefn read(&mut self, addr: u32, byte: bool) -> u32
fn read(&mut self, addr: u32, byte: bool) -> u32
Read a data word or byte (LDR/SWP/LDM). byte selects an 8-bit access.