DCDecomp
A decompilation of Dark Cloud for the PlayStation 2
Loading...
Searching...
No Matches
Chronicle

![NTSC Progress] ![PAL Progress]

<img src="https://decomp.dev/TheMoonPeople/Chronicle/ntsc.svg?w=512&h=256" width="512" height="256" alt="A visual">

Chronicle is a decompilation project and port of Dark Cloud for the PlayStation 2.

This project produces 100% matching text and data sections for the main executable for the NTSC 1.02 and PAL review versions, and 100% matching TITLE.BIN and DUN.BIN overlays. Matching the main executable's debug symbols may be explored in the future.

Building and running

  1. Clone the repository with git clone --recurse-submodules https://github.com/Adubbz/DCDecomp.git
  2. Place the NTSC 1.02 disc image or PAL July 12th build, named Dark Cloud (NTSC).iso or Dark Cloud (PAL).iso, in the rom folder at the root of the project.
  3. Run run.sh.

run.sh builds the disc image and boots it in PCSX2.

./build.sh builds only the game for PS2; ./build.sh ps2 is equivalent. Use REGION=PAL ./build.sh ps2 for the PAL prototype.

The PC port

./build.sh linux-x64 builds the native Linux port in port/build/pc; ./build.sh macos builds the Apple Silicon port in port/build/macos-arm64. ./run.sh linux-x64 or ./run.sh macos builds and launches the native game; game arguments follow the platform (for example, ./run.sh linux-x64 --data data). Run these on the corresponding host with the dependencies below installed. Both use Debug CMake presets. CLEAN=1 discards the selected build directory, and JOBS=N controls parallelism on every platform.

PLATFORM=PC builds the game's code as a native Linux and macOS program on SDL3 and Vulkan (docs/PC.md, docs/MACOS.md). On Linux it is packaged as a Flatpak, built by CI as chronicle.flatpak; docs/FLATPAK.md covers installing it. It needs your own PAL disc: the first start asks for the disc image and extracts the game's files from it.

Repository layout

  • ps2/src, ps2/include: matching game sources and headers.
  • ps2/config, ps2/asm: per-region split configuration and generated reference assembly.
  • ps2/CMakeLists.txt, ps2/cmake: PS2 build rules.
  • port/src, port/include: native replacements and platform support.
  • port/CMakeLists.txt, port/flatpak: native build rules and Linux packaging.
  • scripts, tools, rom, build: shared tooling, disc inputs, and build outputs.

Diffing

diff.sh <symbol> compares a function against the retail original with objdiff. Symbols are the mangled names the compiler uses.

diff.sh SetDay__9CSaveDataFi # the main executable
diff.sh Load__7CScriptFPCc # an overlay -- found on its own
diff.sh dun GameInit__Fv # ...named explicitly
diff.sh SetDay__9CSaveDataFi -o - --format json # one-shot, machine-readable

diff.sh --scratch <symbol> instead creates a decomp.me scratch for the function and prints its URL.

diff.sh --scratch SetDay__9CSaveDataFi
diff.sh --scratch title Se__7CSpriteFv

Decompiling

decompile.sh <symbol> runs m2c over a function's reference disassembly and prints C on stdout. It takes the same symbol spellings and optional section as diff.sh:

decompile.sh SetDay__9CSaveDataFi # found on its own
decompile.sh title Se__7CSpriteFv # ...or name the overlay
decompile.sh DataLoad__Fv --stack-structs # extra flags go to m2c

Documentation

Source documentation is available on GitHub Pages.