[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-107679":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":9,"language":10,"languages":9,"totalLinesOfCode":9,"stars":11,"forks":12,"watchers":13,"openIssues":14,"contributorsCount":15,"subscribersCount":15,"size":15,"stars1d":12,"stars7d":16,"stars30d":17,"stars90d":15,"forks30d":15,"starsTrendScore":18,"compositeScore":19,"rankGlobal":9,"rankLanguage":9,"license":20,"archived":21,"fork":21,"defaultBranch":22,"hasWiki":21,"hasPages":21,"topics":23,"createdAt":9,"pushedAt":24,"updatedAt":25,"readmeContent":26,"aiSummary":27,"trendingCount":15,"starSnapshotCount":15,"syncStatus":12,"lastSyncTime":28,"discoverSource":29},107679,"PGR4-ReGPU","zer0ducksgiven\u002FPGR4-ReGPU","zer0ducksgiven","Project Gotham Racing 4 PC port on ReGPU (XenonRecomp)",null,"C",113,2,3,11,0,9,60,7,55.93,"MIT License",false,"main",[],"2026-11-22 12:18:51","2026-11-23 07:42:52","# PGR4:ReGPU\n\nA native PC port of **Project Gotham Racing 4** (Bizarre Creations, 2007, Xbox 360). It is not an\nemulator: nothing interprets the console's code or runs it in a virtual machine.\n\n- **The game code is native x64.** [XenonRecomp](https:\u002F\u002Fgithub.com\u002Fhedge-dev\u002FXenonRecomp) translates\n  the game's PowerPC code ahead of time into C++, which is compiled into `pgr4.exe`. The console's\n  kernel and system calls are reimplemented as ordinary Windows code.\n- **The graphics are native Direct3D 12.** **ReGPU**, the renderer in `thirdparty\u002FReGPU`, turns the\n  game's GPU commands into Direct3D 12 draws, and its shaders (Xenos microcode) into HLSL compiled for\n  your GPU. Pipelines are cached, so a shader compiles once.\n\n No game files are included: you need your own copy of the disc\n(and, optionally, Title Update #2 and DLC).\n\n## ReGPU\n\nReGPU gives the port a PC renderer instead of a GPU emulator. The game draws exactly as it did on the\nconsole, writing command packets and calling the `Vd*` video functions, and ReGPU builds Direct3D 12\nwork from them:\n\n- **Shaders:** each Xenos shader is translated once to HLSL and compiled to a D3D12 pipeline, cached on\n  disk between runs.\n- **Render targets:** the console's 10 MB EDRAM tiles and resolves become D3D12 render targets and\n  copies, with real MSAA.\n- **Textures:** the console's tiled, big-endian formats are converted to D3D12 textures as the game\n  uploads them.\n- **PC features the console never had:** any resolution, anisotropic\n  filtering, an uncapped or custom frame rate.\n\nIt started in the Forza Motorsport 2 port and was proven on this one; fixes made for PGR4 go back into\nit.\n\n## What's here\n\n| Folder | What it is |\n|---|---|\n| `src\u002F` | The port's runtime: the console kernel and XAM, memory, threads, file system, audio (XMA, WMA via XMP), saves and profiles, settings, and the game-specific hooks (`src\u002Fhooks\u002F`) |\n| `thirdparty\u002FReGPU\u002F` | The renderer: command processor, Xenos shader microcode to HLSL, EDRAM, resolves, MSAA, texture formats, upscaling (FSR 1) and the debug server. Was a submodule of `zer0ducksgiven\u002FReGPU`; it now lives in this repository |\n| `config\u002Fpgr4.toml` | XenonRecomp's function boundaries and jump tables for `default.xex` with Title Update #2 |\n| `tools\u002F` | Disc and package extraction (`xiso.py`, `stfs.py`), recompile (`recomp.sh`), import and stub generators |\n| `launcher\u002FPGR4Launcher\u002F` | The launcher (C#, Photino): install, graphics settings, DLC and mods, profiles and 360 save import, title update import, photos, updates |\n| `installer\u002F` | The Inno Setup installer and first-boot setup |\n\n## Building\n\nWindows 10\u002F11, a Direct3D 12 GPU, clang-cl, CMake 3.25+, Ninja, Python 3, and the .NET SDK for the\nlauncher.\n\n```sh\npy -3 tools\u002Fxiso.py extract \"\u003CPGR4 disc>.iso\" game\npy -3 tools\u002Fstfs.py update \"\u003CTU_16L61VP_...>\" out\u002Ftu2\nsh tools\u002Frecomp.sh                 # applies patches\u002Fxenonrecomp.patch; XenonRecomp: game\u002Fdefault.xex + TU2 -> out\u002Fppc\ncmake --build build\u002Frel            # pgr4.exe\ndotnet build launcher\u002FPGR4Launcher -c Release\n```\n\n`play.cmd` starts the game from the repository root (logs to `out\u002Fplay.log`).\n\n## DLC\n\n360 DLC packages install through the launcher's **Add DLC**. The Kellogg's Typhon promo, whose 360\npackage is lost, installs from its zip of rebuilt files (`PGR4-Kelloggs-Typhon-DLC.zip`) through the\nsame button.\n\n## Contributors\n\n- **Scott** ([zer0ducksgiven](https:\u002F\u002Fgithub.com\u002Fzer0ducksgiven)): the port and ReGPU.\n\nReGPU contributors:\n\n- **[Aiden-Piercee](https:\u002F\u002Fgithub.com\u002FAiden-Piercee)**: ring buffer replacement without racing the\n  command processor, depth-only alpha test and clear fixes for fixed-point targets, pixel-shader kills\n  in depth-only passes, regpuctl whole-frame capture and draw counts.\n- **[tankyx](https:\u002F\u002Fgithub.com\u002Ftankyx)**: explicit-LOD sampling in vertex shaders; skipping microcode\n  that cannot be a shader.\n- ReGPU also carries fixes from the Forza Motorsport 2, Forza Motorsport 4 and Glue2GPU ports.\n\n## Credits\n\n- [XenonRecomp](https:\u002F\u002Fgithub.com\u002Fhedge-dev\u002FXenonRecomp) (MIT).\n- [Xenia](https:\u002F\u002Fgithub.com\u002Fxenia-project\u002Fxenia)'s research into the Xenos GPU and the Xbox 360\n  kernel informed this work. No Xenia code is included.\n- AMD FidelityFX SDK (MIT); Microsoft's `d3dcompiler_47.dll` (Windows SDK redistributable);\n  [Photino.NET](https:\u002F\u002Fgithub.com\u002Ftryphotino\u002Fphotino.NET) for the launcher.\n\nProject Gotham Racing 4 is © Microsoft. This project contains none of its code or data.\n","PGR4:ReGPU 是一款将 Xbox 360 游戏《Project Gotham Racing 4》原生移植到 Windows PC 的开源项目，不依赖模拟器或虚拟机。它通过 XenonRecomp 将 PowerPC 游戏代码静态编译为原生 x64 C++，并使用 ReGPU 渲染器将 Xenos GPU 指令实时转换为 Direct3D 12 调用，支持 HLSL 着色器缓存、真实 MSAA、EDRAM 模拟、各向异性过滤及任意分辨率。项目完整重实现了 Xbox 360 内核、文件系统、音频（XMA\u002FWMA）、存档与配置模块，并提供图形设置、DLC 导入和安装工具。适用于希望在现代 PC 上以原生性能运行该经典赛车游戏的玩家与技术爱好者。","2026-11-24 04:32:37","CREATED_QUERY"]