{"id":15035964,"url":"https://github.com/zeldaret/mm","last_synced_at":"2025-05-14T07:08:18.198Z","repository":{"id":36990113,"uuid":"247875852","full_name":"zeldaret/mm","owner":"zeldaret","description":"Decompilation of The Legend of Zelda: Majora's Mask","archived":false,"fork":false,"pushed_at":"2025-04-23T13:55:54.000Z","size":125042,"stargazers_count":1402,"open_issues_count":11,"forks_count":490,"subscribers_count":44,"default_branch":"main","last_synced_at":"2025-04-23T14:43:26.264Z","etag":null,"topics":["decompilation"],"latest_commit_sha":null,"homepage":"https://zelda.deco.mp/games/mm","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/zeldaret.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"docs/CONTRIBUTING.md","funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2020-03-17T04:03:07.000Z","updated_at":"2025-04-23T13:55:59.000Z","dependencies_parsed_at":"2025-02-06T11:07:30.022Z","dependency_job_id":"5c5c30a0-f41f-4e84-a8be-dc04e571c961","html_url":"https://github.com/zeldaret/mm","commit_stats":{"total_commits":1845,"total_committers":78,"mean_commits":"23.653846153846153","dds":0.8601626016260162,"last_synced_commit":"385c45ad483502a03c6f93b81e5b1ed5e08281d0"},"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zeldaret%2Fmm","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zeldaret%2Fmm/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zeldaret%2Fmm/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zeldaret%2Fmm/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zeldaret","download_url":"https://codeload.github.com/zeldaret/mm/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254092657,"owners_count":22013290,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["decompilation"],"created_at":"2024-09-24T20:29:50.618Z","updated_at":"2025-05-14T07:08:18.177Z","avatar_url":"https://github.com/zeldaret.png","language":"C","funding_links":[],"categories":["Reverse Engineering","Game \u0026 Studio Tools","Nintendo Wii"],"sub_categories":["Projects","Nintendo EAD"],"readme":"# Legend of Zelda: Majora's Mask (US) 1.0\n\n[![Build Status][jenkins-badge]][jenkins] [![Decompilation Progress][progress-badge]][progress] [![Contributors][contributors-badge]][contributors] [![Discord Channel][discord-badge]][discord]\n\n[jenkins]: https://jenkins.deco.mp/job/MM/job/main\n[jenkins-badge]: https://img.shields.io/jenkins/build?jobUrl=https%3A%2F%2Fjenkins.deco.mp%2Fjob%2FMM%2Fjob%2Fmain\n\n[progress]: https://zelda.deco.mp/games/mm\n[progress-badge]: https://img.shields.io/endpoint?url=https://zelda.deco.mp/assets/csv/progress-mm-shield.json\n\n[contributors]: https://github.com/zeldaret/mm/graphs/contributors\n[contributors-badge]: https://img.shields.io/github/contributors/zeldaret/mm\n\n[discord]: https://discord.zelda.deco.mp\n[discord-badge]: https://img.shields.io/discord/688807550715560050?color=%237289DA\u0026logo=discord\u0026logoColor=%23FFFFFF\n\n```diff\n- WARNING! -\n\nThis repository is a work in progress, and while it can be used to make certain changes, it's \nstill constantly evolving. If you wish to use it for modding purposes in its current state,\nplease be aware that the codebase could drastically change at any time. Also note that some\nparts of the ROM may not be 'shiftable' yet, so modifying them could currently be difficult.\n```\n\nThis is a WIP **decompilation** of ***The Legend of Zelda: Majora's Mask***. The purpose of the project is to recreate a source code base for the game from scratch, using information found inside the game along with static and/or dynamic analysis. **It is not, and will not, produce a PC port.** For frequently asked questions, you can visit [our website](https://zelda.deco.mp/games/mm), and for more information you can get in touch with the team on our [Discord server](https://discord.zelda.deco.mp).\n\nThe only version currently supported is N64 US, but we intend to eventually support every retail version of the original game (i.e. not versions of MM3D, which is a totally different game).\n\nIt currently builds the following ROM and compressed ROM:\n\n* mm-n64-us.z64 `md5: f46493eaa0628827dbd6ad3ecd8d65d6`\n* mm-n64-us-compressed.z64 `md5: 2a0a8acb61538235bc1094d297fb6556`\n\n**This repo does not include any assets or assembly code necessary for compiling the ROM. A prior copy of the game is required to extract the required assets.**\n\nPlease refer to the following for more information:\n\n- [Website](https://zelda.deco.mp/)\n- [Discord](https://discord.zelda.deco.mp/)\n- [How to Contribute](docs/CONTRIBUTING.md)\n\n## Installation\n\n### Windows\n\nFor Windows 10, install WSL and a distribution by following this\n[Windows Subsystem for Linux Installation Guide](https://docs.microsoft.com/en-us/windows/wsl/install-win10).\nWe recommend using Debian or Ubuntu 20.04 Linux distributions.\n\n### MacOS\n\nPreparation is covered in a [separate document](docs/BUILDING_MACOS.md).\n\n### Docker\n\nPreparation is covered in [Building Docker](docs/BUILDING_DOCKER.md).\n\n### Linux (Native or under WSL / VM)\n\n#### 1. Install build dependencies\n\nThe build process has the following package requirements:\n\n* make\n* git\n* build-essential\n* binutils-mips-linux-gnu\n* curl\n* python3\n* python3-pip\n* python3-venv\n* libpng-dev\n* libxml2-dev\n\nUnder Debian / Ubuntu (which we recommend using), you can install them with the following commands:\n\n```bash\nsudo apt update\nsudo apt install make git build-essential binutils-mips-linux-gnu curl python3 python3-pip python3-venv libpng-dev libxml2-dev\n```\n\n#### 2. Clone the repository\n\nCreate 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:\n\n```bash\ngit clone https://github.com/\u003cYOUR_USERNAME\u003e/mm.git\n```\n\nThis will copy the GitHub repository contents into a new folder in the current directory called `mm`. Change into this directory before doing anything else:\n\n```bash\ncd mm\n```\n\n#### 3. Prepare a base ROM\n\nPlace a copy of the US ROM inside the `baseroms/n64-us/` folder.\n\nRename the file to `baserom.z64`, `baserom.n64` or `baserom.v64`, depending on the original extension.\n\n#### 4. Make and Build the ROM\n\nTo start the extraction/build process, run the following command:\n\n```bash\nmake init\n```\n\nThe extraction/build process:\n1. Prepares build environment:\n    - Creates a Python virtual environment\n    - Downloads necessary tools from pip\n    - Compiles tools for the build process\n2. Extracts ROM contents:\n    - Decompresses the ROM\n    - Extracts individual files\n    - Extracts archive files\n3. Extracts assets:\n    - Extracts assets based on the XML files found in `assets/xml`\n4. Disassembles code:\n    - Disassembles code-containing files\n    - Disassembles data (data, rodata, and bss)\n5. Builds the ROM:\n    - Compiles the code and assets into a new ROM\n    - Generates a compressed version of the ROM\n\nIf all goes well, the new ROM should be built at `build/n64-us/mm-n64-us.z64`, a compressed version generated at `build/n64-us/mm-n64-us-compressed.z64`, and the following text printed:\n\n```bash\nbuild/n64-us/mm-n64-us.z64: OK\n```\nand\n```bash\nbuild/n64-us/mm-n64-us-compressed.z64: OK\n```\n\nIf you instead see the following:\n\n```bash\nbuild/n64-us/mm-n64-us.z64: FAILED\nmd5sum: WARNING: 1 computed checksum did NOT match\n```\nor\n```bash\nbuild/n64-us/mm-n64-us-compressed.z64: FAILED\nmd5sum: WARNING: 1 computed checksum did NOT match\n```\n\nThis 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.\n\nRunning `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 run with this command: `./tools/asm-differ/diff.py -wmo3 \u003cinsert_function_here\u003e`\n\n**Note**: to speed up the build, you can pass `-jN` to `make setup` and `make`, 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, which is the output of `nproc` (which should be installed as part of `coreutils`).\nThe 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 `-jN`).\n(`-j` also exists, which uses unlimited jobs, but is generally slower.)\n\n## Contributing\n\nAll contributions are welcome. This is a group effort, and even small contributions can make a difference.\nSome work also doesn't require much knowledge to get started.\n\nPlease note that is is our strict policy that *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.*\n\nMost discussions happen on our [Discord Server](https://discord.zelda.deco.mp), where you are welcome to ask if you need help getting started, or if you have any questions regarding this project or ZeldaRET's other decompilation projects.\n\nFor more information on getting started, see our [Contributing Guide](docs/CONTRIBUTING.md), [Style Guide](docs/STYLE.md) and our [Code Review Guidelines](docs/REVIEWING.md) to see what code quality guidelines we follow.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzeldaret%2Fmm","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzeldaret%2Fmm","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzeldaret%2Fmm/lists"}