Decompilation of Super Mario Odyssey for all versions.
Go to file
2024-06-13 21:10:45 +02:00
.devcontainer dev: Add Devcontainer setup for VS-Code (#63) 2024-06-07 10:51:53 +02:00
.github al: Merge include/src (#87) 2024-06-13 21:10:45 +02:00
data Player: Implement PlayerJudgeForceRolling (#84) 2024-06-11 00:21:47 +02:00
lib al: Merge include/src (#87) 2024-06-13 21:10:45 +02:00
src lint: Set RemoveBracesLLVM (#81) 2024-06-12 23:30:28 +02:00
toolchain Update submodules 2022-02-10 21:54:57 +01:00
tools al: Merge include/src (#87) 2024-06-13 21:10:45 +02:00
.clang-format lint: Set RemoveBracesLLVM (#81) 2024-06-12 23:30:28 +02:00
.gitignore Player: Implement PlayerJudgeDrawForward and PlayerJudgeDeadWipeStart (#72) 2024-06-08 20:31:53 +02:00
.gitmodules Add eui submodule 2023-03-03 22:20:30 +01:00
CMakeLists.txt al: Merge include/src (#87) 2024-06-13 21:10:45 +02:00
Contributing.md Custom format validation (Linting) (#17) 2024-01-07 00:33:09 +01:00
README.md dev: Add Devcontainer setup for VS-Code (#63) 2024-06-07 10:51:53 +02:00

OdysseyDecomp Decompiled Status

Decompilation of all Super Mario Odyssey versions, from 1.0.0 to 1.3.0.

Building

Reminder: this will not produce a playable game. This project will not allow you to play the game if you don't already own it on a Switch.

For Windows users

While Linux is not a hard requirement, it is strongly advised to set up WSL to simplify the setup process. Ubuntu 20.04 is usually a good choice.

The instructions below assume that you are using Linux (native or WSL) or macOS.

1. Set up dependencies

You can either set up all dependencies on your standard installation, or use a Visual Studio Code Dev Container. If you choose to do the latter, you can skip this section, just clone and open the folder in VS-Code, press F1 and select Dev Containers: Rebuild and Reopen in Container. You can copy the NSO executable into the container using docker cp /path/to/main.nso [container-id]:/workspaces/main.nso, where [container-id] is the ID listed in docker container ls.

Ubuntu users can install those dependencies by running:

sudo apt install python3 ninja-build cmake ccache xdelta3 clang libssl-dev libncurses5

If you are running Ubuntu 23.10 or later, the libncurses5 package won't be available anymore. You can install it from the archive using:

wget http://archive.ubuntu.com/ubuntu/pool/universe/n/ncurses/libtinfo5_6.4-2_amd64.deb && sudo dpkg -i libtinfo5_6.4-2_amd64.deb && rm -f libtinfo5_6.4-2_amd64.deb

Additionally, you'll also need:

  • A Rust toolchain (follow the instructions here)
  • The following Python modules: capstone colorama cxxfilt pyelftools ansiwrap watchdog python-Levenshtein toml (install them with pip install ...)

2. Set up the project

  1. Clone this repository. If you are using WSL, please clone the repo inside WSL, not on the Windows side (for performance reasons).

  2. Run git submodule update --init --recursive

    Next, you'll need to acquire the original 1.0 main NSO executable.

    • To dump it from a Switch, follow the instructions on the wiki.
    • You do not need to dump the entire game (RomFS + ExeFS + DLC). Just dumping the 1.0 ExeFS is sufficient.
  3. Run tools/setup.py [path to the NSO]

    • This will:
      • install tools/check to check for differences in decompiled code
      • convert the executable if necessary
      • set up Clang 3.9.1 by downloading it from the official LLVM website
      • set up Clang 4.0.1 by downloading it from the official LLVM website
      • create a build directory in build/
    • If something goes wrong, follow the instructions given to you by the script.
    • If you wish to use a CMake generator that isn't Ninja, use --cmake_backend to specify it.

3. Build

To start the build, just run

tools/build.py

By default, a multithreaded build is performed. No need to specify -j manually.

Use --clean to perform a clean build, and --verbose to enable verbose output.

To check whether everything built correctly, just run tools/check after the build completes.

Contributing

Anyone is welcome to contribute to this project, just send a pull request!

TODO

  • Enable comparison between different versions and check for mis-matches in all versions using tools/check
  • 1.3.0 uses a different optimization method, find it and implement it into the toolchain

from the re-organization

  • Rework the al/Library/Yaml-File structure (should be fewer files, merge a few of them)
  • Find proper place for Factories (+Placement of ActorFactory?)
  • Graph in Rails misordered
  • LiveActorGroup vs. Kit are in the wrong order
  • Split files/functions in Library/Resource
  • Library/Stage: Proper place for StageInfo
  • Library/Math: Split up into multiple files
  • Library/Player: Re-organize Util
  • game/Util/ResourceUtil remove/cleanup
  • Once open-ead/sead#130 is merged, clean up RootTask

Credits

This decompilation uses this as a reference for the sead library used. Big thanks to their research!