10-26-2017, 12:00 AM
Hi everyone!
I'm trying to write a new usb plugin, using usbnull and usbqemu-wheel as base. The actual usbqemu-buzz plugin is 1 set only (as I said in the dedicated thread) and the more advanced binaries are closed source. The thread opener open source plugin is not working on new PCSX2 version with Windows 10, buzzers are not responsive (slow or sticky).
I'm studying the OHCI protocol, and I'm stuck, maybe you can help me.
My idea is like this: using some high level HID library in C#, I create a .NET DLL that manage all the connection/disconnection stuff with the two sets of buzzers, and simulate a OHCI controller. Because this is simulated (the real connection stuff is done by the HID library), many registers can be faked (some need to be correctly initialited to let the game know how many sets are connected).
At the actual state, I may write a small software that calling this DLL, I can send an array of bytes to light up the lights and I can read the state of the buttons as they are send back by the controllers.
Now I'm stuck: PCSX2 does calls on the USBwrite32 and USBread32, but they are only for the control register. How PCSX2 sends and receive data bytes? If I understood correctly, there should be:
Write (address, value) and value = read(address), knowing the base (i.e. 12345), when game request byte (12347, I can do 12347-12345=2, ready byte 2 from the buzzers and give back to the emulator).
But I cannot intercept those calls. How I should do? Thank you!
Alby87
I'm trying to write a new usb plugin, using usbnull and usbqemu-wheel as base. The actual usbqemu-buzz plugin is 1 set only (as I said in the dedicated thread) and the more advanced binaries are closed source. The thread opener open source plugin is not working on new PCSX2 version with Windows 10, buzzers are not responsive (slow or sticky).
I'm studying the OHCI protocol, and I'm stuck, maybe you can help me.
My idea is like this: using some high level HID library in C#, I create a .NET DLL that manage all the connection/disconnection stuff with the two sets of buzzers, and simulate a OHCI controller. Because this is simulated (the real connection stuff is done by the HID library), many registers can be faked (some need to be correctly initialited to let the game know how many sets are connected).
At the actual state, I may write a small software that calling this DLL, I can send an array of bytes to light up the lights and I can read the state of the buttons as they are send back by the controllers.
Now I'm stuck: PCSX2 does calls on the USBwrite32 and USBread32, but they are only for the control register. How PCSX2 sends and receive data bytes? If I understood correctly, there should be:
Write (address, value) and value = read(address), knowing the base (i.e. 12345), when game request byte (12347, I can do 12347-12345=2, ready byte 2 from the buzzers and give back to the emulator).
But I cannot intercept those calls. How I should do? Thank you!
Alby87