ewrogers/megadev-skills

megadev-best-practices

Apply Megadev-specific C/assembly, project-structure and integration practices while preserving CPU, interrupt and resource ownership.

소스 보기

사용 방법

  1. 설치 명령을 복사하고 자신의 에이전트 환경에 설치하기 전에 소스 패키지를 확인하세요.
  2. 필요한 도구, 인증 정보, 지원 환경은 원본 문서에서 확인하세요.
  3. 입력과 원하는 산출물을 설명하고 출처와 결과를 대조하세요.
npx skills add https://github.com/ewrogers/megadev-skills --skill megadev-best-practices

시작 전 확인

  • 설치에는 모델 구독, API 한도, 파일 접근 권한이 포함되지 않습니다.
  • 별점 수와 설치 수는 활동 지표이며 독립적인 품질·보안 검증이 아닙니다.
원본 Skill 문서

원본 저장소의 제목, 예시, 코드, 표, 링크, 이미지를 유지해 표시합니다.

Megadev best practices

Adapt the smallest useful pattern to the user's game. These are implementation practices, not an art direction, control scheme, genre or required engine layout. Megadev helpers, BIOS entry points and this example's application functions are separate APIs; do not substitute SGDK APIs or teach the latter as SDK facilities.

Preserve the owning system

Before joining features, name the owner of each clock, interrupt hook, mailbox word, RAM region, buffer, drive operation, voice and save namespace. Reuse that owner's request/completion contract instead of introducing a second manager. Read integration seams for the concrete ownership map, generation/lease rules and safe handling of late results.

Follow the project's structure. A useful seam separates portable policy from platform adapters, exposes what the caller needs, and hides the fragile handshake. Do not create a generic framework or split tiny modules merely to match the Lab. Read structure and review for choosing that boundary.

Write C and assembly for the selected target

Read C/ABI practices for promotions, overflow, alignment, byte decoding, aliasing, stack and inline-assembly obligations. Use the selected ewrogers/megadev:latest source/compiler to verify an API or ABI; retain original 68000 and compiler safeguards. Limit Docker build containers to --cpus=2.

Do not use volatile as an ownership, atomicity or compiler-barrier substitute. Publish complete immutable payloads, then their commit word; hold storage until acknowledgement. Keep critical sections short, preserve the caller's interrupt policy, and leave BIOS/file/save work outside interrupt callbacks. The example's Main publisher is called only from its interrupt-enabled foreground loop.

Prove integration behavior

Use Harbor Relay when a runnable cross-system case is useful. It reuses the established scene, CD/audio and save implementations, with an explicit checkpoint adapter and small executable C contract examples. Create it using scripts/create_project.py; it works after standalone installation.

Read validation for O0/O3 checks, original-68000 execution, ARM64/AMD64, PAL/NTSC, release qualification and emulator/hardware limits. Test busy, failed, cancelled and late operations as well as the successful route. A timeout must not make live storage reusable. Fix the owning system when a real shared bug is found; do not hide it in a second local workaround or weaken its checks.

관련 작업

같은 저장소의 Skills

더 많은 Skills

모든 Skills