This introduces an approach to handling NES mappers utilizing 32K PRG-ROM banks, inspired by @mysterymath 's work on MMC1 32K banking. In short, a faux "fixed" section is placed at the beginning of each bank, with the bank-specific contents following after. Thanks to clever use of the custom output format's origin/length functionality, the "fixed" bank is dynamically sized to fit the user's code and data exactly.
An important caveat is that this approach does not currently provide a good answer for DPCM support on this mapper (as the fixed section begins at $8000, not $C000).
Fixes https://github.com/llvm-mos/llvm-mos-sdk/issues/174 .
This introduces an approach to handling NES mappers utilizing 32K PRG-ROM banks, inspired by @mysterymath 's work on MMC1 32K banking. In short, a faux "fixed" section is placed at the beginning of each bank, with the bank-specific contents following after. Thanks to clever use of the custom output format's origin/length functionality, the "fixed" bank is dynamically sized to fit the user's code and data exactly.
An important caveat is that this approach does not currently provide a good answer for DPCM support on this mapper (as the fixed section begins at $8000, not $C000).