KytyPS5

KytyPS5 is a PlayStation 5 emulator for Windows and Linux that is tuned for Demon's Souls.

README

Note

This fork is tuned for Demon's Souls. Its renderer, shader and memory paths are optimized for Demon's Souls (PS5, PPSA01341), game versions 1.07 (01.007.000) and 1.05 (01.005.000): both are supported, with the same performance patches (each version precompiles its own shader caches); other versions and games are untested here and may not run. Tested on Windows 11 with an Intel i9-14900K and an NVIDIA RTX 5090 (60 fps in most places at 2560×1440, the heaviest spots about 57–60); users also run it on AMD Radeon and Intel Arc cards, with problems of their own tracked in the issues. 32 GB of RAM and a GPU with 12 GB of video memory are recommended; it also runs with 16 GB of RAM (slower loading; close browsers while playing, see #50) and 8 GB of video memory (the test PC limited to 8 GB: most areas 40–60 fps, the heaviest 10–35).

Download: the latest release, a Windows x64 build made by GitHub Actions from this branch. Unzip it, double-click launcher.cmd (or run.cmd) and choose the game folder (the one with eboot.bin); the README.md inside explains the rest. Use only a game dump made from your own copy of the game. To build it yourself, see Building with build-windows.cmd.

Chinese, Japanese, Korean: the game files hold every language, but the game lists only its release's. Setting "userDefinedParam1" in the game's sce_sys\param.json from 2 (Europe, as dumped) to 0 lists every language (4: the Asian release, 3: the Japanese one); with saves, move _SaveData\PPSA01341\SAVEDATA0OptionsProfile0 away so the game asks again. Steps: Game language.

Steam Deck: about 26-30 fps in the worlds and 40 in the Nexus with the Deck's settings, from the release's Steam Deck package (KytyPS5-steamdeck-<version>.zip). How to copy the emulator and the game over and start it from Steam: docs/STEAM-DECK.md.

中文:本分支专为《恶魔之魂》(PS5 版 PPSA01341) 优化,支持游戏版本 1.07 (01.007.000) 和 1.05 (01.005.000),两者性能补丁相同 (着色器缓存按版本分别预编译);其他版本和游戏未测试。 下载最新 release,解压后双击 launcher.cmd 或 run.cmd,选择游戏目录(含 eboot.bin 的那一层)。推荐 32 GB 内存、12 GB 以上显存的显卡;16 GB 内存 (加载较慢;游戏时请关闭浏览器等大程序,见 #50)和 8 GB 显存(测试机限制到 8 GB 时:多数区域 40–60 帧,最重的场景 10–35 帧)也能运行。 中文/日文: 游戏文件里包含全部语言,但只列出所属发行区域的语言。把游戏目录 sce_sys\param.json 里的 "userDefinedParam1": 2(欧版,dump 原值)改成 0 即可列出全部语言(含简繁中文和日文;4 为亚洲版:简繁中文、 英文、韩文、泰文;3 为日版)。已有存档时,先备份 _SaveData,再把 _SaveData\PPSA01341\SAVEDATA0OptionsProfile0 移出存档目录(角色存档不受影响,只有游戏设置恢复默认),下次启动会出现语言选择。详见 Game language。 Steam Deck: 用发布页的 Steam Deck 版的包(KytyPS5-steamdeck-<版本>.zip),按 Deck 的设置,各世界约 26–30 帧, 连结之地约 40 帧。怎样把模拟器和游戏传到 Deck、从 Steam 启动:docs/STEAM-DECK.zh-CN.md。

Fixes worth cherry-picking

Most of this fork is performance work tied to its own caches, but these three fixes stand on their own and are useful in other KytyPS5 trees:

1. Game audio: the game was silent, then positional sounds were nearly inaudible

  • f203d0f3, its audio part only (the commit also holds Windows packaging): ATRAC9 streams in a RIFF container required the whole data chunk in the first stream piece, so every decode returned partial input and the game played no sound besides its videos; AudioOut2 object ports are mixed into the main port. Take just its two audio files: git show f203d0f3 -- src/libs/ajm/atrac9_decoder.h src/libs/libAudio2.cpp | git apply (upstream has rewritten its RIFF parsing since, in e40438f9: compare before taking that part).
  • c2b48aeb, git cherry-pick c2b48aeb after the above: the game sends its whole mix as two fifth-order ambisonics scenes on AudioOut2 object ports (attribute 8 = 0x40 | ACN, SN3D). Summed into the front pair they cancelled out; they are now decoded to stereo from the first order, and 7.1 ports are downmixed on stereo devices without SDL's -13.5 dB front level.

2. Nexus: a ring of blue "?" models (3248e372, src/libs/libAmpr.cpp only)

APR file ids were hashes of the guest path. The game resolves all of its ~250K files at start-up, 13 pairs collided, and one file of each pair read the other's bytes: the Nexus arch model failed to load and the engine drew its default "?" model instead (some LODs, a collision mesh and a texture elsewhere were affected too). Ids are now assigned one per path. Upstream main (cdb64bfd, 2026-10-06) still hashes.

The Nexus ceiling before and after 3248e372: the ring of "?" models is gone

3. Boletaria 1-1: the brazier's stone pillar and other missing objects (3b351932)

Indirect draws name a user SGPR (START_INST_LOC) that the command processor fills with the draw's start instance, and the shader's instance ID counts from 0. Both were ignored (the ID included firstInstance), so shaders that index per-object data with that SGPR read stale values: the stone pillar under the brazier at 1-1, rock faces there, the hall behind the cell windows of the Tower of Latria. The fix is in the shader recompiler (Translate.cpp, the SPIR-V emitter), shader.cpp/.h (the static key), graphicsRun.cpp / hardwareContext.h (the SGPR per draw) and vulkanWindow.cpp (shaderDrawParameters, drawIndirectFirstInstance); its src/local and tools changes only follow this fork's caches.

Boletaria 1-1 before and after 3b351932: the brazier floats without its stone pillar before the fix

KytyPS5

Build KytyPS5 (Windows) Build KytyPS5 (Linux) Build KytyPS5 (macOS) Platform Status License

KytyPS5 is a free and open-source PlayStation 5 emulator written in C++ for Windows and Linux, with experimental macOS support. It is based on a heavily modified version of Kyty. The project is in an early stage of development, so compatibility is limited and behavior may change significantly between builds.

Important

KytyPS5 is not affiliated with Sony Interactive Entertainment or PlayStation. The project does not distribute games or copyrighted system software. Use only game files that you have obtained legally.

Current Status

KytyPS5 can boot 2D games and a selection of 3D games, including titles built with Unreal Engine 4/5, Unity, and custom engines. No external low-level emulation modules are currently required.

Development is focused on compatibility and boot reliability.

Windows is the primary platform and receives the most testing. Linux builds and runs; see Building on Linux.

macOS support is experimental. The emulator is built for x86-64 and runs on Apple Silicon under Rosetta 2, with Vulkan provided by MoltenVK. A small number of titles have been verified in-game on Apple Silicon hardware; see Building on macOS.

Community game test results are available in the KytyPS5 Compatibility List.

Bugs and Issues

The project is in an early stage, so please be mindful when opening new issues. Expect crashes, graphical glitches, low compatibility, and poor performance.

Screenshots

Disgaea 6
Disgaea 6 running in KytyPS5
Dreaming Sarah
Dreaming Sarah running in KytyPS5
Neptunia ReVerse
Neptunia ReVerse running in KytyPS5
SILENT HILL: The Short Message
SILENT HILL: The Short Message running in KytyPS5
Hellboy
Hellboy running in KytyPS5
Paleo Pines
Paleo Pines running in KytyPS5

And many more...

Contributing

Testing games and submitting detailed bug reports are useful ways to contribute. Search existing issues first, then use the Game Emulation Bug Report template and attach the complete log file.

Code contributions should be focused, build successfully on the platforms they touch, and include relevant tests where practical. Windows is the primary target, so a change that alters shared code should not regress it; changes confined to a platform's own code paths only need to build there. Because KytyPS5 is still evolving quickly, consider opening an issue before starting a large change.

Formatting

Set up the clang-format hook after cloning:

python -m pip install pre-commit
python -m pre_commit install --install-hooks

It formats staged .cpp, .h, and .inc files in src.

Developer Information

The PS5 graphics architecture is based on AMD RDNA 2. Use AMD's RDNA 2 Instruction Set Architecture Reference Guide (document 70648) as the primary instruction-encoding reference when working on shader decoding and recompilation.

Important areas of the codebase:

The renderer targets Vulkan 1.3. Keep shader changes aligned with both the RDNA 2 ISA semantics and the Vulkan/SPIR-V validation rules.

Building

System requirements
  • Windows 10 version 1803, a current Linux distribution, or macOS on Apple Silicon
  • A 64-bit x86 processor (on macOS, an Apple Silicon processor with Rosetta 2)
  • A Vulkan 1.3-capable GPU with current drivers (on macOS, Vulkan is provided by the bundled MoltenVK)
Building with build-windows.cmd (Windows)

The shortest way to a Release build of the emulator (without the Qt launcher):

  1. Install the tools once:

    • Git: winget install Git.Git
    • Visual Studio 2022 or Build Tools 2022 with the Desktop development with C++ workload (its C++ CMake tools for Windows component brings CMake and Ninja)
    • LLVM 19 for clang-cl: winget install LLVM.LLVM --version 19.1.7 (19.1.7 is tested; the C++ Clang tools for Windows component of Visual Studio is used when LLVM is not installed; LLVM 23.1.2 crashes compiling agc.cpp). Visual Studio 2026's C++ library needs Clang 20 or newer (STL1000: Unexpected compiler version): with it, use its bundled clang-cl (no LLVM in Program Files) or a newer LLVM.
    • Vulkan SDK, for glslangValidator: winget install KhronosGroup.VulkanSDK
    • Python 3: winget install Python.Python.3.12
  2. Clone and build from a new terminal (so that the tools are on PATH):

    git clone --recurse-submodules https://github.com/chenxiao07/KytyPS5.git
    cd KytyPS5
    .\build-windows.cmd
    

    The script finds Visual Studio, clang-cl and the Vulkan SDK, checks out submodules that are missing, configures _Build\windows the first time (CMake downloads xbyak, zydis, zstd and ZArchive) and builds _Build\windows\kyty_emulator.exe. Run it again after changes for an incremental build; .\build-windows.cmd all builds every target.

  3. Start a game with its folder (the one with eboot.bin; it is remembered in game-path.txt):

    powershell -ExecutionPolicy Bypass -File .\run-windows.ps1 -Game "D:\Games\PPSA01341-app0"
    

    The emulator's switches default to the release settings (src/local/performance-switches.h; -Set KYTY_NAME=value changes one); -DryRun prints the environment and the command, -Fullscreen, -Width/-Height and the others are listed at the top of the script. -Set KYTY_SPECULATE=4 turns on the parallel translation of the game's command buffers (mode 4, docs/PARALLEL-TRANSLATION.md). It needs more memory than mode 0: ~3.6 GB more private memory over a long session (a tour of the worlds: 21.1 against 17.5 GB), nearly all of it mimalloc's heap (3.2 GiB committed at the first area). On a PC with less than 28 GB of RAM it stands down at boot and the run stays in mode 0; the log says so. KYTY_SPECULATE_RAM_GB moves the threshold (in GiB; 0 lifts the gate). It also stands down on a CPU whose performance cores have fewer logical CPUs than its threads (3 render threads, the 4 workers, the async queue's 2: 9), e.g. 3 performance cores with efficiency cores beside them; naming the workers' CPUs with KYTY_SPECULATE_CPUS lifts that check. Windows builds replace operator new/delete for this: mode 4 allocates from mimalloc, mode 0 from the CRT heap as before (one relaxed load per allocation decides). mimalloc is linked into every Windows build and starts with the process even in mode 0: its loader callbacks run, it reads the MIMALLOC_* variables, and it adds a callback per thread start and exit. A ZArchive of the folder (-Game D:\Games\PPSA01341-app0.zar) works too, read without extracting it; .\build-windows.cmd zarchive_tool builds the packer, _Build\windows\3rdparty\zarchive.exe <folder> <file.zar>. A path longer than 260 characters stops it ("Failed to open input file"): pack from a folder near the drive root, or turn on Windows' long paths (#240).

The build is optimized for the CPU it is built on (-march=native). For an executable that other PCs can run, set KYTY_CMAKE_ARGS=-DKYTY_MARCH=x86-64-v3 before the first configure. The release package is built that way by .github/workflows/build.yml when Actions > Build KytyPS5 (Windows) > Run workflow is started or a v* tag is pushed, and published as a release (pushes build nothing). .github/workflows/build-linux.yml builds the Linux package the same way (a v* tag adds it to that tag's release).

AMD's FSR runtime (frame generation, 2x, any GPU without DLSS frame generation: run-windows.ps1 -Fsr, a launcher checkbox; and with -Upscaler fsr FSR 4 upscaling on the Radeon cards AMD lists for it) is built in when AMD FSR SDK 2.4's API headers (MIT) are unpacked into _Build\deps\fsr-sdk before configuring, keeping their layout: Kits\FidelityFX\api\include, Kits\FidelityFX\framegeneration\include and Kits\FidelityFX\upscalers\include. At run time it needs AMD's signed DLLs next to the emulator: SDK 2.4's amd_fidelityfx_loader_vk.dll with amd_fidelityfx_framegeneration_vk.dll and amd_fidelityfx_upscaler_vk.dll, or FidelityFX SDK 1.1.4's amd_fidelityfx_vk.dll (FSR 3.1 frame generation only). The release build fetches the headers itself (as Streamline's); the DLLs are not in the package.

Build requirements (Windows)
  • Git
  • CMake 3.12 or newer
  • Ninja
  • Visual Studio 2022 or Build Tools 2022 with the Desktop development with C++ workload and C++ Clang tools for Windows component
  • The Vulkan SDK (glslangValidator) and Python 3
  • Qt 6 for MSVC 2022 64-bit, including Concurrent, Network, and Widgets

The Microsoft C++ compiler (cl.exe) is not supported; use clang-cl.

Open an x64 Native Tools Command Prompt for Visual Studio 2022 (or the equivalent Developer PowerShell), change to the repository root, and initialize the dependencies:

git submodule update --init --recursive

Configure the project. Replace the Qt path with the version installed on your system:

cmake -S . -B _Build/windows -G Ninja -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER=clang-cl -DCMAKE_CXX_COMPILER=clang-cl -DCMAKE_PREFIX_PATH="C:/Qt/6.x.x/msvc2022_64"

Build the launcher and stage a runnable installation:

cmake --build _Build/windows --target launcher
cmake --install _Build/windows --prefix _Build/windows/install

The finished application and its runtime dependencies will be placed in _Build/windows/install.

Building on Linux

./build-linux.sh builds the emulator (no Qt launcher) in one step: ./build-linux.sh builds kyty_emulator and kyty_launcher, ./build-linux.sh kyty_shader_precompile another target. kyty_launcher (launcher-linux/) is the settings window, the Windows launcher's pages and settings with SDL2 and Dear ImGui linked in (nothing to install); it starts the game through run_ds.sh. It uses -O3, ThinLTO and -march=x86-64-v3 for an executable other PCs can run (KYTY_MARCH=native for this CPU only). The manual steps below build the Qt launcher as well. tools/local/dlss-bridge/build-dlss-linux.sh adds DLSS (tools/local/dlss-bridge/README.md), and ./precompile-linux.sh --game <the game> makes the static shader cache as precompile-windows.ps1 does on Windows (--help).

Install the toolchain and the libraries the bundled SDL2 needs. Without the audio, Wayland and udev development packages SDL2 quietly configures itself without those backends, and the resulting build has no working sound and no gamepad hotplug:

sudo apt-get install --no-install-recommends \
  clang lld ninja-build cmake git glslang-tools \
  libgl1-mesa-dev libx11-dev libxcursor-dev libxext-dev libxfixes-dev \
  libxi-dev libxrandr-dev libxss-dev libxkbcommon-dev \
  libasound2-dev libpulse-dev libudev-dev libdbus-1-dev libwayland-dev wayland-protocols

Qt 6 (Concurrent, Network, Widgets) is also required — either the distribution packages (qt6-base-dev) or an official Qt installation.

git submodule update --init --recursive

cmake -S . -B _Build/linux -G Ninja -DCMAKE_BUILD_TYPE=Release \
  -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ \
  -DCMAKE_PREFIX_PATH="$Qt6_DIR"

cmake --build _Build/l