-
-
Notifications
You must be signed in to change notification settings - Fork 96
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
Multitap driver #1611
base: main
Are you sure you want to change the base?
Multitap driver #1611
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #1611 +/- ##
=======================================
Coverage 9.96% 9.96%
=======================================
Files 447 447
Lines 132300 132308 +8
=======================================
+ Hits 13186 13189 +3
- Misses 119114 119119 +5 ☔ View full report in Codecov by Sentry. |
src/mips/psyqo/src/advancedpad.cpp
Outdated
uint8_t *pad_data; | ||
static constexpr unsigned pad_data_width = 8; | ||
|
||
for (uint16_t port = 0; port < 2; port++) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks like this scans all ports? Which is different from what the .hh says, about alternating ports per frame. Also, unsigned
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Huh, guessing the description in the header is a mix of leftover from simplepad and/or copilot hallucination, mixed with my own derp. Judging from simplepad's description, this is mentioned as a drawback, so I'll just nuke the comment about alternating frames unless this seems like desirable behavior. simplepad's description below:
- @details This class is meant to be used as a singleton, probably in
- the
Application
derived class. It is a simple thunk to the BIOS' - PAD interface, and has the same caveats, namely that it should be
- initialized prior using the BIOS' memory card functions, and that
- polling will alternate between the two pads at each frame when two
- pads are connected, which can introduce input lags.
using namespace timer_literals; | ||
|
||
Kernel::Internal::addOnFrame([this]() { | ||
readPad(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So one detail here is that the callbacks put on addOnFrame
are run at the beginning of every drawn frame. If the software runs at 10FPS, then it'll be called 10 times per second, which may make it lose events, potentially. Same as with the SimplePad, really. But we can change this later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just two little nits, but otherwise it looks fine.
src/mips/psyqo/advancedpad.hh
Outdated
/** | ||
* @brief Initializes the pads. | ||
* | ||
* @details This will initialize the pads polling by calling the BIOS' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The details here are actually incorrect, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Revised, but possibly lacking in detail.
Initial efforts. Currently lacks config mode. Draft request for picking at and discussing changes required.