Thank you for your interest in contributing to OpenSNES!
Please read and follow our Code of Conduct. SNES development is niche — every contributor matters.
main.c that triggers the bug)The repository uses two long-lived branches with strict invariants. Knowing which branch you are on tells you what guarantees apply.
| Branch | Invariant | When it advances |
|---|---|---|
**main** | Full test suite is green. Every commit is reachable from a tagged release or about to become one. The default branch — what git clone lands on. | Only via PR from develop (the "release PR"), or fast-forward when bumping for a new tag. |
**develop** | CI build job is green on the latest commit. May contain in-progress optimisations not yet stabilised. | All feature/fix PRs land here. |
What this means in practice:
main (or a vX.Y.Z tag).develop.vX.Y.Z are cut only from main — release.yml rejects a tag whose commit is not on main.main is never force-pushed. If a release ships a regression, fix it forward (a vX.Y.Z+1 tag) rather than rewriting history.All PRs must be submitted against the **develop** branch. PRs targeting main are reserved for the release process (a single PR that brings develop's green tip into main when the maintainers cut a release). Random PRs to main will be closed without review.
Each PR must address exactly one logical change. Never mix:
If you need to do both, submit two PRs where the second depends on the first.
| Lines changed | Verdict |
|---|---|
| **< 200** | Ideal. Gets reviewed fast. |
| 200–400 | Acceptable. Add a clear description. |
| **> 400** | Too large. Split it or explain why it can't be split. |
Asset files (.pic, .pal, .map) and generated assembly don't count toward these limits — only human-written code.
A 1000-line PR with no explanation will not be reviewed. It's not that we don't want your contribution — it's that we can't verify it's correct.
We follow Conventional Commits:
Types: feat, fix, perf, refactor, test, docs, chore, build
Scopes: lib, compiler, runtime, tools, examples, build
Before submitting:
make clean && make — full rebuild must succeedcd tools/opensnes-emu && node test/run-all-tests.mjs --quick — all checks must pass (run with --list to see the current count)make clean && make passes without warnings/** @brief */)We accept contributions that used AI tools (Copilot, Claude, ChatGPT, etc.) under these conditions:
Co-Authored-By trailers for AI tools in commit messages.Every new feature or example must have:
/** @brief */ on functions, defines, and important variables)For code style conventions, see Code Style Guide.
When using external code, add an entry to ATTRIBUTION.md with the source, author, license, and description of modifications. Include a header comment in the source file.
Look for issues labeled good first issue. These are small, self-contained tasks with clear instructions — designed for your first contribution to the project.