mirror of
https://github.com/zeldaret/oot.git
synced 2024-12-04 08:46:07 +00:00
Docs: suggest checking MM, mention virtualenv, clarify about expected/
This commit is contained in:
parent
f2ba27ae98
commit
ec59d604e2
1 changed files with 20 additions and 8 deletions
|
@ -8,19 +8,24 @@ different compiler flags. However, once this version is done, future
|
||||||
retail versions should be much easier, as the changes between retail versions are
|
retail versions should be much easier, as the changes between retail versions are
|
||||||
small in comparison.
|
small in comparison.
|
||||||
|
|
||||||
Instead of comparing against a matching build, the target ROM is disassembled
|
Instead of `cp`ing a matching build into `expected/`, the target ROM is
|
||||||
and recompiled as relocatable `.o` files directly into `expected/build/gc-eu-mq`
|
recompiled as `.o` files directly into `expected/build/gc-eu-mq` for diff tools.
|
||||||
for diff tools. This allows us to make progress matching code in parallel with
|
This allows us to make progress matching code in parallel with solving other
|
||||||
solving other problems (such as the build system, ROM organization, and BSS
|
problems (such as the build system, ROM organization, and BSS ordering). The
|
||||||
ordering). The files in `tools/disasm/gc-eu-mq` say how to split the source
|
files in `tools/disasm/gc-eu-mq` say how to split the source files and where the
|
||||||
files and where the functions and variables are in the target ROM, and these may
|
functions and variables are in the target ROM, and these may need to be updated
|
||||||
need to be updated if there are mistakes or if function names change due to
|
if there are mistakes or if function names change due to documentation work.
|
||||||
documentation work.
|
|
||||||
|
|
||||||
Unfortunately, the disassembly is not perfect, so a "correct" decompilation might
|
Unfortunately, the disassembly is not perfect, so a "correct" decompilation might
|
||||||
still show diffs with data symbols. We might improve this later, but these data
|
still show diffs with data symbols. We might improve this later, but these data
|
||||||
diffs are fine to ignore for now.
|
diffs are fine to ignore for now.
|
||||||
|
|
||||||
|
For register and stack allocation differences, often the code can be tweaked so
|
||||||
|
that it matches both the retail ROM while continuing to match the Debug ROM (for
|
||||||
|
example, by reordering assignments or moving a local variable declaration inside
|
||||||
|
an `if` block). Since retail MM versions use the same compiler flags as retail
|
||||||
|
OOT, checking MM decomp for similar code can help.
|
||||||
|
|
||||||
We can disable code that was removed in retail builds by adding
|
We can disable code that was removed in retail builds by adding
|
||||||
`#ifdef OOT_DEBUG` around these parts of the code. In order too keep the code
|
`#ifdef OOT_DEBUG` around these parts of the code. In order too keep the code
|
||||||
readable, we should try to minimize the amount of `#ifdef` noise whenever
|
readable, we should try to minimize the amount of `#ifdef` noise whenever
|
||||||
|
@ -115,6 +120,13 @@ void foo() {
|
||||||
|
|
||||||
## Diff Tools
|
## Diff Tools
|
||||||
|
|
||||||
|
Note that many tools will require activating the Python virtual environment
|
||||||
|
in your terminal session. To do this, run:
|
||||||
|
|
||||||
|
```sh
|
||||||
|
source .venv/bin/activate
|
||||||
|
```
|
||||||
|
|
||||||
### retail_progress.py
|
### retail_progress.py
|
||||||
|
|
||||||
Running `./retail_progress.py file.c` will attempt to figure out which functions
|
Running `./retail_progress.py file.c` will attempt to figure out which functions
|
||||||
|
|
Loading…
Reference in a new issue