Contributing to PCSX2
Code of Conduct
The PCSX2 project expects all contributors to maintain a reasonable level of decorum. Be respectful, take compliments and critiques in stride, and treat others the way you wish to be treated.
This is an equal opportunity space and hate towards any group or audience will not be tolerated.
Quality Standards
The PCSX2 project has a decades old codebase with ever evolving standards, and technical debt. The team is obligated to screen contributions for quality, and reject contributions which may be deemed harmful to the stability of the project, whether immediate or long term, at their own discretion.
Please make sure your code is up to modern practices, and be receptive to feedback about cleaning up code, or changing code style.
Large Language Model (LLM) Usage Policy
LLMs such as ChatGPT, Claude, and Copilot have become mainstays in the programming world and are becoming more widely used for code generation. As such, ground rules need to be set for their use in and around the PCSX2 project.
The project's official stance is that while some LLM usage is acceptable, this is nuanced and must be controlled to prevent long term damage from low quality submissions. As such, the following rules are in place:
- Contributors MUST declare whether they use LLMs or not.
- Contributors may use LLMs for auto completion, templating/boilerplating, or partial code generation.
- Contributors must NOT use LLMs for full code generation.
- Contributors must be able to fully explain their contribution, and why they decided to implement it as they did, without LLM assistance.
- Contributors who falsely state their LLM usage will have their contributions refused.
How to Contribute
As a first step, please review these links as they'll help you understand how the development of PCSX2 works.
- How to Contribute
- Just Starting Out
- Pull Request Guidelines
- Commenting Etiquette
- General Documentation And Coding Strategies
If you have no experience in programming or just want to help us in any shape or form, here is what you can do:
- If you find application or emulation bugs, feel free to report an issue on our GitHub
- If you have a knack for writing articles or testing games in general, we are always looking for help!
- Please join our Discord if you are interested!
- A game runs well or has a weird workaround? Head over to the Wiki and let us know on Discord!
- Want to help translating PCSX2 to your language? Head over to Crowdin and start right away!
However if you do have experience in programming and wanted to contribute code, read on!
Just Starting Out
- If you're unfamilar with git, check out this brief introduction to Git
- How to build PCSX2 for Windows
- How to build PCSX2 for macOS
- How to build PCSX2 for Linux
General Documentation And Coding Strategies
Pull Request Guidelines
The following is a list of general style recommendations that will make reviewing and merging easier:
-
Commit Messages
-
Please try to prefix your commit message, indicating what area of the project was modified.
- For example
GS: message.... - Looking at the project's commit history will help with keeping prefixes consistent overtime, there is no strictly enforced list.
- For example
-
Try to keep messages brief and informative
-
Remove unnecessary commits and squash commits together when appropriate.
- If you are not familiar with rebasing with git, check out the following resources:
-
-
Code Styling and Formatting
-
We use
git clang-formatto auto format code files and encourage its use in most scenarios:- This only formats your changes, rather than entire files.
- This helps prevent breakage where non-standard formatting is purposely used.
- We use
git clang-formatprimarily for C++ source and header files. - When in doubt, ask what should and should not be formatted.
-
Run
git clang-formatusing the configuration file in the root of the repository- Visual Studio Setup
- IMPORTANT - if you are running
git clang-formaton unrelated changes (ie. formatting an entire file), please do so in a separate commit.- If you cannot scope your
git clang-formatto just your changes and do not want to format unrelated code. Try your best to stick with the existing formatting already established in the file in question.
- If you cannot scope your
GitHub allows users to comment nearly everywhere. You can comment on issues, on commits, or even on one concrete line of a commit. This is a very powerful tool, but also has a great potential for abuse.
Keeping it real
The comment system is not a forum, and is generally not for idle chat. Many of the devs have comments feeding directly into our inboxes, and a bunch of spam for smileys or statements like "make it faster plz" isn't what we consider a good time. So please be considerate.
There are a few rules an guidelines that we all need to follow in order for this public feedback system to work:
- Comments should be relevant to the commit/issue and should contain useful information.
- If you're having general problems with PCSX2, you can use our Issue tracker, or if you don't really know what revision causes it, our Public Forum. This way we can discuss and troubleshoot the issue in depth, in its right place.
- Statements like "please make it faster" or "please fix my game" are not acceptable and will be deleted.
- Phrasing the statement as a question like "Will this make it faster?" or "Will this fix my game?" is not acceptable either, and will also be deleted.
- If we delete your post, there was a good reason for it. Deleting posts without justification would be counter-productive, much the same way that allowing posts with no relevant content would also be counter-productive.