Skip to content

USB: Add Hori FlightStick controller emulation#13636

Open
sonik-br wants to merge 1 commit intoPCSX2:masterfrom
sonik-br:hori-flightstick
Open

USB: Add Hori FlightStick controller emulation#13636
sonik-br wants to merge 1 commit intoPCSX2:masterfrom
sonik-br:hori-flightstick

Conversation

@sonik-br
Copy link
Copy Markdown

Description of Changes

Emulates the two models of Hori Flight Stick controllers, HP2-13 and HP2-217.
520342355-32ae7d66-5f85-4da1-afad-34a769ad7288

Rationale behind Changes

Provides a standardized way to play supported games using a FlightStick or HOTAS device.
I believe some games will not apply any dead zone when the input device is a FlightStick, as opposed to a standard DualShock2.
HP2-217 features rumble and more buttons than HP2-13.
HP2-217 should be compatible with any game that supports HP2-13. Hori listed it as being backwards compatible.

Suggested Testing Steps

Test in some compatible games:

  • Sega Ages 2500 Vol.30 Galaxy Force II (requires pressing select to configure input as USB FlightStick)
  • Ace Combat 4
  • Ace Combat 5 (supports HP2-217 exclusive features)

Did you use AI to help find, test, or implement this issue or feature?

No

case FLIGHTSTICK_FS2:
{
//interrupt input data
FlightStickConData out = {};
Copy link
Copy Markdown
Contributor

@Florin9doi Florin9doi Nov 30, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can store FlightStickConData_VR00 vendordata_00{};, FlightStickConData_VR01 vendordata_01{}; and FlightStickConData out{}; in FlightStickDeviceState and then update these structures directly from SetBindingValue to avoid making the fourth copy of the same data.

{
FLIGHTSTICK_FS1, // HP2-13 (FlightStick)
FLIGHTSTICK_FS2, // HP2-217 (FlightStick 2)
FLIGHTSTICK_COUNT,
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FLIGHTSTICK_COUNT is unused

@sonik-br
Copy link
Copy Markdown
Author

@Florin9doi On a related note, I've started to implement Logitech Flight Force too.
Putting it on usb-pad.cpp to use the already implemented ffb parsing.

Makes sense to move the hori flight stick to that same file? Or keep it separated?

For the logitech ffb one, I've added more input bindings here:
"usb-pad.h"

	enum ControlID
	{
		//existing data
		CID_STEERING_L,
		...
		...
		CID_BUTTON31,

		//added flightstick data
		CID_STICK_L,
		CID_STICK_R,
		CID_STICK_U,
		CID_STICK_D,
		CID_STICK_THROTTLE_U,
		CID_STICK_THROTTLE_D,
		CID_STICK_TWIST_L,
		CID_STICK_TWIST_R,
		
		CID_COUNT,
	};

Appended to the end to not break existing input map.
If I move the Hori implementation to that file, it will need a few more entries on that enum.

@Florin9doi
Copy link
Copy Markdown
Contributor

@Florin9doi On a related note, I've started to implement Logitech Flight Force too. Putting it on usb-pad.cpp to use the already implemented ffb parsing.
Makes sense to move the hori flight stick to that same file? Or keep it separated?

You can move ParseFFData from PadState to FFDevice and use it from usb-flightstick.cpp

@sonik-br
Copy link
Copy Markdown
Author

sonik-br commented Dec 2, 2025

@Florin9doi
Already moved it to usb-pad, and added another flightstick type XD
Wanna take a look?
https://github.com/sonik-br/pcsx2/tree/flightstick-devices

FFB is untested.
I don't have access to any forcefeedback device, but I can "simulate" one using a rp2040 and it does receive ffb commands. Looks like it's working.
Game to test the Flight Force: AirForce Delta Strike

Comment on lines +331 to +334
SettingInfo::Type::IntegerList, // type
"Mode", // name
TRANSLATE_NOOP("USB", "Mode switch"), // display name
TRANSLATE_NOOP("USB", "Set the stick mode switch position"), // description
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
SettingInfo::Type::IntegerList, // type
"Mode", // name
TRANSLATE_NOOP("USB", "Mode switch"), // display name
TRANSLATE_NOOP("USB", "Set the stick mode switch position"), // description
.type = SettingInfo::Type::IntegerList,
.name = "Mode",
.display_name = TRANSLATE_NOOP("USB", "Mode switch"),
.description = TRANSLATE_NOOP("USB", "Set the stick mode switch position"),
(...)

@JordanTheToaster JordanTheToaster added this to the Release 2.8 milestone Dec 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants