Decompilation of Super Mario Odyssey for all versions.
Go to file
MonsterDruide1 fadf8c9834 Cleanup & Additions by Sanae (a8e87b3)
Co-authored-by: Sanae <atmatm6000@outlook.com>
2023-08-11 00:33:46 +02:00
data Cleanup & Additions by Sanae (a8e87b3) 2023-08-11 00:33:46 +02:00
lib Cleanup & Additions by Sanae (a8e87b3) 2023-08-11 00:33:46 +02:00
src Cleanup & Additions by Sanae (a8e87b3) 2023-08-11 00:33:46 +02:00
toolchain Update submodules 2022-02-10 21:54:57 +01:00
tools Update submodules and proper compiler setup 2023-08-08 12:50:29 +02:00
.clang-format Run clang-format 2021-11-16 22:58:25 +01:00
.gitignore .gitignore: Fix build folder for non-default CLion toolchains 2022-02-28 20:09:08 -06:00
.gitmodules Add eui submodule 2023-03-03 22:20:30 +01:00
CMakeLists.txt Add eui submodule 2023-03-03 22:20:30 +01:00
Contributing.md Move all header files to proper paths 2023-08-08 19:19:07 +02:00
README.md Move all header files to proper paths 2023-08-08 19:19:07 +02:00

OdysseyDecomp

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

Ubuntu users can install those dependencies by running:

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

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. Download Clang 3.9.1 manually

    • As we're not sure about the right compiler version yet, it won't be downloaded automatically.
    • Download a prebuilt binary (version 3.9.1) from LLVM, matching your environment.
    • Extract it to toolchain/clang-3.9.1, so that the file toolchain/clang-3.9.1/bin/clang exists.
  4. 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 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.

3. Build

To start the build, just run

ninja -C build

By default, Ninja will perform a multithreaded build. There is no need to pass -j manually.

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
  • Merge LiveActor/-flag
  • Split files/functions in Library/Resource
  • Library/Stage: Proper place for StageInfo
  • Library/Math: Split up into multiple files
  • Library/Player: Re-organize Util
  • cleanup/remove al/util
  • game/Util/ResourceUtil remove/cleanup

Credits

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