Skip to content

DQIX/dqix-decomp

Repository files navigation

Dragon Quest IX: Sentinels of the Starry Skies Decompilation Project

📖 About

This project aims to create a 1:1 disassembly and decompilation of Dragon Quest IX: Sentinels of the Starry Skies for the Nintendo DS.
The primary focus is on the USA and Japanese versions of the game, with the goal of making it fully recompilable.


⚙️ Setup

🛠️ Prerequisites

Programs

Python 3.11 or newer

GCC 9+ (available through installers like MINGW on windows, usually included on linux)

Ninja build system

Setup

Place a clean ROM of the original game in the 'extract' folder and name it <baserom_dqix_(region).nds>, with (region) being the appropriate region identifier. ex: baserom_dqix_usa.nds

(Note: currently only the usa and jpn roms are supported)

Install the Python dependencies with pip

python -m pip install -r tools/requirements.txt

Run the script to configure Ninja (Do this any time a file is added or removed)

python tools/configure.py <usa|jpn>

If using ghidra, be sure to create a successful build using ninja (see: Building the Project) at least once before loading the game's config.yaml with ghidra. (For more information see See Decompiling.md)

Lastly, if you want the final ROM to be perfectly byte accurate you need to dump the ARM7 BIOS from your DS and place them in the root folder, under the name arm7_bios.bin


🚀 Building the Project

Once everything is set up:

  1. Open the command line in the root folder of the repository.
  2. Run the following command:
    ninja

This will initiate the compilation process.


🤝 Contributing

📤 Submitting Contributions

Important

Ensure the decompiled code you submit produces the same binary as the original release game. The build script should throw errors should your code not match.

Decompiling code

See Decompiling.md


🧑‍💻 Current Goals

Disassemble and decompile accessible functions to begin mapping out the games code.

Get to the point where the strange function calls referenced on lines 26-28 of ARM9 main relocs.txt and lines 2695-2697 of overlay 1 relocs.txt can be understood


🔧 Useful Tools

  1. Ghidra (with the NTRGhidra plugin):

  2. Desmume:

  3. No$GBA:

    • Another popular DS emulator for debugging, though less user-friendly.
    • Download No$GBA
  4. Decomp.me:

    • A powerful website designed to aid decompilation of games on different platforms. Select the DS platform and input the assembly of the function you want to decompile, and it will show you how closely the code you write matches the output assembly.
    • Additionally, it's great for collaboration, as you can share a "scratch" of the function you're working on with others and they can seamlessly fork it and contribute.
    • Check it out here

✨ Notes

This project is a work in progress. Community contributions and feedback are welcome to help improve functionality!

About

Decompilation project for Dragon Quest IX for the Nintendo DS using dsd

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •