Decompilation of The Legend of Zelda: Majora's Mask
Go to file
Anghelo Carvajal 062a813fba
Misc fixes (#159)
* Fix `extract_assets` not properly checking if scenes files were updated

* fix `first_diff.py` path due to the baserom renaming

* FlexSkeletonHeader and other stuff

* fix some SkeletonHeader instead of FlexSkeletonHeader

* Add blob compilation to makefile

* CURRENT_DAY and type swaps

* Remove extra cast

* run format

* zbanks suggestions
2021-05-20 18:52:07 -04:00
assets Extract assets in `make setup`, don't extract them to `assets/src/` and build them in `make` (#132) 2021-05-13 21:00:38 -04:00
include Misc fixes (#159) 2021-05-20 18:52:07 -04:00
linker_scripts ovl_Bg_Ladder: OK (Wooden Ladder) (#135) 2021-05-20 18:06:00 -04:00
src Misc fixes (#159) 2021-05-20 18:52:07 -04:00
tables ovl_Bg_Ladder: OK (Wooden Ladder) (#135) 2021-05-20 18:06:00 -04:00
tools Make Jenkins check if a PR will add new warnings (#150) 2021-05-19 22:14:20 -04:00
.clang-format Adds clang-format script to MM 2020-07-24 19:57:54 -04:00
.clang-tidy Adds clang-format script to MM 2020-07-24 19:57:54 -04:00
.gitattributes Fixes IDO recomp and allows git to detect binary files. (#50) 2021-02-25 18:21:51 -05:00
.gitignore `diff.py` symlink and `graphovl.py` (#151) 2021-05-18 22:21:14 -04:00
.gitmodules Small env fixes: git submodules & python3 (#127) 2021-05-18 19:53:11 -04:00
Jenkinsfile Make Jenkins check if a PR will add new warnings (#150) 2021-05-19 22:14:20 -04:00
Makefile Misc fixes (#159) 2021-05-20 18:52:07 -04:00
README.md QOL addtions to the readme (#104) 2021-05-18 18:39:08 -04:00
checksum.md5 QOL addtions to the readme (#104) 2021-05-18 18:39:08 -04:00
checksum_uncompressed.md5 QOL addtions to the readme (#104) 2021-05-18 18:39:08 -04:00
diff.py `diff.py` symlink and `graphovl.py` (#151) 2021-05-18 22:21:14 -04:00
diff_settings.py QOL addtions to the readme (#104) 2021-05-18 18:39:08 -04:00
extract_assets.py Misc fixes (#159) 2021-05-20 18:52:07 -04:00
file_setup.sh Decompiles z_vr_box (from zel) (#73) 2021-03-16 21:27:14 -04:00
first_diff.py Misc fixes (#159) 2021-05-20 18:52:07 -04:00
fixle.sh Update tools (#16) 2020-09-13 21:09:13 -04:00
format.sh Format everything (#141) 2021-05-18 20:00:36 -04:00
requirements.txt Updates progress.py to use the git module for outputting commit hash 2021-03-10 22:28:06 -05:00
sym_info.py Add some OOT tools (#17) 2020-09-17 17:11:59 -04:00
undef.txt Scene Changes (#114) 2021-05-09 22:12:42 -04:00

README.md

Legend of Zelda: Majora's Mask (US) 1.0

Build Status Decompilation Progress Contributors Discord Channel

- 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 all assets 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:

Website: https://zelda64.dev/

Discord: https://discord.zelda64.dev

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

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

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>

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.

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.