mirror of
https://github.com/YohannDR/mzm.git
synced 2024-11-23 13:09:43 +00:00
Update CONTRIBUTING.md with mention of clean room design
This commit is contained in:
parent
def20b8d93
commit
003efdcec8
@ -1,12 +1,32 @@
|
||||
# Important
|
||||
Anyone wanting to contribute *MUST* read the following and adhere to the steps
|
||||
outlined, in order to not violate any Copyright.
|
||||
|
||||
This decompile is a [clean room design](https://en.wikipedia.org/wiki/Clean_room_design).
|
||||
It *MUST* not incorperate any code owned by Nintendo or other third parties.
|
||||
|
||||
In Order to achieve this all code has to be written completely fresh, without
|
||||
reference to any third party code, no matter if leaked or not.
|
||||
|
||||
Derived from this there is the following requirement for contributors:
|
||||
|
||||
- Contributors *MUST NOT* study or refer to any code owned by Nintendo or other
|
||||
third parties.
|
||||
|
||||
# Decompiling
|
||||
|
||||
These are the rough steps to decompile a function:
|
||||
Before starting any decompilation, make sure the project builds correctly:
|
||||
|
||||
1. pick a function to decompile (from `asm/`)
|
||||
2. make sure it's not one of the few hand-written functions that can't be decompiled
|
||||
```
|
||||
$ make check
|
||||
```
|
||||
|
||||
Then these are the rough steps to decompile a function:
|
||||
|
||||
1. pick a function to decompile (from `asm/disasm_*.s`)
|
||||
2. create a new file in `src/` if necessary (also adjust `linker.ld`)
|
||||
3. go through it, roughly line by line, and translate it into C (into the proper file in `src/`)
|
||||
4. adjust `linker.ld` if required
|
||||
5. compile it, see what doesn't match, and change it
|
||||
6. repeat step 4. until everything matches (`make diff` can be helpful, as well as https://cexplore.karathan.at/ and https://decomp.me/)
|
||||
7. make sure everything still works (`make check` should give you OK)
|
||||
8. open a PR on github
|
||||
4. compile it, see what doesn't match, and change it
|
||||
5. repeat step 4. until everything matches (`make diff` can be helpful, as well as https://cexplore.karathan.at/ and https://decomp.me/)
|
||||
6. make sure everything still works (`make check` should give you OK)
|
||||
7. open a PR on github
|
||||
|
Loading…
Reference in New Issue
Block a user