Call for contributions: input and pads (libScePad, mouse, keyboard, IME)

未关闭
#701 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
54/100
Issue 类型
功能
描述清晰度
基本清楚
活跃度
活跃
技术栈
cpp
领域
backend

调研方向

Choose one input area and comment before starting, as the issue requests. For the explicitly good first issue, read the six inert pad functions in core/libs/prx/libScePad/, then inspect the scripted input tests in core/libs/prx/libScePad/tests/ and core/libs/tests/GuestPad.cpp. Run ctest --test-dir build -R pad --output-on-failure; done means the selected exports behave as expected and the tests pass.

由索引模型根据 Issue 内容生成。

描述

area: input enhancement help wanted medium

Call for contributions: input and pads

Why

Controls are the other thing every title needs on the first screen. Counted from the code: libScePad has 57 implemented exports, 165 unimplemented and 6 that return success without effect (scePadIsDS4Connected, scePadIsMoveConnected, scePadEnableExtensionPort, ...). libSceMouse has 13 unimplemented exports and libSceKeyboard 15 (sceMouseDeviceOpen, sceKeyboardConnectPort, ...); libSceIme has 46.

What to pick
  • Pad: the connection and device functions (scePadConnectPort, scePadDeviceOpen, scePadDisconnectDevice), the data-conversion and active-profile switches, then the controller-update family (core/libs/prx/libScePad/, state in src/PadState.cpp, host side in include/).
  • Mouse and keyboard: open, close, read and device info on top of the host's SDL input (core/libs/prx/libSceMouse/, libSceKeyboard/).
  • IME: the 46 unimplemented exports, starting with the ones that only need state (core/libs/prx/libSceIme/).
  • Quality: mapping defaults for keyboard and mouse, rumble and haptic behaviour (docs/dev/TechnicalDebt.md says the haptic-to-rumble mapping is not measured against a real controller; a measurement with your own controller is welcome).
Expected result

Exports that behave like the console when no controller, one controller or several controllers are connected, driven by the host's real or scripted input.

How to test without our games

libScePad has a scripted input layer so tests need no physical controller: see InputScript.cpp, InputCommandFile.cpp, PadRecording.cpp and PadIdentify.cpp in core/libs/prx/libScePad/tests/, and core/libs/tests/GuestPad.cpp. Run ctest --test-dir build -R pad --output-on-failure. For a hands-on check with your own controller, write in the pull request what you pressed and what the test program printed.

Difficulty

Medium; good first issue for the 6 inert pad functions.

Who to ask

Ask in this issue; the maintainers read every comment.

Rules that apply to every call
  • Comment on the issue before you start, so two people do not do the same work. One topic per pull request, against AnyKyty.
  • Conventional Commits (fix(libkernel): ..., feat(libScePad): ..., test(...), docs: ...). No comments in code. Nothing specific to one title: no title IDs, no data taken from a game, no per-title branches.
  • Every export either does exactly what it should or throws: an unimplemented export calls NotImplemented_nid_no_patch(__func__). A silent stub is allowed only when it unblocks a title and only affects the UI; list it under "Silent stubs" in the library's file in docs/dev/debt/ through a fragment (docs/dev/debt/changes/<branch>.md, see docs/dev/TechnicalDebt.md).
  • Say where a behaviour comes from: public SDK headers and documentation, a published reverse-engineering write-up, or your own analysis of your own console's system modules. Do not post or attach firmware files, system modules or game files.
  • Each test finishes in 30 s on the CI runners. python3 tools/check_conventions.py --base origin/AnyKyty must pass before you push.
  • Build and test: docs/dev/START_HERE.md and docs/dev/BUILD.md. CI runs the library tests on GitHub's runners (no GPU, no game) on Linux and Windows.
主要语言
C++
星标
214
派生
7
平均合并
7 小时 53 分钟
30 天内合并 PR
280

环境准备

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

simnJS/AnyPS5 的其他 Issue

查看 simnJS/AnyPS5 的全部 Issue

相似的 Issue

更多 C++ Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。