321388673b
* cleanup * name camera action functions * decompile a few small functions, name a few Camera struct members * decompile camera data, decompile a few camera functions * Split ASM for code_800BB0A0 * removing code_800BB0A0.s * PR Requests, Camera WIP * remove #define NON_MATCHING from db_camera * rename code_8007BF90.c to z_olib.c, rename functions in z_olib.c * camera wip * rename some struct memebers, some decomp wip * pr updates * camera wip * name some fields in Camera Struct, being making sense of Camera_Update * Camera WIP * wip * wip * add z64camera.h header, begin creating CameraSetting macros * wip * wip * wip * wip * migrate camera bss to c * match a couple functions in db_camera * match some small db_camera functions * wip * migrate db_camera rodata, match a few functions * remote db_camera.rodata.s * match some of db_camera * identify types of some unknown data pieces * some small wip * Match Camera_Init, some function changes, some struct name changes. Change unk_C0 and unk_CC to floats from Vec3fs * add naming for a few more Camera struct members * wip * match func_80043F94 * Match Camera_Jump1 * document some of Camera_Jump1 * wip * match Camera_Jump3 * Match Camera_Update, FeelsAmazing * wip * wip * match Camera_SetParam * minor cleanup * wip * wip * match Camera_KeepOn0 * some documentation, modify some matching functions to match style of others. * match Camera_Demo1 * match camera_demo9 * document Camera_Demo1 and Camera_Demo9 * wip * Match camera_battle4 * match camera_unique2 * Match Camera_Unique3 * match camera_special6 * match Camera_Special5 * wip * document camera_special6 * naming updates * match camera_Unique1 * match Camera_Unique0 * wip * Match Camera_CalcUpFromPitchYawRoll * match func_80045508 * document Camera_Battle4 * document several camera functions, move camera data to separate file * rename phi/theta to pitch/yaw * wip * uniq9 wip * Camera_Unqiue9 OK * document Camera_Unique9 * name unk_160 in camera struct * wip * wip * minor updates * fix conflicts * wip * wip * Olib updates * wip * wip * rename most Math3D functions, few matches, documentation * wip * document most of math3d * wip * wip * wip * pr updates * Match Camera_Fixed4 * match func_80058E8C * pr updates * add missing comment block finalizer * Merge math3dupdates * match Camera_ChangeSetting * Match Camera_ChangeMode * match func_80058148 * Match Camera_Special9 * decompile the rest of camera data * match Camera_Demo5 * name a few camera functions in z_play * match func_80046CB4, some work on other fucntions * wip * impove some non matchings * fix function rename * match func_800588B4 * match Camera_Subj4 * wip * Camera_Demo3 matching, Camera_Battle1 big progress * Camera_Normal2 OK * wip * match Camera_Parallel1 * normalize some things across functions * match Camera_Normal1 * Match Camera_Normal3 * some cleanup * more cleanup * more cleanup , match Camera_CalcDefaultPitch * data formatting * Match Camera_Jump2 * document Camera_Jump2 * Match Camera_KeepOn3 * document some of Camera_KeepOn3 * improve some non_matchings * match func_80045C74 and func_800460A8 * code cleanup, documentation * match Camera_KeepOn1 * Match Camera_Subj3 * Match Camera_Battle1 * remove non_matching from func_80044adc and func_80046e20 * name several members of Battle1 * more documentation on Battle1 * cleanup * renaming Camera_Vec3fScaleXYZFactor to Camera_Vec3fTranslateByUnitVector * reorganize update structs, remove final references to params, remove CameraParams union * implement camera enums into player * Renaming Camera_GetDir to Camera_GetInputDir, Camera_GetRealDir to Camera_GetCamDir, etc, implement camera enum's into player * remove non-global camera variables from variables.h * clean up some variable declarations * finish pr comment updates * fix some warnings * data formatting * finish commenting on data * delete unused asm * remove asm Co-authored-by: fig <fig02srl@gmail.com> |
||
---|---|---|
asm | ||
assets | ||
data | ||
docs | ||
include | ||
scenes | ||
src | ||
tools | ||
.clang-format | ||
.clang-tidy | ||
.gitattributes | ||
.gitignore | ||
.gitmodules | ||
checksum.md5 | ||
diff.py | ||
diff_settings.py | ||
docker-compose.yml | ||
Dockerfile | ||
Doxyfile | ||
extract_assets.py | ||
extract_baserom.py | ||
first_diff.py | ||
fixbaserom.py | ||
fixle.sh | ||
format.sh | ||
Jenkinsfile | ||
Makefile | ||
progress.py | ||
README.md | ||
spec | ||
sym_info.py | ||
THANKS.md | ||
undefined_syms.txt |
The Legend of Zelda: Ocarina of Time
- WARNING! -
The ROM this repository builds cannot be 'shifted', primarily due to some hardcoded pointers which have yet
to be dumped. Thus this repository is currently in an experimental and research phase and cannot yet be used
traditionally as a source code base for general changes.
This is a WIP decompilation of The Legend of Zelda: Ocarina of Time. 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. The only build currently supported is Master Quest (Debug), but other versions are planned to be supported.
It builds the following ROM:
- zelda_ocarina_mq_dbg.z64
md5: f0b7f35375f9cc8ca1b2d59d78e35405
Note: This repository does not include any of the assets necessary to build the ROM. A prior copy of the game is required to extract the needed assets.
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.
For older versions of Windows, install a Linux VM or refer to Docker instructions.
macOS
For macOS, use homebrew to install the following dependencies:
- coreutils
- make
- python3
brew update
brew install coreutils make python3 md5sha1sum
You'll also need to build and install mips-linux-binutils.
Going forward in this guide, please use gmake
whenever you encounter a make
command.
The make
that comes with MacOS behaves differently than GNU make and is incompatible with this project.
You should now be able to continue onto step 3.
Linux (Native or under WSL / VM)
1. Install build dependencies
The build process has the following package requirements:
- git
- build-essential
- binutils-mips-linux-gnu
- python3
Under Debian / Ubuntu (which we recommend using), you can install them with the following commands:
sudo apt-get update
sudo apt-get install git build-essential binutils-mips-linux-gnu python3
2. Download and set up qemu-irix (optional)
Note: We are currently testing a recompiled version of the compiler that does not require qemu-irix.
This step allows you to build with qemu-irix and the original compiler by adding ORIG_COMPILER=1
to the make
command in step 6, for example if you experience issues with the recompiled version.
Download qemu-irix from the Releases section in the repository. Place it at a location of your choosing.
Open up your .bashrc file (~/.bashrc), scroll to the bottom, and add the following, replacing the paths as necessary:
export QEMU_IRIX="path/to/your/qemu-irix"
Save and close/reopen your terminal window.
3. Clone the repository
Clone https://github.com/zeldaret/oot.git
where you wish to have the project, with a command such as:
git clone https://github.com/zeldaret/oot.git
4. Prepare a base ROM
Copy over your copy of the Master Quest (Debug) ROM inside the root of this new project directory. Rename the file to "baserom_original.z64" or "baserom_original.n64", depending on the original extension.
5. Setup the ROM and build process
Setup and extract everything from your ROM with the following command:
make setup
This will generate a new ROM called "baserom.z64" that will have the overdump removed and the header patched. It will also extract the individual assets from the ROM.
6. Build the ROM
Run make to build the ROM. Make sure your path to the project is not too long, otherwise this process may error.
make
If all goes well, a new ROM called "zelda_ocarina_mq_debug.z64" should be built and the following text should be printed:
zelda_ocarina_mq_dbg.z64: OK
If you instead see the following:
zelda_ocarina_mq_dbg.z64: FAILED
md5sum: WARNING: 1 computed checksum did NOT match
This means that the built ROM isn't the same as the base one, so something went wrong or some part of the code doesn't match.
Docker
1. Setup requirements
To use Docker, you'll need either Docker Desktop or Docker Toolbox installed and setup based on your system.
You'll also need to prepare a local version of the project with a copied base ROM (see Step 4 and 5 of the Linux instructions).
2. Create the docker image
From inside your local project, run the following command:
docker build . -t oot
3. Start the container
To start the container, you can mount your local filesystem into the docker container and run an interactive bash session.
docker run -it --rm --mount type=bind,source="$(pwd)",destination=/oot oot /bin/bash
4. Setup and Build the ROM
Once inside the container, you can follow Step 6 and 7 of the Linux instructions to setup and build the ROM, or run any other command you need.
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.