Dragon Quest IX
OriginNintendo DS
TechnologyNative C/C++ port (engine reimplementation)
Available forWindows, Linux, macOS
View official projectAbout the project
Dragon Quest IX: Centinelas del firmamento es un videojuego de rol para Nintendo DS dirigido por Yuji Horii, desarrollado por Level-5 y publicado por Square Enix en Japón y por Nintendo en Norteamérica y Europa. Es la novena parte de la serie de videojuegos Dragon Quest. El juego fue diseñado en torno al modo multijugador y con el objetivo de también ser un éxito en el mercado occidental. El argumento principal del juego trata sobre las aventuras de un ángel que cae a la tierra y se convierte en humano.
2 versions of Dragon Quest IX
You're viewing: Dragon Quest IX
Official project information
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
GCC 9+ (available through installers like MINGW on windows, usually included on linux)
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:
- Open the command line in the root folder of the repository.
- Run the following command:
ninja
This builds the ROM, verifies every module against the original, generates a decomp.me context for each object (requires GCC), creates an objdiff configuration and progress report, and verifies the SHA-1 of the whole built ROM (needs the ARM7 BIOS dump). If you're only interested in building the ROM, you can instead use ninja min. This will still verify the modules but not the final SHA-1 and as such does not require GCC or the ARM7 BIOS dump.
🤝 Contributing
See CONTRIBUTING.md for the full guide.
We recommend joining the DQIX discord server The Quester's Rest (https://discord.gg/DQIX) so you can participate in discussions in the DQI-haX: Decompiling, Reverse engineering, Programming thread to claim a function, ask for help, or share a scratch.
📤 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
Contributions are welcome, though make sure you've read the pages linked above first. If you're new to decompilation, some possible tasks to get started with include:
- Find and decompile additional uses for the game's scripting system. Some existing uses can be found here and here as a guideline. (You don't need to worry about matching global variables, it's okay to mark everything as extern for the time being - just focus on matching the .text section). You may find this script disassembler helpful.
- Help to match additional pieces of the Zone3D class. This is very experimental/WIP, so we have a separate branch to work off of for this.
- Start decompiling one of the game's standalone overlays/systems, such as overlay 6 (the alchemy pot), overlay 8 (battle records) or overlay 14 (bestiary). This will likely interact with some as of yet unknown systems e.g. input, sound or text processing, but partial progress on the rest would still be very interesting!
🔧 Useful Tools
-
Ghidra (with the NTRGhidra plugin):
- A powerful reverse engineering tool for DS games and code.
- Download Ghidra
- Get dsd-ghidra Plugin (use version 0.5.0 for compatibility with dsd 0.10.2)
-
Desmume:
- A DS emulator with excellent debugging features.
- Download nightly builds
-
No$GBA:
- Another popular DS emulator for debugging, though less user-friendly.
- Download No$GBA
-
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
