* EnBigpo: start * EnBigpo: uhh, this struct is weird * EnBigpo: progress * EnBigpo: so many of these functions are tiny * EnBigpo nasty four loop function * EnBigpo: hate draw functions * EnBigpo: all functions attempted * EnBigpo: data migrated, does not OK, 2 bytes off... * Multi: Attempting to OK, issues * EnBigpo: more docs * EnBigpo: more docs2 * EnBigpo: more docs and cleaning * EnBigpo: removed data to try to find the issues, matched a draw function thanks to Tharo * EnBigpo: progress? maybe not * EnBigpo: matched another function * EnBigpo: overwrite limbdraw matches now * EnBigpo: one more nonmatching rejected * EnBigPo: not actual progress, probably * Match Init, down to single stack pointer on second func * EnBigPo OK * EnBigpo: docs and cleaning * EnBigpo: more docs and cleaning * EnBigpo: back to OK with no warnings * EnBigpo: more docs and cleaning * EnBigpo: docs and cleaning * EnBigpo: hmm, rename_sym doesn't like renaming system functions but I'm 98% sure I know what these are * Multiple: changed some function names, maybe changed too much... hmm * EnBigpo: even more changes to docs * EnBigpo: formater pass * EnBigpo: small fixes * EnBigpo: c file description * Apply suggestions from code review Apply camera suggestions from eng124 Co-authored-by: engineer124 <47598039+engineer124@users.noreply.github.com> * EnBigpo: updating all requested changes and reverting one incorrect macro * Apply suggestions from code review Some of eng124's recommendations, need to add the last by hand Co-authored-by: engineer124 <47598039+engineer124@users.noreply.github.com> * EnBigpo: back to OK * EnBigpo: Minor cleanup changes * Functions fixed: added function changes to actorfixer and fixed dinofos * EnBigpo: BINANG_ROT180 * Apply suggestions from code review First batch of requested changes, the simpler ones that shouldn't require checking Co-authored-by: engineer124 <47598039+engineer124@users.noreply.github.com> Co-authored-by: Anghelo Carvajal <angheloalf95@gmail.com> * EnBigpo: fixes to recommended changes, back to OK * EnBigpo: move idleTimer docs out of struct * Sprite: removed old commented out pragma, it matches, I still dont get it * EnBigpo: more changes I had to check first * EnBigpo: more requested changes, and some macro uses found * EnBigpo: forgot a requested change * Update src/overlays/actors/ovl_En_Bigpo/z_en_bigpo.c Co-authored-by: engineer124 <47598039+engineer124@users.noreply.github.com> * Apply suggestions from code review Co-authored-by: engineer124 <47598039+engineer124@users.noreply.github.com> * EnBigPo: missed a disphead array access * Apply suggestions from code review More requested changes Co-authored-by: engineer124 <47598039+engineer124@users.noreply.github.com> * EnBigpo: more hex to dec * EnBigpo: more hex to dec 2 * Update src/overlays/actors/ovl_En_Bigpo/z_en_bigpo.c Co-authored-by: engineer124 <47598039+engineer124@users.noreply.github.com> * Update include/functions.h Co-authored-by: engineer124 <47598039+engineer124@users.noreply.github.com> * EnBigpo: build being weird * EnBigpo: weird, rename_sym didn't catch this earlier * Tools: fixed actorfixer to use Play_CameraSetAtEye forgot I blew this change away trying to get build again, * Update src/overlays/actors/ovl_En_Bigpo/z_en_bigpo.h Co-authored-by: Kenix3 <kenixwhisperwind@gmail.com> * EnBigpo: cutscene functions changed name to indicate they are stages * EnBigpo: Rename Particles to Effect * EnBigpo: changed draw function names, changed function comment format * EnBigpo: renamed limbdraw functions, formater pass Co-authored-by: isghj8 <isghj8@gmail.com> Co-authored-by: engineer124 <engineer124engineer124@gmail.com> Co-authored-by: engineer124 <47598039+engineer124@users.noreply.github.com> Co-authored-by: Anghelo Carvajal <angheloalf95@gmail.com> Co-authored-by: Kenix3 <kenixwhisperwind@gmail.com> |
||
|---|---|---|
| .github | ||
| assets | ||
| include | ||
| src | ||
| tools | ||
| .clang-format | ||
| .clang-tidy | ||
| .gitattributes | ||
| .gitignore | ||
| CONTRIBUTING.md | ||
| Jenkinsfile | ||
| Makefile | ||
| README.md | ||
| REVIEWING.md | ||
| checksum.md5 | ||
| checksum_uncompressed.md5 | ||
| diff.py | ||
| diff_settings.py | ||
| extract_assets.py | ||
| first_diff.py | ||
| fixle.sh | ||
| format.sh | ||
| requirements.txt | ||
| spec | ||
| sym_info.py | ||
| undefined_syms.txt | ||
README.md
Legend of Zelda: Majora's Mask (US) 1.0
- WARNING! -
The ROM this repository builds while has a matching checksum cannot be 'shifted' due
to hardcoded pointers which have yet to be dumped. Thus this repository is currently
in an experimental and research phase and cannot currently be used traditionally as a
source code base for general changes.
This repo does not include any assets or code necessary for compiling the ROM. A prior copy of the game is required to extract the required assets.
This is a decompilation of Legend of Zelda: Majora's Mask (US) 1.0
It builds the following ROM:
- mm.us.rev1.rom.z64
md5: 2a0a8acb61538235bc1094d297fb6556
Please refer to the following for more information:
Installation
Windows
For Windows 10, install WSL and a distribution by following this Windows Subsystem for Linux Installation Guide. We recommend using Debian or Ubuntu 18.04 Linux distributions.
Linux (Native or under WSL / VM)
1. Install build dependencies
The build process has the following package requirements:
- make
- git
- build-essential
- binutils-mips-linux-gnu
- python3
- pip3
- libpng-dev
Under Debian / Ubuntu (which we recommend using), you can install them with the following commands:
sudo apt update
sudo apt install make git build-essential binutils-mips-linux-gnu python3 python3-pip libpng-dev
To install the Python dependencies simply run in a terminal:
python3 -m pip install -r requirements.txt
2. Fork the repository
Create your own fork of the repository at https://github.com/zeldaret/mm. Then clone your fork where you wish to have the project, with the command:
git clone https://github.com/<YOUR_USERNAME>/mm.git
3. Prepare a base ROM
Copy your ROM to inside the root of this new project directory, and rename the file of the baserom to reflect the version of ROM you are using. ex: baserom.mm.us.rev1.z64
4. Make and Build the ROM
To start the extraction/build process, run the following command:
make init
This will extract all the individual files in the ROM into a newly created baserom folder, as well as decompress the compressed files in a newly created decomp folder. This will create the build folders as well as a new folder with the ASM as well as containing the disassemblies of nearly all the files containing code.
This make target will also build the ROM. If all goes well, a new ROM called "mm.us.rev1.rom.z64" should be built and the following text should be printed:
mm.us.rev1.rom.z64: OK
If you instead see the following:
mm.us.rev1.rom.z64: FAILED
md5sum: WARNING: 1 computed checksum did NOT match
This means that something is wrong with the ROM's contents. Either the baserom files are incorrect due to a bad ROM, or some of the code is not matching.
Running make init will also make the ./expected directory and copy all of the files there, which will be useful when running the diff script. The diff script is useful in decompiling functions and can be ran with this command: ./tools/asm-differ/diff.py -wmo3 <insert_function_here>
Note: to speed up the build, you can either:
- Pass
-jNtomake setupandmake, where N is the number of threads to use in the build, e.g.make -j4. The generally-accepted wisdom is to use the number of virtual cores your computer has. - Pass
-jtomake setupandmake, to use as many threads as possible, but beware that this can use too much memory on lower-end systems. Both of these have the disadvantage that the ordering of the terminal output is scrambled, so for debugging it is best to stick to one thread (i.e. not pass-jor-jN).
Note: if you rename symbols, it is recommended that you use the tools/rename_sym.sh to ensure that you cover all instances, including the tables which are used to generate the asm/ directory.
Usage: tools/rename_sym.sh old_name new_name. Example:
tools/rename_sym.sh func_808A3428 EnTorch2_UpdateIdle
Contributing
All contributions are welcome. This is a group effort, and even small contributions can make a difference. Some tasks also don't require much knowledge to get started.
Anyone who wishes to contribute to the OOT or MM projects must not have accessed leaked source code at any point in time for Nintendo 64 SDK, iQue player SDK, libultra, Ocarina of Time, Majora's Mask, Animal Crossing/Animal Forest, or any other game that shares the same game engine or significant portions of code to a Zelda 64 game or any other console similar to the Nintendo 64.
Most discussions happen on our Discord Server, where you are welcome to ask if you need help getting started, or if you have any questions regarding this project and other decompilation projects.
For more information on getting started, see our Contributing Guide and our Code Review Guidelines to see what code quality guidelines we follow.