Skip to content

Repository files navigation

Melee Decomp Assistant

A desktop GUI tool for contributing to the doldecomp/melee decompilation of Super Smash Bros. Melee. Covers the full workflow — from installing dependencies and cloning the repo, to diffing assembly, generating decomp.me context, and submitting matched functions.

No API key required.

Python 3.10+ Platform License


Features

One-time setup wizard

Walks through every prerequisite in order: devkitPPC, Git, cloning the melee repo, Dolphin disc extraction, and the initial ninja build. Each step has a button that does the work — no terminal required.

Function browser

Searchable, filterable table of every function in the project showing name, module, address, line count, and current match percentage from report.json. Green = matched, orange = in progress, white = not started.

Analyze window

Before committing to a function:

  • Assembly viewer scoped to just that function (toggle to see the full unit file)
  • Live decomp.me scratch lookup showing the best public match and author
  • One-click access to the decomp.me helper, assembly copy, and the loop

Decompilation loop

Split view: editable C source on the left, live objdiff output on the right.

  • Check — compiles the function in isolation, diffs against target, no repo changes
  • Build & Check — full ninja build, writes to repo, commits if it compiles
  • Attempt history with click-to-restore
  • Restore Original resets to the decompiled starting point

AI workflow (bring your own chat)

Works with any AI — Claude, ChatGPT, Gemini, etc. No API key needed.

  • Copy Prompt — assembles a complete prompt with target assembly, current C, diff, sibling functions for struct context, and attempt history
  • Feed Reply — reads NEED_TYPE: / NEED_SYMBOL: requests from clipboard, resolves them from project headers and symbols.txt, and copies a follow-up ready to paste back

decomp.me helper

Prepares all four decomp.me fields in one window:

Field What's generated
Diff label Function name
Target assembly .fn/.endfn block, macros expanded, @sda21 substituted
Context Headers inlined recursively; missing types resolved from project headers; _struct_* stubs generated; global externs inferred
Source code Target function only, no #include lines

Submission guide

Step-by-step walkthrough of the full submission process: match verification, deleting the .s stub, staging, git clang-format, committing, and opening a PR or GitHub Issue.


Requirements

  • Python 3.10 or later
  • The doldecomp/melee repo built with ninja (the setup guide handles this)
  • A NTSC-U v1.02 Melee disc image (Game ID: GALE01) for the initial build

Installation

Windows (recommended)

Download run.bat from the latest release and double-click it. It installs Python if needed, then installs all dependencies automatically.

From source

git clone https://github.com/Bootstrings/melee-assist.git
cd melee-assist
python run.py

run.py installs dependencies on first launch and keeps them up to date on subsequent runs.


First launch

The setup guide opens automatically if no melee repo is configured. Follow the steps in order:

  1. Get a disc image — NTSC-U v1.02 only (GALE01)
  2. Clone the repo — click Clone... or run git clone https://github.com/doldecomp/melee.git
  3. Extract game data — use Dolphin → right-click ISO → Properties → Filesystem → Extract System Data into orig/GALE01/ inside the cloned repo
  4. Configure and build — click Run next to python configure.py, then Run next to ninja
  5. Point the app at the repo — Settings → General → Melee Repo Path

Once the build completes the function list loads automatically.


Usage

Finding a function to work on

  1. Browse the function list — filter by module or match status
  2. Click Analyze to inspect the assembly and check for existing decomp.me scratches
  3. Click Open Loop → (or double-click in the main list) to start working

The decompilation loop

  1. Edit the C source in the left panel
  2. Click Check to see the diff — fast, nothing written to disk
  3. Refine until the match percentage climbs
  4. When satisfied, click Build & Check for a full repo build

Working with an AI

  1. Click Copy Prompt and paste into any AI chat
  2. If the AI responds with NEED_TYPE: or NEED_SYMBOL: requests, click Feed Reply — it resolves them automatically and copies the follow-up
  3. Paste the AI's C into the editor and click Check

Submitting a matched function

Click How to Submit in the loop window for the full step-by-step guide.


Project structure

run.bat / run.py          # launcher and bootstrap
src/melee_assist/
  ui/                     # all windows (app, loop, analyze, settings, ...)
  loop/                   # decompilation loop and context packaging
  build/                  # ninja runner and objdiff integration
  setup/                  # dependency checker and installer
  api/                    # decomp.me API client
  assembly/               # report.json parser
  resolver/               # symbols.txt and header type lookup
  llm/                    # prompt templates
uninstall.bat             # removes installed dependencies (respects pre-existing tools)

Notes

  • The app only installs tools it needs and tracks which were already present before first launch — uninstalling will not remove tools you had before
  • The bundled objdiff-cli from the melee repo is always preferred over any system version, since the repo pins a specific version for consistent match percentages
  • decomp.me scratch search is approximate and searches public scratches by function name — it may miss private or differently-named scratches

License

MIT — see LICENSE

About

Decompilation assistant for the doldecomp/melee project

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages