# ForzaHorizonRecomp Experimental static recompilation project for **Forza Horizon (Xbox 360)** using [XenonRecomp](https://github.com/hedge-dev/XenonRecomp). The project aims to investigate the possibility of translating the PowerPC code contained in the original Xbox 360 executable into C++, with the long-term goal of developing a native implementation for modern platforms. > **Status:** Experimental project in active development. No playable build is currently available. --- ## About ForzaHorizonRecomp uses XenonRecomp to translate the Xbox 360 PowerPC executable into C++. Generating C++ code is only one part of the process. A functional implementation also requires compatibility layers and runtime systems for components used by the original game, including graphics, audio, input, memory management, file systems, and other Xbox 360-specific functionality. The project is currently focused on analyzing the executable, generating the translated code, and developing the components required for a future native implementation. --- ### In development - Analysis and handling of remaining executable functions. - Register save/restore function configuration. - Handling of unsupported or game-specific instruction patterns. - Validation of generated C++ code. - Runtime implementation. - Graphics implementation. - Audio implementation. - Input and controller support. - File system and memory management. - Native PC build. - Investigation of a native Xbox 360 build. --- ## Project Goals The long-term goal of this project is to investigate the possibility of creating a **native implementation of Forza Horizon** without relying on Xbox 360 emulation. The project will investigate support for the following platforms: - **PC** - **Xbox 360** - **Android and other mobile platforms** ### PC The PC version is intended to run as a native application on supported PC hardware, with a focus on compatibility, performance, and efficient resource usage. ### Xbox 360 The project will also investigate whether the resulting code and runtime can be adapted to run natively on the original Xbox 360 hardware. This is an experimental target and its feasibility will depend on the final architecture of the project and the limitations of the Xbox 360 hardware. ### Mobile Another long-term objective is to investigate the possibility of running the project on **Android and other mobile hardware**. Particular attention will be given to lower-end and older mobile GPUs, including **lower-performance Mali GPUs**. The project will therefore aim to keep the native implementation as lightweight and efficient as reasonably possible, while maintaining the required functionality. The optimization goals may include: - Efficient CPU usage. - Efficient GPU usage. - Reduced memory usage. - Reduced unnecessary background processing. - Scalable graphics settings. - Support for lower-performance GPUs. - Avoiding unnecessary platform-specific overhead. - Vulkan and/or other suitable graphics APIs where practical. The project will not target a specific GPU model. Compatibility and performance will depend on the capabilities of the target device and the final implementation. --- ## Target Platforms The project is intended to investigate a broad range of hardware: | Platform | Target | |---|---| | PC | Native implementation | | Xbox 360 | Native implementation research | | Android | Native implementation research | | Mobile GPUs | Including lower-performance Mali-class GPUs | The primary objective is to develop a portable and efficient architecture that can potentially be adapted to different hardware configurations. Performance on lower-end mobile hardware is an optimization goal rather than a guaranteed minimum requirement. ## Requirements The current development environment requires: - Windows 64-bit - CMake 3.20 or later - Clang 18 or later - Visual Studio 2022 or a compatible Clang/ClangCL environment - Git - XenonRecomp and its required submodules Clang is recommended because XenonRecomp relies on compiler-specific features and intrinsics. --- ## Building Clone the XenonRecomp repository with its submodules: ```powershell git clone --recursive https://github.com/hedge-dev/XenonRecomp cd XenonRecomp