# ProjectStonehenge
**A native x86_64 PC port of *Ace Combat 04: Shattered Skies***



---
## About
**ProjectStonehenge** is a native x86_64 PC port of *Ace Combat 04: Shattered Skies*, based on the North American release (NTSC-U, SLUS-20152).
The port is built from a decompilation of the original PS2 executable (ELF). It is **not** an emulator and **not** a static recompilation: the game code has been translated function by function into C++ (with AI assistance, see [AI Disclosure](#ai-disclosure)) and runs natively on PC. Game logic, physics, AI and mission rules behave exactly like the original.
> [!IMPORTANT]
> Currently only the **North American release (NTSC-U, SLUS-20152)** is supported. Support for other regions and revisions might come later. The port checks the disc image at startup (SHA-1 `aaa707214aea7f8f9c2904c4b5e00c372c943533`, 3,554,705,408 bytes).
## Legal Notice
This repository **does not contain any game assets, files or copyrighted data** from *Ace Combat 04: Shattered Skies*. All assets, including the executable's own data tables, are loaded at runtime from a disc image that you must provide yourself.
To play, you need a dump of **your own legally purchased copy** of the game. This project does not support piracy in any form: please do not open issues asking for game files or links to ISOs, they will be closed.
This is an unofficial fan project and is **not affiliated with, endorsed by or sponsored by Bandai Namco Entertainment**. *Ace Combat* and all related names, logos and trademarks are the property of their respective owners.
## AI Disclosure
This project is being developed with extensive use of generative AI. The reverse-engineering notes, most of the code and the research tools in this repository were written by models from Anthropic, working under human supervision.
## Features
**Graphics and performance**
- **Unlocked frame rate** (frame cap 60 / 120 / 144 / 240 / 360 FPS): rendering is decoupled from game logic and interpolated, while physics and AI still run at the original 59.94 Hz
- **Higher internal resolution** with a multiplier from 1x to 8x (native 512×448 up to 4096×3584), including 4K output
- **Screen** windowed or borderless fullscreen
- **16:9 by default on wide monitors**: the game's own SCREEN RATIO option starts at 16:9
- **Anti-aliasing**: FXAA and SMAA support
- **V-Sync**
- **FSR 1 upscaled cutscenes**: the FMV movies are upscaled with AMD FidelityFX FSR 1 to match internal resolution
- **Dedicated in-game graphics settings**: a GRAPHICS in-game page under OPTIONS → SCREEN SETTINGS
**Controls**
- Keyboard and gamepad support through SDL3, with bindings in `settings.json`
- **Vibration** on gamepads with rumble, switched by the game's own VIBRATION option
- **Modern control types**: two extra CONTROL TYPE choices on CONTROLLER SETUP with L1/L2 and R1/R2 swapped (throttle on the triggers); the original types are still there
Default keyboard mapping (PS2 controller → keyboard). What each button does in flight depends on the CONTROL TYPE chosen in the game's CONTROLLER SETUP. Keys can be changed under `input.bindings` in `settings.json`.
| PS2 control | Key | PS2 control | Key |
|---|---|---|---|
| ✕ Cross | `Z` | Start | `Enter` |
| ○ Circle | `X` | Select | `Backspace` |
| □ Square | `C` | D-pad | Arrow keys |
| △ Triangle | `V` | Left stick | `W` `A` `S` `D` |
| L1 | `Q` | Right stick | `I` `J` `K` `L` |
| R1 | `E` | L3 (left stick press) | `F` |
| L2 | `1` | R3 (right stick press) | `H` |
| R2 | `3` | | |
**Saves**
- **PCSX2-compatible save system** using PCSX2's folder memory card format, so saves can be moved between the port and the emulator in both directions
> [!WARNING]
> Save compatibility is still in **beta**. Always back up your original save before transferring it to the port.
**Preservation**
- **Built-in debugger** for testing (see [Debugger](#debugger))
- **Cut content and dead code preserved**: code that was unreachable in the final release (272 functions, including two unused scenes and the HDD support) has been ported along with the rest of the game. In the default build it stays unreachable exactly as on the PS2 but the debugger will be able to invoke some of it with the next releases (WIP).
## Roadmap
- [ ] VS mode (and a surprise 👀)
- [ ] Performance optimizations
- [ ] Modding support
- [ ] A full catalog and map of the cut content, and a debug menu to explore it
- [ ] Linux support
## 💻 Requirements
- Windows 10/11 (64-bit)
- GPU: any graphics card with **Vulkan 1.2** support and an up-to-date driver. Higher internal resolutions (4x–8x) need a correspondingly faster GPU
- A dump of your own copy of *Ace Combat 04: Shattered Skies* (NTSC-U SLUS-20152) as an `.iso` file (ISO 9660, 2048-byte sectors; raw `.bin`/`.cue` dumps are not supported)
## 📥 Download and Installation
1. Download the latest version from the [Releases page](https://github.com/Onaga00/ProjectStonehenge/releases).
2. Extract the archive to a folder of your choice. The port is a single executable: no installer, no other DLLs and no Visual C++ Redistributable needed.
3. Dump your own copy of the game to an ISO (for example with ImgBurn on PC, or by following PCSX2's [dumping guide](https://pcsx2.net/docs/setup/dumping/)).
4. Launch `ProjectStonehenge.exe`. On the first start the port asks for the disc image: click **Select ISO...** and pick your ISO. The path is saved in `settings.json`. You can also start the port with `ProjectStonehenge.exe --iso "C:\path\to\game.iso"`.
5. Play. Everything the port writes goes to `%LOCALAPPDATA%\ProjectStonehenge\`:
- `settings.json`: port settings (graphics, input bindings, debug options)
- `saves\`: the memory card (PCSX2 folder card format)
- `logs\`: the log of the last session (attach it to bug reports)
- `cache\`: GS pipelines (recompiled with each gpu driver change)
### Command-line options (release builds)
| Option | Effect |
|---|---|
| `--iso