Viva Piñata icon # Viva Piñata Recomp **Viva Piñata (Xbox 360, 2006) running natively on Windows PC** **English** · [Русский](README.ru.md) [![Platform](https://img.shields.io/badge/platform-Windows%20x64-0078D6?logo=windows&logoColor=white)](#what-you-need) [![Title ID](https://img.shields.io/badge/Title%20ID-4D5307F2-107C10?logo=xbox&logoColor=white)](#which-game-version-you-need) [![ReXGlue SDK](https://img.shields.io/badge/ReXGlue%20SDK-v0.10.0.30%20(fork)-8A2BE2)](https://github.com/crabinacrabic/rexglue-sdk-RED-Edition-LAVA/tree/rov-research) [![Renderer](https://img.shields.io/badge/render-Direct3D%2012-blue)](#settings) [![RED Edition LAVA](https://img.shields.io/badge/RED%20Edition-LAVA-ED1C24)](#red-edition-lava) [![Status](https://img.shields.io/badge/status-playable-2ea44f)](#what-works) [![Languages](https://img.shields.io/badge/text-English%20%7C%20Русский-orange)](#russian-language) Title screen Garden
--- ## What is this? The original Xbox 360 game, converted into a normal Windows program. It is **not an emulator**: the game's code was translated to C++ with [ReXGlue SDK](https://github.com/rexglue/rexglue-sdk) ("static recompilation"). The game has a launcher and can optionally use a Russian translation. > [!IMPORTANT] > **No game files are included.** You need your own copy of the game, and it must be one specific version (see below). ## RED Edition LAVA

RED Edition LAVA logo: molten lava under a cracked crust

**RED Edition LAVA** is the name of our work on the launcher's **Accurate** mode: the Xbox 360 video memory (EDRAM) emulated exactly on Vulkan with fragment shader interlock, and made fast enough on AMD Radeon to hold the game's 30 FPS (RX 6600). It lives in [our fork of ReXGlue SDK](https://github.com/crabinacrabic/rexglue-sdk-RED-Edition-LAVA/tree/rov-research), so other ReXGlue games can use it too. Red is for Radeon, the GPU it was tuned on; lava is what a volcano brings up from the mantle, a nod to Vulkan, which grew out of AMD's Mantle. A community project, not affiliated with AMD or the Khronos Group. Vulkan is a registered trademark of the Khronos Group Inc.; Radeon is a trademark of Advanced Micro Devices, Inc. ## What you need - A Windows 10 or 11 PC (64-bit) with a DirectX 12 graphics card. - About **25 GB** of free disk space (Visual Studio ~12 GB, the game ~5 GB, the disc image ~8 GB while unpacking). - Your own disc image (`.iso`) of **Viva Pinata (USA, Europe)** for Xbox 360. It must be exactly the version below. ## Which game version you need | | | | :-- | :-- | | **Disc (Redump name)** | `Viva Pinata (USA, Europe) (En,Ja,Fr,De,Es,It,Nl,Pt,Sv,No,Zh,Ko,Pl,Cs,Hu,Sk)` | | **Title ID / Media ID** | `4D5307F2` / `690B3287` | | **Version** | `0.0.0.1`, the original disc, no title update needed | | **ISO checksum** | MD5 `3902321dfe15d7d2510a96114dba625a`, CRC32 `f3ddf9d3` | Other editions have not been tested and will probably not start. *Viva Piñata: Trouble in Paradise* and *Viva Piñata: Party Animals* are different games. You do not need the bonus disc. ## The easy way: let an AI agent install it 1. Install an AI assistant that can run commands on your computer, for example [Claude Code](https://claude.com/claude-code), OpenAI Codex or Cursor. 2. Paste this message into it, with the real path to your ISO: > Install Viva Piñata Recomp on this PC: https://github.com/crabinacrabic/VivaPinataRecomp — follow AGENTS.md from that repository. My game disc image is at `C:\path\to\Viva Pinata.iso`. I also want the Russian language: no / yes. 3. The agent downloads and checks everything. When it asks, click through the Visual Studio installer and press **Build** in Visual Studio. 4. When it is done, double-click **`run_game.bat`** in the project folder. ## Doing it yourself (6 steps) 1. **Install the tools.** You need: - [Visual Studio 2026 Community](https://visualstudio.microsoft.com/) (free), with the workload **Desktop development with C++** and the component **C++ Clang tools for Windows**; - [Git](https://git-scm.com/). 2. **Download the project.** Use a folder path that contains only English letters, then run: ```bash git clone https://github.com/crabinacrabic/VivaPinataRecomp.git C:\Games\VivaPinataRecomp ``` 3. **Unpack the game** with [extract-xiso](https://github.com/XboxDev/extract-xiso/releases/latest) (file `extract-xiso-Win64_Release.zip`): ```bash extract-xiso -x -d C:\Games\VivaPinataRecomp\game_files "C:\path\to\Viva Pinata (USA, Europe).iso" ``` Afterwards `game_files` must contain `default.xex` and a `Beta` folder. 4. **Build it.** - In Visual Studio: **File → Open → Folder…** → select `C:\Games\VivaPinataRecomp`. - Wait until the Output window says the CMake generation has finished. The first time takes a few minutes: it downloads the SDK and converts the game code. - In the toolbar, choose the configuration **`local-win-relwithdebinfo`**. - Click **Build → Build All** (`F7`). 5. **Start it:** double-click **`run_game.bat`**. 6. **In the launcher** press **PLAY** (or `Enter`). A green status line means the game was found and the version is right. - **Settings** has the game text language, fullscreen, V-Sync, render resolution, render mode and the launcher language. - The launcher speaks English or Russian and follows your Windows language. The **EN / RU** button in the top-right corner switches it. ## Russian language The Xbox disc has no Russian. This project moves the fan translation of the **PC version** by **ZoG Team** ([zoneofgames.ru](https://www.zoneofgames.ru/)) onto the Xbox game, with the team's permission. The translation is not stored in this repository. 1. Download **[VivaPinata_Russian_v1.zip](https://disk.yandex.ru/d/9lgjQVp7fArEjw)** (Yandex Disk, 255 KB). It holds only the Russian text, no game files. 2. Unzip it into the project folder, so that `translation\vp_russian.json` appears. 3. Install [Python 3](https://www.python.org/) and [7-Zip](https://www.7-zip.org/), then run in the project folder: ```bash python tools/make_russian_bnl.py ``` 4. In the launcher, choose **Settings → Game text language → Russian**. If you have the PC version with the ZoG translation installed, `python tools/make_russian_bnl.py --pc-ru "/bundles/english.bnl" --pc-en "/Install_Rus/backup/bundles/english.bnl"` builds the same file from it. 12 446 of 12 460 strings are translated; only the credits stay in English. You can switch back to English at any time. ## Controls The game is made for an Xbox controller, which works right away. The keyboard and mouse can also be used: | Controller | Keyboard | | Controller | Keyboard | | :-- | :-- | :-- | :-- | :-- | | Left stick (cursor) | `W` `A` `S` `D` | | **A** | `Space` | | Right stick (camera) | arrows, mouse | | **B** | `Backspace` | | D-pad | `Shift` + arrows | | **X** | `L` | | **LT / RT** | `Q` / `E` | | **Y** | `P` | | **LB / RB** | `1` / `3` | | **Start** | `Enter` | | **L3 / R3** | `F` / `K` | | **Back** | `Tab` | The keys can be changed in [`settings/mapping.toml`](settings/mapping.toml). ## Settings Most settings are in the launcher. Everything else is in [`settings/hardware.toml`](settings/hardware.toml). The launcher saves its own choices to `settings/launcher.toml`; delete that file to reset them. ## What works Tested on Windows 11 with an AMD Radeon RX 6600. | | | | :-- | :-- | | ✅ | Menus, title screen, garden gameplay, saving and loading | | ✅ | Sound, Xbox controller, keyboard and mouse | | ✅ | The original 30 FPS in the default **Fast** graphics mode | | ✅ | Launcher in English and Russian, with a game version check and graphics settings | | ✅ | Performance overlay on `F2`: game ticks per second, the worst frame, how evenly frames reach the screen, CPU, GPU, video memory, RAM and the render mode as it really runs | | ✅ | Russian text (ZoG Team translation) | | ✅ | **Accurate** graphics mode: the Xbox 360 video memory (EDRAM) emulated exactly, on Vulkan. 30 FPS on an RX 6600 | | ⚠️ | Short stutters the first time a scene appears, while the GPU compiles its shaders. The shaders are saved, so each stutter happens only once | | ⚠️ | A rare crash after about a minute of idling on the title screen. Pressing START before that avoids it | | ✅ | Direct3D 12 (Fast) and Vulkan (Accurate) | | 🚧 | No frame rates above 30 FPS; intro videos can't be skipped | The whole game has not been played through from start to finish yet. If something breaks, please open an issue and attach the log from `out\build\local-win-relwithdebinfo\logs\`. ## What we're working on Done: - **Accurate mode at full speed.** AMD drivers made the GPU wait for each pixel's turn, and that waiting took most of the time. Our build of ReXGlue shortens that wait and stops the CPU from waiting for the GPU, without changing the result: the emulated video memory is identical to the original code (one intermediate pass differs by ±1 in about 100 pixels). Accurate went from 13–15 to a steady 30 FPS on an RX 6600. How it works, with the measurements: [research notes](https://github.com/crabinacrabic/rexglue-sdk-RED-Edition-LAVA/blob/rov-research/docs/accurate-edram-vulkan.md). - **Smoother Vulkan.** The overlays kept asking the SDK to redraw the screen 100–180 times per second; with Vulkan's vertical sync on a busy GPU that made the game's 30 frames uneven (33 ms ± up to 23 ms, some frames never shown). Now the screen is redrawn once per game frame: 33.3 ms ± 1 ms in both modes. - **Honest Accurate mode.** The launcher warns when this PC can't run Accurate (no Vulkan, or no fragment shader interlock on the GPU), and `F2` shows the mode that really runs. Next, in this order: 1. **No shader stutter on the first run.** The first time a scene appears, the GPU compiles its shaders and the game stutters for a moment. Later runs don't stutter there: the shaders are saved and prepared at startup in a few seconds. Plan: compile shaders in the background before the game needs them, the way other recomps do, so that the first run is smooth too. 2. **A short hitch about 10 seconds after the start**, in both modes: find the cause. 3. **The ±1 difference in Accurate:** find the shader that makes one intermediate pass differ by ±1 in about 100 pixels, and why. 4. **The same speedups for Direct3D 12**, starting with the lazy readback. 5. **More GPUs:** Accurate is tested only on an AMD RX 6600. Reports from NVIDIA and Intel GPUs are very welcome (open an issue with your GPU and FPS). 6. **VP Tools**, an in-game developer menu (`F1` or hold Back): spawning piñatas, a value scanner, engine traces and GPU statistics. Next: editing coins and experience. Later: a base for mods. 7. **The title screen crash** (a crash log is already written to `logs\vp_crash.txt`). ## If something goes wrong | Problem | What to do | | :-- | :-- | | Red line in the launcher | The game files are missing or the version is wrong: check `game_files\default.xex` and the version table above | | Build error `Microsoft Visual C/C++ Version differs in precompiled file` | Visual Studio was updated. Delete `out\build\local-win-relwithdebinfo\CMakeFiles\vivapinata_recomp.dir\cmake_pch.hxx.pch` and build again | | Code generation fails with `0xC0000409` | The project path contains non-English characters. Move the project, for example to `C:\Games\VivaPinataRecomp` | | Visual Studio stops at "Access violation" in `memcpy` when started with `F5` | This is not a crash. Turn off breaking on `0xC0000005` (Debug → Windows → Exception Settings), or start with `Ctrl+F5` / `run_game.bat` | Logs are written to `out\build\local-win-relwithdebinfo\logs\`. Detailed technical instructions: **[AGENTS.md](AGENTS.md)**. ## For developers How the project is organised, the development rules and the important fixes: [AGENTS.md](AGENTS.md), section 2. The two biggest fixes: - a ReXGlue code generator bug that made the ground white (`vpkd3d128` lost the sign of numbers, [`src/game_fixes.h`](src/game_fixes.h)); - in-place decompression of Rare's CAFF files, which the Russian text bundle has to respect ([`tools/make_russian_bnl.py`](tools/make_russian_bnl.py)). ## Credits - [ReXGlue SDK](https://github.com/rexglue/rexglue-sdk): recompiler and runtime ([our fork](https://github.com/crabinacrabic/rexglue-sdk-RED-Edition-LAVA/tree/rov-research) with the Accurate mode changes) - [Xenia](https://github.com/xenia-project/xenia) and [Xenia Canary](https://github.com/xenia-canary/xenia-canary): graphics backend, and the reference used for comparison - [TiP-Recomp](https://github.com/SolarCookies/TiP-Recomp) (SolarCookies): project architecture reference and engine function names (Viva Piñata: Trouble in Paradise), used with the author's permission - ZoG Team ([Zone of Games](https://www.zoneofgames.ru/)): the Russian translation of the PC version - Rare: for a wonderful game ## Legal This project is not affiliated with or endorsed by Microsoft or Rare. It contains no game files; you need your own legally obtained copy. Viva Piñata is a trademark of Microsoft Corporation.