Hi all,
Got tired of waiting so I banged out a set of programs for Linux support of the GPWIZ49 controllers. Also, if I get my hands on a U360 it should be trivial to extend support to that as well.
If you want to send me one to speed up the development that would be fine
Thanks to Randy for a cool product and a simple protocol. Usbsnoop made it really easy to capture the command stream.
I based my support heavily on the ideas of SirPoonga's set49mode (although I didn't see a single line of his code since I knew it wouldn't work on Linux) and have stolen a couple of his ini files for my own usage.
The package requires Device::USB and libusb and probably libusb-dev to work.
Get them however is best for your distribution.
The package contains several files
parse_controls.pl This program creates the needed ini file for the
set49mode program. It requires mame_modes.ini,
clones.ini, overrides.ini and controls.ini.
(Read the file for more info).
gpwiz49.pm The Perl package which does all the work of talking
to the GPWIZ49.
(Thanks Randy for the very simple protocol).
set49mode.pl The program that you would have your frontend call
to set the mode. It is called like this:
set49mode romname inifile jstype
clones.ini My current clones.ini file for 0.118u3 but you should
probably create your own using
mame -listclones > clones.ini
override.ini An example override.ini file that should be customized.
The file must exist even if there are not overrides.
mame_modes.ini The map file from mame modes to GPWIZ49 DRS Modes
. Probably shouldn't mess with this one.
To install copy gpwiz49.pm into your perl libraries.
Then copy the ini files into your standard mame dat file directory.
Then put set49mode into your file path (perhaps /usr/share/games or /usr/local/bin) and change it's ownership to root and make it suid root.
sudo chown root set49way.pl
sudo chmod u+s set49way.pl
First order of business is to run: parse_controls.pl ini_file_directory > 49waymodes.ini
Copy this new file into your dat file directory and your are all set to run set49mode.
Currently I have only done preliminary testing since I wanted to make sure I could get this to work before finalizing on my control panel layout. I have only tested this with two GPWIZ49s and am not at all certain about the product_id of a fourth GPWIZ49 (I am guessing that it is 0x000a but I have no idea) perhaps randy or a GPWIZ-4 owner could help out here.
Enjoy,
Mark