Nonmatching code is a C++ implementation that compiles correctly and is functionally equivalent to the original, but whose compiled output does not yet match the original binary byte-for-byte. This happens when the exact compiler behavior — register allocation, instruction scheduling, inlining decisions — cannot yet be fully reproduced. Nonmatching contributions are accepted in Petari, but they must be clearly marked so that other contributors know the function still needs work.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/SMGCommunity/Petari/llms.txt
Use this file to discover all available pages before exploring further.
Marking code as nonmatching
If your implementation does not produce a 1:1 match, you must do two things in a comment directly above the function:- Explain why it does not match
- Include a decomp.me scratch link so others can pick up where you left off
The int vs s32 type issue
One common cause of nonmatching is usings32 where the original symbol uses int. Although both types represent a 32-bit signed integer, they mangle to different symbols in CodeWarrior. If the symbol table shows int in the function signature, you must use int — not s32.
Nonmatching code is accepted as long as it is clearly marked with a comment explaining the mismatch and a decomp.me scratch link. A well-documented nonmatch is far more useful to the project than no implementation at all — it gives future contributors a starting point and records what has already been tried.
Submitting nonmatching code
Before opening a pull request with nonmatching code:- Confirm the function is functionally correct (same behavior as the original)
- Add the nonmatching comment with the reason and decomp.me link
- Follow all other code style guidelines