Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test input joypad driver #16370

Merged
merged 2 commits into from
Mar 18, 2024

Conversation

zoltanvb
Copy link
Contributor

Description

A test input driver, which can take pre-programmed input from a json file and carry out actions:

  • controller connection
  • button press / release
  • analog axis movement

Test input file is added to match remote retropad validation capabilities. Running it with that counterpart should result in a successful test:

retroarch --appendconfig tests-other/all_binds_empty.cfg\|tests-other/testinput.cfg  -L netretropad tests-other/netretropad_all_inputs.ratst
[...]
[libretro INFO] [Remote RetroPad]: Test sequence finished at frame 3333, result: 32/32 inputs detected
[libretro INFO] [Remote RetroPad]: Validated state: ffffffff combo: 00000000

The test setup should be possible to run on any RA build which can handle command line input. The additional config files are designed so that it can be run on top of an existing working RA setup, without changing anything in the existing config, but still uses that as a system dependent base (like video driver, etc.).

Inputs drive both cores and menu, so tests can be designed for both - but there is no feedback, so e.g. menu navigation needs to be hardcoded.

Related Pull Requests

#16357

Add a new joypad input driver:
- hide driver behind #ifdef and enable it in config_params.sh
- add a new config parameter to specify the test input file
- add aux files: additional config files that cancel out any binds
  that may be present in RA config, autoconfig profile for
  test joypads, test input file that matches controller test
  sequence
@LibretroAdmin LibretroAdmin merged commit b27233b into libretro:master Mar 18, 2024
27 checks passed
@JesseTG
Copy link
Contributor

JesseTG commented Mar 19, 2024

You know what would really be neat? A schema file for the input. If it's easier to write fake input data, then more people will use it Additionally, I'd add support in libretro.py if there were a schema.

@zoltanvb zoltanvb deleted the test_input_joypad_driver branch December 25, 2024 06:42
Sunderland93 pushed a commit to Sunderland93/RetroArch that referenced this pull request Dec 26, 2024
* Test driver for joypad inputs

Add a new joypad input driver:
- hide driver behind #ifdef and enable it in config_params.sh
- add a new config parameter to specify the test input file
- add aux files: additional config files that cancel out any binds
  that may be present in RA config, autoconfig profile for
  test joypads, test input file that matches controller test
  sequence

* Fixes and comments for test input driver.
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.

3 participants