pub fn select(
_map_mode: MapMode,
rom: Box<[u8]>,
sram_size: usize,
) -> Spc7110BoardExpand description
Build a Spc7110Board for a cart detected as SPC7110 (board::select).
Splits rom into PROM + DROM using Far East of Eden Zero’s known physical geometry: 1 MiB
PROM + 4 MiB DROM — the real, physical chip sizes per ares’ own board database
(mia/Database/Super Famicom.bml, board: SHVC-LDH3C-01: memory type=ROM content=Program size=0x100000 + memory type=ROM content=Data size=0x400000), not “however many bytes
happen to be left in the file after the first PROM_SIZE” as an earlier version of this
function assumed. That assumption was silently wrong for this project’s own staged dump: it
is 7 MiB (0x700000), 2 MiB (0x200000) larger than the real 5 MiB (0x500000) of physical
ROM content, so treating “everything past 1 MiB” as DROM fed Spc7110Board::datarom_read‘s
bus_mirror fold a 6 MiB length instead of the real 4 MiB — silently wrong-sized mirroring
for any register-selected DROM offset in the (nonexistent) upper 2 MiB. Any bytes in rom
past PROM_SIZE + DROM_SIZE (padding/junk some dump tools append) are dropped. Other SPC7110
titles’ exact split is not derivable from a raw dump without this same kind of external
database lookup — this project has exactly one SPC7110 ROM to validate against
(docs/rom-test-corpus.md).