pub struct BgSplitState {
pub nt_addr: u16,
pub at_addr: u16,
pub fine_y: u8,
pub chr_bank: u8,
}Expand description
Per-tile override produced by a mapper that implements a vertical
split-screen mode (currently MMC5 via $5200-$5202).
MMC5’s split allows a vertical band of the screen to render from an
independently scrolled “alt region” backed by ExRAM-as-nametable and a
dedicated 4 KiB CHR bank. The PPU consults
Mapper::bg_split_state once per 8-dot BG fetch group (at the NT-byte
fetch boundary). When Some(...) is returned, the PPU uses the supplied
nametable address, attribute address, and fine-Y in place of its own
loopy-v derivation for that tile, and the mapper internally latches the
CHR bank for the following BG pattern fetches.
Fields§
§nt_addr: u16Synthesized nametable byte address in $2000-$3EFF, computed from
the alt-region scroll and the current coarse-X.
at_addr: u16Synthesized attribute byte address in the same nametable.
fine_y: u8Fine-Y (0..=7) within the alt-region’s logical row.
chr_bank: u84 KiB CHR bank index (from $5202 for MMC5) for the alt region’s
BG pattern fetches.
Trait Implementations§
Source§impl Clone for BgSplitState
impl Clone for BgSplitState
Source§fn clone(&self) -> BgSplitState
fn clone(&self) -> BgSplitState
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more