{"id":13795642,"url":"https://github.com/komefai/PS4RemotePlayInterceptor","last_synced_at":"2025-05-12T23:32:29.507Z","repository":{"id":134626179,"uuid":"100369738","full_name":"komefai/PS4RemotePlayInterceptor","owner":"komefai","description":"A small .NET library to intercept and inject controls on PS4 Remote Play for Windows","archived":false,"fork":false,"pushed_at":"2018-01-14T01:07:47.000Z","size":314,"stargazers_count":92,"open_issues_count":3,"forks_count":28,"subscribers_count":12,"default_branch":"master","last_synced_at":"2025-05-10T02:27:49.753Z","etag":null,"topics":["automation","bot","dualshock","ps4","remoteplay","sony"],"latest_commit_sha":null,"homepage":"http://blog.komefai.com","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/komefai.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2017-08-15T11:14:07.000Z","updated_at":"2025-02-27T10:44:48.000Z","dependencies_parsed_at":"2023-06-16T15:31:10.636Z","dependency_job_id":null,"html_url":"https://github.com/komefai/PS4RemotePlayInterceptor","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/komefai%2FPS4RemotePlayInterceptor","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/komefai%2FPS4RemotePlayInterceptor/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/komefai%2FPS4RemotePlayInterceptor/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/komefai%2FPS4RemotePlayInterceptor/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/komefai","download_url":"https://codeload.github.com/komefai/PS4RemotePlayInterceptor/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253841060,"owners_count":21972585,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["automation","bot","dualshock","ps4","remoteplay","sony"],"created_at":"2024-08-03T23:00:59.937Z","updated_at":"2025-05-12T23:32:28.972Z","avatar_url":"https://github.com/komefai.png","language":"C#","funding_links":["http://paypal.me/Komefai"],"categories":["Dev Tools"],"sub_categories":["Remote Package Installers"],"readme":"# PS4 Remote Play Interceptor\r\n\r\n[![nuget](https://img.shields.io/nuget/v/PS4RemotePlayInterceptor.svg)](https://nuget.org/packages/PS4RemotePlayInterceptor)\r\n[![NuGet](https://img.shields.io/nuget/dt/PS4RemotePlayInterceptor.svg)](https://nuget.org/packages/PS4RemotePlayInterceptor)\r\n[![Donate](https://img.shields.io/badge/Donate-PayPal-green.svg)](http://paypal.me/Komefai)\r\n[![Twitter](https://img.shields.io/twitter/url/https/twitter.com/fold_left.svg?style=social\u0026label=Follow%20Me)](https://twitter.com/itskomefai)\r\n\r\nA small .NET library to intercept controls on PS4 Remote Play for Windows, powered by [EasyHook](https://easyhook.github.io/). The library can be used to automate any PS4 game. See the [prototype demo](https://youtu.be/QjTZsPR-BcI).\r\n\r\nAlso check out [PS4 Macro](https://github.com/komefai/PS4Macro) repository for a ready-to-use software built on this library.\r\n\r\n## Install\r\n\r\n#### Using NuGet (Recommended)\r\n```\r\nInstall-Package PS4RemotePlayInterceptor\r\n```\r\n\r\n#### From Source\r\nAdd reference to PS4RemotePlayInterceptor.dll.\r\n\r\n## Example Usage\r\n\r\nThis console application will hold the X button while moving the left analog stick upwards until interrupted by a keypress.\r\n\r\nYou can set `EmulateController` to `true` to use the library without a DualShock 4 controller plugged in (the real controller must be unplugged).\r\n\r\n```csharp\r\nusing PS4RemotePlayInterceptor;\r\n\r\nclass Program\r\n{\r\n    static void Main(string[] args)\r\n    {\r\n        // Setup callback to interceptor\r\n        Interceptor.Callback = new InterceptionDelegate(OnReceiveData);\r\n        // Emulate controller (BETA)\r\n        Interceptor.EmulateController = false;\r\n\r\n        // Start watchdog to automatically inject when possible\r\n        Interceptor.Watchdog.Start();\r\n        // Notify watchdog events\r\n        Interceptor.Watchdog.OnInjectionSuccess = () =\u003e Console.WriteLine(\"Watchdog OnInjectionSuccess\");\r\n        Interceptor.Watchdog.OnInjectionFailure = () =\u003e Console.WriteLine(\"Watchdog OnInjectionFailure\");\r\n\r\n        // Or inject manually and handle exceptions yourself\r\n        //Interceptor.Inject();\r\n\r\n        Console.WriteLine(\"-- Press any key to exit\");\r\n        Console.ReadKey();\r\n    }\r\n\r\n    private static void OnReceiveData(ref DualShockState state)\r\n    {\r\n        /* -- Modify the controller state here -- */\r\n\r\n        // Force press X\r\n        state.Cross = true;\r\n\r\n        // Force left analog upwards\r\n        state.LY = 0;\r\n\r\n        // Force left analog downwards\r\n        // state.LY = 255;\r\n\r\n        // Force left analog to center\r\n        // state.LX = 128;\r\n        // state.LY = 128;\r\n    }\r\n}\r\n```\r\n\r\n## To-Do List\r\n\r\n- Intercept ouput reports\r\n\r\n## Troubleshoot\r\n\r\n- \u003e {\"STATUS_INTERNAL_ERROR: Unknown error in injected C++ completion routine. (Code: 15)\"}\r\n\r\nSOLUTION: Restart PS4 Remote Play.\r\n\r\n- \u003e Injection IPC failed (on some machines)\r\n\r\nSOLUTION: Inject with Compatibility mode instead\r\n\r\n```csharp\r\n// Setup callback to interceptor\r\nInterceptor.Callback = new InterceptionDelegate(OnReceiveData);\r\n\r\n// Inject\r\nInterceptor.InjectionMode = InjectionMode.Compatibility;\r\nInterceptor.Inject();\r\n```\r\n\r\n## Credits\r\n\r\n- https://easyhook.github.io/\r\n- https://github.com/Jays2Kings/DS4Windows\r\n- http://www.psdevwiki.com/ps4/DS4-USB\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkomefai%2FPS4RemotePlayInterceptor","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkomefai%2FPS4RemotePlayInterceptor","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkomefai%2FPS4RemotePlayInterceptor/lists"}