rewind-arcade¶
Rewind Arcade's direction is to become the ultimate open home for all things retro gaming: data, tools, resources and transparency, with browser arcade play, ES-DE emulation and a physical game catalog on one set of system ids, for everyone (constitution §1).
What this repo is¶
Rewind Arcade serves anyone who wants to play, emulate and keep track of retro games across every format this tree supports. It is three programs that agree on names, not one process: Play (arcade/, a static React + TypeScript + Vite site), Emulate (emulate/, retro-pi: bash 3.2 + python3 with no pip, generating EmulationStation and RetroArch configuration) and Catalog (catalog/, cartridge-index: Python 3.11+ standard library only, one SQLite catalog). The root holds the wrappers, the shared system registry and the cross-pillar docs. A change is done when the suites of every pillar it touched pass (make check covers all three) and the docs it affects say what the code now does.
Each pillar has its own rules, which you must read before editing that tree: arcade/AGENTS.md (the GameManifest/GameInstance seam, the hash router, no game imports React), emulate/AGENTS.md (bash 3.2, lib/platform.sh is the only OS branch, never download content) and catalog/AGENTS.md (stdlib only, never move dumps, one definition of columns and matching).
Stack & commands¶
Quick start (the same block as the README):
# Play — browser arcade, no backend
npm install --prefix arcade && npm run dev --prefix arcade
# Emulate — desktop ROM library and emulator stack
./bin/retropi doctor
./bin/retropi install # ES-DE + RetroArch + cores + configuration
./bin/retropi frontend launch # browse and launch your own ROMs in ES-DE
# Catalog — index the platforms you collect
./bin/cartidx init --systems nes,snes,n64
Build, test and lint:
make help # every root target
make play # arcade dev server
make arcade-build # tsc -b + vite build -> arcade/dist/
make test # emulate + catalog suites, then the generated-docs checks
make check # arcade build + emulate check + catalog check + the generated-docs checks
make docs # regenerate docs/systems/README.md's table and the docs index
make -C emulate check # shellcheck + config validation + tests
make -C emulate test-linux # the emulate suite in Debian containers (bash 5.x, no PyYAML)
make -C catalog check # catalog tests + byte-compile
./bin/ci # the GitHub workflow jobs on this host
./bin/ci --act # the same YAML via nektos/act (Docker)
The arcade has no unit suite: npm run build --prefix arcade is its gate (strict, and unused locals or parameters fail the build).
Layout¶
arcade/ Play: browser games, console loader, catalog browser (React + TypeScript + Vite)
emulate/ Emulate: retro-pi manifests, RetroArch, EmulationStation (bash 3.2 + python3)
catalog/ Catalog: cartridge-index dumps, inventory, prices, SQLite (Python 3.11+ stdlib)
systems/registry.yaml one id per platform, used by every pillar
docs/ encyclopedia, getting started, architecture, formats, legal (index: docs/README.md)
bin/ retropi and cartidx wrappers, and ci (run the workflows locally)
tools/ repository tooling: the systems-table generator and the vendored docs index
retro-pi/ the former bamr87/retro-pi repository, imported with full history; reference only
features/, verify/ the fleet feature index and verification scenarios
RETROPI_ROOTisemulate/, not the monorepo root; the rootbin/retropiexecs the real script so path resolution is unchanged.bin/cartidxputscatalog/srconsys.path. Don't move those trees without updating the wrappers and the CI working directories.retro-pi/keeps its own README,bin/retropiand tests, run from inside it. Itsci.ymldoes not run from that path.
Conventions¶
- Backlog of record: GitHub Issues with the fleet labels (
.github/sdlc.yml,backlog.mode: issues). Pick up issues labelledagent:ready; never touchagent:holdorhuman-review. - Definition of Done: the touched pillars' suites green, the generated docs current (
make docs), and the fleet default pull-request checklist (this repo has no.github/pull_request_template.md, so the owner's default applies). - Decisions: ADRs in
docs/adr/NNNN-slug.md, indexed indocs/adr/README.md. Add one for anything hard to reverse. - Commits: Conventional Commits (
feat fix docs style refactor test chore perf ci build), scoped by pillar where it fits (feat(arcade): …). The PR title is the squash subject. - Branches:
feature/,fix/,docs/,refactor/,test/orchore/offmain. - Changelog:
CHANGELOG.mdis written by release-please (release.yml) from the PR titles. Never edit it, or a version number, by hand. - Markdown: one line per prose paragraph; do not hard-wrap. Tables, lists, headings and code blocks may wrap.
- Never: push to
maindirectly, commit lockfiles or secrets, suppress type errors, leave empty exception handlers, or edit generated files by hand (theAUTOspans indocs/systems/README.mdanddocs/README.md,emulate/build/,arcade/dist/).
Hard constraints (all pillars)¶
- Never commit game data. ROM files, BIOS images,
emulate/config/local.yaml,catalog/cartridge.toml,catalog/collection/,catalog/data/reference/andcatalog/workspace/stay out of git. - Never download games or BIOS. Cores and emulators, yes. Catalog
fetchis metadata only. Arcade ships original recreations, not dumps. - Never move dumps. The catalog records what a file is and what you own, in place.
- Do not mix stacks. Arcade does not import emulate or catalog code. Emulate does not call cartidx. Catalog may assume emulate's folder names (
roms/<id>) but must not import emulate code. - System ids are defined once, in
systems/registry.yaml, and must matchemulate/config/systems/<id>.yamlandcatalog/src/cartridge_index/platforms.py. The platform table indocs/systems/README.mdis generated from the registry bypython3 tools/gen_systems_table.py.
Where to work¶
| Change | Lives in |
|---|---|
| A browser game | arcade/src/games/<id>/ + arcade/src/games/registry.ts |
| Arcade engine / HUD | arcade/src/engine/, arcade/src/ui/ |
| A console to play | emulate/config/systems/<id>.yaml only |
| Dump identification | catalog/src/cartridge_index/systems/ |
| Shelf / price platforms | catalog/src/cartridge_index/platforms.py |
| Title matching | catalog/src/cartridge_index/matching.py only |
| A new platform id | systems/registry.yaml, then make docs, then the matching emulate manifest and catalog platform |
| Encyclopedia | docs/systems/<family>.md |
How the pillars share ids and stay decoupled is docs/architecture.md.
Tests that encode the docs map¶
Do not "clean up" these strings; the suites assert them:
emulate/tests/test_docs.sh: every command inemulate/cmd/appears inemulate/docs/commands.mdand its--helpstarts withretropi <name>; internal links inemulate/*.md,emulate/docs/*.mdandemulate/*/README.mdresolve; everyemulate/docs/*.mdis listed inemulate/docs/README.md;emulate/README.mdlinksdocs/README.md;emulate/CONTRIBUTING.mdstatesbash 3.2andmake test-linux; everyemulate/lib/module is named inemulate/docs/architecture.mdandemulate/AGENTS.md.catalog/tests/test_docs.py: every CLI command appears ascartidx <cmd>incatalog/README.md, and every schema column incatalog/docs/data-dictionary.md.make test/make checkat the root:python3 tools/gen_systems_table.py --checkandpython3 tools/docs_index.py --check.
Fleet context¶
Member of the bamr87 fleet, vendored as the submodule projects/rewind-arcade of bamr87/bamr87: commit and push here first; the hub bumps its pointer afterwards. The standards live in the hub's specs/ (the Universal Project Standard); this repo's SDLC declaration is .github/sdlc.yml. What acts on it:
ci.ymlcalls the hub's sharedstandard-ci.yml;arcade.yml,emulate.ymlandcatalog.ymlgate their own pillar on path filters;deploy.ymlpublishes the arcade to GitHub Pages;conformance.ymlandverify.ymlcall the hub's shared checks;release.ymlruns release-please;claude.ymlanswers@claude.- The hub's fleet loops (fleet-pulse doctor, issue pipeline, standardization fan-outs) open pull requests here; none of them merges.
Standard deviations¶
none
Governance¶
Read docs/constitution.md before changing anything: it is the highest-precedence rule set here and wins over this file when they disagree. It changes only through a numbered record in docs/amendments/, ratified by the maintainer merging the PR; agents propose, never merge. Every user-facing feature has a stable id in features/features.yml with status, location and the PRD requirement ids it serves; the PRD's "Feature catalog" block is generated from it (python3 <bamr87/bamr87>/tools/governance_lint.py prd-sync . --write; check with … check .). Never hand-edit that block or CHANGELOG.md.