987123879113 / pcsx2

PCSX2 - The Playstation 2 Emulator
https://pcsx2.net
GNU General Public License v3.0
29 stars 12 forks source link

btools ddrio dynamic library support for input and lights. #1

Closed DinsFire64 closed 2 years ago

DinsFire64 commented 2 years ago

Description of Changes

Added dynamic loading of ddrio.dll to support a variety of hardware combinations of lights and input.

Rationale behind Changes

Allows connection of devices such as pacdrive, smx, python2 (for added cursed), piuio (itg dedicab), lit board, hid lights, etc through btools api.

Suggested Testing Steps

After compile place ddrio.dll (named exactly as shown) and all dependencies (geninput, libusb [which is already in this repo], etc) in the program directory and run. Use the supplied Device API section to set the input to Btools if input from device is required. All ddr inputs are automatically bound.

Further Expansion:

I have had at least one interested party wishing to expand this btools support to gitadora cabinets, so I'll have him follow up.

Notes:

I still suck at git, so let me know if I fucked anything up.

987123879113 commented 2 years ago

I'll look at the code more later but a quick glance I see something that sticks out to me. You only need two files in the bemanitools folder, ddrio.h and glue.h. Everything else isn't being used so please delete those.

DinsFire64 commented 2 years ago

Sure thing, I also noticed I left a few functions in, so I'll clean those up in the same commit to prevent spam.

Let me know what else you want to change and I'll make it all in one commit

DinsFire64 commented 2 years ago

Let me know if there is anything else I can help with!

987123879113 commented 2 years ago

Tested a build locally and normal I/O works as expected. ddrio itself has various issues (libavs requirement, needs a 64bit build, etc) but it seems like it should work from my very brief limited testing.