PlayStation 4 emulator for Windows, Linux and macOS written in C++
Find a file
TheTurtle 82cacec8eb
shader_recompiler: Remove special case buffers and add support for aliasing (#2428)
* shader_recompiler: Move shared mem lowering into emitter

* IR can be quite verbose during first stages of translation, before ssa and constant prop passes have run that drastically simplify it. This lowering can also be done during emission so why not do it then to save some compilation time

* runtime_info: Pack PsColorBuffer into 8 bytes

* Drops the size of the total structure by half from 396 to 204 bytes. Also should make comparison of the array a bit faster, since its a hot path done every draw

* emit_spirv_context: Add infrastructure for buffer aliases

* Splits out the buffer creation function so it can be reused when defining multiple type aliases

* shader_recompiler: Merge srt_flatbuf into buffers list

* Its no longer a special case, yay

* shader_recompiler: Complete buffer aliasing support

* Add a bunch more types into buffers, such as F32 for float reads/writes and 8/16 bit integer types for formatted buffers

* shader_recompiler: Remove existing shared memory emulation

* The current impl relies on backend side implementaton and hooking into every shared memory access. It also doesnt handle atomics. Will be replaced by an IR pass that solves these issues

* shader_recompiler: Reintroduce shared memory on ssbo emulation

* Now it is performed with an IR pass, and combined with the previous commit cleanup, is fully transparent from the backend, other than requiring workgroup_index be provided as an attribute (computing this on every shared memory access is gonna be too verbose

* clang format

* buffer_cache: Reduce buffer sizes

* vk_rasterizer: Cleanup resource binding code

* Reduce noise in the functions, also remove some arguments which are class members

* Fix gcc
2025-02-15 14:06:56 +02:00
.ci Bump to Clang 18 (#1549) 2024-11-21 12:08:22 +02:00
.github Auto update of english translation file based on sources (#2349) 2025-02-13 15:50:55 +02:00
cmake cmake: unbundle stb (#1601) 2024-12-05 23:10:27 +02:00
dist Add emulator category (#2320) 2025-02-03 23:28:25 -08:00
documents Qt: Use Qt 6.8.2 (#2409) 2025-02-13 12:01:14 +02:00
externals shader_recompiler: Replace texel buffers with in-shader buffer format interpretation (#2363) 2025-02-06 20:40:49 -08:00
LICENSES audio: Accurate audio output timing. (#1986) 2024-12-31 12:38:52 +02:00
scripts Rewrite Save Data & Impl Save Data Dialog (#824) 2024-09-20 12:34:19 +03:00
src shader_recompiler: Remove special case buffers and add support for aliasing (#2428) 2025-02-15 14:06:56 +02:00
.gitignore misc: Add JetBrains build directories to gitignore. (#1573) 2024-11-22 17:36:31 +02:00
.gitmodules audio: Accurate audio output timing. (#1986) 2024-12-31 12:38:52 +02:00
CMakeLists.txt shader_recompiler: Remove special case buffers and add support for aliasing (#2428) 2025-02-15 14:06:56 +02:00
CMakeSettings.json fix VS intellisense (#1104) 2024-09-27 09:03:42 +03:00
CONTRIBUTING.md Fix typo in CONTRIBUTING.md comment 2024-08-23 18:29:00 -07:00
crowdin.yml Update Crowdin configuration file 2025-02-13 14:50:02 +02:00
LICENSE Initial commit 2022-10-24 12:48:38 +03:00
README.md Update README.md with crowdin link 2025-02-13 16:13:33 +02:00
REUSE.toml Adding KBM icon for kbm remaps. (#2430) 2025-02-14 12:48:52 +02:00
shell.nix Add nix-shell to allow native build on NixOS (#2333) 2025-02-07 19:05:33 +02:00



shadPS4

General information

shadPS4 is an early PlayStation 4 emulator for Windows, Linux and macOS written in C++.

If you encounter problems or have doubts, do not hesitate to look at the Quickstart.
To verify that a game works, you can look at shadPS4 Game Compatibility.
To discuss shadPS4 development, suggest ideas or to ask for help, join our Discord server.
To get the latest news, go to our X (Twitter) or our website.
For those who'd like to donate to the project, we now have a Kofi page!

Status

Important

shadPS4 is early in development, don't expect a flawless experience.

Currently, the emulator can successfully run games like Bloodborne, Dark Souls Remastered, Red Dead Redemption and many other games.

Why

This project began as a fun project. Given our limited free time, it may take some time before shadPS4 can run more complex games, but we're committed to making small, regular updates.

Building

Important

If you want to use shadPS4 to play your games, you don't have to follow the build instructions, you can simply download the emulator from either the release tab or the action tab.

Windows

Check the build instructions for Windows.

Linux

Check the build instructions for Linux.

macOS

Check the build instructions for macOS.

Important

macOS users need at least macOS 15 on Apple Silicon-based Mac devices and at least macOS 14 on Intel-based Mac devices.

Debugging and reporting issues

For more information on how to test, debug and report issues with the emulator or games, read the Debugging documentation.

Keyboard and Mouse Mappings

Note

Some keyboards may also require you to hold the Fn key to use the F* keys. Mac users should use the Command key instead of Control, and need to use Command+F11 for full screen to avoid conflicting with system key bindings.

Button Function
F10 FPS Counter
Ctrl+F10 Video Debug Info
F11 Fullscreen
F12 Trigger RenderDoc Capture

Note

Xbox and DualShock controllers work out of the box.

Controller button Keyboard equivalent
LEFT AXIS UP W
LEFT AXIS DOWN S
LEFT AXIS LEFT A
LEFT AXIS RIGHT D
RIGHT AXIS UP I
RIGHT AXIS DOWN K
RIGHT AXIS LEFT J
RIGHT AXIS RIGHT L
TRIANGLE Numpad 8 or C
CIRCLE Numpad 6 or B
CROSS Numpad 2 or N
SQUARE Numpad 4 or V
PAD UP UP
PAD DOWN DOWN
PAD LEFT LEFT
PAD RIGHT RIGHT
OPTIONS RETURN
BACK BUTTON / TOUCH PAD SPACE
L1 Q
R1 U
L2 E
R2 O
L3 X
R3 M

Keyboard and mouse inputs can be customized in the settings menu by clicking the Controller button, and further details and help on controls are also found there. Custom bindings are saved per-game. Inputs support up to three keys per binding, mouse buttons, mouse movement mapped to joystick input, and more.

Main team

Logo is done by Xphalnos

Contributing

If you want to contribute, please look the CONTRIBUTING.md file.
Open a PR and we'll check it :)

Translations

If you want to translate shadPS4 to your language we use crowdin.

Contributors

Special Thanks

A few noteworthy teams/projects who've helped us along the way are:

  • Panda3DS: A multiplatform 3DS emulator from our co-author wheremyfoodat. They have been incredibly helpful in understanding and solving problems that came up from natively executing the x64 code of PS4 binaries

  • fpPS4: The fpPS4 team has assisted massively with understanding some of the more complex parts of the PS4 operating system and libraries, by helping with reverse engineering work and research.

  • yuzu: Our shader compiler has been designed with yuzu's Hades compiler as a blueprint. This allowed us to focus on the challenges of emulating a modern AMD GPU while having a high-quality optimizing shader compiler implementation as a base.

  • hydra: A multisystem, multiplatform emulator (chip-8, GB, NES, N64) from Paris.

License