Skip to content

Instantly share code, notes, and snippets.

@nadiaholmquist
Created February 14, 2021 14:18
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nadiaholmquist/b274261a18f952716b9bf66e640bdbfa to your computer and use it in GitHub Desktop.
Save nadiaholmquist/b274261a18f952716b9bf66e640bdbfa to your computer and use it in GitHub Desktop.

Super Mario 64 (1996) for Nintendo DSi

  • This repo contains a full decompilation of Super Mario 64 (J), (U), (E), and (SH), ported to the Nintendo DSi.
  • Naming and documentation of the source code and data structures are in progress.

This repo does not include all assets necessary for compiling the ROMs. A prior copy of the game is required to extract the assets.

Installation

  • First follow the guide for installing devkitPro packages, also installing the nds-dev group as mentioned
  • Install the needed tools
    • Debian/Ubuntu: sudo apt install -y build-essential git python
    • Fedora: sudo dnf install make git python
    • Arch/derivatives like Manjaro: sudo pacman -S base-devel git python
    • Windows with MSYS2: pacman -S make git python
  • Clone this repository and change to its directory
    git clone https://github.com/Hydr8gon/sm64.git
    cd sm64
    
  • Place a copy of the USA version of Super Mario 64 in this directory, named baserom.us.z64, it should be in the same directory as Makefile.
  • Run make -j$(nproc) to build the game
  • If the build succeeded, the game will be in build/us_nds, named sm64.us.nds

Project Structure

sm64
├── actors: object behaviors, geo layout, and display lists
├── asm: handwritten assembly code, rom header
│   └── non_matchings: asm for non-matching sections
├── assets: animation and demo data
│   ├── anims: animation data
│   └── demos: demo data
├── bin: C files for ordering display lists and textures
├── build: output directory
├── data: behavior scripts, misc. data
├── doxygen: documentation infrastructure
├── enhancements: example source modifications
├── include: header files
├── levels: level scripts, geo layout, and display lists
├── lib: SDK library code
|-- nds: Nintendo DS-specific code
├── rsp: audio and Fast3D RSP assembly code
├── sound: sequences, sound samples, and sound banks
├── src: C source code for game
│   ├── audio: audio code
│   ├── buffers: stacks, heaps, and task buffers
│   ├── engine: script processing engines and utils
│   ├── game: behaviors and rest of game source
│   ├── goddard: Mario intro screen
│   └── menu: title screen and file, act, and debug level selection menus
├── text: dialog, level names, act names
├── textures: skybox and generic texture data
└── tools: build tools

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Run clang-format on your code to ensure it meets the project's coding standards.

Official Discord for the original decomp: discord.gg/DuYH3Fh

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment