Skip to content
Proyectos

i2kiselev/fm4-static-recomp

Ver en GitHub

Acerca de

Forza Motorsport 4 recompilation based on ShiftGlue

Otros proyectos

Cómo se miden estas cifras

What you can do

  • Resolution - 1280x720 - 1x to 4x of 720p, but the road and car shadows render wrong - 1x to 4x of 720p (up to 5120x2880), switchable live
  • Race frame rate - 60 fps - The console's pacing - 60 fps up to the display's refresh rate (at most 240) (how)
  • Menus and showroom - 60 / 30 fps - The console's pacing - The race frame rate; animations and the showroom camera run at real time
  • Race loading - Console speed - Console speed - Faster

Crecimiento de estrellas medido

in 24h
+2
in 7 days
Recopilando historial
in 15 days
Recopilando historial
in 1 month
Recopilando historial

Cambios netos en períodos que se solapan, no totales diarios. Los datos no disponibles se dejan en blanco. Las estrellas indican interés, no calidad.

README.md

Original

FM4 Static Recomp

Latest release Downloads Platform License

NVIDIA DLSS AMD FSR 1, 2, 3 and 4 Mod: Project Forza Plus 4 1.3

An unofficial static recompilation of the Xbox 360 release of Forza Motorsport 4 for Windows, with an experimental Apple Silicon macOS preview, built locally from your own disc.

Mac users: see the macOS guide for setup and testing status.

The game's PowerPC code is translated ahead of time into C++ by the ShiftGlue SDK and compiled for x86-64 on Windows or ARM64 on macOS. Its GPU commands run on ShiftGlue's native Vulkan renderer, written for Pinyon Shift (Forza Horizon) and extended here for FM4.

New in 0.3.3: FSR 4, Xbox 360 careers and mouse look

[!TIP] FSR 4 sharpens the picture on AMD Radeon RX 6000 and later graphics cards. A career copied off an Xbox 360 can be continued here. In races, hold the right mouse button to look around your car. Also new: race sound with AI cars no longer drags on older processors, your controller signs in as player 1 when DS4Windows runs or a drum kit is connected, the keyboard settings are easier to find and show your keys everywhere, the race music can play on through crashes, re-saved vinyl groups open again, and longer Quick Races are an experimental setting. Everything else in this version: release notes.

Project Forza Plus 4 sets up from the launcher as a new install of its own, and the Rev 1 (1.1) Disc 1 releases work.

[!NOTE] Experimental release. The offline game modes play without known blocking problems (see Tested). This repository contains no game code or assets: you need your own legally obtained copy of the game (see Legal).

3840x2160 (3x), 120 fps 2560x1440 (2x), 160 fps
Nürburgring GP, BMW M3 E92, 2160p at 120 fps Hockenheimring Short, BMW M5, 1440p at 160 fps
Nürburgring GP, BMW M3 E92 Hockenheimring Short, BMW M5

YouTube plays video at up to 60 fps; the frame rates are the game's during the recording.

Quick start

  1. Download FM4StaticRecomp-Launcher.zip from the latest release and extract it into a short folder you own, for example D:\FM4.
  2. Start FM4StaticRecompLauncher.exe and follow its setup steps: the game (vanilla or Project Forza Plus 4), Disc 1, Disc 2 (optional; on Project Forza Plus 4 the mod's zip instead), the Microsoft licence, the build and your profile.
  3. Press PLAY.

[!NOTE] The first start prepares shaders for your GPU before the title screen, with a progress bar. The window stays responsive; the time depends on your computer and graphics driver. Completed work is saved every 10 seconds and when preparation finishes, so later starts are much faster. An update or a GPU driver update may require preparation again. You can close the window during preparation; it may briefly wait for the current graphics operation to finish.

The first setup takes about 10 minutes (under 8 on the test bench). Details: Launcher guide. Prefer the command line? See the manual install.

Documentation

Guide What's in it
macOS Experimental Apple Silicon setup, requirements and testing status
Launcher First setup, content, unicorn cars, starting from Steam or a frontend, the data folder, updates
Profiles and saves Profiles, importing saves and Xenia Canary careers, a saves folder of your own
Playing in a window WINDOWED and WINDOW SIZE, Alt+Enter, resizing, upscalers in a window
Manual install Command-line setup, Disc 2 and DLC, updating
Project Forza Plus 4 Setting up the mod: its own install, career modes, saves, what is left out
Project Forza Plus 4: how the port runs it The mod's 1.0 code, also on Rev 1 discs, what setup takes and patches, why saves don't mix, the AI's physics steps
Graphics settings The GRAPHICS tab of the in-game PC OPTIONS, presets, what each setting does
Upscalers DLSS, FSR 2, FSR 3, FSR 4 and FSR 1: what to pick, how the port feeds them, known limits
High frame rates Picking a frame rate, how the game runs at up to 240 fps at real speed, limits
Gameplay settings The in-game GAMEPLAY tab: Quick Race laps (experimental)
Keyboard and mouse Key layout for driving and menus, rebinding, looking around with the mouse (the KEYBOARD and MOUSE tabs of PC OPTIONS)
Launch options Command-line options, languages, -Compat, frame generation, setting options, logs and crash reports
Debug options Debug views, A/B switches of rendering fixes and diagnostics
Testing and benchmarks What was played, frame rates and VRAM, comparisons with Xenia and hl360-forza4
Common problems Project Forza Plus 4 next to a vanilla install, crashes from overclocks, stutter, sound on older CPUs, upscalers that stay off, and their fixes
Reporting issues Checklist and template for a bug report

Features

Compared with the original console, and with the same translation built against the stock ShiftGlue SDK (without this project's game hooks and renderer changes):

Xbox 360 Stock ShiftGlue SDK FM4 Static Recomp
Resolution 1280x720 1x to 4x of 720p, but the road and car shadows render wrong 1x to 4x of 720p (up to 5120x2880), switchable live
Race frame rate 60 fps The console's pacing 60 fps up to the display's refresh rate (at most 240) (how)
Menus and showroom 60 / 30 fps The console's pacing The race frame rate; animations and the showroom camera run at real time
Race loading Console speed Console speed Faster
Sun and lights Correct Screen-filling glare Correct
Anti-aliasing The game's 2x/4x MSAA The game's MSAA Showroom and race MSAA 4x, 2x or off each, FXAA, FXAA Extreme, DLAA
Upscaling - DLSS, FSR 2 and FSR 3 with Forza Horizon's camera tracking, which does not fit FM4 DLSS, FSR 2, FSR 3 and FSR 4 with FM4's own depth, camera cuts and per-object motion (how)
Window - A launch option WINDOWED in the launcher, Alt+Enter while playing
Graphics settings Fixed Launch options only In-game GRAPHICS page (BACK + START or F6) with presets and per-setting switches, saved between sessions
VRAM at 3x - About 8 GB About 2 GB
Input Controller XInput gamepad XInput gamepad and keyboard, with keycap button prompts and keys rebound in the game or the launcher
Disc 2 and DLC From the disc and Marketplace Not wired up Installed at launch from folders you name
Mods - - Project Forza Plus 4 1.3, set up from its zip
Frame generation tools - Not visible to them Opt-in for Lossless Scaling and NVIDIA Smooth Motion
Xbox LIVE, Kinect Yes (LIVE servers closed) No No

More than twice Xenia's frame rate at every scale on the same PC (benchmarks).

Supported game

Game Forza Motorsport 4, Xbox 360, retail, title ID 4D530910
Disc 1, 1.0 PAL Europe, Australia, media ID 61D62D9F
Disc 1, 1.0 USA USA, media ID 26FF1101
Disc 1, Rev 1 Europe The 1.1 re-release, Europe, media ID 42C67824
Disc 1, Rev 1 USA The 1.1 re-release, USA, media ID 33E7B39F
Disc 2 Optional: the install disc's four content packages (more cars)
DLC Optional: Marketplace packages for title 4D530910
Mod Optional: Project Forza Plus 4 1.3 over any Disc 1 above, only in a new install of its own: a vanilla install cannot be switched to it

The two 1.0 releases carry the same code, and so do the two Rev 1 releases; only their executables' headers differ. Setup recognises the release from default.xex and translates that release's code, so the game folder must keep code of the disc it was set up from: the game refuses to start on a folder of the other code (1.0 or Rev 1) and asks to run setup again. Any other version of default.xex will not work (except Project Forza Plus 4 1.3's, which is the 1.0 code), because the translation is made for exact code; title updates are not applied. Other releases are untested. config/supported-discs.json lists every Disc 1 file with its size and hash.

What you need

  • Windows 10 version 2004 (build 19041) or newer, 64-bit. On a Mac, see the macOS guide.
  • A GPU with a current Vulkan driver.
  • An XInput gamepad (an Xbox controller, or another pad through a mapper), or the keyboard.
  • Your own Forza Motorsport 4 Disc 1, as an ISO or a Games on Demand (GOD) copy. Disc 2 and DLC are optional; so is Project Forza Plus 4 1.3's zip, for an install of the mod.
  • An internet connection for the first setup. No administrator permission and no Visual Studio: setup downloads the parts of Microsoft's C++ runtime and Windows SDK the build needs (about 300 MB) once you accept their licences.
  • About 10 GB of disk space (Disc 1 7.7 GB, the build tools with Microsoft's files 1.4 GB, the source with the prebuilt SDK and the build 1 GB), plus about 5 GB for Disc 2 and DLC; about 20 GB for a Project Forza Plus 4 install. The game installs into a data folder next to the launcher, so put the launcher folder on the drive that has the space before you start it; the setup page shows where it installs.
  • About 10 minutes for the first setup (under 0.5 GB to download, most of it from Microsoft); a rebuild after an update takes a few minutes.

Known issues

Known problems are tracked as open issues; fixes for the common ones are in Common problems. Found a new one? See Reporting issues.

Roadmap

  1. Upscaler polish: the remaining shimmer (see Known limitations).
  2. Racing wheels, starting with MOZA wheels.
  3. Linux: a native build of the game and the launcher.
  4. Other disc releases, such as the Essentials Edition.
  5. More tests on niche or legacy hardware.

Repository layout

Where things are
Path What it is
src/ The host app: game hooks, built-in defaults, Disc 2 and DLC install, the PC OPTIONS page and its tabs
src/input/ Keyboard play: bindings, driving smoothing, keycap prompts
tests/ Unit tests of the host app
config/rexglue/ The recompiler's input: function analysis and hooks at their 1.0 addresses, each release's fragment list, the manifest
config/rexglue/releases/ Where each 1.0 address is in Rev 1's code, with a fingerprint of the code there (tools/port_release.py, checked by tools/release_parity.py)
config/*.json The pinned toolchain and SDK, the supported discs' file lists, Project Forza Plus 4 1.3's file list (pfp4-1.3.json, made by tools/make-pfp4-manifest.py)
tools/setup.ps1, build.ps1, codegen.ps1, run.ps1 Setup, build and launch
launcher/ The launcher (Avalonia, .NET 8): its core library with tests, and the app
tools/package-release.ps1 Builds the release assets and the players' zip
config/shaders/ The pipeline list and vertex shader table setup builds the shader cache from
tools/shader_list.py, tools/warm-up.ps1, config/warm-up/ Development tools that make that list: a scripted warm-up, its profile, list merging and checks
DEBUG_OPTIONS.md Debug views, A/B switches of rendering fixes and diagnostics
tools/ (the rest) Development tools; several assume the author's folder layout
guide/ The player guides linked above

Credits

  • Pinyon Shift by arcanite24: the Forza Horizon recompilation whose native renderer, host UI and build scripts this project builds on (see THIRD_PARTY_NOTICES.md).
  • ShiftGlue SDK, Pinyon Shift's fork of the ReXGlue SDK: the recompiler and runtime. This project uses a fork of it (branch fm4-static-recomp) with FM4's renderer fixes.
  • Xenia, from which much of the runtime and GPU emulation in ReXGlue derives.
  • fm4-recomp, an earlier FM4 recompilation on ReXGlue, which inspired this project.
  • Project Forza Plus 4 by Gas-and-Games: the car, career and physics mod the launcher sets up. This repository holds none of its files; you download the mod from its author.

The people whose pull requests or testing are part of the project are listed in CONTRIBUTORS.md.

AI use: code, scripts, documentation and reverse engineering of the game binary are AI-assisted.

License

The source in this repository is under the BSD 3-Clause License (LICENSE). Parts adapted from Pinyon Shift keep their own BSD 3-Clause notice (THIRD_PARTY_NOTICES.md). The license covers this project's code only: the game, its assets and any executable built from its translation are not covered, and must not be redistributed.

Legal

This is an unofficial fan project. It is not affiliated with, endorsed, sponsored or approved by Microsoft Corporation, Xbox Game Studios, Turn 10 Studios, or any other company or person that made, published or licensed Forza Motorsport 4, including the car manufacturers, track owners and other licensors whose names and brands appear in the game. Forza, Forza Motorsport, Xbox and Xbox 360 are trademarks of Microsoft Corporation; every other trademark belongs to its owner. This repository contains no game code, game assets, disc images, generated translation or prebuilt game executable: you need your own legally obtained copy of the game, and the executable is built on your computer.

Explorar proyectos relacionados

Cargando…