rabiddeity
Plugin Hacker
I've been tinkering around with the source for N-Rage's 1.83 plugin to fix several issues I was having with it not detecting my joystick, and then rumble pak support not working, and I don't think it would be too difficult to add support for binding two DirectInput keys/buttons to one N64 button. (Many thanks to N-Rage for supplying the source in the first place!)
With 1.83 as it is, it seems like you can only bind buttons from one joystick to each controller. In other words, if I want to do something crazy like use two devices as one controller, it can't work. Not a problem for most people, but it is if you want to use separate steering wheel and pedals, for instance. No reason you shouldn't have the ability to do so.
Not to mention that the plugin as is will not even pick up a device that reports itself as a steering wheel, or a flightstick, as every acceptable device type is hardcoded. My original pad detection problem stemmed from the fact that when DirectInput queried what type of device I had, my gamepad reported itself as a flightstick. A weird driver bug? Either way, there's no reason you shouldn't be able to bind to whatever device(s) you want, as long as they're plugged in and DirectInput can recognize them. Easily fixed.
While I was poking around, I noticed that the DirectInput emulated rumble pak support seems reeeeeally sketchy. The way it works right now is like this: if we get any data directed toward a rumble pak, let's pulse the force feedback controller's motors for either 150ms or 300ms! It works, but it's not very accurate. According to a doc I googled, the way the REAL thing works is through a 32 byte control value sent directly to the pak, which switches the motor on the rumble pak on and off. I'm going to screw around with the debugger tonight and see if there are different signals sent for different levels of motor drive. DirectInput already has effects for turning a force feedback motor on indefinitely, and turning it off at will. If it works better, I'll post that change too.
I'd like to fix up some things in the code, improve on the force feedback support a bit, clean up the configuration dialogs, COMMENT THE FRIGGIN SOURCE, and add some documentation. Maybe I can clean up the way configs are stored in the registry too, get rid of that awful hex storage to make the whole thing human-editable and more portable between releases. Anyway, I'll post up an alpha release and source in a few days.
With 1.83 as it is, it seems like you can only bind buttons from one joystick to each controller. In other words, if I want to do something crazy like use two devices as one controller, it can't work. Not a problem for most people, but it is if you want to use separate steering wheel and pedals, for instance. No reason you shouldn't have the ability to do so.
Not to mention that the plugin as is will not even pick up a device that reports itself as a steering wheel, or a flightstick, as every acceptable device type is hardcoded. My original pad detection problem stemmed from the fact that when DirectInput queried what type of device I had, my gamepad reported itself as a flightstick. A weird driver bug? Either way, there's no reason you shouldn't be able to bind to whatever device(s) you want, as long as they're plugged in and DirectInput can recognize them. Easily fixed.
While I was poking around, I noticed that the DirectInput emulated rumble pak support seems reeeeeally sketchy. The way it works right now is like this: if we get any data directed toward a rumble pak, let's pulse the force feedback controller's motors for either 150ms or 300ms! It works, but it's not very accurate. According to a doc I googled, the way the REAL thing works is through a 32 byte control value sent directly to the pak, which switches the motor on the rumble pak on and off. I'm going to screw around with the debugger tonight and see if there are different signals sent for different levels of motor drive. DirectInput already has effects for turning a force feedback motor on indefinitely, and turning it off at will. If it works better, I'll post that change too.
I'd like to fix up some things in the code, improve on the force feedback support a bit, clean up the configuration dialogs, COMMENT THE FRIGGIN SOURCE, and add some documentation. Maybe I can clean up the way configs are stored in the registry too, get rid of that awful hex storage to make the whole thing human-editable and more portable between releases. Anyway, I'll post up an alpha release and source in a few days.