Skip to content

feat: add native PlayStation Mouse (SCPH-1030) support - #779

Open
PeriBluGaming wants to merge 2 commits into
RetroPortingToolKit:masterfrom
PeriBluGaming:feature/ps1-mouse-support
Open

PeriBluGaming wants to merge 2 commits into
RetroPortingToolKit:masterfrom
PeriBluGaming:feature/ps1-mouse-support

Conversation

@PeriBluGaming

Copy link
Copy Markdown
Contributor

Summary

This PR adds native PlayStation Mouse (SCPH-1030) support to PSXRecomp, enabling compatible PlayStation games to use a real PC mouse through emulation of the original PlayStation peripheral.

Unlike mouse-to-analog-stick mapping, this implementation emulates the PlayStation Mouse device through the existing SIO0 controller interface.

The feature was developed and tested with Rescue Shot, a PlayStation title that supports mouse input.

Features

  • Native PlayStation Mouse emulation with device ID 0x12.
  • SDL3-based host mouse input.
  • Relative mouse movement for aiming.
  • Mouse button input, including left-click shooting.
  • Support for repeated firing and in-game menu navigation.
  • Integration with the existing controller input infrastructure.
  • Optional per-game configuration.
  • Compatibility handling for existing controller and input paths.

Implementation

SIO0 mouse protocol

Extends the existing SIO0 implementation to support PlayStation Mouse communication, including device identification, button states, and relative movement data.

SDL3 mouse input

Adds host-side mouse input handling and forwards movement and button states to the emulated PlayStation Mouse device.

Launcher integration

Games can opt in to PlayStation Mouse support using:

[controller]
supports_ps_mouse = true

The corresponding launcher device selection is implemented in a separate recomp-ui PR:

RetroPortingToolKit/recomp-ui#121

Configuration and runtime integration

Extends the relevant configuration, launcher-device, and runtime interfaces to support the new input device.

Testing

The implementation includes dedicated tests and updates to existing controller-related tests.

Notable test coverage includes:

  • test_sio_mouse_protocol.c — PlayStation Mouse SIO protocol.
  • test_ps_mouse_input.c — Mouse input handling.
  • test_launcher_device_roundtrip.cpp — Launcher device configuration.
  • Existing SIO and controller tests updated for compatibility.

Manual testing

Tested with RescueShotRecomp:

  • Native mouse aiming works.
  • Left mouse button triggers shooting.
  • Repeated firing works.
  • Mouse input works in the game's menus.
  • PlayStation Mouse can be selected through the companion launcher changes.
  • The integrated RescueShotRecomp runtime builds and launches successfully.

The standalone PSXRecomp test suite has not yet been confirmed as fully passing.

Documentation

Added docs/PS_MOUSE.md with implementation and integration documentation.

Related PR

recomp-ui: RetroPortingToolKit/recomp-ui#121

Both PRs are intended to provide complete PlayStation Mouse support while keeping the launcher functionality optional for games that do not support the device.

Example project

RescueShotRecomp:

https://github.com/PeriBluGaming/RescueShotRecomp

@PeriBluGaming
PeriBluGaming marked this pull request as draft October 27, 2026 21:30
@PeriBluGaming

Copy link
Copy Markdown
Contributor Author

Local validation (macOS / AppleClang 17)

Successfully configured and built the PSXRecomp runtime test targets with SDL3 and recomp-ui.

PlayStation Mouse tests:

  • sio_mouse_protocol_test — PASS
  • sio_mouse_protocol_multitap_test — PASS
  • ps_mouse_input_test — PASS

Controller regression tests:

  • sio_digital_command_test — PASS
  • sio_dualshock_rumble_test — PASS
  • sio_jogcon_protocol_test — PASS
  • sio_negcon_protocol_test — PASS
  • psx_pad_apply_test — PASS

Result: 8/8 tests passed, 0 failures.

The OpenBIOS emitter fingerprint has also been refreshed, and the corresponding GitHub Actions workflow completed successfully.

Native PlayStation Mouse support has additionally been tested in RescueShotRecomp.

Companion launcher PR: RetroPortingToolKit/recomp-ui#121

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant