Bootstrapping project

This commit is contained in:
Jordan Ashurst
2026-09-14 04:31:33 -07:00
commit a0cf14fda4
8 changed files with 78659 additions and 0 deletions
+99
View File
@@ -0,0 +1,99 @@
Disney Epic Mickey
[![Build Status]][actions] [![Code Progress]][progress] [![Data Progress]][progress] [![Discord Badge]][discord]
=============
<!--
Replace with your repository's URL.
-->
[Build Status]: https://github.com/zeldaret/tww/actions/workflows/build.yml/badge.svg
[actions]: https://github.com/zeldaret/tww/actions/workflows/build.yml
<!--
decomp.dev progress badges
See https://decomp.dev/api for an API overview.
-->
[Code Progress]: https://decomp.dev/zeldaret/tww.svg?mode=shield&measure=code&label=Code
[Data Progress]: https://decomp.dev/zeldaret/tww.svg?mode=shield&measure=data&label=Data
[progress]: https://decomp.dev/zeldaret/tww
<!--
Replace with your Discord server's ID and invite URL.
-->
[Discord Badge]: https://img.shields.io/discord/727908905392275526?color=%237289DA&logo=discord&logoColor=%23FFFFFF
[discord]: https://discord.gg/hKx3FJJgrV
A work-in-progress decompilation of Some Game.
This repository does **not** contain any game assets or assembly whatsoever. An existing copy of the game is required.
Supported versions:
- `GAMEID`: Rev 0 (USA)
Dependencies
============
Windows
--------
On Windows, it's **highly recommended** to use native tooling. WSL or msys2 are **not** required.
When running under WSL, [objdiff](#diffing) is unable to get filesystem notifications for automatic rebuilds.
- Install [Python](https://www.python.org/downloads/) and add it to `%PATH%`.
- Also available from the [Windows Store](https://apps.microsoft.com/store/detail/python-311/9NRWMJP3717K).
- Download [ninja](https://github.com/ninja-build/ninja/releases) and add it to `%PATH%`.
- Quick install via pip: `pip install ninja`
macOS
------
- Install [ninja](https://github.com/ninja-build/ninja/wiki/Pre-built-Ninja-packages):
```sh
brew install ninja
```
[wibo](https://github.com/decompals/wibo), a minimal 32-bit Windows binary wrapper, will be automatically downloaded and used.
Linux
------
- Install [ninja](https://github.com/ninja-build/ninja/wiki/Pre-built-Ninja-packages).
[wibo](https://github.com/decompals/wibo), a minimal 32-bit Windows binary wrapper, will be automatically downloaded and used.
Building
========
- Clone the repository:
```sh
git clone https://github.com/my/repo.git
```
- Copy your game's disc image to `orig/GAMEID`.
- Supported formats: ISO (GCM), RVZ, WIA, WBFS, CISO, NFS, GCZ, TGC
- After the initial build, the disc image can be deleted to save space.
- Configure:
```sh
python configure.py
```
To use a version other than `GAMEID` (USA), specify it with `--version`.
- Build:
```sh
ninja
```
Diffing
=======
Once the initial build succeeds, an `objdiff.json` should exist in the project root.
Download the latest release from [encounter/objdiff](https://github.com/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`.
![](assets/objdiff.png)
@@ -0,0 +1,7 @@
Sections:
.text type:code align:4
.rodata type:rodata align:8
.ctors type:rodata align:4
.dtors type:rodata align:4
.data type:data align:8
.bss type:bss align:32
File diff suppressed because it is too large Load Diff
+2
View File
@@ -0,0 +1,2 @@
4ac10625bdfb10084eb63a58841ad52182b3bb54 build/SEME4Q/main.dol
877579528874f447919fe817f5bd36df2187e3d6 build/SEME4Q/MickeyF213923.213924/MickeyF213923.213924.rel
+16
View File
@@ -0,0 +1,16 @@
object_base: orig/wii/DATA
object: sys/main.dol
hash: 4ac10625bdfb10084eb63a58841ad52182b3bb54
symbols: config/SEME4Q/symbols.txt
splits: config/SEME4Q/splits.txt
mw_comment_version: 15
detect_objects: true
detect_strings: true
modules:
- object: files/MickeyF213923.213924.rel
hash: 877579528874f447919fe817f5bd36df2187e3d6
name: MickeyF213923.213924
symbols: config/SEME4Q/MickeyF213923.213924/symbols.txt
splits: config/SEME4Q/MickeyF213923.213924/splits.txt
mw_comment_version: 15
+25
View File
@@ -0,0 +1,25 @@
Sections:
.init type:code align:4
extab type:rodata align:32
extabindex type:rodata align:32
.text type:code align:32
.ctors type:rodata align:32
.dtors type:rodata align:32
.rodata type:rodata align:64
.data type:data align:32
.sdata type:data align:32
.sbss type:bss align:32
.sdata2 type:rodata align:16
.sbss2 type:bss align:32
.bss type:bss align:64
Runtime.PPCEABI.H/global_destructor_chain.c:
.text start:0x8000D2C4 end:0x8000D324
.sbss start:0x806FD1E0 end:0x806FD1E4
Runtime.PPCEABI.H/__init_cpp_exceptions.cpp:
.text start:0x8000E150 end:0x8000E1C0
.ctors start:0x8064A5A0 end:0x8064A5A4 rename:.ctors$10
.dtors start:0x8064B300 end:0x8064B304 rename:.dtors$10
.dtors start:0x8064B304 end:0x8064B308 rename:.dtors$15
.sdata start:0x806FC520 end:0x806FC528
File diff suppressed because it is too large Load Diff
+144
View File
@@ -0,0 +1,144 @@
{
description = "Wii game decompilation dev environment";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
flake-utils.url = "github:numtide/flake-utils";
};
outputs = { self, nixpkgs, flake-utils }:
flake-utils.lib.eachDefaultSystem (system:
let
pkgs = nixpkgs.legacyPackages.${system};
decomp-toolkit = pkgs.stdenv.mkDerivation rec {
pname = "decomp-toolkit";
version = "1.8.4";
src = pkgs.fetchurl {
url = "https://github.com/encounter/decomp-toolkit/releases/download/v${version}/dtk-linux-x86_64";
sha256 = "086k0cxspfhjmii51k1w8n2mxdnc9k0fc26ks75f1g818jcv31kw";
};
dontUnpack = true;
nativeBuildInputs = [ pkgs.autoPatchelfHook ];
buildInputs = [ pkgs.stdenv.cc.cc.lib ];
installPhase = ''
mkdir -p $out/bin
cp $src $out/bin/dtk
chmod +x $out/bin/dtk
'';
};
objdiff = pkgs.stdenv.mkDerivation rec {
pname = "objdiff";
version = "3.8.1";
src = pkgs.fetchurl {
url = "https://github.com/encounter/objdiff/releases/download/v${version}/objdiff-linux-x86_64";
sha256 = "1wf0y42w04v0cl3bpwc23wdvyylkqhv3jxbw4iwl8wlkbvrrqlkf";
};
dontUnpack = true;
nativeBuildInputs = [ pkgs.autoPatchelfHook ];
buildInputs = [
pkgs.stdenv.cc.cc.lib
pkgs.fontconfig
pkgs.libGL
pkgs.libxcb
pkgs.libx11
pkgs.libxkbcommon
pkgs.wayland
];
installPhase = ''
mkdir -p $out/bin
cp $src $out/bin/objdiff
chmod +x $out/bin/objdiff
'';
};
wibo = pkgs.stdenv.mkDerivation rec {
pname = "wibo";
version = "1.0.3";
src = pkgs.fetchurl {
url = "https://github.com/decompals/wibo/releases/download/${version}/wibo-x86_64";
sha256 = "f99iCxUXRClrm7kzGNjEAJ09PpjiNxim7an77Ezvuyo=";
};
dontUnpack = true;
nativeBuildInputs = [ pkgs.autoPatchelfHook ];
buildInputs = [ pkgs.stdenv.cc.cc.lib ];
installPhase = ''
mkdir -p $out/bin
cp $src $out/bin/wibo
chmod +x $out/bin/wibo
'';
};
in
{
devShells.default = pkgs.mkShell {
name = "steamboat-willie-decomp";
packages = [
# Decomp project tools
decomp-toolkit
objdiff
wibo
] ++ (with pkgs; [
# Reverse engineering
ghidra
radare2
# Wii/GC disc tools
wiimms-iso-tools
# Build tools
ninja
cmake
gnumake
pkg-config
# Utilities
git
python3
wget
curl
jq
patchelf
unzip
]);
shellHook = ''
echo "=== Steamboat Willie Decomp Dev Shell ==="
echo ""
echo "Tools available:"
echo " dtk - decomp-toolkit v1.8.4"
echo " objdiff - objdiff v3.8.1"
echo " wibo - Win32 wrapper v1.0.3 (runs CodeWarrior exes)"
echo " ghidra - reverse engineering IDE"
echo " radare2 - CLI disassembler"
echo " wit - Wiimms ISO Tools"
echo ""
# Point DEVKITPPC at a devkitPro install if one exists.
if [ -d "/opt/devkitpro/devkitPPC" ]; then
export DEVKITPRO=/opt/devkitpro
export DEVKITPPC=/opt/devkitpro/devkitPPC
echo "DEVKITPPC found: $DEVKITPPC"
else
echo "Note: devkitPPC is not installed."
echo " - For Metrowerks CodeWarrior games (most GC + many Wii),"
echo " devkitPPC is NOT required. dtk + wibo handle everything."
echo " - For GCC-compiled games (needing powerpc-eabi-gcc), install"
echo " devkitPro first:"
echo " wget https://apt.devkitpro.org/install-devkitpro-pacman"
echo " sudo ./install-devkitpro-pacman"
echo " sudo dkp-pacman -S devkitPPC"
fi
echo ""
echo "Quick start:"
echo " wit EXTRACT game.iso -o ./disc/"
echo " dtk disc info game.iso"
echo " dtk dol config sys/main.dol -o config.yml"
echo " python configure.py"
echo " ninja"
'';
};
}
);
}