megadev-project
Installation
SKILL.md
Megadev project
Make the smallest project that proves the user's requested behavior. Megadev is a lower-level kit, not SGDK with a CD attached: rendering, audio, input, resources and startup cannot use invented SGDK compatibility APIs.
Establish the baseline
- Inspect the existing project and installed toolchain before changing its structure. Keep the user's design, controls and resource policies.
- Use
ewrogers/megadev:latest; pull it before validation and recorddoctoroutput. Read the selected image's/opt/megadevsource for API and ABI details. The references below identify the revision tested here, not a promise thatlatestnever changes. - For a new project, use the starter workflow.
scripts/create_project.pycopies a self-contained Project Lab into a new directory; it refuses to overwrite an existing destination. Adapt or remove its diagnostic UI for the actual game.
Preserve the machine contracts
Read startup and ownership when touching boot code, linker layouts, C startup, callbacks or CPU communication.
- Give initialized data, zeroed BSS and stacks explicit, non-overlapping space on each CPU. Loaded bytes alone do not initialize C state.
- Keep interrupt code resident. Do not overwrite or transfer Word RAM while executing a module from it.
- Publish command arguments before the command. Acknowledgment, completion and ownership are separate events. On timeout, keep uncertain resources unavailable; do not blindly retry the same load.
- Preserve Megadev's required build flags and original-68000 target. Inspect a BIOS wrapper's register contract before calling it from optimized C; the starter uses out-of-line adapters for its BIOS calls.
- Match disc region, video configuration and emulator BIOS. Do not distribute BIOS files or change the user's emulator settings without authorization.