raphnet / pj64raphnetraw

PJ64 input plugin with direct N64 controller access for raphnet adapters
http://www.raphnet.net/programmation/mupen64plus-input-raphnetraw/index_en.php
16 stars 7 forks source link

Add special build with GetKeys support #7

Closed CEnnis91 closed 2 years ago

CEnnis91 commented 3 years ago

The stick accuracy of raphnet adapters is amazing and highly regarded among competitive Smash64 players. But the lack of GetKeys() support limits the community's options (and possibly others). A few netplay options exist for Smash64 players, but they are awkward at best (kaillera), and incompatible at worst (AQZ) with ReadController().

This patch adds support for a special build that sets raphnet controllers to Controls[i].RawData = 0 and utilizes PJ64's GetKeys() function.

pb_getKeys() calls gcn64lib_rawSiCommand() and transforms the response into the proper BUTTONS struct. No other modifications are made, so the accuracy of N64_GET_STATUS calls should be the same as through ReadController(). This is basically the same as what pollraw_n64() does in gcn64tools, if there's a more efficient way of doing this let me know!

CEnnis91 commented 3 years ago

A small related comment, as I'm not sure the best way to reach you:

At this point there's a lot of special builds, and I was curious your thoughts on condensing the special builds into one build and offer configuration through DllConfig(). I quickly mocked up an dialog that should cover everything, and would just use an INI config to persist everything.

image

CEnnis91 commented 3 years ago

I've been informed there might be an issue with the dual port adapters, I will update the PR when I get a chance to look.

raphnet commented 3 years ago

Thank you, this looks good! What's the issue with the dual port adapter? I did a quick review and did not spot anything obvious.

And yes, a configuration dialog would be much better than the current multiple-file approach! I would gladly accept a PR for that!

raphnet commented 3 years ago

I've been informed there might be an issue with the dual port adapters, I will update the PR when I get a chance to look.

With the last commit, is this reported issue fixed?

CEnnis91 commented 2 years ago

Yes, this fixes that issue.