Page 1 of 1

DOSBox-x and too many buttons

Posted: Sun Nov 12, 2023 3:58
by mattcaron
For anyone who, like me, uses modern sticks with old games, my PR to allow DOSBox-X to map up to 96 buttons (was 32) was just merged, so should be in the next release.

(PR https://github.com/joncampbell123/dosbox-x/pull/4596)

I also checked an button combinations seem to work, so I was able to map ALT+Arrow keys to a STECS thumb hat to vector thrust on Jane's ATF.

Re: DOSBox-x and too many buttons

Posted: Mon Nov 13, 2023 11:27
by Ron61
For older games that can only handle 32 buttons, you can split the 128 button array into 32 button virtual controllers.

Re: DOSBox-x and too many buttons

Posted: Tue Nov 14, 2023 13:22
by Delta
Interesting choice to go with 96 to minimize overhead, since that value seems to be chosen specifically to cater to your throttle. I would be surprised if that extra overhead of going with 128 buttons (a common in-game limit due to Microsoft's DIJOYSTATE2 data structure, as well as the firmware limit of VKB's nJoy32 and many other firmwares in the industry and DIY spaces) had any measurable performance impact.

Ron61 wrote:For older games that can only handle 32 buttons, you can split the 128 button array into 32 button virtual controllers.


Sadly, you can only get up to 64 buttons (and 11 axes) this way at the moment, since the update that gave us VC PoV switches broke a lot of other VC functionality (buttons on the 3rd and 4th controller, more than 3 axes on the second controller). The last firmware without this defect is not available for STECS.

Re: DOSBox-x and too many buttons

Posted: Wed Nov 15, 2023 5:09
by mattcaron
Yeah, I realized this after I made the change and it was accepted by upstream. As I haven't used or cared about Windows in many years, hopefully this is understandable. Feel free to bump the number and submit the PR.

That is indeed unfortunate, but, as I do not use that feature, I did not notice its absence. Hopefully, it will be fixed soon.