sgdk-cartridge
Installation
SKILL.md
SGDK Cartridge
Keep common code and assets reachable while loading different parts of a large ROM. Use the mapper the target cartridge actually supports. Banking is a board feature, not extra RAM or a way around VRAM and DMA limits.
Establish the target
- Identify ROM size, intended emulator/flash cart/physical board, SRAM wiring, and existing linker layout. Ordinary cartridges expose up to 4 MiB linearly; using SRAM can overlay part of that window. Do not add banking to a small game without a reason.
- Pull
ewrogers/sgdk:latest, rundoctor, and inspect itsinc/mapper.h,inc/config.h,md.ld, ResComp manual, and the chosen audio driver's source. The references below were checked with SGDK 2.11. Review differences when the image changes. - Separate physical ROM offsets from CPU addresses. Write down who owns each mapper window, which resources must stay pinned, and when a temporary view may change. See mapping and resource lifetime.