mirror of
https://github.com/ProjectLeonida/mandy.git
synced 2026-12-06 16:28:38 +00:00
3.0 KiB
3.0 KiB
Contributing
Thanks for helping. A few rules keep the project safe to host:
- No game data, ever. That covers archives, the executable, carved files, shaders (DXBC, FSSM, disassembly,
SPIR-V), textures, models, audio, videos, and reports or logs that quote them.
.gitignoreblocks the common types; checkgit statusbefore you commit anyway. - No keys, decryption or protection workarounds, and no links to where to get them. The tools only read files that are already plain on disk.
- Short excerpts needed to explain a format (a few header bytes, one instruction sequence) are fine in docs and comments.
Before you start
Claim the work in #156 first: check its tables and the open
pull requests, post claiming: <ID> there (or a one-line description for something not listed yet), and put the ID
in your pull request. When two pull requests overlap anyway, the one that lands first is merged and the other is
asked to rebase or close. GPU test results go in #166.
Working on the code
- Python tools run with
python -Iand use only the standard library unless a file says otherwise. tools/rpf9dumpneeds the submodule:git submodule update --init.- A new shader-translator rule goes into the contract table in
docs/design.md, with how it was confirmed: a GPU test, a Mesa/LLVM reference, or a count over the corpus. python -I tests/test_<name>.pyruns one of the unit tests (standard library only; CI runs them all).- Runtime tests:
cmake -S runtime -B runtime/build,cmake --build runtime/build, thenctest --test-dir runtime/build --output-on-failure. The CPU tests that need no game data are configured on Windows. Tests that need the retail package readLEONIDA_GAME_DIR(andLEONIDA_MOVIEfor the Bink decode test) in place and printSKIPwhen the variable is unset; never copy or commit those files. - Viewer streaming tests:
node --test tests/test_viewer_streaming.cjs(Node.js 22+, no packages, browser, network or game data). These execute the viewer streaming code with a synthetic loader and clock. - Tool checks:
python -m compileall -q make_game.py tools tests. The optionalvk_pipeline_check <spirv dir> [cache.bin] [--jobs N]creates a module (and, for compute shaders, a pipeline) for every translated shader and reports failures plus the saved cache path. - GPU tests are small hand-written RDNA2 programs in
runtime/test/shaders.build.pythere turns them into SPIR-V (it needsllvm-mc, so WSL or a Linux container), andcheck.pyruns them on your GPU and compares the results. A new test gets its expected values in the comment at its top and a check incheck.py. - Say what you tested and on which GPU in the pull request.
- Run the translator tests with
python -m unittest discover -s tests/semantic -v(seetests/semantic/README.md). A new translator rule should come with a small hand-written.asmfixture and its expected output words.