Skip to content

Decompilation of the Gamecube Emulator for Ocarina of Time

License

Notifications You must be signed in to change notification settings

Yanis002/oot-gc-dtk

Repository files navigation

Discord Badge

A work-in-progress decompilation of the N64 emulator intended for use with the GameCube releases of The Legend of Zelda: Ocarina of Time.

This repository does not contain any game assets or assembly whatsoever. An existing copy of the game is required.

Supported versions:

  • mq-j: Master Quest - Japan
  • mq-u: Master Quest - North America
  • mq-e: Master Quest - Europe/Australia
  • ce-j: Collector's Edition - Japan
  • ce-u: Collector's Edition - North America
  • ce-e: Collector's Edition - Europe/Australia

The progress of this project will be synced with the main repo: zeldaret/oot-gc.

Dolphin SDK code was matched thanks to these projects:

Dependencies

Windows

On Windows, it's highly recommended to use native tooling. WSL or MSYS2 are not required.
When running under WSL, objdiff is unable to get filesystem notifications for automatic rebuilds.

  • Install Python and add it to %PATH%.
  • Download ninja and add it to %PATH%.
    • Quick install via pip: pip install ninja

macOS

  • Install ninja:

    brew install ninja
  • Install wine-crossover:

    brew install --cask --no-quarantine gcenx/wine/wine-crossover

After OS upgrades, if macOS complains about Wine Crossover.app being unverified, you can unquarantine it using:

sudo xattr -rd com.apple.quarantine '/Applications/Wine Crossover.app'

Linux

  • Install ninja.
  • For non-x86(_64) platforms: Install wine from your package manager.
    • For x86(_64), wibo, a minimal 32-bit Windows binary wrapper, will be automatically downloaded and used.

Building

  • Extract the TGC file containing the N64 emulator from the disc of the version you want:

    • mq-j - zlj_f.tgc
    • mq-u - zle_f.tgc
    • mq-e - zlp_f.tgc
    • ce-j - 120903_zelda.tgc
    • ce-u - zelda_ENG_090903.tgc
    • ce-e - zelda_PAL_093003.tgc
  • Clone the repository:

    git clone https://github.com/yanis42/oot-gc-dtk.git
  • Using Dolphin Emulator, extract the content of the TGC file you extracted earlier to orig/[GAMEID]. Note: you don't need to extract the whole disc, you can use "Extract System Data".

  • To save space, the only necessary files are the following. Any others can be deleted.

    • main.dol
  • Configure:

    python configure.py

    To use a version other than mq-e, specify it with --version (or -v) (example: python configure.py -v ce-j).

  • Build:

    ninja

Diffing

Once the initial build succeeds, an objdiff.json should exist in the project root.

Download the latest release from encounter/objdiff. Under project settings, set Project directory. The configuration should be loaded automatically.

Select an object from the left sidebar to begin diffing. Changes to the project will rebuild automatically: changes to source files, headers, configure.py, splits.txt or symbols.txt.

Project structure

  • configure.py - Project configuration and generator script.
  • config/[GAMEID] - Configuration files for each game version.
  • config/[GAMEID]/build.sha1 - SHA-1 hashes for each built artifact, for final verification.
  • build/ - Build artifacts generated by the the build process. Ignored by .gitignore.
  • orig/[GAMEID] - Original game files, extracted from the disc. Ignored by .gitignore.
  • orig/[GAMEID]/.gitkeep - Empty checked-in file to ensure the directory is created on clone.
  • src/ - C/C++ source files.
  • include/ - C/C++ header files.
  • tools/ - Scripts shared between projects.

About

Decompilation of the Gamecube Emulator for Ocarina of Time

Resources

License

Stars

Watchers

Forks