Skip to main content

Crate rustysnes_cart

Crate rustysnes_cart 

Source
Expand description

rustysnes-cart — the SNES cartridge / memory-map / coprocessor model (cart).

Owns the LoROM / HiROM / ExHiROM address mapping and every on-cart coprocessor (DSP-1..4 / Super FX (GSU) / SA-1 / S-DD1 / SPC7110 / CX4 / OBC1). All board-specific behavior — bank switching, the coprocessor clock, IRQ/refresh hooks — lives behind the Board trait, not in the PPU or CPU (the RustyNES “mapper logic lives in the mapper” rule, ported). The video chip depends ONLY on this crate for its VRAM/CHR bus.

Part of the one-directional chip-crate graph (see docs/architecture.md): this crate does NOT depend on the other chip crates. #![no_std] + alloc so it cross-compiles to a bare-metal target; only the frontend carries std + unsafe.

Re-exports§

pub use board::Board;
pub use board::Coprocessor;
pub use board::ExHiRom;
pub use board::HiRom;
pub use board::LoRom;
pub use board::MappedAddr;
pub use coproc::Dsp1Board;
pub use coproc::Gsu;
pub use coproc::Revision;
pub use coproc::Sa1Board;
pub use coproc::SuperFxBoard;
pub use coproc::Upd77c25;
pub use header::Header;
pub use header::HeaderError;
pub use header::MapMode;
pub use header::Region;
pub use tier::BoardTier;
pub use tier::board_tier;

Modules§

board
The Board trait — the SNES analogue of RustyNES’s Mapper.
coproc
On-cart coprocessors that plug into the crate::board::Board trait.
header
SNES internal-header detection.
tier
Board accuracy-tiering — the honesty marker (ADR 0003, the RustyNES ADR 0011 port).

Structs§

Cart
A loaded cartridge: a parsed Header + the Board that implements its mapping and any coprocessor. The crate::board module decodes the header into the right board.